@appsurify-testmap/rrweb-player 2.0.0-alpha.40 → 2.0.0-alpha.41

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.
@@ -516,20 +516,27 @@ const interactiveEvents$1 = [
516
516
  "touchcancel"
517
517
  ];
518
518
  const interactiveElementsRegistry$1 = /* @__PURE__ */ new WeakSet();
519
- const originalAddEventListener$1 = EventTarget.prototype.addEventListener;
520
- EventTarget.prototype.addEventListener = function(type, listener, options) {
521
- originalAddEventListener$1.call(this, type, listener, options);
522
- if (this instanceof Element) {
523
- const eventType = type.toLowerCase();
524
- if (interactiveEvents$1.includes(eventType)) {
525
- interactiveElementsRegistry$1.add(this);
519
+ if (typeof Element !== "undefined" && typeof EventTarget !== "undefined") {
520
+ const originalAddEventListener = EventTarget.prototype.addEventListener;
521
+ EventTarget.prototype.addEventListener = function(type, listener, options) {
522
+ originalAddEventListener.call(this, type, listener, options);
523
+ if (this instanceof Element) {
524
+ const eventType = type.toLowerCase();
525
+ if (interactiveEvents$1.includes(eventType)) {
526
+ interactiveElementsRegistry$1.add(this);
527
+ }
526
528
  }
527
- }
528
- };
529
- const originalRemoveEventListener$1 = EventTarget.prototype.removeEventListener;
530
- EventTarget.prototype.removeEventListener = function(type, listener, options) {
531
- originalRemoveEventListener$1.call(this, type, listener, options);
532
- };
529
+ };
530
+ }
531
+ if (typeof Element !== "undefined" && typeof EventTarget !== "undefined") {
532
+ const originalRemoveEventListener = EventTarget.prototype.removeEventListener;
533
+ EventTarget.prototype.removeEventListener = function(type, listener, options) {
534
+ originalRemoveEventListener.call(this, type, listener, options);
535
+ if (this instanceof Element) {
536
+ type.toLowerCase();
537
+ }
538
+ };
539
+ }
533
540
  const MEDIA_SELECTOR = /(max|min)-device-(width|height)/;
534
541
  const MEDIA_SELECTOR_GLOBAL = new RegExp(MEDIA_SELECTOR.source, "g");
535
542
  const mediaSelectorPlugin = {
@@ -4587,20 +4594,27 @@ const interactiveEvents = [
4587
4594
  "touchcancel"
4588
4595
  ];
4589
4596
  const interactiveElementsRegistry = /* @__PURE__ */ new WeakSet();
4590
- const originalAddEventListener = EventTarget.prototype.addEventListener;
4591
- EventTarget.prototype.addEventListener = function(type, listener, options) {
4592
- originalAddEventListener.call(this, type, listener, options);
4593
- if (this instanceof Element) {
4594
- const eventType = type.toLowerCase();
4595
- if (interactiveEvents.includes(eventType)) {
4596
- interactiveElementsRegistry.add(this);
4597
+ if (typeof Element !== "undefined" && typeof EventTarget !== "undefined") {
4598
+ const originalAddEventListener = EventTarget.prototype.addEventListener;
4599
+ EventTarget.prototype.addEventListener = function(type, listener, options) {
4600
+ originalAddEventListener.call(this, type, listener, options);
4601
+ if (this instanceof Element) {
4602
+ const eventType = type.toLowerCase();
4603
+ if (interactiveEvents.includes(eventType)) {
4604
+ interactiveElementsRegistry.add(this);
4605
+ }
4597
4606
  }
4598
- }
4599
- };
4600
- const originalRemoveEventListener = EventTarget.prototype.removeEventListener;
4601
- EventTarget.prototype.removeEventListener = function(type, listener, options) {
4602
- originalRemoveEventListener.call(this, type, listener, options);
4603
- };
4607
+ };
4608
+ }
4609
+ if (typeof Element !== "undefined" && typeof EventTarget !== "undefined") {
4610
+ const originalRemoveEventListener = EventTarget.prototype.removeEventListener;
4611
+ EventTarget.prototype.removeEventListener = function(type, listener, options) {
4612
+ originalRemoveEventListener.call(this, type, listener, options);
4613
+ if (this instanceof Element) {
4614
+ type.toLowerCase();
4615
+ }
4616
+ };
4617
+ }
4604
4618
  function getDefaultExportFromCjs(x2) {
4605
4619
  return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
4606
4620
  }