@realsee/five 6.7.0-alpha.31 → 6.7.0-alpha.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/five/index.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five
4
- * Generated: 12/18/2025
5
- * Version: 6.7.0-alpha.31
4
+ * Generated: 12/22/2025
5
+ * Version: 6.7.0-alpha.33
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
@@ -758,9 +758,9 @@ CryptoJS.lib.Cipher || (function(n) {
758
758
  M[w + 1] = M[w + 3], M[w + 3] = P, this._doCryptBlock(M, w, this._invKeySchedule, c, f, d, h, r), P = M[w + 1], M[w + 1] = M[w + 3], M[w + 3] = P;
759
759
  },
760
760
  _doCryptBlock: function(M, w, P, _, I, C, H, L) {
761
- for (var O = this._nRounds, U = M[w] ^ P[0], j = M[w + 1] ^ P[1], G = M[w + 2] ^ P[2], V = M[w + 3] ^ P[3], k = 4, D = 1; D < O; D++)
762
- var q = _[U >>> 24] ^ I[j >>> 16 & 255] ^ C[G >>> 8 & 255] ^ H[V & 255] ^ P[k++], z = _[j >>> 24] ^ I[G >>> 16 & 255] ^ C[V >>> 8 & 255] ^ H[U & 255] ^ P[k++], J = _[G >>> 24] ^ I[V >>> 16 & 255] ^ C[U >>> 8 & 255] ^ H[j & 255] ^ P[k++], V = _[V >>> 24] ^ I[U >>> 16 & 255] ^ C[j >>> 8 & 255] ^ H[G & 255] ^ P[k++], U = q, j = z, G = J;
763
- q = (L[U >>> 24] << 24 | L[j >>> 16 & 255] << 16 | L[G >>> 8 & 255] << 8 | L[V & 255]) ^ P[k++], z = (L[j >>> 24] << 24 | L[G >>> 16 & 255] << 16 | L[V >>> 8 & 255] << 8 | L[U & 255]) ^ P[k++], J = (L[G >>> 24] << 24 | L[V >>> 16 & 255] << 16 | L[U >>> 8 & 255] << 8 | L[j & 255]) ^ P[k++], V = (L[V >>> 24] << 24 | L[U >>> 16 & 255] << 16 | L[j >>> 8 & 255] << 8 | L[G & 255]) ^ P[k++], M[w] = q, M[w + 1] = z, M[w + 2] = J, M[w + 3] = V;
761
+ for (var O = this._nRounds, U = M[w] ^ P[0], j = M[w + 1] ^ P[1], K = M[w + 2] ^ P[2], V = M[w + 3] ^ P[3], k = 4, D = 1; D < O; D++)
762
+ var q = _[U >>> 24] ^ I[j >>> 16 & 255] ^ C[K >>> 8 & 255] ^ H[V & 255] ^ P[k++], z = _[j >>> 24] ^ I[K >>> 16 & 255] ^ C[V >>> 8 & 255] ^ H[U & 255] ^ P[k++], J = _[K >>> 24] ^ I[V >>> 16 & 255] ^ C[U >>> 8 & 255] ^ H[j & 255] ^ P[k++], V = _[V >>> 24] ^ I[U >>> 16 & 255] ^ C[j >>> 8 & 255] ^ H[K & 255] ^ P[k++], U = q, j = z, K = J;
763
+ q = (L[U >>> 24] << 24 | L[j >>> 16 & 255] << 16 | L[K >>> 8 & 255] << 8 | L[V & 255]) ^ P[k++], z = (L[j >>> 24] << 24 | L[K >>> 16 & 255] << 16 | L[V >>> 8 & 255] << 8 | L[U & 255]) ^ P[k++], J = (L[K >>> 24] << 24 | L[V >>> 16 & 255] << 16 | L[U >>> 8 & 255] << 8 | L[j & 255]) ^ P[k++], V = (L[V >>> 24] << 24 | L[U >>> 16 & 255] << 16 | L[j >>> 8 & 255] << 8 | L[K & 255]) ^ P[k++], M[w] = q, M[w + 1] = z, M[w + 2] = J, M[w + 3] = V;
764
764
  },
765
765
  keySize: 8
766
766
  });
