@appsurify-testmap/rrweb-player 2.1.3-alpha.4 → 3.1.1-alpha.1
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-player.cjs +85 -57
- package/dist/rrweb-player.cjs.map +1 -1
- package/dist/rrweb-player.js +85 -57
- package/dist/rrweb-player.js.map +1 -1
- package/dist/rrweb-player.umd.cjs +85 -57
- package/dist/rrweb-player.umd.cjs.map +2 -2
- package/dist/rrweb-player.umd.min.cjs +28 -28
- package/dist/rrweb-player.umd.min.cjs.map +3 -3
- package/package.json +4 -4
package/dist/rrweb-player.cjs
CHANGED
|
@@ -617,6 +617,33 @@ const pseudoClassPlugin = {
|
|
|
617
617
|
};
|
|
618
618
|
}
|
|
619
619
|
};
|
|
620
|
+
const animationFillModePlugin = {
|
|
621
|
+
postcssPlugin: "postcss-animation-fill-mode",
|
|
622
|
+
prepare: function() {
|
|
623
|
+
return {
|
|
624
|
+
Rule: function(rule2) {
|
|
625
|
+
let hasAnimation = false;
|
|
626
|
+
let hasAnimationFillMode = false;
|
|
627
|
+
let animationDeclaration = null;
|
|
628
|
+
rule2.walkDecls((decl) => {
|
|
629
|
+
if (decl.prop === "animation") {
|
|
630
|
+
hasAnimation = true;
|
|
631
|
+
animationDeclaration = decl;
|
|
632
|
+
}
|
|
633
|
+
if (decl.prop === "animation-fill-mode") {
|
|
634
|
+
hasAnimationFillMode = true;
|
|
635
|
+
}
|
|
636
|
+
});
|
|
637
|
+
if (hasAnimation && !hasAnimationFillMode && animationDeclaration) {
|
|
638
|
+
rule2.insertAfter(animationDeclaration, {
|
|
639
|
+
prop: "animation-fill-mode",
|
|
640
|
+
value: "forwards"
|
|
641
|
+
});
|
|
642
|
+
}
|
|
643
|
+
}
|
|
644
|
+
};
|
|
645
|
+
}
|
|
646
|
+
};
|
|
620
647
|
function getDefaultExportFromCjs$1(x2) {
|
|
621
648
|
return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
|
|
622
649
|
}
|
|
@@ -633,12 +660,12 @@ function getAugmentedNamespace$1(n2) {
|
|
|
633
660
|
a2.prototype = f2.prototype;
|
|
634
661
|
} else a2 = {};
|
|
635
662
|
Object.defineProperty(a2, "__esModule", { value: true });
|
|
636
|
-
Object.keys(n2).forEach(function(
|
|
637
|
-
var d = Object.getOwnPropertyDescriptor(n2,
|
|
638
|
-
Object.defineProperty(a2,
|
|
663
|
+
Object.keys(n2).forEach(function(k2) {
|
|
664
|
+
var d = Object.getOwnPropertyDescriptor(n2, k2);
|
|
665
|
+
Object.defineProperty(a2, k2, d.get ? d : {
|
|
639
666
|
enumerable: true,
|
|
640
667
|
get: function() {
|
|
641
|
-
return n2[
|
|
668
|
+
return n2[k2];
|
|
642
669
|
}
|
|
643
670
|
});
|
|
644
671
|
});
|
|
@@ -1062,7 +1089,7 @@ function cloneNode$1(obj, parent) {
|
|
|
1062
1089
|
} else if (i2 === "source") {
|
|
1063
1090
|
cloned[i2] = value;
|
|
1064
1091
|
} else if (Array.isArray(value)) {
|
|
1065
|
-
cloned[i2] = value.map((
|
|
1092
|
+
cloned[i2] = value.map((j2) => cloneNode$1(j2, cloned));
|
|
1066
1093
|
} else {
|
|
1067
1094
|
if (type === "object" && value !== null) value = cloneNode$1(value);
|
|
1068
1095
|
cloned[i2] = value;
|
|
@@ -1297,7 +1324,7 @@ let Node$5$1 = class Node2 {
|
|
|
1297
1324
|
}
|
|
1298
1325
|
return result2;
|
|
1299
1326
|
}
|
|
1300
|
-
toJSON(
|
|
1327
|
+
toJSON(_2, inputs) {
|
|
1301
1328
|
let fixed = {};
|
|
1302
1329
|
let emitInputs = inputs == null;
|
|
1303
1330
|
inputs = inputs || /* @__PURE__ */ new Map();
|
|
@@ -2942,8 +2969,8 @@ let Parser$1$1 = class Parser {
|
|
|
2942
2969
|
if (colon === false) return;
|
|
2943
2970
|
let founded = 0;
|
|
2944
2971
|
let token;
|
|
2945
|
-
for (let
|
|
2946
|
-
token = tokens[
|
|
2972
|
+
for (let j2 = colon - 1; j2 >= 0; j2--) {
|
|
2973
|
+
token = tokens[j2];
|
|
2947
2974
|
if (token[0] !== "space") {
|
|
2948
2975
|
founded += 1;
|
|
2949
2976
|
if (founded === 2) break;
|
|
@@ -3061,8 +3088,8 @@ let Parser$1$1 = class Parser {
|
|
|
3061
3088
|
} else if (token[1].toLowerCase() === "important") {
|
|
3062
3089
|
let cache = tokens.slice(0);
|
|
3063
3090
|
let str = "";
|
|
3064
|
-
for (let
|
|
3065
|
-
let type = cache[
|
|
3091
|
+
for (let j2 = i2; j2 > 0; j2--) {
|
|
3092
|
+
let type = cache[j2][0];
|
|
3066
3093
|
if (str.trim().indexOf("!") === 0 && type !== "space") {
|
|
3067
3094
|
break;
|
|
3068
3095
|
}
|
|
@@ -4220,7 +4247,8 @@ function adaptCssForReplay(cssText, cache) {
|
|
|
4220
4247
|
try {
|
|
4221
4248
|
const ast = postcss$1$1([
|
|
4222
4249
|
mediaSelectorPlugin,
|
|
4223
|
-
pseudoClassPlugin
|
|
4250
|
+
pseudoClassPlugin,
|
|
4251
|
+
animationFillModePlugin
|
|
4224
4252
|
]).process(cssText);
|
|
4225
4253
|
result2 = ast.css;
|
|
4226
4254
|
} catch (error) {
|
|
@@ -4745,12 +4773,12 @@ function getAugmentedNamespace(n2) {
|
|
|
4745
4773
|
a2.prototype = f2.prototype;
|
|
4746
4774
|
} else a2 = {};
|
|
4747
4775
|
Object.defineProperty(a2, "__esModule", { value: true });
|
|
4748
|
-
Object.keys(n2).forEach(function(
|
|
4749
|
-
var d = Object.getOwnPropertyDescriptor(n2,
|
|
4750
|
-
Object.defineProperty(a2,
|
|
4776
|
+
Object.keys(n2).forEach(function(k2) {
|
|
4777
|
+
var d = Object.getOwnPropertyDescriptor(n2, k2);
|
|
4778
|
+
Object.defineProperty(a2, k2, d.get ? d : {
|
|
4751
4779
|
enumerable: true,
|
|
4752
4780
|
get: function() {
|
|
4753
|
-
return n2[
|
|
4781
|
+
return n2[k2];
|
|
4754
4782
|
}
|
|
4755
4783
|
});
|
|
4756
4784
|
});
|
|
@@ -5174,7 +5202,7 @@ function cloneNode(obj, parent) {
|
|
|
5174
5202
|
} else if (i2 === "source") {
|
|
5175
5203
|
cloned[i2] = value;
|
|
5176
5204
|
} else if (Array.isArray(value)) {
|
|
5177
|
-
cloned[i2] = value.map((
|
|
5205
|
+
cloned[i2] = value.map((j2) => cloneNode(j2, cloned));
|
|
5178
5206
|
} else {
|
|
5179
5207
|
if (type === "object" && value !== null) value = cloneNode(value);
|
|
5180
5208
|
cloned[i2] = value;
|
|
@@ -5409,7 +5437,7 @@ let Node$5 = class Node22 {
|
|
|
5409
5437
|
}
|
|
5410
5438
|
return result2;
|
|
5411
5439
|
}
|
|
5412
|
-
toJSON(
|
|
5440
|
+
toJSON(_2, inputs) {
|
|
5413
5441
|
let fixed = {};
|
|
5414
5442
|
let emitInputs = inputs == null;
|
|
5415
5443
|
inputs = inputs || /* @__PURE__ */ new Map();
|
|
@@ -7054,8 +7082,8 @@ let Parser$1 = class Parser2 {
|
|
|
7054
7082
|
if (colon === false) return;
|
|
7055
7083
|
let founded = 0;
|
|
7056
7084
|
let token;
|
|
7057
|
-
for (let
|
|
7058
|
-
token = tokens[
|
|
7085
|
+
for (let j2 = colon - 1; j2 >= 0; j2--) {
|
|
7086
|
+
token = tokens[j2];
|
|
7059
7087
|
if (token[0] !== "space") {
|
|
7060
7088
|
founded += 1;
|
|
7061
7089
|
if (founded === 2) break;
|
|
@@ -7173,8 +7201,8 @@ let Parser$1 = class Parser2 {
|
|
|
7173
7201
|
} else if (token[1].toLowerCase() === "important") {
|
|
7174
7202
|
let cache = tokens.slice(0);
|
|
7175
7203
|
let str = "";
|
|
7176
|
-
for (let
|
|
7177
|
-
let type = cache[
|
|
7204
|
+
for (let j2 = i2; j2 > 0; j2--) {
|
|
7205
|
+
let type = cache[j2][0];
|
|
7178
7206
|
if (str.trim().indexOf("!") === 0 && type !== "space") {
|
|
7179
7207
|
break;
|
|
7180
7208
|
}
|
|
@@ -8314,7 +8342,7 @@ const camelizeRE = /-([a-z])/g;
|
|
|
8314
8342
|
const CUSTOM_PROPERTY_REGEX = /^--[a-zA-Z0-9-]+$/;
|
|
8315
8343
|
const camelize = (str) => {
|
|
8316
8344
|
if (CUSTOM_PROPERTY_REGEX.test(str)) return str;
|
|
8317
|
-
return str.replace(camelizeRE, (
|
|
8345
|
+
return str.replace(camelizeRE, (_2, c2) => c2 ? c2.toUpperCase() : "");
|
|
8318
8346
|
};
|
|
8319
8347
|
const hyphenateRE = /\B([A-Z])/g;
|
|
8320
8348
|
const hyphenate = (str) => {
|
|
@@ -10084,30 +10112,30 @@ const mittProxy = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePro
|
|
|
10084
10112
|
__proto__: null,
|
|
10085
10113
|
default: mitt$1
|
|
10086
10114
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
10087
|
-
function polyfill(
|
|
10088
|
-
if ("scrollBehavior" in d.documentElement.style &&
|
|
10115
|
+
function polyfill(w2 = window, d = document) {
|
|
10116
|
+
if ("scrollBehavior" in d.documentElement.style && w2.__forceSmoothScrollPolyfill__ !== true) {
|
|
10089
10117
|
return;
|
|
10090
10118
|
}
|
|
10091
|
-
const Element2 =
|
|
10119
|
+
const Element2 = w2.HTMLElement || w2.Element;
|
|
10092
10120
|
const SCROLL_TIME = 468;
|
|
10093
10121
|
const original = {
|
|
10094
|
-
scroll:
|
|
10095
|
-
scrollBy:
|
|
10122
|
+
scroll: w2.scroll || w2.scrollTo,
|
|
10123
|
+
scrollBy: w2.scrollBy,
|
|
10096
10124
|
elementScroll: Element2.prototype.scroll || scrollElement,
|
|
10097
10125
|
scrollIntoView: Element2.prototype.scrollIntoView
|
|
10098
10126
|
};
|
|
10099
|
-
const now =
|
|
10127
|
+
const now = w2.performance && w2.performance.now ? w2.performance.now.bind(w2.performance) : Date.now;
|
|
10100
10128
|
function isMicrosoftBrowser(userAgent) {
|
|
10101
10129
|
const userAgentPatterns = ["MSIE ", "Trident/", "Edge/"];
|
|
10102
10130
|
return new RegExp(userAgentPatterns.join("|")).test(userAgent);
|
|
10103
10131
|
}
|
|
10104
|
-
const ROUNDING_TOLERANCE = isMicrosoftBrowser(
|
|
10132
|
+
const ROUNDING_TOLERANCE = isMicrosoftBrowser(w2.navigator.userAgent) ? 1 : 0;
|
|
10105
10133
|
function scrollElement(x2, y) {
|
|
10106
10134
|
this.scrollLeft = x2;
|
|
10107
10135
|
this.scrollTop = y;
|
|
10108
10136
|
}
|
|
10109
|
-
function ease(
|
|
10110
|
-
return 0.5 * (1 - Math.cos(Math.PI *
|
|
10137
|
+
function ease(k2) {
|
|
10138
|
+
return 0.5 * (1 - Math.cos(Math.PI * k2));
|
|
10111
10139
|
}
|
|
10112
10140
|
function shouldBailOut(firstArg) {
|
|
10113
10141
|
if (firstArg === null || typeof firstArg !== "object" || firstArg.behavior === void 0 || firstArg.behavior === "auto" || firstArg.behavior === "instant") {
|
|
@@ -10129,7 +10157,7 @@ function polyfill(w = window, d = document) {
|
|
|
10129
10157
|
}
|
|
10130
10158
|
}
|
|
10131
10159
|
function canOverflow(el, axis) {
|
|
10132
|
-
const overflowValue =
|
|
10160
|
+
const overflowValue = w2.getComputedStyle(el, null)["overflow" + axis];
|
|
10133
10161
|
return overflowValue === "auto" || overflowValue === "scroll";
|
|
10134
10162
|
}
|
|
10135
10163
|
function isScrollable(el) {
|
|
@@ -10155,7 +10183,7 @@ function polyfill(w = window, d = document) {
|
|
|
10155
10183
|
currentY = context.startY + (context.y - context.startY) * value;
|
|
10156
10184
|
context.method.call(context.scrollable, currentX, currentY);
|
|
10157
10185
|
if (currentX !== context.x || currentY !== context.y) {
|
|
10158
|
-
|
|
10186
|
+
w2.requestAnimationFrame(step.bind(w2, context));
|
|
10159
10187
|
}
|
|
10160
10188
|
}
|
|
10161
10189
|
function smoothScroll(el, x2, y) {
|
|
@@ -10165,9 +10193,9 @@ function polyfill(w = window, d = document) {
|
|
|
10165
10193
|
let method;
|
|
10166
10194
|
const startTime = now();
|
|
10167
10195
|
if (el === d.body) {
|
|
10168
|
-
scrollable =
|
|
10169
|
-
startX =
|
|
10170
|
-
startY =
|
|
10196
|
+
scrollable = w2;
|
|
10197
|
+
startX = w2.scrollX || w2.pageXOffset;
|
|
10198
|
+
startY = w2.scrollY || w2.pageYOffset;
|
|
10171
10199
|
method = original.scroll;
|
|
10172
10200
|
} else {
|
|
10173
10201
|
scrollable = el;
|
|
@@ -10185,43 +10213,43 @@ function polyfill(w = window, d = document) {
|
|
|
10185
10213
|
y
|
|
10186
10214
|
});
|
|
10187
10215
|
}
|
|
10188
|
-
|
|
10216
|
+
w2.scroll = w2.scrollTo = function() {
|
|
10189
10217
|
if (arguments[0] === void 0) {
|
|
10190
10218
|
return;
|
|
10191
10219
|
}
|
|
10192
10220
|
if (shouldBailOut(arguments[0]) === true) {
|
|
10193
10221
|
original.scroll.call(
|
|
10194
|
-
|
|
10195
|
-
arguments[0].left !== void 0 ? arguments[0].left : typeof arguments[0] !== "object" ? arguments[0] :
|
|
10222
|
+
w2,
|
|
10223
|
+
arguments[0].left !== void 0 ? arguments[0].left : typeof arguments[0] !== "object" ? arguments[0] : w2.scrollX || w2.pageXOffset,
|
|
10196
10224
|
// use top prop, second argument if present or fallback to scrollY
|
|
10197
|
-
arguments[0].top !== void 0 ? arguments[0].top : arguments[1] !== void 0 ? arguments[1] :
|
|
10225
|
+
arguments[0].top !== void 0 ? arguments[0].top : arguments[1] !== void 0 ? arguments[1] : w2.scrollY || w2.pageYOffset
|
|
10198
10226
|
);
|
|
10199
10227
|
return;
|
|
10200
10228
|
}
|
|
10201
10229
|
smoothScroll.call(
|
|
10202
|
-
|
|
10230
|
+
w2,
|
|
10203
10231
|
d.body,
|
|
10204
|
-
arguments[0].left !== void 0 ? ~~arguments[0].left :
|
|
10205
|
-
arguments[0].top !== void 0 ? ~~arguments[0].top :
|
|
10232
|
+
arguments[0].left !== void 0 ? ~~arguments[0].left : w2.scrollX || w2.pageXOffset,
|
|
10233
|
+
arguments[0].top !== void 0 ? ~~arguments[0].top : w2.scrollY || w2.pageYOffset
|
|
10206
10234
|
);
|
|
10207
10235
|
};
|
|
10208
|
-
|
|
10236
|
+
w2.scrollBy = function() {
|
|
10209
10237
|
if (arguments[0] === void 0) {
|
|
10210
10238
|
return;
|
|
10211
10239
|
}
|
|
10212
10240
|
if (shouldBailOut(arguments[0])) {
|
|
10213
10241
|
original.scrollBy.call(
|
|
10214
|
-
|
|
10242
|
+
w2,
|
|
10215
10243
|
arguments[0].left !== void 0 ? arguments[0].left : typeof arguments[0] !== "object" ? arguments[0] : 0,
|
|
10216
10244
|
arguments[0].top !== void 0 ? arguments[0].top : arguments[1] !== void 0 ? arguments[1] : 0
|
|
10217
10245
|
);
|
|
10218
10246
|
return;
|
|
10219
10247
|
}
|
|
10220
10248
|
smoothScroll.call(
|
|
10221
|
-
|
|
10249
|
+
w2,
|
|
10222
10250
|
d.body,
|
|
10223
|
-
~~arguments[0].left + (
|
|
10224
|
-
~~arguments[0].top + (
|
|
10251
|
+
~~arguments[0].left + (w2.scrollX || w2.pageXOffset),
|
|
10252
|
+
~~arguments[0].top + (w2.scrollY || w2.pageYOffset)
|
|
10225
10253
|
);
|
|
10226
10254
|
};
|
|
10227
10255
|
Element2.prototype.scroll = Element2.prototype.scrollTo = function() {
|
|
@@ -10286,15 +10314,15 @@ function polyfill(w = window, d = document) {
|
|
|
10286
10314
|
scrollableParent.scrollLeft + clientRects.left - parentRects.left,
|
|
10287
10315
|
scrollableParent.scrollTop + clientRects.top - parentRects.top
|
|
10288
10316
|
);
|
|
10289
|
-
if (
|
|
10290
|
-
|
|
10317
|
+
if (w2.getComputedStyle(scrollableParent).position !== "fixed") {
|
|
10318
|
+
w2.scrollBy({
|
|
10291
10319
|
left: parentRects.left,
|
|
10292
10320
|
top: parentRects.top,
|
|
10293
10321
|
behavior: "smooth"
|
|
10294
10322
|
});
|
|
10295
10323
|
}
|
|
10296
10324
|
} else {
|
|
10297
|
-
|
|
10325
|
+
w2.scrollBy({
|
|
10298
10326
|
left: clientRects.left,
|
|
10299
10327
|
top: clientRects.top,
|
|
10300
10328
|
behavior: "smooth"
|
|
@@ -10480,16 +10508,16 @@ function s(n2, o2) {
|
|
|
10480
10508
|
}(m), b = h.next(); !b.done; b = h.next()) {
|
|
10481
10509
|
var S = b.value;
|
|
10482
10510
|
if (void 0 === S) return c(p, g);
|
|
10483
|
-
var
|
|
10511
|
+
var w2 = "string" == typeof S ? { target: S } : S, j2 = w2.target, E = w2.actions, R = void 0 === E ? [] : E, N2 = w2.cond, O2 = void 0 === N2 ? function() {
|
|
10484
10512
|
return true;
|
|
10485
|
-
} :
|
|
10486
|
-
if (
|
|
10487
|
-
var
|
|
10513
|
+
} : N2, _2 = void 0 === j2, k2 = null != j2 ? j2 : p, T = n2.states[k2];
|
|
10514
|
+
if (O2(g, d)) {
|
|
10515
|
+
var q2 = t(f((_2 ? r(R) : [].concat(x2.exit, R, T.entry).filter(function(t2) {
|
|
10488
10516
|
return t2;
|
|
10489
10517
|
})).map(function(t2) {
|
|
10490
10518
|
return i$2(t2, y._options.actions);
|
|
10491
|
-
}), g, d), 3), z =
|
|
10492
|
-
return { value: C, context: A, actions: z, changed:
|
|
10519
|
+
}), g, d), 3), z = q2[0], A = q2[1], B2 = q2[2], C = null != j2 ? j2 : p;
|
|
10520
|
+
return { value: C, context: A, actions: z, changed: j2 !== p || z.length > 0 || B2, matches: a(C) };
|
|
10493
10521
|
}
|
|
10494
10522
|
}
|
|
10495
10523
|
} catch (t2) {
|