@appsurify-testmap/rrweb 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.cjs +284 -77
- package/dist/rrweb.cjs.map +1 -1
- package/dist/rrweb.d.cts +1 -0
- package/dist/rrweb.d.ts +1 -0
- package/dist/rrweb.js +284 -77
- package/dist/rrweb.js.map +1 -1
- package/dist/rrweb.umd.cjs +283 -77
- package/dist/rrweb.umd.cjs.map +3 -3
- package/dist/rrweb.umd.min.cjs +26 -26
- package/dist/rrweb.umd.min.cjs.map +3 -3
- package/package.json +5 -5
package/dist/rrweb.cjs
CHANGED
|
@@ -7,6 +7,46 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
7
7
|
var __defProp$1 = Object.defineProperty;
|
|
8
8
|
var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
9
9
|
var __publicField$1 = (obj, key, value) => __defNormalProp$1(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
10
|
+
var InteractiveEvent = /* @__PURE__ */ ((InteractiveEvent2) => {
|
|
11
|
+
InteractiveEvent2[InteractiveEvent2["Change"] = 0] = "Change";
|
|
12
|
+
InteractiveEvent2[InteractiveEvent2["Submit"] = 1] = "Submit";
|
|
13
|
+
InteractiveEvent2[InteractiveEvent2["DragStart"] = 2] = "DragStart";
|
|
14
|
+
InteractiveEvent2[InteractiveEvent2["Drop"] = 3] = "Drop";
|
|
15
|
+
InteractiveEvent2[InteractiveEvent2["PointerDown"] = 4] = "PointerDown";
|
|
16
|
+
InteractiveEvent2[InteractiveEvent2["PointerUp"] = 5] = "PointerUp";
|
|
17
|
+
InteractiveEvent2[InteractiveEvent2["Input"] = 6] = "Input";
|
|
18
|
+
InteractiveEvent2[InteractiveEvent2["KeyDown"] = 7] = "KeyDown";
|
|
19
|
+
InteractiveEvent2[InteractiveEvent2["KeyUp"] = 8] = "KeyUp";
|
|
20
|
+
InteractiveEvent2[InteractiveEvent2["KeyPress"] = 9] = "KeyPress";
|
|
21
|
+
InteractiveEvent2[InteractiveEvent2["MouseEnter"] = 10] = "MouseEnter";
|
|
22
|
+
InteractiveEvent2[InteractiveEvent2["MouseLeave"] = 11] = "MouseLeave";
|
|
23
|
+
InteractiveEvent2[InteractiveEvent2["MouseUp"] = 12] = "MouseUp";
|
|
24
|
+
InteractiveEvent2[InteractiveEvent2["MouseDown"] = 13] = "MouseDown";
|
|
25
|
+
InteractiveEvent2[InteractiveEvent2["Click"] = 14] = "Click";
|
|
26
|
+
InteractiveEvent2[InteractiveEvent2["ContextMenu"] = 15] = "ContextMenu";
|
|
27
|
+
InteractiveEvent2[InteractiveEvent2["DblClick"] = 16] = "DblClick";
|
|
28
|
+
InteractiveEvent2[InteractiveEvent2["Focus"] = 17] = "Focus";
|
|
29
|
+
InteractiveEvent2[InteractiveEvent2["Blur"] = 18] = "Blur";
|
|
30
|
+
InteractiveEvent2[InteractiveEvent2["TouchStart"] = 19] = "TouchStart";
|
|
31
|
+
InteractiveEvent2[InteractiveEvent2["TouchMove"] = 20] = "TouchMove";
|
|
32
|
+
InteractiveEvent2[InteractiveEvent2["TouchEnd"] = 21] = "TouchEnd";
|
|
33
|
+
InteractiveEvent2[InteractiveEvent2["TouchCancel"] = 22] = "TouchCancel";
|
|
34
|
+
return InteractiveEvent2;
|
|
35
|
+
})(InteractiveEvent || {});
|
|
36
|
+
var interactiveTag = /* @__PURE__ */ ((interactiveTag2) => {
|
|
37
|
+
interactiveTag2[interactiveTag2["Input"] = 0] = "Input";
|
|
38
|
+
interactiveTag2[interactiveTag2["Button"] = 1] = "Button";
|
|
39
|
+
interactiveTag2[interactiveTag2["A"] = 2] = "A";
|
|
40
|
+
interactiveTag2[interactiveTag2["Select"] = 3] = "Select";
|
|
41
|
+
interactiveTag2[interactiveTag2["Textarea"] = 4] = "Textarea";
|
|
42
|
+
interactiveTag2[interactiveTag2["Label"] = 5] = "Label";
|
|
43
|
+
interactiveTag2[interactiveTag2["Details"] = 6] = "Details";
|
|
44
|
+
interactiveTag2[interactiveTag2["Summary"] = 7] = "Summary";
|
|
45
|
+
interactiveTag2[interactiveTag2["Dialog"] = 8] = "Dialog";
|
|
46
|
+
interactiveTag2[interactiveTag2["Video"] = 9] = "Video";
|
|
47
|
+
interactiveTag2[interactiveTag2["Audio"] = 10] = "Audio";
|
|
48
|
+
return interactiveTag2;
|
|
49
|
+
})(interactiveTag || {});
|
|
10
50
|
var NodeType$3 = /* @__PURE__ */ ((NodeType2) => {
|
|
11
51
|
NodeType2[NodeType2["Document"] = 0] = "Document";
|
|
12
52
|
NodeType2[NodeType2["DocumentType"] = 1] = "DocumentType";
|
|
@@ -158,53 +198,6 @@ const index$1 = {
|
|
|
158
198
|
querySelectorAll: querySelectorAll$1,
|
|
159
199
|
mutationObserver: mutationObserverCtor$1
|
|
160
200
|
};
|
|
161
|
-
function getXPath(n2) {
|
|
162
|
-
if (n2.id) {
|
|
163
|
-
return `//*[@id="${n2.id}"]`;
|
|
164
|
-
}
|
|
165
|
-
if (n2 === document.body) {
|
|
166
|
-
return "/html/body";
|
|
167
|
-
}
|
|
168
|
-
if (!n2.tagName) {
|
|
169
|
-
return "";
|
|
170
|
-
}
|
|
171
|
-
const parentNode2 = index$1.parentNode(n2);
|
|
172
|
-
if (!parentNode2 || !(parentNode2 instanceof Element)) {
|
|
173
|
-
return "";
|
|
174
|
-
}
|
|
175
|
-
const siblings = Array.from(parentNode2.children).filter(
|
|
176
|
-
(node2) => node2.tagName && node2.tagName === n2.tagName
|
|
177
|
-
);
|
|
178
|
-
const index$1$1 = siblings.length > 1 ? `[${siblings.indexOf(n2) + 1}]` : "";
|
|
179
|
-
return getXPath(parentNode2) + "/" + n2.tagName.toLowerCase() + index$1$1;
|
|
180
|
-
}
|
|
181
|
-
function isElement(n2) {
|
|
182
|
-
return n2.nodeType === n2.ELEMENT_NODE;
|
|
183
|
-
}
|
|
184
|
-
function isTextVisible(n2) {
|
|
185
|
-
var _a2;
|
|
186
|
-
const parent = index$1.parentNode(n2);
|
|
187
|
-
const parentElement2 = parent && parent;
|
|
188
|
-
if (!parentElement2) {
|
|
189
|
-
return false;
|
|
190
|
-
}
|
|
191
|
-
const isParentVisible = isElementVisible(parentElement2);
|
|
192
|
-
if (!isParentVisible) {
|
|
193
|
-
return false;
|
|
194
|
-
}
|
|
195
|
-
const textContent2 = (_a2 = n2.textContent) == null ? void 0 : _a2.trim();
|
|
196
|
-
return textContent2 !== "";
|
|
197
|
-
}
|
|
198
|
-
function isElementVisible(n2) {
|
|
199
|
-
return isStyleVisible(n2) && isRectVisible(n2.getBoundingClientRect());
|
|
200
|
-
}
|
|
201
|
-
function isStyleVisible(n2) {
|
|
202
|
-
const style = window.getComputedStyle(n2);
|
|
203
|
-
return style.display !== "none" && style.visibility !== "hidden" && parseFloat(style.opacity) !== 0;
|
|
204
|
-
}
|
|
205
|
-
function isRectVisible(rect) {
|
|
206
|
-
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);
|
|
207
|
-
}
|
|
208
201
|
function isShadowRoot(n2) {
|
|
209
202
|
const hostEl = (
|
|
210
203
|
// anchor and textarea elements also have a `host` property
|
|
@@ -552,6 +545,140 @@ function splitCssText(cssText, style) {
|
|
|
552
545
|
function markCssSplits(cssText, style) {
|
|
553
546
|
return splitCssText(cssText, style).join("/* rr_split */");
|
|
554
547
|
}
|
|
548
|
+
function getXPath(node2) {
|
|
549
|
+
if (node2.nodeType === Node.DOCUMENT_NODE) {
|
|
550
|
+
return "/";
|
|
551
|
+
}
|
|
552
|
+
if (node2.nodeType === Node.DOCUMENT_TYPE_NODE) {
|
|
553
|
+
return "/html/doctype";
|
|
554
|
+
}
|
|
555
|
+
if (node2.nodeType === Node.ELEMENT_NODE) {
|
|
556
|
+
const element = node2;
|
|
557
|
+
if (element.id) {
|
|
558
|
+
return `//*[@id="${element.id}"]`;
|
|
559
|
+
}
|
|
560
|
+
if (element.tagName && element.tagName.toLowerCase() === "html") {
|
|
561
|
+
return "/html";
|
|
562
|
+
}
|
|
563
|
+
if (element === document.head) {
|
|
564
|
+
return "/html/head";
|
|
565
|
+
}
|
|
566
|
+
if (element === document.body) {
|
|
567
|
+
return "/html/body";
|
|
568
|
+
}
|
|
569
|
+
const parentNode2 = element.parentNode;
|
|
570
|
+
if (!parentNode2 || !(parentNode2 instanceof Element)) {
|
|
571
|
+
return "";
|
|
572
|
+
}
|
|
573
|
+
const siblings = Array.from(parentNode2.children).filter(
|
|
574
|
+
(sibling) => sibling.tagName === element.tagName
|
|
575
|
+
);
|
|
576
|
+
const index2 = siblings.length > 1 ? `[${siblings.indexOf(element) + 1}]` : "";
|
|
577
|
+
return `${getXPath(parentNode2)}/${element.tagName.toLowerCase()}${index2}`;
|
|
578
|
+
}
|
|
579
|
+
if (node2.nodeType === Node.TEXT_NODE) {
|
|
580
|
+
const parent = node2.parentNode;
|
|
581
|
+
if (!parent) {
|
|
582
|
+
return "";
|
|
583
|
+
}
|
|
584
|
+
const textSiblings = Array.from(parent.childNodes).filter(
|
|
585
|
+
(sibling) => sibling.nodeType === Node.TEXT_NODE
|
|
586
|
+
);
|
|
587
|
+
const index2 = textSiblings.length > 1 ? `[${textSiblings.indexOf(node2) + 1}]` : "";
|
|
588
|
+
return `${getXPath(parent)}/text()${index2}`;
|
|
589
|
+
}
|
|
590
|
+
if (node2.nodeType === Node.CDATA_SECTION_NODE) {
|
|
591
|
+
const parent = node2.parentNode;
|
|
592
|
+
if (!parent) {
|
|
593
|
+
return "";
|
|
594
|
+
}
|
|
595
|
+
const cdataSiblings = Array.from(parent.childNodes).filter(
|
|
596
|
+
(sibling) => sibling.nodeType === Node.CDATA_SECTION_NODE
|
|
597
|
+
);
|
|
598
|
+
const index2 = cdataSiblings.length > 1 ? `[${cdataSiblings.indexOf(node2) + 1}]` : "";
|
|
599
|
+
return `${getXPath(parent)}/text()${index2}`;
|
|
600
|
+
}
|
|
601
|
+
if (node2.nodeType === Node.COMMENT_NODE) {
|
|
602
|
+
const parent = node2.parentNode;
|
|
603
|
+
if (!parent) {
|
|
604
|
+
return "";
|
|
605
|
+
}
|
|
606
|
+
const commentSiblings = Array.from(parent.childNodes).filter(
|
|
607
|
+
(sibling) => sibling.nodeType === Node.COMMENT_NODE
|
|
608
|
+
);
|
|
609
|
+
const index2 = commentSiblings.length > 1 ? `[${commentSiblings.indexOf(node2) + 1}]` : "";
|
|
610
|
+
return `${getXPath(parent)}/comment()${index2}`;
|
|
611
|
+
}
|
|
612
|
+
return "";
|
|
613
|
+
}
|
|
614
|
+
function isElement(n2) {
|
|
615
|
+
return n2.nodeType === n2.ELEMENT_NODE;
|
|
616
|
+
}
|
|
617
|
+
function isTextVisible(n2) {
|
|
618
|
+
var _a2;
|
|
619
|
+
const parent = index$1.parentNode(n2);
|
|
620
|
+
const parentElement2 = parent && parent;
|
|
621
|
+
if (!parentElement2) {
|
|
622
|
+
return false;
|
|
623
|
+
}
|
|
624
|
+
const isParentVisible = isElementVisible(parentElement2);
|
|
625
|
+
if (!isParentVisible) {
|
|
626
|
+
return false;
|
|
627
|
+
}
|
|
628
|
+
const textContent2 = (_a2 = n2.textContent) == null ? void 0 : _a2.trim();
|
|
629
|
+
return textContent2 !== "";
|
|
630
|
+
}
|
|
631
|
+
function isElementVisible(n2) {
|
|
632
|
+
return isStyleVisible(n2) && isRectVisible(n2.getBoundingClientRect());
|
|
633
|
+
}
|
|
634
|
+
function isStyleVisible(n2) {
|
|
635
|
+
const style = window.getComputedStyle(n2);
|
|
636
|
+
return style.display !== "none" && style.visibility !== "hidden" && parseFloat(style.opacity) !== 0;
|
|
637
|
+
}
|
|
638
|
+
function isRectVisible(rect) {
|
|
639
|
+
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);
|
|
640
|
+
}
|
|
641
|
+
function getInteractiveEvents() {
|
|
642
|
+
return Object.keys(InteractiveEvent).filter((key) => isNaN(Number(key))).map((key) => key.toLowerCase().replace(/_/g, "-"));
|
|
643
|
+
}
|
|
644
|
+
function getInteractiveTags() {
|
|
645
|
+
return Object.keys(interactiveTag).filter((key) => isNaN(Number(key))).map((key) => key.toLowerCase().replace(/_/g, "-"));
|
|
646
|
+
}
|
|
647
|
+
function hasEventListeners(n2) {
|
|
648
|
+
return getInteractiveEvents().some((eventType) => {
|
|
649
|
+
let hasListener = false;
|
|
650
|
+
const testListener = () => {
|
|
651
|
+
hasListener = true;
|
|
652
|
+
};
|
|
653
|
+
n2.addEventListener(eventType, testListener);
|
|
654
|
+
n2.dispatchEvent(new Event(eventType));
|
|
655
|
+
n2.removeEventListener(eventType, testListener);
|
|
656
|
+
return hasListener;
|
|
657
|
+
});
|
|
658
|
+
}
|
|
659
|
+
function isElementInteractive(n2) {
|
|
660
|
+
var _a2;
|
|
661
|
+
const allowedTags = getInteractiveTags();
|
|
662
|
+
if (n2.nodeType === Node.ELEMENT_NODE) {
|
|
663
|
+
const element = n2;
|
|
664
|
+
const tagName = element.tagName.toLowerCase();
|
|
665
|
+
if (!allowedTags.includes(tagName)) {
|
|
666
|
+
return false;
|
|
667
|
+
}
|
|
668
|
+
const hasTabIndex = element.hasAttribute("tabindex") && element.getAttribute("tabindex") !== "-1";
|
|
669
|
+
const hasRoleInteractive = ["button", "link", "checkbox", "switch", "menuitem"].includes(
|
|
670
|
+
element.getAttribute("role") || ""
|
|
671
|
+
);
|
|
672
|
+
const result2 = hasEventListeners(element) || hasTabIndex || hasRoleInteractive || element instanceof HTMLAnchorElement && element.hasAttribute("href") || element instanceof HTMLButtonElement && !element.disabled;
|
|
673
|
+
return result2;
|
|
674
|
+
}
|
|
675
|
+
if (n2.nodeType === Node.TEXT_NODE) {
|
|
676
|
+
const textNode = n2;
|
|
677
|
+
const parentElement2 = textNode.parentElement;
|
|
678
|
+
return parentElement2 !== null && allowedTags.includes(parentElement2.tagName.toLowerCase()) && isElementVisible(parentElement2) && ((_a2 = textNode.textContent) == null ? void 0 : _a2.trim().length) !== 0 && isElementInteractive(parentElement2);
|
|
679
|
+
}
|
|
680
|
+
return false;
|
|
681
|
+
}
|
|
555
682
|
let _id = 1;
|
|
556
683
|
const tagNameRegex = new RegExp("[^a-z0-9-_:]");
|
|
557
684
|
const IGNORED_NODE = -2;
|
|
@@ -907,11 +1034,13 @@ function serializeTextNode(n2, options) {
|
|
|
907
1034
|
textContent2 = maskTextFn ? maskTextFn(textContent2, index$1.parentElement(n2)) : textContent2.replace(/[\S]/g, "*");
|
|
908
1035
|
}
|
|
909
1036
|
const isVisible = isTextVisible(n2);
|
|
1037
|
+
const isInteractive = isElementInteractive(n2);
|
|
910
1038
|
return {
|
|
911
1039
|
type: NodeType$3.Text,
|
|
912
1040
|
textContent: textContent2 || "",
|
|
913
1041
|
rootId,
|
|
914
1042
|
isVisible,
|
|
1043
|
+
isInteractive,
|
|
915
1044
|
xPath
|
|
916
1045
|
};
|
|
917
1046
|
}
|
|
@@ -1097,6 +1226,7 @@ function serializeElementNode(n2, options) {
|
|
|
1097
1226
|
} catch (e2) {
|
|
1098
1227
|
}
|
|
1099
1228
|
const isVisible = isElementVisible(n2);
|
|
1229
|
+
const isInteractive = isElementInteractive(n2);
|
|
1100
1230
|
return {
|
|
1101
1231
|
type: NodeType$3.Element,
|
|
1102
1232
|
tagName,
|
|
@@ -1107,6 +1237,7 @@ function serializeElementNode(n2, options) {
|
|
|
1107
1237
|
rootId,
|
|
1108
1238
|
isCustom: isCustomElement,
|
|
1109
1239
|
isVisible,
|
|
1240
|
+
isInteractive,
|
|
1110
1241
|
xPath
|
|
1111
1242
|
};
|
|
1112
1243
|
}
|
|
@@ -1945,7 +2076,7 @@ function cloneNode$1(obj, parent) {
|
|
|
1945
2076
|
}
|
|
1946
2077
|
return cloned;
|
|
1947
2078
|
}
|
|
1948
|
-
let Node$
|
|
2079
|
+
let Node$5$1 = class Node2 {
|
|
1949
2080
|
constructor(defaults = {}) {
|
|
1950
2081
|
this.raws = {};
|
|
1951
2082
|
this[isClean$2$1] = false;
|
|
@@ -2237,10 +2368,10 @@ let Node$4$1 = class Node2 {
|
|
|
2237
2368
|
return this;
|
|
2238
2369
|
}
|
|
2239
2370
|
};
|
|
2240
|
-
var node$1 = Node$
|
|
2241
|
-
Node$
|
|
2242
|
-
let Node$
|
|
2243
|
-
let Declaration$4$1 = class Declaration extends Node$
|
|
2371
|
+
var node$1 = Node$5$1;
|
|
2372
|
+
Node$5$1.default = Node$5$1;
|
|
2373
|
+
let Node$4$1 = node$1;
|
|
2374
|
+
let Declaration$4$1 = class Declaration extends Node$4$1 {
|
|
2244
2375
|
constructor(defaults) {
|
|
2245
2376
|
if (defaults && typeof defaults.value !== "undefined" && typeof defaults.value !== "string") {
|
|
2246
2377
|
defaults = { ...defaults, value: String(defaults.value) };
|
|
@@ -2896,8 +3027,8 @@ let MapGenerator$2$1 = class MapGenerator {
|
|
|
2896
3027
|
}
|
|
2897
3028
|
};
|
|
2898
3029
|
var mapGenerator$1 = MapGenerator$2$1;
|
|
2899
|
-
let Node$
|
|
2900
|
-
let Comment$4$1 = class Comment extends Node$
|
|
3030
|
+
let Node$3$1 = node$1;
|
|
3031
|
+
let Comment$4$1 = class Comment extends Node$3$1 {
|
|
2901
3032
|
constructor(defaults) {
|
|
2902
3033
|
super(defaults);
|
|
2903
3034
|
this.type = "comment";
|
|
@@ -2908,7 +3039,7 @@ Comment$4$1.default = Comment$4$1;
|
|
|
2908
3039
|
let { isClean: isClean$1$1, my: my$1$1 } = symbols$1;
|
|
2909
3040
|
let Declaration$3$1 = declaration$1;
|
|
2910
3041
|
let Comment$3$1 = comment$1;
|
|
2911
|
-
let Node$
|
|
3042
|
+
let Node$2$1 = node$1;
|
|
2912
3043
|
let parse$4$1, Rule$4$1, AtRule$4$1, Root$6$1;
|
|
2913
3044
|
function cleanSource$1(nodes) {
|
|
2914
3045
|
return nodes.map((i2) => {
|
|
@@ -2925,7 +3056,7 @@ function markDirtyUp$1(node2) {
|
|
|
2925
3056
|
}
|
|
2926
3057
|
}
|
|
2927
3058
|
}
|
|
2928
|
-
let Container$7$1 = class Container extends Node$
|
|
3059
|
+
let Container$7$1 = class Container extends Node$2$1 {
|
|
2929
3060
|
append(...children) {
|
|
2930
3061
|
for (let child of children) {
|
|
2931
3062
|
let nodes = this.normalize(child, this.last);
|
|
@@ -4952,7 +5083,7 @@ let parse$5 = parse_1$1;
|
|
|
4952
5083
|
let list$3 = list_1$1;
|
|
4953
5084
|
let Rule2$1 = rule$1;
|
|
4954
5085
|
let Root2$1 = root$1;
|
|
4955
|
-
let
|
|
5086
|
+
let Node$1$1 = node$1;
|
|
4956
5087
|
function postcss$3(...plugins) {
|
|
4957
5088
|
if (plugins.length === 1 && Array.isArray(plugins[0])) {
|
|
4958
5089
|
plugins = plugins[0];
|
|
@@ -5012,7 +5143,7 @@ postcss$3.Result = Result2$1;
|
|
|
5012
5143
|
postcss$3.Input = Input2$1;
|
|
5013
5144
|
postcss$3.Rule = Rule2$1;
|
|
5014
5145
|
postcss$3.Root = Root2$1;
|
|
5015
|
-
postcss$3.Node =
|
|
5146
|
+
postcss$3.Node = Node$1$1;
|
|
5016
5147
|
LazyResult2$1.registerPostcss(postcss$3);
|
|
5017
5148
|
var postcss_1$1 = postcss$3;
|
|
5018
5149
|
postcss$3.default = postcss$3;
|
|
@@ -5942,7 +6073,7 @@ function cloneNode(obj, parent) {
|
|
|
5942
6073
|
}
|
|
5943
6074
|
return cloned;
|
|
5944
6075
|
}
|
|
5945
|
-
let Node$
|
|
6076
|
+
let Node$5 = class Node22 {
|
|
5946
6077
|
constructor(defaults = {}) {
|
|
5947
6078
|
this.raws = {};
|
|
5948
6079
|
this[isClean$2] = false;
|
|
@@ -6234,10 +6365,10 @@ let Node$4 = class Node3 {
|
|
|
6234
6365
|
return this;
|
|
6235
6366
|
}
|
|
6236
6367
|
};
|
|
6237
|
-
var node = Node$
|
|
6238
|
-
Node$
|
|
6239
|
-
let Node$
|
|
6240
|
-
let Declaration$4 = class Declaration2 extends Node$
|
|
6368
|
+
var node = Node$5;
|
|
6369
|
+
Node$5.default = Node$5;
|
|
6370
|
+
let Node$4 = node;
|
|
6371
|
+
let Declaration$4 = class Declaration2 extends Node$4 {
|
|
6241
6372
|
constructor(defaults) {
|
|
6242
6373
|
if (defaults && typeof defaults.value !== "undefined" && typeof defaults.value !== "string") {
|
|
6243
6374
|
defaults = { ...defaults, value: String(defaults.value) };
|
|
@@ -6893,8 +7024,8 @@ let MapGenerator$2 = class MapGenerator2 {
|
|
|
6893
7024
|
}
|
|
6894
7025
|
};
|
|
6895
7026
|
var mapGenerator = MapGenerator$2;
|
|
6896
|
-
let Node$
|
|
6897
|
-
let Comment$4 = class Comment2 extends Node$
|
|
7027
|
+
let Node$3 = node;
|
|
7028
|
+
let Comment$4 = class Comment2 extends Node$3 {
|
|
6898
7029
|
constructor(defaults) {
|
|
6899
7030
|
super(defaults);
|
|
6900
7031
|
this.type = "comment";
|
|
@@ -6905,7 +7036,7 @@ Comment$4.default = Comment$4;
|
|
|
6905
7036
|
let { isClean: isClean$1, my: my$1 } = symbols;
|
|
6906
7037
|
let Declaration$3 = declaration;
|
|
6907
7038
|
let Comment$3 = comment;
|
|
6908
|
-
let Node$
|
|
7039
|
+
let Node$2 = node;
|
|
6909
7040
|
let parse$4, Rule$4, AtRule$4, Root$6;
|
|
6910
7041
|
function cleanSource(nodes) {
|
|
6911
7042
|
return nodes.map((i2) => {
|
|
@@ -6922,7 +7053,7 @@ function markDirtyUp(node2) {
|
|
|
6922
7053
|
}
|
|
6923
7054
|
}
|
|
6924
7055
|
}
|
|
6925
|
-
let Container$7 = class Container2 extends Node$
|
|
7056
|
+
let Container$7 = class Container2 extends Node$2 {
|
|
6926
7057
|
append(...children) {
|
|
6927
7058
|
for (let child of children) {
|
|
6928
7059
|
let nodes = this.normalize(child, this.last);
|
|
@@ -8949,7 +9080,7 @@ let parse = parse_1;
|
|
|
8949
9080
|
let list = list_1;
|
|
8950
9081
|
let Rule22 = rule;
|
|
8951
9082
|
let Root22 = root;
|
|
8952
|
-
let
|
|
9083
|
+
let Node$1 = node;
|
|
8953
9084
|
function postcss(...plugins) {
|
|
8954
9085
|
if (plugins.length === 1 && Array.isArray(plugins[0])) {
|
|
8955
9086
|
plugins = plugins[0];
|
|
@@ -9009,7 +9140,7 @@ postcss.Result = Result22;
|
|
|
9009
9140
|
postcss.Input = Input22;
|
|
9010
9141
|
postcss.Rule = Rule22;
|
|
9011
9142
|
postcss.Root = Root22;
|
|
9012
|
-
postcss.Node =
|
|
9143
|
+
postcss.Node = Node$1;
|
|
9013
9144
|
LazyResult22.registerPostcss(postcss);
|
|
9014
9145
|
var postcss_1 = postcss;
|
|
9015
9146
|
postcss.default = postcss;
|
|
@@ -10880,20 +11011,20 @@ var IncrementalSource = /* @__PURE__ */ ((IncrementalSource2) => {
|
|
|
10880
11011
|
IncrementalSource2[IncrementalSource2["Selection"] = 14] = "Selection";
|
|
10881
11012
|
IncrementalSource2[IncrementalSource2["AdoptedStyleSheet"] = 15] = "AdoptedStyleSheet";
|
|
10882
11013
|
IncrementalSource2[IncrementalSource2["CustomElement"] = 16] = "CustomElement";
|
|
11014
|
+
IncrementalSource2[IncrementalSource2["VisibilityChange"] = 17] = "VisibilityChange";
|
|
10883
11015
|
return IncrementalSource2;
|
|
10884
11016
|
})(IncrementalSource || {});
|
|
10885
11017
|
var MouseInteractions = /* @__PURE__ */ ((MouseInteractions2) => {
|
|
10886
11018
|
MouseInteractions2[MouseInteractions2["MouseUp"] = 0] = "MouseUp";
|
|
10887
11019
|
MouseInteractions2[MouseInteractions2["MouseDown"] = 1] = "MouseDown";
|
|
10888
11020
|
MouseInteractions2[MouseInteractions2["Click"] = 2] = "Click";
|
|
10889
|
-
MouseInteractions2[MouseInteractions2["
|
|
10890
|
-
MouseInteractions2[MouseInteractions2["
|
|
10891
|
-
MouseInteractions2[MouseInteractions2["
|
|
10892
|
-
MouseInteractions2[MouseInteractions2["
|
|
10893
|
-
MouseInteractions2[MouseInteractions2["
|
|
10894
|
-
MouseInteractions2[MouseInteractions2["
|
|
10895
|
-
MouseInteractions2[MouseInteractions2["
|
|
10896
|
-
MouseInteractions2[MouseInteractions2["TouchCancel"] = 10] = "TouchCancel";
|
|
11021
|
+
MouseInteractions2[MouseInteractions2["DblClick"] = 3] = "DblClick";
|
|
11022
|
+
MouseInteractions2[MouseInteractions2["Focus"] = 4] = "Focus";
|
|
11023
|
+
MouseInteractions2[MouseInteractions2["Blur"] = 5] = "Blur";
|
|
11024
|
+
MouseInteractions2[MouseInteractions2["TouchStart"] = 6] = "TouchStart";
|
|
11025
|
+
MouseInteractions2[MouseInteractions2["TouchMove_Departed"] = 7] = "TouchMove_Departed";
|
|
11026
|
+
MouseInteractions2[MouseInteractions2["TouchEnd"] = 8] = "TouchEnd";
|
|
11027
|
+
MouseInteractions2[MouseInteractions2["TouchCancel"] = 9] = "TouchCancel";
|
|
10897
11028
|
return MouseInteractions2;
|
|
10898
11029
|
})(MouseInteractions || {});
|
|
10899
11030
|
var PointerTypes = /* @__PURE__ */ ((PointerTypes2) => {
|
|
@@ -11613,6 +11744,54 @@ function initMutationObserver(options, rootEl) {
|
|
|
11613
11744
|
});
|
|
11614
11745
|
return observer;
|
|
11615
11746
|
}
|
|
11747
|
+
function initVisibilityObserver({
|
|
11748
|
+
visibilityChangeCb,
|
|
11749
|
+
doc,
|
|
11750
|
+
mirror: mirror2
|
|
11751
|
+
}) {
|
|
11752
|
+
if (!visibilityChangeCb) {
|
|
11753
|
+
return () => {
|
|
11754
|
+
};
|
|
11755
|
+
}
|
|
11756
|
+
const observedElements = /* @__PURE__ */ new WeakMap();
|
|
11757
|
+
const observer = new IntersectionObserver(
|
|
11758
|
+
(entries) => {
|
|
11759
|
+
entries.forEach((entry) => {
|
|
11760
|
+
const target = entry.target;
|
|
11761
|
+
const id = mirror2.getId(target);
|
|
11762
|
+
const isVisible = entry.isIntersecting || entry.intersectionRatio > 0;
|
|
11763
|
+
if (id !== -1) {
|
|
11764
|
+
if (observedElements.has(target)) {
|
|
11765
|
+
visibilityChangeCb({
|
|
11766
|
+
id,
|
|
11767
|
+
isVisible,
|
|
11768
|
+
visibilityRatio: entry.intersectionRatio,
|
|
11769
|
+
boundingRect: entry.boundingClientRect
|
|
11770
|
+
});
|
|
11771
|
+
} else {
|
|
11772
|
+
observedElements.set(target, true);
|
|
11773
|
+
}
|
|
11774
|
+
}
|
|
11775
|
+
});
|
|
11776
|
+
},
|
|
11777
|
+
{ root: null, threshold: [0.1, 0.9] }
|
|
11778
|
+
);
|
|
11779
|
+
doc.querySelectorAll("*").forEach((el) => observer.observe(el));
|
|
11780
|
+
const mutationObserver = new MutationObserver((mutations) => {
|
|
11781
|
+
mutations.forEach((mutation) => {
|
|
11782
|
+
mutation.addedNodes.forEach((node2) => {
|
|
11783
|
+
if (node2 instanceof Element) {
|
|
11784
|
+
observer.observe(node2);
|
|
11785
|
+
}
|
|
11786
|
+
});
|
|
11787
|
+
});
|
|
11788
|
+
});
|
|
11789
|
+
mutationObserver.observe(doc, { childList: true, subtree: true });
|
|
11790
|
+
return () => {
|
|
11791
|
+
observer.disconnect();
|
|
11792
|
+
mutationObserver.disconnect();
|
|
11793
|
+
};
|
|
11794
|
+
}
|
|
11616
11795
|
function initMoveObserver({
|
|
11617
11796
|
mousemoveCb,
|
|
11618
11797
|
sampling,
|
|
@@ -12428,6 +12607,7 @@ function initCustomElementObserver({
|
|
|
12428
12607
|
function mergeHooks(o2, hooks) {
|
|
12429
12608
|
const {
|
|
12430
12609
|
mutationCb,
|
|
12610
|
+
visibilityChangeCb,
|
|
12431
12611
|
mousemoveCb,
|
|
12432
12612
|
mouseInteractionCb,
|
|
12433
12613
|
scrollCb,
|
|
@@ -12447,6 +12627,12 @@ function mergeHooks(o2, hooks) {
|
|
|
12447
12627
|
}
|
|
12448
12628
|
mutationCb(...p);
|
|
12449
12629
|
};
|
|
12630
|
+
o2.visibilityChangeCb = (...p) => {
|
|
12631
|
+
if (hooks.visibilityChange) {
|
|
12632
|
+
hooks.visibilityChange(...p);
|
|
12633
|
+
}
|
|
12634
|
+
visibilityChangeCb(...p);
|
|
12635
|
+
};
|
|
12450
12636
|
o2.mousemoveCb = (...p) => {
|
|
12451
12637
|
if (hooks.mousemove) {
|
|
12452
12638
|
hooks.mousemove(...p);
|
|
@@ -12521,6 +12707,7 @@ function mergeHooks(o2, hooks) {
|
|
|
12521
12707
|
};
|
|
12522
12708
|
}
|
|
12523
12709
|
function initObservers(o2, hooks = {}) {
|
|
12710
|
+
console.info("initObservers", o2);
|
|
12524
12711
|
const currentWindow = o2.doc.defaultView;
|
|
12525
12712
|
if (!currentWindow) {
|
|
12526
12713
|
return () => {
|
|
@@ -12539,6 +12726,7 @@ function initObservers(o2, hooks = {}) {
|
|
|
12539
12726
|
});
|
|
12540
12727
|
const inputHandler = initInputObserver(o2);
|
|
12541
12728
|
const mediaInteractionHandler = initMediaInteractionObserver(o2);
|
|
12729
|
+
const visibleHandler = initVisibilityObserver(o2);
|
|
12542
12730
|
let styleSheetObserver = () => {
|
|
12543
12731
|
};
|
|
12544
12732
|
let adoptedStyleSheetObserver = () => {
|
|
@@ -12568,6 +12756,7 @@ function initObservers(o2, hooks = {}) {
|
|
|
12568
12756
|
return callbackWrapper(() => {
|
|
12569
12757
|
mutationBuffers.forEach((b) => b.reset());
|
|
12570
12758
|
mutationObserver == null ? void 0 : mutationObserver.disconnect();
|
|
12759
|
+
visibleHandler();
|
|
12571
12760
|
mousemoveHandler();
|
|
12572
12761
|
mouseInteractionHandler();
|
|
12573
12762
|
scrollHandler();
|
|
@@ -13654,6 +13843,7 @@ function record(options = {}) {
|
|
|
13654
13843
|
emit,
|
|
13655
13844
|
checkoutEveryNms,
|
|
13656
13845
|
checkoutEveryNth,
|
|
13846
|
+
checkoutEveryEvc,
|
|
13657
13847
|
blockClass = "rr-block",
|
|
13658
13848
|
blockSelector = null,
|
|
13659
13849
|
ignoreClass = "rr-ignore",
|
|
@@ -13944,6 +14134,11 @@ function record(options = {}) {
|
|
|
13944
14134
|
mirror.getId(document)
|
|
13945
14135
|
);
|
|
13946
14136
|
};
|
|
14137
|
+
const debouncedFullSnapshot = throttle(() => {
|
|
14138
|
+
if (checkoutEveryEvc) {
|
|
14139
|
+
takeFullSnapshot$1(true);
|
|
14140
|
+
}
|
|
14141
|
+
}, 100, { leading: false, trailing: true });
|
|
13947
14142
|
try {
|
|
13948
14143
|
const handlers = [];
|
|
13949
14144
|
const observe = (doc) => {
|
|
@@ -13951,6 +14146,18 @@ function record(options = {}) {
|
|
|
13951
14146
|
return callbackWrapper(initObservers)(
|
|
13952
14147
|
{
|
|
13953
14148
|
mutationCb: wrappedMutationEmit,
|
|
14149
|
+
visibilityChangeCb: (v2) => {
|
|
14150
|
+
debouncedFullSnapshot();
|
|
14151
|
+
if (sampling.visibility) {
|
|
14152
|
+
return wrappedEmit({
|
|
14153
|
+
type: EventType.IncrementalSnapshot,
|
|
14154
|
+
data: {
|
|
14155
|
+
source: IncrementalSource.VisibilityChange,
|
|
14156
|
+
...v2
|
|
14157
|
+
}
|
|
14158
|
+
});
|
|
14159
|
+
}
|
|
14160
|
+
},
|
|
13954
14161
|
mousemoveCb: (positions, source) => wrappedEmit({
|
|
13955
14162
|
type: EventType.IncrementalSnapshot,
|
|
13956
14163
|
data: {
|