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

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.32
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,
@@ -14145,13 +14145,13 @@ var BVHVector3 = (
14145
14145
  var D = k.startIndex, q = k.endIndex, z = k.extents;
14146
14146
  C[0] = z[3] - z[0], C[1] = z[4] - z[1], C[2] = z[5] - z[2], H.sort(L);
14147
14147
  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--);
14148
+ for (var V = H[J], U = z[V] + z[V + 3], j = D, K = q - 1, ie = -1, re = void 0; j <= K; )
14149
+ 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
14150
  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++] = $);
14151
+ var ee = new BVHNode(++d, calcExtents(u, l, D, j, EPSILON$1), D, j, k.deepth + 1);
14152
+ ee.deepth < r && ee.endIndex - ee.startIndex > e && (c[f++] = ee);
14153
14153
  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;
14154
+ Z.deepth < r && Z.endIndex - Z.startIndex > e && (c[f++] = Z), k.node0 = ee, k.node1 = Z, k.startIndex = 0, k.endIndex = 0;
14155
14155
  break;
14156
14156
  }
14157
14157
  }
@@ -14190,21 +14190,21 @@ var BVHVector3 = (
14190
14190
  this.getPositionByIndex(L + 1, z);
14191
14191
  var J = z.x, V = z.y, U = z.z, j = new BVHVector3(0, 0, 0);
14192
14192
  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;
14193
+ 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;
14194
+ if (ve > 0)
14195
+ oe = 1;
14196
+ else if (ve < 0)
14197
+ oe = -1, ve = -ve;
14198
14198
  else
14199
14199
  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));
14200
+ 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
14201
  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);
14202
+ var me = oe * (M * (Z * ae - X * be) + w * (X * fe - ee * ae) + P * (ee * be - Z * fe));
14203
+ if (!(me < 0) && !(ue + me > ve)) {
14204
+ var ge = -oe * (fe * $ + be * ne + ae * te);
14205
14205
  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));
14206
+ var Ae = ge / ve, Te = new BVHVector3(T + M * Ae, S + w * Ae, R + P * Ae), he = new BVHIntersect(O, z, j, H, Te);
14207
+ (!u || u(he)) && (s ? Ae < v && (v = Ae, l.length > 0 && (l.length = 0), l.push(he)) : l.push(he));
14208
14208
  }
14209
14209
  }
14210
14210
  }
@@ -14277,8 +14277,8 @@ var EPSILON = 1e-6, ORDER_AXISES = ["x", "y", "z"], scratchVector3$8 = new BVHVe
14277
14277
  if (C > D) {
14278
14278
  var j = H.slice();
14279
14279
  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;
14280
+ var K = new BVHNode(++d, j, D, C, _.deepth + 1);
14281
+ K.deepth < r && K.endIndex - K.startIndex > e && (c[f++] = K), _.node1 = K;
14282
14282
  }
14283
14283
  _.startIndex = 0, _.endIndex = 0;
14284
14284
  }
@@ -14301,8 +14301,8 @@ var EPSILON = 1e-6, ORDER_AXISES = ["x", "y", "z"], scratchVector3$8 = new BVHVe
14301
14301
  (!u || u(V)) && (s ? z < A && (A = z, l.length > 0 && (l.length = 0), l.push(V)) : l.push(V));
14302
14302
  }
14303
14303
  }
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);
14304
+ var U = y * BYTES_PER_NODE / 2, j = p[U + 16], K = p[U + 17];
14305
+ j && E.push(j), K && E.push(K);
14306
14306
  }
14307
14307
  }
14308
14308
  return l;
@@ -16471,16 +16471,16 @@ var Tile3D = (
16471
16471
  requestOrder: E.requestOrder,
16472
16472
  maxScreenSpaceError: E.maxScreenSpaceError,
16473
16473
  memoryAdjustedScreenSpaceError: S
16474
- }, P = E.cacheCameras.map(function(pe) {
16475
- return pe.updateProjectionMatrix(), __assign(__assign({}, w), { camera: {
16474
+ }, P = E.cacheCameras.map(function(he) {
16475
+ return he.updateProjectionMatrix(), __assign(__assign({}, w), { camera: {
16476
16476
  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,
16477
+ position: new THREE.Vector3().copy(he.position),
16478
+ direction: he.getWorldDirection(new THREE.Vector3()),
16479
+ up: new THREE.Vector3().copy(he.up),
16480
+ projectionMatrix: he.projectionMatrix.clone(),
16481
+ visible: he.visible,
16482
16482
  refine: !0
16483
- }, cullingVolume: new CullingVolume().setFromCamera(pe) });
16483
+ }, cullingVolume: new CullingVolume().setFromCamera(he) });
16484
16484
  });
16485
16485
  this.updateWorldMatrix(!0, !1), this.tileset.transform.equals(this.matrixWorld) || (this.tileset.transform.copy(this.matrixWorld), m = !0);
16486
16486
  var _ = !this.autoRefine;
@@ -16493,9 +16493,9 @@ var Tile3D = (
16493
16493
  E.pano1 && H.setFromMatrixPosition(E.pano1.matrix), C.distanceTo(H) < 10 && (_ = !0);
16494
16494
  }
16495
16495
  }
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;
16496
+ if (_ || this.tileset.update(w, P), this.refined = !0, this.refineProgress[0] = 0, this.refineProgress[1] = 0, this.tileset.needsRefinedTiles.forEach(function(he) {
16497
+ if (u.refineProgress[1]++, he.content) {
16498
+ var Se = he.content.loadState;
16499
16499
  if (Se === "UNLOADED" || Se === "LOADING") {
16500
16500
  u.refined = !1;
16501
16501
  return;
@@ -16505,15 +16505,15 @@ var Tile3D = (
16505
16505
  }), this.loaded === !1 && this.autoRefine) {
16506
16506
  this.loaded = !0;
16507
16507
  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)) {
16508
+ this.tileset.needsRefinedTiles.forEach(function(he) {
16509
+ if (u.loaded !== !1 && he.content && (he.state.visible && (L = !0), E.minLevelOfDetail >= 0)) {
16510
16510
  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;
16511
+ if (he.state.finalResolution) {
16512
+ var Se = he.state.ancestorWithContentAvailable, _e = Se && Se.content ? Se.content : he.content, Ee = _e.loadState;
16513
16513
  (Ee === "UNLOADED" || Ee === "LOADING") && (u.loaded = !1);
16514
16514
  }
16515
- } else if (pe.state.visible && pe.levelOfContent <= 0) {
16516
- var Ee = pe.content.loadState;
16515
+ } else if (he.state.visible && he.levelOfContent <= 0) {
16516
+ var Ee = he.content.loadState;
16517
16517
  (Ee === "UNLOADED" || Ee === "LOADING") && (u.loaded = !1);
16518
16518
  }
16519
16519
  }
@@ -16522,8 +16522,8 @@ var Tile3D = (
16522
16522
  this.renderObjects.length = 0, this.backfaceObjects.length = 0, this.tileObjects.length = 0;
16523
16523
  for (var O = this.children.length - 1; O >= 0; O--)
16524
16524
  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;
16525
+ w.skipLevelOfDetail || this.tileset.selectedTiles.sort(function(he, Se) {
16526
+ 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
16527
  });
16528
16528
  for (var k = [], D = 0, q = this.tileset.selectedTiles; D < q.length; D++) {
16529
16529
  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 +16534,37 @@ var Tile3D = (
16534
16534
  var U = cloneSkipBackfaceObject(J);
16535
16535
  U.name = "skipBackface:" + J.name, this.backfaceObjects.push(U);
16536
16536
  }
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;
16537
+ 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++) {
16538
+ var G = se[X];
16539
+ G.stencilWrite = !0, G.stencilRef = K, G.stencilFunc = ie, G.stencilFuncMask = re, G.stencilZPass = ee, G.stencilWriteMask = Z;
16540
16540
  }
16541
16541
  } 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;
16542
+ for (var W = 0, $ = J.materials; W < $.length; W++) {
16543
+ var G = $[W];
16544
+ 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
16545
  }
16546
16546
  this.tileObjects.push(J);
16547
16547
  }
16548
16548
  }
16549
- var te = k.toString();
16550
- if (tileVersionMap.get(this) !== te && (tileVersionMap.set(this, te), m = !0), w.skipLevelOfDetail && this.backfaceObjects.length)
16549
+ var ne = k.toString();
16550
+ if (tileVersionMap.get(this) !== ne && (tileVersionMap.set(this, ne), m = !0), w.skipLevelOfDetail && this.backfaceObjects.length)
16551
16551
  for (var O = 0; O < this.backfaceObjects.length; O++)
16552
16552
  this.renderObjects.push(this.backfaceObjects[O]);
16553
16553
  if (this.tileObjects.length)
16554
16554
  for (var O = 0; O < this.tileObjects.length; O++)
16555
16555
  this.renderObjects.push(this.tileObjects[O]);
16556
16556
  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;
16557
+ for (var te = [], ve = 0, oe = this.tileset.selectedTrajectories; ve < oe.length; ve++) {
16558
+ var fe = oe[ve], be = (g = fe.content.data) === null || g === void 0 ? void 0 : g.object;
16559
16559
  if (be) {
16560
16560
  var V = be.update(e, r, o, this, fe, E);
16561
- re.push(fe.id), V && (m = !0), this.renderObjects.push(be);
16561
+ te.push(fe.id), V && (m = !0), this.renderObjects.push(be);
16562
16562
  }
16563
16563
  }
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;
16564
+ var ae = te.toString();
16565
+ if (trajectoryVersionMap.get(this) !== ae && (trajectoryVersionMap.set(this, ae), 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(he) {
16567
+ var Se = Te.renderObjects[he], _e = he + ge;
16568
16568
  Se.traverse(function(Ee) {
16569
16569
  (Ee instanceof THREE.Mesh || Ee instanceof THREE.Line || Ee instanceof THREE.Points) && (Ee.renderOrder = _e);
16570
16570
  });
@@ -17203,8 +17203,8 @@ function getEdgesBySphere(n, t, e) {
17203
17203
  var U = getBvhTreeForMesh(V);
17204
17204
  if (U) {
17205
17205
  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);
17206
+ var j = U.trianglesInSphere(scratchSphere$1.center, scratchSphere$1.radius), K = new THREE.BufferGeometry();
17207
+ K.setAttribute("position", new THREE.BufferAttribute(j, 3)), K.applyMatrix4(V.matrixWorld), K = mergeVertices(K, 0.01), g.push(K);
17208
17208
  }
17209
17209
  }
17210
17210
  }), g.length === 0)
@@ -18114,8 +18114,8 @@ function parse(n, t) {
18114
18114
  writable: !1,
18115
18115
  value: Object.freeze(R.allowHosts)
18116
18116
  });
