@appsurify-testmap/rrweb-record 2.0.0-alpha.35 → 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.
@@ -513,7 +513,7 @@ function getXPath(node2) {
513
513
  return "/html/body";
514
514
  }
515
515
  const parentNode2 = element.parentNode;
516
- if (!parentNode2 || !(parentNode2 instanceof Element)) {
516
+ if (!parentNode2) {
517
517
  return "";
518
518
  }
519
519
  const siblings = Array.from(parentNode2.children).filter(
@@ -575,14 +575,19 @@ function isTextVisible(n2) {
575
575
  return textContent2 !== "";
576
576
  }
577
577
  function isElementVisible(n2) {
578
- return isStyleVisible(n2) && isRectVisible(n2.getBoundingClientRect());
579
- }
580
- function isStyleVisible(n2) {
581
- const style = window.getComputedStyle(n2);
582
- return style.display !== "none" && style.visibility !== "hidden" && parseFloat(style.opacity) !== 0;
583
- }
584
- function isRectVisible(rect) {
585
- return rect.width > 0 && rect.height > 0 && rect.top >= 0 && rect.left >= 0 && rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) && rect.right <= (window.innerWidth || document.documentElement.clientWidth);
578
+ var _a2;
579
+ const win = ((_a2 = n2.ownerDocument) == null ? void 0 : _a2.defaultView) ?? null;
580
+ const style = win ? win.getComputedStyle(n2) : null;
581
+ const isStyleVisible = style != null && style.display !== "none" && style.visibility !== "hidden" && parseFloat(style.opacity) !== 0;
582
+ const rect = n2.getBoundingClientRect();
583
+ const result2 = isStyleVisible && isRectVisible(rect, win);
584
+ return result2;
585
+ }
586
+ function isRectVisible(rect, win) {
587
+ var _a2, _b, _c, _d;
588
+ const height = (win == null ? void 0 : win.innerHeight) ?? ((_b = (_a2 = win == null ? void 0 : win.document) == null ? void 0 : _a2.documentElement) == null ? void 0 : _b.clientHeight) ?? 0;
589
+ const width = (win == null ? void 0 : win.innerWidth) ?? ((_d = (_c = win == null ? void 0 : win.document) == null ? void 0 : _c.documentElement) == null ? void 0 : _d.clientWidth) ?? 0;
590
+ return rect.width > 0 && rect.height > 0 && rect.top >= 0 && rect.left >= 0 && rect.bottom <= height && rect.right <= width;
586
591
  }
587
592
  const interactiveEvents$1 = [
588
593
  "change",
@@ -622,7 +627,7 @@ const interactiveTags = [
622
627
  "video",
623
628
  "audio"
624
629
  ];
625
- const inlineEventAttributes$1 = [
630
+ const inlineEventAttributes = [
626
631
  "onclick",
627
632
  "ondblclick",
628
633
  "onmousedown",
@@ -647,25 +652,31 @@ const inlineEventAttributes$1 = [
647
652
  "ontouchcancel"
648
653
  ];
649
654
  const interactiveElementsRegistry$1 = /* @__PURE__ */ new WeakSet();
650
- const originalAddEventListener$1 = EventTarget.prototype.addEventListener;
651
- EventTarget.prototype.addEventListener = function(type, listener, options) {
652
- originalAddEventListener$1.call(this, type, listener, options);
653
- if (this instanceof Element) {
654
- const eventType = type.toLowerCase();
655
- if (interactiveEvents$1.includes(eventType)) {
656
- interactiveElementsRegistry$1.add(this);
655
+ if (typeof Element !== "undefined" && typeof EventTarget !== "undefined") {
656
+ const originalAddEventListener = EventTarget.prototype.addEventListener;
657
+ EventTarget.prototype.addEventListener = function(type, listener, options) {
658
+ originalAddEventListener.call(this, type, listener, options);
659
+ if (this instanceof Element) {
660
+ const eventType = type.toLowerCase();
661
+ if (interactiveEvents$1.includes(eventType)) {
662
+ interactiveElementsRegistry$1.add(this);
663
+ }
657
664
  }
658
- }
659
- };
660
- const originalRemoveEventListener$1 = EventTarget.prototype.removeEventListener;
661
- EventTarget.prototype.removeEventListener = function(type, listener, options) {
662
- originalRemoveEventListener$1.call(this, type, listener, options);
663
- };
665
+ };
666
+ }
667
+ if (typeof Element !== "undefined" && typeof EventTarget !== "undefined") {
668
+ const originalRemoveEventListener = EventTarget.prototype.removeEventListener;
669
+ EventTarget.prototype.removeEventListener = function(type, listener, options) {
670
+ originalRemoveEventListener.call(this, type, listener, options);
671
+ if (this instanceof Element) {
672
+ type.toLowerCase();
673
+ }
674
+ };
675
+ }
664
676
  function hasEventListeners(n2) {
665
677
  return n2 instanceof Element && interactiveElementsRegistry$1.has(n2);
666
678
  }
667
679
  function isElementInteractive(n2) {
668
- var _a2;
669
680
  if (n2.nodeType === Node.ELEMENT_NODE) {
670
681
  const element = n2;
671
682
  const tagName = element.tagName.toLowerCase();
@@ -679,30 +690,35 @@ function isElementInteractive(n2) {
679
690
  const result2 = hasEventListeners(element) || hasTabIndex || hasRoleInteractive || element instanceof HTMLAnchorElement && element.hasAttribute("href") || element instanceof HTMLButtonElement && !element.disabled;
680
691
  return result2;
681
692
  }
682
- if (n2.nodeType === Node.TEXT_NODE) {
683
- const textNode = n2;
684
- const parentElement2 = textNode.parentElement;
685
- if (parentElement2 !== null && interactiveTags.includes(parentElement2.tagName.toLowerCase())) {
686
- return true;
687
- }
688
- return parentElement2 !== null && isElementVisible(parentElement2) && ((_a2 = textNode.textContent) == null ? void 0 : _a2.trim().length) !== 0 && isElementInteractive(parentElement2);
689
- }
690
693
  return false;
691
694
  }
692
- function inspectInlineEventHandlers$1() {
693
- const allElements = document.querySelectorAll("*");
695
+ function inspectInlineEventHandlers(doc) {
696
+ if (!doc || typeof doc.querySelectorAll !== "function") return;
697
+ const allElements = doc.querySelectorAll("*");
694
698
  allElements.forEach((el) => {
695
- inlineEventAttributes$1.forEach((attr) => {
699
+ inlineEventAttributes.forEach((attr) => {
696
700
  if (el.hasAttribute(attr)) {
697
701
  interactiveElementsRegistry$1.add(el);
698
702
  }
699
703
  });
700
704
  });
701
705
  }
702
- if (document.readyState === "complete" || document.readyState === "interactive") {
703
- inspectInlineEventHandlers$1();
704
- } else {
705
- document.addEventListener("DOMContentLoaded", inspectInlineEventHandlers$1);
706
+ function scheduleInlineEventInspection(doc) {
707
+ if (!doc || typeof doc.addEventListener !== "function" || typeof doc.querySelectorAll !== "function") {
708
+ return;
709
+ }
710
+ try {
711
+ if (doc.readyState === "complete" || doc.readyState === "interactive") {
712
+ inspectInlineEventHandlers(doc);
713
+ } else {
714
+ doc.addEventListener("DOMContentLoaded", () => inspectInlineEventHandlers(doc), {
715
+ once: true,
716
+ capture: false
717
+ });
718
+ }
719
+ } catch (e2) {
720
+ console.warn("[inlineEventInspection] Failed to inspect document:", e2);
721
+ }
706
722
  }
707
723
  let _id = 1;
708
724
  const tagNameRegex = new RegExp("[^a-z0-9-_:]");
@@ -821,9 +837,29 @@ function transformAttribute(doc, tagName, name, value) {
821
837
  }
822
838
  return value;
823
839
  }
824
- function ignoreAttribute(tagName, name, _value) {
840
+ function isIgnoreAttribute(tagName, name, _value) {
825
841
  return (tagName === "video" || tagName === "audio") && name === "autoplay";
826
842
  }
843
+ function cleanAttributes(doc, element, ignoreAttribute) {
844
+ const tagName = getValidTagName$1(element);
845
+ const attributes = {};
846
+ const len = element.attributes.length;
847
+ for (let i2 = 0; i2 < len; i2++) {
848
+ const attr = element.attributes[i2];
849
+ const name = attr.name;
850
+ const value = attr.value;
851
+ const shouldIgnoreByName = typeof ignoreAttribute === "string" ? name === ignoreAttribute : ignoreAttribute.test(name);
852
+ if (!shouldIgnoreByName && !isIgnoreAttribute(tagName, name)) {
853
+ attributes[name] = transformAttribute(
854
+ doc,
855
+ tagName,
856
+ toLowerCase(name),
857
+ value
858
+ );
859
+ }
860
+ }
861
+ return attributes;
862
+ }
827
863
  function _isBlockedElement(element, blockClass, blockSelector) {
828
864
  try {
829
865
  if (typeof blockClass === "string") {
@@ -953,6 +989,7 @@ function serializeNode(n2, options) {
953
989
  mirror: mirror2,
954
990
  blockClass,
955
991
  blockSelector,
992
+ ignoreAttribute,
956
993
  needsMask,
957
994
  inlineStylesheet,
958
995
  maskInputOptions = {},
@@ -997,6 +1034,7 @@ function serializeNode(n2, options) {
997
1034
  doc,
998
1035
  blockClass,
999
1036
  blockSelector,
1037
+ ignoreAttribute,
1000
1038
  inlineStylesheet,
1001
1039
  maskInputOptions,
1002
1040
  maskInputFn,
@@ -1074,6 +1112,7 @@ function serializeElementNode(n2, options) {
1074
1112
  doc,
1075
1113
  blockClass,
1076
1114
  blockSelector,
1115
+ ignoreAttribute,
1077
1116
  inlineStylesheet,
1078
1117
  maskInputOptions = {},
1079
1118
  maskInputFn,
@@ -1087,19 +1126,7 @@ function serializeElementNode(n2, options) {
1087
1126
  } = options;
1088
1127
  const needBlock = _isBlockedElement(n2, blockClass, blockSelector);
1089
1128
  const tagName = getValidTagName$1(n2);
1090
- let attributes = {};
1091
- const len = n2.attributes.length;
1092
- for (let i2 = 0; i2 < len; i2++) {
1093
- const attr = n2.attributes[i2];
1094
- if (!ignoreAttribute(tagName, attr.name, attr.value)) {
1095
- attributes[attr.name] = transformAttribute(
1096
- doc,
1097
- tagName,
1098
- toLowerCase(attr.name),
1099
- attr.value
1100
- );
1101
- }
1102
- }
1129
+ let attributes = cleanAttributes(doc, n2, ignoreAttribute);
1103
1130
  if (tagName === "link" && inlineStylesheet) {
1104
1131
  const stylesheet = Array.from(doc.styleSheets).find((s2) => {
1105
1132
  return s2.href === n2.href;
@@ -1313,6 +1340,7 @@ function serializeNodeWithId(n2, options) {
1313
1340
  blockSelector,
1314
1341
  maskTextClass,
1315
1342
  maskTextSelector,
1343
+ ignoreAttribute,
1316
1344
  skipChild = false,
1317
1345
  inlineStylesheet = true,
1318
1346
  maskInputOptions = {},
@@ -1347,6 +1375,7 @@ function serializeNodeWithId(n2, options) {
1347
1375
  mirror: mirror2,
1348
1376
  blockClass,
1349
1377
  blockSelector,
1378
+ ignoreAttribute,
1350
1379
  needsMask,
1351
1380
  inlineStylesheet,
1352
1381
  maskInputOptions,
@@ -1399,6 +1428,7 @@ function serializeNodeWithId(n2, options) {
1399
1428
  needsMask,
1400
1429
  maskTextClass,
1401
1430
  maskTextSelector,
1431
+ ignoreAttribute,
1402
1432
  skipChild,
1403
1433
  inlineStylesheet,
1404
1434
  maskInputOptions,
@@ -1458,6 +1488,7 @@ function serializeNodeWithId(n2, options) {
1458
1488
  needsMask,
1459
1489
  maskTextClass,
1460
1490
  maskTextSelector,
1491
+ ignoreAttribute,
1461
1492
  skipChild: false,
1462
1493
  inlineStylesheet,
1463
1494
  maskInputOptions,
@@ -1499,6 +1530,7 @@ function serializeNodeWithId(n2, options) {
1499
1530
  needsMask,
1500
1531
  maskTextClass,
1501
1532
  maskTextSelector,
1533
+ ignoreAttribute,
1502
1534
  skipChild: false,
1503
1535
  inlineStylesheet,
1504
1536
  maskInputOptions,
@@ -1536,6 +1568,7 @@ function snapshot(n2, options) {
1536
1568
  blockSelector = null,
1537
1569
  maskTextClass = "rr-mask",
1538
1570
  maskTextSelector = null,
1571
+ ignoreAttribute = "rr-ignore-attr",
1539
1572
  inlineStylesheet = true,
1540
1573
  inlineImages = false,
1541
1574
  recordCanvas = false,
@@ -1552,6 +1585,7 @@ function snapshot(n2, options) {
1552
1585
  stylesheetLoadTimeout,
1553
1586
  keepIframeSrcFn = () => false
1554
1587
  } = options || {};
1588
+ scheduleInlineEventInspection(n2);
1555
1589
  const maskInputOptions = maskAllInputs === true ? {
1556
1590
  color: true,
1557
1591
  date: true,
@@ -1595,6 +1629,7 @@ function snapshot(n2, options) {
1595
1629
  blockSelector,
1596
1630
  maskTextClass,
1597
1631
  maskTextSelector,
1632
+ ignoreAttribute,
1598
1633
  skipChild: false,
1599
1634
  inlineStylesheet,
1600
1635
  maskInputOptions,
@@ -5191,59 +5226,27 @@ const interactiveEvents = [
5191
5226
  "touchend",
5192
5227
  "touchcancel"
5193
5228
  ];
5194
- const inlineEventAttributes = [
5195
- "onclick",
5196
- "ondblclick",
5197
- "onmousedown",
5198
- "onmouseup",
5199
- "onmouseover",
5200
- "onmouseout",
5201
- "onmousemove",
5202
- "onfocus",
5203
- "onblur",
5204
- "onkeydown",
5205
- "onkeypress",
5206
- "onkeyup",
5207
- "onchange",
5208
- "oninput",
5209
- "onsubmit",
5210
- "onreset",
5211
- "onselect",
5212
- "oncontextmenu",
5213
- "ontouchstart",
5214
- "ontouchmove",
5215
- "ontouchend",
5216
- "ontouchcancel"
5217
- ];
5218
5229
  const interactiveElementsRegistry = /* @__PURE__ */ new WeakSet();
5219
- const originalAddEventListener = EventTarget.prototype.addEventListener;
5220
- EventTarget.prototype.addEventListener = function(type, listener, options) {
5221
- originalAddEventListener.call(this, type, listener, options);
5222
- if (this instanceof Element) {
5223
- const eventType = type.toLowerCase();
5224
- if (interactiveEvents.includes(eventType)) {
5225
- interactiveElementsRegistry.add(this);
5226
- }
5227
- }
5228
- };
5229
- const originalRemoveEventListener = EventTarget.prototype.removeEventListener;
5230
- EventTarget.prototype.removeEventListener = function(type, listener, options) {
5231
- originalRemoveEventListener.call(this, type, listener, options);
5232
- };
5233
- function inspectInlineEventHandlers() {
5234
- const allElements = document.querySelectorAll("*");
5235
- allElements.forEach((el) => {
5236
- inlineEventAttributes.forEach((attr) => {
5237
- if (el.hasAttribute(attr)) {
5238
- interactiveElementsRegistry.add(el);
5230
+ if (typeof Element !== "undefined" && typeof EventTarget !== "undefined") {
5231
+ const originalAddEventListener = EventTarget.prototype.addEventListener;
5232
+ EventTarget.prototype.addEventListener = function(type, listener, options) {
5233
+ originalAddEventListener.call(this, type, listener, options);
5234
+ if (this instanceof Element) {
5235
+ const eventType = type.toLowerCase();
5236
+ if (interactiveEvents.includes(eventType)) {
5237
+ interactiveElementsRegistry.add(this);
5239
5238
  }
5240
- });
5241
- });
5239
+ }
5240
+ };
5242
5241
  }
5243
- if (document.readyState === "complete" || document.readyState === "interactive") {
5244
- inspectInlineEventHandlers();
5245
- } else {
5246
- document.addEventListener("DOMContentLoaded", inspectInlineEventHandlers);
5242
+ if (typeof Element !== "undefined" && typeof EventTarget !== "undefined") {
5243
+ const originalRemoveEventListener = EventTarget.prototype.removeEventListener;
5244
+ EventTarget.prototype.removeEventListener = function(type, listener, options) {
5245
+ originalRemoveEventListener.call(this, type, listener, options);
5246
+ if (this instanceof Element) {
5247
+ type.toLowerCase();
5248
+ }
5249
+ };
5247
5250
  }
5248
5251
  function getDefaultExportFromCjs(x2) {
5249
5252
  return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
@@ -9104,7 +9107,7 @@ let nowTimestamp = Date.now;
9104
9107
  if (!/* @__PURE__ */ /[1-9][0-9]{12}/.test(Date.now().toString())) {
9105
9108
  nowTimestamp = () => (/* @__PURE__ */ new Date()).getTime();
9106
9109
  }
9107
- function getWindowScroll(win) {
9110
+ function getWindowScroll(win = window) {
9108
9111
  var _a2, _b, _c, _d;
9109
9112
  const doc = win.document;
9110
9113
  return {
@@ -9112,11 +9115,13 @@ function getWindowScroll(win) {
9112
9115
  top: doc.scrollingElement ? doc.scrollingElement.scrollTop : win.pageYOffset !== void 0 ? win.pageYOffset : (doc == null ? void 0 : doc.documentElement.scrollTop) || (doc == null ? void 0 : doc.body) && ((_c = index.parentElement(doc.body)) == null ? void 0 : _c.scrollTop) || ((_d = doc == null ? void 0 : doc.body) == null ? void 0 : _d.scrollTop) || 0
9113
9116
  };
9114
9117
  }
9115
- function getWindowHeight() {
9116
- return window.innerHeight || document.documentElement && document.documentElement.clientHeight || document.body && document.body.clientHeight;
9118
+ function getWindowHeight(win = window) {
9119
+ const doc = win.document;
9120
+ return win.innerHeight || doc.documentElement && doc.documentElement.clientHeight || doc.body && doc.body.clientHeight || 0;
9117
9121
  }
9118
- function getWindowWidth() {
9119
- return window.innerWidth || document.documentElement && document.documentElement.clientWidth || document.body && document.body.clientWidth;
9122
+ function getWindowWidth(win = window) {
9123
+ const doc = win.document;
9124
+ return win.innerWidth || doc.documentElement && doc.documentElement.clientWidth || doc.body && doc.body.clientWidth || 0;
9120
9125
  }
9121
9126
  function closestElementOfNode(node2) {
9122
9127
  if (!node2) {
@@ -9435,6 +9440,7 @@ class MutationBuffer {
9435
9440
  __publicField(this, "blockSelector");
9436
9441
  __publicField(this, "maskTextClass");
9437
9442
  __publicField(this, "maskTextSelector");
9443
+ __publicField(this, "ignoreAttribute");
9438
9444
  __publicField(this, "inlineStylesheet");
9439
9445
  __publicField(this, "maskInputOptions");
9440
9446
  __publicField(this, "maskTextFn");
@@ -9498,6 +9504,7 @@ class MutationBuffer {
9498
9504
  blockSelector: this.blockSelector,
9499
9505
  maskTextClass: this.maskTextClass,
9500
9506
  maskTextSelector: this.maskTextSelector,
9507
+ ignoreAttribute: this.ignoreAttribute || "",
9501
9508
  skipChild: true,
9502
9509
  newlyAddedElement: true,
9503
9510
  inlineStylesheet: this.inlineStylesheet,
@@ -9726,7 +9733,7 @@ class MutationBuffer {
9726
9733
  if (attributeName === "type" && target.tagName === "INPUT" && (m.oldValue || "").toLowerCase() === "password") {
9727
9734
  target.setAttribute("data-rr-is-password", "true");
9728
9735
  }
9729
- if (!ignoreAttribute(target.tagName, attributeName)) {
9736
+ if (!isIgnoreAttribute(target.tagName, attributeName)) {
9730
9737
  item.attributes[attributeName] = transformAttribute(
9731
9738
  this.doc,
9732
9739
  toLowerCase(target.tagName),
@@ -9845,6 +9852,7 @@ class MutationBuffer {
9845
9852
  "blockSelector",
9846
9853
  "maskTextClass",
9847
9854
  "maskTextSelector",
9855
+ "ignoreAttribute",
9848
9856
  "inlineStylesheet",
9849
9857
  "maskInputOptions",
9850
9858
  "maskTextFn",
@@ -12074,6 +12082,7 @@ function record(options = {}) {
12074
12082
  blockSelector = null,
12075
12083
  ignoreClass = "rr-ignore",
12076
12084
  ignoreSelector = null,
12085
+ ignoreAttribute = "rr-ignore-attribute",
12077
12086
  maskTextClass = "rr-mask",
12078
12087
  maskTextSelector = null,
12079
12088
  inlineStylesheet = true,
@@ -12269,7 +12278,7 @@ function record(options = {}) {
12269
12278
  canvasManager = new CanvasManager({
12270
12279
  recordCanvas,
12271
12280
  mutationCb: wrappedCanvasMutationEmit,
12272
- win: window,
12281
+ win,
12273
12282
  blockClass,
12274
12283
  blockSelector,
12275
12284
  mirror,
@@ -12284,6 +12293,7 @@ function record(options = {}) {
12284
12293
  blockSelector,
12285
12294
  maskTextClass,
12286
12295
  maskTextSelector,
12296
+ ignoreAttribute,
12287
12297
  inlineStylesheet,
12288
12298
  maskInputOptions,
12289
12299
  dataURLOptions,
@@ -12310,8 +12320,8 @@ function record(options = {}) {
12310
12320
  type: EventType.Meta,
12311
12321
  data: {
12312
12322
  href: win.location.href,
12313
- width: getWindowWidth(),
12314
- height: getWindowHeight()
12323
+ width: getWindowWidth(win),
12324
+ height: getWindowHeight(win)
12315
12325
  }
12316
12326
  },
12317
12327
  isCheckout
@@ -12319,7 +12329,7 @@ function record(options = {}) {
12319
12329
  stylesheetManager.reset();
12320
12330
  shadowDomManager.init();
12321
12331
  mutationBuffers.forEach((buf) => buf.lock());
12322
- const node2 = snapshot(document, {
12332
+ const node2 = snapshot(doc, {
12323
12333
  mirror,
12324
12334
  blockClass,
12325
12335
  blockSelector,
@@ -12341,7 +12351,7 @@ function record(options = {}) {
12341
12351
  stylesheetManager.trackLinkElement(n2);
12342
12352
  }
12343
12353
  if (hasShadowRoot(n2)) {
12344
- shadowDomManager.addShadowRoot(index.shadowRoot(n2), document);
12354
+ shadowDomManager.addShadowRoot(index.shadowRoot(n2), doc);
12345
12355
  }
12346
12356
  },
12347
12357
  onIframeLoad: (iframe, childSn) => {
@@ -12361,7 +12371,7 @@ function record(options = {}) {
12361
12371
  type: EventType.FullSnapshot,
12362
12372
  data: {
12363
12373
  node: node2,
12364
- initialOffset: getWindowScroll(window)
12374
+ initialOffset: getWindowScroll(win)
12365
12375
  }
12366
12376
  },
12367
12377
  isCheckout
@@ -12470,6 +12480,7 @@ function record(options = {}) {
12470
12480
  ignoreSelector,
12471
12481
  maskTextClass,
12472
12482
  maskTextSelector,
12483
+ ignoreAttribute,
12473
12484
  maskInputOptions,
12474
12485
  inlineStylesheet,
12475
12486
  sampling,
@@ -12516,7 +12527,7 @@ function record(options = {}) {
12516
12527
  });
12517
12528
  const init = () => {
12518
12529
  takeFullSnapshot$1();
12519
- handlers.push(observe(document));
12530
+ handlers.push(observe(doc));
12520
12531
  recording = true;
12521
12532
  };
12522
12533
  if (doc.readyState === "interactive" || doc.readyState === "complete") {
@@ -12541,7 +12552,7 @@ function record(options = {}) {
12541
12552
  });
12542
12553
  if (recordAfter === "load") init();
12543
12554
  },
12544
- window
12555
+ win
12545
12556
  )
12546
12557
  );
12547
12558
  }