@micjanic/recursive-grid 1.0.2 → 1.0.4

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.
@@ -1,5 +1,5 @@
1
- import { T as A, U as Z, P as _, r as te, E as b, a as ie, w as g, e as w, C as V } from "./PixiApp-D4xu0PT4.js";
2
- import "./webworkerAll-CI8_Z7rX.js";
1
+ import { T as A, U as Z, P as g, r as te, E as b, a as ie, w as y, e as w, C as V } from "./PixiApp-BHmY2ZMg.js";
2
+ import "./webworkerAll-pikqGfAy.js";
3
3
  class q {
4
4
  constructor(e) {
5
5
  this._lastTransform = "", this._observer = null, this._tickerAttached = !1, this.updateTranslation = () => {
@@ -33,13 +33,13 @@ class q {
33
33
  this._observer ? (this._observer.disconnect(), this._observer = null) : this._tickerAttached && A.shared.remove(this.updateTranslation), this._domElement = null, this._renderer = null, this._canvas = null, this._tickerAttached = !1, this._lastTransform = "", this._lastScaleX = null, this._lastScaleY = null;
34
34
  }
35
35
  }
36
- class M {
36
+ class O {
37
37
  /**
38
38
  * @param manager - The event boundary which manages this event. Propagation can only occur
39
39
  * within the boundary's jurisdiction.
40
40
  */
41
41
  constructor(e) {
42
- this.bubbles = !0, this.cancelBubble = !0, this.cancelable = !1, this.composed = !1, this.defaultPrevented = !1, this.eventPhase = M.prototype.NONE, this.propagationStopped = !1, this.propagationImmediatelyStopped = !1, this.layer = new _(), this.page = new _(), this.NONE = 0, this.CAPTURING_PHASE = 1, this.AT_TARGET = 2, this.BUBBLING_PHASE = 3, this.manager = e;
42
+ this.bubbles = !0, this.cancelBubble = !0, this.cancelable = !1, this.composed = !1, this.defaultPrevented = !1, this.eventPhase = O.prototype.NONE, this.propagationStopped = !1, this.propagationImmediatelyStopped = !1, this.layer = new g(), this.page = new g(), this.NONE = 0, this.CAPTURING_PHASE = 1, this.AT_TARGET = 2, this.BUBBLING_PHASE = 3, this.manager = e;
43
43
  }
44
44
  /** @readonly */
45
45
  get layerX() {
@@ -164,7 +164,7 @@ class M {
164
164
  this.propagationStopped = !0;
165
165
  }
166
166
  }
167
- var I = /iPhone/i, C = /iPod/i, L = /iPad/i, U = /\biOS-universal(?:.+)Mac\b/i, k = /\bAndroid(?:.+)Mobile\b/i, R = /Android/i, E = /(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i, O = /Silk/i, m = /Windows Phone/i, X = /\bWindows(?:.+)ARM\b/i, Y = /BlackBerry/i, H = /BB10/i, F = /Opera Mini/i, N = /\b(CriOS|Chrome)(?:.+)Mobile/i, $ = /Mobile(?:.+)Firefox\b/i, K = function(a) {
167
+ var I = /iPhone/i, B = /iPod/i, C = /iPad/i, U = /\biOS-universal(?:.+)Mac\b/i, k = /\bAndroid(?:.+)Mobile\b/i, R = /Android/i, E = /(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i, M = /Silk/i, m = /Windows Phone/i, X = /\bWindows(?:.+)ARM\b/i, Y = /BlackBerry/i, H = /BB10/i, F = /Opera Mini/i, N = /\b(CriOS|Chrome)(?:.+)Mobile/i, $ = /Mobile(?:.+)Firefox\b/i, K = function(a) {
168
168
  return typeof a < "u" && a.platform === "MacIntel" && typeof a.maxTouchPoints == "number" && a.maxTouchPoints > 1 && typeof MSStream > "u";
169
169
  };
170
170
  function ne(a) {
@@ -192,20 +192,20 @@ function G(a) {
192
192
  var n = ne(t), s = {
193
193
  apple: {
194
194
  phone: n(I) && !n(m),
195
- ipod: n(C),
196
- tablet: !n(I) && (n(L) || K(e)) && !n(m),
195
+ ipod: n(B),
196
+ tablet: !n(I) && (n(C) || K(e)) && !n(m),
197
197
  universal: n(U),
198
- device: (n(I) || n(C) || n(L) || n(U) || K(e)) && !n(m)
198
+ device: (n(I) || n(B) || n(C) || n(U) || K(e)) && !n(m)
199
199
  },
200
200
  amazon: {
201
201
  phone: n(E),
202
- tablet: !n(E) && n(O),
203
- device: n(E) || n(O)
202
+ tablet: !n(E) && n(M),
203
+ device: n(E) || n(M)
204
204
  },
205
205
  android: {
206
206
  phone: !n(m) && n(E) || !n(m) && n(k),
207
- tablet: !n(m) && !n(E) && !n(k) && (n(O) || n(R)),
208
- device: !n(m) && (n(E) || n(O) || n(k) || n(R)) || n(/\bokhttp\b/i)
207
+ tablet: !n(m) && !n(E) && !n(k) && (n(M) || n(R)),
208
+ device: !n(m) && (n(E) || n(M) || n(k) || n(R)) || n(/\bokhttp\b/i)
209
209
  },
210
210
  windows: {
211
211
  phone: n(m),
@@ -226,13 +226,13 @@ function G(a) {
226
226
  };
227
227
  return s.any = s.apple.device || s.android.device || s.windows.device || s.other.device, s.phone = s.apple.phone || s.android.phone || s.windows.phone, s.tablet = s.apple.tablet || s.android.tablet || s.windows.tablet, s;
228
228
  }
229
- const se = G.default ?? G, oe = se(globalThis.navigator), re = 9, W = 100, ae = 0, he = 0, j = 2, z = 1, le = -1e3, ce = -1e3, de = 2, S = class J {
229
+ const se = G.default ?? G, oe = se(globalThis.navigator), re = 9, W = 100, ae = 0, he = 0, j = 2, z = 1, le = -1e3, ce = -1e3, de = 2, L = class J {
230
230
  // eslint-disable-next-line jsdoc/require-param
231
231
  /**
232
232
  * @param {WebGLRenderer|WebGPURenderer} renderer - A reference to the current renderer
233
233
  */
234
234
  constructor(e, t = oe) {
235
- this._mobileInfo = t, this.debug = !1, this._activateOnTab = !0, this._deactivateOnMouseMove = !0, this._isActive = !1, this._isMobileAccessibility = !1, this._div = null, this._pool = [], this._renderId = 0, this._children = [], this._androidUpdateCount = 0, this._androidUpdateFrequency = 500, this._hookDiv = null, (t.tablet || t.phone) && this._createTouchHook(), this._renderer = e;
235
+ this._mobileInfo = t, this.debug = !1, this._activateOnTab = !0, this._deactivateOnMouseMove = !0, this._isActive = !1, this._isMobileAccessibility = !1, this._div = null, this._pools = {}, this._renderId = 0, this._children = [], this._androidUpdateCount = 0, this._androidUpdateFrequency = 500, this._isRunningTests = !1, this._boundOnKeyDown = this._onKeyDown.bind(this), this._boundOnMouseMove = this._onMouseMove.bind(this), this._hookDiv = null, (t.tablet || t.phone) && this._createTouchHook(), this._renderer = e;
236
236
  }
237
237
  /**
238
238
  * Value of `true` if accessibility is currently active and accessibility layers are showing.
@@ -251,12 +251,19 @@ const se = G.default ?? G, oe = se(globalThis.navigator), re = 9, W = 100, ae =
251
251
  return this._isMobileAccessibility;
252
252
  }
253
253
  /**
254
- * The DOM element that will sit over the PixiJS element. This is where the div overlays will go.
254
+ * Button element for handling touch hooks.
255
255
  * @readonly
256
256
  */
257
257
  get hookDiv() {
258
258
  return this._hookDiv;
259
259
  }
260
+ /**
261
+ * The DOM element that will sit over the PixiJS element. This is where the div overlays will go.
262
+ * @readonly
263
+ */
264
+ get div() {
265
+ return this._div;
266
+ }
260
267
  /**
261
268
  * Creates the touch hooks.
262
269
  * @private
@@ -285,7 +292,7 @@ const se = G.default ?? G, oe = se(globalThis.navigator), re = 9, W = 100, ae =
285
292
  this._isActive = !0, this._div || (this._div = document.createElement("div"), this._div.style.position = "absolute", this._div.style.top = `${ae}px`, this._div.style.left = `${he}px`, this._div.style.pointerEvents = "none", this._div.style.zIndex = j.toString(), this._canvasObserver = new q({
286
293
  domElement: this._div,
287
294
  renderer: this._renderer
288
- })), this._activateOnTab && (this._onKeyDown = this._onKeyDown.bind(this), globalThis.addEventListener("keydown", this._onKeyDown, !1)), this._deactivateOnMouseMove && (this._onMouseMove = this._onMouseMove.bind(this), globalThis.document.addEventListener("mousemove", this._onMouseMove, !0));
295
+ })), this._activateOnTab && globalThis.addEventListener("keydown", this._boundOnKeyDown, !1), this._deactivateOnMouseMove && globalThis.document.addEventListener("mousemove", this._boundOnMouseMove, !0);
289
296
  const e = this._renderer.view.canvas;
290
297
  if (e.parentNode)
291
298
  this._canvasObserver.ensureAttached(), this._initAccessibilitySetup();
@@ -306,12 +313,14 @@ const se = G.default ?? G, oe = se(globalThis.navigator), re = 9, W = 100, ae =
306
313
  */
307
314
  _deactivate() {
308
315
  if (!(!this._isActive || this._isMobileAccessibility)) {
309
- this._isActive = !1, globalThis.document.removeEventListener("mousemove", this._onMouseMove, !0), this._activateOnTab && globalThis.addEventListener("keydown", this._onKeyDown, !1), this._renderer.runners.postrender.remove(this);
316
+ this._isActive = !1, globalThis.document.removeEventListener("mousemove", this._boundOnMouseMove, !0), this._activateOnTab && globalThis.addEventListener("keydown", this._boundOnKeyDown, !1), this._renderer.runners.postrender.remove(this);
310
317
  for (const e of this._children)
311
318
  e._accessibleDiv && e._accessibleDiv.parentNode && (e._accessibleDiv.parentNode.removeChild(e._accessibleDiv), e._accessibleDiv = null), e._accessibleActive = !1;
312
- this._pool.forEach((e) => {
313
- e.parentNode && e.parentNode.removeChild(e);
314
- }), this._div && this._div.parentNode && this._div.parentNode.removeChild(this._div), this._pool = [], this._children = [];
319
+ for (const e in this._pools)
320
+ this._pools[e].forEach((i) => {
321
+ i.parentNode && i.parentNode.removeChild(i);
322
+ }), delete this._pools[e];
323
+ this._div && this._div.parentNode && this._div.parentNode.removeChild(this._div), this._pools = {}, this._children = [];
315
324
  }
316
325
  }
317
326
  /**
@@ -339,7 +348,7 @@ const se = G.default ?? G, oe = se(globalThis.navigator), re = 9, W = 100, ae =
339
348
  ...(e == null ? void 0 : e.accessibilityOptions) || {}
340
349
  }
341
350
  };
342
- this.debug = i.accessibilityOptions.debug, this._activateOnTab = i.accessibilityOptions.activateOnTab, this._deactivateOnMouseMove = i.accessibilityOptions.deactivateOnMouseMove, i.accessibilityOptions.enabledByDefault ? this._activate() : this._activateOnTab && (this._onKeyDown = this._onKeyDown.bind(this), globalThis.addEventListener("keydown", this._onKeyDown, !1)), this._renderer.runners.postrender.remove(this);
351
+ this.debug = i.accessibilityOptions.debug, this._activateOnTab = i.accessibilityOptions.activateOnTab, this._deactivateOnMouseMove = i.accessibilityOptions.deactivateOnMouseMove, i.accessibilityOptions.enabledByDefault && this._activate(), this._renderer.runners.postrender.remove(this);
343
352
  }
344
353
  /**
345
354
  * Updates the accessibility layer during rendering.
@@ -351,7 +360,7 @@ const se = G.default ?? G, oe = se(globalThis.navigator), re = 9, W = 100, ae =
351
360
  */
352
361
  postrender() {
353
362
  const e = performance.now();
354
- if (this._mobileInfo.android.device && e < this._androidUpdateCount || (this._androidUpdateCount = e + this._androidUpdateFrequency, !this._renderer.renderingToScreen || !this._renderer.view.canvas))
363
+ if (this._mobileInfo.android.device && e < this._androidUpdateCount || (this._androidUpdateCount = e + this._androidUpdateFrequency, (!this._renderer.renderingToScreen || !this._renderer.view.canvas) && !this._isRunningTests))
355
364
  return;
356
365
  const t = /* @__PURE__ */ new Set();
357
366
  if (this._renderer.lastObjectRendered) {
@@ -361,7 +370,7 @@ const se = G.default ?? G, oe = se(globalThis.navigator), re = 9, W = 100, ae =
361
370
  }
362
371
  for (let i = this._children.length - 1; i >= 0; i--) {
363
372
  const n = this._children[i];
364
- t.has(i) || (n._accessibleDiv && n._accessibleDiv.parentNode && (n._accessibleDiv.parentNode.removeChild(n._accessibleDiv), this._pool.push(n._accessibleDiv), n._accessibleDiv = null), n._accessibleActive = !1, te(this._children, i, 1));
373
+ t.has(i) || (n._accessibleDiv && n._accessibleDiv.parentNode && (n._accessibleDiv.parentNode.removeChild(n._accessibleDiv), this._getPool(n.accessibleType).push(n._accessibleDiv), n._accessibleDiv = null), n._accessibleActive = !1, te(this._children, i, 1));
365
374
  }
366
375
  this._renderer.renderingToScreen && this._canvasObserver.ensureAttached();
367
376
  for (let i = 0; i < this._children.length; i++) {
@@ -401,8 +410,8 @@ const se = G.default ?? G, oe = se(globalThis.navigator), re = 9, W = 100, ae =
401
410
  * @param {Container} container - The child to make accessible.
402
411
  */
403
412
  _addChild(e) {
404
- let t = this._pool.pop();
405
- t || (e.accessibleType === "button" ? t = document.createElement("button") : (t = document.createElement(e.accessibleType), t.style.cssText = `
413
+ let i = this._getPool(e.accessibleType).pop();
414
+ i ? (i.innerHTML = "", i.removeAttribute("title"), i.removeAttribute("aria-label"), i.tabIndex = 0) : (e.accessibleType === "button" ? i = document.createElement("button") : (i = document.createElement(e.accessibleType), i.style.cssText = `
406
415
  color: transparent;
407
416
  pointer-events: none;
408
417
  padding: 0;
@@ -415,7 +424,7 @@ const se = G.default ?? G, oe = se(globalThis.navigator), re = 9, W = 100, ae =
415
424
  -webkit-user-select: none;
416
425
  -moz-user-select: none;
417
426
  -ms-user-select: none;
418
- `, e.accessibleText && (t.innerText = e.accessibleText)), t.style.width = `${W}px`, t.style.height = `${W}px`, t.style.backgroundColor = this.debug ? "rgba(255,255,255,0.5)" : "transparent", t.style.position = "absolute", t.style.zIndex = j.toString(), t.style.borderStyle = "none", navigator.userAgent.toLowerCase().includes("chrome") ? t.setAttribute("aria-live", "off") : t.setAttribute("aria-live", "polite"), navigator.userAgent.match(/rv:.*Gecko\//) ? t.setAttribute("aria-relevant", "additions") : t.setAttribute("aria-relevant", "text"), t.addEventListener("click", this._onClick.bind(this)), t.addEventListener("focus", this._onFocus.bind(this)), t.addEventListener("focusout", this._onFocusOut.bind(this))), t.style.pointerEvents = e.accessiblePointerEvents, t.type = e.accessibleType, e.accessibleTitle && e.accessibleTitle !== null ? t.title = e.accessibleTitle : (!e.accessibleHint || e.accessibleHint === null) && (t.title = `container ${e.tabIndex}`), e.accessibleHint && e.accessibleHint !== null && t.setAttribute("aria-label", e.accessibleHint), this.debug && this._updateDebugHTML(t), e._accessibleActive = !0, e._accessibleDiv = t, t.container = e, this._children.push(e), this._div.appendChild(e._accessibleDiv), e.interactive && (e._accessibleDiv.tabIndex = e.tabIndex);
427
+ `, e.accessibleText && (i.innerText = e.accessibleText)), i.style.width = `${W}px`, i.style.height = `${W}px`, i.style.backgroundColor = this.debug ? "rgba(255,255,255,0.5)" : "transparent", i.style.position = "absolute", i.style.zIndex = j.toString(), i.style.borderStyle = "none", navigator.userAgent.toLowerCase().includes("chrome") ? i.setAttribute("aria-live", "off") : i.setAttribute("aria-live", "polite"), navigator.userAgent.match(/rv:.*Gecko\//) ? i.setAttribute("aria-relevant", "additions") : i.setAttribute("aria-relevant", "text"), i.addEventListener("click", this._onClick.bind(this)), i.addEventListener("focus", this._onFocus.bind(this)), i.addEventListener("focusout", this._onFocusOut.bind(this))), i.style.pointerEvents = e.accessiblePointerEvents, i.type = e.accessibleType, e.accessibleTitle && e.accessibleTitle !== null ? i.title = e.accessibleTitle : (!e.accessibleHint || e.accessibleHint === null) && (i.title = `container ${e.tabIndex}`), e.accessibleHint && e.accessibleHint !== null && i.setAttribute("aria-label", e.accessibleHint), e.interactive ? i.tabIndex = e.tabIndex : i.tabIndex = 0, this.debug && this._updateDebugHTML(i), e._accessibleActive = !0, e._accessibleDiv = i, i.container = e, this._children.push(e), this._div.appendChild(e._accessibleDiv);
419
428
  }
420
429
  /**
421
430
  * Dispatch events with the EventSystem.
@@ -424,7 +433,7 @@ const se = G.default ?? G, oe = se(globalThis.navigator), re = 9, W = 100, ae =
424
433
  * @private
425
434
  */
426
435
  _dispatchEvent(e, t) {
427
- const { container: i } = e.target, n = this._renderer.events.rootBoundary, s = Object.assign(new M(n), { target: i });
436
+ const { container: i } = e.target, n = this._renderer.events.rootBoundary, s = Object.assign(new O(n), { target: i });
428
437
  n.rootTarget = this._renderer.lastObjectRendered, t.forEach((o) => n.dispatchEvent(s, o));
429
438
  }
430
439
  /**
@@ -474,7 +483,7 @@ const se = G.default ?? G, oe = se(globalThis.navigator), re = 9, W = 100, ae =
474
483
  */
475
484
  destroy() {
476
485
  var e;
477
- this._deactivate(), this._destroyTouchHook(), (e = this._canvasObserver) == null || e.destroy(), this._canvasObserver = null, this._div = null, this._pool = null, this._children = null, this._renderer = null, this._activateOnTab && globalThis.removeEventListener("keydown", this._onKeyDown);
486
+ this._deactivate(), this._destroyTouchHook(), (e = this._canvasObserver) == null || e.destroy(), this._canvasObserver = null, this._div = null, this._pools = null, this._children = null, this._renderer = null, this._hookDiv = null, globalThis.removeEventListener("keydown", this._boundOnKeyDown), this._boundOnKeyDown = null, globalThis.document.removeEventListener("mousemove", this._boundOnMouseMove, !0), this._boundOnMouseMove = null;
478
487
  }
479
488
  /**
480
489
  * Enables or disables the accessibility system.
@@ -488,15 +497,18 @@ const se = G.default ?? G, oe = se(globalThis.navigator), re = 9, W = 100, ae =
488
497
  setAccessibilityEnabled(e) {
489
498
  e ? this._activate() : this._deactivate();
490
499
  }
500
+ _getPool(e) {
501
+ return this._pools[e] || (this._pools[e] = []), this._pools[e];
502
+ }
491
503
  };
492
- S.extension = {
504
+ L.extension = {
493
505
  type: [
494
506
  b.WebGLSystem,
495
507
  b.WebGPUSystem
496
508
  ],
497
509
  name: "accessibility"
498
510
  };
499
- S.defaultOptions = {
511
+ L.defaultOptions = {
500
512
  /**
501
513
  * Whether to enable accessibility features on initialization
502
514
  * @default false
@@ -518,7 +530,7 @@ S.defaultOptions = {
518
530
  */
519
531
  deactivateOnMouseMove: !0
520
532
  };
521
- let ue = S;
533
+ let ue = L;
522
534
  const pe = {
523
535
  accessible: !1,
524
536
  accessibleTitle: null,
@@ -664,11 +676,15 @@ class ve {
664
676
  _tickerUpdate(e) {
665
677
  this._deltaTime += e.deltaTime, !(this._deltaTime < this.interactionFrequency) && (this._deltaTime = 0, this._update());
666
678
  }
679
+ /** Destroys the event ticker. */
680
+ destroy() {
681
+ this.removeTickerListener(), this.events = null, this.domElement = null, this._deltaTime = 0, this._didMove = !1, this._tickerAdded = !1, this._pauseUpdate = !0;
682
+ }
667
683
  }
668
- const y = new ve();
669
- class D extends M {
684
+ const _ = new ve();
685
+ class D extends O {
670
686
  constructor() {
671
- super(...arguments), this.client = new _(), this.movement = new _(), this.offset = new _(), this.global = new _(), this.screen = new _();
687
+ super(...arguments), this.client = new g(), this.movement = new g(), this.offset = new g(), this.global = new g(), this.screen = new g();
672
688
  }
673
689
  /** @readonly */
674
690
  get clientX() {
@@ -820,7 +836,7 @@ class T extends D {
820
836
  T.DOM_DELTA_PIXEL = 0;
821
837
  T.DOM_DELTA_LINE = 1;
822
838
  T.DOM_DELTA_PAGE = 2;
823
- const fe = 2048, me = new _(), P = new _();
839
+ const fe = 2048, me = new g(), P = new g();
824
840
  class _e {
825
841
  /**
826
842
  * @param rootTarget - The holder of the event boundary.
@@ -868,7 +884,7 @@ class _e {
868
884
  for (let i = 0, n = t.length; i < n; i++)
869
885
  t[i].fn(e);
870
886
  else
871
- g(`[EventBoundary]: Event mapping not defined for ${e.type}`);
887
+ y(`[EventBoundary]: Event mapping not defined for ${e.type}`);
872
888
  }
873
889
  /**
874
890
  * Finds the Container that is the target of a event at the given coordinates.
@@ -878,7 +894,7 @@ class _e {
878
894
  * @param y - The y coordinate of the event.
879
895
  */
880
896
  hitTest(e, t) {
881
- y.pauseUpdate = !0;
897
+ _.pauseUpdate = !0;
882
898
  const n = this._isPointerMoveEvent && this.enableGlobalMoveEvents ? "hitTestMoveRecursive" : "hitTestRecursive", s = this[n](
883
899
  this.rootTarget,
884
900
  this.rootTarget.eventMode,
@@ -945,7 +961,7 @@ class _e {
945
961
  let r = !1;
946
962
  if (this._interactivePrune(e))
947
963
  return null;
948
- if ((e.eventMode === "dynamic" || t === "dynamic") && (y.pauseUpdate = !1), e.interactiveChildren && e.children) {
964
+ if ((e.eventMode === "dynamic" || t === "dynamic") && (_.pauseUpdate = !1), e.interactiveChildren && e.children) {
949
965
  const p = e.children;
950
966
  for (let u = p.length - 1; u >= 0; u--) {
951
967
  const h = p[u], v = this.hitTestMoveRecursive(
@@ -984,7 +1000,7 @@ class _e {
984
1000
  hitTestRecursive(e, t, i, n, s) {
985
1001
  if (this._interactivePrune(e) || s(e, i))
986
1002
  return null;
987
- if ((e.eventMode === "dynamic" || t === "dynamic") && (y.pauseUpdate = !1), e.interactiveChildren && e.children) {
1003
+ if ((e.eventMode === "dynamic" || t === "dynamic") && (_.pauseUpdate = !1), e.interactiveChildren && e.children) {
988
1004
  const l = e.children, d = i;
989
1005
  for (let p = l.length - 1; p >= 0; p--) {
990
1006
  const u = l[p], h = this.hitTestRecursive(
@@ -1065,7 +1081,7 @@ class _e {
1065
1081
  */
1066
1082
  mapPointerDown(e) {
1067
1083
  if (!(e instanceof f)) {
1068
- g("EventBoundary cannot map a non-pointer event as a pointer event");
1084
+ y("EventBoundary cannot map a non-pointer event as a pointer event");
1069
1085
  return;
1070
1086
  }
1071
1087
  const t = this.createPointerEvent(e);
@@ -1088,7 +1104,7 @@ class _e {
1088
1104
  mapPointerMove(e) {
1089
1105
  var l, d;
1090
1106
  if (!(e instanceof f)) {
1091
- g("EventBoundary cannot map a non-pointer event as a pointer event");
1107
+ y("EventBoundary cannot map a non-pointer event as a pointer event");
1092
1108
  return;
1093
1109
  }
1094
1110
  this._allInteractiveElements.length = 0, this._hitElements.length = 0, this._isPointerMoveEvent = !0;
@@ -1131,7 +1147,7 @@ class _e {
1131
1147
  mapPointerOver(e) {
1132
1148
  var o;
1133
1149
  if (!(e instanceof f)) {
1134
- g("EventBoundary cannot map a non-pointer event as a pointer event");
1150
+ y("EventBoundary cannot map a non-pointer event as a pointer event");
1135
1151
  return;
1136
1152
  }
1137
1153
  const t = this.trackingData(e.pointerId), i = this.createPointerEvent(e), n = i.pointerType === "mouse" || i.pointerType === "pen";
@@ -1149,7 +1165,7 @@ class _e {
1149
1165
  */
1150
1166
  mapPointerOut(e) {
1151
1167
  if (!(e instanceof f)) {
1152
- g("EventBoundary cannot map a non-pointer event as a pointer event");
1168
+ y("EventBoundary cannot map a non-pointer event as a pointer event");
1153
1169
  return;
1154
1170
  }
1155
1171
  const t = this.trackingData(e.pointerId);
@@ -1175,7 +1191,7 @@ class _e {
1175
1191
  */
1176
1192
  mapPointerUp(e) {
1177
1193
  if (!(e instanceof f)) {
1178
- g("EventBoundary cannot map a non-pointer event as a pointer event");
1194
+ y("EventBoundary cannot map a non-pointer event as a pointer event");
1179
1195
  return;
1180
1196
  }
1181
1197
  const t = performance.now(), i = this.createPointerEvent(e);
@@ -1229,7 +1245,7 @@ class _e {
1229
1245
  */
1230
1246
  mapPointerUpOutside(e) {
1231
1247
  if (!(e instanceof f)) {
1232
- g("EventBoundary cannot map a non-pointer event as a pointer event");
1248
+ y("EventBoundary cannot map a non-pointer event as a pointer event");
1233
1249
  return;
1234
1250
  }
1235
1251
  const t = this.trackingData(e.pointerId), i = this.findMountedTarget(t.pressTargetsByButton[e.button]), n = this.createPointerEvent(e);
@@ -1247,7 +1263,7 @@ class _e {
1247
1263
  */
1248
1264
  mapWheel(e) {
1249
1265
  if (!(e instanceof T)) {
1250
- g("EventBoundary cannot map a non-wheel event as a wheel event");
1266
+ y("EventBoundary cannot map a non-wheel event as a wheel event");
1251
1267
  return;
1252
1268
  }
1253
1269
  const t = this.createWheelEvent(e);
@@ -1438,12 +1454,12 @@ const ge = 1, ye = {
1438
1454
  touchendoutside: "pointerupoutside",
1439
1455
  touchmove: "pointermove",
1440
1456
  touchcancel: "pointercancel"
1441
- }, B = class x {
1457
+ }, S = class x {
1442
1458
  /**
1443
1459
  * @param {Renderer} renderer
1444
1460
  */
1445
1461
  constructor(e) {
1446
- this.supportsTouchEvents = "ontouchstart" in globalThis, this.supportsPointerEvents = !!globalThis.PointerEvent, this.domElement = null, this.resolution = 1, this.renderer = e, this.rootBoundary = new _e(null), y.init(this), this.autoPreventDefault = !0, this._eventsAdded = !1, this._rootPointerEvent = new f(null), this._rootWheelEvent = new T(null), this.cursorStyles = {
1462
+ this.supportsTouchEvents = "ontouchstart" in globalThis, this.supportsPointerEvents = !!globalThis.PointerEvent, this.domElement = null, this.resolution = 1, this.renderer = e, this.rootBoundary = new _e(null), _.init(this), this.autoPreventDefault = !0, this._eventsAdded = !1, this._rootPointerEvent = new f(null), this._rootWheelEvent = new T(null), this.cursorStyles = {
1447
1463
  default: "inherit",
1448
1464
  pointer: "pointer"
1449
1465
  }, this.features = new Proxy({ ...x.defaultEventFeatures }, {
@@ -1477,7 +1493,7 @@ const ge = 1, ye = {
1477
1493
  }
1478
1494
  /** Destroys all event listeners and detaches the renderer. */
1479
1495
  destroy() {
1480
- this.setTargetElement(null), this.renderer = null, this._currentCursor = null;
1496
+ _.destroy(), this.setTargetElement(null), this.renderer = null, this._currentCursor = null;
1481
1497
  }
1482
1498
  /**
1483
1499
  * Sets the current cursor mode, handling any callbacks or CSS style changes.
@@ -1580,7 +1596,7 @@ const ge = 1, ye = {
1580
1596
  _onPointerMove(e) {
1581
1597
  if (!this.features.move)
1582
1598
  return;
1583
- this.rootBoundary.rootTarget = this.renderer.lastObjectRendered, y.pointerMoved();
1599
+ this.rootBoundary.rootTarget = this.renderer.lastObjectRendered, _.pointerMoved();
1584
1600
  const t = this._normalizeToPointerData(e);
1585
1601
  for (let i = 0, n = t.length; i < n; i++) {
1586
1602
  const s = this._bootstrapEvent(this._rootPointerEvent, t[i]);
@@ -1658,13 +1674,13 @@ const ge = 1, ye = {
1658
1674
  * @see {@link EventsTicker} For the ticker system that tracks pointer movement
1659
1675
  */
1660
1676
  setTargetElement(e) {
1661
- this._removeEvents(), this.domElement = e, y.domElement = e, this._addEvents();
1677
+ this._removeEvents(), this.domElement = e, _.domElement = e, this._addEvents();
1662
1678
  }
1663
1679
  /** Register event listeners on {@link Renderer#domElement this.domElement}. */
1664
1680
  _addEvents() {
1665
1681
  if (this._eventsAdded || !this.domElement)
1666
1682
  return;
1667
- y.addTickerListener();
1683
+ _.addTickerListener();
1668
1684
  const e = this.domElement.style;
1669
1685
  e && (globalThis.navigator.msPointerEnabled ? (e.msContentZooming = "none", e.msTouchAction = "none") : this.supportsPointerEvents && (e.touchAction = "none")), this.supportsPointerEvents ? (globalThis.document.addEventListener("pointermove", this._onPointerMove, !0), this.domElement.addEventListener("pointerdown", this._onPointerDown, !0), this.domElement.addEventListener("pointerleave", this._onPointerOverOut, !0), this.domElement.addEventListener("pointerover", this._onPointerOverOut, !0), globalThis.addEventListener("pointerup", this._onPointerUp, !0)) : (globalThis.document.addEventListener("mousemove", this._onPointerMove, !0), this.domElement.addEventListener("mousedown", this._onPointerDown, !0), this.domElement.addEventListener("mouseout", this._onPointerOverOut, !0), this.domElement.addEventListener("mouseover", this._onPointerOverOut, !0), globalThis.addEventListener("mouseup", this._onPointerUp, !0), this.supportsTouchEvents && (this.domElement.addEventListener("touchstart", this._onPointerDown, !0), this.domElement.addEventListener("touchend", this._onPointerUp, !0), this.domElement.addEventListener("touchmove", this._onPointerMove, !0))), this.domElement.addEventListener("wheel", this.onWheel, {
1670
1686
  passive: !0,
@@ -1675,7 +1691,7 @@ const ge = 1, ye = {
1675
1691
  _removeEvents() {
1676
1692
  if (!this._eventsAdded || !this.domElement)
1677
1693
  return;
1678
- y.removeTickerListener();
1694
+ _.removeTickerListener();
1679
1695
  const e = this.domElement.style;
1680
1696
  e && (globalThis.navigator.msPointerEnabled ? (e.msContentZooming = "", e.msTouchAction = "") : this.supportsPointerEvents && (e.touchAction = "")), this.supportsPointerEvents ? (globalThis.document.removeEventListener("pointermove", this._onPointerMove, !0), this.domElement.removeEventListener("pointerdown", this._onPointerDown, !0), this.domElement.removeEventListener("pointerleave", this._onPointerOverOut, !0), this.domElement.removeEventListener("pointerover", this._onPointerOverOut, !0), globalThis.removeEventListener("pointerup", this._onPointerUp, !0)) : (globalThis.document.removeEventListener("mousemove", this._onPointerMove, !0), this.domElement.removeEventListener("mousedown", this._onPointerDown, !0), this.domElement.removeEventListener("mouseout", this._onPointerOverOut, !0), this.domElement.removeEventListener("mouseover", this._onPointerOverOut, !0), globalThis.removeEventListener("mouseup", this._onPointerUp, !0), this.supportsTouchEvents && (this.domElement.removeEventListener("touchstart", this._onPointerDown, !0), this.domElement.removeEventListener("touchend", this._onPointerUp, !0), this.domElement.removeEventListener("touchmove", this._onPointerMove, !0))), this.domElement.removeEventListener("wheel", this.onWheel, !0), this.domElement = null, this._eventsAdded = !1;
1681
1697
  }
@@ -1768,7 +1784,7 @@ const ge = 1, ye = {
1768
1784
  e.isTrusted = t.isTrusted, e.srcElement = t.srcElement, e.timeStamp = performance.now(), e.type = t.type, e.altKey = t.altKey, e.button = t.button, e.buttons = t.buttons, e.client.x = t.clientX, e.client.y = t.clientY, e.ctrlKey = t.ctrlKey, e.metaKey = t.metaKey, e.movement.x = t.movementX, e.movement.y = t.movementY, e.page.x = t.pageX, e.page.y = t.pageY, e.relatedTarget = null, e.shiftKey = t.shiftKey;
1769
1785
  }
1770
1786
  };
1771
- B.extension = {
1787
+ S.extension = {
1772
1788
  name: "events",
1773
1789
  type: [
1774
1790
  b.WebGLSystem,
@@ -1777,7 +1793,7 @@ B.extension = {
1777
1793
  ],
1778
1794
  priority: -1
1779
1795
  };
1780
- B.defaultEventFeatures = {
1796
+ S.defaultEventFeatures = {
1781
1797
  /** Enables pointer events associated with pointer movement. */
1782
1798
  move: !0,
1783
1799
  /** Enables global pointer move events. */
@@ -1787,7 +1803,7 @@ B.defaultEventFeatures = {
1787
1803
  /** Enables wheel events. */
1788
1804
  wheel: !0
1789
1805
  };
1790
- let ee = B;
1806
+ let ee = S;
1791
1807
  const be = {
1792
1808
  onclick: null,
1793
1809
  onmousedown: null,
@@ -1853,7 +1869,7 @@ const be = {
1853
1869
  a = i ? `${a}capture` : a, e = typeof e == "function" ? e : e.handleEvent, this.off(a, e, n);
1854
1870
  },
1855
1871
  dispatchEvent(a) {
1856
- if (!(a instanceof M))
1872
+ if (!(a instanceof O))
1857
1873
  throw new Error("Container cannot propagate events outside of the Federated Events API");
1858
1874
  return a.defaultPrevented = !1, a.path = null, a.target = this, a.manager.dispatchEvent(a), !a.defaultPrevented;
1859
1875
  }
@@ -1863,4 +1879,4 @@ w.mixin(V, pe);
1863
1879
  w.add(ee);
1864
1880
  w.mixin(V, be);
1865
1881
  w.add(Q);
1866
- //# sourceMappingURL=browserAll-qgahyZIY.js.map
1882
+ //# sourceMappingURL=browserAll-BuBdO9TO.js.map