@realsee/five 6.5.1 → 6.5.2

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: 8/7/2025
5
- * Version: 6.5.1
4
+ * Generated: 2025/8/11
5
+ * Version: 6.5.2
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
  C[M + 1] = C[M + 3], C[M + 3] = F, this._doCryptBlock(C, M, this._invKeySchedule, c, f, d, h, r), F = C[M + 1], C[M + 1] = C[M + 3], C[M + 3] = F;
759
759
  },
760
760
  _doCryptBlock: function(C, M, F, H, w, I, P, O) {
761
- for (var _ = this._nRounds, q = C[M] ^ F[0], X = C[M + 1] ^ F[1], Z = C[M + 2] ^ F[2], U = C[M + 3] ^ F[3], N = 4, z = 1; z < _; z++)
762
- var J = H[q >>> 24] ^ w[X >>> 16 & 255] ^ I[Z >>> 8 & 255] ^ P[U & 255] ^ F[N++], K = H[X >>> 24] ^ w[Z >>> 16 & 255] ^ I[U >>> 8 & 255] ^ P[q & 255] ^ F[N++], Q = H[Z >>> 24] ^ w[U >>> 16 & 255] ^ I[q >>> 8 & 255] ^ P[X & 255] ^ F[N++], U = H[U >>> 24] ^ w[q >>> 16 & 255] ^ I[X >>> 8 & 255] ^ P[Z & 255] ^ F[N++], q = J, X = K, Z = Q;
763
- J = (O[q >>> 24] << 24 | O[X >>> 16 & 255] << 16 | O[Z >>> 8 & 255] << 8 | O[U & 255]) ^ F[N++], K = (O[X >>> 24] << 24 | O[Z >>> 16 & 255] << 16 | O[U >>> 8 & 255] << 8 | O[q & 255]) ^ F[N++], Q = (O[Z >>> 24] << 24 | O[U >>> 16 & 255] << 16 | O[q >>> 8 & 255] << 8 | O[X & 255]) ^ F[N++], U = (O[U >>> 24] << 24 | O[q >>> 16 & 255] << 16 | O[X >>> 8 & 255] << 8 | O[Z & 255]) ^ F[N++], C[M] = J, C[M + 1] = K, C[M + 2] = Q, C[M + 3] = U;
761
+ for (var _ = this._nRounds, q = C[M] ^ F[0], K = C[M + 1] ^ F[1], Y = C[M + 2] ^ F[2], U = C[M + 3] ^ F[3], N = 4, z = 1; z < _; z++)
762
+ var J = H[q >>> 24] ^ w[K >>> 16 & 255] ^ I[Y >>> 8 & 255] ^ P[U & 255] ^ F[N++], G = H[K >>> 24] ^ w[Y >>> 16 & 255] ^ I[U >>> 8 & 255] ^ P[q & 255] ^ F[N++], Q = H[Y >>> 24] ^ w[U >>> 16 & 255] ^ I[q >>> 8 & 255] ^ P[K & 255] ^ F[N++], U = H[U >>> 24] ^ w[q >>> 16 & 255] ^ I[K >>> 8 & 255] ^ P[Y & 255] ^ F[N++], q = J, K = G, Y = Q;
763
+ J = (O[q >>> 24] << 24 | O[K >>> 16 & 255] << 16 | O[Y >>> 8 & 255] << 8 | O[U & 255]) ^ F[N++], G = (O[K >>> 24] << 24 | O[Y >>> 16 & 255] << 16 | O[U >>> 8 & 255] << 8 | O[q & 255]) ^ F[N++], Q = (O[Y >>> 24] << 24 | O[U >>> 16 & 255] << 16 | O[q >>> 8 & 255] << 8 | O[K & 255]) ^ F[N++], U = (O[U >>> 24] << 24 | O[q >>> 16 & 255] << 16 | O[K >>> 8 & 255] << 8 | O[Y & 255]) ^ F[N++], C[M] = J, C[M + 1] = G, C[M + 2] = Q, C[M + 3] = U;
764
764
  },
765
765
  keySize: 8
766
766
  });
@@ -3188,43 +3188,43 @@ function X509(n) {
3188
3188
  }).join("/");
