@realsee/five 6.7.0-alpha.11 → 6.7.0-alpha.12

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 (164) hide show
  1. package/docs/assets/hierarchy.js +1 -1
  2. package/docs/assets/navigation.js +1 -1
  3. package/docs/assets/search.js +1 -1
  4. package/docs/classes/five.Camera.html +5 -5
  5. package/docs/classes/five.Five.html +1 -1
  6. package/docs/classes/five.InternalWebGLRenderer.html +1 -1
  7. package/docs/classes/five.Model.html +1 -1
  8. package/docs/classes/five.ModelScene.html +1 -1
  9. package/docs/classes/five.NetworkSubscribe.html +1 -1
  10. package/docs/classes/five.PBMContainer.html +1 -1
  11. package/docs/classes/five.PBMGroup.html +1 -1
  12. package/docs/classes/five.PBMMesh.html +1 -1
  13. package/docs/classes/five.PBMMeshMaterial.html +1 -1
  14. package/docs/classes/five.PBMPointCloud.html +1 -1
  15. package/docs/classes/five.PBMPointCloudMaterial.html +1 -1
  16. package/docs/classes/five.PBMSkinnedMesh.html +1 -1
  17. package/docs/classes/five.PanoCircleMesh.html +1 -1
  18. package/docs/classes/five.PanoCircleMeshCustom.html +1 -1
  19. package/docs/classes/five.PanoCircleMeshSolid.html +1 -1
  20. package/docs/classes/five.Parameter.html +1 -1
  21. package/docs/classes/five.Scene.html +1 -1
  22. package/docs/classes/five.Subscribe.html +1 -1
  23. package/docs/classes/five.Tile3D.html +1 -1
  24. package/docs/classes/five.TileNode.html +1 -1
  25. package/docs/classes/five.TrajectoryNode.html +1 -1
  26. package/docs/classes/five.WorkResolvedObserver.html +1 -1
  27. package/docs/classes/gltf-loader.DDSLoader.html +1 -1
  28. package/docs/classes/gltf-loader.DRACOLoader.html +1 -1
  29. package/docs/classes/gltf-loader.GLTFLoader.html +1 -1
  30. package/docs/classes/gltf-loader.GLTFObject.html +1 -1
  31. package/docs/classes/gltf-loader.THREEGLTFLoader.html +1 -1
  32. package/docs/classes/line.Line.html +1 -1
  33. package/docs/classes/line.LineGeometry.html +1 -1
  34. package/docs/classes/line.LineMaterial.html +1 -1
  35. package/docs/classes/line.LineSegmentsGeometry.html +1 -1
  36. package/docs/classes/line.THREE_Line2.html +1 -1
  37. package/docs/classes/line.THREE_LineSegments2.html +1 -1
  38. package/docs/classes/plugins.BasePlugin.Controller.html +1 -1
  39. package/docs/classes/plugins.RoundedBoxGeometry.html +1 -1
  40. package/docs/classes/sticker.Sticker.html +1 -1
  41. package/docs/classes/vfx.Airflow.html +1 -1
  42. package/docs/classes/vfx.Flame.html +1 -1
  43. package/docs/classes/vfx.Particle.html +1 -1
  44. package/docs/classes/vfx.ParticleGPU.html +1 -1
  45. package/docs/classes/vfx.SpotLight.html +1 -1
  46. package/docs/functions/plugins.DynamicPathLinePlugin.html +1 -0
  47. package/docs/hierarchy.html +1 -1
  48. package/docs/interfaces/five.AddableObject.html +1 -1
  49. package/docs/interfaces/five.AjaxOptions.html +1 -1
  50. package/docs/interfaces/five.BaseEvent.html +1 -1
  51. package/docs/interfaces/five.EventCallback.html +1 -1
  52. package/docs/interfaces/five.GestureEvent.html +1 -1
  53. package/docs/interfaces/five.ImageOptions.html +1 -1
  54. package/docs/interfaces/five.IntersectEvent.html +1 -1
  55. package/docs/interfaces/five.IntersectMesh.html +1 -1
  56. package/docs/interfaces/five.IntersectMeshInterface.html +1 -1
  57. package/docs/interfaces/five.Intersection.html +1 -1
  58. package/docs/interfaces/five.LooseWorkPanorama.html +1 -1
  59. package/docs/interfaces/five.LooseWorkWithExtrinsics.html +1 -1
  60. package/docs/interfaces/five.ModeChangeEvent.html +1 -1
  61. package/docs/interfaces/five.ModelControllerCustomInitArgs.html +1 -1
  62. package/docs/interfaces/five.ModelEvent.html +1 -1
  63. package/docs/interfaces/five.ModelLike.html +1 -1
  64. package/docs/interfaces/five.ModelSceneEvent.html +1 -1
  65. package/docs/interfaces/five.MovePanoOptions.html +1 -1
  66. package/docs/interfaces/five.NetworkAbortError.html +1 -1
  67. package/docs/interfaces/five.NetworkFirbiddenError.html +1 -1
  68. package/docs/interfaces/five.NetworkOptions.html +1 -1
  69. package/docs/interfaces/five.NetworkProxyError.html +1 -1
  70. package/docs/interfaces/five.NetworkResourceEvent.html +1 -1
  71. package/docs/interfaces/five.NetworkResponseError.html +1 -1
  72. package/docs/interfaces/five.NetworkTimeoutError.html +1 -1
  73. package/docs/interfaces/five.ObjectEvent.html +1 -1
  74. package/docs/interfaces/five.PBMMaterial.html +1 -1
  75. package/docs/interfaces/five.PBMMeshMaterialParameters.html +1 -1
  76. package/docs/interfaces/five.PBMPointCloudMaterialParameters.html +1 -1
  77. package/docs/interfaces/five.PanoCircleMeshInterface.html +1 -1
  78. package/docs/interfaces/five.PanoEvent.html +1 -1
  79. package/docs/interfaces/five.PanoTextureEvent.html +1 -1
  80. package/docs/interfaces/five.PanoramaControllerCustomInitArgs.html +1 -1
  81. package/docs/interfaces/five.PanoramaLikeControllerCustomInitArgs.html +1 -1
  82. package/docs/interfaces/five.ParameterMaterialValue.html +1 -1
  83. package/docs/interfaces/five.ParameterTilesetValue.html +1 -1
  84. package/docs/interfaces/five.ParameterValue.html +1 -1
  85. package/docs/interfaces/five.Pose.html +1 -1
  86. package/docs/interfaces/five.RenderEvent.html +1 -1
  87. package/docs/interfaces/five.ResolvedParameterValue.html +1 -1
  88. package/docs/interfaces/five.State.html +1 -1
  89. package/docs/interfaces/five.StateEvent.html +1 -1
  90. package/docs/interfaces/five.TextureOptions.html +1 -1
  91. package/docs/interfaces/five.TopviewControllerCustomInitArgs.html +1 -1
  92. package/docs/interfaces/five.VRPanoramaControllerCustomInitArgs.html +1 -1
  93. package/docs/interfaces/five.ViewLayer.html +1 -1
  94. package/docs/interfaces/five.WorkCubeImage.html +1 -1
  95. package/docs/interfaces/five.WorkImage.html +1 -1
  96. package/docs/interfaces/five.WorkObserver.html +1 -1
  97. package/docs/interfaces/five.WorkTile.html +1 -1
  98. package/docs/interfaces/five.WorksEvent.html +1 -1
  99. package/docs/interfaces/five.XRControllerEvent.html +1 -1
  100. package/docs/interfaces/five.XRGestureEvent.html +1 -1
  101. package/docs/interfaces/five.XRPanoramaControllerCustomInitArgs.html +1 -1
  102. package/docs/interfaces/five.XRSessionEvent.html +1 -1
  103. package/docs/interfaces/plugins.BackgroundPluginController.html +1 -1
  104. package/docs/interfaces/plugins.BackgroundPluginType.EventMap.html +1 -1
  105. package/docs/interfaces/plugins.BasePlugin.State.html +1 -1
  106. package/docs/interfaces/plugins.DynamicPathLinePluginController.html +67 -0
  107. package/docs/interfaces/plugins.DynamicPathLinePluginType.Config.html +22 -0
  108. package/docs/interfaces/plugins.DynamicPathLinePluginType.EventMap.html +26 -0
  109. package/docs/interfaces/plugins.DynamicPathLinePluginType.Params.html +6 -0
  110. package/docs/interfaces/plugins.DynamicPathLinePluginType.PathConfig.html +14 -0
  111. package/docs/interfaces/plugins.DynamicPathLinePluginType.State.html +10 -0
  112. package/docs/interfaces/plugins.ItemMaskController.html +1 -1
  113. package/docs/interfaces/plugins.ItemMaskPluginType.EventMap.html +1 -1
  114. package/docs/interfaces/plugins.ItemMaskPluginType.State.html +1 -1
  115. package/docs/interfaces/plugins.OrientationPluginController.html +1 -1
  116. package/docs/interfaces/plugins.OrientationPluginType.EventMap.html +1 -1
  117. package/docs/interfaces/plugins.OrientationPluginType.State.html +1 -1
  118. package/docs/interfaces/plugins.PanoAnimeController.html +1 -1
  119. package/docs/interfaces/plugins.PanoAnimePluginType.EventMap.html +1 -1
  120. package/docs/interfaces/plugins.PanoAnimePluginType.State.html +1 -1
  121. package/docs/interfaces/plugins.PluginTemplateType.EventMap.html +1 -1
  122. package/docs/interfaces/plugins.PluginTemplateType.State.html +1 -1
  123. package/docs/interfaces/plugins.TrajectoryController.html +1 -1
  124. package/docs/interfaces/react.FiveInjectionTypes.html +1 -1
  125. package/docs/modules/plugins.DynamicPathLinePluginType.html +1 -0
  126. package/docs/modules/plugins.html +1 -1
  127. package/docs/types/five.ParseOptions.html +1 -1
  128. package/docs/types/plugins.BasePlugin.EventMap.html +1 -1
  129. package/docs/types/plugins.DynamicPathLinePluginType.PluginData.html +3 -0
  130. package/docs/types/plugins.DynamicPathLinePluginType.ServerData.html +3 -0
  131. package/docs/types/vue.FiveProviderComponent.html +1 -1
  132. package/five/index.js +53 -53
  133. package/five/index.mjs +2720 -2705
  134. package/gltf-loader/index.js +3 -3
  135. package/gltf-loader/index.mjs +3 -3
  136. package/line/index.js +3 -3
  137. package/line/index.mjs +3 -3
  138. package/package.json +1 -1
  139. package/plugins/index.d.ts +235 -0
  140. package/plugins/index.js +213 -15
  141. package/plugins/index.mjs +2211 -1396
  142. package/react/index.js +2 -2
  143. package/react/index.mjs +2 -2
  144. package/shader-lib/index.d.ts +24 -1
  145. package/shader-lib/index.js +14 -13
  146. package/shader-lib/index.mjs +397 -169
  147. package/sticker/index.js +3 -3
  148. package/sticker/index.mjs +3 -3
  149. package/umd/five-gltf-loader.js +3 -3
  150. package/umd/five-line.js +3 -3
  151. package/umd/five-plugins.js +213 -15
  152. package/umd/five-react.js +2 -2
  153. package/umd/five-shader-lib.js +14 -13
  154. package/umd/five-sticker.js +3 -3
  155. package/umd/five-vfx.js +2 -2
  156. package/umd/five-vue.js +2 -2
  157. package/umd/five.js +53 -53
  158. package/vfx/index.js +2 -2
  159. package/vfx/index.mjs +2 -2
  160. package/vue/index.d.ts +1 -1
  161. package/vue/index.js +2 -2
  162. package/vue/index.mjs +2 -2
  163. package/work-downloader/index.js +2 -2
  164. package/work-downloader/index.mjs +2 -2
