gralobe 1.0.33 → 1.0.34

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 CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as A from "three";
2
- import { Controls as Fr, Vector3 as oe, MOUSE as nt, TOUCH as Je, Quaternion as Zi, Spherical as Ki, Vector2 as fe, Ray as zr, Plane as Nr, MathUtils as Br, Matrix4 as Mn, Object3D as $r } from "three";
2
+ import { Controls as Ur, Vector3 as oe, MOUSE as nt, TOUCH as Je, Quaternion as Zi, Spherical as Ki, Vector2 as fe, Ray as zr, Plane as Nr, MathUtils as Br, Matrix4 as Mn, Object3D as $r } from "three";
3
3
  function Ce(a) {
4
4
  if (a === void 0)
5
5
  throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
@@ -35,8 +35,8 @@ var ue = {
35
35
  return typeof window < "u";
36
36
  }, Rt = function(e) {
37
37
  return G(e) || K(e);
38
- }, On = typeof ArrayBuffer == "function" && ArrayBuffer.isView || function() {
39
- }, q = Array.isArray, hi = /(?:-?\.?\d|\.)+/gi, In = /[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g, et = /[-+=.]*\d+[.e-]*\d*[a-z%]*/g, Xt = /[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi, Ln = /[+-]=-?[.\d]+/, kn = /[^,'"\[\]\s]+/gi, Yr = /^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i, N, xe, ci, Si, de = {}, Bt = {}, Un, Fn = function(e) {
38
+ }, In = typeof ArrayBuffer == "function" && ArrayBuffer.isView || function() {
39
+ }, q = Array.isArray, hi = /(?:-?\.?\d|\.)+/gi, Ln = /[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g, et = /[-+=.]*\d+[.e-]*\d*[a-z%]*/g, Xt = /[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi, On = /[+-]=-?[.\d]+/, kn = /[^,'"\[\]\s]+/gi, Yr = /^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i, N, xe, ci, Si, de = {}, Bt = {}, Fn, Un = function(e) {
40
40
  return (Bt = lt(e, de)) && ae;
41
41
  }, Mi = function(e, t) {
42
42
  return console.warn("Invalid property", e, "set to", t, "Missing plugin? gsap.registerPlugin()");
@@ -50,23 +50,23 @@ var ue = {
50
50
  suppressEvents: !0,
51
51
  isStart: !0,
52
52
  kill: !1
53
- }, Ut = {
53
+ }, Ft = {
54
54
  suppressEvents: !0,
55
55
  kill: !1
56
56
  }, Kr = {
57
57
  suppressEvents: !0
58
- }, Di = {}, Ie = [], ui = {}, Nn, le = {}, qt = {}, Wi = 30, Ft = [], Ri = "", Oi = function(e) {
58
+ }, Di = {}, Le = [], ui = {}, Nn, le = {}, qt = {}, Wi = 30, Ut = [], Ri = "", Ii = function(e) {
59
59
  var t = e[0], i, n;
60
60
  if (we(t) || G(t) || (e = [e]), !(i = (t._gsap || {}).harness)) {
61
- for (n = Ft.length; n-- && !Ft[n].targetTest(t); )
61
+ for (n = Ut.length; n-- && !Ut[n].targetTest(t); )
62
62
  ;
63
- i = Ft[n];
63
+ i = Ut[n];
64
64
  }
65
65
  for (n = e.length; n--; )
66
66
  e[n] && (e[n]._gsap || (e[n]._gsap = new hr(e[n], i))) || e.splice(n, 1);
67
67
  return e;
68
68
  }, He = function(e) {
69
- return e._gsap || Oi(_e(e))[0]._gsap;
69
+ return e._gsap || Ii(_e(e))[0]._gsap;
70
70
  }, Bn = function(e, t, i) {
71
71
  return (i = e[t]) && G(i) ? e[t]() : Ai(i) && e.getAttribute && e.getAttribute(t) || i;
72
72
  }, ne = function(e, t) {
@@ -83,13 +83,13 @@ var ue = {
83
83
  ;
84
84
  return n < i;
85
85
  }, $t = function() {
86
- var e = Ie.length, t = Ie.slice(0), i, n;
87
- for (ui = {}, Ie.length = 0, i = 0; i < e; i++)
86
+ var e = Le.length, t = Le.slice(0), i, n;
87
+ for (ui = {}, Le.length = 0, i = 0; i < e; i++)
88
88
  n = t[i], n && n._lazy && (n.render(n._lazy[0], n._lazy[1], !0)._lazy = 0);
89
- }, Ii = function(e) {
89
+ }, Li = function(e) {
90
90
  return !!(e._initted || e._startAt || e.add);
91
91
  }, $n = function(e, t, i, n) {
92
- Ie.length && !W && $t(), e.render(t, i, !!(W && t < 0 && Ii(e))), Ie.length && !W && $t();
92
+ Le.length && !W && $t(), e.render(t, i, !!(W && t < 0 && Li(e))), Le.length && !W && $t();
93
93
  }, Gn = function(e) {
94
94
  var t = parseFloat(e);
95
95
  return (t || t === 0) && (e + "").match(kn).length < 2 ? t : K(e) ? e.trim() : e;
@@ -149,7 +149,7 @@ var ue = {
149
149
  t._dirty = 1, t.totalDuration(), t = t.parent;
150
150
  return e;
151
151
  }, di = function(e, t, i, n) {
152
- return e._startAt && (W ? e._startAt.revert(Ut) : e.vars.immediateRender && !e.vars.autoRevert || e._startAt.render(t, !0, n));
152
+ return e._startAt && (W ? e._startAt.revert(Ft) : e.vars.immediateRender && !e.vars.autoRevert || e._startAt.render(t, !0, n));
153
153
  }, Jr = function a(e) {
154
154
  return !e || e._ts && a(e.parent);
155
155
  }, qi = function(e) {
@@ -180,7 +180,7 @@ var ue = {
180
180
  if (ki(e, t, r), !e._initted)
181
181
  return 1;
182
182
  if (!i && e._pt && !W && (e._dur && e.vars.lazy !== !1 || !e._dur && e.vars.lazy) && Nn !== he.frame)
183
- return Ie.push(e), e._lazy = [r, n], 1;
183
+ return Le.push(e), e._lazy = [r, n], 1;
184
184
  }, es = function a(e) {
185
185
  var t = e.parent;
186
186
  return t && t._ts && t._initted && !t._lock && (t.rawTime() < 0 || a(t));
@@ -230,14 +230,14 @@ var ue = {
230
230
  s.immediateRender = ie(o.immediateRender), e < 2 ? s.runBackwards = 1 : s.startAt = t[r - 1];
231
231
  }
232
232
  return new j(t[0], s, t[r + 1]);
233
- }, Fe = function(e, t) {
233
+ }, Ue = function(e, t) {
234
234
  return e || e === 0 ? t(e) : t;
235
235
  }, Dt = function(e, t, i) {
236
236
  return i < e ? e : i > t ? t : i;
237
237
  }, X = function(e, t) {
238
238
  return !K(e) || !(t = Yr.exec(e)) ? "" : t[1];
239
239
  }, rs = function(e, t, i) {
240
- return Fe(i, function(n) {
240
+ return Ue(i, function(n) {
241
241
  return Dt(e, t, n);
242
242
  });
243
243
  }, fi = [].slice, Kn = function(e, t) {
@@ -290,7 +290,7 @@ var ue = {
290
290
  };
291
291
  }, qn = function(e, t) {
292
292
  var i = q(e), n, r;
293
- return !i && we(e) && (n = i = e.radius || ge, e.values ? (e = _e(e.values), (r = !Te(e[0])) && (n *= n)) : e = gi(e.increment)), Fe(t, i ? G(e) ? function(s) {
293
+ return !i && we(e) && (n = i = e.radius || ge, e.values ? (e = _e(e.values), (r = !Te(e[0])) && (n *= n)) : e = gi(e.increment)), Ue(t, i ? G(e) ? function(s) {
294
294
  return r = e(s), Math.abs(r - s) <= n ? r : s;
295
295
  } : function(s) {
296
296
  for (var o = parseFloat(r ? s.x : s), l = parseFloat(r ? s.y : 0), h = ge, c = 0, u = e.length, f, g; u--; )
@@ -298,7 +298,7 @@ var ue = {
298
298
  return c = !n || h <= n ? e[c] : s, r || c === s || Te(s) ? c : c + X(s);
299
299
  } : gi(e));
300
300
  }, Qn = function(e, t, i, n) {
301
- return Fe(q(e) ? !t : i === !0 ? !!(i = 0) : !n, function() {
301
+ return Ue(q(e) ? !t : i === !0 ? !!(i = 0) : !n, function() {
302
302
  return q(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;
303
303
  });
304
304
  }, as = function() {
@@ -316,17 +316,17 @@ var ue = {
316
316
  }, ls = function(e, t, i) {
317
317
  return er(e, t, 0, 1, i);
318
318
  }, Jn = function(e, t, i) {
319
- return Fe(i, function(n) {
319
+ return Ue(i, function(n) {
320
320
  return e[~~t(n)];
321
321
  });
322
322
  }, hs = function a(e, t, i) {
323
323
  var n = t - e;
324
- return q(e) ? Jn(e, a(0, e.length), t) : Fe(i, function(r) {
324
+ return q(e) ? Jn(e, a(0, e.length), t) : Ue(i, function(r) {
325
325
  return (n + (r - e) % n) % n + e;
326
326
  });
327
327
  }, cs = function a(e, t, i) {
328
328
  var n = t - e, r = n * 2;
329
- return q(e) ? Jn(e, a(0, e.length - 1), t) : Fe(i, function(s) {
329
+ return q(e) ? Jn(e, a(0, e.length - 1), t) : Ue(i, function(s) {
330
330
  return s = (r + (s - e) % r) % r || 0, e + (s > n ? r - s : s);
331
331
  });
332
332
  }, Pt = function(e) {
@@ -335,7 +335,7 @@ var ue = {
335
335
  return i + e.substr(t, e.length - t);
336
336
  }, er = function(e, t, i, n, r) {
337
337
  var s = t - e, o = n - i;
338
- return Fe(r, function(l) {
338
+ return Ue(r, function(l) {
339
339
  return i + ((l - e) / s * o || 0);
340
340
  });
341
341
  }, us = function a(e, t, i, n) {
@@ -361,13 +361,13 @@ var ue = {
361
361
  } else n || (e = lt(q(e) ? [] : {}, e));
362
362
  if (!c) {
363
363
  for (l in t)
364
- Li.call(o, e, l, "get", t[l]);
364
+ Oi.call(o, e, l, "get", t[l]);
365
365
  r = function(p) {
366
366
  return zi(p, o) || (s ? e.p : e);
367
367
  };
368
368
  }
369
369
  }
370
- return Fe(i, r);
370
+ return Ue(i, r);
371
371
  }, Ji = function(e, t, i) {
372
372
  var n = e.labels, r = ge, s, o, l;
373
373
  for (s in n)
@@ -376,7 +376,7 @@ var ue = {
376
376
  }, ce = function(e, t, i) {
377
377
  var n = e.vars, r = n[t], s = z, o = e._ctx, l, h, c;
378
378
  if (r)
379
- return l = n[t + "Params"], h = n.callbackScope || e, i && Ie.length && $t(), o && (z = o), c = l ? r.apply(h, l) : r.call(h), z = s, c;
379
+ return l = n[t + "Params"], h = n.callbackScope || e, i && Le.length && $t(), o && (z = o), c = l ? r.apply(h, l) : r.call(h), z = s, c;
380
380
  }, _t = function(e) {
381
381
  return ke(e), e.scrollTrigger && e.scrollTrigger.kill(!!W), e.progress() < 1 && ce(e, "onInterrupt"), e;
382
382
  }, tt, tr = [], ir = function(e) {
@@ -387,93 +387,93 @@ var ue = {
387
387
  } : e, r = {
388
388
  init: wt,
389
389
  render: zi,
390
- add: Li,
390
+ add: Oi,
391
391
  kill: Ts,
392
392
  modifier: As,
393
393
  rawVars: 0
394
394
  }, s = {
395
395
  targetTest: 0,
396
396
  get: 0,
397
- getSetter: Fi,
397
+ getSetter: Ui,
398
398
  aliases: {},
399
399
  register: 0
400
400
  };
401
401
  if (ut(), e !== n) {
402
402
  if (le[t])
403
403
  return;
404
- pe(n, pe(Gt(e, r), s)), lt(n.prototype, lt(r, Gt(e, s))), le[n.prop = t] = n, e.targetTest && (Ft.push(n), Di[t] = 1), t = (t === "css" ? "CSS" : t.charAt(0).toUpperCase() + t.substr(1)) + "Plugin";
404
+ pe(n, pe(Gt(e, r), s)), lt(n.prototype, lt(r, Gt(e, s))), le[n.prop = t] = n, e.targetTest && (Ut.push(n), Di[t] = 1), t = (t === "css" ? "CSS" : t.charAt(0).toUpperCase() + t.substr(1)) + "Plugin";
405
405
  }
406
406
  zn(t, n), e.register && e.register(ae, n, re);
407
407
  } else
408
408
  tr.push(e);
409
- }, L = 255, yt = {
410
- aqua: [0, L, L],
411
- lime: [0, L, 0],
409
+ }, O = 255, yt = {
410
+ aqua: [0, O, O],
411
+ lime: [0, O, 0],
412
412
  silver: [192, 192, 192],
413
413
  black: [0, 0, 0],
414
414
  maroon: [128, 0, 0],
415
415
  teal: [0, 128, 128],
416
- blue: [0, 0, L],
416
+ blue: [0, 0, O],
417
417
  navy: [0, 0, 128],
418
- white: [L, L, L],
418
+ white: [O, O, O],
419
419
  olive: [128, 128, 0],
420
- yellow: [L, L, 0],
421
- orange: [L, 165, 0],
420
+ yellow: [O, O, 0],
421
+ orange: [O, 165, 0],
422
422
  gray: [128, 128, 128],
423
423
  purple: [128, 0, 128],
424
424
  green: [0, 128, 0],
425
- red: [L, 0, 0],
426
- pink: [L, 192, 203],
427
- cyan: [0, L, L],
428
- transparent: [L, L, L, 0]
425
+ red: [O, 0, 0],
426
+ pink: [O, 192, 203],
427
+ cyan: [0, O, O],
428
+ transparent: [O, O, O, 0]
429
429
  }, Qt = function(e, t, i) {
430
- return e += e < 0 ? 1 : e > 1 ? -1 : 0, (e * 6 < 1 ? t + (i - t) * e * 6 : e < 0.5 ? i : e * 3 < 2 ? t + (i - t) * (2 / 3 - e) * 6 : t) * L + 0.5 | 0;
430
+ return e += e < 0 ? 1 : e > 1 ? -1 : 0, (e * 6 < 1 ? t + (i - t) * e * 6 : e < 0.5 ? i : e * 3 < 2 ? t + (i - t) * (2 / 3 - e) * 6 : t) * O + 0.5 | 0;
431
431
  }, nr = function(e, t, i) {
432
- var n = e ? Te(e) ? [e >> 16, e >> 8 & L, e & L] : 0 : yt.black, r, s, o, l, h, c, u, f, g, p;
432
+ var n = e ? Te(e) ? [e >> 16, e >> 8 & O, e & O] : 0 : yt.black, r, s, o, l, h, c, u, f, g, p;
433
433
  if (!n) {
434
434
  if (e.substr(-1) === "," && (e = e.substr(0, e.length - 1)), yt[e])
435
435
  n = yt[e];
436
436
  else if (e.charAt(0) === "#") {
437
437
  if (e.length < 6 && (r = e.charAt(1), s = e.charAt(2), o = e.charAt(3), e = "#" + r + r + s + s + o + o + (e.length === 5 ? e.charAt(4) + e.charAt(4) : "")), e.length === 9)
438
- return n = parseInt(e.substr(1, 6), 16), [n >> 16, n >> 8 & L, n & L, parseInt(e.substr(7), 16) / 255];
439
- e = parseInt(e.substr(1), 16), n = [e >> 16, e >> 8 & L, e & L];
438
+ return n = parseInt(e.substr(1, 6), 16), [n >> 16, n >> 8 & O, n & O, parseInt(e.substr(7), 16) / 255];
439
+ e = parseInt(e.substr(1), 16), n = [e >> 16, e >> 8 & O, e & O];
440
440
  } else if (e.substr(0, 3) === "hsl") {
441
441
  if (n = p = e.match(hi), !t)
442
442
  l = +n[0] % 360 / 360, h = +n[1] / 100, c = +n[2] / 100, s = c <= 0.5 ? c * (h + 1) : c + h - c * h, r = c * 2 - s, n.length > 3 && (n[3] *= 1), n[0] = Qt(l + 1 / 3, r, s), n[1] = Qt(l, r, s), n[2] = Qt(l - 1 / 3, r, s);
443
443
  else if (~e.indexOf("="))
444
- return n = e.match(In), i && n.length < 4 && (n[3] = 1), n;
444
+ return n = e.match(Ln), i && n.length < 4 && (n[3] = 1), n;
445
445
  } else
446
446
  n = e.match(hi) || yt.transparent;
447
447
  n = n.map(Number);
448
448
  }
449
- return t && !p && (r = n[0] / L, s = n[1] / L, o = n[2] / L, u = Math.max(r, s, o), f = Math.min(r, s, o), c = (u + f) / 2, u === f ? l = h = 0 : (g = u - f, h = c > 0.5 ? g / (2 - u - f) : g / (u + f), l = u === r ? (s - o) / g + (s < o ? 6 : 0) : u === s ? (o - r) / g + 2 : (r - s) / g + 4, l *= 60), n[0] = ~~(l + 0.5), n[1] = ~~(h * 100 + 0.5), n[2] = ~~(c * 100 + 0.5)), i && n.length < 4 && (n[3] = 1), n;
449
+ return t && !p && (r = n[0] / O, s = n[1] / O, o = n[2] / O, u = Math.max(r, s, o), f = Math.min(r, s, o), c = (u + f) / 2, u === f ? l = h = 0 : (g = u - f, h = c > 0.5 ? g / (2 - u - f) : g / (u + f), l = u === r ? (s - o) / g + (s < o ? 6 : 0) : u === s ? (o - r) / g + 2 : (r - s) / g + 4, l *= 60), n[0] = ~~(l + 0.5), n[1] = ~~(h * 100 + 0.5), n[2] = ~~(c * 100 + 0.5)), i && n.length < 4 && (n[3] = 1), n;
450
450
  }, rr = function(e) {
451
451
  var t = [], i = [], n = -1;
452
- return e.split(Le).forEach(function(r) {
452
+ return e.split(Oe).forEach(function(r) {
453
453
  var s = r.match(et) || [];
454
454
  t.push.apply(t, s), i.push(n += s.length + 1);
455
455
  }), t.c = i, t;
456
456
  }, en = function(e, t, i) {
457
- var n = "", r = (e + n).match(Le), s = t ? "hsla(" : "rgba(", o = 0, l, h, c, u;
457
+ var n = "", r = (e + n).match(Oe), s = t ? "hsla(" : "rgba(", o = 0, l, h, c, u;
458
458
  if (!r)
459
459
  return e;
460
460
  if (r = r.map(function(f) {
461
461
  return (f = nr(f, t, 1)) && s + (t ? f[0] + "," + f[1] + "%," + f[2] + "%," + f[3] : f.join(",")) + ")";
462
462
  }), i && (c = rr(e), l = i.c, l.join(n) !== c.c.join(n)))
463
- for (h = e.replace(Le, "1").split(et), u = h.length - 1; o < u; o++)
463
+ for (h = e.replace(Oe, "1").split(et), u = h.length - 1; o < u; o++)
464
464
  n += h[o] + (~l.indexOf(o) ? r.shift() || s + "0,0,0,0)" : (c.length ? c : r.length ? r : i).shift());
465
465
  if (!h)
466
- for (h = e.split(Le), u = h.length - 1; o < u; o++)
466
+ for (h = e.split(Oe), u = h.length - 1; o < u; o++)
467
467
  n += h[o] + r[o];
468
468
  return n + h[u];
469
- }, Le = (function() {
469
+ }, Oe = (function() {
470
470
  var a = "(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b", e;
471
471
  for (e in yt)
472
472
  a += "|" + e + "\\b";
473
473
  return new RegExp(a + ")", "gi");
474
474
  })(), ds = /hsl[a]?\(/, sr = function(e) {
475
475
  var t = e.join(" "), i;
476
- if (Le.lastIndex = 0, Le.test(t))
476
+ if (Oe.lastIndex = 0, Oe.test(t))
477
477
  return i = ds.test(t), e[1] = en(e[1], i), e[0] = en(e[0], i, rr(e[1])), !0;
478
478
  }, Ct, he = (function() {
479
479
  var a = Date.now, e = 500, t = 33, i = a(), n = i, r = 1e3 / 240, s = r, o = [], l, h, c, u, f, g, p = function d(m) {
@@ -492,7 +492,7 @@ var ue = {
492
492
  return f / (1e3 / (m || 60));
493
493
  },
494
494
  wake: function() {
495
- Un && (!ci && Ti() && (xe = ci = window, Si = xe.document || {}, de.gsap = ae, (xe.gsapVersions || (xe.gsapVersions = [])).push(ae.version), Fn(Bt || xe.GreenSockGlobals || !xe.gsap && xe || {}), tr.forEach(ir)), c = typeof requestAnimationFrame < "u" && requestAnimationFrame, l && u.sleep(), h = c || function(m) {
495
+ Fn && (!ci && Ti() && (xe = ci = window, Si = xe.document || {}, de.gsap = ae, (xe.gsapVersions || (xe.gsapVersions = [])).push(ae.version), Un(Bt || xe.GreenSockGlobals || !xe.gsap && xe || {}), tr.forEach(ir)), c = typeof requestAnimationFrame < "u" && requestAnimationFrame, l && u.sleep(), h = c || function(m) {
496
496
  return setTimeout(m, s - u.time * 1e3 + 1 | 0);
497
497
  }, Ct = 1, p(2));
498
498
  },
@@ -623,7 +623,7 @@ ne("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt", functio
623
623
  return Ri += a + "," + a + "Params,";
624
624
  });
625
625
  var hr = function(e, t) {
626
- this.id = Vr++, e._gsap = this, this.target = e, this.harness = t, this.get = t ? t.get : Bn, this.set = t ? t.getSetter : Fi;
626
+ this.id = Vr++, e._gsap = this, this.target = e, this.harness = t, this.get = t ? t.get : Bn, this.set = t ? t.getSetter : Ui;
627
627
  }, At = /* @__PURE__ */ (function() {
628
628
  function a(t) {
629
629
  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, ct(this, +t.duration, 1, 1), this.data = t.data, z && (this._ctx = z, z.data.push(this)), Ct || he.wake();
@@ -678,7 +678,7 @@ var hr = function(e, t) {
678
678
  }, e.revert = function(i) {
679
679
  i === void 0 && (i = Kr);
680
680
  var n = W;
681
- return W = i, Ii(this) && (this.timeline && this.timeline.revert(i), this.totalTime(-0.01, i.suppressEvents)), this.data !== "nested" && i.kill !== !1 && this.kill(), W = n, this;
681
+ return W = i, Li(this) && (this.timeline && this.timeline.revert(i), this.totalTime(-0.01, i.suppressEvents)), this.data !== "nested" && i.kill !== !1 && this.kill(), W = n, this;
682
682
  }, e.globalTime = function(i) {
683
683
  for (var n = this, r = arguments.length ? i : n.rawTime(); n; )
684
684
  r = n._start + r / (Math.abs(n._ts) || 1), n = n._dp;
@@ -806,7 +806,7 @@ var J = /* @__PURE__ */ (function(a) {
806
806
  if (p = g._prev, (g._act || S <= g._end) && g._ts && y !== g) {
807
807
  if (g.parent !== this)
808
808
  return this.render(n, r, s);
809
- if (g.render(g._ts > 0 ? (S - g._start) * g._ts : (g._dirty ? g.totalDuration() : g._tDur) + (S - g._start) * g._ts, r, s || W && Ii(g)), f !== this._time || !this._ts && !_) {
809
+ if (g.render(g._ts > 0 ? (S - g._start) * g._ts : (g._dirty ? g.totalDuration() : g._tDur) + (S - g._start) * g._ts, r, s || W && Li(g)), f !== this._time || !this._ts && !_) {
810
810
  y = 0, p && (c += this._zTime = S ? -k : k);
811
811
  break;
812
812
  }
@@ -954,14 +954,14 @@ var ys = function(e, t, i, n, r, s, o) {
954
954
  c: p.charAt(1) === "=" ? rt(m, p) - m : parseFloat(p) - m,
955
955
  m: g && g < 4 ? Math.round : 0
956
956
  }, h = Xt.lastIndex);
957
- return l.c = h < n.length ? n.substring(h, n.length) : "", l.fp = o, (Ln.test(n) || _) && (l.e = 0), this._pt = l, l;
958
- }, Li = function(e, t, i, n, r, s, o, l, h, c) {
957
+ return l.c = h < n.length ? n.substring(h, n.length) : "", l.fp = o, (On.test(n) || _) && (l.e = 0), this._pt = l, l;
958
+ }, Oi = function(e, t, i, n, r, s, o, l, h, c) {
959
959
  G(n) && (n = n(r || 0, e, s));
960
- var u = e[t], f = i !== "get" ? i : G(u) ? h ? e[t.indexOf("set") || !G(e["get" + t.substr(3)]) ? t : "get" + t.substr(3)](h) : e[t]() : u, g = G(u) ? h ? ws : pr : Ui, p;
960
+ var u = e[t], f = i !== "get" ? i : G(u) ? h ? e[t.indexOf("set") || !G(e["get" + t.substr(3)]) ? t : "get" + t.substr(3)](h) : e[t]() : u, g = G(u) ? h ? ws : pr : Fi, p;
961
961
  if (K(n) && (~n.indexOf("random(") && (n = Pt(n)), n.charAt(1) === "=" && (p = rt(f, n) + (X(f) || 0), (p || p === 0) && (n = p))), !c || f !== n || _i)
962
962
  return !isNaN(f * n) && n !== "" ? (p = new re(this._pt, e, t, +f || 0, n - (f || 0), typeof u == "boolean" ? Cs : fr, 0, g), h && (p.fp = h), o && p.modifier(o, this, e), this._pt = p) : (!u && !(t in e) && Mi(t, n), ys.call(this, e, t, f, n, g, l || ue.stringFilter, h));
963
963
  }, xs = function(e, t, i, n, r) {
964
- if (G(e) && (e = vt(e, r, t, i, n)), !we(e) || e.style && e.nodeType || q(e) || On(e))
964
+ if (G(e) && (e = vt(e, r, t, i, n)), !we(e) || e.style && e.nodeType || q(e) || In(e))
965
965
  return K(e) ? vt(e, r, t, i, n) : e;
966
966
  var s = {}, o;
967
967
  for (o in e)
@@ -974,9 +974,9 @@ var ys = function(e, t, i, n, r, s, o) {
974
974
  h[o._props[c]] = l;
975
975
  return o;
976
976
  }, Me, _i, ki = function a(e, t, i) {
977
- var n = e.vars, r = n.ease, s = n.startAt, o = n.immediateRender, l = n.lazy, h = n.onUpdate, c = n.runBackwards, u = n.yoyoEase, f = n.keyframes, g = n.autoRevert, p = e._dur, d = e._startAt, m = e._targets, _ = e.parent, y = _ && _.data === "nested" ? _.vars.targets : m, x = e._overwrite === "auto" && !Ci, b = e.timeline, v, P, E, C, w, S, D, T, R, O, $, F, U;
977
+ var n = e.vars, r = n.ease, s = n.startAt, o = n.immediateRender, l = n.lazy, h = n.onUpdate, c = n.runBackwards, u = n.yoyoEase, f = n.keyframes, g = n.autoRevert, p = e._dur, d = e._startAt, m = e._targets, _ = e.parent, y = _ && _.data === "nested" ? _.vars.targets : m, x = e._overwrite === "auto" && !Ci, b = e.timeline, v, P, E, C, w, S, D, T, R, I, $, U, F;
978
978
  if (b && (!f || !r) && (r = "none"), e._ease = Ze(r, ot.ease), e._yEase = u ? ar(Ze(u === !0 ? r : u, ot.ease)) : 0, u && e._yoyo && !e._repeat && (u = e._yEase, e._yEase = e._ease, e._ease = u), e._from = !b && !!n.runBackwards, !b || f && !n.stagger) {
979
- if (T = m[0] ? He(m[0]).harness : 0, F = T && n[T.prop], v = Gt(n, Di), d && (d._zTime < 0 && d.progress(1), t < 0 && c && o && !g ? d.render(-1, !0) : d.revert(c && p ? Ut : Zr), d._lazy = 0), s) {
979
+ if (T = m[0] ? He(m[0]).harness : 0, U = T && n[T.prop], v = Gt(n, Di), d && (d._zTime < 0 && d.progress(1), t < 0 && c && o && !g ? d.render(-1, !0) : d.revert(c && p ? Ft : Zr), d._lazy = 0), s) {
980
980
  if (ke(e._startAt = j.set(m, pe({
981
981
  data: "isStart",
982
982
  overwrite: !1,
@@ -989,7 +989,7 @@ var ys = function(e, t, i, n, r, s, o) {
989
989
  return ce(e, "onUpdate");
990
990
  },
991
991
  stagger: 0
992
- }, s))), e._startAt._dp = 0, e._startAt._sat = e, t < 0 && (W || !o && !g) && e._startAt.revert(Ut), o && p && t <= 0 && i <= 0) {
992
+ }, s))), e._startAt._dp = 0, e._startAt._sat = e, t < 0 && (W || !o && !g) && e._startAt.revert(Ft), o && p && t <= 0 && i <= 0) {
993
993
  t && (e._zTime = t);
994
994
  return;
995
995
  }
@@ -1004,22 +1004,22 @@ var ys = function(e, t, i, n, r, s, o) {
1004
1004
  stagger: 0,
1005
1005
  parent: _
1006
1006
  //ensures that nested tweens that had a stagger are handled properly, like gsap.from(".class", {y: gsap.utils.wrap([-100,100]), stagger: 0.5})
1007
- }, v), F && (E[T.prop] = F), ke(e._startAt = j.set(m, E)), e._startAt._dp = 0, e._startAt._sat = e, t < 0 && (W ? e._startAt.revert(Ut) : e._startAt.render(-1, !0)), e._zTime = t, !o)
1007
+ }, v), U && (E[T.prop] = U), ke(e._startAt = j.set(m, E)), e._startAt._dp = 0, e._startAt._sat = e, t < 0 && (W ? e._startAt.revert(Ft) : e._startAt.render(-1, !0)), e._zTime = t, !o)
1008
1008
  a(e._startAt, k, k);
1009
1009
  else if (!t)
1010
1010
  return;
1011
1011
  }
1012
1012
  for (e._pt = e._ptCache = 0, l = p && ie(l) || l && !p, P = 0; P < m.length; P++) {
1013
- if (w = m[P], D = w._gsap || Oi(m)[P]._gsap, e._ptLookup[P] = O = {}, ui[D.id] && Ie.length && $t(), $ = y === m ? P : y.indexOf(w), T && (R = new T()).init(w, F || v, e, $, y) !== !1 && (e._pt = C = new re(e._pt, w, R.name, 0, 1, R.render, R, 0, R.priority), R._props.forEach(function(ee) {
1014
- O[ee] = C;
1015
- }), R.priority && (S = 1)), !T || F)
1013
+ if (w = m[P], D = w._gsap || Ii(m)[P]._gsap, e._ptLookup[P] = I = {}, ui[D.id] && Le.length && $t(), $ = y === m ? P : y.indexOf(w), T && (R = new T()).init(w, U || v, e, $, y) !== !1 && (e._pt = C = new re(e._pt, w, R.name, 0, 1, R.render, R, 0, R.priority), R._props.forEach(function(ee) {
1014
+ I[ee] = C;
1015
+ }), R.priority && (S = 1)), !T || U)
1016
1016
  for (E in v)
1017
- le[E] && (R = cr(E, v, e, $, w, y)) ? R.priority && (S = 1) : O[E] = C = Li.call(e, w, E, "get", v[E], $, y, 0, n.stringFilter);
1018
- e._op && e._op[P] && e.kill(w, e._op[P]), x && e._pt && (Me = e, N.killTweensOf(w, O, e.globalTime(t)), U = !e.parent, Me = 0), e._pt && l && (ui[D.id] = 1);
1017
+ le[E] && (R = cr(E, v, e, $, w, y)) ? R.priority && (S = 1) : I[E] = C = Oi.call(e, w, E, "get", v[E], $, y, 0, n.stringFilter);
1018
+ e._op && e._op[P] && e.kill(w, e._op[P]), x && e._pt && (Me = e, N.killTweensOf(w, I, e.globalTime(t)), F = !e.parent, Me = 0), e._pt && l && (ui[D.id] = 1);
1019
1019
  }
1020
1020
  S && gr(e), e._onInit && e._onInit(e);
1021
1021
  }
1022
- e._onUpdate = h, e._initted = (!e._op || e._pt) && !U, f && t <= 0 && b.render(ge, !0, !0);
1022
+ e._onUpdate = h, e._initted = (!e._op || e._pt) && !F, f && t <= 0 && b.render(ge, !0, !0);
1023
1023
  }, bs = function(e, t, i, n, r, s, o, l) {
1024
1024
  var h = (e._pt && e._ptCache || (e._ptCache = {}))[t], c, u, f, g;
1025
1025
  if (!h)
@@ -1071,8 +1071,8 @@ var j = /* @__PURE__ */ (function(a) {
1071
1071
  function e(i, n, r, s) {
1072
1072
  var o;
1073
1073
  typeof n == "number" && (r.duration = n, n = r, r = null), o = a.call(this, s ? n : xt(n)) || this;
1074
- var l = o.vars, h = l.duration, c = l.delay, u = l.immediateRender, f = l.stagger, g = l.overwrite, p = l.keyframes, d = l.defaults, m = l.scrollTrigger, _ = l.yoyoEase, y = n.parent || N, x = (q(i) || On(i) ? Te(i[0]) : "length" in n) ? [i] : _e(i), b, v, P, E, C, w, S, D;
1075
- if (o._targets = x.length ? Oi(x) : Et("GSAP target " + i + " not found. https://gsap.com", !ue.nullTargetWarn) || [], o._ptLookup = [], o._overwrite = g, p || f || Rt(h) || Rt(c)) {
1074
+ var l = o.vars, h = l.duration, c = l.delay, u = l.immediateRender, f = l.stagger, g = l.overwrite, p = l.keyframes, d = l.defaults, m = l.scrollTrigger, _ = l.yoyoEase, y = n.parent || N, x = (q(i) || In(i) ? Te(i[0]) : "length" in n) ? [i] : _e(i), b, v, P, E, C, w, S, D;
1075
+ if (o._targets = x.length ? Ii(x) : Et("GSAP target " + i + " not found. https://gsap.com", !ue.nullTargetWarn) || [], o._ptLookup = [], o._overwrite = g, p || f || Rt(h) || Rt(c)) {
1076
1076
  if (n = o.vars, b = o.timeline = new J({
1077
1077
  data: "nested",
1078
1078
  defaults: d || {},
@@ -1088,23 +1088,23 @@ var j = /* @__PURE__ */ (function(a) {
1088
1088
  xt(pe(b.vars.defaults, {
1089
1089
  ease: "none"
1090
1090
  })), b._ease = Ze(p.ease || n.ease || "none");
1091
- var T = 0, R, O, $;
1091
+ var T = 0, R, I, $;
1092
1092
  if (q(p))
1093
- p.forEach(function(F) {
1094
- return b.to(x, F, ">");
1093
+ p.forEach(function(U) {
1094
+ return b.to(x, U, ">");
1095
1095
  }), b.duration();
1096
1096
  else {
1097
1097
  P = {};
1098
1098
  for (C in p)
1099
1099
  C === "ease" || C === "easeEach" || Es(C, p[C], P, p.easeEach);
1100
1100
  for (C in P)
1101
- for (R = P[C].sort(function(F, U) {
1102
- return F.t - U.t;
1101
+ for (R = P[C].sort(function(U, F) {
1102
+ return U.t - F.t;
1103
1103
  }), T = 0, v = 0; v < R.length; v++)
1104
- O = R[v], $ = {
1105
- ease: O.e,
1106
- duration: (O.t - (v ? R[v - 1].t : 0)) / 100 * h
1107
- }, $[C] = O.v, b.to(x, $, T), T += $.duration;
1104
+ I = R[v], $ = {
1105
+ ease: I.e,
1106
+ duration: (I.t - (v ? R[v - 1].t : 0)) / 100 * h
1107
+ }, $[C] = I.v, b.to(x, $, T), T += $.duration;
1108
1108
  b.duration() < h && b.to({}, {
1109
1109
  duration: h - b.duration()
1110
1110
  });
@@ -1207,7 +1207,7 @@ ne("staggerTo,staggerFrom,staggerFromTo", function(a) {
1207
1207
  return t.splice(a === "staggerFromTo" ? 5 : 4, 0, 0), e[a].apply(e, t);
1208
1208
  };
1209
1209
  });
1210
- var Ui = function(e, t, i) {
1210
+ var Fi = function(e, t, i) {
1211
1211
  return e[t] = i;
1212
1212
  }, pr = function(e, t, i) {
1213
1213
  return e[t](i);
@@ -1215,8 +1215,8 @@ var Ui = function(e, t, i) {
1215
1215
  return e[t](n.fp, i);
1216
1216
  }, Ps = function(e, t, i) {
1217
1217
  return e.setAttribute(t, i);
1218
- }, Fi = function(e, t) {
1219
- return G(e[t]) ? pr : Ai(e[t]) && e.setAttribute ? Ps : Ui;
1218
+ }, Ui = function(e, t) {
1219
+ return G(e[t]) ? pr : Ai(e[t]) && e.setAttribute ? Ps : Fi;
1220
1220
  }, fr = function(e, t) {
1221
1221
  return t.set(t.t, t.p, Math.round((t.s + t.c * e) * 1e6) / 1e6, t);
1222
1222
  }, Cs = function(e, t) {
@@ -1254,7 +1254,7 @@ var Ui = function(e, t, i) {
1254
1254
  e._pt = r;
1255
1255
  }, re = /* @__PURE__ */ (function() {
1256
1256
  function a(t, i, n, r, s, o, l, h, c) {
1257
- this.t = i, this.s = r, this.c = s, this.p = n, this.r = o || fr, this.d = l || this, this.set = h || Ui, this.pr = c || 0, this._next = t, t && (t._prev = this);
1257
+ this.t = i, this.s = r, this.c = s, this.p = n, this.r = o || fr, this.d = l || this, this.set = h || Fi, this.pr = c || 0, this._next = t, t && (t._prev = this);
1258
1258
  }
1259
1259
  var e = a.prototype;
1260
1260
  return e.modifier = function(i, n, r) {
@@ -1487,7 +1487,7 @@ var Ke = [], zt = {}, Ms = [], tn = 0, Ds = 0, ti = function(e) {
1487
1487
  interpolate: us,
1488
1488
  shuffle: Wn
1489
1489
  },
1490
- install: Fn,
1490
+ install: Un,
1491
1491
  effects: qt,
1492
1492
  ticker: he,
1493
1493
  updateRoot: J.updateRoot,
@@ -1519,15 +1519,15 @@ he.add(J.updateRoot);
1519
1519
  tt = jt.to({}, {
1520
1520
  duration: 0
1521
1521
  });
1522
- var Os = function(e, t) {
1522
+ var Is = function(e, t) {
1523
1523
  for (var i = e._pt; i && i.p !== t && i.op !== t && i.fp !== t; )
1524
1524
  i = i._next;
1525
1525
  return i;
1526
- }, Is = function(e, t) {
1526
+ }, Ls = function(e, t) {
1527
1527
  var i = e._targets, n, r, s;
1528
1528
  for (n in t)
1529
1529
  for (r = i.length; r--; )
1530
- s = e._ptLookup[r][n], s && (s = s.d) && (s._pt && (s = Os(s, n)), s && s.modifier && s.modifier(t[n], e, i[r], n));
1530
+ s = e._ptLookup[r][n], s && (s = s.d) && (s._pt && (s = Is(s, n)), s && s.modifier && s.modifier(t[n], e, i[r], n));
1531
1531
  }, ii = function(e, t) {
1532
1532
  return {
1533
1533
  name: e,
@@ -1545,7 +1545,7 @@ var Os = function(e, t) {
1545
1545
  l[h] = t(r[h]);
1546
1546
  r = l;
1547
1547
  }
1548
- Is(o, r);
1548
+ Ls(o, r);
1549
1549
  };
1550
1550
  }
1551
1551
  };
@@ -1570,7 +1570,7 @@ var Os = function(e, t) {
1570
1570
  }
1571
1571
  }, ii("roundProps", gi), ii("modifiers"), ii("snap", qn)) || jt;
1572
1572
  j.version = J.version = ae.version = "3.13.0";
1573
- Un = 1;
1573
+ Fn = 1;
1574
1574
  Ti() && ut();
1575
1575
  M.Power0;
1576
1576
  M.Power1;
@@ -1590,15 +1590,15 @@ M.Bounce;
1590
1590
  M.Sine;
1591
1591
  M.Expo;
1592
1592
  M.Circ;
1593
- var nn, De, st, Ni, Ve, rn, Bi, Ls = function() {
1593
+ var nn, De, st, Ni, Ve, rn, Bi, Os = function() {
1594
1594
  return typeof window < "u";
1595
- }, Se = {}, Ge = 180 / Math.PI, at = Math.PI / 180, qe = Math.atan2, sn = 1e8, $i = /([A-Z])/g, ks = /(left|right|width|margin|padding|x)/i, Us = /[\s,\(]\S/, ve = {
1595
+ }, Se = {}, Ge = 180 / Math.PI, at = Math.PI / 180, qe = Math.atan2, sn = 1e8, $i = /([A-Z])/g, ks = /(left|right|width|margin|padding|x)/i, Fs = /[\s,\(]\S/, ve = {
1596
1596
  autoAlpha: "opacity,visibility",
1597
1597
  scale: "scaleX,scaleY",
1598
1598
  alpha: "opacity"
1599
1599
  }, xi = function(e, t) {
1600
1600
  return t.set(t.t, t.p, Math.round((t.s + t.c * e) * 1e4) / 1e4 + t.u, t);
1601
- }, Fs = function(e, t) {
1601
+ }, Us = function(e, t) {
1602
1602
  return t.set(t.t, t.p, e === 1 ? t.e : Math.round((t.s + t.c * e) * 1e4) / 1e4 + t.u, t);
1603
1603
  }, zs = function(e, t) {
1604
1604
  return t.set(t.t, t.p, e ? Math.round((t.s + t.c * e) * 1e4) / 1e4 + t.u : t.b, t);
@@ -1674,7 +1674,7 @@ var nn, De, st, Ni, Ve, rn, Bi, Ls = function() {
1674
1674
  ;
1675
1675
  return s < 0 ? null : (s === 3 ? "ms" : s >= 0 ? an[s] : "") + e;
1676
1676
  }, vi = function() {
1677
- Ls() && window.document && (nn = window, De = nn.document, st = De.documentElement, Ve = bi("div") || {
1677
+ Os() && window.document && (nn = window, De = nn.document, st = De.documentElement, Ve = bi("div") || {
1678
1678
  style: {}
1679
1679
  }, bi("div"), B = dt(B), se = B + "Origin", Ve.style.cssText = "border-width:0;line-height:0;position:absolute;padding:0", Er = !!dt("perspective"), Bi = ae.core.reverting, Ni = 1);
1680
1680
  }, on = function(e) {
@@ -1719,7 +1719,7 @@ var nn, De, st, Ni, Ve, rn, Bi, Ls = function() {
1719
1719
  }, Ks = {
1720
1720
  grid: 1,
1721
1721
  flex: 1
1722
- }, Ue = function a(e, t, i, n) {
1722
+ }, Fe = function a(e, t, i, n) {
1723
1723
  var r = parseFloat(i) || 0, s = (i + "").trim().substr((r + "").length) || "px", o = Ve.style, l = ks.test(t), h = e.tagName.toLowerCase() === "svg", c = (h ? "client" : "offset") + (l ? "Width" : "Height"), u = 100, f = n === "px", g = n === "%", p, d, m, _;
1724
1724
  if (n === s || !r || hn[n] || hn[s])
1725
1725
  return r;
@@ -1735,7 +1735,7 @@ var nn, De, st, Ni, Ve, rn, Bi, Ls = function() {
1735
1735
  return l && g && (m = He(d), m.time = he.time, m.width = d[c]), V(f ? p * r / u : p && r ? u / p * r : 0);
1736
1736
  }, Ae = function(e, t, i, n) {
1737
1737
  var r;
1738
- return Ni || vi(), t in ve && t !== "transform" && (t = ve[t], ~t.indexOf(",") && (t = t.split(",")[0])), Se[t] && t !== "transform" ? (r = St(e, n), r = t !== "transformOrigin" ? r[t] : r.svg ? r.origin : Yt(ye(e, se)) + " " + r.zOrigin + "px") : (r = e.style[t], (!r || r === "auto" || n || ~(r + "").indexOf("calc(")) && (r = Ht[t] && Ht[t](e, t, i) || ye(e, t) || Bn(e, t) || (t === "opacity" ? 1 : 0))), i && !~(r + "").trim().indexOf(" ") ? Ue(e, t, r, i) + i : r;
1738
+ return Ni || vi(), t in ve && t !== "transform" && (t = ve[t], ~t.indexOf(",") && (t = t.split(",")[0])), Se[t] && t !== "transform" ? (r = St(e, n), r = t !== "transformOrigin" ? r[t] : r.svg ? r.origin : Yt(ye(e, se)) + " " + r.zOrigin + "px") : (r = e.style[t], (!r || r === "auto" || n || ~(r + "").indexOf("calc(")) && (r = Ht[t] && Ht[t](e, t, i) || ye(e, t) || Bn(e, t) || (t === "opacity" ? 1 : 0))), i && !~(r + "").trim().indexOf(" ") ? Fe(e, t, r, i) + i : r;
1739
1739
  }, Ws = function(e, t, i, n) {
1740
1740
  if (!i || i === "none") {
1741
1741
  var r = dt(t, e, 1), s = r && ye(e, r, 1);
@@ -1744,7 +1744,7 @@ var nn, De, st, Ni, Ve, rn, Bi, Ls = function() {
1744
1744
  var o = new re(this._pt, e.style, t, 0, 1, mr), l = 0, h = 0, c, u, f, g, p, d, m, _, y, x, b, v;
1745
1745
  if (o.b = i, o.e = n, i += "", n += "", n.substring(0, 6) === "var(--" && (n = ye(e, n.substring(4, n.indexOf(")")))), n === "auto" && (d = e.style[t], e.style[t] = n, n = ye(e, t) || n, d ? e.style[t] = d : We(e, t)), c = [i, n], sr(c), i = c[0], n = c[1], f = i.match(et) || [], v = n.match(et) || [], v.length) {
1746
1746
  for (; u = et.exec(n); )
1747
- m = u[0], y = n.substring(l, u.index), p ? p = (p + 1) % 5 : (y.substr(-5) === "rgba(" || y.substr(-5) === "hsla(") && (p = 1), m !== (d = f[h++] || "") && (g = parseFloat(d) || 0, b = d.substr((g + "").length), m.charAt(1) === "=" && (m = rt(g, m) + b), _ = parseFloat(m), x = m.substr((_ + "").length), l = et.lastIndex - x.length, x || (x = x || ue.units[t] || b, l === n.length && (n += x, o.e += x)), b !== x && (g = Ue(e, t, d, x) || 0), o._pt = {
1747
+ m = u[0], y = n.substring(l, u.index), p ? p = (p + 1) % 5 : (y.substr(-5) === "rgba(" || y.substr(-5) === "hsla(") && (p = 1), m !== (d = f[h++] || "") && (g = parseFloat(d) || 0, b = d.substr((g + "").length), m.charAt(1) === "=" && (m = rt(g, m) + b), _ = parseFloat(m), x = m.substr((_ + "").length), l = et.lastIndex - x.length, x || (x = x || ue.units[t] || b, l === n.length && (n += x, o.e += x)), b !== x && (g = Fe(e, t, d, x) || 0), o._pt = {
1748
1748
  _next: o._pt,
1749
1749
  p: y || h === 1 ? y : ",",
1750
1750
  //note: SVG spec allows omission of comma/space when a negative sign is wedged between two numbers, like 2.5-5.3 instead of 2.5,-5.3 but when tweening, the negative value may switch to positive, so we insert the comma just in case.
@@ -1755,7 +1755,7 @@ var nn, De, st, Ni, Ve, rn, Bi, Ls = function() {
1755
1755
  o.c = l < n.length ? n.substring(l, n.length) : "";
1756
1756
  } else
1757
1757
  o.r = t === "display" && n === "none" ? xr : yr;
1758
- return Ln.test(n) && (o.e = 0), this._pt = o, o;
1758
+ return On.test(n) && (o.e = 0), this._pt = o, o;
1759
1759
  }, cn = {
1760
1760
  top: "0%",
1761
1761
  bottom: "100%",
@@ -1849,7 +1849,7 @@ var nn, De, st, Ni, Ve, rn, Bi, Ls = function() {
1849
1849
  return e === "matrix(1, 0, 0, 1, 0, 0)" || e === "none" || !e;
1850
1850
  }, un = function(e) {
1851
1851
  var t = ye(e, B);
1852
- return Ar(t) ? Tt : t.substr(7).match(In).map(V);
1852
+ return Ar(t) ? Tt : t.substr(7).match(Ln).map(V);
1853
1853
  }, Gi = function(e, t) {
1854
1854
  var i = e._gsap || He(e), n = e.style, r = un(e), s, o, l, h;
1855
1855
  return i.svg && e.getAttribute("transform") ? (l = e.transform.baseVal.consolidate().matrix, r = [l.a, l.b, l.c, l.d, l.e, l.f], r.join(",") === "1,0,0,1,0,0" ? Tt : r) : (r === Tt && !e.offsetParent && e !== st && !i.svg && (l = n.display, n.display = "block", s = e.parentNode, (!s || !e.offsetParent && !e.getBoundingClientRect().width) && (h = 1, o = e.nextElementSibling, st.appendChild(e)), r = un(e), l ? n.display = l : We(e, "display"), h && (o ? s.insertBefore(e, o) : s ? s.appendChild(e) : st.removeChild(e))), t && r.length > 6 ? [r[0], r[1], r[4], r[5], r[12], r[13]] : r);
@@ -1860,13 +1860,13 @@ var nn, De, st, Ni, Ve, rn, Bi, Ls = function() {
1860
1860
  var i = e._gsap || new hr(e);
1861
1861
  if ("x" in i && !t && !i.uncache)
1862
1862
  return i;
1863
- var n = e.style, r = i.scaleX < 0, s = "px", o = "deg", l = getComputedStyle(e), h = ye(e, se) || "0", c, u, f, g, p, d, m, _, y, x, b, v, P, E, C, w, S, D, T, R, O, $, F, U, ee, pt, ft, mt, ze, Yi, Pe, Ne;
1864
- return c = u = f = d = m = _ = y = x = b = 0, g = p = 1, i.svg = !!(e.getCTM && Pr(e)), l.translate && ((l.translate !== "none" || l.scale !== "none" || l.rotate !== "none") && (n[B] = (l.translate !== "none" ? "translate3d(" + (l.translate + " 0 0").split(" ").slice(0, 3).join(", ") + ") " : "") + (l.rotate !== "none" ? "rotate(" + l.rotate + ") " : "") + (l.scale !== "none" ? "scale(" + l.scale.split(" ").join(",") + ") " : "") + (l[B] !== "none" ? l[B] : "")), n.scale = n.rotate = n.translate = "none"), E = Gi(e, i.svg), i.svg && (i.uncache ? (ee = e.getBBox(), h = i.xOrigin - ee.x + "px " + (i.yOrigin - ee.y) + "px", U = "") : U = !t && e.getAttribute("data-svg-origin"), Ei(e, U || h, !!U || i.originIsAbsolute, i.smooth !== !1, E)), v = i.xOrigin || 0, P = i.yOrigin || 0, E !== Tt && (D = E[0], T = E[1], R = E[2], O = E[3], c = $ = E[4], u = F = E[5], E.length === 6 ? (g = Math.sqrt(D * D + T * T), p = Math.sqrt(O * O + R * R), d = D || T ? qe(T, D) * Ge : 0, y = R || O ? qe(R, O) * Ge + d : 0, y && (p *= Math.abs(Math.cos(y * at))), i.svg && (c -= v - (v * D + P * R), u -= P - (v * T + P * O))) : (Ne = E[6], Yi = E[7], ft = E[8], mt = E[9], ze = E[10], Pe = E[11], c = E[12], u = E[13], f = E[14], C = qe(Ne, ze), m = C * Ge, C && (w = Math.cos(-C), S = Math.sin(-C), U = $ * w + ft * S, ee = F * w + mt * S, pt = Ne * w + ze * S, ft = $ * -S + ft * w, mt = F * -S + mt * w, ze = Ne * -S + ze * w, Pe = Yi * -S + Pe * w, $ = U, F = ee, Ne = pt), C = qe(-R, ze), _ = C * Ge, C && (w = Math.cos(-C), S = Math.sin(-C), U = D * w - ft * S, ee = T * w - mt * S, pt = R * w - ze * S, Pe = O * S + Pe * w, D = U, T = ee, R = pt), C = qe(T, D), d = C * Ge, C && (w = Math.cos(C), S = Math.sin(C), U = D * w + T * S, ee = $ * w + F * S, T = T * w - D * S, F = F * w - $ * S, D = U, $ = ee), m && Math.abs(m) + Math.abs(d) > 359.9 && (m = d = 0, _ = 180 - _), g = V(Math.sqrt(D * D + T * T + R * R)), p = V(Math.sqrt(F * F + Ne * Ne)), C = qe($, F), y = Math.abs(C) > 2e-4 ? C * Ge : 0, b = Pe ? 1 / (Pe < 0 ? -Pe : Pe) : 0), i.svg && (U = e.getAttribute("transform"), i.forceCSS = e.setAttribute("transform", "") || !Ar(ye(e, B)), U && e.setAttribute("transform", U))), Math.abs(y) > 90 && Math.abs(y) < 270 && (r ? (g *= -1, y += d <= 0 ? 180 : -180, d += d <= 0 ? 180 : -180) : (p *= -1, y += y <= 0 ? 180 : -180)), t = t || i.uncache, i.x = c - ((i.xPercent = c && (!t && i.xPercent || (Math.round(e.offsetWidth / 2) === Math.round(-c) ? -50 : 0))) ? e.offsetWidth * i.xPercent / 100 : 0) + s, i.y = u - ((i.yPercent = u && (!t && i.yPercent || (Math.round(e.offsetHeight / 2) === Math.round(-u) ? -50 : 0))) ? e.offsetHeight * i.yPercent / 100 : 0) + s, i.z = f + s, i.scaleX = V(g), i.scaleY = V(p), i.rotation = V(d) + o, i.rotationX = V(m) + o, i.rotationY = V(_) + o, i.skewX = y + o, i.skewY = x + o, i.transformPerspective = b + s, (i.zOrigin = parseFloat(h.split(" ")[2]) || !t && i.zOrigin || 0) && (n[se] = Yt(h)), i.xOffset = i.yOffset = 0, i.force3D = ue.force3D, i.renderTransform = i.svg ? Js : Er ? Tr : Qs, i.uncache = 0, i;
1863
+ var n = e.style, r = i.scaleX < 0, s = "px", o = "deg", l = getComputedStyle(e), h = ye(e, se) || "0", c, u, f, g, p, d, m, _, y, x, b, v, P, E, C, w, S, D, T, R, I, $, U, F, ee, pt, ft, mt, ze, Yi, Pe, Ne;
1864
+ return c = u = f = d = m = _ = y = x = b = 0, g = p = 1, i.svg = !!(e.getCTM && Pr(e)), l.translate && ((l.translate !== "none" || l.scale !== "none" || l.rotate !== "none") && (n[B] = (l.translate !== "none" ? "translate3d(" + (l.translate + " 0 0").split(" ").slice(0, 3).join(", ") + ") " : "") + (l.rotate !== "none" ? "rotate(" + l.rotate + ") " : "") + (l.scale !== "none" ? "scale(" + l.scale.split(" ").join(",") + ") " : "") + (l[B] !== "none" ? l[B] : "")), n.scale = n.rotate = n.translate = "none"), E = Gi(e, i.svg), i.svg && (i.uncache ? (ee = e.getBBox(), h = i.xOrigin - ee.x + "px " + (i.yOrigin - ee.y) + "px", F = "") : F = !t && e.getAttribute("data-svg-origin"), Ei(e, F || h, !!F || i.originIsAbsolute, i.smooth !== !1, E)), v = i.xOrigin || 0, P = i.yOrigin || 0, E !== Tt && (D = E[0], T = E[1], R = E[2], I = E[3], c = $ = E[4], u = U = E[5], E.length === 6 ? (g = Math.sqrt(D * D + T * T), p = Math.sqrt(I * I + R * R), d = D || T ? qe(T, D) * Ge : 0, y = R || I ? qe(R, I) * Ge + d : 0, y && (p *= Math.abs(Math.cos(y * at))), i.svg && (c -= v - (v * D + P * R), u -= P - (v * T + P * I))) : (Ne = E[6], Yi = E[7], ft = E[8], mt = E[9], ze = E[10], Pe = E[11], c = E[12], u = E[13], f = E[14], C = qe(Ne, ze), m = C * Ge, C && (w = Math.cos(-C), S = Math.sin(-C), F = $ * w + ft * S, ee = U * w + mt * S, pt = Ne * w + ze * S, ft = $ * -S + ft * w, mt = U * -S + mt * w, ze = Ne * -S + ze * w, Pe = Yi * -S + Pe * w, $ = F, U = ee, Ne = pt), C = qe(-R, ze), _ = C * Ge, C && (w = Math.cos(-C), S = Math.sin(-C), F = D * w - ft * S, ee = T * w - mt * S, pt = R * w - ze * S, Pe = I * S + Pe * w, D = F, T = ee, R = pt), C = qe(T, D), d = C * Ge, C && (w = Math.cos(C), S = Math.sin(C), F = D * w + T * S, ee = $ * w + U * S, T = T * w - D * S, U = U * w - $ * S, D = F, $ = ee), m && Math.abs(m) + Math.abs(d) > 359.9 && (m = d = 0, _ = 180 - _), g = V(Math.sqrt(D * D + T * T + R * R)), p = V(Math.sqrt(U * U + Ne * Ne)), C = qe($, U), y = Math.abs(C) > 2e-4 ? C * Ge : 0, b = Pe ? 1 / (Pe < 0 ? -Pe : Pe) : 0), i.svg && (F = e.getAttribute("transform"), i.forceCSS = e.setAttribute("transform", "") || !Ar(ye(e, B)), F && e.setAttribute("transform", F))), Math.abs(y) > 90 && Math.abs(y) < 270 && (r ? (g *= -1, y += d <= 0 ? 180 : -180, d += d <= 0 ? 180 : -180) : (p *= -1, y += y <= 0 ? 180 : -180)), t = t || i.uncache, i.x = c - ((i.xPercent = c && (!t && i.xPercent || (Math.round(e.offsetWidth / 2) === Math.round(-c) ? -50 : 0))) ? e.offsetWidth * i.xPercent / 100 : 0) + s, i.y = u - ((i.yPercent = u && (!t && i.yPercent || (Math.round(e.offsetHeight / 2) === Math.round(-u) ? -50 : 0))) ? e.offsetHeight * i.yPercent / 100 : 0) + s, i.z = f + s, i.scaleX = V(g), i.scaleY = V(p), i.rotation = V(d) + o, i.rotationX = V(m) + o, i.rotationY = V(_) + o, i.skewX = y + o, i.skewY = x + o, i.transformPerspective = b + s, (i.zOrigin = parseFloat(h.split(" ")[2]) || !t && i.zOrigin || 0) && (n[se] = Yt(h)), i.xOffset = i.yOffset = 0, i.force3D = ue.force3D, i.renderTransform = i.svg ? Js : Er ? Tr : Qs, i.uncache = 0, i;
1865
1865
  }, Yt = function(e) {
1866
1866
  return (e = e.split(" "))[0] + " " + e[1];
1867
1867
  }, ni = function(e, t, i) {
1868
1868
  var n = X(t);
1869
- return V(parseFloat(t) + parseFloat(Ue(e, "x", i + "px", n))) + n;
1869
+ return V(parseFloat(t) + parseFloat(Fe(e, "x", i + "px", n))) + n;
1870
1870
  }, Qs = function(e, t) {
1871
1871
  t.z = "0px", t.rotationY = t.rotationX = "0deg", t.force3D = 0, Tr(e, t);
1872
1872
  }, Be = "0deg", gt = "0px", $e = ") ", Tr = function(e, t) {
@@ -1878,10 +1878,10 @@ var nn, De, st, Ni, Ve, rn, Bi, Ls = function() {
1878
1878
  m !== gt && (b += "perspective(" + m + $e), (n || r) && (b += "translate(" + n + "%, " + r + "%) "), (v || s !== gt || o !== gt || l !== gt) && (b += l !== gt || v ? "translate3d(" + s + ", " + o + ", " + l + ") " : "translate(" + s + ", " + o + $e), h !== Be && (b += "rotate(" + h + $e), c !== Be && (b += "rotateY(" + c + $e), u !== Be && (b += "rotateX(" + u + $e), (f !== Be || g !== Be) && (b += "skew(" + f + ", " + g + $e), (p !== 1 || d !== 1) && (b += "scale(" + p + ", " + d + $e), y.style[B] = b || "translate(0, 0)";
1879
1879
  }, Js = function(e, t) {
1880
1880
  var i = t || this, n = i.xPercent, r = i.yPercent, s = i.x, o = i.y, l = i.rotation, h = i.skewX, c = i.skewY, u = i.scaleX, f = i.scaleY, g = i.target, p = i.xOrigin, d = i.yOrigin, m = i.xOffset, _ = i.yOffset, y = i.forceCSS, x = parseFloat(s), b = parseFloat(o), v, P, E, C, w;
1881
- l = parseFloat(l), h = parseFloat(h), c = parseFloat(c), c && (c = parseFloat(c), h += c, l += c), l || h ? (l *= at, h *= at, v = Math.cos(l) * u, P = Math.sin(l) * u, E = Math.sin(l - h) * -f, C = Math.cos(l - h) * f, h && (c *= at, w = Math.tan(h - c), w = Math.sqrt(1 + w * w), E *= w, C *= w, c && (w = Math.tan(c), w = Math.sqrt(1 + w * w), v *= w, P *= w)), v = V(v), P = V(P), E = V(E), C = V(C)) : (v = u, C = f, P = E = 0), (x && !~(s + "").indexOf("px") || b && !~(o + "").indexOf("px")) && (x = Ue(g, "x", s, "px"), b = Ue(g, "y", o, "px")), (p || d || m || _) && (x = V(x + p - (p * v + d * E) + m), b = V(b + d - (p * P + d * C) + _)), (n || r) && (w = g.getBBox(), x = V(x + n / 100 * w.width), b = V(b + r / 100 * w.height)), w = "matrix(" + v + "," + P + "," + E + "," + C + "," + x + "," + b + ")", g.setAttribute("transform", w), y && (g.style[B] = w);
1881
+ l = parseFloat(l), h = parseFloat(h), c = parseFloat(c), c && (c = parseFloat(c), h += c, l += c), l || h ? (l *= at, h *= at, v = Math.cos(l) * u, P = Math.sin(l) * u, E = Math.sin(l - h) * -f, C = Math.cos(l - h) * f, h && (c *= at, w = Math.tan(h - c), w = Math.sqrt(1 + w * w), E *= w, C *= w, c && (w = Math.tan(c), w = Math.sqrt(1 + w * w), v *= w, P *= w)), v = V(v), P = V(P), E = V(E), C = V(C)) : (v = u, C = f, P = E = 0), (x && !~(s + "").indexOf("px") || b && !~(o + "").indexOf("px")) && (x = Fe(g, "x", s, "px"), b = Fe(g, "y", o, "px")), (p || d || m || _) && (x = V(x + p - (p * v + d * E) + m), b = V(b + d - (p * P + d * C) + _)), (n || r) && (w = g.getBBox(), x = V(x + n / 100 * w.width), b = V(b + r / 100 * w.height)), w = "matrix(" + v + "," + P + "," + E + "," + C + "," + x + "," + b + ")", g.setAttribute("transform", w), y && (g.style[B] = w);
1882
1882
  }, ea = function(e, t, i, n, r) {
1883
1883
  var s = 360, o = K(r), l = parseFloat(r) * (o && ~r.indexOf("rad") ? Ge : 1), h = l - n, c = n + h + "deg", u, f;
1884
- return o && (u = r.split("_")[1], u === "short" && (h %= s, h !== h % (s / 2) && (h += h < 0 ? s : -s)), u === "cw" && h < 0 ? h = (h + s * sn) % s - ~~(h / s) * s : u === "ccw" && h > 0 && (h = (h - s * sn) % s - ~~(h / s) * s)), e._pt = f = new re(e._pt, t, i, n, h, Fs), f.e = c, f.u = "deg", e._props.push(i), f;
1884
+ return o && (u = r.split("_")[1], u === "short" && (h %= s, h !== h % (s / 2) && (h += h < 0 ? s : -s)), u === "cw" && h < 0 ? h = (h + s * sn) % s - ~~(h / s) * s : u === "ccw" && h > 0 && (h = (h - s * sn) % s - ~~(h / s) * s)), e._pt = f = new re(e._pt, t, i, n, h, Us), f.e = c, f.u = "deg", e._props.push(i), f;
1885
1885
  }, dn = function(e, t) {
1886
1886
  for (var i in t)
1887
1887
  e[i] = t[i];
@@ -1890,7 +1890,7 @@ var nn, De, st, Ni, Ve, rn, Bi, Ls = function() {
1890
1890
  var n = dn({}, i._gsap), r = "perspective,force3D,transformOrigin,svgOrigin", s = i.style, o, l, h, c, u, f, g, p;
1891
1891
  n.svg ? (h = i.getAttribute("transform"), i.setAttribute("transform", ""), s[B] = t, o = St(i, 1), We(i, B), i.setAttribute("transform", h)) : (h = getComputedStyle(i)[B], s[B] = t, o = St(i, 1), s[B] = h);
1892
1892
  for (l in Se)
1893
- h = n[l], c = o[l], h !== c && r.indexOf(l) < 0 && (g = X(h), p = X(c), u = g !== p ? Ue(i, l, h, p) : parseFloat(h), f = parseFloat(c), e._pt = new re(e._pt, o, l, u, f - u, xi), e._pt.u = p || 0, e._props.push(l));
1893
+ h = n[l], c = o[l], h !== c && r.indexOf(l) < 0 && (g = X(h), p = X(c), u = g !== p ? Fe(i, l, h, p) : parseFloat(h), f = parseFloat(c), e._pt = new re(e._pt, o, l, u, f - u, xi), e._pt.u = p || 0, e._props.push(l));
1894
1894
  dn(o, n);
1895
1895
  };
1896
1896
  ne("padding,margin,Width,Radius", function(a, e) {
@@ -1922,7 +1922,7 @@ var Sr = {
1922
1922
  if (g = typeof c, p = Ht[d], g === "function" && (c = c.call(i, n, e, r), g = typeof c), g === "string" && ~c.indexOf("random(") && (c = Pt(c)), p)
1923
1923
  p(this, e, d, c, i) && (E = 1);
1924
1924
  else if (d.substr(0, 2) === "--")
1925
- h = (getComputedStyle(e).getPropertyValue(d) + "").trim(), c += "", Le.lastIndex = 0, Le.test(h) || (m = X(h), _ = X(c)), _ ? m !== _ && (h = Ue(e, d, h, _) + _) : m && (c += m), this.add(o, "setProperty", h, c, n, r, 0, 0, d), s.push(d), C.push(d, 0, o[d]);
1925
+ h = (getComputedStyle(e).getPropertyValue(d) + "").trim(), c += "", Oe.lastIndex = 0, Oe.test(h) || (m = X(h), _ = X(c)), _ ? m !== _ && (h = Fe(e, d, h, _) + _) : m && (c += m), this.add(o, "setProperty", h, c, n, r, 0, 0, d), s.push(d), C.push(d, 0, o[d]);
1926
1926
  else if (g !== "undefined") {
1927
1927
  if (l && d in l ? (h = typeof l[d] == "function" ? l[d].call(i, n, e, r) : l[d], K(h) && ~h.indexOf("random(") && (h = Pt(h)), X(h + "") || h === "auto" || (h += ue.units[d] || X(Ae(e, d)) || ""), (h + "").charAt(1) === "=" && (h = Ae(e, d))) : h = Ae(e, d), f = parseFloat(h), y = g === "string" && c.charAt(1) === "=" && c.substr(0, 2), y && (c = c.substr(2)), u = parseFloat(c), d in ve && (d === "autoAlpha" && (f === 1 && Ae(e, "visibility") === "hidden" && u && (f = 0), C.push("visibility", 0, o.visibility), Re(this, o, "visibility", f ? "inherit" : "hidden", u ? "inherit" : "hidden", !u)), d !== "scale" && d !== "transform" && (d = ve[d], ~d.indexOf(",") && (d = d.split(",")[0]))), x = d in Se, x) {
1928
1928
  if (this.styles.save(d), g === "string" && c.substring(0, 6) === "var(--" && (c = ye(e, c.substring(4, c.indexOf(")"))), u = parseFloat(c)), b || (v = e._gsap, v.renderTransform && !t.parseTransform || St(e, t.parseTransform), P = t.smoothOrigin !== !1 && v.smooth, b = this._pt = new re(this._pt, o, B, 0, 1, v.renderTransform, v, 0, -1), b.dep = 1), d === "scale")
@@ -1947,8 +1947,8 @@ var Sr = {
1947
1947
  continue;
1948
1948
  }
1949
1949
  } else d in o || (d = dt(d) || d);
1950
- if (x || (u || u === 0) && (f || f === 0) && !Us.test(c) && d in o)
1951
- m = (h + "").substr((f + "").length), u || (u = 0), _ = X(c) || (d in ue.units ? ue.units[d] : m), m !== _ && (f = Ue(e, d, h, _)), this._pt = new re(this._pt, x ? v : o, d, f, (y ? rt(f, y + u) : u) - f, !x && (_ === "px" || d === "zIndex") && t.autoRound !== !1 ? Ns : xi), this._pt.u = _ || 0, m !== _ && _ !== "%" && (this._pt.b = h, this._pt.r = zs);
1950
+ if (x || (u || u === 0) && (f || f === 0) && !Fs.test(c) && d in o)
1951
+ m = (h + "").substr((f + "").length), u || (u = 0), _ = X(c) || (d in ue.units ? ue.units[d] : m), m !== _ && (f = Fe(e, d, h, _)), this._pt = new re(this._pt, x ? v : o, d, f, (y ? rt(f, y + u) : u) - f, !x && (_ === "px" || d === "zIndex") && t.autoRound !== !1 ? Ns : xi), this._pt.u = _ || 0, m !== _ && _ !== "%" && (this._pt.b = h, this._pt.r = zs);
1952
1952
  else if (d in o)
1953
1953
  Ws.call(this, e, d, h, y ? y + c : c);
1954
1954
  else if (d in e)
@@ -1973,7 +1973,7 @@ var Sr = {
1973
1973
  aliases: ve,
1974
1974
  getSetter: function(e, t, i) {
1975
1975
  var n = ve[t];
1976
- return n && n.indexOf(",") < 0 && (t = n), t in Se && t !== se && (e._gsap.x || Ae(e, "x")) ? i && rn === i ? t === "scale" ? Vs : Gs : (rn = i || {}) && (t === "scale" ? js : Hs) : e.style && !Ai(e.style[t]) ? Bs : ~t.indexOf("-") ? $s : Fi(e, t);
1976
+ return n && n.indexOf(",") < 0 && (t = n), t in Se && t !== se && (e._gsap.x || Ae(e, "x")) ? i && rn === i ? t === "scale" ? Vs : Gs : (rn = i || {}) && (t === "scale" ? js : Hs) : e.style && !Ai(e.style[t]) ? Bs : ~t.indexOf("-") ? $s : Ui(e, t);
1977
1977
  },
1978
1978
  core: {
1979
1979
  _removeProperty: We,
@@ -3251,7 +3251,7 @@ class Vi {
3251
3251
  }), e;
3252
3252
  }
3253
3253
  }
3254
- const fn = { type: "change" }, ji = { type: "start" }, Mr = { type: "end" }, Ot = new zr(), mn = new Nr(), fa = Math.cos(70 * Br.DEG2RAD), Y = new oe(), te = 2 * Math.PI, I = {
3254
+ const fn = { type: "change" }, ji = { type: "start" }, Mr = { type: "end" }, It = new zr(), mn = new Nr(), fa = Math.cos(70 * Br.DEG2RAD), Y = new oe(), te = 2 * Math.PI, L = {
3255
3255
  NONE: -1,
3256
3256
  ROTATE: 0,
3257
3257
  DOLLY: 1,
@@ -3261,7 +3261,7 @@ const fn = { type: "change" }, ji = { type: "start" }, Mr = { type: "end" }, Ot
3261
3261
  TOUCH_DOLLY_PAN: 5,
3262
3262
  TOUCH_DOLLY_ROTATE: 6
3263
3263
  }, si = 1e-6;
3264
- class ma extends Fr {
3264
+ class ma extends Ur {
3265
3265
  /**
3266
3266
  * Constructs a new controls instance.
3267
3267
  *
@@ -3269,7 +3269,7 @@ class ma extends Fr {
3269
3269
  * @param {?HTMLElement} domElement - The HTML element used for event listeners.
3270
3270
  */
3271
3271
  constructor(e, t = null) {
3272
- super(e, t), this.state = I.NONE, this.target = new oe(), this.cursor = new oe(), this.minDistance = 0, this.maxDistance = 1 / 0, this.minZoom = 0, this.maxZoom = 1 / 0, this.minTargetRadius = 0, this.maxTargetRadius = 1 / 0, this.minPolarAngle = 0, this.maxPolarAngle = Math.PI, this.minAzimuthAngle = -1 / 0, this.maxAzimuthAngle = 1 / 0, this.enableDamping = !1, this.dampingFactor = 0.05, this.enableZoom = !0, this.zoomSpeed = 1, this.enableRotate = !0, this.rotateSpeed = 1, this.keyRotateSpeed = 1, this.enablePan = !0, this.panSpeed = 1, this.screenSpacePanning = !0, this.keyPanSpeed = 7, this.zoomToCursor = !1, this.autoRotate = !1, this.autoRotateSpeed = 2, this.keys = { LEFT: "ArrowLeft", UP: "ArrowUp", RIGHT: "ArrowRight", BOTTOM: "ArrowDown" }, this.mouseButtons = { LEFT: nt.ROTATE, MIDDLE: nt.DOLLY, RIGHT: nt.PAN }, this.touches = { ONE: Je.ROTATE, TWO: Je.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this._lastPosition = new oe(), this._lastQuaternion = new Zi(), this._lastTargetPosition = new oe(), this._quat = new Zi().setFromUnitVectors(e.up, new oe(0, 1, 0)), this._quatInverse = this._quat.clone().invert(), this._spherical = new Ki(), this._sphericalDelta = new Ki(), this._scale = 1, this._panOffset = new oe(), this._rotateStart = new fe(), this._rotateEnd = new fe(), this._rotateDelta = new fe(), this._panStart = new fe(), this._panEnd = new fe(), this._panDelta = new fe(), this._dollyStart = new fe(), this._dollyEnd = new fe(), this._dollyDelta = new fe(), this._dollyDirection = new oe(), this._mouse = new fe(), this._performCursorZoom = !1, this._pointers = [], this._pointerPositions = {}, this._controlActive = !1, this._onPointerMove = _a.bind(this), this._onPointerDown = ga.bind(this), this._onPointerUp = ya.bind(this), this._onContextMenu = Ca.bind(this), this._onMouseWheel = va.bind(this), this._onKeyDown = Ea.bind(this), this._onTouchStart = wa.bind(this), this._onTouchMove = Pa.bind(this), this._onMouseDown = xa.bind(this), this._onMouseMove = ba.bind(this), this._interceptControlDown = Aa.bind(this), this._interceptControlUp = Ta.bind(this), this.domElement !== null && this.connect(this.domElement), this.update();
3272
+ super(e, t), this.state = L.NONE, this.target = new oe(), this.cursor = new oe(), this.minDistance = 0, this.maxDistance = 1 / 0, this.minZoom = 0, this.maxZoom = 1 / 0, this.minTargetRadius = 0, this.maxTargetRadius = 1 / 0, this.minPolarAngle = 0, this.maxPolarAngle = Math.PI, this.minAzimuthAngle = -1 / 0, this.maxAzimuthAngle = 1 / 0, this.enableDamping = !1, this.dampingFactor = 0.05, this.enableZoom = !0, this.zoomSpeed = 1, this.enableRotate = !0, this.rotateSpeed = 1, this.keyRotateSpeed = 1, this.enablePan = !0, this.panSpeed = 1, this.screenSpacePanning = !0, this.keyPanSpeed = 7, this.zoomToCursor = !1, this.autoRotate = !1, this.autoRotateSpeed = 2, this.keys = { LEFT: "ArrowLeft", UP: "ArrowUp", RIGHT: "ArrowRight", BOTTOM: "ArrowDown" }, this.mouseButtons = { LEFT: nt.ROTATE, MIDDLE: nt.DOLLY, RIGHT: nt.PAN }, this.touches = { ONE: Je.ROTATE, TWO: Je.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this._lastPosition = new oe(), this._lastQuaternion = new Zi(), this._lastTargetPosition = new oe(), this._quat = new Zi().setFromUnitVectors(e.up, new oe(0, 1, 0)), this._quatInverse = this._quat.clone().invert(), this._spherical = new Ki(), this._sphericalDelta = new Ki(), this._scale = 1, this._panOffset = new oe(), this._rotateStart = new fe(), this._rotateEnd = new fe(), this._rotateDelta = new fe(), this._panStart = new fe(), this._panEnd = new fe(), this._panDelta = new fe(), this._dollyStart = new fe(), this._dollyEnd = new fe(), this._dollyDelta = new fe(), this._dollyDirection = new oe(), this._mouse = new fe(), this._performCursorZoom = !1, this._pointers = [], this._pointerPositions = {}, this._controlActive = !1, this._onPointerMove = _a.bind(this), this._onPointerDown = ga.bind(this), this._onPointerUp = ya.bind(this), this._onContextMenu = Ca.bind(this), this._onMouseWheel = va.bind(this), this._onKeyDown = Ea.bind(this), this._onTouchStart = wa.bind(this), this._onTouchMove = Pa.bind(this), this._onMouseDown = xa.bind(this), this._onMouseMove = ba.bind(this), this._interceptControlDown = Aa.bind(this), this._interceptControlUp = Ta.bind(this), this.domElement !== null && this.connect(this.domElement), this.update();
3273
3273
  }
3274
3274
  connect(e) {
3275
3275
  super.connect(e), this.domElement.addEventListener("pointerdown", this._onPointerDown), this.domElement.addEventListener("pointercancel", this._onPointerUp), this.domElement.addEventListener("contextmenu", this._onContextMenu), this.domElement.addEventListener("wheel", this._onMouseWheel, { passive: !1 }), this.domElement.getRootNode().addEventListener("keydown", this._interceptControlDown, { passive: !0, capture: !0 }), this.domElement.style.touchAction = "none";
@@ -3330,11 +3330,11 @@ class ma extends Fr {
3330
3330
  * was called, or the initial state.
3331
3331
  */
3332
3332
  reset() {
3333
- this.target.copy(this.target0), this.object.position.copy(this.position0), this.object.zoom = this.zoom0, this.object.updateProjectionMatrix(), this.dispatchEvent(fn), this.update(), this.state = I.NONE;
3333
+ this.target.copy(this.target0), this.object.position.copy(this.position0), this.object.zoom = this.zoom0, this.object.updateProjectionMatrix(), this.dispatchEvent(fn), this.update(), this.state = L.NONE;
3334
3334
  }
3335
3335
  update(e = null) {
3336
3336
  const t = this.object.position;
3337
- Y.copy(t).sub(this.target), Y.applyQuaternion(this._quat), this._spherical.setFromVector3(Y), this.autoRotate && this.state === I.NONE && this._rotateLeft(this._getAutoRotationAngle(e)), this.enableDamping ? (this._spherical.theta += this._sphericalDelta.theta * this.dampingFactor, this._spherical.phi += this._sphericalDelta.phi * this.dampingFactor) : (this._spherical.theta += this._sphericalDelta.theta, this._spherical.phi += this._sphericalDelta.phi);
3337
+ Y.copy(t).sub(this.target), Y.applyQuaternion(this._quat), this._spherical.setFromVector3(Y), this.autoRotate && this.state === L.NONE && this._rotateLeft(this._getAutoRotationAngle(e)), this.enableDamping ? (this._spherical.theta += this._sphericalDelta.theta * this.dampingFactor, this._spherical.phi += this._sphericalDelta.phi * this.dampingFactor) : (this._spherical.theta += this._sphericalDelta.theta, this._spherical.phi += this._sphericalDelta.phi);
3338
3338
  let i = this.minAzimuthAngle, n = this.maxAzimuthAngle;
3339
3339
  isFinite(i) && isFinite(n) && (i < -Math.PI ? i += te : i > Math.PI && (i -= te), n < -Math.PI ? n += te : n > Math.PI && (n -= te), i <= n ? this._spherical.theta = Math.max(i, Math.min(n, this._spherical.theta)) : this._spherical.theta = this._spherical.theta > (i + n) / 2 ? Math.max(i, this._spherical.theta) : Math.min(n, this._spherical.theta)), this._spherical.phi = Math.max(this.minPolarAngle, Math.min(this.maxPolarAngle, this._spherical.phi)), this._spherical.makeSafe(), this.enableDamping === !0 ? this.target.addScaledVector(this._panOffset, this.dampingFactor) : this.target.add(this._panOffset), this.target.sub(this.cursor), this.target.clampLength(this.minTargetRadius, this.maxTargetRadius), this.target.add(this.cursor);
3340
3340
  let r = !1;
@@ -3360,7 +3360,7 @@ class ma extends Fr {
3360
3360
  h.unproject(this.object), this.object.position.sub(h).add(o), this.object.updateMatrixWorld(), s = Y.length();
3361
3361
  } else
3362
3362
  console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."), this.zoomToCursor = !1;
3363
- s !== null && (this.screenSpacePanning ? this.target.set(0, 0, -1).transformDirection(this.object.matrix).multiplyScalar(s).add(this.object.position) : (Ot.origin.copy(this.object.position), Ot.direction.set(0, 0, -1).transformDirection(this.object.matrix), Math.abs(this.object.up.dot(Ot.direction)) < fa ? this.object.lookAt(this.target) : (mn.setFromNormalAndCoplanarPoint(this.object.up, this.target), Ot.intersectPlane(mn, this.target))));
3363
+ s !== null && (this.screenSpacePanning ? this.target.set(0, 0, -1).transformDirection(this.object.matrix).multiplyScalar(s).add(this.object.position) : (It.origin.copy(this.object.position), It.direction.set(0, 0, -1).transformDirection(this.object.matrix), Math.abs(this.object.up.dot(It.direction)) < fa ? this.object.lookAt(this.target) : (mn.setFromNormalAndCoplanarPoint(this.object.up, this.target), It.intersectPlane(mn, this.target))));
3364
3364
  } else if (this.object.isOrthographicCamera) {
3365
3365
  const s = this.object.zoom;
3366
3366
  this.object.zoom = Math.max(this.minZoom, Math.min(this.maxZoom, this.object.zoom / this._scale)), s !== this.object.zoom && (this.object.updateProjectionMatrix(), r = !0);
@@ -3566,7 +3566,7 @@ function _a(a) {
3566
3566
  function ya(a) {
3567
3567
  switch (this._removePointer(a), this._pointers.length) {
3568
3568
  case 0:
3569
- this.domElement.releasePointerCapture(a.pointerId), this.domElement.removeEventListener("pointermove", this._onPointerMove), this.domElement.removeEventListener("pointerup", this._onPointerUp), this.dispatchEvent(Mr), this.state = I.NONE;
3569
+ this.domElement.releasePointerCapture(a.pointerId), this.domElement.removeEventListener("pointermove", this._onPointerMove), this.domElement.removeEventListener("pointerup", this._onPointerUp), this.dispatchEvent(Mr), this.state = L.NONE;
3570
3570
  break;
3571
3571
  case 1:
3572
3572
  const e = this._pointers[0], t = this._pointerPositions[e];
@@ -3592,49 +3592,49 @@ function xa(a) {
3592
3592
  switch (e) {
3593
3593
  case nt.DOLLY:
3594
3594
  if (this.enableZoom === !1) return;
3595
- this._handleMouseDownDolly(a), this.state = I.DOLLY;
3595
+ this._handleMouseDownDolly(a), this.state = L.DOLLY;
3596
3596
  break;
3597
3597
  case nt.ROTATE:
3598
3598
  if (a.ctrlKey || a.metaKey || a.shiftKey) {
3599
3599
  if (this.enablePan === !1) return;
3600
- this._handleMouseDownPan(a), this.state = I.PAN;
3600
+ this._handleMouseDownPan(a), this.state = L.PAN;
3601
3601
  } else {
3602
3602
  if (this.enableRotate === !1) return;
3603
- this._handleMouseDownRotate(a), this.state = I.ROTATE;
3603
+ this._handleMouseDownRotate(a), this.state = L.ROTATE;
3604
3604
  }
3605
3605
  break;
3606
3606
  case nt.PAN:
3607
3607
  if (a.ctrlKey || a.metaKey || a.shiftKey) {
3608
3608
  if (this.enableRotate === !1) return;
3609
- this._handleMouseDownRotate(a), this.state = I.ROTATE;
3609
+ this._handleMouseDownRotate(a), this.state = L.ROTATE;
3610
3610
  } else {
3611
3611
  if (this.enablePan === !1) return;
3612
- this._handleMouseDownPan(a), this.state = I.PAN;
3612
+ this._handleMouseDownPan(a), this.state = L.PAN;
3613
3613
  }
3614
3614
  break;
3615
3615
  default:
3616
- this.state = I.NONE;
3616
+ this.state = L.NONE;
3617
3617
  }
3618
- this.state !== I.NONE && this.dispatchEvent(ji);
3618
+ this.state !== L.NONE && this.dispatchEvent(ji);
3619
3619
  }
3620
3620
  function ba(a) {
3621
3621
  switch (this.state) {
3622
- case I.ROTATE:
3622
+ case L.ROTATE:
3623
3623
  if (this.enableRotate === !1) return;
3624
3624
  this._handleMouseMoveRotate(a);
3625
3625
  break;
3626
- case I.DOLLY:
3626
+ case L.DOLLY:
3627
3627
  if (this.enableZoom === !1) return;
3628
3628
  this._handleMouseMoveDolly(a);
3629
3629
  break;
3630
- case I.PAN:
3630
+ case L.PAN:
3631
3631
  if (this.enablePan === !1) return;
3632
3632
  this._handleMouseMovePan(a);
3633
3633
  break;
3634
3634
  }
3635
3635
  }
3636
3636
  function va(a) {
3637
- this.enabled === !1 || this.enableZoom === !1 || this.state !== I.NONE || (a.preventDefault(), this.dispatchEvent(ji), this._handleMouseWheel(this._customWheelEvent(a)), this.dispatchEvent(Mr));
3637
+ this.enabled === !1 || this.enableZoom === !1 || this.state !== L.NONE || (a.preventDefault(), this.dispatchEvent(ji), this._handleMouseWheel(this._customWheelEvent(a)), this.dispatchEvent(Mr));
3638
3638
  }
3639
3639
  function Ea(a) {
3640
3640
  this.enabled !== !1 && this._handleKeyDown(a);
@@ -3645,55 +3645,55 @@ function wa(a) {
3645
3645
  switch (this.touches.ONE) {
3646
3646
  case Je.ROTATE:
3647
3647
  if (this.enableRotate === !1) return;
3648
- this._handleTouchStartRotate(a), this.state = I.TOUCH_ROTATE;
3648
+ this._handleTouchStartRotate(a), this.state = L.TOUCH_ROTATE;
3649
3649
  break;
3650
3650
  case Je.PAN:
3651
3651
  if (this.enablePan === !1) return;
3652
- this._handleTouchStartPan(a), this.state = I.TOUCH_PAN;
3652
+ this._handleTouchStartPan(a), this.state = L.TOUCH_PAN;
3653
3653
  break;
3654
3654
  default:
3655
- this.state = I.NONE;
3655
+ this.state = L.NONE;
3656
3656
  }
3657
3657
  break;
3658
3658
  case 2:
3659
3659
  switch (this.touches.TWO) {
3660
3660
  case Je.DOLLY_PAN:
3661
3661
  if (this.enableZoom === !1 && this.enablePan === !1) return;
3662
- this._handleTouchStartDollyPan(a), this.state = I.TOUCH_DOLLY_PAN;
3662
+ this._handleTouchStartDollyPan(a), this.state = L.TOUCH_DOLLY_PAN;
3663
3663
  break;
3664
3664
  case Je.DOLLY_ROTATE:
3665
3665
  if (this.enableZoom === !1 && this.enableRotate === !1) return;
3666
- this._handleTouchStartDollyRotate(a), this.state = I.TOUCH_DOLLY_ROTATE;
3666
+ this._handleTouchStartDollyRotate(a), this.state = L.TOUCH_DOLLY_ROTATE;
3667
3667
  break;
3668
3668
  default:
3669
- this.state = I.NONE;
3669
+ this.state = L.NONE;
3670
3670
  }
3671
3671
  break;
3672
3672
  default:
3673
- this.state = I.NONE;
3673
+ this.state = L.NONE;
3674
3674
  }
3675
- this.state !== I.NONE && this.dispatchEvent(ji);
3675
+ this.state !== L.NONE && this.dispatchEvent(ji);
3676
3676
  }
3677
3677
  function Pa(a) {
3678
3678
  switch (this._trackPointer(a), this.state) {
3679
- case I.TOUCH_ROTATE:
3679
+ case L.TOUCH_ROTATE:
3680
3680
  if (this.enableRotate === !1) return;
3681
3681
  this._handleTouchMoveRotate(a), this.update();
3682
3682
  break;
3683
- case I.TOUCH_PAN:
3683
+ case L.TOUCH_PAN:
3684
3684
  if (this.enablePan === !1) return;
3685
3685
  this._handleTouchMovePan(a), this.update();
3686
3686
  break;
3687
- case I.TOUCH_DOLLY_PAN:
3687
+ case L.TOUCH_DOLLY_PAN:
3688
3688
  if (this.enableZoom === !1 && this.enablePan === !1) return;
3689
3689
  this._handleTouchMoveDollyPan(a), this.update();
3690
3690
  break;
3691
- case I.TOUCH_DOLLY_ROTATE:
3691
+ case L.TOUCH_DOLLY_ROTATE:
3692
3692
  if (this.enableZoom === !1 && this.enableRotate === !1) return;
3693
3693
  this._handleTouchMoveDollyRotate(a), this.update();
3694
3694
  break;
3695
3695
  default:
3696
- this.state = I.NONE;
3696
+ this.state = L.NONE;
3697
3697
  }
3698
3698
  }
3699
3699
  function Ca(a) {
@@ -4121,7 +4121,7 @@ function Ra(a) {
4121
4121
  e[gn(t)] = i;
4122
4122
  }), e;
4123
4123
  }
4124
- const It = 4096, Lt = 2048, Oa = `
4124
+ const Lt = 4096, Ot = 2048, Ia = `
4125
4125
  importScripts('https://unpkg.com/topojson-client@3.1.0/dist/topojson-client.min.js');
4126
4126
 
4127
4127
  self.onmessage = async (e) => {
@@ -4196,7 +4196,7 @@ class it {
4196
4196
  // Static cache to share loaded topology data across instances
4197
4197
  static cache = /* @__PURE__ */ new Map();
4198
4198
  constructor(e, t, i) {
4199
- this.canvas = document.createElement("canvas"), this.canvas.width = It, this.canvas.height = Lt, this.ctx = this.canvas.getContext("2d", { willReadFrequently: !0 }), this.onProgress = t, this.onTextureUpdate = i, this.topologyConfig = {
4199
+ this.canvas = document.createElement("canvas"), this.canvas.width = Lt, this.canvas.height = Ot, this.ctx = this.canvas.getContext("2d", { willReadFrequently: !0 }), this.onProgress = t, this.onTextureUpdate = i, this.topologyConfig = {
4200
4200
  url: e?.url || "https://cdn.jsdelivr.net/npm/world-atlas@2/countries-110m.json",
4201
4201
  objectName: e?.objectName || "countries",
4202
4202
  disableNormalization: e?.disableNormalization || !1,
@@ -4244,7 +4244,7 @@ class it {
4244
4244
  */
4245
4245
  loadInWorker(e, t, i) {
4246
4246
  return new Promise((n, r) => {
4247
- const s = new Blob([Oa], { type: "application/javascript" }), o = URL.createObjectURL(s), l = new Worker(o);
4247
+ const s = new Blob([Ia], { type: "application/javascript" }), o = URL.createObjectURL(s), l = new Worker(o);
4248
4248
  l.onmessage = (h) => {
4249
4249
  URL.revokeObjectURL(o), l.terminate(), h.data.success ? n(h.data.features) : r(new Error(h.data.error));
4250
4250
  }, l.onerror = (h) => {
@@ -4259,6 +4259,14 @@ class it {
4259
4259
  for (; !this.loaded; )
4260
4260
  await new Promise((e) => setTimeout(e, 100));
4261
4261
  }
4262
+ /**
4263
+ * manually set features (e.g. for Urban Mapper)
4264
+ */
4265
+ setFeatures(e) {
4266
+ e.forEach((t) => {
4267
+ t.path || (t.path = this.createPath(t));
4268
+ }), this.countries = e, this.loaded = !0;
4269
+ }
4262
4270
  /**
4263
4271
  * Render a choropleth texture for the given statistic
4264
4272
  * Now supporting Progressive Rendering to prevent UI freezes
@@ -4266,7 +4274,7 @@ class it {
4266
4274
  renderTexture(e) {
4267
4275
  this.currentRenderId++;
4268
4276
  const t = this.currentRenderId;
4269
- if (this.ctx.fillStyle = "rgba(10, 20, 30, 0.9)", this.ctx.fillRect(0, 0, It, Lt), this.onTextureUpdate?.(), !this.loaded)
4277
+ if (this.ctx.fillStyle = "rgba(10, 20, 30, 0.9)", this.ctx.fillRect(0, 0, Lt, Ot), this.onTextureUpdate?.(), !this.loaded)
4270
4278
  return this.canvas;
4271
4279
  const i = this.countries.length < 1500;
4272
4280
  this.ctx.lineWidth = 0.5, this.ctx.strokeStyle = "rgba(0, 0, 0, 0.3)";
@@ -4318,7 +4326,7 @@ class it {
4318
4326
  });
4319
4327
  }
4320
4328
  projectPoint(e, t) {
4321
- const i = (e + 180) / 360 * It, n = (90 - t) / 180 * Lt;
4329
+ const i = (e + 180) / 360 * Lt, n = (90 - t) / 180 * Ot;
4322
4330
  return [i, n];
4323
4331
  }
4324
4332
  interpolateColor(e, t) {
@@ -4343,7 +4351,7 @@ class it {
4343
4351
  renderCustomTexture(e, t, i) {
4344
4352
  this.currentRenderId++;
4345
4353
  const n = this.currentRenderId;
4346
- if (this.ctx.fillStyle = "rgba(10, 20, 30, 0.9)", this.ctx.fillRect(0, 0, It, Lt), this.onTextureUpdate?.(), !this.loaded)
4354
+ if (this.ctx.fillStyle = "rgba(10, 20, 30, 0.9)", this.ctx.fillRect(0, 0, Lt, Ot), this.onTextureUpdate?.(), !this.loaded)
4347
4355
  return this.canvas;
4348
4356
  const r = this.topologyConfig?.disableNormalization ? e instanceof Map ? Object.fromEntries(e) : e : Ra(e), s = this.countries.length < 1500;
4349
4357
  this.ctx.lineWidth = 0.5, this.ctx.strokeStyle = "rgba(0, 0, 0, 0.3)";
@@ -4400,7 +4408,7 @@ class it {
4400
4408
  return [f, d, g, m];
4401
4409
  }
4402
4410
  }
4403
- class Ia extends $r {
4411
+ class La extends $r {
4404
4412
  /**
4405
4413
  * Constructs a new CSS2D object.
4406
4414
  *
@@ -4418,7 +4426,7 @@ class Ia extends $r {
4418
4426
  }
4419
4427
  }
4420
4428
  const Qe = new oe(), _n = new Mn(), yn = new Mn(), xn = new oe(), bn = new oe();
4421
- class La {
4429
+ class Oa {
4422
4430
  /**
4423
4431
  * Constructs a new CSS2D renderer.
4424
4432
  *
@@ -4582,7 +4590,7 @@ const ka = {
4582
4590
  UY: [-33, -56],
4583
4591
  CR: [10, -84],
4584
4592
  PA: [9, -80]
4585
- }, Ua = /* @__PURE__ */ new Set([
4593
+ }, Fa = /* @__PURE__ */ new Set([
4586
4594
  "CN",
4587
4595
  "IN",
4588
4596
  "US",
@@ -4613,7 +4621,7 @@ const ka = {
4613
4621
  "PK",
4614
4622
  "BD",
4615
4623
  "VN"
4616
- ]), Fa = /* @__PURE__ */ new Set(["CN", "IN", "US", "BR", "RU", "AU", "CA"]), za = /* @__PURE__ */ new Set(["RU", "CA", "US", "CN", "BR", "AU"]), Na = /* @__PURE__ */ new Set([
4624
+ ]), Ua = /* @__PURE__ */ new Set(["CN", "IN", "US", "BR", "RU", "AU", "CA"]), za = /* @__PURE__ */ new Set(["RU", "CA", "US", "CN", "BR", "AU"]), Na = /* @__PURE__ */ new Set([
4617
4625
  "IN",
4618
4626
  "AR",
4619
4627
  "KZ",
@@ -4696,7 +4704,7 @@ class $a {
4696
4704
  globe = null;
4697
4705
  camera = null;
4698
4706
  constructor(e, t) {
4699
- this.sphereRadius = t, this.labelRenderer = new La();
4707
+ this.sphereRadius = t, this.labelRenderer = new Oa();
4700
4708
  const i = e.clientWidth || 800, n = e.clientHeight || 600;
4701
4709
  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", this.labelRenderer.domElement.style.zIndex = "5", e.appendChild(this.labelRenderer.domElement), this.labelGroup = new A.Group(), this.injectStyles(), this.createLabels();
4702
4710
  }
@@ -4798,7 +4806,7 @@ class $a {
4798
4806
  if (!t) return;
4799
4807
  const [i, n] = t, r = this.getSizeCategory(e.code), s = document.createElement("div");
4800
4808
  s.className = `country-label hidden size-${r}`, s.textContent = e.name;
4801
- const o = new Ia(s), l = {
4809
+ const o = new La(s), l = {
4802
4810
  element: s,
4803
4811
  object: o,
4804
4812
  country: e,
@@ -4847,10 +4855,10 @@ class $a {
4847
4855
  n = !1;
4848
4856
  break;
4849
4857
  case "minimal":
4850
- n = Fa.has(i);
4858
+ n = Ua.has(i);
4851
4859
  break;
4852
4860
  case "major":
4853
- n = Ua.has(i);
4861
+ n = Fa.has(i);
4854
4862
  break;
4855
4863
  case "all":
4856
4864
  case "capitals":
@@ -4992,13 +5000,13 @@ function ja(a, e, t, i, n = Rr(512), r = new Uint8Array(256), s = new Int32Array
4992
5000
  }
4993
5001
  }
4994
5002
  var Ha = ja;
4995
- function Or(a, e, t) {
5003
+ function Ir(a, e, t) {
4996
5004
  return a << 8 & 63488 | e << 2 & 992 | t >> 3;
4997
5005
  }
4998
- function Ir(a, e, t, i) {
5006
+ function Lr(a, e, t, i) {
4999
5007
  return a >> 4 | e & 240 | (t & 240) << 4 | (i & 240) << 8;
5000
5008
  }
5001
- function Lr(a, e, t) {
5009
+ function Or(a, e, t) {
5002
5010
  return a >> 4 << 8 | e & 240 | t >> 4;
5003
5011
  }
5004
5012
  function kt(a, e, t) {
@@ -5027,15 +5035,15 @@ function oi() {
5027
5035
  function Ya(a, e) {
5028
5036
  let t = e === "rgb444" ? 4096 : 65536, i = new Array(t), n = a.length;
5029
5037
  if (e === "rgba4444") for (let r = 0; r < n; ++r) {
5030
- let s = a[r], o = s >> 24 & 255, l = s >> 16 & 255, h = s >> 8 & 255, c = s & 255, u = Ir(c, h, l, o), f = u in i ? i[u] : i[u] = oi();
5038
+ let s = a[r], o = s >> 24 & 255, l = s >> 16 & 255, h = s >> 8 & 255, c = s & 255, u = Lr(c, h, l, o), f = u in i ? i[u] : i[u] = oi();
5031
5039
  f.rc += c, f.gc += h, f.bc += l, f.ac += o, f.cnt++;
5032
5040
  }
5033
5041
  else if (e === "rgb444") for (let r = 0; r < n; ++r) {
5034
- let s = a[r], o = s >> 16 & 255, l = s >> 8 & 255, h = s & 255, c = Lr(h, l, o), u = c in i ? i[c] : i[c] = oi();
5042
+ let s = a[r], o = s >> 16 & 255, l = s >> 8 & 255, h = s & 255, c = Or(h, l, o), u = c in i ? i[c] : i[c] = oi();
5035
5043
  u.rc += h, u.gc += l, u.bc += o, u.cnt++;
5036
5044
  }
5037
5045
  else for (let r = 0; r < n; ++r) {
5038
- let s = a[r], o = s >> 16 & 255, l = s >> 8 & 255, h = s & 255, c = Or(h, l, o), u = c in i ? i[c] : i[c] = oi();
5046
+ let s = a[r], o = s >> 16 & 255, l = s >> 8 & 255, h = s & 255, c = Ir(h, l, o), u = c in i ? i[c] : i[c] = oi();
5039
5047
  u.rc += h, u.gc += l, u.bc += o, u.cnt++;
5040
5048
  }
5041
5049
  return i;
@@ -5046,10 +5054,10 @@ function Za(a, e, t = {}) {
5046
5054
  if (!(a instanceof Uint8Array) && !(a instanceof Uint8ClampedArray)) throw new Error("quantize() expected RGBA Uint8Array data");
5047
5055
  let l = new Uint32Array(a.buffer), h = t.useSqrt !== !1, c = i === "rgba4444", u = Ya(l, i), f = u.length, g = f - 1, p = new Uint32Array(f + 1);
5048
5056
  for (var d = 0, m = 0; m < f; ++m) {
5049
- let O = u[m];
5050
- if (O != null) {
5051
- var _ = 1 / O.cnt;
5052
- c && (O.ac *= _), O.rc *= _, O.gc *= _, O.bc *= _, u[d++] = O;
5057
+ let I = u[m];
5058
+ if (I != null) {
5059
+ var _ = 1 / I.cnt;
5060
+ c && (I.ac *= _), I.rc *= _, I.gc *= _, I.bc *= _, u[d++] = I;
5053
5061
  }
5054
5062
  }
5055
5063
  Nt(e) / d < 0.022 && (h = !1);
@@ -5078,9 +5086,9 @@ function Za(a, e, t = {}) {
5078
5086
  let T = [];
5079
5087
  var R = 0;
5080
5088
  for (m = 0; ; ++R) {
5081
- let O = kt(Math.round(u[m].rc), 0, 255), $ = kt(Math.round(u[m].gc), 0, 255), F = kt(Math.round(u[m].bc), 0, 255), U = 255;
5082
- c && (U = kt(Math.round(u[m].ac), 0, 255), o && (U = U <= (typeof o == "number" ? o : 127) ? 0 : 255), n && U <= s && (O = $ = F = r, U = 0));
5083
- let ee = c ? [O, $, F, U] : [O, $, F];
5089
+ let I = kt(Math.round(u[m].rc), 0, 255), $ = kt(Math.round(u[m].gc), 0, 255), U = kt(Math.round(u[m].bc), 0, 255), F = 255;
5090
+ c && (F = kt(Math.round(u[m].ac), 0, 255), o && (F = F <= (typeof o == "number" ? o : 127) ? 0 : 255), n && F <= s && (I = $ = U = r, F = 0));
5091
+ let ee = c ? [I, $, U, F] : [I, $, U];
5084
5092
  if (Ka(T, ee) || T.push(ee), (m = u[m].fw) == 0) break;
5085
5093
  }
5086
5094
  return T;
@@ -5098,11 +5106,11 @@ function Wa(a, e, t = "rgb565") {
5098
5106
  if (e.length > 256) throw new Error("applyPalette() only works with 256 colors or less");
5099
5107
  let i = new Uint32Array(a.buffer), n = i.length, r = t === "rgb444" ? 4096 : 65536, s = new Uint8Array(n), o = new Array(r);
5100
5108
  if (t === "rgba4444") for (let l = 0; l < n; l++) {
5101
- let h = i[l], c = h >> 24 & 255, u = h >> 16 & 255, f = h >> 8 & 255, g = h & 255, p = Ir(g, f, u, c), d = p in o ? o[p] : o[p] = Xa(g, f, u, c, e);
5109
+ let h = i[l], c = h >> 24 & 255, u = h >> 16 & 255, f = h >> 8 & 255, g = h & 255, p = Lr(g, f, u, c), d = p in o ? o[p] : o[p] = Xa(g, f, u, c, e);
5102
5110
  s[l] = d;
5103
5111
  }
5104
5112
  else {
5105
- let l = t === "rgb444" ? Lr : Or;
5113
+ let l = t === "rgb444" ? Or : Ir;
5106
5114
  for (let h = 0; h < n; h++) {
5107
5115
  let c = i[h], u = c >> 16 & 255, f = c >> 8 & 255, g = c & 255, p = l(g, f, u), d = p in o ? o[p] : o[p] = qa(g, f, u, e);
5108
5116
  s[h] = d;
@@ -5171,14 +5179,14 @@ function Qa(a = {}) {
5171
5179
  function Ja(a, e, t, i, n) {
5172
5180
  a.writeByte(33), a.writeByte(249), a.writeByte(4), n < 0 && (n = 0, i = !1);
5173
5181
  var r, s;
5174
- i ? (r = 1, s = 2) : (r = 0, s = 0), e >= 0 && (s = e & 7), s <<= 2, a.writeByte(0 | s | 0 | r), Oe(a, t), a.writeByte(n || 0), a.writeByte(0);
5182
+ i ? (r = 1, s = 2) : (r = 0, s = 0), e >= 0 && (s = e & 7), s <<= 2, a.writeByte(0 | s | 0 | r), Ie(a, t), a.writeByte(n || 0), a.writeByte(0);
5175
5183
  }
5176
5184
  function eo(a, e, t, i, n = 8) {
5177
5185
  let r = 1, s = 0, o = Hi(i.length) - 1, l = r << 7 | n - 1 << 4 | s << 3 | o;
5178
- Oe(a, e), Oe(a, t), a.writeBytes([l, 0, 0]);
5186
+ Ie(a, e), Ie(a, t), a.writeBytes([l, 0, 0]);
5179
5187
  }
5180
5188
  function to(a, e) {
5181
- a.writeByte(33), a.writeByte(255), a.writeByte(11), kr(a, "NETSCAPE2.0"), a.writeByte(3), a.writeByte(1), Oe(a, e), a.writeByte(0);
5189
+ a.writeByte(33), a.writeByte(255), a.writeByte(11), kr(a, "NETSCAPE2.0"), a.writeByte(3), a.writeByte(1), Ie(a, e), a.writeByte(0);
5182
5190
  }
5183
5191
  function wn(a, e) {
5184
5192
  let t = 1 << Hi(e.length);
@@ -5188,7 +5196,7 @@ function wn(a, e) {
5188
5196
  }
5189
5197
  }
5190
5198
  function io(a, e, t, i) {
5191
- if (a.writeByte(44), Oe(a, 0), Oe(a, 0), Oe(a, e), Oe(a, t), i) {
5199
+ if (a.writeByte(44), Ie(a, 0), Ie(a, 0), Ie(a, e), Ie(a, t), i) {
5192
5200
  let n = 0, r = 0, s = Hi(i.length) - 1;
5193
5201
  a.writeByte(128 | n | r | 0 | s);
5194
5202
  } else a.writeByte(0);
@@ -5196,7 +5204,7 @@ function io(a, e, t, i) {
5196
5204
  function no(a, e, t, i, n = 8, r, s, o) {
5197
5205
  Ha(t, i, e, n, a, r, s, o);
5198
5206
  }
5199
- function Oe(a, e) {
5207
+ function Ie(a, e) {
5200
5208
  a.writeByte(e & 255), a.writeByte(e >> 8 & 255);
5201
5209
  }
5202
5210
  function kr(a, e) {
@@ -5449,14 +5457,14 @@ const Pn = {
5449
5457
  index: (a) => a.toFixed(3),
5450
5458
  "": (a) => a.toFixed(3)
5451
5459
  }, so = ["per capita", "per 100", "per 1000"];
5452
- function Ur(a) {
5460
+ function Fr(a) {
5453
5461
  return Pn[a] ? Pn[a] : so.some((e) => a.includes(e)) ? (e) => `${e.toFixed(1)}` : (e) => {
5454
5462
  const t = Number.isInteger(e) ? e.toLocaleString() : e.toFixed(1);
5455
5463
  return a ? `${t} ${a}` : t;
5456
5464
  };
5457
5465
  }
5458
- function bo(a, e, t) {
5459
- return (t ?? Ur(e))(a);
5466
+ function Eo(a, e, t) {
5467
+ return (t ?? Fr(e))(a);
5460
5468
  }
5461
5469
  let Cn = !1;
5462
5470
  function ao() {
@@ -5627,7 +5635,7 @@ class oo {
5627
5635
  t.textContent = e.name, s.textContent = e.description;
5628
5636
  const [o, l, h] = e.colorScale;
5629
5637
  i.style.background = `linear-gradient(to right, ${o}, ${l}, ${h})`;
5630
- const c = e.format ?? Ur(e.unit);
5638
+ const c = e.format ?? Fr(e.unit);
5631
5639
  n.textContent = c(e.domain[0]), r.textContent = c(e.domain[1]), this.element.classList.add("visible"), this.visible = !0;
5632
5640
  }
5633
5641
  hide() {
@@ -6487,6 +6495,102 @@ const Pi = {
6487
6495
  }
6488
6496
  };
6489
6497
  Pi.lifeExpectancy;
6498
+ const xo = "https://raw.githubusercontent.com/nvkelso/natural-earth-vector/master/geojson/ne_10m_urban_areas.geojson";
6499
+ class bo {
6500
+ static urbanFeatures = null;
6501
+ static isLoading = !1;
6502
+ static loadPromise = null;
6503
+ /**
6504
+ * Load the base urban areas topology
6505
+ */
6506
+ static async loadBaseTopology() {
6507
+ return this.urbanFeatures ? this.urbanFeatures : this.loadPromise ? this.loadPromise : (this.isLoading = !0, this.loadPromise = (async () => {
6508
+ try {
6509
+ const e = await fetch(xo);
6510
+ if (!e.ok) throw new Error("Failed to load urban areas");
6511
+ const t = await e.json();
6512
+ return this.urbanFeatures = t.features, this.urbanFeatures || [];
6513
+ } catch (e) {
6514
+ return console.error("UrbanMapper load error:", e), [];
6515
+ } finally {
6516
+ this.isLoading = !1;
6517
+ }
6518
+ })(), this.loadPromise);
6519
+ }
6520
+ /**
6521
+ * Generate a synthetic circular polygon (approximate) for a point
6522
+ * @param lat Latitude
6523
+ * @param lon Longitude
6524
+ * @param radiusKm Radius in km (default 5km)
6525
+ */
6526
+ static generateSyntheticBoundary(e, t, i = 5) {
6527
+ const r = [], o = i / 6371 * (180 / Math.PI), l = o / Math.cos(e * Math.PI / 180);
6528
+ for (let h = 0; h <= 16; h++) {
6529
+ const c = h / 16 * 2 * Math.PI, u = e + o * Math.sin(c), f = t + l * Math.cos(c);
6530
+ r.push([f, u]);
6531
+ }
6532
+ return {
6533
+ type: "Feature",
6534
+ id: `synthetic_${e.toFixed(4)}_${t.toFixed(4)}`,
6535
+ properties: {
6536
+ name: "Unknown City",
6537
+ featurecla: "Synthetic Urban Area"
6538
+ },
6539
+ geometry: {
6540
+ type: "Polygon",
6541
+ coordinates: [r]
6542
+ }
6543
+ };
6544
+ }
6545
+ /**
6546
+ * Map points to urban areas or generate synthetic ones
6547
+ */
6548
+ static async mapPointsToTopology(e) {
6549
+ const t = await this.loadBaseTopology(), i = [], n = {}, r = /* @__PURE__ */ new Set();
6550
+ for (const s of e) {
6551
+ let o = null;
6552
+ for (const l of t)
6553
+ if (this.isPointInFeature(s, l)) {
6554
+ o = l;
6555
+ break;
6556
+ }
6557
+ if (o) {
6558
+ const l = o.properties.name_conve || o.properties.name || `ua_${Math.random()}`, h = r.has(l) ? null : JSON.parse(JSON.stringify(o));
6559
+ h && (h.id = l, i.push(h), r.add(l)), n[l] = (n[l] || 0) + s.value;
6560
+ } else {
6561
+ const l = this.generateSyntheticBoundary(s.lat, s.lon);
6562
+ s.id && (l.id = s.id), i.push(l), n[l.id] = s.value;
6563
+ }
6564
+ }
6565
+ return {
6566
+ features: i,
6567
+ statistics: n
6568
+ };
6569
+ }
6570
+ // Minimal Ray-Casting algorithm for Polygon/MultiPolygon
6571
+ static isPointInFeature(e, t) {
6572
+ const { lat: i, lon: n } = e, r = t.geometry;
6573
+ if (!r) return !1;
6574
+ const s = r.coordinates;
6575
+ if (r.type === "Polygon")
6576
+ return this.pointInPolygon([n, i], s);
6577
+ if (r.type === "MultiPolygon") {
6578
+ for (const o of s)
6579
+ if (this.pointInPolygon([n, i], o)) return !0;
6580
+ }
6581
+ return !1;
6582
+ }
6583
+ static pointInPolygon(e, t) {
6584
+ const i = e[0], n = e[1];
6585
+ let r = !1;
6586
+ const s = t[0];
6587
+ for (let o = 0, l = s.length - 1; o < s.length; l = o++) {
6588
+ const h = s[o][0], c = s[o][1], u = s[l][0], f = s[l][1];
6589
+ c > n != f > n && i < (u - h) * (n - c) / (f - c) + h && (r = !r);
6590
+ }
6591
+ return r;
6592
+ }
6593
+ }
6490
6594
  const Tn = {
6491
6595
  satellite: "https://raw.githubusercontent.com/mrdoob/three.js/dev/examples/textures/planets/earth_atmos_2048.jpg",
6492
6596
  natural: "https://raw.githubusercontent.com/mrdoob/three.js/dev/examples/textures/planets/earth_day_4096.jpg",
@@ -6510,7 +6614,7 @@ const Tn = {
6510
6614
  },
6511
6615
  extrudeHeight: !1
6512
6616
  };
6513
- class vo {
6617
+ class wo {
6514
6618
  container;
6515
6619
  config;
6516
6620
  // Three.js core
@@ -6946,6 +7050,20 @@ class vo {
6946
7050
  setMarkers(e, t) {
6947
7051
  this.markerLayer ? t && this.markerLayer.setConfig(t) : (this.markerLayer = new yo(t), this.scene.add(this.markerLayer.getGroup()), this.markerLayer.setMorph(this.morph)), this.markerLayer.setMarkers(e);
6948
7052
  }
7053
+ async setUrbanData(e) {
7054
+ if (!this.choropleth) return;
7055
+ const t = await bo.mapPointsToTopology(e);
7056
+ this.choropleth.setFeatures(t.features);
7057
+ const i = [
7058
+ "#ffffb2",
7059
+ "#fd8d3c",
7060
+ "#bd0026"
7061
+ ], n = Object.values(t.statistics), r = Math.max(...n, 1);
7062
+ this.choropleth.renderCustomTexture(t.statistics, i, [
7063
+ 0,
7064
+ r
7065
+ ]), this.material && (this.material.uniforms.uCityLights.value = 1, this.config.effects.cityLights = !0);
7066
+ }
6949
7067
  resize(e, t) {
6950
7068
  this.config.width = e, this.config.height = t, this.handleResize();
6951
7069
  }
@@ -6964,10 +7082,10 @@ class vo {
6964
7082
  }
6965
7083
  export {
6966
7084
  Pi as BUILT_IN_STATISTICS,
6967
- vo as GlobeViz,
7085
+ wo as GlobeViz,
6968
7086
  Dr as WORLD_STATISTICS,
6969
- Ur as createFormatter,
6970
- bo as formatValue,
7087
+ Fr as createFormatter,
7088
+ Eo as formatValue,
6971
7089
  Ra as normalizeCountryValues,
6972
7090
  gn as toNumericCode
6973
7091
  };