vis-core 0.28.37 → 0.28.40

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.
@@ -14,7 +14,7 @@ var vn = (v, e) => (e = Symbol[v]) ? e : Symbol.for("Symbol." + v), Bn = (v) =>
14
14
  }, Yi = (v, e) => Fn(v, An(e));
15
15
  var m0 = (v, e, n) => Vn(v, typeof e != "symbol" ? e + "" : e, n);
16
16
  var yn = (v, e, n) => Un(kn(v), n, e);
17
- var E0 = (v, e, n) => new Promise((r, C) => {
17
+ var V0 = (v, e, n) => new Promise((r, C) => {
18
18
  var _ = (Se) => {
19
19
  try {
20
20
  O(n.next(Se));
@@ -63,7 +63,7 @@ import { continentsCountriesIso2 } from "geojson-cn";
63
63
  Array.prototype.at || (Array.prototype.at = function(v) {
64
64
  return v < 0 && (v = this.length + v), this[v];
65
65
  });
66
- const version = "0.28.37", publicKeyPEM = "LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUlJQklqQU5CZ2txaGtpRzl3MEJBUUVGQUFPQ0FROEFNSUlCQ2dLQ0FRRUEyTG1aVVQzVG9LZEVRRUdrdUU1QQo3dnlYTzRMM1Z6NDA5RFF2a2xzRHZ2SytNM2M2OGl4ZEVhZDZFcnZGS2FKQ1QrNTZNdU1XSXhUTnlDZDVQSkFGCjVYdzI4cW1iVkVCR3FGdXVIZTltSm5GUmRXN1NpK1Z1cTZvRWxwQkRkeEFIQ0dsWVVpU1R3WmhBbjJaVXJLSUYKd1J2c1k1bi9uWWNhZnl5QW9tRjhmNVRsTkpwS1JtbDU3WlRSWjBMdzdQRDFSeHFIbmJ0YWFETkpiSDV5eFd6cQpaVTBwQWhxMFNkNHdlOW1DUTJWWXc5czhtUERLbW4rU083eGovSUsrR1ZEaEJNOUpaZ3VIcGFZUGt3bWd5UkdwCkx6V0tHMkZULzJRalZUT1dRT09mRFVtVitDSVlsN1hVVlh1Q0toYWFNQ0ZVa1JQOHg4aEZucmNFeklHQ1JpM3IKK3dJREFRQUIKLS0tLS1FTkQgUFVCTElDIEtFWS0tLS0t", accessToken = {
66
+ const version = "0.28.40", publicKeyPEM = "LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUlJQklqQU5CZ2txaGtpRzl3MEJBUUVGQUFPQ0FROEFNSUlCQ2dLQ0FRRUEyTG1aVVQzVG9LZEVRRUdrdUU1QQo3dnlYTzRMM1Z6NDA5RFF2a2xzRHZ2SytNM2M2OGl4ZEVhZDZFcnZGS2FKQ1QrNTZNdU1XSXhUTnlDZDVQSkFGCjVYdzI4cW1iVkVCR3FGdXVIZTltSm5GUmRXN1NpK1Z1cTZvRWxwQkRkeEFIQ0dsWVVpU1R3WmhBbjJaVXJLSUYKd1J2c1k1bi9uWWNhZnl5QW9tRjhmNVRsTkpwS1JtbDU3WlRSWjBMdzdQRDFSeHFIbmJ0YWFETkpiSDV5eFd6cQpaVTBwQWhxMFNkNHdlOW1DUTJWWXc5czhtUERLbW4rU083eGovSUsrR1ZEaEJNOUpaZ3VIcGFZUGt3bWd5UkdwCkx6V0tHMkZULzJRalZUT1dRT09mRFVtVitDSVlsN1hVVlh1Q0toYWFNQ0ZVa1JQOHg4aEZucmNFeklHQ1JpM3IKK3dJREFRQUIKLS0tLS1FTkQgUFVCTElDIEtFWS0tLS0t", accessToken = {
67
67
  token: void 0,
68
68
  getInfo() {
69
69
  if (!this.token)
@@ -14528,7 +14528,7 @@ class ExtrudeGeometry extends BufferGeometry {
14528
14528
  const Vt = Xt.holes;
14529
14529
  if (!ShapeUtils.isClockWise(Zt)) {
14530
14530
  Zt = Zt.reverse();
14531
- for (let w0 = 0, V0 = Vt.length; w0 < V0; w0++) {
14531
+ for (let w0 = 0, P0 = Vt.length; w0 < P0; w0++) {
14532
14532
  const U0 = Vt[w0];
14533
14533
  ShapeUtils.isClockWise(U0) && (Vt[w0] = U0.reverse());
14534
14534
  }
@@ -14553,18 +14553,18 @@ class ExtrudeGeometry extends BufferGeometry {
14553
14553
  $t(Zt), Vt.forEach($t);
14554
14554
  const i0 = Vt.length, Yt = Zt;
14555
14555
  for (let w0 = 0; w0 < i0; w0++) {
14556
- const V0 = Vt[w0];
14557
- Zt = Zt.concat(V0);
14556
+ const P0 = Vt[w0];
14557
+ Zt = Zt.concat(P0);
14558
14558
  }
14559
- function Kt(w0, V0, U0) {
14560
- return V0 || console.error("THREE.ExtrudeGeometry: vec does not exist"), w0.clone().addScaledVector(V0, U0);
14559
+ function Kt(w0, P0, U0) {
14560
+ return P0 || console.error("THREE.ExtrudeGeometry: vec does not exist"), w0.clone().addScaledVector(P0, U0);
14561
14561
  }
14562
14562
  const Ft = Zt.length;
14563
- function Wt(w0, V0, U0) {
14563
+ function Wt(w0, P0, U0) {
14564
14564
  let N0, J0, b0;
14565
- const L0 = w0.x - V0.x, K0 = w0.y - V0.y, H0 = U0.x - w0.x, n0 = U0.y - w0.y, qt = L0 * L0 + K0 * K0, d0 = L0 * n0 - K0 * H0;
14565
+ const L0 = w0.x - P0.x, K0 = w0.y - P0.y, H0 = U0.x - w0.x, n0 = U0.y - w0.y, qt = L0 * L0 + K0 * K0, d0 = L0 * n0 - K0 * H0;
14566
14566
  if (Math.abs(d0) > Number.EPSILON) {
14567
- const g0 = Math.sqrt(qt), I0 = Math.sqrt(H0 * H0 + n0 * n0), C0 = V0.x - K0 / g0, Ti = V0.y + L0 / g0, Q0 = U0.x - n0 / I0, Ri = U0.y + H0 / I0, Wi = ((Q0 - C0) * n0 - (Ri - Ti) * H0) / (L0 * n0 - K0 * H0);
14567
+ const g0 = Math.sqrt(qt), I0 = Math.sqrt(H0 * H0 + n0 * n0), C0 = P0.x - K0 / g0, Ti = P0.y + L0 / g0, Q0 = U0.x - n0 / I0, Ri = U0.y + H0 / I0, Wi = ((Q0 - C0) * n0 - (Ri - Ti) * H0) / (L0 * n0 - K0 * H0);
14568
14568
  N0 = C0 + L0 * Wi - w0.x, J0 = Ti + K0 * Wi - w0.y;
14569
14569
  const bi = N0 * N0 + J0 * J0;
14570
14570
  if (bi <= 2)
@@ -14577,11 +14577,11 @@ class ExtrudeGeometry extends BufferGeometry {
14577
14577
  return new Vector2(N0 / b0, J0 / b0);
14578
14578
  }
14579
14579
  const e0 = [];
14580
- for (let w0 = 0, V0 = Yt.length, U0 = V0 - 1, N0 = w0 + 1; w0 < V0; w0++, U0++, N0++)
14581
- U0 === V0 && (U0 = 0), N0 === V0 && (N0 = 0), e0[w0] = Wt(Yt[w0], Yt[U0], Yt[N0]);
14580
+ for (let w0 = 0, P0 = Yt.length, U0 = P0 - 1, N0 = w0 + 1; w0 < P0; w0++, U0++, N0++)
14581
+ U0 === P0 && (U0 = 0), N0 === P0 && (N0 = 0), e0[w0] = Wt(Yt[w0], Yt[U0], Yt[N0]);
14582
14582
  const c0 = [];
14583
14583
  let h0, G0 = e0.concat();
14584
- for (let w0 = 0, V0 = i0; w0 < V0; w0++) {
14584
+ for (let w0 = 0, P0 = i0; w0 < P0; w0++) {
14585
14585
  const U0 = Vt[w0];
14586
14586
  h0 = [];
14587
14587
  for (let N0 = 0, J0 = U0.length, b0 = J0 - 1, L0 = N0 + 1; N0 < J0; N0++, b0++, L0++)
@@ -14592,7 +14592,7 @@ class ExtrudeGeometry extends BufferGeometry {
14592
14592
  if (Ue === 0)
14593
14593
  D0 = ShapeUtils.triangulateShape(Yt, Vt);
14594
14594
  else {
14595
- const w0 = [], V0 = [];
14595
+ const w0 = [], P0 = [];
14596
14596
  for (let U0 = 0; U0 < Ue; U0++) {
14597
14597
  const N0 = U0 / Ue, J0 = Fe * Math.cos(N0 * Math.PI / 2), b0 = ke * Math.sin(N0 * Math.PI / 2) + ct;
14598
14598
  for (let L0 = 0, K0 = Yt.length; L0 < K0; L0++) {
@@ -14607,23 +14607,23 @@ class ExtrudeGeometry extends BufferGeometry {
14607
14607
  const g0 = Kt(H0[qt], h0[qt], b0);
14608
14608
  q0(g0.x, g0.y, -J0), N0 === 0 && n0.push(g0);
14609
14609
  }
14610
- N0 === 0 && V0.push(n0);
14610
+ N0 === 0 && P0.push(n0);
14611
14611
  }
14612
14612
  }
14613
- D0 = ShapeUtils.triangulateShape(w0, V0);
14613
+ D0 = ShapeUtils.triangulateShape(w0, P0);
14614
14614
  }
14615
14615
  const A0 = D0.length, f0 = ke + ct;
14616
14616
  for (let w0 = 0; w0 < Ft; w0++) {
14617
- const V0 = Pe ? Kt(Zt[w0], G0[w0], f0) : Zt[w0];
14618
- ht ? (xt.copy(dt.normals[0]).multiplyScalar(V0.x), ut.copy(dt.binormals[0]).multiplyScalar(V0.y), Lt.copy(at[0]).add(xt).add(ut), q0(Lt.x, Lt.y, Lt.z)) : q0(V0.x, V0.y, 0);
14617
+ const P0 = Pe ? Kt(Zt[w0], G0[w0], f0) : Zt[w0];
14618
+ ht ? (xt.copy(dt.normals[0]).multiplyScalar(P0.x), ut.copy(dt.binormals[0]).multiplyScalar(P0.y), Lt.copy(at[0]).add(xt).add(ut), q0(Lt.x, Lt.y, Lt.z)) : q0(P0.x, P0.y, 0);
14619
14619
  }
14620
14620
  for (let w0 = 1; w0 <= Ce; w0++)
14621
- for (let V0 = 0; V0 < Ft; V0++) {
14622
- const U0 = Pe ? Kt(Zt[V0], G0[V0], f0) : Zt[V0];
14621
+ for (let P0 = 0; P0 < Ft; P0++) {
14622
+ const U0 = Pe ? Kt(Zt[P0], G0[P0], f0) : Zt[P0];
14623
14623
  ht ? (xt.copy(dt.normals[w0]).multiplyScalar(U0.x), ut.copy(dt.binormals[w0]).multiplyScalar(U0.y), Lt.copy(at[w0]).add(xt).add(ut), q0(Lt.x, Lt.y, Lt.z)) : q0(U0.x, U0.y, Re / Ce * w0);
14624
14624
  }
14625
14625
  for (let w0 = Ue - 1; w0 >= 0; w0--) {
14626
- const V0 = w0 / Ue, U0 = Fe * Math.cos(V0 * Math.PI / 2), N0 = ke * Math.sin(V0 * Math.PI / 2) + ct;
14626
+ const P0 = w0 / Ue, U0 = Fe * Math.cos(P0 * Math.PI / 2), N0 = ke * Math.sin(P0 * Math.PI / 2) + ct;
14627
14627
  for (let J0 = 0, b0 = Yt.length; J0 < b0; J0++) {
14628
14628
  const L0 = Kt(Yt[J0], e0[J0], N0);
14629
14629
  q0(L0.x, L0.y, Re + U0);
@@ -14641,23 +14641,23 @@ class ExtrudeGeometry extends BufferGeometry {
14641
14641
  function T0() {
14642
14642
  const w0 = C.length / 3;
14643
14643
  if (Pe) {
14644
- let V0 = 0, U0 = Ft * V0;
14644
+ let P0 = 0, U0 = Ft * P0;
14645
14645
  for (let N0 = 0; N0 < A0; N0++) {
14646
14646
  const J0 = D0[N0];
14647
14647
  Si(J0[2] + U0, J0[1] + U0, J0[0] + U0);
14648
14648
  }
14649
- V0 = Ce + Ue * 2, U0 = Ft * V0;
14649
+ P0 = Ce + Ue * 2, U0 = Ft * P0;
14650
14650
  for (let N0 = 0; N0 < A0; N0++) {
14651
14651
  const J0 = D0[N0];
14652
14652
  Si(J0[0] + U0, J0[1] + U0, J0[2] + U0);
14653
14653
  }
14654
14654
  } else {
14655
- for (let V0 = 0; V0 < A0; V0++) {
14656
- const U0 = D0[V0];
14655
+ for (let P0 = 0; P0 < A0; P0++) {
14656
+ const U0 = D0[P0];
14657
14657
  Si(U0[2], U0[1], U0[0]);
14658
14658
  }
14659
- for (let V0 = 0; V0 < A0; V0++) {
14660
- const U0 = D0[V0];
14659
+ for (let P0 = 0; P0 < A0; P0++) {
14660
+ const U0 = D0[P0];
14661
14661
  Si(U0[0] + Ft * Ce, U0[1] + Ft * Ce, U0[2] + Ft * Ce);
14662
14662
  }
14663
14663
  }
@@ -14665,36 +14665,36 @@ class ExtrudeGeometry extends BufferGeometry {
14665
14665
  }
14666
14666
  function F0() {
14667
14667
  const w0 = C.length / 3;
14668
- let V0 = 0;
14669
- $0(Yt, V0), V0 += Yt.length;
14668
+ let P0 = 0;
14669
+ $0(Yt, P0), P0 += Yt.length;
14670
14670
  for (let U0 = 0, N0 = Vt.length; U0 < N0; U0++) {
14671
14671
  const J0 = Vt[U0];
14672
- $0(J0, V0), V0 += J0.length;
14672
+ $0(J0, P0), P0 += J0.length;
14673
14673
  }
14674
14674
  r.addGroup(w0, C.length / 3 - w0, 1);
14675
14675
  }
14676
- function $0(w0, V0) {
14676
+ function $0(w0, P0) {
14677
14677
  let U0 = w0.length;
14678
14678
  for (; --U0 >= 0; ) {
14679
14679
  const N0 = U0;
14680
14680
  let J0 = U0 - 1;
14681
14681
  J0 < 0 && (J0 = w0.length - 1);
14682
14682
  for (let b0 = 0, L0 = Ce + Ue * 2; b0 < L0; b0++) {
14683
- const K0 = Ft * b0, H0 = Ft * (b0 + 1), n0 = V0 + N0 + K0, qt = V0 + J0 + K0, d0 = V0 + J0 + H0, g0 = V0 + N0 + H0;
14683
+ const K0 = Ft * b0, H0 = Ft * (b0 + 1), n0 = P0 + N0 + K0, qt = P0 + J0 + K0, d0 = P0 + J0 + H0, g0 = P0 + N0 + H0;
14684
14684
  zi(n0, qt, d0, g0);
14685
14685
  }
14686
14686
  }
14687
14687
  }
14688
- function q0(w0, V0, U0) {
14689
- Se.push(w0), Se.push(V0), Se.push(U0);
14688
+ function q0(w0, P0, U0) {
14689
+ Se.push(w0), Se.push(P0), Se.push(U0);
14690
14690
  }
14691
- function Si(w0, V0, U0) {
14692
- wi(w0), wi(V0), wi(U0);
14691
+ function Si(w0, P0, U0) {
14692
+ wi(w0), wi(P0), wi(U0);
14693
14693
  const N0 = C.length / 3, J0 = lt.generateTopUV(r, C, N0 - 3, N0 - 2, N0 - 1);
14694
14694
  r0(J0[0]), r0(J0[1]), r0(J0[2]);
14695
14695
  }
14696
- function zi(w0, V0, U0, N0) {
14697
- wi(w0), wi(V0), wi(N0), wi(V0), wi(U0), wi(N0);
14696
+ function zi(w0, P0, U0, N0) {
14697
+ wi(w0), wi(P0), wi(N0), wi(P0), wi(U0), wi(N0);
14698
14698
  const J0 = C.length / 3, b0 = lt.generateSideWallUV(r, C, J0 - 6, J0 - 3, J0 - 2, J0 - 1);
14699
14699
  r0(b0[0]), r0(b0[1]), r0(b0[3]), r0(b0[1]), r0(b0[2]), r0(b0[3]);
14700
14700
  }
@@ -18468,7 +18468,7 @@ class ObjectLoader extends Loader {
18468
18468
  * @return {Promise<Object3D>} A Promise that resolves with the loaded 3D object.
18469
18469
  */
18470
18470
  loadAsync(e, n) {
18471
- return E0(this, null, function* () {
18471
+ return V0(this, null, function* () {
18472
18472
  const r = this, C = this.path === "" ? LoaderUtils.extractUrlBase(e) : this.path;
18473
18473
  this.resourcePath = this.resourcePath || C;
18474
18474
  const _ = new FileLoader(this.manager);
@@ -18509,7 +18509,7 @@ class ObjectLoader extends Loader {
18509
18509
  * @return {Promise<Object3D>} A Promise that resolves with the parsed 3D object.
18510
18510
  */
18511
18511
  parseAsync(e) {
18512
- return E0(this, null, function* () {
18512
+ return V0(this, null, function* () {
18513
18513
  const n = this.parseAnimations(e.animations), r = this.parseShapes(e.shapes), C = this.parseGeometries(e.geometries, r), _ = yield this.parseImagesAsync(e.images), I = this.parseTextures(e.textures, _), O = this.parseMaterials(e.materials, I), Se = this.parseObject(e.object, C, O, I, n), ve = this.parseSkeletons(e.skeletons, Se);
18514
18514
  return this.bindSkeletons(Se, ve), this.bindLightTargets(Se), Se;
18515
18515
  });
@@ -18618,11 +18618,11 @@ class ObjectLoader extends Loader {
18618
18618
  return C;
18619
18619
  }
18620
18620
  parseImagesAsync(e) {
18621
- return E0(this, null, function* () {
18621
+ return V0(this, null, function* () {
18622
18622
  const n = this, r = {};
18623
18623
  let C;
18624
18624
  function _(I) {
18625
- return E0(this, null, function* () {
18625
+ return V0(this, null, function* () {
18626
18626
  if (typeof I == "string") {
18627
18627
  const O = I, Se = /^(\/\/)|([a-z]+:(\/\/)?)/i.test(O) ? O : n.resourcePath + O;
18628
18628
  return yield C.loadAsync(Se);
@@ -29329,7 +29329,7 @@ function WebGLPrograms(v, e, n, r, C, _, I) {
29329
29329
  D0 = Ji.vertexShader, A0 = Ji.fragmentShader;
29330
29330
  } else
29331
29331
  D0 = Xt.vertexShader, A0 = Xt.fragmentShader, Se.update(Xt), f0 = Se.getVertexShaderID(Xt), T0 = Se.getFragmentShaderID(Xt);
29332
- const F0 = v.getRenderTarget(), $0 = v.state.buffers.depth.getReversed(), q0 = $t.isInstancedMesh === !0, Si = $t.isBatchedMesh === !0, zi = !!Xt.map, wi = !!Xt.matcap, r0 = !!Ft, w0 = !!Xt.aoMap, V0 = !!Xt.lightMap, U0 = !!Xt.bumpMap, N0 = !!Xt.normalMap, J0 = !!Xt.displacementMap, b0 = !!Xt.emissiveMap, L0 = !!Xt.metalnessMap, K0 = !!Xt.roughnessMap, H0 = Xt.anisotropy > 0, n0 = Xt.clearcoat > 0, qt = Xt.dispersion > 0, d0 = Xt.iridescence > 0, g0 = Xt.sheen > 0, I0 = Xt.transmission > 0, C0 = H0 && !!Xt.anisotropyMap, Ti = n0 && !!Xt.clearcoatMap, Q0 = n0 && !!Xt.clearcoatNormalMap, Ri = n0 && !!Xt.clearcoatRoughnessMap, Wi = d0 && !!Xt.iridescenceMap, bi = d0 && !!Xt.iridescenceThicknessMap, Li = g0 && !!Xt.sheenColorMap, Pi = g0 && !!Xt.sheenRoughnessMap, Ei = !!Xt.specularMap, Mi = !!Xt.specularColorMap, Ii = !!Xt.specularIntensityMap, u0 = I0 && !!Xt.transmissionMap, yi = I0 && !!Xt.thicknessMap, _0 = !!Xt.gradientMap, Vi = !!Xt.alphaMap, vi = Xt.alphaTest > 0, O0 = !!Xt.alphaHash, Ni = !!Xt.extensions;
29332
+ const F0 = v.getRenderTarget(), $0 = v.state.buffers.depth.getReversed(), q0 = $t.isInstancedMesh === !0, Si = $t.isBatchedMesh === !0, zi = !!Xt.map, wi = !!Xt.matcap, r0 = !!Ft, w0 = !!Xt.aoMap, P0 = !!Xt.lightMap, U0 = !!Xt.bumpMap, N0 = !!Xt.normalMap, J0 = !!Xt.displacementMap, b0 = !!Xt.emissiveMap, L0 = !!Xt.metalnessMap, K0 = !!Xt.roughnessMap, H0 = Xt.anisotropy > 0, n0 = Xt.clearcoat > 0, qt = Xt.dispersion > 0, d0 = Xt.iridescence > 0, g0 = Xt.sheen > 0, I0 = Xt.transmission > 0, C0 = H0 && !!Xt.anisotropyMap, Ti = n0 && !!Xt.clearcoatMap, Q0 = n0 && !!Xt.clearcoatNormalMap, Ri = n0 && !!Xt.clearcoatRoughnessMap, Wi = d0 && !!Xt.iridescenceMap, bi = d0 && !!Xt.iridescenceThicknessMap, Li = g0 && !!Xt.sheenColorMap, Pi = g0 && !!Xt.sheenRoughnessMap, Ei = !!Xt.specularMap, Mi = !!Xt.specularColorMap, Ii = !!Xt.specularIntensityMap, u0 = I0 && !!Xt.transmissionMap, yi = I0 && !!Xt.thicknessMap, _0 = !!Xt.gradientMap, Vi = !!Xt.alphaMap, vi = Xt.alphaTest > 0, O0 = !!Xt.alphaHash, Ni = !!Xt.extensions;
29333
29333
  let Ui = NoToneMapping;
29334
29334
  Xt.toneMapped && (F0 === null || F0.isXRRenderTarget === !0) && (Ui = v.toneMapping);
29335
29335
  const ji = {
@@ -29358,7 +29358,7 @@ function WebGLPrograms(v, e, n, r, C, _, I) {
29358
29358
  envMapMode: r0 && Ft.mapping,
29359
29359
  envMapCubeUVHeight: Wt,
29360
29360
  aoMap: w0,
29361
- lightMap: V0,
29361
+ lightMap: P0,
29362
29362
  bumpMap: U0,
29363
29363
  normalMap: N0,
29364
29364
  displacementMap: Pe && J0,
@@ -29395,7 +29395,7 @@ function WebGLPrograms(v, e, n, r, C, _, I) {
29395
29395
  //
29396
29396
  mapUv: zi && ct(Xt.map.channel),
29397
29397
  aoMapUv: w0 && ct(Xt.aoMap.channel),
29398
- lightMapUv: V0 && ct(Xt.lightMap.channel),
29398
+ lightMapUv: P0 && ct(Xt.lightMap.channel),
29399
29399
  bumpMapUv: U0 && ct(Xt.bumpMap.channel),
29400
29400
  normalMapUv: N0 && ct(Xt.normalMap.channel),
29401
29401
  displacementMapUv: J0 && ct(Xt.displacementMap.channel),
@@ -30260,7 +30260,7 @@ function WebGLState(v, e) {
30260
30260
  }
30261
30261
  vi = vi || yi, O0 = O0 || _0, Ni = Ni || Vi, (yi !== Ne || vi !== ht) && (v.blendEquationSeparate(wi[yi], wi[vi]), Ne = yi, ht = vi), (_0 !== lt || Vi !== at || O0 !== dt || Ni !== ut) && (v.blendFuncSeparate(r0[_0], r0[Vi], r0[O0], r0[Ni]), lt = _0, at = Vi, dt = O0, ut = Ni), (Ui.equals(xt) === !1 || ji !== Lt) && (v.blendColor(Ui.r, Ui.g, Ui.b, ji), xt.copy(Ui), Lt = ji), Ue = u0, Xt = !1;
30262
30262
  }
30263
- function V0(u0, yi) {
30263
+ function P0(u0, yi) {
30264
30264
  u0.side === DoubleSide ? $0(v.CULL_FACE) : F0(v.CULL_FACE);
30265
30265
  let _0 = u0.side === BackSide;
30266
30266
  yi && (_0 = !_0), U0(_0), u0.blending === NormalBlending && u0.transparent === !1 ? w0(NoBlending) : w0(u0.blending, u0.blendEquation, u0.blendSrc, u0.blendDst, u0.blendEquationAlpha, u0.blendSrcAlpha, u0.blendDstAlpha, u0.blendColor, u0.blendAlpha, u0.premultipliedAlpha), I.setFunc(u0.depthFunc), I.setTest(u0.depthTest), I.setMask(u0.depthWrite), _.setMask(u0.colorWrite);
@@ -30395,7 +30395,7 @@ function WebGLState(v, e) {
30395
30395
  drawBuffers: Si,
30396
30396
  useProgram: zi,
30397
30397
  setBlending: w0,
30398
- setMaterial: V0,
30398
+ setMaterial: P0,
30399
30399
  setFlipSided: U0,
30400
30400
  setCullFace: N0,
30401
30401
  setLineWidth: J0,
@@ -30957,7 +30957,7 @@ function WebGLTextures(v, e, n, r, C, _, I) {
30957
30957
  }
30958
30958
  }
30959
30959
  }
30960
- const V0 = [], U0 = [];
30960
+ const P0 = [], U0 = [];
30961
30961
  function N0(n0) {
30962
30962
  if (n0.samples > 0) {
30963
30963
  if (b0(n0) === !1) {
@@ -30976,7 +30976,7 @@ function WebGLTextures(v, e, n, r, C, _, I) {
30976
30976
  const bi = r.get(qt[Wi]).__webglTexture;
30977
30977
  v.framebufferTexture2D(v.DRAW_FRAMEBUFFER, v.COLOR_ATTACHMENT0, v.TEXTURE_2D, bi, 0);
30978
30978
  }
30979
- v.blitFramebuffer(0, 0, d0, g0, 0, 0, d0, g0, I0, v.NEAREST), Se === !0 && (V0.length = 0, U0.length = 0, V0.push(v.COLOR_ATTACHMENT0 + Wi), n0.depthBuffer && n0.resolveDepthBuffer === !1 && (V0.push(C0), U0.push(C0), v.invalidateFramebuffer(v.DRAW_FRAMEBUFFER, U0)), v.invalidateFramebuffer(v.READ_FRAMEBUFFER, V0));
30979
+ v.blitFramebuffer(0, 0, d0, g0, 0, 0, d0, g0, I0, v.NEAREST), Se === !0 && (P0.length = 0, U0.length = 0, P0.push(v.COLOR_ATTACHMENT0 + Wi), n0.depthBuffer && n0.resolveDepthBuffer === !1 && (P0.push(C0), U0.push(C0), v.invalidateFramebuffer(v.DRAW_FRAMEBUFFER, U0)), v.invalidateFramebuffer(v.READ_FRAMEBUFFER, P0));
30980
30980
  }
30981
30981
  if (n.bindFramebuffer(v.READ_FRAMEBUFFER, null), n.bindFramebuffer(v.DRAW_FRAMEBUFFER, null), Q0)
30982
30982
  for (let Wi = 0; Wi < qt.length; Wi++) {
@@ -31259,7 +31259,7 @@ class WebXRManager extends EventDispatcher {
31259
31259
  }, this.getSession = function() {
31260
31260
  return C;
31261
31261
  }, this.setSession = function(f0) {
31262
- return E0(this, null, function* () {
31262
+ return V0(this, null, function* () {
31263
31263
  if (C = f0, C !== null) {
31264
31264
  if (lt = e.getRenderTarget(), C.addEventListener("select", i0), C.addEventListener("selectstart", i0), C.addEventListener("selectend", i0), C.addEventListener("squeeze", i0), C.addEventListener("squeezestart", i0), C.addEventListener("squeezeend", i0), C.addEventListener("end", Yt), C.addEventListener("inputsourceschange", Kt), Ne.xrCompatible !== !0 && (yield n.makeXRCompatible()), xt = e.getPixelRatio(), e.getSize(ut), typeof XRWebGLBinding != "undefined" && (Re = new XRWebGLBinding(C, n)), Re !== null && "createProjectionLayer" in XRWebGLBinding.prototype) {
31265
31265
  let F0 = null, $0 = null, q0 = null;
@@ -31339,7 +31339,7 @@ class WebXRManager extends EventDispatcher {
31339
31339
  const Ft = new Vector3(), Wt = new Vector3();
31340
31340
  function e0(f0, T0, F0) {
31341
31341
  Ft.setFromMatrixPosition(T0.matrixWorld), Wt.setFromMatrixPosition(F0.matrixWorld);
31342
- const $0 = Ft.distanceTo(Wt), q0 = T0.projectionMatrix.elements, Si = F0.projectionMatrix.elements, zi = q0[14] / (q0[10] - 1), wi = q0[14] / (q0[10] + 1), r0 = (q0[9] + 1) / q0[5], w0 = (q0[9] - 1) / q0[5], V0 = (q0[8] - 1) / q0[0], U0 = (Si[8] + 1) / Si[0], N0 = zi * V0, J0 = zi * U0, b0 = $0 / (-V0 + U0), L0 = b0 * -V0;
31342
+ const $0 = Ft.distanceTo(Wt), q0 = T0.projectionMatrix.elements, Si = F0.projectionMatrix.elements, zi = q0[14] / (q0[10] - 1), wi = q0[14] / (q0[10] + 1), r0 = (q0[9] + 1) / q0[5], w0 = (q0[9] - 1) / q0[5], P0 = (q0[8] - 1) / q0[0], U0 = (Si[8] + 1) / Si[0], N0 = zi * P0, J0 = zi * U0, b0 = $0 / (-P0 + U0), L0 = b0 * -P0;
31343
31343
  if (T0.matrixWorld.decompose(f0.position, f0.quaternion, f0.scale), f0.translateX(L0), f0.translateZ(b0), f0.matrixWorld.compose(f0.position, f0.quaternion, f0.scale), f0.matrixWorldInverse.copy(f0.matrixWorld).invert(), q0[10] === -1)
31344
31344
  f0.projectionMatrix.copy(T0.projectionMatrix), f0.projectionMatrixInverse.copy(T0.projectionMatrixInverse);
31345
31345
  else {
@@ -31400,8 +31400,8 @@ class WebXRManager extends EventDispatcher {
31400
31400
  U0.depthStencilTexture
31401
31401
  ), e.setRenderTarget(at));
31402
31402
  }
31403
- let V0 = Zt[wi];
31404
- V0 === void 0 && (V0 = new PerspectiveCamera(), V0.layers.enable(wi), V0.viewport = new Vector4(), Zt[wi] = V0), V0.matrix.fromArray(r0.transform.matrix), V0.matrix.decompose(V0.position, V0.quaternion, V0.scale), V0.projectionMatrix.fromArray(r0.projectionMatrix), V0.projectionMatrixInverse.copy(V0.projectionMatrix).invert(), V0.viewport.set(w0.x, w0.y, w0.width, w0.height), wi === 0 && (Vt.matrix.copy(V0.matrix), Vt.matrix.decompose(Vt.position, Vt.quaternion, Vt.scale)), $0 === !0 && Vt.cameras.push(V0);
31403
+ let P0 = Zt[wi];
31404
+ P0 === void 0 && (P0 = new PerspectiveCamera(), P0.layers.enable(wi), P0.viewport = new Vector4(), Zt[wi] = P0), P0.matrix.fromArray(r0.transform.matrix), P0.matrix.decompose(P0.position, P0.quaternion, P0.scale), P0.projectionMatrix.fromArray(r0.projectionMatrix), P0.projectionMatrixInverse.copy(P0.projectionMatrix).invert(), P0.viewport.set(w0.x, w0.y, w0.width, w0.height), wi === 0 && (Vt.matrix.copy(P0.matrix), Vt.matrix.decompose(Vt.position, Vt.quaternion, Vt.scale)), $0 === !0 && Vt.cameras.push(P0);
31405
31405
  }
31406
31406
  const q0 = C.enabledFeatures;
31407
31407
  if (q0 && q0.includes("depth-sensing") && C.depthUsage == "gpu-optimized" && Re) {
@@ -31414,8 +31414,8 @@ class WebXRManager extends EventDispatcher {
31414
31414
  if (r0) {
31415
31415
  let w0 = Ue[r0];
31416
31416
  w0 || (w0 = new ExternalTexture(), Ue[r0] = w0);
31417
- const V0 = Re.getCameraImage(r0);
31418
- w0.sourceTexture = V0;
31417
+ const P0 = Re.getCameraImage(r0);
31418
+ w0.sourceTexture = P0;
31419
31419
  }
31420
31420
  }
31421
31421
  }
@@ -31671,9 +31671,9 @@ class WebGLRenderer {
31671
31671
  } catch (wt) {
31672
31672
  throw console.error("THREE.WebGLRenderer: " + wt.message), wt;
31673
31673
  }
31674
- let V0, U0, N0, J0, b0, L0, K0, H0, n0, qt, d0, g0, I0, C0, Ti, Q0, Ri, Wi, bi, Li, Pi, Ei, Mi, Ii;
31674
+ let P0, U0, N0, J0, b0, L0, K0, H0, n0, qt, d0, g0, I0, C0, Ti, Q0, Ri, Wi, bi, Li, Pi, Ei, Mi, Ii;
31675
31675
  function u0() {
31676
- V0 = new WebGLExtensions(r0), V0.init(), Ei = new WebGLUtils(r0, V0), U0 = new WebGLCapabilities(r0, V0, e, Ei), N0 = new WebGLState(r0, V0), U0.reversedDepthBuffer && Pe && N0.buffers.depth.setReversed(!0), J0 = new WebGLInfo(r0), b0 = new WebGLProperties(), L0 = new WebGLTextures(r0, V0, N0, b0, U0, Ei, J0), K0 = new WebGLCubeMaps(ht), H0 = new WebGLCubeUVMaps(ht), n0 = new WebGLAttributes(r0), Mi = new WebGLBindingStates(r0, n0), qt = new WebGLGeometries(r0, n0, J0, Mi), d0 = new WebGLObjects(r0, qt, n0, J0), bi = new WebGLMorphtargets(r0, U0, L0), Q0 = new WebGLClipping(b0), g0 = new WebGLPrograms(ht, K0, H0, V0, U0, Mi, Q0), I0 = new WebGLMaterials(ht, b0), C0 = new WebGLRenderLists(), Ti = new WebGLRenderStates(V0), Wi = new WebGLBackground(ht, K0, H0, N0, d0, Fe, Se), Ri = new WebGLShadowMap(ht, d0, U0), Ii = new WebGLUniformsGroups(r0, J0, U0, N0), Li = new WebGLBufferRenderer(r0, V0, J0), Pi = new WebGLIndexedBufferRenderer(r0, V0, J0), J0.programs = g0.programs, ht.capabilities = U0, ht.extensions = V0, ht.properties = b0, ht.renderLists = C0, ht.shadowMap = Ri, ht.state = N0, ht.info = J0;
31676
+ P0 = new WebGLExtensions(r0), P0.init(), Ei = new WebGLUtils(r0, P0), U0 = new WebGLCapabilities(r0, P0, e, Ei), N0 = new WebGLState(r0, P0), U0.reversedDepthBuffer && Pe && N0.buffers.depth.setReversed(!0), J0 = new WebGLInfo(r0), b0 = new WebGLProperties(), L0 = new WebGLTextures(r0, P0, N0, b0, U0, Ei, J0), K0 = new WebGLCubeMaps(ht), H0 = new WebGLCubeUVMaps(ht), n0 = new WebGLAttributes(r0), Mi = new WebGLBindingStates(r0, n0), qt = new WebGLGeometries(r0, n0, J0, Mi), d0 = new WebGLObjects(r0, qt, n0, J0), bi = new WebGLMorphtargets(r0, U0, L0), Q0 = new WebGLClipping(b0), g0 = new WebGLPrograms(ht, K0, H0, P0, U0, Mi, Q0), I0 = new WebGLMaterials(ht, b0), C0 = new WebGLRenderLists(), Ti = new WebGLRenderStates(P0), Wi = new WebGLBackground(ht, K0, H0, N0, d0, Fe, Se), Ri = new WebGLShadowMap(ht, d0, U0), Ii = new WebGLUniformsGroups(r0, J0, U0, N0), Li = new WebGLBufferRenderer(r0, P0, J0), Pi = new WebGLIndexedBufferRenderer(r0, P0, J0), J0.programs = g0.programs, ht.capabilities = U0, ht.extensions = P0, ht.properties = b0, ht.renderLists = C0, ht.shadowMap = Ri, ht.state = N0, ht.info = J0;
31677
31677
  }
31678
31678
  u0();
31679
31679
  const yi = new WebXRManager(ht, r0);
@@ -31682,10 +31682,10 @@ class WebGLRenderer {
31682
31682
  }, this.getContextAttributes = function() {
31683
31683
  return r0.getContextAttributes();
31684
31684
  }, this.forceContextLoss = function() {
31685
- const wt = V0.get("WEBGL_lose_context");
31685
+ const wt = P0.get("WEBGL_lose_context");
31686
31686
  wt && wt.loseContext();
31687
31687
  }, this.forceContextRestore = function() {
31688
- const wt = V0.get("WEBGL_lose_context");
31688
+ const wt = P0.get("WEBGL_lose_context");
31689
31689
  wt && wt.restoreContext();
31690
31690
  }, this.getPixelRatio = function() {
31691
31691
  return Wt;
@@ -31738,8 +31738,8 @@ class WebGLRenderer {
31738
31738
  l0 = o0 === RGBAIntegerFormat || o0 === RGIntegerFormat || o0 === RedIntegerFormat;
31739
31739
  }
31740
31740
  if (l0) {
31741
- const o0 = Lt.texture.type, M0 = o0 === UnsignedByteType || o0 === UnsignedIntType || o0 === UnsignedShortType || o0 === UnsignedInt248Type || o0 === UnsignedShort4444Type || o0 === UnsignedShort5551Type, v0 = Wi.getClearColor(), S0 = Wi.getClearAlpha(), R0 = v0.r, k0 = v0.g, P0 = v0.b;
31742
- M0 ? (ke[0] = R0, ke[1] = k0, ke[2] = P0, ke[3] = S0, r0.clearBufferuiv(r0.COLOR, 0, ke)) : (ct[0] = R0, ct[1] = k0, ct[2] = P0, ct[3] = S0, r0.clearBufferiv(r0.COLOR, 0, ct));
31741
+ const o0 = Lt.texture.type, M0 = o0 === UnsignedByteType || o0 === UnsignedIntType || o0 === UnsignedShortType || o0 === UnsignedInt248Type || o0 === UnsignedShort4444Type || o0 === UnsignedShort5551Type, v0 = Wi.getClearColor(), S0 = Wi.getClearAlpha(), R0 = v0.r, k0 = v0.g, E0 = v0.b;
31742
+ M0 ? (ke[0] = R0, ke[1] = k0, ke[2] = E0, ke[3] = S0, r0.clearBufferuiv(r0.COLOR, 0, ke)) : (ct[0] = R0, ct[1] = k0, ct[2] = E0, ct[3] = S0, r0.clearBufferiv(r0.COLOR, 0, ct));
31743
31743
  } else
31744
31744
  a0 |= r0.COLOR_BUFFER_BIT;
31745
31745
  }
@@ -31786,9 +31786,9 @@ class WebGLRenderer {
31786
31786
  if (S0 = qt.getWireframeAttribute(s0), S0 === void 0) return;
31787
31787
  R0 = 2;
31788
31788
  }
31789
- const k0 = s0.drawRange, P0 = s0.attributes.position;
31789
+ const k0 = s0.drawRange, E0 = s0.attributes.position;
31790
31790
  let j0 = k0.start * R0, Ci = (k0.start + k0.count) * R0;
31791
- o0 !== null && (j0 = Math.max(j0, o0.start * R0), Ci = Math.min(Ci, (o0.start + o0.count) * R0)), S0 !== null ? (j0 = Math.max(j0, 0), Ci = Math.min(Ci, S0.count)) : P0 != null && (j0 = Math.max(j0, 0), Ci = Math.min(Ci, P0.count));
31791
+ o0 !== null && (j0 = Math.max(j0, o0.start * R0), Ci = Math.min(Ci, (o0.start + o0.count) * R0)), S0 !== null ? (j0 = Math.max(j0, 0), Ci = Math.min(Ci, S0.count)) : E0 != null && (j0 = Math.max(j0, 0), Ci = Math.min(Ci, E0.count));
31792
31792
  const xi = Ci - j0;
31793
31793
  if (xi < 0 || xi === 1 / 0) return;
31794
31794
  Mi.setup(l0, a0, v0, s0, S0);
@@ -31802,7 +31802,7 @@ class WebGLRenderer {
31802
31802
  if (l0.isBatchedMesh)
31803
31803
  if (l0._multiDrawInstances !== null)
31804
31804
  warnOnce("THREE.WebGLRenderer: renderMultiDrawInstances has been deprecated and will be removed in r184. Append to renderMultiDraw arguments and use indirection."), Zi.renderMultiDrawInstances(l0._multiDrawStarts, l0._multiDrawCounts, l0._multiDrawCount, l0._multiDrawInstances);
31805
- else if (V0.get("WEBGL_multi_draw"))
31805
+ else if (P0.get("WEBGL_multi_draw"))
31806
31806
  Zi.renderMultiDraw(l0._multiDrawStarts, l0._multiDrawCounts, l0._multiDrawCount);
31807
31807
  else {
31808
31808
  const Xi = l0._multiDrawStarts, Fi = l0._multiDrawCounts, Ki = l0._multiDrawCount, Bi = S0 ? n0.get(S0).bytesPerElement : 1, Ai = b0.get(a0).currentProgram.getUniforms();
@@ -31852,7 +31852,7 @@ class WebGLRenderer {
31852
31852
  }
31853
31853
  setTimeout(o0, 10);
31854
31854
  }
31855
- V0.get("KHR_parallel_shader_compile") !== null ? o0() : setTimeout(o0, 10);
31855
+ P0.get("KHR_parallel_shader_compile") !== null ? o0() : setTimeout(o0, 10);
31856
31856
  });
31857
31857
  };
31858
31858
  let Ji = null;
@@ -31918,8 +31918,8 @@ class WebGLRenderer {
31918
31918
  if (a0 && (wt.boundingSphere !== void 0 ? (wt.boundingSphere === null && wt.computeBoundingSphere(), q0.copy(wt.boundingSphere.center)) : (M0.boundingSphere === null && M0.computeBoundingSphere(), q0.copy(M0.boundingSphere.center)), q0.applyMatrix4(wt.matrixWorld).applyMatrix4(F0)), Array.isArray(v0)) {
31919
31919
  const S0 = M0.groups;
31920
31920
  for (let R0 = 0, k0 = S0.length; R0 < k0; R0++) {
31921
- const P0 = S0[R0], j0 = v0[P0.materialIndex];
31922
- j0 && j0.visible && Ue.push(wt, M0, j0, s0, q0.z, P0);
31921
+ const E0 = S0[R0], j0 = v0[E0.materialIndex];
31922
+ j0 && j0.visible && Ue.push(wt, M0, j0, s0, q0.z, E0);
31923
31923
  }
31924
31924
  } else v0.visible && Ue.push(wt, M0, v0, s0, q0.z, null);
31925
31925
  }
@@ -31937,7 +31937,7 @@ class WebGLRenderer {
31937
31937
  return;
31938
31938
  Ne.state.transmissionRenderTarget[a0.id] === void 0 && (Ne.state.transmissionRenderTarget[a0.id] = new WebGLRenderTarget(1, 1, {
31939
31939
  generateMipmaps: !0,
31940
- type: V0.has("EXT_color_buffer_half_float") || V0.has("EXT_color_buffer_float") ? HalfFloatType : UnsignedByteType,
31940
+ type: P0.has("EXT_color_buffer_half_float") || P0.has("EXT_color_buffer_float") ? HalfFloatType : UnsignedByteType,
31941
31941
  minFilter: LinearMipmapLinearFilter,
31942
31942
  samples: 4,
31943
31943
  stencilBuffer: _,
@@ -31951,8 +31951,8 @@ class WebGLRenderer {
31951
31951
  ht.setRenderTarget(o0), ht.getClearColor(i0), Yt = ht.getClearAlpha(), Yt < 1 && ht.setClearColor(16777215, 0.5), ht.clear(), zi && Wi.render(s0);
31952
31952
  const k0 = ht.toneMapping;
31953
31953
  ht.toneMapping = NoToneMapping;
31954
- const P0 = a0.viewport;
31955
- if (a0.viewport !== void 0 && (a0.viewport = void 0), Ne.setupLightsView(a0), f0 === !0 && Q0.setGlobalState(ht.clippingPlanes, a0), mn(wt, s0, a0), L0.updateMultisampleRenderTarget(o0), L0.updateRenderTargetMipmap(o0), V0.has("WEBGL_multisampled_render_to_texture") === !1) {
31954
+ const E0 = a0.viewport;
31955
+ if (a0.viewport !== void 0 && (a0.viewport = void 0), Ne.setupLightsView(a0), f0 === !0 && Q0.setGlobalState(ht.clippingPlanes, a0), mn(wt, s0, a0), L0.updateMultisampleRenderTarget(o0), L0.updateRenderTargetMipmap(o0), P0.has("WEBGL_multisampled_render_to_texture") === !1) {
31956
31956
  let j0 = !1;
31957
31957
  for (let Ci = 0, xi = t0.length; Ci < xi; Ci++) {
31958
31958
  const Gi = t0[Ci], Zi = Gi.object, Xi = Gi.geometry, Fi = Gi.material, Ki = Gi.group;
@@ -31963,7 +31963,7 @@ class WebGLRenderer {
31963
31963
  }
31964
31964
  j0 === !0 && (L0.updateMultisampleRenderTarget(o0), L0.updateRenderTargetMipmap(o0));
31965
31965
  }
31966
- ht.setRenderTarget(v0, S0, R0), ht.setClearColor(i0, Yt), P0 !== void 0 && (a0.viewport = P0), ht.toneMapping = k0;
31966
+ ht.setRenderTarget(v0, S0, R0), ht.setClearColor(i0, Yt), E0 !== void 0 && (a0.viewport = E0), ht.toneMapping = k0;
31967
31967
  }
31968
31968
  function mn(wt, t0, s0) {
31969
31969
  const a0 = t0.isScene === !0 ? t0.overrideMaterial : null;
@@ -31987,8 +31987,8 @@ class WebGLRenderer {
31987
31987
  return Xn(wt, v0), k0;
31988
31988
  } else
31989
31989
  v0.uniforms = g0.getUniforms(wt), wt.onBeforeCompile(v0, ht), k0 = g0.acquireProgram(v0, S0), R0.set(S0, k0), a0.uniforms = v0.uniforms;
31990
- const P0 = a0.uniforms;
31991
- return (!wt.isShaderMaterial && !wt.isRawShaderMaterial || wt.clipping === !0) && (P0.clippingPlanes = Q0.uniform), Xn(wt, v0), a0.needsLights = wn(wt), a0.lightsStateVersion = M0, a0.needsLights && (P0.ambientLightColor.value = l0.state.ambient, P0.lightProbe.value = l0.state.probe, P0.directionalLights.value = l0.state.directional, P0.directionalLightShadows.value = l0.state.directionalShadow, P0.spotLights.value = l0.state.spot, P0.spotLightShadows.value = l0.state.spotShadow, P0.rectAreaLights.value = l0.state.rectArea, P0.ltc_1.value = l0.state.rectAreaLTC1, P0.ltc_2.value = l0.state.rectAreaLTC2, P0.pointLights.value = l0.state.point, P0.pointLightShadows.value = l0.state.pointShadow, P0.hemisphereLights.value = l0.state.hemi, P0.directionalShadowMap.value = l0.state.directionalShadowMap, P0.directionalShadowMatrix.value = l0.state.directionalShadowMatrix, P0.spotShadowMap.value = l0.state.spotShadowMap, P0.spotLightMatrix.value = l0.state.spotLightMatrix, P0.spotLightMap.value = l0.state.spotLightMap, P0.pointShadowMap.value = l0.state.pointShadowMap, P0.pointShadowMatrix.value = l0.state.pointShadowMatrix), a0.currentProgram = k0, a0.uniformsList = null, k0;
31990
+ const E0 = a0.uniforms;
31991
+ return (!wt.isShaderMaterial && !wt.isRawShaderMaterial || wt.clipping === !0) && (E0.clippingPlanes = Q0.uniform), Xn(wt, v0), a0.needsLights = wn(wt), a0.lightsStateVersion = M0, a0.needsLights && (E0.ambientLightColor.value = l0.state.ambient, E0.lightProbe.value = l0.state.probe, E0.directionalLights.value = l0.state.directional, E0.directionalLightShadows.value = l0.state.directionalShadow, E0.spotLights.value = l0.state.spot, E0.spotLightShadows.value = l0.state.spotShadow, E0.rectAreaLights.value = l0.state.rectArea, E0.ltc_1.value = l0.state.rectAreaLTC1, E0.ltc_2.value = l0.state.rectAreaLTC2, E0.pointLights.value = l0.state.point, E0.pointLightShadows.value = l0.state.pointShadow, E0.hemisphereLights.value = l0.state.hemi, E0.directionalShadowMap.value = l0.state.directionalShadowMap, E0.directionalShadowMatrix.value = l0.state.directionalShadowMatrix, E0.spotShadowMap.value = l0.state.spotShadowMap, E0.spotLightMatrix.value = l0.state.spotLightMatrix, E0.spotLightMap.value = l0.state.spotLightMap, E0.pointShadowMap.value = l0.state.pointShadowMap, E0.pointShadowMatrix.value = l0.state.pointShadowMatrix), a0.currentProgram = k0, a0.uniformsList = null, k0;
31992
31992
  }
31993
31993
  function Cn(wt) {
31994
31994
  if (wt.uniformsList === null) {
@@ -32003,7 +32003,7 @@ class WebGLRenderer {
32003
32003
  }
32004
32004
  function _n(wt, t0, s0, a0, l0) {
32005
32005
  t0.isScene !== !0 && (t0 = Si), L0.resetTextureUnits();
32006
- const o0 = t0.fog, M0 = a0.isMeshStandardMaterial ? t0.environment : null, v0 = Lt === null ? ht.outputColorSpace : Lt.isXRRenderTarget === !0 ? Lt.texture.colorSpace : LinearSRGBColorSpace, S0 = (a0.isMeshStandardMaterial ? H0 : K0).get(a0.envMap || M0), R0 = a0.vertexColors === !0 && !!s0.attributes.color && s0.attributes.color.itemSize === 4, k0 = !!s0.attributes.tangent && (!!a0.normalMap || a0.anisotropy > 0), P0 = !!s0.morphAttributes.position, j0 = !!s0.morphAttributes.normal, Ci = !!s0.morphAttributes.color;
32006
+ const o0 = t0.fog, M0 = a0.isMeshStandardMaterial ? t0.environment : null, v0 = Lt === null ? ht.outputColorSpace : Lt.isXRRenderTarget === !0 ? Lt.texture.colorSpace : LinearSRGBColorSpace, S0 = (a0.isMeshStandardMaterial ? H0 : K0).get(a0.envMap || M0), R0 = a0.vertexColors === !0 && !!s0.attributes.color && s0.attributes.color.itemSize === 4, k0 = !!s0.attributes.tangent && (!!a0.normalMap || a0.anisotropy > 0), E0 = !!s0.morphAttributes.position, j0 = !!s0.morphAttributes.normal, Ci = !!s0.morphAttributes.color;
32007
32007
  let xi = NoToneMapping;
32008
32008
  a0.toneMapped && (Lt === null || Lt.isXRRenderTarget === !0) && (xi = ht.toneMapping);
32009
32009
  const Gi = s0.morphAttributes.position || s0.morphAttributes.normal || s0.morphAttributes.color, Zi = Gi !== void 0 ? Gi.length : 0, Xi = b0.get(a0), Fi = Ne.state.lights;
@@ -32012,7 +32012,7 @@ class WebGLRenderer {
32012
32012
  Q0.setState(a0, wt, Qi);
32013
32013
  }
32014
32014
  let Ki = !1;
32015
- a0.version === Xi.__version ? (Xi.needsLights && Xi.lightsStateVersion !== Fi.state.version || Xi.outputColorSpace !== v0 || l0.isBatchedMesh && Xi.batching === !1 || !l0.isBatchedMesh && Xi.batching === !0 || l0.isBatchedMesh && Xi.batchingColor === !0 && l0.colorTexture === null || l0.isBatchedMesh && Xi.batchingColor === !1 && l0.colorTexture !== null || l0.isInstancedMesh && Xi.instancing === !1 || !l0.isInstancedMesh && Xi.instancing === !0 || l0.isSkinnedMesh && Xi.skinning === !1 || !l0.isSkinnedMesh && Xi.skinning === !0 || l0.isInstancedMesh && Xi.instancingColor === !0 && l0.instanceColor === null || l0.isInstancedMesh && Xi.instancingColor === !1 && l0.instanceColor !== null || l0.isInstancedMesh && Xi.instancingMorph === !0 && l0.morphTexture === null || l0.isInstancedMesh && Xi.instancingMorph === !1 && l0.morphTexture !== null || Xi.envMap !== S0 || a0.fog === !0 && Xi.fog !== o0 || Xi.numClippingPlanes !== void 0 && (Xi.numClippingPlanes !== Q0.numPlanes || Xi.numIntersection !== Q0.numIntersection) || Xi.vertexAlphas !== R0 || Xi.vertexTangents !== k0 || Xi.morphTargets !== P0 || Xi.morphNormals !== j0 || Xi.morphColors !== Ci || Xi.toneMapping !== xi || Xi.morphTargetsCount !== Zi) && (Ki = !0) : (Ki = !0, Xi.__version = a0.version);
32015
+ a0.version === Xi.__version ? (Xi.needsLights && Xi.lightsStateVersion !== Fi.state.version || Xi.outputColorSpace !== v0 || l0.isBatchedMesh && Xi.batching === !1 || !l0.isBatchedMesh && Xi.batching === !0 || l0.isBatchedMesh && Xi.batchingColor === !0 && l0.colorTexture === null || l0.isBatchedMesh && Xi.batchingColor === !1 && l0.colorTexture !== null || l0.isInstancedMesh && Xi.instancing === !1 || !l0.isInstancedMesh && Xi.instancing === !0 || l0.isSkinnedMesh && Xi.skinning === !1 || !l0.isSkinnedMesh && Xi.skinning === !0 || l0.isInstancedMesh && Xi.instancingColor === !0 && l0.instanceColor === null || l0.isInstancedMesh && Xi.instancingColor === !1 && l0.instanceColor !== null || l0.isInstancedMesh && Xi.instancingMorph === !0 && l0.morphTexture === null || l0.isInstancedMesh && Xi.instancingMorph === !1 && l0.morphTexture !== null || Xi.envMap !== S0 || a0.fog === !0 && Xi.fog !== o0 || Xi.numClippingPlanes !== void 0 && (Xi.numClippingPlanes !== Q0.numPlanes || Xi.numIntersection !== Q0.numIntersection) || Xi.vertexAlphas !== R0 || Xi.vertexTangents !== k0 || Xi.morphTargets !== E0 || Xi.morphNormals !== j0 || Xi.morphColors !== Ci || Xi.toneMapping !== xi || Xi.morphTargetsCount !== Zi) && (Ki = !0) : (Ki = !0, Xi.__version = a0.version);
32016
32016
  let Bi = Xi.currentProgram;
32017
32017
  Ki === !0 && (Bi = bn(a0, t0, l0));
32018
32018
  let Ai = !1, Di = !1, $i = !1;
@@ -32074,9 +32074,9 @@ class WebGLRenderer {
32074
32074
  else if (S0.__hasExternalTextures)
32075
32075
  L0.rebindTextures(wt, b0.get(wt.texture).__webglTexture, b0.get(wt.depthTexture).__webglTexture);
32076
32076
  else if (wt.depthBuffer) {
32077
- const P0 = wt.depthTexture;
32078
- if (S0.__boundDepthTexture !== P0) {
32079
- if (P0 !== null && b0.has(P0) && (wt.width !== P0.image.width || wt.height !== P0.image.height))
32077
+ const E0 = wt.depthTexture;
32078
+ if (S0.__boundDepthTexture !== E0) {
32079
+ if (E0 !== null && b0.has(E0) && (wt.width !== E0.image.width || wt.height !== E0.image.height))
32080
32080
  throw new Error("WebGLRenderTarget: Attached DepthTexture is initialized to the incorrect size.");
32081
32081
  L0.setupDepthRenderbuffer(wt);
32082
32082
  }
@@ -32110,36 +32110,36 @@ class WebGLRenderer {
32110
32110
  if (wt.isWebGLCubeRenderTarget && M0 !== void 0 && (S0 = S0[M0]), S0) {
32111
32111
  N0.bindFramebuffer(r0.FRAMEBUFFER, S0);
32112
32112
  try {
32113
- const R0 = wt.textures[v0], k0 = R0.format, P0 = R0.type;
32113
+ const R0 = wt.textures[v0], k0 = R0.format, E0 = R0.type;
32114
32114
  if (!U0.textureFormatReadable(k0)) {
32115
32115
  console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");
32116
32116
  return;
32117
32117
  }
32118
- if (!U0.textureTypeReadable(P0)) {
32118
+ if (!U0.textureTypeReadable(E0)) {
32119
32119
  console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");
32120
32120
  return;
32121
32121
  }
32122
- t0 >= 0 && t0 <= wt.width - a0 && s0 >= 0 && s0 <= wt.height - l0 && (wt.textures.length > 1 && r0.readBuffer(r0.COLOR_ATTACHMENT0 + v0), r0.readPixels(t0, s0, a0, l0, Ei.convert(k0), Ei.convert(P0), o0));
32122
+ t0 >= 0 && t0 <= wt.width - a0 && s0 >= 0 && s0 <= wt.height - l0 && (wt.textures.length > 1 && r0.readBuffer(r0.COLOR_ATTACHMENT0 + v0), r0.readPixels(t0, s0, a0, l0, Ei.convert(k0), Ei.convert(E0), o0));
32123
32123
  } finally {
32124
32124
  const R0 = Lt !== null ? b0.get(Lt).__webglFramebuffer : null;
32125
32125
  N0.bindFramebuffer(r0.FRAMEBUFFER, R0);
32126
32126
  }
32127
32127
  }
32128
32128
  }, this.readRenderTargetPixelsAsync = function(wt, t0, s0, a0, l0, o0, M0, v0 = 0) {
32129
- return E0(this, null, function* () {
32129
+ return V0(this, null, function* () {
32130
32130
  if (!(wt && wt.isWebGLRenderTarget))
32131
32131
  throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");
32132
32132
  let S0 = b0.get(wt).__webglFramebuffer;
32133
32133
  if (wt.isWebGLCubeRenderTarget && M0 !== void 0 && (S0 = S0[M0]), S0)
32134
32134
  if (t0 >= 0 && t0 <= wt.width - a0 && s0 >= 0 && s0 <= wt.height - l0) {
32135
32135
  N0.bindFramebuffer(r0.FRAMEBUFFER, S0);
32136
- const R0 = wt.textures[v0], k0 = R0.format, P0 = R0.type;
32136
+ const R0 = wt.textures[v0], k0 = R0.format, E0 = R0.type;
32137
32137
  if (!U0.textureFormatReadable(k0))
32138
32138
  throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");
32139
- if (!U0.textureTypeReadable(P0))
32139
+ if (!U0.textureTypeReadable(E0))
32140
32140
  throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");
32141
32141
  const j0 = r0.createBuffer();
32142
- r0.bindBuffer(r0.PIXEL_PACK_BUFFER, j0), r0.bufferData(r0.PIXEL_PACK_BUFFER, o0.byteLength, r0.STREAM_READ), wt.textures.length > 1 && r0.readBuffer(r0.COLOR_ATTACHMENT0 + v0), r0.readPixels(t0, s0, a0, l0, Ei.convert(k0), Ei.convert(P0), 0);
32142
+ r0.bindBuffer(r0.PIXEL_PACK_BUFFER, j0), r0.bufferData(r0.PIXEL_PACK_BUFFER, o0.byteLength, r0.STREAM_READ), wt.textures.length > 1 && r0.readBuffer(r0.COLOR_ATTACHMENT0 + v0), r0.readPixels(t0, s0, a0, l0, Ei.convert(k0), Ei.convert(E0), 0);
32143
32143
  const Ci = Lt !== null ? b0.get(Lt).__webglFramebuffer : null;
32144
32144
  N0.bindFramebuffer(r0.FRAMEBUFFER, Ci);
32145
32145
  const xi = r0.fenceSync(r0.SYNC_GPU_COMMANDS_COMPLETE, 0);
@@ -32154,32 +32154,32 @@ class WebGLRenderer {
32154
32154
  const dn = r0.createFramebuffer(), zt = r0.createFramebuffer();
32155
32155
  this.copyTextureToTexture = function(wt, t0, s0 = null, a0 = null, l0 = 0, o0 = null) {
32156
32156
  o0 === null && (l0 !== 0 ? (warnOnce("WebGLRenderer: copyTextureToTexture function signature has changed to support src and dst mipmap levels."), o0 = l0, l0 = 0) : o0 = 0);
32157
- let M0, v0, S0, R0, k0, P0, j0, Ci, xi;
32157
+ let M0, v0, S0, R0, k0, E0, j0, Ci, xi;
32158
32158
  const Gi = wt.isCompressedTexture ? wt.mipmaps[o0] : wt.image;
32159
32159
  if (s0 !== null)
32160
- M0 = s0.max.x - s0.min.x, v0 = s0.max.y - s0.min.y, S0 = s0.isBox3 ? s0.max.z - s0.min.z : 1, R0 = s0.min.x, k0 = s0.min.y, P0 = s0.isBox3 ? s0.min.z : 0;
32160
+ M0 = s0.max.x - s0.min.x, v0 = s0.max.y - s0.min.y, S0 = s0.isBox3 ? s0.max.z - s0.min.z : 1, R0 = s0.min.x, k0 = s0.min.y, E0 = s0.isBox3 ? s0.min.z : 0;
32161
32161
  else {
32162
32162
  const Oi = Math.pow(2, -l0);
32163
- M0 = Math.floor(Gi.width * Oi), v0 = Math.floor(Gi.height * Oi), wt.isDataArrayTexture ? S0 = Gi.depth : wt.isData3DTexture ? S0 = Math.floor(Gi.depth * Oi) : S0 = 1, R0 = 0, k0 = 0, P0 = 0;
32163
+ M0 = Math.floor(Gi.width * Oi), v0 = Math.floor(Gi.height * Oi), wt.isDataArrayTexture ? S0 = Gi.depth : wt.isData3DTexture ? S0 = Math.floor(Gi.depth * Oi) : S0 = 1, R0 = 0, k0 = 0, E0 = 0;
32164
32164
  }
32165
32165
  a0 !== null ? (j0 = a0.x, Ci = a0.y, xi = a0.z) : (j0 = 0, Ci = 0, xi = 0);
32166
32166
  const Zi = Ei.convert(t0.format), Xi = Ei.convert(t0.type);
32167
32167
  let Fi;
32168
32168
  t0.isData3DTexture ? (L0.setTexture3D(t0, 0), Fi = r0.TEXTURE_3D) : t0.isDataArrayTexture || t0.isCompressedArrayTexture ? (L0.setTexture2DArray(t0, 0), Fi = r0.TEXTURE_2D_ARRAY) : (L0.setTexture2D(t0, 0), Fi = r0.TEXTURE_2D), r0.pixelStorei(r0.UNPACK_FLIP_Y_WEBGL, t0.flipY), r0.pixelStorei(r0.UNPACK_PREMULTIPLY_ALPHA_WEBGL, t0.premultiplyAlpha), r0.pixelStorei(r0.UNPACK_ALIGNMENT, t0.unpackAlignment);
32169
32169
  const Ki = r0.getParameter(r0.UNPACK_ROW_LENGTH), Bi = r0.getParameter(r0.UNPACK_IMAGE_HEIGHT), Ai = r0.getParameter(r0.UNPACK_SKIP_PIXELS), Di = r0.getParameter(r0.UNPACK_SKIP_ROWS), $i = r0.getParameter(r0.UNPACK_SKIP_IMAGES);
32170
- r0.pixelStorei(r0.UNPACK_ROW_LENGTH, Gi.width), r0.pixelStorei(r0.UNPACK_IMAGE_HEIGHT, Gi.height), r0.pixelStorei(r0.UNPACK_SKIP_PIXELS, R0), r0.pixelStorei(r0.UNPACK_SKIP_ROWS, k0), r0.pixelStorei(r0.UNPACK_SKIP_IMAGES, P0);
32170
+ r0.pixelStorei(r0.UNPACK_ROW_LENGTH, Gi.width), r0.pixelStorei(r0.UNPACK_IMAGE_HEIGHT, Gi.height), r0.pixelStorei(r0.UNPACK_SKIP_PIXELS, R0), r0.pixelStorei(r0.UNPACK_SKIP_ROWS, k0), r0.pixelStorei(r0.UNPACK_SKIP_IMAGES, E0);
32171
32171
  const ki = wt.isDataArrayTexture || wt.isData3DTexture, Hi = t0.isDataArrayTexture || t0.isData3DTexture;
32172
32172
  if (wt.isDepthTexture) {
32173
32173
  const Oi = b0.get(wt), Qi = b0.get(t0), nn = b0.get(Oi.__renderTarget), on = b0.get(Qi.__renderTarget);
32174
32174
  N0.bindFramebuffer(r0.READ_FRAMEBUFFER, nn.__webglFramebuffer), N0.bindFramebuffer(r0.DRAW_FRAMEBUFFER, on.__webglFramebuffer);
32175
32175
  for (let cn = 0; cn < S0; cn++)
32176
- ki && (r0.framebufferTextureLayer(r0.READ_FRAMEBUFFER, r0.COLOR_ATTACHMENT0, b0.get(wt).__webglTexture, l0, P0 + cn), r0.framebufferTextureLayer(r0.DRAW_FRAMEBUFFER, r0.COLOR_ATTACHMENT0, b0.get(t0).__webglTexture, o0, xi + cn)), r0.blitFramebuffer(R0, k0, M0, v0, j0, Ci, M0, v0, r0.DEPTH_BUFFER_BIT, r0.NEAREST);
32176
+ ki && (r0.framebufferTextureLayer(r0.READ_FRAMEBUFFER, r0.COLOR_ATTACHMENT0, b0.get(wt).__webglTexture, l0, E0 + cn), r0.framebufferTextureLayer(r0.DRAW_FRAMEBUFFER, r0.COLOR_ATTACHMENT0, b0.get(t0).__webglTexture, o0, xi + cn)), r0.blitFramebuffer(R0, k0, M0, v0, j0, Ci, M0, v0, r0.DEPTH_BUFFER_BIT, r0.NEAREST);
32177
32177
  N0.bindFramebuffer(r0.READ_FRAMEBUFFER, null), N0.bindFramebuffer(r0.DRAW_FRAMEBUFFER, null);
32178
32178
  } else if (l0 !== 0 || wt.isRenderTargetTexture || b0.has(wt)) {
32179
32179
  const Oi = b0.get(wt), Qi = b0.get(t0);
32180
32180
  N0.bindFramebuffer(r0.READ_FRAMEBUFFER, dn), N0.bindFramebuffer(r0.DRAW_FRAMEBUFFER, zt);
32181
32181
  for (let nn = 0; nn < S0; nn++)
32182
- ki ? r0.framebufferTextureLayer(r0.READ_FRAMEBUFFER, r0.COLOR_ATTACHMENT0, Oi.__webglTexture, l0, P0 + nn) : r0.framebufferTexture2D(r0.READ_FRAMEBUFFER, r0.COLOR_ATTACHMENT0, r0.TEXTURE_2D, Oi.__webglTexture, l0), Hi ? r0.framebufferTextureLayer(r0.DRAW_FRAMEBUFFER, r0.COLOR_ATTACHMENT0, Qi.__webglTexture, o0, xi + nn) : r0.framebufferTexture2D(r0.DRAW_FRAMEBUFFER, r0.COLOR_ATTACHMENT0, r0.TEXTURE_2D, Qi.__webglTexture, o0), l0 !== 0 ? r0.blitFramebuffer(R0, k0, M0, v0, j0, Ci, M0, v0, r0.COLOR_BUFFER_BIT, r0.NEAREST) : Hi ? r0.copyTexSubImage3D(Fi, o0, j0, Ci, xi + nn, R0, k0, M0, v0) : r0.copyTexSubImage2D(Fi, o0, j0, Ci, R0, k0, M0, v0);
32182
+ ki ? r0.framebufferTextureLayer(r0.READ_FRAMEBUFFER, r0.COLOR_ATTACHMENT0, Oi.__webglTexture, l0, E0 + nn) : r0.framebufferTexture2D(r0.READ_FRAMEBUFFER, r0.COLOR_ATTACHMENT0, r0.TEXTURE_2D, Oi.__webglTexture, l0), Hi ? r0.framebufferTextureLayer(r0.DRAW_FRAMEBUFFER, r0.COLOR_ATTACHMENT0, Qi.__webglTexture, o0, xi + nn) : r0.framebufferTexture2D(r0.DRAW_FRAMEBUFFER, r0.COLOR_ATTACHMENT0, r0.TEXTURE_2D, Qi.__webglTexture, o0), l0 !== 0 ? r0.blitFramebuffer(R0, k0, M0, v0, j0, Ci, M0, v0, r0.COLOR_BUFFER_BIT, r0.NEAREST) : Hi ? r0.copyTexSubImage3D(Fi, o0, j0, Ci, xi + nn, R0, k0, M0, v0) : r0.copyTexSubImage2D(Fi, o0, j0, Ci, R0, k0, M0, v0);
32183
32183
  N0.bindFramebuffer(r0.READ_FRAMEBUFFER, null), N0.bindFramebuffer(r0.DRAW_FRAMEBUFFER, null);
32184
32184
  } else
32185
32185
  Hi ? wt.isDataTexture || wt.isData3DTexture ? r0.texSubImage3D(Fi, o0, j0, Ci, xi, M0, v0, S0, Zi, Xi, Gi.data) : t0.isCompressedArrayTexture ? r0.compressedTexSubImage3D(Fi, o0, j0, Ci, xi, M0, v0, S0, Zi, Gi.data) : r0.texSubImage3D(Fi, o0, j0, Ci, xi, M0, v0, S0, Zi, Xi, Gi) : wt.isDataTexture ? r0.texSubImage2D(r0.TEXTURE_2D, o0, j0, Ci, M0, v0, Zi, Xi, Gi.data) : wt.isCompressedTexture ? r0.compressedTexSubImage2D(r0.TEXTURE_2D, o0, j0, Ci, Gi.width, Gi.height, Zi, Gi.data) : r0.texSubImage2D(r0.TEXTURE_2D, o0, j0, Ci, M0, v0, Zi, Xi, Gi);
@@ -37554,7 +37554,7 @@ let _e$1 = class extends ShaderMaterial {
37554
37554
  this.uniforms.sizeAttenuation.value = e ? 1 : 0;
37555
37555
  }
37556
37556
  };
37557
- const K$2 = new Vector4(), yt$1 = new Vector3(), gt$1 = new Vector3(), g = new Vector4(), b$2 = new Vector4(), B = new Vector4(), Q$2 = new Vector3(), X$1 = new Matrix4(), M$2 = new Line3(), bt$1 = new Vector3(), W$1 = new Box3(), U$1 = new Sphere$1(), T$2 = new Vector4();
37557
+ const K$2 = new Vector4(), yt$1 = new Vector3(), gt$1 = new Vector3(), g = new Vector4(), b$1 = new Vector4(), B = new Vector4(), Q$2 = new Vector3(), X$1 = new Matrix4(), M$2 = new Line3(), bt$1 = new Vector3(), W$1 = new Box3(), U$1 = new Sphere$1(), T$2 = new Vector4();
37558
37558
  let z$2, E;
37559
37559
  function Mt$1(v, e, n) {
37560
37560
  return T$2.set(0, 0, -e, 1).applyMatrix4(v.projectionMatrix), T$2.multiplyScalar(1 / T$2.w), T$2.x = E / n.width, T$2.y = E / n.height, T$2.applyMatrix4(v.projectionMatrixInverse), T$2.multiplyScalar(1 / T$2.w), Math.abs(Math.max(T$2.x, T$2.y));
@@ -37580,19 +37580,19 @@ function pe$1(v, e, n) {
37580
37580
  const r = e.projectionMatrix, C = v.material.resolution, _ = v.matrixWorld, I = v.geometry, O = I.attributes.instanceStart, Se = I.attributes.instanceEnd, ve = Math.min(I.instanceCount, O.count), Ce = -e.near;
37581
37581
  z$2.at(1, B), B.w = 1, B.applyMatrix4(e.matrixWorldInverse), B.applyMatrix4(r), B.multiplyScalar(1 / B.w), B.x *= C.x / 2, B.y *= C.y / 2, B.z = 0, Q$2.copy(B), X$1.multiplyMatrices(e.matrixWorldInverse, _);
37582
37582
  for (let Re = 0, Pe = ve; Re < Pe; Re++) {
37583
- if (g.fromBufferAttribute(O, Re), b$2.fromBufferAttribute(Se, Re), g.w = 1, b$2.w = 1, g.applyMatrix4(X$1), b$2.applyMatrix4(X$1), g.z > Ce && b$2.z > Ce)
37583
+ if (g.fromBufferAttribute(O, Re), b$1.fromBufferAttribute(Se, Re), g.w = 1, b$1.w = 1, g.applyMatrix4(X$1), b$1.applyMatrix4(X$1), g.z > Ce && b$1.z > Ce)
37584
37584
  continue;
37585
37585
  if (g.z > Ce) {
37586
- const Ne = g.z - b$2.z, lt = (g.z - Ce) / Ne;
37587
- g.lerp(b$2, lt);
37588
- } else if (b$2.z > Ce) {
37589
- const Ne = b$2.z - g.z, lt = (b$2.z - Ce) / Ne;
37590
- b$2.lerp(g, lt);
37586
+ const Ne = g.z - b$1.z, lt = (g.z - Ce) / Ne;
37587
+ g.lerp(b$1, lt);
37588
+ } else if (b$1.z > Ce) {
37589
+ const Ne = b$1.z - g.z, lt = (b$1.z - Ce) / Ne;
37590
+ b$1.lerp(g, lt);
37591
37591
  }
37592
- g.applyMatrix4(r), b$2.applyMatrix4(r), g.multiplyScalar(1 / g.w), b$2.multiplyScalar(1 / b$2.w), g.x *= C.x / 2, g.y *= C.y / 2, b$2.x *= C.x / 2, b$2.y *= C.y / 2, M$2.start.copy(g), M$2.start.z = 0, M$2.end.copy(b$2), M$2.end.z = 0;
37592
+ g.applyMatrix4(r), b$1.applyMatrix4(r), g.multiplyScalar(1 / g.w), b$1.multiplyScalar(1 / b$1.w), g.x *= C.x / 2, g.y *= C.y / 2, b$1.x *= C.x / 2, b$1.y *= C.y / 2, M$2.start.copy(g), M$2.start.z = 0, M$2.end.copy(b$1), M$2.end.z = 0;
37593
37593
  const Fe = M$2.closestPointToPointParameter(Q$2, !0);
37594
37594
  M$2.at(Fe, bt$1);
37595
- const ke = MathUtils.lerp(g.z, b$2.z, Fe), ct = ke >= -1 && ke <= 1, Ue = Q$2.distanceTo(bt$1) < E * 0.5;
37595
+ const ke = MathUtils.lerp(g.z, b$1.z, Fe), ct = ke >= -1 && ke <= 1, Ue = Q$2.distanceTo(bt$1) < E * 0.5;
37596
37596
  if (ct && Ue) {
37597
37597
  M$2.start.fromBufferAttribute(O, Re), M$2.end.fromBufferAttribute(Se, Re), M$2.start.applyMatrix4(_), M$2.end.applyMatrix4(_);
37598
37598
  const Ne = new Vector3(), lt = new Vector3();
@@ -37766,12 +37766,12 @@ function mergeGroups(v) {
37766
37766
  }
37767
37767
  return v;
37768
37768
  }
37769
- const b$1 = /* @__PURE__ */ new Map(), R$2 = (v = {}) => ({
37769
+ const b = /* @__PURE__ */ new Map(), R$2 = (v = {}) => ({
37770
37770
  generateTopUV(e, n, r, C, _) {
37771
37771
  const I = n[r * 3], O = n[r * 3 + 1], Se = n[C * 3], ve = n[C * 3 + 1], Ce = n[_ * 3], Re = n[_ * 3 + 1];
37772
37772
  let Pe;
37773
- if (b$1.has(e))
37774
- Pe = b$1.get(e);
37773
+ if (b.has(e))
37774
+ Pe = b.get(e);
37775
37775
  else {
37776
37776
  let Ue = v.box3;
37777
37777
  if (!Ue) {
@@ -37783,7 +37783,7 @@ const b$1 = /* @__PURE__ */ new Map(), R$2 = (v = {}) => ({
37783
37783
  v.split && (Ne.y /= v.split), Pe = {
37784
37784
  box: Ue,
37785
37785
  size: Ne
37786
- }, b$1.set(e, Pe);
37786
+ }, b.set(e, Pe);
37787
37787
  }
37788
37788
  const { box: Fe, size: ke } = Pe, ct = v.split ? 1 - v.split : 0;
37789
37789
  return [
@@ -37795,8 +37795,8 @@ const b$1 = /* @__PURE__ */ new Map(), R$2 = (v = {}) => ({
37795
37795
  generateSideWallUV(e, n, r, C, _, I) {
37796
37796
  const O = n[r * 3], Se = n[r * 3 + 1], ve = n[r * 3 + 2], Ce = n[C * 3], Re = n[C * 3 + 1], Pe = n[C * 3 + 2], Fe = n[_ * 3], ke = n[_ * 3 + 1], ct = n[_ * 3 + 2], Ue = n[I * 3], Ne = n[I * 3 + 1], lt = n[I * 3 + 2];
37797
37797
  let at;
37798
- if (b$1.has(n))
37799
- at = b$1.get(n);
37798
+ if (b.has(n))
37799
+ at = b.get(n);
37800
37800
  else {
37801
37801
  const ut = new Box3();
37802
37802
  ut.setFromArray(n);
@@ -37804,7 +37804,7 @@ const b$1 = /* @__PURE__ */ new Map(), R$2 = (v = {}) => ({
37804
37804
  v.split && (xt.z /= 1 - v.split), v.sideRepeat && (xt.z /= v.sideRepeat), at = {
37805
37805
  box: ut,
37806
37806
  size: xt
37807
- }, b$1.set(n, at);
37807
+ }, b.set(n, at);
37808
37808
  }
37809
37809
  const { box: ht, size: dt } = at;
37810
37810
  return Math.abs(Se - Re) < Math.abs(O - Ce) ? [
@@ -37820,7 +37820,7 @@ const b$1 = /* @__PURE__ */ new Map(), R$2 = (v = {}) => ({
37820
37820
  ];
37821
37821
  }
37822
37822
  }), P$1 = () => {
37823
- b$1.clear();
37823
+ b.clear();
37824
37824
  }, CENTER = 0, AVERAGE = 1, SAH = 2, CONTAINED = 2, TRIANGLE_INTERSECT_COST = 1.25, TRAVERSAL_COST = 1, BYTES_PER_NODE = 6 * 4 + 4 + 4, IS_LEAFNODE_FLAG = 65535, FLOAT32_EPSILON = Math.pow(2, -24), SKIP_GENERATION = Symbol("SKIP_GENERATION");
37825
37825
  function getVertexCount$1(v) {
37826
37826
  return v.index ? v.index.count : v.attributes.position.count;
@@ -40941,23 +40941,23 @@ let K$1 = class Nn extends BufferGeometry {
40941
40941
  if (xt)
40942
40942
  for (let H0 = 0; H0 < q0; H0++) {
40943
40943
  const n0 = $0[H0];
40944
- V0(n0[2] + K0, n0[1] + K0, n0[0] + K0);
40944
+ P0(n0[2] + K0, n0[1] + K0, n0[0] + K0);
40945
40945
  }
40946
40946
  if (L0 = Fe + at * 2, K0 = G0 * L0, ut)
40947
40947
  for (let H0 = 0; H0 < q0; H0++) {
40948
40948
  const n0 = $0[H0];
40949
- V0(n0[0] + K0, n0[1] + K0, n0[2] + K0);
40949
+ P0(n0[0] + K0, n0[1] + K0, n0[2] + K0);
40950
40950
  }
40951
40951
  } else {
40952
40952
  if (xt)
40953
40953
  for (let L0 = 0; L0 < q0; L0++) {
40954
40954
  const K0 = $0[L0];
40955
- V0(K0[2], K0[1], K0[0]);
40955
+ P0(K0[2], K0[1], K0[0]);
40956
40956
  }
40957
40957
  if (ut)
40958
40958
  for (let L0 = 0; L0 < q0; L0++) {
40959
40959
  const K0 = $0[L0];
40960
- V0(
40960
+ P0(
40961
40961
  K0[0] + G0 * Fe,
40962
40962
  K0[1] + G0 * Fe,
40963
40963
  K0[2] + G0 * Fe
@@ -40991,7 +40991,7 @@ let K$1 = class Nn extends BufferGeometry {
40991
40991
  function w0(b0, L0, K0) {
40992
40992
  Re.push(b0), Re.push(L0), Re.push(K0);
40993
40993
  }
40994
- function V0(b0, L0, K0) {
40994
+ function P0(b0, L0, K0) {
40995
40995
  N0(b0), N0(L0), N0(K0);
40996
40996
  const H0 = C.length / 3, n0 = dt.generateTopUV(
40997
40997
  r,
@@ -41849,7 +41849,7 @@ const _Stats = class gn {
41849
41849
  this.minimal ? (this.dom.addEventListener("click", this.handleClick), this.showPanel(this.mode)) : window.addEventListener("resize", this.handleResize);
41850
41850
  }
41851
41851
  init(e) {
41852
- return E0(this, null, function* () {
41852
+ return V0(this, null, function* () {
41853
41853
  if (!e) {
41854
41854
  console.error('Stats: The "canvas" parameter is undefined.');
41855
41855
  return;
@@ -41866,7 +41866,7 @@ const _Stats = class gn {
41866
41866
  return e.isWebGLRenderer && !this.threeRendererPatched ? (this.patchThreeRenderer(e), this.gl = e.getContext(), this.trackGPU && this.initializeGPUTracking(), !0) : !1;
41867
41867
  }
41868
41868
  handleWebGPURenderer(e) {
41869
- return E0(this, null, function* () {
41869
+ return V0(this, null, function* () {
41870
41870
  return e.isWebGPURenderer ? ((this.trackGPU || this.trackCPT) && (e.backend.trackTimestamp = !0, (yield e.hasFeatureAsync("timestamp-query")) && this.initializeWebGPUPanels()), this.info = e.info, this.patchThreeWebGPU(e), !0) : !1;
41871
41871
  });
41872
41872
  }
@@ -42598,11 +42598,11 @@ class SimplexNoise {
42598
42598
  noise4d(e, n, r, C) {
42599
42599
  const _ = this.grad4, I = this.simplex, O = this.perm, Se = (Math.sqrt(5) - 1) / 4, ve = (5 - Math.sqrt(5)) / 20;
42600
42600
  let Ce, Re, Pe, Fe, ke;
42601
- const ct = (e + n + r + C) * Se, Ue = Math.floor(e + ct), Ne = Math.floor(n + ct), lt = Math.floor(r + ct), at = Math.floor(C + ct), ht = (Ue + Ne + lt + at) * ve, dt = Ue - ht, ut = Ne - ht, xt = lt - ht, Lt = at - ht, Xt = e - dt, Zt = n - ut, Vt = r - xt, kt = C - Lt, $t = Xt > Zt ? 32 : 0, i0 = Xt > Vt ? 16 : 0, Yt = Zt > Vt ? 8 : 0, Kt = Xt > kt ? 4 : 0, Ft = Zt > kt ? 2 : 0, Wt = Vt > kt ? 1 : 0, e0 = $t + i0 + Yt + Kt + Ft + Wt, c0 = I[e0][0] >= 3 ? 1 : 0, h0 = I[e0][1] >= 3 ? 1 : 0, G0 = I[e0][2] >= 3 ? 1 : 0, D0 = I[e0][3] >= 3 ? 1 : 0, A0 = I[e0][0] >= 2 ? 1 : 0, f0 = I[e0][1] >= 2 ? 1 : 0, T0 = I[e0][2] >= 2 ? 1 : 0, F0 = I[e0][3] >= 2 ? 1 : 0, $0 = I[e0][0] >= 1 ? 1 : 0, q0 = I[e0][1] >= 1 ? 1 : 0, Si = I[e0][2] >= 1 ? 1 : 0, zi = I[e0][3] >= 1 ? 1 : 0, wi = Xt - c0 + ve, r0 = Zt - h0 + ve, w0 = Vt - G0 + ve, V0 = kt - D0 + ve, U0 = Xt - A0 + 2 * ve, N0 = Zt - f0 + 2 * ve, J0 = Vt - T0 + 2 * ve, b0 = kt - F0 + 2 * ve, L0 = Xt - $0 + 3 * ve, K0 = Zt - q0 + 3 * ve, H0 = Vt - Si + 3 * ve, n0 = kt - zi + 3 * ve, qt = Xt - 1 + 4 * ve, d0 = Zt - 1 + 4 * ve, g0 = Vt - 1 + 4 * ve, I0 = kt - 1 + 4 * ve, C0 = Ue & 255, Ti = Ne & 255, Q0 = lt & 255, Ri = at & 255, Wi = O[C0 + O[Ti + O[Q0 + O[Ri]]]] % 32, bi = O[C0 + c0 + O[Ti + h0 + O[Q0 + G0 + O[Ri + D0]]]] % 32, Li = O[C0 + A0 + O[Ti + f0 + O[Q0 + T0 + O[Ri + F0]]]] % 32, Pi = O[C0 + $0 + O[Ti + q0 + O[Q0 + Si + O[Ri + zi]]]] % 32, Ei = O[C0 + 1 + O[Ti + 1 + O[Q0 + 1 + O[Ri + 1]]]] % 32;
42601
+ const ct = (e + n + r + C) * Se, Ue = Math.floor(e + ct), Ne = Math.floor(n + ct), lt = Math.floor(r + ct), at = Math.floor(C + ct), ht = (Ue + Ne + lt + at) * ve, dt = Ue - ht, ut = Ne - ht, xt = lt - ht, Lt = at - ht, Xt = e - dt, Zt = n - ut, Vt = r - xt, kt = C - Lt, $t = Xt > Zt ? 32 : 0, i0 = Xt > Vt ? 16 : 0, Yt = Zt > Vt ? 8 : 0, Kt = Xt > kt ? 4 : 0, Ft = Zt > kt ? 2 : 0, Wt = Vt > kt ? 1 : 0, e0 = $t + i0 + Yt + Kt + Ft + Wt, c0 = I[e0][0] >= 3 ? 1 : 0, h0 = I[e0][1] >= 3 ? 1 : 0, G0 = I[e0][2] >= 3 ? 1 : 0, D0 = I[e0][3] >= 3 ? 1 : 0, A0 = I[e0][0] >= 2 ? 1 : 0, f0 = I[e0][1] >= 2 ? 1 : 0, T0 = I[e0][2] >= 2 ? 1 : 0, F0 = I[e0][3] >= 2 ? 1 : 0, $0 = I[e0][0] >= 1 ? 1 : 0, q0 = I[e0][1] >= 1 ? 1 : 0, Si = I[e0][2] >= 1 ? 1 : 0, zi = I[e0][3] >= 1 ? 1 : 0, wi = Xt - c0 + ve, r0 = Zt - h0 + ve, w0 = Vt - G0 + ve, P0 = kt - D0 + ve, U0 = Xt - A0 + 2 * ve, N0 = Zt - f0 + 2 * ve, J0 = Vt - T0 + 2 * ve, b0 = kt - F0 + 2 * ve, L0 = Xt - $0 + 3 * ve, K0 = Zt - q0 + 3 * ve, H0 = Vt - Si + 3 * ve, n0 = kt - zi + 3 * ve, qt = Xt - 1 + 4 * ve, d0 = Zt - 1 + 4 * ve, g0 = Vt - 1 + 4 * ve, I0 = kt - 1 + 4 * ve, C0 = Ue & 255, Ti = Ne & 255, Q0 = lt & 255, Ri = at & 255, Wi = O[C0 + O[Ti + O[Q0 + O[Ri]]]] % 32, bi = O[C0 + c0 + O[Ti + h0 + O[Q0 + G0 + O[Ri + D0]]]] % 32, Li = O[C0 + A0 + O[Ti + f0 + O[Q0 + T0 + O[Ri + F0]]]] % 32, Pi = O[C0 + $0 + O[Ti + q0 + O[Q0 + Si + O[Ri + zi]]]] % 32, Ei = O[C0 + 1 + O[Ti + 1 + O[Q0 + 1 + O[Ri + 1]]]] % 32;
42602
42602
  let Mi = 0.6 - Xt * Xt - Zt * Zt - Vt * Vt - kt * kt;
42603
42603
  Mi < 0 ? Ce = 0 : (Mi *= Mi, Ce = Mi * Mi * this._dot4(_[Wi], Xt, Zt, Vt, kt));
42604
- let Ii = 0.6 - wi * wi - r0 * r0 - w0 * w0 - V0 * V0;
42605
- Ii < 0 ? Re = 0 : (Ii *= Ii, Re = Ii * Ii * this._dot4(_[bi], wi, r0, w0, V0));
42604
+ let Ii = 0.6 - wi * wi - r0 * r0 - w0 * w0 - P0 * P0;
42605
+ Ii < 0 ? Re = 0 : (Ii *= Ii, Re = Ii * Ii * this._dot4(_[bi], wi, r0, w0, P0));
42606
42606
  let u0 = 0.6 - U0 * U0 - N0 * N0 - J0 * J0 - b0 * b0;
42607
42607
  u0 < 0 ? Pe = 0 : (u0 *= u0, Pe = u0 * u0 * this._dot4(_[Li], U0, N0, J0, b0));
42608
42608
  let yi = 0.6 - L0 * L0 - K0 * K0 - H0 * H0 - n0 * n0;
@@ -44184,9 +44184,9 @@ class EXRLoader extends DataTextureLoader {
44184
44184
  for (; S0 <= v0; ) S0 <<= 1;
44185
44185
  for (S0 >>= 1, R0 = S0, S0 >>= 1; S0 >= 1; ) {
44186
44186
  k0 = 0;
44187
- const P0 = k0 + l0 * (a0 - R0), j0 = l0 * S0, Ci = l0 * R0, xi = s0 * S0, Gi = s0 * R0;
44187
+ const E0 = k0 + l0 * (a0 - R0), j0 = l0 * S0, Ci = l0 * R0, xi = s0 * S0, Gi = s0 * R0;
44188
44188
  let Zi, Xi, Fi, Ki;
44189
- for (; k0 <= P0; k0 += Ci) {
44189
+ for (; k0 <= E0; k0 += Ci) {
44190
44190
  let Bi = k0;
44191
44191
  const Ai = k0 + s0 * (t0 - R0);
44192
44192
  for (; Bi <= Ai; Bi += Gi) {
@@ -44212,8 +44212,8 @@ class EXRLoader extends DataTextureLoader {
44212
44212
  }
44213
44213
  function Si(zt, wt, t0, s0, a0, l0, o0, M0, v0) {
44214
44214
  let S0 = 0, R0 = 0;
44215
- const k0 = o0, P0 = Math.trunc(s0.value + (a0 + 7) / 8);
44216
- for (; s0.value < P0; )
44215
+ const k0 = o0, E0 = Math.trunc(s0.value + (a0 + 7) / 8);
44216
+ for (; s0.value < E0; )
44217
44217
  for (h0(S0, R0, t0, s0), S0 = c0.c, R0 = c0.lc; R0 >= 14; ) {
44218
44218
  const Ci = S0 >> R0 - 14 & 16383, xi = wt[Ci];
44219
44219
  if (xi.len)
@@ -44224,7 +44224,7 @@ class EXRLoader extends DataTextureLoader {
44224
44224
  let Gi;
44225
44225
  for (Gi = 0; Gi < xi.lit; Gi++) {
44226
44226
  const Zi = Ft(zt[xi.p[Gi]]);
44227
- for (; R0 < Zi && s0.value < P0; )
44227
+ for (; R0 < Zi && s0.value < E0; )
44228
44228
  h0(S0, R0, t0, s0), S0 = c0.c, R0 = c0.lc;
44229
44229
  if (R0 >= Zi && Wt(zt[xi.p[Gi]]) == (S0 >> R0 - Zi & (1 << Zi) - 1)) {
44230
44230
  R0 -= Zi, D0(xi.p[Gi], l0, S0, R0, t0, s0, M0, v0, k0), S0 = G0.c, R0 = G0.lc;
@@ -44251,12 +44251,12 @@ class EXRLoader extends DataTextureLoader {
44251
44251
  const R0 = Pi(wt, t0);
44252
44252
  if (t0.value += 4, v0 < 0 || v0 >= 65537 || S0 < 0 || S0 >= 65537)
44253
44253
  throw new Error("Something wrong with HUF_ENCSIZE");
44254
- const k0 = new Array(65537), P0 = new Array(16384);
44255
- Vt(P0);
44254
+ const k0 = new Array(65537), E0 = new Array(16384);
44255
+ Vt(E0);
44256
44256
  const j0 = s0 - (t0.value - M0);
44257
44257
  if (Kt(zt, t0, j0, v0, S0, k0), R0 > 8 * (s0 - (t0.value - M0)))
44258
44258
  throw new Error("Something wrong with hufUncompress");
44259
- e0(k0, v0, S0, P0), Si(k0, P0, zt, t0, R0, S0, l0, a0, o0);
44259
+ e0(k0, v0, S0, E0), Si(k0, E0, zt, t0, R0, S0, l0, a0, o0);
44260
44260
  }
44261
44261
  function wi(zt, wt, t0) {
44262
44262
  for (let s0 = 0; s0 < t0; ++s0)
@@ -44274,7 +44274,7 @@ class EXRLoader extends DataTextureLoader {
44274
44274
  for (; !(a0 > l0 || (wt[a0++] = zt[t0++], a0 > l0)); )
44275
44275
  wt[a0++] = zt[s0++];
44276
44276
  }
44277
- function V0(zt) {
44277
+ function P0(zt) {
44278
44278
  let wt = zt.byteLength;
44279
44279
  const t0 = new Array();
44280
44280
  let s0 = 0;
@@ -44298,12 +44298,12 @@ class EXRLoader extends DataTextureLoader {
44298
44298
  }
44299
44299
  function U0(zt, wt, t0, s0, a0, l0) {
44300
44300
  let o0 = new DataView(l0.buffer);
44301
- const M0 = t0[zt.idx[0]].width, v0 = t0[zt.idx[0]].height, S0 = 3, R0 = Math.floor(M0 / 8), k0 = Math.ceil(M0 / 8), P0 = Math.ceil(v0 / 8), j0 = M0 - (k0 - 1) * 8, Ci = v0 - (P0 - 1) * 8, xi = { value: 0 }, Gi = new Array(S0), Zi = new Array(S0), Xi = new Array(S0), Fi = new Array(S0), Ki = new Array(S0);
44301
+ const M0 = t0[zt.idx[0]].width, v0 = t0[zt.idx[0]].height, S0 = 3, R0 = Math.floor(M0 / 8), k0 = Math.ceil(M0 / 8), E0 = Math.ceil(v0 / 8), j0 = M0 - (k0 - 1) * 8, Ci = v0 - (E0 - 1) * 8, xi = { value: 0 }, Gi = new Array(S0), Zi = new Array(S0), Xi = new Array(S0), Fi = new Array(S0), Ki = new Array(S0);
44302
44302
  for (let Ai = 0; Ai < S0; ++Ai)
44303
- Ki[Ai] = wt[zt.idx[Ai]], Gi[Ai] = Ai < 1 ? 0 : Gi[Ai - 1] + k0 * P0, Zi[Ai] = new Float32Array(64), Xi[Ai] = new Uint16Array(64), Fi[Ai] = new Uint16Array(k0 * 64);
44304
- for (let Ai = 0; Ai < P0; ++Ai) {
44303
+ Ki[Ai] = wt[zt.idx[Ai]], Gi[Ai] = Ai < 1 ? 0 : Gi[Ai - 1] + k0 * E0, Zi[Ai] = new Float32Array(64), Xi[Ai] = new Uint16Array(64), Fi[Ai] = new Uint16Array(k0 * 64);
44304
+ for (let Ai = 0; Ai < E0; ++Ai) {
44305
44305
  let Di = 8;
44306
- Ai == P0 - 1 && (Di = Ci);
44306
+ Ai == E0 - 1 && (Di = Ci);
44307
44307
  let $i = 8;
44308
44308
  for (let Hi = 0; Hi < k0; ++Hi) {
44309
44309
  Hi == k0 - 1 && ($i = j0);
@@ -44347,7 +44347,7 @@ class EXRLoader extends DataTextureLoader {
44347
44347
  }
44348
44348
  }
44349
44349
  function N0(zt, wt, t0, s0, a0, l0) {
44350
- const o0 = new DataView(l0.buffer), M0 = t0[zt], v0 = M0.width, S0 = M0.height, R0 = Math.ceil(v0 / 8), k0 = Math.ceil(S0 / 8), P0 = Math.floor(v0 / 8), j0 = v0 - (R0 - 1) * 8, Ci = S0 - (k0 - 1) * 8, xi = { value: 0 };
44350
+ const o0 = new DataView(l0.buffer), M0 = t0[zt], v0 = M0.width, S0 = M0.height, R0 = Math.ceil(v0 / 8), k0 = Math.ceil(S0 / 8), E0 = Math.floor(v0 / 8), j0 = v0 - (R0 - 1) * 8, Ci = S0 - (k0 - 1) * 8, xi = { value: 0 };
44351
44351
  let Gi = 0;
44352
44352
  const Zi = new Float32Array(64), Xi = new Uint16Array(64), Fi = new Uint16Array(R0 * 64);
44353
44353
  for (let Ki = 0; Ki < k0; ++Ki) {
@@ -44357,14 +44357,14 @@ class EXRLoader extends DataTextureLoader {
44357
44357
  Xi.fill(0), Xi[0] = a0[Gi++], J0(xi, s0, Xi), b0(Xi, Zi), L0(Zi), H0(Zi, Fi, Ai * 64);
44358
44358
  for (let Ai = 8 * Ki; Ai < 8 * Ki + Bi; ++Ai) {
44359
44359
  let Di = wt[zt][Ai];
44360
- for (let $i = 0; $i < P0; ++$i) {
44360
+ for (let $i = 0; $i < E0; ++$i) {
44361
44361
  const ki = $i * 64 + (Ai & 7) * 8;
44362
44362
  for (let Hi = 0; Hi < 8; ++Hi)
44363
44363
  o0.setUint16(Di + Hi * 2 * M0.type, Fi[ki + Hi], !0);
44364
44364
  Di += 8 * 2 * M0.type;
44365
44365
  }
44366
- if (R0 != P0) {
44367
- const $i = P0 * 64 + (Ai & 7) * 8;
44366
+ if (R0 != E0) {
44367
+ const $i = E0 * 64 + (Ai & 7) * 8;
44368
44368
  for (let ki = 0; ki < j0; ++ki)
44369
44369
  o0.setUint16(Di + ki * 2 * M0.type, Fi[$i + ki], !0);
44370
44370
  }
@@ -44382,12 +44382,12 @@ class EXRLoader extends DataTextureLoader {
44382
44382
  }
44383
44383
  function L0(zt) {
44384
44384
  const wt = 0.5 * Math.cos(0.7853975), t0 = 0.5 * Math.cos(3.14159 / 16), s0 = 0.5 * Math.cos(3.14159 / 8), a0 = 0.5 * Math.cos(3 * 3.14159 / 16), l0 = 0.5 * Math.cos(5 * 3.14159 / 16), o0 = 0.5 * Math.cos(3 * 3.14159 / 8), M0 = 0.5 * Math.cos(7 * 3.14159 / 16), v0 = new Array(4), S0 = new Array(4), R0 = new Array(4), k0 = new Array(4);
44385
- for (let P0 = 0; P0 < 8; ++P0) {
44386
- const j0 = P0 * 8;
44385
+ for (let E0 = 0; E0 < 8; ++E0) {
44386
+ const j0 = E0 * 8;
44387
44387
  v0[0] = s0 * zt[j0 + 2], v0[1] = o0 * zt[j0 + 2], v0[2] = s0 * zt[j0 + 6], v0[3] = o0 * zt[j0 + 6], S0[0] = t0 * zt[j0 + 1] + a0 * zt[j0 + 3] + l0 * zt[j0 + 5] + M0 * zt[j0 + 7], S0[1] = a0 * zt[j0 + 1] - M0 * zt[j0 + 3] - t0 * zt[j0 + 5] - l0 * zt[j0 + 7], S0[2] = l0 * zt[j0 + 1] - t0 * zt[j0 + 3] + M0 * zt[j0 + 5] + a0 * zt[j0 + 7], S0[3] = M0 * zt[j0 + 1] - l0 * zt[j0 + 3] + a0 * zt[j0 + 5] - t0 * zt[j0 + 7], R0[0] = wt * (zt[j0 + 0] + zt[j0 + 4]), R0[3] = wt * (zt[j0 + 0] - zt[j0 + 4]), R0[1] = v0[0] + v0[3], R0[2] = v0[1] - v0[2], k0[0] = R0[0] + R0[1], k0[1] = R0[3] + R0[2], k0[2] = R0[3] - R0[2], k0[3] = R0[0] - R0[1], zt[j0 + 0] = k0[0] + S0[0], zt[j0 + 1] = k0[1] + S0[1], zt[j0 + 2] = k0[2] + S0[2], zt[j0 + 3] = k0[3] + S0[3], zt[j0 + 4] = k0[3] - S0[3], zt[j0 + 5] = k0[2] - S0[2], zt[j0 + 6] = k0[1] - S0[1], zt[j0 + 7] = k0[0] - S0[0];
44388
44388
  }
44389
- for (let P0 = 0; P0 < 8; ++P0)
44390
- v0[0] = s0 * zt[16 + P0], v0[1] = o0 * zt[16 + P0], v0[2] = s0 * zt[48 + P0], v0[3] = o0 * zt[48 + P0], S0[0] = t0 * zt[8 + P0] + a0 * zt[24 + P0] + l0 * zt[40 + P0] + M0 * zt[56 + P0], S0[1] = a0 * zt[8 + P0] - M0 * zt[24 + P0] - t0 * zt[40 + P0] - l0 * zt[56 + P0], S0[2] = l0 * zt[8 + P0] - t0 * zt[24 + P0] + M0 * zt[40 + P0] + a0 * zt[56 + P0], S0[3] = M0 * zt[8 + P0] - l0 * zt[24 + P0] + a0 * zt[40 + P0] - t0 * zt[56 + P0], R0[0] = wt * (zt[P0] + zt[32 + P0]), R0[3] = wt * (zt[P0] - zt[32 + P0]), R0[1] = v0[0] + v0[3], R0[2] = v0[1] - v0[2], k0[0] = R0[0] + R0[1], k0[1] = R0[3] + R0[2], k0[2] = R0[3] - R0[2], k0[3] = R0[0] - R0[1], zt[0 + P0] = k0[0] + S0[0], zt[8 + P0] = k0[1] + S0[1], zt[16 + P0] = k0[2] + S0[2], zt[24 + P0] = k0[3] + S0[3], zt[32 + P0] = k0[3] - S0[3], zt[40 + P0] = k0[2] - S0[2], zt[48 + P0] = k0[1] - S0[1], zt[56 + P0] = k0[0] - S0[0];
44389
+ for (let E0 = 0; E0 < 8; ++E0)
44390
+ v0[0] = s0 * zt[16 + E0], v0[1] = o0 * zt[16 + E0], v0[2] = s0 * zt[48 + E0], v0[3] = o0 * zt[48 + E0], S0[0] = t0 * zt[8 + E0] + a0 * zt[24 + E0] + l0 * zt[40 + E0] + M0 * zt[56 + E0], S0[1] = a0 * zt[8 + E0] - M0 * zt[24 + E0] - t0 * zt[40 + E0] - l0 * zt[56 + E0], S0[2] = l0 * zt[8 + E0] - t0 * zt[24 + E0] + M0 * zt[40 + E0] + a0 * zt[56 + E0], S0[3] = M0 * zt[8 + E0] - l0 * zt[24 + E0] + a0 * zt[40 + E0] - t0 * zt[56 + E0], R0[0] = wt * (zt[E0] + zt[32 + E0]), R0[3] = wt * (zt[E0] - zt[32 + E0]), R0[1] = v0[0] + v0[3], R0[2] = v0[1] - v0[2], k0[0] = R0[0] + R0[1], k0[1] = R0[3] + R0[2], k0[2] = R0[3] - R0[2], k0[3] = R0[0] - R0[1], zt[0 + E0] = k0[0] + S0[0], zt[8 + E0] = k0[1] + S0[1], zt[16 + E0] = k0[2] + S0[2], zt[24 + E0] = k0[3] + S0[3], zt[32 + E0] = k0[3] - S0[3], zt[40 + E0] = k0[2] - S0[2], zt[48 + E0] = k0[1] - S0[1], zt[56 + E0] = k0[0] - S0[0];
44391
44391
  }
44392
44392
  function K0(zt) {
44393
44393
  for (let wt = 0; wt < 64; ++wt) {
@@ -44406,7 +44406,7 @@ class EXRLoader extends DataTextureLoader {
44406
44406
  return new DataView(zt.array.buffer, zt.offset.value, zt.size);
44407
44407
  }
44408
44408
  function d0(zt) {
44409
- const wt = zt.viewer.buffer.slice(zt.offset.value, zt.offset.value + zt.size), t0 = new Uint8Array(V0(wt)), s0 = new Uint8Array(t0.length);
44409
+ const wt = zt.viewer.buffer.slice(zt.offset.value, zt.offset.value + zt.size), t0 = new Uint8Array(P0(wt)), s0 = new Uint8Array(t0.length);
44410
44410
  return r0(t0), w0(t0, s0), new DataView(s0.buffer);
44411
44411
  }
44412
44412
  function g0(zt) {
@@ -44441,12 +44441,12 @@ class EXRLoader extends DataTextureLoader {
44441
44441
  );
44442
44442
  }
44443
44443
  wi(S0, s0, l0);
44444
- let P0 = 0;
44444
+ let E0 = 0;
44445
44445
  const j0 = new Uint8Array(s0.buffer.byteLength);
44446
44446
  for (let Ci = 0; Ci < zt.lines; Ci++)
44447
44447
  for (let xi = 0; xi < zt.inputChannels.length; xi++) {
44448
44448
  const Gi = o0[xi], Zi = Gi.nx * Gi.size, Xi = new Uint8Array(s0.buffer, Gi.end * 2, Zi * 2);
44449
- j0.set(Xi, P0), P0 += Zi * 2, Gi.end += Zi;
44449
+ j0.set(Xi, E0), E0 += Zi * 2, Gi.end += Zi;
44450
44450
  }
44451
44451
  return new DataView(j0.buffer);
44452
44452
  }
@@ -44518,7 +44518,7 @@ class EXRLoader extends DataTextureLoader {
44518
44518
  Gi.name == Xi.name && (Gi.compression = Xi.compression, Xi.index >= 0 && (S0.idx[Xi.index] = xi), Gi.offset = xi);
44519
44519
  }
44520
44520
  }
44521
- let R0, k0, P0;
44521
+ let R0, k0, E0;
44522
44522
  if (a0.acCompressedSize > 0)
44523
44523
  switch (a0.acCompression) {
44524
44524
  case 0:
@@ -44539,7 +44539,7 @@ class EXRLoader extends DataTextureLoader {
44539
44539
  }
44540
44540
  if (a0.rleRawSize > 0) {
44541
44541
  const xi = zt.array.slice(t0.value, t0.value + a0.rleCompressedSize), Gi = unzlibSync(xi);
44542
- P0 = V0(Gi.buffer), t0.value += a0.rleCompressedSize;
44542
+ E0 = P0(Gi.buffer), t0.value += a0.rleCompressedSize;
44543
44543
  }
44544
44544
  let j0 = 0;
44545
44545
  const Ci = new Array(v0.length);
@@ -44559,7 +44559,7 @@ class EXRLoader extends DataTextureLoader {
44559
44559
  let Ki = Ci[xi][Zi];
44560
44560
  for (let Bi = 0; Bi < Gi.width; ++Bi) {
44561
44561
  for (let Ai = 0; Ai < 2 * Gi.type; ++Ai)
44562
- s0[Ki++] = P0[Xi + Ai * Gi.width * Gi.height];
44562
+ s0[Ki++] = E0[Xi + Ai * Gi.width * Gi.height];
44563
44563
  Xi++;
44564
44564
  }
44565
44565
  Zi++;
@@ -44786,11 +44786,11 @@ class EXRLoader extends DataTextureLoader {
44786
44786
  const v0 = zt.columns * zt.totalBytes, R0 = zt.size < zt.lines * v0 ? zt.uncompress(zt) : qt(zt);
44787
44787
  wt.value += zt.size;
44788
44788
  for (let k0 = 0; k0 < zt.lines; k0++) {
44789
- const P0 = k0 * zt.columns * zt.totalBytes;
44789
+ const E0 = k0 * zt.columns * zt.totalBytes;
44790
44790
  for (let j0 = 0; j0 < zt.inputChannels.length; j0++) {
44791
44791
  const Ci = pn.channels[j0].name, xi = zt.channelByteOffsets[Ci] * zt.columns, Gi = zt.decodeChannels[Ci];
44792
44792
  if (Gi === void 0) continue;
44793
- t0.value = P0 + xi;
44793
+ t0.value = E0 + xi;
44794
44794
  const Zi = (zt.height - (1 + M0 + k0)) * zt.outLineWidth;
44795
44795
  for (let Xi = 0; Xi < zt.columns; Xi++) {
44796
44796
  const Fi = Zi + (Xi + o0) * zt.outputChannels + Gi;
@@ -44810,13 +44810,13 @@ class EXRLoader extends DataTextureLoader {
44810
44810
  for (let v0 = 0; v0 < zt.blockHeight; v0++) {
44811
44811
  const S0 = s0 * zt.blockHeight, R0 = v0 + zt.scanOrder(S0);
44812
44812
  if (R0 >= zt.height) continue;
44813
- const k0 = v0 * l0, P0 = (zt.height - 1 - R0) * zt.outLineWidth;
44813
+ const k0 = v0 * l0, E0 = (zt.height - 1 - R0) * zt.outLineWidth;
44814
44814
  for (let j0 = 0; j0 < zt.inputChannels.length; j0++) {
44815
44815
  const Ci = pn.channels[j0].name, xi = zt.channelByteOffsets[Ci] * zt.columns, Gi = zt.decodeChannels[Ci];
44816
44816
  if (Gi !== void 0) {
44817
44817
  t0.value = k0 + xi;
44818
44818
  for (let Zi = 0; Zi < zt.columns; Zi++) {
44819
- const Xi = P0 + Zi * zt.outputChannels + Gi;
44819
+ const Xi = E0 + Zi * zt.outputChannels + Gi;
44820
44820
  zt.byteArray[Xi] = zt.getter(M0, t0);
44821
44821
  }
44822
44822
  }
@@ -44900,14 +44900,14 @@ class EXRLoader extends DataTextureLoader {
44900
44900
  throw new Error("EXRLoader.parse: " + zt.compression + " is unsupported");
44901
44901
  }
44902
44902
  const M0 = {};
44903
- for (const P0 of zt.channels)
44904
- switch (P0.name) {
44903
+ for (const E0 of zt.channels)
44904
+ switch (E0.name) {
44905
44905
  case "Y":
44906
44906
  case "R":
44907
44907
  case "G":
44908
44908
  case "B":
44909
44909
  case "A":
44910
- M0[P0.name] = !0, o0.type = P0.pixelType;
44910
+ M0[E0.name] = !0, o0.type = E0.pixelType;
44911
44911
  }
44912
44912
  let v0 = !1, S0 = !1;
44913
44913
  if (M0.R && M0.G && M0.B)
@@ -44960,21 +44960,21 @@ class EXRLoader extends DataTextureLoader {
44960
44960
  break;
44961
44961
  }
44962
44962
  let k0 = 0;
44963
- for (const P0 of zt.channels)
44964
- o0.decodeChannels[P0.name] !== void 0 && (o0.channelByteOffsets[P0.name] = k0), k0 += P0.pixelType * 2;
44965
- if (o0.totalBytes = k0, o0.outLineWidth = o0.width * o0.outputChannels, zt.lineOrder === "INCREASING_Y" ? o0.scanOrder = (P0) => P0 : o0.scanOrder = (P0) => o0.height - 1 - P0, zt.spec.singleTile) {
44963
+ for (const E0 of zt.channels)
44964
+ o0.decodeChannels[E0.name] !== void 0 && (o0.channelByteOffsets[E0.name] = k0), k0 += E0.pixelType * 2;
44965
+ if (o0.totalBytes = k0, o0.outLineWidth = o0.width * o0.outputChannels, zt.lineOrder === "INCREASING_Y" ? o0.scanOrder = (E0) => E0 : o0.scanOrder = (E0) => o0.height - 1 - E0, zt.spec.singleTile) {
44966
44966
  o0.blockHeight = zt.tiles.ySize, o0.blockWidth = zt.tiles.xSize;
44967
- const P0 = Ln(zt.tiles, o0.width, o0.height), j0 = mn(P0, o0.width, zt.tiles.xSize, zt.tiles.roundingMode), Ci = mn(P0, o0.height, zt.tiles.ySize, zt.tiles.roundingMode);
44967
+ const E0 = Ln(zt.tiles, o0.width, o0.height), j0 = mn(E0, o0.width, zt.tiles.xSize, zt.tiles.roundingMode), Ci = mn(E0, o0.height, zt.tiles.ySize, zt.tiles.roundingMode);
44968
44968
  o0.tileCount = j0[0] * Ci[0];
44969
- for (let xi = 0; xi < P0; xi++)
44969
+ for (let xi = 0; xi < E0; xi++)
44970
44970
  for (let Gi = 0; Gi < Ci[xi]; Gi++)
44971
44971
  for (let Zi = 0; Zi < j0[xi]; Zi++)
44972
44972
  Ii(wt, s0);
44973
44973
  o0.decode = Tn.bind(o0);
44974
44974
  } else {
44975
44975
  o0.blockWidth = o0.width;
44976
- const P0 = Math.ceil(o0.height / o0.blockHeight);
44977
- for (let j0 = 0; j0 < P0; j0++)
44976
+ const E0 = Math.ceil(o0.height / o0.blockHeight);
44977
+ for (let j0 = 0; j0 < E0; j0++)
44978
44978
  Ii(wt, s0);
44979
44979
  o0.decode = bn.bind(o0);
44980
44980
  }
@@ -49382,8 +49382,8 @@ if (typeof document != "undefined") {
49382
49382
  var r0 = this.props;
49383
49383
  if (Ft === 1 && Wt === 0 && e0 === 0 && c0 === 0 && h0 === 0 && G0 === 1 && D0 === 0 && A0 === 0 && f0 === 0 && T0 === 0 && F0 === 1 && $0 === 0)
49384
49384
  return r0[12] = r0[12] * Ft + r0[15] * q0, r0[13] = r0[13] * G0 + r0[15] * Si, r0[14] = r0[14] * F0 + r0[15] * zi, r0[15] *= wi, this._identityCalculated = !1, this;
49385
- var w0 = r0[0], V0 = r0[1], U0 = r0[2], N0 = r0[3], J0 = r0[4], b0 = r0[5], L0 = r0[6], K0 = r0[7], H0 = r0[8], n0 = r0[9], qt = r0[10], d0 = r0[11], g0 = r0[12], I0 = r0[13], C0 = r0[14], Ti = r0[15];
49386
- return r0[0] = w0 * Ft + V0 * h0 + U0 * f0 + N0 * q0, r0[1] = w0 * Wt + V0 * G0 + U0 * T0 + N0 * Si, r0[2] = w0 * e0 + V0 * D0 + U0 * F0 + N0 * zi, r0[3] = w0 * c0 + V0 * A0 + U0 * $0 + N0 * wi, r0[4] = J0 * Ft + b0 * h0 + L0 * f0 + K0 * q0, r0[5] = J0 * Wt + b0 * G0 + L0 * T0 + K0 * Si, r0[6] = J0 * e0 + b0 * D0 + L0 * F0 + K0 * zi, r0[7] = J0 * c0 + b0 * A0 + L0 * $0 + K0 * wi, r0[8] = H0 * Ft + n0 * h0 + qt * f0 + d0 * q0, r0[9] = H0 * Wt + n0 * G0 + qt * T0 + d0 * Si, r0[10] = H0 * e0 + n0 * D0 + qt * F0 + d0 * zi, r0[11] = H0 * c0 + n0 * A0 + qt * $0 + d0 * wi, r0[12] = g0 * Ft + I0 * h0 + C0 * f0 + Ti * q0, r0[13] = g0 * Wt + I0 * G0 + C0 * T0 + Ti * Si, r0[14] = g0 * e0 + I0 * D0 + C0 * F0 + Ti * zi, r0[15] = g0 * c0 + I0 * A0 + C0 * $0 + Ti * wi, this._identityCalculated = !1, this;
49385
+ var w0 = r0[0], P0 = r0[1], U0 = r0[2], N0 = r0[3], J0 = r0[4], b0 = r0[5], L0 = r0[6], K0 = r0[7], H0 = r0[8], n0 = r0[9], qt = r0[10], d0 = r0[11], g0 = r0[12], I0 = r0[13], C0 = r0[14], Ti = r0[15];
49386
+ return r0[0] = w0 * Ft + P0 * h0 + U0 * f0 + N0 * q0, r0[1] = w0 * Wt + P0 * G0 + U0 * T0 + N0 * Si, r0[2] = w0 * e0 + P0 * D0 + U0 * F0 + N0 * zi, r0[3] = w0 * c0 + P0 * A0 + U0 * $0 + N0 * wi, r0[4] = J0 * Ft + b0 * h0 + L0 * f0 + K0 * q0, r0[5] = J0 * Wt + b0 * G0 + L0 * T0 + K0 * Si, r0[6] = J0 * e0 + b0 * D0 + L0 * F0 + K0 * zi, r0[7] = J0 * c0 + b0 * A0 + L0 * $0 + K0 * wi, r0[8] = H0 * Ft + n0 * h0 + qt * f0 + d0 * q0, r0[9] = H0 * Wt + n0 * G0 + qt * T0 + d0 * Si, r0[10] = H0 * e0 + n0 * D0 + qt * F0 + d0 * zi, r0[11] = H0 * c0 + n0 * A0 + qt * $0 + d0 * wi, r0[12] = g0 * Ft + I0 * h0 + C0 * f0 + Ti * q0, r0[13] = g0 * Wt + I0 * G0 + C0 * T0 + Ti * Si, r0[14] = g0 * e0 + I0 * D0 + C0 * F0 + Ti * zi, r0[15] = g0 * c0 + I0 * A0 + C0 * $0 + Ti * wi, this._identityCalculated = !1, this;
49387
49387
  }
49388
49388
  function Ue() {
49389
49389
  return this._identityCalculated || (this._identity = !(this.props[0] !== 1 || this.props[1] !== 0 || this.props[2] !== 0 || this.props[3] !== 0 || this.props[4] !== 0 || this.props[5] !== 1 || this.props[6] !== 0 || this.props[7] !== 0 || this.props[8] !== 0 || this.props[9] !== 0 || this.props[10] !== 1 || this.props[11] !== 0 || this.props[12] !== 0 || this.props[13] !== 0 || this.props[14] !== 0 || this.props[15] !== 1), this._identityCalculated = !0), this._identity;
@@ -51763,7 +51763,7 @@ if (typeof document != "undefined") {
51763
51763
  Re = Pe.length, Se = 0, ve = 0;
51764
51764
  var i0 = v.finalSize * 1.2 * 0.714, Yt = !0, Kt, Ft, Wt, e0, c0;
51765
51765
  e0 = r.length;
51766
- var h0, G0 = -1, D0, A0, f0, T0 = ke, F0 = at, $0 = lt, q0 = -1, Si, zi, wi, r0, w0, V0, U0, N0, J0 = "", b0 = this.defaultPropsArray, L0;
51766
+ var h0, G0 = -1, D0, A0, f0, T0 = ke, F0 = at, $0 = lt, q0 = -1, Si, zi, wi, r0, w0, P0, U0, N0, J0 = "", b0 = this.defaultPropsArray, L0;
51767
51767
  if (v.j === 2 || v.j === 1) {
51768
51768
  var K0 = 0, H0 = 0, n0 = v.j === 2 ? -0.5 : -1, qt = 0, d0 = !0;
51769
51769
  for (Ce = 0; Ce < Re; Ce += 1)
@@ -51781,7 +51781,7 @@ if (typeof document != "undefined") {
51781
51781
  }
51782
51782
  for (Ce = 0; Ce < Re; Ce += 1) {
51783
51783
  if (_.reset(), Si = 1, Pe[Ce].n)
51784
- Se = 0, ve += v.yOffset, ve += Yt ? 1 : 0, ke = T0, Yt = !1, this._hasMaskedPath && (at = F0, lt = $0, dt = ut[at].points, ht = dt[lt - 1], ct = dt[lt], xt = ct.partialLength, Ue = 0), J0 = "", N0 = "", V0 = "", L0 = "", b0 = this.defaultPropsArray;
51784
+ Se = 0, ve += v.yOffset, ve += Yt ? 1 : 0, ke = T0, Yt = !1, this._hasMaskedPath && (at = F0, lt = $0, dt = ut[at].points, ht = dt[lt - 1], ct = dt[lt], xt = ct.partialLength, Ue = 0), J0 = "", N0 = "", P0 = "", L0 = "", b0 = this.defaultPropsArray;
51785
51785
  else {
51786
51786
  if (this._hasMaskedPath) {
51787
51787
  if (q0 !== Pe[Ce].line) {
@@ -51823,7 +51823,7 @@ if (typeof document != "undefined") {
51823
51823
  }
51824
51824
  for (Wt = 0; Wt < e0; Wt += 1)
51825
51825
  Kt = r[Wt].a, Kt.p.propType && (Ft = r[Wt].s, h0 = Ft.getMult(Pe[Ce].anIndexes[Wt], C.a[Wt].s.totalChars), this._hasMaskedPath ? h0.length ? _.translate(0, Kt.p.v[1] * h0[0], -Kt.p.v[2] * h0[1]) : _.translate(0, Kt.p.v[1] * h0, -Kt.p.v[2] * h0) : h0.length ? _.translate(Kt.p.v[0] * h0[0], Kt.p.v[1] * h0[1], -Kt.p.v[2] * h0[2]) : _.translate(Kt.p.v[0] * h0, Kt.p.v[1] * h0, -Kt.p.v[2] * h0));
51826
- if (v.strokeWidthAnim && (V0 = wi < 0 ? 0 : wi), v.strokeColorAnim && (U0 = "rgb(" + Math.round(zi[0] * 255) + "," + Math.round(zi[1] * 255) + "," + Math.round(zi[2] * 255) + ")"), v.fillColorAnim && v.fc && (N0 = "rgb(" + Math.round(r0[0] * 255) + "," + Math.round(r0[1] * 255) + "," + Math.round(r0[2] * 255) + ")"), this._hasMaskedPath) {
51826
+ if (v.strokeWidthAnim && (P0 = wi < 0 ? 0 : wi), v.strokeColorAnim && (U0 = "rgb(" + Math.round(zi[0] * 255) + "," + Math.round(zi[1] * 255) + "," + Math.round(zi[2] * 255) + ")"), v.fillColorAnim && v.fc && (N0 = "rgb(" + Math.round(r0[0] * 255) + "," + Math.round(r0[1] * 255) + "," + Math.round(r0[2] * 255) + ")"), this._hasMaskedPath) {
51827
51827
  if (_.translate(0, -v.ls), _.translate(0, n[1] * i0 * 0.01 + ve, 0), this._pathData.p.v) {
51828
51828
  Zt = (ct.point[1] - ht.point[1]) / (ct.point[0] - ht.point[0]);
51829
51829
  var I0 = Math.atan(Zt) * 180 / Math.PI;
@@ -51843,7 +51843,7 @@ if (typeof document != "undefined") {
51843
51843
  }
51844
51844
  I === "html" ? J0 = _.toCSS() : I === "svg" ? J0 = _.to2dCSS() : b0 = [_.props[0], _.props[1], _.props[2], _.props[3], _.props[4], _.props[5], _.props[6], _.props[7], _.props[8], _.props[9], _.props[10], _.props[11], _.props[12], _.props[13], _.props[14], _.props[15]], L0 = Si;
51845
51845
  }
51846
- O <= Ce ? (c0 = new LetterProps(L0, V0, U0, N0, J0, b0), this.renderedLetters.push(c0), O += 1, this.lettersChangedFlag = !0) : (c0 = this.renderedLetters[Ce], this.lettersChangedFlag = c0.update(L0, V0, U0, N0, J0, b0) || this.lettersChangedFlag);
51846
+ O <= Ce ? (c0 = new LetterProps(L0, P0, U0, N0, J0, b0), this.renderedLetters.push(c0), O += 1, this.lettersChangedFlag = !0) : (c0 = this.renderedLetters[Ce], this.lettersChangedFlag = c0.update(L0, P0, U0, N0, J0, b0) || this.lettersChangedFlag);
51847
51847
  }
51848
51848
  }
51849
51849
  }, TextAnimatorProperty.prototype.getValue = function() {
@@ -57794,7 +57794,7 @@ class Point extends pt {
57794
57794
  });
57795
57795
  }
57796
57796
  create() {
57797
- return E0(this, null, function* () {
57797
+ return V0(this, null, function* () {
57798
57798
  const { sprite: n } = this.options, r = this.getMaterial();
57799
57799
  n ? this.createSprite(r) : this.createMesh(new PlaneGeometry(1, 1), r), this.setScale(1), this.object3d.scale.multiplyScalar(0.1);
57800
57800
  });
@@ -57870,7 +57870,7 @@ class Arc extends pt {
57870
57870
  };
57871
57871
  }
57872
57872
  create() {
57873
- return E0(this, null, function* () {
57873
+ return V0(this, null, function* () {
57874
57874
  map || (map = getLineTexture(0.5));
57875
57875
  const { color: n, lineWidth: r, globe: C } = this.options;
57876
57876
  let { radius: _ } = this.options;
@@ -57898,7 +57898,7 @@ class Arc extends pt {
57898
57898
  { key: "Arc_第一控制点", position: Se.v1 },
57899
57899
  { key: "Arc_第二控制点", position: Se.v2 },
57900
57900
  { key: "Arc_终点", position: Se.v3 }
57901
- ].map((lt) => E0(this, [lt], function* ({ key: Ue, position: Ne }) {
57901
+ ].map((lt) => V0(this, [lt], function* ({ key: Ue, position: Ne }) {
57902
57902
  const at = yield Ce.draw("Group", {}, this);
57903
57903
  return at.position.copy(Ne), at.userData.disabledC = !0, at.userData.disabledR = !0, at.userData.disabledProcessedChildren = !0, Ce.updateBaseObjectKey(at, `${Ue}_${this.options.key}`), at;
57904
57904
  }))
@@ -57912,7 +57912,7 @@ class Arc extends pt {
57912
57912
  });
57913
57913
  }
57914
57914
  instantiate() {
57915
- return E0(this, null, function* () {
57915
+ return V0(this, null, function* () {
57916
57916
  this.update();
57917
57917
  const n = yield this.line.instantiate({
57918
57918
  recursive: !1
@@ -57931,7 +57931,7 @@ class Arc extends pt {
57931
57931
  this.line.options.nodes = Se, this.line.setGeometry(Se, _), this.pickTube && this.addPickTarget(this.pickTube.options.radius);
57932
57932
  }
57933
57933
  addPickTarget(n = 1, r = !1) {
57934
- return E0(this, null, function* () {
57934
+ return V0(this, null, function* () {
57935
57935
  const C = this.pickTube, _ = this.pencil.lead, I = this.line.options.nodes, O = new CurvePath();
57936
57936
  for (let Ce = 0; Ce < I.length - 1; Ce++)
57937
57937
  O.add(new LineCurve3(I[Ce], I[Ce + 1]));
@@ -58009,7 +58009,7 @@ class CrossPlane extends pt {
58009
58009
  this.options = B0({}, n);
58010
58010
  }
58011
58011
  create() {
58012
- return E0(this, null, function* () {
58012
+ return V0(this, null, function* () {
58013
58013
  this.createGroup();
58014
58014
  const n = this.options.material || new MeshBasicMaterial({
58015
58015
  color: "#ffffff",
@@ -58039,7 +58039,7 @@ class CrossPlane extends pt {
58039
58039
  }
58040
58040
  class PlaneShadow extends pt {
58041
58041
  create() {
58042
- return E0(this, null, function* () {
58042
+ return V0(this, null, function* () {
58043
58043
  const e = new PlaneGeometry(100, 100, 2, 2), n = new ShadowMaterial();
58044
58044
  n.opacity = 0.5, n.depthWrite = !1, this.createMesh(e, n), this.object3d.receiveShadow = !0, this.position.z = 0.1, this.object3d.name = "阴影接受";
58045
58045
  });
@@ -58059,7 +58059,7 @@ class Model extends pt {
58059
58059
  }, n);
58060
58060
  }
58061
58061
  create() {
58062
- return E0(this, null, function* () {
58062
+ return V0(this, null, function* () {
58063
58063
  const n = this.pencil.loader, r = this.options.src, C = yield n.load(r, {
58064
58064
  type: "gltf",
58065
58065
  cache: !1
@@ -59743,7 +59743,7 @@ class SetMaterialVector extends Command {
59743
59743
  class SetMaterialMapVector extends Command {
59744
59744
  constructor(e, n, r, C, _, I = "repeat") {
59745
59745
  var O, Se, ve, Ce;
59746
- super(e), this.type = "SetMaterialMapVector", this.attributeName2 = I, this.name = `Set Material.${r}.${I}`, this.updatable = !0, this.object = n, this.materialSlot = _, this.material = this.editor.getObjectMaterial(n, _), this.material instanceof _e$1 && r === "map" && I === "repeat" ? this.oldValue = this.material.repeat.toArray() : ((Se = (O = this.material) == null ? void 0 : O[r]) == null ? void 0 : Se[I]) instanceof Vector2 ? this.oldValue = this.material[r][I].toArray() : typeof ((Ce = (ve = this.material) == null ? void 0 : ve[r]) == null ? void 0 : Ce[I]) != "undefined" && (this.oldValue = this.material[r][I]), this.newValue = C, this.attributeName = r;
59746
+ super(e), this.type = "SetMaterialMapVector", this.attributeName2 = I, this.name = `Set Material.${r}.${I}`, this.updatable = !0, this.object = n, this.materialSlot = _, n != null && n.isScene ? this.material = n[_] : this.material = this.editor.getObjectMaterial(n, _), this.material instanceof _e$1 && r === "map" && I === "repeat" ? this.oldValue = this.material.repeat.toArray() : ((Se = (O = this.material) == null ? void 0 : O[r]) == null ? void 0 : Se[I]) instanceof Vector2 ? this.oldValue = this.material[r][I].toArray() : typeof ((Ce = (ve = this.material) == null ? void 0 : ve[r]) == null ? void 0 : Ce[I]) != "undefined" && (this.oldValue = this.material[r][I]), this.newValue = C, this.attributeName = r;
59747
59747
  }
59748
59748
  execute() {
59749
59749
  var e, n, r, C, _;
@@ -59769,7 +59769,8 @@ class SetMaterialMapVector extends Command {
59769
59769
  return e.objectUuid = this.editor.uuidByMaterialObject(this.object), e.materialSlot = this.materialSlot, e.attributeName = this.attributeName, e.attributeName2 = this.attributeName2, e.oldValue = this.oldValue, e.newValue = this.newValue, e;
59770
59770
  }
59771
59771
  fromJSON(e) {
59772
- super.fromJSON(e), this.object = this.editor.materialObjectByUuid(e.objectUuid), this.materialSlot = e.materialSlot, this.material = this.editor.getObjectMaterial(
59772
+ var n;
59773
+ super.fromJSON(e), this.object = this.editor.materialObjectByUuid(e.objectUuid), this.materialSlot = e.materialSlot, (n = this.object) != null && n.isScene ? this.material = this.object[e.materialSlot] : this.material = this.editor.getObjectMaterial(
59773
59774
  this.object,
59774
59775
  this.materialSlot
59775
59776
  ), this.attributeName = e.attributeName, e.attributeName2 && (this.attributeName2 = e.attributeName2), this.oldValue = e.oldValue, this.newValue = e.newValue, this.attributeName === "repeat" && (this.attributeName = "map");
@@ -59864,8 +59865,17 @@ class SetValue extends Command {
59864
59865
  this.oldValue = I !== void 0 ? I[r] : void 0, this.newValue = C;
59865
59866
  }
59866
59867
  execute() {
59867
- const e = this.properties ? this.object[this.properties] : this.object;
59868
- e && ((e instanceof RectAreaLight || e instanceof AmbientLight) && this.attributeName === "castShadow" || (e[this.attributeName] = this.newValue, this.fixObj(), this.editor.emit("objectChanged", this.object)));
59868
+ return V0(this, null, function* () {
59869
+ const e = this.properties ? this.object[this.properties] : this.object;
59870
+ if (e && !((e instanceof RectAreaLight || e instanceof AmbientLight) && this.attributeName === "castShadow")) {
59871
+ if (this.attributeName === "keepCamera" && Array.isArray(this.newValue)) {
59872
+ const [n, ...r] = this.newValue;
59873
+ yield this.editor.viewport.vis.lookAt(...r, !1), e[this.attributeName] = n;
59874
+ } else
59875
+ e[this.attributeName] = this.newValue;
59876
+ this.fixObj(), this.editor.emit("objectChanged", this.object);
59877
+ }
59878
+ });
59869
59879
  }
59870
59880
  fixObj() {
59871
59881
  const e = this.properties ? this.object[this.properties] : this.object;
@@ -59878,8 +59888,15 @@ class SetValue extends Command {
59878
59888
  (this.attributeName === "name" || this.attributeName === "prefab" || this.attributeName === "visible" || this.attributeName === "keepCamera" || this.attributeName === "castShadow" && this.object instanceof DirectionalLight) && this.editor.emit("baseObjectListChange"), this.attributeName === "keepCamera" && (this.editor.select(null), this.editor.emit("baseObjectListChange"));
59879
59889
  }
59880
59890
  undo() {
59881
- const e = this.properties ? this.object[this.properties] : this.object;
59882
- e[this.attributeName] = this.oldValue, this.fixObj(), this.editor.emit("objectChanged", this.object);
59891
+ return V0(this, null, function* () {
59892
+ const e = this.properties ? this.object[this.properties] : this.object;
59893
+ if (this.attributeName === "keepCamera" && Array.isArray(this.oldValue)) {
59894
+ const [n, ...r] = this.oldValue;
59895
+ yield this.editor.viewport.vis.lookAt(...r, !1), e[this.attributeName] = n;
59896
+ } else
59897
+ e[this.attributeName] = this.oldValue;
59898
+ this.fixObj(), this.editor.emit("objectChanged", this.object);
59899
+ });
59883
59900
  }
59884
59901
  update(e) {
59885
59902
  this.newValue = e.newValue;
@@ -59927,7 +59944,7 @@ class AddVis extends Command {
59927
59944
  this.type = "AddVis", this.visType = r, this.visOptions = C, r !== void 0 && (this.name = `Add Vis: ${r}`);
59928
59945
  }
59929
59946
  execute() {
59930
- return E0(this, null, function* () {
59947
+ return V0(this, null, function* () {
59931
59948
  yield this.editor.viewport.setVis(this.visType, this.visOptions), this.editor.select(null);
59932
59949
  });
59933
59950
  }
@@ -59953,7 +59970,7 @@ class AddObject extends Command {
59953
59970
  this.type = "AddObject", this.objectType = r, this.objectOptions = C, r !== void 0 && (this.name = `Add Object: ${r}`);
59954
59971
  }
59955
59972
  execute() {
59956
- return E0(this, null, function* () {
59973
+ return V0(this, null, function* () {
59957
59974
  var r;
59958
59975
  const n = this.editor.viewport.vis;
59959
59976
  this.obj = yield n.lead.draw(this.objectType, Yi(B0({}, this.objectOptions), {
@@ -59989,7 +60006,7 @@ class RemoveObject extends Command {
59989
60006
  }), this.object.objectType === "BaseObject#Model" && this.object.stopAllClips()), this.editor.emit("baseObjectListChange"), this.editor.select(null);
59990
60007
  }
59991
60008
  undo() {
59992
- return E0(this, null, function* () {
60009
+ return V0(this, null, function* () {
59993
60010
  this.object.show(), this.object.mList.addBaseObjectMap(this.object), delete this.object.userData.selectHide, this.object.objectType === "BaseObject#Model" && this.object.playAllClips(), this.editor.emit("baseObjectListChange");
59994
60011
  });
59995
60012
  }
@@ -60011,7 +60028,7 @@ class CopyObject extends Command {
60011
60028
  this.type = "CopyObject", this.name = "Copy Object", this.object = r;
60012
60029
  }
60013
60030
  execute() {
60014
- return E0(this, null, function* () {
60031
+ return V0(this, null, function* () {
60015
60032
  var _;
60016
60033
  const n = this.editor.viewport.vis, r = this.object.key, C = yield this.object.instantiate({
60017
60034
  key: `${this.id}`
@@ -60020,7 +60037,7 @@ class CopyObject extends Command {
60020
60037
  });
60021
60038
  }
60022
60039
  undo() {
60023
- return E0(this, null, function* () {
60040
+ return V0(this, null, function* () {
60024
60041
  var n;
60025
60042
  (n = this.copyObject) == null || n.erase(), this.editor.select(null);
60026
60043
  });
@@ -60056,13 +60073,13 @@ class SetObjectMaterial extends Command {
60056
60073
  ), this.newValue = _;
60057
60074
  }
60058
60075
  execute() {
60059
- return E0(this, null, function* () {
60076
+ return V0(this, null, function* () {
60060
60077
  const r = this.editor.pencil.mList.get(this.newValue);
60061
60078
  r && (this.editor.setObjectMaterial(this.object, this.materialSlot, r), this.playVideo(r), this.editor.emit("materialChanged", this.object));
60062
60079
  });
60063
60080
  }
60064
60081
  undo() {
60065
- return E0(this, null, function* () {
60082
+ return V0(this, null, function* () {
60066
60083
  const n = this.oldMaterial;
60067
60084
  this.editor.setObjectMaterial(this.object, this.materialSlot, n), this.playVideo(n), this.editor.emit("materialChanged", this.object);
60068
60085
  });
@@ -60121,7 +60138,7 @@ class AddMaterial extends Command {
60121
60138
  this.type = "AddMaterial", this.name = "Add Material", this.materialType = r, this.object = C, this.materialSlot = _;
60122
60139
  }
60123
60140
  execute() {
60124
- return E0(this, null, function* () {
60141
+ return V0(this, null, function* () {
60125
60142
  this.addObjectUuid = `material_${this.id}`;
60126
60143
  const n = this.editor.pencil.mList;
60127
60144
  let r;
@@ -60156,7 +60173,7 @@ class AddMaterial extends Command {
60156
60173
  });
60157
60174
  }
60158
60175
  undo() {
60159
- return E0(this, null, function* () {
60176
+ return V0(this, null, function* () {
60160
60177
  this.setMaterialCommand && (yield this.setMaterialCommand.undo()), this.editor.pencil.mList.remove(this.addObjectUuid), this.flag && this.editor.emit("materialChanged");
60161
60178
  });
60162
60179
  }
@@ -60180,14 +60197,14 @@ class CopyMaterial extends Command {
60180
60197
  this.type = "CopyMaterial", this.name = "Copy Material", this.objectUuid = r;
60181
60198
  }
60182
60199
  execute() {
60183
- return E0(this, null, function* () {
60200
+ return V0(this, null, function* () {
60184
60201
  this.copyObjectUuid = `material_${this.id}`, this.editor.pencil.mList.copy(this.objectUuid, this.copyObjectUuid, {
60185
60202
  name: `材质_${this.id}`
60186
60203
  });
60187
60204
  });
60188
60205
  }
60189
60206
  undo() {
60190
- return E0(this, null, function* () {
60207
+ return V0(this, null, function* () {
60191
60208
  this.editor.pencil.mList.remove(this.copyObjectUuid);
60192
60209
  });
60193
60210
  }
@@ -60211,13 +60228,13 @@ class RemoveMaterial extends Command {
60211
60228
  this.type = "RemoveMaterial", this.name = "Remove Material", this.objectUuid = r;
60212
60229
  }
60213
60230
  execute() {
60214
- return E0(this, null, function* () {
60231
+ return V0(this, null, function* () {
60215
60232
  const n = this.editor.pencil.mList;
60216
60233
  this.material = n.get(this.objectUuid), n.remove(this.objectUuid);
60217
60234
  });
60218
60235
  }
60219
60236
  undo() {
60220
- return E0(this, null, function* () {
60237
+ return V0(this, null, function* () {
60221
60238
  const n = this.editor.pencil.mList;
60222
60239
  this.material && n.add(this.objectUuid, this.material);
60223
60240
  });
@@ -60243,13 +60260,13 @@ class SetSetting extends Command {
60243
60260
  this.type = "SetSetting", this.updatable = !0, this.name = `Set Setting.${r}`, this.attributeName = r, this.newValue = C, n.viewport.vis && (this.oldValue = n.viewport.vis.settings[r]);
60244
60261
  }
60245
60262
  execute() {
60246
- return E0(this, null, function* () {
60263
+ return V0(this, null, function* () {
60247
60264
  const n = this.editor.viewport.vis;
60248
60265
  n.settings[this.attributeName] = this.newValue, yield n.settings[this.attributeName], this.editor.emit("settingsChanged");
60249
60266
  });
60250
60267
  }
60251
60268
  undo() {
60252
- return E0(this, null, function* () {
60269
+ return V0(this, null, function* () {
60253
60270
  const n = this.editor.viewport.vis;
60254
60271
  n.settings[this.attributeName] = this.oldValue, yield n.settings[this.attributeName], this.editor.emit("settingsChanged");
60255
60272
  });
@@ -60392,7 +60409,7 @@ class History {
60392
60409
  return !(e != null && e.updatable) || !(n != null && n.updatable) || r >= COMMAND_UPDATE_THRESHOLD ? !1 : e.object === n.object && e.objectUuid === n.objectUuid && e.type === n.type && e.attributeName === n.attributeName && e.attributeName2 === n.attributeName2 && e.name === n.name && e.materialSlot === n.materialSlot;
60393
60410
  }
60394
60411
  execute(e, n) {
60395
- return E0(this, null, function* () {
60412
+ return V0(this, null, function* () {
60396
60413
  const r = this.undos[this.undos.length - 1], C = Date.now() - this.lastCmdTime;
60397
60414
  this.canMergeCommands(r, e, C) ? (r.update(e), e = r) : (this.undos.push(e), e.id = ++this.idCounter), e.name = n !== void 0 ? n : e.name;
60398
60415
  try {
@@ -60541,7 +60558,7 @@ class History {
60541
60558
  return new Promise((n, r) => {
60542
60559
  const C = [...this.undos], _ = C.length;
60543
60560
  let I = 0;
60544
- const O = () => E0(this, null, function* () {
60561
+ const O = () => V0(this, null, function* () {
60545
60562
  const Se = performance.now();
60546
60563
  for (; C.length > 0 && performance.now() - Se < e; ) {
60547
60564
  if (this.editor._dispose) {
@@ -60571,7 +60588,7 @@ class History {
60571
60588
  * 执行单个撤销命令
60572
60589
  */
60573
60590
  executeUndo(e) {
60574
- return E0(this, null, function* () {
60591
+ return V0(this, null, function* () {
60575
60592
  if (!(e != null && e.json)) {
60576
60593
  console.warn("Invalid undo command:", e);
60577
60594
  return;
@@ -60697,7 +60714,7 @@ class Viewport {
60697
60714
  this.vis.setSaveCamera(e), (n = this.vis.pencil.controls) == null || n.saveState(), this.cameraState = B0({}, (r = this.vis) == null ? void 0 : r.cameraState), this.editor.emit("cameraStateChanged");
60698
60715
  }
60699
60716
  addVis(r) {
60700
- return E0(this, arguments, function* (e, n = {}) {
60717
+ return V0(this, arguments, function* (e, n = {}) {
60701
60718
  this.replaceVis() && (yield this.editor.execute(new AddVis(this.editor, e, n)));
60702
60719
  });
60703
60720
  }
@@ -60709,7 +60726,7 @@ class Viewport {
60709
60726
  return !0;
60710
60727
  }
60711
60728
  setVis(r) {
60712
- return E0(this, arguments, function* (e, n = {}) {
60729
+ return V0(this, arguments, function* (e, n = {}) {
60713
60730
  if (!this.options.visFactories && (this.editor.setViewportVis(e), !this.options.visFactories)) {
60714
60731
  console.error("visFactories is not defined");
60715
60732
  return;
@@ -60770,13 +60787,13 @@ class Viewport {
60770
60787
  });
60771
60788
  }
60772
60789
  addObj(r) {
60773
- return E0(this, arguments, function* (e, n = {}) {
60790
+ return V0(this, arguments, function* (e, n = {}) {
60774
60791
  const C = objs$3[e].getInitOptions;
60775
60792
  C && Object.assign(n, C(this.vis.pencil, n)), yield this.editor.execute(new AddObject(this.editor, e, n));
60776
60793
  });
60777
60794
  }
60778
60795
  removeObj(e) {
60779
- return E0(this, null, function* () {
60796
+ return V0(this, null, function* () {
60780
60797
  const { vis: n } = this;
60781
60798
  if (!n || !e)
60782
60799
  return;
@@ -60798,7 +60815,7 @@ class Viewport {
60798
60815
  this.copyObjKey = void 0;
60799
60816
  }
60800
60817
  pasteObj() {
60801
- return E0(this, null, function* () {
60818
+ return V0(this, null, function* () {
60802
60819
  const { vis: e } = this;
60803
60820
  if (!e || !this.copyObjKey)
60804
60821
  return;
@@ -60807,7 +60824,7 @@ class Viewport {
60807
60824
  });
60808
60825
  }
60809
60826
  copyMListMaterial(e) {
60810
- return E0(this, null, function* () {
60827
+ return V0(this, null, function* () {
60811
60828
  const { vis: n } = this;
60812
60829
  if (!n)
60813
60830
  return;
@@ -60820,12 +60837,12 @@ class Viewport {
60820
60837
  });
60821
60838
  }
60822
60839
  clearCopyMListMaterial() {
60823
- return E0(this, null, function* () {
60840
+ return V0(this, null, function* () {
60824
60841
  yield del("copyMaterial");
60825
60842
  });
60826
60843
  }
60827
60844
  pasteMListMaterial() {
60828
- return E0(this, null, function* () {
60845
+ return V0(this, null, function* () {
60829
60846
  const { vis: e } = this;
60830
60847
  if (!e)
60831
60848
  return;
@@ -60834,7 +60851,7 @@ class Viewport {
60834
60851
  });
60835
60852
  }
60836
60853
  pasteMListMaterial2Replace(e) {
60837
- return E0(this, null, function* () {
60854
+ return V0(this, null, function* () {
60838
60855
  const { vis: n } = this;
60839
60856
  if (!n)
60840
60857
  return;
@@ -60857,7 +60874,7 @@ class Viewport {
60857
60874
  C && this.editor.execute(new AddMaterial(this.editor, e, n, r));
60858
60875
  }
60859
60876
  removeMListMaterial(e) {
60860
- return E0(this, null, function* () {
60877
+ return V0(this, null, function* () {
60861
60878
  const { vis: n } = this;
60862
60879
  n && this.editor.execute(new RemoveMaterial(this.editor, e));
60863
60880
  });
@@ -61001,7 +61018,7 @@ class Editor {
61001
61018
  });
61002
61019
  }
61003
61020
  const Ce = O.object3d;
61004
- if (Ce.isDirectionalLight && O.object3d.castShadow) {
61021
+ if (Ce.isDirectionalLight) {
61005
61022
  const dt = O.options.type;
61006
61023
  Se.unshift({
61007
61024
  key: O.key.replace(dt, dt + "Shadow"),
@@ -61072,12 +61089,12 @@ class Editor {
61072
61089
  this.emit("mListGraphChanged");
61073
61090
  }
61074
61091
  execute(e, n) {
61075
- return E0(this, null, function* () {
61092
+ return V0(this, null, function* () {
61076
61093
  yield this.history.execute(e, n);
61077
61094
  });
61078
61095
  }
61079
61096
  fromJSON(e, n) {
61080
- return E0(this, null, function* () {
61097
+ return V0(this, null, function* () {
61081
61098
  var r, C, _, I;
61082
61099
  try {
61083
61100
  n && !y$1(n) ? console.warn(
@@ -61114,7 +61131,7 @@ class Editor {
61114
61131
  });
61115
61132
  }
61116
61133
  appendJSON(e) {
61117
- return E0(this, null, function* () {
61134
+ return V0(this, null, function* () {
61118
61135
  let n;
61119
61136
  if (typeof e == "string") {
61120
61137
  const r = this.options.assetsPrefix + e;
@@ -61233,7 +61250,7 @@ class Camera extends Event {
61233
61250
  this.cameraState[n] = [C.x, C.y, C.z, _.x, _.y, _.z];
61234
61251
  }
61235
61252
  useSaveCamera(n, r = !1) {
61236
- return E0(this, null, function* () {
61253
+ return V0(this, null, function* () {
61237
61254
  const C = this.cameraState[n];
61238
61255
  return C ? (yield this.lookAt(
61239
61256
  C[0],
@@ -61247,7 +61264,7 @@ class Camera extends Event {
61247
61264
  });
61248
61265
  }
61249
61266
  lookAt(n, r, C, _, I, O, Se = !1, ve = 250) {
61250
- return E0(this, null, function* () {
61267
+ return V0(this, null, function* () {
61251
61268
  this.pencil.controls.smoothTime = ve / 1e3, yield this.pencil.controls.setLookAt(
61252
61269
  n,
61253
61270
  r,
@@ -61260,12 +61277,12 @@ class Camera extends Event {
61260
61277
  });
61261
61278
  }
61262
61279
  truck(n, r, C = !1, _ = 250) {
61263
- return E0(this, null, function* () {
61280
+ return V0(this, null, function* () {
61264
61281
  this.pencil.controls.smoothTime = _ / 1e3, this.pencil.controls.restThreshold = 0, yield this.pencil.controls.truck(n, r, C), this.pencil.controls.restThreshold = 25e-4, this.pencil.controls.smoothTime = 250 / 1e3;
61265
61282
  });
61266
61283
  }
61267
61284
  dollyTo(n, r = !1, C = 250) {
61268
- return E0(this, null, function* () {
61285
+ return V0(this, null, function* () {
61269
61286
  let _ = n;
61270
61287
  if (typeof _ == "string") {
61271
61288
  const [I, O] = _.split("=");
@@ -61279,7 +61296,7 @@ class Camera extends Event {
61279
61296
  return MathUtils.euclideanModulo(_ + Math.PI, C) - Math.PI;
61280
61297
  }
61281
61298
  lookAtTarget(n, r = !1, C = 250) {
61282
- return E0(this, null, function* () {
61299
+ return V0(this, null, function* () {
61283
61300
  this.pencil.controls.smoothTime = C / 1e3;
61284
61301
  const _ = this.pencil.controls.azimuthAngle, I = this.pencil.controls.polarAngle, O = this.pencil.controls.distance, Se = this.pencil.cameraTarget.clone(), ve = n.azimuthAngle || _, Ce = n.polarAngle || I, Re = n.distance || O, Pe = n.target || Se;
61285
61302
  yield Promise.all([
@@ -61316,7 +61333,7 @@ class Camera extends Event {
61316
61333
  });
61317
61334
  }
61318
61335
  resetCamera(n = !1, r = 250) {
61319
- return E0(this, null, function* () {
61336
+ return V0(this, null, function* () {
61320
61337
  this.pencil.controls.smoothTime = r / 1e3, yield this.pencil.controls.reset(n), this.pencil.controls.smoothTime = 250 / 1e3;
61321
61338
  });
61322
61339
  }
@@ -61431,20 +61448,20 @@ class Base extends Camera {
61431
61448
  loaderAdd(...n) {
61432
61449
  }
61433
61450
  initMaterial(...n) {
61434
- return E0(this, null, function* () {
61451
+ return V0(this, null, function* () {
61435
61452
  });
61436
61453
  }
61437
61454
  initVis(...n) {
61438
- return E0(this, null, function* () {
61455
+ return V0(this, null, function* () {
61439
61456
  });
61440
61457
  }
61441
61458
  init(...n) {
61442
- return E0(this, null, function* () {
61459
+ return V0(this, null, function* () {
61443
61460
  yield this.initPencil(), this.loaderAdd(), console.time(`vis-core:time.${this.visName}-loader`), yield this.loader.loadAll(), console.timeEnd(`vis-core:time.${this.visName}-loader`), yield this.initMaterial(), yield this.initVis(), yield Promise.all(this.lead.objectsPromise);
61444
61461
  });
61445
61462
  }
61446
61463
  initPencil() {
61447
- return E0(this, null, function* () {
61464
+ return V0(this, null, function* () {
61448
61465
  var C, _, I, O, Se, ve, Ce, Re;
61449
61466
  if (this.pencil) return;
61450
61467
  const n = B0({}, this.options.pencilConfig);
@@ -61666,7 +61683,7 @@ class Base extends Camera {
61666
61683
  );
61667
61684
  }
61668
61685
  handleSetting(n, r) {
61669
- return E0(this, null, function* () {
61686
+ return V0(this, null, function* () {
61670
61687
  const { pencil: C } = this;
61671
61688
  if (n === "mouseWheel" || n === "mouseLeft" || n === "mouseRight") {
61672
61689
  const _ = n.replace("mouse", "").toLowerCase();
@@ -61689,7 +61706,7 @@ class Base extends Camera {
61689
61706
  this.showState && (this.lead.group.hide(), this.lead.prefabGroup.hide(), this.showState = !1, this.emit("hide"));
61690
61707
  }
61691
61708
  addCSS2D(C) {
61692
- return E0(this, arguments, function* (n, r = {}) {
61709
+ return V0(this, arguments, function* (n, r = {}) {
61693
61710
  typeof r == "string" && (r = { display: r }), r.display && (n.style.display = r.display);
61694
61711
  let _ = 0;
61695
61712
  typeof r.onTop != "undefined" && (_ = r.onTop);
@@ -61700,7 +61717,7 @@ class Base extends Camera {
61700
61717
  });
61701
61718
  }
61702
61719
  addCSS3D(C) {
61703
- return E0(this, arguments, function* (n, r = {}) {
61720
+ return V0(this, arguments, function* (n, r = {}) {
61704
61721
  r.display && (n.style.display = r.display);
61705
61722
  let _ = 0;
61706
61723
  typeof r.onTop != "undefined" && (_ = r.onTop);
@@ -139860,7 +139877,7 @@ class Building extends pt {
139860
139877
  this.options = B0({}, n);
139861
139878
  }
139862
139879
  create() {
139863
- return E0(this, null, function* () {
139880
+ return V0(this, null, function* () {
139864
139881
  const { json: n, projection: r, cacheKey: C, meters: _, grey: I, clip: O } = this.options, Se = this.pencil.mList, ve = this.pencil.getPlugin("worker"), Ce = this.pencil.lead, Re = I ? "-grey" : "";
139865
139882
  this.createGroup();
139866
139883
  const Pe = Se.getMultiple("building" + Re);
@@ -139916,7 +139933,7 @@ class Building extends pt {
139916
139933
  );
139917
139934
  }
139918
139935
  yield Promise.all(
139919
- Fe.map((ke) => E0(this, null, function* () {
139936
+ Fe.map((ke) => V0(this, null, function* () {
139920
139937
  const { h: ct, z: Ue } = ke.userData, Ne = ct + Ue, lt = Ne <= 20 ? "20" : Ne <= 60 ? "60" : "max";
139921
139938
  let at = this.options.material;
139922
139939
  at || (at = [Pe[lt + "Top"], Pe[lt + "Side"]]);
@@ -140003,7 +140020,7 @@ class Road extends pt {
140003
140020
  this.options = B0({}, n);
140004
140021
  }
140005
140022
  create() {
140006
- return E0(this, null, function* () {
140023
+ return V0(this, null, function* () {
140007
140024
  const { clip: n, grey: r } = this.options;
140008
140025
  this.createGroup();
140009
140026
  const C = this.pencil.getPlugin("worker"), _ = this.pencil.lead, I = this.pencil.mList, O = r ? "-grey" : "", { json: Se, projection: ve, cacheKey: Ce, meters: Re } = this.options;
@@ -140055,7 +140072,7 @@ class Road extends pt {
140055
140072
  );
140056
140073
  }
140057
140074
  yield Promise.all(
140058
- Pe.map((Fe, ke) => E0(this, null, function* () {
140075
+ Pe.map((Fe, ke) => V0(this, null, function* () {
140059
140076
  const ct = yield _.draw(
140060
140077
  "Line",
140061
140078
  {
@@ -140083,7 +140100,7 @@ class Area extends pt {
140083
140100
  this.options = B0({}, n);
140084
140101
  }
140085
140102
  create() {
140086
- return E0(this, null, function* () {
140103
+ return V0(this, null, function* () {
140087
140104
  this.createGroup();
140088
140105
  const { json: n, projection: r, type: C, cacheKey: _, material: I, oArr: O, clip: Se } = this.options, ve = this.pencil.getPlugin("worker"), Ce = this.pencil.lead;
140089
140106
  let Re = _ ? yield ve.getCachedGeometry({
@@ -140143,7 +140160,7 @@ class Area extends pt {
140143
140160
  );
140144
140161
  }
140145
140162
  yield Promise.all(
140146
- Re.map((Pe, Fe) => E0(this, null, function* () {
140163
+ Re.map((Pe, Fe) => V0(this, null, function* () {
140147
140164
  const { z: ke } = Pe.userData, ct = yield Ce.draw(
140148
140165
  "ExtrudePolygon",
140149
140166
  {
@@ -140635,7 +140652,7 @@ class CityPlane extends pt {
140635
140652
  }, n);
140636
140653
  }
140637
140654
  create() {
140638
- return E0(this, null, function* () {
140655
+ return V0(this, null, function* () {
140639
140656
  const { width: n, height: r, color: C, map: _, material: I } = this.options, O = new PlaneGeometry(n, r, 2, 2);
140640
140657
  this.plane = O;
140641
140658
  const Se = I || new MeshBasicMaterial({
@@ -140763,7 +140780,7 @@ class Target extends pt {
140763
140780
  return _.translateZ(1), _;
140764
140781
  }
140765
140782
  create() {
140766
- return E0(this, null, function* () {
140783
+ return V0(this, null, function* () {
140767
140784
  const { scale: n = 0.03 } = this.options;
140768
140785
  this.createGroup();
140769
140786
  const r = this.pencil.loader, C = "241, 241, 86", _ = r.getAsset("/image/city/cylinder.webp"), I = getCanvasTexture(C), O = this.createRipple(I);
@@ -141002,7 +141019,7 @@ class City$1 extends Base {
141002
141019
  );
141003
141020
  }
141004
141021
  initMaterial() {
141005
- return E0(this, null, function* () {
141022
+ return V0(this, null, function* () {
141006
141023
  if (this.options.showBuilding) {
141007
141024
  const n = ["20", "60", "max"].reduce(
141008
141025
  (C, _) => {
@@ -141118,7 +141135,7 @@ class City$1 extends Base {
141118
141135
  n && !n.enabled && (n.enabled = !0, console.log("enabledSSAO"));
141119
141136
  }
141120
141137
  init() {
141121
- return E0(this, null, function* () {
141138
+ return V0(this, null, function* () {
141122
141139
  const { jsonName: n, adcode: r } = this.options;
141123
141140
  yield this.initPencil(), this.loaderAdd(), this.loaderAddJson(n), console.time(`vis-core:time.${this.visName}${r}-loader`), yield this.loader.loadAll(), console.timeEnd(`vis-core:time.${this.visName}${r}-loader`), this.settings.mouseLeft = qi.SCREEN_PAN, yield this.settings.mouseLeft, this.pencil.camera.userData.up = "0,0,1", this.adcode = this.options.adcode, this.options.center && (this.pcenter = this.options.center), this.projection = f({
141124
141141
  center: this.pcenter,
@@ -141145,7 +141162,7 @@ class City$1 extends Base {
141145
141162
  return (C = (r = this.projection).invert) == null ? void 0 : C.call(r, [n.x, -n.z]);
141146
141163
  }
141147
141164
  fitTo(n, r = !0) {
141148
- return E0(this, null, function* () {
141165
+ return V0(this, null, function* () {
141149
141166
  this.pencil.controls.fitToBox(n.object3d, r), this.pencil.controls.rotatePolarTo(
141150
141167
  this.pencil.camera.up.z === 1 ? Math.PI / 180 * 70 : Math.PI / 180 * 160,
141151
141168
  r
@@ -141153,7 +141170,7 @@ class City$1 extends Base {
141153
141170
  });
141154
141171
  }
141155
141172
  initVis() {
141156
- return E0(this, null, function* () {
141173
+ return V0(this, null, function* () {
141157
141174
  const { fitTo: n, jsonName: r, planeOut: C } = this.options, _ = this.adcode, I = this.loader, O = this.options.showBuilding && I.getAsset(`/cityGzip/Building${r}.json.gzip`), Se = this.options.showRoad && I.getAsset(`/cityGzip/Road${r}.json.gzip`), ve = this.options.showRiver && I.getAsset(`/cityGzip/River${r}.json.gzip`), Ce = this.options.showGrassland && I.getAsset(`/cityGzip/Grassland${r}.json.gzip`), Re = {};
141158
141175
  [
141159
141176
  ...(ve == null ? void 0 : ve.features) || [],
@@ -141217,7 +141234,7 @@ class City$1 extends Base {
141217
141234
  });
141218
141235
  }
141219
141236
  fitToTarget(n, r) {
141220
- return E0(this, null, function* () {
141237
+ return V0(this, null, function* () {
141221
141238
  const C = this.lead.getObject("Target", {
141222
141239
  key: "cityTarget" + n
141223
141240
  });
@@ -141251,7 +141268,7 @@ class City$1 extends Base {
141251
141268
  });
141252
141269
  }
141253
141270
  drawBuilding() {
141254
- return E0(this, arguments, function* (n = {}) {
141271
+ return V0(this, arguments, function* (n = {}) {
141255
141272
  var _;
141256
141273
  if (!n.json) {
141257
141274
  console.warn(" json:Building");
@@ -141289,7 +141306,7 @@ class City$1 extends Base {
141289
141306
  });
141290
141307
  }
141291
141308
  drawArea() {
141292
- return E0(this, arguments, function* (n = {}) {
141309
+ return V0(this, arguments, function* (n = {}) {
141293
141310
  var O;
141294
141311
  if (!n.json) {
141295
141312
  console.warn(" json:drawGeography");
@@ -141330,7 +141347,7 @@ class City$1 extends Base {
141330
141347
  });
141331
141348
  }
141332
141349
  drawRoad() {
141333
- return E0(this, arguments, function* (n = {}) {
141350
+ return V0(this, arguments, function* (n = {}) {
141334
141351
  var I;
141335
141352
  if (!n.json) {
141336
141353
  console.warn(" json:Road");
@@ -141411,7 +141428,7 @@ class Countries extends pt {
141411
141428
  }, n);
141412
141429
  }
141413
141430
  create() {
141414
- return E0(this, null, function* () {
141431
+ return V0(this, null, function* () {
141415
141432
  const {
141416
141433
  geojson: n,
141417
141434
  mats: r,
@@ -141445,7 +141462,7 @@ class Countries extends pt {
141445
141462
  bbox: this.options.bbox,
141446
141463
  hasSide: C
141447
141464
  },
141448
- cb: (Ue) => E0(this, null, function* () {
141465
+ cb: (Ue) => V0(this, null, function* () {
141449
141466
  var lt, at;
141450
141467
  const Ne = yield Se.draw(
141451
141468
  "ConicPolygon",
@@ -141466,7 +141483,7 @@ class Countries extends pt {
141466
141483
  lineWidth: [1],
141467
141484
  coordinatesArr: ct.coords
141468
141485
  },
141469
- cb: (Ue) => E0(this, null, function* () {
141486
+ cb: (Ue) => V0(this, null, function* () {
141470
141487
  var lt;
141471
141488
  const Ne = yield Se.draw(
141472
141489
  "Line",
@@ -141495,7 +141512,7 @@ class SphereShadow extends pt {
141495
141512
  }, n);
141496
141513
  }
141497
141514
  create() {
141498
- return E0(this, null, function* () {
141515
+ return V0(this, null, function* () {
141499
141516
  const n = new SphereGeometry(this.options.radius, 128, 90), r = new MeshBasicMaterial();
141500
141517
  this.createMesh(n, r), this.scale.multiplyScalar(1.001), this.rotation.y = Math.PI / 180 * -90, this.object3d.name = "阴影面", this.hide();
141501
141518
  });
@@ -141510,7 +141527,7 @@ const objs$1 = Yi(B0({}, objs$3), {
141510
141527
  const { loader: e } = this;
141511
141528
  e.add(["/image/earth2/basic.jpg", "/image/earth2/NormalMap.jpg"]);
141512
141529
  }, v.initMaterial = function() {
141513
- return E0(this, null, function* () {
141530
+ return V0(this, null, function* () {
141514
141531
  const e = this.loader, n = e.getAsset("/image/earth2/basic.jpg"), r = e.getAsset("/image/earth2/NormalMap.jpg"), C = new MeshStandardMaterial({
141515
141532
  name: "地球材质",
141516
141533
  map: n,
@@ -141522,7 +141539,7 @@ const objs$1 = Yi(B0({}, objs$3), {
141522
141539
  this.mList.add("earthMaterial", C);
141523
141540
  });
141524
141541
  }, v.initVis = function() {
141525
- return E0(this, null, function* () {
141542
+ return V0(this, null, function* () {
141526
141543
  v.pencil.camera.near = 1, v.pencil.camera.far = 3e3, v.pencil.camera.fov = 12, v.pencil.camera.updateProjectionMatrix();
141527
141544
  const [e, n] = yield Promise.all([
141528
141545
  this.lead.draw("Light", {
@@ -141553,7 +141570,7 @@ const objs$1 = Yi(B0({}, objs$3), {
141553
141570
  "/image/earth/chinaNormal.webp"
141554
141571
  ]);
141555
141572
  }, v.initVis = function() {
141556
- return E0(this, null, function* () {
141573
+ return V0(this, null, function* () {
141557
141574
  yield this.initLight();
141558
141575
  const [, e, n, r] = yield Promise.all([
141559
141576
  this.lead.draw("Earth", {
@@ -141628,7 +141645,7 @@ const objs$1 = Yi(B0({}, objs$3), {
141628
141645
  ), yield this.pencil.controls.dollyTo(99.11560932366835, !1);
141629
141646
  });
141630
141647
  }, v.initMaterial = function() {
141631
- return E0(this, null, function* () {
141648
+ return V0(this, null, function* () {
141632
141649
  const e = this.loader, n = new MeshStandardMaterial({
141633
141650
  side: DoubleSide,
141634
141651
  name: "顶面",
@@ -141686,7 +141703,7 @@ const objs$1 = Yi(B0({}, objs$3), {
141686
141703
  };
141687
141704
  }, countryPlate = (v) => {
141688
141705
  v.initVis = function() {
141689
- return E0(this, null, function* () {
141706
+ return V0(this, null, function* () {
141690
141707
  yield this.initLight();
141691
141708
  const [, e] = yield Promise.all([
141692
141709
  this.lead.draw("Earth", {
@@ -141709,7 +141726,7 @@ const objs$1 = Yi(B0({}, objs$3), {
141709
141726
  this.map = e, yield this.pencil.controls.rotateTo(1.8041576242193995, 1.2232045720480524, !1), yield this.pencil.controls.dollyTo(99.11560932366835, !1), this.playing && (this.pencil.controls.minPolarAngle = this.pencil.controls.polarAngle, this.pencil.controls.maxPolarAngle = this.pencil.controls.polarAngle);
141710
141727
  });
141711
141728
  }, v.initMaterial = function() {
141712
- return E0(this, null, function* () {
141729
+ return V0(this, null, function* () {
141713
141730
  const e = new MeshStandardMaterial({
141714
141731
  side: DoubleSide,
141715
141732
  name: "侧面",
@@ -141768,7 +141785,7 @@ const objs$1 = Yi(B0({}, objs$3), {
141768
141785
  }, styles[this.options.style](this);
141769
141786
  }
141770
141787
  handleSetting(n, r) {
141771
- return E0(this, null, function* () {
141788
+ return V0(this, null, function* () {
141772
141789
  return yield yn(Zn.prototype, this, "handleSetting").call(this, n, r), n === "autoRotateSpeed" ? this.pencil.autoRotate(r) : n === "autoRotate" && (r ? this.settings.autoRotateSpeed = -20 : this.settings.autoRotateSpeed = 0), r;
141773
141790
  });
141774
141791
  }
@@ -141784,7 +141801,7 @@ const objs$1 = Yi(B0({}, objs$3), {
141784
141801
  });
141785
141802
  }
141786
141803
  initLight() {
141787
- return E0(this, null, function* () {
141804
+ return V0(this, null, function* () {
141788
141805
  const [n, r] = yield Promise.all([
141789
141806
  this.lead.draw("Light", {
141790
141807
  type: "RectAreaLight",
@@ -141827,7 +141844,7 @@ const objs$1 = Yi(B0({}, objs$3), {
141827
141844
  }
141828
141845
  }
141829
141846
  addAreaPlaneByProperty(n, r, C) {
141830
- return E0(this, null, function* () {
141847
+ return V0(this, null, function* () {
141831
141848
  if (!this.map) return;
141832
141849
  const I = this.map.options.geojson.features.find(
141833
141850
  (O) => O.properties && O.properties[n] === r
@@ -141868,7 +141885,7 @@ const objs$1 = Yi(B0({}, objs$3), {
141868
141885
  };
141869
141886
  m0(Zn, "VisName", "earth");
141870
141887
  let index$1 = Zn;
141871
- const timeOut = (v) => E0(void 0, null, function* () {
141888
+ const timeOut = (v) => V0(void 0, null, function* () {
141872
141889
  const e = makePromiseCreator();
141873
141890
  return setTimeout(() => {
141874
141891
  e.resolve();
@@ -142007,7 +142024,7 @@ let PlaneMap$1 = class extends pt {
142007
142024
  }, n), ((r = this.options.projection.rotate) == null ? void 0 : r[0]) === -160 && (this.options.projection.projectionType === "winkel3" ? this.splitPolygons = 100 : this.splitPolygons = 300);
142008
142025
  }
142009
142026
  create() {
142010
- return E0(this, null, function* () {
142027
+ return V0(this, null, function* () {
142011
142028
  const {
142012
142029
  geojson: n,
142013
142030
  extrudeLineGeojson: r,
@@ -142021,7 +142038,7 @@ let PlaneMap$1 = class extends pt {
142021
142038
  const ve = this.pencil.lead;
142022
142039
  if (_) {
142023
142040
  const ut = yield Promise.all(
142024
- n.features.map((xt) => E0(this, null, function* () {
142041
+ n.features.map((xt) => V0(this, null, function* () {
142025
142042
  const { properties: Lt } = xt, Xt = `${this.getPropertiesKey(Lt)}`, Zt = yield ve.draw("Group", {
142026
142043
  target: this,
142027
142044
  key: Xt
@@ -142082,11 +142099,11 @@ let PlaneMap$1 = class extends pt {
142082
142099
  });
142083
142100
  }
142084
142101
  addArea(n, r) {
142085
- return E0(this, null, function* () {
142102
+ return V0(this, null, function* () {
142086
142103
  const { bbox: C, material: _, onTop: I } = r, O = this.geojson2Meta(n), Se = this.pencil.getPlugin("worker"), ve = this.pencil.lead;
142087
142104
  if (this.pencil.mList, r.areaGroup)
142088
142105
  return yield Promise.all(
142089
- O.map((Ce) => E0(this, null, function* () {
142106
+ O.map((Ce) => V0(this, null, function* () {
142090
142107
  const { coords: Re, properties: Pe } = Ce, Fe = this.findGroup(this.getPropertiesKey(Pe)), ke = yield Se.geoGeometry(
142091
142108
  "extrudePolygon",
142092
142109
  {
@@ -142146,11 +142163,11 @@ let PlaneMap$1 = class extends pt {
142146
142163
  });
142147
142164
  }
142148
142165
  addLine(n, r) {
142149
- return E0(this, null, function* () {
142166
+ return V0(this, null, function* () {
142150
142167
  const { material: C, onTop: _ } = r, I = this.geojson2Meta(n), O = this.pencil.getPlugin("worker"), Se = this.pencil.lead;
142151
142168
  if (r.areaGroup)
142152
142169
  return yield Promise.all(
142153
- I.map((ve) => E0(this, null, function* () {
142170
+ I.map((ve) => V0(this, null, function* () {
142154
142171
  const { coords: Ce, properties: Re } = ve, Pe = this.findGroup(this.getPropertiesKey(Re)), Fe = yield O.geoGeometry("line", {
142155
142172
  mesaage: {
142156
142173
  coordinatesArr: Ce,
@@ -142329,10 +142346,10 @@ class ContinentsBg extends pt {
142329
142346
  this.options = n;
142330
142347
  }
142331
142348
  create() {
142332
- return E0(this, null, function* () {
142349
+ return V0(this, null, function* () {
142333
142350
  const { depth: n } = this.options, r = this.pencil.mList, C = this.pencil.lead, _ = r.getMultiple("continents");
142334
142351
  this.createGroup(), this.object3d.name = "大洲", yield Promise.all(
142335
- Object.values(continentsLiteJson).map((I) => E0(this, null, function* () {
142352
+ Object.values(continentsLiteJson).map((I) => V0(this, null, function* () {
142336
142353
  const O = I.features[0], Se = O.properties.adcode;
142337
142354
  if (Se === 10) return;
142338
142355
  const ve = centroid(O).geometry.coordinates;
@@ -142416,7 +142433,7 @@ class PlaneMap extends pt {
142416
142433
  });
142417
142434
  }
142418
142435
  create() {
142419
- return E0(this, null, function* () {
142436
+ return V0(this, null, function* () {
142420
142437
  const { geojson: n, bbox: r } = this.options, C = this.geojson2Meta(n), _ = this.pencil.getPlugin("worker"), I = this.pencil.lead, Se = yield this.pencil.loader.load("/1.png"), ve = yield _.geoGeometry("extrudePolygon", {
142421
142438
  mesaage: {
142422
142439
  coordinatesArr: C.map(({ coords: lt }) => lt).flat(),
@@ -142519,7 +142536,7 @@ const getLabelElement = (v) => {
142519
142536
  const e = this.loader;
142520
142537
  e.add(["/image/map/jianbian.webp"]), e.add(["/image/map/hp2.webp", "/image/map/fx2.webp"]);
142521
142538
  }, v.initMaterial = function() {
142522
- return E0(this, null, function* () {
142539
+ return V0(this, null, function* () {
142523
142540
  const e = this.loader, n = this.mList, r = (() => {
142524
142541
  const C = e.getAsset("/image/map/hp2.webp");
142525
142542
  C.center.set(0.5, 0.5), C.repeat.set(0.97, 1.01);
@@ -142563,7 +142580,7 @@ const getLabelElement = (v) => {
142563
142580
  return;
142564
142581
  }
142565
142582
  v.initMaterial = function() {
142566
- return E0(this, null, function* () {
142583
+ return V0(this, null, function* () {
142567
142584
  const e = this.mList, n = (() => {
142568
142585
  const r = new MeshBasicMaterial({
142569
142586
  name: "顶面",
@@ -142598,7 +142615,7 @@ const getLabelElement = (v) => {
142598
142615
  };
142599
142616
  }, china = (v) => {
142600
142617
  v.options.lineOffset = 5e-3, v.loaderAdd = function() {
142601
- return E0(this, null, function* () {
142618
+ return V0(this, null, function* () {
142602
142619
  this.loader.add([
142603
142620
  "/image/map/jianbian.webp",
142604
142621
  "/image/map/hp.webp",
@@ -142606,7 +142623,7 @@ const getLabelElement = (v) => {
142606
142623
  ]), this.loaderAddBg();
142607
142624
  });
142608
142625
  }, v.initMaterial = function() {
142609
- return E0(this, null, function* () {
142626
+ return V0(this, null, function* () {
142610
142627
  const e = this.loader, n = (() => {
142611
142628
  const r = new MeshStandardMaterial({
142612
142629
  name: "顶面",
@@ -142642,11 +142659,11 @@ const getLabelElement = (v) => {
142642
142659
  };
142643
142660
  }, base$1 = (v) => {
142644
142661
  v.loaderAdd = function() {
142645
- return E0(this, null, function* () {
142662
+ return V0(this, null, function* () {
142646
142663
  this.loader.add(["/image/map/jianbian.webp"]), this.loaderAddBg();
142647
142664
  });
142648
142665
  }, v.initMaterial = function() {
142649
- return E0(this, null, function* () {
142666
+ return V0(this, null, function* () {
142650
142667
  const e = this.loader, n = (() => {
142651
142668
  const r = new MeshBasicMaterial({
142652
142669
  name: "顶面",
@@ -142702,7 +142719,7 @@ const getLabelElement = (v) => {
142702
142719
  }, v.options.parentBg && (v.extendsOptions.parentBgDepth = () => v.options.parentBgDepth), v.loaderAdd = function() {
142703
142720
  this.loader.add(["/image/map2/side.png"]);
142704
142721
  }, v.initMaterial = function() {
142705
- return E0(this, null, function* () {
142722
+ return V0(this, null, function* () {
142706
142723
  const n = this.loader, r = (() => {
142707
142724
  const C = new MeshBasicMaterial({
142708
142725
  name: "板块顶面",
@@ -142738,13 +142755,13 @@ const getLabelElement = (v) => {
142738
142755
  };
142739
142756
  const e = v.init.bind(v);
142740
142757
  v.init = function() {
142741
- return E0(this, null, function* () {
142758
+ return V0(this, null, function* () {
142742
142759
  yield e(), yield this.initCityOnMap(this.mapInfo.adcode);
142743
142760
  });
142744
142761
  };
142745
142762
  }, base = (v) => {
142746
142763
  if (v.initMaterialBg = function() {
142747
- return E0(this, null, function* () {
142764
+ return V0(this, null, function* () {
142748
142765
  const e = this.getRoomEnvMap();
142749
142766
  if (this.options.parentBg) {
142750
142767
  if (this.options.adcode !== 1e5) {
@@ -142828,11 +142845,11 @@ const getLabelElement = (v) => {
142828
142845
  return;
142829
142846
  }
142830
142847
  v.loaderAdd = function() {
142831
- return E0(this, null, function* () {
142848
+ return V0(this, null, function* () {
142832
142849
  this.loaderAddBg();
142833
142850
  });
142834
142851
  }, v.initMaterial = function() {
142835
- return E0(this, null, function* () {
142852
+ return V0(this, null, function* () {
142836
142853
  const e = (() => {
142837
142854
  const n = new MeshBasicMaterial({
142838
142855
  name: "板块顶面",
@@ -142988,12 +143005,12 @@ const getLabelElement = (v) => {
142988
143005
  })), this.options.equirectangular && (this.options.projectionType = "equirectangular"), this.options.winkel3 && (this.options.projectionType = "winkel3"), this.options.adcode === 0 ? this.extendsOptions.winkel3 = () => this.options.winkel3 : (this.getAdcodeShowLevel(this.options.adcode) === "province" || this.getAdcodeShowLevel(this.options.adcode) === "country") && (this.extendsOptions.clickHandleDrillDown = () => this.options.clickHandleDrillDown, this.options.clickHandleDrillDown && (this.workerOnce = !1, this.extendsOptions.mapDepth = () => Array.isArray(this.options.mapDepth) ? this.options.mapDepth : new Array(3).fill(this.options.mapDepth), this.extendsOptions.drillDownFirstLevelUseBgMats = () => this.options.drillDownFirstLevelUseBgMats, this.extendsOptions.drillDownSecondLevelMats = () => this.options.drillDownSecondLevelMats, this.extendsOptions.drillDownThirdLevelMats = () => this.options.drillDownThirdLevelMats, this.extendsOptions.drillDownPlateInCenter = () => this.options.drillDownPlateInCenter, this.extendsOptions.clickOusideBack = () => this.options.clickOusideBack, this.extendsOptions.handleBackKeepCamvasState = () => this.options.handleBackKeepCamvasState, this.extendsOptions.showOneLevel = () => this.options.showOneLevel, this.extendsOptions.showDistrict = () => this.options.showDistrict, this.options.parentBg && (this.extendsOptions.drillDownHideParent = () => this.options.drillDownHideParent)), this.extendsOptions.parentBg = () => this.options.parentBg, this.options.parentBg && (this.extendsOptions.parentBgDepth = () => this.options.parentBgDepth), this.extendsOptions.continentsBg = () => this.options.continentsBg, this.options.continentsBg && (this.extendsOptions.continentsBgDepth = () => this.options.continentsBgDepth)), this.options.adcode === 0 ? world(this) : this.options.style === "map2Base" || this.options.style === "map2CityOnMap" ? base(this) : this.options.adcode === 1e5 ? china(this) : base$1(this);
142989
143006
  }
142990
143007
  handleSetting(n, r) {
142991
- return E0(this, null, function* () {
143008
+ return V0(this, null, function* () {
142992
143009
  return yield yn(xn.prototype, this, "handleSetting").call(this, n, r), n === "label" ? r === !1 ? (this.eraseLabels(), this.options.showLabel = !1) : (this.settings.labelLite = !1, yield this.settings.labelLite, this.options.showLabel = !0, yield this.drawLabels()) : n === "labelLite" ? r === !1 ? (this.eraseLabels(), this.options.showLabel = !1) : (this.settings.label = !1, yield this.settings.label, this.options.showLabel = "lite", yield this.drawLabels()) : n === "shadowMap" && (r === !1 ? this.shadowMapDisabled() : yield this.shadowMapEnabled()), r;
142993
143010
  });
142994
143011
  }
142995
143012
  init() {
142996
- return E0(this, null, function* () {
143013
+ return V0(this, null, function* () {
142997
143014
  const { adcode: n } = this.options;
142998
143015
  this.options.center && (this.pcenter = this.options.center), this.projection = f({
142999
143016
  center: this.pcenter,
@@ -143018,7 +143035,7 @@ const getLabelElement = (v) => {
143018
143035
  });
143019
143036
  }
143020
143037
  initCityVis(C) {
143021
- return E0(this, arguments, function* (n, r = { clip: !1, grey: !1 }) {
143038
+ return V0(this, arguments, function* (n, r = { clip: !1, grey: !1 }) {
143022
143039
  var Se;
143023
143040
  (Se = this.options.fixCity) != null && Se[n] && (n = this.options.fixCity[n]);
143024
143041
  const _ = this.options.center, I = this.options.jsonNameObj[n], O = new City({
@@ -143050,7 +143067,7 @@ const getLabelElement = (v) => {
143050
143067
  });
143051
143068
  }
143052
143069
  initCityOnMap(n) {
143053
- return E0(this, null, function* () {
143070
+ return V0(this, null, function* () {
143054
143071
  if (this.getAdcodeShowLevel(n) !== "city") {
143055
143072
  const _ = findAdcodeInfo(n).parent;
143056
143073
  this.getAdcodeShowLevel(_) === "city" && (yield this.initCityOnMap(_));
@@ -143069,7 +143086,7 @@ const getLabelElement = (v) => {
143069
143086
  });
143070
143087
  }
143071
143088
  initVisBg() {
143072
- return E0(this, null, function* () {
143089
+ return V0(this, null, function* () {
143073
143090
  let n = 1e3, r = 1e3;
143074
143091
  const C = new Vector3(0, 0, 0);
143075
143092
  if (this.options.parentBg) {
@@ -143151,7 +143168,7 @@ const getLabelElement = (v) => {
143151
143168
  });
143152
143169
  }
143153
143170
  initVis(n) {
143154
- return E0(this, null, function* () {
143171
+ return V0(this, null, function* () {
143155
143172
  var r;
143156
143173
  if (yield this.setAdcode({
143157
143174
  adcodes: [n],
@@ -143182,7 +143199,7 @@ const getLabelElement = (v) => {
143182
143199
  );
143183
143200
  }
143184
143201
  initMaterialBg() {
143185
- return E0(this, null, function* () {
143202
+ return V0(this, null, function* () {
143186
143203
  if (this.options.parentBg) {
143187
143204
  const n = (() => {
143188
143205
  const r = new MeshStandardMaterial({
@@ -143265,7 +143282,7 @@ const getLabelElement = (v) => {
143265
143282
  }
143266
143283
  }
143267
143284
  addAreaPlaneByProperty(n, r, C) {
143268
- return E0(this, null, function* () {
143285
+ return V0(this, null, function* () {
143269
143286
  if (!this.map) return;
143270
143287
  const I = this.map.options.geojson.features.find(
143271
143288
  (O) => O.properties && O.properties[n] === r
@@ -143324,7 +143341,7 @@ const getLabelElement = (v) => {
143324
143341
  });
143325
143342
  }
143326
143343
  showAction() {
143327
- return E0(this, null, function* () {
143344
+ return V0(this, null, function* () {
143328
143345
  yn(xn.prototype, this, "showAction").call(this), this.useSaveCamera(`map-${this.options.adcode}`);
143329
143346
  const n = this.lead.group;
143330
143347
  if (this.mapHistory[0]) {
@@ -143351,7 +143368,7 @@ const getLabelElement = (v) => {
143351
143368
  });
143352
143369
  }
143353
143370
  hide() {
143354
- return E0(this, null, function* () {
143371
+ return V0(this, null, function* () {
143355
143372
  if (!this.showState) return;
143356
143373
  const n = this.lead.group;
143357
143374
  yield sinusoidalInOut({
@@ -143364,7 +143381,7 @@ const getLabelElement = (v) => {
143364
143381
  });
143365
143382
  }
143366
143383
  shadowMapEnabled() {
143367
- return E0(this, null, function* () {
143384
+ return V0(this, null, function* () {
143368
143385
  if (this.pencil.scene.userData.shadowMapEnabled) return;
143369
143386
  this.pencil.scene.userData.shadowMapEnabled = !0;
143370
143387
  const n = yield this.lead.draw("Light", {
@@ -143438,7 +143455,7 @@ const getLabelElement = (v) => {
143438
143455
  return r;
143439
143456
  }
143440
143457
  showMap(_) {
143441
- return E0(this, arguments, function* ({
143458
+ return V0(this, arguments, function* ({
143442
143459
  adcode: n,
143443
143460
  adcodes: r,
143444
143461
  duration: C = 1e3
@@ -143451,7 +143468,7 @@ const getLabelElement = (v) => {
143451
143468
  });
143452
143469
  }
143453
143470
  drawLabels() {
143454
- return E0(this, null, function* () {
143471
+ return V0(this, null, function* () {
143455
143472
  var C;
143456
143473
  const n = this.options.showLabel;
143457
143474
  if (!((C = this.mapArea) != null && C.length) || !n) return;
@@ -143463,7 +143480,7 @@ const getLabelElement = (v) => {
143463
143480
  },
143464
143481
  this.group
143465
143482
  ), r.object3d.name = "地图标签组", yield Promise.all(
143466
- this.mapArea.map((_) => E0(this, null, function* () {
143483
+ this.mapArea.map((_) => V0(this, null, function* () {
143467
143484
  let { name: I, adcode: O, centroid: Se } = _.userData;
143468
143485
  const { DistrictID: ve, DistName: Ce, iso_a2: Re, center: Pe } = _.userData;
143469
143486
  if (O = O || Re || ve, Se = Se || Pe, I = I || Ce, !Se)
@@ -143526,7 +143543,7 @@ const getLabelElement = (v) => {
143526
143543
  return chinaLiteJson.features[0].geometry.coordinates.some((r) => booleanPointInPolygon$1(point(n), polygon(r)));
143527
143544
  }
143528
143545
  getGeojson(n, r = !1) {
143529
- return E0(this, null, function* () {
143546
+ return V0(this, null, function* () {
143530
143547
  var C, _, I, O;
143531
143548
  return r ? this.options.extrudeLine ? (I = this.options.extrudeLineGeojsonMap) != null && I[n] ? { res: (O = this.options.extrudeLineGeojsonMap) == null ? void 0 : O[n] } : yield jsonFetch(
143532
143549
  `${this.options.assetsPrefix}/geojson/json-lite/${n}.json`
@@ -143538,7 +143555,7 @@ const getLabelElement = (v) => {
143538
143555
  });
143539
143556
  }
143540
143557
  handleDrillDown(O) {
143541
- return E0(this, arguments, function* ({
143558
+ return V0(this, arguments, function* ({
143542
143559
  adcode: n,
143543
143560
  duration: r,
143544
143561
  handleLook: C,
@@ -143582,7 +143599,7 @@ const getLabelElement = (v) => {
143582
143599
  extrudelineBloom: I
143583
143600
  });
143584
143601
  Fe == null || Fe.hide(), Yt.position.setZ(Vt);
143585
- const Kt = Yt.position.z, Ft = () => E0(this, null, function* () {
143602
+ const Kt = Yt.position.z, Ft = () => V0(this, null, function* () {
143586
143603
  yield sinusoidalInOut({
143587
143604
  onUpdate: (Wt) => {
143588
143605
  Zt !== Kt && (Yt.position.z = Kt + (Zt - Kt) * Wt);
@@ -143600,7 +143617,7 @@ const getLabelElement = (v) => {
143600
143617
  enableTransition: r !== 0,
143601
143618
  polarAngle: Wt == null ? void 0 : Wt.polarAngle,
143602
143619
  azimuthAngle: Wt == null ? void 0 : Wt.azimuthAngle,
143603
- handleStart: () => E0(this, null, function* () {
143620
+ handleStart: () => V0(this, null, function* () {
143604
143621
  Yt.position.z = Kt, yield Ft();
143605
143622
  })
143606
143623
  });
@@ -143642,7 +143659,7 @@ const getLabelElement = (v) => {
143642
143659
  n === 0 ? (this.pencil.camera.near = 1, this.pencil.camera.far = 1e3, this.pencil.camera.updateProjectionMatrix()) : (r === "country" || r === "province") && this.pencil.camera.near !== C.camera.near * 10 ? (this.pencil.camera.near = C.camera.near * 10, this.pencil.camera.updateProjectionMatrix()) : (r === "city" || r === "district") && this.pencil.camera.near !== C.camera.near && (this.pencil.camera.near = C.camera.near, this.pencil.camera.updateProjectionMatrix());
143643
143660
  }
143644
143661
  fitTo(ve) {
143645
- return E0(this, arguments, function* (n, {
143662
+ return V0(this, arguments, function* (n, {
143646
143663
  polarAngle: r,
143647
143664
  azimuthAngle: C,
143648
143665
  z: _,
@@ -143683,7 +143700,7 @@ const getLabelElement = (v) => {
143683
143700
  });
143684
143701
  }
143685
143702
  drawPlaneMap(Se) {
143686
- return E0(this, arguments, function* ({
143703
+ return V0(this, arguments, function* ({
143687
143704
  geojson: n,
143688
143705
  extrudeLineGeojson: r,
143689
143706
  bbox: C,
@@ -143729,14 +143746,17 @@ const getLabelElement = (v) => {
143729
143746
  return ke.object3d.name = ((ct = findAdcodeInfo(O)) == null ? void 0 : ct.name) || `${O}`, this.options.style === "map2CityOnMap" && !this.options.showCityOnMapInnerLine && (Re.lineMat.colorWrite = !1, ke.lineArr.forEach((Ue) => {
143730
143747
  Ue.userData.selectHide = !0;
143731
143748
  })), ke.extrudelineArr && ke.extrudelineArr.forEach((Ue) => {
143732
- Ue.object3d.name = "板块边线", this.lead.updateBaseObjectKey(Ue, "extrudeLine"), this.initBaseObjectUserData(Ue), I && (Ue.object3d.userData.bloom = !0);
143749
+ Ue.object3d.name = "板块边线", this.lead.updateBaseObjectKey(
143750
+ Ue,
143751
+ this.mapHistory.length ? "extrudeLine#$p:" : "extrudeLine"
143752
+ ), this.initBaseObjectUserData(Ue), I && (Ue.object3d.userData.bloom = !0);
143733
143753
  }), ke.lineArr && ke.lineArr.forEach((Ue) => {
143734
143754
  this.initBaseObjectUserData(Ue);
143735
143755
  }), ke;
143736
143756
  });
143737
143757
  }
143738
143758
  handleBack() {
143739
- return E0(this, arguments, function* ({
143759
+ return V0(this, arguments, function* ({
143740
143760
  duration: n = 1e3,
143741
143761
  handleLookBack: r = !0,
143742
143762
  keepOne: C = !0
@@ -143767,7 +143787,7 @@ const getLabelElement = (v) => {
143767
143787
  });
143768
143788
  }
143769
143789
  handleLookBack(n) {
143770
- return E0(this, null, function* () {
143790
+ return V0(this, null, function* () {
143771
143791
  const { userControls: r, controls: C } = this.mapObj;
143772
143792
  yield this.pencil.controls.setLookAt(
143773
143793
  ...r ? r.lookAt : C.lookAt,
@@ -143787,7 +143807,7 @@ const getLabelElement = (v) => {
143787
143807
  return I;
143788
143808
  }
143789
143809
  setAdcode(C) {
143790
- return E0(this, arguments, function* ({
143810
+ return V0(this, arguments, function* ({
143791
143811
  adcodes: n,
143792
143812
  duration: r
143793
143813
  }) {
@@ -143910,9 +143930,60 @@ function stringToUtf8ByteArray(v) {
143910
143930
  }
143911
143931
  return e;
143912
143932
  }
143913
- let b = "/";
143914
- b === "/" && (b = "");
143915
- const getMapConfig = (C, ..._) => E0(void 0, [C, ..._], function* (v, e = b, n, r) {
143933
+ const TEMPLATE_CONFIGS = {
143934
+ "7s93q0lma4n9887": {
143935
+ id: "7s93q0lma4n9887",
143936
+ mapIndex: 4,
143937
+ emissiveMapIndex: 5
143938
+ },
143939
+ l7ojr7nqc06u24f: {
143940
+ id: "l7ojr7nqc06u24f",
143941
+ mapIndex: 7,
143942
+ emissiveMapIndex: 6,
143943
+ cityOnly: !0
143944
+ },
143945
+ "2xli7429f48857f": {
143946
+ id: "2xli7429f48857f",
143947
+ emissiveMapIndex: 14
143948
+ }
143949
+ }, getBaseUrl = () => {
143950
+ const v = "/";
143951
+ return v === "/" ? "" : v;
143952
+ }, getAdcodeInfo = (v) => {
143953
+ const e = findAdcodeInfo(v);
143954
+ if (!e)
143955
+ throw new Error(`Adcode ${v} not found`);
143956
+ return e;
143957
+ }, getProvinceAdcode = (v) => {
143958
+ let e = v, n = getAdcodeInfo(e);
143959
+ for (; n.level !== "province"; )
143960
+ e = n.parent, n = getAdcodeInfo(e);
143961
+ return e;
143962
+ }, fetchGeojsonData = (v, e, n, r) => V0(void 0, null, function* () {
143963
+ const C = r || e, { res: _ } = yield jsonFetch(`${v}/geojson/${C}/${n}.json`);
143964
+ return _;
143965
+ }), processTemplateImages = (v, e, n, r, C) => V0(void 0, null, function* () {
143966
+ const _ = TEMPLATE_CONFIGS[v];
143967
+ if (!(!_ || _.cityOnly && !C))
143968
+ try {
143969
+ if (_.mapIndex !== void 0) {
143970
+ const I = yield png2webp(
143971
+ `${n}/template/${v}/${e}.jpg`
143972
+ );
143973
+ r[_.mapIndex] = I.src, console.log(`已替换模板 ${v} 的 map 资源, ${_.mapIndex}`);
143974
+ }
143975
+ if (_.emissiveMapIndex !== void 0) {
143976
+ const I = yield png2webp(
143977
+ `${n}/template/${v}/${e}-自发光.jpg`
143978
+ );
143979
+ r[_.emissiveMapIndex] = I.src, console.log(
143980
+ `已替换模板 ${v} 的 emissiveMap 资源, ${_.emissiveMapIndex}`
143981
+ );
143982
+ }
143983
+ } catch (I) {
143984
+ console.warn(`模板 ${v} 图像资源加载失败:`, I);
143985
+ }
143986
+ }), getMapConfig = (C, ..._) => V0(void 0, [C, ..._], function* (v, e = getBaseUrl(), n, r) {
143916
143987
  if ((n == null ? void 0 : n.style) === "map2CityOnMap")
143917
143988
  return getMapWithCityConfig(v, e, n, r);
143918
143989
  if (v === 0)
@@ -143924,7 +143995,7 @@ const getMapConfig = (C, ..._) => E0(void 0, [C, ..._], function* (v, e = b, n,
143924
143995
  center: [0, 0]
143925
143996
  };
143926
143997
  {
143927
- const I = findAdcodeInfo(v);
143998
+ const I = getAdcodeInfo(v);
143928
143999
  return extendMapConfig(
143929
144000
  {
143930
144001
  center: [I.lng, I.lat],
@@ -143935,8 +144006,8 @@ const getMapConfig = (C, ..._) => E0(void 0, [C, ..._], function* (v, e = b, n,
143935
144006
  r
143936
144007
  );
143937
144008
  }
143938
- }), getMapWithCityConfig = (C, ..._) => E0(void 0, [C, ..._], function* (v, e = b, n, r) {
143939
- const I = findAdcodeInfo(v);
144009
+ }), getMapWithCityConfig = (C, ..._) => V0(void 0, [C, ..._], function* (v, e = getBaseUrl(), n, r) {
144010
+ const I = getAdcodeInfo(v);
143940
144011
  return extendMapConfig(
143941
144012
  {
143942
144013
  center: [I.lng, I.lat],
@@ -143949,22 +144020,23 @@ const getMapConfig = (C, ..._) => E0(void 0, [C, ..._], function* (v, e = b, n,
143949
144020
  n,
143950
144021
  r
143951
144022
  );
143952
- }), extendMapConfig = (C, ..._) => E0(void 0, [C, ..._], function* (v, e = b, n, r) {
143953
- var ke, ct;
143954
- if (v.adcode === 0 && v.adcode === 1e5)
144023
+ }), extendMapConfig = (C, ..._) => V0(void 0, [C, ..._], function* (v, e = getBaseUrl(), n, r) {
144024
+ var ct, Ue;
144025
+ if (v.adcode === 0 || v.adcode === 1e5)
143955
144026
  return B0({}, v);
143956
- const I = v.adcode, O = findAdcodeInfo(I).level === "province", Se = findAdcodeInfo(I).level === "city" || findAdcodeInfo(I).level === "district" && findAdcodeInfo(findAdcodeInfo(I).parent).level === "province", ve = (ke = v.fixGeojson) == null ? void 0 : ke[I], Ce = (ct = v.fixGeojson) == null ? void 0 : ct[I + "-lite"];
143957
- let { res: Re } = yield jsonFetch(
143958
- `${e}/geojson/${ve || "json"}/${I}.json`
143959
- );
143960
- const { res: Pe } = yield jsonFetch(
143961
- `${e}/geojson/${Ce || "json-lite"}/${I}.json`
143962
- ), Fe = Yi(B0({}, v), {
144027
+ const I = v.adcode, O = getAdcodeInfo(I), Se = O.level === "province", ve = O.level === "city" || O.level === "district" && getAdcodeInfo(O.parent).level === "province", Ce = (ct = v.fixGeojson) == null ? void 0 : ct[I], Re = (Ue = v.fixGeojson) == null ? void 0 : Ue[I + "-lite"];
144028
+ let Pe = yield fetchGeojsonData(e, "json", I, Ce);
144029
+ const Fe = yield fetchGeojsonData(
144030
+ e,
144031
+ "json-lite",
144032
+ I,
144033
+ Re
144034
+ ), ke = Yi(B0({}, v), {
143963
144035
  geojsonMap: {
143964
- [I]: Re
144036
+ [I]: Pe
143965
144037
  },
143966
144038
  extrudeLineGeojsonMap: {
143967
- [I]: Pe
144039
+ [I]: Fe
143968
144040
  },
143969
144041
  cityBboxMap: {},
143970
144042
  jsonNameObj: {},
@@ -143972,63 +144044,46 @@ const getMapConfig = (C, ..._) => E0(void 0, [C, ..._], function* (v, e = b, n,
143972
144044
  __template: n == null ? void 0 : n.__template
143973
144045
  });
143974
144046
  if (v.style === "map2CityOnMap") {
143975
- if (!O) {
143976
- let Ue = findAdcodeInfo(I).parent;
143977
- for (; findAdcodeInfo(Ue).level !== "province"; )
143978
- Ue = findAdcodeInfo(Ue).parent;
143979
- const { res: Ne } = yield jsonFetch(
143980
- `${e}/geojson/${ve || "json"}/${Ue}.json`
144047
+ if (!Se) {
144048
+ const Ne = getProvinceAdcode(I);
144049
+ Pe = yield fetchGeojsonData(
144050
+ e,
144051
+ "json",
144052
+ Ne,
144053
+ Ce
143981
144054
  );
143982
- Re = Ne;
143983
144055
  }
143984
- Re.features.forEach((Ue) => {
143985
- Fe.jsonNameObj[Ue.properties.adcode] = ec(
143986
- Ue.properties.name,
143987
- `${Ue.properties.adcode}`
144056
+ Pe.features.forEach((Ne) => {
144057
+ ke.jsonNameObj[Ne.properties.adcode] = ec(
144058
+ Ne.properties.name,
144059
+ `${Ne.properties.adcode}`
143988
144060
  );
143989
144061
  });
143990
144062
  }
143991
- if ((n == null ? void 0 : n.__template) === "7s93q0lma4n9887" && r) {
143992
- console.log("map", I);
143993
- const Ue = yield png2webp(
143994
- `${e}/template/7s93q0lma4n9887/${I}.jpg`
143995
- ), Ne = yield png2webp(
143996
- `${e}/template/7s93q0lma4n9887/${I}-自发光.jpg`
143997
- );
143998
- r[4] = Ue.src, r[5] = Ne.src, console.log("替换 map emissiveMap");
143999
- }
144000
- if ((n == null ? void 0 : n.__template) === "l7ojr7nqc06u24f" && r && Se) {
144001
- const Ue = yield png2webp(
144002
- `${e}/template/l7ojr7nqc06u24f/${I}.jpg`
144003
- ), Ne = yield png2webp(
144004
- `${e}/template/l7ojr7nqc06u24f/${I}-自发光.jpg`
144005
- );
144006
- r[7] = Ue.src, r[6] = Ne.src, console.log("替换 map emissiveMap");
144007
- }
144008
- if ((n == null ? void 0 : n.__template) === "2xli7429f48857f" && r) {
144009
- const Ue = yield png2webp(
144010
- `${e}/template/2xli7429f48857f/${I}.jpg`
144011
- );
144012
- r[14] = Ue.src, console.log("替换 emissiveMap");
144013
- }
144014
- if (v.parentBg) {
144015
- const Ue = findAdcodeInfo(I).parent;
144016
- if (Ue !== 1e5) {
144017
- const { res: Ne } = yield jsonFetch(
144018
- `${e}/geojson/json/${Ue}.json`
144019
- ), { res: lt } = yield jsonFetch(
144020
- `${e}/geojson/json-lite/${Ue}.json`
144063
+ if (n != null && n.__template && r && (yield processTemplateImages(
144064
+ n.__template,
144065
+ I,
144066
+ e,
144067
+ r,
144068
+ ve
144069
+ )), v.parentBg) {
144070
+ const Ne = O.parent;
144071
+ if (Ne !== 1e5) {
144072
+ const lt = yield fetchGeojsonData(e, "json", Ne), at = yield fetchGeojsonData(
144073
+ e,
144074
+ "json-lite",
144075
+ Ne
144021
144076
  );
144022
- Fe.geojsonMap[Ue] = Ne, Fe.extrudeLineGeojsonMap[Ue] = lt;
144077
+ ke.geojsonMap[Ne] = lt, ke.extrudeLineGeojsonMap[Ne] = at;
144023
144078
  }
144024
144079
  }
144025
- return n && (Fe.depthReference = n.depthReference || findAdcodeInfo(n.adcode).b), Fe;
144026
- }), getCityConfig = (n, ...r) => E0(void 0, [n, ...r], function* (v, e = b) {
144027
- const C = findAdcodeInfo(v), { name: _ } = C;
144080
+ return n && (ke.depthReference = n.depthReference || getAdcodeInfo(n.adcode).b), ke;
144081
+ }), getCityConfig = (v) => V0(void 0, null, function* () {
144082
+ const e = getAdcodeInfo(v), { name: n } = e;
144028
144083
  return {
144029
- center: [C.lng, C.lat],
144030
- adcode: C.adcode,
144031
- jsonName: ec(_, `${v}`)
144084
+ center: [e.lng, e.lat],
144085
+ adcode: e.adcode,
144086
+ jsonName: ec(n, `${v}`)
144032
144087
  };
144033
144088
  }), removeCameraHistory = (v) => v.filter((e) => !(e.objectUuid === "camera" && ["SetPosition", "SetTarget"].includes(e.type))), access = {
144034
144089
  set token(v) {