@appsurify-testmap/rrweb-all 2.0.0-alpha.22 → 2.0.0-alpha.24
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.
- package/dist/rrweb-all.cjs +284 -77
- package/dist/rrweb-all.cjs.map +1 -1
- package/dist/rrweb-all.js +284 -77
- package/dist/rrweb-all.js.map +1 -1
- package/dist/rrweb-all.umd.cjs +283 -77
- package/dist/rrweb-all.umd.cjs.map +2 -2
- package/dist/rrweb-all.umd.min.cjs +28 -28
- package/dist/rrweb-all.umd.min.cjs.map +3 -3
- package/package.json +4 -4
package/dist/rrweb-all.umd.cjs
CHANGED
|
@@ -51,6 +51,46 @@ var _a$1;
|
|
|
51
51
|
var __defProp$1 = Object.defineProperty;
|
|
52
52
|
var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
53
53
|
var __publicField$1 = (obj, key, value) => __defNormalProp$1(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
54
|
+
var InteractiveEvent = /* @__PURE__ */ ((InteractiveEvent2) => {
|
|
55
|
+
InteractiveEvent2[InteractiveEvent2["Change"] = 0] = "Change";
|
|
56
|
+
InteractiveEvent2[InteractiveEvent2["Submit"] = 1] = "Submit";
|
|
57
|
+
InteractiveEvent2[InteractiveEvent2["DragStart"] = 2] = "DragStart";
|
|
58
|
+
InteractiveEvent2[InteractiveEvent2["Drop"] = 3] = "Drop";
|
|
59
|
+
InteractiveEvent2[InteractiveEvent2["PointerDown"] = 4] = "PointerDown";
|
|
60
|
+
InteractiveEvent2[InteractiveEvent2["PointerUp"] = 5] = "PointerUp";
|
|
61
|
+
InteractiveEvent2[InteractiveEvent2["Input"] = 6] = "Input";
|
|
62
|
+
InteractiveEvent2[InteractiveEvent2["KeyDown"] = 7] = "KeyDown";
|
|
63
|
+
InteractiveEvent2[InteractiveEvent2["KeyUp"] = 8] = "KeyUp";
|
|
64
|
+
InteractiveEvent2[InteractiveEvent2["KeyPress"] = 9] = "KeyPress";
|
|
65
|
+
InteractiveEvent2[InteractiveEvent2["MouseEnter"] = 10] = "MouseEnter";
|
|
66
|
+
InteractiveEvent2[InteractiveEvent2["MouseLeave"] = 11] = "MouseLeave";
|
|
67
|
+
InteractiveEvent2[InteractiveEvent2["MouseUp"] = 12] = "MouseUp";
|
|
68
|
+
InteractiveEvent2[InteractiveEvent2["MouseDown"] = 13] = "MouseDown";
|
|
69
|
+
InteractiveEvent2[InteractiveEvent2["Click"] = 14] = "Click";
|
|
70
|
+
InteractiveEvent2[InteractiveEvent2["ContextMenu"] = 15] = "ContextMenu";
|
|
71
|
+
InteractiveEvent2[InteractiveEvent2["DblClick"] = 16] = "DblClick";
|
|
72
|
+
InteractiveEvent2[InteractiveEvent2["Focus"] = 17] = "Focus";
|
|
73
|
+
InteractiveEvent2[InteractiveEvent2["Blur"] = 18] = "Blur";
|
|
74
|
+
InteractiveEvent2[InteractiveEvent2["TouchStart"] = 19] = "TouchStart";
|
|
75
|
+
InteractiveEvent2[InteractiveEvent2["TouchMove"] = 20] = "TouchMove";
|
|
76
|
+
InteractiveEvent2[InteractiveEvent2["TouchEnd"] = 21] = "TouchEnd";
|
|
77
|
+
InteractiveEvent2[InteractiveEvent2["TouchCancel"] = 22] = "TouchCancel";
|
|
78
|
+
return InteractiveEvent2;
|
|
79
|
+
})(InteractiveEvent || {});
|
|
80
|
+
var interactiveTag = /* @__PURE__ */ ((interactiveTag2) => {
|
|
81
|
+
interactiveTag2[interactiveTag2["Input"] = 0] = "Input";
|
|
82
|
+
interactiveTag2[interactiveTag2["Button"] = 1] = "Button";
|
|
83
|
+
interactiveTag2[interactiveTag2["A"] = 2] = "A";
|
|
84
|
+
interactiveTag2[interactiveTag2["Select"] = 3] = "Select";
|
|
85
|
+
interactiveTag2[interactiveTag2["Textarea"] = 4] = "Textarea";
|
|
86
|
+
interactiveTag2[interactiveTag2["Label"] = 5] = "Label";
|
|
87
|
+
interactiveTag2[interactiveTag2["Details"] = 6] = "Details";
|
|
88
|
+
interactiveTag2[interactiveTag2["Summary"] = 7] = "Summary";
|
|
89
|
+
interactiveTag2[interactiveTag2["Dialog"] = 8] = "Dialog";
|
|
90
|
+
interactiveTag2[interactiveTag2["Video"] = 9] = "Video";
|
|
91
|
+
interactiveTag2[interactiveTag2["Audio"] = 10] = "Audio";
|
|
92
|
+
return interactiveTag2;
|
|
93
|
+
})(interactiveTag || {});
|
|
54
94
|
var NodeType$3 = /* @__PURE__ */ ((NodeType2) => {
|
|
55
95
|
NodeType2[NodeType2["Document"] = 0] = "Document";
|
|
56
96
|
NodeType2[NodeType2["DocumentType"] = 1] = "DocumentType";
|
|
@@ -202,53 +242,6 @@ const index$1 = {
|
|
|
202
242
|
querySelectorAll: querySelectorAll$1,
|
|
203
243
|
mutationObserver: mutationObserverCtor$1
|
|
204
244
|
};
|
|
205
|
-
function getXPath(n2) {
|
|
206
|
-
if (n2.id) {
|
|
207
|
-
return `//*[@id="${n2.id}"]`;
|
|
208
|
-
}
|
|
209
|
-
if (n2 === document.body) {
|
|
210
|
-
return "/html/body";
|
|
211
|
-
}
|
|
212
|
-
if (!n2.tagName) {
|
|
213
|
-
return "";
|
|
214
|
-
}
|
|
215
|
-
const parentNode2 = index$1.parentNode(n2);
|
|
216
|
-
if (!parentNode2 || !(parentNode2 instanceof Element)) {
|
|
217
|
-
return "";
|
|
218
|
-
}
|
|
219
|
-
const siblings = Array.from(parentNode2.children).filter(
|
|
220
|
-
(node2) => node2.tagName && node2.tagName === n2.tagName
|
|
221
|
-
);
|
|
222
|
-
const index$1$1 = siblings.length > 1 ? `[${siblings.indexOf(n2) + 1}]` : "";
|
|
223
|
-
return getXPath(parentNode2) + "/" + n2.tagName.toLowerCase() + index$1$1;
|
|
224
|
-
}
|
|
225
|
-
function isElement(n2) {
|
|
226
|
-
return n2.nodeType === n2.ELEMENT_NODE;
|
|
227
|
-
}
|
|
228
|
-
function isTextVisible(n2) {
|
|
229
|
-
var _a2;
|
|
230
|
-
const parent = index$1.parentNode(n2);
|
|
231
|
-
const parentElement2 = parent && parent;
|
|
232
|
-
if (!parentElement2) {
|
|
233
|
-
return false;
|
|
234
|
-
}
|
|
235
|
-
const isParentVisible = isElementVisible(parentElement2);
|
|
236
|
-
if (!isParentVisible) {
|
|
237
|
-
return false;
|
|
238
|
-
}
|
|
239
|
-
const textContent2 = (_a2 = n2.textContent) == null ? void 0 : _a2.trim();
|
|
240
|
-
return textContent2 !== "";
|
|
241
|
-
}
|
|
242
|
-
function isElementVisible(n2) {
|
|
243
|
-
return isStyleVisible(n2) && isRectVisible(n2.getBoundingClientRect());
|
|
244
|
-
}
|
|
245
|
-
function isStyleVisible(n2) {
|
|
246
|
-
const style = window.getComputedStyle(n2);
|
|
247
|
-
return style.display !== "none" && style.visibility !== "hidden" && parseFloat(style.opacity) !== 0;
|
|
248
|
-
}
|
|
249
|
-
function isRectVisible(rect) {
|
|
250
|
-
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);
|
|
251
|
-
}
|
|
252
245
|
function isShadowRoot(n2) {
|
|
253
246
|
const hostEl = (
|
|
254
247
|
// anchor and textarea elements also have a `host` property
|
|
@@ -597,6 +590,140 @@ function splitCssText(cssText, style) {
|
|
|
597
590
|
function markCssSplits(cssText, style) {
|
|
598
591
|
return splitCssText(cssText, style).join("/* rr_split */");
|
|
599
592
|
}
|
|
593
|
+
function getXPath(node2) {
|
|
594
|
+
if (node2.nodeType === Node.DOCUMENT_NODE) {
|
|
595
|
+
return "/";
|
|
596
|
+
}
|
|
597
|
+
if (node2.nodeType === Node.DOCUMENT_TYPE_NODE) {
|
|
598
|
+
return "/html/doctype";
|
|
599
|
+
}
|
|
600
|
+
if (node2.nodeType === Node.ELEMENT_NODE) {
|
|
601
|
+
const element = node2;
|
|
602
|
+
if (element.id) {
|
|
603
|
+
return `//*[@id="${element.id}"]`;
|
|
604
|
+
}
|
|
605
|
+
if (element.tagName && element.tagName.toLowerCase() === "html") {
|
|
606
|
+
return "/html";
|
|
607
|
+
}
|
|
608
|
+
if (element === document.head) {
|
|
609
|
+
return "/html/head";
|
|
610
|
+
}
|
|
611
|
+
if (element === document.body) {
|
|
612
|
+
return "/html/body";
|
|
613
|
+
}
|
|
614
|
+
const parentNode2 = element.parentNode;
|
|
615
|
+
if (!parentNode2 || !(parentNode2 instanceof Element)) {
|
|
616
|
+
return "";
|
|
617
|
+
}
|
|
618
|
+
const siblings = Array.from(parentNode2.children).filter(
|
|
619
|
+
(sibling) => sibling.tagName === element.tagName
|
|
620
|
+
);
|
|
621
|
+
const index2 = siblings.length > 1 ? `[${siblings.indexOf(element) + 1}]` : "";
|
|
622
|
+
return `${getXPath(parentNode2)}/${element.tagName.toLowerCase()}${index2}`;
|
|
623
|
+
}
|
|
624
|
+
if (node2.nodeType === Node.TEXT_NODE) {
|
|
625
|
+
const parent = node2.parentNode;
|
|
626
|
+
if (!parent) {
|
|
627
|
+
return "";
|
|
628
|
+
}
|
|
629
|
+
const textSiblings = Array.from(parent.childNodes).filter(
|
|
630
|
+
(sibling) => sibling.nodeType === Node.TEXT_NODE
|
|
631
|
+
);
|
|
632
|
+
const index2 = textSiblings.length > 1 ? `[${textSiblings.indexOf(node2) + 1}]` : "";
|
|
633
|
+
return `${getXPath(parent)}/text()${index2}`;
|
|
634
|
+
}
|
|
635
|
+
if (node2.nodeType === Node.CDATA_SECTION_NODE) {
|
|
636
|
+
const parent = node2.parentNode;
|
|
637
|
+
if (!parent) {
|
|
638
|
+
return "";
|
|
639
|
+
}
|
|
640
|
+
const cdataSiblings = Array.from(parent.childNodes).filter(
|
|
641
|
+
(sibling) => sibling.nodeType === Node.CDATA_SECTION_NODE
|
|
642
|
+
);
|
|
643
|
+
const index2 = cdataSiblings.length > 1 ? `[${cdataSiblings.indexOf(node2) + 1}]` : "";
|
|
644
|
+
return `${getXPath(parent)}/text()${index2}`;
|
|
645
|
+
}
|
|
646
|
+
if (node2.nodeType === Node.COMMENT_NODE) {
|
|
647
|
+
const parent = node2.parentNode;
|
|
648
|
+
if (!parent) {
|
|
649
|
+
return "";
|
|
650
|
+
}
|
|
651
|
+
const commentSiblings = Array.from(parent.childNodes).filter(
|
|
652
|
+
(sibling) => sibling.nodeType === Node.COMMENT_NODE
|
|
653
|
+
);
|
|
654
|
+
const index2 = commentSiblings.length > 1 ? `[${commentSiblings.indexOf(node2) + 1}]` : "";
|
|
655
|
+
return `${getXPath(parent)}/comment()${index2}`;
|
|
656
|
+
}
|
|
657
|
+
return "";
|
|
658
|
+
}
|
|
659
|
+
function isElement(n2) {
|
|
660
|
+
return n2.nodeType === n2.ELEMENT_NODE;
|
|
661
|
+
}
|
|
662
|
+
function isTextVisible(n2) {
|
|
663
|
+
var _a2;
|
|
664
|
+
const parent = index$1.parentNode(n2);
|
|
665
|
+
const parentElement2 = parent && parent;
|
|
666
|
+
if (!parentElement2) {
|
|
667
|
+
return false;
|
|
668
|
+
}
|
|
669
|
+
const isParentVisible = isElementVisible(parentElement2);
|
|
670
|
+
if (!isParentVisible) {
|
|
671
|
+
return false;
|
|
672
|
+
}
|
|
673
|
+
const textContent2 = (_a2 = n2.textContent) == null ? void 0 : _a2.trim();
|
|
674
|
+
return textContent2 !== "";
|
|
675
|
+
}
|
|
676
|
+
function isElementVisible(n2) {
|
|
677
|
+
return isStyleVisible(n2) && isRectVisible(n2.getBoundingClientRect());
|
|
678
|
+
}
|
|
679
|
+
function isStyleVisible(n2) {
|
|
680
|
+
const style = window.getComputedStyle(n2);
|
|
681
|
+
return style.display !== "none" && style.visibility !== "hidden" && parseFloat(style.opacity) !== 0;
|
|
682
|
+
}
|
|
683
|
+
function isRectVisible(rect) {
|
|
684
|
+
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);
|
|
685
|
+
}
|
|
686
|
+
function getInteractiveEvents() {
|
|
687
|
+
return Object.keys(InteractiveEvent).filter((key) => isNaN(Number(key))).map((key) => key.toLowerCase().replace(/_/g, "-"));
|
|
688
|
+
}
|
|
689
|
+
function getInteractiveTags() {
|
|
690
|
+
return Object.keys(interactiveTag).filter((key) => isNaN(Number(key))).map((key) => key.toLowerCase().replace(/_/g, "-"));
|
|
691
|
+
}
|
|
692
|
+
function hasEventListeners(n2) {
|
|
693
|
+
return getInteractiveEvents().some((eventType) => {
|
|
694
|
+
let hasListener = false;
|
|
695
|
+
const testListener = () => {
|
|
696
|
+
hasListener = true;
|
|
697
|
+
};
|
|
698
|
+
n2.addEventListener(eventType, testListener);
|
|
699
|
+
n2.dispatchEvent(new Event(eventType));
|
|
700
|
+
n2.removeEventListener(eventType, testListener);
|
|
701
|
+
return hasListener;
|
|
702
|
+
});
|
|
703
|
+
}
|
|
704
|
+
function isElementInteractive(n2) {
|
|
705
|
+
var _a2;
|
|
706
|
+
const allowedTags = getInteractiveTags();
|
|
707
|
+
if (n2.nodeType === Node.ELEMENT_NODE) {
|
|
708
|
+
const element = n2;
|
|
709
|
+
const tagName = element.tagName.toLowerCase();
|
|
710
|
+
if (!allowedTags.includes(tagName)) {
|
|
711
|
+
return false;
|
|
712
|
+
}
|
|
713
|
+
const hasTabIndex = element.hasAttribute("tabindex") && element.getAttribute("tabindex") !== "-1";
|
|
714
|
+
const hasRoleInteractive = ["button", "link", "checkbox", "switch", "menuitem"].includes(
|
|
715
|
+
element.getAttribute("role") || ""
|
|
716
|
+
);
|
|
717
|
+
const result2 = hasEventListeners(element) || hasTabIndex || hasRoleInteractive || element instanceof HTMLAnchorElement && element.hasAttribute("href") || element instanceof HTMLButtonElement && !element.disabled;
|
|
718
|
+
return result2;
|
|
719
|
+
}
|
|
720
|
+
if (n2.nodeType === Node.TEXT_NODE) {
|
|
721
|
+
const textNode = n2;
|
|
722
|
+
const parentElement2 = textNode.parentElement;
|
|
723
|
+
return parentElement2 !== null && allowedTags.includes(parentElement2.tagName.toLowerCase()) && isElementVisible(parentElement2) && ((_a2 = textNode.textContent) == null ? void 0 : _a2.trim().length) !== 0 && isElementInteractive(parentElement2);
|
|
724
|
+
}
|
|
725
|
+
return false;
|
|
726
|
+
}
|
|
600
727
|
let _id = 1;
|
|
601
728
|
const tagNameRegex = new RegExp("[^a-z0-9-_:]");
|
|
602
729
|
const IGNORED_NODE = -2;
|
|
@@ -952,11 +1079,13 @@ function serializeTextNode(n2, options) {
|
|
|
952
1079
|
textContent2 = maskTextFn ? maskTextFn(textContent2, index$1.parentElement(n2)) : textContent2.replace(/[\S]/g, "*");
|
|
953
1080
|
}
|
|
954
1081
|
const isVisible = isTextVisible(n2);
|
|
1082
|
+
const isInteractive = isElementInteractive(n2);
|
|
955
1083
|
return {
|
|
956
1084
|
type: NodeType$3.Text,
|
|
957
1085
|
textContent: textContent2 || "",
|
|
958
1086
|
rootId,
|
|
959
1087
|
isVisible,
|
|
1088
|
+
isInteractive,
|
|
960
1089
|
xPath
|
|
961
1090
|
};
|
|
962
1091
|
}
|
|
@@ -1142,6 +1271,7 @@ function serializeElementNode(n2, options) {
|
|
|
1142
1271
|
} catch (e2) {
|
|
1143
1272
|
}
|
|
1144
1273
|
const isVisible = isElementVisible(n2);
|
|
1274
|
+
const isInteractive = isElementInteractive(n2);
|
|
1145
1275
|
return {
|
|
1146
1276
|
type: NodeType$3.Element,
|
|
1147
1277
|
tagName,
|
|
@@ -1152,6 +1282,7 @@ function serializeElementNode(n2, options) {
|
|
|
1152
1282
|
rootId,
|
|
1153
1283
|
isCustom: isCustomElement,
|
|
1154
1284
|
isVisible,
|
|
1285
|
+
isInteractive,
|
|
1155
1286
|
xPath
|
|
1156
1287
|
};
|
|
1157
1288
|
}
|
|
@@ -1990,7 +2121,7 @@ function cloneNode$1(obj, parent) {
|
|
|
1990
2121
|
}
|
|
1991
2122
|
return cloned;
|
|
1992
2123
|
}
|
|
1993
|
-
let Node$
|
|
2124
|
+
let Node$5$1 = class Node2 {
|
|
1994
2125
|
constructor(defaults = {}) {
|
|
1995
2126
|
this.raws = {};
|
|
1996
2127
|
this[isClean$2$1] = false;
|
|
@@ -2282,10 +2413,10 @@ let Node$4$1 = class Node2 {
|
|
|
2282
2413
|
return this;
|
|
2283
2414
|
}
|
|
2284
2415
|
};
|
|
2285
|
-
var node$1 = Node$
|
|
2286
|
-
Node$
|
|
2287
|
-
let Node$
|
|
2288
|
-
let Declaration$4$1 = class Declaration extends Node$
|
|
2416
|
+
var node$1 = Node$5$1;
|
|
2417
|
+
Node$5$1.default = Node$5$1;
|
|
2418
|
+
let Node$4$1 = node$1;
|
|
2419
|
+
let Declaration$4$1 = class Declaration extends Node$4$1 {
|
|
2289
2420
|
constructor(defaults) {
|
|
2290
2421
|
if (defaults && typeof defaults.value !== "undefined" && typeof defaults.value !== "string") {
|
|
2291
2422
|
defaults = __spreadProps(__spreadValues({}, defaults), { value: String(defaults.value) });
|
|
@@ -2941,8 +3072,8 @@ let MapGenerator$2$1 = class MapGenerator {
|
|
|
2941
3072
|
}
|
|
2942
3073
|
};
|
|
2943
3074
|
var mapGenerator$1 = MapGenerator$2$1;
|
|
2944
|
-
let Node$
|
|
2945
|
-
let Comment$4$1 = class Comment extends Node$
|
|
3075
|
+
let Node$3$1 = node$1;
|
|
3076
|
+
let Comment$4$1 = class Comment extends Node$3$1 {
|
|
2946
3077
|
constructor(defaults) {
|
|
2947
3078
|
super(defaults);
|
|
2948
3079
|
this.type = "comment";
|
|
@@ -2953,7 +3084,7 @@ Comment$4$1.default = Comment$4$1;
|
|
|
2953
3084
|
let { isClean: isClean$1$1, my: my$1$1 } = symbols$1;
|
|
2954
3085
|
let Declaration$3$1 = declaration$1;
|
|
2955
3086
|
let Comment$3$1 = comment$1;
|
|
2956
|
-
let Node$
|
|
3087
|
+
let Node$2$1 = node$1;
|
|
2957
3088
|
let parse$4$1;
|
|
2958
3089
|
let Rule$4$1;
|
|
2959
3090
|
let AtRule$4$1;
|
|
@@ -2973,7 +3104,7 @@ function markDirtyUp$1(node2) {
|
|
|
2973
3104
|
}
|
|
2974
3105
|
}
|
|
2975
3106
|
}
|
|
2976
|
-
let Container$7$1 = class Container extends Node$
|
|
3107
|
+
let Container$7$1 = class Container extends Node$2$1 {
|
|
2977
3108
|
append(...children) {
|
|
2978
3109
|
for (let child of children) {
|
|
2979
3110
|
let nodes = this.normalize(child, this.last);
|
|
@@ -5001,7 +5132,7 @@ let parse$5 = parse_1$1;
|
|
|
5001
5132
|
let list$3 = list_1$1;
|
|
5002
5133
|
let Rule2$1 = rule$1;
|
|
5003
5134
|
let Root2$1 = root$1;
|
|
5004
|
-
let
|
|
5135
|
+
let Node$1$1 = node$1;
|
|
5005
5136
|
function postcss$3(...plugins) {
|
|
5006
5137
|
if (plugins.length === 1 && Array.isArray(plugins[0])) {
|
|
5007
5138
|
plugins = plugins[0];
|
|
@@ -5061,7 +5192,7 @@ postcss$3.Result = Result2$1;
|
|
|
5061
5192
|
postcss$3.Input = Input2$1;
|
|
5062
5193
|
postcss$3.Rule = Rule2$1;
|
|
5063
5194
|
postcss$3.Root = Root2$1;
|
|
5064
|
-
postcss$3.Node =
|
|
5195
|
+
postcss$3.Node = Node$1$1;
|
|
5065
5196
|
LazyResult2$1.registerPostcss(postcss$3);
|
|
5066
5197
|
var postcss_1$1 = postcss$3;
|
|
5067
5198
|
postcss$3.default = postcss$3;
|
|
@@ -5991,7 +6122,7 @@ function cloneNode(obj, parent) {
|
|
|
5991
6122
|
}
|
|
5992
6123
|
return cloned;
|
|
5993
6124
|
}
|
|
5994
|
-
let Node$
|
|
6125
|
+
let Node$5 = class Node22 {
|
|
5995
6126
|
constructor(defaults = {}) {
|
|
5996
6127
|
this.raws = {};
|
|
5997
6128
|
this[isClean$2] = false;
|
|
@@ -6283,10 +6414,10 @@ let Node$4 = class Node3 {
|
|
|
6283
6414
|
return this;
|
|
6284
6415
|
}
|
|
6285
6416
|
};
|
|
6286
|
-
var node = Node$
|
|
6287
|
-
Node$
|
|
6288
|
-
let Node$
|
|
6289
|
-
let Declaration$4 = class Declaration2 extends Node$
|
|
6417
|
+
var node = Node$5;
|
|
6418
|
+
Node$5.default = Node$5;
|
|
6419
|
+
let Node$4 = node;
|
|
6420
|
+
let Declaration$4 = class Declaration2 extends Node$4 {
|
|
6290
6421
|
constructor(defaults) {
|
|
6291
6422
|
if (defaults && typeof defaults.value !== "undefined" && typeof defaults.value !== "string") {
|
|
6292
6423
|
defaults = __spreadProps(__spreadValues({}, defaults), { value: String(defaults.value) });
|
|
@@ -6942,8 +7073,8 @@ let MapGenerator$2 = class MapGenerator2 {
|
|
|
6942
7073
|
}
|
|
6943
7074
|
};
|
|
6944
7075
|
var mapGenerator = MapGenerator$2;
|
|
6945
|
-
let Node$
|
|
6946
|
-
let Comment$4 = class Comment2 extends Node$
|
|
7076
|
+
let Node$3 = node;
|
|
7077
|
+
let Comment$4 = class Comment2 extends Node$3 {
|
|
6947
7078
|
constructor(defaults) {
|
|
6948
7079
|
super(defaults);
|
|
6949
7080
|
this.type = "comment";
|
|
@@ -6954,7 +7085,7 @@ Comment$4.default = Comment$4;
|
|
|
6954
7085
|
let { isClean: isClean$1, my: my$1 } = symbols;
|
|
6955
7086
|
let Declaration$3 = declaration;
|
|
6956
7087
|
let Comment$3 = comment;
|
|
6957
|
-
let Node$
|
|
7088
|
+
let Node$2 = node;
|
|
6958
7089
|
let parse$4;
|
|
6959
7090
|
let Rule$4;
|
|
6960
7091
|
let AtRule$4;
|
|
@@ -6974,7 +7105,7 @@ function markDirtyUp(node2) {
|
|
|
6974
7105
|
}
|
|
6975
7106
|
}
|
|
6976
7107
|
}
|
|
6977
|
-
let Container$7 = class Container2 extends Node$
|
|
7108
|
+
let Container$7 = class Container2 extends Node$2 {
|
|
6978
7109
|
append(...children) {
|
|
6979
7110
|
for (let child of children) {
|
|
6980
7111
|
let nodes = this.normalize(child, this.last);
|
|
@@ -9002,7 +9133,7 @@ let parse = parse_1;
|
|
|
9002
9133
|
let list = list_1;
|
|
9003
9134
|
let Rule22 = rule;
|
|
9004
9135
|
let Root22 = root;
|
|
9005
|
-
let
|
|
9136
|
+
let Node$1 = node;
|
|
9006
9137
|
function postcss(...plugins) {
|
|
9007
9138
|
if (plugins.length === 1 && Array.isArray(plugins[0])) {
|
|
9008
9139
|
plugins = plugins[0];
|
|
@@ -9062,7 +9193,7 @@ postcss.Result = Result22;
|
|
|
9062
9193
|
postcss.Input = Input22;
|
|
9063
9194
|
postcss.Rule = Rule22;
|
|
9064
9195
|
postcss.Root = Root22;
|
|
9065
|
-
postcss.Node =
|
|
9196
|
+
postcss.Node = Node$1;
|
|
9066
9197
|
LazyResult22.registerPostcss(postcss);
|
|
9067
9198
|
var postcss_1 = postcss;
|
|
9068
9199
|
postcss.default = postcss;
|
|
@@ -10934,20 +11065,20 @@ var IncrementalSource = /* @__PURE__ */ ((IncrementalSource2) => {
|
|
|
10934
11065
|
IncrementalSource2[IncrementalSource2["Selection"] = 14] = "Selection";
|
|
10935
11066
|
IncrementalSource2[IncrementalSource2["AdoptedStyleSheet"] = 15] = "AdoptedStyleSheet";
|
|
10936
11067
|
IncrementalSource2[IncrementalSource2["CustomElement"] = 16] = "CustomElement";
|
|
11068
|
+
IncrementalSource2[IncrementalSource2["VisibilityChange"] = 17] = "VisibilityChange";
|
|
10937
11069
|
return IncrementalSource2;
|
|
10938
11070
|
})(IncrementalSource || {});
|
|
10939
11071
|
var MouseInteractions = /* @__PURE__ */ ((MouseInteractions2) => {
|
|
10940
11072
|
MouseInteractions2[MouseInteractions2["MouseUp"] = 0] = "MouseUp";
|
|
10941
11073
|
MouseInteractions2[MouseInteractions2["MouseDown"] = 1] = "MouseDown";
|
|
10942
11074
|
MouseInteractions2[MouseInteractions2["Click"] = 2] = "Click";
|
|
10943
|
-
MouseInteractions2[MouseInteractions2["
|
|
10944
|
-
MouseInteractions2[MouseInteractions2["
|
|
10945
|
-
MouseInteractions2[MouseInteractions2["
|
|
10946
|
-
MouseInteractions2[MouseInteractions2["
|
|
10947
|
-
MouseInteractions2[MouseInteractions2["
|
|
10948
|
-
MouseInteractions2[MouseInteractions2["
|
|
10949
|
-
MouseInteractions2[MouseInteractions2["
|
|
10950
|
-
MouseInteractions2[MouseInteractions2["TouchCancel"] = 10] = "TouchCancel";
|
|
11075
|
+
MouseInteractions2[MouseInteractions2["DblClick"] = 3] = "DblClick";
|
|
11076
|
+
MouseInteractions2[MouseInteractions2["Focus"] = 4] = "Focus";
|
|
11077
|
+
MouseInteractions2[MouseInteractions2["Blur"] = 5] = "Blur";
|
|
11078
|
+
MouseInteractions2[MouseInteractions2["TouchStart"] = 6] = "TouchStart";
|
|
11079
|
+
MouseInteractions2[MouseInteractions2["TouchMove_Departed"] = 7] = "TouchMove_Departed";
|
|
11080
|
+
MouseInteractions2[MouseInteractions2["TouchEnd"] = 8] = "TouchEnd";
|
|
11081
|
+
MouseInteractions2[MouseInteractions2["TouchCancel"] = 9] = "TouchCancel";
|
|
10951
11082
|
return MouseInteractions2;
|
|
10952
11083
|
})(MouseInteractions || {});
|
|
10953
11084
|
var PointerTypes = /* @__PURE__ */ ((PointerTypes2) => {
|
|
@@ -11647,6 +11778,54 @@ function initMutationObserver(options, rootEl) {
|
|
|
11647
11778
|
});
|
|
11648
11779
|
return observer;
|
|
11649
11780
|
}
|
|
11781
|
+
function initVisibilityObserver({
|
|
11782
|
+
visibilityChangeCb,
|
|
11783
|
+
doc,
|
|
11784
|
+
mirror: mirror2
|
|
11785
|
+
}) {
|
|
11786
|
+
if (!visibilityChangeCb) {
|
|
11787
|
+
return () => {
|
|
11788
|
+
};
|
|
11789
|
+
}
|
|
11790
|
+
const observedElements = /* @__PURE__ */ new WeakMap();
|
|
11791
|
+
const observer = new IntersectionObserver(
|
|
11792
|
+
(entries) => {
|
|
11793
|
+
entries.forEach((entry) => {
|
|
11794
|
+
const target = entry.target;
|
|
11795
|
+
const id = mirror2.getId(target);
|
|
11796
|
+
const isVisible = entry.isIntersecting || entry.intersectionRatio > 0;
|
|
11797
|
+
if (id !== -1) {
|
|
11798
|
+
if (observedElements.has(target)) {
|
|
11799
|
+
visibilityChangeCb({
|
|
11800
|
+
id,
|
|
11801
|
+
isVisible,
|
|
11802
|
+
visibilityRatio: entry.intersectionRatio,
|
|
11803
|
+
boundingRect: entry.boundingClientRect
|
|
11804
|
+
});
|
|
11805
|
+
} else {
|
|
11806
|
+
observedElements.set(target, true);
|
|
11807
|
+
}
|
|
11808
|
+
}
|
|
11809
|
+
});
|
|
11810
|
+
},
|
|
11811
|
+
{ root: null, threshold: [0.1, 0.9] }
|
|
11812
|
+
);
|
|
11813
|
+
doc.querySelectorAll("*").forEach((el) => observer.observe(el));
|
|
11814
|
+
const mutationObserver = new MutationObserver((mutations) => {
|
|
11815
|
+
mutations.forEach((mutation) => {
|
|
11816
|
+
mutation.addedNodes.forEach((node2) => {
|
|
11817
|
+
if (node2 instanceof Element) {
|
|
11818
|
+
observer.observe(node2);
|
|
11819
|
+
}
|
|
11820
|
+
});
|
|
11821
|
+
});
|
|
11822
|
+
});
|
|
11823
|
+
mutationObserver.observe(doc, { childList: true, subtree: true });
|
|
11824
|
+
return () => {
|
|
11825
|
+
observer.disconnect();
|
|
11826
|
+
mutationObserver.disconnect();
|
|
11827
|
+
};
|
|
11828
|
+
}
|
|
11650
11829
|
function initMoveObserver({
|
|
11651
11830
|
mousemoveCb,
|
|
11652
11831
|
sampling,
|
|
@@ -12460,6 +12639,7 @@ function initCustomElementObserver({
|
|
|
12460
12639
|
function mergeHooks(o2, hooks) {
|
|
12461
12640
|
const {
|
|
12462
12641
|
mutationCb,
|
|
12642
|
+
visibilityChangeCb,
|
|
12463
12643
|
mousemoveCb,
|
|
12464
12644
|
mouseInteractionCb,
|
|
12465
12645
|
scrollCb,
|
|
@@ -12479,6 +12659,12 @@ function mergeHooks(o2, hooks) {
|
|
|
12479
12659
|
}
|
|
12480
12660
|
mutationCb(...p);
|
|
12481
12661
|
};
|
|
12662
|
+
o2.visibilityChangeCb = (...p) => {
|
|
12663
|
+
if (hooks.visibilityChange) {
|
|
12664
|
+
hooks.visibilityChange(...p);
|
|
12665
|
+
}
|
|
12666
|
+
visibilityChangeCb(...p);
|
|
12667
|
+
};
|
|
12482
12668
|
o2.mousemoveCb = (...p) => {
|
|
12483
12669
|
if (hooks.mousemove) {
|
|
12484
12670
|
hooks.mousemove(...p);
|
|
@@ -12553,6 +12739,7 @@ function mergeHooks(o2, hooks) {
|
|
|
12553
12739
|
};
|
|
12554
12740
|
}
|
|
12555
12741
|
function initObservers(o2, hooks = {}) {
|
|
12742
|
+
console.info("initObservers", o2);
|
|
12556
12743
|
const currentWindow = o2.doc.defaultView;
|
|
12557
12744
|
if (!currentWindow) {
|
|
12558
12745
|
return () => {
|
|
@@ -12571,6 +12758,7 @@ function initObservers(o2, hooks = {}) {
|
|
|
12571
12758
|
});
|
|
12572
12759
|
const inputHandler = initInputObserver(o2);
|
|
12573
12760
|
const mediaInteractionHandler = initMediaInteractionObserver(o2);
|
|
12761
|
+
const visibleHandler = initVisibilityObserver(o2);
|
|
12574
12762
|
let styleSheetObserver = () => {
|
|
12575
12763
|
};
|
|
12576
12764
|
let adoptedStyleSheetObserver = () => {
|
|
@@ -12600,6 +12788,7 @@ function initObservers(o2, hooks = {}) {
|
|
|
12600
12788
|
return callbackWrapper(() => {
|
|
12601
12789
|
mutationBuffers.forEach((b) => b.reset());
|
|
12602
12790
|
mutationObserver == null ? void 0 : mutationObserver.disconnect();
|
|
12791
|
+
visibleHandler();
|
|
12603
12792
|
mousemoveHandler();
|
|
12604
12793
|
mouseInteractionHandler();
|
|
12605
12794
|
scrollHandler();
|
|
@@ -13684,6 +13873,7 @@ function record(options = {}) {
|
|
|
13684
13873
|
emit,
|
|
13685
13874
|
checkoutEveryNms,
|
|
13686
13875
|
checkoutEveryNth,
|
|
13876
|
+
checkoutEveryEvc,
|
|
13687
13877
|
blockClass = "rr-block",
|
|
13688
13878
|
blockSelector = null,
|
|
13689
13879
|
ignoreClass = "rr-ignore",
|
|
@@ -13970,6 +14160,11 @@ function record(options = {}) {
|
|
|
13970
14160
|
mirror.getId(document)
|
|
13971
14161
|
);
|
|
13972
14162
|
};
|
|
14163
|
+
const debouncedFullSnapshot = throttle(() => {
|
|
14164
|
+
if (checkoutEveryEvc) {
|
|
14165
|
+
takeFullSnapshot$1(true);
|
|
14166
|
+
}
|
|
14167
|
+
}, 100, { leading: false, trailing: true });
|
|
13973
14168
|
try {
|
|
13974
14169
|
const handlers = [];
|
|
13975
14170
|
const observe = (doc) => {
|
|
@@ -13977,6 +14172,17 @@ function record(options = {}) {
|
|
|
13977
14172
|
return callbackWrapper(initObservers)(
|
|
13978
14173
|
{
|
|
13979
14174
|
mutationCb: wrappedMutationEmit,
|
|
14175
|
+
visibilityChangeCb: (v2) => {
|
|
14176
|
+
debouncedFullSnapshot();
|
|
14177
|
+
if (sampling.visibility) {
|
|
14178
|
+
return wrappedEmit({
|
|
14179
|
+
type: EventType.IncrementalSnapshot,
|
|
14180
|
+
data: __spreadValues({
|
|
14181
|
+
source: IncrementalSource.VisibilityChange
|
|
14182
|
+
}, v2)
|
|
14183
|
+
});
|
|
14184
|
+
}
|
|
14185
|
+
},
|
|
13980
14186
|
mousemoveCb: (positions, source) => wrappedEmit({
|
|
13981
14187
|
type: EventType.IncrementalSnapshot,
|
|
13982
14188
|
data: {
|