@realsee/five 6.3.0-alpha.4 → 6.3.0-alpha.6

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.
Files changed (53) hide show
  1. package/docs/assets/navigation.js +1 -1
  2. package/docs/assets/search.js +1 -1
  3. package/docs/classes/five.Model.html +2 -2
  4. package/docs/classes/five.PBMMeshMaterial.html +34 -34
  5. package/docs/classes/five.PBMPointCloudMaterial.html +2 -2
  6. package/docs/classes/five.Tile.html +1 -1
  7. package/docs/classes/five.Tile3DModel.html +2 -2
  8. package/docs/classes/plugins-1.BasePlugin.Controller.html +1 -1
  9. package/docs/classes/plugins-1.CSS3DRenderer.html +6 -0
  10. package/docs/classes/plugins-1.OrbitControls.html +41 -0
  11. package/docs/classes/plugins-1.OrientationPluginController.html +1 -1
  12. package/docs/classes/plugins-1.TrajectoryController.html +51 -0
  13. package/docs/functions/plugins-1.TrajectoryPlugin.html +1 -0
  14. package/docs/hierarchy.html +1 -1
  15. package/docs/interfaces/five.FiveLoadOptions.html +2 -2
  16. package/docs/interfaces/plugins-1.BasePlugin.State.html +1 -1
  17. package/docs/interfaces/plugins-1.Keyframe.html +3 -0
  18. package/docs/interfaces/plugins-1.PlayingState.html +3 -0
  19. package/docs/interfaces/plugins-1.PluginTemplateType.Config.html +3 -0
  20. package/docs/interfaces/plugins-1.PluginTemplateType.EventMap.html +10 -0
  21. package/docs/interfaces/plugins-1.PluginTemplateType.Params.html +4 -0
  22. package/docs/interfaces/plugins-1.PluginTemplateType.State.html +8 -0
  23. package/docs/modules/plugins-1.PluginTemplateType.html +7 -0
  24. package/docs/modules/plugins-1.html +7 -0
  25. package/docs/types/plugins-1.PluginTemplateType.PluginData.html +1 -0
  26. package/docs/types/plugins-1.PluginTemplateType.ServerData.html +1 -0
  27. package/five/index.d.ts +3 -3
  28. package/five/index.js +37 -37
  29. package/five/index.mjs +36 -16
  30. package/gltf-loader/index.js +3 -3
  31. package/gltf-loader/index.mjs +3 -3
  32. package/line/index.js +3 -3
  33. package/line/index.mjs +3 -3
  34. package/package.json +1 -1
  35. package/plugins/index.d.ts +112 -8
  36. package/plugins/index.js +12 -12
  37. package/plugins/index.mjs +1229 -1064
  38. package/react/index.js +2 -2
  39. package/react/index.mjs +2 -2
  40. package/sticker/index.js +3 -3
  41. package/sticker/index.mjs +3 -3
  42. package/umd/five-gltf-loader.js +3 -3
  43. package/umd/five-line.js +3 -3
  44. package/umd/five-plugins.js +13 -13
  45. package/umd/five-react.js +2 -2
  46. package/umd/five-sticker.js +3 -3
  47. package/umd/five-vfx.js +2 -2
  48. package/umd/five-vue.js +2 -2
  49. package/umd/five.js +25 -25
  50. package/vfx/index.js +2 -2
  51. package/vfx/index.mjs +2 -2
  52. package/vue/index.js +2 -2
  53. package/vue/index.mjs +2 -2
package/plugins/index.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five
4
- * Generated: 11/11/2024
5
- * Version: 6.3.0-alpha.4
4
+ * Generated: 2024/11/14
5
+ * Version: 6.3.0-alpha.6
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
@@ -252,106 +252,106 @@
252
252
  * No amendment to or modification of this Agreement will be binding unless in
253
253
  * writing and signed by Realsee. You and Realsee hereto confirm that this
254
254
  * Agreement and all related documents shall be drafted in English.
255
- */import { Subscribe as hn, AnimationFrameLoop as fn, Camera as pn } from "@realsee/five";
255
+ */import { Subscribe as pn, AnimationFrameLoop as Ht, Camera as dn } from "@realsee/five";
256
256
  import * as w from "three";
