@flashlog/tracker-sdk 0.1.0 → 0.1.2
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/replay-recorder.d.ts +1 -0
- package/dist/tracker.es.js +690 -650
- package/dist/tracker.umd.js +11 -11
- package/package.json +1 -1
package/dist/tracker.es.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
const
|
|
1
|
+
const vr = (e) => {
|
|
2
2
|
const t = e.trim();
|
|
3
3
|
return t.length > 0 ? t : null;
|
|
4
|
-
},
|
|
4
|
+
}, wr = () => {
|
|
5
5
|
if (typeof window > "u")
|
|
6
6
|
return null;
|
|
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
|
-
},
|
|
10
|
-
const e =
|
|
9
|
+
}, Ar = () => {
|
|
10
|
+
const e = vr("https://api.flashlog.app/api");
|
|
11
11
|
if (e) return e;
|
|
12
|
-
const t =
|
|
12
|
+
const t = wr();
|
|
13
13
|
return t || "https://api.flashlog.app/api";
|
|
14
14
|
}, ft = /* @__PURE__ */ new Set([
|
|
15
15
|
"NETWORK_ERROR",
|
|
@@ -40,7 +40,7 @@ const br = (e) => {
|
|
|
40
40
|
"sessionToken",
|
|
41
41
|
"sessionCookie",
|
|
42
42
|
"sessionSecret"
|
|
43
|
-
],
|
|
43
|
+
], kr = [
|
|
44
44
|
"password",
|
|
45
45
|
"passwd",
|
|
46
46
|
"authorization",
|
|
@@ -63,7 +63,7 @@ const br = (e) => {
|
|
|
63
63
|
"sessionCookie",
|
|
64
64
|
"sessionSecret"
|
|
65
65
|
], w = {
|
|
66
|
-
apiUrl:
|
|
66
|
+
apiUrl: Ar(),
|
|
67
67
|
apiKey: "",
|
|
68
68
|
debug: !1,
|
|
69
69
|
autoCapture: !0,
|
|
@@ -76,7 +76,7 @@ const br = (e) => {
|
|
|
76
76
|
captureRequestBody: !0,
|
|
77
77
|
captureResponseBody: !0,
|
|
78
78
|
redactKeys: ze,
|
|
79
|
-
redactUrlParams:
|
|
79
|
+
redactUrlParams: kr,
|
|
80
80
|
propagateTraceHeaders: !1,
|
|
81
81
|
traceOrigins: [],
|
|
82
82
|
traceHeaderName: "x-flashlog-trace-id",
|
|
@@ -104,12 +104,12 @@ const br = (e) => {
|
|
|
104
104
|
deviceId: "flashlog_tracker_device_id",
|
|
105
105
|
accountId: "flashlog_tracker_account_id",
|
|
106
106
|
accountTraits: "flashlog_tracker_account_traits"
|
|
107
|
-
},
|
|
107
|
+
}, Er = (e) => {
|
|
108
108
|
if (e.scriptUrl)
|
|
109
109
|
return e.scriptUrl;
|
|
110
110
|
if (e.source === "package")
|
|
111
111
|
return "package:@flashlog/tracker-sdk";
|
|
112
|
-
},
|
|
112
|
+
}, Pt = async (e) => {
|
|
113
113
|
if (typeof window > "u" || typeof document > "u")
|
|
114
114
|
return;
|
|
115
115
|
const t = Number(e.brandId);
|
|
@@ -128,7 +128,7 @@ const br = (e) => {
|
|
|
128
128
|
brand_id: t,
|
|
129
129
|
url: window.location.href,
|
|
130
130
|
referrer: document.referrer || void 0,
|
|
131
|
-
script_url:
|
|
131
|
+
script_url: Er(e)
|
|
132
132
|
})
|
|
133
133
|
});
|
|
134
134
|
!n.ok && e.debug && console.warn("[FlashlogTracker] Installation ping failed", {
|
|
@@ -153,7 +153,7 @@ const br = (e) => {
|
|
|
153
153
|
const i = Ge(s);
|
|
154
154
|
return i.length === 0 ? !1 : i.length === 1 ? r.includes(i[0]) : n === i.join("") || Rr(r, i);
|
|
155
155
|
});
|
|
156
|
-
}, gt = (e, t) => e ? Ge(e).join("") === t : !1,
|
|
156
|
+
}, gt = (e, t) => e ? Ge(e).join("") === t : !1, Tr = (e) => e ? Ge(e).includes("url") : !1, _r = (e) => {
|
|
157
157
|
const t = e.trim();
|
|
158
158
|
if (!t.startsWith("{") && !t.startsWith("[")) return null;
|
|
159
159
|
try {
|
|
@@ -162,37 +162,37 @@ const br = (e) => {
|
|
|
162
162
|
} catch {
|
|
163
163
|
return null;
|
|
164
164
|
}
|
|
165
|
-
},
|
|
165
|
+
}, Zt = (e, t) => {
|
|
166
166
|
let r = e.replace(/\b(Bearer\s+)[A-Za-z0-9._~+/=-]+/gi, `$1${de}`).replace(/\b(Basic\s+)[A-Za-z0-9+/=-]+/gi, `$1${de}`).replace(/\beyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\b/g, de);
|
|
167
167
|
return r !== e && (t.redactedFieldsCount += 1), r;
|
|
168
|
-
},
|
|
168
|
+
}, Ht = (e) => Zt(e, {
|
|
169
169
|
redactedFieldsCount: 0
|
|
170
|
-
}),
|
|
170
|
+
}), Nr = (e, t, r) => {
|
|
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((a,
|
|
175
|
-
Oe(
|
|
174
|
+
return s.searchParams.forEach((a, c) => {
|
|
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 {
|
|
178
178
|
return e;
|
|
179
179
|
}
|
|
180
|
-
},
|
|
181
|
-
if (
|
|
182
|
-
return
|
|
183
|
-
const i =
|
|
180
|
+
}, Mr = (e, t, r, n, s = /* @__PURE__ */ new WeakSet()) => {
|
|
181
|
+
if (Tr(n))
|
|
182
|
+
return Nr(e, t, r);
|
|
183
|
+
const i = _r(e);
|
|
184
184
|
if (i !== null) {
|
|
185
185
|
const a = Ke(i, t, r, n, s);
|
|
186
186
|
return JSON.stringify(a);
|
|
187
187
|
}
|
|
188
|
-
return
|
|
188
|
+
return Zt(e, r);
|
|
189
189
|
}, Ke = (e, t, r, n, s = /* @__PURE__ */ new WeakSet()) => {
|
|
190
190
|
if (gt(n, "requestbody") && !t.captureRequestBody || gt(n, "responsebody") && !t.captureResponseBody)
|
|
191
191
|
return r.omittedFieldsCount += 1, mt;
|
|
192
192
|
if (n && Oe(n, t.redactKeys))
|
|
193
193
|
return r.redactedFieldsCount += 1, de;
|
|
194
194
|
if (typeof e == "string")
|
|
195
|
-
return
|
|
195
|
+
return Mr(e, t, r, n, s);
|
|
196
196
|
if (Array.isArray(e))
|
|
197
197
|
return e.map((i) => Ke(i, t, r, void 0, s));
|
|
198
198
|
if (!e || typeof e != "object")
|
|
@@ -202,13 +202,13 @@ const br = (e) => {
|
|
|
202
202
|
s.add(e);
|
|
203
203
|
try {
|
|
204
204
|
return Object.entries(e).reduce(
|
|
205
|
-
(i, [a,
|
|
205
|
+
(i, [a, c]) => (i[a] = Ke(c, t, r, a, s), i),
|
|
206
206
|
{}
|
|
207
207
|
);
|
|
208
208
|
} finally {
|
|
209
209
|
s.delete(e);
|
|
210
210
|
}
|
|
211
|
-
},
|
|
211
|
+
}, Or = (e, t) => {
|
|
212
212
|
const r = {
|
|
213
213
|
redactedFieldsCount: 0,
|
|
214
214
|
omittedFieldsCount: 0
|
|
@@ -228,17 +228,17 @@ const br = (e) => {
|
|
|
228
228
|
}
|
|
229
229
|
}
|
|
230
230
|
};
|
|
231
|
-
},
|
|
231
|
+
}, Lr = () => typeof window < "u" && window.location ? window.location.href : "", Fr = 120, jt = (e, t = Fr) => e.length > t ? e.slice(0, t) : e, lt = (e) => {
|
|
232
232
|
const t = e == null ? void 0 : e.trim();
|
|
233
233
|
if (t)
|
|
234
|
-
return Ht(
|
|
234
|
+
return jt(Ht(t));
|
|
235
235
|
}, yt = (e) => {
|
|
236
|
-
const r =
|
|
236
|
+
const r = Ht(e).split(/([_:.=-])/), n = r.map((s, i) => {
|
|
237
237
|
if (!s || /^[_:.=-]$/.test(s)) return s;
|
|
238
|
-
const
|
|
239
|
-
return Oe(s, ze) || Oe(
|
|
238
|
+
const c = `${i >= 2 ? r[i - 2] : ""} ${s}`;
|
|
239
|
+
return Oe(s, ze) || Oe(c, ze) ? de : s;
|
|
240
240
|
});
|
|
241
|
-
return
|
|
241
|
+
return jt(n.join(""), 80);
|
|
242
242
|
}, st = (e) => {
|
|
243
243
|
if (!e) return "";
|
|
244
244
|
if (e.id) return `#${yt(e.id)}`;
|
|
@@ -249,20 +249,20 @@ const br = (e) => {
|
|
|
249
249
|
t.unshift(`${r.tagName.toLowerCase()}${n ? `.${n}` : ""}`), r = r.parentElement;
|
|
250
250
|
}
|
|
251
251
|
return t.join(" > ");
|
|
252
|
-
},
|
|
252
|
+
}, xr = (e) => [
|
|
253
253
|
e.getAttribute("name"),
|
|
254
254
|
e.getAttribute("id"),
|
|
255
255
|
e.getAttribute("aria-label"),
|
|
256
256
|
e.getAttribute("placeholder"),
|
|
257
257
|
e.getAttribute("autocomplete"),
|
|
258
258
|
e.getAttribute("type")
|
|
259
|
-
].filter(Boolean).join(" "),
|
|
260
|
-
const t =
|
|
259
|
+
].filter(Boolean).join(" "), Br = (e) => {
|
|
260
|
+
const t = xr(e);
|
|
261
261
|
return (e.getAttribute("type") || "").toLowerCase() === "password" || Oe(t, ze);
|
|
262
262
|
}, ge = (e, t) => {
|
|
263
263
|
const r = e == null ? void 0 : e.trim();
|
|
264
264
|
if (r)
|
|
265
|
-
return
|
|
265
|
+
return Br(t) ? de : lt(r);
|
|
266
266
|
}, Dr = (e) => {
|
|
267
267
|
const t = {
|
|
268
268
|
tagName: e == null ? void 0 : e.tagName,
|
|
@@ -299,7 +299,7 @@ const br = (e) => {
|
|
|
299
299
|
text: lt(e.innerText)
|
|
300
300
|
};
|
|
301
301
|
};
|
|
302
|
-
class
|
|
302
|
+
class Ur {
|
|
303
303
|
constructor(t) {
|
|
304
304
|
this.actions = [], this.detachHandlers = [], this.maxSize = t;
|
|
305
305
|
}
|
|
@@ -341,7 +341,7 @@ class Br {
|
|
|
341
341
|
action: t,
|
|
342
342
|
details: r,
|
|
343
343
|
timestamp: Date.now(),
|
|
344
|
-
url:
|
|
344
|
+
url: Lr()
|
|
345
345
|
}), this.actions.length > this.maxSize && (this.actions = this.actions.slice(-this.maxSize));
|
|
346
346
|
}
|
|
347
347
|
getAll() {
|
|
@@ -351,7 +351,7 @@ class Br {
|
|
|
351
351
|
this.actions = [];
|
|
352
352
|
}
|
|
353
353
|
}
|
|
354
|
-
const
|
|
354
|
+
const Wr = (e) => {
|
|
355
355
|
const t = [
|
|
356
356
|
{ key: "edg/", name: "Edge" },
|
|
357
357
|
{ key: "chrome/", name: "Chrome" },
|
|
@@ -366,18 +366,18 @@ const Ur = (e) => {
|
|
|
366
366
|
}
|
|
367
367
|
}
|
|
368
368
|
return { name: "Unknown", version: "unknown" };
|
|
369
|
-
},
|
|
369
|
+
}, zr = (e) => {
|
|
370
370
|
const t = e.toLowerCase();
|
|
371
371
|
return t.includes("windows") ? "Windows" : t.includes("mac os") ? "MacOS" : t.includes("android") ? "Android" : t.includes("iphone") || t.includes("ipad") || t.includes("ios") ? "iOS" : t.includes("linux") ? "Linux" : "Unknown";
|
|
372
|
-
},
|
|
372
|
+
}, Gr = () => {
|
|
373
373
|
if (typeof window > "u") return "Unknown";
|
|
374
374
|
const e = window.innerWidth || 0;
|
|
375
375
|
return e <= 768 ? "Mobile" : e <= 1024 ? "Tablet" : "Desktop";
|
|
376
376
|
}, It = (e) => {
|
|
377
|
-
const t = typeof navigator < "u" ? navigator : {}, r = t.userAgent || "", n =
|
|
377
|
+
const t = typeof navigator < "u" ? navigator : {}, r = t.userAgent || "", n = Wr(r);
|
|
378
378
|
return {
|
|
379
|
-
os_name:
|
|
380
|
-
device_type:
|
|
379
|
+
os_name: zr(r),
|
|
380
|
+
device_type: Gr(),
|
|
381
381
|
device_id: e,
|
|
382
382
|
browser_name: n.name,
|
|
383
383
|
browser_version: n.version,
|
|
@@ -410,7 +410,7 @@ const Ur = (e) => {
|
|
|
410
410
|
span_id: t,
|
|
411
411
|
traceparent: `00-${e}-${t}-01`
|
|
412
412
|
};
|
|
413
|
-
},
|
|
413
|
+
}, Kr = (e = {}) => {
|
|
414
414
|
const t = typeof e.trace_id == "string" && e.trace_id.trim() ? e.trace_id.trim() : null, r = typeof e.span_id == "string" && e.span_id.trim() ? e.span_id.trim() : null, n = typeof e.traceparent == "string" && e.traceparent.trim() ? e.traceparent.trim() : null;
|
|
415
415
|
return t && r ? {
|
|
416
416
|
trace_id: t,
|
|
@@ -429,8 +429,8 @@ const Ur = (e) => {
|
|
|
429
429
|
} catch {
|
|
430
430
|
return !1;
|
|
431
431
|
}
|
|
432
|
-
},
|
|
433
|
-
class
|
|
432
|
+
}, Vr = "[omitted: non-json body]";
|
|
433
|
+
class Pr {
|
|
434
434
|
constructor(t, r) {
|
|
435
435
|
this.socketMeta = /* @__PURE__ */ new WeakMap(), this.initialized = !1, this.handleWindowError = (n) => {
|
|
436
436
|
var s;
|
|
@@ -476,7 +476,7 @@ class Vr {
|
|
|
476
476
|
return typeof t == "string" ? t : JSON.stringify({
|
|
477
477
|
body_type: this.getBodyType(t),
|
|
478
478
|
captured: !1,
|
|
479
|
-
reason:
|
|
479
|
+
reason: Vr
|
|
480
480
|
});
|
|
481
481
|
}
|
|
482
482
|
attachTraceHeadersToFetchRequest(t, r, n, s) {
|
|
@@ -484,10 +484,10 @@ class Vr {
|
|
|
484
484
|
return { input: t, init: r };
|
|
485
485
|
if (t instanceof Request) {
|
|
486
486
|
const a = new Headers(t.headers);
|
|
487
|
-
return new Headers(r == null ? void 0 : r.headers).forEach((
|
|
488
|
-
a.set(d,
|
|
489
|
-
}), Object.entries(s).forEach(([
|
|
490
|
-
a.set(
|
|
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,
|
|
@@ -496,8 +496,8 @@ class Vr {
|
|
|
496
496
|
};
|
|
497
497
|
}
|
|
498
498
|
const i = new Headers(r == null ? void 0 : r.headers);
|
|
499
|
-
return Object.entries(s).forEach(([a,
|
|
500
|
-
i.set(a,
|
|
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 Vr {
|
|
|
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(), a = (s == null ? void 0 : s.method) || "GET",
|
|
514
|
-
if (t.shouldIgnoreUrl(
|
|
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
|
+
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,
|
|
@@ -522,7 +522,7 @@ class Vr {
|
|
|
522
522
|
), f = Date.now() - i;
|
|
523
523
|
if ((h.ok || t.shouldIgnoreStatus(h.status)) && t.hooks.onNetworkActivity({
|
|
524
524
|
type: "fetch",
|
|
525
|
-
url:
|
|
525
|
+
url: c,
|
|
526
526
|
method: a.toUpperCase(),
|
|
527
527
|
status: h.status,
|
|
528
528
|
statusText: h.statusText,
|
|
@@ -540,12 +540,12 @@ class Vr {
|
|
|
540
540
|
}
|
|
541
541
|
t.hooks.onNetworkError({
|
|
542
542
|
type: "fetch",
|
|
543
|
-
url:
|
|
543
|
+
url: c,
|
|
544
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,
|
|
@@ -557,12 +557,12 @@ class Vr {
|
|
|
557
557
|
} catch (h) {
|
|
558
558
|
throw t.hooks.onNetworkError({
|
|
559
559
|
type: "fetch",
|
|
560
|
-
url:
|
|
560
|
+
url: c,
|
|
561
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 Vr {
|
|
|
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, a,
|
|
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, a ?? null,
|
|
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 a = Date.now(),
|
|
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);
|
|
@@ -603,9 +603,9 @@ class Vr {
|
|
|
603
603
|
status: l,
|
|
604
604
|
statusText: s.statusText || "HTTP_RESULT",
|
|
605
605
|
duration_ms: Date.now() - a,
|
|
606
|
-
trace_id:
|
|
607
|
-
span_id:
|
|
608
|
-
traceparent:
|
|
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",
|
|
@@ -614,11 +614,11 @@ class Vr {
|
|
|
614
614
|
status: l,
|
|
615
615
|
statusText: s.statusText || "HTTP_ERROR",
|
|
616
616
|
duration_ms: Date.now() - a,
|
|
617
|
-
request_body: t.truncate(
|
|
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", () => {
|
|
@@ -629,11 +629,11 @@ class Vr {
|
|
|
629
629
|
status: 0,
|
|
630
630
|
statusText: "NETWORK_ERROR",
|
|
631
631
|
duration_ms: Date.now() - a,
|
|
632
|
-
request_body: t.truncate(
|
|
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);
|
|
@@ -644,34 +644,34 @@ class Vr {
|
|
|
644
644
|
const t = this;
|
|
645
645
|
this.originalWebSocket = window.WebSocket;
|
|
646
646
|
const r = this.originalWebSocket, n = function(i, a) {
|
|
647
|
-
const
|
|
648
|
-
return t.shouldIgnoreUrl(
|
|
649
|
-
url:
|
|
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
|
+
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",
|
|
660
|
-
url: (d == null ? void 0 : d.url) ||
|
|
660
|
+
url: (d == null ? void 0 : d.url) || c,
|
|
661
661
|
method: "CONNECT",
|
|
662
662
|
status: 0,
|
|
663
663
|
statusText: "WEBSOCKET_ERROR",
|
|
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",
|
|
674
|
-
url: (l == null ? void 0 : l.url) ||
|
|
674
|
+
url: (l == null ? void 0 : l.url) || c,
|
|
675
675
|
method: "CONNECT",
|
|
676
676
|
status: 0,
|
|
677
677
|
socket_close_code: d.code,
|
|
@@ -680,7 +680,7 @@ class Vr {
|
|
|
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
|
|
@@ -697,7 +697,7 @@ var F;
|
|
|
697
697
|
(function(e) {
|
|
698
698
|
e[e.Document = 0] = "Document", e[e.DocumentType = 1] = "DocumentType", e[e.Element = 2] = "Element", e[e.Text = 3] = "Text", e[e.CDATA = 4] = "CDATA", e[e.Comment = 5] = "Comment";
|
|
699
699
|
})(F || (F = {}));
|
|
700
|
-
function
|
|
700
|
+
function Zr(e) {
|
|
701
701
|
return e.nodeType === e.ELEMENT_NODE;
|
|
702
702
|
}
|
|
703
703
|
function Ne(e) {
|
|
@@ -707,30 +707,30 @@ function Ne(e) {
|
|
|
707
707
|
function Me(e) {
|
|
708
708
|
return Object.prototype.toString.call(e) === "[object ShadowRoot]";
|
|
709
709
|
}
|
|
710
|
-
function
|
|
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
713
|
function at(e) {
|
|
714
714
|
try {
|
|
715
715
|
var t = e.rules || e.cssRules;
|
|
716
|
-
return t ?
|
|
716
|
+
return t ? Hr(Array.from(t).map(Jt).join("")) : null;
|
|
717
717
|
} catch {
|
|
718
718
|
return null;
|
|
719
719
|
}
|
|
720
720
|
}
|
|
721
|
-
function
|
|
721
|
+
function Jt(e) {
|
|
722
722
|
var t = e.cssText;
|
|
723
|
-
if (
|
|
723
|
+
if (jr(e))
|
|
724
724
|
try {
|
|
725
725
|
t = at(e.styleSheet) || t;
|
|
726
726
|
} catch {
|
|
727
727
|
}
|
|
728
728
|
return t;
|
|
729
729
|
}
|
|
730
|
-
function
|
|
730
|
+
function jr(e) {
|
|
731
731
|
return "styleSheet" in e;
|
|
732
732
|
}
|
|
733
|
-
var
|
|
733
|
+
var qt = function() {
|
|
734
734
|
function e() {
|
|
735
735
|
this.idNodeMap = /* @__PURE__ */ new Map(), this.nodeMetaMap = /* @__PURE__ */ new WeakMap();
|
|
736
736
|
}
|
|
@@ -769,58 +769,58 @@ var Jt = function() {
|
|
|
769
769
|
this.idNodeMap = /* @__PURE__ */ new Map(), this.nodeMetaMap = /* @__PURE__ */ new WeakMap();
|
|
770
770
|
}, e;
|
|
771
771
|
}();
|
|
772
|
-
function
|
|
773
|
-
return new
|
|
772
|
+
function Jr() {
|
|
773
|
+
return new qt();
|
|
774
774
|
}
|
|
775
775
|
function ut(e) {
|
|
776
776
|
var t = e.maskInputOptions, r = e.tagName, n = e.type, s = e.value, i = e.maskInputFn, a = s || "";
|
|
777
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
|
-
function
|
|
780
|
+
function qr(e) {
|
|
781
781
|
var t = e.getContext("2d");
|
|
782
782
|
if (!t)
|
|
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, a = vt in i ? i[vt] : i,
|
|
787
|
-
if (
|
|
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
|
}
|
|
792
792
|
return !0;
|
|
793
793
|
}
|
|
794
|
-
var
|
|
795
|
-
function
|
|
796
|
-
return
|
|
794
|
+
var Yr = 1, Xr = new RegExp("[^a-z0-9-_:]"), Le = -2;
|
|
795
|
+
function Yt() {
|
|
796
|
+
return Yr++;
|
|
797
797
|
}
|
|
798
|
-
function
|
|
798
|
+
function Qr(e) {
|
|
799
799
|
if (e instanceof HTMLFormElement)
|
|
800
800
|
return "form";
|
|
801
801
|
var t = e.tagName.toLowerCase().trim();
|
|
802
|
-
return
|
|
802
|
+
return Xr.test(t) ? "div" : t;
|
|
803
803
|
}
|
|
804
|
-
function
|
|
804
|
+
function $r(e) {
|
|
805
805
|
return e.cssRules ? Array.from(e.cssRules).map(function(t) {
|
|
806
806
|
return t.cssText || "";
|
|
807
807
|
}).join("") : "";
|
|
808
808
|
}
|
|
809
|
-
function
|
|
809
|
+
function en(e) {
|
|
810
810
|
var t = "";
|
|
811
811
|
return e.indexOf("//") > -1 ? t = e.split("/").slice(0, 3).join("/") : t = e.split("/")[0], t = t.split("?")[0], t;
|
|
812
812
|
}
|
|
813
|
-
var ye, wt,
|
|
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(
|
|
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 (!
|
|
820
|
-
return "url(".concat(d).concat(
|
|
821
|
-
if (
|
|
822
|
-
return "url(".concat(d).concat(
|
|
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
|
|
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(
|
|
842
|
-
var i = n(
|
|
841
|
+
for (var s = []; n(an), !(r >= t.length); ) {
|
|
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
846
|
var a = "";
|
|
847
847
|
i = be(e, i);
|
|
848
|
-
for (var
|
|
849
|
-
var
|
|
850
|
-
if (
|
|
848
|
+
for (var c = !1; ; ) {
|
|
849
|
+
var o = t.charAt(r);
|
|
850
|
+
if (o === "") {
|
|
851
851
|
s.push((i + a).trim());
|
|
852
852
|
break;
|
|
853
|
-
} else if (
|
|
854
|
-
|
|
855
|
-
else if (
|
|
853
|
+
} else if (c)
|
|
854
|
+
o === ")" && (c = !1);
|
|
855
|
+
else if (o === ",") {
|
|
856
856
|
r += 1, s.push((i + a).trim());
|
|
857
857
|
break;
|
|
858
|
-
} else
|
|
859
|
-
a +=
|
|
858
|
+
} else o === "(" && (c = !0);
|
|
859
|
+
a += o, r += 1;
|
|
860
860
|
}
|
|
861
861
|
}
|
|
862
862
|
}
|
|
@@ -868,17 +868,17 @@ function be(e, t) {
|
|
|
868
868
|
var r = e.createElement("a");
|
|
869
869
|
return r.href = t, r.href;
|
|
870
870
|
}
|
|
871
|
-
function
|
|
871
|
+
function cn(e) {
|
|
872
872
|
return !!(e.tagName === "svg" || e.ownerSVGElement);
|
|
873
873
|
}
|
|
874
874
|
function pt() {
|
|
875
875
|
var e = document.createElement("a");
|
|
876
876
|
return e.href = "", e.href;
|
|
877
877
|
}
|
|
878
|
-
function
|
|
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 ?
|
|
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 ? on(e, n) : r === "style" && n ? Pe(n, pt()) : t === "object" && r === "data" && n ? be(e, n) : n;
|
|
880
880
|
}
|
|
881
|
-
function
|
|
881
|
+
function dn(e, t, r) {
|
|
882
882
|
if (typeof t == "string") {
|
|
883
883
|
if (e.classList.contains(t))
|
|
884
884
|
return !0;
|
|
@@ -902,7 +902,7 @@ function Ze(e, t, r) {
|
|
|
902
902
|
}
|
|
903
903
|
return r ? Ze(e.parentNode, t, r) : !1;
|
|
904
904
|
}
|
|
905
|
-
function
|
|
905
|
+
function Qt(e, t, r) {
|
|
906
906
|
var n = e.nodeType === e.ELEMENT_NODE ? e : e.parentElement;
|
|
907
907
|
if (n === null)
|
|
908
908
|
return !1;
|
|
@@ -913,7 +913,7 @@ function Xt(e, t, r) {
|
|
|
913
913
|
return !0;
|
|
914
914
|
return !!(r && (n.matches(r) || n.closest(r)));
|
|
915
915
|
}
|
|
916
|
-
function
|
|
916
|
+
function ln(e, t, r) {
|
|
917
917
|
var n = e.contentWindow;
|
|
918
918
|
if (n) {
|
|
919
919
|
var s = !1, i;
|
|
@@ -931,13 +931,13 @@ function dn(e, t, r) {
|
|
|
931
931
|
});
|
|
932
932
|
return;
|
|
933
933
|
}
|
|
934
|
-
var
|
|
935
|
-
if (n.location.href !==
|
|
934
|
+
var c = "about:blank";
|
|
935
|
+
if (n.location.href !== c || e.src === c || e.src === "")
|
|
936
936
|
return setTimeout(t, 0), e.addEventListener("load", t);
|
|
937
937
|
e.addEventListener("load", t);
|
|
938
938
|
}
|
|
939
939
|
}
|
|
940
|
-
function
|
|
940
|
+
function un(e, t, r) {
|
|
941
941
|
var n = !1, s;
|
|
942
942
|
try {
|
|
943
943
|
s = e.sheet;
|
|
@@ -953,8 +953,8 @@ function ln(e, t, r) {
|
|
|
953
953
|
});
|
|
954
954
|
}
|
|
955
955
|
}
|
|
956
|
-
function
|
|
957
|
-
var r = t.doc, n = t.mirror, s = t.blockClass, i = t.blockSelector, a = t.maskTextClass,
|
|
956
|
+
function pn(e, t) {
|
|
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" ? {
|
|
@@ -974,11 +974,11 @@ function un(e, t) {
|
|
|
974
974
|
rootId: k
|
|
975
975
|
};
|
|
976
976
|
case e.ELEMENT_NODE:
|
|
977
|
-
return
|
|
977
|
+
return mn(e, {
|
|
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,
|
|
@@ -989,9 +989,9 @@ function un(e, t) {
|
|
|
989
989
|
rootId: k
|
|
990
990
|
});
|
|
991
991
|
case e.TEXT_NODE:
|
|
992
|
-
return
|
|
992
|
+
return fn(e, {
|
|
993
993
|
maskTextClass: a,
|
|
994
|
-
maskTextSelector:
|
|
994
|
+
maskTextSelector: c,
|
|
995
995
|
maskTextFn: u,
|
|
996
996
|
rootId: k
|
|
997
997
|
});
|
|
@@ -1011,43 +1011,43 @@ function un(e, t) {
|
|
|
1011
1011
|
return !1;
|
|
1012
1012
|
}
|
|
1013
1013
|
}
|
|
1014
|
-
function
|
|
1014
|
+
function hn(e, t) {
|
|
1015
1015
|
if (t.hasNode(e)) {
|
|
1016
1016
|
var r = t.getId(e);
|
|
1017
1017
|
return r === 1 ? void 0 : r;
|
|
1018
1018
|
}
|
|
1019
1019
|
}
|
|
1020
|
-
function
|
|
1021
|
-
var r, n = t.maskTextClass, s = t.maskTextSelector, i = t.maskTextFn, a = t.rootId,
|
|
1022
|
-
if (d &&
|
|
1020
|
+
function fn(e, t) {
|
|
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
1034
|
rootId: a
|
|
1035
1035
|
};
|
|
1036
1036
|
}
|
|
1037
|
-
function
|
|
1038
|
-
for (var r = t.doc, n = t.blockClass, s = t.blockSelector, i = t.inlineStylesheet, a = t.maskInputOptions,
|
|
1037
|
+
function mn(e, t) {
|
|
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
|
-
g[x.name] =
|
|
1040
|
+
g[x.name] = Xt(r, m, x.name, x.value);
|
|
1041
1041
|
}
|
|
1042
1042
|
if (m === "link" && i) {
|
|
1043
|
-
var
|
|
1043
|
+
var B = Array.from(r.styleSheets).find(function(q) {
|
|
1044
1044
|
return q.href === e.href;
|
|
1045
|
-
}),
|
|
1046
|
-
|
|
1045
|
+
}), E = null;
|
|
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
|
|
1050
|
-
|
|
1049
|
+
var E = at(e.sheet);
|
|
1050
|
+
E && (g._cssText = Pe(E, pt()));
|
|
1051
1051
|
}
|
|
1052
1052
|
if (m === "input" || m === "textarea" || m === "select") {
|
|
1053
1053
|
var H = e.value, j = e.checked;
|
|
@@ -1055,13 +1055,13 @@ function fn(e, t) {
|
|
|
1055
1055
|
type: g.type,
|
|
1056
1056
|
tagName: m,
|
|
1057
1057
|
value: H,
|
|
1058
|
-
maskInputOptions:
|
|
1059
|
-
maskInputFn:
|
|
1058
|
+
maskInputOptions: c,
|
|
1059
|
+
maskInputFn: o
|
|
1060
1060
|
}) : j && (g.checked = j);
|
|
1061
1061
|
}
|
|
1062
|
-
if (m === "option" && (e.selected && !
|
|
1062
|
+
if (m === "option" && (e.selected && !c.select ? g.selected = !0 : delete g.selected), m === "canvas" && h) {
|
|
1063
1063
|
if (e.__context === "2d")
|
|
1064
|
-
|
|
1064
|
+
qr(e) || (g.rr_dataURL = e.toDataURL(l.type, l.quality));
|
|
1065
1065
|
else if (!("__context" in e)) {
|
|
1066
1066
|
var X = e.toDataURL(l.type, l.quality), Q = document.createElement("canvas");
|
|
1067
1067
|
Q.width = e.width, Q.height = e.height;
|
|
@@ -1096,49 +1096,49 @@ function fn(e, t) {
|
|
|
1096
1096
|
tagName: m,
|
|
1097
1097
|
attributes: g,
|
|
1098
1098
|
childNodes: [],
|
|
1099
|
-
isSVG:
|
|
1099
|
+
isSVG: cn(e) || void 0,
|
|
1100
1100
|
needBlock: C,
|
|
1101
1101
|
rootId: S
|
|
1102
1102
|
};
|
|
1103
1103
|
}
|
|
1104
|
-
function
|
|
1104
|
+
function R(e) {
|
|
1105
1105
|
return e === void 0 ? "" : e.toLowerCase();
|
|
1106
1106
|
}
|
|
1107
|
-
function
|
|
1107
|
+
function gn(e, t) {
|
|
1108
1108
|
if (t.comment && e.type === F.Comment)
|
|
1109
1109
|
return !0;
|
|
1110
1110
|
if (e.type === F.Element) {
|
|
1111
1111
|
if (t.script && (e.tagName === "script" || e.tagName === "link" && e.attributes.rel === "preload" && e.attributes.as === "script" || e.tagName === "link" && e.attributes.rel === "prefetch" && typeof e.attributes.href == "string" && e.attributes.href.endsWith(".js")))
|
|
1112
1112
|
return !0;
|
|
1113
|
-
if (t.headFavicon && (e.tagName === "link" && e.attributes.rel === "shortcut icon" || e.tagName === "meta" && (
|
|
1113
|
+
if (t.headFavicon && (e.tagName === "link" && e.attributes.rel === "shortcut icon" || e.tagName === "meta" && (R(e.attributes.name).match(/^msapplication-tile(image|color)$/) || R(e.attributes.name) === "application-name" || R(e.attributes.rel) === "icon" || R(e.attributes.rel) === "apple-touch-icon" || R(e.attributes.rel) === "shortcut icon")))
|
|
1114
1114
|
return !0;
|
|
1115
1115
|
if (e.tagName === "meta") {
|
|
1116
|
-
if (t.headMetaDescKeywords &&
|
|
1116
|
+
if (t.headMetaDescKeywords && R(e.attributes.name).match(/^description|keywords$/))
|
|
1117
1117
|
return !0;
|
|
1118
|
-
if (t.headMetaSocial && (
|
|
1118
|
+
if (t.headMetaSocial && (R(e.attributes.property).match(/^(og|twitter|fb):/) || R(e.attributes.name).match(/^(og|twitter):/) || R(e.attributes.name) === "pinterest"))
|
|
1119
1119
|
return !0;
|
|
1120
|
-
if (t.headMetaRobots && (
|
|
1120
|
+
if (t.headMetaRobots && (R(e.attributes.name) === "robots" || R(e.attributes.name) === "googlebot" || R(e.attributes.name) === "bingbot"))
|
|
1121
1121
|
return !0;
|
|
1122
1122
|
if (t.headMetaHttpEquiv && e.attributes["http-equiv"] !== void 0)
|
|
1123
1123
|
return !0;
|
|
1124
|
-
if (t.headMetaAuthorship && (
|
|
1124
|
+
if (t.headMetaAuthorship && (R(e.attributes.name) === "author" || R(e.attributes.name) === "generator" || R(e.attributes.name) === "framework" || R(e.attributes.name) === "publisher" || R(e.attributes.name) === "progid" || R(e.attributes.property).match(/^article:/) || R(e.attributes.property).match(/^product:/)))
|
|
1125
1125
|
return !0;
|
|
1126
|
-
if (t.headMetaVerification && (
|
|
1126
|
+
if (t.headMetaVerification && (R(e.attributes.name) === "google-site-verification" || R(e.attributes.name) === "yandex-verification" || R(e.attributes.name) === "csrf-token" || R(e.attributes.name) === "p:domain_verify" || R(e.attributes.name) === "verify-v1" || R(e.attributes.name) === "verification" || R(e.attributes.name) === "shopify-checkout-api-token"))
|
|
1127
1127
|
return !0;
|
|
1128
1128
|
}
|
|
1129
1129
|
}
|
|
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, a = t.maskTextClass,
|
|
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, ae = t.preserveWhiteSpace, V = ae === void 0 ? !0 : ae, q =
|
|
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
1140
|
maskTextClass: a,
|
|
1141
|
-
maskTextSelector:
|
|
1141
|
+
maskTextSelector: c,
|
|
1142
1142
|
inlineStylesheet: u,
|
|
1143
1143
|
maskInputOptions: f,
|
|
1144
1144
|
maskTextFn: p,
|
|
@@ -1152,11 +1152,11 @@ function ve(e, t) {
|
|
|
1152
1152
|
if (!q)
|
|
1153
1153
|
return console.warn(e, "not serialized"), null;
|
|
1154
1154
|
var oe;
|
|
1155
|
-
n.hasNode(e) ? oe = n.getId(e) :
|
|
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
1156
|
var N = Object.assign(q, { id: oe });
|
|
1157
1157
|
if (n.add(e, N), oe === Le)
|
|
1158
1158
|
return null;
|
|
1159
|
-
|
|
1159
|
+
B && B(e);
|
|
1160
1160
|
var te = !d;
|
|
1161
1161
|
if (N.type === F.Element) {
|
|
1162
1162
|
te = te && !N.needBlock, delete N.needBlock;
|
|
@@ -1171,7 +1171,7 @@ function ve(e, t) {
|
|
|
1171
1171
|
blockClass: s,
|
|
1172
1172
|
blockSelector: i,
|
|
1173
1173
|
maskTextClass: a,
|
|
1174
|
-
maskTextSelector:
|
|
1174
|
+
maskTextSelector: c,
|
|
1175
1175
|
skipChild: d,
|
|
1176
1176
|
inlineStylesheet: u,
|
|
1177
1177
|
maskInputOptions: f,
|
|
@@ -1182,8 +1182,8 @@ function ve(e, t) {
|
|
|
1182
1182
|
inlineImages: k,
|
|
1183
1183
|
recordCanvas: x,
|
|
1184
1184
|
preserveWhiteSpace: V,
|
|
1185
|
-
onSerialize:
|
|
1186
|
-
onIframeLoad:
|
|
1185
|
+
onSerialize: B,
|
|
1186
|
+
onIframeLoad: E,
|
|
1187
1187
|
iframeLoadTimeout: j,
|
|
1188
1188
|
onStylesheetLoad: X,
|
|
1189
1189
|
stylesheetLoadTimeout: $,
|
|
@@ -1192,22 +1192,22 @@ function ve(e, t) {
|
|
|
1192
1192
|
var P = W[I], T = ve(P, me);
|
|
1193
1193
|
T && N.childNodes.push(T);
|
|
1194
1194
|
}
|
|
1195
|
-
if (
|
|
1195
|
+
if (Zr(e) && e.shadowRoot)
|
|
1196
1196
|
for (var Y = 0, A = Array.from(e.shadowRoot.childNodes); Y < A.length; Y++) {
|
|
1197
1197
|
var P = A[Y], T = ve(P, me);
|
|
1198
1198
|
T && (Me(e.shadowRoot) && (T.isShadow = !0), N.childNodes.push(T));
|
|
1199
1199
|
}
|
|
1200
1200
|
}
|
|
1201
|
-
return e.parentNode && Ne(e.parentNode) && Me(e.parentNode) && (N.isShadow = !0), N.type === F.Element && N.tagName === "iframe" &&
|
|
1201
|
+
return e.parentNode && Ne(e.parentNode) && Me(e.parentNode) && (N.isShadow = !0), N.type === F.Element && N.tagName === "iframe" && ln(e, function() {
|
|
1202
1202
|
var Z = e.contentDocument;
|
|
1203
|
-
if (Z &&
|
|
1204
|
-
var
|
|
1203
|
+
if (Z && E) {
|
|
1204
|
+
var Re = ve(Z, {
|
|
1205
1205
|
doc: Z,
|
|
1206
1206
|
mirror: n,
|
|
1207
1207
|
blockClass: s,
|
|
1208
1208
|
blockSelector: i,
|
|
1209
1209
|
maskTextClass: a,
|
|
1210
|
-
maskTextSelector:
|
|
1210
|
+
maskTextSelector: c,
|
|
1211
1211
|
skipChild: !1,
|
|
1212
1212
|
inlineStylesheet: u,
|
|
1213
1213
|
maskInputOptions: f,
|
|
@@ -1218,16 +1218,16 @@ function ve(e, t) {
|
|
|
1218
1218
|
inlineImages: k,
|
|
1219
1219
|
recordCanvas: x,
|
|
1220
1220
|
preserveWhiteSpace: V,
|
|
1221
|
-
onSerialize:
|
|
1222
|
-
onIframeLoad:
|
|
1221
|
+
onSerialize: B,
|
|
1222
|
+
onIframeLoad: E,
|
|
1223
1223
|
iframeLoadTimeout: j,
|
|
1224
1224
|
onStylesheetLoad: X,
|
|
1225
1225
|
stylesheetLoadTimeout: $,
|
|
1226
1226
|
keepIframeSrcFn: J
|
|
1227
1227
|
});
|
|
1228
|
-
|
|
1228
|
+
Re && E(e, Re);
|
|
1229
1229
|
}
|
|
1230
|
-
}, j), N.type === F.Element && N.tagName === "link" && N.attributes.rel === "stylesheet" &&
|
|
1230
|
+
}, j), N.type === F.Element && N.tagName === "link" && N.attributes.rel === "stylesheet" && un(e, function() {
|
|
1231
1231
|
if (X) {
|
|
1232
1232
|
var Z = ve(e, {
|
|
1233
1233
|
doc: r,
|
|
@@ -1235,7 +1235,7 @@ function ve(e, t) {
|
|
|
1235
1235
|
blockClass: s,
|
|
1236
1236
|
blockSelector: i,
|
|
1237
1237
|
maskTextClass: a,
|
|
1238
|
-
maskTextSelector:
|
|
1238
|
+
maskTextSelector: c,
|
|
1239
1239
|
skipChild: !1,
|
|
1240
1240
|
inlineStylesheet: u,
|
|
1241
1241
|
maskInputOptions: f,
|
|
@@ -1246,8 +1246,8 @@ function ve(e, t) {
|
|
|
1246
1246
|
inlineImages: k,
|
|
1247
1247
|
recordCanvas: x,
|
|
1248
1248
|
preserveWhiteSpace: V,
|
|
1249
|
-
onSerialize:
|
|
1250
|
-
onIframeLoad:
|
|
1249
|
+
onSerialize: B,
|
|
1250
|
+
onIframeLoad: E,
|
|
1251
1251
|
iframeLoadTimeout: j,
|
|
1252
1252
|
onStylesheetLoad: X,
|
|
1253
1253
|
stylesheetLoadTimeout: $,
|
|
@@ -1257,8 +1257,8 @@ function ve(e, t) {
|
|
|
1257
1257
|
}
|
|
1258
1258
|
}, $), N;
|
|
1259
1259
|
}
|
|
1260
|
-
function
|
|
1261
|
-
var r = t || {}, n = r.mirror, s = n === void 0 ? new
|
|
1260
|
+
function yn(e, t) {
|
|
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
1263
|
} : ee, ae = k === !0 ? {
|
|
1264
1264
|
color: !0,
|
|
@@ -1279,23 +1279,23 @@ function gn(e, t) {
|
|
|
1279
1279
|
password: !0
|
|
1280
1280
|
} : k === !1 ? {
|
|
1281
1281
|
password: !0
|
|
1282
|
-
} : k, V =
|
|
1282
|
+
} : k, V = E === !0 || E === "all" ? {
|
|
1283
1283
|
script: !0,
|
|
1284
1284
|
comment: !0,
|
|
1285
1285
|
headFavicon: !0,
|
|
1286
1286
|
headWhitespace: !0,
|
|
1287
|
-
headMetaDescKeywords:
|
|
1287
|
+
headMetaDescKeywords: E === "all",
|
|
1288
1288
|
headMetaSocial: !0,
|
|
1289
1289
|
headMetaRobots: !0,
|
|
1290
1290
|
headMetaHttpEquiv: !0,
|
|
1291
1291
|
headMetaAuthorship: !0,
|
|
1292
1292
|
headMetaVerification: !0
|
|
1293
|
-
} :
|
|
1293
|
+
} : E === !1 ? {} : E;
|
|
1294
1294
|
return ve(e, {
|
|
1295
1295
|
doc: e,
|
|
1296
1296
|
mirror: s,
|
|
1297
1297
|
blockClass: a,
|
|
1298
|
-
blockSelector:
|
|
1298
|
+
blockSelector: o,
|
|
1299
1299
|
maskTextClass: l,
|
|
1300
1300
|
maskTextSelector: h,
|
|
1301
1301
|
skipChild: !1,
|
|
@@ -1352,10 +1352,10 @@ function Fe(e, t, r = {}) {
|
|
|
1352
1352
|
return function(...i) {
|
|
1353
1353
|
const a = Date.now();
|
|
1354
1354
|
!s && r.leading === !1 && (s = a);
|
|
1355
|
-
const
|
|
1356
|
-
|
|
1357
|
-
s = r.leading === !1 ? 0 : Date.now(), n = null, e.apply(
|
|
1358
|
-
},
|
|
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
|
+
}, c));
|
|
1359
1359
|
};
|
|
1360
1360
|
}
|
|
1361
1361
|
function qe(e, t, r, n, s = window) {
|
|
@@ -1387,10 +1387,10 @@ function he(e, t, r) {
|
|
|
1387
1387
|
};
|
|
1388
1388
|
}
|
|
1389
1389
|
}
|
|
1390
|
-
function
|
|
1390
|
+
function $t() {
|
|
1391
1391
|
return window.innerHeight || document.documentElement && document.documentElement.clientHeight || document.body && document.body.clientHeight;
|
|
1392
1392
|
}
|
|
1393
|
-
function
|
|
1393
|
+
function er() {
|
|
1394
1394
|
return window.innerWidth || document.documentElement && document.documentElement.clientWidth || document.body && document.body.clientWidth;
|
|
1395
1395
|
}
|
|
1396
1396
|
function K(e, t, r, n) {
|
|
@@ -1406,22 +1406,22 @@ function K(e, t, r, n) {
|
|
|
1406
1406
|
return !0;
|
|
1407
1407
|
return !!(r && (e.matches(r) || n && s.closest(r) !== null));
|
|
1408
1408
|
}
|
|
1409
|
-
function
|
|
1409
|
+
function In(e, t) {
|
|
1410
1410
|
return t.getId(e) !== -1;
|
|
1411
1411
|
}
|
|
1412
1412
|
function Qe(e, t) {
|
|
1413
1413
|
return t.getId(e) === Le;
|
|
1414
1414
|
}
|
|
1415
|
-
function
|
|
1415
|
+
function tr(e, t) {
|
|
1416
1416
|
if (Ne(e))
|
|
1417
1417
|
return !1;
|
|
1418
1418
|
const r = t.getId(e);
|
|
1419
|
-
return t.has(r) ? e.parentNode && e.parentNode.nodeType === e.DOCUMENT_NODE ? !1 : e.parentNode ?
|
|
1419
|
+
return t.has(r) ? e.parentNode && e.parentNode.nodeType === e.DOCUMENT_NODE ? !1 : e.parentNode ? tr(e.parentNode, t) : !0 : !0;
|
|
1420
1420
|
}
|
|
1421
|
-
function
|
|
1421
|
+
function rr(e) {
|
|
1422
1422
|
return !!e.changedTouches;
|
|
1423
1423
|
}
|
|
1424
|
-
function
|
|
1424
|
+
function Cn(e = window) {
|
|
1425
1425
|
"NodeList" in e && !e.NodeList.prototype.forEach && (e.NodeList.prototype.forEach = Array.prototype.forEach), "DOMTokenList" in e && !e.DOMTokenList.prototype.forEach && (e.DOMTokenList.prototype.forEach = Array.prototype.forEach), Node.prototype.contains || (Node.prototype.contains = (...t) => {
|
|
1426
1426
|
let r = t[0];
|
|
1427
1427
|
if (!(0 in t))
|
|
@@ -1433,16 +1433,16 @@ function In(e = window) {
|
|
|
1433
1433
|
return !1;
|
|
1434
1434
|
});
|
|
1435
1435
|
}
|
|
1436
|
-
function
|
|
1436
|
+
function nr(e, t) {
|
|
1437
1437
|
return !!(e.nodeName === "IFRAME" && t.getMeta(e));
|
|
1438
1438
|
}
|
|
1439
|
-
function
|
|
1439
|
+
function sr(e, t) {
|
|
1440
1440
|
return !!(e.nodeName === "LINK" && e.nodeType === e.ELEMENT_NODE && e.getAttribute && e.getAttribute("rel") === "stylesheet" && t.getMeta(e));
|
|
1441
1441
|
}
|
|
1442
|
-
function
|
|
1442
|
+
function ir(e) {
|
|
1443
1443
|
return !!(e != null && e.shadowRoot);
|
|
1444
1444
|
}
|
|
1445
|
-
class
|
|
1445
|
+
class Sn {
|
|
1446
1446
|
constructor() {
|
|
1447
1447
|
this.id = 1, this.styleIDMap = /* @__PURE__ */ new WeakMap(), this.idStyleMap = /* @__PURE__ */ new Map();
|
|
1448
1448
|
}
|
|
@@ -1473,7 +1473,7 @@ var v = /* @__PURE__ */ ((e) => (e[e.DomContentLoaded = 0] = "DomContentLoaded",
|
|
|
1473
1473
|
function kt(e) {
|
|
1474
1474
|
return "__ln" in e;
|
|
1475
1475
|
}
|
|
1476
|
-
class
|
|
1476
|
+
class bn {
|
|
1477
1477
|
constructor() {
|
|
1478
1478
|
this.length = 0, this.head = null;
|
|
1479
1479
|
}
|
|
@@ -1506,33 +1506,33 @@ class Sn {
|
|
|
1506
1506
|
this.head && (r.previous ? (r.previous.next = r.next, r.next && (r.next.previous = r.previous)) : (this.head = r.next, this.head && (this.head.previous = null)), t.__ln && delete t.__ln, this.length--);
|
|
1507
1507
|
}
|
|
1508
1508
|
}
|
|
1509
|
-
const
|
|
1510
|
-
class
|
|
1509
|
+
const Et = (e, t) => `${e}@${t}`;
|
|
1510
|
+
class vn {
|
|
1511
1511
|
constructor() {
|
|
1512
1512
|
this.frozen = !1, this.locked = !1, this.texts = [], this.attributes = [], this.removes = [], this.mapRemoves = [], this.movedMap = {}, this.addedSet = /* @__PURE__ */ new Set(), this.movedSet = /* @__PURE__ */ new Set(), this.droppedSet = /* @__PURE__ */ new Set(), this.processMutations = (t) => {
|
|
1513
1513
|
t.forEach(this.processMutation), this.emit();
|
|
1514
1514
|
}, this.emit = () => {
|
|
1515
1515
|
if (this.frozen || this.locked)
|
|
1516
1516
|
return;
|
|
1517
|
-
const t = [], r = new
|
|
1518
|
-
let
|
|
1517
|
+
const t = [], r = new bn(), n = (c) => {
|
|
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
|
-
}, s = (
|
|
1523
|
-
var
|
|
1522
|
+
}, s = (c) => {
|
|
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;
|
|
1529
|
-
const p = !this.doc.contains(
|
|
1530
|
-
if (!
|
|
1529
|
+
const p = !this.doc.contains(c) && (!f || !this.doc.contains(f));
|
|
1530
|
+
if (!c.parentNode || p)
|
|
1531
1531
|
return;
|
|
1532
|
-
const y = Ne(
|
|
1532
|
+
const y = Ne(c.parentNode) ? this.mirror.getId(h) : this.mirror.getId(c.parentNode), S = n(c);
|
|
1533
1533
|
if (y === -1 || S === -1)
|
|
1534
|
-
return r.addNode(
|
|
1535
|
-
const C = ve(
|
|
1534
|
+
return r.addNode(c);
|
|
1535
|
+
const C = ve(c, {
|
|
1536
1536
|
doc: this.doc,
|
|
1537
1537
|
mirror: this.mirror,
|
|
1538
1538
|
blockClass: this.blockClass,
|
|
@@ -1550,7 +1550,7 @@ class bn {
|
|
|
1550
1550
|
recordCanvas: this.recordCanvas,
|
|
1551
1551
|
inlineImages: this.inlineImages,
|
|
1552
1552
|
onSerialize: (m) => {
|
|
1553
|
-
|
|
1553
|
+
nr(m, this.mirror) && this.iframeManager.addIframe(m), sr(m, this.mirror) && this.stylesheetManager.trackLinkElement(m), ir(c) && this.shadowDomManager.addShadowRoot(c.shadowRoot, this.doc);
|
|
1554
1554
|
},
|
|
1555
1555
|
onIframeLoad: (m, g) => {
|
|
1556
1556
|
this.iframeManager.attachIframe(m, g), this.shadowDomManager.observeAttachShadow(m);
|
|
@@ -1567,55 +1567,55 @@ class bn {
|
|
|
1567
1567
|
};
|
|
1568
1568
|
for (; this.mapRemoves.length; )
|
|
1569
1569
|
this.mirror.removeNodeFromMap(this.mapRemoves.shift());
|
|
1570
|
-
for (const
|
|
1571
|
-
|
|
1572
|
-
for (const
|
|
1573
|
-
!Tt(this.droppedSet,
|
|
1570
|
+
for (const c of Array.from(this.movedSet.values()))
|
|
1571
|
+
Rt(this.removes, c, this.mirror) && !this.movedSet.has(c.parentNode) || s(c);
|
|
1572
|
+
for (const c of Array.from(this.addedSet.values()))
|
|
1573
|
+
!Tt(this.droppedSet, c) && !Rt(this.removes, c, this.mirror) || Tt(this.movedSet, c) ? s(c) : this.droppedSet.add(c);
|
|
1574
1574
|
let i = null;
|
|
1575
1575
|
for (; r.length; ) {
|
|
1576
|
-
let
|
|
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
|
-
if (!
|
|
1582
|
-
for (let
|
|
1583
|
-
const d = r.get(
|
|
1581
|
+
if (!c)
|
|
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)
|
|
1587
1587
|
continue;
|
|
1588
1588
|
if (l !== -1) {
|
|
1589
|
-
|
|
1589
|
+
c = d;
|
|
1590
1590
|
break;
|
|
1591
1591
|
} else {
|
|
1592
1592
|
const h = d.value;
|
|
1593
1593
|
if (h.parentNode && h.parentNode.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {
|
|
1594
1594
|
const f = h.parentNode.host;
|
|
1595
1595
|
if (this.mirror.getId(f) !== -1) {
|
|
1596
|
-
|
|
1596
|
+
c = d;
|
|
1597
1597
|
break;
|
|
1598
1598
|
}
|
|
1599
1599
|
}
|
|
1600
1600
|
}
|
|
1601
1601
|
}
|
|
1602
1602
|
}
|
|
1603
|
-
if (!
|
|
1603
|
+
if (!c) {
|
|
1604
1604
|
for (; r.head; )
|
|
1605
1605
|
r.removeNode(r.head.value);
|
|
1606
1606
|
break;
|
|
1607
1607
|
}
|
|
1608
|
-
i =
|
|
1608
|
+
i = c.previous, r.removeNode(c.value), s(c.value);
|
|
1609
1609
|
}
|
|
1610
1610
|
const a = {
|
|
1611
|
-
texts: this.texts.map((
|
|
1612
|
-
id: this.mirror.getId(
|
|
1613
|
-
value:
|
|
1614
|
-
})).filter((
|
|
1615
|
-
attributes: this.attributes.map((
|
|
1616
|
-
id: this.mirror.getId(
|
|
1617
|
-
attributes:
|
|
1618
|
-
})).filter((
|
|
1611
|
+
texts: this.texts.map((c) => ({
|
|
1612
|
+
id: this.mirror.getId(c.node),
|
|
1613
|
+
value: c.value
|
|
1614
|
+
})).filter((c) => this.mirror.has(c.id)),
|
|
1615
|
+
attributes: this.attributes.map((c) => ({
|
|
1616
|
+
id: this.mirror.getId(c.node),
|
|
1617
|
+
attributes: c.attributes
|
|
1618
|
+
})).filter((c) => this.mirror.has(c.id)),
|
|
1619
1619
|
removes: this.removes,
|
|
1620
1620
|
adds: t
|
|
1621
1621
|
};
|
|
@@ -1626,7 +1626,7 @@ class bn {
|
|
|
1626
1626
|
case "characterData": {
|
|
1627
1627
|
const r = t.target.textContent;
|
|
1628
1628
|
!K(t.target, this.blockClass, this.blockSelector, !1) && r !== t.oldValue && this.texts.push({
|
|
1629
|
-
value:
|
|
1629
|
+
value: Qt(t.target, this.maskTextClass, this.maskTextSelector) && r ? this.maskTextFn ? this.maskTextFn(r) : r.replace(/[\S]/g, "*") : r,
|
|
1630
1630
|
node: t.target
|
|
1631
1631
|
});
|
|
1632
1632
|
break;
|
|
@@ -1655,14 +1655,14 @@ class bn {
|
|
|
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
1657
|
const a = s.attributes.style;
|
|
1658
|
-
for (const
|
|
1659
|
-
const
|
|
1660
|
-
(
|
|
1658
|
+
for (const c of Array.from(r.style)) {
|
|
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
|
-
for (const
|
|
1663
|
-
r.style.getPropertyValue(
|
|
1662
|
+
for (const c of Array.from(i.style))
|
|
1663
|
+
r.style.getPropertyValue(c) === "" && (a[c] = !1);
|
|
1664
1664
|
} else
|
|
1665
|
-
s.attributes[t.attributeName] =
|
|
1665
|
+
s.attributes[t.attributeName] = Xt(this.doc, r.tagName, t.attributeName, n);
|
|
1666
1666
|
break;
|
|
1667
1667
|
}
|
|
1668
1668
|
case "childList": {
|
|
@@ -1670,7 +1670,7 @@ class bn {
|
|
|
1670
1670
|
return;
|
|
1671
1671
|
t.addedNodes.forEach((r) => this.genAdds(r, t.target)), t.removedNodes.forEach((r) => {
|
|
1672
1672
|
const n = this.mirror.getId(r), s = Ne(t.target) ? this.mirror.getId(t.target.host) : this.mirror.getId(t.target);
|
|
1673
|
-
K(t.target, this.blockClass, this.blockSelector, !1) || Qe(r, this.mirror) || !
|
|
1673
|
+
K(t.target, this.blockClass, this.blockSelector, !1) || Qe(r, this.mirror) || !In(r, this.mirror) || (this.addedSet.has(r) ? (ct(this.addedSet, r), this.droppedSet.add(r)) : this.addedSet.has(t.target) && n === -1 || tr(t.target, this.mirror) || (this.movedSet.has(r) && this.movedMap[Et(n, s)] ? ct(this.movedSet, r) : this.removes.push({
|
|
1674
1674
|
parentId: s,
|
|
1675
1675
|
id: n,
|
|
1676
1676
|
isShadow: Ne(t.target) && Me(t.target) ? !0 : void 0
|
|
@@ -1685,7 +1685,7 @@ class bn {
|
|
|
1685
1685
|
return;
|
|
1686
1686
|
this.movedSet.add(t);
|
|
1687
1687
|
let n = null;
|
|
1688
|
-
r && this.mirror.hasNode(r) && (n = this.mirror.getId(r)), n && n !== -1 && (this.movedMap[
|
|
1688
|
+
r && this.mirror.hasNode(r) && (n = this.mirror.getId(r)), n && n !== -1 && (this.movedMap[Et(this.mirror.getId(t), n)] = !0);
|
|
1689
1689
|
} else
|
|
1690
1690
|
this.addedSet.add(t), this.droppedSet.delete(t);
|
|
1691
1691
|
K(t, this.blockClass, this.blockSelector, !1) || t.childNodes.forEach((n) => this.genAdds(n));
|
|
@@ -1739,24 +1739,24 @@ class bn {
|
|
|
1739
1739
|
function ct(e, t) {
|
|
1740
1740
|
e.delete(t), t.childNodes.forEach((r) => ct(e, r));
|
|
1741
1741
|
}
|
|
1742
|
-
function
|
|
1743
|
-
return e.length === 0 ? !1 :
|
|
1742
|
+
function Rt(e, t, r) {
|
|
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
|
-
const ue = [],
|
|
1759
|
+
const ue = [], cr = typeof CSSGroupingRule < "u", dr = typeof CSSMediaRule < "u", lr = typeof CSSSupportsRule < "u", ur = typeof CSSConditionRule < "u";
|
|
1760
1760
|
function xe(e) {
|
|
1761
1761
|
try {
|
|
1762
1762
|
if ("composedPath" in e) {
|
|
@@ -1770,40 +1770,40 @@ function xe(e) {
|
|
|
1770
1770
|
return e.target;
|
|
1771
1771
|
}
|
|
1772
1772
|
}
|
|
1773
|
-
function
|
|
1773
|
+
function pr(e, t) {
|
|
1774
1774
|
var r, n;
|
|
1775
|
-
const s = new
|
|
1775
|
+
const s = new vn();
|
|
1776
1776
|
ue.push(s), s.init(e);
|
|
1777
1777
|
let i = window.MutationObserver || window.__rrMutationObserver;
|
|
1778
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
1779
|
a && window[a] && (i = window[a]);
|
|
1780
|
-
const
|
|
1781
|
-
return
|
|
1780
|
+
const c = new i(s.processMutations.bind(s));
|
|
1781
|
+
return c.observe(t, {
|
|
1782
1782
|
attributes: !0,
|
|
1783
1783
|
attributeOldValue: !0,
|
|
1784
1784
|
characterData: !0,
|
|
1785
1785
|
characterDataOldValue: !0,
|
|
1786
1786
|
childList: !0,
|
|
1787
1787
|
subtree: !0
|
|
1788
|
-
}),
|
|
1788
|
+
}), c;
|
|
1789
1789
|
}
|
|
1790
|
-
function
|
|
1790
|
+
function wn({ mousemoveCb: e, sampling: t, doc: r, mirror: n }) {
|
|
1791
1791
|
if (t.mousemove === !1)
|
|
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 a = [],
|
|
1796
|
-
const
|
|
1797
|
-
const h = Date.now() -
|
|
1798
|
-
e(a.map((f) => (f.timeOffset -= h, f)), u), a = [],
|
|
1795
|
+
let a = [], c;
|
|
1796
|
+
const o = Fe((u) => {
|
|
1797
|
+
const h = Date.now() - c;
|
|
1798
|
+
e(a.map((f) => (f.timeOffset -= h, f)), u), a = [], c = null;
|
|
1799
1799
|
}, i), d = Fe((u) => {
|
|
1800
|
-
const h = xe(u), { clientX: f, clientY: p } =
|
|
1801
|
-
|
|
1800
|
+
const h = xe(u), { clientX: f, clientY: p } = rr(u) ? u.changedTouches[0] : u;
|
|
1801
|
+
c || (c = Date.now()), a.push({
|
|
1802
1802
|
x: f,
|
|
1803
1803
|
y: p,
|
|
1804
1804
|
id: n.getId(h),
|
|
1805
|
-
timeOffset: Date.now() -
|
|
1806
|
-
}),
|
|
1805
|
+
timeOffset: Date.now() - c
|
|
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 = [
|
|
@@ -1815,15 +1815,15 @@ function vn({ mousemoveCb: e, sampling: t, doc: r, mirror: n }) {
|
|
|
1815
1815
|
l.forEach((u) => u());
|
|
1816
1816
|
};
|
|
1817
1817
|
}
|
|
1818
|
-
function
|
|
1818
|
+
function An({ mouseInteractionCb: e, doc: t, mirror: r, blockClass: n, blockSelector: s, sampling: i }) {
|
|
1819
1819
|
if (i.mouseInteraction === !1)
|
|
1820
1820
|
return () => {
|
|
1821
1821
|
};
|
|
1822
|
-
const a = i.mouseInteraction === !0 || i.mouseInteraction === void 0 ? {} : i.mouseInteraction,
|
|
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;
|
|
1826
|
-
const h =
|
|
1826
|
+
const h = rr(l) ? l.changedTouches[0] : l;
|
|
1827
1827
|
if (!h)
|
|
1828
1828
|
return;
|
|
1829
1829
|
const f = r.getId(u), { clientX: p, clientY: y } = h;
|
|
@@ -1835,19 +1835,19 @@ function wn({ mouseInteractionCb: e, doc: t, mirror: r, blockClass: n, blockSele
|
|
|
1835
1835
|
});
|
|
1836
1836
|
};
|
|
1837
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 =
|
|
1839
|
-
|
|
1838
|
+
const l = d.toLowerCase(), u = o(d);
|
|
1839
|
+
c.push(G(l, u, t));
|
|
1840
1840
|
}), () => {
|
|
1841
|
-
|
|
1841
|
+
c.forEach((d) => d());
|
|
1842
1842
|
};
|
|
1843
1843
|
}
|
|
1844
|
-
function
|
|
1845
|
-
const a = Fe((
|
|
1846
|
-
const
|
|
1847
|
-
if (!
|
|
1844
|
+
function hr({ scrollCb: e, doc: t, mirror: r, blockClass: n, blockSelector: s, sampling: i }) {
|
|
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,16 +1857,16 @@ function pr({ 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
1864
|
return G("scroll", a, t);
|
|
1865
1865
|
}
|
|
1866
|
-
function
|
|
1866
|
+
function kn({ viewportResizeCb: e }) {
|
|
1867
1867
|
let t = -1, r = -1;
|
|
1868
1868
|
const n = Fe(() => {
|
|
1869
|
-
const s =
|
|
1869
|
+
const s = $t(), i = er();
|
|
1870
1870
|
(t !== s || r !== i) && (e({
|
|
1871
1871
|
width: Number(i),
|
|
1872
1872
|
height: Number(s)
|
|
@@ -1878,12 +1878,12 @@ function _t(e, t) {
|
|
|
1878
1878
|
const r = Object.assign({}, e);
|
|
1879
1879
|
return t || delete r.userTriggered, r;
|
|
1880
1880
|
}
|
|
1881
|
-
const
|
|
1882
|
-
function Rn({ inputCb: e, doc: t, mirror: r, blockClass: n, blockSelector: s, ignoreClass: i, maskInputOptions: a, maskInputFn:
|
|
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: a, maskInputFn: c, sampling: o, userTriggeredOnInput: d }) {
|
|
1883
1883
|
function l(C) {
|
|
1884
1884
|
let m = xe(C);
|
|
1885
1885
|
const g = C.isTrusted;
|
|
1886
|
-
if (m && m.tagName === "OPTION" && (m = m.parentElement), !m || !m.tagName ||
|
|
1886
|
+
if (m && m.tagName === "OPTION" && (m = m.parentElement), !m || !m.tagName || En.indexOf(m.tagName) < 0 || K(m, n, s, !0))
|
|
1887
1887
|
return;
|
|
1888
1888
|
const k = m.type;
|
|
1889
1889
|
if (m.classList.contains(i))
|
|
@@ -1894,12 +1894,12 @@ function Rn({ inputCb: e, doc: t, mirror: r, blockClass: n, blockSelector: s, ig
|
|
|
1894
1894
|
tagName: m.tagName,
|
|
1895
1895
|
type: k,
|
|
1896
1896
|
value: U,
|
|
1897
|
-
maskInputFn:
|
|
1897
|
+
maskInputFn: c
|
|
1898
1898
|
})), u(m, _t({ text: U, isChecked: x, userTriggered: g }, d));
|
|
1899
|
-
const
|
|
1900
|
-
k === "radio" &&
|
|
1901
|
-
|
|
1902
|
-
text:
|
|
1899
|
+
const B = m.name;
|
|
1900
|
+
k === "radio" && B && x && t.querySelectorAll(`input[type="radio"][name="${B}"]`).forEach((E) => {
|
|
1901
|
+
E !== m && u(E, _t({
|
|
1902
|
+
text: E.value,
|
|
1903
1903
|
isChecked: !x,
|
|
1904
1904
|
userTriggered: !1
|
|
1905
1905
|
}, d));
|
|
@@ -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());
|
|
@@ -1937,7 +1937,7 @@ function Rn({ inputCb: e, doc: t, mirror: r, blockClass: n, blockSelector: s, ig
|
|
|
1937
1937
|
function He(e) {
|
|
1938
1938
|
const t = [];
|
|
1939
1939
|
function r(n, s) {
|
|
1940
|
-
if (
|
|
1940
|
+
if (cr && n.parentRule instanceof CSSGroupingRule || dr && n.parentRule instanceof CSSMediaRule || lr && n.parentRule instanceof CSSSupportsRule || ur && n.parentRule instanceof CSSConditionRule) {
|
|
1941
1941
|
const a = Array.from(n.parentRule.cssRules).indexOf(n);
|
|
1942
1942
|
s.unshift(a);
|
|
1943
1943
|
} else if (n.parentStyleSheet) {
|
|
@@ -1955,7 +1955,7 @@ function ce(e, t, r) {
|
|
|
1955
1955
|
id: n
|
|
1956
1956
|
}) : {};
|
|
1957
1957
|
}
|
|
1958
|
-
function
|
|
1958
|
+
function Tn({ styleSheetRuleCb: e, mirror: t, stylesheetManager: r }, { win: n }) {
|
|
1959
1959
|
const s = n.CSSStyleSheet.prototype.insertRule;
|
|
1960
1960
|
n.CSSStyleSheet.prototype.insertRule = function(l, u) {
|
|
1961
1961
|
const { id: h, styleId: f } = ce(this, t, r.styleMirror);
|
|
@@ -1983,19 +1983,19 @@ function En({ styleSheetRuleCb: e, mirror: t, stylesheetManager: r }, { win: n }
|
|
|
1983
1983
|
replace: l
|
|
1984
1984
|
}), a.apply(this, [l]);
|
|
1985
1985
|
});
|
|
1986
|
-
let
|
|
1987
|
-
n.CSSStyleSheet.prototype.replaceSync && (
|
|
1986
|
+
let c;
|
|
1987
|
+
n.CSSStyleSheet.prototype.replaceSync && (c = n.CSSStyleSheet.prototype.replaceSync, n.CSSStyleSheet.prototype.replaceSync = function(l) {
|
|
1988
1988
|
const { id: u, styleId: h } = ce(this, t, r.styleMirror);
|
|
1989
1989
|
return (u && u !== -1 || h && h !== -1) && e({
|
|
1990
1990
|
id: u,
|
|
1991
1991
|
styleId: h,
|
|
1992
1992
|
replaceSync: l
|
|
1993
|
-
}),
|
|
1993
|
+
}), c.apply(this, [l]);
|
|
1994
1994
|
});
|
|
1995
|
-
const
|
|
1996
|
-
|
|
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,27 +2025,27 @@ function En({ 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, a && (n.CSSStyleSheet.prototype.replace = a),
|
|
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
|
-
function
|
|
2033
|
+
function fr({ mirror: e, stylesheetManager: t }, r) {
|
|
2034
2034
|
var n, s, i;
|
|
2035
2035
|
let a = null;
|
|
2036
2036
|
r.nodeName === "#document" ? a = e.getId(r) : a = e.getId(r.host);
|
|
2037
|
-
const
|
|
2038
|
-
return a === null || a === -1 || !
|
|
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 =
|
|
2048
|
+
const u = (l = o.set) === null || l === void 0 ? void 0 : l.call(this, d);
|
|
2049
2049
|
if (a !== null && a !== -1)
|
|
2050
2050
|
try {
|
|
2051
2051
|
t.adoptStyleSheets(d, a);
|
|
@@ -2055,57 +2055,57 @@ function hr({ mirror: e, stylesheetManager: t }, r) {
|
|
|
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
|
-
function
|
|
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(
|
|
2067
|
+
s.CSSStyleDeclaration.prototype.setProperty = function(c, o, d) {
|
|
2068
2068
|
var l;
|
|
2069
|
-
if (r.has(
|
|
2070
|
-
return i.apply(this, [
|
|
2069
|
+
if (r.has(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
|
-
property:
|
|
2077
|
-
value:
|
|
2076
|
+
property: c,
|
|
2077
|
+
value: o,
|
|
2078
2078
|
priority: d
|
|
2079
2079
|
},
|
|
2080
2080
|
index: He(this.parentRule)
|
|
2081
|
-
}), i.apply(this, [
|
|
2081
|
+
}), i.apply(this, [c, o, d]);
|
|
2082
2082
|
};
|
|
2083
2083
|
const a = s.CSSStyleDeclaration.prototype.removeProperty;
|
|
2084
|
-
return s.CSSStyleDeclaration.prototype.removeProperty = function(
|
|
2085
|
-
var
|
|
2086
|
-
if (r.has(
|
|
2087
|
-
return a.apply(this, [
|
|
2088
|
-
const { id: d, styleId: l } = ce((
|
|
2084
|
+
return s.CSSStyleDeclaration.prototype.removeProperty = function(c) {
|
|
2085
|
+
var o;
|
|
2086
|
+
if (r.has(c))
|
|
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,
|
|
2092
2092
|
remove: {
|
|
2093
|
-
property:
|
|
2093
|
+
property: c
|
|
2094
2094
|
},
|
|
2095
2095
|
index: He(this.parentRule)
|
|
2096
|
-
}), a.apply(this, [
|
|
2096
|
+
}), a.apply(this, [c]);
|
|
2097
2097
|
}, () => {
|
|
2098
2098
|
s.CSSStyleDeclaration.prototype.setProperty = i, s.CSSStyleDeclaration.prototype.removeProperty = a;
|
|
2099
2099
|
};
|
|
2100
2100
|
}
|
|
2101
|
-
function
|
|
2102
|
-
const i = (
|
|
2103
|
-
const d = xe(
|
|
2101
|
+
function Nn({ mediaInteractionCb: e, blockClass: t, blockSelector: r, mirror: n, sampling: s }) {
|
|
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;
|
|
2107
2107
|
e({
|
|
2108
|
-
type:
|
|
2108
|
+
type: c,
|
|
2109
2109
|
id: n.getId(d),
|
|
2110
2110
|
currentTime: l,
|
|
2111
2111
|
volume: u,
|
|
@@ -2120,49 +2120,49 @@ function _n({ mediaInteractionCb: e, blockClass: t, blockSelector: r, mirror: n,
|
|
|
2120
2120
|
G("ratechange", i(4))
|
|
2121
2121
|
];
|
|
2122
2122
|
return () => {
|
|
2123
|
-
a.forEach((
|
|
2123
|
+
a.forEach((c) => c());
|
|
2124
2124
|
};
|
|
2125
2125
|
}
|
|
2126
|
-
function
|
|
2126
|
+
function Mn({ fontCb: e, doc: t }) {
|
|
2127
2127
|
const r = t.defaultView;
|
|
2128
2128
|
if (!r)
|
|
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 a = he(t.fonts, "add", function(
|
|
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),
|
|
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
2151
|
}), n.push(a), () => {
|
|
2152
|
-
n.forEach((
|
|
2152
|
+
n.forEach((c) => c());
|
|
2153
2153
|
};
|
|
2154
2154
|
}
|
|
2155
|
-
function
|
|
2155
|
+
function On(e) {
|
|
2156
2156
|
const { doc: t, mirror: r, blockClass: n, blockSelector: s, selectionCb: i } = e;
|
|
2157
2157
|
let a = !0;
|
|
2158
|
-
const
|
|
2159
|
-
const
|
|
2160
|
-
if (!
|
|
2158
|
+
const c = () => {
|
|
2159
|
+
const o = t.getSelection();
|
|
2160
|
+
if (!o || a && (o != null && o.isCollapsed))
|
|
2161
2161
|
return;
|
|
2162
|
-
a =
|
|
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,
|
|
@@ -2172,10 +2172,10 @@ function Mn(e) {
|
|
|
2172
2172
|
}
|
|
2173
2173
|
i({ ranges: d });
|
|
2174
2174
|
};
|
|
2175
|
-
return
|
|
2175
|
+
return c(), G("selectionchange", c);
|
|
2176
2176
|
}
|
|
2177
|
-
function
|
|
2178
|
-
const { mutationCb: r, mousemoveCb: n, mouseInteractionCb: s, scrollCb: i, viewportResizeCb: a, inputCb:
|
|
2177
|
+
function Ln(e, t) {
|
|
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) => {
|
|
@@ -2187,9 +2187,9 @@ function On(e, t) {
|
|
|
2187
2187
|
}, e.viewportResizeCb = (...p) => {
|
|
2188
2188
|
t.viewportResize && t.viewportResize(...p), a(...p);
|
|
2189
2189
|
}, e.inputCb = (...p) => {
|
|
2190
|
-
t.input && t.input(...p),
|
|
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) => {
|
|
@@ -2202,20 +2202,20 @@ function On(e, t) {
|
|
|
2202
2202
|
t.selection && t.selection(...p), f(...p);
|
|
2203
2203
|
};
|
|
2204
2204
|
}
|
|
2205
|
-
function
|
|
2205
|
+
function Fn(e, t = {}) {
|
|
2206
2206
|
const r = e.doc.defaultView;
|
|
2207
2207
|
if (!r)
|
|
2208
2208
|
return () => {
|
|
2209
2209
|
};
|
|
2210
|
-
|
|
2211
|
-
const n =
|
|
2210
|
+
Ln(e, t);
|
|
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
|
-
}), f = e.collectFonts ?
|
|
2214
|
-
}, p =
|
|
2213
|
+
}), f = e.collectFonts ? Mn(e) : () => {
|
|
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(), a(),
|
|
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 {
|
|
@@ -2224,8 +2224,8 @@ class Mt {
|
|
|
2224
2224
|
}
|
|
2225
2225
|
getId(t, r, n, s) {
|
|
2226
2226
|
const i = n || this.getIdToRemoteIdMap(t), a = s || this.getRemoteIdToIdMap(t);
|
|
2227
|
-
let
|
|
2228
|
-
return
|
|
2227
|
+
let c = i.get(r);
|
|
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);
|
|
@@ -2258,9 +2258,9 @@ class Mt {
|
|
|
2258
2258
|
return r || (r = /* @__PURE__ */ new Map(), this.iframeRemoteIdToIdMap.set(t, r)), r;
|
|
2259
2259
|
}
|
|
2260
2260
|
}
|
|
2261
|
-
class
|
|
2261
|
+
class xn {
|
|
2262
2262
|
constructor(t) {
|
|
2263
|
-
this.iframes = /* @__PURE__ */ new WeakMap(), this.crossOriginIframeMap = /* @__PURE__ */ new WeakMap(), this.crossOriginIframeMirror = new Mt(
|
|
2263
|
+
this.iframes = /* @__PURE__ */ new WeakMap(), this.crossOriginIframeMap = /* @__PURE__ */ new WeakMap(), this.crossOriginIframeMirror = new Mt(Yt), this.mutationCb = t.mutationCb, this.wrappedEmit = t.wrappedEmit, this.stylesheetManager = t.stylesheetManager, this.recordCrossOriginIframes = t.recordCrossOriginIframes, this.crossOriginIframeStyleMirror = new Mt(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)), this.mirror = t.mirror, this.recordCrossOriginIframes && window.addEventListener("message", this.handleMessage.bind(this));
|
|
2264
2264
|
}
|
|
2265
2265
|
addIframe(t) {
|
|
2266
2266
|
this.iframes.set(t, !0), t.contentWindow && this.crossOriginIframeMap.set(t.contentWindow, t);
|
|
@@ -2388,7 +2388,7 @@ class Fn {
|
|
|
2388
2388
|
});
|
|
2389
2389
|
}
|
|
2390
2390
|
}
|
|
2391
|
-
class
|
|
2391
|
+
class Bn {
|
|
2392
2392
|
constructor(t) {
|
|
2393
2393
|
this.shadowDoms = /* @__PURE__ */ new WeakSet(), this.restorePatches = [], this.mutationCb = t.mutationCb, this.scrollCb = t.scrollCb, this.bypassOptions = t.bypassOptions, this.mirror = t.mirror;
|
|
2394
2394
|
const r = this;
|
|
@@ -2400,8 +2400,8 @@ class xn {
|
|
|
2400
2400
|
}));
|
|
2401
2401
|
}
|
|
2402
2402
|
addShadowRoot(t, r) {
|
|
2403
|
-
Me(t) && (this.shadowDoms.has(t) || (this.shadowDoms.add(t),
|
|
2404
|
-
t.adoptedStyleSheets && t.adoptedStyleSheets.length > 0 && this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets, this.mirror.getId(t.host)),
|
|
2403
|
+
Me(t) && (this.shadowDoms.has(t) || (this.shadowDoms.add(t), pr(Object.assign(Object.assign({}, this.bypassOptions), { doc: r, mutationCb: this.mutationCb, mirror: this.mirror, shadowDomManager: this }), t), hr(Object.assign(Object.assign({}, this.bypassOptions), { scrollCb: this.scrollCb, doc: t, mirror: this.mirror })), setTimeout(() => {
|
|
2404
|
+
t.adoptedStyleSheets && t.adoptedStyleSheets.length > 0 && this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets, this.mirror.getId(t.host)), fr({
|
|
2405
2405
|
mirror: this.mirror,
|
|
2406
2406
|
stylesheetManager: this.bypassOptions.stylesheetManager
|
|
2407
2407
|
}, t);
|
|
@@ -2444,21 +2444,21 @@ function Dn(e, t) {
|
|
|
2444
2444
|
t.indexOf(n[s]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[s]) && (r[n[s]] = e[n[s]]);
|
|
2445
2445
|
return r;
|
|
2446
2446
|
}
|
|
2447
|
-
function
|
|
2447
|
+
function Un(e, t, r, n) {
|
|
2448
2448
|
function s(i) {
|
|
2449
2449
|
return i instanceof r ? i : new r(function(a) {
|
|
2450
2450
|
a(i);
|
|
2451
2451
|
});
|
|
2452
2452
|
}
|
|
2453
2453
|
return new (r || (r = Promise))(function(i, a) {
|
|
2454
|
-
function
|
|
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) {
|
|
@@ -2466,35 +2466,35 @@ function Bn(e, t, r, n) {
|
|
|
2466
2466
|
}
|
|
2467
2467
|
}
|
|
2468
2468
|
function d(l) {
|
|
2469
|
-
l.done ? i(l.value) : s(l.value).then(
|
|
2469
|
+
l.done ? i(l.value) : s(l.value).then(c, o);
|
|
2470
2470
|
}
|
|
2471
2471
|
d((n = n.apply(e, [])).next());
|
|
2472
2472
|
});
|
|
2473
2473
|
}
|
|
2474
|
-
var we = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",
|
|
2475
|
-
for (var
|
|
2476
|
-
|
|
2477
|
-
var
|
|
2474
|
+
var we = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", Wn = typeof Uint8Array > "u" ? [] : new Uint8Array(256);
|
|
2475
|
+
for (var Be = 0; Be < we.length; Be++)
|
|
2476
|
+
Wn[we.charCodeAt(Be)] = Be;
|
|
2477
|
+
var zn = function(e) {
|
|
2478
2478
|
var t = new Uint8Array(e), r, n = t.length, s = "";
|
|
2479
2479
|
for (r = 0; r < n; r += 3)
|
|
2480
2480
|
s += we[t[r] >> 2], s += we[(t[r] & 3) << 4 | t[r + 1] >> 4], s += we[(t[r + 1] & 15) << 2 | t[r + 2] >> 6], s += we[t[r + 2] & 63];
|
|
2481
2481
|
return n % 3 === 2 ? s = s.substring(0, s.length - 1) + "=" : n % 3 === 1 && (s = s.substring(0, s.length - 2) + "=="), s;
|
|
2482
2482
|
};
|
|
2483
2483
|
const Ot = /* @__PURE__ */ new Map();
|
|
2484
|
-
function
|
|
2484
|
+
function Gn(e, t) {
|
|
2485
2485
|
let r = Ot.get(e);
|
|
2486
2486
|
return r || (r = /* @__PURE__ */ new Map(), Ot.set(e, r)), r.has(t) || r.set(t, []), r.get(t);
|
|
2487
2487
|
}
|
|
2488
|
-
const
|
|
2489
|
-
if (!e || !(
|
|
2488
|
+
const mr = (e, t, r) => {
|
|
2489
|
+
if (!e || !(yr(e, t) || typeof e == "object"))
|
|
2490
2490
|
return;
|
|
2491
|
-
const n = e.constructor.name, s =
|
|
2491
|
+
const n = e.constructor.name, s = Gn(r, n);
|
|
2492
2492
|
let i = s.indexOf(e);
|
|
2493
2493
|
return i === -1 && (i = s.length, s.push(e)), i;
|
|
2494
2494
|
};
|
|
2495
|
-
function
|
|
2495
|
+
function De(e, t, r) {
|
|
2496
2496
|
if (e instanceof Array)
|
|
2497
|
-
return e.map((n) =>
|
|
2497
|
+
return e.map((n) => De(n, t, r));
|
|
2498
2498
|
if (e === null)
|
|
2499
2499
|
return e;
|
|
2500
2500
|
if (e instanceof Float32Array || e instanceof Float64Array || e instanceof Int32Array || e instanceof Uint32Array || e instanceof Uint8Array || e instanceof Uint16Array || e instanceof Int16Array || e instanceof Int8Array || e instanceof Uint8ClampedArray)
|
|
@@ -2503,7 +2503,7 @@ function Be(e, t, r) {
|
|
|
2503
2503
|
args: [Object.values(e)]
|
|
2504
2504
|
};
|
|
2505
2505
|
if (e instanceof ArrayBuffer) {
|
|
2506
|
-
const n = e.constructor.name, s =
|
|
2506
|
+
const n = e.constructor.name, s = zn(e);
|
|
2507
2507
|
return {
|
|
2508
2508
|
rr_type: n,
|
|
2509
2509
|
base64: s
|
|
@@ -2513,7 +2513,7 @@ function Be(e, t, r) {
|
|
|
2513
2513
|
return {
|
|
2514
2514
|
rr_type: e.constructor.name,
|
|
2515
2515
|
args: [
|
|
2516
|
-
|
|
2516
|
+
De(e.buffer, t, r),
|
|
2517
2517
|
e.byteOffset,
|
|
2518
2518
|
e.byteLength
|
|
2519
2519
|
]
|
|
@@ -2534,10 +2534,10 @@ function Be(e, t, r) {
|
|
|
2534
2534
|
if (e instanceof ImageData)
|
|
2535
2535
|
return {
|
|
2536
2536
|
rr_type: e.constructor.name,
|
|
2537
|
-
args: [
|
|
2537
|
+
args: [De(e.data, t, r), e.width, e.height]
|
|
2538
2538
|
};
|
|
2539
|
-
if (
|
|
2540
|
-
const n = e.constructor.name, s =
|
|
2539
|
+
if (yr(e, t) || typeof e == "object") {
|
|
2540
|
+
const n = e.constructor.name, s = mr(e, t, r);
|
|
2541
2541
|
return {
|
|
2542
2542
|
rr_type: n,
|
|
2543
2543
|
index: s
|
|
@@ -2547,7 +2547,7 @@ function Be(e, t, r) {
|
|
|
2547
2547
|
}
|
|
2548
2548
|
return e;
|
|
2549
2549
|
}
|
|
2550
|
-
const
|
|
2550
|
+
const gr = (e, t, r) => [...e].map((n) => De(n, t, r)), yr = (e, t) => !![
|
|
2551
2551
|
"WebGLActiveInfo",
|
|
2552
2552
|
"WebGLBuffer",
|
|
2553
2553
|
"WebGLFramebuffer",
|
|
@@ -2560,27 +2560,27 @@ const mr = (e, t, r) => [...e].map((n) => Be(n, t, r)), gr = (e, t) => !![
|
|
|
2560
2560
|
"WebGLVertexArrayObject",
|
|
2561
2561
|
"WebGLVertexArrayObjectOES"
|
|
2562
2562
|
].filter((s) => typeof t[s] == "function").find((s) => e instanceof t[s]);
|
|
2563
|
-
function
|
|
2563
|
+
function Kn(e, t, r, n) {
|
|
2564
2564
|
const s = [], i = Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);
|
|
2565
2565
|
for (const a of i)
|
|
2566
2566
|
try {
|
|
2567
2567
|
if (typeof t.CanvasRenderingContext2D.prototype[a] != "function")
|
|
2568
2568
|
continue;
|
|
2569
|
-
const
|
|
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
|
-
const l =
|
|
2572
|
+
const l = gr([...d], t, this);
|
|
2573
2573
|
e(this.canvas, {
|
|
2574
2574
|
type: ke["2D"],
|
|
2575
2575
|
property: a,
|
|
2576
2576
|
args: l
|
|
2577
2577
|
});
|
|
2578
|
-
}, 0),
|
|
2578
|
+
}, 0), o.apply(this, d);
|
|
2579
2579
|
};
|
|
2580
2580
|
});
|
|
2581
|
-
s.push(
|
|
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"],
|
|
@@ -2590,7 +2590,7 @@ function Gn(e, t, r, n) {
|
|
|
2590
2590
|
});
|
|
2591
2591
|
}
|
|
2592
2592
|
});
|
|
2593
|
-
s.push(
|
|
2593
|
+
s.push(o);
|
|
2594
2594
|
}
|
|
2595
2595
|
return () => {
|
|
2596
2596
|
s.forEach((a) => a());
|
|
@@ -2600,8 +2600,8 @@ 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(a, ...
|
|
2604
|
-
return K(this, t, r, !0) || "__context" in this || (this.__context = a), i.apply(this, [a, ...
|
|
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);
|
|
@@ -2613,8 +2613,8 @@ function Lt(e, t, r) {
|
|
|
2613
2613
|
};
|
|
2614
2614
|
}
|
|
2615
2615
|
function Ft(e, t, r, n, s, i, a) {
|
|
2616
|
-
const
|
|
2617
|
-
for (const d of
|
|
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, a) {
|
|
|
2627
2627
|
const l = he(e, d, function(u) {
|
|
2628
2628
|
return function(...h) {
|
|
2629
2629
|
const f = u.apply(this, h);
|
|
2630
|
-
if (
|
|
2631
|
-
const p =
|
|
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
|
|
@@ -2638,7 +2638,7 @@ function Ft(e, t, r, n, s, i, a) {
|
|
|
2638
2638
|
return f;
|
|
2639
2639
|
};
|
|
2640
2640
|
});
|
|
2641
|
-
|
|
2641
|
+
c.push(l);
|
|
2642
2642
|
} catch {
|
|
2643
2643
|
const u = qe(e, d, {
|
|
2644
2644
|
set(h) {
|
|
@@ -2650,63 +2650,63 @@ function Ft(e, t, r, n, s, i, a) {
|
|
|
2650
2650
|
});
|
|
2651
2651
|
}
|
|
2652
2652
|
});
|
|
2653
|
-
|
|
2653
|
+
c.push(u);
|
|
2654
2654
|
}
|
|
2655
|
-
return
|
|
2655
|
+
return c;
|
|
2656
2656
|
}
|
|
2657
|
-
function
|
|
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
2660
|
i.forEach((a) => a());
|
|
2661
2661
|
};
|
|
2662
2662
|
}
|
|
2663
|
-
var
|
|
2663
|
+
var Ir = null;
|
|
2664
2664
|
try {
|
|
2665
|
-
var
|
|
2666
|
-
|
|
2665
|
+
var Pn = typeof module < "u" && typeof module.require == "function" && module.require("worker_threads") || typeof __non_webpack_require__ == "function" && __non_webpack_require__("worker_threads") || typeof require == "function" && require("worker_threads");
|
|
2666
|
+
Ir = Pn.Worker;
|
|
2667
2667
|
} catch {
|
|
2668
2668
|
}
|
|
2669
|
-
function
|
|
2669
|
+
function Zn(e, t) {
|
|
2670
2670
|
return Buffer.from(e, "base64").toString("utf8");
|
|
2671
2671
|
}
|
|
2672
|
-
function
|
|
2673
|
-
var n =
|
|
2672
|
+
function Hn(e, t, r) {
|
|
2673
|
+
var n = Zn(e), s = n.indexOf(`
|
|
2674
2674
|
`, 10) + 1, i = n.substring(s) + "";
|
|
2675
|
-
return function(
|
|
2676
|
-
return new
|
|
2675
|
+
return function(c) {
|
|
2676
|
+
return new Ir(i, Object.assign({}, c, { eval: !0 }));
|
|
2677
2677
|
};
|
|
2678
2678
|
}
|
|
2679
|
-
function
|
|
2679
|
+
function jn(e, t) {
|
|
2680
2680
|
var r = atob(e);
|
|
2681
2681
|
return r;
|
|
2682
2682
|
}
|
|
2683
|
-
function
|
|
2684
|
-
var n =
|
|
2683
|
+
function Jn(e, t, r) {
|
|
2684
|
+
var n = jn(e), s = n.indexOf(`
|
|
2685
2685
|
`, 10) + 1, i = n.substring(s) + "", a = new Blob([i], { type: "application/javascript" });
|
|
2686
2686
|
return URL.createObjectURL(a);
|
|
2687
2687
|
}
|
|
2688
|
-
function
|
|
2688
|
+
function qn(e, t, r) {
|
|
2689
2689
|
var n;
|
|
2690
2690
|
return function(i) {
|
|
2691
|
-
return n = n ||
|
|
2691
|
+
return n = n || Jn(e), new Worker(n, i);
|
|
2692
2692
|
};
|
|
2693
2693
|
}
|
|
2694
|
-
var
|
|
2695
|
-
function
|
|
2696
|
-
return
|
|
2694
|
+
var Yn = Object.prototype.toString.call(typeof process < "u" ? process : 0) === "[object process]";
|
|
2695
|
+
function Xn() {
|
|
2696
|
+
return Yn;
|
|
2697
2697
|
}
|
|
2698
|
-
function
|
|
2699
|
-
return
|
|
2698
|
+
function Qn(e, t, r) {
|
|
2699
|
+
return Xn() ? Hn(e) : qn(e);
|
|
2700
2700
|
}
|
|
2701
|
-
var
|
|
2702
|
-
class
|
|
2701
|
+
var $n = Qn("Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwooZnVuY3Rpb24gKCkgewogICAgJ3VzZSBzdHJpY3QnOwoKICAgIC8qISAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg0KICAgIENvcHlyaWdodCAoYykgTWljcm9zb2Z0IENvcnBvcmF0aW9uLg0KDQogICAgUGVybWlzc2lvbiB0byB1c2UsIGNvcHksIG1vZGlmeSwgYW5kL29yIGRpc3RyaWJ1dGUgdGhpcyBzb2Z0d2FyZSBmb3IgYW55DQogICAgcHVycG9zZSB3aXRoIG9yIHdpdGhvdXQgZmVlIGlzIGhlcmVieSBncmFudGVkLg0KDQogICAgVEhFIFNPRlRXQVJFIElTIFBST1ZJREVEICJBUyBJUyIgQU5EIFRIRSBBVVRIT1IgRElTQ0xBSU1TIEFMTCBXQVJSQU5USUVTIFdJVEgNCiAgICBSRUdBUkQgVE8gVEhJUyBTT0ZUV0FSRSBJTkNMVURJTkcgQUxMIElNUExJRUQgV0FSUkFOVElFUyBPRiBNRVJDSEFOVEFCSUxJVFkNCiAgICBBTkQgRklUTkVTUy4gSU4gTk8gRVZFTlQgU0hBTEwgVEhFIEFVVEhPUiBCRSBMSUFCTEUgRk9SIEFOWSBTUEVDSUFMLCBESVJFQ1QsDQogICAgSU5ESVJFQ1QsIE9SIENPTlNFUVVFTlRJQUwgREFNQUdFUyBPUiBBTlkgREFNQUdFUyBXSEFUU09FVkVSIFJFU1VMVElORyBGUk9NDQogICAgTE9TUyBPRiBVU0UsIERBVEEgT1IgUFJPRklUUywgV0hFVEhFUiBJTiBBTiBBQ1RJT04gT0YgQ09OVFJBQ1QsIE5FR0xJR0VOQ0UgT1INCiAgICBPVEhFUiBUT1JUSU9VUyBBQ1RJT04sIEFSSVNJTkcgT1VUIE9GIE9SIElOIENPTk5FQ1RJT04gV0lUSCBUSEUgVVNFIE9SDQogICAgUEVSRk9STUFOQ0UgT0YgVEhJUyBTT0ZUV0FSRS4NCiAgICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLw0KDQogICAgZnVuY3Rpb24gX19hd2FpdGVyKHRoaXNBcmcsIF9hcmd1bWVudHMsIFAsIGdlbmVyYXRvcikgew0KICAgICAgICBmdW5jdGlvbiBhZG9wdCh2YWx1ZSkgeyByZXR1cm4gdmFsdWUgaW5zdGFuY2VvZiBQID8gdmFsdWUgOiBuZXcgUChmdW5jdGlvbiAocmVzb2x2ZSkgeyByZXNvbHZlKHZhbHVlKTsgfSk7IH0NCiAgICAgICAgcmV0dXJuIG5ldyAoUCB8fCAoUCA9IFByb21pc2UpKShmdW5jdGlvbiAocmVzb2x2ZSwgcmVqZWN0KSB7DQogICAgICAgICAgICBmdW5jdGlvbiBmdWxmaWxsZWQodmFsdWUpIHsgdHJ5IHsgc3RlcChnZW5lcmF0b3IubmV4dCh2YWx1ZSkpOyB9IGNhdGNoIChlKSB7IHJlamVjdChlKTsgfSB9DQogICAgICAgICAgICBmdW5jdGlvbiByZWplY3RlZCh2YWx1ZSkgeyB0cnkgeyBzdGVwKGdlbmVyYXRvclsidGhyb3ciXSh2YWx1ZSkpOyB9IGNhdGNoIChlKSB7IHJlamVjdChlKTsgfSB9DQogICAgICAgICAgICBmdW5jdGlvbiBzdGVwKHJlc3VsdCkgeyByZXN1bHQuZG9uZSA/IHJlc29sdmUocmVzdWx0LnZhbHVlKSA6IGFkb3B0KHJlc3VsdC52YWx1ZSkudGhlbihmdWxmaWxsZWQsIHJlamVjdGVkKTsgfQ0KICAgICAgICAgICAgc3RlcCgoZ2VuZXJhdG9yID0gZ2VuZXJhdG9yLmFwcGx5KHRoaXNBcmcsIF9hcmd1bWVudHMgfHwgW10pKS5uZXh0KCkpOw0KICAgICAgICB9KTsNCiAgICB9CgogICAgLyoKICAgICAqIGJhc2U2NC1hcnJheWJ1ZmZlciAxLjAuMSA8aHR0cHM6Ly9naXRodWIuY29tL25pa2xhc3ZoL2Jhc2U2NC1hcnJheWJ1ZmZlcj4KICAgICAqIENvcHlyaWdodCAoYykgMjAyMSBOaWtsYXMgdm9uIEhlcnR6ZW4gPGh0dHBzOi8vaGVydHplbi5jb20+CiAgICAgKiBSZWxlYXNlZCB1bmRlciBNSVQgTGljZW5zZQogICAgICovCiAgICB2YXIgY2hhcnMgPSAnQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyc7CiAgICAvLyBVc2UgYSBsb29rdXAgdGFibGUgdG8gZmluZCB0aGUgaW5kZXguCiAgICB2YXIgbG9va3VwID0gdHlwZW9mIFVpbnQ4QXJyYXkgPT09ICd1bmRlZmluZWQnID8gW10gOiBuZXcgVWludDhBcnJheSgyNTYpOwogICAgZm9yICh2YXIgaSA9IDA7IGkgPCBjaGFycy5sZW5ndGg7IGkrKykgewogICAgICAgIGxvb2t1cFtjaGFycy5jaGFyQ29kZUF0KGkpXSA9IGk7CiAgICB9CiAgICB2YXIgZW5jb2RlID0gZnVuY3Rpb24gKGFycmF5YnVmZmVyKSB7CiAgICAgICAgdmFyIGJ5dGVzID0gbmV3IFVpbnQ4QXJyYXkoYXJyYXlidWZmZXIpLCBpLCBsZW4gPSBieXRlcy5sZW5ndGgsIGJhc2U2NCA9ICcnOwogICAgICAgIGZvciAoaSA9IDA7IGkgPCBsZW47IGkgKz0gMykgewogICAgICAgICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaV0gPj4gMl07CiAgICAgICAgICAgIGJhc2U2NCArPSBjaGFyc1soKGJ5dGVzW2ldICYgMykgPDwgNCkgfCAoYnl0ZXNbaSArIDFdID4+IDQpXTsKICAgICAgICAgICAgYmFzZTY0ICs9IGNoYXJzWygoYnl0ZXNbaSArIDFdICYgMTUpIDw8IDIpIHwgKGJ5dGVzW2kgKyAyXSA+PiA2KV07CiAgICAgICAgICAgIGJhc2U2NCArPSBjaGFyc1tieXRlc1tpICsgMl0gJiA2M107CiAgICAgICAgfQogICAgICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgICAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgJz0nOwogICAgICAgIH0KICAgICAgICBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgICAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgJz09JzsKICAgICAgICB9CiAgICAgICAgcmV0dXJuIGJhc2U2NDsKICAgIH07CgogICAgY29uc3QgbGFzdEJsb2JNYXAgPSBuZXcgTWFwKCk7DQogICAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gbmV3IE1hcCgpOw0KICAgIGZ1bmN0aW9uIGdldFRyYW5zcGFyZW50QmxvYkZvcih3aWR0aCwgaGVpZ2h0LCBkYXRhVVJMT3B0aW9ucykgew0KICAgICAgICByZXR1cm4gX19hd2FpdGVyKHRoaXMsIHZvaWQgMCwgdm9pZCAwLCBmdW5jdGlvbiogKCkgew0KICAgICAgICAgICAgY29uc3QgaWQgPSBgJHt3aWR0aH0tJHtoZWlnaHR9YDsNCiAgICAgICAgICAgIGlmICgnT2Zmc2NyZWVuQ2FudmFzJyBpbiBnbG9iYWxUaGlzKSB7DQogICAgICAgICAgICAgICAgaWYgKHRyYW5zcGFyZW50QmxvYk1hcC5oYXMoaWQpKQ0KICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJhbnNwYXJlbnRCbG9iTWFwLmdldChpZCk7DQogICAgICAgICAgICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsNCiAgICAgICAgICAgICAgICBvZmZzY3JlZW4uZ2V0Q29udGV4dCgnMmQnKTsNCiAgICAgICAgICAgICAgICBjb25zdCBibG9iID0geWllbGQgb2Zmc2NyZWVuLmNvbnZlcnRUb0Jsb2IoZGF0YVVSTE9wdGlvbnMpOw0KICAgICAgICAgICAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0geWllbGQgYmxvYi5hcnJheUJ1ZmZlcigpOw0KICAgICAgICAgICAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7DQogICAgICAgICAgICAgICAgdHJhbnNwYXJlbnRCbG9iTWFwLnNldChpZCwgYmFzZTY0KTsNCiAgICAgICAgICAgICAgICByZXR1cm4gYmFzZTY0Ow0KICAgICAgICAgICAgfQ0KICAgICAgICAgICAgZWxzZSB7DQogICAgICAgICAgICAgICAgcmV0dXJuICcnOw0KICAgICAgICAgICAgfQ0KICAgICAgICB9KTsNCiAgICB9DQogICAgY29uc3Qgd29ya2VyID0gc2VsZjsNCiAgICB3b3JrZXIub25tZXNzYWdlID0gZnVuY3Rpb24gKGUpIHsNCiAgICAgICAgcmV0dXJuIF9fYXdhaXRlcih0aGlzLCB2b2lkIDAsIHZvaWQgMCwgZnVuY3Rpb24qICgpIHsNCiAgICAgICAgICAgIGlmICgnT2Zmc2NyZWVuQ2FudmFzJyBpbiBnbG9iYWxUaGlzKSB7DQogICAgICAgICAgICAgICAgY29uc3QgeyBpZCwgYml0bWFwLCB3aWR0aCwgaGVpZ2h0LCBkYXRhVVJMT3B0aW9ucyB9ID0gZS5kYXRhOw0KICAgICAgICAgICAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zKTsNCiAgICAgICAgICAgICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOw0KICAgICAgICAgICAgICAgIGNvbnN0IGN0eCA9IG9mZnNjcmVlbi5nZXRDb250ZXh0KCcyZCcpOw0KICAgICAgICAgICAgICAgIGN0eC5kcmF3SW1hZ2UoYml0bWFwLCAwLCAwKTsNCiAgICAgICAgICAgICAgICBiaXRtYXAuY2xvc2UoKTsNCiAgICAgICAgICAgICAgICBjb25zdCBibG9iID0geWllbGQgb2Zmc2NyZWVuLmNvbnZlcnRUb0Jsb2IoZGF0YVVSTE9wdGlvbnMpOw0KICAgICAgICAgICAgICAgIGNvbnN0IHR5cGUgPSBibG9iLnR5cGU7DQogICAgICAgICAgICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSB5aWVsZCBibG9iLmFycmF5QnVmZmVyKCk7DQogICAgICAgICAgICAgICAgY29uc3QgYmFzZTY0ID0gZW5jb2RlKGFycmF5QnVmZmVyKTsNCiAgICAgICAgICAgICAgICBpZiAoIWxhc3RCbG9iTWFwLmhhcyhpZCkgJiYgKHlpZWxkIHRyYW5zcGFyZW50QmFzZTY0KSA9PT0gYmFzZTY0KSB7DQogICAgICAgICAgICAgICAgICAgIGxhc3RCbG9iTWFwLnNldChpZCwgYmFzZTY0KTsNCiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHdvcmtlci5wb3N0TWVzc2FnZSh7IGlkIH0pOw0KICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KQ0KICAgICAgICAgICAgICAgICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7DQogICAgICAgICAgICAgICAgd29ya2VyLnBvc3RNZXNzYWdlKHsNCiAgICAgICAgICAgICAgICAgICAgaWQsDQogICAgICAgICAgICAgICAgICAgIHR5cGUsDQogICAgICAgICAgICAgICAgICAgIGJhc2U2NCwNCiAgICAgICAgICAgICAgICAgICAgd2lkdGgsDQogICAgICAgICAgICAgICAgICAgIGhlaWdodCwNCiAgICAgICAgICAgICAgICB9KTsNCiAgICAgICAgICAgICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7DQogICAgICAgICAgICB9DQogICAgICAgICAgICBlbHNlIHsNCiAgICAgICAgICAgICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsNCiAgICAgICAgICAgIH0NCiAgICAgICAgfSk7DQogICAgfTsKCn0pKCk7Cgo=");
|
|
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: a, dataURLOptions:
|
|
2707
|
+
const { sampling: r = "all", win: n, blockClass: s, blockSelector: i, recordCanvas: a, dataURLOptions: c } = t;
|
|
2708
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
|
-
dataURLOptions:
|
|
2709
|
+
dataURLOptions: c
|
|
2710
2710
|
});
|
|
2711
2711
|
}
|
|
2712
2712
|
reset() {
|
|
@@ -2725,10 +2725,10 @@ class $n {
|
|
|
2725
2725
|
this.locked = !1;
|
|
2726
2726
|
}
|
|
2727
2727
|
initCanvasFPSObserver(t, r, n, s, i) {
|
|
2728
|
-
const a = Lt(r, n, s),
|
|
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
|
-
if (
|
|
2731
|
+
if (c.set(y, !1), !("base64" in p.data))
|
|
2732
2732
|
return;
|
|
2733
2733
|
const { base64: S, type: C, width: m, height: g } = p.data;
|
|
2734
2734
|
this.mutationCb({
|
|
@@ -2771,17 +2771,17 @@ class $n {
|
|
|
2771
2771
|
u = requestAnimationFrame(f);
|
|
2772
2772
|
return;
|
|
2773
2773
|
}
|
|
2774
|
-
l = p, h().forEach((y) =>
|
|
2774
|
+
l = p, h().forEach((y) => Un(this, void 0, void 0, function* () {
|
|
2775
2775
|
var S;
|
|
2776
2776
|
const C = this.mirror.getId(y);
|
|
2777
|
-
if (
|
|
2777
|
+
if (c.get(C))
|
|
2778
2778
|
return;
|
|
2779
|
-
if (
|
|
2779
|
+
if (c.set(C, !0), ["webgl", "webgl2"].includes(y.__context)) {
|
|
2780
2780
|
const g = y.getContext(y.__context);
|
|
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,
|
|
@@ -2796,7 +2796,7 @@ class $n {
|
|
|
2796
2796
|
}
|
|
2797
2797
|
initCanvasMutationObserver(t, r, n) {
|
|
2798
2798
|
this.startRAFTimestamping(), this.startPendingCanvasMutationFlusher();
|
|
2799
|
-
const s = Lt(t, r, n), i =
|
|
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
2801
|
s(), i(), a();
|
|
2802
2802
|
};
|
|
@@ -2826,9 +2826,9 @@ class $n {
|
|
|
2826
2826
|
this.mutationCb({ id: r, type: i, commands: s }), this.pendingCanvasMutations.delete(t);
|
|
2827
2827
|
}
|
|
2828
2828
|
}
|
|
2829
|
-
class
|
|
2829
|
+
class ts {
|
|
2830
2830
|
constructor(t) {
|
|
2831
|
-
this.trackedLinkElements = /* @__PURE__ */ new WeakSet(), this.styleMirror = new
|
|
2831
|
+
this.trackedLinkElements = /* @__PURE__ */ new WeakSet(), this.styleMirror = new Sn(), this.mutationCb = t.mutationCb, this.adoptedStyleSheetCb = t.adoptedStyleSheetCb;
|
|
2832
2832
|
}
|
|
2833
2833
|
attachLinkElement(t, r) {
|
|
2834
2834
|
"_cssText" in r.attributes && this.mutationCb({
|
|
@@ -2859,11 +2859,11 @@ class es {
|
|
|
2859
2859
|
a = this.styleMirror.getId(i);
|
|
2860
2860
|
else {
|
|
2861
2861
|
a = this.styleMirror.add(i);
|
|
2862
|
-
const
|
|
2862
|
+
const c = Array.from(i.rules || CSSRule);
|
|
2863
2863
|
s.push({
|
|
2864
2864
|
styleId: a,
|
|
2865
|
-
rules:
|
|
2866
|
-
rule:
|
|
2865
|
+
rules: c.map((o, d) => ({
|
|
2866
|
+
rule: Jt(o),
|
|
2867
2867
|
index: d
|
|
2868
2868
|
}))
|
|
2869
2869
|
});
|
|
@@ -2882,9 +2882,9 @@ function L(e) {
|
|
|
2882
2882
|
return Object.assign(Object.assign({}, e), { timestamp: Date.now() });
|
|
2883
2883
|
}
|
|
2884
2884
|
let _, Ue, $e, je = !1;
|
|
2885
|
-
const ne =
|
|
2886
|
-
function
|
|
2887
|
-
const { emit: t, checkoutEveryNms: r, checkoutEveryNth: n, blockClass: s = "rr-block", blockSelector: i = null, ignoreClass: a = "rr-ignore", maskTextClass:
|
|
2885
|
+
const ne = Jr();
|
|
2886
|
+
function Ee(e = {}) {
|
|
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 {
|
|
@@ -2924,7 +2924,7 @@ function Re(e = {}) {
|
|
|
2924
2924
|
headMetaAuthorship: h === "all",
|
|
2925
2925
|
headMetaDescKeywords: h === "all"
|
|
2926
2926
|
} : h || {};
|
|
2927
|
-
|
|
2927
|
+
Cn();
|
|
2928
2928
|
let ee, se = 0;
|
|
2929
2929
|
const ae = (I) => {
|
|
2930
2930
|
for (const W of H || [])
|
|
@@ -2967,10 +2967,10 @@ function Re(e = {}) {
|
|
|
2967
2967
|
})), N = (I) => _(L({
|
|
2968
2968
|
type: v.IncrementalSnapshot,
|
|
2969
2969
|
data: Object.assign({ source: b.AdoptedStyleSheet }, I)
|
|
2970
|
-
})), te = new
|
|
2970
|
+
})), te = new ts({
|
|
2971
2971
|
mutationCb: V,
|
|
2972
2972
|
adoptedStyleSheetCb: N
|
|
2973
|
-
}), ie = new
|
|
2973
|
+
}), ie = new xn({
|
|
2974
2974
|
mirror: ne,
|
|
2975
2975
|
mutationCb: V,
|
|
2976
2976
|
stylesheetManager: te,
|
|
@@ -2983,7 +2983,7 @@ function Re(e = {}) {
|
|
|
2983
2983
|
crossOriginIframeMirror: ie.crossOriginIframeMirror,
|
|
2984
2984
|
crossOriginIframeStyleMirror: ie.crossOriginIframeStyleMirror
|
|
2985
2985
|
});
|
|
2986
|
-
$e = new
|
|
2986
|
+
$e = new es({
|
|
2987
2987
|
recordCanvas: k,
|
|
2988
2988
|
mutationCb: oe,
|
|
2989
2989
|
win: window,
|
|
@@ -2993,21 +2993,21 @@ function Re(e = {}) {
|
|
|
2993
2993
|
sampling: C.canvas,
|
|
2994
2994
|
dataURLOptions: m
|
|
2995
2995
|
});
|
|
2996
|
-
const me = new
|
|
2996
|
+
const me = new Bn({
|
|
2997
2997
|
mutationCb: V,
|
|
2998
2998
|
scrollCb: q,
|
|
2999
2999
|
bypassOptions: {
|
|
3000
3000
|
blockClass: s,
|
|
3001
3001
|
blockSelector: i,
|
|
3002
|
-
maskTextClass:
|
|
3003
|
-
maskTextSelector:
|
|
3002
|
+
maskTextClass: c,
|
|
3003
|
+
maskTextSelector: o,
|
|
3004
3004
|
inlineStylesheet: d,
|
|
3005
3005
|
maskInputOptions: O,
|
|
3006
3006
|
dataURLOptions: m,
|
|
3007
3007
|
maskTextFn: p,
|
|
3008
3008
|
maskInputFn: f,
|
|
3009
3009
|
recordCanvas: k,
|
|
3010
|
-
inlineImages:
|
|
3010
|
+
inlineImages: E,
|
|
3011
3011
|
sampling: C,
|
|
3012
3012
|
slimDOMOptions: J,
|
|
3013
3013
|
iframeManager: ie,
|
|
@@ -3023,25 +3023,25 @@ function Re(e = {}) {
|
|
|
3023
3023
|
type: v.Meta,
|
|
3024
3024
|
data: {
|
|
3025
3025
|
href: window.location.href,
|
|
3026
|
-
width:
|
|
3027
|
-
height:
|
|
3026
|
+
width: er(),
|
|
3027
|
+
height: $t()
|
|
3028
3028
|
}
|
|
3029
3029
|
}), I), te.reset(), ue.forEach((z) => z.lock());
|
|
3030
|
-
const
|
|
3030
|
+
const Re = yn(document, {
|
|
3031
3031
|
mirror: ne,
|
|
3032
3032
|
blockClass: s,
|
|
3033
3033
|
blockSelector: i,
|
|
3034
|
-
maskTextClass:
|
|
3035
|
-
maskTextSelector:
|
|
3034
|
+
maskTextClass: c,
|
|
3035
|
+
maskTextSelector: o,
|
|
3036
3036
|
inlineStylesheet: d,
|
|
3037
3037
|
maskAllInputs: O,
|
|
3038
3038
|
maskTextFn: p,
|
|
3039
3039
|
slimDOM: J,
|
|
3040
3040
|
dataURLOptions: m,
|
|
3041
3041
|
recordCanvas: k,
|
|
3042
|
-
inlineImages:
|
|
3042
|
+
inlineImages: E,
|
|
3043
3043
|
onSerialize: (z) => {
|
|
3044
|
-
|
|
3044
|
+
nr(z, ne) && ie.addIframe(z), sr(z, ne) && te.trackLinkElement(z), ir(z) && me.addShadowRoot(z.shadowRoot, document);
|
|
3045
3045
|
},
|
|
3046
3046
|
onIframeLoad: (z, Ye) => {
|
|
3047
3047
|
ie.attachIframe(z, Ye), me.observeAttachShadow(z);
|
|
@@ -3051,12 +3051,12 @@ function Re(e = {}) {
|
|
|
3051
3051
|
},
|
|
3052
3052
|
keepIframeSrcFn: j
|
|
3053
3053
|
});
|
|
3054
|
-
if (!
|
|
3054
|
+
if (!Re)
|
|
3055
3055
|
return console.warn("Failed to snapshot the document");
|
|
3056
3056
|
_(L({
|
|
3057
3057
|
type: v.FullSnapshot,
|
|
3058
3058
|
data: {
|
|
3059
|
-
node:
|
|
3059
|
+
node: Re,
|
|
3060
3060
|
initialOffset: {
|
|
3061
3061
|
left: window.pageXOffset !== void 0 ? window.pageXOffset : (document == null ? void 0 : document.documentElement.scrollLeft) || ((P = (W = document == null ? void 0 : document.body) === null || W === void 0 ? void 0 : W.parentElement) === null || P === void 0 ? void 0 : P.scrollLeft) || ((T = document == null ? void 0 : document.body) === null || T === void 0 ? void 0 : T.scrollLeft) || 0,
|
|
3062
3062
|
top: window.pageYOffset !== void 0 ? window.pageYOffset : (document == null ? void 0 : document.documentElement.scrollTop) || ((A = (Y = document == null ? void 0 : document.body) === null || Y === void 0 ? void 0 : Y.parentElement) === null || A === void 0 ? void 0 : A.scrollTop) || ((Z = document == null ? void 0 : document.body) === null || Z === void 0 ? void 0 : Z.scrollTop) || 0
|
|
@@ -3074,7 +3074,7 @@ function Re(e = {}) {
|
|
|
3074
3074
|
}));
|
|
3075
3075
|
const W = (T) => {
|
|
3076
3076
|
var Y;
|
|
3077
|
-
return
|
|
3077
|
+
return Fn({
|
|
3078
3078
|
mutationCb: V,
|
|
3079
3079
|
mousemoveCb: (A, Z) => _(L({
|
|
3080
3080
|
type: v.IncrementalSnapshot,
|
|
@@ -3121,15 +3121,15 @@ function Re(e = {}) {
|
|
|
3121
3121
|
},
|
|
3122
3122
|
blockClass: s,
|
|
3123
3123
|
ignoreClass: a,
|
|
3124
|
-
maskTextClass:
|
|
3125
|
-
maskTextSelector:
|
|
3124
|
+
maskTextClass: c,
|
|
3125
|
+
maskTextSelector: o,
|
|
3126
3126
|
maskInputOptions: O,
|
|
3127
3127
|
inlineStylesheet: d,
|
|
3128
3128
|
sampling: C,
|
|
3129
3129
|
recordCanvas: k,
|
|
3130
|
-
inlineImages:
|
|
3130
|
+
inlineImages: E,
|
|
3131
3131
|
userTriggeredOnInput: x,
|
|
3132
|
-
collectFonts:
|
|
3132
|
+
collectFonts: B,
|
|
3133
3133
|
doc: T,
|
|
3134
3134
|
maskInputFn: f,
|
|
3135
3135
|
maskTextFn: p,
|
|
@@ -3174,7 +3174,7 @@ function Re(e = {}) {
|
|
|
3174
3174
|
console.warn(I);
|
|
3175
3175
|
}
|
|
3176
3176
|
}
|
|
3177
|
-
|
|
3177
|
+
Ee.addCustomEvent = (e, t) => {
|
|
3178
3178
|
if (!je)
|
|
3179
3179
|
throw new Error("please add custom event after start recording");
|
|
3180
3180
|
_(L({
|
|
@@ -3185,16 +3185,16 @@ Re.addCustomEvent = (e, t) => {
|
|
|
3185
3185
|
}
|
|
3186
3186
|
}));
|
|
3187
3187
|
};
|
|
3188
|
-
|
|
3188
|
+
Ee.freezePage = () => {
|
|
3189
3189
|
ue.forEach((e) => e.freeze());
|
|
3190
3190
|
};
|
|
3191
|
-
|
|
3191
|
+
Ee.takeFullSnapshot = (e) => {
|
|
3192
3192
|
if (!je)
|
|
3193
3193
|
throw new Error("please take full snapshot after start recording");
|
|
3194
3194
|
Ue(e);
|
|
3195
3195
|
};
|
|
3196
|
-
|
|
3197
|
-
const { addCustomEvent:
|
|
3196
|
+
Ee.mirror = ne;
|
|
3197
|
+
const { addCustomEvent: rs } = Ee;
|
|
3198
3198
|
class Ie {
|
|
3199
3199
|
constructor(t) {
|
|
3200
3200
|
this.fileName = t.fileName || "", this.functionName = t.functionName || "", this.lineNumber = t.lineNumber, this.columnNumber = t.columnNumber;
|
|
@@ -3204,7 +3204,7 @@ class Ie {
|
|
|
3204
3204
|
return this.functionName ? `${this.functionName} (${this.fileName}:${t}:${r})` : `${this.fileName}:${t}:${r}`;
|
|
3205
3205
|
}
|
|
3206
3206
|
}
|
|
3207
|
-
const
|
|
3207
|
+
const ns = /(^|@)\S+:\d+/, xt = /^\s*at .*(\S+:\d+|\(native\))/m, ss = /^(eval@)?(\[native code])?$/, Bt = {
|
|
3208
3208
|
parse: function(e) {
|
|
3209
3209
|
if (!e)
|
|
3210
3210
|
return [];
|
|
@@ -3233,10 +3233,10 @@ const rs = /(^|@)\S+:\d+/, xt = /^\s*at .*(\S+:\d+|\(native\))/m, ns = /^(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), a = this.extractLocation(s ? s[1] : i.pop()),
|
|
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
|
-
functionName:
|
|
3239
|
-
fileName:
|
|
3238
|
+
functionName: c,
|
|
3239
|
+
fileName: o,
|
|
3240
3240
|
lineNumber: a[1],
|
|
3241
3241
|
columnNumber: a[2]
|
|
3242
3242
|
});
|
|
@@ -3245,7 +3245,7 @@ const rs = /(^|@)\S+:\d+/, xt = /^\s*at .*(\S+:\d+|\(native\))/m, ns = /^(eval@)
|
|
|
3245
3245
|
parseFFOrSafari: function(e) {
|
|
3246
3246
|
return e.stack.split(`
|
|
3247
3247
|
`).filter(function(r) {
|
|
3248
|
-
return !r.match(
|
|
3248
|
+
return !r.match(ss);
|
|
3249
3249
|
}, this).map(function(r) {
|
|
3250
3250
|
if (r.indexOf(" > eval") > -1 && (r = r.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g, ":$1")), r.indexOf("@") === -1 && r.indexOf(":") === -1)
|
|
3251
3251
|
return new Ie({
|
|
@@ -3296,7 +3296,7 @@ const rs = /(^|@)\S+:\d+/, xt = /^\s*at .*(\S+:\d+|\(native\))/m, ns = /^(eval@)
|
|
|
3296
3296
|
parseOpera11: function(e) {
|
|
3297
3297
|
return e.stack.split(`
|
|
3298
3298
|
`).filter(function(r) {
|
|
3299
|
-
return !!r.match(
|
|
3299
|
+
return !!r.match(ns) && !r.match(/^Error created at/);
|
|
3300
3300
|
}, this).map(function(r) {
|
|
3301
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({
|
|
@@ -3308,7 +3308,7 @@ const rs = /(^|@)\S+:\d+/, xt = /^\s*at .*(\S+:\d+|\(native\))/m, ns = /^(eval@)
|
|
|
3308
3308
|
}, this);
|
|
3309
3309
|
}
|
|
3310
3310
|
};
|
|
3311
|
-
function
|
|
3311
|
+
function is(e) {
|
|
3312
3312
|
if (!e || !e.outerHTML)
|
|
3313
3313
|
return "";
|
|
3314
3314
|
let t = "";
|
|
@@ -3330,12 +3330,12 @@ function ss(e) {
|
|
|
3330
3330
|
function dt(e) {
|
|
3331
3331
|
return Object.prototype.toString.call(e) === "[object Object]";
|
|
3332
3332
|
}
|
|
3333
|
-
function
|
|
3333
|
+
function Cr(e, t) {
|
|
3334
3334
|
if (t === 0)
|
|
3335
3335
|
return !0;
|
|
3336
3336
|
const r = Object.keys(e);
|
|
3337
3337
|
for (const n of r)
|
|
3338
|
-
if (dt(e[n]) &&
|
|
3338
|
+
if (dt(e[n]) && Cr(e[n], t - 1))
|
|
3339
3339
|
return !0;
|
|
3340
3340
|
return !1;
|
|
3341
3341
|
}
|
|
@@ -3346,43 +3346,43 @@ function et(e, t) {
|
|
|
3346
3346
|
};
|
|
3347
3347
|
Object.assign(r, t);
|
|
3348
3348
|
const n = [], s = [];
|
|
3349
|
-
return JSON.stringify(e, function(
|
|
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,
|
|
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 a(
|
|
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 =
|
|
3365
|
-
Array.isArray(u) ? d[l] =
|
|
3363
|
+
for (const l in o) {
|
|
3364
|
+
const u = o[l];
|
|
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
|
-
function i(
|
|
3378
|
-
return !!(dt(
|
|
3377
|
+
function i(c) {
|
|
3378
|
+
return !!(dt(c) && Object.keys(c).length > r.numOfKeysLimit || typeof c == "function" || dt(c) && Cr(c, r.depthOfLimit));
|
|
3379
3379
|
}
|
|
3380
|
-
function a(
|
|
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
|
-
const
|
|
3385
|
+
const Dt = {
|
|
3386
3386
|
level: [
|
|
3387
3387
|
"assert",
|
|
3388
3388
|
"clear",
|
|
@@ -3407,38 +3407,38 @@ const Bt = {
|
|
|
3407
3407
|
lengthThreshold: 1e3,
|
|
3408
3408
|
logger: "console"
|
|
3409
3409
|
};
|
|
3410
|
-
function
|
|
3411
|
-
const n = r ? Object.assign({},
|
|
3410
|
+
function as(e, t, r) {
|
|
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
3417
|
let a = 0;
|
|
3418
|
-
const
|
|
3418
|
+
const c = [];
|
|
3419
3419
|
if (n.level.includes("error") && window) {
|
|
3420
3420
|
const d = (l) => {
|
|
3421
|
-
const u = l.message, h = l.error, f =
|
|
3421
|
+
const u = l.message, h = l.error, f = Bt.parse(h).map((y) => y.toString()), p = [et(u, n.stringifyOptions)];
|
|
3422
3422
|
e({
|
|
3423
3423
|
level: "error",
|
|
3424
3424
|
trace: f,
|
|
3425
3425
|
payload: p
|
|
3426
3426
|
});
|
|
3427
3427
|
};
|
|
3428
|
-
window.addEventListener("error", d),
|
|
3428
|
+
window.addEventListener("error", d), c.push(() => {
|
|
3429
3429
|
window && window.removeEventListener("error", d);
|
|
3430
3430
|
});
|
|
3431
3431
|
}
|
|
3432
3432
|
for (const d of n.level)
|
|
3433
|
-
|
|
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
|
-
const f =
|
|
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,
|
|
@@ -3457,11 +3457,11 @@ function is(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 {
|
|
3466
3466
|
return await e.json();
|
|
3467
3467
|
} catch {
|
|
@@ -3473,7 +3473,12 @@ class Wt extends Error {
|
|
|
3473
3473
|
super(t), this.name = "ReplayQuotaError";
|
|
3474
3474
|
}
|
|
3475
3475
|
}
|
|
3476
|
-
class
|
|
3476
|
+
class zt extends Error {
|
|
3477
|
+
constructor(t) {
|
|
3478
|
+
super(t), this.name = "ReplaySegmentTooLargeError";
|
|
3479
|
+
}
|
|
3480
|
+
}
|
|
3481
|
+
class ps {
|
|
3477
3482
|
constructor() {
|
|
3478
3483
|
this.config = null, this.currentBytes = 0, this.currentEvents = [], this.detachListeners = [], this.finalized = !1, this.flushInFlight = null, this.flushTimer = null, this.replaySessionId = null, this.segmentSequence = 0;
|
|
3479
3484
|
}
|
|
@@ -3482,13 +3487,13 @@ class us {
|
|
|
3482
3487
|
finalize: !0,
|
|
3483
3488
|
keepalive: !1,
|
|
3484
3489
|
reason: "reinit"
|
|
3485
|
-
}), !(typeof window > "u" || typeof document > "u") && (this.config = t, this.currentBytes = 0, this.currentEvents = [], this.detachListeners = [], this.finalized = !1, this.flushInFlight = null, this.replaySessionId = null, this.segmentSequence = 0, this.stopRecording =
|
|
3490
|
+
}), !(typeof window > "u" || typeof document > "u") && (this.config = t, this.currentBytes = 0, this.currentEvents = [], this.detachListeners = [], this.finalized = !1, this.flushInFlight = null, this.replaySessionId = null, this.segmentSequence = 0, this.stopRecording = Ee({
|
|
3486
3491
|
emit: (r) => this.pushEvent(r),
|
|
3487
3492
|
collectFonts: !0,
|
|
3488
3493
|
inlineStylesheet: !0,
|
|
3489
3494
|
maskAllInputs: t.maskAllInputs,
|
|
3490
3495
|
userTriggeredOnInput: !0,
|
|
3491
|
-
plugins: [
|
|
3496
|
+
plugins: [cs()]
|
|
3492
3497
|
}) || void 0, this.bindLifecycleListeners(), this.flushTimer = window.setInterval(() => {
|
|
3493
3498
|
this.flush("interval");
|
|
3494
3499
|
}, t.flushIntervalMs), this.addCustomEvent("session-start", {
|
|
@@ -3505,21 +3510,29 @@ class us {
|
|
|
3505
3510
|
if (!this.config || this.finalized)
|
|
3506
3511
|
return null;
|
|
3507
3512
|
const n = this.takePendingSegment();
|
|
3508
|
-
|
|
3513
|
+
if (!n)
|
|
3514
|
+
return null;
|
|
3515
|
+
let s = !1;
|
|
3516
|
+
return this.flushInFlight = this.uploadSegment(
|
|
3509
3517
|
n,
|
|
3510
3518
|
t,
|
|
3511
3519
|
(r == null ? void 0 : r.keepalive) === !0
|
|
3512
|
-
).
|
|
3513
|
-
message:
|
|
3520
|
+
).then((i) => (s = !0, i)).catch((i) => i instanceof Wt ? (this.currentBytes = 0, this.currentEvents = [], this.finalized = !0, this.stopCapture(), this.debug("Replay capture stopped by server quota", {
|
|
3521
|
+
message: i.message,
|
|
3514
3522
|
reason: t,
|
|
3515
3523
|
segmentId: n.segmentId
|
|
3524
|
+
}), null) : i instanceof zt ? (s = !0, this.debug("Replay event skipped because it exceeds the upload limit", {
|
|
3525
|
+
message: i.message,
|
|
3526
|
+
reason: t,
|
|
3527
|
+
segmentId: n.segmentId,
|
|
3528
|
+
sizeBytes: n.sizeBytes
|
|
3516
3529
|
}), null) : (this.restorePendingSegment(n), this.debug("Replay upload failed", {
|
|
3517
|
-
message:
|
|
3530
|
+
message: i instanceof Error ? i.message : String(i),
|
|
3518
3531
|
reason: t,
|
|
3519
3532
|
segmentId: n.segmentId
|
|
3520
3533
|
}), null)).finally(() => {
|
|
3521
|
-
this.flushInFlight = null;
|
|
3522
|
-
}), this.flushInFlight
|
|
3534
|
+
this.flushInFlight = null, s && this.currentEvents.length > 0 && this.flush("buffer-threshold");
|
|
3535
|
+
}), this.flushInFlight;
|
|
3523
3536
|
}
|
|
3524
3537
|
async finalize(t = "manual", r) {
|
|
3525
3538
|
if (!this.config || this.finalized)
|
|
@@ -3530,9 +3543,18 @@ class us {
|
|
|
3530
3543
|
session_id: this.config.sessionId,
|
|
3531
3544
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
3532
3545
|
}), this.stopCapture();
|
|
3533
|
-
|
|
3534
|
-
|
|
3535
|
-
|
|
3546
|
+
let n = null;
|
|
3547
|
+
for (; this.flushInFlight || this.currentEvents.length > 0; ) {
|
|
3548
|
+
const o = await this.flush(t, {
|
|
3549
|
+
keepalive: (r == null ? void 0 : r.keepalive) === !0
|
|
3550
|
+
});
|
|
3551
|
+
if (!o) {
|
|
3552
|
+
if (this.flushInFlight)
|
|
3553
|
+
continue;
|
|
3554
|
+
break;
|
|
3555
|
+
}
|
|
3556
|
+
n = o;
|
|
3557
|
+
}
|
|
3536
3558
|
if (this.replaySessionId = (n == null ? void 0 : n.replay_session_id) || this.replaySessionId, this.finalized = !0, !this.replaySessionId)
|
|
3537
3559
|
return this.config = null, null;
|
|
3538
3560
|
const s = this.config, i = `${s.apiUrl.replace(/\/+$/, "")}/v1/session-replays/public/finalize`, a = await fetch(i, {
|
|
@@ -3550,17 +3572,17 @@ class us {
|
|
|
3550
3572
|
},
|
|
3551
3573
|
keepalive: (r == null ? void 0 : r.keepalive) === !0,
|
|
3552
3574
|
method: "POST"
|
|
3553
|
-
}).catch((
|
|
3554
|
-
message:
|
|
3575
|
+
}).catch((o) => (this.debug("Replay finalize failed", {
|
|
3576
|
+
message: o instanceof Error ? o.message : String(o),
|
|
3555
3577
|
reason: t
|
|
3556
3578
|
}), null));
|
|
3557
3579
|
if (this.config = null, !a)
|
|
3558
3580
|
return null;
|
|
3559
|
-
const
|
|
3581
|
+
const c = await tt(
|
|
3560
3582
|
a
|
|
3561
3583
|
);
|
|
3562
|
-
return a.ok ? (
|
|
3563
|
-
message: (
|
|
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}`,
|
|
3564
3586
|
reason: t
|
|
3565
3587
|
}), null);
|
|
3566
3588
|
}
|
|
@@ -3576,7 +3598,7 @@ class us {
|
|
|
3576
3598
|
addCustomEvent(t, r) {
|
|
3577
3599
|
if (!(!this.config || this.finalized))
|
|
3578
3600
|
try {
|
|
3579
|
-
|
|
3601
|
+
rs(`${ls}:${t}`, r);
|
|
3580
3602
|
} catch (n) {
|
|
3581
3603
|
this.debug("Replay custom event skipped", {
|
|
3582
3604
|
message: n instanceof Error ? n.message : String(n),
|
|
@@ -3605,17 +3627,21 @@ class us {
|
|
|
3605
3627
|
(n = this.config) != null && n.debug && console.log("[FlashlogTracker][Replay]", t, r || {});
|
|
3606
3628
|
}
|
|
3607
3629
|
pushEvent(t) {
|
|
3608
|
-
!this.config || this.finalized || (this.currentEvents.push(t), this.currentBytes += this.estimateEventSize(t),
|
|
3630
|
+
!this.config || this.finalized || (this.currentEvents.push(t), this.currentBytes += this.estimateEventSize(t), this.isBufferAtThreshold() && this.flush("buffer-threshold"));
|
|
3631
|
+
}
|
|
3632
|
+
isBufferAtThreshold() {
|
|
3633
|
+
return !!(this.config && (this.currentBytes >= this.config.maxSegmentBytes || this.currentEvents.length >= this.config.maxSegmentEvents));
|
|
3609
3634
|
}
|
|
3610
3635
|
estimateEventSize(t) {
|
|
3611
3636
|
try {
|
|
3612
|
-
|
|
3637
|
+
const r = JSON.stringify(t);
|
|
3638
|
+
return typeof TextEncoder > "u" ? r.length : new TextEncoder().encode(r).byteLength;
|
|
3613
3639
|
} catch {
|
|
3614
3640
|
return 0;
|
|
3615
3641
|
}
|
|
3616
3642
|
}
|
|
3617
3643
|
nextSegmentId(t) {
|
|
3618
|
-
return `segment-${String(t).padStart(6, "0")}-${
|
|
3644
|
+
return `segment-${String(t).padStart(6, "0")}-${us()}`;
|
|
3619
3645
|
}
|
|
3620
3646
|
restorePendingSegment(t) {
|
|
3621
3647
|
this.currentEvents = [...t.events, ...this.currentEvents], this.currentBytes += t.sizeBytes, this.segmentSequence = Math.min(this.segmentSequence, t.sequenceNumber);
|
|
@@ -3625,22 +3651,31 @@ class us {
|
|
|
3625
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 = [];
|
|
3626
3652
|
}
|
|
3627
3653
|
takePendingSegment() {
|
|
3628
|
-
var
|
|
3629
|
-
if (this.currentEvents.length === 0)
|
|
3654
|
+
var i, a;
|
|
3655
|
+
if (!this.config || this.currentEvents.length === 0)
|
|
3630
3656
|
return null;
|
|
3631
|
-
|
|
3632
|
-
|
|
3633
|
-
|
|
3634
|
-
|
|
3635
|
-
|
|
3636
|
-
|
|
3637
|
-
|
|
3657
|
+
let t = 0, r = 0;
|
|
3658
|
+
for (const c of this.currentEvents) {
|
|
3659
|
+
const o = this.estimateEventSize(c), d = t > 0 && r + o > this.config.maxSegmentBytes, l = t >= this.config.maxSegmentEvents;
|
|
3660
|
+
if (d || l)
|
|
3661
|
+
break;
|
|
3662
|
+
t += 1, r += o;
|
|
3663
|
+
}
|
|
3664
|
+
const n = this.currentEvents.splice(0, Math.max(t, 1));
|
|
3665
|
+
t === 0 && (r = this.estimateEventSize(n[0]));
|
|
3666
|
+
const s = this.segmentSequence;
|
|
3667
|
+
return this.currentBytes = Math.max(0, this.currentBytes - r), this.segmentSequence += 1, {
|
|
3668
|
+
endedAt: Ut((i = n[n.length - 1]) == null ? void 0 : i.timestamp),
|
|
3669
|
+
eventCount: n.length,
|
|
3670
|
+
events: n,
|
|
3671
|
+
segmentId: this.nextSegmentId(s),
|
|
3672
|
+
sequenceNumber: s,
|
|
3638
3673
|
sizeBytes: r,
|
|
3639
|
-
startedAt: Ut((
|
|
3674
|
+
startedAt: Ut((a = n[0]) == null ? void 0 : a.timestamp)
|
|
3640
3675
|
};
|
|
3641
3676
|
}
|
|
3642
3677
|
async uploadSegment(t, r, n) {
|
|
3643
|
-
var
|
|
3678
|
+
var f;
|
|
3644
3679
|
if (!this.config)
|
|
3645
3680
|
throw new Error("Replay recorder is not configured");
|
|
3646
3681
|
const s = this.config, i = `${s.apiUrl.replace(
|
|
@@ -3648,7 +3683,7 @@ class us {
|
|
|
3648
3683
|
""
|
|
3649
3684
|
)}/v1/session-replays/public/segments/upload-url`, a = {
|
|
3650
3685
|
brand_id: s.brandId,
|
|
3651
|
-
content_type:
|
|
3686
|
+
content_type: ds,
|
|
3652
3687
|
device_id: s.deviceId,
|
|
3653
3688
|
ended_at: t.endedAt,
|
|
3654
3689
|
event_count: t.eventCount,
|
|
@@ -3659,7 +3694,7 @@ class us {
|
|
|
3659
3694
|
session_id: s.sessionId,
|
|
3660
3695
|
started_at: t.startedAt,
|
|
3661
3696
|
upload_reason: r
|
|
3662
|
-
},
|
|
3697
|
+
}, c = await fetch(i, {
|
|
3663
3698
|
body: JSON.stringify(a),
|
|
3664
3699
|
headers: {
|
|
3665
3700
|
"Content-Type": "application/json",
|
|
@@ -3667,14 +3702,14 @@ class us {
|
|
|
3667
3702
|
},
|
|
3668
3703
|
keepalive: n,
|
|
3669
3704
|
method: "POST"
|
|
3670
|
-
}),
|
|
3671
|
-
if (!
|
|
3672
|
-
const
|
|
3673
|
-
throw
|
|
3674
|
-
|
|
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
|
+
throw c.status === 403 && typeof y == "string" && y.startsWith("REPLAY_") ? new Wt(S || "Replay capture quota exhausted") : new Error(
|
|
3709
|
+
S || `Failed to create replay upload URL (${c.status})`
|
|
3675
3710
|
);
|
|
3676
3711
|
}
|
|
3677
|
-
this.replaySessionId =
|
|
3712
|
+
this.replaySessionId = o.data.replay_session_id || this.replaySessionId;
|
|
3678
3713
|
const d = JSON.stringify({
|
|
3679
3714
|
events: t.events,
|
|
3680
3715
|
meta: {
|
|
@@ -3692,27 +3727,32 @@ class us {
|
|
|
3692
3727
|
source: "flashlog-tracker-sdk",
|
|
3693
3728
|
type: "rrweb-event-segment",
|
|
3694
3729
|
version: 1
|
|
3695
|
-
}), l =
|
|
3730
|
+
}), l = typeof TextEncoder > "u" ? d.length : new TextEncoder().encode(d).byteLength;
|
|
3731
|
+
if (l > o.data.max_bytes)
|
|
3732
|
+
throw new zt(
|
|
3733
|
+
`Replay segment is ${l} bytes; upload limit is ${o.data.max_bytes} bytes`
|
|
3734
|
+
);
|
|
3735
|
+
const u = await fetch(o.data.upload_url, {
|
|
3696
3736
|
body: d,
|
|
3697
3737
|
headers: {
|
|
3698
3738
|
"Content-Type": "application/octet-stream"
|
|
3699
3739
|
},
|
|
3700
3740
|
keepalive: n,
|
|
3701
|
-
method:
|
|
3702
|
-
}),
|
|
3703
|
-
if (!
|
|
3741
|
+
method: o.data.method || "PUT"
|
|
3742
|
+
}), h = await tt(u);
|
|
3743
|
+
if (!u.ok || !(h != null && h.data))
|
|
3704
3744
|
throw new Error(
|
|
3705
|
-
(
|
|
3745
|
+
(h == null ? void 0 : h.message) || `Replay segment upload failed (${u.status})`
|
|
3706
3746
|
);
|
|
3707
3747
|
return this.debug("Replay segment uploaded", {
|
|
3708
|
-
objectKey:
|
|
3748
|
+
objectKey: h.data.object_key,
|
|
3709
3749
|
reason: r,
|
|
3710
|
-
segmentId:
|
|
3711
|
-
sequenceNumber:
|
|
3712
|
-
}),
|
|
3750
|
+
segmentId: h.data.segment_id,
|
|
3751
|
+
sequenceNumber: h.data.sequence_number
|
|
3752
|
+
}), h.data;
|
|
3713
3753
|
}
|
|
3714
3754
|
}
|
|
3715
|
-
const ht = () => typeof window < "u" && typeof window.localStorage < "u",
|
|
3755
|
+
const ht = () => typeof window < "u" && typeof window.localStorage < "u", Sr = () => {
|
|
3716
3756
|
if (typeof crypto < "u" && typeof crypto.randomUUID == "function")
|
|
3717
3757
|
return crypto.randomUUID();
|
|
3718
3758
|
const e = Date.now().toString(36), t = Math.random().toString(36).slice(2, 12);
|
|
@@ -3721,7 +3761,7 @@ const ht = () => typeof window < "u" && typeof window.localStorage < "u", Cr = (
|
|
|
3721
3761
|
ht() && window.localStorage.setItem(e, t);
|
|
3722
3762
|
}, Ae = (e) => {
|
|
3723
3763
|
ht() && window.localStorage.removeItem(e);
|
|
3724
|
-
},
|
|
3764
|
+
}, hs = (e) => {
|
|
3725
3765
|
const t = fe(e);
|
|
3726
3766
|
if (!t) return null;
|
|
3727
3767
|
try {
|
|
@@ -3729,32 +3769,32 @@ const ht = () => typeof window < "u" && typeof window.localStorage < "u", Cr = (
|
|
|
3729
3769
|
} catch {
|
|
3730
3770
|
return null;
|
|
3731
3771
|
}
|
|
3732
|
-
},
|
|
3772
|
+
}, fs = (e, t) => {
|
|
3733
3773
|
pe(e, JSON.stringify(t));
|
|
3734
|
-
},
|
|
3774
|
+
}, Gt = () => {
|
|
3735
3775
|
const e = fe(M.deviceId);
|
|
3736
3776
|
if (e) return e;
|
|
3737
|
-
const t =
|
|
3777
|
+
const t = Sr();
|
|
3738
3778
|
return pe(M.deviceId, t), t;
|
|
3739
|
-
},
|
|
3779
|
+
}, Kt = (e) => {
|
|
3740
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;
|
|
3741
3781
|
if (r && i)
|
|
3742
3782
|
return pe(M.sessionSeenAt, String(t)), r;
|
|
3743
|
-
const a =
|
|
3783
|
+
const a = Sr();
|
|
3744
3784
|
return pe(M.sessionId, a), pe(M.sessionSeenAt, String(t)), a;
|
|
3745
|
-
},
|
|
3785
|
+
}, ms = () => {
|
|
3746
3786
|
pe(M.sessionSeenAt, String(Date.now()));
|
|
3747
|
-
},
|
|
3787
|
+
}, gs = () => fe(M.sessionId), ys = () => fe(M.deviceId), Is = (e, t) => {
|
|
3748
3788
|
if (pe(M.accountId, e), t && Object.keys(t).length > 0) {
|
|
3749
|
-
|
|
3789
|
+
fs(M.accountTraits, t);
|
|
3750
3790
|
return;
|
|
3751
3791
|
}
|
|
3752
3792
|
Ae(M.accountTraits);
|
|
3753
|
-
},
|
|
3793
|
+
}, Cs = () => fe(M.accountId), Ss = () => hs(M.accountTraits), br = () => {
|
|
3754
3794
|
Ae(M.accountId), Ae(M.accountTraits);
|
|
3755
|
-
},
|
|
3756
|
-
Ae(M.sessionId), Ae(M.sessionSeenAt), Ae(M.deviceId),
|
|
3757
|
-
},
|
|
3795
|
+
}, bs = () => {
|
|
3796
|
+
Ae(M.sessionId), Ae(M.sessionSeenAt), Ae(M.deviceId), br();
|
|
3797
|
+
}, Vt = (e, t) => Array.from(/* @__PURE__ */ new Set([...e, ...t || []])), vs = (e) => {
|
|
3758
3798
|
var t, r;
|
|
3759
3799
|
return {
|
|
3760
3800
|
apiUrl: ((t = e == null ? void 0 : e.apiUrl) == null ? void 0 : t.trim()) || w.apiUrl,
|
|
@@ -3771,8 +3811,8 @@ const ht = () => typeof window < "u" && typeof window.localStorage < "u", Cr = (
|
|
|
3771
3811
|
ignoredUrls: (e == null ? void 0 : e.ignoredUrls) || w.ignoredUrls,
|
|
3772
3812
|
captureRequestBody: (e == null ? void 0 : e.captureRequestBody) ?? w.captureRequestBody,
|
|
3773
3813
|
captureResponseBody: (e == null ? void 0 : e.captureResponseBody) ?? w.captureResponseBody,
|
|
3774
|
-
redactKeys:
|
|
3775
|
-
redactUrlParams:
|
|
3814
|
+
redactKeys: Vt(w.redactKeys, e == null ? void 0 : e.redactKeys),
|
|
3815
|
+
redactUrlParams: Vt(w.redactUrlParams, e == null ? void 0 : e.redactUrlParams),
|
|
3776
3816
|
propagateTraceHeaders: (e == null ? void 0 : e.propagateTraceHeaders) ?? w.propagateTraceHeaders,
|
|
3777
3817
|
traceOrigins: (e == null ? void 0 : e.traceOrigins) || w.traceOrigins,
|
|
3778
3818
|
traceHeaderName: ((r = e == null ? void 0 : e.traceHeaderName) == null ? void 0 : r.trim()) || w.traceHeaderName,
|
|
@@ -3782,17 +3822,17 @@ const ht = () => typeof window < "u" && typeof window.localStorage < "u", Cr = (
|
|
|
3782
3822
|
replayMaxSegmentEvents: (e == null ? void 0 : e.replayMaxSegmentEvents) ?? w.replayMaxSegmentEvents,
|
|
3783
3823
|
replayMaskAllInputs: (e == null ? void 0 : e.replayMaskAllInputs) ?? w.replayMaskAllInputs
|
|
3784
3824
|
};
|
|
3785
|
-
},
|
|
3825
|
+
}, D = () => typeof window < "u" && window.location ? window.location.href : "", le = () => typeof document < "u" && document.title || "", ws = /* @__PURE__ */ new Set(["beacon", "fetch", "xmlhttprequest"]), Ce = 1e3, We = () => typeof performance < "u" && Number.isFinite(performance.timeOrigin) ? performance.timeOrigin : Date.now(), As = (e) => {
|
|
3786
3826
|
const t = String(e.initiatorType || "").toLowerCase(), r = String(e.name || "").toLowerCase();
|
|
3787
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";
|
|
3788
|
-
},
|
|
3828
|
+
}, ks = (e) => {
|
|
3789
3829
|
if (!(e != null && e.name))
|
|
3790
3830
|
return !1;
|
|
3791
3831
|
if (e.entryType === "navigation")
|
|
3792
3832
|
return !0;
|
|
3793
3833
|
const t = String(e.initiatorType || "").toLowerCase();
|
|
3794
|
-
return
|
|
3795
|
-
},
|
|
3834
|
+
return ws.has(t) ? !1 : !/^wss?:/i.test(e.name);
|
|
3835
|
+
}, Es = (e) => {
|
|
3796
3836
|
const t = Number(e.responseStatus);
|
|
3797
3837
|
if (Number.isFinite(t) && t > 0)
|
|
3798
3838
|
return t;
|
|
@@ -3800,7 +3840,7 @@ const ht = () => typeof window < "u" && typeof window.localStorage < "u", Cr = (
|
|
|
3800
3840
|
return 200;
|
|
3801
3841
|
const r = Number(e.transferSize || 0), n = Number(e.encodedBodySize || 0), s = Number(e.decodedBodySize || 0);
|
|
3802
3842
|
return r > 0 || n > 0 || s > 0 ? 200 : null;
|
|
3803
|
-
}, Rs = (e) => Math.round(We() + Math.max(0, Number(e.startTime || 0))), rt = (e) => Math.round(e / (1024 * 1024) * 10) / 10,
|
|
3843
|
+
}, Rs = (e) => Math.round(We() + Math.max(0, Number(e.startTime || 0))), rt = (e) => Math.round(e / (1024 * 1024) * 10) / 10, Ts = () => {
|
|
3804
3844
|
if (typeof performance > "u")
|
|
3805
3845
|
return null;
|
|
3806
3846
|
const e = performance.memory;
|
|
@@ -3812,7 +3852,7 @@ const ht = () => typeof window < "u" && typeof window.localStorage < "u", Cr = (
|
|
|
3812
3852
|
total_js_heap_mb: rt(r),
|
|
3813
3853
|
used_js_heap_mb: rt(t)
|
|
3814
3854
|
};
|
|
3815
|
-
},
|
|
3855
|
+
}, _s = () => {
|
|
3816
3856
|
if (typeof performance > "u")
|
|
3817
3857
|
return null;
|
|
3818
3858
|
const e = performance.getEntriesByType("navigation")[0], t = performance.getEntriesByName("first-contentful-paint")[0];
|
|
@@ -3821,40 +3861,40 @@ const ht = () => typeof window < "u" && typeof window.localStorage < "u", Cr = (
|
|
|
3821
3861
|
const r = {};
|
|
3822
3862
|
return e && (r.dom_content_loaded_ms = Math.round(e.domContentLoadedEventEnd || 0), r.load_event_ms = Math.round(e.loadEventEnd || 0), r.response_end_ms = Math.round(e.responseEnd || 0), r.dom_complete_ms = Math.round(e.domComplete || 0), r.transfer_size = Math.round(e.transferSize || 0)), t && (r.first_contentful_paint_ms = Math.round(t.startTime || 0)), Object.keys(r).length > 0 ? r : null;
|
|
3823
3863
|
};
|
|
3824
|
-
class
|
|
3864
|
+
class Ns {
|
|
3825
3865
|
constructor() {
|
|
3826
|
-
this.config = w, this.brandId = null, this.sessionId = null, this.deviceId = null, this.accountId = null, this.accountTraits = null, this.errorCapture = null, this.initialized = !1, this.performanceObservers = [], this.performanceSampleTimer = null, this.pendingLongTaskMs = 0, this.resourceObserver = null, this.replayResourceKeys = /* @__PURE__ */ new Set(), this.nextPerformanceSampleAt = 0, this.actionBuffer = new
|
|
3866
|
+
this.config = w, this.brandId = null, this.sessionId = null, this.deviceId = null, this.accountId = null, this.accountTraits = null, this.errorCapture = null, this.initialized = !1, this.performanceObservers = [], this.performanceSampleTimer = null, this.pendingLongTaskMs = 0, this.resourceObserver = null, this.replayResourceKeys = /* @__PURE__ */ new Set(), this.nextPerformanceSampleAt = 0, this.actionBuffer = new Ur(w.maxActionBufferSize), this.replayRecorder = new ps();
|
|
3827
3867
|
}
|
|
3828
3868
|
async init(t, r) {
|
|
3829
3869
|
var i;
|
|
3830
3870
|
const n = Number(t);
|
|
3831
3871
|
if (!Number.isFinite(n) || n <= 0)
|
|
3832
3872
|
throw new Error("[FlashlogTracker] Invalid brand id");
|
|
3833
|
-
const s =
|
|
3873
|
+
const s = vs(r);
|
|
3834
3874
|
if (!s.apiKey || !s.apiKey.trim())
|
|
3835
3875
|
throw new Error("[FlashlogTracker] Missing api key");
|
|
3836
3876
|
this.config = {
|
|
3837
3877
|
...s,
|
|
3838
3878
|
apiKey: s.apiKey.trim()
|
|
3839
|
-
}, this.brandId = n, this.sessionId =
|
|
3879
|
+
}, this.brandId = n, this.sessionId = Kt(this.config.sessionTimeoutMs), this.deviceId = Gt(), this.accountId = Cs(), this.accountTraits = Ss(), this.actionBuffer.stop(), this.actionBuffer.clear(), this.actionBuffer.start(), this.stopReplayResourceCapture(), await this.replayRecorder.dispose({
|
|
3840
3880
|
finalize: !0,
|
|
3841
3881
|
keepalive: !1,
|
|
3842
3882
|
reason: "reinit"
|
|
3843
|
-
}), (i = this.errorCapture) == null || i.stop(), this.errorCapture = null, this.config.autoCapture && (this.errorCapture = new
|
|
3883
|
+
}), (i = this.errorCapture) == null || i.stop(), this.errorCapture = null, this.config.autoCapture && (this.errorCapture = new Pr(this.config, {
|
|
3844
3884
|
debug: this.config.debug,
|
|
3845
3885
|
onNetworkActivity: (a) => {
|
|
3846
3886
|
this.replayRecorder.addCustomEvent("network-activity", {
|
|
3847
3887
|
...a,
|
|
3848
3888
|
page_title: le(),
|
|
3849
3889
|
session_id: this.sessionId,
|
|
3850
|
-
url_bug_happened:
|
|
3890
|
+
url_bug_happened: D()
|
|
3851
3891
|
});
|
|
3852
3892
|
},
|
|
3853
3893
|
onNetworkError: (a) => {
|
|
3854
3894
|
this.trackInternal("NETWORK_ERROR", {
|
|
3855
3895
|
...a,
|
|
3856
3896
|
error_type: "network_error",
|
|
3857
|
-
url_bug_happened:
|
|
3897
|
+
url_bug_happened: D(),
|
|
3858
3898
|
url: String(a.url || "")
|
|
3859
3899
|
});
|
|
3860
3900
|
},
|
|
@@ -3862,7 +3902,7 @@ class _s {
|
|
|
3862
3902
|
this.trackInternal("SOCKET_ERROR", {
|
|
3863
3903
|
...a,
|
|
3864
3904
|
error_type: "socket_error",
|
|
3865
|
-
url_bug_happened:
|
|
3905
|
+
url_bug_happened: D(),
|
|
3866
3906
|
url: String(a.url || "")
|
|
3867
3907
|
});
|
|
3868
3908
|
},
|
|
@@ -3870,16 +3910,16 @@ class _s {
|
|
|
3870
3910
|
this.trackInternal("JS_ERROR", {
|
|
3871
3911
|
...a,
|
|
3872
3912
|
error_type: "js_error",
|
|
3873
|
-
url_bug_happened:
|
|
3874
|
-
url:
|
|
3913
|
+
url_bug_happened: D(),
|
|
3914
|
+
url: D()
|
|
3875
3915
|
});
|
|
3876
3916
|
},
|
|
3877
3917
|
onUnhandledRejection: (a) => {
|
|
3878
3918
|
this.trackInternal("UNHANDLED_REJECTION", {
|
|
3879
3919
|
...a,
|
|
3880
3920
|
error_type: "unhandled_rejection",
|
|
3881
|
-
url_bug_happened:
|
|
3882
|
-
url:
|
|
3921
|
+
url_bug_happened: D(),
|
|
3922
|
+
url: D()
|
|
3883
3923
|
});
|
|
3884
3924
|
}
|
|
3885
3925
|
}), this.errorCapture.start()), this.config.enableSessionReplay && (await this.replayRecorder.start({
|
|
@@ -3893,7 +3933,7 @@ class _s {
|
|
|
3893
3933
|
maxSegmentBytes: this.config.replayMaxSegmentBytes,
|
|
3894
3934
|
maxSegmentEvents: this.config.replayMaxSegmentEvents,
|
|
3895
3935
|
sessionId: this.sessionId
|
|
3896
|
-
}), this.recordReplaySessionContext("init"), this.startReplayResourceCapture(), this.startReplayPerformanceCapture()), this.initialized = !0,
|
|
3936
|
+
}), this.recordReplaySessionContext("init"), this.startReplayResourceCapture(), this.startReplayPerformanceCapture()), this.initialized = !0, Pt({
|
|
3897
3937
|
apiKey: this.config.apiKey,
|
|
3898
3938
|
apiUrl: this.config.apiUrl,
|
|
3899
3939
|
brandId: this.brandId,
|
|
@@ -3914,8 +3954,8 @@ class _s {
|
|
|
3914
3954
|
stack: s,
|
|
3915
3955
|
context: r,
|
|
3916
3956
|
error_type: "manual_error",
|
|
3917
|
-
url_bug_happened:
|
|
3918
|
-
url:
|
|
3957
|
+
url_bug_happened: D(),
|
|
3958
|
+
url: D(),
|
|
3919
3959
|
timestamp: Date.now()
|
|
3920
3960
|
});
|
|
3921
3961
|
}
|
|
@@ -3925,26 +3965,26 @@ class _s {
|
|
|
3925
3965
|
details: r || null,
|
|
3926
3966
|
session_id: this.sessionId,
|
|
3927
3967
|
timestamp: Date.now(),
|
|
3928
|
-
url:
|
|
3968
|
+
url: D()
|
|
3929
3969
|
});
|
|
3930
3970
|
}
|
|
3931
3971
|
identify(t, r = {}) {
|
|
3932
3972
|
const n = String(t || "").trim();
|
|
3933
3973
|
if (!n)
|
|
3934
3974
|
throw new Error("[FlashlogTracker] identify requires a non-empty account id");
|
|
3935
|
-
this.accountId = n, this.accountTraits = Object.keys(r).length > 0 ? r : null,
|
|
3975
|
+
this.accountId = n, this.accountTraits = Object.keys(r).length > 0 ? r : null, Is(n, this.accountTraits || void 0), this.recordReplaySessionContext("identify");
|
|
3936
3976
|
}
|
|
3937
3977
|
clearIdentity() {
|
|
3938
|
-
this.accountId = null, this.accountTraits = null,
|
|
3978
|
+
this.accountId = null, this.accountTraits = null, br(), this.recordReplaySessionContext("clear-identity");
|
|
3939
3979
|
}
|
|
3940
3980
|
getTraceHeaders() {
|
|
3941
3981
|
return it(Ve(), this.config.traceHeaderName);
|
|
3942
3982
|
}
|
|
3943
3983
|
getSessionId() {
|
|
3944
|
-
return this.sessionId ||
|
|
3984
|
+
return this.sessionId || gs();
|
|
3945
3985
|
}
|
|
3946
3986
|
getDeviceId() {
|
|
3947
|
-
return this.deviceId ||
|
|
3987
|
+
return this.deviceId || ys();
|
|
3948
3988
|
}
|
|
3949
3989
|
async flushReplay(t = "manual") {
|
|
3950
3990
|
return this.replayRecorder.flush(t);
|
|
@@ -3958,7 +3998,7 @@ class _s {
|
|
|
3958
3998
|
finalize: !0,
|
|
3959
3999
|
keepalive: !1,
|
|
3960
4000
|
reason: "reset"
|
|
3961
|
-
}),
|
|
4001
|
+
}), bs(), this.initialized = !1, this.brandId = null, this.sessionId = null, this.deviceId = null;
|
|
3962
4002
|
}
|
|
3963
4003
|
buildPayload(t, r, n) {
|
|
3964
4004
|
if (!this.brandId || !this.sessionId || !this.deviceId) return null;
|
|
@@ -3966,7 +4006,7 @@ class _s {
|
|
|
3966
4006
|
actions: this.actionBuffer.getAll(),
|
|
3967
4007
|
device_info: It(this.deviceId),
|
|
3968
4008
|
network_status: Ct(),
|
|
3969
|
-
url_bug_happened: r.url_bug_happened ||
|
|
4009
|
+
url_bug_happened: r.url_bug_happened || D(),
|
|
3970
4010
|
trace_id: n.trace_id,
|
|
3971
4011
|
span_id: n.span_id,
|
|
3972
4012
|
traceparent: n.traceparent,
|
|
@@ -3984,19 +4024,19 @@ class _s {
|
|
|
3984
4024
|
async trackInternal(t, r) {
|
|
3985
4025
|
if (!this.initialized)
|
|
3986
4026
|
return this.config.debug && console.warn("[FlashlogTracker] Not initialized"), !1;
|
|
3987
|
-
|
|
3988
|
-
const n =
|
|
4027
|
+
ms(), this.sessionId || (this.sessionId = Kt(this.config.sessionTimeoutMs)), this.deviceId || (this.deviceId = Gt());
|
|
4028
|
+
const n = Kr(r), s = this.buildPayload(t, r, n);
|
|
3989
4029
|
if (!s) return !1;
|
|
3990
|
-
const i =
|
|
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;
|
|
3991
4031
|
this.replayRecorder.addCustomEvent("tracking-event", {
|
|
3992
4032
|
...i.data,
|
|
3993
4033
|
event_name: t,
|
|
3994
4034
|
error_type: typeof i.data.error_type == "string" ? i.data.error_type : null,
|
|
3995
|
-
http_method:
|
|
4035
|
+
http_method: c,
|
|
3996
4036
|
http_status: a,
|
|
3997
|
-
method:
|
|
4037
|
+
method: c,
|
|
3998
4038
|
page_title: le(),
|
|
3999
|
-
request_url:
|
|
4039
|
+
request_url: o,
|
|
4000
4040
|
session_id: s.session_id,
|
|
4001
4041
|
timestamp: typeof i.data.timestamp == "number" ? i.data.timestamp : Date.now()
|
|
4002
4042
|
});
|
|
@@ -4024,8 +4064,8 @@ class _s {
|
|
|
4024
4064
|
device_info: It(this.deviceId),
|
|
4025
4065
|
network_status: Ct(),
|
|
4026
4066
|
page_title: le(),
|
|
4027
|
-
page_url:
|
|
4028
|
-
performance:
|
|
4067
|
+
page_url: D(),
|
|
4068
|
+
performance: _s(),
|
|
4029
4069
|
reason: t,
|
|
4030
4070
|
session_id: this.sessionId,
|
|
4031
4071
|
timestamp: Date.now()
|
|
@@ -4075,13 +4115,13 @@ class _s {
|
|
|
4075
4115
|
Math.round(
|
|
4076
4116
|
Math.min(Ce, s) / Ce * 100 + Math.min(Ce, this.pendingLongTaskMs) / Ce * 100
|
|
4077
4117
|
)
|
|
4078
|
-
), a =
|
|
4118
|
+
), a = Ts();
|
|
4079
4119
|
this.pendingLongTaskMs = 0, this.replayRecorder.addCustomEvent("performance-sample", {
|
|
4080
4120
|
cpu_usage_pct: i,
|
|
4081
4121
|
js_heap_limit_mb: (a == null ? void 0 : a.js_heap_limit_mb) ?? null,
|
|
4082
4122
|
memory_mb: (a == null ? void 0 : a.used_js_heap_mb) ?? null,
|
|
4083
4123
|
page_title: le(),
|
|
4084
|
-
page_url:
|
|
4124
|
+
page_url: D(),
|
|
4085
4125
|
reason: t,
|
|
4086
4126
|
session_id: this.sessionId,
|
|
4087
4127
|
timestamp: Math.round(We() + r),
|
|
@@ -4098,7 +4138,7 @@ class _s {
|
|
|
4098
4138
|
duration_ms: s,
|
|
4099
4139
|
name: n.name || "longtask",
|
|
4100
4140
|
page_title: le(),
|
|
4101
|
-
page_url:
|
|
4141
|
+
page_url: D(),
|
|
4102
4142
|
session_id: this.sessionId,
|
|
4103
4143
|
start_time_ms: Math.round(Number(n.startTime || 0)),
|
|
4104
4144
|
timestamp: Math.round(We() + Number(n.startTime || performance.now()))
|
|
@@ -4117,7 +4157,7 @@ class _s {
|
|
|
4117
4157
|
const s = Number(n.value || 0);
|
|
4118
4158
|
!Number.isFinite(s) || s <= 0 || n.hadRecentInput || this.replayRecorder.addCustomEvent("layout-shift", {
|
|
4119
4159
|
page_title: le(),
|
|
4120
|
-
page_url:
|
|
4160
|
+
page_url: D(),
|
|
4121
4161
|
session_id: this.sessionId,
|
|
4122
4162
|
timestamp: Math.round(We() + Number(n.startTime || performance.now())),
|
|
4123
4163
|
value: Math.round(s * 1e4) / 1e4
|
|
@@ -4130,7 +4170,7 @@ class _s {
|
|
|
4130
4170
|
}
|
|
4131
4171
|
captureReplayResourceEntries(t, r) {
|
|
4132
4172
|
this.sessionId && t.forEach((n) => {
|
|
4133
|
-
if (!
|
|
4173
|
+
if (!ks(n))
|
|
4134
4174
|
return;
|
|
4135
4175
|
const s = [
|
|
4136
4176
|
n.entryType,
|
|
@@ -4147,12 +4187,12 @@ class _s {
|
|
|
4147
4187
|
initiator_type: String(n.initiatorType || ""),
|
|
4148
4188
|
method: "GET",
|
|
4149
4189
|
page_title: le(),
|
|
4150
|
-
page_url:
|
|
4190
|
+
page_url: D(),
|
|
4151
4191
|
request_url: n.name,
|
|
4152
|
-
resource_type:
|
|
4192
|
+
resource_type: As(n),
|
|
4153
4193
|
response_end_ms: Math.round(Number(n.responseEnd || 0)),
|
|
4154
4194
|
session_id: this.sessionId,
|
|
4155
|
-
status:
|
|
4195
|
+
status: Es(n),
|
|
4156
4196
|
timestamp: Rs(n),
|
|
4157
4197
|
transfer_size: Math.round(Number(n.transferSize || 0)),
|
|
4158
4198
|
url: n.name
|
|
@@ -4160,7 +4200,7 @@ class _s {
|
|
|
4160
4200
|
});
|
|
4161
4201
|
}
|
|
4162
4202
|
}
|
|
4163
|
-
const
|
|
4203
|
+
const Ms = () => new Ns(), Je = Ms(), Fs = Je, re = (e, t) => e === void 0 ? t : e === "true", _e = (e, t) => {
|
|
4164
4204
|
if (!e) return t;
|
|
4165
4205
|
const r = Number(e);
|
|
4166
4206
|
return Number.isFinite(r) ? r : t;
|
|
@@ -4168,7 +4208,7 @@ const Ns = () => new _s(), Je = Ns(), Ls = Je, re = (e, t) => e === void 0 ? t :
|
|
|
4168
4208
|
if (!e) return;
|
|
4169
4209
|
const t = e.split(",").map((r) => r.trim()).filter(Boolean);
|
|
4170
4210
|
return t.length > 0 ? t : void 0;
|
|
4171
|
-
},
|
|
4211
|
+
}, Os = () => {
|
|
4172
4212
|
if (typeof document > "u") return null;
|
|
4173
4213
|
if (document.currentScript instanceof HTMLScriptElement) return document.currentScript;
|
|
4174
4214
|
const e = document.getElementsByTagName("script");
|
|
@@ -4178,9 +4218,9 @@ const Ns = () => new _s(), Je = Ns(), Ls = Je, re = (e, t) => e === void 0 ? t :
|
|
|
4178
4218
|
return r;
|
|
4179
4219
|
}
|
|
4180
4220
|
return null;
|
|
4181
|
-
},
|
|
4221
|
+
}, Ls = async () => {
|
|
4182
4222
|
if (typeof window > "u" || typeof document > "u") return;
|
|
4183
|
-
const e =
|
|
4223
|
+
const e = Os();
|
|
4184
4224
|
if (!e || e.dataset.autoInit !== "true") return;
|
|
4185
4225
|
const t = e.dataset.productId || e.dataset.brandId, r = e.dataset.apiKey, n = re(e.dataset.debug, !1);
|
|
4186
4226
|
if (t) {
|
|
@@ -4224,7 +4264,7 @@ const Ns = () => new _s(), Je = Ns(), Ls = Je, re = (e, t) => e === void 0 ? t :
|
|
|
4224
4264
|
e.dataset.replayMaskAllInputs,
|
|
4225
4265
|
w.replayMaskAllInputs
|
|
4226
4266
|
)
|
|
4227
|
-
}),
|
|
4267
|
+
}), Pt({
|
|
4228
4268
|
apiUrl: e.dataset.apiUrl,
|
|
4229
4269
|
apiKey: r,
|
|
4230
4270
|
brandId: t,
|
|
@@ -4237,11 +4277,11 @@ const Ns = () => new _s(), Je = Ns(), Ls = Je, re = (e, t) => e === void 0 ? t :
|
|
|
4237
4277
|
}
|
|
4238
4278
|
}
|
|
4239
4279
|
};
|
|
4240
|
-
typeof window < "u" && (window.FlashlogBugTracker = Je, window.Tracker || (window.Tracker = Je),
|
|
4280
|
+
typeof window < "u" && (window.FlashlogBugTracker = Je, window.Tracker || (window.Tracker = Je), Ls());
|
|
4241
4281
|
export {
|
|
4242
4282
|
w as DEFAULT_CONFIG,
|
|
4243
|
-
|
|
4244
|
-
|
|
4283
|
+
Ns as FlashlogTrackerLite,
|
|
4284
|
+
Ms as createTracker,
|
|
4245
4285
|
Je as default,
|
|
4246
|
-
|
|
4286
|
+
Fs as flashlogTracker
|
|
4247
4287
|
};
|