package/plugins/index.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five
4
- * Generated: 2025/10/29
5
- * Version: 6.7.0-alpha.11
4
+ * Generated: 2025/11/4
5
+ * Version: 6.7.0-alpha.12
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
@@ -252,268 +252,268 @@
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 yn, AnimationFrameLoop as Ct, Camera as bn, PanoCircleMesh as Tn } from "@realsee/five";
256
- import * as w from "three";
257
- import { EventDispatcher as qt, Vector3 as ve, MOUSE as Ae, TOUCH as Me, Spherical as jt, Quaternion as Ht, Vector2 as Te, Object3D as Kt, Matrix4 as wn } from "three";
258
- import { BasePlugin as Zt } from "@realsee/five/plugins";
259
- function En(f) {
260
- return /^https?:\/\/|^\/\//.test(f) || /^data:/.test(f);
255
+ */import { Subscribe as Pn, AnimationFrameLoop as ct, Camera as An, PanoCircleMesh as Sn } from "@realsee/five";
256
+ import * as v from "three";
257
+ import { EventDispatcher as Jt, Vector3 as ye, MOUSE as Me, TOUCH as _e, Spherical as Wt, Quaternion as Xt, Vector2 as Te, Object3D as $t, Matrix4 as Mn } from "three";
258
+ import { BasePlugin as Ct } from "@realsee/five/plugins";
259
+ function _n(h) {
260
+ return /^https?:\/\/|^\/\//.test(h) || /^data:/.test(h);
261
261
  }
262
- function xn(f, o) {
263
- return En(o) ? o : "".concat(f).concat(o);
262
+ function Cn(h, o) {
263
+ return _n(o) ? o : "".concat(h).concat(o);
264
264
  }
265
- var We;
266
- (function(f) {
265
+ var Xe;
266
+ (function(h) {
267
267
  var o = (
268
268
  /** @class */
269
269
  (function() {
270
- function e(a, t) {
271
- this.hooks = new yn(), this.staticPrefix = "//vr-image-4.realsee-cdn.cn", this.five = a, t != null && t.staticPrefix && (this.staticPrefix = t.staticPrefix);
270
+ function e(n, t) {
271
+ this.hooks = new Pn(), this.staticPrefix = "//vr-image-4.realsee-cdn.cn", this.five = n, 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(a) {
276
- return xn(this.staticPrefix, a);
275
+ }, e.prototype.absoluteUrl = function(n) {
276
+ return Cn(this.staticPrefix, n);
277
277
  }, e;
278
278
  })()
279
279
  );
280
- f.Controller = o;
281
- })(We || (We = {}));
282
- var At = function(f, o) {
283
- return At = 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
- }, At(f, o);
280
+ h.Controller = o;
281
+ })(Xe || (Xe = {}));
282
+ var Mt = function(h, o) {
283
+ return Mt = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, n) {
284
+ e.__proto__ = n;
285
+ } || function(e, n) {
286
+ for (var t in n) Object.prototype.hasOwnProperty.call(n, t) && (e[t] = n[t]);
287
+ }, Mt(h, o);
288
288
  };
289
- function Fe(f, o) {
289
+ function he(h, 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
- At(f, o);
292
+ Mt(h, o);
293
293
  function e() {
294
- this.constructor = f;
294
+ this.constructor = h;
295
295
  }
296
- f.prototype = o === null ? Object.create(o) : (e.prototype = o.prototype, new e());
296
+ h.prototype = o === null ? Object.create(o) : (e.prototype = o.prototype, new e());
297
297
  }
298
- var j = function() {
299
- return j = 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]);
298
+ var V = function() {
299
+ return V = Object.assign || function(o) {
300
+ for (var e, n = 1, t = arguments.length; n < t; n++) {
301
+ e = arguments[n];
302
+ for (var a in e) Object.prototype.hasOwnProperty.call(e, a) && (o[a] = e[a]);
303
303
  }
304
304
  return o;
305
- }, j.apply(this, arguments);
305
+ }, V.apply(this, arguments);
306
306
  };
307
- function De(f, o, e, a) {
308
- function t(s) {
309
- return s instanceof e ? s : new e(function(c) {
310
- c(s);
307
+ function Le(h, o, e, n) {
308
+ function t(a) {
309
+ return a instanceof e ? a : new e(function(s) {
310
+ s(a);
311
311
  });
312
312
  }
313
- return new (e || (e = Promise))(function(s, c) {
314
- function l(v) {
313
+ return new (e || (e = Promise))(function(a, s) {
314
+ function l(g) {
315
315
  try {
316
- d(a.next(v));
317
- } catch (T) {
318
- c(T);
316
+ c(n.next(g));
317
+ } catch (y) {
318
+ s(y);
319
319
  }
320
320
  }
321
- function g(v) {
321
+ function f(g) {
322
322
  try {
323
- d(a.throw(v));
324
- } catch (T) {
325
- c(T);
323
+ c(n.throw(g));
324
+ } catch (y) {
325
+ s(y);
326
326
  }
327
327
  }
328
- function d(v) {
329
- v.done ? s(v.value) : t(v.value).then(l, g);
328
+ function c(g) {
329
+ g.done ? a(g.value) : t(g.value).then(l, f);
330
330
  }
331
- d((a = a.apply(f, o || [])).next());
331
+ c((n = n.apply(h, o || [])).next());
332
332
  });
333
333
  }
334
- function Re(f, o) {
334
+ function De(h, o) {
335
335
  var e = { label: 0, sent: function() {
336
- if (s[0] & 1) throw s[1];
337
- return s[1];
338
- }, trys: [], ops: [] }, a, t, s, c = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
339
- return c.next = l(0), c.throw = l(1), c.return = l(2), typeof Symbol == "function" && (c[Symbol.iterator] = function() {
336
+ if (a[0] & 1) throw a[1];
337
+ return a[1];
338
+ }, trys: [], ops: [] }, n, t, a, s = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
339
+ return s.next = l(0), s.throw = l(1), s.return = l(2), typeof Symbol == "function" && (s[Symbol.iterator] = function() {
340
340
  return this;
341
- }), c;
342
- function l(d) {
343
- return function(v) {
344
- return g([d, v]);
341
+ }), s;
342
+ function l(c) {
343
+ return function(g) {
344
+ return f([c, g]);
345
345
  };
346
346
  }
347
- function g(d) {
348
- if (a) throw new TypeError("Generator is already executing.");
349
- for (; c && (c = 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]) {
347
+ function f(c) {
348
+ if (n) throw new TypeError("Generator is already executing.");
349
+ for (; s && (s = 0, c[0] && (e = 0)), e; ) try {
350
+ if (n = 1, t && (a = c[0] & 2 ? t.return : c[0] ? t.throw || ((a = t.return) && a.call(t), 0) : t.next) && !(a = a.call(t, c[1])).done) return a;
351
+ switch (t = 0, a && (c = [c[0] & 2, a.value]), c[0]) {
352
352
  case 0:
353
353
  case 1:
354
- s = d;
354
+ a = c;
355
355
  break;
356
356
  case 4:
357
- return e.label++, { value: d[1], done: !1 };
357
+ return e.label++, { value: c[1], done: !1 };
358
358
  case 5:
359
- e.label++, t = d[1], d = [0];
359
+ e.label++, t = c[1], c = [0];
360
360
  continue;
361
361
  case 7:
362
- d = e.ops.pop(), e.trys.pop();
362
+ c = e.ops.pop(), e.trys.pop();
363
363
  continue;
364
364
  default:
365
- if (s = e.trys, !(s = s.length > 0 && s[s.length - 1]) && (d[0] === 6 || d[0] === 2)) {
365
+ if (a = e.trys, !(a = a.length > 0 && a[a.length - 1]) && (c[0] === 6 || c[0] === 2)) {
366
366
  e = 0;
367
367
  continue;
368
368
  }
369
- if (d[0] === 3 && (!s || d[1] > s[0] && d[1] < s[3])) {
370
- e.label = d[1];
369
+ if (c[0] === 3 && (!a || c[1] > a[0] && c[1] < a[3])) {
370
+ e.label = c[1];
371
371
  break;
372
372
  }
373
- if (d[0] === 6 && e.label < s[1]) {
374
- e.label = s[1], s = d;
373
+ if (c[0] === 6 && e.label < a[1]) {
374
+ e.label = a[1], a = c;
375
375
  break;
376
376
  }
377
- if (s && e.label < s[2]) {
378
- e.label = s[2], e.ops.push(d);
377
+ if (a && e.label < a[2]) {
378
+ e.label = a[2], e.ops.push(c);
379
379
  break;
380
380
  }
381
- s[2] && e.ops.pop(), e.trys.pop();
381
+ a[2] && e.ops.pop(), e.trys.pop();
382
382
  continue;
383
383
  }
384
- d = o.call(f, e);
385
- } catch (v) {
386
- d = [6, v], t = 0;
384
+ c = o.call(h, e);
385
+ } catch (g) {
386
+ c = [6, g], t = 0;
387
387
  } finally {
388
- a = s = 0;
388
+ n = a = 0;
389
389
  }
390
- if (d[0] & 5) throw d[1];
391
- return { value: d[0] ? d[1] : void 0, done: !0 };
390
+ if (c[0] & 5) throw c[1];
391
+ return { value: c[0] ? c[1] : void 0, done: !0 };
392
392
  }
393
393
  }
394
- function zt(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));
394
+ function qt(h, o, e) {
395
+ if (e || arguments.length === 2) for (var n = 0, t = o.length, a; n < t; n++)
396
+ (a || !(n in o)) && (a || (a = Array.prototype.slice.call(o, 0, n)), a[n] = o[n]);
397
+ return h.concat(a || Array.prototype.slice.call(o));
398
398
  }
399
- function Pn(f) {
399
+ function On(h) {
400
400
  return new Promise(function(o, e) {
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() {
401
+ var n = new Image();
402
+ n.onload = function() {
403
+ n.onload = n.onerror = function() {
404
+ }, o(n);
405
+ }, n.onerror = function(t) {
406
+ n.onload = n.onerror = function() {
407
407
  }, e(t);
408
- }, a.crossOrigin = "", a.src = f;
408
+ }, n.crossOrigin = "", n.src = h;
409
409
  });
410
410
  }
411
- var An = typeof performance != "undefined" && typeof performance.timing != "undefined" ? performance.timing.navigationStart : Date.now(), Tt = typeof performance != "undefined" ? (function() {
412
- return An + performance.now();
411
+ var In = typeof performance != "undefined" && typeof performance.timing != "undefined" ? performance.timing.navigationStart : Date.now(), Et = typeof performance != "undefined" ? (function() {
412
+ return In + performance.now();
413
413
  }) : (function() {
414
414
  return Date.now();
415
415
  });
416
- function st(f, o, e) {
417
- return f + (o - f) * e;
416
+ function st(h, o, e) {
417
+ return h + (o - h) * e;
418
418
  }
419
- function Mn(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), c = o, l = f;
421
- return t * Math.pow(a, 3) + s * Math.pow(a, 2) + c * a + l;
419
+ function Nn(h, o, e, n) {
420
+ var t = (o * e + 2 * h) / Math.pow(e, 3), a = -(2 * o * e + 3 * h) / Math.pow(e, 2), s = o, l = h;
421
+ return t * Math.pow(n, 3) + a * Math.pow(n, 2) + s * n + l;
422
422
  }
423
- function Cn(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), c = o;
425
- return 3 * t * Math.pow(a, 2) + 2 * s * a + c;
423
+ function kn(h, o, e, n) {
424
+ var t = (o * e + 2 * h) / Math.pow(e, 3), a = -(2 * o * e + 3 * h) / Math.pow(e, 2), s = o;
425
+ return 3 * t * Math.pow(n, 2) + 2 * a * n + s;
426
426
  }
427
- function _n(f, o, e, a) {
428
- var t = a[1] - a[0];
429
- return f = lt(f, a), o = lt(o, a), o - f > t / 2 ? st(f + t, o, e) : f - o > t / 2 ? st(f - t, o, e) : st(f, o, e);
427
+ function Ln(h, o, e, n) {
428
+ var t = n[1] - n[0];
429
+ return h = lt(h, n), o = lt(o, n), o - h > t / 2 ? st(h + t, o, e) : h - o > t / 2 ? st(h - t, o, e) : st(h, o, e);
430
430
  }
431
- function lt(f, o) {
431
+ function lt(h, o) {
432
432
  var e = o[1] - o[0];
433
- return f < o[0] ? lt(f + e, o) : f >= o[1] ? lt(f - e, o) : f;
433
+ return h < o[0] ? lt(h + e, o) : h >= o[1] ? lt(h - e, o) : h;
434
434
  }
435
- function On(f, o, e, a) {
436
- return a ? _n(f, o, e, a) : st(f, o, e);
435
+ function Dn(h, o, e, n) {
436
+ return n ? Ln(h, o, e, n) : st(h, o, e);
437
437
  }
438
- var Gt = (
438
+ var Kt = (
439
439
  /** @class */
440
440
  (function() {
441
- function f(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 h(o) {
442
+ this.config = {}, this.progress = 1, this.ended = !0, this.value = {}, this.startTime = Et(), this.startVelocity = 0, this.duration = 0, this.keyframes = [];
443
443
  for (var e in o) {
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 });
444
+ var n = o[e];
445
+ typeof n == "number" ? (this.value[e] = n, this.config[e] = { circle: !1 }) : (this.value[e] = n.value, this.config[e] = { circle: n.circle });
446
446
  }
447
447
  this.keyframes = [
448
- { progress: 0, value: j({}, this.value) },
449
- { progress: 1, value: j({}, this.value) }
448
+ { progress: 0, value: V({}, this.value) },
449
+ { progress: 1, value: V({}, this.value) }
450
450
  ];
451
451
  }
452
- return f.prototype.getProgress = function(o) {
452
+ return h.prototype.getProgress = function(o) {
453
453
  var e = o - this.startTime;
454
- return e < 0 ? 0 : e >= this.duration ? 1 : 1 - Mn(1, this.startVelocity, this.duration, e);
455
- }, f.prototype.getValue = function(o) {
454
+ return e < 0 ? 0 : e >= this.duration ? 1 : 1 - Nn(1, this.startVelocity, this.duration, e);
455
+ }, h.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 a = this.keyframes[e - 1], t = this.keyframes[e], s = {};
459
- for (var c in this.config) {
460
- var l = (o - a.progress) / (t.progress - a.progress);
461
- s[c] = On(a.value[c], t.value[c], l, this.config[c].circle);
458
+ var n = this.keyframes[e - 1], t = this.keyframes[e], a = {};
459
+ for (var s in this.config) {
460
+ var l = (o - n.progress) / (t.progress - n.progress);
461
+ a[s] = Dn(n.value[s], t.value[s], l, this.config[s].circle);
462
462
  }
463
- return s;
463
+ return a;
464
464
  }
465
- return j({}, this.keyframes[this.keyframes.length - 1].value);
466
- }, f.prototype.getProgressVelocity = function(o) {
465
+ return V({}, this.keyframes[this.keyframes.length - 1].value);
466
+ }, h.prototype.getProgressVelocity = function(o) {
467
467
  var e = o - this.startTime;
468
- return e >= this.duration ? 0 : Cn(1, this.startVelocity, this.duration, e);
469
- }, f.prototype.update = function(o) {
468
+ return e >= this.duration ? 0 : kn(1, this.startVelocity, this.duration, e);
469
+ }, h.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
- }, 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]];
471
+ }, h.prototype.getKeyFrameSegment = function(o) {
472
+ for (var e = this.getProgress(o), n = 1; n < this.keyframes.length; n++)
473
+ if (this.keyframes[n].progress > e)
474
+ return [this.keyframes[n - 1], this.keyframes[n]];
475
475
  return [this.keyframes[this.keyframes.length - 2], this.keyframes[this.keyframes.length - 1]];
476
- }, f.prototype.getTargetKeyframe = function() {
476
+ }, h.prototype.getTargetKeyframe = function() {
477
477
  return this.keyframes[this.keyframes.length - 1];
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 : Tt();
481
- var c = this.getProgress(t), l = this.getValue(c), g = {};
482
- for (var d in this.config)
483
- g[d] = (s = o[d]) !== null && s !== void 0 ? s : l[d];
484
- var v = [
478
+ }, h.prototype.set = function(o, e, n, t) {
479
+ var a;
480
+ n === void 0 && (n = 0), isNaN(e) && (e = 0), isNaN(n) && (n = 0), t = t != null ? t : Et();
481
+ var s = this.getProgress(t), l = this.getValue(s), f = {};
482
+ for (var c in this.config)
483
+ f[c] = (a = o[c]) !== null && a !== void 0 ? a : l[c];
484
+ var g = [
485
485
  { progress: 0, value: l },
486
- { progress: 1, value: g }
486
+ { progress: 1, value: f }
487
487
  ];
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)
488
+ return this.setKeyframes(g, e, n, t);
489
+ }, h.prototype.setKeyframes = function(o, e, n, t) {
490
+ var a = this;
491
+ if (n === void 0 && (n = 0), o.length < 2)
492
492
  throw new Error("keyframes invalid.");
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(c, l) {
494
- t = t != null ? t : Tt(), 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 = j({}, o[o.length - 1].value)) : s.value = j({}, o[0].value), s.callbacks = [c, l];
493
+ return isNaN(e) && (e = 0), isNaN(n) && (n = 0), this.callbacks && (this.callbacks[1](new Error("motion aborted.")), this.callbacks = void 0), new Promise(function(s, l) {
494
+ t = t != null ? t : Et(), a.progress = 0, a.ended = !1, a.startTime = t, a.startVelocity = n, a.keyframes = o, a.duration = e, e === 0 ? (a.progress = 1, a.value = V({}, o[o.length - 1].value)) : a.value = V({}, o[0].value), a.callbacks = [s, l];
495
495
  });
496
- }, f.prototype.dispose = function() {
496
+ }, h.prototype.dispose = function() {
497
497
  this.callbacks && (this.callbacks[1](new Error("motion dispose.")), this.callbacks = void 0);
498
- }, f;
498
+ }, h;
499
499
  })()
500
- ), Sn = [
500
+ ), Fn = [
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
- ], In = [
505
+ ], Bn = [
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
- ], Nn = `
510
+ ], Un = `
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
- `, kn = `
516
+ `, Rn = `
517
517
  varying vec2 vUv;
518
518
  uniform sampler2D map;
519
519
  uniform vec4 color;
@@ -559,22 +559,22 @@ void main() {
559
559
  }
560
560
  }
561
561
  }
562
- `, Ln = (
562
+ `, Vn = (
563
563
  /** @class */
564
- (function(f) {
565
- Fe(o, f);
566
- function o(e, a) {
567
- var t = f.call(this, e) || this;
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 l = new w.Mesh(new w.SphereBufferGeometry(1, 60, 40), new w.ShaderMaterial({
570
- vertexShader: Nn,
571
- fragmentShader: kn,
564
+ (function(h) {
565
+ he(o, h);
566
+ function o(e, n) {
567
+ var t = h.call(this, e) || this;
568
+ t.canvas = document.createElement("canvas"), t.group = new v.Group(), t.wrapper = document.createElement("div"), t.style = document.createElement("style"), t.itemMaskMesh = (function() {
569
+ var l = new v.Mesh(new v.SphereBufferGeometry(1, 60, 40), new v.ShaderMaterial({
570
+ vertexShader: Un,
571
+ fragmentShader: Rn,
572
572
  uniforms: {
573
573
  map: {
574
- value: new w.Texture()
574
+ value: new v.Texture()
575
575
  },
576
576
  color: {
577
- value: new w.Vector4()
577
+ value: new v.Vector4()
578
578
  }
579
579
  },
580
580
  depthWrite: !1,
@@ -587,19 +587,19 @@ void main() {
587
587
  }, t.onFiveWantsMoveToPano = function(l) {
588
588
  t.state.mode === "box" && t.select();
589
589
  }, t.loadPanoMask = function(l) {
590
- return De(t, void 0, void 0, function() {
591
- var g, d, v, T, A, x, _, C, L, b;
592
- return Re(this, function(y) {
593
- switch (y.label) {
590
+ return Le(t, void 0, void 0, function() {
591
+ var f, c, g, y, w, x, A, S, O, T;
592
+ return De(this, function(b) {
593
+ switch (b.label) {
594
594
  case 0:
595
- return g = this, d = g.five, v = g.canvas, T = g.itemMaskMesh, A = g.data, x = v.getContext("2d"), _ = d.observers[l], C = (b = A == null ? void 0 : A.object_mask_list.find(function(P) {
596
- return P.derived_id === String(_.derivedId);
597
- })) === null || b === void 0 ? void 0 : b.object_mask_url, C ? [4, Pn(C)] : [
595
+ return f = this, c = f.five, g = f.canvas, y = f.itemMaskMesh, w = f.data, x = g.getContext("2d"), A = c.observers[l], S = (T = w == null ? void 0 : w.object_mask_list.find(function(P) {
596
+ return P.derived_id === String(A.derivedId);
597
+ })) === null || T === void 0 ? void 0 : T.object_mask_url, S ? [4, On(S)] : [
598
598
  2
599
599
  /*return*/
600
600
  ];
601
601
  case 1:
602
- return L = y.sent(), v.width = L.width, v.height = L.height, x == null || x.drawImage(L, 0, 0, L.width, L.height), T.material.uniforms.map.value.image = L, T.material.uniforms.map.value.minFilter = w.LinearFilter, T.material.uniforms.map.value.needsUpdate = !0, T.position.copy(_.position), T.quaternion.copy(_.quaternion), d.scene.add(T), d.needsRender = !0, [
602
+ return O = b.sent(), g.width = O.width, g.height = O.height, x == null || x.drawImage(O, 0, 0, O.width, O.height), y.material.uniforms.map.value.image = O, y.material.uniforms.map.value.minFilter = v.LinearFilter, y.material.uniforms.map.value.needsUpdate = !0, y.position.copy(A.position), y.quaternion.copy(A.quaternion), c.scene.add(y), c.needsRender = !0, [
603
603
  2
604
604
  /*return*/
605
605
  ];
@@ -607,59 +607,59 @@ void main() {
607
607
  });
608
608
  });
609
609
  }, t.onFiveMouseMove = function(l) {
610
- var g;
610
+ var f;
611
611
  if (t.state.mode === "mask" && t.five.state.mode === "Panorama") {
612
- var d = t, v = d.five, T = d.itemMaskMesh, A = v.observers[v.state.panoIndex], x = (g = l.pointers[0]) === null || g === void 0 ? void 0 : g.raycaster;
612
+ var c = t, g = c.five, y = c.itemMaskMesh, w = g.observers[g.state.panoIndex], x = (f = l.pointers[0]) === null || f === void 0 ? void 0 : f.raycaster;
613
613
  if (x) {
614
- var _ = x.intersectObjects(t.group.children.filter(function(C) {
615
- return C.userData.visible_viewpoint.includes(String(A.derivedId));
614
+ var A = x.intersectObjects(t.group.children.filter(function(S) {
615
+ return S.userData.visible_viewpoint.includes(String(w.derivedId));
616
616
  }), !0)[0];
617
- _ ? T.material.uniforms.color.value = _.object.userData.color : T.material.uniforms.color.value = new w.Vector4(0, 0, 0, 1);
617
+ A ? y.material.uniforms.color.value = A.object.userData.color : y.material.uniforms.color.value = new v.Vector4(0, 0, 0, 1);
618
618
  }
619
619
  }
620
620
  }, t.onFiveTapGesture = function(l) {
621
- var g = t.five, d = g.observers[g.state.panoIndex];
621
+ var f = t.five, c = f.observers[f.state.panoIndex];
622
622
  if (l) {
623
- var v = l.intersectObjects(t.group.children.filter(function(x) {
624
- return x.userData.visible_viewpoint.includes(String(d.derivedId));
623
+ var g = l.intersectObjects(t.group.children.filter(function(x) {
624
+ return x.userData.visible_viewpoint.includes(String(c.derivedId));
625
625
  }), !0)[0];
626
- if (v) {
627
- t.select(v.object.name), t.stopAnimation && t.stopAnimation(), t.tapPosition = v.point, t.changeTapScreenPosition();
628
- var T = new Gt({
626
+ if (g) {
627
+ t.select(g.object.name), t.stopAnimation && t.stopAnimation(), t.tapPosition = g.point, t.changeTapScreenPosition();
628
+ var y = new Kt({
629
629
  opacity: 0,
630
630
  scale: 0,
631
631
  shadow: 2
632
- }), A = new Gt({
632
+ }), w = new Kt({
633
633
  opacity: 0,
634
634
  scale: 0,
635
635
  shadow: 2
636
636
  });
637
- return T.setKeyframes(Sn, 1e3), A.setKeyframes(In, 1e3), t.stopAnimation = Ct.shared.add(function(x, _) {
638
- var C, L = T.update(x), b = A.update(x);
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"), L && b && ((C = t.stopAnimation) === null || C === void 0 || C.call(t), t.stopAnimation = void 0, g.getElement().parentElement.removeChild(t.wrapper));
640
- }, !1, 0, 10), g.getElement().parentElement.appendChild(t.wrapper), !1;
637
+ return y.setKeyframes(Fn, 1e3), w.setKeyframes(Bn, 1e3), t.stopAnimation = ct.shared.add(function(x, A) {
638
+ var S, O = y.update(x), T = w.update(x);
639
+ t.wrapper.firstChild.style.opacity = "".concat(y.value.opacity), t.wrapper.firstChild.style.transform = "scale(".concat(y.value.scale, ")"), t.wrapper.firstChild.style.boxShadow = "0 0 0 ".concat(y.value.shadow, "px #fff"), t.wrapper.lastChild.style.opacity = "".concat(w.value.opacity), t.wrapper.lastChild.style.transform = "scale(".concat(w.value.scale, ")"), t.wrapper.lastChild.style.boxShadow = "0 0 0 ".concat(w.value.shadow, "px #fff"), O && T && ((S = t.stopAnimation) === null || S === void 0 || S.call(t), t.stopAnimation = void 0, f.getElement().parentElement.removeChild(t.wrapper));
640
+ }, !1, 0, 10), f.getElement().parentElement.appendChild(t.wrapper), !1;
641
641
  }
642
642
  }
643
643
  }, t.changeTapScreenPosition = function() {
644
644
  if (t.tapPosition) {
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, "%)");
645
+ var l = t.tapPosition.clone().project(t.five.camera), f = (l.x + 1) / 2, c = -(l.y - 1) / 2;
646
+ t.wrapper.style.opacity = l.z > 0 && l.z < 1 ? "1" : "0", t.wrapper.style.transform = "translate(".concat(f * 100, "%, ").concat(c * 100, "%)");
647
647
  }
648
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 s = {
653
+ var a = {
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(s, a == null ? void 0 : a.initialState);
661
- var c = j({}, a == null ? void 0 : a.config);
662
- return t._config = c, 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(a, n == null ? void 0 : n.initialState);
661
+ var s = V({}, n == null ? void 0 : n.config);
662
+ return t._config = s, 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 j({}, this._config);
684
+ return V({}, this._config);
685
685
  },
686
686
  enumerable: !1,
687
687
  configurable: !0
688
- }), o.prototype.updateState = function(e, a) {
688
+ }), o.prototype.updateState = function(e, n) {
689
689
  var t = this.state;
690
- this.state = j(j({}, this.state), e), this.hooks.emit("stateChange", { state: this.state, prevState: t, userAction: a });
690
+ this.state = V(V({}, this.state), e), this.hooks.emit("stateChange", { state: this.state, prevState: t, userAction: n });
691
691
  }, o.prototype.load = function(e) {
692
- return De(this, void 0, void 0, function() {
693
- var a, t, s = this;
694
- return Re(this, function(c) {
695
- return this.data = e, a = e.data_list.map(function(l) {
696
- var g, d = l.position.end.map(function(S) {
697
- return Number(S);
698
- }), v = l.position.start.map(function(S) {
699
- return Number(S);
700
- }), T = Math.abs(d[0] - v[0]), A = Math.abs(d[1] - v[1]), x = Math.abs(d[2] - v[2]), _ = d[0] / 2 + v[0] / 2, C = d[1] / 2 + v[1] / 2, L = d[2] / 2 + v[2] / 2, b = new w.Vector3(_, C, L), y = new w.BoxBufferGeometry(T, A, x), P = new w.ShaderMaterial({
692
+ return Le(this, void 0, void 0, function() {
693
+ var n, t, a = this;
694
+ return De(this, function(s) {
695
+ return this.data = e, n = e.data_list.map(function(l) {
696
+ var f, c = l.position.end.map(function(C) {
697
+ return Number(C);
698
+ }), g = l.position.start.map(function(C) {
699
+ return Number(C);
700
+ }), y = Math.abs(c[0] - g[0]), w = Math.abs(c[1] - g[1]), x = Math.abs(c[2] - g[2]), A = c[0] / 2 + g[0] / 2, S = c[1] / 2 + g[1] / 2, O = c[2] / 2 + g[2] / 2, T = new v.Vector3(A, S, O), b = new v.BoxBufferGeometry(y, w, x), P = new v.ShaderMaterial({
701
701
  vertexShader: `
702
702
  varying vec2 vUv;
703
703
  void main() {
@@ -725,41 +725,41 @@ void main() {
725
725
  }
726
726
  }
727
727
  `,
728
- side: w.DoubleSide,
729
- visible: s.state.selectedId === "".concat(l.category_name).concat(l.index),
728
+ side: v.DoubleSide,
729
+ visible: a.state.selectedId === "".concat(l.category_name).concat(l.index),
730
730
  uniforms: {
731
- opacity: { value: s.state.mode === "box" ? 1 : 0 }
731
+ opacity: { value: a.state.mode === "box" ? 1 : 0 }
732
732
  },
733
733
  depthWrite: !1,
734
734
  depthTest: !1,
735
735
  transparent: !0
736
- }), p = new w.Mesh(y, P);
737
- return p.position.copy(b), p.name = "".concat(l.category_name).concat(l.index), p.userData.color = new ((g = w.Vector4).bind.apply(g, zt(zt([void 0], l.mask_color.map(function(S) {
738
- return S / 255;
739
- }).reverse(), !1), [1], !1)))(), p.userData.visible_viewpoint = Object.keys(l.visible_viewpoint), p;
740
- }), (t = this.group).add.apply(t, a), [
736
+ }), m = new v.Mesh(b, P);
737
+ return m.position.copy(T), m.name = "".concat(l.category_name).concat(l.index), m.userData.color = new ((f = v.Vector4).bind.apply(f, qt(qt([void 0], l.mask_color.map(function(C) {
738
+ return C / 255;
739
+ }).reverse(), !1), [1], !1)))(), m.userData.visible_viewpoint = Object.keys(l.visible_viewpoint), m;
740
+ }), (t = this.group).add.apply(t, n), [
741
741
  2
742
742
  /*return*/
743
743
  ];
744
744
  });
745
745
  });
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 c = { userAction: s };
751
- e.enabled ? this._enable(c) : this._disable(c);
746
+ }, o.prototype.setState = function(e, n) {
747
+ n === void 0 && (n = {});
748
+ var t = this.state, a = n.userAction !== void 0 ? n.userAction : !0;
749
+ if (this.updateState(e, a), e.enabled !== void 0 && t.enabled !== e.enabled) {
750
+ var s = { userAction: a };
751
+ e.enabled ? this._enable(s) : this._disable(s);
752
752
  }
753
753
  }, o.prototype.setMode = function(e) {
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;
754
+ this.updateState({ mode: e }, !1), e === "mask" ? (this.group.children.forEach(function(n) {
755
+ n.material.uniforms.opacity.value = 0;
756
+ }), this.loadPanoMask(this.five.state.panoIndex)) : e === "box" && (this.itemMaskMesh.material.uniforms.color.value = new v.Vector4(0, 0, 0, 1), this.group.children.forEach(function(n) {
757
+ n.material.uniforms.opacity.value = 1;
758
758
  }), this.five.needsRender = !0);
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(c) {
762
- c.material.visible = t.state.selectAll || c.name === e;
759
+ }, o.prototype.select = function(e, n) {
760
+ var t = this, a;
761
+ this.updateState({ selectedId: e != null ? e : null }, (a = n == null ? void 0 : n.userAction) !== null && a !== void 0 ? a : !1), this.group.children.forEach(function(s) {
762
+ s.material.visible = t.state.selectAll || s.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,160 +768,160 @@ 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 a;
771
+ var n;
772
772
  if (!this.state.enabled) {
773
- var t = (a = e == null ? void 0 : e.userAction) !== null && a !== void 0 ? a : !0;
773
+ var t = (n = e == null ? void 0 : e.userAction) !== null && n !== void 0 ? n : !0;
774
774
  this.updateState({ enabled: !0 }, t), this._enable({ userAction: t });
775
775
  }
776
776
  }, o.prototype.disable = function(e) {
777
- var a;
777
+ var n;
778
778
  if (this.state.enabled !== !1) {
779
- var t = (a = e == null ? void 0 : e.userAction) !== null && a !== void 0 ? a : !0;
779
+ var t = (n = e == null ? void 0 : e.userAction) !== null && n !== void 0 ? n : !0;
780
780
  this.updateState({ enabled: !1 }, t), this._disable({ userAction: t });
781
781
  }
782
782
  }, o;
783
- })(We.Controller)
784
- ), qn = function(f, o) {
785
- return new Ln(f, o);
783
+ })(Xe.Controller)
784
+ ), tr = function(h, o) {
785
+ return new Vn(h, 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 wt = (function(f, o, e, a) {
793
- var t = ["", "webkit", "Moz", "MS", "ms", "o"], s = o.createElement ? o.createElement("div") : a, c = "function", l = Math.round, g = Math.abs, d = Date.now;
794
- function v(n, r, i) {
795
- return setTimeout(y(n, i), r);
796
- }
797
- function T(n, r, i) {
798
- return Array.isArray(n) ? (A(n, i[r], i), !0) : !1;
799
- }
800
- function A(n, r, i) {
801
- var h;
802
- if (n)
803
- if (n.forEach)
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++;
792
+ var Tt = (function(h, o, e, n) {
793
+ var t = ["", "webkit", "Moz", "MS", "ms", "o"], a = o.createElement ? o.createElement("div") : n, s = "function", l = Math.round, f = Math.abs, c = Date.now;
794
+ function g(r, i, u) {
795
+ return setTimeout(b(r, u), i);
796
+ }
797
+ function y(r, i, u) {
798
+ return Array.isArray(r) ? (w(r, u[i], u), !0) : !1;
799
+ }
800
+ function w(r, i, u) {
801
+ var p;
802
+ if (r)
803
+ if (r.forEach)
804
+ r.forEach(i, u);
805
+ else if (r.length !== n)
806
+ for (p = 0; p < r.length; )
807
+ i.call(u, r[p], p, r), p++;
808
808
  else
809
- for (h in n)
810
- n.hasOwnProperty(h) && r.call(i, n[h], h, n);
809
+ for (p in r)
810
+ r.hasOwnProperty(p) && i.call(u, r[p], p, r);
811
811
  }
812
- function x(n, r, i) {
813
- var h = "DEPRECATED METHOD: " + r + `
814
- ` + i + ` AT
812
+ function x(r, i, u) {
813
+ var p = "DEPRECATED METHOD: " + i + `
814
+ ` + u + ` AT
815
815
  `;
816
816
  return function() {
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);
817
+ var E = new Error("get-stack-trace"), M = E && E.stack ? E.stack.replace(/^[^\(]+?[\n$]/gm, "").replace(/^\s+at\s+/gm, "").replace(/^Object.<anonymous>\s*\(/gm, "{anonymous}()@") : "Unknown Stack Trace", k = h.console && (h.console.warn || h.console.log);
818
+ return k && k.call(h.console, p, M), r.apply(this, arguments);
819
819
  };
820
820
  }
821
- var _;
822
- typeof Object.assign != "function" ? _ = function(r) {
823
- if (r === a || r === null)
821
+ var A;
822
+ typeof Object.assign != "function" ? A = function(i) {
823
+ if (i === n || i === null)
824
824
  throw new TypeError("Cannot convert undefined or null to object");
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]);
825
+ for (var u = Object(i), p = 1; p < arguments.length; p++) {
826
+ var E = arguments[p];
827
+ if (E !== n && E !== null)
828
+ for (var M in E)
829
+ E.hasOwnProperty(M) && (u[M] = E[M]);
830
830
  }
831
+ return u;
832
+ } : A = Object.assign;
833
+ var S = x(function(i, u, p) {
834
+ for (var E = Object.keys(u), M = 0; M < E.length; )
835
+ (!p || p && i[E[M]] === n) && (i[E[M]] = u[E[M]]), M++;
831
836
  return i;
832
- } : _ = Object.assign;
833
- var C = x(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
- return r;
837
- }, "extend", "Use `assign`."), L = x(function(r, i) {
838
- return C(r, i, !0);
837
+ }, "extend", "Use `assign`."), O = x(function(i, u) {
838
+ return S(i, u, !0);
839
839
  }, "merge", "Use `assign`.");
840
- function b(n, r, i) {
841
- var h = r.prototype, m;
842
- m = n.prototype = Object.create(h), m.constructor = n, m._super = h, i && _(m, i);
840
+ function T(r, i, u) {
841
+ var p = i.prototype, E;
842
+ E = r.prototype = Object.create(p), E.constructor = r, E._super = p, u && A(E, u);
843
843
  }
844
- function y(n, r) {
844
+ function b(r, i) {
845
845
  return function() {
846
- return n.apply(r, arguments);
846
+ return r.apply(i, arguments);
847
847
  };
848
848
  }
849
- function P(n, r) {
850
- return typeof n == c ? n.apply(r && r[0] || a, r) : n;
849
+ function P(r, i) {
850
+ return typeof r == s ? r.apply(i && i[0] || n, i) : r;
851
851
  }
852
- function p(n, r) {
853
- return n === a ? r : n;
852
+ function m(r, i) {
853
+ return r === n ? i : r;
854
854
  }
855
- function S(n, r, i) {
856
- A(te(r), function(h) {
857
- n.addEventListener(h, i, !1);
855
+ function C(r, i, u) {
856
+ w(U(i), function(p) {
857
+ r.addEventListener(p, u, !1);
858
858
  });
859
859
  }
860
- function M(n, r, i) {
861
- A(te(r), function(h) {
862
- n.removeEventListener(h, i, !1);
860
+ function _(r, i, u) {
861
+ w(U(i), function(p) {
862
+ r.removeEventListener(p, u, !1);
863
863
  });
864
864
  }
865
- function ee(n, r) {
866
- for (; n; ) {
867
- if (n == r)
865
+ function H(r, i) {
866
+ for (; r; ) {
867
+ if (r == i)
868
868
  return !0;
869
- n = n.parentNode;
869
+ r = r.parentNode;
870
870
  }
871
871
  return !1;
872
872
  }
873
- function Z(n, r) {
874
- return n.indexOf(r) > -1;
873
+ function G(r, i) {
874
+ return r.indexOf(i) > -1;
875
875
  }
876
- function te(n) {
877
- return n.trim().split(/\s+/g);
876
+ function U(r) {
877
+ return r.trim().split(/\s+/g);
878
878
  }
879
- function le(n, r, i) {
880
- if (n.indexOf && !i)
881
- return n.indexOf(r);
882
- for (var h = 0; h < n.length; ) {
883
- if (i && n[h][i] == r || !i && n[h] === r)
884
- return h;
885
- h++;
879
+ function Q(r, i, u) {
880
+ if (r.indexOf && !u)
881
+ return r.indexOf(i);
882
+ for (var p = 0; p < r.length; ) {
883
+ if (u && r[p][u] == i || !u && r[p] === i)
884
+ return p;
885
+ p++;
886
886
  }
887
887
  return -1;
888
888
  }
889
- function me(n) {
890
- return Array.prototype.slice.call(n, 0);
889
+ function oe(r) {
890
+ return Array.prototype.slice.call(r, 0);
891
891
  }
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++;
892
+ function le(r, i, u) {
893
+ for (var p = [], E = [], M = 0; M < r.length; ) {
894
+ var k = r[M][i];
895
+ Q(E, k) < 0 && p.push(r[M]), E[M] = k, M++;
896
896
  }
897
- return h = h.sort(function(se, W) {
898
- return se[r] > W[r];
899
- }), h;
900
- }
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++;
897
+ return p = p.sort(function(ce, $) {
898
+ return ce[i] > $[i];
899
+ }), p;
900
+ }
901
+ function J(r, i) {
902
+ for (var u, p, E = i[0].toUpperCase() + i.slice(1), M = 0; M < t.length; ) {
903
+ if (u = t[M], p = u ? u + E : i, p in r)
904
+ return p;
905
+ M++;
906
906
  }
907
- return a;
907
+ return n;
908
908
  }
909
- var ie = 1;
910
- function R() {
911
- return ie++;
909
+ var Z = 1;
910
+ function D() {
911
+ return Z++;
912
912
  }
913
- function I(n) {
914
- var r = n.ownerDocument || n;
915
- return r.defaultView || r.parentWindow || f;
913
+ function I(r) {
914
+ var i = r.ownerDocument || r;
915
+ return i.defaultView || i.parentWindow || h;
916
916
  }
917
- var O = /mobile|tablet|ip(ad|hone|od)|android/i, F = "ontouchstart" in f, Y = re(f, "PointerEvent") !== a, ne = F && O.test(navigator.userAgent), z = "touch", U = "pen", q = "mouse", V = "kinect", B = 25, k = 1, $ = 2, H = 4, G = 8, _e = 1, Ee = 2, Oe = 4, Se = 8, xe = 16, oe = Ee | Oe, ue = Se | xe, Ue = oe | ue, Be = ["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);
917
+ var N = /mobile|tablet|ip(ad|hone|od)|android/i, B = "ontouchstart" in h, Y = J(h, "PointerEvent") !== n, ae = B && N.test(navigator.userAgent), X = "touch", R = "pen", ee = "mouse", j = "kinect", z = 25, L = 1, ie = 2, W = 4, q = 8, Ce = 1, Pe = 2, Oe = 4, Ie = 8, Ae = 16, ue = Pe | Oe, de = Ie | Ae, Ue = ue | de, Re = ["x", "y"], Ne = ["clientX", "clientY"];
918
+ function se(r, i) {
919
+ var u = this;
920
+ this.manager = r, this.callback = i, this.element = r.element, this.target = r.options.inputTarget, this.domHandler = function(p) {
921
+ P(r.options.enable, [r]) && u.handler(p);
922
922
  }, this.init();
923
923
  }
924
- ae.prototype = {
924
+ se.prototype = {
925
925
  /**
926
926
  * should handle the inputEvent data and trigger the callback
927
927
  * @virtual
@@ -932,247 +932,247 @@ var wt = (function(f, o, e, a) {
932
932
  * bind the events
933
933
  */
934
934
  init: function() {
935
- this.evEl && S(this.element, this.evEl, this.domHandler), this.evTarget && S(this.target, this.evTarget, this.domHandler), this.evWin && S(I(this.element), this.evWin, this.domHandler);
935
+ this.evEl && C(this.element, this.evEl, this.domHandler), this.evTarget && C(this.target, this.evTarget, this.domHandler), this.evWin && C(I(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(I(this.element), this.evWin, this.domHandler);
941
+ this.evEl && _(this.element, this.evEl, this.domHandler), this.evTarget && _(this.target, this.evTarget, this.domHandler), this.evWin && _(I(this.element), this.evWin, this.domHandler);
942
942
  }
943
943
  };
944
- function Ke(n) {
945
- var r, i = n.options.inputClass;
946
- return i ? r = i : Y ? r = ht : ne ? r = $e : F ? r = ft : 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 & k && h - m === 0, N = r & (H | G) && h - m === 0;
950
- i.isFirst = !!E, i.isFinal = !!N, E && (n.session = {}), i.eventType = r, u(n, i), n.emit("hammer.input", i), n.recognize(i), n.session.prevInput = i;
951
- }
952
- function u(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 = ut(Q, se), r.distance = Qe(Q, se), D(i, r), r.offsetDirection = ge(r.deltaX, r.deltaY);
957
- var W = Ve(r.deltaTime, r.deltaX, r.deltaY);
958
- r.overallVelocityX = W.x, r.overallVelocityY = W.y, r.overallVelocity = g(W.x) > g(W.y) ? W.x : W.y, r.scale = N ? Jt(N.pointers, h) : 1, r.rotation = N ? Qt(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
- var de = n.element;
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 === k || E.eventType === H) && (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
- }
972
- function X(n, r) {
973
- var i = n.lastInterval || r, h = r.timeStamp - i.timeStamp, m, E, N, Q;
974
- if (r.eventType != G && (h > B || i.velocity === a)) {
975
- var se = r.deltaX - i.deltaX, W = r.deltaY - i.deltaY, de = Ve(h, se, W);
976
- E = de.x, N = de.y, m = g(de.x) > g(de.y) ? de.x : de.y, Q = ge(se, W), n.lastInterval = r;
944
+ function Ke(r) {
945
+ var i, u = r.options.inputClass;
946
+ return u ? i = u : Y ? i = ht : ae ? i = $e : B ? i = dt : i = Je, new i(r, Ze);
947
+ }
948
+ function Ze(r, i, u) {
949
+ var p = u.pointers.length, E = u.changedPointers.length, M = i & L && p - E === 0, k = i & (W | q) && p - E === 0;
950
+ u.isFirst = !!M, u.isFinal = !!k, M && (r.session = {}), u.eventType = i, d(r, u), r.emit("hammer.input", u), r.recognize(u), r.session.prevInput = u;
951
+ }
952
+ function d(r, i) {
953
+ var u = r.session, p = i.pointers, E = p.length;
954
+ u.firstInput || (u.firstInput = te(i)), E > 1 && !u.firstMultiple ? u.firstMultiple = te(i) : E === 1 && (u.firstMultiple = !1);
955
+ var M = u.firstInput, k = u.firstMultiple, ne = k ? k.center : M.center, ce = i.center = ve(p);
956
+ i.timeStamp = c(), i.deltaTime = i.timeStamp - M.timeStamp, i.angle = ft(ne, ce), i.distance = Qe(ne, ce), F(u, i), i.offsetDirection = be(i.deltaX, i.deltaY);
957
+ var $ = Ve(i.deltaTime, i.deltaX, i.deltaY);
958
+ i.overallVelocityX = $.x, i.overallVelocityY = $.y, i.overallVelocity = f($.x) > f($.y) ? $.x : $.y, i.scale = k ? an(k.pointers, p) : 1, i.rotation = k ? rn(k.pointers, p) : 0, i.maxPointers = u.prevInput ? i.pointers.length > u.prevInput.maxPointers ? i.pointers.length : u.prevInput.maxPointers : i.pointers.length, K(u, i);
959
+ var ge = r.element;
960
+ H(i.srcEvent.target, ge) && (ge = i.srcEvent.target), i.target = ge;
961
+ }
962
+ function F(r, i) {
963
+ var u = i.center, p = r.offsetDelta || {}, E = r.prevDelta || {}, M = r.prevInput || {};
964
+ (i.eventType === L || M.eventType === W) && (E = r.prevDelta = {
965
+ x: M.deltaX || 0,
966
+ y: M.deltaY || 0
967
+ }, p = r.offsetDelta = {
968
+ x: u.x,
969
+ y: u.y
970
+ }), i.deltaX = E.x + (u.x - p.x), i.deltaY = E.y + (u.y - p.y);
971
+ }
972
+ function K(r, i) {
973
+ var u = r.lastInterval || i, p = i.timeStamp - u.timeStamp, E, M, k, ne;
974
+ if (i.eventType != q && (p > z || u.velocity === n)) {
975
+ var ce = i.deltaX - u.deltaX, $ = i.deltaY - u.deltaY, ge = Ve(p, ce, $);
976
+ M = ge.x, k = ge.y, E = f(ge.x) > f(ge.y) ? ge.x : ge.y, ne = be(ce, $), r.lastInterval = i;
977
977
  } else
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++;
978
+ E = u.velocity, M = u.velocityX, k = u.velocityY, ne = u.direction;
979
+ i.velocity = E, i.velocityX = M, i.velocityY = k, i.direction = ne;
980
+ }
981
+ function te(r) {
982
+ for (var i = [], u = 0; u < r.pointers.length; )
983
+ i[u] = {
984
+ clientX: l(r.pointers[u].clientX),
985
+ clientY: l(r.pointers[u].clientY)
986
+ }, u++;
987
987
  return {
988
- timeStamp: d(),
989
- pointers: r,
990
- center: fe(r),
991
- deltaX: n.deltaX,
992
- deltaY: n.deltaY
988
+ timeStamp: c(),
989
+ pointers: i,
990
+ center: ve(i),
991
+ deltaX: r.deltaX,
992
+ deltaY: r.deltaY
993
993
  };
994
994
  }
995
- function fe(n) {
996
- var r = n.length;
997
- if (r === 1)
995
+ function ve(r) {
996
+ var i = r.length;
997
+ if (i === 1)
998
998
  return {
999
- x: l(n[0].clientX),
1000
- y: l(n[0].clientY)
999
+ x: l(r[0].clientX),
1000
+ y: l(r[0].clientY)
1001
1001
  };
1002
- for (var i = 0, h = 0, m = 0; m < r; )
1003
- i += n[m].clientX, h += n[m].clientY, m++;
1002
+ for (var u = 0, p = 0, E = 0; E < i; )
1003
+ u += r[E].clientX, p += r[E].clientY, E++;
1004
1004
  return {
1005
- x: l(i / r),
1006
- y: l(h / r)
1005
+ x: l(u / i),
1006
+ y: l(p / i)
1007
1007
  };
1008
1008
  }
1009
- function Ve(n, r, i) {
1009
+ function Ve(r, i, u) {
1010
1010
  return {
1011
- x: r / n || 0,
1012
- y: i / n || 0
1011
+ x: i / r || 0,
1012
+ y: u / r || 0
1013
1013
  };
1014
1014
  }
1015
- function ge(n, r) {
1016
- return n === r ? _e : g(n) >= g(r) ? n < 0 ? Ee : Oe : r < 0 ? Se : xe;
1015
+ function be(r, i) {
1016
+ return r === i ? Ce : f(r) >= f(i) ? r < 0 ? Pe : Oe : i < 0 ? Ie : Ae;
1017
1017
  }
1018
- function Qe(n, r, i) {
1019
- i || (i = Be);
1020
- var h = r[i[0]] - n[i[0]], m = r[i[1]] - n[i[1]];
1021
- return Math.sqrt(h * h + m * m);
1018
+ function Qe(r, i, u) {
1019
+ u || (u = Re);
1020
+ var p = i[u[0]] - r[u[0]], E = i[u[1]] - r[u[1]];
1021
+ return Math.sqrt(p * p + E * E);
1022
1022
  }
1023
- function ut(n, r, i) {
1024
- i || (i = Be);
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;
1023
+ function ft(r, i, u) {
1024
+ u || (u = Re);
1025
+ var p = i[u[0]] - r[u[0]], E = i[u[1]] - r[u[1]];
1026
+ return Math.atan2(E, p) * 180 / Math.PI;
1027
1027
  }
1028
- function Qt(n, r) {
1029
- return ut(r[1], r[0], Ie) + ut(n[1], n[0], Ie);
1028
+ function rn(r, i) {
1029
+ return ft(i[1], i[0], Ne) + ft(r[1], r[0], Ne);
1030
1030
  }
1031
- function Jt(n, r) {
1032
- return Qe(r[0], r[1], Ie) / Qe(n[0], n[1], Ie);
1031
+ function an(r, i) {
1032
+ return Qe(i[0], i[1], Ne) / Qe(r[0], r[1], Ne);
1033
1033
  }
1034
- var $t = {
1035
- mousedown: k,
1036
- mousemove: $,
1037
- mouseup: H
1038
- }, en = "mousedown", tn = "mousemove mouseup";
1034
+ var on = {
1035
+ mousedown: L,
1036
+ mousemove: ie,
1037
+ mouseup: W
1038
+ }, sn = "mousedown", ln = "mousemove mouseup";
1039
1039
  function Je() {
1040
- this.evEl = en, this.evWin = tn, this.pressed = !1, ae.apply(this, arguments);
1040
+ this.evEl = sn, this.evWin = ln, this.pressed = !1, se.apply(this, arguments);
1041
1041
  }
1042
- b(Je, ae, {
1042
+ T(Je, se, {
1043
1043
  /**
1044
1044
  * handle mouse events
1045
1045
  * @param {Object} ev
1046
1046
  */
1047
- handler: function(r) {
1048
- var i = $t[r.type];
1049
- i & k && (r.button === 0 || r.button === 2) && (this.pressed = !0), i & $ && r.which !== 1 && (i = H), this.pressed && (i & H && (this.pressed = !1), this.callback(this.manager, i, {
1050
- pointers: [r],
1051
- changedPointers: [r],
1052
- pointerType: q,
1053
- srcEvent: r
1047
+ handler: function(i) {
1048
+ var u = on[i.type];
1049
+ u & L && (i.button === 0 || i.button === 2) && (this.pressed = !0), u & ie && i.which !== 1 && (u = W), this.pressed && (u & W && (this.pressed = !1), this.callback(this.manager, u, {
1050
+ pointers: [i],
1051
+ changedPointers: [i],
1052
+ pointerType: ee,
1053
+ srcEvent: i
1054
1054
  }));
1055
1055
  }
1056
1056
  });
1057
- var _t = {
1058
- pointerdown: k,
1059
- pointermove: $,
1060
- pointerup: H,
1061
- pointercancel: G,
1062
- pointerout: G
1063
- }, nn = {
1064
- 2: z,
1065
- 3: U,
1066
- 4: q,
1067
- 5: V
1057
+ var Nt = {
1058
+ pointerdown: L,
1059
+ pointermove: ie,
1060
+ pointerup: W,
1061
+ pointercancel: q,
1062
+ pointerout: q
1063
+ }, un = {
1064
+ 2: X,
1065
+ 3: R,
1066
+ 4: ee,
1067
+ 5: j
1068
1068
  // see https://twitter.com/jacobrossi/status/480596438489890816
1069
- }, Ot = "pointerdown", St = "pointermove pointerup pointercancel";
1070
- f.MSPointerEvent && !f.PointerEvent && (Ot = "MSPointerDown", St = "MSPointerMove MSPointerUp MSPointerCancel");
1069
+ }, kt = "pointerdown", Lt = "pointermove pointerup pointercancel";
1070
+ h.MSPointerEvent && !h.PointerEvent && (kt = "MSPointerDown", Lt = "MSPointerMove MSPointerUp MSPointerCancel");
1071
1071
  function ht() {
1072
- this.evEl = Ot, this.evWin = St, ae.apply(this, arguments), this.store = this.manager.session.pointerEvents = [];
1072
+ this.evEl = kt, this.evWin = Lt, se.apply(this, arguments), this.store = this.manager.session.pointerEvents = [];
1073
1073
  }
1074
- b(ht, ae, {
1074
+ T(ht, se, {
1075
1075
  /**
1076
1076
  * handle mouse events
1077
1077
  * @param {Object} ev
1078
1078
  */
1079
- handler: function(r) {
1080
- var i = this.store, h = !1, m = !1, E = r.type.toLowerCase().replace("ms", ""), N = _t[E], Q = nn[r.pointerType] || r.pointerType, se = Q == z, W = le(i, r.pointerId, "pointerId");
1081
- N & k && (r.button === 0 || r.button === 2 || se) ? W < 0 && (i.push(r), W = i.length - 1) : N & (H | G) ? h = !0 : !se && r.buttons === 0 && (h = !0, m = !0, N = _t.pointerup), !(W < 0) && (m || (i[W] = r), this.callback(this.manager, N, {
1082
- pointers: i,
1083
- changedPointers: [r],
1084
- pointerType: Q,
1085
- srcEvent: i[W]
1086
- }), h && i.splice(W, 1));
1079
+ handler: function(i) {
1080
+ var u = this.store, p = !1, E = !1, M = i.type.toLowerCase().replace("ms", ""), k = Nt[M], ne = un[i.pointerType] || i.pointerType, ce = ne == X, $ = Q(u, i.pointerId, "pointerId");
1081
+ k & L && (i.button === 0 || i.button === 2 || ce) ? $ < 0 && (u.push(i), $ = u.length - 1) : k & (W | q) ? p = !0 : !ce && i.buttons === 0 && (p = !0, E = !0, k = Nt.pointerup), !($ < 0) && (E || (u[$] = i), this.callback(this.manager, k, {
1082
+ pointers: u,
1083
+ changedPointers: [i],
1084
+ pointerType: ne,
1085
+ srcEvent: u[$]
1086
+ }), p && u.splice($, 1));
1087
1087
  }
1088
1088
  });
1089
- var rn = {
1090
- touchstart: k,
1091
- touchmove: $,
1092
- touchend: H,
1093
- touchcancel: G
1094
- }, an = "touchstart", on = "touchstart touchmove touchend touchcancel";
1095
- function It() {
1096
- this.evTarget = an, this.evWin = on, this.started = !1, ae.apply(this, arguments);
1097
- }
1098
- b(It, ae, {
1099
- handler: function(r) {
1100
- var i = rn[r.type];
1101
- if (i === k && (this.started = !0), !!this.started) {
1102
- var h = sn.call(this, r, i);
1103
- i & (H | G) && 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: z,
1107
- srcEvent: r
1089
+ var cn = {
1090
+ touchstart: L,
1091
+ touchmove: ie,
1092
+ touchend: W,
1093
+ touchcancel: q
1094
+ }, fn = "touchstart", hn = "touchstart touchmove touchend touchcancel";
1095
+ function Dt() {
1096
+ this.evTarget = fn, this.evWin = hn, this.started = !1, se.apply(this, arguments);
1097
+ }
1098
+ T(Dt, se, {
1099
+ handler: function(i) {
1100
+ var u = cn[i.type];
1101
+ if (u === L && (this.started = !0), !!this.started) {
1102
+ var p = dn.call(this, i, u);
1103
+ u & (W | q) && p[0].length - p[1].length === 0 && (this.started = !1), this.callback(this.manager, u, {
1104
+ pointers: p[0],
1105
+ changedPointers: p[1],
1106
+ pointerType: X,
1107
+ srcEvent: i
1108
1108
  });
1109
1109
  }
1110
1110
  }
1111
1111
  });
1112
- function sn(n, r) {
1113
- var i = me(n.touches), h = me(n.changedTouches);
1114
- return r & (H | G) && (i = Ce(i.concat(h), "identifier")), [i, h];
1115
- }
1116
- var ln = {
1117
- touchstart: k,
1118
- touchmove: $,
1119
- touchend: H,
1120
- touchcancel: G
1121
- }, cn = "touchstart touchmove touchend touchcancel";
1112
+ function dn(r, i) {
1113
+ var u = oe(r.touches), p = oe(r.changedTouches);
1114
+ return i & (W | q) && (u = le(u.concat(p), "identifier")), [u, p];
1115
+ }
1116
+ var pn = {
1117
+ touchstart: L,
1118
+ touchmove: ie,
1119
+ touchend: W,
1120
+ touchcancel: q
1121
+ }, vn = "touchstart touchmove touchend touchcancel";
1122
1122
  function $e() {
1123
- this.evTarget = cn, this.targetIds = {}, ae.apply(this, arguments);
1124
- }
1125
- b($e, ae, {
1126
- handler: function(r) {
1127
- var i = ln[r.type], h = un.call(this, r, i);
1128
- h && this.callback(this.manager, i, {
1129
- pointers: h[0],
1130
- changedPointers: h[1],
1131
- pointerType: z,
1132
- srcEvent: r
1123
+ this.evTarget = vn, this.targetIds = {}, se.apply(this, arguments);
1124
+ }
1125
+ T($e, se, {
1126
+ handler: function(i) {
1127
+ var u = pn[i.type], p = mn.call(this, i, u);
1128
+ p && this.callback(this.manager, u, {
1129
+ pointers: p[0],
1130
+ changedPointers: p[1],
1131
+ pointerType: X,
1132
+ srcEvent: i
1133
1133
  });
1134
1134
  }
1135
1135
  });
1136
- function un(n, r) {
1137
- var i = me(n.touches), h = this.targetIds;
1138
- if (r & (k | $) && 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(W) {
1142
- return ee(W.target, se);
1143
- }), r === k)
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 & (H | G) && delete h[N[m].identifier], m++;
1148
- if (Q.length)
1136
+ function mn(r, i) {
1137
+ var u = oe(r.touches), p = this.targetIds;
1138
+ if (i & (L | ie) && u.length === 1)
1139
+ return p[u[0].identifier] = !0, [u, u];
1140
+ var E, M, k = oe(r.changedTouches), ne = [], ce = this.target;
1141
+ if (M = u.filter(function($) {
1142
+ return H($.target, ce);
1143
+ }), i === L)
1144
+ for (E = 0; E < M.length; )
1145
+ p[M[E].identifier] = !0, E++;
1146
+ for (E = 0; E < k.length; )
1147
+ p[k[E].identifier] && ne.push(k[E]), i & (W | q) && delete p[k[E].identifier], E++;
1148
+ if (ne.length)
1149
1149
  return [
1150
1150
  // merge targetTouches with changedTargetTouches so it contains ALL touches, including 'end' and 'cancel'
1151
- Ce(E.concat(Q), "identifier"),
1152
- Q
1151
+ le(M.concat(ne), "identifier"),
1152
+ ne
1153
1153
  ];
1154
1154
  }
1155
- var hn = 2500, Nt = 25;
1156
- function ft() {
1157
- ae.apply(this, arguments);
1158
- var n = y(this.handler, this);
1159
- this.touch = new $e(this.manager, n), this.mouse = new Je(this.manager, n), this.primaryTouch = null, this.lastTouches = [];
1155
+ var gn = 2500, Ft = 25;
1156
+ function dt() {
1157
+ se.apply(this, arguments);
1158
+ var r = b(this.handler, this);
1159
+ this.touch = new $e(this.manager, r), this.mouse = new Je(this.manager, r), this.primaryTouch = null, this.lastTouches = [];
1160
1160
  }
1161
- b(ft, ae, {
1161
+ T(dt, se, {
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, i, h) {
1169
- var m = h.pointerType == z, E = h.pointerType == q;
1170
- if (!(E && h.sourceCapabilities && h.sourceCapabilities.firesTouchEvents)) {
1171
- if (m)
1172
- fn.call(this, i, h);
1173
- else if (E && pn.call(this, h))
1168
+ handler: function(i, u, p) {
1169
+ var E = p.pointerType == X, M = p.pointerType == ee;
1170
+ if (!(M && p.sourceCapabilities && p.sourceCapabilities.firesTouchEvents)) {
1171
+ if (E)
1172
+ yn.call(this, u, p);
1173
+ else if (M && bn.call(this, p))
1174
1174
  return;
1175
- this.callback(r, i, h);
1175
+ this.callback(i, u, p);
1176
1176
  }
1177
1177
  },
1178
1178
  /**
@@ -1182,40 +1182,40 @@ var wt = (function(f, o, e, a) {
1182
1182
  this.touch.destroy(), this.mouse.destroy();
1183
1183
  }
1184
1184
  });
1185
- function fn(n, r) {
1186
- n & k ? (this.primaryTouch = r.changedPointers[0].identifier, kt.call(this, r)) : n & (H | G) && kt.call(this, r);
1187
- }
1188
- function kt(n) {
1189
- var r = n.changedPointers[0];
1190
- if (r.identifier === this.primaryTouch) {
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);
1185
+ function yn(r, i) {
1186
+ r & L ? (this.primaryTouch = i.changedPointers[0].identifier, Bt.call(this, i)) : r & (W | q) && Bt.call(this, i);
1187
+ }
1188
+ function Bt(r) {
1189
+ var i = r.changedPointers[0];
1190
+ if (i.identifier === this.primaryTouch) {
1191
+ var u = { x: i.clientX, y: i.clientY };
1192
+ this.lastTouches.push(u);
1193
+ var p = this.lastTouches, E = function() {
1194
+ var M = p.indexOf(u);
1195
+ M > -1 && p.splice(M, 1);
1196
1196
  };
1197
- setTimeout(m, hn);
1197
+ setTimeout(E, gn);
1198
1198
  }
1199
1199
  }
1200
- function pn(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 <= Nt && N <= Nt)
1200
+ function bn(r) {
1201
+ for (var i = r.srcEvent.clientX, u = r.srcEvent.clientY, p = 0; p < this.lastTouches.length; p++) {
1202
+ var E = this.lastTouches[p], M = Math.abs(i - E.x), k = Math.abs(u - E.y);
1203
+ if (M <= Ft && k <= Ft)
1204
1204
  return !0;
1205
1205
  }
1206
1206
  return !1;
1207
1207
  }
1208
- var Lt = s ? re(s.style, "touchAction") : a, Dt = Lt !== a, Rt = "compute", Ft = "auto", pt = "manipulation", Ne = "none", Ye = "pan-x", je = "pan-y", et = vn();
1209
- function dt(n, r) {
1210
- this.manager = n, this.set(r);
1208
+ var Ut = a ? J(a.style, "touchAction") : n, Rt = Ut !== n, Vt = "compute", zt = "auto", pt = "manipulation", ke = "none", ze = "pan-x", je = "pan-y", et = En();
1209
+ function vt(r, i) {
1210
+ this.manager = r, this.set(i);
1211
1211
  }
1212
- dt.prototype = {
1212
+ vt.prototype = {
1213
1213
  /**
1214
1214
  * set the touchAction value on the element or enable the polyfill
1215
1215
  * @param {String} value
1216
1216
  */
1217
- set: function(n) {
1218
- n == Rt && (n = this.compute()), Dt && this.manager.element.style && et[n] && (this.manager.element.style[Lt] = n), this.actions = n.toLowerCase().trim();
1217
+ set: function(r) {
1218
+ r == Vt && (r = this.compute()), Rt && this.manager.element.style && et[r] && (this.manager.element.style[Ut] = r), this.actions = r.toLowerCase().trim();
1219
1219
  },
1220
1220
  /**
1221
1221
  * just re-set the touchAction value
@@ -1228,57 +1228,57 @@ var wt = (function(f, o, e, a) {
1228
1228
  * @returns {String} value
1229
1229
  */
1230
1230
  compute: function() {
1231
- var n = [];
1232
- return A(this.manager.recognizers, function(r) {
1233
- P(r.options.enable, [r]) && (n = n.concat(r.getTouchAction()));
1234
- }), dn(n.join(" "));
1231
+ var r = [];
1232
+ return w(this.manager.recognizers, function(i) {
1233
+ P(i.options.enable, [i]) && (r = r.concat(i.getTouchAction()));
1234
+ }), wn(r.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
- preventDefaults: function(n) {
1241
- var r = n.srcEvent, i = n.offsetDirection;
1240
+ preventDefaults: function(r) {
1241
+ var i = r.srcEvent, u = r.offsetDirection;
1242
1242
  if (this.manager.session.prevented) {
1243
- r.preventDefault();
1243
+ i.preventDefault();
1244
1244
  return;
1245
1245
  }
1246
- var h = this.actions, m = Z(h, Ne) && !et[Ne], E = Z(h, je) && !et[je], N = Z(h, Ye) && !et[Ye];
1247
- if (m) {
1248
- var Q = n.pointers.length === 1, se = n.distance < 2, W = n.deltaTime < 250;
1249
- if (Q && se && W)
1246
+ var p = this.actions, E = G(p, ke) && !et[ke], M = G(p, je) && !et[je], k = G(p, ze) && !et[ze];
1247
+ if (E) {
1248
+ var ne = r.pointers.length === 1, ce = r.distance < 2, $ = r.deltaTime < 250;
1249
+ if (ne && ce && $)
1250
1250
  return;
1251
1251
  }
1252
- if (!(N && E) && (m || E && i & oe || N && i & ue))
1253
- return this.preventSrc(r);
1252
+ if (!(k && M) && (E || M && u & ue || k && u & de))
1253
+ return this.preventSrc(i);
1254
1254
  },
1255
1255
  /**
1256
1256
  * call preventDefault to prevent the browser's default behavior (scrolling in most cases)
1257
1257
  * @param {Object} srcEvent
1258
1258
  */
1259
- preventSrc: function(n) {
1260
- this.manager.session.prevented = !0, n.preventDefault();
1259
+ preventSrc: function(r) {
1260
+ this.manager.session.prevented = !0, r.preventDefault();
1261
1261
  }
1262
1262
  };
1263
- function dn(n) {
1264
- if (Z(n, Ne))
1265
- return Ne;
1266
- var r = Z(n, Ye), i = Z(n, je);
1267
- return r && i ? Ne : r || i ? r ? Ye : je : Z(n, pt) ? pt : Ft;
1268
- }
1269
- function vn() {
1270
- if (!Dt)
1263
+ function wn(r) {
1264
+ if (G(r, ke))
1265
+ return ke;
1266
+ var i = G(r, ze), u = G(r, je);
1267
+ return i && u ? ke : i || u ? i ? ze : je : G(r, pt) ? pt : zt;
1268
+ }
1269
+ function En() {
1270
+ if (!Rt)
1271
1271
  return !1;
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
- }), n;
1272
+ var r = {}, i = h.CSS && h.CSS.supports;
1273
+ return ["auto", "manipulation", "pan-y", "pan-x", "pan-x pan-y", "none"].forEach(function(u) {
1274
+ r[u] = i ? h.CSS.supports("touch-action", u) : !0;
1275
+ }), r;
1276
1276
  }
1277
- var tt = 1, ce = 2, ke = 4, Pe = 8, ye = Pe, He = 16, pe = 32;
1278
- function be(n) {
1279
- this.options = _({}, this.defaults, n || {}), this.id = R(), this.manager = null, this.options.enable = p(this.options.enable, !0), this.state = tt, this.simultaneous = {}, this.requireFail = [];
1277
+ var tt = 1, fe = 2, Fe = 4, Se = 8, we = Se, Ge = 16, me = 32;
1278
+ function Ee(r) {
1279
+ this.options = A({}, this.defaults, r || {}), this.id = D(), this.manager = null, this.options.enable = m(this.options.enable, !0), this.state = tt, this.simultaneous = {}, this.requireFail = [];
1280
1280
  }
1281
- be.prototype = {
1281
+ Ee.prototype = {
1282
1282
  /**
1283
1283
  * @virtual
1284
1284
  * @type {Object}
@@ -1289,50 +1289,50 @@ var wt = (function(f, o, e, a) {
1289
1289
  * @param {Object} options
1290
1290
  * @return {Recognizer}
1291
1291
  */
1292
- set: function(n) {
1293
- return _(this.options, n), this.manager && this.manager.touchAction.update(), this;
1292
+ set: function(r) {
1293
+ return A(this.options, r), this.manager && this.manager.touchAction.update(), this;
1294
1294
  },
1295
1295
  /**
1296
1296
  * recognize simultaneous with an other recognizer.
1297
1297
  * @param {Recognizer} otherRecognizer
1298
1298
  * @returns {Recognizer} this
1299
1299
  */
1300
- recognizeWith: function(n) {
1301
- if (T(n, "recognizeWith", this))
1300
+ recognizeWith: function(r) {
1301
+ if (y(r, "recognizeWith", this))
1302
1302
  return this;
1303
- var r = this.simultaneous;
1304
- return n = nt(n, this), r[n.id] || (r[n.id] = n, n.recognizeWith(this)), this;
1303
+ var i = this.simultaneous;
1304
+ return r = nt(r, this), i[r.id] || (i[r.id] = r, r.recognizeWith(this)), this;
1305
1305
  },
1306
1306
  /**
1307
1307
  * drop the simultaneous link. it doesnt remove the link on the other recognizer.
1308
1308
  * @param {Recognizer} otherRecognizer
1309
1309
  * @returns {Recognizer} this
1310
1310
  */
1311
- dropRecognizeWith: function(n) {
1312
- return T(n, "dropRecognizeWith", this) ? this : (n = nt(n, this), delete this.simultaneous[n.id], this);
1311
+ dropRecognizeWith: function(r) {
1312
+ return y(r, "dropRecognizeWith", this) ? this : (r = nt(r, this), delete this.simultaneous[r.id], this);
1313
1313
  },
1314
1314
  /**
1315
1315
  * recognizer can only run when an other is failing
1316
1316
  * @param {Recognizer} otherRecognizer
1317
1317
  * @returns {Recognizer} this
1318
1318
  */
1319
- requireFailure: function(n) {
1320
- if (T(n, "requireFailure", this))
1319
+ requireFailure: function(r) {
1320
+ if (y(r, "requireFailure", this))
1321
1321
  return this;
1322
- var r = this.requireFail;
1323
- return n = nt(n, this), le(r, n) === -1 && (r.push(n), n.requireFailure(this)), this;
1322
+ var i = this.requireFail;
1323
+ return r = nt(r, this), Q(i, r) === -1 && (i.push(r), r.requireFailure(this)), this;
1324
1324
  },
1325
1325
  /**
1326
1326
  * drop the requireFailure link. it does not remove the link on the other recognizer.
1327
1327
  * @param {Recognizer} otherRecognizer
1328
1328
  * @returns {Recognizer} this
1329
1329
  */
1330
- dropRequireFailure: function(n) {
1331
- if (T(n, "dropRequireFailure", this))
1330
+ dropRequireFailure: function(r) {
1331
+ if (y(r, "dropRequireFailure", this))
1332
1332
  return this;
1333
- n = nt(n, this);
1334
- var r = le(this.requireFail, n);
1335
- return r > -1 && this.requireFail.splice(r, 1), this;
1333
+ r = nt(r, this);
1334
+ var i = Q(this.requireFail, r);
1335
+ return i > -1 && this.requireFail.splice(i, 1), this;
1336
1336
  },
1337
1337
  /**
1338
1338
  * has require failures boolean
@@ -1346,20 +1346,20 @@ var wt = (function(f, o, e, a) {
1346
1346
  * @param {Recognizer} otherRecognizer
1347
1347
  * @returns {Boolean}
1348
1348
  */
1349
- canRecognizeWith: function(n) {
1350
- return !!this.simultaneous[n.id];
1349
+ canRecognizeWith: function(r) {
1350
+ return !!this.simultaneous[r.id];
1351
1351
  },
1352
1352
  /**
1353
1353
  * You should use `tryEmit` instead of `emit` directly to check
1354
1354
  * that all the needed recognizers has failed before emitting.
1355
1355
  * @param {Object} input
1356
1356
  */
1357
- emit: function(n) {
1358
- var r = this, i = this.state;
1359
- function h(m) {
1360
- r.manager.emit(m, n);
1357
+ emit: function(r) {
1358
+ var i = this, u = this.state;
1359
+ function p(E) {
1360
+ i.manager.emit(E, r);
1361
1361
  }
1362
- i < Pe && h(r.options.event + Ut(i)), h(r.options.event), n.additionalEvent && h(n.additionalEvent), i >= Pe && h(r.options.event + Ut(i));
1362
+ u < Se && p(i.options.event + jt(u)), p(i.options.event), r.additionalEvent && p(r.additionalEvent), u >= Se && p(i.options.event + jt(u));
1363
1363
  },
1364
1364
  /**
1365
1365
  * Check that all the require failure recognizers has failed,
@@ -1367,20 +1367,20 @@ var wt = (function(f, o, e, a) {
1367
1367
  * otherwise, setup the state to FAILED.
1368
1368
  * @param {Object} input
1369
1369
  */
1370
- tryEmit: function(n) {
1370
+ tryEmit: function(r) {
1371
1371
  if (this.canEmit())
1372
- return this.emit(n);
1373
- this.state = pe;
1372
+ return this.emit(r);
1373
+ this.state = me;
1374
1374
  },
1375
1375
  /**
1376
1376
  * can we emit?
1377
1377
  * @returns {boolean}
1378
1378
  */
1379
1379
  canEmit: function() {
1380
- for (var n = 0; n < this.requireFail.length; ) {
1381
- if (!(this.requireFail[n].state & (pe | tt)))
1380
+ for (var r = 0; r < this.requireFail.length; ) {
1381
+ if (!(this.requireFail[r].state & (me | tt)))
1382
1382
  return !1;
1383
- n++;
1383
+ r++;
1384
1384
  }
1385
1385
  return !0;
1386
1386
  },
@@ -1388,13 +1388,13 @@ var wt = (function(f, o, e, a) {
1388
1388
  * update the recognizer
1389
1389
  * @param {Object} inputData
1390
1390
  */
1391
- recognize: function(n) {
1392
- var r = _({}, n);
1393
- if (!P(this.options.enable, [this, r])) {
1394
- this.reset(), this.state = pe;
1391
+ recognize: function(r) {
1392
+ var i = A({}, r);
1393
+ if (!P(this.options.enable, [this, i])) {
1394
+ this.reset(), this.state = me;
1395
1395
  return;
1396
1396
  }
1397
- this.state & (ye | He | pe) && (this.state = tt), this.state = this.process(r), this.state & (ce | ke | Pe | He) && this.tryEmit(r);
1397
+ this.state & (we | Ge | me) && (this.state = tt), this.state = this.process(i), this.state & (fe | Fe | Se | Ge) && this.tryEmit(i);
1398
1398
  },
1399
1399
  /**
1400
1400
  * return the state of the recognizer
@@ -1403,7 +1403,7 @@ var wt = (function(f, o, e, a) {
1403
1403
  * @param {Object} inputData
1404
1404
  * @returns {Const} STATE
1405
1405
  */
1406
- process: function(n) {
1406
+ process: function(r) {
1407
1407
  },
1408
1408
  // jshint ignore:line
1409
1409
  /**
@@ -1421,20 +1421,20 @@ var wt = (function(f, o, e, a) {
1421
1421
  reset: function() {
1422
1422
  }
1423
1423
  };
1424
- function Ut(n) {
1425
- return n & He ? "cancel" : n & Pe ? "end" : n & ke ? "move" : n & ce ? "start" : "";
1424
+ function jt(r) {
1425
+ return r & Ge ? "cancel" : r & Se ? "end" : r & Fe ? "move" : r & fe ? "start" : "";
1426
1426
  }
1427
- function Bt(n) {
1428
- return n == xe ? "down" : n == Se ? "up" : n == Ee ? "left" : n == Oe ? "right" : "";
1427
+ function Gt(r) {
1428
+ return r == Ae ? "down" : r == Ie ? "up" : r == Pe ? "left" : r == Oe ? "right" : "";
1429
1429
  }
1430
- function nt(n, r) {
1431
- var i = r.manager;
1432
- return i ? i.get(n) : n;
1430
+ function nt(r, i) {
1431
+ var u = i.manager;
1432
+ return u ? u.get(r) : r;
1433
1433
  }
1434
- function he() {
1435
- be.apply(this, arguments);
1434
+ function pe() {
1435
+ Ee.apply(this, arguments);
1436
1436
  }
1437
- b(he, be, {
1437
+ T(pe, Ee, {
1438
1438
  /**
1439
1439
  * @namespace
1440
1440
  * @memberof AttrRecognizer
@@ -1452,9 +1452,9 @@ var wt = (function(f, o, e, a) {
1452
1452
  * @param {Object} input
1453
1453
  * @returns {Boolean} recognized
1454
1454
  */
1455
- attrTest: function(n) {
1456
- var r = this.options.pointers;
1457
- return r === 0 || n.pointers.length === r;
1455
+ attrTest: function(r) {
1456
+ var i = this.options.pointers;
1457
+ return i === 0 || r.pointers.length === i;
1458
1458
  },
1459
1459
  /**
1460
1460
  * Process the input and return the state for the recognizer
@@ -1462,15 +1462,15 @@ var wt = (function(f, o, e, a) {
1462
1462
  * @param {Object} input
1463
1463
  * @returns {*} State
1464
1464
  */
1465
- process: function(n) {
1466
- var r = this.state, i = n.eventType, h = r & (ce | ke), m = this.attrTest(n);
1467
- return h && (i & G || !m) ? r | He : h || m ? i & H ? r | Pe : r & ce ? r | ke : ce : pe;
1465
+ process: function(r) {
1466
+ var i = this.state, u = r.eventType, p = i & (fe | Fe), E = this.attrTest(r);
1467
+ return p && (u & q || !E) ? i | Ge : p || E ? u & W ? i | Se : i & fe ? i | Fe : fe : me;
1468
1468
  }
1469
1469
  });
1470
1470
  function rt() {
1471
- he.apply(this, arguments), this.pX = null, this.pY = null;
1471
+ pe.apply(this, arguments), this.pX = null, this.pY = null;
1472
1472
  }
1473
- b(rt, he, {
1473
+ T(rt, pe, {
1474
1474
  /**
1475
1475
  * @namespace
1476
1476
  * @memberof PanRecognizer
@@ -1482,26 +1482,26 @@ var wt = (function(f, o, e, a) {
1482
1482
  direction: Ue
1483
1483
  },
1484
1484
  getTouchAction: function() {
1485
- var n = this.options.direction, r = [];
1486
- return n & oe && r.push(je), n & ue && r.push(Ye), r;
1485
+ var r = this.options.direction, i = [];
1486
+ return r & ue && i.push(je), r & de && i.push(ze), i;
1487
1487
  },
1488
- directionTest: function(n) {
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 ? _e : E < 0 ? Ee : Oe, i = E != this.pX, h = Math.abs(n.deltaX)) : (m = N === 0 ? _e : N < 0 ? Se : xe, i = N != this.pY, h = Math.abs(n.deltaY))), n.direction = m, i && h > r.threshold && m & r.direction;
1488
+ directionTest: function(r) {
1489
+ var i = this.options, u = !0, p = r.distance, E = r.direction, M = r.deltaX, k = r.deltaY;
1490
+ return E & i.direction || (i.direction & ue ? (E = M === 0 ? Ce : M < 0 ? Pe : Oe, u = M != this.pX, p = Math.abs(r.deltaX)) : (E = k === 0 ? Ce : k < 0 ? Ie : Ae, u = k != this.pY, p = Math.abs(r.deltaY))), r.direction = E, u && p > i.threshold && E & i.direction;
1491
1491
  },
1492
- attrTest: function(n) {
1493
- return he.prototype.attrTest.call(this, n) && (this.state & ce || !(this.state & ce) && this.directionTest(n));
1492
+ attrTest: function(r) {
1493
+ return pe.prototype.attrTest.call(this, r) && (this.state & fe || !(this.state & fe) && this.directionTest(r));
1494
1494
  },
1495
- emit: function(n) {
1496
- this.pX = n.deltaX, this.pY = n.deltaY;
1497
- var r = Bt(n.direction);
1498
- r && (n.additionalEvent = this.options.event + r), this._super.emit.call(this, n);
1495
+ emit: function(r) {
1496
+ this.pX = r.deltaX, this.pY = r.deltaY;
1497
+ var i = Gt(r.direction);
1498
+ i && (r.additionalEvent = this.options.event + i), this._super.emit.call(this, r);
1499
1499
  }
1500
1500
  });
1501
- function vt() {
1502
- he.apply(this, arguments);
1501
+ function mt() {
1502
+ pe.apply(this, arguments);
1503
1503
  }
1504
- b(vt, he, {
1504
+ T(mt, pe, {
1505
1505
  /**
1506
1506
  * @namespace
1507
1507
  * @memberof PinchRecognizer
@@ -1512,23 +1512,23 @@ var wt = (function(f, o, e, a) {
1512
1512
  pointers: 2
1513
1513
  },
1514
1514
  getTouchAction: function() {
1515
- return [Ne];
1515
+ return [ke];
1516
1516
  },
1517
- attrTest: function(n) {
1518
- return this._super.attrTest.call(this, n) && (Math.abs(n.scale - 1) > this.options.threshold || this.state & ce);
1517
+ attrTest: function(r) {
1518
+ return this._super.attrTest.call(this, r) && (Math.abs(r.scale - 1) > this.options.threshold || this.state & fe);
1519
1519
  },
1520
- emit: function(n) {
1521
- if (n.scale !== 1) {
1522
- var r = n.scale < 1 ? "in" : "out";
1523
- n.additionalEvent = this.options.event + r;
1520
+ emit: function(r) {
1521
+ if (r.scale !== 1) {
1522
+ var i = r.scale < 1 ? "in" : "out";
1523
+ r.additionalEvent = this.options.event + i;
1524
1524
  }
1525
- this._super.emit.call(this, n);
1525
+ this._super.emit.call(this, r);
1526
1526
  }
1527
1527
  });
1528
- function mt() {
1529
- be.apply(this, arguments), this._timer = null, this._input = null;
1528
+ function gt() {
1529
+ Ee.apply(this, arguments), this._timer = null, this._input = null;
1530
1530
  }
1531
- b(mt, be, {
1531
+ T(gt, Ee, {
1532
1532
  /**
1533
1533
  * @namespace
1534
1534
  * @memberof PressRecognizer
@@ -1542,31 +1542,31 @@ var wt = (function(f, o, e, a) {
1542
1542
  // a minimal movement is ok, but keep it low
1543
1543
  },
1544
1544
  getTouchAction: function() {
1545
- return [Ft];
1545
+ return [zt];
1546
1546
  },
1547
- process: function(n) {
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 & (H | G) && !m)
1547
+ process: function(r) {
1548
+ var i = this.options, u = r.pointers.length === i.pointers, p = r.distance < i.threshold, E = r.deltaTime > i.time;
1549
+ if (this._input = r, !p || !u || r.eventType & (W | q) && !E)
1550
1550
  this.reset();
1551
- else if (n.eventType & k)
1552
- this.reset(), this._timer = v(function() {
1553
- this.state = ye, this.tryEmit();
1554
- }, r.time, this);
1555
- else if (n.eventType & H)
1556
- return ye;
1557
- return pe;
1551
+ else if (r.eventType & L)
1552
+ this.reset(), this._timer = g(function() {
1553
+ this.state = we, this.tryEmit();
1554
+ }, i.time, this);
1555
+ else if (r.eventType & W)
1556
+ return we;
1557
+ return me;
1558
1558
  },
1559
1559
  reset: function() {
1560
1560
  clearTimeout(this._timer);
1561
1561
  },
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)));
1562
+ emit: function(r) {
1563
+ this.state === we && (r && r.eventType & W ? this.manager.emit(this.options.event + "up", r) : (this._input.timeStamp = c(), this.manager.emit(this.options.event, this._input)));
1564
1564
  }
1565
1565
  });
1566
- function gt() {
1567
- he.apply(this, arguments);
1566
+ function yt() {
1567
+ pe.apply(this, arguments);
1568
1568
  }
1569
- b(gt, he, {
1569
+ T(yt, pe, {
1570
1570
  /**
1571
1571
  * @namespace
1572
1572
  * @memberof RotateRecognizer
@@ -1577,16 +1577,16 @@ var wt = (function(f, o, e, a) {
1577
1577
  pointers: 2
1578
1578
  },
1579
1579
  getTouchAction: function() {
1580
- return [Ne];
1580
+ return [ke];
1581
1581
  },
1582
- attrTest: function(n) {
1583
- return this._super.attrTest.call(this, n) && (Math.abs(n.rotation) > this.options.threshold || this.state & ce);
1582
+ attrTest: function(r) {
1583
+ return this._super.attrTest.call(this, r) && (Math.abs(r.rotation) > this.options.threshold || this.state & fe);
1584
1584
  }
1585
1585
  });
1586
- function yt() {
1587
- he.apply(this, arguments);
1586
+ function bt() {
1587
+ pe.apply(this, arguments);
1588
1588
  }
1589
- b(yt, he, {
1589
+ T(bt, pe, {
1590
1590
  /**
1591
1591
  * @namespace
1592
1592
  * @memberof SwipeRecognizer
@@ -1595,25 +1595,25 @@ var wt = (function(f, o, e, a) {
1595
1595
  event: "swipe",
1596
1596
  threshold: 10,
1597
1597
  velocity: 0.3,
1598
- direction: oe | ue,
1598
+ direction: ue | de,
1599
1599
  pointers: 1
1600
1600
  },
1601
1601
  getTouchAction: function() {
1602
1602
  return rt.prototype.getTouchAction.call(this);
1603
1603
  },
1604
- attrTest: function(n) {
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 & H;
1604
+ attrTest: function(r) {
1605
+ var i = this.options.direction, u;
1606
+ return i & (ue | de) ? u = r.overallVelocity : i & ue ? u = r.overallVelocityX : i & de && (u = r.overallVelocityY), this._super.attrTest.call(this, r) && i & r.offsetDirection && r.distance > this.options.threshold && r.maxPointers == this.options.pointers && f(u) > this.options.velocity && r.eventType & W;
1607
1607
  },
1608
- emit: function(n) {
1609
- var r = Bt(n.offsetDirection);
1610
- r && this.manager.emit(this.options.event + r, n), this.manager.emit(this.options.event, n);
1608
+ emit: function(r) {
1609
+ var i = Gt(r.offsetDirection);
1610
+ i && this.manager.emit(this.options.event + i, r), this.manager.emit(this.options.event, r);
1611
1611
  }
1612
1612
  });
1613
- function at() {
1614
- be.apply(this, arguments), this.pTime = !1, this.pCenter = !1, this._timer = null, this._input = null, this.count = 0;
1613
+ function it() {
1614
+ Ee.apply(this, arguments), this.pTime = !1, this.pCenter = !1, this._timer = null, this._input = null, this.count = 0;
1615
1615
  }
1616
- b(at, be, {
1616
+ T(it, Ee, {
1617
1617
  /**
1618
1618
  * @namespace
1619
1619
  * @memberof PinchRecognizer
@@ -1634,39 +1634,39 @@ var wt = (function(f, o, e, a) {
1634
1634
  getTouchAction: function() {
1635
1635
  return [pt];
1636
1636
  },
1637
- process: function(n) {
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 & k && this.count === 0)
1637
+ process: function(r) {
1638
+ var i = this.options, u = r.pointers.length === i.pointers, p = r.distance < i.threshold, E = r.deltaTime < i.time;
1639
+ if (this.reset(), r.eventType & L && this.count === 0)
1640
1640
  return this.failTimeout();
1641
- if (h && m && i) {
1642
- if (n.eventType != H)
1641
+ if (p && E && u) {
1642
+ if (r.eventType != W)
1643
1643
  return this.failTimeout();
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
- this.state = ye, this.tryEmit();
1650
- }, r.interval, this), ce) : ye;
1651
- }
1652
- return pe;
1644
+ var M = this.pTime ? r.timeStamp - this.pTime < i.interval : !0, k = !this.pCenter || Qe(this.pCenter, r.center) < i.posThreshold;
1645
+ this.pTime = r.timeStamp, this.pCenter = r.center, !k || !M ? this.count = 1 : this.count += 1, this._input = r;
1646
+ var ne = this.count % i.taps;
1647
+ if (ne === 0)
1648
+ return this.hasRequireFailures() ? (this._timer = g(function() {
1649
+ this.state = we, this.tryEmit();
1650
+ }, i.interval, this), fe) : we;
1651
+ }
1652
+ return me;
1653
1653
  },
1654
1654
  failTimeout: function() {
1655
- return this._timer = v(function() {
1656
- this.state = pe;
1657
- }, this.options.interval, this), pe;
1655
+ return this._timer = g(function() {
1656
+ this.state = me;
1657
+ }, this.options.interval, this), me;
1658
1658
  },
1659
1659
  reset: function() {
1660
1660
  clearTimeout(this._timer);
1661
1661
  },
1662
1662
  emit: function() {
1663
- this.state == ye && (this._input.tapCount = this.count, this.manager.emit(this.options.event, this._input));
1663
+ this.state == we && (this._input.tapCount = this.count, this.manager.emit(this.options.event, this._input));
1664
1664
  }
1665
1665
  });
1666
- function Le(n, r) {
1667
- return r = r || {}, r.recognizers = p(r.recognizers, Le.defaults.preset), new bt(n, r);
1666
+ function Be(r, i) {
1667
+ return i = i || {}, i.recognizers = m(i.recognizers, Be.defaults.preset), new wt(r, i);
1668
1668
  }
1669
- Le.VERSION = "2.0.7", Le.defaults = {
1669
+ Be.VERSION = "2.0.7", Be.defaults = {
1670
1670
  /**
1671
1671
  * set if DOM events are being triggered.
1672
1672
  * But this is slower and unused by simple implementations, so disabled by default.
@@ -1680,7 +1680,7 @@ var wt = (function(f, o, e, a) {
1680
1680
  * @type {String}
1681
1681
  * @default compute
1682
1682
  */
1683
- touchAction: Rt,
1683
+ touchAction: Vt,
1684
1684
  /**
1685
1685
  * @type {Boolean}
1686
1686
  * @default true
@@ -1707,13 +1707,13 @@ var wt = (function(f, o, e, a) {
1707
1707
  */
1708
1708
  preset: [
1709
1709
  // RecognizerClass, options, [recognizeWith, ...], [requireFailure, ...]
1710
- [gt, { enable: !1 }],
1711
- [vt, { enable: !1 }, ["rotate"]],
1712
- [yt, { direction: oe }],
1713
- [rt, { direction: oe }, ["swipe"]],
1714
- [at],
1715
- [at, { event: "doubletap", taps: 2 }, ["tap"]],
1716
- [mt]
1710
+ [yt, { enable: !1 }],
1711
+ [mt, { enable: !1 }, ["rotate"]],
1712
+ [bt, { direction: ue }],
1713
+ [rt, { direction: ue }, ["swipe"]],
1714
+ [it],
1715
+ [it, { event: "doubletap", taps: 2 }, ["tap"]],
1716
+ [gt]
1717
1717
  ],
1718
1718
  /**
1719
1719
  * Some CSS properties can be used to improve the working of Hammer.
@@ -1762,21 +1762,21 @@ var wt = (function(f, o, e, a) {
1762
1762
  tapHighlightColor: "rgba(0,0,0,0)"
1763
1763
  }
1764
1764
  };
1765
- var mn = 1, Vt = 2;
1766
- function bt(n, r) {
1767
- this.options = _({}, 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 dt(this, this.options.touchAction), Yt(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]);
1765
+ var Tn = 1, Yt = 2;
1766
+ function wt(r, i) {
1767
+ this.options = A({}, Be.defaults, i || {}), this.options.inputTarget = this.options.inputTarget || r, this.handlers = {}, this.session = {}, this.recognizers = [], this.oldCssProps = {}, this.element = r, this.input = Ke(this), this.touchAction = new vt(this, this.options.touchAction), Ht(this, !0), w(this.options.recognizers, function(u) {
1768
+ var p = this.add(new u[0](u[1]));
1769
+ u[2] && p.recognizeWith(u[2]), u[3] && p.requireFailure(u[3]);
1770
1770
  }, this);
1771
1771
  }
1772
- bt.prototype = {
1772
+ wt.prototype = {
1773
1773
  /**
1774
1774
  * set options
1775
1775
  * @param {Object} options
1776
1776
  * @returns {Manager}
1777
1777
  */
1778
- set: function(n) {
1779
- return _(this.options, n), n.touchAction && this.touchAction.update(), n.inputTarget && (this.input.destroy(), this.input.target = n.inputTarget, this.input.init()), this;
1778
+ set: function(r) {
1779
+ return A(this.options, r), r.touchAction && this.touchAction.update(), r.inputTarget && (this.input.destroy(), this.input.target = r.inputTarget, this.input.init()), this;
1780
1780
  },
1781
1781
  /**
1782
1782
  * stop recognizing for this session.
@@ -1784,8 +1784,8 @@ var wt = (function(f, o, e, a) {
1784
1784
  * When forced, the recognizer cycle is stopped immediately.
1785
1785
  * @param {Boolean} [force]
1786
1786
  */
1787
- stop: function(n) {
1788
- this.session.stopped = n ? Vt : mn;
1787
+ stop: function(r) {
1788
+ this.session.stopped = r ? Yt : Tn;
1789
1789
  },
1790
1790
  /**
1791
1791
  * run the recognizers!
@@ -1793,16 +1793,16 @@ var wt = (function(f, o, e, a) {
1793
1793
  * it walks through all the recognizers and tries to detect the gesture that is being made
1794
1794
  * @param {Object} inputData
1795
1795
  */
1796
- recognize: function(n) {
1797
- var r = this.session;
1798
- if (!r.stopped) {
1799
- this.touchAction.preventDefaults(n);
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 !== Vt && // 1
1804
- (!m || i == m || // 2
1805
- i.canRecognizeWith(m)) ? i.recognize(n) : i.reset(), !m && i.state & (ce | ke | Pe) && (m = r.curRecognizer = i), E++;
1796
+ recognize: function(r) {
1797
+ var i = this.session;
1798
+ if (!i.stopped) {
1799
+ this.touchAction.preventDefaults(r);
1800
+ var u, p = this.recognizers, E = i.curRecognizer;
1801
+ (!E || E && E.state & we) && (E = i.curRecognizer = null);
1802
+ for (var M = 0; M < p.length; )
1803
+ u = p[M], i.stopped !== Yt && // 1
1804
+ (!E || u == E || // 2
1805
+ u.canRecognizeWith(E)) ? u.recognize(r) : u.reset(), !E && u.state & (fe | Fe | Se) && (E = i.curRecognizer = u), M++;
1806
1806
  }
1807
1807
  },
1808
1808
  /**
@@ -1810,12 +1810,12 @@ var wt = (function(f, o, e, a) {
1810
1810
  * @param {Recognizer|String} recognizer
1811
1811
  * @returns {Recognizer|Null}
1812
1812
  */
1813
- get: function(n) {
1814
- if (n instanceof be)
1815
- return n;
1816
- for (var r = this.recognizers, i = 0; i < r.length; i++)
1817
- if (r[i].options.event == n)
1818
- return r[i];
1813
+ get: function(r) {
1814
+ if (r instanceof Ee)
1815
+ return r;
1816
+ for (var i = this.recognizers, u = 0; u < i.length; u++)
1817
+ if (i[u].options.event == r)
1818
+ return i[u];
1819
1819
  return null;
1820
1820
  },
1821
1821
  /**
@@ -1824,23 +1824,23 @@ var wt = (function(f, o, e, a) {
1824
1824
  * @param {Recognizer} recognizer
1825
1825
  * @returns {Recognizer|Manager}
1826
1826
  */
1827
- add: function(n) {
1828
- if (T(n, "add", this))
1827
+ add: function(r) {
1828
+ if (y(r, "add", this))
1829
1829
  return this;
1830
- var r = this.get(n.options.event);
1831
- return r && this.remove(r), this.recognizers.push(n), n.manager = this, this.touchAction.update(), n;
1830
+ var i = this.get(r.options.event);
1831
+ return i && this.remove(i), this.recognizers.push(r), r.manager = this, this.touchAction.update(), r;
1832
1832
  },
1833
1833
  /**
1834
1834
  * remove a recognizer by name or instance
1835
1835
  * @param {Recognizer|String} recognizer
1836
1836
  * @returns {Manager}
1837
1837
  */
1838
- remove: function(n) {
1839
- if (T(n, "remove", this))
1838
+ remove: function(r) {
1839
+ if (y(r, "remove", this))
1840
1840
  return this;
1841
- if (n = this.get(n), n) {
1842
- var r = this.recognizers, i = le(r, n);
1843
- i !== -1 && (r.splice(i, 1), this.touchAction.update());
1841
+ if (r = this.get(r), r) {
1842
+ var i = this.recognizers, u = Q(i, r);
1843
+ u !== -1 && (i.splice(u, 1), this.touchAction.update());
1844
1844
  }
1845
1845
  return this;
1846
1846
  },
@@ -1850,11 +1850,11 @@ var wt = (function(f, o, e, a) {
1850
1850
  * @param {Function} handler
1851
1851
  * @returns {EventEmitter} this
1852
1852
  */
1853
- on: function(n, 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);
1853
+ on: function(r, i) {
1854
+ if (r !== n && i !== n) {
1855
+ var u = this.handlers;
1856
+ return w(U(r), function(p) {
1857
+ u[p] = u[p] || [], u[p].push(i);
1858
1858
  }), this;
1859
1859
  }
1860
1860
  },
@@ -1864,11 +1864,11 @@ var wt = (function(f, o, e, a) {
1864
1864
  * @param {Function} [handler]
1865
1865
  * @returns {EventEmitter} this
1866
1866
  */
1867
- off: function(n, r) {
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];
1867
+ off: function(r, i) {
1868
+ if (r !== n) {
1869
+ var u = this.handlers;
1870
+ return w(U(r), function(p) {
1871
+ i ? u[p] && u[p].splice(Q(u[p], i), 1) : delete u[p];
1872
1872
  }), this;
1873
1873
  }
1874
1874
  },
@@ -1877,15 +1877,15 @@ var wt = (function(f, o, e, a) {
1877
1877
  * @param {String} event
1878
1878
  * @param {Object} data
1879
1879
  */
1880
- emit: function(n, r) {
1881
- this.options.domEvents && gn(n, r);
1882
- var i = this.handlers[n] && this.handlers[n].slice();
1883
- if (!(!i || !i.length)) {
1884
- r.type = n, r.preventDefault = function() {
1885
- r.srcEvent.preventDefault();
1880
+ emit: function(r, i) {
1881
+ this.options.domEvents && xn(r, i);
1882
+ var u = this.handlers[r] && this.handlers[r].slice();
1883
+ if (!(!u || !u.length)) {
1884
+ i.type = r, i.preventDefault = function() {
1885
+ i.srcEvent.preventDefault();
1886
1886
  };
1887
- for (var h = 0; h < i.length; )
1888
- i[h](r), h++;
1887
+ for (var p = 0; p < u.length; )
1888
+ u[p](i), p++;
1889
1889
  }
1890
1890
  },
1891
1891
  /**
@@ -1893,87 +1893,87 @@ var wt = (function(f, o, e, a) {
1893
1893
  * it doesn't unbind dom events, that is the user own responsibility
1894
1894
  */
1895
1895
  destroy: function() {
1896
- this.element && Yt(this, !1), this.handlers = {}, this.session = {}, this.input.destroy(), this.element = null;
1896
+ this.element && Ht(this, !1), this.handlers = {}, this.session = {}, this.input.destroy(), this.element = null;
1897
1897
  }
1898
1898
  };
1899
- function Yt(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
- }), r || (n.oldCssProps = {});
1899
+ function Ht(r, i) {
1900
+ var u = r.element;
1901
+ if (u.style) {
1902
+ var p;
1903
+ w(r.options.cssProps, function(E, M) {
1904
+ p = J(u.style, M), i ? (r.oldCssProps[p] = u.style[p], u.style[p] = E) : u.style[p] = r.oldCssProps[p] || "";
1905
+ }), i || (r.oldCssProps = {});
1906
1906
  }
1907
1907
  }
1908
- function gn(n, r) {
1909
- var i = o.createEvent("Event");
1910
- i.initEvent(n, !0, !0), i.gesture = r, r.target.dispatchEvent(i);
1908
+ function xn(r, i) {
1909
+ var u = o.createEvent("Event");
1910
+ u.initEvent(r, !0, !0), u.gesture = i, i.target.dispatchEvent(u);
1911
1911
  }
1912
- return _(Le, {
1913
- INPUT_START: k,
1914
- INPUT_MOVE: $,
1915
- INPUT_END: H,
1916
- INPUT_CANCEL: G,
1912
+ return A(Be, {
1913
+ INPUT_START: L,
1914
+ INPUT_MOVE: ie,
1915
+ INPUT_END: W,
1916
+ INPUT_CANCEL: q,
1917
1917
  STATE_POSSIBLE: tt,
1918
- STATE_BEGAN: ce,
1919
- STATE_CHANGED: ke,
1920
- STATE_ENDED: Pe,
1921
- STATE_RECOGNIZED: ye,
1922
- STATE_CANCELLED: He,
1923
- STATE_FAILED: pe,
1924
- DIRECTION_NONE: _e,
1925
- DIRECTION_LEFT: Ee,
1918
+ STATE_BEGAN: fe,
1919
+ STATE_CHANGED: Fe,
1920
+ STATE_ENDED: Se,
1921
+ STATE_RECOGNIZED: we,
1922
+ STATE_CANCELLED: Ge,
1923
+ STATE_FAILED: me,
1924
+ DIRECTION_NONE: Ce,
1925
+ DIRECTION_LEFT: Pe,
1926
1926
  DIRECTION_RIGHT: Oe,
1927
- DIRECTION_UP: Se,
1928
- DIRECTION_DOWN: xe,
1929
- DIRECTION_HORIZONTAL: oe,
1930
- DIRECTION_VERTICAL: ue,
1927
+ DIRECTION_UP: Ie,
1928
+ DIRECTION_DOWN: Ae,
1929
+ DIRECTION_HORIZONTAL: ue,
1930
+ DIRECTION_VERTICAL: de,
1931
1931
  DIRECTION_ALL: Ue,
1932
- Manager: bt,
1933
- Input: ae,
1934
- TouchAction: dt,
1932
+ Manager: wt,
1933
+ Input: se,
1934
+ TouchAction: vt,
1935
1935
  TouchInput: $e,
1936
1936
  MouseInput: Je,
1937
1937
  PointerEventInput: ht,
1938
- TouchMouseInput: ft,
1939
- SingleTouchInput: It,
1940
- Recognizer: be,
1941
- AttrRecognizer: he,
1942
- Tap: at,
1938
+ TouchMouseInput: dt,
1939
+ SingleTouchInput: Dt,
1940
+ Recognizer: Ee,
1941
+ AttrRecognizer: pe,
1942
+ Tap: it,
1943
1943
  Pan: rt,
1944
- Swipe: yt,
1945
- Pinch: vt,
1946
- Rotate: gt,
1947
- Press: mt,
1948
- on: S,
1949
- off: M,
1950
- each: A,
1951
- merge: L,
1952
- extend: C,
1953
- assign: _,
1954
- inherit: b,
1955
- bindFn: y,
1956
- prefixed: re
1957
- }), Le;
1958
- })(typeof window != "undefined" ? window : {}, typeof document != "undefined" ? document : {}), qe = 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
- return d.phi;
1944
+ Swipe: bt,
1945
+ Pinch: mt,
1946
+ Rotate: yt,
1947
+ Press: gt,
1948
+ on: C,
1949
+ off: _,
1950
+ each: w,
1951
+ merge: O,
1952
+ extend: S,
1953
+ assign: A,
1954
+ inherit: T,
1955
+ bindFn: b,
1956
+ prefixed: J
1957
+ }), Be;
1958
+ })(typeof window != "undefined" ? window : {}, typeof document != "undefined" ? document : {}), qe = function(h, 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 = h, this.domElement = o, this.enabled = !0, this.target = new ye(), 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: Me.ROTATE, MIDDLE: Me.DOLLY, RIGHT: Me.PAN }, this.touches = { ONE: _e.ROTATE, TWO: _e.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this.getPolarAngle = function() {
1960
+ return c.phi;
1961
1961
  }, this.getAzimuthalAngle = function() {
1962
- return d.theta;
1962
+ return c.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(a), e.update(), l = c.NONE;
1966
+ e.target.copy(e.target0), e.object.position.copy(e.position0), e.object.zoom = e.zoom0, e.object.updateProjectionMatrix(), e.dispatchEvent(n), e.update(), l = s.NONE;
1967
1967
  }, this.update = (function() {
1968
- var u = new ve(), D = new Ht().setFromUnitVectors(f.up, new ve(0, 1, 0)), X = D.clone().inverse(), K = new ve(), fe = new Ht();
1968
+ var d = new ye(), F = new Xt().setFromUnitVectors(h.up, new ye(0, 1, 0)), K = F.clone().inverse(), te = new ye(), ve = new Xt();
1969
1969
  return function() {
1970
- var ge = e.object.position;
1971
- return u.copy(ge).sub(e.target), u.applyQuaternion(D), d.setFromVector3(u), e.autoRotate && l === c.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), u.setFromSpherical(d), u.applyQuaternion(X), ge.copy(e.target).add(u), 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, x || 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), x = !1, !0) : !1;
1970
+ var be = e.object.position;
1971
+ return d.copy(be).sub(e.target), d.applyQuaternion(F), c.setFromVector3(d), e.autoRotate && l === s.NONE && U(H()), e.enableDamping ? (c.theta += g.theta * e.dampingFactor, c.phi += g.phi * e.dampingFactor) : (c.theta += g.theta, c.phi += g.phi), c.theta = Math.max(e.minAzimuthAngle, Math.min(e.maxAzimuthAngle, c.theta)), c.phi = Math.max(e.minPolarAngle, Math.min(e.maxPolarAngle, c.phi)), c.makeSafe(), c.radius *= y, c.radius = Math.max(e.minDistance, Math.min(e.maxDistance, c.radius)), e.enableDamping === !0 ? e.target.addScaledVector(w, e.dampingFactor) : e.target.add(w), d.setFromSpherical(c), d.applyQuaternion(K), be.copy(e.target).add(d), e.object.lookAt(e.target), e.enableDamping === !0 ? (g.theta *= 1 - e.dampingFactor, g.phi *= 1 - e.dampingFactor, w.multiplyScalar(1 - e.dampingFactor)) : (g.set(0, 0, 0), w.set(0, 0, 0)), y = 1, x || te.distanceToSquared(e.object.position) > f || 8 * (1 - ve.dot(e.object.quaternion)) > f ? (e.dispatchEvent(n), te.copy(e.object.position), ve.copy(e.object.quaternion), x = !1, !0) : !1;
1972
1972
  };
1973
1973
  })(), this.dispose = function() {
1974
- e.domElement.removeEventListener("contextmenu", Ze, !1), e.domElement.removeEventListener("mousedown", xe, !1), e.domElement.removeEventListener("wheel", Ue, !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", Be, !1);
1974
+ e.domElement.removeEventListener("contextmenu", Ze, !1), e.domElement.removeEventListener("mousedown", Ae, !1), e.domElement.removeEventListener("wheel", Ue, !1), e.domElement.removeEventListener("touchstart", Ne, !1), e.domElement.removeEventListener("touchend", Ke, !1), e.domElement.removeEventListener("touchmove", se, !1), document.removeEventListener("mousemove", ue, !1), document.removeEventListener("mouseup", de, !1), e.domElement.removeEventListener("keydown", Re, !1);
1975
1975
  };
1976
- var e = this, a = { type: "change" }, t = { type: "start" }, s = { type: "end" }, c = {
1976
+ var e = this, n = { type: "change" }, t = { type: "start" }, a = { type: "end" }, s = {
1977
1977
  NONE: -1,
1978
1978
  ROTATE: 0,
1979
1979
  DOLLY: 1,
@@ -1982,440 +1982,440 @@ var wt = (function(f, o, e, a) {
1982
1982
  TOUCH_PAN: 4,
1983
1983
  TOUCH_DOLLY_PAN: 5,
1984
1984
  TOUCH_DOLLY_ROTATE: 6
1985
- }, l = c.NONE, g = 1e-6, d = new jt(), v = new jt(), T = 1, A = new ve(), x = !1, _ = new Te(), C = new Te(), L = new Te(), b = new Te(), y = new Te(), P = new Te(), p = new Te(), S = new Te(), M = new Te();
1986
- function ee() {
1985
+ }, l = s.NONE, f = 1e-6, c = new Wt(), g = new Wt(), y = 1, w = new ye(), x = !1, A = new Te(), S = new Te(), O = new Te(), T = new Te(), b = new Te(), P = new Te(), m = new Te(), C = new Te(), _ = new Te();
1986
+ function H() {
1987
1987
  return 2 * Math.PI / 60 / 60 * e.autoRotateSpeed;
1988
1988
  }
1989
- function Z() {
1989
+ function G() {
1990
1990
  return Math.pow(0.95, e.zoomSpeed);
1991
1991
  }
1992
- function te(u) {
1993
- v.theta -= u;
1992
+ function U(d) {
1993
+ g.theta -= d;
1994
1994
  }
1995
- function le(u) {
1996
- v.phi -= u;
1995
+ function Q(d) {
1996
+ g.phi -= d;
1997
1997
  }
1998
- var me = (function() {
1999
- var u = new ve();
2000
- return function(X, K) {
2001
- u.setFromMatrixColumn(K, 0), u.multiplyScalar(-X), A.add(u);
1998
+ var oe = (function() {
1999
+ var d = new ye();
2000
+ return function(K, te) {
2001
+ d.setFromMatrixColumn(te, 0), d.multiplyScalar(-K), w.add(d);
2002
2002
  };
2003
- })(), Ce = (function() {
2004
- var u = new ve();
2005
- return function(X, K) {
2006
- e.screenSpacePanning === !0 ? u.setFromMatrixColumn(K, 1) : (u.setFromMatrixColumn(K, 0), u.crossVectors(e.object.up, u)), u.multiplyScalar(X), A.add(u);
2003
+ })(), le = (function() {
2004
+ var d = new ye();
2005
+ return function(K, te) {
2006
+ e.screenSpacePanning === !0 ? d.setFromMatrixColumn(te, 1) : (d.setFromMatrixColumn(te, 0), d.crossVectors(e.object.up, d)), d.multiplyScalar(K), w.add(d);
2007
2007
  };
2008
- })(), re = (function() {
2009
- var u = new ve();
2010
- return function(X, K) {
2011
- var fe = e.domElement;
2008
+ })(), J = (function() {
2009
+ var d = new ye();
2010
+ return function(K, te) {
2011
+ var ve = e.domElement;
2012
2012
  if (e.object.isPerspectiveCamera) {
2013
2013
  var Ve = e.object.position;
2014
- u.copy(Ve).sub(e.target);
2015
- var ge = u.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);
2014
+ d.copy(Ve).sub(e.target);
2015
+ var be = d.length();
2016
+ be *= Math.tan(e.object.fov / 2 * Math.PI / 180), oe(2 * K * be / ve.clientHeight, e.object.matrix), le(2 * te * be / ve.clientHeight, e.object.matrix);
2017
+ } else e.object.isOrthographicCamera ? (oe(K * (e.object.right - e.object.left) / e.object.zoom / ve.clientWidth, e.object.matrix), le(te * (e.object.top - e.object.bottom) / e.object.zoom / ve.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(u) {
2021
- e.object.isPerspectiveCamera ? T /= u : e.object.isOrthographicCamera ? (e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom * u)), e.object.updateProjectionMatrix(), x = !0) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), e.enableZoom = !1);
2020
+ function Z(d) {
2021
+ e.object.isPerspectiveCamera ? y /= d : e.object.isOrthographicCamera ? (e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom * d)), e.object.updateProjectionMatrix(), x = !0) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), e.enableZoom = !1);
2022
2022
  }
2023
- function R(u) {
2024
- e.object.isPerspectiveCamera ? T *= u : e.object.isOrthographicCamera ? (e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom / u)), e.object.updateProjectionMatrix(), x = !0) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), e.enableZoom = !1);
2023
+ function D(d) {
2024
+ e.object.isPerspectiveCamera ? y *= d : e.object.isOrthographicCamera ? (e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom / d)), e.object.updateProjectionMatrix(), x = !0) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), e.enableZoom = !1);
2025
2025
  }
2026
- function I(u) {
2027
- _.set(u.clientX, u.clientY);
2026
+ function I(d) {
2027
+ A.set(d.clientX, d.clientY);
2028
2028
  }
2029
- function O(u) {
2030
- p.set(u.clientX, u.clientY);
2029
+ function N(d) {
2030
+ m.set(d.clientX, d.clientY);
2031
2031
  }
2032
- function F(u) {
2033
- b.set(u.clientX, u.clientY);
2032
+ function B(d) {
2033
+ T.set(d.clientX, d.clientY);
2034
2034
  }
2035
- function Y(u) {
2036
- C.set(u.clientX, u.clientY), L.subVectors(C, _).multiplyScalar(e.rotateSpeed);
2037
- var D = e.domElement;
2038
- te(2 * Math.PI * L.x / D.clientHeight), le(2 * Math.PI * L.y / D.clientHeight), _.copy(C), e.update();
2035
+ function Y(d) {
2036
+ S.set(d.clientX, d.clientY), O.subVectors(S, A).multiplyScalar(e.rotateSpeed);
2037
+ var F = e.domElement;
2038
+ U(2 * Math.PI * O.x / F.clientHeight), Q(2 * Math.PI * O.y / F.clientHeight), A.copy(S), e.update();
2039
2039
  }
2040
- function ne(u) {
2041
- S.set(u.clientX, u.clientY), M.subVectors(S, p), M.y > 0 ? ie(Z()) : M.y < 0 && R(Z()), p.copy(S), e.update();
2040
+ function ae(d) {
2041
+ C.set(d.clientX, d.clientY), _.subVectors(C, m), _.y > 0 ? Z(G()) : _.y < 0 && D(G()), m.copy(C), e.update();
2042
2042
  }
2043
- function z(u) {
2044
- y.set(u.clientX, u.clientY), P.subVectors(y, b).multiplyScalar(e.panSpeed), re(P.x, P.y), b.copy(y), e.update();
2043
+ function X(d) {
2044
+ b.set(d.clientX, d.clientY), P.subVectors(b, T).multiplyScalar(e.panSpeed), J(P.x, P.y), T.copy(b), e.update();
2045
2045
  }
2046
- function U(u) {
2047
- u.deltaY < 0 ? R(Z()) : u.deltaY > 0 && ie(Z()), e.update();
2046
+ function R(d) {
2047
+ d.deltaY < 0 ? D(G()) : d.deltaY > 0 && Z(G()), e.update();
2048
2048
  }
2049
- function q(u) {
2050
- var D = !1;
2051
- switch (u.keyCode) {
2049
+ function ee(d) {
2050
+ var F = !1;
2051
+ switch (d.keyCode) {
2052
2052
  case e.keys.UP:
2053
- re(0, e.keyPanSpeed), D = !0;
2053
+ J(0, e.keyPanSpeed), F = !0;
2054
2054
  break;
2055
2055
  case e.keys.BOTTOM:
2056
- re(0, -e.keyPanSpeed), D = !0;
2056
+ J(0, -e.keyPanSpeed), F = !0;
2057
2057
  break;
2058
2058
  case e.keys.LEFT:
2059
- re(e.keyPanSpeed, 0), D = !0;
2059
+ J(e.keyPanSpeed, 0), F = !0;
2060
2060
  break;
2061
2061
  case e.keys.RIGHT:
2062
- re(-e.keyPanSpeed, 0), D = !0;
2062
+ J(-e.keyPanSpeed, 0), F = !0;
2063
2063
  break;
2064
2064
  }
2065
- D && (u.preventDefault(), e.update());
2065
+ F && (d.preventDefault(), e.update());
2066
2066
  }
2067
- function V(u) {
2068
- if (u.touches.length == 1)
2069
- _.set(u.touches[0].pageX, u.touches[0].pageY);
2067
+ function j(d) {
2068
+ if (d.touches.length == 1)
2069
+ A.set(d.touches[0].pageX, d.touches[0].pageY);
2070
2070
  else {
2071
- var D = 0.5 * (u.touches[0].pageX + u.touches[1].pageX), X = 0.5 * (u.touches[0].pageY + u.touches[1].pageY);
2072
- _.set(D, X);
2071
+ var F = 0.5 * (d.touches[0].pageX + d.touches[1].pageX), K = 0.5 * (d.touches[0].pageY + d.touches[1].pageY);
2072
+ A.set(F, K);
2073
2073
  }
2074
2074
  }
2075
- function B(u) {
2076
- if (u.touches.length == 1)
2077
- b.set(u.touches[0].pageX, u.touches[0].pageY);
2075
+ function z(d) {
2076
+ if (d.touches.length == 1)
2077
+ T.set(d.touches[0].pageX, d.touches[0].pageY);
2078
2078
  else {
2079
- var D = 0.5 * (u.touches[0].pageX + u.touches[1].pageX), X = 0.5 * (u.touches[0].pageY + u.touches[1].pageY);
2080
- b.set(D, X);
2079
+ var F = 0.5 * (d.touches[0].pageX + d.touches[1].pageX), K = 0.5 * (d.touches[0].pageY + d.touches[1].pageY);
2080
+ T.set(F, K);
2081
2081
  }
2082
2082
  }
2083
- function k(u) {
2084
- var D = u.touches[0].pageX - u.touches[1].pageX, X = u.touches[0].pageY - u.touches[1].pageY, K = Math.sqrt(D * D + X * X);
2085
- p.set(0, K);
2083
+ function L(d) {
2084
+ var F = d.touches[0].pageX - d.touches[1].pageX, K = d.touches[0].pageY - d.touches[1].pageY, te = Math.sqrt(F * F + K * K);
2085
+ m.set(0, te);
2086
2086
  }
2087
- function $(u) {
2088
- e.enableZoom && k(u), e.enablePan && B(u);
2087
+ function ie(d) {
2088
+ e.enableZoom && L(d), e.enablePan && z(d);
2089
2089
  }
2090
- function H(u) {
2091
- e.enableZoom && k(u), e.enableRotate && V(u);
2090
+ function W(d) {
2091
+ e.enableZoom && L(d), e.enableRotate && j(d);
2092
2092
  }
2093
- function G(u) {
2094
- if (u.touches.length == 1)
2095
- C.set(u.touches[0].pageX, u.touches[0].pageY);
2093
+ function q(d) {
2094
+ if (d.touches.length == 1)
2095
+ S.set(d.touches[0].pageX, d.touches[0].pageY);
2096
2096
  else {
2097
- var D = 0.5 * (u.touches[0].pageX + u.touches[1].pageX), X = 0.5 * (u.touches[0].pageY + u.touches[1].pageY);
2098
- C.set(D, X);
2097
+ var F = 0.5 * (d.touches[0].pageX + d.touches[1].pageX), K = 0.5 * (d.touches[0].pageY + d.touches[1].pageY);
2098
+ S.set(F, K);
2099
2099
  }
2100
- L.subVectors(C, _).multiplyScalar(e.rotateSpeed);
2101
- var K = e.domElement;
2102
- te(2 * Math.PI * L.x / K.clientHeight), le(2 * Math.PI * L.y / K.clientHeight), _.copy(C);
2100
+ O.subVectors(S, A).multiplyScalar(e.rotateSpeed);
2101
+ var te = e.domElement;
2102
+ U(2 * Math.PI * O.x / te.clientHeight), Q(2 * Math.PI * O.y / te.clientHeight), A.copy(S);
2103
2103
  }
2104
- function _e(u) {
2105
- if (u.touches.length == 1)
2106
- y.set(u.touches[0].pageX, u.touches[0].pageY);
2104
+ function Ce(d) {
2105
+ if (d.touches.length == 1)
2106
+ b.set(d.touches[0].pageX, d.touches[0].pageY);
2107
2107
  else {
2108
- var D = 0.5 * (u.touches[0].pageX + u.touches[1].pageX), X = 0.5 * (u.touches[0].pageY + u.touches[1].pageY);
2109
- y.set(D, X);
2108
+ var F = 0.5 * (d.touches[0].pageX + d.touches[1].pageX), K = 0.5 * (d.touches[0].pageY + d.touches[1].pageY);
2109
+ b.set(F, K);
2110
2110
  }
2111
- P.subVectors(y, b).multiplyScalar(e.panSpeed), re(P.x, P.y), b.copy(y);
2111
+ P.subVectors(b, T).multiplyScalar(e.panSpeed), J(P.x, P.y), T.copy(b);
2112
2112
  }
2113
- function Ee(u) {
2114
- var D = u.touches[0].pageX - u.touches[1].pageX, X = u.touches[0].pageY - u.touches[1].pageY, K = Math.sqrt(D * D + X * X);
2115
- S.set(0, K), M.set(0, Math.pow(S.y / p.y, e.zoomSpeed)), ie(M.y), p.copy(S);
2113
+ function Pe(d) {
2114
+ var F = d.touches[0].pageX - d.touches[1].pageX, K = d.touches[0].pageY - d.touches[1].pageY, te = Math.sqrt(F * F + K * K);
2115
+ C.set(0, te), _.set(0, Math.pow(C.y / m.y, e.zoomSpeed)), Z(_.y), m.copy(C);
2116
2116
  }
2117
- function Oe(u) {
2118
- e.enableZoom && Ee(u), e.enablePan && _e(u);
2117
+ function Oe(d) {
2118
+ e.enableZoom && Pe(d), e.enablePan && Ce(d);
2119
2119
  }
2120
- function Se(u) {
2121
- e.enableZoom && Ee(u), e.enableRotate && G(u);
2120
+ function Ie(d) {
2121
+ e.enableZoom && Pe(d), e.enableRotate && q(d);
2122
2122
  }
2123
- function xe(u) {
2123
+ function Ae(d) {
2124
2124
  if (e.enabled !== !1) {
2125
- u.preventDefault(), e.domElement.focus ? e.domElement.focus() : window.focus();
2126
- var D;
2127
- switch (u.button) {
2125
+ d.preventDefault(), e.domElement.focus ? e.domElement.focus() : window.focus();
2126
+ var F;
2127
+ switch (d.button) {
2128
2128
  case 0:
2129
- D = e.mouseButtons.LEFT;
2129
+ F = e.mouseButtons.LEFT;
2130
2130
  break;
2131
2131
  case 1:
2132
- D = e.mouseButtons.MIDDLE;
2132
+ F = e.mouseButtons.MIDDLE;
2133
2133
  break;
2134
2134
  case 2:
2135
- D = e.mouseButtons.RIGHT;
2135
+ F = e.mouseButtons.RIGHT;
2136
2136
  break;
2137
2137
  default:
2138
- D = -1;
2138
+ F = -1;
2139
2139
  }
2140
- switch (D) {
2141
- case Ae.DOLLY:
2140
+ switch (F) {
2141
+ case Me.DOLLY:
2142
2142
  if (e.enableZoom === !1) return;
2143
- O(u), l = c.DOLLY;
2143
+ N(d), l = s.DOLLY;
2144
2144
  break;
2145
- case Ae.ROTATE:
2146
- if (u.ctrlKey || u.metaKey || u.shiftKey) {
2145
+ case Me.ROTATE:
2146
+ if (d.ctrlKey || d.metaKey || d.shiftKey) {
2147
2147
  if (e.enablePan === !1) return;
2148
- F(u), l = c.PAN;
2148
+ B(d), l = s.PAN;
2149
2149
  } else {
2150
2150
  if (e.enableRotate === !1) return;
2151
- I(u), l = c.ROTATE;
2151
+ I(d), l = s.ROTATE;
2152
2152
  }
2153
2153
  break;
2154
- case Ae.PAN:
2155
- if (u.ctrlKey || u.metaKey || u.shiftKey) {
2154
+ case Me.PAN:
2155
+ if (d.ctrlKey || d.metaKey || d.shiftKey) {
2156
2156
  if (e.enableRotate === !1) return;
2157
- I(u), l = c.ROTATE;
2157
+ I(d), l = s.ROTATE;
2158
2158
  } else {
2159
2159
  if (e.enablePan === !1) return;
2160
- F(u), l = c.PAN;
2160
+ B(d), l = s.PAN;
2161
2161
  }
2162
2162
  break;
2163
2163
  default:
2164
- l = c.NONE;
2164
+ l = s.NONE;
2165
2165
  }
2166
- l !== c.NONE && (document.addEventListener("mousemove", oe, !1), document.addEventListener("mouseup", ue, !1), e.dispatchEvent(t));
2166
+ l !== s.NONE && (document.addEventListener("mousemove", ue, !1), document.addEventListener("mouseup", de, !1), e.dispatchEvent(t));
2167
2167
  }
2168
2168
  }
2169
- function oe(u) {
2169
+ function ue(d) {
2170
2170
  if (e.enabled !== !1)
2171
- switch (u.preventDefault(), l) {
2172
- case c.ROTATE:
2171
+ switch (d.preventDefault(), l) {
2172
+ case s.ROTATE:
2173
2173
  if (e.enableRotate === !1) return;
2174
- Y(u);
2174
+ Y(d);
2175
2175
  break;
2176
- case c.DOLLY:
2176
+ case s.DOLLY:
2177
2177
  if (e.enableZoom === !1) return;
2178
- ne(u);
2178
+ ae(d);
2179
2179
  break;
2180
- case c.PAN:
2180
+ case s.PAN:
2181
2181
  if (e.enablePan === !1) return;
2182
- z(u);
2182
+ X(d);
2183
2183
  break;
2184
2184
  }
2185
2185
  }
2186
- function ue(u) {
2187
- e.enabled !== !1 && (document.removeEventListener("mousemove", oe, !1), document.removeEventListener("mouseup", ue, !1), e.dispatchEvent(s), l = c.NONE);
2186
+ function de(d) {
2187
+ e.enabled !== !1 && (document.removeEventListener("mousemove", ue, !1), document.removeEventListener("mouseup", de, !1), e.dispatchEvent(a), l = s.NONE);
2188
2188
  }
2189
- function Ue(u) {
2190
- e.enabled === !1 || e.enableZoom === !1 || l !== c.NONE && l !== c.ROTATE || (u.preventDefault(), u.stopPropagation(), e.dispatchEvent(t), U(u), e.dispatchEvent(s));
2189
+ function Ue(d) {
2190
+ e.enabled === !1 || e.enableZoom === !1 || l !== s.NONE && l !== s.ROTATE || (d.preventDefault(), d.stopPropagation(), e.dispatchEvent(t), R(d), e.dispatchEvent(a));
2191
2191
  }
2192
- function Be(u) {
2193
- e.enabled === !1 || e.enableKeys === !1 || e.enablePan === !1 || q(u);
2192
+ function Re(d) {
2193
+ e.enabled === !1 || e.enableKeys === !1 || e.enablePan === !1 || ee(d);
2194
2194
  }
2195
- function Ie(u) {
2195
+ function Ne(d) {
2196
2196
  if (e.enabled !== !1) {
2197
- switch (u.preventDefault(), u.touches.length) {
2197
+ switch (d.preventDefault(), d.touches.length) {
2198
2198
  case 1:
2199
2199
  switch (e.touches.ONE) {
2200
- case Me.ROTATE:
2200
+ case _e.ROTATE:
2201
2201
  if (e.enableRotate === !1) return;
2202
- V(u), l = c.TOUCH_ROTATE;
2202
+ j(d), l = s.TOUCH_ROTATE;
2203
2203
  break;
2204
- case Me.PAN:
2204
+ case _e.PAN:
2205
2205
  if (e.enablePan === !1) return;
2206
- B(u), l = c.TOUCH_PAN;
2206
+ z(d), l = s.TOUCH_PAN;
2207
2207
  break;
2208
2208
  default:
2209
- l = c.NONE;
2209
+ l = s.NONE;
2210
2210
  }
2211
2211
  break;
2212
2212
  case 2:
2213
2213
  switch (e.touches.TWO) {
2214
- case Me.DOLLY_PAN:
2214
+ case _e.DOLLY_PAN:
2215
2215
  if (e.enableZoom === !1 && e.enablePan === !1) return;
2216
- $(u), l = c.TOUCH_DOLLY_PAN;
2216
+ ie(d), l = s.TOUCH_DOLLY_PAN;
2217
2217
  break;
2218
- case Me.DOLLY_ROTATE:
2218
+ case _e.DOLLY_ROTATE:
2219
2219
  if (e.enableZoom === !1 && e.enableRotate === !1) return;
2220
- H(u), l = c.TOUCH_DOLLY_ROTATE;
2220
+ W(d), l = s.TOUCH_DOLLY_ROTATE;
2221
2221
  break;
2222
2222
  default:
2223
- l = c.NONE;
2223
+ l = s.NONE;
2224
2224
  }
2225
2225
  break;
2226
2226
  default:
2227
- l = c.NONE;
2227
+ l = s.NONE;
2228
2228
  }
2229
- l !== c.NONE && e.dispatchEvent(t);
2229
+ l !== s.NONE && e.dispatchEvent(t);
2230
2230
  }
2231
2231
  }
2232
- function ae(u) {
2232
+ function se(d) {
2233
2233
  if (e.enabled !== !1)
2234
- switch (u.preventDefault(), u.stopPropagation(), l) {
2235
- case c.TOUCH_ROTATE:
2234
+ switch (d.preventDefault(), d.stopPropagation(), l) {
2235
+ case s.TOUCH_ROTATE:
2236
2236
  if (e.enableRotate === !1) return;
2237
- G(u), e.update();
2237
+ q(d), e.update();
2238
2238
  break;
2239
- case c.TOUCH_PAN:
2239
+ case s.TOUCH_PAN:
2240
2240
  if (e.enablePan === !1) return;
2241
- _e(u), e.update();
2241
+ Ce(d), e.update();
2242
2242
  break;
2243
- case c.TOUCH_DOLLY_PAN:
2243
+ case s.TOUCH_DOLLY_PAN:
2244
2244
  if (e.enableZoom === !1 && e.enablePan === !1) return;
2245
- Oe(u), e.update();
2245
+ Oe(d), e.update();
2246
2246
  break;
2247
- case c.TOUCH_DOLLY_ROTATE:
2247
+ case s.TOUCH_DOLLY_ROTATE:
2248
2248
  if (e.enableZoom === !1 && e.enableRotate === !1) return;
2249
- Se(u), e.update();
2249
+ Ie(d), e.update();
2250
2250
  break;
2251
2251
  default:
2252
- l = c.NONE;
2252
+ l = s.NONE;
2253
2253
  }
2254
2254
  }
2255
- function Ke(u) {
2256
- e.enabled !== !1 && (e.dispatchEvent(s), l = c.NONE);
2255
+ function Ke(d) {
2256
+ e.enabled !== !1 && (e.dispatchEvent(a), l = s.NONE);
2257
2257
  }
2258
- function Ze(u) {
2259
- e.enabled !== !1 && u.preventDefault();
2258
+ function Ze(d) {
2259
+ e.enabled !== !1 && d.preventDefault();
2260
2260
  }
2261
- e.domElement.addEventListener("contextmenu", Ze, !1), e.domElement.addEventListener("mousedown", xe, !1), e.domElement.addEventListener("wheel", Ue, !1), e.domElement.addEventListener("touchstart", Ie, !1), e.domElement.addEventListener("touchend", Ke, !1), e.domElement.addEventListener("touchmove", ae, !1), e.domElement.addEventListener("keydown", Be, !1), e.domElement.tabIndex === -1 && (e.domElement.tabIndex = 0), this.update();
2261
+ e.domElement.addEventListener("contextmenu", Ze, !1), e.domElement.addEventListener("mousedown", Ae, !1), e.domElement.addEventListener("wheel", Ue, !1), e.domElement.addEventListener("touchstart", Ne, !1), e.domElement.addEventListener("touchend", Ke, !1), e.domElement.addEventListener("touchmove", se, !1), e.domElement.addEventListener("keydown", Re, !1), e.domElement.tabIndex === -1 && (e.domElement.tabIndex = 0), this.update();
2262
2262
  };
2263
- qe.prototype = Object.create(qt.prototype);
2263
+ qe.prototype = Object.create(Jt.prototype);
2264
2264
  qe.prototype.constructor = qe;
2265
- var Mt = function(f, o) {
2266
- qe.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;
2265
+ var _t = function(h, o) {
2266
+ qe.call(this, h, o), this.mouseButtons.LEFT = Me.PAN, this.mouseButtons.RIGHT = Me.ROTATE, this.touches.ONE = _e.PAN, this.touches.TWO = _e.DOLLY_ROTATE;
2267
2267
  };
2268
- Mt.prototype = Object.create(qt.prototype);
2269
- Mt.prototype.constructor = Mt;
2270
- var we = function(f) {
2271
- Kt.call(this), this.element = f, this.element.style.position = "absolute", this.element.style.pointerEvents = "auto", this.addEventListener("removed", function() {
2268
+ _t.prototype = Object.create(Jt.prototype);
2269
+ _t.prototype.constructor = _t;
2270
+ var xe = function(h) {
2271
+ $t.call(this), this.element = h, 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(Kt.prototype);
2278
- we.prototype.constructor = we;
2279
- var ct = function(f) {
2280
- we.call(this, f);
2277
+ xe.prototype = Object.create($t.prototype);
2278
+ xe.prototype.constructor = xe;
2279
+ var ut = function(h) {
2280
+ xe.call(this, h);
2281
2281
  };
2282
- ct.prototype = Object.create(we.prototype);
2283
- ct.prototype.constructor = ct;
2284
- var Dn = function() {
2285
- var f = this, o, e, a, t, s = new wn(), c = {
2282
+ ut.prototype = Object.create(xe.prototype);
2283
+ ut.prototype.constructor = ut;
2284
+ var zn = function() {
2285
+ var h = this, o, e, n, t, a = new Mn(), s = {
2286
2286
  camera: { fov: 0, style: "" },
2287
2287
  objects: /* @__PURE__ */ new WeakMap()
2288
2288
  }, l = document.createElement("div");
2289
2289
  l.style.overflow = "hidden", this.domElement = l;
2290
- var g = document.createElement("div");
2291
- g.style.WebkitTransformStyle = "preserve-3d", g.style.transformStyle = "preserve-3d", g.style.pointerEvents = "none", l.appendChild(g);
2292
- var d = /Trident/i.test(navigator.userAgent);
2290
+ var f = document.createElement("div");
2291
+ f.style.WebkitTransformStyle = "preserve-3d", f.style.transformStyle = "preserve-3d", f.style.pointerEvents = "none", l.appendChild(f);
2292
+ var c = /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(b, y) {
2299
- o = b, e = y, a = o / 2, t = e / 2, l.style.width = b + "px", l.style.height = y + "px", g.style.width = b + "px", g.style.height = y + "px";
2298
+ }, this.setSize = function(T, b) {
2299
+ o = T, e = b, n = o / 2, t = e / 2, l.style.width = T + "px", l.style.height = b + "px", f.style.width = T + "px", f.style.height = b + "px";
2300
2300
  };
2301
- function v(b) {
2302
- return Math.abs(b) < 1e-10 ? 0 : b;
2303
- }
2304
- function T(b) {
2305
- var y = b.elements;
2306
- return "matrix3d(" + v(y[0]) + "," + v(-y[1]) + "," + v(y[2]) + "," + v(y[3]) + "," + v(y[4]) + "," + v(-y[5]) + "," + v(y[6]) + "," + v(y[7]) + "," + v(y[8]) + "," + v(-y[9]) + "," + v(y[10]) + "," + v(y[11]) + "," + v(y[12]) + "," + v(-y[13]) + "," + v(y[14]) + "," + v(y[15]) + ")";
2307
- }
2308
- function A(b, y) {
2309
- var P = b.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)" + y + p : "translate(-50%,-50%)" + p;
2311
- }
2312
- function x(b, y, P, p) {
2313
- if (b instanceof we) {
2314
- b.onBeforeRender(f, y, P);
2315
- var S;
2316
- b instanceof ct ? (s.copy(P.matrixWorldInverse), s.transpose(), s.copyPosition(b.matrixWorld), s.scale(b.scale), s.elements[3] = 0, s.elements[7] = 0, s.elements[11] = 0, s.elements[15] = 1, S = A(s, p)) : S = A(b.matrixWorld, p);
2317
- var M = b.element, ee = c.objects.get(b);
2318
- if (ee === void 0 || ee.style !== S) {
2319
- M.style.WebkitTransform = S, M.style.transform = S;
2320
- var Z = { style: S };
2321
- d && (Z.distanceToCameraSquared = _(P, b)), c.objects.set(b, Z);
2322
- }
2323
- M.style.display = b.visible ? "" : "none", M.parentNode !== g && g.appendChild(M), b.onAfterRender(f, y, P);
2301
+ function g(T) {
2302
+ return Math.abs(T) < 1e-10 ? 0 : T;
2303
+ }
2304
+ function y(T) {
2305
+ var b = T.elements;
2306
+ return "matrix3d(" + g(b[0]) + "," + g(-b[1]) + "," + g(b[2]) + "," + g(b[3]) + "," + g(b[4]) + "," + g(-b[5]) + "," + g(b[6]) + "," + g(b[7]) + "," + g(b[8]) + "," + g(-b[9]) + "," + g(b[10]) + "," + g(b[11]) + "," + g(b[12]) + "," + g(-b[13]) + "," + g(b[14]) + "," + g(b[15]) + ")";
2307
+ }
2308
+ function w(T, b) {
2309
+ var P = T.elements, m = "matrix3d(" + g(P[0]) + "," + g(P[1]) + "," + g(P[2]) + "," + g(P[3]) + "," + g(-P[4]) + "," + g(-P[5]) + "," + g(-P[6]) + "," + g(-P[7]) + "," + g(P[8]) + "," + g(P[9]) + "," + g(P[10]) + "," + g(P[11]) + "," + g(P[12]) + "," + g(P[13]) + "," + g(P[14]) + "," + g(P[15]) + ")";
2310
+ return c ? "translate(-50%,-50%)translate(" + n + "px," + t + "px)" + b + m : "translate(-50%,-50%)" + m;
2311
+ }
2312
+ function x(T, b, P, m) {
2313
+ if (T instanceof xe) {
2314
+ T.onBeforeRender(h, b, P);
2315
+ var C;
2316
+ T instanceof ut ? (a.copy(P.matrixWorldInverse), a.transpose(), a.copyPosition(T.matrixWorld), a.scale(T.scale), a.elements[3] = 0, a.elements[7] = 0, a.elements[11] = 0, a.elements[15] = 1, C = w(a, m)) : C = w(T.matrixWorld, m);
2317
+ var _ = T.element, H = s.objects.get(T);
2318
+ if (H === void 0 || H.style !== C) {
2319
+ _.style.WebkitTransform = C, _.style.transform = C;
2320
+ var G = { style: C };
2321
+ c && (G.distanceToCameraSquared = A(P, T)), s.objects.set(T, G);
2322
+ }
2323
+ _.style.display = T.visible ? "" : "none", _.parentNode !== f && f.appendChild(_), T.onAfterRender(h, b, P);
2324
2324
  }
2325
- for (var te = 0, le = b.children.length; te < le; te++)
2326
- x(b.children[te], y, P, p);
2325
+ for (var U = 0, Q = T.children.length; U < Q; U++)
2326
+ x(T.children[U], b, P, m);
2327
2327
  }
2328
- var _ = (function() {
2329
- var b = new ve(), y = new ve();
2330
- return function(P, p) {
2331
- return b.setFromMatrixPosition(P.matrixWorld), y.setFromMatrixPosition(p.matrixWorld), b.distanceToSquared(y);
2328
+ var A = (function() {
2329
+ var T = new ye(), b = new ye();
2330
+ return function(P, m) {
2331
+ return T.setFromMatrixPosition(P.matrixWorld), b.setFromMatrixPosition(m.matrixWorld), T.distanceToSquared(b);
2332
2332
  };
2333
2333
  })();
2334
- function C(b) {
2335
- var y = [];
2336
- return b.traverse(function(P) {
2337
- P instanceof we && y.push(P);
2338
- }), y;
2339
- }
2340
- function L(b) {
2341
- for (var y = C(b).sort(function(M, ee) {
2342
- var Z = c.objects.get(M).distanceToCameraSquared, te = c.objects.get(ee).distanceToCameraSquared;
2343
- return Z - te;
2344
- }), P = y.length, p = 0, S = y.length; p < S; p++)
2345
- y[p].element.style.zIndex = P - p;
2346
- }
2347
- this.render = function(b, y) {
2348
- var P = y.projectionMatrix.elements[5] * t;
2349
- if (c.camera.fov !== P && (y.isPerspectiveCamera ? (l.style.WebkitPerspective = P + "px", l.style.perspective = P + "px") : (l.style.WebkitPerspective = "", l.style.perspective = ""), c.camera.fov = P), b.autoUpdate === !0 && b.updateMatrixWorld(), y.parent === null && y.updateMatrixWorld(), y.isOrthographicCamera)
2350
- var p = -(y.right + y.left) / 2, S = (y.top + y.bottom) / 2;
2351
- var M = y.isOrthographicCamera ? "scale(" + P + ")translate(" + v(p) + "px," + v(S) + "px)" + T(y.matrixWorldInverse) : "translateZ(" + P + "px)" + T(y.matrixWorldInverse), ee = M + "translate(" + a + "px," + t + "px)";
2352
- c.camera.style !== ee && !d && (g.style.WebkitTransform = ee, g.style.transform = ee, c.camera.style = ee), x(b, b, y, M), d && L(b);
2334
+ function S(T) {
2335
+ var b = [];
2336
+ return T.traverse(function(P) {
2337
+ P instanceof xe && b.push(P);
2338
+ }), b;
2339
+ }
2340
+ function O(T) {
2341
+ for (var b = S(T).sort(function(_, H) {
2342
+ var G = s.objects.get(_).distanceToCameraSquared, U = s.objects.get(H).distanceToCameraSquared;
2343
+ return G - U;
2344
+ }), P = b.length, m = 0, C = b.length; m < C; m++)
2345
+ b[m].element.style.zIndex = P - m;
2346
+ }
2347
+ this.render = function(T, b) {
2348
+ var P = b.projectionMatrix.elements[5] * t;
2349
+ if (s.camera.fov !== P && (b.isPerspectiveCamera ? (l.style.WebkitPerspective = P + "px", l.style.perspective = P + "px") : (l.style.WebkitPerspective = "", l.style.perspective = ""), s.camera.fov = P), T.autoUpdate === !0 && T.updateMatrixWorld(), b.parent === null && b.updateMatrixWorld(), b.isOrthographicCamera)
2350
+ var m = -(b.right + b.left) / 2, C = (b.top + b.bottom) / 2;
2351
+ var _ = b.isOrthographicCamera ? "scale(" + P + ")translate(" + g(m) + "px," + g(C) + "px)" + y(b.matrixWorldInverse) : "translateZ(" + P + "px)" + y(b.matrixWorldInverse), H = _ + "translate(" + n + "px," + t + "px)";
2352
+ s.camera.style !== H && !c && (f.style.WebkitTransform = H, f.style.transform = H, s.camera.style = H), x(T, T, b, _), c && O(T);
2353
2353
  };
2354
2354
  };
2355
- function Xt(f, o, e) {
2356
- var a = o.getBoundingClientRect(), t = a.top, s = a.left, c = a.width, l = a.height;
2357
- return new w.Vector2((f.x - s) / c * 2 - 1, -(f.y - t) / l * 2 + 1);
2355
+ function Zt(h, o, e) {
2356
+ var n = o.getBoundingClientRect(), t = n.top, a = n.left, s = n.width, l = n.height;
2357
+ return new v.Vector2((h.x - a) / s * 2 - 1, -(h.y - t) / l * 2 + 1);
2358
2358
  }
2359
- var Rn = (
2359
+ var jn = (
2360
2360
  /** @class */
2361
- (function(f) {
2362
- Fe(o, f);
2363
- function o(e, a, t, s, c) {
2364
- var l = f.call(this) || this;
2365
- l.type = "RoundedBoxGeometry", c = isNaN(c) ? 1 : Math.max(1, Math.floor(c)), 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;
2361
+ (function(h) {
2362
+ he(o, h);
2363
+ function o(e, n, t, a, s) {
2364
+ var l = h.call(this) || this;
2365
+ l.type = "RoundedBoxGeometry", s = isNaN(s) ? 1 : Math.max(1, Math.floor(s)), e = isNaN(e) ? 1 : e, n = isNaN(n) ? 1 : n, t = isNaN(t) ? 1 : t, a = isNaN(a) ? 0.15 : a, a = Math.min(a, Math.min(e, Math.min(n, Math.min(t))) / 2);
2366
+ var f = e / 2 - a, c = n / 2 - a, g = t / 2 - a;
2367
2367
  l.parameters = {
2368
2368
  width: e,
2369
- height: a,
2369
+ height: n,
2370
2370
  depth: t,
2371
- radius: s,
2372
- radiusSegments: c
2371
+ radius: a,
2372
+ radiusSegments: s
2373
2373
  };
2374
- var T = c + 1, A = T * c + 1 << 3, x = new w.BufferAttribute(new Float32Array(A * 3), 3), _ = new w.BufferAttribute(new Float32Array(A * 3), 3), C = [], L = [];
2375
- new w.Vector3();
2376
- var b = new w.Vector3(), y = [], P = [], p = [], S = T * c, M = T * c + 1;
2377
- ee(), te(), Z(), le(), Ce(), me();
2378
- function ee() {
2379
- for (var R = [
2380
- new w.Vector3(1, 1, 1),
2381
- new w.Vector3(1, 1, -1),
2382
- new w.Vector3(-1, 1, -1),
2383
- new w.Vector3(-1, 1, 1),
2384
- new w.Vector3(1, -1, 1),
2385
- new w.Vector3(1, -1, -1),
2386
- new w.Vector3(-1, -1, -1),
2387
- new w.Vector3(-1, -1, 1)
2374
+ var y = s + 1, w = y * s + 1 << 3, x = new v.BufferAttribute(new Float32Array(w * 3), 3), A = new v.BufferAttribute(new Float32Array(w * 3), 3), S = [], O = [];
2375
+ new v.Vector3();
2376
+ var T = new v.Vector3(), b = [], P = [], m = [], C = y * s, _ = y * s + 1;
2377
+ H(), U(), G(), Q(), le(), oe();
2378
+ function H() {
2379
+ for (var D = [
2380
+ new v.Vector3(1, 1, 1),
2381
+ new v.Vector3(1, 1, -1),
2382
+ new v.Vector3(-1, 1, -1),
2383
+ new v.Vector3(-1, 1, 1),
2384
+ new v.Vector3(1, -1, 1),
2385
+ new v.Vector3(1, -1, -1),
2386
+ new v.Vector3(-1, -1, -1),
2387
+ new v.Vector3(-1, -1, 1)
2388
2388
  ], I = 0; I < 8; I++)
2389
- C.push([]), L.push([]);
2390
- for (var O = Math.PI / 2, F = new w.Vector3(g, d, v), Y = 0; Y <= c; Y++) {
2391
- var ne = Y / c, z = ne * O, U = Math.cos(z), q = Math.sin(z);
2392
- if (Y == c) {
2393
- b.set(0, 1, 0);
2394
- var V = b.clone().multiplyScalar(s).add(F);
2395
- C[0].push(V), y.push(V);
2396
- var B = b.clone();
2397
- L[0].push(B), P.push(B);
2389
+ S.push([]), O.push([]);
2390
+ for (var N = Math.PI / 2, B = new v.Vector3(f, c, g), Y = 0; Y <= s; Y++) {
2391
+ var ae = Y / s, X = ae * N, R = Math.cos(X), ee = Math.sin(X);
2392
+ if (Y == s) {
2393
+ T.set(0, 1, 0);
2394
+ var j = T.clone().multiplyScalar(a).add(B);
2395
+ S[0].push(j), b.push(j);
2396
+ var z = T.clone();
2397
+ O[0].push(z), P.push(z);
2398
2398
  continue;
2399
2399
  }
2400
- for (var k = 0; k <= c; k++) {
2401
- var $ = k / c, H = $ * O;
2402
- b.x = U * Math.cos(H), b.y = q, b.z = U * Math.sin(H);
2403
- var V = b.clone().multiplyScalar(s).add(F);
2404
- C[0].push(V), y.push(V);
2405
- var B = b.clone().normalize();
2406
- L[0].push(B), P.push(B);
2400
+ for (var L = 0; L <= s; L++) {
2401
+ var ie = L / s, W = ie * N;
2402
+ T.x = R * Math.cos(W), T.y = ee, T.z = R * Math.sin(W);
2403
+ var j = T.clone().multiplyScalar(a).add(B);
2404
+ S[0].push(j), b.push(j);
2405
+ var z = T.clone().normalize();
2406
+ O[0].push(z), P.push(z);
2407
2407
  }
2408
2408
  }
2409
- for (var G = 1; G < 8; G++)
2410
- for (var I = 0; I < C[0].length; I++) {
2411
- var V = C[0][I].clone().multiply(R[G]);
2412
- C[G].push(V), y.push(V);
2413
- var B = L[0][I].clone().multiply(R[G]);
2414
- L[G].push(B), P.push(B);
2409
+ for (var q = 1; q < 8; q++)
2410
+ for (var I = 0; I < S[0].length; I++) {
2411
+ var j = S[0][I].clone().multiply(D[q]);
2412
+ S[q].push(j), b.push(j);
2413
+ var z = O[0][I].clone().multiply(D[q]);
2414
+ O[q].push(z), P.push(z);
2415
2415
  }
2416
2416
  }
2417
- function Z() {
2418
- for (var R = [
2417
+ function G() {
2418
+ for (var D = [
2419
2419
  !0,
2420
2420
  !1,
2421
2421
  !0,
@@ -2424,153 +2424,153 @@ var Rn = (
2424
2424
  !0,
2425
2425
  !1,
2426
2426
  !0
2427
- ], I = T * (c - 1), O = 0; O < 8; O++) {
2428
- for (var F = M * O, Y = 0; Y < c - 1; Y++)
2429
- for (var ne = Y * T, z = (Y + 1) * T, U = 0; U < c; U++) {
2430
- var q = U + 1, V = F + ne + U, B = F + ne + q, k = F + z + U, $ = F + z + q;
2431
- R[O] ? (p.push(V), p.push(k), p.push(B), p.push(B), p.push(k), p.push($)) : (p.push(V), p.push(B), p.push(k), p.push(B), p.push($), p.push(k));
2427
+ ], I = y * (s - 1), N = 0; N < 8; N++) {
2428
+ for (var B = _ * N, Y = 0; Y < s - 1; Y++)
2429
+ for (var ae = Y * y, X = (Y + 1) * y, R = 0; R < s; R++) {
2430
+ var ee = R + 1, j = B + ae + R, z = B + ae + ee, L = B + X + R, ie = B + X + ee;
2431
+ D[N] ? (m.push(j), m.push(L), m.push(z), m.push(z), m.push(L), m.push(ie)) : (m.push(j), m.push(z), m.push(L), m.push(z), m.push(ie), m.push(L));
2432
2432
  }
2433
- for (var U = 0; U < c; U++) {
2434
- var V = F + I + U, B = F + I + U + 1, k = F + S;
2435
- R[O] ? (p.push(V), p.push(k), p.push(B)) : (p.push(V), p.push(B), p.push(k));
2433
+ for (var R = 0; R < s; R++) {
2434
+ var j = B + I + R, z = B + I + R + 1, L = B + C;
2435
+ D[N] ? (m.push(j), m.push(L), m.push(z)) : (m.push(j), m.push(z), m.push(L));
2436
2436
  }
2437
2437
  }
2438
2438
  }
2439
- function te() {
2440
- var R = S, I = S + M, O = S + M * 2, F = S + M * 3;
2441
- p.push(R), p.push(I), p.push(O), p.push(R), p.push(O), p.push(F), R = S + M * 4, I = S + M * 5, O = S + M * 6, F = S + M * 7, p.push(R), p.push(O), p.push(I), p.push(R), p.push(F), p.push(O), R = 0, I = M, O = M * 4, F = M * 5, p.push(R), p.push(O), p.push(I), p.push(I), p.push(O), p.push(F), R = M * 2, I = M * 3, O = M * 6, F = M * 7, p.push(R), p.push(O), p.push(I), p.push(I), p.push(O), p.push(F), R = c, I = c + M * 3, O = c + M * 4, F = c + M * 7, p.push(R), p.push(I), p.push(O), p.push(I), p.push(F), p.push(O), R = c + M, I = c + M * 2, O = c + M * 5, F = c + M * 6, p.push(R), p.push(O), p.push(I), p.push(I), p.push(O), p.push(F);
2439
+ function U() {
2440
+ var D = C, I = C + _, N = C + _ * 2, B = C + _ * 3;
2441
+ m.push(D), m.push(I), m.push(N), m.push(D), m.push(N), m.push(B), D = C + _ * 4, I = C + _ * 5, N = C + _ * 6, B = C + _ * 7, m.push(D), m.push(N), m.push(I), m.push(D), m.push(B), m.push(N), D = 0, I = _, N = _ * 4, B = _ * 5, m.push(D), m.push(N), m.push(I), m.push(I), m.push(N), m.push(B), D = _ * 2, I = _ * 3, N = _ * 6, B = _ * 7, m.push(D), m.push(N), m.push(I), m.push(I), m.push(N), m.push(B), D = s, I = s + _ * 3, N = s + _ * 4, B = s + _ * 7, m.push(D), m.push(I), m.push(N), m.push(I), m.push(B), m.push(N), D = s + _, I = s + _ * 2, N = s + _ * 5, B = s + _ * 6, m.push(D), m.push(N), m.push(I), m.push(I), m.push(N), m.push(B);
2442
2442
  }
2443
- function le() {
2444
- for (var R = 0; R < 4; R++)
2445
- for (var I = R * M, O = 4 * M + I, F = (R & 1) === 1, Y = 0; Y < c; Y++) {
2446
- var ne = Y + 1, z = I + Y, U = I + ne, q = O + Y, V = O + ne;
2447
- F ? (p.push(z), p.push(q), p.push(U), p.push(U), p.push(q), p.push(V)) : (p.push(z), p.push(U), p.push(q), p.push(U), p.push(V), p.push(q));
2443
+ function Q() {
2444
+ for (var D = 0; D < 4; D++)
2445
+ for (var I = D * _, N = 4 * _ + I, B = (D & 1) === 1, Y = 0; Y < s; Y++) {
2446
+ var ae = Y + 1, X = I + Y, R = I + ae, ee = N + Y, j = N + ae;
2447
+ B ? (m.push(X), m.push(ee), m.push(R), m.push(R), m.push(ee), m.push(j)) : (m.push(X), m.push(R), m.push(ee), m.push(R), m.push(j), m.push(ee));
2448
2448
  }
2449
2449
  }
2450
- function me() {
2451
- for (var R = [0, 2, 4, 6], I = [1, 3, 5, 7], O = 0; O < 4; O++)
2452
- for (var F = M * R[O], Y = M * I[O], ne = 1 >= O, z = 0; z < c; z++) {
2453
- var U = z * T, q = (z + 1) * T, V = F + U, B = F + q, k = Y + U, $ = Y + q;
2454
- ne ? (p.push(V), p.push(k), p.push(B), p.push(B), p.push(k), p.push($)) : (p.push(V), p.push(B), p.push(k), p.push(B), p.push($), p.push(k));
2450
+ function oe() {
2451
+ for (var D = [0, 2, 4, 6], I = [1, 3, 5, 7], N = 0; N < 4; N++)
2452
+ for (var B = _ * D[N], Y = _ * I[N], ae = 1 >= N, X = 0; X < s; X++) {
2453
+ var R = X * y, ee = (X + 1) * y, j = B + R, z = B + ee, L = Y + R, ie = Y + ee;
2454
+ ae ? (m.push(j), m.push(L), m.push(z), m.push(z), m.push(L), m.push(ie)) : (m.push(j), m.push(z), m.push(L), m.push(z), m.push(ie), m.push(L));
2455
2455
  }
2456
2456
  }
2457
- function Ce() {
2458
- for (var R = c - 1, I = [0, 1, 4, 5], O = [3, 2, 7, 6], F = [0, 1, 1, 0], Y = 0; Y < 4; Y++)
2459
- for (var ne = I[Y] * M, z = O[Y] * M, U = 0; U <= R; U++) {
2460
- var q = ne + c + U * T, V = ne + (U != R ? c + (U + 1) * T : M - 1), B = z + c + U * T, k = z + (U != R ? c + (U + 1) * T : M - 1);
2461
- F[Y] ? (p.push(q), p.push(B), p.push(V), p.push(V), p.push(B), p.push(k)) : (p.push(q), p.push(V), p.push(B), p.push(V), p.push(k), p.push(B));
2457
+ function le() {
2458
+ for (var D = s - 1, I = [0, 1, 4, 5], N = [3, 2, 7, 6], B = [0, 1, 1, 0], Y = 0; Y < 4; Y++)
2459
+ for (var ae = I[Y] * _, X = N[Y] * _, R = 0; R <= D; R++) {
2460
+ var ee = ae + s + R * y, j = ae + (R != D ? s + (R + 1) * y : _ - 1), z = X + s + R * y, L = X + (R != D ? s + (R + 1) * y : _ - 1);
2461
+ B[Y] ? (m.push(ee), m.push(z), m.push(j), m.push(j), m.push(z), m.push(L)) : (m.push(ee), m.push(j), m.push(z), m.push(j), m.push(L), m.push(z));
2462
2462
  }
2463
2463
  }
2464
- for (var re = 0, ie = 0; ie < y.length; ie++)
2465
- x.setXYZ(re, y[ie].x, y[ie].y, y[ie].z), _.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", x), l.setAttribute("normal", _), l;
2464
+ for (var J = 0, Z = 0; Z < b.length; Z++)
2465
+ x.setXYZ(J, b[Z].x, b[Z].y, b[Z].z), A.setXYZ(J, P[Z].x, P[Z].y, P[Z].z), J++;
2466
+ return l.setIndex(new v.BufferAttribute(new Uint16Array(m), 1)), l.setAttribute("position", x), l.setAttribute("normal", A), l;
2467
2467
  }
2468
2468
  return o;
2469
- })(w.BufferGeometry)
2469
+ })(v.BufferGeometry)
2470
2470
  );
2471
- function ze(f, o) {
2472
- return typeof f != "number" || typeof o != "number" ? !1 : Math.abs(f - o) < 1e-3;
2471
+ function Ye(h, o) {
2472
+ return typeof h != "number" || typeof o != "number" ? !1 : Math.abs(h - o) < 1e-3;
2473
2473
  }
2474
- function Ge(f, o, e, a) {
2475
- a === void 0 && (a = function(s) {
2476
- return s;
2474
+ function He(h, o, e, n) {
2475
+ n === void 0 && (n = function(a) {
2476
+ return a;
2477
2477
  });
2478
- var t = a(e);
2479
- return f * (1 - t) + o * t;
2478
+ var t = n(e);
2479
+ return h * (1 - t) + o * t;
2480
2480
  }
2481
- var J = Number((Math.PI / 2).toFixed(5));
2482
- function Fn(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;
2481
+ var re = Number((Math.PI / 2).toFixed(5));
2482
+ function Gn(h, o, e) {
2483
+ var n = new v.Shape();
2484
+ return n.moveTo(e, 0), n.lineTo(h - e, 0), n.absarc(h - e, e, e, -re, 0, !1), n.lineTo(h, o - e), n.absarc(h - e, o - e, e, 0, re, !1), n.lineTo(e, o), n.absarc(e, o - e, e, re, Math.PI, !1), n.lineTo(0, e), n.absarc(e, e, e, Math.PI, Math.PI * 1.5, !1), n;
2485
2485
  }
2486
- var Xe = function(f) {
2486
+ var We = function(h) {
2487
2487
  var o = document.createElement("div");
2488
- o.innerText = f;
2489
- var e = new we(o);
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
- var o = new w.PlaneGeometry(5, 5), e = new w.MeshBasicMaterial({
2488
+ o.innerText = h;
2489
+ var e = new xe(o);
2490
+ return e.name = h, e.scale.set(0.3, 0.3, 0.3), o.style.pointerEvents = "none", o.style.backfaceVisibility = "hidden", e;
2491
+ }, at = function(h) {
2492
+ var o = new v.PlaneGeometry(5, 5), e = new v.MeshBasicMaterial({
2493
2493
  transparent: !0,
2494
2494
  opacity: 0
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
- }, Un = (
2495
+ }), n = new v.Mesh(o, e), t = document.createElement("div");
2496
+ t.innerText = h;
2497
+ var a = new xe(t);
2498
+ return a.name = h, a.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", n.rotateX(-re), n.add(a), n;
2499
+ }, Yn = (
2500
2500
  /** @class */
2501
- (function(f) {
2502
- Fe(o, f);
2503
- function o(e, a) {
2504
- var t = f.call(this, e) || this;
2505
- t.camera = new bn(90), t.scene = new w.Scene(), t.renderer = new w.WebGLRenderer({ antialias: !0, alpha: !0 }), t.css3drenderer = new Dn(), 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 Rn(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;
2501
+ (function(h) {
2502
+ he(o, h);
2503
+ function o(e, n) {
2504
+ var t = h.call(this, e) || this;
2505
+ t.camera = new An(90), t.scene = new v.Scene(), t.renderer = new v.WebGLRenderer({ antialias: !0, alpha: !0 }), t.css3drenderer = new zn(), t.ambientLight = new v.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 v.DirectionalLight(16777215, 0.2), t.box = new v.Mesh(new jn(8, 8, 8, 0.5, 20), new v.MeshPhongMaterial({ color: 16777215 })), t.faces = new v.Group(), t.orient = function(l) {
2506
+ var f = l.longitude, c = l.latitude;
2507
2507
  t.dragging = !1, t.spherical = null, t.controls.enableDamping = !1, t.five.setState(Object.assign({
2508
- latitude: d
2509
- }, g !== void 0 ? {
2510
- longitude: g + t.config.fixedLongitude
2508
+ latitude: c
2509
+ }, f !== void 0 ? {
2510
+ longitude: f + t.config.fixedLongitude
2511
2511
  } : {})), t.five.ready().then(function() {
2512
2512
  t.controls.enableDamping = !0, t.setState({ arrowsVisible: !0 });
2513
2513
  });
2514
2514
  }, t.onRenderFrame = function() {
2515
- var l, g, d, v, T;
2515
+ var l, f, c, g, y;
2516
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 A = t.camera.pose, x = A.longitude, _ = A.latitude;
2519
- t.five.setState({ longitude: x, latitude: _ }, !0), t.updateArrows({ longitude: x, latitude: _ });
2520
- } else if (t.spherical && (!ze(t.spherical.pi, (g = t.controls) === null || g === void 0 ? void 0 : g.getPolarAngle()) || !ze(t.spherical.theta, (d = t.controls) === null || d === void 0 ? void 0 : d.getAzimuthalAngle()))) {
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, x = C.longitude, _ = C.latitude;
2523
- t.five.setState({ longitude: x, latitude: _ }, !0), t.updateArrows({ longitude: x, latitude: _ });
2518
+ var w = t.camera.pose, x = w.longitude, A = w.latitude;
2519
+ t.five.setState({ longitude: x, latitude: A }, !0), t.updateArrows({ longitude: x, latitude: A });
2520
+ } else if (t.spherical && (!Ye(t.spherical.pi, (f = t.controls) === null || f === void 0 ? void 0 : f.getPolarAngle()) || !Ye(t.spherical.theta, (c = t.controls) === null || c === void 0 ? void 0 : c.getAzimuthalAngle()))) {
2521
+ t.spherical = { pi: (g = t.controls) === null || g === void 0 ? void 0 : g.getPolarAngle(), theta: (y = t.controls) === null || y === void 0 ? void 0 : y.getAzimuthalAngle() }, t.camera.computePose(), t.updateByCamera();
2522
+ var S = t.camera.pose, x = S.longitude, A = S.latitude;
2523
+ t.five.setState({ longitude: x, latitude: A }, !0), t.updateArrows({ longitude: x, latitude: A });
2524
2524
  } else
2525
2525
  t.spherical = null;
2526
2526
  }, t.onTapGesture = function(l) {
2527
- var g = l.pointers[0].clientX, d = l.pointers[0].clientY, v = Xt({ 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 x = A.object.userData, _ = x.longitude, C = x.latitude;
2532
- t.orient({ longitude: _, latitude: C });
2527
+ var f = l.pointers[0].clientX, c = l.pointers[0].clientY, g = Zt({ x: f, y: c }, t.wrapper), y = new v.Raycaster();
2528
+ y.setFromCamera(g, t.camera);
2529
+ var w = y.intersectObjects(t.faces.children, !1)[0];
2530
+ if (w) {
2531
+ var x = w.object.userData, A = x.longitude, S = x.latitude;
2532
+ t.orient({ longitude: A, latitude: S });
2533
2533
  }
2534
2534
  }, t.onFiveWantsGesture = function() {
2535
2535
  if (t.spherical)
2536
2536
  return !1;
2537
2537
  }, t.onFiveModeChange = function(l) {
2538
- t.controls && (t.controls.maxPolarAngle = l === "Topview" ? 0 : J);
2538
+ t.controls && (t.controls.maxPolarAngle = l === "Topview" ? 0 : re);
2539
2539
  }, t.onCameraUpdate = function(l) {
2540
- var g = l.state;
2540
+ var f = l.state;
2541
2541
  if (!t.dragging && !t.spherical) {
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 }));
2542
+ var c = f.longitude, g = f.latitude;
2543
+ t.camera.pose.longitude === c && t.camera.pose.latitude === g || (t.camera.setFromPose({ longitude: c, latitude: g, distance: 20, offset: new v.Vector3(0, 0, 0) }), t.updateByCamera(), t.updateArrows({ longitude: c, latitude: g }));
2544
2544
  }
2545
2545
  }, t.onPanStart = function(l) {
2546
2546
  t.dragging = !0, t.spherical = {};
2547
2547
  }, t.onMouseMove = function(l) {
2548
2548
  if (!t.dragging) {
2549
- var g = Xt({ x: l.clientX, y: l.clientY }, t.wrapper), d = new w.Raycaster();
2550
- d.setFromCamera(g, t.camera);
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");
2549
+ var f = Zt({ x: l.clientX, y: l.clientY }, t.wrapper), c = new v.Raycaster();
2550
+ c.setFromCamera(f, t.camera);
2551
+ var g = c.intersectObjects(t.faces.children, !1)[0];
2552
+ t.faces.children.forEach(function(y) {
2553
+ y.material.opacity = 0, y.children[0].element.style.color = "";
2554
+ }), g && (g.object.material.opacity = 0.3, g.object.children[0].element.style.color = "#336dff");
2555
2555
  }
2556
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 s = {
2561
+ var a = {
2562
2562
  enabled: !1,
2563
2563
  visible: !0,
2564
2564
  arrowsVisible: !1
2565
2565
  };
2566
- t.state = Object.assign(s, a == null ? void 0 : a.initialState);
2567
- var c = j({ fixedLongitude: 0, orthoView: !0 }, a == null ? void 0 : a.config);
2568
- return t._config = c, t.state.enabled && t._enable({ userAction: !1 }), t.mc = new wt.Manager(t.wrapper), t.mc.add(new wt.Tap({ interval: 410 })), t.mc.add(new wt.Pan({ threshold: 10, pointers: 0 })), t.camera.setFromPose({
2566
+ t.state = Object.assign(a, n == null ? void 0 : n.initialState);
2567
+ var s = V({ fixedLongitude: 0, orthoView: !0 }, n == null ? void 0 : n.config);
2568
+ return t._config = s, 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
- offset: new w.Vector3(0, 0, 0),
2570
+ offset: new v.Vector3(0, 0, 0),
2571
2571
  longitude: e.camera.pose.latitude,
2572
2572
  latitude: e.camera.pose.latitude
2573
- }), t.cylinder = new w.Mesh(new w.CylinderGeometry(13.2, 14, 0.01, 50, 1, !0), new w.ShaderMaterial({
2573
+ }), t.cylinder = new v.Mesh(new v.CylinderGeometry(13.2, 14, 0.01, 50, 1, !0), new v.ShaderMaterial({
2574
2574
  uniforms: {
2575
2575
  radiusTop: { value: 13.2 },
2576
2576
  radiusBottom: { value: 14 },
@@ -2619,31 +2619,31 @@ var Xe = function(f) {
2619
2619
  }
2620
2620
  return Object.defineProperty(o.prototype, "config", {
2621
2621
  get: function() {
2622
- return j({}, this._config);
2622
+ return V({}, this._config);
2623
2623
  },
2624
2624
  enumerable: !1,
2625
2625
  configurable: !0
2626
- }), o.prototype.updateState = function(e, a) {
2626
+ }), o.prototype.updateState = function(e, n) {
2627
2627
  var t = this.state;
2628
- this.state = j(j({}, this.state), e), typeof e.arrowsVisible == "boolean" && this.handleArrowsVisible(e.arrowsVisible), this.hooks.emit("stateChange", { state: this.state, prevState: t, userAction: a });
2628
+ this.state = V(V({}, this.state), e), typeof e.arrowsVisible == "boolean" && this.handleArrowsVisible(e.arrowsVisible), this.hooks.emit("stateChange", { state: this.state, prevState: t, userAction: n });
2629
2629
  }, o.prototype.appendTo = function(e) {
2630
2630
  if (e) {
2631
2631
  e.appendChild(this.wrapper);
2632
- var a = this.wrapper.getBoundingClientRect(), t = a.width, s = a.height;
2633
- this.renderer.setSize(t, s), this.css3drenderer.setSize(t, s);
2632
+ var n = this.wrapper.getBoundingClientRect(), t = n.width, a = n.height;
2633
+ this.renderer.setSize(t, a), this.css3drenderer.setSize(t, a);
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 a = it("西");
2640
- a.position.set(-19, 0, 0), e.add(a);
2641
- var t = it("东");
2639
+ var n = at("西");
2640
+ n.position.set(-19, 0, 0), e.add(n);
2641
+ var t = at("东");
2642
2642
  t.position.set(19, 0, 0), e.add(t);
2643
- var s = it("北");
2644
- s.position.set(0, 0, -19), e.add(s);
2645
- var c = it("南");
2646
- c.position.set(0, 0, 19), e.add(c), this.updateByCamera(), this.scene.add(e, this.box, this.faces), this.scene.rotation.y = this.config.fixedLongitude;
2643
+ var a = at("北");
2644
+ a.position.set(0, 0, -19), e.add(a);
2645
+ var s = at("南");
2646
+ s.position.set(0, 0, 19), e.add(s), 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 Xe = function(f) {
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: J });
2752
+ return e.orient({ longitude: 0, latitude: re });
2753
2753
  }, this.arrowLeft.onclick = function() {
2754
- return e.orient({ longitude: -J, latitude: 0 });
2754
+ return e.orient({ longitude: -re, latitude: 0 });
2755
2755
  }, this.arrowRight.onclick = function() {
2756
- return e.orient({ longitude: J, latitude: 0 });
2756
+ return e.orient({ longitude: re, 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 Xe = function(f) {
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 = Ge(0.2, 1, this.camera.pose.latitude / Math.PI * 2, function(l) {
2765
+ var e = He(0.2, 1, this.camera.pose.latitude / Math.PI * 2, function(l) {
2766
2766
  return l * l;
2767
- }), a = Ge(11, 13, this.camera.pose.latitude / Math.PI * 2, function(l) {
2767
+ }), n = He(11, 13, this.camera.pose.latitude / Math.PI * 2, function(l) {
2768
2768
  return l * l;
2769
- }), t = Ge(12, 15, this.camera.pose.latitude / Math.PI * 2, function(l) {
2769
+ }), t = He(12, 15, this.camera.pose.latitude / Math.PI * 2, function(l) {
2770
2770
  return l * l;
2771
- }), s = Ge(13, 19, this.camera.pose.latitude / Math.PI * 2, function(l) {
2771
+ }), a = He(13, 19, this.camera.pose.latitude / Math.PI * 2, function(l) {
2772
2772
  return l * l;
2773
- }), c = Ge(-0.2, 0.5, this.camera.pose.latitude / Math.PI * 2, function(l) {
2773
+ }), s = He(-0.2, 0.5, this.camera.pose.latitude / Math.PI * 2, function(l) {
2774
2774
  return l * l;
2775
2775
  });
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 = c.toString());
2776
+ this.cylinder.geometry = new v.CylinderGeometry(n, t, 0.01, 50, 1, !0), this.cylinder.material.uniforms.radiusTop.value = n, this.cylinder.material.uniforms.radiusBottom.value = t, this.cylinder.material.needsUpdate = !0, this.cylinder.children.forEach(function(l) {
2777
+ l.position.normalize().multiplyScalar(a), l.scale.set(e, e, e);
2778
+ var f = l.children[0];
2779
+ f && (f.element.style.opacity = s.toString());
2780
2780
  });
2781
2781
  }, o.prototype.updateArrows = function(e) {
2782
2782
  e.longitude;
2783
- var a = e.latitude, t = J - a < 0.02;
2783
+ var n = e.latitude, t = re - n < 0.02;
2784
2784
  this.setState({ arrowsVisible: t });
2785
2785
  }, o.prototype.handleArrowsVisible = function(e) {
2786
- var a = this;
2786
+ var n = 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(), s = t.longitude, c = t.latitude;
2790
- if (J - c < 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 = "");
2789
+ var t = this.five.getCurrentState(), a = t.longitude, s = t.latitude;
2790
+ if (re - s < 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((a - 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
- a.five.controller.cameraType = "orthographic", a.five.ready().then(function() {
2795
- return a.five.controller.cameraMotion.ended = !1;
2794
+ n.five.controller.cameraType = "orthographic", n.five.ready().then(function() {
2795
+ return n.five.controller.cameraMotion.ended = !1;
2796
2796
  });
2797
2797
  }), !0) {
2798
- case ze(0, s - this.config.fixedLongitude):
2798
+ case Ye(0, a - 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 ze(J, s - this.config.fixedLongitude):
2801
+ case Ye(re, a - 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 ze(Math.PI, s - this.config.fixedLongitude):
2804
+ case Ye(Math.PI, a - 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 Xe = function(f) {
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 a.five.controller.cameraMotion.ended = !1;
2816
+ return n.five.controller.cameraMotion.ended = !1;
2817
2817
  })), this.arrows.style.display = "none", this.faces.children.forEach(function(l) {
2818
2818
  l.children[0].element.className = "";
2819
2819
  });
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 c = { userAction: s };
2825
- e.enabled ? this._enable(c) : this._disable(c);
2820
+ }, o.prototype.setState = function(e, n) {
2821
+ n === void 0 && (n = {});
2822
+ var t = this.state, a = n.userAction !== void 0 ? n.userAction : !0;
2823
+ if (this.updateState(e, a), e.enabled !== void 0 && t.enabled !== e.enabled) {
2824
+ var s = { userAction: a };
2825
+ e.enabled ? this._enable(s) : this._disable(s);
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 = Fn(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(Xe("前"));
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(Xe("后")), s.userData = { longitude: Math.PI, latitude: 0 };
2836
- var c = new w.Mesh(a, new w.MeshBasicMaterial({ transparent: !0, color: 3370495, opacity: 0 }));
2837
- c.rotateY(J), c.position.x = 4.1, c.add(Xe("右")), c.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(Xe("左")), 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(Xe("上")), g.userData = { longitude: 0, latitude: J }, this.faces.add(t, s, l, c, g);
2830
+ var e = Gn(7, 7, 0.5), n = new v.ShapeGeometry(e);
2831
+ n.translate(-3.5, -3.5, 0);
2832
+ var t = new v.Mesh(n, new v.MeshBasicMaterial({ transparent: !0, color: 3370495, opacity: 0 }));
2833
+ t.userData = { longitude: 0, latitude: 0 }, t.position.z = 4.1, t.add(We("前"));
2834
+ var a = new v.Mesh(n, new v.MeshBasicMaterial({ transparent: !0, color: 3370495, opacity: 0 }));
2835
+ a.rotateY(Math.PI), a.position.z = -4.1, a.add(We("后")), a.userData = { longitude: Math.PI, latitude: 0 };
2836
+ var s = new v.Mesh(n, new v.MeshBasicMaterial({ transparent: !0, color: 3370495, opacity: 0 }));
2837
+ s.rotateY(re), s.position.x = 4.1, s.add(We("右")), s.userData = { longitude: re, latitude: 0 };
2838
+ var l = new v.Mesh(n, new v.MeshBasicMaterial({ transparent: !0, color: 3370495, opacity: 0 }));
2839
+ l.rotateY(-re), l.position.x = -4.1, l.add(We("左")), l.userData = { longitude: -re, latitude: 0 };
2840
+ var f = new v.Mesh(n, new v.MeshBasicMaterial({ transparent: !0, color: 3370495, opacity: 0 }));
2841
+ f.rotateX(-re), f.position.y = 4.1, f.add(We("上")), f.userData = { longitude: 0, latitude: re }, this.faces.add(t, a, l, s, f);
2842
2842
  }, o.prototype.initControls = function() {
2843
2843
  var e = this.controls = new qe(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;
2844
+ e.enableZoom = !1, e.enableDamping = !0, e.enablePan = !1, e.maxPolarAngle = re, e.dampingFactor = 0.15, e.rotateSpeed = 0.25;
2845
2845
  }, o.prototype.load = function(e) {
2846
- return De(this, void 0, void 0, function() {
2847
- return Re(this, function(a) {
2846
+ return Le(this, void 0, void 0, function() {
2847
+ return De(this, function(n) {
2848
2848
  return [
2849
2849
  2
2850
2850
  /*return*/
@@ -2852,61 +2852,61 @@ var Xe = function(f) {
2852
2852
  });
2853
2853
  });
2854
2854
  }, o.prototype._enable = function(e) {
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();
2855
+ var n = this.five.getCurrentState(), t = n.longitude, a = n.latitude;
2856
+ this.camera.setFromPose({ longitude: t, latitude: a, distance: 20, offset: new v.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 a;
2860
+ var n;
2861
2861
  if (!this.state.enabled) {
2862
- var t = (a = e == null ? void 0 : e.userAction) !== null && a !== void 0 ? a : !0;
2862
+ var t = (n = e == null ? void 0 : e.userAction) !== null && n !== void 0 ? n : !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 a;
2866
+ var n;
2867
2867
  if (this.state.enabled !== !1) {
2868
- var t = (a = e == null ? void 0 : e.userAction) !== null && a !== void 0 ? a : !0;
2868
+ var t = (n = e == null ? void 0 : e.userAction) !== null && n !== void 0 ? n : !0;
2869
2869
  this.updateState({ enabled: !1 }, t), this._disable({ userAction: t }), document.head.removeChild(this.style);
2870
2870
  }
2871
2871
  }, o;
2872
- })(We.Controller)
2873
- ), Kn = function(f, o) {
2874
- return new Un(f, o);
2875
- }, Bn = (
2872
+ })(Xe.Controller)
2873
+ ), nr = function(h, o) {
2874
+ return new Yn(h, o);
2875
+ }, Hn = (
2876
2876
  /** @class */
2877
- (function(f) {
2878
- Fe(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 c = (Math.PI / 2 - Math.max(s.latitude, 0)) / (Math.PI / 2), l = Math.max(0.2 - c, 0) * 10;
2883
- t.gradientBg && (t.gradientBg.style.transform = "translateY(-".concat((1 - c) * 50, "%)")), t.groundBg && (t.groundBg.style.backgroundImage = "radial-gradient(circle, #2E303350 ".concat(l * 100, "%, transparent ").concat(l * 120, "%)"));
2877
+ (function(h) {
2878
+ he(o, h);
2879
+ function o(e, n) {
2880
+ var t = h.call(this, e) || this;
2881
+ return t.data = {}, t.pluginName = "BackgroundPlugin", t._onFiveCameraUpdate = function(a) {
2882
+ var s = (Math.PI / 2 - Math.max(a.latitude, 0)) / (Math.PI / 2), l = Math.max(0.2 - s, 0) * 10;
2883
+ t.gradientBg && (t.gradientBg.style.transform = "translateY(-".concat((1 - s) * 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 De(t, void 0, void 0, function() {
2890
- return Re(this, function(s) {
2889
+ return Le(t, void 0, void 0, function() {
2890
+ return De(this, function(a) {
2891
2891
  return [
2892
2892
  2
2893
2893
  /*return*/
2894
2894
  ];
2895
2895
  });
2896
2896
  });
2897
- }, t.setState = function(s, c) {
2897
+ }, t.setState = function(a, s) {
2898
2898
  }, t.enable = function() {
2899
- var s, c = (s = t.five.getElement()) === null || s === void 0 ? void 0 : s.parentNode;
2900
- if (!c) {
2899
+ var a, s = (a = t.five.getElement()) === null || a === void 0 ? void 0 : a.parentNode;
2900
+ if (!s) {
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 && c.appendChild(t.gradientBg), t.groundBg && c.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 c, l, g, d;
2909
- t.state.enabled && ((l = (c = t.gradientBg) === null || c === void 0 ? void 0 : c.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);
2906
+ t.state.enabled || (t._onFiveCameraUpdate(t.five.getPose(), !1), t.gradientBg && s.appendChild(t.gradientBg), t.groundBg && s.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(a) {
2908
+ var s, l, f, c;
2909
+ t.state.enabled && ((l = (s = t.gradientBg) === null || s === void 0 ? void 0 : s.parentNode) === null || l === void 0 || l.removeChild(t.gradientBg), (c = (f = t.groundBg) === null || f === void 0 ? void 0 : f.parentNode) === null || c === void 0 || c.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,11 +2935,11 @@ var Xe = function(f) {
2935
2935
  `, t.enable()), t;
2936
2936
  }
2937
2937
  return o;
2938
- })(Zt.Controller)
2939
- ), Zn = function(f, o) {
2940
- return new Bn(f, o);
2938
+ })(Ct.Controller)
2939
+ ), rr = function(h, o) {
2940
+ return new Hn(h, o);
2941
2941
  };
2942
- new w.Matrix4().fromArray([
2942
+ new v.Matrix4().fromArray([
2943
2943
  1,
2944
2944
  0,
2945
2945
  0,
@@ -2957,38 +2957,38 @@ new w.Matrix4().fromArray([
2957
2957
  0,
2958
2958
  1
2959
2959
  ]);
2960
- var Et = (
2960
+ var xt = (
2961
2961
  /** @class */
2962
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;
2963
+ function h(o, e, n, t, a) {
2964
+ this.R = o, this.Q = e, this.A = n, this.B = t, this.C = a, this.cov = NaN, this.x = NaN;
2965
2965
  }
2966
- return f.prototype.filter = function(o, e) {
2966
+ return h.prototype.filter = function(o, e) {
2967
2967
  if (e === void 0 && (e = 0), isNaN(this.x))
2968
2968
  this.x = 1 / this.C * o, this.cov = 1 / this.C * this.Q * (1 / this.C);
2969
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;
2970
+ var n = this.A * this.x + this.B * e, t = this.A * this.cov * this.A + this.R, a = t * this.C * (1 / (this.C * t * this.C + this.Q));
2971
+ this.x = n + a * (o - this.C * n), this.cov = t - a * this.C * t;
2972
2972
  }
2973
2973
  return this.x;
2974
- }, f;
2974
+ }, h;
2975
2975
  })()
2976
- ), Vn = (
2976
+ ), Wn = (
2977
2977
  /** @class */
2978
- (function(f) {
2979
- Fe(o, f);
2980
- function o(e, a) {
2981
- var t = f.call(this, e) || this;
2978
+ (function(h) {
2979
+ he(o, h);
2980
+ function o(e, n) {
2981
+ var t = h.call(this, e) || this;
2982
2982
  t.dispose = function() {
2983
2983
  t.disable();
2984
2984
  }, t.five = e;
2985
- var s = {
2985
+ var a = {
2986
2986
  enabled: !0,
2987
2987
  visible: !0
2988
2988
  };
2989
- t.state = Object.assign(s, a == null ? void 0 : a.initialState);
2990
- var c = j({}, a == null ? void 0 : a.config);
2991
- return t._config = c, 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 = {
2989
+ t.state = Object.assign(a, n == null ? void 0 : n.initialState);
2990
+ var s = V({}, n == null ? void 0 : n.config);
2991
+ return t._config = s, 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
2992
  keyframeIndex: null,
2993
2993
  progress: null
2994
2994
  }, Object.defineProperties(t, {
@@ -3004,16 +3004,16 @@ var Et = (
3004
3004
  }
3005
3005
  return Object.defineProperty(o.prototype, "config", {
3006
3006
  get: function() {
3007
- return j({}, this._config);
3007
+ return V({}, this._config);
3008
3008
  },
3009
3009
  enumerable: !1,
3010
3010
  configurable: !0
3011
- }), o.prototype.updateState = function(e, a) {
3011
+ }), o.prototype.updateState = function(e, n) {
3012
3012
  var t = this.state;
3013
- this.state = j(j({}, this.state), e), this.hooks.emit("stateChange", { state: this.state, prevState: t, userAction: a });
3013
+ this.state = V(V({}, this.state), e), this.hooks.emit("stateChange", { state: this.state, prevState: t, userAction: n });
3014
3014
  }, o.prototype.load = function(e) {
3015
- return De(this, void 0, void 0, function() {
3016
- return Re(this, function(a) {
3015
+ return Le(this, void 0, void 0, function() {
3016
+ return De(this, function(n) {
3017
3017
  return [
3018
3018
  2
3019
3019
  /*return*/
@@ -3022,25 +3022,25 @@ var Et = (
3022
3022
  });
3023
3023
  }, o.prototype.loadTrajectory = function(e) {
3024
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, c = 0, l = 1, g = new Et(a, t, s, c, l), d = new Et(a, t, s, c, l), v = new Et(a, t, s, c, l);
3025
+ var n = 0.01, t = 0.1, a = 1, s = 0, l = 1, f = new xt(n, t, a, s, l), c = new xt(n, t, a, s, l), g = new xt(n, t, a, s, l);
3026
3026
  if (this.trajectory && this.trajectory.content.loadState === "READY") {
3027
- for (var T = this.trajectory.content.data.positionArray, A = new Float32Array(T.length / 3), x = 0; x < A.length; x++)
3027
+ for (var y = this.trajectory.content.data.positionArray, w = new Float32Array(y.length / 3), x = 0; x < w.length; x++)
3028
3028
  if (x === 0)
3029
- A[x] = 0;
3029
+ w[x] = 0;
3030
3030
  else {
3031
- var _ = new w.Vector3(T[x - 3], T[x - 2], T[x - 1]), C = new w.Vector3(T[x], T[x + 1], T[x + 2]);
3032
- A[x] = C.distanceTo(_) + A[x - 1];
3031
+ var A = new v.Vector3(y[x - 3], y[x - 2], y[x - 1]), S = new v.Vector3(y[x], y[x + 1], y[x + 2]);
3032
+ w[x] = S.distanceTo(A) + w[x - 1];
3033
3033
  }
3034
- this.totalDistance = A[A.length - 1];
3035
- for (var x = 0; x < A.length; x++) {
3036
- for (var L = new w.Vector3(0, 0, 0), b = 0, y = x - 5; y < x + 6; y++)
3037
- y >= 0 && y < A.length && (L.add(new w.Vector3(T[y * 3], T[y * 3 + 1], T[y * 3 + 2])), b++);
3038
- L.divideScalar(b).applyMatrix4(e.transform);
3039
- var P = g.filter(L.x), p = d.filter(L.y), S = v.filter(L.z), M = {
3040
- position: new w.Vector3(P, p, S),
3041
- location: A[x]
3034
+ this.totalDistance = w[w.length - 1];
3035
+ for (var x = 0; x < w.length; x++) {
3036
+ for (var O = new v.Vector3(0, 0, 0), T = 0, b = x - 5; b < x + 6; b++)
3037
+ b >= 0 && b < w.length && (O.add(new v.Vector3(y[b * 3], y[b * 3 + 1], y[b * 3 + 2])), T++);
3038
+ O.divideScalar(T).applyMatrix4(e.transform);
3039
+ var P = f.filter(O.x), m = c.filter(O.y), C = g.filter(O.z), _ = {
3040
+ position: new v.Vector3(P, m, C),
3041
+ location: w[x]
3042
3042
  };
3043
- this.keyframes.push(M);
3043
+ this.keyframes.push(_);
3044
3044
  }
3045
3045
  } else
3046
3046
  throw new Error("trajectory content is not ready");
@@ -3048,42 +3048,42 @@ var Et = (
3048
3048
  (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());
3049
3049
  }, o.prototype._enable = function(e) {
3050
3050
  }, o.prototype.play = function() {
3051
- var e = this, a = this.keyframes.length;
3052
- if (a < 2)
3051
+ var e = this, n = this.keyframes.length;
3052
+ if (n < 2)
3053
3053
  throw new Error("keyframes length must be greater than 2");
3054
3054
  var t = {
3055
3055
  keyframeIndex: null,
3056
3056
  progress: null
3057
3057
  };
3058
- 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(j({}, this.virualCamera.pose)));
3059
- var s = this.playingState.keyframeIndex, c = 0;
3060
- this.cancelAnimation = Ct.shared.add(function(l, g) {
3061
- if (s === a - 1 - e.skipEnd && e.cancelAnimation) {
3058
+ 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(V({}, this.virualCamera.pose)));
3059
+ var a = this.playingState.keyframeIndex, s = 0;
3060
+ this.cancelAnimation = ct.shared.add(function(l, f) {
3061
+ if (a === n - 1 - e.skipEnd && e.cancelAnimation) {
3062
3062
  e.cancelAnimation();
3063
3063
  return;
3064
3064
  }
3065
- e.currentKeyFrame = e.keyframes[s], e.nextKeyframe = e.keyframes[s + 1], s + 2 <= a - 1 ? e.nextButOneKeyframe = e.keyframes[s + 2] : e.nextButOneKeyframe = null;
3066
- 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)), x = new w.Vector3();
3067
- e.nextButOneKeyframe !== null ? x = e.nextButOneKeyframe.position.clone().sub(e.nextKeyframe.position.clone()).normalize() : x.copy(T);
3068
- var _ = v.clone().add(x.clone().multiplyScalar(0.01));
3069
- c += g / 1e3 * e.rate;
3070
- var C = c / d.distanceTo(v);
3071
- C = C >= 1 ? 1 : C, t.keyframeIndex !== null && t.progress !== null && (C = t.progress, t.keyframeIndex = null, t.progress = null);
3072
- var L = d.clone().lerp(v, C), b = A.clone().lerp(_, C);
3073
- e.virualCamera.position.copy(L), e.virualCamera.lookAt(b), e.virualCamera.updateMatrixWorld(), e.virualCamera.updateMatrix(), e.virualCamera.computePose(), e.five.setState(j({}, e.virualCamera.pose)), e.location = e.keyframes[s].location + d.clone().distanceTo(L), C === 1 ? (c = 0, s++, e.playingState.keyframeIndex = s, e.playingState.progress = 0) : (e.playingState.keyframeIndex = s, e.playingState.progress = C);
3065
+ e.currentKeyFrame = e.keyframes[a], e.nextKeyframe = e.keyframes[a + 1], a + 2 <= n - 1 ? e.nextButOneKeyframe = e.keyframes[a + 2] : e.nextButOneKeyframe = null;
3066
+ var c = e.currentKeyFrame.position.clone(), g = e.nextKeyframe.position.clone(), y = e.nextKeyframe.position.clone().sub(e.currentKeyFrame.position.clone()).normalize(), w = c.clone().add(y.clone().multiplyScalar(0.01)), x = new v.Vector3();
3067
+ e.nextButOneKeyframe !== null ? x = e.nextButOneKeyframe.position.clone().sub(e.nextKeyframe.position.clone()).normalize() : x.copy(y);
3068
+ var A = g.clone().add(x.clone().multiplyScalar(0.01));
3069
+ s += f / 1e3 * e.rate;
3070
+ var S = s / c.distanceTo(g);
3071
+ S = S >= 1 ? 1 : S, t.keyframeIndex !== null && t.progress !== null && (S = t.progress, t.keyframeIndex = null, t.progress = null);
3072
+ var O = c.clone().lerp(g, S), T = w.clone().lerp(A, S);
3073
+ e.virualCamera.position.copy(O), e.virualCamera.lookAt(T), e.virualCamera.updateMatrixWorld(), e.virualCamera.updateMatrix(), e.virualCamera.computePose(), e.five.setState(V({}, e.virualCamera.pose)), e.location = e.keyframes[a].location + c.clone().distanceTo(O), S === 1 ? (s = 0, a++, e.playingState.keyframeIndex = a, e.playingState.progress = 0) : (e.playingState.keyframeIndex = a, e.playingState.progress = S);
3074
3074
  });
3075
3075
  }, o.prototype.pause = function() {
3076
3076
  this.cancelAnimation && this.cancelAnimation();
3077
3077
  }, o.prototype.findKeyFrameByLocation = function(e) {
3078
3078
  if (this.keyframes.length !== 0) {
3079
- for (var a = 0, t = this.keyframes.length - 1; a <= t; ) {
3080
- var s = Math.floor((a + t) / 2);
3081
- if (this.keyframes[s].location === e)
3082
- return s;
3083
- this.keyframes[s].location < e ? a = s + 1 : t = s - 1;
3079
+ for (var n = 0, t = this.keyframes.length - 1; n <= t; ) {
3080
+ var a = Math.floor((n + t) / 2);
3081
+ if (this.keyframes[a].location === e)
3082
+ return a;
3083
+ this.keyframes[a].location < e ? n = a + 1 : t = a - 1;
3084
3084
  }
3085
3085
  return {
3086
- keyframeIndex: a - 1,
3086
+ keyframeIndex: n - 1,
3087
3087
  progress: 0
3088
3088
  };
3089
3089
  }
@@ -3091,26 +3091,26 @@ var Et = (
3091
3091
  this.playingState.keyframeIndex = null, this.playingState.progress = null;
3092
3092
  }, o.prototype._disable = function(e) {
3093
3093
  }, o.prototype.enable = function(e) {
3094
- var a;
3094
+ var n;
3095
3095
  if (!this.state.enabled) {
3096
- var t = (a = e == null ? void 0 : e.userAction) !== null && a !== void 0 ? a : !0;
3096
+ var t = (n = e == null ? void 0 : e.userAction) !== null && n !== void 0 ? n : !0;
3097
3097
  this.updateState({ enabled: !0 }, t), this._enable({ userAction: t });
3098
3098
  }
3099
3099
  }, o.prototype.disable = function(e) {
3100
- var a;
3100
+ var n;
3101
3101
  if (this.state.enabled !== !1) {
3102
- var t = (a = e == null ? void 0 : e.userAction) !== null && a !== void 0 ? a : !0;
3102
+ var t = (n = e == null ? void 0 : e.userAction) !== null && n !== void 0 ? n : !0;
3103
3103
  this.updateState({ enabled: !1 }, t), this._disable({ userAction: t });
3104
3104
  }
3105
3105
  }, o;
3106
- })(We.Controller)
3107
- ), Qn = function(f, o) {
3108
- return new Vn(f, o);
3106
+ })(Xe.Controller)
3107
+ ), ir = function(h, o) {
3108
+ return new Wn(h, o);
3109
3109
  };
3110
- function Wt(f, o, e) {
3111
- return f < o ? o : f > e ? e : f;
3110
+ function Qt(h, o, e) {
3111
+ return h < o ? o : h > e ? e : h;
3112
3112
  }
3113
- var Yn = (
3113
+ var Xn = (
3114
3114
  /* glsl */
3115
3115
  `
3116
3116
  varying vec2 vUv;
@@ -3121,7 +3121,7 @@ void main() {
3121
3121
  gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
3122
3122
  }
3123
3123
  `
3124
- ), jn = (
3124
+ ), qn = (
3125
3125
  /* glsl */
3126
3126
  `
3127
3127
  varying vec2 vUv;
@@ -3143,72 +3143,72 @@ void main() {
3143
3143
  gl_FragColor.a = gl_FragColor.a * opacity;
3144
3144
  }
3145
3145
  `
3146
- ), Hn = [1, 5, 2, 6, 3, 7, 4, 8, 9, 13, 10, 14, 11, 15, 12, 16], xt = 512, Pt = 512, ot = 128, zn = (
3146
+ ), Kn = [1, 5, 2, 6, 3, 7, 4, 8, 9, 13, 10, 14, 11, 15, 12, 16], Pt = 512, At = 512, ot = 128, Zn = (
3147
3147
  /** @class */
3148
- (function(f) {
3149
- Fe(o, f);
3150
- function o(e, a) {
3151
- var t = f.call(this, e) || this;
3152
- t.group = new w.Group(), t.mesh = (function() {
3153
- var l = new w.CylinderGeometry(0.12, 0.12, 1, 32, 1, !0);
3148
+ (function(h) {
3149
+ he(o, h);
3150
+ function o(e, n) {
3151
+ var t = h.call(this, e) || this;
3152
+ t.group = new v.Group(), t.mesh = (function() {
3153
+ var l = new v.CylinderGeometry(0.12, 0.12, 1, 32, 1, !0);
3154
3154
  l.translate(0, 0.5, 0);
3155
- var g = new w.ShaderMaterial({
3156
- vertexShader: Yn,
3157
- fragmentShader: jn,
3155
+ var f = new v.ShaderMaterial({
3156
+ vertexShader: Xn,
3157
+ fragmentShader: qn,
3158
3158
  uniforms: {
3159
- map: { value: new w.Texture() },
3159
+ map: { value: new v.Texture() },
3160
3160
  progress: { value: 0 },
3161
3161
  opacity: { value: 0 }
3162
3162
  },
3163
3163
  transparent: !0,
3164
3164
  depthTest: !1
3165
- }), d = new w.Mesh(l, g);
3166
- return d;
3167
- })(), t.panoMesh = new Tn({ scale: 1.5 }), t.stop = function() {
3168
- }, t.drawLine = function(l, g) {
3165
+ }), c = new v.Mesh(l, f);
3166
+ return c;
3167
+ })(), t.panoMesh = new Sn({ scale: 1.5 }), t.stop = function() {
3168
+ }, t.drawLine = function(l, f) {
3169
3169
  if (t.ctx) {
3170
- var d = (function() {
3171
- var A, x = xt / 16 | 0;
3172
- return x * ((A = Hn[l]) !== null && A !== void 0 ? A : 0);
3173
- })(), v = (1 - (g + l * 150) % 1200 / 1200) * (Pt + ot), T = t.ctx.createLinearGradient(0, v - ot, 0, v);
3174
- T.addColorStop(0, "rgba(255,255,255,0)"), T.addColorStop(0.5, "rgba(255,255,255,1)"), T.addColorStop(1, "rgba(255,255,255,0)"), t.ctx.fillStyle = T, t.ctx.fillRect(d, v - ot, 3, ot);
3170
+ var c = (function() {
3171
+ var w, x = Pt / 16 | 0;
3172
+ return x * ((w = Kn[l]) !== null && w !== void 0 ? w : 0);
3173
+ })(), g = (1 - (f + l * 150) % 1200 / 1200) * (At + ot), y = t.ctx.createLinearGradient(0, g - ot, 0, g);
3174
+ y.addColorStop(0, "rgba(255,255,255,0)"), y.addColorStop(0.5, "rgba(255,255,255,1)"), y.addColorStop(1, "rgba(255,255,255,0)"), t.ctx.fillStyle = y, t.ctx.fillRect(c, g - ot, 3, ot);
3175
3175
  }
3176
3176
  }, t.anime = function(l) {
3177
3177
  if (t.ctx && t.startTime) {
3178
- t.ctx.clearRect(0, 0, xt, Pt);
3179
- for (var g = 0; g < 16; g++)
3180
- t.drawLine(g, l - t.startTime);
3181
- var d = Wt((l - t.startTime) / 1e3, 0, 1), v = Wt((l - t.startTime) / 300, 0, t.config.maxOpacity);
3182
- t.panoMesh.setOpacity(v), t.mesh.material.uniforms.progress.value = d, t.mesh.material.uniforms.opacity.value = v, t.mesh.material.uniforms.map.value.needsUpdate = !0, t.five.needsRender = !0;
3178
+ t.ctx.clearRect(0, 0, Pt, At);
3179
+ for (var f = 0; f < 16; f++)
3180
+ t.drawLine(f, l - t.startTime);
3181
+ var c = Qt((l - t.startTime) / 1e3, 0, 1), g = Qt((l - t.startTime) / 300, 0, t.config.maxOpacity);
3182
+ t.panoMesh.setOpacity(g), t.mesh.material.uniforms.progress.value = c, t.mesh.material.uniforms.opacity.value = g, t.mesh.material.uniforms.map.value.needsUpdate = !0, t.five.needsRender = !0;
3183
3183
  }
3184
3184
  }, t.dispose = function() {
3185
3185
  t.disable();
3186
3186
  }, t.five = e;
3187
- var s = {
3187
+ var a = {
3188
3188
  enabled: !1,
3189
3189
  visible: !0
3190
3190
  };
3191
- t.state = Object.assign(s, a == null ? void 0 : a.initialState);
3192
- var c = j(j({}, a == null ? void 0 : a.config), { maxOpacity: 1 });
3193
- return t._config = c, typeof document == "undefined" || (t.canvas = document.createElement("canvas"), t.ctx = t.canvas.getContext("2d"), t.canvas.width = xt, t.canvas.height = Pt, t.ctx.shadowColor = "rgba(255,255,255,0.5)", t.ctx.shadowBlur = 6, t.ctx.shadowOffsetX = 0, t.ctx.shadowOffsetY = 0, t.mesh.material.uniforms.map.value = new w.CanvasTexture(t.canvas), t.group.add(t.mesh), t.panoMesh.setProgress(1), t.panoMesh.setOpacity(0), t.group.add(t.panoMesh), t.state.enabled && t._enable({ userAction: !1 })), t;
3191
+ t.state = Object.assign(a, n == null ? void 0 : n.initialState);
3192
+ var s = V(V({}, n == null ? void 0 : n.config), { maxOpacity: 1 });
3193
+ return t._config = s, typeof document == "undefined" || (t.canvas = document.createElement("canvas"), t.ctx = t.canvas.getContext("2d"), t.canvas.width = Pt, t.canvas.height = At, t.ctx.shadowColor = "rgba(255,255,255,0.5)", t.ctx.shadowBlur = 6, t.ctx.shadowOffsetX = 0, t.ctx.shadowOffsetY = 0, t.mesh.material.uniforms.map.value = new v.CanvasTexture(t.canvas), t.group.add(t.mesh), t.panoMesh.setProgress(1), t.panoMesh.setOpacity(0), t.group.add(t.panoMesh), t.state.enabled && t._enable({ userAction: !1 })), t;
3194
3194
  }
3195
3195
  return Object.defineProperty(o.prototype, "config", {
3196
3196
  get: function() {
3197
- return j({}, this._config);
3197
+ return V({}, this._config);
3198
3198
  },
3199
3199
  enumerable: !1,
3200
3200
  configurable: !0
3201
- }), o.prototype.updateState = function(e, a) {
3201
+ }), o.prototype.updateState = function(e, n) {
3202
3202
  var t = this.state;
3203
- this.state = j(j({}, this.state), e), this.hooks.emit("stateChange", { state: this.state, prevState: t, userAction: a });
3204
- }, o.prototype.updateConfig = function(e, a) {
3203
+ this.state = V(V({}, this.state), e), this.hooks.emit("stateChange", { state: this.state, prevState: t, userAction: n });
3204
+ }, o.prototype.updateConfig = function(e, n) {
3205
3205
  var t;
3206
- a === void 0 && (a = {});
3207
- var s = this.config, c = j(j({}, s), e);
3208
- this._config = c, this.hooks.emit("configChange", { prevConfig: s, config: c, userAction: (t = a.userAction) !== null && t !== void 0 ? t : !0 });
3206
+ n === void 0 && (n = {});
3207
+ var a = this.config, s = V(V({}, a), e);
3208
+ this._config = s, this.hooks.emit("configChange", { prevConfig: a, config: s, userAction: (t = n.userAction) !== null && t !== void 0 ? t : !0 });
3209
3209
  }, o.prototype.load = function(e) {
3210
- return De(this, void 0, void 0, function() {
3211
- return Re(this, function(a) {
3210
+ return Le(this, void 0, void 0, function() {
3211
+ return De(this, function(n) {
3212
3212
  return [
3213
3213
  2
3214
3214
  /*return*/
@@ -3216,46 +3216,861 @@ void main() {
3216
3216
  });
3217
3217
  });
3218
3218
  }, o.prototype._enable = function(e) {
3219
- var a = this;
3219
+ var n = this;
3220
3220
  this.mesh.position.copy(this.five.observers[this.five.state.panoIndex].standingPosition), this.panoMesh.position.copy(this.five.observers[this.five.state.panoIndex].standingPosition), this.five.ready().then(function() {
3221
- a.five.scene.add(a.group), a.stop = Ct.shared.add(function(t, s) {
3222
- a.startTime || (a.startTime = t), a.panoMesh.updateTime(t, s), a.anime(t);
3221
+ n.five.scene.add(n.group), n.stop = ct.shared.add(function(t, a) {
3222
+ n.startTime || (n.startTime = t), n.panoMesh.updateTime(t, a), n.anime(t);
3223
3223
  });
3224
3224
  });
3225
3225
  }, o.prototype._disable = function(e) {
3226
3226
  this.five.scene.remove(this.group), this.panoMesh.setOpacity(0), this.startTime = void 0, this.stop(), this.five.needsRender = !0;
3227
3227
  }, o.prototype.enable = function(e) {
3228
- var a;
3228
+ var n;
3229
3229
  if (this.ctx && !this.state.enabled && this.five.observers[this.five.state.panoIndex]) {
3230
- var t = (a = e == null ? void 0 : e.userAction) !== null && a !== void 0 ? a : !0;
3230
+ var t = (n = e == null ? void 0 : e.userAction) !== null && n !== void 0 ? n : !0;
3231
3231
  this.updateState({ enabled: !0 }, t), this._enable({ userAction: t });
3232
3232
  }
3233
3233
  }, o.prototype.disable = function(e) {
3234
- var a;
3234
+ var n;
3235
3235
  if (this.state.enabled !== !1) {
3236
- var t = (a = e == null ? void 0 : e.userAction) !== null && a !== void 0 ? a : !0;
3236
+ var t = (n = e == null ? void 0 : e.userAction) !== null && n !== void 0 ? n : !0;
3237
3237
  this.updateState({ enabled: !1 }, t), this._disable({ userAction: t });
3238
3238
  }
3239
- }, o.prototype.setState = function(e, a) {
3240
- a === void 0 && (a = {});
3241
- var t = this.state, s = a.userAction !== void 0 ? a.userAction : !0;
3242
- if (this.updateState(e, s), e.enabled !== void 0 && t.enabled !== e.enabled) {
3243
- var c = { userAction: s };
3244
- e.enabled ? this._enable(c) : this._disable(c);
3239
+ }, o.prototype.setState = function(e, n) {
3240
+ n === void 0 && (n = {});
3241
+ var t = this.state, a = n.userAction !== void 0 ? n.userAction : !0;
3242
+ if (this.updateState(e, a), e.enabled !== void 0 && t.enabled !== e.enabled) {
3243
+ var s = { userAction: a };
3244
+ e.enabled ? this._enable(s) : this._disable(s);
3245
+ }
3246
+ }, o;
3247
+ })(Ct.Controller)
3248
+ ), ar = function(h, o) {
3249
+ return new Zn(h, o);
3250
+ }, Ot = (
3251
+ /** @class */
3252
+ (function(h) {
3253
+ he(o, h);
3254
+ function o() {
3255
+ var e = h.call(this) || this;
3256
+ e.type = "LineSegmentsGeometry";
3257
+ var n = [-1, 2, 0, 1, 2, 0, -1, 1, 0, 1, 1, 0, -1, 0, 0, 1, 0, 0, -1, -1, 0, 1, -1, 0], t = [-1, 2, 1, 2, -1, 1, 1, 1, -1, -1, 1, -1, -1, -2, 1, -2], a = [0, 2, 1, 2, 3, 1, 2, 4, 3, 4, 5, 3, 4, 6, 5, 6, 7, 5];
3258
+ return e.setIndex(a), e.setAttribute("position", new v.Float32BufferAttribute(n, 3)), e.setAttribute("uv", new v.Float32BufferAttribute(t, 2)), e;
3259
+ }
3260
+ return o.prototype.applyMatrix4 = function(e) {
3261
+ var n = this.attributes.instanceStart, t = this.attributes.instanceEnd;
3262
+ return n !== void 0 && (n.applyMatrix4(e), t.applyMatrix4(e), n.needsUpdate = !0), this.boundingBox !== null && this.computeBoundingBox(), this.boundingSphere !== null && this.computeBoundingSphere(), this;
3263
+ }, o.prototype.setPositions = function(e) {
3264
+ var n;
3265
+ e instanceof Float32Array ? n = e : Array.isArray(e) ? n = new Float32Array(e) : n = new Float32Array();
3266
+ var t = new v.InstancedInterleavedBuffer(n, 6, 1);
3267
+ return this.setAttribute("instanceStart", new v.InterleavedBufferAttribute(t, 3, 0)), this.setAttribute("instanceEnd", new v.InterleavedBufferAttribute(t, 3, 3)), this.computeBoundingBox(), this.computeBoundingSphere(), this;
3268
+ }, o.prototype.setColors = function(e) {
3269
+ var n;
3270
+ e instanceof Float32Array ? n = e : Array.isArray(e) ? n = new Float32Array(e) : n = new Float32Array();
3271
+ var t = new v.InstancedInterleavedBuffer(n, 6, 1);
3272
+ return this.setAttribute("instanceColorStart", new v.InterleavedBufferAttribute(t, 3, 0)), this.setAttribute("instanceColorEnd", new v.InterleavedBufferAttribute(t, 3, 3)), this;
3273
+ }, o.prototype.fromWireframeGeometry = function(e) {
3274
+ return this.setPositions(e.attributes.position.array), this;
3275
+ }, o.prototype.fromEdgesGeometry = function(e) {
3276
+ return this.setPositions(e.attributes.position.array), this;
3277
+ }, o.prototype.fromMesh = function(e) {
3278
+ return this.fromWireframeGeometry(new v.WireframeGeometry(e.geometry)), this;
3279
+ }, o.prototype.fromLineSegments = function(e) {
3280
+ var n = e.geometry;
3281
+ if (n instanceof v.Geometry) {
3282
+ var t = new v.BufferGeometry().fromGeometry(n);
3283
+ this.setPositions(t.attributes.position.array);
3284
+ } else n instanceof v.BufferGeometry && this.setPositions(n.attributes.position.array);
3285
+ return this;
3286
+ }, o.prototype.computeBoundingBox = function() {
3287
+ this.boundingBox === null && (this.boundingBox = new v.Box3());
3288
+ var e = this.attributes.instanceStart, n = this.attributes.instanceEnd;
3289
+ if (e !== void 0 && n !== void 0) {
3290
+ var t = new v.Box3();
3291
+ this.boundingBox.setFromBufferAttribute(e), t.setFromBufferAttribute(n), this.boundingBox.union(t);
3292
+ }
3293
+ }, o.prototype.computeBoundingSphere = function() {
3294
+ this.boundingSphere === null && (this.boundingSphere = new v.Sphere()), this.boundingBox === null && this.computeBoundingBox();
3295
+ var e = this.attributes.instanceStart, n = this.attributes.instanceEnd;
3296
+ if (e !== void 0 && n !== void 0) {
3297
+ var t = this.boundingSphere.center;
3298
+ this.boundingBox.getCenter(t);
3299
+ for (var a = 0, s = new v.Vector3(), l = 0, f = e.count; l < f; l++)
3300
+ s.fromBufferAttribute(e, l), a = Math.max(a, t.distanceToSquared(s)), s.fromBufferAttribute(n, l), a = Math.max(a, t.distanceToSquared(s));
3301
+ this.boundingSphere.radius = Math.sqrt(a), isNaN(this.boundingSphere.radius) && console.error("THREE.LineSegmentsGeometry.computeBoundingSphere(): Computed radius is NaN. The instanced position data is likely to have NaN values.", this);
3302
+ }
3303
+ }, o.prototype.toJSON = function() {
3304
+ }, o;
3305
+ })(v.InstancedBufferGeometry)
3306
+ );
3307
+ Object.assign(Ot.prototype, { isLineSegmentsGeometry: !0 });
3308
+ var St = {
3309
+ uniforms: v.UniformsUtils.merge([
3310
+ v.UniformsLib.common,
3311
+ v.UniformsLib.fog,
3312
+ {
3313
+ linewidth: { value: 1 },
3314
+ resolution: { value: new v.Vector2(1, 1) },
3315
+ dashScale: { value: 1 },
3316
+ dashSize: { value: 1 },
3317
+ gapSize: { value: 1 },
3318
+ opacity: { value: 1 },
3319
+ totalLength: { value: 1 },
3320
+ animationProgress: { value: 0 },
3321
+ time: { value: 0 },
3322
+ // 动画时间
3323
+ waveAmp: { value: 0.15 },
3324
+ // 波动幅度(调大了)
3325
+ waveFreq: { value: 5 },
3326
+ // 波动频率
3327
+ waveDir: { value: 2 },
3328
+ // 波动方向控制:0=无, 1=X, 2=Y, 3=Z
3329
+ startOffset: { value: 0 }
3330
+ // 新起点的偏移距离
3331
+ }
3332
+ ]),
3333
+ vertexShader: `
3334
+ #include <common>
3335
+ #include <color_pars_vertex>
3336
+ #include <fog_pars_vertex>
3337
+ #include <logdepthbuf_pars_vertex>
3338
+ #include <clipping_planes_pars_vertex>
3339
+
3340
+ uniform float linewidth;
3341
+ uniform vec2 resolution;
3342
+ uniform float totalLength;
3343
+ uniform float time;
3344
+ uniform float waveAmp;
3345
+ uniform float waveFreq;
3346
+ uniform float waveDir;
3347
+ uniform float startOffset;
3348
+
3349
+ attribute vec3 instanceStart;
3350
+ attribute vec3 instanceEnd;
3351
+ attribute float distanceProgress;
3352
+ attribute vec3 instanceColorStart;
3353
+ attribute vec3 instanceColorEnd;
3354
+ attribute float instanceDistanceStart;
3355
+ attribute float instanceDistanceEnd;
3356
+
3357
+ varying vec2 vUv;
3358
+ varying float vDistanceProgress;
3359
+
3360
+ #ifdef USE_DASH
3361
+ uniform float dashScale;
3362
+ varying float vLineDistance;
3363
+ #endif
3364
+
3365
+ void trimSegment(const in vec4 start, inout vec4 end) {
3366
+ float a = projectionMatrix[2][2];
3367
+ float b = projectionMatrix[3][2];
3368
+ float nearEstimate = -0.5 * b / a;
3369
+ float alpha = (nearEstimate - start.z) / (end.z - start.z);
3370
+ end.xyz = mix(start.xyz, end.xyz, alpha);
3371
+ }
3372
+
3373
+ void main() {
3374
+ #ifdef USE_COLOR
3375
+ vColor.xyz = (position.y < 0.5) ? instanceColorStart : instanceColorEnd;
3376
+ #endif
3377
+
3378
+ #ifdef USE_DASH
3379
+ vLineDistance = (position.y < 0.5) ? dashScale * instanceDistanceStart : dashScale * instanceDistanceEnd;
3380
+ #endif
3381
+
3382
+ float aspect = resolution.x / resolution.y;
3383
+ vUv = uv;
3384
+
3385
+ // camera space
3386
+ vec4 start = modelViewMatrix * vec4(instanceStart, 1.0);
3387
+ vec4 end = modelViewMatrix * vec4(instanceEnd, 1.0);
3388
+
3389
+ // ===== 波浪偏移逻辑 =====
3390
+ if (waveDir > 0.5) { // 0 表示不波动
3391
+ float adjustedDistanceStart = max(0.0, instanceDistanceStart - startOffset);
3392
+ float adjustedDistanceEnd = max(0.0, instanceDistanceEnd - startOffset);
3393
+ float adjustedTotalLength = max(0.01, totalLength - startOffset);
3394
+ float phaseStart = adjustedDistanceStart / adjustedTotalLength;
3395
+ float phaseEnd = adjustedDistanceEnd / adjustedTotalLength;
3396
+ float waveStart = sin(phaseStart * waveFreq - time * 2.0) * waveAmp;
3397
+ float waveEnd = sin(phaseEnd * waveFreq - time * 2.0) * waveAmp;
3398
+
3399
+ if (abs(waveDir - 1.0) < 0.1) { // X 方向
3400
+ start.x += waveStart;
3401
+ end.x += waveEnd;
3402
+ } else if (abs(waveDir - 2.0) < 0.1) { // Y 方向
3403
+ start.y += waveStart;
3404
+ end.y += waveEnd;
3405
+ } else if (abs(waveDir - 3.0) < 0.1) { // Z 方向
3406
+ start.z += waveStart;
3407
+ end.z += waveEnd;
3408
+ }
3409
+ }
3410
+ // ======================
3411
+
3412
+ bool perspective = (projectionMatrix[2][3] == -1.0);
3413
+ if (perspective) {
3414
+ if (start.z < 0.0 && end.z >= 0.0) {
3415
+ trimSegment(start, end);
3416
+ } else if (end.z < 0.0 && start.z >= 0.0) {
3417
+ trimSegment(end, start);
3418
+ }
3419
+ }
3420
+
3421
+ vec4 clipStart = projectionMatrix * start;
3422
+ vec4 clipEnd = projectionMatrix * end;
3423
+
3424
+ vec2 ndcStart = clipStart.xy / clipStart.w;
3425
+ vec2 ndcEnd = clipEnd.xy / clipEnd.w;
3426
+
3427
+ vec2 dir = ndcEnd - ndcStart;
3428
+ dir.x *= aspect;
3429
+ dir = normalize(dir);
3430
+
3431
+ vec2 offset = vec2(dir.y, -dir.x);
3432
+ dir.x /= aspect;
3433
+ offset.x /= aspect;
3434
+
3435
+ if (position.x < 0.0) offset *= -1.0;
3436
+ if (position.y < 0.0) {
3437
+ offset += -dir;
3438
+ } else if (position.y > 1.0) {
3439
+ offset += dir;
3440
+ }
3441
+
3442
+ offset *= linewidth;
3443
+ offset /= resolution.y;
3444
+
3445
+ vec4 clip = (position.y < 0.5) ? clipStart : clipEnd;
3446
+ offset *= clip.w;
3447
+ clip.xy += offset;
3448
+
3449
+ gl_Position = clip;
3450
+
3451
+ float adjustedDistanceEnd = max(0.0, instanceDistanceEnd - startOffset);
3452
+ float adjustedTotalLength = max(0.01, totalLength - startOffset);
3453
+ vDistanceProgress = adjustedDistanceEnd / adjustedTotalLength;
3454
+
3455
+ #include <logdepthbuf_vertex>
3456
+ #include <clipping_planes_vertex>
3457
+ #include <fog_vertex>
3458
+ }
3459
+ `,
3460
+ fragmentShader: `
3461
+ uniform vec3 diffuse;
3462
+ uniform float opacity;
3463
+ uniform float animationProgress;
3464
+ varying float vDistanceProgress;
3465
+
3466
+ #ifdef USE_DASH
3467
+ uniform float dashSize;
3468
+ uniform float gapSize;
3469
+ #endif
3470
+
3471
+ varying float vLineDistance;
3472
+ #include <common>
3473
+ #include <color_pars_fragment>
3474
+ #include <fog_pars_fragment>
3475
+ #include <logdepthbuf_pars_fragment>
3476
+ #include <clipping_planes_pars_fragment>
3477
+ varying vec2 vUv;
3478
+
3479
+ void main() {
3480
+ #include <clipping_planes_fragment>
3481
+
3482
+ #ifdef USE_DASH
3483
+ if (vUv.y < -1.0 || vUv.y > 1.0) discard;
3484
+ if (mod(vLineDistance, dashSize + gapSize) > dashSize) discard;
3485
+ #endif
3486
+
3487
+ if (abs(vUv.y) > 1.0) {
3488
+ float a = vUv.x;
3489
+ float b = (vUv.y > 0.0) ? vUv.y - 1.0 : vUv.y + 1.0;
3490
+ float len2 = a * a + b * b;
3491
+ if (len2 > 1.0) discard;
3492
+ }
3493
+
3494
+ vec4 diffuseColor = vec4(diffuse, opacity);
3495
+ #include <logdepthbuf_fragment>
3496
+ #include <color_fragment>
3497
+
3498
+ gl_FragColor = vec4(diffuseColor.rgb, diffuseColor.a);
3499
+
3500
+ float range = 0.3;
3501
+ float alpha = 0.0;
3502
+ float diff = abs(vDistanceProgress - animationProgress);
3503
+ diff = min(diff, 1.0 - diff);
3504
+ if (diff < range) {
3505
+ alpha = 1.0 - diff / range;
3506
+ }
3507
+ if (vDistanceProgress > 0.9) {
3508
+ alpha = min(alpha, (1.0 - vDistanceProgress) / 0.1);
3509
+ }
3510
+ alpha = clamp(alpha, 0.0, 1.0);
3511
+ gl_FragColor.a = alpha;
3512
+
3513
+ #include <tonemapping_fragment>
3514
+ #include <fog_fragment>
3515
+ #include <premultiplied_alpha_fragment>
3516
+ }
3517
+ `
3518
+ }, It = (
3519
+ /** @class */
3520
+ (function(h) {
3521
+ he(o, h);
3522
+ function o(e) {
3523
+ var n = h.call(this, {
3524
+ uniforms: v.UniformsUtils.clone(St.uniforms),
3525
+ vertexShader: St.vertexShader,
3526
+ fragmentShader: St.fragmentShader,
3527
+ clipping: !0
3528
+ }) || this;
3529
+ return n.type = "LineMaterial", n.dashed = !1, Object.defineProperties(n, {
3530
+ color: {
3531
+ enumerable: !0,
3532
+ get: function() {
3533
+ return this.uniforms.diffuse.value;
3534
+ },
3535
+ set: function(t) {
3536
+ this.uniforms.diffuse.value = t;
3537
+ }
3538
+ },
3539
+ linewidth: {
3540
+ enumerable: !0,
3541
+ get: function() {
3542
+ return this.uniforms.linewidth.value;
3543
+ },
3544
+ set: function(t) {
3545
+ this.uniforms.linewidth.value = t;
3546
+ }
3547
+ },
3548
+ dashScale: {
3549
+ enumerable: !0,
3550
+ get: function() {
3551
+ return this.uniforms.dashScale.value;
3552
+ },
3553
+ set: function(t) {
3554
+ this.uniforms.dashScale.value = t;
3555
+ }
3556
+ },
3557
+ dashSize: {
3558
+ enumerable: !0,
3559
+ get: function() {
3560
+ return this.uniforms.dashSize.value;
3561
+ },
3562
+ set: function(t) {
3563
+ this.uniforms.dashSize.value = t;
3564
+ }
3565
+ },
3566
+ gapSize: {
3567
+ enumerable: !0,
3568
+ get: function() {
3569
+ return this.uniforms.gapSize.value;
3570
+ },
3571
+ set: function(t) {
3572
+ this.uniforms.gapSize.value = t;
3573
+ }
3574
+ },
3575
+ opacity: {
3576
+ enumerable: !0,
3577
+ get: function() {
3578
+ return this.uniforms.opacity.value;
3579
+ },
3580
+ set: function(t) {
3581
+ this.uniforms.opacity.value = t;
3582
+ }
3583
+ },
3584
+ resolution: {
3585
+ enumerable: !0,
3586
+ get: function() {
3587
+ return this.uniforms.resolution.value;
3588
+ },
3589
+ set: function(t) {
3590
+ this.uniforms.resolution.value.copy(t);
3591
+ }
3592
+ },
3593
+ time: {
3594
+ enumerable: !0,
3595
+ get: function() {
3596
+ return this.uniforms.time.value;
3597
+ },
3598
+ set: function(t) {
3599
+ this.uniforms.time.value = t;
3600
+ }
3601
+ },
3602
+ waveAmp: {
3603
+ enumerable: !0,
3604
+ get: function() {
3605
+ return this.uniforms.waveAmp.value;
3606
+ },
3607
+ set: function(t) {
3608
+ this.uniforms.waveAmp.value = t;
3609
+ }
3610
+ },
3611
+ waveFreq: {
3612
+ enumerable: !0,
3613
+ get: function() {
3614
+ return this.uniforms.waveFreq.value;
3615
+ },
3616
+ set: function(t) {
3617
+ this.uniforms.waveFreq.value = t;
3618
+ }
3619
+ },
3620
+ waveDir: {
3621
+ enumerable: !0,
3622
+ get: function() {
3623
+ return this.uniforms.waveDir.value;
3624
+ },
3625
+ set: function(t) {
3626
+ this.uniforms.waveDir.value = t;
3627
+ }
3628
+ },
3629
+ startOffset: {
3630
+ enumerable: !0,
3631
+ get: function() {
3632
+ return this.uniforms.startOffset.value;
3633
+ },
3634
+ set: function(t) {
3635
+ this.uniforms.startOffset.value = t;
3636
+ }
3637
+ }
3638
+ }), n.setValues(e), n;
3639
+ }
3640
+ return o;
3641
+ })(v.ShaderMaterial)
3642
+ );
3643
+ Object.assign(It.prototype, { isLineMaterial: !0 });
3644
+ var en = (
3645
+ /** @class */
3646
+ (function(h) {
3647
+ he(o, h);
3648
+ function o(e, n) {
3649
+ var t = h.call(this) || this;
3650
+ return t.type = "LineSegments2", t.geometry = e !== void 0 ? e : new Ot(), t.material = n !== void 0 ? n : new It({ color: Math.random() * 16777215 }), t;
3651
+ }
3652
+ return o.prototype.computeLineDistances = function() {
3653
+ for (var e = this.geometry, n = e.attributes.instanceStart, t = e.attributes.instanceEnd, a = new Float32Array(2 * n.count), s = new v.Vector3(), l = new v.Vector3(), f = 0, c = 0, g = n.count; c < g; c++)
3654
+ s.fromBufferAttribute(n, c), l.fromBufferAttribute(t, c), f += s.distanceTo(l);
3655
+ this.material.uniforms.totalLength.value = f;
3656
+ for (var c = 0, y = 0, g = n.count; c < g; c++, y += 2) {
3657
+ s.fromBufferAttribute(n, c), l.fromBufferAttribute(t, c);
3658
+ var w = s.distanceTo(l);
3659
+ a[y] = y === 0 ? 0 : a[y - 1], a[y + 1] = a[y] + w;
3660
+ }
3661
+ var x = new v.InstancedInterleavedBuffer(a, 2, 1);
3662
+ return e.setAttribute("instanceDistanceStart", new v.InterleavedBufferAttribute(x, 1, 0)), e.setAttribute("instanceDistanceEnd", new v.InterleavedBufferAttribute(x, 1, 1)), this;
3663
+ }, o.prototype.raycast = function(e, n) {
3664
+ e.camera === null && console.error('LineSegments2: "Raycaster.camera" needs to be set in order to raycast against LineSegments2.');
3665
+ var t = e.ray, a = e.camera, s = a.projectionMatrix, l = this.geometry, f = this.material, c = f.resolution, g = f.linewidth, y = l.attributes.instanceStart, w = l.attributes.instanceEnd, x = new v.Vector4(), A = new v.Vector4(), S = new v.Vector4(), O = new v.Vector3(), T = new v.Matrix4(), b = new v.Line3(), P = new v.Vector3();
3666
+ t.at(1, S), S.w = 1, S.applyMatrix4(a.matrixWorldInverse), S.applyMatrix4(s), S.multiplyScalar(1 / S.w), S.x *= c.x / 2, S.y *= c.y / 2, S.z = 0, O.copy(S);
3667
+ var m = this.matrixWorld;
3668
+ T.multiplyMatrices(a.matrixWorldInverse, m);
3669
+ for (var C = 0, _ = y.count; C < _; C++) {
3670
+ x.fromBufferAttribute(y, C), A.fromBufferAttribute(w, C), x.w = 1, A.w = 1, x.applyMatrix4(T), A.applyMatrix4(T), x.applyMatrix4(s), A.applyMatrix4(s), x.multiplyScalar(1 / x.w), A.multiplyScalar(1 / A.w);
3671
+ var H = x.z < -1 && A.z < -1, G = x.z > 1 && A.z > 1;
3672
+ if (!(H || G)) {
3673
+ x.x *= c.x / 2, x.y *= c.y / 2, A.x *= c.x / 2, A.y *= c.y / 2, b.start.copy(x), b.start.z = 0, b.end.copy(A), b.end.z = 0;
3674
+ var U = b.closestPointToPointParameter(O, !0);
3675
+ b.at(U, P);
3676
+ var Q = v.MathUtils.lerp(x.z, A.z, U), oe = Q >= -1 && Q <= 1, le = O.distanceTo(P) < g * 0.5;
3677
+ if (oe && le) {
3678
+ b.start.fromBufferAttribute(y, C), b.end.fromBufferAttribute(w, C), b.start.applyMatrix4(m), b.end.applyMatrix4(m);
3679
+ var J = new v.Vector3(), Z = new v.Vector3();
3680
+ t.distanceSqToSegment(b.start, b.end, Z, J), n.push({
3681
+ point: Z,
3682
+ pointOnLine: J,
3683
+ distance: t.origin.distanceTo(Z),
3684
+ object: this,
3685
+ faceIndex: C
3686
+ });
3687
+ }
3688
+ }
3689
+ }
3690
+ }, o;
3691
+ })(v.Mesh)
3692
+ );
3693
+ Object.assign(en.prototype, { isLineSegments2: !0 });
3694
+ var tn = (
3695
+ /** @class */
3696
+ (function(h) {
3697
+ he(o, h);
3698
+ function o(e, n) {
3699
+ var t = h.call(this, e, n) || this;
3700
+ return t.type = "Line2", t;
3701
+ }
3702
+ return o;
3703
+ })(en)
3704
+ );
3705
+ Object.assign(tn.prototype, { isLine2: !0 });
3706
+ var nn = (
3707
+ /** @class */
3708
+ (function(h) {
3709
+ he(o, h);
3710
+ function o() {
3711
+ var e = h.call(this) || this;
3712
+ return e.type = "LineGeometry", e;
3713
+ }
3714
+ return o.prototype.setPositions = function(e) {
3715
+ for (var n = e.length - 3, t = new Float32Array(2 * n), a = 0; a < n; a += 3)
3716
+ t[2 * a] = e[a], t[2 * a + 1] = e[a + 1], t[2 * a + 2] = e[a + 2], t[2 * a + 3] = e[a + 3], t[2 * a + 4] = e[a + 4], t[2 * a + 5] = e[a + 5];
3717
+ return h.prototype.setPositions.call(this, t), this;
3718
+ }, o.prototype.setColors = function(e) {
3719
+ for (var n = e.length - 3, t = new Float32Array(2 * n), a = 0; a < n; a += 3)
3720
+ t[2 * a] = e[a], t[2 * a + 1] = e[a + 1], t[2 * a + 2] = e[a + 2], t[2 * a + 3] = e[a + 3], t[2 * a + 4] = e[a + 4], t[2 * a + 5] = e[a + 5];
3721
+ return h.prototype.setColors.call(this, t), this;
3722
+ }, o.prototype.fromLine = function(e) {
3723
+ var n = e.geometry;
3724
+ if (n instanceof v.Geometry) {
3725
+ var t = new v.BufferGeometry().fromGeometry(n);
3726
+ this.setPositions(t.attributes.position.array);
3727
+ } else n instanceof v.BufferGeometry && this.setPositions(n.attributes.position.array);
3728
+ return this;
3729
+ }, o.prototype.copy = function() {
3730
+ return this;
3731
+ }, o;
3732
+ })(Ot)
3733
+ );
3734
+ Object.assign(nn.prototype, { isLineGeometry: !0 });
3735
+ var Qn = (
3736
+ /** @class */
3737
+ (function(h) {
3738
+ he(o, h);
3739
+ function o(e, n) {
3740
+ var t = h.call(this, e) || this;
3741
+ t.paths = /* @__PURE__ */ new Map(), t.animationId = null, t.up = new v.Vector3(0, 1, 0);
3742
+ var a = {
3743
+ enabled: !0,
3744
+ visible: !0,
3745
+ playing: !1
3746
+ };
3747
+ t.state = Object.assign(a, n == null ? void 0 : n.initialState);
3748
+ var s = {
3749
+ lineCount: 6,
3750
+ spacing: 0.02,
3751
+ divisions: 100,
3752
+ lineWidth: 2,
3753
+ color: 16777215,
3754
+ duration: 3,
3755
+ waveAmp: 0.05,
3756
+ waveFreq: 20,
3757
+ particleCount: 50,
3758
+ maxDistance: 0.1
3759
+ };
3760
+ return t._config = V(V({}, s), n == null ? void 0 : n.config), n != null && n.paths && n.paths.length > 0 && n.paths.forEach(function(l) {
3761
+ t.addPath(l);
3762
+ }), t.state.enabled && t._enable({ userAction: !1 }), t;
3763
+ }
3764
+ return Object.defineProperty(o.prototype, "config", {
3765
+ get: function() {
3766
+ return V({}, this._config);
3767
+ },
3768
+ enumerable: !1,
3769
+ configurable: !0
3770
+ }), o.prototype.updateState = function(e, n) {
3771
+ var t = this.state;
3772
+ this.state = V(V({}, this.state), e), this.hooks.emit("stateChange", { state: this.state, prevState: t, userAction: n });
3773
+ }, o.prototype.load = function(e, n) {
3774
+ return Le(this, void 0, void 0, function() {
3775
+ var t, a = this;
3776
+ return De(this, function(s) {
3777
+ return this.clearAllPaths(), e.paths.forEach(function(l) {
3778
+ var f, c, g = l.points.map(function(y) {
3779
+ return new v.Vector3(y.x, y.y, y.z);
3780
+ });
3781
+ a.addPath({
3782
+ id: l.id,
3783
+ points: g,
3784
+ enabled: (f = l.enabled) !== null && f !== void 0 ? f : !0,
3785
+ visible: (c = l.visible) !== null && c !== void 0 ? c : !0,
3786
+ color: l.color,
3787
+ lineWidth: l.lineWidth
3788
+ });
3789
+ }), t = /* @__PURE__ */ new Map(), this.paths.forEach(function(l, f) {
3790
+ t.set(f, l.config);
3791
+ }), this.data = { paths: t }, this.hooks.emit("dataLoaded", this.data), n && this.setState(n), [
3792
+ 2
3793
+ /*return*/
3794
+ ];
3795
+ });
3796
+ });
3797
+ }, o.prototype.addPath = function(e) {
3798
+ var n, t;
3799
+ if (e.points.length < 2)
3800
+ return console.warn("DynamicPathLinePlugin: 路径 ".concat(e.id, " 至少需要2个点")), !1;
3801
+ if (this.paths.has(e.id))
3802
+ return console.warn("DynamicPathLinePlugin: 路径 ".concat(e.id, " 已存在")), !1;
3803
+ var a = new v.CatmullRomCurve3(e.points), s = this.createLines(e, a), l = this.createParticles(), f = l.particles, c = l.particleGeometry, g = l.particleMaterial, y = l.particleInfos, w = l.particlePositions, x = {
3804
+ id: e.id,
3805
+ config: e,
3806
+ curve: a,
3807
+ lines: s,
3808
+ particles: f,
3809
+ particleGeometry: c,
3810
+ particleMaterial: g,
3811
+ particleInfos: y,
3812
+ particlePositions: w,
3813
+ enabled: (n = e.enabled) !== null && n !== void 0 ? n : !0,
3814
+ visible: (t = e.visible) !== null && t !== void 0 ? t : !0,
3815
+ startOffset: 0
3816
+ };
3817
+ this.paths.set(e.id, x);
3818
+ var A = this.data, S = /* @__PURE__ */ new Map();
3819
+ return this.paths.forEach(function(O, T) {
3820
+ S.set(T, O.config);
3821
+ }), this.data = { paths: S }, this.hooks.emit("dataChange", this.data, A), this.hooks.emit("pathAdd", e.id, e), this.state.playing && this.animationId === null && this.startAnimation(), !0;
3822
+ }, o.prototype.removePath = function(e) {
3823
+ var n = this.paths.get(e);
3824
+ if (!n)
3825
+ return console.warn("DynamicPathLinePlugin: 路径 ".concat(e, " 不存在")), !1;
3826
+ this.disposePathResources(n), this.paths.delete(e);
3827
+ var t = this.data, a = /* @__PURE__ */ new Map();
3828
+ return this.paths.forEach(function(s, l) {
3829
+ a.set(l, s.config);
3830
+ }), this.data = { paths: a }, this.hooks.emit("dataChange", this.data, t), this.hooks.emit("pathRemove", e), !0;
3831
+ }, o.prototype.enablePath = function(e) {
3832
+ var n = this.paths.get(e);
3833
+ return n ? (n.enabled = !0, this.hooks.emit("pathEnable", e), !0) : (console.warn("DynamicPathLinePlugin: 路径 ".concat(e, " 不存在")), !1);
3834
+ }, o.prototype.disablePath = function(e) {
3835
+ var n = this.paths.get(e);
3836
+ return n ? (n.enabled = !1, this.hooks.emit("pathDisable", e), !0) : (console.warn("DynamicPathLinePlugin: 路径 ".concat(e, " 不存在")), !1);
3837
+ }, o.prototype.showPath = function(e) {
3838
+ var n = this.paths.get(e);
3839
+ return n ? (n.visible = !0, n.lines.forEach(function(t) {
3840
+ return t.visible = !0;
3841
+ }), n.particles.visible = !0, this.hooks.emit("pathShow", e), !0) : (console.warn("DynamicPathLinePlugin: 路径 ".concat(e, " 不存在")), !1);
3842
+ }, o.prototype.hidePath = function(e) {
3843
+ var n = this.paths.get(e);
3844
+ return n ? (n.visible = !1, n.lines.forEach(function(t) {
3845
+ return t.visible = !1;
3846
+ }), n.particles.visible = !1, this.hooks.emit("pathHide", e), !0) : (console.warn("DynamicPathLinePlugin: 路径 ".concat(e, " 不存在")), !1);
3847
+ }, o.prototype.getPathIds = function() {
3848
+ return Array.from(this.paths.keys());
3849
+ }, o.prototype.getPathConfig = function(e) {
3850
+ var n = this.paths.get(e);
3851
+ return n ? V({}, n.config) : void 0;
3852
+ }, o.prototype.clearAllPaths = function() {
3853
+ var e = this;
3854
+ this.paths.forEach(function(a) {
3855
+ e.disposePathResources(a);
3856
+ }), this.paths.clear();
3857
+ var n = this.data, t = /* @__PURE__ */ new Map();
3858
+ this.paths.forEach(function(a, s) {
3859
+ t.set(s, a.config);
3860
+ }), this.data = { paths: t }, this.hooks.emit("dataChange", this.data, n);
3861
+ }, o.prototype.getPositions = function(e, n) {
3862
+ for (var t = [], a = [], s = 0, l = [], f = 0; f <= n; f++) {
3863
+ var c = f / n, g = e.getPoint(c);
3864
+ l.push(g.clone()), f > 0 && (s += g.distanceTo(l[f - 1]));
3865
+ }
3866
+ for (var y = 0, f = 0; f < n; f++) {
3867
+ f > 0 && (y += l[f].distanceTo(l[f - 1]));
3868
+ var w = y / s;
3869
+ t.push(l[f].x, l[f].y, l[f].z), a.push(w);
3870
+ }
3871
+ return { positions: t, distanceProgress: a };
3872
+ }, o.prototype.createLines = function(e, n) {
3873
+ for (var t = this, a, s, l = [], f = this._config, c = f.lineCount, g = f.spacing, y = f.divisions, w = f.waveAmp, x = f.waveFreq, A = (a = e.lineWidth) !== null && a !== void 0 ? a : this._config.lineWidth, S = (s = e.color) !== null && s !== void 0 ? s : this._config.color, O = function(P) {
3874
+ var m = (P - (c - 1) / 2) * g, C = e.points.map(function(oe, le) {
3875
+ var J = le / (e.points.length - 1), Z = n.getTangent(J).normalize(), D = new v.Vector3().crossVectors(t.up, Z).normalize(), I = m * Math.abs((le - e.points.length / 2) / e.points.length - 0.5) * -1;
3876
+ return oe.clone().addScaledVector(D, m + I).add(new v.Vector3(0, 0.02 * (P % 2 === 0 ? 1 : 0), 0));
3877
+ }), _ = new v.CatmullRomCurve3(C), H = T.getPositions(_, y).positions, G = new nn();
3878
+ G.setPositions(H);
3879
+ var U = new It({
3880
+ color: S,
3881
+ linewidth: A * (P % 2 === 0 ? 1 : 0.5),
3882
+ transparent: !0,
3883
+ opacity: 1
3884
+ });
3885
+ U.resolution.set(T.five.camera.resolution.x, T.five.camera.resolution.y), P === 0 ? U.waveDir = 1 : P === 1 ? U.waveDir = 2 : P === 2 ? U.waveDir = 0 : P === 3 ? U.waveDir = 3 : P === 4 && (U.waveDir = 1), U.waveAmp = w, U.waveFreq = x, Object.assign(U.uniforms, {
3886
+ time: { value: 0 },
3887
+ startOffset: { value: 0 }
3888
+ });
3889
+ var Q = new tn(G, U);
3890
+ Q.computeLineDistances(), l.push(Q), T.five.scene.add(Q);
3891
+ }, T = this, b = 0; b < c; b++)
3892
+ O(b);
3893
+ return l;
3894
+ }, o.prototype.createParticleMaterial = function() {
3895
+ return new v.ShaderMaterial({
3896
+ transparent: !0,
3897
+ blending: v.AdditiveBlending,
3898
+ depthWrite: !1,
3899
+ uniforms: {
3900
+ pointTexture: { value: new v.TextureLoader().load("https://threejs.org/examples/textures/sprites/circle.png") }
3901
+ },
3902
+ vertexShader: `
3903
+ attribute float size;
3904
+ varying vec2 vUv;
3905
+ void main() {
3906
+ vUv = uv;
3907
+ vec4 mvPosition = modelViewMatrix * vec4(position, 1.0);
3908
+ gl_PointSize = size * (1.0 / -mvPosition.z);
3909
+ gl_Position = projectionMatrix * mvPosition;
3910
+ }
3911
+ `,
3912
+ fragmentShader: `
3913
+ uniform sampler2D pointTexture;
3914
+ void main() {
3915
+ gl_FragColor = texture2D(pointTexture, gl_PointCoord);
3916
+ gl_FragColor.a *= 0.15;
3917
+ }
3918
+ `
3919
+ });
3920
+ }, o.prototype.createParticles = function() {
3921
+ for (var e = this._config.particleCount, n = new Float32Array(e * 3), t = new v.BufferGeometry(), a = this.createParticleMaterial(), s = new v.Points(t, a), l = new Float32Array(e), f = [], c = 0; c < e; c++)
3922
+ n[c * 3] = 9999, n[c * 3 + 1] = 9999, n[c * 3 + 2] = 9999, l[c] = v.MathUtils.randFloat(3, 9), f.push({
3923
+ velocity: new v.Vector3(),
3924
+ life: 3 + Math.random() * 2,
3925
+ age: 0,
3926
+ active: !1,
3927
+ alpha: 0,
3928
+ startPos: new v.Vector3()
3929
+ });
3930
+ return t.setAttribute("position", new v.BufferAttribute(n, 3)), t.setAttribute("size", new v.BufferAttribute(l, 1)), s.frustumCulled = !1, this.five.scene.add(s), { particles: s, particleGeometry: t, particleMaterial: a, particleInfos: f, particlePositions: n };
3931
+ }, o.prototype.projectPointsToScreen = function(e, n) {
3932
+ for (var t = [], a = 0, s = 0; s < e.length; s++) {
3933
+ var l = e[s];
3934
+ s > 0 && (a += l.distanceTo(e[s - 1]));
3935
+ var f = l.clone().project(n), c = f.x < -1 || f.x > 1 || f.y < -1 || f.y > 1 || f.z < 0 || f.z > 1;
3936
+ t.push({
3937
+ point: l.clone(),
3938
+ screenPos: new v.Vector2(f.x, f.y),
3939
+ distanceFromStart: a,
3940
+ isOffscreen: c
3941
+ });
3942
+ }
3943
+ return t;
3944
+ }, o.prototype.findNearestOffscreenPoint = function(e) {
3945
+ for (var n = -1, t = 0, a = -1, s = 0; s < e.length; s++)
3946
+ if (!e[s].isOffscreen) {
3947
+ a = s;
3948
+ break;
3949
+ }
3950
+ if (a === -1)
3951
+ return null;
3952
+ for (var s = a - 1; s >= 0; s--)
3953
+ if (e[s].isOffscreen) {
3954
+ n = s, t = e[s].distanceFromStart;
3955
+ break;
3956
+ }
3957
+ return n === -1 ? { index: 0, distance: 0 } : {
3958
+ index: n,
3959
+ distance: t
3960
+ };
3961
+ }, o.prototype.updateAnimation = function() {
3962
+ var e = performance.now() / 1e3, n = this._config, t = n.duration, a = n.particleCount, s = n.maxDistance, l = e % t / t;
3963
+ this.paths.forEach(function(f) {
3964
+ if (f.enabled) {
3965
+ f.lines.forEach(function(b) {
3966
+ b.material.uniforms.time.value = e, b.material.uniforms.animationProgress.value = l;
3967
+ });
3968
+ var c = null, g = 1 / 0;
3969
+ if (f.lines.forEach(function(b) {
3970
+ for (var P = b.geometry, m = P.attributes.instanceDistanceStart, C = P.attributes.instanceDistanceEnd, _ = m.count, H = 0; H < _; H++) {
3971
+ var G = m.getX(H) / b.material.uniforms.totalLength.value, U = C.getX(H) / b.material.uniforms.totalLength.value;
3972
+ if (l >= G && l <= U) {
3973
+ var Q = (l - G) / (U - G), oe = new v.Vector3().fromBufferAttribute(P.attributes.instanceStart, H), le = new v.Vector3().fromBufferAttribute(P.attributes.instanceEnd, H), J = new v.Vector3().lerpVectors(oe, le, Q), Z = Math.abs(l - (G + U) / 2);
3974
+ Z < g && (g = Z, c = J);
3975
+ }
3976
+ }
3977
+ }), c)
3978
+ for (var y = 0; y < a; y++) {
3979
+ var w = f.particleInfos[y];
3980
+ !w.active && Math.random() < 0.05 && (w.active = !0, w.age = 0, w.life = 3 + Math.random() * 2, w.velocity.set((Math.random() - 0.5) * 1e-4, (Math.random() - 0.5) * 1e-4, (Math.random() - 0.5) * 1e-4), f.particlePositions[y * 3] = c.x, f.particlePositions[y * 3 + 1] = c.y, f.particlePositions[y * 3 + 2] = c.z, w.startPos.copy(c), w.alpha = 0);
3981
+ }
3982
+ for (var y = 0; y < a; y++) {
3983
+ var w = f.particleInfos[y];
3984
+ if (w.active) {
3985
+ w.age += 0.016;
3986
+ var x = f.particlePositions[y * 3] - w.startPos.x, A = f.particlePositions[y * 3 + 1] - w.startPos.y, S = f.particlePositions[y * 3 + 2] - w.startPos.z, O = Math.sqrt(x * x + A * A + S * S);
3987
+ (O >= s || w.age >= w.life) && (w.active = !1, f.particlePositions[y * 3] = 9999, f.particlePositions[y * 3 + 1] = 9999, f.particlePositions[y * 3 + 2] = 9999, w.alpha = 0), w.velocity.x += (Math.random() - 0.5) * 1e-4, w.velocity.z += (Math.random() - 0.5) * 1e-4, w.velocity.y += 1e-4, w.velocity.multiplyScalar(0.99), f.particlePositions[y * 3] += w.velocity.x, f.particlePositions[y * 3 + 1] += w.velocity.y, f.particlePositions[y * 3 + 2] += w.velocity.z;
3988
+ var T = w.age / w.life;
3989
+ T < 0.2 ? w.alpha = T / 0.2 : T > 0.8 ? w.alpha = (1 - T) / 0.2 : w.alpha = 1;
3990
+ }
3991
+ }
3992
+ f.particleGeometry.attributes.position.needsUpdate = !0, f.particleMaterial.opacity = 0.6;
3993
+ }
3994
+ }), this.five.needsRender = !0;
3995
+ }, o.prototype.startAnimation = function() {
3996
+ var e = this;
3997
+ this.animationId === null && this.paths.size !== 0 && (this.animationId = ct.shared.add(function() {
3998
+ e.updateAnimation();
3999
+ }), this.updateState({ playing: !0 }, !1), this.hooks.emit("animationStart"));
4000
+ }, o.prototype.stopAnimation = function() {
4001
+ this.animationId !== null && (this.animationId(), this.animationId = null), this.updateState({ playing: !1 }, !1), this.hooks.emit("animationStop");
4002
+ }, o.prototype._enable = function(e) {
4003
+ this.paths.size > 0 && this.startAnimation();
4004
+ }, o.prototype._disable = function(e) {
4005
+ this.stopAnimation();
4006
+ }, o.prototype.enable = function(e) {
4007
+ var n;
4008
+ if (!this.state.enabled) {
4009
+ var t = (n = e == null ? void 0 : e.userAction) !== null && n !== void 0 ? n : !0;
4010
+ this.updateState({ enabled: !0 }, t), this._enable({ userAction: t });
4011
+ }
4012
+ }, o.prototype.disable = function(e) {
4013
+ var n;
4014
+ if (this.state.enabled !== !1) {
4015
+ var t = (n = e == null ? void 0 : e.userAction) !== null && n !== void 0 ? n : !0;
4016
+ this.updateState({ enabled: !1 }, t), this._disable({ userAction: t });
3245
4017
  }
4018
+ }, o.prototype.show = function(e) {
4019
+ var n, t = (n = e == null ? void 0 : e.userAction) !== null && n !== void 0 ? n : !0;
4020
+ this.paths.forEach(function(a) {
4021
+ a.lines.forEach(function(s) {
4022
+ return s.visible = !0;
4023
+ }), a.particles.visible = !0;
4024
+ }), this.updateState({ visible: !0 }, t);
4025
+ }, o.prototype.hide = function(e) {
4026
+ var n, t = (n = e == null ? void 0 : e.userAction) !== null && n !== void 0 ? n : !0;
4027
+ this.paths.forEach(function(a) {
4028
+ a.lines.forEach(function(s) {
4029
+ return s.visible = !1;
4030
+ }), a.particles.visible = !1;
4031
+ }), this.updateState({ visible: !1 }, t);
4032
+ }, o.prototype.setState = function(e, n) {
4033
+ var t;
4034
+ t = n == null ? void 0 : n.userAction, e.enabled !== void 0 && e.enabled !== this.state.enabled && (e.enabled ? this.enable(n) : this.disable(n)), e.visible !== void 0 && e.visible !== this.state.visible && (e.visible ? this.show(n) : this.hide(n)), e.playing !== void 0 && e.playing !== this.state.playing && (e.playing ? this.startAnimation() : this.stopAnimation());
4035
+ }, o.prototype.play = function() {
4036
+ this.startAnimation();
4037
+ }, o.prototype.pause = function() {
4038
+ this.stopAnimation();
4039
+ }, o.prototype.updateScreenProjection = function(e) {
4040
+ var n = this, t = function(s) {
4041
+ var l = n.projectPointsToScreen(s.config.points, n.five.camera), f = n.findNearestOffscreenPoint(l);
4042
+ f && (s.startOffset = f.distance, s.lines.forEach(function(c) {
4043
+ c.material.uniforms.startOffset.value = s.startOffset;
4044
+ }));
4045
+ };
4046
+ if (e) {
4047
+ var a = this.paths.get(e);
4048
+ a && t(a);
4049
+ } else
4050
+ this.paths.forEach(function(s) {
4051
+ s.enabled && t(s);
4052
+ });
4053
+ }, o.prototype.disposePathResources = function(e) {
4054
+ var n = this;
4055
+ e.lines.forEach(function(t) {
4056
+ n.five.scene.remove(t), t.geometry.dispose(), t.material.dispose();
4057
+ }), this.five.scene.remove(e.particles), e.particleGeometry.dispose(), e.particleMaterial.dispose();
4058
+ }, o.prototype.dispose = function() {
4059
+ this.stopAnimation(), this.clearAllPaths(), this.hooks.emit("dispose");
3246
4060
  }, o;
3247
- })(Zt.Controller)
3248
- ), Jn = function(f, o) {
3249
- return new zn(f, o);
4061
+ })(Ct.Controller)
4062
+ ), or = function(h, o) {
4063
+ return new Qn(h, o);
3250
4064
  };
3251
4065
  export {
3252
- Zn as BackgroundPlugin,
3253
- We as BasePlugin,
3254
- Dn as CSS3DRenderer,
3255
- qn as ItemMaskPlugin,
4066
+ rr as BackgroundPlugin,
4067
+ Xe as BasePlugin,
4068
+ zn as CSS3DRenderer,
4069
+ or as DynamicPathLinePlugin,
4070
+ tr as ItemMaskPlugin,
3256
4071
  qe as OrbitControls,
3257
- Kn as OrientationPlugin,
3258
- Jn as PanoAnimePlugin,
3259
- Rn as RoundedBoxGeometry,
3260
- Qn as TrajectoryPlugin
4072
+ nr as OrientationPlugin,
4073
+ ar as PanoAnimePlugin,
4074
+ jn as RoundedBoxGeometry,
4075
+ ir as TrajectoryPlugin
3261
4076
  };