gralobe 1.0.8 → 1.0.10
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 +500 -483
- package/dist/gralobe.js.map +1 -1
- package/dist/gralobe.umd.cjs +75 -72
- package/dist/gralobe.umd.cjs.map +1 -1
- package/dist/index.d.ts +12 -0
- package/package.json +1 -1
package/dist/gralobe.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as S from "three";
|
|
2
|
-
import { Controls as
|
|
3
|
-
const Ki = { type: "change" }, Ci = { type: "start" },
|
|
2
|
+
import { Controls as kr, Vector3 as se, MOUSE as tt, TOUCH as Qe, Quaternion as Yi, Spherical as Zi, Vector2 as de, Ray as Ur, Plane as Fr, MathUtils as Nr, Matrix4 as Tn, Object3D as zr } from "three";
|
|
3
|
+
const Ki = { type: "change" }, Ci = { type: "start" }, Sn = { type: "end" }, Mt = new Ur(), Xi = new Fr(), $r = Math.cos(70 * Nr.DEG2RAD), Y = new se(), J = 2 * Math.PI, I = {
|
|
4
4
|
NONE: -1,
|
|
5
5
|
ROTATE: 0,
|
|
6
6
|
DOLLY: 1,
|
|
@@ -10,7 +10,7 @@ const Ki = { type: "change" }, Ci = { type: "start" }, Tn = { type: "end" }, Mt
|
|
|
10
10
|
TOUCH_DOLLY_PAN: 5,
|
|
11
11
|
TOUCH_DOLLY_ROTATE: 6
|
|
12
12
|
}, Xt = 1e-6;
|
|
13
|
-
class
|
|
13
|
+
class Br extends kr {
|
|
14
14
|
/**
|
|
15
15
|
* Constructs a new controls instance.
|
|
16
16
|
*
|
|
@@ -18,7 +18,7 @@ class $r extends Lr {
|
|
|
18
18
|
* @param {?HTMLElement} domElement - The HTML element used for event listeners.
|
|
19
19
|
*/
|
|
20
20
|
constructor(e, t = null) {
|
|
21
|
-
super(e, t), this.state = I.NONE, this.target = new se(), this.cursor = new se(), this.minDistance = 0, this.maxDistance = 1 / 0, this.minZoom = 0, this.maxZoom = 1 / 0, this.minTargetRadius = 0, this.maxTargetRadius = 1 / 0, this.minPolarAngle = 0, this.maxPolarAngle = Math.PI, this.minAzimuthAngle = -1 / 0, this.maxAzimuthAngle = 1 / 0, this.enableDamping = !1, this.dampingFactor = 0.05, this.enableZoom = !0, this.zoomSpeed = 1, this.enableRotate = !0, this.rotateSpeed = 1, this.keyRotateSpeed = 1, this.enablePan = !0, this.panSpeed = 1, this.screenSpacePanning = !0, this.keyPanSpeed = 7, this.zoomToCursor = !1, this.autoRotate = !1, this.autoRotateSpeed = 2, this.keys = { LEFT: "ArrowLeft", UP: "ArrowUp", RIGHT: "ArrowRight", BOTTOM: "ArrowDown" }, this.mouseButtons = { LEFT: tt.ROTATE, MIDDLE: tt.DOLLY, RIGHT: tt.PAN }, this.touches = { ONE: Qe.ROTATE, TWO: Qe.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this._lastPosition = new se(), this._lastQuaternion = new Yi(), this._lastTargetPosition = new se(), this._quat = new Yi().setFromUnitVectors(e.up, new se(0, 1, 0)), this._quatInverse = this._quat.clone().invert(), this._spherical = new Zi(), this._sphericalDelta = new Zi(), this._scale = 1, this._panOffset = new se(), this._rotateStart = new de(), this._rotateEnd = new de(), this._rotateDelta = new de(), this._panStart = new de(), this._panEnd = new de(), this._panDelta = new de(), this._dollyStart = new de(), this._dollyEnd = new de(), this._dollyDelta = new de(), this._dollyDirection = new se(), this._mouse = new de(), this._performCursorZoom = !1, this._pointers = [], this._pointerPositions = {}, this._controlActive = !1, this._onPointerMove =
|
|
21
|
+
super(e, t), this.state = I.NONE, this.target = new se(), this.cursor = new se(), this.minDistance = 0, this.maxDistance = 1 / 0, this.minZoom = 0, this.maxZoom = 1 / 0, this.minTargetRadius = 0, this.maxTargetRadius = 1 / 0, this.minPolarAngle = 0, this.maxPolarAngle = Math.PI, this.minAzimuthAngle = -1 / 0, this.maxAzimuthAngle = 1 / 0, this.enableDamping = !1, this.dampingFactor = 0.05, this.enableZoom = !0, this.zoomSpeed = 1, this.enableRotate = !0, this.rotateSpeed = 1, this.keyRotateSpeed = 1, this.enablePan = !0, this.panSpeed = 1, this.screenSpacePanning = !0, this.keyPanSpeed = 7, this.zoomToCursor = !1, this.autoRotate = !1, this.autoRotateSpeed = 2, this.keys = { LEFT: "ArrowLeft", UP: "ArrowUp", RIGHT: "ArrowRight", BOTTOM: "ArrowDown" }, this.mouseButtons = { LEFT: tt.ROTATE, MIDDLE: tt.DOLLY, RIGHT: tt.PAN }, this.touches = { ONE: Qe.ROTATE, TWO: Qe.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this._lastPosition = new se(), this._lastQuaternion = new Yi(), this._lastTargetPosition = new se(), this._quat = new Yi().setFromUnitVectors(e.up, new se(0, 1, 0)), this._quatInverse = this._quat.clone().invert(), this._spherical = new Zi(), this._sphericalDelta = new Zi(), this._scale = 1, this._panOffset = new se(), this._rotateStart = new de(), this._rotateEnd = new de(), this._rotateDelta = new de(), this._panStart = new de(), this._panEnd = new de(), this._panDelta = new de(), this._dollyStart = new de(), this._dollyEnd = new de(), this._dollyDelta = new de(), this._dollyDirection = new se(), this._mouse = new de(), this._performCursorZoom = !1, this._pointers = [], this._pointerPositions = {}, this._controlActive = !1, this._onPointerMove = Vr.bind(this), this._onPointerDown = Gr.bind(this), this._onPointerUp = Hr.bind(this), this._onContextMenu = qr.bind(this), this._onMouseWheel = Zr.bind(this), this._onKeyDown = Kr.bind(this), this._onTouchStart = Xr.bind(this), this._onTouchMove = Wr.bind(this), this._onMouseDown = jr.bind(this), this._onMouseMove = Yr.bind(this), this._interceptControlDown = Qr.bind(this), this._interceptControlUp = Jr.bind(this), this.domElement !== null && this.connect(this.domElement), this.update();
|
|
22
22
|
}
|
|
23
23
|
connect(e) {
|
|
24
24
|
super.connect(e), this.domElement.addEventListener("pointerdown", this._onPointerDown), this.domElement.addEventListener("pointercancel", this._onPointerUp), this.domElement.addEventListener("contextmenu", this._onContextMenu), this.domElement.addEventListener("wheel", this._onMouseWheel, { passive: !1 }), this.domElement.getRootNode().addEventListener("keydown", this._interceptControlDown, { passive: !0, capture: !0 }), this.domElement.style.touchAction = "none";
|
|
@@ -109,7 +109,7 @@ class $r extends Lr {
|
|
|
109
109
|
c.unproject(this.object), this.object.position.sub(c).add(o), this.object.updateMatrixWorld(), s = Y.length();
|
|
110
110
|
} else
|
|
111
111
|
console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."), this.zoomToCursor = !1;
|
|
112
|
-
s !== null && (this.screenSpacePanning ? this.target.set(0, 0, -1).transformDirection(this.object.matrix).multiplyScalar(s).add(this.object.position) : (Mt.origin.copy(this.object.position), Mt.direction.set(0, 0, -1).transformDirection(this.object.matrix), Math.abs(this.object.up.dot(Mt.direction)) <
|
|
112
|
+
s !== null && (this.screenSpacePanning ? this.target.set(0, 0, -1).transformDirection(this.object.matrix).multiplyScalar(s).add(this.object.position) : (Mt.origin.copy(this.object.position), Mt.direction.set(0, 0, -1).transformDirection(this.object.matrix), Math.abs(this.object.up.dot(Mt.direction)) < $r ? this.object.lookAt(this.target) : (Xi.setFromNormalAndCoplanarPoint(this.object.up, this.target), Mt.intersectPlane(Xi, this.target))));
|
|
113
113
|
} else if (this.object.isOrthographicCamera) {
|
|
114
114
|
const s = this.object.zoom;
|
|
115
115
|
this.object.zoom = Math.max(this.minZoom, Math.min(this.maxZoom, this.object.zoom / this._scale)), s !== this.object.zoom && (this.object.updateProjectionMatrix(), r = !0);
|
|
@@ -306,16 +306,16 @@ class $r extends Lr {
|
|
|
306
306
|
return e.ctrlKey && !this._controlActive && (i.deltaY *= 10), i;
|
|
307
307
|
}
|
|
308
308
|
}
|
|
309
|
-
function
|
|
309
|
+
function Gr(a) {
|
|
310
310
|
this.enabled !== !1 && (this._pointers.length === 0 && (this.domElement.setPointerCapture(a.pointerId), this.domElement.addEventListener("pointermove", this._onPointerMove), this.domElement.addEventListener("pointerup", this._onPointerUp)), !this._isTrackingPointer(a) && (this._addPointer(a), a.pointerType === "touch" ? this._onTouchStart(a) : this._onMouseDown(a)));
|
|
311
311
|
}
|
|
312
|
-
function
|
|
312
|
+
function Vr(a) {
|
|
313
313
|
this.enabled !== !1 && (a.pointerType === "touch" ? this._onTouchMove(a) : this._onMouseMove(a));
|
|
314
314
|
}
|
|
315
|
-
function
|
|
315
|
+
function Hr(a) {
|
|
316
316
|
switch (this._removePointer(a), this._pointers.length) {
|
|
317
317
|
case 0:
|
|
318
|
-
this.domElement.releasePointerCapture(a.pointerId), this.domElement.removeEventListener("pointermove", this._onPointerMove), this.domElement.removeEventListener("pointerup", this._onPointerUp), this.dispatchEvent(
|
|
318
|
+
this.domElement.releasePointerCapture(a.pointerId), this.domElement.removeEventListener("pointermove", this._onPointerMove), this.domElement.removeEventListener("pointerup", this._onPointerUp), this.dispatchEvent(Sn), this.state = I.NONE;
|
|
319
319
|
break;
|
|
320
320
|
case 1:
|
|
321
321
|
const e = this._pointers[0], t = this._pointerPositions[e];
|
|
@@ -323,7 +323,7 @@ function Vr(a) {
|
|
|
323
323
|
break;
|
|
324
324
|
}
|
|
325
325
|
}
|
|
326
|
-
function
|
|
326
|
+
function jr(a) {
|
|
327
327
|
let e;
|
|
328
328
|
switch (a.button) {
|
|
329
329
|
case 0:
|
|
@@ -366,7 +366,7 @@ function Hr(a) {
|
|
|
366
366
|
}
|
|
367
367
|
this.state !== I.NONE && this.dispatchEvent(Ci);
|
|
368
368
|
}
|
|
369
|
-
function
|
|
369
|
+
function Yr(a) {
|
|
370
370
|
switch (this.state) {
|
|
371
371
|
case I.ROTATE:
|
|
372
372
|
if (this.enableRotate === !1) return;
|
|
@@ -382,13 +382,13 @@ function jr(a) {
|
|
|
382
382
|
break;
|
|
383
383
|
}
|
|
384
384
|
}
|
|
385
|
-
function Yr(a) {
|
|
386
|
-
this.enabled === !1 || this.enableZoom === !1 || this.state !== I.NONE || (a.preventDefault(), this.dispatchEvent(Ci), this._handleMouseWheel(this._customWheelEvent(a)), this.dispatchEvent(Tn));
|
|
387
|
-
}
|
|
388
385
|
function Zr(a) {
|
|
389
|
-
this.enabled
|
|
386
|
+
this.enabled === !1 || this.enableZoom === !1 || this.state !== I.NONE || (a.preventDefault(), this.dispatchEvent(Ci), this._handleMouseWheel(this._customWheelEvent(a)), this.dispatchEvent(Sn));
|
|
390
387
|
}
|
|
391
388
|
function Kr(a) {
|
|
389
|
+
this.enabled !== !1 && this._handleKeyDown(a);
|
|
390
|
+
}
|
|
391
|
+
function Xr(a) {
|
|
392
392
|
switch (this._trackPointer(a), this._pointers.length) {
|
|
393
393
|
case 1:
|
|
394
394
|
switch (this.touches.ONE) {
|
|
@@ -423,7 +423,7 @@ function Kr(a) {
|
|
|
423
423
|
}
|
|
424
424
|
this.state !== I.NONE && this.dispatchEvent(Ci);
|
|
425
425
|
}
|
|
426
|
-
function
|
|
426
|
+
function Wr(a) {
|
|
427
427
|
switch (this._trackPointer(a), this.state) {
|
|
428
428
|
case I.TOUCH_ROTATE:
|
|
429
429
|
if (this.enableRotate === !1) return;
|
|
@@ -445,13 +445,13 @@ function Xr(a) {
|
|
|
445
445
|
this.state = I.NONE;
|
|
446
446
|
}
|
|
447
447
|
}
|
|
448
|
-
function
|
|
448
|
+
function qr(a) {
|
|
449
449
|
this.enabled !== !1 && a.preventDefault();
|
|
450
450
|
}
|
|
451
|
-
function
|
|
451
|
+
function Qr(a) {
|
|
452
452
|
a.key === "Control" && (this._controlActive = !0, this.domElement.getRootNode().addEventListener("keyup", this._interceptControlUp, { passive: !0, capture: !0 }));
|
|
453
453
|
}
|
|
454
|
-
function
|
|
454
|
+
function Jr(a) {
|
|
455
455
|
a.key === "Control" && (this._controlActive = !1, this.domElement.getRootNode().removeEventListener("keyup", this._interceptControlUp, { passive: !0, capture: !0 }));
|
|
456
456
|
}
|
|
457
457
|
function we(a) {
|
|
@@ -459,7 +459,7 @@ function we(a) {
|
|
|
459
459
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
460
460
|
return a;
|
|
461
461
|
}
|
|
462
|
-
function
|
|
462
|
+
function Dn(a, e) {
|
|
463
463
|
a.prototype = Object.create(e.prototype), a.prototype.constructor = a, a.__proto__ = e;
|
|
464
464
|
}
|
|
465
465
|
var he = {
|
|
@@ -473,7 +473,7 @@ var he = {
|
|
|
473
473
|
duration: 0.5,
|
|
474
474
|
overwrite: !1,
|
|
475
475
|
delay: 0
|
|
476
|
-
}, Pi, K, N, fe = 1e8, k = 1 / fe, oi = Math.PI * 2,
|
|
476
|
+
}, Pi, K, N, fe = 1e8, k = 1 / fe, oi = Math.PI * 2, es = oi / 4, ts = 0, Mn = Math.sqrt, is = Math.cos, ns = Math.sin, Z = function(e) {
|
|
477
477
|
return typeof e == "string";
|
|
478
478
|
}, G = function(e) {
|
|
479
479
|
return typeof e == "function";
|
|
@@ -489,27 +489,27 @@ var he = {
|
|
|
489
489
|
return typeof window < "u";
|
|
490
490
|
}, Rt = function(e) {
|
|
491
491
|
return G(e) || Z(e);
|
|
492
|
-
},
|
|
493
|
-
}, W = Array.isArray, li = /(?:-?\.?\d|\.)+/gi,
|
|
492
|
+
}, Rn = typeof ArrayBuffer == "function" && ArrayBuffer.isView || function() {
|
|
493
|
+
}, W = Array.isArray, li = /(?:-?\.?\d|\.)+/gi, On = /[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g, Je = /[-+=.]*\d+[.e-]*\d*[a-z%]*/g, Wt = /[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi, In = /[+-]=-?[.\d]+/, Ln = /[^,'"\[\]\s]+/gi, rs = /^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i, z, _e, hi, Si, ce = {}, zt = {}, kn, Un = function(e) {
|
|
494
494
|
return (zt = 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
|
}, Et = function(e, t) {
|
|
498
498
|
return !t && console.warn(e);
|
|
499
|
-
},
|
|
499
|
+
}, Fn = function(e, t) {
|
|
500
500
|
return e && (ce[e] = t) && zt && (zt[e] = t) || ce;
|
|
501
501
|
}, vt = function() {
|
|
502
502
|
return 0;
|
|
503
|
-
},
|
|
503
|
+
}, ss = {
|
|
504
504
|
suppressEvents: !0,
|
|
505
505
|
isStart: !0,
|
|
506
506
|
kill: !1
|
|
507
507
|
}, kt = {
|
|
508
508
|
suppressEvents: !0,
|
|
509
509
|
kill: !1
|
|
510
|
-
},
|
|
510
|
+
}, as = {
|
|
511
511
|
suppressEvents: !0
|
|
512
|
-
}, Mi = {}, Re = [], ci = {},
|
|
512
|
+
}, Mi = {}, Re = [], ci = {}, Nn, ae = {}, qt = {}, Wi = 30, Ut = [], Ri = "", Oi = function(e) {
|
|
513
513
|
var t = e[0], i, n;
|
|
514
514
|
if (Ee(t) || G(t) || (e = [e]), !(i = (t._gsap || {}).harness)) {
|
|
515
515
|
for (n = Ut.length; n-- && !Ut[n].targetTest(t); )
|
|
@@ -517,11 +517,11 @@ var he = {
|
|
|
517
517
|
i = Ut[n];
|
|
518
518
|
}
|
|
519
519
|
for (n = e.length; n--; )
|
|
520
|
-
e[n] && (e[n]._gsap || (e[n]._gsap = new
|
|
520
|
+
e[n] && (e[n]._gsap || (e[n]._gsap = new lr(e[n], i))) || e.splice(n, 1);
|
|
521
521
|
return e;
|
|
522
522
|
}, He = function(e) {
|
|
523
523
|
return e._gsap || Oi(me(e))[0]._gsap;
|
|
524
|
-
},
|
|
524
|
+
}, zn = function(e, t, i) {
|
|
525
525
|
return (i = e[t]) && G(i) ? e[t]() : Ai(i) && e.getAttribute && e.getAttribute(t) || i;
|
|
526
526
|
}, te = function(e, t) {
|
|
527
527
|
return (e = e.split(",")).forEach(t) || e;
|
|
@@ -532,7 +532,7 @@ var he = {
|
|
|
532
532
|
}, it = function(e, t) {
|
|
533
533
|
var i = t.charAt(0), n = parseFloat(t.substr(2));
|
|
534
534
|
return e = parseFloat(e), i === "+" ? e + n : i === "-" ? e - n : i === "*" ? e * n : e / n;
|
|
535
|
-
},
|
|
535
|
+
}, os = function(e, t) {
|
|
536
536
|
for (var i = t.length, n = 0; e.indexOf(t[n]) < 0 && ++n < i; )
|
|
537
537
|
;
|
|
538
538
|
return n < i;
|
|
@@ -542,18 +542,18 @@ var he = {
|
|
|
542
542
|
n = t[i], n && n._lazy && (n.render(n._lazy[0], n._lazy[1], !0)._lazy = 0);
|
|
543
543
|
}, Ii = function(e) {
|
|
544
544
|
return !!(e._initted || e._startAt || e.add);
|
|
545
|
-
},
|
|
545
|
+
}, $n = function(e, t, i, n) {
|
|
546
546
|
Re.length && !K && $t(), e.render(t, i, !!(K && t < 0 && Ii(e))), Re.length && !K && $t();
|
|
547
|
-
}, $n = function(e) {
|
|
548
|
-
var t = parseFloat(e);
|
|
549
|
-
return (t || t === 0) && (e + "").match(In).length < 2 ? t : Z(e) ? e.trim() : e;
|
|
550
547
|
}, Bn = function(e) {
|
|
548
|
+
var t = parseFloat(e);
|
|
549
|
+
return (t || t === 0) && (e + "").match(Ln).length < 2 ? t : Z(e) ? e.trim() : e;
|
|
550
|
+
}, Gn = function(e) {
|
|
551
551
|
return e;
|
|
552
552
|
}, ue = function(e, t) {
|
|
553
553
|
for (var i in t)
|
|
554
554
|
i in e || (e[i] = t[i]);
|
|
555
555
|
return e;
|
|
556
|
-
},
|
|
556
|
+
}, ls = function(e) {
|
|
557
557
|
return function(t, i) {
|
|
558
558
|
for (var n in i)
|
|
559
559
|
n in t || n === "duration" && e || n === "ease" || (t[n] = i[n]);
|
|
@@ -572,16 +572,16 @@ var he = {
|
|
|
572
572
|
n in t || (i[n] = e[n]);
|
|
573
573
|
return i;
|
|
574
574
|
}, yt = function(e) {
|
|
575
|
-
var t = e.parent || z, i = e.keyframes ?
|
|
575
|
+
var t = e.parent || z, i = e.keyframes ? ls(W(e.keyframes)) : ue;
|
|
576
576
|
if (ee(e.inherit))
|
|
577
577
|
for (; t; )
|
|
578
578
|
i(e, t.vars.defaults), t = t.parent || t._dp;
|
|
579
579
|
return e;
|
|
580
|
-
},
|
|
580
|
+
}, hs = function(e, t) {
|
|
581
581
|
for (var i = e.length, n = i === t.length; n && i-- && e[i] === t[i]; )
|
|
582
582
|
;
|
|
583
583
|
return i < 0;
|
|
584
|
-
},
|
|
584
|
+
}, Vn = function(e, t, i, n, r) {
|
|
585
585
|
var s = e[n], o;
|
|
586
586
|
if (r)
|
|
587
587
|
for (o = t[r]; s && s[r] > o; )
|
|
@@ -598,13 +598,13 @@ var he = {
|
|
|
598
598
|
for (var i = e; i; )
|
|
599
599
|
i._dirty = 1, i = i.parent;
|
|
600
600
|
return e;
|
|
601
|
-
},
|
|
601
|
+
}, cs = function(e) {
|
|
602
602
|
for (var t = e.parent; t && t.parent; )
|
|
603
603
|
t._dirty = 1, t.totalDuration(), t = t.parent;
|
|
604
604
|
return e;
|
|
605
605
|
}, ui = function(e, t, i, n) {
|
|
606
606
|
return e._startAt && (K ? e._startAt.revert(kt) : e.vars.immediateRender && !e.vars.autoRevert || e._startAt.render(t, !0, n));
|
|
607
|
-
},
|
|
607
|
+
}, us = function a(e) {
|
|
608
608
|
return !e || e._ts && a(e.parent);
|
|
609
609
|
}, Qi = function(e) {
|
|
610
610
|
return e._repeat ? ot(e._tTime, e = e.duration() + e._rDelay) * e : 0;
|
|
@@ -618,7 +618,7 @@ var he = {
|
|
|
618
618
|
}, Kt = function(e, t) {
|
|
619
619
|
var i = e._dp;
|
|
620
620
|
return i && i.smoothChildTiming && e._ts && (e._start = j(i._time - (e._ts > 0 ? t / e._ts : ((e._dirty ? e.totalDuration() : e._tDur) - t) / -e._ts)), Zt(e), i._dirty || je(i, e)), e;
|
|
621
|
-
},
|
|
621
|
+
}, Hn = function(e, t) {
|
|
622
622
|
var i;
|
|
623
623
|
if ((t._time || !t._dur && t._initted || t._start < e._time && (t._dur || !t.add)) && (i = Gt(e.rawTime(), t), (!t._dur || Dt(0, t.totalDuration(), i) - t._tTime > k) && t.render(i, !0)), je(e, t)._dp && e._initted && e._time >= e._dur && e._ts) {
|
|
624
624
|
if (e._dur < e.duration())
|
|
@@ -627,30 +627,30 @@ var he = {
|
|
|
627
627
|
e._zTime = -k;
|
|
628
628
|
}
|
|
629
629
|
}, ye = function(e, t, i, n) {
|
|
630
|
-
return t.parent && Ie(t), t._start = j((Pe(i) ? i : i || e !== z ? pe(e, i, t) : e._time) + t._delay), t._end = j(t._start + (t.totalDuration() / Math.abs(t.timeScale()) || 0)),
|
|
631
|
-
},
|
|
630
|
+
return t.parent && Ie(t), t._start = j((Pe(i) ? i : i || e !== z ? pe(e, i, t) : e._time) + t._delay), t._end = j(t._start + (t.totalDuration() / Math.abs(t.timeScale()) || 0)), Vn(e, t, "_first", "_last", e._sort ? "_start" : 0), di(t) || (e._recent = t), n || Hn(e, t), e._ts < 0 && Kt(e, e._tTime), e;
|
|
631
|
+
}, jn = function(e, t) {
|
|
632
632
|
return (ce.ScrollTrigger || Di("scrollTrigger", t)) && ce.ScrollTrigger.create(t, e);
|
|
633
|
-
},
|
|
633
|
+
}, Yn = function(e, t, i, n, r) {
|
|
634
634
|
if (ki(e, t, r), !e._initted)
|
|
635
635
|
return 1;
|
|
636
|
-
if (!i && e._pt && !K && (e._dur && e.vars.lazy !== !1 || !e._dur && e.vars.lazy) &&
|
|
636
|
+
if (!i && e._pt && !K && (e._dur && e.vars.lazy !== !1 || !e._dur && e.vars.lazy) && Nn !== oe.frame)
|
|
637
637
|
return Re.push(e), e._lazy = [r, n], 1;
|
|
638
|
-
},
|
|
638
|
+
}, ds = function a(e) {
|
|
639
639
|
var t = e.parent;
|
|
640
640
|
return t && t._ts && t._initted && !t._lock && (t.rawTime() < 0 || a(t));
|
|
641
641
|
}, di = function(e) {
|
|
642
642
|
var t = e.data;
|
|
643
643
|
return t === "isFromStart" || t === "isStart";
|
|
644
|
-
},
|
|
645
|
-
var r = e.ratio, s = t < 0 || !t && (!e._start &&
|
|
644
|
+
}, ps = function(e, t, i, n) {
|
|
645
|
+
var r = e.ratio, s = t < 0 || !t && (!e._start && ds(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
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 || K || n || e._zTime === k || !t && e._zTime) {
|
|
647
|
-
if (!e._initted &&
|
|
647
|
+
if (!e._initted && Yn(e, t, n, i, l))
|
|
648
648
|
return;
|
|
649
649
|
for (u = e._zTime, e._zTime = t || (i ? k : 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 && Ie(e, 1), !i && !K && (le(e, s ? "onComplete" : "onReverseComplete", !0), e._prom && e._prom()));
|
|
652
652
|
} else e._zTime || (e._zTime = t);
|
|
653
|
-
},
|
|
653
|
+
}, fs = function(e, t, i) {
|
|
654
654
|
var n;
|
|
655
655
|
if (i > t)
|
|
656
656
|
for (n = e._first; n && n._start <= i; ) {
|
|
@@ -669,12 +669,12 @@ var he = {
|
|
|
669
669
|
return o && !n && (e._time *= s / e._dur), e._dur = s, e._tDur = r ? r < 0 ? 1e10 : j(s * (r + 1) + e._rDelay * r) : s, o > 0 && !n && Kt(e, e._tTime = e._tDur * o), e.parent && Zt(e), i || je(e.parent, e), e;
|
|
670
670
|
}, Ji = function(e) {
|
|
671
671
|
return e instanceof q ? je(e) : lt(e, e._dur);
|
|
672
|
-
},
|
|
672
|
+
}, ms = {
|
|
673
673
|
_start: 0,
|
|
674
674
|
endTime: vt,
|
|
675
675
|
totalDuration: vt
|
|
676
676
|
}, pe = function a(e, t, i) {
|
|
677
|
-
var n = e.labels, r = e._recent ||
|
|
677
|
+
var n = e.labels, r = e._recent || ms, s = e.duration() >= fe ? r.endTime(!1) : e._dur, o, l, c;
|
|
678
678
|
return Z(t) && (isNaN(t) || t in n) ? (l = t.charAt(0), c = t.substr(-1) === "%", o = t.indexOf("="), l === "<" || l === ">" ? (o >= 0 && (t = t.replace(/=/, "")), (l === "<" ? r._start : r.endTime(r._repeat >= 0)) + (parseFloat(t.substr(1)) || 0) * (c ? (o < 0 ? r : i).totalDuration() / 100 : 1)) : o < 0 ? (t in n || (n[t] = s), n[t]) : (l = parseFloat(t.charAt(o - 1) + t.substr(o + 1)), c && i && (l = l / 100 * (W(i) ? i[0] : i).totalDuration()), o > 1 ? a(e, t.substr(0, o - 1), i) + l : s + l)) : t == null ? s : +t;
|
|
679
679
|
}, xt = function(e, t, i) {
|
|
680
680
|
var n = Pe(t[1]), r = (n ? 2 : 1) + (e < 2 ? 0 : 1), s = t[r], o, l;
|
|
@@ -689,30 +689,30 @@ var he = {
|
|
|
689
689
|
}, Dt = function(e, t, i) {
|
|
690
690
|
return i < e ? e : i > t ? t : i;
|
|
691
691
|
}, X = function(e, t) {
|
|
692
|
-
return !Z(e) || !(t =
|
|
693
|
-
},
|
|
692
|
+
return !Z(e) || !(t = rs.exec(e)) ? "" : t[1];
|
|
693
|
+
}, gs = function(e, t, i) {
|
|
694
694
|
return ke(i, function(n) {
|
|
695
695
|
return Dt(e, t, n);
|
|
696
696
|
});
|
|
697
|
-
}, pi = [].slice,
|
|
697
|
+
}, pi = [].slice, Zn = function(e, t) {
|
|
698
698
|
return e && Ee(e) && "length" in e && (!t && !e.length || e.length - 1 in e && Ee(e[0])) && !e.nodeType && e !== _e;
|
|
699
|
-
},
|
|
699
|
+
}, _s = function(e, t, i) {
|
|
700
700
|
return i === void 0 && (i = []), e.forEach(function(n) {
|
|
701
701
|
var r;
|
|
702
|
-
return Z(n) && !t ||
|
|
702
|
+
return Z(n) && !t || Zn(n, 1) ? (r = i).push.apply(r, me(n)) : i.push(n);
|
|
703
703
|
}) || i;
|
|
704
704
|
}, me = function(e, t, i) {
|
|
705
|
-
return N && !t && N.selector ? N.selector(e) : Z(e) && !i && (hi || !ht()) ? pi.call((t || Si).querySelectorAll(e), 0) : W(e) ?
|
|
705
|
+
return N && !t && N.selector ? N.selector(e) : Z(e) && !i && (hi || !ht()) ? pi.call((t || Si).querySelectorAll(e), 0) : W(e) ? _s(e, i) : Zn(e) ? pi.call(e, 0) : e ? [e] : [];
|
|
706
706
|
}, fi = function(e) {
|
|
707
707
|
return e = me(e)[0] || Et("Invalid scope") || {}, function(t) {
|
|
708
708
|
var i = e.current || e.nativeElement || e;
|
|
709
709
|
return me(t, i.querySelectorAll ? i : i === e ? Et("Invalid scope") || Si.createElement("div") : e);
|
|
710
710
|
};
|
|
711
|
-
},
|
|
711
|
+
}, Kn = function(e) {
|
|
712
712
|
return e.sort(function() {
|
|
713
713
|
return 0.5 - Math.random();
|
|
714
714
|
});
|
|
715
|
-
},
|
|
715
|
+
}, Xn = function(e) {
|
|
716
716
|
if (G(e))
|
|
717
717
|
return e;
|
|
718
718
|
var t = Ee(e) ? e : {
|
|
@@ -731,8 +731,8 @@ var he = {
|
|
|
731
731
|
w < d && w--;
|
|
732
732
|
}
|
|
733
733
|
for (g = s[d] = [], _ = l ? Math.min(w, d) * h - 0.5 : n % w, y = w === fe ? 0 : l ? d * u / w - 0.5 : n / w | 0, v = 0, P = fe, C = 0; C < d; C++)
|
|
734
|
-
x = C % w - _, E = y - (C / w | 0), g[C] = b = c ? Math.abs(c === "y" ? E : x) :
|
|
735
|
-
n === "random" &&
|
|
734
|
+
x = C % w - _, E = y - (C / w | 0), g[C] = b = c ? Math.abs(c === "y" ? E : x) : Mn(x * x + E * E), b > v && (v = b), b < P && (P = b);
|
|
735
|
+
n === "random" && Kn(g), g.max = v - P, g.min = P, g.v = d = (parseFloat(t.amount) || parseFloat(t.each) * (w > d ? d - 1 : c ? c === "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 ? sr(i) : i;
|
|
736
736
|
}
|
|
737
737
|
return d = (g[p] - g.min) / g.max || 0, j(g.b + (i ? i(d) : d) * g.v) + g.u;
|
|
738
738
|
};
|
|
@@ -742,7 +742,7 @@ var he = {
|
|
|
742
742
|
var n = j(Math.round(parseFloat(i) / e) * e * t);
|
|
743
743
|
return (n - n % 1) / t + (Pe(i) ? 0 : X(i));
|
|
744
744
|
};
|
|
745
|
-
},
|
|
745
|
+
}, Wn = function(e, t) {
|
|
746
746
|
var i = W(e), n, r;
|
|
747
747
|
return !i && Ee(e) && (n = i = e.radius || fe, e.values ? (e = me(e.values), (r = !Pe(e[0])) && (n *= n)) : e = mi(e.increment)), ke(t, i ? G(e) ? function(s) {
|
|
748
748
|
return r = e(s), Math.abs(r - s) <= n ? r : s;
|
|
@@ -751,11 +751,11 @@ var he = {
|
|
|
751
751
|
r ? (p = e[u].x - o, m = e[u].y - l, p = p * p + m * m) : p = Math.abs(e[u] - o), p < c && (c = p, h = u);
|
|
752
752
|
return h = !n || c <= n ? e[h] : s, r || h === s || Pe(s) ? h : h + X(s);
|
|
753
753
|
} : mi(e));
|
|
754
|
-
},
|
|
754
|
+
}, qn = function(e, t, i, n) {
|
|
755
755
|
return ke(W(e) ? !t : i === !0 ? !!(i = 0) : !n, function() {
|
|
756
756
|
return W(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
|
+
}, ys = function() {
|
|
759
759
|
for (var e = arguments.length, t = new Array(e), i = 0; i < e; i++)
|
|
760
760
|
t[i] = arguments[i];
|
|
761
761
|
return function(n) {
|
|
@@ -763,36 +763,36 @@ var he = {
|
|
|
763
763
|
return s(r);
|
|
764
764
|
}, n);
|
|
765
765
|
};
|
|
766
|
-
},
|
|
766
|
+
}, xs = function(e, t) {
|
|
767
767
|
return function(i) {
|
|
768
768
|
return e(parseFloat(i)) + (t || X(i));
|
|
769
769
|
};
|
|
770
|
-
},
|
|
771
|
-
return
|
|
772
|
-
},
|
|
770
|
+
}, bs = function(e, t, i) {
|
|
771
|
+
return Jn(e, t, 0, 1, i);
|
|
772
|
+
}, Qn = function(e, t, i) {
|
|
773
773
|
return ke(i, function(n) {
|
|
774
774
|
return e[~~t(n)];
|
|
775
775
|
});
|
|
776
|
-
},
|
|
776
|
+
}, Es = function a(e, t, i) {
|
|
777
777
|
var n = t - e;
|
|
778
|
-
return W(e) ?
|
|
778
|
+
return W(e) ? Qn(e, a(0, e.length), t) : ke(i, function(r) {
|
|
779
779
|
return (n + (r - e) % n) % n + e;
|
|
780
780
|
});
|
|
781
|
-
},
|
|
781
|
+
}, vs = function a(e, t, i) {
|
|
782
782
|
var n = t - e, r = n * 2;
|
|
783
|
-
return W(e) ?
|
|
783
|
+
return W(e) ? Qn(e, a(0, e.length - 1), t) : ke(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) {
|
|
787
787
|
for (var t = 0, i = "", n, r, s, o; ~(n = e.indexOf("random(", t)); )
|
|
788
|
-
s = e.indexOf(")", n), o = e.charAt(n + 7) === "[", r = e.substr(n + 7, s - n - 7).match(o ?
|
|
788
|
+
s = e.indexOf(")", n), o = e.charAt(n + 7) === "[", r = e.substr(n + 7, s - n - 7).match(o ? Ln : li), i += e.substr(t, n - t) + qn(o ? r : +r[0], o ? 0 : +r[1], +r[2] || 1e-5), t = s + 1;
|
|
789
789
|
return i + e.substr(t, e.length - t);
|
|
790
|
-
},
|
|
790
|
+
}, Jn = function(e, t, i, n, r) {
|
|
791
791
|
var s = t - e, o = n - i;
|
|
792
792
|
return ke(r, function(l) {
|
|
793
793
|
return i + ((l - e) / s * o || 0);
|
|
794
794
|
});
|
|
795
|
-
},
|
|
795
|
+
}, ws = function a(e, t, i, n) {
|
|
796
796
|
var r = isNaN(e + t) ? 0 : function(m) {
|
|
797
797
|
return (1 - m) * e + m * t;
|
|
798
798
|
};
|
|
@@ -833,7 +833,7 @@ var he = {
|
|
|
833
833
|
return l = n[t + "Params"], c = n.callbackScope || e, i && Re.length && $t(), o && (N = o), h = l ? r.apply(c, l) : r.call(c), N = s, h;
|
|
834
834
|
}, mt = function(e) {
|
|
835
835
|
return Ie(e), e.scrollTrigger && e.scrollTrigger.kill(!!K), e.progress() < 1 && le(e, "onInterrupt"), e;
|
|
836
|
-
}, et,
|
|
836
|
+
}, et, er = [], tr = function(e) {
|
|
837
837
|
if (e)
|
|
838
838
|
if (e = !e.name && e.default || e, Ti() || e.headless) {
|
|
839
839
|
var t = e.name, i = G(e), n = t && !i && e.init ? function() {
|
|
@@ -842,8 +842,8 @@ var he = {
|
|
|
842
842
|
init: vt,
|
|
843
843
|
render: Ni,
|
|
844
844
|
add: Li,
|
|
845
|
-
kill:
|
|
846
|
-
modifier:
|
|
845
|
+
kill: zs,
|
|
846
|
+
modifier: Ns,
|
|
847
847
|
rawVars: 0
|
|
848
848
|
}, s = {
|
|
849
849
|
targetTest: 0,
|
|
@@ -857,9 +857,9 @@ var he = {
|
|
|
857
857
|
return;
|
|
858
858
|
ue(n, ue(Bt(e, r), s)), at(n.prototype, at(r, Bt(e, s))), ae[n.prop = t] = n, e.targetTest && (Ut.push(n), Mi[t] = 1), t = (t === "css" ? "CSS" : t.charAt(0).toUpperCase() + t.substr(1)) + "Plugin";
|
|
859
859
|
}
|
|
860
|
-
|
|
860
|
+
Fn(t, n), e.register && e.register(re, n, ie);
|
|
861
861
|
} else
|
|
862
|
-
|
|
862
|
+
er.push(e);
|
|
863
863
|
}, L = 255, gt = {
|
|
864
864
|
aqua: [0, L, L],
|
|
865
865
|
lime: [0, L, 0],
|
|
@@ -882,7 +882,7 @@ var he = {
|
|
|
882
882
|
transparent: [L, L, L, 0]
|
|
883
883
|
}, Qt = function(e, t, i) {
|
|
884
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
|
+
}, ir = function(e, t, i) {
|
|
886
886
|
var n = e ? Pe(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])
|
|
@@ -895,13 +895,13 @@ var he = {
|
|
|
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] = Qt(l + 1 / 3, r, s), n[1] = Qt(l, r, s), n[2] = Qt(l - 1 / 3, r, s);
|
|
897
897
|
else if (~e.indexOf("="))
|
|
898
|
-
return n = e.match(
|
|
898
|
+
return n = e.match(On), i && n.length < 4 && (n[3] = 1), n;
|
|
899
899
|
} else
|
|
900
900
|
n = e.match(li) || gt.transparent;
|
|
901
901
|
n = n.map(Number);
|
|
902
902
|
}
|
|
903
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
|
+
}, nr = function(e) {
|
|
905
905
|
var t = [], i = [], n = -1;
|
|
906
906
|
return e.split(Oe).forEach(function(r) {
|
|
907
907
|
var s = r.match(Je) || [];
|
|
@@ -912,8 +912,8 @@ var he = {
|
|
|
912
912
|
if (!r)
|
|
913
913
|
return e;
|
|
914
914
|
if (r = r.map(function(p) {
|
|
915
|
-
return (p =
|
|
916
|
-
}), i && (h =
|
|
915
|
+
return (p = ir(p, t, 1)) && s + (t ? p[0] + "," + p[1] + "%," + p[2] + "%," + p[3] : p.join(",")) + ")";
|
|
916
|
+
}), i && (h = nr(e), l = i.c, l.join(n) !== h.c.join(n)))
|
|
917
917
|
for (c = e.replace(Oe, "1").split(Je), u = c.length - 1; o < u; o++)
|
|
918
918
|
n += c[o] + (~l.indexOf(o) ? r.shift() || s + "0,0,0,0)" : (h.length ? h : r.length ? r : i).shift());
|
|
919
919
|
if (!c)
|
|
@@ -925,10 +925,10 @@ var he = {
|
|
|
925
925
|
for (e in gt)
|
|
926
926
|
a += "|" + e + "\\b";
|
|
927
927
|
return new RegExp(a + ")", "gi");
|
|
928
|
-
})(),
|
|
928
|
+
})(), Cs = /hsl[a]?\(/, rr = function(e) {
|
|
929
929
|
var t = e.join(" "), i;
|
|
930
930
|
if (Oe.lastIndex = 0, Oe.test(t))
|
|
931
|
-
return i =
|
|
931
|
+
return i = Cs.test(t), e[1] = tn(e[1], i), e[0] = tn(e[0], i, nr(e[1])), !0;
|
|
932
932
|
}, Ct, oe = (function() {
|
|
933
933
|
var a = Date.now, e = 500, t = 33, i = a(), n = i, r = 1e3 / 240, s = r, o = [], l, c, h, u, p, m, f = function d(g) {
|
|
934
934
|
var _ = a() - n, y = g === !0, x, E, b, C;
|
|
@@ -946,7 +946,7 @@ var he = {
|
|
|
946
946
|
return p / (1e3 / (g || 60));
|
|
947
947
|
},
|
|
948
948
|
wake: function() {
|
|
949
|
-
|
|
949
|
+
kn && (!hi && Ti() && (_e = hi = window, Si = _e.document || {}, ce.gsap = re, (_e.gsapVersions || (_e.gsapVersions = [])).push(re.version), Un(zt || _e.GreenSockGlobals || !_e.gsap && _e || {}), er.forEach(tr)), 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
|
}, Ct = 1, f(2));
|
|
952
952
|
},
|
|
@@ -972,25 +972,25 @@ var he = {
|
|
|
972
972
|
}, u;
|
|
973
973
|
})(), ht = function() {
|
|
974
974
|
return !Ct && oe.wake();
|
|
975
|
-
}, D = {},
|
|
975
|
+
}, D = {}, Ps = /^[\d.\-M][\d.\-,\s]/, As = /["']/g, Ts = function(e) {
|
|
976
976
|
for (var t = {}, i = e.substr(1, e.length - 3).split(":"), n = i[0], r = 1, s = i.length, o, l, c; r < s; r++)
|
|
977
|
-
l = i[r], o = r !== s - 1 ? l.lastIndexOf(",") : l.length, c = l.substr(0, o), t[n] = isNaN(c) ? c.replace(
|
|
977
|
+
l = i[r], o = r !== s - 1 ? l.lastIndexOf(",") : l.length, c = l.substr(0, o), t[n] = isNaN(c) ? c.replace(As, "").trim() : +c, n = l.substr(o + 1).trim();
|
|
978
978
|
return t;
|
|
979
|
-
},
|
|
979
|
+
}, Ss = function(e) {
|
|
980
980
|
var t = e.indexOf("(") + 1, i = e.indexOf(")"), n = e.indexOf("(", t);
|
|
981
981
|
return e.substring(t, ~n && n < i ? e.indexOf(")", i + 1) : i);
|
|
982
|
-
},
|
|
982
|
+
}, Ds = function(e) {
|
|
983
983
|
var t = (e + "").split("("), i = D[t[0]];
|
|
984
|
-
return i && t.length > 1 && i.config ? i.config.apply(null, ~e.indexOf("{") ? [
|
|
985
|
-
},
|
|
984
|
+
return i && t.length > 1 && i.config ? i.config.apply(null, ~e.indexOf("{") ? [Ts(t[1])] : Ss(e).split(",").map(Bn)) : D._CE && Ps.test(e) ? D._CE("", e) : i;
|
|
985
|
+
}, sr = function(e) {
|
|
986
986
|
return function(t) {
|
|
987
987
|
return 1 - e(1 - t);
|
|
988
988
|
};
|
|
989
|
-
},
|
|
989
|
+
}, ar = function a(e, t) {
|
|
990
990
|
for (var i = e._first, n; i; )
|
|
991
991
|
i instanceof q ? a(i, t) : i.vars.yoyoEase && (!i._yoyo || !i._repeat) && i._yoyo !== t && (i.timeline ? a(i.timeline, t) : (n = i._ease, i._ease = i._yEase, i._yEase = n, i._yoyo = t)), i = i._next;
|
|
992
992
|
}, Ye = function(e, t) {
|
|
993
|
-
return e && (G(e) ? e : D[e] ||
|
|
993
|
+
return e && (G(e) ? e : D[e] || Ds(e)) || t;
|
|
994
994
|
}, Xe = function(e, t, i, n) {
|
|
995
995
|
i === void 0 && (i = function(l) {
|
|
996
996
|
return 1 - t(1 - l);
|
|
@@ -1007,16 +1007,16 @@ var he = {
|
|
|
1007
1007
|
for (var l in r)
|
|
1008
1008
|
D[s + (l === "easeIn" ? ".in" : l === "easeOut" ? ".out" : ".inOut")] = D[o + "." + l] = r[l];
|
|
1009
1009
|
}), r;
|
|
1010
|
-
},
|
|
1010
|
+
}, or = function(e) {
|
|
1011
1011
|
return function(t) {
|
|
1012
1012
|
return t < 0.5 ? (1 - e(1 - t * 2)) / 2 : 0.5 + e((t - 0.5) * 2) / 2;
|
|
1013
1013
|
};
|
|
1014
1014
|
}, Jt = function a(e, t, i) {
|
|
1015
1015
|
var n = t >= 1 ? t : 1, r = (i || (e ? 0.3 : 0.45)) / (t < 1 ? t : 1), s = r / oi * (Math.asin(1 / n) || 0), o = function(h) {
|
|
1016
|
-
return h === 1 ? 1 : n * Math.pow(2, -10 * h) *
|
|
1016
|
+
return h === 1 ? 1 : n * Math.pow(2, -10 * h) * ns((h - s) * r) + 1;
|
|
1017
1017
|
}, l = e === "out" ? o : e === "in" ? function(c) {
|
|
1018
1018
|
return 1 - o(1 - c);
|
|
1019
|
-
} :
|
|
1019
|
+
} : or(o);
|
|
1020
1020
|
return r = oi / r, l.config = function(c, h) {
|
|
1021
1021
|
return a(e, c, h);
|
|
1022
1022
|
}, l;
|
|
@@ -1026,7 +1026,7 @@ var he = {
|
|
|
1026
1026
|
return s ? --s * s * ((t + 1) * s + t) + 1 : 0;
|
|
1027
1027
|
}, n = e === "out" ? i : e === "in" ? function(r) {
|
|
1028
1028
|
return 1 - i(1 - r);
|
|
1029
|
-
} :
|
|
1029
|
+
} : or(i);
|
|
1030
1030
|
return n.config = function(r) {
|
|
1031
1031
|
return a(e, r);
|
|
1032
1032
|
}, n;
|
|
@@ -1057,10 +1057,10 @@ Xe("Expo", function(a) {
|
|
|
1057
1057
|
return Math.pow(2, 10 * (a - 1)) * a + a * a * a * a * a * a * (1 - a);
|
|
1058
1058
|
});
|
|
1059
1059
|
Xe("Circ", function(a) {
|
|
1060
|
-
return -(
|
|
1060
|
+
return -(Mn(1 - a * a) - 1);
|
|
1061
1061
|
});
|
|
1062
1062
|
Xe("Sine", function(a) {
|
|
1063
|
-
return a === 1 ? 1 : -
|
|
1063
|
+
return a === 1 ? 1 : -is(a * es) + 1;
|
|
1064
1064
|
});
|
|
1065
1065
|
Xe("Back", ei("in"), ei("out"), ei());
|
|
1066
1066
|
D.SteppedEase = D.steps = ce.SteppedEase = {
|
|
@@ -1076,8 +1076,8 @@ st.ease = D["quad.out"];
|
|
|
1076
1076
|
te("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt", function(a) {
|
|
1077
1077
|
return Ri += a + "," + a + "Params,";
|
|
1078
1078
|
});
|
|
1079
|
-
var
|
|
1080
|
-
this.id =
|
|
1079
|
+
var lr = function(e, t) {
|
|
1080
|
+
this.id = ts++, e._gsap = this, this.target = e, this.harness = t, this.get = t ? t.get : zn, this.set = t ? t.getSetter : Fi;
|
|
1081
1081
|
}, Pt = /* @__PURE__ */ (function() {
|
|
1082
1082
|
function a(t) {
|
|
1083
1083
|
this.vars = t, this._delay = +t.delay || 0, (this._repeat = t.repeat === 1 / 0 ? -2 : t.repeat || 0) && (this._rDelay = t.repeatDelay || 0, this._yoyo = !!t.yoyo || !!t.yoyoEase), this._ts = 1, lt(this, +t.duration, 1, 1), this.data = t.data, N && (this._ctx = N, N.data.push(this)), Ct || oe.wake();
|
|
@@ -1094,11 +1094,11 @@ var or = function(e, t) {
|
|
|
1094
1094
|
return this._tTime;
|
|
1095
1095
|
var r = this._dp;
|
|
1096
1096
|
if (r && r.smoothChildTiming && this._ts) {
|
|
1097
|
-
for (Kt(this, i), !r._dp || r.parent ||
|
|
1097
|
+
for (Kt(this, i), !r._dp || r.parent || Hn(r, this); r && r.parent; )
|
|
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) === k || !i && !this._initted && (this.add || this._ptLookup)) && (this._ts || (this._pTime = i),
|
|
1101
|
+
return (this._tTime !== i || !this._dur && !n || this._initted && Math.abs(this._zTime) === k || !i && !this._initted && (this.add || this._ptLookup)) && (this._ts || (this._pTime = i), $n(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) {
|
|
@@ -1114,7 +1114,7 @@ var or = function(e, t) {
|
|
|
1114
1114
|
if (this._rts === i)
|
|
1115
1115
|
return this;
|
|
1116
1116
|
var r = this.parent && this._ts ? Gt(this.parent._time, this) : this._tTime;
|
|
1117
|
-
return this._rts = +i || 0, this._ts = this._ps || i === -k ? 0 : this._rts, this.totalTime(Dt(-Math.abs(this._delay), this.totalDuration(), r), n !== !1), Zt(this),
|
|
1117
|
+
return this._rts = +i || 0, this._ts = this._ps || i === -k ? 0 : this._rts, this.totalTime(Dt(-Math.abs(this._delay), this.totalDuration(), r), n !== !1), Zt(this), cs(this);
|
|
1118
1118
|
}, e.paused = function(i) {
|
|
1119
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) !== k && (this._tTime -= k)))), this) : this._ps;
|
|
1120
1120
|
}, e.startTime = function(i) {
|
|
@@ -1130,7 +1130,7 @@ var or = function(e, t) {
|
|
|
1130
1130
|
var n = this.parent || this._dp;
|
|
1131
1131
|
return n ? i && (!this._ts || this._repeat && this._time && this.totalProgress() < 1) ? this._tTime % (this._dur + this._rDelay) : this._ts ? Gt(n.rawTime(i), this) : this._tTime : this._tTime;
|
|
1132
1132
|
}, e.revert = function(i) {
|
|
1133
|
-
i === void 0 && (i =
|
|
1133
|
+
i === void 0 && (i = as);
|
|
1134
1134
|
var n = K;
|
|
1135
1135
|
return K = i, Ii(this) && (this.timeline && this.timeline.revert(i), this.totalTime(-0.01, i.suppressEvents)), this.data !== "nested" && i.kill !== !1 && this.kill(), K = n, this;
|
|
1136
1136
|
}, e.globalTime = function(i) {
|
|
@@ -1172,7 +1172,7 @@ var or = function(e, t) {
|
|
|
1172
1172
|
}, e.then = function(i) {
|
|
1173
1173
|
var n = this;
|
|
1174
1174
|
return new Promise(function(r) {
|
|
1175
|
-
var s = G(i) ? i :
|
|
1175
|
+
var s = G(i) ? i : Gn, o = function() {
|
|
1176
1176
|
var c = n.then;
|
|
1177
1177
|
n.then = null, G(s) && (s = s(n)) && (s.then || s === n) && (n.then = c), r(s), n.then = c;
|
|
1178
1178
|
};
|
|
@@ -1203,10 +1203,10 @@ ue(Pt.prototype, {
|
|
|
1203
1203
|
_rts: 1
|
|
1204
1204
|
});
|
|
1205
1205
|
var q = /* @__PURE__ */ (function(a) {
|
|
1206
|
-
|
|
1206
|
+
Dn(e, a);
|
|
1207
1207
|
function e(i, n) {
|
|
1208
1208
|
var r;
|
|
1209
|
-
return i === void 0 && (i = {}), r = a.call(this, i) || this, r.labels = {}, r.smoothChildTiming = !!i.smoothChildTiming, r.autoRemoveChildren = !!i.autoRemoveChildren, r._sort = ee(i.sortChildren), z && ye(i.parent || z, we(r), n), i.reversed && r.reverse(), i.paused && r.paused(!0), i.scrollTrigger &&
|
|
1209
|
+
return i === void 0 && (i = {}), r = a.call(this, i) || this, r.labels = {}, r.smoothChildTiming = !!i.smoothChildTiming, r.autoRemoveChildren = !!i.autoRemoveChildren, r._sort = ee(i.sortChildren), z && ye(i.parent || z, we(r), n), i.reversed && r.reverse(), i.paused && r.paused(!0), i.scrollTrigger && jn(we(r), i.scrollTrigger), r;
|
|
1210
1210
|
}
|
|
1211
1211
|
var t = e.prototype;
|
|
1212
1212
|
return t.to = function(n, r, s) {
|
|
@@ -1237,10 +1237,10 @@ var q = /* @__PURE__ */ (function(a) {
|
|
|
1237
1237
|
return this;
|
|
1238
1238
|
if (c = this._dur, l = this._tDur, w && (this._lock = 2, o = P ? c : -1e-4, this.render(o, !0), this.vars.repeatRefresh && !v && this.invalidate()), this._lock = 0, !this._ts && !_)
|
|
1239
1239
|
return this;
|
|
1240
|
-
|
|
1240
|
+
ar(this, v);
|
|
1241
1241
|
}
|
|
1242
1242
|
}
|
|
1243
|
-
if (this._hasPause && !this._forcing && this._lock < 2 && (y =
|
|
1243
|
+
if (this._hasPause && !this._forcing && this._lock < 2 && (y = fs(this, j(o), j(p)), y && (h -= p - (p = y._start))), this._tTime = h, this._time = p, this._act = !x, this._initted || (this._onUpdate = this.vars.onUpdate, this._initted = 1, this._zTime = n, o = 0), !o && h && !r && !b && (le(this, "onStart"), this._tTime !== h))
|
|
1244
1244
|
return this;
|
|
1245
1245
|
if (p >= o && n >= 0)
|
|
1246
1246
|
for (m = this._first; m; ) {
|
|
@@ -1318,7 +1318,7 @@ var q = /* @__PURE__ */ (function(a) {
|
|
|
1318
1318
|
return this;
|
|
1319
1319
|
}, t.getTweensOf = function(n, r) {
|
|
1320
1320
|
for (var s = [], o = me(n), l = this._first, c = Pe(r), h; l; )
|
|
1321
|
-
l instanceof H ?
|
|
1321
|
+
l instanceof H ? os(l._targets, o) && (c ? (!Te || l._initted && l._ts) && l.globalTime(0) <= r && l.globalTime(l.totalDuration()) > r : !r || l.isActive()) && s.push(l) : (h = l.getTweensOf(o, r)).length && s.push.apply(s, h), l = l._next;
|
|
1322
1322
|
return s;
|
|
1323
1323
|
}, t.tweenTo = function(n, r) {
|
|
1324
1324
|
r = r || {};
|
|
@@ -1381,7 +1381,7 @@ var q = /* @__PURE__ */ (function(a) {
|
|
|
1381
1381
|
}
|
|
1382
1382
|
return s._tDur;
|
|
1383
1383
|
}, e.updateRoot = function(n) {
|
|
1384
|
-
if (z._ts && (
|
|
1384
|
+
if (z._ts && ($n(z, Gt(n, z)), Nn = oe.frame), oe.frame >= Wi) {
|
|
1385
1385
|
Wi += he.autoSleep || 120;
|
|
1386
1386
|
var r = z._first;
|
|
1387
1387
|
if ((!r || !r._ts) && he.autoSleep && oe._listeners.length < 2) {
|
|
@@ -1397,8 +1397,8 @@ ue(q.prototype, {
|
|
|
1397
1397
|
_hasPause: 0,
|
|
1398
1398
|
_forcing: 0
|
|
1399
1399
|
});
|
|
1400
|
-
var
|
|
1401
|
-
var l = new ie(this._pt, e, t, 0, 1,
|
|
1400
|
+
var Ms = function(e, t, i, n, r, s, o) {
|
|
1401
|
+
var l = new ie(this._pt, e, t, 0, 1, fr, null, r), c = 0, h = 0, u, p, m, f, d, g, _, y;
|
|
1402
1402
|
for (l.b = i, l.e = n, i += "", n += "", (_ = ~n.indexOf("random(")) && (n = wt(n)), s && (y = [i, n], s(y, e, t), i = y[0], n = y[1]), p = i.match(Wt) || []; u = Wt.exec(n); )
|
|
1403
1403
|
f = u[0], d = n.substring(c, u.index), m ? m = (m + 1) % 5 : d.substr(-5) === "rgba(" && (m = 1), f !== p[h++] && (g = parseFloat(p[h - 1]) || 0, l._pt = {
|
|
1404
1404
|
_next: l._pt,
|
|
@@ -1408,29 +1408,29 @@ var Ds = function(e, t, i, n, r, s, o) {
|
|
|
1408
1408
|
c: f.charAt(1) === "=" ? it(g, f) - g : parseFloat(f) - g,
|
|
1409
1409
|
m: m && m < 4 ? Math.round : 0
|
|
1410
1410
|
}, c = Wt.lastIndex);
|
|
1411
|
-
return l.c = c < n.length ? n.substring(c, n.length) : "", l.fp = o, (
|
|
1411
|
+
return l.c = c < n.length ? n.substring(c, n.length) : "", l.fp = o, (In.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
|
G(n) && (n = n(r || 0, e, s));
|
|
1414
|
-
var u = e[t], p = i !== "get" ? i : G(u) ? c ? e[t.indexOf("set") || !G(e["get" + t.substr(3)]) ? t : "get" + t.substr(3)](c) : e[t]() : u, m = G(u) ? c ?
|
|
1414
|
+
var u = e[t], p = i !== "get" ? i : G(u) ? c ? e[t.indexOf("set") || !G(e["get" + t.substr(3)]) ? t : "get" + t.substr(3)](c) : e[t]() : u, m = G(u) ? c ? ks : dr : Ui, f;
|
|
1415
1415
|
if (Z(n) && (~n.indexOf("random(") && (n = wt(n)), n.charAt(1) === "=" && (f = it(p, n) + (X(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" ?
|
|
1417
|
-
},
|
|
1418
|
-
if (G(e) && (e = bt(e, r, t, i, n)), !Ee(e) || e.style && e.nodeType || W(e) ||
|
|
1416
|
+
return !isNaN(p * n) && n !== "" ? (f = new ie(this._pt, e, t, +p || 0, n - (p || 0), typeof u == "boolean" ? Fs : pr, 0, m), c && (f.fp = c), o && f.modifier(o, this, e), this._pt = f) : (!u && !(t in e) && Di(t, n), Ms.call(this, e, t, p, n, m, l || he.stringFilter, c));
|
|
1417
|
+
}, Rs = function(e, t, i, n, r) {
|
|
1418
|
+
if (G(e) && (e = bt(e, r, t, i, n)), !Ee(e) || e.style && e.nodeType || W(e) || Rn(e))
|
|
1419
1419
|
return Z(e) ? bt(e, r, t, i, n) : e;
|
|
1420
1420
|
var s = {}, o;
|
|
1421
1421
|
for (o in e)
|
|
1422
1422
|
s[o] = bt(e[o], r, t, i, n);
|
|
1423
1423
|
return s;
|
|
1424
|
-
},
|
|
1424
|
+
}, hr = function(e, t, i, n, r, s) {
|
|
1425
1425
|
var o, l, c, h;
|
|
1426
|
-
if (ae[e] && (o = new ae[e]()).init(r, o.rawVars ? t[e] :
|
|
1426
|
+
if (ae[e] && (o = new ae[e]()).init(r, o.rawVars ? t[e] : Rs(t[e], n, r, s, i), i, n, s) !== !1 && (i._pt = l = new ie(i._pt, r, e, 0, 1, o.render, o, 0, o.priority), i !== et))
|
|
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
1430
|
}, Te, gi, ki = 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" && !Pi, E = e.timeline, b, C, v, P, w, T, M, A, R, O, B, F, U;
|
|
1432
|
-
if (E && (!p || !r) && (r = "none"), e._ease = Ye(r, st.ease), e._yEase = u ?
|
|
1433
|
-
if (A = g[0] ? He(g[0]).harness : 0, F = A && n[A.prop], b = Bt(n, Mi), d && (d._zTime < 0 && d.progress(1), t < 0 && h && o && !m ? d.render(-1, !0) : d.revert(h && f ? kt :
|
|
1432
|
+
if (E && (!p || !r) && (r = "none"), e._ease = Ye(r, st.ease), e._yEase = u ? sr(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 = !E && !!n.runBackwards, !E || p && !n.stagger) {
|
|
1433
|
+
if (A = g[0] ? He(g[0]).harness : 0, F = A && n[A.prop], b = Bt(n, Mi), d && (d._zTime < 0 && d.progress(1), t < 0 && h && o && !m ? d.render(-1, !0) : d.revert(h && f ? kt : ss), d._lazy = 0), s) {
|
|
1434
1434
|
if (Ie(e._startAt = H.set(g, ue({
|
|
1435
1435
|
data: "isStart",
|
|
1436
1436
|
overwrite: !1,
|
|
@@ -1468,13 +1468,13 @@ var Ds = function(e, t, i, n, r, s, o) {
|
|
|
1468
1468
|
O[Q] = P;
|
|
1469
1469
|
}), R.priority && (T = 1)), !A || F)
|
|
1470
1470
|
for (v in b)
|
|
1471
|
-
ae[v] && (R =
|
|
1471
|
+
ae[v] && (R = hr(v, b, e, B, w, y)) ? R.priority && (T = 1) : O[v] = P = Li.call(e, w, v, "get", b[v], B, y, 0, n.stringFilter);
|
|
1472
1472
|
e._op && e._op[C] && e.kill(w, e._op[C]), x && e._pt && (Te = e, z.killTweensOf(w, O, e.globalTime(t)), U = !e.parent, Te = 0), e._pt && l && (ci[M.id] = 1);
|
|
1473
1473
|
}
|
|
1474
|
-
T &&
|
|
1474
|
+
T && mr(e), e._onInit && e._onInit(e);
|
|
1475
1475
|
}
|
|
1476
1476
|
e._onUpdate = c, e._initted = (!e._op || e._pt) && !U, p && t <= 0 && E.render(fe, !0, !0);
|
|
1477
|
-
},
|
|
1477
|
+
}, Os = function(e, t, i, n, r, s, o, l) {
|
|
1478
1478
|
var c = (e._pt && e._ptCache || (e._ptCache = {}))[t], h, u, p, m;
|
|
1479
1479
|
if (!c)
|
|
1480
1480
|
for (c = e._ptCache[t] = [], p = e._ptLookup, m = e._targets.length; m--; ) {
|
|
@@ -1487,7 +1487,7 @@ var Ds = function(e, t, i, n, r, s, o) {
|
|
|
1487
1487
|
}
|
|
1488
1488
|
for (m = c.length; m--; )
|
|
1489
1489
|
u = c[m], h = u._pt || u, h.s = (n || n === 0) && !r ? n : h.s + (n || 0) + s * h.c, h.c = i - h.s, u.e && (u.e = V(i) + X(u.e)), u.b && (u.b = h.s + X(u.b));
|
|
1490
|
-
},
|
|
1490
|
+
}, Is = function(e, t) {
|
|
1491
1491
|
var i = e[0] ? He(e[0]).harness : 0, n = i && i.aliases, r, s, o, l;
|
|
1492
1492
|
if (!n)
|
|
1493
1493
|
return t;
|
|
@@ -1497,7 +1497,7 @@ var Ds = function(e, t, i, n, r, s, o) {
|
|
|
1497
1497
|
for (l = n[s].split(","), o = l.length; o--; )
|
|
1498
1498
|
r[l[o]] = r[s];
|
|
1499
1499
|
return r;
|
|
1500
|
-
},
|
|
1500
|
+
}, Ls = function(e, t, i, n) {
|
|
1501
1501
|
var r = t.ease || n || "power1.inOut", s, o;
|
|
1502
1502
|
if (W(t))
|
|
1503
1503
|
o = i[e] || (i[e] = []), t.forEach(function(l, c) {
|
|
@@ -1516,27 +1516,27 @@ var Ds = function(e, t, i, n, r, s, o) {
|
|
|
1516
1516
|
});
|
|
1517
1517
|
}, bt = function(e, t, i, n, r) {
|
|
1518
1518
|
return G(e) ? e.call(t, i, n, r) : Z(e) && ~e.indexOf("random(") ? wt(e) : e;
|
|
1519
|
-
},
|
|
1520
|
-
te(
|
|
1521
|
-
return
|
|
1519
|
+
}, cr = Ri + "repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert", ur = {};
|
|
1520
|
+
te(cr + ",id,stagger,delay,duration,paused,scrollTrigger", function(a) {
|
|
1521
|
+
return ur[a] = 1;
|
|
1522
1522
|
});
|
|
1523
1523
|
var H = /* @__PURE__ */ (function(a) {
|
|
1524
|
-
|
|
1524
|
+
Dn(e, a);
|
|
1525
1525
|
function e(i, n, r, s) {
|
|
1526
1526
|
var o;
|
|
1527
1527
|
typeof n == "number" && (r.duration = n, n = r, r = null), o = a.call(this, s ? n : yt(n)) || this;
|
|
1528
|
-
var l = o.vars, c = l.duration, h = l.delay, u = l.immediateRender, p = l.stagger, m = l.overwrite, f = l.keyframes, d = l.defaults, g = l.scrollTrigger, _ = l.yoyoEase, y = n.parent || z, x = (W(i) ||
|
|
1528
|
+
var l = o.vars, c = l.duration, h = l.delay, u = l.immediateRender, p = l.stagger, m = l.overwrite, f = l.keyframes, d = l.defaults, g = l.scrollTrigger, _ = l.yoyoEase, y = n.parent || z, x = (W(i) || Rn(i) ? Pe(i[0]) : "length" in n) ? [i] : me(i), E, b, C, v, P, w, T, M;
|
|
1529
1529
|
if (o._targets = x.length ? Oi(x) : Et("GSAP target " + i + " not found. https://gsap.com", !he.nullTargetWarn) || [], o._ptLookup = [], o._overwrite = m, f || p || Rt(c) || Rt(h)) {
|
|
1530
1530
|
if (n = o.vars, E = o.timeline = new q({
|
|
1531
1531
|
data: "nested",
|
|
1532
1532
|
defaults: d || {},
|
|
1533
1533
|
targets: y && y.data === "nested" ? y.vars.targets : x
|
|
1534
1534
|
}), E.kill(), E.parent = E._dp = we(o), E._start = 0, p || Rt(c) || Rt(h)) {
|
|
1535
|
-
if (v = x.length, T = p &&
|
|
1535
|
+
if (v = x.length, T = p && Xn(p), Ee(p))
|
|
1536
1536
|
for (P in p)
|
|
1537
|
-
~
|
|
1537
|
+
~cr.indexOf(P) && (M || (M = {}), M[P] = p[P]);
|
|
1538
1538
|
for (b = 0; b < v; b++)
|
|
1539
|
-
C = Bt(n,
|
|
1539
|
+
C = Bt(n, ur), C.stagger = 0, _ && (C.yoyoEase = _), M && at(C, M), w = x[b], C.duration = +bt(c, we(o), b, w, x), C.delay = (+bt(h, we(o), b, w, x) || 0) - o._delay, !p && v === 1 && C.delay && (o._delay = h = C.delay, o._start += h, C.delay = 0), E.to(w, C, T ? T(b, w, x) : 0), E._ease = D.none;
|
|
1540
1540
|
E.duration() ? c = h = 0 : o.timeline = 0;
|
|
1541
1541
|
} else if (f) {
|
|
1542
1542
|
yt(ue(E.vars.defaults, {
|
|
@@ -1550,7 +1550,7 @@ var H = /* @__PURE__ */ (function(a) {
|
|
|
1550
1550
|
else {
|
|
1551
1551
|
C = {};
|
|
1552
1552
|
for (P in f)
|
|
1553
|
-
P === "ease" || P === "easeEach" ||
|
|
1553
|
+
P === "ease" || P === "easeEach" || Ls(P, f[P], C, f.easeEach);
|
|
1554
1554
|
for (P in C)
|
|
1555
1555
|
for (R = C[P].sort(function(F, U) {
|
|
1556
1556
|
return F.t - U.t;
|
|
@@ -1567,23 +1567,23 @@ var H = /* @__PURE__ */ (function(a) {
|
|
|
1567
1567
|
c || o.duration(c = E.duration());
|
|
1568
1568
|
} else
|
|
1569
1569
|
o.timeline = 0;
|
|
1570
|
-
return m === !0 && !Pi && (Te = we(o), z.killTweensOf(x), Te = 0), ye(y, we(o), r), n.reversed && o.reverse(), n.paused && o.paused(!0), (u || !c && !f && o._start === j(y._time) && ee(u) &&
|
|
1570
|
+
return m === !0 && !Pi && (Te = we(o), z.killTweensOf(x), Te = 0), ye(y, we(o), r), n.reversed && o.reverse(), n.paused && o.paused(!0), (u || !c && !f && o._start === j(y._time) && ee(u) && us(we(o)) && y.data !== "nested") && (o._tTime = -k, o.render(Math.max(0, -h) || 0)), g && jn(we(o), g), o;
|
|
1571
1571
|
}
|
|
1572
1572
|
var t = e.prototype;
|
|
1573
1573
|
return t.render = function(n, r, s) {
|
|
1574
1574
|
var o = this._time, l = this._tDur, c = this._dur, h = n < 0, u = n > l - k && !h ? l : n < k ? 0 : n, p, m, f, d, g, _, y, x, E;
|
|
1575
1575
|
if (!c)
|
|
1576
|
-
|
|
1576
|
+
ps(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) {
|
|
1578
1578
|
if (p = u, x = this.timeline, this._repeat) {
|
|
1579
1579
|
if (d = c + this._rDelay, this._repeat < -1 && h)
|
|
1580
1580
|
return this.totalTime(d * 100 + n, r, s);
|
|
1581
1581
|
if (p = j(u % d), u === l ? (f = this._repeat, p = c) : (g = j(u / d), f = ~~g, f && f === g ? (p = c, f--) : p > c && (p = c)), _ = this._yoyo && f & 1, _ && (E = this._yEase, p = c - p), g = ot(this._tTime, d), p === o && !s && this._initted && f === g)
|
|
1582
1582
|
return this._tTime = u, this;
|
|
1583
|
-
f !== g && (x && this._yEase &&
|
|
1583
|
+
f !== g && (x && this._yEase && ar(x, _), this.vars.repeatRefresh && !_ && !this._lock && p !== d && this._initted && (this._lock = s = 1, this.render(j(d * f), !0).invalidate()._lock = 0));
|
|
1584
1584
|
}
|
|
1585
1585
|
if (!this._initted) {
|
|
1586
|
-
if (
|
|
1586
|
+
if (Yn(this, h ? n : p, s, r, u))
|
|
1587
1587
|
return this._tTime = 0, this;
|
|
1588
1588
|
if (o !== this._time && !(s && this.vars.repeatRefresh && f !== g))
|
|
1589
1589
|
return this;
|
|
@@ -1604,7 +1604,7 @@ var H = /* @__PURE__ */ (function(a) {
|
|
|
1604
1604
|
}, t.resetTo = function(n, r, s, o, l) {
|
|
1605
1605
|
Ct || 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 || ki(this, c), h = this._ease(c / this._dur),
|
|
1607
|
+
return this._initted || ki(this, c), h = this._ease(c / this._dur), Os(this, n, r, s, o, h, c, l) ? this.resetTo(n, r, s, o, 1) : (Kt(this, 0), this.parent || Vn(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(!!K), this;
|
|
@@ -1613,11 +1613,11 @@ var H = /* @__PURE__ */ (function(a) {
|
|
|
1613
1613
|
return this.timeline.killTweensOf(n, r, Te && Te.vars.overwrite !== !0)._first || mt(this), this.parent && s !== this.timeline.totalDuration() && lt(this, this._dur * this.timeline._tDur / s, 0, 1), this;
|
|
1614
1614
|
}
|
|
1615
1615
|
var o = this._targets, l = n ? me(n) : o, c = this._ptLookup, h = this._pt, u, p, m, f, d, g, _;
|
|
1616
|
-
if ((!r || r === "all") &&
|
|
1616
|
+
if ((!r || r === "all") && hs(o, l))
|
|
1617
1617
|
return r === "all" && (this._pt = 0), mt(this);
|
|
1618
1618
|
for (u = this._op = this._op || [], r !== "all" && (Z(r) && (d = {}, te(r, function(y) {
|
|
1619
1619
|
return d[y] = 1;
|
|
1620
|
-
}), r = d), r =
|
|
1620
|
+
}), r = d), r = Is(o, r)), _ = o.length; _--; )
|
|
1621
1621
|
if (~l.indexOf(o[_])) {
|
|
1622
1622
|
p = c[_], r === "all" ? (u[_] = r, f = p, m = {}) : (m = u[_] = u[_] || {}, f = r);
|
|
1623
1623
|
for (d in f)
|
|
@@ -1663,19 +1663,19 @@ te("staggerTo,staggerFrom,staggerFromTo", function(a) {
|
|
|
1663
1663
|
});
|
|
1664
1664
|
var Ui = function(e, t, i) {
|
|
1665
1665
|
return e[t] = i;
|
|
1666
|
-
},
|
|
1666
|
+
}, dr = function(e, t, i) {
|
|
1667
1667
|
return e[t](i);
|
|
1668
|
-
},
|
|
1668
|
+
}, ks = function(e, t, i, n) {
|
|
1669
1669
|
return e[t](n.fp, i);
|
|
1670
|
-
},
|
|
1670
|
+
}, Us = function(e, t, i) {
|
|
1671
1671
|
return e.setAttribute(t, i);
|
|
1672
1672
|
}, Fi = function(e, t) {
|
|
1673
|
-
return G(e[t]) ?
|
|
1674
|
-
},
|
|
1673
|
+
return G(e[t]) ? dr : Ai(e[t]) && e.setAttribute ? Us : Ui;
|
|
1674
|
+
}, pr = function(e, t) {
|
|
1675
1675
|
return t.set(t.t, t.p, Math.round((t.s + t.c * e) * 1e6) / 1e6, t);
|
|
1676
|
-
},
|
|
1676
|
+
}, Fs = function(e, t) {
|
|
1677
1677
|
return t.set(t.t, t.p, !!(t.s + t.c * e), t);
|
|
1678
|
-
},
|
|
1678
|
+
}, fr = function(e, t) {
|
|
1679
1679
|
var i = t._pt, n = "";
|
|
1680
1680
|
if (!e && t.b)
|
|
1681
1681
|
n = t.b;
|
|
@@ -1690,16 +1690,16 @@ var Ui = function(e, t, i) {
|
|
|
1690
1690
|
}, Ni = function(e, t) {
|
|
1691
1691
|
for (var i = t._pt; i; )
|
|
1692
1692
|
i.r(e, i.d), i = i._next;
|
|
1693
|
-
},
|
|
1693
|
+
}, Ns = 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
|
+
}, zs = function(e) {
|
|
1697
1697
|
for (var t = this._pt, i, n; t; )
|
|
1698
1698
|
n = t._next, t.p === e && !t.op || t.op === e ? Yt(this, t, "_pt") : t.dep || (i = 1), t = n;
|
|
1699
1699
|
return !i;
|
|
1700
|
-
},
|
|
1700
|
+
}, $s = function(e, t, i, n) {
|
|
1701
1701
|
n.mSet(e, t, n.m.call(n.tween, i, n.mt), n);
|
|
1702
|
-
},
|
|
1702
|
+
}, mr = function(e) {
|
|
1703
1703
|
for (var t = e._pt, i, n, r, s; t; ) {
|
|
1704
1704
|
for (i = t._next, n = r; n && n.pr > t.pr; )
|
|
1705
1705
|
n = n._next;
|
|
@@ -1708,11 +1708,11 @@ var Ui = function(e, t, i) {
|
|
|
1708
1708
|
e._pt = r;
|
|
1709
1709
|
}, ie = /* @__PURE__ */ (function() {
|
|
1710
1710
|
function a(t, i, n, r, s, o, l, c, h) {
|
|
1711
|
-
this.t = i, this.s = r, this.c = s, this.p = n, this.r = o ||
|
|
1711
|
+
this.t = i, this.s = r, this.c = s, this.p = n, this.r = o || pr, this.d = l || this, this.set = c || Ui, this.pr = h || 0, this._next = t, t && (t._prev = this);
|
|
1712
1712
|
}
|
|
1713
1713
|
var e = a.prototype;
|
|
1714
1714
|
return e.modifier = function(i, n, r) {
|
|
1715
|
-
this.mSet = this.mSet || this.set, this.set =
|
|
1715
|
+
this.mSet = this.mSet || this.set, this.set = $s, this.m = i, this.mt = r, this.tween = n;
|
|
1716
1716
|
}, a;
|
|
1717
1717
|
})();
|
|
1718
1718
|
te(Ri + "parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger", function(a) {
|
|
@@ -1727,9 +1727,9 @@ z = new q({
|
|
|
1727
1727
|
id: "root",
|
|
1728
1728
|
smoothChildTiming: !0
|
|
1729
1729
|
});
|
|
1730
|
-
he.stringFilter =
|
|
1731
|
-
var Ze = [], Ft = {},
|
|
1732
|
-
return (Ft[e] ||
|
|
1730
|
+
he.stringFilter = rr;
|
|
1731
|
+
var Ze = [], Ft = {}, Bs = [], nn = 0, Gs = 0, ti = function(e) {
|
|
1732
|
+
return (Ft[e] || Bs).map(function(t) {
|
|
1733
1733
|
return t();
|
|
1734
1734
|
});
|
|
1735
1735
|
}, _i = function() {
|
|
@@ -1744,9 +1744,9 @@ var Ze = [], Ft = {}, $s = [], nn = 0, Bs = 0, ti = function(e) {
|
|
|
1744
1744
|
return i.add(null, n);
|
|
1745
1745
|
});
|
|
1746
1746
|
}), nn = e, ti("matchMedia"));
|
|
1747
|
-
},
|
|
1747
|
+
}, gr = /* @__PURE__ */ (function() {
|
|
1748
1748
|
function a(t, i) {
|
|
1749
|
-
this.selector = i && fi(i), this.data = [], this._r = [], this.isReverted = !1, this.id =
|
|
1749
|
+
this.selector = i && fi(i), this.data = [], this._r = [], this.isReverted = !1, this.id = Gs++, t && this.add(t);
|
|
1750
1750
|
}
|
|
1751
1751
|
var e = a.prototype;
|
|
1752
1752
|
return e.add = function(i, n, r) {
|
|
@@ -1797,7 +1797,7 @@ var Ze = [], Ft = {}, $s = [], nn = 0, Bs = 0, ti = function(e) {
|
|
|
1797
1797
|
}, e.revert = function(i) {
|
|
1798
1798
|
this.kill(i || {});
|
|
1799
1799
|
}, a;
|
|
1800
|
-
})(),
|
|
1800
|
+
})(), Vs = /* @__PURE__ */ (function() {
|
|
1801
1801
|
function a(t) {
|
|
1802
1802
|
this.contexts = [], this.scope = t, N && N.data.push(this);
|
|
1803
1803
|
}
|
|
@@ -1806,7 +1806,7 @@ var Ze = [], Ft = {}, $s = [], nn = 0, Bs = 0, ti = function(e) {
|
|
|
1806
1806
|
Ee(i) || (i = {
|
|
1807
1807
|
matches: i
|
|
1808
1808
|
});
|
|
1809
|
-
var s = new
|
|
1809
|
+
var s = new gr(0, r || this.scope), o = s.conditions = {}, l, c, h;
|
|
1810
1810
|
N && !s.selector && (s.selector = N.selector), this.contexts.push(s), n = s.add("onMatch", n), s.queries = i;
|
|
1811
1811
|
for (c in i)
|
|
1812
1812
|
c === "all" ? h = 1 : (l = _e.matchMedia(i[c]), l && (Ze.indexOf(s) < 0 && Ze.push(s), (o[c] = l.matches) && (h = 1), l.addListener ? l.addListener(_i) : l.addEventListener("change", _i)));
|
|
@@ -1825,7 +1825,7 @@ var Ze = [], Ft = {}, $s = [], nn = 0, Bs = 0, ti = function(e) {
|
|
|
1825
1825
|
for (var e = arguments.length, t = new Array(e), i = 0; i < e; i++)
|
|
1826
1826
|
t[i] = arguments[i];
|
|
1827
1827
|
t.forEach(function(n) {
|
|
1828
|
-
return
|
|
1828
|
+
return tr(n);
|
|
1829
1829
|
});
|
|
1830
1830
|
},
|
|
1831
1831
|
timeline: function(e) {
|
|
@@ -1836,7 +1836,7 @@ var Ze = [], Ft = {}, $s = [], nn = 0, Bs = 0, ti = function(e) {
|
|
|
1836
1836
|
},
|
|
1837
1837
|
getProperty: function(e, t, i, n) {
|
|
1838
1838
|
Z(e) && (e = me(e)[0]);
|
|
1839
|
-
var r = He(e || {}).get, s = i ?
|
|
1839
|
+
var r = He(e || {}).get, s = i ? Gn : Bn;
|
|
1840
1840
|
return i === "native" && (i = ""), e && (t ? s((ae[t] && ae[t].get || r)(e, t, i, n)) : function(o, l, c) {
|
|
1841
1841
|
return s((ae[o] && ae[o].get || r)(e, o, l, c));
|
|
1842
1842
|
});
|
|
@@ -1902,10 +1902,10 @@ var Ze = [], Ft = {}, $s = [], nn = 0, Bs = 0, ti = function(e) {
|
|
|
1902
1902
|
return ye(z, i, 0), i;
|
|
1903
1903
|
},
|
|
1904
1904
|
context: function(e, t) {
|
|
1905
|
-
return e ? new
|
|
1905
|
+
return e ? new gr(e, t) : N;
|
|
1906
1906
|
},
|
|
1907
1907
|
matchMedia: function(e) {
|
|
1908
|
-
return new
|
|
1908
|
+
return new Vs(e);
|
|
1909
1909
|
},
|
|
1910
1910
|
matchMediaRefresh: function() {
|
|
1911
1911
|
return Ze.forEach(function(e) {
|
|
@@ -1924,24 +1924,24 @@ var Ze = [], Ft = {}, $s = [], nn = 0, Bs = 0, ti = function(e) {
|
|
|
1924
1924
|
n >= 0 && i.splice(n, 1);
|
|
1925
1925
|
},
|
|
1926
1926
|
utils: {
|
|
1927
|
-
wrap:
|
|
1928
|
-
wrapYoyo:
|
|
1929
|
-
distribute:
|
|
1930
|
-
random:
|
|
1931
|
-
snap:
|
|
1932
|
-
normalize:
|
|
1927
|
+
wrap: Es,
|
|
1928
|
+
wrapYoyo: vs,
|
|
1929
|
+
distribute: Xn,
|
|
1930
|
+
random: qn,
|
|
1931
|
+
snap: Wn,
|
|
1932
|
+
normalize: bs,
|
|
1933
1933
|
getUnit: X,
|
|
1934
|
-
clamp:
|
|
1935
|
-
splitColor:
|
|
1934
|
+
clamp: gs,
|
|
1935
|
+
splitColor: ir,
|
|
1936
1936
|
toArray: me,
|
|
1937
1937
|
selector: fi,
|
|
1938
|
-
mapRange:
|
|
1939
|
-
pipe:
|
|
1940
|
-
unitize:
|
|
1941
|
-
interpolate:
|
|
1942
|
-
shuffle:
|
|
1938
|
+
mapRange: Jn,
|
|
1939
|
+
pipe: ys,
|
|
1940
|
+
unitize: xs,
|
|
1941
|
+
interpolate: ws,
|
|
1942
|
+
shuffle: Kn
|
|
1943
1943
|
},
|
|
1944
|
-
install:
|
|
1944
|
+
install: Un,
|
|
1945
1945
|
effects: qt,
|
|
1946
1946
|
ticker: oe,
|
|
1947
1947
|
updateRoot: q.updateRoot,
|
|
@@ -1949,7 +1949,7 @@ var Ze = [], Ft = {}, $s = [], nn = 0, Bs = 0, ti = function(e) {
|
|
|
1949
1949
|
globalTimeline: z,
|
|
1950
1950
|
core: {
|
|
1951
1951
|
PropTween: ie,
|
|
1952
|
-
globals:
|
|
1952
|
+
globals: Fn,
|
|
1953
1953
|
Tween: H,
|
|
1954
1954
|
Timeline: q,
|
|
1955
1955
|
Animation: Pt,
|
|
@@ -1973,15 +1973,15 @@ oe.add(q.updateRoot);
|
|
|
1973
1973
|
et = Vt.to({}, {
|
|
1974
1974
|
duration: 0
|
|
1975
1975
|
});
|
|
1976
|
-
var
|
|
1976
|
+
var Hs = function(e, t) {
|
|
1977
1977
|
for (var i = e._pt; i && i.p !== t && i.op !== t && i.fp !== t; )
|
|
1978
1978
|
i = i._next;
|
|
1979
1979
|
return i;
|
|
1980
|
-
},
|
|
1980
|
+
}, js = function(e, t) {
|
|
1981
1981
|
var i = e._targets, n, r, s;
|
|
1982
1982
|
for (n in t)
|
|
1983
1983
|
for (r = i.length; r--; )
|
|
1984
|
-
s = e._ptLookup[r][n], s && (s = s.d) && (s._pt && (s =
|
|
1984
|
+
s = e._ptLookup[r][n], s && (s = s.d) && (s._pt && (s = Hs(s, n)), s && s.modifier && s.modifier(t[n], e, i[r], n));
|
|
1985
1985
|
}, ii = function(e, t) {
|
|
1986
1986
|
return {
|
|
1987
1987
|
name: e,
|
|
@@ -1999,7 +1999,7 @@ var Vs = function(e, t) {
|
|
|
1999
1999
|
l[c] = t(r[c]);
|
|
2000
2000
|
r = l;
|
|
2001
2001
|
}
|
|
2002
|
-
|
|
2002
|
+
js(o, r);
|
|
2003
2003
|
};
|
|
2004
2004
|
}
|
|
2005
2005
|
};
|
|
@@ -2022,9 +2022,9 @@ var Vs = function(e, t) {
|
|
|
2022
2022
|
for (var i = t.length; i--; )
|
|
2023
2023
|
this.add(e, i, e[i] || 0, t[i], 0, 0, 0, 0, 0, 1);
|
|
2024
2024
|
}
|
|
2025
|
-
}, ii("roundProps", mi), ii("modifiers"), ii("snap",
|
|
2025
|
+
}, ii("roundProps", mi), ii("modifiers"), ii("snap", Wn)) || Vt;
|
|
2026
2026
|
H.version = q.version = re.version = "3.13.0";
|
|
2027
|
-
|
|
2027
|
+
kn = 1;
|
|
2028
2028
|
Ti() && ht();
|
|
2029
2029
|
D.Power0;
|
|
2030
2030
|
D.Power1;
|
|
@@ -2044,40 +2044,40 @@ D.Bounce;
|
|
|
2044
2044
|
D.Sine;
|
|
2045
2045
|
D.Expo;
|
|
2046
2046
|
D.Circ;
|
|
2047
|
-
var rn, Se, nt, zi, Ge, sn, $i,
|
|
2047
|
+
var rn, Se, nt, zi, Ge, sn, $i, Ys = function() {
|
|
2048
2048
|
return typeof window < "u";
|
|
2049
|
-
}, Ae = {}, $e = 180 / Math.PI, rt = Math.PI / 180, We = Math.atan2, an = 1e8, Bi = /([A-Z])/g,
|
|
2049
|
+
}, Ae = {}, $e = 180 / Math.PI, rt = Math.PI / 180, We = Math.atan2, an = 1e8, Bi = /([A-Z])/g, Zs = /(left|right|width|margin|padding|x)/i, Ks = /[\s,\(]\S/, xe = {
|
|
2050
2050
|
autoAlpha: "opacity,visibility",
|
|
2051
2051
|
scale: "scaleX,scaleY",
|
|
2052
2052
|
alpha: "opacity"
|
|
2053
2053
|
}, yi = function(e, t) {
|
|
2054
2054
|
return t.set(t.t, t.p, Math.round((t.s + t.c * e) * 1e4) / 1e4 + t.u, t);
|
|
2055
|
-
}, Ks = function(e, t) {
|
|
2056
|
-
return t.set(t.t, t.p, e === 1 ? t.e : Math.round((t.s + t.c * e) * 1e4) / 1e4 + t.u, t);
|
|
2057
2055
|
}, Xs = function(e, t) {
|
|
2058
|
-
return t.set(t.t, t.p, e ? Math.round((t.s + t.c * e) * 1e4) / 1e4 + t.u
|
|
2056
|
+
return t.set(t.t, t.p, e === 1 ? t.e : Math.round((t.s + t.c * e) * 1e4) / 1e4 + t.u, t);
|
|
2059
2057
|
}, Ws = function(e, t) {
|
|
2058
|
+
return t.set(t.t, t.p, e ? Math.round((t.s + t.c * e) * 1e4) / 1e4 + t.u : t.b, t);
|
|
2059
|
+
}, qs = function(e, t) {
|
|
2060
2060
|
var i = t.s + t.c * e;
|
|
2061
2061
|
t.set(t.t, t.p, ~~(i + (i < 0 ? -0.5 : 0.5)) + t.u, t);
|
|
2062
|
-
}, gr = function(e, t) {
|
|
2063
|
-
return t.set(t.t, t.p, e ? t.e : t.b, t);
|
|
2064
2062
|
}, _r = function(e, t) {
|
|
2063
|
+
return t.set(t.t, t.p, e ? t.e : t.b, t);
|
|
2064
|
+
}, yr = function(e, t) {
|
|
2065
2065
|
return t.set(t.t, t.p, e !== 1 ? t.b : t.e, t);
|
|
2066
|
-
}, qs = function(e, t, i) {
|
|
2067
|
-
return e.style[t] = i;
|
|
2068
2066
|
}, Qs = function(e, t, i) {
|
|
2069
|
-
return e.style
|
|
2067
|
+
return e.style[t] = i;
|
|
2070
2068
|
}, Js = function(e, t, i) {
|
|
2071
|
-
return e.
|
|
2069
|
+
return e.style.setProperty(t, i);
|
|
2072
2070
|
}, ea = function(e, t, i) {
|
|
2071
|
+
return e._gsap[t] = i;
|
|
2072
|
+
}, ta = function(e, t, i) {
|
|
2073
2073
|
return e._gsap.scaleX = e._gsap.scaleY = i;
|
|
2074
|
-
},
|
|
2074
|
+
}, ia = function(e, t, i, n, r) {
|
|
2075
2075
|
var s = e._gsap;
|
|
2076
2076
|
s.scaleX = s.scaleY = i, s.renderTransform(r, s);
|
|
2077
|
-
},
|
|
2077
|
+
}, na = function(e, t, i, n, r) {
|
|
2078
2078
|
var s = e._gsap;
|
|
2079
2079
|
s[t] = i, s.renderTransform(r, s);
|
|
2080
|
-
}, $ = "transform", ne = $ + "Origin",
|
|
2080
|
+
}, $ = "transform", ne = $ + "Origin", ra = function a(e, t) {
|
|
2081
2081
|
var i = this, n = this.target, r = n.style, s = n._gsap;
|
|
2082
2082
|
if (e in Ae && r) {
|
|
2083
2083
|
if (this.tfm = this.tfm || {}, e !== "transform")
|
|
@@ -2093,28 +2093,28 @@ var rn, Se, nt, zi, Ge, sn, $i, js = function() {
|
|
|
2093
2093
|
s.svg && (this.svgo = n.getAttribute("data-svg-origin"), this.props.push(ne, t, "")), e = $;
|
|
2094
2094
|
}
|
|
2095
2095
|
(r || t) && this.props.push(e, t, r[e]);
|
|
2096
|
-
},
|
|
2096
|
+
}, xr = function(e) {
|
|
2097
2097
|
e.translate && (e.removeProperty("translate"), e.removeProperty("scale"), e.removeProperty("rotate"));
|
|
2098
|
-
},
|
|
2098
|
+
}, sa = function() {
|
|
2099
2099
|
var e = this.props, t = this.target, i = t.style, n = t._gsap, r, s;
|
|
2100
2100
|
for (r = 0; r < e.length; r += 3)
|
|
2101
2101
|
e[r + 1] ? e[r + 1] === 2 ? t[e[r]](e[r + 2]) : t[e[r]] = e[r + 2] : e[r + 2] ? i[e[r]] = e[r + 2] : i.removeProperty(e[r].substr(0, 2) === "--" ? e[r] : e[r].replace(Bi, "-$1").toLowerCase());
|
|
2102
2102
|
if (this.tfm) {
|
|
2103
2103
|
for (s in this.tfm)
|
|
2104
2104
|
n[s] = this.tfm[s];
|
|
2105
|
-
n.svg && (n.renderTransform(), t.setAttribute("data-svg-origin", this.svgo || "")), r = $i(), (!r || !r.isStart) && !i[$] && (
|
|
2105
|
+
n.svg && (n.renderTransform(), t.setAttribute("data-svg-origin", this.svgo || "")), r = $i(), (!r || !r.isStart) && !i[$] && (xr(i), n.zOrigin && i[ne] && (i[ne] += " " + n.zOrigin + "px", n.zOrigin = 0, n.renderTransform()), n.uncache = 1);
|
|
2106
2106
|
}
|
|
2107
|
-
},
|
|
2107
|
+
}, br = function(e, t) {
|
|
2108
2108
|
var i = {
|
|
2109
2109
|
target: e,
|
|
2110
2110
|
props: [],
|
|
2111
|
-
revert:
|
|
2112
|
-
save:
|
|
2111
|
+
revert: sa,
|
|
2112
|
+
save: ra
|
|
2113
2113
|
};
|
|
2114
2114
|
return e._gsap || re.core.getCache(e), t && e.style && e.nodeType && t.split(",").forEach(function(n) {
|
|
2115
2115
|
return i.save(n);
|
|
2116
2116
|
}), i;
|
|
2117
|
-
},
|
|
2117
|
+
}, Er, xi = function(e, t) {
|
|
2118
2118
|
var i = Se.createElementNS ? Se.createElementNS((t || "http://www.w3.org/1999/xhtml").replace(/^https/, "http"), e) : Se.createElement(e);
|
|
2119
2119
|
return i && i.style ? i : Se.createElement(e);
|
|
2120
2120
|
}, ge = function a(e, t, i) {
|
|
@@ -2128,9 +2128,9 @@ var rn, Se, nt, zi, Ge, sn, $i, js = function() {
|
|
|
2128
2128
|
;
|
|
2129
2129
|
return s < 0 ? null : (s === 3 ? "ms" : s >= 0 ? on[s] : "") + e;
|
|
2130
2130
|
}, bi = function() {
|
|
2131
|
-
|
|
2131
|
+
Ys() && window.document && (rn = window, Se = rn.document, nt = Se.documentElement, Ge = xi("div") || {
|
|
2132
2132
|
style: {}
|
|
2133
|
-
}, xi("div"), $ = ct($), ne = $ + "Origin", Ge.style.cssText = "border-width:0;line-height:0;position:absolute;padding:0",
|
|
2133
|
+
}, xi("div"), $ = ct($), ne = $ + "Origin", Ge.style.cssText = "border-width:0;line-height:0;position:absolute;padding:0", Er = !!ct("perspective"), $i = re.core.reverting, zi = 1);
|
|
2134
2134
|
}, ln = function(e) {
|
|
2135
2135
|
var t = e.ownerSVGElement, i = xi("svg", t && t.getAttribute("xmlns") || "http://www.w3.org/2000/svg"), n = e.cloneNode(!0), r;
|
|
2136
2136
|
n.style.display = "block", i.appendChild(n), nt.appendChild(i);
|
|
@@ -2143,7 +2143,7 @@ var rn, Se, nt, zi, Ge, sn, $i, js = function() {
|
|
|
2143
2143
|
for (var i = t.length; i--; )
|
|
2144
2144
|
if (e.hasAttribute(t[i]))
|
|
2145
2145
|
return e.getAttribute(t[i]);
|
|
2146
|
-
},
|
|
2146
|
+
}, vr = function(e) {
|
|
2147
2147
|
var t, i;
|
|
2148
2148
|
try {
|
|
2149
2149
|
t = e.getBBox();
|
|
@@ -2156,28 +2156,28 @@ var rn, Se, nt, zi, Ge, sn, $i, js = function() {
|
|
|
2156
2156
|
width: 0,
|
|
2157
2157
|
height: 0
|
|
2158
2158
|
} : t;
|
|
2159
|
-
},
|
|
2160
|
-
return !!(e.getCTM && (!e.parentNode || e.ownerSVGElement) &&
|
|
2159
|
+
}, wr = function(e) {
|
|
2160
|
+
return !!(e.getCTM && (!e.parentNode || e.ownerSVGElement) && vr(e));
|
|
2161
2161
|
}, Ke = function(e, t) {
|
|
2162
2162
|
if (t) {
|
|
2163
2163
|
var i = e.style, n;
|
|
2164
2164
|
t in Ae && t !== ne && (t = $), i.removeProperty ? (n = t.substr(0, 2), (n === "ms" || t.substr(0, 6) === "webkit") && (t = "-" + t), i.removeProperty(n === "--" ? t : t.replace(Bi, "-$1").toLowerCase())) : i.removeAttribute(t);
|
|
2165
2165
|
}
|
|
2166
2166
|
}, De = function(e, t, i, n, r, s) {
|
|
2167
|
-
var o = new ie(e._pt, t, i, 0, 1, s ?
|
|
2167
|
+
var o = new ie(e._pt, t, i, 0, 1, s ? yr : _r);
|
|
2168
2168
|
return e._pt = o, o.b = n, o.e = r, e._props.push(i), o;
|
|
2169
2169
|
}, cn = {
|
|
2170
2170
|
deg: 1,
|
|
2171
2171
|
rad: 1,
|
|
2172
2172
|
turn: 1
|
|
2173
|
-
},
|
|
2173
|
+
}, aa = {
|
|
2174
2174
|
grid: 1,
|
|
2175
2175
|
flex: 1
|
|
2176
2176
|
}, Le = function a(e, t, i, n) {
|
|
2177
|
-
var r = parseFloat(i) || 0, s = (i + "").trim().substr((r + "").length) || "px", o = Ge.style, l =
|
|
2177
|
+
var r = parseFloat(i) || 0, s = (i + "").trim().substr((r + "").length) || "px", o = Ge.style, l = Zs.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;
|
|
2180
|
-
if (s !== "px" && !p && (r = a(e, t, i, "px")), _ = e.getCTM &&
|
|
2180
|
+
if (s !== "px" && !p && (r = a(e, t, i, "px")), _ = e.getCTM && wr(e), (m || s === "%") && (Ae[t] || ~t.indexOf("adius")))
|
|
2181
2181
|
return f = _ ? e.getBBox()[l ? "width" : "height"] : e[h], V(m ? r / f * u : r / 100 * f);
|
|
2182
2182
|
if (o[l ? "width" : "height"] = u + (p ? s : n), d = n !== "rem" && ~t.indexOf("adius") || n === "em" && e.appendChild && !c ? e : e.parentNode, _ && (d = (e.ownerSVGElement || {}).parentNode), (!d || d === Se || !d.appendChild) && (d = Se.body), g = d._gsap, g && m && g.width && l && g.time === oe.time && !g.uncache)
|
|
2183
2183
|
return V(r / g.width * u);
|
|
@@ -2185,18 +2185,18 @@ var rn, Se, nt, zi, Ge, sn, $i, js = function() {
|
|
|
2185
2185
|
var y = e.style[t];
|
|
2186
2186
|
e.style[t] = u + n, f = e[h], y ? e.style[t] = y : Ke(e, t);
|
|
2187
2187
|
} else
|
|
2188
|
-
(m || s === "%") && !
|
|
2188
|
+
(m || s === "%") && !aa[ge(d, "display")] && (o.position = ge(e, "position")), d === e && (o.position = "static"), d.appendChild(Ge), f = Ge[h], d.removeChild(Ge), o.position = "absolute";
|
|
2189
2189
|
return l && m && (g = He(d), g.time = oe.time, g.width = d[h]), V(p ? f * r / u : f && r ? u / f * r : 0);
|
|
2190
2190
|
}, Ce = function(e, t, i, n) {
|
|
2191
2191
|
var r;
|
|
2192
|
-
return zi || bi(), t in xe && t !== "transform" && (t = xe[t], ~t.indexOf(",") && (t = t.split(",")[0])), Ae[t] && t !== "transform" ? (r = Tt(e, n), r = t !== "transformOrigin" ? r[t] : r.svg ? r.origin : jt(ge(e, ne)) + " " + r.zOrigin + "px") : (r = e.style[t], (!r || r === "auto" || n || ~(r + "").indexOf("calc(")) && (r = Ht[t] && Ht[t](e, t, i) || ge(e, t) ||
|
|
2193
|
-
},
|
|
2192
|
+
return zi || bi(), t in xe && t !== "transform" && (t = xe[t], ~t.indexOf(",") && (t = t.split(",")[0])), Ae[t] && t !== "transform" ? (r = Tt(e, n), r = t !== "transformOrigin" ? r[t] : r.svg ? r.origin : jt(ge(e, ne)) + " " + r.zOrigin + "px") : (r = e.style[t], (!r || r === "auto" || n || ~(r + "").indexOf("calc(")) && (r = Ht[t] && Ht[t](e, t, i) || ge(e, t) || zn(e, t) || (t === "opacity" ? 1 : 0))), i && !~(r + "").trim().indexOf(" ") ? Le(e, t, r, i) + i : r;
|
|
2193
|
+
}, oa = 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);
|
|
2196
2196
|
s && s !== i ? (t = r, i = s) : t === "borderColor" && (i = ge(e, "borderTopColor"));
|
|
2197
2197
|
}
|
|
2198
|
-
var o = new ie(this._pt, e.style, t, 0, 1,
|
|
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 : Ke(e, t)), h = [i, n],
|
|
2198
|
+
var o = new ie(this._pt, e.style, t, 0, 1, fr), l = 0, c = 0, h, u, p, m, f, d, g, _, y, x, E, b;
|
|
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 : Ke(e, t)), h = [i, n], rr(h), i = h[0], n = h[1], p = i.match(Je) || [], b = n.match(Je) || [], b.length) {
|
|
2200
2200
|
for (; u = Je.exec(n); )
|
|
2201
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, E = d.substr((m + "").length), g.charAt(1) === "=" && (g = it(m, g) + E), _ = parseFloat(g), x = g.substr((_ + "").length), l = Je.lastIndex - x.length, x || (x = x || he.units[t] || E, l === n.length && (n += x, o.e += x)), E !== x && (m = Le(e, t, d, x) || 0), o._pt = {
|
|
2202
2202
|
_next: o._pt,
|
|
@@ -2208,18 +2208,18 @@ var rn, Se, nt, zi, Ge, sn, $i, js = function() {
|
|
|
2208
2208
|
});
|
|
2209
2209
|
o.c = l < n.length ? n.substring(l, n.length) : "";
|
|
2210
2210
|
} else
|
|
2211
|
-
o.r = t === "display" && n === "none" ?
|
|
2212
|
-
return
|
|
2211
|
+
o.r = t === "display" && n === "none" ? yr : _r;
|
|
2212
|
+
return In.test(n) && (o.e = 0), this._pt = o, o;
|
|
2213
2213
|
}, un = {
|
|
2214
2214
|
top: "0%",
|
|
2215
2215
|
bottom: "100%",
|
|
2216
2216
|
left: "0%",
|
|
2217
2217
|
right: "100%",
|
|
2218
2218
|
center: "50%"
|
|
2219
|
-
},
|
|
2219
|
+
}, la = function(e) {
|
|
2220
2220
|
var t = e.split(" "), i = t[0], n = t[1] || "50%";
|
|
2221
2221
|
return (i === "top" || i === "bottom" || n === "left" || n === "right") && (e = i, i = n, n = e), t[0] = un[i] || i, t[1] = un[n] || n, t.join(" ");
|
|
2222
|
-
},
|
|
2222
|
+
}, ha = function(e, t) {
|
|
2223
2223
|
if (t.tween && t.tween._time === t.tween._dur) {
|
|
2224
2224
|
var i = t.t, n = i.style, r = t.u, s = i._gsap, o, l, c;
|
|
2225
2225
|
if (r === "all" || r === !0)
|
|
@@ -2227,12 +2227,12 @@ var rn, Se, nt, zi, Ge, sn, $i, js = function() {
|
|
|
2227
2227
|
else
|
|
2228
2228
|
for (r = r.split(","), c = r.length; --c > -1; )
|
|
2229
2229
|
o = r[c], Ae[o] && (l = 1, o = o === "transformOrigin" ? ne : $), Ke(i, o);
|
|
2230
|
-
l && (Ke(i, $), s && (s.svg && i.removeAttribute("transform"), n.scale = n.rotate = n.translate = "none", Tt(i, 1), s.uncache = 1,
|
|
2230
|
+
l && (Ke(i, $), s && (s.svg && i.removeAttribute("transform"), n.scale = n.rotate = n.translate = "none", Tt(i, 1), s.uncache = 1, xr(n)));
|
|
2231
2231
|
}
|
|
2232
2232
|
}, Ht = {
|
|
2233
2233
|
clearProps: function(e, t, i, n, r) {
|
|
2234
2234
|
if (r.data !== "isFromStart") {
|
|
2235
|
-
var s = e._pt = new ie(e._pt, t, i, 0, 0,
|
|
2235
|
+
var s = e._pt = new ie(e._pt, t, i, 0, 0, ha);
|
|
2236
2236
|
return s.u = n, s.pr = -10, s.tween = r, e._props.push(i), 1;
|
|
2237
2237
|
}
|
|
2238
2238
|
}
|
|
@@ -2299,48 +2299,48 @@ var rn, Se, nt, zi, Ge, sn, $i, js = function() {
|
|
|
2299
2299
|
return 1;
|
|
2300
2300
|
}
|
|
2301
2301
|
*/
|
|
2302
|
-
}, At = [1, 0, 0, 1, 0, 0],
|
|
2302
|
+
}, At = [1, 0, 0, 1, 0, 0], Cr = {}, Pr = function(e) {
|
|
2303
2303
|
return e === "matrix(1, 0, 0, 1, 0, 0)" || e === "none" || !e;
|
|
2304
2304
|
}, dn = function(e) {
|
|
2305
2305
|
var t = ge(e, $);
|
|
2306
|
-
return
|
|
2306
|
+
return Pr(t) ? At : t.substr(7).match(On).map(V);
|
|
2307
2307
|
}, Gi = function(e, t) {
|
|
2308
2308
|
var i = e._gsap || He(e), n = e.style, r = dn(e), s, o, l, c;
|
|
2309
2309
|
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" ? At : r) : (r === At && !e.offsetParent && e !== nt && !i.svg && (l = n.display, n.display = "block", s = e.parentNode, (!s || !e.offsetParent && !e.getBoundingClientRect().width) && (c = 1, o = e.nextElementSibling, nt.appendChild(e)), r = dn(e), l ? n.display = l : Ke(e, "display"), c && (o ? s.insertBefore(e, o) : s ? s.appendChild(e) : nt.removeChild(e))), t && r.length > 6 ? [r[0], r[1], r[4], r[5], r[12], r[13]] : r);
|
|
2310
2310
|
}, Ei = function(e, t, i, n, r, s) {
|
|
2311
2311
|
var o = e._gsap, l = r || Gi(e, !0), c = o.xOrigin || 0, h = o.yOrigin || 0, u = o.xOffset || 0, p = o.yOffset || 0, m = l[0], f = l[1], d = l[2], g = l[3], _ = l[4], y = l[5], x = t.split(" "), E = parseFloat(x[0]) || 0, b = parseFloat(x[1]) || 0, C, v, P, w;
|
|
2312
|
-
i ? l !== At && (v = m * g - f * d) && (P = E * (g / v) + b * (-d / v) + (d * y - g * _) / v, w = E * (-f / v) + b * (m / v) - (m * y - f * _) / v, E = P, b = w) : (C =
|
|
2312
|
+
i ? l !== At && (v = m * g - f * d) && (P = E * (g / v) + b * (-d / v) + (d * y - g * _) / v, w = E * (-f / v) + b * (m / v) - (m * y - f * _) / v, E = P, b = w) : (C = vr(e), E = C.x + (~x[0].indexOf("%") ? E / 100 * C.width : E), b = C.y + (~(x[1] || x[0]).indexOf("%") ? b / 100 * C.height : b)), n || n !== !1 && o.smooth ? (_ = E - c, y = b - h, o.xOffset = u + (_ * m + y * d) - _, o.yOffset = p + (_ * f + y * g) - y) : o.xOffset = o.yOffset = 0, o.xOrigin = E, o.yOrigin = b, o.smooth = !!n, o.origin = t, o.originIsAbsolute = !!i, e.style[ne] = "0px 0px", s && (De(s, o, "xOrigin", c, E), De(s, o, "yOrigin", h, b), De(s, o, "xOffset", u, o.xOffset), De(s, o, "yOffset", p, o.yOffset)), e.setAttribute("data-svg-origin", E + " " + b);
|
|
2313
2313
|
}, Tt = function(e, t) {
|
|
2314
|
-
var i = e._gsap || new
|
|
2314
|
+
var i = e._gsap || new lr(e);
|
|
2315
2315
|
if ("x" in i && !t && !i.uncache)
|
|
2316
2316
|
return i;
|
|
2317
2317
|
var n = e.style, r = i.scaleX < 0, s = "px", o = "deg", l = getComputedStyle(e), c = ge(e, ne) || "0", h, u, p, m, f, d, g, _, y, x, E, b, C, v, P, w, T, M, A, R, O, B, F, U, Q, ut, dt, pt, Ue, ji, ve, Fe;
|
|
2318
|
-
return h = u = p = d = g = _ = y = x = E = 0, m = f = 1, i.svg = !!(e.getCTM &&
|
|
2318
|
+
return h = u = p = d = g = _ = y = x = E = 0, m = f = 1, i.svg = !!(e.getCTM && wr(e)), l.translate && ((l.translate !== "none" || l.scale !== "none" || l.rotate !== "none") && (n[$] = (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[$] !== "none" ? l[$] : "")), n.scale = n.rotate = n.translate = "none"), v = Gi(e, i.svg), i.svg && (i.uncache ? (Q = e.getBBox(), c = i.xOrigin - Q.x + "px " + (i.yOrigin - Q.y) + "px", U = "") : U = !t && e.getAttribute("data-svg-origin"), Ei(e, U || c, !!U || i.originIsAbsolute, i.smooth !== !1, v)), b = i.xOrigin || 0, C = i.yOrigin || 0, v !== At && (M = v[0], A = v[1], R = v[2], O = v[3], h = B = v[4], u = F = v[5], v.length === 6 ? (m = Math.sqrt(M * M + A * A), f = Math.sqrt(O * O + R * R), d = M || A ? We(A, M) * $e : 0, y = R || O ? We(R, O) * $e + d : 0, y && (f *= Math.abs(Math.cos(y * rt))), i.svg && (h -= b - (b * M + C * R), u -= C - (b * A + C * O))) : (Fe = v[6], ji = v[7], dt = v[8], pt = v[9], Ue = v[10], ve = v[11], h = v[12], u = v[13], p = v[14], P = We(Fe, Ue), g = P * $e, P && (w = Math.cos(-P), T = Math.sin(-P), U = B * w + dt * T, Q = F * w + pt * T, ut = Fe * w + Ue * T, dt = B * -T + dt * w, pt = F * -T + pt * w, Ue = Fe * -T + Ue * w, ve = ji * -T + ve * w, B = U, F = Q, Fe = ut), P = We(-R, Ue), _ = P * $e, P && (w = Math.cos(-P), T = Math.sin(-P), U = M * w - dt * T, Q = A * w - pt * T, ut = R * w - Ue * T, ve = O * T + ve * w, M = U, A = Q, R = ut), P = We(A, M), d = P * $e, P && (w = Math.cos(P), T = Math.sin(P), U = M * w + A * T, Q = B * w + F * T, A = A * w - M * T, F = F * w - B * T, M = U, B = Q), g && Math.abs(g) + Math.abs(d) > 359.9 && (g = d = 0, _ = 180 - _), m = V(Math.sqrt(M * M + A * A + R * R)), f = V(Math.sqrt(F * F + Fe * Fe)), P = We(B, F), y = Math.abs(P) > 2e-4 ? P * $e : 0, E = ve ? 1 / (ve < 0 ? -ve : ve) : 0), i.svg && (U = e.getAttribute("transform"), i.forceCSS = e.setAttribute("transform", "") || !Pr(ge(e, $)), U && e.setAttribute("transform", U))), Math.abs(y) > 90 && Math.abs(y) < 270 && (r ? (m *= -1, y += d <= 0 ? 180 : -180, d += d <= 0 ? 180 : -180) : (f *= -1, y += y <= 0 ? 180 : -180)), t = t || i.uncache, i.x = h - ((i.xPercent = h && (!t && i.xPercent || (Math.round(e.offsetWidth / 2) === Math.round(-h) ? -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 = p + s, i.scaleX = V(m), i.scaleY = V(f), i.rotation = V(d) + o, i.rotationX = V(g) + o, i.rotationY = V(_) + o, i.skewX = y + o, i.skewY = x + o, i.transformPerspective = E + s, (i.zOrigin = parseFloat(c.split(" ")[2]) || !t && i.zOrigin || 0) && (n[ne] = jt(c)), i.xOffset = i.yOffset = 0, i.force3D = he.force3D, i.renderTransform = i.svg ? ua : Er ? Ar : ca, i.uncache = 0, i;
|
|
2319
2319
|
}, jt = function(e) {
|
|
2320
2320
|
return (e = e.split(" "))[0] + " " + e[1];
|
|
2321
2321
|
}, ni = function(e, t, i) {
|
|
2322
2322
|
var n = X(t);
|
|
2323
2323
|
return V(parseFloat(t) + parseFloat(Le(e, "x", i + "px", n))) + n;
|
|
2324
|
-
},
|
|
2325
|
-
t.z = "0px", t.rotationY = t.rotationX = "0deg", t.force3D = 0,
|
|
2326
|
-
}, Ne = "0deg", ft = "0px", ze = ") ",
|
|
2324
|
+
}, ca = function(e, t) {
|
|
2325
|
+
t.z = "0px", t.rotationY = t.rotationX = "0deg", t.force3D = 0, Ar(e, t);
|
|
2326
|
+
}, Ne = "0deg", ft = "0px", ze = ") ", Ar = function(e, t) {
|
|
2327
2327
|
var i = t || this, n = i.xPercent, r = i.yPercent, s = i.x, o = i.y, l = i.z, c = i.rotation, h = i.rotationY, u = i.rotationX, p = i.skewX, m = i.skewY, f = i.scaleX, d = i.scaleY, g = i.transformPerspective, _ = i.force3D, y = i.target, x = i.zOrigin, E = "", b = _ === "auto" && e && e !== 1 || _ === !0;
|
|
2328
2328
|
if (x && (u !== Ne || h !== Ne)) {
|
|
2329
2329
|
var C = parseFloat(h) * rt, v = Math.sin(C), P = Math.cos(C), w;
|
|
2330
2330
|
C = parseFloat(u) * rt, w = Math.cos(C), s = ni(y, s, v * w * -x), o = ni(y, o, -Math.sin(C) * -x), l = ni(y, l, P * w * -x + x);
|
|
2331
2331
|
}
|
|
2332
2332
|
g !== ft && (E += "perspective(" + g + ze), (n || r) && (E += "translate(" + n + "%, " + r + "%) "), (b || s !== ft || o !== ft || l !== ft) && (E += l !== ft || b ? "translate3d(" + s + ", " + o + ", " + l + ") " : "translate(" + s + ", " + o + ze), c !== Ne && (E += "rotate(" + c + ze), h !== Ne && (E += "rotateY(" + h + ze), u !== Ne && (E += "rotateX(" + u + ze), (p !== Ne || m !== Ne) && (E += "skew(" + p + ", " + m + ze), (f !== 1 || d !== 1) && (E += "scale(" + f + ", " + d + ze), y.style[$] = E || "translate(0, 0)";
|
|
2333
|
-
},
|
|
2333
|
+
}, ua = 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), E = parseFloat(o), b, C, v, P, w;
|
|
2335
2335
|
l = parseFloat(l), c = parseFloat(c), h = parseFloat(h), h && (h = parseFloat(h), c += h, l += h), l || c ? (l *= rt, c *= rt, b = Math.cos(l) * u, C = Math.sin(l) * u, v = Math.sin(l - c) * -p, P = Math.cos(l - c) * p, c && (h *= rt, w = Math.tan(c - h), w = Math.sqrt(1 + w * w), v *= w, P *= w, h && (w = Math.tan(h), w = Math.sqrt(1 + w * w), b *= w, C *= w)), b = V(b), C = V(C), v = V(v), P = V(P)) : (b = u, P = p, C = v = 0), (x && !~(s + "").indexOf("px") || E && !~(o + "").indexOf("px")) && (x = Le(m, "x", s, "px"), E = Le(m, "y", o, "px")), (f || d || g || _) && (x = V(x + f - (f * b + d * v) + g), E = V(E + d - (f * C + d * P) + _)), (n || r) && (w = m.getBBox(), x = V(x + n / 100 * w.width), E = V(E + r / 100 * w.height)), w = "matrix(" + b + "," + C + "," + v + "," + P + "," + x + "," + E + ")", m.setAttribute("transform", w), y && (m.style[$] = w);
|
|
2336
|
-
},
|
|
2336
|
+
}, da = 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
|
-
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,
|
|
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, Xs), p.e = h, p.u = "deg", e._props.push(i), p;
|
|
2339
2339
|
}, pn = function(e, t) {
|
|
2340
2340
|
for (var i in t)
|
|
2341
2341
|
e[i] = t[i];
|
|
2342
2342
|
return e;
|
|
2343
|
-
},
|
|
2343
|
+
}, pa = function(e, t, i) {
|
|
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 = Tt(i, 1), Ke(i, $), i.setAttribute("transform", c)) : (c = getComputedStyle(i)[$], s[$] = t, o = Tt(i, 1), s[$] = c);
|
|
2346
2346
|
for (l in Ae)
|
|
@@ -2362,7 +2362,7 @@ te("padding,margin,Width,Radius", function(a, e) {
|
|
|
2362
2362
|
}), o.init(l, m, u);
|
|
2363
2363
|
};
|
|
2364
2364
|
});
|
|
2365
|
-
var
|
|
2365
|
+
var Tr = {
|
|
2366
2366
|
name: "css",
|
|
2367
2367
|
register: bi,
|
|
2368
2368
|
targetTest: function(e) {
|
|
@@ -2370,9 +2370,9 @@ var Ar = {
|
|
|
2370
2370
|
},
|
|
2371
2371
|
init: function(e, t, i, n, r) {
|
|
2372
2372
|
var s = this._props, o = e.style, l = i.vars.startAt, c, h, u, p, m, f, d, g, _, y, x, E, b, C, v, P;
|
|
2373
|
-
zi || bi(), this.styles = this.styles ||
|
|
2373
|
+
zi || bi(), this.styles = this.styles || br(e), P = this.styles.props, this.tween = i;
|
|
2374
2374
|
for (d in t)
|
|
2375
|
-
if (d !== "autoRound" && (h = t[d], !(ae[d] &&
|
|
2375
|
+
if (d !== "autoRound" && (h = t[d], !(ae[d] && hr(d, t, i, n, e, r)))) {
|
|
2376
2376
|
if (m = typeof h, f = Ht[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) && (v = 1);
|
|
2378
2378
|
else if (d.substr(0, 2) === "--")
|
|
@@ -2382,13 +2382,13 @@ var Ar = {
|
|
|
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)), E || (b = e._gsap, b.renderTransform && !t.parseTransform || Tt(e, t.parseTransform), C = t.smoothOrigin !== !1 && b.smooth, E = this._pt = new ie(this._pt, o, $, 0, 1, b.renderTransform, b, 0, -1), E.dep = 1), d === "scale")
|
|
2383
2383
|
this._pt = new ie(this._pt, b, "scaleY", b.scaleY, (y ? it(b.scaleY, y + u) : u) - b.scaleY || 0, yi), this._pt.u = 0, s.push("scaleY", d), d += "X";
|
|
2384
2384
|
else if (d === "transformOrigin") {
|
|
2385
|
-
P.push(ne, 0, o[ne]), h =
|
|
2385
|
+
P.push(ne, 0, o[ne]), h = la(h), b.svg ? Ei(e, h, 0, C, 0, this) : (_ = parseFloat(h.split(" ")[2]) || 0, _ !== b.zOrigin && De(this, b, "zOrigin", b.zOrigin, _), De(this, o, d, jt(c), jt(h)));
|
|
2386
2386
|
continue;
|
|
2387
2387
|
} else if (d === "svgOrigin") {
|
|
2388
2388
|
Ei(e, h, 1, C, 0, this);
|
|
2389
2389
|
continue;
|
|
2390
|
-
} else if (d in
|
|
2391
|
-
|
|
2390
|
+
} else if (d in Cr) {
|
|
2391
|
+
da(this, b, d, p, y ? it(p, y + h) : h);
|
|
2392
2392
|
continue;
|
|
2393
2393
|
} else if (d === "smoothOrigin") {
|
|
2394
2394
|
De(this, b, "smooth", b.smooth, h);
|
|
@@ -2397,14 +2397,14 @@ var Ar = {
|
|
|
2397
2397
|
b[d] = h;
|
|
2398
2398
|
continue;
|
|
2399
2399
|
} else if (d === "transform") {
|
|
2400
|
-
|
|
2400
|
+
pa(this, h, e);
|
|
2401
2401
|
continue;
|
|
2402
2402
|
}
|
|
2403
2403
|
} else d in o || (d = ct(d) || d);
|
|
2404
|
-
if (x || (u || u === 0) && (p || p === 0) && !
|
|
2405
|
-
g = (c + "").substr((p + "").length), u || (u = 0), _ = X(h) || (d in he.units ? he.units[d] : g), g !== _ && (p = Le(e, d, c, _)), this._pt = new ie(this._pt, x ? b : o, d, p, (y ? it(p, y + u) : u) - p, !x && (_ === "px" || d === "zIndex") && t.autoRound !== !1 ?
|
|
2404
|
+
if (x || (u || u === 0) && (p || p === 0) && !Ks.test(h) && d in o)
|
|
2405
|
+
g = (c + "").substr((p + "").length), u || (u = 0), _ = X(h) || (d in he.units ? he.units[d] : g), g !== _ && (p = Le(e, d, c, _)), this._pt = new ie(this._pt, x ? b : o, d, p, (y ? it(p, y + u) : u) - p, !x && (_ === "px" || d === "zIndex") && t.autoRound !== !1 ? qs : yi), this._pt.u = _ || 0, g !== _ && _ !== "%" && (this._pt.b = c, this._pt.r = Ws);
|
|
2406
2406
|
else if (d in o)
|
|
2407
|
-
|
|
2407
|
+
oa.call(this, e, d, c, y ? y + h : h);
|
|
2408
2408
|
else if (d in e)
|
|
2409
2409
|
this.add(e, d, c || e[d], y ? y + h : h, n, r);
|
|
2410
2410
|
else if (d !== "parseTransform") {
|
|
@@ -2414,7 +2414,7 @@ var Ar = {
|
|
|
2414
2414
|
x || (d in o ? P.push(d, 0, o[d]) : typeof e[d] == "function" ? P.push(d, 2, e[d]()) : P.push(d, 1, c || e[d])), s.push(d);
|
|
2415
2415
|
}
|
|
2416
2416
|
}
|
|
2417
|
-
v &&
|
|
2417
|
+
v && mr(this);
|
|
2418
2418
|
},
|
|
2419
2419
|
render: function(e, t) {
|
|
2420
2420
|
if (t.tween._time || !$i())
|
|
@@ -2427,7 +2427,7 @@ var Ar = {
|
|
|
2427
2427
|
aliases: xe,
|
|
2428
2428
|
getSetter: function(e, t, i) {
|
|
2429
2429
|
var n = xe[t];
|
|
2430
|
-
return n && n.indexOf(",") < 0 && (t = n), t in Ae && t !== ne && (e._gsap.x || Ce(e, "x")) ? i && sn === i ? t === "scale" ?
|
|
2430
|
+
return n && n.indexOf(",") < 0 && (t = n), t in Ae && t !== ne && (e._gsap.x || Ce(e, "x")) ? i && sn === i ? t === "scale" ? ta : ea : (sn = i || {}) && (t === "scale" ? ia : na) : e.style && !Ai(e.style[t]) ? Qs : ~t.indexOf("-") ? Js : Fi(e, t);
|
|
2431
2431
|
},
|
|
2432
2432
|
core: {
|
|
2433
2433
|
_removeProperty: Ke,
|
|
@@ -2435,13 +2435,13 @@ var Ar = {
|
|
|
2435
2435
|
}
|
|
2436
2436
|
};
|
|
2437
2437
|
re.utils.checkPrefix = ct;
|
|
2438
|
-
re.core.getStyleSaver =
|
|
2438
|
+
re.core.getStyleSaver = br;
|
|
2439
2439
|
(function(a, e, t, i) {
|
|
2440
2440
|
var n = te(a + "," + e + "," + t, function(r) {
|
|
2441
2441
|
Ae[r] = 1;
|
|
2442
2442
|
});
|
|
2443
2443
|
te(e, function(r) {
|
|
2444
|
-
he.units[r] = "deg",
|
|
2444
|
+
he.units[r] = "deg", Cr[r] = 1;
|
|
2445
2445
|
}), xe[n[13]] = a + "," + e, te(i, function(r) {
|
|
2446
2446
|
var s = r.split(":");
|
|
2447
2447
|
xe[s[1]] = n[s[0]];
|
|
@@ -2450,8 +2450,8 @@ re.core.getStyleSaver = xr;
|
|
|
2450
2450
|
te("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective", function(a) {
|
|
2451
2451
|
he.units[a] = "px";
|
|
2452
2452
|
});
|
|
2453
|
-
re.registerPlugin(
|
|
2454
|
-
var _t = re.registerPlugin(
|
|
2453
|
+
re.registerPlugin(Tr);
|
|
2454
|
+
var _t = re.registerPlugin(Tr) || re;
|
|
2455
2455
|
_t.core.Tween;
|
|
2456
2456
|
class be {
|
|
2457
2457
|
constructor(e, t, i, n, r = "div") {
|
|
@@ -2679,7 +2679,7 @@ class be {
|
|
|
2679
2679
|
this.listen(!1), this.parent.children.splice(this.parent.children.indexOf(this), 1), this.parent.controllers.splice(this.parent.controllers.indexOf(this), 1), this.parent.$children.removeChild(this.domElement);
|
|
2680
2680
|
}
|
|
2681
2681
|
}
|
|
2682
|
-
class
|
|
2682
|
+
class fa extends be {
|
|
2683
2683
|
constructor(e, t, i) {
|
|
2684
2684
|
super(e, t, i, "lil-boolean", "label"), this.$input = document.createElement("input"), this.$input.setAttribute("type", "checkbox"), this.$input.setAttribute("aria-labelledby", this.$name.id), this.$widget.appendChild(this.$input), this.$input.addEventListener("change", () => {
|
|
2685
2685
|
this.setValue(this.$input.checked), this._callOnFinishChange();
|
|
@@ -2693,7 +2693,7 @@ function vi(a) {
|
|
|
2693
2693
|
let e, t;
|
|
2694
2694
|
return (e = a.match(/(#|0x)?([a-f0-9]{6})/i)) ? t = e[2] : (e = a.match(/rgb\(\s*(\d*)\s*,\s*(\d*)\s*,\s*(\d*)\s*\)/)) ? t = parseInt(e[1]).toString(16).padStart(2, 0) + parseInt(e[2]).toString(16).padStart(2, 0) + parseInt(e[3]).toString(16).padStart(2, 0) : (e = a.match(/^#?([a-f0-9])([a-f0-9])([a-f0-9])$/i)) && (t = e[1] + e[1] + e[2] + e[2] + e[3] + e[3]), t ? "#" + t : !1;
|
|
2695
2695
|
}
|
|
2696
|
-
const
|
|
2696
|
+
const ma = {
|
|
2697
2697
|
isPrimitive: !0,
|
|
2698
2698
|
match: (a) => typeof a == "string",
|
|
2699
2699
|
fromHexString: vi,
|
|
@@ -2703,7 +2703,7 @@ const fa = {
|
|
|
2703
2703
|
match: (a) => typeof a == "number",
|
|
2704
2704
|
fromHexString: (a) => parseInt(a.substring(1), 16),
|
|
2705
2705
|
toHexString: (a) => "#" + a.toString(16).padStart(6, 0)
|
|
2706
|
-
},
|
|
2706
|
+
}, ga = {
|
|
2707
2707
|
isPrimitive: !1,
|
|
2708
2708
|
match: (a) => Array.isArray(a) || ArrayBuffer.isView(a),
|
|
2709
2709
|
fromHexString(a, e, t = 1) {
|
|
@@ -2715,7 +2715,7 @@ const fa = {
|
|
|
2715
2715
|
const n = a * i << 16 ^ e * i << 8 ^ t * i << 0;
|
|
2716
2716
|
return St.toHexString(n);
|
|
2717
2717
|
}
|
|
2718
|
-
},
|
|
2718
|
+
}, _a = {
|
|
2719
2719
|
isPrimitive: !1,
|
|
2720
2720
|
match: (a) => Object(a) === a,
|
|
2721
2721
|
fromHexString(a, e, t = 1) {
|
|
@@ -2727,13 +2727,13 @@ const fa = {
|
|
|
2727
2727
|
const n = a * i << 16 ^ e * i << 8 ^ t * i << 0;
|
|
2728
2728
|
return St.toHexString(n);
|
|
2729
2729
|
}
|
|
2730
|
-
},
|
|
2731
|
-
function
|
|
2732
|
-
return
|
|
2730
|
+
}, ya = [ma, St, ga, _a];
|
|
2731
|
+
function xa(a) {
|
|
2732
|
+
return ya.find((e) => e.match(a));
|
|
2733
2733
|
}
|
|
2734
|
-
class
|
|
2734
|
+
class ba extends be {
|
|
2735
2735
|
constructor(e, t, i, n) {
|
|
2736
|
-
super(e, t, i, "lil-color"), this.$input = document.createElement("input"), this.$input.setAttribute("type", "color"), this.$input.setAttribute("tabindex", -1), this.$input.setAttribute("aria-labelledby", this.$name.id), this.$text = document.createElement("input"), this.$text.setAttribute("type", "text"), this.$text.setAttribute("spellcheck", "false"), this.$text.setAttribute("aria-labelledby", this.$name.id), this.$display = document.createElement("div"), this.$display.classList.add("lil-display"), this.$display.appendChild(this.$input), this.$widget.appendChild(this.$display), this.$widget.appendChild(this.$text), this._format =
|
|
2736
|
+
super(e, t, i, "lil-color"), this.$input = document.createElement("input"), this.$input.setAttribute("type", "color"), this.$input.setAttribute("tabindex", -1), this.$input.setAttribute("aria-labelledby", this.$name.id), this.$text = document.createElement("input"), this.$text.setAttribute("type", "text"), this.$text.setAttribute("spellcheck", "false"), this.$text.setAttribute("aria-labelledby", this.$name.id), this.$display = document.createElement("div"), this.$display.classList.add("lil-display"), this.$display.appendChild(this.$input), this.$widget.appendChild(this.$display), this.$widget.appendChild(this.$text), this._format = xa(this.initialValue), this._rgbScale = n, this._initialValueHexString = this.save(), this._textFocused = !1, this.$input.addEventListener("input", () => {
|
|
2737
2737
|
this._setValueFromHexString(this.$input.value);
|
|
2738
2738
|
}), this.$input.addEventListener("blur", () => {
|
|
2739
2739
|
this._callOnFinishChange();
|
|
@@ -2774,7 +2774,7 @@ class ri extends be {
|
|
|
2774
2774
|
}, { passive: !0 }), this.$disable = this.$button;
|
|
2775
2775
|
}
|
|
2776
2776
|
}
|
|
2777
|
-
class
|
|
2777
|
+
class Ea extends be {
|
|
2778
2778
|
constructor(e, t, i, n, r, s) {
|
|
2779
2779
|
super(e, t, i, "lil-number"), this._initInput(), this.min(n), this.max(r);
|
|
2780
2780
|
const o = s !== void 0;
|
|
@@ -2909,7 +2909,7 @@ class ba extends be {
|
|
|
2909
2909
|
return this._max !== void 0;
|
|
2910
2910
|
}
|
|
2911
2911
|
}
|
|
2912
|
-
class
|
|
2912
|
+
class va extends be {
|
|
2913
2913
|
constructor(e, t, i, n) {
|
|
2914
2914
|
super(e, t, i, "lil-option"), this.$select = document.createElement("select"), this.$select.setAttribute("aria-labelledby", this.$name.id), this.$display = document.createElement("div"), this.$display.classList.add("lil-display"), this.$select.addEventListener("change", () => {
|
|
2915
2915
|
this.setValue(this._values[this.$select.selectedIndex]), this._callOnFinishChange();
|
|
@@ -2930,7 +2930,7 @@ class Ea extends be {
|
|
|
2930
2930
|
return this.$select.selectedIndex = t, this.$display.textContent = t === -1 ? e : this._names[t], this;
|
|
2931
2931
|
}
|
|
2932
2932
|
}
|
|
2933
|
-
class
|
|
2933
|
+
class wa extends be {
|
|
2934
2934
|
constructor(e, t, i) {
|
|
2935
2935
|
super(e, t, i, "lil-string"), this.$input = document.createElement("input"), this.$input.setAttribute("type", "text"), this.$input.setAttribute("spellcheck", "false"), this.$input.setAttribute("aria-labelledby", this.$name.id), this.$input.addEventListener("input", () => {
|
|
2936
2936
|
this.setValue(this.$input.value);
|
|
@@ -2944,7 +2944,7 @@ class va extends be {
|
|
|
2944
2944
|
return this.$input.value = this.getValue(), this;
|
|
2945
2945
|
}
|
|
2946
2946
|
}
|
|
2947
|
-
var
|
|
2947
|
+
var Ca = `.lil-gui {
|
|
2948
2948
|
font-family: var(--font-family);
|
|
2949
2949
|
font-size: var(--font-size);
|
|
2950
2950
|
line-height: 1;
|
|
@@ -3366,7 +3366,7 @@ var wa = `.lil-gui {
|
|
|
3366
3366
|
font-family: "lil-gui";
|
|
3367
3367
|
src: url("data:application/font-woff2;charset=utf-8;base64,d09GMgABAAAAAALkAAsAAAAABtQAAAKVAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHFQGYACDMgqBBIEbATYCJAMUCwwABCAFhAoHgQQbHAbIDiUFEYVARAAAYQTVWNmz9MxhEgodq49wYRUFKE8GWNiUBxI2LBRaVnc51U83Gmhs0Q7JXWMiz5eteLwrKwuxHO8VFxUX9UpZBs6pa5ABRwHA+t3UxUnH20EvVknRerzQgX6xC/GH6ZUvTcAjAv122dF28OTqCXrPuyaDER30YBA1xnkVutDDo4oCi71Ca7rrV9xS8dZHbPHefsuwIyCpmT7j+MnjAH5X3984UZoFFuJ0yiZ4XEJFxjagEBeqs+e1iyK8Xf/nOuwF+vVK0ur765+vf7txotUi0m3N0m/84RGSrBCNrh8Ee5GjODjF4gnWP+dJrH/Lk9k4oT6d+gr6g/wssA2j64JJGP6cmx554vUZnpZfn6ZfX2bMwPPrlANsB86/DiHjhl0OP+c87+gaJo/gY084s3HoYL/ZkWHTRfBXvvoHnnkHvngKun4KBE/ede7tvq3/vQOxDXB1/fdNz6XbPdcr0Vhpojj9dG+owuSKFsslCi1tgEjirjXdwMiov2EioadxmqTHUCIwo8NgQaeIasAi0fTYSPTbSmwbMOFduyh9wvBrESGY0MtgRjtgQR8Q1bRPohn2UoCRZf9wyYANMXFeJTysqAe0I4mrherOekFdKMrYvJjLvOIUM9SuwYB5DVZUwwVjJJOaUnZCmcEkIZZrKqNvRGRMvmFZsmhP4VMKCSXBhSqUBxgMS7h0cZvEd71AWkEhGWaeMFcNnpqyJkyXgYL7PQ1MoSq0wDAkRtJIijkZSmqYTiSImfLiSWXIZwhRh3Rug2X0kk1Dgj+Iu43u5p98ghopcpSo0Uyc8SnjlYX59WUeaMoDqmVD2TOWD9a4pCRAzf2ECgwGcrHjPOWY9bNxq/OL3I/QjwEAAAA=") format("woff2");
|
|
3368
3368
|
}`;
|
|
3369
|
-
function
|
|
3369
|
+
function Pa(a) {
|
|
3370
3370
|
const e = document.createElement("style");
|
|
3371
3371
|
e.innerHTML = a;
|
|
3372
3372
|
const t = document.querySelector("head link[rel=stylesheet], head style");
|
|
@@ -3422,7 +3422,7 @@ class Vi {
|
|
|
3422
3422
|
this.parent.children.push(this), this.parent.folders.push(this), this.parent.$children.appendChild(this.domElement);
|
|
3423
3423
|
return;
|
|
3424
3424
|
}
|
|
3425
|
-
this.domElement.classList.add("lil-root"), l && this.domElement.classList.add("lil-allow-touch-styles"), !fn && o && (Ca
|
|
3425
|
+
this.domElement.classList.add("lil-root"), l && this.domElement.classList.add("lil-allow-touch-styles"), !fn && o && (Pa(Ca), fn = !0), i ? i.appendChild(this.domElement) : t && (this.domElement.classList.add("lil-auto-place", "autoPlace"), document.body.appendChild(this.domElement)), n && this.domElement.style.setProperty("--width", n + "px"), this._closeFolders = s;
|
|
3426
3426
|
}
|
|
3427
3427
|
/**
|
|
3428
3428
|
* Adds a controller to the GUI, inferring controller type using the `typeof` operator.
|
|
@@ -3441,15 +3441,15 @@ class Vi {
|
|
|
3441
3441
|
*/
|
|
3442
3442
|
add(e, t, i, n, r) {
|
|
3443
3443
|
if (Object(i) === i)
|
|
3444
|
-
return new
|
|
3444
|
+
return new va(this, e, t, i);
|
|
3445
3445
|
const s = e[t];
|
|
3446
3446
|
switch (typeof s) {
|
|
3447
3447
|
case "number":
|
|
3448
|
-
return new
|
|
3448
|
+
return new Ea(this, e, t, i, n, r);
|
|
3449
3449
|
case "boolean":
|
|
3450
|
-
return new
|
|
3450
|
+
return new fa(this, e, t);
|
|
3451
3451
|
case "string":
|
|
3452
|
-
return new
|
|
3452
|
+
return new wa(this, e, t);
|
|
3453
3453
|
case "function":
|
|
3454
3454
|
return new ri(this, e, t);
|
|
3455
3455
|
}
|
|
@@ -3478,7 +3478,7 @@ class Vi {
|
|
|
3478
3478
|
* @returns {Controller}
|
|
3479
3479
|
*/
|
|
3480
3480
|
addColor(e, t, i = 1) {
|
|
3481
|
-
return new
|
|
3481
|
+
return new ba(this, e, t, i);
|
|
3482
3482
|
}
|
|
3483
3483
|
/**
|
|
3484
3484
|
* Adds a folder to the GUI, which is just another GUI. This method returns
|
|
@@ -3705,11 +3705,11 @@ class Vi {
|
|
|
3705
3705
|
}), e;
|
|
3706
3706
|
}
|
|
3707
3707
|
}
|
|
3708
|
-
function
|
|
3708
|
+
function Aa(a) {
|
|
3709
3709
|
return a;
|
|
3710
3710
|
}
|
|
3711
|
-
function
|
|
3712
|
-
if (a == null) return
|
|
3711
|
+
function Ta(a) {
|
|
3712
|
+
if (a == null) return Aa;
|
|
3713
3713
|
var e, t, i = a.scale[0], n = a.scale[1], r = a.translate[0], s = a.translate[1];
|
|
3714
3714
|
return function(o, l) {
|
|
3715
3715
|
l || (e = t = 0);
|
|
@@ -3718,25 +3718,25 @@ function Aa(a) {
|
|
|
3718
3718
|
return u;
|
|
3719
3719
|
};
|
|
3720
3720
|
}
|
|
3721
|
-
function
|
|
3721
|
+
function Sa(a, e) {
|
|
3722
3722
|
for (var t, i = a.length, n = i - e; n < --i; ) t = a[n], a[n++] = a[i], a[i] = t;
|
|
3723
3723
|
}
|
|
3724
|
-
function
|
|
3724
|
+
function Da(a, e) {
|
|
3725
3725
|
return typeof e == "string" && (e = a.objects[e]), e.type === "GeometryCollection" ? { type: "FeatureCollection", features: e.geometries.map(function(t) {
|
|
3726
3726
|
return mn(a, t);
|
|
3727
3727
|
}) } : mn(a, e);
|
|
3728
3728
|
}
|
|
3729
3729
|
function mn(a, e) {
|
|
3730
|
-
var t = e.id, i = e.bbox, n = e.properties == null ? {} : e.properties, r =
|
|
3730
|
+
var t = e.id, i = e.bbox, n = e.properties == null ? {} : e.properties, r = Ma(a, e);
|
|
3731
3731
|
return t == null && i == null ? { type: "Feature", properties: n, geometry: r } : i == null ? { type: "Feature", id: t, properties: n, geometry: r } : { type: "Feature", id: t, bbox: i, properties: n, geometry: r };
|
|
3732
3732
|
}
|
|
3733
|
-
function
|
|
3734
|
-
var t =
|
|
3733
|
+
function Ma(a, e) {
|
|
3734
|
+
var t = Ta(a.transform), i = a.arcs;
|
|
3735
3735
|
function n(h, u) {
|
|
3736
3736
|
u.length && u.pop();
|
|
3737
3737
|
for (var p = i[h < 0 ? ~h : h], m = 0, f = p.length; m < f; ++m)
|
|
3738
3738
|
u.push(t(p[m], m));
|
|
3739
|
-
h < 0 &&
|
|
3739
|
+
h < 0 && Sa(u, f);
|
|
3740
3740
|
}
|
|
3741
3741
|
function r(h) {
|
|
3742
3742
|
return t(h);
|
|
@@ -3782,7 +3782,7 @@ function Da(a, e) {
|
|
|
3782
3782
|
}
|
|
3783
3783
|
return c(e);
|
|
3784
3784
|
}
|
|
3785
|
-
const
|
|
3785
|
+
const Sr = [
|
|
3786
3786
|
// Major economies and populous nations
|
|
3787
3787
|
{ id: "156", code: "CN", name: "China", population: 1412, gdpPerCapita: 21476, co2Emissions: 8, lifeExpectancy: 78.2, humanDevIndex: 0.768, internetUsers: 73, renewableEnergy: 15, urbanPopulation: 64.7, healthExpenditure: 5.4, educationExpenditure: 3.6, forestArea: 23.3, accessElectricity: 100 },
|
|
3788
3788
|
{ id: "356", code: "IN", name: "India", population: 1408, gdpPerCapita: 8379, co2Emissions: 1.9, lifeExpectancy: 70.8, humanDevIndex: 0.633, internetUsers: 47, renewableEnergy: 38, urbanPopulation: 35.9, healthExpenditure: 3, educationExpenditure: 4.5, forestArea: 24.3, accessElectricity: 99.6 },
|
|
@@ -3881,7 +3881,7 @@ const Tr = [
|
|
|
3881
3881
|
{ id: "858", code: "UY", name: "Uruguay", population: 3.5, gdpPerCapita: 25041, co2Emissions: 2, lifeExpectancy: 78.4, humanDevIndex: 0.83, internetUsers: 87, renewableEnergy: 55, urbanPopulation: 95.6, healthExpenditure: 9.3, educationExpenditure: 5, forestArea: 10.5, accessElectricity: 100 },
|
|
3882
3882
|
{ id: "188", code: "CR", name: "Costa Rica", population: 5, gdpPerCapita: 23101, co2Emissions: 1.5, lifeExpectancy: 80.8, humanDevIndex: 0.809, internetUsers: 81, renewableEnergy: 73, urbanPopulation: 81.4, healthExpenditure: 7.3, educationExpenditure: 6.7, forestArea: 59, accessElectricity: 100 },
|
|
3883
3883
|
{ id: "591", code: "PA", name: "Panama", population: 4.4, gdpPerCapita: 35317, co2Emissions: 2.5, lifeExpectancy: 79.2, humanDevIndex: 0.805, internetUsers: 68, renewableEnergy: 35, urbanPopulation: 68.4, healthExpenditure: 7.3, educationExpenditure: 3.2, forestArea: 62.1, accessElectricity: 95 }
|
|
3884
|
-
],
|
|
3884
|
+
], Ra = [
|
|
3885
3885
|
{
|
|
3886
3886
|
id: "humanDevIndex",
|
|
3887
3887
|
name: "Human Development Index",
|
|
@@ -3983,11 +3983,11 @@ const Tr = [
|
|
|
3983
3983
|
format: (a) => `${a.toFixed(0)}%`
|
|
3984
3984
|
}
|
|
3985
3985
|
];
|
|
3986
|
-
function
|
|
3986
|
+
function Oa(a, e) {
|
|
3987
3987
|
const [t, i] = a.domain;
|
|
3988
3988
|
return Math.max(0, Math.min(1, (e - t) / (i - t)));
|
|
3989
3989
|
}
|
|
3990
|
-
const
|
|
3990
|
+
const Ia = {
|
|
3991
3991
|
// North America
|
|
3992
3992
|
US: "840",
|
|
3993
3993
|
USA: "840",
|
|
@@ -4188,9 +4188,9 @@ const Oa = {
|
|
|
4188
4188
|
};
|
|
4189
4189
|
function gn(a) {
|
|
4190
4190
|
const e = a.toUpperCase().trim();
|
|
4191
|
-
return /^\d{1,3}$/.test(a) ? a.padStart(3, "0") :
|
|
4191
|
+
return /^\d{1,3}$/.test(a) ? a.padStart(3, "0") : Ia[e] || a;
|
|
4192
4192
|
}
|
|
4193
|
-
function
|
|
4193
|
+
function La(a) {
|
|
4194
4194
|
const e = {};
|
|
4195
4195
|
return a instanceof Map ? a.forEach((t, i) => {
|
|
4196
4196
|
e[gn(i)] = t;
|
|
@@ -4199,14 +4199,14 @@ function Ia(a) {
|
|
|
4199
4199
|
}), e;
|
|
4200
4200
|
}
|
|
4201
4201
|
const Ot = 2048, It = 1024;
|
|
4202
|
-
class
|
|
4202
|
+
class ka {
|
|
4203
4203
|
canvas;
|
|
4204
4204
|
ctx;
|
|
4205
4205
|
countries = [];
|
|
4206
4206
|
loaded = !1;
|
|
4207
4207
|
statsMap;
|
|
4208
4208
|
constructor() {
|
|
4209
|
-
this.canvas = document.createElement("canvas"), this.canvas.width = Ot, this.canvas.height = It, this.ctx = this.canvas.getContext("2d"), this.statsMap = /* @__PURE__ */ new Map(),
|
|
4209
|
+
this.canvas = document.createElement("canvas"), this.canvas.width = Ot, this.canvas.height = It, this.ctx = this.canvas.getContext("2d"), this.statsMap = /* @__PURE__ */ new Map(), Sr.forEach((e) => {
|
|
4210
4210
|
this.statsMap.set(e.id, e);
|
|
4211
4211
|
}), this.loadCountries();
|
|
4212
4212
|
}
|
|
@@ -4214,7 +4214,7 @@ class La {
|
|
|
4214
4214
|
try {
|
|
4215
4215
|
const t = await (await fetch(
|
|
4216
4216
|
"https://cdn.jsdelivr.net/npm/world-atlas@2/countries-110m.json"
|
|
4217
|
-
)).json(), i =
|
|
4217
|
+
)).json(), i = Da(t, t.objects.countries);
|
|
4218
4218
|
this.countries = i.features, this.loaded = !0, console.log(`Loaded ${this.countries.length} country boundaries`);
|
|
4219
4219
|
} catch (e) {
|
|
4220
4220
|
console.error("Failed to load country boundaries:", e);
|
|
@@ -4234,7 +4234,7 @@ class La {
|
|
|
4234
4234
|
return this.ctx.fillStyle = "#1a3a5c", this.ctx.fillRect(0, 0, Ot, It), this.loaded ? (this.countries.forEach((t) => {
|
|
4235
4235
|
const i = this.statsMap.get(t.id);
|
|
4236
4236
|
if (i) {
|
|
4237
|
-
const n = e.accessor(i), r =
|
|
4237
|
+
const n = e.accessor(i), r = Oa(e, n), s = this.interpolateColor(e.colorScale, r);
|
|
4238
4238
|
this.ctx.fillStyle = s;
|
|
4239
4239
|
} else
|
|
4240
4240
|
this.ctx.fillStyle = "#2a2a2a";
|
|
@@ -4303,7 +4303,7 @@ class La {
|
|
|
4303
4303
|
renderCustomTexture(e, t, i) {
|
|
4304
4304
|
if (this.ctx.fillStyle = "#1a3a5c", this.ctx.fillRect(0, 0, Ot, It), !this.loaded)
|
|
4305
4305
|
return this.canvas;
|
|
4306
|
-
const n =
|
|
4306
|
+
const n = La(e);
|
|
4307
4307
|
return this.countries.forEach((r) => {
|
|
4308
4308
|
const s = n[r.id];
|
|
4309
4309
|
if (s !== void 0) {
|
|
@@ -4332,122 +4332,123 @@ class La {
|
|
|
4332
4332
|
return this.canvas.toDataURL("image/png");
|
|
4333
4333
|
}
|
|
4334
4334
|
}
|
|
4335
|
-
function
|
|
4335
|
+
function Dr(a) {
|
|
4336
4336
|
return a === "%" ? (e) => `${e.toFixed(1)}%` : a === "$" ? (e) => `$${e.toLocaleString()}` : a === "years" ? (e) => `${e.toFixed(1)} yrs` : a.includes("per capita") || a.includes("per 100") || a.includes("per 1000") ? (e) => `${e.toFixed(1)}` : a === "% GDP" || a === "% of GDP" ? (e) => `${e.toFixed(1)}%` : a === "" || a === "index" ? (e) => e.toFixed(3) : (e) => {
|
|
4337
4337
|
const t = Number.isInteger(e) ? e.toLocaleString() : e.toFixed(1);
|
|
4338
4338
|
return a ? `${t} ${a}` : t;
|
|
4339
4339
|
};
|
|
4340
4340
|
}
|
|
4341
|
-
function
|
|
4342
|
-
return (t ??
|
|
4343
|
-
}
|
|
4344
|
-
|
|
4345
|
-
|
|
4346
|
-
|
|
4347
|
-
|
|
4348
|
-
|
|
4349
|
-
|
|
4350
|
-
|
|
4351
|
-
|
|
4352
|
-
|
|
4353
|
-
|
|
4354
|
-
|
|
4355
|
-
|
|
4356
|
-
|
|
4357
|
-
|
|
4358
|
-
|
|
4359
|
-
|
|
4360
|
-
|
|
4361
|
-
|
|
4362
|
-
|
|
4363
|
-
|
|
4364
|
-
|
|
4365
|
-
|
|
4366
|
-
|
|
4367
|
-
|
|
4368
|
-
border-radius: 8px;
|
|
4369
|
-
padding: 12px 16px;
|
|
4370
|
-
min-width: 180px;
|
|
4371
|
-
font-family: system-ui, sans-serif;
|
|
4372
|
-
color: #ddd;
|
|
4373
|
-
opacity: 0;
|
|
4374
|
-
transform: translateY(10px);
|
|
4375
|
-
transition: opacity 0.3s ease, transform 0.3s ease;
|
|
4376
|
-
pointer-events: none;
|
|
4377
|
-
z-index: 100;
|
|
4378
|
-
}
|
|
4341
|
+
function yo(a, e, t) {
|
|
4342
|
+
return (t ?? Dr(e))(a);
|
|
4343
|
+
}
|
|
4344
|
+
let _n = !1;
|
|
4345
|
+
function Ua() {
|
|
4346
|
+
if (_n) return;
|
|
4347
|
+
_n = !0;
|
|
4348
|
+
const a = document.createElement("style");
|
|
4349
|
+
a.setAttribute("data-gralobe-legend", "true"), a.textContent = `
|
|
4350
|
+
.gralobe-legend {
|
|
4351
|
+
position: absolute;
|
|
4352
|
+
bottom: 15px;
|
|
4353
|
+
left: 15px;
|
|
4354
|
+
background: rgba(0, 10, 20, 0.92);
|
|
4355
|
+
border: 1px solid rgba(100, 150, 200, 0.3);
|
|
4356
|
+
border-radius: 8px;
|
|
4357
|
+
padding: 10px 14px;
|
|
4358
|
+
min-width: 160px;
|
|
4359
|
+
max-width: 280px;
|
|
4360
|
+
font-family: system-ui, -apple-system, sans-serif;
|
|
4361
|
+
color: #ddd;
|
|
4362
|
+
opacity: 0;
|
|
4363
|
+
transform: translateY(8px);
|
|
4364
|
+
transition: opacity 0.3s ease, transform 0.3s ease;
|
|
4365
|
+
pointer-events: none;
|
|
4366
|
+
z-index: 50;
|
|
4367
|
+
}
|
|
4379
4368
|
|
|
4380
|
-
|
|
4381
|
-
|
|
4382
|
-
|
|
4383
|
-
|
|
4384
|
-
|
|
4369
|
+
.gralobe-legend.visible {
|
|
4370
|
+
opacity: 1;
|
|
4371
|
+
transform: translateY(0);
|
|
4372
|
+
pointer-events: auto;
|
|
4373
|
+
}
|
|
4385
4374
|
|
|
4386
|
-
|
|
4387
|
-
|
|
4388
|
-
|
|
4389
|
-
|
|
4390
|
-
|
|
4391
|
-
|
|
4375
|
+
.gralobe-legend-title {
|
|
4376
|
+
font-size: 13px;
|
|
4377
|
+
font-weight: 600;
|
|
4378
|
+
margin-bottom: 6px;
|
|
4379
|
+
color: #4af;
|
|
4380
|
+
line-height: 1.3;
|
|
4381
|
+
}
|
|
4392
4382
|
|
|
4393
|
-
|
|
4394
|
-
|
|
4395
|
-
|
|
4396
|
-
|
|
4397
|
-
|
|
4383
|
+
.gralobe-legend-gradient {
|
|
4384
|
+
height: 10px;
|
|
4385
|
+
border-radius: 3px;
|
|
4386
|
+
margin-bottom: 4px;
|
|
4387
|
+
}
|
|
4398
4388
|
|
|
4399
|
-
|
|
4400
|
-
|
|
4401
|
-
|
|
4402
|
-
|
|
4403
|
-
|
|
4404
|
-
|
|
4405
|
-
|
|
4389
|
+
.gralobe-legend-labels {
|
|
4390
|
+
display: flex;
|
|
4391
|
+
justify-content: space-between;
|
|
4392
|
+
font-size: 10px;
|
|
4393
|
+
color: #aaa;
|
|
4394
|
+
margin-bottom: 6px;
|
|
4395
|
+
}
|
|
4406
4396
|
|
|
4407
|
-
|
|
4408
|
-
|
|
4409
|
-
|
|
4410
|
-
|
|
4411
|
-
|
|
4397
|
+
.gralobe-legend-description {
|
|
4398
|
+
font-size: 10px;
|
|
4399
|
+
color: #777;
|
|
4400
|
+
font-style: italic;
|
|
4401
|
+
line-height: 1.4;
|
|
4402
|
+
}
|
|
4412
4403
|
|
|
4413
|
-
|
|
4414
|
-
|
|
4415
|
-
|
|
4416
|
-
|
|
4417
|
-
|
|
4418
|
-
|
|
4419
|
-
|
|
4420
|
-
|
|
4404
|
+
.gralobe-legend-hint {
|
|
4405
|
+
font-size: 9px;
|
|
4406
|
+
color: #555;
|
|
4407
|
+
margin-bottom: 6px;
|
|
4408
|
+
padding-bottom: 5px;
|
|
4409
|
+
border-bottom: 1px solid rgba(100, 150, 200, 0.15);
|
|
4410
|
+
}
|
|
4411
|
+
`, document.head.appendChild(a);
|
|
4412
|
+
}
|
|
4413
|
+
class Fa {
|
|
4414
|
+
element;
|
|
4415
|
+
parentContainer;
|
|
4416
|
+
visible = !1;
|
|
4417
|
+
constructor(e) {
|
|
4418
|
+
Ua(), this.parentContainer = e, getComputedStyle(e).position === "static" && (e.style.position = "relative"), this.element = document.createElement("div"), this.element.className = "gralobe-legend", this.element.setAttribute("data-testid", "globe-legend"), this.element.innerHTML = `
|
|
4419
|
+
<div class="gralobe-legend-hint">G: toggle view · F: fullscreen</div>
|
|
4420
|
+
<div class="gralobe-legend-title" data-testid="legend-title"></div>
|
|
4421
|
+
<div class="gralobe-legend-gradient"></div>
|
|
4422
|
+
<div class="gralobe-legend-labels">
|
|
4423
|
+
<span class="gralobe-legend-min" data-testid="legend-min"></span>
|
|
4424
|
+
<span class="gralobe-legend-max" data-testid="legend-max"></span>
|
|
4425
|
+
</div>
|
|
4426
|
+
<div class="gralobe-legend-description" data-testid="legend-description"></div>
|
|
4427
|
+
`, e.appendChild(this.element);
|
|
4421
4428
|
}
|
|
4422
|
-
/**
|
|
4423
|
-
* Show the legend with the given statistic definition.
|
|
4424
|
-
*
|
|
4425
|
-
* If the statistic doesn't have a format function (e.g., when loaded from JSON),
|
|
4426
|
-
* a default formatter is created based on the unit.
|
|
4427
|
-
*/
|
|
4428
4429
|
show(e) {
|
|
4429
|
-
const t = this.
|
|
4430
|
+
const t = this.element.querySelector(".gralobe-legend-title"), i = this.element.querySelector(".gralobe-legend-gradient"), n = this.element.querySelector(".gralobe-legend-min"), r = this.element.querySelector(".gralobe-legend-max"), s = this.element.querySelector(".gralobe-legend-description");
|
|
4430
4431
|
t.textContent = e.name, s.textContent = e.description;
|
|
4431
4432
|
const [o, l, c] = e.colorScale;
|
|
4432
4433
|
i.style.background = `linear-gradient(to right, ${o}, ${l}, ${c})`;
|
|
4433
|
-
const h = e.format ??
|
|
4434
|
-
n.textContent = h(e.domain[0]), r.textContent = h(e.domain[1]), this.
|
|
4434
|
+
const h = e.format ?? Dr(e.unit);
|
|
4435
|
+
n.textContent = h(e.domain[0]), r.textContent = h(e.domain[1]), this.element.classList.add("visible"), this.visible = !0;
|
|
4435
4436
|
}
|
|
4436
4437
|
hide() {
|
|
4437
|
-
this.
|
|
4438
|
+
this.element.classList.remove("visible"), this.visible = !1;
|
|
4438
4439
|
}
|
|
4439
4440
|
isVisible() {
|
|
4440
4441
|
return this.visible;
|
|
4441
4442
|
}
|
|
4442
|
-
|
|
4443
|
-
return this.
|
|
4443
|
+
getElement() {
|
|
4444
|
+
return this.element;
|
|
4444
4445
|
}
|
|
4445
4446
|
dispose() {
|
|
4446
|
-
this.
|
|
4447
|
+
this.element.remove();
|
|
4447
4448
|
}
|
|
4448
4449
|
}
|
|
4449
|
-
var
|
|
4450
|
-
function
|
|
4450
|
+
var Na = { trailer: 59 };
|
|
4451
|
+
function Mr(a = 256) {
|
|
4451
4452
|
let e = 0, t = new Uint8Array(a);
|
|
4452
4453
|
return { get buffer() {
|
|
4453
4454
|
return t.buffer;
|
|
@@ -4474,8 +4475,8 @@ function Dr(a = 256) {
|
|
|
4474
4475
|
t = new Uint8Array(n), e > 0 && t.set(o.subarray(0, e), 0);
|
|
4475
4476
|
}
|
|
4476
4477
|
}
|
|
4477
|
-
var si = 12,
|
|
4478
|
-
function
|
|
4478
|
+
var si = 12, yn = 5003, za = [0, 1, 3, 7, 15, 31, 63, 127, 255, 511, 1023, 2047, 4095, 8191, 16383, 32767, 65535];
|
|
4479
|
+
function $a(a, e, t, i, n = Mr(512), r = new Uint8Array(256), s = new Int32Array(yn), o = new Int32Array(yn)) {
|
|
4479
4480
|
let l = s.length, c = Math.max(2, i);
|
|
4480
4481
|
r.fill(0), o.fill(0), s.fill(-1);
|
|
4481
4482
|
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, E = 0, b = t[0], C = 0;
|
|
@@ -4498,21 +4499,21 @@ function Na(a, e, t, i, n = Dr(512), r = new Uint8Array(256), s = new Int32Array
|
|
|
4498
4499
|
}
|
|
4499
4500
|
return P(b), P(y), n.writeByte(0), n.bytesView();
|
|
4500
4501
|
function P(w) {
|
|
4501
|
-
for (h &=
|
|
4502
|
+
for (h &= za[u], u > 0 ? h |= w << u : h = w, u += d; u >= 8; ) r[E++] = h & 255, E >= 254 && (n.writeByte(E), n.writeBytesView(r, 0, E), E = 0), h >>= 8, u -= 8;
|
|
4502
4503
|
if ((x > g || f) && (f ? (d = m, g = (1 << d) - 1, f = !1) : (++d, g = d === si ? 1 << d : (1 << d) - 1)), w == y) {
|
|
4503
4504
|
for (; u > 0; ) r[E++] = h & 255, E >= 254 && (n.writeByte(E), n.writeBytesView(r, 0, E), E = 0), h >>= 8, u -= 8;
|
|
4504
4505
|
E > 0 && (n.writeByte(E), n.writeBytesView(r, 0, E), E = 0);
|
|
4505
4506
|
}
|
|
4506
4507
|
}
|
|
4507
4508
|
}
|
|
4508
|
-
var
|
|
4509
|
-
function
|
|
4509
|
+
var Ba = $a;
|
|
4510
|
+
function Rr(a, e, t) {
|
|
4510
4511
|
return a << 8 & 63488 | e << 2 & 992 | t >> 3;
|
|
4511
4512
|
}
|
|
4512
|
-
function
|
|
4513
|
+
function Or(a, e, t, i) {
|
|
4513
4514
|
return a >> 4 | e & 240 | (t & 240) << 4 | (i & 240) << 8;
|
|
4514
4515
|
}
|
|
4515
|
-
function
|
|
4516
|
+
function Ir(a, e, t) {
|
|
4516
4517
|
return a >> 4 << 8 | e & 240 | t >> 4;
|
|
4517
4518
|
}
|
|
4518
4519
|
function Lt(a, e, t) {
|
|
@@ -4521,7 +4522,7 @@ function Lt(a, e, t) {
|
|
|
4521
4522
|
function Nt(a) {
|
|
4522
4523
|
return a * a;
|
|
4523
4524
|
}
|
|
4524
|
-
function
|
|
4525
|
+
function xn(a, e, t) {
|
|
4525
4526
|
var i = 0, n = 1e100;
|
|
4526
4527
|
let r = a[e], s = r.cnt;
|
|
4527
4528
|
r.ac;
|
|
@@ -4538,27 +4539,27 @@ function yn(a, e, t) {
|
|
|
4538
4539
|
function ai() {
|
|
4539
4540
|
return { ac: 0, rc: 0, gc: 0, bc: 0, cnt: 0, nn: 0, fw: 0, bk: 0, tm: 0, mtm: 0, err: 0 };
|
|
4540
4541
|
}
|
|
4541
|
-
function
|
|
4542
|
+
function Ga(a, e) {
|
|
4542
4543
|
let t = e === "rgb444" ? 4096 : 65536, i = new Array(t), n = a.length;
|
|
4543
4544
|
if (e === "rgba4444") for (let r = 0; r < n; ++r) {
|
|
4544
|
-
let s = a[r], o = s >> 24 & 255, l = s >> 16 & 255, c = s >> 8 & 255, h = s & 255, u =
|
|
4545
|
+
let s = a[r], o = s >> 24 & 255, l = s >> 16 & 255, c = s >> 8 & 255, h = s & 255, u = Or(h, c, l, o), p = u in i ? i[u] : i[u] = ai();
|
|
4545
4546
|
p.rc += h, p.gc += c, p.bc += l, p.ac += o, p.cnt++;
|
|
4546
4547
|
}
|
|
4547
4548
|
else if (e === "rgb444") for (let r = 0; r < n; ++r) {
|
|
4548
|
-
let s = a[r], o = s >> 16 & 255, l = s >> 8 & 255, c = s & 255, h =
|
|
4549
|
+
let s = a[r], o = s >> 16 & 255, l = s >> 8 & 255, c = s & 255, h = Ir(c, l, o), u = h in i ? i[h] : i[h] = ai();
|
|
4549
4550
|
u.rc += c, u.gc += l, u.bc += o, u.cnt++;
|
|
4550
4551
|
}
|
|
4551
4552
|
else for (let r = 0; r < n; ++r) {
|
|
4552
|
-
let s = a[r], o = s >> 16 & 255, l = s >> 8 & 255, c = s & 255, h =
|
|
4553
|
+
let s = a[r], o = s >> 16 & 255, l = s >> 8 & 255, c = s & 255, h = Rr(c, l, o), u = h in i ? i[h] : i[h] = ai();
|
|
4553
4554
|
u.rc += c, u.gc += l, u.bc += o, u.cnt++;
|
|
4554
4555
|
}
|
|
4555
4556
|
return i;
|
|
4556
4557
|
}
|
|
4557
|
-
function
|
|
4558
|
+
function Va(a, e, t = {}) {
|
|
4558
4559
|
let { format: i = "rgb565", clearAlpha: n = !0, clearAlphaColor: r = 0, clearAlphaThreshold: s = 0, oneBitAlpha: o = !1 } = t;
|
|
4559
4560
|
if (!a || !a.buffer) throw new Error("quantize() expected RGBA Uint8Array data");
|
|
4560
4561
|
if (!(a instanceof Uint8Array) && !(a instanceof Uint8ClampedArray)) throw new Error("quantize() expected RGBA Uint8Array data");
|
|
4561
|
-
let l = new Uint32Array(a.buffer), c = t.useSqrt !== !1, h = i === "rgba4444", u =
|
|
4562
|
+
let l = new Uint32Array(a.buffer), c = t.useSqrt !== !1, h = i === "rgba4444", u = Ga(l, i), p = u.length, m = p - 1, f = new Uint32Array(p + 1);
|
|
4562
4563
|
for (var d = 0, g = 0; g < p; ++g) {
|
|
4563
4564
|
let O = u[g];
|
|
4564
4565
|
if (O != null) {
|
|
@@ -4571,7 +4572,7 @@ function Ba(a, e, t = {}) {
|
|
|
4571
4572
|
c && (u[g].cnt = Math.sqrt(u[g].cnt));
|
|
4572
4573
|
var y, x, E;
|
|
4573
4574
|
for (g = 0; g < d; ++g) {
|
|
4574
|
-
|
|
4575
|
+
xn(u, g);
|
|
4575
4576
|
var b = u[g].err;
|
|
4576
4577
|
for (x = ++f[0]; x > 1 && (E = x >> 1, !(u[y = f[E]].err <= b)); x = E) f[x] = y;
|
|
4577
4578
|
f[x] = g;
|
|
@@ -4581,7 +4582,7 @@ function Ba(a, e, t = {}) {
|
|
|
4581
4582
|
for (var v; ; ) {
|
|
4582
4583
|
var P = f[1];
|
|
4583
4584
|
if (v = u[P], v.tm >= v.mtm && u[v.nn].mtm <= v.tm) break;
|
|
4584
|
-
v.mtm == m ? P = f[1] = f[f[0]--] : (
|
|
4585
|
+
v.mtm == m ? P = f[1] = f[f[0]--] : (xn(u, P), v.tm = g);
|
|
4585
4586
|
var b = u[P].err;
|
|
4586
4587
|
for (x = 1; (E = x + x) <= f[0] && (E < f[0] && u[f[E]].err > u[f[E + 1]].err && E++, !(b <= u[y = f[E]].err)); x = E) f[x] = y;
|
|
4587
4588
|
f[x] = P;
|
|
@@ -4595,36 +4596,36 @@ function Ba(a, e, t = {}) {
|
|
|
4595
4596
|
let O = Lt(Math.round(u[g].rc), 0, 255), B = Lt(Math.round(u[g].gc), 0, 255), F = Lt(Math.round(u[g].bc), 0, 255), U = 255;
|
|
4596
4597
|
h && (U = Lt(Math.round(u[g].ac), 0, 255), o && (U = U <= (typeof o == "number" ? o : 127) ? 0 : 255), n && U <= s && (O = B = F = r, U = 0));
|
|
4597
4598
|
let Q = h ? [O, B, F, U] : [O, B, F];
|
|
4598
|
-
if (
|
|
4599
|
+
if (Ha(A, Q) || A.push(Q), (g = u[g].fw) == 0) break;
|
|
4599
4600
|
}
|
|
4600
4601
|
return A;
|
|
4601
4602
|
}
|
|
4602
|
-
function
|
|
4603
|
+
function Ha(a, e) {
|
|
4603
4604
|
for (let t = 0; t < a.length; t++) {
|
|
4604
4605
|
let i = a[t], n = i[0] === e[0] && i[1] === e[1] && i[2] === e[2], r = i.length >= 4 && e.length >= 4 ? i[3] === e[3] : !0;
|
|
4605
4606
|
if (n && r) return !0;
|
|
4606
4607
|
}
|
|
4607
4608
|
return !1;
|
|
4608
4609
|
}
|
|
4609
|
-
function
|
|
4610
|
+
function ja(a, e, t = "rgb565") {
|
|
4610
4611
|
if (!a || !a.buffer) throw new Error("quantize() expected RGBA Uint8Array data");
|
|
4611
4612
|
if (!(a instanceof Uint8Array) && !(a instanceof Uint8ClampedArray)) throw new Error("quantize() expected RGBA Uint8Array data");
|
|
4612
4613
|
if (e.length > 256) throw new Error("applyPalette() only works with 256 colors or less");
|
|
4613
4614
|
let i = new Uint32Array(a.buffer), n = i.length, r = t === "rgb444" ? 4096 : 65536, s = new Uint8Array(n), o = new Array(r);
|
|
4614
4615
|
if (t === "rgba4444") for (let l = 0; l < n; l++) {
|
|
4615
|
-
let c = i[l], h = c >> 24 & 255, u = c >> 16 & 255, p = c >> 8 & 255, m = c & 255, f =
|
|
4616
|
+
let c = i[l], h = c >> 24 & 255, u = c >> 16 & 255, p = c >> 8 & 255, m = c & 255, f = Or(m, p, u, h), d = f in o ? o[f] : o[f] = Ya(m, p, u, h, e);
|
|
4616
4617
|
s[l] = d;
|
|
4617
4618
|
}
|
|
4618
4619
|
else {
|
|
4619
|
-
let l = t === "rgb444" ?
|
|
4620
|
+
let l = t === "rgb444" ? Ir : Rr;
|
|
4620
4621
|
for (let c = 0; c < n; c++) {
|
|
4621
|
-
let h = i[c], u = h >> 16 & 255, p = h >> 8 & 255, m = h & 255, f = l(m, p, u), d = f in o ? o[f] : o[f] =
|
|
4622
|
+
let h = i[c], u = h >> 16 & 255, p = h >> 8 & 255, m = h & 255, f = l(m, p, u), d = f in o ? o[f] : o[f] = Za(m, p, u, e);
|
|
4622
4623
|
s[c] = d;
|
|
4623
4624
|
}
|
|
4624
4625
|
}
|
|
4625
4626
|
return s;
|
|
4626
4627
|
}
|
|
4627
|
-
function
|
|
4628
|
+
function Ya(a, e, t, i, n) {
|
|
4628
4629
|
let r = 0, s = 1e100;
|
|
4629
4630
|
for (let o = 0; o < n.length; o++) {
|
|
4630
4631
|
let l = n[o], c = l[3], h = Ve(c - i);
|
|
@@ -4638,7 +4639,7 @@ function Ha(a, e, t, i, n) {
|
|
|
4638
4639
|
}
|
|
4639
4640
|
return r;
|
|
4640
4641
|
}
|
|
4641
|
-
function
|
|
4642
|
+
function Za(a, e, t, i) {
|
|
4642
4643
|
let n = 0, r = 1e100;
|
|
4643
4644
|
for (let s = 0; s < i.length; s++) {
|
|
4644
4645
|
let o = i[s], l = o[0], c = Ve(l - a);
|
|
@@ -4653,12 +4654,12 @@ function ja(a, e, t, i) {
|
|
|
4653
4654
|
function Ve(a) {
|
|
4654
4655
|
return a * a;
|
|
4655
4656
|
}
|
|
4656
|
-
function
|
|
4657
|
-
let { initialCapacity: e = 4096, auto: t = !0 } = a, i =
|
|
4657
|
+
function Ka(a = {}) {
|
|
4658
|
+
let { initialCapacity: e = 4096, auto: t = !0 } = a, i = Mr(e), n = 5003, r = new Uint8Array(256), s = new Int32Array(n), o = new Int32Array(n), l = !1;
|
|
4658
4659
|
return { reset() {
|
|
4659
4660
|
i.reset(), l = !1;
|
|
4660
4661
|
}, finish() {
|
|
4661
|
-
i.writeByte(
|
|
4662
|
+
i.writeByte(Na.trailer);
|
|
4662
4663
|
}, bytes() {
|
|
4663
4664
|
return i.bytes();
|
|
4664
4665
|
}, bytesView() {
|
|
@@ -4671,55 +4672,55 @@ function Ya(a = {}) {
|
|
|
4671
4672
|
let { transparent: f = !1, transparentIndex: d = 0, delay: g = 0, palette: _ = null, repeat: y = 0, colorDepth: x = 8, dispose: E = -1 } = m, b = !1;
|
|
4672
4673
|
if (t ? l || (b = !0, c(), l = !0) : b = !!m.first, u = Math.max(0, Math.floor(u)), p = Math.max(0, Math.floor(p)), b) {
|
|
4673
4674
|
if (!_) throw new Error("First frame must include a { palette } option");
|
|
4674
|
-
|
|
4675
|
+
Wa(i, u, p, _, x), bn(i, _), y >= 0 && qa(i, y);
|
|
4675
4676
|
}
|
|
4676
4677
|
let C = Math.round(g / 10);
|
|
4677
|
-
|
|
4678
|
+
Xa(i, E, C, f, d);
|
|
4678
4679
|
let v = !!_ && !b;
|
|
4679
|
-
|
|
4680
|
+
Qa(i, u, p, v ? _ : null), v && bn(i, _), Ja(i, h, u, p, x, r, s, o);
|
|
4680
4681
|
} };
|
|
4681
4682
|
function c() {
|
|
4682
|
-
|
|
4683
|
+
Lr(i, "GIF89a");
|
|
4683
4684
|
}
|
|
4684
4685
|
}
|
|
4685
|
-
function
|
|
4686
|
+
function Xa(a, e, t, i, n) {
|
|
4686
4687
|
a.writeByte(33), a.writeByte(249), a.writeByte(4), n < 0 && (n = 0, i = !1);
|
|
4687
4688
|
var r, s;
|
|
4688
4689
|
i ? (r = 1, s = 2) : (r = 0, s = 0), e >= 0 && (s = e & 7), s <<= 2, a.writeByte(0 | s | 0 | r), Me(a, t), a.writeByte(n || 0), a.writeByte(0);
|
|
4689
4690
|
}
|
|
4690
|
-
function
|
|
4691
|
+
function Wa(a, e, t, i, n = 8) {
|
|
4691
4692
|
let r = 1, s = 0, o = Hi(i.length) - 1, l = r << 7 | n - 1 << 4 | s << 3 | o;
|
|
4692
4693
|
Me(a, e), Me(a, t), a.writeBytes([l, 0, 0]);
|
|
4693
4694
|
}
|
|
4694
|
-
function
|
|
4695
|
-
a.writeByte(33), a.writeByte(255), a.writeByte(11),
|
|
4695
|
+
function qa(a, e) {
|
|
4696
|
+
a.writeByte(33), a.writeByte(255), a.writeByte(11), Lr(a, "NETSCAPE2.0"), a.writeByte(3), a.writeByte(1), Me(a, e), a.writeByte(0);
|
|
4696
4697
|
}
|
|
4697
|
-
function
|
|
4698
|
+
function bn(a, e) {
|
|
4698
4699
|
let t = 1 << Hi(e.length);
|
|
4699
4700
|
for (let i = 0; i < t; i++) {
|
|
4700
4701
|
let n = [0, 0, 0];
|
|
4701
4702
|
i < e.length && (n = e[i]), a.writeByte(n[0]), a.writeByte(n[1]), a.writeByte(n[2]);
|
|
4702
4703
|
}
|
|
4703
4704
|
}
|
|
4704
|
-
function
|
|
4705
|
+
function Qa(a, e, t, i) {
|
|
4705
4706
|
if (a.writeByte(44), Me(a, 0), Me(a, 0), Me(a, e), Me(a, t), i) {
|
|
4706
4707
|
let n = 0, r = 0, s = Hi(i.length) - 1;
|
|
4707
4708
|
a.writeByte(128 | n | r | 0 | s);
|
|
4708
4709
|
} else a.writeByte(0);
|
|
4709
4710
|
}
|
|
4710
|
-
function
|
|
4711
|
-
|
|
4711
|
+
function Ja(a, e, t, i, n = 8, r, s, o) {
|
|
4712
|
+
Ba(t, i, e, n, a, r, s, o);
|
|
4712
4713
|
}
|
|
4713
4714
|
function Me(a, e) {
|
|
4714
4715
|
a.writeByte(e & 255), a.writeByte(e >> 8 & 255);
|
|
4715
4716
|
}
|
|
4716
|
-
function
|
|
4717
|
+
function Lr(a, e) {
|
|
4717
4718
|
for (var t = 0; t < e.length; t++) a.writeByte(e.charCodeAt(t));
|
|
4718
4719
|
}
|
|
4719
4720
|
function Hi(a) {
|
|
4720
4721
|
return Math.max(Math.ceil(Math.log2(a)), 1);
|
|
4721
4722
|
}
|
|
4722
|
-
class
|
|
4723
|
+
class eo {
|
|
4723
4724
|
renderer;
|
|
4724
4725
|
scene;
|
|
4725
4726
|
camera;
|
|
@@ -4908,9 +4909,9 @@ class Qa {
|
|
|
4908
4909
|
const { fps: t = 20, filename: i } = e, n = Math.round(1e3 / t);
|
|
4909
4910
|
console.log(`Generating GIF with ${this.frames.length} frames at ${t} fps...`);
|
|
4910
4911
|
try {
|
|
4911
|
-
const r = this.frames[0], s = r.width, o = r.height, l =
|
|
4912
|
+
const r = this.frames[0], s = r.width, o = r.height, l = Va(r.data, 256), c = Ka();
|
|
4912
4913
|
for (let f = 0; f < this.frames.length; f++) {
|
|
4913
|
-
const d = this.frames[f], g =
|
|
4914
|
+
const d = this.frames[f], g = ja(d.data, l);
|
|
4914
4915
|
c.writeFrame(g, s, o, {
|
|
4915
4916
|
palette: f === 0 ? l : void 0,
|
|
4916
4917
|
// Only first frame needs palette
|
|
@@ -4944,7 +4945,7 @@ class Qa {
|
|
|
4944
4945
|
i.href = e, i.download = t, i.style.display = "none", document.body.appendChild(i), i.click(), document.body.removeChild(i);
|
|
4945
4946
|
}
|
|
4946
4947
|
}
|
|
4947
|
-
class
|
|
4948
|
+
class to extends zr {
|
|
4948
4949
|
/**
|
|
4949
4950
|
* Constructs a new CSS2D object.
|
|
4950
4951
|
*
|
|
@@ -4961,8 +4962,8 @@ class Ja extends Nr {
|
|
|
4961
4962
|
return super.copy(e, t), this.element = e.element.cloneNode(!0), this.center = e.center, this;
|
|
4962
4963
|
}
|
|
4963
4964
|
}
|
|
4964
|
-
const qe = new se(),
|
|
4965
|
-
class
|
|
4965
|
+
const qe = new se(), En = new Tn(), vn = new Tn(), wn = new se(), Cn = new se();
|
|
4966
|
+
class io {
|
|
4966
4967
|
/**
|
|
4967
4968
|
* Constructs a new CSS2D renderer.
|
|
4968
4969
|
*
|
|
@@ -4980,7 +4981,7 @@ class eo {
|
|
|
4980
4981
|
height: n
|
|
4981
4982
|
};
|
|
4982
4983
|
}, this.render = function(f, d) {
|
|
4983
|
-
f.matrixWorldAutoUpdate === !0 && f.updateMatrixWorld(), d.parent === null && d.matrixWorldAutoUpdate === !0 && d.updateMatrixWorld(),
|
|
4984
|
+
f.matrixWorldAutoUpdate === !0 && f.updateMatrixWorld(), d.parent === null && d.matrixWorldAutoUpdate === !0 && d.updateMatrixWorld(), En.copy(d.matrixWorldInverse), vn.multiplyMatrices(d.projectionMatrix, En), h(f, f, d), this.sortObjects && m(f);
|
|
4984
4985
|
}, this.setSize = function(f, d) {
|
|
4985
4986
|
i = f, n = d, r = i / 2, s = n / 2, l.style.width = f + "px", l.style.height = d + "px";
|
|
4986
4987
|
};
|
|
@@ -4995,7 +4996,7 @@ class eo {
|
|
|
4995
4996
|
return;
|
|
4996
4997
|
}
|
|
4997
4998
|
if (f.isCSS2DObject) {
|
|
4998
|
-
qe.setFromMatrixPosition(f.matrixWorld), qe.applyMatrix4(
|
|
4999
|
+
qe.setFromMatrixPosition(f.matrixWorld), qe.applyMatrix4(vn);
|
|
4999
5000
|
const _ = qe.z >= -1 && qe.z <= 1 && f.layers.test(g.layers) === !0, y = f.element;
|
|
5000
5001
|
y.style.display = _ === !0 ? "" : "none", _ === !0 && (f.onBeforeRender(t, d, g), y.style.transform = "translate(" + -100 * f.center.x + "%," + -100 * f.center.y + "%)translate(" + (qe.x * r + r) + "px," + (-qe.y * s + s) + "px)", y.parentNode !== l && l.appendChild(y), f.onAfterRender(t, d, g));
|
|
5001
5002
|
const x = {
|
|
@@ -5007,7 +5008,7 @@ class eo {
|
|
|
5007
5008
|
h(f.children[_], d, g);
|
|
5008
5009
|
}
|
|
5009
5010
|
function u(f, d) {
|
|
5010
|
-
return
|
|
5011
|
+
return wn.setFromMatrixPosition(f.matrixWorld), Cn.setFromMatrixPosition(d.matrixWorld), wn.distanceToSquared(Cn);
|
|
5011
5012
|
}
|
|
5012
5013
|
function p(f) {
|
|
5013
5014
|
const d = [];
|
|
@@ -5027,7 +5028,7 @@ class eo {
|
|
|
5027
5028
|
}
|
|
5028
5029
|
}
|
|
5029
5030
|
}
|
|
5030
|
-
const
|
|
5031
|
+
const no = {
|
|
5031
5032
|
// Major economies
|
|
5032
5033
|
CN: [35, 105],
|
|
5033
5034
|
IN: [22, 78],
|
|
@@ -5126,7 +5127,7 @@ const to = {
|
|
|
5126
5127
|
UY: [-33, -56],
|
|
5127
5128
|
CR: [10, -84],
|
|
5128
5129
|
PA: [9, -80]
|
|
5129
|
-
},
|
|
5130
|
+
}, ro = /* @__PURE__ */ new Set([
|
|
5130
5131
|
"CN",
|
|
5131
5132
|
"IN",
|
|
5132
5133
|
"US",
|
|
@@ -5157,7 +5158,7 @@ const to = {
|
|
|
5157
5158
|
"PK",
|
|
5158
5159
|
"BD",
|
|
5159
5160
|
"VN"
|
|
5160
|
-
]),
|
|
5161
|
+
]), so = /* @__PURE__ */ new Set([
|
|
5161
5162
|
"CN",
|
|
5162
5163
|
"IN",
|
|
5163
5164
|
"US",
|
|
@@ -5165,7 +5166,7 @@ const to = {
|
|
|
5165
5166
|
"RU",
|
|
5166
5167
|
"AU",
|
|
5167
5168
|
"CA"
|
|
5168
|
-
]),
|
|
5169
|
+
]), ao = /* @__PURE__ */ new Set(["RU", "CA", "US", "CN", "BR", "AU"]), oo = /* @__PURE__ */ new Set([
|
|
5169
5170
|
"IN",
|
|
5170
5171
|
"AR",
|
|
5171
5172
|
"KZ",
|
|
@@ -5196,7 +5197,7 @@ const to = {
|
|
|
5196
5197
|
"TR",
|
|
5197
5198
|
"CL",
|
|
5198
5199
|
"MM"
|
|
5199
|
-
]),
|
|
5200
|
+
]), lo = /* @__PURE__ */ new Set([
|
|
5200
5201
|
"AF",
|
|
5201
5202
|
"UA",
|
|
5202
5203
|
"MG",
|
|
@@ -5238,7 +5239,7 @@ const to = {
|
|
|
5238
5239
|
"IQ",
|
|
5239
5240
|
"BD"
|
|
5240
5241
|
]);
|
|
5241
|
-
class
|
|
5242
|
+
class ho {
|
|
5242
5243
|
labelRenderer;
|
|
5243
5244
|
labels = [];
|
|
5244
5245
|
labelGroup;
|
|
@@ -5248,7 +5249,9 @@ class oo {
|
|
|
5248
5249
|
globe = null;
|
|
5249
5250
|
camera = null;
|
|
5250
5251
|
constructor(e, t) {
|
|
5251
|
-
this.sphereRadius = t, this.labelRenderer = new
|
|
5252
|
+
this.sphereRadius = t, this.labelRenderer = new io();
|
|
5253
|
+
const i = e.clientWidth || 800, n = e.clientHeight || 600;
|
|
5254
|
+
this.labelRenderer.setSize(i, n), this.labelRenderer.domElement.style.position = "absolute", this.labelRenderer.domElement.style.top = "0", this.labelRenderer.domElement.style.left = "0", this.labelRenderer.domElement.style.pointerEvents = "none", e.appendChild(this.labelRenderer.domElement), this.labelGroup = new S.Group(), this.injectStyles(), this.createLabels();
|
|
5252
5255
|
}
|
|
5253
5256
|
injectStyles() {
|
|
5254
5257
|
const e = document.createElement("style");
|
|
@@ -5335,15 +5338,15 @@ class oo {
|
|
|
5335
5338
|
`, document.head.appendChild(e);
|
|
5336
5339
|
}
|
|
5337
5340
|
getSizeCategory(e) {
|
|
5338
|
-
return
|
|
5341
|
+
return ao.has(e) ? "large" : oo.has(e) ? "medium" : lo.has(e) ? "small" : "tiny";
|
|
5339
5342
|
}
|
|
5340
5343
|
createLabels() {
|
|
5341
|
-
|
|
5342
|
-
const t =
|
|
5344
|
+
Sr.forEach((e) => {
|
|
5345
|
+
const t = no[e.code];
|
|
5343
5346
|
if (!t) return;
|
|
5344
5347
|
const [i, n] = t, r = this.getSizeCategory(e.code), s = document.createElement("div");
|
|
5345
5348
|
s.className = `country-label hidden size-${r}`, s.textContent = e.name;
|
|
5346
|
-
const o = new
|
|
5349
|
+
const o = new to(s), l = {
|
|
5347
5350
|
element: s,
|
|
5348
5351
|
object: o,
|
|
5349
5352
|
country: e,
|
|
@@ -5394,10 +5397,10 @@ class oo {
|
|
|
5394
5397
|
n = !1;
|
|
5395
5398
|
break;
|
|
5396
5399
|
case "minimal":
|
|
5397
|
-
n =
|
|
5400
|
+
n = so.has(i);
|
|
5398
5401
|
break;
|
|
5399
5402
|
case "major":
|
|
5400
|
-
n =
|
|
5403
|
+
n = ro.has(i);
|
|
5401
5404
|
break;
|
|
5402
5405
|
case "all":
|
|
5403
5406
|
case "capitals":
|
|
@@ -5590,7 +5593,7 @@ const wi = {
|
|
|
5590
5593
|
}
|
|
5591
5594
|
};
|
|
5592
5595
|
wi.lifeExpectancy;
|
|
5593
|
-
const Be = 50,
|
|
5596
|
+
const Be = 50, co = `
|
|
5594
5597
|
uniform float uMorph;
|
|
5595
5598
|
uniform float uTime;
|
|
5596
5599
|
uniform float uParchment;
|
|
@@ -5800,7 +5803,7 @@ void main() {
|
|
|
5800
5803
|
|
|
5801
5804
|
gl_Position = projectionMatrix * modelViewMatrix * vec4(pos, 1.0);
|
|
5802
5805
|
}
|
|
5803
|
-
`,
|
|
5806
|
+
`, uo = `
|
|
5804
5807
|
uniform sampler2D uTexture;
|
|
5805
5808
|
uniform sampler2D uDataTexture;
|
|
5806
5809
|
uniform sampler2D uCloudTexture;
|
|
@@ -5957,7 +5960,7 @@ void main() {
|
|
|
5957
5960
|
|
|
5958
5961
|
gl_FragColor = vec4(color, 1.0);
|
|
5959
5962
|
}
|
|
5960
|
-
`,
|
|
5963
|
+
`, po = `
|
|
5961
5964
|
varying vec3 vNormal;
|
|
5962
5965
|
varying vec3 vPosition;
|
|
5963
5966
|
uniform float uMorph;
|
|
@@ -5992,7 +5995,7 @@ void main() {
|
|
|
5992
5995
|
vPosition = pos;
|
|
5993
5996
|
gl_Position = projectionMatrix * modelViewMatrix * vec4(pos, 1.0);
|
|
5994
5997
|
}
|
|
5995
|
-
`,
|
|
5998
|
+
`, fo = `
|
|
5996
5999
|
varying vec3 vNormal;
|
|
5997
6000
|
varying vec3 vPosition;
|
|
5998
6001
|
uniform float uMorph;
|
|
@@ -6007,7 +6010,7 @@ void main() {
|
|
|
6007
6010
|
|
|
6008
6011
|
gl_FragColor = vec4(color, intensity * 0.6);
|
|
6009
6012
|
}
|
|
6010
|
-
`,
|
|
6013
|
+
`, mo = `
|
|
6011
6014
|
attribute float aSize;
|
|
6012
6015
|
attribute float aPhase;
|
|
6013
6016
|
uniform float uTime;
|
|
@@ -6024,7 +6027,7 @@ void main() {
|
|
|
6024
6027
|
gl_PointSize = aSize * (300.0 / -mvPosition.z) * twinkle;
|
|
6025
6028
|
gl_Position = projectionMatrix * mvPosition;
|
|
6026
6029
|
}
|
|
6027
|
-
`,
|
|
6030
|
+
`, go = `
|
|
6028
6031
|
varying float vOpacity;
|
|
6029
6032
|
|
|
6030
6033
|
void main() {
|
|
@@ -6034,14 +6037,14 @@ void main() {
|
|
|
6034
6037
|
|
|
6035
6038
|
gl_FragColor = vec4(1.0, 1.0, 1.0, alpha * vOpacity * 0.9);
|
|
6036
6039
|
}
|
|
6037
|
-
`,
|
|
6040
|
+
`, Pn = {
|
|
6038
6041
|
satellite: "https://raw.githubusercontent.com/mrdoob/three.js/dev/examples/textures/planets/earth_atmos_2048.jpg",
|
|
6039
6042
|
natural: "https://raw.githubusercontent.com/mrdoob/three.js/dev/examples/textures/planets/earth_day_4096.jpg",
|
|
6040
6043
|
dark: "https://raw.githubusercontent.com/mrdoob/three.js/dev/examples/textures/planets/earth_lights_2048.png",
|
|
6041
6044
|
light: "https://raw.githubusercontent.com/turban/webgl-earth/master/images/2_no_clouds_4k.jpg",
|
|
6042
6045
|
night: "https://raw.githubusercontent.com/mrdoob/three.js/dev/examples/textures/planets/earth_lights_2048.png",
|
|
6043
6046
|
topographic: "https://eoimages.gsfc.nasa.gov/images/imagerecords/74000/74117/world.topo.200407.3x5400x2700.jpg"
|
|
6044
|
-
},
|
|
6047
|
+
}, An = {
|
|
6045
6048
|
texture: "satellite",
|
|
6046
6049
|
labels: "all",
|
|
6047
6050
|
statistic: "lifeExpectancy",
|
|
@@ -6057,7 +6060,7 @@ void main() {
|
|
|
6057
6060
|
},
|
|
6058
6061
|
extrudeHeight: !1
|
|
6059
6062
|
};
|
|
6060
|
-
class
|
|
6063
|
+
class xo {
|
|
6061
6064
|
container;
|
|
6062
6065
|
config;
|
|
6063
6066
|
// Three.js core
|
|
@@ -6083,6 +6086,9 @@ class _o {
|
|
|
6083
6086
|
currentStatistic = null;
|
|
6084
6087
|
animationId = null;
|
|
6085
6088
|
isDestroyed = !1;
|
|
6089
|
+
/** Promise that resolves when fully initialized */
|
|
6090
|
+
ready;
|
|
6091
|
+
resolveReady;
|
|
6086
6092
|
/**
|
|
6087
6093
|
* Create a new GlobeViz instance
|
|
6088
6094
|
* @param container CSS selector or HTMLElement
|
|
@@ -6096,18 +6102,20 @@ class _o {
|
|
|
6096
6102
|
} else
|
|
6097
6103
|
this.container = e;
|
|
6098
6104
|
this.config = {
|
|
6099
|
-
...
|
|
6105
|
+
...An,
|
|
6100
6106
|
...t,
|
|
6101
|
-
effects: { ...
|
|
6102
|
-
}, this.
|
|
6107
|
+
effects: { ...An.effects, ...t.effects }
|
|
6108
|
+
}, this.ready = new Promise((i) => {
|
|
6109
|
+
this.resolveReady = i;
|
|
6110
|
+
}), this.init();
|
|
6103
6111
|
}
|
|
6104
6112
|
async init() {
|
|
6105
6113
|
const e = this.config.width || this.container.clientWidth || 800, t = this.config.height || this.container.clientHeight || 600;
|
|
6106
|
-
this.scene = new S.Scene(), this.scene.background = new S.Color(2066), this.camera = new S.PerspectiveCamera(50, e / t, 1, 1e3), this.camera.position.set(0, 0, this.config.initialView === "flat" ? 350 : 150), this.renderer = new S.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
|
|
6114
|
+
this.scene = new S.Scene(), this.scene.background = new S.Color(2066), this.camera = new S.PerspectiveCamera(50, e / t, 1, 1e3), this.camera.position.set(0, 0, this.config.initialView === "flat" ? 350 : 150), this.renderer = new S.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 Br(this.camera, this.renderer.domElement), this.controls.enableDamping = !0, this.controls.minDistance = 80, this.controls.maxDistance = 400, this.choropleth = new ka(), this.config.showLegend && (this.legend = new Fa(this.container)), await this.createGlobe(), this.createStars(), this.config.effects.atmosphere && this.createAtmosphere(), this.countryLabels = new ho(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 eo(this.renderer, this.scene, this.camera), this.config.showControls && this.createGUI(), await this.choropleth.waitForLoad(), 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), document.addEventListener("fullscreenchange", this.handleFullscreenChange), window.addEventListener("keydown", this.handleKeydown), this.animate(), this.resolveReady();
|
|
6107
6115
|
}
|
|
6108
6116
|
async createGlobe() {
|
|
6109
6117
|
const e = await this.textureLoader.loadAsync(
|
|
6110
|
-
|
|
6118
|
+
Pn[this.config.texture]
|
|
6111
6119
|
);
|
|
6112
6120
|
e.anisotropy = this.renderer.capabilities.getMaxAnisotropy(), e.minFilter = S.LinearMipmapLinearFilter, e.magFilter = S.LinearFilter;
|
|
6113
6121
|
const t = document.createElement("canvas");
|
|
@@ -6119,8 +6127,8 @@ class _o {
|
|
|
6119
6127
|
128
|
|
6120
6128
|
);
|
|
6121
6129
|
this.material = new S.ShaderMaterial({
|
|
6122
|
-
vertexShader:
|
|
6123
|
-
fragmentShader:
|
|
6130
|
+
vertexShader: co,
|
|
6131
|
+
fragmentShader: uo,
|
|
6124
6132
|
uniforms: {
|
|
6125
6133
|
// Core uniforms
|
|
6126
6134
|
uMorph: { value: 0 },
|
|
@@ -6170,8 +6178,8 @@ class _o {
|
|
|
6170
6178
|
128,
|
|
6171
6179
|
64
|
|
6172
6180
|
), t = new S.ShaderMaterial({
|
|
6173
|
-
vertexShader:
|
|
6174
|
-
fragmentShader:
|
|
6181
|
+
vertexShader: po,
|
|
6182
|
+
fragmentShader: fo,
|
|
6175
6183
|
uniforms: {
|
|
6176
6184
|
uMorph: { value: 0 }
|
|
6177
6185
|
},
|
|
@@ -6190,8 +6198,8 @@ class _o {
|
|
|
6190
6198
|
}
|
|
6191
6199
|
t.setAttribute("position", new S.BufferAttribute(i, 3)), t.setAttribute("aSize", new S.BufferAttribute(n, 1)), t.setAttribute("aPhase", new S.BufferAttribute(r, 1));
|
|
6192
6200
|
const s = new S.ShaderMaterial({
|
|
6193
|
-
vertexShader:
|
|
6194
|
-
fragmentShader:
|
|
6201
|
+
vertexShader: mo,
|
|
6202
|
+
fragmentShader: go,
|
|
6195
6203
|
uniforms: {
|
|
6196
6204
|
uTime: { value: 0 },
|
|
6197
6205
|
uTwinkle: { value: this.config.effects.starTwinkle ? 1 : 0 }
|
|
@@ -6216,8 +6224,11 @@ class _o {
|
|
|
6216
6224
|
const e = this.config.width || this.container.clientWidth, t = this.config.height || this.container.clientHeight;
|
|
6217
6225
|
this.camera.aspect = e / t, this.camera.updateProjectionMatrix(), this.renderer.setSize(e, t), this.countryLabels?.resize(e, t);
|
|
6218
6226
|
};
|
|
6227
|
+
handleFullscreenChange = () => {
|
|
6228
|
+
this.isDestroyed || setTimeout(() => this.handleResize(), 50);
|
|
6229
|
+
};
|
|
6219
6230
|
handleKeydown = (e) => {
|
|
6220
|
-
this.isDestroyed || (e.key === "g" || e.key === "G") && (this.morph > 0.5 ? this.toFlat() : this.toGlobe());
|
|
6231
|
+
this.isDestroyed || ((e.key === "g" || e.key === "G") && (this.morph > 0.5 ? this.toFlat() : this.toGlobe()), (e.key === "f" || e.key === "F") && this.toggleFullscreen());
|
|
6221
6232
|
};
|
|
6222
6233
|
animate = () => {
|
|
6223
6234
|
if (this.isDestroyed) return;
|
|
@@ -6267,7 +6278,7 @@ class _o {
|
|
|
6267
6278
|
return;
|
|
6268
6279
|
}
|
|
6269
6280
|
this.currentStatistic = e;
|
|
6270
|
-
const i =
|
|
6281
|
+
const i = Ra.find((n) => n.id === e);
|
|
6271
6282
|
if (i && this.choropleth) {
|
|
6272
6283
|
const n = this.choropleth.renderTexture(i);
|
|
6273
6284
|
if (this.material && n) {
|
|
@@ -6296,7 +6307,7 @@ class _o {
|
|
|
6296
6307
|
this.countryLabels?.setStyle(e);
|
|
6297
6308
|
}
|
|
6298
6309
|
async setTexture(e) {
|
|
6299
|
-
const t =
|
|
6310
|
+
const t = Pn[e];
|
|
6300
6311
|
if (!(!t || !this.material))
|
|
6301
6312
|
try {
|
|
6302
6313
|
const i = await this.textureLoader.loadAsync(t);
|
|
@@ -6330,17 +6341,23 @@ class _o {
|
|
|
6330
6341
|
resize(e, t) {
|
|
6331
6342
|
this.config.width = e, this.config.height = t, this.handleResize();
|
|
6332
6343
|
}
|
|
6344
|
+
async toggleFullscreen() {
|
|
6345
|
+
document.fullscreenElement ? (await document.exitFullscreen(), setTimeout(() => this.handleResize(), 100)) : (await this.container.requestFullscreen(), setTimeout(() => this.handleResize(), 100));
|
|
6346
|
+
}
|
|
6347
|
+
isFullscreen() {
|
|
6348
|
+
return document.fullscreenElement === this.container;
|
|
6349
|
+
}
|
|
6333
6350
|
destroy() {
|
|
6334
|
-
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);
|
|
6351
|
+
this.isDestroyed = !0, this.animationId && cancelAnimationFrame(this.animationId), window.removeEventListener("resize", this.handleResize), window.removeEventListener("keydown", this.handleKeydown), document.removeEventListener("fullscreenchange", this.handleFullscreenChange), 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);
|
|
6335
6352
|
}
|
|
6336
6353
|
}
|
|
6337
6354
|
export {
|
|
6338
6355
|
wi as BUILT_IN_STATISTICS,
|
|
6339
|
-
|
|
6340
|
-
|
|
6341
|
-
|
|
6342
|
-
|
|
6343
|
-
|
|
6356
|
+
xo as GlobeViz,
|
|
6357
|
+
Sr as WORLD_STATISTICS,
|
|
6358
|
+
Dr as createFormatter,
|
|
6359
|
+
yo as formatValue,
|
|
6360
|
+
La as normalizeCountryValues,
|
|
6344
6361
|
gn as toNumericCode
|
|
6345
6362
|
};
|
|
6346
6363
|
//# sourceMappingURL=gralobe.js.map
|