vis-core 0.18.7 → 0.18.9

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.
@@ -55,12 +55,12 @@ import Qi from "crypto-js";
55
55
  import { makePromiseCreator as R2, WorkerPool as Df, generateUUID as Wb, Timer as Of } from "esus-lite";
56
56
  import { throttle as tp } from "lodash-es";
57
57
  import { EventEmitter as vX } from "events";
58
- import Vb from "geojson-cn/json-lite/100000.json";
58
+ import Vb from "geojson-cn/extra/100000-lite-next.json";
59
59
  import ep from "geojson-cn/extra/countriesExclATA-next.json";
60
60
  import { centroid as _f, booleanPointInPolygon as x2, point as TX, polygon as Lc, union as qf, center as $f, flatten as gb, explode as tR, inside as eR, intersect as nR, booleanContains as S2, lineString as MX, booleanCrosses as iR } from "@turf/turf";
61
61
  import fb from "geojson-cn/extra/continents.json";
62
62
  import { adcodeMap as vn, findLevelJsonItem as sR, allArr as lR } from "geojson-cn";
63
- import FX from "geojson-cn/json/100000.json";
63
+ import FX from "geojson-cn/extra/100000-next.json";
64
64
  import np from "geojson-cn/extra/countries-next.json";
65
65
  const aR = "LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUlJQklqQU5CZ2txaGtpRzl3MEJBUUVGQUFPQ0FROEFNSUlCQ2dLQ0FRRUEyTG1aVVQzVG9LZEVRRUdrdUU1QQo3dnlYTzRMM1Z6NDA5RFF2a2xzRHZ2SytNM2M2OGl4ZEVhZDZFcnZGS2FKQ1QrNTZNdU1XSXhUTnlDZDVQSkFGCjVYdzI4cW1iVkVCR3FGdXVIZTltSm5GUmRXN1NpK1Z1cTZvRWxwQkRkeEFIQ0dsWVVpU1R3WmhBbjJaVXJLSUYKd1J2c1k1bi9uWWNhZnl5QW9tRjhmNVRsTkpwS1JtbDU3WlRSWjBMdzdQRDFSeHFIbmJ0YWFETkpiSDV5eFd6cQpaVTBwQWhxMFNkNHdlOW1DUTJWWXc5czhtUERLbW4rU083eGovSUsrR1ZEaEJNOUpaZ3VIcGFZUGt3bWd5UkdwCkx6V0tHMkZULzJRalZUT1dRT09mRFVtVitDSVlsN1hVVlh1Q0toYWFNQ0ZVa1JQOHg4aEZucmNFeklHQ1JpM3IKK3dJREFRQUIKLS0tLS1FTkQgUFVCTElDIEtFWS0tLS0t", HX = {
66
66
  token: void 0,
@@ -532,8 +532,8 @@ class de {
532
532
  return this.multiplyMatrices(t, this);
533
533
  }
534
534
  multiplyMatrices(t, e) {
535
- const n = t.elements, s = e.elements, l = this.elements, a = n[0], o = n[3], c = n[6], d = n[1], r = n[4], h = n[7], u = n[2], m = n[5], b = n[8], G = s[0], Z = s[3], p = s[6], X = s[1], y = s[4], W = s[7], f = s[2], g = s[5], L = s[8];
536
- return l[0] = a * G + o * X + c * f, l[3] = a * Z + o * y + c * g, l[6] = a * p + o * W + c * L, l[1] = d * G + r * X + h * f, l[4] = d * Z + r * y + h * g, l[7] = d * p + r * W + h * L, l[2] = u * G + m * X + b * f, l[5] = u * Z + m * y + b * g, l[8] = u * p + m * W + b * L, this;
535
+ const n = t.elements, s = e.elements, l = this.elements, a = n[0], o = n[3], c = n[6], d = n[1], r = n[4], h = n[7], u = n[2], m = n[5], b = n[8], G = s[0], Z = s[3], p = s[6], X = s[1], y = s[4], W = s[7], g = s[2], f = s[5], L = s[8];
536
+ return l[0] = a * G + o * X + c * g, l[3] = a * Z + o * y + c * f, l[6] = a * p + o * W + c * L, l[1] = d * G + r * X + h * g, l[4] = d * Z + r * y + h * f, l[7] = d * p + r * W + h * L, l[2] = u * G + m * X + b * g, l[5] = u * Z + m * y + b * f, l[8] = u * p + m * W + b * L, this;
537
537
  }
538
538
  multiplyScalar(t) {
539
539
  const e = this.elements;
@@ -1074,8 +1074,8 @@ class fe {
1074
1074
  if (Math.abs(r + u) < 0.1 && Math.abs(h + G) < 0.1 && Math.abs(b + Z) < 0.1 && Math.abs(d + m + p - 3) < 0.1)
1075
1075
  return this.set(1, 0, 0, 0), this;
1076
1076
  e = Math.PI;
1077
- const y = (d + 1) / 2, W = (m + 1) / 2, f = (p + 1) / 2, g = (r + u) / 4, L = (h + G) / 4, I = (b + Z) / 4;
1078
- return y > W && y > f ? y < 0.01 ? (n = 0, s = 0.707106781, l = 0.707106781) : (n = Math.sqrt(y), s = g / n, l = L / n) : W > f ? W < 0.01 ? (n = 0.707106781, s = 0, l = 0.707106781) : (s = Math.sqrt(W), n = g / s, l = I / s) : f < 0.01 ? (n = 0.707106781, s = 0.707106781, l = 0) : (l = Math.sqrt(f), n = L / l, s = I / l), this.set(n, s, l, e), this;
1077
+ const y = (d + 1) / 2, W = (m + 1) / 2, g = (p + 1) / 2, f = (r + u) / 4, L = (h + G) / 4, I = (b + Z) / 4;
1078
+ return y > W && y > g ? y < 0.01 ? (n = 0, s = 0.707106781, l = 0.707106781) : (n = Math.sqrt(y), s = f / n, l = L / n) : W > g ? W < 0.01 ? (n = 0.707106781, s = 0, l = 0.707106781) : (s = Math.sqrt(W), n = f / s, l = I / s) : g < 0.01 ? (n = 0.707106781, s = 0.707106781, l = 0) : (l = Math.sqrt(g), n = L / l, s = I / l), this.set(n, s, l, e), this;
1079
1079
  }
1080
1080
  let X = Math.sqrt((Z - b) * (Z - b) + (h - G) * (h - G) + (u - r) * (u - r));
1081
1081
  return Math.abs(X) < 1e-3 && (X = 1), this.x = (Z - b) / X, this.y = (h - G) / X, this.z = (u - r) / X, this.w = Math.acos((d + m + p - 1) / 2), this;
@@ -1260,13 +1260,13 @@ class Qe {
1260
1260
  let Z = 1 - o;
1261
1261
  const p = c * u + d * m + r * b + h * G, X = p >= 0 ? 1 : -1, y = 1 - p * p;
1262
1262
  if (y > Number.EPSILON) {
1263
- const f = Math.sqrt(y), g = Math.atan2(f, p * X);
1264
- Z = Math.sin(Z * g) / f, o = Math.sin(o * g) / f;
1263
+ const g = Math.sqrt(y), f = Math.atan2(g, p * X);
1264
+ Z = Math.sin(Z * f) / g, o = Math.sin(o * f) / g;
1265
1265
  }
1266
1266
  const W = o * X;
1267
1267
  if (c = c * Z + u * W, d = d * Z + m * W, r = r * Z + b * W, h = h * Z + G * W, Z === 1 - o) {
1268
- const f = 1 / Math.sqrt(c * c + d * d + r * r + h * h);
1269
- c *= f, d *= f, r *= f, h *= f;
1268
+ const g = 1 / Math.sqrt(c * c + d * d + r * r + h * h);
1269
+ c *= g, d *= g, r *= g, h *= g;
1270
1270
  }
1271
1271
  }
1272
1272
  t[e] = c, t[e + 1] = d, t[e + 2] = r, t[e + 3] = h;
@@ -2227,8 +2227,8 @@ class Pt {
2227
2227
  return this.multiplyMatrices(t, this);
2228
2228
  }
2229
2229
  multiplyMatrices(t, e) {
2230
- const n = t.elements, s = e.elements, l = this.elements, a = n[0], o = n[4], c = n[8], d = n[12], r = n[1], h = n[5], u = n[9], m = n[13], b = n[2], G = n[6], Z = n[10], p = n[14], X = n[3], y = n[7], W = n[11], f = n[15], g = s[0], L = s[4], I = s[8], S = s[12], R = s[1], v = s[5], k = s[9], w = s[13], K = s[2], H = s[6], z = s[10], E = s[14], Q = s[3], et = s[7], yt = s[11], Vt = s[15];
2231
- return l[0] = a * g + o * R + c * K + d * Q, l[4] = a * L + o * v + c * H + d * et, l[8] = a * I + o * k + c * z + d * yt, l[12] = a * S + o * w + c * E + d * Vt, l[1] = r * g + h * R + u * K + m * Q, l[5] = r * L + h * v + u * H + m * et, l[9] = r * I + h * k + u * z + m * yt, l[13] = r * S + h * w + u * E + m * Vt, l[2] = b * g + G * R + Z * K + p * Q, l[6] = b * L + G * v + Z * H + p * et, l[10] = b * I + G * k + Z * z + p * yt, l[14] = b * S + G * w + Z * E + p * Vt, l[3] = X * g + y * R + W * K + f * Q, l[7] = X * L + y * v + W * H + f * et, l[11] = X * I + y * k + W * z + f * yt, l[15] = X * S + y * w + W * E + f * Vt, this;
2230
+ const n = t.elements, s = e.elements, l = this.elements, a = n[0], o = n[4], c = n[8], d = n[12], r = n[1], h = n[5], u = n[9], m = n[13], b = n[2], G = n[6], Z = n[10], p = n[14], X = n[3], y = n[7], W = n[11], g = n[15], f = s[0], L = s[4], I = s[8], S = s[12], R = s[1], v = s[5], k = s[9], w = s[13], K = s[2], H = s[6], z = s[10], E = s[14], Q = s[3], et = s[7], yt = s[11], Vt = s[15];
2231
+ return l[0] = a * f + o * R + c * K + d * Q, l[4] = a * L + o * v + c * H + d * et, l[8] = a * I + o * k + c * z + d * yt, l[12] = a * S + o * w + c * E + d * Vt, l[1] = r * f + h * R + u * K + m * Q, l[5] = r * L + h * v + u * H + m * et, l[9] = r * I + h * k + u * z + m * yt, l[13] = r * S + h * w + u * E + m * Vt, l[2] = b * f + G * R + Z * K + p * Q, l[6] = b * L + G * v + Z * H + p * et, l[10] = b * I + G * k + Z * z + p * yt, l[14] = b * S + G * w + Z * E + p * Vt, l[3] = X * f + y * R + W * K + g * Q, l[7] = X * L + y * v + W * H + g * et, l[11] = X * I + y * k + W * z + g * yt, l[15] = X * S + y * w + W * E + g * Vt, this;
2232
2232
  }
2233
2233
  multiplyScalar(t) {
2234
2234
  const e = this.elements;
@@ -2248,10 +2248,10 @@ class Pt {
2248
2248
  return t.isVector3 ? (s[12] = t.x, s[13] = t.y, s[14] = t.z) : (s[12] = t, s[13] = e, s[14] = n), this;
2249
2249
  }
2250
2250
  invert() {
2251
- const t = this.elements, e = t[0], n = t[1], s = t[2], l = t[3], a = t[4], o = t[5], c = t[6], d = t[7], r = t[8], h = t[9], u = t[10], m = t[11], b = t[12], G = t[13], Z = t[14], p = t[15], X = h * Z * d - G * u * d + G * c * m - o * Z * m - h * c * p + o * u * p, y = b * u * d - r * Z * d - b * c * m + a * Z * m + r * c * p - a * u * p, W = r * G * d - b * h * d + b * o * m - a * G * m - r * o * p + a * h * p, f = b * h * c - r * G * c - b * o * u + a * G * u + r * o * Z - a * h * Z, g = e * X + n * y + s * W + l * f;
2252
- if (g === 0) return this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
2253
- const L = 1 / g;
2254
- return t[0] = X * L, t[1] = (G * u * l - h * Z * l - G * s * m + n * Z * m + h * s * p - n * u * p) * L, t[2] = (o * Z * l - G * c * l + G * s * d - n * Z * d - o * s * p + n * c * p) * L, t[3] = (h * c * l - o * u * l - h * s * d + n * u * d + o * s * m - n * c * m) * L, t[4] = y * L, t[5] = (r * Z * l - b * u * l + b * s * m - e * Z * m - r * s * p + e * u * p) * L, t[6] = (b * c * l - a * Z * l - b * s * d + e * Z * d + a * s * p - e * c * p) * L, t[7] = (a * u * l - r * c * l + r * s * d - e * u * d - a * s * m + e * c * m) * L, t[8] = W * L, t[9] = (b * h * l - r * G * l - b * n * m + e * G * m + r * n * p - e * h * p) * L, t[10] = (a * G * l - b * o * l + b * n * d - e * G * d - a * n * p + e * o * p) * L, t[11] = (r * o * l - a * h * l - r * n * d + e * h * d + a * n * m - e * o * m) * L, t[12] = f * L, t[13] = (r * G * s - b * h * s + b * n * u - e * G * u - r * n * Z + e * h * Z) * L, t[14] = (b * o * s - a * G * s - b * n * c + e * G * c + a * n * Z - e * o * Z) * L, t[15] = (a * h * s - r * o * s + r * n * c - e * h * c - a * n * u + e * o * u) * L, this;
2251
+ const t = this.elements, e = t[0], n = t[1], s = t[2], l = t[3], a = t[4], o = t[5], c = t[6], d = t[7], r = t[8], h = t[9], u = t[10], m = t[11], b = t[12], G = t[13], Z = t[14], p = t[15], X = h * Z * d - G * u * d + G * c * m - o * Z * m - h * c * p + o * u * p, y = b * u * d - r * Z * d - b * c * m + a * Z * m + r * c * p - a * u * p, W = r * G * d - b * h * d + b * o * m - a * G * m - r * o * p + a * h * p, g = b * h * c - r * G * c - b * o * u + a * G * u + r * o * Z - a * h * Z, f = e * X + n * y + s * W + l * g;
2252
+ if (f === 0) return this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
2253
+ const L = 1 / f;
2254
+ return t[0] = X * L, t[1] = (G * u * l - h * Z * l - G * s * m + n * Z * m + h * s * p - n * u * p) * L, t[2] = (o * Z * l - G * c * l + G * s * d - n * Z * d - o * s * p + n * c * p) * L, t[3] = (h * c * l - o * u * l - h * s * d + n * u * d + o * s * m - n * c * m) * L, t[4] = y * L, t[5] = (r * Z * l - b * u * l + b * s * m - e * Z * m - r * s * p + e * u * p) * L, t[6] = (b * c * l - a * Z * l - b * s * d + e * Z * d + a * s * p - e * c * p) * L, t[7] = (a * u * l - r * c * l + r * s * d - e * u * d - a * s * m + e * c * m) * L, t[8] = W * L, t[9] = (b * h * l - r * G * l - b * n * m + e * G * m + r * n * p - e * h * p) * L, t[10] = (a * G * l - b * o * l + b * n * d - e * G * d - a * n * p + e * o * p) * L, t[11] = (r * o * l - a * h * l - r * n * d + e * h * d + a * n * m - e * o * m) * L, t[12] = g * L, t[13] = (r * G * s - b * h * s + b * n * u - e * G * u - r * n * Z + e * h * Z) * L, t[14] = (b * o * s - a * G * s - b * n * c + e * G * c + a * n * Z - e * o * Z) * L, t[15] = (a * h * s - r * o * s + r * n * c - e * h * c - a * n * u + e * o * u) * L, this;
2255
2255
  }
2256
2256
  scale(t) {
2257
2257
  const e = this.elements, n = t.x, s = t.y, l = t.z;
@@ -2423,8 +2423,8 @@ class Pt {
2423
2423
  ), this;
2424
2424
  }
2425
2425
  compose(t, e, n) {
2426
- const s = this.elements, l = e._x, a = e._y, o = e._z, c = e._w, d = l + l, r = a + a, h = o + o, u = l * d, m = l * r, b = l * h, G = a * r, Z = a * h, p = o * h, X = c * d, y = c * r, W = c * h, f = n.x, g = n.y, L = n.z;
2427
- return s[0] = (1 - (G + p)) * f, s[1] = (m + W) * f, s[2] = (b - y) * f, s[3] = 0, s[4] = (m - W) * g, s[5] = (1 - (u + p)) * g, s[6] = (Z + X) * g, s[7] = 0, s[8] = (b + y) * L, s[9] = (Z - X) * L, s[10] = (1 - (u + G)) * L, s[11] = 0, s[12] = t.x, s[13] = t.y, s[14] = t.z, s[15] = 1, this;
2426
+ const s = this.elements, l = e._x, a = e._y, o = e._z, c = e._w, d = l + l, r = a + a, h = o + o, u = l * d, m = l * r, b = l * h, G = a * r, Z = a * h, p = o * h, X = c * d, y = c * r, W = c * h, g = n.x, f = n.y, L = n.z;
2427
+ return s[0] = (1 - (G + p)) * g, s[1] = (m + W) * g, s[2] = (b - y) * g, s[3] = 0, s[4] = (m - W) * f, s[5] = (1 - (u + p)) * f, s[6] = (Z + X) * f, s[7] = 0, s[8] = (b + y) * L, s[9] = (Z - X) * L, s[10] = (1 - (u + G)) * L, s[11] = 0, s[12] = t.x, s[13] = t.y, s[14] = t.z, s[15] = 1, this;
2428
2428
  }
2429
2429
  decompose(t, e, n) {
2430
2430
  const s = this.elements;
@@ -3860,11 +3860,11 @@ class Ot extends Fn {
3860
3860
  t.getX(w + 2)
3861
3861
  );
3862
3862
  }
3863
- const y = new N(), W = new N(), f = new N(), g = new N();
3863
+ const y = new N(), W = new N(), g = new N(), f = new N();
3864
3864
  function L(I) {
3865
- f.fromBufferAttribute(s, I), g.copy(f);
3865
+ g.fromBufferAttribute(s, I), f.copy(g);
3866
3866
  const S = o[I];
3867
- y.copy(S), y.sub(f.multiplyScalar(f.dot(S))).normalize(), W.crossVectors(g, S);
3867
+ y.copy(S), y.sub(g.multiplyScalar(g.dot(S))).normalize(), W.crossVectors(f, S);
3868
3868
  const v = W.dot(c[I]) < 0 ? -1 : 1;
3869
3869
  a.setXYZW(I, y.x, y.y, y.z, v);
3870
3870
  }
@@ -4061,9 +4061,9 @@ class Gt extends be {
4061
4061
  if (Array.isArray(a))
4062
4062
  for (let b = 0, G = u.length; b < G; b++) {
4063
4063
  const Z = u[b], p = a[Z.materialIndex], X = Math.max(Z.start, m.start), y = Math.min(o.count, Math.min(Z.start + Z.count, m.start + m.count));
4064
- for (let W = X, f = y; W < f; W += 3) {
4065
- const g = o.getX(W), L = o.getX(W + 1), I = o.getX(W + 2);
4066
- s = Nd(this, p, t, n, d, r, h, g, L, I), s && (s.faceIndex = Math.floor(W / 3), s.face.materialIndex = Z.materialIndex, e.push(s));
4064
+ for (let W = X, g = y; W < g; W += 3) {
4065
+ const f = o.getX(W), L = o.getX(W + 1), I = o.getX(W + 2);
4066
+ s = Nd(this, p, t, n, d, r, h, f, L, I), s && (s.faceIndex = Math.floor(W / 3), s.face.materialIndex = Z.materialIndex, e.push(s));
4067
4067
  }
4068
4068
  }
4069
4069
  else {
@@ -4077,9 +4077,9 @@ class Gt extends be {
4077
4077
  if (Array.isArray(a))
4078
4078
  for (let b = 0, G = u.length; b < G; b++) {
4079
4079
  const Z = u[b], p = a[Z.materialIndex], X = Math.max(Z.start, m.start), y = Math.min(c.count, Math.min(Z.start + Z.count, m.start + m.count));
4080
- for (let W = X, f = y; W < f; W += 3) {
4081
- const g = W, L = W + 1, I = W + 2;
4082
- s = Nd(this, p, t, n, d, r, h, g, L, I), s && (s.faceIndex = Math.floor(W / 3), s.face.materialIndex = Z.materialIndex, e.push(s));
4080
+ for (let W = X, g = y; W < g; W += 3) {
4081
+ const f = W, L = W + 1, I = W + 2;
4082
+ s = Nd(this, p, t, n, d, r, h, f, L, I), s && (s.faceIndex = Math.floor(W / 3), s.face.materialIndex = Z.materialIndex, e.push(s));
4083
4083
  }
4084
4084
  }
4085
4085
  else {
@@ -4133,15 +4133,15 @@ class a0 extends Ot {
4133
4133
  const c = [], d = [], r = [], h = [];
4134
4134
  let u = 0, m = 0;
4135
4135
  b("z", "y", "x", -1, -1, n, e, t, a, l, 0), b("z", "y", "x", 1, -1, n, e, -t, a, l, 1), b("x", "z", "y", 1, 1, t, n, e, s, a, 2), b("x", "z", "y", 1, -1, t, n, -e, s, a, 3), b("x", "y", "z", 1, -1, t, e, n, s, l, 4), b("x", "y", "z", -1, -1, t, e, -n, s, l, 5), this.setIndex(c), this.setAttribute("position", new Bt(d, 3)), this.setAttribute("normal", new Bt(r, 3)), this.setAttribute("uv", new Bt(h, 2));
4136
- function b(G, Z, p, X, y, W, f, g, L, I, S) {
4137
- const R = W / L, v = f / I, k = W / 2, w = f / 2, K = g / 2, H = L + 1, z = I + 1;
4136
+ function b(G, Z, p, X, y, W, g, f, L, I, S) {
4137
+ const R = W / L, v = g / I, k = W / 2, w = g / 2, K = f / 2, H = L + 1, z = I + 1;
4138
4138
  let E = 0, Q = 0;
4139
4139
  const et = new N();
4140
4140
  for (let yt = 0; yt < z; yt++) {
4141
4141
  const Vt = yt * v - w;
4142
4142
  for (let Ut = 0; Ut < H; Ut++) {
4143
4143
  const jt = Ut * R - k;
4144
- et[G] = jt * X, et[Z] = Vt * y, et[p] = K, d.push(et.x, et.y, et.z), et[G] = 0, et[Z] = 0, et[p] = g > 0 ? 1 : -1, r.push(et.x, et.y, et.z), h.push(Ut / L), h.push(1 - yt / I), E += 1;
4144
+ et[G] = jt * X, et[Z] = Vt * y, et[p] = K, d.push(et.x, et.y, et.z), et[G] = 0, et[Z] = 0, et[p] = f > 0 ? 1 : -1, r.push(et.x, et.y, et.z), h.push(Ut / L), h.push(1 - yt / I), E += 1;
4145
4145
  }
4146
4146
  }
4147
4147
  for (let yt = 0; yt < I; yt++)
@@ -4772,8 +4772,8 @@ class Sn extends Ot {
4772
4772
  }
4773
4773
  for (let p = 0; p < c; p++)
4774
4774
  for (let X = 0; X < o; X++) {
4775
- const y = X + d * p, W = X + d * (p + 1), f = X + 1 + d * (p + 1), g = X + 1 + d * p;
4776
- m.push(y, W, g), m.push(W, f, g);
4775
+ const y = X + d * p, W = X + d * (p + 1), g = X + 1 + d * (p + 1), f = X + 1 + d * p;
4776
+ m.push(y, W, f), m.push(W, g, f);
4777
4777
  }
4778
4778
  this.setIndex(m), this.setAttribute("position", new Bt(b, 3)), this.setAttribute("normal", new Bt(G, 3)), this.setAttribute("uv", new Bt(Z, 2));
4779
4779
  }
@@ -8900,8 +8900,8 @@ function rL(i, t, e, n, s, l, a) {
8900
8900
  let y = !1;
8901
8901
  const W = b(X);
8902
8902
  W === null ? p(o, c) : W && W.isColor && (p(W, 1), y = !0);
8903
- const f = i.xr.getEnvironmentBlendMode();
8904
- f === "additive" ? n.buffers.color.setClear(0, 0, 0, 1, a) : f === "alpha-blend" && n.buffers.color.setClear(0, 0, 0, 0, a), (i.autoClear || y) && (n.buffers.depth.setTest(!0), n.buffers.depth.setMask(!0), n.buffers.color.setMask(!0), i.clear(i.autoClearColor, i.autoClearDepth, i.autoClearStencil));
8903
+ const g = i.xr.getEnvironmentBlendMode();
8904
+ g === "additive" ? n.buffers.color.setClear(0, 0, 0, 1, a) : g === "alpha-blend" && n.buffers.color.setClear(0, 0, 0, 0, a), (i.autoClear || y) && (n.buffers.depth.setTest(!0), n.buffers.depth.setMask(!0), n.buffers.color.setMask(!0), i.clear(i.autoClearColor, i.autoClearDepth, i.autoClearStencil));
8905
8905
  }
8906
8906
  function Z(X, y) {
8907
8907
  const W = b(y);
@@ -8917,7 +8917,7 @@ function rL(i, t, e, n, s, l, a) {
8917
8917
  depthWrite: !1,
8918
8918
  fog: !1
8919
8919
  })
8920
- ), r.geometry.deleteAttribute("normal"), r.geometry.deleteAttribute("uv"), r.onBeforeRender = function(f, g, L) {
8920
+ ), r.geometry.deleteAttribute("normal"), r.geometry.deleteAttribute("uv"), r.onBeforeRender = function(g, f, L) {
8921
8921
  this.matrixWorld.copyPosition(L.matrixWorld);
8922
8922
  }, Object.defineProperty(r.material, "envMap", {
8923
8923
  get: function() {
@@ -9122,7 +9122,7 @@ function hL(i, t) {
9122
9122
  }
9123
9123
  X();
9124
9124
  }
9125
- function f() {
9125
+ function g() {
9126
9126
  I();
9127
9127
  for (const R in n) {
9128
9128
  const v = n[R];
@@ -9135,7 +9135,7 @@ function hL(i, t) {
9135
9135
  delete n[R];
9136
9136
  }
9137
9137
  }
9138
- function g(R) {
9138
+ function f(R) {
9139
9139
  if (n[R.id] === void 0) return;
9140
9140
  const v = n[R.id];
9141
9141
  for (const k in v) {
@@ -9166,8 +9166,8 @@ function hL(i, t) {
9166
9166
  setup: o,
9167
9167
  reset: I,
9168
9168
  resetDefaultState: S,
9169
- dispose: f,
9170
- releaseStatesOfGeometry: g,
9169
+ dispose: g,
9170
+ releaseStatesOfGeometry: f,
9171
9171
  releaseStatesOfProgram: L,
9172
9172
  initAttributes: G,
9173
9173
  enableAttribute: Z,
@@ -9215,32 +9215,32 @@ function mL(i, t, e, n) {
9215
9215
  function l() {
9216
9216
  if (s !== void 0) return s;
9217
9217
  if (t.has("EXT_texture_filter_anisotropic") === !0) {
9218
- const g = t.get("EXT_texture_filter_anisotropic");
9219
- s = i.getParameter(g.MAX_TEXTURE_MAX_ANISOTROPY_EXT);
9218
+ const f = t.get("EXT_texture_filter_anisotropic");
9219
+ s = i.getParameter(f.MAX_TEXTURE_MAX_ANISOTROPY_EXT);
9220
9220
  } else
9221
9221
  s = 0;
9222
9222
  return s;
9223
9223
  }
9224
- function a(g) {
9225
- return !(g !== R0 && n.convert(g) !== i.getParameter(i.IMPLEMENTATION_COLOR_READ_FORMAT));
9224
+ function a(f) {
9225
+ return !(f !== R0 && n.convert(f) !== i.getParameter(i.IMPLEMENTATION_COLOR_READ_FORMAT));
9226
9226
  }
9227
- function o(g) {
9228
- const L = g === tn && (t.has("EXT_color_buffer_half_float") || t.has("EXT_color_buffer_float"));
9229
- return !(g !== L0 && n.convert(g) !== i.getParameter(i.IMPLEMENTATION_COLOR_READ_TYPE) && // Edge and Chrome Mac < 52 (#9513)
9230
- g !== S0 && !L);
9227
+ function o(f) {
9228
+ const L = f === tn && (t.has("EXT_color_buffer_half_float") || t.has("EXT_color_buffer_float"));
9229
+ return !(f !== L0 && n.convert(f) !== i.getParameter(i.IMPLEMENTATION_COLOR_READ_TYPE) && // Edge and Chrome Mac < 52 (#9513)
9230
+ f !== S0 && !L);
9231
9231
  }
9232
- function c(g) {
9233
- if (g === "highp") {
9232
+ function c(f) {
9233
+ if (f === "highp") {
9234
9234
  if (i.getShaderPrecisionFormat(i.VERTEX_SHADER, i.HIGH_FLOAT).precision > 0 && i.getShaderPrecisionFormat(i.FRAGMENT_SHADER, i.HIGH_FLOAT).precision > 0)
9235
9235
  return "highp";
9236
- g = "mediump";
9236
+ f = "mediump";
9237
9237
  }
9238
- return g === "mediump" && i.getShaderPrecisionFormat(i.VERTEX_SHADER, i.MEDIUM_FLOAT).precision > 0 && i.getShaderPrecisionFormat(i.FRAGMENT_SHADER, i.MEDIUM_FLOAT).precision > 0 ? "mediump" : "lowp";
9238
+ return f === "mediump" && i.getShaderPrecisionFormat(i.VERTEX_SHADER, i.MEDIUM_FLOAT).precision > 0 && i.getShaderPrecisionFormat(i.FRAGMENT_SHADER, i.MEDIUM_FLOAT).precision > 0 ? "mediump" : "lowp";
9239
9239
  }
9240
9240
  let d = e.precision !== void 0 ? e.precision : "highp";
9241
9241
  const r = c(d);
9242
9242
  r !== d && (console.warn("THREE.WebGLRenderer:", d, "not supported, using", r, "instead."), d = r);
9243
- const h = e.logarithmicDepthBuffer === !0, u = i.getParameter(i.MAX_TEXTURE_IMAGE_UNITS), m = i.getParameter(i.MAX_VERTEX_TEXTURE_IMAGE_UNITS), b = i.getParameter(i.MAX_TEXTURE_SIZE), G = i.getParameter(i.MAX_CUBE_MAP_TEXTURE_SIZE), Z = i.getParameter(i.MAX_VERTEX_ATTRIBS), p = i.getParameter(i.MAX_VERTEX_UNIFORM_VECTORS), X = i.getParameter(i.MAX_VARYING_VECTORS), y = i.getParameter(i.MAX_FRAGMENT_UNIFORM_VECTORS), W = m > 0, f = i.getParameter(i.MAX_SAMPLES);
9243
+ const h = e.logarithmicDepthBuffer === !0, u = i.getParameter(i.MAX_TEXTURE_IMAGE_UNITS), m = i.getParameter(i.MAX_VERTEX_TEXTURE_IMAGE_UNITS), b = i.getParameter(i.MAX_TEXTURE_SIZE), G = i.getParameter(i.MAX_CUBE_MAP_TEXTURE_SIZE), Z = i.getParameter(i.MAX_VERTEX_ATTRIBS), p = i.getParameter(i.MAX_VERTEX_UNIFORM_VECTORS), X = i.getParameter(i.MAX_VARYING_VECTORS), y = i.getParameter(i.MAX_FRAGMENT_UNIFORM_VECTORS), W = m > 0, g = i.getParameter(i.MAX_SAMPLES);
9244
9244
  return {
9245
9245
  isWebGL2: !0,
9246
9246
  // keeping this for backwards compatibility
@@ -9259,7 +9259,7 @@ function mL(i, t, e, n) {
9259
9259
  maxVaryings: X,
9260
9260
  maxFragmentUniforms: y,
9261
9261
  vertexTextures: W,
9262
- maxSamples: f
9262
+ maxSamples: g
9263
9263
  };
9264
9264
  }
9265
9265
  function pL(i) {
@@ -9285,8 +9285,8 @@ function pL(i) {
9285
9285
  const X = l ? 0 : n, y = X * 4;
9286
9286
  let W = p.clippingState || null;
9287
9287
  c.value = W, W = r(b, u, y, m);
9288
- for (let f = 0; f !== y; ++f)
9289
- W[f] = e[f];
9288
+ for (let g = 0; g !== y; ++g)
9289
+ W[g] = e[g];
9290
9290
  p.clippingState = W, this.numIntersection = G ? this.numPlanes : 0, this.numPlanes += X;
9291
9291
  }
9292
9292
  };
@@ -9571,8 +9571,8 @@ class xh {
9571
9571
  u.envMap.value = t.texture, u.samples.value = Z, u.weights.value = p, u.latitudinal.value = a === "latitudinal", o && (u.poleAxis.value = o);
9572
9572
  const { _lodMax: y } = this;
9573
9573
  u.dTheta.value = b, u.mipInt.value = y - n;
9574
- const W = this._sizeLods[s], f = 3 * W * (s > y - ca ? s - y + ca : 0), g = 4 * (this._cubeSize - W);
9575
- Md(e, f, g, 3 * W, 2 * W), c.setRenderTarget(e), c.render(h, Hm);
9574
+ const W = this._sizeLods[s], g = 3 * W * (s > y - ca ? s - y + ca : 0), f = 4 * (this._cubeSize - W);
9575
+ Md(e, g, f, 3 * W, 2 * W), c.setRenderTarget(e), c.render(h, Hm);
9576
9576
  }
9577
9577
  }
9578
9578
  function ZL(i) {
@@ -9585,8 +9585,8 @@ function ZL(i) {
9585
9585
  let c = 1 / o;
9586
9586
  a > i - ca ? c = Pb[a - i + ca - 1] : a === 0 && (c = 0), n.push(c);
9587
9587
  const d = 1 / (o - 2), r = -d, h = 1 + d, u = [r, r, h, r, h, h, r, r, h, h, r, h], m = 6, b = 6, G = 3, Z = 2, p = 1, X = new Float32Array(G * b * m), y = new Float32Array(Z * b * m), W = new Float32Array(p * b * m);
9588
- for (let g = 0; g < m; g++) {
9589
- const L = g % 3 * 2 / 3 - 1, I = g > 2 ? 0 : -1, S = [
9588
+ for (let f = 0; f < m; f++) {
9589
+ const L = f % 3 * 2 / 3 - 1, I = f > 2 ? 0 : -1, S = [
9590
9590
  L,
9591
9591
  I,
9592
9592
  0,
@@ -9606,12 +9606,12 @@ function ZL(i) {
9606
9606
  I + 1,
9607
9607
  0
9608
9608
  ];
9609
- X.set(S, G * b * g), y.set(u, Z * b * g);
9610
- const R = [g, g, g, g, g, g];
9611
- W.set(R, p * b * g);
9609
+ X.set(S, G * b * f), y.set(u, Z * b * f);
9610
+ const R = [f, f, f, f, f, f];
9611
+ W.set(R, p * b * f);
9612
9612
  }
9613
- const f = new Ot();
9614
- f.setAttribute("position", new ne(X, G)), f.setAttribute("uv", new ne(y, Z)), f.setAttribute("faceIndex", new ne(W, p)), t.push(f), s > ca && s--;
9613
+ const g = new Ot();
9614
+ g.setAttribute("position", new ne(X, G)), g.setAttribute("uv", new ne(y, Z)), g.setAttribute("faceIndex", new ne(W, p)), t.push(g), s > ca && s--;
9615
9615
  }
9616
9616
  return { lodPlanes: t, sizeLods: e, sigmas: n };
9617
9617
  }
@@ -9955,15 +9955,15 @@ function WL(i, t, e, n) {
9955
9955
  const X = m.array;
9956
9956
  G = m.version;
9957
9957
  for (let y = 0, W = X.length; y < W; y += 3) {
9958
- const f = X[y + 0], g = X[y + 1], L = X[y + 2];
9959
- u.push(f, g, g, L, L, f);
9958
+ const g = X[y + 0], f = X[y + 1], L = X[y + 2];
9959
+ u.push(g, f, f, L, L, g);
9960
9960
  }
9961
9961
  } else if (b !== void 0) {
9962
9962
  const X = b.array;
9963
9963
  G = b.version;
9964
9964
  for (let y = 0, W = X.length / 3 - 1; y < W; y += 3) {
9965
- const f = y + 0, g = y + 1, L = y + 2;
9966
- u.push(f, g, g, L, L, f);
9965
+ const g = y + 0, f = y + 1, L = y + 2;
9966
+ u.push(g, f, f, L, L, g);
9967
9967
  }
9968
9968
  } else
9969
9969
  return;
@@ -10085,22 +10085,22 @@ function fL(i, t, e) {
10085
10085
  const m = o.morphAttributes.position !== void 0, b = o.morphAttributes.normal !== void 0, G = o.morphAttributes.color !== void 0, Z = o.morphAttributes.position || [], p = o.morphAttributes.normal || [], X = o.morphAttributes.color || [];
10086
10086
  let y = 0;
10087
10087
  m === !0 && (y = 1), b === !0 && (y = 2), G === !0 && (y = 3);
10088
- let W = o.attributes.position.count * y, f = 1;
10089
- W > t.maxTextureSize && (f = Math.ceil(W / t.maxTextureSize), W = t.maxTextureSize);
10090
- const g = new Float32Array(W * f * 4 * h), L = new Mu(g, W, f, h);
10088
+ let W = o.attributes.position.count * y, g = 1;
10089
+ W > t.maxTextureSize && (g = Math.ceil(W / t.maxTextureSize), W = t.maxTextureSize);
10090
+ const f = new Float32Array(W * g * 4 * h), L = new Mu(f, W, g, h);
10091
10091
  L.type = S0, L.needsUpdate = !0;
10092
10092
  const I = y * 4;
10093
10093
  for (let R = 0; R < h; R++) {
10094
- const v = Z[R], k = p[R], w = X[R], K = W * f * 4 * R;
10094
+ const v = Z[R], k = p[R], w = X[R], K = W * g * 4 * R;
10095
10095
  for (let H = 0; H < v.count; H++) {
10096
10096
  const z = H * I;
10097
- m === !0 && (s.fromBufferAttribute(v, H), g[K + z + 0] = s.x, g[K + z + 1] = s.y, g[K + z + 2] = s.z, g[K + z + 3] = 0), b === !0 && (s.fromBufferAttribute(k, H), g[K + z + 4] = s.x, g[K + z + 5] = s.y, g[K + z + 6] = s.z, g[K + z + 7] = 0), G === !0 && (s.fromBufferAttribute(w, H), g[K + z + 8] = s.x, g[K + z + 9] = s.y, g[K + z + 10] = s.z, g[K + z + 11] = w.itemSize === 4 ? s.w : 1);
10097
+ m === !0 && (s.fromBufferAttribute(v, H), f[K + z + 0] = s.x, f[K + z + 1] = s.y, f[K + z + 2] = s.z, f[K + z + 3] = 0), b === !0 && (s.fromBufferAttribute(k, H), f[K + z + 4] = s.x, f[K + z + 5] = s.y, f[K + z + 6] = s.z, f[K + z + 7] = 0), G === !0 && (s.fromBufferAttribute(w, H), f[K + z + 8] = s.x, f[K + z + 9] = s.y, f[K + z + 10] = s.z, f[K + z + 11] = w.itemSize === 4 ? s.w : 1);
10098
10098
  }
10099
10099
  }
10100
10100
  u = {
10101
10101
  count: h,
10102
10102
  texture: L,
10103
- size: new _(W, f)
10103
+ size: new _(W, g)
10104
10104
  }, n.set(o, u), o.addEventListener("dispose", S);
10105
10105
  }
10106
10106
  if (a.isInstancedMesh === !0 && a.morphTexture !== null)
@@ -11063,17 +11063,17 @@ function MC(i, t, e, n) {
11063
11063
  ].join(`
11064
11064
  `) + `
11065
11065
  ` + p);
11066
- const y = X + Z + a, W = X + p + o, f = i5(s, s.VERTEX_SHADER, y), g = i5(s, s.FRAGMENT_SHADER, W);
11067
- s.attachShader(G, f), s.attachShader(G, g), e.index0AttributeName !== void 0 ? s.bindAttribLocation(G, 0, e.index0AttributeName) : e.morphTargets === !0 && s.bindAttribLocation(G, 0, "position"), s.linkProgram(G);
11066
+ const y = X + Z + a, W = X + p + o, g = i5(s, s.VERTEX_SHADER, y), f = i5(s, s.FRAGMENT_SHADER, W);
11067
+ s.attachShader(G, g), s.attachShader(G, f), e.index0AttributeName !== void 0 ? s.bindAttribLocation(G, 0, e.index0AttributeName) : e.morphTargets === !0 && s.bindAttribLocation(G, 0, "position"), s.linkProgram(G);
11068
11068
  function L(v) {
11069
11069
  if (i.debug.checkShaderErrors) {
11070
- const k = s.getProgramInfoLog(G).trim(), w = s.getShaderInfoLog(f).trim(), K = s.getShaderInfoLog(g).trim();
11070
+ const k = s.getProgramInfoLog(G).trim(), w = s.getShaderInfoLog(g).trim(), K = s.getShaderInfoLog(f).trim();
11071
11071
  let H = !0, z = !0;
11072
11072
  if (s.getProgramParameter(G, s.LINK_STATUS) === !1)
11073
11073
  if (H = !1, typeof i.debug.onShaderError == "function")
11074
- i.debug.onShaderError(s, G, f, g);
11074
+ i.debug.onShaderError(s, G, g, f);
11075
11075
  else {
11076
- const E = s5(s, f, "vertex"), Q = s5(s, g, "fragment");
11076
+ const E = s5(s, g, "vertex"), Q = s5(s, f, "fragment");
11077
11077
  console.error(
11078
11078
  "THREE.WebGLProgram: Shader Error " + s.getError() + " - VALIDATE_STATUS " + s.getProgramParameter(G, s.VALIDATE_STATUS) + `
11079
11079
 
@@ -11099,7 +11099,7 @@ Program Info Log: ` + k + `
11099
11099
  }
11100
11100
  });
11101
11101
  }
11102
- s.deleteShader(f), s.deleteShader(g), I = new Nr(s, G), S = fC(s, G);
11102
+ s.deleteShader(g), s.deleteShader(f), I = new Nr(s, G), S = fC(s, G);
11103
11103
  }
11104
11104
  let I;
11105
11105
  this.getUniforms = function() {
@@ -11114,7 +11114,7 @@ Program Info Log: ` + k + `
11114
11114
  return R === !1 && (R = s.getProgramParameter(G, bC)), R;
11115
11115
  }, this.destroy = function() {
11116
11116
  n.releaseStatesOfProgram(this), s.deleteProgram(G), this.program = void 0;
11117
- }, this.type = e.shaderType, this.name = e.shaderName, this.id = ZC++, this.cacheKey = t, this.usedTimes = 1, this.program = G, this.vertexShader = f, this.fragmentShader = g, this;
11117
+ }, this.type = e.shaderType, this.name = e.shaderName, this.id = ZC++, this.cacheKey = t, this.usedTimes = 1, this.program = G, this.vertexShader = g, this.fragmentShader = f, this;
11118
11118
  }
11119
11119
  let FC = 0;
11120
11120
  class HC {
@@ -11349,7 +11349,7 @@ function wC(i, t, e, n, s, l, a) {
11349
11349
  v = S.uniforms;
11350
11350
  return v;
11351
11351
  }
11352
- function f(S, R) {
11352
+ function g(S, R) {
11353
11353
  let v;
11354
11354
  for (let k = 0, w = r.length; k < w; k++) {
11355
11355
  const K = r[k];
@@ -11360,7 +11360,7 @@ function wC(i, t, e, n, s, l, a) {
11360
11360
  }
11361
11361
  return v === void 0 && (v = new MC(i, R, S, l), r.push(v)), v;
11362
11362
  }
11363
- function g(S) {
11363
+ function f(S) {
11364
11364
  if (--S.usedTimes === 0) {
11365
11365
  const R = r.indexOf(S);
11366
11366
  r[R] = r[r.length - 1], r.pop(), S.destroy();
@@ -11376,8 +11376,8 @@ function wC(i, t, e, n, s, l, a) {
11376
11376
  getParameters: Z,
11377
11377
  getProgramCacheKey: p,
11378
11378
  getUniforms: W,
11379
- acquireProgram: f,
11380
- releaseProgram: g,
11379
+ acquireProgram: g,
11380
+ releaseProgram: f,
11381
11381
  releaseShaderCache: L,
11382
11382
  // Exposed for resource monitoring & error feedback via renderer.info:
11383
11383
  programs: r,
@@ -11617,7 +11617,7 @@ function QC(i) {
11617
11617
  function o(d) {
11618
11618
  let r = 0, h = 0, u = 0;
11619
11619
  for (let S = 0; S < 9; S++) n.probe[S].set(0, 0, 0);
11620
- let m = 0, b = 0, G = 0, Z = 0, p = 0, X = 0, y = 0, W = 0, f = 0, g = 0, L = 0;
11620
+ let m = 0, b = 0, G = 0, Z = 0, p = 0, X = 0, y = 0, W = 0, g = 0, f = 0, L = 0;
11621
11621
  d.sort(EC);
11622
11622
  for (let S = 0, R = d.length; S < R; S++) {
11623
11623
  const v = d[S], k = v.color, w = v.intensity, K = v.distance, H = v.shadow && v.shadow.map ? v.shadow.map.texture : null;
@@ -11638,7 +11638,7 @@ function QC(i) {
11638
11638
  const z = t.get(v);
11639
11639
  z.position.setFromMatrixPosition(v.matrixWorld), z.color.copy(k).multiplyScalar(w), z.distance = K, z.coneCos = Math.cos(v.angle), z.penumbraCos = Math.cos(v.angle * (1 - v.penumbra)), z.decay = v.decay, n.spot[G] = z;
11640
11640
  const E = v.shadow;
11641
- if (v.map && (n.spotLightMap[f] = v.map, f++, E.updateMatrices(v), v.castShadow && g++), n.spotLightMatrix[G] = E.matrix, v.castShadow) {
11641
+ if (v.map && (n.spotLightMap[g] = v.map, g++, E.updateMatrices(v), v.castShadow && f++), n.spotLightMatrix[G] = E.matrix, v.castShadow) {
11642
11642
  const Q = e.get(v);
11643
11643
  Q.shadowIntensity = E.intensity, Q.shadowBias = E.bias, Q.shadowNormalBias = E.normalBias, Q.shadowRadius = E.radius, Q.shadowMapSize = E.mapSize, n.spotShadow[G] = Q, n.spotShadowMap[G] = H, W++;
11644
11644
  }
@@ -11660,7 +11660,7 @@ function QC(i) {
11660
11660
  }
11661
11661
  Z > 0 && (i.has("OES_texture_float_linear") === !0 ? (n.rectAreaLTC1 = It.LTC_FLOAT_1, n.rectAreaLTC2 = It.LTC_FLOAT_2) : (n.rectAreaLTC1 = It.LTC_HALF_1, n.rectAreaLTC2 = It.LTC_HALF_2)), n.ambient[0] = r, n.ambient[1] = h, n.ambient[2] = u;
11662
11662
  const I = n.hash;
11663
- (I.directionalLength !== m || I.pointLength !== b || I.spotLength !== G || I.rectAreaLength !== Z || I.hemiLength !== p || I.numDirectionalShadows !== X || I.numPointShadows !== y || I.numSpotShadows !== W || I.numSpotMaps !== f || I.numLightProbes !== L) && (n.directional.length = m, n.spot.length = G, n.rectArea.length = Z, n.point.length = b, n.hemi.length = p, n.directionalShadow.length = X, n.directionalShadowMap.length = X, n.pointShadow.length = y, n.pointShadowMap.length = y, n.spotShadow.length = W, n.spotShadowMap.length = W, n.directionalShadowMatrix.length = X, n.pointShadowMatrix.length = y, n.spotLightMatrix.length = W + f - g, n.spotLightMap.length = f, n.numSpotLightShadowsWithMaps = g, n.numLightProbes = L, I.directionalLength = m, I.pointLength = b, I.spotLength = G, I.rectAreaLength = Z, I.hemiLength = p, I.numDirectionalShadows = X, I.numPointShadows = y, I.numSpotShadows = W, I.numSpotMaps = f, I.numLightProbes = L, n.version = PC++);
11663
+ (I.directionalLength !== m || I.pointLength !== b || I.spotLength !== G || I.rectAreaLength !== Z || I.hemiLength !== p || I.numDirectionalShadows !== X || I.numPointShadows !== y || I.numSpotShadows !== W || I.numSpotMaps !== g || I.numLightProbes !== L) && (n.directional.length = m, n.spot.length = G, n.rectArea.length = Z, n.point.length = b, n.hemi.length = p, n.directionalShadow.length = X, n.directionalShadowMap.length = X, n.pointShadow.length = y, n.pointShadowMap.length = y, n.spotShadow.length = W, n.spotShadowMap.length = W, n.directionalShadowMatrix.length = X, n.pointShadowMatrix.length = y, n.spotLightMatrix.length = W + g - f, n.spotLightMap.length = g, n.numSpotLightShadowsWithMaps = f, n.numLightProbes = L, I.directionalLength = m, I.pointLength = b, I.spotLength = G, I.rectAreaLength = Z, I.hemiLength = p, I.numDirectionalShadows = X, I.numPointShadows = y, I.numSpotShadows = W, I.numSpotMaps = g, I.numLightProbes = L, n.version = PC++);
11664
11664
  }
11665
11665
  function c(d, r) {
11666
11666
  let h = 0, u = 0, m = 0, b = 0, G = 0;
@@ -11810,13 +11810,13 @@ function OC(i, t, e) {
11810
11810
  const G = new Gt(b, u), Z = this;
11811
11811
  this.enabled = !1, this.autoUpdate = !0, this.needsUpdate = !1, this.type = L2;
11812
11812
  let p = this.type;
11813
- this.render = function(g, L, I) {
11814
- if (Z.enabled === !1 || Z.autoUpdate === !1 && Z.needsUpdate === !1 || g.length === 0) return;
11813
+ this.render = function(f, L, I) {
11814
+ if (Z.enabled === !1 || Z.autoUpdate === !1 && Z.needsUpdate === !1 || f.length === 0) return;
11815
11815
  const S = i.getRenderTarget(), R = i.getActiveCubeFace(), v = i.getActiveMipmapLevel(), k = i.state;
11816
11816
  k.setBlending(M0), k.buffers.color.setClear(1, 1, 1, 1), k.buffers.depth.setTest(!0), k.setScissorTest(!1);
11817
11817
  const w = p !== di && this.type === di, K = p === di && this.type !== di;
11818
- for (let H = 0, z = g.length; H < z; H++) {
11819
- const E = g[H], Q = E.shadow;
11818
+ for (let H = 0, z = f.length; H < z; H++) {
11819
+ const E = f[H], Q = E.shadow;
11820
11820
  if (Q === void 0) {
11821
11821
  console.warn("THREE.WebGLShadowMap:", E, "has no shadow.");
11822
11822
  continue;
@@ -11843,13 +11843,13 @@ function OC(i, t, e) {
11843
11843
  }
11844
11844
  p = this.type, Z.needsUpdate = !1, i.setRenderTarget(S, R, v);
11845
11845
  };
11846
- function X(g, L) {
11846
+ function X(f, L) {
11847
11847
  const I = t.update(G);
11848
- u.defines.VSM_SAMPLES !== g.blurSamples && (u.defines.VSM_SAMPLES = g.blurSamples, m.defines.VSM_SAMPLES = g.blurSamples, u.needsUpdate = !0, m.needsUpdate = !0), g.mapPass === null && (g.mapPass = new s0(s.x, s.y)), u.uniforms.shadow_pass.value = g.map.texture, u.uniforms.resolution.value = g.mapSize, u.uniforms.radius.value = g.radius, i.setRenderTarget(g.mapPass), i.clear(), i.renderBufferDirect(L, null, I, u, G, null), m.uniforms.shadow_pass.value = g.mapPass.texture, m.uniforms.resolution.value = g.mapSize, m.uniforms.radius.value = g.radius, i.setRenderTarget(g.map), i.clear(), i.renderBufferDirect(L, null, I, m, G, null);
11848
+ u.defines.VSM_SAMPLES !== f.blurSamples && (u.defines.VSM_SAMPLES = f.blurSamples, m.defines.VSM_SAMPLES = f.blurSamples, u.needsUpdate = !0, m.needsUpdate = !0), f.mapPass === null && (f.mapPass = new s0(s.x, s.y)), u.uniforms.shadow_pass.value = f.map.texture, u.uniforms.resolution.value = f.mapSize, u.uniforms.radius.value = f.radius, i.setRenderTarget(f.mapPass), i.clear(), i.renderBufferDirect(L, null, I, u, G, null), m.uniforms.shadow_pass.value = f.mapPass.texture, m.uniforms.resolution.value = f.mapSize, m.uniforms.radius.value = f.radius, i.setRenderTarget(f.map), i.clear(), i.renderBufferDirect(L, null, I, m, G, null);
11849
11849
  }
11850
- function y(g, L, I, S) {
11850
+ function y(f, L, I, S) {
11851
11851
  let R = null;
11852
- const v = I.isPointLight === !0 ? g.customDistanceMaterial : g.customDepthMaterial;
11852
+ const v = I.isPointLight === !0 ? f.customDistanceMaterial : f.customDepthMaterial;
11853
11853
  if (v !== void 0)
11854
11854
  R = v;
11855
11855
  else if (R = I.isPointLight === !0 ? c : o, i.localClippingEnabled && L.clipShadows === !0 && Array.isArray(L.clippingPlanes) && L.clippingPlanes.length !== 0 || L.displacementMap && L.displacementScale !== 0 || L.alphaMap && L.alphaTest > 0 || L.map && L.alphaTest > 0) {
@@ -11857,7 +11857,7 @@ function OC(i, t, e) {
11857
11857
  let K = d[k];
11858
11858
  K === void 0 && (K = {}, d[k] = K);
11859
11859
  let H = K[w];
11860
- H === void 0 && (H = R.clone(), K[w] = H, L.addEventListener("dispose", f)), R = H;
11860
+ H === void 0 && (H = R.clone(), K[w] = H, L.addEventListener("dispose", g)), R = H;
11861
11861
  }
11862
11862
  if (R.visible = L.visible, R.wireframe = L.wireframe, S === di ? R.side = L.shadowSide !== null ? L.shadowSide : L.side : R.side = L.shadowSide !== null ? L.shadowSide : h[L.side], R.alphaMap = L.alphaMap, R.alphaTest = L.alphaTest, R.map = L.map, R.clipShadows = L.clipShadows, R.clippingPlanes = L.clippingPlanes, R.clipIntersection = L.clipIntersection, R.displacementMap = L.displacementMap, R.displacementScale = L.displacementScale, R.displacementBias = L.displacementBias, R.wireframeLinewidth = L.wireframeLinewidth, R.linewidth = L.linewidth, I.isPointLight === !0 && R.isMeshDistanceMaterial === !0) {
11863
11863
  const k = i.properties.get(R);
@@ -11865,33 +11865,33 @@ function OC(i, t, e) {
11865
11865
  }
11866
11866
  return R;
11867
11867
  }
11868
- function W(g, L, I, S, R) {
11869
- if (g.visible === !1) return;
11870
- if (g.layers.test(L.layers) && (g.isMesh || g.isLine || g.isPoints) && (g.castShadow || g.receiveShadow && R === di) && (!g.frustumCulled || n.intersectsObject(g))) {
11871
- g.modelViewMatrix.multiplyMatrices(I.matrixWorldInverse, g.matrixWorld);
11872
- const w = t.update(g), K = g.material;
11868
+ function W(f, L, I, S, R) {
11869
+ if (f.visible === !1) return;
11870
+ if (f.layers.test(L.layers) && (f.isMesh || f.isLine || f.isPoints) && (f.castShadow || f.receiveShadow && R === di) && (!f.frustumCulled || n.intersectsObject(f))) {
11871
+ f.modelViewMatrix.multiplyMatrices(I.matrixWorldInverse, f.matrixWorld);
11872
+ const w = t.update(f), K = f.material;
11873
11873
  if (Array.isArray(K)) {
11874
11874
  const H = w.groups;
11875
11875
  for (let z = 0, E = H.length; z < E; z++) {
11876
11876
  const Q = H[z], et = K[Q.materialIndex];
11877
11877
  if (et && et.visible) {
11878
- const yt = y(g, et, S, R);
11879
- g.onBeforeShadow(i, g, L, I, w, yt, Q), i.renderBufferDirect(I, null, w, yt, g, Q), g.onAfterShadow(i, g, L, I, w, yt, Q);
11878
+ const yt = y(f, et, S, R);
11879
+ f.onBeforeShadow(i, f, L, I, w, yt, Q), i.renderBufferDirect(I, null, w, yt, f, Q), f.onAfterShadow(i, f, L, I, w, yt, Q);
11880
11880
  }
11881
11881
  }
11882
11882
  } else if (K.visible) {
11883
- const H = y(g, K, S, R);
11884
- g.onBeforeShadow(i, g, L, I, w, H, null), i.renderBufferDirect(I, null, w, H, g, null), g.onAfterShadow(i, g, L, I, w, H, null);
11883
+ const H = y(f, K, S, R);
11884
+ f.onBeforeShadow(i, f, L, I, w, H, null), i.renderBufferDirect(I, null, w, H, f, null), f.onAfterShadow(i, f, L, I, w, H, null);
11885
11885
  }
11886
11886
  }
11887
- const k = g.children;
11887
+ const k = f.children;
11888
11888
  for (let w = 0, K = k.length; w < K; w++)
11889
11889
  W(k[w], L, I, S, R);
11890
11890
  }
11891
- function f(g) {
11892
- g.target.removeEventListener("dispose", f);
11891
+ function g(f) {
11892
+ f.target.removeEventListener("dispose", g);
11893
11893
  for (const I in d) {
11894
- const S = d[I], R = g.target.uuid;
11894
+ const S = d[I], R = f.target.uuid;
11895
11895
  R in S && (S[R].dispose(), delete S[R]);
11896
11896
  }
11897
11897
  }
@@ -11997,7 +11997,7 @@ function _C(i) {
11997
11997
  };
11998
11998
  }
11999
11999
  const s = new t(), l = new e(), a = new n(), o = /* @__PURE__ */ new WeakMap(), c = /* @__PURE__ */ new WeakMap();
12000
- let d = {}, r = {}, h = /* @__PURE__ */ new WeakMap(), u = [], m = null, b = !1, G = null, Z = null, p = null, X = null, y = null, W = null, f = null, g = new lt(0, 0, 0), L = 0, I = !1, S = null, R = null, v = null, k = null, w = null;
12000
+ let d = {}, r = {}, h = /* @__PURE__ */ new WeakMap(), u = [], m = null, b = !1, G = null, Z = null, p = null, X = null, y = null, W = null, g = null, f = new lt(0, 0, 0), L = 0, I = !1, S = null, R = null, v = null, k = null, w = null;
12001
12001
  const K = i.getParameter(i.MAX_COMBINED_TEXTURE_IMAGE_UNITS);
12002
12002
  let H = !1, z = 0;
12003
12003
  const E = i.getParameter(i.VERSION);
@@ -12105,11 +12105,11 @@ function _C(i) {
12105
12105
  console.error("THREE.WebGLState: Invalid blending: ", B);
12106
12106
  break;
12107
12107
  }
12108
- p = null, X = null, W = null, f = null, g.set(0, 0, 0), L = 0, G = B, I = ve;
12108
+ p = null, X = null, W = null, g = null, f.set(0, 0, 0), L = 0, G = B, I = ve;
12109
12109
  }
12110
12110
  return;
12111
12111
  }
12112
- Tt = Tt || Yt, ee = ee || O, xe = xe || Zt, (Yt !== Z || Tt !== y) && (i.blendEquationSeparate(he[Yt], he[Tt]), Z = Yt, y = Tt), (O !== p || Zt !== X || ee !== W || xe !== f) && (i.blendFuncSeparate(M[O], M[Zt], M[ee], M[xe]), p = O, X = Zt, W = ee, f = xe), (m0.equals(g) === !1 || x0 !== L) && (i.blendColor(m0.r, m0.g, m0.b, x0), g.copy(m0), L = x0), G = B, I = !1;
12112
+ Tt = Tt || Yt, ee = ee || O, xe = xe || Zt, (Yt !== Z || Tt !== y) && (i.blendEquationSeparate(he[Yt], he[Tt]), Z = Yt, y = Tt), (O !== p || Zt !== X || ee !== W || xe !== g) && (i.blendFuncSeparate(M[O], M[Zt], M[ee], M[xe]), p = O, X = Zt, W = ee, g = xe), (m0.equals(f) === !1 || x0 !== L) && (i.blendColor(m0.r, m0.g, m0.b, x0), f.copy(m0), L = x0), G = B, I = !1;
12113
12113
  }
12114
12114
  function gt(B, Yt) {
12115
12115
  B.side === He ? St(i.CULL_FACE) : Wt(i.CULL_FACE);
@@ -12232,7 +12232,7 @@ function _C(i) {
12232
12232
  o.get(Yt) !== Zt && (i.uniformBlockBinding(Yt, Zt, B.__bindingPointIndex), o.set(Yt, Zt));
12233
12233
  }
12234
12234
  function Ve() {
12235
- i.disable(i.BLEND), i.disable(i.CULL_FACE), i.disable(i.DEPTH_TEST), i.disable(i.POLYGON_OFFSET_FILL), i.disable(i.SCISSOR_TEST), i.disable(i.STENCIL_TEST), i.disable(i.SAMPLE_ALPHA_TO_COVERAGE), i.blendEquation(i.FUNC_ADD), i.blendFunc(i.ONE, i.ZERO), i.blendFuncSeparate(i.ONE, i.ZERO, i.ONE, i.ZERO), i.blendColor(0, 0, 0, 0), i.colorMask(!0, !0, !0, !0), i.clearColor(0, 0, 0, 0), i.depthMask(!0), i.depthFunc(i.LESS), i.clearDepth(1), i.stencilMask(4294967295), i.stencilFunc(i.ALWAYS, 0, 4294967295), i.stencilOp(i.KEEP, i.KEEP, i.KEEP), i.clearStencil(0), i.cullFace(i.BACK), i.frontFace(i.CCW), i.polygonOffset(0, 0), i.activeTexture(i.TEXTURE0), i.bindFramebuffer(i.FRAMEBUFFER, null), i.bindFramebuffer(i.DRAW_FRAMEBUFFER, null), i.bindFramebuffer(i.READ_FRAMEBUFFER, null), i.useProgram(null), i.lineWidth(1), i.scissor(0, 0, i.canvas.width, i.canvas.height), i.viewport(0, 0, i.canvas.width, i.canvas.height), d = {}, Q = null, et = {}, r = {}, h = /* @__PURE__ */ new WeakMap(), u = [], m = null, b = !1, G = null, Z = null, p = null, X = null, y = null, W = null, f = null, g = new lt(0, 0, 0), L = 0, I = !1, S = null, R = null, v = null, k = null, w = null, Ut.set(0, 0, i.canvas.width, i.canvas.height), jt.set(0, 0, i.canvas.width, i.canvas.height), s.reset(), l.reset(), a.reset();
12235
+ i.disable(i.BLEND), i.disable(i.CULL_FACE), i.disable(i.DEPTH_TEST), i.disable(i.POLYGON_OFFSET_FILL), i.disable(i.SCISSOR_TEST), i.disable(i.STENCIL_TEST), i.disable(i.SAMPLE_ALPHA_TO_COVERAGE), i.blendEquation(i.FUNC_ADD), i.blendFunc(i.ONE, i.ZERO), i.blendFuncSeparate(i.ONE, i.ZERO, i.ONE, i.ZERO), i.blendColor(0, 0, 0, 0), i.colorMask(!0, !0, !0, !0), i.clearColor(0, 0, 0, 0), i.depthMask(!0), i.depthFunc(i.LESS), i.clearDepth(1), i.stencilMask(4294967295), i.stencilFunc(i.ALWAYS, 0, 4294967295), i.stencilOp(i.KEEP, i.KEEP, i.KEEP), i.clearStencil(0), i.cullFace(i.BACK), i.frontFace(i.CCW), i.polygonOffset(0, 0), i.activeTexture(i.TEXTURE0), i.bindFramebuffer(i.FRAMEBUFFER, null), i.bindFramebuffer(i.DRAW_FRAMEBUFFER, null), i.bindFramebuffer(i.READ_FRAMEBUFFER, null), i.useProgram(null), i.lineWidth(1), i.scissor(0, 0, i.canvas.width, i.canvas.height), i.viewport(0, 0, i.canvas.width, i.canvas.height), d = {}, Q = null, et = {}, r = {}, h = /* @__PURE__ */ new WeakMap(), u = [], m = null, b = !1, G = null, Z = null, p = null, X = null, y = null, W = null, g = null, f = new lt(0, 0, 0), L = 0, I = !1, S = null, R = null, v = null, k = null, w = null, Ut.set(0, 0, i.canvas.width, i.canvas.height), jt.set(0, 0, i.canvas.width, i.canvas.height), s.reset(), l.reset(), a.reset();
12236
12236
  }
12237
12237
  return {
12238
12238
  buffers: {
@@ -12446,13 +12446,13 @@ function iY(i, t, e, n, s, l, a) {
12446
12446
  function W(F, Y) {
12447
12447
  return Z(F) === !0 || F.isFramebufferTexture && F.minFilter !== ze && F.minFilter !== Ne ? Math.log2(Math.max(Y.width, Y.height)) + 1 : F.mipmaps !== void 0 && F.mipmaps.length > 0 ? F.mipmaps.length : F.isCompressedTexture && Array.isArray(F.image) ? Y.mipmaps.length : 1;
12448
12448
  }
12449
- function f(F) {
12449
+ function g(F) {
12450
12450
  const Y = F.target;
12451
- Y.removeEventListener("dispose", f), L(Y), Y.isVideoTexture && r.delete(Y);
12451
+ Y.removeEventListener("dispose", g), L(Y), Y.isVideoTexture && r.delete(Y);
12452
12452
  }
12453
- function g(F) {
12453
+ function f(F) {
12454
12454
  const Y = F.target;
12455
- Y.removeEventListener("dispose", g), S(Y);
12455
+ Y.removeEventListener("dispose", f), S(Y);
12456
12456
  }
12457
12457
  function L(F) {
12458
12458
  const Y = n.get(F);
@@ -12580,7 +12580,7 @@ function iY(i, t, e, n, s, l, a) {
12580
12580
  }
12581
12581
  function Ut(F, Y) {
12582
12582
  let D = !1;
12583
- F.__webglInit === void 0 && (F.__webglInit = !0, Y.addEventListener("dispose", f));
12583
+ F.__webglInit === void 0 && (F.__webglInit = !0, Y.addEventListener("dispose", g));
12584
12584
  const at = Y.source;
12585
12585
  let dt = u.get(at);
12586
12586
  dt === void 0 && (dt = {}, u.set(at, dt));
@@ -12804,7 +12804,7 @@ function iY(i, t, e, n, s, l, a) {
12804
12804
  }
12805
12805
  function qt(F) {
12806
12806
  const Y = F.texture, D = n.get(F), at = n.get(Y);
12807
- F.addEventListener("dispose", g);
12807
+ F.addEventListener("dispose", f);
12808
12808
  const dt = F.textures, pt = F.isWebGLCubeRenderTarget === !0, Kt = dt.length > 1;
12809
12809
  if (Kt || (at.__webglTexture === void 0 && (at.__webglTexture = i.createTexture()), at.__version = Y.version, a.memory.textures++), pt) {
12810
12810
  D.__webglFramebuffer = [];
@@ -13158,8 +13158,8 @@ class cY extends Fn {
13158
13158
  let s = null, l = 1, a = null, o = "local-floor", c = 1, d = null, r = null, h = null, u = null, m = null, b = null;
13159
13159
  const G = new oY(), Z = e.getContextAttributes();
13160
13160
  let p = null, X = null;
13161
- const y = [], W = [], f = new _();
13162
- let g = null;
13161
+ const y = [], W = [], g = new _();
13162
+ let f = null;
13163
13163
  const L = new $e();
13164
13164
  L.layers.enable(1), L.viewport = new fe();
13165
13165
  const I = new $e();
@@ -13190,7 +13190,7 @@ class cY extends Fn {
13190
13190
  const Xt = W[st];
13191
13191
  Xt !== null && (W[st] = null, y[st].disconnect(Xt));
13192
13192
  }
13193
- v = null, k = null, G.reset(), t.setRenderTarget(p), m = null, u = null, h = null, s = null, X = null, jt.stop(), n.isPresenting = !1, t.setPixelRatio(g), t.setSize(f.width, f.height, !1), n.dispatchEvent({ type: "sessionend" });
13193
+ v = null, k = null, G.reset(), t.setRenderTarget(p), m = null, u = null, h = null, s = null, X = null, jt.stop(), n.isPresenting = !1, t.setPixelRatio(f), t.setSize(g.width, g.height, !1), n.dispatchEvent({ type: "sessionend" });
13194
13194
  }
13195
13195
  this.setFramebufferScaleFactor = function(st) {
13196
13196
  l = st, n.isPresenting === !0 && console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.");
@@ -13211,7 +13211,7 @@ class cY extends Fn {
13211
13211
  }, this.setSession = function(st) {
13212
13212
  return bt(this, null, function* () {
13213
13213
  if (s = st, s !== null) {
13214
- if (p = t.getRenderTarget(), s.addEventListener("select", w), s.addEventListener("selectstart", w), s.addEventListener("selectend", w), s.addEventListener("squeeze", w), s.addEventListener("squeezestart", w), s.addEventListener("squeezeend", w), s.addEventListener("end", K), s.addEventListener("inputsourceschange", H), Z.xrCompatible !== !0 && (yield e.makeXRCompatible()), g = t.getPixelRatio(), t.getSize(f), s.renderState.layers === void 0) {
13214
+ if (p = t.getRenderTarget(), s.addEventListener("select", w), s.addEventListener("selectstart", w), s.addEventListener("selectend", w), s.addEventListener("squeeze", w), s.addEventListener("squeezestart", w), s.addEventListener("squeezeend", w), s.addEventListener("end", K), s.addEventListener("inputsourceschange", H), Z.xrCompatible !== !0 && (yield e.makeXRCompatible()), f = t.getPixelRatio(), t.getSize(g), s.renderState.layers === void 0) {
13215
13215
  const Xt = {
13216
13216
  antialias: Z.antialias,
13217
13217
  alpha: !0,
@@ -13425,16 +13425,16 @@ function hY(i, t, e, n) {
13425
13425
  function d(X, y) {
13426
13426
  let W = s[X.id];
13427
13427
  W === void 0 && (b(X), W = r(X), s[X.id] = W, X.addEventListener("dispose", Z));
13428
- const f = y.program;
13429
- n.updateUBOMapping(X, f);
13430
- const g = t.render.frame;
13431
- l[X.id] !== g && (u(X), l[X.id] = g);
13428
+ const g = y.program;
13429
+ n.updateUBOMapping(X, g);
13430
+ const f = t.render.frame;
13431
+ l[X.id] !== f && (u(X), l[X.id] = f);
13432
13432
  }
13433
13433
  function r(X) {
13434
13434
  const y = h();
13435
13435
  X.__bindingPointIndex = y;
13436
- const W = i.createBuffer(), f = X.__size, g = X.usage;
13437
- return i.bindBuffer(i.UNIFORM_BUFFER, W), i.bufferData(i.UNIFORM_BUFFER, f, g), i.bindBuffer(i.UNIFORM_BUFFER, null), i.bindBufferBase(i.UNIFORM_BUFFER, y, W), W;
13436
+ const W = i.createBuffer(), g = X.__size, f = X.usage;
13437
+ return i.bindBuffer(i.UNIFORM_BUFFER, W), i.bufferData(i.UNIFORM_BUFFER, g, f), i.bindBuffer(i.UNIFORM_BUFFER, null), i.bindBufferBase(i.UNIFORM_BUFFER, y, W), W;
13438
13438
  }
13439
13439
  function h() {
13440
13440
  for (let X = 0; X < o; X++)
@@ -13443,13 +13443,13 @@ function hY(i, t, e, n) {
13443
13443
  return console.error("THREE.WebGLRenderer: Maximum number of simultaneously usable uniforms groups reached."), 0;
13444
13444
  }
13445
13445
  function u(X) {
13446
- const y = s[X.id], W = X.uniforms, f = X.__cache;
13446
+ const y = s[X.id], W = X.uniforms, g = X.__cache;
13447
13447
  i.bindBuffer(i.UNIFORM_BUFFER, y);
13448
- for (let g = 0, L = W.length; g < L; g++) {
13449
- const I = Array.isArray(W[g]) ? W[g] : [W[g]];
13448
+ for (let f = 0, L = W.length; f < L; f++) {
13449
+ const I = Array.isArray(W[f]) ? W[f] : [W[f]];
13450
13450
  for (let S = 0, R = I.length; S < R; S++) {
13451
13451
  const v = I[S];
13452
- if (m(v, g, S, f) === !0) {
13452
+ if (m(v, f, S, g) === !0) {
13453
13453
  const k = v.__offset, w = Array.isArray(v.value) ? v.value : [v.value];
13454
13454
  let K = 0;
13455
13455
  for (let H = 0; H < w.length; H++) {
@@ -13462,36 +13462,36 @@ function hY(i, t, e, n) {
13462
13462
  }
13463
13463
  i.bindBuffer(i.UNIFORM_BUFFER, null);
13464
13464
  }
13465
- function m(X, y, W, f) {
13466
- const g = X.value, L = y + "_" + W;
13467
- if (f[L] === void 0)
13468
- return typeof g == "number" || typeof g == "boolean" ? f[L] = g : f[L] = g.clone(), !0;
13465
+ function m(X, y, W, g) {
13466
+ const f = X.value, L = y + "_" + W;
13467
+ if (g[L] === void 0)
13468
+ return typeof f == "number" || typeof f == "boolean" ? g[L] = f : g[L] = f.clone(), !0;
13469
13469
  {
13470
- const I = f[L];
13471
- if (typeof g == "number" || typeof g == "boolean") {
13472
- if (I !== g)
13473
- return f[L] = g, !0;
13474
- } else if (I.equals(g) === !1)
13475
- return I.copy(g), !0;
13470
+ const I = g[L];
13471
+ if (typeof f == "number" || typeof f == "boolean") {
13472
+ if (I !== f)
13473
+ return g[L] = f, !0;
13474
+ } else if (I.equals(f) === !1)
13475
+ return I.copy(f), !0;
13476
13476
  }
13477
13477
  return !1;
13478
13478
  }
13479
13479
  function b(X) {
13480
13480
  const y = X.uniforms;
13481
13481
  let W = 0;
13482
- const f = 16;
13482
+ const g = 16;
13483
13483
  for (let L = 0, I = y.length; L < I; L++) {
13484
13484
  const S = Array.isArray(y[L]) ? y[L] : [y[L]];
13485
13485
  for (let R = 0, v = S.length; R < v; R++) {
13486
13486
  const k = S[R], w = Array.isArray(k.value) ? k.value : [k.value];
13487
13487
  for (let K = 0, H = w.length; K < H; K++) {
13488
- const z = w[K], E = G(z), Q = W % f;
13489
- Q !== 0 && f - Q < E.boundary && (W += f - Q), k.__data = new Float32Array(E.storage / Float32Array.BYTES_PER_ELEMENT), k.__offset = W, W += E.storage;
13488
+ const z = w[K], E = G(z), Q = W % g;
13489
+ Q !== 0 && g - Q < E.boundary && (W += g - Q), k.__data = new Float32Array(E.storage / Float32Array.BYTES_PER_ELEMENT), k.__offset = W, W += E.storage;
13490
13490
  }
13491
13491
  }
13492
13492
  }
13493
- const g = W % f;
13494
- return g > 0 && (W += f - g), X.__size = W, X.__cache = {}, this;
13493
+ const f = W % g;
13494
+ return f > 0 && (W += g - f), X.__size = W, X.__cache = {}, this;
13495
13495
  }
13496
13496
  function G(X) {
13497
13497
  const y = {
@@ -13557,7 +13557,7 @@ class Uy {
13557
13557
  onShaderError: null
13558
13558
  }, this.autoClear = !0, this.autoClearColor = !0, this.autoClearDepth = !0, this.autoClearStencil = !0, this.sortObjects = !0, this.clippingPlanes = [], this.localClippingEnabled = !1, this._outputColorSpace = ye, this.toneMapping = Hi, this.toneMappingExposure = 1;
13559
13559
  const y = this;
13560
- let W = !1, f = 0, g = 0, L = null, I = -1, S = null;
13560
+ let W = !1, g = 0, f = 0, L = null, I = -1, S = null;
13561
13561
  const R = new fe(), v = new fe();
13562
13562
  let k = null;
13563
13563
  const w = new lt(0);
@@ -13969,9 +13969,9 @@ class Uy {
13969
13969
  return T.isMeshLambertMaterial || T.isMeshToonMaterial || T.isMeshPhongMaterial || T.isMeshStandardMaterial || T.isShadowMaterial || T.isShaderMaterial && T.lights === !0;
13970
13970
  }
13971
13971
  this.getActiveCubeFace = function() {
13972
- return f;
13973
- }, this.getActiveMipmapLevel = function() {
13974
13972
  return g;
13973
+ }, this.getActiveMipmapLevel = function() {
13974
+ return f;
13975
13975
  }, this.getRenderTarget = function() {
13976
13976
  return L;
13977
13977
  }, this.setRenderTargetTextures = function(T, j, V) {
@@ -13982,7 +13982,7 @@ class Uy {
13982
13982
  const V = nt.get(T);
13983
13983
  V.__webglFramebuffer = j, V.__useDefaultFramebuffer = j === void 0;
13984
13984
  }, this.setRenderTarget = function(T, j = 0, V = 0) {
13985
- L = T, f = j, g = V;
13985
+ L = T, g = j, f = V;
13986
13986
  let x = !0, C = null, J = !1, P = !1;
13987
13987
  if (T) {
13988
13988
  const q = nt.get(T);
@@ -14091,7 +14091,7 @@ class Uy {
14091
14091
  }, this.initTexture = function(T) {
14092
14092
  T.isCubeTexture ? ot.setTextureCube(T, 0) : T.isData3DTexture ? ot.setTexture3D(T, 0) : T.isDataArrayTexture || T.isCompressedArrayTexture ? ot.setTexture2DArray(T, 0) : ot.setTexture2D(T, 0), ut.unbindTexture();
14093
14093
  }, this.resetState = function() {
14094
- f = 0, g = 0, L = null, ut.reset(), $t.reset();
14094
+ g = 0, f = 0, L = null, ut.reset(), $t.reset();
14095
14095
  }, typeof __THREE_DEVTOOLS__ != "undefined" && __THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe", { detail: this }));
14096
14096
  }
14097
14097
  get coordinateSystem() {
@@ -15012,10 +15012,10 @@ class Ey extends Gt {
15012
15012
  if (c[X].visible && c[X].active) {
15013
15013
  const W = c[X].geometryIndex;
15014
15014
  this.getMatrixAt(X, $i), this.getBoundingSphereAt(W, Hs).applyMatrix4($i);
15015
- let f = !1;
15016
- if (u && (f = !jm.intersectsSphere(Hs)), !f) {
15017
- const g = WY.subVectors(Hs.center, uo).dot(R5);
15018
- Am.push(h[W], g, X);
15015
+ let g = !1;
15016
+ if (u && (g = !jm.intersectsSphere(Hs)), !g) {
15017
+ const f = WY.subVectors(Hs.center, uo).dot(R5);
15018
+ Am.push(h[W], f, X);
15019
15019
  }
15020
15020
  }
15021
15021
  const Z = Am.list, p = this.customSort;
@@ -15929,17 +15929,17 @@ class Qa extends Ot {
15929
15929
  Z = t[X + 1].x - t[X].x, p = t[X + 1].y - t[X].y, m.x = p * 1, m.y = -Z, m.z = p * 0, b.copy(m), m.x += G.x, m.y += G.y, m.z += G.z, m.normalize(), c.push(m.x, m.y, m.z), G.copy(b);
15930
15930
  }
15931
15931
  for (let X = 0; X <= e; X++) {
15932
- const y = n + X * r * s, W = Math.sin(y), f = Math.cos(y);
15933
- for (let g = 0; g <= t.length - 1; g++) {
15934
- h.x = t[g].x * W, h.y = t[g].y, h.z = t[g].x * f, a.push(h.x, h.y, h.z), u.x = X / e, u.y = g / (t.length - 1), o.push(u.x, u.y);
15935
- const L = c[3 * g + 0] * W, I = c[3 * g + 1], S = c[3 * g + 0] * f;
15932
+ const y = n + X * r * s, W = Math.sin(y), g = Math.cos(y);
15933
+ for (let f = 0; f <= t.length - 1; f++) {
15934
+ h.x = t[f].x * W, h.y = t[f].y, h.z = t[f].x * g, a.push(h.x, h.y, h.z), u.x = X / e, u.y = f / (t.length - 1), o.push(u.x, u.y);
15935
+ const L = c[3 * f + 0] * W, I = c[3 * f + 1], S = c[3 * f + 0] * g;
15936
15936
  d.push(L, I, S);
15937
15937
  }
15938
15938
  }
15939
15939
  for (let X = 0; X < e; X++)
15940
15940
  for (let y = 0; y < t.length - 1; y++) {
15941
- const W = y + X * t.length, f = W, g = W + t.length, L = W + t.length + 1, I = W + 1;
15942
- l.push(f, g, I), l.push(L, I, g);
15941
+ const W = y + X * t.length, g = W, f = W + t.length, L = W + t.length + 1, I = W + 1;
15942
+ l.push(g, f, I), l.push(L, I, f);
15943
15943
  }
15944
15944
  this.setIndex(l), this.setAttribute("position", new Bt(a, 3)), this.setAttribute("uv", new Bt(o, 2)), this.setAttribute("normal", new Bt(d, 3));
15945
15945
  }
@@ -16009,26 +16009,26 @@ class c0 extends Ot {
16009
16009
  let p = 0;
16010
16010
  X(), a === !1 && (t > 0 && y(!0), e > 0 && y(!1)), this.setIndex(r), this.setAttribute("position", new Bt(h, 3)), this.setAttribute("normal", new Bt(u, 3)), this.setAttribute("uv", new Bt(m, 2));
16011
16011
  function X() {
16012
- const W = new N(), f = new N();
16013
- let g = 0;
16012
+ const W = new N(), g = new N();
16013
+ let f = 0;
16014
16014
  const L = (e - t) / n;
16015
16015
  for (let I = 0; I <= l; I++) {
16016
16016
  const S = [], R = I / l, v = R * (e - t) + t;
16017
16017
  for (let k = 0; k <= s; k++) {
16018
16018
  const w = k / s, K = w * c + o, H = Math.sin(K), z = Math.cos(K);
16019
- f.x = v * H, f.y = -R * n + Z, f.z = v * z, h.push(f.x, f.y, f.z), W.set(H, L, z).normalize(), u.push(W.x, W.y, W.z), m.push(w, 1 - R), S.push(b++);
16019
+ g.x = v * H, g.y = -R * n + Z, g.z = v * z, h.push(g.x, g.y, g.z), W.set(H, L, z).normalize(), u.push(W.x, W.y, W.z), m.push(w, 1 - R), S.push(b++);
16020
16020
  }
16021
16021
  G.push(S);
16022
16022
  }
16023
16023
  for (let I = 0; I < s; I++)
16024
16024
  for (let S = 0; S < l; S++) {
16025
16025
  const R = G[S][I], v = G[S + 1][I], k = G[S + 1][I + 1], w = G[S][I + 1];
16026
- r.push(R, v, w), r.push(v, k, w), g += 6;
16026
+ r.push(R, v, w), r.push(v, k, w), f += 6;
16027
16027
  }
16028
- d.addGroup(p, g, 0), p += g;
16028
+ d.addGroup(p, f, 0), p += f;
16029
16029
  }
16030
16030
  function y(W) {
16031
- const f = b, g = new _(), L = new N();
16031
+ const g = b, f = new _(), L = new N();
16032
16032
  let I = 0;
16033
16033
  const S = W === !0 ? t : e, R = W === !0 ? 1 : -1;
16034
16034
  for (let k = 1; k <= s; k++)
@@ -16036,10 +16036,10 @@ class c0 extends Ot {
16036
16036
  const v = b;
16037
16037
  for (let k = 0; k <= s; k++) {
16038
16038
  const K = k / s * c + o, H = Math.cos(K), z = Math.sin(K);
16039
- L.x = S * z, L.y = Z * R, L.z = S * H, h.push(L.x, L.y, L.z), u.push(0, R, 0), g.x = H * 0.5 + 0.5, g.y = z * 0.5 * R + 0.5, m.push(g.x, g.y), b++;
16039
+ L.x = S * z, L.y = Z * R, L.z = S * H, h.push(L.x, L.y, L.z), u.push(0, R, 0), f.x = H * 0.5 + 0.5, f.y = z * 0.5 * R + 0.5, m.push(f.x, f.y), b++;
16040
16040
  }
16041
16041
  for (let k = 0; k < s; k++) {
16042
- const w = f + k, K = v + k;
16042
+ const w = g + k, K = v + k;
16043
16043
  W === !0 ? r.push(K, K + 1, w) : r.push(K + 1, K, w), I += 3;
16044
16044
  }
16045
16045
  d.addGroup(p, I, W === !0 ? 1 : 2), p += I;
@@ -16079,20 +16079,20 @@ class Ws extends Ot {
16079
16079
  const l = [], a = [];
16080
16080
  o(s), d(n), r(), this.setAttribute("position", new Bt(l, 3)), this.setAttribute("normal", new Bt(l.slice(), 3)), this.setAttribute("uv", new Bt(a, 2)), s === 0 ? this.computeVertexNormals() : this.normalizeNormals();
16081
16081
  function o(X) {
16082
- const y = new N(), W = new N(), f = new N();
16083
- for (let g = 0; g < e.length; g += 3)
16084
- m(e[g + 0], y), m(e[g + 1], W), m(e[g + 2], f), c(y, W, f, X);
16082
+ const y = new N(), W = new N(), g = new N();
16083
+ for (let f = 0; f < e.length; f += 3)
16084
+ m(e[f + 0], y), m(e[f + 1], W), m(e[f + 2], g), c(y, W, g, X);
16085
16085
  }
16086
- function c(X, y, W, f) {
16087
- const g = f + 1, L = [];
16088
- for (let I = 0; I <= g; I++) {
16086
+ function c(X, y, W, g) {
16087
+ const f = g + 1, L = [];
16088
+ for (let I = 0; I <= f; I++) {
16089
16089
  L[I] = [];
16090
- const S = X.clone().lerp(W, I / g), R = y.clone().lerp(W, I / g), v = g - I;
16090
+ const S = X.clone().lerp(W, I / f), R = y.clone().lerp(W, I / f), v = f - I;
16091
16091
  for (let k = 0; k <= v; k++)
16092
- k === 0 && I === g ? L[I][k] = S : L[I][k] = S.clone().lerp(R, k / v);
16092
+ k === 0 && I === f ? L[I][k] = S : L[I][k] = S.clone().lerp(R, k / v);
16093
16093
  }
16094
- for (let I = 0; I < g; I++)
16095
- for (let S = 0; S < 2 * (g - I) - 1; S++) {
16094
+ for (let I = 0; I < f; I++)
16095
+ for (let S = 0; S < 2 * (f - I) - 1; S++) {
16096
16096
  const R = Math.floor(S / 2);
16097
16097
  S % 2 === 0 ? (u(L[I][R + 1]), u(L[I + 1][R]), u(L[I][R])) : (u(L[I][R + 1]), u(L[I + 1][R + 1]), u(L[I + 1][R]));
16098
16098
  }
@@ -16106,15 +16106,15 @@ class Ws extends Ot {
16106
16106
  const X = new N();
16107
16107
  for (let y = 0; y < l.length; y += 3) {
16108
16108
  X.x = l[y + 0], X.y = l[y + 1], X.z = l[y + 2];
16109
- const W = Z(X) / 2 / Math.PI + 0.5, f = p(X) / Math.PI + 0.5;
16110
- a.push(W, 1 - f);
16109
+ const W = Z(X) / 2 / Math.PI + 0.5, g = p(X) / Math.PI + 0.5;
16110
+ a.push(W, 1 - g);
16111
16111
  }
16112
16112
  b(), h();
16113
16113
  }
16114
16114
  function h() {
16115
16115
  for (let X = 0; X < a.length; X += 6) {
16116
- const y = a[X + 0], W = a[X + 2], f = a[X + 4], g = Math.max(y, W, f), L = Math.min(y, W, f);
16117
- g > 0.9 && L < 0.1 && (y < 0.2 && (a[X + 0] += 1), W < 0.2 && (a[X + 2] += 1), f < 0.2 && (a[X + 4] += 1));
16116
+ const y = a[X + 0], W = a[X + 2], g = a[X + 4], f = Math.max(y, W, g), L = Math.min(y, W, g);
16117
+ f > 0.9 && L < 0.1 && (y < 0.2 && (a[X + 0] += 1), W < 0.2 && (a[X + 2] += 1), g < 0.2 && (a[X + 4] += 1));
16118
16118
  }
16119
16119
  }
16120
16120
  function u(X) {
@@ -16125,15 +16125,15 @@ class Ws extends Ot {
16125
16125
  y.x = t[W + 0], y.y = t[W + 1], y.z = t[W + 2];
16126
16126
  }
16127
16127
  function b() {
16128
- const X = new N(), y = new N(), W = new N(), f = new N(), g = new _(), L = new _(), I = new _();
16128
+ const X = new N(), y = new N(), W = new N(), g = new N(), f = new _(), L = new _(), I = new _();
16129
16129
  for (let S = 0, R = 0; S < l.length; S += 9, R += 6) {
16130
- X.set(l[S + 0], l[S + 1], l[S + 2]), y.set(l[S + 3], l[S + 4], l[S + 5]), W.set(l[S + 6], l[S + 7], l[S + 8]), g.set(a[R + 0], a[R + 1]), L.set(a[R + 2], a[R + 3]), I.set(a[R + 4], a[R + 5]), f.copy(X).add(y).add(W).divideScalar(3);
16131
- const v = Z(f);
16132
- G(g, R + 0, X, v), G(L, R + 2, y, v), G(I, R + 4, W, v);
16130
+ X.set(l[S + 0], l[S + 1], l[S + 2]), y.set(l[S + 3], l[S + 4], l[S + 5]), W.set(l[S + 6], l[S + 7], l[S + 8]), f.set(a[R + 0], a[R + 1]), L.set(a[R + 2], a[R + 3]), I.set(a[R + 4], a[R + 5]), g.copy(X).add(y).add(W).divideScalar(3);
16131
+ const v = Z(g);
16132
+ G(f, R + 0, X, v), G(L, R + 2, y, v), G(I, R + 4, W, v);
16133
16133
  }
16134
16134
  }
16135
- function G(X, y, W, f) {
16136
- f < 0 && X.x === 1 && (a[y] = X.x - 1), W.x === 0 && W.z === 0 && (a[y] = f / 2 / Math.PI + 0.5);
16135
+ function G(X, y, W, g) {
16136
+ g < 0 && X.x === 1 && (a[y] = X.x - 1), W.x === 0 && W.z === 0 && (a[y] = g / 2 / Math.PI + 0.5);
16137
16137
  }
16138
16138
  function Z(X) {
16139
16139
  return Math.atan2(X.z, -X.x);
@@ -16348,8 +16348,8 @@ class Ay extends Ot {
16348
16348
  const { a: G, b: Z, c: p } = Od;
16349
16349
  if (G.fromBufferAttribute(o, d[0]), Z.fromBufferAttribute(o, d[1]), p.fromBufferAttribute(o, d[2]), Od.getNormal($m), h[0] = `${Math.round(G.x * s)},${Math.round(G.y * s)},${Math.round(G.z * s)}`, h[1] = `${Math.round(Z.x * s)},${Math.round(Z.y * s)},${Math.round(Z.z * s)}`, h[2] = `${Math.round(p.x * s)},${Math.round(p.y * s)},${Math.round(p.z * s)}`, !(h[0] === h[1] || h[1] === h[2] || h[2] === h[0]))
16350
16350
  for (let X = 0; X < 3; X++) {
16351
- const y = (X + 1) % 3, W = h[X], f = h[y], g = Od[r[X]], L = Od[r[y]], I = `${W}_${f}`, S = `${f}_${W}`;
16352
- S in u && u[S] ? ($m.dot(u[S].normal) <= l && (m.push(g.x, g.y, g.z), m.push(L.x, L.y, L.z)), u[S] = null) : I in u || (u[I] = {
16351
+ const y = (X + 1) % 3, W = h[X], g = h[y], f = Od[r[X]], L = Od[r[y]], I = `${W}_${g}`, S = `${g}_${W}`;
16352
+ S in u && u[S] ? ($m.dot(u[S].normal) <= l && (m.push(f.x, f.y, f.z), m.push(L.x, L.y, L.z)), u[S] = null) : I in u || (u[I] = {
16353
16353
  index0: d[X],
16354
16354
  index1: d[y],
16355
16355
  normal: $m.clone()
@@ -16702,8 +16702,8 @@ class Au extends Ot {
16702
16702
  const c = [], d = e.curveSegments !== void 0 ? e.curveSegments : 12, r = e.steps !== void 0 ? e.steps : 1, h = e.depth !== void 0 ? e.depth : 1;
16703
16703
  let u = e.bevelEnabled !== void 0 ? e.bevelEnabled : !0, m = e.bevelThickness !== void 0 ? e.bevelThickness : 0.2, b = e.bevelSize !== void 0 ? e.bevelSize : m - 0.1, G = e.bevelOffset !== void 0 ? e.bevelOffset : 0, Z = e.bevelSegments !== void 0 ? e.bevelSegments : 3;
16704
16704
  const p = e.extrudePath, X = e.UVGenerator !== void 0 ? e.UVGenerator : DY;
16705
- let y, W = !1, f, g, L, I;
16706
- p && (y = p.getSpacedPoints(r), W = !0, u = !1, f = p.computeFrenetFrames(r, !1), g = new N(), L = new N(), I = new N()), u || (Z = 0, m = 0, b = 0, G = 0);
16705
+ let y, W = !1, g, f, L, I;
16706
+ p && (y = p.getSpacedPoints(r), W = !0, u = !1, g = p.computeFrenetFrames(r, !1), f = new N(), L = new N(), I = new N()), u || (Z = 0, m = 0, b = 0, G = 0);
16707
16707
  const S = o.extractPoints(d);
16708
16708
  let R = S.shape;
16709
16709
  const v = S.holes;
@@ -16769,12 +16769,12 @@ class Au extends Ot {
16769
16769
  const jt = b + G;
16770
16770
  for (let M = 0; M < z; M++) {
16771
16771
  const ft = u ? H(R[M], Ut[M], jt) : R[M];
16772
- W ? (L.copy(f.normals[0]).multiplyScalar(ft.x), g.copy(f.binormals[0]).multiplyScalar(ft.y), I.copy(y[0]).add(L).add(g), St(I.x, I.y, I.z)) : St(ft.x, ft.y, 0);
16772
+ W ? (L.copy(g.normals[0]).multiplyScalar(ft.x), f.copy(g.binormals[0]).multiplyScalar(ft.y), I.copy(y[0]).add(L).add(f), St(I.x, I.y, I.z)) : St(ft.x, ft.y, 0);
16773
16773
  }
16774
16774
  for (let M = 1; M <= r; M++)
16775
16775
  for (let ft = 0; ft < z; ft++) {
16776
16776
  const gt = u ? H(R[ft], Ut[ft], jt) : R[ft];
16777
- W ? (L.copy(f.normals[M]).multiplyScalar(gt.x), g.copy(f.binormals[M]).multiplyScalar(gt.y), I.copy(y[M]).add(L).add(g), St(I.x, I.y, I.z)) : St(gt.x, gt.y, h / r * M);
16777
+ W ? (L.copy(g.normals[M]).multiplyScalar(gt.x), f.copy(g.binormals[M]).multiplyScalar(gt.y), I.copy(y[M]).add(L).add(f), St(I.x, I.y, I.z)) : St(gt.x, gt.y, h / r * M);
16778
16778
  }
16779
16779
  for (let M = Z - 1; M >= 0; M--) {
16780
16780
  const ft = M / Z, gt = m * Math.cos(ft * Math.PI / 2), Ct = b * Math.sin(ft * Math.PI / 2) + G;
@@ -17100,8 +17100,8 @@ class Qc extends Ot {
17100
17100
  for (let G = 0; G < s; G++) {
17101
17101
  const Z = G * (n + 1);
17102
17102
  for (let p = 0; p < n; p++) {
17103
- const X = p + Z, y = X, W = X + n + 1, f = X + n + 2, g = X + 1;
17104
- o.push(y, W, g), o.push(W, f, g);
17103
+ const X = p + Z, y = X, W = X + n + 1, g = X + n + 2, f = X + 1;
17104
+ o.push(y, W, f), o.push(W, g, f);
17105
17105
  }
17106
17106
  }
17107
17107
  this.setIndex(o), this.setAttribute("position", new Bt(c, 3)), this.setAttribute("normal", new Bt(d, 3)), this.setAttribute("uv", new Bt(r, 2));
@@ -17146,8 +17146,8 @@ class Du extends Ot {
17146
17146
  s.push(X.x, X.y, 0), l.push(0, 0, 1), a.push(X.x, X.y);
17147
17147
  }
17148
17148
  for (let Z = 0, p = G.length; Z < p; Z++) {
17149
- const X = G[Z], y = X[0] + h, W = X[1] + h, f = X[2] + h;
17150
- n.push(y, W, f), c += 3;
17149
+ const X = G[Z], y = X[0] + h, W = X[1] + h, g = X[2] + h;
17150
+ n.push(y, W, g), c += 3;
17151
17151
  }
17152
17152
  }
17153
17153
  }
@@ -17195,16 +17195,16 @@ class Vs extends Ot {
17195
17195
  const X = [], y = p / n;
17196
17196
  let W = 0;
17197
17197
  p === 0 && a === 0 ? W = 0.5 / e : p === n && c === Math.PI && (W = -0.5 / e);
17198
- for (let f = 0; f <= e; f++) {
17199
- const g = f / e;
17200
- h.x = -t * Math.cos(s + g * l) * Math.sin(a + y * o), h.y = t * Math.cos(a + y * o), h.z = t * Math.sin(s + g * l) * Math.sin(a + y * o), b.push(h.x, h.y, h.z), u.copy(h).normalize(), G.push(u.x, u.y, u.z), Z.push(g + W, 1 - y), X.push(d++);
17198
+ for (let g = 0; g <= e; g++) {
17199
+ const f = g / e;
17200
+ h.x = -t * Math.cos(s + f * l) * Math.sin(a + y * o), h.y = t * Math.cos(a + y * o), h.z = t * Math.sin(s + f * l) * Math.sin(a + y * o), b.push(h.x, h.y, h.z), u.copy(h).normalize(), G.push(u.x, u.y, u.z), Z.push(f + W, 1 - y), X.push(d++);
17201
17201
  }
17202
17202
  r.push(X);
17203
17203
  }
17204
17204
  for (let p = 0; p < n; p++)
17205
17205
  for (let X = 0; X < e; X++) {
17206
- const y = r[p][X + 1], W = r[p][X], f = r[p + 1][X], g = r[p + 1][X + 1];
17207
- (p !== 0 || a > 0) && m.push(y, W, g), (p !== n - 1 || c < Math.PI) && m.push(W, f, g);
17206
+ const y = r[p][X + 1], W = r[p][X], g = r[p + 1][X], f = r[p + 1][X + 1];
17207
+ (p !== 0 || a > 0) && m.push(y, W, f), (p !== n - 1 || c < Math.PI) && m.push(W, g, f);
17208
17208
  }
17209
17209
  this.setIndex(m), this.setAttribute("position", new Bt(b, 3)), this.setAttribute("normal", new Bt(G, 3)), this.setAttribute("uv", new Bt(Z, 2));
17210
17210
  }
@@ -17296,20 +17296,20 @@ class Ac extends Ot {
17296
17296
  for (let y = 0; y <= n; ++y) {
17297
17297
  const W = y / n * l * Math.PI * 2;
17298
17298
  X(W, l, a, t, m), X(W + 0.01, l, a, t, b), Z.subVectors(b, m), p.addVectors(b, m), G.crossVectors(Z, p), p.crossVectors(G, Z), G.normalize(), p.normalize();
17299
- for (let f = 0; f <= s; ++f) {
17300
- const g = f / s * Math.PI * 2, L = -e * Math.cos(g), I = e * Math.sin(g);
17301
- h.x = m.x + (L * p.x + I * G.x), h.y = m.y + (L * p.y + I * G.y), h.z = m.z + (L * p.z + I * G.z), c.push(h.x, h.y, h.z), u.subVectors(h, m).normalize(), d.push(u.x, u.y, u.z), r.push(y / n), r.push(f / s);
17299
+ for (let g = 0; g <= s; ++g) {
17300
+ const f = g / s * Math.PI * 2, L = -e * Math.cos(f), I = e * Math.sin(f);
17301
+ h.x = m.x + (L * p.x + I * G.x), h.y = m.y + (L * p.y + I * G.y), h.z = m.z + (L * p.z + I * G.z), c.push(h.x, h.y, h.z), u.subVectors(h, m).normalize(), d.push(u.x, u.y, u.z), r.push(y / n), r.push(g / s);
17302
17302
  }
17303
17303
  }
17304
17304
  for (let y = 1; y <= n; y++)
17305
17305
  for (let W = 1; W <= s; W++) {
17306
- const f = (s + 1) * (y - 1) + (W - 1), g = (s + 1) * y + (W - 1), L = (s + 1) * y + W, I = (s + 1) * (y - 1) + W;
17307
- o.push(f, g, I), o.push(g, L, I);
17306
+ const g = (s + 1) * (y - 1) + (W - 1), f = (s + 1) * y + (W - 1), L = (s + 1) * y + W, I = (s + 1) * (y - 1) + W;
17307
+ o.push(g, f, I), o.push(f, L, I);
17308
17308
  }
17309
17309
  this.setIndex(o), this.setAttribute("position", new Bt(c, 3)), this.setAttribute("normal", new Bt(d, 3)), this.setAttribute("uv", new Bt(r, 2));
17310
- function X(y, W, f, g, L) {
17311
- const I = Math.cos(y), S = Math.sin(y), R = f / W * y, v = Math.cos(R);
17312
- L.x = g * (2 + v) * 0.5 * I, L.y = g * (2 + v) * S * 0.5, L.z = g * Math.sin(R) * 0.5;
17310
+ function X(y, W, g, f, L) {
17311
+ const I = Math.cos(y), S = Math.sin(y), R = g / W * y, v = Math.cos(R);
17312
+ L.x = f * (2 + v) * 0.5 * I, L.y = f * (2 + v) * S * 0.5, L.z = f * Math.sin(R) * 0.5;
17313
17313
  }
17314
17314
  }
17315
17315
  copy(t) {
@@ -17341,17 +17341,17 @@ class ja extends Ot {
17341
17341
  }
17342
17342
  function Z(y) {
17343
17343
  r = t.getPointAt(y / e, r);
17344
- const W = a.normals[y], f = a.binormals[y];
17345
- for (let g = 0; g <= s; g++) {
17346
- const L = g / s * Math.PI * 2, I = Math.sin(L), S = -Math.cos(L);
17347
- c.x = S * W.x + I * f.x, c.y = S * W.y + I * f.y, c.z = S * W.z + I * f.z, c.normalize(), u.push(c.x, c.y, c.z), o.x = r.x + n * c.x, o.y = r.y + n * c.y, o.z = r.z + n * c.z, h.push(o.x, o.y, o.z);
17344
+ const W = a.normals[y], g = a.binormals[y];
17345
+ for (let f = 0; f <= s; f++) {
17346
+ const L = f / s * Math.PI * 2, I = Math.sin(L), S = -Math.cos(L);
17347
+ c.x = S * W.x + I * g.x, c.y = S * W.y + I * g.y, c.z = S * W.z + I * g.z, c.normalize(), u.push(c.x, c.y, c.z), o.x = r.x + n * c.x, o.y = r.y + n * c.y, o.z = r.z + n * c.z, h.push(o.x, o.y, o.z);
17348
17348
  }
17349
17349
  }
17350
17350
  function p() {
17351
17351
  for (let y = 1; y <= e; y++)
17352
17352
  for (let W = 1; W <= s; W++) {
17353
- const f = (s + 1) * (y - 1) + (W - 1), g = (s + 1) * y + (W - 1), L = (s + 1) * y + W, I = (s + 1) * (y - 1) + W;
17354
- b.push(f, g, I), b.push(g, L, I);
17353
+ const g = (s + 1) * (y - 1) + (W - 1), f = (s + 1) * y + (W - 1), L = (s + 1) * y + W, I = (s + 1) * (y - 1) + W;
17354
+ b.push(g, f, I), b.push(f, L, I);
17355
17355
  }
17356
17356
  }
17357
17357
  function X() {
@@ -17796,8 +17796,8 @@ class cW extends Aa {
17796
17796
  }
17797
17797
  interpolate_(t, e, n, s) {
17798
17798
  const l = this.resultBuffer, a = this.sampleValues, o = this.valueSize, c = t * o, d = c - o, r = this._offsetPrev, h = this._offsetNext, u = this._weightPrev, m = this._weightNext, b = (n - e) / (s - e), G = b * b, Z = G * b, p = -u * Z + 2 * u * G - u * b, X = (1 + u) * Z + (-1.5 - 2 * u) * G + (-0.5 + u) * b + 1, y = (-1 - m) * Z + (1.5 + m) * G + 0.5 * b, W = m * Z - m * G;
17799
- for (let f = 0; f !== o; ++f)
17800
- l[f] = p * a[r + f] + X * a[d + f] + y * a[c + f] + W * a[h + f];
17799
+ for (let g = 0; g !== o; ++g)
17800
+ l[g] = p * a[r + g] + X * a[d + g] + y * a[c + g] + W * a[h + g];
17801
17801
  return l;
17802
17802
  }
17803
17803
  }
@@ -18375,10 +18375,10 @@ class nn extends H0 {
18375
18375
  p.close();
18376
18376
  else {
18377
18377
  G += W.byteLength;
18378
- const f = new ProgressEvent("progress", { lengthComputable: b, loaded: G, total: m });
18379
- for (let g = 0, L = r.length; g < L; g++) {
18380
- const I = r[g];
18381
- I.onProgress && I.onProgress(f);
18378
+ const g = new ProgressEvent("progress", { lengthComputable: b, loaded: G, total: m });
18379
+ for (let f = 0, L = r.length; f < L; f++) {
18380
+ const I = r[f];
18381
+ I.onProgress && I.onProgress(g);
18382
18382
  }
18383
18383
  p.enqueue(W), X();
18384
18384
  }
@@ -20244,8 +20244,8 @@ class LI {
20244
20244
  e[Z.uuid] = b, t[b] = Z, e[m] = G, t[G] = u;
20245
20245
  for (let p = 0, X = a; p !== X; ++p) {
20246
20246
  const y = l[p], W = y[G];
20247
- let f = y[b];
20248
- y[b] = W, f === void 0 && (f = new Le(u, n[p], s[p])), y[G] = f;
20247
+ let g = y[b];
20248
+ y[b] = W, g === void 0 && (g = new Le(u, n[p], s[p])), y[G] = g;
20249
20249
  }
20250
20250
  } else t[b] !== o && console.error("THREE.AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes.");
20251
20251
  }
@@ -21475,18 +21475,18 @@ class EI {
21475
21475
  function e(p) {
21476
21476
  const X = [];
21477
21477
  for (let y = 0, W = p.length; y < W; y++) {
21478
- const f = p[y], g = new Ji();
21479
- g.curves = f.curves, X.push(g);
21478
+ const g = p[y], f = new Ji();
21479
+ f.curves = g.curves, X.push(f);
21480
21480
  }
21481
21481
  return X;
21482
21482
  }
21483
21483
  function n(p, X) {
21484
21484
  const y = X.length;
21485
21485
  let W = !1;
21486
- for (let f = y - 1, g = 0; g < y; f = g++) {
21487
- let L = X[f], I = X[g], S = I.x - L.x, R = I.y - L.y;
21486
+ for (let g = y - 1, f = 0; f < y; g = f++) {
21487
+ let L = X[g], I = X[f], S = I.x - L.x, R = I.y - L.y;
21488
21488
  if (Math.abs(R) > Number.EPSILON) {
21489
- if (R < 0 && (L = X[g], S = -S, I = X[f], R = -R), p.y < L.y || p.y > I.y) continue;
21489
+ if (R < 0 && (L = X[f], S = -S, I = X[g], R = -R), p.y < L.y || p.y > I.y) continue;
21490
21490
  if (p.y === L.y) {
21491
21491
  if (p.x === L.x) return !0;
21492
21492
  } else {
@@ -21521,9 +21521,9 @@ class EI {
21521
21521
  for (let y = 0, W = u.length; y < W; y++)
21522
21522
  h[y] = [];
21523
21523
  for (let y = 0, W = u.length; y < W; y++) {
21524
- const f = m[y];
21525
- for (let g = 0; g < f.length; g++) {
21526
- const L = f[g];
21524
+ const g = m[y];
21525
+ for (let f = 0; f < g.length; f++) {
21526
+ const L = g[f];
21527
21527
  let I = !0;
21528
21528
  for (let S = 0; S < u.length; S++)
21529
21529
  n(L.p, u[S].p) && (y !== S && X++, I ? (I = !1, h[S].push(L)) : p = !0);
@@ -23159,7 +23159,7 @@ class gN extends pi {
23159
23159
  }
23160
23160
  _initSlider() {
23161
23161
  this._hasSlider = !0, this.$slider = document.createElement("div"), this.$slider.classList.add("slider"), this.$fill = document.createElement("div"), this.$fill.classList.add("fill"), this.$slider.appendChild(this.$fill), this.$widget.insertBefore(this.$slider, this.$input), this.domElement.classList.add("hasSlider");
23162
- const t = (p, X, y, W, f) => (p - X) / (y - X) * (f - W) + W, e = (p) => {
23162
+ const t = (p, X, y, W, g) => (p - X) / (y - X) * (g - W) + W, e = (p) => {
23163
23163
  const X = this.$slider.getBoundingClientRect();
23164
23164
  let y = t(p, X.left, X.right, this._min, this._max);
23165
23165
  this._snapClampSetValue(y);
@@ -24580,8 +24580,8 @@ function sV(i, t) {
24580
24580
  s === 1 ? n = hn + ke : s === -1 && (n = -hn - ke);
24581
24581
  for (var d = 0, r = i.length; d < r; ++d)
24582
24582
  if (u = (h = i[d]).length)
24583
- for (var h, u, m = h[u - 1], b = o1(m), G = m[1] / 2 + Fh, Z = ie(G), p = ce(G), X = 0; X < u; ++X, b = W, Z = g, p = L, m = y) {
24584
- var y = h[X], W = o1(y), f = y[1] / 2 + Fh, g = ie(f), L = ce(f), I = W - b, S = I >= 0 ? 1 : -1, R = S * I, v = R > Ce, k = Z * g;
24583
+ for (var h, u, m = h[u - 1], b = o1(m), G = m[1] / 2 + Fh, Z = ie(G), p = ce(G), X = 0; X < u; ++X, b = W, Z = f, p = L, m = y) {
24584
+ var y = h[X], W = o1(y), g = y[1] / 2 + Fh, f = ie(g), L = ce(g), I = W - b, S = I >= 0 ? 1 : -1, R = S * I, v = R > Ce, k = Z * f;
24585
24585
  if (c.add(Mn(k * S * ie(R), p * L + k * ce(R))), a += v ? I + S * mn : I, v ^ b >= e ^ W >= e) {
24586
24586
  var w = Ta(Vl(m), Vl(y));
24587
24587
  Kh(w);
@@ -24611,11 +24611,11 @@ function lV(i, t, e, n) {
24611
24611
  s.polygonStart(), s.lineStart(), e(null, null, 1, s), s.lineEnd(), s.polygonEnd();
24612
24612
  }
24613
24613
  };
24614
- function m(W, f) {
24615
- i(W, f) && s.point(W, f);
24614
+ function m(W, g) {
24615
+ i(W, g) && s.point(W, g);
24616
24616
  }
24617
- function b(W, f) {
24618
- l.point(W, f);
24617
+ function b(W, g) {
24618
+ l.point(W, g);
24619
24619
  }
24620
24620
  function G() {
24621
24621
  u.point = b, l.lineStart();
@@ -24623,24 +24623,24 @@ function lV(i, t, e, n) {
24623
24623
  function Z() {
24624
24624
  u.point = m, l.lineEnd();
24625
24625
  }
24626
- function p(W, f) {
24627
- h.push([W, f]), o.point(W, f);
24626
+ function p(W, g) {
24627
+ h.push([W, g]), o.point(W, g);
24628
24628
  }
24629
24629
  function X() {
24630
24630
  o.lineStart(), h = [];
24631
24631
  }
24632
24632
  function y() {
24633
24633
  p(h[0][0], h[0][1]), o.lineEnd();
24634
- var W = o.clean(), f = a.result(), g, L = f.length, I, S, R;
24634
+ var W = o.clean(), g = a.result(), f, L = g.length, I, S, R;
24635
24635
  if (h.pop(), d.push(h), h = null, !!L) {
24636
24636
  if (W & 1) {
24637
- if (S = f[0], (I = S.length - 1) > 0) {
24638
- for (c || (s.polygonStart(), c = !0), s.lineStart(), g = 0; g < I; ++g) s.point((R = S[g])[0], R[1]);
24637
+ if (S = g[0], (I = S.length - 1) > 0) {
24638
+ for (c || (s.polygonStart(), c = !0), s.lineStart(), f = 0; f < I; ++f) s.point((R = S[f])[0], R[1]);
24639
24639
  s.lineEnd();
24640
24640
  }
24641
24641
  return;
24642
24642
  }
24643
- L > 1 && W & 2 && f.push(f.pop().concat(f.shift())), r.push(f.filter(lv));
24643
+ L > 1 && W & 2 && g.push(g.pop().concat(g.shift())), r.push(g.filter(lv));
24644
24644
  }
24645
24645
  }
24646
24646
  return u;
@@ -24707,14 +24707,14 @@ function rv(i) {
24707
24707
  b = m = !1, G = 1;
24708
24708
  },
24709
24709
  point: function(Z, p) {
24710
- var X = [Z, p], y, W = a(Z, p), f = n ? W ? 0 : d(Z, p) : W ? d(Z + (Z < 0 ? Ce : -Ce), p) : 0;
24710
+ var X = [Z, p], y, W = a(Z, p), g = n ? W ? 0 : d(Z, p) : W ? d(Z + (Z < 0 ? Ce : -Ce), p) : 0;
24711
24711
  if (!h && (b = m = W) && r.lineStart(), W !== m && (y = c(h, X), (!y || Fr(h, y) || Fr(X, y)) && (X[2] = 1)), W !== m)
24712
24712
  G = 0, W ? (r.lineStart(), y = c(X, h), r.point(y[0], y[1])) : (y = c(h, X), r.point(y[0], y[1], 2), r.lineEnd()), h = y;
24713
24713
  else if (s && h && n ^ W) {
24714
- var g;
24715
- !(f & u) && (g = c(X, h, !0)) && (G = 0, n ? (r.lineStart(), r.point(g[0][0], g[0][1]), r.point(g[1][0], g[1][1]), r.lineEnd()) : (r.point(g[1][0], g[1][1]), r.lineEnd(), r.lineStart(), r.point(g[0][0], g[0][1], 3)));
24714
+ var f;
24715
+ !(g & u) && (f = c(X, h, !0)) && (G = 0, n ? (r.lineStart(), r.point(f[0][0], f[0][1]), r.point(f[1][0], f[1][1]), r.lineEnd()) : (r.point(f[1][0], f[1][1]), r.lineEnd(), r.lineStart(), r.point(f[0][0], f[0][1], 3)));
24716
24716
  }
24717
- W && (!h || !Fr(h, X)) && r.point(X[0], X[1]), h = X, m = W, u = f;
24717
+ W && (!h || !Fr(h, X)) && r.point(X[0], X[1]), h = X, m = W, u = g;
24718
24718
  },
24719
24719
  lineEnd: function() {
24720
24720
  m && r.lineEnd(), h = null;
@@ -24729,9 +24729,9 @@ function rv(i) {
24729
24729
  function c(r, h, u) {
24730
24730
  var m = Vl(r), b = Vl(h), G = [1, 0, 0], Z = Ta(m, b), p = ar(Z, Z), X = Z[0], y = p - X * X;
24731
24731
  if (!y) return !u && r;
24732
- var W = t * p / y, f = -t * X / y, g = Ta(G, Z), L = or(G, W), I = or(Z, f);
24732
+ var W = t * p / y, g = -t * X / y, f = Ta(G, Z), L = or(G, W), I = or(Z, g);
24733
24733
  a1(L, I);
24734
- var S = g, R = ar(L, S), v = ar(S, S), k = R * R - v * (ar(L, L) - 1);
24734
+ var S = f, R = ar(L, S), v = ar(S, S), k = R * R - v * (ar(L, L) - 1);
24735
24735
  if (!(k < 0)) {
24736
24736
  var w = Ui(k), K = or(S, (-R - w) / v);
24737
24737
  if (a1(K, L), K = wh(K), !u) return K;
@@ -24815,7 +24815,7 @@ function uv(i, t, e, n) {
24815
24815
  return h !== u ? h - u : h === 0 ? r[1] - d[1] : h === 1 ? d[0] - r[0] : h === 2 ? d[1] - r[1] : r[0] - d[0];
24816
24816
  }
24817
24817
  return function(d) {
24818
- var r = d, h = nV(), u, m, b, G, Z, p, X, y, W, f, g, L = {
24818
+ var r = d, h = nV(), u, m, b, G, Z, p, X, y, W, g, f, L = {
24819
24819
  point: I,
24820
24820
  lineStart: k,
24821
24821
  lineEnd: w,
@@ -24832,26 +24832,26 @@ function uv(i, t, e, n) {
24832
24832
  return H;
24833
24833
  }
24834
24834
  function R() {
24835
- r = h, u = [], m = [], g = !0;
24835
+ r = h, u = [], m = [], f = !0;
24836
24836
  }
24837
24837
  function v() {
24838
- var H = S(), z = g && H, E = (u = Oc(u)).length;
24838
+ var H = S(), z = f && H, E = (u = Oc(u)).length;
24839
24839
  (z || E) && (d.polygonStart(), z && (d.lineStart(), l(null, null, 1, d), d.lineEnd()), E && iV(u, o, H, l, d), d.polygonEnd()), r = d, u = m = b = null;
24840
24840
  }
24841
24841
  function k() {
24842
- L.point = K, m && m.push(b = []), f = !0, W = !1, X = y = NaN;
24842
+ L.point = K, m && m.push(b = []), g = !0, W = !1, X = y = NaN;
24843
24843
  }
24844
24844
  function w() {
24845
24845
  u && (K(G, Z), p && W && h.rejoin(), u.push(h.result())), L.point = I, W && r.lineEnd();
24846
24846
  }
24847
24847
  function K(H, z) {
24848
24848
  var E = s(H, z);
24849
- if (m && b.push([H, z]), f)
24850
- G = H, Z = z, p = E, f = !1, E && (r.lineStart(), r.point(H, z));
24849
+ if (m && b.push([H, z]), g)
24850
+ G = H, Z = z, p = E, g = !1, E && (r.lineStart(), r.point(H, z));
24851
24851
  else if (E && W) r.point(H, z);
24852
24852
  else {
24853
24853
  var Q = [X = Math.max(dr, Math.min(No, X)), y = Math.max(dr, Math.min(No, y))], et = [H = Math.max(dr, Math.min(No, H)), z = Math.max(dr, Math.min(No, z))];
24854
- hv(Q, et, i, t, e, n) ? (W || (r.lineStart(), r.point(Q[0], Q[1])), r.point(et[0], et[1]), E || r.lineEnd(), g = !1) : E && (r.lineStart(), r.point(H, z), g = !1);
24854
+ hv(Q, et, i, t, e, n) ? (W || (r.lineStart(), r.point(Q[0], Q[1])), r.point(et[0], et[1]), E || r.lineEnd(), f = !1) : E && (r.lineStart(), r.point(H, z), f = !1);
24855
24855
  }
24856
24856
  X = H, y = z, W = E;
24857
24857
  }
@@ -24953,10 +24953,10 @@ function Wv(i, t) {
24953
24953
  }
24954
24954
  function Vv(i, t) {
24955
24955
  var e = i[0] * ae, n = i[1] * ae, s = t[0] * ae, l = t[1] * ae, a = ce(n), o = ie(n), c = ce(l), d = ie(l), r = a * ce(e), h = a * ie(e), u = c * ce(s), m = c * ie(s), b = 2 * Bi(Ui(oZ(l - n) + a * c * oZ(s - e))), G = ie(b), Z = b ? function(p) {
24956
- var X = ie(p *= b) / G, y = ie(b - p) / G, W = y * r + X * u, f = y * h + X * m, g = y * o + X * d;
24956
+ var X = ie(p *= b) / G, y = ie(b - p) / G, W = y * r + X * u, g = y * h + X * m, f = y * o + X * d;
24957
24957
  return [
24958
- Mn(f, W) * Z0,
24959
- Mn(g, Ui(W * W + f * f)) * Z0
24958
+ Mn(g, W) * Z0,
24959
+ Mn(f, Ui(W * W + g * g)) * Z0
24960
24960
  ];
24961
24961
  } : function() {
24962
24962
  return [e * Z0, n * Z0];
@@ -25048,8 +25048,8 @@ function Cv(i, t) {
25048
25048
  function e(n, s, l, a, o, c, d, r, h, u, m, b, G, Z) {
25049
25049
  var p = d - n, X = r - s, y = p * p + X * X;
25050
25050
  if (y > 4 * t && G--) {
25051
- var W = a + u, f = o + m, g = c + b, L = Ui(W * W + f * f + g * g), I = Bi(g /= L), S = t0(t0(g) - 1) < ke || t0(l - h) < ke ? (l + h) / 2 : Mn(f, W), R = i(S, I), v = R[0], k = R[1], w = v - n, K = k - s, H = X * w - p * K;
25052
- (H * H / y > t || t0((p * w + X * K) / y - 0.5) > 0.3 || a * u + o * m + c * b < Sv) && (e(n, s, l, a, o, c, v, k, S, W /= L, f /= L, g, G, Z), Z.point(v, k), e(v, k, S, W, f, g, d, r, h, u, m, b, G, Z));
25051
+ var W = a + u, g = o + m, f = c + b, L = Ui(W * W + g * g + f * f), I = Bi(f /= L), S = t0(t0(f) - 1) < ke || t0(l - h) < ke ? (l + h) / 2 : Mn(g, W), R = i(S, I), v = R[0], k = R[1], w = v - n, K = k - s, H = X * w - p * K;
25052
+ (H * H / y > t || t0((p * w + X * K) / y - 0.5) > 0.3 || a * u + o * m + c * b < Sv) && (e(n, s, l, a, o, c, v, k, S, W /= L, g /= L, f, G, Z), Z.point(v, k), e(v, k, S, W, g, f, d, r, h, u, m, b, G, Z));
25053
25053
  }
25054
25054
  }
25055
25055
  return function(n) {
@@ -25058,7 +25058,7 @@ function Cv(i, t) {
25058
25058
  lineStart: X,
25059
25059
  lineEnd: W,
25060
25060
  polygonStart: function() {
25061
- n.polygonStart(), Z.lineStart = f;
25061
+ n.polygonStart(), Z.lineStart = g;
25062
25062
  },
25063
25063
  polygonEnd: function() {
25064
25064
  n.polygonEnd(), Z.lineStart = X;
@@ -25077,10 +25077,10 @@ function Cv(i, t) {
25077
25077
  function W() {
25078
25078
  Z.point = p, n.lineEnd();
25079
25079
  }
25080
- function f() {
25081
- X(), Z.point = g, Z.lineEnd = L;
25080
+ function g() {
25081
+ X(), Z.point = f, Z.lineEnd = L;
25082
25082
  }
25083
- function g(I, S) {
25083
+ function f(I, S) {
25084
25084
  y(s = I, S), l = h, a = u, o = m, c = b, d = G, Z.point = y;
25085
25085
  }
25086
25086
  function L() {
@@ -25126,7 +25126,7 @@ function F9(i) {
25126
25126
  })();
25127
25127
  }
25128
25128
  function vv(i) {
25129
- var t, e = 150, n = 480, s = 250, l = 0, a = 0, o = 0, c = 0, d = 0, r, h = 0, u = 1, m = 1, b = null, G = fZ, Z = null, p, X, y, W = YZ, f = 0.5, g, L, I, S, R;
25129
+ var t, e = 150, n = 480, s = 250, l = 0, a = 0, o = 0, c = 0, d = 0, r, h = 0, u = 1, m = 1, b = null, G = fZ, Z = null, p, X, y, W = YZ, g = 0.5, f, L, I, S, R;
25130
25130
  function v(H) {
25131
25131
  return I(H[0] * ae, H[1] * ae);
25132
25132
  }
@@ -25134,7 +25134,7 @@ function vv(i) {
25134
25134
  return H = I.invert(H[0], H[1]), H && [H[0] * Z0, H[1] * Z0];
25135
25135
  }
25136
25136
  v.stream = function(H) {
25137
- return S && R === H ? S : S = Yv(Iv(r)(G(g(W(R = H)))));
25137
+ return S && R === H ? S : S = Yv(Iv(r)(G(f(W(R = H)))));
25138
25138
  }, v.preclip = function(H) {
25139
25139
  return arguments.length ? (G = H, b = void 0, K()) : G;
25140
25140
  }, v.postclip = function(H) {
@@ -25158,7 +25158,7 @@ function vv(i) {
25158
25158
  }, v.reflectY = function(H) {
25159
25159
  return arguments.length ? (m = H ? -1 : 1, w()) : m < 0;
25160
25160
  }, v.precision = function(H) {
25161
- return arguments.length ? (g = vZ(L, f = H * H), K()) : Ui(f);
25161
+ return arguments.length ? (f = vZ(L, g = H * H), K()) : Ui(g);
25162
25162
  }, v.fitExtent = function(H, z) {
25163
25163
  return oV(v, H, z);
25164
25164
  }, v.fitSize = function(H, z) {
@@ -25170,7 +25170,7 @@ function vv(i) {
25170
25170
  };
25171
25171
  function w() {
25172
25172
  var H = TZ(e, 0, 0, u, m, h).apply(null, t(l, a)), z = TZ(e, n - H[0], s - H[1], u, m, h);
25173
- return r = tV(o, c, d), L = Yp(t, z), I = Yp(r, L), g = vZ(L, f), K();
25173
+ return r = tV(o, c, d), L = Yp(t, z), I = Yp(r, L), f = vZ(L, g), K();
25174
25174
  }
25175
25175
  function K() {
25176
25176
  return S = R = null, v;
@@ -25694,8 +25694,8 @@ class Dv extends be {
25694
25694
  get: function() {
25695
25695
  return W !== void 0 ? W : y;
25696
25696
  },
25697
- set: function(f) {
25698
- W !== f && (W = f, s[X] = f, n[X] = f, l.dispatchEvent({ type: X + "-changed", value: f }), l.dispatchEvent(c1));
25697
+ set: function(g) {
25698
+ W !== g && (W = g, s[X] = g, n[X] = g, l.dispatchEvent({ type: X + "-changed", value: g }), l.dispatchEvent(c1));
25699
25699
  }
25700
25700
  }), l[X] = y, s[X] = y, n[X] = y;
25701
25701
  }
@@ -25885,7 +25885,7 @@ class eT extends be {
25885
25885
  const H = new Ot();
25886
25886
  return H.setAttribute("position", new Bt([0, 0, 0, 1, 1, 1], 3)), H;
25887
25887
  }
25888
- const f = {
25888
+ const g = {
25889
25889
  X: [
25890
25890
  [new Gt(G, l), [0.5, 0, 0], [0, 0, -Math.PI / 2]],
25891
25891
  [new Gt(G, l), [-0.5, 0, 0], [0, 0, Math.PI / 2]],
@@ -25913,7 +25913,7 @@ class eT extends be {
25913
25913
  XZ: [
25914
25914
  [new Gt(new a0(0.15, 0.15, 0.01), d.clone()), [0.15, 0, 0.15], [-Math.PI / 2, 0, 0]]
25915
25915
  ]
25916
- }, g = {
25916
+ }, f = {
25917
25917
  X: [
25918
25918
  [new Gt(new c0(0.2, 0, 0.6, 4), n), [0.3, 0, 0], [0, 0, -Math.PI / 2]],
25919
25919
  [new Gt(new c0(0.2, 0, 0.6, 4), n), [-0.3, 0, 0], [0, 0, Math.PI / 2]]
@@ -26068,7 +26068,7 @@ class eT extends be {
26068
26068
  }
26069
26069
  return z;
26070
26070
  }
26071
- this.gizmo = {}, this.picker = {}, this.helper = {}, this.add(this.gizmo.translate = K(f)), this.add(this.gizmo.rotate = K(I)), this.add(this.gizmo.scale = K(v)), this.add(this.picker.translate = K(g)), this.add(this.picker.rotate = K(R)), this.add(this.picker.scale = K(k)), this.add(this.helper.translate = K(L)), this.add(this.helper.rotate = K(S)), this.add(this.helper.scale = K(w)), this.picker.translate.visible = !1, this.picker.rotate.visible = !1, this.picker.scale.visible = !1;
26071
+ this.gizmo = {}, this.picker = {}, this.helper = {}, this.add(this.gizmo.translate = K(g)), this.add(this.gizmo.rotate = K(I)), this.add(this.gizmo.scale = K(v)), this.add(this.picker.translate = K(f)), this.add(this.picker.rotate = K(R)), this.add(this.picker.scale = K(k)), this.add(this.helper.translate = K(L)), this.add(this.helper.rotate = K(S)), this.add(this.helper.scale = K(w)), this.picker.translate.visible = !1, this.picker.rotate.visible = !1, this.picker.scale.visible = !1;
26072
26072
  }
26073
26073
  // updateMatrixWorld will update transformations and appearance of individual handles
26074
26074
  updateMatrixWorld(t) {
@@ -26179,7 +26179,7 @@ class aT {
26179
26179
  p.view && p.view.enabled ? (d.style.transform = `translate( ${-p.view.offsetX * (n / p.view.width)}px, ${-p.view.offsetY * (s / p.view.height)}px )`, d.style.transform += `scale( ${p.view.fullWidth / p.view.width}, ${p.view.fullHeight / p.view.height} )`) : d.style.transform = "", Z.matrixWorldAutoUpdate === !0 && Z.updateMatrixWorld(), p.parent === null && p.matrixWorldAutoUpdate === !0 && p.updateMatrixWorld();
26180
26180
  let y, W;
26181
26181
  p.isOrthographicCamera && (y = -(p.right + p.left) / 2, W = (p.top + p.bottom) / 2);
26182
- const f = p.view && p.view.enabled ? p.view.height / p.view.fullHeight : 1, g = p.isOrthographicCamera ? `scale( ${f} )scale(` + X + ")translate(" + h(y) + "px," + h(W) + "px)" + u(p.matrixWorldInverse) : `scale( ${f} )translateZ(` + X + "px)" + u(p.matrixWorldInverse), I = (p.isPerspectiveCamera ? "perspective(" + X + "px) " : "") + g + "translate(" + l + "px," + a + "px)";
26182
+ const g = p.view && p.view.enabled ? p.view.height / p.view.fullHeight : 1, f = p.isOrthographicCamera ? `scale( ${g} )scale(` + X + ")translate(" + h(y) + "px," + h(W) + "px)" + u(p.matrixWorldInverse) : `scale( ${g} )translateZ(` + X + "px)" + u(p.matrixWorldInverse), I = (p.isPerspectiveCamera ? "perspective(" + X + "px) " : "") + f + "translate(" + l + "px," + a + "px)";
26183
26183
  o.camera.style !== I && (r.style.transform = I, o.camera.style = I), G(Z, Z, p);
26184
26184
  }, this.setSize = function(Z, p) {
26185
26185
  n = Z, s = p, l = n / 2, a = s / 2, c.style.width = Z + "px", c.style.height = p + "px", d.style.width = Z + "px", d.style.height = p + "px", r.style.width = Z + "px", r.style.height = p + "px";
@@ -26206,21 +26206,21 @@ class aT {
26206
26206
  return;
26207
26207
  }
26208
26208
  if (Z.isCSS3DObject) {
26209
- const W = Z.layers.test(X.layers) === !0, f = Z.element;
26210
- if (f.style.display = W === !0 ? "" : "none", W === !0) {
26209
+ const W = Z.layers.test(X.layers) === !0, g = Z.element;
26210
+ if (g.style.display = W === !0 ? "" : "none", W === !0) {
26211
26211
  Z.onBeforeRender(e, p, X);
26212
- let g;
26213
- Z.isCSS3DSprite ? (ai.copy(X.matrixWorldInverse), ai.transpose(), Z.rotation2D !== 0 && ai.multiply(lT.makeRotationZ(Z.rotation2D)), Z.matrixWorld.decompose(BZ, iT, PZ), ai.setPosition(BZ), ai.scale(PZ), ai.elements[3] = 0, ai.elements[7] = 0, ai.elements[11] = 0, ai.elements[15] = 1, g = m(ai)) : g = m(Z.matrixWorld);
26212
+ let f;
26213
+ Z.isCSS3DSprite ? (ai.copy(X.matrixWorldInverse), ai.transpose(), Z.rotation2D !== 0 && ai.multiply(lT.makeRotationZ(Z.rotation2D)), Z.matrixWorld.decompose(BZ, iT, PZ), ai.setPosition(BZ), ai.scale(PZ), ai.elements[3] = 0, ai.elements[7] = 0, ai.elements[11] = 0, ai.elements[15] = 1, f = m(ai)) : f = m(Z.matrixWorld);
26214
26214
  const L = o.objects.get(Z);
26215
- if (L === void 0 || L.style !== g) {
26216
- f.style.transform = g;
26217
- const I = { style: g };
26215
+ if (L === void 0 || L.style !== f) {
26216
+ g.style.transform = f;
26217
+ const I = { style: f };
26218
26218
  o.objects.set(Z, I);
26219
26219
  }
26220
- f.parentNode !== r && r.appendChild(f), Z.onAfterRender(e, p, X);
26220
+ g.parentNode !== r && r.appendChild(g), Z.onAfterRender(e, p, X);
26221
26221
  }
26222
26222
  }
26223
- for (let W = 0, f = Z.children.length; W < f; W++)
26223
+ for (let W = 0, g = Z.children.length; W < g; W++)
26224
26224
  G(Z.children[W], p, X);
26225
26225
  }
26226
26226
  }
@@ -31258,14 +31258,14 @@ function nG(i, t, e, n, s = 1 / 0, l, a) {
31258
31258
  n = Math.max(1e-4, n);
31259
31259
  const o = 2 / n, c = o * l, d = 1 / (1 + c + 0.48 * c * c + 0.235 * c * c * c);
31260
31260
  let r = t.x, h = t.y, u = t.z, m = i.x - r, b = i.y - h, G = i.z - u;
31261
- const Z = r, p = h, X = u, y = s * n, W = y * y, f = m * m + b * b + G * G;
31262
- if (f > W) {
31263
- const H = Math.sqrt(f);
31261
+ const Z = r, p = h, X = u, y = s * n, W = y * y, g = m * m + b * b + G * G;
31262
+ if (g > W) {
31263
+ const H = Math.sqrt(g);
31264
31264
  m = m / H * y, b = b / H * y, G = G / H * y;
31265
31265
  }
31266
31266
  r = i.x - m, h = i.y - b, u = i.z - G;
31267
- const g = (e.x + o * m) * l, L = (e.y + o * b) * l, I = (e.z + o * G) * l;
31268
- e.x = (e.x - o * g) * d, e.y = (e.y - o * L) * d, e.z = (e.z - o * I) * d, a.x = r + (m + g) * d, a.y = h + (b + L) * d, a.z = u + (G + I) * d;
31267
+ const f = (e.x + o * m) * l, L = (e.y + o * b) * l, I = (e.z + o * G) * l;
31268
+ e.x = (e.x - o * f) * d, e.y = (e.y - o * L) * d, e.z = (e.z - o * I) * d, a.x = r + (m + f) * d, a.y = h + (b + L) * d, a.z = u + (G + I) * d;
31269
31269
  const S = Z - i.x, R = p - i.y, v = X - i.z, k = a.x - Z, w = a.y - p, K = a.z - X;
31270
31270
  return S * k + R * w + v * K > 0 && (a.x = Z, a.y = p, a.z = X, e.x = (a.x - Z) / l, e.y = (a.y - p) / l, e.z = (a.z - X) / l), a;
31271
31271
  }
@@ -31413,13 +31413,13 @@ let le, iG, br, b1, sn, ue, Te, ql, Wo, oi, ci, Ps, sG, lG, In, Vo, $l, aG, Z1,
31413
31413
  constructor(t, e) {
31414
31414
  super(), this.minPolarAngle = 0, this.maxPolarAngle = Math.PI, this.minAzimuthAngle = -1 / 0, this.maxAzimuthAngle = 1 / 0, this.minDistance = Number.EPSILON, this.maxDistance = 1 / 0, this.infinityDolly = !1, this.minZoom = 0.01, this.maxZoom = 1 / 0, this.smoothTime = 0.25, this.draggingSmoothTime = 0.125, this.maxSpeed = 1 / 0, this.azimuthRotateSpeed = 1, this.polarRotateSpeed = 1, this.dollySpeed = 1, this.dollyDragInverted = !1, this.truckSpeed = 2, this.dollyToCursor = !1, this.dragToOffset = !1, this.verticalDragToForward = !1, this.boundaryFriction = 0, this.restThreshold = 0.01, this.colliderMeshes = [], this.cancel = () => {
31415
31415
  }, this._enabled = !0, this._state = ht.NONE, this._viewport = null, this._changedDolly = 0, this._changedZoom = 0, this._hasRested = !0, this._boundaryEnclosesCamera = !1, this._needsUpdate = !0, this._updatedLastTime = !1, this._elementRect = new DOMRect(), this._isDragging = !1, this._dragNeedsUpdate = !0, this._activePointers = [], this._lockedPointer = null, this._interactiveArea = new DOMRect(0, 0, 1, 1), this._isUserControllingRotate = !1, this._isUserControllingDolly = !1, this._isUserControllingTruck = !1, this._isUserControllingOffset = !1, this._isUserControllingZoom = !1, this._lastDollyDirection = Ol.NONE, this._thetaVelocity = { value: 0 }, this._phiVelocity = { value: 0 }, this._radiusVelocity = { value: 0 }, this._targetVelocity = new le.Vector3(), this._focalOffsetVelocity = new le.Vector3(), this._zoomVelocity = { value: 0 }, this._truckInternal = (p, X, y) => {
31416
- let W, f;
31416
+ let W, g;
31417
31417
  if (Bs(this._camera)) {
31418
- const g = ue.copy(this._camera.position).sub(this._target), L = this._camera.getEffectiveFOV() * Go, I = g.length() * Math.tan(L * 0.5);
31419
- W = this.truckSpeed * p * I / this._elementRect.height, f = this.truckSpeed * X * I / this._elementRect.height;
31418
+ const f = ue.copy(this._camera.position).sub(this._target), L = this._camera.getEffectiveFOV() * Go, I = f.length() * Math.tan(L * 0.5);
31419
+ W = this.truckSpeed * p * I / this._elementRect.height, g = this.truckSpeed * X * I / this._elementRect.height;
31420
31420
  } else if (as(this._camera)) {
31421
- const g = this._camera;
31422
- W = p * (g.right - g.left) / g.zoom / this._elementRect.width, f = X * (g.top - g.bottom) / g.zoom / this._elementRect.height;
31421
+ const f = this._camera;
31422
+ W = p * (f.right - f.left) / f.zoom / this._elementRect.width, g = X * (f.top - f.bottom) / f.zoom / this._elementRect.height;
31423
31423
  } else
31424
31424
  return;
31425
31425
  this.verticalDragToForward ? (y ? this.setFocalOffset(
@@ -31427,25 +31427,25 @@ let le, iG, br, b1, sn, ue, Te, ql, Wo, oi, ci, Ps, sG, lG, In, Vo, $l, aG, Z1,
31427
31427
  this._focalOffsetEnd.y,
31428
31428
  this._focalOffsetEnd.z,
31429
31429
  !0
31430
- ) : this.truck(W, 0, !0), this.forward(-f, !0)) : y ? this.setFocalOffset(
31430
+ ) : this.truck(W, 0, !0), this.forward(-g, !0)) : y ? this.setFocalOffset(
31431
31431
  this._focalOffsetEnd.x + W,
31432
- this._focalOffsetEnd.y + f,
31432
+ this._focalOffsetEnd.y + g,
31433
31433
  this._focalOffsetEnd.z,
31434
31434
  !0
31435
- ) : this.truck(W, f, !0);
31435
+ ) : this.truck(W, g, !0);
31436
31436
  }, this._rotateInternal = (p, X) => {
31437
31437
  const y = _l * this.azimuthRotateSpeed * p / this._elementRect.height, W = _l * this.polarRotateSpeed * X / this._elementRect.height;
31438
31438
  this.rotate(y, W, !0);
31439
31439
  }, this._dollyInternal = (p, X, y) => {
31440
- const W = Math.pow(0.95, -p * this.dollySpeed), f = this._sphericalEnd.radius, g = this._sphericalEnd.radius * W, L = Pn(
31441
- g,
31440
+ const W = Math.pow(0.95, -p * this.dollySpeed), g = this._sphericalEnd.radius, f = this._sphericalEnd.radius * W, L = Pn(
31441
+ f,
31442
31442
  this.minDistance,
31443
31443
  this.maxDistance
31444
- ), I = L - g;
31445
- this.infinityDolly && this.dollyToCursor ? this._dollyToNoClamp(g, !0) : this.infinityDolly && !this.dollyToCursor ? (this.dollyInFixed(I, !0), this._dollyToNoClamp(L, !0)) : this._dollyToNoClamp(L, !0), this.dollyToCursor && (this._changedDolly += (this.infinityDolly ? g : L) - f, this._dollyControlCoord.set(X, y)), this._lastDollyDirection = Math.sign(-p);
31444
+ ), I = L - f;
31445
+ this.infinityDolly && this.dollyToCursor ? this._dollyToNoClamp(f, !0) : this.infinityDolly && !this.dollyToCursor ? (this.dollyInFixed(I, !0), this._dollyToNoClamp(L, !0)) : this._dollyToNoClamp(L, !0), this.dollyToCursor && (this._changedDolly += (this.infinityDolly ? f : L) - g, this._dollyControlCoord.set(X, y)), this._lastDollyDirection = Math.sign(-p);
31446
31446
  }, this._zoomInternal = (p, X, y) => {
31447
- const W = Math.pow(0.95, p * this.dollySpeed), f = this._zoom, g = this._zoom * W;
31448
- this.zoomTo(g, !0), this.dollyToCursor && (this._changedZoom += g - f, this._dollyControlCoord.set(X, y));
31447
+ const W = Math.pow(0.95, p * this.dollySpeed), g = this._zoom, f = this._zoom * W;
31448
+ this.zoomTo(f, !0), this.dollyToCursor && (this._changedZoom += f - g, this._dollyControlCoord.set(X, y));
31449
31449
  }, typeof le == "undefined" && console.error(
31450
31450
  "camera-controls: `THREE` is undefined. You must first run `CameraControls.install( { THREE: THREE } )`. Check the docs for further information."
31451
31451
  ), this._camera = t, this._yAxisUpSpace = new le.Quaternion().setFromUnitVectors(
@@ -31474,8 +31474,8 @@ let le, iG, br, b1, sn, ue, Te, ql, Wo, oi, ci, Ps, sG, lG, In, Vo, $l, aG, Z1,
31474
31474
  const n = new le.Vector2(), s = new le.Vector2(), l = new le.Vector2(), a = (p) => {
31475
31475
  if (!this._enabled || !this._domElement) return;
31476
31476
  if (this._interactiveArea.left !== 0 || this._interactiveArea.top !== 0 || this._interactiveArea.width !== 1 || this._interactiveArea.height !== 1) {
31477
- const W = this._domElement.getBoundingClientRect(), f = (p.clientX - W.left) / (W.right - W.left), g = (p.clientY - W.top) / (W.bottom - W.top);
31478
- if (f < this._interactiveArea.left || f > this._interactiveArea.right || g < this._interactiveArea.top || g > this._interactiveArea.bottom)
31477
+ const W = this._domElement.getBoundingClientRect(), g = (p.clientX - W.left) / (W.right - W.left), f = (p.clientY - W.top) / (W.bottom - W.top);
31478
+ if (g < this._interactiveArea.left || g > this._interactiveArea.right || f < this._interactiveArea.top || f > this._interactiveArea.bottom)
31479
31479
  return;
31480
31480
  }
31481
31481
  const X = p.pointerType !== "mouse" ? null : (p.buttons & o0.LEFT) === o0.LEFT ? o0.LEFT : (p.buttons & o0.MIDDLE) === o0.MIDDLE ? o0.MIDDLE : (p.buttons & o0.RIGHT) === o0.RIGHT ? o0.RIGHT : null;
@@ -31552,15 +31552,15 @@ let le, iG, br, b1, sn, ue, Te, ql, Wo, oi, ci, Ps, sG, lG, In, Vo, $l, aG, Z1,
31552
31552
  const r = (p) => {
31553
31553
  if (!this._domElement || !this._enabled || this.mouseButtons.wheel === ht.NONE) return;
31554
31554
  if (this._interactiveArea.left !== 0 || this._interactiveArea.top !== 0 || this._interactiveArea.width !== 1 || this._interactiveArea.height !== 1) {
31555
- const g = this._domElement.getBoundingClientRect(), L = (p.clientX - g.left) / (g.right - g.left), I = (p.clientY - g.top) / (g.bottom - g.top);
31555
+ const f = this._domElement.getBoundingClientRect(), L = (p.clientX - f.left) / (f.right - f.left), I = (p.clientY - f.top) / (f.bottom - f.top);
31556
31556
  if (L < this._interactiveArea.left || L > this._interactiveArea.right || I < this._interactiveArea.top || I > this._interactiveArea.bottom)
31557
31557
  return;
31558
31558
  }
31559
31559
  if (p.preventDefault(), this.dollyToCursor || this.mouseButtons.wheel === ht.ROTATE || this.mouseButtons.wheel === ht.TRUCK) {
31560
- const g = performance.now();
31561
- d - g < 1e3 && this._getClientRect(this._elementRect), d = g;
31560
+ const f = performance.now();
31561
+ d - f < 1e3 && this._getClientRect(this._elementRect), d = f;
31562
31562
  }
31563
- const X = w7 ? -1 : -3, y = p.deltaMode === 1 ? p.deltaY / X : p.deltaY / (X * 10), W = this.dollyToCursor ? (p.clientX - this._elementRect.x) / this._elementRect.width * 2 - 1 : 0, f = this.dollyToCursor ? (p.clientY - this._elementRect.y) / this._elementRect.height * -2 + 1 : 0;
31563
+ const X = w7 ? -1 : -3, y = p.deltaMode === 1 ? p.deltaY / X : p.deltaY / (X * 10), W = this.dollyToCursor ? (p.clientX - this._elementRect.x) / this._elementRect.width * 2 - 1 : 0, g = this.dollyToCursor ? (p.clientY - this._elementRect.y) / this._elementRect.height * -2 + 1 : 0;
31564
31564
  switch (this.mouseButtons.wheel) {
31565
31565
  case ht.ROTATE: {
31566
31566
  this._rotateInternal(p.deltaX, p.deltaY), this._isUserControllingRotate = !0;
@@ -31575,11 +31575,11 @@ let le, iG, br, b1, sn, ue, Te, ql, Wo, oi, ci, Ps, sG, lG, In, Vo, $l, aG, Z1,
31575
31575
  break;
31576
31576
  }
31577
31577
  case ht.DOLLY: {
31578
- this._dollyInternal(-y, W, f), this._isUserControllingDolly = !0;
31578
+ this._dollyInternal(-y, W, g), this._isUserControllingDolly = !0;
31579
31579
  break;
31580
31580
  }
31581
31581
  case ht.ZOOM: {
31582
- this._zoomInternal(-y, W, f), this._isUserControllingZoom = !0;
31582
+ this._zoomInternal(-y, W, g), this._isUserControllingZoom = !0;
31583
31583
  break;
31584
31584
  }
31585
31585
  }
@@ -31605,8 +31605,8 @@ let le, iG, br, b1, sn, ue, Te, ql, Wo, oi, ci, Ps, sG, lG, In, Vo, $l, aG, Z1,
31605
31605
  if (m1(this._activePointers, sn), this._getClientRect(this._elementRect), n.copy(sn), s.copy(sn), this._activePointers.length >= 2) {
31606
31606
  const X = sn.x - this._activePointers[1].clientX, y = sn.y - this._activePointers[1].clientY, W = Math.sqrt(X * X + y * y);
31607
31607
  l.set(0, W);
31608
- const f = (this._activePointers[0].clientX + this._activePointers[1].clientX) * 0.5, g = (this._activePointers[0].clientY + this._activePointers[1].clientY) * 0.5;
31609
- s.set(f, g);
31608
+ const g = (this._activePointers[0].clientX + this._activePointers[1].clientX) * 0.5, f = (this._activePointers[0].clientY + this._activePointers[1].clientY) * 0.5;
31609
+ s.set(g, f);
31610
31610
  }
31611
31611
  if (this._state = 0, !p)
31612
31612
  this._lockedPointer && (this._state = this._state | this.mouseButtons.left);
@@ -31631,20 +31631,20 @@ let le, iG, br, b1, sn, ue, Te, ql, Wo, oi, ci, Ps, sG, lG, In, Vo, $l, aG, Z1,
31631
31631
  this._dragNeedsUpdate = !1, m1(this._activePointers, sn);
31632
31632
  const p = this._domElement && this._domElement.ownerDocument.pointerLockElement === this._domElement ? this._lockedPointer || this._activePointers[0] : null, X = p ? -p.deltaX : s.x - sn.x, y = p ? -p.deltaY : s.y - sn.y;
31633
31633
  if (s.copy(sn), ((this._state & ht.ROTATE) === ht.ROTATE || (this._state & ht.TOUCH_ROTATE) === ht.TOUCH_ROTATE || (this._state & ht.TOUCH_DOLLY_ROTATE) === ht.TOUCH_DOLLY_ROTATE || (this._state & ht.TOUCH_ZOOM_ROTATE) === ht.TOUCH_ZOOM_ROTATE) && (this._rotateInternal(X, y), this._isUserControllingRotate = !0), (this._state & ht.DOLLY) === ht.DOLLY || (this._state & ht.ZOOM) === ht.ZOOM) {
31634
- const W = this.dollyToCursor ? (n.x - this._elementRect.x) / this._elementRect.width * 2 - 1 : 0, f = this.dollyToCursor ? (n.y - this._elementRect.y) / this._elementRect.height * -2 + 1 : 0, g = this.dollyDragInverted ? -1 : 1;
31634
+ const W = this.dollyToCursor ? (n.x - this._elementRect.x) / this._elementRect.width * 2 - 1 : 0, g = this.dollyToCursor ? (n.y - this._elementRect.y) / this._elementRect.height * -2 + 1 : 0, f = this.dollyDragInverted ? -1 : 1;
31635
31635
  (this._state & ht.DOLLY) === ht.DOLLY ? (this._dollyInternal(
31636
- g * y * pr,
31636
+ f * y * pr,
31637
31637
  W,
31638
- f
31638
+ g
31639
31639
  ), this._isUserControllingDolly = !0) : (this._zoomInternal(
31640
- g * y * pr,
31640
+ f * y * pr,
31641
31641
  W,
31642
- f
31642
+ g
31643
31643
  ), this._isUserControllingZoom = !0);
31644
31644
  }
31645
31645
  if ((this._state & ht.TOUCH_DOLLY) === ht.TOUCH_DOLLY || (this._state & ht.TOUCH_ZOOM) === ht.TOUCH_ZOOM || (this._state & ht.TOUCH_DOLLY_TRUCK) === ht.TOUCH_DOLLY_TRUCK || (this._state & ht.TOUCH_ZOOM_TRUCK) === ht.TOUCH_ZOOM_TRUCK || (this._state & ht.TOUCH_DOLLY_OFFSET) === ht.TOUCH_DOLLY_OFFSET || (this._state & ht.TOUCH_ZOOM_OFFSET) === ht.TOUCH_ZOOM_OFFSET || (this._state & ht.TOUCH_DOLLY_ROTATE) === ht.TOUCH_DOLLY_ROTATE || (this._state & ht.TOUCH_ZOOM_ROTATE) === ht.TOUCH_ZOOM_ROTATE) {
31646
- const W = sn.x - this._activePointers[1].clientX, f = sn.y - this._activePointers[1].clientY, g = Math.sqrt(W * W + f * f), L = l.y - g;
31647
- l.set(0, g);
31646
+ const W = sn.x - this._activePointers[1].clientX, g = sn.y - this._activePointers[1].clientY, f = Math.sqrt(W * W + g * g), L = l.y - f;
31647
+ l.set(0, f);
31648
31648
  const I = this.dollyToCursor ? (s.x - this._elementRect.x) / this._elementRect.width * 2 - 1 : 0, S = this.dollyToCursor ? (s.y - this._elementRect.y) / this._elementRect.height * -2 + 1 : 0;
31649
31649
  (this._state & ht.TOUCH_DOLLY) === ht.TOUCH_DOLLY || (this._state & ht.TOUCH_DOLLY_ROTATE) === ht.TOUCH_DOLLY_ROTATE || (this._state & ht.TOUCH_DOLLY_TRUCK) === ht.TOUCH_DOLLY_TRUCK || (this._state & ht.TOUCH_DOLLY_OFFSET) === ht.TOUCH_DOLLY_OFFSET ? (this._dollyInternal(L * pr, I, S), this._isUserControllingDolly = !0) : (this._zoomInternal(L * pr, I, S), this._isUserControllingZoom = !0);
31650
31650
  }
@@ -32169,10 +32169,10 @@ let le, iG, br, b1, sn, ue, Te, ql, Wo, oi, ci, Ps, sG, lG, In, Vo, $l, aG, Z1,
32169
32169
  this.moveTo(p.x, p.y, p.z, e)
32170
32170
  ), c.push(this.dollyTo(X, e)), c.push(this.setFocalOffset(0, 0, 0, e));
32171
32171
  } else if (as(this._camera)) {
32172
- const X = this._camera, y = X.right - X.left, W = X.top - X.bottom, f = n ? Math.max(y / Z.x, W / Z.y) : Math.min(y / Z.x, W / Z.y);
32172
+ const X = this._camera, y = X.right - X.left, W = X.top - X.bottom, g = n ? Math.max(y / Z.x, W / Z.y) : Math.min(y / Z.x, W / Z.y);
32173
32173
  c.push(
32174
32174
  this.moveTo(p.x, p.y, p.z, e)
32175
- ), c.push(this.zoomTo(f, e)), c.push(this.setFocalOffset(0, 0, 0, e));
32175
+ ), c.push(this.zoomTo(g, e)), c.push(this.setFocalOffset(0, 0, 0, e));
32176
32176
  }
32177
32177
  return Promise.all(c);
32178
32178
  }
@@ -32260,13 +32260,13 @@ let le, iG, br, b1, sn, ue, Te, ql, Wo, oi, ci, Ps, sG, lG, In, Vo, $l, aG, Z1,
32260
32260
  Vo.setFromVector3(
32261
32261
  X.sub(p).applyQuaternion(this._yAxisUpSpace)
32262
32262
  ), this._targetEnd.copy(G.lerp(p, m));
32263
- const y = Vo.theta - In.theta, W = Vo.phi - In.phi, f = Vo.radius - In.radius;
32263
+ const y = Vo.theta - In.theta, W = Vo.phi - In.phi, g = Vo.radius - In.radius;
32264
32264
  this._sphericalEnd.set(
32265
- In.radius + f * m,
32265
+ In.radius + g * m,
32266
32266
  In.phi + W * m,
32267
32267
  In.theta + y * m
32268
32268
  ), this.normalizeRotations(), this._needsUpdate = !0, b || (this._target.copy(this._targetEnd), this._spherical.copy(this._sphericalEnd));
32269
- const g = !b || Ke(this._target.x, this._targetEnd.x, this.restThreshold) && Ke(this._target.y, this._targetEnd.y, this.restThreshold) && Ke(this._target.z, this._targetEnd.z, this.restThreshold) && Ke(
32269
+ const f = !b || Ke(this._target.x, this._targetEnd.x, this.restThreshold) && Ke(this._target.y, this._targetEnd.y, this.restThreshold) && Ke(this._target.z, this._targetEnd.z, this.restThreshold) && Ke(
32270
32270
  this._spherical.theta,
32271
32271
  this._sphericalEnd.theta,
32272
32272
  this.restThreshold
@@ -32279,7 +32279,7 @@ let le, iG, br, b1, sn, ue, Te, ql, Wo, oi, ci, Ps, sG, lG, In, Vo, $l, aG, Z1,
32279
32279
  this._sphericalEnd.radius,
32280
32280
  this.restThreshold
32281
32281
  );
32282
- return this._createOnRestPromise(g);
32282
+ return this._createOnRestPromise(f);
32283
32283
  }
32284
32284
  /**
32285
32285
  * Set angle and distance by given position.
@@ -32625,12 +32625,12 @@ let le, iG, br, b1, sn, ue, Te, ql, Wo, oi, ci, Ps, sG, lG, In, Vo, $l, aG, Z1,
32625
32625
  ), X = ue.copy(this._targetEnd).lerp(p, Z), y = this._lastDollyDirection === Ol.IN && this._spherical.radius <= this.minDistance, W = this._lastDollyDirection === Ol.OUT && this.maxDistance <= this._spherical.radius;
32626
32626
  if (this.infinityDolly && (y || W)) {
32627
32627
  this._sphericalEnd.radius -= r, this._spherical.radius -= r;
32628
- const g = Te.copy(u).multiplyScalar(-r);
32629
- X.add(g);
32628
+ const f = Te.copy(u).multiplyScalar(-r);
32629
+ X.add(f);
32630
32630
  }
32631
32631
  this._boundary.clampPoint(X, X);
32632
- const f = Te.subVectors(X, this._targetEnd);
32633
- this._targetEnd.copy(X), this._target.add(f), this._changedDolly -= r, _e(this._changedDolly) && (this._changedDolly = 0);
32632
+ const g = Te.subVectors(X, this._targetEnd);
32633
+ this._targetEnd.copy(X), this._target.add(g), this._changedDolly -= r, _e(this._changedDolly) && (this._changedDolly = 0);
32634
32634
  } else if (as(this._camera) && this._changedZoom !== 0) {
32635
32635
  const r = this._zoom - this._lastZoom, h = this._camera, u = ue.set(
32636
32636
  this._dollyControlCoord.x,
@@ -32640,8 +32640,8 @@ let le, iG, br, b1, sn, ue, Te, ql, Wo, oi, ci, Ps, sG, lG, In, Vo, $l, aG, Z1,
32640
32640
  y - p
32641
32641
  );
32642
32642
  X.sub(W), this._boundary.clampPoint(X, X);
32643
- const f = Te.subVectors(X, this._targetEnd);
32644
- this._targetEnd.copy(X), this._target.add(f), this._changedZoom -= r, _e(this._changedZoom) && (this._changedZoom = 0);
32643
+ const g = Te.subVectors(X, this._targetEnd);
32644
+ this._targetEnd.copy(X), this._target.add(g), this._changedZoom -= r, _e(this._changedZoom) && (this._changedZoom = 0);
32645
32645
  }
32646
32646
  }
32647
32647
  this._camera.zoom !== this._zoom && (this._camera.zoom = this._zoom, this._camera.updateProjectionMatrix(), this._updateNearPlaneCorners(), this._needsUpdate = !0), this._dragNeedsUpdate = !0;
@@ -34157,11 +34157,11 @@ function XM() {
34157
34157
  for (var W = 0; W < m.length; ++W)
34158
34158
  X.push(String(W));
34159
34159
  if (Z && m.length > 0)
34160
- for (var f = 0; f < m.length; ++f)
34161
- X.push(String(f));
34160
+ for (var g = 0; g < m.length; ++g)
34161
+ X.push(String(g));
34162
34162
  else
34163
- for (var g in m)
34164
- !(y && g === "prototype") && t.call(m, g) && X.push(String(g));
34163
+ for (var f in m)
34164
+ !(y && f === "prototype") && t.call(m, f) && X.push(String(f));
34165
34165
  if (l)
34166
34166
  for (var L = h(m), I = 0; I < o.length; ++I)
34167
34167
  !(L && o[I] === "constructor") && t.call(m, o[I]) && X.push(o[I]);
@@ -34856,16 +34856,16 @@ var Ap = c8, JG = Ap.custom, wG = $V(JG) ? JG : null, X8 = function i(t, e, n, s
34856
34856
  return t.inspect();
34857
34857
  }
34858
34858
  if (C8(t)) {
34859
- var f = [];
34859
+ var g = [];
34860
34860
  return YG && YG.call(t, function(w, K) {
34861
- f.push(u(K, t, !0) + " => " + u(w, t));
34862
- }), kG("Map", $h.call(t), f, h);
34861
+ g.push(u(K, t, !0) + " => " + u(w, t));
34862
+ }), kG("Map", $h.call(t), g, h);
34863
34863
  }
34864
34864
  if (N8(t)) {
34865
- var g = [];
34865
+ var f = [];
34866
34866
  return IG && IG.call(t, function(w) {
34867
- g.push(u(w, t));
34868
- }), kG("Set", tu.call(t), g, h);
34867
+ f.push(u(w, t));
34868
+ }), kG("Set", tu.call(t), f, h);
34869
34869
  }
34870
34870
  if (Y8(t))
34871
34871
  return S1("WeakMap");
@@ -35887,21 +35887,21 @@ function pJ(i, t, e, n) {
35887
35887
  return !1;
35888
35888
  if (X || y)
35889
35889
  return R3(i) !== R3(t) ? !1 : typeof Uint8Array == "function" && _n(new Uint8Array(i), new Uint8Array(t), e, n);
35890
- var W = y3(i), f = y3(t);
35891
- if (W !== f)
35890
+ var W = y3(i), g = y3(t);
35891
+ if (W !== g)
35892
35892
  return !1;
35893
- if (W || f)
35893
+ if (W || g)
35894
35894
  return x3(i) !== x3(t) ? !1 : typeof Uint8Array == "function" && _n(new Uint8Array(i), new Uint8Array(t), e, n);
35895
35895
  if (typeof i != typeof t)
35896
35896
  return !1;
35897
- var g = W3(i), L = W3(t);
35898
- if (g.length !== L.length)
35897
+ var f = W3(i), L = W3(t);
35898
+ if (f.length !== L.length)
35899
35899
  return !1;
35900
- for (g.sort(), L.sort(), s = g.length - 1; s >= 0; s--)
35901
- if (g[s] != L[s])
35900
+ for (f.sort(), L.sort(), s = f.length - 1; s >= 0; s--)
35901
+ if (f[s] != L[s])
35902
35902
  return !1;
35903
- for (s = g.length - 1; s >= 0; s--)
35904
- if (l = g[s], !_n(i[l], t[l], e, n))
35903
+ for (s = f.length - 1; s >= 0; s--)
35904
+ if (l = f[s], !_n(i[l], t[l], e, n))
35905
35905
  return !1;
35906
35906
  var I = g3(i), S = g3(t);
35907
35907
  return I !== S ? !1 : I === "Set" || S === "Set" ? uJ(i, t, e, n) : I === "Map" ? mJ(i, t, e, n) : !0;
@@ -36399,37 +36399,37 @@ const Os = /* @__PURE__ */ new Map(), zJ = (i = {}) => ({
36399
36399
  if (Os.has(e))
36400
36400
  y = Os.get(e);
36401
36401
  else {
36402
- const g = new W0();
36403
- g.setFromArray(e);
36404
- const L = g.getSize(new N());
36402
+ const f = new W0();
36403
+ f.setFromArray(e);
36404
+ const L = f.getSize(new N());
36405
36405
  i.split && (L.z /= 1 - i.split), i.sideRepeat && (L.z /= i.sideRepeat), y = {
36406
- box: g,
36406
+ box: f,
36407
36407
  size: L
36408
36408
  }, Os.set(e, y);
36409
36409
  }
36410
- const { box: W, size: f } = y;
36410
+ const { box: W, size: g } = y;
36411
36411
  return Math.abs(c - h) < Math.abs(o - r) ? [
36412
36412
  new _(
36413
- (o - W.min.x) / f.x,
36414
- (d - W.min.z) / f.z
36413
+ (o - W.min.x) / g.x,
36414
+ (d - W.min.z) / g.z
36415
36415
  ),
36416
36416
  new _(
36417
- (r - W.min.x) / f.x,
36418
- (u - W.min.z) / f.z
36417
+ (r - W.min.x) / g.x,
36418
+ (u - W.min.z) / g.z
36419
36419
  ),
36420
36420
  new _(
36421
- (m - W.min.x) / f.x,
36422
- (G - W.min.z) / f.z
36421
+ (m - W.min.x) / g.x,
36422
+ (G - W.min.z) / g.z
36423
36423
  ),
36424
36424
  new _(
36425
- (Z - W.min.x) / f.x,
36426
- (X - W.min.z) / f.z
36425
+ (Z - W.min.x) / g.x,
36426
+ (X - W.min.z) / g.z
36427
36427
  )
36428
36428
  ] : [
36429
- new _((c - W.min.y) / f.y, (d - W.min.z) / f.z),
36430
- new _((h - W.min.y) / f.y, (u - W.min.z) / f.z),
36431
- new _((b - W.min.y) / f.y, (G - W.min.z) / f.z),
36432
- new _((p - W.min.y) / f.y, (X - W.min.z) / f.z)
36429
+ new _((c - W.min.y) / g.y, (d - W.min.z) / g.z),
36430
+ new _((h - W.min.y) / g.y, (u - W.min.z) / g.z),
36431
+ new _((b - W.min.y) / g.y, (G - W.min.z) / g.z),
36432
+ new _((p - W.min.y) / g.y, (X - W.min.z) / g.z)
36433
36433
  ];
36434
36434
  }
36435
36435
  }), UJ = () => {
@@ -36458,16 +36458,16 @@ function ed(i) {
36458
36458
  }
36459
36459
  const EJ = (3 + 16 * Ki) * Ki, QJ = (2 + 12 * Ki) * Ki, jJ = (9 + 64 * Ki) * Ki * Ki, na = ed(4), T3 = ed(8), M3 = ed(12), F3 = ed(16), A0 = ed(4);
36460
36460
  function AJ(i, t, e, n, s, l, a) {
36461
- let o, c, d, r, h, u, m, b, G, Z, p, X, y, W, f, g, L, I;
36461
+ let o, c, d, r, h, u, m, b, G, Z, p, X, y, W, g, f, L, I;
36462
36462
  const S = i - s, R = e - s, v = t - l, k = n - l;
36463
- W = S * k, u = U0 * S, m = u - (u - S), b = S - m, u = U0 * k, G = u - (u - k), Z = k - G, f = b * Z - (W - m * G - b * G - m * Z), g = v * R, u = U0 * v, m = u - (u - v), b = v - m, u = U0 * R, G = u - (u - R), Z = R - G, L = b * Z - (g - m * G - b * G - m * Z), p = f - L, h = f - p, na[0] = f - (p + h) + (h - L), X = W + p, h = X - W, y = W - (X - h) + (p - h), p = y - g, h = y - p, na[1] = y - (p + h) + (h - g), I = X + p, h = I - X, na[2] = X - (I - h) + (p - h), na[3] = I;
36463
+ W = S * k, u = U0 * S, m = u - (u - S), b = S - m, u = U0 * k, G = u - (u - k), Z = k - G, g = b * Z - (W - m * G - b * G - m * Z), f = v * R, u = U0 * v, m = u - (u - v), b = v - m, u = U0 * R, G = u - (u - R), Z = R - G, L = b * Z - (f - m * G - b * G - m * Z), p = g - L, h = g - p, na[0] = g - (p + h) + (h - L), X = W + p, h = X - W, y = W - (X - h) + (p - h), p = y - f, h = y - p, na[1] = y - (p + h) + (h - f), I = X + p, h = I - X, na[2] = X - (I - h) + (p - h), na[3] = I;
36464
36464
  let w = PJ(4, na), K = QJ * a;
36465
36465
  if (w >= K || -w >= K || (h = i - S, o = i - (S + h) + (h - s), h = e - R, d = e - (R + h) + (h - s), h = t - v, c = t - (v + h) + (h - l), h = n - k, r = n - (k + h) + (h - l), o === 0 && c === 0 && d === 0 && r === 0) || (K = jJ * a + BJ * Math.abs(w), w += S * r + k * o - (v * d + R * c), w >= K || -w >= K)) return w;
36466
- W = o * k, u = U0 * o, m = u - (u - o), b = o - m, u = U0 * k, G = u - (u - k), Z = k - G, f = b * Z - (W - m * G - b * G - m * Z), g = c * R, u = U0 * c, m = u - (u - c), b = c - m, u = U0 * R, G = u - (u - R), Z = R - G, L = b * Z - (g - m * G - b * G - m * Z), p = f - L, h = f - p, A0[0] = f - (p + h) + (h - L), X = W + p, h = X - W, y = W - (X - h) + (p - h), p = y - g, h = y - p, A0[1] = y - (p + h) + (h - g), I = X + p, h = I - X, A0[2] = X - (I - h) + (p - h), A0[3] = I;
36466
+ W = o * k, u = U0 * o, m = u - (u - o), b = o - m, u = U0 * k, G = u - (u - k), Z = k - G, g = b * Z - (W - m * G - b * G - m * Z), f = c * R, u = U0 * c, m = u - (u - c), b = c - m, u = U0 * R, G = u - (u - R), Z = R - G, L = b * Z - (f - m * G - b * G - m * Z), p = g - L, h = g - p, A0[0] = g - (p + h) + (h - L), X = W + p, h = X - W, y = W - (X - h) + (p - h), p = y - f, h = y - p, A0[1] = y - (p + h) + (h - f), I = X + p, h = I - X, A0[2] = X - (I - h) + (p - h), A0[3] = I;
36467
36467
  const H = w1(4, na, 4, A0, T3);
36468
- W = S * r, u = U0 * S, m = u - (u - S), b = S - m, u = U0 * r, G = u - (u - r), Z = r - G, f = b * Z - (W - m * G - b * G - m * Z), g = v * d, u = U0 * v, m = u - (u - v), b = v - m, u = U0 * d, G = u - (u - d), Z = d - G, L = b * Z - (g - m * G - b * G - m * Z), p = f - L, h = f - p, A0[0] = f - (p + h) + (h - L), X = W + p, h = X - W, y = W - (X - h) + (p - h), p = y - g, h = y - p, A0[1] = y - (p + h) + (h - g), I = X + p, h = I - X, A0[2] = X - (I - h) + (p - h), A0[3] = I;
36468
+ W = S * r, u = U0 * S, m = u - (u - S), b = S - m, u = U0 * r, G = u - (u - r), Z = r - G, g = b * Z - (W - m * G - b * G - m * Z), f = v * d, u = U0 * v, m = u - (u - v), b = v - m, u = U0 * d, G = u - (u - d), Z = d - G, L = b * Z - (f - m * G - b * G - m * Z), p = g - L, h = g - p, A0[0] = g - (p + h) + (h - L), X = W + p, h = X - W, y = W - (X - h) + (p - h), p = y - f, h = y - p, A0[1] = y - (p + h) + (h - f), I = X + p, h = I - X, A0[2] = X - (I - h) + (p - h), A0[3] = I;
36469
36469
  const z = w1(H, T3, 4, A0, M3);
36470
- W = o * r, u = U0 * o, m = u - (u - o), b = o - m, u = U0 * r, G = u - (u - r), Z = r - G, f = b * Z - (W - m * G - b * G - m * Z), g = c * d, u = U0 * c, m = u - (u - c), b = c - m, u = U0 * d, G = u - (u - d), Z = d - G, L = b * Z - (g - m * G - b * G - m * Z), p = f - L, h = f - p, A0[0] = f - (p + h) + (h - L), X = W + p, h = X - W, y = W - (X - h) + (p - h), p = y - g, h = y - p, A0[1] = y - (p + h) + (h - g), I = X + p, h = I - X, A0[2] = X - (I - h) + (p - h), A0[3] = I;
36470
+ W = o * r, u = U0 * o, m = u - (u - o), b = o - m, u = U0 * r, G = u - (u - r), Z = r - G, g = b * Z - (W - m * G - b * G - m * Z), f = c * d, u = U0 * c, m = u - (u - c), b = c - m, u = U0 * d, G = u - (u - d), Z = d - G, L = b * Z - (f - m * G - b * G - m * Z), p = g - L, h = g - p, A0[0] = g - (p + h) + (h - L), X = W + p, h = X - W, y = W - (X - h) + (p - h), p = y - f, h = y - p, A0[1] = y - (p + h) + (h - f), I = X + p, h = I - X, A0[2] = X - (I - h) + (p - h), A0[3] = I;
36471
36471
  const E = w1(z, M3, 4, A0, F3);
36472
36472
  return F3[E - 1];
36473
36473
  }
@@ -36512,14 +36512,14 @@ class Wc {
36512
36512
  const v = K1(p, X, t[2 * R], t[2 * R + 1]);
36513
36513
  v < m && v > 0 && (G = R, m = v);
36514
36514
  }
36515
- let y = t[2 * G], W = t[2 * G + 1], f = 1 / 0;
36515
+ let y = t[2 * G], W = t[2 * G + 1], g = 1 / 0;
36516
36516
  for (let R = 0; R < a; R++) {
36517
36517
  if (R === b || R === G) continue;
36518
36518
  const v = _J(p, X, y, W, t[2 * R], t[2 * R + 1]);
36519
- v < f && (Z = R, f = v);
36519
+ v < g && (Z = R, g = v);
36520
36520
  }
36521
- let g = t[2 * Z], L = t[2 * Z + 1];
36522
- if (f === 1 / 0) {
36521
+ let f = t[2 * Z], L = t[2 * Z + 1];
36522
+ if (g === 1 / 0) {
36523
36523
  for (let k = 0; k < a; k++)
36524
36524
  this._dists[k] = t[2 * k] - t[0] || t[2 * k + 1] - t[1];
36525
36525
  ua(this._ids, this._dists, 0, a - 1);
@@ -36532,17 +36532,17 @@ class Wc {
36532
36532
  this.hull = R.subarray(0, v), this.triangles = new Uint32Array(0), this.halfedges = new Uint32Array(0);
36533
36533
  return;
36534
36534
  }
36535
- if (gr(p, X, y, W, g, L) < 0) {
36535
+ if (gr(p, X, y, W, f, L) < 0) {
36536
36536
  const R = G, v = y, k = W;
36537
- G = Z, y = g, W = L, Z = R, g = v, L = k;
36537
+ G = Z, y = f, W = L, Z = R, f = v, L = k;
36538
36538
  }
36539
- const I = qJ(p, X, y, W, g, L);
36539
+ const I = qJ(p, X, y, W, f, L);
36540
36540
  this._cx = I.x, this._cy = I.y;
36541
36541
  for (let R = 0; R < a; R++)
36542
36542
  this._dists[R] = K1(t[2 * R], t[2 * R + 1], I.x, I.y);
36543
36543
  ua(this._ids, this._dists, 0, a - 1), this._hullStart = b;
36544
36544
  let S = 3;
36545
- n[b] = e[Z] = G, n[G] = e[b] = Z, n[Z] = e[G] = b, s[b] = 0, s[G] = 1, s[Z] = 2, l.fill(-1), l[this._hashKey(p, X)] = b, l[this._hashKey(y, W)] = G, l[this._hashKey(g, L)] = Z, this.trianglesLen = 0, this._addTriangle(b, G, Z, -1, -1, -1);
36545
+ n[b] = e[Z] = G, n[G] = e[b] = Z, n[Z] = e[G] = b, s[b] = 0, s[G] = 1, s[Z] = 2, l.fill(-1), l[this._hashKey(p, X)] = b, l[this._hashKey(y, W)] = G, l[this._hashKey(f, L)] = Z, this.trianglesLen = 0, this._addTriangle(b, G, Z, -1, -1, -1);
36546
36546
  for (let R = 0, v, k; R < this._ids.length; R++) {
36547
36547
  const w = this._ids[R], K = t[2 * w], H = t[2 * w + 1];
36548
36548
  if (R > 0 && Math.abs(K - v) <= H3 && Math.abs(H - k) <= H3 || (v = K, k = H, w === b || w === G || w === Z)) continue;
@@ -36806,7 +36806,7 @@ class sw {
36806
36806
  let l, a;
36807
36807
  const o = this.circumcenters = this._circumcenters.subarray(0, n.length / 3 * 2);
36808
36808
  for (let G = 0, Z = 0, p = n.length, X, y; G < p; G += 3, Z += 2) {
36809
- const W = n[G] * 2, f = n[G + 1] * 2, g = n[G + 2] * 2, L = t[W], I = t[W + 1], S = t[f], R = t[f + 1], v = t[g], k = t[g + 1], w = S - L, K = R - I, H = v - L, z = k - I, E = (w * z - K * H) * 2;
36809
+ const W = n[G] * 2, g = n[G + 1] * 2, f = n[G + 2] * 2, L = t[W], I = t[W + 1], S = t[g], R = t[g + 1], v = t[f], k = t[f + 1], w = S - L, K = R - I, H = v - L, z = k - I, E = (w * z - K * H) * 2;
36810
36810
  if (Math.abs(E) < 1e-9) {
36811
36811
  if (l === void 0) {
36812
36812
  l = a = 0;
@@ -38110,18 +38110,18 @@ function pK(i) {
38110
38110
  var t = i.grouping === void 0 || i.thousands === void 0 ? nX : dK(iX.call(i.grouping, Number), i.thousands + ""), e = i.currency === void 0 ? "" : i.currency[0] + "", n = i.currency === void 0 ? "" : i.currency[1] + "", s = i.decimal === void 0 ? "." : i.decimal + "", l = i.numerals === void 0 ? nX : rK(iX.call(i.numerals, String)), a = i.percent === void 0 ? "%" : i.percent + "", o = i.minus === void 0 ? "−" : i.minus + "", c = i.nan === void 0 ? "NaN" : i.nan + "";
38111
38111
  function d(h) {
38112
38112
  h = Gu(h);
38113
- var u = h.fill, m = h.align, b = h.sign, G = h.symbol, Z = h.zero, p = h.width, X = h.comma, y = h.precision, W = h.trim, f = h.type;
38114
- f === "n" ? (X = !0, f = "g") : eX[f] || (y === void 0 && (y = 12), W = !0, f = "g"), (Z || u === "0" && m === "=") && (Z = !0, u = "0", m = "=");
38115
- var g = G === "$" ? e : G === "#" && /[boxX]/.test(f) ? "0" + f.toLowerCase() : "", L = G === "$" ? n : /[%p]/.test(f) ? a : "", I = eX[f], S = /[defgprs%]/.test(f);
38116
- y = y === void 0 ? 6 : /[gprs]/.test(f) ? Math.max(1, Math.min(21, y)) : Math.max(0, Math.min(20, y));
38113
+ var u = h.fill, m = h.align, b = h.sign, G = h.symbol, Z = h.zero, p = h.width, X = h.comma, y = h.precision, W = h.trim, g = h.type;
38114
+ g === "n" ? (X = !0, g = "g") : eX[g] || (y === void 0 && (y = 12), W = !0, g = "g"), (Z || u === "0" && m === "=") && (Z = !0, u = "0", m = "=");
38115
+ var f = G === "$" ? e : G === "#" && /[boxX]/.test(g) ? "0" + g.toLowerCase() : "", L = G === "$" ? n : /[%p]/.test(g) ? a : "", I = eX[g], S = /[defgprs%]/.test(g);
38116
+ y = y === void 0 ? 6 : /[gprs]/.test(g) ? Math.max(1, Math.min(21, y)) : Math.max(0, Math.min(20, y));
38117
38117
  function R(v) {
38118
- var k = g, w = L, K, H, z;
38119
- if (f === "c")
38118
+ var k = f, w = L, K, H, z;
38119
+ if (g === "c")
38120
38120
  w = I(v) + w, v = "";
38121
38121
  else {
38122
38122
  v = +v;
38123
38123
  var E = v < 0 || 1 / v < 0;
38124
- if (v = isNaN(v) ? c : I(Math.abs(v), y), W && (v = uK(v)), E && +v == 0 && b !== "+" && (E = !1), k = (E ? b === "(" ? b : o : b === "-" || b === "(" ? "" : b) + k, w = (f === "s" ? sX[8 + Og / 3] : "") + w + (E && b === "(" ? ")" : ""), S) {
38124
+ if (v = isNaN(v) ? c : I(Math.abs(v), y), W && (v = uK(v)), E && +v == 0 && b !== "+" && (E = !1), k = (E ? b === "(" ? b : o : b === "-" || b === "(" ? "" : b) + k, w = (g === "s" ? sX[8 + Og / 3] : "") + w + (E && b === "(" ? ")" : ""), S) {
38125
38125
  for (K = -1, H = v.length; ++K < H; )
38126
38126
  if (z = v.charCodeAt(K), 48 > z || z > 57) {
38127
38127
  w = (z === 46 ? s + v.slice(K + 1) : v.slice(K)) + w, v = v.slice(0, K);
@@ -38809,36 +38809,36 @@ function HK(i, { resolution: t = 1 / 0, bbox: e } = {}) {
38809
38809
  let m = [];
38810
38810
  if (u) {
38811
38811
  const p = Cw(a).triangles(), X = new Map(
38812
- a.map(([y, W], f) => [`${y}-${W}`, f])
38812
+ a.map(([y, W], g) => [`${y}-${W}`, g])
38813
38813
  );
38814
38814
  p.features.forEach((y) => {
38815
- const W = y.geometry.coordinates[0].slice(0, 3).reverse(), f = [];
38816
- if (W.forEach(([g, L]) => {
38817
- const I = `${g}-${L}`;
38818
- X.has(I) && f.push(X.get(I));
38819
- }), f.length === 3) {
38820
- if (f.some((g) => g < s.length)) {
38821
- const g = y.properties.circumcenter;
38815
+ const W = y.geometry.coordinates[0].slice(0, 3).reverse(), g = [];
38816
+ if (W.forEach(([f, L]) => {
38817
+ const I = `${f}-${L}`;
38818
+ X.has(I) && g.push(X.get(I));
38819
+ }), g.length === 3) {
38820
+ if (g.some((f) => f < s.length)) {
38821
+ const f = y.properties.circumcenter;
38822
38822
  if (!Z2(
38823
- g,
38823
+ f,
38824
38824
  o,
38825
38825
  u
38826
38826
  ))
38827
38827
  return;
38828
38828
  }
38829
- m.push(...f);
38829
+ m.push(...g);
38830
38830
  }
38831
38831
  });
38832
38832
  } else if (l.length) {
38833
38833
  const p = Wc.from(a);
38834
38834
  for (let X = 0, y = p.triangles.length; X < y; X += 3) {
38835
- const W = [2, 1, 0].map((g) => p.triangles[X + g]), f = W.map((g) => a[g]);
38836
- if (W.some((g) => g < s.length)) {
38837
- const g = [0, 1].map(
38838
- (L) => kN(f, (I) => I[L])
38835
+ const W = [2, 1, 0].map((f) => p.triangles[X + f]), g = W.map((f) => a[f]);
38836
+ if (W.some((f) => f < s.length)) {
38837
+ const f = [0, 1].map(
38838
+ (L) => kN(g, (I) => I[L])
38839
38839
  );
38840
38840
  if (!Z2(
38841
- g,
38841
+ f,
38842
38842
  o,
38843
38843
  u
38844
38844
  ))
@@ -38985,10 +38985,10 @@ class KK extends Ot {
38985
38985
  } = this.parameters, { contour: r, sideTorso: h, topVerts: u, bottomCap: m, topCap: b } = wK(qn({}, this.parameters));
38986
38986
  let G = [], Z = [], p = [], X = 0;
38987
38987
  const y = (W) => {
38988
- const f = Math.round(G.length / 3), g = p.length;
38988
+ const g = Math.round(G.length / 3), f = p.length;
38989
38989
  G = G.concat(W.vertices), Z = Z.concat(W.uvs), p = p.concat(
38990
- f ? W.indices.map((L) => L + f) : W.indices
38991
- ), this.addGroup(g, p.length - g, X++);
38990
+ g ? W.indices.map((L) => L + g) : W.indices
38991
+ ), this.addGroup(f, p.length - f, X++);
38992
38992
  };
38993
38993
  a && (y(h), this.userData.topVerts = c ? Wu(
38994
38994
  r,
@@ -39067,7 +39067,7 @@ class bb extends Ot {
39067
39067
  var c, d, r;
39068
39068
  const h = [], u = e.curveSegments !== void 0 ? e.curveSegments : 12, m = e.steps !== void 0 ? e.steps : 1, b = e.depth !== void 0 ? e.depth : 1;
39069
39069
  let G = e.bevelEnabled !== void 0 ? e.bevelEnabled : !0, Z = e.bevelThickness !== void 0 ? e.bevelThickness : 0.2, p = e.bevelSize !== void 0 ? e.bevelSize : Z - 0.1, X = e.bevelOffset !== void 0 ? e.bevelOffset : 0, y = e.bevelSegments !== void 0 ? e.bevelSegments : 3;
39070
- const W = e.extrudePath, f = e.UVGenerator !== void 0 ? e.UVGenerator : zK, g = (c = e.hasTop) != null ? c : !0, L = (d = e.hasBottom) != null ? d : !0, I = (r = e.hasSide) != null ? r : !0;
39070
+ const W = e.extrudePath, g = e.UVGenerator !== void 0 ? e.UVGenerator : zK, f = (c = e.hasTop) != null ? c : !0, L = (d = e.hasBottom) != null ? d : !0, I = (r = e.hasSide) != null ? r : !0;
39071
39071
  let S, R = !1, v, k, w, K;
39072
39072
  W && (S = W.getSpacedPoints(m), R = !0, G = !1, v = W.computeFrenetFrames(m, !1), k = new N(), w = new N(), K = new N()), G || (y = 0, Z = 0, p = 0, X = 0);
39073
39073
  const H = o.extractPoints(u);
@@ -39173,7 +39173,7 @@ class bb extends Ot {
39173
39173
  const Y = Q[F];
39174
39174
  ft(Y[2] + ot, Y[1] + ot, Y[0] + ot);
39175
39175
  }
39176
- if (nt = m + y * 2, ot = Vt * nt, g)
39176
+ if (nt = m + y * 2, ot = Vt * nt, f)
39177
39177
  for (let F = 0; F < Ut; F++) {
39178
39178
  const Y = Q[F];
39179
39179
  ft(Y[0] + ot, Y[1] + ot, Y[2] + ot);
@@ -39184,7 +39184,7 @@ class bb extends Ot {
39184
39184
  const ot = Q[nt];
39185
39185
  ft(ot[2], ot[1], ot[0]);
39186
39186
  }
39187
- if (g)
39187
+ if (f)
39188
39188
  for (let nt = 0; nt < Ut; nt++) {
39189
39189
  const ot = Q[nt];
39190
39190
  ft(
@@ -39223,7 +39223,7 @@ class bb extends Ot {
39223
39223
  }
39224
39224
  function ft(rt, nt, ot) {
39225
39225
  Ct(rt), Ct(nt), Ct(ot);
39226
- const F = s.length / 3, Y = f.generateTopUV(
39226
+ const F = s.length / 3, Y = g.generateTopUV(
39227
39227
  n,
39228
39228
  s,
39229
39229
  F - 3,
@@ -39234,7 +39234,7 @@ class bb extends Ot {
39234
39234
  }
39235
39235
  function gt(rt, nt, ot, F) {
39236
39236
  Ct(rt), Ct(nt), Ct(F), Ct(nt), Ct(ot), Ct(F);
39237
- const Y = s.length / 3, D = f.generateSideWallUV(
39237
+ const Y = s.length / 3, D = g.generateSideWallUV(
39238
39238
  n,
39239
39239
  s,
39240
39240
  Y - 6,
@@ -39353,11 +39353,11 @@ class BK extends Ge {
39353
39353
  }) : !p && e ? p = ml(
39354
39354
  e.map(
39355
39355
  (X, y) => {
39356
- var W, f;
39356
+ var W, g;
39357
39357
  return rX({
39358
39358
  points: X,
39359
39359
  depth: (W = b[y]) != null ? W : b[0],
39360
- box3: (f = G[y]) != null ? f : G[0],
39360
+ box3: (g = G[y]) != null ? g : G[0],
39361
39361
  split: d,
39362
39362
  hasTop: r,
39363
39363
  hasBottom: h,
@@ -40596,8 +40596,8 @@ class Tk {
40596
40596
  c.TRANSLATION && Z.fromBufferAttribute(c.TRANSLATION, W), c.ROTATION && p.fromBufferAttribute(c.ROTATION, W), c.SCALE && X.fromBufferAttribute(c.SCALE, W), y.setMatrixAt(W, G.compose(Z, p, X));
40597
40597
  for (const W in c)
40598
40598
  if (W === "_COLOR_0") {
40599
- const f = c[W];
40600
- y.instanceColor = new Zl(f.array, f.itemSize, f.normalized);
40599
+ const g = c[W];
40600
+ y.instanceColor = new Zl(g.array, g.itemSize, g.normalized);
40601
40601
  } else W !== "TRANSLATION" && W !== "ROTATION" && W !== "SCALE" && b.geometry.setAttribute(W, c[W]);
40602
40602
  be.prototype.copy.call(y, b), this.parser.assignFinalMaterial(y), m.push(y);
40603
40603
  }
@@ -40695,8 +40695,8 @@ class of extends Aa {
40695
40695
  interpolate_(t, e, n, s) {
40696
40696
  const l = this.resultBuffer, a = this.sampleValues, o = this.valueSize, c = o * 2, d = o * 3, r = s - e, h = (n - e) / r, u = h * h, m = u * h, b = t * d, G = b - d, Z = -2 * m + 3 * u, p = m - u, X = 1 - Z, y = p - u + h;
40697
40697
  for (let W = 0; W !== o; W++) {
40698
- const f = a[G + W + o], g = a[G + W + c] * r, L = a[b + W + o], I = a[b + W] * r;
40699
- l[W] = X * f + y * g + Z * L + p * I;
40698
+ const g = a[G + W + o], f = a[G + W + c] * r, L = a[b + W + o], I = a[b + W] * r;
40699
+ l[W] = X * g + y * f + Z * L + p * I;
40700
40700
  }
40701
40701
  return l;
40702
40702
  }
@@ -41118,11 +41118,11 @@ class jk {
41118
41118
  } else
41119
41119
  o === null ? G = new d(s.count * c) : G = new d(o, u, s.count * c), Z = new ne(G, c, b);
41120
41120
  if (s.sparse !== void 0) {
41121
- const p = Q1.SCALAR, X = Va[s.sparse.indices.componentType], y = s.sparse.indices.byteOffset || 0, W = s.sparse.values.byteOffset || 0, f = new X(a[1], y, s.sparse.count * p), g = new d(a[2], W, s.sparse.count * c);
41121
+ const p = Q1.SCALAR, X = Va[s.sparse.indices.componentType], y = s.sparse.indices.byteOffset || 0, W = s.sparse.values.byteOffset || 0, g = new X(a[1], y, s.sparse.count * p), f = new d(a[2], W, s.sparse.count * c);
41122
41122
  o !== null && (Z = new ne(Z.array.slice(), Z.itemSize, Z.normalized));
41123
- for (let L = 0, I = f.length; L < I; L++) {
41124
- const S = f[L];
41125
- if (Z.setX(S, g[L * c]), c >= 2 && Z.setY(S, g[L * c + 1]), c >= 3 && Z.setZ(S, g[L * c + 2]), c >= 4 && Z.setW(S, g[L * c + 3]), c >= 5) throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.");
41123
+ for (let L = 0, I = g.length; L < I; L++) {
41124
+ const S = g[L];
41125
+ if (Z.setX(S, f[L * c]), c >= 2 && Z.setY(S, f[L * c + 1]), c >= 3 && Z.setZ(S, f[L * c + 2]), c >= 4 && Z.setW(S, f[L * c + 3]), c >= 5) throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.");
41126
41126
  }
41127
41127
  }
41128
41128
  return Z;
@@ -41410,10 +41410,10 @@ class jk {
41410
41410
  ]).then(function(h) {
41411
41411
  const u = h[0], m = h[1], b = h[2], G = h[3], Z = h[4], p = [];
41412
41412
  for (let X = 0, y = u.length; X < y; X++) {
41413
- const W = u[X], f = m[X], g = b[X], L = G[X], I = Z[X];
41413
+ const W = u[X], g = m[X], f = b[X], L = G[X], I = Z[X];
41414
41414
  if (W === void 0) continue;
41415
41415
  W.updateMatrix && W.updateMatrix();
41416
- const S = n._createAnimationTracks(W, f, g, L, I);
41416
+ const S = n._createAnimationTracks(W, g, f, L, I);
41417
41417
  if (S)
41418
41418
  for (let R = 0; R < S.length; R++)
41419
41419
  p.push(S[R]);
@@ -42040,7 +42040,7 @@ var nz = /* @__PURE__ */ Oo(id, 9, 1), iz = /* @__PURE__ */ Oo(mf, 5, 1), O1 = f
42040
42040
  if (X == 1)
42041
42041
  m = nz, b = iz, G = 9, Z = 5;
42042
42042
  else if (X == 2) {
42043
- var g = Bn(i, h, 31) + 257, L = Bn(i, h + 10, 15) + 4, I = g + Bn(i, h + 5, 31) + 1;
42043
+ var f = Bn(i, h, 31) + 257, L = Bn(i, h + 10, 15) + 4, I = f + Bn(i, h + 5, 31) + 1;
42044
42044
  h += 14;
42045
42045
  for (var S = new Tn(I), R = new Tn(19), v = 0; v < L; ++v)
42046
42046
  R[qk[v]] = Bn(i, h + v * 3, 7);
@@ -42057,17 +42057,17 @@ var nz = /* @__PURE__ */ Oo(id, 9, 1), iz = /* @__PURE__ */ Oo(mf, 5, 1), O1 = f
42057
42057
  S[v++] = z;
42058
42058
  }
42059
42059
  }
42060
- var Q = S.subarray(0, g), et = S.subarray(g);
42060
+ var Q = S.subarray(0, f), et = S.subarray(f);
42061
42061
  G = O1(Q), Z = O1(et), m = Oo(Q, G, 1), b = Oo(et, Z, 1);
42062
42062
  } else
42063
42063
  En(1);
42064
42064
  else {
42065
- var y = sz(h) + 4, W = i[y - 4] | i[y - 3] << 8, f = y + W;
42066
- if (f > s) {
42065
+ var y = sz(h) + 4, W = i[y - 4] | i[y - 3] << 8, g = y + W;
42066
+ if (g > s) {
42067
42067
  c && En(0);
42068
42068
  break;
42069
42069
  }
42070
- o && d(u + W), e.set(i.subarray(y, f), u), t.b = u += W, t.p = h = f * 8, t.f = r;
42070
+ o && d(u + W), e.set(i.subarray(y, g), u), t.b = u += W, t.p = h = g * 8, t.f = r;
42071
42071
  continue;
42072
42072
  }
42073
42073
  if (h > p) {
@@ -43581,7 +43581,7 @@ function sa(i) {
43581
43581
  const t = new Dt();
43582
43582
  return t.color.setScalar(i), t;
43583
43583
  }
43584
- const Xf = "0.18.7";
43584
+ const Xf = "0.18.9";
43585
43585
  class Rz {
43586
43586
  constructor() {
43587
43587
  A(this, "event", new vX());
@@ -45102,7 +45102,7 @@ class sd extends Rz {
45102
45102
  }
45103
45103
  }
45104
45104
  A(sd, "VisName", "base");
45105
- const Lf = [73.503677, 18.143561, 135.095346, 53.563624], Uz = [-180, -55.643164, 180, 83.564844], Bz = {
45105
+ const Lf = [73.502355, 18.143579, 135.09567, 53.563269], Uz = [-180, -55.643164, 180, 83.564844], Bz = {
45106
45106
  camera: {
45107
45107
  near: 0.1,
45108
45108
  far: 1e3
@@ -45162,16 +45162,16 @@ class Cf extends Ge {
45162
45162
  this.createGroup();
45163
45163
  const d = this.pencil.getPlugin("draw");
45164
45164
  if (a) {
45165
- const f = yield Promise.all(
45166
- e.features.map((g) => bt(this, null, function* () {
45167
- const { properties: L } = g, I = `area-group-${this.getPropertiesKey(L)}`, S = yield d.draw("Group", {
45165
+ const g = yield Promise.all(
45166
+ e.features.map((f) => bt(this, null, function* () {
45167
+ const { properties: L } = f, I = `area-group-${this.getPropertiesKey(L)}`, S = yield d.draw("Group", {
45168
45168
  target: this,
45169
45169
  key: I
45170
45170
  });
45171
45171
  return S.userData = Jt({}, L), S;
45172
45172
  }))
45173
45173
  );
45174
- this.groupArr = f;
45174
+ this.groupArr = g;
45175
45175
  }
45176
45176
  const {
45177
45177
  lineMat: r,
@@ -45201,11 +45201,11 @@ class Cf extends Ge {
45201
45201
  onTop: this.options.onTop + 3
45202
45202
  })
45203
45203
  ]);
45204
- this.areaArr = X, y.forEach((f) => {
45205
- f.position.z = this.options.depth;
45206
- }), this.lineArr = y, W && (W.forEach((f) => {
45207
- f.position.z = this.options.depth;
45208
- }), this.extrudelineArr = W);
45204
+ this.areaArr = X.filter((g) => !g.userData.ignore), y.forEach((g) => {
45205
+ g.position.z = this.options.depth;
45206
+ }), this.lineArr = y.filter((g) => !g.userData.ignore), W && (W.forEach((g) => {
45207
+ g.position.z = this.options.depth;
45208
+ }), this.extrudelineArr = W.filter((g) => !g.userData.ignore));
45209
45209
  });
45210
45210
  }
45211
45211
  setAreaColor(e, n) {
@@ -46264,28 +46264,26 @@ const Pz = n0(Jt({}, Sl), {
46264
46264
  }
46265
46265
  drawLabels() {
46266
46266
  return bt(this, null, function* () {
46267
- var s;
46267
+ var n;
46268
46268
  const e = this.options.showLabel;
46269
- if (!this.map || !e) return;
46270
- const n = this.map.options.geojson;
46271
- n && (yield Promise.all(
46272
- (s = n.features) == null ? void 0 : s.map((a) => bt(this, [a], function* ({ properties: l }) {
46273
- let { name: o, adcode: c } = l;
46274
- const { DistrictID: d, DistName: r, NAME_CN: h, CENTROID: u } = l;
46275
- c = c || d, o = this.options.adcode === 0 ? h : o || r;
46276
- const m = this.options.adcode === 0 ? this.getLocationPosition([...u]) : this.geAdcodePosition(c);
46269
+ !((n = this.mapArea) != null && n.length) || !e || (yield Promise.all(
46270
+ this.mapArea.map((s) => bt(this, null, function* () {
46271
+ let { name: l, adcode: a } = s.userData;
46272
+ const { DistrictID: o, DistName: c, NAME_CN: d, CENTROID: r } = s.userData;
46273
+ a = a || o, l = this.options.adcode === 0 ? d : l || c;
46274
+ const h = this.options.adcode === 0 ? this.getLocationPosition([...r]) : this.geAdcodePosition(a);
46277
46275
  if (this.drawController.getObject("Node", {
46278
- key: `mapLabel-${c}`
46279
- }) || !m)
46276
+ key: `mapLabel-${a}`
46277
+ }) || !h)
46280
46278
  return;
46281
- const [b, G, Z] = m;
46282
- let p = o;
46283
- e === "lite" && p && (p = o.replace("自治州", "").replace("地区", "").replace("自治区", "").replace("省", "").replace("市", "").replace("壮族", "").replace("特别行政区", "").replace("回族", "").replace("维吾尔", ""));
46284
- const X = p && Dz(p), y = p != null && p.startsWith("澳门") ? -1 : 0;
46279
+ const [u, m, b] = h;
46280
+ let G = l;
46281
+ e === "lite" && G && (G = l.replace("自治州", "").replace("地区", "").replace("自治区", "").replace("省", "").replace("市", "").replace("壮族", "").replace("特别行政区", "").replace("回族", "").replace("维吾尔", ""));
46282
+ const Z = G && Dz(G), p = G != null && G.startsWith("澳门") ? -1 : 0;
46285
46283
  yield this.drawController.draw("Node", {
46286
- position: new N(b, G + y, Z),
46287
- children: X,
46288
- key: `mapLabel-${this.options.adcode === 0 ? o : c}`
46284
+ position: new N(u, m + p, b),
46285
+ children: Z,
46286
+ key: `mapLabel-${this.options.adcode === 0 ? l : a}`
46289
46287
  });
46290
46288
  }))
46291
46289
  ));
@@ -46352,7 +46350,7 @@ const Pz = n0(Jt({}, Sl), {
46352
46350
  }), this.eraseLabels(), this.map && (this.options.drillDownHideParent && this.parentBg.forEach((H) => {
46353
46351
  H.hide();
46354
46352
  }), this.options.showOneLevel ? this.map.hide() : this.map.deactive(), this.options.handleBackKeepCamvasState && this.saveBackCamvasState(-1));
46355
- const f = this.mapHistory.length, g = f - 1, L = this.getDepth(e), I = (u = this.mapHistory[g]) == null ? void 0 : u.depth, S = f === 0 ? 0 : this.mapHistory[g].z + I, R = f === 0 ? 0 : S - L, v = $f(Z).geometry.coordinates, [k, w] = this.projection(v), K = yield this.drawPlaneMap({
46353
+ const g = this.mapHistory.length, f = g - 1, L = this.getDepth(e), I = (u = this.mapHistory[f]) == null ? void 0 : u.depth, S = g === 0 ? 0 : this.mapHistory[f].z + I, R = g === 0 ? 0 : S - L, v = $f(Z).geometry.coordinates, [k, w] = this.projection(v), K = yield this.drawPlaneMap({
46356
46354
  geojson: Z,
46357
46355
  extrudeLineGeojson: p,
46358
46356
  depth: L,
@@ -46372,7 +46370,7 @@ const Pz = n0(Jt({}, Sl), {
46372
46370
  enableTransition: n !== 0
46373
46371
  }), K.position.z = H;
46374
46372
  }
46375
- m == null || m.hide(), this.map && f !== 0 && (n ? yield new Promise((H) => {
46373
+ m == null || m.hide(), this.map && g !== 0 && (n ? yield new Promise((H) => {
46376
46374
  new il(this.map.position).to({ z: S }, n).onComplete(() => {
46377
46375
  H("");
46378
46376
  }).start();
@@ -46410,12 +46408,12 @@ const Pz = n0(Jt({}, Sl), {
46410
46408
  return;
46411
46409
  const o = (p = this.options.lookAtMap) == null ? void 0 : p[(Z = this.mapInfo) == null ? void 0 : Z.adcode];
46412
46410
  if (o) {
46413
- const [y, W, f, g, L, I] = o;
46411
+ const [y, W, g, f, L, I] = o;
46414
46412
  yield (X = this.pencil.cameraControls) == null ? void 0 : X.setLookAt(
46415
46413
  y,
46416
46414
  W,
46417
- f,
46418
46415
  g,
46416
+ f,
46419
46417
  L,
46420
46418
  I,
46421
46419
  l
@@ -46451,8 +46449,8 @@ const Pz = n0(Jt({}, Sl), {
46451
46449
  b,
46452
46450
  G
46453
46451
  ), p = 0, X = 0, y = 0, W = 0;
46454
- for (let f = 0; f < 10; f++) {
46455
- const g = Z - G * 0.5, L = 2 * Math.tan(r * 0.5) * Math.abs(g) / h;
46452
+ for (let g = 0; g < 10; g++) {
46453
+ const f = Z - G * 0.5, L = 2 * Math.tan(r * 0.5) * Math.abs(f) / h;
46456
46454
  p = n * L, X = l * L, y = a * L, W = s * L, Z = d.getDistanceToFitBox(
46457
46455
  m + y + W,
46458
46456
  b + p + X,
@@ -46556,8 +46554,8 @@ const Pz = n0(Jt({}, Sl), {
46556
46554
  if (l.length) {
46557
46555
  const { province: b, city: G } = e.reduce(
46558
46556
  (y, W) => {
46559
- const f = this.getAdcodeShowLevel(W);
46560
- return y[f] = W, y;
46557
+ const g = this.getAdcodeShowLevel(W);
46558
+ return y[g] = W, y;
46561
46559
  },
46562
46560
  {}
46563
46561
  ), {
@@ -46566,8 +46564,8 @@ const Pz = n0(Jt({}, Sl), {
46566
46564
  city: X
46567
46565
  } = l.reduce(
46568
46566
  (y, W) => {
46569
- const f = this.getAdcodeShowLevel(W);
46570
- return y[f] = W, y;
46567
+ const g = this.getAdcodeShowLevel(W);
46568
+ return y[g] = W, y;
46571
46569
  },
46572
46570
  {}
46573
46571
  );
@@ -46652,15 +46650,15 @@ const Oz = {
46652
46650
  class xc extends Gt {
46653
46651
  constructor(t, e = {}) {
46654
46652
  super(t), this.isReflector = !0, this.type = "Reflector", this.camera = new $e();
46655
- const n = this, s = e.color !== void 0 ? new lt(e.color) : new lt(8355711), l = e.textureWidth || 512, a = e.textureHeight || 512, o = e.clipBias || 0, c = e.shader || xc.ReflectorShader, d = e.multisample !== void 0 ? e.multisample : 4, r = new Qn(), h = new N(), u = new N(), m = new N(), b = new Pt(), G = new N(0, 0, -1), Z = new fe(), p = new N(), X = new N(), y = new fe(), W = new Pt(), f = this.camera, g = new s0(l, a, { samples: d, type: tn }), L = new Oe({
46653
+ const n = this, s = e.color !== void 0 ? new lt(e.color) : new lt(8355711), l = e.textureWidth || 512, a = e.textureHeight || 512, o = e.clipBias || 0, c = e.shader || xc.ReflectorShader, d = e.multisample !== void 0 ? e.multisample : 4, r = new Qn(), h = new N(), u = new N(), m = new N(), b = new Pt(), G = new N(0, 0, -1), Z = new fe(), p = new N(), X = new N(), y = new fe(), W = new Pt(), g = this.camera, f = new s0(l, a, { samples: d, type: tn }), L = new Oe({
46656
46654
  name: c.name !== void 0 ? c.name : "unspecified",
46657
46655
  uniforms: Tc.clone(c.uniforms),
46658
46656
  fragmentShader: c.fragmentShader,
46659
46657
  vertexShader: c.vertexShader
46660
46658
  });
46661
- L.uniforms.tDiffuse.value = g.texture, L.uniforms.color.value = s, L.uniforms.textureMatrix.value = W, this.material = L, this.onBeforeRender = function(I, S, R) {
46659
+ L.uniforms.tDiffuse.value = f.texture, L.uniforms.color.value = s, L.uniforms.textureMatrix.value = W, this.material = L, this.onBeforeRender = function(I, S, R) {
46662
46660
  if (u.setFromMatrixPosition(n.matrixWorld), m.setFromMatrixPosition(R.matrixWorld), b.extractRotation(n.matrixWorld), h.set(0, 0, 1), h.applyMatrix4(b), p.subVectors(u, m), p.dot(h) > 0) return;
46663
- p.reflect(h).negate(), p.add(u), b.extractRotation(R.matrixWorld), G.set(0, 0, -1), G.applyMatrix4(b), G.add(m), X.subVectors(u, G), X.reflect(h).negate(), X.add(u), f.position.copy(p), f.up.set(0, 1, 0), f.up.applyMatrix4(b), f.up.reflect(h), f.lookAt(X), f.far = R.far, f.updateMatrixWorld(), f.projectionMatrix.copy(R.projectionMatrix), W.set(
46661
+ p.reflect(h).negate(), p.add(u), b.extractRotation(R.matrixWorld), G.set(0, 0, -1), G.applyMatrix4(b), G.add(m), X.subVectors(u, G), X.reflect(h).negate(), X.add(u), g.position.copy(p), g.up.set(0, 1, 0), g.up.applyMatrix4(b), g.up.reflect(h), g.lookAt(X), g.far = R.far, g.updateMatrixWorld(), g.projectionMatrix.copy(R.projectionMatrix), W.set(
46664
46662
  0.5,
46665
46663
  0,
46666
46664
  0,
@@ -46677,17 +46675,17 @@ class xc extends Gt {
46677
46675
  0,
46678
46676
  0,
46679
46677
  1
46680
- ), W.multiply(f.projectionMatrix), W.multiply(f.matrixWorldInverse), W.multiply(n.matrixWorld), r.setFromNormalAndCoplanarPoint(h, u), r.applyMatrix4(f.matrixWorldInverse), Z.set(r.normal.x, r.normal.y, r.normal.z, r.constant);
46681
- const v = f.projectionMatrix;
46678
+ ), W.multiply(g.projectionMatrix), W.multiply(g.matrixWorldInverse), W.multiply(n.matrixWorld), r.setFromNormalAndCoplanarPoint(h, u), r.applyMatrix4(g.matrixWorldInverse), Z.set(r.normal.x, r.normal.y, r.normal.z, r.constant);
46679
+ const v = g.projectionMatrix;
46682
46680
  y.x = (Math.sign(Z.x) + v.elements[8]) / v.elements[0], y.y = (Math.sign(Z.y) + v.elements[9]) / v.elements[5], y.z = -1, y.w = (1 + v.elements[10]) / v.elements[14], Z.multiplyScalar(2 / Z.dot(y)), v.elements[2] = Z.x, v.elements[6] = Z.y, v.elements[10] = Z.z + 1 - o, v.elements[14] = Z.w, n.visible = !1;
46683
46681
  const k = I.getRenderTarget(), w = I.xr.enabled, K = I.shadowMap.autoUpdate;
46684
- I.xr.enabled = !1, I.shadowMap.autoUpdate = !1, I.setRenderTarget(g), I.state.buffers.depth.setMask(!0), I.autoClear === !1 && I.clear(), I.render(S, f), I.xr.enabled = w, I.shadowMap.autoUpdate = K, I.setRenderTarget(k);
46682
+ I.xr.enabled = !1, I.shadowMap.autoUpdate = !1, I.setRenderTarget(f), I.state.buffers.depth.setMask(!0), I.autoClear === !1 && I.clear(), I.render(S, g), I.xr.enabled = w, I.shadowMap.autoUpdate = K, I.setRenderTarget(k);
46685
46683
  const H = R.viewport;
46686
46684
  H !== void 0 && I.state.viewport(H), n.visible = !0;
46687
46685
  }, this.getRenderTarget = function() {
46688
- return g;
46686
+ return f;
46689
46687
  }, this.dispose = function() {
46690
- g.dispose(), n.material.dispose();
46688
+ f.dispose(), n.material.dispose();
46691
46689
  };
46692
46690
  }
46693
46691
  }
@@ -46772,21 +46770,21 @@ class Sc extends Gt {
46772
46770
  // ensures, refractors are drawn from farthest to closest
46773
46771
  }), this.material.uniforms.color.value = s, this.material.uniforms.tDiffuse.value = m.texture, this.material.uniforms.textureMatrix.value = u;
46774
46772
  const b = function() {
46775
- const y = new N(), W = new N(), f = new Pt(), g = new N(), L = new N();
46773
+ const y = new N(), W = new N(), g = new Pt(), f = new N(), L = new N();
46776
46774
  return function(S) {
46777
- return y.setFromMatrixPosition(n.matrixWorld), W.setFromMatrixPosition(S.matrixWorld), g.subVectors(y, W), f.extractRotation(n.matrixWorld), L.set(0, 0, 1), L.applyMatrix4(f), g.dot(L) < 0;
46775
+ return y.setFromMatrixPosition(n.matrixWorld), W.setFromMatrixPosition(S.matrixWorld), f.subVectors(y, W), g.extractRotation(n.matrixWorld), L.set(0, 0, 1), L.applyMatrix4(g), f.dot(L) < 0;
46778
46776
  };
46779
46777
  }(), G = function() {
46780
- const y = new N(), W = new N(), f = new Qe(), g = new N();
46778
+ const y = new N(), W = new N(), g = new Qe(), f = new N();
46781
46779
  return function() {
46782
- n.matrixWorld.decompose(W, f, g), y.set(0, 0, 1).applyQuaternion(f).normalize(), y.negate(), h.setFromNormalAndCoplanarPoint(y, W);
46780
+ n.matrixWorld.decompose(W, g, f), y.set(0, 0, 1).applyQuaternion(g).normalize(), y.negate(), h.setFromNormalAndCoplanarPoint(y, W);
46783
46781
  };
46784
46782
  }(), Z = function() {
46785
- const y = new Qn(), W = new fe(), f = new fe();
46783
+ const y = new Qn(), W = new fe(), g = new fe();
46786
46784
  return function(L) {
46787
46785
  r.matrixWorld.copy(L.matrixWorld), r.matrixWorldInverse.copy(r.matrixWorld).invert(), r.projectionMatrix.copy(L.projectionMatrix), r.far = L.far, y.copy(h), y.applyMatrix4(r.matrixWorldInverse), W.set(y.normal.x, y.normal.y, y.normal.z, y.constant);
46788
46786
  const I = r.projectionMatrix;
46789
- f.x = (Math.sign(W.x) + I.elements[8]) / I.elements[0], f.y = (Math.sign(W.y) + I.elements[9]) / I.elements[5], f.z = -1, f.w = (1 + I.elements[10]) / I.elements[14], W.multiplyScalar(2 / W.dot(f)), I.elements[2] = W.x, I.elements[6] = W.y, I.elements[10] = W.z + 1 - o, I.elements[14] = W.w;
46787
+ g.x = (Math.sign(W.x) + I.elements[8]) / I.elements[0], g.y = (Math.sign(W.y) + I.elements[9]) / I.elements[5], g.z = -1, g.w = (1 + I.elements[10]) / I.elements[14], W.multiplyScalar(2 / W.dot(g)), I.elements[2] = W.x, I.elements[6] = W.y, I.elements[10] = W.z + 1 - o, I.elements[14] = W.w;
46790
46788
  };
46791
46789
  }();
46792
46790
  function p(y) {
@@ -46809,15 +46807,15 @@ class Sc extends Gt {
46809
46807
  1
46810
46808
  ), u.multiply(y.projectionMatrix), u.multiply(y.matrixWorldInverse), u.multiply(n.matrixWorld);
46811
46809
  }
46812
- function X(y, W, f) {
46810
+ function X(y, W, g) {
46813
46811
  n.visible = !1;
46814
- const g = y.getRenderTarget(), L = y.xr.enabled, I = y.shadowMap.autoUpdate;
46815
- y.xr.enabled = !1, y.shadowMap.autoUpdate = !1, y.setRenderTarget(m), y.autoClear === !1 && y.clear(), y.render(W, r), y.xr.enabled = L, y.shadowMap.autoUpdate = I, y.setRenderTarget(g);
46816
- const S = f.viewport;
46812
+ const f = y.getRenderTarget(), L = y.xr.enabled, I = y.shadowMap.autoUpdate;
46813
+ y.xr.enabled = !1, y.shadowMap.autoUpdate = !1, y.setRenderTarget(m), y.autoClear === !1 && y.clear(), y.render(W, r), y.xr.enabled = L, y.shadowMap.autoUpdate = I, y.setRenderTarget(f);
46814
+ const S = g.viewport;
46817
46815
  S !== void 0 && y.state.viewport(S), n.visible = !0;
46818
46816
  }
46819
- this.onBeforeRender = function(y, W, f) {
46820
- f.userData.refractor !== !0 && b(f) && (G(), p(f), Z(f), X(y, W, f));
46817
+ this.onBeforeRender = function(y, W, g) {
46818
+ g.userData.refractor !== !0 && b(g) && (G(), p(g), Z(g), X(y, W, g));
46821
46819
  }, this.getRenderTarget = function() {
46822
46820
  return m;
46823
46821
  }, this.dispose = function() {
@@ -46903,12 +46901,12 @@ class pm extends Gt {
46903
46901
  textureWidth: l,
46904
46902
  textureHeight: a,
46905
46903
  clipBias: o
46906
- }), f = new Sc(t, {
46904
+ }), g = new Sc(t, {
46907
46905
  textureWidth: l,
46908
46906
  textureHeight: a,
46909
46907
  clipBias: o
46910
46908
  });
46911
- W.matrixAutoUpdate = !1, f.matrixAutoUpdate = !1, this.material = new Oe({
46909
+ W.matrixAutoUpdate = !1, g.matrixAutoUpdate = !1, this.material = new Oe({
46912
46910
  name: u.name,
46913
46911
  uniforms: Tc.merge([It.fog, u.uniforms]),
46914
46912
  vertexShader: u.vertexShader,
@@ -46921,8 +46919,8 @@ class pm extends Gt {
46921
46919
  }) : this.material.uniforms.flowDirection = {
46922
46920
  type: "v2",
46923
46921
  value: c
46924
- }, b.wrapS = b.wrapT = Se, G.wrapS = G.wrapT = Se, this.material.uniforms.tReflectionMap.value = W.getRenderTarget().texture, this.material.uniforms.tRefractionMap.value = f.getRenderTarget().texture, this.material.uniforms.tNormalMap0.value = b, this.material.uniforms.tNormalMap1.value = G, this.material.uniforms.color.value = s, this.material.uniforms.reflectivity.value = r, this.material.uniforms.textureMatrix.value = X, this.material.uniforms.config.value.x = 0, this.material.uniforms.config.value.y = p, this.material.uniforms.config.value.z = p, this.material.uniforms.config.value.w = h;
46925
- function g(I) {
46922
+ }, b.wrapS = b.wrapT = Se, G.wrapS = G.wrapT = Se, this.material.uniforms.tReflectionMap.value = W.getRenderTarget().texture, this.material.uniforms.tRefractionMap.value = g.getRenderTarget().texture, this.material.uniforms.tNormalMap0.value = b, this.material.uniforms.tNormalMap1.value = G, this.material.uniforms.color.value = s, this.material.uniforms.reflectivity.value = r, this.material.uniforms.textureMatrix.value = X, this.material.uniforms.config.value.x = 0, this.material.uniforms.config.value.y = p, this.material.uniforms.config.value.z = p, this.material.uniforms.config.value.w = h;
46923
+ function f(I) {
46926
46924
  X.set(
46927
46925
  0.5,
46928
46926
  0,
@@ -46947,7 +46945,7 @@ class pm extends Gt {
46947
46945
  S.value.x += d * I, S.value.y = S.value.x + p, S.value.x >= Z ? (S.value.x = 0, S.value.y = p) : S.value.y >= Z && (S.value.y = S.value.y - Z);
46948
46946
  }
46949
46947
  this.onBeforeRender = function(I, S, R) {
46950
- g(R), L(), n.visible = !1, W.matrixWorld.copy(n.matrixWorld), f.matrixWorld.copy(n.matrixWorld), W.onBeforeRender(I, S, R), f.onBeforeRender(I, S, R), n.visible = !0;
46948
+ f(R), L(), n.visible = !1, W.matrixWorld.copy(n.matrixWorld), g.matrixWorld.copy(n.matrixWorld), W.onBeforeRender(I, S, R), g.onBeforeRender(I, S, R), n.visible = !0;
46951
46949
  };
46952
46950
  }
46953
46951
  }
@@ -47200,10 +47198,10 @@ class Nf extends Ge {
47200
47198
  const G = {};
47201
47199
  (e.features || e).forEach((p) => {
47202
47200
  const X = typeof p.properties.h == "string" ? p.properties.h.split(".")[1] : 0, y = Number(p.properties.h) | 0;
47203
- G[X] || (G[X] = {}), G[X][y] || (G[X][y] = []), b ? b.some((f) => {
47201
+ G[X] || (G[X] = {}), G[X][y] || (G[X][y] = []), b ? b.some((g) => {
47204
47202
  p.geometry.coordinates[1] && console.log(p.geometry.coordinates[1]);
47205
- const g = Lc(p.geometry.coordinates[0]);
47206
- return S2(f, g) ? (G[X][y].push(p), !0) : !1;
47203
+ const f = Lc(p.geometry.coordinates[0]);
47204
+ return S2(g, f) ? (G[X][y].push(p), !0) : !1;
47207
47205
  }) || this.outJson.set(p, !1) : G[X][y].push(p);
47208
47206
  });
47209
47207
  const Z = Object.keys(G).map((p) => {
@@ -47214,14 +47212,14 @@ class Nf extends Ge {
47214
47212
  z: +p,
47215
47213
  h: +y,
47216
47214
  coordinatesArr: W.map(
47217
- (f) => f.geometry.type === "Polygon" ? f.geometry.coordinates[0] : f.geometry.coordinates[0][0]
47215
+ (g) => g.geometry.type === "Polygon" ? g.geometry.coordinates[0] : g.geometry.coordinates[0][0]
47218
47216
  )
47219
47217
  };
47220
47218
  });
47221
47219
  }).flat().filter((p) => p.coordinatesArr.length);
47222
47220
  m = yield Promise.all(
47223
47221
  Z.map((p) => {
47224
- const { h: X, z: y, coordinatesArr: W } = p, f = +X <= 20 ? +X / 18 : +X <= 60 ? +X / 27 : +X / 12;
47222
+ const { h: X, z: y, coordinatesArr: W } = p, g = +X <= 20 ? +X / 18 : +X <= 60 ? +X / 27 : +X / 12;
47225
47223
  return d.geoGeometry("extrudePolygon", {
47226
47224
  cacheKey: s,
47227
47225
  userData: {
@@ -47234,7 +47232,7 @@ class Nf extends Ge {
47234
47232
  useGroups: 2,
47235
47233
  depth: [Number(X) * (l || 1)],
47236
47234
  hasBottom: !1,
47237
- sideRepeat: f
47235
+ sideRepeat: g
47238
47236
  }
47239
47237
  });
47240
47238
  })
@@ -47290,8 +47288,8 @@ class vf extends Ge {
47290
47288
  if (S2(X, y))
47291
47289
  return u[Z].push(G), !0;
47292
47290
  {
47293
- const f = MX(G.geometry.coordinates[0]);
47294
- if (iR(X, f)) {
47291
+ const g = MX(G.geometry.coordinates[0]);
47292
+ if (iR(X, g)) {
47295
47293
  const L = _z(X, G);
47296
47294
  L.features[0] && u[Z].push(n0(Jt({}, G), {
47297
47295
  geometry: n0(Jt({}, G.geometry), {
@@ -47381,12 +47379,12 @@ class Tf extends Ge {
47381
47379
  Z.geometry.coordinates[1] && console.log(Z.geometry.coordinates[1]);
47382
47380
  const W = MX(Z.geometry.coordinates[0]);
47383
47381
  if (S2(y, W)) {
47384
- const g = [
47382
+ const f = [
47385
47383
  Z.geometry.coordinates[0].filter((L) => x2(L, y))
47386
47384
  ];
47387
- return g[0].length && m[p].push(n0(Jt({}, Z), {
47385
+ return f[0].length && m[p].push(n0(Jt({}, Z), {
47388
47386
  geometry: n0(Jt({}, Z.geometry), {
47389
- coordinates: g
47387
+ coordinates: f
47390
47388
  })
47391
47389
  })), !0;
47392
47390
  }
@@ -48363,18 +48361,18 @@ class Hf extends sd {
48363
48361
  [
48364
48362
  ...(r == null ? void 0 : r.features) || [],
48365
48363
  ...(h == null ? void 0 : h.features) || []
48366
- ].forEach((f) => {
48367
- f.properties.o && (u[f.properties.o] = !0);
48364
+ ].forEach((g) => {
48365
+ g.properties.o && (u[g.properties.o] = !0);
48368
48366
  });
48369
- const m = Object.keys(u).map((f) => +f).sort((f, g) => f - g), b = -Rc({
48367
+ const m = Object.keys(u).map((g) => +g).sort((g, f) => g - f), b = -Rc({
48370
48368
  center: this.pcenter,
48371
48369
  scale: this.pscale
48372
48370
  })([this.pcenter[0], 899e-8 + this.pcenter[1]])[1];
48373
48371
  let G = 1e3, Z = 1e3;
48374
48372
  const p = new N(0, 0, 0);
48375
48373
  if (s) {
48376
- const f = this.projection([s[0], s[1]]), g = this.projection([s[2], s[3]]), L = Math.abs(g[0] - f[0]), I = Math.abs(g[1] - f[1]);
48377
- G = L, Z = I, p.set((g[0] + f[0]) / 2, -(g[1] + f[1]) / 2, -0.05);
48374
+ const g = this.projection([s[0], s[1]]), f = this.projection([s[2], s[3]]), L = Math.abs(f[0] - g[0]), I = Math.abs(f[1] - g[1]);
48375
+ G = L, Z = I, p.set((f[0] + g[0]) / 2, -(f[1] + g[1]) / 2, -0.05);
48378
48376
  }
48379
48377
  const X = this.mList.getMaterial("city-plane"), y = yield this.drawController.draw(
48380
48378
  "Plane",