3189
3189
  }, this.getInfo = function() {
3190
3190
  var v = function(J) {
3191
- var K = JSON.stringify(J.array).replace(/[\[\]\{\}\"]/g, "");
3192
- return K;
3191
+ var G = JSON.stringify(J.array).replace(/[\[\]\{\}\"]/g, "");
3192
+ return G;
3193
3193
  }, y = function(J) {
3194
- for (var K = "", Q = J.array, U = 0; U < Q.length; U++) {
3194
+ for (var G = "", Q = J.array, U = 0; U < Q.length; U++) {
3195
3195
  var q = Q[U];
3196
- if (K += " policy oid: " + q.policyoid + `
3196
+ if (G += " policy oid: " + q.policyoid + `
3197
3197
  `, q.array !== void 0)
3198
- for (var X = 0; X < q.array.length; X++) {
3199
- var Z = q.array[X];
3200
- Z.cps !== void 0 && (K += " cps: " + Z.cps + `
3198
+ for (var K = 0; K < q.array.length; K++) {
3199
+ var Y = q.array[K];
3200
+ Y.cps !== void 0 && (G += " cps: " + Y.cps + `
3201
3201
  `);
3202
3202
  }
3203
3203
  }
3204
- return K;
3204
+ return G;
3205
3205
  }, b = function(J) {
3206
- for (var K = "", Q = J.array, U = 0; U < Q.length; U++) {
3206
+ for (var G = "", Q = J.array, U = 0; U < Q.length; U++) {
3207
3207
  var q = Q[U];
3208
3208
  try {
3209
- q.dpname.full[0].uri !== void 0 && (K += " " + q.dpname.full[0].uri + `
3209
+ q.dpname.full[0].uri !== void 0 && (G += " " + q.dpname.full[0].uri + `
3210
3210
  `);
3211
- } catch (X) {
3211
+ } catch (K) {
3212
3212
  }
3213
3213
  try {
3214
- q.dname.full[0].dn.hex !== void 0 && (K += " " + X509.hex2dn(q.dpname.full[0].dn.hex) + `
3214
+ q.dname.full[0].dn.hex !== void 0 && (G += " " + X509.hex2dn(q.dpname.full[0].dn.hex) + `
3215
3215
  `);
3216
- } catch (X) {
3216
+ } catch (K) {
3217
3217
  }
3218
3218
  }
3219
- return K;
3219
+ return G;
3220
3220
  }, T = function(J) {
3221
- for (var K = "", Q = J.array, U = 0; U < Q.length; U++) {
3221
+ for (var G = "", Q = J.array, U = 0; U < Q.length; U++) {
3222
3222
  var q = Q[U];
3223
- q.caissuer !== void 0 && (K += " caissuer: " + q.caissuer + `
3224
- `), q.ocsp !== void 0 && (K += " ocsp: " + q.ocsp + `
3223
+ q.caissuer !== void 0 && (G += " caissuer: " + q.caissuer + `
3224
+ `), q.ocsp !== void 0 && (G += " ocsp: " + q.ocsp + `
3225
3225
  `);
3226
3226
  }
3227
- return K;
3227
+ return G;
3228
3228
  }, S, R, C;
3229
3229
  if (S = `Basic Fields
3230
3230
  `, S += " serial number: " + this.getSerialNumberHex() + `
@@ -3921,8 +3921,8 @@ var PBMCustomShader = (
3921
3921
  `));
3922
3922
  var J = String(r.clippers.length);
3923
3923
  v.vertexShader = v.vertexShader.replace(/NUM_CLIPPERS/g, J), v.fragmentShader = v.fragmentShader.replace(/NUM_CLIPPERS/g, J);
3924
- for (var K = 0, Q = I; K < Q.length; K++) {
3925
- var U = Q[K];
3924
+ for (var G = 0, Q = I; G < Q.length; G++) {
3925
+ var U = Q[G];
3926
3926
  U.onBeforeCompile && U.onBeforeCompile(v, y);
3927
3927
  }
3928
3928
  };
@@ -5162,17 +5162,17 @@ function ajax(n, t, e, r, o) {
5162
5162
  r(J), f(J), (O = t.networkSubscribe) === null || O === void 0 || O.emit("network", l, "Script", "error", J.message);
5163
5163
  return;
5164
5164
  }
5165
- var K = P.split(","), Q = (K[0].match(/:(.*?);/) || [])[1], U = K[1];
5165
+ var G = P.split(","), Q = (G[0].match(/:(.*?);/) || [])[1], U = G[1];
5166
5166
  if (t.responseType === "arraybuffer" || t.responseType === "blob") {
5167
- for (var q = atob(K[1]), X = q.length, Z = new Uint8Array(X), W = 0; W < X; W++)
5168
- Z[W] = q.charCodeAt(W);
5169
- t.responseType === "arraybuffer" ? U = Z.buffer : U = new Blob([Z], { type: Q });
5167
+ for (var q = atob(G[1]), K = q.length, Y = new Uint8Array(K), Z = 0; Z < K; Z++)
5168
+ Y[Z] = q.charCodeAt(Z);
5169
+ t.responseType === "arraybuffer" ? U = Y.buffer : U = new Blob([Y], { type: Q });
5170
5170
  }
5171
- var G = {}, ne = {
5171
+ var te = {}, j = {
5172
5172
  body: U,
5173
- meta: { origin: u, source: l, requestTime: s, responseTime: N, costs: z, headers: G }
5173
+ meta: { origin: u, source: l, requestTime: s, responseTime: N, costs: z, headers: te }
5174
5174
  };
5175
- e(ne), c(ne), (_ = t.networkSubscribe) === null || _ === void 0 || _.emit("network", l, "Script", "ok", JSON.stringify(ne.meta)), y = !0;
5175
+ e(j), c(j), (_ = t.networkSubscribe) === null || _ === void 0 || _.emit("network", l, "Script", "ok", JSON.stringify(j.meta)), y = !0;
5176
5176
  }
5177
5177
  };
5178
5178
  E[g] = S, b.src = l, document.body.appendChild(b), typeof t.timeout == "number" && (v = window.setTimeout(T, t.timeout));
@@ -5194,9 +5194,9 @@ function ajax(n, t, e, r, o) {
5194
5194
  var _ = this.status;
5195
5195
  if (_ === 0 || _ >= 200 && _ < 400) {
5196
5196
  R = !0, M();
5197
- var N = now(), z = N - s, J = parseHeaders(this.getAllResponseHeaders()), K = P.total, Q = {
5197
+ var N = now(), z = N - s, J = parseHeaders(this.getAllResponseHeaders()), G = P.total, Q = {
5198
5198
  body: this.response,
5199
- meta: { origin: u, source: l, requestTime: s, responseTime: N, costs: z, headers: J, size: K }
5199
+ meta: { origin: u, source: l, requestTime: s, responseTime: N, costs: z, headers: J, size: G }
5200
5200
  };
5201
5201
  e(Q), c(Q), (O = t.networkSubscribe) === null || O === void 0 || O.emit("network", l, "XMLHttpRequest", "ok", JSON.stringify(Q.meta));
5202
5202
  } else
@@ -7366,8 +7366,8 @@ function parsePBMModel(n) {
7366
7366
  break;
7367
7367
  }
7368
7368
  }
7369
- for (var A = n.chunks.sort(function(se, fe) {
7370
- return chunkOrder(se) - chunkOrder(fe);
7369
+ for (var A = n.chunks.sort(function(se, ce) {
7370
+ return chunkOrder(se) - chunkOrder(ce);
7371
7371
  }), m = [], E = 0, v = A; E < v.length; E++) {
7372
7372
  var h = v[E], y = parseFloorName(h.name);
7373
7373
  m[y] || (m[y] = []), m[y].push(h);
@@ -7381,11 +7381,11 @@ function parsePBMModel(n) {
7381
7381
  S += h.faces.indices.length;
7382
7382
  }
7383
7383
  for (var C = new Float32Array(S * 3), M = new Float32Array(S * 2), F = new Float32Array(S * 3), H = c ? new Float32Array(S) : void 0, w = [], I = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], P = 0, O = 0; O < T.length; O++) {
7384
- for (var _ = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], h = T[O], N = h.vertices.xyz, z = h.vertices.uvs, J = h.faces.indices, K = h.faces.normals, Q = h.vertices.marks, U = J.length, R = 0; R < U; R++) {
7385
- var q = J[R], X = C[P * 3 + R * 3] = N[q * 3], Z = C[P * 3 + R * 3 + 1] = N[q * 3 + 1], W = C[P * 3 + R * 3 + 2] = N[q * 3 + 2];
7384
+ for (var _ = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], h = T[O], N = h.vertices.xyz, z = h.vertices.uvs, J = h.faces.indices, G = h.faces.normals, Q = h.vertices.marks, U = J.length, R = 0; R < U; R++) {
7385
+ var q = J[R], K = C[P * 3 + R * 3] = N[q * 3], Y = C[P * 3 + R * 3 + 1] = N[q * 3 + 1], Z = C[P * 3 + R * 3 + 2] = N[q * 3 + 2];
7386
7386
  H && (H[P + R] = Q[q]), M[P * 2 + R * 2] = z[q * 2], M[P * 2 + R * 2 + 1] = z[q * 2 + 1];
7387
- var G = Math.floor(R / 3) * 3;
7388
- F[P * 3 + R * 3] = K[G], F[P * 3 + R * 3 + 1] = K[G + 1], F[P * 3 + R * 3 + 2] = K[G + 2], X < _[0] && (_[0] = X), Z < _[1] && (_[1] = Z), W < _[2] && (_[2] = W), X > _[3] && (_[3] = X), Z > _[4] && (_[4] = Z), W > _[5] && (_[5] = W);
7387
+ var te = Math.floor(R / 3) * 3;
7388
+ F[P * 3 + R * 3] = G[te], F[P * 3 + R * 3 + 1] = G[te + 1], F[P * 3 + R * 3 + 2] = G[te + 2], K < _[0] && (_[0] = K), Y < _[1] && (_[1] = Y), Z < _[2] && (_[2] = Z), K > _[3] && (_[3] = K), Y > _[4] && (_[4] = Y), Z > _[5] && (_[5] = Z);
7389
7389
  }
7390
7390
  _[0] < I[0] && (I[0] = _[0]), _[1] < I[1] && (I[1] = _[1]), _[2] < I[2] && (I[2] = _[2]), _[3] > I[3] && (I[3] = _[3]), _[4] > I[4] && (I[4] = _[4]), _[5] > I[5] && (I[5] = _[5]), w.push({
7391
7391
  materialIndex: O,
@@ -7396,7 +7396,7 @@ function parsePBMModel(n) {
7396
7396
  texture: (e = h.texture) !== null && e !== void 0 ? e : void 0
7397
7397
  }), P += U;
7398
7398
  }
7399
- var ne = {
7399
+ var j = {
7400
7400
  createAt: o,
7401
7401
  description: s,
7402
7402
  vertices: C,
@@ -7408,16 +7408,16 @@ function parsePBMModel(n) {
7408
7408
  groups: w,
7409
7409
  extents: I
7410
7410
  };
7411
- u.push(ne);
7411
+ u.push(j);
7412
7412
  } else {
7413
- for (var S = 0, $ = 0, R = 0; R < T.length; R++) {
7413
+ for (var S = 0, ee = 0, R = 0; R < T.length; R++) {
7414
7414
  var h = T[R];
7415
- $ += h.vertices.xyz.length / 3, S += h.faces.indices.length;
7415
+ ee += h.vertices.xyz.length / 3, S += h.faces.indices.length;
7416
7416
  }
7417
- for (var C = new Float32Array($ * 3), M = new Float32Array($ * 2), F = void 0, ee = new Float32Array($), re = new Uint32Array(S), H = c ? new Float32Array(S) : void 0, w = [], I = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], le = 0, P = 0, O = 0; O < T.length; O++) {
7417
+ for (var C = new Float32Array(ee * 3), M = new Float32Array(ee * 2), F = void 0, W = new Float32Array(ee), re = new Uint32Array(S), H = c ? new Float32Array(S) : void 0, w = [], I = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], le = 0, P = 0, O = 0; O < T.length; O++) {
7418
7418
  for (var _ = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], h = T[O], N = h.vertices.xyz, ie = h.vertices.marks, z = h.vertices.uvs, J = h.faces.indices, oe = N.length / 3, U = J.length, R = 0; R < oe; R++) {
7419
- var X = C[P * 3 + R * 3] = N[R * 3], Z = C[P * 3 + R * 3 + 1] = N[R * 3 + 1], W = C[P * 3 + R * 3 + 2] = N[R * 3 + 2];
7420
- H && (H[P + R] = ie[R]), M[P * 2 + R * 2] = z[R * 2], M[P * 2 + R * 2 + 1] = z[R * 2 + 1], ee[P + R] = b, X < _[0] && (_[0] = X), Z < _[1] && (_[1] = Z), W < _[2] && (_[2] = W), X > _[3] && (_[3] = X), Z > _[4] && (_[4] = Z), W > _[5] && (_[5] = W);
7419
+ var K = C[P * 3 + R * 3] = N[R * 3], Y = C[P * 3 + R * 3 + 1] = N[R * 3 + 1], Z = C[P * 3 + R * 3 + 2] = N[R * 3 + 2];
7420
+ H && (H[P + R] = ie[R]), M[P * 2 + R * 2] = z[R * 2], M[P * 2 + R * 2 + 1] = z[R * 2 + 1], W[P + R] = b, K < _[0] && (_[0] = K), Y < _[1] && (_[1] = Y), Z < _[2] && (_[2] = Z), K > _[3] && (_[3] = K), Y > _[4] && (_[4] = Y), Z > _[5] && (_[5] = Z);
7421
7421
  }
7422
7422
  _[0] < I[0] && (I[0] = _[0]), _[1] < I[1] && (I[1] = _[1]), _[2] < I[2] && (I[2] = _[2]), _[3] > I[3] && (I[3] = _[3]), _[4] > I[4] && (I[4] = _[4]), _[5] > I[5] && (I[5] = _[5]);
7423
7423
  for (var R = 0; R < U; R++)
@@ -7431,7 +7431,7 @@ function parsePBMModel(n) {
7431
7431
  texture: (r = h.texture) !== null && r !== void 0 ? r : void 0
7432
7432
  }), P += oe, le += U;
7433
7433
  }
7434
- var ne = {
7434
+ var j = {
7435
7435
  createAt: o,
7436
7436
  description: s,
7437
7437
  vertices: C,
@@ -7443,7 +7443,7 @@ function parsePBMModel(n) {
7443
7443
  groups: w,
7444
7444
  extents: I
7445
7445
  };
7446
- u.push(ne);
7446
+ u.push(j);
7447
7447
  }
7448
7448
  }
7449
7449
  return u;
@@ -7479,50 +7479,50 @@ function parse$4(n, t, e, r, o, s, u) {
7479
7479
  }
7480
7480
  p.add(I);
7481
7481
  for (var N = [], z = 0, J = F; z < J.length; z++) {
7482
- var _ = J[z], K = r[_.chunkName] || (_.texture ? pathJoin(e || "", _.texture) : void 0), Q = new PBMMeshMaterial(t ? "phong" : "basic");
7483
- Q.floorIndex = M, I.attributes.normal === void 0 && (Q.flatShading = !0), I.attributes._feature_id_rsmask && (Q.defines.USE_VERTEX_MARK = !0), N.push(Q), K ? (g++, h[K] ? h[K].push(Q) : h[K] = [Q]) : Q.color = new THREE.Color(16777215), p.add(Q);
7482
+ var _ = J[z], G = r[_.chunkName] || (_.texture ? pathJoin(e || "", _.texture) : void 0), Q = new PBMMeshMaterial(t ? "phong" : "basic");
7483
+ Q.floorIndex = M, I.attributes.normal === void 0 && (Q.flatShading = !0), I.attributes._feature_id_rsmask && (Q.defines.USE_VERTEX_MARK = !0), N.push(Q), G ? (g++, h[G] ? h[G].push(Q) : h[G] = [Q]) : Q.color = new THREE.Color(16777215), p.add(Q);
7484
7484
  }
7485
7485
  var U = new PBMMesh(I, N);
7486
7486
  U.name = "model_floor_" + M, U.userData.createAt = v, U.userData.description = y, U.matrix.compose(U.position, U.quaternion, U.scale), U.matrixAutoUpdate = !1, U.frustumCulled = !1, c = v, f = y, d.push(U);
7487
7487
  }
7488
- var q = function(X) {
7489
- X = autoRestImageOptionsByTextureLength(X, g);
7490
- for (var Z = [], W = function(ee) {
7488
+ var q = function(K) {
7489
+ K = autoRestImageOptionsByTextureLength(K, g);
7490
+ for (var Y = [], Z = function(W) {
7491
7491
  var re = null;
7492
- ee in s && (re = s[ee]), re || (re = loadTexture$1(ee, X, u)), Z.push(re.then(function(le) {
7493
- for (var ie = 0, oe = h[ee]; ie < oe.length; ie++) {
7492
+ W in s && (re = s[W]), re || (re = loadTexture$1(W, K, u)), Y.push(re.then(function(le) {
7493
+ for (var ie = 0, oe = h[W]; ie < oe.length; ie++) {
7494
7494
  var se = oe[ie];
7495
7495
  se.map && (p.delete(se.map), se.map.dispose()), se.map = le, p.add(le);
7496
7496
  }
7497
7497
  return le;
7498
7498
  }).catch(function() {
7499
- for (var le = 0, ie = h[ee]; le < ie.length; le++) {
7499
+ for (var le = 0, ie = h[W]; le < ie.length; le++) {
7500
7500
  var oe = ie[le];
7501
7501
  oe.map && (p.delete(oe.map), oe.map.dispose()), oe.map = null, oe.color = new THREE.Color(16777215);
7502
7502
  }
7503
7503
  return null;
7504
7504
  }));
7505
- }, G = 0, ne = Object.keys(h); G < ne.length; G++) {
7506
- var $ = ne[G];
7507
- W($);
7508
- }
7509
- for (var $ in s)
7510
- delete s[$];
7511
- return Promise.all(Z).then(function(ee) {
7512
- return ee.filter(function(re) {
7505
+ }, te = 0, j = Object.keys(h); te < j.length; te++) {
7506
+ var ee = j[te];
7507
+ Z(ee);
7508
+ }
7509
+ for (var ee in s)
7510
+ delete s[ee];
7511
+ return Promise.all(Y).then(function(W) {
7512
+ return W.filter(function(re) {
7513
7513
  return re;
7514
7514
  });
7515
7515
  });
7516
7516
  };
7517
- return q(o).then(function(X) {
7517
+ return q(o).then(function(K) {
7518
7518
  return {
7519
7519
  createAt: c,
7520
7520
  description: f,
7521
7521
  objects: d,
7522
- textures: X,
7522
+ textures: K,
7523
7523
  dispose: function() {
7524
- p.forEach(function(Z) {
7525
- Z.dispose();
7524
+ p.forEach(function(Y) {
7525
+ Y.dispose();
7526
7526
  }), p.clear();
7527
7527
  }
7528
7528
  };
@@ -8479,8 +8479,8 @@ function parse$3(n, t, e, r, o) {
8479
8479
  var _ = O[P], N = parseMaterial(_, t, e || "", r, f, o, A, l, m), z = N.material, J = N.textureReady;
8480
8480
  u.push(J), I.push(z);
8481
8481
  }
8482
- var K = new PBMMesh(w, I);
8483
- K.name = "chunk_" + H, K.matrix.compose(K.position, K.quaternion, K.scale), K.matrixAutoUpdate = !1, K.frustumCulled = !1, F.add(K);
8482
+ var G = new PBMMesh(w, I);
8483
+ G.name = "chunk_" + H, G.matrix.compose(G.position, G.quaternion, G.scale), G.matrixAutoUpdate = !1, G.frustumCulled = !1, F.add(G);
8484
8484
  }
8485
8485
  F.name = b, s.push(F);
8486
8486
  }
@@ -8917,37 +8917,37 @@ var Parser = (
8917
8917
  Promise.all(g),
8918
8918
  Promise.all(A)
8919
8919
  ]).then(function(C) {
8920
- for (var M = C[0], F = C[1], H = C[2], w = C[3], I = C[4], P = [], O = function(J, K) {
8921
- var Q = M[J], U = F[J], q = H[J], X = w[J], Z = I[J];
8920
+ for (var M = C[0], F = C[1], H = C[2], w = C[3], I = C[4], P = [], O = function(J, G) {
8921
+ var Q = M[J], U = F[J], q = H[J], K = w[J], Y = I[J];
8922
8922
  if (Q === void 0)
8923
8923
  return "continue";
8924
8924
  Q.updateMatrix(), Q.matrixAutoUpdate = !0;
8925
- var W = void 0;
8926
- switch (PATH_PROPERTIES[Z.path]) {
8925
+ var Z = void 0;
8926
+ switch (PATH_PROPERTIES[Y.path]) {
8927
8927
  case PATH_PROPERTIES.weights:
8928
- W = THREE.NumberKeyframeTrack;
8928
+ Z = THREE.NumberKeyframeTrack;
8929
8929
  break;
8930
8930
  case PATH_PROPERTIES.rotation:
8931
- W = THREE.QuaternionKeyframeTrack;
8931
+ Z = THREE.QuaternionKeyframeTrack;
8932
8932
  break;
8933
8933
  case PATH_PROPERTIES.position:
8934
8934
  case PATH_PROPERTIES.scale:
8935
8935
  default:
8936
- W = THREE.VectorKeyframeTrack;
8936
+ Z = THREE.VectorKeyframeTrack;
8937
8937
  break;
8938
8938
  }
8939
- var G = Q.name ? Q.name : Q.uuid, ne = X.interpolation !== void 0 ? INTERPOLATION[X.interpolation] : THREE.InterpolateLinear, $ = [];
8940
- PATH_PROPERTIES[Z.path] === PATH_PROPERTIES.weights ? Q.traverse(function(fe) {
8941
- fe.morphTargetInfluences && $.push(fe.name ? fe.name : fe.uuid);
8942
- }) : $.push(G);
8943
- var ee = q.array;
8939
+ var te = Q.name ? Q.name : Q.uuid, j = K.interpolation !== void 0 ? INTERPOLATION[K.interpolation] : THREE.InterpolateLinear, ee = [];
8940
+ PATH_PROPERTIES[Y.path] === PATH_PROPERTIES.weights ? Q.traverse(function(ce) {
8941
+ ce.morphTargetInfluences && ee.push(ce.name ? ce.name : ce.uuid);
8942
+ }) : ee.push(te);
8943
+ var W = q.array;
8944
8944
  if (q.normalized) {
8945
- for (var re = getNormalizedComponentScale(ee.constructor), le = new Float32Array(ee.length), ie = 0, oe = ee.length; ie < oe; ie++)
8946
- le[ie] = ee[ie] * re;
8947
- ee = le;
8945
+ for (var re = getNormalizedComponentScale(W.constructor), le = new Float32Array(W.length), ie = 0, oe = W.length; ie < oe; ie++)
8946
+ le[ie] = W[ie] * re;
8947
+ W = le;
8948
8948
  }
8949
- for (var ie = 0, oe = $.length; ie < oe; ie++) {
8950
- var se = new W($[ie] + "." + PATH_PROPERTIES[Z.path], U.array, ee, ne);
8949
+ for (var ie = 0, oe = ee.length; ie < oe; ie++) {
8950
+ var se = new Z(ee[ie] + "." + PATH_PROPERTIES[Y.path], U.array, W, j);
8951
8951
  P.push(se);
8952
8952
  }
8953
8953
  }, _ = 0, N = M.length; _ < N; _++)
@@ -11636,8 +11636,8 @@ var flrm = /* @__PURE__ */ hMap(flt, 9, 1), fdrm = /* @__PURE__ */ hMap(fdt, 5,
11636
11636
  F[w++] = N;
11637
11637
  }
11638
11638
  }
11639
- var J = F.subarray(0, R), K = F.subarray(R);
11640
- m = max(J), E = max(K), g = hMap(J, m, 1), A = hMap(K, E, 1);
11639
+ var J = F.subarray(0, R), G = F.subarray(R);
11640
+ m = max(J), E = max(G), g = hMap(J, m, 1), A = hMap(G, E, 1);
11641
11641
  } else
11642
11642
  err(1);
11643
11643
  else {
@@ -11656,42 +11656,42 @@ var flrm = /* @__PURE__ */ hMap(flt, 9, 1), fdrm = /* @__PURE__ */ hMap(fdt, 5,
11656
11656
  }
11657
11657
  l && f(p + 131072);
11658
11658
  for (var Q = (1 << m) - 1, U = (1 << E) - 1, q = h; ; q = h) {
11659
- var N = g[bits16(n, h) & Q], X = N >> 4;
11659
+ var N = g[bits16(n, h) & Q], K = N >> 4;
11660
11660
  if (h += N & 15, h > v) {
11661
11661
  c && err(0);
11662
11662
  break;
11663
11663
  }
11664
- if (N || err(2), X < 256)
11665
- e[p++] = X;
11666
- else if (X == 256) {
11664
+ if (N || err(2), K < 256)
11665
+ e[p++] = K;
11666
+ else if (K == 256) {
11667
11667
  q = h, g = null;
11668
11668
  break;
11669
11669
  } else {
11670
- var Z = X - 254;
11671
- if (X > 264) {
11672
- var w = X - 257, W = fleb[w];
11673
- Z = bits(n, h, (1 << W) - 1) + fl[w], h += W;
11674
- }
11675
- var G = A[bits16(n, h) & U], ne = G >> 4;
11676
- G || err(3), h += G & 15;
11677
- var K = fd[ne];
11678
- if (ne > 3) {
11679
- var W = fdeb[ne];
11680
- K += bits16(n, h) & (1 << W) - 1, h += W;
11670
+ var Y = K - 254;
11671
+ if (K > 264) {
11672
+ var w = K - 257, Z = fleb[w];
11673
+ Y = bits(n, h, (1 << Z) - 1) + fl[w], h += Z;
11674
+ }
11675
+ var te = A[bits16(n, h) & U], j = te >> 4;
11676
+ te || err(3), h += te & 15;
11677
+ var G = fd[j];
11678
+ if (j > 3) {
11679
+ var Z = fdeb[j];
11680
+ G += bits16(n, h) & (1 << Z) - 1, h += Z;
11681
11681
  }
11682
11682
  if (h > v) {
11683
11683
  c && err(0);
11684
11684
  break;
11685
11685
  }
11686
11686
  l && f(p + 131072);
11687
- var $ = p + Z;
11688
- if (p < K) {
11689
- var ee = s - K, re = Math.min(K, $);
11690
- for (ee + p < 0 && err(3); p < re; ++p)
11691
- e[p] = r[ee + p];
11687
+ var ee = p + Y;
11688
+ if (p < G) {
11689
+ var W = s - G, re = Math.min(G, ee);
11690
+ for (W + p < 0 && err(3); p < re; ++p)
11691
+ e[p] = r[W + p];
11692
11692
  }
11693
- for (; p < $; ++p)
11694
- e[p] = e[p - K];
11693
+ for (; p < ee; ++p)
11694
+ e[p] = e[p - G];
11695
11695
  }
11696
11696
  }
11697
11697
  t.l = g, t.p = q, t.b = p, t.f = d, g && (d = 1, t.m = m, t.d = A, t.n = E);
@@ -13376,15 +13376,15 @@ function loadX3p(n, t) {
13376
13376
  });
13377
13377
  }
13378
13378
  function parse$1(n, t) {
13379
- for (var e, r, o, s, u, l, c, f, d, h, p, g, A, m, E, v, y, b, T, S, R, C, M, F, H, w, I, P, O, _, N, z, J, K, Q, U, q, X, Z, W, G, ne, $, ee, re, le, ie, oe, se, fe, he, Re, ce, Ce, j = unzipSync(n), te = "", V = null, be = 0, de = Object.keys(j); be < de.length; be++) {
13380
- var ve = de[be];
13381
- /(^|\/)main\.xml$/i.test(ve) && (V = j[ve], te = ve.slice(0, ve.lastIndexOf("/") + 1));
13379
+ for (var e, r, o, s, u, l, c, f, d, h, p, g, A, m, E, v, y, b, T, S, R, C, M, F, H, w, I, P, O, _, N, z, J, G, Q, U, q, K, Y, Z, te, j, ee, W, re, le, ie, oe, se, ce, ve, Te, fe, me, X = unzipSync(n), ne = "", V = null, Ee = 0, de = Object.keys(X); Ee < de.length; Ee++) {
13380
+ var pe = de[Ee];
13381
+ /(^|\/)main\.xml$/i.test(pe) && (V = X[pe], ne = pe.slice(0, pe.lastIndexOf("/") + 1));
13382
13382
  }
13383
13383
  if (!V)
13384
13384
  throw new Error("X3p: main.xml not found.");
13385
13385
  if (typeof DOMParser == "undefined")
13386
13386
  throw new Error("X3p: DOMParser not found.");
13387
- var Ve = (e = t.color) !== null && e !== void 0 ? e : new THREE.Color(10066329), rt = new DOMParser(), We = decodeText(V), me = rt.parseFromString(We, "text/xml"), ae = me.querySelector("Record1 Axes"), pe = {
13387
+ var Ne = (e = t.color) !== null && e !== void 0 ? e : new THREE.Color(10066329), rt = new DOMParser(), Ye = decodeText(V), ge = rt.parseFromString(Ye, "text/xml"), ae = ge.querySelector("Record1 Axes"), he = {
13388
13388
  x: {
13389
13389
  type: (s = (o = (r = ae == null ? void 0 : ae.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",
13390
13390
  dataType: (c = (l = (u = ae == null ? void 0 : ae.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",
@@ -13403,34 +13403,34 @@ function parse$1(n, t) {
13403
13403
  increment: Number((O = (P = ae == null ? void 0 : ae.querySelector("CZ Increment")) === null || P === void 0 ? void 0 : P.textContent) !== null && O !== void 0 ? O : "1"),
13404
13404
  offset: Number((N = (_ = ae == null ? void 0 : ae.querySelector("CZ Offset")) === null || _ === void 0 ? void 0 : _.textContent) !== null && N !== void 0 ? N : "0")
13405
13405
  }
13406
- }, we = null, Se = me.querySelector("Record1 Axes Rotation");
13407
- Se && (we = new THREE.Matrix3(), we.set(Number((J = (z = Se.querySelector("r11")) === null || z === void 0 ? void 0 : z.textContent) !== null && J !== void 0 ? J : 0), Number((Q = (K = Se.querySelector("r12")) === null || K === void 0 ? void 0 : K.textContent) !== null && Q !== void 0 ? Q : 0), Number((q = (U = Se.querySelector("r13")) === null || U === void 0 ? void 0 : U.textContent) !== null && q !== void 0 ? q : 0), Number((Z = (X = Se.querySelector("r21")) === null || X === void 0 ? void 0 : X.textContent) !== null && Z !== void 0 ? Z : 0), Number((G = (W = Se.querySelector("r22")) === null || W === void 0 ? void 0 : W.textContent) !== null && G !== void 0 ? G : 0), Number(($ = (ne = Se.querySelector("r23")) === null || ne === void 0 ? void 0 : ne.textContent) !== null && $ !== void 0 ? $ : 0), Number((re = (ee = Se.querySelector("r31")) === null || ee === void 0 ? void 0 : ee.textContent) !== null && re !== void 0 ? re : 0), Number((ie = (le = Se.querySelector("r32")) === null || le === void 0 ? void 0 : le.textContent) !== null && ie !== void 0 ? ie : 0), Number((se = (oe = Se.querySelector("r33")) === null || oe === void 0 ? void 0 : oe.textContent) !== null && se !== void 0 ? se : 0)));
13408
- var Pe = (fe = me.querySelector("Record3 DataLink PointDataLink")) === null || fe === void 0 ? void 0 : fe.textContent;
13409
- if (typeof Pe != "string")
13406
+ }, we = null, xe = ge.querySelector("Record1 Axes Rotation");
13407
+ xe && (we = new THREE.Matrix3(), we.set(Number((J = (z = xe.querySelector("r11")) === null || z === void 0 ? void 0 : z.textContent) !== null && J !== void 0 ? J : 0), Number((Q = (G = xe.querySelector("r12")) === null || G === void 0 ? void 0 : G.textContent) !== null && Q !== void 0 ? Q : 0), Number((q = (U = xe.querySelector("r13")) === null || U === void 0 ? void 0 : U.textContent) !== null && q !== void 0 ? q : 0), Number((Y = (K = xe.querySelector("r21")) === null || K === void 0 ? void 0 : K.textContent) !== null && Y !== void 0 ? Y : 0), Number((te = (Z = xe.querySelector("r22")) === null || Z === void 0 ? void 0 : Z.textContent) !== null && te !== void 0 ? te : 0), Number((ee = (j = xe.querySelector("r23")) === null || j === void 0 ? void 0 : j.textContent) !== null && ee !== void 0 ? ee : 0), Number((re = (W = xe.querySelector("r31")) === null || W === void 0 ? void 0 : W.textContent) !== null && re !== void 0 ? re : 0), Number((ie = (le = xe.querySelector("r32")) === null || le === void 0 ? void 0 : le.textContent) !== null && ie !== void 0 ? ie : 0), Number((se = (oe = xe.querySelector("r33")) === null || oe === void 0 ? void 0 : oe.textContent) !== null && se !== void 0 ? se : 0)));
13408
+ var He = (ce = ge.querySelector("Record3 DataLink PointDataLink")) === null || ce === void 0 ? void 0 : ce.textContent;
13409
+ if (typeof He != "string")
13410
13410
  throw new Error("X3p: PointDataLink not found.");
13411
- Pe = pathJoin(te, Pe);
13412
- var Le = j[Pe];
13413
- if (!Le)
13414
- throw new Error("X3p: ".concat(Le, " not found."));
13415
- for (var Ae = getPointArray(Le.buffer, pe.z.dataType), Te = Number((Re = (he = me.querySelector("Record3 MatrixDimension SizeX")) === null || he === void 0 ? void 0 : he.textContent) !== null && Re !== void 0 ? Re : "0"), Ie = Number((Ce = (ce = me.querySelector("Record3 MatrixDimension SizeY")) === null || ce === void 0 ? void 0 : ce.textContent) !== null && Ce !== void 0 ? Ce : "0"), Be = Math.floor(Te - 1), qe = Math.floor(Ie - 1), ke = Be + 1, Ne = qe + 1, _e = new Float32Array(ke * Ne * 3), Ue = new Float32Array(ke * Ne * 2), ze = new Uint32Array(Be * qe * 6), je = new THREE.Box3(), xe = 0; xe < Ne; xe++)
13416
- for (var Oe = xe * pe.y.increment + pe.y.offset, Me = 0; Me < ke; Me++) {
13417
- var Fe = xe * ke + Me, He = Me * pe.x.increment + pe.x.offset, Ge = Ae[Fe], Ze = !isNaN(Ge), Ye = Ze ? Ge : NaN;
13418
- _vector.set(He, -Oe, Ye), we && _vector.applyMatrix3(we), Ze && je.expandByPoint(_vector), _e[Fe * 3 + 0] = _vector.x, _e[Fe * 3 + 1] = _vector.y, _e[Fe * 3 + 2] = _vector.z, Ue[Fe * 2 + 0] = Me / Be, Ue[Fe * 2 + 1] = 1 - xe / qe;
13419
- }
13420
- for (var xe = 0; xe < qe; xe++)
13421
- for (var Me = 0; Me < Be; Me++) {
13422
- var Qe = Me + ke * xe, ye = Me + ke * (xe + 1), wt = Me + 1 + ke * (xe + 1), vt = Me + 1 + ke * xe, at = (xe * Be + Me) * 6;
13423
- ze[at + 0] = Qe, ze[at + 1] = ye, ze[at + 2] = vt, ze[at + 3] = ye, ze[at + 4] = wt, ze[at + 5] = vt;
13424
- }
13425
- var Je = new THREE.BufferGeometry();
13426
- Je.setAttribute("position", new THREE.BufferAttribute(_e, 3)), Je.setAttribute("uv", new THREE.BufferAttribute(Ue, 2)), Je.setIndex(new THREE.BufferAttribute(ze, 1)), (!Je.groups || Je.groups.length === 0) && Je.addGroup(0, Je.index ? Je.index.count : Je.attributes.position.count, 0), Je.boundingBox = je;
13427
- var ft = new PBMMeshMaterial(t.light ? "phong" : "basic");
13428
- ft.flatShading = !0, ft.color.copy(Ve);
13429
- var nt = new PBMMesh(Je, [ft]);
13411
+ He = pathJoin(ne, He);
13412
+ var _e = X[He];
13413
+ if (!_e)
13414
+ throw new Error("X3p: ".concat(_e, " not found."));
13415
+ for (var be = getPointArray(_e.buffer, he.z.dataType), Me = Number((Te = (ve = ge.querySelector("Record3 MatrixDimension SizeX")) === null || ve === void 0 ? void 0 : ve.textContent) !== null && Te !== void 0 ? Te : "0"), Ie = Number((me = (fe = ge.querySelector("Record3 MatrixDimension SizeY")) === null || fe === void 0 ? void 0 : fe.textContent) !== null && me !== void 0 ? me : "0"), Be = Math.floor(Me - 1), ze = Math.floor(Ie - 1), Ge = Be + 1, Fe = ze + 1, Ve = new Float32Array(Ge * Fe * 3), $e = new Float32Array(Ge * Fe * 2), Pe = new Uint32Array(Be * ze * 6), je = new THREE.Box3(), Re = 0; Re < Fe; Re++)
13416
+ for (var We = Re * he.y.increment + he.y.offset, Se = 0; Se < Ge; Se++) {
13417
+ var Oe = Re * Ge + Se, Le = Se * he.x.increment + he.x.offset, qe = be[Oe], nt = !isNaN(qe), Ze = nt ? qe : NaN;
13418
+ _vector.set(Le, -We, Ze), we && _vector.applyMatrix3(we), nt && je.expandByPoint(_vector), Ve[Oe * 3 + 0] = _vector.x, Ve[Oe * 3 + 1] = _vector.y, Ve[Oe * 3 + 2] = _vector.z, $e[Oe * 2 + 0] = Se / Be, $e[Oe * 2 + 1] = 1 - Re / ze;
13419
+ }
13420
+ for (var Re = 0; Re < ze; Re++)
13421
+ for (var Se = 0; Se < Be; Se++) {
13422
+ var ut = Se + Ge * Re, Ue = Se + Ge * (Re + 1), Ce = Se + 1 + Ge * (Re + 1), yt = Se + 1 + Ge * Re, it = (Re * Be + Se) * 6;
13423
+ Pe[it + 0] = ut, Pe[it + 1] = Ue, Pe[it + 2] = yt, Pe[it + 3] = Ue, Pe[it + 4] = Ce, Pe[it + 5] = yt;
13424
+ }
13425
+ var Ke = new THREE.BufferGeometry();
13426
+ Ke.setAttribute("position", new THREE.BufferAttribute(Ve, 3)), Ke.setAttribute("uv", new THREE.BufferAttribute($e, 2)), Ke.setIndex(new THREE.BufferAttribute(Pe, 1)), (!Ke.groups || Ke.groups.length === 0) && Ke.addGroup(0, Ke.index ? Ke.index.count : Ke.attributes.position.count, 0), Ke.boundingBox = je;
13427
+ var lt = new PBMMeshMaterial(t.light ? "phong" : "basic");
13428
+ lt.flatShading = !0, lt.color.copy(Ne);
13429
+ var ft = new PBMMesh(Ke, [lt]);
13430
13430
  return {
13431
- object: nt,
13431
+ object: ft,
13432
13432
  dispose: function() {
13433
- Je.dispose(), ft.dispose();
13433
+ Ke.dispose(), lt.dispose();
13434
13434
  }
13435
13435
  };
13436
13436
  }
@@ -14002,16 +14002,16 @@ var BVHVector3 = (
14002
14002
  return I[z] - I[N];
14003
14003
  };
14004
14004
  function _(N) {
14005
- var z = N.startIndex, J = N.endIndex, K = N.extents;
14006
- I[0] = K[3] - K[0], I[1] = K[4] - K[1], I[2] = K[5] - K[2], P.sort(O);
14005
+ var z = N.startIndex, J = N.endIndex, G = N.extents;
14006
+ I[0] = G[3] - G[0], I[1] = G[4] - G[1], I[2] = G[5] - G[2], P.sort(O);
14007
14007
  for (var Q = 0; Q < 3; Q++) {
14008
- for (var U = P[Q], q = K[U] + K[U + 3], X = z, Z = J - 1, W = -1, G = void 0; X <= Z; )
14009
- W === -1 ? (G = u[X], l[G * 6 + U] + l[G * 6 + U + 3] < q ? X++ : W = G) : (G = u[Z], l[G * 6 + U] + l[G * 6 + U + 3] >= q || (u[X] = G, u[Z] = W, W = -1, X++), Z--);
14010
- if (X > z && X < J) {
14011
- var ne = new BVHNode(++d, calcExtents(u, l, z, X, EPSILON$1), z, X, N.deepth + 1);
14012
- ne.deepth < r && ne.endIndex - ne.startIndex > e && (c[f++] = ne);
14013
- var $ = new BVHNode(++d, calcExtents(u, l, X, J, EPSILON$1), X, J, N.deepth + 1);
14014
- $.deepth < r && $.endIndex - $.startIndex > e && (c[f++] = $), N.node0 = ne, N.node1 = $, N.startIndex = 0, N.endIndex = 0;
14008
+ for (var U = P[Q], q = G[U] + G[U + 3], K = z, Y = J - 1, Z = -1, te = void 0; K <= Y; )
14009
+ Z === -1 ? (te = u[K], l[te * 6 + U] + l[te * 6 + U + 3] < q ? K++ : Z = te) : (te = u[Y], l[te * 6 + U] + l[te * 6 + U + 3] >= q || (u[K] = te, u[Y] = Z, Z = -1, K++), Y--);
14010
+ if (K > z && K < J) {
14011
+ var j = new BVHNode(++d, calcExtents(u, l, z, K, EPSILON$1), z, K, N.deepth + 1);
14012
+ j.deepth < r && j.endIndex - j.startIndex > e && (c[f++] = j);
14013
+ var ee = new BVHNode(++d, calcExtents(u, l, K, J, EPSILON$1), K, J, N.deepth + 1);
14014
+ ee.deepth < r && ee.endIndex - ee.startIndex > e && (c[f++] = ee), N.node0 = j, N.node1 = ee, N.startIndex = 0, N.endIndex = 0;
14015
14015
  break;
14016
14016
  }
14017
14017
  }
@@ -14037,14 +14037,14 @@ var BVHVector3 = (
14037
14037
  }, t.prototype.intersectRay = function(e, r, o, s) {
14038
14038
  for (var u = this.offsetArray, l = this.rootNodePacked, c = new Float32Array(l), f = new Uint32Array(l), d = new Uint16Array(l), h = new BVHVector3(1 / r.x, 1 / r.y, 1 / r.z), p = [0], g, A, m, E; (g = p.pop()) !== void 0; )
14039
14039
  if (E = g * BYTES_PER_NODE / 4, intersectNodeBox(e, h, c[E], c[E + 1], c[E + 2], c[E + 3], c[E + 4], c[E + 5])) {
14040
- for (var v = f[E + 6], y = f[E + 7], b = void 0, T = void 0, S = void 0, R = e.x, C = e.y, M = e.z, F = r.x, H = r.y, w = r.z, I = void 0, P = void 0, O = void 0, _ = void 0, N = void 0, z = void 0, J = void 0, K = void 0, Q = void 0, U = void 0, q = void 0, X = void 0, Z = void 0, W = void 0, G = void 0, ne = void 0, $ = void 0, ee = void 0, re = void 0, le = void 0, ie = void 0, oe = void 0, se = void 0, fe = void 0, he = void 0, Re = void 0, ce = void 0; v < y; v++) {
14041
- if (b = u[v], T = b * 3, this.getPositionByIndex(T, scratchVector3$6), I = scratchVector3$6.x, P = scratchVector3$6.y, O = scratchVector3$6.z, this.getPositionByIndex(T + 1, scratchVector3$6), _ = scratchVector3$6.x, N = scratchVector3$6.y, z = scratchVector3$6.z, this.getPositionByIndex(T + 2, scratchVector3$6), J = scratchVector3$6.x, K = scratchVector3$6.y, Q = scratchVector3$6.z, U = _ - I, q = N - P, X = z - O, Z = J - I, W = K - P, G = Q - O, ne = q * G - X * W, $ = X * Z - U * G, ee = U * W - q * Z, se = F * ne + H * $ + w * ee, se > 0)
14040
+ for (var v = f[E + 6], y = f[E + 7], b = void 0, T = void 0, S = void 0, R = e.x, C = e.y, M = e.z, F = r.x, H = r.y, w = r.z, I = void 0, P = void 0, O = void 0, _ = void 0, N = void 0, z = void 0, J = void 0, G = void 0, Q = void 0, U = void 0, q = void 0, K = void 0, Y = void 0, Z = void 0, te = void 0, j = void 0, ee = void 0, W = void 0, re = void 0, le = void 0, ie = void 0, oe = void 0, se = void 0, ce = void 0, ve = void 0, Te = void 0, fe = void 0; v < y; v++) {
14041
+ if (b = u[v], T = b * 3, this.getPositionByIndex(T, scratchVector3$6), I = scratchVector3$6.x, P = scratchVector3$6.y, O = scratchVector3$6.z, this.getPositionByIndex(T + 1, scratchVector3$6), _ = scratchVector3$6.x, N = scratchVector3$6.y, z = scratchVector3$6.z, this.getPositionByIndex(T + 2, scratchVector3$6), J = scratchVector3$6.x, G = scratchVector3$6.y, Q = scratchVector3$6.z, U = _ - I, q = N - P, K = z - O, Y = J - I, Z = G - P, te = Q - O, j = q * te - K * Z, ee = K * Y - U * te, W = U * Z - q * Y, se = F * j + H * ee + w * W, se > 0)
14042
14042
  oe = 1;
14043
14043
  else if (se < 0)
14044
14044
  oe = -1, se = -se;
14045
14045
  else
14046
14046
  continue;
14047
- re = R - I, le = C - P, ie = M - O, fe = oe * (F * (le * G - ie * W) + H * (ie * Z - re * G) + w * (re * W - le * Z)), !(fe < 0) && (he = oe * (F * (q * ie - X * le) + H * (X * re - U * ie) + w * (U * le - q * re)), !(he < 0) && (fe + he > se || (Re = -oe * (re * ne + le * $ + ie * ee), !(Re < 0) && (ce = Re / se, s.push(new BVHIntersect([I, P, O, _, N, z, J, K, Q], [R + F * ce, C + H * ce, M + w * ce], b))))));
14047
+ re = R - I, le = C - P, ie = M - O, ce = oe * (F * (le * te - ie * Z) + H * (ie * Y - re * te) + w * (re * Z - le * Y)), !(ce < 0) && (ve = oe * (F * (q * ie - K * le) + H * (K * re - U * ie) + w * (U * le - q * re)), !(ve < 0) && (ce + ve > se || (Te = -oe * (re * j + le * ee + ie * W), !(Te < 0) && (fe = Te / se, s.push(new BVHIntersect([I, P, O, _, N, z, J, G, Q], [R + F * fe, C + H * fe, M + w * fe], b))))));
14048
14048
  }
14049
14049
  E = g * BYTES_PER_NODE / 2, A = d[E + 16], m = d[E + 17], A && p.push(A), m && p.push(m);
14050
14050
  }
@@ -14096,8 +14096,8 @@ var EPSILON = 1e-6, ORDER_AXISES = ["x", "y", "z"], scratchVector3$5 = new BVHVe
14096
14096
  function F(H) {
14097
14097
  var w = H.startIndex, I = H.endIndex, P = H.extents;
14098
14098
  R[0] = P[3] - P[0], R[1] = P[4] - P[1], R[2] = P[5] - P[2];
14099
- for (var O = C.sort(M)[0], _ = ORDER_AXISES[O], N = (P[O] + P[O + 3]) / 2, z = w, J = I - 1, K = -1, Q; z <= J; )
14100
- K === -1 ? (Q = l[z], s(Q, scratchVector3$5), scratchVector3$5[_] < N ? z++ : K = Q) : (Q = l[J], s(Q, scratchVector3$5), scratchVector3$5[_] >= N || (l[z] = Q, l[J] = K, K = -1, z++), J--);
14099
+ for (var O = C.sort(M)[0], _ = ORDER_AXISES[O], N = (P[O] + P[O + 3]) / 2, z = w, J = I - 1, G = -1, Q; z <= J; )
14100
+ G === -1 ? (Q = l[z], s(Q, scratchVector3$5), scratchVector3$5[_] < N ? z++ : G = Q) : (Q = l[J], s(Q, scratchVector3$5), scratchVector3$5[_] >= N || (l[z] = Q, l[J] = G, G = -1, z++), J--);
14101
14101
  if (z > w) {
14102
14102
  var U = P.slice();
14103
14103
  U[O + 3] = N + EPSILON;
@@ -14105,10 +14105,10 @@ var EPSILON = 1e-6, ORDER_AXISES = ["x", "y", "z"], scratchVector3$5 = new BVHVe
14105
14105
  q.deepth < r && q.endIndex - q.startIndex > e && (c[f++] = q), H.node0 = q;
14106
14106
  }
14107
14107
  if (I > z) {
14108
- var X = P.slice();
14109
- X[O] = N - EPSILON;
14110
- var Z = new BVHNode(++d, X, z, I, H.deepth + 1);
14111
- Z.deepth < r && Z.endIndex - Z.startIndex > e && (c[f++] = Z), H.node1 = Z;
14108
+ var K = P.slice();
14109
+ K[O] = N - EPSILON;
14110
+ var Y = new BVHNode(++d, K, z, I, H.deepth + 1);
14111
+ Y.deepth < r && Y.endIndex - Y.startIndex > e && (c[f++] = Y), H.node1 = Y;
14112
14112
  }
14113
14113
  H.startIndex = 0, H.endIndex = 0;
14114
14114
  }
@@ -16240,21 +16240,21 @@ var scratchVector3$3 = new THREE.Vector3(), scratchSphereBoundingVolume = new Sp
16240
16240
  maxScreenSpaceError: m.maxScreenSpaceError,
16241
16241
  memoryAdjustedOverflow: m.memoryAdjustedOverflow,
16242
16242
  memoryAdjustedScreenSpaceError: m.memoryAdjustedScreenSpaceError
16243
- }, M = m.cacheCameras.map(function(j) {
16244
- return j.updateProjectionMatrix(), __assign(__assign({}, C), { camera: {
16243
+ }, M = m.cacheCameras.map(function(X) {
16244
+ return X.updateProjectionMatrix(), __assign(__assign({}, C), { camera: {
16245
16245
  type: r.type,
16246
- position: new THREE.Vector3().copy(j.position),
16247
- direction: j.getWorldDirection(new THREE.Vector3()),
16248
- up: new THREE.Vector3().copy(j.up),
16249
- projectionMatrix: j.projectionMatrix.clone(),
16250
- visible: j.visible,
16246
+ position: new THREE.Vector3().copy(X.position),
16247
+ direction: X.getWorldDirection(new THREE.Vector3()),
16248
+ up: new THREE.Vector3().copy(X.up),
16249
+ projectionMatrix: X.projectionMatrix.clone(),
16250
+ visible: X.visible,
16251
16251
  refine: !0
16252
- }, cullingVolume: new CullingVolume().setFromCamera(j) });
16252
+ }, cullingVolume: new CullingVolume().setFromCamera(X) });
16253
16253
  });
16254
- if (this.updateWorldMatrix(!0, !1), this.tileset.transform.equals(this.matrixWorld) || (this.tileset.transform.copy(this.matrixWorld), A = !0), this.autoRefine && this.tileset.update(C, M), this.refined = !0, this.refineProgress[0] = 0, this.refineProgress[1] = 0, this.tileset.needsRefinedTiles.forEach(function(j) {
16255
- if (c.refineProgress[1]++, j.content) {
16256
- var te = j.content.loadState;
16257
- if (te === "UNLOADED" || te === "LOADING") {
16254
+ if (this.updateWorldMatrix(!0, !1), this.tileset.transform.equals(this.matrixWorld) || (this.tileset.transform.copy(this.matrixWorld), A = !0), this.autoRefine && this.tileset.update(C, M), this.refined = !0, this.refineProgress[0] = 0, this.refineProgress[1] = 0, this.tileset.needsRefinedTiles.forEach(function(X) {
16255
+ if (c.refineProgress[1]++, X.content) {
16256
+ var ne = X.content.loadState;
16257
+ if (ne === "UNLOADED" || ne === "LOADING") {
16258
16258
  c.refined = !1;
16259
16259
  return;
16260
16260
  }
@@ -16263,22 +16263,22 @@ var scratchVector3$3 = new THREE.Vector3(), scratchSphereBoundingVolume = new Sp
16263
16263
  }), this.loaded === !1 && this.autoRefine) {
16264
16264
  this.loaded = !0;
16265
16265
  var F = !1;
16266
- this.tileset.needsRefinedTiles.forEach(function(j) {
16267
- if (c.loaded !== !1 && j.content) {
16268
- if (j.state.visible && (F = !0), C.skipLevelOfDetail) {
16269
- if (j.state.finalResolution) {
16270
- var te = j.state.ancestorWithContentAvailable, V = te && te.content ? te.content : j.content, be = V.loadState;
16271
- (be === "UNLOADED" || be === "LOADING") && (c.loaded = !1);
16266
+ this.tileset.needsRefinedTiles.forEach(function(X) {
16267
+ if (c.loaded !== !1 && X.content) {
16268
+ if (X.state.visible && (F = !0), C.skipLevelOfDetail) {
16269
+ if (X.state.finalResolution) {
16270
+ var ne = X.state.ancestorWithContentAvailable, V = ne && ne.content ? ne.content : X.content, Ee = V.loadState;
16271
+ (Ee === "UNLOADED" || Ee === "LOADING") && (c.loaded = !1);
16272
16272
  }
16273
- } else if (j.state.visible && j.levelOfContent <= 0) {
16274
- var be = j.content.loadState;
16275
- (be === "UNLOADED" || be === "LOADING") && (c.loaded = !1);
16273
+ } else if (X.state.visible && X.levelOfContent <= 0) {
16274
+ var Ee = X.content.loadState;
16275
+ (Ee === "UNLOADED" || Ee === "LOADING") && (c.loaded = !1);
16276
16276
  }
16277
16277
  }
16278
16278
  }), F && this.tileset.selectedTiles.length === 0 && this.tileset.frameNumber < 500 && (this.loaded = !1), this.loaded === !0 && (this.refined = !1, this.refineProgress[1]++);
16279
16279
  }
16280
- this.renderObjects.length = 0, this.backfaceObjects.length = 0, this.tileObjects.length = 0, this.remove.apply(this, this.children), C.skipLevelOfDetail || this.tileset.selectedTiles.sort(function(j, te) {
16281
- return j.floor !== te.floor ? j.floor - te.floor : j.levelOfContent !== te.levelOfContent ? te.levelOfContent - j.levelOfContent : j.state.distanceToCamera !== te.state.distanceToCamera ? j.state.distanceToCamera - te.state.distanceToCamera : j.state.centerZDepth - te.state.centerZDepth;
16280
+ this.renderObjects.length = 0, this.backfaceObjects.length = 0, this.tileObjects.length = 0, this.remove.apply(this, this.children), C.skipLevelOfDetail || this.tileset.selectedTiles.sort(function(X, ne) {
16281
+ return X.floor !== ne.floor ? X.floor - ne.floor : X.levelOfContent !== ne.levelOfContent ? ne.levelOfContent - X.levelOfContent : X.state.distanceToCamera !== ne.state.distanceToCamera ? X.state.distanceToCamera - ne.state.distanceToCamera : X.state.centerZDepth - ne.state.centerZDepth;
16282
16282
  });
16283
16283
  for (var H = [], w = 0, I = this.tileset.selectedTiles; w < I.length; w++) {
16284
16284
  var P = I[w], O = (d = (f = P.content) === null || f === void 0 ? void 0 : f.data) === null || d === void 0 ? void 0 : d.object;
@@ -16289,36 +16289,36 @@ var scratchVector3$3 = new THREE.Vector3(), scratchSphereBoundingVolume = new Sp
16289
16289
  var N = this.cloneSkipBackfaceObject(O);
16290
16290
  this.backfaceObjects.push(N);
16291
16291
  }
16292
- for (var z = P.state.selectionDepth, J = STENCIL_CONSTANT.TILE_MASK | z << STENCIL_CONSTANT.SKIP_LOD_BIT_SHIFT, K = THREE.GreaterEqualStencilFunc, Q = STENCIL_CONSTANT.SKIP_LOD_MASK, U = THREE.ReplaceStencilOp, q = STENCIL_CONSTANT.TILE_MASK | STENCIL_CONSTANT.SKIP_LOD_MASK, X = 0, Z = O.materials; X < Z.length; X++) {
16293
- var W = Z[X];
16294
- W.stencilWrite = !0, W.stencilRef = J, W.stencilFunc = K, W.stencilFuncMask = Q, W.stencilZPass = U, W.stencilWriteMask = q;
16292
+ for (var z = P.state.selectionDepth, J = STENCIL_CONSTANT.TILE_MASK | z << STENCIL_CONSTANT.SKIP_LOD_BIT_SHIFT, G = THREE.GreaterEqualStencilFunc, Q = STENCIL_CONSTANT.SKIP_LOD_MASK, U = THREE.ReplaceStencilOp, q = STENCIL_CONSTANT.TILE_MASK | STENCIL_CONSTANT.SKIP_LOD_MASK, K = 0, Y = O.materials; K < Y.length; K++) {
16293
+ var Z = Y[K];
16294
+ Z.stencilWrite = !0, Z.stencilRef = J, Z.stencilFunc = G, Z.stencilFuncMask = Q, Z.stencilZPass = U, Z.stencilWriteMask = q;
16295
16295
  }
16296
16296
  } else
16297
- for (var G = 0, ne = O.materials; G < ne.length; G++) {
16298
- var W = ne[G];
16299
- W.stencilWrite = !1, W.stencilRef = STENCIL_CONSTANT.TILE_MASK, W.stencilFunc = THREE.AlwaysStencilFunc, W.stencilFuncMask = STENCIL_CONSTANT.TILE_MASK, W.stencilZPass = THREE.ReplaceStencilOp, W.stencilWriteMask = STENCIL_CONSTANT.TILE_MASK;
16297
+ for (var te = 0, j = O.materials; te < j.length; te++) {
16298
+ var Z = j[te];
16299
+ Z.stencilWrite = !1, Z.stencilRef = STENCIL_CONSTANT.TILE_MASK, Z.stencilFunc = THREE.AlwaysStencilFunc, Z.stencilFuncMask = STENCIL_CONSTANT.TILE_MASK, Z.stencilZPass = THREE.ReplaceStencilOp, Z.stencilWriteMask = STENCIL_CONSTANT.TILE_MASK;
16300
16300
  }
16301
16301
  this.tileObjects.push(O);
16302
16302
  }
16303
16303
  }
16304
- var $ = H.toString();
16305
- tileVersionMap.get(this) !== $ && (tileVersionMap.set(this, $), A = !0), C.skipLevelOfDetail && this.backfaceObjects.length && (u = this.renderObjects).push.apply(u, this.backfaceObjects), this.tileObjects.length && (l = this.renderObjects).push.apply(l, this.tileObjects), C.skipLevelOfDetail && this.renderObjects.push(this.clearStencilObject);
16306
- for (var ee = [], re = 0, le = this.tileset.selectedTrajectories; re < le.length; re++) {
16304
+ var ee = H.toString();
16305
+ tileVersionMap.get(this) !== ee && (tileVersionMap.set(this, ee), A = !0), C.skipLevelOfDetail && this.backfaceObjects.length && (u = this.renderObjects).push.apply(u, this.backfaceObjects), this.tileObjects.length && (l = this.renderObjects).push.apply(l, this.tileObjects), C.skipLevelOfDetail && this.renderObjects.push(this.clearStencilObject);
16306
+ for (var W = [], re = 0, le = this.tileset.selectedTrajectories; re < le.length; re++) {
16307
16307
  var ie = le[re], oe = (h = ie.content.data) === null || h === void 0 ? void 0 : h.object;
16308
16308
  if (oe) {
16309
16309
  var _ = oe.update(e, r, o, this, ie, m);
16310
- ee.push(ie.id), _ && (A = !0), this.renderObjects.push(oe);
16310
+ W.push(ie.id), _ && (A = !0), this.renderObjects.push(oe);
16311
16311
  }
16312
16312
  }
16313
- var se = ee.toString();
16313
+ var se = W.toString();
16314
16314
  trajectoryVersionMap.get(this) !== se && (trajectoryVersionMap.set(this, se), A = !0);
16315
- for (var fe = Math.min(0, ((g = (p = this.parent) === null || p === void 0 ? void 0 : p.children) !== null && g !== void 0 ? g : []).indexOf(this)), he = fe * 1e4, Re = function(j) {
16316
- var te = ce.renderObjects[j], V = j + he;
16317
- te.traverse(function(be) {
16318
- (be instanceof THREE.Mesh || be instanceof THREE.Line || be instanceof THREE.Points) && (be.renderOrder = V);
16319
- }), ce.add(te);
16320
- }, ce = this, Ce = 0; Ce < this.renderObjects.length; Ce++)
16321
- Re(Ce);
16315
+ for (var ce = Math.min(0, ((g = (p = this.parent) === null || p === void 0 ? void 0 : p.children) !== null && g !== void 0 ? g : []).indexOf(this)), ve = ce * 1e4, Te = function(X) {
16316
+ var ne = fe.renderObjects[X], V = X + ve;
16317
+ ne.traverse(function(Ee) {
16318
+ (Ee instanceof THREE.Mesh || Ee instanceof THREE.Line || Ee instanceof THREE.Points) && (Ee.renderOrder = V);
16319
+ }), fe.add(ne);
16320
+ }, fe = this, me = 0; me < this.renderObjects.length; me++)
16321
+ Te(me);
16322
16322
  return A;
16323
16323
  }, t.prototype.dispose = function() {
16324
16324
  this.disposed = !0, this.tileset.reset(), /^blob\:/.test(this.tileset.id) && URL.revokeObjectURL(this.tileset.id), this.remove.apply(this, this.children), this.refined = !1, this.loaded = !1, this.refineProgress[0] = this.refineProgress[1] = 0;
@@ -16868,10 +16868,10 @@ function parse(n, t, e) {
16868
16868
  var I = verify(M);
16869
16869
  if (I instanceof Error)
16870
16870
  return I;
16871
- Array.isArray(t.transform) ? e.transform.fromArray(t.transform) : t.transform && e.transform.copy(t.transform), n = M.map(function(j) {
16872
- return JSON.parse(j);
16873
- }).reduce(function(j, te) {
16874
- return deepMerge(j, te);
16871
+ Array.isArray(t.transform) ? e.transform.fromArray(t.transform) : t.transform && e.transform.copy(t.transform), n = M.map(function(X) {
16872
+ return JSON.parse(X);
16873
+ }).reduce(function(X, ne) {
16874
+ return deepMerge(X, ne);
16875
16875
  }), defineProperty(e, "raw", {
16876
16876
  configurable: !1,
16877
16877
  get: function() {
@@ -16937,28 +16937,28 @@ function parse(n, t, e) {
16937
16937
  return J;
16938
16938
  }
16939
16939
  });
16940
- var K;
16941
- Array.isArray(n.model.textures) ? (K = n.model.textures.map(function(j) {
16942
- var te, V;
16943
- return textureURL$1(_, j, (V = (te = n.model.textureBase) !== null && te !== void 0 ? te : n.model.material_base_url) !== null && V !== void 0 ? V : "", t);
16944
- }), Object.freeze(K)) : Array.isArray(n.model.material_textures) && (K = n.model.material_textures.map(function(j) {
16945
- var te, V;
16946
- return textureURL$1(_, j, (V = (te = n.model.textureBase) !== null && te !== void 0 ? te : n.model.material_base_url) !== null && V !== void 0 ? V : "", t);
16947
- }), Object.freeze(K)), defineProperty(N, "textures", {
16940
+ var G;
16941
+ Array.isArray(n.model.textures) ? (G = n.model.textures.map(function(X) {
16942
+ var ne, V;
16943
+ return textureURL$1(_, X, (V = (ne = n.model.textureBase) !== null && ne !== void 0 ? ne : n.model.material_base_url) !== null && V !== void 0 ? V : "", t);
16944
+ }), Object.freeze(G)) : Array.isArray(n.model.material_textures) && (G = n.model.material_textures.map(function(X) {
16945
+ var ne, V;
16946
+ return textureURL$1(_, X, (V = (ne = n.model.textureBase) !== null && ne !== void 0 ? ne : n.model.material_base_url) !== null && V !== void 0 ? V : "", t);
16947
+ }), Object.freeze(G)), defineProperty(N, "textures", {
16948
16948
  configurable: !1,
16949
16949
  get: function() {
16950
- return K;
16950
+ return G;
16951
16951
  }
16952
16952
  });
16953
16953
  var Q = [];
16954
16954
  if (Array.isArray(n.model.tiles))
16955
16955
  for (var U = 0, q = n.model.tiles; U < q.length; U++) {
16956
- var X = q[U];
16957
- X && (X.tileset || X.tileset_url) && Q.push(Object.freeze({
16958
- type: (s = X.type) !== null && s !== void 0 ? s : "mesh",
16959
- name: (u = X.name) !== null && u !== void 0 ? u : "",
16960
- upAxis: (c = (l = X.upAxis) !== null && l !== void 0 ? l : X.up_axis) !== null && c !== void 0 ? c : "-Y",
16961
- tileset: fileURL(_, X.tileset || X.tileset_url, t)
16956
+ var K = q[U];
16957
+ K && (K.tileset || K.tileset_url) && Q.push(Object.freeze({
16958
+ type: (s = K.type) !== null && s !== void 0 ? s : "mesh",
16959
+ name: (u = K.name) !== null && u !== void 0 ? u : "",
16960
+ upAxis: (c = (l = K.upAxis) !== null && l !== void 0 ? l : K.up_axis) !== null && c !== void 0 ? c : "-Y",
16961
+ tileset: fileURL(_, K.tileset || K.tileset_url, t)
16962
16962
  }));
16963
16963
  }
16964
16964
  else
@@ -16969,13 +16969,13 @@ function parse(n, t, e) {
16969
16969
  tileset: fileURL(_, n.model.tiles.tileset || n.model.tiles.tileset_url, t)
16970
16970
  }));
16971
16971
  if (Array.isArray(n.model.layers))
16972
- for (var Z = 0, W = n.model.layers; Z < W.length; Z++) {
16973
- var G = W[Z];
16974
- G && (G.tileset || G.tileset_url) && Q.push(Object.freeze({
16975
- type: (g = G.type) !== null && g !== void 0 ? g : "mesh",
16976
- name: (A = G.name) !== null && A !== void 0 ? A : "",
16977
- upAxis: (m = G.upAxis) !== null && m !== void 0 ? m : G.up_axis,
16978
- tileset: fileURL(_, G.tileset || G.tileset_url, t)
16972
+ for (var Y = 0, Z = n.model.layers; Y < Z.length; Y++) {
16973
+ var te = Z[Y];
16974
+ te && (te.tileset || te.tileset_url) && Q.push(Object.freeze({
16975
+ type: (g = te.type) !== null && g !== void 0 ? g : "mesh",
16976
+ name: (A = te.name) !== null && A !== void 0 ? A : "",
16977
+ upAxis: (m = te.upAxis) !== null && m !== void 0 ? m : te.up_axis,
16978
+ tileset: fileURL(_, te.tileset || te.tileset_url, t)
16979
16979
  }));
16980
16980
  }
16981
16981
  Object.freeze(Q), defineProperty(N, "layers", {
@@ -16993,383 +16993,383 @@ function parse(n, t, e) {
16993
16993
  }
16994
16994
  if (I instanceof Error)
16995
16995
  return I;
16996
- var ne = /* @__PURE__ */ new Set(), $ = /* @__PURE__ */ new Set();
16996
+ var j = /* @__PURE__ */ new Set(), ee = /* @__PURE__ */ new Set();
16997
16997
  {
16998
- var ee = [];
16998
+ var W = [];
16999
16999
  if (n.observers && Array.isArray(n.observers)) {
17000
17000
  var re = [];
17001
17001
  n.panorama && (Array.isArray(n.panorama) ? re = n.panorama : Array.isArray(n.panorama.list) ? re = n.panorama.list : Array.isArray(n.panorama.info) && (re = n.panorama.info));
17002
- for (var le = function(j) {
17003
- var te = {
17004
- getResolvedPosition: function(Ee) {
17005
- return Ee.copy(this.position).applyMatrix4(this.work.transform), Ee;
17002
+ for (var le = function(X) {
17003
+ var ne = {
17004
+ getResolvedPosition: function(ye) {
17005
+ return ye.copy(this.position).applyMatrix4(this.work.transform), ye;
17006
17006
  },
17007
- getResolvedStandingPosition: function(Ee) {
17008
- return Ee.copy(this.standingPosition).applyMatrix4(this.work.transform), Ee;
17007
+ getResolvedStandingPosition: function(ye) {
17008
+ return ye.copy(this.standingPosition).applyMatrix4(this.work.transform), ye;
17009
17009
  },
17010
- getResolvedQuaternion: function(Ee) {
17011
- return Ee.setFromRotationMatrix(scratchMatrix4$2.makeRotationFromQuaternion(this.quaternion).premultiply(this.work.transform)), Ee;
17010
+ getResolvedQuaternion: function(ye) {
17011
+ return ye.setFromRotationMatrix(scratchMatrix4$2.makeRotationFromQuaternion(this.quaternion).premultiply(this.work.transform)), ye;
17012
17012
  },
17013
- getResolvedMatrix: function(Ee) {
17014
- return Ee.copy(this.matrix).premultiply(this.work.transform), Ee;
17013
+ getResolvedMatrix: function(ye) {
17014
+ return ye.copy(this.matrix).premultiply(this.work.transform), ye;
17015
17015
  }
17016
- }, V = n.observers[j];
17016
+ }, V = n.observers[X];
17017
17017
  if (!V)
17018
17018
  return "break";
17019
- var be = re[j];
17020
- if (!be)
17019
+ var Ee = re[X];
17020
+ if (!Ee)
17021
17021
  return "break";
17022
- V = Object.assign({}, V, be, {
17022
+ V = Object.assign({}, V, Ee, {
17023
17023
  // 处理 active
17024
17024
  // observer.active | panorama.active 有一个 false 则为 false
17025
- active: V.active !== !1 && be.active !== !1
17026
- }), defineProperty(te, "work", {
17025
+ active: V.active !== !1 && Ee.active !== !1
17026
+ }), defineProperty(ne, "work", {
17027
17027
  configurable: !1,
17028
17028
  get: function() {
17029
17029
  return e;
17030
17030
  }
17031
- }), defineProperty(te, "index", {
17031
+ }), defineProperty(ne, "index", {
17032
17032
  configurable: !1,
17033
17033
  get: function() {
17034
- return j;
17034
+ return X;
17035
17035
  }
17036
- }), $.add(j), defineProperty(te, "panoIndex", {
17036
+ }), ee.add(X), defineProperty(ne, "panoIndex", {
17037
17037
  configurable: !1,
17038
17038
  get: function() {
17039
- return j;
17039
+ return X;
17040
17040
  }
17041
17041
  });
17042
17042
  var de = panoStringify({
17043
17043
  workCode: e.workCode,
17044
- panoIndex: j
17044
+ panoIndex: X
17045
17045
  });
17046
- ne.add(de), defineProperty(te, "panoId", {
17046
+ j.add(de), defineProperty(ne, "panoId", {
17047
17047
  configurable: !1,
17048
17048
  get: function() {
17049
17049
  return de;
17050
17050
  }
17051
17051
  });
17052
- var ve = Object.freeze({
17052
+ var pe = Object.freeze({
17053
17053
  workCode: e.workCode,
17054
- panoIndex: j
17054
+ panoIndex: X
17055
17055
  });
17056
- defineProperty(te, "pano", {
17056
+ defineProperty(ne, "pano", {
17057
17057
  configurable: !1,
17058
17058
  get: function() {
17059
- return ve;
17059
+ return pe;
17060
17060
  }
17061
17061
  });
17062
- var Ve = V.active !== !1;
17063
- defineProperty(te, "active", {
17062
+ var Ne = V.active !== !1;
17063
+ defineProperty(ne, "active", {
17064
17064
  configurable: !1,
17065
17065
  get: function() {
17066
- return Ve;
17066
+ return Ne;
17067
17067
  }
17068
17068
  });
17069
17069
  var rt = V.loadable === !0;
17070
- defineProperty(te, "loadable", {
17070
+ defineProperty(ne, "loadable", {
17071
17071
  configurable: !1,
17072
17072
  get: function() {
17073
17073
  return rt;
17074
17074
  }
17075
17075
  });
17076
- var We = V.derived_id;
17077
- defineProperty(te, "derivedId", {
17076
+ var Ye = V.derived_id;
17077
+ defineProperty(ne, "derivedId", {
17078
17078
  configurable: !1,
17079
17079
  get: function() {
17080
- return We;
17080
+ return Ye;
17081
17081
  }
17082
17082
  });
17083
- var me = V.derived_id_str;
17084
- defineProperty(te, "derivedIdStr", {
17083
+ var ge = V.derived_id_str;
17084
+ defineProperty(ne, "derivedIdStr", {
17085
17085
  configurable: !1,
17086
17086
  get: function() {
17087
- return me;
17087
+ return ge;
17088
17088
  }
17089
17089
  });
17090
- var ae = (S = (b = (v = (E = n.panorama) === null || E === void 0 ? void 0 : E.pano_high_cube_base_url) !== null && v !== void 0 ? v : (y = n.panorama) === null || y === void 0 ? void 0 : y.pano_cube_base_url) !== null && b !== void 0 ? b : (T = n.panorama) === null || T === void 0 ? void 0 : T.base_url) !== null && S !== void 0 ? S : "", pe = {
17091
- up: panoURL(_, ae, V.images ? V.images.up : V.up, j, t),
17092
- down: panoURL(_, ae, V.images ? V.images.down : V.down, j, t),
17093
- right: panoURL(_, ae, V.images ? V.images.right : V.right, j, t),
17094
- left: panoURL(_, ae, V.images ? V.images.left : V.left, j, t),
17095
- front: panoURL(_, ae, V.images ? V.images.front : V.front, j, t),
17096
- back: panoURL(_, ae, V.images ? V.images.back : V.back, j, t)
17090
+ var ae = (S = (b = (v = (E = n.panorama) === null || E === void 0 ? void 0 : E.pano_high_cube_base_url) !== null && v !== void 0 ? v : (y = n.panorama) === null || y === void 0 ? void 0 : y.pano_cube_base_url) !== null && b !== void 0 ? b : (T = n.panorama) === null || T === void 0 ? void 0 : T.base_url) !== null && S !== void 0 ? S : "", he = {
17091
+ up: panoURL(_, ae, V.images ? V.images.up : V.up, X, t),
17092
+ down: panoURL(_, ae, V.images ? V.images.down : V.down, X, t),
17093
+ right: panoURL(_, ae, V.images ? V.images.right : V.right, X, t),
17094
+ left: panoURL(_, ae, V.images ? V.images.left : V.left, X, t),
17095
+ front: panoURL(_, ae, V.images ? V.images.front : V.front, X, t),
17096
+ back: panoURL(_, ae, V.images ? V.images.back : V.back, X, t)
17097
17097
  };
17098
17098
  if (V.size_list)
17099
- pe.sizeList = V.size_list.slice();
17099
+ he.sizeList = V.size_list.slice();
17100
17100
  else {
17101
- var we = getImageSizeFromURL(pe.up);
17102
- if (we && (pe.sizeList = [we], V.tiles))
17103
- for (var Se = V.tiles.slice().sort(function(Ee, $e) {
17104
- return Ee - $e;
17105
- }).map(function(Ee) {
17106
- return 512 * Math.pow(2, Ee);
17107
- }), Pe = 0, Le = Se; Pe < Le.length; Pe++) {
17108
- var Ae = Le[Pe];
17109
- Ae > we && pe.sizeList.push(Ae);
17101
+ var we = getImageSizeFromURL(he.up);
17102
+ if (we && (he.sizeList = [we], V.tiles))
17103
+ for (var xe = V.tiles.slice().sort(function(ye, tt) {
17104
+ return ye - tt;
17105
+ }).map(function(ye) {
17106
+ return 512 * Math.pow(2, ye);
17107
+ }), He = 0, _e = xe; He < _e.length; He++) {
17108
+ var be = _e[He];
17109
+ be > we && he.sizeList.push(be);
17110
17110
  }
17111
17111
  }
17112
- var Te = void 0;
17112
+ var Me = void 0;
17113
17113
  if (V.images)
17114
- Te = V.images.tiles;
17114
+ Me = V.images.tiles;
17115
17115
  else if (Array.isArray(V.size_list)) {
17116
- var Ie = V.size_list.slice().sort(function(Ee, $e) {
17117
- return Ee - $e;
17116
+ var Ie = V.size_list.slice().sort(function(ye, tt) {
17117
+ return ye - tt;
17118
17118
  });
17119
17119
  if (Ie[0]) {
17120
17120
  var Be = getTileLevel(Ie[0]);
17121
17121
  if (Be)
17122
- for (var qe = Be - 1; qe >= 0; qe--)
17123
- Ie.unshift(512 * Math.pow(2, qe));
17124
- Te = Ie;
17122
+ for (var ze = Be - 1; ze >= 0; ze--)
17123
+ Ie.unshift(512 * Math.pow(2, ze));
17124
+ Me = Ie;
17125
17125
  }
17126
17126
  } else if (Array.isArray(V.tiles)) {
17127
- if (Te = V.tiles.slice(), typeof Te[0] == "number") {
17128
- for (var ke = Te[0]; --ke >= 0; )
17129
- Te.unshift(ke);
17130
- Te = Te.sort(function(Ee, $e) {
17131
- return Ee - $e;
17132
- }).map(function(Ee) {
17133
- return 512 * Math.pow(2, Ee);
17127
+ if (Me = V.tiles.slice(), typeof Me[0] == "number") {
17128
+ for (var Ge = Me[0]; --Ge >= 0; )
17129
+ Me.unshift(Ge);
17130
+ Me = Me.sort(function(ye, tt) {
17131
+ return ye - tt;
17132
+ }).map(function(ye) {
17133
+ return 512 * Math.pow(2, ye);
17134
17134
  });
17135
17135
  }
17136
- } else if (pe.sizeList) {
17137
- var Ie = pe.sizeList.slice().sort(function($e, bt) {
17138
- return $e - bt;
17136
+ } else if (he.sizeList) {
17137
+ var Ie = he.sizeList.slice().sort(function(tt, Et) {
17138
+ return tt - Et;
17139
17139
  });
17140
17140
  if (Ie[0]) {
17141
17141
  var Be = getTileLevel(Ie[0]);
17142
17142
  if (Be)
17143
- for (var qe = Be - 1; qe >= 0; qe--)
17144
- Ie.unshift(512 * Math.pow(2, qe));
17145
- Te = Ie;
17143
+ for (var ze = Be - 1; ze >= 0; ze--)
17144
+ Ie.unshift(512 * Math.pow(2, ze));
17145
+ Me = Ie;
17146
17146
  }
17147
17147
  }
17148
- if (Te) {
17149
- for (var Ne = [], _e = 0, Ue = Te; _e < Ue.length; _e++) {
17150
- var Ae = Ue[_e];
17151
- if (typeof Ae == "number") {
17152
- var ze = getTileLevel(Ae);
17153
- if (typeof ze != "number")
17148
+ if (Me) {
17149
+ for (var Fe = [], Ve = 0, $e = Me; Ve < $e.length; Ve++) {
17150
+ var be = $e[Ve];
17151
+ if (typeof be == "number") {
17152
+ var Pe = getTileLevel(be);
17153
+ if (typeof Pe != "number")
17154
17154
  continue;
17155
- var je = getImageSizeFromURL(pe.front);
17155
+ var je = getImageSizeFromURL(he.front);
17156
17156
  if (!je)
17157
17157
  continue;
17158
- if (Ae > je) {
17159
- var xe = replaceImageSize(pe.up, Ae), Oe = replaceImageSize(pe.down, Ae), Me = replaceImageSize(pe.right, Ae), Fe = replaceImageSize(pe.left, Ae), He = replaceImageSize(pe.front, Ae), Ge = replaceImageSize(pe.back, Ae);
17160
- Ne.push(Object.freeze({ level: ze, size: Ae, scale: 1, up: xe, down: Oe, right: Me, left: Fe, front: He, back: Ge }));
17158
+ if (be > je) {
17159
+ var Re = replaceImageSize(he.up, be), We = replaceImageSize(he.down, be), Se = replaceImageSize(he.right, be), Oe = replaceImageSize(he.left, be), Le = replaceImageSize(he.front, be), qe = replaceImageSize(he.back, be);
17160
+ Fe.push(Object.freeze({ level: Pe, size: be, scale: 1, up: Re, down: We, right: Se, left: Oe, front: Le, back: qe }));
17161
17161
  } else {
17162
- var xe = pe.up, Oe = pe.down, Me = pe.right, Fe = pe.left, He = pe.front, Ge = pe.back;
17163
- Ne.push(Object.freeze({ level: ze, size: je, scale: Ae / je, up: xe, down: Oe, right: Me, left: Fe, front: He, back: Ge }));
17162
+ var Re = he.up, We = he.down, Se = he.right, Oe = he.left, Le = he.front, qe = he.back;
17163
+ Fe.push(Object.freeze({ level: Pe, size: je, scale: be / je, up: Re, down: We, right: Se, left: Oe, front: Le, back: qe }));
17164
17164
  }
17165
17165
  } else {
17166
- var ze = Ae.level;
17167
- if (typeof ze != "number")
17166
+ var Pe = be.level;
17167
+ if (typeof Pe != "number")
17168
17168
  continue;
17169
- var we = Ae.size;
17169
+ var we = be.size;
17170
17170
  if (typeof we != "number")
17171
17171
  continue;
17172
- var xe = panoURL(_, ae, Ae.up, j, t), Oe = panoURL(_, ae, Ae.down, j, t), Me = panoURL(_, ae, Ae.right, j, t), Fe = panoURL(_, ae, Ae.left, j, t), He = panoURL(_, ae, Ae.front, j, t), Ge = panoURL(_, ae, Ae.back, j, t);
17173
- Ne.push(Object.freeze({ level: ze, size: we, scale: (R = Ae.scale) !== null && R !== void 0 ? R : 1, up: xe, down: Oe, right: Me, left: Fe, front: He, back: Ge }));
17172
+ var Re = panoURL(_, ae, be.up, X, t), We = panoURL(_, ae, be.down, X, t), Se = panoURL(_, ae, be.right, X, t), Oe = panoURL(_, ae, be.left, X, t), Le = panoURL(_, ae, be.front, X, t), qe = panoURL(_, ae, be.back, X, t);
17173
+ Fe.push(Object.freeze({ level: Pe, size: we, scale: (R = be.scale) !== null && R !== void 0 ? R : 1, up: Re, down: We, right: Se, left: Oe, front: Le, back: qe }));
17174
17174
  }
17175
17175
  }
17176
- Ne = sortTile(Ne), Object.freeze(Ne), defineProperty(pe, "tiles", {
17176
+ Fe = sortTile(Fe), Object.freeze(Fe), defineProperty(he, "tiles", {
17177
17177
  configurable: !1,
17178
17178
  get: function() {
17179
- return Ne;
17179
+ return Fe;
17180
17180
  }
17181
17181
  });
17182
17182
  }
17183
- Object.freeze(pe), defineProperty(te, "images", {
17183
+ Object.freeze(he), defineProperty(ne, "images", {
17184
17184
  configurable: !1,
17185
17185
  get: function() {
17186
- return pe;
17186
+ return he;
17187
17187
  }
17188
17188
  });
17189
- var Ze = new THREE.Vector3();
17189
+ var nt = new THREE.Vector3();
17190
17190
  if (V.position instanceof THREE.Vector3)
17191
- Ze.copy(V.position);
17191
+ nt.copy(V.position);
17192
17192
  else if (Array.isArray(V.position))
17193
- Ze.fromArray(V.position);
17193
+ nt.fromArray(V.position);
17194
17194
  else
17195
17195
  return "break";
17196
- Object.freeze(Ze), e.observerBox.expandByPoint(Ze), defineProperty(te, "position", {
17196
+ Object.freeze(nt), e.observerBox.expandByPoint(nt), defineProperty(ne, "position", {
17197
17197
  configurable: !1,
17198
17198
  get: function() {
17199
- return Ze;
17199
+ return nt;
17200
17200
  }
17201
17201
  });
17202
- var Ye = new THREE.Vector3();
17202
+ var Ze = new THREE.Vector3();
17203
17203
  if (V.standingPosition instanceof THREE.Vector3)
17204
- Ye.copy(V.standingPosition);
17204
+ Ze.copy(V.standingPosition);
17205
17205
  else if (Array.isArray(V.standingPosition))
17206
- Ye.fromArray(V.standingPosition);
17206
+ Ze.fromArray(V.standingPosition);
17207
17207
  else if (V.standing_position instanceof THREE.Vector3)
17208
- Ye.copy(V.standing_position);
17208
+ Ze.copy(V.standing_position);
17209
17209
  else if (Array.isArray(V.standing_position))
17210
- Ye.fromArray(V.standing_position);
17210
+ Ze.fromArray(V.standing_position);
17211
17211
  else
17212
17212
  return "break";
17213
- Object.freeze(Ye), e.observerBox.expandByPoint(Ye), defineProperty(te, "standingPosition", {
17213
+ Object.freeze(Ze), e.observerBox.expandByPoint(Ze), defineProperty(ne, "standingPosition", {
17214
17214
  configurable: !1,
17215
17215
  get: function() {
17216
- return Ye;
17216
+ return Ze;
17217
17217
  }
17218
17218
  });
17219
- var Qe = new THREE.Quaternion();
17219
+ var ut = new THREE.Quaternion();
17220
17220
  if (V.quaternion instanceof THREE.Quaternion)
17221
- Qe.copy(V.quaternion);
17221
+ ut.copy(V.quaternion);
17222
17222
  else if (Array.isArray(V.quaternion))
17223
- Qe.fromArray(V.quaternion);
17223
+ ut.fromArray(V.quaternion);
17224
17224
  else if (V.quaternion) {
17225
- var ye = V.quaternion, wt = ye.x, vt = ye.y, at = ye.z, Je = ye.w;
17226
- Qe.set(wt, vt, at, Je);
17225
+ var Ue = V.quaternion, Ce = Ue.x, yt = Ue.y, it = Ue.z, Ke = Ue.w;
17226
+ ut.set(Ce, yt, it, Ke);
17227
17227
  } else
17228
17228
  return "break";
17229
- Object.freeze(Qe), defineProperty(te, "quaternion", {
17229
+ Object.freeze(ut), defineProperty(ne, "quaternion", {
17230
17230
  configurable: !1,
17231
17231
  get: function() {
17232
- return Qe;
17232
+ return ut;
17233
17233
  }
17234
17234
  });
17235
- var ft = new THREE.Matrix4().compose(Ze, Qe, PANO_TEXTURE_SCALE);
17236
- Object.freeze(ft), defineProperty(te, "matrix", {
17235
+ var lt = new THREE.Matrix4().compose(nt, ut, PANO_TEXTURE_SCALE);
17236
+ Object.freeze(lt), defineProperty(ne, "matrix", {
17237
17237
  configurable: !1,
17238
17238
  get: function() {
17239
- return ft;
17239
+ return lt;
17240
17240
  }
17241
17241
  });
17242
- var nt = 0;
17243
- isNumber(V.floorIndex) ? nt = V.floorIndex : isNumber(V.floor_index) ? nt = V.floor_index : isNumber(V.floor) && (nt = V.floor), defineProperty(te, "floorIndex", {
17242
+ var ft = 0;
17243
+ isNumber(V.floorIndex) ? ft = V.floorIndex : isNumber(V.floor_index) ? ft = V.floor_index : isNumber(V.floor) && (ft = V.floor), defineProperty(ne, "floorIndex", {
17244
17244
  configurable: !1,
17245
17245
  get: function() {
17246
- return nt;
17246
+ return ft;
17247
17247
  }
17248
17248
  });
17249
- var Ke;
17250
- V.video && (Ke = {
17249
+ var Qe;
17250
+ V.video && (Qe = {
17251
17251
  source: "",
17252
17252
  matrix: new THREE.Matrix4(),
17253
17253
  size: new THREE.Vector2()
17254
- }, typeof V.video.source == "string" && (Ke.source = V.video.source), V.video.matrix instanceof THREE.Matrix4 ? Ke.matrix.copy(V.video.matrix) : Array.isArray(V.video.matrix) && Ke.matrix.fromArray(V.video.matrix), V.video.size instanceof THREE.Vector2 ? Ke.size.copy(V.video.size) : Array.isArray(V.video.size) && Ke.size.fromArray(V.video.size), Object.freeze(Ke)), defineProperty(te, "video", {
17254
+ }, typeof V.video.source == "string" && (Qe.source = V.video.source), V.video.matrix instanceof THREE.Matrix4 ? Qe.matrix.copy(V.video.matrix) : Array.isArray(V.video.matrix) && Qe.matrix.fromArray(V.video.matrix), V.video.size instanceof THREE.Vector2 ? Qe.size.copy(V.video.size) : Array.isArray(V.video.size) && Qe.size.fromArray(V.video.size), Object.freeze(Qe)), defineProperty(ne, "video", {
17255
17255
  configurable: !1,
17256
17256
  get: function() {
17257
- return Ke;
17257
+ return Qe;
17258
17258
  }
17259
- }), Array.isArray(V.accessibleNodes) ? (te.accessibleNodes = V.accessibleNodes.slice(), te.accessibleIds = V.accessibleNodes.map(function(Ee) {
17259
+ }), Array.isArray(V.accessibleNodes) ? (ne.accessibleNodes = V.accessibleNodes.slice(), ne.accessibleIds = V.accessibleNodes.map(function(ye) {
17260
17260
  return panoStringify({
17261
17261
  workCode: e.workCode,
17262
- panoIndex: Ee
17262
+ panoIndex: ye
17263
17263
  });
17264
- })) : Array.isArray(V.accessible_nodes) && (te.accessibleNodes = V.accessible_nodes.slice(), te.accessibleIds = V.accessible_nodes.map(function(Ee) {
17264
+ })) : Array.isArray(V.accessible_nodes) && (ne.accessibleNodes = V.accessible_nodes.slice(), ne.accessibleIds = V.accessible_nodes.map(function(ye) {
17265
17265
  return panoStringify({
17266
17266
  workCode: e.workCode,
17267
- panoIndex: Ee
17267
+ panoIndex: ye
17268
17268
  });
17269
- })), Array.isArray(V.visibleNodes) ? (te.visibleNodes = V.visibleNodes.slice(), te.visibleIds = V.visibleNodes.map(function(Ee) {
17269
+ })), Array.isArray(V.visibleNodes) ? (ne.visibleNodes = V.visibleNodes.slice(), ne.visibleIds = V.visibleNodes.map(function(ye) {
17270
17270
  return panoStringify({
17271
17271
  workCode: e.workCode,
17272
- panoIndex: Ee
17272
+ panoIndex: ye
17273
17273
  });
17274
- })) : Array.isArray(V.visible_nodes) && (te.visibleNodes = V.visible_nodes.slice(), te.visibleIds = V.visible_nodes.map(function(Ee) {
17274
+ })) : Array.isArray(V.visible_nodes) && (ne.visibleNodes = V.visible_nodes.slice(), ne.visibleIds = V.visible_nodes.map(function(ye) {
17275
17275
  return panoStringify({
17276
17276
  workCode: e.workCode,
17277
- panoIndex: Ee
17277
+ panoIndex: ye
17278
17278
  });
17279
- })), ee[j] = te;
17279
+ })), W[X] = ne;
17280
17280
  }, ie = 0; ie < n.observers.length; ie++) {
17281
17281
  var oe = le(ie);
17282
17282
  if (oe === "break")
17283
17283
  break;
17284
17284
  }
17285
17285
  }
17286
- for (var se = function(j) {
17287
- if (j.accessibleIds) {
17288
- var be = j.accessibleIds.filter(function(ae) {
17289
- return ne.has(ae);
17286
+ for (var se = function(X) {
17287
+ if (X.accessibleIds) {
17288
+ var Ee = X.accessibleIds.filter(function(ae) {
17289
+ return j.has(ae);
17290
17290
  });
17291
- Object.freeze(be), defineProperty(j, "accessibleIds", {
17291
+ Object.freeze(Ee), defineProperty(X, "accessibleIds", {
17292
17292
  configurable: !1,
17293
17293
  get: function() {
17294
- return be;
17294
+ return Ee;
17295
17295
  }
17296
17296
  });
17297
17297
  } else {
17298
- for (var te = [], V = 0; V < ee.length; V++)
17299
- ee[V] !== j && (Math.abs(ee[V].position.y - j.position.y) > 3 || ee[V].position.distanceTo(j.position) > 10 || te.push(ee[V].panoId));
17300
- Object.freeze(te), defineProperty(j, "accessibleIds", {
17298
+ for (var ne = [], V = 0; V < W.length; V++)
17299
+ W[V] !== X && (Math.abs(W[V].position.y - X.position.y) > 3 || W[V].position.distanceTo(X.position) > 10 || ne.push(W[V].panoId));
17300
+ Object.freeze(ne), defineProperty(X, "accessibleIds", {
17301
17301
  configurable: !1,
17302
17302
  get: function() {
17303
- return te;
17303
+ return ne;
17304
17304
  }
17305
17305
  });
17306
17306
  }
17307
- if (j.accessibleNodes) {
17308
- var ve = j.accessibleNodes.filter(function(ae) {
17309
- return $.has(ae);
17307
+ if (X.accessibleNodes) {
17308
+ var pe = X.accessibleNodes.filter(function(ae) {
17309
+ return ee.has(ae);
17310
17310
  });
17311
- Object.freeze(ve), defineProperty(j, "accessibleNodes", {
17311
+ Object.freeze(pe), defineProperty(X, "accessibleNodes", {
17312
17312
  configurable: !1,
17313
17313
  get: function() {
17314
- return ve;
17314
+ return pe;
17315
17315
  }
17316
17316
  });
17317
17317
  } else {
17318
- for (var de = [], V = 0; V < ee.length; V++)
17319
- ee[V] !== j && (Math.abs(ee[V].position.y - j.position.y) > 3 || ee[V].position.distanceTo(j.position) > 10 || de.push(ee[V].panoIndex));
17320
- Object.freeze(de), defineProperty(j, "accessibleNodes", {
17318
+ for (var de = [], V = 0; V < W.length; V++)
17319
+ W[V] !== X && (Math.abs(W[V].position.y - X.position.y) > 3 || W[V].position.distanceTo(X.position) > 10 || de.push(W[V].panoIndex));
17320
+ Object.freeze(de), defineProperty(X, "accessibleNodes", {
17321
17321
  configurable: !1,
17322
17322
  get: function() {
17323
17323
  return de;
17324
17324
  }
17325
17325
  });
17326
17326
  }
17327
- if (j.visibleIds) {
17328
- var rt = j.visibleIds.filter(function(ae) {
17329
- return ne.has(ae);
17327
+ if (X.visibleIds) {
17328
+ var rt = X.visibleIds.filter(function(ae) {
17329
+ return j.has(ae);
17330
17330
  });
17331
- Object.freeze(rt), defineProperty(j, "visibleIds", {
17331
+ Object.freeze(rt), defineProperty(X, "visibleIds", {
17332
17332
  configurable: !1,
17333
17333
  get: function() {
17334
17334
  return rt;
17335
17335
  }
17336
17336
  });
17337
17337
  } else {
17338
- var Ve = j.accessibleIds.slice();
17339
- Object.freeze(Ve), defineProperty(j, "visibleIds", {
17338
+ var Ne = X.accessibleIds.slice();
17339
+ Object.freeze(Ne), defineProperty(X, "visibleIds", {
17340
17340
  configurable: !1,
17341
17341
  get: function() {
17342
- return Ve;
17342
+ return Ne;
17343
17343
  }
17344
17344
  });
17345
17345
  }
17346
- if (j.visibleNodes) {
17347
- var me = j.visibleNodes.filter(function(ae) {
17348
- return $.has(ae);
17346
+ if (X.visibleNodes) {
17347
+ var ge = X.visibleNodes.filter(function(ae) {
17348
+ return ee.has(ae);
17349
17349
  });
17350
- Object.freeze(me), defineProperty(j, "visibleNodes", {
17350
+ Object.freeze(ge), defineProperty(X, "visibleNodes", {
17351
17351
  configurable: !1,
17352
17352
  get: function() {
17353
- return me;
17353
+ return ge;
17354
17354
  }
17355
17355
  });
17356
17356
  } else {
17357
- var We = j.accessibleNodes.slice();
17358
- Object.freeze(We), defineProperty(j, "visibleNodes", {
17357
+ var Ye = X.accessibleNodes.slice();
17358
+ Object.freeze(Ye), defineProperty(X, "visibleNodes", {
17359
17359
  configurable: !1,
17360
17360
  get: function() {
17361
- return We;
17361
+ return Ye;
17362
17362
  }
17363
17363
  });
17364
17364
  }
17365
- }, fe = 0, he = ee; fe < he.length; fe++) {
17366
- var Re = he[fe];
17367
- se(Re);
17365
+ }, ce = 0, ve = W; ce < ve.length; ce++) {
17366
+ var Te = ve[ce];
17367
+ se(Te);
17368
17368
  }
17369
- Object.freeze(ee), defineProperty(e, "observers", {
17369
+ Object.freeze(W), defineProperty(e, "observers", {
17370
17370
  configurable: !1,
17371
17371
  get: function() {
17372
- return ee;
17372
+ return W;
17373
17373
  }
17374
17374
  });
17375
17375
  }
@@ -17377,15 +17377,15 @@ function parse(n, t, e) {
17377
17377
  return I;
17378
17378
  if (n.initial) {
17379
17379
  if ((n.initial.mode === "Panorama" && e.observers.length === 0 || n.initial.mode === "Floorplan" || n.initial.mode === "Topview" || n.initial.mode === "Model" || n.initial.mode === "Mapview" || n.initial.mode === "DepthPanorama") && (e.initial.mode = n.initial.mode), isNumber(n.initial.latitude) && (e.initial.latitude = n.initial.latitude), isNumber(n.initial.longitude) ? e.initial.longitude = n.initial.longitude : isNumber(n.initial.heading) && (e.initial.longitude = headingToLongitude(n.initial.heading)), isNumber(n.initial.fov) && (e.initial.fov = n.initial.fov), e.observers.length > 0) {
17380
- var ce = void 0;
17381
- isNumber(n.initial.panoIndex) ? ce = n.initial.panoIndex : isNumber(n.initial.pano_index) ? ce = n.initial.pano_index : isNumber(n.initial.pano) && (ce = n.initial.pano), typeof ce == "number" && (ce = clamp$1(ce, 0, e.observers.length - 1), e.initial.panoIndex = ce);
17380
+ var fe = void 0;
17381
+ isNumber(n.initial.panoIndex) ? fe = n.initial.panoIndex : isNumber(n.initial.pano_index) ? fe = n.initial.pano_index : isNumber(n.initial.pano) && (fe = n.initial.pano), typeof fe == "number" && (fe = clamp$1(fe, 0, e.observers.length - 1), e.initial.panoIndex = fe);
17382
17382
  }
17383
17383
  if (isNumber(n.initial.distance) && (e.initial.distance = n.initial.distance), Array.isArray(n.initial.offset)) {
17384
- var Ce = [0, 0, 0].map(function(j, te) {
17385
- var V = Number(n.initial.offset[te]);
17384
+ var me = [0, 0, 0].map(function(X, ne) {
17385
+ var V = Number(n.initial.offset[ne]);
17386
17386
  return isNaN(V) || !isFinite(V) ? 0 : V;
17387
17387
  });
17388
- e.initial.offset = new THREE.Vector3().fromArray(Ce);
17388
+ e.initial.offset = new THREE.Vector3().fromArray(me);
17389
17389
  } else typeof n.initial.offset == "object" && typeof n.initial.offset.x == "number" && typeof n.initial.offset.y == "number" && typeof n.initial.offset.z == "number" && (e.initial.offset = new THREE.Vector3(n.initial.offset.x, n.initial.offset.y, n.initial.offset.z));
17390
17390
  !e.initial.mode && typeof e.initial.panoIndex == "number" && (e.initial.mode = "Panorama");
17391
17391
  }
@@ -17755,8 +17755,8 @@ var BufferGeometryUtils = {
17755
17755
  var p = new THREE.Vector3(), g = new THREE.Vector3(), A = new THREE.Vector3(), m = new THREE.Vector2(), E = new THREE.Vector2(), v = new THREE.Vector2(), y = new THREE.Vector3(), b = new THREE.Vector3();
17756
17756
  function T(Q, U, q) {
17757
17757
  p.fromArray(o, Q * 3), g.fromArray(o, U * 3), A.fromArray(o, q * 3), m.fromArray(u, Q * 2), E.fromArray(u, U * 2), v.fromArray(u, q * 2);
17758
- var X = g.x - p.x, Z = A.x - p.x, W = g.y - p.y, G = A.y - p.y, ne = g.z - p.z, $ = A.z - p.z, ee = E.x - m.x, re = v.x - m.x, le = E.y - m.y, ie = v.y - m.y, oe = 1 / (ee * ie - re * le);
17759
- y.set((ie * X - le * Z) * oe, (ie * W - le * G) * oe, (ie * ne - le * $) * oe), b.set((ee * Z - re * X) * oe, (ee * G - re * W) * oe, (ee * $ - re * ne) * oe), f[Q].add(y), f[U].add(y), f[q].add(y), d[Q].add(b), d[U].add(b), d[q].add(b);
17758
+ var K = g.x - p.x, Y = A.x - p.x, Z = g.y - p.y, te = A.y - p.y, j = g.z - p.z, ee = A.z - p.z, W = E.x - m.x, re = v.x - m.x, le = E.y - m.y, ie = v.y - m.y, oe = 1 / (W * ie - re * le);
17759
+ y.set((ie * K - le * Y) * oe, (ie * Z - le * te) * oe, (ie * j - le * ee) * oe), b.set((W * Y - re * K) * oe, (W * te - re * Z) * oe, (W * ee - re * j) * oe), f[Q].add(y), f[U].add(y), f[q].add(y), d[Q].add(b), d[U].add(b), d[q].add(b);
17760
17760
  }
17761
17761
  var S = n.groups;
17762
17762
  S.length === 0 && (S = [{
@@ -17767,12 +17767,12 @@ var BufferGeometryUtils = {
17767
17767
  for (var C = S[h], M = C.start, F = C.count, H = M, w = M + F; H < w; H += 3)
17768
17768
  T(r[H + 0], r[H + 1], r[H + 2]);
17769
17769
  var I = new THREE.Vector3(), P = new THREE.Vector3(), O = new THREE.Vector3(), _ = new THREE.Vector3(), N, z, J;
17770
- function K(Q) {
17770
+ function G(Q) {
17771
17771
  O.fromArray(s, Q * 3), _.copy(O), z = f[Q], I.copy(z), I.sub(O.multiplyScalar(O.dot(z))).normalize(), P.crossVectors(_, z), J = P.dot(d[Q]), N = J < 0 ? -1 : 1, c[Q * 4] = I.x, c[Q * 4 + 1] = I.y, c[Q * 4 + 2] = I.z, c[Q * 4 + 3] = N;
17772
17772
  }
17773
17773
  for (var h = 0, R = S.length; h < R; ++h)
17774
17774
  for (var C = S[h], M = C.start, F = C.count, H = M, w = M + F; H < w; H += 3)
17775
- K(r[H + 0]), K(r[H + 1]), K(r[H + 2]);
17775
+ G(r[H + 0]), G(r[H + 1]), G(r[H + 2]);
17776
17776
  },
17777
17777
  /**
17778
17778
  * @param {Array<THREE.BufferGeometry>} geometries
@@ -17941,8 +17941,8 @@ function getEdgesBySphere(n, t, e) {
17941
17941
  var q = bvhMeshMap.get(U);
17942
17942
  if (q) {
17943
17943
  scratchMatrix4.copy(U.matrixWorld), scratchMatrix4Inverse.getInverse(scratchMatrix4), scratchSphere$1.copy(t).applyMatrix4(scratchMatrix4Inverse);
17944
- var X = q.trianglesInSphere(scratchSphere$1.center, scratchSphere$1.radius), Z = new THREE.BufferGeometry();
17945
- Z.setAttribute("position", new THREE.BufferAttribute(X, 3)), Z.applyMatrix4(U.matrixWorld), Z = BufferGeometryUtils.mergeVertices(Z, 0.01), g.push(Z);
17944
+ var K = q.trianglesInSphere(scratchSphere$1.center, scratchSphere$1.radius), Y = new THREE.BufferGeometry();
17945
+ Y.setAttribute("position", new THREE.BufferAttribute(K, 3)), Y.applyMatrix4(U.matrixWorld), Y = BufferGeometryUtils.mergeVertices(Y, 0.01), g.push(Y);
17946
17946
  }
17947
17947
  }
17948
17948
  }), g.length === 0)
@@ -17963,8 +17963,8 @@ function getEdgesBySphere(n, t, e) {
17963
17963
  for (var z in w) {
17964
17964
  var J = w[z];
17965
17965
  if (J.face2 === void 0 || b[J.face1].normal.dot(b[J.face2].normal) <= r) {
17966
- var K = y[J.index1], Q = y[J.index2];
17967
- o.push(new THREE.Line3(K, Q));
17966
+ var G = y[J.index1], Q = y[J.index2];
17967
+ o.push(new THREE.Line3(G, Q));
17968
17968
  }
17969
17969
  }
17970
17970
  y.length = 0, b.length = 0;
@@ -19583,8 +19583,8 @@ var Hammer = function(n, t, e, r) {
19583
19583
  ` + k + ` AT
19584
19584
  `;
19585
19585
  return function() {
19586
- var Y = new Error("get-stack-trace"), ue = Y && Y.stack ? Y.stack.replace(/^[^\(]+?[\n$]/gm, "").replace(/^\s+at\s+/gm, "").replace(/^Object.<anonymous>\s*\(/gm, "{anonymous}()@") : "Unknown Stack Trace", ge = n.console && (n.console.warn || n.console.log);
19587
- return ge && ge.call(n.console, D, ue), B.apply(this, arguments);
19586
+ var $ = new Error("get-stack-trace"), ue = $ && $.stack ? $.stack.replace(/^[^\(]+?[\n$]/gm, "").replace(/^\s+at\s+/gm, "").replace(/^Object.<anonymous>\s*\(/gm, "{anonymous}()@") : "Unknown Stack Trace", Ae = n.console && (n.console.warn || n.console.log);
19587
+ return Ae && Ae.call(n.console, D, ue), B.apply(this, arguments);
19588
19588
  };
19589
19589
  }
19590
19590
  var A;
@@ -19592,23 +19592,23 @@ var Hammer = function(n, t, e, r) {
19592
19592
  if (L === r || L === null)
19593
19593
  throw new TypeError("Cannot convert undefined or null to object");
19594
19594
  for (var k = Object(L), D = 1; D < arguments.length; D++) {
19595
- var Y = arguments[D];
19596
- if (Y !== r && Y !== null)
19597
- for (var ue in Y)
19598
- Y.hasOwnProperty(ue) && (k[ue] = Y[ue]);
19595
+ var $ = arguments[D];
19596
+ if ($ !== r && $ !== null)
19597
+ for (var ue in $)
19598
+ $.hasOwnProperty(ue) && (k[ue] = $[ue]);
19599
19599
  }
19600
19600
  return k;
19601
19601
  } : A = Object.assign;
19602
19602
  var m = g(function(L, k, D) {
19603
- for (var Y = Object.keys(k), ue = 0; ue < Y.length; )
19604
- (!D || D && L[Y[ue]] === r) && (L[Y[ue]] = k[Y[ue]]), ue++;
19603
+ for (var $ = Object.keys(k), ue = 0; ue < $.length; )
19604
+ (!D || D && L[$[ue]] === r) && (L[$[ue]] = k[$[ue]]), ue++;
19605
19605
  return L;
19606
19606
  }, "extend", "Use `assign`."), E = g(function(L, k) {
19607
19607
  return m(L, k, !0);
19608
19608
  }, "merge", "Use `assign`.");
19609
19609
  function v(B, L, k) {
19610
- var D = L.prototype, Y;
19611
- Y = B.prototype = Object.create(D), Y.constructor = B, Y._super = D, k && A(Y, k);
19610
+ var D = L.prototype, $;
19611
+ $ = B.prototype = Object.create(D), $.constructor = B, $._super = D, k && A($, k);
19612
19612
  }
19613
19613
  function y(B, L) {
19614
19614
  return function() {
@@ -19659,17 +19659,17 @@ var Hammer = function(n, t, e, r) {
19659
19659
  return Array.prototype.slice.call(B, 0);
19660
19660
  }
19661
19661
  function I(B, L, k) {
19662
- for (var D = [], Y = [], ue = 0; ue < B.length; ) {
19663
- var ge = B[ue][L];
19664
- H(Y, ge) < 0 && D.push(B[ue]), Y[ue] = ge, ue++;
19662
+ for (var D = [], $ = [], ue = 0; ue < B.length; ) {
19663
+ var Ae = B[ue][L];
19664
+ H($, Ae) < 0 && D.push(B[ue]), $[ue] = Ae, ue++;
19665
19665
  }
19666
- return D = D.sort(function(it, De) {
19667
- return it[L] > De[L];
19666
+ return D = D.sort(function(st, ke) {
19667
+ return st[L] > ke[L];
19668
19668
  }), D;
19669
19669
  }
19670
19670
  function P(B, L) {
19671
- for (var k, D, Y = L[0].toUpperCase() + L.slice(1), ue = 0; ue < o.length; ) {
19672
- if (k = o[ue], D = k ? k + Y : L, D in B)
19671
+ for (var k, D, $ = L[0].toUpperCase() + L.slice(1), ue = 0; ue < o.length; ) {
19672
+ if (k = o[ue], D = k ? k + $ : L, D in B)
19673
19673
  return D;
19674
19674
  ue++;
19675
19675
  }
@@ -19683,14 +19683,14 @@ var Hammer = function(n, t, e, r) {
19683
19683
  var L = B.ownerDocument || B;
19684
19684
  return L.defaultView || L.parentWindow || n;
19685
19685
  }
19686
- var z = /mobile|tablet|ip(ad|hone|od)|android/i, J = "ontouchstart" in n, K = P(n, "PointerEvent") !== r, Q = J && z.test(navigator.userAgent), U = "touch", q = "pen", X = "mouse", Z = "kinect", W = 25, G = 1, ne = 2, $ = 4, ee = 8, re = 1, le = 2, ie = 4, oe = 8, se = 16, fe = le | ie, he = oe | se, Re = fe | he, ce = ["x", "y"], Ce = ["clientX", "clientY"];
19687
- function j(B, L) {
19686
+ var z = /mobile|tablet|ip(ad|hone|od)|android/i, J = "ontouchstart" in n, G = P(n, "PointerEvent") !== r, Q = J && z.test(navigator.userAgent), U = "touch", q = "pen", K = "mouse", Y = "kinect", Z = 25, te = 1, j = 2, ee = 4, W = 8, re = 1, le = 2, ie = 4, oe = 8, se = 16, ce = le | ie, ve = oe | se, Te = ce | ve, fe = ["x", "y"], me = ["clientX", "clientY"];
19687
+ function X(B, L) {
19688
19688
  var k = this;
19689
19689
  this.manager = B, this.callback = L, this.element = B.element, this.target = B.options.inputTarget, this.domHandler = function(D) {
19690
19690
  b(B.options.enable, [B]) && k.handler(D);
19691
19691
  }, this.init();
19692
19692
  }
19693
- j.prototype = {
19693
+ X.prototype = {
19694
19694
  /**
19695
19695
  * should handle the inputEvent data and trigger the callback
19696
19696
  * @virtual
@@ -19710,44 +19710,44 @@ var Hammer = function(n, t, e, r) {
19710
19710
  this.evEl && R(this.element, this.evEl, this.domHandler), this.evTarget && R(this.target, this.evTarget, this.domHandler), this.evWin && R(N(this.element), this.evWin, this.domHandler);
19711
19711
  }
19712
19712
  };
19713
- function te(B) {
19713
+ function ne(B) {
19714
19714
  var L, k = B.options.inputClass;
19715
- return k ? L = k : K ? L = Ne : Q ? L = Fe : J ? L = Ye : L = Te, new L(B, V);
19715
+ return k ? L = k : G ? L = Fe : Q ? L = Oe : J ? L = Ze : L = Me, new L(B, V);
19716
19716
  }
19717
19717
  function V(B, L, k) {
19718
- var D = k.pointers.length, Y = k.changedPointers.length, ue = L & G && D - Y === 0, ge = L & ($ | ee) && D - Y === 0;
19719
- k.isFirst = !!ue, k.isFinal = !!ge, ue && (B.session = {}), k.eventType = L, be(B, k), B.emit("hammer.input", k), B.recognize(k), B.session.prevInput = k;
19720
- }
19721
- function be(B, L) {
19722
- var k = B.session, D = L.pointers, Y = D.length;
19723
- k.firstInput || (k.firstInput = Ve(L)), Y > 1 && !k.firstMultiple ? k.firstMultiple = Ve(L) : Y === 1 && (k.firstMultiple = !1);
19724
- var ue = k.firstInput, ge = k.firstMultiple, Xe = ge ? ge.center : ue.center, it = L.center = rt(D);
19725
- L.timeStamp = f(), L.deltaTime = L.timeStamp - ue.timeStamp, L.angle = pe(Xe, it), L.distance = ae(Xe, it), de(k, L), L.offsetDirection = me(L.deltaX, L.deltaY);
19726
- var De = We(L.deltaTime, L.deltaX, L.deltaY);
19727
- L.overallVelocityX = De.x, L.overallVelocityY = De.y, L.overallVelocity = c(De.x) > c(De.y) ? De.x : De.y, L.scale = ge ? Se(ge.pointers, D) : 1, L.rotation = ge ? we(ge.pointers, D) : 0, L.maxPointers = k.prevInput ? L.pointers.length > k.prevInput.maxPointers ? L.pointers.length : k.prevInput.maxPointers : L.pointers.length, ve(k, L);
19728
- var Et = B.element;
19729
- C(L.srcEvent.target, Et) && (Et = L.srcEvent.target), L.target = Et;
19718
+ var D = k.pointers.length, $ = k.changedPointers.length, ue = L & te && D - $ === 0, Ae = L & (ee | W) && D - $ === 0;
19719
+ k.isFirst = !!ue, k.isFinal = !!Ae, ue && (B.session = {}), k.eventType = L, Ee(B, k), B.emit("hammer.input", k), B.recognize(k), B.session.prevInput = k;
19720
+ }
19721
+ function Ee(B, L) {
19722
+ var k = B.session, D = L.pointers, $ = D.length;
19723
+ k.firstInput || (k.firstInput = Ne(L)), $ > 1 && !k.firstMultiple ? k.firstMultiple = Ne(L) : $ === 1 && (k.firstMultiple = !1);
19724
+ var ue = k.firstInput, Ae = k.firstMultiple, Xe = Ae ? Ae.center : ue.center, st = L.center = rt(D);
19725
+ L.timeStamp = f(), L.deltaTime = L.timeStamp - ue.timeStamp, L.angle = he(Xe, st), L.distance = ae(Xe, st), de(k, L), L.offsetDirection = ge(L.deltaX, L.deltaY);
19726
+ var ke = Ye(L.deltaTime, L.deltaX, L.deltaY);
19727
+ L.overallVelocityX = ke.x, L.overallVelocityY = ke.y, L.overallVelocity = c(ke.x) > c(ke.y) ? ke.x : ke.y, L.scale = Ae ? xe(Ae.pointers, D) : 1, L.rotation = Ae ? we(Ae.pointers, D) : 0, L.maxPointers = k.prevInput ? L.pointers.length > k.prevInput.maxPointers ? L.pointers.length : k.prevInput.maxPointers : L.pointers.length, pe(k, L);
19728
+ var At = B.element;
19729
+ C(L.srcEvent.target, At) && (At = L.srcEvent.target), L.target = At;
19730
19730
  }
19731
19731
  function de(B, L) {
19732
- var k = L.center, D = B.offsetDelta || {}, Y = B.prevDelta || {}, ue = B.prevInput || {};
19733
- (L.eventType === G || ue.eventType === $) && (Y = B.prevDelta = {
19732
+ var k = L.center, D = B.offsetDelta || {}, $ = B.prevDelta || {}, ue = B.prevInput || {};
19733
+ (L.eventType === te || ue.eventType === ee) && ($ = B.prevDelta = {
19734
19734
  x: ue.deltaX || 0,
19735
19735
  y: ue.deltaY || 0
19736
19736
  }, D = B.offsetDelta = {
19737
19737
  x: k.x,
19738
19738
  y: k.y
19739
- }), L.deltaX = Y.x + (k.x - D.x), L.deltaY = Y.y + (k.y - D.y);
19739
+ }), L.deltaX = $.x + (k.x - D.x), L.deltaY = $.y + (k.y - D.y);
19740
19740
  }
19741
- function ve(B, L) {
19742
- var k = B.lastInterval || L, D = L.timeStamp - k.timeStamp, Y, ue, ge, Xe;
19743
- if (L.eventType != ee && (D > W || k.velocity === r)) {
19744
- var it = L.deltaX - k.deltaX, De = L.deltaY - k.deltaY, Et = We(D, it, De);
19745
- ue = Et.x, ge = Et.y, Y = c(Et.x) > c(Et.y) ? Et.x : Et.y, Xe = me(it, De), B.lastInterval = L;
19741
+ function pe(B, L) {
19742
+ var k = B.lastInterval || L, D = L.timeStamp - k.timeStamp, $, ue, Ae, Xe;
19743
+ if (L.eventType != W && (D > Z || k.velocity === r)) {
19744
+ var st = L.deltaX - k.deltaX, ke = L.deltaY - k.deltaY, At = Ye(D, st, ke);
19745
+ ue = At.x, Ae = At.y, $ = c(At.x) > c(At.y) ? At.x : At.y, Xe = ge(st, ke), B.lastInterval = L;
19746
19746
  } else
19747
- Y = k.velocity, ue = k.velocityX, ge = k.velocityY, Xe = k.direction;
19748
- L.velocity = Y, L.velocityX = ue, L.velocityY = ge, L.direction = Xe;
19747
+ $ = k.velocity, ue = k.velocityX, Ae = k.velocityY, Xe = k.direction;
19748
+ L.velocity = $, L.velocityX = ue, L.velocityY = Ae, L.direction = Xe;
19749
19749
  }
19750
- function Ve(B) {
19750
+ function Ne(B) {
19751
19751
  for (var L = [], k = 0; k < B.pointers.length; )
19752
19752
  L[k] = {
19753
19753
  clientX: l(B.pointers[k].clientX),
@@ -19768,108 +19768,108 @@ var Hammer = function(n, t, e, r) {
19768
19768
  x: l(B[0].clientX),
19769
19769
  y: l(B[0].clientY)
19770
19770
  };
19771
- for (var k = 0, D = 0, Y = 0; Y < L; )
19772
- k += B[Y].clientX, D += B[Y].clientY, Y++;
19771
+ for (var k = 0, D = 0, $ = 0; $ < L; )
19772
+ k += B[$].clientX, D += B[$].clientY, $++;
19773
19773
  return {
19774
19774
  x: l(k / L),
19775
19775
  y: l(D / L)
19776
19776
  };
19777
19777
  }
19778
- function We(B, L, k) {
19778
+ function Ye(B, L, k) {
19779
19779
  return {
19780
19780
  x: L / B || 0,
19781
19781
  y: k / B || 0
19782
19782
  };
19783
19783
  }
19784
- function me(B, L) {
19784
+ function ge(B, L) {
19785
19785
  return B === L ? re : c(B) >= c(L) ? B < 0 ? le : ie : L < 0 ? oe : se;
19786
19786
  }
19787
19787
  function ae(B, L, k) {
19788
- k || (k = ce);
19789
- var D = L[k[0]] - B[k[0]], Y = L[k[1]] - B[k[1]];
19790
- return Math.sqrt(D * D + Y * Y);
19788
+ k || (k = fe);
19789
+ var D = L[k[0]] - B[k[0]], $ = L[k[1]] - B[k[1]];
19790
+ return Math.sqrt(D * D + $ * $);
19791
19791
  }
19792
- function pe(B, L, k) {
19793
- k || (k = ce);
19794
- var D = L[k[0]] - B[k[0]], Y = L[k[1]] - B[k[1]];
19795
- return Math.atan2(Y, D) * 180 / Math.PI;
19792
+ function he(B, L, k) {
19793
+ k || (k = fe);
19794
+ var D = L[k[0]] - B[k[0]], $ = L[k[1]] - B[k[1]];
19795
+ return Math.atan2($, D) * 180 / Math.PI;
19796
19796
  }
19797
19797
  function we(B, L) {
19798
- return pe(L[1], L[0], Ce) + pe(B[1], B[0], Ce);
19798
+ return he(L[1], L[0], me) + he(B[1], B[0], me);
19799
19799
  }
19800
- function Se(B, L) {
19801
- return ae(L[0], L[1], Ce) / ae(B[0], B[1], Ce);
19800
+ function xe(B, L) {
19801
+ return ae(L[0], L[1], me) / ae(B[0], B[1], me);
19802
19802
  }
19803
- var Pe = {
19804
- mousedown: G,
19805
- mousemove: ne,
19806
- mouseup: $
19807
- }, Le = "mousedown", Ae = "mousemove mouseup";
19808
- function Te() {
19809
- this.evEl = Le, this.evWin = Ae, this.pressed = !1, j.apply(this, arguments);
19803
+ var He = {
19804
+ mousedown: te,
19805
+ mousemove: j,
19806
+ mouseup: ee
19807
+ }, _e = "mousedown", be = "mousemove mouseup";
19808
+ function Me() {
19809
+ this.evEl = _e, this.evWin = be, this.pressed = !1, X.apply(this, arguments);
19810
19810
  }
19811
- v(Te, j, {
19811
+ v(Me, X, {
19812
19812
  /**
19813
19813
  * handle mouse events
19814
19814
  * @param {Object} ev
19815
19815
  */
19816
19816
  handler: function(L) {
19817
- var k = Pe[L.type];
19818
- k & G && (L.button === 0 || L.button === 2) && (this.pressed = !0), k & ne && L.which !== 1 && (k = $), this.pressed && (k & $ && (this.pressed = !1), this.callback(this.manager, k, {
19817
+ var k = He[L.type];
19818
+ k & te && (L.button === 0 || L.button === 2) && (this.pressed = !0), k & j && L.which !== 1 && (k = ee), this.pressed && (k & ee && (this.pressed = !1), this.callback(this.manager, k, {
19819
19819
  pointers: [L],
19820
19820
  changedPointers: [L],
19821
- pointerType: X,
19821
+ pointerType: K,
19822
19822
  srcEvent: L
19823
19823
  }));
19824
19824
  }
19825
19825
  });
19826
19826
  var Ie = {
19827
- pointerdown: G,
19828
- pointermove: ne,
19829
- pointerup: $,
19830
- pointercancel: ee,
19831
- pointerout: ee
19827
+ pointerdown: te,
19828
+ pointermove: j,
19829
+ pointerup: ee,
19830
+ pointercancel: W,
19831
+ pointerout: W
19832
19832
  }, Be = {
19833
19833
  2: U,
19834
19834
  3: q,
19835
- 4: X,
19836
- 5: Z
19835
+ 4: K,
19836
+ 5: Y
19837
19837
  // see https://twitter.com/jacobrossi/status/480596438489890816
19838
- }, qe = "pointerdown", ke = "pointermove pointerup pointercancel";
19839
- n.MSPointerEvent && !n.PointerEvent && (qe = "MSPointerDown", ke = "MSPointerMove MSPointerUp MSPointerCancel");
19840
- function Ne() {
19841
- this.evEl = qe, this.evWin = ke, j.apply(this, arguments), this.store = this.manager.session.pointerEvents = [];
19838
+ }, ze = "pointerdown", Ge = "pointermove pointerup pointercancel";
19839
+ n.MSPointerEvent && !n.PointerEvent && (ze = "MSPointerDown", Ge = "MSPointerMove MSPointerUp MSPointerCancel");
19840
+ function Fe() {
19841
+ this.evEl = ze, this.evWin = Ge, X.apply(this, arguments), this.store = this.manager.session.pointerEvents = [];
19842
19842
  }
19843
- v(Ne, j, {
19843
+ v(Fe, X, {
19844
19844
  /**
19845
19845
  * handle mouse events
19846
19846
  * @param {Object} ev
19847
19847
  */
19848
19848
  handler: function(L) {
19849
- var k = this.store, D = !1, Y = !1, ue = L.type.toLowerCase().replace("ms", ""), ge = Ie[ue], Xe = Be[L.pointerType] || L.pointerType, it = Xe == U, De = H(k, L.pointerId, "pointerId");
19850
- ge & G && (L.button === 0 || L.button === 2 || it) ? De < 0 && (k.push(L), De = k.length - 1) : ge & ($ | ee) ? D = !0 : !it && L.buttons === 0 && (D = !0, Y = !0, ge = Ie.pointerup), !(De < 0) && (Y || (k[De] = L), this.callback(this.manager, ge, {
19849
+ var k = this.store, D = !1, $ = !1, ue = L.type.toLowerCase().replace("ms", ""), Ae = Ie[ue], Xe = Be[L.pointerType] || L.pointerType, st = Xe == U, ke = H(k, L.pointerId, "pointerId");
19850
+ Ae & te && (L.button === 0 || L.button === 2 || st) ? ke < 0 && (k.push(L), ke = k.length - 1) : Ae & (ee | W) ? D = !0 : !st && L.buttons === 0 && (D = !0, $ = !0, Ae = Ie.pointerup), !(ke < 0) && ($ || (k[ke] = L), this.callback(this.manager, Ae, {
19851
19851
  pointers: k,
19852
19852
  changedPointers: [L],
19853
19853
  pointerType: Xe,
19854
- srcEvent: k[De]
19855
- }), D && k.splice(De, 1));
19854
+ srcEvent: k[ke]
19855
+ }), D && k.splice(ke, 1));
19856
19856
  }
19857
19857
  });
19858
- var _e = {
19859
- touchstart: G,
19860
- touchmove: ne,
19861
- touchend: $,
19862
- touchcancel: ee
19863
- }, Ue = "touchstart", ze = "touchstart touchmove touchend touchcancel";
19858
+ var Ve = {
19859
+ touchstart: te,
19860
+ touchmove: j,
19861
+ touchend: ee,
19862
+ touchcancel: W
19863
+ }, $e = "touchstart", Pe = "touchstart touchmove touchend touchcancel";
19864
19864
  function je() {
19865
- this.evTarget = Ue, this.evWin = ze, this.started = !1, j.apply(this, arguments);
19865
+ this.evTarget = $e, this.evWin = Pe, this.started = !1, X.apply(this, arguments);
19866
19866
  }
19867
- v(je, j, {
19867
+ v(je, X, {
19868
19868
  handler: function(L) {
19869
- var k = _e[L.type];
19870
- if (k === G && (this.started = !0), !!this.started) {
19871
- var D = xe.call(this, L, k);
19872
- k & ($ | ee) && D[0].length - D[1].length === 0 && (this.started = !1), this.callback(this.manager, k, {
19869
+ var k = Ve[L.type];
19870
+ if (k === te && (this.started = !0), !!this.started) {
19871
+ var D = Re.call(this, L, k);
19872
+ k & (ee | W) && D[0].length - D[1].length === 0 && (this.started = !1), this.callback(this.manager, k, {
19873
19873
  pointers: D[0],
19874
19874
  changedPointers: D[1],
19875
19875
  pointerType: U,
@@ -19878,22 +19878,22 @@ var Hammer = function(n, t, e, r) {
19878
19878
  }
19879
19879
  }
19880
19880
  });
19881
- function xe(B, L) {
19881
+ function Re(B, L) {
19882
19882
  var k = w(B.touches), D = w(B.changedTouches);
19883
- return L & ($ | ee) && (k = I(k.concat(D), "identifier")), [k, D];
19884
- }
19885
- var Oe = {
19886
- touchstart: G,
19887
- touchmove: ne,
19888
- touchend: $,
19889
- touchcancel: ee
19890
- }, Me = "touchstart touchmove touchend touchcancel";
19891
- function Fe() {
19892
- this.evTarget = Me, this.targetIds = {}, j.apply(this, arguments);
19893
- }
19894
- v(Fe, j, {
19883
+ return L & (ee | W) && (k = I(k.concat(D), "identifier")), [k, D];
19884
+ }
19885
+ var We = {
19886
+ touchstart: te,
19887
+ touchmove: j,
19888
+ touchend: ee,
19889
+ touchcancel: W
19890
+ }, Se = "touchstart touchmove touchend touchcancel";
19891
+ function Oe() {
19892
+ this.evTarget = Se, this.targetIds = {}, X.apply(this, arguments);
19893
+ }
19894
+ v(Oe, X, {
19895
19895
  handler: function(L) {
19896
- var k = Oe[L.type], D = He.call(this, L, k);
19896
+ var k = We[L.type], D = Le.call(this, L, k);
19897
19897
  D && this.callback(this.manager, k, {
19898
19898
  pointers: D[0],
19899
19899
  changedPointers: D[1],
@@ -19902,18 +19902,18 @@ var Hammer = function(n, t, e, r) {
19902
19902
  });
19903
19903
  }
19904
19904
  });
19905
- function He(B, L) {
19905
+ function Le(B, L) {
19906
19906
  var k = w(B.touches), D = this.targetIds;
19907
- if (L & (G | ne) && k.length === 1)
19907
+ if (L & (te | j) && k.length === 1)
19908
19908
  return D[k[0].identifier] = !0, [k, k];
19909
- var Y, ue, ge = w(B.changedTouches), Xe = [], it = this.target;
19910
- if (ue = k.filter(function(De) {
19911
- return C(De.target, it);
19912
- }), L === G)
19913
- for (Y = 0; Y < ue.length; )
19914
- D[ue[Y].identifier] = !0, Y++;
19915
- for (Y = 0; Y < ge.length; )
19916
- D[ge[Y].identifier] && Xe.push(ge[Y]), L & ($ | ee) && delete D[ge[Y].identifier], Y++;
19909
+ var $, ue, Ae = w(B.changedTouches), Xe = [], st = this.target;
19910
+ if (ue = k.filter(function(ke) {
19911
+ return C(ke.target, st);
19912
+ }), L === te)
19913
+ for ($ = 0; $ < ue.length; )
19914
+ D[ue[$].identifier] = !0, $++;
19915
+ for ($ = 0; $ < Ae.length; )
19916
+ D[Ae[$].identifier] && Xe.push(Ae[$]), L & (ee | W) && delete D[Ae[$].identifier], $++;
19917
19917
  if (Xe.length)
19918
19918
  return [
19919
19919
  // merge targetTouches with changedTargetTouches so it contains ALL touches, including 'end' and 'cancel'
@@ -19921,13 +19921,13 @@ var Hammer = function(n, t, e, r) {
19921
19921
  Xe
19922
19922
  ];
19923
19923
  }
19924
- var Ge = 2500, Ze = 25;
19925
- function Ye() {
19926
- j.apply(this, arguments);
19924
+ var qe = 2500, nt = 25;
19925
+ function Ze() {
19926
+ X.apply(this, arguments);
19927
19927
  var B = y(this.handler, this);
19928
- this.touch = new Fe(this.manager, B), this.mouse = new Te(this.manager, B), this.primaryTouch = null, this.lastTouches = [];
19928
+ this.touch = new Oe(this.manager, B), this.mouse = new Me(this.manager, B), this.primaryTouch = null, this.lastTouches = [];
19929
19929
  }
19930
- v(Ye, j, {
19930
+ v(Ze, X, {
19931
19931
  /**
19932
19932
  * handle mouse and touch events
19933
19933
  * @param {Hammer} manager
@@ -19935,11 +19935,11 @@ var Hammer = function(n, t, e, r) {
19935
19935
  * @param {Object} inputData
19936
19936
  */
19937
19937
  handler: function(L, k, D) {
19938
- var Y = D.pointerType == U, ue = D.pointerType == X;
19938
+ var $ = D.pointerType == U, ue = D.pointerType == K;
19939
19939
  if (!(ue && D.sourceCapabilities && D.sourceCapabilities.firesTouchEvents)) {
19940
- if (Y)
19941
- Qe.call(this, k, D);
19942
- else if (ue && wt.call(this, D))
19940
+ if ($)
19941
+ ut.call(this, k, D);
19942
+ else if (ue && Ce.call(this, D))
19943
19943
  return;
19944
19944
  this.callback(L, k, D);
19945
19945
  }
@@ -19951,40 +19951,40 @@ var Hammer = function(n, t, e, r) {
19951
19951
  this.touch.destroy(), this.mouse.destroy();
19952
19952
  }
19953
19953
  });
19954
- function Qe(B, L) {
19955
- B & G ? (this.primaryTouch = L.changedPointers[0].identifier, ye.call(this, L)) : B & ($ | ee) && ye.call(this, L);
19954
+ function ut(B, L) {
19955
+ B & te ? (this.primaryTouch = L.changedPointers[0].identifier, Ue.call(this, L)) : B & (ee | W) && Ue.call(this, L);
19956
19956
  }
19957
- function ye(B) {
19957
+ function Ue(B) {
19958
19958
  var L = B.changedPointers[0];
19959
19959
  if (L.identifier === this.primaryTouch) {
19960
19960
  var k = { x: L.clientX, y: L.clientY };
19961
19961
  this.lastTouches.push(k);
19962
- var D = this.lastTouches, Y = function() {
19962
+ var D = this.lastTouches, $ = function() {
19963
19963
  var ue = D.indexOf(k);
19964
19964
  ue > -1 && D.splice(ue, 1);
19965
19965
  };
19966
- setTimeout(Y, Ge);
19966
+ setTimeout($, qe);
19967
19967
  }
19968
19968
  }
19969
- function wt(B) {
19969
+ function Ce(B) {
19970
19970
  for (var L = B.srcEvent.clientX, k = B.srcEvent.clientY, D = 0; D < this.lastTouches.length; D++) {
19971
- var Y = this.lastTouches[D], ue = Math.abs(L - Y.x), ge = Math.abs(k - Y.y);
19972
- if (ue <= Ze && ge <= Ze)
19971
+ var $ = this.lastTouches[D], ue = Math.abs(L - $.x), Ae = Math.abs(k - $.y);
19972
+ if (ue <= nt && Ae <= nt)
19973
19973
  return !0;
19974
19974
  }
19975
19975
  return !1;
19976
19976
  }
19977
- var vt = s ? P(s.style, "touchAction") : r, at = vt !== r, Je = "compute", ft = "auto", nt = "manipulation", Ke = "none", Ee = "pan-x", $e = "pan-y", bt = Ot();
19978
- function Tt(B, L) {
19977
+ var yt = s ? P(s.style, "touchAction") : r, it = yt !== r, Ke = "compute", lt = "auto", ft = "manipulation", Qe = "none", ye = "pan-x", tt = "pan-y", Et = Bt();
19978
+ function It(B, L) {
19979
19979
  this.manager = B, this.set(L);
19980
19980
  }
19981
- Tt.prototype = {
19981
+ It.prototype = {
19982
19982
  /**
19983
19983
  * set the touchAction value on the element or enable the polyfill
19984
19984
  * @param {String} value
19985
19985
  */
19986
19986
  set: function(B) {
19987
- B == Je && (B = this.compute()), at && this.manager.element.style && bt[B] && (this.manager.element.style[vt] = B), this.actions = B.toLowerCase().trim();
19987
+ B == Ke && (B = this.compute()), it && this.manager.element.style && Et[B] && (this.manager.element.style[yt] = B), this.actions = B.toLowerCase().trim();
19988
19988
  },
19989
19989
  /**
19990
19990
  * just re-set the touchAction value
@@ -20000,7 +20000,7 @@ var Hammer = function(n, t, e, r) {
20000
20000
  var B = [];
20001
20001
  return p(this.manager.recognizers, function(L) {
20002
20002
  b(L.options.enable, [L]) && (B = B.concat(L.getTouchAction()));
20003
- }), Ht(B.join(" "));
20003
+ }), xt(B.join(" "));
20004
20004
  },
20005
20005
  /**
20006
20006
  * this method is called on each input cycle and provides the preventing of the browser behavior
@@ -20012,13 +20012,13 @@ var Hammer = function(n, t, e, r) {
20012
20012
  L.preventDefault();
20013
20013
  return;
20014
20014
  }
20015
- var D = this.actions, Y = M(D, Ke) && !bt[Ke], ue = M(D, $e) && !bt[$e], ge = M(D, Ee) && !bt[Ee];
20016
- if (Y) {
20017
- var Xe = B.pointers.length === 1, it = B.distance < 2, De = B.deltaTime < 250;
20018
- if (Xe && it && De)
20015
+ var D = this.actions, $ = M(D, Qe) && !Et[Qe], ue = M(D, tt) && !Et[tt], Ae = M(D, ye) && !Et[ye];
20016
+ if ($) {
20017
+ var Xe = B.pointers.length === 1, st = B.distance < 2, ke = B.deltaTime < 250;
20018
+ if (Xe && st && ke)
20019
20019
  return;
20020
20020
  }
20021
- if (!(ge && ue) && (Y || ue && k & fe || ge && k & he))
20021
+ if (!(Ae && ue) && ($ || ue && k & ce || Ae && k & ve))
20022
20022
  return this.preventSrc(L);
20023
20023
  },
20024
20024
  /**
@@ -20029,25 +20029,25 @@ var Hammer = function(n, t, e, r) {
20029
20029
  this.manager.session.prevented = !0, B.preventDefault();
20030
20030
  }
20031
20031
  };
20032
- function Ht(B) {
20033
- if (M(B, Ke))
20034
- return Ke;
20035
- var L = M(B, Ee), k = M(B, $e);
20036
- return L && k ? Ke : L || k ? L ? Ee : $e : M(B, nt) ? nt : ft;
20037
- }
20038
- function Ot() {
20039
- if (!at)
20032
+ function xt(B) {
20033
+ if (M(B, Qe))
20034
+ return Qe;
20035
+ var L = M(B, ye), k = M(B, tt);
20036
+ return L && k ? Qe : L || k ? L ? ye : tt : M(B, ft) ? ft : lt;
20037
+ }
20038
+ function Bt() {
20039
+ if (!it)
20040
20040
  return !1;
20041
20041
  var B = {}, L = n.CSS && n.CSS.supports;
20042
20042
  return ["auto", "manipulation", "pan-y", "pan-x", "pan-x pan-y", "none"].forEach(function(k) {
20043
20043
  B[k] = L ? n.CSS.supports("touch-action", k) : !0;
20044
20044
  }), B;
20045
20045
  }
20046
- var ot = 1, tt = 2, St = 4, gt = 8, dt = gt, At = 16, ht = 32;
20047
- function pt(B) {
20048
- this.options = A({}, this.defaults, B || {}), this.id = _(), this.manager = null, this.options.enable = T(this.options.enable, !0), this.state = ot, this.simultaneous = {}, this.requireFail = [];
20046
+ var Rt = 1, De = 2, gt = 4, ht = 8, pt = ht, bt = 16, at = 32;
20047
+ function vt(B) {
20048
+ this.options = A({}, this.defaults, B || {}), this.id = _(), this.manager = null, this.options.enable = T(this.options.enable, !0), this.state = Rt, this.simultaneous = {}, this.requireFail = [];
20049
20049
  }
20050
- pt.prototype = {
20050
+ vt.prototype = {
20051
20051
  /**
20052
20052
  * @virtual
20053
20053
  * @type {Object}
@@ -20070,7 +20070,7 @@ var Hammer = function(n, t, e, r) {
20070
20070
  if (h(B, "recognizeWith", this))
20071
20071
  return this;
20072
20072
  var L = this.simultaneous;
20073
- return B = lt(B, this), L[B.id] || (L[B.id] = B, B.recognizeWith(this)), this;
20073
+ return B = ot(B, this), L[B.id] || (L[B.id] = B, B.recognizeWith(this)), this;
20074
20074
  },
20075
20075
  /**
20076
20076
  * drop the simultaneous link. it doesnt remove the link on the other recognizer.
@@ -20078,7 +20078,7 @@ var Hammer = function(n, t, e, r) {
20078
20078
  * @returns {Recognizer} this
20079
20079
  */
20080
20080
  dropRecognizeWith: function(B) {
20081
- return h(B, "dropRecognizeWith", this) ? this : (B = lt(B, this), delete this.simultaneous[B.id], this);
20081
+ return h(B, "dropRecognizeWith", this) ? this : (B = ot(B, this), delete this.simultaneous[B.id], this);
20082
20082
  },
20083
20083
  /**
20084
20084
  * recognizer can only run when an other is failing
@@ -20089,7 +20089,7 @@ var Hammer = function(n, t, e, r) {
20089
20089
  if (h(B, "requireFailure", this))
20090
20090
  return this;
20091
20091
  var L = this.requireFail;
20092
- return B = lt(B, this), H(L, B) === -1 && (L.push(B), B.requireFailure(this)), this;
20092
+ return B = ot(B, this), H(L, B) === -1 && (L.push(B), B.requireFailure(this)), this;
20093
20093
  },
20094
20094
  /**
20095
20095
  * drop the requireFailure link. it does not remove the link on the other recognizer.
@@ -20099,7 +20099,7 @@ var Hammer = function(n, t, e, r) {
20099
20099
  dropRequireFailure: function(B) {
20100
20100
  if (h(B, "dropRequireFailure", this))
20101
20101
  return this;
20102
- B = lt(B, this);
20102
+ B = ot(B, this);
20103
20103
  var L = H(this.requireFail, B);
20104
20104
  return L > -1 && this.requireFail.splice(L, 1), this;
20105
20105
  },
@@ -20125,10 +20125,10 @@ var Hammer = function(n, t, e, r) {
20125
20125
  */
20126
20126
  emit: function(B) {
20127
20127
  var L = this, k = this.state;
20128
- function D(Y) {
20129
- L.manager.emit(Y, B);
20128
+ function D($) {
20129
+ L.manager.emit($, B);
20130
20130
  }
20131
- k < gt && D(L.options.event + st(k)), D(L.options.event), B.additionalEvent && D(B.additionalEvent), k >= gt && D(L.options.event + st(k));
20131
+ k < ht && D(L.options.event + Ht(k)), D(L.options.event), B.additionalEvent && D(B.additionalEvent), k >= ht && D(L.options.event + Ht(k));
20132
20132
  },
20133
20133
  /**
20134
20134
  * Check that all the require failure recognizers has failed,
@@ -20139,7 +20139,7 @@ var Hammer = function(n, t, e, r) {
20139
20139
  tryEmit: function(B) {
20140
20140
  if (this.canEmit())
20141
20141
  return this.emit(B);
20142
- this.state = ht;
20142
+ this.state = at;
20143
20143
  },
20144
20144
  /**
20145
20145
  * can we emit?
@@ -20147,7 +20147,7 @@ var Hammer = function(n, t, e, r) {
20147
20147
  */
20148
20148
  canEmit: function() {
20149
20149
  for (var B = 0; B < this.requireFail.length; ) {
20150
- if (!(this.requireFail[B].state & (ht | ot)))
20150
+ if (!(this.requireFail[B].state & (at | Rt)))
20151
20151
  return !1;
20152
20152
  B++;
20153
20153
  }
@@ -20160,10 +20160,10 @@ var Hammer = function(n, t, e, r) {
20160
20160
  recognize: function(B) {
20161
20161
  var L = A({}, B);
20162
20162
  if (!b(this.options.enable, [this, L])) {
20163
- this.reset(), this.state = ht;
20163
+ this.reset(), this.state = at;
20164
20164
  return;
20165
20165
  }
20166
- this.state & (dt | At | ht) && (this.state = ot), this.state = this.process(L), this.state & (tt | St | gt | At) && this.tryEmit(L);
20166
+ this.state & (pt | bt | at) && (this.state = Rt), this.state = this.process(L), this.state & (De | gt | ht | bt) && this.tryEmit(L);
20167
20167
  },
20168
20168
  /**
20169
20169
  * return the state of the recognizer
@@ -20190,20 +20190,20 @@ var Hammer = function(n, t, e, r) {
20190
20190
  reset: function() {
20191
20191
  }
20192
20192
  };
20193
- function st(B) {
20194
- return B & At ? "cancel" : B & gt ? "end" : B & St ? "move" : B & tt ? "start" : "";
20193
+ function Ht(B) {
20194
+ return B & bt ? "cancel" : B & ht ? "end" : B & gt ? "move" : B & De ? "start" : "";
20195
20195
  }
20196
- function ut(B) {
20196
+ function ct(B) {
20197
20197
  return B == se ? "down" : B == oe ? "up" : B == le ? "left" : B == ie ? "right" : "";
20198
20198
  }
20199
- function lt(B, L) {
20199
+ function ot(B, L) {
20200
20200
  var k = L.manager;
20201
20201
  return k ? k.get(B) : B;
20202
20202
  }
20203
- function ct() {
20204
- pt.apply(this, arguments);
20203
+ function Je() {
20204
+ vt.apply(this, arguments);
20205
20205
  }
20206
- v(ct, pt, {
20206
+ v(Je, vt, {
20207
20207
  /**
20208
20208
  * @namespace
20209
20209
  * @memberof AttrRecognizer
@@ -20232,14 +20232,14 @@ var Hammer = function(n, t, e, r) {
20232
20232
  * @returns {*} State
20233
20233
  */
20234
20234
  process: function(B) {
20235
- var L = this.state, k = B.eventType, D = L & (tt | St), Y = this.attrTest(B);
20236
- return D && (k & ee || !Y) ? L | At : D || Y ? k & $ ? L | gt : L & tt ? L | St : tt : ht;
20235
+ var L = this.state, k = B.eventType, D = L & (De | gt), $ = this.attrTest(B);
20236
+ return D && (k & W || !$) ? L | bt : D || $ ? k & ee ? L | ht : L & De ? L | gt : De : at;
20237
20237
  }
20238
20238
  });
20239
- function It() {
20240
- ct.apply(this, arguments), this.pX = null, this.pY = null;
20239
+ function Pt() {
20240
+ Je.apply(this, arguments), this.pX = null, this.pY = null;
20241
20241
  }
20242
- v(It, ct, {
20242
+ v(Pt, Je, {
20243
20243
  /**
20244
20244
  * @namespace
20245
20245
  * @memberof PanRecognizer
@@ -20248,29 +20248,29 @@ var Hammer = function(n, t, e, r) {
20248
20248
  event: "pan",
20249
20249
  threshold: 10,
20250
20250
  pointers: 1,
20251
- direction: Re
20251
+ direction: Te
20252
20252
  },
20253
20253
  getTouchAction: function() {
20254
20254
  var B = this.options.direction, L = [];
20255
- return B & fe && L.push($e), B & he && L.push(Ee), L;
20255
+ return B & ce && L.push(tt), B & ve && L.push(ye), L;
20256
20256
  },
20257
20257
  directionTest: function(B) {
20258
- var L = this.options, k = !0, D = B.distance, Y = B.direction, ue = B.deltaX, ge = B.deltaY;
20259
- return Y & L.direction || (L.direction & fe ? (Y = ue === 0 ? re : ue < 0 ? le : ie, k = ue != this.pX, D = Math.abs(B.deltaX)) : (Y = ge === 0 ? re : ge < 0 ? oe : se, k = ge != this.pY, D = Math.abs(B.deltaY))), B.direction = Y, k && D > L.threshold && Y & L.direction;
20258
+ var L = this.options, k = !0, D = B.distance, $ = B.direction, ue = B.deltaX, Ae = B.deltaY;
20259
+ return $ & L.direction || (L.direction & ce ? ($ = ue === 0 ? re : ue < 0 ? le : ie, k = ue != this.pX, D = Math.abs(B.deltaX)) : ($ = Ae === 0 ? re : Ae < 0 ? oe : se, k = Ae != this.pY, D = Math.abs(B.deltaY))), B.direction = $, k && D > L.threshold && $ & L.direction;
20260
20260
  },
20261
20261
  attrTest: function(B) {
20262
- return ct.prototype.attrTest.call(this, B) && (this.state & tt || !(this.state & tt) && this.directionTest(B));
20262
+ return Je.prototype.attrTest.call(this, B) && (this.state & De || !(this.state & De) && this.directionTest(B));
20263
20263
  },
20264
20264
  emit: function(B) {
20265
20265
  this.pX = B.deltaX, this.pY = B.deltaY;
20266
- var L = ut(B.direction);
20266
+ var L = ct(B.direction);
20267
20267
  L && (B.additionalEvent = this.options.event + L), this._super.emit.call(this, B);
20268
20268
  }
20269
20269
  });
20270
20270
  function Ft() {
20271
- ct.apply(this, arguments);
20271
+ Je.apply(this, arguments);
20272
20272
  }
20273
- v(Ft, ct, {
20273
+ v(Ft, Je, {
20274
20274
  /**
20275
20275
  * @namespace
20276
20276
  * @memberof PinchRecognizer
@@ -20281,10 +20281,10 @@ var Hammer = function(n, t, e, r) {
20281
20281
  pointers: 2
20282
20282
  },
20283
20283
  getTouchAction: function() {
20284
- return [Ke];
20284
+ return [Qe];
20285
20285
  },
20286
20286
  attrTest: function(B) {
20287
- return this._super.attrTest.call(this, B) && (Math.abs(B.scale - 1) > this.options.threshold || this.state & tt);
20287
+ return this._super.attrTest.call(this, B) && (Math.abs(B.scale - 1) > this.options.threshold || this.state & De);
20288
20288
  },
20289
20289
  emit: function(B) {
20290
20290
  if (B.scale !== 1) {
@@ -20295,9 +20295,9 @@ var Hammer = function(n, t, e, r) {
20295
20295
  }
20296
20296
  });
20297
20297
  function Lt() {
20298
- pt.apply(this, arguments), this._timer = null, this._input = null;
20298
+ vt.apply(this, arguments), this._timer = null, this._input = null;
20299
20299
  }
20300
- v(Lt, pt, {
20300
+ v(Lt, vt, {
20301
20301
  /**
20302
20302
  * @namespace
20303
20303
  * @memberof PressRecognizer
@@ -20311,31 +20311,31 @@ var Hammer = function(n, t, e, r) {
20311
20311
  // a minimal movement is ok, but keep it low
20312
20312
  },
20313
20313
  getTouchAction: function() {
20314
- return [ft];
20314
+ return [lt];
20315
20315
  },
20316
20316
  process: function(B) {
20317
- var L = this.options, k = B.pointers.length === L.pointers, D = B.distance < L.threshold, Y = B.deltaTime > L.time;
20318
- if (this._input = B, !D || !k || B.eventType & ($ | ee) && !Y)
20317
+ var L = this.options, k = B.pointers.length === L.pointers, D = B.distance < L.threshold, $ = B.deltaTime > L.time;
20318
+ if (this._input = B, !D || !k || B.eventType & (ee | W) && !$)
20319
20319
  this.reset();
20320
- else if (B.eventType & G)
20320
+ else if (B.eventType & te)
20321
20321
  this.reset(), this._timer = d(function() {
20322
- this.state = dt, this.tryEmit();
20322
+ this.state = pt, this.tryEmit();
20323
20323
  }, L.time, this);
20324
- else if (B.eventType & $)
20325
- return dt;
20326
- return ht;
20324
+ else if (B.eventType & ee)
20325
+ return pt;
20326
+ return at;
20327
20327
  },
20328
20328
  reset: function() {
20329
20329
  clearTimeout(this._timer);
20330
20330
  },
20331
20331
  emit: function(B) {
20332
- this.state === dt && (B && B.eventType & $ ? this.manager.emit(this.options.event + "up", B) : (this._input.timeStamp = f(), this.manager.emit(this.options.event, this._input)));
20332
+ this.state === pt && (B && B.eventType & ee ? this.manager.emit(this.options.event + "up", B) : (this._input.timeStamp = f(), this.manager.emit(this.options.event, this._input)));
20333
20333
  }
20334
20334
  });
20335
- function Mt() {
20336
- ct.apply(this, arguments);
20335
+ function _t() {
20336
+ Je.apply(this, arguments);
20337
20337
  }
20338
- v(Mt, ct, {
20338
+ v(_t, Je, {
20339
20339
  /**
20340
20340
  * @namespace
20341
20341
  * @memberof RotateRecognizer
@@ -20346,16 +20346,16 @@ var Hammer = function(n, t, e, r) {
20346
20346
  pointers: 2
20347
20347
  },
20348
20348
  getTouchAction: function() {
20349
- return [Ke];
20349
+ return [Qe];
20350
20350
  },
20351
20351
  attrTest: function(B) {
20352
- return this._super.attrTest.call(this, B) && (Math.abs(B.rotation) > this.options.threshold || this.state & tt);
20352
+ return this._super.attrTest.call(this, B) && (Math.abs(B.rotation) > this.options.threshold || this.state & De);
20353
20353
  }
20354
20354
  });
20355
- function yt() {
20356
- ct.apply(this, arguments);
20355
+ function Ct() {
20356
+ Je.apply(this, arguments);
20357
20357
  }
20358
- v(yt, ct, {
20358
+ v(Ct, Je, {
20359
20359
  /**
20360
20360
  * @namespace
20361
20361
  * @memberof SwipeRecognizer
@@ -20364,25 +20364,25 @@ var Hammer = function(n, t, e, r) {
20364
20364
  event: "swipe",
20365
20365
  threshold: 10,
20366
20366
  velocity: 0.3,
20367
- direction: fe | he,
20367
+ direction: ce | ve,
20368
20368
  pointers: 1
20369
20369
  },
20370
20370
  getTouchAction: function() {
20371
- return It.prototype.getTouchAction.call(this);
20371
+ return Pt.prototype.getTouchAction.call(this);
20372
20372
  },
20373
20373
  attrTest: function(B) {
20374
20374
  var L = this.options.direction, k;
20375
- return L & (fe | he) ? k = B.overallVelocity : L & fe ? k = B.overallVelocityX : L & he && (k = B.overallVelocityY), this._super.attrTest.call(this, B) && L & B.offsetDirection && B.distance > this.options.threshold && B.maxPointers == this.options.pointers && c(k) > this.options.velocity && B.eventType & $;
20375
+ return L & (ce | ve) ? k = B.overallVelocity : L & ce ? k = B.overallVelocityX : L & ve && (k = B.overallVelocityY), this._super.attrTest.call(this, B) && L & B.offsetDirection && B.distance > this.options.threshold && B.maxPointers == this.options.pointers && c(k) > this.options.velocity && B.eventType & ee;
20376
20376
  },
20377
20377
  emit: function(B) {
20378
- var L = ut(B.offsetDirection);
20378
+ var L = ct(B.offsetDirection);
20379
20379
  L && this.manager.emit(this.options.event + L, B), this.manager.emit(this.options.event, B);
20380
20380
  }
20381
20381
  });
20382
- function Pt() {
20383
- pt.apply(this, arguments), this.pTime = !1, this.pCenter = !1, this._timer = null, this._input = null, this.count = 0;
20382
+ function mt() {
20383
+ vt.apply(this, arguments), this.pTime = !1, this.pCenter = !1, this._timer = null, this._input = null, this.count = 0;
20384
20384
  }
20385
- v(Pt, pt, {
20385
+ v(mt, vt, {
20386
20386
  /**
20387
20387
  * @namespace
20388
20388
  * @memberof PinchRecognizer
@@ -20401,41 +20401,41 @@ var Hammer = function(n, t, e, r) {
20401
20401
  // a multi-tap can be a bit off the initial position
20402
20402
  },
20403
20403
  getTouchAction: function() {
20404
- return [nt];
20404
+ return [ft];
20405
20405
  },
20406
20406
  process: function(B) {
20407
- var L = this.options, k = B.pointers.length === L.pointers, D = B.distance < L.threshold, Y = B.deltaTime < L.time;
20408
- if (this.reset(), B.eventType & G && this.count === 0)
20407
+ var L = this.options, k = B.pointers.length === L.pointers, D = B.distance < L.threshold, $ = B.deltaTime < L.time;
20408
+ if (this.reset(), B.eventType & te && this.count === 0)
20409
20409
  return this.failTimeout();
20410
- if (D && Y && k) {
20411
- if (B.eventType != $)
20410
+ if (D && $ && k) {
20411
+ if (B.eventType != ee)
20412
20412
  return this.failTimeout();
20413
- var ue = this.pTime ? B.timeStamp - this.pTime < L.interval : !0, ge = !this.pCenter || ae(this.pCenter, B.center) < L.posThreshold;
20414
- this.pTime = B.timeStamp, this.pCenter = B.center, !ge || !ue ? this.count = 1 : this.count += 1, this._input = B;
20413
+ var ue = this.pTime ? B.timeStamp - this.pTime < L.interval : !0, Ae = !this.pCenter || ae(this.pCenter, B.center) < L.posThreshold;
20414
+ this.pTime = B.timeStamp, this.pCenter = B.center, !Ae || !ue ? this.count = 1 : this.count += 1, this._input = B;
20415
20415
  var Xe = this.count % L.taps;
20416
20416
  if (Xe === 0)
20417
20417
  return this.hasRequireFailures() ? (this._timer = d(function() {
20418
- this.state = dt, this.tryEmit();
20419
- }, L.interval, this), tt) : dt;
20418
+ this.state = pt, this.tryEmit();
20419
+ }, L.interval, this), De) : pt;
20420
20420
  }
20421
- return ht;
20421
+ return at;
20422
20422
  },
20423
20423
  failTimeout: function() {
20424
20424
  return this._timer = d(function() {
20425
- this.state = ht;
20426
- }, this.options.interval, this), ht;
20425
+ this.state = at;
20426
+ }, this.options.interval, this), at;
20427
20427
  },
20428
20428
  reset: function() {
20429
20429
  clearTimeout(this._timer);
20430
20430
  },
20431
20431
  emit: function() {
20432
- this.state == dt && (this._input.tapCount = this.count, this.manager.emit(this.options.event, this._input));
20432
+ this.state == pt && (this._input.tapCount = this.count, this.manager.emit(this.options.event, this._input));
20433
20433
  }
20434
20434
  });
20435
- function xt(B, L) {
20436
- return L = L || {}, L.recognizers = T(L.recognizers, xt.defaults.preset), new Rt(B, L);
20435
+ function Tt(B, L) {
20436
+ return L = L || {}, L.recognizers = T(L.recognizers, Tt.defaults.preset), new dt(B, L);
20437
20437
  }
20438
- xt.VERSION = "2.0.7", xt.defaults = {
20438
+ Tt.VERSION = "2.0.7", Tt.defaults = {
20439
20439
  /**
20440
20440
  * set if DOM events are being triggered.
20441
20441
  * But this is slower and unused by simple implementations, so disabled by default.
@@ -20449,7 +20449,7 @@ var Hammer = function(n, t, e, r) {
20449
20449
  * @type {String}
20450
20450
  * @default compute
20451
20451
  */
20452
- touchAction: Je,
20452
+ touchAction: Ke,
20453
20453
  /**
20454
20454
  * @type {Boolean}
20455
20455
  * @default true
@@ -20476,12 +20476,12 @@ var Hammer = function(n, t, e, r) {
20476
20476
  */
20477
20477
  preset: [
20478
20478
  // RecognizerClass, options, [recognizeWith, ...], [requireFailure, ...]
20479
- [Mt, { enable: !1 }],
20479
+ [_t, { enable: !1 }],
20480
20480
  [Ft, { enable: !1 }, ["rotate"]],
20481
- [yt, { direction: fe }],
20482
- [It, { direction: fe }, ["swipe"]],
20483
- [Pt],
20484
- [Pt, { event: "doubletap", taps: 2 }, ["tap"]],
20481
+ [Ct, { direction: ce }],
20482
+ [Pt, { direction: ce }, ["swipe"]],
20483
+ [mt],
20484
+ [mt, { event: "doubletap", taps: 2 }, ["tap"]],
20485
20485
  [Lt]
20486
20486
  ],
20487
20487
  /**
@@ -20531,14 +20531,14 @@ var Hammer = function(n, t, e, r) {
20531
20531
  tapHighlightColor: "rgba(0,0,0,0)"
20532
20532
  }
20533
20533
  };
20534
- var Bt = 1, mt = 2;
20535
- function Rt(B, L) {
20536
- this.options = A({}, xt.defaults, L || {}), this.options.inputTarget = this.options.inputTarget || B, this.handlers = {}, this.session = {}, this.recognizers = [], this.oldCssProps = {}, this.element = B, this.input = te(this), this.touchAction = new Tt(this, this.options.touchAction), Ct(this, !0), p(this.options.recognizers, function(k) {
20534
+ var Ot = 1, wt = 2;
20535
+ function dt(B, L) {
20536
+ this.options = A({}, Tt.defaults, L || {}), this.options.inputTarget = this.options.inputTarget || B, this.handlers = {}, this.session = {}, this.recognizers = [], this.oldCssProps = {}, this.element = B, this.input = ne(this), this.touchAction = new It(this, this.options.touchAction), St(this, !0), p(this.options.recognizers, function(k) {
20537
20537
  var D = this.add(new k[0](k[1]));
20538
20538
  k[2] && D.recognizeWith(k[2]), k[3] && D.requireFailure(k[3]);
20539
20539
  }, this);
20540
20540
  }
20541
- Rt.prototype = {
20541
+ dt.prototype = {
20542
20542
  /**
20543
20543
  * set options
20544
20544
  * @param {Object} options
@@ -20554,7 +20554,7 @@ var Hammer = function(n, t, e, r) {
20554
20554
  * @param {Boolean} [force]
20555
20555
  */
20556
20556
  stop: function(B) {
20557
- this.session.stopped = B ? mt : Bt;
20557
+ this.session.stopped = B ? wt : Ot;
20558
20558
  },
20559
20559
  /**
20560
20560
  * run the recognizers!
@@ -20566,12 +20566,12 @@ var Hammer = function(n, t, e, r) {
20566
20566
  var L = this.session;
20567
20567
  if (!L.stopped) {
20568
20568
  this.touchAction.preventDefaults(B);
20569
- var k, D = this.recognizers, Y = L.curRecognizer;
20570
- (!Y || Y && Y.state & dt) && (Y = L.curRecognizer = null);
20569
+ var k, D = this.recognizers, $ = L.curRecognizer;
20570
+ (!$ || $ && $.state & pt) && ($ = L.curRecognizer = null);
20571
20571
  for (var ue = 0; ue < D.length; )
20572
- k = D[ue], L.stopped !== mt && // 1
20573
- (!Y || k == Y || // 2
20574
- k.canRecognizeWith(Y)) ? k.recognize(B) : k.reset(), !Y && k.state & (tt | St | gt) && (Y = L.curRecognizer = k), ue++;
20572
+ k = D[ue], L.stopped !== wt && // 1
20573
+ (!$ || k == $ || // 2
20574
+ k.canRecognizeWith($)) ? k.recognize(B) : k.reset(), !$ && k.state & (De | gt | ht) && ($ = L.curRecognizer = k), ue++;
20575
20575
  }
20576
20576
  },
20577
20577
  /**
@@ -20580,7 +20580,7 @@ var Hammer = function(n, t, e, r) {
20580
20580
  * @returns {Recognizer|Null}
20581
20581
  */
20582
20582
  get: function(B) {
20583
- if (B instanceof pt)
20583
+ if (B instanceof vt)
20584
20584
  return B;
20585
20585
  for (var L = this.recognizers, k = 0; k < L.length; k++)
20586
20586
  if (L[k].options.event == B)
@@ -20647,7 +20647,7 @@ var Hammer = function(n, t, e, r) {
20647
20647
  * @param {Object} data
20648
20648
  */
20649
20649
  emit: function(B, L) {
20650
- this.options.domEvents && _t(B, L);
20650
+ this.options.domEvents && Mt(B, L);
20651
20651
  var k = this.handlers[B] && this.handlers[B].slice();
20652
20652
  if (!(!k || !k.length)) {
20653
20653
  L.type = B, L.preventDefault = function() {
@@ -20662,57 +20662,57 @@ var Hammer = function(n, t, e, r) {
20662
20662
  * it doesn't unbind dom events, that is the user own responsibility
20663
20663
  */
20664
20664
  destroy: function() {
20665
- this.element && Ct(this, !1), this.handlers = {}, this.session = {}, this.input.destroy(), this.element = null;
20665
+ this.element && St(this, !1), this.handlers = {}, this.session = {}, this.input.destroy(), this.element = null;
20666
20666
  }
20667
20667
  };
20668
- function Ct(B, L) {
20668
+ function St(B, L) {
20669
20669
  var k = B.element;
20670
20670
  if (k.style) {
20671
20671
  var D;
20672
- p(B.options.cssProps, function(Y, ue) {
20673
- D = P(k.style, ue), L ? (B.oldCssProps[D] = k.style[D], k.style[D] = Y) : k.style[D] = B.oldCssProps[D] || "";
20672
+ p(B.options.cssProps, function($, ue) {
20673
+ D = P(k.style, ue), L ? (B.oldCssProps[D] = k.style[D], k.style[D] = $) : k.style[D] = B.oldCssProps[D] || "";
20674
20674
  }), L || (B.oldCssProps = {});
20675
20675
  }
20676
20676
  }
20677
- function _t(B, L) {
20677
+ function Mt(B, L) {
20678
20678
  var k = t.createEvent("Event");
20679
20679
  k.initEvent(B, !0, !0), k.gesture = L, L.target.dispatchEvent(k);
20680
20680
  }
20681
- return A(xt, {
20682
- INPUT_START: G,
20683
- INPUT_MOVE: ne,
20684
- INPUT_END: $,
20685
- INPUT_CANCEL: ee,
20686
- STATE_POSSIBLE: ot,
20687
- STATE_BEGAN: tt,
20688
- STATE_CHANGED: St,
20689
- STATE_ENDED: gt,
20690
- STATE_RECOGNIZED: dt,
20691
- STATE_CANCELLED: At,
20692
- STATE_FAILED: ht,
20681
+ return A(Tt, {
20682
+ INPUT_START: te,
20683
+ INPUT_MOVE: j,
20684
+ INPUT_END: ee,
20685
+ INPUT_CANCEL: W,
20686
+ STATE_POSSIBLE: Rt,
20687
+ STATE_BEGAN: De,
20688
+ STATE_CHANGED: gt,
20689
+ STATE_ENDED: ht,
20690
+ STATE_RECOGNIZED: pt,
20691
+ STATE_CANCELLED: bt,
20692
+ STATE_FAILED: at,
20693
20693
  DIRECTION_NONE: re,
20694
20694
  DIRECTION_LEFT: le,
20695
20695
  DIRECTION_RIGHT: ie,
20696
20696
  DIRECTION_UP: oe,
20697
20697
  DIRECTION_DOWN: se,
20698
- DIRECTION_HORIZONTAL: fe,
20699
- DIRECTION_VERTICAL: he,
20700
- DIRECTION_ALL: Re,
20701
- Manager: Rt,
20702
- Input: j,
20703
- TouchAction: Tt,
20704
- TouchInput: Fe,
20705
- MouseInput: Te,
20706
- PointerEventInput: Ne,
20707
- TouchMouseInput: Ye,
20698
+ DIRECTION_HORIZONTAL: ce,
20699
+ DIRECTION_VERTICAL: ve,
20700
+ DIRECTION_ALL: Te,
20701
+ Manager: dt,
20702
+ Input: X,
20703
+ TouchAction: It,
20704
+ TouchInput: Oe,
20705
+ MouseInput: Me,
20706
+ PointerEventInput: Fe,
20707
+ TouchMouseInput: Ze,
20708
20708
  SingleTouchInput: je,
20709
- Recognizer: pt,
20710
- AttrRecognizer: ct,
20711
- Tap: Pt,
20712
- Pan: It,
20713
- Swipe: yt,
20709
+ Recognizer: vt,
20710
+ AttrRecognizer: Je,
20711
+ Tap: mt,
20712
+ Pan: Pt,
20713
+ Swipe: Ct,
20714
20714
  Pinch: Ft,
20715
- Rotate: Mt,
20715
+ Rotate: _t,
20716
20716
  Press: Lt,
20717
20717
  on: S,
20718
20718
  off: R,
@@ -20723,7 +20723,7 @@ var Hammer = function(n, t, e, r) {
20723
20723
  inherit: v,
20724
20724
  bindFn: y,
20725
20725
  prefixed: P
20726
- }), xt;
20726
+ }), Tt;
20727
20727
  }(typeof window != "undefined" ? window : {}, typeof document != "undefined" ? document : {});
20728
20728
  function calculateThreeMouse(n, t, e) {
20729
20729
  var r = t.getBoundingClientRect(), o = r.top, s = r.left, u = r.width, l = r.height;
@@ -21064,7 +21064,7 @@ var BaseController = (
21064
21064
  y: P.clientY
21065
21065
  }, _ = r.relativeClientPosition(O), N = new THREE.Raycaster();
21066
21066
  N.params.Points = { threshold: 0.1 }, N.setFromCamera(_, r.camera);
21067
- var z = __assign(__assign({}, O), { coords: _, raycaster: N, buttons: P.buttons, delta: 0 }), J = w === "pinchend" ? I : I - P.deltaY / 280, K = createEvent("gesture.pinch", {
21067
+ var z = __assign(__assign({}, O), { coords: _, raycaster: N, buttons: P.buttons, delta: 0 }), J = w === "pinchend" ? I : I - P.deltaY / 280, G = createEvent("gesture.pinch", {
21068
21068
  target: P.target,
21069
21069
  pointerType: "mouse",
21070
21070
  srcEvent: P,
@@ -21080,7 +21080,7 @@ var BaseController = (
21080
21080
  userAction: !0,
21081
21081
  state: __assign(__assign({ mode: r.mode }, r.currentPano), clonePose(r.camera.pose))
21082
21082
  });
21083
- return K;
21083
+ return G;
21084
21084
  }, g = function(w) {
21085
21085
  var I, P = { x: w.clientX, y: w.clientY };
21086
21086
  if (o(P)) {
@@ -21092,16 +21092,16 @@ var BaseController = (
21092
21092
  } : d.prevEvent = _, r.onPinchGesture(_), h !== null && window.clearTimeout(h), h = window.setTimeout(function() {
21093
21093
  var q;
21094
21094
  h = null;
21095
- var X = (q = d == null ? void 0 : d.prevEvent.scale) !== null && q !== void 0 ? q : 1, Z = p("pinchend", X, w);
21096
- d = null, r.onPinchGesture(Z);
21095
+ var K = (q = d == null ? void 0 : d.prevEvent.scale) !== null && q !== void 0 ? q : 1, Y = p("pinchend", K, w);
21096
+ d = null, r.onPinchGesture(Y);
21097
21097
  }, 200);
21098
21098
  } else {
21099
21099
  var N = (Math.abs(w.deltaY) > Math.abs(w.deltaX) ? w.deltaY : w.deltaX) / -60, z = r.mouseWheelState !== void 0, J = {
21100
21100
  x: w.clientX,
21101
21101
  y: w.clientY
21102
- }, K = r.relativeClientPosition(J), Q = new THREE.Raycaster();
21103
- Q.params.Points = { threshold: 0.1 }, Q.setFromCamera(K, r.camera);
21104
- var U = __assign(__assign({}, J), { coords: K, raycaster: Q, buttons: w.buttons, delta: N }), _ = createEvent("gesture.mousewheel", {
21102
+ }, G = r.relativeClientPosition(J), Q = new THREE.Raycaster();
21103
+ Q.params.Points = { threshold: 0.1 }, Q.setFromCamera(G, r.camera);
21104
+ var U = __assign(__assign({}, J), { coords: G, raycaster: Q, buttons: w.buttons, delta: N }), _ = createEvent("gesture.mousewheel", {
21105
21105
  target: w.target,
21106
21106
  pointerType: "mouse",
21107
21107
  srcEvent: w,
@@ -21120,7 +21120,7 @@ var BaseController = (
21120
21120
  r.onMouseWheel(_), r.mouseWheelState && clearTimeout(r.mouseWheelState.timer), r.mouseWheelState = {
21121
21121
  timer: setTimeout(function() {
21122
21122
  delete r.mouseWheelState;
21123
- var X = createEvent("gesture.mousewheel", {
21123
+ var K = createEvent("gesture.mousewheel", {
21124
21124
  target: w.target,
21125
21125
  pointerType: "mouse",
21126
21126
  srcEvent: w,
@@ -21136,7 +21136,7 @@ var BaseController = (
21136
21136
  userAction: !0,
21137
21137
  state: __assign(__assign({ mode: r.mode }, r.currentPano), clonePose(r.camera.pose))
21138
21138
  });
21139
- r.onMouseWheel(X);
21139
+ r.onMouseWheel(K);
21140
21140
  }, 100)
21141
21141
  };
21142
21142
  }
@@ -21271,7 +21271,7 @@ var BaseController = (
21271
21271
  y: w.clientY
21272
21272
  }, N = r.relativeClientPosition(_), z = new THREE.Raycaster();
21273
21273
  z.params.Points = { threshold: 0.1 }, z.setFromCamera(N, r.camera);
21274
- var J = __assign(__assign({}, _), { coords: N, raycaster: z, buttons: 0, delta: 0 }), K = createEvent("gesture.pinch", {
21274
+ var J = __assign(__assign({}, _), { coords: N, raycaster: z, buttons: 0, delta: 0 }), G = createEvent("gesture.pinch", {
21275
21275
  target: w.target,
21276
21276
  pointerType: "mouse",
21277
21277
  srcEvent: w,
@@ -21287,7 +21287,7 @@ var BaseController = (
21287
21287
  userAction: !0,
21288
21288
  state: __assign(__assign({ mode: r.mode }, r.currentPano), clonePose(r.camera.pose))
21289
21289
  });
21290
- return K;
21290
+ return G;
21291
21291
  }, R = function(w) {
21292
21292
  if (w.preventDefault(), !isMobile) {
21293
21293
  var I = S(w);
@@ -22180,7 +22180,7 @@ function traverseTileCubeNode(n, t) {
22180
22180
  s !== !1 && traverseTileCubeNode(o, t);
22181
22181
  }
22182
22182
  }
22183
- var _a$1, scratchSortVector3 = new THREE.Vector3(), scratchFrustumMatrix = new THREE.Matrix4(), scratchFrustumMatrixInverse = new THREE.Matrix4(), scratchFrustumProjectMatrix = new THREE.Matrix4(), scratchSceneQuaternionInverse = new THREE.Quaternion(), scratchSceneMatrixInverse = new THREE.Matrix4(), clearColor$1 = new THREE.Color(0, 0, 0), clearAlpha = 0, scratchPrevClearColor$1 = new THREE.Color(), clippingPlanes = [], SQRT1_2 = (_a$1 = Math.SQRT1_2) !== null && _a$1 !== void 0 ? _a$1 : Math.sqrt(2), TILE_QUATERNION = {
22183
+ var _a$1, scratchSortVector2 = new THREE.Vector2(), scratchSortVector3 = new THREE.Vector3(), scratchFrustumMatrix = new THREE.Matrix4(), scratchFrustumMatrixInverse = new THREE.Matrix4(), scratchFrustumProjectMatrix = new THREE.Matrix4(), scratchSceneQuaternionInverse = new THREE.Quaternion(), scratchSceneMatrixInverse = new THREE.Matrix4(), clearColor$1 = new THREE.Color(0, 0, 0), clearAlpha = 0, scratchPrevClearColor$1 = new THREE.Color(), clippingPlanes = [], SQRT1_2 = (_a$1 = Math.SQRT1_2) !== null && _a$1 !== void 0 ? _a$1 : Math.sqrt(2), TILE_QUATERNION = {
22184
22184
  up: new THREE.Quaternion(SQRT1_2, 0, 0, SQRT1_2),
22185
22185
  down: new THREE.Quaternion(-SQRT1_2, 0, 0, SQRT1_2),
22186
22186
  left: new THREE.Quaternion(0, SQRT1_2, 0, SQRT1_2),
@@ -22464,98 +22464,98 @@ void main() {
22464
22464
  this.tileTree = createTileCubeTree(u);
22465
22465
  }
22466
22466
  }, n.prototype.update = function(t, e, r, o, s, u, l) {
22467
- var c = this, f = this.forceRenderWhenNextUpdate;
22467
+ var c = this, f, d = this.forceRenderWhenNextUpdate;
22468
22468
  if (this.disposed)
22469
- return f;
22470
- var d = e.fov, h = e.quaternion, p = e.time, g = e.resolution, A = e.pixelRatio;
22471
- if (this.boundingMesh.update(p, r), this.observer === null)
22472
- return (this.renderTarget.width !== 1 || this.renderTarget.height !== 1) && (this.renderTarget.setSize(1, 1), f = !0), !1;
22469
+ return d;
22470
+ var h = e.fov, p = e.quaternion, g, A, m;
22471
+ if ("time" in e && typeof e.time == "number" ? g = e.time : g = now(), "resolution" in e && e.resolution instanceof THREE.Vector2 ? (A = e.resolution, m = (f = e.pixelRatio) !== null && f !== void 0 ? f : 1) : (A = t.getSize(scratchSortVector2), m = t.getPixelRatio()), this.boundingMesh.update(g, r), this.observer === null)
22472
+ return (this.renderTarget.width !== 1 || this.renderTarget.height !== 1) && (this.renderTarget.setSize(1, 1), d = !0), !1;
22473
22473
  this.level = clamp$1(l, 0, this.tileTree.maxLevel);
22474
- var m = g.width * A, E = g.height * A, v = m / E;
22475
- (this.renderTarget.width !== m || this.renderTarget.height !== E) && this.renderTarget.setSize(m, E), this.scene.matrix.equals(o) || (this.scene.matrix.copy(o), this.scene.matrixWorld.copy(this.scene.matrix), this.scene.matrix.decompose(this.scene.position, this.scene.quaternion, this.scene.scale), this.scene.matrixAutoUpdate = !1, f = !0), (this.camera.fov !== d || this.camera.aspect !== v || this.camera.zoom !== s) && (this.camera.fov = d, this.camera.aspect = v, this.camera.zoom = s, this.camera.updateProjectionMatrix(), f = !0);
22476
- var y = new THREE.Matrix4().compose(this.scene.position, h, this.scene.scale);
22477
- this.camera.matrix.equals(y) || (this.camera.matrix.copy(y), this.camera.matrixWorld.copy(this.camera.matrix), this.camera.position.copy(this.scene.position), this.camera.quaternion.copy(h), this.camera.scale.copy(this.scene.scale), f = !0), scratchSceneQuaternionInverse.copy(this.scene.quaternion).inverse(), scratchSceneMatrixInverse.makeRotationFromQuaternion(scratchSceneQuaternionInverse), scratchFrustumMatrix.copy(this.camera.matrix), scratchFrustumMatrix.setPosition(0, 0, 0), scratchFrustumMatrix.premultiply(scratchSceneMatrixInverse), scratchFrustumMatrixInverse.getInverse(scratchFrustumMatrix), scratchFrustumProjectMatrix.multiplyMatrices(this.camera.projectionMatrix, scratchFrustumMatrixInverse), this.frustum.setFromProjectionMatrix(scratchFrustumProjectMatrix);
22478
- var b = this.frustum.planes[5].normal, T = [];
22479
- l >= u && traverseTileCubeNode(this.tileTree, function(G) {
22480
- if (!(G.level < u)) {
22481
- if (G.level > l || !c.frustum.intersectsBox(G.box))
22474
+ var E = A.width * m, v = A.height * m, y = E / v;
22475
+ (this.renderTarget.width !== E || this.renderTarget.height !== v) && this.renderTarget.setSize(E, v), this.scene.matrix.equals(o) || (this.scene.matrix.copy(o), this.scene.matrixWorld.copy(this.scene.matrix), this.scene.matrix.decompose(this.scene.position, this.scene.quaternion, this.scene.scale), this.scene.matrixAutoUpdate = !1, d = !0), (this.camera.fov !== h || this.camera.aspect !== y || this.camera.zoom !== s) && (this.camera.fov = h, this.camera.aspect = y, this.camera.zoom = s, this.camera.updateProjectionMatrix(), d = !0);
22476
+ var b = new THREE.Matrix4().compose(this.scene.position, p, this.scene.scale);
22477
+ this.camera.matrix.equals(b) || (this.camera.matrix.copy(b), this.camera.matrixWorld.copy(this.camera.matrix), this.camera.position.copy(this.scene.position), this.camera.quaternion.copy(p), this.camera.scale.copy(this.scene.scale), d = !0), scratchSceneQuaternionInverse.copy(this.scene.quaternion).inverse(), scratchSceneMatrixInverse.makeRotationFromQuaternion(scratchSceneQuaternionInverse), scratchFrustumMatrix.copy(this.camera.matrix), scratchFrustumMatrix.setPosition(0, 0, 0), scratchFrustumMatrix.premultiply(scratchSceneMatrixInverse), scratchFrustumMatrixInverse.getInverse(scratchFrustumMatrix), scratchFrustumProjectMatrix.multiplyMatrices(this.camera.projectionMatrix, scratchFrustumMatrixInverse), this.frustum.setFromProjectionMatrix(scratchFrustumProjectMatrix);
22478
+ var T = this.frustum.planes[5].normal, S = [];
22479
+ l >= u && traverseTileCubeNode(this.tileTree, function(j) {
22480
+ if (!(j.level < u)) {
22481
+ if (j.level > l || !c.frustum.intersectsBox(j.box))
22482
22482
  return !1;
22483
- T.push(G);
22483
+ S.push(j);
22484
22484
  }
22485
22485
  });
22486
- var S = /* @__PURE__ */ new WeakMap();
22487
- T.sort(function(G, ne) {
22488
- if (G.level !== ne.level)
22489
- return G.level - ne.level;
22490
- var $ = S.get(G);
22491
- $ === void 0 && ($ = G.box.getCenter(scratchSortVector3).angleTo(b), S.set(G, $));
22492
- var ee = S.get(ne);
22493
- return ee === void 0 && (ee = ne.box.getCenter(scratchSortVector3).angleTo(b), S.set(ne, ee)), $ - ee;
22486
+ var R = /* @__PURE__ */ new WeakMap();
22487
+ S.sort(function(j, ee) {
22488
+ if (j.level !== ee.level)
22489
+ return j.level - ee.level;
22490
+ var W = R.get(j);
22491
+ W === void 0 && (W = j.box.getCenter(scratchSortVector3).angleTo(T), R.set(j, W));
22492
+ var re = R.get(ee);
22493
+ return re === void 0 && (re = ee.box.getCenter(scratchSortVector3).angleTo(T), R.set(ee, re)), W - re;
22494
22494
  });
22495
- var R = /* @__PURE__ */ new WeakSet(), C = this.observer.images.tiles;
22496
- if (C)
22497
- for (var M = function(G) {
22498
- var ne = C.find(function(ce) {
22499
- return ce.level === G.level;
22495
+ var C = /* @__PURE__ */ new WeakSet(), M = this.observer.images.tiles;
22496
+ if (M)
22497
+ for (var F = function(j) {
22498
+ var ee = M.find(function(me) {
22499
+ return me.level === j.level;
22500
22500
  });
22501
- if (!ne)
22501
+ if (!ee)
22502
22502
  return "continue";
22503
- R.add(G);
22504
- var $ = F.tileMeshes.get(G);
22505
- if ($) {
22506
- $.appearDuration = F.appearDuration;
22507
- var ee = $.updateTime(p);
22508
- return ee && (f = !0), "continue";
22503
+ C.add(j);
22504
+ var W = H.tileMeshes.get(j);
22505
+ if (W) {
22506
+ W.appearDuration = H.appearDuration;
22507
+ var re = W.updateTime(g);
22508
+ return re && (d = !0), "continue";
22509
22509
  }
22510
- if (F.pedding >= F.maxRequest)
22510
+ if (H.pedding >= H.maxRequest)
22511
22511
  return "continue";
22512
- var re = Math.pow(2, G.level) * G.position.y, le = Math.pow(2, G.level) * G.position.x, ie = "".concat(F.observer.panoId, ".").concat(G.face, ".").concat(G.level, ".").concat(re, ".").concat(le), oe = ne[G.face], se = ne.size, fe = F.imageOptions.transform, he = __assign(__assign({}, pick(F.imageOptions, ["format", "sharpen", "mappings"])), { key: "pano_tile.".concat(ie), size: ne.scale >= 1 ? void 0 : se * G.size * ne.scale, cut: G.size === 1 ? void 0 : [
22513
- se * G.position.x,
22514
- se * G.position.y,
22515
- se * G.size,
22516
- se * G.size
22512
+ var le = Math.pow(2, j.level) * j.position.y, ie = Math.pow(2, j.level) * j.position.x, oe = "".concat(H.observer.panoId, ".").concat(j.face, ".").concat(j.level, ".").concat(le, ".").concat(ie), se = ee[j.face], ce = ee.size, ve = H.imageOptions.transform, Te = __assign(__assign({}, pick(H.imageOptions, ["format", "sharpen", "mappings"])), { key: "pano_tile.".concat(oe), size: ee.scale >= 1 ? void 0 : ce * j.size * ee.scale, cut: j.size === 1 ? void 0 : [
22513
+ ce * j.position.x,
22514
+ ce * j.position.y,
22515
+ ce * j.size,
22516
+ ce * j.size
22517
22517
  ] });
22518
- G.level === 1 && ne.scale >= 0.5 && (he.format === "jpg" || /\.jpg$/.test(oe)) && (he.size = void 0, he.quality || (he.quality = 70)), G.size === 1 && console.warn("tile: ".concat(he.key, " should not appear.")), F.pedding++;
22519
- var Re = F.textureLoader.loadTexture(oe, {
22518
+ j.level === 1 && ee.scale >= 0.5 && (Te.format === "jpg" || /\.jpg$/.test(se)) && (Te.size = void 0, Te.quality || (Te.quality = 70)), j.size === 1 && console.warn("tile: ".concat(Te.key, " should not appear.")), H.pedding++;
22519
+ var fe = H.textureLoader.loadTexture(se, {
22520
22520
  imageURL: {
22521
- transform: fe,
22522
- options: he
22521
+ transform: ve,
22522
+ options: Te
22523
22523
  },
22524
22524
  minFilter: THREE.LinearFilter,
22525
22525
  magFilter: THREE.LinearFilter,
22526
22526
  generateMipmaps: !1,
22527
- fetcher: getFetcher(F.observer.work)
22528
- }).then(function(ce) {
22529
- return ce.body;
22527
+ fetcher: getFetcher(H.observer.work)
22528
+ }).then(function(me) {
22529
+ return me.body;
22530
22530
  });
22531
- Re.then(function(ce) {
22532
- return c.pedding--, ce;
22533
- }, function(ce) {
22534
- return c.pedding--, Promise.reject(ce);
22535
- }), $ = new TileMesh(G, Re), $.name = "tiling:tile-".concat(ie), $.visible = !1, $.appearDuration = F.appearDuration, F.tileMeshes.set(G, $), F.scene.add($), $.updateTime(p), f = !0;
22536
- }, F = this, H = 0, w = T; H < w.length; H++) {
22537
- var I = w[H];
22538
- M(I);
22539
- }
22540
- var P = [], O = [];
22541
- this.tileMeshes.forEach(function(G, ne) {
22542
- R.has(ne) ? P.push(G) : O.push(G);
22543
- var $ = ne.level >= u && ne.level <= l;
22544
- G.visible !== $ && (G.visible = $, f = !0);
22531
+ fe.then(function(me) {
22532
+ return c.pedding--, me;
22533
+ }, function(me) {
22534
+ return c.pedding--, Promise.reject(me);
22535
+ }), W = new TileMesh(j, fe), W.name = "tiling:tile-".concat(oe), W.visible = !1, W.appearDuration = H.appearDuration, H.tileMeshes.set(j, W), H.scene.add(W), W.updateTime(g), d = !0;
22536
+ }, H = this, w = 0, I = S; w < I.length; w++) {
22537
+ var P = I[w];
22538
+ F(P);
22539
+ }
22540
+ var O = [], _ = [];
22541
+ this.tileMeshes.forEach(function(j, ee) {
22542
+ C.has(ee) ? O.push(j) : _.push(j);
22543
+ var W = ee.level >= u && ee.level <= l;
22544
+ j.visible !== W && (j.visible = W, d = !0);
22545
22545
  });
22546
- for (var _ = O.sort(function(G, ne) {
22547
- return ne.activeTime - G.activeTime;
22548
- }).slice(Math.max(0, this.maxCacheTile - P.length)), N = 0, z = _; N < z.length; N++) {
22549
- var J = z[N];
22550
- this.tileMeshes.delete(J.node), this.scene.remove(J), J.dispose(), f = !0;
22551
- }
22552
- if (f) {
22553
- var K = t.getRenderTarget();
22546
+ for (var N = _.sort(function(j, ee) {
22547
+ return ee.activeTime - j.activeTime;
22548
+ }).slice(Math.max(0, this.maxCacheTile - O.length)), z = 0, J = N; z < J.length; z++) {
22549
+ var G = J[z];
22550
+ this.tileMeshes.delete(G.node), this.scene.remove(G), G.dispose(), d = !0;
22551
+ }
22552
+ if (d) {
22553
+ var Q = t.getRenderTarget();
22554
22554
  scratchPrevClearColor$1.copy(t.getClearColor());
22555
- var Q = t.getClearAlpha(), U = t.autoClear, q = t.autoClearColor, X = t.autoClearDepth, Z = t.autoClearStencil, W = t.clippingPlanes;
22556
- t.autoClear = !0, t.autoClearColor = !0, t.autoClearDepth = !0, t.autoClearStencil = !0, t.clippingPlanes = clippingPlanes, t.setRenderTarget(this.renderTarget), t.setClearColor(clearColor$1, clearAlpha), t.render(this.scene, this.camera), t.setRenderTarget(K), t.setClearColor(scratchPrevClearColor$1, Q), t.autoClear = U, t.autoClearColor = q, t.autoClearDepth = X, t.autoClearStencil = Z, t.clippingPlanes = W;
22555
+ var U = t.getClearAlpha(), q = t.autoClear, K = t.autoClearColor, Y = t.autoClearDepth, Z = t.autoClearStencil, te = t.clippingPlanes;
22556
+ t.autoClear = !0, t.autoClearColor = !0, t.autoClearDepth = !0, t.autoClearStencil = !0, t.clippingPlanes = clippingPlanes, t.setRenderTarget(this.renderTarget), t.setClearColor(clearColor$1, clearAlpha), t.render(this.scene, this.camera), t.setRenderTarget(Q), t.setClearColor(scratchPrevClearColor$1, U), t.autoClear = q, t.autoClearColor = K, t.autoClearDepth = Y, t.autoClearStencil = Z, t.clippingPlanes = te;
22557
22557
  }
22558
- return this.forceRenderWhenNextUpdate = !1, f;
22558
+ return this.forceRenderWhenNextUpdate = !1, d;
22559
22559
  }, n;
22560
22560
  }()
22561
22561
  ), ROTATE_Y_PI_MATRIX = new THREE.Matrix4().makeRotationAxis(new THREE.Vector3(0, 1, 0), Math.PI), vertices$1 = new Float32Array([
@@ -22934,23 +22934,23 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$1 = new THREE.Vec
22934
22934
  var N = _[O], z = N.key, J = N.progress;
22935
22935
  z !== void 0 && (I.push(z), J > this.locationMotion.progress && P.push(z));
22936
22936
  }
22937
- for (var K = 0, Q = Object.keys(this.panoResources); K < Q.length; K++) {
22938
- var U = Q[K];
22937
+ for (var G = 0, Q = Object.keys(this.panoResources); G < Q.length; G++) {
22938
+ var U = Q[G];
22939
22939
  if (!(P.indexOf(U) >= 0)) {
22940
22940
  var q = this.panoResources[U];
22941
22941
  if (q.panoPicture) {
22942
- var X = q.panoPicture.map;
22943
- if (X) {
22944
- if (X === ((s = h.pano0) === null || s === void 0 ? void 0 : s.map) || X === ((u = h.pano1) === null || u === void 0 ? void 0 : u.map))
22942
+ var K = q.panoPicture.map;
22943
+ if (K) {
22944
+ 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))
22945
22945
  continue;
22946
- X.dispose(), q.panoPicture = null;
22946
+ K.dispose(), q.panoPicture = null;
22947
22947
  }
22948
22948
  }
22949
22949
  I.indexOf(U) >= 0 || delete this.panoResources[U];
22950
22950
  }
22951
22951
  }
22952
- var Z = panoParse(b.panoId);
22953
- Z !== this.currentPano && (this.currentPano = Z, this.accessibleObserverFloorCheckCount = 0), this.emit("pano.moving", createEvent("pano.moving", {
22952
+ var Y = panoParse(b.panoId);
22953
+ Y !== this.currentPano && (this.currentPano = Y, this.accessibleObserverFloorCheckCount = 0), this.emit("pano.moving", createEvent("pano.moving", {
22954
22954
  userAction: this.userAction,
22955
22955
  prevPano: panoParse(T.panoId),
22956
22956
  state: __assign(__assign(__assign(__assign({}, panoParse(S.panoId)), { mode: this.mode }), clonePose(this.camera.pose)), p),
@@ -22960,112 +22960,112 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$1 = new THREE.Vec
22960
22960
  }));
22961
22961
  }
22962
22962
  isEmptyObject(h) === !1 && this.modelScene.parameter.set(h), isEmptyObject(p) === !1 && this.setCamera(p);
22963
- var W = this.works.getResolvedObserver(this.currentPano), G = this.locationMotion.ended ? this.getForwardObserverOrNot() : null;
22963
+ var Z = this.works.getResolvedObserver(this.currentPano), te = this.locationMotion.ended ? this.getForwardObserverOrNot() : null;
22964
22964
  if (this.camera.pose.distance > 0.1 || R)
22965
- for (var ne = 0, $ = Object.keys(this.panoMeshes); ne < $.length; ne++) {
22966
- var ee = $[ne], re = this.panoMeshes[ee];
22965
+ for (var j = 0, ee = Object.keys(this.panoMeshes); j < ee.length; j++) {
22966
+ var W = ee[j], re = this.panoMeshes[W];
22967
22967
  re.setOpacity(0), re.setCurrent(!1), re.updateTime && re.updateTime(e, r), re.visible = !1;
22968
22968
  }
22969
- else if (W) {
22970
- var le = arrayMin(W.visibleIds, function(Fe) {
22971
- var He = o.works.getResolvedObserver(Fe);
22972
- return He ? W.standingPosition.distanceTo(He.standingPosition) : 1 / 0;
22969
+ else if (Z) {
22970
+ var le = arrayMin(Z.visibleIds, function(Oe) {
22971
+ var Le = o.works.getResolvedObserver(Oe);
22972
+ return Le ? Z.standingPosition.distanceTo(Le.standingPosition) : 1 / 0;
22973
22973
  }, !0), ie = le[1];
22974
22974
  ie = clamp$1(ie, 2.5, 1 / 0);
22975
- for (var oe = W.visibleIds.concat(panoStringify(this.currentPano)), se = this.camera.getDirection(new THREE.Vector3()), fe = 0, he = Object.keys(this.panoMeshes); fe < he.length; fe++) {
22976
- var ee = he[fe], re = this.panoMeshes[ee], w = this.works.getResolvedObserver(ee);
22977
- if (oe.indexOf(ee) === -1)
22975
+ for (var oe = Z.visibleIds.concat(panoStringify(this.currentPano)), se = this.camera.getDirection(new THREE.Vector3()), ce = 0, ve = Object.keys(this.panoMeshes); ce < ve.length; ce++) {
22976
+ var W = ve[ce], re = this.panoMeshes[W], w = this.works.getResolvedObserver(W);
22977
+ if (oe.indexOf(W) === -1)
22978
22978
  re.setCurrent(!1), re.setOpacity(0);
22979
22979
  else if (!w)
22980
22980
  re.setCurrent(!1), re.setOpacity(0);
22981
22981
  else if (!w.loadable && !w.active)
22982
22982
  re.setCurrent(!1), re.setOpacity(0);
22983
22983
  else {
22984
- var Re = re.position.clone().setY(this.camera.position.y).distanceTo(this.camera.position);
22985
- re.setCurrent(!re.loading && re.progress === 0 && G !== null && G.panoId === ee), re.setOpacity(Re < 0.01 ? 0 : clamp$1(ie / Re * 1.2, 0.4, 0.85));
22986
- var ce = this.camera.position.clone().setY(re.position.y), Ce = new THREE.Vector3().copy(re.position).sub(ce).normalize();
22987
- if (ee === panoStringify(this.currentPano)) {
22988
- var j = clamp$1((0.5 - ce.distanceTo(re.position)) / 0.5, 0, 1);
22989
- Ce.multiplyScalar(1 - j).add(se.clone().multiplyScalar(j));
22984
+ var Te = re.position.clone().setY(this.camera.position.y).distanceTo(this.camera.position);
22985
+ re.setCurrent(!re.loading && re.progress === 0 && te !== null && te.panoId === W), re.setOpacity(Te < 0.01 ? 0 : clamp$1(ie / Te * 1.2, 0.4, 0.85));
22986
+ var fe = this.camera.position.clone().setY(re.position.y), me = new THREE.Vector3().copy(re.position).sub(fe).normalize();
22987
+ if (W === panoStringify(this.currentPano)) {
22988
+ var X = clamp$1((0.5 - fe.distanceTo(re.position)) / 0.5, 0, 1);
22989
+ me.multiplyScalar(1 - X).add(se.clone().multiplyScalar(X));
22990
22990
  }
22991
- Ce.length() > 0 && re.quaternion.setFromEuler(new THREE.Euler(0, Math.atan2(Ce.x, Ce.z), 0));
22991
+ me.length() > 0 && re.quaternion.setFromEuler(new THREE.Euler(0, Math.atan2(me.x, me.z), 0));
22992
22992
  }
22993
22993
  re.updateTime && re.updateTime(e, r);
22994
22994
  }
22995
22995
  }
22996
- if (this.adjustPanoCircleMeshPositionBasedOnModel && this.helper.visible && W) {
22997
- for (var te = [], V = 0, be = W.accessibleIds; V < be.length; V++) {
22998
- var ee = be[V], w = this.works.getResolvedObserver(ee);
22999
- w && te.push(w);
22996
+ if (this.adjustPanoCircleMeshPositionBasedOnModel && this.helper.visible && Z) {
22997
+ for (var ne = [], V = 0, Ee = Z.accessibleIds; V < Ee.length; V++) {
22998
+ var W = Ee[V], w = this.works.getResolvedObserver(W);
22999
+ w && ne.push(w);
23000
23000
  }
23001
- if (te.sort(function(Fe, He) {
23002
- return Fe.standingPosition.distanceTo(W.standingPosition) - He.standingPosition.distanceTo(W.standingPosition);
23003
- }), te.length) {
23004
- this.accessibleObserverFloorCheckCount = this.accessibleObserverFloorCheckCount % te.length;
23005
- var de = te[this.accessibleObserverFloorCheckCount], re = this.panoMeshes[de.panoId], ve = this.modelScene.models.find(function(He) {
23006
- return He.work === (de == null ? void 0 : de.work);
23001
+ if (ne.sort(function(Oe, Le) {
23002
+ return Oe.standingPosition.distanceTo(Z.standingPosition) - Le.standingPosition.distanceTo(Z.standingPosition);
23003
+ }), ne.length) {
23004
+ this.accessibleObserverFloorCheckCount = this.accessibleObserverFloorCheckCount % ne.length;
23005
+ var de = ne[this.accessibleObserverFloorCheckCount], re = this.panoMeshes[de.panoId], pe = this.modelScene.models.find(function(Le) {
23006
+ return Le.work === (de == null ? void 0 : de.work);
23007
23007
  });
23008
- if (de && re && ve && ve.visible) {
23009
- var Ve = 0.3, rt = 0.05, We = 5e-3, me = adjustPanoCircleMeshVectors.map(function(He) {
23010
- scratchVector3$1.copy(He), scratchVector3$1.setY(Ve), scratchRaycaster$1.ray.origin.copy(de.standingPosition), scratchRaycaster$1.ray.origin.add(scratchVector3$1), scratchRaycaster$1.ray.direction.set(0, -1, 0);
23011
- var Ge = ve.intersectRaycaster(scratchRaycaster$1, null, !0)[0];
23012
- return Ge && Ge.distance - We <= Ve ? new THREE.Vector3().copy(de.standingPosition).setY(Ge.point.y + We) : de.standingPosition;
23008
+ if (de && re && pe && pe.visible) {
23009
+ var Ne = 0.3, rt = 0.05, Ye = 5e-3, ge = adjustPanoCircleMeshVectors.map(function(Le) {
23010
+ scratchVector3$1.copy(Le), scratchVector3$1.setY(Ne), scratchRaycaster$1.ray.origin.copy(de.standingPosition), scratchRaycaster$1.ray.origin.add(scratchVector3$1), scratchRaycaster$1.ray.direction.set(0, -1, 0);
23011
+ var qe = pe.intersectRaycaster(scratchRaycaster$1, null, !0)[0];
23012
+ return qe && qe.distance - Ye <= Ne ? new THREE.Vector3().copy(de.standingPosition).setY(qe.point.y + Ye) : de.standingPosition;
23013
23013
  });
23014
- me.sort(function(He, Ge) {
23015
- return Ge.y - He.y;
23014
+ ge.sort(function(Le, qe) {
23015
+ return qe.y - Le.y;
23016
23016
  });
23017
- var ae = me[Math.floor(me.length / 2)], pe = me.filter(function(He) {
23018
- return He.distanceTo(ae) <= rt;
23017
+ var ae = ge[Math.floor(ge.length / 2)], he = ge.filter(function(Le) {
23018
+ return Le.distanceTo(ae) <= rt;
23019
23019
  })[0];
23020
- pe && !pe.equals(re.position) && (re.position.copy(pe), this.needsRender = !0);
23020
+ he && !he.equals(re.position) && (re.position.copy(he), this.needsRender = !0);
23021
23021
  }
23022
23022
  this.accessibleObserverFloorCheckCount++;
23023
23023
  }
23024
23024
  }
23025
23025
  {
23026
- var F = (l = this.modelScene.parameter.progress) !== null && l !== void 0 ? l : 1, we = Math.round(F), Se = this.modelScene.parameter.pano0, Pe = this.modelScene.parameter.pano1, Le = we === 0 ? Se : Pe, w = void 0;
23027
- if (Le && (w = this.works.getResolvedObserver(Le.panoId), w || (w = this.panoPictureObserverMap.get(Le))), this.tiling.appearDuration = this.tileAppearDuration, this.tiling.maxRequest = F <= 0.5 || F < 1 ? 0 : this.tileMaxRequest, this.tiling.imageOptions = this.imageOptions, !w || !Le || this.tileLevelForFov === !1)
23026
+ var F = (l = this.modelScene.parameter.progress) !== null && l !== void 0 ? l : 1, we = Math.round(F), xe = this.modelScene.parameter.pano0, He = this.modelScene.parameter.pano1, _e = we === 0 ? xe : He, w = void 0;
23027
+ if (_e && (w = this.works.getResolvedObserver(_e.panoId), w || (w = this.panoPictureObserverMap.get(_e))), this.tiling.appearDuration = this.tileAppearDuration, this.tiling.maxRequest = F <= 0.6 ? 0 : F < 1 ? 1 : this.tileMaxRequest, this.tiling.imageOptions = this.imageOptions, !w || !_e || this.tileLevelForFov === !1)
23028
23028
  this.tiling.setObserver(null), this.tiling.update(this.renderer, this.camera, null, new THREE.Matrix4(), 1, 0, 0), this.modelScene.parameter.set("refinedScreen", null);
23029
23029
  else {
23030
- var Ae = getImageSizeLevel(Le.mapSize), Te = Ae + 1, Ie = new THREE.Vector2().copy(this.camera.resolution).multiplyScalar(this.camera.pixelRatio), Be = Math.floor(this.tileLevelForFov(this.camera.fov, Ie)), qe = Be > Ae ? Be : 0;
23030
+ var be = getImageSizeLevel(_e.mapSize), Me = be + 1, Ie = new THREE.Vector2().copy(this.camera.resolution).multiplyScalar(this.camera.pixelRatio), Be = Math.floor(this.tileLevelForFov(this.camera.fov, Ie)), ze = Be > be ? Be : 0;
23031
23031
  this.tiling.setObserver(w);
23032
- var ke = this.tiling.update(this.renderer, this.camera, Le.map, Le.matrix, Le.zoom, Te, qe), Ne = {
23032
+ var Ge = this.tiling.update(this.renderer, this.camera, _e.map, _e.matrix, _e.zoom, Me, ze), Fe = {
23033
23033
  map: this.tiling.renderTarget.texture,
23034
23034
  matrixInverse: this.tiling.camera.matrixWorldInverse,
23035
23035
  projectionMatrix: this.tiling.camera.projectionMatrix,
23036
23036
  pano: we,
23037
- opacity: (Se == null ? void 0 : Se.panoId) === (Pe == null ? void 0 : Pe.panoId) ? 1 : easeInQuart(Math.abs(((c = this.modelScene.parameter.progress) !== null && c !== void 0 ? c : 0) - 0.5) * 2)
23038
- }, _e = this.modelScene.parameter.refinedScreen;
23039
- (ke || Ne.pano !== (_e == null ? void 0 : _e.pano) || Ne.opacity !== (_e == null ? void 0 : _e.opacity)) && this.modelScene.parameter.set("refinedScreen", Ne);
23037
+ opacity: (xe == null ? void 0 : xe.panoId) === (He == null ? void 0 : He.panoId) ? 1 : easeInQuart(Math.abs(((c = this.modelScene.parameter.progress) !== null && c !== void 0 ? c : 0) - 0.5) * 2)
23038
+ }, Ve = this.modelScene.parameter.refinedScreen;
23039
+ (Ge || Fe.pano !== (Ve == null ? void 0 : Ve.pano) || Fe.opacity !== (Ve == null ? void 0 : Ve.opacity)) && this.modelScene.parameter.set("refinedScreen", Fe);
23040
23040
  }
23041
23041
  }
23042
- this.panoVideo.object.position.copy(this.camera.position), this.panoVideo.updateTime(e), W && W.video && (this.needsRender = !0), this.intersectMesh.scale.setScalar(clamp$1(this.cameraMotion.value.fov / 45, 0, 1));
23042
+ this.panoVideo.object.position.copy(this.camera.position), this.panoVideo.updateTime(e), Z && Z.video && (this.needsRender = !0), this.intersectMesh.scale.setScalar(clamp$1(this.cameraMotion.value.fov / 45, 0, 1));
23043
23043
  {
23044
- var Ue = b.effect, ze = this.modelScene.parameter, Se = ze.pano0, Pe = ze.pano1;
23045
- if (Se && Pe && Se !== Pe && Ue === "fly" && this.flyEffectUseDepthBuffer) {
23046
- if (((f = this.modelScene.parameter.pano0Depth) === null || f === void 0 ? void 0 : f.panoId) !== Se.panoId || ((d = this.modelScene.parameter.pano1Depth) === null || d === void 0 ? void 0 : d.panoId) !== Pe.panoId) {
23047
- var je = 500, xe = 512;
23048
- this.pano0DepthCubeRenderTarget ? this.pano0DepthCubeRenderTarget.width !== xe && this.pano0DepthCubeRenderTarget.setSize(xe, xe) : this.pano0DepthCubeRenderTarget = new THREE.WebGLCubeRenderTarget(xe, {
23044
+ var $e = b.effect, Pe = this.modelScene.parameter, xe = Pe.pano0, He = Pe.pano1;
23045
+ if (xe && He && xe !== He && $e === "fly" && this.flyEffectUseDepthBuffer) {
23046
+ if (((f = this.modelScene.parameter.pano0Depth) === null || f === void 0 ? void 0 : f.panoId) !== xe.panoId || ((d = this.modelScene.parameter.pano1Depth) === null || d === void 0 ? void 0 : d.panoId) !== He.panoId) {
23047
+ var je = 500, Re = 512;
23048
+ this.pano0DepthCubeRenderTarget ? this.pano0DepthCubeRenderTarget.width !== Re && this.pano0DepthCubeRenderTarget.setSize(Re, Re) : this.pano0DepthCubeRenderTarget = new THREE.WebGLCubeRenderTarget(Re, {
23049
23049
  minFilter: THREE.NearestFilter,
23050
23050
  magFilter: THREE.NearestFilter,
23051
23051
  generateMipmaps: !1
23052
- }), this.pano1DepthCubeRenderTarget ? this.pano1DepthCubeRenderTarget.width !== xe && this.pano1DepthCubeRenderTarget.setSize(xe, xe) : this.pano1DepthCubeRenderTarget = new THREE.WebGLCubeRenderTarget(xe, {
23052
+ }), this.pano1DepthCubeRenderTarget ? this.pano1DepthCubeRenderTarget.width !== Re && this.pano1DepthCubeRenderTarget.setSize(Re, Re) : this.pano1DepthCubeRenderTarget = new THREE.WebGLCubeRenderTarget(Re, {
23053
23053
  minFilter: THREE.NearestFilter,
23054
23054
  magFilter: THREE.NearestFilter,
23055
23055
  generateMipmaps: !1
23056
23056
  });
23057
- var Oe = new THREE.CubeCamera(this.camera.near, this.camera.far, this.pano0DepthCubeRenderTarget);
23058
- Oe.matrix.copy(Se.matrix), Oe.matrixWorld.copy(Oe.matrix), Oe.matrixAutoUpdate = !1, renderDepthCube(this.renderer, this.modelScene, Oe, je);
23059
- var Me = new THREE.CubeCamera(this.camera.near, this.camera.far, this.pano1DepthCubeRenderTarget);
23060
- Me.matrix.copy(Pe.matrix), Me.matrixWorld.copy(Me.matrix), Me.matrixAutoUpdate = !1, renderDepthCube(this.renderer, this.modelScene, Me, je), this.modelScene.parameter.set({
23057
+ var We = new THREE.CubeCamera(this.camera.near, this.camera.far, this.pano0DepthCubeRenderTarget);
23058
+ We.matrix.copy(xe.matrix), We.matrixWorld.copy(We.matrix), We.matrixAutoUpdate = !1, renderDepthCube(this.renderer, this.modelScene, We, je);
23059
+ var Se = new THREE.CubeCamera(this.camera.near, this.camera.far, this.pano1DepthCubeRenderTarget);
23060
+ Se.matrix.copy(He.matrix), Se.matrixWorld.copy(Se.matrix), Se.matrixAutoUpdate = !1, renderDepthCube(this.renderer, this.modelScene, Se, je), this.modelScene.parameter.set({
23061
23061
  pano0Depth: {
23062
- panoId: Se.panoId,
23062
+ panoId: xe.panoId,
23063
23063
  map: this.pano0DepthCubeRenderTarget.texture,
23064
23064
  mapSize: this.pano0DepthCubeRenderTarget.width,
23065
23065
  maxDepth: je
23066
23066
  },
23067
23067
  pano1Depth: {
23068
- panoId: Pe.panoId,
23068
+ panoId: He.panoId,
23069
23069
  map: this.pano1DepthCubeRenderTarget.texture,
23070
23070
  mapSize: this.pano1DepthCubeRenderTarget.width,
23071
23071
  maxDepth: je
@@ -23333,17 +23333,17 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$1 = new THREE.Vec
23333
23333
  { key: M.key, progress: N / T, value: M.value },
23334
23334
  { key: y, progress: 1, value: { count: M.value.count + 1, distance: 0 } }
23335
23335
  ];
23336
- var J = this.locationMotionKeyframesLength(this.locationMotion.keyframes), K = this.locationMotionKeyframesLength(S);
23337
- J === 0 || J === 0 ? R = 0 : R = this.locationMotion.getProgressVelocity(v) * J / K;
23336
+ var J = this.locationMotionKeyframesLength(this.locationMotion.keyframes), G = this.locationMotionKeyframesLength(S);
23337
+ J === 0 || J === 0 ? R = 0 : R = this.locationMotion.getProgressVelocity(v) * J / G;
23338
23338
  }
23339
23339
  var Q = r.effect === "instant" ? 0 : this.calculateMovingDuration(o.duration, r.effect === "fly" ? T : 0), U = {
23340
23340
  longitude: o.longitude,
23341
23341
  latitude: o.latitude,
23342
23342
  fov: o.fov
23343
- }, q = __assign(__assign({}, e), { mode: this.mode, longitude: (l = U.longitude) !== null && l !== void 0 ? l : this.camera.pose.longitude, latitude: (c = U.latitude) !== null && c !== void 0 ? c : this.camera.pose.latitude, fov: (f = U.fov) !== null && f !== void 0 ? f : this.camera.pose.fov, offset: r.position.clone(), distance: this.camera.pose.distance }), X = this.currentPano;
23343
+ }, q = __assign(__assign({}, e), { mode: this.mode, longitude: (l = U.longitude) !== null && l !== void 0 ? l : this.camera.pose.longitude, latitude: (c = U.latitude) !== null && c !== void 0 ? c : this.camera.pose.latitude, fov: (f = U.fov) !== null && f !== void 0 ? f : this.camera.pose.fov, offset: r.position.clone(), distance: this.camera.pose.distance }), K = this.currentPano;
23344
23344
  if (this.emit("pano.moveTo", createEvent("pano.moveTo", {
23345
23345
  options: o,
23346
- prevPano: X,
23346
+ prevPano: K,
23347
23347
  progress: 0,
23348
23348
  state: q,
23349
23349
  userAction: this.userAction,
@@ -23351,23 +23351,23 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$1 = new THREE.Vec
23351
23351
  })), o.moveStartCallback && o.moveStartCallback(q), 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$1, this.videoTexture.needsUpdate = !0), this.panoVideo.setMaterial(null), r.effect === "fly")
23352
23352
  this.cameraMotion.set(U, Q).catch(noop$1);
23353
23353
  else {
23354
- var Z = coordinatesToVector({
23354
+ var Y = coordinatesToVector({
23355
23355
  longitude: this.cameraMotion.value.longitude,
23356
23356
  latitude: this.cameraMotion.value.latitude
23357
- }), W = coordinatesToVector({
23357
+ }), Z = coordinatesToVector({
23358
23358
  longitude: (d = U.longitude) !== null && d !== void 0 ? d : this.cameraMotion.value.longitude,
23359
23359
  latitude: (h = U.latitude) !== null && h !== void 0 ? h : this.cameraMotion.value.latitude
23360
- }), G = new THREE.Object3D();
23361
- G.lookAt(Z);
23362
- var ne = new THREE.Matrix4().makeRotationFromQuaternion(G.quaternion);
23363
- G.lookAt(W);
23364
- var $ = new THREE.Matrix4().makeRotationFromQuaternion(G.quaternion), ee = new THREE.Matrix4().getInverse(ne).premultiply($), re = this.cameraMotion.value.fov, le = (p = U.fov) !== null && p !== void 0 ? p : this.cameraMotion.value.fov, ie = 1;
23360
+ }), te = new THREE.Object3D();
23361
+ te.lookAt(Y);
23362
+ var j = new THREE.Matrix4().makeRotationFromQuaternion(te.quaternion);
23363
+ te.lookAt(Z);
23364
+ var ee = new THREE.Matrix4().makeRotationFromQuaternion(te.quaternion), W = new THREE.Matrix4().getInverse(j).premultiply(ee), re = this.cameraMotion.value.fov, le = (p = U.fov) !== null && p !== void 0 ? p : this.cameraMotion.value.fov, ie = 1;
23365
23365
  r.effect === "zoomin" ? ie = 1.5 : r.effect === "zoomout" && (ie = 0.4);
23366
23366
  for (var oe = clamp$1(le * ie, 1, 170), se = 0; se < S.length - 1; se++) {
23367
- var fe = S[se].key;
23368
- if (fe) {
23369
- var he = this.panoResources[fe];
23370
- he && (he.fixCameraTransform.copy(ee), he.panoPicture && (he.panoPicture.zoom = Math.tan(oe / 2 / 180 * Math.PI) / Math.tan(re / 2 / 180 * Math.PI)));
23367
+ var ce = S[se].key;
23368
+ if (ce) {
23369
+ var ve = this.panoResources[ce];
23370
+ ve && (ve.fixCameraTransform.copy(W), ve.panoPicture && (ve.panoPicture.zoom = Math.tan(oe / 2 / 180 * Math.PI) / Math.tan(re / 2 / 180 * Math.PI)));
23371
23371
  }
23372
23372
  }
23373
23373
  this.cameraMotion.setKeyframes([
@@ -23397,41 +23397,41 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$1 = new THREE.Vec
23397
23397
  }
23398
23398
  ], Q).catch(noop$1);
23399
23399
  }
23400
- var Re = this.locationMotion.setKeyframes(S, Q, R);
23401
- Re.then(
23400
+ var Te = this.locationMotion.setKeyframes(S, Q, R);
23401
+ Te.then(
23402
23402
  // resolve
23403
23403
  // 动画结束
23404
23404
  function() {
23405
- for (var ce = 0, Ce = s.modelScene.children; ce < Ce.length; ce++) {
23406
- var j = Ce[ce];
23407
- j instanceof Model && j.show();
23405
+ for (var fe = 0, me = s.modelScene.children; fe < me.length; fe++) {
23406
+ var X = me[fe];
23407
+ X instanceof Model && X.show();
23408
23408
  }
23409
- var te = __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 });
23409
+ var ne = __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 });
23410
23410
  s.emit("pano.arrived", createEvent("pano.arrived", {
23411
23411
  options: o,
23412
- prevPano: X,
23412
+ prevPano: K,
23413
23413
  progress: 1,
23414
- state: te,
23414
+ state: ne,
23415
23415
  userAction: s.userAction,
23416
23416
  error: null
23417
- })), o.moveEndCallback && o.moveEndCallback(te);
23417
+ })), o.moveEndCallback && o.moveEndCallback(ne);
23418
23418
  var V = s.works.getResolvedObserver(e);
23419
23419
  if (V && V.video && s.videoTexture && s.videoTexture.image instanceof HTMLVideoElement) {
23420
- var be = {
23420
+ var Ee = {
23421
23421
  map: s.videoTexture,
23422
23422
  size: V.video.size,
23423
23423
  matrix: V.video.matrix,
23424
23424
  panoMatrix: V.matrix,
23425
23425
  alpha: 1
23426
- }, de = createUuid(), ve = s.videoTexture.image;
23427
- ve.setAttribute("uuid", de), canplayVideo().then(function(Ve) {
23428
- Ve && V.video && ve.getAttribute("uuid") === de && (ve.oncanplay = function() {
23429
- ve.oncanplay = noop$1, ve.play();
23430
- }, ve.ontimeupdate = function() {
23431
- ve.currentTime > 0.5 && (ve.ontimeupdate = noop$1, s.panoVideo.setMaterial(be));
23432
- }, ve.src = V.video.source);
23426
+ }, de = createUuid(), pe = s.videoTexture.image;
23427
+ pe.setAttribute("uuid", de), canplayVideo().then(function(Ne) {
23428
+ Ne && V.video && pe.getAttribute("uuid") === de && (pe.oncanplay = function() {
23429
+ pe.oncanplay = noop$1, pe.play();
23430
+ }, pe.ontimeupdate = function() {
23431
+ pe.currentTime > 0.5 && (pe.ontimeupdate = noop$1, s.panoVideo.setMaterial(Ee));
23432
+ }, pe.src = V.video.source);
23433
23433
  }).catch(function() {
23434
- ve.removeAttribute("uuid");
23434
+ pe.removeAttribute("uuid");
23435
23435
  });
23436
23436
  }
23437
23437
  },
@@ -23440,7 +23440,7 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$1 = new THREE.Vec
23440
23440
  function() {
23441
23441
  s.emit("pano.cancel", createEvent("pano.cancel", {
23442
23442
  options: o,
23443
- prevPano: X,
23443
+ prevPano: K,
23444
23444
  progress: 0,
23445
23445
  state: q,
23446
23446
  userAction: s.userAction,
@@ -23496,16 +23496,16 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$1 = new THREE.Vec
23496
23496
  var d = f.accessibleIds.filter(function(q) {
23497
23497
  if (q === panoStringify(r.currentPano))
23498
23498
  return !1;
23499
- var X = r.works.getResolvedObserver(q);
23500
- return !X || X.position.distanceTo(r.camera.position) > r.maxAccessibleDistance ? !1 : X.loadable || X.active;
23499
+ var K = r.works.getResolvedObserver(q);
23500
+ return !K || K.position.distanceTo(r.camera.position) > r.maxAccessibleDistance ? !1 : K.loadable || K.active;
23501
23501
  }), h = this.modelScene.intersectRaycaster(u)[0];
23502
23502
  if (h) {
23503
23503
  var p = arrayMin(d, function(q) {
23504
- var X = r.works.getResolvedObserver(q);
23505
- if (!X)
23504
+ var K = r.works.getResolvedObserver(q);
23505
+ if (!K)
23506
23506
  return 1 / 0;
23507
- var Z = X.standingPosition.clone();
23508
- return Z.distanceTo(h.point);
23507
+ var Y = K.standingPosition.clone();
23508
+ return Y.distanceTo(h.point);
23509
23509
  }, !0), g = p[0], A = p[1];
23510
23510
  g && A < this.panoTapTriggerRadius && (c = (o = this.works.getResolvedObserver(g)) !== null && o !== void 0 ? o : null);
23511
23511
  }
@@ -23530,12 +23530,12 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$1 = new THREE.Vec
23530
23530
  }
23531
23531
  }
23532
23532
  }
23533
- var _ = F.length > 0 ? F : __spreadArray(__spreadArray([], C, !0), M, !0), N = _.slice().sort(function(q, X) {
23534
- return q.angleTo(R) - X.angleTo(R);
23533
+ var _ = F.length > 0 ? F : __spreadArray(__spreadArray([], C, !0), M, !0), N = _.slice().sort(function(q, K) {
23534
+ return q.angleTo(R) - K.angleTo(R);
23535
23535
  })[0];
23536
23536
  if (N && N.angleTo(l) > S && (b.longitude = Math.atan2(-N.x, -N.z)), this.cameraMotion.value.latitude < -Math.PI / 4) {
23537
- var z = e.state.fov, J = clamp$1(typeof this.minLatitude == "function" ? this.minLatitude(z) : this.minLatitude, -Math.PI / 2, Math.PI / 2), K = clamp$1(typeof this.maxLatitude == "function" ? this.maxLatitude(z) : this.maxLatitude, -Math.PI / 2, Math.PI / 2);
23538
- b.latitude = clamp$1(0, J, K);
23537
+ var z = e.state.fov, J = clamp$1(typeof this.minLatitude == "function" ? this.minLatitude(z) : this.minLatitude, -Math.PI / 2, Math.PI / 2), G = clamp$1(typeof this.maxLatitude == "function" ? this.maxLatitude(z) : this.maxLatitude, -Math.PI / 2, Math.PI / 2);
23538
+ b.latitude = clamp$1(0, J, G);
23539
23539
  }
23540
23540
  var Q = __assign({}, e.state);
23541
23541
  if (Q.workCode = c.pano.workCode, Q.panoIndex = c.pano.panoIndex, b.longitude !== void 0 && (Q.longitude = b.longitude), b.latitude !== void 0 && (Q.latitude = b.latitude), b.fov !== void 0 && (Q.fov = b.fov), Q.distance = 0, Q.offset = c.position.clone(), e.state = Q, this.emit("gesture.tap", e), !e.defaultPrevented) {
@@ -24500,23 +24500,23 @@ void main() {
24500
24500
  w.copy(I), S = !0;
24501
24501
  }
24502
24502
  p.distance = this.locationMotion.value.distance, p.offset = new THREE.Vector3(w.x + (I.x - w.x) * P, w.y + (I.y - w.y) * P, w.z + (I.z - w.z) * P);
24503
- for (var N = [], z = [], J = 0, K = this.locationMotion.keyframes; J < K.length; J++) {
24504
- var Q = K[J], U = Q.key, q = Q.progress;
24503
+ for (var N = [], z = [], J = 0, G = this.locationMotion.keyframes; J < G.length; J++) {
24504
+ var Q = G[J], U = Q.key, q = Q.progress;
24505
24505
  U !== void 0 && (N.push(U), q > this.locationMotion.progress && z.push(U));
24506
24506
  }
24507
- for (var X = 0, Z = Object.keys(this.panoResources); X < Z.length; X++) {
24508
- var W = Z[X];
24509
- if (!(z.indexOf(W) >= 0)) {
24510
- var G = this.panoResources[W];
24511
- if (G.panoPicture) {
24512
- var ne = G.panoPicture.map;
24513
- if (ne) {
24514
- if (ne === ((o = h.pano0) === null || o === void 0 ? void 0 : o.map) || ne === ((s = h.pano1) === null || s === void 0 ? void 0 : s.map))
24507
+ for (var K = 0, Y = Object.keys(this.panoResources); K < Y.length; K++) {
24508
+ var Z = Y[K];
24509
+ if (!(z.indexOf(Z) >= 0)) {
24510
+ var te = this.panoResources[Z];
24511
+ if (te.panoPicture) {
24512
+ var j = te.panoPicture.map;
24513
+ if (j) {
24514
+ if (j === ((o = h.pano0) === null || o === void 0 ? void 0 : o.map) || j === ((s = h.pano1) === null || s === void 0 ? void 0 : s.map))
24515
24515
  continue;
24516
- ne.dispose(), G.panoPicture = null;
24516
+ j.dispose(), te.panoPicture = null;
24517
24517
  }
24518
24518
  }
24519
- N.indexOf(W) >= 0 || delete this.panoResources[W];
24519
+ N.indexOf(Z) >= 0 || delete this.panoResources[Z];
24520
24520
  }
24521
24521
  }
24522
24522
  this.currentPano = panoParse(H.panoId), this.emit("pano.moving", createEvent("pano.moving", {
@@ -24529,7 +24529,7 @@ void main() {
24529
24529
  }));
24530
24530
  }
24531
24531
  isEmptyObject(h) === !1 && this.modelScene.parameter.set(h), p.offset && this.camera.position.copy(p.offset), panoEqual(this.currentPano, d) && this.updatePanoMeshesVisible();
24532
- var $ = this.camera.pose.longitude, ee = this.camera.pose.latitude;
24532
+ var ee = this.camera.pose.longitude, W = this.camera.pose.latitude;
24533
24533
  this.camera.quaternion.fromArray(this.cardboard.sensor.getOrientation()), this.camera.computePose();
24534
24534
  var re = this.works.getResolvedObserver(this.currentPano);
24535
24535
  if (this.camera.pose.distance > 0.1 || S)
@@ -24538,74 +24538,74 @@ void main() {
24538
24538
  se.setOpacity(0), se.updateTime && se.updateTime(e, r), se.visible = !1;
24539
24539
  }
24540
24540
  else if (re)
24541
- for (var fe = re.visibleIds.concat(panoStringify(this.currentPano)), he = 0, Re = fe; he < Re.length; he++) {
24542
- var oe = Re[he], ce = panoParse(oe), _ = this.works.getResolvedObserver(ce);
24541
+ for (var ce = re.visibleIds.concat(panoStringify(this.currentPano)), ve = 0, Te = ce; ve < Te.length; ve++) {
24542
+ var oe = Te[ve], fe = panoParse(oe), _ = this.works.getResolvedObserver(fe);
24543
24543
  if (_) {
24544
24544
  var se = this.panoMeshes[oe];
24545
24545
  if (!_.loadable && !_.active) {
24546
24546
  se.setOpacity(0);
24547
24547
  continue;
24548
24548
  }
24549
- var Ce = se.position.clone().setY(this.camera.position.y).distanceTo(this.camera.position);
24550
- Ce < 0.05 ? se.setOpacity(0) : se.setOpacity(clamp$1(1.5 / Ce, 0, 1)), panoEqual(this.currentPano, ce) && se.setOpacity(0), se.lookAt(this.camera.position);
24549
+ var me = se.position.clone().setY(this.camera.position.y).distanceTo(this.camera.position);
24550
+ me < 0.05 ? se.setOpacity(0) : se.setOpacity(clamp$1(1.5 / me, 0, 1)), panoEqual(this.currentPano, fe) && se.setOpacity(0), se.lookAt(this.camera.position);
24551
24551
  }
24552
24552
  }
24553
24553
  if (this.locationMotion.ended)
24554
- for (var j = this.intersect(e), te = 0, V = this.works.resolvedObservers; te < V.length; te++) {
24555
- var _ = V[te], se = this.panoMeshes[_.panoId];
24556
- se && (se.setCurrent(se === j), se.updateTime && se.updateTime(e, r));
24554
+ for (var X = this.intersect(e), ne = 0, V = this.works.resolvedObservers; ne < V.length; ne++) {
24555
+ var _ = V[ne], se = this.panoMeshes[_.panoId];
24556
+ se && (se.setCurrent(se === X), se.updateTime && se.updateTime(e, r));
24557
24557
  }
24558
- ($ !== this.camera.pose.longitude || ee !== this.camera.pose.latitude) && (this.cameraMotion.set(pick(this.camera.pose, ["longitude", "latitude"]), 0).catch(noop$1), this.emit("camera.update", createEvent("camera.update", {
24558
+ (ee !== this.camera.pose.longitude || W !== this.camera.pose.latitude) && (this.cameraMotion.set(pick(this.camera.pose, ["longitude", "latitude"]), 0).catch(noop$1), this.emit("camera.update", createEvent("camera.update", {
24559
24559
  userAction: !0,
24560
24560
  state: __assign(__assign(__assign({}, this.currentPano), { mode: this.mode }), clonePose(this.camera.pose))
24561
24561
  })));
24562
24562
  {
24563
- var P = (u = this.modelScene.parameter.progress) !== null && u !== void 0 ? u : 1, be = Math.round(P), de = this.modelScene.parameter.pano0, ve = this.modelScene.parameter.pano1, ce = be === 0 ? de : ve, _ = void 0;
24564
- if (ce && (_ = this.works.getResolvedObserver(ce.panoId), _ || (_ = this.panoPictureObserverMap.get(ce))), this.tiling.appearDuration = this.tileAppearDuration, this.tiling.maxRequest = P <= 0.5 ? 0 : P < 1 ? 1 : this.tileMaxRequest, this.tiling.imageOptions = this.imageOptions, !_ || !ce || this.tileLevelForFov === !1)
24563
+ var P = (u = this.modelScene.parameter.progress) !== null && u !== void 0 ? u : 1, Ee = Math.round(P), de = this.modelScene.parameter.pano0, pe = this.modelScene.parameter.pano1, fe = Ee === 0 ? de : pe, _ = void 0;
24564
+ if (fe && (_ = this.works.getResolvedObserver(fe.panoId), _ || (_ = this.panoPictureObserverMap.get(fe))), this.tiling.appearDuration = this.tileAppearDuration, this.tiling.maxRequest = P <= 0.6 ? 0 : P < 1 ? 1 : this.tileMaxRequest, this.tiling.imageOptions = this.imageOptions, !_ || !fe || this.tileLevelForFov === !1)
24565
24565
  this.tiling.setObserver(null), this.tiling.update(this.renderer, this.camera, null, new THREE.Matrix4(), 1, 0, 0), this.modelScene.parameter.set("refinedScreen", null);
24566
24566
  else {
24567
- var Ve = getImageSizeLevel(ce.mapSize), rt = Ve + 1, We = new THREE.Vector2().copy(this.camera.resolution).multiplyScalar(this.camera.pixelRatio), me = Math.floor(this.tileLevelForFov(this.camera.fov, We)), ae = me > Ve ? me : 0;
24567
+ var Ne = getImageSizeLevel(fe.mapSize), rt = Ne + 1, Ye = new THREE.Vector2().copy(this.camera.resolution).multiplyScalar(this.camera.pixelRatio), ge = Math.floor(this.tileLevelForFov(this.camera.fov, Ye)), ae = ge > Ne ? ge : 0;
24568
24568
  this.tiling.setObserver(_);
24569
- var pe = this.tiling.update(this.renderer, this.camera, ce.map, ce.matrix, ce.zoom, rt, ae), we = {
24569
+ var he = this.tiling.update(this.renderer, this.camera, fe.map, fe.matrix, fe.zoom, rt, ae), we = {
24570
24570
  map: this.tiling.renderTarget.texture,
24571
24571
  matrixInverse: this.tiling.camera.matrixWorldInverse,
24572
24572
  projectionMatrix: this.tiling.camera.projectionMatrix,
24573
- pano: be,
24574
- opacity: (de == null ? void 0 : de.panoId) === (ve == null ? void 0 : ve.panoId) ? 1 : easeInQuart(Math.abs(((l = this.modelScene.parameter.progress) !== null && l !== void 0 ? l : 0) - 0.5) * 2)
24575
- }, Se = this.modelScene.parameter.refinedScreen;
24576
- (pe || we.pano !== (Se == null ? void 0 : Se.pano) || we.opacity !== (Se == null ? void 0 : Se.opacity)) && this.modelScene.parameter.set("refinedScreen", we);
24573
+ pano: Ee,
24574
+ opacity: (de == null ? void 0 : de.panoId) === (pe == null ? void 0 : pe.panoId) ? 1 : easeInQuart(Math.abs(((l = this.modelScene.parameter.progress) !== null && l !== void 0 ? l : 0) - 0.5) * 2)
24575
+ }, xe = this.modelScene.parameter.refinedScreen;
24576
+ (he || we.pano !== (xe == null ? void 0 : xe.pano) || we.opacity !== (xe == null ? void 0 : xe.opacity)) && this.modelScene.parameter.set("refinedScreen", we);
24577
24577
  }
24578
24578
  }
24579
24579
  this.panoVideo.object.position.copy(this.camera.position), this.panoVideo.updateTime(e);
24580
24580
  {
24581
- var Pe = y.effect, Le = this.modelScene.parameter, de = Le.pano0, ve = Le.pano1;
24582
- if (de && ve && de !== ve && Pe === "fly" && this.flyEffectUseDepthBuffer) {
24583
- if (((c = this.modelScene.parameter.pano0Depth) === null || c === void 0 ? void 0 : c.panoId) !== de.panoId || ((f = this.modelScene.parameter.pano1Depth) === null || f === void 0 ? void 0 : f.panoId) !== ve.panoId) {
24584
- var Ae = 500, Te = 512;
24585
- this.pano0DepthCubeRenderTarget ? this.pano0DepthCubeRenderTarget.width !== Te && this.pano0DepthCubeRenderTarget.setSize(Te, Te) : this.pano0DepthCubeRenderTarget = new THREE.WebGLCubeRenderTarget(Te, {
24581
+ var He = y.effect, _e = this.modelScene.parameter, de = _e.pano0, pe = _e.pano1;
24582
+ if (de && pe && de !== pe && He === "fly" && this.flyEffectUseDepthBuffer) {
24583
+ if (((c = this.modelScene.parameter.pano0Depth) === null || c === void 0 ? void 0 : c.panoId) !== de.panoId || ((f = this.modelScene.parameter.pano1Depth) === null || f === void 0 ? void 0 : f.panoId) !== pe.panoId) {
24584
+ var be = 500, Me = 512;
24585
+ this.pano0DepthCubeRenderTarget ? this.pano0DepthCubeRenderTarget.width !== Me && this.pano0DepthCubeRenderTarget.setSize(Me, Me) : this.pano0DepthCubeRenderTarget = new THREE.WebGLCubeRenderTarget(Me, {
24586
24586
  minFilter: THREE.NearestFilter,
24587
24587
  magFilter: THREE.NearestFilter,
24588
24588
  generateMipmaps: !1
24589
- }), this.pano1DepthCubeRenderTarget ? this.pano1DepthCubeRenderTarget.width !== Te && this.pano1DepthCubeRenderTarget.setSize(Te, Te) : this.pano1DepthCubeRenderTarget = new THREE.WebGLCubeRenderTarget(Te, {
24589
+ }), this.pano1DepthCubeRenderTarget ? this.pano1DepthCubeRenderTarget.width !== Me && this.pano1DepthCubeRenderTarget.setSize(Me, Me) : this.pano1DepthCubeRenderTarget = new THREE.WebGLCubeRenderTarget(Me, {
24590
24590
  minFilter: THREE.NearestFilter,
24591
24591
  magFilter: THREE.NearestFilter,
24592
24592
  generateMipmaps: !1
24593
24593
  });
24594
24594
  var Ie = new THREE.CubeCamera(this.camera.near, this.camera.far, this.pano0DepthCubeRenderTarget);
24595
- Ie.matrix.copy(de.matrix), Ie.matrixWorld.copy(Ie.matrix), Ie.matrixAutoUpdate = !1, renderDepthCube(this.renderer, this.modelScene, Ie, Ae);
24595
+ Ie.matrix.copy(de.matrix), Ie.matrixWorld.copy(Ie.matrix), Ie.matrixAutoUpdate = !1, renderDepthCube(this.renderer, this.modelScene, Ie, be);
24596
24596
  var Be = new THREE.CubeCamera(this.camera.near, this.camera.far, this.pano1DepthCubeRenderTarget);
24597
- Be.matrix.copy(ve.matrix), Be.matrixWorld.copy(Be.matrix), Be.matrixAutoUpdate = !1, renderDepthCube(this.renderer, this.modelScene, Be, Ae), this.modelScene.parameter.set({
24597
+ Be.matrix.copy(pe.matrix), Be.matrixWorld.copy(Be.matrix), Be.matrixAutoUpdate = !1, renderDepthCube(this.renderer, this.modelScene, Be, be), this.modelScene.parameter.set({
24598
24598
  pano0Depth: {
24599
24599
  panoId: de.panoId,
24600
24600
  map: this.pano0DepthCubeRenderTarget.texture,
24601
24601
  mapSize: this.pano0DepthCubeRenderTarget.width,
24602
- maxDepth: Ae
24602
+ maxDepth: be
24603
24603
  },
24604
24604
  pano1Depth: {
24605
- panoId: ve.panoId,
24605
+ panoId: pe.panoId,
24606
24606
  map: this.pano1DepthCubeRenderTarget.texture,
24607
24607
  mapSize: this.pano1DepthCubeRenderTarget.width,
24608
- maxDepth: Ae
24608
+ maxDepth: be
24609
24609
  }
24610
24610
  });
24611
24611
  }
@@ -24878,15 +24878,15 @@ void main() {
24878
24878
  var J = z[N];
24879
24879
  J instanceof Model && J.show();
24880
24880
  }
24881
- var K = __assign(__assign(__assign({}, P), { mode: s.mode }), clonePose(s.camera.pose));
24881
+ var G = __assign(__assign(__assign({}, P), { mode: s.mode }), clonePose(s.camera.pose));
24882
24882
  s.emit("pano.arrived", createEvent("pano.arrived", {
24883
24883
  options: r,
24884
24884
  prevPano: _,
24885
24885
  progress: 0,
24886
- state: K,
24886
+ state: G,
24887
24887
  userAction: s.userAction,
24888
24888
  error: null
24889
- })), r.moveEndCallback && r.moveEndCallback(K);
24889
+ })), r.moveEndCallback && r.moveEndCallback(G);
24890
24890
  },
24891
24891
  // reject
24892
24892
  // 动画被取消
@@ -25255,9 +25255,9 @@ void main() {
25255
25255
  var E = {
25256
25256
  x: e.center.x - o.x,
25257
25257
  y: e.center.y - o.y
25258
- }, O = this.coordinatesForOffset(E), _ = formatRad(this.cameraMotion.value.longitude + O.longitude), N = this.camera.pose.fov, z = clamp$1(typeof this.minLatitude == "function" ? this.minLatitude(N) : this.minLatitude, -Math.PI / 2, Math.PI / 2), J = clamp$1(typeof this.maxLatitude == "function" ? this.maxLatitude(N) : this.maxLatitude, -Math.PI / 2, Math.PI / 2), K = clamp$1(this.cameraMotion.value.latitude + O.latitude, z, J);
25259
- this.camera.aspect < 1 && Math.abs(e.overallVelocityX) > 0.2 && Math.atan2(Math.abs(e.overallVelocityY), Math.abs(e.overallVelocityX)) < Math.PI / 6.923 && (K = this.cameraMotion.value.latitude);
25260
- var M = __assign(__assign({}, this.currentPano), { mode: this.mode, longitude: _, latitude: K, fov: N, offset: this.camera.pose.offset, distance: this.camera.pose.distance });
25258
+ }, O = this.coordinatesForOffset(E), _ = formatRad(this.cameraMotion.value.longitude + O.longitude), N = this.camera.pose.fov, z = clamp$1(typeof this.minLatitude == "function" ? this.minLatitude(N) : this.minLatitude, -Math.PI / 2, Math.PI / 2), J = clamp$1(typeof this.maxLatitude == "function" ? this.maxLatitude(N) : this.maxLatitude, -Math.PI / 2, Math.PI / 2), G = clamp$1(this.cameraMotion.value.latitude + O.latitude, z, J);
25259
+ this.camera.aspect < 1 && Math.abs(e.overallVelocityX) > 0.2 && Math.atan2(Math.abs(e.overallVelocityY), Math.abs(e.overallVelocityX)) < Math.PI / 6.923 && (G = this.cameraMotion.value.latitude);
25260
+ var M = __assign(__assign({}, this.currentPano), { mode: this.mode, longitude: _, latitude: G, fov: N, offset: this.camera.pose.offset, distance: this.camera.pose.distance });
25261
25261
  if (e.isFinal && Object.assign(e, { __fixFinalState: !0 }), e.state = M, this.emit("gesture.pan", e), e.defaultPrevented)
25262
25262
  return;
25263
25263
  if (e.isFinal ? this.locationMotion.set({
@@ -25469,14 +25469,27 @@ var _moveEvent = { type: "move" }, XRController = (
25469
25469
  return l !== null && (l.visible = o !== null), c !== null && (c.visible = s !== null), f !== null && (f.visible = u !== null), this;
25470
25470
  }, n;
25471
25471
  }()
25472
- ), framebufferScaleFactor = 1, XRManager = (
25472
+ ), framebufferScaleFactor = 1, isAppleVisionPro = function() {
25473
+ try {
25474
+ var n = /Macintosh/i.test(navigator.userAgent), t = navigator.maxTouchPoints === 5;
25475
+ return n && t;
25476
+ } catch (e) {
25477
+ return console.error("Error determining if the device is an Apple Vision Pro: ", e), !1;
25478
+ }
25479
+ }, isOculus = function() {
25480
+ try {
25481
+ return /Oculus/i.test(navigator.userAgent);
25482
+ } catch (n) {
25483
+ return console.error("Error determining if the device is an Oculus: ", n), !1;
25484
+ }
25485
+ }, XRManager = (
25473
25486
  /** @class */
25474
25487
  function() {
25475
25488
  function n(t, e, r) {
25476
25489
  var o, s, u, l, c;
25477
- this.isPanorama = (o = r == null ? void 0 : r.isPanorama) !== null && o !== void 0 ? o : !0;
25478
- var f = navigator.userAgent.toLowerCase(), d;
25479
- f.includes("pico") ? d = "Pico" : f.includes("oculus") ? d = "Oculus" : d = "VP", this.machineType = (s = r == null ? void 0 : r.machineType) !== null && s !== void 0 ? s : d, this.renderer = t, this.gl = e, this.enabled = !1, this.session = null, this.referenceSpaceType = (u = r == null ? void 0 : r.referenceSpaceType) !== null && u !== void 0 ? u : "local-floor", this.referenceSpace = null, this.onSessionStartCallback = (l = r == null ? void 0 : r.onSessionStart) !== null && l !== void 0 ? l : noop$1, this.onSessionEndCallback = (c = r == null ? void 0 : r.onSessionEnd) !== null && c !== void 0 ? c : noop$1, this.controllers = [new XRController(), new XRController()], this.inputSourcesMap = /* @__PURE__ */ new Map(), this.cameraVR = new THREE.ArrayCamera(), this.cameraL = new THREE.PerspectiveCamera(), this.cameraR = new THREE.PerspectiveCamera(), this.cameraL.viewport = new THREE.Vector4(), this.cameraR.viewport = new THREE.Vector4(), this.cameraL.layers.enable(1), this.cameraR.layers.enable(2), this.cameraVR.layers.enable(1), this.cameraVR.layers.enable(2), this.isPresenting = !1, this.currentDepthNear = null, this.currentDepthFar = null, this.cameraLPos = new THREE.Vector3(), this.cameraRPos = new THREE.Vector3();
25490
+ this.isPanorama = (o = r == null ? void 0 : r.isPanorama) !== null && o !== void 0 ? o : !0, navigator.userAgent.toLowerCase();
25491
+ var f;
25492
+ isAppleVisionPro() ? f = "VP" : isOculus() ? f = "Oculus" : f = "Pico", this.machineType = (s = r == null ? void 0 : r.machineType) !== null && s !== void 0 ? s : f, this.renderer = t, this.gl = e, this.enabled = !1, this.session = null, this.referenceSpaceType = (u = r == null ? void 0 : r.referenceSpaceType) !== null && u !== void 0 ? u : "local-floor", this.referenceSpace = null, this.onSessionStartCallback = (l = r == null ? void 0 : r.onSessionStart) !== null && l !== void 0 ? l : noop$1, this.onSessionEndCallback = (c = r == null ? void 0 : r.onSessionEnd) !== null && c !== void 0 ? c : noop$1, this.controllers = [new XRController(), new XRController()], this.inputSourcesMap = /* @__PURE__ */ new Map(), this.cameraVR = new THREE.ArrayCamera(), this.cameraL = new THREE.PerspectiveCamera(), this.cameraR = new THREE.PerspectiveCamera(), this.cameraL.viewport = new THREE.Vector4(), this.cameraR.viewport = new THREE.Vector4(), this.cameraL.layers.enable(1), this.cameraR.layers.enable(2), this.cameraVR.layers.enable(1), this.cameraVR.layers.enable(2), this.isPresenting = !1, this.currentDepthNear = null, this.currentDepthFar = null, this.cameraLPos = new THREE.Vector3(), this.cameraRPos = new THREE.Vector3();
25480
25493
  }
25481
25494
  return n.prototype.getController = function(t) {
25482
25495
  var e = this.controllers[t];
@@ -26063,7 +26076,7 @@ var circleImageURL = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYA
26063
26076
  }
26064
26077
  return Object.defineProperty(t, "version", {
26065
26078
  get: function() {
26066
- return "6.5.1";
26079
+ return "6.5.2";
26067
26080
  },
26068
26081
  enumerable: !1,
26069
26082
  configurable: !0
@@ -26699,7 +26712,7 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
26699
26712
  var z = this.locationMotionKeyframesLength(this.locationMotion.keyframes), J = this.locationMotionKeyframesLength(T);
26700
26713
  S = this.locationMotion.getProgressVelocity(E) * z / J;
26701
26714
  }
26702
- var K = r.effect === "instant" ? 0 : this.calculateMovingDuration(o.duration, r.effect === "fly" ? b : 0), Q = {
26715
+ var G = r.effect === "instant" ? 0 : this.calculateMovingDuration(o.duration, r.effect === "fly" ? b : 0), Q = {
26703
26716
  longitude: o.longitude,
26704
26717
  latitude: o.latitude,
26705
26718
  fov: o.fov
@@ -26712,25 +26725,25 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
26712
26725
  userAction: this.userAction,
26713
26726
  error: null
26714
26727
  })), 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$1, this.videoTexture.needsUpdate = !0), this.panoVideo.setMaterial(null), r.effect === "fly")
26715
- this.cameraMotion.set(Q, K).catch(noop$1);
26728
+ this.cameraMotion.set(Q, G).catch(noop$1);
26716
26729
  else {
26717
- var X = coordinatesToVector({
26730
+ var K = coordinatesToVector({
26718
26731
  longitude: this.cameraMotion.value.longitude,
26719
26732
  latitude: this.cameraMotion.value.latitude
26720
- }), Z = coordinatesToVector({
26733
+ }), Y = coordinatesToVector({
26721
26734
  longitude: (f = Q.longitude) !== null && f !== void 0 ? f : this.cameraMotion.value.longitude,
26722
26735
  latitude: (d = Q.latitude) !== null && d !== void 0 ? d : this.cameraMotion.value.latitude
26723
- }), W = new THREE.Object3D();
26724
- W.lookAt(X);
26725
- var G = new THREE.Matrix4().makeRotationFromQuaternion(W.quaternion);
26726
- W.lookAt(Z);
26727
- var ne = new THREE.Matrix4().makeRotationFromQuaternion(W.quaternion), $ = new THREE.Matrix4().getInverse(G).premultiply(ne), ee = this.cameraMotion.value.fov, re = (h = Q.fov) !== null && h !== void 0 ? h : this.cameraMotion.value.fov, le = 1;
26736
+ }), Z = new THREE.Object3D();
26737
+ Z.lookAt(K);
26738
+ var te = new THREE.Matrix4().makeRotationFromQuaternion(Z.quaternion);
26739
+ Z.lookAt(Y);
26740
+ var j = new THREE.Matrix4().makeRotationFromQuaternion(Z.quaternion), ee = new THREE.Matrix4().getInverse(te).premultiply(j), W = this.cameraMotion.value.fov, re = (h = Q.fov) !== null && h !== void 0 ? h : this.cameraMotion.value.fov, le = 1;
26728
26741
  r.effect === "zoomin" ? le = 1.5 : r.effect === "zoomout" && (le = 0.4);
26729
26742
  for (var ie = re * le, oe = 0; oe < T.length - 1; oe++) {
26730
26743
  var se = T[oe].key;
26731
26744
  if (se) {
26732
- var fe = this.panoResources[se];
26733
- fe && (fe.fixCameraTransform.copy($), fe.leftPanoPicture && (fe.leftPanoPicture.zoom = Math.tan(ie / 2 / 180 * Math.PI) / Math.tan(ee / 2 / 180 * Math.PI)));
26745
+ var ce = this.panoResources[se];
26746
+ ce && (ce.fixCameraTransform.copy(ee), ce.leftPanoPicture && (ce.leftPanoPicture.zoom = Math.tan(ie / 2 / 180 * Math.PI) / Math.tan(W / 2 / 180 * Math.PI)));
26734
26747
  }
26735
26748
  }
26736
26749
  this.cameraMotion.setKeyframes([
@@ -26758,41 +26771,41 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
26758
26771
  fov: re
26759
26772
  }
26760
26773
  }
26761
- ], K).catch(noop$1);
26774
+ ], G).catch(noop$1);
26762
26775
  }
26763
- var he = this.locationMotion.setKeyframes(T, K, S);
26764
- he.then(
26776
+ var ve = this.locationMotion.setKeyframes(T, G, S);
26777
+ ve.then(
26765
26778
  // resolve
26766
26779
  // 动画结束
26767
26780
  function() {
26768
- for (var Re = 0, ce = s.modelScene.children; Re < ce.length; Re++) {
26769
- var Ce = ce[Re];
26770
- Ce instanceof Model && Ce.show();
26781
+ for (var Te = 0, fe = s.modelScene.children; Te < fe.length; Te++) {
26782
+ var me = fe[Te];
26783
+ me instanceof Model && me.show();
26771
26784
  }
26772
- var j = __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 });
26785
+ var X = __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 });
26773
26786
  s.emit("pano.arrived", createEvent("pano.arrived", {
26774
26787
  options: o,
26775
26788
  prevPano: q,
26776
26789
  progress: 1,
26777
- state: j,
26790
+ state: X,
26778
26791
  userAction: s.userAction,
26779
26792
  error: null
26780
- })), o.moveEndCallback && o.moveEndCallback(j);
26781
- var te = s.works.getResolvedObserver(s.currentPano);
26782
- if (te && te.video && s.videoTexture && s.videoTexture.image instanceof HTMLVideoElement) {
26793
+ })), o.moveEndCallback && o.moveEndCallback(X);
26794
+ var ne = s.works.getResolvedObserver(s.currentPano);
26795
+ if (ne && ne.video && s.videoTexture && s.videoTexture.image instanceof HTMLVideoElement) {
26783
26796
  var V = {
26784
26797
  map: s.videoTexture,
26785
- size: te.video.size,
26786
- matrix: te.video.matrix,
26787
- panoMatrix: te.matrix,
26798
+ size: ne.video.size,
26799
+ matrix: ne.video.matrix,
26800
+ panoMatrix: ne.matrix,
26788
26801
  alpha: 1
26789
- }, be = createUuid(), de = s.videoTexture.image;
26790
- de.setAttribute("uuid", be), canplayVideo().then(function(ve) {
26791
- ve && te.video && de.getAttribute("uuid") === be && (de.oncanplay = function() {
26802
+ }, Ee = createUuid(), de = s.videoTexture.image;
26803
+ de.setAttribute("uuid", Ee), canplayVideo().then(function(pe) {
26804
+ pe && ne.video && de.getAttribute("uuid") === Ee && (de.oncanplay = function() {
26792
26805
  de.oncanplay = noop$1, de.play();
26793
26806
  }, de.ontimeupdate = function() {
26794
26807
  de.currentTime > 0.5 && (de.ontimeupdate = noop$1, s.panoVideo.setMaterial(V));
26795
- }, de.src = te.video.source);
26808
+ }, de.src = ne.video.source);
26796
26809
  }).catch(function() {
26797
26810
  de.removeAttribute("uuid");
26798
26811
  });
@@ -26908,23 +26921,23 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
26908
26921
  O.copy(_), M = !0;
26909
26922
  }
26910
26923
  m.distance = this.locationMotion.value.distance, m.offset = new THREE.Vector3(O.x + (_.x - O.x) * N, O.y + (_.y - O.y) * N, O.z + (_.z - O.z) * N);
26911
- for (var K = [], Q = [], U = 0, q = this.locationMotion.keyframes; U < q.length; U++) {
26912
- var X = q[U], Z = X.key, W = X.progress;
26913
- Z !== void 0 && (K.push(Z), W > this.locationMotion.progress && Q.push(Z));
26914
- }
26915
- for (var G = 0, ne = Object.keys(this.panoResources); G < ne.length; G++) {
26916
- var $ = ne[G];
26917
- if (!(Q.indexOf($) >= 0)) {
26918
- var ee = this.panoResources[$];
26919
- if (ee.leftPanoPicture) {
26920
- var re = ee.leftPanoPicture.map;
26924
+ for (var G = [], Q = [], U = 0, q = this.locationMotion.keyframes; U < q.length; U++) {
26925
+ var K = q[U], Y = K.key, Z = K.progress;
26926
+ Y !== void 0 && (G.push(Y), Z > this.locationMotion.progress && Q.push(Y));
26927
+ }
26928
+ for (var te = 0, j = Object.keys(this.panoResources); te < j.length; te++) {
26929
+ var ee = j[te];
26930
+ if (!(Q.indexOf(ee) >= 0)) {
26931
+ var W = this.panoResources[ee];
26932
+ if (W.leftPanoPicture) {
26933
+ var re = W.leftPanoPicture.map;
26921
26934
  if (re) {
26922
26935
  if (re === ((s = A.pano0) === null || s === void 0 ? void 0 : s.map) || re === ((u = A.pano1) === null || u === void 0 ? void 0 : u.map))
26923
26936
  continue;
26924
- re.dispose(), ee.leftPanoPicture = null;
26937
+ re.dispose(), W.leftPanoPicture = null;
26925
26938
  }
26926
26939
  }
26927
- K.indexOf($) >= 0 || delete this.panoResources[$];
26940
+ G.indexOf(ee) >= 0 || delete this.panoResources[ee];
26928
26941
  }
26929
26942
  }
26930
26943
  var le = panoParse(P.panoId);
@@ -26949,182 +26962,186 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
26949
26962
  }
26950
26963
  var se = this.xrManager.referenceSpace;
26951
26964
  if (se) {
26952
- var fe = this.xrManager.cameraVR, he = this.xrManager.cameraL, Re = this.xrManager.cameraR, ce = [he, Re], Ce = oe.getViewerPose(se), j = new THREE.Vector3(0, 0, 0);
26953
- if (Ce) {
26954
- var te;
26955
- te = this.xrManager.session.renderState.baseLayer;
26956
- var V = Ce.views;
26957
- if (!te) {
26965
+ var ce = this.xrManager.cameraVR, ve = this.xrManager.cameraL, Te = this.xrManager.cameraR, fe = [ve, Te], me = oe.getViewerPose(se), X = new THREE.Vector3(0, 0, 0);
26966
+ if (me) {
26967
+ var ne;
26968
+ ne = this.xrManager.session.renderState.baseLayer;
26969
+ var V = me.views;
26970
+ if (!ne) {
26958
26971
  console.error("no layer found");
26959
26972
  return;
26960
26973
  }
26961
- this.renderer.setFramebuffer(te.framebuffer);
26962
- var be = !1;
26963
- V.length !== fe.cameras.length && (fe.cameras.length = 0, be = !0), this.parallaxCameraMatrixs = [];
26964
- var de = new THREE.Vector3(), ve = new THREE.Vector3();
26965
- new THREE.Matrix4().fromArray(V[0].transform.matrix).decompose(de, new THREE.Quaternion(), new THREE.Vector3()), new THREE.Matrix4().fromArray(V[1].transform.matrix).decompose(ve, new THREE.Quaternion(), new THREE.Vector3()), ve.clone().sub(de).normalize();
26966
- var Ve = new THREE.Vector3(), rt = new THREE.Quaternion(), We = new THREE.Vector3();
26967
- this.camera.matrix.decompose(Ve, rt, We);
26968
- for (var me = 0; me < V.length; me++) {
26969
- var ae = V[me], pe = te.getViewport(ae), we = ce[me];
26974
+ this.renderer.setFramebuffer(ne.framebuffer);
26975
+ var Ee = !1;
26976
+ V.length !== ce.cameras.length && (ce.cameras.length = 0, Ee = !0), this.parallaxCameraMatrixs = [];
26977
+ var de = new THREE.Vector3(), pe = new THREE.Vector3();
26978
+ new THREE.Matrix4().fromArray(V[0].transform.matrix).decompose(de, new THREE.Quaternion(), new THREE.Vector3()), new THREE.Matrix4().fromArray(V[1].transform.matrix).decompose(pe, new THREE.Quaternion(), new THREE.Vector3()), pe.clone().sub(de).normalize();
26979
+ var Ne = new THREE.Vector3(), rt = new THREE.Quaternion(), Ye = new THREE.Vector3();
26980
+ this.camera.matrix.decompose(Ne, rt, Ye);
26981
+ for (var ge = 0; ge < V.length; ge++) {
26982
+ var ae = V[ge], he = ne.getViewport(ae), we = fe[ge];
26970
26983
  we.matrix.fromArray(ae.transform.matrix);
26971
- var Se = new THREE.Vector3(), Pe = new THREE.Quaternion(), Le = new THREE.Vector3();
26972
- we.matrix.decompose(Se, Pe, Le), j.copy(Ve), we.position.copy(Ve), we.quaternion.copy(Pe), we.scale.copy(Le), we.updateMatrix(), we.projectionMatrix.fromArray(ae.projectionMatrix), we.viewport.set(pe.x, pe.y, pe.width, pe.height), be === !0 && fe.cameras.push(we);
26984
+ var xe = new THREE.Vector3(), He = new THREE.Quaternion(), _e = new THREE.Vector3();
26985
+ we.matrix.decompose(xe, He, _e), X.copy(Ne), we.position.copy(Ne), we.quaternion.copy(He), we.scale.copy(_e), we.updateMatrix(), we.projectionMatrix.fromArray(ae.projectionMatrix);
26986
+ var be = ve.projectionMatrix.elements;
26987
+ we.fov = 2 * Math.atan(1 / be[5]) * 180 / Math.PI, we.viewport.set(he.x, he.y, he.width, he.height), Object.assign(we, {
26988
+ resolution: new THREE.Vector2(he.width, he.height)
26989
+ }), Ee === !0 && ce.cameras.push(we);
26973
26990
  }
26974
26991
  if (this.xrManager.session && this.xrManager.session.inputSources) {
26975
- for (var me = 0; me < this.xrManager.session.inputSources.length; me++)
26976
- if (this.xrManager.session.inputSources[me] && this.xrManager.session.inputSources[me].targetRayMode === "transient-pointer") {
26977
- var Ae = oe.getPose(this.xrManager.session.inputSources[me].targetRaySpace, se);
26978
- if (Ae) {
26979
- var Te = new THREE.Vector3(0, 0, -1).applyQuaternion(Ae.transform.orientation), Ie = new THREE.Raycaster(this.camera.position, Te);
26980
- this.gazeRay = Ie;
26992
+ for (var ge = 0; ge < this.xrManager.session.inputSources.length; ge++)
26993
+ if (this.xrManager.session.inputSources[ge] && this.xrManager.session.inputSources[ge].targetRayMode === "transient-pointer") {
26994
+ var Me = oe.getPose(this.xrManager.session.inputSources[ge].targetRaySpace, se);
26995
+ if (Me) {
26996
+ var Ie = new THREE.Vector3(0, 0, -1).applyQuaternion(Me.transform.orientation), Be = new THREE.Raycaster(this.camera.position, Ie);
26997
+ this.gazeRay = Be;
26981
26998
  }
26982
26999
  }
26983
27000
  }
26984
27001
  if (this.xrManager.machineType === "Oculus" || this.xrManager.machineType === "Pico") {
26985
- for (var Be = this.xrManager.session.inputSources, me = 0; me < Be.length; me++) {
26986
- var qe = this.xrManager.controllers[me], ke = Be[me];
26987
- if (ke) {
26988
- qe && qe.update(ke, oe, se);
26989
- var Ie = this.xrManager.getController(me), Ne = new THREE.Vector3(0, 1.2, 0), _e = Ie.position.clone().add(j).sub(Ne);
26990
- ke.handedness === "left" ? this.xrControllerRay.left.set(_e, new THREE.Vector3(0, 0, -1).applyEuler(Ie.rotation)) : ke.handedness === "right" && this.xrControllerRay.right.set(_e, new THREE.Vector3(0, 0, -1).applyEuler(Ie.rotation)), this.controllerWrappers[me].position.copy(new THREE.Vector3(0, 0, 0).add(j).sub(Ne));
26991
- var Ue = this.modelScene.intersectRaycaster(this.xrControllerRay.right);
26992
- if (Ue.length === 0 && (Ue = this.xrControllerRay.right.intersectObject(this.boundingMesh, !0).map(function(L) {
26993
- var k;
26994
- return __assign({ floor: (k = ie == null ? void 0 : ie.floorIndex) !== null && k !== void 0 ? k : 0 }, L);
26995
- })), Ue.length >= 1 && Ue[0].face)
26996
- if (ke.handedness === "right") {
26997
- var ze = this.xrControllerRay.right.intersectObject(this.xrCustomObjectsScene, !0), je = Ue[0].face.normal, xe = je.clone(), Oe = Ue[0].point.clone();
26998
- this.intersectMesh.position.copy(Oe);
26999
- var Me = Oe.clone().add(xe);
27000
- if (this.intersectMesh.lookAt(Me), Math.abs(je.y) > 0.99) {
27001
- var Fe = this.camera.position.clone().sub(Oe);
27002
- this.intersectMesh.rotation.z = -Math.atan2(Fe.z, Fe.x);
27002
+ for (var ze = this.xrManager.session.inputSources, ge = 0; ge < ze.length; ge++) {
27003
+ var Ge = this.xrManager.controllers[ge], Fe = ze[ge];
27004
+ if (Fe) {
27005
+ Ge && Ge.update(Fe, oe, se);
27006
+ var Be = this.xrManager.getController(ge), Ve = new THREE.Vector3(0, 1.2, 0), $e = Be.position.clone().add(X).sub(Ve);
27007
+ Fe.handedness === "left" ? this.xrControllerRay.left.set($e, new THREE.Vector3(0, 0, -1).applyEuler(Be.rotation)) : Fe.handedness === "right" && this.xrControllerRay.right.set($e, new THREE.Vector3(0, 0, -1).applyEuler(Be.rotation)), this.controllerWrappers[ge].position.copy(new THREE.Vector3(0, 0, 0).add(X).sub(Ve));
27008
+ var Pe = this.modelScene.intersectRaycaster(this.xrControllerRay.right);
27009
+ if (Pe.length === 0 && (Pe = this.xrControllerRay.right.intersectObject(this.boundingMesh, !0).map(function(k) {
27010
+ var D;
27011
+ return __assign({ floor: (D = ie == null ? void 0 : ie.floorIndex) !== null && D !== void 0 ? D : 0 }, k);
27012
+ })), Pe.length >= 1 && Pe[0].face)
27013
+ if (Fe.handedness === "right") {
27014
+ var je = this.xrControllerRay.right.intersectObject(this.xrCustomObjectsScene, !0), Re = Pe[0].face.normal, We = Re.clone(), Se = Pe[0].point.clone();
27015
+ this.intersectMesh.position.copy(Se);
27016
+ var Oe = Se.clone().add(We);
27017
+ if (this.intersectMesh.lookAt(Oe), Math.abs(Re.y) > 0.99) {
27018
+ var Le = this.camera.position.clone().sub(Se);
27019
+ this.intersectMesh.rotation.z = -Math.atan2(Le.z, Le.x);
27003
27020
  }
27004
- this.intersectMesh.visible = !0, this.needsRender = !0, ze.length > 0 ? (this.pointerLines.right.setPoints(_e, ze[0].point), this.pointerLines.right.points.visible = !0, this.intersectMesh.visible = !1) : (this.pointerLines.right.points.visible = !1, this.pointerLines.right.setPoints(_e, Ue[0].point));
27005
- var He = Ue[0], Ge = createEvent("intersect.update", {
27021
+ this.intersectMesh.visible = !0, this.needsRender = !0, je.length > 0 ? (this.pointerLines.right.setPoints($e, je[0].point), this.pointerLines.right.points.visible = !0, this.intersectMesh.visible = !1) : (this.pointerLines.right.points.visible = !1, this.pointerLines.right.setPoints($e, Pe[0].point));
27022
+ var qe = Pe[0], nt = createEvent("intersect.update", {
27006
27023
  raycaster: (l = this.xrControllerRay.right) !== null && l !== void 0 ? l : null,
27007
- intersection: He != null ? He : null,
27024
+ intersection: qe != null ? qe : null,
27008
27025
  object: this.intersectMesh
27009
27026
  });
27010
- if (this.emit("intersect.update", Ge), Ge.defaultPrevented) {
27027
+ if (this.emit("intersect.update", nt), nt.defaultPrevented) {
27011
27028
  this.hideIntersectMesh();
27012
27029
  return;
27013
27030
  }
27014
27031
  } else
27015
- this.pointerLines.left.setPoints(_e, Ue[0].point);
27032
+ this.pointerLines.left.setPoints($e, Pe[0].point);
27016
27033
  }
27017
27034
  }
27018
- this.updateControllerHelper(Be, e, r);
27035
+ this.updateControllerHelper(ze, e, r);
27019
27036
  }
27020
27037
  if (this.camera.pose.distance > 0.1 || M)
27021
- for (var Ze = 0, Ye = Object.keys(this.panoMeshes); Ze < Ye.length; Ze++) {
27022
- var Qe = Ye[Ze], ye = this.panoMeshes[Qe];
27023
- ye.setOpacity(0), ye.setCurrent(!1), ye.updateTime && ye.updateTime(e, r), ye.visible = !1;
27038
+ for (var Ze = 0, ut = Object.keys(this.panoMeshes); Ze < ut.length; Ze++) {
27039
+ var Ue = ut[Ze], Ce = this.panoMeshes[Ue];
27040
+ Ce.setOpacity(0), Ce.setCurrent(!1), Ce.updateTime && Ce.updateTime(e, r), Ce.visible = !1;
27024
27041
  }
27025
27042
  else if (ie) {
27026
- var wt = arrayMin(ie.visibleIds, function(_t) {
27027
- var B = o.works.getResolvedObserver(_t);
27028
- return B ? ie.standingPosition.distanceTo(B.standingPosition) : 1 / 0;
27029
- }, !0), vt = wt[1];
27030
- vt = clamp$1(vt, 2.5, 1 / 0);
27031
- for (var at = ie.visibleIds.concat(panoStringify(this.currentPano)), Je = this.getForwardObserverOrNot(), ft = this.camera.getDirection(new THREE.Vector3()), nt = 0, Ke = Object.keys(this.panoMeshes); nt < Ke.length; nt++) {
27032
- var Qe = Ke[nt], ye = this.panoMeshes[Qe], J = this.works.getResolvedObserver(Qe);
27033
- if (at.indexOf(Qe) === -1)
27034
- ye.setCurrent(!1), ye.setOpacity(0);
27043
+ var yt = arrayMin(ie.visibleIds, function(B) {
27044
+ var L = o.works.getResolvedObserver(B);
27045
+ return L ? ie.standingPosition.distanceTo(L.standingPosition) : 1 / 0;
27046
+ }, !0), it = yt[1];
27047
+ it = clamp$1(it, 2.5, 1 / 0);
27048
+ for (var Ke = ie.visibleIds.concat(panoStringify(this.currentPano)), lt = this.getForwardObserverOrNot(), ft = this.camera.getDirection(new THREE.Vector3()), Qe = 0, ye = Object.keys(this.panoMeshes); Qe < ye.length; Qe++) {
27049
+ var Ue = ye[Qe], Ce = this.panoMeshes[Ue], J = this.works.getResolvedObserver(Ue);
27050
+ if (Ke.indexOf(Ue) === -1)
27051
+ Ce.setCurrent(!1), Ce.setOpacity(0);
27035
27052
  else if (!J)
27036
- ye.setCurrent(!1), ye.setOpacity(0);
27053
+ Ce.setCurrent(!1), Ce.setOpacity(0);
27037
27054
  else if (!J.loadable && !J.active)
27038
- ye.setCurrent(!1), ye.setOpacity(0);
27055
+ Ce.setCurrent(!1), Ce.setOpacity(0);
27039
27056
  else {
27040
- var Ee = ye.position.clone().setY(this.camera.position.y).distanceTo(this.camera.position);
27041
- ye.setCurrent(!ye.loading && ye.progress === 0 && Je !== null && Je.panoId === Qe), ye.setOpacity(Ee < 0.01 ? 0 : clamp$1(vt / Ee * 1.2, 0.65, 0.98));
27042
- var $e = this.camera.position.clone().setY(ye.position.y), Te = new THREE.Vector3().copy(ye.position).sub($e).normalize();
27043
- if (Qe === panoStringify(this.currentPano)) {
27044
- var bt = clamp$1((0.5 - $e.distanceTo(ye.position)) / 0.5, 0, 1);
27045
- Te.multiplyScalar(1 - bt).add(ft.clone().multiplyScalar(bt));
27057
+ var tt = Ce.position.clone().setY(this.camera.position.y).distanceTo(this.camera.position);
27058
+ Ce.setCurrent(!Ce.loading && Ce.progress === 0 && lt !== null && lt.panoId === Ue), Ce.setOpacity(tt < 0.01 ? 0 : clamp$1(it / tt * 1.2, 0.65, 0.98));
27059
+ var Et = this.camera.position.clone().setY(Ce.position.y), Ie = new THREE.Vector3().copy(Ce.position).sub(Et).normalize();
27060
+ if (Ue === panoStringify(this.currentPano)) {
27061
+ var It = clamp$1((0.5 - Et.distanceTo(Ce.position)) / 0.5, 0, 1);
27062
+ Ie.multiplyScalar(1 - It).add(ft.clone().multiplyScalar(It));
27046
27063
  }
27047
- Te.length() > 0 && ye.quaternion.setFromEuler(new THREE.Euler(0, Math.atan2(Te.x, Te.z), 0));
27064
+ Ie.length() > 0 && Ce.quaternion.setFromEuler(new THREE.Euler(0, Math.atan2(Ie.x, Ie.z), 0));
27048
27065
  }
27049
- ye.updateTime && ye.updateTime(e, r);
27066
+ Ce.updateTime && Ce.updateTime(e, r);
27050
27067
  }
27051
27068
  }
27052
27069
  if (this.adjustPanoCircleMeshPositionBasedOnModel && this.helper.visible && ie) {
27053
- for (var Tt = [], Ht = 0, Ot = ie.accessibleIds; Ht < Ot.length; Ht++) {
27054
- var Qe = Ot[Ht], J = this.works.getResolvedObserver(Qe);
27055
- J && Tt.push(J);
27070
+ for (var xt = [], Bt = 0, Rt = ie.accessibleIds; Bt < Rt.length; Bt++) {
27071
+ var Ue = Rt[Bt], J = this.works.getResolvedObserver(Ue);
27072
+ J && xt.push(J);
27056
27073
  }
27057
- if (Tt.sort(function(_t, B) {
27058
- return _t.standingPosition.distanceTo(ie.standingPosition) - B.standingPosition.distanceTo(ie.standingPosition);
27059
- }), Tt.length) {
27060
- this.accessibleObserverFloorCheckCount = this.accessibleObserverFloorCheckCount % Tt.length;
27061
- var ot = Tt[this.accessibleObserverFloorCheckCount], ye = this.panoMeshes[ot.panoId], tt = this.modelScene.models.find(function(B) {
27062
- return B.work === (ot == null ? void 0 : ot.work);
27074
+ if (xt.sort(function(B, L) {
27075
+ return B.standingPosition.distanceTo(ie.standingPosition) - L.standingPosition.distanceTo(ie.standingPosition);
27076
+ }), xt.length) {
27077
+ this.accessibleObserverFloorCheckCount = this.accessibleObserverFloorCheckCount % xt.length;
27078
+ var De = xt[this.accessibleObserverFloorCheckCount], Ce = this.panoMeshes[De.panoId], gt = this.modelScene.models.find(function(L) {
27079
+ return L.work === (De == null ? void 0 : De.work);
27063
27080
  });
27064
- if (ot && ye && tt && tt.visible) {
27065
- var St = 0.3, gt = 0.05, dt = 5e-3, At = adjustPanoCircleMeshVectors.map(function(L) {
27066
- scratchVector3.copy(L), scratchVector3.setY(St), scratchRaycaster.ray.origin.copy(ot.standingPosition), scratchRaycaster.ray.origin.add(scratchVector3), scratchRaycaster.ray.direction.set(0, -1, 0);
27067
- var k = tt.intersectRaycaster(scratchRaycaster, null, !0)[0];
27068
- return k && k.distance - dt <= St ? new THREE.Vector3().copy(ot.standingPosition).setY(k.point.y + dt) : ot.standingPosition;
27081
+ if (De && Ce && gt && gt.visible) {
27082
+ var ht = 0.3, pt = 0.05, bt = 5e-3, at = adjustPanoCircleMeshVectors.map(function(k) {
27083
+ scratchVector3.copy(k), scratchVector3.setY(ht), scratchRaycaster.ray.origin.copy(De.standingPosition), scratchRaycaster.ray.origin.add(scratchVector3), scratchRaycaster.ray.direction.set(0, -1, 0);
27084
+ var D = gt.intersectRaycaster(scratchRaycaster, null, !0)[0];
27085
+ return D && D.distance - bt <= ht ? new THREE.Vector3().copy(De.standingPosition).setY(D.point.y + bt) : De.standingPosition;
27069
27086
  });
27070
- At.sort(function(L, k) {
27071
- return k.y - L.y;
27087
+ at.sort(function(k, D) {
27088
+ return D.y - k.y;
27072
27089
  });
27073
- var ht = At[Math.floor(At.length / 2)], Oe = At.filter(function(L) {
27074
- return L.distanceTo(ht) <= gt;
27090
+ var vt = at[Math.floor(at.length / 2)], Se = at.filter(function(k) {
27091
+ return k.distanceTo(vt) <= pt;
27075
27092
  })[0];
27076
- Oe && !Oe.equals(ye.position) && (ye.position.copy(Oe), this.needsRender = !0);
27093
+ Se && !Se.equals(Ce.position) && (Ce.position.copy(Se), this.needsRender = !0);
27077
27094
  }
27078
27095
  this.accessibleObserverFloorCheckCount++;
27079
27096
  }
27080
27097
  }
27081
27098
  {
27082
- var N = (c = this.modelScene.parameter.progress) !== null && c !== void 0 ? c : 1, pt = Math.round(N), st = this.modelScene.parameter.pano0, ut = this.modelScene.parameter.pano1, lt = pt === 0 ? st : ut, J = void 0;
27083
- if (lt && (J = this.works.getResolvedObserver(lt.panoId), J || (J = this.panoPictureObserverMap.get(lt))), this.tiling.appearDuration = this.tileAppearDuration, this.tiling.maxRequest = N <= 0.5 ? 0 : N < 1 ? 1 : this.tileMaxRequest, this.tiling.imageOptions = this.imageOptions, !J || !lt || this.tileLevelForFov === !1)
27084
- this.tiling.setObserver(null), this.tiling.update(this.renderer, this.camera, null, new THREE.Matrix4(), 1, 0, 0), this.modelScene.parameter.set("refinedScreen", null);
27099
+ var N = (c = this.modelScene.parameter.progress) !== null && c !== void 0 ? c : 1, Ht = Math.round(N), ct = this.modelScene.parameter.pano0, ot = this.modelScene.parameter.pano1, Je = Ht === 0 ? ct : ot, J = void 0;
27100
+ if (Je && (J = this.works.getResolvedObserver(Je.panoId), J || (J = this.panoPictureObserverMap.get(Je))), this.tiling.appearDuration = this.tileAppearDuration, this.tiling.maxRequest = N <= 0.6 ? 0 : N < 1 ? 1 : this.tileMaxRequest, this.tiling.imageOptions = this.imageOptions, !J || !Je || this.tileLevelForFov === !1)
27101
+ this.tiling.setObserver(null), this.tiling.update(this.renderer, ve, null, new THREE.Matrix4(), 1, 0, 0), this.modelScene.parameter.set("refinedScreen", null);
27085
27102
  else {
27086
- var ct = getImageSizeLevel(lt.mapSize), It = ct + 1, Ft = 4;
27103
+ var Pt = getImageSizeLevel(Je.mapSize), Ft = Pt + 1, Lt = 4;
27087
27104
  this.tiling.setObserver(J);
27088
- var Lt = this.tiling.update(this.renderer, this.camera, lt.map, lt.matrix, lt.zoom, It, Ft), Mt = {
27105
+ var _t = this.tiling.update(this.renderer, ve, Je.map, Je.matrix, Je.zoom, Ft, Lt), Ct = {
27089
27106
  map: this.tiling.renderTarget.texture,
27090
27107
  matrixInverse: this.tiling.camera.matrixWorldInverse,
27091
27108
  projectionMatrix: this.tiling.camera.projectionMatrix,
27092
- pano: pt,
27093
- opacity: (st == null ? void 0 : st.panoId) === (ut == null ? void 0 : ut.panoId) ? 1 : easeInQuart(Math.abs(((f = this.modelScene.parameter.progress) !== null && f !== void 0 ? f : 0) - 0.5) * 2)
27094
- }, yt = this.modelScene.parameter.refinedScreen;
27095
- (Lt || Mt.pano !== (yt == null ? void 0 : yt.pano) || Mt.opacity !== (yt == null ? void 0 : yt.opacity)) && this.modelScene.parameter.set("refinedScreen", Mt);
27109
+ pano: Ht,
27110
+ opacity: (ct == null ? void 0 : ct.panoId) === (ot == null ? void 0 : ot.panoId) ? 1 : easeInQuart(Math.abs(((f = this.modelScene.parameter.progress) !== null && f !== void 0 ? f : 0) - 0.5) * 2)
27111
+ }, mt = this.modelScene.parameter.refinedScreen;
27112
+ (_t || Ct.pano !== (mt == null ? void 0 : mt.pano) || Ct.opacity !== (mt == null ? void 0 : mt.opacity)) && this.modelScene.parameter.set("refinedScreen", Ct);
27096
27113
  }
27097
27114
  }
27098
27115
  this.panoVideo.object.position.copy(this.camera.position), this.panoVideo.updateTime(e);
27099
27116
  {
27100
- var Pt = S.effect, xt = this.modelScene.parameter, st = xt.pano0, ut = xt.pano1;
27101
- if (st && ut && st !== ut && Pt === "fly" && this.flyEffectUseDepthBuffer) {
27102
- if (((d = this.modelScene.parameter.pano0Depth) === null || d === void 0 ? void 0 : d.panoId) !== st.panoId || ((h = this.modelScene.parameter.pano1Depth) === null || h === void 0 ? void 0 : h.panoId) !== ut.panoId) {
27103
- var Bt = 500, mt = 512;
27104
- this.pano0DepthCubeRenderTarget ? this.pano0DepthCubeRenderTarget.width !== mt && this.pano0DepthCubeRenderTarget.setSize(mt, mt) : this.pano0DepthCubeRenderTarget = new THREE.WebGLCubeRenderTarget(mt, {
27117
+ var Tt = S.effect, Ot = this.modelScene.parameter, ct = Ot.pano0, ot = Ot.pano1;
27118
+ if (ct && ot && ct !== ot && Tt === "fly" && this.flyEffectUseDepthBuffer) {
27119
+ if (((d = this.modelScene.parameter.pano0Depth) === null || d === void 0 ? void 0 : d.panoId) !== ct.panoId || ((h = this.modelScene.parameter.pano1Depth) === null || h === void 0 ? void 0 : h.panoId) !== ot.panoId) {
27120
+ var wt = 500, dt = 512;
27121
+ this.pano0DepthCubeRenderTarget ? this.pano0DepthCubeRenderTarget.width !== dt && this.pano0DepthCubeRenderTarget.setSize(dt, dt) : this.pano0DepthCubeRenderTarget = new THREE.WebGLCubeRenderTarget(dt, {
27105
27122
  minFilter: THREE.NearestFilter,
27106
27123
  magFilter: THREE.NearestFilter,
27107
27124
  generateMipmaps: !1
27108
- }), this.pano1DepthCubeRenderTarget ? this.pano1DepthCubeRenderTarget.width !== mt && this.pano1DepthCubeRenderTarget.setSize(mt, mt) : this.pano1DepthCubeRenderTarget = new THREE.WebGLCubeRenderTarget(mt, {
27125
+ }), this.pano1DepthCubeRenderTarget ? this.pano1DepthCubeRenderTarget.width !== dt && this.pano1DepthCubeRenderTarget.setSize(dt, dt) : this.pano1DepthCubeRenderTarget = new THREE.WebGLCubeRenderTarget(dt, {
27109
27126
  minFilter: THREE.NearestFilter,
27110
27127
  magFilter: THREE.NearestFilter,
27111
27128
  generateMipmaps: !1
27112
27129
  });
27113
- var Rt = new THREE.CubeCamera(this.camera.near, this.camera.far, this.pano0DepthCubeRenderTarget);
27114
- Rt.matrix.copy(st.matrix), Rt.matrixWorld.copy(Rt.matrix), Rt.matrixAutoUpdate = !1, renderDepthCube(this.renderer, this.modelScene, Rt, Bt);
27115
- var Ct = new THREE.CubeCamera(this.camera.near, this.camera.far, this.pano1DepthCubeRenderTarget);
27116
- Ct.matrix.copy(ut.matrix), Ct.matrixWorld.copy(Ct.matrix), Ct.matrixAutoUpdate = !1, renderDepthCube(this.renderer, this.modelScene, Ct, Bt), this.modelScene.parameter.set({
27130
+ var St = new THREE.CubeCamera(this.camera.near, this.camera.far, this.pano0DepthCubeRenderTarget);
27131
+ St.matrix.copy(ct.matrix), St.matrixWorld.copy(St.matrix), St.matrixAutoUpdate = !1, renderDepthCube(this.renderer, this.modelScene, St, wt);
27132
+ var Mt = new THREE.CubeCamera(this.camera.near, this.camera.far, this.pano1DepthCubeRenderTarget);
27133
+ Mt.matrix.copy(ot.matrix), Mt.matrixWorld.copy(Mt.matrix), Mt.matrixAutoUpdate = !1, renderDepthCube(this.renderer, this.modelScene, Mt, wt), this.modelScene.parameter.set({
27117
27134
  pano0Depth: {
27118
- panoId: st.panoId,
27135
+ panoId: ct.panoId,
27119
27136
  map: this.pano0DepthCubeRenderTarget.texture,
27120
27137
  mapSize: this.pano0DepthCubeRenderTarget.width,
27121
- maxDepth: Bt
27138
+ maxDepth: wt
27122
27139
  },
27123
27140
  pano1Depth: {
27124
- panoId: ut.panoId,
27141
+ panoId: ot.panoId,
27125
27142
  map: this.pano1DepthCubeRenderTarget.texture,
27126
27143
  mapSize: this.pano1DepthCubeRenderTarget.width,
27127
- maxDepth: Bt
27144
+ maxDepth: wt
27128
27145
  }
27129
27146
  });
27130
27147
  }
@@ -28357,7 +28374,7 @@ void main() {
28357
28374
  }
28358
28375
  return Object.defineProperty(t, "version", {
28359
28376
  get: function() {
28360
- return "6.5.1";
28377
+ return "6.5.2";
28361
28378
  },
28362
28379
  enumerable: !1,
28363
28380
  configurable: !0
@@ -28587,17 +28604,17 @@ void main() {
28587
28604
  }
28588
28605
  else
28589
28606
  E.push(parseWork(e));
28590
- for (var T = createWorks(E), S = function(W) {
28591
- var G = R, ne = new Fetcher({
28592
- allowHosts: W.allowHosts,
28607
+ for (var T = createWorks(E), S = function(Z) {
28608
+ var te = R, j = new Fetcher({
28609
+ allowHosts: Z.allowHosts,
28593
28610
  get requestProxy() {
28594
- return G.requestProxy;
28611
+ return te.requestProxy;
28595
28612
  },
28596
28613
  get networkSubscribe() {
28597
- return G.networkSubscribe;
28614
+ return te.networkSubscribe;
28598
28615
  }
28599
28616
  });
28600
- registerFetcher(W, ne);
28617
+ registerFetcher(Z, j);
28601
28618
  }, R = this, C = 0, M = T; C < M.length; C++) {
28602
28619
  var F = M[C];
28603
28620
  S(F);
@@ -28658,8 +28675,8 @@ void main() {
28658
28675
  }
28659
28676
  var N = __assign(__assign(__assign({}, I), { mode: P }), O), z = this.getCurrentState(), J = (p = m.duration) !== null && p !== void 0 ? p : this.modeChangeDuration;
28660
28677
  (P === "Floorplan" || P === "Topview" || P === "Mapview") && this.currentMode === P && (J = 0);
28661
- var K = "fly";
28662
- (P === "Panorama" || P === "VRPanorama" || P === "XRPanorama") && this.currentMode === P && (K = (g = m.effect) !== null && g !== void 0 ? g : "fade"), this.emit("works.request", createEvent("works.request", {
28678
+ var G = "fly";
28679
+ (P === "Panorama" || P === "VRPanorama" || P === "XRPanorama") && this.currentMode === P && (G = (g = m.effect) !== null && g !== void 0 ? g : "fade"), this.emit("works.request", createEvent("works.request", {
28663
28680
  input: e,
28664
28681
  works: T,
28665
28682
  state: N,
@@ -28667,35 +28684,35 @@ void main() {
28667
28684
  }));
28668
28685
  var Q = function() {
28669
28686
  u.pano = I;
28670
- var W = __assign(__assign({ initial: {
28687
+ var Z = __assign(__assign({ initial: {
28671
28688
  state: N,
28672
28689
  currentState: z,
28673
28690
  duration: J,
28674
- effect: K,
28691
+ effect: G,
28675
28692
  userAction: s
28676
- } }, u.commonParams()), u.controllerInits[P]), G = Controllers[P].initAnimationEndState(W);
28693
+ } }, u.commonParams()), u.controllerInits[P]), te = Controllers[P].initAnimationEndState(Z);
28677
28694
  if (u.controller && u.currentMode === P)
28678
- u.controller.updateWork(T, G, { effect: K, duration: J }, s) === !1 && (u.controller.destroy(), u.controller = u.applyController(P, W));
28695
+ u.controller.updateWork(T, te, { effect: G, duration: J }, s) === !1 && (u.controller.destroy(), u.controller = u.applyController(P, Z));
28679
28696
  else {
28680
- var ne = u.currentMode;
28697
+ var j = u.currentMode;
28681
28698
  if (u.controller)
28682
28699
  u.controller.destroy();
28683
28700
  else {
28684
- var $ = Controllers[P].initAnimationEndState(W);
28685
- u.camera.setFromPose($), u.emit("camera.update", createEvent("camera.update", {
28701
+ var ee = Controllers[P].initAnimationEndState(Z);
28702
+ u.camera.setFromPose(ee), u.emit("camera.update", createEvent("camera.update", {
28686
28703
  state: u.getCurrentState(),
28687
28704
  userAction: s
28688
28705
  }));
28689
28706
  }
28690
- u.controller = u.applyController(P, W);
28691
- var ee = createEvent("mode.change", {
28692
- prevMode: ne,
28707
+ u.controller = u.applyController(P, Z);
28708
+ var W = createEvent("mode.change", {
28709
+ prevMode: j,
28693
28710
  mode: P,
28694
- state: G,
28711
+ state: te,
28695
28712
  userAction: s
28696
28713
  });
28697
28714
  try {
28698
- u.emit("mode.change", ee);
28715
+ u.emit("mode.change", W);
28699
28716
  } catch (re) {
28700
28717
  console.error(re);
28701
28718
  }
@@ -28707,8 +28724,8 @@ void main() {
28707
28724
  if (P === t.Mode.Floorplan || P === t.Mode.Topview || P === t.Mode.Mapview || P === t.Mode.Model) {
28708
28725
  this.modelScene.loaded === !1 && (this.camera.setFromPose(N), assignPose(this.state, this.camera.pose)), this.controller || (this.currentMode = P);
28709
28726
  var q = this.loadModels(T, m);
28710
- U = Promise.all(q.map(function(W) {
28711
- return W.loadedReady;
28727
+ U = Promise.all(q.map(function(Z) {
28728
+ return Z.loadedReady;
28712
28729
  })).then(function() {
28713
28730
  u.needsRender = !0, u.modelSceneNeedsRender = !0, Q(), u.emit("camera.update", createEvent("camera.update", {
28714
28731
  state: u.getCurrentState(),
@@ -28717,17 +28734,17 @@ void main() {
28717
28734
  });
28718
28735
  } else {
28719
28736
  Q();
28720
- var X = !1;
28737
+ var K = !1;
28721
28738
  this.modelScene.autoRefine = !1;
28722
- var Z = function() {
28723
- u.works === T && X === !1 && (u.needsRender = !0, u.modelSceneNeedsRender = !0, u.emit("camera.update", createEvent("camera.update", {
28739
+ var Y = function() {
28740
+ u.works === T && K === !1 && (u.needsRender = !0, u.modelSceneNeedsRender = !0, u.emit("camera.update", createEvent("camera.update", {
28724
28741
  state: u.getCurrentState(),
28725
28742
  userAction: s
28726
- })), X = !0, u.modelScene.autoRefine = !0);
28743
+ })), K = !0, u.modelScene.autoRefine = !0);
28727
28744
  }, q = this.loadModels(T, m);
28728
- U = Promise.all(q.map(function(G) {
28729
- return G.initReady;
28730
- })).then(noop$1), this.controller.once("pano.arrived", Z), this.controller.once("pano.cancel", Z), setTimeout(Z, ((A = m.duration) !== null && A !== void 0 ? A : this.modeChangeDuration) + 1e3);
28745
+ U = Promise.all(q.map(function(te) {
28746
+ return te.initReady;
28747
+ })).then(noop$1), this.controller.once("pano.arrived", Y), this.controller.once("pano.cancel", Y), setTimeout(Y, ((A = m.duration) !== null && A !== void 0 ? A : this.modeChangeDuration) + 1e3);
28731
28748
  }
28732
28749
  return this.emit("works.load", createEvent("works.load", {
28733
28750
  input: e,
@@ -28737,13 +28754,13 @@ void main() {
28737
28754
  })), U.then(function() {
28738
28755
  return u.ready();
28739
28756
  }).then(function() {
28740
- var W;
28757
+ var Z;
28741
28758
  u.emit("works.ready", createEvent("works.ready", {
28742
28759
  input: e,
28743
28760
  state: u.getCurrentState(),
28744
28761
  userAction: s,
28745
28762
  works: T
28746
- })), (W = u.analysis) === null || W === void 0 || W.work(T);
28763
+ })), (Z = u.analysis) === null || Z === void 0 || Z.work(T);
28747
28764
  });
28748
28765
  }, t.prototype.reset = function() {
28749
28766
  var e = this, r = this.loadWorkTask.then(function() {