@sprig-technologies/sprig-bundled 2.42.1 → 2.44.0
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/conversational-ui-BDY1U1pN.js +1512 -0
- package/dist/{conversational-ui-7uwYiaVu.cjs → conversational-ui-EBO_5YT4.cjs} +2 -2
- package/dist/conversational-v2-styles-BTm-8rVB.cjs +1 -0
- package/dist/conversational-v2-styles-Bj3dBWvf.js +4 -0
- package/dist/getAttributedUrl-8t2IIhOk.js +193 -0
- package/dist/getAttributedUrl-M03Qw_Lk.cjs +12 -0
- package/dist/{index-tNxjISKI.cjs → index-B0e_zgRQ.cjs} +15 -15
- package/dist/index-BLbkNfGp.cjs +1 -0
- package/dist/{index-CVv8LnEs.js → index-BUTuSSuP.js} +842 -837
- package/dist/index-D2wwf1iZ.js +717 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +16 -7
- package/dist/index.js +1 -1
- package/dist/view-0ocXtsSZ.cjs +1 -0
- package/dist/view-DcerBHpf.js +1780 -0
- package/package.json +1 -1
- package/dist/conversational-ui-D-_CeIyn.js +0 -1502
- package/dist/getAttributedUrl-CaTOVJ3H.js +0 -195
- package/dist/getAttributedUrl-K8cJRRz-.cjs +0 -12
- package/dist/index-BntHJwKi.cjs +0 -1
- package/dist/index-CgPPSt6n.js +0 -706
- package/dist/view-Bad4puKi.js +0 -1720
- package/dist/view-CkEj7hBw.cjs +0 -1
|
@@ -46,20 +46,20 @@ var Id = Object.create, uo = Object.defineProperty, Cd = Object.getOwnPropertyDe
|
|
|
46
46
|
}
|
|
47
47
|
function l(c) {
|
|
48
48
|
if (c.callback === void 0) throw new Error("callback argument missing");
|
|
49
|
-
var u = !1, d = function(T,
|
|
50
|
-
u || (u = !0, c.callback(T,
|
|
49
|
+
var u = !1, d = function(T, R, S) {
|
|
50
|
+
u || (u = !0, c.callback(T, R, S));
|
|
51
51
|
};
|
|
52
52
|
function h() {
|
|
53
53
|
var T = void 0;
|
|
54
|
-
if (T = p.response ? p.response : p.responseText || function(
|
|
54
|
+
if (T = p.response ? p.response : p.responseText || function(R) {
|
|
55
55
|
try {
|
|
56
|
-
if (
|
|
57
|
-
var S =
|
|
58
|
-
if (
|
|
56
|
+
if (R.responseType === "document") return R.responseXML;
|
|
57
|
+
var S = R.responseXML && R.responseXML.documentElement.nodeName === "parsererror";
|
|
58
|
+
if (R.responseType === "" && !S) return R.responseXML;
|
|
59
59
|
} catch {
|
|
60
60
|
}
|
|
61
61
|
return null;
|
|
62
|
-
}(p),
|
|
62
|
+
}(p), M) try {
|
|
63
63
|
T = JSON.parse(T);
|
|
64
64
|
} catch {
|
|
65
65
|
}
|
|
@@ -68,31 +68,31 @@ var Id = Object.create, uo = Object.defineProperty, Cd = Object.getOwnPropertyDe
|
|
|
68
68
|
function f(T) {
|
|
69
69
|
return clearTimeout(g), T instanceof Error || (T = new Error("" + (T || "Unknown XMLHttpRequest Error"))), T.statusCode = 0, d(T, k);
|
|
70
70
|
}
|
|
71
|
-
function
|
|
71
|
+
function w() {
|
|
72
72
|
if (!m) {
|
|
73
73
|
var T;
|
|
74
74
|
clearTimeout(g), T = c.useXDR && p.status === void 0 ? 200 : p.status === 1223 ? 204 : p.status;
|
|
75
|
-
var
|
|
76
|
-
return T !== 0 ? (
|
|
75
|
+
var R = k, S = null;
|
|
76
|
+
return T !== 0 ? (R = { body: h(), statusCode: T, method: I, headers: {}, url: v, rawRequest: p }, p.getAllResponseHeaders && (R.headers = n(p.getAllResponseHeaders()))) : S = new Error("Internal XMLHttpRequest Error"), d(S, R, R.body);
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
79
|
var p = c.xhr || null;
|
|
80
80
|
p || (p = c.cors || c.useXDR ? new o.XDomainRequest() : new o.XMLHttpRequest());
|
|
81
|
-
var
|
|
82
|
-
if ("json" in c && c.json !== !1 && (
|
|
83
|
-
p.readyState === 4 && setTimeout(
|
|
84
|
-
}, p.onload =
|
|
81
|
+
var C, m, g, v = p.url = c.uri || c.url, I = p.method = c.method || "GET", O = c.body || c.data, E = p.headers = c.headers || {}, A = !!c.sync, M = !1, k = { body: void 0, headers: {}, statusCode: 0, method: I, url: v, rawRequest: p };
|
|
82
|
+
if ("json" in c && c.json !== !1 && (M = !0, E.accept || E.Accept || (E.Accept = "application/json"), I !== "GET" && I !== "HEAD" && (E["content-type"] || E["Content-Type"] || (E["Content-Type"] = "application/json"), O = JSON.stringify(c.json === !0 ? O : c.json))), p.onreadystatechange = function() {
|
|
83
|
+
p.readyState === 4 && setTimeout(w, 0);
|
|
84
|
+
}, p.onload = w, p.onerror = f, p.onprogress = function() {
|
|
85
85
|
}, p.onabort = function() {
|
|
86
86
|
m = !0;
|
|
87
|
-
}, p.ontimeout = f, p.open(
|
|
87
|
+
}, p.ontimeout = f, p.open(I, v, !A, c.username, c.password), A || (p.withCredentials = !!c.withCredentials), !A && c.timeout > 0 && (g = setTimeout(function() {
|
|
88
88
|
if (!m) {
|
|
89
89
|
m = !0, p.abort("timeout");
|
|
90
90
|
var T = new Error("XMLHttpRequest timeout");
|
|
91
91
|
T.code = "ETIMEDOUT", f(T);
|
|
92
92
|
}
|
|
93
|
-
}, c.timeout)), p.setRequestHeader) for (
|
|
93
|
+
}, c.timeout)), p.setRequestHeader) for (C in E) E.hasOwnProperty(C) && p.setRequestHeader(C, E[C]);
|
|
94
94
|
else if (c.headers && !function(T) {
|
|
95
|
-
for (var
|
|
95
|
+
for (var R in T) if (T.hasOwnProperty(R)) return !1;
|
|
96
96
|
return !0;
|
|
97
97
|
}(c.headers)) throw new Error("Headers cannot be set on an XDomainRequest object");
|
|
98
98
|
return "responseType" in c && (p.responseType = c.responseType), "beforeSend" in c && typeof c.beforeSend == "function" && c.beforeSend(p), p.send(O || null), p;
|
|
@@ -116,7 +116,7 @@ function hl(e, t) {
|
|
|
116
116
|
function ml(e) {
|
|
117
117
|
return typeof e != "object" || e === null ? String(e) : Object.prototype.toString.call(e);
|
|
118
118
|
}
|
|
119
|
-
var
|
|
119
|
+
var Me = typeof window < "u" ? window : typeof self < "u" ? self : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : void 0, dt = class {
|
|
120
120
|
constructor(e, t) {
|
|
121
121
|
this.code = e, this.message = t;
|
|
122
122
|
}
|
|
@@ -129,7 +129,7 @@ var Ae = typeof window < "u" ? window : typeof self < "u" ? self : typeof global
|
|
|
129
129
|
} catch {
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
|
-
}, Md = new
|
|
132
|
+
}, Md = new dt("W01", "Unable to initialize event under dispatching."), Ud = new dt("W02", "Assigning any falsy value to 'cancelBubble' property has no effect."), Dd = new dt("W03", "Assigning any truthy value to 'returnValue' property has no effect."), Pd = new dt("W04", "Unable to preventDefault on non-cancelable events."), _d = new dt("W05", "Unable to preventDefault inside passive event listener invocation."), Nd = new dt("W06", "An event listener wasn't added because it has been added already: %o, %o"), Js = new dt("W07", "The %o option value was abandoned because the event listener wasn't added as duplicated."), po = new dt("W08", "The 'callback' argument must be a function or an object that has 'handleEvent' method: %o"), qe = class {
|
|
133
133
|
static get NONE() {
|
|
134
134
|
return ho;
|
|
135
135
|
}
|
|
@@ -230,10 +230,10 @@ function he(e, t = "this") {
|
|
|
230
230
|
function yo(e) {
|
|
231
231
|
e.inPassiveListenerFlag ? _d.warn() : e.cancelable ? e.canceledFlag = !0 : Pd.warn();
|
|
232
232
|
}
|
|
233
|
-
Object.defineProperty(
|
|
234
|
-
var Ks = Object.getOwnPropertyNames(
|
|
235
|
-
for (let e = 0; e < Ks.length; ++e) Ks[e] !== "constructor" && Object.defineProperty(
|
|
236
|
-
|
|
233
|
+
Object.defineProperty(qe, "NONE", { enumerable: !0 }), Object.defineProperty(qe, "CAPTURING_PHASE", { enumerable: !0 }), Object.defineProperty(qe, "AT_TARGET", { enumerable: !0 }), Object.defineProperty(qe, "BUBBLING_PHASE", { enumerable: !0 });
|
|
234
|
+
var Ks = Object.getOwnPropertyNames(qe.prototype);
|
|
235
|
+
for (let e = 0; e < Ks.length; ++e) Ks[e] !== "constructor" && Object.defineProperty(qe.prototype, Ks[e], { enumerable: !0 });
|
|
236
|
+
Me !== void 0 && Me.Event !== void 0 && Object.setPrototypeOf(qe.prototype, Me.Event.prototype);
|
|
237
237
|
var bt, wo = { INDEX_SIZE_ERR: 1, DOMSTRING_SIZE_ERR: 2, HIERARCHY_REQUEST_ERR: 3, WRONG_DOCUMENT_ERR: 4, INVALID_CHARACTER_ERR: 5, NO_DATA_ALLOWED_ERR: 6, NO_MODIFICATION_ALLOWED_ERR: 7, NOT_FOUND_ERR: 8, NOT_SUPPORTED_ERR: 9, INUSE_ATTRIBUTE_ERR: 10, INVALID_STATE_ERR: 11, SYNTAX_ERR: 12, INVALID_MODIFICATION_ERR: 13, NAMESPACE_ERR: 14, INVALID_ACCESS_ERR: 15, VALIDATION_ERR: 16, TYPE_MISMATCH_ERR: 17, SECURITY_ERR: 18, NETWORK_ERR: 19, ABORT_ERR: 20, URL_MISMATCH_ERR: 21, QUOTA_EXCEEDED_ERR: 22, TIMEOUT_ERR: 23, INVALID_NODE_TYPE_ERR: 24, DATA_CLONE_ERR: 25 };
|
|
238
238
|
function bo(e) {
|
|
239
239
|
let t = Object.keys(wo);
|
|
@@ -242,7 +242,7 @@ function bo(e) {
|
|
|
242
242
|
Object.defineProperty(e, s, { get: () => n, configurable: !0, enumerable: !0 });
|
|
243
243
|
}
|
|
244
244
|
}
|
|
245
|
-
var ms = class extends
|
|
245
|
+
var ms = class extends qe {
|
|
246
246
|
static wrap(e) {
|
|
247
247
|
return new (gl(e))(e);
|
|
248
248
|
}
|
|
@@ -256,7 +256,7 @@ var ms = class extends Ye {
|
|
|
256
256
|
}
|
|
257
257
|
stopPropagation() {
|
|
258
258
|
super.stopPropagation();
|
|
259
|
-
let { original: e } =
|
|
259
|
+
let { original: e } = nt(this);
|
|
260
260
|
"stopPropagation" in e && e.stopPropagation();
|
|
261
261
|
}
|
|
262
262
|
get cancelBubble() {
|
|
@@ -264,12 +264,12 @@ var ms = class extends Ye {
|
|
|
264
264
|
}
|
|
265
265
|
set cancelBubble(e) {
|
|
266
266
|
super.cancelBubble = e;
|
|
267
|
-
let { original: t } =
|
|
267
|
+
let { original: t } = nt(this);
|
|
268
268
|
"cancelBubble" in t && (t.cancelBubble = e);
|
|
269
269
|
}
|
|
270
270
|
stopImmediatePropagation() {
|
|
271
271
|
super.stopImmediatePropagation();
|
|
272
|
-
let { original: e } =
|
|
272
|
+
let { original: e } = nt(this);
|
|
273
273
|
"stopImmediatePropagation" in e && e.stopImmediatePropagation();
|
|
274
274
|
}
|
|
275
275
|
get returnValue() {
|
|
@@ -277,20 +277,20 @@ var ms = class extends Ye {
|
|
|
277
277
|
}
|
|
278
278
|
set returnValue(e) {
|
|
279
279
|
super.returnValue = e;
|
|
280
|
-
let { original: t } =
|
|
280
|
+
let { original: t } = nt(this);
|
|
281
281
|
"returnValue" in t && (t.returnValue = e);
|
|
282
282
|
}
|
|
283
283
|
preventDefault() {
|
|
284
284
|
super.preventDefault();
|
|
285
|
-
let { original: e } =
|
|
285
|
+
let { original: e } = nt(this);
|
|
286
286
|
"preventDefault" in e && e.preventDefault();
|
|
287
287
|
}
|
|
288
288
|
get timeStamp() {
|
|
289
|
-
let { original: e } =
|
|
289
|
+
let { original: e } = nt(this);
|
|
290
290
|
return "timeStamp" in e ? e.timeStamp : super.timeStamp;
|
|
291
291
|
}
|
|
292
292
|
}, fl = /* @__PURE__ */ new WeakMap();
|
|
293
|
-
function
|
|
293
|
+
function nt(e) {
|
|
294
294
|
let t = fl.get(e);
|
|
295
295
|
return Ai(t != null, "'this' is expected an Event object, but got", e), t;
|
|
296
296
|
}
|
|
@@ -310,10 +310,10 @@ function gl(e) {
|
|
|
310
310
|
function yl(e, t) {
|
|
311
311
|
let r = Object.getOwnPropertyDescriptor(e, t);
|
|
312
312
|
return { get() {
|
|
313
|
-
let s =
|
|
313
|
+
let s = nt(this).original, n = s[t];
|
|
314
314
|
return typeof n == "function" ? n.bind(s) : n;
|
|
315
315
|
}, set(s) {
|
|
316
|
-
|
|
316
|
+
nt(this).original[t] = s;
|
|
317
317
|
}, configurable: r.configurable, enumerable: r.enumerable };
|
|
318
318
|
}
|
|
319
319
|
function wl(e) {
|
|
@@ -357,30 +357,30 @@ function vl(e, t, r = !1) {
|
|
|
357
357
|
n.flags |= 8;
|
|
358
358
|
}(s), s.signal && s.signal.removeEventListener("abort", s.signalListener), e.cow && !r ? (e.cow = !1, e.listeners = e.listeners.filter((n, i) => i !== t), !1) : (e.listeners.splice(t, 1), !0);
|
|
359
359
|
}
|
|
360
|
-
fs.set(Object.prototype, ms),
|
|
360
|
+
fs.set(Object.prototype, ms), Me !== void 0 && Me.Event !== void 0 && fs.set(Me.Event.prototype, ms);
|
|
361
361
|
var Us = class {
|
|
362
362
|
constructor() {
|
|
363
363
|
Il.set(this, /* @__PURE__ */ Object.create(null));
|
|
364
364
|
}
|
|
365
365
|
addEventListener(e, t, r) {
|
|
366
|
-
let s = Zs(this), { callback: n, capture: i, once: a, passive: o, signal: l, type: c } = function(h, f,
|
|
366
|
+
let s = Zs(this), { callback: n, capture: i, once: a, passive: o, signal: l, type: c } = function(h, f, w) {
|
|
367
367
|
var p;
|
|
368
|
-
return Co(f), typeof
|
|
368
|
+
return Co(f), typeof w == "object" && w !== null ? { type: String(h), callback: f ?? void 0, capture: !!w.capture, passive: !!w.passive, once: !!w.once, signal: (p = w.signal) !== null && p !== void 0 ? p : void 0 } : { type: String(h), callback: f ?? void 0, capture: !!w, passive: !1, once: !1, signal: void 0 };
|
|
369
369
|
}(e, t, r);
|
|
370
370
|
if (n == null || l != null && l.aborted) return;
|
|
371
371
|
let u = function(h, f) {
|
|
372
|
-
var
|
|
373
|
-
return (
|
|
372
|
+
var w;
|
|
373
|
+
return (w = h[f]) !== null && w !== void 0 ? w : h[f] = { attrCallback: void 0, attrListener: void 0, cow: !1, listeners: [] };
|
|
374
374
|
}(s, c), d = bl(u, n, i);
|
|
375
|
-
d === -1 ? function(h, f,
|
|
375
|
+
d === -1 ? function(h, f, w, p, C, m) {
|
|
376
376
|
let g;
|
|
377
|
-
m && (g = Io.bind(null, h, f,
|
|
378
|
-
let v = function(
|
|
379
|
-
return { callback:
|
|
380
|
-
}(f,
|
|
377
|
+
m && (g = Io.bind(null, h, f, w), m.addEventListener("abort", g));
|
|
378
|
+
let v = function(I, O, E, A, M, k) {
|
|
379
|
+
return { callback: I, flags: (O ? 1 : 0) | (E ? 2 : 0) | (A ? 4 : 0), signal: M, signalListener: k };
|
|
380
|
+
}(f, w, p, C, m, g);
|
|
381
381
|
h.cow ? (h.cow = !1, h.listeners = [...h.listeners, v]) : h.listeners.push(v);
|
|
382
|
-
}(u, n, i, o, a, l) : function(h, f,
|
|
383
|
-
Nd.warn(wl(h) ? "capture" : "bubble", h.callback), vo(h) !== f && Js.warn("passive"), So(h) !==
|
|
382
|
+
}(u, n, i, o, a, l) : function(h, f, w, p) {
|
|
383
|
+
Nd.warn(wl(h) ? "capture" : "bubble", h.callback), vo(h) !== f && Js.warn("passive"), So(h) !== w && Js.warn("once"), h.signal !== p && Js.warn("signal");
|
|
384
384
|
}(u.listeners[d], o, a, l);
|
|
385
385
|
}
|
|
386
386
|
removeEventListener(e, t, r) {
|
|
@@ -392,8 +392,8 @@ var Us = class {
|
|
|
392
392
|
dispatchEvent(e) {
|
|
393
393
|
let t = Zs(this)[String(e.type)];
|
|
394
394
|
if (t == null) return !0;
|
|
395
|
-
let r = e instanceof
|
|
396
|
-
if (s.dispatchFlag) throw n = "This event has been in dispatching.",
|
|
395
|
+
let r = e instanceof qe ? e : ms.wrap(e), s = he(r, "event");
|
|
396
|
+
if (s.dispatchFlag) throw n = "This event has been in dispatching.", Me.DOMException ? new Me.DOMException(n, "InvalidStateError") : (bt == null && (bt = class Sl extends Error {
|
|
397
397
|
constructor(a) {
|
|
398
398
|
super(a), Error.captureStackTrace && Error.captureStackTrace(this, Sl);
|
|
399
399
|
}
|
|
@@ -429,7 +429,7 @@ function Co(e) {
|
|
|
429
429
|
}
|
|
430
430
|
var Xs = Object.getOwnPropertyNames(Us.prototype);
|
|
431
431
|
for (let e = 0; e < Xs.length; ++e) Xs[e] !== "constructor" && Object.defineProperty(Us.prototype, Xs[e], { enumerable: !0 });
|
|
432
|
-
|
|
432
|
+
Me !== void 0 && Me.EventTarget !== void 0 && Object.setPrototypeOf(Us.prototype, Me.EventTarget.prototype);
|
|
433
433
|
var ko, zd = ((e, t, r) => (r = e != null ? Id(Ed(e)) : {}, ((s, n, i, a) => {
|
|
434
434
|
if (n && typeof n == "object" || typeof n == "function") for (let o of kd(n)) !xd.call(s, o) && o !== i && uo(s, o, { get: () => n[o], enumerable: !(a = Cd(n, o)) || a.enumerable });
|
|
435
435
|
return s;
|
|
@@ -609,7 +609,7 @@ var ko, zd = ((e, t, r) => (r = e != null ? Id(Ed(e)) : {}, ((s, n, i, a) => {
|
|
|
609
609
|
if (e && (r = await this.sendChunkWithRetries(e)), this.success = !!t, this.success && r && this.dispatch("success"), !r) return;
|
|
610
610
|
}
|
|
611
611
|
}
|
|
612
|
-
},
|
|
612
|
+
}, Hd = El.createUpload, Gd = Object.defineProperty, x = (e, t, r) => ((s, n, i) => n in s ? Gd(s, n, { enumerable: !0, configurable: !0, writable: !0, value: i }) : s[n] = i)(e, typeof t != "symbol" ? t + "" : t, r), $d = Object.defineProperty, Eo = (e, t, r) => ((s, n, i) => n in s ? $d(s, n, { enumerable: !0, configurable: !0, writable: !0, value: i }) : s[n] = i)(e, typeof t != "symbol" ? t + "" : t, r), fe = ((e) => (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", e))(fe || {});
|
|
613
613
|
const xo = { Node: ["childNodes", "parentNode", "parentElement", "textContent"], ShadowRoot: ["host", "styleSheets"], Element: ["shadowRoot", "querySelector", "querySelectorAll"], MutationObserver: [] }, To = { Node: ["contains", "getRootNode"], ShadowRoot: ["getSelection"], Element: [], MutationObserver: ["constructor"] }, Sr = {};
|
|
614
614
|
function Mi(e) {
|
|
615
615
|
if (Sr[e]) return Sr[e];
|
|
@@ -633,7 +633,7 @@ function Mi(e) {
|
|
|
633
633
|
}
|
|
634
634
|
}
|
|
635
635
|
const Qs = {};
|
|
636
|
-
function
|
|
636
|
+
function et(e, t, r) {
|
|
637
637
|
var s;
|
|
638
638
|
const n = `${e}.${String(r)}`;
|
|
639
639
|
if (Qs[n]) return Qs[n].call(t);
|
|
@@ -647,28 +647,28 @@ function Ro(e, t, r) {
|
|
|
647
647
|
const n = Mi(e)[r];
|
|
648
648
|
return typeof n != "function" ? t[r] : (en[s] = n, n.bind(t));
|
|
649
649
|
}
|
|
650
|
-
const
|
|
651
|
-
return
|
|
650
|
+
const ye = { childNodes: function(e) {
|
|
651
|
+
return et("Node", e, "childNodes");
|
|
652
652
|
}, parentNode: function(e) {
|
|
653
|
-
return
|
|
653
|
+
return et("Node", e, "parentNode");
|
|
654
654
|
}, parentElement: function(e) {
|
|
655
|
-
return
|
|
655
|
+
return et("Node", e, "parentElement");
|
|
656
656
|
}, textContent: function(e) {
|
|
657
|
-
return
|
|
657
|
+
return et("Node", e, "textContent");
|
|
658
658
|
}, contains: function(e, t) {
|
|
659
659
|
return Ro("Node", e, "contains")(t);
|
|
660
660
|
}, getRootNode: function(e) {
|
|
661
661
|
return Ro("Node", e, "getRootNode")();
|
|
662
662
|
}, host: function(e) {
|
|
663
|
-
return e && "host" in e ?
|
|
663
|
+
return e && "host" in e ? et("ShadowRoot", e, "host") : null;
|
|
664
664
|
}, styleSheets: function(e) {
|
|
665
665
|
return e.styleSheets;
|
|
666
666
|
}, shadowRoot: function(e) {
|
|
667
|
-
return e && "shadowRoot" in e ?
|
|
667
|
+
return e && "shadowRoot" in e ? et("Element", e, "shadowRoot") : null;
|
|
668
668
|
}, querySelector: function(e, t) {
|
|
669
|
-
return
|
|
669
|
+
return et("Element", e, "querySelector")(t);
|
|
670
670
|
}, querySelectorAll: function(e, t) {
|
|
671
|
-
return
|
|
671
|
+
return et("Element", e, "querySelectorAll")(t);
|
|
672
672
|
}, mutationObserver: function() {
|
|
673
673
|
return Mi("MutationObserver").constructor;
|
|
674
674
|
} };
|
|
@@ -676,8 +676,8 @@ function xl(e) {
|
|
|
676
676
|
return e.nodeType === e.ELEMENT_NODE;
|
|
677
677
|
}
|
|
678
678
|
function Zt(e) {
|
|
679
|
-
const t = e && "host" in e && "mode" in e &&
|
|
680
|
-
return !!(t && "shadowRoot" in t &&
|
|
679
|
+
const t = e && "host" in e && "mode" in e && ye.host(e) || null;
|
|
680
|
+
return !!(t && "shadowRoot" in t && ye.shadowRoot(t) === e);
|
|
681
681
|
}
|
|
682
682
|
function Xt(e) {
|
|
683
683
|
return Object.prototype.toString.call(e) === "[object ShadowRoot]";
|
|
@@ -864,20 +864,20 @@ function Al(e, t, r) {
|
|
|
864
864
|
}
|
|
865
865
|
function ys(e, t, r) {
|
|
866
866
|
if (!e) return !1;
|
|
867
|
-
if (e.nodeType !== e.ELEMENT_NODE) return !!r && ys(
|
|
867
|
+
if (e.nodeType !== e.ELEMENT_NODE) return !!r && ys(ye.parentNode(e), t, r);
|
|
868
868
|
for (let s = e.classList.length; s--; ) {
|
|
869
869
|
const n = e.classList[s];
|
|
870
870
|
if (t.test(n)) return !0;
|
|
871
871
|
}
|
|
872
|
-
return !!r && ys(
|
|
872
|
+
return !!r && ys(ye.parentNode(e), t, r);
|
|
873
873
|
}
|
|
874
874
|
function Ml(e, t, r, s) {
|
|
875
875
|
let n;
|
|
876
876
|
if (xl(e)) {
|
|
877
|
-
if (n = e, !
|
|
877
|
+
if (n = e, !ye.childNodes(n).length) return !1;
|
|
878
878
|
} else {
|
|
879
|
-
if (
|
|
880
|
-
n =
|
|
879
|
+
if (ye.parentElement(e) === null) return !1;
|
|
880
|
+
n = ye.parentElement(e);
|
|
881
881
|
}
|
|
882
882
|
try {
|
|
883
883
|
if (typeof t == "string") {
|
|
@@ -895,7 +895,7 @@ function Ml(e, t, r, s) {
|
|
|
895
895
|
return !1;
|
|
896
896
|
}
|
|
897
897
|
function rp(e, t) {
|
|
898
|
-
const { doc: r, mirror: s, blockClass: n, blockSelector: i, needsMask: a, inlineStylesheet: o, maskInputOptions: l = {}, maskTextFn: c, maskInputFn: u, dataURLOptions: d = {}, inlineImages: h, recordCanvas: f, keepIframeSrcFn:
|
|
898
|
+
const { doc: r, mirror: s, blockClass: n, blockSelector: i, needsMask: a, inlineStylesheet: o, maskInputOptions: l = {}, maskTextFn: c, maskInputFn: u, dataURLOptions: d = {}, inlineImages: h, recordCanvas: f, keepIframeSrcFn: w, newlyAddedElement: p = !1 } = t, C = function(m, g) {
|
|
899
899
|
if (!g.hasNode(m)) return;
|
|
900
900
|
const v = g.getId(m);
|
|
901
901
|
return v === 1 ? void 0 : v;
|
|
@@ -904,10 +904,10 @@ function rp(e, t) {
|
|
|
904
904
|
case e.DOCUMENT_NODE:
|
|
905
905
|
return e.compatMode !== "CSS1Compat" ? { type: fe.Document, childNodes: [], compatMode: e.compatMode } : { type: fe.Document, childNodes: [] };
|
|
906
906
|
case e.DOCUMENT_TYPE_NODE:
|
|
907
|
-
return { type: fe.DocumentType, name: e.name, publicId: e.publicId, systemId: e.systemId, rootId:
|
|
907
|
+
return { type: fe.DocumentType, name: e.name, publicId: e.publicId, systemId: e.systemId, rootId: C };
|
|
908
908
|
case e.ELEMENT_NODE:
|
|
909
909
|
return function(m, g) {
|
|
910
|
-
const { doc: v, blockClass:
|
|
910
|
+
const { doc: v, blockClass: I, blockSelector: O, inlineStylesheet: E, maskInputOptions: A = {}, maskInputFn: M, dataURLOptions: k = {}, inlineImages: T, recordCanvas: R, keepIframeSrcFn: S, newlyAddedElement: P = !1, rootId: D } = g, b = function(L, _, ee) {
|
|
911
911
|
try {
|
|
912
912
|
if (typeof _ == "string") {
|
|
913
913
|
if (L.classList.contains(_)) return !0;
|
|
@@ -915,141 +915,141 @@ function rp(e, t) {
|
|
|
915
915
|
const me = L.classList[q];
|
|
916
916
|
if (_.test(me)) return !0;
|
|
917
917
|
}
|
|
918
|
-
if (
|
|
918
|
+
if (ee) return L.matches(ee);
|
|
919
919
|
} catch {
|
|
920
920
|
}
|
|
921
921
|
return !1;
|
|
922
|
-
}(m,
|
|
922
|
+
}(m, I, O), y = function(L) {
|
|
923
923
|
if (L instanceof HTMLFormElement) return "form";
|
|
924
924
|
const _ = ft(L.tagName);
|
|
925
925
|
return Xd.test(_) ? "div" : _;
|
|
926
926
|
}(m);
|
|
927
|
-
let
|
|
927
|
+
let U = {};
|
|
928
928
|
const F = m.attributes.length;
|
|
929
929
|
for (let L = 0; L < F; L++) {
|
|
930
930
|
const _ = m.attributes[L];
|
|
931
|
-
Al(y, _.name, _.value) || (
|
|
931
|
+
Al(y, _.name, _.value) || (U[_.name] = Ol(v, y, ft(_.name), _.value));
|
|
932
932
|
}
|
|
933
933
|
if (y === "link" && E) {
|
|
934
|
-
const L = Array.from(v.styleSheets).find((
|
|
934
|
+
const L = Array.from(v.styleSheets).find((ee) => ee.href === m.href);
|
|
935
935
|
let _ = null;
|
|
936
|
-
L && (_ = qr(L)), _ && (delete
|
|
936
|
+
L && (_ = qr(L)), _ && (delete U.rel, delete U.href, U._cssText = _);
|
|
937
937
|
}
|
|
938
|
-
if (y === "style" && m.sheet && !(m.innerText ||
|
|
938
|
+
if (y === "style" && m.sheet && !(m.innerText || ye.textContent(m) || "").trim().length) {
|
|
939
939
|
const L = qr(m.sheet);
|
|
940
|
-
L && (
|
|
940
|
+
L && (U._cssText = L);
|
|
941
941
|
}
|
|
942
942
|
if (y === "input" || y === "textarea" || y === "select") {
|
|
943
943
|
const L = m.value, _ = m.checked;
|
|
944
|
-
|
|
944
|
+
U.type !== "radio" && U.type !== "checkbox" && U.type !== "submit" && U.type !== "button" && L ? U.value = Ui({ element: m, type: Di(m), tagName: y, value: L, maskInputOptions: A, maskInputFn: M }) : _ && (U.checked = _);
|
|
945
945
|
}
|
|
946
|
-
if (y === "option" && (m.selected && !
|
|
946
|
+
if (y === "option" && (m.selected && !A.select ? U.selected = !0 : delete U.selected), y === "dialog" && m.open && (U.rr_open_mode = m.matches("dialog:modal") ? "modal" : "non-modal"), y === "canvas" && R) {
|
|
947
947
|
if (m.__context === "2d") (function(L) {
|
|
948
948
|
const _ = L.getContext("2d");
|
|
949
949
|
if (!_) return !0;
|
|
950
|
-
for (let
|
|
951
|
-
const me = _.getImageData,
|
|
952
|
-
if (new Uint32Array(
|
|
950
|
+
for (let ee = 0; ee < L.width; ee += 50) for (let q = 0; q < L.height; q += 50) {
|
|
951
|
+
const me = _.getImageData, _e = Lo in me ? me[Lo] : me;
|
|
952
|
+
if (new Uint32Array(_e.call(_, ee, q, Math.min(50, L.width - ee), Math.min(50, L.height - q)).data.buffer).some((we) => we !== 0)) return !1;
|
|
953
953
|
}
|
|
954
954
|
return !0;
|
|
955
|
-
})(m) || (
|
|
955
|
+
})(m) || (U.rr_dataURL = m.toDataURL(k.type, k.quality));
|
|
956
956
|
else if (!("__context" in m)) {
|
|
957
957
|
const L = m.toDataURL(k.type, k.quality), _ = v.createElement("canvas");
|
|
958
|
-
_.width = m.width, _.height = m.height, L !== _.toDataURL(k.type, k.quality) && (
|
|
958
|
+
_.width = m.width, _.height = m.height, L !== _.toDataURL(k.type, k.quality) && (U.rr_dataURL = L);
|
|
959
959
|
}
|
|
960
960
|
}
|
|
961
961
|
if (y === "img" && T) {
|
|
962
962
|
vt || (vt = v.createElement("canvas"), Ao = vt.getContext("2d"));
|
|
963
|
-
const L = m, _ = L.currentSrc || L.getAttribute("src") || "<unknown-src>",
|
|
963
|
+
const L = m, _ = L.currentSrc || L.getAttribute("src") || "<unknown-src>", ee = L.crossOrigin, q = () => {
|
|
964
964
|
L.removeEventListener("load", q);
|
|
965
965
|
try {
|
|
966
|
-
vt.width = L.naturalWidth, vt.height = L.naturalHeight, Ao.drawImage(L, 0, 0),
|
|
966
|
+
vt.width = L.naturalWidth, vt.height = L.naturalHeight, Ao.drawImage(L, 0, 0), U.rr_dataURL = vt.toDataURL(k.type, k.quality);
|
|
967
967
|
} catch (me) {
|
|
968
968
|
if (L.crossOrigin !== "anonymous") return L.crossOrigin = "anonymous", void (L.complete && L.naturalWidth !== 0 ? q() : L.addEventListener("load", q));
|
|
969
969
|
console.warn(`Cannot inline img src=${_}! Error: ${me}`);
|
|
970
970
|
}
|
|
971
|
-
L.crossOrigin === "anonymous" && (
|
|
971
|
+
L.crossOrigin === "anonymous" && (ee ? U.crossOrigin = ee : L.removeAttribute("crossorigin"));
|
|
972
972
|
};
|
|
973
973
|
L.complete && L.naturalWidth !== 0 ? q() : L.addEventListener("load", q);
|
|
974
974
|
}
|
|
975
975
|
if (y === "audio" || y === "video") {
|
|
976
|
-
const L =
|
|
976
|
+
const L = U;
|
|
977
977
|
L.rr_mediaState = m.paused ? "paused" : "played", L.rr_mediaCurrentTime = m.currentTime, L.rr_mediaPlaybackRate = m.playbackRate, L.rr_mediaMuted = m.muted, L.rr_mediaLoop = m.loop, L.rr_mediaVolume = m.volume;
|
|
978
978
|
}
|
|
979
|
-
if (
|
|
979
|
+
if (P || (m.scrollLeft && (U.rr_scrollLeft = m.scrollLeft), m.scrollTop && (U.rr_scrollTop = m.scrollTop)), b) {
|
|
980
980
|
const { width: L, height: _ } = m.getBoundingClientRect();
|
|
981
|
-
|
|
981
|
+
U = { class: U.class, rr_width: `${L}px`, rr_height: `${_}px` };
|
|
982
982
|
}
|
|
983
|
-
y !== "iframe" || S(
|
|
983
|
+
y !== "iframe" || S(U.src) || (m.contentDocument || (U.rr_src = U.src), delete U.src);
|
|
984
984
|
let j;
|
|
985
985
|
try {
|
|
986
986
|
customElements.get(y) && (j = !0);
|
|
987
987
|
} catch {
|
|
988
988
|
}
|
|
989
|
-
return { type: fe.Element, tagName: y, attributes:
|
|
990
|
-
}(e, { doc: r, blockClass: n, blockSelector: i, inlineStylesheet: o, maskInputOptions: l, maskInputFn: u, dataURLOptions: d, inlineImages: h, recordCanvas: f, keepIframeSrcFn:
|
|
989
|
+
return { type: fe.Element, tagName: y, attributes: U, childNodes: [], isSVG: tp(m) || void 0, needBlock: b, rootId: D, isCustom: j };
|
|
990
|
+
}(e, { doc: r, blockClass: n, blockSelector: i, inlineStylesheet: o, maskInputOptions: l, maskInputFn: u, dataURLOptions: d, inlineImages: h, recordCanvas: f, keepIframeSrcFn: w, newlyAddedElement: p, rootId: C });
|
|
991
991
|
case e.TEXT_NODE:
|
|
992
992
|
return function(m, g) {
|
|
993
993
|
var v;
|
|
994
|
-
const { needsMask:
|
|
995
|
-
let k =
|
|
996
|
-
const T =
|
|
994
|
+
const { needsMask: I, maskTextFn: O, rootId: E } = g, A = ye.parentNode(m), M = A && A.tagName;
|
|
995
|
+
let k = ye.textContent(m);
|
|
996
|
+
const T = M === "STYLE" || void 0, R = M === "SCRIPT" || void 0;
|
|
997
997
|
if (T && k) {
|
|
998
998
|
try {
|
|
999
|
-
m.nextSibling || m.previousSibling || (v =
|
|
999
|
+
m.nextSibling || m.previousSibling || (v = A.sheet) != null && v.cssRules && (k = qr(A.sheet));
|
|
1000
1000
|
} catch (S) {
|
|
1001
1001
|
console.warn(`Cannot get CSS styles from text's parentNode. Error: ${S}`, m);
|
|
1002
1002
|
}
|
|
1003
1003
|
k = gs(k, Pi(g.doc));
|
|
1004
1004
|
}
|
|
1005
|
-
return
|
|
1006
|
-
}(e, { doc: r, needsMask: a, maskTextFn: c, rootId:
|
|
1005
|
+
return R && (k = "SCRIPT_PLACEHOLDER"), !T && !R && k && I && (k = O ? O(k, ye.parentElement(m)) : k.replace(/[\S]/g, "*")), { type: fe.Text, textContent: k || "", isStyle: T, rootId: E };
|
|
1006
|
+
}(e, { doc: r, needsMask: a, maskTextFn: c, rootId: C });
|
|
1007
1007
|
case e.CDATA_SECTION_NODE:
|
|
1008
|
-
return { type: fe.CDATA, textContent: "", rootId:
|
|
1008
|
+
return { type: fe.CDATA, textContent: "", rootId: C };
|
|
1009
1009
|
case e.COMMENT_NODE:
|
|
1010
|
-
return { type: fe.Comment, textContent:
|
|
1010
|
+
return { type: fe.Comment, textContent: ye.textContent(e) || "", rootId: C };
|
|
1011
1011
|
default:
|
|
1012
1012
|
return !1;
|
|
1013
1013
|
}
|
|
1014
1014
|
}
|
|
1015
|
-
function
|
|
1015
|
+
function te(e) {
|
|
1016
1016
|
return e == null ? "" : e.toLowerCase();
|
|
1017
1017
|
}
|
|
1018
1018
|
function Et(e, t) {
|
|
1019
|
-
const { doc: r, mirror: s, blockClass: n, blockSelector: i, maskTextClass: a, maskTextSelector: o, skipChild: l = !1, inlineStylesheet: c = !0, maskInputOptions: u = {}, maskTextFn: d, maskInputFn: h, slimDOMOptions: f, dataURLOptions:
|
|
1020
|
-
let { needsMask:
|
|
1021
|
-
|
|
1022
|
-
const T = rp(e, { doc: r, mirror: s, blockClass: n, blockSelector: i, needsMask:
|
|
1019
|
+
const { doc: r, mirror: s, blockClass: n, blockSelector: i, maskTextClass: a, maskTextSelector: o, skipChild: l = !1, inlineStylesheet: c = !0, maskInputOptions: u = {}, maskTextFn: d, maskInputFn: h, slimDOMOptions: f, dataURLOptions: w = {}, inlineImages: p = !1, recordCanvas: C = !1, onSerialize: m, onIframeLoad: g, iframeLoadTimeout: v = 5e3, onStylesheetLoad: I, stylesheetLoadTimeout: O = 5e3, keepIframeSrcFn: E = () => !1, newlyAddedElement: A = !1 } = t;
|
|
1020
|
+
let { needsMask: M } = t, { preserveWhiteSpace: k = !0 } = t;
|
|
1021
|
+
M || (M = Ml(e, a, o, M === void 0));
|
|
1022
|
+
const T = rp(e, { doc: r, mirror: s, blockClass: n, blockSelector: i, needsMask: M, inlineStylesheet: c, maskInputOptions: u, maskTextFn: d, maskInputFn: h, dataURLOptions: w, inlineImages: p, recordCanvas: C, keepIframeSrcFn: E, newlyAddedElement: A });
|
|
1023
1023
|
if (!T) return console.warn(e, "not serialized"), null;
|
|
1024
|
-
let
|
|
1025
|
-
|
|
1026
|
-
return !!(y.comment &&
|
|
1024
|
+
let R;
|
|
1025
|
+
R = s.hasNode(e) ? s.getId(e) : !function(b, y) {
|
|
1026
|
+
return !!(y.comment && b.type === fe.Comment || b.type === fe.Element && (y.script && (b.tagName === "script" || b.tagName === "link" && (b.attributes.rel === "preload" || b.attributes.rel === "modulepreload") && b.attributes.as === "script" || b.tagName === "link" && b.attributes.rel === "prefetch" && typeof b.attributes.href == "string" && Oo(b.attributes.href) === "js") || y.headFavicon && (b.tagName === "link" && b.attributes.rel === "shortcut icon" || b.tagName === "meta" && (te(b.attributes.name).match(/^msapplication-tile(image|color)$/) || te(b.attributes.name) === "application-name" || te(b.attributes.rel) === "icon" || te(b.attributes.rel) === "apple-touch-icon" || te(b.attributes.rel) === "shortcut icon")) || b.tagName === "meta" && (y.headMetaDescKeywords && te(b.attributes.name).match(/^description|keywords$/) || y.headMetaSocial && (te(b.attributes.property).match(/^(og|twitter|fb):/) || te(b.attributes.name).match(/^(og|twitter):/) || te(b.attributes.name) === "pinterest") || y.headMetaRobots && (te(b.attributes.name) === "robots" || te(b.attributes.name) === "googlebot" || te(b.attributes.name) === "bingbot") || y.headMetaHttpEquiv && b.attributes["http-equiv"] !== void 0 || y.headMetaAuthorship && (te(b.attributes.name) === "author" || te(b.attributes.name) === "generator" || te(b.attributes.name) === "framework" || te(b.attributes.name) === "publisher" || te(b.attributes.name) === "progid" || te(b.attributes.property).match(/^article:/) || te(b.attributes.property).match(/^product:/)) || y.headMetaVerification && (te(b.attributes.name) === "google-site-verification" || te(b.attributes.name) === "yandex-verification" || te(b.attributes.name) === "csrf-token" || te(b.attributes.name) === "p:domain_verify" || te(b.attributes.name) === "verify-v1" || te(b.attributes.name) === "verification" || te(b.attributes.name) === "shopify-checkout-api-token"))));
|
|
1027
1027
|
}(T, f) && (k || T.type !== fe.Text || T.isStyle || T.textContent.replace(/^\s+|\s+$/gm, "").length) ? Ll() : -2;
|
|
1028
|
-
const S = Object.assign(T, { id:
|
|
1029
|
-
if (s.add(e, S),
|
|
1028
|
+
const S = Object.assign(T, { id: R });
|
|
1029
|
+
if (s.add(e, S), R === -2) return null;
|
|
1030
1030
|
m && m(e);
|
|
1031
|
-
let
|
|
1031
|
+
let P = !l;
|
|
1032
1032
|
if (S.type === fe.Element) {
|
|
1033
|
-
|
|
1034
|
-
const
|
|
1035
|
-
|
|
1033
|
+
P = P && !S.needBlock, delete S.needBlock;
|
|
1034
|
+
const b = ye.shadowRoot(e);
|
|
1035
|
+
b && Xt(b) && (S.isShadowHost = !0);
|
|
1036
1036
|
}
|
|
1037
|
-
if ((S.type === fe.Document || S.type === fe.Element) &&
|
|
1037
|
+
if ((S.type === fe.Document || S.type === fe.Element) && P) {
|
|
1038
1038
|
f.headWhitespace && S.type === fe.Element && S.tagName === "head" && (k = !1);
|
|
1039
|
-
const
|
|
1040
|
-
if (!(S.type === fe.Element && S.tagName === "textarea" && S.attributes.value !== void 0)) for (const
|
|
1041
|
-
const F = Et(
|
|
1039
|
+
const b = { doc: r, mirror: s, blockClass: n, blockSelector: i, needsMask: M, maskTextClass: a, maskTextSelector: o, skipChild: l, inlineStylesheet: c, maskInputOptions: u, maskTextFn: d, maskInputFn: h, slimDOMOptions: f, dataURLOptions: w, inlineImages: p, recordCanvas: C, preserveWhiteSpace: k, onSerialize: m, onIframeLoad: g, iframeLoadTimeout: v, onStylesheetLoad: I, stylesheetLoadTimeout: O, keepIframeSrcFn: E };
|
|
1040
|
+
if (!(S.type === fe.Element && S.tagName === "textarea" && S.attributes.value !== void 0)) for (const U of Array.from(ye.childNodes(e))) {
|
|
1041
|
+
const F = Et(U, b);
|
|
1042
1042
|
F && S.childNodes.push(F);
|
|
1043
1043
|
}
|
|
1044
1044
|
let y = null;
|
|
1045
|
-
if (xl(e) && (y =
|
|
1046
|
-
const F = Et(
|
|
1045
|
+
if (xl(e) && (y = ye.shadowRoot(e))) for (const U of Array.from(ye.childNodes(y))) {
|
|
1046
|
+
const F = Et(U, b);
|
|
1047
1047
|
F && (Xt(y) && (F.isShadow = !0), S.childNodes.push(F));
|
|
1048
1048
|
}
|
|
1049
1049
|
}
|
|
1050
|
-
const
|
|
1051
|
-
return
|
|
1052
|
-
const F =
|
|
1050
|
+
const D = ye.parentNode(e);
|
|
1051
|
+
return D && Zt(D) && Xt(D) && (S.isShadow = !0), S.type === fe.Element && S.tagName === "iframe" && function(b, y, U) {
|
|
1052
|
+
const F = b.contentWindow;
|
|
1053
1053
|
if (!F) return;
|
|
1054
1054
|
let j, L = !1;
|
|
1055
1055
|
try {
|
|
@@ -1058,40 +1058,40 @@ function Et(e, t) {
|
|
|
1058
1058
|
return;
|
|
1059
1059
|
}
|
|
1060
1060
|
if (j !== "complete") {
|
|
1061
|
-
const
|
|
1061
|
+
const ee = setTimeout(() => {
|
|
1062
1062
|
L || (y(), L = !0);
|
|
1063
|
-
},
|
|
1064
|
-
return void
|
|
1065
|
-
clearTimeout(
|
|
1063
|
+
}, U);
|
|
1064
|
+
return void b.addEventListener("load", () => {
|
|
1065
|
+
clearTimeout(ee), L = !0, y();
|
|
1066
1066
|
});
|
|
1067
1067
|
}
|
|
1068
1068
|
const _ = "about:blank";
|
|
1069
|
-
if (F.location.href !== _ ||
|
|
1070
|
-
|
|
1069
|
+
if (F.location.href !== _ || b.src === _ || b.src === "") return setTimeout(y, 0), b.addEventListener("load", y);
|
|
1070
|
+
b.addEventListener("load", y);
|
|
1071
1071
|
}(e, () => {
|
|
1072
|
-
const
|
|
1073
|
-
if (
|
|
1074
|
-
const y = Et(
|
|
1072
|
+
const b = e.contentDocument;
|
|
1073
|
+
if (b && g) {
|
|
1074
|
+
const y = Et(b, { doc: b, mirror: s, blockClass: n, blockSelector: i, needsMask: M, maskTextClass: a, maskTextSelector: o, skipChild: !1, inlineStylesheet: c, maskInputOptions: u, maskTextFn: d, maskInputFn: h, slimDOMOptions: f, dataURLOptions: w, inlineImages: p, recordCanvas: C, preserveWhiteSpace: k, onSerialize: m, onIframeLoad: g, iframeLoadTimeout: v, onStylesheetLoad: I, stylesheetLoadTimeout: O, keepIframeSrcFn: E });
|
|
1075
1075
|
y && g(e, y);
|
|
1076
1076
|
}
|
|
1077
|
-
}, v), S.type === fe.Element && S.tagName === "link" && typeof S.attributes.rel == "string" && (S.attributes.rel === "stylesheet" || S.attributes.rel === "preload" && typeof S.attributes.href == "string" && Oo(S.attributes.href) === "css") && function(
|
|
1077
|
+
}, v), S.type === fe.Element && S.tagName === "link" && typeof S.attributes.rel == "string" && (S.attributes.rel === "stylesheet" || S.attributes.rel === "preload" && typeof S.attributes.href == "string" && Oo(S.attributes.href) === "css") && function(b, y, U) {
|
|
1078
1078
|
let F, j = !1;
|
|
1079
1079
|
try {
|
|
1080
|
-
F =
|
|
1080
|
+
F = b.sheet;
|
|
1081
1081
|
} catch {
|
|
1082
1082
|
return;
|
|
1083
1083
|
}
|
|
1084
1084
|
if (F) return;
|
|
1085
1085
|
const L = setTimeout(() => {
|
|
1086
1086
|
j || (y(), j = !0);
|
|
1087
|
-
},
|
|
1088
|
-
|
|
1087
|
+
}, U);
|
|
1088
|
+
b.addEventListener("load", () => {
|
|
1089
1089
|
clearTimeout(L), j = !0, y();
|
|
1090
1090
|
});
|
|
1091
1091
|
}(e, () => {
|
|
1092
|
-
if (
|
|
1093
|
-
const
|
|
1094
|
-
|
|
1092
|
+
if (I) {
|
|
1093
|
+
const b = Et(e, { doc: r, mirror: s, blockClass: n, blockSelector: i, needsMask: M, maskTextClass: a, maskTextSelector: o, skipChild: !1, inlineStylesheet: c, maskInputOptions: u, maskTextFn: d, maskInputFn: h, slimDOMOptions: f, dataURLOptions: w, inlineImages: p, recordCanvas: C, preserveWhiteSpace: k, onSerialize: m, onIframeLoad: g, iframeLoadTimeout: v, onStylesheetLoad: I, stylesheetLoadTimeout: O, keepIframeSrcFn: E });
|
|
1094
|
+
b && I(e, b);
|
|
1095
1095
|
}
|
|
1096
1096
|
}, O), S;
|
|
1097
1097
|
}
|
|
@@ -1119,8 +1119,8 @@ var xn = { exports: {} }, ie = String, Uo = function() {
|
|
|
1119
1119
|
};
|
|
1120
1120
|
xn.exports = Uo(), xn.exports.createColors = Uo;
|
|
1121
1121
|
var ip = xn.exports;
|
|
1122
|
-
const
|
|
1123
|
-
let Do = ip, Po =
|
|
1122
|
+
const De = np(Object.freeze(Object.defineProperty({ __proto__: null, default: {} }, Symbol.toStringTag, { value: "Module" })));
|
|
1123
|
+
let Do = ip, Po = De, Tn = class Ul extends Error {
|
|
1124
1124
|
constructor(t, r, s, n, i, a) {
|
|
1125
1125
|
super(t), this.name = "CssSyntaxError", this.reason = t, i && (this.file = i), n && (this.source = n), a && (this.plugin = a), r !== void 0 && s !== void 0 && (typeof r == "number" ? (this.line = r, this.column = s) : (this.line = r.line, this.column = r.column, this.endLine = s.line, this.endColumn = s.column)), this.setMessage(), Error.captureStackTrace && Error.captureStackTrace(this, Ul);
|
|
1126
1126
|
}
|
|
@@ -1491,7 +1491,7 @@ var pp = { nanoid: (e = 21) => {
|
|
|
1491
1491
|
for (; r--; ) t += "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64 * Math.random() | 0];
|
|
1492
1492
|
return t;
|
|
1493
1493
|
} };
|
|
1494
|
-
let { SourceMapConsumer: No, SourceMapGenerator: Fo } =
|
|
1494
|
+
let { SourceMapConsumer: No, SourceMapGenerator: Fo } = De, { existsSync: hp, readFileSync: mp } = De, { dirname: tn, join: fp } = De, Un = class {
|
|
1495
1495
|
constructor(e, t) {
|
|
1496
1496
|
if (t.map === !1) return;
|
|
1497
1497
|
this.loadAnnotation(e), this.inline = this.startWith(this.annotation, "data:");
|
|
@@ -1558,7 +1558,7 @@ let { SourceMapConsumer: No, SourceMapGenerator: Fo } = Ue, { existsSync: hp, re
|
|
|
1558
1558
|
};
|
|
1559
1559
|
var Pl = Un;
|
|
1560
1560
|
Un.default = Un;
|
|
1561
|
-
let { SourceMapConsumer: gp, SourceMapGenerator: yp } =
|
|
1561
|
+
let { SourceMapConsumer: gp, SourceMapGenerator: yp } = De, { fileURLToPath: Bo, pathToFileURL: Cr } = De, { isAbsolute: Dn, resolve: Pn } = De, { nanoid: wp } = pp, rn = De, zo = _i, bp = Pl, sn = Symbol("fromOffsetCache"), vp = !!(gp && yp), jo = !!(Pn && Dn), Jr = class {
|
|
1562
1562
|
constructor(e, t = {}) {
|
|
1563
1563
|
if (e == null || typeof e == "object" && !e.toString) throw new Error(`PostCSS received ${e} instead of CSS string`);
|
|
1564
1564
|
if (this.css = e.toString(), this.css[0] === "\uFEFF" || this.css[0] === "" ? (this.hasBOM = !0, this.css = this.css.slice(1)) : this.hasBOM = !1, t.from && (!jo || /^\w+:\/\//.test(t.from) || Dn(t.from) ? this.file = t.from : this.file = Pn(t.from)), jo && vp) {
|
|
@@ -1644,7 +1644,7 @@ let { SourceMapConsumer: gp, SourceMapGenerator: yp } = Ue, { fileURLToPath: Bo,
|
|
|
1644
1644
|
};
|
|
1645
1645
|
var Bs = Jr;
|
|
1646
1646
|
Jr.default = Jr, rn && rn.registerInput && rn.registerInput(Jr);
|
|
1647
|
-
let { SourceMapConsumer: _l, SourceMapGenerator: Kr } =
|
|
1647
|
+
let { SourceMapConsumer: _l, SourceMapGenerator: Kr } = De, { dirname: Zr, relative: Nl, resolve: Fl, sep: Bl } = De, { pathToFileURL: Wo } = De, Sp = Bs, Ip = !!(_l && Kr), Cp = !!(Zr && Fl && Nl && Bl);
|
|
1648
1648
|
var zl = class {
|
|
1649
1649
|
constructor(e, t, r, s) {
|
|
1650
1650
|
this.stringify = e, this.mapOpts = r.map || {}, this.root = t, this.opts = r, this.css = s, this.originalCSS = s, this.usesFileUrls = !this.mapOpts.from && this.mapOpts.absolute, this.memoizedFileURLs = /* @__PURE__ */ new Map(), this.memoizedPaths = /* @__PURE__ */ new Map(), this.memoizedURLs = /* @__PURE__ */ new Map();
|
|
@@ -1784,14 +1784,14 @@ let kp = Ns, _n = class extends kp {
|
|
|
1784
1784
|
};
|
|
1785
1785
|
var zs = _n;
|
|
1786
1786
|
_n.default = _n;
|
|
1787
|
-
let jl, Ni, Fi, Wl, { isClean: Vl, my:
|
|
1787
|
+
let jl, Ni, Fi, Wl, { isClean: Vl, my: Hl } = ir, Gl = Fs, $l = zs, Ep = Ns;
|
|
1788
1788
|
function Yl(e) {
|
|
1789
1789
|
return e.map((t) => (t.nodes && (t.nodes = Yl(t.nodes)), delete t.source, t));
|
|
1790
1790
|
}
|
|
1791
1791
|
function ql(e) {
|
|
1792
1792
|
if (e[Vl] = !1, e.proxyOf.nodes) for (let t of e.proxyOf.nodes) ql(t);
|
|
1793
1793
|
}
|
|
1794
|
-
let
|
|
1794
|
+
let Je = class Jl extends Ep {
|
|
1795
1795
|
append(...t) {
|
|
1796
1796
|
for (let r of t) {
|
|
1797
1797
|
let s = this.normalize(r, this.last);
|
|
@@ -1848,14 +1848,14 @@ let qe = class Jl extends Ep {
|
|
|
1848
1848
|
} else if (t.type) t = [t];
|
|
1849
1849
|
else if (t.prop) {
|
|
1850
1850
|
if (t.value === void 0) throw new Error("Value field is missed in node creation");
|
|
1851
|
-
typeof t.value != "string" && (t.value = String(t.value)), t = [new
|
|
1851
|
+
typeof t.value != "string" && (t.value = String(t.value)), t = [new Gl(t)];
|
|
1852
1852
|
} else if (t.selector) t = [new Ni(t)];
|
|
1853
1853
|
else if (t.name) t = [new Fi(t)];
|
|
1854
1854
|
else {
|
|
1855
1855
|
if (!t.text) throw new Error("Unknown node type in node creation");
|
|
1856
1856
|
t = [new $l(t)];
|
|
1857
1857
|
}
|
|
1858
|
-
return t.map((s) => (s[
|
|
1858
|
+
return t.map((s) => (s[Hl] || Jl.rebuild(s), (s = s.proxyOf).parent && s.parent.removeChild(s), s[Vl] && ql(s), s.raws.before === void 0 && r && r.raws.before !== void 0 && (s.raws.before = r.raws.before.replace(/\S/g, "")), s.parent = this.proxyOf, s));
|
|
1859
1859
|
}
|
|
1860
1860
|
prepend(...t) {
|
|
1861
1861
|
t = t.reverse();
|
|
@@ -1937,19 +1937,19 @@ let qe = class Jl extends Ep {
|
|
|
1937
1937
|
if (this.proxyOf.nodes) return this.proxyOf.nodes[this.proxyOf.nodes.length - 1];
|
|
1938
1938
|
}
|
|
1939
1939
|
};
|
|
1940
|
-
|
|
1940
|
+
Je.registerParse = (e) => {
|
|
1941
1941
|
jl = e;
|
|
1942
|
-
},
|
|
1942
|
+
}, Je.registerRule = (e) => {
|
|
1943
1943
|
Ni = e;
|
|
1944
|
-
},
|
|
1944
|
+
}, Je.registerAtRule = (e) => {
|
|
1945
1945
|
Fi = e;
|
|
1946
|
-
},
|
|
1946
|
+
}, Je.registerRoot = (e) => {
|
|
1947
1947
|
Wl = e;
|
|
1948
1948
|
};
|
|
1949
|
-
var yt =
|
|
1950
|
-
|
|
1951
|
-
e.type === "atrule" ? Object.setPrototypeOf(e, Fi.prototype) : e.type === "rule" ? Object.setPrototypeOf(e, Ni.prototype) : e.type === "decl" ? Object.setPrototypeOf(e,
|
|
1952
|
-
|
|
1949
|
+
var yt = Je;
|
|
1950
|
+
Je.default = Je, Je.rebuild = (e) => {
|
|
1951
|
+
e.type === "atrule" ? Object.setPrototypeOf(e, Fi.prototype) : e.type === "rule" ? Object.setPrototypeOf(e, Ni.prototype) : e.type === "decl" ? Object.setPrototypeOf(e, Gl.prototype) : e.type === "comment" ? Object.setPrototypeOf(e, $l.prototype) : e.type === "root" && Object.setPrototypeOf(e, Wl.prototype), e[Hl] = !0, e.nodes && e.nodes.forEach((t) => {
|
|
1952
|
+
Je.rebuild(t);
|
|
1953
1953
|
});
|
|
1954
1954
|
};
|
|
1955
1955
|
let Kl, Zl, xp = yt, or = class extends xp {
|
|
@@ -2002,7 +2002,7 @@ let Tp = Xl, Fn = class {
|
|
|
2002
2002
|
};
|
|
2003
2003
|
var zi = Fn;
|
|
2004
2004
|
Fn.default = Fn;
|
|
2005
|
-
const nn = 39, Vo = 34, kr = 92,
|
|
2005
|
+
const nn = 39, Vo = 34, kr = 92, Ho = 47, Er = 10, Bt = 32, xr = 12, Tr = 9, Rr = 13, Rp = 91, Lp = 93, Op = 40, Ap = 41, Mp = 123, Up = 125, Dp = 59, Pp = 42, _p = 58, Np = 64, Lr = /[\t\n\f\r "#'()/;[\\\]{}]/g, Or = /[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g, Fp = /.[\r\n"'(/\\]/, Go = /[\da-f]/i;
|
|
2006
2006
|
let Ql = yt, Xr = class extends Ql {
|
|
2007
2007
|
constructor(e) {
|
|
2008
2008
|
super(e), this.type = "atrule";
|
|
@@ -2066,18 +2066,18 @@ let nc = yt, Bp = sc, Qr = class extends nc {
|
|
|
2066
2066
|
var Wi = Qr;
|
|
2067
2067
|
Qr.default = Qr, nc.registerRule(Qr);
|
|
2068
2068
|
let zp = Fs, jp = function(e, t = {}) {
|
|
2069
|
-
let r, s, n, i, a, o, l, c, u, d, h = e.css.valueOf(), f = t.ignoreErrors,
|
|
2069
|
+
let r, s, n, i, a, o, l, c, u, d, h = e.css.valueOf(), f = t.ignoreErrors, w = h.length, p = 0, C = [], m = [];
|
|
2070
2070
|
function g(v) {
|
|
2071
2071
|
throw e.error("Unclosed " + v, p);
|
|
2072
2072
|
}
|
|
2073
2073
|
return { back: function(v) {
|
|
2074
2074
|
m.push(v);
|
|
2075
2075
|
}, endOfFile: function() {
|
|
2076
|
-
return m.length === 0 && p >=
|
|
2076
|
+
return m.length === 0 && p >= w;
|
|
2077
2077
|
}, nextToken: function(v) {
|
|
2078
2078
|
if (m.length) return m.pop();
|
|
2079
|
-
if (p >=
|
|
2080
|
-
let
|
|
2079
|
+
if (p >= w) return;
|
|
2080
|
+
let I = !!v && v.ignoreUnclosed;
|
|
2081
2081
|
switch (r = h.charCodeAt(p), r) {
|
|
2082
2082
|
case Er:
|
|
2083
2083
|
case Bt:
|
|
@@ -2102,11 +2102,11 @@ let zp = Fs, jp = function(e, t = {}) {
|
|
|
2102
2102
|
break;
|
|
2103
2103
|
}
|
|
2104
2104
|
case Op:
|
|
2105
|
-
if (c =
|
|
2105
|
+
if (c = C.length ? C.pop()[1] : "", u = h.charCodeAt(p + 1), c === "url" && u !== nn && u !== Vo && u !== Bt && u !== Er && u !== Tr && u !== xr && u !== Rr) {
|
|
2106
2106
|
s = p;
|
|
2107
2107
|
do {
|
|
2108
2108
|
if (o = !1, s = h.indexOf(")", s + 1), s === -1) {
|
|
2109
|
-
if (f ||
|
|
2109
|
+
if (f || I) {
|
|
2110
2110
|
s = p;
|
|
2111
2111
|
break;
|
|
2112
2112
|
}
|
|
@@ -2122,7 +2122,7 @@ let zp = Fs, jp = function(e, t = {}) {
|
|
|
2122
2122
|
n = r === nn ? "'" : '"', s = p;
|
|
2123
2123
|
do {
|
|
2124
2124
|
if (o = !1, s = h.indexOf(n, s + 1), s === -1) {
|
|
2125
|
-
if (f ||
|
|
2125
|
+
if (f || I) {
|
|
2126
2126
|
s = p + 1;
|
|
2127
2127
|
break;
|
|
2128
2128
|
}
|
|
@@ -2137,24 +2137,24 @@ let zp = Fs, jp = function(e, t = {}) {
|
|
|
2137
2137
|
break;
|
|
2138
2138
|
case kr:
|
|
2139
2139
|
for (s = p, a = !0; h.charCodeAt(s + 1) === kr; ) s += 1, a = !a;
|
|
2140
|
-
if (r = h.charCodeAt(s + 1), a && r !==
|
|
2141
|
-
for (;
|
|
2140
|
+
if (r = h.charCodeAt(s + 1), a && r !== Ho && r !== Bt && r !== Er && r !== Tr && r !== Rr && r !== xr && (s += 1, Go.test(h.charAt(s)))) {
|
|
2141
|
+
for (; Go.test(h.charAt(s + 1)); ) s += 1;
|
|
2142
2142
|
h.charCodeAt(s + 1) === Bt && (s += 1);
|
|
2143
2143
|
}
|
|
2144
2144
|
d = ["word", h.slice(p, s + 1), p, s], p = s;
|
|
2145
2145
|
break;
|
|
2146
2146
|
default:
|
|
2147
|
-
r ===
|
|
2147
|
+
r === Ho && h.charCodeAt(p + 1) === Pp ? (s = h.indexOf("*/", p + 2) + 1, s === 0 && (f || I ? s = h.length : g("comment")), d = ["comment", h.slice(p, s + 1), p, s], p = s) : (Or.lastIndex = p + 1, Or.test(h), s = Or.lastIndex === 0 ? h.length - 1 : Or.lastIndex - 2, d = ["word", h.slice(p, s + 1), p, s], C.push(d), p = s);
|
|
2148
2148
|
}
|
|
2149
2149
|
return p++, d;
|
|
2150
2150
|
}, position: function() {
|
|
2151
2151
|
return p;
|
|
2152
2152
|
} };
|
|
2153
|
-
}, Wp = zs, Vp = ji,
|
|
2153
|
+
}, Wp = zs, Vp = ji, Hp = gr, $o = Wi;
|
|
2154
2154
|
const Yo = { empty: !0, space: !0 };
|
|
2155
|
-
var
|
|
2155
|
+
var Gp = class {
|
|
2156
2156
|
constructor(e) {
|
|
2157
|
-
this.input = e, this.root = new
|
|
2157
|
+
this.input = e, this.root = new Hp(), this.current = this.root, this.spaces = "", this.semicolon = !1, this.createTokenizer(), this.root.source = { input: e, start: { column: 1, line: 1, offset: 0 } };
|
|
2158
2158
|
}
|
|
2159
2159
|
atrule(e) {
|
|
2160
2160
|
let t, r, s, n = new Vp();
|
|
@@ -2396,7 +2396,7 @@ var Hp = class {
|
|
|
2396
2396
|
throw this.input.error("At-rule without name", { offset: t[2] }, { offset: t[2] + t[1].length });
|
|
2397
2397
|
}
|
|
2398
2398
|
};
|
|
2399
|
-
let $p = yt, Yp =
|
|
2399
|
+
let $p = yt, Yp = Gp, qp = Bs;
|
|
2400
2400
|
function es(e, t) {
|
|
2401
2401
|
let r = new qp(e, t), s = new Yp(r);
|
|
2402
2402
|
try {
|
|
@@ -2408,7 +2408,7 @@ function es(e, t) {
|
|
|
2408
2408
|
}
|
|
2409
2409
|
var Vi = es;
|
|
2410
2410
|
es.default = es, $p.registerParse(es);
|
|
2411
|
-
let { isClean:
|
|
2411
|
+
let { isClean: Ne, my: Jp } = ir, Kp = zl, Zp = _s, Xp = yt, Qp = Bi, qo = zi, eh = Vi, th = gr;
|
|
2412
2412
|
const rh = { atrule: "AtRule", comment: "Comment", decl: "Declaration", document: "Document", root: "Root", rule: "Rule" }, sh = { AtRule: !0, AtRuleExit: !0, Comment: !0, CommentExit: !0, Declaration: !0, DeclarationExit: !0, Document: !0, DocumentExit: !0, Once: !0, OnceExit: !0, postcssPlugin: !0, prepare: !0, Root: !0, RootExit: !0, Rule: !0, RuleExit: !0 }, nh = { Once: !0, postcssPlugin: !0, prepare: !0 };
|
|
2413
2413
|
function zt(e) {
|
|
2414
2414
|
return typeof e == "object" && typeof e.then == "function";
|
|
@@ -2422,7 +2422,7 @@ function Jo(e) {
|
|
|
2422
2422
|
return t = e.type === "document" ? ["Document", 0, "DocumentExit"] : e.type === "root" ? ["Root", 0, "RootExit"] : ic(e), { eventIndex: 0, events: t, iterator: 0, node: e, visitorIndex: 0, visitors: [] };
|
|
2423
2423
|
}
|
|
2424
2424
|
function Bn(e) {
|
|
2425
|
-
return e[
|
|
2425
|
+
return e[Ne] = !1, e.nodes && e.nodes.forEach((t) => Bn(t)), e;
|
|
2426
2426
|
}
|
|
2427
2427
|
let zn = {}, xt = class oc {
|
|
2428
2428
|
constructor(t, r, s) {
|
|
@@ -2486,8 +2486,8 @@ let zn = {}, xt = class oc {
|
|
|
2486
2486
|
}
|
|
2487
2487
|
if (this.prepareVisitors(), this.hasListener) {
|
|
2488
2488
|
let t = this.result.root;
|
|
2489
|
-
for (; !t[
|
|
2490
|
-
t[
|
|
2489
|
+
for (; !t[Ne]; ) {
|
|
2490
|
+
t[Ne] = !0;
|
|
2491
2491
|
let r = [Jo(t)];
|
|
2492
2492
|
for (; r.length > 0; ) {
|
|
2493
2493
|
let s = this.visitTick(r);
|
|
@@ -2545,7 +2545,7 @@ let zn = {}, xt = class oc {
|
|
|
2545
2545
|
if (zt(this.runOnRoot(t))) throw this.getAsyncError();
|
|
2546
2546
|
if (this.prepareVisitors(), this.hasListener) {
|
|
2547
2547
|
let t = this.result.root;
|
|
2548
|
-
for (; !t[
|
|
2548
|
+
for (; !t[Ne]; ) t[Ne] = !0, this.walkSync(t);
|
|
2549
2549
|
if (this.listeners.OnceExit) if (t.type === "document") for (let r of t.nodes) this.visitSync(this.listeners.OnceExit, r);
|
|
2550
2550
|
else this.visitSync(this.listeners.OnceExit, t);
|
|
2551
2551
|
}
|
|
@@ -2584,22 +2584,22 @@ let zn = {}, xt = class oc {
|
|
|
2584
2584
|
}
|
|
2585
2585
|
if (r.iterator !== 0) {
|
|
2586
2586
|
let a, o = r.iterator;
|
|
2587
|
-
for (; a = s.nodes[s.indexes[o]]; ) if (s.indexes[o] += 1, !a[
|
|
2587
|
+
for (; a = s.nodes[s.indexes[o]]; ) if (s.indexes[o] += 1, !a[Ne]) return a[Ne] = !0, void t.push(Jo(a));
|
|
2588
2588
|
r.iterator = 0, delete s.indexes[o];
|
|
2589
2589
|
}
|
|
2590
2590
|
let i = r.events;
|
|
2591
2591
|
for (; r.eventIndex < i.length; ) {
|
|
2592
2592
|
let a = i[r.eventIndex];
|
|
2593
|
-
if (r.eventIndex += 1, a === 0) return void (s.nodes && s.nodes.length && (s[
|
|
2593
|
+
if (r.eventIndex += 1, a === 0) return void (s.nodes && s.nodes.length && (s[Ne] = !0, r.iterator = s.getIterator()));
|
|
2594
2594
|
if (this.listeners[a]) return void (r.visitors = this.listeners[a]);
|
|
2595
2595
|
}
|
|
2596
2596
|
t.pop();
|
|
2597
2597
|
}
|
|
2598
2598
|
walkSync(t) {
|
|
2599
|
-
t[
|
|
2599
|
+
t[Ne] = !0;
|
|
2600
2600
|
let r = ic(t);
|
|
2601
2601
|
for (let s of r) if (s === 0) t.nodes && t.each((n) => {
|
|
2602
|
-
n[
|
|
2602
|
+
n[Ne] || this.walkSync(n);
|
|
2603
2603
|
});
|
|
2604
2604
|
else {
|
|
2605
2605
|
let n = this.listeners[s];
|
|
@@ -2712,7 +2712,7 @@ let jn = class {
|
|
|
2712
2712
|
};
|
|
2713
2713
|
var ch = jn;
|
|
2714
2714
|
jn.default = jn;
|
|
2715
|
-
let uh = ch, dh = ac, ph = Bi, hh = gr,
|
|
2715
|
+
let uh = ch, dh = ac, ph = Bi, hh = gr, Ht = class {
|
|
2716
2716
|
constructor(e = []) {
|
|
2717
2717
|
this.version = "8.4.38", this.plugins = this.normalize(e);
|
|
2718
2718
|
}
|
|
@@ -2731,8 +2731,8 @@ let uh = ch, dh = ac, ph = Bi, hh = gr, Gt = class {
|
|
|
2731
2731
|
return this.plugins = this.plugins.concat(this.normalize([e])), this;
|
|
2732
2732
|
}
|
|
2733
2733
|
};
|
|
2734
|
-
var mh =
|
|
2735
|
-
|
|
2734
|
+
var mh = Ht;
|
|
2735
|
+
Ht.default = Ht, hh.registerProcessor(Ht), ph.registerProcessor(Ht);
|
|
2736
2736
|
let fh = Fs, gh = Pl, yh = zs, wh = ji, bh = Bs, vh = gr, Sh = Wi;
|
|
2737
2737
|
function lr(e, t) {
|
|
2738
2738
|
if (Array.isArray(e)) return e.map((n) => lr(n));
|
|
@@ -2778,7 +2778,7 @@ var Dh = K;
|
|
|
2778
2778
|
K.default = K;
|
|
2779
2779
|
const le = sp(Dh);
|
|
2780
2780
|
le.stringify, le.fromJSON, le.plugin, le.parse, le.list, le.document, le.comment, le.atRule, le.rule, le.decl, le.root, le.CssSyntaxError, le.Declaration, le.Container, le.Processor, le.Document, le.Comment, le.Warning, le.AtRule, le.Result, le.Input, le.Rule, le.Root, le.Node;
|
|
2781
|
-
var Ph = Object.defineProperty,
|
|
2781
|
+
var Ph = Object.defineProperty, Re = (e, t, r) => ((s, n, i) => n in s ? Ph(s, n, { enumerable: !0, configurable: !0, writable: !0, value: i }) : s[n] = i)(e, typeof t != "symbol" ? t + "" : t, r);
|
|
2782
2782
|
function _h(e) {
|
|
2783
2783
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
2784
2784
|
}
|
|
@@ -2803,8 +2803,8 @@ var Vn = { exports: {} }, oe = String, ra = function() {
|
|
|
2803
2803
|
};
|
|
2804
2804
|
Vn.exports = ra(), Vn.exports.createColors = ra;
|
|
2805
2805
|
var Fh = Vn.exports;
|
|
2806
|
-
const
|
|
2807
|
-
let sa = Fh, na =
|
|
2806
|
+
const Pe = Nh(Object.freeze(Object.defineProperty({ __proto__: null, default: {} }, Symbol.toStringTag, { value: "Module" })));
|
|
2807
|
+
let sa = Fh, na = Pe, Hn = class lc extends Error {
|
|
2808
2808
|
constructor(t, r, s, n, i, a) {
|
|
2809
2809
|
super(t), this.name = "CssSyntaxError", this.reason = t, i && (this.file = i), n && (this.source = n), a && (this.plugin = a), r !== void 0 && s !== void 0 && (typeof r == "number" ? (this.line = r, this.column = s) : (this.line = r.line, this.column = r.column, this.endLine = s.line, this.endColumn = s.column)), this.setMessage(), Error.captureStackTrace && Error.captureStackTrace(this, lc);
|
|
2810
2810
|
}
|
|
@@ -2839,8 +2839,8 @@ let sa = Fh, na = De, Gn = class lc extends Error {
|
|
|
2839
2839
|
`), this.name + ": " + this.message + t;
|
|
2840
2840
|
}
|
|
2841
2841
|
};
|
|
2842
|
-
var
|
|
2843
|
-
|
|
2842
|
+
var Hi = Hn;
|
|
2843
|
+
Hn.default = Hn;
|
|
2844
2844
|
var cr = {};
|
|
2845
2845
|
cr.isClean = Symbol("isClean"), cr.my = Symbol("my");
|
|
2846
2846
|
const ia = { after: `
|
|
@@ -2849,7 +2849,7 @@ const ia = { after: `
|
|
|
2849
2849
|
`, beforeDecl: `
|
|
2850
2850
|
`, beforeOpen: " ", beforeRule: `
|
|
2851
2851
|
`, colon: ": ", commentLeft: " ", commentRight: " ", emptyBody: "", indent: " ", semicolon: !1 };
|
|
2852
|
-
let
|
|
2852
|
+
let Gn = class {
|
|
2853
2853
|
constructor(e) {
|
|
2854
2854
|
this.builder = e;
|
|
2855
2855
|
}
|
|
@@ -2995,15 +2995,15 @@ let Hn = class {
|
|
|
2995
2995
|
this[e.type](e, t);
|
|
2996
2996
|
}
|
|
2997
2997
|
};
|
|
2998
|
-
var cc =
|
|
2999
|
-
|
|
2998
|
+
var cc = Gn;
|
|
2999
|
+
Gn.default = Gn;
|
|
3000
3000
|
let Bh = cc;
|
|
3001
3001
|
function $n(e, t) {
|
|
3002
3002
|
new Bh(t).stringify(e);
|
|
3003
3003
|
}
|
|
3004
3004
|
var js = $n;
|
|
3005
3005
|
$n.default = $n;
|
|
3006
|
-
let { isClean: Ar, my: zh } = cr, jh =
|
|
3006
|
+
let { isClean: Ar, my: zh } = cr, jh = Hi, Wh = cc, Vh = js;
|
|
3007
3007
|
function Yn(e, t) {
|
|
3008
3008
|
let r = new e.constructor();
|
|
3009
3009
|
for (let s in e) {
|
|
@@ -3160,7 +3160,7 @@ let qn = class {
|
|
|
3160
3160
|
};
|
|
3161
3161
|
var Ws = qn;
|
|
3162
3162
|
qn.default = qn;
|
|
3163
|
-
let
|
|
3163
|
+
let Hh = Ws, Jn = class extends Hh {
|
|
3164
3164
|
constructor(e) {
|
|
3165
3165
|
e && e.value !== void 0 && typeof e.value != "string" && (e = { ...e, value: String(e.value) }), super(e), this.type = "decl";
|
|
3166
3166
|
}
|
|
@@ -3170,12 +3170,12 @@ let Gh = Ws, Jn = class extends Gh {
|
|
|
3170
3170
|
};
|
|
3171
3171
|
var Vs = Jn;
|
|
3172
3172
|
Jn.default = Jn;
|
|
3173
|
-
var
|
|
3173
|
+
var Gh = { nanoid: (e = 21) => {
|
|
3174
3174
|
let t = "", r = e;
|
|
3175
3175
|
for (; r--; ) t += "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64 * Math.random() | 0];
|
|
3176
3176
|
return t;
|
|
3177
3177
|
} };
|
|
3178
|
-
let { SourceMapConsumer: oa, SourceMapGenerator: aa } =
|
|
3178
|
+
let { SourceMapConsumer: oa, SourceMapGenerator: aa } = Pe, { existsSync: $h, readFileSync: Yh } = Pe, { dirname: on, join: qh } = Pe, Kn = class {
|
|
3179
3179
|
constructor(e, t) {
|
|
3180
3180
|
if (t.map === !1) return;
|
|
3181
3181
|
this.loadAnnotation(e), this.inline = this.startWith(this.annotation, "data:");
|
|
@@ -3242,7 +3242,7 @@ let { SourceMapConsumer: oa, SourceMapGenerator: aa } = De, { existsSync: $h, re
|
|
|
3242
3242
|
};
|
|
3243
3243
|
var uc = Kn;
|
|
3244
3244
|
Kn.default = Kn;
|
|
3245
|
-
let { SourceMapConsumer: Jh, SourceMapGenerator: Kh } =
|
|
3245
|
+
let { SourceMapConsumer: Jh, SourceMapGenerator: Kh } = Pe, { fileURLToPath: la, pathToFileURL: Mr } = Pe, { isAbsolute: Zn, resolve: Xn } = Pe, { nanoid: Zh } = Gh, an = Pe, ca = Hi, Xh = uc, ln = Symbol("fromOffsetCache"), Qh = !!(Jh && Kh), ua = !!(Xn && Zn), ts = class {
|
|
3246
3246
|
constructor(e, t = {}) {
|
|
3247
3247
|
if (e == null || typeof e == "object" && !e.toString) throw new Error(`PostCSS received ${e} instead of CSS string`);
|
|
3248
3248
|
if (this.css = e.toString(), this.css[0] === "\uFEFF" || this.css[0] === "" ? (this.hasBOM = !0, this.css = this.css.slice(1)) : this.hasBOM = !1, t.from && (!ua || /^\w+:\/\//.test(t.from) || Zn(t.from) ? this.file = t.from : this.file = Xn(t.from)), ua && Qh) {
|
|
@@ -3326,9 +3326,9 @@ let { SourceMapConsumer: Jh, SourceMapGenerator: Kh } = De, { fileURLToPath: la,
|
|
|
3326
3326
|
return this.file || this.id;
|
|
3327
3327
|
}
|
|
3328
3328
|
};
|
|
3329
|
-
var
|
|
3329
|
+
var Hs = ts;
|
|
3330
3330
|
ts.default = ts, an && an.registerInput && an.registerInput(ts);
|
|
3331
|
-
let { SourceMapConsumer: dc, SourceMapGenerator: rs } =
|
|
3331
|
+
let { SourceMapConsumer: dc, SourceMapGenerator: rs } = Pe, { dirname: ss, relative: pc, resolve: hc, sep: mc } = Pe, { pathToFileURL: da } = Pe, em = Hs, tm = !!(dc && rs), rm = !!(ss && hc && pc && mc);
|
|
3332
3332
|
var fc = class {
|
|
3333
3333
|
constructor(e, t, r, s) {
|
|
3334
3334
|
this.stringify = e, this.mapOpts = r.map || {}, this.root = t, this.opts = r, this.css = s, this.originalCSS = s, this.usesFileUrls = !this.mapOpts.from && this.mapOpts.absolute, this.memoizedFileURLs = /* @__PURE__ */ new Map(), this.memoizedPaths = /* @__PURE__ */ new Map(), this.memoizedURLs = /* @__PURE__ */ new Map();
|
|
@@ -3466,16 +3466,16 @@ let sm = Ws, Qn = class extends sm {
|
|
|
3466
3466
|
super(e), this.type = "comment";
|
|
3467
3467
|
}
|
|
3468
3468
|
};
|
|
3469
|
-
var
|
|
3469
|
+
var Gs = Qn;
|
|
3470
3470
|
Qn.default = Qn;
|
|
3471
|
-
let gc,
|
|
3471
|
+
let gc, Gi, $i, yc, { isClean: wc, my: bc } = cr, vc = Vs, Sc = Gs, nm = Ws;
|
|
3472
3472
|
function Ic(e) {
|
|
3473
3473
|
return e.map((t) => (t.nodes && (t.nodes = Ic(t.nodes)), delete t.source, t));
|
|
3474
3474
|
}
|
|
3475
3475
|
function Cc(e) {
|
|
3476
3476
|
if (e[wc] = !1, e.proxyOf.nodes) for (let t of e.proxyOf.nodes) Cc(t);
|
|
3477
3477
|
}
|
|
3478
|
-
let
|
|
3478
|
+
let Ke = class kc extends nm {
|
|
3479
3479
|
append(...t) {
|
|
3480
3480
|
for (let r of t) {
|
|
3481
3481
|
let s = this.normalize(r, this.last);
|
|
@@ -3533,7 +3533,7 @@ let Je = class kc extends nm {
|
|
|
3533
3533
|
else if (t.prop) {
|
|
3534
3534
|
if (t.value === void 0) throw new Error("Value field is missed in node creation");
|
|
3535
3535
|
typeof t.value != "string" && (t.value = String(t.value)), t = [new vc(t)];
|
|
3536
|
-
} else if (t.selector) t = [new
|
|
3536
|
+
} else if (t.selector) t = [new Gi(t)];
|
|
3537
3537
|
else if (t.name) t = [new $i(t)];
|
|
3538
3538
|
else {
|
|
3539
3539
|
if (!t.text) throw new Error("Unknown node type in node creation");
|
|
@@ -3621,19 +3621,19 @@ let Je = class kc extends nm {
|
|
|
3621
3621
|
if (this.proxyOf.nodes) return this.proxyOf.nodes[this.proxyOf.nodes.length - 1];
|
|
3622
3622
|
}
|
|
3623
3623
|
};
|
|
3624
|
-
|
|
3624
|
+
Ke.registerParse = (e) => {
|
|
3625
3625
|
gc = e;
|
|
3626
|
-
},
|
|
3627
|
-
|
|
3628
|
-
},
|
|
3626
|
+
}, Ke.registerRule = (e) => {
|
|
3627
|
+
Gi = e;
|
|
3628
|
+
}, Ke.registerAtRule = (e) => {
|
|
3629
3629
|
$i = e;
|
|
3630
|
-
},
|
|
3630
|
+
}, Ke.registerRoot = (e) => {
|
|
3631
3631
|
yc = e;
|
|
3632
3632
|
};
|
|
3633
|
-
var wt =
|
|
3634
|
-
|
|
3635
|
-
e.type === "atrule" ? Object.setPrototypeOf(e, $i.prototype) : e.type === "rule" ? Object.setPrototypeOf(e,
|
|
3636
|
-
|
|
3633
|
+
var wt = Ke;
|
|
3634
|
+
Ke.default = Ke, Ke.rebuild = (e) => {
|
|
3635
|
+
e.type === "atrule" ? Object.setPrototypeOf(e, $i.prototype) : e.type === "rule" ? Object.setPrototypeOf(e, Gi.prototype) : e.type === "decl" ? Object.setPrototypeOf(e, vc.prototype) : e.type === "comment" ? Object.setPrototypeOf(e, Sc.prototype) : e.type === "root" && Object.setPrototypeOf(e, yc.prototype), e[bc] = !0, e.nodes && e.nodes.forEach((t) => {
|
|
3636
|
+
Ke.rebuild(t);
|
|
3637
3637
|
});
|
|
3638
3638
|
};
|
|
3639
3639
|
let Ec, xc, im = wt, ur = class extends im {
|
|
@@ -3750,18 +3750,18 @@ let Uc = wt, wm = Mc, is = class extends Uc {
|
|
|
3750
3750
|
var Ki = is;
|
|
3751
3751
|
is.default = is, Uc.registerRule(is);
|
|
3752
3752
|
let bm = Vs, vm = function(e, t = {}) {
|
|
3753
|
-
let r, s, n, i, a, o, l, c, u, d, h = e.css.valueOf(), f = t.ignoreErrors,
|
|
3753
|
+
let r, s, n, i, a, o, l, c, u, d, h = e.css.valueOf(), f = t.ignoreErrors, w = h.length, p = 0, C = [], m = [];
|
|
3754
3754
|
function g(v) {
|
|
3755
3755
|
throw e.error("Unclosed " + v, p);
|
|
3756
3756
|
}
|
|
3757
3757
|
return { back: function(v) {
|
|
3758
3758
|
m.push(v);
|
|
3759
3759
|
}, endOfFile: function() {
|
|
3760
|
-
return m.length === 0 && p >=
|
|
3760
|
+
return m.length === 0 && p >= w;
|
|
3761
3761
|
}, nextToken: function(v) {
|
|
3762
3762
|
if (m.length) return m.pop();
|
|
3763
|
-
if (p >=
|
|
3764
|
-
let
|
|
3763
|
+
if (p >= w) return;
|
|
3764
|
+
let I = !!v && v.ignoreUnclosed;
|
|
3765
3765
|
switch (r = h.charCodeAt(p), r) {
|
|
3766
3766
|
case Dr:
|
|
3767
3767
|
case jt:
|
|
@@ -3786,11 +3786,11 @@ let bm = Vs, vm = function(e, t = {}) {
|
|
|
3786
3786
|
break;
|
|
3787
3787
|
}
|
|
3788
3788
|
case cm:
|
|
3789
|
-
if (c =
|
|
3789
|
+
if (c = C.length ? C.pop()[1] : "", u = h.charCodeAt(p + 1), c === "url" && u !== cn && u !== pa && u !== jt && u !== Dr && u !== _r && u !== Pr && u !== Nr) {
|
|
3790
3790
|
s = p;
|
|
3791
3791
|
do {
|
|
3792
3792
|
if (o = !1, s = h.indexOf(")", s + 1), s === -1) {
|
|
3793
|
-
if (f ||
|
|
3793
|
+
if (f || I) {
|
|
3794
3794
|
s = p;
|
|
3795
3795
|
break;
|
|
3796
3796
|
}
|
|
@@ -3806,7 +3806,7 @@ let bm = Vs, vm = function(e, t = {}) {
|
|
|
3806
3806
|
n = r === cn ? "'" : '"', s = p;
|
|
3807
3807
|
do {
|
|
3808
3808
|
if (o = !1, s = h.indexOf(n, s + 1), s === -1) {
|
|
3809
|
-
if (f ||
|
|
3809
|
+
if (f || I) {
|
|
3810
3810
|
s = p + 1;
|
|
3811
3811
|
break;
|
|
3812
3812
|
}
|
|
@@ -3828,13 +3828,13 @@ let bm = Vs, vm = function(e, t = {}) {
|
|
|
3828
3828
|
d = ["word", h.slice(p, s + 1), p, s], p = s;
|
|
3829
3829
|
break;
|
|
3830
3830
|
default:
|
|
3831
|
-
r === ha && h.charCodeAt(p + 1) === mm ? (s = h.indexOf("*/", p + 2) + 1, s === 0 && (f ||
|
|
3831
|
+
r === ha && h.charCodeAt(p + 1) === mm ? (s = h.indexOf("*/", p + 2) + 1, s === 0 && (f || I ? s = h.length : g("comment")), d = ["comment", h.slice(p, s + 1), p, s], p = s) : (Br.lastIndex = p + 1, Br.test(h), s = Br.lastIndex === 0 ? h.length - 1 : Br.lastIndex - 2, d = ["word", h.slice(p, s + 1), p, s], C.push(d), p = s);
|
|
3832
3832
|
}
|
|
3833
3833
|
return p++, d;
|
|
3834
3834
|
}, position: function() {
|
|
3835
3835
|
return p;
|
|
3836
3836
|
} };
|
|
3837
|
-
}, Sm =
|
|
3837
|
+
}, Sm = Gs, Im = Ji, Cm = yr, fa = Ki;
|
|
3838
3838
|
const ga = { empty: !0, space: !0 };
|
|
3839
3839
|
var km = class {
|
|
3840
3840
|
constructor(e) {
|
|
@@ -4080,7 +4080,7 @@ var km = class {
|
|
|
4080
4080
|
throw this.input.error("At-rule without name", { offset: t[2] }, { offset: t[2] + t[1].length });
|
|
4081
4081
|
}
|
|
4082
4082
|
};
|
|
4083
|
-
let Em = wt, xm = km, Tm =
|
|
4083
|
+
let Em = wt, xm = km, Tm = Hs;
|
|
4084
4084
|
function os(e, t) {
|
|
4085
4085
|
let r = new Tm(e, t), s = new xm(r);
|
|
4086
4086
|
try {
|
|
@@ -4092,7 +4092,7 @@ function os(e, t) {
|
|
|
4092
4092
|
}
|
|
4093
4093
|
var Zi = os;
|
|
4094
4094
|
os.default = os, Em.registerParse(os);
|
|
4095
|
-
let { isClean:
|
|
4095
|
+
let { isClean: Fe, my: Rm } = cr, Lm = fc, Om = js, Am = wt, Mm = Yi, ya = qi, Um = Zi, Dm = yr;
|
|
4096
4096
|
const Pm = { atrule: "AtRule", comment: "Comment", decl: "Declaration", document: "Document", root: "Root", rule: "Rule" }, _m = { AtRule: !0, AtRuleExit: !0, Comment: !0, CommentExit: !0, Declaration: !0, DeclarationExit: !0, Document: !0, DocumentExit: !0, Once: !0, OnceExit: !0, postcssPlugin: !0, prepare: !0, Root: !0, RootExit: !0, Rule: !0, RuleExit: !0 }, Nm = { Once: !0, postcssPlugin: !0, prepare: !0 };
|
|
4097
4097
|
function Wt(e) {
|
|
4098
4098
|
return typeof e == "object" && typeof e.then == "function";
|
|
@@ -4106,7 +4106,7 @@ function wa(e) {
|
|
|
4106
4106
|
return t = e.type === "document" ? ["Document", 0, "DocumentExit"] : e.type === "root" ? ["Root", 0, "RootExit"] : Dc(e), { eventIndex: 0, events: t, iterator: 0, node: e, visitorIndex: 0, visitors: [] };
|
|
4107
4107
|
}
|
|
4108
4108
|
function ri(e) {
|
|
4109
|
-
return e[
|
|
4109
|
+
return e[Fe] = !1, e.nodes && e.nodes.forEach((t) => ri(t)), e;
|
|
4110
4110
|
}
|
|
4111
4111
|
let si = {}, Tt = class Pc {
|
|
4112
4112
|
constructor(t, r, s) {
|
|
@@ -4170,8 +4170,8 @@ let si = {}, Tt = class Pc {
|
|
|
4170
4170
|
}
|
|
4171
4171
|
if (this.prepareVisitors(), this.hasListener) {
|
|
4172
4172
|
let t = this.result.root;
|
|
4173
|
-
for (; !t[
|
|
4174
|
-
t[
|
|
4173
|
+
for (; !t[Fe]; ) {
|
|
4174
|
+
t[Fe] = !0;
|
|
4175
4175
|
let r = [wa(t)];
|
|
4176
4176
|
for (; r.length > 0; ) {
|
|
4177
4177
|
let s = this.visitTick(r);
|
|
@@ -4229,7 +4229,7 @@ let si = {}, Tt = class Pc {
|
|
|
4229
4229
|
if (Wt(this.runOnRoot(t))) throw this.getAsyncError();
|
|
4230
4230
|
if (this.prepareVisitors(), this.hasListener) {
|
|
4231
4231
|
let t = this.result.root;
|
|
4232
|
-
for (; !t[
|
|
4232
|
+
for (; !t[Fe]; ) t[Fe] = !0, this.walkSync(t);
|
|
4233
4233
|
if (this.listeners.OnceExit) if (t.type === "document") for (let r of t.nodes) this.visitSync(this.listeners.OnceExit, r);
|
|
4234
4234
|
else this.visitSync(this.listeners.OnceExit, t);
|
|
4235
4235
|
}
|
|
@@ -4268,22 +4268,22 @@ let si = {}, Tt = class Pc {
|
|
|
4268
4268
|
}
|
|
4269
4269
|
if (r.iterator !== 0) {
|
|
4270
4270
|
let a, o = r.iterator;
|
|
4271
|
-
for (; a = s.nodes[s.indexes[o]]; ) if (s.indexes[o] += 1, !a[
|
|
4271
|
+
for (; a = s.nodes[s.indexes[o]]; ) if (s.indexes[o] += 1, !a[Fe]) return a[Fe] = !0, void t.push(wa(a));
|
|
4272
4272
|
r.iterator = 0, delete s.indexes[o];
|
|
4273
4273
|
}
|
|
4274
4274
|
let i = r.events;
|
|
4275
4275
|
for (; r.eventIndex < i.length; ) {
|
|
4276
4276
|
let a = i[r.eventIndex];
|
|
4277
|
-
if (r.eventIndex += 1, a === 0) return void (s.nodes && s.nodes.length && (s[
|
|
4277
|
+
if (r.eventIndex += 1, a === 0) return void (s.nodes && s.nodes.length && (s[Fe] = !0, r.iterator = s.getIterator()));
|
|
4278
4278
|
if (this.listeners[a]) return void (r.visitors = this.listeners[a]);
|
|
4279
4279
|
}
|
|
4280
4280
|
t.pop();
|
|
4281
4281
|
}
|
|
4282
4282
|
walkSync(t) {
|
|
4283
|
-
t[
|
|
4283
|
+
t[Fe] = !0;
|
|
4284
4284
|
let r = Dc(t);
|
|
4285
4285
|
for (let s of r) if (s === 0) t.nodes && t.each((n) => {
|
|
4286
|
-
n[
|
|
4286
|
+
n[Fe] || this.walkSync(n);
|
|
4287
4287
|
});
|
|
4288
4288
|
else {
|
|
4289
4289
|
let n = this.listeners[s];
|
|
@@ -4396,7 +4396,7 @@ let ni = class {
|
|
|
4396
4396
|
};
|
|
4397
4397
|
var Wm = ni;
|
|
4398
4398
|
ni.default = ni;
|
|
4399
|
-
let Vm = Wm,
|
|
4399
|
+
let Vm = Wm, Hm = _c, Gm = Yi, $m = yr, Gt = class {
|
|
4400
4400
|
constructor(e = []) {
|
|
4401
4401
|
this.version = "8.4.38", this.plugins = this.normalize(e);
|
|
4402
4402
|
}
|
|
@@ -4409,15 +4409,15 @@ let Vm = Wm, Gm = _c, Hm = Yi, $m = yr, Ht = class {
|
|
|
4409
4409
|
return t;
|
|
4410
4410
|
}
|
|
4411
4411
|
process(e, t = {}) {
|
|
4412
|
-
return this.plugins.length || t.parser || t.stringifier || t.syntax ? new
|
|
4412
|
+
return this.plugins.length || t.parser || t.stringifier || t.syntax ? new Hm(this, e, t) : new Vm(this, e, t);
|
|
4413
4413
|
}
|
|
4414
4414
|
use(e) {
|
|
4415
4415
|
return this.plugins = this.plugins.concat(this.normalize([e])), this;
|
|
4416
4416
|
}
|
|
4417
4417
|
};
|
|
4418
|
-
var Ym =
|
|
4419
|
-
|
|
4420
|
-
let qm = Vs, Jm = uc, Km =
|
|
4418
|
+
var Ym = Gt;
|
|
4419
|
+
Gt.default = Gt, $m.registerProcessor(Gt), Gm.registerProcessor(Gt);
|
|
4420
|
+
let qm = Vs, Jm = uc, Km = Gs, Zm = Ji, Xm = Hs, Qm = yr, ef = Ki;
|
|
4421
4421
|
function pr(e, t) {
|
|
4422
4422
|
if (Array.isArray(e)) return e.map((n) => pr(n));
|
|
4423
4423
|
let { inputs: r, ...s } = e;
|
|
@@ -4441,7 +4441,7 @@ function pr(e, t) {
|
|
|
4441
4441
|
}
|
|
4442
4442
|
var tf = pr;
|
|
4443
4443
|
pr.default = pr;
|
|
4444
|
-
let rf =
|
|
4444
|
+
let rf = Hi, ba = Vs, sf = _c, nf = wt, ii = Ym, of = js, af = tf, va = Yi, lf = Tc, Sa = Gs, Ia = Ji, cf = qi, uf = Hs, df = Zi, pf = Mc, Ca = Ki, ka = yr, hf = Ws;
|
|
4445
4445
|
function Z(...e) {
|
|
4446
4446
|
return e.length === 1 && Array.isArray(e[0]) && (e = e[0]), new ii(e);
|
|
4447
4447
|
}
|
|
@@ -4464,7 +4464,7 @@ const ce = _h(mf);
|
|
|
4464
4464
|
ce.stringify, ce.fromJSON, ce.plugin, ce.parse, ce.list, ce.document, ce.comment, ce.atRule, ce.rule, ce.decl, ce.root, ce.CssSyntaxError, ce.Declaration, ce.Container, ce.Processor, ce.Document, ce.Comment, ce.Warning, ce.AtRule, ce.Result, ce.Input, ce.Rule, ce.Root, ce.Node;
|
|
4465
4465
|
class Xi {
|
|
4466
4466
|
constructor(...t) {
|
|
4467
|
-
|
|
4467
|
+
Re(this, "parentElement", null), Re(this, "parentNode", null), Re(this, "ownerDocument"), Re(this, "firstChild", null), Re(this, "lastChild", null), Re(this, "previousSibling", null), Re(this, "nextSibling", null), Re(this, "ELEMENT_NODE", 1), Re(this, "TEXT_NODE", 3), Re(this, "nodeType"), Re(this, "nodeName"), Re(this, "RRNodeType");
|
|
4468
4468
|
}
|
|
4469
4469
|
get childNodes() {
|
|
4470
4470
|
const t = [];
|
|
@@ -4517,7 +4517,7 @@ function Qi(e) {
|
|
|
4517
4517
|
}
|
|
4518
4518
|
}
|
|
4519
4519
|
const un = {};
|
|
4520
|
-
function
|
|
4520
|
+
function tt(e, t, r) {
|
|
4521
4521
|
var s;
|
|
4522
4522
|
const n = `${e}.${String(r)}`;
|
|
4523
4523
|
if (un[n]) return un[n].call(t);
|
|
@@ -4534,30 +4534,30 @@ function Ta(e, t, r) {
|
|
|
4534
4534
|
function Nc() {
|
|
4535
4535
|
return Qi("MutationObserver").constructor;
|
|
4536
4536
|
}
|
|
4537
|
-
const
|
|
4538
|
-
return
|
|
4537
|
+
const V = { childNodes: function(e) {
|
|
4538
|
+
return tt("Node", e, "childNodes");
|
|
4539
4539
|
}, parentNode: function(e) {
|
|
4540
|
-
return
|
|
4540
|
+
return tt("Node", e, "parentNode");
|
|
4541
4541
|
}, parentElement: function(e) {
|
|
4542
|
-
return
|
|
4542
|
+
return tt("Node", e, "parentElement");
|
|
4543
4543
|
}, textContent: function(e) {
|
|
4544
|
-
return
|
|
4544
|
+
return tt("Node", e, "textContent");
|
|
4545
4545
|
}, contains: function(e, t) {
|
|
4546
4546
|
return Ta("Node", e, "contains")(t);
|
|
4547
4547
|
}, getRootNode: function(e) {
|
|
4548
4548
|
return Ta("Node", e, "getRootNode")();
|
|
4549
4549
|
}, host: function(e) {
|
|
4550
|
-
return e && "host" in e ?
|
|
4550
|
+
return e && "host" in e ? tt("ShadowRoot", e, "host") : null;
|
|
4551
4551
|
}, styleSheets: function(e) {
|
|
4552
4552
|
return e.styleSheets;
|
|
4553
4553
|
}, shadowRoot: function(e) {
|
|
4554
|
-
return e && "shadowRoot" in e ?
|
|
4554
|
+
return e && "shadowRoot" in e ? tt("Element", e, "shadowRoot") : null;
|
|
4555
4555
|
}, querySelector: function(e, t) {
|
|
4556
|
-
return
|
|
4556
|
+
return tt("Element", e, "querySelector")(t);
|
|
4557
4557
|
}, querySelectorAll: function(e, t) {
|
|
4558
|
-
return
|
|
4558
|
+
return tt("Element", e, "querySelectorAll")(t);
|
|
4559
4559
|
}, mutationObserver: Nc };
|
|
4560
|
-
function
|
|
4560
|
+
function ve(e, t, r = document) {
|
|
4561
4561
|
const s = { capture: !0, passive: !0 };
|
|
4562
4562
|
return r.addEventListener(e, t, s), () => r.removeEventListener(e, t, s);
|
|
4563
4563
|
}
|
|
@@ -4606,7 +4606,7 @@ let ws = Date.now;
|
|
|
4606
4606
|
function Fc(e) {
|
|
4607
4607
|
var t, r, s, n;
|
|
4608
4608
|
const i = e.document;
|
|
4609
|
-
return { left: i.scrollingElement ? i.scrollingElement.scrollLeft : e.pageXOffset !== void 0 ? e.pageXOffset : i.documentElement.scrollLeft || (i == null ? void 0 : i.body) && ((t =
|
|
4609
|
+
return { left: i.scrollingElement ? i.scrollingElement.scrollLeft : e.pageXOffset !== void 0 ? e.pageXOffset : i.documentElement.scrollLeft || (i == null ? void 0 : i.body) && ((t = V.parentElement(i.body)) == null ? void 0 : t.scrollLeft) || ((r = i == null ? void 0 : i.body) == null ? void 0 : r.scrollLeft) || 0, top: i.scrollingElement ? i.scrollingElement.scrollTop : e.pageYOffset !== void 0 ? e.pageYOffset : (i == null ? void 0 : i.documentElement.scrollTop) || (i == null ? void 0 : i.body) && ((s = V.parentElement(i.body)) == null ? void 0 : s.scrollTop) || ((n = i == null ? void 0 : i.body) == null ? void 0 : n.scrollTop) || 0 };
|
|
4610
4610
|
}
|
|
4611
4611
|
function Bc() {
|
|
4612
4612
|
return window.innerHeight || document.documentElement && document.documentElement.clientHeight || document.body && document.body.clientHeight;
|
|
@@ -4615,7 +4615,7 @@ function zc() {
|
|
|
4615
4615
|
return window.innerWidth || document.documentElement && document.documentElement.clientWidth || document.body && document.body.clientWidth;
|
|
4616
4616
|
}
|
|
4617
4617
|
function jc(e) {
|
|
4618
|
-
return e ? e.nodeType === e.ELEMENT_NODE ? e :
|
|
4618
|
+
return e ? e.nodeType === e.ELEMENT_NODE ? e : V.parentElement(e) : null;
|
|
4619
4619
|
}
|
|
4620
4620
|
function Se(e, t, r, s) {
|
|
4621
4621
|
if (!e) return !1;
|
|
@@ -4636,7 +4636,7 @@ function Wc(e, t) {
|
|
|
4636
4636
|
if (Zt(e)) return !1;
|
|
4637
4637
|
const r = t.getId(e);
|
|
4638
4638
|
if (!t.has(r)) return !0;
|
|
4639
|
-
const s =
|
|
4639
|
+
const s = V.parentNode(e);
|
|
4640
4640
|
return (!s || s.nodeType !== e.DOCUMENT_NODE) && (!s || Wc(s, t));
|
|
4641
4641
|
}
|
|
4642
4642
|
function oi(e) {
|
|
@@ -4645,16 +4645,16 @@ function oi(e) {
|
|
|
4645
4645
|
function Vc(e, t) {
|
|
4646
4646
|
return !!(e.nodeName === "IFRAME" && t.getMeta(e));
|
|
4647
4647
|
}
|
|
4648
|
-
function
|
|
4648
|
+
function Hc(e, t) {
|
|
4649
4649
|
return !!(e.nodeName === "LINK" && e.nodeType === e.ELEMENT_NODE && e.getAttribute && e.getAttribute("rel") === "stylesheet" && t.getMeta(e));
|
|
4650
4650
|
}
|
|
4651
4651
|
function ai(e) {
|
|
4652
|
-
return !!e && (e instanceof Xi && "shadowRoot" in e ? !!e.shadowRoot : !!
|
|
4652
|
+
return !!e && (e instanceof Xi && "shadowRoot" in e ? !!e.shadowRoot : !!V.shadowRoot(e));
|
|
4653
4653
|
}
|
|
4654
4654
|
/[1-9][0-9]{12}/.test(Date.now().toString()) || (ws = () => (/* @__PURE__ */ new Date()).getTime());
|
|
4655
4655
|
class ff {
|
|
4656
4656
|
constructor() {
|
|
4657
|
-
|
|
4657
|
+
x(this, "id", 1), x(this, "styleIDMap", /* @__PURE__ */ new WeakMap()), x(this, "idStyleMap", /* @__PURE__ */ new Map());
|
|
4658
4658
|
}
|
|
4659
4659
|
getId(t) {
|
|
4660
4660
|
return this.styleIDMap.get(t) ?? -1;
|
|
@@ -4677,32 +4677,32 @@ class ff {
|
|
|
4677
4677
|
return this.id++;
|
|
4678
4678
|
}
|
|
4679
4679
|
}
|
|
4680
|
-
function
|
|
4680
|
+
function Gc(e) {
|
|
4681
4681
|
var t;
|
|
4682
4682
|
let r = null;
|
|
4683
|
-
return "getRootNode" in e && ((t =
|
|
4683
|
+
return "getRootNode" in e && ((t = V.getRootNode(e)) == null ? void 0 : t.nodeType) === Node.DOCUMENT_FRAGMENT_NODE && V.host(V.getRootNode(e)) && (r = V.host(V.getRootNode(e))), r;
|
|
4684
4684
|
}
|
|
4685
4685
|
function gf(e) {
|
|
4686
4686
|
const t = e.ownerDocument;
|
|
4687
4687
|
if (!t) return !1;
|
|
4688
4688
|
const r = function(s) {
|
|
4689
4689
|
let n, i = s;
|
|
4690
|
-
for (; n =
|
|
4690
|
+
for (; n = Gc(i); ) i = n;
|
|
4691
4691
|
return i;
|
|
4692
4692
|
}(e);
|
|
4693
|
-
return
|
|
4693
|
+
return V.contains(t, r);
|
|
4694
4694
|
}
|
|
4695
4695
|
function $c(e) {
|
|
4696
4696
|
const t = e.ownerDocument;
|
|
4697
|
-
return !!t && (
|
|
4697
|
+
return !!t && (V.contains(t, e) || gf(e));
|
|
4698
4698
|
}
|
|
4699
|
-
var Y = ((e) => (e[e.DomContentLoaded = 0] = "DomContentLoaded", e[e.Load = 1] = "Load", e[e.FullSnapshot = 2] = "FullSnapshot", e[e.IncrementalSnapshot = 3] = "IncrementalSnapshot", e[e.Meta = 4] = "Meta", e[e.Custom = 5] = "Custom", e[e.Plugin = 6] = "Plugin", e))(Y || {}),
|
|
4699
|
+
var Y = ((e) => (e[e.DomContentLoaded = 0] = "DomContentLoaded", e[e.Load = 1] = "Load", e[e.FullSnapshot = 2] = "FullSnapshot", e[e.IncrementalSnapshot = 3] = "IncrementalSnapshot", e[e.Meta = 4] = "Meta", e[e.Custom = 5] = "Custom", e[e.Plugin = 6] = "Plugin", e))(Y || {}), G = ((e) => (e[e.Mutation = 0] = "Mutation", e[e.MouseMove = 1] = "MouseMove", e[e.MouseInteraction = 2] = "MouseInteraction", e[e.Scroll = 3] = "Scroll", e[e.ViewportResize = 4] = "ViewportResize", e[e.Input = 5] = "Input", e[e.TouchMove = 6] = "TouchMove", e[e.MediaInteraction = 7] = "MediaInteraction", e[e.StyleSheetRule = 8] = "StyleSheetRule", e[e.CanvasMutation = 9] = "CanvasMutation", e[e.Font = 10] = "Font", e[e.Log = 11] = "Log", e[e.Drag = 12] = "Drag", e[e.StyleDeclaration = 13] = "StyleDeclaration", e[e.Selection = 14] = "Selection", e[e.AdoptedStyleSheet = 15] = "AdoptedStyleSheet", e[e.CustomElement = 16] = "CustomElement", e))(G || {}), Ce = ((e) => (e[e.MouseUp = 0] = "MouseUp", e[e.MouseDown = 1] = "MouseDown", e[e.Click = 2] = "Click", e[e.ContextMenu = 3] = "ContextMenu", e[e.DblClick = 4] = "DblClick", e[e.Focus = 5] = "Focus", e[e.Blur = 6] = "Blur", e[e.TouchStart = 7] = "TouchStart", e[e.TouchMove_Departed = 8] = "TouchMove_Departed", e[e.TouchEnd = 9] = "TouchEnd", e[e.TouchCancel = 10] = "TouchCancel", e))(Ce || {}), Ge = ((e) => (e[e.Mouse = 0] = "Mouse", e[e.Pen = 1] = "Pen", e[e.Touch = 2] = "Touch", e))(Ge || {}), Ct = ((e) => (e[e["2D"] = 0] = "2D", e[e.WebGL = 1] = "WebGL", e[e.WebGL2 = 2] = "WebGL2", e))(Ct || {}), kt = ((e) => (e[e.Play = 0] = "Play", e[e.Pause = 1] = "Pause", e[e.Seeked = 2] = "Seeked", e[e.VolumeChange = 3] = "VolumeChange", e[e.RateChange = 4] = "RateChange", e))(kt || {});
|
|
4700
4700
|
function La(e) {
|
|
4701
4701
|
return "__ln" in e;
|
|
4702
4702
|
}
|
|
4703
4703
|
class yf {
|
|
4704
4704
|
constructor() {
|
|
4705
|
-
|
|
4705
|
+
x(this, "length", 0), x(this, "head", null), x(this, "tail", null);
|
|
4706
4706
|
}
|
|
4707
4707
|
get(t) {
|
|
4708
4708
|
if (t >= this.length) throw new Error("Position outside of list range");
|
|
@@ -4729,36 +4729,36 @@ class yf {
|
|
|
4729
4729
|
const Oa = (e, t) => `${e}@${t}`;
|
|
4730
4730
|
class wf {
|
|
4731
4731
|
constructor() {
|
|
4732
|
-
|
|
4732
|
+
x(this, "frozen", !1), x(this, "locked", !1), x(this, "texts", []), x(this, "attributes", []), x(this, "attributeMap", /* @__PURE__ */ new WeakMap()), x(this, "removes", []), x(this, "mapRemoves", []), x(this, "movedMap", {}), x(this, "addedSet", /* @__PURE__ */ new Set()), x(this, "movedSet", /* @__PURE__ */ new Set()), x(this, "droppedSet", /* @__PURE__ */ new Set()), x(this, "mutationCb"), x(this, "blockClass"), x(this, "blockSelector"), x(this, "maskTextClass"), x(this, "maskTextSelector"), x(this, "inlineStylesheet"), x(this, "maskInputOptions"), x(this, "maskTextFn"), x(this, "maskInputFn"), x(this, "keepIframeSrcFn"), x(this, "recordCanvas"), x(this, "inlineImages"), x(this, "slimDOMOptions"), x(this, "dataURLOptions"), x(this, "doc"), x(this, "mirror"), x(this, "iframeManager"), x(this, "stylesheetManager"), x(this, "shadowDomManager"), x(this, "canvasManager"), x(this, "processedNodeManager"), x(this, "unattachedDoc"), x(this, "processMutations", (t) => {
|
|
4733
4733
|
t.forEach(this.processMutation), this.emit();
|
|
4734
|
-
}),
|
|
4734
|
+
}), x(this, "emit", () => {
|
|
4735
4735
|
if (this.frozen || this.locked) return;
|
|
4736
4736
|
const t = [], r = /* @__PURE__ */ new Set(), s = new yf(), n = (l) => {
|
|
4737
4737
|
let c = l, u = -2;
|
|
4738
4738
|
for (; u === -2; ) c = c && c.nextSibling, u = c && this.mirror.getId(c);
|
|
4739
4739
|
return u;
|
|
4740
4740
|
}, i = (l) => {
|
|
4741
|
-
const c =
|
|
4741
|
+
const c = V.parentNode(l);
|
|
4742
4742
|
if (!c || !$c(l) || c.tagName === "TEXTAREA") return;
|
|
4743
|
-
const u = Zt(c) ? this.mirror.getId(
|
|
4743
|
+
const u = Zt(c) ? this.mirror.getId(Gc(l)) : this.mirror.getId(c), d = n(l);
|
|
4744
4744
|
if (u === -1 || d === -1) return s.addNode(l);
|
|
4745
4745
|
const h = Et(l, { doc: this.doc, mirror: this.mirror, blockClass: this.blockClass, blockSelector: this.blockSelector, maskTextClass: this.maskTextClass, maskTextSelector: this.maskTextSelector, skipChild: !0, newlyAddedElement: !0, inlineStylesheet: this.inlineStylesheet, maskInputOptions: this.maskInputOptions, maskTextFn: this.maskTextFn, maskInputFn: this.maskInputFn, slimDOMOptions: this.slimDOMOptions, dataURLOptions: this.dataURLOptions, recordCanvas: this.recordCanvas, inlineImages: this.inlineImages, onSerialize: (f) => {
|
|
4746
|
-
Vc(f, this.mirror) && this.iframeManager.addIframe(f),
|
|
4747
|
-
}, onIframeLoad: (f,
|
|
4748
|
-
this.iframeManager.attachIframe(f,
|
|
4749
|
-
}, onStylesheetLoad: (f,
|
|
4750
|
-
this.stylesheetManager.attachLinkElement(f,
|
|
4746
|
+
Vc(f, this.mirror) && this.iframeManager.addIframe(f), Hc(f, this.mirror) && this.stylesheetManager.trackLinkElement(f), ai(l) && this.shadowDomManager.addShadowRoot(V.shadowRoot(l), this.doc);
|
|
4747
|
+
}, onIframeLoad: (f, w) => {
|
|
4748
|
+
this.iframeManager.attachIframe(f, w), this.shadowDomManager.observeAttachShadow(f);
|
|
4749
|
+
}, onStylesheetLoad: (f, w) => {
|
|
4750
|
+
this.stylesheetManager.attachLinkElement(f, w);
|
|
4751
4751
|
} });
|
|
4752
4752
|
h && (t.push({ parentId: u, nextId: d, node: h }), r.add(h.id));
|
|
4753
4753
|
};
|
|
4754
4754
|
for (; this.mapRemoves.length; ) this.mirror.removeNodeFromMap(this.mapRemoves.shift());
|
|
4755
|
-
for (const l of this.movedSet) Aa(this.removes, l, this.mirror) && !this.movedSet.has(
|
|
4755
|
+
for (const l of this.movedSet) Aa(this.removes, l, this.mirror) && !this.movedSet.has(V.parentNode(l)) || i(l);
|
|
4756
4756
|
for (const l of this.addedSet) Ma(this.droppedSet, l) || Aa(this.removes, l, this.mirror) ? Ma(this.movedSet, l) ? i(l) : this.droppedSet.add(l) : i(l);
|
|
4757
4757
|
let a = null;
|
|
4758
4758
|
for (; s.length; ) {
|
|
4759
4759
|
let l = null;
|
|
4760
4760
|
if (a) {
|
|
4761
|
-
const c = this.mirror.getId(
|
|
4761
|
+
const c = this.mirror.getId(V.parentNode(a.value)), u = n(a.value);
|
|
4762
4762
|
c !== -1 && u !== -1 && (l = a);
|
|
4763
4763
|
}
|
|
4764
4764
|
if (!l) {
|
|
@@ -4766,17 +4766,17 @@ class wf {
|
|
|
4766
4766
|
for (; c; ) {
|
|
4767
4767
|
const u = c;
|
|
4768
4768
|
if (c = c.previous, u) {
|
|
4769
|
-
const d = this.mirror.getId(
|
|
4769
|
+
const d = this.mirror.getId(V.parentNode(u.value));
|
|
4770
4770
|
if (n(u.value) === -1) continue;
|
|
4771
4771
|
if (d !== -1) {
|
|
4772
4772
|
l = u;
|
|
4773
4773
|
break;
|
|
4774
4774
|
}
|
|
4775
4775
|
{
|
|
4776
|
-
const h = u.value, f =
|
|
4776
|
+
const h = u.value, f = V.parentNode(h);
|
|
4777
4777
|
if (f && f.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {
|
|
4778
|
-
const
|
|
4779
|
-
if (this.mirror.getId(
|
|
4778
|
+
const w = V.host(f);
|
|
4779
|
+
if (this.mirror.getId(w) !== -1) {
|
|
4780
4780
|
l = u;
|
|
4781
4781
|
break;
|
|
4782
4782
|
}
|
|
@@ -4792,7 +4792,7 @@ class wf {
|
|
|
4792
4792
|
a = l.previous, s.removeNode(l.value), i(l.value);
|
|
4793
4793
|
}
|
|
4794
4794
|
const o = { texts: this.texts.map((l) => {
|
|
4795
|
-
const c = l.node, u =
|
|
4795
|
+
const c = l.node, u = V.parentNode(c);
|
|
4796
4796
|
return u && u.tagName === "TEXTAREA" && this.genTextAreaValueMutation(u), { id: this.mirror.getId(c), value: l.value };
|
|
4797
4797
|
}).filter((l) => !r.has(l.id)).filter((l) => this.mirror.has(l.id)), attributes: this.attributes.map((l) => {
|
|
4798
4798
|
const { attributes: c } = l;
|
|
@@ -4803,13 +4803,13 @@ class wf {
|
|
|
4803
4803
|
return { id: this.mirror.getId(l.node), attributes: c };
|
|
4804
4804
|
}).filter((l) => !r.has(l.id)).filter((l) => this.mirror.has(l.id)), removes: this.removes, adds: t };
|
|
4805
4805
|
(o.texts.length || o.attributes.length || o.removes.length || o.adds.length) && (this.texts = [], this.attributes = [], this.attributeMap = /* @__PURE__ */ new WeakMap(), this.removes = [], this.addedSet = /* @__PURE__ */ new Set(), this.movedSet = /* @__PURE__ */ new Set(), this.droppedSet = /* @__PURE__ */ new Set(), this.movedMap = {}, this.mutationCb(o));
|
|
4806
|
-
}),
|
|
4806
|
+
}), x(this, "genTextAreaValueMutation", (t) => {
|
|
4807
4807
|
let r = this.attributeMap.get(t);
|
|
4808
|
-
r || (r = { node: t, attributes: {}, styleDiff: {}, _unchangedStyles: {} }, this.attributes.push(r), this.attributeMap.set(t, r)), r.attributes.value = Array.from(
|
|
4809
|
-
}),
|
|
4808
|
+
r || (r = { node: t, attributes: {}, styleDiff: {}, _unchangedStyles: {} }, this.attributes.push(r), this.attributeMap.set(t, r)), r.attributes.value = Array.from(V.childNodes(t), (s) => V.textContent(s) || "").join("");
|
|
4809
|
+
}), x(this, "processMutation", (t) => {
|
|
4810
4810
|
if (!pn(t.target, this.mirror, this.slimDOMOptions)) switch (t.type) {
|
|
4811
4811
|
case "characterData": {
|
|
4812
|
-
const r =
|
|
4812
|
+
const r = V.textContent(t.target);
|
|
4813
4813
|
Se(t.target, this.blockClass, this.blockSelector, !1) || r === t.oldValue || this.texts.push({ value: Ml(t.target, this.maskTextClass, this.maskTextSelector, !0) && r ? this.maskTextFn ? this.maskTextFn(r, jc(t.target)) : r.replace(/[\S]/g, "*") : r, node: t.target });
|
|
4814
4814
|
break;
|
|
4815
4815
|
}
|
|
@@ -4846,13 +4846,13 @@ class wf {
|
|
|
4846
4846
|
if (Se(t.target, this.blockClass, this.blockSelector, !0)) return;
|
|
4847
4847
|
if (t.target.tagName === "TEXTAREA") return void this.genTextAreaValueMutation(t.target);
|
|
4848
4848
|
t.addedNodes.forEach((r) => this.genAdds(r, t.target)), t.removedNodes.forEach((r) => {
|
|
4849
|
-
const s = this.mirror.getId(r), n = Zt(t.target) ? this.mirror.getId(
|
|
4849
|
+
const s = this.mirror.getId(r), n = Zt(t.target) ? this.mirror.getId(V.host(t.target)) : this.mirror.getId(t.target);
|
|
4850
4850
|
Se(t.target, this.blockClass, this.blockSelector, !1) || pn(r, this.mirror, this.slimDOMOptions) || !function(i, a) {
|
|
4851
4851
|
return a.getId(i) !== -1;
|
|
4852
4852
|
}(r, this.mirror) || (this.addedSet.has(r) ? (li(this.addedSet, r), this.droppedSet.add(r)) : this.addedSet.has(t.target) && s === -1 || Wc(t.target, this.mirror) || (this.movedSet.has(r) && this.movedMap[Oa(s, n)] ? li(this.movedSet, r) : this.removes.push({ parentId: n, id: s, isShadow: !(!Zt(t.target) || !Xt(t.target)) || void 0 })), this.mapRemoves.push(r));
|
|
4853
4853
|
});
|
|
4854
4854
|
}
|
|
4855
|
-
}),
|
|
4855
|
+
}), x(this, "genAdds", (t, r) => {
|
|
4856
4856
|
if (!this.processedNodeManager.inOtherBuffer(t, this) && !this.addedSet.has(t) && !this.movedSet.has(t)) {
|
|
4857
4857
|
if (this.mirror.hasNode(t)) {
|
|
4858
4858
|
if (pn(t, this.mirror, this.slimDOMOptions)) return;
|
|
@@ -4860,7 +4860,7 @@ class wf {
|
|
|
4860
4860
|
let s = null;
|
|
4861
4861
|
r && this.mirror.hasNode(r) && (s = this.mirror.getId(r)), s && s !== -1 && (this.movedMap[Oa(this.mirror.getId(t), s)] = !0);
|
|
4862
4862
|
} else this.addedSet.add(t), this.droppedSet.delete(t);
|
|
4863
|
-
Se(t, this.blockClass, this.blockSelector, !1) || (
|
|
4863
|
+
Se(t, this.blockClass, this.blockSelector, !1) || (V.childNodes(t).forEach((s) => this.genAdds(s)), ai(t) && V.childNodes(V.shadowRoot(t)).forEach((s) => {
|
|
4864
4864
|
this.processedNodeManager.add(s, this), this.genAdds(s, t);
|
|
4865
4865
|
}));
|
|
4866
4866
|
}
|
|
@@ -4891,15 +4891,15 @@ class wf {
|
|
|
4891
4891
|
}
|
|
4892
4892
|
}
|
|
4893
4893
|
function li(e, t) {
|
|
4894
|
-
e.delete(t),
|
|
4894
|
+
e.delete(t), V.childNodes(t).forEach((r) => li(e, r));
|
|
4895
4895
|
}
|
|
4896
4896
|
function Aa(e, t, r) {
|
|
4897
4897
|
return e.length !== 0 && function(s, n, i) {
|
|
4898
|
-
let a =
|
|
4898
|
+
let a = V.parentNode(n);
|
|
4899
4899
|
for (; a; ) {
|
|
4900
4900
|
const o = i.getId(a);
|
|
4901
4901
|
if (s.some((l) => l.id === o)) return !0;
|
|
4902
|
-
a =
|
|
4902
|
+
a = V.parentNode(a);
|
|
4903
4903
|
}
|
|
4904
4904
|
return !1;
|
|
4905
4905
|
}(e, t, r);
|
|
@@ -4908,7 +4908,7 @@ function Ma(e, t) {
|
|
|
4908
4908
|
return e.size !== 0 && Yc(e, t);
|
|
4909
4909
|
}
|
|
4910
4910
|
function Yc(e, t) {
|
|
4911
|
-
const r =
|
|
4911
|
+
const r = V.parentNode(t);
|
|
4912
4912
|
return !!r && (!!e.has(r) || Yc(e, r));
|
|
4913
4913
|
}
|
|
4914
4914
|
let Qt;
|
|
@@ -4941,12 +4941,12 @@ function bf({ mouseInteractionCb: e, doc: t, mirror: r, blockClass: s, blockSele
|
|
|
4941
4941
|
};
|
|
4942
4942
|
const a = i.mouseInteraction === !0 || i.mouseInteraction === void 0 ? {} : i.mouseInteraction, o = [];
|
|
4943
4943
|
let l = null;
|
|
4944
|
-
return Object.keys(
|
|
4944
|
+
return Object.keys(Ce).filter((c) => Number.isNaN(Number(c)) && !c.endsWith("_Departed") && a[c] !== !1).forEach((c) => {
|
|
4945
4945
|
let u = ft(c);
|
|
4946
4946
|
const d = /* @__PURE__ */ ((h) => (f) => {
|
|
4947
|
-
const
|
|
4948
|
-
if (Se(
|
|
4949
|
-
let p = null,
|
|
4947
|
+
const w = er(f);
|
|
4948
|
+
if (Se(w, s, n, !0)) return;
|
|
4949
|
+
let p = null, C = h;
|
|
4950
4950
|
if ("pointerType" in f) {
|
|
4951
4951
|
switch (f.pointerType) {
|
|
4952
4952
|
case "mouse":
|
|
@@ -4958,30 +4958,30 @@ function bf({ mouseInteractionCb: e, doc: t, mirror: r, blockClass: s, blockSele
|
|
|
4958
4958
|
case "pen":
|
|
4959
4959
|
p = Ge.Pen;
|
|
4960
4960
|
}
|
|
4961
|
-
p === Ge.Touch ?
|
|
4961
|
+
p === Ge.Touch ? Ce[h] === Ce.MouseDown ? C = "TouchStart" : Ce[h] === Ce.MouseUp && (C = "TouchEnd") : Ge.Pen;
|
|
4962
4962
|
} else oi(f) && (p = Ge.Touch);
|
|
4963
|
-
p !== null ? (l = p, (
|
|
4963
|
+
p !== null ? (l = p, (C.startsWith("Touch") && p === Ge.Touch || C.startsWith("Mouse") && p === Ge.Mouse) && (p = null)) : Ce[h] === Ce.Click && (p = l, l = null);
|
|
4964
4964
|
const m = oi(f) ? f.changedTouches[0] : f;
|
|
4965
4965
|
if (!m) return;
|
|
4966
|
-
const g = r.getId(
|
|
4967
|
-
$(e)({ type:
|
|
4966
|
+
const g = r.getId(w), { clientX: v, clientY: I } = m;
|
|
4967
|
+
$(e)({ type: Ce[C], id: g, x: v, y: I, ...p !== null && { pointerType: p } });
|
|
4968
4968
|
})(c);
|
|
4969
|
-
if (window.PointerEvent) switch (
|
|
4970
|
-
case
|
|
4971
|
-
case
|
|
4969
|
+
if (window.PointerEvent) switch (Ce[c]) {
|
|
4970
|
+
case Ce.MouseDown:
|
|
4971
|
+
case Ce.MouseUp:
|
|
4972
4972
|
u = u.replace("mouse", "pointer");
|
|
4973
4973
|
break;
|
|
4974
|
-
case
|
|
4975
|
-
case
|
|
4974
|
+
case Ce.TouchStart:
|
|
4975
|
+
case Ce.TouchEnd:
|
|
4976
4976
|
return;
|
|
4977
4977
|
}
|
|
4978
|
-
o.push(
|
|
4978
|
+
o.push(ve(u, d, t));
|
|
4979
4979
|
}), $(() => {
|
|
4980
4980
|
o.forEach((c) => c());
|
|
4981
4981
|
});
|
|
4982
4982
|
}
|
|
4983
4983
|
function Jc({ scrollCb: e, doc: t, mirror: r, blockClass: s, blockSelector: n, sampling: i }) {
|
|
4984
|
-
return
|
|
4984
|
+
return ve("scroll", $($t($((a) => {
|
|
4985
4985
|
const o = er(a);
|
|
4986
4986
|
if (!o || Se(o, s, n, !0)) return;
|
|
4987
4987
|
const l = r.getId(o);
|
|
@@ -5004,14 +5004,14 @@ function jr(e) {
|
|
|
5004
5004
|
return r;
|
|
5005
5005
|
}(e, []);
|
|
5006
5006
|
}
|
|
5007
|
-
function
|
|
5007
|
+
function rt(e, t, r) {
|
|
5008
5008
|
let s, n;
|
|
5009
5009
|
return e ? (e.ownerNode ? s = t.getId(e.ownerNode) : n = r.getId(e), { styleId: n, id: s }) : {};
|
|
5010
5010
|
}
|
|
5011
5011
|
function Kc({ mirror: e, stylesheetManager: t }, r) {
|
|
5012
5012
|
var s, n, i;
|
|
5013
5013
|
let a = null;
|
|
5014
|
-
a = r.nodeName === "#document" ? e.getId(r) : e.getId(
|
|
5014
|
+
a = r.nodeName === "#document" ? e.getId(r) : e.getId(V.host(r));
|
|
5015
5015
|
const o = r.nodeName === "#document" ? (s = r.defaultView) == null ? void 0 : s.Document : (i = (n = r.ownerDocument) == null ? void 0 : n.defaultView) == null ? void 0 : i.ShadowRoot, l = o != null && o.prototype ? Object.getOwnPropertyDescriptor(o == null ? void 0 : o.prototype, "adoptedStyleSheets") : void 0;
|
|
5016
5016
|
return a !== null && a !== -1 && o && l ? (Object.defineProperty(r, "adoptedStyleSheets", { configurable: l.configurable, enumerable: l.enumerable, get() {
|
|
5017
5017
|
var c;
|
|
@@ -5035,73 +5035,73 @@ function Sf(e, t = {}) {
|
|
|
5035
5035
|
};
|
|
5036
5036
|
let s;
|
|
5037
5037
|
(function(m, g) {
|
|
5038
|
-
const { mutationCb: v, mousemoveCb:
|
|
5038
|
+
const { mutationCb: v, mousemoveCb: I, mouseInteractionCb: O, scrollCb: E, viewportResizeCb: A, inputCb: M, mediaInteractionCb: k, styleSheetRuleCb: T, styleDeclarationCb: R, canvasMutationCb: S, fontCb: P, selectionCb: D, customElementCb: b } = m;
|
|
5039
5039
|
m.mutationCb = (...y) => {
|
|
5040
5040
|
g.mutation && g.mutation(...y), v(...y);
|
|
5041
5041
|
}, m.mousemoveCb = (...y) => {
|
|
5042
|
-
g.mousemove && g.mousemove(...y),
|
|
5042
|
+
g.mousemove && g.mousemove(...y), I(...y);
|
|
5043
5043
|
}, m.mouseInteractionCb = (...y) => {
|
|
5044
5044
|
g.mouseInteraction && g.mouseInteraction(...y), O(...y);
|
|
5045
5045
|
}, m.scrollCb = (...y) => {
|
|
5046
5046
|
g.scroll && g.scroll(...y), E(...y);
|
|
5047
5047
|
}, m.viewportResizeCb = (...y) => {
|
|
5048
|
-
g.viewportResize && g.viewportResize(...y),
|
|
5048
|
+
g.viewportResize && g.viewportResize(...y), A(...y);
|
|
5049
5049
|
}, m.inputCb = (...y) => {
|
|
5050
|
-
g.input && g.input(...y),
|
|
5050
|
+
g.input && g.input(...y), M(...y);
|
|
5051
5051
|
}, m.mediaInteractionCb = (...y) => {
|
|
5052
5052
|
g.mediaInteaction && g.mediaInteaction(...y), k(...y);
|
|
5053
5053
|
}, m.styleSheetRuleCb = (...y) => {
|
|
5054
5054
|
g.styleSheetRule && g.styleSheetRule(...y), T(...y);
|
|
5055
5055
|
}, m.styleDeclarationCb = (...y) => {
|
|
5056
|
-
g.styleDeclaration && g.styleDeclaration(...y),
|
|
5056
|
+
g.styleDeclaration && g.styleDeclaration(...y), R(...y);
|
|
5057
5057
|
}, m.canvasMutationCb = (...y) => {
|
|
5058
5058
|
g.canvasMutation && g.canvasMutation(...y), S(...y);
|
|
5059
5059
|
}, m.fontCb = (...y) => {
|
|
5060
|
-
g.font && g.font(...y),
|
|
5060
|
+
g.font && g.font(...y), P(...y);
|
|
5061
5061
|
}, m.selectionCb = (...y) => {
|
|
5062
|
-
g.selection && g.selection(...y),
|
|
5062
|
+
g.selection && g.selection(...y), D(...y);
|
|
5063
5063
|
}, m.customElementCb = (...y) => {
|
|
5064
|
-
g.customElement && g.customElement(...y),
|
|
5064
|
+
g.customElement && g.customElement(...y), b(...y);
|
|
5065
5065
|
};
|
|
5066
5066
|
})(e, t), e.recordDOM && (s = qc(e, e.doc));
|
|
5067
|
-
const n = function({ mousemoveCb: m, sampling: g, doc: v, mirror:
|
|
5067
|
+
const n = function({ mousemoveCb: m, sampling: g, doc: v, mirror: I }) {
|
|
5068
5068
|
if (g.mousemove === !1) return () => {
|
|
5069
5069
|
};
|
|
5070
5070
|
const O = typeof g.mousemove == "number" ? g.mousemove : 50, E = typeof g.mousemoveCallback == "number" ? g.mousemoveCallback : 500;
|
|
5071
|
-
let
|
|
5071
|
+
let A, M = [];
|
|
5072
5072
|
const k = $t($((S) => {
|
|
5073
|
-
const
|
|
5074
|
-
m(
|
|
5073
|
+
const P = Date.now() - A;
|
|
5074
|
+
m(M.map((D) => (D.timeOffset -= P, D)), S), M = [], A = null;
|
|
5075
5075
|
}), E), T = $($t($((S) => {
|
|
5076
|
-
const
|
|
5077
|
-
|
|
5078
|
-
}), O, { trailing: !1 })),
|
|
5076
|
+
const P = er(S), { clientX: D, clientY: b } = oi(S) ? S.changedTouches[0] : S;
|
|
5077
|
+
A || (A = ws()), M.push({ x: D, y: b, id: I.getId(P), timeOffset: ws() - A }), k(typeof DragEvent < "u" && S instanceof DragEvent ? G.Drag : S instanceof MouseEvent ? G.MouseMove : G.TouchMove);
|
|
5078
|
+
}), O, { trailing: !1 })), R = [ve("mousemove", T, v), ve("touchmove", T, v), ve("drag", T, v)];
|
|
5079
5079
|
return $(() => {
|
|
5080
|
-
|
|
5080
|
+
R.forEach((S) => S());
|
|
5081
5081
|
});
|
|
5082
5082
|
}(e), i = bf(e), a = Jc(e), o = function({ viewportResizeCb: m }, { win: g }) {
|
|
5083
|
-
let v = -1,
|
|
5084
|
-
return
|
|
5083
|
+
let v = -1, I = -1;
|
|
5084
|
+
return ve("resize", $($t($(() => {
|
|
5085
5085
|
const O = Bc(), E = zc();
|
|
5086
|
-
v === O &&
|
|
5086
|
+
v === O && I === E || (m({ width: Number(E), height: Number(O) }), v = O, I = E);
|
|
5087
5087
|
}), 200)), g);
|
|
5088
|
-
}(e, { win: r }), l = function({ inputCb: m, doc: g, mirror: v, blockClass:
|
|
5088
|
+
}(e, { win: r }), l = function({ inputCb: m, doc: g, mirror: v, blockClass: I, blockSelector: O, ignoreClass: E, ignoreSelector: A, maskInputOptions: M, maskInputFn: k, sampling: T, userTriggeredOnInput: R }) {
|
|
5089
5089
|
function S(F) {
|
|
5090
5090
|
let j = er(F);
|
|
5091
5091
|
const L = F.isTrusted, _ = j && j.tagName;
|
|
5092
|
-
if (j && _ === "OPTION" && (j =
|
|
5093
|
-
let
|
|
5092
|
+
if (j && _ === "OPTION" && (j = V.parentElement(j)), !j || !_ || vf.indexOf(_) < 0 || Se(j, I, O, !0) || j.classList.contains(E) || A && j.matches(A)) return;
|
|
5093
|
+
let ee = j.value, q = !1;
|
|
5094
5094
|
const me = Di(j) || "";
|
|
5095
|
-
me === "radio" || me === "checkbox" ? q = j.checked : (
|
|
5096
|
-
const
|
|
5097
|
-
me === "radio" &&
|
|
5098
|
-
if (
|
|
5099
|
-
const
|
|
5100
|
-
|
|
5095
|
+
me === "radio" || me === "checkbox" ? q = j.checked : (M[_.toLowerCase()] || M[me]) && (ee = Ui({ element: j, maskInputOptions: M, tagName: _, type: me, value: ee, maskInputFn: k })), P(j, R ? { text: ee, isChecked: q, userTriggered: L } : { text: ee, isChecked: q });
|
|
5096
|
+
const _e = j.name;
|
|
5097
|
+
me === "radio" && _e && q && g.querySelectorAll(`input[type="radio"][name="${_e}"]`).forEach((we) => {
|
|
5098
|
+
if (we !== j) {
|
|
5099
|
+
const H = we.value;
|
|
5100
|
+
P(we, R ? { text: H, isChecked: !q, userTriggered: !1 } : { text: H, isChecked: !q });
|
|
5101
5101
|
}
|
|
5102
5102
|
});
|
|
5103
5103
|
}
|
|
5104
|
-
function
|
|
5104
|
+
function P(F, j) {
|
|
5105
5105
|
const L = Ua.get(F);
|
|
5106
5106
|
if (!L || L.text !== j.text || L.isChecked !== j.isChecked) {
|
|
5107
5107
|
Ua.set(F, j);
|
|
@@ -5109,25 +5109,25 @@ function Sf(e, t = {}) {
|
|
|
5109
5109
|
$(m)({ ...j, id: _ });
|
|
5110
5110
|
}
|
|
5111
5111
|
}
|
|
5112
|
-
const
|
|
5113
|
-
if (!
|
|
5114
|
-
|
|
5112
|
+
const D = (T.input === "last" ? ["change"] : ["input", "change"]).map((F) => ve(F, $(S), g)), b = g.defaultView;
|
|
5113
|
+
if (!b) return () => {
|
|
5114
|
+
D.forEach((F) => F());
|
|
5115
5115
|
};
|
|
5116
|
-
const y =
|
|
5117
|
-
return y && y.set &&
|
|
5116
|
+
const y = b.Object.getOwnPropertyDescriptor(b.HTMLInputElement.prototype, "value"), U = [[b.HTMLInputElement.prototype, "value"], [b.HTMLInputElement.prototype, "checked"], [b.HTMLSelectElement.prototype, "value"], [b.HTMLTextAreaElement.prototype, "value"], [b.HTMLSelectElement.prototype, "selectedIndex"], [b.HTMLOptionElement.prototype, "selected"]];
|
|
5117
|
+
return y && y.set && D.push(...U.map((F) => $s(F[0], F[1], { set() {
|
|
5118
5118
|
$(S)({ target: this, isTrusted: !1 });
|
|
5119
|
-
} }, !1,
|
|
5120
|
-
|
|
5119
|
+
} }, !1, b))), $(() => {
|
|
5120
|
+
D.forEach((F) => F());
|
|
5121
5121
|
});
|
|
5122
|
-
}(e), c = function({ mediaInteractionCb: m, blockClass: g, blockSelector: v, mirror:
|
|
5123
|
-
const
|
|
5124
|
-
const
|
|
5125
|
-
if (!
|
|
5126
|
-
const { currentTime: S, volume:
|
|
5127
|
-
m({ type: k, id:
|
|
5128
|
-
}), O.media || 500)),
|
|
5122
|
+
}(e), c = function({ mediaInteractionCb: m, blockClass: g, blockSelector: v, mirror: I, sampling: O, doc: E }) {
|
|
5123
|
+
const A = $((k) => $t($((T) => {
|
|
5124
|
+
const R = er(T);
|
|
5125
|
+
if (!R || Se(R, g, v, !0)) return;
|
|
5126
|
+
const { currentTime: S, volume: P, muted: D, playbackRate: b, loop: y } = R;
|
|
5127
|
+
m({ type: k, id: I.getId(R), currentTime: S, volume: P, muted: D, playbackRate: b, loop: y });
|
|
5128
|
+
}), O.media || 500)), M = [ve("play", A(kt.Play), E), ve("pause", A(kt.Pause), E), ve("seeked", A(kt.Seeked), E), ve("volumechange", A(kt.VolumeChange), E), ve("ratechange", A(kt.RateChange), E)];
|
|
5129
5129
|
return $(() => {
|
|
5130
|
-
|
|
5130
|
+
M.forEach((k) => k());
|
|
5131
5131
|
});
|
|
5132
5132
|
}(e);
|
|
5133
5133
|
let u = () => {
|
|
@@ -5135,121 +5135,121 @@ function Sf(e, t = {}) {
|
|
|
5135
5135
|
}, h = () => {
|
|
5136
5136
|
}, f = () => {
|
|
5137
5137
|
};
|
|
5138
|
-
e.recordDOM && (u = function({ styleSheetRuleCb: m, mirror: g, stylesheetManager: v }, { win:
|
|
5139
|
-
if (!
|
|
5138
|
+
e.recordDOM && (u = function({ styleSheetRuleCb: m, mirror: g, stylesheetManager: v }, { win: I }) {
|
|
5139
|
+
if (!I.CSSStyleSheet || !I.CSSStyleSheet.prototype) return () => {
|
|
5140
5140
|
};
|
|
5141
|
-
const O =
|
|
5142
|
-
|
|
5143
|
-
const [
|
|
5144
|
-
return (y && y !== -1 ||
|
|
5145
|
-
}) }),
|
|
5146
|
-
const
|
|
5147
|
-
return
|
|
5141
|
+
const O = I.CSSStyleSheet.prototype.insertRule;
|
|
5142
|
+
I.CSSStyleSheet.prototype.insertRule = new Proxy(O, { apply: $((R, S, P) => {
|
|
5143
|
+
const [D, b] = P, { id: y, styleId: U } = rt(S, g, v.styleMirror);
|
|
5144
|
+
return (y && y !== -1 || U && U !== -1) && m({ id: y, styleId: U, adds: [{ rule: D, index: b }] }), R.apply(S, P);
|
|
5145
|
+
}) }), I.CSSStyleSheet.prototype.addRule = function(R, S, P = this.cssRules.length) {
|
|
5146
|
+
const D = `${R} { ${S} }`;
|
|
5147
|
+
return I.CSSStyleSheet.prototype.insertRule.apply(this, [D, P]);
|
|
5148
5148
|
};
|
|
5149
|
-
const E =
|
|
5150
|
-
let
|
|
5151
|
-
|
|
5152
|
-
const [
|
|
5153
|
-
return (
|
|
5154
|
-
}) }),
|
|
5155
|
-
return
|
|
5156
|
-
},
|
|
5157
|
-
const [
|
|
5158
|
-
return (
|
|
5159
|
-
}) })),
|
|
5160
|
-
const [
|
|
5161
|
-
return (
|
|
5149
|
+
const E = I.CSSStyleSheet.prototype.deleteRule;
|
|
5150
|
+
let A, M;
|
|
5151
|
+
I.CSSStyleSheet.prototype.deleteRule = new Proxy(E, { apply: $((R, S, P) => {
|
|
5152
|
+
const [D] = P, { id: b, styleId: y } = rt(S, g, v.styleMirror);
|
|
5153
|
+
return (b && b !== -1 || y && y !== -1) && m({ id: b, styleId: y, removes: [{ index: D }] }), R.apply(S, P);
|
|
5154
|
+
}) }), I.CSSStyleSheet.prototype.removeRule = function(R) {
|
|
5155
|
+
return I.CSSStyleSheet.prototype.deleteRule.apply(this, [R]);
|
|
5156
|
+
}, I.CSSStyleSheet.prototype.replace && (A = I.CSSStyleSheet.prototype.replace, I.CSSStyleSheet.prototype.replace = new Proxy(A, { apply: $((R, S, P) => {
|
|
5157
|
+
const [D] = P, { id: b, styleId: y } = rt(S, g, v.styleMirror);
|
|
5158
|
+
return (b && b !== -1 || y && y !== -1) && m({ id: b, styleId: y, replace: D }), R.apply(S, P);
|
|
5159
|
+
}) })), I.CSSStyleSheet.prototype.replaceSync && (M = I.CSSStyleSheet.prototype.replaceSync, I.CSSStyleSheet.prototype.replaceSync = new Proxy(M, { apply: $((R, S, P) => {
|
|
5160
|
+
const [D] = P, { id: b, styleId: y } = rt(S, g, v.styleMirror);
|
|
5161
|
+
return (b && b !== -1 || y && y !== -1) && m({ id: b, styleId: y, replaceSync: D }), R.apply(S, P);
|
|
5162
5162
|
}) }));
|
|
5163
5163
|
const k = {};
|
|
5164
|
-
Vr("CSSGroupingRule") ? k.CSSGroupingRule =
|
|
5164
|
+
Vr("CSSGroupingRule") ? k.CSSGroupingRule = I.CSSGroupingRule : (Vr("CSSMediaRule") && (k.CSSMediaRule = I.CSSMediaRule), Vr("CSSConditionRule") && (k.CSSConditionRule = I.CSSConditionRule), Vr("CSSSupportsRule") && (k.CSSSupportsRule = I.CSSSupportsRule));
|
|
5165
5165
|
const T = {};
|
|
5166
|
-
return Object.entries(k).forEach(([
|
|
5167
|
-
T[
|
|
5168
|
-
const [y,
|
|
5169
|
-
return (F && F !== -1 || j && j !== -1) && m({ id: F, styleId: j, adds: [{ rule: y, index: [...jr(
|
|
5170
|
-
}) }), S.prototype.deleteRule = new Proxy(T[
|
|
5171
|
-
const [y] =
|
|
5172
|
-
return (
|
|
5166
|
+
return Object.entries(k).forEach(([R, S]) => {
|
|
5167
|
+
T[R] = { insertRule: S.prototype.insertRule, deleteRule: S.prototype.deleteRule }, S.prototype.insertRule = new Proxy(T[R].insertRule, { apply: $((P, D, b) => {
|
|
5168
|
+
const [y, U] = b, { id: F, styleId: j } = rt(D.parentStyleSheet, g, v.styleMirror);
|
|
5169
|
+
return (F && F !== -1 || j && j !== -1) && m({ id: F, styleId: j, adds: [{ rule: y, index: [...jr(D), U || 0] }] }), P.apply(D, b);
|
|
5170
|
+
}) }), S.prototype.deleteRule = new Proxy(T[R].deleteRule, { apply: $((P, D, b) => {
|
|
5171
|
+
const [y] = b, { id: U, styleId: F } = rt(D.parentStyleSheet, g, v.styleMirror);
|
|
5172
|
+
return (U && U !== -1 || F && F !== -1) && m({ id: U, styleId: F, removes: [{ index: [...jr(D), y] }] }), P.apply(D, b);
|
|
5173
5173
|
}) });
|
|
5174
5174
|
}), $(() => {
|
|
5175
|
-
|
|
5176
|
-
S.prototype.insertRule = T[
|
|
5175
|
+
I.CSSStyleSheet.prototype.insertRule = O, I.CSSStyleSheet.prototype.deleteRule = E, A && (I.CSSStyleSheet.prototype.replace = A), M && (I.CSSStyleSheet.prototype.replaceSync = M), Object.entries(k).forEach(([R, S]) => {
|
|
5176
|
+
S.prototype.insertRule = T[R].insertRule, S.prototype.deleteRule = T[R].deleteRule;
|
|
5177
5177
|
});
|
|
5178
5178
|
});
|
|
5179
|
-
}(e, { win: r }), d = Kc(e, e.doc), h = function({ styleDeclarationCb: m, mirror: g, ignoreCSSAttributes: v, stylesheetManager:
|
|
5179
|
+
}(e, { win: r }), d = Kc(e, e.doc), h = function({ styleDeclarationCb: m, mirror: g, ignoreCSSAttributes: v, stylesheetManager: I }, { win: O }) {
|
|
5180
5180
|
const E = O.CSSStyleDeclaration.prototype.setProperty;
|
|
5181
|
-
O.CSSStyleDeclaration.prototype.setProperty = new Proxy(E, { apply: $((
|
|
5182
|
-
var
|
|
5183
|
-
const [S,
|
|
5184
|
-
if (v.has(S)) return E.apply(k, [S,
|
|
5185
|
-
const { id:
|
|
5186
|
-
return (
|
|
5181
|
+
O.CSSStyleDeclaration.prototype.setProperty = new Proxy(E, { apply: $((M, k, T) => {
|
|
5182
|
+
var R;
|
|
5183
|
+
const [S, P, D] = T;
|
|
5184
|
+
if (v.has(S)) return E.apply(k, [S, P, D]);
|
|
5185
|
+
const { id: b, styleId: y } = rt((R = k.parentRule) == null ? void 0 : R.parentStyleSheet, g, I.styleMirror);
|
|
5186
|
+
return (b && b !== -1 || y && y !== -1) && m({ id: b, styleId: y, set: { property: S, value: P, priority: D }, index: jr(k.parentRule) }), M.apply(k, T);
|
|
5187
5187
|
}) });
|
|
5188
|
-
const
|
|
5189
|
-
return O.CSSStyleDeclaration.prototype.removeProperty = new Proxy(
|
|
5190
|
-
var
|
|
5188
|
+
const A = O.CSSStyleDeclaration.prototype.removeProperty;
|
|
5189
|
+
return O.CSSStyleDeclaration.prototype.removeProperty = new Proxy(A, { apply: $((M, k, T) => {
|
|
5190
|
+
var R;
|
|
5191
5191
|
const [S] = T;
|
|
5192
|
-
if (v.has(S)) return
|
|
5193
|
-
const { id:
|
|
5194
|
-
return (
|
|
5192
|
+
if (v.has(S)) return A.apply(k, [S]);
|
|
5193
|
+
const { id: P, styleId: D } = rt((R = k.parentRule) == null ? void 0 : R.parentStyleSheet, g, I.styleMirror);
|
|
5194
|
+
return (P && P !== -1 || D && D !== -1) && m({ id: P, styleId: D, remove: { property: S }, index: jr(k.parentRule) }), M.apply(k, T);
|
|
5195
5195
|
}) }), $(() => {
|
|
5196
|
-
O.CSSStyleDeclaration.prototype.setProperty = E, O.CSSStyleDeclaration.prototype.removeProperty =
|
|
5196
|
+
O.CSSStyleDeclaration.prototype.setProperty = E, O.CSSStyleDeclaration.prototype.removeProperty = A;
|
|
5197
5197
|
});
|
|
5198
5198
|
}(e, { win: r }), e.collectFonts && (f = function({ fontCb: m, doc: g }) {
|
|
5199
5199
|
const v = g.defaultView;
|
|
5200
5200
|
if (!v) return () => {
|
|
5201
5201
|
};
|
|
5202
|
-
const
|
|
5203
|
-
v.FontFace = function(
|
|
5204
|
-
const
|
|
5205
|
-
return O.set(
|
|
5202
|
+
const I = [], O = /* @__PURE__ */ new WeakMap(), E = v.FontFace;
|
|
5203
|
+
v.FontFace = function(M, k, T) {
|
|
5204
|
+
const R = new E(M, k, T);
|
|
5205
|
+
return O.set(R, { family: M, buffer: typeof k != "string", descriptors: T, fontSource: typeof k == "string" ? k : JSON.stringify(Array.from(new Uint8Array(k))) }), R;
|
|
5206
5206
|
};
|
|
5207
|
-
const
|
|
5207
|
+
const A = At(g.fonts, "add", function(M) {
|
|
5208
5208
|
return function(k) {
|
|
5209
5209
|
return setTimeout($(() => {
|
|
5210
5210
|
const T = O.get(k);
|
|
5211
5211
|
T && (m(T), O.delete(k));
|
|
5212
|
-
}), 0),
|
|
5212
|
+
}), 0), M.apply(this, [k]);
|
|
5213
5213
|
};
|
|
5214
5214
|
});
|
|
5215
|
-
return
|
|
5215
|
+
return I.push(() => {
|
|
5216
5216
|
v.FontFace = E;
|
|
5217
|
-
}),
|
|
5218
|
-
|
|
5217
|
+
}), I.push(A), $(() => {
|
|
5218
|
+
I.forEach((M) => M());
|
|
5219
5219
|
});
|
|
5220
5220
|
}(e)));
|
|
5221
|
-
const
|
|
5222
|
-
const { doc: g, mirror: v, blockClass:
|
|
5223
|
-
let
|
|
5224
|
-
const
|
|
5221
|
+
const w = function(m) {
|
|
5222
|
+
const { doc: g, mirror: v, blockClass: I, blockSelector: O, selectionCb: E } = m;
|
|
5223
|
+
let A = !0;
|
|
5224
|
+
const M = $(() => {
|
|
5225
5225
|
const k = g.getSelection();
|
|
5226
|
-
if (!k ||
|
|
5227
|
-
|
|
5228
|
-
const T = [],
|
|
5229
|
-
for (let S = 0; S <
|
|
5230
|
-
const
|
|
5231
|
-
Se(
|
|
5226
|
+
if (!k || A && (k != null && k.isCollapsed)) return;
|
|
5227
|
+
A = k.isCollapsed || !1;
|
|
5228
|
+
const T = [], R = k.rangeCount || 0;
|
|
5229
|
+
for (let S = 0; S < R; S++) {
|
|
5230
|
+
const P = k.getRangeAt(S), { startContainer: D, startOffset: b, endContainer: y, endOffset: U } = P;
|
|
5231
|
+
Se(D, I, O, !0) || Se(y, I, O, !0) || T.push({ start: v.getId(D), startOffset: b, end: v.getId(y), endOffset: U });
|
|
5232
5232
|
}
|
|
5233
5233
|
E({ ranges: T });
|
|
5234
5234
|
});
|
|
5235
|
-
return
|
|
5235
|
+
return M(), ve("selectionchange", M);
|
|
5236
5236
|
}(e), p = function({ doc: m, customElementCb: g }) {
|
|
5237
5237
|
const v = m.defaultView;
|
|
5238
|
-
return v && v.customElements ? At(v.customElements, "define", function(
|
|
5239
|
-
return function(O, E,
|
|
5238
|
+
return v && v.customElements ? At(v.customElements, "define", function(I) {
|
|
5239
|
+
return function(O, E, A) {
|
|
5240
5240
|
try {
|
|
5241
5241
|
g({ define: { name: O } });
|
|
5242
5242
|
} catch {
|
|
5243
5243
|
console.warn(`Custom element callback failed for ${O}`);
|
|
5244
5244
|
}
|
|
5245
|
-
return
|
|
5245
|
+
return I.apply(this, [O, E, A]);
|
|
5246
5246
|
};
|
|
5247
5247
|
}) : () => {
|
|
5248
5248
|
};
|
|
5249
|
-
}(e),
|
|
5250
|
-
for (const m of e.plugins)
|
|
5249
|
+
}(e), C = [];
|
|
5250
|
+
for (const m of e.plugins) C.push(m.observer(m.callback, r, m.options));
|
|
5251
5251
|
return $(() => {
|
|
5252
|
-
mt.forEach((m) => m.reset()), s == null || s.disconnect(), n(), i(), a(), o(), l(), c(), u(), d(), h(), f(),
|
|
5252
|
+
mt.forEach((m) => m.reset()), s == null || s.disconnect(), n(), i(), a(), o(), l(), c(), u(), d(), h(), f(), w(), p(), C.forEach((m) => m());
|
|
5253
5253
|
});
|
|
5254
5254
|
}
|
|
5255
5255
|
function Wr(e) {
|
|
@@ -5260,7 +5260,7 @@ function Vr(e) {
|
|
|
5260
5260
|
}
|
|
5261
5261
|
class Da {
|
|
5262
5262
|
constructor(t) {
|
|
5263
|
-
|
|
5263
|
+
x(this, "iframeIdToRemoteIdMap", /* @__PURE__ */ new WeakMap()), x(this, "iframeRemoteIdToIdMap", /* @__PURE__ */ new WeakMap()), this.generateIdFn = t;
|
|
5264
5264
|
}
|
|
5265
5265
|
getId(t, r, s, n) {
|
|
5266
5266
|
const i = s || this.getIdToRemoteIdMap(t), a = n || this.getRemoteIdToIdMap(t);
|
|
@@ -5294,7 +5294,7 @@ class Da {
|
|
|
5294
5294
|
}
|
|
5295
5295
|
class If {
|
|
5296
5296
|
constructor(t) {
|
|
5297
|
-
|
|
5297
|
+
x(this, "iframes", /* @__PURE__ */ new WeakMap()), x(this, "crossOriginIframeMap", /* @__PURE__ */ new WeakMap()), x(this, "crossOriginIframeMirror", new Da(Ll)), x(this, "crossOriginIframeStyleMirror"), x(this, "crossOriginIframeRootIdMap", /* @__PURE__ */ new WeakMap()), x(this, "mirror"), x(this, "mutationCb"), x(this, "wrappedEmit"), x(this, "loadListener"), x(this, "stylesheetManager"), x(this, "recordCrossOriginIframes"), this.mutationCb = t.mutationCb, this.wrappedEmit = t.wrappedEmit, this.stylesheetManager = t.stylesheetManager, this.recordCrossOriginIframes = t.recordCrossOriginIframes, this.crossOriginIframeStyleMirror = new Da(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)), this.mirror = t.mirror, this.recordCrossOriginIframes && window.addEventListener("message", this.handleMessage.bind(this));
|
|
5298
5298
|
}
|
|
5299
5299
|
addIframe(t) {
|
|
5300
5300
|
this.iframes.set(t, !0), t.contentWindow && this.crossOriginIframeMap.set(t.contentWindow, t);
|
|
@@ -5320,7 +5320,7 @@ class If {
|
|
|
5320
5320
|
case Y.FullSnapshot: {
|
|
5321
5321
|
this.crossOriginIframeMirror.reset(t), this.crossOriginIframeStyleMirror.reset(t), this.replaceIdOnNode(r.data.node, t);
|
|
5322
5322
|
const n = r.data.node.id;
|
|
5323
|
-
return this.crossOriginIframeRootIdMap.set(t, n), this.patchRootIdOnNode(r.data.node, n), { timestamp: r.timestamp, type: Y.IncrementalSnapshot, data: { source:
|
|
5323
|
+
return this.crossOriginIframeRootIdMap.set(t, n), this.patchRootIdOnNode(r.data.node, n), { timestamp: r.timestamp, type: Y.IncrementalSnapshot, data: { source: G.Mutation, adds: [{ parentId: this.mirror.getId(t), nextId: null, node: r.data.node }], removes: [], texts: [], attributes: [], isAttachIframe: !0 } };
|
|
5324
5324
|
}
|
|
5325
5325
|
case Y.Meta:
|
|
5326
5326
|
case Y.Load:
|
|
@@ -5332,7 +5332,7 @@ class If {
|
|
|
5332
5332
|
return this.replaceIds(r.data.payload, t, ["id", "parentId", "previousId", "nextId"]), r;
|
|
5333
5333
|
case Y.IncrementalSnapshot:
|
|
5334
5334
|
switch (r.data.source) {
|
|
5335
|
-
case
|
|
5335
|
+
case G.Mutation:
|
|
5336
5336
|
return r.data.adds.forEach((n) => {
|
|
5337
5337
|
this.replaceIds(n, t, ["parentId", "nextId", "previousId"]), this.replaceIdOnNode(n.node, t);
|
|
5338
5338
|
const i = this.crossOriginIframeRootIdMap.get(t);
|
|
@@ -5344,30 +5344,30 @@ class If {
|
|
|
5344
5344
|
}), r.data.texts.forEach((n) => {
|
|
5345
5345
|
this.replaceIds(n, t, ["id"]);
|
|
5346
5346
|
}), r;
|
|
5347
|
-
case
|
|
5348
|
-
case
|
|
5349
|
-
case
|
|
5347
|
+
case G.Drag:
|
|
5348
|
+
case G.TouchMove:
|
|
5349
|
+
case G.MouseMove:
|
|
5350
5350
|
return r.data.positions.forEach((n) => {
|
|
5351
5351
|
this.replaceIds(n, t, ["id"]);
|
|
5352
5352
|
}), r;
|
|
5353
|
-
case
|
|
5353
|
+
case G.ViewportResize:
|
|
5354
5354
|
return !1;
|
|
5355
|
-
case
|
|
5356
|
-
case
|
|
5357
|
-
case
|
|
5358
|
-
case
|
|
5359
|
-
case
|
|
5355
|
+
case G.MediaInteraction:
|
|
5356
|
+
case G.MouseInteraction:
|
|
5357
|
+
case G.Scroll:
|
|
5358
|
+
case G.CanvasMutation:
|
|
5359
|
+
case G.Input:
|
|
5360
5360
|
return this.replaceIds(r.data, t, ["id"]), r;
|
|
5361
|
-
case
|
|
5362
|
-
case
|
|
5361
|
+
case G.StyleSheetRule:
|
|
5362
|
+
case G.StyleDeclaration:
|
|
5363
5363
|
return this.replaceIds(r.data, t, ["id"]), this.replaceStyleIds(r.data, t, ["styleId"]), r;
|
|
5364
|
-
case
|
|
5364
|
+
case G.Font:
|
|
5365
5365
|
return r;
|
|
5366
|
-
case
|
|
5366
|
+
case G.Selection:
|
|
5367
5367
|
return r.data.ranges.forEach((n) => {
|
|
5368
5368
|
this.replaceIds(n, t, ["start", "end"]);
|
|
5369
5369
|
}), r;
|
|
5370
|
-
case
|
|
5370
|
+
case G.AdoptedStyleSheet:
|
|
5371
5371
|
return this.replaceIds(r.data, t, ["id"]), this.replaceStyleIds(r.data, t, ["styleIds"]), (s = r.data.styles) == null || s.forEach((n) => {
|
|
5372
5372
|
this.replaceStyleIds(n, t, ["styleId"]);
|
|
5373
5373
|
}), r;
|
|
@@ -5398,7 +5398,7 @@ class If {
|
|
|
5398
5398
|
}
|
|
5399
5399
|
class Cf {
|
|
5400
5400
|
constructor(t) {
|
|
5401
|
-
|
|
5401
|
+
x(this, "shadowDoms", /* @__PURE__ */ new WeakSet()), x(this, "mutationCb"), x(this, "scrollCb"), x(this, "bypassOptions"), x(this, "mirror"), x(this, "restoreHandlers", []), this.mutationCb = t.mutationCb, this.scrollCb = t.scrollCb, this.bypassOptions = t.bypassOptions, this.mirror = t.mirror, this.init();
|
|
5402
5402
|
}
|
|
5403
5403
|
init() {
|
|
5404
5404
|
this.reset(), this.patchAttachShadow(Element, document);
|
|
@@ -5408,7 +5408,7 @@ class Cf {
|
|
|
5408
5408
|
this.shadowDoms.add(t);
|
|
5409
5409
|
const s = qc({ ...this.bypassOptions, doc: r, mutationCb: this.mutationCb, mirror: this.mirror, shadowDomManager: this }, t);
|
|
5410
5410
|
this.restoreHandlers.push(() => s.disconnect()), this.restoreHandlers.push(Jc({ ...this.bypassOptions, scrollCb: this.scrollCb, doc: t, mirror: this.mirror })), setTimeout(() => {
|
|
5411
|
-
t.adoptedStyleSheets && t.adoptedStyleSheets.length > 0 && this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets, this.mirror.getId(
|
|
5411
|
+
t.adoptedStyleSheets && t.adoptedStyleSheets.length > 0 && this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets, this.mirror.getId(V.host(t))), this.restoreHandlers.push(Kc({ mirror: this.mirror, stylesheetManager: this.bypassOptions.stylesheetManager }, t));
|
|
5412
5412
|
}, 0);
|
|
5413
5413
|
}
|
|
5414
5414
|
observeAttachShadow(t) {
|
|
@@ -5418,7 +5418,7 @@ class Cf {
|
|
|
5418
5418
|
const s = this;
|
|
5419
5419
|
this.restoreHandlers.push(At(t.prototype, "attachShadow", function(n) {
|
|
5420
5420
|
return function(i) {
|
|
5421
|
-
const a = n.call(this, i), o =
|
|
5421
|
+
const a = n.call(this, i), o = V.shadowRoot(this);
|
|
5422
5422
|
return o && $c(this) && s.addShadowRoot(o, r), a;
|
|
5423
5423
|
};
|
|
5424
5424
|
}));
|
|
@@ -5432,7 +5432,7 @@ class Cf {
|
|
|
5432
5432
|
}), this.restoreHandlers = [], this.shadowDoms = /* @__PURE__ */ new WeakSet();
|
|
5433
5433
|
}
|
|
5434
5434
|
}
|
|
5435
|
-
for (var Yt = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", kf = typeof Uint8Array > "u" ? [] : new Uint8Array(256),
|
|
5435
|
+
for (var Yt = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", kf = typeof Uint8Array > "u" ? [] : new Uint8Array(256), Hr = 0; Hr < 64; Hr++) kf[Yt.charCodeAt(Hr)] = Hr;
|
|
5436
5436
|
const Pa = /* @__PURE__ */ new Map(), Zc = (e, t, r) => {
|
|
5437
5437
|
if (!e || !Qc(e, t) && typeof e != "object") return;
|
|
5438
5438
|
const s = function(i, a) {
|
|
@@ -5495,8 +5495,8 @@ function Na(e, t, r, s, n, i) {
|
|
|
5495
5495
|
return function(...d) {
|
|
5496
5496
|
const h = u.apply(this, d);
|
|
5497
5497
|
if (Zc(h, i, this), "tagName" in this.canvas && !Se(this.canvas, s, n, !0)) {
|
|
5498
|
-
const f = Xc(d, i, this),
|
|
5499
|
-
r(this.canvas,
|
|
5498
|
+
const f = Xc(d, i, this), w = { type: t, property: l, args: f };
|
|
5499
|
+
r(this.canvas, w);
|
|
5500
5500
|
}
|
|
5501
5501
|
return h;
|
|
5502
5502
|
};
|
|
@@ -5528,7 +5528,7 @@ function Ef(e) {
|
|
|
5528
5528
|
}
|
|
5529
5529
|
class xf {
|
|
5530
5530
|
constructor(t) {
|
|
5531
|
-
|
|
5531
|
+
x(this, "pendingCanvasMutations", /* @__PURE__ */ new Map()), x(this, "rafStamps", { latestId: 0, invokeId: null }), x(this, "mirror"), x(this, "mutationCb"), x(this, "resetObservers"), x(this, "frozen", !1), x(this, "locked", !1), x(this, "processMutation", (l, c) => {
|
|
5532
5532
|
!(this.rafStamps.invokeId && this.rafStamps.latestId !== this.rafStamps.invokeId) && this.rafStamps.invokeId || (this.rafStamps.invokeId = this.rafStamps.latestId), this.pendingCanvasMutations.has(l) || this.pendingCanvasMutations.set(l, []), this.pendingCanvasMutations.get(l).push(c);
|
|
5533
5533
|
});
|
|
5534
5534
|
const { sampling: r = "all", win: s, blockClass: n, blockSelector: i, recordCanvas: a, dataURLOptions: o } = t;
|
|
@@ -5552,29 +5552,29 @@ class xf {
|
|
|
5552
5552
|
initCanvasFPSObserver(t, r, s, n, i) {
|
|
5553
5553
|
const a = _a(r, s, n, !0), o = /* @__PURE__ */ new Map(), l = new Ef();
|
|
5554
5554
|
l.onmessage = (f) => {
|
|
5555
|
-
const { id:
|
|
5556
|
-
if (o.set(
|
|
5557
|
-
const { base64: p, type:
|
|
5558
|
-
this.mutationCb({ id:
|
|
5555
|
+
const { id: w } = f.data;
|
|
5556
|
+
if (o.set(w, !1), !("base64" in f.data)) return;
|
|
5557
|
+
const { base64: p, type: C, width: m, height: g } = f.data;
|
|
5558
|
+
this.mutationCb({ id: w, type: Ct["2D"], commands: [{ property: "clearRect", args: [0, 0, m, g] }, { property: "drawImage", args: [{ rr_type: "ImageBitmap", args: [{ rr_type: "Blob", data: [{ rr_type: "ArrayBuffer", base64: p }], type: C }] }, 0, 0] }] });
|
|
5559
5559
|
};
|
|
5560
5560
|
const c = 1e3 / t;
|
|
5561
5561
|
let u, d = 0;
|
|
5562
5562
|
const h = (f) => {
|
|
5563
5563
|
d && f - d < c || (d = f, (() => {
|
|
5564
|
-
const
|
|
5564
|
+
const w = [];
|
|
5565
5565
|
return r.document.querySelectorAll("canvas").forEach((p) => {
|
|
5566
|
-
Se(p, s, n, !0) ||
|
|
5567
|
-
}),
|
|
5568
|
-
})().forEach(async (
|
|
5566
|
+
Se(p, s, n, !0) || w.push(p);
|
|
5567
|
+
}), w;
|
|
5568
|
+
})().forEach(async (w) => {
|
|
5569
5569
|
var p;
|
|
5570
|
-
const
|
|
5571
|
-
if (o.get(
|
|
5572
|
-
if (o.set(
|
|
5573
|
-
const g =
|
|
5570
|
+
const C = this.mirror.getId(w);
|
|
5571
|
+
if (o.get(C) || w.width === 0 || w.height === 0) return;
|
|
5572
|
+
if (o.set(C, !0), ["webgl", "webgl2"].includes(w.__context)) {
|
|
5573
|
+
const g = w.getContext(w.__context);
|
|
5574
5574
|
((p = g == null ? void 0 : g.getContextAttributes()) == null ? void 0 : p.preserveDrawingBuffer) === !1 && g.clear(g.COLOR_BUFFER_BIT);
|
|
5575
5575
|
}
|
|
5576
|
-
const m = await createImageBitmap(
|
|
5577
|
-
l.postMessage({ id:
|
|
5576
|
+
const m = await createImageBitmap(w);
|
|
5577
|
+
l.postMessage({ id: C, bitmap: m, width: w.width, height: w.height, dataURLOptions: i.dataURLOptions }, [m]);
|
|
5578
5578
|
})), u = requestAnimationFrame(h);
|
|
5579
5579
|
};
|
|
5580
5580
|
u = requestAnimationFrame(h), this.resetObservers = () => {
|
|
@@ -5587,20 +5587,20 @@ class xf {
|
|
|
5587
5587
|
const d = [], h = Object.getOwnPropertyNames(l.CanvasRenderingContext2D.prototype);
|
|
5588
5588
|
for (const f of h) try {
|
|
5589
5589
|
if (typeof l.CanvasRenderingContext2D.prototype[f] != "function") continue;
|
|
5590
|
-
const
|
|
5591
|
-
return function(...
|
|
5590
|
+
const w = At(l.CanvasRenderingContext2D.prototype, f, function(p) {
|
|
5591
|
+
return function(...C) {
|
|
5592
5592
|
return Se(this.canvas, c, u, !0) || setTimeout(() => {
|
|
5593
|
-
const m = Xc(
|
|
5593
|
+
const m = Xc(C, l, this);
|
|
5594
5594
|
o(this.canvas, { type: Ct["2D"], property: f, args: m });
|
|
5595
|
-
}, 0), p.apply(this,
|
|
5595
|
+
}, 0), p.apply(this, C);
|
|
5596
5596
|
};
|
|
5597
5597
|
});
|
|
5598
|
-
d.push(
|
|
5598
|
+
d.push(w);
|
|
5599
5599
|
} catch {
|
|
5600
|
-
const
|
|
5600
|
+
const w = $s(l.CanvasRenderingContext2D.prototype, f, { set(p) {
|
|
5601
5601
|
o(this.canvas, { type: Ct["2D"], property: f, args: [p], setter: !0 });
|
|
5602
5602
|
} });
|
|
5603
|
-
d.push(
|
|
5603
|
+
d.push(w);
|
|
5604
5604
|
}
|
|
5605
5605
|
return () => {
|
|
5606
5606
|
d.forEach((f) => f());
|
|
@@ -5643,7 +5643,7 @@ class xf {
|
|
|
5643
5643
|
}
|
|
5644
5644
|
class Tf {
|
|
5645
5645
|
constructor(t) {
|
|
5646
|
-
|
|
5646
|
+
x(this, "trackedLinkElements", /* @__PURE__ */ new WeakSet()), x(this, "mutationCb"), x(this, "adoptedStyleSheetCb"), x(this, "styleMirror", new ff()), this.mutationCb = t.mutationCb, this.adoptedStyleSheetCb = t.adoptedStyleSheetCb;
|
|
5647
5647
|
}
|
|
5648
5648
|
attachLinkElement(t, r) {
|
|
5649
5649
|
"_cssText" in r.attributes && this.mutationCb({ adds: [], removes: [], texts: [], attributes: [{ id: r.id, attributes: r.attributes }] }), this.trackLinkElement(t);
|
|
@@ -5668,7 +5668,7 @@ class Tf {
|
|
|
5668
5668
|
}
|
|
5669
5669
|
class Rf {
|
|
5670
5670
|
constructor() {
|
|
5671
|
-
|
|
5671
|
+
x(this, "nodeMap", /* @__PURE__ */ new WeakMap()), x(this, "active", !1);
|
|
5672
5672
|
}
|
|
5673
5673
|
inOtherBuffer(t, r) {
|
|
5674
5674
|
const s = this.nodeMap.get(t);
|
|
@@ -5691,95 +5691,95 @@ try {
|
|
|
5691
5691
|
} catch (e) {
|
|
5692
5692
|
console.debug("Unable to override Array.from", e);
|
|
5693
5693
|
}
|
|
5694
|
-
const
|
|
5694
|
+
const Oe = new Rl();
|
|
5695
5695
|
function qt(e = {}) {
|
|
5696
|
-
const { emit: t, checkoutEveryNms: r, checkoutEveryNth: s, blockClass: n = "rr-block", blockSelector: i = null, ignoreClass: a = "rr-ignore", ignoreSelector: o = null, maskTextClass: l = "rr-mask", maskTextSelector: c = null, inlineStylesheet: u = !0, maskAllInputs: d, maskInputOptions: h, slimDOMOptions: f, maskInputFn:
|
|
5697
|
-
Qt =
|
|
5698
|
-
const y = !
|
|
5699
|
-
let
|
|
5696
|
+
const { emit: t, checkoutEveryNms: r, checkoutEveryNth: s, blockClass: n = "rr-block", blockSelector: i = null, ignoreClass: a = "rr-ignore", ignoreSelector: o = null, maskTextClass: l = "rr-mask", maskTextSelector: c = null, inlineStylesheet: u = !0, maskAllInputs: d, maskInputOptions: h, slimDOMOptions: f, maskInputFn: w, maskTextFn: p, hooks: C, packFn: m, sampling: g = {}, dataURLOptions: v = {}, mousemoveWait: I, recordDOM: O = !0, recordCanvas: E = !1, recordCrossOriginIframes: A = !1, recordAfter: M = e.recordAfter === "DOMContentLoaded" ? e.recordAfter : "load", userTriggeredOnInput: k = !1, collectFonts: T = !1, inlineImages: R = !1, plugins: S, keepIframeSrcFn: P = () => !1, ignoreCSSAttributes: D = /* @__PURE__ */ new Set([]), errorHandler: b } = e;
|
|
5697
|
+
Qt = b;
|
|
5698
|
+
const y = !A || window.parent === window;
|
|
5699
|
+
let U = !1;
|
|
5700
5700
|
if (!y) try {
|
|
5701
|
-
window.parent.document && (
|
|
5701
|
+
window.parent.document && (U = !1);
|
|
5702
5702
|
} catch {
|
|
5703
|
-
|
|
5703
|
+
U = !0;
|
|
5704
5704
|
}
|
|
5705
5705
|
if (y && !t) throw new Error("emit function is required");
|
|
5706
|
-
if (!y && !
|
|
5706
|
+
if (!y && !U) return () => {
|
|
5707
5707
|
};
|
|
5708
|
-
|
|
5708
|
+
I !== void 0 && g.mousemove === void 0 && (g.mousemove = I), Oe.reset();
|
|
5709
5709
|
const F = d === !0 ? { color: !0, date: !0, "datetime-local": !0, email: !0, month: !0, number: !0, range: !0, search: !0, tel: !0, text: !0, time: !0, url: !0, week: !0, textarea: !0, select: !0, password: !0 } : h !== void 0 ? h : { password: !0 }, j = f === !0 || f === "all" ? { script: !0, comment: !0, headFavicon: !0, headWhitespace: !0, headMetaSocial: !0, headMetaRobots: !0, headMetaHttpEquiv: !0, headMetaVerification: !0, headMetaAuthorship: f === "all", headMetaDescKeywords: f === "all", headTitleMutations: f === "all" } : f || {};
|
|
5710
5710
|
let L;
|
|
5711
5711
|
(function(W = window) {
|
|
5712
5712
|
"NodeList" in W && !W.NodeList.prototype.forEach && (W.NodeList.prototype.forEach = Array.prototype.forEach), "DOMTokenList" in W && !W.DOMTokenList.prototype.forEach && (W.DOMTokenList.prototype.forEach = Array.prototype.forEach);
|
|
5713
5713
|
})();
|
|
5714
5714
|
let _ = 0;
|
|
5715
|
-
const
|
|
5716
|
-
for (const
|
|
5717
|
-
return m && !
|
|
5715
|
+
const ee = (W) => {
|
|
5716
|
+
for (const Ie of S || []) Ie.eventProcessor && (W = Ie.eventProcessor(W));
|
|
5717
|
+
return m && !U && (W = m(W)), W;
|
|
5718
5718
|
};
|
|
5719
|
-
ue = (W,
|
|
5719
|
+
ue = (W, Ie) => {
|
|
5720
5720
|
var ne;
|
|
5721
5721
|
const ae = W;
|
|
5722
|
-
if (ae.timestamp = ws(), !((ne = mt[0]) != null && ne.isFrozen()) || ae.type === Y.FullSnapshot || ae.type === Y.IncrementalSnapshot && ae.data.source ===
|
|
5723
|
-
else if (
|
|
5724
|
-
const
|
|
5725
|
-
window.parent.postMessage(
|
|
5722
|
+
if (ae.timestamp = ws(), !((ne = mt[0]) != null && ne.isFrozen()) || ae.type === Y.FullSnapshot || ae.type === Y.IncrementalSnapshot && ae.data.source === G.Mutation || mt.forEach((Te) => Te.unfreeze()), y) t == null || t(ee(ae), Ie);
|
|
5723
|
+
else if (U) {
|
|
5724
|
+
const Te = { type: "rrweb", event: ee(ae), origin: window.location.origin, isCheckout: Ie };
|
|
5725
|
+
window.parent.postMessage(Te, "*");
|
|
5726
5726
|
}
|
|
5727
5727
|
if (ae.type === Y.FullSnapshot) L = ae, _ = 0;
|
|
5728
5728
|
else if (ae.type === Y.IncrementalSnapshot) {
|
|
5729
|
-
if (ae.data.source ===
|
|
5729
|
+
if (ae.data.source === G.Mutation && ae.data.isAttachIframe) return;
|
|
5730
5730
|
_++;
|
|
5731
|
-
const
|
|
5732
|
-
(
|
|
5731
|
+
const Te = s && _ >= s, J = r && ae.timestamp - L.timestamp > r;
|
|
5732
|
+
(Te || J) && ls(!0);
|
|
5733
5733
|
}
|
|
5734
5734
|
};
|
|
5735
5735
|
const q = (W) => {
|
|
5736
|
-
ue({ type: Y.IncrementalSnapshot, data: { source:
|
|
5737
|
-
}, me = (W) => ue({ type: Y.IncrementalSnapshot, data: { source:
|
|
5738
|
-
for (const W of S || []) W.getMirror && W.getMirror({ nodeMirror:
|
|
5739
|
-
const
|
|
5740
|
-
hn = new xf({ recordCanvas: E, mutationCb:
|
|
5741
|
-
const
|
|
5736
|
+
ue({ type: Y.IncrementalSnapshot, data: { source: G.Mutation, ...W } });
|
|
5737
|
+
}, me = (W) => ue({ type: Y.IncrementalSnapshot, data: { source: G.Scroll, ...W } }), _e = (W) => ue({ type: Y.IncrementalSnapshot, data: { source: G.CanvasMutation, ...W } }), we = new Tf({ mutationCb: q, adoptedStyleSheetCb: (W) => ue({ type: Y.IncrementalSnapshot, data: { source: G.AdoptedStyleSheet, ...W } }) }), H = new If({ mirror: Oe, mutationCb: q, stylesheetManager: we, recordCrossOriginIframes: A, wrappedEmit: ue });
|
|
5738
|
+
for (const W of S || []) W.getMirror && W.getMirror({ nodeMirror: Oe, crossOriginIframeMirror: H.crossOriginIframeMirror, crossOriginIframeStyleMirror: H.crossOriginIframeStyleMirror });
|
|
5739
|
+
const Le = new Rf();
|
|
5740
|
+
hn = new xf({ recordCanvas: E, mutationCb: _e, win: window, blockClass: n, blockSelector: i, mirror: Oe, sampling: g.canvas, dataURLOptions: v });
|
|
5741
|
+
const Qe = new Cf({ mutationCb: q, scrollCb: me, bypassOptions: { blockClass: n, blockSelector: i, maskTextClass: l, maskTextSelector: c, inlineStylesheet: u, maskInputOptions: F, dataURLOptions: v, maskTextFn: p, maskInputFn: w, recordCanvas: E, inlineImages: R, sampling: g, slimDOMOptions: j, iframeManager: H, stylesheetManager: we, canvasManager: hn, keepIframeSrcFn: P, processedNodeManager: Le }, mirror: Oe });
|
|
5742
5742
|
ls = (W = !1) => {
|
|
5743
5743
|
if (!O) return;
|
|
5744
|
-
ue({ type: Y.Meta, data: { href: window.location.href, width: zc(), height: Bc() } }, W),
|
|
5745
|
-
const
|
|
5746
|
-
const { mirror:
|
|
5747
|
-
return Et(ne, { doc: ne, mirror:
|
|
5748
|
-
}(document, { mirror:
|
|
5749
|
-
Vc(ne,
|
|
5744
|
+
ue({ type: Y.Meta, data: { href: window.location.href, width: zc(), height: Bc() } }, W), we.reset(), Qe.init(), mt.forEach((ne) => ne.lock());
|
|
5745
|
+
const Ie = function(ne, ae) {
|
|
5746
|
+
const { mirror: Te = new Rl(), blockClass: J = "rr-block", blockSelector: _t = null, maskTextClass: id = "rr-mask", maskTextSelector: od = null, inlineStylesheet: ad = !0, inlineImages: ld = !1, recordCanvas: cd = !1, maskAllInputs: qs = !1, maskTextFn: ud, maskInputFn: dd, slimDOM: Nt = !1, dataURLOptions: pd, preserveWhiteSpace: hd, onSerialize: md, onIframeLoad: fd, iframeLoadTimeout: gd, onStylesheetLoad: yd, stylesheetLoadTimeout: wd, keepIframeSrcFn: bd = () => !1 } = ae || {};
|
|
5747
|
+
return Et(ne, { doc: ne, mirror: Te, blockClass: J, blockSelector: _t, maskTextClass: id, maskTextSelector: od, skipChild: !1, inlineStylesheet: ad, maskInputOptions: qs === !0 ? { color: !0, date: !0, "datetime-local": !0, email: !0, month: !0, number: !0, range: !0, search: !0, tel: !0, text: !0, time: !0, url: !0, week: !0, textarea: !0, select: !0, password: !0 } : qs === !1 ? { password: !0 } : qs, maskTextFn: ud, maskInputFn: dd, slimDOMOptions: Nt === !0 || Nt === "all" ? { script: !0, comment: !0, headFavicon: !0, headWhitespace: !0, headMetaDescKeywords: Nt === "all", headMetaSocial: !0, headMetaRobots: !0, headMetaHttpEquiv: !0, headMetaAuthorship: !0, headMetaVerification: !0 } : Nt === !1 ? {} : Nt, dataURLOptions: pd, inlineImages: ld, recordCanvas: cd, preserveWhiteSpace: hd, onSerialize: md, onIframeLoad: fd, iframeLoadTimeout: gd, onStylesheetLoad: yd, stylesheetLoadTimeout: wd, keepIframeSrcFn: bd, newlyAddedElement: !1 });
|
|
5748
|
+
}(document, { mirror: Oe, blockClass: n, blockSelector: i, maskTextClass: l, maskTextSelector: c, inlineStylesheet: u, maskAllInputs: F, maskTextFn: p, maskInputFn: w, slimDOM: j, dataURLOptions: v, recordCanvas: E, inlineImages: R, onSerialize: (ne) => {
|
|
5749
|
+
Vc(ne, Oe) && H.addIframe(ne), Hc(ne, Oe) && we.trackLinkElement(ne), ai(ne) && Qe.addShadowRoot(V.shadowRoot(ne), document);
|
|
5750
5750
|
}, onIframeLoad: (ne, ae) => {
|
|
5751
|
-
|
|
5751
|
+
H.attachIframe(ne, ae), Qe.observeAttachShadow(ne);
|
|
5752
5752
|
}, onStylesheetLoad: (ne, ae) => {
|
|
5753
|
-
|
|
5754
|
-
}, keepIframeSrcFn:
|
|
5755
|
-
if (!
|
|
5756
|
-
ue({ type: Y.FullSnapshot, data: { node:
|
|
5753
|
+
we.attachLinkElement(ne, ae);
|
|
5754
|
+
}, keepIframeSrcFn: P });
|
|
5755
|
+
if (!Ie) return console.warn("Failed to snapshot the document");
|
|
5756
|
+
ue({ type: Y.FullSnapshot, data: { node: Ie, initialOffset: Fc(window) } }, W), mt.forEach((ne) => ne.unlock()), document.adoptedStyleSheets && document.adoptedStyleSheets.length > 0 && we.adoptStyleSheets(document.adoptedStyleSheets, Oe.getId(document));
|
|
5757
5757
|
};
|
|
5758
5758
|
try {
|
|
5759
|
-
const W = [],
|
|
5760
|
-
var
|
|
5761
|
-
return $(Sf)({ mutationCb: q, mousemoveCb: (J, _t) => ue({ type: Y.IncrementalSnapshot, data: { source: _t, positions: J } }), mouseInteractionCb: (J) => ue({ type: Y.IncrementalSnapshot, data: { source:
|
|
5762
|
-
ue({ type: Y.IncrementalSnapshot, data: { source:
|
|
5759
|
+
const W = [], Ie = (ae) => {
|
|
5760
|
+
var Te;
|
|
5761
|
+
return $(Sf)({ mutationCb: q, mousemoveCb: (J, _t) => ue({ type: Y.IncrementalSnapshot, data: { source: _t, positions: J } }), mouseInteractionCb: (J) => ue({ type: Y.IncrementalSnapshot, data: { source: G.MouseInteraction, ...J } }), scrollCb: me, viewportResizeCb: (J) => ue({ type: Y.IncrementalSnapshot, data: { source: G.ViewportResize, ...J } }), inputCb: (J) => ue({ type: Y.IncrementalSnapshot, data: { source: G.Input, ...J } }), mediaInteractionCb: (J) => ue({ type: Y.IncrementalSnapshot, data: { source: G.MediaInteraction, ...J } }), styleSheetRuleCb: (J) => ue({ type: Y.IncrementalSnapshot, data: { source: G.StyleSheetRule, ...J } }), styleDeclarationCb: (J) => ue({ type: Y.IncrementalSnapshot, data: { source: G.StyleDeclaration, ...J } }), canvasMutationCb: _e, fontCb: (J) => ue({ type: Y.IncrementalSnapshot, data: { source: G.Font, ...J } }), selectionCb: (J) => {
|
|
5762
|
+
ue({ type: Y.IncrementalSnapshot, data: { source: G.Selection, ...J } });
|
|
5763
5763
|
}, customElementCb: (J) => {
|
|
5764
|
-
ue({ type: Y.IncrementalSnapshot, data: { source:
|
|
5765
|
-
}, blockClass: n, ignoreClass: a, ignoreSelector: o, maskTextClass: l, maskTextSelector: c, maskInputOptions: F, inlineStylesheet: u, sampling: g, recordDOM: O, recordCanvas: E, inlineImages:
|
|
5764
|
+
ue({ type: Y.IncrementalSnapshot, data: { source: G.CustomElement, ...J } });
|
|
5765
|
+
}, blockClass: n, ignoreClass: a, ignoreSelector: o, maskTextClass: l, maskTextSelector: c, maskInputOptions: F, inlineStylesheet: u, sampling: g, recordDOM: O, recordCanvas: E, inlineImages: R, userTriggeredOnInput: k, collectFonts: T, doc: ae, maskInputFn: w, maskTextFn: p, keepIframeSrcFn: P, blockSelector: i, slimDOMOptions: j, dataURLOptions: v, mirror: Oe, iframeManager: H, stylesheetManager: we, shadowDomManager: Qe, processedNodeManager: Le, canvasManager: hn, ignoreCSSAttributes: D, plugins: ((Te = S == null ? void 0 : S.filter((J) => J.observer)) == null ? void 0 : Te.map((J) => ({ observer: J.observer, options: J.options, callback: (_t) => ue({ type: Y.Plugin, data: { plugin: J.name, payload: _t } }) }))) || [] }, C);
|
|
5766
5766
|
};
|
|
5767
|
-
|
|
5767
|
+
H.addLoadListener((ae) => {
|
|
5768
5768
|
try {
|
|
5769
|
-
W.push(
|
|
5770
|
-
} catch (
|
|
5771
|
-
console.warn(
|
|
5769
|
+
W.push(Ie(ae.contentDocument));
|
|
5770
|
+
} catch (Te) {
|
|
5771
|
+
console.warn(Te);
|
|
5772
5772
|
}
|
|
5773
5773
|
});
|
|
5774
5774
|
const ne = () => {
|
|
5775
|
-
ls(), W.push(
|
|
5775
|
+
ls(), W.push(Ie(document)), bs = !0;
|
|
5776
5776
|
};
|
|
5777
|
-
return document.readyState === "interactive" || document.readyState === "complete" ? ne() : (W.push(
|
|
5778
|
-
ue({ type: Y.DomContentLoaded, data: {} }),
|
|
5779
|
-
})), W.push(
|
|
5780
|
-
ue({ type: Y.Load, data: {} }),
|
|
5777
|
+
return document.readyState === "interactive" || document.readyState === "complete" ? ne() : (W.push(ve("DOMContentLoaded", () => {
|
|
5778
|
+
ue({ type: Y.DomContentLoaded, data: {} }), M === "DOMContentLoaded" && ne();
|
|
5779
|
+
})), W.push(ve("load", () => {
|
|
5780
|
+
ue({ type: Y.Load, data: {} }), M === "load" && ne();
|
|
5781
5781
|
}, window))), () => {
|
|
5782
|
-
W.forEach((ae) => ae()),
|
|
5782
|
+
W.forEach((ae) => ae()), Le.destroy(), bs = !1, Qt = void 0;
|
|
5783
5783
|
};
|
|
5784
5784
|
} catch (W) {
|
|
5785
5785
|
console.warn(W);
|
|
@@ -5794,23 +5794,23 @@ qt.addCustomEvent = (e, t) => {
|
|
|
5794
5794
|
}, qt.takeFullSnapshot = (e) => {
|
|
5795
5795
|
if (!bs) throw new Error("please take full snapshot after start recording");
|
|
5796
5796
|
ls(e);
|
|
5797
|
-
}, qt.mirror =
|
|
5798
|
-
var
|
|
5797
|
+
}, qt.mirror = Oe, (St = za || (za = {}))[St.NotStarted = 0] = "NotStarted", St[St.Running = 1] = "Running", St[St.Stopped = 2] = "Stopped";
|
|
5798
|
+
var Be = ((e) => (e.Closed = "close.click", e.Complete = "survey.completed", e.FeedbackClosed = "feedback.closed", e.PageChange = "page.change", e.API = "api", e.Override = "override", e))(Be || {}), B = ((e) => (e.ReplayCapture = "replay.capture", e.ReplayPaused = "replay.paused", e.ReplayResumed = "replay.resumed", e.FeedbackButtonLoaded = "feedback.button.loaded", e.SDKReady = "sdk.ready", e.SurveyAppeared = "survey.appeared", e.SurveyCloseRequested = "survey.closeRequested", e.SurveyClosed = "survey.closed", e.SurveyDimensions = "survey.dimensions", e.SurveyFadingOut = "survey.fadingOut", e.SurveyHeight = "survey.height", e.SurveyPresented = "survey.presented", e.SurveyLifeCycle = "survey.lifeCycle", e.SurveyWidth = "survey.width", e.SurveyWillClose = "survey.willClose", e.SurveyWillPresent = "survey.will.present", e.CloseSurveyOnOverlayClick = "close.survey.overlayClick", e.VisitorIDUpdated = "visitor.id.updated", e.QuestionAnswered = "question.answered", e))(B || {});
|
|
5799
5799
|
const hr = { FEEDBACK_BUTTON_LOADED: "feedback.button.loaded", SDK_READY: "sdk.ready", SURVEY_APPEARED: "survey.appeared", SURVEY_CLOSED: "survey.closed", SURVEY_DIMENSIONS: "survey.dimensions", SURVEY_FADING_OUT: "survey.fadingOut", SURVEY_HEIGHT: "survey.height", SURVEY_WIDTH: "survey.width", SURVEY_PRESENTED: "survey.presented", SURVEY_LIFE_CYCLE: "survey.lifeCycle", SURVEY_WILL_CLOSE: "survey.willClose", SURVEY_WILL_PRESENT: "survey.will.present", QUESTION_ANSWERED: "question.answered", REPLAY_CAPTURE: "replay.capture", CLOSE_SURVEY_ON_OVERLAY_CLICK: "close.survey.overlayClick", VISITOR_ID_UPDATED: "visitor.id.updated", DATA: { DISMISS_REASONS: { API: "api", CLOSED: "close.click", COMPLETE: "survey.completed", PAGE_CHANGE: "page.change", OVERRIDE: "override" }, SURVEY_ID: "survey.id" } };
|
|
5800
|
-
let
|
|
5800
|
+
let Gr;
|
|
5801
5801
|
const Lf = new Uint8Array(16);
|
|
5802
5802
|
function Of() {
|
|
5803
|
-
if (!
|
|
5804
|
-
return
|
|
5803
|
+
if (!Gr && (Gr = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !Gr)) throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
5804
|
+
return Gr(Lf);
|
|
5805
5805
|
}
|
|
5806
|
-
const
|
|
5807
|
-
for (let e = 0; e < 256; ++e)
|
|
5806
|
+
const ge = [];
|
|
5807
|
+
for (let e = 0; e < 256; ++e) ge.push((e + 256).toString(16).slice(1));
|
|
5808
5808
|
const ja = { randomUUID: typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto) };
|
|
5809
5809
|
function Ut(e, t, r) {
|
|
5810
5810
|
if (ja.randomUUID && !e) return ja.randomUUID();
|
|
5811
5811
|
const s = (e = e || {}).random || (e.rng || Of)();
|
|
5812
5812
|
return s[6] = 15 & s[6] | 64, s[8] = 63 & s[8] | 128, function(n, i = 0) {
|
|
5813
|
-
return
|
|
5813
|
+
return ge[n[i + 0]] + ge[n[i + 1]] + ge[n[i + 2]] + ge[n[i + 3]] + "-" + ge[n[i + 4]] + ge[n[i + 5]] + "-" + ge[n[i + 6]] + ge[n[i + 7]] + "-" + ge[n[i + 8]] + ge[n[i + 9]] + "-" + ge[n[i + 10]] + ge[n[i + 11]] + ge[n[i + 12]] + ge[n[i + 13]] + ge[n[i + 14]] + ge[n[i + 15]];
|
|
5814
5814
|
}(s);
|
|
5815
5815
|
}
|
|
5816
5816
|
const Jg = 360, Kg = "ul-app", Zg = "#e6e6e6", Xg = "#bd282a", Qg = 1030, N = new class {
|
|
@@ -6000,7 +6000,7 @@ class nu {
|
|
|
6000
6000
|
const ey = (e, t) => {
|
|
6001
6001
|
const r = [e[t]], s = e[t].groupId;
|
|
6002
6002
|
return s ? e.slice(t).reduce((n, i) => (i.groupId === s && n.push(i), n), []) : r;
|
|
6003
|
-
}, ty = (e) => e === "longFormSurvey", Q = new nu("sessionStorage"),
|
|
6003
|
+
}, ty = (e) => e === "longFormSurvey", Q = new nu("sessionStorage"), ut = new nu("localStorage");
|
|
6004
6004
|
class Uf {
|
|
6005
6005
|
constructor(t) {
|
|
6006
6006
|
de(this, "payload");
|
|
@@ -6017,34 +6017,34 @@ class Uf {
|
|
|
6017
6017
|
this.resolve(t);
|
|
6018
6018
|
}
|
|
6019
6019
|
}
|
|
6020
|
-
const
|
|
6020
|
+
const re = { replay: null }, Df = () => {
|
|
6021
6021
|
const e = [];
|
|
6022
|
-
return
|
|
6022
|
+
return re.replay && e.push("replay"), e.join(",");
|
|
6023
6023
|
}, Pf = 10;
|
|
6024
6024
|
let iu = !1, ou = "", $r = !1, au = !1, cs = [];
|
|
6025
|
-
const _f = (e) => e._config && e._config.installationMethod ? e._config.installationMethod : e._gtm ? "web-gtm" : e._segment ? "web-segment" : "web-snippet",
|
|
6025
|
+
const _f = (e) => e._config && e._config.installationMethod ? e._config.installationMethod : e._gtm ? "web-gtm" : e._segment ? "web-segment" : "web-snippet", Ha = (e) => {
|
|
6026
6026
|
var t;
|
|
6027
6027
|
(t = e == null ? void 0 : e.blockedURI) != null && t.includes(window.UserLeap._API_URL) && (au = !0, console.warn(`[Sprig] ${e.blockedURI} is blocked by Content-Security-Policy`));
|
|
6028
6028
|
}, ci = (e = "") => {
|
|
6029
6029
|
iu = !0, ou = e;
|
|
6030
6030
|
};
|
|
6031
|
-
function
|
|
6032
|
-
const t = { "Content-Type": "application/json", "userleap-platform": "web", "x-ul-sdk-version": "2.
|
|
6031
|
+
function Ue(e = {}) {
|
|
6032
|
+
const t = { "Content-Type": "application/json", "userleap-platform": "web", "x-ul-sdk-version": "2.44.0", "x-ul-installation-method": _f(e), "sprig-modules": Df(), "x-ul-package-version": "2.44.0" };
|
|
6033
6033
|
if (e.envId && (t["x-ul-environment-id"] = e.envId), e.token && (t.Authorization = "Bearer " + e.token), e.userId && (t["x-ul-user-id"] = e.userId), e.visitorId && (t["x-ul-visitor-id"] = e.visitorId), e.partnerAnonymousId && (t["x-ul-anonymous-id"] = e.partnerAnonymousId), e.mobileHeadersJSON) {
|
|
6034
6034
|
const r = JSON.parse(e.mobileHeadersJSON);
|
|
6035
6035
|
Object.assign(t, r);
|
|
6036
6036
|
}
|
|
6037
6037
|
return e.locale && (t["accept-language"] = e.locale), window.previewMode && (t["x-ul-preview-mode"] = "1"), t;
|
|
6038
6038
|
}
|
|
6039
|
-
const
|
|
6039
|
+
const Ga = async ({ shouldDropOnRateLimit: e, ...t }) => {
|
|
6040
6040
|
if (e) return { status: 429 };
|
|
6041
6041
|
{
|
|
6042
6042
|
const r = new Uf(t);
|
|
6043
6043
|
return cs.push(r), r.promise;
|
|
6044
6044
|
}
|
|
6045
|
-
},
|
|
6045
|
+
}, Xe = async (e, t) => {
|
|
6046
6046
|
const { retries: r = 0, shouldDropOnRateLimit: s = !1, shouldRetryRequest: n = !1, ...i } = t, a = { url: e, options: i, retries: r, shouldDropOnRateLimit: s };
|
|
6047
|
-
if ($r && !n) return
|
|
6047
|
+
if ($r && !n) return Ga(a);
|
|
6048
6048
|
const o = { ok: !1, reportError: !1 };
|
|
6049
6049
|
if (iu) return console.info(`UserLeap - ${ou}`), o;
|
|
6050
6050
|
try {
|
|
@@ -6053,13 +6053,13 @@ const Ha = async ({ shouldDropOnRateLimit: e, ...t }) => {
|
|
|
6053
6053
|
if (!$r && !s || n) {
|
|
6054
6054
|
$r = !0;
|
|
6055
6055
|
const c = l.headers.has("ratelimit-reset") ? Number(l.headers.get("ratelimit-reset")) : Pf;
|
|
6056
|
-
return await vs(1e3 * c),
|
|
6056
|
+
return await vs(1e3 * c), Xe(e, { ...i, shouldDropOnRateLimit: s, shouldRetryRequest: !0 });
|
|
6057
6057
|
}
|
|
6058
|
-
return
|
|
6058
|
+
return Ga(a);
|
|
6059
6059
|
}
|
|
6060
6060
|
if ($r = !1, cs.length && (cs.map((c) => {
|
|
6061
6061
|
const u = c.payload;
|
|
6062
|
-
|
|
6062
|
+
Xe(u.url, { ...u.options, retries: u.retries, shouldDropOnRateLimit: u.shouldDropOnRateLimit }).then((d) => {
|
|
6063
6063
|
c.resolveRequest(d);
|
|
6064
6064
|
});
|
|
6065
6065
|
}), cs = []), l.ok) {
|
|
@@ -6074,100 +6074,100 @@ const Ha = async ({ shouldDropOnRateLimit: e, ...t }) => {
|
|
|
6074
6074
|
return l;
|
|
6075
6075
|
} catch (l) {
|
|
6076
6076
|
const c = r + 1;
|
|
6077
|
-
return c > 5 || au ? { ok: !1, reportError: !1, error: l } : (await vs(1e3 * Math.pow(2, r)),
|
|
6077
|
+
return c > 5 || au ? { ok: !1, reportError: !1, error: l } : (await vs(1e3 * Math.pow(2, r)), Xe(e, { ...i, retries: c }));
|
|
6078
6078
|
}
|
|
6079
|
-
}, $a = "ul-view-sdk-script", Nf = /* @__PURE__ */ new Set(["ios", "android"]),
|
|
6080
|
-
async function
|
|
6079
|
+
}, $a = "ul-view-sdk-script", Nf = /* @__PURE__ */ new Set(["ios", "android"]), it = "visitors", ot = "environments";
|
|
6080
|
+
async function ze(e, t) {
|
|
6081
6081
|
var i, a, o;
|
|
6082
6082
|
const { shouldDropOnRateLimit: r, ...s } = t;
|
|
6083
|
-
s.headers = Object.assign(
|
|
6084
|
-
const n = await
|
|
6083
|
+
s.headers = Object.assign(Ue(window.UserLeap), s.headers);
|
|
6084
|
+
const n = await Xe(e, { ...s, shouldDropOnRateLimit: r });
|
|
6085
6085
|
if (n.ok) {
|
|
6086
6086
|
const l = (i = n.headers) == null ? void 0 : i.get("Authorization"), c = l ? l.split(" ") : void 0, u = c && c.length === 2 ? c[1] : void 0, d = (a = n.headers) == null ? void 0 : a.get("x-ul-visitor-id");
|
|
6087
6087
|
if (window.UserLeap.userId && d === window.UserLeap.visitorId) {
|
|
6088
|
-
const h =
|
|
6089
|
-
h && h[window.UserLeap.envId] === d && (delete h[window.UserLeap.envId],
|
|
6088
|
+
const h = ut.getItemObject("sprig.anon.env.vid.map");
|
|
6089
|
+
h && h[window.UserLeap.envId] === d && (delete h[window.UserLeap.envId], ut.setItemObject("sprig.anon.env.vid.map", h));
|
|
6090
6090
|
}
|
|
6091
|
-
u && d && (d !== window.UserLeap.visitorId || window.UserLeap.token !== u) && (
|
|
6091
|
+
u && d && (d !== window.UserLeap.visitorId || window.UserLeap.token !== u) && (ke("token", u), ke("vid", d), z.emit(B.VisitorIDUpdated, { visitorId: d }), window.UserLeap.token = u, window.UserLeap.visitorId = d);
|
|
6092
6092
|
}
|
|
6093
6093
|
return (o = n.json) != null && o.logMessage && console.warn(`[Sprig] ${n.json.logMessage}`), n;
|
|
6094
6094
|
}
|
|
6095
|
-
function
|
|
6096
|
-
const r =
|
|
6095
|
+
function ke(e, t) {
|
|
6096
|
+
const r = ut.getItemObject("userleap.ids");
|
|
6097
6097
|
let s = r[window.UserLeap.envId];
|
|
6098
|
-
s ? s[e] = t : s = { [e]: t }, r[window.UserLeap.envId] = s,
|
|
6098
|
+
s ? s[e] = t : s = { [e]: t }, r[window.UserLeap.envId] = s, ut.setItemObject("userleap.ids", r);
|
|
6099
6099
|
}
|
|
6100
6100
|
function eo() {
|
|
6101
6101
|
return window.previewMode ? "0" : window.UserLeap.visitorId ?? "";
|
|
6102
6102
|
}
|
|
6103
|
-
function
|
|
6103
|
+
function Ae(e, t, r) {
|
|
6104
6104
|
const s = [window.UserLeap._API_URL, "sdk", e];
|
|
6105
6105
|
return t && t.forEach((n) => {
|
|
6106
|
-
s.push(n), n ===
|
|
6106
|
+
s.push(n), n === ot ? s.push(window.UserLeap.envId) : n === it && s.push(eo());
|
|
6107
6107
|
}), r && s.push(r), s.join("/");
|
|
6108
6108
|
}
|
|
6109
6109
|
const tr = async (e, t, r) => {
|
|
6110
|
-
var
|
|
6111
|
-
const { context: s, delay: n, avatars: i,
|
|
6112
|
-
if (
|
|
6110
|
+
var q, me, _e, we;
|
|
6111
|
+
const { context: s, delay: n, avatars: i, experimentFlags: a, forceBrandedLogo: o, endCard: l, isFeedback: c = !1, heatmap: u, locale: d, layout: h, previewMode: f, productConfig: w, questions: p, responseGroupUid: C, surveyId: m, uuid: g, vid: v, sessionReplay: I, studyType: O, surveyVisitorAttributes: E } = e, A = Ue(window.UserLeap), M = mr(A), k = Ys(A);
|
|
6112
|
+
if (I) if (M) z.emit(B.ReplayCapture, { responseGroupUid: C, hasQuestions: !!(p != null && p.length), surveyId: m, uploadId: I.uploadId, replayType: I.replayDurationType ?? "before", seconds: I.replayDurationSeconds, generateVideoUploadUrlPayload: { mediaRecordingUid: Ut(), mediaType: "screen", questionId: 1, responseGroupUid: C, surveyId: m, updatedAt: (/* @__PURE__ */ new Date()).toISOString(), visitorId: window.UserLeap.visitorId, isReplay: !0 } });
|
|
6113
6113
|
else {
|
|
6114
|
-
if (!
|
|
6115
|
-
|
|
6116
|
-
}
|
|
6117
|
-
if (
|
|
6118
|
-
if (!
|
|
6119
|
-
const { eventId:
|
|
6120
|
-
await
|
|
6121
|
-
var
|
|
6122
|
-
return (
|
|
6114
|
+
if (!re.replay) return window.UserLeap.reportError("displayQuestions", new Error("Replay module not registered")), { success: !1, message: "Replay module not registered", surveyState: "no survey" };
|
|
6115
|
+
re.replay.scheduleOrCaptureReplay({ responseGroupId: C, surveyId: m, visitorId: v, replayParams: I, completeUploadHeaders: A, apiUrl: window.UserLeap._API_URL, triggerTimestamp: Date.now(), isStandalone: p.length === 0 });
|
|
6116
|
+
}
|
|
6117
|
+
if (u) {
|
|
6118
|
+
if (!re.replay) return window.UserLeap.reportError("displayQuestions", new Error("Replay module not registered")), { success: !1, message: "Replay module not registered", surveyState: "no survey" };
|
|
6119
|
+
const { eventId: H, replayParams: Le, responseGroupUid: Qe, surveyId: W } = u;
|
|
6120
|
+
await re.replay.initializeReplay({ maxReplayDurationSeconds: 300, maxInflightRequests: window.UserLeap.maxInflightReplayRequests, teardownAfter: !0, apiUrl: window.UserLeap._API_URL, replaySettings: r }), re.replay.tryReplayAction(() => {
|
|
6121
|
+
var Ie;
|
|
6122
|
+
return (Ie = re.replay) == null ? void 0 : Ie.scheduleCapture({ apiUrl: window.UserLeap._API_URL, completeUploadHeaders: A, eventId: H, isHeatmap: !0, replayParams: Le, responseGroupId: Qe, surveyId: W, triggerTimestamp: Date.now(), visitorId: v });
|
|
6123
6123
|
}, "Error in scheduling/capturing replay");
|
|
6124
6124
|
}
|
|
6125
|
-
if (
|
|
6126
|
-
if (Ff(
|
|
6125
|
+
if (v == null || !(p != null && p.length)) return N.info("CannotDisplaySurvey", { vid: v }), { success: !1, message: "[Sprig] no survey found", surveyState: window.UserLeap.container ? "previous survey ready" : "no survey" };
|
|
6126
|
+
if (Ff(p)) return { success: !1, message: "[Sprig] bundled version does not support video voice", surveyState: "no survey" };
|
|
6127
6127
|
if (window.UserLeap.container) {
|
|
6128
6128
|
N.info("AlreadyDisplayingSurvey");
|
|
6129
|
-
const
|
|
6130
|
-
return console.warn(
|
|
6131
|
-
}
|
|
6132
|
-
if (
|
|
6133
|
-
const
|
|
6134
|
-
return window.UserLeap.reportError("DisplaySurvey", new Error(
|
|
6135
|
-
}
|
|
6136
|
-
N.info("ShowingSurvey", { surveyId:
|
|
6137
|
-
let
|
|
6138
|
-
const
|
|
6139
|
-
const { "view.version":
|
|
6140
|
-
|
|
6129
|
+
const H = "[Sprig] (ERR-409) Found an existing Survey container, aborting rendering of this survey";
|
|
6130
|
+
return console.warn(H), { success: !1, message: H, surveyState: "previous survey ready" };
|
|
6131
|
+
}
|
|
6132
|
+
if (v !== window.UserLeap.visitorId && g !== window.UserLeap.visitorId && !window.previewMode) {
|
|
6133
|
+
const H = "Attempted to display survey to a different visitor";
|
|
6134
|
+
return window.UserLeap.reportError("DisplaySurvey", new Error(H)), { success: !1, message: H, surveyState: "no survey" };
|
|
6135
|
+
}
|
|
6136
|
+
N.info("ShowingSurvey", { surveyId: m }), (q = re.replay) == null || q.RecordSurveyShown({ id: m, userAgent: window.navigator.userAgent }), Af.disable(), z.emit(B.SurveyWillPresent, { name: B.SurveyWillPresent, "survey.id": m, layout: h });
|
|
6137
|
+
let T, R, S, P, D = document.createElement("div");
|
|
6138
|
+
const b = (H) => {
|
|
6139
|
+
const { "view.version": Le } = H;
|
|
6140
|
+
Le !== A["x-ul-sdk-version"] && cu(), z.removeListener("verify.view.version", b);
|
|
6141
6141
|
};
|
|
6142
|
-
z.on("verify.view.version",
|
|
6143
|
-
const
|
|
6144
|
-
return
|
|
6145
|
-
})() && (lu(
|
|
6146
|
-
const
|
|
6147
|
-
z.once(B.CloseSurveyOnOverlayClick,
|
|
6148
|
-
}, context: s, endCard:
|
|
6149
|
-
(
|
|
6150
|
-
const
|
|
6151
|
-
|
|
6152
|
-
const
|
|
6153
|
-
|
|
6154
|
-
const
|
|
6155
|
-
const
|
|
6156
|
-
return window.UserLeap.isMobileSDK ||
|
|
6157
|
-
}(),
|
|
6142
|
+
z.on("verify.view.version", b), window.UserLeap.useMobileStyling = k, su(A) ? (T = "ul-direct-embeded-frame", R = document.head, S = window, P = !1, (() => {
|
|
6143
|
+
const H = Ue(window.UserLeap), Le = mr(H), Qe = window.UserLeap.forceDirectEmbed, W = H["userleap-platform"] === "web";
|
|
6144
|
+
return Le || Qe && W;
|
|
6145
|
+
})() && (lu(m, c), D.id = T, window.UserLeap.container.appendChild(D), uu(), z.emit(B.SurveyLifeCycle, { state: "presented" }), z.emit(B.SurveyPresented, { name: B.SurveyPresented, "survey.id": m }))) : { frameId: T, contentWinDocHead: R, contentWindow: S, hasOverlay: P, iframe: D } = jf({ productConfig: w, useMobileStyling: k, surveyId: m, isFeedback: c, enableCspTrustedTypes: (me = window.UserLeap._config) == null ? void 0 : me.enableCspTrustedTypes }), window.UserLeap.frameId = T;
|
|
6146
|
+
const y = { apiURL: window.UserLeap._API_URL, avatars: i, cards: p, configureExitOnOverlayClick: (H) => {
|
|
6147
|
+
z.once(B.CloseSurveyOnOverlayClick, H);
|
|
6148
|
+
}, context: s, endCard: l, envId: window.UserLeap.envId, eventEmitFn: z.emit.bind(z), experimentFlags: a, fontFamily: window.UserLeap.fontFamily, fontFamilyURL: window.UserLeap.fontFamilyURL, forceBrandedLogo: o, frame: D, headers: A, layout: h, locale: d, mobileSDKVersion: window.UserLeap.mobileSDKVersion, previewKey: Q.getItem("sprig.previewKey"), previewMode: f || !!window.previewMode, productConfig: { framePosition: w == null ? void 0 : w.framePosition, desktopDisplay: w == null ? void 0 : w.desktopDisplay, placement: w == null ? void 0 : w.placement }, responseGroupUid: C, startingQuestionIdx: (_e = window.UserLeap.config) == null ? void 0 : _e.startingQuestionIdx, studyType: O, styleNonce: window.UserLeap.styleNonce, surveyId: m, tabTitle: document.title, trackPageViewUrl: t, ulEvents: hr, upchunkLibraryURL: window.UserLeap.upchunkLibraryURL, useMobileStyling: k, userId: g, viewDocument: S == null ? void 0 : S.document, viewWindow: S, visitorAttributes: { externalUserId: window.UserLeap.userId, email: window.UserLeap.email }, surveyVisitorAttributes: E || {}, ...window.UserLeap._config };
|
|
6149
|
+
(we = window.UserLeap._config) != null && we.startingQuestionIdx && (window.UserLeap._config = { ...window.UserLeap._config, startingQuestionIdx: null });
|
|
6150
|
+
const U = (c ? window.UserLeap.feedbackCustomStyles : window.UserLeap.customStyles) ?? w.customStyles;
|
|
6151
|
+
y.customStyles = U, S && (S.__cfg = y);
|
|
6152
|
+
const F = window.UserLeap.viewSDKURL ? window.UserLeap.viewSDKURL : y.path, j = document.getElementById($a);
|
|
6153
|
+
j && j.remove();
|
|
6154
|
+
const L = function() {
|
|
6155
|
+
const H = document.createElement("script");
|
|
6156
|
+
return window.UserLeap.isMobileSDK || H.setAttribute("type", "module"), window.UserLeap.nonce && H.setAttribute("nonce", window.UserLeap.nonce), H.id = $a, H;
|
|
6157
|
+
}(), _ = () => {
|
|
6158
6158
|
window.UserLeap.container && Object.assign(window.UserLeap.container.style, { display: "flex" });
|
|
6159
6159
|
};
|
|
6160
|
-
if (
|
|
6161
|
-
const { default:
|
|
6162
|
-
|
|
6163
|
-
} else
|
|
6164
|
-
window.UserLeap.container &&
|
|
6165
|
-
}),
|
|
6166
|
-
|
|
6160
|
+
if (y.installationMethod === "web-npm" || y.installationMethod === "web-npm-bundled") {
|
|
6161
|
+
const { default: H } = await import("./view-DcerBHpf.js").then((Le) => Le.B);
|
|
6162
|
+
H.configure(y), P && window.UserLeap.container && _();
|
|
6163
|
+
} else F && (L.src = `${F}${window.UserLeap.isMobileSDK ? "" : `?t=${Date.now()}`}`, P && L.addEventListener("load", () => {
|
|
6164
|
+
window.UserLeap.container && _();
|
|
6165
|
+
}), S == null || S.addEventListener("error", (H) => {
|
|
6166
|
+
H.target instanceof HTMLScriptElement && H.target.src === F && window.UserLeap.reportError("loadFrameScript", new Error("Frame script failed to load"));
|
|
6167
6167
|
}, { capture: !0, once: !0 }));
|
|
6168
|
-
|
|
6169
|
-
const
|
|
6170
|
-
return window.UserLeap.isMobileSDK && n && (
|
|
6168
|
+
R == null || R.appendChild(L);
|
|
6169
|
+
const ee = { success: !0, surveyState: "ready", surveyId: m, responseGroupUid: C };
|
|
6170
|
+
return window.UserLeap.isMobileSDK && n && (ee.delay = n), ee;
|
|
6171
6171
|
};
|
|
6172
6172
|
function Ys(e) {
|
|
6173
6173
|
var r;
|
|
@@ -6205,7 +6205,7 @@ const mn = "0px", lu = (e, t, r) => {
|
|
|
6205
6205
|
Vf();
|
|
6206
6206
|
const r = globalThis.UserLeap.container;
|
|
6207
6207
|
if (r) try {
|
|
6208
|
-
(s = r.parentNode) == null || s.removeChild(r), globalThis.UserLeap.container = null,
|
|
6208
|
+
(s = r.parentNode) == null || s.removeChild(r), globalThis.UserLeap.container = null, ke("trackStartUrl", null), z.emit(B.SurveyLifeCycle, { state: "dismissed" }), z.emit(B.SurveyClosed, { name: B.SurveyClosed, initiator: e, "survey.id": parseInt(r.dataset.studyId), ...t && { studyType: t } });
|
|
6209
6209
|
} catch (n) {
|
|
6210
6210
|
console.warn(`[Sprig] (ERR-412) Error removing UserLeap container by ${e} ` + r), n instanceof Error && globalThis.UserLeap.reportError("dismissActiveSurvey", n);
|
|
6211
6211
|
}
|
|
@@ -6241,11 +6241,11 @@ const mn = "0px", lu = (e, t, r) => {
|
|
|
6241
6241
|
}
|
|
6242
6242
|
}
|
|
6243
6243
|
return c && ((h, f) => {
|
|
6244
|
-
const
|
|
6245
|
-
|
|
6244
|
+
const w = { position: "fixed", overflow: "auto", top: "0px", left: "0px", display: "none", height: "100%", width: "100%", transition: "background-color 0.3s ease-out", zIndex: 2147483646 }, p = f ? h.overlayStyleMobile : h.overlayStyle;
|
|
6245
|
+
w["background-color"] = p === "light" ? "rgba(255,255,255, 0.95)" : "rgba(0,0,0,0.9)", f || (w.margin = "auto"), globalThis.UserLeap.container && Object.assign(globalThis.UserLeap.container.style, w);
|
|
6246
6246
|
})(i, r), Object.assign(e.style, n, l), c;
|
|
6247
6247
|
}, jf = ({ productConfig: e, useMobileStyling: t, surveyId: r, isFeedback: s, enableCspTrustedTypes: n }) => {
|
|
6248
|
-
var f,
|
|
6248
|
+
var f, w;
|
|
6249
6249
|
const i = ro, a = s && e.desktopDisplay === "slider";
|
|
6250
6250
|
lu(r, s, a), Wf();
|
|
6251
6251
|
const o = document.createElement("iframe");
|
|
@@ -6262,7 +6262,7 @@ const mn = "0px", lu = (e, t, r) => {
|
|
|
6262
6262
|
}, (f = globalThis.UserLeap.container) == null || f.appendChild(o), e && (t ? e.exitOnOverlayClickMobile : e.exitOnOverlayClick) && globalThis.UserLeap.container && (globalThis.UserLeap.container.onclick = () => {
|
|
6263
6263
|
z.emit(B.CloseSurveyOnOverlayClick);
|
|
6264
6264
|
}), z.emit(B.SurveyLifeCycle, { state: "presented" }), z.emit(B.SurveyPresented, { name: B.SurveyPresented, "survey.id": r });
|
|
6265
|
-
const d = (
|
|
6265
|
+
const d = (w = o.contentWindow) == null ? void 0 : w.document;
|
|
6266
6266
|
if (d && (d.open("text/html", "replace"), d.write(to("<!doctype html><head></head><body></body></html>", n, o.contentWindow)), d.close(), !t)) {
|
|
6267
6267
|
const p = d.body;
|
|
6268
6268
|
p.style.display = "flex", p.style.alignItems = "center";
|
|
@@ -6294,26 +6294,26 @@ function so(e, t) {
|
|
|
6294
6294
|
const pu = (e) => {
|
|
6295
6295
|
const { pageUrlEvents: t } = window.UserLeap._config, r = t == null ? void 0 : t.find((s) => s.id === e);
|
|
6296
6296
|
return !!r && so(r, window.location.href);
|
|
6297
|
-
},
|
|
6297
|
+
}, st = (e) => !!e && e.nodeType === Node.ELEMENT_NODE, Ja = (e) => e instanceof HTMLElement || e instanceof SVGElement, Ss = ({ document: e, elementId: t, styleString: r, nonce: s }) => {
|
|
6298
6298
|
const n = e.getElementById(t);
|
|
6299
6299
|
if (n) return void (n.textContent = r);
|
|
6300
6300
|
const i = e.createElement("style");
|
|
6301
6301
|
s && (i.nonce = s), i.textContent = r, i.id = t, e.head.appendChild(i);
|
|
6302
6302
|
}, Ka = (e, t) => {
|
|
6303
6303
|
const r = t.querySelector(e);
|
|
6304
|
-
if (!
|
|
6304
|
+
if (!st(r)) return 0;
|
|
6305
6305
|
const s = getComputedStyle(r);
|
|
6306
6306
|
return parseFloat(s.paddingLeft) + parseFloat(s.paddingRight) + (parseFloat(s.marginLeft) + parseFloat(s.marginRight)) + (parseFloat(s.borderLeftWidth) + parseFloat(s.borderRightWidth));
|
|
6307
|
-
},
|
|
6307
|
+
}, Hf = (e, t, r) => {
|
|
6308
6308
|
const s = e.querySelector(".ul-card__container"), n = e.querySelector(".ul-app");
|
|
6309
6309
|
let i = 600, a = 360;
|
|
6310
|
-
if (
|
|
6310
|
+
if (st(s) && st(n)) {
|
|
6311
6311
|
const o = s.querySelector(".ul-card--matrix_grid"), l = !o && t && r;
|
|
6312
6312
|
try {
|
|
6313
6313
|
l && (n.style.width = "360px"), i = s.scrollHeight, i += ((d) => {
|
|
6314
|
-
const h = d.querySelector(".sprig-question-body"), f = d.querySelector(".ul-card"),
|
|
6314
|
+
const h = d.querySelector(".sprig-question-body"), f = d.querySelector(".ul-card"), w = d.querySelector(".ul-card-main-content"), p = d.querySelector(".ul-footer"), C = d.querySelector(".sprig-container");
|
|
6315
6315
|
let m = 0;
|
|
6316
|
-
return
|
|
6316
|
+
return st(f) && (m += f.scrollHeight - f.clientHeight), st(w) && (m += w.scrollHeight - w.clientHeight), st(h) && (m += h.scrollHeight - h.clientHeight), st(p) && st(C) && C.clientHeight === 0 && (m += p.clientHeight), m;
|
|
6317
6317
|
})(e);
|
|
6318
6318
|
const c = getComputedStyle(s), u = parseFloat(c.marginTop) + parseFloat(c.marginBottom);
|
|
6319
6319
|
i += u + (parseFloat(c.borderTopWidth) + parseFloat(c.borderBottomWidth)), o && (a = o.scrollWidth, a += Ka(".ul-card__container", e), a += Ka(".sprig-question-body", e));
|
|
@@ -6326,8 +6326,8 @@ const pu = (e) => {
|
|
|
6326
6326
|
const t = e.querySelector(".ul-card__container");
|
|
6327
6327
|
t && (t.scrollTop = 0);
|
|
6328
6328
|
}, hu = () => X, Rt = () => document.getElementById("sprig-feedback-container"), ui = () => document.getElementById("sprig-feedback-loading-animation"), mu = () => !!document.getElementById(ro);
|
|
6329
|
-
let Za = !1, X = null,
|
|
6330
|
-
const
|
|
6329
|
+
let Za = !1, X = null, je = null, no = !1, rr = null, pt = null;
|
|
6330
|
+
const Gf = ["bottom-left", "bottom-right", "center-left", "center-right"], Is = () => {
|
|
6331
6331
|
var t;
|
|
6332
6332
|
const e = window.UserLeap.container;
|
|
6333
6333
|
return ((t = e == null ? void 0 : e.parentElement) == null ? void 0 : t.id) === "sprig-feedback-loading-container";
|
|
@@ -6346,9 +6346,9 @@ const Hf = ["bottom-left", "bottom-right", "center-left", "center-right"], Is =
|
|
|
6346
6346
|
}
|
|
6347
6347
|
return !1;
|
|
6348
6348
|
}, Jt = () => {
|
|
6349
|
-
if (!X || !
|
|
6349
|
+
if (!X || !je) return;
|
|
6350
6350
|
const e = ui();
|
|
6351
|
-
e && e.remove(), X.style.height = "auto", X.style.width = "auto",
|
|
6351
|
+
e && e.remove(), X.style.height = "auto", X.style.width = "auto", je.disabled = !1, no = !1;
|
|
6352
6352
|
}, di = () => {
|
|
6353
6353
|
if (X && !ui()) {
|
|
6354
6354
|
const e = (() => {
|
|
@@ -6367,7 +6367,7 @@ const Hf = ["bottom-left", "bottom-right", "center-left", "center-right"], Is =
|
|
|
6367
6367
|
e && (X.style.height = "300px", X.style.width = "360px", X.appendChild(e));
|
|
6368
6368
|
}
|
|
6369
6369
|
}, Xa = () => {
|
|
6370
|
-
X &&
|
|
6370
|
+
X && je && (Cs(0), je.disabled = !0, no = !0);
|
|
6371
6371
|
}, yu = async (e, t, r) => {
|
|
6372
6372
|
const { buttonTheme: s, customStyles: n, eventId: i, placement: a, desktopDisplay: o, feedbackLabel: l, surveyUuid: c, surveyId: u } = e;
|
|
6373
6373
|
window.UserLeap.feedbackCustomStyles = void 0;
|
|
@@ -6379,37 +6379,37 @@ const Hf = ["bottom-left", "bottom-right", "center-left", "center-right"], Is =
|
|
|
6379
6379
|
rr = i, Ss({ document, elementId: "sprig-feedback-style", styleString: '.ul-loading-spinner-container{font-size:1.8rem;flex-grow:1;width:100%;height:100%;display:flex;align-items:center;justify-content:center}.ul-loading-spinner{display:inline-block;position:relative;width:6rem;height:6rem}.ul-loading-spinner div{box-sizing:border-box;display:block;position:absolute;width:80%;height:80%;margin:5px;border:5px solid #152e3e;border-radius:50%;animation:lds-ring 1.2s cubic-bezier(.5,0,.5,1) infinite;border-color:#152e3e transparent transparent transparent}.ul-loading-spinner .first{animation-delay:-.45s}.ul-loading-spinner .second{animation-delay:-.3s}.ul-loading-spinner .third{animation-delay:-.15s}@keyframes lds-ring{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.fade-in-transition{animation:fadeIn .4s ease-in}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}#sprig-feedback-button{border-left:0;border-radius:0 8px 8px 0;display:grid;padding:8px;text-align:center;transition:all ease-in-out 1s;z-index:inherit}#sprig-feedback-button:hover{cursor:pointer}.sprig-feedback-button-label{writing-mode:vertical-lr;text-orientation:sideways}.sprig-feedback-button-right{transform:rotate(180deg)}.sprig-feedback-button-bottom{align-self:flex-end;margin-bottom:20px}.sprig-feedback-button-light{background:#efefee;color:#000;border:1px solid #e2e3e1}.sprig-feedback-button-dark{background:#000;color:#fff;border:1px solid #000000}#sprig-feedback-container{display:flex;align-items:center;position:fixed;transition:right .2s linear,left .2s linear;z-index:2147483646}.sprig-feedback-container-left{flex-flow:row-reverse}.sprig-feedback-container-center{top:50%;transform:translateY(-50%)}.sprig-feedback-container-bottom{bottom:0%;margin-bottom:15px}.sprig-feedback-loading-container{align-items:center;background-color:#fff;border:2px solid var(--feedback-border);display:flex;max-height:90vh;max-width:90vw;min-width:0px}.sprig-feedback-loading-container-left{border-left:none;border-radius:0 8px 8px 0}.sprig-feedback-loading-container-right{border-right:none;border-radius:8px 0 0 8px}#sprig-feedback-error-container{margin:auto;text-align:center;width:360px}.sprig-feedback-error-text{font-weight:400;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol}#sprig-feedback-loading-container .ul-container{position:relative;max-height:inherit}#sprig-feedback-loading-animation{position:absolute}.sprig-feedback-loading-container-previews iframe{max-height:inherit!important}', nonce: window.UserLeap.styleNonce }), Ss({ document, elementId: "ul-custom-style", styleString: n ?? "", nonce: window.UserLeap.styleNonce }), Za = o === "center-modal", pt = a;
|
|
6380
6380
|
const [h, f] = a.split("-");
|
|
6381
6381
|
((m) => {
|
|
6382
|
-
if (Rt() || !
|
|
6383
|
-
const [g, v] = m.split("-"),
|
|
6384
|
-
|
|
6385
|
-
})(a), d = Rt(),
|
|
6386
|
-
const
|
|
6387
|
-
|
|
6382
|
+
if (Rt() || !Gf.includes(m)) return;
|
|
6383
|
+
const [g, v] = m.split("-"), I = document.createElement("div");
|
|
6384
|
+
I.id = "sprig-feedback-container", I.classList.add(`sprig-feedback-container-${v}`, `sprig-feedback-container-${g}`), document.body.appendChild(I);
|
|
6385
|
+
})(a), d = Rt(), je = document.createElement("button");
|
|
6386
|
+
const w = document.createElement("div");
|
|
6387
|
+
w.className = "sprig-feedback-button-label", w.innerText = l, je.appendChild(w), je.id = "sprig-feedback-button", je.classList.add(`sprig-feedback-button-${f}`, `sprig-feedback-button-${h}`, `sprig-feedback-button-${s}`, "fade-in-transition"), z.on(hr.SURVEY_FADING_OUT, fn), je.addEventListener("click", async () => {
|
|
6388
6388
|
const m = document.getElementById("sprig-feedback-error-container");
|
|
6389
6389
|
if (mu() || fu()) {
|
|
6390
6390
|
if (fn()) {
|
|
6391
|
-
z.emit(B.SurveyCloseRequested, { name: B.SurveyCloseRequested, initiator:
|
|
6391
|
+
z.emit(B.SurveyCloseRequested, { name: B.SurveyCloseRequested, initiator: Be.FeedbackClosed, studyType: "feedbackButton", "survey.id": u }), z.emit(B.SurveyWillClose, { name: B.SurveyWillClose, initiator: Be.FeedbackClosed, studyType: "feedbackButton", "survey.id": u });
|
|
6392
6392
|
const v = Rt();
|
|
6393
6393
|
m && v && (v.remove(), rr = null, X = null);
|
|
6394
6394
|
}
|
|
6395
6395
|
return;
|
|
6396
6396
|
}
|
|
6397
|
-
if (Ys(
|
|
6397
|
+
if (Ys(Ue(window.UserLeap)) || no || Xa(), t) return X && X.classList.add("sprig-feedback-loading-container-previews"), await tr(t), void Jt();
|
|
6398
6398
|
const g = await (async (v) => {
|
|
6399
|
-
const
|
|
6400
|
-
return
|
|
6399
|
+
const I = await ze(Ae("1", [it], "startFeedbackStudy"), { body: JSON.stringify({ surveyUuid: v }), method: "POST" });
|
|
6400
|
+
return I.ok ? I.json : null;
|
|
6401
6401
|
})(c);
|
|
6402
6402
|
if (g) z.once(B.SurveyAppeared, Jt), tr({ ...g, studyType: "feedbackButton" }, r);
|
|
6403
6403
|
else if (X) {
|
|
6404
6404
|
const v = $f();
|
|
6405
6405
|
X.appendChild(v), Jt(), X.style.height = "300px", X.style.width = "360px";
|
|
6406
6406
|
}
|
|
6407
|
-
}), d == null || d.appendChild(
|
|
6408
|
-
const { useMobileStyling: p, _config: { border:
|
|
6407
|
+
}), d == null || d.appendChild(je), z.emit(B.FeedbackButtonLoaded, { name: B.FeedbackButtonLoaded, "survey.id": u });
|
|
6408
|
+
const { useMobileStyling: p, _config: { border: C } } = window.UserLeap;
|
|
6409
6409
|
if (Za || p) Cs(0);
|
|
6410
6410
|
else {
|
|
6411
6411
|
const m = document.createElement("div");
|
|
6412
|
-
m.id = "sprig-feedback-loading-container", m.className = `sprig-feedback-loading-container sprig-feedback-loading-container-${f}`, m.style.setProperty("--feedback-border",
|
|
6412
|
+
m.id = "sprig-feedback-loading-container", m.className = `sprig-feedback-loading-container sprig-feedback-loading-container-${f}`, m.style.setProperty("--feedback-border", C), X = m, di(), d == null || d.appendChild(m);
|
|
6413
6413
|
const g = gu();
|
|
6414
6414
|
Cs(-g);
|
|
6415
6415
|
}
|
|
@@ -6563,12 +6563,12 @@ class Jf {
|
|
|
6563
6563
|
return r.type === "max" ? t > r.value : r.type === "min" && t < r.value;
|
|
6564
6564
|
}
|
|
6565
6565
|
}
|
|
6566
|
-
const wr = {},
|
|
6566
|
+
const wr = {}, Ve = (e) => {
|
|
6567
6567
|
const t = new Jf(e);
|
|
6568
6568
|
return wr[e] = t, t;
|
|
6569
6569
|
}, bu = (e, t) => {
|
|
6570
6570
|
let r = wr[e];
|
|
6571
|
-
return r || (r =
|
|
6571
|
+
return r || (r = Ve(e)), r.report(t);
|
|
6572
6572
|
}, Kf = ({ reportingIntervalSeconds: e, postMetrics: t }) => {
|
|
6573
6573
|
e ? setInterval(() => {
|
|
6574
6574
|
(async (r) => {
|
|
@@ -6621,7 +6621,7 @@ const Yr = (e, t = 1) => {
|
|
|
6621
6621
|
}, Xf = (e) => e.forEach(Zf), Qf = () => {
|
|
6622
6622
|
ks.report(ht[ks.name] || 0), Es.report(ht[Es.name] || 0), xs.report(ht[xs.name] || 0), Ts.report(ht[Ts.name] || 0), ht = {};
|
|
6623
6623
|
}, eg = (e = 1e3) => {
|
|
6624
|
-
ks =
|
|
6624
|
+
ks = Ve("sdk_mutations_nodes_added"), Es = Ve("sdk_mutations_nodes_removed"), xs = Ve("sdk_mutations_attributes_changed"), Ts = Ve("sdk_mutations_character_data"), el = new MutationObserver(Xf), el.observe(document, { attributes: !0, attributeOldValue: !0, characterData: !0, characterDataOldValue: !0, childList: !0, subtree: !0 }), setInterval(Qf, e);
|
|
6625
6625
|
}, tg = ({ isWeb: e, reportingIntervalSeconds: t, thresholds: r, postMetrics: s }) => {
|
|
6626
6626
|
((n, i) => {
|
|
6627
6627
|
Kt = {}, hi = !1, n == null || n.forEach((a) => {
|
|
@@ -6630,15 +6630,15 @@ const Yr = (e, t = 1) => {
|
|
|
6630
6630
|
}), mi = i;
|
|
6631
6631
|
})(r, (n, i) => {
|
|
6632
6632
|
var a, o;
|
|
6633
|
-
if ((a =
|
|
6633
|
+
if ((a = re.replay) != null && a.isReplayRecording()) {
|
|
6634
6634
|
const l = `Value: ${n} on ${i.metric} violated threshold of ${i.type} ${i.value}`;
|
|
6635
|
-
(o =
|
|
6635
|
+
(o = re.replay) == null || o.disableRecording("Threshold violated", new Error(l), { reportError: !1 }), window.UserLeap.reportError("Sdk Performance Metric threshold violated", new Error("Sdk Performance Metric threshold violated"), { metricName: i.metric, type: i.type, value: i.value }, { metricName: i.metric }), hi = !0;
|
|
6636
6636
|
}
|
|
6637
6637
|
}), Kf({ reportingIntervalSeconds: t, postMetrics: s }), e && (((n = 1e3) => {
|
|
6638
|
-
const i =
|
|
6638
|
+
const i = Ve("sdk_event_queue_latency_seconds");
|
|
6639
6639
|
gi(n, i);
|
|
6640
6640
|
})(), ((n = 1e4) => {
|
|
6641
|
-
vu =
|
|
6641
|
+
vu = Ve("sdk_dom_nodes_count"), Su = Ve("sdk_page_html_characters"), Qa(), setInterval(Qa, n);
|
|
6642
6642
|
})(), eg());
|
|
6643
6643
|
}, rg = "test", sg = ["popState", "pushState", "replaceState"];
|
|
6644
6644
|
let io, sr;
|
|
@@ -6655,10 +6655,10 @@ function nr(e) {
|
|
|
6655
6655
|
if (Is()) return;
|
|
6656
6656
|
const c = Rt();
|
|
6657
6657
|
c && (pu(rr) || (c.remove(), rr = null, X = null));
|
|
6658
|
-
})(), Q.getItem("sprig.isCapturingHeatmap") && ((l = (o =
|
|
6658
|
+
})(), Q.getItem("sprig.isCapturingHeatmap") && ((l = (o = re.replay) == null ? void 0 : o.checkPendingHeatmapsUrl()) == null || l.then((c) => {
|
|
6659
6659
|
var u;
|
|
6660
|
-
c && ((u =
|
|
6661
|
-
})), !Is() && s && a && a !== globalThis.location.href && e && sg.includes(e.type) && globalThis.UserLeap("dismissActiveSurvey",
|
|
6660
|
+
c && ((u = re.replay) == null || u.uploadReadyPendingCaptures(!0));
|
|
6661
|
+
})), !Is() && s && a && a !== globalThis.location.href && e && sg.includes(e.type) && globalThis.UserLeap("dismissActiveSurvey", Be.PageChange);
|
|
6662
6662
|
}
|
|
6663
6663
|
const ku = { capture: !0 }, ng = () => {
|
|
6664
6664
|
const e = globalThis.UserLeap._config.interactiveEvents.filter((r) => so(r, globalThis.location.href)).map((r) => {
|
|
@@ -6676,13 +6676,13 @@ const ku = { capture: !0 }, ng = () => {
|
|
|
6676
6676
|
globalThis.UserLeap._config.interactiveEventsHandler && globalThis.removeEventListener("click", globalThis.UserLeap._config.interactiveEventsHandler, ku), delete globalThis.UserLeap._config.interactiveEventsHandler;
|
|
6677
6677
|
};
|
|
6678
6678
|
function xu() {
|
|
6679
|
-
const e =
|
|
6679
|
+
const e = ut.getItemObject("userleap.ids");
|
|
6680
6680
|
return (e == null ? void 0 : e[globalThis.UserLeap.envId]) || {};
|
|
6681
6681
|
}
|
|
6682
6682
|
function Tu() {
|
|
6683
6683
|
if (globalThis.previewMode) return;
|
|
6684
|
-
const e =
|
|
6685
|
-
globalThis.UserLeap.visitorId = t || Ut(), N.info("NewVid", { vid: globalThis.UserLeap.visitorId }),
|
|
6684
|
+
const e = ut.getItemObject("sprig.anon.env.vid.map") || {}, t = e[globalThis.UserLeap.envId];
|
|
6685
|
+
globalThis.UserLeap.visitorId = t || Ut(), N.info("NewVid", { vid: globalThis.UserLeap.visitorId }), ke("vid", globalThis.UserLeap.visitorId), t || (e[globalThis.UserLeap.envId] = globalThis.UserLeap.visitorId, ut.setItemObject("sprig.anon.env.vid.map", e)), z.emit(B.VisitorIDUpdated, { visitorId: globalThis.UserLeap.visitorId });
|
|
6686
6686
|
}
|
|
6687
6687
|
function Ru(e, t, r, s) {
|
|
6688
6688
|
var n, i;
|
|
@@ -6690,7 +6690,7 @@ function Ru(e, t, r, s) {
|
|
|
6690
6690
|
if (e.endsWith("mock_snippet.html")) return;
|
|
6691
6691
|
N.info("PageView", { url: e });
|
|
6692
6692
|
const a = (n = document == null ? void 0 : document.querySelector('meta[name="description"]')) == null ? void 0 : n.getAttribute("content");
|
|
6693
|
-
(i =
|
|
6693
|
+
(i = re.replay) == null || i.RecordPageView({ ...a && { description: a }, url: e, referrer: document.referrer, pageTitle: document.title });
|
|
6694
6694
|
const o = globalThis.UserLeap._config.pageUrlEvents;
|
|
6695
6695
|
let l = !1;
|
|
6696
6696
|
if (o && o.length) for (let u = 0; u < o.length && (l = so(o[u], e), !l); u++) ;
|
|
@@ -6716,8 +6716,8 @@ function ig() {
|
|
|
6716
6716
|
async function yn(e, t) {
|
|
6717
6717
|
const r = eo();
|
|
6718
6718
|
e && !t && (globalThis.UserLeap._config.mode = rg);
|
|
6719
|
-
const s = Ys(
|
|
6720
|
-
const a = new URL(
|
|
6719
|
+
const s = Ys(Ue(globalThis.UserLeap)), n = await ze(function(i) {
|
|
6720
|
+
const a = new URL(Ae("1", [ot], "questions"));
|
|
6721
6721
|
return Object.entries(i || {}).forEach(([o, l]) => {
|
|
6722
6722
|
l && a.searchParams.append(o, String(l));
|
|
6723
6723
|
}), a.toString();
|
|
@@ -6746,7 +6746,7 @@ function og(e) {
|
|
|
6746
6746
|
const ag = function(e) {
|
|
6747
6747
|
if (!globalThis.UserLeap) return;
|
|
6748
6748
|
const t = async (n = {}) => {
|
|
6749
|
-
var m, g, v,
|
|
6749
|
+
var m, g, v, I, O;
|
|
6750
6750
|
const { userId: i, anonymousId: a, metadata: o = {}, properties: l, showSurveyCallback: c } = n;
|
|
6751
6751
|
let { eventName: u } = n;
|
|
6752
6752
|
if (globalThis.UserLeap.debugMode && u !== Cu && console.info("[DEBUG] Sprig track", n), e.mode === "test") return;
|
|
@@ -6761,33 +6761,33 @@ const ag = function(e) {
|
|
|
6761
6761
|
return console.warn(E), { success: !1, message: E, surveyState: "no survey" };
|
|
6762
6762
|
}
|
|
6763
6763
|
const h = sr ?? globalThis.location.href;
|
|
6764
|
-
o.url || (o.url = h),
|
|
6765
|
-
const f = globalThis.UserLeap.delayingSurvey || mu() ? await
|
|
6764
|
+
o.url || (o.url = h), ke("trackStartUrl", h), (g = (m = globalThis.UserLeap) == null ? void 0 : m._config) != null && g.optimizelyEnabled && (mr(Ue(globalThis.UserLeap)) || us.getAndSetWebOptimizelyExperiments(), o.optimizelyExperiments = Object.assign({}, us.getAllOptimizelyExperiments())), (I = (v = globalThis.UserLeap) == null ? void 0 : v._config) != null && I.launchDarklyEnabled && (o.launchDarklyFlags = pi.getAllLaunchDarklyVariations()), i && (globalThis.UserLeap.userId = i), a && (globalThis.UserLeap.partnerAnonymousId = a), l && (o.eventProperties = l), (O = re.replay) == null || O.RecordEvent({ name: u, url: o.url }), N.info("TrackEvent", { eventName: u });
|
|
6765
|
+
const f = globalThis.UserLeap.delayingSurvey || mu() ? await ze(Ae("1", [it], "events/batch"), { body: JSON.stringify({ events: [{ event: u, metadata: o }], previewKey: d }), method: "POST", shouldDropOnRateLimit: !0 }) : await ze(Ae("1", [it], "events"), { body: JSON.stringify({ event: u, metadata: o, previewKey: d }), method: "POST", shouldDropOnRateLimit: !0 });
|
|
6766
6766
|
if (!f.ok) {
|
|
6767
6767
|
const E = "[Sprig] (ERR-421) Failed to track event";
|
|
6768
6768
|
return f.reportError && (console.warn(E, f.error), f.error && globalThis.UserLeap.reportError("track", f.error)), { success: !1, message: E, error: f.error, surveyState: "no survey" };
|
|
6769
6769
|
}
|
|
6770
|
-
i &&
|
|
6771
|
-
const
|
|
6772
|
-
|
|
6770
|
+
i && ke("uid", i), a && ke("aid", a);
|
|
6771
|
+
const w = f.json;
|
|
6772
|
+
w.invalidPreviewKey && Q.removeItem("sprig.previewKey");
|
|
6773
6773
|
const p = o.trackPageView ? o.url : void 0;
|
|
6774
|
-
return
|
|
6774
|
+
return w != null && w.feedbackButton && yu(w.feedbackButton, void 0, p), await async function(E, A) {
|
|
6775
6775
|
var k, T;
|
|
6776
|
-
let
|
|
6777
|
-
return !(
|
|
6776
|
+
let M = !0;
|
|
6777
|
+
return !(A && ((k = E == null ? void 0 : E.json) != null && k.surveyId) && (globalThis.UserLeap.delayingSurvey = !0, M = await A(E.json.surveyId), globalThis.UserLeap.delayingSurvey = !1, !M)) && ((T = E == null ? void 0 : E.json) != null && T.delay && !globalThis.UserLeap.isMobileSDK && (globalThis.UserLeap.delayingSurvey = !0, await vs(E.json.delay), globalThis.UserLeap.delayingSurvey = !1), M);
|
|
6778
6778
|
}(f, c) ? function(E) {
|
|
6779
6779
|
if (!globalThis.UserLeap._config.dismissOnPageChange) return !0;
|
|
6780
|
-
const
|
|
6781
|
-
return
|
|
6782
|
-
}(h) ? tr(
|
|
6780
|
+
const A = new URL(E), M = new URL(sr ?? globalThis.location.href);
|
|
6781
|
+
return A.hostname === M.hostname && A.pathname === M.pathname;
|
|
6782
|
+
}(h) ? tr(w, p, io) : { success: !1, message: "Study should not be displayed after page navigation", surveyState: "no survey" } : { success: !1, message: "[Sprig] Callback returned false, aborting rendering of survey", surveyState: "no survey" };
|
|
6783
6783
|
}, r = (n, i) => {
|
|
6784
6784
|
var o;
|
|
6785
6785
|
const a = (o = n == null ? void 0 : n.querySelector(`[id="${ro}"]`)) == null ? void 0 : o.contentDocument;
|
|
6786
6786
|
a && Ss({ document: a, elementId: "ul-custom-style", styleString: i });
|
|
6787
|
-
}, s = { displaySurvey: async (n) => (console.warn("[Sprig] displaySurvey should only be used to debug your studies; not intended for production usage."), globalThis.UserLeap("dismissActiveSurvey",
|
|
6788
|
-
globalThis.UserLeap("dismissActiveSurvey",
|
|
6787
|
+
}, s = { displaySurvey: async (n) => (console.warn("[Sprig] displaySurvey should only be used to debug your studies; not intended for production usage."), globalThis.UserLeap("dismissActiveSurvey", Be.Override), yn({ surveyId: n }, !0)), _previewSurvey(n) {
|
|
6788
|
+
globalThis.UserLeap("dismissActiveSurvey", Be.Override), yn({ surveyTemplateId: n }, !1);
|
|
6789
6789
|
}, _reviewSurvey(n) {
|
|
6790
|
-
globalThis.UserLeap("dismissActiveSurvey",
|
|
6790
|
+
globalThis.UserLeap("dismissActiveSurvey", Be.Override), yn({ surveyId: n }, !1);
|
|
6791
6791
|
}, previewSurvey(n) {
|
|
6792
6792
|
s._previewSurvey(n);
|
|
6793
6793
|
}, reviewSurvey(n) {
|
|
@@ -6798,8 +6798,8 @@ const ag = function(e) {
|
|
|
6798
6798
|
globalThis.UserLeap._queue.unpause();
|
|
6799
6799
|
}, setVisitorToken() {
|
|
6800
6800
|
console.warn("[Sprig] setVisitorToken is deprecated.");
|
|
6801
|
-
}, dismissActiveSurvey(n =
|
|
6802
|
-
globalThis.UserLeap.container && (n ===
|
|
6801
|
+
}, dismissActiveSurvey(n = Be.API) {
|
|
6802
|
+
globalThis.UserLeap.container && (n === Be.Closed && globalThis.Sprig.trackHistory && globalThis.Sprig.trackHistory({ event: "closed" }), z.emit(B.SurveyCloseRequested, { name: B.SurveyCloseRequested, initiator: n, "survey.id": parseInt(globalThis.UserLeap.container.dataset.studyId) }), z.emit(B.SurveyWillClose, { name: B.SurveyWillClose, initiator: n, "survey.id": parseInt(globalThis.UserLeap.container.dataset.studyId) }));
|
|
6803
6803
|
}, async setAttribute(n, i) {
|
|
6804
6804
|
if (!n || !i && i !== 0 && i !== !1) {
|
|
6805
6805
|
const a = "[Sprig] - Disregarding empty attribute / value provided";
|
|
@@ -6831,7 +6831,7 @@ const ag = function(e) {
|
|
|
6831
6831
|
if (!(o && Object.keys(o).length !== 0 || i && globalThis.UserLeap.userId !== i || a && globalThis.UserLeap.partnerAnonymousId !== a)) return { success: !0 };
|
|
6832
6832
|
const l = {};
|
|
6833
6833
|
let c;
|
|
6834
|
-
return i && (l.userId = globalThis.UserLeap.userId = i), a && (l.partnerAnonymousId = globalThis.UserLeap.partnerAnonymousId = a), o && Object.keys(o).length > 0 ? (c = await
|
|
6834
|
+
return i && (l.userId = globalThis.UserLeap.userId = i), a && (l.partnerAnonymousId = globalThis.UserLeap.partnerAnonymousId = a), o && Object.keys(o).length > 0 ? (c = await ze(Ae("1", [ot, it], "attributes"), { body: JSON.stringify(o), method: "PUT" }), c.ok ? Object.assign(Rs, o) : c.reportError && (console.warn("[Sprig] (ERR-432) identifyAndSetAttributes failed", c.error), c.error && globalThis.UserLeap.reportError("identifyAndSetAttributes", c.error))) : c = await ze(Ae("1", [ot, it]), { body: JSON.stringify(l), method: "PUT" }), o && o[Vt] && (globalThis.UserLeap.email = o[Vt]), c.ok && (i && ke("uid", i), a && ke("aid", a)), { success: !!c.ok };
|
|
6835
6835
|
}, async removeAttributes(n) {
|
|
6836
6836
|
if (globalThis.UserLeap.debugMode && console.info("[DEBUG] Sprig removeAttributes", n), e.mode === "test") return;
|
|
6837
6837
|
if (n == null || n.length === 0) {
|
|
@@ -6842,7 +6842,7 @@ const ag = function(e) {
|
|
|
6842
6842
|
const a = "[Sprig] - Skipping tracking without userId";
|
|
6843
6843
|
return console.warn(a), { success: !1, message: a };
|
|
6844
6844
|
}
|
|
6845
|
-
const i = await
|
|
6845
|
+
const i = await ze(Ae("1", [ot, it], "attributes"), { body: JSON.stringify({ delete: n }), method: "DELETE" });
|
|
6846
6846
|
return !i.ok && i.reportError && (console.warn("[Sprig] (ERR-433) Remove attributes failed", i.error), i.error && globalThis.UserLeap.reportError("removeAttributes", i.error)), { success: !!i.ok };
|
|
6847
6847
|
}, async addSurveyListener(n) {
|
|
6848
6848
|
z.on(B.SurveyLifeCycle, n);
|
|
@@ -6864,14 +6864,14 @@ const ag = function(e) {
|
|
|
6864
6864
|
}
|
|
6865
6865
|
if (e.mode === "test" || n === globalThis.UserLeap.userId) return;
|
|
6866
6866
|
globalThis.UserLeap.userId = n;
|
|
6867
|
-
const i = globalThis.UserLeap.visitorId, a = await
|
|
6868
|
-
a.ok ? (i !== globalThis.UserLeap.visitorId && ((o =
|
|
6867
|
+
const i = globalThis.UserLeap.visitorId, a = await ze(Ae("1", [ot, it]), { body: JSON.stringify({ userId: n }), method: "PUT" });
|
|
6868
|
+
a.ok ? (i !== globalThis.UserLeap.visitorId && ((o = re.replay) == null || o.clearUserReplayData()), ke("uid", n)) : a.reportError && (console.warn("[Sprig] (ERR-420) Failed to set user id", a.error), a.error && globalThis.UserLeap.reportError("setUserId", a.error));
|
|
6869
6869
|
}, async setPartnerAnonymousId(n) {
|
|
6870
6870
|
if (globalThis.UserLeap.debugMode && console.info("[DEBUG] Sprig setPartnerAnonymousId", n), n == null) {
|
|
6871
6871
|
const i = `[Sprig] - Invalid partnerAnonymousId ${n}`;
|
|
6872
6872
|
return console.warn(i), { success: !1, message: i };
|
|
6873
6873
|
}
|
|
6874
|
-
return globalThis.UserLeap.partnerAnonymousId = n,
|
|
6874
|
+
return globalThis.UserLeap.partnerAnonymousId = n, ke("aid", n), { success: !0 };
|
|
6875
6875
|
}, track: async (n, i, a = {}, o = void 0) => t({ eventName: n, properties: i, metadata: a, showSurveyCallback: o }), identifyAndTrack: async (n) => await t(n), trackPageView(n, i = void 0, a = void 0, o = !0) {
|
|
6876
6876
|
sr = n, Ru(n, i, a, o);
|
|
6877
6877
|
}, applyFeedbackStyles({ button: n = "", view: i = "" }) {
|
|
@@ -6882,15 +6882,15 @@ const ag = function(e) {
|
|
|
6882
6882
|
var h, f;
|
|
6883
6883
|
const a = typeof n == "string" ? parseInt(n, 10) : n, o = typeof i == "string" ? parseInt(i, 10) : i;
|
|
6884
6884
|
isNaN(a) || isNaN(o) || (globalThis.UserLeap.windowDimensions = { width: a, height: o });
|
|
6885
|
-
const l =
|
|
6885
|
+
const l = Ue(globalThis.UserLeap), c = Ys(l), u = l["userleap-platform"] === "web";
|
|
6886
6886
|
if (!globalThis.UserLeap.frameId) return;
|
|
6887
6887
|
const d = document.getElementById(globalThis.UserLeap.frameId);
|
|
6888
|
-
d && (globalThis.UserLeap.useMobileStyling && ((h = globalThis.UserLeap.windowDimensions) != null && h.width && (d.style.width = `${globalThis.UserLeap.windowDimensions.width}px`), (f = globalThis.UserLeap.windowDimensions) != null && f.height && (d.style.maxHeight = globalThis.UserLeap.windowDimensions.height - 20 + "px"), d.contentDocument && (d.style.height = String(
|
|
6888
|
+
d && (globalThis.UserLeap.useMobileStyling && ((h = globalThis.UserLeap.windowDimensions) != null && h.width && (d.style.width = `${globalThis.UserLeap.windowDimensions.width}px`), (f = globalThis.UserLeap.windowDimensions) != null && f.height && (d.style.maxHeight = globalThis.UserLeap.windowDimensions.height - 20 + "px"), d.contentDocument && (d.style.height = String(Hf(d.contentDocument, u && !c, su(l))[0]) + "px")), z.emit(B.SurveyDimensions, { name: B.SurveyDimensions, contentFrameWidth: d.clientWidth, contentFrameHeight: d.clientHeight, "survey.id": parseInt(globalThis.UserLeap.container.dataset.studyId) }));
|
|
6889
6889
|
}, logoutUser() {
|
|
6890
6890
|
var n;
|
|
6891
|
-
globalThis.UserLeap.debugMode && console.info("[DEBUG] Sprig logout"), N.info("LogOut", { vid: globalThis.UserLeap.visitorId, userId: globalThis.UserLeap.userId }), globalThis.UserLeap.visitorId = null, globalThis.UserLeap.userId = null, globalThis.UserLeap.partnerAnonymousId = null, globalThis.UserLeap.token = null, globalThis.UserLeap.email = null,
|
|
6891
|
+
globalThis.UserLeap.debugMode && console.info("[DEBUG] Sprig logout"), N.info("LogOut", { vid: globalThis.UserLeap.visitorId, userId: globalThis.UserLeap.userId }), globalThis.UserLeap.visitorId = null, globalThis.UserLeap.userId = null, globalThis.UserLeap.partnerAnonymousId = null, globalThis.UserLeap.token = null, globalThis.UserLeap.email = null, ut.removeItem("userleap.ids"), globalThis.UserLeap._queue.isPaused() && globalThis.UserLeap._queue.empty(), Tu(), (n = re.replay) == null || n.clearUserReplayData(), globalThis.UserLeap._queue.unpause();
|
|
6892
6892
|
}, teardown() {
|
|
6893
|
-
["hashchange", "popstate"].forEach((n) => globalThis.removeEventListener(n, nr, !0)), globalThis.UserLeap._config.interactiveEvents && Eu(), globalThis.UserLeap("dismissActiveSurvey",
|
|
6893
|
+
["hashchange", "popstate"].forEach((n) => globalThis.removeEventListener(n, nr, !0)), globalThis.UserLeap._config.interactiveEvents && Eu(), globalThis.UserLeap("dismissActiveSurvey", Be.API), delete globalThis.UserLeap, delete globalThis.Sprig, delete globalThis._Sprig;
|
|
6894
6894
|
}, integrateOptimizely(n, i = !0) {
|
|
6895
6895
|
var a, o;
|
|
6896
6896
|
if ((o = (a = globalThis.UserLeap) == null ? void 0 : a._config) != null && o.optimizelyEnabled) try {
|
|
@@ -6928,29 +6928,29 @@ const ag = function(e) {
|
|
|
6928
6928
|
bu(n, i);
|
|
6929
6929
|
}, _completeSessionReplay: async ({ surveyId: n, responseGroupUuid: i, eventDigest: a }) => {
|
|
6930
6930
|
var o;
|
|
6931
|
-
return
|
|
6931
|
+
return re.replay ? (o = re.replay) == null ? void 0 : o._completeSessionReplay({ surveyId: n, responseGroupUuid: i, eventDigest: a, headers: Ue(globalThis.UserLeap) }) : (globalThis.UserLeap.reportError("_completeSessionReplay", new Error("Replay module not registered")), !1);
|
|
6932
6932
|
}, pauseReplayRecording() {
|
|
6933
6933
|
var n, i, a, o;
|
|
6934
|
-
(i = (n =
|
|
6934
|
+
(i = (n = re.replay) == null ? void 0 : n.isReplayPaused) != null && i.call(n) || ((o = (a = re.replay) == null ? void 0 : a.recordReplayPaused) == null || o.call(a));
|
|
6935
6935
|
}, resumeReplayRecording() {
|
|
6936
6936
|
var n, i, a, o, l, c;
|
|
6937
|
-
(i = (n =
|
|
6937
|
+
(i = (n = re.replay) == null ? void 0 : n.isReplayPaused) != null && i.call(n) && ((o = (a = re.replay) == null ? void 0 : a.recordReplayResumed) == null || o.call(a), (c = (l = re.replay) == null ? void 0 : l.recordFullSnapshot) == null || c.call(l));
|
|
6938
6938
|
} };
|
|
6939
6939
|
Object.assign(globalThis.UserLeap, s);
|
|
6940
6940
|
};
|
|
6941
6941
|
async function lg(e, t, r = {}, s = {}) {
|
|
6942
6942
|
var u;
|
|
6943
6943
|
const n = (u = globalThis.__cfg) == null ? void 0 : u.mode, i = eo(), a = globalThis.UserLeap.envId, o = globalThis.document.documentElement, l = { mode: n, screenWidth: globalThis.screen.width, screenHeight: globalThis.screen.height, clientWidth: o.clientWidth, clientHeight: o.clientHeight, location: sr ?? globalThis.location.href, language: globalThis.navigator.language, ...r }, c = { action: e, breadcrumbs: N.breadcrumbs, err: { message: `${t == null ? void 0 : t.name} - ${t == null ? void 0 : t.message}`, stack: t == null ? void 0 : t.stack }, meta: l, vid: i, envId: a, ...s };
|
|
6944
|
-
(await
|
|
6944
|
+
(await ze(Ae("1", null, "errors"), { method: "POST", headers: { "x-ul-error": globalThis.btoa(`userleap-${Date.now()}-error`) }, body: JSON.stringify(c), shouldDropOnRateLimit: !0 })).ok || console.warn("[Sprig] (ERR-444) Failed to report error to API", t);
|
|
6945
6945
|
}
|
|
6946
6946
|
function cg(e = {}) {
|
|
6947
6947
|
var s;
|
|
6948
6948
|
(s = globalThis.SprigLoggerCallback) == null || s.call(globalThis, "Initializing Sprig");
|
|
6949
6949
|
const t = new URLSearchParams(globalThis.location.search).get("sprigPreviewKey") ?? "";
|
|
6950
6950
|
async function r() {
|
|
6951
|
-
var d, h, f,
|
|
6951
|
+
var d, h, f, w, p;
|
|
6952
6952
|
if (globalThis.UserLeap.loaded) return;
|
|
6953
|
-
if ((d = globalThis.SprigLoggerCallback) == null || d.call(globalThis, "Loading Sprig"), globalThis.UserLeap.reportError = lg, globalThis.UserLeap.loaded = !0, globalThis.UserLeap._config = Object.assign({}, e, globalThis.UserLeap.config), globalThis.UserLeap.delayingSurvey = !1, globalThis.UserLeap._config && typeof globalThis.UserLeap._config == "object") for (const
|
|
6953
|
+
if ((d = globalThis.SprigLoggerCallback) == null || d.call(globalThis, "Loading Sprig"), globalThis.UserLeap.reportError = lg, globalThis.UserLeap.loaded = !0, globalThis.UserLeap._config = Object.assign({}, e, globalThis.UserLeap.config), globalThis.UserLeap.delayingSurvey = !1, globalThis.UserLeap._config && typeof globalThis.UserLeap._config == "object") for (const C in globalThis.UserLeap._config) globalThis.UserLeap[C] = globalThis.UserLeap._config[C];
|
|
6954
6954
|
if (globalThis.Sprig.outstandingTransactionLimit !== void 0 && (e.outstandingTransactionLimit = globalThis.Sprig.outstandingTransactionLimit), !globalThis.UserLeap.envId) {
|
|
6955
6955
|
if (!globalThis.UserLeap.appId) throw new Error("Missing Environment id");
|
|
6956
6956
|
globalThis.UserLeap.envId = globalThis.UserLeap.appId;
|
|
@@ -6959,34 +6959,34 @@ function cg(e = {}) {
|
|
|
6959
6959
|
const n = xu(), i = globalThis.UserLeap.sampleRate;
|
|
6960
6960
|
let a = n.sampled;
|
|
6961
6961
|
if (i) {
|
|
6962
|
-
if (a === null && (a = Math.random() < i,
|
|
6963
|
-
} else a !== null &&
|
|
6962
|
+
if (a === null && (a = Math.random() < i, ke("sampled", a)), !a) return;
|
|
6963
|
+
} else a !== null && ke("sampled", null);
|
|
6964
6964
|
globalThis.UserLeap._API_URL || (globalThis.UserLeap._API_URL = "https://api.sprig.com");
|
|
6965
6965
|
const o = [...globalThis.UserLeap._queue];
|
|
6966
6966
|
globalThis.UserLeap._queue = new Yf(globalThis.UserLeap, []), globalThis.UserLeap._queue.pause();
|
|
6967
|
-
for (let
|
|
6967
|
+
for (let C = 0; C < o.length; C++) globalThis.UserLeap._queue.push(o[C]);
|
|
6968
6968
|
const l = n.token;
|
|
6969
6969
|
l ? (globalThis.UserLeap.token = l, globalThis.UserLeap.visitorId = n.vid ?? null, globalThis.UserLeap.userId = n.uid ?? null, globalThis.UserLeap.partnerAnonymousId = n.aid ?? null) : Tu();
|
|
6970
|
-
const c = mr(
|
|
6970
|
+
const c = mr(Ue(globalThis.UserLeap));
|
|
6971
6971
|
(h = globalThis.SprigLoggerCallback) == null || h.call(globalThis, "Sprig fetching config");
|
|
6972
|
-
const u = await async function(
|
|
6973
|
-
var
|
|
6974
|
-
const m =
|
|
6975
|
-
document.addEventListener("securitypolicyviolation",
|
|
6976
|
-
const g = await
|
|
6977
|
-
if (document.removeEventListener("securitypolicyviolation",
|
|
6972
|
+
const u = await async function(C) {
|
|
6973
|
+
var I, O;
|
|
6974
|
+
const m = Ue(globalThis.UserLeap);
|
|
6975
|
+
document.addEventListener("securitypolicyviolation", Ha);
|
|
6976
|
+
const g = await Xe(Ae("1", [ot], "config"), { headers: m });
|
|
6977
|
+
if (document.removeEventListener("securitypolicyviolation", Ha), !g.ok) return (I = globalThis.SprigLoggerCallback) == null || I.call(globalThis, "Sprig config fetch failed"), g.reportError && (console.warn("[Sprig] (ERR-422) Failed to load configuration", g.error), g.error && globalThis.UserLeap.reportError("applyRemoteConfig", g.error)), ci("Disabled: failed to fetch configuration"), C;
|
|
6978
6978
|
const v = g.json;
|
|
6979
|
-
return v != null && v.disabled ? ((O = globalThis.SprigLoggerCallback) == null || O.call(globalThis, "Sprig config fetch disabled"), ci(`Disabled: ${v.disabled}`), { disabled: v.disabled }) : Object.assign({}, v,
|
|
6979
|
+
return v != null && v.disabled ? ((O = globalThis.SprigLoggerCallback) == null || O.call(globalThis, "Sprig config fetch disabled"), ci(`Disabled: ${v.disabled}`), { disabled: v.disabled }) : Object.assign({}, v, C);
|
|
6980
6980
|
}(e);
|
|
6981
|
-
if ((f = globalThis.SprigLoggerCallback) == null || f.call(globalThis, "Sprig fetched config"), tg({ isWeb: !c, reportingIntervalSeconds: u.metricsReportingEnabled || u.mobileMetricsReportingEnabled ? u.metricsReportingIntervalSeconds : 0, thresholds: u.metricThresholds, postMetrics: async (
|
|
6981
|
+
if ((f = globalThis.SprigLoggerCallback) == null || f.call(globalThis, "Sprig fetched config"), tg({ isWeb: !c, reportingIntervalSeconds: u.metricsReportingEnabled || u.mobileMetricsReportingEnabled ? u.metricsReportingIntervalSeconds : 0, thresholds: u.metricThresholds, postMetrics: async (C) => {
|
|
6982
6982
|
var m;
|
|
6983
|
-
await
|
|
6983
|
+
await ze(Ae("1", [ot], "metrics"), { body: C, method: "POST", headers: { "x-ul-replay-enabled": `${!!((m = re.replay) != null && m.isReplayRecording())}` }, shouldDropOnRateLimit: !0 });
|
|
6984
6984
|
} }), !c) {
|
|
6985
|
-
const
|
|
6986
|
-
await ((
|
|
6985
|
+
const C = u.alwaysOnReplay ? { userAgent: globalThis.navigator.userAgent, surveyId: u.alwaysOnReplay.surveyId, responseGroupUuid: u.alwaysOnReplay.responseGroupUuid, sdkVersion: "2.44.0", maxDurationSeconds: u.alwaysOnReplay.maxDurationSeconds } : void 0;
|
|
6986
|
+
await ((w = re.replay) == null ? void 0 : w.initializeReplay({ maxReplayDurationSeconds: u.maxReplayDurationSeconds, maxInflightRequests: globalThis.UserLeap.maxInflightReplayRequests ?? 2, replaySettings: u.replaySettings, apiUrl: globalThis.UserLeap._API_URL, alwaysOnConfig: C })), io = u.replaySettings;
|
|
6987
6987
|
}
|
|
6988
6988
|
ag(u), await og(u), globalThis.UserLeap._queue.unpause(), (p = globalThis.SprigLoggerCallback) == null || p.call(globalThis, "SdkReady"), z.emit(B.SDKReady, { mobileMetricsReportingEnabled: !!u.mobileMetricsReportingEnabled, metricsReportingInterval: u.metricsReportingIntervalSeconds || 0, metricsThresholds: u.metricThresholds || [], maxMobileReplayDurationSeconds: u.maxMobileReplayDurationSeconds, mobileReplaySettings: u.mobileReplaySettings }), z.emit(B.VisitorIDUpdated, { visitorId: globalThis.UserLeap.visitorId }), z.on(B.VisitorIDUpdated, () => {
|
|
6989
|
-
for (const
|
|
6989
|
+
for (const C in Rs) delete Rs[C];
|
|
6990
6990
|
});
|
|
6991
6991
|
}
|
|
6992
6992
|
globalThis.UserLeap.UPDATES = hr, globalThis.UserLeap("setPreviewKey", t), document.readyState === "complete" ? r() : globalThis.attachEvent ? globalThis.attachEvent("onload", r) : globalThis.addEventListener("load", () => {
|
|
@@ -7102,7 +7102,7 @@ const sy = { configure: (e) => {
|
|
|
7102
7102
|
const t = globalThis.Sprig;
|
|
7103
7103
|
return t.appId = e.envId, t._queue = [], globalThis.UserLeap = t, cg(e), globalThis.Sprig;
|
|
7104
7104
|
} }, ny = new yi();
|
|
7105
|
-
var
|
|
7105
|
+
var at = ((e) => (e[e.DomContentLoaded = 0] = "DomContentLoaded", e[e.Load = 1] = "Load", e[e.FullSnapshot = 2] = "FullSnapshot", e[e.IncrementalSnapshot = 3] = "IncrementalSnapshot", e[e.Meta = 4] = "Meta", e[e.Custom = 5] = "Custom", e[e.Plugin = 6] = "Plugin", e))(at || {}), $e = ((e) => (e[e.Mutation = 0] = "Mutation", e[e.MouseMove = 1] = "MouseMove", e[e.MouseInteraction = 2] = "MouseInteraction", e[e.Scroll = 3] = "Scroll", e[e.ViewportResize = 4] = "ViewportResize", e[e.Input = 5] = "Input", e[e.TouchMove = 6] = "TouchMove", e[e.MediaInteraction = 7] = "MediaInteraction", e[e.StyleSheetRule = 8] = "StyleSheetRule", e[e.CanvasMutation = 9] = "CanvasMutation", e[e.Font = 10] = "Font", e[e.Log = 11] = "Log", e[e.Drag = 12] = "Drag", e[e.StyleDeclaration = 13] = "StyleDeclaration", e[e.Selection = 14] = "Selection", e[e.AdoptedStyleSheet = 15] = "AdoptedStyleSheet", e[e.CustomElement = 16] = "CustomElement", e))($e || {});
|
|
7106
7106
|
const wi = (e, t) => t.some((r) => e instanceof r);
|
|
7107
7107
|
let rl, sl;
|
|
7108
7108
|
const bi = /* @__PURE__ */ new WeakMap(), wn = /* @__PURE__ */ new WeakMap(), Ls = /* @__PURE__ */ new WeakMap();
|
|
@@ -7111,16 +7111,16 @@ let vi = { get(e, t, r) {
|
|
|
7111
7111
|
if (t === "done") return bi.get(e);
|
|
7112
7112
|
if (t === "store") return r.objectStoreNames[1] ? void 0 : r.objectStore(r.objectStoreNames[0]);
|
|
7113
7113
|
}
|
|
7114
|
-
return
|
|
7114
|
+
return lt(e[t]);
|
|
7115
7115
|
}, set: (e, t, r) => (e[t] = r, !0), has: (e, t) => e instanceof IDBTransaction && (t === "done" || t === "store") || t in e };
|
|
7116
7116
|
function Lu(e) {
|
|
7117
7117
|
vi = e(vi);
|
|
7118
7118
|
}
|
|
7119
7119
|
function ug(e) {
|
|
7120
7120
|
return (sl || (sl = [IDBCursor.prototype.advance, IDBCursor.prototype.continue, IDBCursor.prototype.continuePrimaryKey])).includes(e) ? function(...t) {
|
|
7121
|
-
return e.apply(Si(this), t),
|
|
7121
|
+
return e.apply(Si(this), t), lt(this.request);
|
|
7122
7122
|
} : function(...t) {
|
|
7123
|
-
return
|
|
7123
|
+
return lt(e.apply(Si(this), t));
|
|
7124
7124
|
};
|
|
7125
7125
|
}
|
|
7126
7126
|
function dg(e) {
|
|
@@ -7137,11 +7137,11 @@ function dg(e) {
|
|
|
7137
7137
|
bi.set(t, r);
|
|
7138
7138
|
}(e), wi(e, rl || (rl = [IDBDatabase, IDBObjectStore, IDBIndex, IDBCursor, IDBTransaction])) ? new Proxy(e, vi) : e);
|
|
7139
7139
|
}
|
|
7140
|
-
function
|
|
7140
|
+
function lt(e) {
|
|
7141
7141
|
if (e instanceof IDBRequest) return function(r) {
|
|
7142
7142
|
const s = new Promise((n, i) => {
|
|
7143
7143
|
r.onsuccess = () => {
|
|
7144
|
-
n(
|
|
7144
|
+
n(lt(r.result));
|
|
7145
7145
|
}, r.onerror = () => {
|
|
7146
7146
|
i(r.error);
|
|
7147
7147
|
};
|
|
@@ -7155,7 +7155,7 @@ function at(e) {
|
|
|
7155
7155
|
const Si = (e) => Ls.get(e);
|
|
7156
7156
|
function Ii(e, { blocked: t } = {}) {
|
|
7157
7157
|
const r = indexedDB.deleteDatabase(e);
|
|
7158
|
-
return t && (r.onblocked = (s) => t(s.oldVersion, s)),
|
|
7158
|
+
return t && (r.onblocked = (s) => t(s.oldVersion, s)), lt(r).then(() => {
|
|
7159
7159
|
});
|
|
7160
7160
|
}
|
|
7161
7161
|
const pg = ["get", "getKey", "getAll", "getAllKeys", "count"], hg = ["put", "add", "delete", "clear"], bn = /* @__PURE__ */ new Map();
|
|
@@ -7219,7 +7219,7 @@ const yg = "sprigReplayIframeLoaded", wg = "sprigReplayIframeSettings", bg = "sp
|
|
|
7219
7219
|
var u;
|
|
7220
7220
|
if (!l && !r && !s) return void N.error("UploadErr", { isMobile: l, uploadId: r, etags: s });
|
|
7221
7221
|
N.info("MarkUploadComplete", { surveyId: t });
|
|
7222
|
-
const c = await
|
|
7222
|
+
const c = await Xe(`${e}/sdk/1/completeSessionReplay`, { method: "POST", body: JSON.stringify({ etags: s, uploadId: r, responseGroupUuid: i, surveyId: t, replayDuration: a, eventDigest: o, userAgent: (u = window == null ? void 0 : window.navigator) == null ? void 0 : u.userAgent }), headers: n, shouldRetryRequest: !0 });
|
|
7223
7223
|
return N.info("MarkUploadDone", { surveyId: t }), c;
|
|
7224
7224
|
}, Sg = (e) => {
|
|
7225
7225
|
if (e instanceof Attr) return null;
|
|
@@ -7256,8 +7256,8 @@ const yg = "sprigReplayIframeLoaded", wg = "sprigReplayIframeSettings", bg = "sp
|
|
|
7256
7256
|
return (s) => {
|
|
7257
7257
|
clearTimeout(r), r = window.setTimeout(() => e(s), t);
|
|
7258
7258
|
};
|
|
7259
|
-
},
|
|
7260
|
-
let Os = !1,
|
|
7259
|
+
}, We = { capture: !0, passive: !0 }, Cg = ["a", "button", "input", "option", "li", "link"], kg = ["Escape", "Enter", "Backspace", "F5", "Tab"];
|
|
7260
|
+
let Os = !1, xe = null, ds = null;
|
|
7261
7261
|
const al = (e) => {
|
|
7262
7262
|
var r;
|
|
7263
7263
|
if (((r = e.tagName) == null ? void 0 : r.toLowerCase()) === "html") return { element: "html" };
|
|
@@ -7280,16 +7280,16 @@ const al = (e) => {
|
|
|
7280
7280
|
var n, i;
|
|
7281
7281
|
let r = t.target;
|
|
7282
7282
|
var s;
|
|
7283
|
-
t.target === ((n = window.document) == null ? void 0 : n.body) && window.Sprig.pointerDownTarget && (r = window.Sprig.pointerDownTarget), s = { x: t.x, y: t.y, type: e, elementAttributes: Eg(r), windowHeight: window.innerHeight, windowWidth: window.innerWidth, ...r instanceof HTMLElement || r instanceof SVGElement || r instanceof MathMLElement ? { rect: r == null ? void 0 : r.getBoundingClientRect(), xPath: Uu(r) } : {} }, (i = s == null ? void 0 : s.elementAttributes) != null && i.text && (s.elementAttributes.text = ao(s.elementAttributes.text)),
|
|
7283
|
+
t.target === ((n = window.document) == null ? void 0 : n.body) && window.Sprig.pointerDownTarget && (r = window.Sprig.pointerDownTarget), s = { x: t.x, y: t.y, type: e, elementAttributes: Eg(r), windowHeight: window.innerHeight, windowWidth: window.innerWidth, ...r instanceof HTMLElement || r instanceof SVGElement || r instanceof MathMLElement ? { rect: r == null ? void 0 : r.getBoundingClientRect(), xPath: Uu(r) } : {} }, (i = s == null ? void 0 : s.elementAttributes) != null && i.text && (s.elementAttributes.text = ao(s.elementAttributes.text)), xe == null || xe("Sprig_Click", s);
|
|
7284
7284
|
}, Pu = (e) => {
|
|
7285
7285
|
var t;
|
|
7286
|
-
kg.includes(e.key) && (t = { key: e.key },
|
|
7286
|
+
kg.includes(e.key) && (t = { key: e.key }, xe == null || xe("Sprig_Keystroke", t));
|
|
7287
7287
|
}, xg = () => {
|
|
7288
7288
|
var e;
|
|
7289
|
-
window.performance.getEntriesByType("navigation").map((t) => t.type).includes("reload") && (e = { url: window.location.href, currentPageTitle: document.title },
|
|
7289
|
+
window.performance.getEntriesByType("navigation").map((t) => t.type).includes("reload") && (e = { url: window.location.href, currentPageTitle: document.title }, xe == null || xe("Sprig_Refresh", e));
|
|
7290
7290
|
}, Tg = () => {
|
|
7291
7291
|
var e;
|
|
7292
|
-
window.performance.getEntriesByType("navigation").map((t) => t.type).includes("back_forward") && ((e = { curUrl: window.location.href, fromUrl: document.referrer, currentPageTitle: document.title }).currentPageTitle && (e.currentPageTitle = ao(e.currentPageTitle)),
|
|
7292
|
+
window.performance.getEntriesByType("navigation").map((t) => t.type).includes("back_forward") && ((e = { curUrl: window.location.href, fromUrl: document.referrer, currentPageTitle: document.title }).currentPageTitle && (e.currentPageTitle = ao(e.currentPageTitle)), xe == null || xe("Sprig_BackForward", e));
|
|
7293
7293
|
}, _u = Ig((e) => {
|
|
7294
7294
|
if (!(e.target instanceof HTMLElement || e.target instanceof Document)) return;
|
|
7295
7295
|
let t = e.target;
|
|
@@ -7301,63 +7301,63 @@ const Fu = (e) => {
|
|
|
7301
7301
|
}, Bu = (e) => {
|
|
7302
7302
|
window.Sprig && (window.Sprig.pointerDownTarget = e.target);
|
|
7303
7303
|
}, pe = { isRecording: !1, scrollEventUuids: {}, stopRecording: () => {
|
|
7304
|
-
} }, zu = () => globalThis.indexedDB && globalThis.IDBKeyRange && globalThis.CompressionStream,
|
|
7304
|
+
} }, zu = () => globalThis.indexedDB && globalThis.IDBKeyRange && globalThis.CompressionStream, be = (() => {
|
|
7305
7305
|
const e = Q.getItem("sprig.sessionId");
|
|
7306
7306
|
if (e) return N.info("SessionIDFound", { savedSessionId: e }), Q.removeItem("sprig.sessionId"), e;
|
|
7307
7307
|
const t = Ut();
|
|
7308
7308
|
return N.info("GeneratedSessionID", { uuid: t }), t;
|
|
7309
7309
|
})(), ki = () => {
|
|
7310
7310
|
Q.setItem("sprig.disableReplayRecording", "disabled");
|
|
7311
|
-
},
|
|
7311
|
+
}, He = () => !!Q.getItem("sprig.disableReplayRecording"), As = () => !!Q.getItem("sprig.isReplayPaused");
|
|
7312
7312
|
var dl;
|
|
7313
7313
|
(dl = globalThis.addEventListener) == null || dl.call(globalThis, "beforeunload", () => {
|
|
7314
|
-
N.info("BeforeUnload", { sessionId:
|
|
7314
|
+
N.info("BeforeUnload", { sessionId: be }), Q.setItem("sprig.sessionId", be);
|
|
7315
7315
|
});
|
|
7316
|
-
const
|
|
7316
|
+
const Ye = (e, t) => {
|
|
7317
7317
|
var r, s;
|
|
7318
|
-
if (!
|
|
7318
|
+
if (!He() && pe.isRecording && !As()) try {
|
|
7319
7319
|
(s = (r = globalThis.rrwebRecord) == null ? void 0 : r.addCustomEvent) == null || s.call(r, e, t);
|
|
7320
7320
|
} catch (n) {
|
|
7321
7321
|
br("Error recording custom event", n);
|
|
7322
7322
|
}
|
|
7323
7323
|
}, Rg = async (e) => {
|
|
7324
7324
|
const { x: t, xPath: r, y: s } = e, n = pe.scrollEventUuids[r];
|
|
7325
|
-
if (n) return
|
|
7325
|
+
if (n) return Ee(async () => {
|
|
7326
7326
|
var o, l, c, u;
|
|
7327
|
-
const i = await
|
|
7327
|
+
const i = await se.openDB(), a = await i.get("events", n);
|
|
7328
7328
|
if (a != null && a.event) {
|
|
7329
7329
|
const d = JSON.parse(a.event), h = t > ((l = (o = d.data) == null ? void 0 : o.payload) == null ? void 0 : l.x), f = s > ((u = (c = d.data) == null ? void 0 : c.payload) == null ? void 0 : u.y);
|
|
7330
7330
|
if (!h && !f) return null;
|
|
7331
7331
|
h && (d.data.payload.x = t), f && (d.data.payload.y = s), d.data.payload.elementAttributes = e.elementAttributes, a.event = JSON.stringify(d), await i.put("events", a);
|
|
7332
|
-
} else
|
|
7332
|
+
} else Ye("Sprig_Scroll", e);
|
|
7333
7333
|
}, "Error updating scroll event");
|
|
7334
|
-
|
|
7334
|
+
Ye("Sprig_Scroll", e);
|
|
7335
7335
|
}, ju = () => {
|
|
7336
7336
|
pe.stopRecording && (pe.stopRecording(), pe.stopRecording = void 0), pe.isRecording = !1, ["cleanupInterval", "inactivityInterval", "pendingCheckInterval"].forEach((e) => {
|
|
7337
7337
|
pe[e] && (clearInterval(pe[e]), pe[e] = void 0);
|
|
7338
|
-
}), Os && (window.removeEventListener("click", Nu,
|
|
7338
|
+
}), Os && (window.removeEventListener("click", Nu, We), window.removeEventListener("pointerdown", Bu, We), window.removeEventListener("mousedown", Fu, We), window.removeEventListener("keydown", Pu, We), window.removeEventListener("scroll", _u, We), Os = !1), oo.forEach((e) => {
|
|
7339
7339
|
var t;
|
|
7340
7340
|
(t = e.source) == null || t.postMessage({ type: vg }, { targetOrigin: e.origin });
|
|
7341
7341
|
});
|
|
7342
7342
|
}, Lg = ["did not allow mutations", "called in an invalid security context"], Og = (e, t, { reportError: r = !0, extraInfo: s = {} }) => {
|
|
7343
|
-
if (!
|
|
7344
|
-
if (ki(), t.name === "VersionError") return N.error("VersionErr", { message: e }), void
|
|
7343
|
+
if (!He() && t instanceof Error) {
|
|
7344
|
+
if (ki(), t.name === "VersionError") return N.error("VersionErr", { message: e }), void se.deleteDB();
|
|
7345
7345
|
((n) => {
|
|
7346
7346
|
if (!n) return !0;
|
|
7347
7347
|
for (const i of Lg) if (n.toLowerCase().includes(i)) return !1;
|
|
7348
7348
|
return !0;
|
|
7349
|
-
})(t == null ? void 0 : t.message) && (r && globalThis.UserLeap.reportError(e, t, s),
|
|
7349
|
+
})(t == null ? void 0 : t.message) && (r && globalThis.UserLeap.reportError(e, t, s), se.clearAll());
|
|
7350
7350
|
}
|
|
7351
7351
|
}, br = (e, t, { reportError: r } = { reportError: !0 }) => {
|
|
7352
7352
|
ju(), N.error("ReplayErr", { code: t.code, name: t.name }), Og(e, t, { reportError: r });
|
|
7353
|
-
},
|
|
7353
|
+
}, Ee = async (e, t) => {
|
|
7354
7354
|
try {
|
|
7355
7355
|
return await e();
|
|
7356
7356
|
} catch (r) {
|
|
7357
7357
|
br(t, r);
|
|
7358
7358
|
}
|
|
7359
7359
|
}, Ei = () => {
|
|
7360
|
-
pe.isRecording && (
|
|
7360
|
+
pe.isRecording && (Ee(() => {
|
|
7361
7361
|
var e, t;
|
|
7362
7362
|
return (t = (e = globalThis.rrwebRecord) == null ? void 0 : e.takeFullSnapshot) == null ? void 0 : t.call(e, !0);
|
|
7363
7363
|
}, "Error recording full snapshot"), oo.forEach((e) => {
|
|
@@ -7367,7 +7367,7 @@ const $e = (e, t) => {
|
|
|
7367
7367
|
};
|
|
7368
7368
|
let vn = 0;
|
|
7369
7369
|
(async () => zu() && Promise.allSettled([Ii("replayStorage"), Ii("sprig.replay")]))();
|
|
7370
|
-
const
|
|
7370
|
+
const se = new class {
|
|
7371
7371
|
constructor() {
|
|
7372
7372
|
de(this, "wrapTransactionWithCounter", (e) => {
|
|
7373
7373
|
var s, n;
|
|
@@ -7387,9 +7387,9 @@ const ee = new class {
|
|
|
7387
7387
|
}
|
|
7388
7388
|
openDB() {
|
|
7389
7389
|
return function(e, t, { blocked: r, upgrade: s, blocking: n, terminated: i } = {}) {
|
|
7390
|
-
const a = indexedDB.open(e, t), o =
|
|
7390
|
+
const a = indexedDB.open(e, t), o = lt(a);
|
|
7391
7391
|
return s && (a.onupgradeneeded = (l) => {
|
|
7392
|
-
s(
|
|
7392
|
+
s(lt(a.result), l.oldVersion, l.newVersion, lt(a.transaction), l);
|
|
7393
7393
|
}), r && (a.onblocked = (l) => r(l.oldVersion, l.newVersion, l)), o.then((l) => {
|
|
7394
7394
|
i && (l.onclose = () => i()), n && (l.onversionchange = (c) => n(c.oldVersion, c.newVersion, c));
|
|
7395
7395
|
}).catch(() => {
|
|
@@ -7439,11 +7439,11 @@ const ee = new class {
|
|
|
7439
7439
|
}
|
|
7440
7440
|
async getEventsBetween(e, t = Date.now()) {
|
|
7441
7441
|
if (e >= t) return Promise.resolve([]);
|
|
7442
|
-
const r = IDBKeyRange.bound([
|
|
7442
|
+
const r = IDBKeyRange.bound([be, e], [be, t], !1, !0);
|
|
7443
7443
|
return (await this.openDB()).getAllFromIndex("events", "[sessionId+timestamp]", r);
|
|
7444
7444
|
}
|
|
7445
7445
|
async updateEventsExpiredAt(e, t, r = 30) {
|
|
7446
|
-
const s = /* @__PURE__ */ new Date(), n = s.setMinutes(s.getMinutes() + (r ?? 30)), i = await this.getTransaction("events"), a = i.store.index("[sessionId+timestamp]"), o = IDBKeyRange.bound([
|
|
7446
|
+
const s = /* @__PURE__ */ new Date(), n = s.setMinutes(s.getMinutes() + (r ?? 30)), i = await this.getTransaction("events"), a = i.store.index("[sessionId+timestamp]"), o = IDBKeyRange.bound([be, e], [be, t], !1, !0);
|
|
7447
7447
|
for await (const l of a.iterate(o)) await l.update({ ...l.value, expiredAt: n });
|
|
7448
7448
|
await i.done;
|
|
7449
7449
|
}
|
|
@@ -7460,11 +7460,17 @@ const ee = new class {
|
|
|
7460
7460
|
return n.getAll(i);
|
|
7461
7461
|
}
|
|
7462
7462
|
async getPendingCaptures(e = {}) {
|
|
7463
|
-
return (await (await this.openDB()).getAllFromIndex("pendingCaptures", "sessionId",
|
|
7463
|
+
return (await (await this.openDB()).getAllFromIndex("pendingCaptures", "sessionId", be)).filter((r) => !e.beforePresent || r.targetTimestamp < Date.now()).filter((r) => !e.isBeforeType || r.captureParams.replayParams.replayDurationType === "before").filter((r) => !e.isHeatmap || (r.captureParams.isHeatmap ?? !1));
|
|
7464
|
+
}
|
|
7465
|
+
async tryAddPendingCaptureForSurvey(e) {
|
|
7466
|
+
const { surveyId: t, record: r } = e, s = (await this.openDB()).transaction("pendingCaptures", "readwrite");
|
|
7467
|
+
this.wrapTransactionWithCounter(s);
|
|
7468
|
+
const n = s.store.index("sessionId"), i = await n.getAll(be), a = !!r.captureParams.isHeatmap;
|
|
7469
|
+
return i.some((o) => o.captureParams.surveyId === t && !!o.captureParams.isHeatmap === a) ? (await s.done, { added: !1 }) : (await s.store.add(r), await s.done, { added: !0 });
|
|
7464
7470
|
}
|
|
7465
7471
|
async markPendingCaptureToCanUpload(e) {
|
|
7466
7472
|
const t = await this.getTransaction("pendingCaptures"), r = t.store.index("sessionId");
|
|
7467
|
-
for await (const s of r.iterate(
|
|
7473
|
+
for await (const s of r.iterate(be)) {
|
|
7468
7474
|
const n = s.value;
|
|
7469
7475
|
n.captureParams.responseGroupId === e && await s.update({ ...n, canUpload: !0 });
|
|
7470
7476
|
}
|
|
@@ -7473,22 +7479,22 @@ const ee = new class {
|
|
|
7473
7479
|
async markPendingHeatmapsReady(e) {
|
|
7474
7480
|
if (parseInt(Q.getItem("sprig.pendingCount") ?? "0") === 0) return null;
|
|
7475
7481
|
const t = Date.now(), r = await this.getTransaction("pendingCaptures"), s = r.store.index("sessionId");
|
|
7476
|
-
for await (const n of s.iterate(
|
|
7482
|
+
for await (const n of s.iterate(be)) {
|
|
7477
7483
|
const i = n.value;
|
|
7478
7484
|
!i.captureParams.isHeatmap || e && !e.includes(i.uuid) || await n.update({ ...i, targetTimestamp: t, captureParams: { ...i.captureParams, triggerTimestamp: t, replayParams: { ...i.captureParams.replayParams, replayDurationSeconds: Math.floor((t - i.timestamp) / 1e3) } } });
|
|
7479
7485
|
}
|
|
7480
7486
|
await r.done;
|
|
7481
7487
|
}
|
|
7482
|
-
}(),
|
|
7488
|
+
}(), Ze = [];
|
|
7483
7489
|
let vr, Wu, gt = [], Dt = !1, Mt = 0, ps = !1, Vu = !1;
|
|
7484
7490
|
const lo = [];
|
|
7485
|
-
let Ms,
|
|
7491
|
+
let Ms, Hu, hs, Gu, Sn = !1;
|
|
7486
7492
|
const Pt = () => ps && !Dt && Date.now() <= Ms, Ag = ({ apiUrl: e, config: t, triggerSnapshot: r, forceInit: s = !1 }) => {
|
|
7487
|
-
ps && !s || (Q.isStorageAvailable ? (gt = [], lo.splice(0),
|
|
7488
|
-
}, Mg = [
|
|
7489
|
-
if (!Pt()) return void globalThis.clearInterval(
|
|
7490
|
-
if ($u(), !co(
|
|
7491
|
-
const e =
|
|
7493
|
+
ps && !s || (Q.isStorageAvailable ? (gt = [], lo.splice(0), Ze.splice(0), Mt = 0, hs = r, Wu = e, vr = { responseGroupUuid: t.responseGroupUuid, surveyId: t.surveyId, userAgent: t.userAgent, sdkVersion: t.sdkVersion }, Hu = t.maxDurationSeconds, Pg(), ps || (Gu = globalThis.setInterval(Dg, 500)), ps = !0) : Dt = !0);
|
|
7494
|
+
}, Mg = [$e.Drag, $e.Input, $e.MediaInteraction, $e.MouseInteraction, $e.MouseMove, $e.Scroll, $e.Selection, $e.TouchMove], Ug = (e) => e.type === at.Custom || e.type === at.IncrementalSnapshot && Mg.includes(e.data.source), co = (e) => e.some(Ug), Dg = async () => {
|
|
7495
|
+
if (!Pt()) return void globalThis.clearInterval(Gu);
|
|
7496
|
+
if ($u(), !co(Ze)) return;
|
|
7497
|
+
const e = Ze[0].timestamp;
|
|
7492
7498
|
Date.now() - e > 35e3 && (hs == null || hs());
|
|
7493
7499
|
}, $u = async () => {
|
|
7494
7500
|
if (gt.length || Sn) return;
|
|
@@ -7502,9 +7508,9 @@ const Pt = () => ps && !Dt && Date.now() <= Ms, Ag = ({ apiUrl: e, config: t, tr
|
|
|
7502
7508
|
N.info("Read stored session state", e);
|
|
7503
7509
|
const t = JSON.parse(e);
|
|
7504
7510
|
Dt = t.disabled, vr = t.metadata, gt = t.uploadUrls, Mt = t.currentIndex, Ms = t.expirationTimestamp, t.pendingEventTimestamp && (N.info(`Uploading with pending timestamp: ${t.pendingEventTimestamp}`), _g(t.pendingEventTimestamp));
|
|
7505
|
-
} else Ms = 1e3 *
|
|
7511
|
+
} else Ms = 1e3 * Hu + Date.now();
|
|
7506
7512
|
}, _g = async (e) => {
|
|
7507
|
-
const t = Date.now(), r = (await
|
|
7513
|
+
const t = Date.now(), r = (await se.getEventsBetween(e, t)).map((n) => JSON.parse(n.event));
|
|
7508
7514
|
if (!co(r)) return;
|
|
7509
7515
|
Ku(r);
|
|
7510
7516
|
const s = await Ju();
|
|
@@ -7523,12 +7529,12 @@ const Pt = () => ps && !Dt && Date.now() <= Ms, Ag = ({ apiUrl: e, config: t, tr
|
|
|
7523
7529
|
const n = new TextEncoder(), i = new CompressionStream("gzip"), a = i.writable.getWriter(), o = n.encode(JSON.stringify(s));
|
|
7524
7530
|
return a.write(o), a.close(), new Uint8Array(await new Response(i.readable).arrayBuffer());
|
|
7525
7531
|
})(t);
|
|
7526
|
-
N.info("Uploading always-on events with presigned url"), await Yu(() =>
|
|
7532
|
+
N.info("Uploading always-on events with presigned url"), await Yu(() => Xe(e, { body: r, method: "PUT" }), "uploading always-on with presigned url");
|
|
7527
7533
|
}, Ng = async () => {
|
|
7528
7534
|
if (!Pt()) return;
|
|
7529
7535
|
const { surveyId: e, responseGroupUuid: t } = vr, r = { responseGroupUuid: t, surveyId: e, index: Mt + 1 };
|
|
7530
7536
|
N.info("Fetching always-on upload urls", r);
|
|
7531
|
-
const s = await Yu(() =>
|
|
7537
|
+
const s = await Yu(() => Xe(`${Wu}/sdk/1/replayUrls`, { method: "POST", body: JSON.stringify(r), headers: Ue(globalThis.UserLeap) }), "fetching always-on signed urls");
|
|
7532
7538
|
if (!s) return;
|
|
7533
7539
|
const n = s.json.signedUrls;
|
|
7534
7540
|
return N.info("Fetched more always-on upload urls", { body: r, urls: n }), n;
|
|
@@ -7541,21 +7547,21 @@ const Pt = () => ps && !Dt && Date.now() <= Ms, Ag = ({ apiUrl: e, config: t, tr
|
|
|
7541
7547
|
}, Ku = (e) => {
|
|
7542
7548
|
var n, i, a;
|
|
7543
7549
|
const t = e.length ? e[e.length - 1].timestamp : Date.now(), r = Mt, s = ((i = (n = globalThis.UserLeap) == null ? void 0 : n.config) == null ? void 0 : i.customMetadata) ?? ((a = globalThis.__cfg) == null ? void 0 : a.customMetadata);
|
|
7544
|
-
Mt++, e.push({ timestamp: t, type:
|
|
7550
|
+
Mt++, e.push({ timestamp: t, type: at.Custom, data: { tag: "Sprig_Meta", payload: { ...vr, index: r, visitorId: globalThis.UserLeap.visitorId ?? "", timestamp: t, customMetadata: s } } });
|
|
7545
7551
|
}, Fg = (e, t) => {
|
|
7546
|
-
Pt() && !Vu && (e ||
|
|
7547
|
-
const r =
|
|
7552
|
+
Pt() && !Vu && (e || Ze.length) && (e && Ze.length && (async () => {
|
|
7553
|
+
const r = Ze.splice(0);
|
|
7548
7554
|
if (!co(r)) return;
|
|
7549
7555
|
N.info("Capturing always-on event array to upload"), Ku(r);
|
|
7550
7556
|
const s = await Ju();
|
|
7551
7557
|
s && await qu(s, r);
|
|
7552
|
-
})(),
|
|
7558
|
+
})(), Ze.push(t));
|
|
7553
7559
|
};
|
|
7554
7560
|
var pl;
|
|
7555
7561
|
(pl = globalThis.addEventListener) == null || pl.call(globalThis, "beforeunload", async () => {
|
|
7556
7562
|
Vu = !0, Pt() && (N.info("Always On handle page unload"), (() => {
|
|
7557
7563
|
let e;
|
|
7558
|
-
|
|
7564
|
+
Ze.length && (e = Ze[0].timestamp);
|
|
7559
7565
|
const t = { disabled: Dt, metadata: vr, uploadUrls: gt, currentIndex: Mt, pendingEventTimestamp: e, expirationTimestamp: Ms };
|
|
7560
7566
|
N.info("Storing session state on unload", t), Q.setItem("sprig.alwayson.info", JSON.stringify(t));
|
|
7561
7567
|
})());
|
|
@@ -7568,7 +7574,7 @@ const Zu = async (e, t) => {
|
|
|
7568
7574
|
} finally {
|
|
7569
7575
|
const n = performance.now() - r;
|
|
7570
7576
|
let i = wr[t];
|
|
7571
|
-
i || (i =
|
|
7577
|
+
i || (i = Ve(t)), i.report(n / 1e3);
|
|
7572
7578
|
}
|
|
7573
7579
|
return s;
|
|
7574
7580
|
}, Xu = (e, t) => {
|
|
@@ -7578,10 +7584,10 @@ const Zu = async (e, t) => {
|
|
|
7578
7584
|
} finally {
|
|
7579
7585
|
const s = performance.now() - r;
|
|
7580
7586
|
let n = wr[t];
|
|
7581
|
-
n || (n =
|
|
7587
|
+
n || (n = Ve(t)), n.report(s / 1e3);
|
|
7582
7588
|
}
|
|
7583
7589
|
};
|
|
7584
|
-
let Qu = 5e3, xi = 6e4, Ti = 0,
|
|
7590
|
+
let Qu = 5e3, xi = 6e4, Ti = 0, ct, Ri = !1, Li = [];
|
|
7585
7591
|
const Bg = (e) => {
|
|
7586
7592
|
var t, r, s, n;
|
|
7587
7593
|
if ((t = e.event) != null && t.includes("Sprig_Scroll")) {
|
|
@@ -7592,25 +7598,25 @@ const Bg = (e) => {
|
|
|
7592
7598
|
Li.push(e), Ri || zg();
|
|
7593
7599
|
}, zg = () => {
|
|
7594
7600
|
Ri = !0, setTimeout(async () => {
|
|
7595
|
-
if (
|
|
7601
|
+
if (He() || As()) return;
|
|
7596
7602
|
const e = Li;
|
|
7597
7603
|
Li = [], Ri = !1, Xu(async () => {
|
|
7598
7604
|
await (async (t) => {
|
|
7599
|
-
const r = t.map((s) => ({ ...s, sessionId: s.sessionId ??
|
|
7600
|
-
if (r.length !== 0) return
|
|
7605
|
+
const r = t.map((s) => ({ ...s, sessionId: s.sessionId ?? be }));
|
|
7606
|
+
if (r.length !== 0) return Ee(() => se.bulkAdd("events", r), "Error storing replay events");
|
|
7601
7607
|
})(e);
|
|
7602
7608
|
}, "sdk_replay_add_event_batch_seconds");
|
|
7603
7609
|
}, 500);
|
|
7604
7610
|
}, jg = (e, t, r) => {
|
|
7605
7611
|
pe.cleanupInterval = window.setInterval(() => {
|
|
7606
7612
|
const s = Date.now();
|
|
7607
|
-
Zu(() =>
|
|
7608
|
-
|
|
7613
|
+
Zu(() => Ee(async () => {
|
|
7614
|
+
He() || await Promise.all([se.deleteRowsBefore("events", s - 1e3 * e, (n) => n.expiredAt === void 0 || n.expiredAt < s - 1e3 * e), se.deleteRowsBefore("chunkUploads", s - 1e3 * t), se.deleteRowsBefore("pendingCaptures", s - 1e3 * r, (n) => !n.canUpload)]);
|
|
7609
7615
|
}, "Error deleting table rows"), "sdk_replay_cleanup_seconds"), N.debug("CleanupComplete");
|
|
7610
7616
|
}, 3e4);
|
|
7611
7617
|
}, Wg = () => {
|
|
7612
7618
|
pe.pendingCheckInterval = window.setInterval(async () => {
|
|
7613
|
-
|
|
7619
|
+
Ee(async () => {
|
|
7614
7620
|
await Oi();
|
|
7615
7621
|
}, "Error initiating pending captures");
|
|
7616
7622
|
}, 5e3);
|
|
@@ -7619,15 +7625,15 @@ let In = !1;
|
|
|
7619
7625
|
const Oi = async (e = !1) => {
|
|
7620
7626
|
if (!In) try {
|
|
7621
7627
|
In = !0;
|
|
7622
|
-
const t = parseInt(
|
|
7628
|
+
const t = parseInt(ct ?? "0");
|
|
7623
7629
|
if (t === 0) return;
|
|
7624
|
-
const r = await
|
|
7625
|
-
await Promise.all(r.map(async (n) => (await s.delete("pendingCaptures", n.uuid), rd(n.captureParams, n.canUpload)))),
|
|
7630
|
+
const r = await se.getPendingCaptures({ beforePresent: !0, isBeforeType: e }), s = await se.openDB();
|
|
7631
|
+
await Promise.all(r.map(async (n) => (await s.delete("pendingCaptures", n.uuid), rd(n.captureParams, n.canUpload)))), ct = (t - r.length).toString(), Q.setItem("sprig.pendingCount", ct);
|
|
7626
7632
|
} finally {
|
|
7627
7633
|
In = !1;
|
|
7628
7634
|
}
|
|
7629
7635
|
}, Vg = async (e, t, r, s, n) => {
|
|
7630
|
-
const i = Math.min(e + n, r), a = await Zu(() =>
|
|
7636
|
+
const i = Math.min(e + n, r), a = await Zu(() => se.getEventsBetween(e, i), "sdk_replay_get_events_between_seconds");
|
|
7631
7637
|
if (!(a != null && a.length)) return N.debug("NoEventsFound"), { validStartFound: s, events: [] };
|
|
7632
7638
|
if (!s) {
|
|
7633
7639
|
N.debug("ValidStartSearch");
|
|
@@ -7643,30 +7649,30 @@ const Oi = async (e = !1) => {
|
|
|
7643
7649
|
const r = await (async (s) => Au.execute(async () => {
|
|
7644
7650
|
var a;
|
|
7645
7651
|
N.info("UploadChunkStart", { chunkIndex: s.chunkIndex, surveyId: s.surveyId });
|
|
7646
|
-
const n = await
|
|
7652
|
+
const n = await Xe(s.uploadUrl, { body: s.data, method: "PUT" });
|
|
7647
7653
|
N.http("UploadChunkEnd", { url: s.uploadUrl, method: "PUT", status_code: n.status, reason: n.statusText ?? "OK", chunkIndex: s.chunkIndex, surveyId: s.surveyId });
|
|
7648
7654
|
const i = (a = n.headers) == null ? void 0 : a.get("ETag");
|
|
7649
7655
|
if (!i) throw new Error(`Upload response did not include etag for upload ${s.uploadId}, part ${s.chunkIndex}`);
|
|
7650
7656
|
return i;
|
|
7651
7657
|
}))(t);
|
|
7652
|
-
return await
|
|
7658
|
+
return await se.updatePartial("chunkUploads", t.uuid, { data: null, etag: r, status: "UploadComplete" }), t.uploadId;
|
|
7653
7659
|
})), td = async (e) => {
|
|
7654
|
-
const t = await
|
|
7660
|
+
const t = await se.getChunkUploadsByStatus({ status: "UploadComplete", uploadId: e });
|
|
7655
7661
|
if (!(t != null && t.length)) return void N.info("NoChunksForUpload", { uploadId: e });
|
|
7656
7662
|
const r = t.reduce((i, a) => (i.find((o) => o.chunkIndex === a.chunkIndex) || i.push(a), i), []);
|
|
7657
7663
|
r.sort((i, a) => i.chunkIndex - a.chunkIndex);
|
|
7658
7664
|
const s = r.map((i) => ({ ETag: i.etag, PartNumber: i.chunkIndex })).filter((i) => i.ETag !== null), n = r[0];
|
|
7659
|
-
await Mu({ apiUrl: n.apiUrl, surveyId: n.surveyId, uploadId: e, responseGroupUuid: n.responseGroupId, etags: s, headers: n.completeUploadHeaders, replayDuration: n.replayDuration }), await
|
|
7660
|
-
},
|
|
7661
|
-
|
|
7662
|
-
const e = await
|
|
7665
|
+
await Mu({ apiUrl: n.apiUrl, surveyId: n.surveyId, uploadId: e, responseGroupUuid: n.responseGroupId, etags: s, headers: n.completeUploadHeaders, replayDuration: n.replayDuration }), await se.deleteChunkUploads("UploadComplete", e);
|
|
7666
|
+
}, Hg = () => {
|
|
7667
|
+
Ee(async () => {
|
|
7668
|
+
const e = await se.getChunkUploadsByStatus({ sessionId: be, status: "ReadyForUpload" });
|
|
7663
7669
|
if (!(e != null && e.length)) return;
|
|
7664
7670
|
const t = await ed(e);
|
|
7665
7671
|
t != null && t.length && await Promise.all(t.map((r) => {
|
|
7666
7672
|
if (r) return td(r);
|
|
7667
7673
|
}));
|
|
7668
7674
|
}, "Error uploading unfinished chunks");
|
|
7669
|
-
},
|
|
7675
|
+
}, Gg = async (e, t) => {
|
|
7670
7676
|
const r = t ?? Date.now();
|
|
7671
7677
|
return (async (s, n) => {
|
|
7672
7678
|
const i = new TextEncoder();
|
|
@@ -7679,82 +7685,81 @@ const Oi = async (e = !1) => {
|
|
|
7679
7685
|
continue;
|
|
7680
7686
|
}
|
|
7681
7687
|
d === 0 && (d = f[0].timestamp), h = f[f.length - 1].timestamp;
|
|
7682
|
-
const
|
|
7683
|
-
|
|
7684
|
-
const m = `${c ? "," : "["}${
|
|
7688
|
+
const C = f.map((v) => v.event);
|
|
7689
|
+
C.push(`{"timestamp":${n}}`);
|
|
7690
|
+
const m = `${c ? "," : "["}${C}`, g = i.encode(m);
|
|
7685
7691
|
Xu(() => {
|
|
7686
7692
|
l.write(g);
|
|
7687
7693
|
}, "sdk_replay_compression_seconds"), c = !0;
|
|
7688
7694
|
}
|
|
7689
7695
|
if (h - d < Qu) return N.debug("ReplayTooShort"), null;
|
|
7690
|
-
const
|
|
7691
|
-
return l.write(
|
|
7696
|
+
const w = i.encode("]");
|
|
7697
|
+
return l.write(w), l.close(), a = new Uint8Array(await new Response(o.readable).arrayBuffer()), a;
|
|
7692
7698
|
})(r - e, r);
|
|
7693
7699
|
}, cl = async (e) => {
|
|
7694
|
-
const { surveyId: t, responseGroupId: r, visitorId: s, apiUrl: n, completeUploadHeaders: i, replayParams: a, triggerTimestamp: o } = e, l = await
|
|
7700
|
+
const { surveyId: t, responseGroupId: r, visitorId: s, apiUrl: n, completeUploadHeaders: i, replayParams: a, triggerTimestamp: o } = e, l = await Gg(1e3 * a.replayDurationSeconds, o);
|
|
7695
7701
|
if (!(l != null && l.length)) return void N.info("FileDataEmpty", { surveyId: t });
|
|
7696
7702
|
const c = ((d, h, f) => {
|
|
7697
|
-
const
|
|
7703
|
+
const w = d.length, p = 1024 * h * 1024, C = Math.ceil(w / f), m = Math.max(p, C), g = [];
|
|
7698
7704
|
let v = 0;
|
|
7699
|
-
for (; v <
|
|
7705
|
+
for (; v < w; ) g.push(d.slice(v, v + m)), v += m;
|
|
7700
7706
|
return g;
|
|
7701
7707
|
})(l, a.minimumChunkSizeMb, a.signedUrls.length), u = await Promise.all(c.map(async (d, h) => {
|
|
7702
|
-
const f = Ut(),
|
|
7703
|
-
return await (await
|
|
7708
|
+
const f = Ut(), w = { apiUrl: n, chunkIndex: h + 1, completeUploadHeaders: i, etag: null, responseGroupId: r, status: "ReadyForUpload", surveyId: t, timestamp: o, totalChunks: c.length, data: d, uploadId: a.uploadId, uploadUrl: a.signedUrls[h].url, uuid: f, visitorId: s };
|
|
7709
|
+
return await (await se.openDB()).add("chunkUploads", { ...w, sessionId: w.sessionId ?? be }), w;
|
|
7704
7710
|
}));
|
|
7705
7711
|
await (async (d, h) => {
|
|
7706
7712
|
await ed(h), await Promise.all(d.map((f) => td(f)));
|
|
7707
7713
|
})([a.uploadId], u);
|
|
7708
7714
|
}, rd = async (e, t) => {
|
|
7709
|
-
if (
|
|
7715
|
+
if (He()) return N.debug("ReplayDisabled-ScheduleOrCapture");
|
|
7710
7716
|
const { isHeatmap: r, isStandalone: s, replayParams: n, triggerTimestamp: i, responseGroupId: a } = e, o = async () => {
|
|
7711
|
-
setTimeout(() => z.removeListener(B.QuestionAnswered, o), 0),
|
|
7712
|
-
n.replayDurationType === "before" ? await cl(e) : await
|
|
7717
|
+
setTimeout(() => z.removeListener(B.QuestionAnswered, o), 0), Ee(async () => {
|
|
7718
|
+
n.replayDurationType === "before" ? await cl(e) : await se.markPendingCaptureToCanUpload(a);
|
|
7713
7719
|
}, "Error in schedule/capture callback");
|
|
7714
7720
|
};
|
|
7715
|
-
|
|
7721
|
+
Ee(async () => {
|
|
7716
7722
|
if (n.replayDurationType === "after" || n.replayDurationType === "beforeAndAfter")
|
|
7717
7723
|
return !s && !r && z.on(B.QuestionAnswered, o), void await nd(e);
|
|
7718
7724
|
if (s || r || t) await cl(e), r && $g();
|
|
7719
7725
|
else {
|
|
7720
7726
|
const l = 35 + n.replayDurationSeconds, c = i - 1e3 * l, u = i;
|
|
7721
|
-
await
|
|
7727
|
+
await se.updateEventsExpiredAt(c, u, n.expirationTimeLimitMinutes), z.on(B.QuestionAnswered, o);
|
|
7722
7728
|
}
|
|
7723
7729
|
}, "Error in scheduling/capturing replay");
|
|
7724
7730
|
}, $g = async () => {
|
|
7725
|
-
parseInt(
|
|
7726
|
-
}, sd = async () =>
|
|
7731
|
+
parseInt(ct ?? "0") || Q.removeItem("sprig.isCapturingHeatmap"), Q.getItem("sprig.teardownAfterCapture") && (ju(), sd(), Q.removeItem("sprig.teardownAfterCapture"));
|
|
7732
|
+
}, sd = async () => He() ? N.debug("ReplayDisabled-ClearData") : Promise.all([se.deleteBySessionId("events", be), se.deleteBySessionId("pendingCaptures", be)]).catch((e) => {
|
|
7727
7733
|
br("Error clearing user replay data", e);
|
|
7728
7734
|
}), nd = async (e) => {
|
|
7729
|
-
if (
|
|
7730
|
-
const { isHeatmap: t, surveyId: r } = e, s =
|
|
7731
|
-
|
|
7732
|
-
|
|
7733
|
-
|
|
7734
|
-
|
|
7735
|
-
|
|
7736
|
-
|
|
7737
|
-
|
|
7738
|
-
|
|
7739
|
-
i.triggerTimestamp = a, lt = (parseInt(lt ?? "0") + 1).toString(), Q.setItem("sprig.pendingCount", lt), await (await ee.openDB()).add("pendingCaptures", { canUpload: !1, captureParams: i, sessionId: ve, targetTimestamp: a, timestamp: Date.now(), uuid: Ut() });
|
|
7735
|
+
if (He()) return;
|
|
7736
|
+
const { isHeatmap: t, surveyId: r } = e, s = { ...e, replayParams: { ...e.replayParams } };
|
|
7737
|
+
e.replayParams.replayDurationType === "beforeAndAfter" && (s.replayParams.replayDurationSeconds *= 2), s.replayParams.replayDurationType = "before";
|
|
7738
|
+
const n = e.triggerTimestamp + 1e3 * e.replayParams.replayDurationSeconds;
|
|
7739
|
+
s.triggerTimestamp = n;
|
|
7740
|
+
const i = { canUpload: !1, captureParams: s, sessionId: be, targetTimestamp: n, timestamp: Date.now(), uuid: Ut() }, { added: a } = await se.tryAddPendingCaptureForSurvey({ surveyId: r, record: i });
|
|
7741
|
+
a ? (ct = (parseInt(ct ?? "0") + 1).toString(), Q.setItem("sprig.pendingCount", ct), t && (Ei(), Q.setItem("sprig.isCapturingHeatmap", "true"), Ti = Date.now(), pe.inactivityInterval || (pe.inactivityInterval = window.setInterval(() => {
|
|
7742
|
+
var o;
|
|
7743
|
+
o = Ti, Date.now() - o >= 3e4 && Ee(() => se.markPendingHeatmapsReady(), "Error in heatmap inactivity");
|
|
7744
|
+
}, 1e3)))) : N.info("PendingCaptureExists", { surveyId: r });
|
|
7740
7745
|
}, Yg = Object.freeze(Object.defineProperty({ __proto__: null, RecordEvent: (e) => {
|
|
7741
|
-
|
|
7746
|
+
Ye("Sprig_TrackEvent", e);
|
|
7742
7747
|
}, RecordPageView: (e) => {
|
|
7743
|
-
e.description && (e.description = ao(e.description)),
|
|
7748
|
+
e.description && (e.description = ao(e.description)), Ye("Sprig_PageView", e);
|
|
7744
7749
|
}, RecordSurveyShown: (e) => {
|
|
7745
|
-
|
|
7750
|
+
Ye("Sprig_ShowSurvey", e);
|
|
7746
7751
|
}, _completeSessionReplay: async ({ surveyId: e, responseGroupUuid: t, eventDigest: r, headers: s }) => {
|
|
7747
7752
|
if (!e || !t) return !1;
|
|
7748
7753
|
const n = globalThis.UserLeap._API_URL, i = await Mu({ surveyId: e, responseGroupUuid: t, eventDigest: r, apiUrl: n, headers: s }, !0);
|
|
7749
7754
|
return !(i != null && i.error);
|
|
7750
|
-
}, checkPendingHeatmapsUrl: () =>
|
|
7751
|
-
const e = (await
|
|
7752
|
-
return N.info("PendingHeatmapsToComplete", { count: e.length }), e.length && (await
|
|
7755
|
+
}, checkPendingHeatmapsUrl: () => He() ? N.debug("ReplayDisabled-PendingHeatmaps") : Ee(async () => {
|
|
7756
|
+
const e = (await se.getPendingCaptures({ isHeatmap: !0 })).map((t) => ({ eventId: t.captureParams.eventId, uuid: t.uuid })).filter(({ eventId: t }) => !pu(t)).map(({ uuid: t }) => t);
|
|
7757
|
+
return N.info("PendingHeatmapsToComplete", { count: e.length }), e.length && (await se.markPendingHeatmapsReady(e), N.info("MarkedPendingHeatmapsReady")), e.length;
|
|
7753
7758
|
}, "Error marking pending heatmaps ready"), clearUserReplayData: sd, disableRecording: br, initializeReplay: async ({ maxReplayDurationSeconds: e, maxInflightRequests: t = 2, replaySettings: r, teardownAfter: s = !1, apiUrl: n, alwaysOnConfig: i }) => {
|
|
7754
7759
|
if (i && Ag({ apiUrl: n, config: i, triggerSnapshot: () => {
|
|
7755
7760
|
Ei();
|
|
7756
|
-
} }),
|
|
7757
|
-
if (s && Q.setItem("sprig.teardownAfterCapture", "true"),
|
|
7761
|
+
} }), ct = Q.getItem("sprig.pendingCount"), pe.isRecording) return;
|
|
7762
|
+
if (s && Q.setItem("sprig.teardownAfterCapture", "true"), He()) return N.debug("ReplayDisabled");
|
|
7758
7763
|
if (await (async () => {
|
|
7759
7764
|
var l;
|
|
7760
7765
|
if (!zu()) return !0;
|
|
@@ -7767,68 +7772,68 @@ const Oi = async (e = !1) => {
|
|
|
7767
7772
|
return !1;
|
|
7768
7773
|
})()) return N.debug("IDBNotSupported"), ki();
|
|
7769
7774
|
try {
|
|
7770
|
-
const l = await
|
|
7775
|
+
const l = await se.openDB();
|
|
7771
7776
|
N.info("DBVersion", { version: l.version });
|
|
7772
7777
|
} catch (l) {
|
|
7773
|
-
return N.error("ReplayOpenErr", { name: l.name }), l.name === "VersionError" &&
|
|
7778
|
+
return N.error("ReplayOpenErr", { name: l.name }), l.name === "VersionError" && se.deleteDB(), ki();
|
|
7774
7779
|
}
|
|
7775
|
-
|
|
7780
|
+
Ee(async () => {
|
|
7776
7781
|
await Oi(!0);
|
|
7777
7782
|
}, "Error uploading ready pending captures");
|
|
7778
7783
|
const a = Pt() ? 30 : 0, o = Math.max(e ?? 0, a);
|
|
7779
7784
|
if (!o) return N.debug("MissingDuration");
|
|
7780
|
-
N.debug("ReplayInit"), await
|
|
7785
|
+
N.debug("ReplayInit"), await Ee(async () => {
|
|
7781
7786
|
var l;
|
|
7782
|
-
r != null && r.minDuration && (Qu = r.minDuration), r != null && r.batchDuration && (xi = r.batchDuration), l = t, Au.setLimit(l),
|
|
7787
|
+
r != null && r.minDuration && (Qu = r.minDuration), r != null && r.batchDuration && (xi = r.batchDuration), l = t, Au.setLimit(l), Hg(), jg(o + 35, 1800, o + 35), Wg();
|
|
7783
7788
|
const c = window.UserLeap.replayLibraryURL ?? "https://cdn.sprig.com/dependencies/record.min.js", u = window.rrwebRecord;
|
|
7784
7789
|
if (!u) return N.error("RecordScriptFailed");
|
|
7785
7790
|
let d = !0, h = 0;
|
|
7786
7791
|
const f = { checkoutEveryNms: 3e4, sampling: { input: "last", scroll: 250, media: 800 }, ...r, mutationQueueEnabled: r == null ? void 0 : r.enableMutationQueue };
|
|
7787
|
-
var
|
|
7788
|
-
pe.stopRecording = u({ emit: (
|
|
7789
|
-
if (
|
|
7790
|
-
if (m &&
|
|
7791
|
-
else if (m && h &&
|
|
7792
|
+
var w, p;
|
|
7793
|
+
pe.stopRecording = u({ emit: (C, m) => {
|
|
7794
|
+
if (C.type === at.Custom && (Ti = Date.now()), He() || As()) return;
|
|
7795
|
+
if (m && C.type === at.Meta) h = performance.now();
|
|
7796
|
+
else if (m && h && C.type === at.FullSnapshot) {
|
|
7792
7797
|
const v = performance.now() - h;
|
|
7793
7798
|
bu("sdk_replay_snapshot_seconds", v / 1e3);
|
|
7794
7799
|
}
|
|
7795
|
-
const g = d || !!m &&
|
|
7796
|
-
d = !1, Fg(g,
|
|
7797
|
-
}, ...f }), pe.isRecording = !!pe.stopRecording, pe.isRecording && (((
|
|
7800
|
+
const g = d || !!m && C.type === at.Meta;
|
|
7801
|
+
d = !1, Fg(g, C), Bg({ uuid: Ut(), event: JSON.stringify(C), isValidStart: g, timestamp: Date.now() });
|
|
7802
|
+
}, ...f }), pe.isRecording = !!pe.stopRecording, pe.isRecording && (((C, m) => {
|
|
7798
7803
|
window.addEventListener("message", (g) => {
|
|
7799
7804
|
var v;
|
|
7800
|
-
g.data.type === yg && (oo.push({ source: g.source, origin: g.origin }), (v = g.source) == null || v.postMessage({ type: wg, settings:
|
|
7805
|
+
g.data.type === yg && (oo.push({ source: g.source, origin: g.origin }), (v = g.source) == null || v.postMessage({ type: wg, settings: C, replayLibraryUrl: m }, { targetOrigin: g.origin }));
|
|
7801
7806
|
});
|
|
7802
|
-
})(f, c), z.on("survey.complete", (
|
|
7807
|
+
})(f, c), z.on("survey.complete", (C) => {
|
|
7803
7808
|
var m;
|
|
7804
|
-
m = { id:
|
|
7805
|
-
}),
|
|
7809
|
+
m = { id: C, userAgent: window.navigator.userAgent }, Ye("Sprig_SubmitSurvey", m);
|
|
7810
|
+
}), w = Ye, p = Rg, Os || (xe = w, ds = p, window.addEventListener("click", Nu, We), window.addEventListener("pointerdown", Bu, We), window.addEventListener("mousedown", Fu, We), window.addEventListener("keydown", Pu, We), window.addEventListener("scroll", _u, We), Os = !0, xg(), Tg()));
|
|
7806
7811
|
}, "Error initializing replay");
|
|
7807
7812
|
}, isReplayPaused: As, isReplayRecording: () => pe.isRecording, recordFullSnapshot: Ei, recordReplayPaused: () => {
|
|
7808
|
-
|
|
7813
|
+
Ye("Sprig_ReplayPaused", { timestamp: Date.now() }), Q.setItem("sprig.isReplayPaused", "true");
|
|
7809
7814
|
}, recordReplayResumed: () => {
|
|
7810
|
-
Q.removeItem("sprig.isReplayPaused"),
|
|
7811
|
-
}, scheduleCapture: nd, scheduleOrCaptureReplay: rd, tryReplayAction:
|
|
7815
|
+
Q.removeItem("sprig.isReplayPaused"), Ye("Sprig_ReplayResumed", { timestamp: Date.now() });
|
|
7816
|
+
}, scheduleCapture: nd, scheduleOrCaptureReplay: rd, tryReplayAction: Ee, uploadReadyPendingCaptures: Oi }, Symbol.toStringTag, { value: "Module" }));
|
|
7812
7817
|
((e) => {
|
|
7813
|
-
|
|
7814
|
-
})(Yg), window.UpChunk = { createUpload:
|
|
7818
|
+
re.replay = e;
|
|
7819
|
+
})(Yg), window.UpChunk = { createUpload: Hd }, window.rrwebRecord = qt;
|
|
7815
7820
|
export {
|
|
7816
7821
|
Kg as A,
|
|
7817
7822
|
Af as C,
|
|
7818
7823
|
Jg as D,
|
|
7819
7824
|
Xg as E,
|
|
7820
7825
|
B as S,
|
|
7821
|
-
|
|
7826
|
+
Xe as a,
|
|
7822
7827
|
N as b,
|
|
7823
|
-
|
|
7824
|
-
|
|
7828
|
+
Hf as c,
|
|
7829
|
+
Be as d,
|
|
7825
7830
|
z as e,
|
|
7826
7831
|
Ss as f,
|
|
7827
7832
|
ey as g,
|
|
7828
7833
|
Zg as h,
|
|
7829
7834
|
ty as i,
|
|
7830
7835
|
to as j,
|
|
7831
|
-
|
|
7836
|
+
st as k,
|
|
7832
7837
|
Ig as l,
|
|
7833
7838
|
Qg as m,
|
|
7834
7839
|
ny as n,
|