@glimt/record 0.0.7 → 0.0.9
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/record.cjs +212 -81
- package/dist/record.cjs.map +1 -1
- package/dist/record.js +212 -81
- package/dist/record.js.map +1 -1
- package/dist/record.umd.cjs +214 -95
- package/dist/record.umd.cjs.map +3 -3
- package/dist/record.umd.min.cjs +25 -37
- package/dist/record.umd.min.cjs.map +4 -4
- package/package.json +2 -2
package/dist/record.cjs
CHANGED
|
@@ -42,9 +42,9 @@ function getUntaintedPrototype$1(key) {
|
|
|
42
42
|
accessorNames && // @ts-expect-error 2345
|
|
43
43
|
accessorNames.every(
|
|
44
44
|
(accessor) => {
|
|
45
|
-
var _a2,
|
|
45
|
+
var _a2, _b2;
|
|
46
46
|
return Boolean(
|
|
47
|
-
(
|
|
47
|
+
(_b2 = (_a2 = Object.getOwnPropertyDescriptor(defaultPrototype, accessor)) == null ? void 0 : _a2.get) == null ? void 0 : _b2.toString().includes("[native code]")
|
|
48
48
|
);
|
|
49
49
|
}
|
|
50
50
|
)
|
|
@@ -144,6 +144,32 @@ function querySelectorAll$1(n2, selectors) {
|
|
|
144
144
|
function mutationObserverCtor$1() {
|
|
145
145
|
return getUntaintedPrototype$1("MutationObserver").constructor;
|
|
146
146
|
}
|
|
147
|
+
function patch$1(source, name, replacement) {
|
|
148
|
+
try {
|
|
149
|
+
if (!(name in source)) {
|
|
150
|
+
return () => {
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
const original = source[name];
|
|
154
|
+
const wrapped = replacement(original);
|
|
155
|
+
if (typeof wrapped === "function") {
|
|
156
|
+
wrapped.prototype = wrapped.prototype || {};
|
|
157
|
+
Object.defineProperties(wrapped, {
|
|
158
|
+
__rrweb_original__: {
|
|
159
|
+
enumerable: false,
|
|
160
|
+
value: original
|
|
161
|
+
}
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
source[name] = wrapped;
|
|
165
|
+
return () => {
|
|
166
|
+
source[name] = original;
|
|
167
|
+
};
|
|
168
|
+
} catch {
|
|
169
|
+
return () => {
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
}
|
|
147
173
|
const index$1 = {
|
|
148
174
|
childNodes: childNodes$1,
|
|
149
175
|
parentNode: parentNode$1,
|
|
@@ -156,7 +182,8 @@ const index$1 = {
|
|
|
156
182
|
shadowRoot: shadowRoot$1,
|
|
157
183
|
querySelector: querySelector$1,
|
|
158
184
|
querySelectorAll: querySelectorAll$1,
|
|
159
|
-
mutationObserver: mutationObserverCtor$1
|
|
185
|
+
mutationObserver: mutationObserverCtor$1,
|
|
186
|
+
patch: patch$1
|
|
160
187
|
};
|
|
161
188
|
function isElement(n2) {
|
|
162
189
|
return n2.nodeType === n2.ELEMENT_NODE;
|
|
@@ -425,26 +452,97 @@ function absolutifyURLs(cssText, href) {
|
|
|
425
452
|
}
|
|
426
453
|
);
|
|
427
454
|
}
|
|
428
|
-
function normalizeCssString(cssText) {
|
|
429
|
-
|
|
455
|
+
function normalizeCssString(cssText, _testNoPxNorm = false) {
|
|
456
|
+
if (_testNoPxNorm) {
|
|
457
|
+
return cssText.replace(/(\/\*[^*]*\*\/)|[\s;]/g, "");
|
|
458
|
+
} else {
|
|
459
|
+
return cssText.replace(/(\/\*[^*]*\*\/)|[\s;]/g, "").replace(/0px/g, "0");
|
|
460
|
+
}
|
|
430
461
|
}
|
|
431
|
-
function splitCssText(cssText, style) {
|
|
462
|
+
function splitCssText(cssText, style, _testNoPxNorm = false) {
|
|
432
463
|
const childNodes2 = Array.from(style.childNodes);
|
|
433
464
|
const splits = [];
|
|
465
|
+
let iterCount = 0;
|
|
434
466
|
if (childNodes2.length > 1 && cssText && typeof cssText === "string") {
|
|
435
|
-
|
|
467
|
+
let cssTextNorm = normalizeCssString(cssText, _testNoPxNorm);
|
|
468
|
+
const normFactor = cssTextNorm.length / cssText.length;
|
|
436
469
|
for (let i2 = 1; i2 < childNodes2.length; i2++) {
|
|
437
470
|
if (childNodes2[i2].textContent && typeof childNodes2[i2].textContent === "string") {
|
|
438
|
-
const textContentNorm = normalizeCssString(
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
471
|
+
const textContentNorm = normalizeCssString(
|
|
472
|
+
childNodes2[i2].textContent,
|
|
473
|
+
_testNoPxNorm
|
|
474
|
+
);
|
|
475
|
+
const jLimit = 100;
|
|
476
|
+
let j = 3;
|
|
477
|
+
for (; j < textContentNorm.length; j++) {
|
|
478
|
+
if (
|
|
479
|
+
// keep consuming css identifiers (to get a decent chunk more quickly)
|
|
480
|
+
textContentNorm[j].match(/[a-zA-Z0-9]/) || // substring needs to be unique to this section
|
|
481
|
+
textContentNorm.indexOf(textContentNorm.substring(0, j), 1) !== -1
|
|
482
|
+
) {
|
|
483
|
+
continue;
|
|
484
|
+
}
|
|
485
|
+
break;
|
|
486
|
+
}
|
|
487
|
+
for (; j < textContentNorm.length; j++) {
|
|
488
|
+
let startSubstring = textContentNorm.substring(0, j);
|
|
489
|
+
let cssNormSplits = cssTextNorm.split(startSubstring);
|
|
490
|
+
let splitNorm = -1;
|
|
491
|
+
if (cssNormSplits.length === 2) {
|
|
492
|
+
splitNorm = cssNormSplits[0].length;
|
|
493
|
+
} else if (cssNormSplits.length > 2 && cssNormSplits[0] === "" && childNodes2[i2 - 1].textContent !== "") {
|
|
494
|
+
splitNorm = cssTextNorm.indexOf(startSubstring, 1);
|
|
495
|
+
} else if (cssNormSplits.length === 1) {
|
|
496
|
+
startSubstring = startSubstring.substring(
|
|
497
|
+
0,
|
|
498
|
+
startSubstring.length - 1
|
|
499
|
+
);
|
|
500
|
+
cssNormSplits = cssTextNorm.split(startSubstring);
|
|
501
|
+
if (cssNormSplits.length <= 1) {
|
|
502
|
+
splits.push(cssText);
|
|
503
|
+
return splits;
|
|
504
|
+
}
|
|
505
|
+
j = jLimit + 1;
|
|
506
|
+
} else if (j === textContentNorm.length - 1) {
|
|
507
|
+
splitNorm = cssTextNorm.indexOf(startSubstring);
|
|
508
|
+
}
|
|
509
|
+
if (cssNormSplits.length >= 2 && j > jLimit) {
|
|
510
|
+
const prevTextContent = childNodes2[i2 - 1].textContent;
|
|
511
|
+
if (prevTextContent && typeof prevTextContent === "string") {
|
|
512
|
+
const prevMinLength = normalizeCssString(prevTextContent).length;
|
|
513
|
+
splitNorm = cssTextNorm.indexOf(startSubstring, prevMinLength);
|
|
514
|
+
}
|
|
515
|
+
if (splitNorm === -1) {
|
|
516
|
+
splitNorm = cssNormSplits[0].length;
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
if (splitNorm !== -1) {
|
|
520
|
+
let k = Math.floor(splitNorm / normFactor);
|
|
521
|
+
for (; k > 0 && k < cssText.length; ) {
|
|
522
|
+
iterCount += 1;
|
|
523
|
+
if (iterCount > 50 * childNodes2.length) {
|
|
524
|
+
splits.push(cssText);
|
|
525
|
+
return splits;
|
|
526
|
+
}
|
|
527
|
+
const normPart = normalizeCssString(
|
|
528
|
+
cssText.substring(0, k),
|
|
529
|
+
_testNoPxNorm
|
|
530
|
+
);
|
|
531
|
+
if (normPart.length === splitNorm) {
|
|
445
532
|
splits.push(cssText.substring(0, k));
|
|
446
533
|
cssText = cssText.substring(k);
|
|
534
|
+
cssTextNorm = cssTextNorm.substring(splitNorm);
|
|
447
535
|
break;
|
|
536
|
+
} else if (normPart.length < splitNorm) {
|
|
537
|
+
k += Math.max(
|
|
538
|
+
1,
|
|
539
|
+
Math.floor((splitNorm - normPart.length) / normFactor)
|
|
540
|
+
);
|
|
541
|
+
} else {
|
|
542
|
+
k -= Math.max(
|
|
543
|
+
1,
|
|
544
|
+
Math.floor((normPart.length - splitNorm) * normFactor)
|
|
545
|
+
);
|
|
448
546
|
}
|
|
449
547
|
}
|
|
450
548
|
break;
|
|
@@ -923,11 +1021,35 @@ function serializeElementNode(n2, options) {
|
|
|
923
1021
|
canvasService = doc.createElement("canvas");
|
|
924
1022
|
canvasCtx = canvasService.getContext("2d");
|
|
925
1023
|
}
|
|
926
|
-
|
|
1024
|
+
let image = n2.cloneNode(true);
|
|
927
1025
|
const imageSrc = image.currentSrc || image.getAttribute("src") || "<unknown-src>";
|
|
928
1026
|
const priorCrossOrigin = image.crossOrigin;
|
|
1027
|
+
console.log(
|
|
1028
|
+
"initializing inlineImages with image:",
|
|
1029
|
+
image,
|
|
1030
|
+
"imageSrc:",
|
|
1031
|
+
imageSrc,
|
|
1032
|
+
"priorCrossOrigin:",
|
|
1033
|
+
priorCrossOrigin
|
|
1034
|
+
);
|
|
1035
|
+
const cleanupCrossOriginAttribute = () => {
|
|
1036
|
+
console.log("cleaning up attributes");
|
|
1037
|
+
console.log("priorCrossOrigin", priorCrossOrigin);
|
|
1038
|
+
console.log("currentCrossOrigin", image.crossOrigin);
|
|
1039
|
+
if (image.crossOrigin === "anonymous") {
|
|
1040
|
+
if (priorCrossOrigin) {
|
|
1041
|
+
image.setAttribute("crossorigin", priorCrossOrigin);
|
|
1042
|
+
attributes.crossOrigin = priorCrossOrigin;
|
|
1043
|
+
} else {
|
|
1044
|
+
image.removeAttribute("crossorigin");
|
|
1045
|
+
}
|
|
1046
|
+
}
|
|
1047
|
+
image = null;
|
|
1048
|
+
};
|
|
929
1049
|
const recordInlineImage = () => {
|
|
1050
|
+
console.log("recordInlineImage()");
|
|
930
1051
|
image.removeEventListener("load", recordInlineImage);
|
|
1052
|
+
image.removeEventListener("error", onImageLoadError);
|
|
931
1053
|
try {
|
|
932
1054
|
canvasService.width = image.naturalWidth;
|
|
933
1055
|
canvasService.height = image.naturalHeight;
|
|
@@ -937,11 +1059,15 @@ function serializeElementNode(n2, options) {
|
|
|
937
1059
|
dataURLOptions.quality
|
|
938
1060
|
);
|
|
939
1061
|
} catch (err) {
|
|
1062
|
+
console.log("catched err", err);
|
|
940
1063
|
if (image.crossOrigin !== "anonymous") {
|
|
941
1064
|
image.crossOrigin = "anonymous";
|
|
942
1065
|
if (image.complete && image.naturalWidth !== 0)
|
|
943
1066
|
recordInlineImage();
|
|
944
|
-
else
|
|
1067
|
+
else {
|
|
1068
|
+
image.addEventListener("load", recordInlineImage);
|
|
1069
|
+
image.addEventListener("error", onImageLoadError);
|
|
1070
|
+
}
|
|
945
1071
|
return;
|
|
946
1072
|
} else {
|
|
947
1073
|
console.warn(
|
|
@@ -949,12 +1075,19 @@ function serializeElementNode(n2, options) {
|
|
|
949
1075
|
);
|
|
950
1076
|
}
|
|
951
1077
|
}
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
1078
|
+
cleanupCrossOriginAttribute();
|
|
1079
|
+
};
|
|
1080
|
+
const onImageLoadError = () => {
|
|
1081
|
+
console.log("onImageLoadError()");
|
|
1082
|
+
image.removeEventListener("load", recordInlineImage);
|
|
1083
|
+
image.removeEventListener("error", onImageLoadError);
|
|
1084
|
+
cleanupCrossOriginAttribute();
|
|
955
1085
|
};
|
|
956
1086
|
if (image.complete && image.naturalWidth !== 0) recordInlineImage();
|
|
957
|
-
else
|
|
1087
|
+
else {
|
|
1088
|
+
image.addEventListener("load", recordInlineImage);
|
|
1089
|
+
image.addEventListener("error", onImageLoadError);
|
|
1090
|
+
}
|
|
958
1091
|
}
|
|
959
1092
|
if (tagName === "audio" || tagName === "video") {
|
|
960
1093
|
const mediaAttributes = attributes;
|
|
@@ -1016,7 +1149,7 @@ function slimDOMExcluded(sn, slimDOMOptions) {
|
|
|
1016
1149
|
} else if (sn.type === NodeType$3.Element) {
|
|
1017
1150
|
if (slimDOMOptions.script && // script tag
|
|
1018
1151
|
(sn.tagName === "script" || // (module)preload link
|
|
1019
|
-
sn.tagName === "link" && (sn.attributes.rel === "preload"
|
|
1152
|
+
sn.tagName === "link" && (sn.attributes.rel === "preload" && sn.attributes.as === "script" || sn.attributes.rel === "modulepreload") || // prefetch link
|
|
1020
1153
|
sn.tagName === "link" && sn.attributes.rel === "prefetch" && typeof sn.attributes.href === "string" && extractFileExtension(sn.attributes.href) === "js")) {
|
|
1021
1154
|
return true;
|
|
1022
1155
|
} else if (slimDOMOptions.headFavicon && (sn.tagName === "link" && sn.attributes.rel === "shortcut icon" || sn.tagName === "meta" && (lowerIfExists(sn.attributes.name).match(
|
|
@@ -1160,7 +1293,10 @@ function serializeNodeWithId(n2, options) {
|
|
|
1160
1293
|
bypassOptions.cssCaptured = true;
|
|
1161
1294
|
}
|
|
1162
1295
|
for (const childN of Array.from(index$1.childNodes(n2))) {
|
|
1163
|
-
const serializedChildNode = serializeNodeWithId(
|
|
1296
|
+
const serializedChildNode = serializeNodeWithId(
|
|
1297
|
+
childN,
|
|
1298
|
+
bypassOptions
|
|
1299
|
+
);
|
|
1164
1300
|
if (serializedChildNode) {
|
|
1165
1301
|
serializedNode.childNodes.push(serializedChildNode);
|
|
1166
1302
|
}
|
|
@@ -1169,7 +1305,10 @@ function serializeNodeWithId(n2, options) {
|
|
|
1169
1305
|
let shadowRootEl = null;
|
|
1170
1306
|
if (isElement(n2) && (shadowRootEl = index$1.shadowRoot(n2))) {
|
|
1171
1307
|
for (const childN of Array.from(index$1.childNodes(shadowRootEl))) {
|
|
1172
|
-
const serializedChildNode = serializeNodeWithId(
|
|
1308
|
+
const serializedChildNode = serializeNodeWithId(
|
|
1309
|
+
childN,
|
|
1310
|
+
bypassOptions
|
|
1311
|
+
);
|
|
1173
1312
|
if (serializedChildNode) {
|
|
1174
1313
|
isNativeShadowDom(shadowRootEl) && (serializedChildNode.isShadow = true);
|
|
1175
1314
|
serializedNode.childNodes.push(serializedChildNode);
|
|
@@ -2114,16 +2253,6 @@ let Declaration$4$1 = class Declaration extends Node$3$1 {
|
|
|
2114
2253
|
var declaration$1 = Declaration$4$1;
|
|
2115
2254
|
Declaration$4$1.default = Declaration$4$1;
|
|
2116
2255
|
let urlAlphabet$1 = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
|
|
2117
|
-
let customAlphabet$1 = (alphabet, defaultSize = 21) => {
|
|
2118
|
-
return (size = defaultSize) => {
|
|
2119
|
-
let id = "";
|
|
2120
|
-
let i2 = size;
|
|
2121
|
-
while (i2--) {
|
|
2122
|
-
id += alphabet[Math.random() * alphabet.length | 0];
|
|
2123
|
-
}
|
|
2124
|
-
return id;
|
|
2125
|
-
};
|
|
2126
|
-
};
|
|
2127
2256
|
let nanoid$1$1 = (size = 21) => {
|
|
2128
2257
|
let id = "";
|
|
2129
2258
|
let i2 = size;
|
|
@@ -2132,7 +2261,7 @@ let nanoid$1$1 = (size = 21) => {
|
|
|
2132
2261
|
}
|
|
2133
2262
|
return id;
|
|
2134
2263
|
};
|
|
2135
|
-
var nonSecure$1 = { nanoid: nanoid$1$1
|
|
2264
|
+
var nonSecure$1 = { nanoid: nanoid$1$1 };
|
|
2136
2265
|
let { SourceMapConsumer: SourceMapConsumer$2$1, SourceMapGenerator: SourceMapGenerator$2$1 } = require$$2$1;
|
|
2137
2266
|
let { existsSync: existsSync$1, readFileSync: readFileSync$1 } = require$$2$1;
|
|
2138
2267
|
let { dirname: dirname$1$1, join: join$1 } = require$$2$1;
|
|
@@ -5666,16 +5795,6 @@ let Declaration$4 = class Declaration2 extends Node$3 {
|
|
|
5666
5795
|
var declaration = Declaration$4;
|
|
5667
5796
|
Declaration$4.default = Declaration$4;
|
|
5668
5797
|
let urlAlphabet = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
|
|
5669
|
-
let customAlphabet = (alphabet, defaultSize = 21) => {
|
|
5670
|
-
return (size = defaultSize) => {
|
|
5671
|
-
let id = "";
|
|
5672
|
-
let i2 = size;
|
|
5673
|
-
while (i2--) {
|
|
5674
|
-
id += alphabet[Math.random() * alphabet.length | 0];
|
|
5675
|
-
}
|
|
5676
|
-
return id;
|
|
5677
|
-
};
|
|
5678
|
-
};
|
|
5679
5798
|
let nanoid$1 = (size = 21) => {
|
|
5680
5799
|
let id = "";
|
|
5681
5800
|
let i2 = size;
|
|
@@ -5684,7 +5803,7 @@ let nanoid$1 = (size = 21) => {
|
|
|
5684
5803
|
}
|
|
5685
5804
|
return id;
|
|
5686
5805
|
};
|
|
5687
|
-
var nonSecure = { nanoid: nanoid$1
|
|
5806
|
+
var nonSecure = { nanoid: nanoid$1 };
|
|
5688
5807
|
let { SourceMapConsumer: SourceMapConsumer$2, SourceMapGenerator: SourceMapGenerator$2 } = require$$2;
|
|
5689
5808
|
let { existsSync, readFileSync } = require$$2;
|
|
5690
5809
|
let { dirname: dirname$1, join } = require$$2;
|
|
@@ -8535,9 +8654,9 @@ function getUntaintedPrototype(key) {
|
|
|
8535
8654
|
accessorNames && // @ts-expect-error 2345
|
|
8536
8655
|
accessorNames.every(
|
|
8537
8656
|
(accessor) => {
|
|
8538
|
-
var _a2,
|
|
8657
|
+
var _a2, _b2;
|
|
8539
8658
|
return Boolean(
|
|
8540
|
-
(
|
|
8659
|
+
(_b2 = (_a2 = Object.getOwnPropertyDescriptor(defaultPrototype, accessor)) == null ? void 0 : _a2.get) == null ? void 0 : _b2.toString().includes("[native code]")
|
|
8541
8660
|
);
|
|
8542
8661
|
}
|
|
8543
8662
|
)
|
|
@@ -8637,6 +8756,32 @@ function querySelectorAll(n2, selectors) {
|
|
|
8637
8756
|
function mutationObserverCtor() {
|
|
8638
8757
|
return getUntaintedPrototype("MutationObserver").constructor;
|
|
8639
8758
|
}
|
|
8759
|
+
function patch(source, name, replacement) {
|
|
8760
|
+
try {
|
|
8761
|
+
if (!(name in source)) {
|
|
8762
|
+
return () => {
|
|
8763
|
+
};
|
|
8764
|
+
}
|
|
8765
|
+
const original = source[name];
|
|
8766
|
+
const wrapped = replacement(original);
|
|
8767
|
+
if (typeof wrapped === "function") {
|
|
8768
|
+
wrapped.prototype = wrapped.prototype || {};
|
|
8769
|
+
Object.defineProperties(wrapped, {
|
|
8770
|
+
__rrweb_original__: {
|
|
8771
|
+
enumerable: false,
|
|
8772
|
+
value: original
|
|
8773
|
+
}
|
|
8774
|
+
});
|
|
8775
|
+
}
|
|
8776
|
+
source[name] = wrapped;
|
|
8777
|
+
return () => {
|
|
8778
|
+
source[name] = original;
|
|
8779
|
+
};
|
|
8780
|
+
} catch {
|
|
8781
|
+
return () => {
|
|
8782
|
+
};
|
|
8783
|
+
}
|
|
8784
|
+
}
|
|
8640
8785
|
const index = {
|
|
8641
8786
|
childNodes,
|
|
8642
8787
|
parentNode,
|
|
@@ -8649,7 +8794,8 @@ const index = {
|
|
|
8649
8794
|
shadowRoot,
|
|
8650
8795
|
querySelector,
|
|
8651
8796
|
querySelectorAll,
|
|
8652
|
-
mutationObserver: mutationObserverCtor
|
|
8797
|
+
mutationObserver: mutationObserverCtor,
|
|
8798
|
+
patch
|
|
8653
8799
|
};
|
|
8654
8800
|
function on(type, fn, target = document) {
|
|
8655
8801
|
const options = { capture: true, passive: true };
|
|
@@ -8732,41 +8878,15 @@ function hookSetter(target, key, d, isRevoked, win = window) {
|
|
|
8732
8878
|
);
|
|
8733
8879
|
return () => hookSetter(target, key, original || {}, true);
|
|
8734
8880
|
}
|
|
8735
|
-
function patch(source, name, replacement) {
|
|
8736
|
-
try {
|
|
8737
|
-
if (!(name in source)) {
|
|
8738
|
-
return () => {
|
|
8739
|
-
};
|
|
8740
|
-
}
|
|
8741
|
-
const original = source[name];
|
|
8742
|
-
const wrapped = replacement(original);
|
|
8743
|
-
if (typeof wrapped === "function") {
|
|
8744
|
-
wrapped.prototype = wrapped.prototype || {};
|
|
8745
|
-
Object.defineProperties(wrapped, {
|
|
8746
|
-
__rrweb_original__: {
|
|
8747
|
-
enumerable: false,
|
|
8748
|
-
value: original
|
|
8749
|
-
}
|
|
8750
|
-
});
|
|
8751
|
-
}
|
|
8752
|
-
source[name] = wrapped;
|
|
8753
|
-
return () => {
|
|
8754
|
-
source[name] = original;
|
|
8755
|
-
};
|
|
8756
|
-
} catch {
|
|
8757
|
-
return () => {
|
|
8758
|
-
};
|
|
8759
|
-
}
|
|
8760
|
-
}
|
|
8761
8881
|
let nowTimestamp = Date.now;
|
|
8762
8882
|
if (!/* @__PURE__ */ /[1-9][0-9]{12}/.test(Date.now().toString())) {
|
|
8763
8883
|
nowTimestamp = () => (/* @__PURE__ */ new Date()).getTime();
|
|
8764
8884
|
}
|
|
8765
8885
|
function getWindowScroll(win) {
|
|
8766
|
-
var _a2,
|
|
8886
|
+
var _a2, _b2, _c, _d;
|
|
8767
8887
|
const doc = win.document;
|
|
8768
8888
|
return {
|
|
8769
|
-
left: doc.scrollingElement ? doc.scrollingElement.scrollLeft : win.pageXOffset !== void 0 ? win.pageXOffset : doc.documentElement.scrollLeft || (doc == null ? void 0 : doc.body) && ((_a2 = index.parentElement(doc.body)) == null ? void 0 : _a2.scrollLeft) || ((
|
|
8889
|
+
left: doc.scrollingElement ? doc.scrollingElement.scrollLeft : win.pageXOffset !== void 0 ? win.pageXOffset : doc.documentElement.scrollLeft || (doc == null ? void 0 : doc.body) && ((_a2 = index.parentElement(doc.body)) == null ? void 0 : _a2.scrollLeft) || ((_b2 = doc == null ? void 0 : doc.body) == null ? void 0 : _b2.scrollLeft) || 0,
|
|
8770
8890
|
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
|
|
8771
8891
|
};
|
|
8772
8892
|
}
|
|
@@ -9319,10 +9439,18 @@ class MutationBuffer {
|
|
|
9319
9439
|
this.attributes.push(item);
|
|
9320
9440
|
this.attributeMap.set(textarea, item);
|
|
9321
9441
|
}
|
|
9322
|
-
|
|
9442
|
+
const value = Array.from(
|
|
9323
9443
|
index.childNodes(textarea),
|
|
9324
9444
|
(cn) => index.textContent(cn) || ""
|
|
9325
9445
|
).join("");
|
|
9446
|
+
item.attributes.value = maskInputValue({
|
|
9447
|
+
element: textarea,
|
|
9448
|
+
maskInputOptions: this.maskInputOptions,
|
|
9449
|
+
tagName: textarea.tagName,
|
|
9450
|
+
type: getInputType(textarea),
|
|
9451
|
+
value,
|
|
9452
|
+
maskInputFn: this.maskInputFn
|
|
9453
|
+
});
|
|
9326
9454
|
});
|
|
9327
9455
|
__publicField(this, "processMutation", (m) => {
|
|
9328
9456
|
if (isIgnored(m.target, this.mirror, this.slimDOMOptions)) {
|
|
@@ -10201,11 +10329,11 @@ function initAdoptedStyleSheetObserver({
|
|
|
10201
10329
|
mirror: mirror2,
|
|
10202
10330
|
stylesheetManager
|
|
10203
10331
|
}, host2) {
|
|
10204
|
-
var _a2,
|
|
10332
|
+
var _a2, _b2, _c;
|
|
10205
10333
|
let hostId = null;
|
|
10206
10334
|
if (host2.nodeName === "#document") hostId = mirror2.getId(host2);
|
|
10207
10335
|
else hostId = mirror2.getId(index.host(host2));
|
|
10208
|
-
const patchTarget = host2.nodeName === "#document" ? (_a2 = host2.defaultView) == null ? void 0 : _a2.Document : (_c = (
|
|
10336
|
+
const patchTarget = host2.nodeName === "#document" ? (_a2 = host2.defaultView) == null ? void 0 : _a2.Document : (_c = (_b2 = host2.ownerDocument) == null ? void 0 : _b2.defaultView) == null ? void 0 : _c.ShadowRoot;
|
|
10209
10337
|
const originalPropertyDescriptor = (patchTarget == null ? void 0 : patchTarget.prototype) ? Object.getOwnPropertyDescriptor(
|
|
10210
10338
|
patchTarget == null ? void 0 : patchTarget.prototype,
|
|
10211
10339
|
"adoptedStyleSheets"
|
|
@@ -10718,7 +10846,7 @@ class IframeManager {
|
|
|
10718
10846
|
this.loadListener = cb;
|
|
10719
10847
|
}
|
|
10720
10848
|
attachIframe(iframeEl, childSn) {
|
|
10721
|
-
var _a2,
|
|
10849
|
+
var _a2, _b2;
|
|
10722
10850
|
this.mutationCb({
|
|
10723
10851
|
adds: [
|
|
10724
10852
|
{
|
|
@@ -10737,7 +10865,7 @@ class IframeManager {
|
|
|
10737
10865
|
"message",
|
|
10738
10866
|
this.handleMessage.bind(this)
|
|
10739
10867
|
);
|
|
10740
|
-
(
|
|
10868
|
+
(_b2 = this.loadListener) == null ? void 0 : _b2.call(this, iframeEl);
|
|
10741
10869
|
if (iframeEl.contentDocument && iframeEl.contentDocument.adoptedStyleSheets && iframeEl.contentDocument.adoptedStyleSheets.length > 0)
|
|
10742
10870
|
this.stylesheetManager.adoptStyleSheets(
|
|
10743
10871
|
iframeEl.contentDocument.adoptedStyleSheets,
|
|
@@ -12151,5 +12279,8 @@ var n;
|
|
|
12151
12279
|
!function(t2) {
|
|
12152
12280
|
t2[t2.NotStarted = 0] = "NotStarted", t2[t2.Running = 1] = "Running", t2[t2.Stopped = 2] = "Stopped";
|
|
12153
12281
|
}(n || (n = {}));
|
|
12282
|
+
const { addCustomEvent } = record;
|
|
12283
|
+
const { freezePage } = record;
|
|
12284
|
+
const { takeFullSnapshot } = record;
|
|
12154
12285
|
exports.record = record;
|
|
12155
12286
|
//# sourceMappingURL=record.cjs.map
|