@appsurify-testmap/rrweb-player 2.0.0-alpha.25 → 2.0.0-alpha.31

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.
@@ -520,6 +520,86 @@ function isNodeMetaEqual(a2, b) {
520
520
  function isElement(n2) {
521
521
  return n2.nodeType === n2.ELEMENT_NODE;
522
522
  }
523
+ const interactiveEvents$1 = [
524
+ "change",
525
+ "submit",
526
+ "dragstart",
527
+ "drop",
528
+ "pointerdown",
529
+ "pointerup",
530
+ "input",
531
+ "keydown",
532
+ "keyup",
533
+ "keypress",
534
+ "mouseenter",
535
+ "mouseleave",
536
+ "mouseup",
537
+ "mousedown",
538
+ "click",
539
+ "contextmenu",
540
+ "dblclick",
541
+ "focus",
542
+ "blur",
543
+ "touchstart",
544
+ "touchmove",
545
+ "touchend",
546
+ "touchcancel"
547
+ ];
548
+ const inlineEventAttributes$1 = [
549
+ "onclick",
550
+ "ondblclick",
551
+ "onmousedown",
552
+ "onmouseup",
553
+ "onmouseover",
554
+ "onmouseout",
555
+ "onmousemove",
556
+ "onfocus",
557
+ "onblur",
558
+ "onkeydown",
559
+ "onkeypress",
560
+ "onkeyup",
561
+ "onchange",
562
+ "oninput",
563
+ "onsubmit",
564
+ "onreset",
565
+ "onselect",
566
+ "oncontextmenu",
567
+ "ontouchstart",
568
+ "ontouchmove",
569
+ "ontouchend",
570
+ "ontouchcancel"
571
+ ];
572
+ const interactiveElementsRegistry$1 = /* @__PURE__ */ new WeakSet();
573
+ const originalAddEventListener$1 = EventTarget.prototype.addEventListener;
574
+ EventTarget.prototype.addEventListener = function(type, listener, options) {
575
+ originalAddEventListener$1.call(this, type, listener, options);
576
+ if (this instanceof Element) {
577
+ const eventType = type.toLowerCase();
578
+ console.info("Event type: ", eventType);
579
+ if (interactiveEvents$1.includes(eventType)) {
580
+ interactiveElementsRegistry$1.add(this);
581
+ }
582
+ }
583
+ };
584
+ const originalRemoveEventListener$1 = EventTarget.prototype.removeEventListener;
585
+ EventTarget.prototype.removeEventListener = function(type, listener, options) {
586
+ originalRemoveEventListener$1.call(this, type, listener, options);
587
+ };
588
+ function inspectInlineEventHandlers$1() {
589
+ const allElements = document.querySelectorAll("*");
590
+ allElements.forEach((el) => {
591
+ inlineEventAttributes$1.forEach((attr2) => {
592
+ if (el.hasAttribute(attr2)) {
593
+ interactiveElementsRegistry$1.add(el);
594
+ }
595
+ });
596
+ });
597
+ }
598
+ if (document.readyState === "complete" || document.readyState === "interactive") {
599
+ inspectInlineEventHandlers$1();
600
+ } else {
601
+ document.addEventListener("DOMContentLoaded", inspectInlineEventHandlers$1);
602
+ }
523
603
  const MEDIA_SELECTOR = /(max|min)-device-(width|height)/;
524
604
  const MEDIA_SELECTOR_GLOBAL = new RegExp(MEDIA_SELECTOR.source, "g");
525
605
  const mediaSelectorPlugin = {
@@ -4555,6 +4635,86 @@ let Mirror$1 = class Mirror2 {
4555
4635
  function createMirror$1() {
4556
4636
  return new Mirror$1();
4557
4637
  }
4638
+ const interactiveEvents = [
4639
+ "change",
4640
+ "submit",
4641
+ "dragstart",
4642
+ "drop",
4643
+ "pointerdown",
4644
+ "pointerup",
4645
+ "input",
4646
+ "keydown",
4647
+ "keyup",
4648
+ "keypress",
4649
+ "mouseenter",
4650
+ "mouseleave",
4651
+ "mouseup",
4652
+ "mousedown",
4653
+ "click",
4654
+ "contextmenu",
4655
+ "dblclick",
4656
+ "focus",
4657
+ "blur",
4658
+ "touchstart",
4659
+ "touchmove",
4660
+ "touchend",
4661
+ "touchcancel"
4662
+ ];
4663
+ const inlineEventAttributes = [
4664
+ "onclick",
4665
+ "ondblclick",
4666
+ "onmousedown",
4667
+ "onmouseup",
4668
+ "onmouseover",
4669
+ "onmouseout",
4670
+ "onmousemove",
4671
+ "onfocus",
4672
+ "onblur",
4673
+ "onkeydown",
4674
+ "onkeypress",
4675
+ "onkeyup",
4676
+ "onchange",
4677
+ "oninput",
4678
+ "onsubmit",
4679
+ "onreset",
4680
+ "onselect",
4681
+ "oncontextmenu",
4682
+ "ontouchstart",
4683
+ "ontouchmove",
4684
+ "ontouchend",
4685
+ "ontouchcancel"
4686
+ ];
4687
+ const interactiveElementsRegistry = /* @__PURE__ */ new WeakSet();
4688
+ const originalAddEventListener = EventTarget.prototype.addEventListener;
4689
+ EventTarget.prototype.addEventListener = function(type, listener, options) {
4690
+ originalAddEventListener.call(this, type, listener, options);
4691
+ if (this instanceof Element) {
4692
+ const eventType = type.toLowerCase();
4693
+ console.info("Event type: ", eventType);
4694
+ if (interactiveEvents.includes(eventType)) {
4695
+ interactiveElementsRegistry.add(this);
4696
+ }
4697
+ }
4698
+ };
4699
+ const originalRemoveEventListener = EventTarget.prototype.removeEventListener;
4700
+ EventTarget.prototype.removeEventListener = function(type, listener, options) {
4701
+ originalRemoveEventListener.call(this, type, listener, options);
4702
+ };
4703
+ function inspectInlineEventHandlers() {
4704
+ const allElements = document.querySelectorAll("*");
4705
+ allElements.forEach((el) => {
4706
+ inlineEventAttributes.forEach((attr2) => {
4707
+ if (el.hasAttribute(attr2)) {
4708
+ interactiveElementsRegistry.add(el);
4709
+ }
4710
+ });
4711
+ });
4712
+ }
4713
+ if (document.readyState === "complete" || document.readyState === "interactive") {
4714
+ inspectInlineEventHandlers();
4715
+ } else {
4716
+ document.addEventListener("DOMContentLoaded", inspectInlineEventHandlers);
4717
+ }
4558
4718
  function getDefaultExportFromCjs(x2) {
4559
4719
  return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
4560
4720
  }