18117
- var C = S.reduce(function(K, W) {
18118
- return jsonMerge(K, W);
18117
+ var C = S.reduce(function(G, W) {
18118
+ return jsonMerge(G, W);
18119
18119
  });
18120
18120
  defineProperty(t, "name", {
18121
18121
  enumerable: !0,
@@ -18134,7 +18134,7 @@ function parse(n, t) {
18134
18134
  enumerable: !0,
18135
18135
  writable: !0,
18136
18136
  value: (function() {
18137
- var K, W = (K = C.base_url) !== null && K !== void 0 ? K : "";
18137
+ var G, W = (G = C.base_url) !== null && G !== void 0 ? G : "";
18138
18138
  return W && W[W.length - 1] !== "/" && (W += "/"), W;
18139
18139
  })()
18140
18140
  });
@@ -18149,25 +18149,25 @@ function parse(n, t) {
18149
18149
  configurable: !1,
18150
18150
  writable: !1,
18151
18151
  value: (function() {
18152
- var K = C.model.file_url;
18153
- if (K)
18154
- return relativeURL(K, t.baseURL);
18152
+ var G = C.model.file_url;
18153
+ if (G)
18154
+ return relativeURL(G, t.baseURL);
18155
18155
  })()
18156
18156
  }), defineProperty(H, "textureBase", {
18157
18157
  enumerable: !0,
18158
18158
  configurable: !1,
18159
18159
  writable: !1,
18160
18160
  value: (function() {
18161
- var K = C.model.material_base_url;
18162
- return K && (K = relativeURL(K, t.baseURL)), K;
18161
+ var G = C.model.material_base_url;
18162
+ return G && (G = relativeURL(G, t.baseURL)), G;
18163
18163
  })()
18164
18164
  }), defineProperty(H, "textures", {
18165
18165
  enumerable: !0,
18166
18166
  configurable: !1,
18167
18167
  writable: !1,
18168
18168
  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;
18169
+ var G = void 0;
18170
+ return Array.isArray(C.model.material_textures) && (G = C.model.material_textures.slice(), Object.freeze(G)), G;
18171
18171
  })()
18172
18172
  }), defineProperty(H, "upAxis", {
18173
18173
  enumerable: !0,
@@ -18186,11 +18186,11 @@ function parse(n, t) {
18186
18186
  configurable: !1,
18187
18187
  writable: !1,
18188
18188
  value: (function() {
18189
- var K, W, ee, te = [];
18189
+ var G, W, $, ne = [];
18190
18190
  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) {
18191
+ for (var te = 0, ve = C.model.layers; te < ve.length; te++) {
18192
+ var oe = ve[te];
18193
+ if (oe && oe.tileset_url) {
18194
18194
  var fe = {};
18195
18195
  defineProperty(fe, "work", {
18196
18196
  enumerable: !1,
@@ -18201,28 +18201,28 @@ function parse(n, t) {
18201
18201
  enumerable: !0,
18202
18202
  configurable: !1,
18203
18203
  writable: !1,
18204
- value: (K = ae.name) !== null && K !== void 0 ? K : ""
18204
+ value: (G = oe.name) !== null && G !== void 0 ? G : ""
18205
18205
  }), defineProperty(fe, "type", {
18206
18206
  enumerable: !0,
18207
18207
  configurable: !1,
18208
18208
  writable: !1,
18209
- value: (W = ae.type) !== null && W !== void 0 ? W : "mesh"
18209
+ value: (W = oe.type) !== null && W !== void 0 ? W : "mesh"
18210
18210
  }), defineProperty(fe, "upAxis", {
18211
18211
  enumerable: !0,
18212
18212
  configurable: !1,
18213
18213
  writable: !1,
18214
- value: (ee = ae.up_axis) !== null && ee !== void 0 ? ee : "Z"
18214
+ value: ($ = oe.up_axis) !== null && $ !== void 0 ? $ : "Z"
18215
18215
  }), defineProperty(fe, "tileset", {
18216
18216
  enumerable: !0,
18217
18217
  configurable: !1,
18218
18218
  writable: !1,
18219
- value: relativeURL(ae.tileset_url, t.baseURL)
18220
- }), te.push(fe);
18219
+ value: relativeURL(oe.tileset_url, t.baseURL)
18220
+ }), ne.push(fe);
18221
18221
  }
18222
18222
  }
18223
18223
  if (typeof C.model.tiles == "object") {
18224
- var ae = C.model.tiles;
18225
- if (ae && ae.tileset_url) {
18224
+ var oe = C.model.tiles;
18225
+ if (oe && oe.tileset_url) {
18226
18226
  var fe = {};
18227
18227
  defineProperty(fe, "work", {
18228
18228
  enumerable: !1,
@@ -18248,11 +18248,11 @@ function parse(n, t) {
18248
18248
  enumerable: !0,
18249
18249
  configurable: !1,
18250
18250
  writable: !1,
18251
- value: relativeURL(ae.tileset_url, t.baseURL)
18252
- }), te.push(fe);
18251
+ value: relativeURL(oe.tileset_url, t.baseURL)
18252
+ }), ne.push(fe);
18253
18253
  }
18254
18254
  }
18255
- return Object.freeze(te);
18255
+ return Object.freeze(ne);
18256
18256
  })()
18257
18257
  })), defineProperty(t, "model", {
18258
18258
  enumerable: !0,
@@ -18262,188 +18262,188 @@ function parse(n, t) {
18262
18262
  });
18263
18263
  var L = [];
18264
18264
  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);
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(G) {
18266
+ var W = G, $ = C.panorama.pattern[W];
18267
+ if (typeof $ == "string") {
18268
+ var ne = new StringPattern($);
18269
+ z[W] = function(te) {
18270
+ return ne.stringify(te);
18271
18271
  };
18272
18272
  } else
18273
18273
  z[W] = function() {
18274
- return ee;
18274
+ return $;
18275
18275
  };
18276
18276
  }, V = 0, U = Object.keys((d = C.panorama.pattern) !== null && d !== void 0 ? d : {}); V < U.length; V++) {
18277
18277
  var j = U[V];
18278
18278
  J(j);
18279
18279
  }
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", {
18280
+ for (var K = function(G, W) {
18281
+ var $, ne = z[W];
18282
+ return ($ = G[W]) !== null && $ !== void 0 ? $ : ne ? ne(G) : void 0;
18283
+ }, ie = function(G) {
18284
+ var W = O[G], $ = k[G], ne = {};
18285
+ defineProperty(ne, "work", {
18286
18286
  enumerable: !1,
18287
18287
  configurable: !1,
18288
18288
  writable: !1,
18289
18289
  value: t
18290
- }), defineProperty(te, "index", {
18290
+ }), defineProperty(ne, "index", {
18291
18291
  enumerable: !0,
18292
18292
  configurable: !1,
18293
18293
  writable: !1,
18294
- value: K
18295
- }), defineProperty(te, "panoIndex", {
18294
+ value: G
18295
+ }), defineProperty(ne, "panoIndex", {
18296
18296
  enumerable: !0,
18297
18297
  configurable: !1,
18298
18298
  writable: !1,
18299
- value: K
18300
- }), defineProperty(te, "panoId", {
18299
+ value: G
18300
+ }), defineProperty(ne, "panoId", {
18301
18301
  enumerable: !0,
18302
18302
  configurable: !1,
18303
18303
  writable: !1,
18304
- value: panoStringify({ workCode: t.workCode, panoIndex: K })
18305
- }), defineProperty(te, "floorIndex", {
18304
+ value: panoStringify({ workCode: t.workCode, panoIndex: G })
18305
+ }), defineProperty(ne, "floorIndex", {
18306
18306
  enumerable: !0,
18307
18307
  configurable: !1,
18308
18308
  writable: !1,
18309
18309
  value: (h = W.floor_index) !== null && h !== void 0 ? h : W.floor
18310
- }), defineProperty(te, "derivedId", {
18310
+ }), defineProperty(ne, "derivedId", {
18311
18311
  enumerable: !0,
18312
18312
  configurable: !1,
18313
18313
  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", {
18314
+ value: (g = (p = W.derived_id) !== null && p !== void 0 ? p : K($, "derived_id")) !== null && g !== void 0 ? g : 0
18315
+ }), defineProperty(ne, "derivedIdStr", {
18316
18316
  enumerable: !0,
18317
18317
  configurable: !1,
18318
18318
  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", {
18319
+ value: (E = (m = W.derived_id_str) !== null && m !== void 0 ? m : K($, "derived_id_str")) !== null && E !== void 0 ? E : String(ne.derivedId)
18320
+ }), defineProperty(ne, "active", {
18321
18321
  enumerable: !0,
18322
18322
  configurable: !1,
18323
18323
  writable: !1,
18324
- value: W.active !== !1 && G(ee, "active") !== !1
18325
- }), defineProperty(te, "loadable", {
18324
+ value: W.active !== !1 && K($, "active") !== !1
18325
+ }), defineProperty(ne, "loadable", {
18326
18326
  enumerable: !0,
18327
18327
  configurable: !1,
18328
18328
  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", {
18329
+ value: (v = (y = W.loadable) !== null && y !== void 0 ? y : K($, "loadable")) !== null && v !== void 0 ? v : !1
18330
+ }), defineProperty(ne, "position", {
18331
18331
  enumerable: !0,
18332
18332
  configurable: !1,
18333
18333
  writable: !1,
18334
18334
  value: Object.freeze(new THREE.Vector3().fromArray((A = W.position) !== null && A !== void 0 ? A : [0, 0, 0]))
18335
- }), defineProperty(te, "standingPosition", {
18335
+ }), defineProperty(ne, "standingPosition", {
18336
18336
  enumerable: !0,
18337
18337
  configurable: !1,
18338
18338
  writable: !1,
18339
18339
  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", {
18340
+ }), defineProperty(ne, "quaternion", {
18341
18341
  enumerable: !0,
18342
18342
  configurable: !1,
18343
18343
  writable: !1,
18344
18344
  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", {
18345
+ }), defineProperty(ne, "matrix", {
18346
18346
  enumerable: !0,
18347
18347
  configurable: !1,
18348
18348
  writable: !1,
18349
- value: Object.freeze(new THREE.Matrix4().compose(te.position, te.quaternion, PANO_TEXTURE_SCALE))
18350
- }), defineProperty(te, "accessibleNodes", {
18349
+ value: Object.freeze(new THREE.Matrix4().compose(ne.position, ne.quaternion, PANO_TEXTURE_SCALE))
18350
+ }), defineProperty(ne, "accessibleNodes", {
18351
18351
  enumerable: !0,
18352
18352
  configurable: !1,
18353
18353
  writable: !1,
18354
18354
  value: (function() {
18355
18355
  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);
18356
+ for (var te = 0, ve = W.accessible_nodes; te < ve.length; te++) {
18357
+ var oe = ve[te];
18358
+ oe >= q || oe === G || accessibleNodesSet.add(oe);
18359
18359
  }
18360
18360
  else if (W.accessibleNodes && Array.isArray(W.accessibleNodes))
18361
18361
  for (var fe = 0, be = W.accessibleNodes; fe < be.length; fe++) {
18362
- var ae = be[fe];
18363
- ae >= q || ae === K || accessibleNodesSet.add(ae);
18362
+ var oe = be[fe];
18363
+ oe >= q || oe === G || accessibleNodesSet.add(oe);
18364
18364
  }
18365
18365
  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);
18366
+ for (var ae = 0, ue = W.visible_nodes; ae < ue.length; ae++) {
18367
+ var oe = ue[ae];
18368
+ oe >= q || oe === G || accessibleNodesSet.add(oe);
18369
18369
  }
18370
18370
  else if (W.visibleNodes && Array.isArray(W.visibleNodes))
18371
18371
  for (var me = 0, ge = W.visibleNodes; me < ge.length; me++) {
18372
- var ae = ge[me];
18373
- ae >= q || ae === K || accessibleNodesSet.add(ae);
18372
+ var oe = ge[me];
18373
+ oe >= q || oe === G || accessibleNodesSet.add(oe);
18374
18374
  }
18375
18375
  if (accessibleNodesSet.size === 0)
18376
18376
  for (var Ae = 0; Ae < q; Ae++)
18377
- Ae !== K && accessibleNodesSet.add(Ae);
18377
+ Ae !== G && accessibleNodesSet.add(Ae);
18378
18378
  var Te = Array.from(accessibleNodesSet);
18379
18379
  return accessibleNodesSet.clear(), Object.freeze(Te);
18380
18380
  })()
18381
- }), defineProperty(te, "visibleNodes", {
18381
+ }), defineProperty(ne, "visibleNodes", {
18382
18382
  enumerable: !0,
18383
18383
  configurable: !1,
18384
18384
  writable: !1,
18385
- value: te.accessibleNodes
18386
- }), defineProperty(te, "images", {
18385
+ value: ne.accessibleNodes
18386
+ }), defineProperty(ne, "images", {
18387
18387
  enumerable: !0,
18388
18388
  configurable: !1,
18389
18389
  writable: !1,
18390
18390
  value: (function() {
18391
- var re = {};
18392
- defineProperty(re, "work", {
18391
+ var te = {};
18392
+ defineProperty(te, "work", {
18393
18393
  enumerable: !1,
18394
18394
  configurable: !1,
18395
18395
  writable: !1,
18396
18396
  value: t
18397
18397
  });
18398
- for (var de = function(oe) {
18399
- defineProperty(re, oe, {
18398
+ for (var ve = function(ae) {
18399
+ defineProperty(te, ae, {
18400
18400
  enumerable: !0,
18401
18401
  configurable: !1,
18402
18402
  writable: !1,
18403
18403
  value: (function() {
18404
18404
  var ue;
18405
- return relativeURL(panoURL((ue = G(ee, oe)) !== null && ue !== void 0 ? ue : "", D, K), t.baseURL);
18405
+ return relativeURL(panoURL((ue = K($, ae)) !== null && ue !== void 0 ? ue : "", D, G), t.baseURL);
18406
18406
  })()
18407
18407
  });
18408
- }, ae = 0, fe = FACE_ORDER$1; ae < fe.length; ae++) {
18409
- var be = fe[ae];
18410
- de(be);
18408
+ }, oe = 0, fe = FACE_ORDER$1; oe < fe.length; oe++) {
18409
+ var be = fe[oe];
18410
+ ve(be);
18411
18411
  }
18412
- return defineProperty(re, "sizeList", {
18412
+ return defineProperty(te, "sizeList", {
18413
18413
  enumerable: !0,
18414
18414
  configurable: !1,
18415
18415
  writable: !1,
18416
18416
  value: (function() {
18417
- var oe = getImageSizeFromURL(re[FACE_ORDER$1[0]]), ue = G(ee, "size_list"), me = G(ee, "tiles");
18418
- if (oe) {
18417
+ var ae = getImageSizeFromURL(te[FACE_ORDER$1[0]]), ue = K($, "size_list"), me = K($, "tiles");
18418
+ if (ae) {
18419
18419
  if (ue) {
18420
- var ge = ue.slice().sort(function(Ee, he) {
18421
- return Ee - he;
18420
+ var ge = ue.slice().sort(function(Ee, de) {
18421
+ return Ee - de;
18422
18422
  });
18423
18423
  return Object.freeze(ge);
18424
18424
  } else if (me) {
18425
18425
  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);
18426
+ ae
18427
+ ], Ae = me.slice().sort(function(de, Ve) {
18428
+ return de - Ve;
18429
+ }), Te = 0, he = Ae; Te < he.length; Te++) {
18430
+ var Se = he[Te], _e = 512 * Math.pow(2, Se);
18431
+ _e > ae && ge.push(_e);
18432
18432
  }
18433
18433
  return Object.freeze(ge);
18434
18434
  }
18435
- return Object.freeze([oe]);
18435
+ return Object.freeze([ae]);
18436
18436
  }
18437
18437
  return Object.freeze([]);
18438
18438
  })()
18439
- }), defineProperty(re, "tiles", {
18439
+ }), defineProperty(te, "tiles", {
18440
18440
  enumerable: !0,
18441
18441
  configurable: !1,
18442
18442
  writable: !1,
18443
18443
  value: (function() {
18444
- var oe = getImageSizeFromURL(re.front);
18445
- if (oe) {
18446
- var ue = re.sizeList.slice();
18444
+ var ae = getImageSizeFromURL(te.front);
18445
+ if (ae) {
18446
+ var ue = te.sizeList.slice();
18447
18447
  if (ue[0]) {
18448
18448
  var me = getTileLevel(ue[0]);
18449
18449
  if (me)
@@ -18451,8 +18451,8 @@ function parse(n, t) {
18451
18451
  ue.unshift(512 * Math.pow(2, ge));
18452
18452
  }
18453
18453
  if (!(ue.length <= 0)) {
18454
- for (var Ae = [], Te = 0, pe = ue; Te < pe.length; Te++) {
18455
- var Se = pe[Te], _e = getTileLevel(Se);
18454
+ for (var Ae = [], Te = 0, he = ue; Te < he.length; Te++) {
18455
+ var Se = he[Te], _e = getTileLevel(Se);
18456
18456
  if (typeof _e == "number") {
18457
18457
  var Ee = {};
18458
18458
  if (defineProperty(Ee, "work", {
@@ -18465,7 +18465,7 @@ function parse(n, t) {
18465
18465
  configurable: !1,
18466
18466
  writable: !1,
18467
18467
  value: _e
18468
- }), Se > oe) {
18468
+ }), Se > ae) {
18469
18469
  defineProperty(Ee, "size", {
18470
18470
  enumerable: !0,
18471
18471
  configurable: !1,
@@ -18477,13 +18477,13 @@ function parse(n, t) {
18477
18477
  writable: !1,
18478
18478
  value: 1
18479
18479
  });
18480
- for (var he = 0, Ve = FACE_ORDER$1; he < Ve.length; he++) {
18481
- var ye = Ve[he];
18480
+ for (var de = 0, Ve = FACE_ORDER$1; de < Ve.length; de++) {
18481
+ var ye = Ve[de];
18482
18482
  defineProperty(Ee, ye, {
18483
18483
  enumerable: !0,
18484
18484
  configurable: !1,
18485
18485
  writable: !1,
18486
- value: replaceImageSize(re[ye], Se)
18486
+ value: replaceImageSize(te[ye], Se)
18487
18487
  });
18488
18488
  }
18489
18489
  } else {
@@ -18491,12 +18491,12 @@ function parse(n, t) {
18491
18491
  enumerable: !0,
18492
18492
  configurable: !1,
18493
18493
  writable: !1,
18494
- value: oe
18494
+ value: ae
18495
18495
  }), defineProperty(Ee, "scale", {
18496
18496
  enumerable: !0,
18497
18497
  configurable: !1,
18498
18498
  writable: !1,
18499
- value: Se / oe
18499
+ value: Se / ae
18500
18500
  });
18501
18501
  for (var Be = 0, Ie = FACE_ORDER$1; Be < Ie.length; Be++) {
18502
18502
  var ye = Ie[Be];
@@ -18504,7 +18504,7 @@ function parse(n, t) {
18504
18504
  enumerable: !0,
18505
18505
  configurable: !1,
18506
18506
  writable: !1,
18507
- value: re[ye]
18507
+ value: te[ye]
18508
18508
  });
18509
18509
  }
18510
18510
  }
@@ -18515,13 +18515,13 @@ function parse(n, t) {
18515
18515
  }
18516
18516
  }
18517
18517
  })()
18518
- }), defineProperty(re, "video", {
18518
+ }), defineProperty(te, "video", {
18519
18519
  enumerable: !0,
18520
18520
  configurable: !1,
18521
18521
  writable: !1,
18522
18522
  value: (function() {
18523
- var oe = G(ee, "video"), ue = void 0;
18524
- return oe && (ue = {}, defineProperty(ue, "work", {
18523
+ var ae = K($, "video"), ue = void 0;
18524
+ return ae && (ue = {}, defineProperty(ue, "work", {
18525
18525
  enumerable: !1,
18526
18526
  configurable: !1,
18527
18527
  writable: !1,
@@ -18530,24 +18530,24 @@ function parse(n, t) {
18530
18530
  enumerable: !0,
18531
18531
  configurable: !1,
18532
18532
  writable: !1,
18533
- value: oe.source
18533
+ value: ae.source
18534
18534
  }), defineProperty(ue, "matrix", {
18535
18535
  enumerable: !0,
18536
18536
  configurable: !1,
18537
18537
  writable: !1,
18538
- value: new THREE.Matrix4().fromArray(oe.matrix)
18538
+ value: new THREE.Matrix4().fromArray(ae.matrix)
18539
18539
  }), defineProperty(ue, "size", {
18540
18540
  enumerable: !0,
18541
18541
  configurable: !1,
18542
18542
  writable: !1,
18543
- value: new THREE.Vector2().fromArray(oe.size)
18543
+ value: new THREE.Vector2().fromArray(ae.size)
18544
18544
  })), ue;
18545
18545
  })()
18546
- }), re;
18546
+ }), te;
18547
18547
  })()
18548
- }), L.push(te);
18549
- }, ne = 0; ne < q; ne++)
18550
- ie(ne);
18548
+ }), L.push(ne);
18549
+ }, re = 0; re < q; re++)
18550
+ ie(re);
18551
18551
  }
18552
18552
  defineProperty(t, "observers", {
18553
18553
  enumerable: !0,
@@ -18555,8 +18555,8 @@ function parse(n, t) {
18555
18555
  writable: !1,
18556
18556
  value: Object.freeze(L)
18557
18557
  });
18558
- var $ = {};
18559
- if (defineProperty($, "work", {
18558
+ var ee = {};
18559
+ if (defineProperty(ee, "work", {
18560
18560
  enumerable: !1,
18561
18561
  configurable: !1,
18562
18562
  writable: !1,
@@ -18564,55 +18564,55 @@ function parse(n, t) {
18564
18564
  }), C.initial) {
18565
18565
  if (t.observers.length > 0) {
18566
18566
  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", {
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(ee, "panoIndex", {
18568
18568
  enumerable: !0,
18569
18569
  writable: !0,
18570
18570
  value: Z
18571
18571
  }));
18572
18572
  }
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", {
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(ee, "mode", {
18574
18574
  enumerable: !0,
18575
18575
  writable: !0,
18576
18576
  value: C.initial.mode
18577
- }) : typeof $.panoIndex == "number" ? defineProperty($, "mode", {
18577
+ }) : typeof ee.panoIndex == "number" ? defineProperty(ee, "mode", {
18578
18578
  enumerable: !0,
18579
18579
  writable: !0,
18580
18580
  value: "Panorama"
18581
- }) : defineProperty($, "mode", {
18581
+ }) : defineProperty(ee, "mode", {
18582
18582
  enumerable: !0,
18583
18583
  writable: !0,
18584
18584
  value: "Mapview"
18585
- }), isNumber(C.initial.latitude) && defineProperty($, "latitude", {
18585
+ }), isNumber(C.initial.latitude) && defineProperty(ee, "latitude", {
18586
18586
  enumerable: !0,
18587
18587
  writable: !0,
18588
18588
  value: C.initial.latitude
18589
- }), isNumber(C.initial.longitude) ? defineProperty($, "longitude", {
18589
+ }), isNumber(C.initial.longitude) ? defineProperty(ee, "longitude", {
18590
18590
  enumerable: !0,
18591
18591
  writable: !0,
18592
18592
  value: C.initial.longitude
18593
- }) : isNumber(C.initial.heading) && defineProperty($, "longitude", {
18593
+ }) : isNumber(C.initial.heading) && defineProperty(ee, "longitude", {
18594
18594
  enumerable: !0,
18595
18595
  writable: !0,
18596
18596
  value: headingToLongitude(C.initial.heading)
18597
- }), isNumber(C.initial.fov) && defineProperty($, "fov", {
18597
+ }), isNumber(C.initial.fov) && defineProperty(ee, "fov", {
18598
18598
  enumerable: !0,
18599
18599
  writable: !0,
18600
18600
  value: C.initial.fov
18601
- }), isNumber(C.initial.distance) && defineProperty($, "distance", {
18601
+ }), isNumber(C.initial.distance) && defineProperty(ee, "distance", {
18602
18602
  enumerable: !0,
18603
18603
  writable: !0,
18604
18604
  value: C.initial.distance
18605
18605
  }), 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;
18606
+ var X = C.initial.offset, se = [0, 0, 0].map(function(G, W) {
18607
+ var $ = Number(X[W]);
18608
+ return isNaN($) || !isFinite($) ? 0 : $;
18609
18609
  });
18610
- defineProperty($, "offset", {
18610
+ defineProperty(ee, "offset", {
18611
18611
  enumerable: !0,
18612
18612
  writable: !0,
18613
18613
  value: new THREE.Vector3().fromArray(se)
18614
18614
  });
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", {
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(ee, "offset", {
18616
18616
  enumerable: !0,
18617
18617
  writable: !0,
18618
18618
  value: new THREE.Vector3().fromArray([
@@ -18626,7 +18626,7 @@ function parse(n, t) {
18626
18626
  enumerable: !0,
18627
18627
  configurable: !1,
18628
18628
  writable: !1,
18629
- value: $
18629
+ value: ee
18630
18630
  }), t;
18631
18631
  }
18632
18632
  function parseNull(n, t) {
@@ -21058,14 +21058,14 @@ var Hammer = (function(n, t, e, r) {
21058
21058
  var F = B.ownerDocument || B;
21059
21059
  return F.defaultView || F.parentWindow || n;
21060
21060
  }
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) {
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", 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"];
21062
+ function ae(B, F) {
21063
21063
  var N = this;
21064
21064
  this.manager = B, this.callback = F, this.element = B.element, this.target = B.options.inputTarget, this.domHandler = function(Q) {
21065
21065
  b(B.options.enable, [B]) && N.handler(Q);
21066
21066
  }, this.init();
21067
21067
  }
21068
- oe.prototype = {
21068
+ ae.prototype = {
21069
21069
  /**
21070
21070
  * should handle the inputEvent data and trigger the callback
21071
21071
  * @virtual
@@ -21090,14 +21090,14 @@ var Hammer = (function(n, t, e, r) {
21090
21090
  return N ? F = N : z ? F = tt : J ? F = Ne : q ? F = yt : F = ze, new F(B, me);
21091
21091
  }
21092
21092
  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;
21093
+ var Q = N.pointers.length, Y = N.changedPointers.length, le = F & re && Q - Y === 0, xe = F & (Z | X) && Q - Y === 0;
21094
21094
  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
21095
  }
21096
21096
  function ge(B, F) {
21097
21097
  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);
21098
+ N.firstInput || (N.firstInput = he(F)), Y > 1 && !N.firstMultiple ? N.firstMultiple = he(F) : Y === 1 && (N.firstMultiple = !1);
21099
21099
  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);
21100
+ 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
21101
  var De = _e(F.deltaTime, F.deltaX, F.deltaY);
21102
21102
  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
21103
  var St = B.element;
@@ -21105,7 +21105,7 @@ var Hammer = (function(n, t, e, r) {
21105
21105
  }
21106
21106
  function Ae(B, F) {
21107
21107
  var N = F.center, Q = B.offsetDelta || {}, Y = B.prevDelta || {}, le = B.prevInput || {};
21108
- (F.eventType === ne || le.eventType === Z) && (Y = B.prevDelta = {
21108
+ (F.eventType === re || le.eventType === Z) && (Y = B.prevDelta = {
21109
21109
  x: le.deltaX || 0,
21110
21110
  y: le.deltaY || 0
21111
21111
  }, Q = B.offsetDelta = {
@@ -21122,7 +21122,7 @@ var Hammer = (function(n, t, e, r) {
21122
21122
  Y = N.velocity, le = N.velocityX, xe = N.velocityY, Ge = N.direction;
21123
21123
  F.velocity = Y, F.velocityX = le, F.velocityY = xe, F.direction = Ge;
21124
21124
  }
21125
- function pe(B) {
21125
+ function he(B) {
21126
21126
  for (var F = [], N = 0; N < B.pointers.length; )
21127
21127
  F[N] = {
21128
21128
  clientX: l(B.pointers[N].clientX),
@@ -21157,9 +21157,9 @@ var Hammer = (function(n, t, e, r) {
21157
21157
  };
21158
21158
  }
21159
21159
  function Ee(B, F) {
21160
- return B === F ? se : c(B) >= c(F) ? B < 0 ? K : W : F < 0 ? ee : te;
21160
+ return B === F ? se : c(B) >= c(F) ? B < 0 ? G : W : F < 0 ? $ : ne;
21161
21161
  }
21162
- function he(B, F, N) {
21162
+ function de(B, F, N) {
21163
21163
  N || (N = fe);
21164
21164
  var Q = F[N[0]] - B[N[0]], Y = F[N[1]] - B[N[1]];
21165
21165
  return Math.sqrt(Q * Q + Y * Y);
@@ -21173,24 +21173,24 @@ var Hammer = (function(n, t, e, r) {
21173
21173
  return Ve(F[1], F[0], be) + Ve(B[1], B[0], be);
21174
21174
  }
21175
21175
  function Be(B, F) {
21176
- return he(F[0], F[1], be) / he(B[0], B[1], be);
21176
+ return de(F[0], F[1], be) / de(B[0], B[1], be);
21177
21177
  }
21178
21178
  var Ie = {
21179
- mousedown: ne,
21180
- mousemove: $,
21179
+ mousedown: re,
21180
+ mousemove: ee,
21181
21181
  mouseup: Z
21182
21182
  }, $e = "mousedown", Re = "mousemove mouseup";
21183
21183
  function ze() {
21184
- this.evEl = $e, this.evWin = Re, this.pressed = !1, oe.apply(this, arguments);
21184
+ this.evEl = $e, this.evWin = Re, this.pressed = !1, ae.apply(this, arguments);
21185
21185
  }
21186
- v(ze, oe, {
21186
+ v(ze, ae, {
21187
21187
  /**
21188
21188
  * handle mouse events
21189
21189
  * @param {Object} ev
21190
21190
  */
21191
21191
  handler: function(F) {
21192
21192
  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, {
21193
+ 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
21194
  pointers: [F],
21195
21195
  changedPointers: [F],
21196
21196
  pointerType: j,
@@ -21199,8 +21199,8 @@ var Hammer = (function(n, t, e, r) {
21199
21199
  }
21200
21200
  });
21201
21201
  var Fe = {
21202
- pointerdown: ne,
21203
- pointermove: $,
21202
+ pointerdown: re,
21203
+ pointermove: ee,
21204
21204
  pointerup: Z,
21205
21205
  pointercancel: X,
21206
21206
  pointerout: X
@@ -21208,21 +21208,21 @@ var Hammer = (function(n, t, e, r) {
21208
21208
  2: V,
21209
21209
  3: U,
21210
21210
  4: j,
21211
- 5: G
21211
+ 5: K
21212
21212
  // see https://twitter.com/jacobrossi/status/480596438489890816
21213
21213
  }, Le = "pointerdown", Ue = "pointermove pointerup pointercancel";
21214
21214
  n.MSPointerEvent && !n.PointerEvent && (Le = "MSPointerDown", Ue = "MSPointerMove MSPointerUp MSPointerCancel");
21215
21215
  function tt() {
21216
- this.evEl = Le, this.evWin = Ue, oe.apply(this, arguments), this.store = this.manager.session.pointerEvents = [];
21216
+ this.evEl = Le, this.evWin = Ue, ae.apply(this, arguments), this.store = this.manager.session.pointerEvents = [];
21217
21217
  }
21218
- v(tt, oe, {
21218
+ v(tt, ae, {
21219
21219
  /**
21220
21220
  * handle mouse events
21221
21221
  * @param {Object} ev
21222
21222
  */
21223
21223
  handler: function(F) {
21224
21224
  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, {
21225
+ 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
21226
  pointers: N,
21227
21227
  changedPointers: [F],
21228
21228
  pointerType: Ge,
@@ -21231,18 +21231,18 @@ var Hammer = (function(n, t, e, r) {
21231
21231
  }
21232
21232
  });
21233
21233
  var lt = {
21234
- touchstart: ne,
21235
- touchmove: $,
21234
+ touchstart: re,
21235
+ touchmove: ee,
21236
21236
  touchend: Z,
21237
21237
  touchcancel: X
21238
21238
  }, nt = "touchstart", ot = "touchstart touchmove touchend touchcancel";
21239
21239
  function At() {
21240
- this.evTarget = nt, this.evWin = ot, this.started = !1, oe.apply(this, arguments);
21240
+ this.evTarget = nt, this.evWin = ot, this.started = !1, ae.apply(this, arguments);
21241
21241
  }
21242
- v(At, oe, {
21242
+ v(At, ae, {
21243
21243
  handler: function(F) {
21244
21244
  var N = lt[F.type];
21245
- if (N === ne && (this.started = !0), !!this.started) {
21245
+ if (N === re && (this.started = !0), !!this.started) {
21246
21246
  var Q = We.call(this, F, N);
21247
21247
  N & (Z | X) && Q[0].length - Q[1].length === 0 && (this.started = !1), this.callback(this.manager, N, {
21248
21248
  pointers: Q[0],
@@ -21258,15 +21258,15 @@ var Hammer = (function(n, t, e, r) {
21258
21258
  return F & (Z | X) && (N = C(N.concat(Q), "identifier")), [N, Q];
21259
21259
  }
21260
21260
  var Ct = {
21261
- touchstart: ne,
21262
- touchmove: $,
21261
+ touchstart: re,
21262
+ touchmove: ee,
21263
21263
  touchend: Z,
21264
21264
  touchcancel: X
21265
21265
  }, He = "touchstart touchmove touchend touchcancel";
21266
21266
  function Ne() {
21267
- this.evTarget = He, this.targetIds = {}, oe.apply(this, arguments);
21267
+ this.evTarget = He, this.targetIds = {}, ae.apply(this, arguments);
21268
21268
  }
21269
- v(Ne, oe, {
21269
+ v(Ne, ae, {
21270
21270
  handler: function(F) {
21271
21271
  var N = Ct[F.type], Q = bt.call(this, F, N);
21272
21272
  Q && this.callback(this.manager, N, {
@@ -21279,12 +21279,12 @@ var Hammer = (function(n, t, e, r) {
21279
21279
  });
21280
21280
  function bt(B, F) {
21281
21281
  var N = I(B.touches), Q = this.targetIds;
21282
- if (F & (ne | $) && N.length === 1)
21282
+ if (F & (re | ee) && N.length === 1)
21283
21283
  return Q[N[0].identifier] = !0, [N, N];
21284
21284
  var Y, le, xe = I(B.changedTouches), Ge = [], Ze = this.target;
21285
21285
  if (le = N.filter(function(De) {
21286
21286
  return M(De.target, Ze);
21287
- }), F === ne)
21287
+ }), F === re)
21288
21288
  for (Y = 0; Y < le.length; )
21289
21289
  Q[le[Y].identifier] = !0, Y++;
21290
21290
  for (Y = 0; Y < xe.length; )
@@ -21298,11 +21298,11 @@ var Hammer = (function(n, t, e, r) {
21298
21298
  }
21299
21299
  var It = 2500, Tt = 25;
21300
21300
  function yt() {
21301
- oe.apply(this, arguments);
21301
+ ae.apply(this, arguments);
21302
21302
  var B = A(this.handler, this);
21303
21303
  this.touch = new Ne(this.manager, B), this.mouse = new ze(this.manager, B), this.primaryTouch = null, this.lastTouches = [];
21304
21304
  }
21305
- v(yt, oe, {
21305
+ v(yt, ae, {
21306
21306
  /**
21307
21307
  * handle mouse and touch events
21308
21308
  * @param {Hammer} manager
@@ -21327,7 +21327,7 @@ var Hammer = (function(n, t, e, r) {
21327
21327
  }
21328
21328
  });
21329
21329
  function Rt(B, F) {
21330
- B & ne ? (this.primaryTouch = F.changedPointers[0].identifier, rt.call(this, F)) : B & (Z | X) && rt.call(this, F);
21330
+ B & re ? (this.primaryTouch = F.changedPointers[0].identifier, rt.call(this, F)) : B & (Z | X) && rt.call(this, F);
21331
21331
  }
21332
21332
  function rt(B) {
21333
21333
  var F = B.changedPointers[0];
@@ -21393,7 +21393,7 @@ var Hammer = (function(n, t, e, r) {
21393
21393
  if (Ge && Ze && De)
21394
21394
  return;
21395
21395
  }
21396
- if (!(xe && le) && (Y || le && N & re || xe && N & de))
21396
+ if (!(xe && le) && (Y || le && N & te || xe && N & ve))
21397
21397
  return this.preventSrc(F);
21398
21398
  },
21399
21399
  /**
@@ -21569,7 +21569,7 @@ var Hammer = (function(n, t, e, r) {
21569
21569
  return B & mt ? "cancel" : B & xt ? "end" : B & Pt ? "move" : B & dt ? "start" : "";
21570
21570
  }
21571
21571
  function Ot(B) {
21572
- return B == te ? "down" : B == ee ? "up" : B == K ? "left" : B == W ? "right" : "";
21572
+ return B == ne ? "down" : B == $ ? "up" : B == G ? "left" : B == W ? "right" : "";
21573
21573
  }
21574
21574
  function _t(B, F) {
21575
21575
  var N = F.manager;
@@ -21623,15 +21623,15 @@ var Hammer = (function(n, t, e, r) {
21623
21623
  event: "pan",
21624
21624
  threshold: 10,
21625
21625
  pointers: 1,
21626
- direction: ae
21626
+ direction: oe
21627
21627
  },
21628
21628
  getTouchAction: function() {
21629
21629
  var B = this.options.direction, F = [];
21630
- return B & re && F.push(st), B & de && F.push(je), F;
21630
+ return B & te && F.push(st), B & ve && F.push(je), F;
21631
21631
  },
21632
21632
  directionTest: function(B) {
21633
21633
  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;
21634
+ 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
21635
  },
21636
21636
  attrTest: function(B) {
21637
21637
  return at.prototype.attrTest.call(this, B) && (this.state & dt || !(this.state & dt) && this.directionTest(B));
@@ -21692,7 +21692,7 @@ var Hammer = (function(n, t, e, r) {
21692
21692
  var F = this.options, N = B.pointers.length === F.pointers, Q = B.distance < F.threshold, Y = B.deltaTime > F.time;
21693
21693
  if (this._input = B, !Q || !N || B.eventType & (Z | X) && !Y)
21694
21694
  this.reset();
21695
- else if (B.eventType & ne)
21695
+ else if (B.eventType & re)
21696
21696
  this.reset(), this._timer = d(function() {
21697
21697
  this.state = pt, this.tryEmit();
21698
21698
  }, F.time, this);
@@ -21707,10 +21707,10 @@ var Hammer = (function(n, t, e, r) {
21707
21707
  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
21708
  }
21709
21709
  });
21710
- function ve() {
21710
+ function pe() {
21711
21711
  at.apply(this, arguments);
21712
21712
  }
21713
- v(ve, at, {
21713
+ v(pe, at, {
21714
21714
  /**
21715
21715
  * @namespace
21716
21716
  * @memberof RotateRecognizer
@@ -21739,7 +21739,7 @@ var Hammer = (function(n, t, e, r) {
21739
21739
  event: "swipe",
21740
21740
  threshold: 10,
21741
21741
  velocity: 0.3,
21742
- direction: re | de,
21742
+ direction: te | ve,
21743
21743
  pointers: 1
21744
21744
  },
21745
21745
  getTouchAction: function() {
@@ -21747,7 +21747,7 @@ var Hammer = (function(n, t, e, r) {
21747
21747
  },
21748
21748
  attrTest: function(B) {
21749
21749
  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;
21750
+ 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
21751
  },
21752
21752
  emit: function(B) {
21753
21753
  var F = Ot(B.offsetDirection);
@@ -21780,12 +21780,12 @@ var Hammer = (function(n, t, e, r) {
21780
21780
  },
21781
21781
  process: function(B) {
21782
21782
  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)
21783
+ if (this.reset(), B.eventType & re && this.count === 0)
21784
21784
  return this.failTimeout();
21785
21785
  if (Q && Y && N) {
21786
21786
  if (B.eventType != Z)
21787
21787
  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;
21788
+ var le = this.pTime ? B.timeStamp - this.pTime < F.interval : !0, xe = !this.pCenter || de(this.pCenter, B.center) < F.posThreshold;
21789
21789
  this.pTime = B.timeStamp, this.pCenter = B.center, !xe || !le ? this.count = 1 : this.count += 1, this._input = B;
21790
21790
  var Ge = this.count % F.taps;
21791
21791
  if (Ge === 0)
@@ -21851,10 +21851,10 @@ var Hammer = (function(n, t, e, r) {
21851
21851
  */
21852
21852
  preset: [
21853
21853
  // RecognizerClass, options, [recognizeWith, ...], [requireFailure, ...]
21854
- [ve, { enable: !1 }],
21854
+ [pe, { enable: !1 }],
21855
21855
  [wt, { enable: !1 }, ["rotate"]],
21856
- [Pe, { direction: re }],
21857
- [vt, { direction: re }, ["swipe"]],
21856
+ [Pe, { direction: te }],
21857
+ [vt, { direction: te }, ["swipe"]],
21858
21858
  [we],
21859
21859
  [we, { event: "doubletap", taps: 2 }, ["tap"]],
21860
21860
  [Mt]
@@ -22054,8 +22054,8 @@ var Hammer = (function(n, t, e, r) {
22054
22054
  N.initEvent(B, !0, !0), N.gesture = F, F.target.dispatchEvent(N);
22055
22055
  }
22056
22056
  return m(qe, {
22057
- INPUT_START: ne,
22058
- INPUT_MOVE: $,
22057
+ INPUT_START: re,
22058
+ INPUT_MOVE: ee,
22059
22059
  INPUT_END: Z,
22060
22060
  INPUT_CANCEL: X,
22061
22061
  STATE_POSSIBLE: Ft,
@@ -22066,15 +22066,15 @@ var Hammer = (function(n, t, e, r) {
22066
22066
  STATE_CANCELLED: mt,
22067
22067
  STATE_FAILED: gt,
22068
22068
  DIRECTION_NONE: se,
22069
- DIRECTION_LEFT: K,
22069
+ DIRECTION_LEFT: G,
22070
22070
  DIRECTION_RIGHT: W,
22071
- DIRECTION_UP: ee,
22072
- DIRECTION_DOWN: te,
22073
- DIRECTION_HORIZONTAL: re,
22074
- DIRECTION_VERTICAL: de,
22075
- DIRECTION_ALL: ae,
22071
+ DIRECTION_UP: $,
22072
+ DIRECTION_DOWN: ne,
22073
+ DIRECTION_HORIZONTAL: te,
22074
+ DIRECTION_VERTICAL: ve,
22075
+ DIRECTION_ALL: oe,
22076
22076
  Manager: Ke,
22077
- Input: oe,
22077
+ Input: ae,
22078
22078
  TouchAction: Je,
22079
22079
  TouchInput: Ne,
22080
22080
  MouseInput: ze,
@@ -22087,7 +22087,7 @@ var Hammer = (function(n, t, e, r) {
22087
22087
  Pan: vt,
22088
22088
  Swipe: Pe,
22089
22089
  Pinch: wt,
22090
- Rotate: ve,
22090
+ Rotate: pe,
22091
22091
  Press: Mt,
22092
22092
  on: S,
22093
22093
  off: R,
@@ -22464,8 +22464,8 @@ var Hammer = (function(n, t, e, r) {
22464
22464
  } : d.prevEvent = O, r.onPinchGesture(O), h !== null && window.clearTimeout(h), h = window.setTimeout(function() {
22465
22465
  var U;
22466
22466
  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);
22467
+ var j = (U = d == null ? void 0 : d.prevEvent.scale) !== null && U !== void 0 ? U : 1, K = p("pinchend", j, I);
22468
+ d = null, r.onPinchGesture(K);
22469
22469
  }, 200);
22470
22470
  } else {
22471
22471
  var k = (Math.abs(I.deltaY) > Math.abs(I.deltaX) ? I.deltaY : I.deltaX) / -60, D = r.mouseWheelState !== void 0, q = {
@@ -23803,10 +23803,10 @@ void main() {
23803
23803
  M.sort(function(X, se) {
23804
23804
  if (X.level !== se.level)
23805
23805
  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));
23806
+ var G = w.get(X);
23807
+ G === void 0 && (G = X.box.getCenter(scratchSortVector3).angleTo(R), w.set(X, G));
23808
23808
  var W = w.get(se);
23809
- return W === void 0 && (W = se.box.getCenter(scratchSortVector3).angleTo(R), w.set(se, W)), K - W;
23809
+ return W === void 0 && (W = se.box.getCenter(scratchSortVector3).angleTo(R), w.set(se, W)), G - W;
23810
23810
  });
23811
23811
  var P = /* @__PURE__ */ new WeakSet(), _ = this.observer.images.tiles;
23812
23812
  if (_)
@@ -23817,28 +23817,28 @@ void main() {
23817
23817
  if (!se)
23818
23818
  return "continue";
23819
23819
  P.add(X);
23820
- var K = C.tileMeshes.get(X);
23821
- if (K) {
23822
- K.appearDuration = C.appearDuration;
23823
- var W = K.updateTime(o);
23820
+ var G = C.tileMeshes.get(X);
23821
+ if (G) {
23822
+ G.appearDuration = C.appearDuration;
23823
+ var W = G.updateTime(o);
23824
23824
  return W && (r = !0), "continue";
23825
23825
  }
23826
23826
  if (C.pedding >= C.maxRequest)
23827
23827
  return "continue";
23828
- var ee = Math.pow(2, X.level) * X.position.y, te = Math.pow(2, X.level) * X.position.x, re = panoStringify({
23828
+ var $ = Math.pow(2, X.level) * X.position.y, ne = Math.pow(2, X.level) * X.position.x, te = panoStringify({
23829
23829
  panoIndex: C.observer.panoIndex,
23830
23830
  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 : [
23831
+ }), 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
23832
  fe * X.position.x,
23833
23833
  fe * X.position.y,
23834
23834
  fe * X.size,
23835
23835
  fe * X.size
23836
23836
  ] });
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, {
23837
+ 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++;
23838
+ var ue = C.textureLoader.loadTexture(oe, {
23839
23839
  imageURL: {
23840
23840
  transform: be,
23841
- options: oe
23841
+ options: ae
23842
23842
  },
23843
23843
  minFilter: THREE.LinearFilter,
23844
23844
  magFilter: THREE.LinearFilter,
@@ -23853,7 +23853,7 @@ void main() {
23853
23853
  return e.pedding--, me;
23854
23854
  }, function(me) {
23855
23855
  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;
23856
+ }), 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
23857
  }, C = this, H = 0, L = M; H < L.length; H++) {
23858
23858
  var O = L[H];
23859
23859
  I(O);
@@ -23861,8 +23861,8 @@ void main() {
23861
23861
  var k = [], D = [];
23862
23862
  this.tileMeshes.forEach(function(X, se) {
23863
23863
  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);
23864
+ var G = se.level >= g && se.level <= m;
23865
+ X.visible !== G && (X.visible = G, r = !0);
23866
23866
  });
23867
23867
  for (var q = D.sort(function(X, se) {
23868
23868
  return se.activeTime - X.activeTime;
@@ -23873,8 +23873,8 @@ void main() {
23873
23873
  if (r) {
23874
23874
  var U = l.getRenderTarget();
23875
23875
  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;
23876
+ var j = l.getClearAlpha(), K = l.autoClear, ie = l.autoClearColor, re = l.autoClearDepth, ee = 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 = K, l.autoClearColor = ie, l.autoClearDepth = re, l.autoClearStencil = ee, l.clippingPlanes = Z;
23878
23878
  }
23879
23879
  return this.forceRenderWhenNextUpdate = !1, r;
23880
23880
  }, n;
@@ -24197,20 +24197,20 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
24197
24197
  for (var V = 0, U = Object.keys(this.panoResources); V < U.length; V++) {
24198
24198
  var j = U[V];
24199
24199
  if (!(O.indexOf(j) >= 0)) {
24200
- var G = this.panoResources[j];
24201
- if (G.panoPicture) {
24202
- var ie = G.panoPicture.map;
24200
+ var K = this.panoResources[j];
24201
+ if (K.panoPicture) {
24202
+ var ie = K.panoPicture.map;
24203
24203
  if (ie) {
24204
24204
  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
24205
  continue;
24206
- ie.dispose(), G.panoPicture = null;
24206
+ ie.dispose(), K.panoPicture = null;
24207
24207
  }
24208
24208
  }
24209
24209
  L.indexOf(j) >= 0 || delete this.panoResources[j];
24210
24210
  }
24211
24211
  }
24212
- var ne = panoParse(T.panoId);
24213
- ne !== this.currentPano && (this.currentPano = ne, this.accessibleObserverFloorCheckCount = 0), this.emit("pano.moving", createEvent("pano.moving", {
24212
+ var re = panoParse(T.panoId);
24213
+ re !== this.currentPano && (this.currentPano = re, this.accessibleObserverFloorCheckCount = 0), this.emit("pano.moving", createEvent("pano.moving", {
24214
24214
  userAction: this.userAction,
24215
24215
  prevPano: panoParse(S.panoId),
24216
24216
  state: __assign(__assign(__assign(__assign({}, panoParse(R.panoId)), { mode: this.mode }), clonePose(this.camera.pose)), p),
@@ -24220,27 +24220,27 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
24220
24220
  }));
24221
24221
  }
24222
24222
  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);
24223
+ 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);
24224
+ if (this.adjustPanoCircleMeshPositionBasedOnModel && this.helper.visible && ee) {
24225
+ for (var G = [], W = ee.work.observers, $ = 0, ne = ee.accessibleNodes; $ < ne.length; $++) {
24226
+ var te = ne[$], H = W[te];
24227
+ H && G.push(H);
24228
24228
  }
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);
24229
+ var ve = /* @__PURE__ */ new Map();
24230
+ if (G.sort(function(ce, Me) {
24231
+ var Ce = ve.get(ce);
24232
+ typeof Ce == "undefined" && (Ce = ce.standingPosition.distanceTo(ee.standingPosition), ve.set(ce, Ce));
24233
+ var ke = ve.get(ce);
24234
+ return typeof ke == "undefined" && (ke = Me.standingPosition.distanceTo(ee.standingPosition), ve.set(Me, ke)), Ce - ke;
24235
+ }), G.length) {
24236
+ this.accessibleObserverFloorCheckCount = this.accessibleObserverFloorCheckCount % G.length;
24237
+ var oe = G[this.accessibleObserverFloorCheckCount], fe = this.modelScene.models.find(function(ce) {
24238
+ return ce.work === (oe == null ? void 0 : oe.work);
24239
24239
  });
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
24240
+ if (oe && fe && fe.visible) {
24241
+ var be = 0.3, ae = 0.05, ue = 5e-3, me = oe.standingPosition.clone().applyMatrix4(oe.work.transform), ge = panoStringify({
24242
+ panoIndex: oe.panoIndex,
24243
+ workCode: oe.work.workCode
24244
24244
  }), Ae = adjustPanoCircleMeshVectors.map(function(ce) {
24245
24245
  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
24246
  var Me = fe.intersectRaycaster(scratchRaycaster$1)[0];
@@ -24249,11 +24249,11 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
24249
24249
  Ae.sort(function(ce, Me) {
24250
24250
  return Me.y - ce.y;
24251
24251
  });
24252
- var Te = Ae[Math.floor(Ae.length / 2)], pe = Ae.filter(function(ce) {
24253
- return ce.distanceTo(Te) <= oe;
24252
+ var Te = Ae[Math.floor(Ae.length / 2)], he = Ae.filter(function(ce) {
24253
+ return ce.distanceTo(Te) <= ae;
24254
24254
  })[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);
24255
+ if (he) {
24256
+ var Se = new THREE.Vector4(me.x, me.y, me.z, he.y - me.y), _e = this.adjustPanoCircleMeshPositionFix.get(ge);
24257
24257
  _e && !Se.equals(_e) && (this.needsRender = !0), this.adjustPanoCircleMeshPositionFix.set(ge, Se);
24258
24258
  }
24259
24259
  }
@@ -24262,8 +24262,8 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
24262
24262
  }
24263
24263
  var Ee = /* @__PURE__ */ new Map();
24264
24264
  if (X)
24265
- for (var he = 0, Ve = X.accessibleNodes; he < Ve.length; he++) {
24266
- var re = Ve[he], H = X.work.observers[re];
24265
+ for (var de = 0, Ve = X.accessibleNodes; de < Ve.length; de++) {
24266
+ var te = Ve[de], H = X.work.observers[te];
24267
24267
  if (H) {
24268
24268
  var ge = panoStringify({
24269
24269
  panoIndex: H.panoIndex,
@@ -24274,7 +24274,7 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
24274
24274
  }
24275
24275
  if (se)
24276
24276
  for (var ye = 0, Be = se.accessibleNodes; ye < Be.length; ye++) {
24277
- var re = Be[ye], H = se.work.observers[re];
24277
+ var te = Be[ye], H = se.work.observers[te];
24278
24278
  if (H) {
24279
24279
  var ge = panoStringify({
24280
24280
  panoIndex: H.panoIndex,
@@ -24317,14 +24317,14 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
24317
24317
  this.panoMeshes.forEach(function(ce) {
24318
24318
  ce.setOpacity(0), ce.setCurrent(!1), ce.updateTime && ce.updateTime(e, r), ce.visible = !1;
24319
24319
  });
24320
- else if ($) {
24321
- var Ie = $.work.observers, $e = arrayMin($.accessibleNodes, function(ce) {
24320
+ else if (ee) {
24321
+ var Ie = ee.work.observers, $e = arrayMin(ee.accessibleNodes, function(ce) {
24322
24322
  var Me = Ie[ce];
24323
- return Me ? $.standingPosition.distanceTo(Me.standingPosition) : 1 / 0;
24323
+ return Me ? ee.standingPosition.distanceTo(Me.standingPosition) : 1 / 0;
24324
24324
  }, !0), Re = $e[1];
24325
24325
  Re = clamp$1(Re, 3, 1 / 0);
24326
- var ze = $.accessibleNodes.concat($.panoIndex).map(function(ce) {
24327
- return panoStringify({ panoIndex: ce, workCode: $.work.workCode });
24326
+ var ze = ee.accessibleNodes.concat(ee.panoIndex).map(function(ce) {
24327
+ return panoStringify({ panoIndex: ce, workCode: ee.work.workCode });
24328
24328
  });
24329
24329
  this.panoMeshes.forEach(function(ce, Me) {
24330
24330
  var Ce = o.works.getObserver(Me), ke = !1, je = 1;
@@ -24393,7 +24393,7 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
24393
24393
  (Ct || He.pano !== (Ne == null ? void 0 : Ne.pano) || He.opacity !== (Ne == null ? void 0 : Ne.opacity)) && this.modelScene.parameter.set("refinedScreen", He);
24394
24394
  }
24395
24395
  }
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) {
24396
+ 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
24397
  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
24398
  this.intersectMesh.scale.setScalar(Tt);
24399
24399
  } else
@@ -24683,23 +24683,23 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
24683
24683
  })), 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
24684
  this.cameraMotion.set(V, J).catch(noop);
24685
24685
  else {
24686
- var G = coordinatesToVector({
24686
+ var K = coordinatesToVector({
24687
24687
  longitude: this.cameraMotion.value.longitude,
24688
24688
  latitude: this.cameraMotion.value.latitude
24689
24689
  }), ie = coordinatesToVector({
24690
24690
  longitude: (d = V.longitude) !== null && d !== void 0 ? d : this.cameraMotion.value.longitude,
24691
24691
  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;
24692
+ }), re = new THREE.Object3D();
24693
+ re.lookAt(K);
24694
+ var ee = new THREE.Matrix4().makeRotationFromQuaternion(re.quaternion);
24695
+ re.lookAt(ie);
24696
+ 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
24697
  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)));
24698
+ for (var $ = clamp$1(G * W, 1, 170), ne = 0; ne < S.length - 1; ne++) {
24699
+ var te = S[ne].key;
24700
+ if (te) {
24701
+ var ve = this.panoResources[te];
24702
+ ve && (ve.fixCameraTransform.copy(X), ve.panoPicture && (ve.panoPicture.zoom = Math.tan($ / 2 / 180 * Math.PI) / Math.tan(se / 2 / 180 * Math.PI)));
24703
24703
  }
24704
24704
  }
24705
24705
  this.cameraMotion.setKeyframes([
@@ -24716,7 +24716,7 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
24716
24716
  value: {
24717
24717
  longitude: (g = V.longitude) !== null && g !== void 0 ? g : this.cameraMotion.value.longitude,
24718
24718
  latitude: (m = V.latitude) !== null && m !== void 0 ? m : this.cameraMotion.value.latitude,
24719
- fov: ee
24719
+ fov: $
24720
24720
  }
24721
24721
  },
24722
24722
  {
@@ -24724,19 +24724,19 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
24724
24724
  value: {
24725
24725
  longitude: (E = V.longitude) !== null && E !== void 0 ? E : this.cameraMotion.value.longitude,
24726
24726
  latitude: (y = V.latitude) !== null && y !== void 0 ? y : this.cameraMotion.value.latitude,
24727
- fov: K
24727
+ fov: G
24728
24728
  }
24729
24729
  }
24730
24730
  ], J).catch(noop);
24731
24731
  }
24732
- var ae = this.locationMotion.setKeyframes(S, J, R);
24733
- ae.then(
24732
+ var oe = this.locationMotion.setKeyframes(S, J, R);
24733
+ oe.then(
24734
24734
  // resolve
24735
24735
  // 动画结束
24736
24736
  function() {
24737
24737
  for (var fe = 0, be = s.modelScene.children; fe < be.length; fe++) {
24738
- var oe = be[fe];
24739
- oe instanceof Model && oe.show();
24738
+ var ae = be[fe];
24739
+ ae instanceof Model && ae.show();
24740
24740
  }
24741
24741
  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
24742
  s.emit("pano.arrived", createEvent("pano.arrived", {
@@ -24766,8 +24766,8 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
24766
24766
  Te.removeAttribute("uuid");
24767
24767
  }));
24768
24768
  } else {
24769
- var pe = s.videoTexture.image;
24770
- pe.removeAttribute("uuid"), pe.oncanplay = noop, pe.ontimeupdate = noop;
24769
+ var he = s.videoTexture.image;
24770
+ he.removeAttribute("uuid"), he.oncanplay = noop, he.ontimeupdate = noop;
24771
24771
  }
24772
24772
  },
24773
24773
  // reject
@@ -24867,18 +24867,18 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
24867
24867
  var f = c.work.observers, d = c.accessibleNodes.filter(function(j) {
24868
24868
  if (j === r.currentPano.panoIndex && c.work.workCode === r.currentPano.workCode)
24869
24869
  return !1;
24870
- var G = f[j];
24871
- if (!G)
24870
+ var K = f[j];
24871
+ if (!K)
24872
24872
  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;
24873
+ var ie = scratchVector3$3.copy(K.position).applyMatrix4(K.work.transform);
24874
+ return ie.distanceTo(r.camera.position) > r.maxAccessibleDistance ? !1 : K.loadable || K.active;
24875
24875
  }), h = this.modelScene.intersectRaycaster(s)[0];
24876
24876
  if (h) {
24877
24877
  var p = arrayMin(d, function(j) {
24878
- var G = f[j];
24879
- if (!G)
24878
+ var K = f[j];
24879
+ if (!K)
24880
24880
  return 1 / 0;
24881
- var ie = scratchVector3$3.copy(G.standingPosition).applyMatrix4(G.work.transform);
24881
+ var ie = scratchVector3$3.copy(K.standingPosition).applyMatrix4(K.work.transform);
24882
24882
  return ie.distanceTo(h.point);
24883
24883
  }, !0), g = p[0], m = p[1];
24884
24884
  typeof g == "number" && m < this.panoTapTriggerRadius && (l = (o = f[g]) !== null && o !== void 0 ? o : null);
@@ -24904,8 +24904,8 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
24904
24904
  }
24905
24905
  }
24906
24906
  }
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);
24907
+ var O = P.length > 0 ? P : __spreadArray(__spreadArray([], M, !0), w, !0), k = O.slice().sort(function(j, K) {
24908
+ return j.angleTo(R) - K.angleTo(R);
24909
24909
  })[0];
24910
24910
  if (k && k.angleTo(u) > S && (b.longitude = Math.atan2(-k.x, -k.z)), this.cameraMotion.value.latitude < -Math.PI / 4) {
24911
24911
  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 +25869,11 @@ void main() {
25869
25869
  if (!(L.indexOf(U) >= 0)) {
25870
25870
  var j = this.panoResources[U];
25871
25871
  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))
25872
+ var K = j.panoPicture.map;
25873
+ if (K) {
25874
+ 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
25875
  continue;
25876
- G.dispose(), j.panoPicture = null;
25876
+ K.dispose(), j.panoPicture = null;
25877
25877
  }
25878
25878
  }
25879
25879
  H.indexOf(U) >= 0 || delete this.panoResources[U];
@@ -25889,32 +25889,32 @@ void main() {
25889
25889
  }));
25890
25890
  }
25891
25891
  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", {
25892
+ var ie = this.camera.pose.longitude, re = this.camera.pose.latitude;
25893
+ 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
25894
  userAction: !0,
25895
25895
  state: __assign(__assign(__assign({}, this.currentPano), { mode: this.mode }), clonePose(this.camera.pose))
25896
25896
  }))), 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];
25897
+ var ee = this.works.getObserver(A.panoId), Z = this.works.getObserver(b.panoId), X = /* @__PURE__ */ new Map();
25898
+ if (ee)
25899
+ for (var se = 0, G = ee.accessibleNodes; se < G.length; se++) {
25900
+ var W = G[se], C = ee.work.observers[W];
25901
25901
  if (C) {
25902
- var ee = panoStringify({
25902
+ var $ = panoStringify({
25903
25903
  panoIndex: C.panoIndex,
25904
25904
  workCode: C.work.workCode
25905
25905
  });
25906
- X.set(ee, C);
25906
+ X.set($, C);
25907
25907
  }
25908
25908
  }
25909
25909
  if (Z)
25910
- for (var te = 0, re = Z.accessibleNodes; te < re.length; te++) {
25911
- var W = re[te], C = Z.work.observers[W];
25910
+ for (var ne = 0, te = Z.accessibleNodes; ne < te.length; ne++) {
25911
+ var W = te[ne], C = Z.work.observers[W];
25912
25912
  if (C) {
25913
- var ee = panoStringify({
25913
+ var $ = panoStringify({
25914
25914
  panoIndex: C.panoIndex,
25915
25915
  workCode: C.work.workCode
25916
25916
  });
25917
- X.set(ee, C);
25917
+ X.set($, C);
25918
25918
  }
25919
25919
  }
25920
25920
  if (this.panoMeshes.forEach(function(Re, ze) {
@@ -25938,14 +25938,14 @@ void main() {
25938
25938
  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
25939
  }
25940
25940
  }), this.locationMotion.ended) {
25941
- var de = this.intersect(e);
25941
+ var ve = this.intersect(e);
25942
25942
  this.panoMeshes.forEach(function(Re, ze) {
25943
- Re.setCurrent(Re === de), Re.updateTime && Re.updateTime(e, r);
25943
+ Re.setCurrent(Re === ve), Re.updateTime && Re.updateTime(e, r);
25944
25944
  });
25945
25945
  }
25946
25946
  {
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) {
25947
+ 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;
25948
+ 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
25949
  this.tiling.setObserver(null);
25950
25950
  var ue = {
25951
25951
  renderer: this.renderer,
@@ -25962,7 +25962,7 @@ void main() {
25962
25962
  };
25963
25963
  this.tiling.update(ue), this.modelScene.parameter.set("refinedScreen", null);
25964
25964
  } 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;
25965
+ 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
25966
  this.tiling.setObserver(C);
25967
25967
  var ue = {
25968
25968
  renderer: this.renderer,
@@ -25971,16 +25971,16 @@ void main() {
25971
25971
  time: this.camera.time,
25972
25972
  cameraMatrix: this.camera.matrixWorld,
25973
25973
  cameraProjectionMatrix: this.camera.projectionMatrix,
25974
- panoMap: oe.map,
25975
- panoMatrix: oe.matrix,
25976
- panoZoom: oe.zoom,
25974
+ panoMap: ae.map,
25975
+ panoMatrix: ae.matrix,
25976
+ panoZoom: ae.zoom,
25977
25977
  minLevel: ge,
25978
- level: pe
25978
+ level: he
25979
25979
  }, Se = this.tiling.update(ue), _e = {
25980
25980
  map: this.tiling.renderTarget.texture,
25981
25981
  matrixInverse: this.tiling.camera.matrixWorldInverse,
25982
25982
  projectionMatrix: this.tiling.camera.projectionMatrix,
25983
- pano: ae,
25983
+ pano: oe,
25984
25984
  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
25985
  }, Ee = this.modelScene.parameter.refinedScreen;
25986
25986
  (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 +25988,8 @@ void main() {
25988
25988
  }
25989
25989
  this.panoVideo.object.position.copy(this.camera.position), this.panoVideo.updateTime(e);
25990
25990
  {
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) {
25991
+ var de = b.effect, Ve = this.modelScene.parameter, fe = Ve.pano0, be = Ve.pano1;
25992
+ if (fe && be && fe !== be && (de === "fly" || de === "model") && this.flyEffectUseDepthBuffer) {
25993
25993
  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
25994
  var ye = 500, Be = 512;
25995
25995
  this.pano0DepthCubeRenderTarget ? this.pano0DepthCubeRenderTarget.width !== Be && this.pano0DepthCubeRenderTarget.setSize(Be, Be) : this.pano0DepthCubeRenderTarget = new THREE.WebGLCubeRenderTarget(Be, {
@@ -26297,14 +26297,14 @@ void main() {
26297
26297
  latitude: r.latitude,
26298
26298
  fov: r.fov
26299
26299
  }, I = [], C = function(V) {
26300
- var U = H.modelScene.models.find(function(ne) {
26301
- return ne.work === V;
26300
+ var U = H.modelScene.models.find(function(re) {
26301
+ return re.work === V;
26302
26302
  });
26303
26303
  if (!U || U.visible === !1 || V.observers.length <= 0)
26304
26304
  return "continue";
26305
26305
  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];
26306
+ for (var j = 0, K = V.observers; j < K.length; j++) {
26307
+ var ie = K[j];
26308
26308
  I.push(ie);
26309
26309
  }
26310
26310
  }, H = this, L = 0, O = this.works; L < O.length; L++) {
@@ -26335,15 +26335,15 @@ void main() {
26335
26335
  var j = U[V];
26336
26336
  j instanceof Model && j.show();
26337
26337
  }
26338
- var G = __assign(__assign(__assign({}, q), { mode: s.mode }), clonePose(s.camera.pose));
26338
+ var K = __assign(__assign(__assign({}, q), { mode: s.mode }), clonePose(s.camera.pose));
26339
26339
  s.emit("pano.arrived", createEvent("pano.arrived", {
26340
26340
  options: r,
26341
26341
  prevPano: J,
26342
26342
  progress: 0,
26343
- state: G,
26343
+ state: K,
26344
26344
  userAction: s.userAction,
26345
26345
  error: null
26346
- })), r.moveEndCallback && r.moveEndCallback(G);
26346
+ })), r.moveEndCallback && r.moveEndCallback(K);
26347
26347
  },
26348
26348
  // reject
26349
26349
  // 动画被取消
@@ -27032,15 +27032,25 @@ var _moveEvent = { type: "move" }, XRController = (
27032
27032
  var e = this.controllers[t];
27033
27033
  return e || console.warn("no controller find"), e.getTargetRaySpace();
27034
27034
  }, n.prototype.getRightController = function() {
27035
- if (!this.session)
27035
+ if (!this.session || !this.session.inputSources)
27036
27036
  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();
27037
+ var t = void 0;
27038
+ if (this.session.inputSources.forEach(function(r, o) {
27039
+ r.handedness === "right" && (t = o);
27040
+ }), t === void 0)
27041
+ return console.warn("no inputSource for right hand"), null;
27042
+ var e = this.controllers[t];
27043
+ return e ? e.getTargetRaySpace() : (console.warn("right controller not find"), null);
27039
27044
  }, n.prototype.getLeftController = function() {
27040
- if (!this.session)
27045
+ if (!this.session || !this.session.inputSources)
27041
27046
  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();
27047
+ var t = void 0;
27048
+ if (this.session.inputSources.forEach(function(r, o) {
27049
+ r.handedness === "left" && (t = o);
27050
+ }), t === void 0)
27051
+ return console.warn("no inputSource for left hand"), null;
27052
+ var e = this.controllers[t];
27053
+ return e ? e.getTargetRaySpace() : (console.warn("left controller not find"), null);
27044
27054
  }, n.prototype.getControllerGrip = function(t) {
27045
27055
  var e = this.controllers[t];
27046
27056
  return e || console.warn("no controller find"), e.getGripSpace();
@@ -27613,7 +27623,7 @@ var circleImageURL = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYA
27613
27623
  }
27614
27624
  return Object.defineProperty(t, "version", {
27615
27625
  get: function() {
27616
- return "6.7.0-alpha.31";
27626
+ return "6.7.0-alpha.32";
27617
27627
  },
27618
27628
  enumerable: !1,
27619
27629
  configurable: !0
@@ -28266,20 +28276,20 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
28266
28276
  var j = coordinatesToVector({
28267
28277
  longitude: this.cameraMotion.value.longitude,
28268
28278
  latitude: this.cameraMotion.value.latitude
28269
- }), G = coordinatesToVector({
28279
+ }), K = coordinatesToVector({
28270
28280
  longitude: (f = J.longitude) !== null && f !== void 0 ? f : this.cameraMotion.value.longitude,
28271
28281
  latitude: (d = J.latitude) !== null && d !== void 0 ? d : this.cameraMotion.value.latitude
28272
28282
  }), ie = new THREE.Object3D();
28273
28283
  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)));
28284
+ var re = new THREE.Matrix4().makeRotationFromQuaternion(ie.quaternion);
28285
+ ie.lookAt(K);
28286
+ 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;
28287
+ r.effect === "zoomin" ? G = 1.5 : r.effect === "zoomout" && (G = 0.4);
28288
+ for (var W = se * G, $ = 0; $ < T.length - 1; $++) {
28289
+ var ne = T[$].key;
28290
+ if (ne) {
28291
+ var te = this.panoResources[ne];
28292
+ 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
28293
  }
28284
28294
  }
28285
28295
  this.cameraMotion.setKeyframes([
@@ -28309,24 +28319,24 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
28309
28319
  }
28310
28320
  ], z).catch(noop);
28311
28321
  }
28312
- var de = this.locationMotion.setKeyframes(T, z, S);
28313
- de.then(
28322
+ var ve = this.locationMotion.setKeyframes(T, z, S);
28323
+ ve.then(
28314
28324
  // resolve
28315
28325
  // 动画结束
28316
28326
  function() {
28317
- for (var ae = 0, fe = s.modelScene.children; ae < fe.length; ae++) {
28318
- var be = fe[ae];
28327
+ for (var oe = 0, fe = s.modelScene.children; oe < fe.length; oe++) {
28328
+ var be = fe[oe];
28319
28329
  be instanceof Model && be.show();
28320
28330
  }
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 });
28331
+ 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
28332
  s.emit("pano.arrived", createEvent("pano.arrived", {
28323
28333
  options: o,
28324
28334
  prevPano: U,
28325
28335
  progress: 1,
28326
- state: oe,
28336
+ state: ae,
28327
28337
  userAction: s.userAction,
28328
28338
  error: null
28329
- })), o.moveEndCallback && o.moveEndCallback(oe);
28339
+ })), o.moveEndCallback && o.moveEndCallback(ae);
28330
28340
  var ue = s.works.getObserver(s.currentPano);
28331
28341
  if (ue && ue.images.video && s.videoTexture && s.videoTexture.image instanceof HTMLVideoElement) {
28332
28342
  var me = {
@@ -28476,11 +28486,11 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
28476
28486
  }
28477
28487
  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
28488
  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));
28489
+ var j = U[V], K = j.key, ie = j.progress;
28490
+ K !== void 0 && (z.push(K), ie > this.locationMotion.progress && J.push(K));
28481
28491
  }
28482
- for (var ne = 0, $ = Object.keys(this.panoResources); ne < $.length; ne++) {
28483
- var Z = $[ne];
28492
+ for (var re = 0, ee = Object.keys(this.panoResources); re < ee.length; re++) {
28493
+ var Z = ee[re];
28484
28494
  if (!(J.indexOf(Z) >= 0)) {
28485
28495
  var X = this.panoResources[Z];
28486
28496
  if (X.leftPanoPicture) {
@@ -28494,8 +28504,8 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
28494
28504
  z.indexOf(Z) >= 0 || delete this.panoResources[Z];
28495
28505
  }
28496
28506
  }
28497
- var K = panoParse(P.panoId);
28498
- K !== this.currentPano && (this.currentPano = K, this.accessibleObserverFloorCheckCount = 0), this.emit("pano.moving", createEvent("pano.moving", {
28507
+ var G = panoParse(P.panoId);
28508
+ G !== this.currentPano && (this.currentPano = G, this.accessibleObserverFloorCheckCount = 0), this.emit("pano.moving", createEvent("pano.moving", {
28499
28509
  userAction: this.userAction,
28500
28510
  prevPano: panoParse(_.panoId),
28501
28511
  state: __assign(__assign(__assign(__assign({}, panoParse(I.panoId)), { mode: this.mode }), clonePose(this.camera.pose)), v),
@@ -28505,30 +28515,30 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
28505
28515
  }));
28506
28516
  }
28507
28517
  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));
28518
+ var W = m, $ = W[1], ne = new THREE.Vector3(0, 0, 0), te = new THREE.Vector2().copy(this.camera.resolution);
28519
+ if ($ && this.xrManager.session && this.xrManager.referenceSpace && this.xrManager.session.renderState.baseLayer) {
28520
+ 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++) {
28521
+ var me = ae[ue], ge = ve.cameras[ue], Ae = fe.getViewport(me);
28522
+ 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
28523
  }
28514
28524
  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
28525
  for (var ue = 0; ue < this.xrManager.session.inputSources.length; ue++)
28516
28526
  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);
28527
+ var Te = $.getPose(this.xrManager.session.inputSources[ue].targetRaySpace, oe);
28518
28528
  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);
28529
+ 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
28530
  this.gazeRay = Ee;
28521
28531
  }
28522
28532
  }
28523
28533
  }
28524
28534
  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];
28535
+ for (var de = this.xrManager.session.inputSources, Ve = function(pe) {
28536
+ var Pe = ye.xrManager.controllers[pe], we = de[pe];
28527
28537
  if (!we)
28528
28538
  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));
28539
+ Pe && Pe.update(we, $, oe);
28540
+ var qe = ye.xrManager.getController(pe), Ye = new THREE.Vector3(0, 1.2, 0), ut = qe.position.clone().add(ne).sub(Ye);
28541
+ 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
28542
  var Ke = ye.modelScene.intersectRaycaster(ye.xrControllerRay.right);
28533
28543
  if (Ke.length === 0) {
28534
28544
  var ht = ye.works.getResolvedObserver(ye.currentPano);
@@ -28556,15 +28566,15 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
28556
28566
  return ye.hideIntersectMesh(), { value: void 0 };
28557
28567
  } else
28558
28568
  ye.pointerLines.left.setPoints(ut, Ke[0].point);
28559
- }, ye = this, ue = 0; ue < he.length; ue++) {
28569
+ }, ye = this, ue = 0; ue < de.length; ue++) {
28560
28570
  var Be = Ve(ue);
28561
28571
  if (typeof Be == "object")
28562
28572
  return Be.value;
28563
28573
  }
28564
- this.updateControllerHelper(he, e, r);
28574
+ this.updateControllerHelper(de, e, r);
28565
28575
  }
28566
28576
  } 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");
28577
+ $ || console.error("xrFrame丢失,请重试"), this.xrManager.session || console.error("session丢失,请重试"), this.xrManager.session && !this.xrManager.session.renderState.baseLayer && console.error("no layer found");
28568
28578
  isEmptyObject(y) === !1 && this.modelScene.parameter.set(y), this.emit("camera.update", createEvent("camera.update", {
28569
28579
  userAction: this.userAction,
28570
28580
  state: __assign(__assign(__assign({}, this.currentPano), { mode: this.mode }), clonePose(this.camera.pose))
@@ -28576,30 +28586,30 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
28576
28586
  q && Fe.push(q);
28577
28587
  }
28578
28588
  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);
28589
+ if (Fe.sort(function(pe, Pe) {
28590
+ var we = lt.get(pe);
28591
+ typeof we == "undefined" && (we = pe.standingPosition.distanceTo(Ie.standingPosition), lt.set(pe, we));
28592
+ var qe = lt.get(pe);
28583
28593
  return typeof qe == "undefined" && (qe = Pe.standingPosition.distanceTo(Ie.standingPosition), lt.set(Pe, qe)), we - qe;
28584
28594
  }), Fe.length) {
28585
28595
  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);
28596
+ var nt = Fe[this.accessibleObserverFloorCheckCount], ot = this.modelScene.models.find(function(pe) {
28597
+ return pe.work === (nt == null ? void 0 : nt.work);
28588
28598
  });
28589
28599
  if (nt && ot && ot.visible) {
28590
28600
  var At = 0.3, We = 0.05, Ct = 5e-3, He = nt.standingPosition.clone().applyMatrix4(nt.work.transform), Ne = panoStringify({
28591
28601
  panoIndex: nt.panoIndex,
28592
28602
  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;
28603
+ }), bt = adjustPanoCircleMeshVectors.map(function(pe) {
28604
+ 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
28605
  var Pe = ot.intersectRaycaster(scratchRaycaster)[0];
28596
28606
  return Pe && Pe.distance - Ct <= At ? new THREE.Vector3().copy(He).setY(Pe.point.y + Ct) : He;
28597
28607
  });
28598
- bt.sort(function(ve, Pe) {
28599
- return Pe.y - ve.y;
28608
+ bt.sort(function(pe, Pe) {
28609
+ return Pe.y - pe.y;
28600
28610
  });
28601
- var It = bt[Math.floor(bt.length / 2)], Tt = bt.filter(function(ve) {
28602
- return ve.distanceTo(It) <= We;
28611
+ var It = bt[Math.floor(bt.length / 2)], Tt = bt.filter(function(pe) {
28612
+ return pe.distanceTo(It) <= We;
28603
28613
  })[0];
28604
28614
  if (Tt) {
28605
28615
  var yt = new THREE.Vector4(He.x, He.y, He.z, Tt.y - He.y), Rt = this.adjustPanoCircleMeshPositionFix.get(Ne);
@@ -28632,50 +28642,50 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
28632
28642
  rt.set(Ne, q);
28633
28643
  }
28634
28644
  }
28635
- if (this.panoMeshes.forEach(function(ve, Pe) {
28645
+ if (this.panoMeshes.forEach(function(pe, Pe) {
28636
28646
  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, {
28647
+ we ? rt.delete(Pe) : (o.helper.remove(pe), pe.dispose(), o.panoMeshes.delete(Pe));
28648
+ }), rt.forEach(function(pe, Pe) {
28649
+ var we = o.panoCircleMeshCreator(pe, {
28640
28650
  aerialObserverMinHeight: o.aerialObserverMinHeight
28641
28651
  });
28642
28652
  o.panoMeshes.set(Pe, we), o.helper.add(we), rt.delete(Pe);
28643
- }), this.panoMeshes.forEach(function(ve, Pe) {
28653
+ }), this.panoMeshes.forEach(function(pe, Pe) {
28644
28654
  var we = o.works.getObserver(Pe);
28645
28655
  if (we) {
28646
28656
  var qe = we.position.distanceTo(we.standingPosition) > o.aerialObserverMinHeight;
28647
28657
  if (qe)
28648
- ve.position.copy(we.position).applyMatrix4(we.work.transform), ve.scale.setScalar(18);
28658
+ pe.position.copy(we.position).applyMatrix4(we.work.transform), pe.scale.setScalar(18);
28649
28659
  else {
28650
- ve.position.copy(we.standingPosition).applyMatrix4(we.work.transform);
28660
+ pe.position.copy(we.standingPosition).applyMatrix4(we.work.transform);
28651
28661
  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);
28662
+ Ye && (scratchVector3.set(Ye.x, Ye.y, Ye.z), scratchVector3.equals(pe.position) && (pe.position.y += Ye.w)), pe.scale.setScalar(1.2);
28653
28663
  }
28654
- var ut = o.camera.position.clone().setY(ve.position.y), Ke = new THREE.Vector3().copy(ve.position).sub(ut).normalize();
28664
+ var ut = o.camera.position.clone().setY(pe.position.y), Ke = new THREE.Vector3().copy(pe.position).sub(ut).normalize();
28655
28665
  if (Pe === panoStringify(o.currentPano)) {
28656
- var ht = clamp$1((0.5 - ut.distanceTo(ve.position)) / 0.5, 0, 1);
28666
+ var ht = clamp$1((0.5 - ut.distanceTo(pe.position)) / 0.5, 0, 1);
28657
28667
  Ke.multiplyScalar(1 - ht).add(A.clone().multiplyScalar(ht));
28658
28668
  }
28659
28669
  if (Ke.length() > 0) {
28660
28670
  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"));
28671
+ pe.quaternion.setFromEuler(new THREE.Euler(Bt, B, 0, "YXZ"));
28662
28672
  }
28663
28673
  } else
28664
- ve.visible = !1;
28674
+ pe.visible = !1;
28665
28675
  }), 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;
28676
+ this.panoMeshes.forEach(function(pe) {
28677
+ pe.setOpacity(0), pe.setCurrent(!1), pe.updateTime && pe.updateTime(e, r), pe.visible = !1;
28668
28678
  });
28669
28679
  else if (Ie) {
28670
- var Me = Ie.work.observers, Ce = arrayMin(Ie.accessibleNodes, function(ve) {
28671
- var Pe = Me[ve];
28680
+ var Me = Ie.work.observers, Ce = arrayMin(Ie.accessibleNodes, function(pe) {
28681
+ var Pe = Me[pe];
28672
28682
  return Pe ? Ie.standingPosition.distanceTo(Pe.standingPosition) : 1 / 0;
28673
28683
  }, !0), ke = Ce[1];
28674
28684
  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 });
28685
+ var je = Ie.accessibleNodes.concat(Ie.panoIndex).map(function(pe) {
28686
+ return panoStringify({ panoIndex: pe, workCode: Ie.work.workCode });
28677
28687
  });
28678
- this.panoMeshes.forEach(function(ve, Pe) {
28688
+ this.panoMeshes.forEach(function(pe, Pe) {
28679
28689
  var we = o.works.getObserver(Pe), qe = !1, Ye = 1;
28680
28690
  if (je.indexOf(Pe) === -1)
28681
28691
  qe = !1, Ye = 0;
@@ -28684,19 +28694,19 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
28684
28694
  else if (!we.loadable && !we.active)
28685
28695
  qe = !1, Ye = 0;
28686
28696
  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);
28697
+ var ut = pe.position.clone().project(o.camera), Ke = Math.abs(ut.x) < 1 && Math.abs(ut.y) < 1 && Math.abs(ut.z) < 1;
28698
+ qe = Ke && !pe.loading && pe.progress === 0 && $e !== null && panoStringify({ panoIndex: $e.panoIndex, workCode: $e.work.workCode }) === Pe;
28699
+ var ht = pe.position.clone().setY(o.camera.position.y).distanceTo(o.camera.position);
28690
28700
  Ye = ht < 0.01 ? 0 : clamp$1(ke / ht, 0.1, 0.85);
28691
28701
  }
28692
28702
  if (we && we === ze) {
28693
28703
  var Bt = we.position.distanceTo(we.standingPosition) > o.aerialObserverMinHeight;
28694
28704
  if (Bt) {
28695
- var ht = ve.position.distanceTo(o.camera.position);
28705
+ var ht = pe.position.distanceTo(o.camera.position);
28696
28706
  ht < 35 && (Ye = 0);
28697
28707
  }
28698
28708
  }
28699
- o.modelScene.parameter.resolveValue().modelAlpha > 0 && (Ye = 0), ve.setCurrent(qe), ve.setOpacity(Ye), ve.updateTime && ve.updateTime(e, r);
28709
+ o.modelScene.parameter.resolveValue().modelAlpha > 0 && (Ye = 0), pe.setCurrent(qe), pe.setOpacity(Ye), pe.updateTime && pe.updateTime(e, r);
28700
28710
  });
28701
28711
  }
28702
28712
  {
@@ -28705,7 +28715,7 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
28705
28715
  this.tiling.setObserver(null);
28706
28716
  var Ht = {
28707
28717
  renderer: this.renderer,
28708
- resolution: re,
28718
+ resolution: te,
28709
28719
  pixelRatio: 1,
28710
28720
  time: this.camera.time,
28711
28721
  cameraMatrix: this.xrManager.cameraVR.matrixWorld,
@@ -28722,7 +28732,7 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
28722
28732
  this.tiling.setObserver(q);
28723
28733
  var Ht = {
28724
28734
  renderer: this.renderer,
28725
- resolution: re,
28735
+ resolution: te,
28726
28736
  pixelRatio: 1,
28727
28737
  time: this.camera.time,
28728
28738
  cameraMatrix: this.xrManager.cameraVR.matrixWorld,
@@ -29335,7 +29345,7 @@ var DEFAULT_MODE_CHANGE_DURATION = 1e3, DEFAULT_CAMERA_FOV = 90, DEFAULT_REQUEST
29335
29345
  }
29336
29346
  return Object.defineProperty(t, "version", {
29337
29347
  get: function() {
29338
- return "6.7.0-alpha.31";
29348
+ return "6.7.0-alpha.32";
29339
29349
  },
29340
29350
  enumerable: !1,
29341
29351
  configurable: !0
@@ -29609,38 +29619,38 @@ var DEFAULT_MODE_CHANGE_DURATION = 1e3, DEFAULT_CAMERA_FOV = 90, DEFAULT_REQUEST
29609
29619
  userAction: s
29610
29620
  }));
29611
29621
  var U = function(Z, X, se) {
29612
- var K = u.getCurrentState(), W = __assign(__assign({ mode: Z }, X), se);
29622
+ var G = u.getCurrentState(), W = __assign(__assign({ mode: Z }, X), se);
29613
29623
  r === "inherit" && (W = u.getCurrentState()), u.pano = X;
29614
- var ee = __assign(__assign({ initial: {
29624
+ var $ = __assign(__assign({ initial: {
29615
29625
  state: W,
29616
- currentState: K,
29626
+ currentState: G,
29617
29627
  duration: J,
29618
29628
  effect: V,
29619
29629
  userAction: s
29620
- } }, u.commonParams()), u.controllerInits[Z]), te = Controllers[W.mode].initAnimationEndState(ee);
29630
+ } }, u.commonParams()), u.controllerInits[Z]), ne = Controllers[W.mode].initAnimationEndState($);
29621
29631
  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));
29632
+ u.controller.updateWork(M, ne, { effect: V, duration: J }, s) === !1 && (u.controller.destroy(), u.controller = u.applyController(Z, $));
29623
29633
  else {
29624
29634
  if (u.controller)
29625
29635
  u.controller.destroy();
29626
29636
  else {
29627
- var re = Controllers[Z].initAnimationEndState(ee);
29628
- u.camera.setFromPose(re), u.emit("camera.update", createEvent("camera.update", {
29637
+ var te = Controllers[Z].initAnimationEndState($);
29638
+ u.camera.setFromPose(te), u.emit("camera.update", createEvent("camera.update", {
29629
29639
  state: u.getCurrentState(),
29630
29640
  userAction: s
29631
29641
  }));
29632
29642
  }
29633
- u.controller = u.applyController(Z, ee);
29634
- var de = createEvent("mode.change", {
29643
+ u.controller = u.applyController(Z, $);
29644
+ var ve = createEvent("mode.change", {
29635
29645
  prevMode: I,
29636
29646
  mode: Z,
29637
- state: te,
29647
+ state: ne,
29638
29648
  userAction: s
29639
29649
  });
29640
29650
  try {
29641
- u.emit("mode.change", de);
29642
- } catch (ae) {
29643
- console.error(ae);
29651
+ u.emit("mode.change", ve);
29652
+ } catch (oe) {
29653
+ console.error(oe);
29644
29654
  }
29645
29655
  }
29646
29656
  u.updateTime.apply(u, __spreadArray([u.currentUpdateArgs.time, 0], u.currentUpdateArgs.args, !1));
@@ -29649,8 +29659,8 @@ var DEFAULT_MODE_CHANGE_DURATION = 1e3, DEFAULT_CAMERA_FOV = 90, DEFAULT_REQUEST
29649
29659
  var j = Promise.resolve();
29650
29660
  if (O === t.Mode.Floorplan || O === t.Mode.Topview || O === t.Mode.Mapview || O === t.Mode.Model) {
29651
29661
  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) {
29662
+ var K = this.modelScene.setModels(M, A);
29663
+ j = Promise.all(K.map(function(Z) {
29654
29664
  return Z.loadedReady;
29655
29665
  })).then(function() {
29656
29666
  u.needsRender = !0, U(O, L, k), u.emit("camera.update", createEvent("camera.update", {
@@ -29660,17 +29670,17 @@ var DEFAULT_MODE_CHANGE_DURATION = 1e3, DEFAULT_CAMERA_FOV = 90, DEFAULT_REQUEST
29660
29670
  });
29661
29671
  } else {
29662
29672
  U(O, L, k);
29663
- var ie = this.controller, ne = !1;
29673
+ var ie = this.controller, re = !1;
29664
29674
  this.modelScene.autoRefine = !1;
29665
- var $ = function() {
29666
- u.works === M && ne === !1 && (u.needsRender = !0, u.emit("camera.update", createEvent("camera.update", {
29675
+ var ee = function() {
29676
+ u.works === M && re === !1 && (u.needsRender = !0, u.emit("camera.update", createEvent("camera.update", {
29667
29677
  state: u.getCurrentState(),
29668
29678
  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) {
29679
+ })), re = !0, u.modelScene.autoRefine = !0), ie.off("pano.arrived", ee), ie.off("pano.cancel", ee);
29680
+ }, K = this.modelScene.setModels(M, A);
29681
+ j = Promise.all(K.map(function(X) {
29672
29682
  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);
29683
+ })).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
29684
  }
29675
29685
  return this.emit("works.load", createEvent("works.load", {
29676
29686
  input: e,
@@ -29790,7 +29800,7 @@ var DEFAULT_MODE_CHANGE_DURATION = 1e3, DEFAULT_CAMERA_FOV = 90, DEFAULT_REQUEST
29790
29800
  if (!this.renderer)
29791
29801
  throw new Error("renderer is not initialized.");
29792
29802
  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;
29803
+ 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
29804
  var R = this.helperVisible, M = this.modelScene.parameter.modelAlpha;
29795
29805
  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
29806
  var w = this.getPixelsRenderTarget;
@@ -29806,9 +29816,9 @@ var DEFAULT_MODE_CHANGE_DURATION = 1e3, DEFAULT_CAMERA_FOV = 90, DEFAULT_REQUEST
29806
29816
  } else
29807
29817
  S = new Uint8Array(J);
29808
29818
  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;
29819
+ for (var V = z / 2, U = 0, j = 0, K = 0, ie = 0; j < V; j++)
29820
+ for (ie = (q - Math.floor(j / D) - 1) * D + j % D, K = 0; K < 4; K++)
29821
+ U = S[j * 4 + K], S[j * 4 + K] = S[ie * 4 + K], S[ie * 4 + K] = U;
29812
29822
  return S;
29813
29823
  }, t.prototype.getElement = function() {
29814
29824
  var e;