@cosmos.gl/graph 2.0.0 → 2.1.0

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/index.js CHANGED
@@ -6,7 +6,7 @@ const Df = {
6
6
  xml: "http://www.w3.org/XML/1998/namespace",
7
7
  xmlns: "http://www.w3.org/2000/xmlns/"
8
8
  };
9
- function Wi(t) {
9
+ function qi(t) {
10
10
  var e = t += "", n = e.indexOf(":");
11
11
  return n >= 0 && (e = t.slice(0, n)) !== "xmlns" && (t = t.slice(n + 1)), Df.hasOwnProperty(e) ? { space: Df[e], local: t } : t;
12
12
  }
@@ -22,7 +22,7 @@ function Ld(t) {
22
22
  };
23
23
  }
24
24
  function wu(t) {
25
- var e = Wi(t);
25
+ var e = qi(t);
26
26
  return (e.local ? Ld : Fd)(e);
27
27
  }
28
28
  function zd() {
@@ -37,7 +37,7 @@ function Id(t) {
37
37
  for (var e = this._groups, n = e.length, r = new Array(n), i = 0; i < n; ++i)
38
38
  for (var o = e[i], f = o.length, s = r[i] = new Array(f), u, c, v = 0; v < f; ++v)
39
39
  (u = o[v]) && (c = t.call(u, u.__data__, v, o)) && ("__data__" in u && (c.__data__ = u.__data__), s[v] = c);
40
- return new Gt(r, this._parents);
40
+ return new Nt(r, this._parents);
41
41
  }
42
42
  function Rd(t) {
43
43
  return t == null ? [] : Array.isArray(t) ? t : Array.from(t);
@@ -60,7 +60,7 @@ function Od(t) {
60
60
  for (var e = this._groups, n = e.length, r = [], i = [], o = 0; o < n; ++o)
61
61
  for (var f = e[o], s = f.length, u, c = 0; c < s; ++c)
62
62
  (u = f[c]) && (r.push(t.call(u, u.__data__, c, f)), i.push(u));
63
- return new Gt(r, i);
63
+ return new Nt(r, i);
64
64
  }
65
65
  function Au(t) {
66
66
  return function() {
@@ -72,17 +72,17 @@ function Eu(t) {
72
72
  return e.matches(t);
73
73
  };
74
74
  }
75
- var Gd = Array.prototype.find;
76
- function Nd(t) {
75
+ var Nd = Array.prototype.find;
76
+ function Gd(t) {
77
77
  return function() {
78
- return Gd.call(this.children, t);
78
+ return Nd.call(this.children, t);
79
79
  };
80
80
  }
81
81
  function Bd() {
82
82
  return this.firstElementChild;
83
83
  }
84
84
  function Vd(t) {
85
- return this.select(t == null ? Bd : Nd(typeof t == "function" ? t : Eu(t)));
85
+ return this.select(t == null ? Bd : Gd(typeof t == "function" ? t : Eu(t)));
86
86
  }
87
87
  var $d = Array.prototype.filter;
88
88
  function Ud() {
@@ -101,19 +101,19 @@ function Hd(t) {
101
101
  for (var e = this._groups, n = e.length, r = new Array(n), i = 0; i < n; ++i)
102
102
  for (var o = e[i], f = o.length, s = r[i] = [], u, c = 0; c < f; ++c)
103
103
  (u = o[c]) && t.call(u, u.__data__, c, o) && s.push(u);
104
- return new Gt(r, this._parents);
104
+ return new Nt(r, this._parents);
105
105
  }
106
106
  function Cu(t) {
107
107
  return new Array(t.length);
108
108
  }
109
- function Wd() {
110
- return new Gt(this._enter || this._groups.map(Cu), this._parents);
109
+ function qd() {
110
+ return new Nt(this._enter || this._groups.map(Cu), this._parents);
111
111
  }
112
- function Gi(t, e) {
112
+ function Ni(t, e) {
113
113
  this.ownerDocument = t.ownerDocument, this.namespaceURI = t.namespaceURI, this._next = null, this._parent = t, this.__data__ = e;
114
114
  }
115
- Gi.prototype = {
116
- constructor: Gi,
115
+ Ni.prototype = {
116
+ constructor: Ni,
117
117
  appendChild: function(t) {
118
118
  return this._parent.insertBefore(t, this._next);
119
119
  },
@@ -127,14 +127,14 @@ Gi.prototype = {
127
127
  return this._parent.querySelectorAll(t);
128
128
  }
129
129
  };
130
- function qd(t) {
130
+ function Wd(t) {
131
131
  return function() {
132
132
  return t;
133
133
  };
134
134
  }
135
135
  function Yd(t, e, n, r, i, o) {
136
136
  for (var f = 0, s, u = e.length, c = o.length; f < c; ++f)
137
- (s = e[f]) ? (s.__data__ = o[f], r[f] = s) : n[f] = new Gi(t, o[f]);
137
+ (s = e[f]) ? (s.__data__ = o[f], r[f] = s) : n[f] = new Ni(t, o[f]);
138
138
  for (; f < u; ++f)
139
139
  (s = e[f]) && (i[f] = s);
140
140
  }
@@ -143,7 +143,7 @@ function Zd(t, e, n, r, i, o, f) {
143
143
  for (s = 0; s < v; ++s)
144
144
  (u = e[s]) && (S[s] = D = f.call(u, u.__data__, s, e) + "", c.has(D) ? i[s] = u : c.set(D, u));
145
145
  for (s = 0; s < b; ++s)
146
- D = f.call(t, o[s], s, o) + "", (u = c.get(D)) ? (r[s] = u, u.__data__ = o[s], c.delete(D)) : n[s] = new Gi(t, o[s]);
146
+ D = f.call(t, o[s], s, o) + "", (u = c.get(D)) ? (r[s] = u, u.__data__ = o[s], c.delete(D)) : n[s] = new Ni(t, o[s]);
147
147
  for (s = 0; s < v; ++s)
148
148
  (u = e[s]) && c.get(S[s]) === u && (i[s] = u);
149
149
  }
@@ -153,23 +153,23 @@ function Qd(t) {
153
153
  function Kd(t, e) {
154
154
  if (!arguments.length) return Array.from(this, Qd);
155
155
  var n = e ? Zd : Yd, r = this._parents, i = this._groups;
156
- typeof t != "function" && (t = qd(t));
156
+ typeof t != "function" && (t = Wd(t));
157
157
  for (var o = i.length, f = new Array(o), s = new Array(o), u = new Array(o), c = 0; c < o; ++c) {
158
158
  var v = r[c], b = i[c], S = b.length, D = Jd(t.call(v, v && v.__data__, c, r)), Z = D.length, we = s[c] = new Array(Z), Se = f[c] = new Array(Z), ae = u[c] = new Array(S);
159
159
  n(v, b, we, Se, ae, D, e);
160
- for (var Ne = 0, Xe = 0, q, le; Ne < Z; ++Ne)
161
- if (q = we[Ne]) {
162
- for (Ne >= Xe && (Xe = Ne + 1); !(le = Se[Xe]) && ++Xe < Z; ) ;
163
- q._next = le || null;
160
+ for (var Ge = 0, Xe = 0, W, le; Ge < Z; ++Ge)
161
+ if (W = we[Ge]) {
162
+ for (Ge >= Xe && (Xe = Ge + 1); !(le = Se[Xe]) && ++Xe < Z; ) ;
163
+ W._next = le || null;
164
164
  }
165
165
  }
166
- return f = new Gt(f, r), f._enter = s, f._exit = u, f;
166
+ return f = new Nt(f, r), f._enter = s, f._exit = u, f;
167
167
  }
168
168
  function Jd(t) {
169
169
  return typeof t == "object" && "length" in t ? t : Array.from(t);
170
170
  }
171
171
  function em() {
172
- return new Gt(this._exit || this._groups.map(Cu), this._parents);
172
+ return new Nt(this._exit || this._groups.map(Cu), this._parents);
173
173
  }
174
174
  function tm(t, e, n) {
175
175
  var r = this.enter(), i = this, o = this.exit();
@@ -181,7 +181,7 @@ function nm(t) {
181
181
  (D = c[Z] || v[Z]) && (S[Z] = D);
182
182
  for (; u < i; ++u)
183
183
  s[u] = n[u];
184
- return new Gt(s, this._parents);
184
+ return new Nt(s, this._parents);
185
185
  }
186
186
  function rm() {
187
187
  for (var t = this._groups, e = -1, n = t.length; ++e < n; )
@@ -199,7 +199,7 @@ function im(t) {
199
199
  (c = f[v]) && (u[v] = c);
200
200
  u.sort(e);
201
201
  }
202
- return new Gt(i, this._parents).order();
202
+ return new Nt(i, this._parents).order();
203
203
  }
204
204
  function om(t, e) {
205
205
  return t < e ? -1 : t > e ? 1 : t >= e ? 0 : NaN;
@@ -266,7 +266,7 @@ function gm(t, e) {
266
266
  };
267
267
  }
268
268
  function ym(t, e) {
269
- var n = Wi(t);
269
+ var n = qi(t);
270
270
  if (arguments.length < 2) {
271
271
  var r = this.node();
272
272
  return n.local ? r.getAttributeNS(n.space, n.local) : r.getAttribute(n);
@@ -399,14 +399,14 @@ function Om(t) {
399
399
  this.innerHTML = e ?? "";
400
400
  };
401
401
  }
402
- function Gm(t) {
402
+ function Nm(t) {
403
403
  return arguments.length ? this.each(t == null ? Dm : (typeof t == "function" ? Om : Mm)(t)) : this.node().innerHTML;
404
404
  }
405
- function Nm() {
405
+ function Gm() {
406
406
  this.nextSibling && this.parentNode.appendChild(this);
407
407
  }
408
408
  function Bm() {
409
- return this.each(Nm);
409
+ return this.each(Gm);
410
410
  }
411
411
  function Vm() {
412
412
  this.previousSibling && this.parentNode.insertBefore(this, this.parentNode.firstChild);
@@ -433,10 +433,10 @@ function Hm() {
433
433
  var t = this.parentNode;
434
434
  t && t.removeChild(this);
435
435
  }
436
- function Wm() {
436
+ function qm() {
437
437
  return this.each(Hm);
438
438
  }
439
- function qm() {
439
+ function Wm() {
440
440
  var t = this.cloneNode(!1), e = this.parentNode;
441
441
  return e ? e.insertBefore(t, this.nextSibling) : t;
442
442
  }
@@ -445,7 +445,7 @@ function Ym() {
445
445
  return e ? e.insertBefore(t, this.nextSibling) : t;
446
446
  }
447
447
  function Zm(t) {
448
- return this.select(t ? Ym : qm);
448
+ return this.select(t ? Ym : Wm);
449
449
  }
450
450
  function Qm(t) {
451
451
  return arguments.length ? this.property("__data__", t) : this.node().__data__;
@@ -522,24 +522,24 @@ function* ap() {
522
522
  (f = r[i]) && (yield f);
523
523
  }
524
524
  var Ru = [null];
525
- function Gt(t, e) {
525
+ function Nt(t, e) {
526
526
  this._groups = t, this._parents = e;
527
527
  }
528
528
  function Or() {
529
- return new Gt([[document.documentElement]], Ru);
529
+ return new Nt([[document.documentElement]], Ru);
530
530
  }
531
531
  function sp() {
532
532
  return this;
533
533
  }
534
- Gt.prototype = Or.prototype = {
535
- constructor: Gt,
534
+ Nt.prototype = Or.prototype = {
535
+ constructor: Nt,
536
536
  select: Id,
537
537
  selectAll: Od,
538
538
  selectChild: Vd,
539
539
  selectChildren: jd,
540
540
  filter: Hd,
541
541
  data: Kd,
542
- enter: Wd,
542
+ enter: qd,
543
543
  exit: em,
544
544
  join: tm,
545
545
  merge: nm,
@@ -557,12 +557,12 @@ Gt.prototype = Or.prototype = {
557
557
  property: Em,
558
558
  classed: Fm,
559
559
  text: Rm,
560
- html: Gm,
560
+ html: Nm,
561
561
  raise: Bm,
562
562
  lower: $m,
563
563
  append: Um,
564
564
  insert: jm,
565
- remove: Wm,
565
+ remove: qm,
566
566
  clone: Zm,
567
567
  datum: Qm,
568
568
  on: np,
@@ -570,7 +570,7 @@ Gt.prototype = Or.prototype = {
570
570
  [Symbol.iterator]: ap
571
571
  };
572
572
  function Ct(t) {
573
- return typeof t == "string" ? new Gt([[document.querySelector(t)]], [document.documentElement]) : new Gt([[t]], Ru);
573
+ return typeof t == "string" ? new Nt([[document.querySelector(t)]], [document.documentElement]) : new Nt([[t]], Ru);
574
574
  }
575
575
  function fp(t) {
576
576
  let e;
@@ -593,7 +593,7 @@ function un(t, e) {
593
593
  }
594
594
  var up = { value: () => {
595
595
  } };
596
- function qi() {
596
+ function Wi() {
597
597
  for (var t = 0, e = arguments.length, n = {}, r; t < e; ++t) {
598
598
  if (!(r = arguments[t] + "") || r in n || /[\s.]/.test(r)) throw new Error("illegal type: " + r);
599
599
  n[r] = [];
@@ -610,7 +610,7 @@ function cp(t, e) {
610
610
  return { type: n, name: r };
611
611
  });
612
612
  }
613
- Ti.prototype = qi.prototype = {
613
+ Ti.prototype = Wi.prototype = {
614
614
  constructor: Ti,
615
615
  on: function(t, e) {
616
616
  var n = this._, r = cp(t + "", n), i, o = -1, f = r.length;
@@ -652,7 +652,7 @@ function Mf(t, e, n) {
652
652
  }
653
653
  return n != null && t.push({ name: e, value: n }), t;
654
654
  }
655
- var sr = 0, Fr = 0, Pr = 0, Du = 1e3, Ni, Lr, Bi = 0, Vn = 0, Yi = 0, Ir = typeof performance == "object" && performance.now ? performance : Date, Mu = typeof window == "object" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(t) {
655
+ var sr = 0, Fr = 0, Pr = 0, Du = 1e3, Gi, Lr, Bi = 0, Vn = 0, Yi = 0, Ir = typeof performance == "object" && performance.now ? performance : Date, Mu = typeof window == "object" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(t) {
656
656
  setTimeout(t, 17);
657
657
  };
658
658
  function _a() {
@@ -668,7 +668,7 @@ Vi.prototype = Ou.prototype = {
668
668
  constructor: Vi,
669
669
  restart: function(t, e, n) {
670
670
  if (typeof t != "function") throw new TypeError("callback is not a function");
671
- n = (n == null ? _a() : +n) + (e == null ? 0 : +e), !this._next && Lr !== this && (Lr ? Lr._next = this : Ni = this, Lr = this), this._call = t, this._time = n, ra();
671
+ n = (n == null ? _a() : +n) + (e == null ? 0 : +e), !this._next && Lr !== this && (Lr ? Lr._next = this : Gi = this, Lr = this), this._call = t, this._time = n, ra();
672
672
  },
673
673
  stop: function() {
674
674
  this._call && (this._call = null, this._time = 1 / 0, ra());
@@ -680,7 +680,7 @@ function Ou(t, e, n) {
680
680
  }
681
681
  function dp() {
682
682
  _a(), ++sr;
683
- for (var t = Ni, e; t; )
683
+ for (var t = Gi, e; t; )
684
684
  (e = Vn - t._time) >= 0 && t._call.call(null, e), t = t._next;
685
685
  --sr;
686
686
  }
@@ -697,8 +697,8 @@ function mp() {
697
697
  e > Du && (Yi -= e, Bi = t);
698
698
  }
699
699
  function pp() {
700
- for (var t, e = Ni, n, r = 1 / 0; e; )
701
- e._call ? (r > e._time && (r = e._time), t = e, e = e._next) : (n = e._next, e._next = null, e = t ? t._next = n : Ni = n);
700
+ for (var t, e = Gi, n, r = 1 / 0; e; )
701
+ e._call ? (r > e._time && (r = e._time), t = e, e = e._next) : (n = e._next, e._next = null, e = t ? t._next = n : Gi = n);
702
702
  Lr = t, ra(r);
703
703
  }
704
704
  function ra(t) {
@@ -708,13 +708,13 @@ function ra(t) {
708
708
  e > 24 ? (t < 1 / 0 && (Fr = setTimeout(Of, t - Ir.now() - Yi)), Pr && (Pr = clearInterval(Pr))) : (Pr || (Bi = Ir.now(), Pr = setInterval(mp, Du)), sr = 1, Mu(Of));
709
709
  }
710
710
  }
711
- function Gf(t, e, n) {
711
+ function Nf(t, e, n) {
712
712
  var r = new Vi();
713
713
  return e = e == null ? 0 : +e, r.restart((i) => {
714
714
  r.stop(), t(i + e);
715
715
  }, e, n), r;
716
716
  }
717
- var vp = qi("start", "end", "cancel", "interrupt"), gp = [], Gu = 0, Nf = 1, ia = 2, Ai = 3, Bf = 4, oa = 5, Ei = 6;
717
+ var vp = Wi("start", "end", "cancel", "interrupt"), gp = [], Nu = 0, Gf = 1, ia = 2, Ai = 3, Bf = 4, oa = 5, Ei = 6;
718
718
  function Zi(t, e, n, r, i, o) {
719
719
  var f = t.__transition;
720
720
  if (!f) t.__transition = {};
@@ -732,12 +732,12 @@ function Zi(t, e, n, r, i, o) {
732
732
  duration: o.duration,
733
733
  ease: o.ease,
734
734
  timer: null,
735
- state: Gu
735
+ state: Nu
736
736
  });
737
737
  }
738
738
  function Sa(t, e) {
739
739
  var n = Yt(t, e);
740
- if (n.state > Gu) throw new Error("too late; already scheduled");
740
+ if (n.state > Nu) throw new Error("too late; already scheduled");
741
741
  return n;
742
742
  }
743
743
  function rn(t, e) {
@@ -754,17 +754,17 @@ function yp(t, e, n) {
754
754
  var r = t.__transition, i;
755
755
  r[e] = n, n.timer = Ou(o, 0, n.time);
756
756
  function o(c) {
757
- n.state = Nf, n.timer.restart(f, n.delay, n.time), n.delay <= c && f(c - n.delay);
757
+ n.state = Gf, n.timer.restart(f, n.delay, n.time), n.delay <= c && f(c - n.delay);
758
758
  }
759
759
  function f(c) {
760
760
  var v, b, S, D;
761
- if (n.state !== Nf) return u();
761
+ if (n.state !== Gf) return u();
762
762
  for (v in r)
763
763
  if (D = r[v], D.name === n.name) {
764
- if (D.state === Ai) return Gf(f);
764
+ if (D.state === Ai) return Nf(f);
765
765
  D.state === Bf ? (D.state = Ei, D.timer.stop(), D.on.call("interrupt", t, t.__data__, D.index, D.group), delete r[v]) : +v < e && (D.state = Ei, D.timer.stop(), D.on.call("cancel", t, t.__data__, D.index, D.group), delete r[v]);
766
766
  }
767
- if (Gf(function() {
767
+ if (Nf(function() {
768
768
  n.state === Ai && (n.state = Bf, n.timer.restart(s, n.delay, n.time), s(c));
769
769
  }), n.state = ia, n.on.call("start", t, t.__data__, n.index, n.group), n.state === ia) {
770
770
  for (n.state = Ai, i = new Array(S = n.tween.length), v = 0, b = -1; v < S; ++v)
@@ -805,12 +805,12 @@ function xp(t) {
805
805
  function wa(t, e, n) {
806
806
  t.prototype = e.prototype = n, n.constructor = t;
807
807
  }
808
- function Nu(t, e) {
808
+ function Gu(t, e) {
809
809
  var n = Object.create(t.prototype);
810
810
  for (var r in e) n[r] = e[r];
811
811
  return n;
812
812
  }
813
- function Gr() {
813
+ function Nr() {
814
814
  }
815
815
  var Rr = 0.7, $i = 1 / Rr, ir = "\\s*([+-]?\\d+)\\s*", Dr = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*", nn = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*", bp = /^#([0-9a-f]{3,8})$/, _p = new RegExp(`^rgb\\(${ir},${ir},${ir}\\)$`), Sp = new RegExp(`^rgb\\(${nn},${nn},${nn}\\)$`), wp = new RegExp(`^rgba\\(${ir},${ir},${ir},${Dr}\\)$`), Tp = new RegExp(`^rgba\\(${nn},${nn},${nn},${Dr}\\)$`), Ap = new RegExp(`^hsl\\(${Dr},${nn},${nn}\\)$`), Ep = new RegExp(`^hsla\\(${Dr},${nn},${nn},${Dr}\\)$`), Vf = {
816
816
  aliceblue: 15792383,
@@ -962,7 +962,7 @@ var Rr = 0.7, $i = 1 / Rr, ir = "\\s*([+-]?\\d+)\\s*", Dr = "\\s*([+-]?(?:\\d*\\
962
962
  yellow: 16776960,
963
963
  yellowgreen: 10145074
964
964
  };
965
- wa(Gr, _n, {
965
+ wa(Nr, _n, {
966
966
  copy(t) {
967
967
  return Object.assign(new this.constructor(), this, t);
968
968
  },
@@ -991,7 +991,7 @@ function Uf() {
991
991
  }
992
992
  function _n(t) {
993
993
  var e, n;
994
- return t = (t + "").trim().toLowerCase(), (e = bp.exec(t)) ? (n = e[1].length, e = parseInt(e[1], 16), n === 6 ? Xf(e) : n === 3 ? new Ft(e >> 8 & 15 | e >> 4 & 240, e >> 4 & 15 | e & 240, (e & 15) << 4 | e & 15, 1) : n === 8 ? yi(e >> 24 & 255, e >> 16 & 255, e >> 8 & 255, (e & 255) / 255) : n === 4 ? yi(e >> 12 & 15 | e >> 8 & 240, e >> 8 & 15 | e >> 4 & 240, e >> 4 & 15 | e & 240, ((e & 15) << 4 | e & 15) / 255) : null) : (e = _p.exec(t)) ? new Ft(e[1], e[2], e[3], 1) : (e = Sp.exec(t)) ? new Ft(e[1] * 255 / 100, e[2] * 255 / 100, e[3] * 255 / 100, 1) : (e = wp.exec(t)) ? yi(e[1], e[2], e[3], e[4]) : (e = Tp.exec(t)) ? yi(e[1] * 255 / 100, e[2] * 255 / 100, e[3] * 255 / 100, e[4]) : (e = Ap.exec(t)) ? Wf(e[1], e[2] / 100, e[3] / 100, 1) : (e = Ep.exec(t)) ? Wf(e[1], e[2] / 100, e[3] / 100, e[4]) : Vf.hasOwnProperty(t) ? Xf(Vf[t]) : t === "transparent" ? new Ft(NaN, NaN, NaN, 0) : null;
994
+ return t = (t + "").trim().toLowerCase(), (e = bp.exec(t)) ? (n = e[1].length, e = parseInt(e[1], 16), n === 6 ? Xf(e) : n === 3 ? new Ft(e >> 8 & 15 | e >> 4 & 240, e >> 4 & 15 | e & 240, (e & 15) << 4 | e & 15, 1) : n === 8 ? yi(e >> 24 & 255, e >> 16 & 255, e >> 8 & 255, (e & 255) / 255) : n === 4 ? yi(e >> 12 & 15 | e >> 8 & 240, e >> 8 & 15 | e >> 4 & 240, e >> 4 & 15 | e & 240, ((e & 15) << 4 | e & 15) / 255) : null) : (e = _p.exec(t)) ? new Ft(e[1], e[2], e[3], 1) : (e = Sp.exec(t)) ? new Ft(e[1] * 255 / 100, e[2] * 255 / 100, e[3] * 255 / 100, 1) : (e = wp.exec(t)) ? yi(e[1], e[2], e[3], e[4]) : (e = Tp.exec(t)) ? yi(e[1] * 255 / 100, e[2] * 255 / 100, e[3] * 255 / 100, e[4]) : (e = Ap.exec(t)) ? qf(e[1], e[2] / 100, e[3] / 100, 1) : (e = Ep.exec(t)) ? qf(e[1], e[2] / 100, e[3] / 100, e[4]) : Vf.hasOwnProperty(t) ? Xf(Vf[t]) : t === "transparent" ? new Ft(NaN, NaN, NaN, 0) : null;
995
995
  }
996
996
  function Xf(t) {
997
997
  return new Ft(t >> 16 & 255, t >> 8 & 255, t & 255, 1);
@@ -1000,7 +1000,7 @@ function yi(t, e, n, r) {
1000
1000
  return r <= 0 && (t = e = n = NaN), new Ft(t, e, n, r);
1001
1001
  }
1002
1002
  function kp(t) {
1003
- return t instanceof Gr || (t = _n(t)), t ? (t = t.rgb(), new Ft(t.r, t.g, t.b, t.opacity)) : new Ft();
1003
+ return t instanceof Nr || (t = _n(t)), t ? (t = t.rgb(), new Ft(t.r, t.g, t.b, t.opacity)) : new Ft();
1004
1004
  }
1005
1005
  function aa(t, e, n, r) {
1006
1006
  return arguments.length === 1 ? kp(t) : new Ft(t, e, n, r ?? 1);
@@ -1008,7 +1008,7 @@ function aa(t, e, n, r) {
1008
1008
  function Ft(t, e, n, r) {
1009
1009
  this.r = +t, this.g = +e, this.b = +n, this.opacity = +r;
1010
1010
  }
1011
- wa(Ft, aa, Nu(Gr, {
1011
+ wa(Ft, aa, Gu(Nr, {
1012
1012
  brighter(t) {
1013
1013
  return t = t == null ? $i : Math.pow($i, t), new Ft(this.r * t, this.g * t, this.b * t, this.opacity);
1014
1014
  },
@@ -1019,7 +1019,7 @@ wa(Ft, aa, Nu(Gr, {
1019
1019
  return this;
1020
1020
  },
1021
1021
  clamp() {
1022
- return new Ft(Gn(this.r), Gn(this.g), Gn(this.b), Ui(this.opacity));
1022
+ return new Ft(Nn(this.r), Nn(this.g), Nn(this.b), Ui(this.opacity));
1023
1023
  },
1024
1024
  displayable() {
1025
1025
  return -0.5 <= this.r && this.r < 255.5 && -0.5 <= this.g && this.g < 255.5 && -0.5 <= this.b && this.b < 255.5 && 0 <= this.opacity && this.opacity <= 1;
@@ -1039,40 +1039,40 @@ function Fp() {
1039
1039
  }
1040
1040
  function Hf() {
1041
1041
  const t = Ui(this.opacity);
1042
- return `${t === 1 ? "rgb(" : "rgba("}${Gn(this.r)}, ${Gn(this.g)}, ${Gn(this.b)}${t === 1 ? ")" : `, ${t})`}`;
1042
+ return `${t === 1 ? "rgb(" : "rgba("}${Nn(this.r)}, ${Nn(this.g)}, ${Nn(this.b)}${t === 1 ? ")" : `, ${t})`}`;
1043
1043
  }
1044
1044
  function Ui(t) {
1045
1045
  return isNaN(t) ? 1 : Math.max(0, Math.min(1, t));
1046
1046
  }
1047
- function Gn(t) {
1047
+ function Nn(t) {
1048
1048
  return Math.max(0, Math.min(255, Math.round(t) || 0));
1049
1049
  }
1050
1050
  function On(t) {
1051
- return t = Gn(t), (t < 16 ? "0" : "") + t.toString(16);
1051
+ return t = Nn(t), (t < 16 ? "0" : "") + t.toString(16);
1052
1052
  }
1053
- function Wf(t, e, n, r) {
1054
- return r <= 0 ? t = e = n = NaN : n <= 0 || n >= 1 ? t = e = NaN : e <= 0 && (t = NaN), new Wt(t, e, n, r);
1053
+ function qf(t, e, n, r) {
1054
+ return r <= 0 ? t = e = n = NaN : n <= 0 || n >= 1 ? t = e = NaN : e <= 0 && (t = NaN), new qt(t, e, n, r);
1055
1055
  }
1056
1056
  function Bu(t) {
1057
- if (t instanceof Wt) return new Wt(t.h, t.s, t.l, t.opacity);
1058
- if (t instanceof Gr || (t = _n(t)), !t) return new Wt();
1059
- if (t instanceof Wt) return t;
1057
+ if (t instanceof qt) return new qt(t.h, t.s, t.l, t.opacity);
1058
+ if (t instanceof Nr || (t = _n(t)), !t) return new qt();
1059
+ if (t instanceof qt) return t;
1060
1060
  t = t.rgb();
1061
1061
  var e = t.r / 255, n = t.g / 255, r = t.b / 255, i = Math.min(e, n, r), o = Math.max(e, n, r), f = NaN, s = o - i, u = (o + i) / 2;
1062
- return s ? (e === o ? f = (n - r) / s + (n < r) * 6 : n === o ? f = (r - e) / s + 2 : f = (e - n) / s + 4, s /= u < 0.5 ? o + i : 2 - o - i, f *= 60) : s = u > 0 && u < 1 ? 0 : f, new Wt(f, s, u, t.opacity);
1062
+ return s ? (e === o ? f = (n - r) / s + (n < r) * 6 : n === o ? f = (r - e) / s + 2 : f = (e - n) / s + 4, s /= u < 0.5 ? o + i : 2 - o - i, f *= 60) : s = u > 0 && u < 1 ? 0 : f, new qt(f, s, u, t.opacity);
1063
1063
  }
1064
1064
  function Lp(t, e, n, r) {
1065
- return arguments.length === 1 ? Bu(t) : new Wt(t, e, n, r ?? 1);
1065
+ return arguments.length === 1 ? Bu(t) : new qt(t, e, n, r ?? 1);
1066
1066
  }
1067
- function Wt(t, e, n, r) {
1067
+ function qt(t, e, n, r) {
1068
1068
  this.h = +t, this.s = +e, this.l = +n, this.opacity = +r;
1069
1069
  }
1070
- wa(Wt, Lp, Nu(Gr, {
1070
+ wa(qt, Lp, Gu(Nr, {
1071
1071
  brighter(t) {
1072
- return t = t == null ? $i : Math.pow($i, t), new Wt(this.h, this.s, this.l * t, this.opacity);
1072
+ return t = t == null ? $i : Math.pow($i, t), new qt(this.h, this.s, this.l * t, this.opacity);
1073
1073
  },
1074
1074
  darker(t) {
1075
- return t = t == null ? Rr : Math.pow(Rr, t), new Wt(this.h, this.s, this.l * t, this.opacity);
1075
+ return t = t == null ? Rr : Math.pow(Rr, t), new qt(this.h, this.s, this.l * t, this.opacity);
1076
1076
  },
1077
1077
  rgb() {
1078
1078
  var t = this.h % 360 + (this.h < 0) * 360, e = isNaN(t) || isNaN(this.s) ? 0 : this.s, n = this.l, r = n + (n < 0.5 ? n : 1 - n) * e, i = 2 * n - r;
@@ -1084,17 +1084,17 @@ wa(Wt, Lp, Nu(Gr, {
1084
1084
  );
1085
1085
  },
1086
1086
  clamp() {
1087
- return new Wt(qf(this.h), xi(this.s), xi(this.l), Ui(this.opacity));
1087
+ return new qt(Wf(this.h), xi(this.s), xi(this.l), Ui(this.opacity));
1088
1088
  },
1089
1089
  displayable() {
1090
1090
  return (0 <= this.s && this.s <= 1 || isNaN(this.s)) && 0 <= this.l && this.l <= 1 && 0 <= this.opacity && this.opacity <= 1;
1091
1091
  },
1092
1092
  formatHsl() {
1093
1093
  const t = Ui(this.opacity);
1094
- return `${t === 1 ? "hsl(" : "hsla("}${qf(this.h)}, ${xi(this.s) * 100}%, ${xi(this.l) * 100}%${t === 1 ? ")" : `, ${t})`}`;
1094
+ return `${t === 1 ? "hsl(" : "hsla("}${Wf(this.h)}, ${xi(this.s) * 100}%, ${xi(this.l) * 100}%${t === 1 ? ")" : `, ${t})`}`;
1095
1095
  }
1096
1096
  }));
1097
- function qf(t) {
1097
+ function Wf(t) {
1098
1098
  return t = (t || 0) % 360, t < 0 ? t + 360 : t;
1099
1099
  }
1100
1100
  function xi(t) {
@@ -1153,7 +1153,7 @@ function Op(t, e) {
1153
1153
  return o;
1154
1154
  };
1155
1155
  }
1156
- function Gp(t, e) {
1156
+ function Np(t, e) {
1157
1157
  var n = /* @__PURE__ */ new Date();
1158
1158
  return t = +t, e = +e, function(r) {
1159
1159
  return n.setTime(t * (1 - r) + e * r), n;
@@ -1164,7 +1164,7 @@ function Ht(t, e) {
1164
1164
  return t * (1 - n) + e * n;
1165
1165
  };
1166
1166
  }
1167
- function Np(t, e) {
1167
+ function Gp(t, e) {
1168
1168
  var n = {}, r = {}, i;
1169
1169
  (t === null || typeof t != "object") && (t = {}), (e === null || typeof e != "object") && (e = {});
1170
1170
  for (i in e)
@@ -1196,7 +1196,7 @@ function $u(t, e) {
1196
1196
  }
1197
1197
  function Aa(t, e) {
1198
1198
  var n = typeof e, r;
1199
- return e == null || n === "boolean" ? Ta(e) : (n === "number" ? Ht : n === "string" ? (r = _n(e)) ? (e = r, Xi) : $u : e instanceof _n ? Xi : e instanceof Date ? Gp : Mp(e) ? Dp : Array.isArray(e) ? Op : typeof e.valueOf != "function" && typeof e.toString != "function" || isNaN(e) ? Np : Ht)(t, e);
1199
+ return e == null || n === "boolean" ? Ta(e) : (n === "number" ? Ht : n === "string" ? (r = _n(e)) ? (e = r, Xi) : $u : e instanceof _n ? Xi : e instanceof Date ? Np : Mp(e) ? Dp : Array.isArray(e) ? Op : typeof e.valueOf != "function" && typeof e.toString != "function" || isNaN(e) ? Gp : Ht)(t, e);
1200
1200
  }
1201
1201
  function $p(t, e) {
1202
1202
  return t = +t, e = +e, function(n) {
@@ -1260,11 +1260,11 @@ function Xu(t, e, n, r) {
1260
1260
  };
1261
1261
  };
1262
1262
  }
1263
- var jp = Xu(Up, "px, ", "px)", "deg)"), Hp = Xu(Xp, ", ", ")", ")"), Wp = 1e-12;
1263
+ var jp = Xu(Up, "px, ", "px)", "deg)"), Hp = Xu(Xp, ", ", ")", ")"), qp = 1e-12;
1264
1264
  function Zf(t) {
1265
1265
  return ((t = Math.exp(t)) + 1 / t) / 2;
1266
1266
  }
1267
- function qp(t) {
1267
+ function Wp(t) {
1268
1268
  return ((t = Math.exp(t)) - 1 / t) / 2;
1269
1269
  }
1270
1270
  function Yp(t) {
@@ -1273,7 +1273,7 @@ function Yp(t) {
1273
1273
  const Zp = function t(e, n, r) {
1274
1274
  function i(o, f) {
1275
1275
  var s = o[0], u = o[1], c = o[2], v = f[0], b = f[1], S = f[2], D = v - s, Z = b - u, we = D * D + Z * Z, Se, ae;
1276
- if (we < Wp)
1276
+ if (we < qp)
1277
1277
  ae = Math.log(S / c) / e, Se = function(Me) {
1278
1278
  return [
1279
1279
  s + Me * D,
@@ -1282,9 +1282,9 @@ const Zp = function t(e, n, r) {
1282
1282
  ];
1283
1283
  };
1284
1284
  else {
1285
- var Ne = Math.sqrt(we), Xe = (S * S - c * c + r * we) / (2 * c * n * Ne), q = (S * S - c * c - r * we) / (2 * S * n * Ne), le = Math.log(Math.sqrt(Xe * Xe + 1) - Xe), Le = Math.log(Math.sqrt(q * q + 1) - q);
1285
+ var Ge = Math.sqrt(we), Xe = (S * S - c * c + r * we) / (2 * c * n * Ge), W = (S * S - c * c - r * we) / (2 * S * n * Ge), le = Math.log(Math.sqrt(Xe * Xe + 1) - Xe), Le = Math.log(Math.sqrt(W * W + 1) - W);
1286
1286
  ae = (Le - le) / e, Se = function(Me) {
1287
- var je = Me * ae, et = Zf(le), nt = c / (n * Ne) * (et * Yp(e * je + le) - qp(le));
1287
+ var je = Me * ae, et = Zf(le), nt = c / (n * Ge) * (et * Yp(e * je + le) - Wp(le));
1288
1288
  return [
1289
1289
  s + nt * D,
1290
1290
  u + nt * Z,
@@ -1393,7 +1393,7 @@ function o0(t, e, n) {
1393
1393
  };
1394
1394
  }
1395
1395
  function a0(t, e) {
1396
- var n = Wi(t), r = n === "transform" ? Hp : ju;
1396
+ var n = qi(t), r = n === "transform" ? Hp : ju;
1397
1397
  return this.attrTween(t, typeof e == "function" ? (n.local ? o0 : i0)(n, r, Ea(this, "attr." + t, e)) : e == null ? (n.local ? t0 : e0)(n) : (n.local ? r0 : n0)(n, r, e));
1398
1398
  }
1399
1399
  function s0(t, e) {
@@ -1427,7 +1427,7 @@ function l0(t, e) {
1427
1427
  if (arguments.length < 2) return (n = this.tween(n)) && n._value;
1428
1428
  if (e == null) return this.tween(n, null);
1429
1429
  if (typeof e != "function") throw new Error();
1430
- var r = Wi(t);
1430
+ var r = qi(t);
1431
1431
  return this.tween(n, (r.local ? u0 : c0)(r, e));
1432
1432
  }
1433
1433
  function h0(t, e) {
@@ -1583,16 +1583,16 @@ function O0(t, e, n) {
1583
1583
  var r = (t += "") == "transform" ? jp : ju;
1584
1584
  return e == null ? this.styleTween(t, I0(t, r)).on("end.style." + t, Hu(t)) : typeof e == "function" ? this.styleTween(t, D0(t, r, Ea(this, "style." + t, e))).each(M0(this._id, t)) : this.styleTween(t, R0(t, r, e), n).on("end.style." + t, null);
1585
1585
  }
1586
- function G0(t, e, n) {
1586
+ function N0(t, e, n) {
1587
1587
  return function(r) {
1588
1588
  this.style.setProperty(t, e.call(this, r), n);
1589
1589
  };
1590
1590
  }
1591
- function N0(t, e, n) {
1591
+ function G0(t, e, n) {
1592
1592
  var r, i;
1593
1593
  function o() {
1594
1594
  var f = e.apply(this, arguments);
1595
- return f !== i && (r = (i = f) && G0(t, f, n)), r;
1595
+ return f !== i && (r = (i = f) && N0(t, f, n)), r;
1596
1596
  }
1597
1597
  return o._value = e, o;
1598
1598
  }
@@ -1601,7 +1601,7 @@ function B0(t, e, n) {
1601
1601
  if (arguments.length < 2) return (r = this.tween(r)) && r._value;
1602
1602
  if (e == null) return this.tween(r, null);
1603
1603
  if (typeof e != "function") throw new Error();
1604
- return this.tween(r, N0(t, e, n ?? ""));
1604
+ return this.tween(r, G0(t, e, n ?? ""));
1605
1605
  }
1606
1606
  function V0(t) {
1607
1607
  return function() {
@@ -1637,8 +1637,8 @@ function H0(t) {
1637
1637
  if (typeof t != "function") throw new Error();
1638
1638
  return this.tween(e, j0(t));
1639
1639
  }
1640
- function W0() {
1641
- for (var t = this._name, e = this._id, n = Wu(), r = this._groups, i = r.length, o = 0; o < i; ++o)
1640
+ function q0() {
1641
+ for (var t = this._name, e = this._id, n = qu(), r = this._groups, i = r.length, o = 0; o < i; ++o)
1642
1642
  for (var f = r[o], s = f.length, u, c = 0; c < s; ++c)
1643
1643
  if (u = f[c]) {
1644
1644
  var v = Yt(u, e);
@@ -1651,7 +1651,7 @@ function W0() {
1651
1651
  }
1652
1652
  return new ln(r, this._parents, t, n);
1653
1653
  }
1654
- function q0() {
1654
+ function W0() {
1655
1655
  var t, e, n = this, r = n._id, i = n.size();
1656
1656
  return new Promise(function(o, f) {
1657
1657
  var s = { value: f }, u = { value: function() {
@@ -1667,7 +1667,7 @@ var Y0 = 0;
1667
1667
  function ln(t, e, n, r) {
1668
1668
  this._groups = t, this._parents = e, this._name = n, this._id = r;
1669
1669
  }
1670
- function Wu() {
1670
+ function qu() {
1671
1671
  return ++Y0;
1672
1672
  }
1673
1673
  var fn = Or.prototype;
@@ -1680,7 +1680,7 @@ ln.prototype = {
1680
1680
  filter: S0,
1681
1681
  merge: w0,
1682
1682
  selection: z0,
1683
- transition: W0,
1683
+ transition: q0,
1684
1684
  call: fn.call,
1685
1685
  nodes: fn.nodes,
1686
1686
  node: fn.node,
@@ -1700,7 +1700,7 @@ ln.prototype = {
1700
1700
  duration: g0,
1701
1701
  ease: x0,
1702
1702
  easeVarying: _0,
1703
- end: q0,
1703
+ end: W0,
1704
1704
  [Symbol.iterator]: fn[Symbol.iterator]
1705
1705
  };
1706
1706
  function Z0(t) {
@@ -1730,7 +1730,7 @@ function tv(t, e) {
1730
1730
  }
1731
1731
  function nv(t) {
1732
1732
  var e, n;
1733
- t instanceof ln ? (e = t._id, t = t._name) : (e = Wu(), (n = ev).time = _a(), t = t == null ? null : t + "");
1733
+ t instanceof ln ? (e = t._id, t = t._name) : (e = qu(), (n = ev).time = _a(), t = t == null ? null : t + "");
1734
1734
  for (var r = this._groups, i = r.length, o = 0; o < i; ++o)
1735
1735
  for (var f = r[o], s = f.length, u, c = 0; c < s; ++c)
1736
1736
  (u = f[c]) && Zi(u, t, e, c, f, n || tv(u, e));
@@ -1845,13 +1845,13 @@ function ov() {
1845
1845
  a = " " + a;
1846
1846
  return a;
1847
1847
  }
1848
- function Ne() {
1848
+ function Ge() {
1849
1849
  this.name = "unknown", this.lines = [], this.index = {}, this.hasErrors = !1;
1850
1850
  }
1851
1851
  function Xe(a, h) {
1852
1852
  this.number = a, this.line = h, this.errors = [];
1853
1853
  }
1854
- function q(a, h, _) {
1854
+ function W(a, h, _) {
1855
1855
  this.file = a, this.line = h, this.message = _;
1856
1856
  }
1857
1857
  function le() {
@@ -1871,17 +1871,17 @@ function ov() {
1871
1871
  function Me(a, h) {
1872
1872
  var _ = a.split(`
1873
1873
  `), R = 1, U = 0, I = {
1874
- unknown: new Ne(),
1875
- 0: new Ne()
1874
+ unknown: new Ge(),
1875
+ 0: new Ge()
1876
1876
  };
1877
1877
  I.unknown.name = I[0].name = h || le(), I.unknown.lines.push(new Xe(0, ""));
1878
- for (var N = 0; N < _.length; ++N) {
1879
- var Q = _[N], Y = /^\s*#\s*(\w+)\s+(.+)\s*$/.exec(Q);
1878
+ for (var G = 0; G < _.length; ++G) {
1879
+ var Q = _[G], Y = /^\s*#\s*(\w+)\s+(.+)\s*$/.exec(Q);
1880
1880
  if (Y)
1881
1881
  switch (Y[1]) {
1882
1882
  case "line":
1883
1883
  var ne = /(\d+)(\s+\d+)?/.exec(Y[2]);
1884
- ne && (R = ne[1] | 0, ne[2] && (U = ne[2] | 0, U in I || (I[U] = new Ne())));
1884
+ ne && (R = ne[1] | 0, ne[2] && (U = ne[2] | 0, U in I || (I[U] = new Ge())));
1885
1885
  break;
1886
1886
  case "define":
1887
1887
  var ie = /SHADER_NAME(_B64)?\s+(.*)$/.exec(Y[2]);
@@ -1903,11 +1903,11 @@ function ov() {
1903
1903
  `).forEach(function(_) {
1904
1904
  if (!(_.length < 5)) {
1905
1905
  var R = /^ERROR:\s+(\d+):(\d+):\s*(.*)$/.exec(_);
1906
- R ? h.push(new q(
1906
+ R ? h.push(new W(
1907
1907
  R[1] | 0,
1908
1908
  R[2] | 0,
1909
1909
  R[3].trim()
1910
- )) : _.length > 0 && h.push(new q("unknown", 0, _));
1910
+ )) : _.length > 0 && h.push(new W("unknown", 0, _));
1911
1911
  }
1912
1912
  }), h;
1913
1913
  }
@@ -1926,8 +1926,8 @@ function ov() {
1926
1926
  }
1927
1927
  function nt(a, h, _, R, U) {
1928
1928
  if (!a.getShaderParameter(h, a.COMPILE_STATUS)) {
1929
- var I = a.getShaderInfoLog(h), N = R === a.FRAGMENT_SHADER ? "fragment" : "vertex";
1930
- Ce(_, "string", N + " shader source must be a string", U);
1929
+ var I = a.getShaderInfoLog(h), G = R === a.FRAGMENT_SHADER ? "fragment" : "vertex";
1930
+ Ce(_, "string", G + " shader source must be a string", U);
1931
1931
  var Q = Me(_, U), Y = je(I);
1932
1932
  et(Q, Y), Object.keys(Q).forEach(function(ne) {
1933
1933
  var ie = Q[ne];
@@ -1945,13 +1945,13 @@ function ov() {
1945
1945
  te.errors.forEach(function(O) {
1946
1946
  var ee = O.message, ge = /^\s*'(.*)'\s*:\s*(.*)$/.exec(ee);
1947
1947
  if (ge) {
1948
- var W = ge[1];
1949
- switch (ee = ge[2], W) {
1948
+ var q = ge[1];
1949
+ switch (ee = ge[2], q) {
1950
1950
  case "assign":
1951
- W = "=";
1951
+ q = "=";
1952
1952
  break;
1953
1953
  }
1954
- P = Math.max(te.line.indexOf(W, P), 0);
1954
+ P = Math.max(te.line.indexOf(q, P), 0);
1955
1955
  } else
1956
1956
  P = 0;
1957
1957
  K(ae("| ", 6)), K(ae("^^^", P + 3) + i, "font-weight:bold"), K(ae("| ", 6)), K(ee + i, "font-weight:bold");
@@ -1959,12 +1959,12 @@ function ov() {
1959
1959
  } else
1960
1960
  K(ae(te.number, 4) + "| "), K(te.line + i, "color:red");
1961
1961
  }), typeof document < "u" && !window.chrome ? (fe[0] = re.join("%c"), console.log.apply(console, fe)) : console.log(re.join(""));
1962
- }), s.raise("Error compiling " + N + " shader, " + Q[0].name);
1962
+ }), s.raise("Error compiling " + G + " shader, " + Q[0].name);
1963
1963
  }
1964
1964
  }
1965
1965
  function ke(a, h, _, R, U) {
1966
1966
  if (!a.getProgramParameter(h, a.LINK_STATUS)) {
1967
- var I = a.getProgramInfoLog(h), N = Me(_, U), Q = Me(R, U), Y = 'Error linking program with vertex shader, "' + Q[0].name + '", and fragment shader "' + N[0].name + '"';
1967
+ var I = a.getProgramInfoLog(h), G = Me(_, U), Q = Me(R, U), Y = 'Error linking program with vertex shader, "' + Q[0].name + '", and fragment shader "' + G[0].name + '"';
1968
1968
  typeof document < "u" ? console.log(
1969
1969
  "%c" + Y + i + "%c" + I,
1970
1970
  "color:red;text-decoration:underline;font-weight:bold",
@@ -1986,31 +1986,31 @@ function ov() {
1986
1986
  Y[R.id(ie)] = !0;
1987
1987
  });
1988
1988
  }
1989
- var N = a._uniformSet = {};
1990
- I(N, h.static), I(N, h.dynamic);
1989
+ var G = a._uniformSet = {};
1990
+ I(G, h.static), I(G, h.dynamic);
1991
1991
  var Q = a._attributeSet = {};
1992
1992
  I(Q, _.static), I(Q, _.dynamic), a._hasCount = "count" in a.static || "count" in a.dynamic || "elements" in a.static || "elements" in a.dynamic;
1993
1993
  }
1994
- function G(a, h) {
1994
+ function N(a, h) {
1995
1995
  var _ = Le();
1996
1996
  f(a + " in command " + (h || le()) + (_ === "unknown" ? "" : " called from " + _));
1997
1997
  }
1998
1998
  function Ae(a, h, _) {
1999
- a || G(h, _ || le());
1999
+ a || N(h, _ || le());
2000
2000
  }
2001
2001
  function oe(a, h, _, R) {
2002
- a in h || G(
2002
+ a in h || N(
2003
2003
  "unknown parameter (" + a + ")" + u(_) + ". possible values: " + Object.keys(h).join(),
2004
2004
  R || le()
2005
2005
  );
2006
2006
  }
2007
2007
  function Ce(a, h, _, R) {
2008
- b(a, h) || G(
2008
+ b(a, h) || N(
2009
2009
  "invalid parameter type" + u(_) + ". expected " + h + ", got " + typeof a,
2010
2010
  R || le()
2011
2011
  );
2012
2012
  }
2013
- function $e(a) {
2013
+ function Ue(a) {
2014
2014
  a();
2015
2015
  }
2016
2016
  function Be(a, h, _) {
@@ -2024,27 +2024,27 @@ function ov() {
2024
2024
  "unsupported renderbuffer format for attachment"
2025
2025
  );
2026
2026
  }
2027
- var Ye = 33071, rt = 9728, ut = 9984, Nt = 9985, bt = 9986, Lt = 9987, $t = 5120, zt = 5121, Ut = 5122, ur = 5123, lc = 5124, hc = 5125, Fa = 5126, La = 32819, za = 32820, Ia = 33635, Ra = 34042, dc = 36193, It = {};
2027
+ var Ye = 33071, rt = 9728, ut = 9984, Gt = 9985, bt = 9986, Lt = 9987, $t = 5120, zt = 5121, Ut = 5122, ur = 5123, lc = 5124, hc = 5125, Fa = 5126, La = 32819, za = 32820, Ia = 33635, Ra = 34042, dc = 36193, It = {};
2028
2028
  It[$t] = It[zt] = 1, It[Ut] = It[ur] = It[dc] = It[Ia] = It[La] = It[za] = 2, It[lc] = It[hc] = It[Fa] = It[Ra] = 4;
2029
2029
  function Da(a, h) {
2030
2030
  return a === za || a === La || a === Ia ? 2 : a === Ra ? 4 : It[a] * h;
2031
2031
  }
2032
- function Nr(a) {
2032
+ function Gr(a) {
2033
2033
  return !(a & a - 1) && !!a;
2034
2034
  }
2035
2035
  function mc(a, h, _) {
2036
- var R, U = h.width, I = h.height, N = h.channels;
2036
+ var R, U = h.width, I = h.height, G = h.channels;
2037
2037
  s(
2038
2038
  U > 0 && U <= _.maxTextureSize && I > 0 && I <= _.maxTextureSize,
2039
2039
  "invalid texture shape"
2040
2040
  ), (a.wrapS !== Ye || a.wrapT !== Ye) && s(
2041
- Nr(U) && Nr(I),
2041
+ Gr(U) && Gr(I),
2042
2042
  "incompatible wrap mode for texture, both width and height must be power of 2"
2043
2043
  ), h.mipmask === 1 ? U !== 1 && I !== 1 && s(
2044
- a.minFilter !== ut && a.minFilter !== bt && a.minFilter !== Nt && a.minFilter !== Lt,
2044
+ a.minFilter !== ut && a.minFilter !== bt && a.minFilter !== Gt && a.minFilter !== Lt,
2045
2045
  "min filter requires mipmap"
2046
2046
  ) : (s(
2047
- Nr(U) && Nr(I),
2047
+ Gr(U) && Gr(I),
2048
2048
  "texture must be a square power of 2 to support mipmapping"
2049
2049
  ), s(
2050
2050
  h.mipmask === (U << 1) - 1,
@@ -2069,7 +2069,7 @@ function ov() {
2069
2069
  ie.format === h.format && ie.internalformat === h.internalformat && ie.type === h.type,
2070
2070
  "incompatible type for mip image"
2071
2071
  ), !ie.compressed) if (ie.data) {
2072
- var re = Math.ceil(Da(ie.type, N) * Y / ie.unpackAlignment) * ie.unpackAlignment;
2072
+ var re = Math.ceil(Da(ie.type, G) * Y / ie.unpackAlignment) * ie.unpackAlignment;
2073
2073
  s(
2074
2074
  ie.data.byteLength === re * ne,
2075
2075
  "invalid data for image, buffer size is inconsistent with image format"
@@ -2082,7 +2082,7 @@ function ov() {
2082
2082
  );
2083
2083
  }
2084
2084
  function pc(a, h, _, R) {
2085
- var U = a.width, I = a.height, N = a.channels;
2085
+ var U = a.width, I = a.height, G = a.channels;
2086
2086
  s(
2087
2087
  U > 0 && U <= R.maxTextureSize && I > 0 && I <= R.maxTextureSize,
2088
2088
  "invalid texture shape"
@@ -2116,7 +2116,7 @@ function ov() {
2116
2116
  re.format === a.format && re.internalformat === a.internalformat && re.type === a.type,
2117
2117
  "incompatible type for mip image"
2118
2118
  ), re.compressed || (re.data ? s(
2119
- re.data.byteLength === fe * K * Math.max(Da(re.type, N), re.unpackAlignment),
2119
+ re.data.byteLength === fe * K * Math.max(Da(re.type, G), re.unpackAlignment),
2120
2120
  "invalid data for image, buffer size is inconsistent with image format"
2121
2121
  ) : re.element || re.copy);
2122
2122
  }
@@ -2124,9 +2124,9 @@ function ov() {
2124
2124
  }
2125
2125
  }
2126
2126
  var d = r(s, {
2127
- optional: $e,
2127
+ optional: Ue,
2128
2128
  raise: f,
2129
- commandRaise: G,
2129
+ commandRaise: N,
2130
2130
  command: Ae,
2131
2131
  parameter: c,
2132
2132
  commandParameter: oe,
@@ -2164,8 +2164,8 @@ function ov() {
2164
2164
  var U = a.split(".");
2165
2165
  if (U.length === 1)
2166
2166
  return ['"' + Ma(a) + '"'];
2167
- for (var I = [], N = 0; N < U.length; ++N)
2168
- I = I.concat(cr(U[N]));
2167
+ for (var I = [], G = 0; G < U.length; ++G)
2168
+ I = I.concat(cr(U[G]));
2169
2169
  return I;
2170
2170
  }
2171
2171
  function Oa(a) {
@@ -2177,14 +2177,14 @@ function ov() {
2177
2177
  function _c(a) {
2178
2178
  return typeof a == "function" && !a._reglType || a instanceof Sn;
2179
2179
  }
2180
- function Ga(a, h) {
2180
+ function Na(a, h) {
2181
2181
  if (typeof a == "function")
2182
2182
  return new Sn(gc, a);
2183
2183
  if (typeof a == "number" || typeof a == "boolean")
2184
2184
  return new Sn(yc, a);
2185
2185
  if (Array.isArray(a))
2186
2186
  return new Sn(xc, a.map(function(_, R) {
2187
- return Ga(_, h + "[" + R + "]");
2187
+ return Na(_, h + "[" + R + "]");
2188
2188
  }));
2189
2189
  if (a instanceof Sn)
2190
2190
  return a;
@@ -2194,7 +2194,7 @@ function ov() {
2194
2194
  DynamicVariable: Sn,
2195
2195
  define: bc,
2196
2196
  isDynamic: _c,
2197
- unbox: Ga,
2197
+ unbox: Na,
2198
2198
  accessor: Oa
2199
2199
  }, Ki = {
2200
2200
  next: typeof requestAnimationFrame == "function" ? function(a) {
@@ -2205,7 +2205,7 @@ function ov() {
2205
2205
  cancel: typeof cancelAnimationFrame == "function" ? function(a) {
2206
2206
  return cancelAnimationFrame(a);
2207
2207
  } : clearTimeout
2208
- }, Na = typeof performance < "u" && performance.now ? function() {
2208
+ }, Ga = typeof performance < "u" && performance.now ? function() {
2209
2209
  return performance.now();
2210
2210
  } : function() {
2211
2211
  return +/* @__PURE__ */ new Date();
@@ -2248,12 +2248,12 @@ function ov() {
2248
2248
  a !== document.body && typeof ResizeObserver == "function" ? (I = new ResizeObserver(function() {
2249
2249
  setTimeout(U);
2250
2250
  }), I.observe(a)) : window.addEventListener("resize", U, !1);
2251
- function N() {
2251
+ function G() {
2252
2252
  I ? I.disconnect() : window.removeEventListener("resize", U), a.removeChild(R);
2253
2253
  }
2254
2254
  return U(), {
2255
2255
  canvas: R,
2256
- onDestroy: N
2256
+ onDestroy: G
2257
2257
  };
2258
2258
  }
2259
2259
  function Tc(a, h) {
@@ -2279,14 +2279,14 @@ function ov() {
2279
2279
  return typeof a == "string" ? (d(typeof document < "u", "not supported outside of DOM"), document.querySelector(a)) : a;
2280
2280
  }
2281
2281
  function Cc(a) {
2282
- var h = a || {}, _, R, U, I, N = {}, Q = [], Y = [], ne = typeof window > "u" ? 1 : window.devicePixelRatio, ie = !1, re = function(te) {
2282
+ var h = a || {}, _, R, U, I, G = {}, Q = [], Y = [], ne = typeof window > "u" ? 1 : window.devicePixelRatio, ie = !1, re = function(te) {
2283
2283
  te && d.raise(te);
2284
2284
  }, fe = function() {
2285
2285
  };
2286
2286
  if (typeof h == "string" ? (d(
2287
2287
  typeof document < "u",
2288
2288
  "selector queries only supported in DOM enviroments"
2289
- ), _ = document.querySelector(h), d(_, "invalid query string for element")) : typeof h == "object" ? Ac(h) ? _ = h : Ec(h) ? (I = h, U = I.canvas) : (d.constructor(h), "gl" in h ? I = h.gl : "canvas" in h ? U = Va(h.canvas) : "container" in h && (R = Va(h.container)), "attributes" in h && (N = h.attributes, d.type(N, "object", "invalid context attributes")), "extensions" in h && (Q = Ba(h.extensions)), "optionalExtensions" in h && (Y = Ba(h.optionalExtensions)), "onDone" in h && (d.type(
2289
+ ), _ = document.querySelector(h), d(_, "invalid query string for element")) : typeof h == "object" ? Ac(h) ? _ = h : Ec(h) ? (I = h, U = I.canvas) : (d.constructor(h), "gl" in h ? I = h.gl : "canvas" in h ? U = Va(h.canvas) : "container" in h && (R = Va(h.container)), "attributes" in h && (G = h.attributes, d.type(G, "object", "invalid context attributes")), "extensions" in h && (Q = Ba(h.extensions)), "optionalExtensions" in h && (Y = Ba(h.optionalExtensions)), "onDone" in h && (d.type(
2290
2290
  h.onDone,
2291
2291
  "function",
2292
2292
  "invalid or missing onDone callback"
@@ -2301,7 +2301,7 @@ function ov() {
2301
2301
  return null;
2302
2302
  U = K.canvas, fe = K.onDestroy;
2303
2303
  }
2304
- N.premultipliedAlpha === void 0 && (N.premultipliedAlpha = !0), I = Tc(U, N);
2304
+ G.premultipliedAlpha === void 0 && (G.premultipliedAlpha = !0), I = Tc(U, G);
2305
2305
  }
2306
2306
  return I ? {
2307
2307
  gl: I,
@@ -2317,9 +2317,9 @@ function ov() {
2317
2317
  }
2318
2318
  function Pc(a, h) {
2319
2319
  var _ = {};
2320
- function R(N) {
2321
- d.type(N, "string", "extension name must be string");
2322
- var Q = N.toLowerCase(), Y;
2320
+ function R(G) {
2321
+ d.type(G, "string", "extension name must be string");
2322
+ var Q = G.toLowerCase(), Y;
2323
2323
  try {
2324
2324
  Y = _[Q] = a.getExtension(Q);
2325
2325
  } catch {
@@ -2334,9 +2334,9 @@ function ov() {
2334
2334
  return h.optionalExtensions.forEach(R), {
2335
2335
  extensions: _,
2336
2336
  restore: function() {
2337
- Object.keys(_).forEach(function(N) {
2338
- if (_[N] && !R(N))
2339
- throw new Error("(regl): error restoring extension " + N);
2337
+ Object.keys(_).forEach(function(G) {
2338
+ if (_[G] && !R(G))
2339
+ throw new Error("(regl): error restoring extension " + G);
2340
2340
  });
2341
2341
  }
2342
2342
  };
@@ -2362,40 +2362,40 @@ function ov() {
2362
2362
  return [];
2363
2363
  });
2364
2364
  function h(I) {
2365
- var N = Mc(I), Q = a[$a(N) >> 2];
2366
- return Q.length > 0 ? Q.pop() : new ArrayBuffer(N);
2365
+ var G = Mc(I), Q = a[$a(G) >> 2];
2366
+ return Q.length > 0 ? Q.pop() : new ArrayBuffer(G);
2367
2367
  }
2368
2368
  function _(I) {
2369
2369
  a[$a(I.byteLength) >> 2].push(I);
2370
2370
  }
2371
- function R(I, N) {
2371
+ function R(I, G) {
2372
2372
  var Q = null;
2373
2373
  switch (I) {
2374
2374
  case kc:
2375
- Q = new Int8Array(h(N), 0, N);
2375
+ Q = new Int8Array(h(G), 0, G);
2376
2376
  break;
2377
2377
  case Fc:
2378
- Q = new Uint8Array(h(N), 0, N);
2378
+ Q = new Uint8Array(h(G), 0, G);
2379
2379
  break;
2380
2380
  case Lc:
2381
- Q = new Int16Array(h(2 * N), 0, N);
2381
+ Q = new Int16Array(h(2 * G), 0, G);
2382
2382
  break;
2383
2383
  case zc:
2384
- Q = new Uint16Array(h(2 * N), 0, N);
2384
+ Q = new Uint16Array(h(2 * G), 0, G);
2385
2385
  break;
2386
2386
  case Ic:
2387
- Q = new Int32Array(h(4 * N), 0, N);
2387
+ Q = new Int32Array(h(4 * G), 0, G);
2388
2388
  break;
2389
2389
  case Rc:
2390
- Q = new Uint32Array(h(4 * N), 0, N);
2390
+ Q = new Uint32Array(h(4 * G), 0, G);
2391
2391
  break;
2392
2392
  case Dc:
2393
- Q = new Float32Array(h(4 * N), 0, N);
2393
+ Q = new Float32Array(h(4 * G), 0, G);
2394
2394
  break;
2395
2395
  default:
2396
2396
  return null;
2397
2397
  }
2398
- return Q.length !== N ? Q.subarray(0, N) : Q;
2398
+ return Q.length !== G ? Q.subarray(0, G) : Q;
2399
2399
  }
2400
2400
  function U(I) {
2401
2401
  _(I.buffer);
@@ -2409,21 +2409,21 @@ function ov() {
2409
2409
  }
2410
2410
  var ht = Ua();
2411
2411
  ht.zero = Ua();
2412
- var Oc = 3408, Gc = 3410, Nc = 3411, Bc = 3412, Vc = 3413, $c = 3414, Uc = 3415, Xc = 33901, jc = 33902, Hc = 3379, Wc = 3386, qc = 34921, Yc = 36347, Zc = 36348, Qc = 35661, Kc = 35660, Jc = 34930, el = 36349, tl = 34076, nl = 34024, rl = 7936, il = 7937, ol = 7938, al = 35724, sl = 34047, fl = 36063, ul = 34852, Br = 3553, Xa = 34067, cl = 34069, ll = 33984, lr = 6408, Ji = 5126, ja = 5121, eo = 36160, hl = 36053, dl = 36064, ml = 16384, pl = function(a, h) {
2412
+ var Oc = 3408, Nc = 3410, Gc = 3411, Bc = 3412, Vc = 3413, $c = 3414, Uc = 3415, Xc = 33901, jc = 33902, Hc = 3379, qc = 3386, Wc = 34921, Yc = 36347, Zc = 36348, Qc = 35661, Kc = 35660, Jc = 34930, el = 36349, tl = 34076, nl = 34024, rl = 7936, il = 7937, ol = 7938, al = 35724, sl = 34047, fl = 36063, ul = 34852, Br = 3553, Xa = 34067, cl = 34069, ll = 33984, lr = 6408, Ji = 5126, ja = 5121, eo = 36160, hl = 36053, dl = 36064, ml = 16384, pl = function(a, h) {
2413
2413
  var _ = 1;
2414
2414
  h.ext_texture_filter_anisotropic && (_ = a.getParameter(sl));
2415
2415
  var R = 1, U = 1;
2416
2416
  h.webgl_draw_buffers && (R = a.getParameter(ul), U = a.getParameter(fl));
2417
2417
  var I = !!h.oes_texture_float;
2418
2418
  if (I) {
2419
- var N = a.createTexture();
2420
- a.bindTexture(Br, N), a.texImage2D(Br, 0, lr, 1, 1, 0, lr, Ji, null);
2419
+ var G = a.createTexture();
2420
+ a.bindTexture(Br, G), a.texImage2D(Br, 0, lr, 1, 1, 0, lr, Ji, null);
2421
2421
  var Q = a.createFramebuffer();
2422
- if (a.bindFramebuffer(eo, Q), a.framebufferTexture2D(eo, dl, Br, N, 0), a.bindTexture(Br, null), a.checkFramebufferStatus(eo) !== hl) I = !1;
2422
+ if (a.bindFramebuffer(eo, Q), a.framebufferTexture2D(eo, dl, Br, G, 0), a.bindTexture(Br, null), a.checkFramebufferStatus(eo) !== hl) I = !1;
2423
2423
  else {
2424
2424
  a.viewport(0, 0, 1, 1), a.clearColor(1, 0, 0, 1), a.clear(ml);
2425
2425
  var Y = ht.allocType(Ji, 4);
2426
- a.readPixels(0, 0, 1, 1, lr, Ji, Y), a.getError() ? I = !1 : (a.deleteFramebuffer(Q), a.deleteTexture(N), I = Y[0] === 1), ht.freeType(Y);
2426
+ a.readPixels(0, 0, 1, 1, lr, Ji, Y), a.getError() ? I = !1 : (a.deleteFramebuffer(Q), a.deleteTexture(G), I = Y[0] === 1), ht.freeType(Y);
2427
2427
  }
2428
2428
  }
2429
2429
  var ne = typeof navigator < "u" && (/MSIE/.test(navigator.userAgent) || /Trident\//.test(navigator.appVersion) || /Edge/.test(navigator.userAgent)), ie = !0;
@@ -2434,8 +2434,8 @@ function ov() {
2434
2434
  return {
2435
2435
  // drawing buffer bit depth
2436
2436
  colorBits: [
2437
- a.getParameter(Gc),
2438
2437
  a.getParameter(Nc),
2438
+ a.getParameter(Gc),
2439
2439
  a.getParameter(Bc),
2440
2440
  a.getParameter(Vc)
2441
2441
  ],
@@ -2454,13 +2454,13 @@ function ov() {
2454
2454
  // point and line size ranges
2455
2455
  pointSizeDims: a.getParameter(Xc),
2456
2456
  lineWidthDims: a.getParameter(jc),
2457
- maxViewportDims: a.getParameter(Wc),
2457
+ maxViewportDims: a.getParameter(qc),
2458
2458
  maxCombinedTextureUnits: a.getParameter(Qc),
2459
2459
  maxCubeMapSize: a.getParameter(tl),
2460
2460
  maxRenderbufferSize: a.getParameter(nl),
2461
2461
  maxTextureUnits: a.getParameter(Jc),
2462
2462
  maxTextureSize: a.getParameter(Hc),
2463
- maxAttributes: a.getParameter(qc),
2463
+ maxAttributes: a.getParameter(Wc),
2464
2464
  maxVertexUniforms: a.getParameter(Yc),
2465
2465
  maxVertexTextureUnits: a.getParameter(Kc),
2466
2466
  maxVaryingVectors: a.getParameter(Zc),
@@ -2492,26 +2492,26 @@ function ov() {
2492
2492
  }
2493
2493
  function gl(a, h, _, R) {
2494
2494
  for (var U = 0, I = 0; I < h; ++I)
2495
- for (var N = a[I], Q = 0; Q < _; ++Q)
2496
- R[U++] = N[Q];
2495
+ for (var G = a[I], Q = 0; Q < _; ++Q)
2496
+ R[U++] = G[Q];
2497
2497
  }
2498
2498
  function Ha(a, h, _, R, U, I) {
2499
- for (var N = I, Q = 0; Q < h; ++Q)
2499
+ for (var G = I, Q = 0; Q < h; ++Q)
2500
2500
  for (var Y = a[Q], ne = 0; ne < _; ++ne)
2501
2501
  for (var ie = Y[ne], re = 0; re < R; ++re)
2502
- U[N++] = ie[re];
2502
+ U[G++] = ie[re];
2503
2503
  }
2504
- function Wa(a, h, _, R, U) {
2505
- for (var I = 1, N = _ + 1; N < h.length; ++N)
2506
- I *= h[N];
2504
+ function qa(a, h, _, R, U) {
2505
+ for (var I = 1, G = _ + 1; G < h.length; ++G)
2506
+ I *= h[G];
2507
2507
  var Q = h[_];
2508
2508
  if (h.length - _ === 4) {
2509
2509
  var Y = h[_ + 1], ne = h[_ + 2], ie = h[_ + 3];
2510
- for (N = 0; N < Q; ++N)
2511
- Ha(a[N], Y, ne, ie, R, U), U += I;
2510
+ for (G = 0; G < Q; ++G)
2511
+ Ha(a[G], Y, ne, ie, R, U), U += I;
2512
2512
  } else
2513
- for (N = 0; N < Q; ++N)
2514
- Wa(a[N], h, _ + 1, R, U), U += I;
2513
+ for (G = 0; G < Q; ++G)
2514
+ qa(a[G], h, _ + 1, R, U), U += I;
2515
2515
  }
2516
2516
  function yl(a, h, _, R) {
2517
2517
  var U = 1;
@@ -2520,23 +2520,23 @@ function ov() {
2520
2520
  U *= h[I];
2521
2521
  else
2522
2522
  U = 0;
2523
- var N = R || ht.allocType(_, U);
2523
+ var G = R || ht.allocType(_, U);
2524
2524
  switch (h.length) {
2525
2525
  case 0:
2526
2526
  break;
2527
2527
  case 1:
2528
- vl(a, h[0], N);
2528
+ vl(a, h[0], G);
2529
2529
  break;
2530
2530
  case 2:
2531
- gl(a, h[0], h[1], N);
2531
+ gl(a, h[0], h[1], G);
2532
2532
  break;
2533
2533
  case 3:
2534
- Ha(a, h[0], h[1], h[2], N, 0);
2534
+ Ha(a, h[0], h[1], h[2], G, 0);
2535
2535
  break;
2536
2536
  default:
2537
- Wa(a, h, 0, N, 0);
2537
+ qa(a, h, 0, G, 0);
2538
2538
  }
2539
- return N;
2539
+ return G;
2540
2540
  }
2541
2541
  function xl(a) {
2542
2542
  for (var h = [], _ = a; _.length; _ = _[0])
@@ -2567,7 +2567,7 @@ function ov() {
2567
2567
  dynamic: Pl,
2568
2568
  stream: kl,
2569
2569
  static: 35044
2570
- }, no = Vr.flatten, qa = Vr.shape, Ya = 35044, Fl = 35040, ro = 5121, io = 5126, dn = [];
2570
+ }, no = Vr.flatten, Wa = Vr.shape, Ya = 35044, Fl = 35040, ro = 5121, io = 5126, dn = [];
2571
2571
  dn[5120] = 1, dn[5122] = 2, dn[5124] = 4, dn[5121] = 1, dn[5123] = 2, dn[5125] = 4, dn[5126] = 4;
2572
2572
  function Ur(a) {
2573
2573
  return to[Object.prototype.toString.call(a)] | 0;
@@ -2576,25 +2576,25 @@ function ov() {
2576
2576
  for (var _ = 0; _ < h.length; ++_)
2577
2577
  a[_] = h[_];
2578
2578
  }
2579
- function Qa(a, h, _, R, U, I, N) {
2579
+ function Qa(a, h, _, R, U, I, G) {
2580
2580
  for (var Q = 0, Y = 0; Y < _; ++Y)
2581
2581
  for (var ne = 0; ne < R; ++ne)
2582
- a[Q++] = h[U * Y + I * ne + N];
2582
+ a[Q++] = h[U * Y + I * ne + G];
2583
2583
  }
2584
2584
  function Ll(a, h, _, R) {
2585
2585
  var U = 0, I = {};
2586
- function N(P) {
2586
+ function G(P) {
2587
2587
  this.id = U++, this.buffer = a.createBuffer(), this.type = P, this.usage = Ya, this.byteLength = 0, this.dimension = 1, this.dtype = ro, this.persistentData = null, _.profile && (this.stats = { size: 0 });
2588
2588
  }
2589
- N.prototype.bind = function() {
2589
+ G.prototype.bind = function() {
2590
2590
  a.bindBuffer(this.type, this.buffer);
2591
- }, N.prototype.destroy = function() {
2591
+ }, G.prototype.destroy = function() {
2592
2592
  fe(this);
2593
2593
  };
2594
2594
  var Q = [];
2595
2595
  function Y(P, O) {
2596
2596
  var ee = Q.pop();
2597
- return ee || (ee = new N(P)), ee.bind(), re(ee, O, Fl, 0, 1, !1), ee;
2597
+ return ee || (ee = new G(P)), ee.bind(), re(ee, O, Fl, 0, 1, !1), ee;
2598
2598
  }
2599
2599
  function ne(P) {
2600
2600
  Q.push(P);
@@ -2602,18 +2602,18 @@ function ov() {
2602
2602
  function ie(P, O, ee) {
2603
2603
  P.byteLength = O.byteLength, a.bufferData(P.type, O, ee);
2604
2604
  }
2605
- function re(P, O, ee, ge, W, pe) {
2605
+ function re(P, O, ee, ge, q, pe) {
2606
2606
  var de;
2607
2607
  if (P.usage = ee, Array.isArray(O)) {
2608
2608
  if (P.dtype = ge || io, O.length > 0) {
2609
2609
  var Pe;
2610
2610
  if (Array.isArray(O[0])) {
2611
- de = qa(O);
2611
+ de = Wa(O);
2612
2612
  for (var X = 1, $ = 1; $ < de.length; ++$)
2613
2613
  X *= de[$];
2614
2614
  P.dimension = X, Pe = no(O, de, P.dtype), ie(P, Pe, ee), pe ? P.persistentData = Pe : ht.freeType(Pe);
2615
2615
  } else if (typeof O[0] == "number") {
2616
- P.dimension = W;
2616
+ P.dimension = q;
2617
2617
  var be = ht.allocType(P.dtype, O.length);
2618
2618
  Za(be, O), ie(P, be, ee), pe ? P.persistentData = be : ht.freeType(be);
2619
2619
  } else n(O[0]) ? (P.dimension = O[0].length, P.dtype = ge || Ur(O[0]) || io, Pe = no(
@@ -2623,7 +2623,7 @@ function ov() {
2623
2623
  ), ie(P, Pe, ee), pe ? P.persistentData = Pe : ht.freeType(Pe)) : d.raise("invalid buffer data");
2624
2624
  }
2625
2625
  } else if (n(O))
2626
- P.dtype = ge || Ur(O), P.dimension = W, ie(P, O, ee), pe && (P.persistentData = new Uint8Array(new Uint8Array(O.buffer)));
2626
+ P.dtype = ge || Ur(O), P.dimension = q, ie(P, O, ee), pe && (P.persistentData = new Uint8Array(new Uint8Array(O.buffer)));
2627
2627
  else if (Xt(O)) {
2628
2628
  de = O.shape;
2629
2629
  var ue = O.stride, J = O.offset, ce = 0, he = 0, Oe = 0, De = 0;
@@ -2638,7 +2638,7 @@ function ov() {
2638
2638
  De,
2639
2639
  J
2640
2640
  ), ie(P, me, ee), pe ? P.persistentData = me : ht.freeType(me);
2641
- } else O instanceof ArrayBuffer ? (P.dtype = ro, P.dimension = W, ie(P, O, ee), pe && (P.persistentData = new Uint8Array(new Uint8Array(O)))) : d.raise("invalid buffer data");
2641
+ } else O instanceof ArrayBuffer ? (P.dtype = ro, P.dimension = q, ie(P, O, ee), pe && (P.persistentData = new Uint8Array(new Uint8Array(O)))) : d.raise("invalid buffer data");
2642
2642
  }
2643
2643
  function fe(P) {
2644
2644
  h.bufferCount--, R(P);
@@ -2647,8 +2647,8 @@ function ov() {
2647
2647
  }
2648
2648
  function K(P, O, ee, ge) {
2649
2649
  h.bufferCount++;
2650
- var W = new N(O);
2651
- I[W.id] = W;
2650
+ var q = new G(O);
2651
+ I[q.id] = q;
2652
2652
  function pe(X) {
2653
2653
  var $ = Ya, be = null, ue = 0, J = 0, ce = 1;
2654
2654
  return Array.isArray(X) || n(X) || Xt(X) || X instanceof ArrayBuffer ? be = X : typeof X == "number" ? ue = X | 0 : X && (d.type(
@@ -2658,26 +2658,26 @@ function ov() {
2658
2658
  ), "data" in X && (d(
2659
2659
  be === null || Array.isArray(be) || n(be) || Xt(be),
2660
2660
  "invalid data for buffer"
2661
- ), be = X.data), "usage" in X && (d.parameter(X.usage, $r, "invalid buffer usage"), $ = $r[X.usage]), "type" in X && (d.parameter(X.type, wn, "invalid buffer type"), J = wn[X.type]), "dimension" in X && (d.type(X.dimension, "number", "invalid dimension"), ce = X.dimension | 0), "length" in X && (d.nni(ue, "buffer length must be a nonnegative integer"), ue = X.length | 0)), W.bind(), be ? re(W, be, $, J, ce, ge) : (ue && a.bufferData(W.type, ue, $), W.dtype = J || ro, W.usage = $, W.dimension = ce, W.byteLength = ue), _.profile && (W.stats.size = W.byteLength * dn[W.dtype]), pe;
2661
+ ), be = X.data), "usage" in X && (d.parameter(X.usage, $r, "invalid buffer usage"), $ = $r[X.usage]), "type" in X && (d.parameter(X.type, wn, "invalid buffer type"), J = wn[X.type]), "dimension" in X && (d.type(X.dimension, "number", "invalid dimension"), ce = X.dimension | 0), "length" in X && (d.nni(ue, "buffer length must be a nonnegative integer"), ue = X.length | 0)), q.bind(), be ? re(q, be, $, J, ce, ge) : (ue && a.bufferData(q.type, ue, $), q.dtype = J || ro, q.usage = $, q.dimension = ce, q.byteLength = ue), _.profile && (q.stats.size = q.byteLength * dn[q.dtype]), pe;
2662
2662
  }
2663
2663
  function de(X, $) {
2664
2664
  d(
2665
- $ + X.byteLength <= W.byteLength,
2666
- "invalid buffer subdata call, buffer is too small. Can't write data of size " + X.byteLength + " starting from offset " + $ + " to a buffer of size " + W.byteLength
2667
- ), a.bufferSubData(W.type, $, X);
2665
+ $ + X.byteLength <= q.byteLength,
2666
+ "invalid buffer subdata call, buffer is too small. Can't write data of size " + X.byteLength + " starting from offset " + $ + " to a buffer of size " + q.byteLength
2667
+ ), a.bufferSubData(q.type, $, X);
2668
2668
  }
2669
2669
  function Pe(X, $) {
2670
2670
  var be = ($ || 0) | 0, ue;
2671
- if (W.bind(), n(X) || X instanceof ArrayBuffer)
2671
+ if (q.bind(), n(X) || X instanceof ArrayBuffer)
2672
2672
  de(X, be);
2673
2673
  else if (Array.isArray(X)) {
2674
2674
  if (X.length > 0)
2675
2675
  if (typeof X[0] == "number") {
2676
- var J = ht.allocType(W.dtype, X.length);
2676
+ var J = ht.allocType(q.dtype, X.length);
2677
2677
  Za(J, X), de(J, be), ht.freeType(J);
2678
2678
  } else if (Array.isArray(X[0]) || n(X[0])) {
2679
- ue = qa(X);
2680
- var ce = no(X, ue, W.dtype);
2679
+ ue = Wa(X);
2680
+ var ce = no(X, ue, q.dtype);
2681
2681
  de(ce, be), ht.freeType(ce);
2682
2682
  } else
2683
2683
  d.raise("invalid buffer data");
@@ -2685,22 +2685,22 @@ function ov() {
2685
2685
  ue = X.shape;
2686
2686
  var he = X.stride, Oe = 0, De = 0, me = 0, ve = 0;
2687
2687
  ue.length === 1 ? (Oe = ue[0], De = 1, me = he[0], ve = 0) : ue.length === 2 ? (Oe = ue[0], De = ue[1], me = he[0], ve = he[1]) : d.raise("invalid shape");
2688
- var ze = Array.isArray(X.data) ? W.dtype : Ur(X.data), Ge = ht.allocType(ze, Oe * De);
2688
+ var ze = Array.isArray(X.data) ? q.dtype : Ur(X.data), Ne = ht.allocType(ze, Oe * De);
2689
2689
  Qa(
2690
- Ge,
2690
+ Ne,
2691
2691
  X.data,
2692
2692
  Oe,
2693
2693
  De,
2694
2694
  me,
2695
2695
  ve,
2696
2696
  X.offset
2697
- ), de(Ge, be), ht.freeType(Ge);
2697
+ ), de(Ne, be), ht.freeType(Ne);
2698
2698
  } else
2699
2699
  d.raise("invalid data for buffer subdata");
2700
2700
  return pe;
2701
2701
  }
2702
- return ee || pe(P), pe._reglType = "buffer", pe._buffer = W, pe.subdata = Pe, _.profile && (pe.stats = W.stats), pe.destroy = function() {
2703
- fe(W);
2702
+ return ee || pe(P), pe._reglType = "buffer", pe._buffer = q, pe.subdata = Pe, _.profile && (pe.stats = q.stats), pe.destroy = function() {
2703
+ fe(q);
2704
2704
  }, pe;
2705
2705
  }
2706
2706
  function te() {
@@ -2725,7 +2725,7 @@ function ov() {
2725
2725
  Mt(I).forEach(fe), Q.forEach(fe);
2726
2726
  },
2727
2727
  getBuffer: function(P) {
2728
- return P && P._buffer instanceof N ? P._buffer : null;
2728
+ return P && P._buffer instanceof G ? P._buffer : null;
2729
2729
  },
2730
2730
  restore: te,
2731
2731
  _initBuffer: re
@@ -2742,13 +2742,13 @@ function ov() {
2742
2742
  "line strip": 3,
2743
2743
  "triangle strip": 5,
2744
2744
  "triangle fan": 6
2745
- }, Gl = 0, Nl = 1, hr = 4, Bl = 5120, Un = 5121, Ka = 5122, Xn = 5123, Ja = 5124, Tn = 5125, oo = 34963, Vl = 35040, $l = 35044;
2745
+ }, Nl = 0, Gl = 1, hr = 4, Bl = 5120, Un = 5121, Ka = 5122, Xn = 5123, Ja = 5124, Tn = 5125, oo = 34963, Vl = 35040, $l = 35044;
2746
2746
  function Ul(a, h, _, R) {
2747
- var U = {}, I = 0, N = {
2747
+ var U = {}, I = 0, G = {
2748
2748
  uint8: Un,
2749
2749
  uint16: Xn
2750
2750
  };
2751
- h.oes_element_index_uint && (N.uint32 = Tn);
2751
+ h.oes_element_index_uint && (G.uint32 = Tn);
2752
2752
  function Q(te) {
2753
2753
  this.id = I++, U[this.id] = this, this.buffer = te, this.primType = hr, this.vertCount = 0, this.type = 0;
2754
2754
  }
@@ -2768,7 +2768,7 @@ function ov() {
2768
2768
  function ie(te) {
2769
2769
  Y.push(te);
2770
2770
  }
2771
- function re(te, P, O, ee, ge, W, pe) {
2771
+ function re(te, P, O, ee, ge, q, pe) {
2772
2772
  te.buffer.bind();
2773
2773
  var de;
2774
2774
  if (P) {
@@ -2781,7 +2781,7 @@ function ov() {
2781
2781
  3
2782
2782
  );
2783
2783
  } else
2784
- a.bufferData(oo, W, O), te.buffer.dtype = de || Un, te.buffer.usage = O, te.buffer.dimension = 3, te.buffer.byteLength = W;
2784
+ a.bufferData(oo, q, O), te.buffer.dtype = de || Un, te.buffer.usage = O, te.buffer.dimension = 3, te.buffer.byteLength = q;
2785
2785
  if (de = pe, !pe) {
2786
2786
  switch (te.buffer.dtype) {
2787
2787
  case Un:
@@ -2811,7 +2811,7 @@ function ov() {
2811
2811
  if (ee < 0) {
2812
2812
  $ = hr;
2813
2813
  var be = te.buffer.dimension;
2814
- be === 1 && ($ = Gl), be === 2 && ($ = Nl), be === 3 && ($ = hr);
2814
+ be === 1 && ($ = Nl), be === 2 && ($ = Gl), be === 3 && ($ = hr);
2815
2815
  }
2816
2816
  te.primType = $;
2817
2817
  }
@@ -2821,32 +2821,32 @@ function ov() {
2821
2821
  function K(te, P) {
2822
2822
  var O = _.create(null, oo, !0), ee = new Q(O._buffer);
2823
2823
  R.elementsCount++;
2824
- function ge(W) {
2825
- if (!W)
2824
+ function ge(q) {
2825
+ if (!q)
2826
2826
  O(), ee.primType = hr, ee.vertCount = 0, ee.type = Un;
2827
- else if (typeof W == "number")
2828
- O(W), ee.primType = hr, ee.vertCount = W | 0, ee.type = Un;
2827
+ else if (typeof q == "number")
2828
+ O(q), ee.primType = hr, ee.vertCount = q | 0, ee.type = Un;
2829
2829
  else {
2830
2830
  var pe = null, de = $l, Pe = -1, X = -1, $ = 0, be = 0;
2831
- Array.isArray(W) || n(W) || Xt(W) ? pe = W : (d.type(W, "object", "invalid arguments for elements"), "data" in W && (pe = W.data, d(
2831
+ Array.isArray(q) || n(q) || Xt(q) ? pe = q : (d.type(q, "object", "invalid arguments for elements"), "data" in q && (pe = q.data, d(
2832
2832
  Array.isArray(pe) || n(pe) || Xt(pe),
2833
2833
  "invalid data for element buffer"
2834
- )), "usage" in W && (d.parameter(
2835
- W.usage,
2834
+ )), "usage" in q && (d.parameter(
2835
+ q.usage,
2836
2836
  $r,
2837
2837
  "invalid element buffer usage"
2838
- ), de = $r[W.usage]), "primitive" in W && (d.parameter(
2839
- W.primitive,
2838
+ ), de = $r[q.usage]), "primitive" in q && (d.parameter(
2839
+ q.primitive,
2840
2840
  mn,
2841
2841
  "invalid element buffer primitive"
2842
- ), Pe = mn[W.primitive]), "count" in W && (d(
2843
- typeof W.count == "number" && W.count >= 0,
2842
+ ), Pe = mn[q.primitive]), "count" in q && (d(
2843
+ typeof q.count == "number" && q.count >= 0,
2844
2844
  "invalid vertex count for elements"
2845
- ), X = W.count | 0), "type" in W && (d.parameter(
2846
- W.type,
2847
- N,
2845
+ ), X = q.count | 0), "type" in q && (d.parameter(
2846
+ q.type,
2847
+ G,
2848
2848
  "invalid buffer type"
2849
- ), be = N[W.type]), "length" in W ? $ = W.length | 0 : ($ = X, be === Xn || be === Ka ? $ *= 2 : (be === Tn || be === Ja) && ($ *= 4))), re(
2849
+ ), be = G[q.type]), "length" in q ? $ = q.length | 0 : ($ = X, be === Xn || be === Ka ? $ *= 2 : (be === Tn || be === Ja) && ($ *= 4))), re(
2850
2850
  ee,
2851
2851
  pe,
2852
2852
  de,
@@ -2858,8 +2858,8 @@ function ov() {
2858
2858
  }
2859
2859
  return ge;
2860
2860
  }
2861
- return ge(te), ge._reglType = "elements", ge._elements = ee, ge.subdata = function(W, pe) {
2862
- return O.subdata(W, pe), ge;
2861
+ return ge(te), ge._reglType = "elements", ge._elements = ee, ge.subdata = function(q, pe) {
2862
+ return O.subdata(q, pe), ge;
2863
2863
  }, ge.destroy = function() {
2864
2864
  fe(ee);
2865
2865
  }, ge;
@@ -2887,13 +2887,13 @@ function ov() {
2887
2887
  h[_] = 64512;
2888
2888
  else {
2889
2889
  es[0] = a[_];
2890
- var R = Xl[0], U = R >>> 31 << 15, I = (R << 1 >>> 24) - 127, N = R >> 13 & 1023;
2890
+ var R = Xl[0], U = R >>> 31 << 15, I = (R << 1 >>> 24) - 127, G = R >> 13 & 1023;
2891
2891
  if (I < -24)
2892
2892
  h[_] = U;
2893
2893
  else if (I < -14) {
2894
2894
  var Q = -14 - I;
2895
- h[_] = U + (N + 1024 >> Q);
2896
- } else I > 15 ? h[_] = U + 31744 : h[_] = U + (I + 15 << 10) + N;
2895
+ h[_] = U + (G + 1024 >> Q);
2896
+ } else I > 15 ? h[_] = U + 31744 : h[_] = U + (I + 15 << 10) + G;
2897
2897
  }
2898
2898
  return h;
2899
2899
  }
@@ -2902,7 +2902,7 @@ function ov() {
2902
2902
  }
2903
2903
  var ns = function(a) {
2904
2904
  return !(a & a - 1) && !!a;
2905
- }, Hl = 34467, Zt = 3553, ao = 34067, Xr = 34069, An = 6408, so = 6406, jr = 6407, dr = 6409, Hr = 6410, rs = 32854, fo = 32855, is = 36194, Wl = 32819, ql = 32820, Yl = 33635, Zl = 34042, uo = 6402, Wr = 34041, co = 35904, lo = 35906, jn = 36193, ho = 33776, mo = 33777, po = 33778, vo = 33779, os = 35986, as = 35987, ss = 34798, fs = 35840, us = 35841, cs = 35842, ls = 35843, hs = 36196, Hn = 5121, go = 5123, yo = 5125, mr = 5126, Ql = 10242, Kl = 10243, Jl = 10497, xo = 33071, eh = 33648, th = 10240, nh = 10241, bo = 9728, rh = 9729, _o = 9984, ds = 9985, ms = 9986, So = 9987, ih = 33170, qr = 4352, oh = 4353, ah = 4354, sh = 34046, fh = 3317, uh = 37440, ch = 37441, lh = 37443, ps = 37444, pr = 33984, hh = [
2905
+ }, Hl = 34467, Zt = 3553, ao = 34067, Xr = 34069, An = 6408, so = 6406, jr = 6407, dr = 6409, Hr = 6410, rs = 32854, fo = 32855, is = 36194, ql = 32819, Wl = 32820, Yl = 33635, Zl = 34042, uo = 6402, qr = 34041, co = 35904, lo = 35906, jn = 36193, ho = 33776, mo = 33777, po = 33778, vo = 33779, os = 35986, as = 35987, ss = 34798, fs = 35840, us = 35841, cs = 35842, ls = 35843, hs = 36196, Hn = 5121, go = 5123, yo = 5125, mr = 5126, Ql = 10242, Kl = 10243, Jl = 10497, xo = 33071, eh = 33648, th = 10240, nh = 10241, bo = 9728, rh = 9729, _o = 9984, ds = 9985, ms = 9986, So = 9987, ih = 33170, Wr = 4352, oh = 4353, ah = 4354, sh = 34046, fh = 3317, uh = 37440, ch = 37441, lh = 37443, ps = 37444, pr = 33984, hh = [
2906
2906
  _o,
2907
2907
  ms,
2908
2908
  ds,
@@ -2914,21 +2914,21 @@ function ov() {
2914
2914
  jr,
2915
2915
  An
2916
2916
  ], Bt = {};
2917
- Bt[dr] = Bt[so] = Bt[uo] = 1, Bt[Wr] = Bt[Hr] = 2, Bt[jr] = Bt[co] = 3, Bt[An] = Bt[lo] = 4;
2918
- function Wn(a) {
2917
+ Bt[dr] = Bt[so] = Bt[uo] = 1, Bt[qr] = Bt[Hr] = 2, Bt[jr] = Bt[co] = 3, Bt[An] = Bt[lo] = 4;
2918
+ function qn(a) {
2919
2919
  return "[object " + a + "]";
2920
2920
  }
2921
- var vs = Wn("HTMLCanvasElement"), gs = Wn("OffscreenCanvas"), ys = Wn("CanvasRenderingContext2D"), xs = Wn("ImageBitmap"), bs = Wn("HTMLImageElement"), _s = Wn("HTMLVideoElement"), dh = Object.keys(to).concat([
2921
+ var vs = qn("HTMLCanvasElement"), gs = qn("OffscreenCanvas"), ys = qn("CanvasRenderingContext2D"), xs = qn("ImageBitmap"), bs = qn("HTMLImageElement"), _s = qn("HTMLVideoElement"), dh = Object.keys(to).concat([
2922
2922
  vs,
2923
2923
  gs,
2924
2924
  ys,
2925
2925
  xs,
2926
2926
  bs,
2927
2927
  _s
2928
- ]), qn = [];
2929
- qn[Hn] = 1, qn[mr] = 4, qn[jn] = 2, qn[go] = 2, qn[yo] = 4;
2928
+ ]), Wn = [];
2929
+ Wn[Hn] = 1, Wn[mr] = 4, Wn[jn] = 2, Wn[go] = 2, Wn[yo] = 4;
2930
2930
  var wt = [];
2931
- wt[rs] = 2, wt[fo] = 2, wt[is] = 2, wt[Wr] = 4, wt[ho] = 0.5, wt[mo] = 0.5, wt[po] = 1, wt[vo] = 1, wt[os] = 0.5, wt[as] = 1, wt[ss] = 1, wt[fs] = 0.5, wt[us] = 0.25, wt[cs] = 0.5, wt[ls] = 0.25, wt[hs] = 0.5;
2931
+ wt[rs] = 2, wt[fo] = 2, wt[is] = 2, wt[qr] = 4, wt[ho] = 0.5, wt[mo] = 0.5, wt[po] = 1, wt[vo] = 1, wt[os] = 0.5, wt[as] = 1, wt[ss] = 1, wt[fs] = 0.5, wt[us] = 0.25, wt[cs] = 0.5, wt[ls] = 0.25, wt[hs] = 0.5;
2932
2932
  function Ss(a) {
2933
2933
  return Array.isArray(a) && (a.length === 0 || typeof a[0] == "number");
2934
2934
  }
@@ -2995,25 +2995,25 @@ function ov() {
2995
2995
  a.type === jn ? (a.data = ts(h), ht.freeType(h)) : a.data = h;
2996
2996
  }
2997
2997
  function xh(a, h, _, R, U, I) {
2998
- for (var N = a.width, Q = a.height, Y = a.channels, ne = N * Q * Y, ie = Cs(a, ne), re = 0, fe = 0; fe < Q; ++fe)
2999
- for (var K = 0; K < N; ++K)
2998
+ for (var G = a.width, Q = a.height, Y = a.channels, ne = G * Q * Y, ie = Cs(a, ne), re = 0, fe = 0; fe < Q; ++fe)
2999
+ for (var K = 0; K < G; ++K)
3000
3000
  for (var te = 0; te < Y; ++te)
3001
3001
  ie[re++] = h[_ * K + R * fe + U * te + I];
3002
3002
  Ps(a, ie);
3003
3003
  }
3004
3004
  function Zr(a, h, _, R, U, I) {
3005
- var N;
3006
- if (typeof wt[a] < "u" ? N = wt[a] : N = Bt[a] * qn[h], I && (N *= 6), U) {
3005
+ var G;
3006
+ if (typeof wt[a] < "u" ? G = wt[a] : G = Bt[a] * Wn[h], I && (G *= 6), U) {
3007
3007
  for (var Q = 0, Y = _; Y >= 1; )
3008
- Q += N * Y * Y, Y /= 2;
3008
+ Q += G * Y * Y, Y /= 2;
3009
3009
  return Q;
3010
3010
  } else
3011
- return N * _ * R;
3011
+ return G * _ * R;
3012
3012
  }
3013
- function bh(a, h, _, R, U, I, N) {
3013
+ function bh(a, h, _, R, U, I, G) {
3014
3014
  var Q = {
3015
- "don't care": qr,
3016
- "dont care": qr,
3015
+ "don't care": Wr,
3016
+ "dont care": Wr,
3017
3017
  nice: ah,
3018
3018
  fast: oh
3019
3019
  }, Y = {
@@ -3034,9 +3034,9 @@ function ov() {
3034
3034
  browser: ps
3035
3035
  }, fe = {
3036
3036
  uint8: Hn,
3037
- rgba4: Wl,
3037
+ rgba4: ql,
3038
3038
  rgb565: Yl,
3039
- "rgb5 a1": ql
3039
+ "rgb5 a1": Wl
3040
3040
  }, K = {
3041
3041
  alpha: so,
3042
3042
  luminance: dr,
@@ -3049,7 +3049,7 @@ function ov() {
3049
3049
  }, te = {};
3050
3050
  h.ext_srgb && (K.srgb = co, K.srgba = lo), h.oes_texture_float && (fe.float32 = fe.float = mr), h.oes_texture_half_float && (fe.float16 = fe["half float"] = jn), h.webgl_depth_texture && (r(K, {
3051
3051
  depth: uo,
3052
- "depth stencil": Wr
3052
+ "depth stencil": qr
3053
3053
  }), r(fe, {
3054
3054
  uint16: go,
3055
3055
  uint32: yo,
@@ -3088,10 +3088,10 @@ function ov() {
3088
3088
  var M = fe[y];
3089
3089
  ge[M] = y;
3090
3090
  });
3091
- var W = [];
3091
+ var q = [];
3092
3092
  Object.keys(ne).forEach(function(y) {
3093
3093
  var M = ne[y];
3094
- W[M] = y;
3094
+ q[M] = y;
3095
3095
  });
3096
3096
  var pe = [];
3097
3097
  Object.keys(ie).forEach(function(y) {
@@ -3105,7 +3105,7 @@ function ov() {
3105
3105
  });
3106
3106
  var Pe = O.reduce(function(y, M) {
3107
3107
  var z = K[M];
3108
- return z === dr || z === so || z === dr || z === Hr || z === uo || z === Wr || h.ext_srgb && (z === co || z === lo) ? y[z] = z : z === fo || M.indexOf("rgba") >= 0 ? y[z] = An : y[z] = jr, y;
3108
+ return z === dr || z === so || z === dr || z === Hr || z === uo || z === qr || h.ext_srgb && (z === co || z === lo) ? y[z] = z : z === fo || M.indexOf("rgba") >= 0 ? y[z] = An : y[z] = jr, y;
3109
3109
  }, {});
3110
3110
  function X() {
3111
3111
  this.internalformat = An, this.format = An, this.type = Hn, this.compressed = !1, this.premultiplyAlpha = !1, this.flipY = !1, this.unpackAlignment = 1, this.colorSpace = ps, this.width = 0, this.height = 0, this.channels = 0;
@@ -3287,13 +3287,13 @@ function ov() {
3287
3287
  y.needsFree && ht.freeType(y.data), J.call(y), De.push(y);
3288
3288
  }
3289
3289
  function ze() {
3290
- X.call(this), this.genMipmaps = !1, this.mipmapHint = qr, this.mipmask = 0, this.images = Array(16);
3290
+ X.call(this), this.genMipmaps = !1, this.mipmapHint = Wr, this.mipmask = 0, this.images = Array(16);
3291
3291
  }
3292
- function Ge(y, M, z) {
3292
+ function Ne(y, M, z) {
3293
3293
  var xe = y.images[0] = me();
3294
3294
  y.mipmask = 1, xe.width = y.width = M, xe.height = y.height = z, xe.channels = y.channels = 4;
3295
3295
  }
3296
- function We(y, M) {
3296
+ function qe(y, M) {
3297
3297
  var z = null;
3298
3298
  if (wo(M))
3299
3299
  z = y.images[0] = me(), $(z, y), ce(z, M), y.mipmask = 1;
@@ -3328,7 +3328,7 @@ function ov() {
3328
3328
  ft.push(y);
3329
3329
  }
3330
3330
  function ot() {
3331
- this.minFilter = bo, this.magFilter = bo, this.wrapS = xo, this.wrapT = xo, this.anisotropic = 1, this.genMipmaps = !1, this.mipmapHint = qr;
3331
+ this.minFilter = bo, this.magFilter = bo, this.wrapS = xo, this.wrapT = xo, this.anisotropic = 1, this.genMipmaps = !1, this.mipmapHint = Wr;
3332
3332
  }
3333
3333
  function mt(y, M) {
3334
3334
  if ("min" in M) {
@@ -3388,8 +3388,8 @@ function ov() {
3388
3388
  var gt = 0, _t = {}, Tt = _.maxTextureUnits, ct = Array(Tt).map(function() {
3389
3389
  return null;
3390
3390
  });
3391
- function Ve(y) {
3392
- X.call(this), this.mipmask = 0, this.internalformat = An, this.id = gt++, this.refCount = 1, this.target = y, this.texture = a.createTexture(), this.unit = -1, this.bindCount = 0, this.texInfo = new ot(), N.profile && (this.stats = { size: 0 });
3391
+ function $e(y) {
3392
+ X.call(this), this.mipmask = 0, this.internalformat = An, this.id = gt++, this.refCount = 1, this.target = y, this.texture = a.createTexture(), this.unit = -1, this.bindCount = 0, this.texInfo = new ot(), G.profile && (this.stats = { size: 0 });
3393
3393
  }
3394
3394
  function At(y) {
3395
3395
  a.activeTexture(pr), a.bindTexture(y.target, y.texture);
@@ -3404,7 +3404,7 @@ function ov() {
3404
3404
  var z = y.unit, xe = y.target;
3405
3405
  z >= 0 && (a.activeTexture(pr + z), a.bindTexture(xe, null), ct[z] = null), a.deleteTexture(M), y.texture = null, y.params = null, y.pixels = null, y.refCount = 0, delete _t[y.id], I.textureCount--;
3406
3406
  }
3407
- r(Ve.prototype, {
3407
+ r($e.prototype, {
3408
3408
  bind: function() {
3409
3409
  var y = this;
3410
3410
  y.bindCount += 1;
@@ -3420,7 +3420,7 @@ function ov() {
3420
3420
  ct[z] = y, M = z;
3421
3421
  break;
3422
3422
  }
3423
- M >= Tt && d.raise("insufficient number of texture units"), N.profile && I.maxTextureUnits < M + 1 && (I.maxTextureUnits = M + 1), y.unit = M, a.activeTexture(pr + M), a.bindTexture(y.target, y.texture);
3423
+ M >= Tt && d.raise("insufficient number of texture units"), G.profile && I.maxTextureUnits < M + 1 && (I.maxTextureUnits = M + 1), y.unit = M, a.activeTexture(pr + M), a.bindTexture(y.target, y.texture);
3424
3424
  }
3425
3425
  return M;
3426
3426
  },
@@ -3431,21 +3431,21 @@ function ov() {
3431
3431
  --this.refCount <= 0 && Fe(this);
3432
3432
  }
3433
3433
  });
3434
- function qe(y, M) {
3435
- var z = new Ve(Zt);
3434
+ function We(y, M) {
3435
+ var z = new $e(Zt);
3436
3436
  _t[z.id] = z, I.textureCount++;
3437
3437
  function xe(l, w) {
3438
3438
  var C = z.texInfo;
3439
3439
  ot.call(C);
3440
3440
  var k = Ze();
3441
- return typeof l == "number" ? typeof w == "number" ? Ge(k, l | 0, w | 0) : Ge(k, l | 0, l | 0) : l ? (d.type(l, "object", "invalid arguments to regl.texture"), mt(C, l), We(k, l)) : Ge(k, 1, 1), C.genMipmaps && (k.mipmask = (k.width << 1) - 1), z.mipmask = k.mipmask, $(z, k), d.texture2D(C, k, _), z.internalformat = k.internalformat, xe.width = k.width, xe.height = k.height, At(z), st(k, Zt), vt(C, Zt), Ke(), pt(k), N.profile && (z.stats.size = Zr(
3441
+ return typeof l == "number" ? typeof w == "number" ? Ne(k, l | 0, w | 0) : Ne(k, l | 0, l | 0) : l ? (d.type(l, "object", "invalid arguments to regl.texture"), mt(C, l), qe(k, l)) : Ne(k, 1, 1), C.genMipmaps && (k.mipmask = (k.width << 1) - 1), z.mipmask = k.mipmask, $(z, k), d.texture2D(C, k, _), z.internalformat = k.internalformat, xe.width = k.width, xe.height = k.height, At(z), st(k, Zt), vt(C, Zt), Ke(), pt(k), G.profile && (z.stats.size = Zr(
3442
3442
  z.internalformat,
3443
3443
  z.type,
3444
3444
  k.width,
3445
3445
  k.height,
3446
3446
  C.genMipmaps,
3447
3447
  !1
3448
- )), xe.format = ee[z.internalformat], xe.type = ge[z.type], xe.mag = W[C.magFilter], xe.min = pe[C.minFilter], xe.wrapS = de[C.wrapS], xe.wrapT = de[C.wrapT], xe;
3448
+ )), xe.format = ee[z.internalformat], xe.type = ge[z.type], xe.mag = q[C.magFilter], xe.min = pe[C.minFilter], xe.wrapS = de[C.wrapS], xe.wrapT = de[C.wrapT], xe;
3449
3449
  }
3450
3450
  function He(l, w, C, k) {
3451
3451
  d(!!l, "must specify image data");
@@ -3484,7 +3484,7 @@ function ov() {
3484
3484
  null
3485
3485
  );
3486
3486
  }
3487
- return Ke(), N.profile && (z.stats.size = Zr(
3487
+ return Ke(), G.profile && (z.stats.size = Zr(
3488
3488
  z.internalformat,
3489
3489
  z.type,
3490
3490
  C,
@@ -3493,12 +3493,12 @@ function ov() {
3493
3493
  !1
3494
3494
  )), xe;
3495
3495
  }
3496
- return xe(y, M), xe.subimage = He, xe.resize = m, xe._reglType = "texture2d", xe._texture = z, N.profile && (xe.stats = z.stats), xe.destroy = function() {
3496
+ return xe(y, M), xe.subimage = He, xe.resize = m, xe._reglType = "texture2d", xe._texture = z, G.profile && (xe.stats = z.stats), xe.destroy = function() {
3497
3497
  z.decRef();
3498
3498
  }, xe;
3499
3499
  }
3500
3500
  function Qe(y, M, z, xe, He, m) {
3501
- var l = new Ve(ao);
3501
+ var l = new $e(ao);
3502
3502
  _t[l.id] = l, I.cubeCount++;
3503
3503
  var w = new Array(6);
3504
3504
  function C(T, E, p, x, g, L) {
@@ -3508,10 +3508,10 @@ function ov() {
3508
3508
  if (typeof T == "number" || !T) {
3509
3509
  var j = T | 0 || 1;
3510
3510
  for (F = 0; F < 6; ++F)
3511
- Ge(w[F], j, j);
3511
+ Ne(w[F], j, j);
3512
3512
  } else if (typeof T == "object")
3513
3513
  if (E)
3514
- We(w[0], T), We(w[1], E), We(w[2], p), We(w[3], x), We(w[4], g), We(w[5], L);
3514
+ qe(w[0], T), qe(w[1], E), qe(w[2], p), qe(w[3], x), qe(w[4], g), qe(w[5], L);
3515
3515
  else if (mt(V, T), be(l, T), "faces" in T) {
3516
3516
  var se = T.faces;
3517
3517
  for (d(
@@ -3521,24 +3521,24 @@ function ov() {
3521
3521
  d(
3522
3522
  typeof se[F] == "object" && !!se[F],
3523
3523
  "invalid input for cube map face"
3524
- ), $(w[F], l), We(w[F], se[F]);
3524
+ ), $(w[F], l), qe(w[F], se[F]);
3525
3525
  } else
3526
3526
  for (F = 0; F < 6; ++F)
3527
- We(w[F], T);
3527
+ qe(w[F], T);
3528
3528
  else
3529
3529
  d.raise("invalid arguments to cube map");
3530
3530
  for ($(l, w[0]), d.optional(function() {
3531
3531
  _.npotTextureCube || d(ns(l.width) && ns(l.height), "your browser does not support non power or two texture dimensions");
3532
3532
  }), V.genMipmaps ? l.mipmask = (w[0].width << 1) - 1 : l.mipmask = w[0].mipmask, d.textureCube(l, V, w, _), l.internalformat = w[0].internalformat, C.width = w[0].width, C.height = w[0].height, At(l), F = 0; F < 6; ++F)
3533
3533
  st(w[F], Xr + F);
3534
- for (vt(V, ao), Ke(), N.profile && (l.stats.size = Zr(
3534
+ for (vt(V, ao), Ke(), G.profile && (l.stats.size = Zr(
3535
3535
  l.internalformat,
3536
3536
  l.type,
3537
3537
  C.width,
3538
3538
  C.height,
3539
3539
  V.genMipmaps,
3540
3540
  !0
3541
- )), C.format = ee[l.internalformat], C.type = ge[l.type], C.mag = W[V.magFilter], C.min = pe[V.minFilter], C.wrapS = de[V.wrapS], C.wrapT = de[V.wrapT], F = 0; F < 6; ++F)
3541
+ )), C.format = ee[l.internalformat], C.type = ge[l.type], C.mag = q[V.magFilter], C.min = pe[V.minFilter], C.wrapS = de[V.wrapS], C.wrapT = de[V.wrapT], F = 0; F < 6; ++F)
3542
3542
  pt(w[F]);
3543
3543
  return C;
3544
3544
  }
@@ -3576,7 +3576,7 @@ function ov() {
3576
3576
  l.type,
3577
3577
  null
3578
3578
  );
3579
- return Ke(), N.profile && (l.stats.size = Zr(
3579
+ return Ke(), G.profile && (l.stats.size = Zr(
3580
3580
  l.internalformat,
3581
3581
  l.type,
3582
3582
  C.width,
@@ -3586,7 +3586,7 @@ function ov() {
3586
3586
  )), C;
3587
3587
  }
3588
3588
  }
3589
- return C(y, M, z, xe, He, m), C.subimage = k, C.resize = A, C._reglType = "textureCube", C._texture = l, N.profile && (C.stats = l.stats), C.destroy = function() {
3589
+ return C(y, M, z, xe, He, m), C.subimage = k, C.resize = A, C._reglType = "textureCube", C._texture = l, G.profile && (C.stats = l.stats), C.destroy = function() {
3590
3590
  l.decRef();
3591
3591
  }, C;
3592
3592
  }
@@ -3595,7 +3595,7 @@ function ov() {
3595
3595
  a.activeTexture(pr + y), a.bindTexture(Zt, null), ct[y] = null;
3596
3596
  Mt(_t).forEach(Fe), I.cubeCount = 0, I.textureCount = 0;
3597
3597
  }
3598
- N.profile && (I.getTotalTextureSize = function() {
3598
+ G.profile && (I.getTotalTextureSize = function() {
3599
3599
  var y = 0;
3600
3600
  return Object.keys(_t).forEach(function(M) {
3601
3601
  y += _t[M].stats.size;
@@ -3645,7 +3645,7 @@ function ov() {
3645
3645
  }
3646
3646
  }
3647
3647
  return {
3648
- create2D: qe,
3648
+ create2D: We,
3649
3649
  createCube: Qe,
3650
3650
  clear: lt,
3651
3651
  getTexture: function(y) {
@@ -3657,7 +3657,7 @@ function ov() {
3657
3657
  }
3658
3658
  var pn = 36161, Qr = 32854, ks = 32855, Fs = 36194, Ls = 33189, zs = 36168, Is = 34041, Rs = 35907, Ds = 34836, Ms = 34842, Os = 34843, jt = [];
3659
3659
  jt[Qr] = 2, jt[ks] = 2, jt[Fs] = 2, jt[Ls] = 2, jt[zs] = 1, jt[Is] = 4, jt[Rs] = 4, jt[Ds] = 16, jt[Ms] = 8, jt[Os] = 6;
3660
- function Gs(a, h, _) {
3660
+ function Ns(a, h, _) {
3661
3661
  return jt[a] * h * _;
3662
3662
  }
3663
3663
  var _h = function(a, h, _, R, U) {
@@ -3670,10 +3670,10 @@ function ov() {
3670
3670
  "depth stencil": Is
3671
3671
  };
3672
3672
  h.ext_srgb && (I.srgba = Rs), h.ext_color_buffer_half_float && (I.rgba16f = Ms, I.rgb16f = Os), h.webgl_color_buffer_float && (I.rgba32f = Ds);
3673
- var N = [];
3673
+ var G = [];
3674
3674
  Object.keys(I).forEach(function(K) {
3675
3675
  var te = I[K];
3676
- N[te] = K;
3676
+ G[te] = K;
3677
3677
  });
3678
3678
  var Q = 0, Y = {};
3679
3679
  function ne(K) {
@@ -3689,7 +3689,7 @@ function ov() {
3689
3689
  function re(K, te) {
3690
3690
  var P = new ne(a.createRenderbuffer());
3691
3691
  Y[P.id] = P, R.renderbufferCount++;
3692
- function O(ge, W) {
3692
+ function O(ge, q) {
3693
3693
  var pe = 0, de = 0, Pe = Qr;
3694
3694
  if (typeof ge == "object" && ge) {
3695
3695
  var X = ge;
@@ -3706,7 +3706,7 @@ function ov() {
3706
3706
  I,
3707
3707
  "invalid renderbuffer format"
3708
3708
  ), Pe = I[X.format]);
3709
- } else typeof ge == "number" ? (pe = ge | 0, typeof W == "number" ? de = W | 0 : de = pe) : ge ? d.raise("invalid arguments to renderbuffer constructor") : pe = de = 1;
3709
+ } else typeof ge == "number" ? (pe = ge | 0, typeof q == "number" ? de = q | 0 : de = pe) : ge ? d.raise("invalid arguments to renderbuffer constructor") : pe = de = 1;
3710
3710
  if (d(
3711
3711
  pe > 0 && de > 0 && pe <= _.maxRenderbufferSize && de <= _.maxRenderbufferSize,
3712
3712
  "invalid renderbuffer size"
@@ -3714,17 +3714,17 @@ function ov() {
3714
3714
  return O.width = P.width = pe, O.height = P.height = de, P.format = Pe, a.bindRenderbuffer(pn, P.renderbuffer), a.renderbufferStorage(pn, Pe, pe, de), d(
3715
3715
  a.getError() === 0,
3716
3716
  "invalid render buffer format"
3717
- ), U.profile && (P.stats.size = Gs(P.format, P.width, P.height)), O.format = N[P.format], O;
3717
+ ), U.profile && (P.stats.size = Ns(P.format, P.width, P.height)), O.format = G[P.format], O;
3718
3718
  }
3719
- function ee(ge, W) {
3720
- var pe = ge | 0, de = W | 0 || pe;
3719
+ function ee(ge, q) {
3720
+ var pe = ge | 0, de = q | 0 || pe;
3721
3721
  return pe === P.width && de === P.height || (d(
3722
3722
  pe > 0 && de > 0 && pe <= _.maxRenderbufferSize && de <= _.maxRenderbufferSize,
3723
3723
  "invalid renderbuffer size"
3724
3724
  ), O.width = P.width = pe, O.height = P.height = de, a.bindRenderbuffer(pn, P.renderbuffer), a.renderbufferStorage(pn, P.format, pe, de), d(
3725
3725
  a.getError() === 0,
3726
3726
  "invalid render buffer format"
3727
- ), U.profile && (P.stats.size = Gs(
3727
+ ), U.profile && (P.stats.size = Ns(
3728
3728
  P.format,
3729
3729
  P.width,
3730
3730
  P.height
@@ -3752,25 +3752,25 @@ function ov() {
3752
3752
  },
3753
3753
  restore: fe
3754
3754
  };
3755
- }, on = 36160, To = 36161, Cn = 3553, Kr = 34069, Ns = 36064, Bs = 36096, Vs = 36128, $s = 33306, Us = 36053, Sh = 36054, wh = 36055, Th = 36057, Ah = 36061, Eh = 36193, Ch = 5121, Ph = 5126, Xs = 6407, js = 6408, kh = 6402, Fh = [
3755
+ }, on = 36160, To = 36161, Cn = 3553, Kr = 34069, Gs = 36064, Bs = 36096, Vs = 36128, $s = 33306, Us = 36053, Sh = 36054, wh = 36055, Th = 36057, Ah = 36061, Eh = 36193, Ch = 5121, Ph = 5126, Xs = 6407, js = 6408, kh = 6402, Fh = [
3756
3756
  Xs,
3757
3757
  js
3758
3758
  ], Ao = [];
3759
3759
  Ao[js] = 4, Ao[Xs] = 3;
3760
3760
  var Jr = [];
3761
3761
  Jr[Ch] = 1, Jr[Ph] = 4, Jr[Eh] = 2;
3762
- var Lh = 32854, zh = 32855, Ih = 36194, Rh = 33189, Dh = 36168, Hs = 34041, Mh = 35907, Oh = 34836, Gh = 34842, Nh = 34843, Bh = [
3762
+ var Lh = 32854, zh = 32855, Ih = 36194, Rh = 33189, Dh = 36168, Hs = 34041, Mh = 35907, Oh = 34836, Nh = 34842, Gh = 34843, Bh = [
3763
3763
  Lh,
3764
3764
  zh,
3765
3765
  Ih,
3766
3766
  Mh,
3767
- Gh,
3768
3767
  Nh,
3768
+ Gh,
3769
3769
  Oh
3770
3770
  ], Yn = {};
3771
3771
  Yn[Us] = "complete", Yn[Sh] = "incomplete attachment", Yn[Th] = "incomplete dimensions", Yn[wh] = "incomplete, missing attachment", Yn[Ah] = "unsupported";
3772
3772
  function Vh(a, h, _, R, U, I) {
3773
- var N = {
3773
+ var G = {
3774
3774
  cur: null,
3775
3775
  next: null,
3776
3776
  dirty: !1,
@@ -3850,27 +3850,27 @@ function ov() {
3850
3850
  function ee(J, ce, he) {
3851
3851
  J && (J.texture ? J.texture.resize(ce, he) : J.renderbuffer && J.renderbuffer.resize(ce, he), J.width = ce, J.height = he);
3852
3852
  }
3853
- var ge = 0, W = {};
3853
+ var ge = 0, q = {};
3854
3854
  function pe() {
3855
- this.id = ge++, W[this.id] = this, this.framebuffer = a.createFramebuffer(), this.width = 0, this.height = 0, this.colorAttachments = [], this.depthAttachment = null, this.stencilAttachment = null, this.depthStencilAttachment = null;
3855
+ this.id = ge++, q[this.id] = this, this.framebuffer = a.createFramebuffer(), this.width = 0, this.height = 0, this.colorAttachments = [], this.depthAttachment = null, this.stencilAttachment = null, this.depthStencilAttachment = null;
3856
3856
  }
3857
3857
  function de(J) {
3858
3858
  J.colorAttachments.forEach(re), re(J.depthAttachment), re(J.stencilAttachment), re(J.depthStencilAttachment);
3859
3859
  }
3860
3860
  function Pe(J) {
3861
3861
  var ce = J.framebuffer;
3862
- d(ce, "must not double destroy framebuffer"), a.deleteFramebuffer(ce), J.framebuffer = null, I.framebufferCount--, delete W[J.id];
3862
+ d(ce, "must not double destroy framebuffer"), a.deleteFramebuffer(ce), J.framebuffer = null, I.framebufferCount--, delete q[J.id];
3863
3863
  }
3864
3864
  function X(J) {
3865
3865
  var ce;
3866
3866
  a.bindFramebuffer(on, J.framebuffer);
3867
3867
  var he = J.colorAttachments;
3868
3868
  for (ce = 0; ce < he.length; ++ce)
3869
- K(Ns + ce, he[ce]);
3869
+ K(Gs + ce, he[ce]);
3870
3870
  for (ce = he.length; ce < _.maxColorAttachments; ++ce)
3871
3871
  a.framebufferTexture2D(
3872
3872
  on,
3873
- Ns + ce,
3873
+ Gs + ce,
3874
3874
  Cn,
3875
3875
  null,
3876
3876
  0
@@ -3895,7 +3895,7 @@ function ov() {
3895
3895
  0
3896
3896
  ), K(Bs, J.depthAttachment), K(Vs, J.stencilAttachment), K($s, J.depthStencilAttachment);
3897
3897
  var Oe = a.checkFramebufferStatus(on);
3898
- !a.isContextLost() && Oe !== Us && d.raise("framebuffer configuration not supported, status = " + Yn[Oe]), a.bindFramebuffer(on, N.next ? N.next.framebuffer : null), N.cur = N.next, a.getError();
3898
+ !a.isContextLost() && Oe !== Us && d.raise("framebuffer configuration not supported, status = " + Yn[Oe]), a.bindFramebuffer(on, G.next ? G.next.framebuffer : null), G.cur = G.next, a.getError();
3899
3899
  }
3900
3900
  function $(J, ce) {
3901
3901
  var he = new pe();
@@ -3903,29 +3903,29 @@ function ov() {
3903
3903
  function Oe(me, ve) {
3904
3904
  var ze;
3905
3905
  d(
3906
- N.next !== he,
3906
+ G.next !== he,
3907
3907
  "can not update framebuffer which is currently in use"
3908
3908
  );
3909
- var Ge = 0, We = 0, st = !0, ft = !0, Ze = null, pt = !0, ot = "rgba", mt = "uint8", vt = 1, gt = null, _t = null, Tt = null, ct = !1;
3909
+ var Ne = 0, qe = 0, st = !0, ft = !0, Ze = null, pt = !0, ot = "rgba", mt = "uint8", vt = 1, gt = null, _t = null, Tt = null, ct = !1;
3910
3910
  if (typeof me == "number")
3911
- Ge = me | 0, We = ve | 0 || Ge;
3911
+ Ne = me | 0, qe = ve | 0 || Ne;
3912
3912
  else if (!me)
3913
- Ge = We = 1;
3913
+ Ne = qe = 1;
3914
3914
  else {
3915
3915
  d.type(me, "object", "invalid arguments for framebuffer");
3916
- var Ve = me;
3917
- if ("shape" in Ve) {
3918
- var At = Ve.shape;
3916
+ var $e = me;
3917
+ if ("shape" in $e) {
3918
+ var At = $e.shape;
3919
3919
  d(
3920
3920
  Array.isArray(At) && At.length >= 2,
3921
3921
  "invalid shape for framebuffer"
3922
- ), Ge = At[0], We = At[1];
3922
+ ), Ne = At[0], qe = At[1];
3923
3923
  } else
3924
- "radius" in Ve && (Ge = We = Ve.radius), "width" in Ve && (Ge = Ve.width), "height" in Ve && (We = Ve.height);
3925
- ("color" in Ve || "colors" in Ve) && (Ze = Ve.color || Ve.colors, Array.isArray(Ze) && d(
3924
+ "radius" in $e && (Ne = qe = $e.radius), "width" in $e && (Ne = $e.width), "height" in $e && (qe = $e.height);
3925
+ ("color" in $e || "colors" in $e) && (Ze = $e.color || $e.colors, Array.isArray(Ze) && d(
3926
3926
  Ze.length === 1 || h.webgl_draw_buffers,
3927
3927
  "multiple render targets not supported"
3928
- )), Ze || ("colorCount" in Ve && (vt = Ve.colorCount | 0, d(vt > 0, "invalid color buffer count")), "colorTexture" in Ve && (pt = !!Ve.colorTexture, ot = "rgba4"), "colorType" in Ve && (mt = Ve.colorType, pt ? (d(
3928
+ )), Ze || ("colorCount" in $e && (vt = $e.colorCount | 0, d(vt > 0, "invalid color buffer count")), "colorTexture" in $e && (pt = !!$e.colorTexture, ot = "rgba4"), "colorType" in $e && (mt = $e.colorType, pt ? (d(
3929
3929
  h.oes_texture_float || !(mt === "float" || mt === "float32"),
3930
3930
  "you must enable OES_texture_float in order to use floating point framebuffer objects"
3931
3931
  ), d(
@@ -3937,22 +3937,22 @@ function ov() {
3937
3937
  ), ot = "rgba16f") : (mt === "float" || mt === "float32") && (d(
3938
3938
  h.webgl_color_buffer_float,
3939
3939
  "you must enable WEBGL_color_buffer_float in order to use 32-bit floating point renderbuffers"
3940
- ), ot = "rgba32f"), d.oneOf(mt, ne, "invalid color type")), "colorFormat" in Ve && (ot = Ve.colorFormat, Q.indexOf(ot) >= 0 ? pt = !0 : Y.indexOf(ot) >= 0 ? pt = !1 : d.optional(function() {
3940
+ ), ot = "rgba32f"), d.oneOf(mt, ne, "invalid color type")), "colorFormat" in $e && (ot = $e.colorFormat, Q.indexOf(ot) >= 0 ? pt = !0 : Y.indexOf(ot) >= 0 ? pt = !1 : d.optional(function() {
3941
3941
  pt ? d.oneOf(
3942
- Ve.colorFormat,
3942
+ $e.colorFormat,
3943
3943
  Q,
3944
3944
  "invalid color format for texture"
3945
3945
  ) : d.oneOf(
3946
- Ve.colorFormat,
3946
+ $e.colorFormat,
3947
3947
  Y,
3948
3948
  "invalid color format for renderbuffer"
3949
3949
  );
3950
- }))), ("depthTexture" in Ve || "depthStencilTexture" in Ve) && (ct = !!(Ve.depthTexture || Ve.depthStencilTexture), d(
3950
+ }))), ("depthTexture" in $e || "depthStencilTexture" in $e) && (ct = !!($e.depthTexture || $e.depthStencilTexture), d(
3951
3951
  !ct || h.webgl_depth_texture,
3952
3952
  "webgl_depth_texture extension not supported"
3953
- )), "depth" in Ve && (typeof Ve.depth == "boolean" ? st = Ve.depth : (gt = Ve.depth, ft = !1)), "stencil" in Ve && (typeof Ve.stencil == "boolean" ? ft = Ve.stencil : (_t = Ve.stencil, st = !1)), "depthStencil" in Ve && (typeof Ve.depthStencil == "boolean" ? st = ft = Ve.depthStencil : (Tt = Ve.depthStencil, st = !1, ft = !1));
3953
+ )), "depth" in $e && (typeof $e.depth == "boolean" ? st = $e.depth : (gt = $e.depth, ft = !1)), "stencil" in $e && (typeof $e.stencil == "boolean" ? ft = $e.stencil : (_t = $e.stencil, st = !1)), "depthStencil" in $e && (typeof $e.depthStencil == "boolean" ? st = ft = $e.depthStencil : (Tt = $e.depthStencil, st = !1, ft = !1));
3954
3954
  }
3955
- var Ke = null, Fe = null, qe = null, Qe = null;
3955
+ var Ke = null, Fe = null, We = null, Qe = null;
3956
3956
  if (Array.isArray(Ze))
3957
3957
  Ke = Ze.map(te);
3958
3958
  else if (Ze)
@@ -3960,8 +3960,8 @@ function ov() {
3960
3960
  else
3961
3961
  for (Ke = new Array(vt), ze = 0; ze < vt; ++ze)
3962
3962
  Ke[ze] = P(
3963
- Ge,
3964
- We,
3963
+ Ne,
3964
+ qe,
3965
3965
  pt,
3966
3966
  ot,
3967
3967
  mt
@@ -3972,21 +3972,21 @@ function ov() {
3972
3972
  ), d(
3973
3973
  Ke.length <= _.maxColorAttachments,
3974
3974
  "too many color attachments, not supported"
3975
- ), Ge = Ge || Ke[0].width, We = We || Ke[0].height, gt ? Fe = te(gt) : st && !ft && (Fe = P(
3976
- Ge,
3977
- We,
3975
+ ), Ne = Ne || Ke[0].width, qe = qe || Ke[0].height, gt ? Fe = te(gt) : st && !ft && (Fe = P(
3976
+ Ne,
3977
+ qe,
3978
3978
  ct,
3979
3979
  "depth",
3980
3980
  "uint32"
3981
- )), _t ? qe = te(_t) : ft && !st && (qe = P(
3982
- Ge,
3983
- We,
3981
+ )), _t ? We = te(_t) : ft && !st && (We = P(
3982
+ Ne,
3983
+ qe,
3984
3984
  !1,
3985
3985
  "stencil",
3986
3986
  "uint8"
3987
3987
  )), Tt ? Qe = te(Tt) : !gt && !_t && ft && st && (Qe = P(
3988
- Ge,
3989
- We,
3988
+ Ne,
3989
+ qe,
3990
3990
  ct,
3991
3991
  "depth stencil",
3992
3992
  "depth stencil"
@@ -3996,7 +3996,7 @@ function ov() {
3996
3996
  );
3997
3997
  var lt = null;
3998
3998
  for (ze = 0; ze < Ke.length; ++ze)
3999
- if (fe(Ke[ze], Ge, We), d(
3999
+ if (fe(Ke[ze], Ne, qe), d(
4000
4000
  !Ke[ze] || Ke[ze].texture && Fh.indexOf(Ke[ze].texture._texture.format) >= 0 || Ke[ze].renderbuffer && Bh.indexOf(Ke[ze].renderbuffer._renderbuffer.format) >= 0,
4001
4001
  "framebuffer color attachment " + ze + " is invalid"
4002
4002
  ), Ke[ze] && Ke[ze].texture) {
@@ -4006,28 +4006,28 @@ function ov() {
4006
4006
  "all color attachments much have the same number of bits per pixel."
4007
4007
  );
4008
4008
  }
4009
- return fe(Fe, Ge, We), d(
4009
+ return fe(Fe, Ne, qe), d(
4010
4010
  !Fe || Fe.texture && Fe.texture._texture.format === kh || Fe.renderbuffer && Fe.renderbuffer._renderbuffer.format === Rh,
4011
4011
  "invalid depth attachment for framebuffer object"
4012
- ), fe(qe, Ge, We), d(
4013
- !qe || qe.renderbuffer && qe.renderbuffer._renderbuffer.format === Dh,
4012
+ ), fe(We, Ne, qe), d(
4013
+ !We || We.renderbuffer && We.renderbuffer._renderbuffer.format === Dh,
4014
4014
  "invalid stencil attachment for framebuffer object"
4015
- ), fe(Qe, Ge, We), d(
4015
+ ), fe(Qe, Ne, qe), d(
4016
4016
  !Qe || Qe.texture && Qe.texture._texture.format === Hs || Qe.renderbuffer && Qe.renderbuffer._renderbuffer.format === Hs,
4017
4017
  "invalid depth-stencil attachment for framebuffer object"
4018
- ), de(he), he.width = Ge, he.height = We, he.colorAttachments = Ke, he.depthAttachment = Fe, he.stencilAttachment = qe, he.depthStencilAttachment = Qe, Oe.color = Ke.map(O), Oe.depth = O(Fe), Oe.stencil = O(qe), Oe.depthStencil = O(Qe), Oe.width = he.width, Oe.height = he.height, X(he), Oe;
4018
+ ), de(he), he.width = Ne, he.height = qe, he.colorAttachments = Ke, he.depthAttachment = Fe, he.stencilAttachment = We, he.depthStencilAttachment = Qe, Oe.color = Ke.map(O), Oe.depth = O(Fe), Oe.stencil = O(We), Oe.depthStencil = O(Qe), Oe.width = he.width, Oe.height = he.height, X(he), Oe;
4019
4019
  }
4020
4020
  function De(me, ve) {
4021
4021
  d(
4022
- N.next !== he,
4022
+ G.next !== he,
4023
4023
  "can not resize a framebuffer which is currently in use"
4024
4024
  );
4025
- var ze = Math.max(me | 0, 1), Ge = Math.max(ve | 0 || ze, 1);
4026
- if (ze === he.width && Ge === he.height)
4025
+ var ze = Math.max(me | 0, 1), Ne = Math.max(ve | 0 || ze, 1);
4026
+ if (ze === he.width && Ne === he.height)
4027
4027
  return Oe;
4028
- for (var We = he.colorAttachments, st = 0; st < We.length; ++st)
4029
- ee(We[st], ze, Ge);
4030
- return ee(he.depthAttachment, ze, Ge), ee(he.stencilAttachment, ze, Ge), ee(he.depthStencilAttachment, ze, Ge), he.width = Oe.width = ze, he.height = Oe.height = Ge, X(he), Oe;
4028
+ for (var qe = he.colorAttachments, st = 0; st < qe.length; ++st)
4029
+ ee(qe[st], ze, Ne);
4030
+ return ee(he.depthAttachment, ze, Ne), ee(he.stencilAttachment, ze, Ne), ee(he.depthStencilAttachment, ze, Ne), he.width = Oe.width = ze, he.height = Oe.height = Ne, X(he), Oe;
4031
4031
  }
4032
4032
  return Oe(J, ce), r(Oe, {
4033
4033
  resize: De,
@@ -4037,7 +4037,7 @@ function ov() {
4037
4037
  Pe(he), de(he);
4038
4038
  },
4039
4039
  use: function(me) {
4040
- N.setFBO({
4040
+ G.setFBO({
4041
4041
  framebuffer: Oe
4042
4042
  }, me);
4043
4043
  }
@@ -4048,12 +4048,12 @@ function ov() {
4048
4048
  function he(De) {
4049
4049
  var me;
4050
4050
  d(
4051
- ce.indexOf(N.next) < 0,
4051
+ ce.indexOf(G.next) < 0,
4052
4052
  "can not update framebuffer which is currently in use"
4053
4053
  );
4054
4054
  var ve = {
4055
4055
  color: null
4056
- }, ze = 0, Ge = null, We = "rgba", st = "uint8", ft = 1;
4056
+ }, ze = 0, Ne = null, qe = "rgba", st = "uint8", ft = 1;
4057
4057
  if (typeof De == "number")
4058
4058
  ze = De | 0;
4059
4059
  else if (!De)
@@ -4072,31 +4072,31 @@ function ov() {
4072
4072
  ), ze = pt[0];
4073
4073
  } else
4074
4074
  "radius" in Ze && (ze = Ze.radius | 0), "width" in Ze ? (ze = Ze.width | 0, "height" in Ze && d(Ze.height === ze, "must be square")) : "height" in Ze && (ze = Ze.height | 0);
4075
- ("color" in Ze || "colors" in Ze) && (Ge = Ze.color || Ze.colors, Array.isArray(Ge) && d(
4076
- Ge.length === 1 || h.webgl_draw_buffers,
4075
+ ("color" in Ze || "colors" in Ze) && (Ne = Ze.color || Ze.colors, Array.isArray(Ne) && d(
4076
+ Ne.length === 1 || h.webgl_draw_buffers,
4077
4077
  "multiple render targets not supported"
4078
- )), Ge || ("colorCount" in Ze && (ft = Ze.colorCount | 0, d(ft > 0, "invalid color buffer count")), "colorType" in Ze && (d.oneOf(
4078
+ )), Ne || ("colorCount" in Ze && (ft = Ze.colorCount | 0, d(ft > 0, "invalid color buffer count")), "colorType" in Ze && (d.oneOf(
4079
4079
  Ze.colorType,
4080
4080
  ne,
4081
4081
  "invalid color type"
4082
- ), st = Ze.colorType), "colorFormat" in Ze && (We = Ze.colorFormat, d.oneOf(
4082
+ ), st = Ze.colorType), "colorFormat" in Ze && (qe = Ze.colorFormat, d.oneOf(
4083
4083
  Ze.colorFormat,
4084
4084
  Q,
4085
4085
  "invalid color format for texture"
4086
4086
  ))), "depth" in Ze && (ve.depth = Ze.depth), "stencil" in Ze && (ve.stencil = Ze.stencil), "depthStencil" in Ze && (ve.depthStencil = Ze.depthStencil);
4087
4087
  }
4088
4088
  var ot;
4089
- if (Ge)
4090
- if (Array.isArray(Ge))
4091
- for (ot = [], me = 0; me < Ge.length; ++me)
4092
- ot[me] = Ge[me];
4089
+ if (Ne)
4090
+ if (Array.isArray(Ne))
4091
+ for (ot = [], me = 0; me < Ne.length; ++me)
4092
+ ot[me] = Ne[me];
4093
4093
  else
4094
- ot = [Ge];
4094
+ ot = [Ne];
4095
4095
  else {
4096
4096
  ot = Array(ft);
4097
4097
  var mt = {
4098
4098
  radius: ze,
4099
- format: We,
4099
+ format: qe,
4100
4100
  type: st
4101
4101
  };
4102
4102
  for (me = 0; me < ft; ++me)
@@ -4152,11 +4152,11 @@ function ov() {
4152
4152
  });
4153
4153
  }
4154
4154
  function ue() {
4155
- N.cur = null, N.next = null, N.dirty = !0, Mt(W).forEach(function(J) {
4155
+ G.cur = null, G.next = null, G.dirty = !0, Mt(q).forEach(function(J) {
4156
4156
  J.framebuffer = a.createFramebuffer(), X(J);
4157
4157
  });
4158
4158
  }
4159
- return r(N, {
4159
+ return r(G, {
4160
4160
  getFramebuffer: function(J) {
4161
4161
  if (typeof J == "function" && J._reglType === "framebuffer") {
4162
4162
  var ce = J._framebuffer;
@@ -4168,12 +4168,12 @@ function ov() {
4168
4168
  create: $,
4169
4169
  createCube: be,
4170
4170
  clear: function() {
4171
- Mt(W).forEach(Pe);
4171
+ Mt(q).forEach(Pe);
4172
4172
  },
4173
4173
  restore: ue
4174
4174
  });
4175
4175
  }
4176
- var $h = 5126, Ws = 34962, ei = 34963, qs = [
4176
+ var $h = 5126, qs = 34962, ei = 34963, Ws = [
4177
4177
  "attributes",
4178
4178
  "elements",
4179
4179
  "offset",
@@ -4184,7 +4184,7 @@ function ov() {
4184
4184
  function Eo() {
4185
4185
  this.state = 0, this.x = 0, this.y = 0, this.z = 0, this.w = 0, this.buffer = null, this.size = 0, this.normalized = !1, this.type = $h, this.offset = 0, this.stride = 0, this.divisor = 0;
4186
4186
  }
4187
- function Uh(a, h, _, R, U, I, N) {
4187
+ function Uh(a, h, _, R, U, I, G) {
4188
4188
  for (var Q = _.maxAttributes, Y = new Array(Q), ne = 0; ne < Q; ++ne)
4189
4189
  Y[ne] = new Eo();
4190
4190
  var ie = 0, re = {}, fe = {
@@ -4199,7 +4199,7 @@ function ov() {
4199
4199
  getVAO: O,
4200
4200
  destroyBuffer: K,
4201
4201
  setVAO: te() ? ee : ge,
4202
- clear: te() ? W : function() {
4202
+ clear: te() ? q : function() {
4203
4203
  }
4204
4204
  };
4205
4205
  function K(X) {
@@ -4232,12 +4232,12 @@ function ov() {
4232
4232
  var ue = Y[be];
4233
4233
  ue.buffer ? (a.enableVertexAttribArray(be), ue.buffer.bind(), a.vertexAttribPointer(be, ue.size, ue.type, ue.normalized, ue.stride, ue.offfset), $ && ue.divisor && $.vertexAttribDivisorANGLE(be, ue.divisor)) : (a.disableVertexAttribArray(be), a.vertexAttrib4f(be, ue.x, ue.y, ue.z, ue.w));
4234
4234
  }
4235
- N.elements ? a.bindBuffer(ei, N.elements.buffer.buffer) : a.bindBuffer(ei, null);
4235
+ G.elements ? a.bindBuffer(ei, G.elements.buffer.buffer) : a.bindBuffer(ei, null);
4236
4236
  }
4237
4237
  fe.currentVAO = X;
4238
4238
  }
4239
4239
  }
4240
- function W() {
4240
+ function q() {
4241
4241
  Mt(re).forEach(function(X) {
4242
4242
  X.destroy();
4243
4243
  });
@@ -4250,7 +4250,7 @@ function ov() {
4250
4250
  pe.prototype.bindAttrs = function() {
4251
4251
  for (var X = P(), $ = this.attributes, be = 0; be < $.length; ++be) {
4252
4252
  var ue = $[be];
4253
- ue.buffer ? (a.enableVertexAttribArray(be), a.bindBuffer(Ws, ue.buffer.buffer), a.vertexAttribPointer(be, ue.size, ue.type, ue.normalized, ue.stride, ue.offset), X && ue.divisor && X.vertexAttribDivisorANGLE(be, ue.divisor)) : (a.disableVertexAttribArray(be), a.vertexAttrib4f(be, ue.x, ue.y, ue.z, ue.w));
4253
+ ue.buffer ? (a.enableVertexAttribArray(be), a.bindBuffer(qs, ue.buffer.buffer), a.vertexAttribPointer(be, ue.size, ue.type, ue.normalized, ue.stride, ue.offset), X && ue.divisor && X.vertexAttribDivisorANGLE(be, ue.divisor)) : (a.disableVertexAttribArray(be), a.vertexAttrib4f(be, ue.x, ue.y, ue.z, ue.w));
4254
4254
  }
4255
4255
  for (var J = $.length; J < Q; ++J)
4256
4256
  a.disableVertexAttribArray(J);
@@ -4287,7 +4287,7 @@ function ov() {
4287
4287
  $.elements = null, $.ownsElements = !1;
4288
4288
  J = ue.attributes, $.offset = 0, $.count = -1, $.instances = -1, $.primitive = 4, $.elements && ($.count = $.elements._elements.vertCount, $.primitive = $.elements._elements.primType), "offset" in ue && ($.offset = ue.offset | 0), "count" in ue && ($.count = ue.count | 0), "instances" in ue && ($.instances = ue.instances | 0), "primitive" in ue && (d(ue.primitive in mn, "bad primitive type: " + ue.primitive), $.primitive = mn[ue.primitive]), d.optional(() => {
4289
4289
  for (var st = Object.keys(ue), ft = 0; ft < st.length; ++ft)
4290
- d(qs.indexOf(st[ft]) >= 0, 'invalid option for vao: "' + st[ft] + '" valid options are ' + qs);
4290
+ d(Ws.indexOf(st[ft]) >= 0, 'invalid option for vao: "' + st[ft] + '" valid options are ' + Ws);
4291
4291
  }), d(Array.isArray(J), "attributes must be an array");
4292
4292
  }
4293
4293
  d(J.length < Q, "too many attributes"), d(J.length > 0, "must specify at least one attribute");
@@ -4296,12 +4296,12 @@ function ov() {
4296
4296
  for (var De = 0; De < J.length; ++De) {
4297
4297
  var me = J[De], ve = Oe[De] = new Eo(), ze = me.data || me;
4298
4298
  if (Array.isArray(ze) || n(ze) || Xt(ze)) {
4299
- var Ge;
4300
- $.buffers[De] && (Ge = $.buffers[De], n(ze) && Ge._buffer.byteLength >= ze.byteLength ? Ge.subdata(ze) : (Ge.destroy(), $.buffers[De] = null)), $.buffers[De] || (Ge = $.buffers[De] = U.create(me, Ws, !1, !0)), ve.buffer = U.getBuffer(Ge), ve.size = ve.buffer.dimension | 0, ve.normalized = !1, ve.type = ve.buffer.dtype, ve.offset = 0, ve.stride = 0, ve.divisor = 0, ve.state = 1, he[De] = 1;
4299
+ var Ne;
4300
+ $.buffers[De] && (Ne = $.buffers[De], n(ze) && Ne._buffer.byteLength >= ze.byteLength ? Ne.subdata(ze) : (Ne.destroy(), $.buffers[De] = null)), $.buffers[De] || (Ne = $.buffers[De] = U.create(me, qs, !1, !0)), ve.buffer = U.getBuffer(Ne), ve.size = ve.buffer.dimension | 0, ve.normalized = !1, ve.type = ve.buffer.dtype, ve.offset = 0, ve.stride = 0, ve.divisor = 0, ve.state = 1, he[De] = 1;
4301
4301
  } else U.getBuffer(me) ? (ve.buffer = U.getBuffer(me), ve.size = ve.buffer.dimension | 0, ve.normalized = !1, ve.type = ve.buffer.dtype, ve.offset = 0, ve.stride = 0, ve.divisor = 0, ve.state = 1) : U.getBuffer(me.buffer) ? (ve.buffer = U.getBuffer(me.buffer), ve.size = (+me.size || ve.buffer.dimension) | 0, ve.normalized = !!me.normalized || !1, "type" in me ? (d.parameter(me.type, wn, "invalid buffer type"), ve.type = wn[me.type]) : ve.type = ve.buffer.dtype, ve.offset = (me.offset || 0) | 0, ve.stride = (me.stride || 0) | 0, ve.divisor = (me.divisor || 0) | 0, ve.state = 1, d(ve.size >= 1 && ve.size <= 4, "size must be between 1 and 4"), d(ve.offset >= 0, "invalid offset"), d(ve.stride >= 0 && ve.stride <= 255, "stride must be between 0 and 255"), d(ve.divisor >= 0, "divisor must be positive"), d(!ve.divisor || !!h.angle_instanced_arrays, "ANGLE_instanced_arrays must be enabled to use divisor")) : "x" in me ? (d(De > 0, "first attribute must not be a constant"), ve.x = +me.x || 0, ve.y = +me.y || 0, ve.z = +me.z || 0, ve.w = +me.w || 0, ve.state = 2) : d(!1, "invalid attribute spec for location " + De);
4302
4302
  }
4303
- for (var We = 0; We < $.buffers.length; ++We)
4304
- !he[We] && $.buffers[We] && ($.buffers[We].destroy(), $.buffers[We] = null);
4303
+ for (var qe = 0; qe < $.buffers.length; ++qe)
4304
+ !he[qe] && $.buffers[qe] && ($.buffers[qe].destroy(), $.buffers[qe] = null);
4305
4305
  return $.refresh(), be;
4306
4306
  }
4307
4307
  return be.destroy = function() {
@@ -4313,9 +4313,9 @@ function ov() {
4313
4313
  return fe;
4314
4314
  }
4315
4315
  var Ys = 35632, Xh = 35633, jh = 35718, Hh = 35721;
4316
- function Wh(a, h, _, R) {
4316
+ function qh(a, h, _, R) {
4317
4317
  var U = {}, I = {};
4318
- function N(P, O, ee, ge) {
4318
+ function G(P, O, ee, ge) {
4319
4319
  this.name = P, this.id = O, this.location = ee, this.info = ge;
4320
4320
  }
4321
4321
  function Q(P, O) {
@@ -4327,12 +4327,12 @@ function ov() {
4327
4327
  P.push(O);
4328
4328
  }
4329
4329
  function Y(P, O, ee) {
4330
- var ge = P === Ys ? U : I, W = ge[O];
4331
- if (!W) {
4330
+ var ge = P === Ys ? U : I, q = ge[O];
4331
+ if (!q) {
4332
4332
  var pe = h.str(O);
4333
- W = a.createShader(P), a.shaderSource(W, pe), a.compileShader(W), d.shaderError(a, W, pe, P, ee), ge[O] = W;
4333
+ q = a.createShader(P), a.shaderSource(q, pe), a.compileShader(q), d.shaderError(a, q, pe, P, ee), ge[O] = q;
4334
4334
  }
4335
- return W;
4335
+ return q;
4336
4336
  }
4337
4337
  var ne = {}, ie = [], re = 0;
4338
4338
  function fe(P, O) {
@@ -4342,7 +4342,7 @@ function ov() {
4342
4342
  });
4343
4343
  }
4344
4344
  function K(P, O, ee) {
4345
- var ge, W, pe = Y(Ys, P.fragId), de = Y(Xh, P.vertId), Pe = P.program = a.createProgram();
4345
+ var ge, q, pe = Y(Ys, P.fragId), de = Y(Xh, P.vertId), Pe = P.program = a.createProgram();
4346
4346
  if (a.attachShader(Pe, pe), a.attachShader(Pe, de), ee)
4347
4347
  for (ge = 0; ge < ee.length; ++ge) {
4348
4348
  var X = ee[ge];
@@ -4359,34 +4359,34 @@ function ov() {
4359
4359
  R.profile && (P.stats.uniformsCount = $);
4360
4360
  var be = P.uniforms;
4361
4361
  for (ge = 0; ge < $; ++ge)
4362
- if (W = a.getActiveUniform(Pe, ge), W) {
4363
- if (W.size > 1)
4364
- for (var ue = 0; ue < W.size; ++ue) {
4365
- var J = W.name.replace("[0]", "[" + ue + "]");
4366
- Q(be, new N(
4362
+ if (q = a.getActiveUniform(Pe, ge), q) {
4363
+ if (q.size > 1)
4364
+ for (var ue = 0; ue < q.size; ++ue) {
4365
+ var J = q.name.replace("[0]", "[" + ue + "]");
4366
+ Q(be, new G(
4367
4367
  J,
4368
4368
  h.id(J),
4369
4369
  a.getUniformLocation(Pe, J),
4370
- W
4370
+ q
4371
4371
  ));
4372
4372
  }
4373
- var ce = W.name;
4374
- W.size > 1 && (ce = ce.replace("[0]", "")), Q(be, new N(
4373
+ var ce = q.name;
4374
+ q.size > 1 && (ce = ce.replace("[0]", "")), Q(be, new G(
4375
4375
  ce,
4376
4376
  h.id(ce),
4377
4377
  a.getUniformLocation(Pe, ce),
4378
- W
4378
+ q
4379
4379
  ));
4380
4380
  }
4381
4381
  var he = a.getProgramParameter(Pe, Hh);
4382
4382
  R.profile && (P.stats.attributesCount = he);
4383
4383
  var Oe = P.attributes;
4384
4384
  for (ge = 0; ge < he; ++ge)
4385
- W = a.getActiveAttrib(Pe, ge), W && Q(Oe, new N(
4386
- W.name,
4387
- h.id(W.name),
4388
- a.getAttribLocation(Pe, W.name),
4389
- W
4385
+ q = a.getActiveAttrib(Pe, ge), q && Q(Oe, new G(
4386
+ q.name,
4387
+ h.id(q.name),
4388
+ a.getAttribLocation(Pe, q.name),
4389
+ q
4390
4390
  ));
4391
4391
  }
4392
4392
  R.profile && (_.getMaxUniformsCount = function() {
@@ -4416,20 +4416,20 @@ function ov() {
4416
4416
  },
4417
4417
  program: function(P, O, ee, ge) {
4418
4418
  d.command(P >= 0, "missing vertex shader", ee), d.command(O >= 0, "missing fragment shader", ee);
4419
- var W = ne[O];
4420
- W || (W = ne[O] = {});
4421
- var pe = W[P];
4419
+ var q = ne[O];
4420
+ q || (q = ne[O] = {});
4421
+ var pe = q[P];
4422
4422
  if (pe && (pe.refCount++, !ge))
4423
4423
  return pe;
4424
4424
  var de = new fe(O, P);
4425
- return _.shaderCount++, K(de, ee, ge), pe || (W[P] = de), ie.push(de), r(de, {
4425
+ return _.shaderCount++, K(de, ee, ge), pe || (q[P] = de), ie.push(de), r(de, {
4426
4426
  destroy: function() {
4427
4427
  if (de.refCount--, de.refCount <= 0) {
4428
4428
  a.deleteProgram(de.program);
4429
4429
  var Pe = ie.indexOf(de);
4430
4430
  ie.splice(Pe, 1), _.shaderCount--;
4431
4431
  }
4432
- W[de.vertId].refCount <= 0 && (a.deleteShader(I[de.vertId]), delete I[de.vertId], delete ne[de.fragId][de.vertId]), Object.keys(ne[de.fragId]).length || (a.deleteShader(U[de.fragId]), delete U[de.fragId], delete ne[de.fragId]);
4432
+ q[de.vertId].refCount <= 0 && (a.deleteShader(I[de.vertId]), delete I[de.vertId], delete ne[de.fragId][de.vertId]), Object.keys(ne[de.fragId]).length || (a.deleteShader(U[de.fragId]), delete U[de.fragId], delete ne[de.fragId]);
4433
4433
  }
4434
4434
  });
4435
4435
  },
@@ -4439,8 +4439,8 @@ function ov() {
4439
4439
  vert: -1
4440
4440
  };
4441
4441
  }
4442
- var qh = 6408, vr = 5121, Yh = 3333, ti = 5126;
4443
- function Zh(a, h, _, R, U, I, N) {
4442
+ var Wh = 6408, vr = 5121, Yh = 3333, ti = 5126;
4443
+ function Zh(a, h, _, R, U, I, G) {
4444
4444
  function Q(ie) {
4445
4445
  var re;
4446
4446
  h.next === null ? (d(
@@ -4453,7 +4453,7 @@ function ov() {
4453
4453
  I.oes_texture_float ? (d(
4454
4454
  re === vr || re === ti,
4455
4455
  "Reading from a framebuffer is only allowed for the types 'uint8' and 'float'"
4456
- ), re === ti && d(N.readFloat, "Reading 'float' values is not permitted in your browser. For a fallback, please see: https://www.npmjs.com/package/glsl-read-float")) : d(
4456
+ ), re === ti && d(G.readFloat, "Reading 'float' values is not permitted in your browser. For a fallback, please see: https://www.npmjs.com/package/glsl-read-float")) : d(
4457
4457
  re === vr,
4458
4458
  "Reading from a framebuffer is only allowed for the type 'uint8'"
4459
4459
  );
@@ -4484,7 +4484,7 @@ function ov() {
4484
4484
  K,
4485
4485
  te,
4486
4486
  P,
4487
- qh,
4487
+ Wh,
4488
4488
  re,
4489
4489
  O
4490
4490
  ), O;
@@ -4557,7 +4557,7 @@ function ov() {
4557
4557
  }
4558
4558
  });
4559
4559
  }
4560
- function N() {
4560
+ function G() {
4561
4561
  var re = Qn(arguments), fe = I(), K = I(), te = fe.toString, P = K.toString;
4562
4562
  return r(fe, {
4563
4563
  then: function() {
@@ -4583,8 +4583,8 @@ function ov() {
4583
4583
  function ne(re, fe) {
4584
4584
  var K = [];
4585
4585
  function te() {
4586
- var W = "a" + K.length;
4587
- return K.push(W), W;
4586
+ var q = "a" + K.length;
4587
+ return K.push(q), q;
4588
4588
  }
4589
4589
  fe = fe || 0;
4590
4590
  for (var P = 0; P < fe; ++P)
@@ -4624,21 +4624,21 @@ function ov() {
4624
4624
  block: U,
4625
4625
  proc: ne,
4626
4626
  scope: I,
4627
- cond: N,
4627
+ cond: G,
4628
4628
  compile: ie
4629
4629
  };
4630
4630
  }
4631
- var Kn = "xyzw".split(""), Zs = 5121, Jn = 1, Co = 2, Po = 0, ko = 1, Fo = 2, Lo = 3, ni = 4, Qs = 5, Ks = 6, Js = "dither", ef = "blend.enable", tf = "blend.color", zo = "blend.equation", Io = "blend.func", nf = "depth.enable", rf = "depth.func", of = "depth.range", af = "depth.mask", Ro = "colorMask", sf = "cull.enable", ff = "cull.face", Do = "frontFace", Mo = "lineWidth", uf = "polygonOffset.enable", Oo = "polygonOffset.offset", cf = "sample.alpha", lf = "sample.enable", Go = "sample.coverage", hf = "stencil.enable", df = "stencil.mask", No = "stencil.func", Bo = "stencil.opFront", gr = "stencil.opBack", mf = "scissor.enable", ri = "scissor.box", an = "viewport", yr = "profile", Pn = "framebuffer", xr = "vert", br = "frag", kn = "elements", Fn = "primitive", Ln = "count", ii = "offset", oi = "instances", _r = "vao", Vo = "Width", $o = "Height", er = Pn + Vo, tr = Pn + $o, Kh = an + Vo, Jh = an + $o, pf = "drawingBuffer", vf = pf + Vo, gf = pf + $o, ed = [
4631
+ var Kn = "xyzw".split(""), Zs = 5121, Jn = 1, Co = 2, Po = 0, ko = 1, Fo = 2, Lo = 3, ni = 4, Qs = 5, Ks = 6, Js = "dither", ef = "blend.enable", tf = "blend.color", zo = "blend.equation", Io = "blend.func", nf = "depth.enable", rf = "depth.func", of = "depth.range", af = "depth.mask", Ro = "colorMask", sf = "cull.enable", ff = "cull.face", Do = "frontFace", Mo = "lineWidth", uf = "polygonOffset.enable", Oo = "polygonOffset.offset", cf = "sample.alpha", lf = "sample.enable", No = "sample.coverage", hf = "stencil.enable", df = "stencil.mask", Go = "stencil.func", Bo = "stencil.opFront", gr = "stencil.opBack", mf = "scissor.enable", ri = "scissor.box", an = "viewport", yr = "profile", Pn = "framebuffer", xr = "vert", br = "frag", kn = "elements", Fn = "primitive", Ln = "count", ii = "offset", oi = "instances", _r = "vao", Vo = "Width", $o = "Height", er = Pn + Vo, tr = Pn + $o, Kh = an + Vo, Jh = an + $o, pf = "drawingBuffer", vf = pf + Vo, gf = pf + $o, ed = [
4632
4632
  Io,
4633
4633
  zo,
4634
- No,
4634
+ Go,
4635
4635
  Bo,
4636
4636
  gr,
4637
- Go,
4637
+ No,
4638
4638
  an,
4639
4639
  ri,
4640
4640
  Oo
4641
- ], nr = 34962, Uo = 34963, td = 35632, nd = 35633, yf = 3553, rd = 34067, id = 2884, od = 3042, ad = 3024, sd = 2960, fd = 2929, ud = 3089, cd = 32823, ld = 32926, hd = 32928, Xo = 5126, ai = 35664, si = 35665, fi = 35666, jo = 5124, ui = 35667, ci = 35668, li = 35669, Ho = 35670, hi = 35671, di = 35672, mi = 35673, Sr = 35674, wr = 35675, Tr = 35676, Ar = 35678, Er = 35680, Wo = 4, Cr = 1028, zn = 1029, xf = 2304, qo = 2305, dd = 32775, md = 32776, pd = 519, vn = 7680, bf = 0, _f = 1, Sf = 32774, vd = 513, wf = 36160, gd = 36064, Qt = {
4641
+ ], nr = 34962, Uo = 34963, td = 35632, nd = 35633, yf = 3553, rd = 34067, id = 2884, od = 3042, ad = 3024, sd = 2960, fd = 2929, ud = 3089, cd = 32823, ld = 32926, hd = 32928, Xo = 5126, ai = 35664, si = 35665, fi = 35666, jo = 5124, ui = 35667, ci = 35668, li = 35669, Ho = 35670, hi = 35671, di = 35672, mi = 35673, Sr = 35674, wr = 35675, Tr = 35676, Ar = 35678, Er = 35680, qo = 4, Cr = 1028, zn = 1029, xf = 2304, Wo = 2305, dd = 32775, md = 32776, pd = 519, vn = 7680, bf = 0, _f = 1, Sf = 32774, vd = 513, wf = 36160, gd = 36064, Qt = {
4642
4642
  0: 0,
4643
4643
  1: 1,
4644
4644
  zero: 0,
@@ -4698,7 +4698,7 @@ function ov() {
4698
4698
  vert: nd
4699
4699
  }, Yo = {
4700
4700
  cw: xf,
4701
- ccw: qo
4701
+ ccw: Wo
4702
4702
  };
4703
4703
  function pi(a) {
4704
4704
  return Array.isArray(a) || n(a) || Xt(a);
@@ -4744,23 +4744,23 @@ function ov() {
4744
4744
  h
4745
4745
  );
4746
4746
  if (_ === Ks) {
4747
- for (var I = !1, N = !1, Q = !1, Y = 0; Y < a.data.length; ++Y) {
4747
+ for (var I = !1, G = !1, Q = !1, Y = 0; Y < a.data.length; ++Y) {
4748
4748
  var ne = a.data[Y];
4749
4749
  if (ne.type === ko)
4750
4750
  Q = !0;
4751
4751
  else if (ne.type === Fo)
4752
- N = !0;
4752
+ G = !0;
4753
4753
  else if (ne.type === Lo)
4754
4754
  I = !0;
4755
4755
  else if (ne.type === Po) {
4756
4756
  I = !0;
4757
4757
  var ie = ne.data;
4758
- ie >= 1 && (N = !0), ie >= 2 && (Q = !0);
4759
- } else ne.type === ni && (I = I || ne.data.thisDep, N = N || ne.data.contextDep, Q = Q || ne.data.propDep);
4758
+ ie >= 1 && (G = !0), ie >= 2 && (Q = !0);
4759
+ } else ne.type === ni && (I = I || ne.data.thisDep, G = G || ne.data.contextDep, Q = Q || ne.data.propDep);
4760
4760
  }
4761
4761
  return new yt(
4762
4762
  I,
4763
- N,
4763
+ G,
4764
4764
  Q,
4765
4765
  h
4766
4766
  );
@@ -4775,14 +4775,14 @@ function ov() {
4775
4775
  }
4776
4776
  var Cf = new yt(!1, !1, !1, function() {
4777
4777
  });
4778
- function yd(a, h, _, R, U, I, N, Q, Y, ne, ie, re, fe, K, te) {
4778
+ function yd(a, h, _, R, U, I, G, Q, Y, ne, ie, re, fe, K, te) {
4779
4779
  var P = ne.Record, O = {
4780
4780
  add: 32774,
4781
4781
  subtract: 32778,
4782
4782
  "reverse subtract": 32779
4783
4783
  };
4784
4784
  _.ext_blend_minmax && (O.min = dd, O.max = md);
4785
- var ee = _.angle_instanced_arrays, ge = _.webgl_draw_buffers, W = _.oes_vertex_array_object, pe = {
4785
+ var ee = _.angle_instanced_arrays, ge = _.webgl_draw_buffers, q = _.oes_vertex_array_object, pe = {
4786
4786
  dirty: !0,
4787
4787
  profile: te.profile
4788
4788
  }, de = {}, Pe = [], X = {}, $ = {};
@@ -4805,7 +4805,7 @@ function ov() {
4805
4805
  Io,
4806
4806
  "blendFuncSeparate",
4807
4807
  [_f, bf, _f, bf]
4808
- ), ue(nf, fd, !0), J(rf, "depthFunc", vd), J(of, "depthRange", [0, 1]), J(af, "depthMask", !0), J(Ro, Ro, [!0, !0, !0, !0]), ue(sf, id), J(ff, "cullFace", zn), J(Do, Do, qo), J(Mo, Mo, 1), ue(uf, cd), J(Oo, "polygonOffset", [0, 0]), ue(cf, ld), ue(lf, hd), J(Go, "sampleCoverage", [1, !1]), ue(hf, sd), J(df, "stencilMask", -1), J(No, "stencilFunc", [pd, 0, -1]), J(
4808
+ ), ue(nf, fd, !0), J(rf, "depthFunc", vd), J(of, "depthRange", [0, 1]), J(af, "depthMask", !0), J(Ro, Ro, [!0, !0, !0, !0]), ue(sf, id), J(ff, "cullFace", zn), J(Do, Do, Wo), J(Mo, Mo, 1), ue(uf, cd), J(Oo, "polygonOffset", [0, 0]), ue(cf, ld), ue(lf, hd), J(No, "sampleCoverage", [1, !1]), ue(hf, sd), J(df, "stencilMask", -1), J(Go, "stencilFunc", [pd, 0, -1]), J(
4809
4809
  Bo,
4810
4810
  "stencilOpSeparate",
4811
4811
  [Cr, vn, vn, vn]
@@ -5121,7 +5121,7 @@ function ov() {
5121
5121
  scissor_box: A(ri)
5122
5122
  };
5123
5123
  }
5124
- function Ge(m, l) {
5124
+ function Ne(m, l) {
5125
5125
  var w = m.static, C = typeof w[br] == "string" && typeof w[xr] == "string";
5126
5126
  if (C) {
5127
5127
  if (Object.keys(l.dynamic).length > 0)
@@ -5135,7 +5135,7 @@ function ov() {
5135
5135
  }
5136
5136
  return null;
5137
5137
  }
5138
- function We(m, l, w) {
5138
+ function qe(m, l, w) {
5139
5139
  var C = m.static, k = m.dynamic;
5140
5140
  function A(g) {
5141
5141
  if (g in C) {
@@ -5276,14 +5276,14 @@ function ov() {
5276
5276
  return yn(g) ? g.value ? dt(function(B, Te) {
5277
5277
  return Te.def(B.ELEMENTS, ".primType");
5278
5278
  }) : dt(function() {
5279
- return Wo;
5279
+ return qo;
5280
5280
  }) : new yt(
5281
5281
  g.thisDep,
5282
5282
  g.contextDep,
5283
5283
  g.propDep,
5284
5284
  function(B, Te) {
5285
5285
  var _e = B.ELEMENTS;
5286
- return Te.def(_e, "?", _e, ".primType:", Wo);
5286
+ return Te.def(_e, "?", _e, ".primType:", qo);
5287
5287
  }
5288
5288
  );
5289
5289
  if (A)
@@ -5292,7 +5292,7 @@ function ov() {
5292
5292
  E.contextDep,
5293
5293
  E.propDep,
5294
5294
  function(B, Te) {
5295
- return Te.def(B.shared.vao + ".currentVAO?" + B.shared.vao + ".currentVAO.primitive:" + Wo);
5295
+ return Te.def(B.shared.vao + ".currentVAO?" + B.shared.vao + ".currentVAO.primitive:" + qo);
5296
5296
  }
5297
5297
  );
5298
5298
  }
@@ -5688,7 +5688,7 @@ function ov() {
5688
5688
  }), x.def(g, "|0");
5689
5689
  }
5690
5690
  );
5691
- case No:
5691
+ case Go:
5692
5692
  return E(
5693
5693
  function(p) {
5694
5694
  d.commandType(p, "object", T, l.commandStr);
@@ -5857,7 +5857,7 @@ function ov() {
5857
5857
  g + '==="cw"||' + g + '==="ccw"',
5858
5858
  "invalid frontFace, must be one of cw,ccw"
5859
5859
  );
5860
- }), x.def(g + '==="cw"?' + xf + ":" + qo);
5860
+ }), x.def(g + '==="cw"?' + xf + ":" + Wo);
5861
5861
  }
5862
5862
  );
5863
5863
  case Ro:
@@ -5883,7 +5883,7 @@ function ov() {
5883
5883
  });
5884
5884
  }
5885
5885
  );
5886
- case Go:
5886
+ case No:
5887
5887
  return E(
5888
5888
  function(p) {
5889
5889
  d.command(typeof p == "object" && p, T, l.commandStr);
@@ -6217,7 +6217,7 @@ function ov() {
6217
6217
  }
6218
6218
  B(A), B(T);
6219
6219
  });
6220
- var E = Ge(m, l), p = ve(m), x = ze(m, p, k), g = st(m, k), L = ft(m, k), F = We(m, k, E);
6220
+ var E = Ne(m, l), p = ve(m), x = ze(m, p, k), g = st(m, k), L = ft(m, k), F = qe(m, k, E);
6221
6221
  function V(H) {
6222
6222
  var B = x[H];
6223
6223
  B && (L[H] = B);
@@ -6395,7 +6395,7 @@ function ov() {
6395
6395
  ".angle_instanced_arrays"
6396
6396
  ));
6397
6397
  }
6398
- function Ve(m, l, w, C, k) {
6398
+ function $e(m, l, w, C, k) {
6399
6399
  var A = m.shared, T = m.stats, E = A.current, p = A.timer, x = w.profile;
6400
6400
  function g() {
6401
6401
  return typeof performance > "u" ? "Date.now()" : "performance.now()";
@@ -6987,7 +6987,7 @@ function ov() {
6987
6987
  "=",
6988
6988
  m.shared.elements + ".getElements(" + k.vao,
6989
6989
  ".currentVAO.elements);",
6990
- W ? "" : "if(" + _e + ")" + A + ".bindBuffer(" + Uo + "," + _e + ".buffer.buffer);",
6990
+ q ? "" : "if(" + _e + ")" + A + ".bindBuffer(" + Uo + "," + _e + ".buffer.buffer);",
6991
6991
  "}"
6992
6992
  )), _e;
6993
6993
  }
@@ -7049,7 +7049,7 @@ function ov() {
7049
7049
  }
7050
7050
  ee && (typeof se != "number" || se >= 0) ? typeof se == "string" ? (w("if(", se, ">0){"), H(), w("}else if(", se, "<0){"), B(), w("}")) : H() : B();
7051
7051
  }
7052
- function qe(m, l, w, C, k) {
7052
+ function We(m, l, w, C, k) {
7053
7053
  var A = De(), T = A.proc("body", k);
7054
7054
  return d.optional(function() {
7055
7055
  A.commandStr = l.commandStr, A.command = A.link(l.commandStr);
@@ -7067,7 +7067,7 @@ function ov() {
7067
7067
  }
7068
7068
  function lt(m, l) {
7069
7069
  var w = m.proc("draw", 1);
7070
- ct(m, w), vt(m, w, l.context), gt(m, w, l.framebuffer), _t(m, w, l), Tt(m, w, l.state), Ve(m, w, l, !1, !0);
7070
+ ct(m, w), vt(m, w, l.context), gt(m, w, l.framebuffer), _t(m, w, l), Tt(m, w, l.state), $e(m, w, l, !1, !0);
7071
7071
  var C = l.shader.progVar.append(m, w);
7072
7072
  if (w(m.shared.gl, ".useProgram(", C, ".program);"), l.shader.program)
7073
7073
  Qe(m, w, l, l.shader.program);
@@ -7083,7 +7083,7 @@ function ov() {
7083
7083
  A,
7084
7084
  "]=",
7085
7085
  m.link(function(E) {
7086
- return qe(Qe, m, l, E, 1);
7086
+ return We(Qe, m, l, E, 1);
7087
7087
  }),
7088
7088
  "(",
7089
7089
  C,
@@ -7134,7 +7134,7 @@ function ov() {
7134
7134
  function F(Ee) {
7135
7135
  return !L(Ee);
7136
7136
  }
7137
- if (w.needsContext && vt(m, g, w.context), w.needsFramebuffer && gt(m, g, w.framebuffer), Tt(m, g, w.state, L), w.profile && L(w.profile) && Ve(m, g, w, !1, !0), C)
7137
+ if (w.needsContext && vt(m, g, w.context), w.needsFramebuffer && gt(m, g, w.framebuffer), Tt(m, g, w.state, L), w.profile && L(w.profile) && $e(m, g, w, !1, !0), C)
7138
7138
  w.useVAO ? w.drawVAO ? L(w.drawVAO) ? g(m.shared.vao, ".setVAO(", w.drawVAO.append(m, g), ");") : x(m.shared.vao, ".setVAO(", w.drawVAO.append(m, x), ");") : x(m.shared.vao, ".setVAO(", m.shared.vao, ".targetVAO);") : (x(m.shared.vao, ".setVAO(null);"), At(m, x, w, C.attributes, F), At(m, g, w, C.attributes, L)), Ke(m, x, w, C.uniforms, F, !1), Ke(m, g, w, C.uniforms, L, !0), Fe(m, x, g, w);
7139
7139
  else {
7140
7140
  var V = m.global.def("{}"), j = w.shader.progVar.append(m, g), se = g.def(j, ".id"), Re = g.def(V, "[", se, "]");
@@ -7153,7 +7153,7 @@ function ov() {
7153
7153
  se,
7154
7154
  "]=",
7155
7155
  m.link(function(Ee) {
7156
- return qe(
7156
+ return We(
7157
7157
  Kt,
7158
7158
  m,
7159
7159
  w,
@@ -7187,7 +7187,7 @@ function ov() {
7187
7187
  }
7188
7188
  _t(m, w, l), Tt(m, w, l.state, function(V) {
7189
7189
  return !E(V);
7190
- }), (!l.profile || !E(l.profile)) && Ve(m, w, l, !1, "a1"), l.contextDep = C, l.needsContext = k, l.needsFramebuffer = T;
7190
+ }), (!l.profile || !E(l.profile)) && $e(m, w, l, !1, "a1"), l.contextDep = C, l.needsContext = k, l.needsFramebuffer = T;
7191
7191
  var p = l.shader.progVar;
7192
7192
  if (p.contextDep && C || p.propDep)
7193
7193
  In(
@@ -7217,7 +7217,7 @@ function ov() {
7217
7217
  L,
7218
7218
  "]=",
7219
7219
  m.link(function(V) {
7220
- return qe(In, m, l, V, 2);
7220
+ return We(In, m, l, V, 2);
7221
7221
  }),
7222
7222
  "(",
7223
7223
  x,
@@ -7239,7 +7239,7 @@ function ov() {
7239
7239
  at(p) ? p.forEach(function(x, g) {
7240
7240
  w.set(m.next[T], "[" + g + "]", x);
7241
7241
  }) : w.set(C.next, "." + T, p);
7242
- }), Ve(m, w, l, !0, !0), [kn, ii, Ln, oi, Fn].forEach(
7242
+ }), $e(m, w, l, !0, !0), [kn, ii, Ln, oi, Fn].forEach(
7243
7243
  function(T) {
7244
7244
  var E = l.draw[T];
7245
7245
  E && w.set(C.draw, "." + T, "" + E.append(m, w));
@@ -7504,7 +7504,7 @@ function ov() {
7504
7504
  _.push(ee);
7505
7505
  }
7506
7506
  var I = [];
7507
- function N(ee) {
7507
+ function G(ee) {
7508
7508
  var ge = R();
7509
7509
  h.ext_disjoint_timer_query.beginQueryEXT(Pf, ge), I.push(ge), K(I.length - 1, I.length, ee);
7510
7510
  }
@@ -7522,15 +7522,15 @@ function ov() {
7522
7522
  ne.push(ee);
7523
7523
  }
7524
7524
  var fe = [];
7525
- function K(ee, ge, W) {
7525
+ function K(ee, ge, q) {
7526
7526
  var pe = ie();
7527
- pe.startQueryIndex = ee, pe.endQueryIndex = ge, pe.sum = 0, pe.stats = W, fe.push(pe);
7527
+ pe.startQueryIndex = ee, pe.endQueryIndex = ge, pe.sum = 0, pe.stats = q, fe.push(pe);
7528
7528
  }
7529
7529
  var te = [], P = [];
7530
7530
  function O() {
7531
- var ee, ge, W = I.length;
7532
- if (W !== 0) {
7533
- P.length = Math.max(P.length, W + 1), te.length = Math.max(te.length, W + 1), te[0] = 0, P[0] = 0;
7531
+ var ee, ge, q = I.length;
7532
+ if (q !== 0) {
7533
+ P.length = Math.max(P.length, q + 1), te.length = Math.max(te.length, q + 1), te[0] = 0, P[0] = 0;
7534
7534
  var pe = 0;
7535
7535
  for (ee = 0, ge = 0; ge < I.length; ++ge) {
7536
7536
  var de = I[ge];
@@ -7546,7 +7546,7 @@ function ov() {
7546
7546
  }
7547
7547
  }
7548
7548
  return {
7549
- beginQuery: N,
7549
+ beginQuery: G,
7550
7550
  endQuery: Q,
7551
7551
  pushScopeStats: K,
7552
7552
  update: O,
@@ -7577,7 +7577,7 @@ function ov() {
7577
7577
  var _ = h.gl, R = _.getContextAttributes(), U = _.isContextLost(), I = Pc(_, h);
7578
7578
  if (!I)
7579
7579
  return null;
7580
- var N = Sc(), Q = xd(), Y = I.extensions, ne = Sd(_, Y), ie = Na(), re = _.drawingBufferWidth, fe = _.drawingBufferHeight, K = {
7580
+ var G = Sc(), Q = xd(), Y = I.extensions, ne = Sd(_, Y), ie = Ga(), re = _.drawingBufferWidth, fe = _.drawingBufferHeight, K = {
7581
7581
  tick: 0,
7582
7582
  time: 0,
7583
7583
  viewportWidth: re,
@@ -7599,7 +7599,7 @@ function ov() {
7599
7599
  Q,
7600
7600
  h,
7601
7601
  pe
7602
- ), ge = Ul(_, Y, ee, Q), W = Uh(
7602
+ ), ge = Ul(_, Y, ee, Q), q = Uh(
7603
7603
  _,
7604
7604
  Y,
7605
7605
  O,
@@ -7609,9 +7609,9 @@ function ov() {
7609
7609
  P
7610
7610
  );
7611
7611
  function pe(Fe) {
7612
- return W.destroyBuffer(Fe);
7612
+ return q.destroyBuffer(Fe);
7613
7613
  }
7614
- var de = Wh(_, N, Q, h), Pe = bh(
7614
+ var de = qh(_, G, Q, h), Pe = bh(
7615
7615
  _,
7616
7616
  Y,
7617
7617
  O,
@@ -7630,7 +7630,7 @@ function ov() {
7630
7630
  Q
7631
7631
  ), be = yd(
7632
7632
  _,
7633
- N,
7633
+ G,
7634
7634
  Y,
7635
7635
  O,
7636
7636
  ee,
@@ -7638,7 +7638,7 @@ function ov() {
7638
7638
  Pe,
7639
7639
  $,
7640
7640
  te,
7641
- W,
7641
+ q,
7642
7642
  de,
7643
7643
  P,
7644
7644
  K,
@@ -7660,36 +7660,36 @@ function ov() {
7660
7660
  }
7661
7661
  ve = Ki.next(ze), Tt();
7662
7662
  for (var Fe = he.length - 1; Fe >= 0; --Fe) {
7663
- var qe = he[Fe];
7664
- qe && qe(K, null, 0);
7663
+ var We = he[Fe];
7664
+ We && We(K, null, 0);
7665
7665
  }
7666
7666
  _.flush(), ne && ne.update();
7667
7667
  }
7668
- function Ge() {
7668
+ function Ne() {
7669
7669
  !ve && he.length > 0 && (ve = Ki.next(ze));
7670
7670
  }
7671
- function We() {
7671
+ function qe() {
7672
7672
  ve && (Ki.cancel(ze), ve = null);
7673
7673
  }
7674
7674
  function st(Fe) {
7675
- Fe.preventDefault(), U = !0, We(), Oe.forEach(function(qe) {
7676
- qe();
7675
+ Fe.preventDefault(), U = !0, qe(), Oe.forEach(function(We) {
7676
+ We();
7677
7677
  });
7678
7678
  }
7679
7679
  function ft(Fe) {
7680
- _.getError(), U = !1, I.restore(), de.restore(), ee.restore(), Pe.restore(), X.restore(), $.restore(), W.restore(), ne && ne.restore(), be.procs.refresh(), Ge(), De.forEach(function(qe) {
7681
- qe();
7680
+ _.getError(), U = !1, I.restore(), de.restore(), ee.restore(), Pe.restore(), X.restore(), $.restore(), q.restore(), ne && ne.restore(), be.procs.refresh(), Ne(), De.forEach(function(We) {
7681
+ We();
7682
7682
  });
7683
7683
  }
7684
7684
  ce && (ce.addEventListener(kf, st, !1), ce.addEventListener(Ff, ft, !1));
7685
7685
  function Ze() {
7686
- he.length = 0, We(), ce && (ce.removeEventListener(kf, st), ce.removeEventListener(Ff, ft)), de.clear(), $.clear(), X.clear(), W.clear(), Pe.clear(), ge.clear(), ee.clear(), ne && ne.clear(), me.forEach(function(Fe) {
7686
+ he.length = 0, qe(), ce && (ce.removeEventListener(kf, st), ce.removeEventListener(Ff, ft)), de.clear(), $.clear(), X.clear(), q.clear(), Pe.clear(), ge.clear(), ee.clear(), ne && ne.clear(), me.forEach(function(Fe) {
7687
7687
  Fe();
7688
7688
  });
7689
7689
  }
7690
7690
  function pt(Fe) {
7691
7691
  d(!!Fe, "invalid args to regl({...})"), d.type(Fe, "object", "invalid args to regl({...})");
7692
- function qe(k) {
7692
+ function We(k) {
7693
7693
  var A = r({}, k);
7694
7694
  delete A.uniforms, delete A.attributes, delete A.context, delete A.vao, "stencil" in A && A.stencil.op && (A.stencil.opBack = A.stencil.opFront = A.stencil.op, delete A.stencil.op);
7695
7695
  function T(E) {
@@ -7722,7 +7722,7 @@ function ov() {
7722
7722
  static: T
7723
7723
  };
7724
7724
  }
7725
- var lt = Qe(Fe.context || {}, !0), Kt = Qe(Fe.uniforms || {}, !0), In = Qe(Fe.attributes || {}, !1), y = Qe(qe(Fe), !1), M = {
7725
+ var lt = Qe(Fe.context || {}, !0), Kt = Qe(Fe.uniforms || {}, !0), In = Qe(Fe.attributes || {}, !1), y = Qe(We(Fe), !1), M = {
7726
7726
  gpuTime: 0,
7727
7727
  cpuTime: 0,
7728
7728
  count: 0
@@ -7764,11 +7764,11 @@ function ov() {
7764
7764
  var ot = $.setFBO = pt({
7765
7765
  framebuffer: Rt.define.call(null, Lf, "framebuffer")
7766
7766
  });
7767
- function mt(Fe, qe) {
7767
+ function mt(Fe, We) {
7768
7768
  var Qe = 0;
7769
7769
  be.procs.poll();
7770
- var lt = qe.color;
7771
- lt && (_.clearColor(+lt[0] || 0, +lt[1] || 0, +lt[2] || 0, +lt[3] || 0), Qe |= wd), "depth" in qe && (_.clearDepth(+qe.depth), Qe |= Td), "stencil" in qe && (_.clearStencil(qe.stencil | 0), Qe |= Ad), d(!!Qe, "called regl.clear with no buffer specified"), _.clear(Qe);
7770
+ var lt = We.color;
7771
+ lt && (_.clearColor(+lt[0] || 0, +lt[1] || 0, +lt[2] || 0, +lt[3] || 0), Qe |= wd), "depth" in We && (_.clearDepth(+We.depth), Qe |= Td), "stencil" in We && (_.clearStencil(We.stencil | 0), Qe |= Ad), d(!!Qe, "called regl.clear with no buffer specified"), _.clear(Qe);
7772
7772
  }
7773
7773
  function vt(Fe) {
7774
7774
  if (d(
@@ -7776,9 +7776,9 @@ function ov() {
7776
7776
  "regl.clear() takes an object as input"
7777
7777
  ), "framebuffer" in Fe)
7778
7778
  if (Fe.framebuffer && Fe.framebuffer_reglType === "framebufferCube")
7779
- for (var qe = 0; qe < 6; ++qe)
7779
+ for (var We = 0; We < 6; ++We)
7780
7780
  ot(r({
7781
- framebuffer: Fe.framebuffer.faces[qe]
7781
+ framebuffer: Fe.framebuffer.faces[We]
7782
7782
  }, Fe), mt);
7783
7783
  else
7784
7784
  ot(Fe, mt);
@@ -7787,39 +7787,39 @@ function ov() {
7787
7787
  }
7788
7788
  function gt(Fe) {
7789
7789
  d.type(Fe, "function", "regl.frame() callback must be a function"), he.push(Fe);
7790
- function qe() {
7790
+ function We() {
7791
7791
  var Qe = zf(he, Fe);
7792
7792
  d(Qe >= 0, "cannot cancel a frame twice");
7793
7793
  function lt() {
7794
7794
  var Kt = zf(he, lt);
7795
- he[Kt] = he[he.length - 1], he.length -= 1, he.length <= 0 && We();
7795
+ he[Kt] = he[he.length - 1], he.length -= 1, he.length <= 0 && qe();
7796
7796
  }
7797
7797
  he[Qe] = lt;
7798
7798
  }
7799
- return Ge(), {
7800
- cancel: qe
7799
+ return Ne(), {
7800
+ cancel: We
7801
7801
  };
7802
7802
  }
7803
7803
  function _t() {
7804
- var Fe = J.viewport, qe = J.scissor_box;
7805
- Fe[0] = Fe[1] = qe[0] = qe[1] = 0, K.viewportWidth = K.framebufferWidth = K.drawingBufferWidth = Fe[2] = qe[2] = _.drawingBufferWidth, K.viewportHeight = K.framebufferHeight = K.drawingBufferHeight = Fe[3] = qe[3] = _.drawingBufferHeight;
7804
+ var Fe = J.viewport, We = J.scissor_box;
7805
+ Fe[0] = Fe[1] = We[0] = We[1] = 0, K.viewportWidth = K.framebufferWidth = K.drawingBufferWidth = Fe[2] = We[2] = _.drawingBufferWidth, K.viewportHeight = K.framebufferHeight = K.drawingBufferHeight = Fe[3] = We[3] = _.drawingBufferHeight;
7806
7806
  }
7807
7807
  function Tt() {
7808
- K.tick += 1, K.time = Ve(), _t(), be.procs.poll();
7808
+ K.tick += 1, K.time = $e(), _t(), be.procs.poll();
7809
7809
  }
7810
7810
  function ct() {
7811
7811
  Pe.refresh(), _t(), be.procs.refresh(), ne && ne.update();
7812
7812
  }
7813
- function Ve() {
7814
- return (Na() - ie) / 1e3;
7813
+ function $e() {
7814
+ return (Ga() - ie) / 1e3;
7815
7815
  }
7816
7816
  ct();
7817
- function At(Fe, qe) {
7818
- d.type(qe, "function", "listener callback must be a function");
7817
+ function At(Fe, We) {
7818
+ d.type(We, "function", "listener callback must be a function");
7819
7819
  var Qe;
7820
7820
  switch (Fe) {
7821
7821
  case "frame":
7822
- return gt(qe);
7822
+ return gt(We);
7823
7823
  case "lost":
7824
7824
  Qe = Oe;
7825
7825
  break;
@@ -7832,10 +7832,10 @@ function ov() {
7832
7832
  default:
7833
7833
  d.raise("invalid event, must be one of frame,lost,restore,destroy");
7834
7834
  }
7835
- return Qe.push(qe), {
7835
+ return Qe.push(We), {
7836
7836
  cancel: function() {
7837
7837
  for (var lt = 0; lt < Qe.length; ++lt)
7838
- if (Qe[lt] === qe) {
7838
+ if (Qe[lt] === We) {
7839
7839
  Qe[lt] = Qe[Qe.length - 1], Qe.pop();
7840
7840
  return;
7841
7841
  }
@@ -7863,7 +7863,7 @@ function ov() {
7863
7863
  renderbuffer: X.create,
7864
7864
  framebuffer: $.create,
7865
7865
  framebufferCube: $.createCube,
7866
- vao: W.createVAO,
7866
+ vao: q.createVAO,
7867
7867
  // Expose context attributes
7868
7868
  attributes: R,
7869
7869
  // Frame rendering
@@ -7885,7 +7885,7 @@ function ov() {
7885
7885
  Tt(), ne && ne.update();
7886
7886
  },
7887
7887
  // Current time
7888
- now: Ve,
7888
+ now: $e,
7889
7889
  // regl Statistics Information
7890
7890
  stats: Q
7891
7891
  });
@@ -7896,7 +7896,7 @@ function ov() {
7896
7896
  }(Pi)), Pi.exports;
7897
7897
  }
7898
7898
  var av = ov();
7899
- const sv = /* @__PURE__ */ Ca(av), fv = "#b3b3b3", uv = void 0, cv = void 0, lv = 4, hv = "#666666", dv = 0.1, mv = 1, pv = "#222222", Ue = {
7899
+ const sv = /* @__PURE__ */ Ca(av), fv = "#b3b3b3", uv = void 0, cv = void 0, lv = 4, hv = "#666666", dv = 0.1, mv = 1, pv = "#222222", Ve = {
7900
7900
  enableSimulation: !0,
7901
7901
  spaceSize: 8192,
7902
7902
  pointSizeScale: 1,
@@ -7932,7 +7932,8 @@ const sv = /* @__PURE__ */ Ca(av), fv = "#b3b3b3", uv = void 0, cv = void 0, lv
7932
7932
  },
7933
7933
  showFPSMonitor: !1,
7934
7934
  pixelRatio: 2,
7935
- scalePointsOnZoom: !0,
7935
+ scalePointsOnZoom: !1,
7936
+ scaleLinksOnZoom: !1,
7936
7937
  enableZoom: !0,
7937
7938
  enableSimulationDuringZoom: !1,
7938
7939
  enableDrag: !1,
@@ -7942,11 +7943,12 @@ const sv = /* @__PURE__ */ Ca(av), fv = "#b3b3b3", uv = void 0, cv = void 0, lv
7942
7943
  fitViewDuration: 250,
7943
7944
  pointSamplingDistance: 150,
7944
7945
  attribution: "",
7945
- rescalePositions: void 0
7946
- }, vv = 0.7, gv = 0.95, yv = 3, xv = (t) => typeof t == "function", qu = (t) => Array.isArray(t), bv = (t) => t instanceof Object, _v = (t) => t instanceof Object ? t.constructor.name !== "Function" && t.constructor.name !== "Object" : !1, Kf = (t) => bv(t) && !qu(t) && !xv(t) && !_v(t);
7947
- function Nn(t) {
7946
+ rescalePositions: void 0,
7947
+ enableRightClickRepulsion: !1
7948
+ }, vv = 0.7, gv = 0.95, yv = 3, xv = (t) => typeof t == "function", Wu = (t) => Array.isArray(t), bv = (t) => t instanceof Object, _v = (t) => t instanceof Object ? t.constructor.name !== "Function" && t.constructor.name !== "Object" : !1, Kf = (t) => bv(t) && !Wu(t) && !xv(t) && !_v(t);
7949
+ function Gn(t) {
7948
7950
  let e;
7949
- if (qu(t))
7951
+ if (Wu(t))
7950
7952
  e = t;
7951
7953
  else {
7952
7954
  const n = _n(t), r = n == null ? void 0 : n.rgb();
@@ -7976,7 +7978,7 @@ function en(t) {
7976
7978
  }
7977
7979
  class Tv {
7978
7980
  constructor() {
7979
- this.enableSimulation = Ue.enableSimulation, this.backgroundColor = pv, this.spaceSize = Ue.spaceSize, this.pointColor = fv, this.pointGreyoutOpacity = uv, this.pointGreyoutColor = cv, this.pointSize = lv, this.pointSizeScale = Ue.pointSizeScale, this.hoveredPointCursor = Ue.hoveredPointCursor, this.renderHoveredPointRing = Ue.renderHoveredPointRing, this.hoveredPointRingColor = Ue.hoveredPointRingColor, this.focusedPointRingColor = Ue.focusedPointRingColor, this.focusedPointIndex = Ue.focusedPointIndex, this.linkColor = hv, this.linkGreyoutOpacity = dv, this.linkWidth = mv, this.linkWidthScale = Ue.linkWidthScale, this.renderLinks = Ue.renderLinks, this.curvedLinks = Ue.curvedLinks, this.curvedLinkSegments = Ue.curvedLinkSegments, this.curvedLinkWeight = Ue.curvedLinkWeight, this.curvedLinkControlPointDistance = Ue.curvedLinkControlPointDistance, this.linkArrows = Ue.arrowLinks, this.linkArrowsSizeScale = Ue.arrowSizeScale, this.linkVisibilityDistanceRange = Ue.linkVisibilityDistanceRange, this.linkVisibilityMinTransparency = Ue.linkVisibilityMinTransparency, this.useClassicQuadtree = Ue.useClassicQuadtree, this.simulationDecay = Ue.simulation.decay, this.simulationGravity = Ue.simulation.gravity, this.simulationCenter = Ue.simulation.center, this.simulationRepulsion = Ue.simulation.repulsion, this.simulationRepulsionTheta = Ue.simulation.repulsionTheta, this.simulationRepulsionQuadtreeLevels = Ue.simulation.repulsionQuadtreeLevels, this.simulationLinkSpring = Ue.simulation.linkSpring, this.simulationLinkDistance = Ue.simulation.linkDistance, this.simulationLinkDistRandomVariationRange = Ue.simulation.linkDistRandomVariationRange, this.simulationRepulsionFromMouse = Ue.simulation.repulsionFromMouse, this.simulationFriction = Ue.simulation.friction, this.simulationCluster = Ue.simulation.cluster, this.onSimulationStart = void 0, this.onSimulationTick = void 0, this.onSimulationEnd = void 0, this.onSimulationPause = void 0, this.onSimulationRestart = void 0, this.onClick = void 0, this.onMouseMove = void 0, this.onPointMouseOver = void 0, this.onPointMouseOut = void 0, this.onZoomStart = void 0, this.onZoom = void 0, this.onZoomEnd = void 0, this.onDragStart = void 0, this.onDrag = void 0, this.onDragEnd = void 0, this.showFPSMonitor = Ue.showFPSMonitor, this.pixelRatio = Ue.pixelRatio, this.scalePointsOnZoom = Ue.scalePointsOnZoom, this.initialZoomLevel = void 0, this.enableZoom = Ue.enableZoom, this.enableSimulationDuringZoom = Ue.enableSimulationDuringZoom, this.enableDrag = Ue.enableDrag, this.fitViewOnInit = Ue.fitViewOnInit, this.fitViewDelay = Ue.fitViewDelay, this.fitViewPadding = Ue.fitViewPadding, this.fitViewDuration = Ue.fitViewDuration, this.fitViewByPointsInRect = void 0, this.randomSeed = void 0, this.pointSamplingDistance = Ue.pointSamplingDistance, this.attribution = Ue.attribution, this.rescalePositions = Ue.rescalePositions;
7981
+ this.enableSimulation = Ve.enableSimulation, this.backgroundColor = pv, this.spaceSize = Ve.spaceSize, this.pointColor = fv, this.pointGreyoutOpacity = uv, this.pointGreyoutColor = cv, this.pointSize = lv, this.pointSizeScale = Ve.pointSizeScale, this.hoveredPointCursor = Ve.hoveredPointCursor, this.renderHoveredPointRing = Ve.renderHoveredPointRing, this.hoveredPointRingColor = Ve.hoveredPointRingColor, this.focusedPointRingColor = Ve.focusedPointRingColor, this.focusedPointIndex = Ve.focusedPointIndex, this.linkColor = hv, this.linkGreyoutOpacity = dv, this.linkWidth = mv, this.linkWidthScale = Ve.linkWidthScale, this.renderLinks = Ve.renderLinks, this.curvedLinks = Ve.curvedLinks, this.curvedLinkSegments = Ve.curvedLinkSegments, this.curvedLinkWeight = Ve.curvedLinkWeight, this.curvedLinkControlPointDistance = Ve.curvedLinkControlPointDistance, this.linkArrows = Ve.arrowLinks, this.linkArrowsSizeScale = Ve.arrowSizeScale, this.scaleLinksOnZoom = Ve.scaleLinksOnZoom, this.linkVisibilityDistanceRange = Ve.linkVisibilityDistanceRange, this.linkVisibilityMinTransparency = Ve.linkVisibilityMinTransparency, this.useClassicQuadtree = Ve.useClassicQuadtree, this.simulationDecay = Ve.simulation.decay, this.simulationGravity = Ve.simulation.gravity, this.simulationCenter = Ve.simulation.center, this.simulationRepulsion = Ve.simulation.repulsion, this.simulationRepulsionTheta = Ve.simulation.repulsionTheta, this.simulationRepulsionQuadtreeLevels = Ve.simulation.repulsionQuadtreeLevels, this.simulationLinkSpring = Ve.simulation.linkSpring, this.simulationLinkDistance = Ve.simulation.linkDistance, this.simulationLinkDistRandomVariationRange = Ve.simulation.linkDistRandomVariationRange, this.simulationRepulsionFromMouse = Ve.simulation.repulsionFromMouse, this.enableRightClickRepulsion = Ve.enableRightClickRepulsion, this.simulationFriction = Ve.simulation.friction, this.simulationCluster = Ve.simulation.cluster, this.onSimulationStart = void 0, this.onSimulationTick = void 0, this.onSimulationEnd = void 0, this.onSimulationPause = void 0, this.onSimulationRestart = void 0, this.onClick = void 0, this.onMouseMove = void 0, this.onPointMouseOver = void 0, this.onPointMouseOut = void 0, this.onZoomStart = void 0, this.onZoom = void 0, this.onZoomEnd = void 0, this.onDragStart = void 0, this.onDrag = void 0, this.onDragEnd = void 0, this.showFPSMonitor = Ve.showFPSMonitor, this.pixelRatio = Ve.pixelRatio, this.scalePointsOnZoom = Ve.scalePointsOnZoom, this.initialZoomLevel = void 0, this.enableZoom = Ve.enableZoom, this.enableSimulationDuringZoom = Ve.enableSimulationDuringZoom, this.enableDrag = Ve.enableDrag, this.fitViewOnInit = Ve.fitViewOnInit, this.fitViewDelay = Ve.fitViewDelay, this.fitViewPadding = Ve.fitViewPadding, this.fitViewDuration = Ve.fitViewDuration, this.fitViewByPointsInRect = void 0, this.randomSeed = void 0, this.pointSamplingDistance = Ve.pointSamplingDistance, this.attribution = Ve.attribution, this.rescalePositions = Ve.rescalePositions;
7980
7982
  }
7981
7983
  init(e) {
7982
7984
  Object.keys(e).forEach((n) => {
@@ -8289,10 +8291,10 @@ class Jf extends hn {
8289
8291
  let c = 0;
8290
8292
  u == null || u.forEach((v, b) => {
8291
8293
  v && (this.linkFirstIndicesAndAmount[b * 4 + 0] = c % i, this.linkFirstIndicesAndAmount[b * 4 + 1] = Math.floor(c / i), this.linkFirstIndicesAndAmount[b * 4 + 2] = v.length ?? 0, v.forEach(([S, D]) => {
8292
- var q, le, Le;
8294
+ var W, le, Le;
8293
8295
  this.indices[c * 4 + 0] = S % r, this.indices[c * 4 + 1] = Math.floor(S / r);
8294
- const Z = ((q = o.degree) == null ? void 0 : q[S]) ?? 0, we = ((le = o.degree) == null ? void 0 : le[b]) ?? 0, Se = Z + we, ae = Se !== 0 ? Z / Se : 0.5, Ne = Math.min(Z, we);
8295
- let Xe = ((Le = o.linkStrength) == null ? void 0 : Le[D]) ?? 1 / Math.max(Ne, 1);
8296
+ const Z = ((W = o.degree) == null ? void 0 : W[S]) ?? 0, we = ((le = o.degree) == null ? void 0 : le[b]) ?? 0, Se = Z + we, ae = Se !== 0 ? Z / Se : 0.5, Ge = Math.min(Z, we);
8297
+ let Xe = ((Le = o.linkStrength) == null ? void 0 : Le[D]) ?? 1 / Math.max(Ge, 1);
8296
8298
  Xe = Math.sqrt(Xe), f[c * 4 + 0] = ae, f[c * 4 + 1] = Xe, s[c * 4] = this.store.getRandomFloat(0, 1), c += 1;
8297
8299
  }), this.maxPointDegree = Math.max(this.maxPointDegree, v.length ?? 0));
8298
8300
  }), this.linkFirstIndicesAndAmountTexture || (this.linkFirstIndicesAndAmountTexture = n.texture()), this.linkFirstIndicesAndAmountTexture({
@@ -8943,7 +8945,7 @@ void main() {
8943
8945
 
8944
8946
  gl_FragColor = velocity;
8945
8947
  }`;
8946
- class Gv extends hn {
8948
+ class Nv extends hn {
8947
8949
  initPrograms() {
8948
8950
  const { reglInstance: e, config: n, store: r, points: i } = this;
8949
8951
  this.runCommand || (this.runCommand = e({
@@ -8965,7 +8967,7 @@ class Gv extends hn {
8965
8967
  (e = this.runCommand) == null || e.call(this);
8966
8968
  }
8967
8969
  }
8968
- var Nv = `#ifdef GL_ES
8970
+ var Gv = `#ifdef GL_ES
8969
8971
  precision highp float;
8970
8972
  #endif
8971
8973
 
@@ -9094,7 +9096,7 @@ class $v extends hn {
9094
9096
  count: 4,
9095
9097
  attributes: { vertexCoord: xt(e) }
9096
9098
  })), this.calculateCentermassCommand || (this.calculateCentermassCommand = e({
9097
- frag: Nv,
9099
+ frag: Gv,
9098
9100
  vert: Bv,
9099
9101
  framebuffer: () => this.centermassFbo,
9100
9102
  primitive: "points",
@@ -9255,8 +9257,8 @@ function Xv() {
9255
9257
  const S = async (Z, we) => Promise.resolve(setTimeout(() => {
9256
9258
  f.getError();
9257
9259
  const Se = this.now() - Z;
9258
- we.forEach((ae, Ne) => {
9259
- ae && (this.gpuAccums[Ne] += Se);
9260
+ we.forEach((ae, Ge) => {
9261
+ ae && (this.gpuAccums[Ge] += Se);
9260
9262
  });
9261
9263
  }, 0)), D = (Z, we, Se) => function() {
9262
9264
  const ae = we.now();
@@ -9285,18 +9287,18 @@ function Xv() {
9285
9287
  this.trackGPU = !this.trackGPU, this.updateUI();
9286
9288
  }), this.paramLogger = ((D, Z, we) => {
9287
9289
  const Se = ["gl-cpu", "gl-gpu", "gl-mem", "gl-fps", "gl-gpu-svg", "gl-chart"], ae = Object.assign({}, Se);
9288
- return Se.forEach((Ne) => ae[Ne] = Z.getElementsByClassName(Ne)), this.nodes = ae, (Ne, Xe, q, le, Le, Me, je) => {
9289
- ae["gl-cpu"][Ne].style.strokeDasharray = (Xe * 0.27).toFixed(0) + " 100", ae["gl-gpu"][Ne].style.strokeDasharray = (q * 0.27).toFixed(0) + " 100", ae["gl-mem"][Ne].innerHTML = we[Ne] ? we[Ne] : le ? "mem: " + le.toFixed(0) + "mb" : "", ae["gl-fps"][Ne].innerHTML = Le.toFixed(0) + " FPS", D(we[Ne], Xe, q, le, Le, Me, je);
9290
+ return Se.forEach((Ge) => ae[Ge] = Z.getElementsByClassName(Ge)), this.nodes = ae, (Ge, Xe, W, le, Le, Me, je) => {
9291
+ ae["gl-cpu"][Ge].style.strokeDasharray = (Xe * 0.27).toFixed(0) + " 100", ae["gl-gpu"][Ge].style.strokeDasharray = (W * 0.27).toFixed(0) + " 100", ae["gl-mem"][Ge].innerHTML = we[Ge] ? we[Ge] : le ? "mem: " + le.toFixed(0) + "mb" : "", ae["gl-fps"][Ge].innerHTML = Le.toFixed(0) + " FPS", D(we[Ge], Xe, W, le, Le, Me, je);
9290
9292
  };
9291
9293
  })(this.paramLogger, this.dom, this.names), this.chartLogger = ((D, Z) => {
9292
9294
  let we = { "gl-chart": Z.getElementsByClassName("gl-chart") };
9293
- return (Se, ae, Ne) => {
9294
- let Xe = "", q = ae.length;
9295
- for (let le = 0; le < q; le++) {
9296
- let Le = (Ne + le + 1) % q;
9297
- ae[Le] != null && (Xe = Xe + " " + (55 * le / (q - 1)).toFixed(1) + "," + (45 - ae[Le] * 22 / 60 / this.detected).toFixed(1));
9295
+ return (Se, ae, Ge) => {
9296
+ let Xe = "", W = ae.length;
9297
+ for (let le = 0; le < W; le++) {
9298
+ let Le = (Ge + le + 1) % W;
9299
+ ae[Le] != null && (Xe = Xe + " " + (55 * le / (W - 1)).toFixed(1) + "," + (45 - ae[Le] * 22 / 60 / this.detected).toFixed(1));
9298
9300
  }
9299
- we["gl-chart"][Se].setAttribute("points", Xe), D(this.names[Se], ae, Ne);
9301
+ we["gl-chart"][Se].setAttribute("points", Xe), D(this.names[Se], ae, Ge);
9300
9302
  };
9301
9303
  })(this.chartLogger, this.dom);
9302
9304
  }
@@ -9371,7 +9373,7 @@ function Xv() {
9371
9373
  }(ki)), ki.exports;
9372
9374
  }
9373
9375
  var jv = Xv();
9374
- const Hv = /* @__PURE__ */ Ca(jv), Wv = `
9376
+ const Hv = /* @__PURE__ */ Ca(jv), qv = `
9375
9377
  #gl-bench {
9376
9378
  position:absolute;
9377
9379
  right:0;
@@ -9428,7 +9430,7 @@ class tu {
9428
9430
  constructor(e) {
9429
9431
  this.destroy();
9430
9432
  const n = e.getContext("webgl") || e.getContext("experimental-webgl");
9431
- this.bench = new Hv(n, { css: Wv });
9433
+ this.bench = new Hv(n, { css: qv });
9432
9434
  }
9433
9435
  begin() {
9434
9436
  var e;
@@ -9442,7 +9444,7 @@ class tu {
9442
9444
  this.bench = void 0, Ct("#gl-bench").remove();
9443
9445
  }
9444
9446
  }
9445
- class qv {
9447
+ class Wv {
9446
9448
  constructor(e) {
9447
9449
  this._config = e;
9448
9450
  }
@@ -9463,7 +9465,7 @@ class qv {
9463
9465
  this.pointColors = void 0;
9464
9466
  return;
9465
9467
  }
9466
- const e = Nn(this._config.pointColor);
9468
+ const e = Gn(this._config.pointColor);
9467
9469
  if (this.inputPointColors === void 0 || this.inputPointColors.length / 4 !== this.pointsNumber) {
9468
9470
  this.pointColors = new Float32Array(this.pointsNumber * 4);
9469
9471
  for (let n = 0; n < this.pointColors.length / 4; n++)
@@ -9501,7 +9503,7 @@ class qv {
9501
9503
  this.linkColors = void 0;
9502
9504
  return;
9503
9505
  }
9504
- const e = Nn(this._config.linkColor);
9506
+ const e = Gn(this._config.linkColor);
9505
9507
  if (this.inputLinkColors === void 0 || this.inputLinkColors.length / 4 !== this.linksNumber) {
9506
9508
  this.linkColors = new Float32Array(this.linksNumber * 4);
9507
9509
  for (let n = 0; n < this.linkColors.length / 4; n++)
@@ -9583,9 +9585,8 @@ var Yv = `precision highp float;
9583
9585
  varying vec4 rgbaColor;
9584
9586
  varying vec2 pos;
9585
9587
  varying float arrowLength;
9586
- varying float linkWidthArrowWidthRatio;
9587
- varying float smoothWidthRatio;
9588
9588
  varying float useArrow;
9589
+ varying float smoothing;
9589
9590
 
9590
9591
  float map(float value, float min1, float max1, float min2, float max2) {
9591
9592
  return min2 + (value - min1) * (max2 - min2) / (max1 - min1);
@@ -9594,29 +9595,31 @@ float map(float value, float min1, float max1, float min2, float max2) {
9594
9595
  void main() {
9595
9596
  float opacity = 1.0;
9596
9597
  vec3 color = rgbaColor.rgb;
9597
- float smoothDelta = smoothWidthRatio / 2.0;
9598
+
9598
9599
  if (useArrow > 0.5) {
9599
9600
  float end_arrow = 0.5 + arrowLength / 2.0;
9600
9601
  float start_arrow = end_arrow - arrowLength;
9601
- float arrowWidthDelta = linkWidthArrowWidthRatio / 2.0;
9602
- float linkOpacity = rgbaColor.a * smoothstep(0.5 - arrowWidthDelta, 0.5 - arrowWidthDelta - smoothDelta, abs(pos.y));
9602
+ float arrowWidthDelta = 0.25;
9603
+ float linkOpacity = rgbaColor.a * smoothstep(0.5 - arrowWidthDelta, 0.5 - arrowWidthDelta - smoothing / 2.0, abs(pos.y));
9603
9604
  float arrowOpacity = 1.0;
9604
9605
  if (pos.x > start_arrow && pos.x < start_arrow + arrowLength) {
9605
9606
  float xmapped = map(pos.x, start_arrow, end_arrow, 0.0, 1.0);
9606
- arrowOpacity = rgbaColor.a * smoothstep(xmapped - smoothDelta, xmapped, map(abs(pos.y), 0.5, 0.0, 0.0, 1.0));
9607
+ arrowOpacity = rgbaColor.a * smoothstep(xmapped - smoothing, xmapped, map(abs(pos.y), 0.5, 0.0, 0.0, 1.0));
9607
9608
  if (linkOpacity != arrowOpacity) {
9608
- linkOpacity += arrowOpacity;
9609
+ linkOpacity = max(linkOpacity, arrowOpacity);
9609
9610
  }
9610
9611
  }
9611
9612
  opacity = linkOpacity;
9612
- } else opacity = rgbaColor.a * smoothstep(0.5, 0.5 - smoothDelta, abs(pos.y));
9613
+ } else opacity = rgbaColor.a * smoothstep(0.5, 0.5 - smoothing, abs(pos.y));
9613
9614
 
9614
9615
  gl_FragColor = vec4(color, opacity);
9615
9616
  }`, Zv = `precision highp float;
9617
+
9616
9618
  attribute vec2 position, pointA, pointB;
9617
9619
  attribute vec4 color;
9618
9620
  attribute float width;
9619
9621
  attribute float arrow;
9622
+
9620
9623
  uniform sampler2D positionsTexture;
9621
9624
  uniform sampler2D pointGreyoutStatus;
9622
9625
  uniform mat3 transformationMatrix;
@@ -9625,20 +9628,20 @@ uniform float widthScale;
9625
9628
  uniform float arrowSizeScale;
9626
9629
  uniform float spaceSize;
9627
9630
  uniform vec2 screenSize;
9628
- uniform float ratio;
9629
9631
  uniform vec2 linkVisibilityDistanceRange;
9630
9632
  uniform float linkVisibilityMinTransparency;
9631
9633
  uniform float greyoutOpacity;
9632
9634
  uniform float curvedWeight;
9633
9635
  uniform float curvedLinkControlPointDistance;
9634
9636
  uniform float curvedLinkSegments;
9637
+ uniform bool scaleLinksOnZoom;
9638
+ uniform float maxPointSize;
9635
9639
 
9636
9640
  varying vec4 rgbaColor;
9637
9641
  varying vec2 pos;
9638
9642
  varying float arrowLength;
9639
- varying float linkWidthArrowWidthRatio;
9640
- varying float smoothWidthRatio;
9641
9643
  varying float useArrow;
9644
+ varying float smoothing;
9642
9645
 
9643
9646
  float map(float value, float min1, float max1, float min2, float max2) {
9644
9647
  return min2 + (value - min1) * (max2 - min2) / (max1 - min1);
@@ -9650,6 +9653,33 @@ vec2 conicParametricCurve(vec2 A, vec2 B, vec2 ControlPoint, float t, float w) {
9650
9653
  return divident / divisor;
9651
9654
  }
9652
9655
 
9656
+ float calculateLinkWidth(float width) {
9657
+ float linkWidth;
9658
+ if (scaleLinksOnZoom) {
9659
+
9660
+ linkWidth = width;
9661
+ } else {
9662
+
9663
+ linkWidth = width / transformationMatrix[0][0];
9664
+
9665
+ linkWidth *= min(5.0, max(1.0, transformationMatrix[0][0] * 0.01));
9666
+ }
9667
+
9668
+ if (useArrow > 0.5) {
9669
+ return min(linkWidth, (maxPointSize * 2.0) / transformationMatrix[0][0]);
9670
+ } else {
9671
+ return min(linkWidth, maxPointSize / transformationMatrix[0][0]);
9672
+ }
9673
+ }
9674
+
9675
+ float calculateArrowWidth(float arrowWidth) {
9676
+ if (scaleLinksOnZoom) {
9677
+ return arrowWidth;
9678
+ } else {
9679
+ return arrowWidth / transformationMatrix[0][0];
9680
+ }
9681
+ }
9682
+
9653
9683
  void main() {
9654
9684
  pos = position;
9655
9685
 
@@ -9663,6 +9693,8 @@ void main() {
9663
9693
  vec4 pointPositionB = texture2D(positionsTexture, pointTexturePosB);
9664
9694
  vec2 a = pointPositionA.xy;
9665
9695
  vec2 b = pointPositionB.xy;
9696
+
9697
+
9666
9698
  vec2 xBasis = b - a;
9667
9699
  vec2 yBasis = normalize(vec2(-xBasis.y, xBasis.x));
9668
9700
 
@@ -9671,51 +9703,70 @@ void main() {
9671
9703
  float h = curvedLinkControlPointDistance;
9672
9704
  vec2 controlPoint = (a + b) / 2.0 + yBasis * linkDist * h;
9673
9705
 
9706
+
9674
9707
  float linkDistPx = linkDist * transformationMatrix[0][0];
9675
9708
 
9709
+
9676
9710
  float linkWidth = width * widthScale;
9677
9711
  float k = 2.0;
9712
+
9678
9713
  float arrowWidth = max(5.0, linkWidth * k);
9679
9714
  arrowWidth *= arrowSizeScale;
9680
9715
 
9681
- float arrowWidthPx = arrowWidth / transformationMatrix[0][0];
9716
+
9717
+ float arrowWidthPx = calculateArrowWidth(arrowWidth);
9718
+
9719
+
9720
+
9721
+
9682
9722
  arrowLength = min(0.3, (0.866 * arrowWidthPx * 2.0) / linkDist);
9683
9723
 
9684
- float smoothWidth = 2.0;
9685
- float arrowExtraWidth = arrowWidth - linkWidth;
9686
- linkWidth += smoothWidth / 2.0;
9687
9724
  useArrow = arrow;
9688
9725
  if (useArrow > 0.5) {
9689
- linkWidth += arrowExtraWidth;
9726
+ linkWidth *= 2.0;
9690
9727
  }
9691
- smoothWidthRatio = smoothWidth / linkWidth;
9692
- linkWidthArrowWidthRatio = arrowExtraWidth / linkWidth;
9693
9728
 
9694
- float linkWidthPx = linkWidth / transformationMatrix[0][0];
9729
+
9730
+ float linkWidthPx = calculateLinkWidth(linkWidth);
9731
+ float smoothingPx = 0.5 / transformationMatrix[0][0];
9732
+ smoothing = smoothingPx / linkWidthPx;
9733
+ linkWidthPx += smoothingPx;
9695
9734
 
9696
9735
 
9697
9736
  vec3 rgbColor = color.rgb;
9737
+
9698
9738
  float opacity = color.a * max(linkVisibilityMinTransparency, map(linkDistPx, linkVisibilityDistanceRange.g, linkVisibilityDistanceRange.r, 0.0, 1.0));
9699
9739
 
9740
+
9700
9741
  if (greyoutStatusA.r > 0.0 || greyoutStatusB.r > 0.0) {
9701
9742
  opacity *= greyoutOpacity;
9702
9743
  }
9703
9744
 
9745
+
9704
9746
  rgbaColor = vec4(rgbColor, opacity);
9705
9747
 
9748
+
9706
9749
  float t = position.x;
9707
9750
  float w = curvedWeight;
9751
+
9708
9752
  float tPrev = t - 1.0 / curvedLinkSegments;
9709
9753
  float tNext = t + 1.0 / curvedLinkSegments;
9754
+
9710
9755
  vec2 pointCurr = conicParametricCurve(a, b, controlPoint, t, w);
9756
+
9711
9757
  vec2 pointPrev = conicParametricCurve(a, b, controlPoint, max(0.0, tPrev), w);
9712
9758
  vec2 pointNext = conicParametricCurve(a, b, controlPoint, min(tNext, 1.0), w);
9759
+
9713
9760
  vec2 xBasisCurved = pointNext - pointPrev;
9714
9761
  vec2 yBasisCurved = normalize(vec2(-xBasisCurved.y, xBasisCurved.x));
9762
+
9715
9763
  pointCurr += yBasisCurved * linkWidthPx * position.y;
9764
+
9765
+
9716
9766
  vec2 p = 2.0 * pointCurr / spaceSize - 1.0;
9717
9767
  p *= spaceSize / screenSize;
9718
- vec3 final = transformationMatrix * vec3(p, 1);
9768
+ vec3 final = transformationMatrix * vec3(p, 1);
9769
+
9719
9770
  gl_Position = vec4(final.rg, 0, 1);
9720
9771
  }`;
9721
9772
  function Fi(t, e) {
@@ -9984,28 +10035,28 @@ function gg(t) {
9984
10035
  var e = t.grouping === void 0 || t.thousands === void 0 ? au : hg(su.call(t.grouping, Number), t.thousands + ""), n = t.currency === void 0 ? "" : t.currency[0] + "", r = t.currency === void 0 ? "" : t.currency[1] + "", i = t.decimal === void 0 ? "." : t.decimal + "", o = t.numerals === void 0 ? au : dg(su.call(t.numerals, String)), f = t.percent === void 0 ? "%" : t.percent + "", s = t.minus === void 0 ? "−" : t.minus + "", u = t.nan === void 0 ? "NaN" : t.nan + "";
9985
10036
  function c(b) {
9986
10037
  b = Hi(b);
9987
- var S = b.fill, D = b.align, Z = b.sign, we = b.symbol, Se = b.zero, ae = b.width, Ne = b.comma, Xe = b.precision, q = b.trim, le = b.type;
9988
- le === "n" ? (Ne = !0, le = "g") : ou[le] || (Xe === void 0 && (Xe = 12), q = !0, le = "g"), (Se || S === "0" && D === "=") && (Se = !0, S = "0", D = "=");
10038
+ var S = b.fill, D = b.align, Z = b.sign, we = b.symbol, Se = b.zero, ae = b.width, Ge = b.comma, Xe = b.precision, W = b.trim, le = b.type;
10039
+ le === "n" ? (Ge = !0, le = "g") : ou[le] || (Xe === void 0 && (Xe = 12), W = !0, le = "g"), (Se || S === "0" && D === "=") && (Se = !0, S = "0", D = "=");
9989
10040
  var Le = we === "$" ? n : we === "#" && /[boxX]/.test(le) ? "0" + le.toLowerCase() : "", Me = we === "$" ? r : /[%p]/.test(le) ? f : "", je = ou[le], et = /[defgprs%]/.test(le);
9990
10041
  Xe = Xe === void 0 ? 6 : /[gprs]/.test(le) ? Math.max(1, Math.min(21, Xe)) : Math.max(0, Math.min(20, Xe));
9991
10042
  function nt(ke) {
9992
- var it = Le, tt = Me, G, Ae, oe;
10043
+ var it = Le, tt = Me, N, Ae, oe;
9993
10044
  if (le === "c")
9994
10045
  tt = je(ke) + tt, ke = "";
9995
10046
  else {
9996
10047
  ke = +ke;
9997
10048
  var Ce = ke < 0 || 1 / ke < 0;
9998
- if (ke = isNaN(ke) ? u : je(Math.abs(ke), Xe), q && (ke = pg(ke)), Ce && +ke == 0 && Z !== "+" && (Ce = !1), it = (Ce ? Z === "(" ? Z : s : Z === "-" || Z === "(" ? "" : Z) + it, tt = (le === "s" ? fu[8 + nc / 3] : "") + tt + (Ce && Z === "(" ? ")" : ""), et) {
9999
- for (G = -1, Ae = ke.length; ++G < Ae; )
10000
- if (oe = ke.charCodeAt(G), 48 > oe || oe > 57) {
10001
- tt = (oe === 46 ? i + ke.slice(G + 1) : ke.slice(G)) + tt, ke = ke.slice(0, G);
10049
+ if (ke = isNaN(ke) ? u : je(Math.abs(ke), Xe), W && (ke = pg(ke)), Ce && +ke == 0 && Z !== "+" && (Ce = !1), it = (Ce ? Z === "(" ? Z : s : Z === "-" || Z === "(" ? "" : Z) + it, tt = (le === "s" ? fu[8 + nc / 3] : "") + tt + (Ce && Z === "(" ? ")" : ""), et) {
10050
+ for (N = -1, Ae = ke.length; ++N < Ae; )
10051
+ if (oe = ke.charCodeAt(N), 48 > oe || oe > 57) {
10052
+ tt = (oe === 46 ? i + ke.slice(N + 1) : ke.slice(N)) + tt, ke = ke.slice(0, N);
10002
10053
  break;
10003
10054
  }
10004
10055
  }
10005
10056
  }
10006
- Ne && !Se && (ke = e(ke, 1 / 0));
10007
- var $e = it.length + ke.length + tt.length, Be = $e < ae ? new Array(ae - $e + 1).join(S) : "";
10008
- switch (Ne && Se && (ke = e(Be + ke, Be.length ? ae - tt.length : 1 / 0), Be = ""), D) {
10057
+ Ge && !Se && (ke = e(ke, 1 / 0));
10058
+ var Ue = it.length + ke.length + tt.length, Be = Ue < ae ? new Array(ae - Ue + 1).join(S) : "";
10059
+ switch (Ge && Se && (ke = e(Be + ke, Be.length ? ae - tt.length : 1 / 0), Be = ""), D) {
10009
10060
  case "<":
10010
10061
  ke = it + ke + tt + Be;
10011
10062
  break;
@@ -10013,7 +10064,7 @@ function gg(t) {
10013
10064
  ke = it + Be + ke + tt;
10014
10065
  break;
10015
10066
  case "^":
10016
- ke = Be.slice(0, $e = Be.length >> 1) + it + ke + tt + Be.slice($e);
10067
+ ke = Be.slice(0, Ue = Be.length >> 1) + it + ke + tt + Be.slice(Ue);
10017
10068
  break;
10018
10069
  default:
10019
10070
  ke = Be + it + ke + tt;
@@ -10195,19 +10246,18 @@ class Cg extends hn {
10195
10246
  },
10196
10247
  transformationMatrix: () => r.transform,
10197
10248
  pointsTextureSize: () => r.pointsTextureSize,
10198
- pointSizeScale: () => n.pointSizeScale,
10199
10249
  widthScale: () => n.linkWidthScale,
10200
10250
  arrowSizeScale: () => n.linkArrowsSizeScale,
10201
10251
  spaceSize: () => r.adjustedSpaceSize,
10202
10252
  screenSize: () => r.screenSize,
10203
- ratio: () => n.pixelRatio,
10204
10253
  linkVisibilityDistanceRange: () => n.linkVisibilityDistanceRange,
10205
10254
  linkVisibilityMinTransparency: () => n.linkVisibilityMinTransparency,
10206
10255
  greyoutOpacity: () => n.linkGreyoutOpacity,
10207
- scalePointsOnZoom: () => n.scalePointsOnZoom,
10256
+ scaleLinksOnZoom: () => n.scaleLinksOnZoom,
10257
+ maxPointSize: () => r.maxPointSize,
10208
10258
  curvedWeight: () => n.curvedLinkWeight,
10209
10259
  curvedLinkControlPointDistance: () => n.curvedLinkControlPointDistance,
10210
- curvedLinkSegments: () => n.curvedLinks ? n.curvedLinkSegments ?? Ue.curvedLinkSegments : 1
10260
+ curvedLinkSegments: () => n.curvedLinks ? n.curvedLinkSegments ?? Ve.curvedLinkSegments : 1
10211
10261
  },
10212
10262
  cull: {
10213
10263
  enable: !0,
@@ -10266,7 +10316,7 @@ class Cg extends hn {
10266
10316
  }
10267
10317
  updateCurveLineGeometry() {
10268
10318
  const { reglInstance: e, config: { curvedLinks: n, curvedLinkSegments: r } } = this;
10269
- this.curveLineGeometry = Eg(n ? r ?? Ue.curvedLinkSegments : 1), this.curveLineBuffer || (this.curveLineBuffer = e.buffer(0)), this.curveLineBuffer(this.curveLineGeometry);
10319
+ this.curveLineGeometry = Eg(n ? r ?? Ve.curvedLinkSegments : 1), this.curveLineBuffer || (this.curveLineBuffer = e.buffer(0)), this.curveLineBuffer(this.curveLineGeometry);
10270
10320
  }
10271
10321
  }
10272
10322
  var Pg = `#ifdef GL_ES
@@ -10636,7 +10686,7 @@ void main() {
10636
10686
  pointPosition.g = clamp(pointPosition.g, 0.0, spaceSize);
10637
10687
 
10638
10688
  gl_FragColor = pointPosition;
10639
- }`, Gg = `#ifdef GL_ES
10689
+ }`, Ng = `#ifdef GL_ES
10640
10690
  precision highp float;
10641
10691
  #endif
10642
10692
 
@@ -10652,7 +10702,7 @@ void main() {
10652
10702
  vec4 pointPosition = texture2D(positionsTexture, (trackedPointIndices.rg + 0.5) / pointsTextureSize);
10653
10703
 
10654
10704
  gl_FragColor = vec4(pointPosition.rg, 1.0, 1.0);
10655
- }`, Ng = `#ifdef GL_ES
10705
+ }`, Gg = `#ifdef GL_ES
10656
10706
  precision highp float;
10657
10707
  #endif
10658
10708
 
@@ -10736,7 +10786,7 @@ class Bg extends hn {
10736
10786
  spaceSize: () => r.adjustedSpaceSize
10737
10787
  }
10738
10788
  }))), this.dragPointCommand || (this.dragPointCommand = e({
10739
- frag: Ng,
10789
+ frag: Gg,
10740
10790
  vert: St,
10741
10791
  framebuffer: () => this.currentPositionFbo,
10742
10792
  primitive: "triangle strip",
@@ -10936,7 +10986,7 @@ class Bg extends hn {
10936
10986
  mask: !1
10937
10987
  }
10938
10988
  })), this.trackPointsCommand || (this.trackPointsCommand = e({
10939
- frag: Gg,
10989
+ frag: Ng,
10940
10990
  vert: St,
10941
10991
  framebuffer: () => this.trackedPositionsFbo,
10942
10992
  primitive: "triangle strip",
@@ -10992,7 +11042,7 @@ class Bg extends hn {
10992
11042
  updateSampledPointsGrid() {
10993
11043
  const { store: { screenSize: e }, config: { pointSamplingDistance: n }, reglInstance: r } = this;
10994
11044
  let i = n ?? Math.min(...e) / 2;
10995
- i === 0 && (i = Ue.pointSamplingDistance);
11045
+ i === 0 && (i = Ve.pointSamplingDistance);
10996
11046
  const o = Math.ceil(e[0] / i), f = Math.ceil(e[1] / i);
10997
11047
  this.sampledPointsFbo || (this.sampledPointsFbo = r.framebuffer()), this.sampledPointsFbo({
10998
11048
  shape: [o, f],
@@ -11090,8 +11140,8 @@ class Bg extends hn {
11090
11140
  const n = this.data.pointPositions, r = n.length / 2;
11091
11141
  let i = 1 / 0, o = -1 / 0, f = 1 / 0, s = -1 / 0;
11092
11142
  for (let Se = 0; Se < n.length; Se += 2) {
11093
- const ae = n[Se], Ne = n[Se + 1];
11094
- i = Math.min(i, ae), o = Math.max(o, ae), f = Math.min(f, Ne), s = Math.max(s, Ne);
11143
+ const ae = n[Se], Ge = n[Se + 1];
11144
+ i = Math.min(i, ae), o = Math.max(o, ae), f = Math.min(f, Ge), s = Math.max(s, Ge);
11095
11145
  }
11096
11146
  const u = o - i, c = s - f, v = Math.max(u, c);
11097
11147
  if (v > e) {
@@ -11204,8 +11254,8 @@ function Hg() {
11204
11254
  );
11205
11255
  }(zi)), zi.exports;
11206
11256
  }
11207
- var Ii = { exports: {} }, Wg = Ii.exports, mu;
11208
- function qg() {
11257
+ var Ii = { exports: {} }, qg = Ii.exports, mu;
11258
+ function Wg() {
11209
11259
  return mu || (mu = 1, function(t) {
11210
11260
  (function(e, n, r) {
11211
11261
  function i(s) {
@@ -11235,7 +11285,7 @@ function qg() {
11235
11285
  }
11236
11286
  n && n.exports ? n.exports = f : this.xorwow = f;
11237
11287
  })(
11238
- Wg,
11288
+ qg,
11239
11289
  t
11240
11290
  );
11241
11291
  }(Ii)), Ii.exports;
@@ -11299,8 +11349,8 @@ function Kg() {
11299
11349
  return u.w = v = v + 1640531527 | 0, Z = b[S + 34 & 127], D = b[S = S + 1 & 127], Z ^= Z << 13, D ^= D << 17, Z ^= Z >>> 15, D ^= D >>> 12, Z = b[S] = Z ^ D, u.i = S, Z + (v ^ v >>> 16) | 0;
11300
11350
  };
11301
11351
  function c(v, b) {
11302
- var S, D, Z, we, Se, ae = [], Ne = 128;
11303
- for (b === (b | 0) ? (D = b, b = null) : (b = b + "\0", D = 0, Ne = Math.max(Ne, b.length)), Z = 0, we = -32; we < Ne; ++we)
11352
+ var S, D, Z, we, Se, ae = [], Ge = 128;
11353
+ for (b === (b | 0) ? (D = b, b = null) : (b = b + "\0", D = 0, Ge = Math.max(Ge, b.length)), Z = 0, we = -32; we < Ge; ++we)
11304
11354
  b && (D ^= b.charCodeAt((we + 32) % b.length)), we === 0 && (Se = D), D ^= D << 10, D ^= D >>> 15, D ^= D << 4, D ^= D >>> 13, we >= 0 && (Se = Se + 1640531527 | 0, S = ae[we & 127] ^= D + Se, Z = S == 0 ? Z + 1 : 0);
11305
11355
  for (Z >= 128 && (ae[(b && b.length || 0) & 127] = -1), Z = 127, we = 4 * 128; we > 0; --we)
11306
11356
  D = ae[Z + 34 & 127], S = ae[Z = Z + 1 & 127], D ^= D << 13, S ^= S << 17, D ^= D >>> 15, S ^= S >>> 12, ae[Z] = D ^ S;
@@ -11379,11 +11429,11 @@ function oy() {
11379
11429
  return yu || (yu = 1, function(t) {
11380
11430
  (function(e, n, r) {
11381
11431
  var i = 256, o = 6, f = 52, s = "random", u = r.pow(i, o), c = r.pow(2, f), v = c * 2, b = i - 1, S;
11382
- function D(q, le, Le) {
11432
+ function D(W, le, Le) {
11383
11433
  var Me = [];
11384
11434
  le = le == !0 ? { entropy: !0 } : le || {};
11385
11435
  var je = ae(Se(
11386
- le.entropy ? [q, Xe(n)] : q ?? Ne(),
11436
+ le.entropy ? [W, Xe(n)] : W ?? Ge(),
11387
11437
  3
11388
11438
  ), Me), et = new Z(Me), nt = function() {
11389
11439
  for (var ke = et.g(o), it = u, tt = 0; ke < c; )
@@ -11396,8 +11446,8 @@ function oy() {
11396
11446
  return et.g(4) | 0;
11397
11447
  }, nt.quick = function() {
11398
11448
  return et.g(4) / 4294967296;
11399
- }, nt.double = nt, ae(Xe(et.S), n), (le.pass || Le || function(ke, it, tt, G) {
11400
- return G && (G.S && we(G, et), ke.state = function() {
11449
+ }, nt.double = nt, ae(Xe(et.S), n), (le.pass || Le || function(ke, it, tt, N) {
11450
+ return N && (N.S && we(N, et), ke.state = function() {
11401
11451
  return we(et, {});
11402
11452
  }), tt ? (r[s] = ke, it) : ke;
11403
11453
  })(
@@ -11407,47 +11457,47 @@ function oy() {
11407
11457
  le.state
11408
11458
  );
11409
11459
  }
11410
- function Z(q) {
11411
- var le, Le = q.length, Me = this, je = 0, et = Me.i = Me.j = 0, nt = Me.S = [];
11412
- for (Le || (q = [Le++]); je < i; )
11460
+ function Z(W) {
11461
+ var le, Le = W.length, Me = this, je = 0, et = Me.i = Me.j = 0, nt = Me.S = [];
11462
+ for (Le || (W = [Le++]); je < i; )
11413
11463
  nt[je] = je++;
11414
11464
  for (je = 0; je < i; je++)
11415
- nt[je] = nt[et = b & et + q[je % Le] + (le = nt[je])], nt[et] = le;
11465
+ nt[je] = nt[et = b & et + W[je % Le] + (le = nt[je])], nt[et] = le;
11416
11466
  (Me.g = function(ke) {
11417
- for (var it, tt = 0, G = Me.i, Ae = Me.j, oe = Me.S; ke--; )
11418
- it = oe[G = b & G + 1], tt = tt * i + oe[b & (oe[G] = oe[Ae = b & Ae + it]) + (oe[Ae] = it)];
11419
- return Me.i = G, Me.j = Ae, tt;
11467
+ for (var it, tt = 0, N = Me.i, Ae = Me.j, oe = Me.S; ke--; )
11468
+ it = oe[N = b & N + 1], tt = tt * i + oe[b & (oe[N] = oe[Ae = b & Ae + it]) + (oe[Ae] = it)];
11469
+ return Me.i = N, Me.j = Ae, tt;
11420
11470
  })(i);
11421
11471
  }
11422
- function we(q, le) {
11423
- return le.i = q.i, le.j = q.j, le.S = q.S.slice(), le;
11472
+ function we(W, le) {
11473
+ return le.i = W.i, le.j = W.j, le.S = W.S.slice(), le;
11424
11474
  }
11425
- function Se(q, le) {
11426
- var Le = [], Me = typeof q, je;
11475
+ function Se(W, le) {
11476
+ var Le = [], Me = typeof W, je;
11427
11477
  if (le && Me == "object")
11428
- for (je in q)
11478
+ for (je in W)
11429
11479
  try {
11430
- Le.push(Se(q[je], le - 1));
11480
+ Le.push(Se(W[je], le - 1));
11431
11481
  } catch {
11432
11482
  }
11433
- return Le.length ? Le : Me == "string" ? q : q + "\0";
11483
+ return Le.length ? Le : Me == "string" ? W : W + "\0";
11434
11484
  }
11435
- function ae(q, le) {
11436
- for (var Le = q + "", Me, je = 0; je < Le.length; )
11485
+ function ae(W, le) {
11486
+ for (var Le = W + "", Me, je = 0; je < Le.length; )
11437
11487
  le[b & je] = b & (Me ^= le[b & je] * 19) + Le.charCodeAt(je++);
11438
11488
  return Xe(le);
11439
11489
  }
11440
- function Ne() {
11490
+ function Ge() {
11441
11491
  try {
11442
- var q;
11443
- return S && (q = S.randomBytes) ? q = q(i) : (q = new Uint8Array(i), (e.crypto || e.msCrypto).getRandomValues(q)), Xe(q);
11492
+ var W;
11493
+ return S && (W = S.randomBytes) ? W = W(i) : (W = new Uint8Array(i), (e.crypto || e.msCrypto).getRandomValues(W)), Xe(W);
11444
11494
  } catch {
11445
11495
  var le = e.navigator, Le = le && le.plugins;
11446
11496
  return [+/* @__PURE__ */ new Date(), e, Le, e.screen, Xe(n)];
11447
11497
  }
11448
11498
  }
11449
- function Xe(q) {
11450
- return String.fromCharCode.apply(0, q);
11499
+ function Xe(W) {
11500
+ return String.fromCharCode.apply(0, W);
11451
11501
  }
11452
11502
  if (ae(r.random(), n), t.exports) {
11453
11503
  t.exports = D;
@@ -11472,7 +11522,7 @@ var Jo, xu;
11472
11522
  function ay() {
11473
11523
  if (xu) return Jo;
11474
11524
  xu = 1;
11475
- var t = Xg(), e = Hg(), n = qg(), r = Zg(), i = Kg(), o = ey(), f = oy();
11525
+ var t = Xg(), e = Hg(), n = Wg(), r = Zg(), i = Kg(), o = ey(), f = oy();
11476
11526
  return f.alea = t, f.xor128 = e, f.xorwow = n, f.xorshift7 = r, f.xor4096 = i, f.tychei = o, Jo = f, Jo;
11477
11527
  }
11478
11528
  var sy = ay();
@@ -11560,7 +11610,7 @@ var Qi = /* @__PURE__ */ function() {
11560
11610
  return t.next() * (n - e) + e;
11561
11611
  };
11562
11612
  };
11563
- function qt(t) {
11613
+ function Wt(t) {
11564
11614
  return new dy(t);
11565
11615
  }
11566
11616
  var dy = function(e) {
@@ -11587,7 +11637,7 @@ var dy = function(e) {
11587
11637
  throw new Error("Expected number to be greater than " + r + ", got " + n.n);
11588
11638
  }, this.n = e;
11589
11639
  }, my = function(t, e, n) {
11590
- return e === void 0 && (e = 0), n === void 0 && (n = 1), n === void 0 && (n = e === void 0 ? 1 : e, e = 0), qt(e).isInt(), qt(n).isInt(), function() {
11640
+ return e === void 0 && (e = 0), n === void 0 && (n = 1), n === void 0 && (n = e === void 0 ? 1 : e, e = 0), Wt(e).isInt(), Wt(n).isInt(), function() {
11591
11641
  return Math.floor(t.next() * (n - e + 1) + e);
11592
11642
  };
11593
11643
  }, py = function(t) {
@@ -11609,17 +11659,17 @@ var dy = function(e) {
11609
11659
  return Math.exp(r());
11610
11660
  };
11611
11661
  }, yy = function(t, e) {
11612
- return e === void 0 && (e = 0.5), qt(e).greaterThanOrEqual(0).lessThan(1), function() {
11662
+ return e === void 0 && (e = 0.5), Wt(e).greaterThanOrEqual(0).lessThan(1), function() {
11613
11663
  return Math.floor(t.next() + e);
11614
11664
  };
11615
11665
  }, xy = function(t, e, n) {
11616
- return e === void 0 && (e = 1), n === void 0 && (n = 0.5), qt(e).isInt().isPositive(), qt(n).greaterThanOrEqual(0).lessThan(1), function() {
11666
+ return e === void 0 && (e = 1), n === void 0 && (n = 0.5), Wt(e).isInt().isPositive(), Wt(n).greaterThanOrEqual(0).lessThan(1), function() {
11617
11667
  for (var r = 0, i = 0; r++ < e; )
11618
11668
  t.next() < n && i++;
11619
11669
  return i;
11620
11670
  };
11621
11671
  }, by = function(t, e) {
11622
- e === void 0 && (e = 0.5), qt(e).greaterThan(0).lessThan(1);
11672
+ e === void 0 && (e = 0.5), Wt(e).greaterThan(0).lessThan(1);
11623
11673
  var n = 1 / Math.log(1 - e);
11624
11674
  return function() {
11625
11675
  return Math.floor(1 + Math.log(t.next()) * n);
@@ -11627,7 +11677,7 @@ var dy = function(e) {
11627
11677
  }, _y = [0, 0, 0.6931471805599453, 1.791759469228055, 3.1780538303479458, 4.787491742782046, 6.579251212010101, 8.525161361065415, 10.60460290274525, 12.801827480081469], Sy = function(e) {
11628
11678
  return _y[e];
11629
11679
  }, wy = 0.9189385332046727, Ty = function(t, e) {
11630
- if (e === void 0 && (e = 1), qt(e).isPositive(), e < 10) {
11680
+ if (e === void 0 && (e = 1), Wt(e).isPositive(), e < 10) {
11631
11681
  var n = Math.exp(-e);
11632
11682
  return function() {
11633
11683
  for (var u = n, c = 0, v = t.next(); v > u; )
@@ -11659,23 +11709,23 @@ var dy = function(e) {
11659
11709
  };
11660
11710
  }
11661
11711
  }, Ay = function(t, e) {
11662
- return e === void 0 && (e = 1), qt(e).isPositive(), function() {
11712
+ return e === void 0 && (e = 1), Wt(e).isPositive(), function() {
11663
11713
  return -Math.log(1 - t.next()) / e;
11664
11714
  };
11665
11715
  }, Ey = function(t, e) {
11666
- return e === void 0 && (e = 1), qt(e).isInt().greaterThanOrEqual(0), function() {
11716
+ return e === void 0 && (e = 1), Wt(e).isInt().greaterThanOrEqual(0), function() {
11667
11717
  for (var n = 0, r = 0; r < e; ++r)
11668
11718
  n += t.next();
11669
11719
  return n;
11670
11720
  };
11671
11721
  }, Cy = function(t, e) {
11672
- e === void 0 && (e = 1), qt(e).isInt().isPositive();
11722
+ e === void 0 && (e = 1), Wt(e).isInt().isPositive();
11673
11723
  var n = t.irwinHall(e);
11674
11724
  return function() {
11675
11725
  return n() / e;
11676
11726
  };
11677
11727
  }, Py = function(t, e) {
11678
- e === void 0 && (e = 1), qt(e).greaterThanOrEqual(0);
11728
+ e === void 0 && (e = 1), Wt(e).greaterThanOrEqual(0);
11679
11729
  var n = 1 / e;
11680
11730
  return function() {
11681
11731
  return 1 / Math.pow(1 - t.next(), n);
@@ -11778,7 +11828,7 @@ new fc();
11778
11828
  const va = 1e-3, ga = 64;
11779
11829
  class Fy {
11780
11830
  constructor() {
11781
- this.pointsTextureSize = 0, this.linksTextureSize = 0, this.alpha = 1, this.transform = Vg(), this.screenSize = [0, 0], this.mousePosition = [0, 0], this.screenMousePosition = [0, 0], this.selectedArea = [[0, 0], [0, 0]], this.isSimulationRunning = !1, this.simulationProgress = 0, this.selectedIndices = null, this.maxPointSize = ga, this.hoveredPoint = void 0, this.focusedPoint = void 0, this.draggingPointIndex = void 0, this.adjustedSpaceSize = Ue.spaceSize, this.isSpaceKeyPressed = !1, this.hoveredPointRingColor = [1, 1, 1, vv], this.focusedPointRingColor = [1, 1, 1, gv], this.greyoutPointColor = [-1, -1, -1, -1], this.darkenGreyout = !1, this.alphaTarget = 0, this.scalePointX = ma(), this.scalePointY = ma(), this.random = new fc(), this._backgroundColor = [0, 0, 0, 0], this.alphaDecay = (e) => 1 - Math.pow(va, 1 / e);
11831
+ this.pointsTextureSize = 0, this.linksTextureSize = 0, this.alpha = 1, this.transform = Vg(), this.screenSize = [0, 0], this.mousePosition = [0, 0], this.screenMousePosition = [0, 0], this.selectedArea = [[0, 0], [0, 0]], this.isSimulationRunning = !1, this.simulationProgress = 0, this.selectedIndices = null, this.maxPointSize = ga, this.hoveredPoint = void 0, this.focusedPoint = void 0, this.draggingPointIndex = void 0, this.adjustedSpaceSize = Ve.spaceSize, this.isSpaceKeyPressed = !1, this.hoveredPointRingColor = [1, 1, 1, vv], this.focusedPointRingColor = [1, 1, 1, gv], this.greyoutPointColor = [-1, -1, -1, -1], this.darkenGreyout = !1, this.alphaTarget = 0, this.scalePointX = ma(), this.scalePointY = ma(), this.random = new fc(), this._backgroundColor = [0, 0, 0, 0], this.alphaDecay = (e) => 1 - Math.pow(va, 1 / e);
11782
11832
  }
11783
11833
  get backgroundColor() {
11784
11834
  return this._backgroundColor;
@@ -11812,11 +11862,11 @@ class Fy {
11812
11862
  return this.scalePointY(e);
11813
11863
  }
11814
11864
  setHoveredPointRingColor(e) {
11815
- const n = Nn(e);
11865
+ const n = Gn(e);
11816
11866
  this.hoveredPointRingColor[0] = n[0], this.hoveredPointRingColor[1] = n[1], this.hoveredPointRingColor[2] = n[2];
11817
11867
  }
11818
11868
  setFocusedPointRingColor(e) {
11819
- const n = Nn(e);
11869
+ const n = Gn(e);
11820
11870
  this.focusedPointRingColor[0] = n[0], this.focusedPointRingColor[1] = n[1], this.focusedPointRingColor[2] = n[2];
11821
11871
  }
11822
11872
  setGreyoutPointColor(e) {
@@ -11824,7 +11874,7 @@ class Fy {
11824
11874
  this.greyoutPointColor = [-1, -1, -1, -1];
11825
11875
  return;
11826
11876
  }
11827
- const n = Nn(e);
11877
+ const n = Gn(e);
11828
11878
  this.greyoutPointColor[0] = n[0], this.greyoutPointColor[1] = n[1], this.greyoutPointColor[2] = n[2], this.greyoutPointColor[3] = n[3];
11829
11879
  }
11830
11880
  setFocusedPoint(e) {
@@ -11895,48 +11945,48 @@ function Dy() {
11895
11945
  return navigator.maxTouchPoints || "ontouchstart" in this;
11896
11946
  }
11897
11947
  function My() {
11898
- var t = zy, e = Iy, n = Ry, r = Dy, i = {}, o = qi("start", "drag", "end"), f = 0, s, u, c, v, b = 0;
11899
- function S(q) {
11900
- q.on("mousedown.drag", D).filter(r).on("touchstart.drag", Se).on("touchmove.drag", ae, Ly).on("touchend.drag touchcancel.drag", Ne).style("touch-action", "none").style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
11901
- }
11902
- function D(q, le) {
11903
- if (!(v || !t.call(this, q, le))) {
11904
- var Le = Xe(this, e.call(this, q, le), q, le, "mouse");
11905
- Le && (Ct(q.view).on("mousemove.drag", Z, Mr).on("mouseup.drag", we, Mr), uc(q.view), ea(q), c = !1, s = q.clientX, u = q.clientY, Le("start", q));
11948
+ var t = zy, e = Iy, n = Ry, r = Dy, i = {}, o = Wi("start", "drag", "end"), f = 0, s, u, c, v, b = 0;
11949
+ function S(W) {
11950
+ W.on("mousedown.drag", D).filter(r).on("touchstart.drag", Se).on("touchmove.drag", ae, Ly).on("touchend.drag touchcancel.drag", Ge).style("touch-action", "none").style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
11951
+ }
11952
+ function D(W, le) {
11953
+ if (!(v || !t.call(this, W, le))) {
11954
+ var Le = Xe(this, e.call(this, W, le), W, le, "mouse");
11955
+ Le && (Ct(W.view).on("mousemove.drag", Z, Mr).on("mouseup.drag", we, Mr), uc(W.view), ea(W), c = !1, s = W.clientX, u = W.clientY, Le("start", W));
11906
11956
  }
11907
11957
  }
11908
- function Z(q) {
11909
- if (or(q), !c) {
11910
- var le = q.clientX - s, Le = q.clientY - u;
11958
+ function Z(W) {
11959
+ if (or(W), !c) {
11960
+ var le = W.clientX - s, Le = W.clientY - u;
11911
11961
  c = le * le + Le * Le > b;
11912
11962
  }
11913
- i.mouse("drag", q);
11963
+ i.mouse("drag", W);
11914
11964
  }
11915
- function we(q) {
11916
- Ct(q.view).on("mousemove.drag mouseup.drag", null), cc(q.view, c), or(q), i.mouse("end", q);
11965
+ function we(W) {
11966
+ Ct(W.view).on("mousemove.drag mouseup.drag", null), cc(W.view, c), or(W), i.mouse("end", W);
11917
11967
  }
11918
- function Se(q, le) {
11919
- if (t.call(this, q, le)) {
11920
- var Le = q.changedTouches, Me = e.call(this, q, le), je = Le.length, et, nt;
11968
+ function Se(W, le) {
11969
+ if (t.call(this, W, le)) {
11970
+ var Le = W.changedTouches, Me = e.call(this, W, le), je = Le.length, et, nt;
11921
11971
  for (et = 0; et < je; ++et)
11922
- (nt = Xe(this, Me, q, le, Le[et].identifier, Le[et])) && (ea(q), nt("start", q, Le[et]));
11972
+ (nt = Xe(this, Me, W, le, Le[et].identifier, Le[et])) && (ea(W), nt("start", W, Le[et]));
11923
11973
  }
11924
11974
  }
11925
- function ae(q) {
11926
- var le = q.changedTouches, Le = le.length, Me, je;
11975
+ function ae(W) {
11976
+ var le = W.changedTouches, Le = le.length, Me, je;
11927
11977
  for (Me = 0; Me < Le; ++Me)
11928
- (je = i[le[Me].identifier]) && (or(q), je("drag", q, le[Me]));
11978
+ (je = i[le[Me].identifier]) && (or(W), je("drag", W, le[Me]));
11929
11979
  }
11930
- function Ne(q) {
11931
- var le = q.changedTouches, Le = le.length, Me, je;
11980
+ function Ge(W) {
11981
+ var le = W.changedTouches, Le = le.length, Me, je;
11932
11982
  for (v && clearTimeout(v), v = setTimeout(function() {
11933
11983
  v = null;
11934
11984
  }, 500), Me = 0; Me < Le; ++Me)
11935
- (je = i[le[Me].identifier]) && (ea(q), je("end", q, le[Me]));
11985
+ (je = i[le[Me].identifier]) && (ea(W), je("end", W, le[Me]));
11936
11986
  }
11937
- function Xe(q, le, Le, Me, je, et) {
11938
- var nt = o.copy(), ke = un(et || Le, le), it, tt, G;
11939
- if ((G = n.call(q, new ya("beforestart", {
11987
+ function Xe(W, le, Le, Me, je, et) {
11988
+ var nt = o.copy(), ke = un(et || Le, le), it, tt, N;
11989
+ if ((N = n.call(W, new ya("beforestart", {
11940
11990
  sourceEvent: Le,
11941
11991
  target: S,
11942
11992
  identifier: je,
@@ -11947,7 +11997,7 @@ function My() {
11947
11997
  dy: 0,
11948
11998
  dispatch: nt
11949
11999
  }), Me)) != null)
11950
- return it = G.x - ke[0] || 0, tt = G.y - ke[1] || 0, function Ae(oe, Ce, $e) {
12000
+ return it = N.x - ke[0] || 0, tt = N.y - ke[1] || 0, function Ae(oe, Ce, Ue) {
11951
12001
  var Be = ke, Ye;
11952
12002
  switch (oe) {
11953
12003
  case "start":
@@ -11957,15 +12007,15 @@ function My() {
11957
12007
  delete i[je], --f;
11958
12008
  // falls through
11959
12009
  case "drag":
11960
- ke = un($e || Ce, le), Ye = f;
12010
+ ke = un(Ue || Ce, le), Ye = f;
11961
12011
  break;
11962
12012
  }
11963
12013
  nt.call(
11964
12014
  oe,
11965
- q,
12015
+ W,
11966
12016
  new ya(oe, {
11967
12017
  sourceEvent: Ce,
11968
- subject: G,
12018
+ subject: N,
11969
12019
  target: S,
11970
12020
  identifier: je,
11971
12021
  active: Ye,
@@ -11979,19 +12029,19 @@ function My() {
11979
12029
  );
11980
12030
  };
11981
12031
  }
11982
- return S.filter = function(q) {
11983
- return arguments.length ? (t = typeof q == "function" ? q : Si(!!q), S) : t;
11984
- }, S.container = function(q) {
11985
- return arguments.length ? (e = typeof q == "function" ? q : Si(q), S) : e;
11986
- }, S.subject = function(q) {
11987
- return arguments.length ? (n = typeof q == "function" ? q : Si(q), S) : n;
11988
- }, S.touchable = function(q) {
11989
- return arguments.length ? (r = typeof q == "function" ? q : Si(!!q), S) : r;
12032
+ return S.filter = function(W) {
12033
+ return arguments.length ? (t = typeof W == "function" ? W : Si(!!W), S) : t;
12034
+ }, S.container = function(W) {
12035
+ return arguments.length ? (e = typeof W == "function" ? W : Si(W), S) : e;
12036
+ }, S.subject = function(W) {
12037
+ return arguments.length ? (n = typeof W == "function" ? W : Si(W), S) : n;
12038
+ }, S.touchable = function(W) {
12039
+ return arguments.length ? (r = typeof W == "function" ? W : Si(!!W), S) : r;
11990
12040
  }, S.on = function() {
11991
- var q = o.on.apply(o, arguments);
11992
- return q === o ? S : q;
11993
- }, S.clickDistance = function(q) {
11994
- return arguments.length ? (b = (q = +q) * q, S) : Math.sqrt(b);
12041
+ var W = o.on.apply(o, arguments);
12042
+ return W === o ? S : W;
12043
+ }, S.clickDistance = function(W) {
12044
+ return arguments.length ? (b = (W = +W) * W, S) : Math.sqrt(b);
11995
12045
  }, S;
11996
12046
  }
11997
12047
  const wi = (t) => () => t;
@@ -12056,10 +12106,10 @@ function ta(t) {
12056
12106
  function kr(t) {
12057
12107
  t.preventDefault(), t.stopImmediatePropagation();
12058
12108
  }
12059
- function Gy(t) {
12109
+ function Ny(t) {
12060
12110
  return (!t.ctrlKey || t.type === "wheel") && !t.button;
12061
12111
  }
12062
- function Ny() {
12112
+ function Gy() {
12063
12113
  var t = this;
12064
12114
  return t instanceof SVGElement ? (t = t.ownerSVGElement || t, t.hasAttribute("viewBox") ? (t = t.viewBox.baseVal, [[t.x, t.y], [t.x + t.width, t.y + t.height]]) : [[0, 0], [t.width.baseVal.value, t.height.baseVal.value]]) : [[0, 0], [t.clientWidth, t.clientHeight]];
12065
12115
  }
@@ -12080,93 +12130,93 @@ function $y(t, e, n) {
12080
12130
  );
12081
12131
  }
12082
12132
  function Uy() {
12083
- var t = Gy, e = Ny, n = $y, r = By, i = Vy, o = [0, 1 / 0], f = [[-1 / 0, -1 / 0], [1 / 0, 1 / 0]], s = 250, u = Zp, c = qi("start", "zoom", "end"), v, b, S, D = 500, Z = 150, we = 0, Se = 10;
12084
- function ae(G) {
12085
- G.property("__zoom", Su).on("wheel.zoom", je, { passive: !1 }).on("mousedown.zoom", et).on("dblclick.zoom", nt).filter(i).on("touchstart.zoom", ke).on("touchmove.zoom", it).on("touchend.zoom touchcancel.zoom", tt).style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
12133
+ var t = Ny, e = Gy, n = $y, r = By, i = Vy, o = [0, 1 / 0], f = [[-1 / 0, -1 / 0], [1 / 0, 1 / 0]], s = 250, u = Zp, c = Wi("start", "zoom", "end"), v, b, S, D = 500, Z = 150, we = 0, Se = 10;
12134
+ function ae(N) {
12135
+ N.property("__zoom", Su).on("wheel.zoom", je, { passive: !1 }).on("mousedown.zoom", et).on("dblclick.zoom", nt).filter(i).on("touchstart.zoom", ke).on("touchmove.zoom", it).on("touchend.zoom touchcancel.zoom", tt).style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
12086
12136
  }
12087
- ae.transform = function(G, Ae, oe, Ce) {
12088
- var $e = G.selection ? G.selection() : G;
12089
- $e.property("__zoom", Su), G !== $e ? le(G, Ae, oe, Ce) : $e.interrupt().each(function() {
12137
+ ae.transform = function(N, Ae, oe, Ce) {
12138
+ var Ue = N.selection ? N.selection() : N;
12139
+ Ue.property("__zoom", Su), N !== Ue ? le(N, Ae, oe, Ce) : Ue.interrupt().each(function() {
12090
12140
  Le(this, arguments).event(Ce).start().zoom(null, typeof Ae == "function" ? Ae.apply(this, arguments) : Ae).end();
12091
12141
  });
12092
- }, ae.scaleBy = function(G, Ae, oe, Ce) {
12093
- ae.scaleTo(G, function() {
12094
- var $e = this.__zoom.k, Be = typeof Ae == "function" ? Ae.apply(this, arguments) : Ae;
12095
- return $e * Be;
12142
+ }, ae.scaleBy = function(N, Ae, oe, Ce) {
12143
+ ae.scaleTo(N, function() {
12144
+ var Ue = this.__zoom.k, Be = typeof Ae == "function" ? Ae.apply(this, arguments) : Ae;
12145
+ return Ue * Be;
12096
12146
  }, oe, Ce);
12097
- }, ae.scaleTo = function(G, Ae, oe, Ce) {
12098
- ae.transform(G, function() {
12099
- var $e = e.apply(this, arguments), Be = this.__zoom, Ye = oe == null ? q($e) : typeof oe == "function" ? oe.apply(this, arguments) : oe, rt = Be.invert(Ye), ut = typeof Ae == "function" ? Ae.apply(this, arguments) : Ae;
12100
- return n(Xe(Ne(Be, ut), Ye, rt), $e, f);
12147
+ }, ae.scaleTo = function(N, Ae, oe, Ce) {
12148
+ ae.transform(N, function() {
12149
+ var Ue = e.apply(this, arguments), Be = this.__zoom, Ye = oe == null ? W(Ue) : typeof oe == "function" ? oe.apply(this, arguments) : oe, rt = Be.invert(Ye), ut = typeof Ae == "function" ? Ae.apply(this, arguments) : Ae;
12150
+ return n(Xe(Ge(Be, ut), Ye, rt), Ue, f);
12101
12151
  }, oe, Ce);
12102
- }, ae.translateBy = function(G, Ae, oe, Ce) {
12103
- ae.transform(G, function() {
12152
+ }, ae.translateBy = function(N, Ae, oe, Ce) {
12153
+ ae.transform(N, function() {
12104
12154
  return n(this.__zoom.translate(
12105
12155
  typeof Ae == "function" ? Ae.apply(this, arguments) : Ae,
12106
12156
  typeof oe == "function" ? oe.apply(this, arguments) : oe
12107
12157
  ), e.apply(this, arguments), f);
12108
12158
  }, null, Ce);
12109
- }, ae.translateTo = function(G, Ae, oe, Ce, $e) {
12110
- ae.transform(G, function() {
12111
- var Be = e.apply(this, arguments), Ye = this.__zoom, rt = Ce == null ? q(Be) : typeof Ce == "function" ? Ce.apply(this, arguments) : Ce;
12159
+ }, ae.translateTo = function(N, Ae, oe, Ce, Ue) {
12160
+ ae.transform(N, function() {
12161
+ var Be = e.apply(this, arguments), Ye = this.__zoom, rt = Ce == null ? W(Be) : typeof Ce == "function" ? Ce.apply(this, arguments) : Ce;
12112
12162
  return n(zr.translate(rt[0], rt[1]).scale(Ye.k).translate(
12113
12163
  typeof Ae == "function" ? -Ae.apply(this, arguments) : -Ae,
12114
12164
  typeof oe == "function" ? -oe.apply(this, arguments) : -oe
12115
12165
  ), Be, f);
12116
- }, Ce, $e);
12166
+ }, Ce, Ue);
12117
12167
  };
12118
- function Ne(G, Ae) {
12119
- return Ae = Math.max(o[0], Math.min(o[1], Ae)), Ae === G.k ? G : new cn(Ae, G.x, G.y);
12168
+ function Ge(N, Ae) {
12169
+ return Ae = Math.max(o[0], Math.min(o[1], Ae)), Ae === N.k ? N : new cn(Ae, N.x, N.y);
12120
12170
  }
12121
- function Xe(G, Ae, oe) {
12122
- var Ce = Ae[0] - oe[0] * G.k, $e = Ae[1] - oe[1] * G.k;
12123
- return Ce === G.x && $e === G.y ? G : new cn(G.k, Ce, $e);
12171
+ function Xe(N, Ae, oe) {
12172
+ var Ce = Ae[0] - oe[0] * N.k, Ue = Ae[1] - oe[1] * N.k;
12173
+ return Ce === N.x && Ue === N.y ? N : new cn(N.k, Ce, Ue);
12124
12174
  }
12125
- function q(G) {
12126
- return [(+G[0][0] + +G[1][0]) / 2, (+G[0][1] + +G[1][1]) / 2];
12175
+ function W(N) {
12176
+ return [(+N[0][0] + +N[1][0]) / 2, (+N[0][1] + +N[1][1]) / 2];
12127
12177
  }
12128
- function le(G, Ae, oe, Ce) {
12129
- G.on("start.zoom", function() {
12178
+ function le(N, Ae, oe, Ce) {
12179
+ N.on("start.zoom", function() {
12130
12180
  Le(this, arguments).event(Ce).start();
12131
12181
  }).on("interrupt.zoom end.zoom", function() {
12132
12182
  Le(this, arguments).event(Ce).end();
12133
12183
  }).tween("zoom", function() {
12134
- var $e = this, Be = arguments, Ye = Le($e, Be).event(Ce), rt = e.apply($e, Be), ut = oe == null ? q(rt) : typeof oe == "function" ? oe.apply($e, Be) : oe, Nt = Math.max(rt[1][0] - rt[0][0], rt[1][1] - rt[0][1]), bt = $e.__zoom, Lt = typeof Ae == "function" ? Ae.apply($e, Be) : Ae, $t = u(bt.invert(ut).concat(Nt / bt.k), Lt.invert(ut).concat(Nt / Lt.k));
12184
+ var Ue = this, Be = arguments, Ye = Le(Ue, Be).event(Ce), rt = e.apply(Ue, Be), ut = oe == null ? W(rt) : typeof oe == "function" ? oe.apply(Ue, Be) : oe, Gt = Math.max(rt[1][0] - rt[0][0], rt[1][1] - rt[0][1]), bt = Ue.__zoom, Lt = typeof Ae == "function" ? Ae.apply(Ue, Be) : Ae, $t = u(bt.invert(ut).concat(Gt / bt.k), Lt.invert(ut).concat(Gt / Lt.k));
12135
12185
  return function(zt) {
12136
12186
  if (zt === 1) zt = Lt;
12137
12187
  else {
12138
- var Ut = $t(zt), ur = Nt / Ut[2];
12188
+ var Ut = $t(zt), ur = Gt / Ut[2];
12139
12189
  zt = new cn(ur, ut[0] - Ut[0] * ur, ut[1] - Ut[1] * ur);
12140
12190
  }
12141
12191
  Ye.zoom(null, zt);
12142
12192
  };
12143
12193
  });
12144
12194
  }
12145
- function Le(G, Ae, oe) {
12146
- return !oe && G.__zooming || new Me(G, Ae);
12195
+ function Le(N, Ae, oe) {
12196
+ return !oe && N.__zooming || new Me(N, Ae);
12147
12197
  }
12148
- function Me(G, Ae) {
12149
- this.that = G, this.args = Ae, this.active = 0, this.sourceEvent = null, this.extent = e.apply(G, Ae), this.taps = 0;
12198
+ function Me(N, Ae) {
12199
+ this.that = N, this.args = Ae, this.active = 0, this.sourceEvent = null, this.extent = e.apply(N, Ae), this.taps = 0;
12150
12200
  }
12151
12201
  Me.prototype = {
12152
- event: function(G) {
12153
- return G && (this.sourceEvent = G), this;
12202
+ event: function(N) {
12203
+ return N && (this.sourceEvent = N), this;
12154
12204
  },
12155
12205
  start: function() {
12156
12206
  return ++this.active === 1 && (this.that.__zooming = this, this.emit("start")), this;
12157
12207
  },
12158
- zoom: function(G, Ae) {
12159
- return this.mouse && G !== "mouse" && (this.mouse[1] = Ae.invert(this.mouse[0])), this.touch0 && G !== "touch" && (this.touch0[1] = Ae.invert(this.touch0[0])), this.touch1 && G !== "touch" && (this.touch1[1] = Ae.invert(this.touch1[0])), this.that.__zoom = Ae, this.emit("zoom"), this;
12208
+ zoom: function(N, Ae) {
12209
+ return this.mouse && N !== "mouse" && (this.mouse[1] = Ae.invert(this.mouse[0])), this.touch0 && N !== "touch" && (this.touch0[1] = Ae.invert(this.touch0[0])), this.touch1 && N !== "touch" && (this.touch1[1] = Ae.invert(this.touch1[0])), this.that.__zoom = Ae, this.emit("zoom"), this;
12160
12210
  },
12161
12211
  end: function() {
12162
12212
  return --this.active === 0 && (delete this.that.__zooming, this.emit("end")), this;
12163
12213
  },
12164
- emit: function(G) {
12214
+ emit: function(N) {
12165
12215
  var Ae = Ct(this.that).datum();
12166
12216
  c.call(
12167
- G,
12217
+ N,
12168
12218
  this.that,
12169
- new Oy(G, {
12219
+ new Oy(N, {
12170
12220
  sourceEvent: this.sourceEvent,
12171
12221
  target: ae,
12172
12222
  transform: this.that.__zoom,
@@ -12176,24 +12226,24 @@ function Uy() {
12176
12226
  );
12177
12227
  }
12178
12228
  };
12179
- function je(G, ...Ae) {
12229
+ function je(N, ...Ae) {
12180
12230
  if (!t.apply(this, arguments)) return;
12181
- var oe = Le(this, Ae).event(G), Ce = this.__zoom, $e = Math.max(o[0], Math.min(o[1], Ce.k * Math.pow(2, r.apply(this, arguments)))), Be = un(G);
12231
+ var oe = Le(this, Ae).event(N), Ce = this.__zoom, Ue = Math.max(o[0], Math.min(o[1], Ce.k * Math.pow(2, r.apply(this, arguments)))), Be = un(N);
12182
12232
  if (oe.wheel)
12183
12233
  (oe.mouse[0][0] !== Be[0] || oe.mouse[0][1] !== Be[1]) && (oe.mouse[1] = Ce.invert(oe.mouse[0] = Be)), clearTimeout(oe.wheel);
12184
12234
  else {
12185
- if (Ce.k === $e) return;
12235
+ if (Ce.k === Ue) return;
12186
12236
  oe.mouse = [Be, Ce.invert(Be)], Ci(this), oe.start();
12187
12237
  }
12188
- kr(G), oe.wheel = setTimeout(Ye, Z), oe.zoom("mouse", n(Xe(Ne(Ce, $e), oe.mouse[0], oe.mouse[1]), oe.extent, f));
12238
+ kr(N), oe.wheel = setTimeout(Ye, Z), oe.zoom("mouse", n(Xe(Ge(Ce, Ue), oe.mouse[0], oe.mouse[1]), oe.extent, f));
12189
12239
  function Ye() {
12190
12240
  oe.wheel = null, oe.end();
12191
12241
  }
12192
12242
  }
12193
- function et(G, ...Ae) {
12243
+ function et(N, ...Ae) {
12194
12244
  if (S || !t.apply(this, arguments)) return;
12195
- var oe = G.currentTarget, Ce = Le(this, Ae, !0).event(G), $e = Ct(G.view).on("mousemove.zoom", ut, !0).on("mouseup.zoom", Nt, !0), Be = un(G, oe), Ye = G.clientX, rt = G.clientY;
12196
- uc(G.view), ta(G), Ce.mouse = [Be, this.__zoom.invert(Be)], Ci(this), Ce.start();
12245
+ var oe = N.currentTarget, Ce = Le(this, Ae, !0).event(N), Ue = Ct(N.view).on("mousemove.zoom", ut, !0).on("mouseup.zoom", Gt, !0), Be = un(N, oe), Ye = N.clientX, rt = N.clientY;
12246
+ uc(N.view), ta(N), Ce.mouse = [Be, this.__zoom.invert(Be)], Ci(this), Ce.start();
12197
12247
  function ut(bt) {
12198
12248
  if (kr(bt), !Ce.moved) {
12199
12249
  var Lt = bt.clientX - Ye, $t = bt.clientY - rt;
@@ -12201,45 +12251,45 @@ function Uy() {
12201
12251
  }
12202
12252
  Ce.event(bt).zoom("mouse", n(Xe(Ce.that.__zoom, Ce.mouse[0] = un(bt, oe), Ce.mouse[1]), Ce.extent, f));
12203
12253
  }
12204
- function Nt(bt) {
12205
- $e.on("mousemove.zoom mouseup.zoom", null), cc(bt.view, Ce.moved), kr(bt), Ce.event(bt).end();
12254
+ function Gt(bt) {
12255
+ Ue.on("mousemove.zoom mouseup.zoom", null), cc(bt.view, Ce.moved), kr(bt), Ce.event(bt).end();
12206
12256
  }
12207
12257
  }
12208
- function nt(G, ...Ae) {
12258
+ function nt(N, ...Ae) {
12209
12259
  if (t.apply(this, arguments)) {
12210
- var oe = this.__zoom, Ce = un(G.changedTouches ? G.changedTouches[0] : G, this), $e = oe.invert(Ce), Be = oe.k * (G.shiftKey ? 0.5 : 2), Ye = n(Xe(Ne(oe, Be), Ce, $e), e.apply(this, Ae), f);
12211
- kr(G), s > 0 ? Ct(this).transition().duration(s).call(le, Ye, Ce, G) : Ct(this).call(ae.transform, Ye, Ce, G);
12260
+ var oe = this.__zoom, Ce = un(N.changedTouches ? N.changedTouches[0] : N, this), Ue = oe.invert(Ce), Be = oe.k * (N.shiftKey ? 0.5 : 2), Ye = n(Xe(Ge(oe, Be), Ce, Ue), e.apply(this, Ae), f);
12261
+ kr(N), s > 0 ? Ct(this).transition().duration(s).call(le, Ye, Ce, N) : Ct(this).call(ae.transform, Ye, Ce, N);
12212
12262
  }
12213
12263
  }
12214
- function ke(G, ...Ae) {
12264
+ function ke(N, ...Ae) {
12215
12265
  if (t.apply(this, arguments)) {
12216
- var oe = G.touches, Ce = oe.length, $e = Le(this, Ae, G.changedTouches.length === Ce).event(G), Be, Ye, rt, ut;
12217
- for (ta(G), Ye = 0; Ye < Ce; ++Ye)
12218
- rt = oe[Ye], ut = un(rt, this), ut = [ut, this.__zoom.invert(ut), rt.identifier], $e.touch0 ? !$e.touch1 && $e.touch0[2] !== ut[2] && ($e.touch1 = ut, $e.taps = 0) : ($e.touch0 = ut, Be = !0, $e.taps = 1 + !!v);
12219
- v && (v = clearTimeout(v)), Be && ($e.taps < 2 && (b = ut[0], v = setTimeout(function() {
12266
+ var oe = N.touches, Ce = oe.length, Ue = Le(this, Ae, N.changedTouches.length === Ce).event(N), Be, Ye, rt, ut;
12267
+ for (ta(N), Ye = 0; Ye < Ce; ++Ye)
12268
+ rt = oe[Ye], ut = un(rt, this), ut = [ut, this.__zoom.invert(ut), rt.identifier], Ue.touch0 ? !Ue.touch1 && Ue.touch0[2] !== ut[2] && (Ue.touch1 = ut, Ue.taps = 0) : (Ue.touch0 = ut, Be = !0, Ue.taps = 1 + !!v);
12269
+ v && (v = clearTimeout(v)), Be && (Ue.taps < 2 && (b = ut[0], v = setTimeout(function() {
12220
12270
  v = null;
12221
- }, D)), Ci(this), $e.start());
12271
+ }, D)), Ci(this), Ue.start());
12222
12272
  }
12223
12273
  }
12224
- function it(G, ...Ae) {
12274
+ function it(N, ...Ae) {
12225
12275
  if (this.__zooming) {
12226
- var oe = Le(this, Ae).event(G), Ce = G.changedTouches, $e = Ce.length, Be, Ye, rt, ut;
12227
- for (kr(G), Be = 0; Be < $e; ++Be)
12276
+ var oe = Le(this, Ae).event(N), Ce = N.changedTouches, Ue = Ce.length, Be, Ye, rt, ut;
12277
+ for (kr(N), Be = 0; Be < Ue; ++Be)
12228
12278
  Ye = Ce[Be], rt = un(Ye, this), oe.touch0 && oe.touch0[2] === Ye.identifier ? oe.touch0[0] = rt : oe.touch1 && oe.touch1[2] === Ye.identifier && (oe.touch1[0] = rt);
12229
12279
  if (Ye = oe.that.__zoom, oe.touch1) {
12230
- var Nt = oe.touch0[0], bt = oe.touch0[1], Lt = oe.touch1[0], $t = oe.touch1[1], zt = (zt = Lt[0] - Nt[0]) * zt + (zt = Lt[1] - Nt[1]) * zt, Ut = (Ut = $t[0] - bt[0]) * Ut + (Ut = $t[1] - bt[1]) * Ut;
12231
- Ye = Ne(Ye, Math.sqrt(zt / Ut)), rt = [(Nt[0] + Lt[0]) / 2, (Nt[1] + Lt[1]) / 2], ut = [(bt[0] + $t[0]) / 2, (bt[1] + $t[1]) / 2];
12280
+ var Gt = oe.touch0[0], bt = oe.touch0[1], Lt = oe.touch1[0], $t = oe.touch1[1], zt = (zt = Lt[0] - Gt[0]) * zt + (zt = Lt[1] - Gt[1]) * zt, Ut = (Ut = $t[0] - bt[0]) * Ut + (Ut = $t[1] - bt[1]) * Ut;
12281
+ Ye = Ge(Ye, Math.sqrt(zt / Ut)), rt = [(Gt[0] + Lt[0]) / 2, (Gt[1] + Lt[1]) / 2], ut = [(bt[0] + $t[0]) / 2, (bt[1] + $t[1]) / 2];
12232
12282
  } else if (oe.touch0) rt = oe.touch0[0], ut = oe.touch0[1];
12233
12283
  else return;
12234
12284
  oe.zoom("touch", n(Xe(Ye, rt, ut), oe.extent, f));
12235
12285
  }
12236
12286
  }
12237
- function tt(G, ...Ae) {
12287
+ function tt(N, ...Ae) {
12238
12288
  if (this.__zooming) {
12239
- var oe = Le(this, Ae).event(G), Ce = G.changedTouches, $e = Ce.length, Be, Ye;
12240
- for (ta(G), S && clearTimeout(S), S = setTimeout(function() {
12289
+ var oe = Le(this, Ae).event(N), Ce = N.changedTouches, Ue = Ce.length, Be, Ye;
12290
+ for (ta(N), S && clearTimeout(S), S = setTimeout(function() {
12241
12291
  S = null;
12242
- }, D), Be = 0; Be < $e; ++Be)
12292
+ }, D), Be = 0; Be < Ue; ++Be)
12243
12293
  Ye = Ce[Be], oe.touch0 && oe.touch0[2] === Ye.identifier ? delete oe.touch0 : oe.touch1 && oe.touch1[2] === Ye.identifier && delete oe.touch1;
12244
12294
  if (oe.touch1 && !oe.touch0 && (oe.touch0 = oe.touch1, delete oe.touch1), oe.touch0) oe.touch0[1] = this.__zoom.invert(oe.touch0[0]);
12245
12295
  else if (oe.end(), oe.taps === 2 && (Ye = un(Ye, this), Math.hypot(b[0] - Ye[0], b[1] - Ye[1]) < Se)) {
@@ -12248,31 +12298,31 @@ function Uy() {
12248
12298
  }
12249
12299
  }
12250
12300
  }
12251
- return ae.wheelDelta = function(G) {
12252
- return arguments.length ? (r = typeof G == "function" ? G : wi(+G), ae) : r;
12253
- }, ae.filter = function(G) {
12254
- return arguments.length ? (t = typeof G == "function" ? G : wi(!!G), ae) : t;
12255
- }, ae.touchable = function(G) {
12256
- return arguments.length ? (i = typeof G == "function" ? G : wi(!!G), ae) : i;
12257
- }, ae.extent = function(G) {
12258
- return arguments.length ? (e = typeof G == "function" ? G : wi([[+G[0][0], +G[0][1]], [+G[1][0], +G[1][1]]]), ae) : e;
12259
- }, ae.scaleExtent = function(G) {
12260
- return arguments.length ? (o[0] = +G[0], o[1] = +G[1], ae) : [o[0], o[1]];
12261
- }, ae.translateExtent = function(G) {
12262
- return arguments.length ? (f[0][0] = +G[0][0], f[1][0] = +G[1][0], f[0][1] = +G[0][1], f[1][1] = +G[1][1], ae) : [[f[0][0], f[0][1]], [f[1][0], f[1][1]]];
12263
- }, ae.constrain = function(G) {
12264
- return arguments.length ? (n = G, ae) : n;
12265
- }, ae.duration = function(G) {
12266
- return arguments.length ? (s = +G, ae) : s;
12267
- }, ae.interpolate = function(G) {
12268
- return arguments.length ? (u = G, ae) : u;
12301
+ return ae.wheelDelta = function(N) {
12302
+ return arguments.length ? (r = typeof N == "function" ? N : wi(+N), ae) : r;
12303
+ }, ae.filter = function(N) {
12304
+ return arguments.length ? (t = typeof N == "function" ? N : wi(!!N), ae) : t;
12305
+ }, ae.touchable = function(N) {
12306
+ return arguments.length ? (i = typeof N == "function" ? N : wi(!!N), ae) : i;
12307
+ }, ae.extent = function(N) {
12308
+ return arguments.length ? (e = typeof N == "function" ? N : wi([[+N[0][0], +N[0][1]], [+N[1][0], +N[1][1]]]), ae) : e;
12309
+ }, ae.scaleExtent = function(N) {
12310
+ return arguments.length ? (o[0] = +N[0], o[1] = +N[1], ae) : [o[0], o[1]];
12311
+ }, ae.translateExtent = function(N) {
12312
+ return arguments.length ? (f[0][0] = +N[0][0], f[1][0] = +N[1][0], f[0][1] = +N[0][1], f[1][1] = +N[1][1], ae) : [[f[0][0], f[0][1]], [f[1][0], f[1][1]]];
12313
+ }, ae.constrain = function(N) {
12314
+ return arguments.length ? (n = N, ae) : n;
12315
+ }, ae.duration = function(N) {
12316
+ return arguments.length ? (s = +N, ae) : s;
12317
+ }, ae.interpolate = function(N) {
12318
+ return arguments.length ? (u = N, ae) : u;
12269
12319
  }, ae.on = function() {
12270
- var G = c.on.apply(c, arguments);
12271
- return G === c ? ae : G;
12272
- }, ae.clickDistance = function(G) {
12273
- return arguments.length ? (we = (G = +G) * G, ae) : Math.sqrt(we);
12274
- }, ae.tapDistance = function(G) {
12275
- return arguments.length ? (Se = +G, ae) : Se;
12320
+ var N = c.on.apply(c, arguments);
12321
+ return N === c ? ae : N;
12322
+ }, ae.clickDistance = function(N) {
12323
+ return arguments.length ? (we = (N = +N) * N, ae) : Math.sqrt(we);
12324
+ }, ae.tapDistance = function(N) {
12325
+ return arguments.length ? (Se = +N, ae) : Se;
12276
12326
  }, ae;
12277
12327
  }
12278
12328
  class Xy {
@@ -12362,9 +12412,9 @@ function Hy(t) {
12362
12412
  user-select: none;
12363
12413
  `, e.textContent = "Sorry, your device or browser does not support the required WebGL features for this visualization", t.appendChild(e), e;
12364
12414
  }
12365
- class Wy {
12415
+ class qy {
12366
12416
  constructor(e, n) {
12367
- this.config = new Tv(), this.graph = new qv(this.config), this.requestAnimationFrameId = 0, this.isRightClickMouse = !1, this.store = new Fy(), this.zoomInstance = new Xy(this.store, this.config), this.dragInstance = new jy(this.store, this.config), this._findHoveredPointExecutionCount = 0, this._isMouseOnCanvas = !1, this._isFirstRenderAfterInit = !0, this._needsPointPositionsUpdate = !1, this._needsPointColorUpdate = !1, this._needsPointSizeUpdate = !1, this._needsLinksUpdate = !1, this._needsLinkColorUpdate = !1, this._needsLinkWidthUpdate = !1, this._needsLinkArrowUpdate = !1, this._needsPointClusterUpdate = !1, this._needsForceManyBodyUpdate = !1, this._needsForceLinkUpdate = !1, this._needsForceCenterUpdate = !1, this._isDestroyed = !1, n && this.config.init(n), this.store.div = e;
12417
+ this.config = new Tv(), this.graph = new Wv(this.config), this.requestAnimationFrameId = 0, this.isRightClickMouse = !1, this.store = new Fy(), this.zoomInstance = new Xy(this.store, this.config), this.dragInstance = new jy(this.store, this.config), this._findHoveredPointExecutionCount = 0, this._isMouseOnCanvas = !1, this._isFirstRenderAfterInit = !0, this._needsPointPositionsUpdate = !1, this._needsPointColorUpdate = !1, this._needsPointSizeUpdate = !1, this._needsLinksUpdate = !1, this._needsLinkColorUpdate = !1, this._needsLinkWidthUpdate = !1, this._needsLinkArrowUpdate = !1, this._needsPointClusterUpdate = !1, this._needsForceManyBodyUpdate = !1, this._needsForceLinkUpdate = !1, this._needsForceCenterUpdate = !1, this._isDestroyed = !1, n && this.config.init(n), this.store.div = e;
12368
12418
  const r = document.createElement("canvas");
12369
12419
  r.style.width = "100%", r.style.height = "100%", this.store.div.appendChild(r), this.addAttribution();
12370
12420
  const i = r.clientWidth, o = r.clientHeight;
@@ -12405,7 +12455,7 @@ class Wy {
12405
12455
  this.dragInstance.isActive && this.updateMousePosition(s), this.currentEvent = s;
12406
12456
  }).on("end.detect", (s) => {
12407
12457
  this.currentEvent = s, this.updateCanvasCursor();
12408
- }), this.canvasD3Selection.call(this.dragInstance.behavior).call(this.zoomInstance.behavior).on("click", this.onClick.bind(this)).on("mousemove", this.onMouseMove.bind(this)).on("contextmenu", this.onRightClickMouse.bind(this)), (!this.config.enableZoom || !this.config.enableDrag) && this.updateZoomDragBehaviors(), this.setZoomLevel(this.config.initialZoomLevel ?? 1), this.store.maxPointSize = (this.reglInstance.limits.pointSizeDims[1] ?? ga) / this.config.pixelRatio, this.points = new Bg(this.reglInstance, this.config, this.store, this.graph), this.lines = new Cg(this.reglInstance, this.config, this.store, this.graph, this.points), this.config.enableSimulation && (this.forceGravity = new Fv(this.reglInstance, this.config, this.store, this.graph, this.points), this.forceCenter = new Pv(this.reglInstance, this.config, this.store, this.graph, this.points), this.forceManyBody = this.config.useClassicQuadtree ? new Mv(this.reglInstance, this.config, this.store, this.graph, this.points) : new Rv(this.reglInstance, this.config, this.store, this.graph, this.points), this.forceLinkIncoming = new Jf(this.reglInstance, this.config, this.store, this.graph, this.points), this.forceLinkOutgoing = new Jf(this.reglInstance, this.config, this.store, this.graph, this.points), this.forceMouse = new Gv(this.reglInstance, this.config, this.store, this.graph, this.points)), this.clusters = new $v(this.reglInstance, this.config, this.store, this.graph, this.points), this.store.backgroundColor = Nn(this.config.backgroundColor), this.config.hoveredPointRingColor && this.store.setHoveredPointRingColor(this.config.hoveredPointRingColor), this.config.focusedPointRingColor && this.store.setFocusedPointRingColor(this.config.focusedPointRingColor), this.config.focusedPointIndex !== void 0 && this.store.setFocusedPoint(this.config.focusedPointIndex), this.config.pointGreyoutColor && this.store.setGreyoutPointColor(this.config.pointGreyoutColor), this.config.showFPSMonitor && (this.fpsMonitor = new tu(this.canvas)), this.config.randomSeed !== void 0 && this.store.addRandomSeed(this.config.randomSeed);
12458
+ }), this.canvasD3Selection.call(this.dragInstance.behavior).call(this.zoomInstance.behavior).on("click", this.onClick.bind(this)).on("mousemove", this.onMouseMove.bind(this)).on("contextmenu", this.onRightClickMouse.bind(this)), (!this.config.enableZoom || !this.config.enableDrag) && this.updateZoomDragBehaviors(), this.setZoomLevel(this.config.initialZoomLevel ?? 1), this.store.maxPointSize = (this.reglInstance.limits.pointSizeDims[1] ?? ga) / this.config.pixelRatio, this.points = new Bg(this.reglInstance, this.config, this.store, this.graph), this.lines = new Cg(this.reglInstance, this.config, this.store, this.graph, this.points), this.config.enableSimulation && (this.forceGravity = new Fv(this.reglInstance, this.config, this.store, this.graph, this.points), this.forceCenter = new Pv(this.reglInstance, this.config, this.store, this.graph, this.points), this.forceManyBody = this.config.useClassicQuadtree ? new Mv(this.reglInstance, this.config, this.store, this.graph, this.points) : new Rv(this.reglInstance, this.config, this.store, this.graph, this.points), this.forceLinkIncoming = new Jf(this.reglInstance, this.config, this.store, this.graph, this.points), this.forceLinkOutgoing = new Jf(this.reglInstance, this.config, this.store, this.graph, this.points), this.forceMouse = new Nv(this.reglInstance, this.config, this.store, this.graph, this.points)), this.clusters = new $v(this.reglInstance, this.config, this.store, this.graph, this.points), this.store.backgroundColor = Gn(this.config.backgroundColor), this.config.hoveredPointRingColor && this.store.setHoveredPointRingColor(this.config.hoveredPointRingColor), this.config.focusedPointRingColor && this.store.setFocusedPointRingColor(this.config.focusedPointRingColor), this.config.focusedPointIndex !== void 0 && this.store.setFocusedPoint(this.config.focusedPointIndex), this.config.pointGreyoutColor && this.store.setGreyoutPointColor(this.config.pointGreyoutColor), this.config.showFPSMonitor && (this.fpsMonitor = new tu(this.canvas)), this.config.randomSeed !== void 0 && this.store.addRandomSeed(this.config.randomSeed);
12409
12459
  }
12410
12460
  /**
12411
12461
  * Returns the current simulation progress
@@ -12434,7 +12484,7 @@ class Wy {
12434
12484
  var r;
12435
12485
  if (this._isDestroyed || !this.reglInstance || !this.points || !this.lines || !this.clusters) return;
12436
12486
  const n = { ...this.config };
12437
- this.config.init(e), n.pointColor !== this.config.pointColor && (this.graph.updatePointColor(), this.points.updateColor()), n.pointSize !== this.config.pointSize && (this.graph.updatePointSize(), this.points.updateSize()), n.linkColor !== this.config.linkColor && (this.graph.updateLinkColor(), this.lines.updateColor()), n.linkWidth !== this.config.linkWidth && (this.graph.updateLinkWidth(), this.lines.updateWidth()), n.linkArrows !== this.config.linkArrows && (this.graph.updateArrows(), this.lines.updateArrow()), (n.curvedLinkSegments !== this.config.curvedLinkSegments || n.curvedLinks !== this.config.curvedLinks) && this.lines.updateCurveLineGeometry(), n.backgroundColor !== this.config.backgroundColor && (this.store.backgroundColor = Nn(this.config.backgroundColor)), n.hoveredPointRingColor !== this.config.hoveredPointRingColor && this.store.setHoveredPointRingColor(this.config.hoveredPointRingColor), n.focusedPointRingColor !== this.config.focusedPointRingColor && this.store.setFocusedPointRingColor(this.config.focusedPointRingColor), n.pointGreyoutColor !== this.config.pointGreyoutColor && this.store.setGreyoutPointColor(this.config.pointGreyoutColor), n.focusedPointIndex !== this.config.focusedPointIndex && this.store.setFocusedPoint(this.config.focusedPointIndex), (n.spaceSize !== this.config.spaceSize || n.simulationRepulsionQuadtreeLevels !== this.config.simulationRepulsionQuadtreeLevels) && (this.store.adjustSpaceSize(this.config.spaceSize, this.reglInstance.limits.maxTextureSize), this.resizeCanvas(!0), this.update(this.store.isSimulationRunning ? this.store.alpha : 0)), n.showFPSMonitor !== this.config.showFPSMonitor && (this.config.showFPSMonitor ? this.fpsMonitor = new tu(this.canvas) : ((r = this.fpsMonitor) == null || r.destroy(), this.fpsMonitor = void 0)), n.pixelRatio !== this.config.pixelRatio && (this.store.maxPointSize = (this.reglInstance.limits.pointSizeDims[1] ?? ga) / this.config.pixelRatio), (n.enableZoom !== this.config.enableZoom || n.enableDrag !== this.config.enableDrag) && this.updateZoomDragBehaviors();
12487
+ this.config.init(e), n.pointColor !== this.config.pointColor && (this.graph.updatePointColor(), this.points.updateColor()), n.pointSize !== this.config.pointSize && (this.graph.updatePointSize(), this.points.updateSize()), n.linkColor !== this.config.linkColor && (this.graph.updateLinkColor(), this.lines.updateColor()), n.linkWidth !== this.config.linkWidth && (this.graph.updateLinkWidth(), this.lines.updateWidth()), n.linkArrows !== this.config.linkArrows && (this.graph.updateArrows(), this.lines.updateArrow()), (n.curvedLinkSegments !== this.config.curvedLinkSegments || n.curvedLinks !== this.config.curvedLinks) && this.lines.updateCurveLineGeometry(), n.backgroundColor !== this.config.backgroundColor && (this.store.backgroundColor = Gn(this.config.backgroundColor)), n.hoveredPointRingColor !== this.config.hoveredPointRingColor && this.store.setHoveredPointRingColor(this.config.hoveredPointRingColor), n.focusedPointRingColor !== this.config.focusedPointRingColor && this.store.setFocusedPointRingColor(this.config.focusedPointRingColor), n.pointGreyoutColor !== this.config.pointGreyoutColor && this.store.setGreyoutPointColor(this.config.pointGreyoutColor), n.focusedPointIndex !== this.config.focusedPointIndex && this.store.setFocusedPoint(this.config.focusedPointIndex), (n.spaceSize !== this.config.spaceSize || n.simulationRepulsionQuadtreeLevels !== this.config.simulationRepulsionQuadtreeLevels) && (this.store.adjustSpaceSize(this.config.spaceSize, this.reglInstance.limits.maxTextureSize), this.resizeCanvas(!0), this.update(this.store.isSimulationRunning ? this.store.alpha : 0)), n.showFPSMonitor !== this.config.showFPSMonitor && (this.config.showFPSMonitor ? this.fpsMonitor = new tu(this.canvas) : ((r = this.fpsMonitor) == null || r.destroy(), this.fpsMonitor = void 0)), n.pixelRatio !== this.config.pixelRatio && (this.store.maxPointSize = (this.reglInstance.limits.pointSizeDims[1] ?? ga) / this.config.pixelRatio), (n.enableZoom !== this.config.enableZoom || n.enableDrag !== this.config.enableDrag) && this.updateZoomDragBehaviors();
12438
12488
  }
12439
12489
  /**
12440
12490
  * Sets the positions for the graph points.
@@ -12864,12 +12914,12 @@ class Wy {
12864
12914
  * Destroy this Cosmos instance.
12865
12915
  */
12866
12916
  destroy() {
12867
- var e, n;
12868
- this._isDestroyed || !this.reglInstance || (window.clearTimeout(this._fitViewOnInitTimeoutID), this.stopFrames(), this.reglInstance.destroy(), this.reglInstance.clear({
12917
+ var e, n, r, i;
12918
+ this._isDestroyed || !this.reglInstance || (window.clearTimeout(this._fitViewOnInitTimeoutID), this.stopFrames(), this.canvasD3Selection && this.canvasD3Selection.on("mouseenter.cosmos", null).on("mousemove.cosmos", null).on("mouseleave.cosmos", null).on("click", null).on("mousemove", null).on("contextmenu", null).on(".drag", null).on(".zoom", null), Ct(document).on("keydown.cosmos", null).on("keyup.cosmos", null), (e = this.zoomInstance) != null && e.behavior && this.zoomInstance.behavior.on("start.detect", null).on("zoom.detect", null).on("end.detect", null), (n = this.dragInstance) != null && n.behavior && this.dragInstance.behavior.on("start.detect", null).on("drag.detect", null).on("end.detect", null), (r = this.fpsMonitor) == null || r.destroy(), this.reglInstance.destroy(), this.reglInstance.clear({
12869
12919
  color: this.store.backgroundColor,
12870
12920
  depth: 1,
12871
12921
  stencil: 0
12872
- }), Ct(this.canvas).style("cursor", null), (e = this.fpsMonitor) == null || e.destroy(), (n = document.getElementById("gl-bench-style")) == null || n.remove(), this._isDestroyed = !0);
12922
+ }), this.canvas && this.canvas.parentNode && this.canvas.parentNode.removeChild(this.canvas), this.attributionDivElement && this.attributionDivElement.parentNode && this.attributionDivElement.parentNode.removeChild(this.attributionDivElement), (i = document.getElementById("gl-bench-style")) == null || i.remove(), this.canvasD3Selection = void 0, this.reglInstance = void 0, this.attributionDivElement = void 0, this._isDestroyed = !0);
12873
12923
  }
12874
12924
  /**
12875
12925
  * Updates and recreates the graph visualization based on pending changes.
@@ -12908,8 +12958,8 @@ class Wy {
12908
12958
  frame() {
12909
12959
  const { config: { simulationGravity: e, simulationCenter: n, renderLinks: r, enableSimulation: i }, store: { alpha: o, isSimulationRunning: f } } = this;
12910
12960
  o < va && f && this.end(), this.store.pointsTextureSize && (this.requestAnimationFrameId = window.requestAnimationFrame((s) => {
12911
- var u, c, v, b, S, D, Z, we, Se, ae, Ne, Xe, q, le, Le, Me, je, et, nt, ke, it, tt, G, Ae, oe, Ce;
12912
- (u = this.fpsMonitor) == null || u.begin(), this.resizeCanvas(), this.dragInstance.isActive || this.findHoveredPoint(), i && (this.isRightClickMouse && (f || this.start(0.1), (c = this.forceMouse) == null || c.run(), (v = this.points) == null || v.updatePosition()), f && !(this.zoomInstance.isRunning && !this.config.enableSimulationDuringZoom) && (e && ((b = this.forceGravity) == null || b.run(), (S = this.points) == null || S.updatePosition()), n && ((D = this.forceCenter) == null || D.run(), (Z = this.points) == null || Z.updatePosition()), (we = this.forceManyBody) == null || we.run(), (Se = this.points) == null || Se.updatePosition(), this.store.linksTextureSize && ((ae = this.forceLinkIncoming) == null || ae.run(), (Ne = this.points) == null || Ne.updatePosition(), (Xe = this.forceLinkOutgoing) == null || Xe.run(), (q = this.points) == null || q.updatePosition()), (this.graph.pointClusters || this.graph.clusterPositions) && ((le = this.clusters) == null || le.run(), (Le = this.points) == null || Le.updatePosition()), this.store.alpha += this.store.addAlpha(this.config.simulationDecay ?? Ue.simulation.decay), this.isRightClickMouse && (this.store.alpha = Math.max(this.store.alpha, 0.1)), this.store.simulationProgress = Math.sqrt(Math.min(1, va / this.store.alpha)), (nt = (et = this.config).onSimulationTick) == null || nt.call(
12961
+ var u, c, v, b, S, D, Z, we, Se, ae, Ge, Xe, W, le, Le, Me, je, et, nt, ke, it, tt, N, Ae, oe, Ce;
12962
+ (u = this.fpsMonitor) == null || u.begin(), this.resizeCanvas(), this.dragInstance.isActive || this.findHoveredPoint(), i && (this.isRightClickMouse && this.config.enableRightClickRepulsion && ((c = this.forceMouse) == null || c.run(), (v = this.points) == null || v.updatePosition()), f && !(this.zoomInstance.isRunning && !this.config.enableSimulationDuringZoom) && (e && ((b = this.forceGravity) == null || b.run(), (S = this.points) == null || S.updatePosition()), n && ((D = this.forceCenter) == null || D.run(), (Z = this.points) == null || Z.updatePosition()), (we = this.forceManyBody) == null || we.run(), (Se = this.points) == null || Se.updatePosition(), this.store.linksTextureSize && ((ae = this.forceLinkIncoming) == null || ae.run(), (Ge = this.points) == null || Ge.updatePosition(), (Xe = this.forceLinkOutgoing) == null || Xe.run(), (W = this.points) == null || W.updatePosition()), (this.graph.pointClusters || this.graph.clusterPositions) && ((le = this.clusters) == null || le.run(), (Le = this.points) == null || Le.updatePosition()), this.store.alpha += this.store.addAlpha(this.config.simulationDecay ?? Ve.simulation.decay), this.isRightClickMouse && this.config.enableRightClickRepulsion && (this.store.alpha = Math.max(this.store.alpha, 0.1)), this.store.simulationProgress = Math.sqrt(Math.min(1, va / this.store.alpha)), (nt = (et = this.config).onSimulationTick) == null || nt.call(
12913
12963
  et,
12914
12964
  this.store.alpha,
12915
12965
  (Me = this.store.hoveredPoint) == null ? void 0 : Me.index,
@@ -12918,7 +12968,7 @@ class Wy {
12918
12968
  color: this.store.backgroundColor,
12919
12969
  depth: 1,
12920
12970
  stencil: 0
12921
- }), r && this.store.linksTextureSize && ((tt = this.lines) == null || tt.draw()), (G = this.points) == null || G.draw(), this.dragInstance.isActive && ((Ae = this.points) == null || Ae.drag(), (oe = this.points) == null || oe.drag()), (Ce = this.fpsMonitor) == null || Ce.end(s), this.currentEvent = void 0, this.frame();
12971
+ }), r && this.store.linksTextureSize && ((tt = this.lines) == null || tt.draw()), (N = this.points) == null || N.draw(), this.dragInstance.isActive && ((Ae = this.points) == null || Ae.drag(), (oe = this.points) == null || oe.drag()), (Ce = this.fpsMonitor) == null || Ce.end(s), this.currentEvent = void 0, this.frame();
12922
12972
  }));
12923
12973
  }
12924
12974
  stopFrames() {
@@ -13018,11 +13068,11 @@ class Wy {
13018
13068
  }
13019
13069
  }
13020
13070
  export {
13021
- Wy as Graph,
13071
+ qy as Graph,
13022
13072
  wv as clamp,
13023
- Nn as getRgbaColor,
13073
+ Gn as getRgbaColor,
13024
13074
  _v as isAClassInstance,
13025
- qu as isArray,
13075
+ Wu as isArray,
13026
13076
  xv as isFunction,
13027
13077
  en as isNumber,
13028
13078
  bv as isObject,