257
- import { EventDispatcher as Ht, Vector3 as ve, MOUSE as Oe, TOUCH as Ae, Quaternion as Ft, Spherical as Ut, Vector2 as be, Object3D as jt, Matrix4 as dn } from "three";
258
- import { BasePlugin as vn } from "@realsee/five/plugins";
259
- function mn(p) {
260
- return /^https?:\/\/|^\/\//.test(p) || /^data:/.test(p);
257
+ import { EventDispatcher as zt, Vector3 as ve, MOUSE as Ae, TOUCH as Me, Quaternion as Ut, Spherical as Bt, Vector2 as Te, Object3D as Xt, Matrix4 as vn } from "three";
258
+ import { BasePlugin as mn } from "@realsee/five/plugins";
259
+ function gn(f) {
260
+ return /^https?:\/\/|^\/\//.test(f) || /^data:/.test(f);
261
261
  }
262
- function gn(p, o) {
263
- return mn(o) ? o : "".concat(p).concat(o);
262
+ function yn(f, o) {
263
+ return gn(o) ? o : "".concat(f).concat(o);
264
264
  }
265
- var rt;
266
- (function(p) {
265
+ var ze;
266
+ (function(f) {
267
267
  var o = (
268
268
  /** @class */
269
269
  function() {
270
- function e(i, t) {
271
- this.hooks = new hn(), this.staticPrefix = "//vr-image-4.realsee-cdn.cn", this.five = i, t != null && t.staticPrefix && (this.staticPrefix = t.staticPrefix);
270
+ function e(a, t) {
271
+ this.hooks = new pn(), this.staticPrefix = "//vr-image-4.realsee-cdn.cn", this.five = a, t != null && t.staticPrefix && (this.staticPrefix = t.staticPrefix);
272
272
  }
273
273
  return e.prototype.getCurrentState = function() {
274
274
  return this.state;
275
- }, e.prototype.absoluteUrl = function(i) {
276
- return gn(this.staticPrefix, i);
275
+ }, e.prototype.absoluteUrl = function(a) {
276
+ return yn(this.staticPrefix, a);
277
277
  }, e;
278
278
  }()
279
279
  );
280
- p.Controller = o;
281
- })(rt || (rt = {}));
282
- var wt = function(p, o) {
283
- return wt = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, i) {
284
- e.__proto__ = i;
285
- } || function(e, i) {
286
- for (var t in i) Object.prototype.hasOwnProperty.call(i, t) && (e[t] = i[t]);
287
- }, wt(p, o);
280
+ f.Controller = o;
281
+ })(ze || (ze = {}));
282
+ var Et = function(f, o) {
283
+ return Et = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, a) {
284
+ e.__proto__ = a;
285
+ } || function(e, a) {
286
+ for (var t in a) Object.prototype.hasOwnProperty.call(a, t) && (e[t] = a[t]);
287
+ }, Et(f, o);
288
288
  };
289
- function lt(p, o) {
289
+ function qe(f, o) {
290
290
  if (typeof o != "function" && o !== null)
291
291
  throw new TypeError("Class extends value " + String(o) + " is not a constructor or null");
292
- wt(p, o);
292
+ Et(f, o);
293
293
  function e() {
294
- this.constructor = p;
294
+ this.constructor = f;
295
295
  }
296
- p.prototype = o === null ? Object.create(o) : (e.prototype = o.prototype, new e());
296
+ f.prototype = o === null ? Object.create(o) : (e.prototype = o.prototype, new e());
297
297
  }
298
- var ae = function() {
299
- return ae = Object.assign || function(o) {
300
- for (var e, i = 1, t = arguments.length; i < t; i++) {
301
- e = arguments[i];
302
- for (var l in e) Object.prototype.hasOwnProperty.call(e, l) && (o[l] = e[l]);
298
+ var q = function() {
299
+ return q = Object.assign || function(o) {
300
+ for (var e, a = 1, t = arguments.length; a < t; a++) {
301
+ e = arguments[a];
302
+ for (var s in e) Object.prototype.hasOwnProperty.call(e, s) && (o[s] = e[s]);
303
303
  }
304
304
  return o;
305
- }, ae.apply(this, arguments);
305
+ }, q.apply(this, arguments);
306
306
  };
307
- function at(p, o, e, i) {
308
- function t(l) {
309
- return l instanceof e ? l : new e(function(h) {
310
- h(l);
307
+ function Xe(f, o, e, a) {
308
+ function t(s) {
309
+ return s instanceof e ? s : new e(function(u) {
310
+ u(s);
311
311
  });
312
312
  }
313
- return new (e || (e = Promise))(function(l, h) {
314
- function c(m) {
313
+ return new (e || (e = Promise))(function(s, u) {
314
+ function l(v) {
315
315
  try {
316
- d(i.next(m));
317
- } catch (E) {
318
- h(E);
316
+ d(a.next(v));
317
+ } catch (T) {
318
+ u(T);
319
319
  }
320
320
  }
321
- function g(m) {
321
+ function g(v) {
322
322
  try {
323
- d(i.throw(m));
324
- } catch (E) {
325
- h(E);
323
+ d(a.throw(v));
324
+ } catch (T) {
325
+ u(T);
326
326
  }
327
327
  }
328
- function d(m) {
329
- m.done ? l(m.value) : t(m.value).then(c, g);
328
+ function d(v) {
329
+ v.done ? s(v.value) : t(v.value).then(l, g);
330
330
  }
331
- d((i = i.apply(p, o || [])).next());
331
+ d((a = a.apply(f, o || [])).next());
332
332
  });
333
333
  }
334
- function it(p, o) {
334
+ function Ge(f, o) {
335
335
  var e = { label: 0, sent: function() {
336
- if (l[0] & 1) throw l[1];
337
- return l[1];
338
- }, trys: [], ops: [] }, i, t, l, h = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
339
- return h.next = c(0), h.throw = c(1), h.return = c(2), typeof Symbol == "function" && (h[Symbol.iterator] = function() {
336
+ if (s[0] & 1) throw s[1];
337
+ return s[1];
338
+ }, trys: [], ops: [] }, a, t, s, u = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
339
+ return u.next = l(0), u.throw = l(1), u.return = l(2), typeof Symbol == "function" && (u[Symbol.iterator] = function() {
340
340
  return this;
341
- }), h;
342
- function c(d) {
343
- return function(m) {
344
- return g([d, m]);
341
+ }), u;
342
+ function l(d) {
343
+ return function(v) {
344
+ return g([d, v]);
345
345
  };
346
346
  }
347
347
  function g(d) {
348
- if (i) throw new TypeError("Generator is already executing.");
349
- for (; h && (h = 0, d[0] && (e = 0)), e; ) try {
350
- if (i = 1, t && (l = d[0] & 2 ? t.return : d[0] ? t.throw || ((l = t.return) && l.call(t), 0) : t.next) && !(l = l.call(t, d[1])).done) return l;
351
- switch (t = 0, l && (d = [d[0] & 2, l.value]), d[0]) {
348
+ if (a) throw new TypeError("Generator is already executing.");
349
+ for (; u && (u = 0, d[0] && (e = 0)), e; ) try {
350
+ if (a = 1, t && (s = d[0] & 2 ? t.return : d[0] ? t.throw || ((s = t.return) && s.call(t), 0) : t.next) && !(s = s.call(t, d[1])).done) return s;
351
+ switch (t = 0, s && (d = [d[0] & 2, s.value]), d[0]) {
352
352
  case 0:
353
353
  case 1:
354
- l = d;
354
+ s = d;
355
355
  break;
356
356
  case 4:
357
357
  return e.label++, { value: d[1], done: !1 };
@@ -362,158 +362,158 @@ function it(p, o) {
362
362
  d = e.ops.pop(), e.trys.pop();
363
363
  continue;
364
364
  default:
365
- if (l = e.trys, !(l = l.length > 0 && l[l.length - 1]) && (d[0] === 6 || d[0] === 2)) {
365
+ if (s = e.trys, !(s = s.length > 0 && s[s.length - 1]) && (d[0] === 6 || d[0] === 2)) {
366
366
  e = 0;
367
367
  continue;
368
368
  }
369
- if (d[0] === 3 && (!l || d[1] > l[0] && d[1] < l[3])) {
369
+ if (d[0] === 3 && (!s || d[1] > s[0] && d[1] < s[3])) {
370
370
  e.label = d[1];
371
371
  break;
372
372
  }
373
- if (d[0] === 6 && e.label < l[1]) {
374
- e.label = l[1], l = d;
373
+ if (d[0] === 6 && e.label < s[1]) {
374
+ e.label = s[1], s = d;
375
375
  break;
376
376
  }
377
- if (l && e.label < l[2]) {
378
- e.label = l[2], e.ops.push(d);
377
+ if (s && e.label < s[2]) {
378
+ e.label = s[2], e.ops.push(d);
379
379
  break;
380
380
  }
381
- l[2] && e.ops.pop(), e.trys.pop();
381
+ s[2] && e.ops.pop(), e.trys.pop();
382
382
  continue;
383
383
  }
384
- d = o.call(p, e);
385
- } catch (m) {
386
- d = [6, m], t = 0;
384
+ d = o.call(f, e);
385
+ } catch (v) {
386
+ d = [6, v], t = 0;
387
387
  } finally {
388
- i = l = 0;
388
+ a = s = 0;
389
389
  }
390
390
  if (d[0] & 5) throw d[1];
391
391
  return { value: d[0] ? d[1] : void 0, done: !0 };
392
392
  }
393
393
  }
394
- function Bt(p, o, e) {
395
- if (e || arguments.length === 2) for (var i = 0, t = o.length, l; i < t; i++)
396
- (l || !(i in o)) && (l || (l = Array.prototype.slice.call(o, 0, i)), l[i] = o[i]);
397
- return p.concat(l || Array.prototype.slice.call(o));
394
+ function Vt(f, o, e) {
395
+ if (e || arguments.length === 2) for (var a = 0, t = o.length, s; a < t; a++)
396
+ (s || !(a in o)) && (s || (s = Array.prototype.slice.call(o, 0, a)), s[a] = o[a]);
397
+ return f.concat(s || Array.prototype.slice.call(o));
398
398
  }
399
- function yn(p) {
399
+ function bn(f) {
400
400
  return new Promise(function(o, e) {
401
- var i = new Image();
402
- i.onload = function() {
403
- i.onload = i.onerror = function() {
404
- }, o(i);
405
- }, i.onerror = function(t) {
406
- i.onload = i.onerror = function() {
401
+ var a = new Image();
402
+ a.onload = function() {
403
+ a.onload = a.onerror = function() {
404
+ }, o(a);
405
+ }, a.onerror = function(t) {
406
+ a.onload = a.onerror = function() {
407
407
  }, e(t);
408
- }, i.crossOrigin = "", i.src = p;
408
+ }, a.crossOrigin = "", a.src = f;
409
409
  });
410
410
  }
411
- var Tn = typeof performance != "undefined" && typeof performance.timing != "undefined" ? performance.timing.navigationStart : Date.now(), Tt = typeof performance != "undefined" ? function() {
411
+ var Tn = typeof performance != "undefined" && typeof performance.timing != "undefined" ? performance.timing.navigationStart : Date.now(), bt = typeof performance != "undefined" ? function() {
412
412
  return Tn + performance.now();
413
413
  } : function() {
414
414
  return Date.now();
415
415
  };
416
- function nt(p, o, e) {
417
- return p + (o - p) * e;
416
+ function ot(f, o, e) {
417
+ return f + (o - f) * e;
418
418
  }
419
- function bn(p, o, e, i) {
420
- var t = (o * e + 2 * p) / Math.pow(e, 3), l = -(2 * o * e + 3 * p) / Math.pow(e, 2), h = o, c = p;
421
- return t * Math.pow(i, 3) + l * Math.pow(i, 2) + h * i + c;
419
+ function wn(f, o, e, a) {
420
+ var t = (o * e + 2 * f) / Math.pow(e, 3), s = -(2 * o * e + 3 * f) / Math.pow(e, 2), u = o, l = f;
421
+ return t * Math.pow(a, 3) + s * Math.pow(a, 2) + u * a + l;
422
422
  }
423
- function wn(p, o, e, i) {
424
- var t = (o * e + 2 * p) / Math.pow(e, 3), l = -(2 * o * e + 3 * p) / Math.pow(e, 2), h = o;
425
- return 3 * t * Math.pow(i, 2) + 2 * l * i + h;
423
+ function En(f, o, e, a) {
424
+ var t = (o * e + 2 * f) / Math.pow(e, 3), s = -(2 * o * e + 3 * f) / Math.pow(e, 2), u = o;
425
+ return 3 * t * Math.pow(a, 2) + 2 * s * a + u;
426
426
  }
427
- function En(p, o, e, i) {
428
- var t = i[1] - i[0];
429
- return p = ot(p, i), o = ot(o, i), o - p > t / 2 ? nt(p + t, o, e) : p - o > t / 2 ? nt(p - t, o, e) : nt(p, o, e);
427
+ function Pn(f, o, e, a) {
428
+ var t = a[1] - a[0];
429
+ return f = st(f, a), o = st(o, a), o - f > t / 2 ? ot(f + t, o, e) : f - o > t / 2 ? ot(f - t, o, e) : ot(f, o, e);
430
430
  }
431
- function ot(p, o) {
431
+ function st(f, o) {
432
432
  var e = o[1] - o[0];
433
- return p < o[0] ? ot(p + e, o) : p >= o[1] ? ot(p - e, o) : p;
433
+ return f < o[0] ? st(f + e, o) : f >= o[1] ? st(f - e, o) : f;
434
434
  }
435
- function Pn(p, o, e, i) {
436
- return i ? En(p, o, e, i) : nt(p, o, e);
435
+ function xn(f, o, e, a) {
436
+ return a ? Pn(f, o, e, a) : ot(f, o, e);
437
437
  }
438
- var Vt = (
438
+ var Yt = (
439
439
  /** @class */
440
440
  function() {
441
- function p(o) {
442
- this.config = {}, this.progress = 1, this.ended = !0, this.value = {}, this.startTime = Tt(), this.startVelocity = 0, this.duration = 0, this.keyframes = [];
441
+ function f(o) {
442
+ this.config = {}, this.progress = 1, this.ended = !0, this.value = {}, this.startTime = bt(), this.startVelocity = 0, this.duration = 0, this.keyframes = [];
443
443
  for (var e in o) {
444
- var i = o[e];
445
- typeof i == "number" ? (this.value[e] = i, this.config[e] = { circle: !1 }) : (this.value[e] = i.value, this.config[e] = { circle: i.circle });
444
+ var a = o[e];
445
+ typeof a == "number" ? (this.value[e] = a, this.config[e] = { circle: !1 }) : (this.value[e] = a.value, this.config[e] = { circle: a.circle });
446
446
  }
447
447
  this.keyframes = [
448
- { progress: 0, value: ae({}, this.value) },
449
- { progress: 1, value: ae({}, this.value) }
448
+ { progress: 0, value: q({}, this.value) },
449
+ { progress: 1, value: q({}, this.value) }
450
450
  ];
451
451
  }
452
- return p.prototype.getProgress = function(o) {
452
+ return f.prototype.getProgress = function(o) {
453
453
  var e = o - this.startTime;
454
- return e < 0 ? 0 : e >= this.duration ? 1 : 1 - bn(1, this.startVelocity, this.duration, e);
455
- }, p.prototype.getValue = function(o) {
454
+ return e < 0 ? 0 : e >= this.duration ? 1 : 1 - wn(1, this.startVelocity, this.duration, e);
455
+ }, f.prototype.getValue = function(o) {
456
456
  for (var e = 1; e < this.keyframes.length; e++)
457
457
  if (this.keyframes[e].progress > o) {
458
- var i = this.keyframes[e - 1], t = this.keyframes[e], l = {};
459
- for (var h in this.config) {
460
- var c = (o - i.progress) / (t.progress - i.progress);
461
- l[h] = Pn(i.value[h], t.value[h], c, this.config[h].circle);
458
+ var a = this.keyframes[e - 1], t = this.keyframes[e], s = {};
459
+ for (var u in this.config) {
460
+ var l = (o - a.progress) / (t.progress - a.progress);
461
+ s[u] = xn(a.value[u], t.value[u], l, this.config[u].circle);
462
462
  }
463
- return l;
463
+ return s;
464
464
  }
465
- return ae({}, this.keyframes[this.keyframes.length - 1].value);
466
- }, p.prototype.getProgressVelocity = function(o) {
465
+ return q({}, this.keyframes[this.keyframes.length - 1].value);
466
+ }, f.prototype.getProgressVelocity = function(o) {
467
467
  var e = o - this.startTime;
468
- return e >= this.duration ? 0 : wn(1, this.startVelocity, this.duration, e);
469
- }, p.prototype.update = function(o) {
468
+ return e >= this.duration ? 0 : En(1, this.startVelocity, this.duration, e);
469
+ }, f.prototype.update = function(o) {
470
470
  return this.ended ? !0 : (this.progress = Math.min(1, Math.max(0, this.progress, this.getProgress(o))), this.value = this.getValue(this.progress), this.ended = this.progress >= 1, this.ended && this.callbacks && (this.callbacks[0](), this.callbacks = void 0), this.ended);
471
- }, p.prototype.getKeyFrameSegment = function(o) {
472
- for (var e = this.getProgress(o), i = 1; i < this.keyframes.length; i++)
473
- if (this.keyframes[i].progress > e)
474
- return [this.keyframes[i - 1], this.keyframes[i]];
471
+ }, f.prototype.getKeyFrameSegment = function(o) {
472
+ for (var e = this.getProgress(o), a = 1; a < this.keyframes.length; a++)
473
+ if (this.keyframes[a].progress > e)
474
+ return [this.keyframes[a - 1], this.keyframes[a]];
475
475
  return [this.keyframes[this.keyframes.length - 2], this.keyframes[this.keyframes.length - 1]];
476
- }, p.prototype.getTargetKeyframe = function() {
476
+ }, f.prototype.getTargetKeyframe = function() {
477
477
  return this.keyframes[this.keyframes.length - 1];
478
- }, p.prototype.set = function(o, e, i, t) {
479
- var l;
480
- i === void 0 && (i = 0), isNaN(e) && (e = 0), isNaN(i) && (i = 0), t = t != null ? t : Tt();
481
- var h = this.getProgress(t), c = this.getValue(h), g = {};
478
+ }, f.prototype.set = function(o, e, a, t) {
479
+ var s;
480
+ a === void 0 && (a = 0), isNaN(e) && (e = 0), isNaN(a) && (a = 0), t = t != null ? t : bt();
481
+ var u = this.getProgress(t), l = this.getValue(u), g = {};
482
482
  for (var d in this.config)
483
- g[d] = (l = o[d]) !== null && l !== void 0 ? l : c[d];
484
- var m = [
485
- { progress: 0, value: c },
483
+ g[d] = (s = o[d]) !== null && s !== void 0 ? s : l[d];
484
+ var v = [
485
+ { progress: 0, value: l },
486
486
  { progress: 1, value: g }
487
487
  ];
488
- return this.setKeyframes(m, e, i, t);
489
- }, p.prototype.setKeyframes = function(o, e, i, t) {
490
- var l = this;
491
- if (i === void 0 && (i = 0), o.length < 2)
488
+ return this.setKeyframes(v, e, a, t);
489
+ }, f.prototype.setKeyframes = function(o, e, a, t) {
490
+ var s = this;
491
+ if (a === void 0 && (a = 0), o.length < 2)
492
492
  throw new Error("keyframes invalid.");
493
- return isNaN(e) && (e = 0), isNaN(i) && (i = 0), this.callbacks && (this.callbacks[1](new Error("motion aborted.")), this.callbacks = void 0), new Promise(function(h, c) {
494
- t = t != null ? t : Tt(), l.progress = 0, l.ended = !1, l.startTime = t, l.startVelocity = i, l.keyframes = o, l.duration = e, e === 0 ? (l.progress = 1, l.value = ae({}, o[o.length - 1].value)) : l.value = ae({}, o[0].value), l.callbacks = [h, c];
493
+ return isNaN(e) && (e = 0), isNaN(a) && (a = 0), this.callbacks && (this.callbacks[1](new Error("motion aborted.")), this.callbacks = void 0), new Promise(function(u, l) {
494
+ t = t != null ? t : bt(), s.progress = 0, s.ended = !1, s.startTime = t, s.startVelocity = a, s.keyframes = o, s.duration = e, e === 0 ? (s.progress = 1, s.value = q({}, o[o.length - 1].value)) : s.value = q({}, o[0].value), s.callbacks = [u, l];
495
495
  });
496
- }, p.prototype.dispose = function() {
496
+ }, f.prototype.dispose = function() {
497
497
  this.callbacks && (this.callbacks[1](new Error("motion dispose.")), this.callbacks = void 0);
498
- }, p;
498
+ }, f;
499
499
  }()
500
- ), Mn = [
500
+ ), An = [
501
501
  { progress: 0, value: { scale: 0, opacity: 0, shadow: 2 } },
502
502
  { progress: 0.2, value: { scale: 0.5, opacity: 1, shadow: 1 } },
503
503
  { progress: 0.8, value: { scale: 2, opacity: 0, shadow: 0.5 } },
504
504
  { progress: 1, value: { scale: 2, opacity: 0, shadow: 0.5 } }
505
- ], On = [
505
+ ], Mn = [
506
506
  { progress: 0, value: { scale: 0, opacity: 0, shadow: 2 } },
507
507
  { progress: 0.2, value: { scale: 0.4, opacity: 1, shadow: 2 } },
508
508
  { progress: 0.8, value: { scale: 1.6, opacity: 0.4, shadow: 0.5 } },
509
509
  { progress: 1, value: { scale: 2, opacity: 0, shadow: 0.5 } }
510
- ], An = `
510
+ ], Cn = `
511
511
  varying vec2 vUv;
512
512
  void main() {
513
513
  vUv = uv;
514
514
  gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
515
515
  }
516
- `, xn = `
516
+ `, On = `
517
517
  varying vec2 vUv;
518
518
  uniform sampler2D map;
519
519
  uniform vec4 color;
@@ -561,14 +561,14 @@ void main() {
561
561
  }
562
562
  `, _n = (
563
563
  /** @class */
564
- function(p) {
565
- lt(o, p);
566
- function o(e, i) {
567
- var t = p.call(this, e) || this;
564
+ function(f) {
565
+ qe(o, f);
566
+ function o(e, a) {
567
+ var t = f.call(this, e) || this;
568
568
  t.canvas = document.createElement("canvas"), t.group = new w.Group(), t.wrapper = document.createElement("div"), t.style = document.createElement("style"), t.itemMaskMesh = function() {
569
- var c = new w.Mesh(new w.SphereBufferGeometry(1, 60, 40), new w.ShaderMaterial({
570
- vertexShader: An,
571
- fragmentShader: xn,
569
+ var l = new w.Mesh(new w.SphereBufferGeometry(1, 60, 40), new w.ShaderMaterial({
570
+ vertexShader: Cn,
571
+ fragmentShader: On,
572
572
  uniforms: {
573
573
  map: {
574
574
  value: new w.Texture()
@@ -581,85 +581,85 @@ void main() {
581
581
  depthTest: !1,
582
582
  transparent: !0
583
583
  }));
584
- return c.renderOrder = -3, c.geometry.rotateY(-Math.PI / 2), c.geometry.scale(-1, 1, 1), c;
585
- }(), t.onFivePanoArrived = function(c) {
586
- t.state.mode === "mask" && t.loadPanoMask(c);
587
- }, t.onFiveWantsMoveToPano = function(c) {
584
+ return l.renderOrder = -3, l.geometry.rotateY(-Math.PI / 2), l.geometry.scale(-1, 1, 1), l;
585
+ }(), t.onFivePanoArrived = function(l) {
586
+ t.state.mode === "mask" && t.loadPanoMask(l);
587
+ }, t.onFiveWantsMoveToPano = function(l) {
588
588
  t.state.mode === "box" && t.select();
589
- }, t.loadPanoMask = function(c) {
590
- return at(t, void 0, void 0, function() {
591
- var g, d, m, E, O, S, A, k, V, y;
592
- return it(this, function(T) {
593
- switch (T.label) {
589
+ }, t.loadPanoMask = function(l) {
590
+ return Xe(t, void 0, void 0, function() {
591
+ var g, d, v, T, A, O, M, C, I, y;
592
+ return Ge(this, function(b) {
593
+ switch (b.label) {
594
594
  case 0:
595
- return g = this, d = g.five, m = g.canvas, E = g.itemMaskMesh, O = g.data, S = m.getContext("2d"), A = d.observers[c], k = (y = O == null ? void 0 : O.object_mask_list.find(function(P) {
596
- return P.derived_id === String(A.derivedId);
597
- })) === null || y === void 0 ? void 0 : y.object_mask_url, k ? [4, yn(k)] : [
595
+ return g = this, d = g.five, v = g.canvas, T = g.itemMaskMesh, A = g.data, O = v.getContext("2d"), M = d.observers[l], C = (y = A == null ? void 0 : A.object_mask_list.find(function(P) {
596
+ return P.derived_id === String(M.derivedId);
597
+ })) === null || y === void 0 ? void 0 : y.object_mask_url, C ? [4, bn(C)] : [
598
598
  2
599
599
  /*return*/
600
600
  ];
601
601
  case 1:
602
- return V = T.sent(), m.width = V.width, m.height = V.height, S == null || S.drawImage(V, 0, 0, V.width, V.height), E.material.uniforms.map.value.image = V, E.material.uniforms.map.value.minFilter = w.LinearFilter, E.material.uniforms.map.value.needsUpdate = !0, E.position.copy(A.position), E.quaternion.copy(A.quaternion), d.scene.add(E), d.needsRender = !0, [
602
+ return I = b.sent(), v.width = I.width, v.height = I.height, O == null || O.drawImage(I, 0, 0, I.width, I.height), T.material.uniforms.map.value.image = I, T.material.uniforms.map.value.minFilter = w.LinearFilter, T.material.uniforms.map.value.needsUpdate = !0, T.position.copy(M.position), T.quaternion.copy(M.quaternion), d.scene.add(T), d.needsRender = !0, [
603
603
  2
604
604
  /*return*/
605
605
  ];
606
606
  }
607
607
  });
608
608
  });
609
- }, t.onFiveMouseMove = function(c) {
609
+ }, t.onFiveMouseMove = function(l) {
610
610
  var g;
611
611
  if (t.state.mode === "mask" && t.five.state.mode === "Panorama") {
612
- var d = t, m = d.five, E = d.itemMaskMesh, O = m.observers[m.state.panoIndex], S = (g = c.pointers[0]) === null || g === void 0 ? void 0 : g.raycaster;
613
- if (S) {
614
- var A = S.intersectObjects(t.group.children.filter(function(k) {
615
- return k.userData.visible_viewpoint.includes(String(O.derivedId));
612
+ var d = t, v = d.five, T = d.itemMaskMesh, A = v.observers[v.state.panoIndex], O = (g = l.pointers[0]) === null || g === void 0 ? void 0 : g.raycaster;
613
+ if (O) {
614
+ var M = O.intersectObjects(t.group.children.filter(function(C) {
615
+ return C.userData.visible_viewpoint.includes(String(A.derivedId));
616
616
  }), !0)[0];
617
- A ? E.material.uniforms.color.value = A.object.userData.color : E.material.uniforms.color.value = new w.Vector4(0, 0, 0, 1);
617
+ M ? T.material.uniforms.color.value = M.object.userData.color : T.material.uniforms.color.value = new w.Vector4(0, 0, 0, 1);
618
618
  }
619
619
  }
620
- }, t.onFiveTapGesture = function(c) {
620
+ }, t.onFiveTapGesture = function(l) {
621
621
  var g = t.five, d = g.observers[g.state.panoIndex];
622
- if (c) {
623
- var m = c.intersectObjects(t.group.children.filter(function(S) {
624
- return S.userData.visible_viewpoint.includes(String(d.derivedId));
622
+ if (l) {
623
+ var v = l.intersectObjects(t.group.children.filter(function(O) {
624
+ return O.userData.visible_viewpoint.includes(String(d.derivedId));
625
625
  }), !0)[0];
626
- if (m) {
627
- t.select(m.object.name), t.stopAnimation && t.stopAnimation(), t.tapPosition = m.point, t.changeTapScreenPosition();
628
- var E = new Vt({
626
+ if (v) {
627
+ t.select(v.object.name), t.stopAnimation && t.stopAnimation(), t.tapPosition = v.point, t.changeTapScreenPosition();
628
+ var T = new Yt({
629
629
  opacity: 0,
630
630
  scale: 0,
631
631
  shadow: 2
632
- }), O = new Vt({
632
+ }), A = new Yt({
633
633
  opacity: 0,
634
634
  scale: 0,
635
635
  shadow: 2
636
636
  });
637
- return E.setKeyframes(Mn, 1e3), O.setKeyframes(On, 1e3), t.stopAnimation = fn.shared.add(function(S, A) {
638
- var k, V = E.update(S), y = O.update(S);
639
- t.wrapper.firstChild.style.opacity = "".concat(E.value.opacity), t.wrapper.firstChild.style.transform = "scale(".concat(E.value.scale, ")"), t.wrapper.firstChild.style.boxShadow = "0 0 0 ".concat(E.value.shadow, "px #fff"), t.wrapper.lastChild.style.opacity = "".concat(O.value.opacity), t.wrapper.lastChild.style.transform = "scale(".concat(O.value.scale, ")"), t.wrapper.lastChild.style.boxShadow = "0 0 0 ".concat(O.value.shadow, "px #fff"), V && y && ((k = t.stopAnimation) === null || k === void 0 || k.call(t), t.stopAnimation = void 0, g.getElement().parentElement.removeChild(t.wrapper));
637
+ return T.setKeyframes(An, 1e3), A.setKeyframes(Mn, 1e3), t.stopAnimation = Ht.shared.add(function(O, M) {
638
+ var C, I = T.update(O), y = A.update(O);
639
+ t.wrapper.firstChild.style.opacity = "".concat(T.value.opacity), t.wrapper.firstChild.style.transform = "scale(".concat(T.value.scale, ")"), t.wrapper.firstChild.style.boxShadow = "0 0 0 ".concat(T.value.shadow, "px #fff"), t.wrapper.lastChild.style.opacity = "".concat(A.value.opacity), t.wrapper.lastChild.style.transform = "scale(".concat(A.value.scale, ")"), t.wrapper.lastChild.style.boxShadow = "0 0 0 ".concat(A.value.shadow, "px #fff"), I && y && ((C = t.stopAnimation) === null || C === void 0 || C.call(t), t.stopAnimation = void 0, g.getElement().parentElement.removeChild(t.wrapper));
640
640
  }, !1, 0, 10), g.getElement().parentElement.appendChild(t.wrapper), !1;
641
641
  }
642
642
  }
643
643
  }, t.changeTapScreenPosition = function() {
644
644
  if (t.tapPosition) {
645
- var c = t.tapPosition.clone().project(t.five.camera), g = (c.x + 1) / 2, d = -(c.y - 1) / 2;
646
- t.wrapper.style.opacity = c.z > 0 && c.z < 1 ? "1" : "0", t.wrapper.style.transform = "translate(".concat(g * 100, "%, ").concat(d * 100, "%)");
645
+ var l = t.tapPosition.clone().project(t.five.camera), g = (l.x + 1) / 2, d = -(l.y - 1) / 2;
646
+ t.wrapper.style.opacity = l.z > 0 && l.z < 1 ? "1" : "0", t.wrapper.style.transform = "translate(".concat(g * 100, "%, ").concat(d * 100, "%)");
647
647
  }
648
- }, t.onFiveCameraUpdate = function(c) {
648
+ }, t.onFiveCameraUpdate = function(l) {
649
649
  t.changeTapScreenPosition();
650
650
  }, t.dispose = function() {
651
651
  t.disable();
652
652
  }, t.five = e;
653
- var l = {
653
+ var s = {
654
654
  enabled: !0,
655
655
  visible: !0,
656
656
  mode: "box",
657
657
  selectedId: null,
658
658
  selectAll: !1
659
659
  };
660
- t.state = Object.assign(l, i == null ? void 0 : i.initialState);
661
- var h = ae({}, i == null ? void 0 : i.config);
662
- return t._config = h, t.group.rotateX(Math.PI), t.wrapper.className = "ItemMaskPlugin", t.wrapper.innerHTML = '<span class="ItemMaskPluginCircle"></span><span class="ItemMaskPluginCircle"></span>', t.style.innerHTML = `
660
+ t.state = Object.assign(s, a == null ? void 0 : a.initialState);
661
+ var u = q({}, a == null ? void 0 : a.config);
662
+ return t._config = u, t.group.rotateX(Math.PI), t.wrapper.className = "ItemMaskPlugin", t.wrapper.innerHTML = '<span class="ItemMaskPluginCircle"></span><span class="ItemMaskPluginCircle"></span>', t.style.innerHTML = `
663
663
  .ItemMaskPlugin {
664
664
  position: absolute;
665
665
  top: 0;
@@ -681,23 +681,23 @@ void main() {
681
681
  }
682
682
  return Object.defineProperty(o.prototype, "config", {
683
683
  get: function() {
684
- return ae({}, this._config);
684
+ return q({}, this._config);
685
685
  },
686
686
  enumerable: !1,
687
687
  configurable: !0
688
- }), o.prototype.updateState = function(e, i) {
688
+ }), o.prototype.updateState = function(e, a) {
689
689
  var t = this.state;
690
- this.state = ae(ae({}, this.state), e), this.hooks.emit("stateChange", { state: this.state, prevState: t, userAction: i });
690
+ this.state = q(q({}, this.state), e), this.hooks.emit("stateChange", { state: this.state, prevState: t, userAction: a });
691
691
  }, o.prototype.load = function(e) {
692
- return at(this, void 0, void 0, function() {
693
- var i, t, l = this;
694
- return it(this, function(h) {
695
- return this.data = e, i = e.data_list.map(function(c) {
696
- var g, d = c.position.end.map(function(N) {
697
- return Number(N);
698
- }), m = c.position.start.map(function(N) {
699
- return Number(N);
700
- }), E = Math.abs(d[0] - m[0]), O = Math.abs(d[1] - m[1]), S = Math.abs(d[2] - m[2]), A = d[0] / 2 + m[0] / 2, k = d[1] / 2 + m[1] / 2, V = d[2] / 2 + m[2] / 2, y = new w.Vector3(A, k, V), T = new w.BoxBufferGeometry(E, O, S), P = new w.ShaderMaterial({
692
+ return Xe(this, void 0, void 0, function() {
693
+ var a, t, s = this;
694
+ return Ge(this, function(u) {
695
+ return this.data = e, a = e.data_list.map(function(l) {
696
+ var g, d = l.position.end.map(function(k) {
697
+ return Number(k);
698
+ }), v = l.position.start.map(function(k) {
699
+ return Number(k);
700
+ }), T = Math.abs(d[0] - v[0]), A = Math.abs(d[1] - v[1]), O = Math.abs(d[2] - v[2]), M = d[0] / 2 + v[0] / 2, C = d[1] / 2 + v[1] / 2, I = d[2] / 2 + v[2] / 2, y = new w.Vector3(M, C, I), b = new w.BoxBufferGeometry(T, A, O), P = new w.ShaderMaterial({
701
701
  vertexShader: `
702
702
  varying vec2 vUv;
703
703
  void main() {
@@ -726,40 +726,40 @@ void main() {
726
726
  }
727
727
  `,
728
728
  side: w.DoubleSide,
729
- visible: l.state.selectedId === "".concat(c.category_name).concat(c.index),
729
+ visible: s.state.selectedId === "".concat(l.category_name).concat(l.index),
730
730
  uniforms: {
731
- opacity: { value: l.state.mode === "box" ? 1 : 0 }
731
+ opacity: { value: s.state.mode === "box" ? 1 : 0 }
732
732
  },
733
733
  depthWrite: !1,
734
734
  depthTest: !1,
735
735
  transparent: !0
736
- }), f = new w.Mesh(T, P);
737
- return f.position.copy(y), f.name = "".concat(c.category_name).concat(c.index), f.userData.color = new ((g = w.Vector4).bind.apply(g, Bt(Bt([void 0], c.mask_color.map(function(N) {
738
- return N / 255;
739
- }).reverse(), !1), [1], !1)))(), f.userData.visible_viewpoint = Object.keys(c.visible_viewpoint), f;
740
- }), (t = this.group).add.apply(t, i), [
736
+ }), p = new w.Mesh(b, P);
737
+ return p.position.copy(y), p.name = "".concat(l.category_name).concat(l.index), p.userData.color = new ((g = w.Vector4).bind.apply(g, Vt(Vt([void 0], l.mask_color.map(function(k) {
738
+ return k / 255;
739
+ }).reverse(), !1), [1], !1)))(), p.userData.visible_viewpoint = Object.keys(l.visible_viewpoint), p;
740
+ }), (t = this.group).add.apply(t, a), [
741
741
  2
742
742
  /*return*/
743
743
  ];
744
744
  });
745
745
  });
746
- }, o.prototype.setState = function(e, i) {
747
- i === void 0 && (i = {});
748
- var t = this.state, l = i.userAction !== void 0 ? i.userAction : !0;
749
- if (this.updateState(e, l), e.enabled !== void 0 && t.enabled !== e.enabled) {
750
- var h = { userAction: l };
751
- e.enabled ? this._enable(h) : this._disable(h);
746
+ }, o.prototype.setState = function(e, a) {
747
+ a === void 0 && (a = {});
748
+ var t = this.state, s = a.userAction !== void 0 ? a.userAction : !0;
749
+ if (this.updateState(e, s), e.enabled !== void 0 && t.enabled !== e.enabled) {
750
+ var u = { userAction: s };
751
+ e.enabled ? this._enable(u) : this._disable(u);
752
752
  }
753
753
  }, o.prototype.setMode = function(e) {
754
- this.updateState({ mode: e }, !1), e === "mask" ? (this.group.children.forEach(function(i) {
755
- i.material.uniforms.opacity.value = 0;
756
- }), this.loadPanoMask(this.five.state.panoIndex)) : e === "box" && (this.itemMaskMesh.material.uniforms.color.value = new w.Vector4(0, 0, 0, 1), this.group.children.forEach(function(i) {
757
- i.material.uniforms.opacity.value = 1;
754
+ this.updateState({ mode: e }, !1), e === "mask" ? (this.group.children.forEach(function(a) {
755
+ a.material.uniforms.opacity.value = 0;
756
+ }), this.loadPanoMask(this.five.state.panoIndex)) : e === "box" && (this.itemMaskMesh.material.uniforms.color.value = new w.Vector4(0, 0, 0, 1), this.group.children.forEach(function(a) {
757
+ a.material.uniforms.opacity.value = 1;
758
758
  }), this.five.needsRender = !0);
759
- }, o.prototype.select = function(e, i) {
760
- var t = this, l;
761
- this.updateState({ selectedId: e != null ? e : null }, (l = i == null ? void 0 : i.userAction) !== null && l !== void 0 ? l : !1), this.group.children.forEach(function(h) {
762
- h.material.visible = t.state.selectAll || h.name === e;
759
+ }, o.prototype.select = function(e, a) {
760
+ var t = this, s;
761
+ this.updateState({ selectedId: e != null ? e : null }, (s = a == null ? void 0 : a.userAction) !== null && s !== void 0 ? s : !1), this.group.children.forEach(function(u) {
762
+ u.material.visible = t.state.selectAll || u.name === e;
763
763
  }), this.five.needsRender = !0;
764
764
  }, o.prototype.selectAll = function(e) {
765
765
  e === void 0 && (e = !0), this.updateState({ selectAll: !!e }, !1), this.select();
@@ -768,101 +768,101 @@ void main() {
768
768
  }, o.prototype._disable = function(e) {
769
769
  this.five.off("panoArrived", this.onFivePanoArrived), this.five.off("wantsMoveToPano", this.onFiveWantsMoveToPano), this.five.off("gesture.mousemove", this.onFiveMouseMove), this.five.off("wantsTapGesture", this.onFiveTapGesture), this.five.off("cameraUpdate", this.onFiveCameraUpdate), this.five.scene.remove(this.group), document.head.removeChild(this.style);
770
770
  }, o.prototype.enable = function(e) {
771
- var i;
771
+ var a;
772
772
  if (!this.state.enabled) {
773
- var t = (i = e == null ? void 0 : e.userAction) !== null && i !== void 0 ? i : !0;
773
+ var t = (a = e == null ? void 0 : e.userAction) !== null && a !== void 0 ? a : !0;
774
774
  this.updateState({ enabled: !0 }, t), this._enable({ userAction: t });
775
775
  }
776
776
  }, o.prototype.disable = function(e) {
777
- var i;
777
+ var a;
778
778
  if (this.state.enabled !== !1) {
779
- var t = (i = e == null ? void 0 : e.userAction) !== null && i !== void 0 ? i : !0;
779
+ var t = (a = e == null ? void 0 : e.userAction) !== null && a !== void 0 ? a : !0;
780
780
  this.updateState({ enabled: !1 }, t), this._disable({ userAction: t });
781
781
  }
782
782
  }, o;
783
- }(rt.Controller)
784
- ), Fn = function(p, o) {
785
- return new _n(p, o);
783
+ }(ze.Controller)
784
+ ), Bn = function(f, o) {
785
+ return new _n(f, o);
786
786
  };
787
787
  /*! Hammer.JS - v2.0.7 - 2016-04-22
788
788
  * http://hammerjs.github.io/
789
789
  *
790
790
  * Copyright (c) 2016 Jorik Tangelder;
791
791
  * Licensed under the MIT license */
792
- var bt = function(p, o, e, i) {
793
- var t = ["", "webkit", "Moz", "MS", "ms", "o"], l = o.createElement ? o.createElement("div") : i, h = "function", c = Math.round, g = Math.abs, d = Date.now;
794
- function m(n, r, a) {
795
- return setTimeout(T(n, a), r);
792
+ var Tt = function(f, o, e, a) {
793
+ var t = ["", "webkit", "Moz", "MS", "ms", "o"], s = o.createElement ? o.createElement("div") : a, u = "function", l = Math.round, g = Math.abs, d = Date.now;
794
+ function v(n, r, i) {
795
+ return setTimeout(b(n, i), r);
796
796
  }
797
- function E(n, r, a) {
798
- return Array.isArray(n) ? (O(n, a[r], a), !0) : !1;
797
+ function T(n, r, i) {
798
+ return Array.isArray(n) ? (A(n, i[r], i), !0) : !1;
799
799
  }
800
- function O(n, r, a) {
801
- var u;
800
+ function A(n, r, i) {
801
+ var h;
802
802
  if (n)
803
803
  if (n.forEach)
804
- n.forEach(r, a);
805
- else if (n.length !== i)
806
- for (u = 0; u < n.length; )
807
- r.call(a, n[u], u, n), u++;
804
+ n.forEach(r, i);
805
+ else if (n.length !== a)
806
+ for (h = 0; h < n.length; )
807
+ r.call(i, n[h], h, n), h++;
808
808
  else
809
- for (u in n)
810
- n.hasOwnProperty(u) && r.call(a, n[u], u, n);
809
+ for (h in n)
810
+ n.hasOwnProperty(h) && r.call(i, n[h], h, n);
811
811
  }
812
- function S(n, r, a) {
813
- var u = "DEPRECATED METHOD: " + r + `
814
- ` + a + ` AT
812
+ function O(n, r, i) {
813
+ var h = "DEPRECATED METHOD: " + r + `
814
+ ` + i + ` AT
815
815
  `;
816
816
  return function() {
817
- var v = new Error("get-stack-trace"), b = v && v.stack ? v.stack.replace(/^[^\(]+?[\n$]/gm, "").replace(/^\s+at\s+/gm, "").replace(/^Object.<anonymous>\s*\(/gm, "{anonymous}()@") : "Unknown Stack Trace", C = p.console && (p.console.warn || p.console.log);
818
- return C && C.call(p.console, u, b), n.apply(this, arguments);
817
+ var m = new Error("get-stack-trace"), E = m && m.stack ? m.stack.replace(/^[^\(]+?[\n$]/gm, "").replace(/^\s+at\s+/gm, "").replace(/^Object.<anonymous>\s*\(/gm, "{anonymous}()@") : "Unknown Stack Trace", N = f.console && (f.console.warn || f.console.log);
818
+ return N && N.call(f.console, h, E), n.apply(this, arguments);
819
819
  };
820
820
  }
821
- var A;
822
- typeof Object.assign != "function" ? A = function(r) {
823
- if (r === i || r === null)
821
+ var M;
822
+ typeof Object.assign != "function" ? M = function(r) {
823
+ if (r === a || r === null)
824
824
  throw new TypeError("Cannot convert undefined or null to object");
825
- for (var a = Object(r), u = 1; u < arguments.length; u++) {
826
- var v = arguments[u];
827
- if (v !== i && v !== null)
828
- for (var b in v)
829
- v.hasOwnProperty(b) && (a[b] = v[b]);
825
+ for (var i = Object(r), h = 1; h < arguments.length; h++) {
826
+ var m = arguments[h];
827
+ if (m !== a && m !== null)
828
+ for (var E in m)
829
+ m.hasOwnProperty(E) && (i[E] = m[E]);
830
830
  }
831
- return a;
832
- } : A = Object.assign;
833
- var k = S(function(r, a, u) {
834
- for (var v = Object.keys(a), b = 0; b < v.length; )
835
- (!u || u && r[v[b]] === i) && (r[v[b]] = a[v[b]]), b++;
831
+ return i;
832
+ } : M = Object.assign;
833
+ var C = O(function(r, i, h) {
834
+ for (var m = Object.keys(i), E = 0; E < m.length; )
835
+ (!h || h && r[m[E]] === a) && (r[m[E]] = i[m[E]]), E++;
836
836
  return r;
837
- }, "extend", "Use `assign`."), V = S(function(r, a) {
838
- return k(r, a, !0);
837
+ }, "extend", "Use `assign`."), I = O(function(r, i) {
838
+ return C(r, i, !0);
839
839
  }, "merge", "Use `assign`.");
840
- function y(n, r, a) {
841
- var u = r.prototype, v;
842
- v = n.prototype = Object.create(u), v.constructor = n, v._super = u, a && A(v, a);
840
+ function y(n, r, i) {
841
+ var h = r.prototype, m;
842
+ m = n.prototype = Object.create(h), m.constructor = n, m._super = h, i && M(m, i);
843
843
  }
844
- function T(n, r) {
844
+ function b(n, r) {
845
845
  return function() {
846
846
  return n.apply(r, arguments);
847
847
  };
848
848
  }
849
849
  function P(n, r) {
850
- return typeof n == h ? n.apply(r && r[0] || i, r) : n;
850
+ return typeof n == u ? n.apply(r && r[0] || a, r) : n;
851
851
  }
852
- function f(n, r) {
853
- return n === i ? r : n;
852
+ function p(n, r) {
853
+ return n === a ? r : n;
854
854
  }
855
- function N(n, r, a) {
856
- O(ee(r), function(u) {
857
- n.addEventListener(u, a, !1);
855
+ function k(n, r, i) {
856
+ A(te(r), function(h) {
857
+ n.addEventListener(h, i, !1);
858
858
  });
859
859
  }
860
- function M(n, r, a) {
861
- O(ee(r), function(u) {
862
- n.removeEventListener(u, a, !1);
860
+ function x(n, r, i) {
861
+ A(te(r), function(h) {
862
+ n.removeEventListener(h, i, !1);
863
863
  });
864
864
  }
865
- function $(n, r) {
865
+ function ee(n, r) {
866
866
  for (; n; ) {
867
867
  if (n == r)
868
868
  return !0;
@@ -873,55 +873,55 @@ var bt = function(p, o, e, i) {
873
873
  function Z(n, r) {
874
874
  return n.indexOf(r) > -1;
875
875
  }
876
- function ee(n) {
876
+ function te(n) {
877
877
  return n.trim().split(/\s+/g);
878
878
  }
879
- function le(n, r, a) {
880
- if (n.indexOf && !a)
879
+ function le(n, r, i) {
880
+ if (n.indexOf && !i)
881
881
  return n.indexOf(r);
882
- for (var u = 0; u < n.length; ) {
883
- if (a && n[u][a] == r || !a && n[u] === r)
884
- return u;
885
- u++;
882
+ for (var h = 0; h < n.length; ) {
883
+ if (i && n[h][i] == r || !i && n[h] === r)
884
+ return h;
885
+ h++;
886
886
  }
887
887
  return -1;
888
888
  }
889
889
  function me(n) {
890
890
  return Array.prototype.slice.call(n, 0);
891
891
  }
892
- function xe(n, r, a) {
893
- for (var u = [], v = [], b = 0; b < n.length; ) {
894
- var C = n[b][r];
895
- le(v, C) < 0 && u.push(n[b]), v[b] = C, b++;
892
+ function Ce(n, r, i) {
893
+ for (var h = [], m = [], E = 0; E < n.length; ) {
894
+ var N = n[E][r];
895
+ le(m, N) < 0 && h.push(n[E]), m[E] = N, E++;
896
896
  }
897
- return u = u.sort(function(se, G) {
897
+ return h = h.sort(function(se, G) {
898
898
  return se[r] > G[r];
899
- }), u;
899
+ }), h;
900
900
  }
901
- function ne(n, r) {
902
- for (var a, u, v = r[0].toUpperCase() + r.slice(1), b = 0; b < t.length; ) {
903
- if (a = t[b], u = a ? a + v : r, u in n)
904
- return u;
905
- b++;
901
+ function re(n, r) {
902
+ for (var i, h, m = r[0].toUpperCase() + r.slice(1), E = 0; E < t.length; ) {
903
+ if (i = t[E], h = i ? i + m : r, h in n)
904
+ return h;
905
+ E++;
906
906
  }
907
- return i;
907
+ return a;
908
908
  }
909
909
  var ie = 1;
910
- function D() {
910
+ function R() {
911
911
  return ie++;
912
912
  }
913
- function _(n) {
913
+ function S(n) {
914
914
  var r = n.ownerDocument || n;
915
- return r.defaultView || r.parentWindow || p;
915
+ return r.defaultView || r.parentWindow || f;
916
916
  }
917
- var x = /mobile|tablet|ip(ad|hone|od)|android/i, R = "ontouchstart" in p, Y = ne(p, "PointerEvent") !== i, te = R && x.test(navigator.userAgent), j = "touch", F = "pen", W = "mouse", B = "kinect", U = 25, I = 1, J = 2, H = 4, z = 8, _e = 1, Ee = 2, Ce = 4, Ne = 8, Pe = 16, oe = Ee | Ce, ue = Ne | Pe, De = oe | ue, Re = ["x", "y"], Ie = ["clientX", "clientY"];
918
- function re(n, r) {
919
- var a = this;
920
- this.manager = n, this.callback = r, this.element = n.element, this.target = n.options.inputTarget, this.domHandler = function(u) {
921
- P(n.options.enable, [n]) && a.handler(u);
917
+ var _ = /mobile|tablet|ip(ad|hone|od)|android/i, F = "ontouchstart" in f, Y = re(f, "PointerEvent") !== a, ne = F && _.test(navigator.userAgent), H = "touch", U = "pen", W = "mouse", V = "kinect", B = 25, L = 1, $ = 2, j = 4, z = 8, Oe = 1, Ee = 2, _e = 4, Se = 8, Pe = 16, oe = Ee | _e, ue = Se | Pe, De = oe | ue, Re = ["x", "y"], Ie = ["clientX", "clientY"];
918
+ function ae(n, r) {
919
+ var i = this;
920
+ this.manager = n, this.callback = r, this.element = n.element, this.target = n.options.inputTarget, this.domHandler = function(h) {
921
+ P(n.options.enable, [n]) && i.handler(h);
922
922
  }, this.init();
923
923
  }
924
- re.prototype = {
924
+ ae.prototype = {
925
925
  /**
926
926
  * should handle the inputEvent data and trigger the callback
927
927
  * @virtual
@@ -932,58 +932,58 @@ var bt = function(p, o, e, i) {
932
932
  * bind the events
933
933
  */
934
934
  init: function() {
935
- this.evEl && N(this.element, this.evEl, this.domHandler), this.evTarget && N(this.target, this.evTarget, this.domHandler), this.evWin && N(_(this.element), this.evWin, this.domHandler);
935
+ this.evEl && k(this.element, this.evEl, this.domHandler), this.evTarget && k(this.target, this.evTarget, this.domHandler), this.evWin && k(S(this.element), this.evWin, this.domHandler);
936
936
  },
937
937
  /**
938
938
  * unbind the events
939
939
  */
940
940
  destroy: function() {
941
- this.evEl && M(this.element, this.evEl, this.domHandler), this.evTarget && M(this.target, this.evTarget, this.domHandler), this.evWin && M(_(this.element), this.evWin, this.domHandler);
941
+ this.evEl && x(this.element, this.evEl, this.domHandler), this.evTarget && x(this.target, this.evTarget, this.domHandler), this.evWin && x(S(this.element), this.evWin, this.domHandler);
942
942
  }
943
943
  };
944
- function Xe(n) {
945
- var r, a = n.options.inputClass;
946
- return a ? r = a : Y ? r = ut : te ? r = Ze : R ? r = ht : r = qe, new r(n, Ge);
947
- }
948
- function Ge(n, r, a) {
949
- var u = a.pointers.length, v = a.changedPointers.length, b = r & I && u - v === 0, C = r & (H | z) && u - v === 0;
950
- a.isFirst = !!b, a.isFinal = !!C, b && (n.session = {}), a.eventType = r, s(n, a), n.emit("hammer.input", a), n.recognize(a), n.session.prevInput = a;
951
- }
952
- function s(n, r) {
953
- var a = n.session, u = r.pointers, v = u.length;
954
- a.firstInput || (a.firstInput = q(r)), v > 1 && !a.firstMultiple ? a.firstMultiple = q(r) : v === 1 && (a.firstMultiple = !1);
955
- var b = a.firstInput, C = a.firstMultiple, K = C ? C.center : b.center, se = r.center = fe(u);
956
- r.timeStamp = d(), r.deltaTime = r.timeStamp - b.timeStamp, r.angle = ct(K, se), r.distance = We(K, se), L(a, r), r.offsetDirection = ge(r.deltaX, r.deltaY);
944
+ function Ke(n) {
945
+ var r, i = n.options.inputClass;
946
+ return i ? r = i : Y ? r = ut : ne ? r = $e : F ? r = ht : r = Je, new r(n, Ze);
947
+ }
948
+ function Ze(n, r, i) {
949
+ var h = i.pointers.length, m = i.changedPointers.length, E = r & L && h - m === 0, N = r & (j | z) && h - m === 0;
950
+ i.isFirst = !!E, i.isFinal = !!N, E && (n.session = {}), i.eventType = r, c(n, i), n.emit("hammer.input", i), n.recognize(i), n.session.prevInput = i;
951
+ }
952
+ function c(n, r) {
953
+ var i = n.session, h = r.pointers, m = h.length;
954
+ i.firstInput || (i.firstInput = K(r)), m > 1 && !i.firstMultiple ? i.firstMultiple = K(r) : m === 1 && (i.firstMultiple = !1);
955
+ var E = i.firstInput, N = i.firstMultiple, Q = N ? N.center : E.center, se = r.center = fe(h);
956
+ r.timeStamp = d(), r.deltaTime = r.timeStamp - E.timeStamp, r.angle = ct(Q, se), r.distance = Qe(Q, se), D(i, r), r.offsetDirection = ge(r.deltaX, r.deltaY);
957
957
  var G = Fe(r.deltaTime, r.deltaX, r.deltaY);
958
- r.overallVelocityX = G.x, r.overallVelocityY = G.y, r.overallVelocity = g(G.x) > g(G.y) ? G.x : G.y, r.scale = C ? Xt(C.pointers, u) : 1, r.rotation = C ? zt(C.pointers, u) : 0, r.maxPointers = a.prevInput ? r.pointers.length > a.prevInput.maxPointers ? r.pointers.length : a.prevInput.maxPointers : r.pointers.length, X(a, r);
958
+ r.overallVelocityX = G.x, r.overallVelocityY = G.y, r.overallVelocity = g(G.x) > g(G.y) ? G.x : G.y, r.scale = N ? Wt(N.pointers, h) : 1, r.rotation = N ? Gt(N.pointers, h) : 0, r.maxPointers = i.prevInput ? r.pointers.length > i.prevInput.maxPointers ? r.pointers.length : i.prevInput.maxPointers : r.pointers.length, X(i, r);
959
959
  var de = n.element;
960
- $(r.srcEvent.target, de) && (de = r.srcEvent.target), r.target = de;
961
- }
962
- function L(n, r) {
963
- var a = r.center, u = n.offsetDelta || {}, v = n.prevDelta || {}, b = n.prevInput || {};
964
- (r.eventType === I || b.eventType === H) && (v = n.prevDelta = {
965
- x: b.deltaX || 0,
966
- y: b.deltaY || 0
967
- }, u = n.offsetDelta = {
968
- x: a.x,
969
- y: a.y
970
- }), r.deltaX = v.x + (a.x - u.x), r.deltaY = v.y + (a.y - u.y);
960
+ ee(r.srcEvent.target, de) && (de = r.srcEvent.target), r.target = de;
961
+ }
962
+ function D(n, r) {
963
+ var i = r.center, h = n.offsetDelta || {}, m = n.prevDelta || {}, E = n.prevInput || {};
964
+ (r.eventType === L || E.eventType === j) && (m = n.prevDelta = {
965
+ x: E.deltaX || 0,
966
+ y: E.deltaY || 0
967
+ }, h = n.offsetDelta = {
968
+ x: i.x,
969
+ y: i.y
970
+ }), r.deltaX = m.x + (i.x - h.x), r.deltaY = m.y + (i.y - h.y);
971
971
  }
972
972
  function X(n, r) {
973
- var a = n.lastInterval || r, u = r.timeStamp - a.timeStamp, v, b, C, K;
974
- if (r.eventType != z && (u > U || a.velocity === i)) {
975
- var se = r.deltaX - a.deltaX, G = r.deltaY - a.deltaY, de = Fe(u, se, G);
976
- b = de.x, C = de.y, v = g(de.x) > g(de.y) ? de.x : de.y, K = ge(se, G), n.lastInterval = r;
973
+ var i = n.lastInterval || r, h = r.timeStamp - i.timeStamp, m, E, N, Q;
974
+ if (r.eventType != z && (h > B || i.velocity === a)) {
975
+ var se = r.deltaX - i.deltaX, G = r.deltaY - i.deltaY, de = Fe(h, se, G);
976
+ E = de.x, N = de.y, m = g(de.x) > g(de.y) ? de.x : de.y, Q = ge(se, G), n.lastInterval = r;
977
977
  } else
978
- v = a.velocity, b = a.velocityX, C = a.velocityY, K = a.direction;
979
- r.velocity = v, r.velocityX = b, r.velocityY = C, r.direction = K;
980
- }
981
- function q(n) {
982
- for (var r = [], a = 0; a < n.pointers.length; )
983
- r[a] = {
984
- clientX: c(n.pointers[a].clientX),
985
- clientY: c(n.pointers[a].clientY)
986
- }, a++;
978
+ m = i.velocity, E = i.velocityX, N = i.velocityY, Q = i.direction;
979
+ r.velocity = m, r.velocityX = E, r.velocityY = N, r.direction = Q;
980
+ }
981
+ function K(n) {
982
+ for (var r = [], i = 0; i < n.pointers.length; )
983
+ r[i] = {
984
+ clientX: l(n.pointers[i].clientX),
985
+ clientY: l(n.pointers[i].clientY)
986
+ }, i++;
987
987
  return {
988
988
  timeStamp: d(),
989
989
  pointers: r,
@@ -996,57 +996,57 @@ var bt = function(p, o, e, i) {
996
996
  var r = n.length;
997
997
  if (r === 1)
998
998
  return {
999
- x: c(n[0].clientX),
1000
- y: c(n[0].clientY)
999
+ x: l(n[0].clientX),
1000
+ y: l(n[0].clientY)
1001
1001
  };
1002
- for (var a = 0, u = 0, v = 0; v < r; )
1003
- a += n[v].clientX, u += n[v].clientY, v++;
1002
+ for (var i = 0, h = 0, m = 0; m < r; )
1003
+ i += n[m].clientX, h += n[m].clientY, m++;
1004
1004
  return {
1005
- x: c(a / r),
1006
- y: c(u / r)
1005
+ x: l(i / r),
1006
+ y: l(h / r)
1007
1007
  };
1008
1008
  }
1009
- function Fe(n, r, a) {
1009
+ function Fe(n, r, i) {
1010
1010
  return {
1011
1011
  x: r / n || 0,
1012
- y: a / n || 0
1012
+ y: i / n || 0
1013
1013
  };
1014
1014
  }
1015
1015
  function ge(n, r) {
1016
- return n === r ? _e : g(n) >= g(r) ? n < 0 ? Ee : Ce : r < 0 ? Ne : Pe;
1016
+ return n === r ? Oe : g(n) >= g(r) ? n < 0 ? Ee : _e : r < 0 ? Se : Pe;
1017
1017
  }
1018
- function We(n, r, a) {
1019
- a || (a = Re);
1020
- var u = r[a[0]] - n[a[0]], v = r[a[1]] - n[a[1]];
1021
- return Math.sqrt(u * u + v * v);
1018
+ function Qe(n, r, i) {
1019
+ i || (i = Re);
1020
+ var h = r[i[0]] - n[i[0]], m = r[i[1]] - n[i[1]];
1021
+ return Math.sqrt(h * h + m * m);
1022
1022
  }
1023
- function ct(n, r, a) {
1024
- a || (a = Re);
1025
- var u = r[a[0]] - n[a[0]], v = r[a[1]] - n[a[1]];
1026
- return Math.atan2(v, u) * 180 / Math.PI;
1023
+ function ct(n, r, i) {
1024
+ i || (i = Re);
1025
+ var h = r[i[0]] - n[i[0]], m = r[i[1]] - n[i[1]];
1026
+ return Math.atan2(m, h) * 180 / Math.PI;
1027
1027
  }
1028
- function zt(n, r) {
1028
+ function Gt(n, r) {
1029
1029
  return ct(r[1], r[0], Ie) + ct(n[1], n[0], Ie);
1030
1030
  }
1031
- function Xt(n, r) {
1032
- return We(r[0], r[1], Ie) / We(n[0], n[1], Ie);
1031
+ function Wt(n, r) {
1032
+ return Qe(r[0], r[1], Ie) / Qe(n[0], n[1], Ie);
1033
1033
  }
1034
- var Gt = {
1035
- mousedown: I,
1036
- mousemove: J,
1037
- mouseup: H
1038
- }, Wt = "mousedown", qt = "mousemove mouseup";
1039
- function qe() {
1040
- this.evEl = Wt, this.evWin = qt, this.pressed = !1, re.apply(this, arguments);
1034
+ var qt = {
1035
+ mousedown: L,
1036
+ mousemove: $,
1037
+ mouseup: j
1038
+ }, Kt = "mousedown", Zt = "mousemove mouseup";
1039
+ function Je() {
1040
+ this.evEl = Kt, this.evWin = Zt, this.pressed = !1, ae.apply(this, arguments);
1041
1041
  }
1042
- y(qe, re, {
1042
+ y(Je, ae, {
1043
1043
  /**
1044
1044
  * handle mouse events
1045
1045
  * @param {Object} ev
1046
1046
  */
1047
1047
  handler: function(r) {
1048
- var a = Gt[r.type];
1049
- a & I && (r.button === 0 || r.button === 2) && (this.pressed = !0), a & J && r.which !== 1 && (a = H), this.pressed && (a & H && (this.pressed = !1), this.callback(this.manager, a, {
1048
+ var i = qt[r.type];
1049
+ i & L && (r.button === 0 || r.button === 2) && (this.pressed = !0), i & $ && r.which !== 1 && (i = j), this.pressed && (i & j && (this.pressed = !1), this.callback(this.manager, i, {
1050
1050
  pointers: [r],
1051
1051
  changedPointers: [r],
1052
1052
  pointerType: W,
@@ -1054,125 +1054,125 @@ var bt = function(p, o, e, i) {
1054
1054
  }));
1055
1055
  }
1056
1056
  });
1057
- var Pt = {
1058
- pointerdown: I,
1059
- pointermove: J,
1060
- pointerup: H,
1057
+ var xt = {
1058
+ pointerdown: L,
1059
+ pointermove: $,
1060
+ pointerup: j,
1061
1061
  pointercancel: z,
1062
1062
  pointerout: z
1063
- }, Zt = {
1064
- 2: j,
1065
- 3: F,
1063
+ }, Qt = {
1064
+ 2: H,
1065
+ 3: U,
1066
1066
  4: W,
1067
- 5: B
1067
+ 5: V
1068
1068
  // see https://twitter.com/jacobrossi/status/480596438489890816
1069
- }, Mt = "pointerdown", Ot = "pointermove pointerup pointercancel";
1070
- p.MSPointerEvent && !p.PointerEvent && (Mt = "MSPointerDown", Ot = "MSPointerMove MSPointerUp MSPointerCancel");
1069
+ }, At = "pointerdown", Mt = "pointermove pointerup pointercancel";
1070
+ f.MSPointerEvent && !f.PointerEvent && (At = "MSPointerDown", Mt = "MSPointerMove MSPointerUp MSPointerCancel");
1071
1071
  function ut() {
1072
- this.evEl = Mt, this.evWin = Ot, re.apply(this, arguments), this.store = this.manager.session.pointerEvents = [];
1072
+ this.evEl = At, this.evWin = Mt, ae.apply(this, arguments), this.store = this.manager.session.pointerEvents = [];
1073
1073
  }
1074
- y(ut, re, {
1074
+ y(ut, ae, {
1075
1075
  /**
1076
1076
  * handle mouse events
1077
1077
  * @param {Object} ev
1078
1078
  */
1079
1079
  handler: function(r) {
1080
- var a = this.store, u = !1, v = !1, b = r.type.toLowerCase().replace("ms", ""), C = Pt[b], K = Zt[r.pointerType] || r.pointerType, se = K == j, G = le(a, r.pointerId, "pointerId");
1081
- C & I && (r.button === 0 || r.button === 2 || se) ? G < 0 && (a.push(r), G = a.length - 1) : C & (H | z) ? u = !0 : !se && r.buttons === 0 && (u = !0, v = !0, C = Pt.pointerup), !(G < 0) && (v || (a[G] = r), this.callback(this.manager, C, {
1082
- pointers: a,
1080
+ var i = this.store, h = !1, m = !1, E = r.type.toLowerCase().replace("ms", ""), N = xt[E], Q = Qt[r.pointerType] || r.pointerType, se = Q == H, G = le(i, r.pointerId, "pointerId");
1081
+ N & L && (r.button === 0 || r.button === 2 || se) ? G < 0 && (i.push(r), G = i.length - 1) : N & (j | z) ? h = !0 : !se && r.buttons === 0 && (h = !0, m = !0, N = xt.pointerup), !(G < 0) && (m || (i[G] = r), this.callback(this.manager, N, {
1082
+ pointers: i,
1083
1083
  changedPointers: [r],
1084
- pointerType: K,
1085
- srcEvent: a[G]
1086
- }), u && a.splice(G, 1));
1084
+ pointerType: Q,
1085
+ srcEvent: i[G]
1086
+ }), h && i.splice(G, 1));
1087
1087
  }
1088
1088
  });
1089
- var Kt = {
1090
- touchstart: I,
1091
- touchmove: J,
1092
- touchend: H,
1089
+ var Jt = {
1090
+ touchstart: L,
1091
+ touchmove: $,
1092
+ touchend: j,
1093
1093
  touchcancel: z
1094
- }, Qt = "touchstart", Jt = "touchstart touchmove touchend touchcancel";
1095
- function At() {
1096
- this.evTarget = Qt, this.evWin = Jt, this.started = !1, re.apply(this, arguments);
1094
+ }, $t = "touchstart", en = "touchstart touchmove touchend touchcancel";
1095
+ function Ct() {
1096
+ this.evTarget = $t, this.evWin = en, this.started = !1, ae.apply(this, arguments);
1097
1097
  }
1098
- y(At, re, {
1098
+ y(Ct, ae, {
1099
1099
  handler: function(r) {
1100
- var a = Kt[r.type];
1101
- if (a === I && (this.started = !0), !!this.started) {
1102
- var u = $t.call(this, r, a);
1103
- a & (H | z) && u[0].length - u[1].length === 0 && (this.started = !1), this.callback(this.manager, a, {
1104
- pointers: u[0],
1105
- changedPointers: u[1],
1106
- pointerType: j,
1100
+ var i = Jt[r.type];
1101
+ if (i === L && (this.started = !0), !!this.started) {
1102
+ var h = tn.call(this, r, i);
1103
+ i & (j | z) && h[0].length - h[1].length === 0 && (this.started = !1), this.callback(this.manager, i, {
1104
+ pointers: h[0],
1105
+ changedPointers: h[1],
1106
+ pointerType: H,
1107
1107
  srcEvent: r
1108
1108
  });
1109
1109
  }
1110
1110
  }
1111
1111
  });
1112
- function $t(n, r) {
1113
- var a = me(n.touches), u = me(n.changedTouches);
1114
- return r & (H | z) && (a = xe(a.concat(u), "identifier")), [a, u];
1115
- }
1116
- var en = {
1117
- touchstart: I,
1118
- touchmove: J,
1119
- touchend: H,
1112
+ function tn(n, r) {
1113
+ var i = me(n.touches), h = me(n.changedTouches);
1114
+ return r & (j | z) && (i = Ce(i.concat(h), "identifier")), [i, h];
1115
+ }
1116
+ var nn = {
1117
+ touchstart: L,
1118
+ touchmove: $,
1119
+ touchend: j,
1120
1120
  touchcancel: z
1121
- }, tn = "touchstart touchmove touchend touchcancel";
1122
- function Ze() {
1123
- this.evTarget = tn, this.targetIds = {}, re.apply(this, arguments);
1121
+ }, rn = "touchstart touchmove touchend touchcancel";
1122
+ function $e() {
1123
+ this.evTarget = rn, this.targetIds = {}, ae.apply(this, arguments);
1124
1124
  }
1125
- y(Ze, re, {
1125
+ y($e, ae, {
1126
1126
  handler: function(r) {
1127
- var a = en[r.type], u = nn.call(this, r, a);
1128
- u && this.callback(this.manager, a, {
1129
- pointers: u[0],
1130
- changedPointers: u[1],
1131
- pointerType: j,
1127
+ var i = nn[r.type], h = an.call(this, r, i);
1128
+ h && this.callback(this.manager, i, {
1129
+ pointers: h[0],
1130
+ changedPointers: h[1],
1131
+ pointerType: H,
1132
1132
  srcEvent: r
1133
1133
  });
1134
1134
  }
1135
1135
  });
1136
- function nn(n, r) {
1137
- var a = me(n.touches), u = this.targetIds;
1138
- if (r & (I | J) && a.length === 1)
1139
- return u[a[0].identifier] = !0, [a, a];
1140
- var v, b, C = me(n.changedTouches), K = [], se = this.target;
1141
- if (b = a.filter(function(G) {
1142
- return $(G.target, se);
1143
- }), r === I)
1144
- for (v = 0; v < b.length; )
1145
- u[b[v].identifier] = !0, v++;
1146
- for (v = 0; v < C.length; )
1147
- u[C[v].identifier] && K.push(C[v]), r & (H | z) && delete u[C[v].identifier], v++;
1148
- if (K.length)
1136
+ function an(n, r) {
1137
+ var i = me(n.touches), h = this.targetIds;
1138
+ if (r & (L | $) && i.length === 1)
1139
+ return h[i[0].identifier] = !0, [i, i];
1140
+ var m, E, N = me(n.changedTouches), Q = [], se = this.target;
1141
+ if (E = i.filter(function(G) {
1142
+ return ee(G.target, se);
1143
+ }), r === L)
1144
+ for (m = 0; m < E.length; )
1145
+ h[E[m].identifier] = !0, m++;
1146
+ for (m = 0; m < N.length; )
1147
+ h[N[m].identifier] && Q.push(N[m]), r & (j | z) && delete h[N[m].identifier], m++;
1148
+ if (Q.length)
1149
1149
  return [
1150
1150
  // merge targetTouches with changedTargetTouches so it contains ALL touches, including 'end' and 'cancel'
1151
- xe(b.concat(K), "identifier"),
1152
- K
1151
+ Ce(E.concat(Q), "identifier"),
1152
+ Q
1153
1153
  ];
1154
1154
  }
1155
- var rn = 2500, xt = 25;
1155
+ var on = 2500, Ot = 25;
1156
1156
  function ht() {
1157
- re.apply(this, arguments);
1158
- var n = T(this.handler, this);
1159
- this.touch = new Ze(this.manager, n), this.mouse = new qe(this.manager, n), this.primaryTouch = null, this.lastTouches = [];
1157
+ ae.apply(this, arguments);
1158
+ var n = b(this.handler, this);
1159
+ this.touch = new $e(this.manager, n), this.mouse = new Je(this.manager, n), this.primaryTouch = null, this.lastTouches = [];
1160
1160
  }
1161
- y(ht, re, {
1161
+ y(ht, ae, {
1162
1162
  /**
1163
1163
  * handle mouse and touch events
1164
1164
  * @param {Hammer} manager
1165
1165
  * @param {String} inputEvent
1166
1166
  * @param {Object} inputData
1167
1167
  */
1168
- handler: function(r, a, u) {
1169
- var v = u.pointerType == j, b = u.pointerType == W;
1170
- if (!(b && u.sourceCapabilities && u.sourceCapabilities.firesTouchEvents)) {
1171
- if (v)
1172
- an.call(this, a, u);
1173
- else if (b && on.call(this, u))
1168
+ handler: function(r, i, h) {
1169
+ var m = h.pointerType == H, E = h.pointerType == W;
1170
+ if (!(E && h.sourceCapabilities && h.sourceCapabilities.firesTouchEvents)) {
1171
+ if (m)
1172
+ sn.call(this, i, h);
1173
+ else if (E && ln.call(this, h))
1174
1174
  return;
1175
- this.callback(r, a, u);
1175
+ this.callback(r, i, h);
1176
1176
  }
1177
1177
  },
1178
1178
  /**
@@ -1182,30 +1182,30 @@ var bt = function(p, o, e, i) {
1182
1182
  this.touch.destroy(), this.mouse.destroy();
1183
1183
  }
1184
1184
  });
1185
- function an(n, r) {
1186
- n & I ? (this.primaryTouch = r.changedPointers[0].identifier, _t.call(this, r)) : n & (H | z) && _t.call(this, r);
1185
+ function sn(n, r) {
1186
+ n & L ? (this.primaryTouch = r.changedPointers[0].identifier, _t.call(this, r)) : n & (j | z) && _t.call(this, r);
1187
1187
  }
1188
1188
  function _t(n) {
1189
1189
  var r = n.changedPointers[0];
1190
1190
  if (r.identifier === this.primaryTouch) {
1191
- var a = { x: r.clientX, y: r.clientY };
1192
- this.lastTouches.push(a);
1193
- var u = this.lastTouches, v = function() {
1194
- var b = u.indexOf(a);
1195
- b > -1 && u.splice(b, 1);
1191
+ var i = { x: r.clientX, y: r.clientY };
1192
+ this.lastTouches.push(i);
1193
+ var h = this.lastTouches, m = function() {
1194
+ var E = h.indexOf(i);
1195
+ E > -1 && h.splice(E, 1);
1196
1196
  };
1197
- setTimeout(v, rn);
1197
+ setTimeout(m, on);
1198
1198
  }
1199
1199
  }
1200
- function on(n) {
1201
- for (var r = n.srcEvent.clientX, a = n.srcEvent.clientY, u = 0; u < this.lastTouches.length; u++) {
1202
- var v = this.lastTouches[u], b = Math.abs(r - v.x), C = Math.abs(a - v.y);
1203
- if (b <= xt && C <= xt)
1200
+ function ln(n) {
1201
+ for (var r = n.srcEvent.clientX, i = n.srcEvent.clientY, h = 0; h < this.lastTouches.length; h++) {
1202
+ var m = this.lastTouches[h], E = Math.abs(r - m.x), N = Math.abs(i - m.y);
1203
+ if (E <= Ot && N <= Ot)
1204
1204
  return !0;
1205
1205
  }
1206
1206
  return !1;
1207
1207
  }
1208
- var Ct = l ? ne(l.style, "touchAction") : i, Nt = Ct !== i, It = "compute", St = "auto", ft = "manipulation", Se = "none", Ue = "pan-x", Be = "pan-y", Ke = ln();
1208
+ var St = s ? re(s.style, "touchAction") : a, It = St !== a, Nt = "compute", kt = "auto", ft = "manipulation", Ne = "none", Ue = "pan-x", Be = "pan-y", et = un();
1209
1209
  function pt(n, r) {
1210
1210
  this.manager = n, this.set(r);
1211
1211
  }
@@ -1215,7 +1215,7 @@ var bt = function(p, o, e, i) {
1215
1215
  * @param {String} value
1216
1216
  */
1217
1217
  set: function(n) {
1218
- n == It && (n = this.compute()), Nt && this.manager.element.style && Ke[n] && (this.manager.element.style[Ct] = n), this.actions = n.toLowerCase().trim();
1218
+ n == Nt && (n = this.compute()), It && this.manager.element.style && et[n] && (this.manager.element.style[St] = n), this.actions = n.toLowerCase().trim();
1219
1219
  },
1220
1220
  /**
1221
1221
  * just re-set the touchAction value
@@ -1229,27 +1229,27 @@ var bt = function(p, o, e, i) {
1229
1229
  */
1230
1230
  compute: function() {
1231
1231
  var n = [];
1232
- return O(this.manager.recognizers, function(r) {
1232
+ return A(this.manager.recognizers, function(r) {
1233
1233
  P(r.options.enable, [r]) && (n = n.concat(r.getTouchAction()));
1234
- }), sn(n.join(" "));
1234
+ }), cn(n.join(" "));
1235
1235
  },
1236
1236
  /**
1237
1237
  * this method is called on each input cycle and provides the preventing of the browser behavior
1238
1238
  * @param {Object} input
1239
1239
  */
1240
1240
  preventDefaults: function(n) {
1241
- var r = n.srcEvent, a = n.offsetDirection;
1241
+ var r = n.srcEvent, i = n.offsetDirection;
1242
1242
  if (this.manager.session.prevented) {
1243
1243
  r.preventDefault();
1244
1244
  return;
1245
1245
  }
1246
- var u = this.actions, v = Z(u, Se) && !Ke[Se], b = Z(u, Be) && !Ke[Be], C = Z(u, Ue) && !Ke[Ue];
1247
- if (v) {
1248
- var K = n.pointers.length === 1, se = n.distance < 2, G = n.deltaTime < 250;
1249
- if (K && se && G)
1246
+ var h = this.actions, m = Z(h, Ne) && !et[Ne], E = Z(h, Be) && !et[Be], N = Z(h, Ue) && !et[Ue];
1247
+ if (m) {
1248
+ var Q = n.pointers.length === 1, se = n.distance < 2, G = n.deltaTime < 250;
1249
+ if (Q && se && G)
1250
1250
  return;
1251
1251
  }
1252
- if (!(C && b) && (v || b && a & oe || C && a & ue))
1252
+ if (!(N && E) && (m || E && i & oe || N && i & ue))
1253
1253
  return this.preventSrc(r);
1254
1254
  },
1255
1255
  /**
@@ -1260,25 +1260,25 @@ var bt = function(p, o, e, i) {
1260
1260
  this.manager.session.prevented = !0, n.preventDefault();
1261
1261
  }
1262
1262
  };
1263
- function sn(n) {
1264
- if (Z(n, Se))
1265
- return Se;
1266
- var r = Z(n, Ue), a = Z(n, Be);
1267
- return r && a ? Se : r || a ? r ? Ue : Be : Z(n, ft) ? ft : St;
1268
- }
1269
- function ln() {
1270
- if (!Nt)
1263
+ function cn(n) {
1264
+ if (Z(n, Ne))
1265
+ return Ne;
1266
+ var r = Z(n, Ue), i = Z(n, Be);
1267
+ return r && i ? Ne : r || i ? r ? Ue : Be : Z(n, ft) ? ft : kt;
1268
+ }
1269
+ function un() {
1270
+ if (!It)
1271
1271
  return !1;
1272
- var n = {}, r = p.CSS && p.CSS.supports;
1273
- return ["auto", "manipulation", "pan-y", "pan-x", "pan-x pan-y", "none"].forEach(function(a) {
1274
- n[a] = r ? p.CSS.supports("touch-action", a) : !0;
1272
+ var n = {}, r = f.CSS && f.CSS.supports;
1273
+ return ["auto", "manipulation", "pan-y", "pan-x", "pan-x pan-y", "none"].forEach(function(i) {
1274
+ n[i] = r ? f.CSS.supports("touch-action", i) : !0;
1275
1275
  }), n;
1276
1276
  }
1277
- var Qe = 1, ce = 2, ke = 4, Me = 8, ye = Me, Ve = 16, pe = 32;
1278
- function Te(n) {
1279
- this.options = A({}, this.defaults, n || {}), this.id = D(), this.manager = null, this.options.enable = f(this.options.enable, !0), this.state = Qe, this.simultaneous = {}, this.requireFail = [];
1277
+ var tt = 1, ce = 2, ke = 4, xe = 8, ye = xe, Ve = 16, pe = 32;
1278
+ function be(n) {
1279
+ this.options = M({}, this.defaults, n || {}), this.id = R(), this.manager = null, this.options.enable = p(this.options.enable, !0), this.state = tt, this.simultaneous = {}, this.requireFail = [];
1280
1280
  }
1281
- Te.prototype = {
1281
+ be.prototype = {
1282
1282
  /**
1283
1283
  * @virtual
1284
1284
  * @type {Object}
@@ -1290,7 +1290,7 @@ var bt = function(p, o, e, i) {
1290
1290
  * @return {Recognizer}
1291
1291
  */
1292
1292
  set: function(n) {
1293
- return A(this.options, n), this.manager && this.manager.touchAction.update(), this;
1293
+ return M(this.options, n), this.manager && this.manager.touchAction.update(), this;
1294
1294
  },
1295
1295
  /**
1296
1296
  * recognize simultaneous with an other recognizer.
@@ -1298,10 +1298,10 @@ var bt = function(p, o, e, i) {
1298
1298
  * @returns {Recognizer} this
1299
1299
  */
1300
1300
  recognizeWith: function(n) {
1301
- if (E(n, "recognizeWith", this))
1301
+ if (T(n, "recognizeWith", this))
1302
1302
  return this;
1303
1303
  var r = this.simultaneous;
1304
- return n = Je(n, this), r[n.id] || (r[n.id] = n, n.recognizeWith(this)), this;
1304
+ return n = nt(n, this), r[n.id] || (r[n.id] = n, n.recognizeWith(this)), this;
1305
1305
  },
1306
1306
  /**
1307
1307
  * drop the simultaneous link. it doesnt remove the link on the other recognizer.
@@ -1309,7 +1309,7 @@ var bt = function(p, o, e, i) {
1309
1309
  * @returns {Recognizer} this
1310
1310
  */
1311
1311
  dropRecognizeWith: function(n) {
1312
- return E(n, "dropRecognizeWith", this) ? this : (n = Je(n, this), delete this.simultaneous[n.id], this);
1312
+ return T(n, "dropRecognizeWith", this) ? this : (n = nt(n, this), delete this.simultaneous[n.id], this);
1313
1313
  },
1314
1314
  /**
1315
1315
  * recognizer can only run when an other is failing
@@ -1317,10 +1317,10 @@ var bt = function(p, o, e, i) {
1317
1317
  * @returns {Recognizer} this
1318
1318
  */
1319
1319
  requireFailure: function(n) {
1320
- if (E(n, "requireFailure", this))
1320
+ if (T(n, "requireFailure", this))
1321
1321
  return this;
1322
1322
  var r = this.requireFail;
1323
- return n = Je(n, this), le(r, n) === -1 && (r.push(n), n.requireFailure(this)), this;
1323
+ return n = nt(n, this), le(r, n) === -1 && (r.push(n), n.requireFailure(this)), this;
1324
1324
  },
1325
1325
  /**
1326
1326
  * drop the requireFailure link. it does not remove the link on the other recognizer.
@@ -1328,9 +1328,9 @@ var bt = function(p, o, e, i) {
1328
1328
  * @returns {Recognizer} this
1329
1329
  */
1330
1330
  dropRequireFailure: function(n) {
1331
- if (E(n, "dropRequireFailure", this))
1331
+ if (T(n, "dropRequireFailure", this))
1332
1332
  return this;
1333
- n = Je(n, this);
1333
+ n = nt(n, this);
1334
1334
  var r = le(this.requireFail, n);
1335
1335
  return r > -1 && this.requireFail.splice(r, 1), this;
1336
1336
  },
@@ -1355,11 +1355,11 @@ var bt = function(p, o, e, i) {
1355
1355
  * @param {Object} input
1356
1356
  */
1357
1357
  emit: function(n) {
1358
- var r = this, a = this.state;
1359
- function u(v) {
1360
- r.manager.emit(v, n);
1358
+ var r = this, i = this.state;
1359
+ function h(m) {
1360
+ r.manager.emit(m, n);
1361
1361
  }
1362
- a < Me && u(r.options.event + kt(a)), u(r.options.event), n.additionalEvent && u(n.additionalEvent), a >= Me && u(r.options.event + kt(a));
1362
+ i < xe && h(r.options.event + Lt(i)), h(r.options.event), n.additionalEvent && h(n.additionalEvent), i >= xe && h(r.options.event + Lt(i));
1363
1363
  },
1364
1364
  /**
1365
1365
  * Check that all the require failure recognizers has failed,
@@ -1378,7 +1378,7 @@ var bt = function(p, o, e, i) {
1378
1378
  */
1379
1379
  canEmit: function() {
1380
1380
  for (var n = 0; n < this.requireFail.length; ) {
1381
- if (!(this.requireFail[n].state & (pe | Qe)))
1381
+ if (!(this.requireFail[n].state & (pe | tt)))
1382
1382
  return !1;
1383
1383
  n++;
1384
1384
  }
@@ -1389,12 +1389,12 @@ var bt = function(p, o, e, i) {
1389
1389
  * @param {Object} inputData
1390
1390
  */
1391
1391
  recognize: function(n) {
1392
- var r = A({}, n);
1392
+ var r = M({}, n);
1393
1393
  if (!P(this.options.enable, [this, r])) {
1394
1394
  this.reset(), this.state = pe;
1395
1395
  return;
1396
1396
  }
1397
- this.state & (ye | Ve | pe) && (this.state = Qe), this.state = this.process(r), this.state & (ce | ke | Me | Ve) && this.tryEmit(r);
1397
+ this.state & (ye | Ve | pe) && (this.state = tt), this.state = this.process(r), this.state & (ce | ke | xe | Ve) && this.tryEmit(r);
1398
1398
  },
1399
1399
  /**
1400
1400
  * return the state of the recognizer
@@ -1421,20 +1421,20 @@ var bt = function(p, o, e, i) {
1421
1421
  reset: function() {
1422
1422
  }
1423
1423
  };
1424
- function kt(n) {
1425
- return n & Ve ? "cancel" : n & Me ? "end" : n & ke ? "move" : n & ce ? "start" : "";
1426
- }
1427
1424
  function Lt(n) {
1428
- return n == Pe ? "down" : n == Ne ? "up" : n == Ee ? "left" : n == Ce ? "right" : "";
1425
+ return n & Ve ? "cancel" : n & xe ? "end" : n & ke ? "move" : n & ce ? "start" : "";
1429
1426
  }
1430
- function Je(n, r) {
1431
- var a = r.manager;
1432
- return a ? a.get(n) : n;
1427
+ function Dt(n) {
1428
+ return n == Pe ? "down" : n == Se ? "up" : n == Ee ? "left" : n == _e ? "right" : "";
1429
+ }
1430
+ function nt(n, r) {
1431
+ var i = r.manager;
1432
+ return i ? i.get(n) : n;
1433
1433
  }
1434
1434
  function he() {
1435
- Te.apply(this, arguments);
1435
+ be.apply(this, arguments);
1436
1436
  }
1437
- y(he, Te, {
1437
+ y(he, be, {
1438
1438
  /**
1439
1439
  * @namespace
1440
1440
  * @memberof AttrRecognizer
@@ -1463,14 +1463,14 @@ var bt = function(p, o, e, i) {
1463
1463
  * @returns {*} State
1464
1464
  */
1465
1465
  process: function(n) {
1466
- var r = this.state, a = n.eventType, u = r & (ce | ke), v = this.attrTest(n);
1467
- return u && (a & z || !v) ? r | Ve : u || v ? a & H ? r | Me : r & ce ? r | ke : ce : pe;
1466
+ var r = this.state, i = n.eventType, h = r & (ce | ke), m = this.attrTest(n);
1467
+ return h && (i & z || !m) ? r | Ve : h || m ? i & j ? r | xe : r & ce ? r | ke : ce : pe;
1468
1468
  }
1469
1469
  });
1470
- function $e() {
1470
+ function rt() {
1471
1471
  he.apply(this, arguments), this.pX = null, this.pY = null;
1472
1472
  }
1473
- y($e, he, {
1473
+ y(rt, he, {
1474
1474
  /**
1475
1475
  * @namespace
1476
1476
  * @memberof PanRecognizer
@@ -1486,15 +1486,15 @@ var bt = function(p, o, e, i) {
1486
1486
  return n & oe && r.push(Be), n & ue && r.push(Ue), r;
1487
1487
  },
1488
1488
  directionTest: function(n) {
1489
- var r = this.options, a = !0, u = n.distance, v = n.direction, b = n.deltaX, C = n.deltaY;
1490
- return v & r.direction || (r.direction & oe ? (v = b === 0 ? _e : b < 0 ? Ee : Ce, a = b != this.pX, u = Math.abs(n.deltaX)) : (v = C === 0 ? _e : C < 0 ? Ne : Pe, a = C != this.pY, u = Math.abs(n.deltaY))), n.direction = v, a && u > r.threshold && v & r.direction;
1489
+ var r = this.options, i = !0, h = n.distance, m = n.direction, E = n.deltaX, N = n.deltaY;
1490
+ return m & r.direction || (r.direction & oe ? (m = E === 0 ? Oe : E < 0 ? Ee : _e, i = E != this.pX, h = Math.abs(n.deltaX)) : (m = N === 0 ? Oe : N < 0 ? Se : Pe, i = N != this.pY, h = Math.abs(n.deltaY))), n.direction = m, i && h > r.threshold && m & r.direction;
1491
1491
  },
1492
1492
  attrTest: function(n) {
1493
1493
  return he.prototype.attrTest.call(this, n) && (this.state & ce || !(this.state & ce) && this.directionTest(n));
1494
1494
  },
1495
1495
  emit: function(n) {
1496
1496
  this.pX = n.deltaX, this.pY = n.deltaY;
1497
- var r = Lt(n.direction);
1497
+ var r = Dt(n.direction);
1498
1498
  r && (n.additionalEvent = this.options.event + r), this._super.emit.call(this, n);
1499
1499
  }
1500
1500
  });
@@ -1512,7 +1512,7 @@ var bt = function(p, o, e, i) {
1512
1512
  pointers: 2
1513
1513
  },
1514
1514
  getTouchAction: function() {
1515
- return [Se];
1515
+ return [Ne];
1516
1516
  },
1517
1517
  attrTest: function(n) {
1518
1518
  return this._super.attrTest.call(this, n) && (Math.abs(n.scale - 1) > this.options.threshold || this.state & ce);
@@ -1526,9 +1526,9 @@ var bt = function(p, o, e, i) {
1526
1526
  }
1527
1527
  });
1528
1528
  function vt() {
1529
- Te.apply(this, arguments), this._timer = null, this._input = null;
1529
+ be.apply(this, arguments), this._timer = null, this._input = null;
1530
1530
  }
1531
- y(vt, Te, {
1531
+ y(vt, be, {
1532
1532
  /**
1533
1533
  * @namespace
1534
1534
  * @memberof PressRecognizer
@@ -1542,17 +1542,17 @@ var bt = function(p, o, e, i) {
1542
1542
  // a minimal movement is ok, but keep it low
1543
1543
  },
1544
1544
  getTouchAction: function() {
1545
- return [St];
1545
+ return [kt];
1546
1546
  },
1547
1547
  process: function(n) {
1548
- var r = this.options, a = n.pointers.length === r.pointers, u = n.distance < r.threshold, v = n.deltaTime > r.time;
1549
- if (this._input = n, !u || !a || n.eventType & (H | z) && !v)
1548
+ var r = this.options, i = n.pointers.length === r.pointers, h = n.distance < r.threshold, m = n.deltaTime > r.time;
1549
+ if (this._input = n, !h || !i || n.eventType & (j | z) && !m)
1550
1550
  this.reset();
1551
- else if (n.eventType & I)
1552
- this.reset(), this._timer = m(function() {
1551
+ else if (n.eventType & L)
1552
+ this.reset(), this._timer = v(function() {
1553
1553
  this.state = ye, this.tryEmit();
1554
1554
  }, r.time, this);
1555
- else if (n.eventType & H)
1555
+ else if (n.eventType & j)
1556
1556
  return ye;
1557
1557
  return pe;
1558
1558
  },
@@ -1560,7 +1560,7 @@ var bt = function(p, o, e, i) {
1560
1560
  clearTimeout(this._timer);
1561
1561
  },
1562
1562
  emit: function(n) {
1563
- this.state === ye && (n && n.eventType & H ? this.manager.emit(this.options.event + "up", n) : (this._input.timeStamp = d(), this.manager.emit(this.options.event, this._input)));
1563
+ this.state === ye && (n && n.eventType & j ? this.manager.emit(this.options.event + "up", n) : (this._input.timeStamp = d(), this.manager.emit(this.options.event, this._input)));
1564
1564
  }
1565
1565
  });
1566
1566
  function mt() {
@@ -1577,7 +1577,7 @@ var bt = function(p, o, e, i) {
1577
1577
  pointers: 2
1578
1578
  },
1579
1579
  getTouchAction: function() {
1580
- return [Se];
1580
+ return [Ne];
1581
1581
  },
1582
1582
  attrTest: function(n) {
1583
1583
  return this._super.attrTest.call(this, n) && (Math.abs(n.rotation) > this.options.threshold || this.state & ce);
@@ -1599,21 +1599,21 @@ var bt = function(p, o, e, i) {
1599
1599
  pointers: 1
1600
1600
  },
1601
1601
  getTouchAction: function() {
1602
- return $e.prototype.getTouchAction.call(this);
1602
+ return rt.prototype.getTouchAction.call(this);
1603
1603
  },
1604
1604
  attrTest: function(n) {
1605
- var r = this.options.direction, a;
1606
- return r & (oe | ue) ? a = n.overallVelocity : r & oe ? a = n.overallVelocityX : r & ue && (a = n.overallVelocityY), this._super.attrTest.call(this, n) && r & n.offsetDirection && n.distance > this.options.threshold && n.maxPointers == this.options.pointers && g(a) > this.options.velocity && n.eventType & H;
1605
+ var r = this.options.direction, i;
1606
+ return r & (oe | ue) ? i = n.overallVelocity : r & oe ? i = n.overallVelocityX : r & ue && (i = n.overallVelocityY), this._super.attrTest.call(this, n) && r & n.offsetDirection && n.distance > this.options.threshold && n.maxPointers == this.options.pointers && g(i) > this.options.velocity && n.eventType & j;
1607
1607
  },
1608
1608
  emit: function(n) {
1609
- var r = Lt(n.offsetDirection);
1609
+ var r = Dt(n.offsetDirection);
1610
1610
  r && this.manager.emit(this.options.event + r, n), this.manager.emit(this.options.event, n);
1611
1611
  }
1612
1612
  });
1613
- function et() {
1614
- Te.apply(this, arguments), this.pTime = !1, this.pCenter = !1, this._timer = null, this._input = null, this.count = 0;
1613
+ function at() {
1614
+ be.apply(this, arguments), this.pTime = !1, this.pCenter = !1, this._timer = null, this._input = null, this.count = 0;
1615
1615
  }
1616
- y(et, Te, {
1616
+ y(at, be, {
1617
1617
  /**
1618
1618
  * @namespace
1619
1619
  * @memberof PinchRecognizer
@@ -1635,24 +1635,24 @@ var bt = function(p, o, e, i) {
1635
1635
  return [ft];
1636
1636
  },
1637
1637
  process: function(n) {
1638
- var r = this.options, a = n.pointers.length === r.pointers, u = n.distance < r.threshold, v = n.deltaTime < r.time;
1639
- if (this.reset(), n.eventType & I && this.count === 0)
1638
+ var r = this.options, i = n.pointers.length === r.pointers, h = n.distance < r.threshold, m = n.deltaTime < r.time;
1639
+ if (this.reset(), n.eventType & L && this.count === 0)
1640
1640
  return this.failTimeout();
1641
- if (u && v && a) {
1642
- if (n.eventType != H)
1641
+ if (h && m && i) {
1642
+ if (n.eventType != j)
1643
1643
  return this.failTimeout();
1644
- var b = this.pTime ? n.timeStamp - this.pTime < r.interval : !0, C = !this.pCenter || We(this.pCenter, n.center) < r.posThreshold;
1645
- this.pTime = n.timeStamp, this.pCenter = n.center, !C || !b ? this.count = 1 : this.count += 1, this._input = n;
1646
- var K = this.count % r.taps;
1647
- if (K === 0)
1648
- return this.hasRequireFailures() ? (this._timer = m(function() {
1644
+ var E = this.pTime ? n.timeStamp - this.pTime < r.interval : !0, N = !this.pCenter || Qe(this.pCenter, n.center) < r.posThreshold;
1645
+ this.pTime = n.timeStamp, this.pCenter = n.center, !N || !E ? this.count = 1 : this.count += 1, this._input = n;
1646
+ var Q = this.count % r.taps;
1647
+ if (Q === 0)
1648
+ return this.hasRequireFailures() ? (this._timer = v(function() {
1649
1649
  this.state = ye, this.tryEmit();
1650
1650
  }, r.interval, this), ce) : ye;
1651
1651
  }
1652
1652
  return pe;
1653
1653
  },
1654
1654
  failTimeout: function() {
1655
- return this._timer = m(function() {
1655
+ return this._timer = v(function() {
1656
1656
  this.state = pe;
1657
1657
  }, this.options.interval, this), pe;
1658
1658
  },
@@ -1664,7 +1664,7 @@ var bt = function(p, o, e, i) {
1664
1664
  }
1665
1665
  });
1666
1666
  function Le(n, r) {
1667
- return r = r || {}, r.recognizers = f(r.recognizers, Le.defaults.preset), new yt(n, r);
1667
+ return r = r || {}, r.recognizers = p(r.recognizers, Le.defaults.preset), new yt(n, r);
1668
1668
  }
1669
1669
  Le.VERSION = "2.0.7", Le.defaults = {
1670
1670
  /**
@@ -1680,7 +1680,7 @@ var bt = function(p, o, e, i) {
1680
1680
  * @type {String}
1681
1681
  * @default compute
1682
1682
  */
1683
- touchAction: It,
1683
+ touchAction: Nt,
1684
1684
  /**
1685
1685
  * @type {Boolean}
1686
1686
  * @default true
@@ -1710,9 +1710,9 @@ var bt = function(p, o, e, i) {
1710
1710
  [mt, { enable: !1 }],
1711
1711
  [dt, { enable: !1 }, ["rotate"]],
1712
1712
  [gt, { direction: oe }],
1713
- [$e, { direction: oe }, ["swipe"]],
1714
- [et],
1715
- [et, { event: "doubletap", taps: 2 }, ["tap"]],
1713
+ [rt, { direction: oe }, ["swipe"]],
1714
+ [at],
1715
+ [at, { event: "doubletap", taps: 2 }, ["tap"]],
1716
1716
  [vt]
1717
1717
  ],
1718
1718
  /**
@@ -1762,11 +1762,11 @@ var bt = function(p, o, e, i) {
1762
1762
  tapHighlightColor: "rgba(0,0,0,0)"
1763
1763
  }
1764
1764
  };
1765
- var cn = 1, Dt = 2;
1765
+ var hn = 1, Rt = 2;
1766
1766
  function yt(n, r) {
1767
- this.options = A({}, Le.defaults, r || {}), this.options.inputTarget = this.options.inputTarget || n, this.handlers = {}, this.session = {}, this.recognizers = [], this.oldCssProps = {}, this.element = n, this.input = Xe(this), this.touchAction = new pt(this, this.options.touchAction), Rt(this, !0), O(this.options.recognizers, function(a) {
1768
- var u = this.add(new a[0](a[1]));
1769
- a[2] && u.recognizeWith(a[2]), a[3] && u.requireFailure(a[3]);
1767
+ this.options = M({}, Le.defaults, r || {}), this.options.inputTarget = this.options.inputTarget || n, this.handlers = {}, this.session = {}, this.recognizers = [], this.oldCssProps = {}, this.element = n, this.input = Ke(this), this.touchAction = new pt(this, this.options.touchAction), Ft(this, !0), A(this.options.recognizers, function(i) {
1768
+ var h = this.add(new i[0](i[1]));
1769
+ i[2] && h.recognizeWith(i[2]), i[3] && h.requireFailure(i[3]);
1770
1770
  }, this);
1771
1771
  }
1772
1772
  yt.prototype = {
@@ -1776,7 +1776,7 @@ var bt = function(p, o, e, i) {
1776
1776
  * @returns {Manager}
1777
1777
  */
1778
1778
  set: function(n) {
1779
- return A(this.options, n), n.touchAction && this.touchAction.update(), n.inputTarget && (this.input.destroy(), this.input.target = n.inputTarget, this.input.init()), this;
1779
+ return M(this.options, n), n.touchAction && this.touchAction.update(), n.inputTarget && (this.input.destroy(), this.input.target = n.inputTarget, this.input.init()), this;
1780
1780
  },
1781
1781
  /**
1782
1782
  * stop recognizing for this session.
@@ -1785,7 +1785,7 @@ var bt = function(p, o, e, i) {
1785
1785
  * @param {Boolean} [force]
1786
1786
  */
1787
1787
  stop: function(n) {
1788
- this.session.stopped = n ? Dt : cn;
1788
+ this.session.stopped = n ? Rt : hn;
1789
1789
  },
1790
1790
  /**
1791
1791
  * run the recognizers!
@@ -1797,12 +1797,12 @@ var bt = function(p, o, e, i) {
1797
1797
  var r = this.session;
1798
1798
  if (!r.stopped) {
1799
1799
  this.touchAction.preventDefaults(n);
1800
- var a, u = this.recognizers, v = r.curRecognizer;
1801
- (!v || v && v.state & ye) && (v = r.curRecognizer = null);
1802
- for (var b = 0; b < u.length; )
1803
- a = u[b], r.stopped !== Dt && // 1
1804
- (!v || a == v || // 2
1805
- a.canRecognizeWith(v)) ? a.recognize(n) : a.reset(), !v && a.state & (ce | ke | Me) && (v = r.curRecognizer = a), b++;
1800
+ var i, h = this.recognizers, m = r.curRecognizer;
1801
+ (!m || m && m.state & ye) && (m = r.curRecognizer = null);
1802
+ for (var E = 0; E < h.length; )
1803
+ i = h[E], r.stopped !== Rt && // 1
1804
+ (!m || i == m || // 2
1805
+ i.canRecognizeWith(m)) ? i.recognize(n) : i.reset(), !m && i.state & (ce | ke | xe) && (m = r.curRecognizer = i), E++;
1806
1806
  }
1807
1807
  },
1808
1808
  /**
@@ -1811,11 +1811,11 @@ var bt = function(p, o, e, i) {
1811
1811
  * @returns {Recognizer|Null}
1812
1812
  */
1813
1813
  get: function(n) {
1814
- if (n instanceof Te)
1814
+ if (n instanceof be)
1815
1815
  return n;
1816
- for (var r = this.recognizers, a = 0; a < r.length; a++)
1817
- if (r[a].options.event == n)
1818
- return r[a];
1816
+ for (var r = this.recognizers, i = 0; i < r.length; i++)
1817
+ if (r[i].options.event == n)
1818
+ return r[i];
1819
1819
  return null;
1820
1820
  },
1821
1821
  /**
@@ -1825,7 +1825,7 @@ var bt = function(p, o, e, i) {
1825
1825
  * @returns {Recognizer|Manager}
1826
1826
  */
1827
1827
  add: function(n) {
1828
- if (E(n, "add", this))
1828
+ if (T(n, "add", this))
1829
1829
  return this;
1830
1830
  var r = this.get(n.options.event);
1831
1831
  return r && this.remove(r), this.recognizers.push(n), n.manager = this, this.touchAction.update(), n;
@@ -1836,11 +1836,11 @@ var bt = function(p, o, e, i) {
1836
1836
  * @returns {Manager}
1837
1837
  */
1838
1838
  remove: function(n) {
1839
- if (E(n, "remove", this))
1839
+ if (T(n, "remove", this))
1840
1840
  return this;
1841
1841
  if (n = this.get(n), n) {
1842
- var r = this.recognizers, a = le(r, n);
1843
- a !== -1 && (r.splice(a, 1), this.touchAction.update());
1842
+ var r = this.recognizers, i = le(r, n);
1843
+ i !== -1 && (r.splice(i, 1), this.touchAction.update());
1844
1844
  }
1845
1845
  return this;
1846
1846
  },
@@ -1851,10 +1851,10 @@ var bt = function(p, o, e, i) {
1851
1851
  * @returns {EventEmitter} this
1852
1852
  */
1853
1853
  on: function(n, r) {
1854
- if (n !== i && r !== i) {
1855
- var a = this.handlers;
1856
- return O(ee(n), function(u) {
1857
- a[u] = a[u] || [], a[u].push(r);
1854
+ if (n !== a && r !== a) {
1855
+ var i = this.handlers;
1856
+ return A(te(n), function(h) {
1857
+ i[h] = i[h] || [], i[h].push(r);
1858
1858
  }), this;
1859
1859
  }
1860
1860
  },
@@ -1865,10 +1865,10 @@ var bt = function(p, o, e, i) {
1865
1865
  * @returns {EventEmitter} this
1866
1866
  */
1867
1867
  off: function(n, r) {
1868
- if (n !== i) {
1869
- var a = this.handlers;
1870
- return O(ee(n), function(u) {
1871
- r ? a[u] && a[u].splice(le(a[u], r), 1) : delete a[u];
1868
+ if (n !== a) {
1869
+ var i = this.handlers;
1870
+ return A(te(n), function(h) {
1871
+ r ? i[h] && i[h].splice(le(i[h], r), 1) : delete i[h];
1872
1872
  }), this;
1873
1873
  }
1874
1874
  },
@@ -1878,14 +1878,14 @@ var bt = function(p, o, e, i) {
1878
1878
  * @param {Object} data
1879
1879
  */
1880
1880
  emit: function(n, r) {
1881
- this.options.domEvents && un(n, r);
1882
- var a = this.handlers[n] && this.handlers[n].slice();
1883
- if (!(!a || !a.length)) {
1881
+ this.options.domEvents && fn(n, r);
1882
+ var i = this.handlers[n] && this.handlers[n].slice();
1883
+ if (!(!i || !i.length)) {
1884
1884
  r.type = n, r.preventDefault = function() {
1885
1885
  r.srcEvent.preventDefault();
1886
1886
  };
1887
- for (var u = 0; u < a.length; )
1888
- a[u](r), u++;
1887
+ for (var h = 0; h < i.length; )
1888
+ i[h](r), h++;
1889
1889
  }
1890
1890
  },
1891
1891
  /**
@@ -1893,87 +1893,87 @@ var bt = function(p, o, e, i) {
1893
1893
  * it doesn't unbind dom events, that is the user own responsibility
1894
1894
  */
1895
1895
  destroy: function() {
1896
- this.element && Rt(this, !1), this.handlers = {}, this.session = {}, this.input.destroy(), this.element = null;
1896
+ this.element && Ft(this, !1), this.handlers = {}, this.session = {}, this.input.destroy(), this.element = null;
1897
1897
  }
1898
1898
  };
1899
- function Rt(n, r) {
1900
- var a = n.element;
1901
- if (a.style) {
1902
- var u;
1903
- O(n.options.cssProps, function(v, b) {
1904
- u = ne(a.style, b), r ? (n.oldCssProps[u] = a.style[u], a.style[u] = v) : a.style[u] = n.oldCssProps[u] || "";
1899
+ function Ft(n, r) {
1900
+ var i = n.element;
1901
+ if (i.style) {
1902
+ var h;
1903
+ A(n.options.cssProps, function(m, E) {
1904
+ h = re(i.style, E), r ? (n.oldCssProps[h] = i.style[h], i.style[h] = m) : i.style[h] = n.oldCssProps[h] || "";
1905
1905
  }), r || (n.oldCssProps = {});
1906
1906
  }
1907
1907
  }
1908
- function un(n, r) {
1909
- var a = o.createEvent("Event");
1910
- a.initEvent(n, !0, !0), a.gesture = r, r.target.dispatchEvent(a);
1908
+ function fn(n, r) {
1909
+ var i = o.createEvent("Event");
1910
+ i.initEvent(n, !0, !0), i.gesture = r, r.target.dispatchEvent(i);
1911
1911
  }
1912
- return A(Le, {
1913
- INPUT_START: I,
1914
- INPUT_MOVE: J,
1915
- INPUT_END: H,
1912
+ return M(Le, {
1913
+ INPUT_START: L,
1914
+ INPUT_MOVE: $,
1915
+ INPUT_END: j,
1916
1916
  INPUT_CANCEL: z,
1917
- STATE_POSSIBLE: Qe,
1917
+ STATE_POSSIBLE: tt,
1918
1918
  STATE_BEGAN: ce,
1919
1919
  STATE_CHANGED: ke,
1920
- STATE_ENDED: Me,
1920
+ STATE_ENDED: xe,
1921
1921
  STATE_RECOGNIZED: ye,
1922
1922
  STATE_CANCELLED: Ve,
1923
1923
  STATE_FAILED: pe,
1924
- DIRECTION_NONE: _e,
1924
+ DIRECTION_NONE: Oe,
1925
1925
  DIRECTION_LEFT: Ee,
1926
- DIRECTION_RIGHT: Ce,
1927
- DIRECTION_UP: Ne,
1926
+ DIRECTION_RIGHT: _e,
1927
+ DIRECTION_UP: Se,
1928
1928
  DIRECTION_DOWN: Pe,
1929
1929
  DIRECTION_HORIZONTAL: oe,
1930
1930
  DIRECTION_VERTICAL: ue,
1931
1931
  DIRECTION_ALL: De,
1932
1932
  Manager: yt,
1933
- Input: re,
1933
+ Input: ae,
1934
1934
  TouchAction: pt,
1935
- TouchInput: Ze,
1936
- MouseInput: qe,
1935
+ TouchInput: $e,
1936
+ MouseInput: Je,
1937
1937
  PointerEventInput: ut,
1938
1938
  TouchMouseInput: ht,
1939
- SingleTouchInput: At,
1940
- Recognizer: Te,
1939
+ SingleTouchInput: Ct,
1940
+ Recognizer: be,
1941
1941
  AttrRecognizer: he,
1942
- Tap: et,
1943
- Pan: $e,
1942
+ Tap: at,
1943
+ Pan: rt,
1944
1944
  Swipe: gt,
1945
1945
  Pinch: dt,
1946
1946
  Rotate: mt,
1947
1947
  Press: vt,
1948
- on: N,
1949
- off: M,
1950
- each: O,
1951
- merge: V,
1952
- extend: k,
1953
- assign: A,
1948
+ on: k,
1949
+ off: x,
1950
+ each: A,
1951
+ merge: I,
1952
+ extend: C,
1953
+ assign: M,
1954
1954
  inherit: y,
1955
- bindFn: T,
1956
- prefixed: ne
1955
+ bindFn: b,
1956
+ prefixed: re
1957
1957
  }), Le;
1958
- }(typeof window != "undefined" ? window : {}, typeof document != "undefined" ? document : {}), ze = function(p, o) {
1959
- o === void 0 && console.warn('THREE.OrbitControls: The second parameter "domElement" is now mandatory.'), o === document && console.error('THREE.OrbitControls: "document" should not be used as the target "domElement". Please use "renderer.domElement" instead.'), this.object = p, this.domElement = o, this.enabled = !0, this.target = new ve(), this.minDistance = 0, this.maxDistance = 1 / 0, this.minZoom = 0, this.maxZoom = 1 / 0, this.minPolarAngle = 0, this.maxPolarAngle = Math.PI, this.minAzimuthAngle = -1 / 0, this.maxAzimuthAngle = 1 / 0, this.enableDamping = !1, this.dampingFactor = 0.05, this.enableZoom = !0, this.zoomSpeed = 1, this.enableRotate = !0, this.rotateSpeed = 1, this.enablePan = !0, this.panSpeed = 1, this.screenSpacePanning = !1, this.keyPanSpeed = 7, this.autoRotate = !1, this.autoRotateSpeed = 2, this.enableKeys = !0, this.keys = { LEFT: 37, UP: 38, RIGHT: 39, BOTTOM: 40 }, this.mouseButtons = { LEFT: Oe.ROTATE, MIDDLE: Oe.DOLLY, RIGHT: Oe.PAN }, this.touches = { ONE: Ae.ROTATE, TWO: Ae.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this.getPolarAngle = function() {
1958
+ }(typeof window != "undefined" ? window : {}, typeof document != "undefined" ? document : {}), We = function(f, o) {
1959
+ o === void 0 && console.warn('THREE.OrbitControls: The second parameter "domElement" is now mandatory.'), o === document && console.error('THREE.OrbitControls: "document" should not be used as the target "domElement". Please use "renderer.domElement" instead.'), this.object = f, this.domElement = o, this.enabled = !0, this.target = new ve(), this.minDistance = 0, this.maxDistance = 1 / 0, this.minZoom = 0, this.maxZoom = 1 / 0, this.minPolarAngle = 0, this.maxPolarAngle = Math.PI, this.minAzimuthAngle = -1 / 0, this.maxAzimuthAngle = 1 / 0, this.enableDamping = !1, this.dampingFactor = 0.05, this.enableZoom = !0, this.zoomSpeed = 1, this.enableRotate = !0, this.rotateSpeed = 1, this.enablePan = !0, this.panSpeed = 1, this.screenSpacePanning = !1, this.keyPanSpeed = 7, this.autoRotate = !1, this.autoRotateSpeed = 2, this.enableKeys = !0, this.keys = { LEFT: 37, UP: 38, RIGHT: 39, BOTTOM: 40 }, this.mouseButtons = { LEFT: Ae.ROTATE, MIDDLE: Ae.DOLLY, RIGHT: Ae.PAN }, this.touches = { ONE: Me.ROTATE, TWO: Me.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this.getPolarAngle = function() {
1960
1960
  return d.phi;
1961
1961
  }, this.getAzimuthalAngle = function() {
1962
1962
  return d.theta;
1963
1963
  }, this.saveState = function() {
1964
1964
  e.target0.copy(e.target), e.position0.copy(e.object.position), e.zoom0 = e.object.zoom;
1965
1965
  }, this.reset = function() {
1966
- e.target.copy(e.target0), e.object.position.copy(e.position0), e.object.zoom = e.zoom0, e.object.updateProjectionMatrix(), e.dispatchEvent(i), e.update(), c = h.NONE;
1966
+ e.target.copy(e.target0), e.object.position.copy(e.position0), e.object.zoom = e.zoom0, e.object.updateProjectionMatrix(), e.dispatchEvent(a), e.update(), l = u.NONE;
1967
1967
  }, this.update = function() {
1968
- var s = new ve(), L = new Ft().setFromUnitVectors(p.up, new ve(0, 1, 0)), X = L.clone().inverse(), q = new ve(), fe = new Ft();
1968
+ var c = new ve(), D = new Ut().setFromUnitVectors(f.up, new ve(0, 1, 0)), X = D.clone().inverse(), K = new ve(), fe = new Ut();
1969
1969
  return function() {
1970
1970
  var ge = e.object.position;
1971
- return s.copy(ge).sub(e.target), s.applyQuaternion(L), d.setFromVector3(s), e.autoRotate && c === h.NONE && ee($()), e.enableDamping ? (d.theta += m.theta * e.dampingFactor, d.phi += m.phi * e.dampingFactor) : (d.theta += m.theta, d.phi += m.phi), d.theta = Math.max(e.minAzimuthAngle, Math.min(e.maxAzimuthAngle, d.theta)), d.phi = Math.max(e.minPolarAngle, Math.min(e.maxPolarAngle, d.phi)), d.makeSafe(), d.radius *= E, d.radius = Math.max(e.minDistance, Math.min(e.maxDistance, d.radius)), e.enableDamping === !0 ? e.target.addScaledVector(O, e.dampingFactor) : e.target.add(O), s.setFromSpherical(d), s.applyQuaternion(X), ge.copy(e.target).add(s), e.object.lookAt(e.target), e.enableDamping === !0 ? (m.theta *= 1 - e.dampingFactor, m.phi *= 1 - e.dampingFactor, O.multiplyScalar(1 - e.dampingFactor)) : (m.set(0, 0, 0), O.set(0, 0, 0)), E = 1, S || q.distanceToSquared(e.object.position) > g || 8 * (1 - fe.dot(e.object.quaternion)) > g ? (e.dispatchEvent(i), q.copy(e.object.position), fe.copy(e.object.quaternion), S = !1, !0) : !1;
1971
+ return c.copy(ge).sub(e.target), c.applyQuaternion(D), d.setFromVector3(c), e.autoRotate && l === u.NONE && te(ee()), e.enableDamping ? (d.theta += v.theta * e.dampingFactor, d.phi += v.phi * e.dampingFactor) : (d.theta += v.theta, d.phi += v.phi), d.theta = Math.max(e.minAzimuthAngle, Math.min(e.maxAzimuthAngle, d.theta)), d.phi = Math.max(e.minPolarAngle, Math.min(e.maxPolarAngle, d.phi)), d.makeSafe(), d.radius *= T, d.radius = Math.max(e.minDistance, Math.min(e.maxDistance, d.radius)), e.enableDamping === !0 ? e.target.addScaledVector(A, e.dampingFactor) : e.target.add(A), c.setFromSpherical(d), c.applyQuaternion(X), ge.copy(e.target).add(c), e.object.lookAt(e.target), e.enableDamping === !0 ? (v.theta *= 1 - e.dampingFactor, v.phi *= 1 - e.dampingFactor, A.multiplyScalar(1 - e.dampingFactor)) : (v.set(0, 0, 0), A.set(0, 0, 0)), T = 1, O || K.distanceToSquared(e.object.position) > g || 8 * (1 - fe.dot(e.object.quaternion)) > g ? (e.dispatchEvent(a), K.copy(e.object.position), fe.copy(e.object.quaternion), O = !1, !0) : !1;
1972
1972
  };
1973
1973
  }(), this.dispose = function() {
1974
- e.domElement.removeEventListener("contextmenu", Ge, !1), e.domElement.removeEventListener("mousedown", Pe, !1), e.domElement.removeEventListener("wheel", De, !1), e.domElement.removeEventListener("touchstart", Ie, !1), e.domElement.removeEventListener("touchend", Xe, !1), e.domElement.removeEventListener("touchmove", re, !1), document.removeEventListener("mousemove", oe, !1), document.removeEventListener("mouseup", ue, !1), e.domElement.removeEventListener("keydown", Re, !1);
1974
+ e.domElement.removeEventListener("contextmenu", Ze, !1), e.domElement.removeEventListener("mousedown", Pe, !1), e.domElement.removeEventListener("wheel", De, !1), e.domElement.removeEventListener("touchstart", Ie, !1), e.domElement.removeEventListener("touchend", Ke, !1), e.domElement.removeEventListener("touchmove", ae, !1), document.removeEventListener("mousemove", oe, !1), document.removeEventListener("mouseup", ue, !1), e.domElement.removeEventListener("keydown", Re, !1);
1975
1975
  };
1976
- var e = this, i = { type: "change" }, t = { type: "start" }, l = { type: "end" }, h = {
1976
+ var e = this, a = { type: "change" }, t = { type: "start" }, s = { type: "end" }, u = {
1977
1977
  NONE: -1,
1978
1978
  ROTATE: 0,
1979
1979
  DOLLY: 1,
@@ -1982,401 +1982,401 @@ var bt = function(p, o, e, i) {
1982
1982
  TOUCH_PAN: 4,
1983
1983
  TOUCH_DOLLY_PAN: 5,
1984
1984
  TOUCH_DOLLY_ROTATE: 6
1985
- }, c = h.NONE, g = 1e-6, d = new Ut(), m = new Ut(), E = 1, O = new ve(), S = !1, A = new be(), k = new be(), V = new be(), y = new be(), T = new be(), P = new be(), f = new be(), N = new be(), M = new be();
1986
- function $() {
1985
+ }, l = u.NONE, g = 1e-6, d = new Bt(), v = new Bt(), T = 1, A = new ve(), O = !1, M = new Te(), C = new Te(), I = new Te(), y = new Te(), b = new Te(), P = new Te(), p = new Te(), k = new Te(), x = new Te();
1986
+ function ee() {
1987
1987
  return 2 * Math.PI / 60 / 60 * e.autoRotateSpeed;
1988
1988
  }
1989
1989
  function Z() {
1990
1990
  return Math.pow(0.95, e.zoomSpeed);
1991
1991
  }
1992
- function ee(s) {
1993
- m.theta -= s;
1992
+ function te(c) {
1993
+ v.theta -= c;
1994
1994
  }
1995
- function le(s) {
1996
- m.phi -= s;
1995
+ function le(c) {
1996
+ v.phi -= c;
1997
1997
  }
1998
1998
  var me = function() {
1999
- var s = new ve();
2000
- return function(X, q) {
2001
- s.setFromMatrixColumn(q, 0), s.multiplyScalar(-X), O.add(s);
1999
+ var c = new ve();
2000
+ return function(X, K) {
2001
+ c.setFromMatrixColumn(K, 0), c.multiplyScalar(-X), A.add(c);
2002
2002
  };
2003
- }(), xe = function() {
2004
- var s = new ve();
2005
- return function(X, q) {
2006
- e.screenSpacePanning === !0 ? s.setFromMatrixColumn(q, 1) : (s.setFromMatrixColumn(q, 0), s.crossVectors(e.object.up, s)), s.multiplyScalar(X), O.add(s);
2003
+ }(), Ce = function() {
2004
+ var c = new ve();
2005
+ return function(X, K) {
2006
+ e.screenSpacePanning === !0 ? c.setFromMatrixColumn(K, 1) : (c.setFromMatrixColumn(K, 0), c.crossVectors(e.object.up, c)), c.multiplyScalar(X), A.add(c);
2007
2007
  };
2008
- }(), ne = function() {
2009
- var s = new ve();
2010
- return function(X, q) {
2008
+ }(), re = function() {
2009
+ var c = new ve();
2010
+ return function(X, K) {
2011
2011
  var fe = e.domElement;
2012
2012
  if (e.object.isPerspectiveCamera) {
2013
2013
  var Fe = e.object.position;
2014
- s.copy(Fe).sub(e.target);
2015
- var ge = s.length();
2016
- ge *= Math.tan(e.object.fov / 2 * Math.PI / 180), me(2 * X * ge / fe.clientHeight, e.object.matrix), xe(2 * q * ge / fe.clientHeight, e.object.matrix);
2017
- } else e.object.isOrthographicCamera ? (me(X * (e.object.right - e.object.left) / e.object.zoom / fe.clientWidth, e.object.matrix), xe(q * (e.object.top - e.object.bottom) / e.object.zoom / fe.clientHeight, e.object.matrix)) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."), e.enablePan = !1);
2014
+ c.copy(Fe).sub(e.target);
2015
+ var ge = c.length();
2016
+ ge *= Math.tan(e.object.fov / 2 * Math.PI / 180), me(2 * X * ge / fe.clientHeight, e.object.matrix), Ce(2 * K * ge / fe.clientHeight, e.object.matrix);
2017
+ } else e.object.isOrthographicCamera ? (me(X * (e.object.right - e.object.left) / e.object.zoom / fe.clientWidth, e.object.matrix), Ce(K * (e.object.top - e.object.bottom) / e.object.zoom / fe.clientHeight, e.object.matrix)) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."), e.enablePan = !1);
2018
2018
  };
2019
2019
  }();
2020
- function ie(s) {
2021
- e.object.isPerspectiveCamera ? E /= s : e.object.isOrthographicCamera ? (e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom * s)), e.object.updateProjectionMatrix(), S = !0) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), e.enableZoom = !1);
2020
+ function ie(c) {
2021
+ e.object.isPerspectiveCamera ? T /= c : e.object.isOrthographicCamera ? (e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom * c)), e.object.updateProjectionMatrix(), O = !0) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), e.enableZoom = !1);
2022
2022
  }
2023
- function D(s) {
2024
- e.object.isPerspectiveCamera ? E *= s : e.object.isOrthographicCamera ? (e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom / s)), e.object.updateProjectionMatrix(), S = !0) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), e.enableZoom = !1);
2023
+ function R(c) {
2024
+ e.object.isPerspectiveCamera ? T *= c : e.object.isOrthographicCamera ? (e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom / c)), e.object.updateProjectionMatrix(), O = !0) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), e.enableZoom = !1);
2025
2025
  }
2026
- function _(s) {
2027
- A.set(s.clientX, s.clientY);
2026
+ function S(c) {
2027
+ M.set(c.clientX, c.clientY);
2028
2028
  }
2029
- function x(s) {
2030
- f.set(s.clientX, s.clientY);
2029
+ function _(c) {
2030
+ p.set(c.clientX, c.clientY);
2031
2031
  }
2032
- function R(s) {
2033
- y.set(s.clientX, s.clientY);
2032
+ function F(c) {
2033
+ y.set(c.clientX, c.clientY);
2034
2034
  }
2035
- function Y(s) {
2036
- k.set(s.clientX, s.clientY), V.subVectors(k, A).multiplyScalar(e.rotateSpeed);
2037
- var L = e.domElement;
2038
- ee(2 * Math.PI * V.x / L.clientHeight), le(2 * Math.PI * V.y / L.clientHeight), A.copy(k), e.update();
2035
+ function Y(c) {
2036
+ C.set(c.clientX, c.clientY), I.subVectors(C, M).multiplyScalar(e.rotateSpeed);
2037
+ var D = e.domElement;
2038
+ te(2 * Math.PI * I.x / D.clientHeight), le(2 * Math.PI * I.y / D.clientHeight), M.copy(C), e.update();
2039
2039
  }
2040
- function te(s) {
2041
- N.set(s.clientX, s.clientY), M.subVectors(N, f), M.y > 0 ? ie(Z()) : M.y < 0 && D(Z()), f.copy(N), e.update();
2040
+ function ne(c) {
2041
+ k.set(c.clientX, c.clientY), x.subVectors(k, p), x.y > 0 ? ie(Z()) : x.y < 0 && R(Z()), p.copy(k), e.update();
2042
2042
  }
2043
- function j(s) {
2044
- T.set(s.clientX, s.clientY), P.subVectors(T, y).multiplyScalar(e.panSpeed), ne(P.x, P.y), y.copy(T), e.update();
2043
+ function H(c) {
2044
+ b.set(c.clientX, c.clientY), P.subVectors(b, y).multiplyScalar(e.panSpeed), re(P.x, P.y), y.copy(b), e.update();
2045
2045
  }
2046
- function F(s) {
2047
- s.deltaY < 0 ? D(Z()) : s.deltaY > 0 && ie(Z()), e.update();
2046
+ function U(c) {
2047
+ c.deltaY < 0 ? R(Z()) : c.deltaY > 0 && ie(Z()), e.update();
2048
2048
  }
2049
- function W(s) {
2050
- var L = !1;
2051
- switch (s.keyCode) {
2049
+ function W(c) {
2050
+ var D = !1;
2051
+ switch (c.keyCode) {
2052
2052
  case e.keys.UP:
2053
- ne(0, e.keyPanSpeed), L = !0;
2053
+ re(0, e.keyPanSpeed), D = !0;
2054
2054
  break;
2055
2055
  case e.keys.BOTTOM:
2056
- ne(0, -e.keyPanSpeed), L = !0;
2056
+ re(0, -e.keyPanSpeed), D = !0;
2057
2057
  break;
2058
2058
  case e.keys.LEFT:
2059
- ne(e.keyPanSpeed, 0), L = !0;
2059
+ re(e.keyPanSpeed, 0), D = !0;
2060
2060
  break;
2061
2061
  case e.keys.RIGHT:
2062
- ne(-e.keyPanSpeed, 0), L = !0;
2062
+ re(-e.keyPanSpeed, 0), D = !0;
2063
2063
  break;
2064
2064
  }
2065
- L && (s.preventDefault(), e.update());
2065
+ D && (c.preventDefault(), e.update());
2066
2066
  }
2067
- function B(s) {
2068
- if (s.touches.length == 1)
2069
- A.set(s.touches[0].pageX, s.touches[0].pageY);
2067
+ function V(c) {
2068
+ if (c.touches.length == 1)
2069
+ M.set(c.touches[0].pageX, c.touches[0].pageY);
2070
2070
  else {
2071
- var L = 0.5 * (s.touches[0].pageX + s.touches[1].pageX), X = 0.5 * (s.touches[0].pageY + s.touches[1].pageY);
2072
- A.set(L, X);
2071
+ var D = 0.5 * (c.touches[0].pageX + c.touches[1].pageX), X = 0.5 * (c.touches[0].pageY + c.touches[1].pageY);
2072
+ M.set(D, X);
2073
2073
  }
2074
2074
  }
2075
- function U(s) {
2076
- if (s.touches.length == 1)
2077
- y.set(s.touches[0].pageX, s.touches[0].pageY);
2075
+ function B(c) {
2076
+ if (c.touches.length == 1)
2077
+ y.set(c.touches[0].pageX, c.touches[0].pageY);
2078
2078
  else {
2079
- var L = 0.5 * (s.touches[0].pageX + s.touches[1].pageX), X = 0.5 * (s.touches[0].pageY + s.touches[1].pageY);
2080
- y.set(L, X);
2079
+ var D = 0.5 * (c.touches[0].pageX + c.touches[1].pageX), X = 0.5 * (c.touches[0].pageY + c.touches[1].pageY);
2080
+ y.set(D, X);
2081
2081
  }
2082
2082
  }
2083
- function I(s) {
2084
- var L = s.touches[0].pageX - s.touches[1].pageX, X = s.touches[0].pageY - s.touches[1].pageY, q = Math.sqrt(L * L + X * X);
2085
- f.set(0, q);
2083
+ function L(c) {
2084
+ var D = c.touches[0].pageX - c.touches[1].pageX, X = c.touches[0].pageY - c.touches[1].pageY, K = Math.sqrt(D * D + X * X);
2085
+ p.set(0, K);
2086
2086
  }
2087
- function J(s) {
2088
- e.enableZoom && I(s), e.enablePan && U(s);
2087
+ function $(c) {
2088
+ e.enableZoom && L(c), e.enablePan && B(c);
2089
2089
  }
2090
- function H(s) {
2091
- e.enableZoom && I(s), e.enableRotate && B(s);
2090
+ function j(c) {
2091
+ e.enableZoom && L(c), e.enableRotate && V(c);
2092
2092
  }
2093
- function z(s) {
2094
- if (s.touches.length == 1)
2095
- k.set(s.touches[0].pageX, s.touches[0].pageY);
2093
+ function z(c) {
2094
+ if (c.touches.length == 1)
2095
+ C.set(c.touches[0].pageX, c.touches[0].pageY);
2096
2096
  else {
2097
- var L = 0.5 * (s.touches[0].pageX + s.touches[1].pageX), X = 0.5 * (s.touches[0].pageY + s.touches[1].pageY);
2098
- k.set(L, X);
2097
+ var D = 0.5 * (c.touches[0].pageX + c.touches[1].pageX), X = 0.5 * (c.touches[0].pageY + c.touches[1].pageY);
2098
+ C.set(D, X);
2099
2099
  }
2100
- V.subVectors(k, A).multiplyScalar(e.rotateSpeed);
2101
- var q = e.domElement;
2102
- ee(2 * Math.PI * V.x / q.clientHeight), le(2 * Math.PI * V.y / q.clientHeight), A.copy(k);
2100
+ I.subVectors(C, M).multiplyScalar(e.rotateSpeed);
2101
+ var K = e.domElement;
2102
+ te(2 * Math.PI * I.x / K.clientHeight), le(2 * Math.PI * I.y / K.clientHeight), M.copy(C);
2103
2103
  }
2104
- function _e(s) {
2105
- if (s.touches.length == 1)
2106
- T.set(s.touches[0].pageX, s.touches[0].pageY);
2104
+ function Oe(c) {
2105
+ if (c.touches.length == 1)
2106
+ b.set(c.touches[0].pageX, c.touches[0].pageY);
2107
2107
  else {
2108
- var L = 0.5 * (s.touches[0].pageX + s.touches[1].pageX), X = 0.5 * (s.touches[0].pageY + s.touches[1].pageY);
2109
- T.set(L, X);
2108
+ var D = 0.5 * (c.touches[0].pageX + c.touches[1].pageX), X = 0.5 * (c.touches[0].pageY + c.touches[1].pageY);
2109
+ b.set(D, X);
2110
2110
  }
2111
- P.subVectors(T, y).multiplyScalar(e.panSpeed), ne(P.x, P.y), y.copy(T);
2111
+ P.subVectors(b, y).multiplyScalar(e.panSpeed), re(P.x, P.y), y.copy(b);
2112
2112
  }
2113
- function Ee(s) {
2114
- var L = s.touches[0].pageX - s.touches[1].pageX, X = s.touches[0].pageY - s.touches[1].pageY, q = Math.sqrt(L * L + X * X);
2115
- N.set(0, q), M.set(0, Math.pow(N.y / f.y, e.zoomSpeed)), ie(M.y), f.copy(N);
2113
+ function Ee(c) {
2114
+ var D = c.touches[0].pageX - c.touches[1].pageX, X = c.touches[0].pageY - c.touches[1].pageY, K = Math.sqrt(D * D + X * X);
2115
+ k.set(0, K), x.set(0, Math.pow(k.y / p.y, e.zoomSpeed)), ie(x.y), p.copy(k);
2116
2116
  }
2117
- function Ce(s) {
2118
- e.enableZoom && Ee(s), e.enablePan && _e(s);
2117
+ function _e(c) {
2118
+ e.enableZoom && Ee(c), e.enablePan && Oe(c);
2119
2119
  }
2120
- function Ne(s) {
2121
- e.enableZoom && Ee(s), e.enableRotate && z(s);
2120
+ function Se(c) {
2121
+ e.enableZoom && Ee(c), e.enableRotate && z(c);
2122
2122
  }
2123
- function Pe(s) {
2123
+ function Pe(c) {
2124
2124
  if (e.enabled !== !1) {
2125
- s.preventDefault(), e.domElement.focus ? e.domElement.focus() : window.focus();
2126
- var L;
2127
- switch (s.button) {
2125
+ c.preventDefault(), e.domElement.focus ? e.domElement.focus() : window.focus();
2126
+ var D;
2127
+ switch (c.button) {
2128
2128
  case 0:
2129
- L = e.mouseButtons.LEFT;
2129
+ D = e.mouseButtons.LEFT;
2130
2130
  break;
2131
2131
  case 1:
2132
- L = e.mouseButtons.MIDDLE;
2132
+ D = e.mouseButtons.MIDDLE;
2133
2133
  break;
2134
2134
  case 2:
2135
- L = e.mouseButtons.RIGHT;
2135
+ D = e.mouseButtons.RIGHT;
2136
2136
  break;
2137
2137
  default:
2138
- L = -1;
2138
+ D = -1;
2139
2139
  }
2140
- switch (L) {
2141
- case Oe.DOLLY:
2140
+ switch (D) {
2141
+ case Ae.DOLLY:
2142
2142
  if (e.enableZoom === !1) return;
2143
- x(s), c = h.DOLLY;
2143
+ _(c), l = u.DOLLY;
2144
2144
  break;
2145
- case Oe.ROTATE:
2146
- if (s.ctrlKey || s.metaKey || s.shiftKey) {
2145
+ case Ae.ROTATE:
2146
+ if (c.ctrlKey || c.metaKey || c.shiftKey) {
2147
2147
  if (e.enablePan === !1) return;
2148
- R(s), c = h.PAN;
2148
+ F(c), l = u.PAN;
2149
2149
  } else {
2150
2150
  if (e.enableRotate === !1) return;
2151
- _(s), c = h.ROTATE;
2151
+ S(c), l = u.ROTATE;
2152
2152
  }
2153
2153
  break;
2154
- case Oe.PAN:
2155
- if (s.ctrlKey || s.metaKey || s.shiftKey) {
2154
+ case Ae.PAN:
2155
+ if (c.ctrlKey || c.metaKey || c.shiftKey) {
2156
2156
  if (e.enableRotate === !1) return;
2157
- _(s), c = h.ROTATE;
2157
+ S(c), l = u.ROTATE;
2158
2158
  } else {
2159
2159
  if (e.enablePan === !1) return;
2160
- R(s), c = h.PAN;
2160
+ F(c), l = u.PAN;
2161
2161
  }
2162
2162
  break;
2163
2163
  default:
2164
- c = h.NONE;
2164
+ l = u.NONE;
2165
2165
  }
2166
- c !== h.NONE && (document.addEventListener("mousemove", oe, !1), document.addEventListener("mouseup", ue, !1), e.dispatchEvent(t));
2166
+ l !== u.NONE && (document.addEventListener("mousemove", oe, !1), document.addEventListener("mouseup", ue, !1), e.dispatchEvent(t));
2167
2167
  }
2168
2168
  }
2169
- function oe(s) {
2169
+ function oe(c) {
2170
2170
  if (e.enabled !== !1)
2171
- switch (s.preventDefault(), c) {
2172
- case h.ROTATE:
2171
+ switch (c.preventDefault(), l) {
2172
+ case u.ROTATE:
2173
2173
  if (e.enableRotate === !1) return;
2174
- Y(s);
2174
+ Y(c);
2175
2175
  break;
2176
- case h.DOLLY:
2176
+ case u.DOLLY:
2177
2177
  if (e.enableZoom === !1) return;
2178
- te(s);
2178
+ ne(c);
2179
2179
  break;
2180
- case h.PAN:
2180
+ case u.PAN:
2181
2181
  if (e.enablePan === !1) return;
2182
- j(s);
2182
+ H(c);
2183
2183
  break;
2184
2184
  }
2185
2185
  }
2186
- function ue(s) {
2187
- e.enabled !== !1 && (document.removeEventListener("mousemove", oe, !1), document.removeEventListener("mouseup", ue, !1), e.dispatchEvent(l), c = h.NONE);
2186
+ function ue(c) {
2187
+ e.enabled !== !1 && (document.removeEventListener("mousemove", oe, !1), document.removeEventListener("mouseup", ue, !1), e.dispatchEvent(s), l = u.NONE);
2188
2188
  }
2189
- function De(s) {
2190
- e.enabled === !1 || e.enableZoom === !1 || c !== h.NONE && c !== h.ROTATE || (s.preventDefault(), s.stopPropagation(), e.dispatchEvent(t), F(s), e.dispatchEvent(l));
2189
+ function De(c) {
2190
+ e.enabled === !1 || e.enableZoom === !1 || l !== u.NONE && l !== u.ROTATE || (c.preventDefault(), c.stopPropagation(), e.dispatchEvent(t), U(c), e.dispatchEvent(s));
2191
2191
  }
2192
- function Re(s) {
2193
- e.enabled === !1 || e.enableKeys === !1 || e.enablePan === !1 || W(s);
2192
+ function Re(c) {
2193
+ e.enabled === !1 || e.enableKeys === !1 || e.enablePan === !1 || W(c);
2194
2194
  }
2195
- function Ie(s) {
2195
+ function Ie(c) {
2196
2196
  if (e.enabled !== !1) {
2197
- switch (s.preventDefault(), s.touches.length) {
2197
+ switch (c.preventDefault(), c.touches.length) {
2198
2198
  case 1:
2199
2199
  switch (e.touches.ONE) {
2200
- case Ae.ROTATE:
2200
+ case Me.ROTATE:
2201
2201
  if (e.enableRotate === !1) return;
2202
- B(s), c = h.TOUCH_ROTATE;
2202
+ V(c), l = u.TOUCH_ROTATE;
2203
2203
  break;
2204
- case Ae.PAN:
2204
+ case Me.PAN:
2205
2205
  if (e.enablePan === !1) return;
2206
- U(s), c = h.TOUCH_PAN;
2206
+ B(c), l = u.TOUCH_PAN;
2207
2207
  break;
2208
2208
  default:
2209
- c = h.NONE;
2209
+ l = u.NONE;
2210
2210
  }
2211
2211
  break;
2212
2212
  case 2:
2213
2213
  switch (e.touches.TWO) {
2214
- case Ae.DOLLY_PAN:
2214
+ case Me.DOLLY_PAN:
2215
2215
  if (e.enableZoom === !1 && e.enablePan === !1) return;
2216
- J(s), c = h.TOUCH_DOLLY_PAN;
2216
+ $(c), l = u.TOUCH_DOLLY_PAN;
2217
2217
  break;
2218
- case Ae.DOLLY_ROTATE:
2218
+ case Me.DOLLY_ROTATE:
2219
2219
  if (e.enableZoom === !1 && e.enableRotate === !1) return;
2220
- H(s), c = h.TOUCH_DOLLY_ROTATE;
2220
+ j(c), l = u.TOUCH_DOLLY_ROTATE;
2221
2221
  break;
2222
2222
  default:
2223
- c = h.NONE;
2223
+ l = u.NONE;
2224
2224
  }
2225
2225
  break;
2226
2226
  default:
2227
- c = h.NONE;
2227
+ l = u.NONE;
2228
2228
  }
2229
- c !== h.NONE && e.dispatchEvent(t);
2229
+ l !== u.NONE && e.dispatchEvent(t);
2230
2230
  }
2231
2231
  }
2232
- function re(s) {
2232
+ function ae(c) {
2233
2233
  if (e.enabled !== !1)
2234
- switch (s.preventDefault(), s.stopPropagation(), c) {
2235
- case h.TOUCH_ROTATE:
2234
+ switch (c.preventDefault(), c.stopPropagation(), l) {
2235
+ case u.TOUCH_ROTATE:
2236
2236
  if (e.enableRotate === !1) return;
2237
- z(s), e.update();
2237
+ z(c), e.update();
2238
2238
  break;
2239
- case h.TOUCH_PAN:
2239
+ case u.TOUCH_PAN:
2240
2240
  if (e.enablePan === !1) return;
2241
- _e(s), e.update();
2241
+ Oe(c), e.update();
2242
2242
  break;
2243
- case h.TOUCH_DOLLY_PAN:
2243
+ case u.TOUCH_DOLLY_PAN:
2244
2244
  if (e.enableZoom === !1 && e.enablePan === !1) return;
2245
- Ce(s), e.update();
2245
+ _e(c), e.update();
2246
2246
  break;
2247
- case h.TOUCH_DOLLY_ROTATE:
2247
+ case u.TOUCH_DOLLY_ROTATE:
2248
2248
  if (e.enableZoom === !1 && e.enableRotate === !1) return;
2249
- Ne(s), e.update();
2249
+ Se(c), e.update();
2250
2250
  break;
2251
2251
  default:
2252
- c = h.NONE;
2252
+ l = u.NONE;
2253
2253
  }
2254
2254
  }
2255
- function Xe(s) {
2256
- e.enabled !== !1 && (e.dispatchEvent(l), c = h.NONE);
2255
+ function Ke(c) {
2256
+ e.enabled !== !1 && (e.dispatchEvent(s), l = u.NONE);
2257
2257
  }
2258
- function Ge(s) {
2259
- e.enabled !== !1 && s.preventDefault();
2258
+ function Ze(c) {
2259
+ e.enabled !== !1 && c.preventDefault();
2260
2260
  }
2261
- e.domElement.addEventListener("contextmenu", Ge, !1), e.domElement.addEventListener("mousedown", Pe, !1), e.domElement.addEventListener("wheel", De, !1), e.domElement.addEventListener("touchstart", Ie, !1), e.domElement.addEventListener("touchend", Xe, !1), e.domElement.addEventListener("touchmove", re, !1), e.domElement.addEventListener("keydown", Re, !1), e.domElement.tabIndex === -1 && (e.domElement.tabIndex = 0), this.update();
2261
+ e.domElement.addEventListener("contextmenu", Ze, !1), e.domElement.addEventListener("mousedown", Pe, !1), e.domElement.addEventListener("wheel", De, !1), e.domElement.addEventListener("touchstart", Ie, !1), e.domElement.addEventListener("touchend", Ke, !1), e.domElement.addEventListener("touchmove", ae, !1), e.domElement.addEventListener("keydown", Re, !1), e.domElement.tabIndex === -1 && (e.domElement.tabIndex = 0), this.update();
2262
2262
  };
2263
- ze.prototype = Object.create(Ht.prototype);
2264
- ze.prototype.constructor = ze;
2265
- var Et = function(p, o) {
2266
- ze.call(this, p, o), this.mouseButtons.LEFT = Oe.PAN, this.mouseButtons.RIGHT = Oe.ROTATE, this.touches.ONE = Ae.PAN, this.touches.TWO = Ae.DOLLY_ROTATE;
2263
+ We.prototype = Object.create(zt.prototype);
2264
+ We.prototype.constructor = We;
2265
+ var Pt = function(f, o) {
2266
+ We.call(this, f, o), this.mouseButtons.LEFT = Ae.PAN, this.mouseButtons.RIGHT = Ae.ROTATE, this.touches.ONE = Me.PAN, this.touches.TWO = Me.DOLLY_ROTATE;
2267
2267
  };
2268
- Et.prototype = Object.create(Ht.prototype);
2269
- Et.prototype.constructor = Et;
2270
- var we = function(p) {
2271
- jt.call(this), this.element = p, this.element.style.position = "absolute", this.element.style.pointerEvents = "auto", this.addEventListener("removed", function() {
2268
+ Pt.prototype = Object.create(zt.prototype);
2269
+ Pt.prototype.constructor = Pt;
2270
+ var we = function(f) {
2271
+ Xt.call(this), this.element = f, this.element.style.position = "absolute", this.element.style.pointerEvents = "auto", this.addEventListener("removed", function() {
2272
2272
  this.traverse(function(o) {
2273
2273
  o.element instanceof Element && o.element.parentNode !== null && o.element.parentNode.removeChild(o.element);
2274
2274
  });
2275
2275
  });
2276
2276
  };
2277
- we.prototype = Object.create(jt.prototype);
2277
+ we.prototype = Object.create(Xt.prototype);
2278
2278
  we.prototype.constructor = we;
2279
- var st = function(p) {
2280
- we.call(this, p);
2279
+ var lt = function(f) {
2280
+ we.call(this, f);
2281
2281
  };
2282
- st.prototype = Object.create(we.prototype);
2283
- st.prototype.constructor = st;
2284
- var Cn = function() {
2285
- var p = this, o, e, i, t, l = new dn(), h = {
2282
+ lt.prototype = Object.create(we.prototype);
2283
+ lt.prototype.constructor = lt;
2284
+ var Sn = function() {
2285
+ var f = this, o, e, a, t, s = new vn(), u = {
2286
2286
  camera: { fov: 0, style: "" },
2287
2287
  objects: /* @__PURE__ */ new WeakMap()
2288
- }, c = document.createElement("div");
2289
- c.style.overflow = "hidden", this.domElement = c;
2288
+ }, l = document.createElement("div");
2289
+ l.style.overflow = "hidden", this.domElement = l;
2290
2290
  var g = document.createElement("div");
2291
- g.style.WebkitTransformStyle = "preserve-3d", g.style.transformStyle = "preserve-3d", g.style.pointerEvents = "none", c.appendChild(g);
2291
+ g.style.WebkitTransformStyle = "preserve-3d", g.style.transformStyle = "preserve-3d", g.style.pointerEvents = "none", l.appendChild(g);
2292
2292
  var d = /Trident/i.test(navigator.userAgent);
2293
2293
  this.getSize = function() {
2294
2294
  return {
2295
2295
  width: o,
2296
2296
  height: e
2297
2297
  };
2298
- }, this.setSize = function(y, T) {
2299
- o = y, e = T, i = o / 2, t = e / 2, c.style.width = y + "px", c.style.height = T + "px", g.style.width = y + "px", g.style.height = T + "px";
2298
+ }, this.setSize = function(y, b) {
2299
+ o = y, e = b, a = o / 2, t = e / 2, l.style.width = y + "px", l.style.height = b + "px", g.style.width = y + "px", g.style.height = b + "px";
2300
2300
  };
2301
- function m(y) {
2301
+ function v(y) {
2302
2302
  return Math.abs(y) < 1e-10 ? 0 : y;
2303
2303
  }
2304
- function E(y) {
2305
- var T = y.elements;
2306
- return "matrix3d(" + m(T[0]) + "," + m(-T[1]) + "," + m(T[2]) + "," + m(T[3]) + "," + m(T[4]) + "," + m(-T[5]) + "," + m(T[6]) + "," + m(T[7]) + "," + m(T[8]) + "," + m(-T[9]) + "," + m(T[10]) + "," + m(T[11]) + "," + m(T[12]) + "," + m(-T[13]) + "," + m(T[14]) + "," + m(T[15]) + ")";
2304
+ function T(y) {
2305
+ var b = y.elements;
2306
+ return "matrix3d(" + v(b[0]) + "," + v(-b[1]) + "," + v(b[2]) + "," + v(b[3]) + "," + v(b[4]) + "," + v(-b[5]) + "," + v(b[6]) + "," + v(b[7]) + "," + v(b[8]) + "," + v(-b[9]) + "," + v(b[10]) + "," + v(b[11]) + "," + v(b[12]) + "," + v(-b[13]) + "," + v(b[14]) + "," + v(b[15]) + ")";
2307
2307
  }
2308
- function O(y, T) {
2309
- var P = y.elements, f = "matrix3d(" + m(P[0]) + "," + m(P[1]) + "," + m(P[2]) + "," + m(P[3]) + "," + m(-P[4]) + "," + m(-P[5]) + "," + m(-P[6]) + "," + m(-P[7]) + "," + m(P[8]) + "," + m(P[9]) + "," + m(P[10]) + "," + m(P[11]) + "," + m(P[12]) + "," + m(P[13]) + "," + m(P[14]) + "," + m(P[15]) + ")";
2310
- return d ? "translate(-50%,-50%)translate(" + i + "px," + t + "px)" + T + f : "translate(-50%,-50%)" + f;
2308
+ function A(y, b) {
2309
+ var P = y.elements, p = "matrix3d(" + v(P[0]) + "," + v(P[1]) + "," + v(P[2]) + "," + v(P[3]) + "," + v(-P[4]) + "," + v(-P[5]) + "," + v(-P[6]) + "," + v(-P[7]) + "," + v(P[8]) + "," + v(P[9]) + "," + v(P[10]) + "," + v(P[11]) + "," + v(P[12]) + "," + v(P[13]) + "," + v(P[14]) + "," + v(P[15]) + ")";
2310
+ return d ? "translate(-50%,-50%)translate(" + a + "px," + t + "px)" + b + p : "translate(-50%,-50%)" + p;
2311
2311
  }
2312
- function S(y, T, P, f) {
2312
+ function O(y, b, P, p) {
2313
2313
  if (y instanceof we) {
2314
- y.onBeforeRender(p, T, P);
2315
- var N;
2316
- y instanceof st ? (l.copy(P.matrixWorldInverse), l.transpose(), l.copyPosition(y.matrixWorld), l.scale(y.scale), l.elements[3] = 0, l.elements[7] = 0, l.elements[11] = 0, l.elements[15] = 1, N = O(l, f)) : N = O(y.matrixWorld, f);
2317
- var M = y.element, $ = h.objects.get(y);
2318
- if ($ === void 0 || $.style !== N) {
2319
- M.style.WebkitTransform = N, M.style.transform = N;
2320
- var Z = { style: N };
2321
- d && (Z.distanceToCameraSquared = A(P, y)), h.objects.set(y, Z);
2322
- }
2323
- M.style.display = y.visible ? "" : "none", M.parentNode !== g && g.appendChild(M), y.onAfterRender(p, T, P);
2314
+ y.onBeforeRender(f, b, P);
2315
+ var k;
2316
+ y instanceof lt ? (s.copy(P.matrixWorldInverse), s.transpose(), s.copyPosition(y.matrixWorld), s.scale(y.scale), s.elements[3] = 0, s.elements[7] = 0, s.elements[11] = 0, s.elements[15] = 1, k = A(s, p)) : k = A(y.matrixWorld, p);
2317
+ var x = y.element, ee = u.objects.get(y);
2318
+ if (ee === void 0 || ee.style !== k) {
2319
+ x.style.WebkitTransform = k, x.style.transform = k;
2320
+ var Z = { style: k };
2321
+ d && (Z.distanceToCameraSquared = M(P, y)), u.objects.set(y, Z);
2322
+ }
2323
+ x.style.display = y.visible ? "" : "none", x.parentNode !== g && g.appendChild(x), y.onAfterRender(f, b, P);
2324
2324
  }
2325
- for (var ee = 0, le = y.children.length; ee < le; ee++)
2326
- S(y.children[ee], T, P, f);
2325
+ for (var te = 0, le = y.children.length; te < le; te++)
2326
+ O(y.children[te], b, P, p);
2327
2327
  }
2328
- var A = function() {
2329
- var y = new ve(), T = new ve();
2330
- return function(P, f) {
2331
- return y.setFromMatrixPosition(P.matrixWorld), T.setFromMatrixPosition(f.matrixWorld), y.distanceToSquared(T);
2328
+ var M = function() {
2329
+ var y = new ve(), b = new ve();
2330
+ return function(P, p) {
2331
+ return y.setFromMatrixPosition(P.matrixWorld), b.setFromMatrixPosition(p.matrixWorld), y.distanceToSquared(b);
2332
2332
  };
2333
2333
  }();
2334
- function k(y) {
2335
- var T = [];
2334
+ function C(y) {
2335
+ var b = [];
2336
2336
  return y.traverse(function(P) {
2337
- P instanceof we && T.push(P);
2338
- }), T;
2339
- }
2340
- function V(y) {
2341
- for (var T = k(y).sort(function(M, $) {
2342
- var Z = h.objects.get(M).distanceToCameraSquared, ee = h.objects.get($).distanceToCameraSquared;
2343
- return Z - ee;
2344
- }), P = T.length, f = 0, N = T.length; f < N; f++)
2345
- T[f].element.style.zIndex = P - f;
2346
- }
2347
- this.render = function(y, T) {
2348
- var P = T.projectionMatrix.elements[5] * t;
2349
- if (h.camera.fov !== P && (T.isPerspectiveCamera ? (c.style.WebkitPerspective = P + "px", c.style.perspective = P + "px") : (c.style.WebkitPerspective = "", c.style.perspective = ""), h.camera.fov = P), y.autoUpdate === !0 && y.updateMatrixWorld(), T.parent === null && T.updateMatrixWorld(), T.isOrthographicCamera)
2350
- var f = -(T.right + T.left) / 2, N = (T.top + T.bottom) / 2;
2351
- var M = T.isOrthographicCamera ? "scale(" + P + ")translate(" + m(f) + "px," + m(N) + "px)" + E(T.matrixWorldInverse) : "translateZ(" + P + "px)" + E(T.matrixWorldInverse), $ = M + "translate(" + i + "px," + t + "px)";
2352
- h.camera.style !== $ && !d && (g.style.WebkitTransform = $, g.style.transform = $, h.camera.style = $), S(y, y, T, M), d && V(y);
2337
+ P instanceof we && b.push(P);
2338
+ }), b;
2339
+ }
2340
+ function I(y) {
2341
+ for (var b = C(y).sort(function(x, ee) {
2342
+ var Z = u.objects.get(x).distanceToCameraSquared, te = u.objects.get(ee).distanceToCameraSquared;
2343
+ return Z - te;
2344
+ }), P = b.length, p = 0, k = b.length; p < k; p++)
2345
+ b[p].element.style.zIndex = P - p;
2346
+ }
2347
+ this.render = function(y, b) {
2348
+ var P = b.projectionMatrix.elements[5] * t;
2349
+ if (u.camera.fov !== P && (b.isPerspectiveCamera ? (l.style.WebkitPerspective = P + "px", l.style.perspective = P + "px") : (l.style.WebkitPerspective = "", l.style.perspective = ""), u.camera.fov = P), y.autoUpdate === !0 && y.updateMatrixWorld(), b.parent === null && b.updateMatrixWorld(), b.isOrthographicCamera)
2350
+ var p = -(b.right + b.left) / 2, k = (b.top + b.bottom) / 2;
2351
+ var x = b.isOrthographicCamera ? "scale(" + P + ")translate(" + v(p) + "px," + v(k) + "px)" + T(b.matrixWorldInverse) : "translateZ(" + P + "px)" + T(b.matrixWorldInverse), ee = x + "translate(" + a + "px," + t + "px)";
2352
+ u.camera.style !== ee && !d && (g.style.WebkitTransform = ee, g.style.transform = ee, u.camera.style = ee), O(y, y, b, x), d && I(y);
2353
2353
  };
2354
2354
  };
2355
- function Yt(p, o, e) {
2356
- var i = o.getBoundingClientRect(), t = i.top, l = i.left, h = i.width, c = i.height;
2357
- return new w.Vector2((p.x - l) / h * 2 - 1, -(p.y - t) / c * 2 + 1);
2355
+ function jt(f, o, e) {
2356
+ var a = o.getBoundingClientRect(), t = a.top, s = a.left, u = a.width, l = a.height;
2357
+ return new w.Vector2((f.x - s) / u * 2 - 1, -(f.y - t) / l * 2 + 1);
2358
2358
  }
2359
- var Nn = (
2359
+ var In = (
2360
2360
  /** @class */
2361
- function(p) {
2362
- lt(o, p);
2363
- function o(e, i, t, l, h) {
2364
- var c = p.call(this) || this;
2365
- c.type = "RoundedBoxGeometry", h = isNaN(h) ? 1 : Math.max(1, Math.floor(h)), e = isNaN(e) ? 1 : e, i = isNaN(i) ? 1 : i, t = isNaN(t) ? 1 : t, l = isNaN(l) ? 0.15 : l, l = Math.min(l, Math.min(e, Math.min(i, Math.min(t))) / 2);
2366
- var g = e / 2 - l, d = i / 2 - l, m = t / 2 - l;
2367
- c.parameters = {
2361
+ function(f) {
2362
+ qe(o, f);
2363
+ function o(e, a, t, s, u) {
2364
+ var l = f.call(this) || this;
2365
+ l.type = "RoundedBoxGeometry", u = isNaN(u) ? 1 : Math.max(1, Math.floor(u)), e = isNaN(e) ? 1 : e, a = isNaN(a) ? 1 : a, t = isNaN(t) ? 1 : t, s = isNaN(s) ? 0.15 : s, s = Math.min(s, Math.min(e, Math.min(a, Math.min(t))) / 2);
2366
+ var g = e / 2 - s, d = a / 2 - s, v = t / 2 - s;
2367
+ l.parameters = {
2368
2368
  width: e,
2369
- height: i,
2369
+ height: a,
2370
2370
  depth: t,
2371
- radius: l,
2372
- radiusSegments: h
2371
+ radius: s,
2372
+ radiusSegments: u
2373
2373
  };
2374
- var E = h + 1, O = E * h + 1 << 3, S = new w.BufferAttribute(new Float32Array(O * 3), 3), A = new w.BufferAttribute(new Float32Array(O * 3), 3), k = [], V = [];
2374
+ var T = u + 1, A = T * u + 1 << 3, O = new w.BufferAttribute(new Float32Array(A * 3), 3), M = new w.BufferAttribute(new Float32Array(A * 3), 3), C = [], I = [];
2375
2375
  new w.Vector3();
2376
- var y = new w.Vector3(), T = [], P = [], f = [], N = E * h, M = E * h + 1;
2377
- $(), ee(), Z(), le(), xe(), me();
2378
- function $() {
2379
- for (var D = [
2376
+ var y = new w.Vector3(), b = [], P = [], p = [], k = T * u, x = T * u + 1;
2377
+ ee(), te(), Z(), le(), Ce(), me();
2378
+ function ee() {
2379
+ for (var R = [
2380
2380
  new w.Vector3(1, 1, 1),
2381
2381
  new w.Vector3(1, 1, -1),
2382
2382
  new w.Vector3(-1, 1, -1),
@@ -2385,37 +2385,37 @@ var Nn = (
2385
2385
  new w.Vector3(1, -1, -1),
2386
2386
  new w.Vector3(-1, -1, -1),
2387
2387
  new w.Vector3(-1, -1, 1)
2388
- ], _ = 0; _ < 8; _++)
2389
- k.push([]), V.push([]);
2390
- for (var x = Math.PI / 2, R = new w.Vector3(g, d, m), Y = 0; Y <= h; Y++) {
2391
- var te = Y / h, j = te * x, F = Math.cos(j), W = Math.sin(j);
2392
- if (Y == h) {
2388
+ ], S = 0; S < 8; S++)
2389
+ C.push([]), I.push([]);
2390
+ for (var _ = Math.PI / 2, F = new w.Vector3(g, d, v), Y = 0; Y <= u; Y++) {
2391
+ var ne = Y / u, H = ne * _, U = Math.cos(H), W = Math.sin(H);
2392
+ if (Y == u) {
2393
2393
  y.set(0, 1, 0);
2394
- var B = y.clone().multiplyScalar(l).add(R);
2395
- k[0].push(B), T.push(B);
2396
- var U = y.clone();
2397
- V[0].push(U), P.push(U);
2394
+ var V = y.clone().multiplyScalar(s).add(F);
2395
+ C[0].push(V), b.push(V);
2396
+ var B = y.clone();
2397
+ I[0].push(B), P.push(B);
2398
2398
  continue;
2399
2399
  }
2400
- for (var I = 0; I <= h; I++) {
2401
- var J = I / h, H = J * x;
2402
- y.x = F * Math.cos(H), y.y = W, y.z = F * Math.sin(H);
2403
- var B = y.clone().multiplyScalar(l).add(R);
2404
- k[0].push(B), T.push(B);
2405
- var U = y.clone().normalize();
2406
- V[0].push(U), P.push(U);
2400
+ for (var L = 0; L <= u; L++) {
2401
+ var $ = L / u, j = $ * _;
2402
+ y.x = U * Math.cos(j), y.y = W, y.z = U * Math.sin(j);
2403
+ var V = y.clone().multiplyScalar(s).add(F);
2404
+ C[0].push(V), b.push(V);
2405
+ var B = y.clone().normalize();
2406
+ I[0].push(B), P.push(B);
2407
2407
  }
2408
2408
  }
2409
2409
  for (var z = 1; z < 8; z++)
2410
- for (var _ = 0; _ < k[0].length; _++) {
2411
- var B = k[0][_].clone().multiply(D[z]);
2412
- k[z].push(B), T.push(B);
2413
- var U = V[0][_].clone().multiply(D[z]);
2414
- V[z].push(U), P.push(U);
2410
+ for (var S = 0; S < C[0].length; S++) {
2411
+ var V = C[0][S].clone().multiply(R[z]);
2412
+ C[z].push(V), b.push(V);
2413
+ var B = I[0][S].clone().multiply(R[z]);
2414
+ I[z].push(B), P.push(B);
2415
2415
  }
2416
2416
  }
2417
2417
  function Z() {
2418
- for (var D = [
2418
+ for (var R = [
2419
2419
  !0,
2420
2420
  !1,
2421
2421
  !0,
@@ -2424,86 +2424,86 @@ var Nn = (
2424
2424
  !0,
2425
2425
  !1,
2426
2426
  !0
2427
- ], _ = E * (h - 1), x = 0; x < 8; x++) {
2428
- for (var R = M * x, Y = 0; Y < h - 1; Y++)
2429
- for (var te = Y * E, j = (Y + 1) * E, F = 0; F < h; F++) {
2430
- var W = F + 1, B = R + te + F, U = R + te + W, I = R + j + F, J = R + j + W;
2431
- D[x] ? (f.push(B), f.push(I), f.push(U), f.push(U), f.push(I), f.push(J)) : (f.push(B), f.push(U), f.push(I), f.push(U), f.push(J), f.push(I));
2427
+ ], S = T * (u - 1), _ = 0; _ < 8; _++) {
2428
+ for (var F = x * _, Y = 0; Y < u - 1; Y++)
2429
+ for (var ne = Y * T, H = (Y + 1) * T, U = 0; U < u; U++) {
2430
+ var W = U + 1, V = F + ne + U, B = F + ne + W, L = F + H + U, $ = F + H + W;
2431
+ R[_] ? (p.push(V), p.push(L), p.push(B), p.push(B), p.push(L), p.push($)) : (p.push(V), p.push(B), p.push(L), p.push(B), p.push($), p.push(L));
2432
2432
  }
2433
- for (var F = 0; F < h; F++) {
2434
- var B = R + _ + F, U = R + _ + F + 1, I = R + N;
2435
- D[x] ? (f.push(B), f.push(I), f.push(U)) : (f.push(B), f.push(U), f.push(I));
2433
+ for (var U = 0; U < u; U++) {
2434
+ var V = F + S + U, B = F + S + U + 1, L = F + k;
2435
+ R[_] ? (p.push(V), p.push(L), p.push(B)) : (p.push(V), p.push(B), p.push(L));
2436
2436
  }
2437
2437
  }
2438
2438
  }
2439
- function ee() {
2440
- var D = N, _ = N + M, x = N + M * 2, R = N + M * 3;
2441
- f.push(D), f.push(_), f.push(x), f.push(D), f.push(x), f.push(R), D = N + M * 4, _ = N + M * 5, x = N + M * 6, R = N + M * 7, f.push(D), f.push(x), f.push(_), f.push(D), f.push(R), f.push(x), D = 0, _ = M, x = M * 4, R = M * 5, f.push(D), f.push(x), f.push(_), f.push(_), f.push(x), f.push(R), D = M * 2, _ = M * 3, x = M * 6, R = M * 7, f.push(D), f.push(x), f.push(_), f.push(_), f.push(x), f.push(R), D = h, _ = h + M * 3, x = h + M * 4, R = h + M * 7, f.push(D), f.push(_), f.push(x), f.push(_), f.push(R), f.push(x), D = h + M, _ = h + M * 2, x = h + M * 5, R = h + M * 6, f.push(D), f.push(x), f.push(_), f.push(_), f.push(x), f.push(R);
2439
+ function te() {
2440
+ var R = k, S = k + x, _ = k + x * 2, F = k + x * 3;
2441
+ p.push(R), p.push(S), p.push(_), p.push(R), p.push(_), p.push(F), R = k + x * 4, S = k + x * 5, _ = k + x * 6, F = k + x * 7, p.push(R), p.push(_), p.push(S), p.push(R), p.push(F), p.push(_), R = 0, S = x, _ = x * 4, F = x * 5, p.push(R), p.push(_), p.push(S), p.push(S), p.push(_), p.push(F), R = x * 2, S = x * 3, _ = x * 6, F = x * 7, p.push(R), p.push(_), p.push(S), p.push(S), p.push(_), p.push(F), R = u, S = u + x * 3, _ = u + x * 4, F = u + x * 7, p.push(R), p.push(S), p.push(_), p.push(S), p.push(F), p.push(_), R = u + x, S = u + x * 2, _ = u + x * 5, F = u + x * 6, p.push(R), p.push(_), p.push(S), p.push(S), p.push(_), p.push(F);
2442
2442
  }
2443
2443
  function le() {
2444
- for (var D = 0; D < 4; D++)
2445
- for (var _ = D * M, x = 4 * M + _, R = (D & 1) === 1, Y = 0; Y < h; Y++) {
2446
- var te = Y + 1, j = _ + Y, F = _ + te, W = x + Y, B = x + te;
2447
- R ? (f.push(j), f.push(W), f.push(F), f.push(F), f.push(W), f.push(B)) : (f.push(j), f.push(F), f.push(W), f.push(F), f.push(B), f.push(W));
2444
+ for (var R = 0; R < 4; R++)
2445
+ for (var S = R * x, _ = 4 * x + S, F = (R & 1) === 1, Y = 0; Y < u; Y++) {
2446
+ var ne = Y + 1, H = S + Y, U = S + ne, W = _ + Y, V = _ + ne;
2447
+ F ? (p.push(H), p.push(W), p.push(U), p.push(U), p.push(W), p.push(V)) : (p.push(H), p.push(U), p.push(W), p.push(U), p.push(V), p.push(W));
2448
2448
  }
2449
2449
  }
2450
2450
  function me() {
2451
- for (var D = [0, 2, 4, 6], _ = [1, 3, 5, 7], x = 0; x < 4; x++)
2452
- for (var R = M * D[x], Y = M * _[x], te = 1 >= x, j = 0; j < h; j++) {
2453
- var F = j * E, W = (j + 1) * E, B = R + F, U = R + W, I = Y + F, J = Y + W;
2454
- te ? (f.push(B), f.push(I), f.push(U), f.push(U), f.push(I), f.push(J)) : (f.push(B), f.push(U), f.push(I), f.push(U), f.push(J), f.push(I));
2451
+ for (var R = [0, 2, 4, 6], S = [1, 3, 5, 7], _ = 0; _ < 4; _++)
2452
+ for (var F = x * R[_], Y = x * S[_], ne = 1 >= _, H = 0; H < u; H++) {
2453
+ var U = H * T, W = (H + 1) * T, V = F + U, B = F + W, L = Y + U, $ = Y + W;
2454
+ ne ? (p.push(V), p.push(L), p.push(B), p.push(B), p.push(L), p.push($)) : (p.push(V), p.push(B), p.push(L), p.push(B), p.push($), p.push(L));
2455
2455
  }
2456
2456
  }
2457
- function xe() {
2458
- for (var D = h - 1, _ = [0, 1, 4, 5], x = [3, 2, 7, 6], R = [0, 1, 1, 0], Y = 0; Y < 4; Y++)
2459
- for (var te = _[Y] * M, j = x[Y] * M, F = 0; F <= D; F++) {
2460
- var W = te + h + F * E, B = te + (F != D ? h + (F + 1) * E : M - 1), U = j + h + F * E, I = j + (F != D ? h + (F + 1) * E : M - 1);
2461
- R[Y] ? (f.push(W), f.push(U), f.push(B), f.push(B), f.push(U), f.push(I)) : (f.push(W), f.push(B), f.push(U), f.push(B), f.push(I), f.push(U));
2457
+ function Ce() {
2458
+ for (var R = u - 1, S = [0, 1, 4, 5], _ = [3, 2, 7, 6], F = [0, 1, 1, 0], Y = 0; Y < 4; Y++)
2459
+ for (var ne = S[Y] * x, H = _[Y] * x, U = 0; U <= R; U++) {
2460
+ var W = ne + u + U * T, V = ne + (U != R ? u + (U + 1) * T : x - 1), B = H + u + U * T, L = H + (U != R ? u + (U + 1) * T : x - 1);
2461
+ F[Y] ? (p.push(W), p.push(B), p.push(V), p.push(V), p.push(B), p.push(L)) : (p.push(W), p.push(V), p.push(B), p.push(V), p.push(L), p.push(B));
2462
2462
  }
2463
2463
  }
2464
- for (var ne = 0, ie = 0; ie < T.length; ie++)
2465
- S.setXYZ(ne, T[ie].x, T[ie].y, T[ie].z), A.setXYZ(ne, P[ie].x, P[ie].y, P[ie].z), ne++;
2466
- return c.setIndex(new w.BufferAttribute(new Uint16Array(f), 1)), c.setAttribute("position", S), c.setAttribute("normal", A), c;
2464
+ for (var re = 0, ie = 0; ie < b.length; ie++)
2465
+ O.setXYZ(re, b[ie].x, b[ie].y, b[ie].z), M.setXYZ(re, P[ie].x, P[ie].y, P[ie].z), re++;
2466
+ return l.setIndex(new w.BufferAttribute(new Uint16Array(p), 1)), l.setAttribute("position", O), l.setAttribute("normal", M), l;
2467
2467
  }
2468
2468
  return o;
2469
2469
  }(w.BufferGeometry)
2470
2470
  );
2471
- function Ye(p, o) {
2472
- return typeof p != "number" || typeof o != "number" ? !1 : Math.abs(p - o) < 1e-3;
2471
+ function Ye(f, o) {
2472
+ return typeof f != "number" || typeof o != "number" ? !1 : Math.abs(f - o) < 1e-3;
2473
2473
  }
2474
- function He(p, o, e, i) {
2475
- i === void 0 && (i = function(l) {
2476
- return l;
2474
+ function je(f, o, e, a) {
2475
+ a === void 0 && (a = function(s) {
2476
+ return s;
2477
2477
  });
2478
- var t = i(e);
2479
- return p * (1 - t) + o * t;
2478
+ var t = a(e);
2479
+ return f * (1 - t) + o * t;
2480
2480
  }
2481
- var Q = Number((Math.PI / 2).toFixed(5));
2482
- function In(p, o, e) {
2483
- var i = new w.Shape();
2484
- return i.moveTo(e, 0), i.lineTo(p - e, 0), i.absarc(p - e, e, e, -Q, 0, !1), i.lineTo(p, o - e), i.absarc(p - e, o - e, e, 0, Q, !1), i.lineTo(e, o), i.absarc(e, o - e, e, Q, Math.PI, !1), i.lineTo(0, e), i.absarc(e, e, e, Math.PI, Math.PI * 1.5, !1), i;
2481
+ var J = Number((Math.PI / 2).toFixed(5));
2482
+ function Nn(f, o, e) {
2483
+ var a = new w.Shape();
2484
+ return a.moveTo(e, 0), a.lineTo(f - e, 0), a.absarc(f - e, e, e, -J, 0, !1), a.lineTo(f, o - e), a.absarc(f - e, o - e, e, 0, J, !1), a.lineTo(e, o), a.absarc(e, o - e, e, J, Math.PI, !1), a.lineTo(0, e), a.absarc(e, e, e, Math.PI, Math.PI * 1.5, !1), a;
2485
2485
  }
2486
- var je = function(p) {
2486
+ var He = function(f) {
2487
2487
  var o = document.createElement("div");
2488
- o.innerText = p;
2488
+ o.innerText = f;
2489
2489
  var e = new we(o);
2490
- return e.name = p, e.scale.set(0.3, 0.3, 0.3), o.style.pointerEvents = "none", o.style.backfaceVisibility = "hidden", e;
2491
- }, tt = function(p) {
2490
+ return e.name = f, e.scale.set(0.3, 0.3, 0.3), o.style.pointerEvents = "none", o.style.backfaceVisibility = "hidden", e;
2491
+ }, it = function(f) {
2492
2492
  var o = new w.PlaneGeometry(5, 5), e = new w.MeshBasicMaterial({
2493
2493
  transparent: !0,
2494
2494
  opacity: 0
2495
- }), i = new w.Mesh(o, e), t = document.createElement("div");
2496
- t.innerText = p;
2497
- var l = new we(t);
2498
- return l.name = p, l.scale.set(0.3, 0.3, 0.3), t.style.color = "#ffffff", t.style.opacity = "0.5", t.style.pointerEvents = "none", t.style.backfaceVisibility = "hidden", i.rotateX(-Q), i.add(l), i;
2499
- }, Sn = (
2495
+ }), a = new w.Mesh(o, e), t = document.createElement("div");
2496
+ t.innerText = f;
2497
+ var s = new we(t);
2498
+ return s.name = f, s.scale.set(0.3, 0.3, 0.3), t.style.color = "#ffffff", t.style.opacity = "0.5", t.style.pointerEvents = "none", t.style.backfaceVisibility = "hidden", a.rotateX(-J), a.add(s), a;
2499
+ }, kn = (
2500
2500
  /** @class */
2501
- function(p) {
2502
- lt(o, p);
2503
- function o(e, i) {
2504
- var t = p.call(this, e) || this;
2505
- t.camera = new pn(90), t.scene = new w.Scene(), t.renderer = new w.WebGLRenderer({ antialias: !0, alpha: !0 }), t.css3drenderer = new Cn(), t.ambientLight = new w.AmbientLight(16777215, 0.7), t.wrapper = document.createElement("div"), t.arrows = document.createElement("div"), t.arrowLeft = document.createElement("div"), t.arrowRight = document.createElement("div"), t.arrowFront = document.createElement("div"), t.arrowBack = document.createElement("div"), t.arrowTop = document.createElement("div"), t.arrowBottom = document.createElement("div"), t.spherical = null, t.dragging = !1, t.style = document.createElement("style"), t.directionalLight = new w.DirectionalLight(16777215, 0.2), t.box = new w.Mesh(new Nn(8, 8, 8, 0.5, 20), new w.MeshPhongMaterial({ color: 16777215 })), t.faces = new w.Group(), t.orient = function(c) {
2506
- var g = c.longitude, d = c.latitude;
2501
+ function(f) {
2502
+ qe(o, f);
2503
+ function o(e, a) {
2504
+ var t = f.call(this, e) || this;
2505
+ t.camera = new dn(90), t.scene = new w.Scene(), t.renderer = new w.WebGLRenderer({ antialias: !0, alpha: !0 }), t.css3drenderer = new Sn(), t.ambientLight = new w.AmbientLight(16777215, 0.7), t.wrapper = document.createElement("div"), t.arrows = document.createElement("div"), t.arrowLeft = document.createElement("div"), t.arrowRight = document.createElement("div"), t.arrowFront = document.createElement("div"), t.arrowBack = document.createElement("div"), t.arrowTop = document.createElement("div"), t.arrowBottom = document.createElement("div"), t.spherical = null, t.dragging = !1, t.style = document.createElement("style"), t.directionalLight = new w.DirectionalLight(16777215, 0.2), t.box = new w.Mesh(new In(8, 8, 8, 0.5, 20), new w.MeshPhongMaterial({ color: 16777215 })), t.faces = new w.Group(), t.orient = function(l) {
2506
+ var g = l.longitude, d = l.latitude;
2507
2507
  t.dragging = !1, t.spherical = null, t.controls.enableDamping = !1, t.five.setState(Object.assign({
2508
2508
  latitude: d
2509
2509
  }, g !== void 0 ? {
@@ -2512,60 +2512,60 @@ var je = function(p) {
2512
2512
  t.controls.enableDamping = !0, t.setState({ arrowsVisible: !0 });
2513
2513
  });
2514
2514
  }, t.onRenderFrame = function() {
2515
- var c, g, d, m, E;
2516
- if (t.renderer.render(t.scene, t.camera), t.css3drenderer.render(t.scene, t.camera), t.directionalLight.position.copy(t.camera.position), (c = t.controls) === null || c === void 0 || c.update(), t.dragging) {
2515
+ var l, g, d, v, T;
2516
+ if (t.renderer.render(t.scene, t.camera), t.css3drenderer.render(t.scene, t.camera), t.directionalLight.position.copy(t.camera.position), (l = t.controls) === null || l === void 0 || l.update(), t.dragging) {
2517
2517
  t.camera.computePose(), t.updateByCamera();
2518
- var O = t.camera.pose, S = O.longitude, A = O.latitude;
2519
- t.five.setState({ longitude: S, latitude: A }, !0), t.updateArrows({ longitude: S, latitude: A });
2518
+ var A = t.camera.pose, O = A.longitude, M = A.latitude;
2519
+ t.five.setState({ longitude: O, latitude: M }, !0), t.updateArrows({ longitude: O, latitude: M });
2520
2520
  } else if (t.spherical && (!Ye(t.spherical.pi, (g = t.controls) === null || g === void 0 ? void 0 : g.getPolarAngle()) || !Ye(t.spherical.theta, (d = t.controls) === null || d === void 0 ? void 0 : d.getAzimuthalAngle()))) {
2521
- t.spherical = { pi: (m = t.controls) === null || m === void 0 ? void 0 : m.getPolarAngle(), theta: (E = t.controls) === null || E === void 0 ? void 0 : E.getAzimuthalAngle() }, t.camera.computePose(), t.updateByCamera();
2522
- var k = t.camera.pose, S = k.longitude, A = k.latitude;
2523
- t.five.setState({ longitude: S, latitude: A }, !0), t.updateArrows({ longitude: S, latitude: A });
2521
+ t.spherical = { pi: (v = t.controls) === null || v === void 0 ? void 0 : v.getPolarAngle(), theta: (T = t.controls) === null || T === void 0 ? void 0 : T.getAzimuthalAngle() }, t.camera.computePose(), t.updateByCamera();
2522
+ var C = t.camera.pose, O = C.longitude, M = C.latitude;
2523
+ t.five.setState({ longitude: O, latitude: M }, !0), t.updateArrows({ longitude: O, latitude: M });
2524
2524
  } else
2525
2525
  t.spherical = null;
2526
- }, t.onTapGesture = function(c) {
2527
- var g = c.pointers[0].clientX, d = c.pointers[0].clientY, m = Yt({ x: g, y: d }, t.wrapper), E = new w.Raycaster();
2528
- E.setFromCamera(m, t.camera);
2529
- var O = E.intersectObjects(t.faces.children, !1)[0];
2530
- if (O) {
2531
- var S = O.object.userData, A = S.longitude, k = S.latitude;
2532
- t.orient({ longitude: A, latitude: k });
2526
+ }, t.onTapGesture = function(l) {
2527
+ var g = l.pointers[0].clientX, d = l.pointers[0].clientY, v = jt({ x: g, y: d }, t.wrapper), T = new w.Raycaster();
2528
+ T.setFromCamera(v, t.camera);
2529
+ var A = T.intersectObjects(t.faces.children, !1)[0];
2530
+ if (A) {
2531
+ var O = A.object.userData, M = O.longitude, C = O.latitude;
2532
+ t.orient({ longitude: M, latitude: C });
2533
2533
  }
2534
2534
  }, t.onFiveWantsGesture = function() {
2535
2535
  if (t.spherical)
2536
2536
  return !1;
2537
- }, t.onFiveModeChange = function(c) {
2538
- t.controls && (t.controls.maxPolarAngle = c === "Topview" ? 0 : Q);
2539
- }, t.onCameraUpdate = function(c) {
2540
- var g = c.state;
2537
+ }, t.onFiveModeChange = function(l) {
2538
+ t.controls && (t.controls.maxPolarAngle = l === "Topview" ? 0 : J);
2539
+ }, t.onCameraUpdate = function(l) {
2540
+ var g = l.state;
2541
2541
  if (!t.dragging && !t.spherical) {
2542
- var d = g.longitude, m = g.latitude;
2543
- t.camera.pose.longitude === d && t.camera.pose.latitude === m || (t.camera.setFromPose({ longitude: d, latitude: m, distance: 20, offset: new w.Vector3(0, 0, 0) }), t.updateByCamera(), t.updateArrows({ longitude: d, latitude: m }));
2542
+ var d = g.longitude, v = g.latitude;
2543
+ t.camera.pose.longitude === d && t.camera.pose.latitude === v || (t.camera.setFromPose({ longitude: d, latitude: v, distance: 20, offset: new w.Vector3(0, 0, 0) }), t.updateByCamera(), t.updateArrows({ longitude: d, latitude: v }));
2544
2544
  }
2545
- }, t.onPanStart = function(c) {
2545
+ }, t.onPanStart = function(l) {
2546
2546
  t.dragging = !0, t.spherical = {};
2547
- }, t.onMouseMove = function(c) {
2547
+ }, t.onMouseMove = function(l) {
2548
2548
  if (!t.dragging) {
2549
- var g = Yt({ x: c.clientX, y: c.clientY }, t.wrapper), d = new w.Raycaster();
2549
+ var g = jt({ x: l.clientX, y: l.clientY }, t.wrapper), d = new w.Raycaster();
2550
2550
  d.setFromCamera(g, t.camera);
2551
- var m = d.intersectObjects(t.faces.children, !1)[0];
2552
- t.faces.children.forEach(function(E) {
2553
- E.material.opacity = 0, E.children[0].element.style.color = "";
2554
- }), m && (m.object.material.opacity = 0.3, m.object.children[0].element.style.color = "#336dff");
2551
+ var v = d.intersectObjects(t.faces.children, !1)[0];
2552
+ t.faces.children.forEach(function(T) {
2553
+ T.material.opacity = 0, T.children[0].element.style.color = "";
2554
+ }), v && (v.object.material.opacity = 0.3, v.object.children[0].element.style.color = "#336dff");
2555
2555
  }
2556
- }, t.onPanEnd = function(c) {
2556
+ }, t.onPanEnd = function(l) {
2557
2557
  t.dragging = !1, t.spherical = { pi: t.controls.getPolarAngle(), theta: t.controls.getAzimuthalAngle() };
2558
2558
  }, t.dispose = function() {
2559
2559
  t.disable();
2560
2560
  }, t.five = e;
2561
- var l = {
2561
+ var s = {
2562
2562
  enabled: !1,
2563
2563
  visible: !0,
2564
2564
  arrowsVisible: !1
2565
2565
  };
2566
- t.state = Object.assign(l, i == null ? void 0 : i.initialState);
2567
- var h = ae({ fixedLongitude: 0, orthoView: !0 }, i == null ? void 0 : i.config);
2568
- return t._config = h, t.state.enabled && t._enable({ userAction: !1 }), t.mc = new bt.Manager(t.wrapper), t.mc.add(new bt.Tap({ interval: 410 })), t.mc.add(new bt.Pan({ threshold: 10, pointers: 0 })), t.camera.setFromPose({
2566
+ t.state = Object.assign(s, a == null ? void 0 : a.initialState);
2567
+ var u = q({ fixedLongitude: 0, orthoView: !0 }, a == null ? void 0 : a.config);
2568
+ return t._config = u, t.state.enabled && t._enable({ userAction: !1 }), t.mc = new Tt.Manager(t.wrapper), t.mc.add(new Tt.Tap({ interval: 410 })), t.mc.add(new Tt.Pan({ threshold: 10, pointers: 0 })), t.camera.setFromPose({
2569
2569
  distance: 20,
2570
2570
  offset: new w.Vector3(0, 0, 0),
2571
2571
  longitude: e.camera.pose.latitude,
@@ -2619,31 +2619,31 @@ var je = function(p) {
2619
2619
  }
2620
2620
  return Object.defineProperty(o.prototype, "config", {
2621
2621
  get: function() {
2622
- return ae({}, this._config);
2622
+ return q({}, this._config);
2623
2623
  },
2624
2624
  enumerable: !1,
2625
2625
  configurable: !0
2626
- }), o.prototype.updateState = function(e, i) {
2626
+ }), o.prototype.updateState = function(e, a) {
2627
2627
  var t = this.state;
2628
- this.state = ae(ae({}, this.state), e), typeof e.arrowsVisible == "boolean" && this.handleArrowsVisible(e.arrowsVisible), this.hooks.emit("stateChange", { state: this.state, prevState: t, userAction: i });
2628
+ this.state = q(q({}, this.state), e), typeof e.arrowsVisible == "boolean" && this.handleArrowsVisible(e.arrowsVisible), this.hooks.emit("stateChange", { state: this.state, prevState: t, userAction: a });
2629
2629
  }, o.prototype.appendTo = function(e) {
2630
2630
  if (e) {
2631
2631
  e.appendChild(this.wrapper);
2632
- var i = this.wrapper.getBoundingClientRect(), t = i.width, l = i.height;
2633
- this.renderer.setSize(t, l), this.css3drenderer.setSize(t, l);
2632
+ var a = this.wrapper.getBoundingClientRect(), t = a.width, s = a.height;
2633
+ this.renderer.setSize(t, s), this.css3drenderer.setSize(t, s);
2634
2634
  }
2635
2635
  }, o.prototype.init = function() {
2636
2636
  this.renderer.setClearAlpha(0), this.renderer.domElement.style.outline = "none", this.initDom(), this.initFaces(), this.initControls(), this.initLights();
2637
2637
  var e = this.cylinder;
2638
2638
  e.position.y = -3;
2639
- var i = tt("西");
2640
- i.position.set(-19, 0, 0), e.add(i);
2641
- var t = tt("东");
2639
+ var a = it("西");
2640
+ a.position.set(-19, 0, 0), e.add(a);
2641
+ var t = it("东");
2642
2642
  t.position.set(19, 0, 0), e.add(t);
2643
- var l = tt("北");
2644
- l.position.set(0, 0, -19), e.add(l);
2645
- var h = tt("南");
2646
- h.position.set(0, 0, 19), e.add(h), this.updateByCamera(), this.scene.add(e, this.box, this.faces), this.scene.rotation.y = this.config.fixedLongitude;
2643
+ var s = it("北");
2644
+ s.position.set(0, 0, -19), e.add(s);
2645
+ var u = it("南");
2646
+ u.position.set(0, 0, 19), e.add(u), this.updateByCamera(), this.scene.add(e, this.box, this.faces), this.scene.rotation.y = this.config.fixedLongitude;
2647
2647
  }, o.prototype.initDom = function() {
2648
2648
  this.style.innerHTML = `
2649
2649
  .OrientationPlugin .OrientationArrows {
@@ -2749,11 +2749,11 @@ var je = function(p) {
2749
2749
  }, o.prototype.bindEvents = function() {
2750
2750
  var e = this;
2751
2751
  this.five.on("renderFrame", this.onRenderFrame), this.five.on("camera.update", this.onCameraUpdate), this.five.on("wantsGesture", this.onFiveWantsGesture), this.five.on("modeChange", this.onFiveModeChange), this.mc.on("tap", this.onTapGesture), this.mc.on("panstart", this.onPanStart), this.mc.on("panend", this.onPanEnd), this.wrapper.addEventListener("mousemove", this.onMouseMove), this.arrowTop.onclick = function() {
2752
- return e.orient({ longitude: 0, latitude: Q });
2752
+ return e.orient({ longitude: 0, latitude: J });
2753
2753
  }, this.arrowLeft.onclick = function() {
2754
- return e.orient({ longitude: -Q, latitude: 0 });
2754
+ return e.orient({ longitude: -J, latitude: 0 });
2755
2755
  }, this.arrowRight.onclick = function() {
2756
- return e.orient({ longitude: Q, latitude: 0 });
2756
+ return e.orient({ longitude: J, latitude: 0 });
2757
2757
  }, this.arrowFront.onclick = function() {
2758
2758
  return e.orient({ longitude: 0, latitude: 0 });
2759
2759
  }, this.arrowBack.onclick = function() {
@@ -2762,46 +2762,46 @@ var je = function(p) {
2762
2762
  }, o.prototype.unbindEvents = function() {
2763
2763
  this.five.off("renderFrame", this.onRenderFrame), this.five.off("camera.update", this.onCameraUpdate), this.five.off("wantsGesture", this.onFiveWantsGesture), this.five.off("modeChange", this.onFiveModeChange), this.mc.off("tap", this.onTapGesture), this.mc.off("panstart", this.onPanStart), this.mc.off("panend", this.onPanEnd), this.wrapper.removeEventListener("mousemove", this.onMouseMove), this.arrowTop.onclick = null, this.arrowLeft.onclick = null, this.arrowRight.onclick = null, this.arrowFront.onclick = null, this.arrowBack.onclick = null;
2764
2764
  }, o.prototype.updateByCamera = function() {
2765
- var e = He(0.2, 1, this.camera.pose.latitude / Math.PI * 2, function(c) {
2766
- return c * c;
2767
- }), i = He(11, 13, this.camera.pose.latitude / Math.PI * 2, function(c) {
2768
- return c * c;
2769
- }), t = He(12, 15, this.camera.pose.latitude / Math.PI * 2, function(c) {
2770
- return c * c;
2771
- }), l = He(13, 19, this.camera.pose.latitude / Math.PI * 2, function(c) {
2772
- return c * c;
2773
- }), h = He(-0.2, 0.5, this.camera.pose.latitude / Math.PI * 2, function(c) {
2774
- return c * c;
2765
+ var e = je(0.2, 1, this.camera.pose.latitude / Math.PI * 2, function(l) {
2766
+ return l * l;
2767
+ }), a = je(11, 13, this.camera.pose.latitude / Math.PI * 2, function(l) {
2768
+ return l * l;
2769
+ }), t = je(12, 15, this.camera.pose.latitude / Math.PI * 2, function(l) {
2770
+ return l * l;
2771
+ }), s = je(13, 19, this.camera.pose.latitude / Math.PI * 2, function(l) {
2772
+ return l * l;
2773
+ }), u = je(-0.2, 0.5, this.camera.pose.latitude / Math.PI * 2, function(l) {
2774
+ return l * l;
2775
2775
  });
2776
- this.cylinder.geometry = new w.CylinderGeometry(i, t, 0.01, 50, 1, !0), this.cylinder.material.uniforms.radiusTop.value = i, this.cylinder.material.uniforms.radiusBottom.value = t, this.cylinder.material.needsUpdate = !0, this.cylinder.children.forEach(function(c) {
2777
- c.position.normalize().multiplyScalar(l), c.scale.set(e, e, e);
2778
- var g = c.children[0];
2779
- g && (g.element.style.opacity = h.toString());
2776
+ this.cylinder.geometry = new w.CylinderGeometry(a, t, 0.01, 50, 1, !0), this.cylinder.material.uniforms.radiusTop.value = a, this.cylinder.material.uniforms.radiusBottom.value = t, this.cylinder.material.needsUpdate = !0, this.cylinder.children.forEach(function(l) {
2777
+ l.position.normalize().multiplyScalar(s), l.scale.set(e, e, e);
2778
+ var g = l.children[0];
2779
+ g && (g.element.style.opacity = u.toString());
2780
2780
  });
2781
2781
  }, o.prototype.updateArrows = function(e) {
2782
2782
  e.longitude;
2783
- var i = e.latitude, t = Q - i < 0.02;
2783
+ var a = e.latitude, t = J - a < 0.02;
2784
2784
  this.setState({ arrowsVisible: t });
2785
2785
  }, o.prototype.handleArrowsVisible = function(e) {
2786
- var i = this;
2786
+ var a = this;
2787
2787
  if (this.state.enabled)
2788
2788
  if (this.cylinder.material.uniforms.opacity.value = e ? 0.4 : 1, this.cylinder.material.needsUpdate = !0, e) {
2789
- var t = this.five.getCurrentState(), l = t.longitude, h = t.latitude;
2790
- if (Q - h < 0.03)
2791
- this.five.state.mode === "Topview" || this.five.state.mode === "Mapview" ? (this.faces.getObjectByName("上").element.className = "active", this.arrows.innerHTML = "", this.arrows.appendChild(this.arrowBack), this.arrows.appendChild(this.arrowLeft), this.arrows.appendChild(this.arrowRight), this.arrows.appendChild(this.arrowFront), this.arrows.style.transform = "rotate(".concat((l - this.config.fixedLongitude) / Math.PI * 180, "deg)")) : (this.arrows.innerHTML = "", this.faces.getObjectByName("上").element.className = "");
2789
+ var t = this.five.getCurrentState(), s = t.longitude, u = t.latitude;
2790
+ if (J - u < 0.03)
2791
+ this.five.state.mode === "Topview" || this.five.state.mode === "Mapview" ? (this.faces.getObjectByName("上").element.className = "active", this.arrows.innerHTML = "", this.arrows.appendChild(this.arrowBack), this.arrows.appendChild(this.arrowLeft), this.arrows.appendChild(this.arrowRight), this.arrows.appendChild(this.arrowFront), this.arrows.style.transform = "rotate(".concat((s - this.config.fixedLongitude) / Math.PI * 180, "deg)")) : (this.arrows.innerHTML = "", this.faces.getObjectByName("上").element.className = "");
2792
2792
  else {
2793
2793
  switch (this.arrows.innerHTML = "", this.arrows.appendChild(this.arrowTop), this.config.orthoView && this.five.ready().then(function() {
2794
- i.five.controller.cameraType = "orthographic", i.five.ready().then(function() {
2795
- return i.five.controller.cameraMotion.ended = !1;
2794
+ a.five.controller.cameraType = "orthographic", a.five.ready().then(function() {
2795
+ return a.five.controller.cameraMotion.ended = !1;
2796
2796
  });
2797
2797
  }), !0) {
2798
- case Ye(0, l - this.config.fixedLongitude):
2798
+ case Ye(0, s - this.config.fixedLongitude):
2799
2799
  this.arrows.appendChild(this.arrowLeft), this.arrows.appendChild(this.arrowRight), this.arrows.appendChild(this.arrowBottom), this.faces.getObjectByName("前").element.className = "active";
2800
2800
  break;
2801
- case Ye(Q, l - this.config.fixedLongitude):
2801
+ case Ye(J, s - this.config.fixedLongitude):
2802
2802
  this.arrows.appendChild(this.arrowFront), this.arrows.appendChild(this.arrowBack), this.arrows.appendChild(this.arrowBottom), this.faces.getObjectByName("右").element.className = "active";
2803
2803
  break;
2804
- case Ye(Math.PI, l - this.config.fixedLongitude):
2804
+ case Ye(Math.PI, s - this.config.fixedLongitude):
2805
2805
  this.arrows.appendChild(this.arrowRight), this.arrows.appendChild(this.arrowLeft), this.arrows.appendChild(this.arrowBottom), this.faces.getObjectByName("后").element.className = "active";
2806
2806
  break;
2807
2807
  default:
@@ -2813,38 +2813,38 @@ var je = function(p) {
2813
2813
  this.arrows.style.display = "block";
2814
2814
  } else
2815
2815
  this.config.orthoView && (this.five.controller.cameraType = "auto", this.five.ready().then(function() {
2816
- return i.five.controller.cameraMotion.ended = !1;
2817
- })), this.arrows.style.display = "none", this.faces.children.forEach(function(c) {
2818
- c.children[0].element.className = "";
2816
+ return a.five.controller.cameraMotion.ended = !1;
2817
+ })), this.arrows.style.display = "none", this.faces.children.forEach(function(l) {
2818
+ l.children[0].element.className = "";
2819
2819
  });
2820
- }, o.prototype.setState = function(e, i) {
2821
- i === void 0 && (i = {});
2822
- var t = this.state, l = i.userAction !== void 0 ? i.userAction : !0;
2823
- if (this.updateState(e, l), e.enabled !== void 0 && t.enabled !== e.enabled) {
2824
- var h = { userAction: l };
2825
- e.enabled ? this._enable(h) : this._disable(h);
2820
+ }, o.prototype.setState = function(e, a) {
2821
+ a === void 0 && (a = {});
2822
+ var t = this.state, s = a.userAction !== void 0 ? a.userAction : !0;
2823
+ if (this.updateState(e, s), e.enabled !== void 0 && t.enabled !== e.enabled) {
2824
+ var u = { userAction: s };
2825
+ e.enabled ? this._enable(u) : this._disable(u);
2826
2826
  }
2827
2827
  }, o.prototype.initLights = function() {
2828
2828
  this.directionalLight.target = this.box, this.scene.add(this.ambientLight, this.directionalLight);
2829
2829
  }, o.prototype.initFaces = function() {
2830
- var e = In(7, 7, 0.5), i = new w.ShapeGeometry(e);
2831
- i.translate(-3.5, -3.5, 0);
2832
- var t = new w.Mesh(i, new w.MeshBasicMaterial({ transparent: !0, color: 3370495, opacity: 0 }));
2833
- t.userData = { longitude: 0, latitude: 0 }, t.position.z = 4.1, t.add(je("前"));
2834
- var l = new w.Mesh(i, new w.MeshBasicMaterial({ transparent: !0, color: 3370495, opacity: 0 }));
2835
- l.rotateY(Math.PI), l.position.z = -4.1, l.add(je("后")), l.userData = { longitude: Math.PI, latitude: 0 };
2836
- var h = new w.Mesh(i, new w.MeshBasicMaterial({ transparent: !0, color: 3370495, opacity: 0 }));
2837
- h.rotateY(Q), h.position.x = 4.1, h.add(je("右")), h.userData = { longitude: Q, latitude: 0 };
2838
- var c = new w.Mesh(i, new w.MeshBasicMaterial({ transparent: !0, color: 3370495, opacity: 0 }));
2839
- c.rotateY(-Q), c.position.x = -4.1, c.add(je("左")), c.userData = { longitude: -Q, latitude: 0 };
2840
- var g = new w.Mesh(i, new w.MeshBasicMaterial({ transparent: !0, color: 3370495, opacity: 0 }));
2841
- g.rotateX(-Q), g.position.y = 4.1, g.add(je("上")), g.userData = { longitude: 0, latitude: Q }, this.faces.add(t, l, c, h, g);
2830
+ var e = Nn(7, 7, 0.5), a = new w.ShapeGeometry(e);
2831
+ a.translate(-3.5, -3.5, 0);
2832
+ var t = new w.Mesh(a, new w.MeshBasicMaterial({ transparent: !0, color: 3370495, opacity: 0 }));
2833
+ t.userData = { longitude: 0, latitude: 0 }, t.position.z = 4.1, t.add(He("前"));
2834
+ var s = new w.Mesh(a, new w.MeshBasicMaterial({ transparent: !0, color: 3370495, opacity: 0 }));
2835
+ s.rotateY(Math.PI), s.position.z = -4.1, s.add(He("后")), s.userData = { longitude: Math.PI, latitude: 0 };
2836
+ var u = new w.Mesh(a, new w.MeshBasicMaterial({ transparent: !0, color: 3370495, opacity: 0 }));
2837
+ u.rotateY(J), u.position.x = 4.1, u.add(He("右")), u.userData = { longitude: J, latitude: 0 };
2838
+ var l = new w.Mesh(a, new w.MeshBasicMaterial({ transparent: !0, color: 3370495, opacity: 0 }));
2839
+ l.rotateY(-J), l.position.x = -4.1, l.add(He("左")), l.userData = { longitude: -J, latitude: 0 };
2840
+ var g = new w.Mesh(a, new w.MeshBasicMaterial({ transparent: !0, color: 3370495, opacity: 0 }));
2841
+ g.rotateX(-J), g.position.y = 4.1, g.add(He("上")), g.userData = { longitude: 0, latitude: J }, this.faces.add(t, s, l, u, g);
2842
2842
  }, o.prototype.initControls = function() {
2843
- var e = this.controls = new ze(this.camera, this.renderer.domElement);
2844
- e.enableZoom = !1, e.enableDamping = !0, e.enablePan = !1, e.maxPolarAngle = Q, e.dampingFactor = 0.15, e.rotateSpeed = 0.25;
2843
+ var e = this.controls = new We(this.camera, this.renderer.domElement);
2844
+ e.enableZoom = !1, e.enableDamping = !0, e.enablePan = !1, e.maxPolarAngle = J, e.dampingFactor = 0.15, e.rotateSpeed = 0.25;
2845
2845
  }, o.prototype.load = function(e) {
2846
- return at(this, void 0, void 0, function() {
2847
- return it(this, function(i) {
2846
+ return Xe(this, void 0, void 0, function() {
2847
+ return Ge(this, function(a) {
2848
2848
  return [
2849
2849
  2
2850
2850
  /*return*/
@@ -2852,61 +2852,61 @@ var je = function(p) {
2852
2852
  });
2853
2853
  });
2854
2854
  }, o.prototype._enable = function(e) {
2855
- var i = this.five.getCurrentState(), t = i.longitude, l = i.latitude;
2856
- this.camera.setFromPose({ longitude: t, latitude: l, distance: 20, offset: new w.Vector3(0, 0, 0) }), this.updateByCamera(), this.wrapper.appendChild(this.renderer.domElement), this.wrapper.appendChild(this.css3drenderer.domElement), this.bindEvents();
2855
+ var a = this.five.getCurrentState(), t = a.longitude, s = a.latitude;
2856
+ this.camera.setFromPose({ longitude: t, latitude: s, distance: 20, offset: new w.Vector3(0, 0, 0) }), this.updateByCamera(), this.wrapper.appendChild(this.renderer.domElement), this.wrapper.appendChild(this.css3drenderer.domElement), this.bindEvents();
2857
2857
  }, o.prototype._disable = function(e) {
2858
2858
  this.wrapper.removeChild(this.renderer.domElement), this.wrapper.removeChild(this.css3drenderer.domElement), this.unbindEvents();
2859
2859
  }, o.prototype.enable = function(e) {
2860
- var i;
2860
+ var a;
2861
2861
  if (!this.state.enabled) {
2862
- var t = (i = e == null ? void 0 : e.userAction) !== null && i !== void 0 ? i : !0;
2862
+ var t = (a = e == null ? void 0 : e.userAction) !== null && a !== void 0 ? a : !0;
2863
2863
  this.updateState({ enabled: !0 }, t), this._enable({ userAction: t }), document.head.appendChild(this.style);
2864
2864
  }
2865
2865
  }, o.prototype.disable = function(e) {
2866
- var i;
2866
+ var a;
2867
2867
  if (this.state.enabled !== !1) {
2868
- var t = (i = e == null ? void 0 : e.userAction) !== null && i !== void 0 ? i : !0;
2868
+ var t = (a = e == null ? void 0 : e.userAction) !== null && a !== void 0 ? a : !0;
2869
2869
  this.updateState({ enabled: !1 }, t), this._disable({ userAction: t }), document.head.removeChild(this.style);
2870
2870
  }
2871
2871
  }, o;
2872
- }(rt.Controller)
2873
- ), Un = function(p, o) {
2874
- return new Sn(p, o);
2875
- }, kn = (
2872
+ }(ze.Controller)
2873
+ ), Vn = function(f, o) {
2874
+ return new kn(f, o);
2875
+ }, Ln = (
2876
2876
  /** @class */
2877
- function(p) {
2878
- lt(o, p);
2879
- function o(e, i) {
2880
- var t = p.call(this, e) || this;
2881
- return t.data = {}, t.pluginName = "BackgroundPlugin", t._onFiveCameraUpdate = function(l) {
2882
- var h = (Math.PI / 2 - Math.max(l.latitude, 0)) / (Math.PI / 2), c = Math.max(0.2 - h, 0) * 10;
2883
- t.gradientBg && (t.gradientBg.style.transform = "translateY(-".concat((1 - h) * 50, "%)")), t.groundBg && (t.groundBg.style.backgroundImage = "radial-gradient(circle, #2E303350 ".concat(c * 100, "%, transparent ").concat(c * 120, "%)"));
2877
+ function(f) {
2878
+ qe(o, f);
2879
+ function o(e, a) {
2880
+ var t = f.call(this, e) || this;
2881
+ return t.data = {}, t.pluginName = "BackgroundPlugin", t._onFiveCameraUpdate = function(s) {
2882
+ var u = (Math.PI / 2 - Math.max(s.latitude, 0)) / (Math.PI / 2), l = Math.max(0.2 - u, 0) * 10;
2883
+ t.gradientBg && (t.gradientBg.style.transform = "translateY(-".concat((1 - u) * 50, "%)")), t.groundBg && (t.groundBg.style.backgroundImage = "radial-gradient(circle, #2E303350 ".concat(l * 100, "%, transparent ").concat(l * 120, "%)"));
2884
2884
  }, t._addEventListener = function() {
2885
2885
  t.five.on("cameraUpdate", t._onFiveCameraUpdate);
2886
2886
  }, t._removeEventListener = function() {
2887
2887
  t.five.off("cameraUpdate", t._onFiveCameraUpdate);
2888
2888
  }, t.load = function() {
2889
- return at(t, void 0, void 0, function() {
2890
- return it(this, function(l) {
2889
+ return Xe(t, void 0, void 0, function() {
2890
+ return Ge(this, function(s) {
2891
2891
  return [
2892
2892
  2
2893
2893
  /*return*/
2894
2894
  ];
2895
2895
  });
2896
2896
  });
2897
- }, t.setState = function(l, h) {
2897
+ }, t.setState = function(s, u) {
2898
2898
  }, t.enable = function() {
2899
- var l, h = (l = t.five.getElement()) === null || l === void 0 ? void 0 : l.parentNode;
2900
- if (!h) {
2899
+ var s, u = (s = t.five.getElement()) === null || s === void 0 ? void 0 : s.parentNode;
2900
+ if (!u) {
2901
2901
  t.five.ready().then(function() {
2902
2902
  return t.enable();
2903
2903
  });
2904
2904
  return;
2905
2905
  }
2906
- t.state.enabled || (t._onFiveCameraUpdate(t.five.getPose(), !1), t.gradientBg && h.appendChild(t.gradientBg), t.groundBg && h.appendChild(t.groundBg), t.style && document.head.appendChild(t.style), t._addEventListener(), t.hooks.emit("enable", { userAction: !0 }), t.state.enabled = !0);
2907
- }, t.disable = function(l) {
2908
- var h, c, g, d;
2909
- t.state.enabled && ((c = (h = t.gradientBg) === null || h === void 0 ? void 0 : h.parentNode) === null || c === void 0 || c.removeChild(t.gradientBg), (d = (g = t.groundBg) === null || g === void 0 ? void 0 : g.parentNode) === null || d === void 0 || d.removeChild(t.groundBg), t.style && document.head.removeChild(t.style), t._removeEventListener(), t.hooks.emit("disable", { userAction: !0 }), t.state.enabled = !1);
2906
+ t.state.enabled || (t._onFiveCameraUpdate(t.five.getPose(), !1), t.gradientBg && u.appendChild(t.gradientBg), t.groundBg && u.appendChild(t.groundBg), t.style && document.head.appendChild(t.style), t._addEventListener(), t.hooks.emit("enable", { userAction: !0 }), t.state.enabled = !0);
2907
+ }, t.disable = function(s) {
2908
+ var u, l, g, d;
2909
+ t.state.enabled && ((l = (u = t.gradientBg) === null || u === void 0 ? void 0 : u.parentNode) === null || l === void 0 || l.removeChild(t.gradientBg), (d = (g = t.groundBg) === null || g === void 0 ? void 0 : g.parentNode) === null || d === void 0 || d.removeChild(t.groundBg), t.style && document.head.removeChild(t.style), t._removeEventListener(), t.hooks.emit("disable", { userAction: !0 }), t.state.enabled = !1);
2910
2910
  }, t.dispose = function() {
2911
2911
  t._removeEventListener(), t.hooks.emit("disable", { userAction: !0 }), t.state.enabled = !1;
2912
2912
  }, t.state = {
@@ -2935,14 +2935,179 @@ var je = function(p) {
2935
2935
  `, t.enable()), t;
2936
2936
  }
2937
2937
  return o;
2938
- }(vn.Controller)
2939
- ), Bn = function(p, o) {
2940
- return new kn(p, o);
2938
+ }(mn.Controller)
2939
+ ), Yn = function(f, o) {
2940
+ return new Ln(f, o);
2941
+ };
2942
+ new w.Matrix4().fromArray([
2943
+ 1,
2944
+ 0,
2945
+ 0,
2946
+ 0,
2947
+ 0,
2948
+ 0,
2949
+ 1,
2950
+ 0,
2951
+ 0,
2952
+ -1,
2953
+ 0,
2954
+ 0,
2955
+ 0,
2956
+ 0,
2957
+ 0,
2958
+ 1
2959
+ ]);
2960
+ var wt = (
2961
+ /** @class */
2962
+ function() {
2963
+ function f(o, e, a, t, s) {
2964
+ this.R = o, this.Q = e, this.A = a, this.B = t, this.C = s, this.cov = NaN, this.x = NaN;
2965
+ }
2966
+ return f.prototype.filter = function(o, e) {
2967
+ if (e === void 0 && (e = 0), isNaN(this.x))
2968
+ this.x = 1 / this.C * o, this.cov = 1 / this.C * this.Q * (1 / this.C);
2969
+ else {
2970
+ var a = this.A * this.x + this.B * e, t = this.A * this.cov * this.A + this.R, s = t * this.C * (1 / (this.C * t * this.C + this.Q));
2971
+ this.x = a + s * (o - this.C * a), this.cov = t - s * this.C * t;
2972
+ }
2973
+ return this.x;
2974
+ }, f;
2975
+ }()
2976
+ ), Dn = (
2977
+ /** @class */
2978
+ function(f) {
2979
+ qe(o, f);
2980
+ function o(e, a) {
2981
+ var t = f.call(this, e) || this;
2982
+ t.dispose = function() {
2983
+ t.disable();
2984
+ }, t.five = e;
2985
+ var s = {
2986
+ enabled: !0,
2987
+ visible: !0
2988
+ };
2989
+ t.state = Object.assign(s, a == null ? void 0 : a.initialState);
2990
+ var u = q({}, a == null ? void 0 : a.config);
2991
+ return t._config = u, t.state.enabled && t._enable({ userAction: !1 }), t.cancelAnimation = null, t.skipStart = 0, t.skipEnd = 0, t.location = 0, t.totalDistance = 0, t.trajectory = null, t.currentKeyFrame = null, t.nextKeyframe = null, t.nextButOneKeyframe = null, t.keyframes = [], t.rate = t.config.rate || 1, t.virualCamera = t.five.camera.clone(), t.playingState = {
2992
+ keyframeIndex: null,
2993
+ progress: null
2994
+ }, Object.defineProperties(t, {
2995
+ currentDistance: {
2996
+ get: function() {
2997
+ return this._currentDistance;
2998
+ },
2999
+ set: function(l) {
3000
+ this._currentDistance = l;
3001
+ }
3002
+ }
3003
+ }), t;
3004
+ }
3005
+ return Object.defineProperty(o.prototype, "config", {
3006
+ get: function() {
3007
+ return q({}, this._config);
3008
+ },
3009
+ enumerable: !1,
3010
+ configurable: !0
3011
+ }), o.prototype.updateState = function(e, a) {
3012
+ var t = this.state;
3013
+ this.state = q(q({}, this.state), e), this.hooks.emit("stateChange", { state: this.state, prevState: t, userAction: a });
3014
+ }, o.prototype.load = function(e) {
3015
+ return Xe(this, void 0, void 0, function() {
3016
+ return Ge(this, function(a) {
3017
+ return [
3018
+ 2
3019
+ /*return*/
3020
+ ];
3021
+ });
3022
+ });
3023
+ }, o.prototype.loadTrajectory = function(e) {
3024
+ this.trajectory = e, this.cancelAnimation && this.cancelAnimation(), this.playingState.keyframeIndex = null, this.playingState.progress = null;
3025
+ var a = 0.01, t = 0.1, s = 1, u = 0, l = 1, g = new wt(a, t, s, u, l), d = new wt(a, t, s, u, l), v = new wt(a, t, s, u, l);
3026
+ if (this.trajectory && this.trajectory.content.loadState === "READY") {
3027
+ var T = this.trajectory.content.data.object.line.geometry.attributes.position, A = this.trajectory.content.data.object.line.geometry.attributes.lineDistance;
3028
+ this.totalDistance = A.array[A.array.length - 1];
3029
+ for (var O = 0; O < A.array.length; O++) {
3030
+ for (var M = new w.Vector3(0, 0, 0), C = 0, I = O - 5; I < O + 6; I++)
3031
+ I >= 0 && I < A.array.length && (M.add(new w.Vector3(T.array[I * 3], T.array[I * 3 + 1], T.array[I * 3 + 2])), C++);
3032
+ M.divideScalar(C).applyMatrix4(e.transform);
3033
+ var y = g.filter(M.x), b = d.filter(M.y), P = v.filter(M.z), p = {
3034
+ position: new w.Vector3(y, b, P),
3035
+ location: A.array[O]
3036
+ };
3037
+ this.keyframes.push(p);
3038
+ }
3039
+ } else
3040
+ throw new Error("trajectory content is not ready");
3041
+ }, o.prototype.setPlayingState = function(e) {
3042
+ (e.keyframeIndex !== null || e.progress !== null) && (this.cancelAnimation && this.cancelAnimation(), this.playingState.keyframeIndex = e.keyframeIndex ? e.keyframeIndex : this.playingState.keyframeIndex, this.playingState.progress = e.progress ? e.progress : this.playingState.progress, this.play());
3043
+ }, o.prototype._enable = function(e) {
3044
+ }, o.prototype.play = function() {
3045
+ var e = this, a = this.keyframes.length;
3046
+ if (a < 2)
3047
+ throw new Error("keyframes length must be greater than 2");
3048
+ var t = {
3049
+ keyframeIndex: null,
3050
+ progress: null
3051
+ };
3052
+ this.playingState.keyframeIndex !== null && this.playingState.progress !== null ? (t.keyframeIndex = this.playingState.keyframeIndex, t.progress = this.playingState.progress) : this.playingState.keyframeIndex === null && this.playingState.progress === null && (this.playingState.keyframeIndex = this.skipStart, this.playingState.progress = 0, this.virualCamera.position.copy(this.keyframes[this.playingState.keyframeIndex].position.clone()), this.virualCamera.lookAt(this.keyframes[1].position.clone()), this.virualCamera.computePose(), this.five.setState(q({}, this.virualCamera.pose)));
3053
+ var s = this.playingState.keyframeIndex, u = 0;
3054
+ this.cancelAnimation = Ht.shared.add(function(l, g) {
3055
+ if (s === a - 1 - e.skipEnd && e.cancelAnimation) {
3056
+ e.cancelAnimation();
3057
+ return;
3058
+ }
3059
+ e.currentKeyFrame = e.keyframes[s], e.nextKeyframe = e.keyframes[s + 1], s + 2 <= a - 1 ? e.nextButOneKeyframe = e.keyframes[s + 2] : e.nextButOneKeyframe = null;
3060
+ var d = e.currentKeyFrame.position.clone(), v = e.nextKeyframe.position.clone(), T = e.nextKeyframe.position.clone().sub(e.currentKeyFrame.position.clone()).normalize(), A = d.clone().add(T.clone().multiplyScalar(0.01)), O = new w.Vector3();
3061
+ e.nextButOneKeyframe !== null ? O = e.nextButOneKeyframe.position.clone().sub(e.nextKeyframe.position.clone()).normalize() : O.copy(T);
3062
+ var M = v.clone().add(O.clone().multiplyScalar(0.01));
3063
+ u += g / 1e3 * e.rate;
3064
+ var C = u / d.distanceTo(v);
3065
+ C = C >= 1 ? 1 : C, t.keyframeIndex !== null && t.progress !== null && (C = t.progress, t.keyframeIndex = null, t.progress = null);
3066
+ var I = d.clone().lerp(v, C), y = A.clone().lerp(M, C);
3067
+ e.virualCamera.position.copy(I), e.virualCamera.lookAt(y), e.virualCamera.updateMatrixWorld(), e.virualCamera.updateMatrix(), e.virualCamera.computePose(), e.five.setState(q({}, e.virualCamera.pose)), e.location = e.keyframes[s].location + d.clone().distanceTo(I), C === 1 ? (u = 0, s++, e.playingState.keyframeIndex = s, e.playingState.progress = 0) : (e.playingState.keyframeIndex = s, e.playingState.progress = C);
3068
+ });
3069
+ }, o.prototype.pause = function() {
3070
+ this.cancelAnimation && this.cancelAnimation();
3071
+ }, o.prototype.findKeyFrameByLocation = function(e) {
3072
+ if (this.keyframes.length !== 0) {
3073
+ for (var a = 0, t = this.keyframes.length - 1; a <= t; ) {
3074
+ var s = Math.floor((a + t) / 2);
3075
+ if (this.keyframes[s].location === e)
3076
+ return s;
3077
+ this.keyframes[s].location < e ? a = s + 1 : t = s - 1;
3078
+ }
3079
+ return {
3080
+ keyframeIndex: a - 1,
3081
+ progress: 0
3082
+ };
3083
+ }
3084
+ }, o.prototype.resetPlayingState = function() {
3085
+ this.playingState.keyframeIndex = null, this.playingState.progress = null;
3086
+ }, o.prototype._disable = function(e) {
3087
+ }, o.prototype.enable = function(e) {
3088
+ var a;
3089
+ if (!this.state.enabled) {
3090
+ var t = (a = e == null ? void 0 : e.userAction) !== null && a !== void 0 ? a : !0;
3091
+ this.updateState({ enabled: !0 }, t), this._enable({ userAction: t });
3092
+ }
3093
+ }, o.prototype.disable = function(e) {
3094
+ var a;
3095
+ if (this.state.enabled !== !1) {
3096
+ var t = (a = e == null ? void 0 : e.userAction) !== null && a !== void 0 ? a : !0;
3097
+ this.updateState({ enabled: !1 }, t), this._disable({ userAction: t });
3098
+ }
3099
+ }, o;
3100
+ }(ze.Controller)
3101
+ ), jn = function(f, o) {
3102
+ return new Dn(f, o);
2941
3103
  };
2942
3104
  export {
2943
- Bn as BackgroundPlugin,
2944
- rt as BasePlugin,
2945
- Fn as ItemMaskPlugin,
2946
- Un as OrientationPlugin,
2947
- Nn as RoundedBoxGeometry
3105
+ Yn as BackgroundPlugin,
3106
+ ze as BasePlugin,
3107
+ Sn as CSS3DRenderer,
3108
+ Bn as ItemMaskPlugin,
3109
+ We as OrbitControls,
3110
+ Vn as OrientationPlugin,
3111
+ In as RoundedBoxGeometry,
3112
+ jn as TrajectoryPlugin
2948
3113
  };