@flashlog/tracker-sdk 0.1.1 → 0.1.3
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/tracker.es.js +385 -385
- package/dist/tracker.umd.js +2 -2
- package/package.json +1 -1
package/dist/tracker.es.js
CHANGED
|
@@ -7,7 +7,7 @@ const vr = (e) => {
|
|
|
7
7
|
const { hostname: e, protocol: t } = window.location;
|
|
8
8
|
return e === "localhost" || e === "127.0.0.1" ? `${t}//${e}:3008/api` : null;
|
|
9
9
|
}, Ar = () => {
|
|
10
|
-
const e = vr("
|
|
10
|
+
const e = vr("https://api.flashlog.app/api");
|
|
11
11
|
if (e) return e;
|
|
12
12
|
const t = wr();
|
|
13
13
|
return t || "https://api.flashlog.app/api";
|
|
@@ -81,7 +81,7 @@ const vr = (e) => {
|
|
|
81
81
|
traceOrigins: [],
|
|
82
82
|
traceHeaderName: "x-flashlog-trace-id",
|
|
83
83
|
enableSessionReplay: !0,
|
|
84
|
-
replayFlushIntervalMs:
|
|
84
|
+
replayFlushIntervalMs: 4e4,
|
|
85
85
|
replayMaxSegmentBytes: 512 * 1024,
|
|
86
86
|
replayMaxSegmentEvents: 400,
|
|
87
87
|
replayMaskAllInputs: !0,
|
|
@@ -171,7 +171,7 @@ const vr = (e) => {
|
|
|
171
171
|
try {
|
|
172
172
|
const n = e.startsWith("/"), s = new URL(e, "https://flashlog.local");
|
|
173
173
|
let i = !1;
|
|
174
|
-
return s.searchParams.forEach((
|
|
174
|
+
return s.searchParams.forEach((a, c) => {
|
|
175
175
|
Oe(c, t.redactUrlParams) && (s.searchParams.set(c, de), i = !0);
|
|
176
176
|
}), i ? (r.redactedFieldsCount += 1, n ? `${s.pathname}${s.search}${s.hash}` : s.toString()) : e;
|
|
177
177
|
} catch {
|
|
@@ -182,8 +182,8 @@ const vr = (e) => {
|
|
|
182
182
|
return Nr(e, t, r);
|
|
183
183
|
const i = _r(e);
|
|
184
184
|
if (i !== null) {
|
|
185
|
-
const
|
|
186
|
-
return JSON.stringify(
|
|
185
|
+
const a = Ke(i, t, r, n, s);
|
|
186
|
+
return JSON.stringify(a);
|
|
187
187
|
}
|
|
188
188
|
return Zt(e, r);
|
|
189
189
|
}, Ke = (e, t, r, n, s = /* @__PURE__ */ new WeakSet()) => {
|
|
@@ -202,7 +202,7 @@ const vr = (e) => {
|
|
|
202
202
|
s.add(e);
|
|
203
203
|
try {
|
|
204
204
|
return Object.entries(e).reduce(
|
|
205
|
-
(i, [
|
|
205
|
+
(i, [a, c]) => (i[a] = Ke(c, t, r, a, s), i),
|
|
206
206
|
{}
|
|
207
207
|
);
|
|
208
208
|
} finally {
|
|
@@ -270,7 +270,7 @@ const vr = (e) => {
|
|
|
270
270
|
};
|
|
271
271
|
if (!e) return t;
|
|
272
272
|
if (e instanceof HTMLSelectElement) {
|
|
273
|
-
const r = Array.from(e.selectedOptions), n = r.map((
|
|
273
|
+
const r = Array.from(e.selectedOptions), n = r.map((a) => ge(a.value, e)), s = r.map((a) => ge(a.text, e)), i = e.multiple;
|
|
274
274
|
return {
|
|
275
275
|
...t,
|
|
276
276
|
value: i ? n : n[0],
|
|
@@ -306,20 +306,20 @@ class Ur {
|
|
|
306
306
|
start() {
|
|
307
307
|
if (typeof window > "u" || typeof document > "u" || this.detachHandlers.length > 0) return;
|
|
308
308
|
const t = (i) => {
|
|
309
|
-
const
|
|
309
|
+
const a = i.target;
|
|
310
310
|
this.add("CLICK", {
|
|
311
|
-
tagName:
|
|
312
|
-
text: lt(
|
|
313
|
-
selector: st(
|
|
311
|
+
tagName: a == null ? void 0 : a.tagName,
|
|
312
|
+
text: lt(a == null ? void 0 : a.innerText),
|
|
313
|
+
selector: st(a)
|
|
314
314
|
});
|
|
315
315
|
}, r = (i) => {
|
|
316
|
-
const
|
|
317
|
-
this.add("INPUT_CHANGE", Dr(
|
|
316
|
+
const a = i.target;
|
|
317
|
+
this.add("INPUT_CHANGE", Dr(a));
|
|
318
318
|
}, n = (i) => {
|
|
319
|
-
const
|
|
319
|
+
const a = i.target;
|
|
320
320
|
this.add("FORM_SUBMIT", {
|
|
321
|
-
tagName:
|
|
322
|
-
selector: st(
|
|
321
|
+
tagName: a == null ? void 0 : a.tagName,
|
|
322
|
+
selector: st(a)
|
|
323
323
|
});
|
|
324
324
|
}, s = () => {
|
|
325
325
|
this.add("VISIBILITY_CHANGE", {
|
|
@@ -443,10 +443,10 @@ class Pr {
|
|
|
443
443
|
timestamp: Date.now()
|
|
444
444
|
});
|
|
445
445
|
}, this.handleUnhandledRejection = (n) => {
|
|
446
|
-
const s = n.reason, i = s instanceof Error ? s.message : typeof s == "string" ? s : "Unhandled rejection",
|
|
446
|
+
const s = n.reason, i = s instanceof Error ? s.message : typeof s == "string" ? s : "Unhandled rejection", a = s instanceof Error ? s.stack : "";
|
|
447
447
|
this.hooks.onUnhandledRejection({
|
|
448
448
|
message: i,
|
|
449
|
-
stack:
|
|
449
|
+
stack: a || "",
|
|
450
450
|
timestamp: Date.now()
|
|
451
451
|
});
|
|
452
452
|
}, this.config = t, this.hooks = r;
|
|
@@ -483,21 +483,21 @@ class Pr {
|
|
|
483
483
|
if (!bt(n, this.config))
|
|
484
484
|
return { input: t, init: r };
|
|
485
485
|
if (t instanceof Request) {
|
|
486
|
-
const
|
|
487
|
-
return new Headers(r == null ? void 0 : r.headers).forEach((
|
|
488
|
-
|
|
489
|
-
}), Object.entries(s).forEach(([
|
|
490
|
-
|
|
486
|
+
const a = new Headers(t.headers);
|
|
487
|
+
return new Headers(r == null ? void 0 : r.headers).forEach((o, d) => {
|
|
488
|
+
a.set(d, o);
|
|
489
|
+
}), Object.entries(s).forEach(([o, d]) => {
|
|
490
|
+
a.set(o, d);
|
|
491
491
|
}), {
|
|
492
492
|
input: new Request(t, {
|
|
493
493
|
...r,
|
|
494
|
-
headers:
|
|
494
|
+
headers: a
|
|
495
495
|
})
|
|
496
496
|
};
|
|
497
497
|
}
|
|
498
498
|
const i = new Headers(r == null ? void 0 : r.headers);
|
|
499
|
-
return Object.entries(s).forEach(([
|
|
500
|
-
i.set(
|
|
499
|
+
return Object.entries(s).forEach(([a, c]) => {
|
|
500
|
+
i.set(a, c);
|
|
501
501
|
}), {
|
|
502
502
|
input: t,
|
|
503
503
|
init: {
|
|
@@ -510,10 +510,10 @@ class Pr {
|
|
|
510
510
|
if (typeof window.fetch != "function") return;
|
|
511
511
|
const t = this;
|
|
512
512
|
this.originalFetch = window.fetch, window.fetch = async function(n, s) {
|
|
513
|
-
const i = Date.now(),
|
|
513
|
+
const i = Date.now(), a = (s == null ? void 0 : s.method) || "GET", c = typeof n == "string" ? n : n instanceof URL ? n.toString() : n.url;
|
|
514
514
|
if (t.shouldIgnoreUrl(c))
|
|
515
515
|
return t.originalFetch.call(window, n, s);
|
|
516
|
-
const
|
|
516
|
+
const o = t.safeBodyPreview(s == null ? void 0 : s.body), d = Ve(), l = it(d, t.config.traceHeaderName), u = t.attachTraceHeadersToFetchRequest(n, s, c, l);
|
|
517
517
|
try {
|
|
518
518
|
const h = await t.originalFetch.call(
|
|
519
519
|
window,
|
|
@@ -523,7 +523,7 @@ class Pr {
|
|
|
523
523
|
if ((h.ok || t.shouldIgnoreStatus(h.status)) && t.hooks.onNetworkActivity({
|
|
524
524
|
type: "fetch",
|
|
525
525
|
url: c,
|
|
526
|
-
method:
|
|
526
|
+
method: a.toUpperCase(),
|
|
527
527
|
status: h.status,
|
|
528
528
|
statusText: h.statusText,
|
|
529
529
|
duration_ms: f,
|
|
@@ -541,11 +541,11 @@ class Pr {
|
|
|
541
541
|
t.hooks.onNetworkError({
|
|
542
542
|
type: "fetch",
|
|
543
543
|
url: c,
|
|
544
|
-
method:
|
|
544
|
+
method: a.toUpperCase(),
|
|
545
545
|
status: h.status,
|
|
546
546
|
statusText: h.statusText,
|
|
547
547
|
duration_ms: f,
|
|
548
|
-
request_body: t.truncate(
|
|
548
|
+
request_body: t.truncate(o),
|
|
549
549
|
response_body: t.truncate(p),
|
|
550
550
|
trace_id: d.trace_id,
|
|
551
551
|
span_id: d.span_id,
|
|
@@ -558,11 +558,11 @@ class Pr {
|
|
|
558
558
|
throw t.hooks.onNetworkError({
|
|
559
559
|
type: "fetch",
|
|
560
560
|
url: c,
|
|
561
|
-
method:
|
|
561
|
+
method: a.toUpperCase(),
|
|
562
562
|
status: 0,
|
|
563
563
|
statusText: "NETWORK_ERROR",
|
|
564
564
|
duration_ms: Date.now() - i,
|
|
565
|
-
request_body: t.truncate(
|
|
565
|
+
request_body: t.truncate(o),
|
|
566
566
|
response_body: t.truncate(h instanceof Error ? h.message : String(h)),
|
|
567
567
|
trace_id: d.trace_id,
|
|
568
568
|
span_id: d.span_id,
|
|
@@ -574,17 +574,17 @@ class Pr {
|
|
|
574
574
|
}
|
|
575
575
|
interceptXhr() {
|
|
576
576
|
const t = this;
|
|
577
|
-
this.originalXhrOpen = XMLHttpRequest.prototype.open, this.originalXhrSend = XMLHttpRequest.prototype.send, XMLHttpRequest.prototype.open = function(n, s, i,
|
|
578
|
-
const
|
|
577
|
+
this.originalXhrOpen = XMLHttpRequest.prototype.open, this.originalXhrSend = XMLHttpRequest.prototype.send, XMLHttpRequest.prototype.open = function(n, s, i, a, c) {
|
|
578
|
+
const o = s instanceof URL ? s.toString() : String(s);
|
|
579
579
|
return this.__flashlog_meta = {
|
|
580
580
|
method: (n || "GET").toUpperCase(),
|
|
581
|
-
url:
|
|
582
|
-
}, t.originalXhrOpen.call(this, n, s, i ?? !0,
|
|
581
|
+
url: o
|
|
582
|
+
}, t.originalXhrOpen.call(this, n, s, i ?? !0, a ?? null, c ?? null);
|
|
583
583
|
}, XMLHttpRequest.prototype.send = function(n) {
|
|
584
584
|
const s = this, i = s.__flashlog_meta || {};
|
|
585
585
|
if (t.shouldIgnoreUrl(i.url || ""))
|
|
586
586
|
return t.originalXhrSend.call(this, n);
|
|
587
|
-
const
|
|
587
|
+
const a = Date.now(), c = t.safeBodyPreview(n), o = Ve(), d = it(o, t.config.traceHeaderName);
|
|
588
588
|
return bt(i.url || "", t.config) && Object.entries(d).forEach(([l, u]) => {
|
|
589
589
|
try {
|
|
590
590
|
s.setRequestHeader(l, u);
|
|
@@ -602,10 +602,10 @@ class Pr {
|
|
|
602
602
|
method: i.method || "GET",
|
|
603
603
|
status: l,
|
|
604
604
|
statusText: s.statusText || "HTTP_RESULT",
|
|
605
|
-
duration_ms: Date.now() -
|
|
606
|
-
trace_id:
|
|
607
|
-
span_id:
|
|
608
|
-
traceparent:
|
|
605
|
+
duration_ms: Date.now() - a,
|
|
606
|
+
trace_id: o.trace_id,
|
|
607
|
+
span_id: o.span_id,
|
|
608
|
+
traceparent: o.traceparent,
|
|
609
609
|
timestamp: Date.now()
|
|
610
610
|
}), l >= 400 && !t.shouldIgnoreStatus(l) && t.hooks.onNetworkError({
|
|
611
611
|
type: "xhr",
|
|
@@ -613,12 +613,12 @@ class Pr {
|
|
|
613
613
|
method: i.method || "GET",
|
|
614
614
|
status: l,
|
|
615
615
|
statusText: s.statusText || "HTTP_ERROR",
|
|
616
|
-
duration_ms: Date.now() -
|
|
616
|
+
duration_ms: Date.now() - a,
|
|
617
617
|
request_body: t.truncate(c),
|
|
618
618
|
response_body: t.truncate(s.responseText || ""),
|
|
619
|
-
trace_id:
|
|
620
|
-
span_id:
|
|
621
|
-
traceparent:
|
|
619
|
+
trace_id: o.trace_id,
|
|
620
|
+
span_id: o.span_id,
|
|
621
|
+
traceparent: o.traceparent,
|
|
622
622
|
timestamp: Date.now()
|
|
623
623
|
});
|
|
624
624
|
}), s.addEventListener("error", () => {
|
|
@@ -628,12 +628,12 @@ class Pr {
|
|
|
628
628
|
method: i.method || "GET",
|
|
629
629
|
status: 0,
|
|
630
630
|
statusText: "NETWORK_ERROR",
|
|
631
|
-
duration_ms: Date.now() -
|
|
631
|
+
duration_ms: Date.now() - a,
|
|
632
632
|
request_body: t.truncate(c),
|
|
633
633
|
response_body: "XHR network error",
|
|
634
|
-
trace_id:
|
|
635
|
-
span_id:
|
|
636
|
-
traceparent:
|
|
634
|
+
trace_id: o.trace_id,
|
|
635
|
+
span_id: o.span_id,
|
|
636
|
+
traceparent: o.traceparent,
|
|
637
637
|
timestamp: Date.now()
|
|
638
638
|
});
|
|
639
639
|
}), t.originalXhrSend.call(this, n);
|
|
@@ -643,17 +643,17 @@ class Pr {
|
|
|
643
643
|
if (typeof window.WebSocket != "function") return;
|
|
644
644
|
const t = this;
|
|
645
645
|
this.originalWebSocket = window.WebSocket;
|
|
646
|
-
const r = this.originalWebSocket, n = function(i,
|
|
647
|
-
const c = i instanceof URL ? i.toString() : String(i),
|
|
648
|
-
return t.shouldIgnoreUrl(c) || (t.socketMeta.set(
|
|
646
|
+
const r = this.originalWebSocket, n = function(i, a) {
|
|
647
|
+
const c = i instanceof URL ? i.toString() : String(i), o = a !== void 0 ? new r(i, a) : new r(i);
|
|
648
|
+
return t.shouldIgnoreUrl(c) || (t.socketMeta.set(o, {
|
|
649
649
|
url: c,
|
|
650
650
|
createdAt: Date.now(),
|
|
651
651
|
openedAt: null
|
|
652
|
-
}),
|
|
653
|
-
const d = t.socketMeta.get(
|
|
652
|
+
}), o.addEventListener("open", () => {
|
|
653
|
+
const d = t.socketMeta.get(o);
|
|
654
654
|
d && (d.openedAt = Date.now());
|
|
655
|
-
}),
|
|
656
|
-
const d = t.socketMeta.get(
|
|
655
|
+
}), o.addEventListener("error", () => {
|
|
656
|
+
const d = t.socketMeta.get(o), l = (d == null ? void 0 : d.openedAt) || (d == null ? void 0 : d.createdAt) || Date.now();
|
|
657
657
|
t.hooks.onSocketError({
|
|
658
658
|
type: "websocket",
|
|
659
659
|
phase: "error",
|
|
@@ -664,10 +664,10 @@ class Pr {
|
|
|
664
664
|
duration_ms: Date.now() - l,
|
|
665
665
|
timestamp: Date.now()
|
|
666
666
|
});
|
|
667
|
-
}),
|
|
667
|
+
}), o.addEventListener("close", (d) => {
|
|
668
668
|
if (d.code === 1e3 || d.code === 1001)
|
|
669
669
|
return;
|
|
670
|
-
const l = t.socketMeta.get(
|
|
670
|
+
const l = t.socketMeta.get(o), u = (l == null ? void 0 : l.openedAt) || (l == null ? void 0 : l.createdAt) || Date.now();
|
|
671
671
|
t.hooks.onSocketError({
|
|
672
672
|
type: "websocket",
|
|
673
673
|
phase: "close",
|
|
@@ -680,7 +680,7 @@ class Pr {
|
|
|
680
680
|
duration_ms: Date.now() - u,
|
|
681
681
|
timestamp: Date.now()
|
|
682
682
|
});
|
|
683
|
-
})),
|
|
683
|
+
})), o;
|
|
684
684
|
};
|
|
685
685
|
n.prototype = r.prototype, Object.defineProperty(n, "CONNECTING", {
|
|
686
686
|
value: r.CONNECTING
|
|
@@ -710,7 +710,7 @@ function Me(e) {
|
|
|
710
710
|
function Hr(e) {
|
|
711
711
|
return e.includes(" background-clip: text;") && !e.includes(" -webkit-background-clip: text;") && (e = e.replace(" background-clip: text;", " -webkit-background-clip: text; background-clip: text;")), e;
|
|
712
712
|
}
|
|
713
|
-
function
|
|
713
|
+
function at(e) {
|
|
714
714
|
try {
|
|
715
715
|
var t = e.rules || e.cssRules;
|
|
716
716
|
return t ? Hr(Array.from(t).map(Jt).join("")) : null;
|
|
@@ -722,7 +722,7 @@ function Jt(e) {
|
|
|
722
722
|
var t = e.cssText;
|
|
723
723
|
if (jr(e))
|
|
724
724
|
try {
|
|
725
|
-
t =
|
|
725
|
+
t = at(e.styleSheet) || t;
|
|
726
726
|
} catch {
|
|
727
727
|
}
|
|
728
728
|
return t;
|
|
@@ -773,8 +773,8 @@ function Jr() {
|
|
|
773
773
|
return new qt();
|
|
774
774
|
}
|
|
775
775
|
function ut(e) {
|
|
776
|
-
var t = e.maskInputOptions, r = e.tagName, n = e.type, s = e.value, i = e.maskInputFn,
|
|
777
|
-
return (t[r.toLowerCase()] || t[n]) && (i ?
|
|
776
|
+
var t = e.maskInputOptions, r = e.tagName, n = e.type, s = e.value, i = e.maskInputFn, a = s || "";
|
|
777
|
+
return (t[r.toLowerCase()] || t[n]) && (i ? a = i(a) : a = "*".repeat(a.length)), a;
|
|
778
778
|
}
|
|
779
779
|
var vt = "__rrweb_original__";
|
|
780
780
|
function qr(e) {
|
|
@@ -783,9 +783,9 @@ function qr(e) {
|
|
|
783
783
|
return !0;
|
|
784
784
|
for (var r = 50, n = 0; n < e.width; n += r)
|
|
785
785
|
for (var s = 0; s < e.height; s += r) {
|
|
786
|
-
var i = t.getImageData,
|
|
787
|
-
if (c.some(function(
|
|
788
|
-
return
|
|
786
|
+
var i = t.getImageData, a = vt in i ? i[vt] : i, c = new Uint32Array(a.call(t, n, s, Math.min(r, e.width - n), Math.min(r, e.height - s)).data.buffer);
|
|
787
|
+
if (c.some(function(o) {
|
|
788
|
+
return o !== 0;
|
|
789
789
|
}))
|
|
790
790
|
return !1;
|
|
791
791
|
}
|
|
@@ -812,15 +812,15 @@ function en(e) {
|
|
|
812
812
|
}
|
|
813
813
|
var ye, wt, tn = /url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm, rn = /^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/|#).*/, nn = /^(data:)([^,]*),(.*)/i;
|
|
814
814
|
function Pe(e, t) {
|
|
815
|
-
return (e || "").replace(tn, function(r, n, s, i,
|
|
816
|
-
var
|
|
817
|
-
if (!
|
|
815
|
+
return (e || "").replace(tn, function(r, n, s, i, a, c) {
|
|
816
|
+
var o = s || a || c, d = n || i || "";
|
|
817
|
+
if (!o)
|
|
818
818
|
return r;
|
|
819
|
-
if (!rn.test(
|
|
820
|
-
return "url(".concat(d).concat(
|
|
821
|
-
if (
|
|
822
|
-
return "url(".concat(d).concat(en(t) +
|
|
823
|
-
var l = t.split("/"), u =
|
|
819
|
+
if (!rn.test(o) || nn.test(o))
|
|
820
|
+
return "url(".concat(d).concat(o).concat(d, ")");
|
|
821
|
+
if (o[0] === "/")
|
|
822
|
+
return "url(".concat(d).concat(en(t) + o).concat(d, ")");
|
|
823
|
+
var l = t.split("/"), u = o.split("/");
|
|
824
824
|
l.pop();
|
|
825
825
|
for (var h = 0, f = u; h < f.length; h++) {
|
|
826
826
|
var p = f[h];
|
|
@@ -829,8 +829,8 @@ function Pe(e, t) {
|
|
|
829
829
|
return "url(".concat(d).concat(l.join("/")).concat(d, ")");
|
|
830
830
|
});
|
|
831
831
|
}
|
|
832
|
-
var sn = /^[^ \t\n\r\u000c]+/,
|
|
833
|
-
function
|
|
832
|
+
var sn = /^[^ \t\n\r\u000c]+/, an = /^[, \t\n\r\u000c]+/;
|
|
833
|
+
function on(e, t) {
|
|
834
834
|
if (t.trim() === "")
|
|
835
835
|
return t;
|
|
836
836
|
var r = 0;
|
|
@@ -838,25 +838,25 @@ function an(e, t) {
|
|
|
838
838
|
var l, u = d.exec(t.substring(r));
|
|
839
839
|
return u ? (l = u[0], r += l.length, l) : "";
|
|
840
840
|
}
|
|
841
|
-
for (var s = []; n(
|
|
841
|
+
for (var s = []; n(an), !(r >= t.length); ) {
|
|
842
842
|
var i = n(sn);
|
|
843
843
|
if (i.slice(-1) === ",")
|
|
844
844
|
i = be(e, i.substring(0, i.length - 1)), s.push(i);
|
|
845
845
|
else {
|
|
846
|
-
var
|
|
846
|
+
var a = "";
|
|
847
847
|
i = be(e, i);
|
|
848
848
|
for (var c = !1; ; ) {
|
|
849
|
-
var
|
|
850
|
-
if (
|
|
851
|
-
s.push((i +
|
|
849
|
+
var o = t.charAt(r);
|
|
850
|
+
if (o === "") {
|
|
851
|
+
s.push((i + a).trim());
|
|
852
852
|
break;
|
|
853
853
|
} else if (c)
|
|
854
|
-
|
|
855
|
-
else if (
|
|
856
|
-
r += 1, s.push((i +
|
|
854
|
+
o === ")" && (c = !1);
|
|
855
|
+
else if (o === ",") {
|
|
856
|
+
r += 1, s.push((i + a).trim());
|
|
857
857
|
break;
|
|
858
|
-
} else
|
|
859
|
-
|
|
858
|
+
} else o === "(" && (c = !0);
|
|
859
|
+
a += o, r += 1;
|
|
860
860
|
}
|
|
861
861
|
}
|
|
862
862
|
}
|
|
@@ -876,7 +876,7 @@ function pt() {
|
|
|
876
876
|
return e.href = "", e.href;
|
|
877
877
|
}
|
|
878
878
|
function Xt(e, t, r, n) {
|
|
879
|
-
return r === "src" || r === "href" && n && !(t === "use" && n[0] === "#") || r === "xlink:href" && n && n[0] !== "#" || r === "background" && n && (t === "table" || t === "td" || t === "th") ? be(e, n) : r === "srcset" && n ?
|
|
879
|
+
return r === "src" || r === "href" && n && !(t === "use" && n[0] === "#") || r === "xlink:href" && n && n[0] !== "#" || r === "background" && n && (t === "table" || t === "td" || t === "th") ? be(e, n) : r === "srcset" && n ? on(e, n) : r === "style" && n ? Pe(n, pt()) : t === "object" && r === "data" && n ? be(e, n) : n;
|
|
880
880
|
}
|
|
881
881
|
function dn(e, t, r) {
|
|
882
882
|
if (typeof t == "string") {
|
|
@@ -923,11 +923,11 @@ function ln(e, t, r) {
|
|
|
923
923
|
return;
|
|
924
924
|
}
|
|
925
925
|
if (i !== "complete") {
|
|
926
|
-
var
|
|
926
|
+
var a = setTimeout(function() {
|
|
927
927
|
s || (t(), s = !0);
|
|
928
928
|
}, r);
|
|
929
929
|
e.addEventListener("load", function() {
|
|
930
|
-
clearTimeout(
|
|
930
|
+
clearTimeout(a), s = !0, t();
|
|
931
931
|
});
|
|
932
932
|
return;
|
|
933
933
|
}
|
|
@@ -954,7 +954,7 @@ function un(e, t, r) {
|
|
|
954
954
|
}
|
|
955
955
|
}
|
|
956
956
|
function pn(e, t) {
|
|
957
|
-
var r = t.doc, n = t.mirror, s = t.blockClass, i = t.blockSelector,
|
|
957
|
+
var r = t.doc, n = t.mirror, s = t.blockClass, i = t.blockSelector, a = t.maskTextClass, c = t.maskTextSelector, o = t.inlineStylesheet, d = t.maskInputOptions, l = d === void 0 ? {} : d, u = t.maskTextFn, h = t.maskInputFn, f = t.dataURLOptions, p = f === void 0 ? {} : f, y = t.inlineImages, S = t.recordCanvas, C = t.keepIframeSrcFn, m = t.newlyAddedElement, g = m === void 0 ? !1 : m, k = hn(r, n);
|
|
958
958
|
switch (e.nodeType) {
|
|
959
959
|
case e.DOCUMENT_NODE:
|
|
960
960
|
return e.compatMode !== "CSS1Compat" ? {
|
|
@@ -978,7 +978,7 @@ function pn(e, t) {
|
|
|
978
978
|
doc: r,
|
|
979
979
|
blockClass: s,
|
|
980
980
|
blockSelector: i,
|
|
981
|
-
inlineStylesheet:
|
|
981
|
+
inlineStylesheet: o,
|
|
982
982
|
maskInputOptions: l,
|
|
983
983
|
maskInputFn: h,
|
|
984
984
|
dataURLOptions: p,
|
|
@@ -990,7 +990,7 @@ function pn(e, t) {
|
|
|
990
990
|
});
|
|
991
991
|
case e.TEXT_NODE:
|
|
992
992
|
return fn(e, {
|
|
993
|
-
maskTextClass:
|
|
993
|
+
maskTextClass: a,
|
|
994
994
|
maskTextSelector: c,
|
|
995
995
|
maskTextFn: u,
|
|
996
996
|
rootId: k
|
|
@@ -1018,24 +1018,24 @@ function hn(e, t) {
|
|
|
1018
1018
|
}
|
|
1019
1019
|
}
|
|
1020
1020
|
function fn(e, t) {
|
|
1021
|
-
var r, n = t.maskTextClass, s = t.maskTextSelector, i = t.maskTextFn,
|
|
1022
|
-
if (d &&
|
|
1021
|
+
var r, n = t.maskTextClass, s = t.maskTextSelector, i = t.maskTextFn, a = t.rootId, c = e.parentNode && e.parentNode.tagName, o = e.textContent, d = c === "STYLE" ? !0 : void 0, l = c === "SCRIPT" ? !0 : void 0;
|
|
1022
|
+
if (d && o) {
|
|
1023
1023
|
try {
|
|
1024
|
-
e.nextSibling || e.previousSibling || !((r = e.parentNode.sheet) === null || r === void 0) && r.cssRules && (
|
|
1024
|
+
e.nextSibling || e.previousSibling || !((r = e.parentNode.sheet) === null || r === void 0) && r.cssRules && (o = $r(e.parentNode.sheet));
|
|
1025
1025
|
} catch (u) {
|
|
1026
1026
|
console.warn("Cannot get CSS styles from text's parentNode. Error: ".concat(u), e);
|
|
1027
1027
|
}
|
|
1028
|
-
|
|
1028
|
+
o = Pe(o, pt());
|
|
1029
1029
|
}
|
|
1030
|
-
return l && (
|
|
1030
|
+
return l && (o = "SCRIPT_PLACEHOLDER"), !d && !l && o && Qt(e, n, s) && (o = i ? i(o) : o.replace(/[\S]/g, "*")), {
|
|
1031
1031
|
type: F.Text,
|
|
1032
|
-
textContent:
|
|
1032
|
+
textContent: o || "",
|
|
1033
1033
|
isStyle: d,
|
|
1034
|
-
rootId:
|
|
1034
|
+
rootId: a
|
|
1035
1035
|
};
|
|
1036
1036
|
}
|
|
1037
1037
|
function mn(e, t) {
|
|
1038
|
-
for (var r = t.doc, n = t.blockClass, s = t.blockSelector, i = t.inlineStylesheet,
|
|
1038
|
+
for (var r = t.doc, n = t.blockClass, s = t.blockSelector, i = t.inlineStylesheet, a = t.maskInputOptions, c = a === void 0 ? {} : a, o = t.maskInputFn, d = t.dataURLOptions, l = d === void 0 ? {} : d, u = t.inlineImages, h = t.recordCanvas, f = t.keepIframeSrcFn, p = t.newlyAddedElement, y = p === void 0 ? !1 : p, S = t.rootId, C = dn(e, n, s), m = Qr(e), g = {}, k = e.attributes.length, U = 0; U < k; U++) {
|
|
1039
1039
|
var x = e.attributes[U];
|
|
1040
1040
|
g[x.name] = Xt(r, m, x.name, x.value);
|
|
1041
1041
|
}
|
|
@@ -1043,10 +1043,10 @@ function mn(e, t) {
|
|
|
1043
1043
|
var B = Array.from(r.styleSheets).find(function(q) {
|
|
1044
1044
|
return q.href === e.href;
|
|
1045
1045
|
}), E = null;
|
|
1046
|
-
B && (E =
|
|
1046
|
+
B && (E = at(B)), E && (delete g.rel, delete g.href, g._cssText = Pe(E, B.href));
|
|
1047
1047
|
}
|
|
1048
1048
|
if (m === "style" && e.sheet && !(e.innerText || e.textContent || "").trim().length) {
|
|
1049
|
-
var E =
|
|
1049
|
+
var E = at(e.sheet);
|
|
1050
1050
|
E && (g._cssText = Pe(E, pt()));
|
|
1051
1051
|
}
|
|
1052
1052
|
if (m === "input" || m === "textarea" || m === "select") {
|
|
@@ -1056,7 +1056,7 @@ function mn(e, t) {
|
|
|
1056
1056
|
tagName: m,
|
|
1057
1057
|
value: H,
|
|
1058
1058
|
maskInputOptions: c,
|
|
1059
|
-
maskInputFn:
|
|
1059
|
+
maskInputFn: o
|
|
1060
1060
|
}) : j && (g.checked = j);
|
|
1061
1061
|
}
|
|
1062
1062
|
if (m === "option" && (e.selected && !c.select ? g.selected = !0 : delete g.selected), m === "canvas" && h) {
|
|
@@ -1084,10 +1084,10 @@ function mn(e, t) {
|
|
|
1084
1084
|
O.complete && O.naturalWidth !== 0 ? ee() : O.onload = ee;
|
|
1085
1085
|
}
|
|
1086
1086
|
if ((m === "audio" || m === "video") && (g.rr_mediaState = e.paused ? "paused" : "played", g.rr_mediaCurrentTime = e.currentTime), y || (e.scrollLeft && (g.rr_scrollLeft = e.scrollLeft), e.scrollTop && (g.rr_scrollTop = e.scrollTop)), C) {
|
|
1087
|
-
var se = e.getBoundingClientRect(),
|
|
1087
|
+
var se = e.getBoundingClientRect(), ae = se.width, V = se.height;
|
|
1088
1088
|
g = {
|
|
1089
1089
|
class: g.class,
|
|
1090
|
-
rr_width: "".concat(
|
|
1090
|
+
rr_width: "".concat(ae, "px"),
|
|
1091
1091
|
rr_height: "".concat(V, "px")
|
|
1092
1092
|
};
|
|
1093
1093
|
}
|
|
@@ -1130,14 +1130,14 @@ function gn(e, t) {
|
|
|
1130
1130
|
return !1;
|
|
1131
1131
|
}
|
|
1132
1132
|
function ve(e, t) {
|
|
1133
|
-
var r = t.doc, n = t.mirror, s = t.blockClass, i = t.blockSelector,
|
|
1133
|
+
var r = t.doc, n = t.mirror, s = t.blockClass, i = t.blockSelector, a = t.maskTextClass, c = t.maskTextSelector, o = t.skipChild, d = o === void 0 ? !1 : o, l = t.inlineStylesheet, u = l === void 0 ? !0 : l, h = t.maskInputOptions, f = h === void 0 ? {} : h, p = t.maskTextFn, y = t.maskInputFn, S = t.slimDOMOptions, C = t.dataURLOptions, m = C === void 0 ? {} : C, g = t.inlineImages, k = g === void 0 ? !1 : g, U = t.recordCanvas, x = U === void 0 ? !1 : U, B = t.onSerialize, E = t.onIframeLoad, H = t.iframeLoadTimeout, j = H === void 0 ? 5e3 : H, X = t.onStylesheetLoad, Q = t.stylesheetLoadTimeout, $ = Q === void 0 ? 5e3 : Q, O = t.keepIframeSrcFn, J = O === void 0 ? function() {
|
|
1134
1134
|
return !1;
|
|
1135
|
-
} : O, ee = t.newlyAddedElement, se = ee === void 0 ? !1 : ee,
|
|
1135
|
+
} : O, ee = t.newlyAddedElement, se = ee === void 0 ? !1 : ee, ae = t.preserveWhiteSpace, V = ae === void 0 ? !0 : ae, q = pn(e, {
|
|
1136
1136
|
doc: r,
|
|
1137
1137
|
mirror: n,
|
|
1138
1138
|
blockClass: s,
|
|
1139
1139
|
blockSelector: i,
|
|
1140
|
-
maskTextClass:
|
|
1140
|
+
maskTextClass: a,
|
|
1141
1141
|
maskTextSelector: c,
|
|
1142
1142
|
inlineStylesheet: u,
|
|
1143
1143
|
maskInputOptions: f,
|
|
@@ -1151,10 +1151,10 @@ function ve(e, t) {
|
|
|
1151
1151
|
});
|
|
1152
1152
|
if (!q)
|
|
1153
1153
|
return console.warn(e, "not serialized"), null;
|
|
1154
|
-
var
|
|
1155
|
-
n.hasNode(e) ?
|
|
1156
|
-
var N = Object.assign(q, { id:
|
|
1157
|
-
if (n.add(e, N),
|
|
1154
|
+
var oe;
|
|
1155
|
+
n.hasNode(e) ? oe = n.getId(e) : gn(q, S) || !V && q.type === F.Text && !q.isStyle && !q.textContent.replace(/^\s+|\s+$/gm, "").length ? oe = Le : oe = Yt();
|
|
1156
|
+
var N = Object.assign(q, { id: oe });
|
|
1157
|
+
if (n.add(e, N), oe === Le)
|
|
1158
1158
|
return null;
|
|
1159
1159
|
B && B(e);
|
|
1160
1160
|
var te = !d;
|
|
@@ -1170,7 +1170,7 @@ function ve(e, t) {
|
|
|
1170
1170
|
mirror: n,
|
|
1171
1171
|
blockClass: s,
|
|
1172
1172
|
blockSelector: i,
|
|
1173
|
-
maskTextClass:
|
|
1173
|
+
maskTextClass: a,
|
|
1174
1174
|
maskTextSelector: c,
|
|
1175
1175
|
skipChild: d,
|
|
1176
1176
|
inlineStylesheet: u,
|
|
@@ -1206,7 +1206,7 @@ function ve(e, t) {
|
|
|
1206
1206
|
mirror: n,
|
|
1207
1207
|
blockClass: s,
|
|
1208
1208
|
blockSelector: i,
|
|
1209
|
-
maskTextClass:
|
|
1209
|
+
maskTextClass: a,
|
|
1210
1210
|
maskTextSelector: c,
|
|
1211
1211
|
skipChild: !1,
|
|
1212
1212
|
inlineStylesheet: u,
|
|
@@ -1234,7 +1234,7 @@ function ve(e, t) {
|
|
|
1234
1234
|
mirror: n,
|
|
1235
1235
|
blockClass: s,
|
|
1236
1236
|
blockSelector: i,
|
|
1237
|
-
maskTextClass:
|
|
1237
|
+
maskTextClass: a,
|
|
1238
1238
|
maskTextSelector: c,
|
|
1239
1239
|
skipChild: !1,
|
|
1240
1240
|
inlineStylesheet: u,
|
|
@@ -1258,9 +1258,9 @@ function ve(e, t) {
|
|
|
1258
1258
|
}, $), N;
|
|
1259
1259
|
}
|
|
1260
1260
|
function yn(e, t) {
|
|
1261
|
-
var r = t || {}, n = r.mirror, s = n === void 0 ? new qt() : n, i = r.blockClass,
|
|
1261
|
+
var r = t || {}, n = r.mirror, s = n === void 0 ? new qt() : n, i = r.blockClass, a = i === void 0 ? "rr-block" : i, c = r.blockSelector, o = c === void 0 ? null : c, d = r.maskTextClass, l = d === void 0 ? "rr-mask" : d, u = r.maskTextSelector, h = u === void 0 ? null : u, f = r.inlineStylesheet, p = f === void 0 ? !0 : f, y = r.inlineImages, S = y === void 0 ? !1 : y, C = r.recordCanvas, m = C === void 0 ? !1 : C, g = r.maskAllInputs, k = g === void 0 ? !1 : g, U = r.maskTextFn, x = r.maskInputFn, B = r.slimDOM, E = B === void 0 ? !1 : B, H = r.dataURLOptions, j = r.preserveWhiteSpace, X = r.onSerialize, Q = r.onIframeLoad, $ = r.iframeLoadTimeout, O = r.onStylesheetLoad, J = r.stylesheetLoadTimeout, ee = r.keepIframeSrcFn, se = ee === void 0 ? function() {
|
|
1262
1262
|
return !1;
|
|
1263
|
-
} : ee,
|
|
1263
|
+
} : ee, ae = k === !0 ? {
|
|
1264
1264
|
color: !0,
|
|
1265
1265
|
date: !0,
|
|
1266
1266
|
"datetime-local": !0,
|
|
@@ -1294,13 +1294,13 @@ function yn(e, t) {
|
|
|
1294
1294
|
return ve(e, {
|
|
1295
1295
|
doc: e,
|
|
1296
1296
|
mirror: s,
|
|
1297
|
-
blockClass:
|
|
1298
|
-
blockSelector:
|
|
1297
|
+
blockClass: a,
|
|
1298
|
+
blockSelector: o,
|
|
1299
1299
|
maskTextClass: l,
|
|
1300
1300
|
maskTextSelector: h,
|
|
1301
1301
|
skipChild: !1,
|
|
1302
1302
|
inlineStylesheet: p,
|
|
1303
|
-
maskInputOptions:
|
|
1303
|
+
maskInputOptions: ae,
|
|
1304
1304
|
maskTextFn: U,
|
|
1305
1305
|
maskInputFn: x,
|
|
1306
1306
|
slimDOMOptions: V,
|
|
@@ -1350,21 +1350,21 @@ typeof window < "u" && window.Proxy && window.Reflect && (At = new Proxy(At, {
|
|
|
1350
1350
|
function Fe(e, t, r = {}) {
|
|
1351
1351
|
let n = null, s = 0;
|
|
1352
1352
|
return function(...i) {
|
|
1353
|
-
const
|
|
1354
|
-
!s && r.leading === !1 && (s =
|
|
1355
|
-
const c = t - (
|
|
1356
|
-
c <= 0 || c > t ? (n && (clearTimeout(n), n = null), s =
|
|
1357
|
-
s = r.leading === !1 ? 0 : Date.now(), n = null, e.apply(
|
|
1353
|
+
const a = Date.now();
|
|
1354
|
+
!s && r.leading === !1 && (s = a);
|
|
1355
|
+
const c = t - (a - s), o = this;
|
|
1356
|
+
c <= 0 || c > t ? (n && (clearTimeout(n), n = null), s = a, e.apply(o, i)) : !n && r.trailing !== !1 && (n = setTimeout(() => {
|
|
1357
|
+
s = r.leading === !1 ? 0 : Date.now(), n = null, e.apply(o, i);
|
|
1358
1358
|
}, c));
|
|
1359
1359
|
};
|
|
1360
1360
|
}
|
|
1361
1361
|
function qe(e, t, r, n, s = window) {
|
|
1362
1362
|
const i = s.Object.getOwnPropertyDescriptor(e, t);
|
|
1363
1363
|
return s.Object.defineProperty(e, t, n ? r : {
|
|
1364
|
-
set(
|
|
1364
|
+
set(a) {
|
|
1365
1365
|
setTimeout(() => {
|
|
1366
|
-
r.set.call(this,
|
|
1367
|
-
}, 0), i && i.set && i.set.call(this,
|
|
1366
|
+
r.set.call(this, a);
|
|
1367
|
+
}, 0), i && i.set && i.set.call(this, a);
|
|
1368
1368
|
}
|
|
1369
1369
|
}), () => qe(e, t, i || {}, !0);
|
|
1370
1370
|
}
|
|
@@ -1469,7 +1469,7 @@ class Sn {
|
|
|
1469
1469
|
return this.id++;
|
|
1470
1470
|
}
|
|
1471
1471
|
}
|
|
1472
|
-
var v = /* @__PURE__ */ ((e) => (e[e.DomContentLoaded = 0] = "DomContentLoaded", e[e.Load = 1] = "Load", e[e.FullSnapshot = 2] = "FullSnapshot", e[e.IncrementalSnapshot = 3] = "IncrementalSnapshot", e[e.Meta = 4] = "Meta", e[e.Custom = 5] = "Custom", e[e.Plugin = 6] = "Plugin", e))(v || {}), b = /* @__PURE__ */ ((e) => (e[e.Mutation = 0] = "Mutation", e[e.MouseMove = 1] = "MouseMove", e[e.MouseInteraction = 2] = "MouseInteraction", e[e.Scroll = 3] = "Scroll", e[e.ViewportResize = 4] = "ViewportResize", e[e.Input = 5] = "Input", e[e.TouchMove = 6] = "TouchMove", e[e.MediaInteraction = 7] = "MediaInteraction", e[e.StyleSheetRule = 8] = "StyleSheetRule", e[e.CanvasMutation = 9] = "CanvasMutation", e[e.Font = 10] = "Font", e[e.Log = 11] = "Log", e[e.Drag = 12] = "Drag", e[e.StyleDeclaration = 13] = "StyleDeclaration", e[e.Selection = 14] = "Selection", e[e.AdoptedStyleSheet = 15] = "AdoptedStyleSheet", e))(b || {}),
|
|
1472
|
+
var v = /* @__PURE__ */ ((e) => (e[e.DomContentLoaded = 0] = "DomContentLoaded", e[e.Load = 1] = "Load", e[e.FullSnapshot = 2] = "FullSnapshot", e[e.IncrementalSnapshot = 3] = "IncrementalSnapshot", e[e.Meta = 4] = "Meta", e[e.Custom = 5] = "Custom", e[e.Plugin = 6] = "Plugin", e))(v || {}), b = /* @__PURE__ */ ((e) => (e[e.Mutation = 0] = "Mutation", e[e.MouseMove = 1] = "MouseMove", e[e.MouseInteraction = 2] = "MouseInteraction", e[e.Scroll = 3] = "Scroll", e[e.ViewportResize = 4] = "ViewportResize", e[e.Input = 5] = "Input", e[e.TouchMove = 6] = "TouchMove", e[e.MediaInteraction = 7] = "MediaInteraction", e[e.StyleSheetRule = 8] = "StyleSheetRule", e[e.CanvasMutation = 9] = "CanvasMutation", e[e.Font = 10] = "Font", e[e.Log = 11] = "Log", e[e.Drag = 12] = "Drag", e[e.StyleDeclaration = 13] = "StyleDeclaration", e[e.Selection = 14] = "Selection", e[e.AdoptedStyleSheet = 15] = "AdoptedStyleSheet", e))(b || {}), ot = /* @__PURE__ */ ((e) => (e[e.MouseUp = 0] = "MouseUp", e[e.MouseDown = 1] = "MouseDown", e[e.Click = 2] = "Click", e[e.ContextMenu = 3] = "ContextMenu", e[e.DblClick = 4] = "DblClick", e[e.Focus = 5] = "Focus", e[e.Blur = 6] = "Blur", e[e.TouchStart = 7] = "TouchStart", e[e.TouchMove_Departed = 8] = "TouchMove_Departed", e[e.TouchEnd = 9] = "TouchEnd", e[e.TouchCancel = 10] = "TouchCancel", e))(ot || {}), ke = /* @__PURE__ */ ((e) => (e[e["2D"] = 0] = "2D", e[e.WebGL = 1] = "WebGL", e[e.WebGL2 = 2] = "WebGL2", e))(ke || {});
|
|
1473
1473
|
function kt(e) {
|
|
1474
1474
|
return "__ln" in e;
|
|
1475
1475
|
}
|
|
@@ -1515,14 +1515,14 @@ class vn {
|
|
|
1515
1515
|
if (this.frozen || this.locked)
|
|
1516
1516
|
return;
|
|
1517
1517
|
const t = [], r = new bn(), n = (c) => {
|
|
1518
|
-
let
|
|
1518
|
+
let o = c, d = Le;
|
|
1519
1519
|
for (; d === Le; )
|
|
1520
|
-
|
|
1520
|
+
o = o && o.nextSibling, d = o && this.mirror.getId(o);
|
|
1521
1521
|
return d;
|
|
1522
1522
|
}, s = (c) => {
|
|
1523
|
-
var
|
|
1523
|
+
var o, d, l, u;
|
|
1524
1524
|
let h = null;
|
|
1525
|
-
((d = (
|
|
1525
|
+
((d = (o = c.getRootNode) === null || o === void 0 ? void 0 : o.call(c)) === null || d === void 0 ? void 0 : d.nodeType) === Node.DOCUMENT_FRAGMENT_NODE && c.getRootNode().host && (h = c.getRootNode().host);
|
|
1526
1526
|
let f = h;
|
|
1527
1527
|
for (; ((u = (l = f == null ? void 0 : f.getRootNode) === null || l === void 0 ? void 0 : l.call(f)) === null || u === void 0 ? void 0 : u.nodeType) === Node.DOCUMENT_FRAGMENT_NODE && f.getRootNode().host; )
|
|
1528
1528
|
f = f.getRootNode().host;
|
|
@@ -1575,12 +1575,12 @@ class vn {
|
|
|
1575
1575
|
for (; r.length; ) {
|
|
1576
1576
|
let c = null;
|
|
1577
1577
|
if (i) {
|
|
1578
|
-
const
|
|
1579
|
-
|
|
1578
|
+
const o = this.mirror.getId(i.value.parentNode), d = n(i.value);
|
|
1579
|
+
o !== -1 && d !== -1 && (c = i);
|
|
1580
1580
|
}
|
|
1581
1581
|
if (!c)
|
|
1582
|
-
for (let
|
|
1583
|
-
const d = r.get(
|
|
1582
|
+
for (let o = r.length - 1; o >= 0; o--) {
|
|
1583
|
+
const d = r.get(o);
|
|
1584
1584
|
if (d) {
|
|
1585
1585
|
const l = this.mirror.getId(d.value.parentNode);
|
|
1586
1586
|
if (n(d.value) === -1)
|
|
@@ -1607,7 +1607,7 @@ class vn {
|
|
|
1607
1607
|
}
|
|
1608
1608
|
i = c.previous, r.removeNode(c.value), s(c.value);
|
|
1609
1609
|
}
|
|
1610
|
-
const
|
|
1610
|
+
const a = {
|
|
1611
1611
|
texts: this.texts.map((c) => ({
|
|
1612
1612
|
id: this.mirror.getId(c.node),
|
|
1613
1613
|
value: c.value
|
|
@@ -1619,7 +1619,7 @@ class vn {
|
|
|
1619
1619
|
removes: this.removes,
|
|
1620
1620
|
adds: t
|
|
1621
1621
|
};
|
|
1622
|
-
!
|
|
1622
|
+
!a.texts.length && !a.attributes.length && !a.removes.length && !a.adds.length || (this.texts = [], this.attributes = [], this.removes = [], this.addedSet = /* @__PURE__ */ new Set(), this.movedSet = /* @__PURE__ */ new Set(), this.droppedSet = /* @__PURE__ */ new Set(), this.movedMap = {}, this.mutationCb(a));
|
|
1623
1623
|
}, this.processMutation = (t) => {
|
|
1624
1624
|
if (!Qe(t.target, this.mirror))
|
|
1625
1625
|
switch (t.type) {
|
|
@@ -1654,13 +1654,13 @@ class vn {
|
|
|
1654
1654
|
}, this.attributes.push(s)), t.attributeName === "style") {
|
|
1655
1655
|
const i = this.doc.createElement("span");
|
|
1656
1656
|
t.oldValue && i.setAttribute("style", t.oldValue), (s.attributes.style === void 0 || s.attributes.style === null) && (s.attributes.style = {});
|
|
1657
|
-
const
|
|
1657
|
+
const a = s.attributes.style;
|
|
1658
1658
|
for (const c of Array.from(r.style)) {
|
|
1659
|
-
const
|
|
1660
|
-
(
|
|
1659
|
+
const o = r.style.getPropertyValue(c), d = r.style.getPropertyPriority(c);
|
|
1660
|
+
(o !== i.style.getPropertyValue(c) || d !== i.style.getPropertyPriority(c)) && (d === "" ? a[c] = o : a[c] = [o, d]);
|
|
1661
1661
|
}
|
|
1662
1662
|
for (const c of Array.from(i.style))
|
|
1663
|
-
r.style.getPropertyValue(c) === "" && (
|
|
1663
|
+
r.style.getPropertyValue(c) === "" && (a[c] = !1);
|
|
1664
1664
|
} else
|
|
1665
1665
|
s.attributes[t.attributeName] = Xt(this.doc, r.tagName, t.attributeName, n);
|
|
1666
1666
|
break;
|
|
@@ -1740,21 +1740,21 @@ function ct(e, t) {
|
|
|
1740
1740
|
e.delete(t), t.childNodes.forEach((r) => ct(e, r));
|
|
1741
1741
|
}
|
|
1742
1742
|
function Rt(e, t, r) {
|
|
1743
|
-
return e.length === 0 ? !1 :
|
|
1743
|
+
return e.length === 0 ? !1 : ar(e, t, r);
|
|
1744
1744
|
}
|
|
1745
|
-
function
|
|
1745
|
+
function ar(e, t, r) {
|
|
1746
1746
|
const { parentNode: n } = t;
|
|
1747
1747
|
if (!n)
|
|
1748
1748
|
return !1;
|
|
1749
1749
|
const s = r.getId(n);
|
|
1750
|
-
return e.some((i) => i.id === s) ? !0 :
|
|
1750
|
+
return e.some((i) => i.id === s) ? !0 : ar(e, n, r);
|
|
1751
1751
|
}
|
|
1752
1752
|
function Tt(e, t) {
|
|
1753
|
-
return e.size === 0 ? !1 :
|
|
1753
|
+
return e.size === 0 ? !1 : or(e, t);
|
|
1754
1754
|
}
|
|
1755
|
-
function
|
|
1755
|
+
function or(e, t) {
|
|
1756
1756
|
const { parentNode: r } = t;
|
|
1757
|
-
return r ? e.has(r) ? !0 :
|
|
1757
|
+
return r ? e.has(r) ? !0 : or(e, r) : !1;
|
|
1758
1758
|
}
|
|
1759
1759
|
const ue = [], cr = typeof CSSGroupingRule < "u", dr = typeof CSSMediaRule < "u", lr = typeof CSSSupportsRule < "u", ur = typeof CSSConditionRule < "u";
|
|
1760
1760
|
function xe(e) {
|
|
@@ -1775,8 +1775,8 @@ function pr(e, t) {
|
|
|
1775
1775
|
const s = new vn();
|
|
1776
1776
|
ue.push(s), s.init(e);
|
|
1777
1777
|
let i = window.MutationObserver || window.__rrMutationObserver;
|
|
1778
|
-
const
|
|
1779
|
-
|
|
1778
|
+
const a = (n = (r = window == null ? void 0 : window.Zone) === null || r === void 0 ? void 0 : r.__symbol__) === null || n === void 0 ? void 0 : n.call(r, "MutationObserver");
|
|
1779
|
+
a && window[a] && (i = window[a]);
|
|
1780
1780
|
const c = new i(s.processMutations.bind(s));
|
|
1781
1781
|
return c.observe(t, {
|
|
1782
1782
|
attributes: !0,
|
|
@@ -1792,18 +1792,18 @@ function wn({ mousemoveCb: e, sampling: t, doc: r, mirror: n }) {
|
|
|
1792
1792
|
return () => {
|
|
1793
1793
|
};
|
|
1794
1794
|
const s = typeof t.mousemove == "number" ? t.mousemove : 50, i = typeof t.mousemoveCallback == "number" ? t.mousemoveCallback : 500;
|
|
1795
|
-
let
|
|
1796
|
-
const
|
|
1795
|
+
let a = [], c;
|
|
1796
|
+
const o = Fe((u) => {
|
|
1797
1797
|
const h = Date.now() - c;
|
|
1798
|
-
e(
|
|
1798
|
+
e(a.map((f) => (f.timeOffset -= h, f)), u), a = [], c = null;
|
|
1799
1799
|
}, i), d = Fe((u) => {
|
|
1800
1800
|
const h = xe(u), { clientX: f, clientY: p } = rr(u) ? u.changedTouches[0] : u;
|
|
1801
|
-
c || (c = Date.now()),
|
|
1801
|
+
c || (c = Date.now()), a.push({
|
|
1802
1802
|
x: f,
|
|
1803
1803
|
y: p,
|
|
1804
1804
|
id: n.getId(h),
|
|
1805
1805
|
timeOffset: Date.now() - c
|
|
1806
|
-
}),
|
|
1806
|
+
}), o(typeof DragEvent < "u" && u instanceof DragEvent ? b.Drag : u instanceof MouseEvent ? b.MouseMove : b.TouchMove);
|
|
1807
1807
|
}, s, {
|
|
1808
1808
|
trailing: !1
|
|
1809
1809
|
}), l = [
|
|
@@ -1819,7 +1819,7 @@ function An({ mouseInteractionCb: e, doc: t, mirror: r, blockClass: n, blockSele
|
|
|
1819
1819
|
if (i.mouseInteraction === !1)
|
|
1820
1820
|
return () => {
|
|
1821
1821
|
};
|
|
1822
|
-
const
|
|
1822
|
+
const a = i.mouseInteraction === !0 || i.mouseInteraction === void 0 ? {} : i.mouseInteraction, c = [], o = (d) => (l) => {
|
|
1823
1823
|
const u = xe(l);
|
|
1824
1824
|
if (K(u, n, s, !0))
|
|
1825
1825
|
return;
|
|
@@ -1828,26 +1828,26 @@ function An({ mouseInteractionCb: e, doc: t, mirror: r, blockClass: n, blockSele
|
|
|
1828
1828
|
return;
|
|
1829
1829
|
const f = r.getId(u), { clientX: p, clientY: y } = h;
|
|
1830
1830
|
e({
|
|
1831
|
-
type:
|
|
1831
|
+
type: ot[d],
|
|
1832
1832
|
id: f,
|
|
1833
1833
|
x: p,
|
|
1834
1834
|
y
|
|
1835
1835
|
});
|
|
1836
1836
|
};
|
|
1837
|
-
return Object.keys(
|
|
1838
|
-
const l = d.toLowerCase(), u =
|
|
1837
|
+
return Object.keys(ot).filter((d) => Number.isNaN(Number(d)) && !d.endsWith("_Departed") && a[d] !== !1).forEach((d) => {
|
|
1838
|
+
const l = d.toLowerCase(), u = o(d);
|
|
1839
1839
|
c.push(G(l, u, t));
|
|
1840
1840
|
}), () => {
|
|
1841
1841
|
c.forEach((d) => d());
|
|
1842
1842
|
};
|
|
1843
1843
|
}
|
|
1844
1844
|
function hr({ scrollCb: e, doc: t, mirror: r, blockClass: n, blockSelector: s, sampling: i }) {
|
|
1845
|
-
const
|
|
1846
|
-
const
|
|
1847
|
-
if (!
|
|
1845
|
+
const a = Fe((c) => {
|
|
1846
|
+
const o = xe(c);
|
|
1847
|
+
if (!o || K(o, n, s, !0))
|
|
1848
1848
|
return;
|
|
1849
|
-
const d = r.getId(
|
|
1850
|
-
if (
|
|
1849
|
+
const d = r.getId(o);
|
|
1850
|
+
if (o === t) {
|
|
1851
1851
|
const l = t.scrollingElement || t.documentElement;
|
|
1852
1852
|
e({
|
|
1853
1853
|
id: d,
|
|
@@ -1857,11 +1857,11 @@ function hr({ scrollCb: e, doc: t, mirror: r, blockClass: n, blockSelector: s, s
|
|
|
1857
1857
|
} else
|
|
1858
1858
|
e({
|
|
1859
1859
|
id: d,
|
|
1860
|
-
x:
|
|
1861
|
-
y:
|
|
1860
|
+
x: o.scrollLeft,
|
|
1861
|
+
y: o.scrollTop
|
|
1862
1862
|
});
|
|
1863
1863
|
}, i.scroll || 100);
|
|
1864
|
-
return G("scroll",
|
|
1864
|
+
return G("scroll", a, t);
|
|
1865
1865
|
}
|
|
1866
1866
|
function kn({ viewportResizeCb: e }) {
|
|
1867
1867
|
let t = -1, r = -1;
|
|
@@ -1879,7 +1879,7 @@ function _t(e, t) {
|
|
|
1879
1879
|
return t || delete r.userTriggered, r;
|
|
1880
1880
|
}
|
|
1881
1881
|
const En = ["INPUT", "TEXTAREA", "SELECT"], Nt = /* @__PURE__ */ new WeakMap();
|
|
1882
|
-
function Rn({ inputCb: e, doc: t, mirror: r, blockClass: n, blockSelector: s, ignoreClass: i, maskInputOptions:
|
|
1882
|
+
function Rn({ inputCb: e, doc: t, mirror: r, blockClass: n, blockSelector: s, ignoreClass: i, maskInputOptions: a, maskInputFn: c, sampling: o, userTriggeredOnInput: d }) {
|
|
1883
1883
|
function l(C) {
|
|
1884
1884
|
let m = xe(C);
|
|
1885
1885
|
const g = C.isTrusted;
|
|
@@ -1889,8 +1889,8 @@ function Rn({ inputCb: e, doc: t, mirror: r, blockClass: n, blockSelector: s, ig
|
|
|
1889
1889
|
if (m.classList.contains(i))
|
|
1890
1890
|
return;
|
|
1891
1891
|
let U = m.value, x = !1;
|
|
1892
|
-
k === "radio" || k === "checkbox" ? x = m.checked : (
|
|
1893
|
-
maskInputOptions:
|
|
1892
|
+
k === "radio" || k === "checkbox" ? x = m.checked : (a[m.tagName.toLowerCase()] || a[k]) && (U = ut({
|
|
1893
|
+
maskInputOptions: a,
|
|
1894
1894
|
tagName: m.tagName,
|
|
1895
1895
|
type: k,
|
|
1896
1896
|
value: U,
|
|
@@ -1913,7 +1913,7 @@ function Rn({ inputCb: e, doc: t, mirror: r, blockClass: n, blockSelector: s, ig
|
|
|
1913
1913
|
e(Object.assign(Object.assign({}, m), { id: k }));
|
|
1914
1914
|
}
|
|
1915
1915
|
}
|
|
1916
|
-
const f = (
|
|
1916
|
+
const f = (o.input === "last" ? ["change"] : ["input", "change"]).map((C) => G(C, l, t)), p = t.defaultView;
|
|
1917
1917
|
if (!p)
|
|
1918
1918
|
return () => {
|
|
1919
1919
|
f.forEach((C) => C());
|
|
@@ -1938,11 +1938,11 @@ function He(e) {
|
|
|
1938
1938
|
const t = [];
|
|
1939
1939
|
function r(n, s) {
|
|
1940
1940
|
if (cr && n.parentRule instanceof CSSGroupingRule || dr && n.parentRule instanceof CSSMediaRule || lr && n.parentRule instanceof CSSSupportsRule || ur && n.parentRule instanceof CSSConditionRule) {
|
|
1941
|
-
const
|
|
1942
|
-
s.unshift(
|
|
1941
|
+
const a = Array.from(n.parentRule.cssRules).indexOf(n);
|
|
1942
|
+
s.unshift(a);
|
|
1943
1943
|
} else if (n.parentStyleSheet) {
|
|
1944
|
-
const
|
|
1945
|
-
s.unshift(
|
|
1944
|
+
const a = Array.from(n.parentStyleSheet.cssRules).indexOf(n);
|
|
1945
|
+
s.unshift(a);
|
|
1946
1946
|
}
|
|
1947
1947
|
return s;
|
|
1948
1948
|
}
|
|
@@ -1974,14 +1974,14 @@ function Tn({ styleSheetRuleCb: e, mirror: t, stylesheetManager: r }, { win: n }
|
|
|
1974
1974
|
removes: [{ index: l }]
|
|
1975
1975
|
}), i.apply(this, [l]);
|
|
1976
1976
|
};
|
|
1977
|
-
let
|
|
1978
|
-
n.CSSStyleSheet.prototype.replace && (
|
|
1977
|
+
let a;
|
|
1978
|
+
n.CSSStyleSheet.prototype.replace && (a = n.CSSStyleSheet.prototype.replace, n.CSSStyleSheet.prototype.replace = function(l) {
|
|
1979
1979
|
const { id: u, styleId: h } = ce(this, t, r.styleMirror);
|
|
1980
1980
|
return (u && u !== -1 || h && h !== -1) && e({
|
|
1981
1981
|
id: u,
|
|
1982
1982
|
styleId: h,
|
|
1983
1983
|
replace: l
|
|
1984
|
-
}),
|
|
1984
|
+
}), a.apply(this, [l]);
|
|
1985
1985
|
});
|
|
1986
1986
|
let c;
|
|
1987
1987
|
n.CSSStyleSheet.prototype.replaceSync && (c = n.CSSStyleSheet.prototype.replaceSync, n.CSSStyleSheet.prototype.replaceSync = function(l) {
|
|
@@ -1992,10 +1992,10 @@ function Tn({ styleSheetRuleCb: e, mirror: t, stylesheetManager: r }, { win: n }
|
|
|
1992
1992
|
replaceSync: l
|
|
1993
1993
|
}), c.apply(this, [l]);
|
|
1994
1994
|
});
|
|
1995
|
-
const
|
|
1996
|
-
cr ?
|
|
1995
|
+
const o = {};
|
|
1996
|
+
cr ? o.CSSGroupingRule = n.CSSGroupingRule : (dr && (o.CSSMediaRule = n.CSSMediaRule), ur && (o.CSSConditionRule = n.CSSConditionRule), lr && (o.CSSSupportsRule = n.CSSSupportsRule));
|
|
1997
1997
|
const d = {};
|
|
1998
|
-
return Object.entries(
|
|
1998
|
+
return Object.entries(o).forEach(([l, u]) => {
|
|
1999
1999
|
d[l] = {
|
|
2000
2000
|
insertRule: u.prototype.insertRule,
|
|
2001
2001
|
deleteRule: u.prototype.deleteRule
|
|
@@ -2025,67 +2025,67 @@ function Tn({ styleSheetRuleCb: e, mirror: t, stylesheetManager: r }, { win: n }
|
|
|
2025
2025
|
}), d[l].deleteRule.apply(this, [h]);
|
|
2026
2026
|
};
|
|
2027
2027
|
}), () => {
|
|
2028
|
-
n.CSSStyleSheet.prototype.insertRule = s, n.CSSStyleSheet.prototype.deleteRule = i,
|
|
2028
|
+
n.CSSStyleSheet.prototype.insertRule = s, n.CSSStyleSheet.prototype.deleteRule = i, a && (n.CSSStyleSheet.prototype.replace = a), c && (n.CSSStyleSheet.prototype.replaceSync = c), Object.entries(o).forEach(([l, u]) => {
|
|
2029
2029
|
u.prototype.insertRule = d[l].insertRule, u.prototype.deleteRule = d[l].deleteRule;
|
|
2030
2030
|
});
|
|
2031
2031
|
};
|
|
2032
2032
|
}
|
|
2033
2033
|
function fr({ mirror: e, stylesheetManager: t }, r) {
|
|
2034
2034
|
var n, s, i;
|
|
2035
|
-
let
|
|
2036
|
-
r.nodeName === "#document" ?
|
|
2037
|
-
const c = r.nodeName === "#document" ? (n = r.defaultView) === null || n === void 0 ? void 0 : n.Document : (i = (s = r.ownerDocument) === null || s === void 0 ? void 0 : s.defaultView) === null || i === void 0 ? void 0 : i.ShadowRoot,
|
|
2038
|
-
return
|
|
2035
|
+
let a = null;
|
|
2036
|
+
r.nodeName === "#document" ? a = e.getId(r) : a = e.getId(r.host);
|
|
2037
|
+
const c = r.nodeName === "#document" ? (n = r.defaultView) === null || n === void 0 ? void 0 : n.Document : (i = (s = r.ownerDocument) === null || s === void 0 ? void 0 : s.defaultView) === null || i === void 0 ? void 0 : i.ShadowRoot, o = Object.getOwnPropertyDescriptor(c == null ? void 0 : c.prototype, "adoptedStyleSheets");
|
|
2038
|
+
return a === null || a === -1 || !c || !o ? () => {
|
|
2039
2039
|
} : (Object.defineProperty(r, "adoptedStyleSheets", {
|
|
2040
|
-
configurable:
|
|
2041
|
-
enumerable:
|
|
2040
|
+
configurable: o.configurable,
|
|
2041
|
+
enumerable: o.enumerable,
|
|
2042
2042
|
get() {
|
|
2043
2043
|
var d;
|
|
2044
|
-
return (d =
|
|
2044
|
+
return (d = o.get) === null || d === void 0 ? void 0 : d.call(this);
|
|
2045
2045
|
},
|
|
2046
2046
|
set(d) {
|
|
2047
2047
|
var l;
|
|
2048
|
-
const u = (l =
|
|
2049
|
-
if (
|
|
2048
|
+
const u = (l = o.set) === null || l === void 0 ? void 0 : l.call(this, d);
|
|
2049
|
+
if (a !== null && a !== -1)
|
|
2050
2050
|
try {
|
|
2051
|
-
t.adoptStyleSheets(d,
|
|
2051
|
+
t.adoptStyleSheets(d, a);
|
|
2052
2052
|
} catch {
|
|
2053
2053
|
}
|
|
2054
2054
|
return u;
|
|
2055
2055
|
}
|
|
2056
2056
|
}), () => {
|
|
2057
2057
|
Object.defineProperty(r, "adoptedStyleSheets", {
|
|
2058
|
-
configurable:
|
|
2059
|
-
enumerable:
|
|
2060
|
-
get:
|
|
2061
|
-
set:
|
|
2058
|
+
configurable: o.configurable,
|
|
2059
|
+
enumerable: o.enumerable,
|
|
2060
|
+
get: o.get,
|
|
2061
|
+
set: o.set
|
|
2062
2062
|
});
|
|
2063
2063
|
});
|
|
2064
2064
|
}
|
|
2065
2065
|
function _n({ styleDeclarationCb: e, mirror: t, ignoreCSSAttributes: r, stylesheetManager: n }, { win: s }) {
|
|
2066
2066
|
const i = s.CSSStyleDeclaration.prototype.setProperty;
|
|
2067
|
-
s.CSSStyleDeclaration.prototype.setProperty = function(c,
|
|
2067
|
+
s.CSSStyleDeclaration.prototype.setProperty = function(c, o, d) {
|
|
2068
2068
|
var l;
|
|
2069
2069
|
if (r.has(c))
|
|
2070
|
-
return i.apply(this, [c,
|
|
2070
|
+
return i.apply(this, [c, o, d]);
|
|
2071
2071
|
const { id: u, styleId: h } = ce((l = this.parentRule) === null || l === void 0 ? void 0 : l.parentStyleSheet, t, n.styleMirror);
|
|
2072
2072
|
return (u && u !== -1 || h && h !== -1) && e({
|
|
2073
2073
|
id: u,
|
|
2074
2074
|
styleId: h,
|
|
2075
2075
|
set: {
|
|
2076
2076
|
property: c,
|
|
2077
|
-
value:
|
|
2077
|
+
value: o,
|
|
2078
2078
|
priority: d
|
|
2079
2079
|
},
|
|
2080
2080
|
index: He(this.parentRule)
|
|
2081
|
-
}), i.apply(this, [c,
|
|
2081
|
+
}), i.apply(this, [c, o, d]);
|
|
2082
2082
|
};
|
|
2083
|
-
const
|
|
2083
|
+
const a = s.CSSStyleDeclaration.prototype.removeProperty;
|
|
2084
2084
|
return s.CSSStyleDeclaration.prototype.removeProperty = function(c) {
|
|
2085
|
-
var
|
|
2085
|
+
var o;
|
|
2086
2086
|
if (r.has(c))
|
|
2087
|
-
return
|
|
2088
|
-
const { id: d, styleId: l } = ce((
|
|
2087
|
+
return a.apply(this, [c]);
|
|
2088
|
+
const { id: d, styleId: l } = ce((o = this.parentRule) === null || o === void 0 ? void 0 : o.parentStyleSheet, t, n.styleMirror);
|
|
2089
2089
|
return (d && d !== -1 || l && l !== -1) && e({
|
|
2090
2090
|
id: d,
|
|
2091
2091
|
styleId: l,
|
|
@@ -2093,14 +2093,14 @@ function _n({ styleDeclarationCb: e, mirror: t, ignoreCSSAttributes: r, styleshe
|
|
|
2093
2093
|
property: c
|
|
2094
2094
|
},
|
|
2095
2095
|
index: He(this.parentRule)
|
|
2096
|
-
}),
|
|
2096
|
+
}), a.apply(this, [c]);
|
|
2097
2097
|
}, () => {
|
|
2098
|
-
s.CSSStyleDeclaration.prototype.setProperty = i, s.CSSStyleDeclaration.prototype.removeProperty =
|
|
2098
|
+
s.CSSStyleDeclaration.prototype.setProperty = i, s.CSSStyleDeclaration.prototype.removeProperty = a;
|
|
2099
2099
|
};
|
|
2100
2100
|
}
|
|
2101
2101
|
function Nn({ mediaInteractionCb: e, blockClass: t, blockSelector: r, mirror: n, sampling: s }) {
|
|
2102
|
-
const i = (c) => Fe((
|
|
2103
|
-
const d = xe(
|
|
2102
|
+
const i = (c) => Fe((o) => {
|
|
2103
|
+
const d = xe(o);
|
|
2104
2104
|
if (!d || K(d, t, r, !0))
|
|
2105
2105
|
return;
|
|
2106
2106
|
const { currentTime: l, volume: u, muted: h, playbackRate: f } = d;
|
|
@@ -2112,7 +2112,7 @@ function Nn({ mediaInteractionCb: e, blockClass: t, blockSelector: r, mirror: n,
|
|
|
2112
2112
|
muted: h,
|
|
2113
2113
|
playbackRate: f
|
|
2114
2114
|
});
|
|
2115
|
-
}, s.media || 500),
|
|
2115
|
+
}, s.media || 500), a = [
|
|
2116
2116
|
G("play", i(0)),
|
|
2117
2117
|
G("pause", i(1)),
|
|
2118
2118
|
G("seeked", i(2)),
|
|
@@ -2120,7 +2120,7 @@ function Nn({ mediaInteractionCb: e, blockClass: t, blockSelector: r, mirror: n,
|
|
|
2120
2120
|
G("ratechange", i(4))
|
|
2121
2121
|
];
|
|
2122
2122
|
return () => {
|
|
2123
|
-
|
|
2123
|
+
a.forEach((c) => c());
|
|
2124
2124
|
};
|
|
2125
2125
|
}
|
|
2126
2126
|
function Mn({ fontCb: e, doc: t }) {
|
|
@@ -2129,40 +2129,40 @@ function Mn({ fontCb: e, doc: t }) {
|
|
|
2129
2129
|
return () => {
|
|
2130
2130
|
};
|
|
2131
2131
|
const n = [], s = /* @__PURE__ */ new WeakMap(), i = r.FontFace;
|
|
2132
|
-
r.FontFace = function(
|
|
2133
|
-
const u = new i(
|
|
2132
|
+
r.FontFace = function(o, d, l) {
|
|
2133
|
+
const u = new i(o, d, l);
|
|
2134
2134
|
return s.set(u, {
|
|
2135
|
-
family:
|
|
2135
|
+
family: o,
|
|
2136
2136
|
buffer: typeof d != "string",
|
|
2137
2137
|
descriptors: l,
|
|
2138
2138
|
fontSource: typeof d == "string" ? d : JSON.stringify(Array.from(new Uint8Array(d)))
|
|
2139
2139
|
}), u;
|
|
2140
2140
|
};
|
|
2141
|
-
const
|
|
2142
|
-
return function(
|
|
2141
|
+
const a = he(t.fonts, "add", function(c) {
|
|
2142
|
+
return function(o) {
|
|
2143
2143
|
return setTimeout(() => {
|
|
2144
|
-
const d = s.get(
|
|
2145
|
-
d && (e(d), s.delete(
|
|
2146
|
-
}, 0), c.apply(this, [
|
|
2144
|
+
const d = s.get(o);
|
|
2145
|
+
d && (e(d), s.delete(o));
|
|
2146
|
+
}, 0), c.apply(this, [o]);
|
|
2147
2147
|
};
|
|
2148
2148
|
});
|
|
2149
2149
|
return n.push(() => {
|
|
2150
2150
|
r.FontFace = i;
|
|
2151
|
-
}), n.push(
|
|
2151
|
+
}), n.push(a), () => {
|
|
2152
2152
|
n.forEach((c) => c());
|
|
2153
2153
|
};
|
|
2154
2154
|
}
|
|
2155
2155
|
function On(e) {
|
|
2156
2156
|
const { doc: t, mirror: r, blockClass: n, blockSelector: s, selectionCb: i } = e;
|
|
2157
|
-
let
|
|
2157
|
+
let a = !0;
|
|
2158
2158
|
const c = () => {
|
|
2159
|
-
const
|
|
2160
|
-
if (!
|
|
2159
|
+
const o = t.getSelection();
|
|
2160
|
+
if (!o || a && (o != null && o.isCollapsed))
|
|
2161
2161
|
return;
|
|
2162
|
-
|
|
2163
|
-
const d = [], l =
|
|
2162
|
+
a = o.isCollapsed || !1;
|
|
2163
|
+
const d = [], l = o.rangeCount || 0;
|
|
2164
2164
|
for (let u = 0; u < l; u++) {
|
|
2165
|
-
const h =
|
|
2165
|
+
const h = o.getRangeAt(u), { startContainer: f, startOffset: p, endContainer: y, endOffset: S } = h;
|
|
2166
2166
|
K(f, n, s, !0) || K(y, n, s, !0) || d.push({
|
|
2167
2167
|
start: r.getId(f),
|
|
2168
2168
|
startOffset: p,
|
|
@@ -2175,7 +2175,7 @@ function On(e) {
|
|
|
2175
2175
|
return c(), G("selectionchange", c);
|
|
2176
2176
|
}
|
|
2177
2177
|
function Ln(e, t) {
|
|
2178
|
-
const { mutationCb: r, mousemoveCb: n, mouseInteractionCb: s, scrollCb: i, viewportResizeCb:
|
|
2178
|
+
const { mutationCb: r, mousemoveCb: n, mouseInteractionCb: s, scrollCb: i, viewportResizeCb: a, inputCb: c, mediaInteractionCb: o, styleSheetRuleCb: d, styleDeclarationCb: l, canvasMutationCb: u, fontCb: h, selectionCb: f } = e;
|
|
2179
2179
|
e.mutationCb = (...p) => {
|
|
2180
2180
|
t.mutation && t.mutation(...p), r(...p);
|
|
2181
2181
|
}, e.mousemoveCb = (...p) => {
|
|
@@ -2185,11 +2185,11 @@ function Ln(e, t) {
|
|
|
2185
2185
|
}, e.scrollCb = (...p) => {
|
|
2186
2186
|
t.scroll && t.scroll(...p), i(...p);
|
|
2187
2187
|
}, e.viewportResizeCb = (...p) => {
|
|
2188
|
-
t.viewportResize && t.viewportResize(...p),
|
|
2188
|
+
t.viewportResize && t.viewportResize(...p), a(...p);
|
|
2189
2189
|
}, e.inputCb = (...p) => {
|
|
2190
2190
|
t.input && t.input(...p), c(...p);
|
|
2191
2191
|
}, e.mediaInteractionCb = (...p) => {
|
|
2192
|
-
t.mediaInteaction && t.mediaInteaction(...p),
|
|
2192
|
+
t.mediaInteaction && t.mediaInteaction(...p), o(...p);
|
|
2193
2193
|
}, e.styleSheetRuleCb = (...p) => {
|
|
2194
2194
|
t.styleSheetRule && t.styleSheetRule(...p), d(...p);
|
|
2195
2195
|
}, e.styleDeclarationCb = (...p) => {
|
|
@@ -2208,14 +2208,14 @@ function Fn(e, t = {}) {
|
|
|
2208
2208
|
return () => {
|
|
2209
2209
|
};
|
|
2210
2210
|
Ln(e, t);
|
|
2211
|
-
const n = pr(e, e.doc), s = wn(e), i = An(e),
|
|
2211
|
+
const n = pr(e, e.doc), s = wn(e), i = An(e), a = hr(e), c = kn(e), o = Rn(e), d = Nn(e), l = Tn(e, { win: r }), u = fr(e, e.doc), h = _n(e, {
|
|
2212
2212
|
win: r
|
|
2213
2213
|
}), f = e.collectFonts ? Mn(e) : () => {
|
|
2214
2214
|
}, p = On(e), y = [];
|
|
2215
2215
|
for (const S of e.plugins)
|
|
2216
2216
|
y.push(S.observer(S.callback, r, S.options));
|
|
2217
2217
|
return () => {
|
|
2218
|
-
ue.forEach((S) => S.reset()), n.disconnect(), s(), i(),
|
|
2218
|
+
ue.forEach((S) => S.reset()), n.disconnect(), s(), i(), a(), c(), o(), d(), l(), u(), h(), f(), p(), y.forEach((S) => S());
|
|
2219
2219
|
};
|
|
2220
2220
|
}
|
|
2221
2221
|
class Mt {
|
|
@@ -2223,9 +2223,9 @@ class Mt {
|
|
|
2223
2223
|
this.generateIdFn = t, this.iframeIdToRemoteIdMap = /* @__PURE__ */ new WeakMap(), this.iframeRemoteIdToIdMap = /* @__PURE__ */ new WeakMap();
|
|
2224
2224
|
}
|
|
2225
2225
|
getId(t, r, n, s) {
|
|
2226
|
-
const i = n || this.getIdToRemoteIdMap(t),
|
|
2226
|
+
const i = n || this.getIdToRemoteIdMap(t), a = s || this.getRemoteIdToIdMap(t);
|
|
2227
2227
|
let c = i.get(r);
|
|
2228
|
-
return c || (c = this.generateIdFn(), i.set(r, c),
|
|
2228
|
+
return c || (c = this.generateIdFn(), i.set(r, c), a.set(c, r)), c;
|
|
2229
2229
|
}
|
|
2230
2230
|
getIds(t, r) {
|
|
2231
2231
|
const n = this.getIdToRemoteIdMap(t), s = this.getRemoteIdToIdMap(t);
|
|
@@ -2446,27 +2446,27 @@ function Dn(e, t) {
|
|
|
2446
2446
|
}
|
|
2447
2447
|
function Un(e, t, r, n) {
|
|
2448
2448
|
function s(i) {
|
|
2449
|
-
return i instanceof r ? i : new r(function(
|
|
2450
|
-
|
|
2449
|
+
return i instanceof r ? i : new r(function(a) {
|
|
2450
|
+
a(i);
|
|
2451
2451
|
});
|
|
2452
2452
|
}
|
|
2453
|
-
return new (r || (r = Promise))(function(i,
|
|
2453
|
+
return new (r || (r = Promise))(function(i, a) {
|
|
2454
2454
|
function c(l) {
|
|
2455
2455
|
try {
|
|
2456
2456
|
d(n.next(l));
|
|
2457
2457
|
} catch (u) {
|
|
2458
|
-
|
|
2458
|
+
a(u);
|
|
2459
2459
|
}
|
|
2460
2460
|
}
|
|
2461
|
-
function
|
|
2461
|
+
function o(l) {
|
|
2462
2462
|
try {
|
|
2463
2463
|
d(n.throw(l));
|
|
2464
2464
|
} catch (u) {
|
|
2465
|
-
|
|
2465
|
+
a(u);
|
|
2466
2466
|
}
|
|
2467
2467
|
}
|
|
2468
2468
|
function d(l) {
|
|
2469
|
-
l.done ? i(l.value) : s(l.value).then(c,
|
|
2469
|
+
l.done ? i(l.value) : s(l.value).then(c, o);
|
|
2470
2470
|
}
|
|
2471
2471
|
d((n = n.apply(e, [])).next());
|
|
2472
2472
|
});
|
|
@@ -2562,46 +2562,46 @@ const gr = (e, t, r) => [...e].map((n) => De(n, t, r)), yr = (e, t) => !![
|
|
|
2562
2562
|
].filter((s) => typeof t[s] == "function").find((s) => e instanceof t[s]);
|
|
2563
2563
|
function Kn(e, t, r, n) {
|
|
2564
2564
|
const s = [], i = Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);
|
|
2565
|
-
for (const
|
|
2565
|
+
for (const a of i)
|
|
2566
2566
|
try {
|
|
2567
|
-
if (typeof t.CanvasRenderingContext2D.prototype[
|
|
2567
|
+
if (typeof t.CanvasRenderingContext2D.prototype[a] != "function")
|
|
2568
2568
|
continue;
|
|
2569
|
-
const c = he(t.CanvasRenderingContext2D.prototype,
|
|
2569
|
+
const c = he(t.CanvasRenderingContext2D.prototype, a, function(o) {
|
|
2570
2570
|
return function(...d) {
|
|
2571
2571
|
return K(this.canvas, r, n, !0) || setTimeout(() => {
|
|
2572
2572
|
const l = gr([...d], t, this);
|
|
2573
2573
|
e(this.canvas, {
|
|
2574
2574
|
type: ke["2D"],
|
|
2575
|
-
property:
|
|
2575
|
+
property: a,
|
|
2576
2576
|
args: l
|
|
2577
2577
|
});
|
|
2578
|
-
}, 0),
|
|
2578
|
+
}, 0), o.apply(this, d);
|
|
2579
2579
|
};
|
|
2580
2580
|
});
|
|
2581
2581
|
s.push(c);
|
|
2582
2582
|
} catch {
|
|
2583
|
-
const
|
|
2583
|
+
const o = qe(t.CanvasRenderingContext2D.prototype, a, {
|
|
2584
2584
|
set(d) {
|
|
2585
2585
|
e(this.canvas, {
|
|
2586
2586
|
type: ke["2D"],
|
|
2587
|
-
property:
|
|
2587
|
+
property: a,
|
|
2588
2588
|
args: [d],
|
|
2589
2589
|
setter: !0
|
|
2590
2590
|
});
|
|
2591
2591
|
}
|
|
2592
2592
|
});
|
|
2593
|
-
s.push(
|
|
2593
|
+
s.push(o);
|
|
2594
2594
|
}
|
|
2595
2595
|
return () => {
|
|
2596
|
-
s.forEach((
|
|
2596
|
+
s.forEach((a) => a());
|
|
2597
2597
|
};
|
|
2598
2598
|
}
|
|
2599
2599
|
function Lt(e, t, r) {
|
|
2600
2600
|
const n = [];
|
|
2601
2601
|
try {
|
|
2602
2602
|
const s = he(e.HTMLCanvasElement.prototype, "getContext", function(i) {
|
|
2603
|
-
return function(
|
|
2604
|
-
return K(this, t, r, !0) || "__context" in this || (this.__context =
|
|
2603
|
+
return function(a, ...c) {
|
|
2604
|
+
return K(this, t, r, !0) || "__context" in this || (this.__context = a), i.apply(this, [a, ...c]);
|
|
2605
2605
|
};
|
|
2606
2606
|
});
|
|
2607
2607
|
n.push(s);
|
|
@@ -2612,9 +2612,9 @@ function Lt(e, t, r) {
|
|
|
2612
2612
|
n.forEach((s) => s());
|
|
2613
2613
|
};
|
|
2614
2614
|
}
|
|
2615
|
-
function Ft(e, t, r, n, s, i,
|
|
2616
|
-
const c = [],
|
|
2617
|
-
for (const d of
|
|
2615
|
+
function Ft(e, t, r, n, s, i, a) {
|
|
2616
|
+
const c = [], o = Object.getOwnPropertyNames(e);
|
|
2617
|
+
for (const d of o)
|
|
2618
2618
|
if (![
|
|
2619
2619
|
"isContextLost",
|
|
2620
2620
|
"canvas",
|
|
@@ -2627,8 +2627,8 @@ function Ft(e, t, r, n, s, i, o) {
|
|
|
2627
2627
|
const l = he(e, d, function(u) {
|
|
2628
2628
|
return function(...h) {
|
|
2629
2629
|
const f = u.apply(this, h);
|
|
2630
|
-
if (mr(f,
|
|
2631
|
-
const p = gr([...h],
|
|
2630
|
+
if (mr(f, a, this), !K(this.canvas, n, s, !0)) {
|
|
2631
|
+
const p = gr([...h], a, this), y = {
|
|
2632
2632
|
type: t,
|
|
2633
2633
|
property: d,
|
|
2634
2634
|
args: p
|
|
@@ -2657,7 +2657,7 @@ function Ft(e, t, r, n, s, i, o) {
|
|
|
2657
2657
|
function Vn(e, t, r, n, s) {
|
|
2658
2658
|
const i = [];
|
|
2659
2659
|
return i.push(...Ft(t.WebGLRenderingContext.prototype, ke.WebGL, e, r, n, s, t)), typeof t.WebGL2RenderingContext < "u" && i.push(...Ft(t.WebGL2RenderingContext.prototype, ke.WebGL2, e, r, n, s, t)), () => {
|
|
2660
|
-
i.forEach((
|
|
2660
|
+
i.forEach((a) => a());
|
|
2661
2661
|
};
|
|
2662
2662
|
}
|
|
2663
2663
|
var Ir = null;
|
|
@@ -2682,8 +2682,8 @@ function jn(e, t) {
|
|
|
2682
2682
|
}
|
|
2683
2683
|
function Jn(e, t, r) {
|
|
2684
2684
|
var n = jn(e), s = n.indexOf(`
|
|
2685
|
-
`, 10) + 1, i = n.substring(s) + "",
|
|
2686
|
-
return URL.createObjectURL(
|
|
2685
|
+
`, 10) + 1, i = n.substring(s) + "", a = new Blob([i], { type: "application/javascript" });
|
|
2686
|
+
return URL.createObjectURL(a);
|
|
2687
2687
|
}
|
|
2688
2688
|
function qn(e, t, r) {
|
|
2689
2689
|
var n;
|
|
@@ -2701,11 +2701,11 @@ function Qn(e, t, r) {
|
|
|
2701
2701
|
var $n = Qn("Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwooZnVuY3Rpb24gKCkgewogICAgJ3VzZSBzdHJpY3QnOwoKICAgIC8qISAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg0KICAgIENvcHlyaWdodCAoYykgTWljcm9zb2Z0IENvcnBvcmF0aW9uLg0KDQogICAgUGVybWlzc2lvbiB0byB1c2UsIGNvcHksIG1vZGlmeSwgYW5kL29yIGRpc3RyaWJ1dGUgdGhpcyBzb2Z0d2FyZSBmb3IgYW55DQogICAgcHVycG9zZSB3aXRoIG9yIHdpdGhvdXQgZmVlIGlzIGhlcmVieSBncmFudGVkLg0KDQogICAgVEhFIFNPRlRXQVJFIElTIFBST1ZJREVEICJBUyBJUyIgQU5EIFRIRSBBVVRIT1IgRElTQ0xBSU1TIEFMTCBXQVJSQU5USUVTIFdJVEgNCiAgICBSRUdBUkQgVE8gVEhJUyBTT0ZUV0FSRSBJTkNMVURJTkcgQUxMIElNUExJRUQgV0FSUkFOVElFUyBPRiBNRVJDSEFOVEFCSUxJVFkNCiAgICBBTkQgRklUTkVTUy4gSU4gTk8gRVZFTlQgU0hBTEwgVEhFIEFVVEhPUiBCRSBMSUFCTEUgRk9SIEFOWSBTUEVDSUFMLCBESVJFQ1QsDQogICAgSU5ESVJFQ1QsIE9SIENPTlNFUVVFTlRJQUwgREFNQUdFUyBPUiBBTlkgREFNQUdFUyBXSEFUU09FVkVSIFJFU1VMVElORyBGUk9NDQogICAgTE9TUyBPRiBVU0UsIERBVEEgT1IgUFJPRklUUywgV0hFVEhFUiBJTiBBTiBBQ1RJT04gT0YgQ09OVFJBQ1QsIE5FR0xJR0VOQ0UgT1INCiAgICBPVEhFUiBUT1JUSU9VUyBBQ1RJT04sIEFSSVNJTkcgT1VUIE9GIE9SIElOIENPTk5FQ1RJT04gV0lUSCBUSEUgVVNFIE9SDQogICAgUEVSRk9STUFOQ0UgT0YgVEhJUyBTT0ZUV0FSRS4NCiAgICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLw0KDQogICAgZnVuY3Rpb24gX19hd2FpdGVyKHRoaXNBcmcsIF9hcmd1bWVudHMsIFAsIGdlbmVyYXRvcikgew0KICAgICAgICBmdW5jdGlvbiBhZG9wdCh2YWx1ZSkgeyByZXR1cm4gdmFsdWUgaW5zdGFuY2VvZiBQID8gdmFsdWUgOiBuZXcgUChmdW5jdGlvbiAocmVzb2x2ZSkgeyByZXNvbHZlKHZhbHVlKTsgfSk7IH0NCiAgICAgICAgcmV0dXJuIG5ldyAoUCB8fCAoUCA9IFByb21pc2UpKShmdW5jdGlvbiAocmVzb2x2ZSwgcmVqZWN0KSB7DQogICAgICAgICAgICBmdW5jdGlvbiBmdWxmaWxsZWQodmFsdWUpIHsgdHJ5IHsgc3RlcChnZW5lcmF0b3IubmV4dCh2YWx1ZSkpOyB9IGNhdGNoIChlKSB7IHJlamVjdChlKTsgfSB9DQogICAgICAgICAgICBmdW5jdGlvbiByZWplY3RlZCh2YWx1ZSkgeyB0cnkgeyBzdGVwKGdlbmVyYXRvclsidGhyb3ciXSh2YWx1ZSkpOyB9IGNhdGNoIChlKSB7IHJlamVjdChlKTsgfSB9DQogICAgICAgICAgICBmdW5jdGlvbiBzdGVwKHJlc3VsdCkgeyByZXN1bHQuZG9uZSA/IHJlc29sdmUocmVzdWx0LnZhbHVlKSA6IGFkb3B0KHJlc3VsdC52YWx1ZSkudGhlbihmdWxmaWxsZWQsIHJlamVjdGVkKTsgfQ0KICAgICAgICAgICAgc3RlcCgoZ2VuZXJhdG9yID0gZ2VuZXJhdG9yLmFwcGx5KHRoaXNBcmcsIF9hcmd1bWVudHMgfHwgW10pKS5uZXh0KCkpOw0KICAgICAgICB9KTsNCiAgICB9CgogICAgLyoKICAgICAqIGJhc2U2NC1hcnJheWJ1ZmZlciAxLjAuMSA8aHR0cHM6Ly9naXRodWIuY29tL25pa2xhc3ZoL2Jhc2U2NC1hcnJheWJ1ZmZlcj4KICAgICAqIENvcHlyaWdodCAoYykgMjAyMSBOaWtsYXMgdm9uIEhlcnR6ZW4gPGh0dHBzOi8vaGVydHplbi5jb20+CiAgICAgKiBSZWxlYXNlZCB1bmRlciBNSVQgTGljZW5zZQogICAgICovCiAgICB2YXIgY2hhcnMgPSAnQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyc7CiAgICAvLyBVc2UgYSBsb29rdXAgdGFibGUgdG8gZmluZCB0aGUgaW5kZXguCiAgICB2YXIgbG9va3VwID0gdHlwZW9mIFVpbnQ4QXJyYXkgPT09ICd1bmRlZmluZWQnID8gW10gOiBuZXcgVWludDhBcnJheSgyNTYpOwogICAgZm9yICh2YXIgaSA9IDA7IGkgPCBjaGFycy5sZW5ndGg7IGkrKykgewogICAgICAgIGxvb2t1cFtjaGFycy5jaGFyQ29kZUF0KGkpXSA9IGk7CiAgICB9CiAgICB2YXIgZW5jb2RlID0gZnVuY3Rpb24gKGFycmF5YnVmZmVyKSB7CiAgICAgICAgdmFyIGJ5dGVzID0gbmV3IFVpbnQ4QXJyYXkoYXJyYXlidWZmZXIpLCBpLCBsZW4gPSBieXRlcy5sZW5ndGgsIGJhc2U2NCA9ICcnOwogICAgICAgIGZvciAoaSA9IDA7IGkgPCBsZW47IGkgKz0gMykgewogICAgICAgICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaV0gPj4gMl07CiAgICAgICAgICAgIGJhc2U2NCArPSBjaGFyc1soKGJ5dGVzW2ldICYgMykgPDwgNCkgfCAoYnl0ZXNbaSArIDFdID4+IDQpXTsKICAgICAgICAgICAgYmFzZTY0ICs9IGNoYXJzWygoYnl0ZXNbaSArIDFdICYgMTUpIDw8IDIpIHwgKGJ5dGVzW2kgKyAyXSA+PiA2KV07CiAgICAgICAgICAgIGJhc2U2NCArPSBjaGFyc1tieXRlc1tpICsgMl0gJiA2M107CiAgICAgICAgfQogICAgICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgICAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgJz0nOwogICAgICAgIH0KICAgICAgICBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgICAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgJz09JzsKICAgICAgICB9CiAgICAgICAgcmV0dXJuIGJhc2U2NDsKICAgIH07CgogICAgY29uc3QgbGFzdEJsb2JNYXAgPSBuZXcgTWFwKCk7DQogICAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gbmV3IE1hcCgpOw0KICAgIGZ1bmN0aW9uIGdldFRyYW5zcGFyZW50QmxvYkZvcih3aWR0aCwgaGVpZ2h0LCBkYXRhVVJMT3B0aW9ucykgew0KICAgICAgICByZXR1cm4gX19hd2FpdGVyKHRoaXMsIHZvaWQgMCwgdm9pZCAwLCBmdW5jdGlvbiogKCkgew0KICAgICAgICAgICAgY29uc3QgaWQgPSBgJHt3aWR0aH0tJHtoZWlnaHR9YDsNCiAgICAgICAgICAgIGlmICgnT2Zmc2NyZWVuQ2FudmFzJyBpbiBnbG9iYWxUaGlzKSB7DQogICAgICAgICAgICAgICAgaWYgKHRyYW5zcGFyZW50QmxvYk1hcC5oYXMoaWQpKQ0KICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJhbnNwYXJlbnRCbG9iTWFwLmdldChpZCk7DQogICAgICAgICAgICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsNCiAgICAgICAgICAgICAgICBvZmZzY3JlZW4uZ2V0Q29udGV4dCgnMmQnKTsNCiAgICAgICAgICAgICAgICBjb25zdCBibG9iID0geWllbGQgb2Zmc2NyZWVuLmNvbnZlcnRUb0Jsb2IoZGF0YVVSTE9wdGlvbnMpOw0KICAgICAgICAgICAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0geWllbGQgYmxvYi5hcnJheUJ1ZmZlcigpOw0KICAgICAgICAgICAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7DQogICAgICAgICAgICAgICAgdHJhbnNwYXJlbnRCbG9iTWFwLnNldChpZCwgYmFzZTY0KTsNCiAgICAgICAgICAgICAgICByZXR1cm4gYmFzZTY0Ow0KICAgICAgICAgICAgfQ0KICAgICAgICAgICAgZWxzZSB7DQogICAgICAgICAgICAgICAgcmV0dXJuICcnOw0KICAgICAgICAgICAgfQ0KICAgICAgICB9KTsNCiAgICB9DQogICAgY29uc3Qgd29ya2VyID0gc2VsZjsNCiAgICB3b3JrZXIub25tZXNzYWdlID0gZnVuY3Rpb24gKGUpIHsNCiAgICAgICAgcmV0dXJuIF9fYXdhaXRlcih0aGlzLCB2b2lkIDAsIHZvaWQgMCwgZnVuY3Rpb24qICgpIHsNCiAgICAgICAgICAgIGlmICgnT2Zmc2NyZWVuQ2FudmFzJyBpbiBnbG9iYWxUaGlzKSB7DQogICAgICAgICAgICAgICAgY29uc3QgeyBpZCwgYml0bWFwLCB3aWR0aCwgaGVpZ2h0LCBkYXRhVVJMT3B0aW9ucyB9ID0gZS5kYXRhOw0KICAgICAgICAgICAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zKTsNCiAgICAgICAgICAgICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOw0KICAgICAgICAgICAgICAgIGNvbnN0IGN0eCA9IG9mZnNjcmVlbi5nZXRDb250ZXh0KCcyZCcpOw0KICAgICAgICAgICAgICAgIGN0eC5kcmF3SW1hZ2UoYml0bWFwLCAwLCAwKTsNCiAgICAgICAgICAgICAgICBiaXRtYXAuY2xvc2UoKTsNCiAgICAgICAgICAgICAgICBjb25zdCBibG9iID0geWllbGQgb2Zmc2NyZWVuLmNvbnZlcnRUb0Jsb2IoZGF0YVVSTE9wdGlvbnMpOw0KICAgICAgICAgICAgICAgIGNvbnN0IHR5cGUgPSBibG9iLnR5cGU7DQogICAgICAgICAgICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSB5aWVsZCBibG9iLmFycmF5QnVmZmVyKCk7DQogICAgICAgICAgICAgICAgY29uc3QgYmFzZTY0ID0gZW5jb2RlKGFycmF5QnVmZmVyKTsNCiAgICAgICAgICAgICAgICBpZiAoIWxhc3RCbG9iTWFwLmhhcyhpZCkgJiYgKHlpZWxkIHRyYW5zcGFyZW50QmFzZTY0KSA9PT0gYmFzZTY0KSB7DQogICAgICAgICAgICAgICAgICAgIGxhc3RCbG9iTWFwLnNldChpZCwgYmFzZTY0KTsNCiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHdvcmtlci5wb3N0TWVzc2FnZSh7IGlkIH0pOw0KICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KQ0KICAgICAgICAgICAgICAgICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7DQogICAgICAgICAgICAgICAgd29ya2VyLnBvc3RNZXNzYWdlKHsNCiAgICAgICAgICAgICAgICAgICAgaWQsDQogICAgICAgICAgICAgICAgICAgIHR5cGUsDQogICAgICAgICAgICAgICAgICAgIGJhc2U2NCwNCiAgICAgICAgICAgICAgICAgICAgd2lkdGgsDQogICAgICAgICAgICAgICAgICAgIGhlaWdodCwNCiAgICAgICAgICAgICAgICB9KTsNCiAgICAgICAgICAgICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7DQogICAgICAgICAgICB9DQogICAgICAgICAgICBlbHNlIHsNCiAgICAgICAgICAgICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsNCiAgICAgICAgICAgIH0NCiAgICAgICAgfSk7DQogICAgfTsKCn0pKCk7Cgo=");
|
|
2702
2702
|
class es {
|
|
2703
2703
|
constructor(t) {
|
|
2704
|
-
this.pendingCanvasMutations = /* @__PURE__ */ new Map(), this.rafStamps = { latestId: 0, invokeId: null }, this.frozen = !1, this.locked = !1, this.processMutation = (
|
|
2705
|
-
(this.rafStamps.invokeId && this.rafStamps.latestId !== this.rafStamps.invokeId || !this.rafStamps.invokeId) && (this.rafStamps.invokeId = this.rafStamps.latestId), this.pendingCanvasMutations.has(
|
|
2704
|
+
this.pendingCanvasMutations = /* @__PURE__ */ new Map(), this.rafStamps = { latestId: 0, invokeId: null }, this.frozen = !1, this.locked = !1, this.processMutation = (o, d) => {
|
|
2705
|
+
(this.rafStamps.invokeId && this.rafStamps.latestId !== this.rafStamps.invokeId || !this.rafStamps.invokeId) && (this.rafStamps.invokeId = this.rafStamps.latestId), this.pendingCanvasMutations.has(o) || this.pendingCanvasMutations.set(o, []), this.pendingCanvasMutations.get(o).push(d);
|
|
2706
2706
|
};
|
|
2707
|
-
const { sampling: r = "all", win: n, blockClass: s, blockSelector: i, recordCanvas:
|
|
2708
|
-
this.mutationCb = t.mutationCb, this.mirror = t.mirror,
|
|
2707
|
+
const { sampling: r = "all", win: n, blockClass: s, blockSelector: i, recordCanvas: a, dataURLOptions: c } = t;
|
|
2708
|
+
this.mutationCb = t.mutationCb, this.mirror = t.mirror, a && r === "all" && this.initCanvasMutationObserver(n, s, i), a && typeof r == "number" && this.initCanvasFPSObserver(r, n, s, i, {
|
|
2709
2709
|
dataURLOptions: c
|
|
2710
2710
|
});
|
|
2711
2711
|
}
|
|
@@ -2725,8 +2725,8 @@ class es {
|
|
|
2725
2725
|
this.locked = !1;
|
|
2726
2726
|
}
|
|
2727
2727
|
initCanvasFPSObserver(t, r, n, s, i) {
|
|
2728
|
-
const
|
|
2729
|
-
|
|
2728
|
+
const a = Lt(r, n, s), c = /* @__PURE__ */ new Map(), o = new $n();
|
|
2729
|
+
o.onmessage = (p) => {
|
|
2730
2730
|
const { id: y } = p.data;
|
|
2731
2731
|
if (c.set(y, !1), !("base64" in p.data))
|
|
2732
2732
|
return;
|
|
@@ -2781,7 +2781,7 @@ class es {
|
|
|
2781
2781
|
((S = g == null ? void 0 : g.getContextAttributes()) === null || S === void 0 ? void 0 : S.preserveDrawingBuffer) === !1 && (g == null || g.clear(g.COLOR_BUFFER_BIT));
|
|
2782
2782
|
}
|
|
2783
2783
|
const m = yield createImageBitmap(y);
|
|
2784
|
-
|
|
2784
|
+
o.postMessage({
|
|
2785
2785
|
id: C,
|
|
2786
2786
|
bitmap: m,
|
|
2787
2787
|
width: y.width,
|
|
@@ -2791,14 +2791,14 @@ class es {
|
|
|
2791
2791
|
})), u = requestAnimationFrame(f);
|
|
2792
2792
|
};
|
|
2793
2793
|
u = requestAnimationFrame(f), this.resetObservers = () => {
|
|
2794
|
-
|
|
2794
|
+
a(), cancelAnimationFrame(u);
|
|
2795
2795
|
};
|
|
2796
2796
|
}
|
|
2797
2797
|
initCanvasMutationObserver(t, r, n) {
|
|
2798
2798
|
this.startRAFTimestamping(), this.startPendingCanvasMutationFlusher();
|
|
2799
|
-
const s = Lt(t, r, n), i = Kn(this.processMutation.bind(this), t, r, n),
|
|
2799
|
+
const s = Lt(t, r, n), i = Kn(this.processMutation.bind(this), t, r, n), a = Vn(this.processMutation.bind(this), t, r, n, this.mirror);
|
|
2800
2800
|
this.resetObservers = () => {
|
|
2801
|
-
s(), i(),
|
|
2801
|
+
s(), i(), a();
|
|
2802
2802
|
};
|
|
2803
2803
|
}
|
|
2804
2804
|
startPendingCanvasMutationFlusher() {
|
|
@@ -2822,7 +2822,7 @@ class es {
|
|
|
2822
2822
|
const n = this.pendingCanvasMutations.get(t);
|
|
2823
2823
|
if (!n || r === -1)
|
|
2824
2824
|
return;
|
|
2825
|
-
const s = n.map((
|
|
2825
|
+
const s = n.map((a) => Dn(a, ["type"])), { type: i } = n[0];
|
|
2826
2826
|
this.mutationCb({ id: r, type: i, commands: s }), this.pendingCanvasMutations.delete(t);
|
|
2827
2827
|
}
|
|
2828
2828
|
}
|
|
@@ -2854,21 +2854,21 @@ class ts {
|
|
|
2854
2854
|
styleIds: []
|
|
2855
2855
|
}, s = [];
|
|
2856
2856
|
for (const i of t) {
|
|
2857
|
-
let
|
|
2857
|
+
let a;
|
|
2858
2858
|
if (this.styleMirror.has(i))
|
|
2859
|
-
|
|
2859
|
+
a = this.styleMirror.getId(i);
|
|
2860
2860
|
else {
|
|
2861
|
-
|
|
2861
|
+
a = this.styleMirror.add(i);
|
|
2862
2862
|
const c = Array.from(i.rules || CSSRule);
|
|
2863
2863
|
s.push({
|
|
2864
|
-
styleId:
|
|
2865
|
-
rules: c.map((
|
|
2866
|
-
rule: Jt(
|
|
2864
|
+
styleId: a,
|
|
2865
|
+
rules: c.map((o, d) => ({
|
|
2866
|
+
rule: Jt(o),
|
|
2867
2867
|
index: d
|
|
2868
2868
|
}))
|
|
2869
2869
|
});
|
|
2870
2870
|
}
|
|
2871
|
-
n.styleIds.push(
|
|
2871
|
+
n.styleIds.push(a);
|
|
2872
2872
|
}
|
|
2873
2873
|
s.length > 0 && (n.styles = s), this.adoptedStyleSheetCb(n);
|
|
2874
2874
|
}
|
|
@@ -2884,7 +2884,7 @@ function L(e) {
|
|
|
2884
2884
|
let _, Ue, $e, je = !1;
|
|
2885
2885
|
const ne = Jr();
|
|
2886
2886
|
function Ee(e = {}) {
|
|
2887
|
-
const { emit: t, checkoutEveryNms: r, checkoutEveryNth: n, blockClass: s = "rr-block", blockSelector: i = null, ignoreClass:
|
|
2887
|
+
const { emit: t, checkoutEveryNms: r, checkoutEveryNth: n, blockClass: s = "rr-block", blockSelector: i = null, ignoreClass: a = "rr-ignore", maskTextClass: c = "rr-mask", maskTextSelector: o = null, inlineStylesheet: d = !0, maskAllInputs: l, maskInputOptions: u, slimDOMOptions: h, maskInputFn: f, maskTextFn: p, hooks: y, packFn: S, sampling: C = {}, dataURLOptions: m = {}, mousemoveWait: g, recordCanvas: k = !1, recordCrossOriginIframes: U = !1, userTriggeredOnInput: x = !1, collectFonts: B = !1, inlineImages: E = !1, plugins: H, keepIframeSrcFn: j = () => !1, ignoreCSSAttributes: X = /* @__PURE__ */ new Set([]) } = e, Q = U ? window.parent === window : !0;
|
|
2888
2888
|
let $ = !1;
|
|
2889
2889
|
if (!Q)
|
|
2890
2890
|
try {
|
|
@@ -2926,7 +2926,7 @@ function Ee(e = {}) {
|
|
|
2926
2926
|
} : h || {};
|
|
2927
2927
|
Cn();
|
|
2928
2928
|
let ee, se = 0;
|
|
2929
|
-
const
|
|
2929
|
+
const ae = (I) => {
|
|
2930
2930
|
for (const W of H || [])
|
|
2931
2931
|
W.eventProcessor && (I = W.eventProcessor(I));
|
|
2932
2932
|
return S && (I = S(I)), I;
|
|
@@ -2934,11 +2934,11 @@ function Ee(e = {}) {
|
|
|
2934
2934
|
_ = (I, W) => {
|
|
2935
2935
|
var P;
|
|
2936
2936
|
if (!((P = ue[0]) === null || P === void 0) && P.isFrozen() && I.type !== v.FullSnapshot && !(I.type === v.IncrementalSnapshot && I.data.source === b.Mutation) && ue.forEach((T) => T.unfreeze()), Q)
|
|
2937
|
-
t == null || t(
|
|
2937
|
+
t == null || t(ae(I), W);
|
|
2938
2938
|
else if ($) {
|
|
2939
2939
|
const T = {
|
|
2940
2940
|
type: "rrweb",
|
|
2941
|
-
event:
|
|
2941
|
+
event: ae(I),
|
|
2942
2942
|
isCheckout: W
|
|
2943
2943
|
};
|
|
2944
2944
|
window.parent.postMessage(T, "*");
|
|
@@ -2961,7 +2961,7 @@ function Ee(e = {}) {
|
|
|
2961
2961
|
}, q = (I) => _(L({
|
|
2962
2962
|
type: v.IncrementalSnapshot,
|
|
2963
2963
|
data: Object.assign({ source: b.Scroll }, I)
|
|
2964
|
-
})),
|
|
2964
|
+
})), oe = (I) => _(L({
|
|
2965
2965
|
type: v.IncrementalSnapshot,
|
|
2966
2966
|
data: Object.assign({ source: b.CanvasMutation }, I)
|
|
2967
2967
|
})), N = (I) => _(L({
|
|
@@ -2985,7 +2985,7 @@ function Ee(e = {}) {
|
|
|
2985
2985
|
});
|
|
2986
2986
|
$e = new es({
|
|
2987
2987
|
recordCanvas: k,
|
|
2988
|
-
mutationCb:
|
|
2988
|
+
mutationCb: oe,
|
|
2989
2989
|
win: window,
|
|
2990
2990
|
blockClass: s,
|
|
2991
2991
|
blockSelector: i,
|
|
@@ -3000,7 +3000,7 @@ function Ee(e = {}) {
|
|
|
3000
3000
|
blockClass: s,
|
|
3001
3001
|
blockSelector: i,
|
|
3002
3002
|
maskTextClass: c,
|
|
3003
|
-
maskTextSelector:
|
|
3003
|
+
maskTextSelector: o,
|
|
3004
3004
|
inlineStylesheet: d,
|
|
3005
3005
|
maskInputOptions: O,
|
|
3006
3006
|
dataURLOptions: m,
|
|
@@ -3032,7 +3032,7 @@ function Ee(e = {}) {
|
|
|
3032
3032
|
blockClass: s,
|
|
3033
3033
|
blockSelector: i,
|
|
3034
3034
|
maskTextClass: c,
|
|
3035
|
-
maskTextSelector:
|
|
3035
|
+
maskTextSelector: o,
|
|
3036
3036
|
inlineStylesheet: d,
|
|
3037
3037
|
maskAllInputs: O,
|
|
3038
3038
|
maskTextFn: p,
|
|
@@ -3108,7 +3108,7 @@ function Ee(e = {}) {
|
|
|
3108
3108
|
type: v.IncrementalSnapshot,
|
|
3109
3109
|
data: Object.assign({ source: b.StyleDeclaration }, A)
|
|
3110
3110
|
})),
|
|
3111
|
-
canvasMutationCb:
|
|
3111
|
+
canvasMutationCb: oe,
|
|
3112
3112
|
fontCb: (A) => _(L({
|
|
3113
3113
|
type: v.IncrementalSnapshot,
|
|
3114
3114
|
data: Object.assign({ source: b.Font }, A)
|
|
@@ -3120,9 +3120,9 @@ function Ee(e = {}) {
|
|
|
3120
3120
|
}));
|
|
3121
3121
|
},
|
|
3122
3122
|
blockClass: s,
|
|
3123
|
-
ignoreClass:
|
|
3123
|
+
ignoreClass: a,
|
|
3124
3124
|
maskTextClass: c,
|
|
3125
|
-
maskTextSelector:
|
|
3125
|
+
maskTextSelector: o,
|
|
3126
3126
|
maskInputOptions: O,
|
|
3127
3127
|
inlineStylesheet: d,
|
|
3128
3128
|
sampling: C,
|
|
@@ -3233,12 +3233,12 @@ const ns = /(^|@)\S+:\d+/, xt = /^\s*at .*(\S+:\d+|\(native\))/m, ss = /^(eval@)
|
|
|
3233
3233
|
let n = r.replace(/^\s+/, "").replace(/\(eval code/g, "(");
|
|
3234
3234
|
const s = n.match(/ (\((.+):(\d+):(\d+)\)$)/);
|
|
3235
3235
|
n = s ? n.replace(s[0], "") : n;
|
|
3236
|
-
const i = n.split(/\s+/).slice(1),
|
|
3236
|
+
const i = n.split(/\s+/).slice(1), a = this.extractLocation(s ? s[1] : i.pop()), c = i.join(" ") || void 0, o = ["eval", "<anonymous>"].indexOf(a[0]) > -1 ? void 0 : a[0];
|
|
3237
3237
|
return new Ie({
|
|
3238
3238
|
functionName: c,
|
|
3239
|
-
fileName:
|
|
3240
|
-
lineNumber:
|
|
3241
|
-
columnNumber:
|
|
3239
|
+
fileName: o,
|
|
3240
|
+
lineNumber: a[1],
|
|
3241
|
+
columnNumber: a[2]
|
|
3242
3242
|
});
|
|
3243
3243
|
}, this);
|
|
3244
3244
|
},
|
|
@@ -3252,12 +3252,12 @@ const ns = /(^|@)\S+:\d+/, xt = /^\s*at .*(\S+:\d+|\(native\))/m, ss = /^(eval@)
|
|
|
3252
3252
|
functionName: r
|
|
3253
3253
|
});
|
|
3254
3254
|
{
|
|
3255
|
-
const n = /((.*".+"[^@]*)?[^@]*)(?:@)/, s = r.match(n), i = s && s[1] ? s[1] : void 0,
|
|
3255
|
+
const n = /((.*".+"[^@]*)?[^@]*)(?:@)/, s = r.match(n), i = s && s[1] ? s[1] : void 0, a = this.extractLocation(r.replace(n, ""));
|
|
3256
3256
|
return new Ie({
|
|
3257
3257
|
functionName: i,
|
|
3258
|
-
fileName:
|
|
3259
|
-
lineNumber:
|
|
3260
|
-
columnNumber:
|
|
3258
|
+
fileName: a[0],
|
|
3259
|
+
lineNumber: a[1],
|
|
3260
|
+
columnNumber: a[2]
|
|
3261
3261
|
});
|
|
3262
3262
|
}
|
|
3263
3263
|
}, this);
|
|
@@ -3272,10 +3272,10 @@ const ns = /(^|@)\S+:\d+/, xt = /^\s*at .*(\S+:\d+|\(native\))/m, ss = /^(eval@)
|
|
|
3272
3272
|
const t = /Line (\d+).*script (?:in )?(\S+)/i, r = e.message.split(`
|
|
3273
3273
|
`), n = [];
|
|
3274
3274
|
for (let s = 2, i = r.length; s < i; s += 2) {
|
|
3275
|
-
const
|
|
3276
|
-
|
|
3277
|
-
fileName:
|
|
3278
|
-
lineNumber: parseFloat(
|
|
3275
|
+
const a = t.exec(r[s]);
|
|
3276
|
+
a && n.push(new Ie({
|
|
3277
|
+
fileName: a[2],
|
|
3278
|
+
lineNumber: parseFloat(a[1])
|
|
3279
3279
|
}));
|
|
3280
3280
|
}
|
|
3281
3281
|
return n;
|
|
@@ -3284,11 +3284,11 @@ const ns = /(^|@)\S+:\d+/, xt = /^\s*at .*(\S+:\d+|\(native\))/m, ss = /^(eval@)
|
|
|
3284
3284
|
const t = /Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i, r = e.stacktrace.split(`
|
|
3285
3285
|
`), n = [];
|
|
3286
3286
|
for (let s = 0, i = r.length; s < i; s += 2) {
|
|
3287
|
-
const
|
|
3288
|
-
|
|
3289
|
-
functionName:
|
|
3290
|
-
fileName:
|
|
3291
|
-
lineNumber: parseFloat(
|
|
3287
|
+
const a = t.exec(r[s]);
|
|
3288
|
+
a && n.push(new Ie({
|
|
3289
|
+
functionName: a[3] || void 0,
|
|
3290
|
+
fileName: a[2],
|
|
3291
|
+
lineNumber: parseFloat(a[1])
|
|
3292
3292
|
}));
|
|
3293
3293
|
}
|
|
3294
3294
|
return n;
|
|
@@ -3298,9 +3298,9 @@ const ns = /(^|@)\S+:\d+/, xt = /^\s*at .*(\S+:\d+|\(native\))/m, ss = /^(eval@)
|
|
|
3298
3298
|
`).filter(function(r) {
|
|
3299
3299
|
return !!r.match(ns) && !r.match(/^Error created at/);
|
|
3300
3300
|
}, this).map(function(r) {
|
|
3301
|
-
const n = r.split("@"), s = this.extractLocation(n.pop()),
|
|
3301
|
+
const n = r.split("@"), s = this.extractLocation(n.pop()), a = (n.shift() || "").replace(/<anonymous function(: (\w+))?>/, "$2").replace(/\([^)]*\)/g, "") || void 0;
|
|
3302
3302
|
return new Ie({
|
|
3303
|
-
functionName:
|
|
3303
|
+
functionName: a,
|
|
3304
3304
|
fileName: s[0],
|
|
3305
3305
|
lineNumber: s[1],
|
|
3306
3306
|
columnNumber: s[2]
|
|
@@ -3320,8 +3320,8 @@ function is(e) {
|
|
|
3320
3320
|
const n = e.parentElement, s = [];
|
|
3321
3321
|
if (n.children && n.children.length > 0)
|
|
3322
3322
|
for (let i = 0; i < n.children.length; i++) {
|
|
3323
|
-
const
|
|
3324
|
-
|
|
3323
|
+
const a = n.children[i];
|
|
3324
|
+
a.localName && a.localName.toLowerCase && a.localName.toLowerCase() === r && s.push(a);
|
|
3325
3325
|
}
|
|
3326
3326
|
s.length > 1 && (r += `:eq(${s.indexOf(e)})`), t = r + (t ? ">" + t : ""), e = n;
|
|
3327
3327
|
}
|
|
@@ -3346,40 +3346,40 @@ function et(e, t) {
|
|
|
3346
3346
|
};
|
|
3347
3347
|
Object.assign(r, t);
|
|
3348
3348
|
const n = [], s = [];
|
|
3349
|
-
return JSON.stringify(e, function(c,
|
|
3349
|
+
return JSON.stringify(e, function(c, o) {
|
|
3350
3350
|
if (n.length > 0) {
|
|
3351
3351
|
const d = n.indexOf(this);
|
|
3352
|
-
~d ? n.splice(d + 1) : n.push(this), ~d ? s.splice(d, 1 / 0, c) : s.push(c), ~n.indexOf(
|
|
3352
|
+
~d ? n.splice(d + 1) : n.push(this), ~d ? s.splice(d, 1 / 0, c) : s.push(c), ~n.indexOf(o) && (n[0] === o ? o = "[Circular ~]" : o = "[Circular ~." + s.slice(0, n.indexOf(o)).join(".") + "]");
|
|
3353
3353
|
} else
|
|
3354
|
-
n.push(
|
|
3355
|
-
if (
|
|
3356
|
-
return
|
|
3357
|
-
if (
|
|
3354
|
+
n.push(o);
|
|
3355
|
+
if (o === null)
|
|
3356
|
+
return o;
|
|
3357
|
+
if (o === void 0)
|
|
3358
3358
|
return "undefined";
|
|
3359
|
-
if (i(
|
|
3360
|
-
return o
|
|
3361
|
-
if (
|
|
3359
|
+
if (i(o))
|
|
3360
|
+
return a(o);
|
|
3361
|
+
if (o instanceof Event) {
|
|
3362
3362
|
const d = {};
|
|
3363
|
-
for (const l in
|
|
3364
|
-
const u =
|
|
3363
|
+
for (const l in o) {
|
|
3364
|
+
const u = o[l];
|
|
3365
3365
|
Array.isArray(u) ? d[l] = is(u.length ? u[0] : null) : d[l] = u;
|
|
3366
3366
|
}
|
|
3367
3367
|
return d;
|
|
3368
3368
|
} else {
|
|
3369
|
-
if (
|
|
3370
|
-
return
|
|
3371
|
-
if (
|
|
3372
|
-
return
|
|
3373
|
-
End of stack for Error object` :
|
|
3369
|
+
if (o instanceof Node)
|
|
3370
|
+
return o instanceof HTMLElement ? o ? o.outerHTML : "" : o.nodeName;
|
|
3371
|
+
if (o instanceof Error)
|
|
3372
|
+
return o.stack ? o.stack + `
|
|
3373
|
+
End of stack for Error object` : o.name + ": " + o.message;
|
|
3374
3374
|
}
|
|
3375
|
-
return
|
|
3375
|
+
return o;
|
|
3376
3376
|
});
|
|
3377
3377
|
function i(c) {
|
|
3378
3378
|
return !!(dt(c) && Object.keys(c).length > r.numOfKeysLimit || typeof c == "function" || dt(c) && Cr(c, r.depthOfLimit));
|
|
3379
3379
|
}
|
|
3380
|
-
function
|
|
3381
|
-
let
|
|
3382
|
-
return r.stringLengthLimit &&
|
|
3380
|
+
function a(c) {
|
|
3381
|
+
let o = c.toString();
|
|
3382
|
+
return r.stringLengthLimit && o.length > r.stringLengthLimit && (o = `${o.slice(0, r.stringLengthLimit)}...`), o;
|
|
3383
3383
|
}
|
|
3384
3384
|
}
|
|
3385
3385
|
const Dt = {
|
|
@@ -3407,14 +3407,14 @@ const Dt = {
|
|
|
3407
3407
|
lengthThreshold: 1e3,
|
|
3408
3408
|
logger: "console"
|
|
3409
3409
|
};
|
|
3410
|
-
function
|
|
3410
|
+
function as(e, t, r) {
|
|
3411
3411
|
const n = r ? Object.assign({}, Dt, r) : Dt, s = n.logger;
|
|
3412
3412
|
if (!s)
|
|
3413
3413
|
return () => {
|
|
3414
3414
|
};
|
|
3415
3415
|
let i;
|
|
3416
3416
|
typeof s == "string" ? i = t[s] : i = s;
|
|
3417
|
-
let
|
|
3417
|
+
let a = 0;
|
|
3418
3418
|
const c = [];
|
|
3419
3419
|
if (n.level.includes("error") && window) {
|
|
3420
3420
|
const d = (l) => {
|
|
@@ -3430,20 +3430,20 @@ function os(e, t, r) {
|
|
|
3430
3430
|
});
|
|
3431
3431
|
}
|
|
3432
3432
|
for (const d of n.level)
|
|
3433
|
-
c.push(
|
|
3433
|
+
c.push(o(i, d));
|
|
3434
3434
|
return () => {
|
|
3435
3435
|
c.forEach((d) => d());
|
|
3436
3436
|
};
|
|
3437
|
-
function
|
|
3437
|
+
function o(d, l) {
|
|
3438
3438
|
return d[l] ? he(d, l, (u) => (...h) => {
|
|
3439
3439
|
u.apply(this, h);
|
|
3440
3440
|
try {
|
|
3441
3441
|
const f = Bt.parse(new Error()).map((y) => y.toString()).splice(1), p = h.map((y) => et(y, n.stringifyOptions));
|
|
3442
|
-
|
|
3442
|
+
a++, a < n.lengthThreshold ? e({
|
|
3443
3443
|
level: l,
|
|
3444
3444
|
trace: f,
|
|
3445
3445
|
payload: p
|
|
3446
|
-
}) :
|
|
3446
|
+
}) : a === n.lengthThreshold && e({
|
|
3447
3447
|
level: "warn",
|
|
3448
3448
|
trace: [],
|
|
3449
3449
|
payload: [
|
|
@@ -3457,9 +3457,9 @@ function os(e, t, r) {
|
|
|
3457
3457
|
};
|
|
3458
3458
|
}
|
|
3459
3459
|
}
|
|
3460
|
-
const
|
|
3461
|
-
name:
|
|
3462
|
-
observer:
|
|
3460
|
+
const os = "rrweb/console@1", cs = (e) => ({
|
|
3461
|
+
name: os,
|
|
3462
|
+
observer: as,
|
|
3463
3463
|
options: e
|
|
3464
3464
|
}), ds = "application/json", ls = "flashlog", us = () => typeof crypto < "u" && typeof crypto.randomUUID == "function" ? crypto.randomUUID() : `${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 10)}`, Te = () => typeof window < "u" && window.location ? window.location.href : "", Ut = (e) => new Date(typeof e == "number" ? e : Date.now()).toISOString(), tt = async (e) => {
|
|
3465
3465
|
try {
|
|
@@ -3545,19 +3545,19 @@ class ps {
|
|
|
3545
3545
|
}), this.stopCapture();
|
|
3546
3546
|
let n = null;
|
|
3547
3547
|
for (; this.flushInFlight || this.currentEvents.length > 0; ) {
|
|
3548
|
-
const
|
|
3548
|
+
const o = await this.flush(t, {
|
|
3549
3549
|
keepalive: (r == null ? void 0 : r.keepalive) === !0
|
|
3550
3550
|
});
|
|
3551
|
-
if (!
|
|
3551
|
+
if (!o) {
|
|
3552
3552
|
if (this.flushInFlight)
|
|
3553
3553
|
continue;
|
|
3554
3554
|
break;
|
|
3555
3555
|
}
|
|
3556
|
-
n =
|
|
3556
|
+
n = o;
|
|
3557
3557
|
}
|
|
3558
3558
|
if (this.replaySessionId = (n == null ? void 0 : n.replay_session_id) || this.replaySessionId, this.finalized = !0, !this.replaySessionId)
|
|
3559
3559
|
return this.config = null, null;
|
|
3560
|
-
const s = this.config, i = `${s.apiUrl.replace(/\/+$/, "")}/v1/session-replays/public/finalize`,
|
|
3560
|
+
const s = this.config, i = `${s.apiUrl.replace(/\/+$/, "")}/v1/session-replays/public/finalize`, a = await fetch(i, {
|
|
3561
3561
|
body: JSON.stringify({
|
|
3562
3562
|
brand_id: s.brandId,
|
|
3563
3563
|
device_id: s.deviceId,
|
|
@@ -3572,17 +3572,17 @@ class ps {
|
|
|
3572
3572
|
},
|
|
3573
3573
|
keepalive: (r == null ? void 0 : r.keepalive) === !0,
|
|
3574
3574
|
method: "POST"
|
|
3575
|
-
}).catch((
|
|
3576
|
-
message:
|
|
3575
|
+
}).catch((o) => (this.debug("Replay finalize failed", {
|
|
3576
|
+
message: o instanceof Error ? o.message : String(o),
|
|
3577
3577
|
reason: t
|
|
3578
3578
|
}), null));
|
|
3579
|
-
if (this.config = null, !
|
|
3579
|
+
if (this.config = null, !a)
|
|
3580
3580
|
return null;
|
|
3581
3581
|
const c = await tt(
|
|
3582
|
-
|
|
3582
|
+
a
|
|
3583
3583
|
);
|
|
3584
|
-
return
|
|
3585
|
-
message: (c == null ? void 0 : c.message) || `HTTP ${
|
|
3584
|
+
return a.ok ? (c == null ? void 0 : c.data) || null : (this.debug("Replay finalize returned non-200", {
|
|
3585
|
+
message: (c == null ? void 0 : c.message) || `HTTP ${a.status}`,
|
|
3586
3586
|
reason: t
|
|
3587
3587
|
}), null);
|
|
3588
3588
|
}
|
|
@@ -3651,15 +3651,15 @@ class ps {
|
|
|
3651
3651
|
(t = this.stopRecording) == null || t.call(this), this.stopRecording = void 0, this.flushTimer !== null && typeof window < "u" && (window.clearInterval(this.flushTimer), this.flushTimer = null), this.detachListeners.forEach((r) => r()), this.detachListeners = [];
|
|
3652
3652
|
}
|
|
3653
3653
|
takePendingSegment() {
|
|
3654
|
-
var i,
|
|
3654
|
+
var i, a;
|
|
3655
3655
|
if (!this.config || this.currentEvents.length === 0)
|
|
3656
3656
|
return null;
|
|
3657
3657
|
let t = 0, r = 0;
|
|
3658
3658
|
for (const c of this.currentEvents) {
|
|
3659
|
-
const
|
|
3659
|
+
const o = this.estimateEventSize(c), d = t > 0 && r + o > this.config.maxSegmentBytes, l = t >= this.config.maxSegmentEvents;
|
|
3660
3660
|
if (d || l)
|
|
3661
3661
|
break;
|
|
3662
|
-
t += 1, r +=
|
|
3662
|
+
t += 1, r += o;
|
|
3663
3663
|
}
|
|
3664
3664
|
const n = this.currentEvents.splice(0, Math.max(t, 1));
|
|
3665
3665
|
t === 0 && (r = this.estimateEventSize(n[0]));
|
|
@@ -3671,7 +3671,7 @@ class ps {
|
|
|
3671
3671
|
segmentId: this.nextSegmentId(s),
|
|
3672
3672
|
sequenceNumber: s,
|
|
3673
3673
|
sizeBytes: r,
|
|
3674
|
-
startedAt: Ut((
|
|
3674
|
+
startedAt: Ut((a = n[0]) == null ? void 0 : a.timestamp)
|
|
3675
3675
|
};
|
|
3676
3676
|
}
|
|
3677
3677
|
async uploadSegment(t, r, n) {
|
|
@@ -3681,7 +3681,7 @@ class ps {
|
|
|
3681
3681
|
const s = this.config, i = `${s.apiUrl.replace(
|
|
3682
3682
|
/\/+$/,
|
|
3683
3683
|
""
|
|
3684
|
-
)}/v1/session-replays/public/segments/upload-url`,
|
|
3684
|
+
)}/v1/session-replays/public/segments/upload-url`, a = {
|
|
3685
3685
|
brand_id: s.brandId,
|
|
3686
3686
|
content_type: ds,
|
|
3687
3687
|
device_id: s.deviceId,
|
|
@@ -3695,21 +3695,21 @@ class ps {
|
|
|
3695
3695
|
started_at: t.startedAt,
|
|
3696
3696
|
upload_reason: r
|
|
3697
3697
|
}, c = await fetch(i, {
|
|
3698
|
-
body: JSON.stringify(
|
|
3698
|
+
body: JSON.stringify(a),
|
|
3699
3699
|
headers: {
|
|
3700
3700
|
"Content-Type": "application/json",
|
|
3701
3701
|
"x-api-key": s.apiKey
|
|
3702
3702
|
},
|
|
3703
3703
|
keepalive: n,
|
|
3704
3704
|
method: "POST"
|
|
3705
|
-
}),
|
|
3706
|
-
if (!c.ok || !((f =
|
|
3707
|
-
const p =
|
|
3705
|
+
}), o = await tt(c);
|
|
3706
|
+
if (!c.ok || !((f = o == null ? void 0 : o.data) != null && f.upload_url)) {
|
|
3707
|
+
const p = o == null ? void 0 : o.message, y = typeof p == "object" && p ? p.code : o == null ? void 0 : o.code, S = typeof p == "object" && p ? p.message : p;
|
|
3708
3708
|
throw c.status === 403 && typeof y == "string" && y.startsWith("REPLAY_") ? new Wt(S || "Replay capture quota exhausted") : new Error(
|
|
3709
3709
|
S || `Failed to create replay upload URL (${c.status})`
|
|
3710
3710
|
);
|
|
3711
3711
|
}
|
|
3712
|
-
this.replaySessionId =
|
|
3712
|
+
this.replaySessionId = o.data.replay_session_id || this.replaySessionId;
|
|
3713
3713
|
const d = JSON.stringify({
|
|
3714
3714
|
events: t.events,
|
|
3715
3715
|
meta: {
|
|
@@ -3728,17 +3728,17 @@ class ps {
|
|
|
3728
3728
|
type: "rrweb-event-segment",
|
|
3729
3729
|
version: 1
|
|
3730
3730
|
}), l = typeof TextEncoder > "u" ? d.length : new TextEncoder().encode(d).byteLength;
|
|
3731
|
-
if (l >
|
|
3731
|
+
if (l > o.data.max_bytes)
|
|
3732
3732
|
throw new zt(
|
|
3733
|
-
`Replay segment is ${l} bytes; upload limit is ${
|
|
3733
|
+
`Replay segment is ${l} bytes; upload limit is ${o.data.max_bytes} bytes`
|
|
3734
3734
|
);
|
|
3735
|
-
const u = await fetch(
|
|
3735
|
+
const u = await fetch(o.data.upload_url, {
|
|
3736
3736
|
body: d,
|
|
3737
3737
|
headers: {
|
|
3738
3738
|
"Content-Type": "application/octet-stream"
|
|
3739
3739
|
},
|
|
3740
3740
|
keepalive: n,
|
|
3741
|
-
method:
|
|
3741
|
+
method: o.data.method || "PUT"
|
|
3742
3742
|
}), h = await tt(u);
|
|
3743
3743
|
if (!u.ok || !(h != null && h.data))
|
|
3744
3744
|
throw new Error(
|
|
@@ -3780,8 +3780,8 @@ const ht = () => typeof window < "u" && typeof window.localStorage < "u", Sr = (
|
|
|
3780
3780
|
const t = Date.now(), r = fe(M.sessionId), n = fe(M.sessionSeenAt), s = n ? Number(n) : NaN, i = Number.isFinite(s) && t - s <= e;
|
|
3781
3781
|
if (r && i)
|
|
3782
3782
|
return pe(M.sessionSeenAt, String(t)), r;
|
|
3783
|
-
const
|
|
3784
|
-
return pe(M.sessionId,
|
|
3783
|
+
const a = Sr();
|
|
3784
|
+
return pe(M.sessionId, a), pe(M.sessionSeenAt, String(t)), a;
|
|
3785
3785
|
}, ms = () => {
|
|
3786
3786
|
pe(M.sessionSeenAt, String(Date.now()));
|
|
3787
3787
|
}, gs = () => fe(M.sessionId), ys = () => fe(M.deviceId), Is = (e, t) => {
|
|
@@ -3822,7 +3822,7 @@ const ht = () => typeof window < "u" && typeof window.localStorage < "u", Sr = (
|
|
|
3822
3822
|
replayMaxSegmentEvents: (e == null ? void 0 : e.replayMaxSegmentEvents) ?? w.replayMaxSegmentEvents,
|
|
3823
3823
|
replayMaskAllInputs: (e == null ? void 0 : e.replayMaskAllInputs) ?? w.replayMaskAllInputs
|
|
3824
3824
|
};
|
|
3825
|
-
}, D = () => typeof window < "u" && window.location ? window.location.href : "", le = () => typeof document < "u" && document.title || "", ws = /* @__PURE__ */ new Set(["beacon", "fetch", "xmlhttprequest"]), Ce =
|
|
3825
|
+
}, D = () => typeof window < "u" && window.location ? window.location.href : "", le = () => typeof document < "u" && document.title || "", ws = /* @__PURE__ */ new Set(["beacon", "fetch", "xmlhttprequest"]), Ce = 1e4, We = () => typeof performance < "u" && Number.isFinite(performance.timeOrigin) ? performance.timeOrigin : Date.now(), As = (e) => {
|
|
3826
3826
|
const t = String(e.initiatorType || "").toLowerCase(), r = String(e.name || "").toLowerCase();
|
|
3827
3827
|
return t === "fetch" || t === "xmlhttprequest" || t === "beacon" ? "xhr" : t === "css" || t === "link" || r.endsWith(".css") || r.includes(".css?") ? "css" : t === "script" || r.endsWith(".js") || r.includes(".js?") ? "js" : t === "img" || t === "image" || /\.(png|jpg|jpeg|gif|svg|webp|avif|ico)(\?|$)/.test(r) ? "images" : t === "font" || /\.(woff|woff2|ttf|otf|eot)(\?|$)/.test(r) ? "fonts" : "other";
|
|
3828
3828
|
}, ks = (e) => {
|
|
@@ -3882,41 +3882,41 @@ class Ns {
|
|
|
3882
3882
|
reason: "reinit"
|
|
3883
3883
|
}), (i = this.errorCapture) == null || i.stop(), this.errorCapture = null, this.config.autoCapture && (this.errorCapture = new Pr(this.config, {
|
|
3884
3884
|
debug: this.config.debug,
|
|
3885
|
-
onNetworkActivity: (
|
|
3885
|
+
onNetworkActivity: (a) => {
|
|
3886
3886
|
this.replayRecorder.addCustomEvent("network-activity", {
|
|
3887
|
-
...
|
|
3887
|
+
...a,
|
|
3888
3888
|
page_title: le(),
|
|
3889
3889
|
session_id: this.sessionId,
|
|
3890
3890
|
url_bug_happened: D()
|
|
3891
3891
|
});
|
|
3892
3892
|
},
|
|
3893
|
-
onNetworkError: (
|
|
3893
|
+
onNetworkError: (a) => {
|
|
3894
3894
|
this.trackInternal("NETWORK_ERROR", {
|
|
3895
|
-
...
|
|
3895
|
+
...a,
|
|
3896
3896
|
error_type: "network_error",
|
|
3897
3897
|
url_bug_happened: D(),
|
|
3898
|
-
url: String(
|
|
3898
|
+
url: String(a.url || "")
|
|
3899
3899
|
});
|
|
3900
3900
|
},
|
|
3901
|
-
onSocketError: (
|
|
3901
|
+
onSocketError: (a) => {
|
|
3902
3902
|
this.trackInternal("SOCKET_ERROR", {
|
|
3903
|
-
...
|
|
3903
|
+
...a,
|
|
3904
3904
|
error_type: "socket_error",
|
|
3905
3905
|
url_bug_happened: D(),
|
|
3906
|
-
url: String(
|
|
3906
|
+
url: String(a.url || "")
|
|
3907
3907
|
});
|
|
3908
3908
|
},
|
|
3909
|
-
onJsError: (
|
|
3909
|
+
onJsError: (a) => {
|
|
3910
3910
|
this.trackInternal("JS_ERROR", {
|
|
3911
|
-
...
|
|
3911
|
+
...a,
|
|
3912
3912
|
error_type: "js_error",
|
|
3913
3913
|
url_bug_happened: D(),
|
|
3914
3914
|
url: D()
|
|
3915
3915
|
});
|
|
3916
3916
|
},
|
|
3917
|
-
onUnhandledRejection: (
|
|
3917
|
+
onUnhandledRejection: (a) => {
|
|
3918
3918
|
this.trackInternal("UNHANDLED_REJECTION", {
|
|
3919
|
-
...
|
|
3919
|
+
...a,
|
|
3920
3920
|
error_type: "unhandled_rejection",
|
|
3921
3921
|
url_bug_happened: D(),
|
|
3922
3922
|
url: D()
|
|
@@ -4027,16 +4027,16 @@ class Ns {
|
|
|
4027
4027
|
ms(), this.sessionId || (this.sessionId = Kt(this.config.sessionTimeoutMs)), this.deviceId || (this.deviceId = Gt());
|
|
4028
4028
|
const n = Kr(r), s = this.buildPayload(t, r, n);
|
|
4029
4029
|
if (!s) return !1;
|
|
4030
|
-
const i = Or(s, this.config),
|
|
4030
|
+
const i = Or(s, this.config), a = typeof i.data.status == "number" ? i.data.status : typeof i.data.http_status == "number" ? i.data.http_status : null, c = typeof i.data.method == "string" ? i.data.method.toUpperCase() : typeof i.data.http_method == "string" ? i.data.http_method.toUpperCase() : null, o = typeof i.data.request_url == "string" ? i.data.request_url : typeof i.data.url == "string" ? i.data.url : null;
|
|
4031
4031
|
this.replayRecorder.addCustomEvent("tracking-event", {
|
|
4032
4032
|
...i.data,
|
|
4033
4033
|
event_name: t,
|
|
4034
4034
|
error_type: typeof i.data.error_type == "string" ? i.data.error_type : null,
|
|
4035
4035
|
http_method: c,
|
|
4036
|
-
http_status:
|
|
4036
|
+
http_status: a,
|
|
4037
4037
|
method: c,
|
|
4038
4038
|
page_title: le(),
|
|
4039
|
-
request_url:
|
|
4039
|
+
request_url: o,
|
|
4040
4040
|
session_id: s.session_id,
|
|
4041
4041
|
timestamp: typeof i.data.timestamp == "number" ? i.data.timestamp : Date.now()
|
|
4042
4042
|
});
|
|
@@ -4115,17 +4115,17 @@ class Ns {
|
|
|
4115
4115
|
Math.round(
|
|
4116
4116
|
Math.min(Ce, s) / Ce * 100 + Math.min(Ce, this.pendingLongTaskMs) / Ce * 100
|
|
4117
4117
|
)
|
|
4118
|
-
),
|
|
4118
|
+
), a = Ts();
|
|
4119
4119
|
this.pendingLongTaskMs = 0, this.replayRecorder.addCustomEvent("performance-sample", {
|
|
4120
4120
|
cpu_usage_pct: i,
|
|
4121
|
-
js_heap_limit_mb: (
|
|
4122
|
-
memory_mb: (
|
|
4121
|
+
js_heap_limit_mb: (a == null ? void 0 : a.js_heap_limit_mb) ?? null,
|
|
4122
|
+
memory_mb: (a == null ? void 0 : a.used_js_heap_mb) ?? null,
|
|
4123
4123
|
page_title: le(),
|
|
4124
4124
|
page_url: D(),
|
|
4125
4125
|
reason: t,
|
|
4126
4126
|
session_id: this.sessionId,
|
|
4127
4127
|
timestamp: Math.round(We() + r),
|
|
4128
|
-
total_memory_mb: (
|
|
4128
|
+
total_memory_mb: (a == null ? void 0 : a.total_js_heap_mb) ?? null
|
|
4129
4129
|
});
|
|
4130
4130
|
}
|
|
4131
4131
|
observeReplayLongTasks() {
|