@@ -3196,8 +3196,8 @@ function X509(n) {
3196
3196
  if (z += " policy oid: " + U.policyoid + `
3197
3197
  `, U.array !== void 0)
3198
3198
  for (var j = 0; j < U.array.length; j++) {
3199
- var G = U.array[j];
3200
- G.cps !== void 0 && (z += " cps: " + G.cps + `
3199
+ var K = U.array[j];
3200
+ K.cps !== void 0 && (z += " cps: " + K.cps + `
3201
3201
  `);
3202
3202
  }
3203
3203
  }
@@ -7367,42 +7367,42 @@ function loadPbm(n, t) {
7367
7367
  var e, r, o, s, u, l;
7368
7368
  t === void 0 && (t = {});
7369
7369
  for (var c = (e = t.upAxis) !== null && e !== void 0 ? e : "Z", f = (r = t.light) !== null && r !== void 0 ? r : !1, d = (o = t.fetcher) !== null && o !== void 0 ? o : internalFetcher, h = (s = t.textureBaseUri) !== null && s !== void 0 ? s : guessTextureBaseUriFromFileUrl(n), p = t.textureBaseUri === void 0 ? [] : ((u = t.textureArray) !== null && u !== void 0 ? u : []).slice(), g = autoRestImageOptionsByTextureLength((l = t.textureOptions) !== null && l !== void 0 ? l : {}, p.length), m = /* @__PURE__ */ new Map(), E = 0, y = p; E < y.length; E++) {
7370
- var v = y[E];
7371
- m.set(v, loadTexture$1(v, h, g, d));
7370
+ var v = y[E], A = isAbsoluteURL(v) ? v : pathJoin(h, v);
7371
+ m.set(A, loadTexture$1(A, g, d));
7372
7372
  }
7373
- var A = {
7373
+ var b = {
7374
7374
  byteLength: 0
7375
7375
  };
7376
7376
  return Promise.resolve().then(function() {
7377
7377
  return d.ajax(n, {
7378
7378
  responseType: "arraybuffer"
7379
7379
  });
7380
- }).then(function(b) {
7381
- A.byteLength = b.body.byteLength;
7382
- var T = new Uint8Array(b.body);
7383
- return Model$2.decode(T);
7384
- }).then(function(b) {
7385
- return parse$4(b, f, h, p, g, m, d);
7386
- }).then(function(b) {
7380
+ }).then(function(T) {
7381
+ b.byteLength = T.body.byteLength;
7382
+ var S = new Uint8Array(T.body);
7383
+ return Model$2.decode(S);
7384
+ }).then(function(T) {
7385
+ return parse$4(T, f, h, p, g, m, d);
7386
+ }).then(function(T) {
7387
7387
  m.clear();
7388
- var T = new THREE.Group();
7389
- T.name = n;
7390
- for (var S = 0, R = b.objects; S < R.length; S++) {
7391
- var M = R[S];
7392
- T.add(M);
7388
+ var S = new THREE.Group();
7389
+ S.name = n;
7390
+ for (var R = 0, M = T.objects; R < M.length; R++) {
7391
+ var w = M[R];
7392
+ S.add(w);
7393
7393
  }
7394
- return c === "Y" && T.applyMatrix4(ROTATE_X_MATRIX_INVERSE), {
7394
+ return c === "Y" && S.applyMatrix4(ROTATE_X_MATRIX_INVERSE), {
7395
7395
  type: "pbm",
7396
7396
  modelUpAxis: "Z",
7397
7397
  upAxis: c,
7398
7398
  uri: n,
7399
- byteLength: A.byteLength,
7400
- memoryUsage: getMemoryUsage(T),
7401
- scene: T,
7402
- textures: b.textures,
7399
+ byteLength: b.byteLength,
7400
+ memoryUsage: getMemoryUsage(S),
7401
+ scene: S,
7402
+ textures: T.textures,
7403
7403
  animations: [],
7404
7404
  dispose: function() {
7405
- return b.dispose();
7405
+ return T.dispose();
7406
7406
  }
7407
7407
  };
7408
7408
  });
@@ -7438,8 +7438,8 @@ function parsePBMModel(n) {
7438
7438
  break;
7439
7439
  }
7440
7440
  }
7441
- for (var m = n.chunks.sort(function(te, re) {
7442
- return chunkOrder(te) - chunkOrder(re);
7441
+ for (var m = n.chunks.sort(function(ne, te) {
7442
+ return chunkOrder(ne) - chunkOrder(te);
7443
7443
  }), E = [], y = 0, v = m; y < v.length; y++) {
7444
7444
  var h = v[y], A = parseFloorName(h.name);
7445
7445
  E[A] || (E[A] = []), E[A].push(h);
@@ -7454,10 +7454,10 @@ function parsePBMModel(n) {
7454
7454
  }
7455
7455
  for (var M = new Float32Array(S * 3), w = new Float32Array(S * 2), P = new Float32Array(S * 3), _ = c ? new Float32Array(S) : void 0, I = [], C = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], H = 0, L = 0; L < T.length; L++) {
7456
7456
  for (var O = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], h = T[L], k = h.vertices.xyz, D = h.vertices.uvs, q = h.faces.indices, z = h.faces.normals, J = h.vertices.marks, V = q.length, R = 0; R < V; R++) {
7457
- var U = q[R], j = M[H * 3 + R * 3] = k[U * 3], G = M[H * 3 + R * 3 + 1] = k[U * 3 + 1], ie = M[H * 3 + R * 3 + 2] = k[U * 3 + 2];
7457
+ var U = q[R], j = M[H * 3 + R * 3] = k[U * 3], K = M[H * 3 + R * 3 + 1] = k[U * 3 + 1], ie = M[H * 3 + R * 3 + 2] = k[U * 3 + 2];
7458
7458
  _ && (_[H + R] = J[U]), w[H * 2 + R * 2] = D[U * 2], w[H * 2 + R * 2 + 1] = D[U * 2 + 1];
7459
- var ne = Math.floor(R / 3) * 3;
7460
- P[H * 3 + R * 3] = z[ne], P[H * 3 + R * 3 + 1] = z[ne + 1], P[H * 3 + R * 3 + 2] = z[ne + 2], j < O[0] && (O[0] = j), G < O[1] && (O[1] = G), ie < O[2] && (O[2] = ie), j > O[3] && (O[3] = j), G > O[4] && (O[4] = G), ie > O[5] && (O[5] = ie);
7459
+ var re = Math.floor(R / 3) * 3;
7460
+ P[H * 3 + R * 3] = z[re], P[H * 3 + R * 3 + 1] = z[re + 1], P[H * 3 + R * 3 + 2] = z[re + 2], j < O[0] && (O[0] = j), K < O[1] && (O[1] = K), ie < O[2] && (O[2] = ie), j > O[3] && (O[3] = j), K > O[4] && (O[4] = K), ie > O[5] && (O[5] = ie);
7461
7461
  }
7462
7462
  O[0] < C[0] && (C[0] = O[0]), O[1] < C[1] && (C[1] = O[1]), O[2] < C[2] && (C[2] = O[2]), O[3] > C[3] && (C[3] = O[3]), O[4] > C[4] && (C[4] = O[4]), O[5] > C[5] && (C[5] = O[5]), I.push({
7463
7463
  materialIndex: L,
@@ -7468,7 +7468,7 @@ function parsePBMModel(n) {
7468
7468
  texture: (e = h.texture) !== null && e !== void 0 ? e : void 0
7469
7469
  }), H += V;
7470
7470
  }
7471
- var $ = {
7471
+ var ee = {
7472
7472
  createAt: o,
7473
7473
  description: s,
7474
7474
  vertices: M,
@@ -7480,30 +7480,30 @@ function parsePBMModel(n) {
7480
7480
  groups: I,
7481
7481
  extents: C
7482
7482
  };
7483
- u.push($);
7483
+ u.push(ee);
7484
7484
  } else {
7485
7485
  for (var S = 0, Z = 0, R = 0; R < T.length; R++) {
7486
7486
  var h = T[R];
7487
7487
  Z += h.vertices.xyz.length / 3, S += h.faces.indices.length;
7488
7488
  }
7489
- for (var M = new Float32Array(Z * 3), w = new Float32Array(Z * 2), P = void 0, X = new Float32Array(Z), se = new Uint32Array(S), _ = c ? new Float32Array(S) : void 0, I = [], C = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], K = 0, H = 0, L = 0; L < T.length; L++) {
7490
- for (var O = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], h = T[L], k = h.vertices.xyz, W = h.vertices.marks, D = h.vertices.uvs, q = h.faces.indices, ee = k.length / 3, V = q.length, R = 0; R < ee; R++) {
7491
- var j = M[H * 3 + R * 3] = k[R * 3], G = M[H * 3 + R * 3 + 1] = k[R * 3 + 1], ie = M[H * 3 + R * 3 + 2] = k[R * 3 + 2];
7492
- _ && (_[H + R] = W[R]), w[H * 2 + R * 2] = D[R * 2], w[H * 2 + R * 2 + 1] = D[R * 2 + 1], X[H + R] = b, j < O[0] && (O[0] = j), G < O[1] && (O[1] = G), ie < O[2] && (O[2] = ie), j > O[3] && (O[3] = j), G > O[4] && (O[4] = G), ie > O[5] && (O[5] = ie);
7489
+ for (var M = new Float32Array(Z * 3), w = new Float32Array(Z * 2), P = void 0, X = new Float32Array(Z), se = new Uint32Array(S), _ = c ? new Float32Array(S) : void 0, I = [], C = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], G = 0, H = 0, L = 0; L < T.length; L++) {
7490
+ for (var O = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], h = T[L], k = h.vertices.xyz, W = h.vertices.marks, D = h.vertices.uvs, q = h.faces.indices, $ = k.length / 3, V = q.length, R = 0; R < $; R++) {
7491
+ var j = M[H * 3 + R * 3] = k[R * 3], K = M[H * 3 + R * 3 + 1] = k[R * 3 + 1], ie = M[H * 3 + R * 3 + 2] = k[R * 3 + 2];
7492
+ _ && (_[H + R] = W[R]), w[H * 2 + R * 2] = D[R * 2], w[H * 2 + R * 2 + 1] = D[R * 2 + 1], X[H + R] = b, j < O[0] && (O[0] = j), K < O[1] && (O[1] = K), ie < O[2] && (O[2] = ie), j > O[3] && (O[3] = j), K > O[4] && (O[4] = K), ie > O[5] && (O[5] = ie);
7493
7493
  }
7494
7494
  O[0] < C[0] && (C[0] = O[0]), O[1] < C[1] && (C[1] = O[1]), O[2] < C[2] && (C[2] = O[2]), O[3] > C[3] && (C[3] = O[3]), O[4] > C[4] && (C[4] = O[4]), O[5] > C[5] && (C[5] = O[5]);
7495
7495
  for (var R = 0; R < V; R++)
7496
- se[K + R] = H + q[R];
7496
+ se[G + R] = H + q[R];
7497
7497
  I.push({
7498
7498
  materialIndex: L,
7499
7499
  name: h.name,
7500
7500
  chunkName: parseChunkName(h.name),
7501
- start: K,
7501
+ start: G,
7502
7502
  count: h.faces.indices.length,
7503
7503
  texture: (r = h.texture) !== null && r !== void 0 ? r : void 0
7504
- }), H += ee, K += V;
7504
+ }), H += $, G += V;
7505
7505
  }
7506
- var $ = {
7506
+ var ee = {
7507
7507
  createAt: o,
7508
7508
  description: s,
7509
7509
  vertices: M,
@@ -7515,27 +7515,27 @@ function parsePBMModel(n) {
7515
7515
  groups: I,
7516
7516
  extents: C
7517
7517
  };
7518
- u.push($);
7518
+ u.push(ee);
7519
7519
  }
7520
7520
  }
7521
7521
  return u;
7522
7522
  }
7523
- function loadTexture$1(n, t, e, r) {
7524
- var o = __assign({ key: "texture.pbm" }, pick(e, ["format", "quality", "size", "sharpen", "forceUseExifOrientation", "mappings"])), s = new TextureLoader(), u = isAbsoluteURL(n) ? n : pathJoin(t, n);
7525
- return s.loadTexture(u, {
7523
+ function loadTexture$1(n, t, e) {
7524
+ var r = __assign({ key: "texture.pbm" }, pick(t, ["format", "quality", "size", "sharpen", "forceUseExifOrientation", "mappings"])), o = new TextureLoader();
7525
+ return o.loadTexture(n, {
7526
7526
  imageURL: {
7527
- transform: e.transform,
7528
- options: o
7527
+ transform: t.transform,
7528
+ options: r
7529
7529
  },
7530
7530
  encoding: THREE.sRGBEncoding,
7531
7531
  wrapS: THREE.ClampToEdgeWrapping,
7532
7532
  wrapT: THREE.ClampToEdgeWrapping,
7533
7533
  minFilter: THREE.LinearFilter,
7534
- maxSize: typeof o.size == "number" ? new THREE.Vector2(o.size, o.size) : void 0,
7535
- fetcher: r
7536
- }).then(function(l) {
7537
- var c = l.body;
7538
- return c.needsUpdate = !0, c;
7534
+ maxSize: typeof r.size == "number" ? new THREE.Vector2(r.size, r.size) : void 0,
7535
+ fetcher: e
7536
+ }).then(function(s) {
7537
+ var u = s.body;
7538
+ return u.needsUpdate = !0, u;
7539
7539
  });
7540
7540
  }
7541
7541
  function parse$4(n, t, e, r, o, s, u) {
@@ -7554,8 +7554,8 @@ function parse$4(n, t, e, r, o, s, u) {
7554
7554
  if (O.texture) {
7555
7555
  if (z = O.texture, r.length > 0 && r.indexOf(O.texture) === -1) {
7556
7556
  for (var J = 0, V = r; J < V.length; J++) {
7557
- var U = V[J], j = isAbsoluteURL(U) ? U : pathJoin(e, U), G = j.slice(O.texture.length * -1) === O.texture;
7558
- if (G) {
7557
+ var U = V[J], j = isAbsoluteURL(U) ? U : pathJoin(e, U), K = j.slice(O.texture.length * -1) === O.texture;
7558
+ if (K) {
7559
7559
  z = U;
7560
7560
  break;
7561
7561
  }
@@ -7567,41 +7567,41 @@ function parse$4(n, t, e, r, o, s, u) {
7567
7567
  var ie = new PBMMeshMaterial(t ? "phong" : "basic");
7568
7568
  ie.floorIndex = w, C.attributes.normal === void 0 && (ie.flatShading = !0), C.attributes._feature_id_rsmask && (ie.defines.USE_VERTEX_MARK = !0), k.push(ie), z ? (g++, h[z] ? h[z].push(ie) : h[z] = [ie]) : ie.color = new THREE.Color(16777215), p.add(ie);
7569
7569
  }
7570
- var ne = new PBMMesh(C, k);
7571
- ne.name = "model_floor_" + w, ne.userData.createAt = v, ne.userData.description = A, ne.matrix.compose(ne.position, ne.quaternion, ne.scale), ne.matrixAutoUpdate = !1, ne.frustumCulled = !1, c = v, f = A, d.push(ne);
7570
+ var re = new PBMMesh(C, k);
7571
+ re.name = "model_floor_" + w, re.userData.createAt = v, re.userData.description = A, re.matrix.compose(re.position, re.quaternion, re.scale), re.matrixAutoUpdate = !1, re.frustumCulled = !1, c = v, f = A, d.push(re);
7572
7572
  }
7573
7573
  o = autoRestImageOptionsByTextureLength(o, g);
7574
- for (var $ = [], Z = function(W) {
7575
- var ee = void 0;
7576
- s && (ee = s.get(W)), ee || (ee = loadTexture$1(W, e, o, u), s && s.set(W, ee)), $.push(ee.then(function(te) {
7577
- for (var re = 0, de = h[W]; re < de.length; re++) {
7578
- var ae = de[re];
7579
- ae.map && (p.delete(ae.map), ae.map.dispose()), ae.map = te, p.add(te);
7580
- }
7581
- return te;
7574
+ for (var ee = [], Z = function(G) {
7575
+ var W = void 0;
7576
+ s && (W = s.get(G)), W || (W = loadTexture$1(G, o, u), s && s.set(G, W)), ee.push(W.then(function($) {
7577
+ for (var ne = 0, te = h[G]; ne < te.length; ne++) {
7578
+ var ve = te[ne];
7579
+ ve.map && (p.delete(ve.map), ve.map.dispose()), ve.map = $, p.add($);
7580
+ }
7581
+ return $;
7582
7582
  }).catch(function() {
7583
- for (var te = 0, re = h[W]; te < re.length; te++) {
7584
- var de = re[te];
7585
- de.map && (p.delete(de.map), de.map.dispose()), de.map = null, de.color = new THREE.Color(16777215);
7583
+ for (var $ = 0, ne = h[G]; $ < ne.length; $++) {
7584
+ var te = ne[$];
7585
+ te.map && (p.delete(te.map), te.map.dispose()), te.map = null, te.color = new THREE.Color(16777215);
7586
7586
  }
7587
7587
  return null;
7588
7588
  }));
7589
7589
  }, X = 0, se = Object.keys(h); X < se.length; X++) {
7590
- var K = se[X];
7591
- Z(K);
7590
+ var z = se[X];
7591
+ Z(z);
7592
7592
  }
7593
- return Promise.all($).then(function(W) {
7594
- var ee = W.filter(function(te) {
7595
- return te instanceof THREE.Texture;
7593
+ return Promise.all(ee).then(function(G) {
7594
+ var W = G.filter(function($) {
7595
+ return $ instanceof THREE.Texture;
7596
7596
  });
7597
7597
  return {
7598
7598
  createAt: c,
7599
7599
  description: f,
7600
7600
  objects: d,
7601
- textures: ee,
7601
+ textures: W,
7602
7602
  dispose: function() {
7603
- p.forEach(function(te) {
7604
- te.dispose();
7603
+ p.forEach(function($) {
7604
+ $.dispose();
7605
7605
  }), p.clear();
7606
7606
  }
7607
7607
  };
@@ -7960,54 +7960,54 @@ function loadAt3d(n, t) {
7960
7960
  var e, r, o, s, u, l;
7961
7961
  t === void 0 && (t = {});
7962
7962
  for (var c = (e = t.upAxis) !== null && e !== void 0 ? e : "Z", f = (r = t.light) !== null && r !== void 0 ? r : !1, d = (o = t.fetcher) !== null && o !== void 0 ? o : internalFetcher, h = (s = t.textureBaseUri) !== null && s !== void 0 ? s : guessTextureBaseUriFromFileUrl(n), p = t.textureBaseUri === void 0 ? [] : ((u = t.textureArray) !== null && u !== void 0 ? u : []).slice(), g = autoRestImageOptionsByTextureLength((l = t.textureOptions) !== null && l !== void 0 ? l : {}, p.length), m = /* @__PURE__ */ new Map(), E = 0, y = p; E < y.length; E++) {
7963
- var v = y[E];
7964
- m.set(v, loadTexture$1(v, h, g, d));
7963
+ var v = y[E], A = isAbsoluteURL(v) ? v : pathJoin(h, v);
7964
+ m.set(A, loadTexture$1(A, g, d));
7965
7965
  }
7966
- var A = {
7966
+ var b = {
7967
7967
  byteLength: 0
7968
7968
  };
7969
7969
  return Promise.resolve().then(function() {
7970
7970
  return d.ajax(n, {
7971
7971
  responseType: "arraybuffer"
7972
7972
  });
7973
- }).then(function(b) {
7974
- return lzma(b.body);
7975
- }).then(function(b) {
7976
- for (var T = {
7973
+ }).then(function(T) {
7974
+ return lzma(T.body);
7975
+ }).then(function(T) {
7976
+ for (var S = {
7977
7977
  chunks: [],
7978
7978
  createAt: void 0,
7979
7979
  description: void 0
7980
- }, S = 0, R = b; S < R.length; S++) {
7981
- var M = R[S], w = Model$2.decode(M);
7982
- if (w.chunks.length) {
7983
- for (var P = 0; P < w.chunks.length; P++)
7984
- T.chunks.push(w.chunks[P]);
7985
- T.createAt = w.createAt, T.description = w.description;
7980
+ }, R = 0, M = T; R < M.length; R++) {
7981
+ var w = M[R], P = Model$2.decode(w);
7982
+ if (P.chunks.length) {
7983
+ for (var _ = 0; _ < P.chunks.length; _++)
7984
+ S.chunks.push(P.chunks[_]);
7985
+ S.createAt = P.createAt, S.description = P.description;
7986
7986
  }
7987
7987
  }
7988
- return T;
7989
- }).then(function(b) {
7990
- return parse$4(b, f, h, p, g, m, d);
7991
- }).then(function(b) {
7988
+ return S;
7989
+ }).then(function(T) {
7990
+ return parse$4(T, f, h, p, g, m, d);
7991
+ }).then(function(T) {
7992
7992
  m.clear();
7993
- var T = new THREE.Group();
7994
- T.name = n;
7995
- for (var S = 0, R = b.objects; S < R.length; S++) {
7996
- var M = R[S];
7997
- T.add(M);
7993
+ var S = new THREE.Group();
7994
+ S.name = n;
7995
+ for (var R = 0, M = T.objects; R < M.length; R++) {
7996
+ var w = M[R];
7997
+ S.add(w);
7998
7998
  }
7999
- return c === "Y" && T.applyMatrix4(ROTATE_X_MATRIX_INVERSE), {
7999
+ return c === "Y" && S.applyMatrix4(ROTATE_X_MATRIX_INVERSE), {
8000
8000
  type: "at3d",
8001
8001
  modelUpAxis: "Z",
8002
8002
  upAxis: c,
8003
8003
  uri: n,
8004
- byteLength: A.byteLength,
8005
- memoryUsage: getMemoryUsage(T),
8006
- scene: T,
8007
- textures: b.textures,
8004
+ byteLength: b.byteLength,
8005
+ memoryUsage: getMemoryUsage(S),
8006
+ scene: S,
8007
+ textures: T.textures,
8008
8008
  animations: [],
8009
8009
  dispose: function() {
8010
- return b.dispose();
8010
+ return T.dispose();
8011
8011
  }
8012
8012
  };
8013
8013
  });
@@ -8990,12 +8990,12 @@ var Parser = (
8990
8990
  Promise.all(m)
8991
8991
  ]).then(function(M) {
8992
8992
  for (var w = M[0], P = M[1], _ = M[2], I = M[3], C = M[4], H = [], L = function(q, z) {
8993
- var J = w[q], V = P[q], U = _[q], j = I[q], G = C[q];
8993
+ var J = w[q], V = P[q], U = _[q], j = I[q], K = C[q];
8994
8994
  if (J === void 0)
8995
8995
  return "continue";
8996
8996
  J.updateMatrix(), J.matrixAutoUpdate = !0;
8997
8997
  var ie = void 0;
8998
- switch (PATH_PROPERTIES[G.path]) {
8998
+ switch (PATH_PROPERTIES[K.path]) {
8999
8999
  case PATH_PROPERTIES.weights:
9000
9000
  ie = THREE.NumberKeyframeTrack;
9001
9001
  break;
@@ -9008,19 +9008,19 @@ var Parser = (
9008
9008
  ie = THREE.VectorKeyframeTrack;
9009
9009
  break;
9010
9010
  }
9011
- var ne = J.name ? J.name : J.uuid, $ = j.interpolation !== void 0 ? INTERPOLATION[j.interpolation] : THREE.InterpolateLinear, Z = [];
9012
- PATH_PROPERTIES[G.path] === PATH_PROPERTIES.weights ? J.traverse(function(re) {
9013
- re.morphTargetInfluences && Z.push(re.name ? re.name : re.uuid);
9014
- }) : Z.push(ne);
9011
+ var re = J.name ? J.name : J.uuid, ee = j.interpolation !== void 0 ? INTERPOLATION[j.interpolation] : THREE.InterpolateLinear, Z = [];
9012
+ PATH_PROPERTIES[K.path] === PATH_PROPERTIES.weights ? J.traverse(function(te) {
9013
+ te.morphTargetInfluences && Z.push(te.name ? te.name : te.uuid);
9014
+ }) : Z.push(re);
9015
9015
  var X = U.array;
9016
9016
  if (U.normalized) {
9017
- for (var se = getNormalizedComponentScale(X.constructor), K = new Float32Array(X.length), W = 0, ee = X.length; W < ee; W++)
9018
- K[W] = X[W] * se;
9019
- X = K;
9017
+ for (var se = getNormalizedComponentScale(X.constructor), G = new Float32Array(X.length), W = 0, $ = X.length; W < $; W++)
9018
+ G[W] = X[W] * se;
9019
+ X = G;
9020
9020
  }
9021
- for (var W = 0, ee = Z.length; W < ee; W++) {
9022
- var te = new ie(Z[W] + "." + PATH_PROPERTIES[G.path], V.array, X, $);
9023
- H.push(te);
9021
+ for (var W = 0, $ = Z.length; W < $; W++) {
9022
+ var ne = new ie(Z[W] + "." + PATH_PROPERTIES[K.path], V.array, X, ee);
9023
+ H.push(ne);
9024
9024
  }
9025
9025
  }, O = 0, k = w.length; O < k; O++)
9026
9026
  L(O);
@@ -11677,11 +11677,11 @@ var flrm = /* @__PURE__ */ hMap(flt, 9, 1), fdrm = /* @__PURE__ */ hMap(fdt, 5,
11677
11677
  return e || new u8(0);
11678
11678
  var u = !e, l = u || t.i != 2, c = t.i;
11679
11679
  u && (e = new u8(o * 3));
11680
- var f = function(K) {
11680
+ var f = function(G) {
11681
11681
  var W = e.length;
11682
- if (K > W) {
11683
- var ee = new u8(Math.max(W * 2, K));
11684
- ee.set(e), e = ee;
11682
+ if (G > W) {
11683
+ var $ = new u8(Math.max(W * 2, G));
11684
+ $.set(e), e = $;
11685
11685
  }
11686
11686
  }, d = t.f || 0, h = t.p || 0, p = t.b || 0, g = t.l, m = t.d, E = t.m, y = t.n, v = o * 8;
11687
11687
  do {
@@ -11740,16 +11740,16 @@ var flrm = /* @__PURE__ */ hMap(flt, 9, 1), fdrm = /* @__PURE__ */ hMap(fdt, 5,
11740
11740
  U = h, g = null;
11741
11741
  break;
11742
11742
  } else {
11743
- var G = j - 254;
11743
+ var K = j - 254;
11744
11744
  if (j > 264) {
11745
11745
  var I = j - 257, ie = fleb[I];
11746
- G = bits(n, h, (1 << ie) - 1) + fl[I], h += ie;
11746
+ K = bits(n, h, (1 << ie) - 1) + fl[I], h += ie;
11747
11747
  }
11748
- var ne = m[bits16(n, h) & V], $ = ne >> 4;
11749
- ne || err(3), h += ne & 15;
11750
- var z = fd[$];
11751
- if ($ > 3) {
11752
- var ie = fdeb[$];
11748
+ var re = m[bits16(n, h) & V], ee = re >> 4;
11749
+ re || err(3), h += re & 15;
11750
+ var z = fd[ee];
11751
+ if (ee > 3) {
11752
+ var ie = fdeb[ee];
11753
11753
  z += bits16(n, h) & (1 << ie) - 1, h += ie;
11754
11754
  }
11755
11755
  if (h > v) {
@@ -11757,7 +11757,7 @@ var flrm = /* @__PURE__ */ hMap(flt, 9, 1), fdrm = /* @__PURE__ */ hMap(fdt, 5,
11757
11757
  break;
11758
11758
  }
11759
11759
  l && f(p + 131072);
11760
- var Z = p + G;
11760
+ var Z = p + K;
11761
11761
  if (p < z) {
11762
11762
  var X = s - z, se = Math.min(z, Z);
11763
11763
  for (X + p < 0 && err(3); p < se; ++p)
@@ -13459,43 +13459,43 @@ function loadX3p(n, t) {
13459
13459
  });
13460
13460
  }
13461
13461
  function parse$1(n, t) {
13462
- for (var e, r, o, s, u, l, c, f, d, h, p, g, m, E, y, v, A, b, T, S, R, M, w, P, _, I, C, H, L, O, k, D, q, z, J, V, U, j, G, ie, ne, $, Z, X, se, K, W, ee, te, re, de, ae, fe, be, oe = unzipSync(n), ue = "", me = null, ge = 0, Ae = Object.keys(oe); ge < Ae.length; ge++) {
13462
+ for (var e, r, o, s, u, l, c, f, d, h, p, g, m, E, y, v, A, b, T, S, R, M, w, P, _, I, C, H, L, O, k, D, q, z, J, V, U, j, K, ie, re, ee, Z, X, se, G, W, $, ne, te, ve, oe, fe, be, ae = unzipSync(n), ue = "", me = null, ge = 0, Ae = Object.keys(ae); ge < Ae.length; ge++) {
13463
13463
  var Te = Ae[ge];
13464
- /(^|\/)main\.xml$/i.test(Te) && (me = oe[Te], ue = Te.slice(0, Te.lastIndexOf("/") + 1));
13464
+ /(^|\/)main\.xml$/i.test(Te) && (me = ae[Te], ue = Te.slice(0, Te.lastIndexOf("/") + 1));
13465
13465
  }
13466
13466
  if (!me)
13467
13467
  throw new Error("X3p: main.xml not found.");
13468
13468
  if (typeof DOMParser == "undefined")
13469
13469
  throw new Error("X3p: DOMParser not found.");
13470
- var pe = (e = t.color) !== null && e !== void 0 ? e : new THREE.Color(10066329), Se = new DOMParser(), _e = decodeText(me), Ee = Se.parseFromString(_e, "text/xml"), he = Ee.querySelector("Record1 Axes"), Ve = {
13470
+ var he = (e = t.color) !== null && e !== void 0 ? e : new THREE.Color(10066329), Se = new DOMParser(), _e = decodeText(me), Ee = Se.parseFromString(_e, "text/xml"), de = Ee.querySelector("Record1 Axes"), Ve = {
13471
13471
  x: {
13472
- type: (s = (o = (r = he == null ? void 0 : he.querySelector("CX AxisType")) === null || r === void 0 ? void 0 : r.textContent) === null || o === void 0 ? void 0 : o.toUpperCase()) !== null && s !== void 0 ? s : "I",
13473
- dataType: (c = (l = (u = he == null ? void 0 : he.querySelector("CX DataType")) === null || u === void 0 ? void 0 : u.textContent) === null || l === void 0 ? void 0 : l.toUpperCase()) !== null && c !== void 0 ? c : "D",
13474
- increment: Number((d = (f = he == null ? void 0 : he.querySelector("CX Increment")) === null || f === void 0 ? void 0 : f.textContent) !== null && d !== void 0 ? d : "1"),
13475
- offset: Number((p = (h = he == null ? void 0 : he.querySelector("CX Offset")) === null || h === void 0 ? void 0 : h.textContent) !== null && p !== void 0 ? p : "0")
13472
+ type: (s = (o = (r = de == null ? void 0 : de.querySelector("CX AxisType")) === null || r === void 0 ? void 0 : r.textContent) === null || o === void 0 ? void 0 : o.toUpperCase()) !== null && s !== void 0 ? s : "I",
13473
+ dataType: (c = (l = (u = de == null ? void 0 : de.querySelector("CX DataType")) === null || u === void 0 ? void 0 : u.textContent) === null || l === void 0 ? void 0 : l.toUpperCase()) !== null && c !== void 0 ? c : "D",
13474
+ increment: Number((d = (f = de == null ? void 0 : de.querySelector("CX Increment")) === null || f === void 0 ? void 0 : f.textContent) !== null && d !== void 0 ? d : "1"),
13475
+ offset: Number((p = (h = de == null ? void 0 : de.querySelector("CX Offset")) === null || h === void 0 ? void 0 : h.textContent) !== null && p !== void 0 ? p : "0")
13476
13476
  },
13477
13477
  y: {
13478
- type: (E = (m = (g = he == null ? void 0 : he.querySelector("CY AxisType")) === null || g === void 0 ? void 0 : g.textContent) === null || m === void 0 ? void 0 : m.toUpperCase()) !== null && E !== void 0 ? E : "I",
13479
- dataType: (A = (v = (y = he == null ? void 0 : he.querySelector("CY DataType")) === null || y === void 0 ? void 0 : y.textContent) === null || v === void 0 ? void 0 : v.toUpperCase()) !== null && A !== void 0 ? A : "D",
13480
- increment: Number((T = (b = he == null ? void 0 : he.querySelector("CY Increment")) === null || b === void 0 ? void 0 : b.textContent) !== null && T !== void 0 ? T : "1"),
13481
- offset: Number((R = (S = he == null ? void 0 : he.querySelector("CY Offset")) === null || S === void 0 ? void 0 : S.textContent) !== null && R !== void 0 ? R : "0")
13478
+ type: (E = (m = (g = de == null ? void 0 : de.querySelector("CY AxisType")) === null || g === void 0 ? void 0 : g.textContent) === null || m === void 0 ? void 0 : m.toUpperCase()) !== null && E !== void 0 ? E : "I",
13479
+ dataType: (A = (v = (y = de == null ? void 0 : de.querySelector("CY DataType")) === null || y === void 0 ? void 0 : y.textContent) === null || v === void 0 ? void 0 : v.toUpperCase()) !== null && A !== void 0 ? A : "D",
13480
+ increment: Number((T = (b = de == null ? void 0 : de.querySelector("CY Increment")) === null || b === void 0 ? void 0 : b.textContent) !== null && T !== void 0 ? T : "1"),
13481
+ offset: Number((R = (S = de == null ? void 0 : de.querySelector("CY Offset")) === null || S === void 0 ? void 0 : S.textContent) !== null && R !== void 0 ? R : "0")
13482
13482
  },
13483
13483
  z: {
13484
- type: (P = (w = (M = he == null ? void 0 : he.querySelector("CZ AxisType")) === null || M === void 0 ? void 0 : M.textContent) === null || w === void 0 ? void 0 : w.toUpperCase()) !== null && P !== void 0 ? P : "A",
13485
- dataType: (C = (I = (_ = he == null ? void 0 : he.querySelector("CZ DataType")) === null || _ === void 0 ? void 0 : _.textContent) === null || I === void 0 ? void 0 : I.toUpperCase()) !== null && C !== void 0 ? C : "D",
13486
- increment: Number((L = (H = he == null ? void 0 : he.querySelector("CZ Increment")) === null || H === void 0 ? void 0 : H.textContent) !== null && L !== void 0 ? L : "1"),
13487
- offset: Number((k = (O = he == null ? void 0 : he.querySelector("CZ Offset")) === null || O === void 0 ? void 0 : O.textContent) !== null && k !== void 0 ? k : "0")
13484
+ type: (P = (w = (M = de == null ? void 0 : de.querySelector("CZ AxisType")) === null || M === void 0 ? void 0 : M.textContent) === null || w === void 0 ? void 0 : w.toUpperCase()) !== null && P !== void 0 ? P : "A",
13485
+ dataType: (C = (I = (_ = de == null ? void 0 : de.querySelector("CZ DataType")) === null || _ === void 0 ? void 0 : _.textContent) === null || I === void 0 ? void 0 : I.toUpperCase()) !== null && C !== void 0 ? C : "D",
13486
+ increment: Number((L = (H = de == null ? void 0 : de.querySelector("CZ Increment")) === null || H === void 0 ? void 0 : H.textContent) !== null && L !== void 0 ? L : "1"),
13487
+ offset: Number((k = (O = de == null ? void 0 : de.querySelector("CZ Offset")) === null || O === void 0 ? void 0 : O.textContent) !== null && k !== void 0 ? k : "0")
13488
13488
  }
13489
13489
  }, ye = null, Be = Ee.querySelector("Record1 Axes Rotation");
13490
- Be && (ye = new THREE.Matrix3(), ye.set(Number((q = (D = Be.querySelector("r11")) === null || D === void 0 ? void 0 : D.textContent) !== null && q !== void 0 ? q : 0), Number((J = (z = Be.querySelector("r12")) === null || z === void 0 ? void 0 : z.textContent) !== null && J !== void 0 ? J : 0), Number((U = (V = Be.querySelector("r13")) === null || V === void 0 ? void 0 : V.textContent) !== null && U !== void 0 ? U : 0), Number((G = (j = Be.querySelector("r21")) === null || j === void 0 ? void 0 : j.textContent) !== null && G !== void 0 ? G : 0), Number((ne = (ie = Be.querySelector("r22")) === null || ie === void 0 ? void 0 : ie.textContent) !== null && ne !== void 0 ? ne : 0), Number((Z = ($ = Be.querySelector("r23")) === null || $ === void 0 ? void 0 : $.textContent) !== null && Z !== void 0 ? Z : 0), Number((se = (X = Be.querySelector("r31")) === null || X === void 0 ? void 0 : X.textContent) !== null && se !== void 0 ? se : 0), Number((W = (K = Be.querySelector("r32")) === null || K === void 0 ? void 0 : K.textContent) !== null && W !== void 0 ? W : 0), Number((te = (ee = Be.querySelector("r33")) === null || ee === void 0 ? void 0 : ee.textContent) !== null && te !== void 0 ? te : 0)));
13491
- var Ie = (re = Ee.querySelector("Record3 DataLink PointDataLink")) === null || re === void 0 ? void 0 : re.textContent;
13490
+ Be && (ye = new THREE.Matrix3(), ye.set(Number((q = (D = Be.querySelector("r11")) === null || D === void 0 ? void 0 : D.textContent) !== null && q !== void 0 ? q : 0), Number((J = (z = Be.querySelector("r12")) === null || z === void 0 ? void 0 : z.textContent) !== null && J !== void 0 ? J : 0), Number((U = (V = Be.querySelector("r13")) === null || V === void 0 ? void 0 : V.textContent) !== null && U !== void 0 ? U : 0), Number((K = (j = Be.querySelector("r21")) === null || j === void 0 ? void 0 : j.textContent) !== null && K !== void 0 ? K : 0), Number((re = (ie = Be.querySelector("r22")) === null || ie === void 0 ? void 0 : ie.textContent) !== null && re !== void 0 ? re : 0), Number((Z = (ee = Be.querySelector("r23")) === null || ee === void 0 ? void 0 : ee.textContent) !== null && Z !== void 0 ? Z : 0), Number((se = (X = Be.querySelector("r31")) === null || X === void 0 ? void 0 : X.textContent) !== null && se !== void 0 ? se : 0), Number((W = (G = Be.querySelector("r32")) === null || G === void 0 ? void 0 : G.textContent) !== null && W !== void 0 ? W : 0), Number((ne = ($ = Be.querySelector("r33")) === null || $ === void 0 ? void 0 : $.textContent) !== null && ne !== void 0 ? ne : 0)));
13491
+ var Ie = (te = Ee.querySelector("Record3 DataLink PointDataLink")) === null || te === void 0 ? void 0 : te.textContent;
13492
13492
  if (typeof Ie != "string")
13493
13493
  throw new Error("X3p: PointDataLink not found.");
13494
13494
  Ie = pathJoin(ue, Ie);
13495
- var $e = oe[Ie];
13495
+ var $e = ae[Ie];
13496
13496
  if (!$e)
13497
13497
  throw new Error("X3p: ".concat($e, " not found."));
13498
- for (var Re = getPointArray($e.buffer, Ve.z.dataType), ze = Number((ae = (de = Ee.querySelector("Record3 MatrixDimension SizeX")) === null || de === void 0 ? void 0 : de.textContent) !== null && ae !== void 0 ? ae : "0"), Fe = Number((be = (fe = Ee.querySelector("Record3 MatrixDimension SizeY")) === null || fe === void 0 ? void 0 : fe.textContent) !== null && be !== void 0 ? be : "0"), Oe = Math.floor(ze - 1), Le = Math.floor(Fe - 1), Ue = Oe + 1, tt = Le + 1, lt = new Float32Array(Ue * tt * 3), nt = new Float32Array(Ue * tt * 2), ot = new Uint32Array(Oe * Le * 6), At = new THREE.Box3(), We = 0; We < tt; We++)
13498
+ for (var Re = getPointArray($e.buffer, Ve.z.dataType), ze = Number((oe = (ve = Ee.querySelector("Record3 MatrixDimension SizeX")) === null || ve === void 0 ? void 0 : ve.textContent) !== null && oe !== void 0 ? oe : "0"), Fe = Number((be = (fe = Ee.querySelector("Record3 MatrixDimension SizeY")) === null || fe === void 0 ? void 0 : fe.textContent) !== null && be !== void 0 ? be : "0"), Oe = Math.floor(ze - 1), Le = Math.floor(Fe - 1), Ue = Oe + 1, tt = Le + 1, lt = new Float32Array(Ue * tt * 3), nt = new Float32Array(Ue * tt * 2), ot = new Uint32Array(Oe * Le * 6), At = new THREE.Box3(), We = 0; We < tt; We++)
13499
13499
  for (var Ct = We * Ve.y.increment + Ve.y.offset, He = 0; He < Ue; He++) {
13500
13500
  var Ne = We * Ue + He, bt = He * Ve.x.increment + Ve.x.offset, It = Re[Ne], Tt = !isNaN(It), yt = Tt ? It : NaN;
13501
13501
  _vector.set(bt, -Ct, yt), ye && _vector.applyMatrix3(ye), Tt && At.expandByPoint(_vector), lt[Ne * 3 + 0] = _vector.x, lt[Ne * 3 + 1] = _vector.y, lt[Ne * 3 + 2] = _vector.z, nt[Ne * 2 + 0] = He / Oe, nt[Ne * 2 + 1] = 1 - We / Le;
@@ -13508,7 +13508,7 @@ function parse$1(n, t) {
13508
13508
  var ce = new THREE.BufferGeometry();
13509
13509
  ce.setAttribute("position", new THREE.BufferAttribute(lt, 3)), ce.setAttribute("uv", new THREE.BufferAttribute(nt, 2)), ce.setIndex(new THREE.BufferAttribute(ot, 1)), (!ce.groups || ce.groups.length === 0) && ce.addGroup(0, ce.index ? ce.index.count : ce.attributes.position.count, 0), ce.boundingBox = At;
13510
13510
  var Me = new PBMMeshMaterial(t.light ? "phong" : "basic");
13511
- Me.flatShading = !0, Me.color.copy(pe);
13511
+ Me.flatShading = !0, Me.color.copy(he);
13512
13512
  var Ce = new PBMMesh(ce, [Me]);
13513
13513
  return {
13514
13514
  object: Ce,
@@ -14054,8 +14054,14 @@ function packBVHNode(n, t) {
14054
14054
  c = l.id * BYTES_PER_NODE / 4, r[c] = l.extents[0], r[c + 1] = l.extents[1], r[c + 2] = l.extents[2], r[c + 3] = l.extents[3], r[c + 4] = l.extents[4], r[c + 5] = l.extents[5], o[c + 6] = l.startIndex, o[c + 7] = l.endIndex, c = l.id * BYTES_PER_NODE / 2, l.node0 && (s[c + 16] = l.node0.id, u.push(l.node0)), l.node1 && (s[c + 17] = l.node1.id, u.push(l.node1));
14055
14055
  return e;
14056
14056
  }
14057
+ function containsNodeBox(n, t, e) {
14058
+ e === void 0 && (e = 0);
14059
+ var r = t.min.x - e, o = t.min.y - e, s = t.min.z - e, u = t.max.x + e, l = t.max.y + e, c = t.max.z + e;
14060
+ return n.x >= r && n.x <= u && n.y >= o && n.y <= l && n.z >= s && n.z <= c;
14061
+ }
14057
14062
  function intersectNodeBox(n, t, e, r) {
14058
- r === void 0 && (r = 0);
14063
+ if (r === void 0 && (r = 0), containsNodeBox(n, e, r))
14064
+ return 0;
14059
14065
  var o = e.min.x - r, s = e.min.y - r, u = e.min.z - r, l = e.max.x + r, c = e.max.y + r, f = e.max.z + r, d = 0, h = 0, p = 0, g = 0, m = 0, E = 0;
14060
14066
  return t.x >= 0 ? (d = (o - n.x) * t.x, h = (l - n.x) * t.x) : (d = (l - n.x) * t.x, h = (o - n.x) * t.x), t.y >= 0 ? (p = (s - n.y) * t.y, g = (c - n.y) * t.y) : (p = (c - n.y) * t.y, g = (s - n.y) * t.y), d > g || p > h || ((p > d || d !== d) && (d = p), (g < h || h !== h) && (h = g), t.z >= 0 ? (m = (u - n.z) * t.z, E = (f - n.z) * t.z) : (m = (f - n.z) * t.z, E = (u - n.z) * t.z), d > E || m > h) || ((m > d || d !== d) && (d = m), (E < h || h !== h) && (h = E), h < 0) ? null : d >= 0 ? d : h;
14061
14067
  }
@@ -14145,13 +14151,13 @@ var BVHVector3 = (
14145
14151
  var D = k.startIndex, q = k.endIndex, z = k.extents;
14146
14152
  C[0] = z[3] - z[0], C[1] = z[4] - z[1], C[2] = z[5] - z[2], H.sort(L);
14147
14153
  for (var J = 0; J < 3; J++) {
14148
- for (var V = H[J], U = z[V] + z[V + 3], j = D, G = q - 1, ie = -1, ne = void 0; j <= G; )
14149
- ie === -1 ? (ne = u[j], l[ne * 6 + V] + l[ne * 6 + V + 3] < U ? j++ : ie = ne) : (ne = u[G], l[ne * 6 + V] + l[ne * 6 + V + 3] >= U || (u[j] = ne, u[G] = ie, ie = -1, j++), G--);
14154
+ for (var V = H[J], U = z[V] + z[V + 3], j = D, K = q - 1, ie = -1, re = void 0; j <= K; )
14155
+ ie === -1 ? (re = u[j], l[re * 6 + V] + l[re * 6 + V + 3] < U ? j++ : ie = re) : (re = u[K], l[re * 6 + V] + l[re * 6 + V + 3] >= U || (u[j] = re, u[K] = ie, ie = -1, j++), K--);
14150
14156
  if (j > D && j < q) {
14151
- var $ = new BVHNode(++d, calcExtents(u, l, D, j, EPSILON$1), D, j, k.deepth + 1);
14152
- $.deepth < r && $.endIndex - $.startIndex > e && (c[f++] = $);
14157
+ var ee = new BVHNode(++d, calcExtents(u, l, D, j, EPSILON$1), D, j, k.deepth + 1);
14158
+ ee.deepth < r && ee.endIndex - ee.startIndex > e && (c[f++] = ee);
14153
14159
  var Z = new BVHNode(++d, calcExtents(u, l, j, q, EPSILON$1), j, q, k.deepth + 1);
14154
- Z.deepth < r && Z.endIndex - Z.startIndex > e && (c[f++] = Z), k.node0 = $, k.node1 = Z, k.startIndex = 0, k.endIndex = 0;
14160
+ Z.deepth < r && Z.endIndex - Z.startIndex > e && (c[f++] = Z), k.node0 = ee, k.node1 = Z, k.startIndex = 0, k.endIndex = 0;
14155
14161
  break;
14156
14162
  }
14157
14163
  }
@@ -14190,21 +14196,21 @@ var BVHVector3 = (
14190
14196
  this.getPositionByIndex(L + 1, z);
14191
14197
  var J = z.x, V = z.y, U = z.z, j = new BVHVector3(0, 0, 0);
14192
14198
  this.getPositionByIndex(L + 2, j);
14193
- var G = j.x, ie = j.y, ne = j.z, $ = J - k, Z = V - D, X = U - q, se = G - k, K = ie - D, W = ne - q, ee = Z * W - X * K, te = X * se - $ * W, re = $ * K - Z * se, de = M * ee + w * te + P * re, ae = void 0;
14194
- if (de > 0)
14195
- ae = 1;
14196
- else if (de < 0)
14197
- ae = -1, de = -de;
14199
+ var K = j.x, ie = j.y, re = j.z, ee = J - k, Z = V - D, X = U - q, se = K - k, G = ie - D, W = re - q, $ = Z * W - X * G, ne = X * se - ee * W, te = ee * G - Z * se, ve = M * $ + w * ne + P * te, oe = void 0;
14200
+ if (ve > 0)
14201
+ oe = 1;
14202
+ else if (ve < 0)
14203
+ oe = -1, ve = -ve;
14198
14204
  else
14199
14205
  continue;
14200
- var fe = T - k, be = S - D, oe = R - q, ue = ae * (M * (be * W - oe * K) + w * (oe * se - fe * W) + P * (fe * K - be * se));
14206
+ var fe = T - k, be = S - D, ae = R - q, ue = oe * (M * (be * W - ae * G) + w * (ae * se - fe * W) + P * (fe * G - be * se));
14201
14207
  if (!(ue < 0)) {
14202
- var me = ae * (M * (Z * oe - X * be) + w * (X * fe - $ * oe) + P * ($ * be - Z * fe));
14203
- if (!(me < 0) && !(ue + me > de)) {
14204
- var ge = -ae * (fe * ee + be * te + oe * re);
14208
+ var me = oe * (M * (Z * ae - X * be) + w * (X * fe - ee * ae) + P * (ee * be - Z * fe));
14209
+ if (!(me < 0) && !(ue + me > ve)) {
14210
+ var ge = -oe * (fe * $ + be * ne + ae * te);
14205
14211
  if (!(ge < 0)) {
14206
- var Ae = ge / de, Te = new BVHVector3(T + M * Ae, S + w * Ae, R + P * Ae), pe = new BVHIntersect(O, z, j, H, Te);
14207
- (!u || u(pe)) && (s ? Ae < v && (v = Ae, l.length > 0 && (l.length = 0), l.push(pe)) : l.push(pe));
14212
+ var Ae = ge / ve, Te = new BVHVector3(T + M * Ae, S + w * Ae, R + P * Ae), he = new BVHIntersect(O, z, j, H, Te);
14213
+ (!u || u(he)) && (s ? Ae < v && (v = Ae, l.length > 0 && (l.length = 0), l.push(he)) : l.push(he));
14208
14214
  }
14209
14215
  }
14210
14216
  }
@@ -14277,8 +14283,8 @@ var EPSILON = 1e-6, ORDER_AXISES = ["x", "y", "z"], scratchVector3$8 = new BVHVe
14277
14283
  if (C > D) {
14278
14284
  var j = H.slice();
14279
14285
  j[L] = k - EPSILON;
14280
- var G = new BVHNode(++d, j, D, C, _.deepth + 1);
14281
- G.deepth < r && G.endIndex - G.startIndex > e && (c[f++] = G), _.node1 = G;
14286
+ var K = new BVHNode(++d, j, D, C, _.deepth + 1);
14287
+ K.deepth < r && K.endIndex - K.startIndex > e && (c[f++] = K), _.node1 = K;
14282
14288
  }
14283
14289
  _.startIndex = 0, _.endIndex = 0;
14284
14290
  }
@@ -14301,15 +14307,15 @@ var EPSILON = 1e-6, ORDER_AXISES = ["x", "y", "z"], scratchVector3$8 = new BVHVe
14301
14307
  (!u || u(V)) && (s ? z < A && (A = z, l.length > 0 && (l.length = 0), l.push(V)) : l.push(V));
14302
14308
  }
14303
14309
  }
14304
- var U = y * BYTES_PER_NODE / 2, j = p[U + 16], G = p[U + 17];
14305
- j && E.push(j), G && E.push(G);
14310
+ var U = y * BYTES_PER_NODE / 2, j = p[U + 16], K = p[U + 17];
14311
+ j && E.push(j), K && E.push(K);
14306
14312
  }
14307
14313
  }
14308
14314
  return l;
14309
14315
  }, t;
14310
14316
  })(BVHObject)
14311
14317
  );
14312
- const jsContent = `(function(){"use strict";var ur=function(o,r){return ur=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},ur(o,r)};function yr(o,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");ur(o,r);function t(){this.constructor=o}o.prototype=r===null?Object.create(r):(t.prototype=r.prototype,new t)}typeof SuppressedError=="function"&&SuppressedError;var cr=(function(){function o(r,t){this.position=r,this.indices=t}return o.prototype.getPositionCount=function(){var r,t,n=this.indices,e=this.position;return n?n.array.length/((r=n.stride)!==null&&r!==void 0?r:1):e.array.length/((t=e.stride)!==null&&t!==void 0?t:3)},o.prototype.getPositionByIndex=function(r,t){var n,e,h,v,i=this.indices,f=this.position,l=r;if(i){var y=i.array,s=(n=i.stride)!==null&&n!==void 0?n:1,d=(e=i.offset)!==null&&e!==void 0?e:0;l=y[r*s+d]}var u=f.array,x=(h=f.stride)!==null&&h!==void 0?h:3,w=(v=f.offset)!==null&&v!==void 0?v:0;return l=l*x+w,t.x=u[l],t.y=u[l+1],t.z=u[l+2],t},o.prototype.createTree=function(r,t,n){throw new Error("not implemented")},o.prototype.trianglesInSphere=function(r,t){throw new Error("not implemented")},o.prototype.intersectRay=function(r,t,n,e,h){throw new Error("not implemented")},o})(),D=(function(){function o(r,t,n,e,h){this.id=r,this.extents=t,this.startIndex=n,this.endIndex=e,this.deepth=h}return o})(),X=36;function lr(o,r){for(var t=new ArrayBuffer(r*X),n=new Float32Array(t),e=new Uint32Array(t),h=new Uint16Array(t),v=[o],i,f;i=v.pop();)f=i.id*X/4,n[f]=i.extents[0],n[f+1]=i.extents[1],n[f+2]=i.extents[2],n[f+3]=i.extents[3],n[f+4]=i.extents[4],n[f+5]=i.extents[5],e[f+6]=i.startIndex,e[f+7]=i.endIndex,f=i.id*X/2,i.node0&&(h[f+16]=i.node0.id,v.push(i.node0)),i.node1&&(h[f+17]=i.node1.id,v.push(i.node1));return t}function dr(o,r,t,n){n===void 0&&(n=0);var e=t.min.x-n,h=t.min.y-n,v=t.min.z-n,i=t.max.x+n,f=t.max.y+n,l=t.max.z+n,y=0,s=0,d=0,u=0,x=0,w=0;return r.x>=0?(y=(e-o.x)*r.x,s=(i-o.x)*r.x):(y=(i-o.x)*r.x,s=(e-o.x)*r.x),r.y>=0?(d=(h-o.y)*r.y,u=(f-o.y)*r.y):(d=(f-o.y)*r.y,u=(h-o.y)*r.y),y>u||d>s||((d>y||y!==y)&&(y=d),(u<s||s!==s)&&(s=u),r.z>=0?(x=(v-o.z)*r.z,w=(l-o.z)*r.z):(x=(l-o.z)*r.z,w=(v-o.z)*r.z),y>w||x>s)||((x>y||y!==y)&&(y=x),(w<s||s!==s)&&(s=w),s<0)?null:y>=0?y:s}var H=(function(){function o(r,t,n){this.x=r,this.y=t,this.z=n}return o.prototype.copy=function(r){return this.x=r.x,this.y=r.y,this.z=r.z,this},o.prototype.set=function(r,t,n){return this.x=r,this.y=t,this.z=n,this},o.prototype.fromArray=function(r,t){return t===void 0&&(t=0),this.x=r[t],this.y=r[t+1],this.z=r[t+2],this},o.prototype.toArray=function(r,t){return r===void 0&&(r=[]),t===void 0&&(t=0),r[t]=this.x,r[t+1]=this.y,r[t+2]=this.z,r},o.prototype.add=function(r){return this.x+=r.x,this.y+=r.y,this.z+=r.z,this},o.prototype.multiplyScalar=function(r){return this.x*=r,this.y*=r,this.z*=r,this},o.prototype.subVectors=function(r,t){return this.x=r.x-t.x,this.y=r.y-t.y,this.z=r.z-t.z,this},o.prototype.addScaledVector=function(r,t){return this.x+=r.x*t,this.y+=r.y*t,this.z+=r.z*t,this},o.prototype.dot=function(r){return this.x*r.x+this.y*r.y+this.z*r.z},o.prototype.cross=function(r){var t=this.x,n=this.y,e=this.z;return this.x=n*r.z-e*r.y,this.y=e*r.x-t*r.z,this.z=t*r.y-n*r.x,this},o.prototype.crossVectors=function(r,t){var n=r.x,e=r.y,h=r.z,v=t.x,i=t.y,f=t.z;return this.x=e*f-h*i,this.y=h*v-n*f,this.z=n*i-e*v,this},o.prototype.distanceTo=function(r){return Math.sqrt(this.distanceToSquared(r))},o.prototype.distanceToSquared=function(r){var t=this.x-r.x,n=this.y-r.y,e=this.z-r.z;return t*t+n*n+e*e},o.prototype.clone=function(){return new o(this.x,this.y,this.z)},o})(),wr=(function(){function o(r,t,n,e,h){this.pointA=r,this.pointB=t,this.pointC=n,this.index=e,this.intersectionPoint=h}return o})(),xr=(function(){function o(r,t){this.min=r,this.max=t}return o})(),pr=1e-6,J=new H(0,0,0),Y=new H(0,0,0),g=new H(0,0,0),Z=new H(0,0,0),Hr=(function(o){yr(r,o);function r(){return o!==null&&o.apply(this,arguments)||this}return r.prototype.createTree=function(t,n,e){n=Math.min(n,16);var h=this.getPositionCount()/3,v=h>65535?new Uint32Array(h):new Uint16Array(h),i=new Float32Array(h*6),f=[],l=0,y=-1;if(e)for(var s=0;s<h;s+=1){var d=s*3,u=s*6,x=void 0,w=void 0,z=void 0,I=void 0,c=void 0,p=void 0,a=void 0;v[s]=s,this.getPositionByIndex(d,Y),this.getPositionByIndex(d+1,g),this.getPositionByIndex(d+2,Z),x=I=Y.x,a=g.x,a<x&&(x=a),a>I&&(I=a),a=Z.x,a<x&&(x=a),a>I&&(I=a),w=c=Y.y,a=g.y,a<w&&(w=a),a>c&&(c=a),a=Z.y,a<w&&(w=a),a>c&&(c=a),z=p=Y.z,a=g.z,a<z&&(z=a),a>p&&(p=a),a=Z.z,a<z&&(z=a),a>p&&(p=a),i[u]=x,i[u+1]=w,i[u+2]=z,i[u+3]=I,i[u+4]=c,i[u+5]=p}else{for(var F=1/0,k=1/0,E=1/0,S=-1/0,V=-1/0,U=-1/0,s=0;s<h;s+=1){var d=s*3,u=s*6,x=void 0,w=void 0,z=void 0,I=void 0,c=void 0,p=void 0,a=void 0;v[s]=s,this.getPositionByIndex(d,Y),this.getPositionByIndex(d+1,g),this.getPositionByIndex(d+2,Z),x=I=Y.x,a=g.x,a<x&&(x=a),a>I&&(I=a),a=Z.x,a<x&&(x=a),a>I&&(I=a),w=c=Y.y,a=g.y,a<w&&(w=a),a>c&&(c=a),a=Z.y,a<w&&(w=a),a>c&&(c=a),z=p=Y.z,a=g.z,a<z&&(z=a),a>p&&(p=a),a=Z.z,a<z&&(z=a),a>p&&(p=a),i[u]=x,i[u+1]=w,i[u+2]=z,i[u+3]=I,i[u+4]=c,i[u+5]=p,x<F&&(F=x),I>S&&(S=I),w<k&&(k=w),c>V&&(V=c),z<E&&(E=z),p>U&&(U=p)}e=[F,k,E,S,V,U]}var W=new D(++y,e,0,h,0);f[l++]=W;var M=[],T=[0,1,2],j=function(P,B){return M[B]-M[P]};function q(P){var B=P.startIndex,_=P.endIndex,A=P.extents;M[0]=A[3]-A[0],M[1]=A[4]-A[1],M[2]=A[5]-A[2],T.sort(j);for(var $=0;$<3;$++){for(var C=T[$],G=A[C]+A[C+3],N=B,L=_-1,O=-1,Q=void 0;N<=L;)O===-1?(Q=v[N],i[Q*6+C]+i[Q*6+C+3]<G?N++:O=Q):(Q=v[L],i[Q*6+C]+i[Q*6+C+3]>=G||(v[N]=Q,v[L]=O,O=-1,N++),L--);if(N>B&&N<_){var R=new D(++y,zr(v,i,B,N,pr),B,N,P.deepth+1);R.deepth<n&&R.endIndex-R.startIndex>t&&(f[l++]=R);var b=new D(++y,zr(v,i,N,_,pr),N,_,P.deepth+1);b.deepth<n&&b.endIndex-b.startIndex>t&&(f[l++]=b),P.node0=R,P.node1=b,P.startIndex=0,P.endIndex=0;break}}}for(;l;)q(f[--l]);return this.offsetArray=v,this.rootNodePacked=lr(W,y+1),f.length=0,this},r.prototype.trianglesInSphere=function(t,n){for(var e=this.offsetArray,h=this.rootNodePacked,v=new Float32Array(h),i=new Uint32Array(h),f=new Uint16Array(h),l=[0],y=[],s;(s=l.pop())!==void 0;){var d=s*X/4,u=fr(t.x,v[d],v[d+3])-t.x,x=fr(t.y,v[d+1],v[d+4])-t.y,w=fr(t.z,v[d+2],v[d+5])-t.z;if(u*u+x*x+w*w<=n*n){for(var z=i[d+6],I=i[d+7],c=z;c<I;c++){var p=e[c];y.push(p)}var a=s*X/2,F=f[a+16],k=f[a+17];F&&l.push(F),k&&l.push(k)}}for(var E=y.length,S=new Float32Array(E*9),c=0;c<E;c++){var p=y[c],V=p*3;this.getPositionByIndex(V,J),S[c*9]=J.x,S[c*9+1]=J.y,S[c*9+2]=J.z,this.getPositionByIndex(V+1,J),S[c*9+3]=J.x,S[c*9+4]=J.y,S[c*9+5]=J.z,this.getPositionByIndex(V+2,J),S[c*9+6]=J.x,S[c*9+7]=J.y,S[c*9+8]=J.z}return S},r.prototype.intersectRay=function(t,n,e,h,v){e===void 0&&(e=0),h===void 0&&(h=!1);for(var i=[],f=this.offsetArray,l=this.rootNodePacked,y=new Float32Array(l),s=new Uint32Array(l),d=new Uint16Array(l),u=new H(1/n.x,1/n.y,1/n.z),x=[0],w,z=new xr(new H(0,0,0),new H(0,0,0)),I=1/0;(w=x.pop())!==void 0;){var c=w*X/4;z.min.x=y[c],z.min.y=y[c+1],z.min.z=y[c+2],z.max.x=y[c+3],z.max.y=y[c+4],z.max.z=y[c+5];var p=dr(t,u,z,e);if(p!==null&&!(h&&p>I)){for(var a=t.x,F=t.y,k=t.z,E=n.x,S=n.y,V=n.z,U=s[c+6],W=s[c+7],M=U;M<W;M++){var T=f[M],j=T*3,q=new H(0,0,0);this.getPositionByIndex(j,q);var P=q.x,B=q.y,_=q.z,A=new H(0,0,0);this.getPositionByIndex(j+1,A);var $=A.x,C=A.y,G=A.z,N=new H(0,0,0);this.getPositionByIndex(j+2,N);var L=N.x,O=N.y,Q=N.z,R=$-P,b=C-B,or=G-_,er=L-P,vr=O-B,sr=Q-_,Ar=b*sr-or*vr,Pr=or*er-R*sr,Br=R*vr-b*er,m=E*Ar+S*Pr+V*Br,rr=void 0;if(m>0)rr=1;else if(m<0)rr=-1,m=-m;else continue;var tr=a-P,nr=F-B,ir=k-_,Sr=rr*(E*(nr*sr-ir*vr)+S*(ir*er-tr*sr)+V*(tr*vr-nr*er));if(!(Sr<0)){var Nr=rr*(E*(b*ir-or*nr)+S*(or*tr-R*ir)+V*(R*nr-b*tr));if(!(Nr<0)&&!(Sr+Nr>m)){var Vr=-rr*(tr*Ar+nr*Pr+ir*Br);if(!(Vr<0)){var ar=Vr/m,jr=new H(a+E*ar,F+S*ar,k+V*ar),hr=new wr(q,A,N,T,jr);(!v||v(hr))&&(h?ar<I&&(I=ar,i.length>0&&(i.length=0),i.push(hr)):i.push(hr))}}}}var Tr=w*X/2,Ur=d[Tr+16],_r=d[Tr+17];Ur&&x.push(Ur),_r&&x.push(_r)}}return i},r})(cr);function fr(o,r,t){return o<r?r:o>t?t:o}function zr(o,r,t,n,e){if(t>=n)return[0,0,0,0,0,0];for(var h=1/0,v=1/0,i=1/0,f=-1/0,l=-1/0,y=-1/0,s=t;s<n;s++){var d=o[s]*6,u=r[d];u<h&&(h=u),u=r[d+1],u<v&&(v=u),u=r[d+2],u<i&&(i=u),u=r[d+3],u>f&&(f=u),u=r[d+4],u>l&&(l=u),u=r[d+5],u>y&&(y=u)}return[h-e,v-e,i-e,f+e,l+e,y+e]}var Ir=1e-6,kr=["x","y","z"],K=new H(0,0,0),Er=(function(o){yr(r,o);function r(){return o!==null&&o.apply(this,arguments)||this}return r.prototype.createTree=function(t,n,e){n=Math.min(n,16);var h=this.getPositionByIndex.bind(this),v=this.getPositionCount(),i=v>65535?new Uint32Array(v):new Uint16Array(v),f=[],l=0,y=-1;if(e)for(var s=0;s<v;s+=1)i[s]=s;else{h(0,K);for(var d=K.x,u=K.y,x=K.z,w=d,z=u,I=x,s=0;s<v;s+=1){i[s]=s,h(s,K);var c=K.x,p=K.y,a=K.z;c<d?d=c:c>w&&(w=c),p<u?u=p:p>z&&(z=p),a<x?x=a:a>I&&(I=a)}e=[d,u,x,w,z,I]}var F=new D(++y,e,0,v,0);f[l++]=F;var k=[],E=[0,1,2],S=function(U,W){return k[W]-k[U]};function V(U){var W=U.startIndex,M=U.endIndex,T=U.extents;k[0]=T[3]-T[0],k[1]=T[4]-T[1],k[2]=T[5]-T[2];for(var j=E.sort(S)[0],q=kr[j],P=(T[j]+T[j+3])/2,B=W,_=M-1,A=-1,$;B<=_;)A===-1?($=i[B],h($,K),K[q]<P?B++:A=$):($=i[_],h($,K),K[q]>=P||(i[B]=$,i[_]=A,A=-1,B++),_--);if(B>W){var C=T.slice();C[j+3]=P+Ir;var G=new D(++y,C,W,B,U.deepth+1);G.deepth<n&&G.endIndex-G.startIndex>t&&(f[l++]=G),U.node0=G}if(M>B){var N=T.slice();N[j]=P-Ir;var L=new D(++y,N,B,M,U.deepth+1);L.deepth<n&&L.endIndex-L.startIndex>t&&(f[l++]=L),U.node1=L}U.startIndex=0,U.endIndex=0}for(;l;)V(f[--l]);return this.offsetArray=i,this.rootNodePacked=lr(F,y+1),f.length=0,this},r.prototype.intersectRay=function(t,n,e,h,v){e===void 0&&(e=0),h===void 0&&(h=!1);for(var i=[],f=this.offsetArray,l=this.rootNodePacked,y=new Float32Array(l),s=new Uint32Array(l),d=new Uint16Array(l),u=e*e,x=new H(1/n.x,1/n.y,1/n.z),w=[0],z,I=new xr(new H(0,0,0),new H(0,0,0)),c=1/0;(z=w.pop())!==void 0;){var p=z*X/4;I.min.x=y[p],I.min.y=y[p+1],I.min.z=y[p+2],I.max.x=y[p+3],I.max.y=y[p+4],I.max.z=y[p+5];var a=dr(t,x,I,e);if(a!==null&&!(h&&a>c)){for(var F=s[p+6],k=s[p+7],E=F;E<k;E++){var S=f[E],V=new H(0,0,0);this.getPositionByIndex(S,V);var U=V.x,W=V.y,M=V.z,T=t.x,j=t.y,q=t.z,P=n.x,B=n.y,_=n.z,A=P*(U-T)+B*(W-j)+_*(M-q);if(A>0?(T+=P*A,j+=B*A,q+=_*A):A<0&&(A=0),P=U-T,B=W-j,_=M-q,P*P+B*B+_*_<=u){var $=new H(T,j,q),C=new wr(V,V,V,S,$);(!v||v(C))&&(h?A<c&&(c=A,i.length>0&&(i.length=0),i.push(C)):i.push(C))}}var G=z*X/2,N=d[G+16],L=d[G+17];N&&w.push(N),L&&w.push(L)}}return i},r})(cr);function Mr(o){onmessage=function(r){Promise.resolve(r.data).then(function(t){return o(t)}).then(function(t){var n=t.output,e=t.transfer;return postMessage(n,e)}).catch(function(t){return postMessage({$$error:t})})}}Mr(function(o){return Promise.resolve(o).then(function(r){for(var t=[],n=new Set,e=0,h=r;e<h.length;e++){var v=h[e],i=void 0;if(v.type==="mesh")i=new Hr(v.attributes.position,v.indices);else if(v.type==="points")i=new Er(v.attributes.position,v.indices);else throw new Error("Invalid Type");i.createTree(v.maxItemPerNode,v.maxTreeDepth,v.extents);var f={type:v.type,attributes:v.attributes,indices:v.indices,offsetArray:i.offsetArray,rootNodePacked:i.rootNodePacked};t.push(f);var l=void 0;for(var y in f.attributes){var s=f.attributes[y];s&&s.buffer instanceof ArrayBuffer&&n.add(s.buffer)}l=f.indices,l&&l.buffer instanceof ArrayBuffer&&n.add(l.buffer),l=f.offsetArray,l&&l.buffer instanceof ArrayBuffer&&n.add(l.buffer),n.add(f.rootNodePacked)}return{output:t,transfer:Array.from(n)}})})})();
14318
+ const jsContent = `(function(){"use strict";var ur=function(a,r){return ur=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])},ur(a,r)};function cr(a,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");ur(a,r);function t(){this.constructor=a}a.prototype=r===null?Object.create(r):(t.prototype=r.prototype,new t)}typeof SuppressedError=="function"&&SuppressedError;var hr=(function(){function a(r,t){this.position=r,this.indices=t}return a.prototype.getPositionCount=function(){var r,t,n=this.indices,o=this.position;return n?n.array.length/((r=n.stride)!==null&&r!==void 0?r:1):o.array.length/((t=o.stride)!==null&&t!==void 0?t:3)},a.prototype.getPositionByIndex=function(r,t){var n,o,f,v,i=this.indices,u=this.position,w=r;if(i){var c=i.array,s=(n=i.stride)!==null&&n!==void 0?n:1,d=(o=i.offset)!==null&&o!==void 0?o:0;w=c[r*s+d]}var y=u.array,x=(f=u.stride)!==null&&f!==void 0?f:3,l=(v=u.offset)!==null&&v!==void 0?v:0;return w=w*x+l,t.x=y[w],t.y=y[w+1],t.z=y[w+2],t},a.prototype.createTree=function(r,t,n){throw new Error("not implemented")},a.prototype.trianglesInSphere=function(r,t){throw new Error("not implemented")},a.prototype.intersectRay=function(r,t,n,o,f){throw new Error("not implemented")},a})(),D=(function(){function a(r,t,n,o,f){this.id=r,this.extents=t,this.startIndex=n,this.endIndex=o,this.deepth=f}return a})(),Y=36;function wr(a,r){for(var t=new ArrayBuffer(r*Y),n=new Float32Array(t),o=new Uint32Array(t),f=new Uint16Array(t),v=[a],i,u;i=v.pop();)u=i.id*Y/4,n[u]=i.extents[0],n[u+1]=i.extents[1],n[u+2]=i.extents[2],n[u+3]=i.extents[3],n[u+4]=i.extents[4],n[u+5]=i.extents[5],o[u+6]=i.startIndex,o[u+7]=i.endIndex,u=i.id*Y/2,i.node0&&(f[u+16]=i.node0.id,v.push(i.node0)),i.node1&&(f[u+17]=i.node1.id,v.push(i.node1));return t}function Hr(a,r,t){t===void 0&&(t=0);var n=r.min.x-t,o=r.min.y-t,f=r.min.z-t,v=r.max.x+t,i=r.max.y+t,u=r.max.z+t;return a.x>=n&&a.x<=v&&a.y>=o&&a.y<=i&&a.z>=f&&a.z<=u}function dr(a,r,t,n){if(n===void 0&&(n=0),Hr(a,t,n))return 0;var o=t.min.x-n,f=t.min.y-n,v=t.min.z-n,i=t.max.x+n,u=t.max.y+n,w=t.max.z+n,c=0,s=0,d=0,y=0,x=0,l=0;return r.x>=0?(c=(o-a.x)*r.x,s=(i-a.x)*r.x):(c=(i-a.x)*r.x,s=(o-a.x)*r.x),r.y>=0?(d=(f-a.y)*r.y,y=(u-a.y)*r.y):(d=(u-a.y)*r.y,y=(f-a.y)*r.y),c>y||d>s||((d>c||c!==c)&&(c=d),(y<s||s!==s)&&(s=y),r.z>=0?(x=(v-a.z)*r.z,l=(w-a.z)*r.z):(x=(w-a.z)*r.z,l=(v-a.z)*r.z),c>l||x>s)||((x>c||c!==c)&&(c=x),(l<s||s!==s)&&(s=l),s<0)?null:c>=0?c:s}var H=(function(){function a(r,t,n){this.x=r,this.y=t,this.z=n}return a.prototype.copy=function(r){return this.x=r.x,this.y=r.y,this.z=r.z,this},a.prototype.set=function(r,t,n){return this.x=r,this.y=t,this.z=n,this},a.prototype.fromArray=function(r,t){return t===void 0&&(t=0),this.x=r[t],this.y=r[t+1],this.z=r[t+2],this},a.prototype.toArray=function(r,t){return r===void 0&&(r=[]),t===void 0&&(t=0),r[t]=this.x,r[t+1]=this.y,r[t+2]=this.z,r},a.prototype.add=function(r){return this.x+=r.x,this.y+=r.y,this.z+=r.z,this},a.prototype.multiplyScalar=function(r){return this.x*=r,this.y*=r,this.z*=r,this},a.prototype.subVectors=function(r,t){return this.x=r.x-t.x,this.y=r.y-t.y,this.z=r.z-t.z,this},a.prototype.addScaledVector=function(r,t){return this.x+=r.x*t,this.y+=r.y*t,this.z+=r.z*t,this},a.prototype.dot=function(r){return this.x*r.x+this.y*r.y+this.z*r.z},a.prototype.cross=function(r){var t=this.x,n=this.y,o=this.z;return this.x=n*r.z-o*r.y,this.y=o*r.x-t*r.z,this.z=t*r.y-n*r.x,this},a.prototype.crossVectors=function(r,t){var n=r.x,o=r.y,f=r.z,v=t.x,i=t.y,u=t.z;return this.x=o*u-f*i,this.y=f*v-n*u,this.z=n*i-o*v,this},a.prototype.distanceTo=function(r){return Math.sqrt(this.distanceToSquared(r))},a.prototype.distanceToSquared=function(r){var t=this.x-r.x,n=this.y-r.y,o=this.z-r.z;return t*t+n*n+o*o},a.prototype.clone=function(){return new a(this.x,this.y,this.z)},a})(),lr=(function(){function a(r,t,n,o,f){this.pointA=r,this.pointB=t,this.pointC=n,this.index=o,this.intersectionPoint=f}return a})(),xr=(function(){function a(r,t){this.min=r,this.max=t}return a})(),zr=1e-6,J=new H(0,0,0),Z=new H(0,0,0),g=new H(0,0,0),b=new H(0,0,0),kr=(function(a){cr(r,a);function r(){return a!==null&&a.apply(this,arguments)||this}return r.prototype.createTree=function(t,n,o){n=Math.min(n,16);var f=this.getPositionCount()/3,v=f>65535?new Uint32Array(f):new Uint16Array(f),i=new Float32Array(f*6),u=[],w=0,c=-1;if(o)for(var s=0;s<f;s+=1){var d=s*3,y=s*6,x=void 0,l=void 0,I=void 0,p=void 0,h=void 0,z=void 0,e=void 0;v[s]=s,this.getPositionByIndex(d,Z),this.getPositionByIndex(d+1,g),this.getPositionByIndex(d+2,b),x=p=Z.x,e=g.x,e<x&&(x=e),e>p&&(p=e),e=b.x,e<x&&(x=e),e>p&&(p=e),l=h=Z.y,e=g.y,e<l&&(l=e),e>h&&(h=e),e=b.y,e<l&&(l=e),e>h&&(h=e),I=z=Z.z,e=g.z,e<I&&(I=e),e>z&&(z=e),e=b.z,e<I&&(I=e),e>z&&(z=e),i[y]=x,i[y+1]=l,i[y+2]=I,i[y+3]=p,i[y+4]=h,i[y+5]=z}else{for(var F=1/0,k=1/0,E=1/0,N=-1/0,V=-1/0,U=-1/0,s=0;s<f;s+=1){var d=s*3,y=s*6,x=void 0,l=void 0,I=void 0,p=void 0,h=void 0,z=void 0,e=void 0;v[s]=s,this.getPositionByIndex(d,Z),this.getPositionByIndex(d+1,g),this.getPositionByIndex(d+2,b),x=p=Z.x,e=g.x,e<x&&(x=e),e>p&&(p=e),e=b.x,e<x&&(x=e),e>p&&(p=e),l=h=Z.y,e=g.y,e<l&&(l=e),e>h&&(h=e),e=b.y,e<l&&(l=e),e>h&&(h=e),I=z=Z.z,e=g.z,e<I&&(I=e),e>z&&(z=e),e=b.z,e<I&&(I=e),e>z&&(z=e),i[y]=x,i[y+1]=l,i[y+2]=I,i[y+3]=p,i[y+4]=h,i[y+5]=z,x<F&&(F=x),p>N&&(N=p),l<k&&(k=l),h>V&&(V=h),I<E&&(E=I),z>U&&(U=z)}o=[F,k,E,N,V,U]}var W=new D(++c,o,0,f,0);u[w++]=W;var M=[],T=[0,1,2],j=function(P,B){return M[B]-M[P]};function q(P){var B=P.startIndex,_=P.endIndex,A=P.extents;M[0]=A[3]-A[0],M[1]=A[4]-A[1],M[2]=A[5]-A[2],T.sort(j);for(var $=0;$<3;$++){for(var C=T[$],G=A[C]+A[C+3],S=B,L=_-1,O=-1,Q=void 0;S<=L;)O===-1?(Q=v[S],i[Q*6+C]+i[Q*6+C+3]<G?S++:O=Q):(Q=v[L],i[Q*6+C]+i[Q*6+C+3]>=G||(v[S]=Q,v[L]=O,O=-1,S++),L--);if(S>B&&S<_){var R=new D(++c,Ir(v,i,B,S,zr),B,S,P.deepth+1);R.deepth<n&&R.endIndex-R.startIndex>t&&(u[w++]=R);var X=new D(++c,Ir(v,i,S,_,zr),S,_,P.deepth+1);X.deepth<n&&X.endIndex-X.startIndex>t&&(u[w++]=X),P.node0=R,P.node1=X,P.startIndex=0,P.endIndex=0;break}}}for(;w;)q(u[--w]);return this.offsetArray=v,this.rootNodePacked=wr(W,c+1),u.length=0,this},r.prototype.trianglesInSphere=function(t,n){for(var o=this.offsetArray,f=this.rootNodePacked,v=new Float32Array(f),i=new Uint32Array(f),u=new Uint16Array(f),w=[0],c=[],s;(s=w.pop())!==void 0;){var d=s*Y/4,y=fr(t.x,v[d],v[d+3])-t.x,x=fr(t.y,v[d+1],v[d+4])-t.y,l=fr(t.z,v[d+2],v[d+5])-t.z;if(y*y+x*x+l*l<=n*n){for(var I=i[d+6],p=i[d+7],h=I;h<p;h++){var z=o[h];c.push(z)}var e=s*Y/2,F=u[e+16],k=u[e+17];F&&w.push(F),k&&w.push(k)}}for(var E=c.length,N=new Float32Array(E*9),h=0;h<E;h++){var z=c[h],V=z*3;this.getPositionByIndex(V,J),N[h*9]=J.x,N[h*9+1]=J.y,N[h*9+2]=J.z,this.getPositionByIndex(V+1,J),N[h*9+3]=J.x,N[h*9+4]=J.y,N[h*9+5]=J.z,this.getPositionByIndex(V+2,J),N[h*9+6]=J.x,N[h*9+7]=J.y,N[h*9+8]=J.z}return N},r.prototype.intersectRay=function(t,n,o,f,v){o===void 0&&(o=0),f===void 0&&(f=!1);for(var i=[],u=this.offsetArray,w=this.rootNodePacked,c=new Float32Array(w),s=new Uint32Array(w),d=new Uint16Array(w),y=new H(1/n.x,1/n.y,1/n.z),x=[0],l,I=new xr(new H(0,0,0),new H(0,0,0)),p=1/0;(l=x.pop())!==void 0;){var h=l*Y/4;I.min.x=c[h],I.min.y=c[h+1],I.min.z=c[h+2],I.max.x=c[h+3],I.max.y=c[h+4],I.max.z=c[h+5];var z=dr(t,y,I,o);if(z!==null&&!(f&&z>p)){for(var e=t.x,F=t.y,k=t.z,E=n.x,N=n.y,V=n.z,U=s[h+6],W=s[h+7],M=U;M<W;M++){var T=u[M],j=T*3,q=new H(0,0,0);this.getPositionByIndex(j,q);var P=q.x,B=q.y,_=q.z,A=new H(0,0,0);this.getPositionByIndex(j+1,A);var $=A.x,C=A.y,G=A.z,S=new H(0,0,0);this.getPositionByIndex(j+2,S);var L=S.x,O=S.y,Q=S.z,R=$-P,X=C-B,er=G-_,or=L-P,vr=O-B,sr=Q-_,Ar=X*sr-er*vr,Pr=er*or-R*sr,Br=R*vr-X*or,m=E*Ar+N*Pr+V*Br,rr=void 0;if(m>0)rr=1;else if(m<0)rr=-1,m=-m;else continue;var tr=e-P,nr=F-B,ir=k-_,Nr=rr*(E*(nr*sr-ir*vr)+N*(ir*or-tr*sr)+V*(tr*vr-nr*or));if(!(Nr<0)){var Sr=rr*(E*(X*ir-er*nr)+N*(er*tr-R*ir)+V*(R*nr-X*tr));if(!(Sr<0)&&!(Nr+Sr>m)){var Vr=-rr*(tr*Ar+nr*Pr+ir*Br);if(!(Vr<0)){var ar=Vr/m,Lr=new H(e+E*ar,F+N*ar,k+V*ar),yr=new lr(q,A,S,T,Lr);(!v||v(yr))&&(f?ar<p&&(p=ar,i.length>0&&(i.length=0),i.push(yr)):i.push(yr))}}}}var Tr=l*Y/2,Ur=d[Tr+16],_r=d[Tr+17];Ur&&x.push(Ur),_r&&x.push(_r)}}return i},r})(hr);function fr(a,r,t){return a<r?r:a>t?t:a}function Ir(a,r,t,n,o){if(t>=n)return[0,0,0,0,0,0];for(var f=1/0,v=1/0,i=1/0,u=-1/0,w=-1/0,c=-1/0,s=t;s<n;s++){var d=a[s]*6,y=r[d];y<f&&(f=y),y=r[d+1],y<v&&(v=y),y=r[d+2],y<i&&(i=y),y=r[d+3],y>u&&(u=y),y=r[d+4],y>w&&(w=y),y=r[d+5],y>c&&(c=y)}return[f-o,v-o,i-o,u+o,w+o,c+o]}var pr=1e-6,Er=["x","y","z"],K=new H(0,0,0),Mr=(function(a){cr(r,a);function r(){return a!==null&&a.apply(this,arguments)||this}return r.prototype.createTree=function(t,n,o){n=Math.min(n,16);var f=this.getPositionByIndex.bind(this),v=this.getPositionCount(),i=v>65535?new Uint32Array(v):new Uint16Array(v),u=[],w=0,c=-1;if(o)for(var s=0;s<v;s+=1)i[s]=s;else{f(0,K);for(var d=K.x,y=K.y,x=K.z,l=d,I=y,p=x,s=0;s<v;s+=1){i[s]=s,f(s,K);var h=K.x,z=K.y,e=K.z;h<d?d=h:h>l&&(l=h),z<y?y=z:z>I&&(I=z),e<x?x=e:e>p&&(p=e)}o=[d,y,x,l,I,p]}var F=new D(++c,o,0,v,0);u[w++]=F;var k=[],E=[0,1,2],N=function(U,W){return k[W]-k[U]};function V(U){var W=U.startIndex,M=U.endIndex,T=U.extents;k[0]=T[3]-T[0],k[1]=T[4]-T[1],k[2]=T[5]-T[2];for(var j=E.sort(N)[0],q=Er[j],P=(T[j]+T[j+3])/2,B=W,_=M-1,A=-1,$;B<=_;)A===-1?($=i[B],f($,K),K[q]<P?B++:A=$):($=i[_],f($,K),K[q]>=P||(i[B]=$,i[_]=A,A=-1,B++),_--);if(B>W){var C=T.slice();C[j+3]=P+pr;var G=new D(++c,C,W,B,U.deepth+1);G.deepth<n&&G.endIndex-G.startIndex>t&&(u[w++]=G),U.node0=G}if(M>B){var S=T.slice();S[j]=P-pr;var L=new D(++c,S,B,M,U.deepth+1);L.deepth<n&&L.endIndex-L.startIndex>t&&(u[w++]=L),U.node1=L}U.startIndex=0,U.endIndex=0}for(;w;)V(u[--w]);return this.offsetArray=i,this.rootNodePacked=wr(F,c+1),u.length=0,this},r.prototype.intersectRay=function(t,n,o,f,v){o===void 0&&(o=0),f===void 0&&(f=!1);for(var i=[],u=this.offsetArray,w=this.rootNodePacked,c=new Float32Array(w),s=new Uint32Array(w),d=new Uint16Array(w),y=o*o,x=new H(1/n.x,1/n.y,1/n.z),l=[0],I,p=new xr(new H(0,0,0),new H(0,0,0)),h=1/0;(I=l.pop())!==void 0;){var z=I*Y/4;p.min.x=c[z],p.min.y=c[z+1],p.min.z=c[z+2],p.max.x=c[z+3],p.max.y=c[z+4],p.max.z=c[z+5];var e=dr(t,x,p,o);if(e!==null&&!(f&&e>h)){for(var F=s[z+6],k=s[z+7],E=F;E<k;E++){var N=u[E],V=new H(0,0,0);this.getPositionByIndex(N,V);var U=V.x,W=V.y,M=V.z,T=t.x,j=t.y,q=t.z,P=n.x,B=n.y,_=n.z,A=P*(U-T)+B*(W-j)+_*(M-q);if(A>0?(T+=P*A,j+=B*A,q+=_*A):A<0&&(A=0),P=U-T,B=W-j,_=M-q,P*P+B*B+_*_<=y){var $=new H(T,j,q),C=new lr(V,V,V,N,$);(!v||v(C))&&(f?A<h&&(h=A,i.length>0&&(i.length=0),i.push(C)):i.push(C))}}var G=I*Y/2,S=d[G+16],L=d[G+17];S&&l.push(S),L&&l.push(L)}}return i},r})(hr);function jr(a){onmessage=function(r){Promise.resolve(r.data).then(function(t){return a(t)}).then(function(t){var n=t.output,o=t.transfer;return postMessage(n,o)}).catch(function(t){return postMessage({$$error:t})})}}jr(function(a){return Promise.resolve(a).then(function(r){for(var t=[],n=new Set,o=0,f=r;o<f.length;o++){var v=f[o],i=void 0;if(v.type==="mesh")i=new kr(v.attributes.position,v.indices);else if(v.type==="points")i=new Mr(v.attributes.position,v.indices);else throw new Error("Invalid Type");i.createTree(v.maxItemPerNode,v.maxTreeDepth,v.extents);var u={type:v.type,attributes:v.attributes,indices:v.indices,offsetArray:i.offsetArray,rootNodePacked:i.rootNodePacked};t.push(u);var w=void 0;for(var c in u.attributes){var s=u.attributes[c];s&&s.buffer instanceof ArrayBuffer&&n.add(s.buffer)}w=u.indices,w&&w.buffer instanceof ArrayBuffer&&n.add(w.buffer),w=u.offsetArray,w&&w.buffer instanceof ArrayBuffer&&n.add(w.buffer),n.add(u.rootNodePacked)}return{output:t,transfer:Array.from(n)}})})})();
14313
14319
  `, blob = typeof self != "undefined" && self.Blob && new Blob(["(self.URL || self.webkitURL).revokeObjectURL(self.location.href);", jsContent], { type: "text/javascript;charset=utf-8" });
14314
14320
  function WorkerWrapper(n) {
14315
14321
  let t;
@@ -16471,16 +16477,16 @@ var Tile3D = (
16471
16477
  requestOrder: E.requestOrder,
16472
16478
  maxScreenSpaceError: E.maxScreenSpaceError,
16473
16479
  memoryAdjustedScreenSpaceError: S
16474
- }, P = E.cacheCameras.map(function(pe) {
16475
- return pe.updateProjectionMatrix(), __assign(__assign({}, w), { camera: {
16480
+ }, P = E.cacheCameras.map(function(he) {
16481
+ return he.updateProjectionMatrix(), __assign(__assign({}, w), { camera: {
16476
16482
  type: r.type,
16477
- position: new THREE.Vector3().copy(pe.position),
16478
- direction: pe.getWorldDirection(new THREE.Vector3()),
16479
- up: new THREE.Vector3().copy(pe.up),
16480
- projectionMatrix: pe.projectionMatrix.clone(),
16481
- visible: pe.visible,
16483
+ position: new THREE.Vector3().copy(he.position),
16484
+ direction: he.getWorldDirection(new THREE.Vector3()),
16485
+ up: new THREE.Vector3().copy(he.up),
16486
+ projectionMatrix: he.projectionMatrix.clone(),
16487
+ visible: he.visible,
16482
16488
  refine: !0
16483
- }, cullingVolume: new CullingVolume().setFromCamera(pe) });
16489
+ }, cullingVolume: new CullingVolume().setFromCamera(he) });
16484
16490
  });
16485
16491
  this.updateWorldMatrix(!0, !1), this.tileset.transform.equals(this.matrixWorld) || (this.tileset.transform.copy(this.matrixWorld), m = !0);
16486
16492
  var _ = !this.autoRefine;
@@ -16493,9 +16499,9 @@ var Tile3D = (
16493
16499
  E.pano1 && H.setFromMatrixPosition(E.pano1.matrix), C.distanceTo(H) < 10 && (_ = !0);
16494
16500
  }
16495
16501
  }
16496
- if (_ || this.tileset.update(w, P), this.refined = !0, this.refineProgress[0] = 0, this.refineProgress[1] = 0, this.tileset.needsRefinedTiles.forEach(function(pe) {
16497
- if (u.refineProgress[1]++, pe.content) {
16498
- var Se = pe.content.loadState;
16502
+ if (_ || this.tileset.update(w, P), this.refined = !0, this.refineProgress[0] = 0, this.refineProgress[1] = 0, this.tileset.needsRefinedTiles.forEach(function(he) {
16503
+ if (u.refineProgress[1]++, he.content) {
16504
+ var Se = he.content.loadState;
16499
16505
  if (Se === "UNLOADED" || Se === "LOADING") {
16500
16506
  u.refined = !1;
16501
16507
  return;
@@ -16505,15 +16511,15 @@ var Tile3D = (
16505
16511
  }), this.loaded === !1 && this.autoRefine) {
16506
16512
  this.loaded = !0;
16507
16513
  var L = !1;
16508
- this.tileset.needsRefinedTiles.forEach(function(pe) {
16509
- if (u.loaded !== !1 && pe.content && (pe.state.visible && (L = !0), E.minLevelOfDetail >= 0)) {
16514
+ this.tileset.needsRefinedTiles.forEach(function(he) {
16515
+ if (u.loaded !== !1 && he.content && (he.state.visible && (L = !0), E.minLevelOfDetail >= 0)) {
16510
16516
  if (w.skipLevelOfDetail) {
16511
- if (pe.state.finalResolution) {
16512
- var Se = pe.state.ancestorWithContentAvailable, _e = Se && Se.content ? Se.content : pe.content, Ee = _e.loadState;
16517
+ if (he.state.finalResolution) {
16518
+ var Se = he.state.ancestorWithContentAvailable, _e = Se && Se.content ? Se.content : he.content, Ee = _e.loadState;
16513
16519
  (Ee === "UNLOADED" || Ee === "LOADING") && (u.loaded = !1);
16514
16520
  }
16515
- } else if (pe.state.visible && pe.levelOfContent <= 0) {
16516
- var Ee = pe.content.loadState;
16521
+ } else if (he.state.visible && he.levelOfContent <= 0) {
16522
+ var Ee = he.content.loadState;
16517
16523
  (Ee === "UNLOADED" || Ee === "LOADING") && (u.loaded = !1);
16518
16524
  }
16519
16525
  }
@@ -16522,8 +16528,8 @@ var Tile3D = (
16522
16528
  this.renderObjects.length = 0, this.backfaceObjects.length = 0, this.tileObjects.length = 0;
16523
16529
  for (var O = this.children.length - 1; O >= 0; O--)
16524
16530
  this.remove(this.children[O]);
16525
- w.skipLevelOfDetail || this.tileset.selectedTiles.sort(function(pe, Se) {
16526
- return pe.floor !== Se.floor ? pe.floor - Se.floor : pe.levelOfContent !== Se.levelOfContent ? Se.levelOfContent - pe.levelOfContent : pe.state.distanceToCamera !== Se.state.distanceToCamera ? pe.state.distanceToCamera - Se.state.distanceToCamera : pe.state.centerZDepth - Se.state.centerZDepth;
16531
+ w.skipLevelOfDetail || this.tileset.selectedTiles.sort(function(he, Se) {
16532
+ return he.floor !== Se.floor ? he.floor - Se.floor : he.levelOfContent !== Se.levelOfContent ? Se.levelOfContent - he.levelOfContent : he.state.distanceToCamera !== Se.state.distanceToCamera ? he.state.distanceToCamera - Se.state.distanceToCamera : he.state.centerZDepth - Se.state.centerZDepth;
16527
16533
  });
16528
16534
  for (var k = [], D = 0, q = this.tileset.selectedTiles; D < q.length; D++) {
16529
16535
  var z = q[D], J = (p = (h = z.content) === null || h === void 0 ? void 0 : h.data) === null || p === void 0 ? void 0 : p.object;
@@ -16534,37 +16540,37 @@ var Tile3D = (
16534
16540
  var U = cloneSkipBackfaceObject(J);
16535
16541
  U.name = "skipBackface:" + J.name, this.backfaceObjects.push(U);
16536
16542
  }
16537
- for (var j = z.state.selectionDepth, G = STENCIL_CONSTANT.TILE_MASK | j << STENCIL_CONSTANT.SKIP_LOD_BIT_SHIFT, ie = THREE.GreaterEqualStencilFunc, ne = STENCIL_CONSTANT.SKIP_LOD_MASK, $ = THREE.ReplaceStencilOp, Z = STENCIL_CONSTANT.TILE_MASK | STENCIL_CONSTANT.SKIP_LOD_MASK, X = 0, se = J.materials; X < se.length; X++) {
16538
- var K = se[X];
16539
- K.stencilWrite = !0, K.stencilRef = G, K.stencilFunc = ie, K.stencilFuncMask = ne, K.stencilZPass = $, K.stencilWriteMask = Z;
16543
+ for (var j = z.state.selectionDepth, K = STENCIL_CONSTANT.TILE_MASK | j << STENCIL_CONSTANT.SKIP_LOD_BIT_SHIFT, ie = THREE.GreaterEqualStencilFunc, re = STENCIL_CONSTANT.SKIP_LOD_MASK, ee = THREE.ReplaceStencilOp, Z = STENCIL_CONSTANT.TILE_MASK | STENCIL_CONSTANT.SKIP_LOD_MASK, X = 0, se = J.materials; X < se.length; X++) {
16544
+ var G = se[X];
16545
+ G.stencilWrite = !0, G.stencilRef = K, G.stencilFunc = ie, G.stencilFuncMask = re, G.stencilZPass = ee, G.stencilWriteMask = Z;
16540
16546
  }
16541
16547
  } else
16542
- for (var W = 0, ee = J.materials; W < ee.length; W++) {
16543
- var K = ee[W];
16544
- K.stencilWrite = !1, K.stencilRef = STENCIL_CONSTANT.TILE_MASK, K.stencilFunc = THREE.AlwaysStencilFunc, K.stencilFuncMask = STENCIL_CONSTANT.TILE_MASK, K.stencilZPass = THREE.ReplaceStencilOp, K.stencilWriteMask = STENCIL_CONSTANT.TILE_MASK;
16548
+ for (var W = 0, $ = J.materials; W < $.length; W++) {
16549
+ var G = $[W];
16550
+ G.stencilWrite = !1, G.stencilRef = STENCIL_CONSTANT.TILE_MASK, G.stencilFunc = THREE.AlwaysStencilFunc, G.stencilFuncMask = STENCIL_CONSTANT.TILE_MASK, G.stencilZPass = THREE.ReplaceStencilOp, G.stencilWriteMask = STENCIL_CONSTANT.TILE_MASK;
16545
16551
  }
16546
16552
  this.tileObjects.push(J);
16547
16553
  }
16548
16554
  }
16549
- var te = k.toString();
16550
- if (tileVersionMap.get(this) !== te && (tileVersionMap.set(this, te), m = !0), w.skipLevelOfDetail && this.backfaceObjects.length)
16555
+ var ne = k.toString();
16556
+ if (tileVersionMap.get(this) !== ne && (tileVersionMap.set(this, ne), m = !0), w.skipLevelOfDetail && this.backfaceObjects.length)
16551
16557
  for (var O = 0; O < this.backfaceObjects.length; O++)
16552
16558
  this.renderObjects.push(this.backfaceObjects[O]);
16553
16559
  if (this.tileObjects.length)
16554
16560
  for (var O = 0; O < this.tileObjects.length; O++)
16555
16561
  this.renderObjects.push(this.tileObjects[O]);
16556
16562
  w.skipLevelOfDetail && this.renderObjects.push(this.clearStencilObject);
16557
- for (var re = [], de = 0, ae = this.tileset.selectedTrajectories; de < ae.length; de++) {
16558
- var fe = ae[de], be = (g = fe.content.data) === null || g === void 0 ? void 0 : g.object;
16563
+ for (var te = [], ve = 0, oe = this.tileset.selectedTrajectories; ve < oe.length; ve++) {
16564
+ var fe = oe[ve], be = (g = fe.content.data) === null || g === void 0 ? void 0 : g.object;
16559
16565
  if (be) {
16560
16566
  var V = be.update(e, r, o, this, fe, E);
16561
- re.push(fe.id), V && (m = !0), this.renderObjects.push(be);
16567
+ te.push(fe.id), V && (m = !0), this.renderObjects.push(be);
16562
16568
  }
16563
16569
  }
16564
- var oe = re.toString();
16565
- if (trajectoryVersionMap.get(this) !== oe && (trajectoryVersionMap.set(this, oe), m = !0), this.parent)
16566
- for (var ue = this.parent.children.length + 1, me = Math.min(0, this.parent.children.indexOf(this)), ge = (me - ue) * 1e4 + 1, Ae = function(pe) {
16567
- var Se = Te.renderObjects[pe], _e = pe + ge;
16570
+ var ae = te.toString();
16571
+ if (trajectoryVersionMap.get(this) !== ae && (trajectoryVersionMap.set(this, ae), m = !0), this.parent)
16572
+ for (var ue = this.parent.children.length + 1, me = Math.min(0, this.parent.children.indexOf(this)), ge = (me - ue) * 1e4 + 1, Ae = function(he) {
16573
+ var Se = Te.renderObjects[he], _e = he + ge;
16568
16574
  Se.traverse(function(Ee) {
16569
16575
  (Ee instanceof THREE.Mesh || Ee instanceof THREE.Line || Ee instanceof THREE.Points) && (Ee.renderOrder = _e);
16570
16576
  });
@@ -17203,8 +17209,8 @@ function getEdgesBySphere(n, t, e) {
17203
17209
  var U = getBvhTreeForMesh(V);
17204
17210
  if (U) {
17205
17211
  scratchMatrix4$1.copy(V.matrixWorld), scratchMatrix4Inverse.getInverse(scratchMatrix4$1), scratchSphere$1.copy(t).applyMatrix4(scratchMatrix4Inverse);
17206
- var j = U.trianglesInSphere(scratchSphere$1.center, scratchSphere$1.radius), G = new THREE.BufferGeometry();
17207
- G.setAttribute("position", new THREE.BufferAttribute(j, 3)), G.applyMatrix4(V.matrixWorld), G = mergeVertices(G, 0.01), g.push(G);
17212
+ var j = U.trianglesInSphere(scratchSphere$1.center, scratchSphere$1.radius), K = new THREE.BufferGeometry();
17213
+ K.setAttribute("position", new THREE.BufferAttribute(j, 3)), K.applyMatrix4(V.matrixWorld), K = mergeVertices(K, 0.01), g.push(K);
17208
17214
  }
17209
17215
  }
17210
17216
  }), g.length === 0)
@@ -18114,8 +18120,8 @@ function parse(n, t) {
18114
18120
  writable: !1,
18115
18121
  value: Object.freeze(R.allowHosts)
18116
18122
  });
18117
- var C = S.reduce(function(K, W) {
18118
- return jsonMerge(K, W);
18123
+ var C = S.reduce(function(G, W) {
18124
+ return jsonMerge(G, W);
18119
18125
  });
18120
18126
  defineProperty(t, "name", {
18121
18127
  enumerable: !0,
@@ -18134,7 +18140,7 @@ function parse(n, t) {
18134
18140
  enumerable: !0,
18135
18141
  writable: !0,
18136
18142
  value: (function() {
18137
- var K, W = (K = C.base_url) !== null && K !== void 0 ? K : "";
18143
+ var G, W = (G = C.base_url) !== null && G !== void 0 ? G : "";
18138
18144
  return W && W[W.length - 1] !== "/" && (W += "/"), W;
18139
18145
  })()
18140
18146
  });
@@ -18149,25 +18155,25 @@ function parse(n, t) {
18149
18155
  configurable: !1,
18150
18156
  writable: !1,
18151
18157
  value: (function() {
18152
- var K = C.model.file_url;
18153
- if (K)
18154
- return relativeURL(K, t.baseURL);
18158
+ var G = C.model.file_url;
18159
+ if (G)
18160
+ return relativeURL(G, t.baseURL);
18155
18161
  })()
18156
18162
  }), defineProperty(H, "textureBase", {
18157
18163
  enumerable: !0,
18158
18164
  configurable: !1,
18159
18165
  writable: !1,
18160
18166
  value: (function() {
18161
- var K = C.model.material_base_url;
18162
- return K && (K = relativeURL(K, t.baseURL)), K;
18167
+ var G = C.model.material_base_url;
18168
+ return G && (G = relativeURL(G, t.baseURL)), G;
18163
18169
  })()
18164
18170
  }), defineProperty(H, "textures", {
18165
18171
  enumerable: !0,
18166
18172
  configurable: !1,
18167
18173
  writable: !1,
18168
18174
  value: (function() {
18169
- var K = void 0;
18170
- return Array.isArray(C.model.material_textures) && (K = C.model.material_textures.slice(), Object.freeze(K)), K;
18175
+ var G = void 0;
18176
+ return Array.isArray(C.model.material_textures) && (G = C.model.material_textures.slice(), Object.freeze(G)), G;
18171
18177
  })()
18172
18178
  }), defineProperty(H, "upAxis", {
18173
18179
  enumerable: !0,
@@ -18186,11 +18192,11 @@ function parse(n, t) {
18186
18192
  configurable: !1,
18187
18193
  writable: !1,
18188
18194
  value: (function() {
18189
- var K, W, ee, te = [];
18195
+ var G, W, $, ne = [];
18190
18196
  if (Array.isArray(C.model.layers))
18191
- for (var re = 0, de = C.model.layers; re < de.length; re++) {
18192
- var ae = de[re];
18193
- if (ae && ae.tileset_url) {
18197
+ for (var te = 0, ve = C.model.layers; te < ve.length; te++) {
18198
+ var oe = ve[te];
18199
+ if (oe && oe.tileset_url) {
18194
18200
  var fe = {};
18195
18201
  defineProperty(fe, "work", {
18196
18202
  enumerable: !1,
@@ -18201,28 +18207,28 @@ function parse(n, t) {
18201
18207
  enumerable: !0,
18202
18208
  configurable: !1,
18203
18209
  writable: !1,
18204
- value: (K = ae.name) !== null && K !== void 0 ? K : ""
18210
+ value: (G = oe.name) !== null && G !== void 0 ? G : ""
18205
18211
  }), defineProperty(fe, "type", {
18206
18212
  enumerable: !0,
18207
18213
  configurable: !1,
18208
18214
  writable: !1,
18209
- value: (W = ae.type) !== null && W !== void 0 ? W : "mesh"
18215
+ value: (W = oe.type) !== null && W !== void 0 ? W : "mesh"
18210
18216
  }), defineProperty(fe, "upAxis", {
18211
18217
  enumerable: !0,
18212
18218
  configurable: !1,
18213
18219
  writable: !1,
18214
- value: (ee = ae.up_axis) !== null && ee !== void 0 ? ee : "Z"
18220
+ value: ($ = oe.up_axis) !== null && $ !== void 0 ? $ : "Z"
18215
18221
  }), defineProperty(fe, "tileset", {
18216
18222
  enumerable: !0,
18217
18223
  configurable: !1,
18218
18224
  writable: !1,
18219
- value: relativeURL(ae.tileset_url, t.baseURL)
18220
- }), te.push(fe);
18225
+ value: relativeURL(oe.tileset_url, t.baseURL)
18226
+ }), ne.push(fe);
18221
18227
  }
18222
18228
  }
18223
18229
  if (typeof C.model.tiles == "object") {
18224
- var ae = C.model.tiles;
18225
- if (ae && ae.tileset_url) {
18230
+ var oe = C.model.tiles;
18231
+ if (oe && oe.tileset_url) {
18226
18232
  var fe = {};
18227
18233
  defineProperty(fe, "work", {
18228
18234
  enumerable: !1,
@@ -18248,11 +18254,11 @@ function parse(n, t) {
18248
18254
  enumerable: !0,
18249
18255
  configurable: !1,
18250
18256
  writable: !1,
18251
- value: relativeURL(ae.tileset_url, t.baseURL)
18252
- }), te.push(fe);
18257
+ value: relativeURL(oe.tileset_url, t.baseURL)
18258
+ }), ne.push(fe);
18253
18259
  }
18254
18260
  }
18255
- return Object.freeze(te);
18261
+ return Object.freeze(ne);
18256
18262
  })()
18257
18263
  })), defineProperty(t, "model", {
18258
18264
  enumerable: !0,
@@ -18262,188 +18268,188 @@ function parse(n, t) {
18262
18268
  });
18263
18269
  var L = [];
18264
18270
  if (Array.isArray(C.observers) && C.panorama && Array.isArray(C.panorama.list || C.panorama.info)) {
18265
- for (var O = C.observers, k = (r = C.panorama.list || C.panorama.info) !== null && r !== void 0 ? r : [], D = (f = (l = (s = (o = C.panorama) === null || o === void 0 ? void 0 : o.pano_high_cube_base_url) !== null && s !== void 0 ? s : (u = C.panorama) === null || u === void 0 ? void 0 : u.pano_cube_base_url) !== null && l !== void 0 ? l : (c = C.panorama) === null || c === void 0 ? void 0 : c.base_url) !== null && f !== void 0 ? f : "", q = Math.min(O.length, k.length), z = {}, J = function(K) {
18266
- var W = K, ee = C.panorama.pattern[W];
18267
- if (typeof ee == "string") {
18268
- var te = new StringPattern(ee);
18269
- z[W] = function(re) {
18270
- return te.stringify(re);
18271
+ for (var O = C.observers, k = (r = C.panorama.list || C.panorama.info) !== null && r !== void 0 ? r : [], D = (f = (l = (s = (o = C.panorama) === null || o === void 0 ? void 0 : o.pano_high_cube_base_url) !== null && s !== void 0 ? s : (u = C.panorama) === null || u === void 0 ? void 0 : u.pano_cube_base_url) !== null && l !== void 0 ? l : (c = C.panorama) === null || c === void 0 ? void 0 : c.base_url) !== null && f !== void 0 ? f : "", q = Math.min(O.length, k.length), z = {}, J = function(G) {
18272
+ var W = G, $ = C.panorama.pattern[W];
18273
+ if (typeof $ == "string") {
18274
+ var ne = new StringPattern($);
18275
+ z[W] = function(te) {
18276
+ return ne.stringify(te);
18271
18277
  };
18272
18278
  } else
18273
18279
  z[W] = function() {
18274
- return ee;
18280
+ return $;
18275
18281
  };
18276
18282
  }, V = 0, U = Object.keys((d = C.panorama.pattern) !== null && d !== void 0 ? d : {}); V < U.length; V++) {
18277
18283
  var j = U[V];
18278
18284
  J(j);
18279
18285
  }
18280
- for (var G = function(K, W) {
18281
- var ee, te = z[W];
18282
- return (ee = K[W]) !== null && ee !== void 0 ? ee : te ? te(K) : void 0;
18283
- }, ie = function(K) {
18284
- var W = O[K], ee = k[K], te = {};
18285
- defineProperty(te, "work", {
18286
+ for (var K = function(G, W) {
18287
+ var $, ne = z[W];
18288
+ return ($ = G[W]) !== null && $ !== void 0 ? $ : ne ? ne(G) : void 0;
18289
+ }, ie = function(G) {
18290
+ var W = O[G], $ = k[G], ne = {};
18291
+ defineProperty(ne, "work", {
18286
18292
  enumerable: !1,
18287
18293
  configurable: !1,
18288
18294
  writable: !1,
18289
18295
  value: t
18290
- }), defineProperty(te, "index", {
18296
+ }), defineProperty(ne, "index", {
18291
18297
  enumerable: !0,
18292
18298
  configurable: !1,
18293
18299
  writable: !1,
18294
- value: K
18295
- }), defineProperty(te, "panoIndex", {
18300
+ value: G
18301
+ }), defineProperty(ne, "panoIndex", {
18296
18302
  enumerable: !0,
18297
18303
  configurable: !1,
18298
18304
  writable: !1,
18299
- value: K
18300
- }), defineProperty(te, "panoId", {
18305
+ value: G
18306
+ }), defineProperty(ne, "panoId", {
18301
18307
  enumerable: !0,
18302
18308
  configurable: !1,
18303
18309
  writable: !1,
18304
- value: panoStringify({ workCode: t.workCode, panoIndex: K })
18305
- }), defineProperty(te, "floorIndex", {
18310
+ value: panoStringify({ workCode: t.workCode, panoIndex: G })
18311
+ }), defineProperty(ne, "floorIndex", {
18306
18312
  enumerable: !0,
18307
18313
  configurable: !1,
18308
18314
  writable: !1,
18309
18315
  value: (h = W.floor_index) !== null && h !== void 0 ? h : W.floor
18310
- }), defineProperty(te, "derivedId", {
18316
+ }), defineProperty(ne, "derivedId", {
18311
18317
  enumerable: !0,
18312
18318
  configurable: !1,
18313
18319
  writable: !1,
18314
- value: (g = (p = W.derived_id) !== null && p !== void 0 ? p : G(ee, "derived_id")) !== null && g !== void 0 ? g : 0
18315
- }), defineProperty(te, "derivedIdStr", {
18320
+ value: (g = (p = W.derived_id) !== null && p !== void 0 ? p : K($, "derived_id")) !== null && g !== void 0 ? g : 0
18321
+ }), defineProperty(ne, "derivedIdStr", {
18316
18322
  enumerable: !0,
18317
18323
  configurable: !1,
18318
18324
  writable: !1,
18319
- value: (E = (m = W.derived_id_str) !== null && m !== void 0 ? m : G(ee, "derived_id_str")) !== null && E !== void 0 ? E : String(te.derivedId)
18320
- }), defineProperty(te, "active", {
18325
+ value: (E = (m = W.derived_id_str) !== null && m !== void 0 ? m : K($, "derived_id_str")) !== null && E !== void 0 ? E : String(ne.derivedId)
18326
+ }), defineProperty(ne, "active", {
18321
18327
  enumerable: !0,
18322
18328
  configurable: !1,
18323
18329
  writable: !1,
18324
- value: W.active !== !1 && G(ee, "active") !== !1
18325
- }), defineProperty(te, "loadable", {
18330
+ value: W.active !== !1 && K($, "active") !== !1
18331
+ }), defineProperty(ne, "loadable", {
18326
18332
  enumerable: !0,
18327
18333
  configurable: !1,
18328
18334
  writable: !1,
18329
- value: (v = (y = W.loadable) !== null && y !== void 0 ? y : G(ee, "loadable")) !== null && v !== void 0 ? v : !1
18330
- }), defineProperty(te, "position", {
18335
+ value: (v = (y = W.loadable) !== null && y !== void 0 ? y : K($, "loadable")) !== null && v !== void 0 ? v : !1
18336
+ }), defineProperty(ne, "position", {
18331
18337
  enumerable: !0,
18332
18338
  configurable: !1,
18333
18339
  writable: !1,
18334
18340
  value: Object.freeze(new THREE.Vector3().fromArray((A = W.position) !== null && A !== void 0 ? A : [0, 0, 0]))
18335
- }), defineProperty(te, "standingPosition", {
18341
+ }), defineProperty(ne, "standingPosition", {
18336
18342
  enumerable: !0,
18337
18343
  configurable: !1,
18338
18344
  writable: !1,
18339
18345
  value: Object.freeze(new THREE.Vector3().fromArray((T = (b = W.standing_position) !== null && b !== void 0 ? b : W.standingPosition) !== null && T !== void 0 ? T : [0, 0, 0]))
18340
- }), defineProperty(te, "quaternion", {
18346
+ }), defineProperty(ne, "quaternion", {
18341
18347
  enumerable: !0,
18342
18348
  configurable: !1,
18343
18349
  writable: !1,
18344
18350
  value: Object.freeze(new THREE.Quaternion().fromArray(W.quaternion ? [W.quaternion.x, W.quaternion.y, W.quaternion.z, W.quaternion.w] : [0, 0, 0, 1]))
18345
- }), defineProperty(te, "matrix", {
18351
+ }), defineProperty(ne, "matrix", {
18346
18352
  enumerable: !0,
18347
18353
  configurable: !1,
18348
18354
  writable: !1,
18349
- value: Object.freeze(new THREE.Matrix4().compose(te.position, te.quaternion, PANO_TEXTURE_SCALE))
18350
- }), defineProperty(te, "accessibleNodes", {
18355
+ value: Object.freeze(new THREE.Matrix4().compose(ne.position, ne.quaternion, PANO_TEXTURE_SCALE))
18356
+ }), defineProperty(ne, "accessibleNodes", {
18351
18357
  enumerable: !0,
18352
18358
  configurable: !1,
18353
18359
  writable: !1,
18354
18360
  value: (function() {
18355
18361
  if (accessibleNodesSet.clear(), W.accessible_nodes && Array.isArray(W.accessible_nodes))
18356
- for (var re = 0, de = W.accessible_nodes; re < de.length; re++) {
18357
- var ae = de[re];
18358
- ae >= q || ae === K || accessibleNodesSet.add(ae);
18362
+ for (var te = 0, ve = W.accessible_nodes; te < ve.length; te++) {
18363
+ var oe = ve[te];
18364
+ oe >= q || oe === G || accessibleNodesSet.add(oe);
18359
18365
  }
18360
18366
  else if (W.accessibleNodes && Array.isArray(W.accessibleNodes))
18361
18367
  for (var fe = 0, be = W.accessibleNodes; fe < be.length; fe++) {
18362
- var ae = be[fe];
18363
- ae >= q || ae === K || accessibleNodesSet.add(ae);
18368
+ var oe = be[fe];
18369
+ oe >= q || oe === G || accessibleNodesSet.add(oe);
18364
18370
  }
18365
18371
  else if (W.visible_nodes && Array.isArray(W.visible_nodes))
18366
- for (var oe = 0, ue = W.visible_nodes; oe < ue.length; oe++) {
18367
- var ae = ue[oe];
18368
- ae >= q || ae === K || accessibleNodesSet.add(ae);
18372
+ for (var ae = 0, ue = W.visible_nodes; ae < ue.length; ae++) {
18373
+ var oe = ue[ae];
18374
+ oe >= q || oe === G || accessibleNodesSet.add(oe);
18369
18375
  }
18370
18376
  else if (W.visibleNodes && Array.isArray(W.visibleNodes))
18371
18377
  for (var me = 0, ge = W.visibleNodes; me < ge.length; me++) {
18372
- var ae = ge[me];
18373
- ae >= q || ae === K || accessibleNodesSet.add(ae);
18378
+ var oe = ge[me];
18379
+ oe >= q || oe === G || accessibleNodesSet.add(oe);
18374
18380
  }
18375
18381
  if (accessibleNodesSet.size === 0)
18376
18382
  for (var Ae = 0; Ae < q; Ae++)
18377
- Ae !== K && accessibleNodesSet.add(Ae);
18383
+ Ae !== G && accessibleNodesSet.add(Ae);
18378
18384
  var Te = Array.from(accessibleNodesSet);
18379
18385
  return accessibleNodesSet.clear(), Object.freeze(Te);
18380
18386
  })()
18381
- }), defineProperty(te, "visibleNodes", {
18387
+ }), defineProperty(ne, "visibleNodes", {
18382
18388
  enumerable: !0,
18383
18389
  configurable: !1,
18384
18390
  writable: !1,
18385
- value: te.accessibleNodes
18386
- }), defineProperty(te, "images", {
18391
+ value: ne.accessibleNodes
18392
+ }), defineProperty(ne, "images", {
18387
18393
  enumerable: !0,
18388
18394
  configurable: !1,
18389
18395
  writable: !1,
18390
18396
  value: (function() {
18391
- var re = {};
18392
- defineProperty(re, "work", {
18397
+ var te = {};
18398
+ defineProperty(te, "work", {
18393
18399
  enumerable: !1,
18394
18400
  configurable: !1,
18395
18401
  writable: !1,
18396
18402
  value: t
18397
18403
  });
18398
- for (var de = function(oe) {
18399
- defineProperty(re, oe, {
18404
+ for (var ve = function(ae) {
18405
+ defineProperty(te, ae, {
18400
18406
  enumerable: !0,
18401
18407
  configurable: !1,
18402
18408
  writable: !1,
18403
18409
  value: (function() {
18404
18410
  var ue;
18405
- return relativeURL(panoURL((ue = G(ee, oe)) !== null && ue !== void 0 ? ue : "", D, K), t.baseURL);
18411
+ return relativeURL(panoURL((ue = K($, ae)) !== null && ue !== void 0 ? ue : "", D, G), t.baseURL);
18406
18412
  })()
18407
18413
  });
18408
- }, ae = 0, fe = FACE_ORDER$1; ae < fe.length; ae++) {
18409
- var be = fe[ae];
18410
- de(be);
18414
+ }, oe = 0, fe = FACE_ORDER$1; oe < fe.length; oe++) {
18415
+ var be = fe[oe];
18416
+ ve(be);
18411
18417
  }
18412
- return defineProperty(re, "sizeList", {
18418
+ return defineProperty(te, "sizeList", {
18413
18419
  enumerable: !0,
18414
18420
  configurable: !1,
18415
18421
  writable: !1,
18416
18422
  value: (function() {
18417
- var oe = getImageSizeFromURL(re[FACE_ORDER$1[0]]), ue = G(ee, "size_list"), me = G(ee, "tiles");
18418
- if (oe) {
18423
+ var ae = getImageSizeFromURL(te[FACE_ORDER$1[0]]), ue = K($, "size_list"), me = K($, "tiles");
18424
+ if (ae) {
18419
18425
  if (ue) {
18420
- var ge = ue.slice().sort(function(Ee, he) {
18421
- return Ee - he;
18426
+ var ge = ue.slice().sort(function(Ee, de) {
18427
+ return Ee - de;
18422
18428
  });
18423
18429
  return Object.freeze(ge);
18424
18430
  } else if (me) {
18425
18431
  for (var ge = [
18426
- oe
18427
- ], Ae = me.slice().sort(function(he, Ve) {
18428
- return he - Ve;
18429
- }), Te = 0, pe = Ae; Te < pe.length; Te++) {
18430
- var Se = pe[Te], _e = 512 * Math.pow(2, Se);
18431
- _e > oe && ge.push(_e);
18432
+ ae
18433
+ ], Ae = me.slice().sort(function(de, Ve) {
18434
+ return de - Ve;
18435
+ }), Te = 0, he = Ae; Te < he.length; Te++) {
18436
+ var Se = he[Te], _e = 512 * Math.pow(2, Se);
18437
+ _e > ae && ge.push(_e);
18432
18438
  }
18433
18439
  return Object.freeze(ge);
18434
18440
  }
18435
- return Object.freeze([oe]);
18441
+ return Object.freeze([ae]);
18436
18442
  }
18437
18443
  return Object.freeze([]);
18438
18444
  })()
18439
- }), defineProperty(re, "tiles", {
18445
+ }), defineProperty(te, "tiles", {
18440
18446
  enumerable: !0,
18441
18447
  configurable: !1,
18442
18448
  writable: !1,
18443
18449
  value: (function() {
18444
- var oe = getImageSizeFromURL(re.front);
18445
- if (oe) {
18446
- var ue = re.sizeList.slice();
18450
+ var ae = getImageSizeFromURL(te.front);
18451
+ if (ae) {
18452
+ var ue = te.sizeList.slice();
18447
18453
  if (ue[0]) {
18448
18454
  var me = getTileLevel(ue[0]);
18449
18455
  if (me)
@@ -18451,8 +18457,8 @@ function parse(n, t) {
18451
18457
  ue.unshift(512 * Math.pow(2, ge));
18452
18458
  }
18453
18459
  if (!(ue.length <= 0)) {
18454
- for (var Ae = [], Te = 0, pe = ue; Te < pe.length; Te++) {
18455
- var Se = pe[Te], _e = getTileLevel(Se);
18460
+ for (var Ae = [], Te = 0, he = ue; Te < he.length; Te++) {
18461
+ var Se = he[Te], _e = getTileLevel(Se);
18456
18462
  if (typeof _e == "number") {
18457
18463
  var Ee = {};
18458
18464
  if (defineProperty(Ee, "work", {
@@ -18465,7 +18471,7 @@ function parse(n, t) {
18465
18471
  configurable: !1,
18466
18472
  writable: !1,
18467
18473
  value: _e
18468
- }), Se > oe) {
18474
+ }), Se > ae) {
18469
18475
  defineProperty(Ee, "size", {
18470
18476
  enumerable: !0,
18471
18477
  configurable: !1,
@@ -18477,13 +18483,13 @@ function parse(n, t) {
18477
18483
  writable: !1,
18478
18484
  value: 1
18479
18485
  });
18480
- for (var he = 0, Ve = FACE_ORDER$1; he < Ve.length; he++) {
18481
- var ye = Ve[he];
18486
+ for (var de = 0, Ve = FACE_ORDER$1; de < Ve.length; de++) {
18487
+ var ye = Ve[de];
18482
18488
  defineProperty(Ee, ye, {
18483
18489
  enumerable: !0,
18484
18490
  configurable: !1,
18485
18491
  writable: !1,
18486
- value: replaceImageSize(re[ye], Se)
18492
+ value: replaceImageSize(te[ye], Se)
18487
18493
  });
18488
18494
  }
18489
18495
  } else {
@@ -18491,12 +18497,12 @@ function parse(n, t) {
18491
18497
  enumerable: !0,
18492
18498
  configurable: !1,
18493
18499
  writable: !1,
18494
- value: oe
18500
+ value: ae
18495
18501
  }), defineProperty(Ee, "scale", {
18496
18502
  enumerable: !0,
18497
18503
  configurable: !1,
18498
18504
  writable: !1,
18499
- value: Se / oe
18505
+ value: Se / ae
18500
18506
  });
18501
18507
  for (var Be = 0, Ie = FACE_ORDER$1; Be < Ie.length; Be++) {
18502
18508
  var ye = Ie[Be];
@@ -18504,7 +18510,7 @@ function parse(n, t) {
18504
18510
  enumerable: !0,
18505
18511
  configurable: !1,
18506
18512
  writable: !1,
18507
- value: re[ye]
18513
+ value: te[ye]
18508
18514
  });
18509
18515
  }
18510
18516
  }
@@ -18515,13 +18521,13 @@ function parse(n, t) {
18515
18521
  }
18516
18522
  }
18517
18523
  })()
18518
- }), defineProperty(re, "video", {
18524
+ }), defineProperty(te, "video", {
18519
18525
  enumerable: !0,
18520
18526
  configurable: !1,
18521
18527
  writable: !1,
18522
18528
  value: (function() {
18523
- var oe = G(ee, "video"), ue = void 0;
18524
- return oe && (ue = {}, defineProperty(ue, "work", {
18529
+ var ae = K($, "video"), ue = void 0;
18530
+ return ae && (ue = {}, defineProperty(ue, "work", {
18525
18531
  enumerable: !1,
18526
18532
  configurable: !1,
18527
18533
  writable: !1,
@@ -18530,24 +18536,24 @@ function parse(n, t) {
18530
18536
  enumerable: !0,
18531
18537
  configurable: !1,
18532
18538
  writable: !1,
18533
- value: oe.source
18539
+ value: ae.source
18534
18540
  }), defineProperty(ue, "matrix", {
18535
18541
  enumerable: !0,
18536
18542
  configurable: !1,
18537
18543
  writable: !1,
18538
- value: new THREE.Matrix4().fromArray(oe.matrix)
18544
+ value: new THREE.Matrix4().fromArray(ae.matrix)
18539
18545
  }), defineProperty(ue, "size", {
18540
18546
  enumerable: !0,
18541
18547
  configurable: !1,
18542
18548
  writable: !1,
18543
- value: new THREE.Vector2().fromArray(oe.size)
18549
+ value: new THREE.Vector2().fromArray(ae.size)
18544
18550
  })), ue;
18545
18551
  })()
18546
- }), re;
18552
+ }), te;
18547
18553
  })()
18548
- }), L.push(te);
18549
- }, ne = 0; ne < q; ne++)
18550
- ie(ne);
18554
+ }), L.push(ne);
18555
+ }, re = 0; re < q; re++)
18556
+ ie(re);
18551
18557
  }
18552
18558
  defineProperty(t, "observers", {
18553
18559
  enumerable: !0,
@@ -18555,8 +18561,8 @@ function parse(n, t) {
18555
18561
  writable: !1,
18556
18562
  value: Object.freeze(L)
18557
18563
  });
18558
- var $ = {};
18559
- if (defineProperty($, "work", {
18564
+ var ee = {};
18565
+ if (defineProperty(ee, "work", {
18560
18566
  enumerable: !1,
18561
18567
  configurable: !1,
18562
18568
  writable: !1,
@@ -18564,55 +18570,55 @@ function parse(n, t) {
18564
18570
  }), C.initial) {
18565
18571
  if (t.observers.length > 0) {
18566
18572
  var Z = void 0;
18567
- isNumber(C.initial.panoIndex) ? Z = C.initial.panoIndex : isNumber(C.initial.pano_index) ? Z = C.initial.pano_index : isNumber(C.initial.pano) && (Z = C.initial.pano), typeof Z == "number" && (Z = clamp$1(Z, 0, t.observers.length - 1), defineProperty($, "panoIndex", {
18573
+ isNumber(C.initial.panoIndex) ? Z = C.initial.panoIndex : isNumber(C.initial.pano_index) ? Z = C.initial.pano_index : isNumber(C.initial.pano) && (Z = C.initial.pano), typeof Z == "number" && (Z = clamp$1(Z, 0, t.observers.length - 1), defineProperty(ee, "panoIndex", {
18568
18574
  enumerable: !0,
18569
18575
  writable: !0,
18570
18576
  value: Z
18571
18577
  }));
18572
18578
  }
18573
- if (C.initial.mode === "Panorama" && t.observers.length === 0 || C.initial.mode === "Floorplan" || C.initial.mode === "Topview" || C.initial.mode === "Model" || C.initial.mode === "Mapview" ? defineProperty($, "mode", {
18579
+ if (C.initial.mode === "Panorama" && t.observers.length === 0 || C.initial.mode === "Floorplan" || C.initial.mode === "Topview" || C.initial.mode === "Model" || C.initial.mode === "Mapview" ? defineProperty(ee, "mode", {
18574
18580
  enumerable: !0,
18575
18581
  writable: !0,
18576
18582
  value: C.initial.mode
18577
- }) : typeof $.panoIndex == "number" ? defineProperty($, "mode", {
18583
+ }) : typeof ee.panoIndex == "number" ? defineProperty(ee, "mode", {
18578
18584
  enumerable: !0,
18579
18585
  writable: !0,
18580
18586
  value: "Panorama"
18581
- }) : defineProperty($, "mode", {
18587
+ }) : defineProperty(ee, "mode", {
18582
18588
  enumerable: !0,
18583
18589
  writable: !0,
18584
18590
  value: "Mapview"
18585
- }), isNumber(C.initial.latitude) && defineProperty($, "latitude", {
18591
+ }), isNumber(C.initial.latitude) && defineProperty(ee, "latitude", {
18586
18592
  enumerable: !0,
18587
18593
  writable: !0,
18588
18594
  value: C.initial.latitude
18589
- }), isNumber(C.initial.longitude) ? defineProperty($, "longitude", {
18595
+ }), isNumber(C.initial.longitude) ? defineProperty(ee, "longitude", {
18590
18596
  enumerable: !0,
18591
18597
  writable: !0,
18592
18598
  value: C.initial.longitude
18593
- }) : isNumber(C.initial.heading) && defineProperty($, "longitude", {
18599
+ }) : isNumber(C.initial.heading) && defineProperty(ee, "longitude", {
18594
18600
  enumerable: !0,
18595
18601
  writable: !0,
18596
18602
  value: headingToLongitude(C.initial.heading)
18597
- }), isNumber(C.initial.fov) && defineProperty($, "fov", {
18603
+ }), isNumber(C.initial.fov) && defineProperty(ee, "fov", {
18598
18604
  enumerable: !0,
18599
18605
  writable: !0,
18600
18606
  value: C.initial.fov
18601
- }), isNumber(C.initial.distance) && defineProperty($, "distance", {
18607
+ }), isNumber(C.initial.distance) && defineProperty(ee, "distance", {
18602
18608
  enumerable: !0,
18603
18609
  writable: !0,
18604
18610
  value: C.initial.distance
18605
18611
  }), Array.isArray(C.initial.offset)) {
18606
- var X = C.initial.offset, se = [0, 0, 0].map(function(K, W) {
18607
- var ee = Number(X[W]);
18608
- return isNaN(ee) || !isFinite(ee) ? 0 : ee;
18612
+ var X = C.initial.offset, se = [0, 0, 0].map(function(G, W) {
18613
+ var $ = Number(X[W]);
18614
+ return isNaN($) || !isFinite($) ? 0 : $;
18609
18615
  });
18610
- defineProperty($, "offset", {
18616
+ defineProperty(ee, "offset", {
18611
18617
  enumerable: !0,
18612
18618
  writable: !0,
18613
18619
  value: new THREE.Vector3().fromArray(se)
18614
18620
  });
18615
- } else typeof C.initial.offset == "object" && typeof C.initial.offset.x == "number" && typeof C.initial.offset.y == "number" && typeof C.initial.offset.z == "number" && defineProperty($, "offset", {
18621
+ } else typeof C.initial.offset == "object" && typeof C.initial.offset.x == "number" && typeof C.initial.offset.y == "number" && typeof C.initial.offset.z == "number" && defineProperty(ee, "offset", {
18616
18622
  enumerable: !0,
18617
18623
  writable: !0,
18618
18624
  value: new THREE.Vector3().fromArray([
@@ -18626,7 +18632,7 @@ function parse(n, t) {
18626
18632
  enumerable: !0,
18627
18633
  configurable: !1,
18628
18634
  writable: !1,
18629
- value: $
18635
+ value: ee
18630
18636
  }), t;
18631
18637
  }
18632
18638
  function parseNull(n, t) {
@@ -21058,14 +21064,14 @@ var Hammer = (function(n, t, e, r) {
21058
21064
  var F = B.ownerDocument || B;
21059
21065
  return F.defaultView || F.parentWindow || n;
21060
21066
  }
21061
- var D = /mobile|tablet|ip(ad|hone|od)|android/i, q = "ontouchstart" in n, z = H(n, "PointerEvent") !== r, J = q && D.test(navigator.userAgent), V = "touch", U = "pen", j = "mouse", G = "kinect", ie = 25, ne = 1, $ = 2, Z = 4, X = 8, se = 1, K = 2, W = 4, ee = 8, te = 16, re = K | W, de = ee | te, ae = re | de, fe = ["x", "y"], be = ["clientX", "clientY"];
21062
- function oe(B, F) {
21067
+ var D = /mobile|tablet|ip(ad|hone|od)|android/i, q = "ontouchstart" in n, z = H(n, "PointerEvent") !== r, J = q && D.test(navigator.userAgent), V = "touch", U = "pen", j = "mouse", K = "kinect", ie = 25, re = 1, ee = 2, Z = 4, X = 8, se = 1, G = 2, W = 4, $ = 8, ne = 16, te = G | W, ve = $ | ne, oe = te | ve, fe = ["x", "y"], be = ["clientX", "clientY"];
21068
+ function ae(B, F) {
21063
21069
  var N = this;
21064
21070
  this.manager = B, this.callback = F, this.element = B.element, this.target = B.options.inputTarget, this.domHandler = function(Q) {
21065
21071
  b(B.options.enable, [B]) && N.handler(Q);
21066
21072
  }, this.init();
21067
21073
  }
21068
- oe.prototype = {
21074
+ ae.prototype = {
21069
21075
  /**
21070
21076
  * should handle the inputEvent data and trigger the callback
21071
21077
  * @virtual
@@ -21090,14 +21096,14 @@ var Hammer = (function(n, t, e, r) {
21090
21096
  return N ? F = N : z ? F = tt : J ? F = Ne : q ? F = yt : F = ze, new F(B, me);
21091
21097
  }
21092
21098
  function me(B, F, N) {
21093
- var Q = N.pointers.length, Y = N.changedPointers.length, le = F & ne && Q - Y === 0, xe = F & (Z | X) && Q - Y === 0;
21099
+ var Q = N.pointers.length, Y = N.changedPointers.length, le = F & re && Q - Y === 0, xe = F & (Z | X) && Q - Y === 0;
21094
21100
  N.isFirst = !!le, N.isFinal = !!xe, le && (B.session = {}), N.eventType = F, ge(B, N), B.emit("hammer.input", N), B.recognize(N), B.session.prevInput = N;
21095
21101
  }
21096
21102
  function ge(B, F) {
21097
21103
  var N = B.session, Q = F.pointers, Y = Q.length;
21098
- N.firstInput || (N.firstInput = pe(F)), Y > 1 && !N.firstMultiple ? N.firstMultiple = pe(F) : Y === 1 && (N.firstMultiple = !1);
21104
+ N.firstInput || (N.firstInput = he(F)), Y > 1 && !N.firstMultiple ? N.firstMultiple = he(F) : Y === 1 && (N.firstMultiple = !1);
21099
21105
  var le = N.firstInput, xe = N.firstMultiple, Ge = xe ? xe.center : le.center, Ze = F.center = Se(Q);
21100
- F.timeStamp = f(), F.deltaTime = F.timeStamp - le.timeStamp, F.angle = Ve(Ge, Ze), F.distance = he(Ge, Ze), Ae(N, F), F.offsetDirection = Ee(F.deltaX, F.deltaY);
21106
+ F.timeStamp = f(), F.deltaTime = F.timeStamp - le.timeStamp, F.angle = Ve(Ge, Ze), F.distance = de(Ge, Ze), Ae(N, F), F.offsetDirection = Ee(F.deltaX, F.deltaY);
21101
21107
  var De = _e(F.deltaTime, F.deltaX, F.deltaY);
21102
21108
  F.overallVelocityX = De.x, F.overallVelocityY = De.y, F.overallVelocity = c(De.x) > c(De.y) ? De.x : De.y, F.scale = xe ? Be(xe.pointers, Q) : 1, F.rotation = xe ? ye(xe.pointers, Q) : 0, F.maxPointers = N.prevInput ? F.pointers.length > N.prevInput.maxPointers ? F.pointers.length : N.prevInput.maxPointers : F.pointers.length, Te(N, F);
21103
21109
  var St = B.element;
@@ -21105,7 +21111,7 @@ var Hammer = (function(n, t, e, r) {
21105
21111
  }
21106
21112
  function Ae(B, F) {
21107
21113
  var N = F.center, Q = B.offsetDelta || {}, Y = B.prevDelta || {}, le = B.prevInput || {};
21108
- (F.eventType === ne || le.eventType === Z) && (Y = B.prevDelta = {
21114
+ (F.eventType === re || le.eventType === Z) && (Y = B.prevDelta = {
21109
21115
  x: le.deltaX || 0,
21110
21116
  y: le.deltaY || 0
21111
21117
  }, Q = B.offsetDelta = {
@@ -21122,7 +21128,7 @@ var Hammer = (function(n, t, e, r) {
21122
21128
  Y = N.velocity, le = N.velocityX, xe = N.velocityY, Ge = N.direction;
21123
21129
  F.velocity = Y, F.velocityX = le, F.velocityY = xe, F.direction = Ge;
21124
21130
  }
21125
- function pe(B) {
21131
+ function he(B) {
21126
21132
  for (var F = [], N = 0; N < B.pointers.length; )
21127
21133
  F[N] = {
21128
21134
  clientX: l(B.pointers[N].clientX),
@@ -21157,9 +21163,9 @@ var Hammer = (function(n, t, e, r) {
21157
21163
  };
21158
21164
  }
21159
21165
  function Ee(B, F) {
21160
- return B === F ? se : c(B) >= c(F) ? B < 0 ? K : W : F < 0 ? ee : te;
21166
+ return B === F ? se : c(B) >= c(F) ? B < 0 ? G : W : F < 0 ? $ : ne;
21161
21167
  }
21162
- function he(B, F, N) {
21168
+ function de(B, F, N) {
21163
21169
  N || (N = fe);
21164
21170
  var Q = F[N[0]] - B[N[0]], Y = F[N[1]] - B[N[1]];
21165
21171
  return Math.sqrt(Q * Q + Y * Y);
@@ -21173,24 +21179,24 @@ var Hammer = (function(n, t, e, r) {
21173
21179
  return Ve(F[1], F[0], be) + Ve(B[1], B[0], be);
21174
21180
  }
21175
21181
  function Be(B, F) {
21176
- return he(F[0], F[1], be) / he(B[0], B[1], be);
21182
+ return de(F[0], F[1], be) / de(B[0], B[1], be);
21177
21183
  }
21178
21184
  var Ie = {
21179
- mousedown: ne,
21180
- mousemove: $,
21185
+ mousedown: re,
21186
+ mousemove: ee,
21181
21187
  mouseup: Z
21182
21188
  }, $e = "mousedown", Re = "mousemove mouseup";
21183
21189
  function ze() {
21184
- this.evEl = $e, this.evWin = Re, this.pressed = !1, oe.apply(this, arguments);
21190
+ this.evEl = $e, this.evWin = Re, this.pressed = !1, ae.apply(this, arguments);
21185
21191
  }
21186
- v(ze, oe, {
21192
+ v(ze, ae, {
21187
21193
  /**
21188
21194
  * handle mouse events
21189
21195
  * @param {Object} ev
21190
21196
  */
21191
21197
  handler: function(F) {
21192
21198
  var N = Ie[F.type];
21193
- N & ne && (F.button === 0 || F.button === 2) && (this.pressed = !0), N & $ && F.which !== 1 && (N = Z), this.pressed && (N & Z && (this.pressed = !1), this.callback(this.manager, N, {
21199
+ N & re && (F.button === 0 || F.button === 2) && (this.pressed = !0), N & ee && F.which !== 1 && (N = Z), this.pressed && (N & Z && (this.pressed = !1), this.callback(this.manager, N, {
21194
21200
  pointers: [F],
21195
21201
  changedPointers: [F],
21196
21202
  pointerType: j,
@@ -21199,8 +21205,8 @@ var Hammer = (function(n, t, e, r) {
21199
21205
  }
21200
21206
  });
21201
21207
  var Fe = {
21202
- pointerdown: ne,
21203
- pointermove: $,
21208
+ pointerdown: re,
21209
+ pointermove: ee,
21204
21210
  pointerup: Z,
21205
21211
  pointercancel: X,
21206
21212
  pointerout: X
@@ -21208,21 +21214,21 @@ var Hammer = (function(n, t, e, r) {
21208
21214
  2: V,
21209
21215
  3: U,
21210
21216
  4: j,
21211
- 5: G
21217
+ 5: K
21212
21218
  // see https://twitter.com/jacobrossi/status/480596438489890816
21213
21219
  }, Le = "pointerdown", Ue = "pointermove pointerup pointercancel";
21214
21220
  n.MSPointerEvent && !n.PointerEvent && (Le = "MSPointerDown", Ue = "MSPointerMove MSPointerUp MSPointerCancel");
21215
21221
  function tt() {
21216
- this.evEl = Le, this.evWin = Ue, oe.apply(this, arguments), this.store = this.manager.session.pointerEvents = [];
21222
+ this.evEl = Le, this.evWin = Ue, ae.apply(this, arguments), this.store = this.manager.session.pointerEvents = [];
21217
21223
  }
21218
- v(tt, oe, {
21224
+ v(tt, ae, {
21219
21225
  /**
21220
21226
  * handle mouse events
21221
21227
  * @param {Object} ev
21222
21228
  */
21223
21229
  handler: function(F) {
21224
21230
  var N = this.store, Q = !1, Y = !1, le = F.type.toLowerCase().replace("ms", ""), xe = Fe[le], Ge = Oe[F.pointerType] || F.pointerType, Ze = Ge == V, De = _(N, F.pointerId, "pointerId");
21225
- xe & ne && (F.button === 0 || F.button === 2 || Ze) ? De < 0 && (N.push(F), De = N.length - 1) : xe & (Z | X) ? Q = !0 : !Ze && F.buttons === 0 && (Q = !0, Y = !0, xe = Fe.pointerup), !(De < 0) && (Y || (N[De] = F), this.callback(this.manager, xe, {
21231
+ xe & re && (F.button === 0 || F.button === 2 || Ze) ? De < 0 && (N.push(F), De = N.length - 1) : xe & (Z | X) ? Q = !0 : !Ze && F.buttons === 0 && (Q = !0, Y = !0, xe = Fe.pointerup), !(De < 0) && (Y || (N[De] = F), this.callback(this.manager, xe, {
21226
21232
  pointers: N,
21227
21233
  changedPointers: [F],
21228
21234
  pointerType: Ge,
@@ -21231,18 +21237,18 @@ var Hammer = (function(n, t, e, r) {
21231
21237
  }
21232
21238
  });
21233
21239
  var lt = {
21234
- touchstart: ne,
21235
- touchmove: $,
21240
+ touchstart: re,
21241
+ touchmove: ee,
21236
21242
  touchend: Z,
21237
21243
  touchcancel: X
21238
21244
  }, nt = "touchstart", ot = "touchstart touchmove touchend touchcancel";
21239
21245
  function At() {
21240
- this.evTarget = nt, this.evWin = ot, this.started = !1, oe.apply(this, arguments);
21246
+ this.evTarget = nt, this.evWin = ot, this.started = !1, ae.apply(this, arguments);
21241
21247
  }
21242
- v(At, oe, {
21248
+ v(At, ae, {
21243
21249
  handler: function(F) {
21244
21250
  var N = lt[F.type];
21245
- if (N === ne && (this.started = !0), !!this.started) {
21251
+ if (N === re && (this.started = !0), !!this.started) {
21246
21252
  var Q = We.call(this, F, N);
21247
21253
  N & (Z | X) && Q[0].length - Q[1].length === 0 && (this.started = !1), this.callback(this.manager, N, {
21248
21254
  pointers: Q[0],
@@ -21258,15 +21264,15 @@ var Hammer = (function(n, t, e, r) {
21258
21264
  return F & (Z | X) && (N = C(N.concat(Q), "identifier")), [N, Q];
21259
21265
  }
21260
21266
  var Ct = {
21261
- touchstart: ne,
21262
- touchmove: $,
21267
+ touchstart: re,
21268
+ touchmove: ee,
21263
21269
  touchend: Z,
21264
21270
  touchcancel: X
21265
21271
  }, He = "touchstart touchmove touchend touchcancel";
21266
21272
  function Ne() {
21267
- this.evTarget = He, this.targetIds = {}, oe.apply(this, arguments);
21273
+ this.evTarget = He, this.targetIds = {}, ae.apply(this, arguments);
21268
21274
  }
21269
- v(Ne, oe, {
21275
+ v(Ne, ae, {
21270
21276
  handler: function(F) {
21271
21277
  var N = Ct[F.type], Q = bt.call(this, F, N);
21272
21278
  Q && this.callback(this.manager, N, {
@@ -21279,12 +21285,12 @@ var Hammer = (function(n, t, e, r) {
21279
21285
  });
21280
21286
  function bt(B, F) {
21281
21287
  var N = I(B.touches), Q = this.targetIds;
21282
- if (F & (ne | $) && N.length === 1)
21288
+ if (F & (re | ee) && N.length === 1)
21283
21289
  return Q[N[0].identifier] = !0, [N, N];
21284
21290
  var Y, le, xe = I(B.changedTouches), Ge = [], Ze = this.target;
21285
21291
  if (le = N.filter(function(De) {
21286
21292
  return M(De.target, Ze);
21287
- }), F === ne)
21293
+ }), F === re)
21288
21294
  for (Y = 0; Y < le.length; )
21289
21295
  Q[le[Y].identifier] = !0, Y++;
21290
21296
  for (Y = 0; Y < xe.length; )
@@ -21298,11 +21304,11 @@ var Hammer = (function(n, t, e, r) {
21298
21304
  }
21299
21305
  var It = 2500, Tt = 25;
21300
21306
  function yt() {
21301
- oe.apply(this, arguments);
21307
+ ae.apply(this, arguments);
21302
21308
  var B = A(this.handler, this);
21303
21309
  this.touch = new Ne(this.manager, B), this.mouse = new ze(this.manager, B), this.primaryTouch = null, this.lastTouches = [];
21304
21310
  }
21305
- v(yt, oe, {
21311
+ v(yt, ae, {
21306
21312
  /**
21307
21313
  * handle mouse and touch events
21308
21314
  * @param {Hammer} manager
@@ -21327,7 +21333,7 @@ var Hammer = (function(n, t, e, r) {
21327
21333
  }
21328
21334
  });
21329
21335
  function Rt(B, F) {
21330
- B & ne ? (this.primaryTouch = F.changedPointers[0].identifier, rt.call(this, F)) : B & (Z | X) && rt.call(this, F);
21336
+ B & re ? (this.primaryTouch = F.changedPointers[0].identifier, rt.call(this, F)) : B & (Z | X) && rt.call(this, F);
21331
21337
  }
21332
21338
  function rt(B) {
21333
21339
  var F = B.changedPointers[0];
@@ -21393,7 +21399,7 @@ var Hammer = (function(n, t, e, r) {
21393
21399
  if (Ge && Ze && De)
21394
21400
  return;
21395
21401
  }
21396
- if (!(xe && le) && (Y || le && N & re || xe && N & de))
21402
+ if (!(xe && le) && (Y || le && N & te || xe && N & ve))
21397
21403
  return this.preventSrc(F);
21398
21404
  },
21399
21405
  /**
@@ -21569,7 +21575,7 @@ var Hammer = (function(n, t, e, r) {
21569
21575
  return B & mt ? "cancel" : B & xt ? "end" : B & Pt ? "move" : B & dt ? "start" : "";
21570
21576
  }
21571
21577
  function Ot(B) {
21572
- return B == te ? "down" : B == ee ? "up" : B == K ? "left" : B == W ? "right" : "";
21578
+ return B == ne ? "down" : B == $ ? "up" : B == G ? "left" : B == W ? "right" : "";
21573
21579
  }
21574
21580
  function _t(B, F) {
21575
21581
  var N = F.manager;
@@ -21623,15 +21629,15 @@ var Hammer = (function(n, t, e, r) {
21623
21629
  event: "pan",
21624
21630
  threshold: 10,
21625
21631
  pointers: 1,
21626
- direction: ae
21632
+ direction: oe
21627
21633
  },
21628
21634
  getTouchAction: function() {
21629
21635
  var B = this.options.direction, F = [];
21630
- return B & re && F.push(st), B & de && F.push(je), F;
21636
+ return B & te && F.push(st), B & ve && F.push(je), F;
21631
21637
  },
21632
21638
  directionTest: function(B) {
21633
21639
  var F = this.options, N = !0, Q = B.distance, Y = B.direction, le = B.deltaX, xe = B.deltaY;
21634
- return Y & F.direction || (F.direction & re ? (Y = le === 0 ? se : le < 0 ? K : W, N = le != this.pX, Q = Math.abs(B.deltaX)) : (Y = xe === 0 ? se : xe < 0 ? ee : te, N = xe != this.pY, Q = Math.abs(B.deltaY))), B.direction = Y, N && Q > F.threshold && Y & F.direction;
21640
+ return Y & F.direction || (F.direction & te ? (Y = le === 0 ? se : le < 0 ? G : W, N = le != this.pX, Q = Math.abs(B.deltaX)) : (Y = xe === 0 ? se : xe < 0 ? $ : ne, N = xe != this.pY, Q = Math.abs(B.deltaY))), B.direction = Y, N && Q > F.threshold && Y & F.direction;
21635
21641
  },
21636
21642
  attrTest: function(B) {
21637
21643
  return at.prototype.attrTest.call(this, B) && (this.state & dt || !(this.state & dt) && this.directionTest(B));
@@ -21692,7 +21698,7 @@ var Hammer = (function(n, t, e, r) {
21692
21698
  var F = this.options, N = B.pointers.length === F.pointers, Q = B.distance < F.threshold, Y = B.deltaTime > F.time;
21693
21699
  if (this._input = B, !Q || !N || B.eventType & (Z | X) && !Y)
21694
21700
  this.reset();
21695
- else if (B.eventType & ne)
21701
+ else if (B.eventType & re)
21696
21702
  this.reset(), this._timer = d(function() {
21697
21703
  this.state = pt, this.tryEmit();
21698
21704
  }, F.time, this);
@@ -21707,10 +21713,10 @@ var Hammer = (function(n, t, e, r) {
21707
21713
  this.state === pt && (B && B.eventType & Z ? this.manager.emit(this.options.event + "up", B) : (this._input.timeStamp = f(), this.manager.emit(this.options.event, this._input)));
21708
21714
  }
21709
21715
  });
21710
- function ve() {
21716
+ function pe() {
21711
21717
  at.apply(this, arguments);
21712
21718
  }
21713
- v(ve, at, {
21719
+ v(pe, at, {
21714
21720
  /**
21715
21721
  * @namespace
21716
21722
  * @memberof RotateRecognizer
@@ -21739,7 +21745,7 @@ var Hammer = (function(n, t, e, r) {
21739
21745
  event: "swipe",
21740
21746
  threshold: 10,
21741
21747
  velocity: 0.3,
21742
- direction: re | de,
21748
+ direction: te | ve,
21743
21749
  pointers: 1
21744
21750
  },
21745
21751
  getTouchAction: function() {
@@ -21747,7 +21753,7 @@ var Hammer = (function(n, t, e, r) {
21747
21753
  },
21748
21754
  attrTest: function(B) {
21749
21755
  var F = this.options.direction, N;
21750
- return F & (re | de) ? N = B.overallVelocity : F & re ? N = B.overallVelocityX : F & de && (N = B.overallVelocityY), this._super.attrTest.call(this, B) && F & B.offsetDirection && B.distance > this.options.threshold && B.maxPointers == this.options.pointers && c(N) > this.options.velocity && B.eventType & Z;
21756
+ return F & (te | ve) ? N = B.overallVelocity : F & te ? N = B.overallVelocityX : F & ve && (N = B.overallVelocityY), this._super.attrTest.call(this, B) && F & B.offsetDirection && B.distance > this.options.threshold && B.maxPointers == this.options.pointers && c(N) > this.options.velocity && B.eventType & Z;
21751
21757
  },
21752
21758
  emit: function(B) {
21753
21759
  var F = Ot(B.offsetDirection);
@@ -21780,12 +21786,12 @@ var Hammer = (function(n, t, e, r) {
21780
21786
  },
21781
21787
  process: function(B) {
21782
21788
  var F = this.options, N = B.pointers.length === F.pointers, Q = B.distance < F.threshold, Y = B.deltaTime < F.time;
21783
- if (this.reset(), B.eventType & ne && this.count === 0)
21789
+ if (this.reset(), B.eventType & re && this.count === 0)
21784
21790
  return this.failTimeout();
21785
21791
  if (Q && Y && N) {
21786
21792
  if (B.eventType != Z)
21787
21793
  return this.failTimeout();
21788
- var le = this.pTime ? B.timeStamp - this.pTime < F.interval : !0, xe = !this.pCenter || he(this.pCenter, B.center) < F.posThreshold;
21794
+ var le = this.pTime ? B.timeStamp - this.pTime < F.interval : !0, xe = !this.pCenter || de(this.pCenter, B.center) < F.posThreshold;
21789
21795
  this.pTime = B.timeStamp, this.pCenter = B.center, !xe || !le ? this.count = 1 : this.count += 1, this._input = B;
21790
21796
  var Ge = this.count % F.taps;
21791
21797
  if (Ge === 0)
@@ -21851,10 +21857,10 @@ var Hammer = (function(n, t, e, r) {
21851
21857
  */
21852
21858
  preset: [
21853
21859
  // RecognizerClass, options, [recognizeWith, ...], [requireFailure, ...]
21854
- [ve, { enable: !1 }],
21860
+ [pe, { enable: !1 }],
21855
21861
  [wt, { enable: !1 }, ["rotate"]],
21856
- [Pe, { direction: re }],
21857
- [vt, { direction: re }, ["swipe"]],
21862
+ [Pe, { direction: te }],
21863
+ [vt, { direction: te }, ["swipe"]],
21858
21864
  [we],
21859
21865
  [we, { event: "doubletap", taps: 2 }, ["tap"]],
21860
21866
  [Mt]
@@ -22054,8 +22060,8 @@ var Hammer = (function(n, t, e, r) {
22054
22060
  N.initEvent(B, !0, !0), N.gesture = F, F.target.dispatchEvent(N);
22055
22061
  }
22056
22062
  return m(qe, {
22057
- INPUT_START: ne,
22058
- INPUT_MOVE: $,
22063
+ INPUT_START: re,
22064
+ INPUT_MOVE: ee,
22059
22065
  INPUT_END: Z,
22060
22066
  INPUT_CANCEL: X,
22061
22067
  STATE_POSSIBLE: Ft,
@@ -22066,15 +22072,15 @@ var Hammer = (function(n, t, e, r) {
22066
22072
  STATE_CANCELLED: mt,
22067
22073
  STATE_FAILED: gt,
22068
22074
  DIRECTION_NONE: se,
22069
- DIRECTION_LEFT: K,
22075
+ DIRECTION_LEFT: G,
22070
22076
  DIRECTION_RIGHT: W,
22071
- DIRECTION_UP: ee,
22072
- DIRECTION_DOWN: te,
22073
- DIRECTION_HORIZONTAL: re,
22074
- DIRECTION_VERTICAL: de,
22075
- DIRECTION_ALL: ae,
22077
+ DIRECTION_UP: $,
22078
+ DIRECTION_DOWN: ne,
22079
+ DIRECTION_HORIZONTAL: te,
22080
+ DIRECTION_VERTICAL: ve,
22081
+ DIRECTION_ALL: oe,
22076
22082
  Manager: Ke,
22077
- Input: oe,
22083
+ Input: ae,
22078
22084
  TouchAction: Je,
22079
22085
  TouchInput: Ne,
22080
22086
  MouseInput: ze,
@@ -22087,7 +22093,7 @@ var Hammer = (function(n, t, e, r) {
22087
22093
  Pan: vt,
22088
22094
  Swipe: Pe,
22089
22095
  Pinch: wt,
22090
- Rotate: ve,
22096
+ Rotate: pe,
22091
22097
  Press: Mt,
22092
22098
  on: S,
22093
22099
  off: R,
@@ -22464,8 +22470,8 @@ var Hammer = (function(n, t, e, r) {
22464
22470
  } : d.prevEvent = O, r.onPinchGesture(O), h !== null && window.clearTimeout(h), h = window.setTimeout(function() {
22465
22471
  var U;
22466
22472
  h = null;
22467
- var j = (U = d == null ? void 0 : d.prevEvent.scale) !== null && U !== void 0 ? U : 1, G = p("pinchend", j, I);
22468
- d = null, r.onPinchGesture(G);
22473
+ var j = (U = d == null ? void 0 : d.prevEvent.scale) !== null && U !== void 0 ? U : 1, K = p("pinchend", j, I);
22474
+ d = null, r.onPinchGesture(K);
22469
22475
  }, 200);
22470
22476
  } else {
22471
22477
  var k = (Math.abs(I.deltaY) > Math.abs(I.deltaX) ? I.deltaY : I.deltaX) / -60, D = r.mouseWheelState !== void 0, q = {
@@ -23803,10 +23809,10 @@ void main() {
23803
23809
  M.sort(function(X, se) {
23804
23810
  if (X.level !== se.level)
23805
23811
  return X.level - se.level;
23806
- var K = w.get(X);
23807
- K === void 0 && (K = X.box.getCenter(scratchSortVector3).angleTo(R), w.set(X, K));
23812
+ var G = w.get(X);
23813
+ G === void 0 && (G = X.box.getCenter(scratchSortVector3).angleTo(R), w.set(X, G));
23808
23814
  var W = w.get(se);
23809
- return W === void 0 && (W = se.box.getCenter(scratchSortVector3).angleTo(R), w.set(se, W)), K - W;
23815
+ return W === void 0 && (W = se.box.getCenter(scratchSortVector3).angleTo(R), w.set(se, W)), G - W;
23810
23816
  });
23811
23817
  var P = /* @__PURE__ */ new WeakSet(), _ = this.observer.images.tiles;
23812
23818
  if (_)
@@ -23817,28 +23823,28 @@ void main() {
23817
23823
  if (!se)
23818
23824
  return "continue";
23819
23825
  P.add(X);
23820
- var K = C.tileMeshes.get(X);
23821
- if (K) {
23822
- K.appearDuration = C.appearDuration;
23823
- var W = K.updateTime(o);
23826
+ var G = C.tileMeshes.get(X);
23827
+ if (G) {
23828
+ G.appearDuration = C.appearDuration;
23829
+ var W = G.updateTime(o);
23824
23830
  return W && (r = !0), "continue";
23825
23831
  }
23826
23832
  if (C.pedding >= C.maxRequest)
23827
23833
  return "continue";
23828
- var ee = Math.pow(2, X.level) * X.position.y, te = Math.pow(2, X.level) * X.position.x, re = panoStringify({
23834
+ var $ = Math.pow(2, X.level) * X.position.y, ne = Math.pow(2, X.level) * X.position.x, te = panoStringify({
23829
23835
  panoIndex: C.observer.panoIndex,
23830
23836
  workCode: C.observer.work.workCode
23831
- }), de = "".concat(re, ".").concat(X.face, ".").concat(X.level, ".").concat(ee, ".").concat(te), ae = se.work.getURL(se[X.face]), fe = se.size, be = C.imageOptions.transform, oe = __assign(__assign({}, pick(C.imageOptions, ["format", "sharpen", "forceUseExifOrientation", "mappings"])), { key: "pano_tile.".concat(de), size: se.scale >= 1 ? void 0 : fe * X.size * se.scale, cut: X.size === 1 ? void 0 : [
23837
+ }), ve = "".concat(te, ".").concat(X.face, ".").concat(X.level, ".").concat($, ".").concat(ne), oe = se.work.getURL(se[X.face]), fe = se.size, be = C.imageOptions.transform, ae = __assign(__assign({}, pick(C.imageOptions, ["format", "sharpen", "forceUseExifOrientation", "mappings"])), { key: "pano_tile.".concat(ve), size: se.scale >= 1 ? void 0 : fe * X.size * se.scale, cut: X.size === 1 ? void 0 : [
23832
23838
  fe * X.position.x,
23833
23839
  fe * X.position.y,
23834
23840
  fe * X.size,
23835
23841
  fe * X.size
23836
23842
  ] });
23837
- X.level === 1 && se.scale >= 0.5 && (oe.format === "jpg" || /\.jpg$/.test(ae)) && (oe.size = void 0, oe.quality || (oe.quality = 70)), X.size === 1 && console.warn("tile: ".concat(oe.key, " should not appear.")), C.pedding++;
23838
- var ue = C.textureLoader.loadTexture(ae, {
23843
+ X.level === 1 && se.scale >= 0.5 && (ae.format === "jpg" || /\.jpg$/.test(oe)) && (ae.size = void 0, ae.quality || (ae.quality = 70)), X.size === 1 && console.warn("tile: ".concat(ae.key, " should not appear.")), C.pedding++;
23844
+ var ue = C.textureLoader.loadTexture(oe, {
23839
23845
  imageURL: {
23840
23846
  transform: be,
23841
- options: oe
23847
+ options: ae
23842
23848
  },
23843
23849
  minFilter: THREE.LinearFilter,
23844
23850
  magFilter: THREE.LinearFilter,
@@ -23853,7 +23859,7 @@ void main() {
23853
23859
  return e.pedding--, me;
23854
23860
  }, function(me) {
23855
23861
  return e.pedding--, Promise.reject(me);
23856
- }), K = new TileMesh(X, ue), K.name = "tiling:tile-".concat(de), K.visible = !1, K.appearDuration = C.appearDuration, C.tileMeshes.set(X, K), C.scene.add(K), K.updateTime(o), r = !0;
23862
+ }), G = new TileMesh(X, ue), G.name = "tiling:tile-".concat(ve), G.visible = !1, G.appearDuration = C.appearDuration, C.tileMeshes.set(X, G), C.scene.add(G), G.updateTime(o), r = !0;
23857
23863
  }, C = this, H = 0, L = M; H < L.length; H++) {
23858
23864
  var O = L[H];
23859
23865
  I(O);
@@ -23861,8 +23867,8 @@ void main() {
23861
23867
  var k = [], D = [];
23862
23868
  this.tileMeshes.forEach(function(X, se) {
23863
23869
  P.has(se) ? k.push(X) : D.push(X);
23864
- var K = se.level >= g && se.level <= m;
23865
- X.visible !== K && (X.visible = K, r = !0);
23870
+ var G = se.level >= g && se.level <= m;
23871
+ X.visible !== G && (X.visible = G, r = !0);
23866
23872
  });
23867
23873
  for (var q = D.sort(function(X, se) {
23868
23874
  return se.activeTime - X.activeTime;
@@ -23873,8 +23879,8 @@ void main() {
23873
23879
  if (r) {
23874
23880
  var U = l.getRenderTarget();
23875
23881
  scratchPrevClearColor$1.copy(l.getClearColor());
23876
- var j = l.getClearAlpha(), G = l.autoClear, ie = l.autoClearColor, ne = l.autoClearDepth, $ = l.autoClearStencil, Z = l.clippingPlanes;
23877
- l.autoClear = !0, l.autoClearColor = !0, l.autoClearDepth = !0, l.autoClearStencil = !0, l.clippingPlanes = clippingPlanes, l.setRenderTarget(this.renderTarget), l.setClearColor(clearColor$1, clearAlpha), l.render(this.scene, this.camera), l.setRenderTarget(U), l.setClearColor(scratchPrevClearColor$1, j), l.autoClear = G, l.autoClearColor = ie, l.autoClearDepth = ne, l.autoClearStencil = $, l.clippingPlanes = Z;
23882
+ var j = l.getClearAlpha(), K = l.autoClear, ie = l.autoClearColor, re = l.autoClearDepth, ee = l.autoClearStencil, Z = l.clippingPlanes;
23883
+ l.autoClear = !0, l.autoClearColor = !0, l.autoClearDepth = !0, l.autoClearStencil = !0, l.clippingPlanes = clippingPlanes, l.setRenderTarget(this.renderTarget), l.setClearColor(clearColor$1, clearAlpha), l.render(this.scene, this.camera), l.setRenderTarget(U), l.setClearColor(scratchPrevClearColor$1, j), l.autoClear = K, l.autoClearColor = ie, l.autoClearDepth = re, l.autoClearStencil = ee, l.clippingPlanes = Z;
23878
23884
  }
23879
23885
  return this.forceRenderWhenNextUpdate = !1, r;
23880
23886
  }, n;
@@ -24197,20 +24203,20 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
24197
24203
  for (var V = 0, U = Object.keys(this.panoResources); V < U.length; V++) {
24198
24204
  var j = U[V];
24199
24205
  if (!(O.indexOf(j) >= 0)) {
24200
- var G = this.panoResources[j];
24201
- if (G.panoPicture) {
24202
- var ie = G.panoPicture.map;
24206
+ var K = this.panoResources[j];
24207
+ if (K.panoPicture) {
24208
+ var ie = K.panoPicture.map;
24203
24209
  if (ie) {
24204
24210
  if (ie === ((s = h.pano0) === null || s === void 0 ? void 0 : s.map) || ie === ((u = h.pano1) === null || u === void 0 ? void 0 : u.map))
24205
24211
  continue;
24206
- ie.dispose(), G.panoPicture = null;
24212
+ ie.dispose(), K.panoPicture = null;
24207
24213
  }
24208
24214
  }
24209
24215
  L.indexOf(j) >= 0 || delete this.panoResources[j];
24210
24216
  }
24211
24217
  }
24212
- var ne = panoParse(T.panoId);
24213
- ne !== this.currentPano && (this.currentPano = ne, this.accessibleObserverFloorCheckCount = 0), this.emit("pano.moving", createEvent("pano.moving", {
24218
+ var re = panoParse(T.panoId);
24219
+ re !== this.currentPano && (this.currentPano = re, this.accessibleObserverFloorCheckCount = 0), this.emit("pano.moving", createEvent("pano.moving", {
24214
24220
  userAction: this.userAction,
24215
24221
  prevPano: panoParse(S.panoId),
24216
24222
  state: __assign(__assign(__assign(__assign({}, panoParse(R.panoId)), { mode: this.mode }), clonePose(this.camera.pose)), p),
@@ -24220,27 +24226,27 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
24220
24226
  }));
24221
24227
  }
24222
24228
  isEmptyObject(h) === !1 && this.modelScene.parameter.set(h), isEmptyObject(p) === !1 && this.setCamera(p);
24223
- var $ = this.works.getObserver(this.currentPano), Z = this.locationMotion.ended ? this.getForwardObserverOrNot(this.camera) : null, X = this.works.getObserver(b.panoId), se = this.works.getObserver(T.panoId);
24224
- if (this.adjustPanoCircleMeshPositionBasedOnModel && this.helper.visible && $) {
24225
- for (var K = [], W = $.work.observers, ee = 0, te = $.accessibleNodes; ee < te.length; ee++) {
24226
- var re = te[ee], H = W[re];
24227
- H && K.push(H);
24229
+ var ee = this.works.getObserver(this.currentPano), Z = this.locationMotion.ended ? this.getForwardObserverOrNot(this.camera) : null, X = this.works.getObserver(b.panoId), se = this.works.getObserver(T.panoId);
24230
+ if (this.adjustPanoCircleMeshPositionBasedOnModel && this.helper.visible && ee) {
24231
+ for (var G = [], W = ee.work.observers, $ = 0, ne = ee.accessibleNodes; $ < ne.length; $++) {
24232
+ var te = ne[$], H = W[te];
24233
+ H && G.push(H);
24228
24234
  }
24229
- var de = /* @__PURE__ */ new Map();
24230
- if (K.sort(function(ce, Me) {
24231
- var Ce = de.get(ce);
24232
- typeof Ce == "undefined" && (Ce = ce.standingPosition.distanceTo($.standingPosition), de.set(ce, Ce));
24233
- var ke = de.get(ce);
24234
- return typeof ke == "undefined" && (ke = Me.standingPosition.distanceTo($.standingPosition), de.set(Me, ke)), Ce - ke;
24235
- }), K.length) {
24236
- this.accessibleObserverFloorCheckCount = this.accessibleObserverFloorCheckCount % K.length;
24237
- var ae = K[this.accessibleObserverFloorCheckCount], fe = this.modelScene.models.find(function(ce) {
24238
- return ce.work === (ae == null ? void 0 : ae.work);
24235
+ var ve = /* @__PURE__ */ new Map();
24236
+ if (G.sort(function(ce, Me) {
24237
+ var Ce = ve.get(ce);
24238
+ typeof Ce == "undefined" && (Ce = ce.standingPosition.distanceTo(ee.standingPosition), ve.set(ce, Ce));
24239
+ var ke = ve.get(ce);
24240
+ return typeof ke == "undefined" && (ke = Me.standingPosition.distanceTo(ee.standingPosition), ve.set(Me, ke)), Ce - ke;
24241
+ }), G.length) {
24242
+ this.accessibleObserverFloorCheckCount = this.accessibleObserverFloorCheckCount % G.length;
24243
+ var oe = G[this.accessibleObserverFloorCheckCount], fe = this.modelScene.models.find(function(ce) {
24244
+ return ce.work === (oe == null ? void 0 : oe.work);
24239
24245
  });
24240
- if (ae && fe && fe.visible) {
24241
- var be = 0.3, oe = 0.05, ue = 5e-3, me = ae.standingPosition.clone().applyMatrix4(ae.work.transform), ge = panoStringify({
24242
- panoIndex: ae.panoIndex,
24243
- workCode: ae.work.workCode
24246
+ if (oe && fe && fe.visible) {
24247
+ var be = 0.3, ae = 0.05, ue = 5e-3, me = oe.standingPosition.clone().applyMatrix4(oe.work.transform), ge = panoStringify({
24248
+ panoIndex: oe.panoIndex,
24249
+ workCode: oe.work.workCode
24244
24250
  }), Ae = adjustPanoCircleMeshVectors.map(function(ce) {
24245
24251
  scratchRaycaster$1.ray.origin.copy(me), scratchRaycaster$1.ray.origin.add(scratchVector3$3.copy(ce).setY(be)), scratchRaycaster$1.ray.direction.set(0, -1, 0), scratchRaycaster$1.firstHitOnly = !0, scratchRaycaster$1.floorIndex = -1;
24246
24252
  var Me = fe.intersectRaycaster(scratchRaycaster$1)[0];
@@ -24249,11 +24255,11 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
24249
24255
  Ae.sort(function(ce, Me) {
24250
24256
  return Me.y - ce.y;
24251
24257
  });
24252
- var Te = Ae[Math.floor(Ae.length / 2)], pe = Ae.filter(function(ce) {
24253
- return ce.distanceTo(Te) <= oe;
24258
+ var Te = Ae[Math.floor(Ae.length / 2)], he = Ae.filter(function(ce) {
24259
+ return ce.distanceTo(Te) <= ae;
24254
24260
  })[0];
24255
- if (pe) {
24256
- var Se = new THREE.Vector4(me.x, me.y, me.z, pe.y - me.y), _e = this.adjustPanoCircleMeshPositionFix.get(ge);
24261
+ if (he) {
24262
+ var Se = new THREE.Vector4(me.x, me.y, me.z, he.y - me.y), _e = this.adjustPanoCircleMeshPositionFix.get(ge);
24257
24263
  _e && !Se.equals(_e) && (this.needsRender = !0), this.adjustPanoCircleMeshPositionFix.set(ge, Se);
24258
24264
  }
24259
24265
  }
@@ -24262,8 +24268,8 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
24262
24268
  }
24263
24269
  var Ee = /* @__PURE__ */ new Map();
24264
24270
  if (X)
24265
- for (var he = 0, Ve = X.accessibleNodes; he < Ve.length; he++) {
24266
- var re = Ve[he], H = X.work.observers[re];
24271
+ for (var de = 0, Ve = X.accessibleNodes; de < Ve.length; de++) {
24272
+ var te = Ve[de], H = X.work.observers[te];
24267
24273
  if (H) {
24268
24274
  var ge = panoStringify({
24269
24275
  panoIndex: H.panoIndex,
@@ -24274,7 +24280,7 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
24274
24280
  }
24275
24281
  if (se)
24276
24282
  for (var ye = 0, Be = se.accessibleNodes; ye < Be.length; ye++) {
24277
- var re = Be[ye], H = se.work.observers[re];
24283
+ var te = Be[ye], H = se.work.observers[te];
24278
24284
  if (H) {
24279
24285
  var ge = panoStringify({
24280
24286
  panoIndex: H.panoIndex,
@@ -24317,14 +24323,14 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
24317
24323
  this.panoMeshes.forEach(function(ce) {
24318
24324
  ce.setOpacity(0), ce.setCurrent(!1), ce.updateTime && ce.updateTime(e, r), ce.visible = !1;
24319
24325
  });
24320
- else if ($) {
24321
- var Ie = $.work.observers, $e = arrayMin($.accessibleNodes, function(ce) {
24326
+ else if (ee) {
24327
+ var Ie = ee.work.observers, $e = arrayMin(ee.accessibleNodes, function(ce) {
24322
24328
  var Me = Ie[ce];
24323
- return Me ? $.standingPosition.distanceTo(Me.standingPosition) : 1 / 0;
24329
+ return Me ? ee.standingPosition.distanceTo(Me.standingPosition) : 1 / 0;
24324
24330
  }, !0), Re = $e[1];
24325
24331
  Re = clamp$1(Re, 3, 1 / 0);
24326
- var ze = $.accessibleNodes.concat($.panoIndex).map(function(ce) {
24327
- return panoStringify({ panoIndex: ce, workCode: $.work.workCode });
24332
+ var ze = ee.accessibleNodes.concat(ee.panoIndex).map(function(ce) {
24333
+ return panoStringify({ panoIndex: ce, workCode: ee.work.workCode });
24328
24334
  });
24329
24335
  this.panoMeshes.forEach(function(ce, Me) {
24330
24336
  var Ce = o.works.getObserver(Me), ke = !1, je = 1;
@@ -24393,7 +24399,7 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
24393
24399
  (Ct || He.pano !== (Ne == null ? void 0 : Ne.pano) || He.opacity !== (Ne == null ? void 0 : Ne.opacity)) && this.modelScene.parameter.set("refinedScreen", He);
24394
24400
  }
24395
24401
  }
24396
- if (this.panoVideo.object.position.copy(this.camera.position), this.panoVideo.updateTime(e), $ && $.images.video && (this.needsRender = !0), this.intersectMesh && this.intersectMesh.parent && $ && $.position.y - $.standingPosition.y > 10) {
24402
+ if (this.panoVideo.object.position.copy(this.camera.position), this.panoVideo.updateTime(e), ee && ee.images.video && (this.needsRender = !0), this.intersectMesh && this.intersectMesh.parent && ee && ee.position.y - ee.standingPosition.y > 10) {
24397
24403
  var bt = this.camera.position.distanceTo(this.intersectMesh.position), It = 2 * Math.tan(0.5 * this.camera.fov / 180 * Math.PI), Tt = bt * It / 5;
24398
24404
  this.intersectMesh.scale.setScalar(Tt);
24399
24405
  } else
@@ -24683,23 +24689,23 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
24683
24689
  })), o.moveStartCallback && o.moveStartCallback(U), this.videoTexture && this.videoTexture.image instanceof HTMLVideoElement && this.videoTexture.image.getAttribute("src") && (this.videoTexture.image.pause(), this.videoTexture.image.removeAttribute("uuid"), this.videoTexture.image.removeAttribute("src"), this.videoTexture.image.oncanplay = noop, this.videoTexture.needsUpdate = !0), this.panoVideo.setMaterial(null), r.effect === "fly" || r.effect === "model")
24684
24690
  this.cameraMotion.set(V, J).catch(noop);
24685
24691
  else {
24686
- var G = coordinatesToVector({
24692
+ var K = coordinatesToVector({
24687
24693
  longitude: this.cameraMotion.value.longitude,
24688
24694
  latitude: this.cameraMotion.value.latitude
24689
24695
  }), ie = coordinatesToVector({
24690
24696
  longitude: (d = V.longitude) !== null && d !== void 0 ? d : this.cameraMotion.value.longitude,
24691
24697
  latitude: (h = V.latitude) !== null && h !== void 0 ? h : this.cameraMotion.value.latitude
24692
- }), ne = new THREE.Object3D();
24693
- ne.lookAt(G);
24694
- var $ = new THREE.Matrix4().makeRotationFromQuaternion(ne.quaternion);
24695
- ne.lookAt(ie);
24696
- var Z = new THREE.Matrix4().makeRotationFromQuaternion(ne.quaternion), X = new THREE.Matrix4().getInverse($).premultiply(Z), se = this.cameraMotion.value.fov, K = (p = V.fov) !== null && p !== void 0 ? p : this.cameraMotion.value.fov, W = 1;
24698
+ }), re = new THREE.Object3D();
24699
+ re.lookAt(K);
24700
+ var ee = new THREE.Matrix4().makeRotationFromQuaternion(re.quaternion);
24701
+ re.lookAt(ie);
24702
+ var Z = new THREE.Matrix4().makeRotationFromQuaternion(re.quaternion), X = new THREE.Matrix4().getInverse(ee).premultiply(Z), se = this.cameraMotion.value.fov, G = (p = V.fov) !== null && p !== void 0 ? p : this.cameraMotion.value.fov, W = 1;
24697
24703
  r.effect === "zoomin" ? W = 1.5 : r.effect === "zoomout" && (W = 0.4);
24698
- for (var ee = clamp$1(K * W, 1, 170), te = 0; te < S.length - 1; te++) {
24699
- var re = S[te].key;
24700
- if (re) {
24701
- var de = this.panoResources[re];
24702
- de && (de.fixCameraTransform.copy(X), de.panoPicture && (de.panoPicture.zoom = Math.tan(ee / 2 / 180 * Math.PI) / Math.tan(se / 2 / 180 * Math.PI)));
24704
+ for (var $ = clamp$1(G * W, 1, 170), ne = 0; ne < S.length - 1; ne++) {
24705
+ var te = S[ne].key;
24706
+ if (te) {
24707
+ var ve = this.panoResources[te];
24708
+ ve && (ve.fixCameraTransform.copy(X), ve.panoPicture && (ve.panoPicture.zoom = Math.tan($ / 2 / 180 * Math.PI) / Math.tan(se / 2 / 180 * Math.PI)));
24703
24709
  }
24704
24710
  }
24705
24711
  this.cameraMotion.setKeyframes([
@@ -24716,7 +24722,7 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
24716
24722
  value: {
24717
24723
  longitude: (g = V.longitude) !== null && g !== void 0 ? g : this.cameraMotion.value.longitude,
24718
24724
  latitude: (m = V.latitude) !== null && m !== void 0 ? m : this.cameraMotion.value.latitude,
24719
- fov: ee
24725
+ fov: $
24720
24726
  }
24721
24727
  },
24722
24728
  {
@@ -24724,19 +24730,19 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
24724
24730
  value: {
24725
24731
  longitude: (E = V.longitude) !== null && E !== void 0 ? E : this.cameraMotion.value.longitude,
24726
24732
  latitude: (y = V.latitude) !== null && y !== void 0 ? y : this.cameraMotion.value.latitude,
24727
- fov: K
24733
+ fov: G
24728
24734
  }
24729
24735
  }
24730
24736
  ], J).catch(noop);
24731
24737
  }
24732
- var ae = this.locationMotion.setKeyframes(S, J, R);
24733
- ae.then(
24738
+ var oe = this.locationMotion.setKeyframes(S, J, R);
24739
+ oe.then(
24734
24740
  // resolve
24735
24741
  // 动画结束
24736
24742
  function() {
24737
24743
  for (var fe = 0, be = s.modelScene.children; fe < be.length; fe++) {
24738
- var oe = be[fe];
24739
- oe instanceof Model && oe.show();
24744
+ var ae = be[fe];
24745
+ ae instanceof Model && ae.show();
24740
24746
  }
24741
24747
  var ue = __assign(__assign({}, e), { mode: s.mode, longitude: s.camera.pose.longitude, latitude: s.camera.pose.latitude, fov: s.camera.pose.fov, offset: s.camera.pose.offset.clone(), distance: s.camera.pose.distance });
24742
24748
  s.emit("pano.arrived", createEvent("pano.arrived", {
@@ -24766,8 +24772,8 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
24766
24772
  Te.removeAttribute("uuid");
24767
24773
  }));
24768
24774
  } else {
24769
- var pe = s.videoTexture.image;
24770
- pe.removeAttribute("uuid"), pe.oncanplay = noop, pe.ontimeupdate = noop;
24775
+ var he = s.videoTexture.image;
24776
+ he.removeAttribute("uuid"), he.oncanplay = noop, he.ontimeupdate = noop;
24771
24777
  }
24772
24778
  },
24773
24779
  // reject
@@ -24867,18 +24873,18 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
24867
24873
  var f = c.work.observers, d = c.accessibleNodes.filter(function(j) {
24868
24874
  if (j === r.currentPano.panoIndex && c.work.workCode === r.currentPano.workCode)
24869
24875
  return !1;
24870
- var G = f[j];
24871
- if (!G)
24876
+ var K = f[j];
24877
+ if (!K)
24872
24878
  return !1;
24873
- var ie = scratchVector3$3.copy(G.position).applyMatrix4(G.work.transform);
24874
- return ie.distanceTo(r.camera.position) > r.maxAccessibleDistance ? !1 : G.loadable || G.active;
24879
+ var ie = scratchVector3$3.copy(K.position).applyMatrix4(K.work.transform);
24880
+ return ie.distanceTo(r.camera.position) > r.maxAccessibleDistance ? !1 : K.loadable || K.active;
24875
24881
  }), h = this.modelScene.intersectRaycaster(s)[0];
24876
24882
  if (h) {
24877
24883
  var p = arrayMin(d, function(j) {
24878
- var G = f[j];
24879
- if (!G)
24884
+ var K = f[j];
24885
+ if (!K)
24880
24886
  return 1 / 0;
24881
- var ie = scratchVector3$3.copy(G.standingPosition).applyMatrix4(G.work.transform);
24887
+ var ie = scratchVector3$3.copy(K.standingPosition).applyMatrix4(K.work.transform);
24882
24888
  return ie.distanceTo(h.point);
24883
24889
  }, !0), g = p[0], m = p[1];
24884
24890
  typeof g == "number" && m < this.panoTapTriggerRadius && (l = (o = f[g]) !== null && o !== void 0 ? o : null);
@@ -24904,8 +24910,8 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
24904
24910
  }
24905
24911
  }
24906
24912
  }
24907
- var O = P.length > 0 ? P : __spreadArray(__spreadArray([], M, !0), w, !0), k = O.slice().sort(function(j, G) {
24908
- return j.angleTo(R) - G.angleTo(R);
24913
+ var O = P.length > 0 ? P : __spreadArray(__spreadArray([], M, !0), w, !0), k = O.slice().sort(function(j, K) {
24914
+ return j.angleTo(R) - K.angleTo(R);
24909
24915
  })[0];
24910
24916
  if (k && k.angleTo(u) > S && (b.longitude = Math.atan2(-k.x, -k.z)), this.cameraMotion.value.latitude < -Math.PI / 4) {
24911
24917
  var D = e.state.fov, q = clamp$1(typeof this.minLatitude == "function" ? this.minLatitude(D) : this.minLatitude, -Math.PI / 2, Math.PI / 2), z = clamp$1(typeof this.maxLatitude == "function" ? this.maxLatitude(D) : this.maxLatitude, -Math.PI / 2, Math.PI / 2);
@@ -25869,11 +25875,11 @@ void main() {
25869
25875
  if (!(L.indexOf(U) >= 0)) {
25870
25876
  var j = this.panoResources[U];
25871
25877
  if (j.panoPicture) {
25872
- var G = j.panoPicture.map;
25873
- if (G) {
25874
- if (G === ((s = h.pano0) === null || s === void 0 ? void 0 : s.map) || G === ((u = h.pano1) === null || u === void 0 ? void 0 : u.map))
25878
+ var K = j.panoPicture.map;
25879
+ if (K) {
25880
+ if (K === ((s = h.pano0) === null || s === void 0 ? void 0 : s.map) || K === ((u = h.pano1) === null || u === void 0 ? void 0 : u.map))
25875
25881
  continue;
25876
- G.dispose(), j.panoPicture = null;
25882
+ K.dispose(), j.panoPicture = null;
25877
25883
  }
25878
25884
  }
25879
25885
  H.indexOf(U) >= 0 || delete this.panoResources[U];
@@ -25889,32 +25895,32 @@ void main() {
25889
25895
  }));
25890
25896
  }
25891
25897
  isEmptyObject(h) === !1 && this.modelScene.parameter.set(h), p.offset && this.camera.position.copy(p.offset);
25892
- var ie = this.camera.pose.longitude, ne = this.camera.pose.latitude;
25893
- this.camera.quaternion.fromArray(this.cardboard.sensor.getOrientation()), this.camera.computePose(), (ie !== this.camera.pose.longitude || ne !== this.camera.pose.latitude) && (this.cameraMotion.set(pick(this.camera.pose, ["longitude", "latitude"]), 0).catch(noop), this.emit("camera.update", createEvent("camera.update", {
25898
+ var ie = this.camera.pose.longitude, re = this.camera.pose.latitude;
25899
+ this.camera.quaternion.fromArray(this.cardboard.sensor.getOrientation()), this.camera.computePose(), (ie !== this.camera.pose.longitude || re !== this.camera.pose.latitude) && (this.cameraMotion.set(pick(this.camera.pose, ["longitude", "latitude"]), 0).catch(noop), this.emit("camera.update", createEvent("camera.update", {
25894
25900
  userAction: !0,
25895
25901
  state: __assign(__assign(__assign({}, this.currentPano), { mode: this.mode }), clonePose(this.camera.pose))
25896
25902
  }))), this.works.getObserver(this.currentPano);
25897
- var $ = this.works.getObserver(A.panoId), Z = this.works.getObserver(b.panoId), X = /* @__PURE__ */ new Map();
25898
- if ($)
25899
- for (var se = 0, K = $.accessibleNodes; se < K.length; se++) {
25900
- var W = K[se], C = $.work.observers[W];
25903
+ var ee = this.works.getObserver(A.panoId), Z = this.works.getObserver(b.panoId), X = /* @__PURE__ */ new Map();
25904
+ if (ee)
25905
+ for (var se = 0, G = ee.accessibleNodes; se < G.length; se++) {
25906
+ var W = G[se], C = ee.work.observers[W];
25901
25907
  if (C) {
25902
- var ee = panoStringify({
25908
+ var $ = panoStringify({
25903
25909
  panoIndex: C.panoIndex,
25904
25910
  workCode: C.work.workCode
25905
25911
  });
25906
- X.set(ee, C);
25912
+ X.set($, C);
25907
25913
  }
25908
25914
  }
25909
25915
  if (Z)
25910
- for (var te = 0, re = Z.accessibleNodes; te < re.length; te++) {
25911
- var W = re[te], C = Z.work.observers[W];
25916
+ for (var ne = 0, te = Z.accessibleNodes; ne < te.length; ne++) {
25917
+ var W = te[ne], C = Z.work.observers[W];
25912
25918
  if (C) {
25913
- var ee = panoStringify({
25919
+ var $ = panoStringify({
25914
25920
  panoIndex: C.panoIndex,
25915
25921
  workCode: C.work.workCode
25916
25922
  });
25917
- X.set(ee, C);
25923
+ X.set($, C);
25918
25924
  }
25919
25925
  }
25920
25926
  if (this.panoMeshes.forEach(function(Re, ze) {
@@ -25938,14 +25944,14 @@ void main() {
25938
25944
  Le < 0.05 ? Re.setOpacity(0) : Re.setOpacity(clamp$1(1.5 / Le, 0, 1)), panoEqual(o.currentPano, Fe) && Re.setOpacity(0), Re.lookAt(o.camera.position);
25939
25945
  }
25940
25946
  }), this.locationMotion.ended) {
25941
- var de = this.intersect(e);
25947
+ var ve = this.intersect(e);
25942
25948
  this.panoMeshes.forEach(function(Re, ze) {
25943
- Re.setCurrent(Re === de), Re.updateTime && Re.updateTime(e, r);
25949
+ Re.setCurrent(Re === ve), Re.updateTime && Re.updateTime(e, r);
25944
25950
  });
25945
25951
  }
25946
25952
  {
25947
- var M = (l = this.modelScene.parameter.progress) !== null && l !== void 0 ? l : 1, ae = Math.round(M), fe = this.modelScene.parameter.pano0, be = this.modelScene.parameter.pano1, oe = ae === 0 ? fe : be, C = void 0;
25948
- if (oe && (C = this.works.getObserver(oe.panoId), C || (C = this.panoPictureObserverMap.get(oe))), this.tiling.appearDuration = this.tileAppearDuration, this.tiling.maxRequest = M < (canUseNativeImageBitmap() ? 0.6 : 0.99) ? 0 : this.tileMaxRequest, this.tiling.imageOptions = this.imageOptions, !C || !oe || this.tileLevelForFov === !1 || this.camera.perspToOrtho.x > 0) {
25953
+ var M = (l = this.modelScene.parameter.progress) !== null && l !== void 0 ? l : 1, oe = Math.round(M), fe = this.modelScene.parameter.pano0, be = this.modelScene.parameter.pano1, ae = oe === 0 ? fe : be, C = void 0;
25954
+ if (ae && (C = this.works.getObserver(ae.panoId), C || (C = this.panoPictureObserverMap.get(ae))), this.tiling.appearDuration = this.tileAppearDuration, this.tiling.maxRequest = M < (canUseNativeImageBitmap() ? 0.6 : 0.99) ? 0 : this.tileMaxRequest, this.tiling.imageOptions = this.imageOptions, !C || !ae || this.tileLevelForFov === !1 || this.camera.perspToOrtho.x > 0) {
25949
25955
  this.tiling.setObserver(null);
25950
25956
  var ue = {
25951
25957
  renderer: this.renderer,
@@ -25962,7 +25968,7 @@ void main() {
25962
25968
  };
25963
25969
  this.tiling.update(ue), this.modelScene.parameter.set("refinedScreen", null);
25964
25970
  } else {
25965
- var me = getImageSizeLevel(oe.mapSize), ge = me + 1, Ae = new THREE.Vector2().copy(this.camera.resolution).multiplyScalar(this.camera.pixelRatio), Te = Math.floor(this.tileLevelForFov(this.camera.fov, Ae)), pe = Te > me ? Te : 0;
25971
+ var me = getImageSizeLevel(ae.mapSize), ge = me + 1, Ae = new THREE.Vector2().copy(this.camera.resolution).multiplyScalar(this.camera.pixelRatio), Te = Math.floor(this.tileLevelForFov(this.camera.fov, Ae)), he = Te > me ? Te : 0;
25966
25972
  this.tiling.setObserver(C);
25967
25973
  var ue = {
25968
25974
  renderer: this.renderer,
@@ -25971,16 +25977,16 @@ void main() {
25971
25977
  time: this.camera.time,
25972
25978
  cameraMatrix: this.camera.matrixWorld,
25973
25979
  cameraProjectionMatrix: this.camera.projectionMatrix,
25974
- panoMap: oe.map,
25975
- panoMatrix: oe.matrix,
25976
- panoZoom: oe.zoom,
25980
+ panoMap: ae.map,
25981
+ panoMatrix: ae.matrix,
25982
+ panoZoom: ae.zoom,
25977
25983
  minLevel: ge,
25978
- level: pe
25984
+ level: he
25979
25985
  }, Se = this.tiling.update(ue), _e = {
25980
25986
  map: this.tiling.renderTarget.texture,
25981
25987
  matrixInverse: this.tiling.camera.matrixWorldInverse,
25982
25988
  projectionMatrix: this.tiling.camera.projectionMatrix,
25983
- pano: ae,
25989
+ pano: oe,
25984
25990
  opacity: (fe == null ? void 0 : fe.panoId) === (be == null ? void 0 : be.panoId) ? 1 : easeInQuart(Math.abs(((c = this.modelScene.parameter.progress) !== null && c !== void 0 ? c : 0) - 0.5) * 2)
25985
25991
  }, Ee = this.modelScene.parameter.refinedScreen;
25986
25992
  (Se || _e.pano !== (Ee == null ? void 0 : Ee.pano) || _e.opacity !== (Ee == null ? void 0 : Ee.opacity)) && this.modelScene.parameter.set("refinedScreen", _e);
@@ -25988,8 +25994,8 @@ void main() {
25988
25994
  }
25989
25995
  this.panoVideo.object.position.copy(this.camera.position), this.panoVideo.updateTime(e);
25990
25996
  {
25991
- var he = b.effect, Ve = this.modelScene.parameter, fe = Ve.pano0, be = Ve.pano1;
25992
- if (fe && be && fe !== be && (he === "fly" || he === "model") && this.flyEffectUseDepthBuffer) {
25997
+ var de = b.effect, Ve = this.modelScene.parameter, fe = Ve.pano0, be = Ve.pano1;
25998
+ if (fe && be && fe !== be && (de === "fly" || de === "model") && this.flyEffectUseDepthBuffer) {
25993
25999
  if (((f = this.modelScene.parameter.pano0Depth) === null || f === void 0 ? void 0 : f.panoId) !== fe.panoId || ((d = this.modelScene.parameter.pano1Depth) === null || d === void 0 ? void 0 : d.panoId) !== be.panoId) {
25994
26000
  var ye = 500, Be = 512;
25995
26001
  this.pano0DepthCubeRenderTarget ? this.pano0DepthCubeRenderTarget.width !== Be && this.pano0DepthCubeRenderTarget.setSize(Be, Be) : this.pano0DepthCubeRenderTarget = new THREE.WebGLCubeRenderTarget(Be, {
@@ -26297,14 +26303,14 @@ void main() {
26297
26303
  latitude: r.latitude,
26298
26304
  fov: r.fov
26299
26305
  }, I = [], C = function(V) {
26300
- var U = H.modelScene.models.find(function(ne) {
26301
- return ne.work === V;
26306
+ var U = H.modelScene.models.find(function(re) {
26307
+ return re.work === V;
26302
26308
  });
26303
26309
  if (!U || U.visible === !1 || V.observers.length <= 0)
26304
26310
  return "continue";
26305
26311
  if (scratchObserverBox$1.copy(V.observerBox).expandByScalar(10).applyMatrix4(V.transform), scratchObserverBox$1.containsPoint(d))
26306
- for (var j = 0, G = V.observers; j < G.length; j++) {
26307
- var ie = G[j];
26312
+ for (var j = 0, K = V.observers; j < K.length; j++) {
26313
+ var ie = K[j];
26308
26314
  I.push(ie);
26309
26315
  }
26310
26316
  }, H = this, L = 0, O = this.works; L < O.length; L++) {
@@ -26335,15 +26341,15 @@ void main() {
26335
26341
  var j = U[V];
26336
26342
  j instanceof Model && j.show();
26337
26343
  }
26338
- var G = __assign(__assign(__assign({}, q), { mode: s.mode }), clonePose(s.camera.pose));
26344
+ var K = __assign(__assign(__assign({}, q), { mode: s.mode }), clonePose(s.camera.pose));
26339
26345
  s.emit("pano.arrived", createEvent("pano.arrived", {
26340
26346
  options: r,
26341
26347
  prevPano: J,
26342
26348
  progress: 0,
26343
- state: G,
26349
+ state: K,
26344
26350
  userAction: s.userAction,
26345
26351
  error: null
26346
- })), r.moveEndCallback && r.moveEndCallback(G);
26352
+ })), r.moveEndCallback && r.moveEndCallback(K);
26347
26353
  },
26348
26354
  // reject
26349
26355
  // 动画被取消
@@ -27032,15 +27038,25 @@ var _moveEvent = { type: "move" }, XRController = (
27032
27038
  var e = this.controllers[t];
27033
27039
  return e || console.warn("no controller find"), e.getTargetRaySpace();
27034
27040
  }, n.prototype.getRightController = function() {
27035
- if (!this.session)
27041
+ if (!this.session || !this.session.inputSources)
27036
27042
  return null;
27037
- var t = this.session.inputSources[0].handedness === "right" ? 0 : 1, e = this.controllers[t];
27038
- return e || console.warn("no controller find"), e.getTargetRaySpace();
27043
+ var t = void 0;
27044
+ if (this.session.inputSources.forEach(function(r, o) {
27045
+ r.handedness === "right" && (t = o);
27046
+ }), t === void 0)
27047
+ return console.warn("no inputSource for right hand"), null;
27048
+ var e = this.controllers[t];
27049
+ return e ? e.getTargetRaySpace() : (console.warn("right controller not find"), null);
27039
27050
  }, n.prototype.getLeftController = function() {
27040
- if (!this.session)
27051
+ if (!this.session || !this.session.inputSources)
27041
27052
  return null;
27042
- var t = this.session.inputSources[0].handedness === "left" ? 0 : 1, e = this.controllers[t];
27043
- return e || console.warn("no controller find"), e.getTargetRaySpace();
27053
+ var t = void 0;
27054
+ if (this.session.inputSources.forEach(function(r, o) {
27055
+ r.handedness === "left" && (t = o);
27056
+ }), t === void 0)
27057
+ return console.warn("no inputSource for left hand"), null;
27058
+ var e = this.controllers[t];
27059
+ return e ? e.getTargetRaySpace() : (console.warn("left controller not find"), null);
27044
27060
  }, n.prototype.getControllerGrip = function(t) {
27045
27061
  var e = this.controllers[t];
27046
27062
  return e || console.warn("no controller find"), e.getGripSpace();
@@ -27613,7 +27629,7 @@ var circleImageURL = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYA
27613
27629
  }
27614
27630
  return Object.defineProperty(t, "version", {
27615
27631
  get: function() {
27616
- return "6.7.0-alpha.31";
27632
+ return "6.7.0-alpha.33";
27617
27633
  },
27618
27634
  enumerable: !1,
27619
27635
  configurable: !0
@@ -28266,20 +28282,20 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
28266
28282
  var j = coordinatesToVector({
28267
28283
  longitude: this.cameraMotion.value.longitude,
28268
28284
  latitude: this.cameraMotion.value.latitude
28269
- }), G = coordinatesToVector({
28285
+ }), K = coordinatesToVector({
28270
28286
  longitude: (f = J.longitude) !== null && f !== void 0 ? f : this.cameraMotion.value.longitude,
28271
28287
  latitude: (d = J.latitude) !== null && d !== void 0 ? d : this.cameraMotion.value.latitude
28272
28288
  }), ie = new THREE.Object3D();
28273
28289
  ie.lookAt(j);
28274
- var ne = new THREE.Matrix4().makeRotationFromQuaternion(ie.quaternion);
28275
- ie.lookAt(G);
28276
- var $ = new THREE.Matrix4().makeRotationFromQuaternion(ie.quaternion), Z = new THREE.Matrix4().getInverse(ne).premultiply($), X = this.cameraMotion.value.fov, se = (h = J.fov) !== null && h !== void 0 ? h : this.cameraMotion.value.fov, K = 1;
28277
- r.effect === "zoomin" ? K = 1.5 : r.effect === "zoomout" && (K = 0.4);
28278
- for (var W = se * K, ee = 0; ee < T.length - 1; ee++) {
28279
- var te = T[ee].key;
28280
- if (te) {
28281
- var re = this.panoResources[te];
28282
- re && (re.fixCameraTransform.copy(Z), re.leftPanoPicture && (re.leftPanoPicture.zoom = Math.tan(W / 2 / 180 * Math.PI) / Math.tan(X / 2 / 180 * Math.PI)));
28290
+ var re = new THREE.Matrix4().makeRotationFromQuaternion(ie.quaternion);
28291
+ ie.lookAt(K);
28292
+ var ee = new THREE.Matrix4().makeRotationFromQuaternion(ie.quaternion), Z = new THREE.Matrix4().getInverse(re).premultiply(ee), X = this.cameraMotion.value.fov, se = (h = J.fov) !== null && h !== void 0 ? h : this.cameraMotion.value.fov, G = 1;
28293
+ r.effect === "zoomin" ? G = 1.5 : r.effect === "zoomout" && (G = 0.4);
28294
+ for (var W = se * G, $ = 0; $ < T.length - 1; $++) {
28295
+ var ne = T[$].key;
28296
+ if (ne) {
28297
+ var te = this.panoResources[ne];
28298
+ te && (te.fixCameraTransform.copy(Z), te.leftPanoPicture && (te.leftPanoPicture.zoom = Math.tan(W / 2 / 180 * Math.PI) / Math.tan(X / 2 / 180 * Math.PI)));
28283
28299
  }
28284
28300
  }
28285
28301
  this.cameraMotion.setKeyframes([
@@ -28309,24 +28325,24 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
28309
28325
  }
28310
28326
  ], z).catch(noop);
28311
28327
  }
28312
- var de = this.locationMotion.setKeyframes(T, z, S);
28313
- de.then(
28328
+ var ve = this.locationMotion.setKeyframes(T, z, S);
28329
+ ve.then(
28314
28330
  // resolve
28315
28331
  // 动画结束
28316
28332
  function() {
28317
- for (var ae = 0, fe = s.modelScene.children; ae < fe.length; ae++) {
28318
- var be = fe[ae];
28333
+ for (var oe = 0, fe = s.modelScene.children; oe < fe.length; oe++) {
28334
+ var be = fe[oe];
28319
28335
  be instanceof Model && be.show();
28320
28336
  }
28321
- var oe = __assign(__assign({}, e), { mode: s.mode, longitude: s.camera.pose.longitude, latitude: s.camera.pose.latitude, fov: s.camera.pose.fov, offset: s.camera.pose.offset.clone(), distance: 0 });
28337
+ var ae = __assign(__assign({}, e), { mode: s.mode, longitude: s.camera.pose.longitude, latitude: s.camera.pose.latitude, fov: s.camera.pose.fov, offset: s.camera.pose.offset.clone(), distance: 0 });
28322
28338
  s.emit("pano.arrived", createEvent("pano.arrived", {
28323
28339
  options: o,
28324
28340
  prevPano: U,
28325
28341
  progress: 1,
28326
- state: oe,
28342
+ state: ae,
28327
28343
  userAction: s.userAction,
28328
28344
  error: null
28329
- })), o.moveEndCallback && o.moveEndCallback(oe);
28345
+ })), o.moveEndCallback && o.moveEndCallback(ae);
28330
28346
  var ue = s.works.getObserver(s.currentPano);
28331
28347
  if (ue && ue.images.video && s.videoTexture && s.videoTexture.image instanceof HTMLVideoElement) {
28332
28348
  var me = {
@@ -28476,11 +28492,11 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
28476
28492
  }
28477
28493
  v.distance = this.locationMotion.value.distance, v.offset = new THREE.Vector3(L.x + (O.x - L.x) * H, L.y + (O.y - L.y) * H, L.z + (O.z - L.z) * H);
28478
28494
  for (var z = [], J = [], V = 0, U = this.locationMotion.keyframes; V < U.length; V++) {
28479
- var j = U[V], G = j.key, ie = j.progress;
28480
- G !== void 0 && (z.push(G), ie > this.locationMotion.progress && J.push(G));
28495
+ var j = U[V], K = j.key, ie = j.progress;
28496
+ K !== void 0 && (z.push(K), ie > this.locationMotion.progress && J.push(K));
28481
28497
  }
28482
- for (var ne = 0, $ = Object.keys(this.panoResources); ne < $.length; ne++) {
28483
- var Z = $[ne];
28498
+ for (var re = 0, ee = Object.keys(this.panoResources); re < ee.length; re++) {
28499
+ var Z = ee[re];
28484
28500
  if (!(J.indexOf(Z) >= 0)) {
28485
28501
  var X = this.panoResources[Z];
28486
28502
  if (X.leftPanoPicture) {
@@ -28494,8 +28510,8 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
28494
28510
  z.indexOf(Z) >= 0 || delete this.panoResources[Z];
28495
28511
  }
28496
28512
  }
28497
- var K = panoParse(P.panoId);
28498
- K !== this.currentPano && (this.currentPano = K, this.accessibleObserverFloorCheckCount = 0), this.emit("pano.moving", createEvent("pano.moving", {
28513
+ var G = panoParse(P.panoId);
28514
+ G !== this.currentPano && (this.currentPano = G, this.accessibleObserverFloorCheckCount = 0), this.emit("pano.moving", createEvent("pano.moving", {
28499
28515
  userAction: this.userAction,
28500
28516
  prevPano: panoParse(_.panoId),
28501
28517
  state: __assign(__assign(__assign(__assign({}, panoParse(I.panoId)), { mode: this.mode }), clonePose(this.camera.pose)), v),
@@ -28505,30 +28521,30 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
28505
28521
  }));
28506
28522
  }
28507
28523
  this.camera.setFromPose(v), this.xrManager.cameraVR.projectionMatrix.copy(this.camera.projectionMatrix), this.xrManager.cameraVR.projectionMatrixInverse.copy(this.camera.projectionMatrixInverse), this.xrManager.cameraVR.matrix.copy(this.camera.matrix), this.xrManager.cameraVR.position.copy(this.camera.position), this.xrManager.cameraVR.quaternion.copy(this.camera.quaternion), this.xrManager.cameraVR.scale.copy(this.camera.scale), this.xrManager.cameraVR.matrixAutoUpdate = !1, this.xrManager.cameraVR.matrixWorld.copy(this.camera.matrixWorld);
28508
- var W = m, ee = W[1], te = new THREE.Vector3(0, 0, 0), re = new THREE.Vector2().copy(this.camera.resolution);
28509
- if (ee && this.xrManager.session && this.xrManager.referenceSpace && this.xrManager.session.renderState.baseLayer) {
28510
- for (var de = this.xrManager.cameraVR, ae = this.xrManager.referenceSpace, fe = this.xrManager.session.renderState.baseLayer, be = ee.getViewerPose(ae), oe = (l = be == null ? void 0 : be.views) !== null && l !== void 0 ? l : [], ue = 0; ue < oe.length; ue++) {
28511
- var me = oe[ue], ge = de.cameras[ue], Ae = fe.getViewport(me);
28512
- Ae && (ge.projectionMatrix.fromArray(me.projectionMatrix), ge.projectionMatrixInverse.getInverse(ge.projectionMatrix), ge.matrix.fromArray(me.transform.matrix), ge.matrix.setPosition(this.camera.position), ge.matrix.decompose(ge.position, ge.quaternion, ge.scale), ge.matrixWorld.copy(ge.matrix), ge.matrixWorldInverse.getInverse(ge.matrixWorld), ge.matrixAutoUpdate = !1, te.copy(ge.position), ge.viewport.set(Ae.x, Ae.y, Ae.width, Ae.height), re.set(Ae.width, Ae.height));
28524
+ var W = m, $ = W[1], ne = new THREE.Vector3(0, 0, 0), te = new THREE.Vector2().copy(this.camera.resolution);
28525
+ if ($ && this.xrManager.session && this.xrManager.referenceSpace && this.xrManager.session.renderState.baseLayer) {
28526
+ for (var ve = this.xrManager.cameraVR, oe = this.xrManager.referenceSpace, fe = this.xrManager.session.renderState.baseLayer, be = $.getViewerPose(oe), ae = (l = be == null ? void 0 : be.views) !== null && l !== void 0 ? l : [], ue = 0; ue < ae.length; ue++) {
28527
+ var me = ae[ue], ge = ve.cameras[ue], Ae = fe.getViewport(me);
28528
+ Ae && (ge.projectionMatrix.fromArray(me.projectionMatrix), ge.projectionMatrixInverse.getInverse(ge.projectionMatrix), ge.matrix.fromArray(me.transform.matrix), ge.matrix.setPosition(this.camera.position), ge.matrix.decompose(ge.position, ge.quaternion, ge.scale), ge.matrixWorld.copy(ge.matrix), ge.matrixWorldInverse.getInverse(ge.matrixWorld), ge.matrixAutoUpdate = !1, ne.copy(ge.position), ge.viewport.set(Ae.x, Ae.y, Ae.width, Ae.height), te.set(Ae.width, Ae.height));
28513
28529
  }
28514
28530
  if (this.xrManager.setProjectionFromUnion(this.xrManager.cameraVR, this.xrManager.cameraL, this.xrManager.cameraR), this.camera.quaternion.copy(this.xrManager.cameraVR.quaternion), this.camera.scale.copy(this.xrManager.cameraVR.scale), this.camera.matrix.compose(this.camera.position, this.camera.quaternion, this.camera.scale), this.camera.computePose((c = v.distance) !== null && c !== void 0 ? c : this.camera.pose.distance), this.xrManager.session.inputSources) {
28515
28531
  for (var ue = 0; ue < this.xrManager.session.inputSources.length; ue++)
28516
28532
  if (this.xrManager.session.inputSources[ue] && this.xrManager.session.inputSources[ue].targetRayMode === "transient-pointer") {
28517
- var Te = ee.getPose(this.xrManager.session.inputSources[ue].targetRaySpace, ae);
28533
+ var Te = $.getPose(this.xrManager.session.inputSources[ue].targetRaySpace, oe);
28518
28534
  if (Te) {
28519
- var pe = Te.transform.orientation, Se = new THREE.Quaternion(pe.x, pe.y, pe.z, pe.w), _e = new THREE.Vector3(0, 0, -1).applyQuaternion(Se), Ee = new THREE.Raycaster(this.camera.position, _e);
28535
+ var he = Te.transform.orientation, Se = new THREE.Quaternion(he.x, he.y, he.z, he.w), _e = new THREE.Vector3(0, 0, -1).applyQuaternion(Se), Ee = new THREE.Raycaster(this.camera.position, _e);
28520
28536
  this.gazeRay = Ee;
28521
28537
  }
28522
28538
  }
28523
28539
  }
28524
28540
  if (this.xrManager.machineType === "Oculus" || this.xrManager.machineType === "Pico") {
28525
- for (var he = this.xrManager.session.inputSources, Ve = function(ve) {
28526
- var Pe = ye.xrManager.controllers[ve], we = he[ve];
28541
+ for (var de = this.xrManager.session.inputSources, Ve = function(pe) {
28542
+ var Pe = ye.xrManager.controllers[pe], we = de[pe];
28527
28543
  if (!we)
28528
28544
  return "continue";
28529
- Pe && Pe.update(we, ee, ae);
28530
- var qe = ye.xrManager.getController(ve), Ye = new THREE.Vector3(0, 1.2, 0), ut = qe.position.clone().add(te).sub(Ye);
28531
- we.handedness === "left" ? ye.xrControllerRay.left.set(ut, new THREE.Vector3(0, 0, -1).applyEuler(qe.rotation)) : we.handedness === "right" && ye.xrControllerRay.right.set(ut, new THREE.Vector3(0, 0, -1).applyEuler(qe.rotation)), ye.controllerWrappers[ve].position.copy(new THREE.Vector3(0, 0, 0).add(te).sub(Ye));
28545
+ Pe && Pe.update(we, $, oe);
28546
+ var qe = ye.xrManager.getController(pe), Ye = new THREE.Vector3(0, 1.2, 0), ut = qe.position.clone().add(ne).sub(Ye);
28547
+ we.handedness === "left" ? ye.xrControllerRay.left.set(ut, new THREE.Vector3(0, 0, -1).applyEuler(qe.rotation)) : we.handedness === "right" && ye.xrControllerRay.right.set(ut, new THREE.Vector3(0, 0, -1).applyEuler(qe.rotation)), ye.controllerWrappers[pe].position.copy(new THREE.Vector3(0, 0, 0).add(ne).sub(Ye));
28532
28548
  var Ke = ye.modelScene.intersectRaycaster(ye.xrControllerRay.right);
28533
28549
  if (Ke.length === 0) {
28534
28550
  var ht = ye.works.getResolvedObserver(ye.currentPano);
@@ -28556,15 +28572,15 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
28556
28572
  return ye.hideIntersectMesh(), { value: void 0 };
28557
28573
  } else
28558
28574
  ye.pointerLines.left.setPoints(ut, Ke[0].point);
28559
- }, ye = this, ue = 0; ue < he.length; ue++) {
28575
+ }, ye = this, ue = 0; ue < de.length; ue++) {
28560
28576
  var Be = Ve(ue);
28561
28577
  if (typeof Be == "object")
28562
28578
  return Be.value;
28563
28579
  }
28564
- this.updateControllerHelper(he, e, r);
28580
+ this.updateControllerHelper(de, e, r);
28565
28581
  }
28566
28582
  } else
28567
- ee || console.error("xrFrame丢失,请重试"), this.xrManager.session || console.error("session丢失,请重试"), this.xrManager.session && !this.xrManager.session.renderState.baseLayer && console.error("no layer found");
28583
+ $ || console.error("xrFrame丢失,请重试"), this.xrManager.session || console.error("session丢失,请重试"), this.xrManager.session && !this.xrManager.session.renderState.baseLayer && console.error("no layer found");
28568
28584
  isEmptyObject(y) === !1 && this.modelScene.parameter.set(y), this.emit("camera.update", createEvent("camera.update", {
28569
28585
  userAction: this.userAction,
28570
28586
  state: __assign(__assign(__assign({}, this.currentPano), { mode: this.mode }), clonePose(this.camera.pose))
@@ -28576,30 +28592,30 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
28576
28592
  q && Fe.push(q);
28577
28593
  }
28578
28594
  var lt = /* @__PURE__ */ new Map();
28579
- if (Fe.sort(function(ve, Pe) {
28580
- var we = lt.get(ve);
28581
- typeof we == "undefined" && (we = ve.standingPosition.distanceTo(Ie.standingPosition), lt.set(ve, we));
28582
- var qe = lt.get(ve);
28595
+ if (Fe.sort(function(pe, Pe) {
28596
+ var we = lt.get(pe);
28597
+ typeof we == "undefined" && (we = pe.standingPosition.distanceTo(Ie.standingPosition), lt.set(pe, we));
28598
+ var qe = lt.get(pe);
28583
28599
  return typeof qe == "undefined" && (qe = Pe.standingPosition.distanceTo(Ie.standingPosition), lt.set(Pe, qe)), we - qe;
28584
28600
  }), Fe.length) {
28585
28601
  this.accessibleObserverFloorCheckCount = this.accessibleObserverFloorCheckCount % Fe.length;
28586
- var nt = Fe[this.accessibleObserverFloorCheckCount], ot = this.modelScene.models.find(function(ve) {
28587
- return ve.work === (nt == null ? void 0 : nt.work);
28602
+ var nt = Fe[this.accessibleObserverFloorCheckCount], ot = this.modelScene.models.find(function(pe) {
28603
+ return pe.work === (nt == null ? void 0 : nt.work);
28588
28604
  });
28589
28605
  if (nt && ot && ot.visible) {
28590
28606
  var At = 0.3, We = 0.05, Ct = 5e-3, He = nt.standingPosition.clone().applyMatrix4(nt.work.transform), Ne = panoStringify({
28591
28607
  panoIndex: nt.panoIndex,
28592
28608
  workCode: nt.work.workCode
28593
- }), bt = adjustPanoCircleMeshVectors.map(function(ve) {
28594
- scratchRaycaster.ray.origin.copy(He), scratchRaycaster.ray.origin.add(scratchVector3.copy(ve).setY(At)), scratchRaycaster.ray.direction.set(0, -1, 0), scratchRaycaster.firstHitOnly = !0, scratchRaycaster.floorIndex = -1;
28609
+ }), bt = adjustPanoCircleMeshVectors.map(function(pe) {
28610
+ scratchRaycaster.ray.origin.copy(He), scratchRaycaster.ray.origin.add(scratchVector3.copy(pe).setY(At)), scratchRaycaster.ray.direction.set(0, -1, 0), scratchRaycaster.firstHitOnly = !0, scratchRaycaster.floorIndex = -1;
28595
28611
  var Pe = ot.intersectRaycaster(scratchRaycaster)[0];
28596
28612
  return Pe && Pe.distance - Ct <= At ? new THREE.Vector3().copy(He).setY(Pe.point.y + Ct) : He;
28597
28613
  });
28598
- bt.sort(function(ve, Pe) {
28599
- return Pe.y - ve.y;
28614
+ bt.sort(function(pe, Pe) {
28615
+ return Pe.y - pe.y;
28600
28616
  });
28601
- var It = bt[Math.floor(bt.length / 2)], Tt = bt.filter(function(ve) {
28602
- return ve.distanceTo(It) <= We;
28617
+ var It = bt[Math.floor(bt.length / 2)], Tt = bt.filter(function(pe) {
28618
+ return pe.distanceTo(It) <= We;
28603
28619
  })[0];
28604
28620
  if (Tt) {
28605
28621
  var yt = new THREE.Vector4(He.x, He.y, He.z, Tt.y - He.y), Rt = this.adjustPanoCircleMeshPositionFix.get(Ne);
@@ -28632,50 +28648,50 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
28632
28648
  rt.set(Ne, q);
28633
28649
  }
28634
28650
  }
28635
- if (this.panoMeshes.forEach(function(ve, Pe) {
28651
+ if (this.panoMeshes.forEach(function(pe, Pe) {
28636
28652
  var we = rt.get(Pe);
28637
- we ? rt.delete(Pe) : (o.helper.remove(ve), ve.dispose(), o.panoMeshes.delete(Pe));
28638
- }), rt.forEach(function(ve, Pe) {
28639
- var we = o.panoCircleMeshCreator(ve, {
28653
+ we ? rt.delete(Pe) : (o.helper.remove(pe), pe.dispose(), o.panoMeshes.delete(Pe));
28654
+ }), rt.forEach(function(pe, Pe) {
28655
+ var we = o.panoCircleMeshCreator(pe, {
28640
28656
  aerialObserverMinHeight: o.aerialObserverMinHeight
28641
28657
  });
28642
28658
  o.panoMeshes.set(Pe, we), o.helper.add(we), rt.delete(Pe);
28643
- }), this.panoMeshes.forEach(function(ve, Pe) {
28659
+ }), this.panoMeshes.forEach(function(pe, Pe) {
28644
28660
  var we = o.works.getObserver(Pe);
28645
28661
  if (we) {
28646
28662
  var qe = we.position.distanceTo(we.standingPosition) > o.aerialObserverMinHeight;
28647
28663
  if (qe)
28648
- ve.position.copy(we.position).applyMatrix4(we.work.transform), ve.scale.setScalar(18);
28664
+ pe.position.copy(we.position).applyMatrix4(we.work.transform), pe.scale.setScalar(18);
28649
28665
  else {
28650
- ve.position.copy(we.standingPosition).applyMatrix4(we.work.transform);
28666
+ pe.position.copy(we.standingPosition).applyMatrix4(we.work.transform);
28651
28667
  var Ye = o.adjustPanoCircleMeshPositionFix.get(we.panoId);
28652
- Ye && (scratchVector3.set(Ye.x, Ye.y, Ye.z), scratchVector3.equals(ve.position) && (ve.position.y += Ye.w)), ve.scale.setScalar(1.2);
28668
+ Ye && (scratchVector3.set(Ye.x, Ye.y, Ye.z), scratchVector3.equals(pe.position) && (pe.position.y += Ye.w)), pe.scale.setScalar(1.2);
28653
28669
  }
28654
- var ut = o.camera.position.clone().setY(ve.position.y), Ke = new THREE.Vector3().copy(ve.position).sub(ut).normalize();
28670
+ var ut = o.camera.position.clone().setY(pe.position.y), Ke = new THREE.Vector3().copy(pe.position).sub(ut).normalize();
28655
28671
  if (Pe === panoStringify(o.currentPano)) {
28656
- var ht = clamp$1((0.5 - ut.distanceTo(ve.position)) / 0.5, 0, 1);
28672
+ var ht = clamp$1((0.5 - ut.distanceTo(pe.position)) / 0.5, 0, 1);
28657
28673
  Ke.multiplyScalar(1 - ht).add(A.clone().multiplyScalar(ht));
28658
28674
  }
28659
28675
  if (Ke.length() > 0) {
28660
28676
  var Bt = qe ? -Math.PI / 2 : 0, B = Math.atan2(Ke.x, Ke.z);
28661
- ve.quaternion.setFromEuler(new THREE.Euler(Bt, B, 0, "YXZ"));
28677
+ pe.quaternion.setFromEuler(new THREE.Euler(Bt, B, 0, "YXZ"));
28662
28678
  }
28663
28679
  } else
28664
- ve.visible = !1;
28680
+ pe.visible = !1;
28665
28681
  }), this.camera.pose.distance > 0.1 || C)
28666
- this.panoMeshes.forEach(function(ve) {
28667
- ve.setOpacity(0), ve.setCurrent(!1), ve.updateTime && ve.updateTime(e, r), ve.visible = !1;
28682
+ this.panoMeshes.forEach(function(pe) {
28683
+ pe.setOpacity(0), pe.setCurrent(!1), pe.updateTime && pe.updateTime(e, r), pe.visible = !1;
28668
28684
  });
28669
28685
  else if (Ie) {
28670
- var Me = Ie.work.observers, Ce = arrayMin(Ie.accessibleNodes, function(ve) {
28671
- var Pe = Me[ve];
28686
+ var Me = Ie.work.observers, Ce = arrayMin(Ie.accessibleNodes, function(pe) {
28687
+ var Pe = Me[pe];
28672
28688
  return Pe ? Ie.standingPosition.distanceTo(Pe.standingPosition) : 1 / 0;
28673
28689
  }, !0), ke = Ce[1];
28674
28690
  ke = clamp$1(ke, 2.5, 1 / 0);
28675
- var je = Ie.accessibleNodes.concat(Ie.panoIndex).map(function(ve) {
28676
- return panoStringify({ panoIndex: ve, workCode: Ie.work.workCode });
28691
+ var je = Ie.accessibleNodes.concat(Ie.panoIndex).map(function(pe) {
28692
+ return panoStringify({ panoIndex: pe, workCode: Ie.work.workCode });
28677
28693
  });
28678
- this.panoMeshes.forEach(function(ve, Pe) {
28694
+ this.panoMeshes.forEach(function(pe, Pe) {
28679
28695
  var we = o.works.getObserver(Pe), qe = !1, Ye = 1;
28680
28696
  if (je.indexOf(Pe) === -1)
28681
28697
  qe = !1, Ye = 0;
@@ -28684,19 +28700,19 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
28684
28700
  else if (!we.loadable && !we.active)
28685
28701
  qe = !1, Ye = 0;
28686
28702
  else {
28687
- var ut = ve.position.clone().project(o.camera), Ke = Math.abs(ut.x) < 1 && Math.abs(ut.y) < 1 && Math.abs(ut.z) < 1;
28688
- qe = Ke && !ve.loading && ve.progress === 0 && $e !== null && panoStringify({ panoIndex: $e.panoIndex, workCode: $e.work.workCode }) === Pe;
28689
- var ht = ve.position.clone().setY(o.camera.position.y).distanceTo(o.camera.position);
28703
+ var ut = pe.position.clone().project(o.camera), Ke = Math.abs(ut.x) < 1 && Math.abs(ut.y) < 1 && Math.abs(ut.z) < 1;
28704
+ qe = Ke && !pe.loading && pe.progress === 0 && $e !== null && panoStringify({ panoIndex: $e.panoIndex, workCode: $e.work.workCode }) === Pe;
28705
+ var ht = pe.position.clone().setY(o.camera.position.y).distanceTo(o.camera.position);
28690
28706
  Ye = ht < 0.01 ? 0 : clamp$1(ke / ht, 0.1, 0.85);
28691
28707
  }
28692
28708
  if (we && we === ze) {
28693
28709
  var Bt = we.position.distanceTo(we.standingPosition) > o.aerialObserverMinHeight;
28694
28710
  if (Bt) {
28695
- var ht = ve.position.distanceTo(o.camera.position);
28711
+ var ht = pe.position.distanceTo(o.camera.position);
28696
28712
  ht < 35 && (Ye = 0);
28697
28713
  }
28698
28714
  }
28699
- o.modelScene.parameter.resolveValue().modelAlpha > 0 && (Ye = 0), ve.setCurrent(qe), ve.setOpacity(Ye), ve.updateTime && ve.updateTime(e, r);
28715
+ o.modelScene.parameter.resolveValue().modelAlpha > 0 && (Ye = 0), pe.setCurrent(qe), pe.setOpacity(Ye), pe.updateTime && pe.updateTime(e, r);
28700
28716
  });
28701
28717
  }
28702
28718
  {
@@ -28705,7 +28721,7 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
28705
28721
  this.tiling.setObserver(null);
28706
28722
  var Ht = {
28707
28723
  renderer: this.renderer,
28708
- resolution: re,
28724
+ resolution: te,
28709
28725
  pixelRatio: 1,
28710
28726
  time: this.camera.time,
28711
28727
  cameraMatrix: this.xrManager.cameraVR.matrixWorld,
@@ -28722,7 +28738,7 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
28722
28738
  this.tiling.setObserver(q);
28723
28739
  var Ht = {
28724
28740
  renderer: this.renderer,
28725
- resolution: re,
28741
+ resolution: te,
28726
28742
  pixelRatio: 1,
28727
28743
  time: this.camera.time,
28728
28744
  cameraMatrix: this.xrManager.cameraVR.matrixWorld,
@@ -29335,7 +29351,7 @@ var DEFAULT_MODE_CHANGE_DURATION = 1e3, DEFAULT_CAMERA_FOV = 90, DEFAULT_REQUEST
29335
29351
  }
29336
29352
  return Object.defineProperty(t, "version", {
29337
29353
  get: function() {
29338
- return "6.7.0-alpha.31";
29354
+ return "6.7.0-alpha.33";
29339
29355
  },
29340
29356
  enumerable: !1,
29341
29357
  configurable: !0
@@ -29609,38 +29625,38 @@ var DEFAULT_MODE_CHANGE_DURATION = 1e3, DEFAULT_CAMERA_FOV = 90, DEFAULT_REQUEST
29609
29625
  userAction: s
29610
29626
  }));
29611
29627
  var U = function(Z, X, se) {
29612
- var K = u.getCurrentState(), W = __assign(__assign({ mode: Z }, X), se);
29628
+ var G = u.getCurrentState(), W = __assign(__assign({ mode: Z }, X), se);
29613
29629
  r === "inherit" && (W = u.getCurrentState()), u.pano = X;
29614
- var ee = __assign(__assign({ initial: {
29630
+ var $ = __assign(__assign({ initial: {
29615
29631
  state: W,
29616
- currentState: K,
29632
+ currentState: G,
29617
29633
  duration: J,
29618
29634
  effect: V,
29619
29635
  userAction: s
29620
- } }, u.commonParams()), u.controllerInits[Z]), te = Controllers[W.mode].initAnimationEndState(ee);
29636
+ } }, u.commonParams()), u.controllerInits[Z]), ne = Controllers[W.mode].initAnimationEndState($);
29621
29637
  if (u.controller && I === Z)
29622
- u.controller.updateWork(M, te, { effect: V, duration: J }, s) === !1 && (u.controller.destroy(), u.controller = u.applyController(Z, ee));
29638
+ u.controller.updateWork(M, ne, { effect: V, duration: J }, s) === !1 && (u.controller.destroy(), u.controller = u.applyController(Z, $));
29623
29639
  else {
29624
29640
  if (u.controller)
29625
29641
  u.controller.destroy();
29626
29642
  else {
29627
- var re = Controllers[Z].initAnimationEndState(ee);
29628
- u.camera.setFromPose(re), u.emit("camera.update", createEvent("camera.update", {
29643
+ var te = Controllers[Z].initAnimationEndState($);
29644
+ u.camera.setFromPose(te), u.emit("camera.update", createEvent("camera.update", {
29629
29645
  state: u.getCurrentState(),
29630
29646
  userAction: s
29631
29647
  }));
29632
29648
  }
29633
- u.controller = u.applyController(Z, ee);
29634
- var de = createEvent("mode.change", {
29649
+ u.controller = u.applyController(Z, $);
29650
+ var ve = createEvent("mode.change", {
29635
29651
  prevMode: I,
29636
29652
  mode: Z,
29637
- state: te,
29653
+ state: ne,
29638
29654
  userAction: s
29639
29655
  });
29640
29656
  try {
29641
- u.emit("mode.change", de);
29642
- } catch (ae) {
29643
- console.error(ae);
29657
+ u.emit("mode.change", ve);
29658
+ } catch (oe) {
29659
+ console.error(oe);
29644
29660
  }
29645
29661
  }
29646
29662
  u.updateTime.apply(u, __spreadArray([u.currentUpdateArgs.time, 0], u.currentUpdateArgs.args, !1));
@@ -29649,8 +29665,8 @@ var DEFAULT_MODE_CHANGE_DURATION = 1e3, DEFAULT_CAMERA_FOV = 90, DEFAULT_REQUEST
29649
29665
  var j = Promise.resolve();
29650
29666
  if (O === t.Mode.Floorplan || O === t.Mode.Topview || O === t.Mode.Mapview || O === t.Mode.Model) {
29651
29667
  this.modelScene.loaded === !1 && (this.camera.setFromPose(k), assignPose(this.state, this.camera.pose));
29652
- var G = this.modelScene.setModels(M, A);
29653
- j = Promise.all(G.map(function(Z) {
29668
+ var K = this.modelScene.setModels(M, A);
29669
+ j = Promise.all(K.map(function(Z) {
29654
29670
  return Z.loadedReady;
29655
29671
  })).then(function() {
29656
29672
  u.needsRender = !0, U(O, L, k), u.emit("camera.update", createEvent("camera.update", {
@@ -29660,17 +29676,17 @@ var DEFAULT_MODE_CHANGE_DURATION = 1e3, DEFAULT_CAMERA_FOV = 90, DEFAULT_REQUEST
29660
29676
  });
29661
29677
  } else {
29662
29678
  U(O, L, k);
29663
- var ie = this.controller, ne = !1;
29679
+ var ie = this.controller, re = !1;
29664
29680
  this.modelScene.autoRefine = !1;
29665
- var $ = function() {
29666
- u.works === M && ne === !1 && (u.needsRender = !0, u.emit("camera.update", createEvent("camera.update", {
29681
+ var ee = function() {
29682
+ u.works === M && re === !1 && (u.needsRender = !0, u.emit("camera.update", createEvent("camera.update", {
29667
29683
  state: u.getCurrentState(),
29668
29684
  userAction: s
29669
- })), ne = !0, u.modelScene.autoRefine = !0), ie.off("pano.arrived", $), ie.off("pano.cancel", $);
29670
- }, G = this.modelScene.setModels(M, A);
29671
- j = Promise.all(G.map(function(X) {
29685
+ })), re = !0, u.modelScene.autoRefine = !0), ie.off("pano.arrived", ee), ie.off("pano.cancel", ee);
29686
+ }, K = this.modelScene.setModels(M, A);
29687
+ j = Promise.all(K.map(function(X) {
29672
29688
  return X.initReady;
29673
- })).then(noop), ie.once("pano.arrived", $), ie.once("pano.cancel", $), setTimeout($, ((y = v.duration) !== null && y !== void 0 ? y : this.modeChangeDuration) + 1e3);
29689
+ })).then(noop), ie.once("pano.arrived", ee), ie.once("pano.cancel", ee), setTimeout(ee, ((y = v.duration) !== null && y !== void 0 ? y : this.modeChangeDuration) + 1e3);
29674
29690
  }
29675
29691
  return this.emit("works.load", createEvent("works.load", {
29676
29692
  input: e,
@@ -29790,7 +29806,7 @@ var DEFAULT_MODE_CHANGE_DURATION = 1e3, DEFAULT_CAMERA_FOV = 90, DEFAULT_REQUEST
29790
29806
  if (!this.renderer)
29791
29807
  throw new Error("renderer is not initialized.");
29792
29808
  var f = now(), d = this.renderer.getPixelRatio(), h = this.renderer.getRenderTarget(), p = this.getSize(new THREE.Vector2()), g = 0, m = 0, E = 1, y = 1, v, A, b, T, S;
29793
- typeof e == "number" ? (g = e, typeof r == "number" && (m = r), typeof o == "number" && (E = o), typeof s == "number" && (y = s), v = u, A = l, S = c) : (g = e.x, m = e.y, E = e.width, y = e.height, v = e.pixelRatio, A = e.flipY, b = e.helperVisible, T = e.skipPanorama, S = e.buffer), g = Math.ceil(g), m = Math.ceil(m), E = Math.ceil(E), y = Math.ceil(y), v = Math.ceil(v != null ? v : d), A = A != null ? A : !1;
29809
+ typeof e == "number" ? (g = e, typeof r == "number" && (m = r), typeof o == "number" && (E = o), typeof s == "number" && (y = s), v = u, A = l, S = c) : (g = e.x, m = e.y, E = e.width, y = e.height, v = e.pixelRatio, A = e.flipY, b = e.helperVisible, T = e.skipPanorama, S = e.buffer), g = Math.floor(g), m = Math.floor(m), E = Math.floor(E), y = Math.floor(y), v = Math.floor(v != null ? v : d), A = A != null ? A : !1;
29794
29810
  var R = this.helperVisible, M = this.modelScene.parameter.modelAlpha;
29795
29811
  this.helperVisible = b != null ? b : this.helperVisible, T && (this.controller instanceof Controllers.Panorama || this.controller instanceof Controllers.VRPanorama || this.controller instanceof Controllers.XRPanorama) && T === !0 && this.modelScene.parameter.set("modelAlpha", 1), this.modelScene.update(this.renderer, this.camera);
29796
29812
  var w = this.getPixelsRenderTarget;
@@ -29806,9 +29822,9 @@ var DEFAULT_MODE_CHANGE_DURATION = 1e3, DEFAULT_CAMERA_FOV = 90, DEFAULT_REQUEST
29806
29822
  } else
29807
29823
  S = new Uint8Array(J);
29808
29824
  if (this.renderer.readRenderTargetPixels(w, 0, 0, E * v, y * v, S), A)
29809
- for (var V = z / 2, U = 0, j = 0, G = 0, ie = 0; j < V; j++)
29810
- for (ie = (q - Math.floor(j / D) - 1) * D + j % D, G = 0; G < 4; G++)
29811
- U = S[j * 4 + G], S[j * 4 + G] = S[ie * 4 + G], S[ie * 4 + G] = U;
29825
+ for (var V = z / 2, U = 0, j = 0, K = 0, ie = 0; j < V; j++)
29826
+ for (ie = (q - Math.floor(j / D) - 1) * D + j % D, K = 0; K < 4; K++)
29827
+ U = S[j * 4 + K], S[j * 4 + K] = S[ie * 4 + K], S[ie * 4 + K] = U;
29812
29828
  return S;
29813
29829
  }, t.prototype.getElement = function() {
29814
29830
  var e;