@spectosh/browser 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/point-4P-cvF8S.cjs +252 -0
- package/dist/{point-B777VT29.js → point-B5SXBYaU.js} +356 -349
- package/dist/react.cjs +1 -1
- package/dist/react.js +1 -1
- package/dist/specto-browser.cjs +1 -1
- package/dist/specto-browser.js +1 -1
- package/dist/{src-BfP2ol_O.cjs → src-BDf8wYoH.cjs} +5 -5
- package/dist/{src-oKUp2jmR.js → src-mrKmVGmE.js} +276 -265
- package/package.json +1 -1
- package/src/point/describe.js +15 -12
- package/src/point/index.js +3 -2
- package/src/recorder.js +14 -5
- package/src/scrub.js +13 -0
- package/types/index.d.ts +2 -0
- package/dist/point-rS_lg9Ro.cjs +0 -252
|
@@ -113,12 +113,12 @@ function te(e, t) {
|
|
|
113
113
|
function A(e, t) {
|
|
114
114
|
return m("Element", e, "querySelectorAll")(t);
|
|
115
115
|
}
|
|
116
|
-
function
|
|
116
|
+
function j() {
|
|
117
117
|
return [f("MutationObserver").constructor, u.MutationObserver ?? (() => {})];
|
|
118
118
|
}
|
|
119
|
-
var
|
|
120
|
-
/* @__PURE__ */ /[1-9][0-9]{12}/.test(Date.now().toString()) || (
|
|
121
|
-
function
|
|
119
|
+
var ne = Date.now;
|
|
120
|
+
/* @__PURE__ */ /[1-9][0-9]{12}/.test(Date.now().toString()) || (ne = () => (/* @__PURE__ */ new Date()).getTime());
|
|
121
|
+
function re(e, t, n) {
|
|
122
122
|
try {
|
|
123
123
|
if (!(t in e)) return () => {};
|
|
124
124
|
let r = e[t], i = n(r);
|
|
@@ -132,7 +132,7 @@ function ie(e, t, n) {
|
|
|
132
132
|
return () => {};
|
|
133
133
|
}
|
|
134
134
|
}
|
|
135
|
-
var
|
|
135
|
+
var M = {
|
|
136
136
|
ownerDocument: _,
|
|
137
137
|
childNodes: v,
|
|
138
138
|
parentNode: y,
|
|
@@ -149,44 +149,44 @@ var j = {
|
|
|
149
149
|
shadowRoot: k,
|
|
150
150
|
querySelector: te,
|
|
151
151
|
querySelectorAll: A,
|
|
152
|
-
nowTimestamp:
|
|
153
|
-
mutationObserverCtor:
|
|
154
|
-
patch:
|
|
152
|
+
nowTimestamp: ne,
|
|
153
|
+
mutationObserverCtor: j,
|
|
154
|
+
patch: re
|
|
155
155
|
};
|
|
156
|
-
function
|
|
156
|
+
function ie(e) {
|
|
157
157
|
return e.nodeType === e.ELEMENT_NODE;
|
|
158
158
|
}
|
|
159
|
-
function
|
|
160
|
-
let t = e && "host" in e && "mode" in e &&
|
|
161
|
-
return !!(t && "shadowRoot" in t &&
|
|
159
|
+
function ae(e) {
|
|
160
|
+
let t = e && "host" in e && "mode" in e && M.host(e) || null;
|
|
161
|
+
return !!(t && "shadowRoot" in t && M.shadowRoot(t) === e);
|
|
162
162
|
}
|
|
163
|
-
function
|
|
163
|
+
function N(e) {
|
|
164
164
|
return Object.prototype.toString.call(e) === "[object ShadowRoot]";
|
|
165
165
|
}
|
|
166
|
-
function
|
|
166
|
+
function oe(e) {
|
|
167
167
|
return e.includes(" background-clip: text;") && !e.includes(" -webkit-background-clip: text;") && (e = e.replace(/\sbackground-clip:\s*text;/g, " -webkit-background-clip: text; background-clip: text;")), e;
|
|
168
168
|
}
|
|
169
|
-
function
|
|
169
|
+
function se(e) {
|
|
170
170
|
let { cssText: t } = e;
|
|
171
171
|
if (t.split("\"").length < 3) return t;
|
|
172
172
|
let n = ["@import", `url(${JSON.stringify(e.href)})`];
|
|
173
173
|
return e.layerName === "" ? n.push("layer") : e.layerName && n.push(`layer(${e.layerName})`), e.supportsText && n.push(`supports(${e.supportsText})`), e.media.length && n.push(e.media.mediaText), n.join(" ") + ";";
|
|
174
174
|
}
|
|
175
|
-
function
|
|
175
|
+
function P(e) {
|
|
176
176
|
try {
|
|
177
177
|
let t = e.rules || e.cssRules;
|
|
178
178
|
if (!t) return null;
|
|
179
179
|
let n = e.href;
|
|
180
|
-
return !n && e.ownerNode && (n = e.ownerNode.baseURI),
|
|
180
|
+
return !n && e.ownerNode && (n = e.ownerNode.baseURI), oe(Array.from(t, (e) => ce(e, n)).join(""));
|
|
181
181
|
} catch {
|
|
182
182
|
return null;
|
|
183
183
|
}
|
|
184
184
|
}
|
|
185
|
-
function
|
|
185
|
+
function ce(e, t) {
|
|
186
186
|
if (ue(e)) {
|
|
187
187
|
let t;
|
|
188
188
|
try {
|
|
189
|
-
t =
|
|
189
|
+
t = P(e.styleSheet) || se(e);
|
|
190
190
|
} catch {
|
|
191
191
|
t = e.cssText;
|
|
192
192
|
}
|
|
@@ -429,19 +429,19 @@ function qe(e, t, n) {
|
|
|
429
429
|
}
|
|
430
430
|
function Je(e, t, n) {
|
|
431
431
|
if (!e) return !1;
|
|
432
|
-
if (e.nodeType !== e.ELEMENT_NODE) return n ? Je(
|
|
432
|
+
if (e.nodeType !== e.ELEMENT_NODE) return n ? Je(M.parentNode(e), t, n) : !1;
|
|
433
433
|
for (let n = e.classList.length; n--;) {
|
|
434
434
|
let r = e.classList[n];
|
|
435
435
|
if (t.test(r)) return !0;
|
|
436
436
|
}
|
|
437
|
-
return n ? Je(
|
|
437
|
+
return n ? Je(M.parentNode(e), t, n) : !1;
|
|
438
438
|
}
|
|
439
439
|
function Ye(e, t, n, r) {
|
|
440
440
|
let i;
|
|
441
|
-
if (
|
|
442
|
-
if (i = e, !
|
|
443
|
-
} else if (
|
|
444
|
-
else i =
|
|
441
|
+
if (ie(e)) {
|
|
442
|
+
if (i = e, !M.childNodes(i).length) return !1;
|
|
443
|
+
} else if (M.parentElement(e) === null) return !1;
|
|
444
|
+
else i = M.parentElement(e);
|
|
445
445
|
try {
|
|
446
446
|
if (typeof t == "string") {
|
|
447
447
|
if (r) {
|
|
@@ -539,7 +539,7 @@ function Qe(e, t) {
|
|
|
539
539
|
};
|
|
540
540
|
case e.COMMENT_NODE: return {
|
|
541
541
|
type: o.Comment,
|
|
542
|
-
textContent:
|
|
542
|
+
textContent: M.textContent(e) || "",
|
|
543
543
|
rootId: v
|
|
544
544
|
};
|
|
545
545
|
default: return !1;
|
|
@@ -551,8 +551,8 @@ function $e(e, t) {
|
|
|
551
551
|
return n === 1 ? void 0 : n;
|
|
552
552
|
}
|
|
553
553
|
function et(e, t) {
|
|
554
|
-
let { needsMask: n, maskTextFn: r, rootId: i, cssCaptured: a } = t, s =
|
|
555
|
-
return d ? l = "SCRIPT_PLACEHOLDER" : a || (l =
|
|
554
|
+
let { needsMask: n, maskTextFn: r, rootId: i, cssCaptured: a } = t, s = M.parentNode(e), c = s && s.tagName, l = "", u = c === "STYLE" || void 0, d = c === "SCRIPT" || void 0;
|
|
555
|
+
return d ? l = "SCRIPT_PLACEHOLDER" : a || (l = M.textContent(e), u && l && (l = we(l, We(t.doc)))), !u && !d && l && n && (l = r ? r(l, M.parentElement(e)) : l.replace(/[\S]/g, "*")), {
|
|
556
556
|
type: o.Text,
|
|
557
557
|
textContent: l || "",
|
|
558
558
|
rootId: i
|
|
@@ -566,10 +566,10 @@ function tt(e, t) {
|
|
|
566
566
|
}
|
|
567
567
|
if (g === "link" && a) {
|
|
568
568
|
let t = Array.from(n.styleSheets).find((t) => t.href === e.href), r = null;
|
|
569
|
-
t && (r =
|
|
569
|
+
t && (r = P(t)), r && (delete _.rel, delete _.href, _._cssText = r);
|
|
570
570
|
}
|
|
571
571
|
if (g === "style" && e.sheet) {
|
|
572
|
-
let t =
|
|
572
|
+
let t = P(e.sheet);
|
|
573
573
|
t && (e.childNodes.length > 1 && (t = Ae(t, e)), _._cssText = t);
|
|
574
574
|
}
|
|
575
575
|
if ([
|
|
@@ -689,8 +689,8 @@ function it(e, t) {
|
|
|
689
689
|
let te = !l;
|
|
690
690
|
if (k.type === o.Element) {
|
|
691
691
|
te &&= !k.needBlock, delete k.needBlock;
|
|
692
|
-
let t =
|
|
693
|
-
t &&
|
|
692
|
+
let t = M.shadowRoot(e);
|
|
693
|
+
t && N(t) && (k.isShadowHost = !0);
|
|
694
694
|
}
|
|
695
695
|
if ((k.type === o.Document || k.type === o.Element) && te) {
|
|
696
696
|
m.headWhitespace && k.type === o.Element && k.tagName === "head" && (D = !1);
|
|
@@ -722,19 +722,19 @@ function it(e, t) {
|
|
|
722
722
|
};
|
|
723
723
|
if (k.type !== o.Element || k.tagName !== "textarea" || k.attributes.value === void 0) {
|
|
724
724
|
k.type === o.Element && k.attributes._cssText !== void 0 && typeof k.attributes._cssText == "string" && (t.cssCaptured = !0);
|
|
725
|
-
for (let n of Array.from(
|
|
725
|
+
for (let n of Array.from(M.childNodes(e))) {
|
|
726
726
|
let e = it(n, t);
|
|
727
727
|
e && k.childNodes.push(e);
|
|
728
728
|
}
|
|
729
729
|
}
|
|
730
730
|
let w = null;
|
|
731
|
-
if (
|
|
731
|
+
if (ie(e) && (w = M.shadowRoot(e))) for (let e of Array.from(M.childNodes(w))) {
|
|
732
732
|
let n = it(e, t);
|
|
733
|
-
n && (
|
|
733
|
+
n && (N(w) && (n.isShadow = !0), k.childNodes.push(n));
|
|
734
734
|
}
|
|
735
735
|
}
|
|
736
|
-
let A =
|
|
737
|
-
return A &&
|
|
736
|
+
let A = M.parentNode(e);
|
|
737
|
+
return A && ae(A) && N(A) && (k.isShadow = !0), k.type === o.Element && k.tagName === "iframe" && Xe(e, () => {
|
|
738
738
|
let t = e.contentDocument;
|
|
739
739
|
if (t && y) {
|
|
740
740
|
let n = it(t, {
|
|
@@ -5406,7 +5406,7 @@ function la(e, t, n) {
|
|
|
5406
5406
|
return e.tagName === "TITLE" && n.headTitleMutations ? !0 : t.getId(e) === Ne;
|
|
5407
5407
|
}
|
|
5408
5408
|
function ua(e, t) {
|
|
5409
|
-
if (
|
|
5409
|
+
if (ae(e)) return !1;
|
|
5410
5410
|
let n = t.getId(e);
|
|
5411
5411
|
if (!t.has(n)) return !0;
|
|
5412
5412
|
let r = U.parentNode(e);
|
|
@@ -5492,7 +5492,7 @@ var K = /* @__PURE__ */ ((e) => (e[e.DomContentLoaded = 0] = "DomContentLoaded",
|
|
|
5492
5492
|
else if (r) {
|
|
5493
5493
|
if (ba(r) ? (o = ka(this.droppedSet, r) || this.removesSubTreeCache.has(r), o && ka(this.movedSet, n) && (o = !1)) : o = !0, this.addedSet.has(U.lastChild(r))) n = U.lastChild(r), a = null;
|
|
5494
5494
|
else for (; a = U.nextSibling(n), this.addedSet.has(a);) n = a;
|
|
5495
|
-
if (i =
|
|
5495
|
+
if (i = ae(r) ? this.mirror.getId(_a(n)) : this.mirror.getId(r), i === -1 && r.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {
|
|
5496
5496
|
let e = U.host(r);
|
|
5497
5497
|
i = this.mirror.getId(e);
|
|
5498
5498
|
}
|
|
@@ -5651,11 +5651,11 @@ var K = /* @__PURE__ */ ((e) => (e[e.DomContentLoaded = 0] = "DomContentLoaded",
|
|
|
5651
5651
|
return;
|
|
5652
5652
|
}
|
|
5653
5653
|
e.addedNodes.forEach((t) => this.genAdds(t, e.target)), e.removedNodes.forEach((t) => {
|
|
5654
|
-
let n = this.mirror.getId(t), r =
|
|
5654
|
+
let n = this.mirror.getId(t), r = ae(e.target) ? this.mirror.getId(U.host(e.target)) : this.mirror.getId(e.target);
|
|
5655
5655
|
G(e.target, this.blockClass, this.blockSelector, !1) || la(t, this.mirror, this.slimDOMOptions) || !ca(t, this.mirror) || (this.addedSet.has(t) ? (Da(this.addedSet, t), this.droppedSet.add(t)) : this.addedSet.has(e.target) && n === -1 || ua(e.target, this.mirror) || (this.movedSet.has(t) && this.movedMap[Ta(n, r)] ? Da(this.movedSet, t) : (this.removes.push({
|
|
5656
5656
|
parentId: r,
|
|
5657
5657
|
id: n,
|
|
5658
|
-
isShadow:
|
|
5658
|
+
isShadow: ae(e.target) && N(e.target) ? !0 : void 0
|
|
5659
5659
|
}), Oa(t, this.removesSubTreeCache))), this.mapRemoves.push(t));
|
|
5660
5660
|
});
|
|
5661
5661
|
}
|
|
@@ -6405,7 +6405,7 @@ for (var ro = class {
|
|
|
6405
6405
|
this.reset(), this.patchAttachShadow(Element, document);
|
|
6406
6406
|
}
|
|
6407
6407
|
addShadowRoot(e, t) {
|
|
6408
|
-
if (!
|
|
6408
|
+
if (!N(e) || this.shadowDoms.has(e)) return;
|
|
6409
6409
|
this.shadowDoms.add(e);
|
|
6410
6410
|
let [n] = Ia({
|
|
6411
6411
|
...this.bypassOptions,
|
|
@@ -6787,7 +6787,7 @@ var To = class {
|
|
|
6787
6787
|
this.styleMirror.has(t) ? e = this.styleMirror.getId(t) : (e = this.styleMirror.add(t), r.push({
|
|
6788
6788
|
styleId: e,
|
|
6789
6789
|
rules: Array.from(t.rules || CSSRule, (e, n) => ({
|
|
6790
|
-
rule:
|
|
6790
|
+
rule: ce(e, t.href),
|
|
6791
6791
|
index: n
|
|
6792
6792
|
}))
|
|
6793
6793
|
})), n.styleIds.push(e);
|
|
@@ -6825,16 +6825,16 @@ var Z = F();
|
|
|
6825
6825
|
function jo(e = {}) {
|
|
6826
6826
|
let { emit: t, checkoutEveryNms: n, checkoutEveryNth: r, blockClass: i = "rr-block", blockSelector: a = null, ignoreClass: o = "rr-ignore", ignoreSelector: s = null, maskTextClass: c = "rr-mask", maskTextSelector: l = null, inlineStylesheet: u = !0, maskAllInputs: d, maskInputOptions: f, slimDOMOptions: p, maskInputFn: m, maskTextFn: h, hooks: g, packFn: _, sampling: v = {}, dataURLOptions: y = {}, mousemoveWait: b, recordDOM: x = !0, recordCanvas: S = !1, recordCrossOriginIframes: C = !1, recordAfter: w = e.recordAfter === "DOMContentLoaded" ? e.recordAfter : "load", userTriggeredOnInput: T = !1, collectFonts: E = !1, inlineImages: D = !1, plugins: O, keepIframeSrcFn: ee = () => !1, ignoreCSSAttributes: k = /* @__PURE__ */ new Set([]), errorHandler: te } = e;
|
|
6827
6827
|
Ma(te);
|
|
6828
|
-
let A = !C || window.parent === window,
|
|
6828
|
+
let A = !C || window.parent === window, j = !1;
|
|
6829
6829
|
if (!A) try {
|
|
6830
|
-
window.parent.document && (
|
|
6830
|
+
window.parent.document && (j = !1);
|
|
6831
6831
|
} catch {
|
|
6832
|
-
|
|
6832
|
+
j = !0;
|
|
6833
6833
|
}
|
|
6834
6834
|
if (A && !t) throw Error("emit function is required");
|
|
6835
|
-
if (!A && !
|
|
6835
|
+
if (!A && !j) return () => {};
|
|
6836
6836
|
b !== void 0 && v.mousemove === void 0 && (v.mousemove = b), Z.reset();
|
|
6837
|
-
let
|
|
6837
|
+
let ne = d === !0 ? {
|
|
6838
6838
|
color: !0,
|
|
6839
6839
|
date: !0,
|
|
6840
6840
|
"datetime-local": !0,
|
|
@@ -6851,33 +6851,33 @@ function jo(e = {}) {
|
|
|
6851
6851
|
textarea: !0,
|
|
6852
6852
|
select: !0,
|
|
6853
6853
|
password: !0
|
|
6854
|
-
} : f === void 0 ? { password: !0 } : f,
|
|
6854
|
+
} : f === void 0 ? { password: !0 } : f, re = nt(p);
|
|
6855
6855
|
fa();
|
|
6856
|
-
let
|
|
6856
|
+
let M, ie = 0, ae = (e) => {
|
|
6857
6857
|
for (let t of O || []) t.eventProcessor && (e = t.eventProcessor(e));
|
|
6858
|
-
return _ && !
|
|
6858
|
+
return _ && !j && (e = _(e)), e;
|
|
6859
6859
|
};
|
|
6860
6860
|
X = (e, i) => {
|
|
6861
6861
|
let a = e;
|
|
6862
|
-
if (a.timestamp = Qi(), Pa[0]?.isFrozen() && a.type !== K.FullSnapshot && (a.type !== K.IncrementalSnapshot || a.data.source !== q.Mutation) && Pa.forEach((e) => e.unfreeze()), A) t?.(
|
|
6863
|
-
else if (
|
|
6862
|
+
if (a.timestamp = Qi(), Pa[0]?.isFrozen() && a.type !== K.FullSnapshot && (a.type !== K.IncrementalSnapshot || a.data.source !== q.Mutation) && Pa.forEach((e) => e.unfreeze()), A) t?.(ae(a), i);
|
|
6863
|
+
else if (j) {
|
|
6864
6864
|
let e = {
|
|
6865
6865
|
type: "rrweb",
|
|
6866
|
-
event:
|
|
6866
|
+
event: ae(a),
|
|
6867
6867
|
origin: window.location.origin,
|
|
6868
6868
|
isCheckout: i
|
|
6869
6869
|
};
|
|
6870
6870
|
window.parent.postMessage(e, "*");
|
|
6871
6871
|
}
|
|
6872
|
-
if (a.type === K.FullSnapshot)
|
|
6872
|
+
if (a.type === K.FullSnapshot) M = a, ie = 0;
|
|
6873
6873
|
else if (a.type === K.IncrementalSnapshot) {
|
|
6874
6874
|
if (a.data.source === q.Mutation && a.data.isAttachIframe) return;
|
|
6875
|
-
|
|
6876
|
-
let e = r &&
|
|
6875
|
+
ie++;
|
|
6876
|
+
let e = r && ie >= r, t = n && a.timestamp - M.timestamp > n;
|
|
6877
6877
|
(e || t) && Oo(!0);
|
|
6878
6878
|
}
|
|
6879
6879
|
};
|
|
6880
|
-
let
|
|
6880
|
+
let N = (e) => {
|
|
6881
6881
|
X({
|
|
6882
6882
|
type: K.IncrementalSnapshot,
|
|
6883
6883
|
data: {
|
|
@@ -6885,20 +6885,20 @@ function jo(e = {}) {
|
|
|
6885
6885
|
...e
|
|
6886
6886
|
}
|
|
6887
6887
|
});
|
|
6888
|
-
},
|
|
6888
|
+
}, oe = (e) => X({
|
|
6889
6889
|
type: K.IncrementalSnapshot,
|
|
6890
6890
|
data: {
|
|
6891
6891
|
source: q.Scroll,
|
|
6892
6892
|
...e
|
|
6893
6893
|
}
|
|
6894
|
-
}),
|
|
6894
|
+
}), se = (e) => X({
|
|
6895
6895
|
type: K.IncrementalSnapshot,
|
|
6896
6896
|
data: {
|
|
6897
6897
|
source: q.CanvasMutation,
|
|
6898
6898
|
...e
|
|
6899
6899
|
}
|
|
6900
|
-
}),
|
|
6901
|
-
mutationCb:
|
|
6900
|
+
}), P = new Eo({
|
|
6901
|
+
mutationCb: N,
|
|
6902
6902
|
adoptedStyleSheetCb: (e) => X({
|
|
6903
6903
|
type: K.IncrementalSnapshot,
|
|
6904
6904
|
data: {
|
|
@@ -6906,22 +6906,22 @@ function jo(e = {}) {
|
|
|
6906
6906
|
...e
|
|
6907
6907
|
}
|
|
6908
6908
|
})
|
|
6909
|
-
}),
|
|
6909
|
+
}), ce = new io({
|
|
6910
6910
|
mirror: Z,
|
|
6911
|
-
mutationCb:
|
|
6912
|
-
stylesheetManager:
|
|
6911
|
+
mutationCb: N,
|
|
6912
|
+
stylesheetManager: P,
|
|
6913
6913
|
recordCrossOriginIframes: C,
|
|
6914
6914
|
wrappedEmit: X
|
|
6915
6915
|
});
|
|
6916
6916
|
for (let e of O || []) e.getMirror && e.getMirror({
|
|
6917
6917
|
nodeMirror: Z,
|
|
6918
|
-
crossOriginIframeMirror:
|
|
6919
|
-
crossOriginIframeStyleMirror:
|
|
6918
|
+
crossOriginIframeMirror: ce.crossOriginIframeMirror,
|
|
6919
|
+
crossOriginIframeStyleMirror: ce.crossOriginIframeStyleMirror
|
|
6920
6920
|
});
|
|
6921
6921
|
let le = new Do();
|
|
6922
6922
|
ko = new To({
|
|
6923
6923
|
recordCanvas: S,
|
|
6924
|
-
mutationCb:
|
|
6924
|
+
mutationCb: se,
|
|
6925
6925
|
win: window,
|
|
6926
6926
|
blockClass: i,
|
|
6927
6927
|
blockSelector: a,
|
|
@@ -6930,24 +6930,24 @@ function jo(e = {}) {
|
|
|
6930
6930
|
dataURLOptions: y
|
|
6931
6931
|
});
|
|
6932
6932
|
let ue = new ao({
|
|
6933
|
-
mutationCb:
|
|
6934
|
-
scrollCb:
|
|
6933
|
+
mutationCb: N,
|
|
6934
|
+
scrollCb: oe,
|
|
6935
6935
|
bypassOptions: {
|
|
6936
6936
|
blockClass: i,
|
|
6937
6937
|
blockSelector: a,
|
|
6938
6938
|
maskTextClass: c,
|
|
6939
6939
|
maskTextSelector: l,
|
|
6940
6940
|
inlineStylesheet: u,
|
|
6941
|
-
maskInputOptions:
|
|
6941
|
+
maskInputOptions: ne,
|
|
6942
6942
|
dataURLOptions: y,
|
|
6943
6943
|
maskTextFn: h,
|
|
6944
6944
|
maskInputFn: m,
|
|
6945
6945
|
recordCanvas: S,
|
|
6946
6946
|
inlineImages: D,
|
|
6947
6947
|
sampling: v,
|
|
6948
|
-
slimDOMOptions:
|
|
6949
|
-
iframeManager:
|
|
6950
|
-
stylesheetManager:
|
|
6948
|
+
slimDOMOptions: re,
|
|
6949
|
+
iframeManager: ce,
|
|
6950
|
+
stylesheetManager: P,
|
|
6951
6951
|
canvasManager: ko,
|
|
6952
6952
|
keepIframeSrcFn: ee,
|
|
6953
6953
|
processedNodeManager: le
|
|
@@ -6963,7 +6963,7 @@ function jo(e = {}) {
|
|
|
6963
6963
|
width: oa(),
|
|
6964
6964
|
height: aa()
|
|
6965
6965
|
}
|
|
6966
|
-
}, e),
|
|
6966
|
+
}, e), P.reset(), ue.init(), Pa.forEach((e) => e.lock());
|
|
6967
6967
|
let t = at(document, {
|
|
6968
6968
|
mirror: Z,
|
|
6969
6969
|
blockClass: i,
|
|
@@ -6971,21 +6971,21 @@ function jo(e = {}) {
|
|
|
6971
6971
|
maskTextClass: c,
|
|
6972
6972
|
maskTextSelector: l,
|
|
6973
6973
|
inlineStylesheet: u,
|
|
6974
|
-
maskAllInputs:
|
|
6974
|
+
maskAllInputs: ne,
|
|
6975
6975
|
maskTextFn: h,
|
|
6976
6976
|
maskInputFn: m,
|
|
6977
|
-
slimDOM:
|
|
6977
|
+
slimDOM: re,
|
|
6978
6978
|
dataURLOptions: y,
|
|
6979
6979
|
recordCanvas: S,
|
|
6980
6980
|
inlineImages: D,
|
|
6981
6981
|
onSerialize: (e) => {
|
|
6982
|
-
pa(e, Z) &&
|
|
6982
|
+
pa(e, Z) && ce.addIframe(e), ma(e, Z) && P.trackLinkElement(e), ha(e) && ue.addShadowRoot(U.shadowRoot(e), document);
|
|
6983
6983
|
},
|
|
6984
6984
|
onIframeLoad: (e, t) => {
|
|
6985
|
-
|
|
6985
|
+
ce.attachIframe(e, t), ue.observeAttachShadow(e);
|
|
6986
6986
|
},
|
|
6987
6987
|
onStylesheetLoad: (e, t) => {
|
|
6988
|
-
|
|
6988
|
+
P.attachLinkElement(e, t);
|
|
6989
6989
|
},
|
|
6990
6990
|
keepIframeSrcFn: ee
|
|
6991
6991
|
});
|
|
@@ -6996,11 +6996,11 @@ function jo(e = {}) {
|
|
|
6996
6996
|
node: t,
|
|
6997
6997
|
initialOffset: ia(window)
|
|
6998
6998
|
}
|
|
6999
|
-
}, e), Pa.forEach((e) => e.unlock()), document.adoptedStyleSheets && document.adoptedStyleSheets.length > 0 &&
|
|
6999
|
+
}, e), Pa.forEach((e) => e.unlock()), document.adoptedStyleSheets && document.adoptedStyleSheets.length > 0 && P.adoptStyleSheets(document.adoptedStyleSheets, Z.getId(document));
|
|
7000
7000
|
};
|
|
7001
7001
|
try {
|
|
7002
7002
|
let e = [], t = (e) => Y(eo)({
|
|
7003
|
-
mutationCb:
|
|
7003
|
+
mutationCb: N,
|
|
7004
7004
|
mousemoveCb: (e, t) => X({
|
|
7005
7005
|
type: K.IncrementalSnapshot,
|
|
7006
7006
|
data: {
|
|
@@ -7015,7 +7015,7 @@ function jo(e = {}) {
|
|
|
7015
7015
|
...e
|
|
7016
7016
|
}
|
|
7017
7017
|
}),
|
|
7018
|
-
scrollCb:
|
|
7018
|
+
scrollCb: oe,
|
|
7019
7019
|
viewportResizeCb: (e) => X({
|
|
7020
7020
|
type: K.IncrementalSnapshot,
|
|
7021
7021
|
data: {
|
|
@@ -7051,7 +7051,7 @@ function jo(e = {}) {
|
|
|
7051
7051
|
...e
|
|
7052
7052
|
}
|
|
7053
7053
|
}),
|
|
7054
|
-
canvasMutationCb:
|
|
7054
|
+
canvasMutationCb: se,
|
|
7055
7055
|
fontCb: (e) => X({
|
|
7056
7056
|
type: K.IncrementalSnapshot,
|
|
7057
7057
|
data: {
|
|
@@ -7082,7 +7082,7 @@ function jo(e = {}) {
|
|
|
7082
7082
|
ignoreSelector: s,
|
|
7083
7083
|
maskTextClass: c,
|
|
7084
7084
|
maskTextSelector: l,
|
|
7085
|
-
maskInputOptions:
|
|
7085
|
+
maskInputOptions: ne,
|
|
7086
7086
|
inlineStylesheet: u,
|
|
7087
7087
|
sampling: v,
|
|
7088
7088
|
recordDOM: x,
|
|
@@ -7095,11 +7095,11 @@ function jo(e = {}) {
|
|
|
7095
7095
|
maskTextFn: h,
|
|
7096
7096
|
keepIframeSrcFn: ee,
|
|
7097
7097
|
blockSelector: a,
|
|
7098
|
-
slimDOMOptions:
|
|
7098
|
+
slimDOMOptions: re,
|
|
7099
7099
|
dataURLOptions: y,
|
|
7100
7100
|
mirror: Z,
|
|
7101
|
-
iframeManager:
|
|
7102
|
-
stylesheetManager:
|
|
7101
|
+
iframeManager: ce,
|
|
7102
|
+
stylesheetManager: P,
|
|
7103
7103
|
shadowDomManager: ue,
|
|
7104
7104
|
processedNodeManager: le,
|
|
7105
7105
|
canvasManager: ko,
|
|
@@ -7116,7 +7116,7 @@ function jo(e = {}) {
|
|
|
7116
7116
|
})
|
|
7117
7117
|
})) || []
|
|
7118
7118
|
}, g);
|
|
7119
|
-
|
|
7119
|
+
ce.addLoadListener((n) => {
|
|
7120
7120
|
try {
|
|
7121
7121
|
e.push(t(n.contentDocument));
|
|
7122
7122
|
} catch (e) {
|
|
@@ -7320,48 +7320,55 @@ function Q(e) {
|
|
|
7320
7320
|
for (let [e, n] of Ko) t = t.replace(e, n);
|
|
7321
7321
|
return t;
|
|
7322
7322
|
}
|
|
7323
|
+
function qo(e, t) {
|
|
7324
|
+
try {
|
|
7325
|
+
return !e || !e.closest || e.closest(".specto-mask,.specto-block") ? !1 : !!(e.closest(".specto-unmask,[data-specto-unmask]") || t && e.closest(t));
|
|
7326
|
+
} catch {
|
|
7327
|
+
return !1;
|
|
7328
|
+
}
|
|
7329
|
+
}
|
|
7323
7330
|
//#endregion
|
|
7324
7331
|
//#region src/recorder.js
|
|
7325
|
-
var
|
|
7326
|
-
function Yo(e) {
|
|
7327
|
-
if (e && typeof e == "object") for (let t of Object.keys(e)) Jo(t) && typeof e[t] == "string" && e[t] && (e[t] = "***");
|
|
7328
|
-
}
|
|
7332
|
+
var Jo = "0.3.1", Yo = (e) => (e = e.toLowerCase(), e.startsWith("data-") || e === "title" || e === "alt" || e === "placeholder" || e === "aria-label" || e === "value");
|
|
7329
7333
|
function Xo(e) {
|
|
7330
|
-
e && typeof e == "object"
|
|
7334
|
+
if (e && typeof e == "object") for (let t of Object.keys(e)) Yo(t) && typeof e[t] == "string" && e[t] && (e[t] = "***");
|
|
7335
|
+
}
|
|
7336
|
+
function Zo(e) {
|
|
7337
|
+
e && typeof e == "object" && (e.attributes && Xo(e.attributes), Array.isArray(e.childNodes) && e.childNodes.forEach(Zo));
|
|
7331
7338
|
}
|
|
7332
|
-
function
|
|
7339
|
+
function Qo(e, t) {
|
|
7333
7340
|
try {
|
|
7334
|
-
e.type === 4 && typeof e.data?.href == "string" ? e.data.href = $(e.data.href, t) : e.type === 2 && e.data?.node ?
|
|
7341
|
+
e.type === 4 && typeof e.data?.href == "string" ? e.data.href = $(e.data.href, t) : e.type === 2 && e.data?.node ? Zo(e.data.node) : e.type === 3 && e.data && (Array.isArray(e.data.adds) && e.data.adds.forEach((e) => Zo(e.node)), Array.isArray(e.data.attributes) && e.data.attributes.forEach((e) => Xo(e.attributes)));
|
|
7335
7342
|
} catch {}
|
|
7336
7343
|
return e;
|
|
7337
7344
|
}
|
|
7338
|
-
function
|
|
7345
|
+
function $o(e) {
|
|
7339
7346
|
return typeof e == "string" ? e : e && typeof e.href == "string" ? e.href : e && typeof e.url == "string" ? e.url : e == null ? "" : String(e);
|
|
7340
7347
|
}
|
|
7341
|
-
var
|
|
7348
|
+
var es = 600, ts = /(?:^|[-_.])(token|secret|password|passwd|auth|authorization|key|apikey|api[-_]?key|session|sid|code|signature|credential|email)s?$/i, ns = (e) => e.split(/[?&=]/)[0];
|
|
7342
7349
|
function $(e, t = !1) {
|
|
7343
7350
|
let n = String(e ?? "");
|
|
7344
7351
|
try {
|
|
7345
7352
|
let e = new URL(n, location.href), r = !1;
|
|
7346
|
-
(e.username || e.password) && (e.username = "", e.password = "", r = !0), t && (e.search ||
|
|
7347
|
-
for (let t of [...e.searchParams.keys()])
|
|
7353
|
+
(e.username || e.password) && (e.username = "", e.password = "", r = !0), t && (e.search || ns(e.hash) !== e.hash) && (e.search = "", e.hash = ns(e.hash), r = !0);
|
|
7354
|
+
for (let t of [...e.searchParams.keys()]) ts.test(t) && (e.searchParams.set(t, "***"), r = !0);
|
|
7348
7355
|
if (e.hash) {
|
|
7349
|
-
let t = e.hash.replace(/([?&#]|^)([^=&?#]+)=([^&#]*)/g, (e, t, n) =>
|
|
7356
|
+
let t = e.hash.replace(/([?&#]|^)([^=&?#]+)=([^&#]*)/g, (e, t, n) => ts.test(n) ? `${t}${n}=***` : e);
|
|
7350
7357
|
t !== e.hash && (e.hash = t, r = !0);
|
|
7351
7358
|
}
|
|
7352
7359
|
let i = Q(decodeURIComponent(e.pathname));
|
|
7353
|
-
return i !== decodeURIComponent(e.pathname) && (e.pathname = i, r = !0), r ? (/^[a-z][a-z0-9+.-]*:/i.test(n) ? e.href : e.pathname + e.search + e.hash).slice(0,
|
|
7360
|
+
return i !== decodeURIComponent(e.pathname) && (e.pathname = i, r = !0), r ? (/^[a-z][a-z0-9+.-]*:/i.test(n) ? e.href : e.pathname + e.search + e.hash).slice(0, es) : n.slice(0, es);
|
|
7354
7361
|
} catch {
|
|
7355
|
-
return Q(t ? n.split("?")[0] : n).slice(0,
|
|
7362
|
+
return Q(t ? n.split("?")[0] : n).slice(0, es);
|
|
7356
7363
|
}
|
|
7357
7364
|
}
|
|
7358
|
-
var
|
|
7365
|
+
var rs = (e) => {
|
|
7359
7366
|
try {
|
|
7360
7367
|
return new URL(e, location.href).href;
|
|
7361
7368
|
} catch {
|
|
7362
7369
|
return String(e ?? "");
|
|
7363
7370
|
}
|
|
7364
|
-
},
|
|
7371
|
+
}, is = [
|
|
7365
7372
|
"content-type",
|
|
7366
7373
|
"content-length",
|
|
7367
7374
|
"content-encoding",
|
|
@@ -7372,15 +7379,15 @@ var ns = (e) => {
|
|
|
7372
7379
|
"server-timing",
|
|
7373
7380
|
"x-request-id"
|
|
7374
7381
|
];
|
|
7375
|
-
function
|
|
7382
|
+
function as(e) {
|
|
7376
7383
|
let t = {};
|
|
7377
|
-
for (let n of
|
|
7384
|
+
for (let n of is) try {
|
|
7378
7385
|
let r = e(n);
|
|
7379
7386
|
r && (t[n] = String(r).slice(0, 200));
|
|
7380
7387
|
} catch {}
|
|
7381
7388
|
return Object.keys(t).length ? t : void 0;
|
|
7382
7389
|
}
|
|
7383
|
-
function
|
|
7390
|
+
function os(e, t) {
|
|
7384
7391
|
try {
|
|
7385
7392
|
if (!e) return;
|
|
7386
7393
|
if (typeof e.get == "function") return e.get(t) || void 0;
|
|
@@ -7391,14 +7398,14 @@ function as(e, t) {
|
|
|
7391
7398
|
for (let n of Object.keys(e)) if (n.toLowerCase() === t) return String(e[n]);
|
|
7392
7399
|
} catch {}
|
|
7393
7400
|
}
|
|
7394
|
-
function
|
|
7401
|
+
function ss(e) {
|
|
7395
7402
|
try {
|
|
7396
7403
|
return e == null ? void 0 : typeof e == "string" ? e.length : typeof Blob < "u" && e instanceof Blob ? e.size : e instanceof ArrayBuffer || ArrayBuffer.isView(e) ? e.byteLength : typeof URLSearchParams < "u" && e instanceof URLSearchParams ? String(e).length : void 0;
|
|
7397
7404
|
} catch {
|
|
7398
7405
|
return;
|
|
7399
7406
|
}
|
|
7400
7407
|
}
|
|
7401
|
-
function
|
|
7408
|
+
function cs(e, t, n, r = () => !0) {
|
|
7402
7409
|
typeof performance < "u" && performance.getEntriesByName && setTimeout(() => {
|
|
7403
7410
|
try {
|
|
7404
7411
|
if (!r()) return;
|
|
@@ -7424,15 +7431,15 @@ function ss(e, t, n, r = () => !0) {
|
|
|
7424
7431
|
} catch {}
|
|
7425
7432
|
}, 300);
|
|
7426
7433
|
}
|
|
7427
|
-
function
|
|
7434
|
+
function ls(e = "rec_") {
|
|
7428
7435
|
return e + (typeof crypto < "u" && crypto.getRandomValues ? Array.from(crypto.getRandomValues(/* @__PURE__ */ new Uint8Array(12))).map((e) => e.toString(16).padStart(2, "0")).join("") : Math.abs(Date.now() ^ performance.now() * 1e3).toString(16) + Math.random().toString(16).slice(2, 10));
|
|
7429
7436
|
}
|
|
7430
|
-
function
|
|
7437
|
+
function us() {
|
|
7431
7438
|
if (typeof crypto > "u" || !crypto.getRandomValues) return null;
|
|
7432
7439
|
let e = crypto.getRandomValues(/* @__PURE__ */ new Uint8Array(16));
|
|
7433
7440
|
return btoa(String.fromCharCode(...e)).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
|
|
7434
7441
|
}
|
|
7435
|
-
var
|
|
7442
|
+
var ds = {
|
|
7436
7443
|
get(e, t) {
|
|
7437
7444
|
try {
|
|
7438
7445
|
return JSON.parse(window[e].getItem(t));
|
|
@@ -7450,13 +7457,13 @@ var us = {
|
|
|
7450
7457
|
window[e].removeItem(t);
|
|
7451
7458
|
} catch {}
|
|
7452
7459
|
}
|
|
7453
|
-
},
|
|
7454
|
-
function
|
|
7455
|
-
let e =
|
|
7456
|
-
return typeof e != "string" && (e =
|
|
7460
|
+
}, fs = "specto-optout", ps = "specto-consent", ms = () => ds.get("localStorage", fs) === !0, hs = () => ds.get("localStorage", ps) === "granted";
|
|
7461
|
+
function gs() {
|
|
7462
|
+
let e = ds.get("localStorage", "specto-vid");
|
|
7463
|
+
return typeof e != "string" && (e = ls("v_"), ds.set("localStorage", "specto-vid", e)), e;
|
|
7457
7464
|
}
|
|
7458
|
-
var
|
|
7459
|
-
async function
|
|
7465
|
+
var _s = 18e5, vs = 144e5, ys = 4e3;
|
|
7466
|
+
async function bs(e, t) {
|
|
7460
7467
|
if (!e) return null;
|
|
7461
7468
|
try {
|
|
7462
7469
|
let n = typeof AbortController < "u" ? new AbortController() : null, r = n && setTimeout(() => n.abort(), 3e3), i = await fetch(`${e}?key=${encodeURIComponent(t)}`, {
|
|
@@ -7473,7 +7480,7 @@ async function ys(e, t) {
|
|
|
7473
7480
|
return { failed: !0 };
|
|
7474
7481
|
}
|
|
7475
7482
|
}
|
|
7476
|
-
function
|
|
7483
|
+
function xs(e = {}) {
|
|
7477
7484
|
if (typeof window > "u") return {
|
|
7478
7485
|
disabled: !0,
|
|
7479
7486
|
reason: "no window",
|
|
@@ -7497,30 +7504,31 @@ function bs(e = {}) {
|
|
|
7497
7504
|
sessionUrl: () => null
|
|
7498
7505
|
}, o = navigator.doNotTrack === "1" || navigator.globalPrivacyControl === !0;
|
|
7499
7506
|
if (o && e.privacySignals === "respect") return Object.assign(a, { reason: "dnt" });
|
|
7500
|
-
if (
|
|
7501
|
-
if (e.consent === "required" && !
|
|
7502
|
-
let s =
|
|
7507
|
+
if (ms()) return Object.assign(a, { reason: "opted-out" });
|
|
7508
|
+
if (e.consent === "required" && !hs()) return Object.assign(a, { reason: "consent-required" });
|
|
7509
|
+
let s = ws(e, t, o);
|
|
7503
7510
|
window.__spectoRec = s;
|
|
7504
|
-
let c = (e) =>
|
|
7511
|
+
let c = (e) => bs(i, n).then((n) => {
|
|
7505
7512
|
if (n?.failed && t.guessed && e < 3) return setTimeout(() => c(e + 1), e * 2e3);
|
|
7506
7513
|
s._begin(n);
|
|
7507
7514
|
});
|
|
7508
7515
|
return c(1), s;
|
|
7509
7516
|
}
|
|
7510
|
-
var
|
|
7517
|
+
var Ss = (e) => {
|
|
7511
7518
|
try {
|
|
7512
7519
|
console.warn(`[specto] ${e}`);
|
|
7513
7520
|
} catch {}
|
|
7514
|
-
},
|
|
7521
|
+
}, Cs = {
|
|
7515
7522
|
dom: 4e3,
|
|
7516
7523
|
console: 200,
|
|
7517
7524
|
network: 300,
|
|
7518
7525
|
event: 300,
|
|
7519
7526
|
identify: 20
|
|
7520
7527
|
};
|
|
7521
|
-
function
|
|
7528
|
+
function ws(e, t, n = !1) {
|
|
7522
7529
|
let { key: r, endpoint: i } = t, a = [], o = 0, s = !1, c = !1, l = null, u = [], d = performance.now(), f = () => Math.round(performance.now() - d), p = `specto-session:${r}`, m = null, h = {
|
|
7523
7530
|
strict: e.privacy === "strict",
|
|
7531
|
+
unmask: typeof e.unmask == "string" ? e.unmask : "",
|
|
7524
7532
|
console: e.console !== !1,
|
|
7525
7533
|
networkDetails: e.networkDetails !== !1
|
|
7526
7534
|
}, g = null, _ = () => g || h, v = () => {
|
|
@@ -7529,7 +7537,7 @@ function Cs(e, t, n = !1) {
|
|
|
7529
7537
|
} catch {
|
|
7530
7538
|
return;
|
|
7531
7539
|
}
|
|
7532
|
-
}, y = () => {}, b = typeof WeakSet < "u" ? /* @__PURE__ */ new WeakSet() : null, x = null, S = !1, C = [], w = null, T = Date.now(), E = Date.now() - (performance.now() - d), D =
|
|
7540
|
+
}, y = () => {}, b = typeof WeakSet < "u" ? /* @__PURE__ */ new WeakSet() : null, x = null, S = !1, C = [], w = null, T = Date.now(), E = Date.now() - (performance.now() - d), D = ks(e), O = {
|
|
7533
7541
|
network: [],
|
|
7534
7542
|
console: [],
|
|
7535
7543
|
event: [],
|
|
@@ -7545,16 +7553,16 @@ function Cs(e, t, n = !1) {
|
|
|
7545
7553
|
...t,
|
|
7546
7554
|
at: Math.round(E + (Number(t.t) || 0))
|
|
7547
7555
|
}), n.length > ee[e] && n.shift());
|
|
7548
|
-
}, te = 0, A = null,
|
|
7549
|
-
|
|
7550
|
-
}),
|
|
7556
|
+
}, te = 0, A = null, j = !1, ne, re = new Promise((e) => {
|
|
7557
|
+
ne = e;
|
|
7558
|
+
}), M = [], ie = {}, ae = !1, N = (t, n) => {
|
|
7551
7559
|
if (!c) {
|
|
7552
7560
|
if (t !== "dom" && (k(t, n), (t === "network" || n?.type === "error") && te++), !s) {
|
|
7553
|
-
if ((
|
|
7554
|
-
t === "dom" && (
|
|
7561
|
+
if ((ie[t] = (ie[t] || 0) + 1) > (Cs[t] ?? 100)) {
|
|
7562
|
+
t === "dom" && (ae = !0);
|
|
7555
7563
|
return;
|
|
7556
7564
|
}
|
|
7557
|
-
|
|
7565
|
+
M.push([t, n]);
|
|
7558
7566
|
} else a.push({
|
|
7559
7567
|
kind: t,
|
|
7560
7568
|
payload: n
|
|
@@ -7563,30 +7571,30 @@ function Cs(e, t, n = !1) {
|
|
|
7563
7571
|
kind: t
|
|
7564
7572
|
});
|
|
7565
7573
|
}
|
|
7566
|
-
},
|
|
7567
|
-
function
|
|
7568
|
-
let t = Date.now(), n = e ? null :
|
|
7574
|
+
}, oe = () => ds.set("sessionStorage", p, m);
|
|
7575
|
+
function se(e) {
|
|
7576
|
+
let t = Date.now(), n = e ? null : ds.get("sessionStorage", p), r = !!(n && typeof n.id == "string" && t - n.active < _s && t - n.started < vs);
|
|
7569
7577
|
if (r) m = n;
|
|
7570
7578
|
else {
|
|
7571
7579
|
let e = Math.max(0, Math.min(1, g.sampleRate));
|
|
7572
7580
|
m = {
|
|
7573
|
-
id:
|
|
7574
|
-
sk:
|
|
7581
|
+
id: ls(),
|
|
7582
|
+
sk: us(),
|
|
7575
7583
|
b: 0,
|
|
7576
7584
|
started: t,
|
|
7577
7585
|
active: t,
|
|
7578
7586
|
sampled: Math.random() < e
|
|
7579
7587
|
};
|
|
7580
7588
|
}
|
|
7581
|
-
return m.active = t,
|
|
7589
|
+
return m.active = t, oe(), r;
|
|
7582
7590
|
}
|
|
7583
|
-
function
|
|
7584
|
-
if (ue(),
|
|
7591
|
+
function P() {
|
|
7592
|
+
if (ue(), se(!0), !m.sampled) return F.stop("not-sampled");
|
|
7585
7593
|
try {
|
|
7586
7594
|
jo.takeFullSnapshot(!0);
|
|
7587
7595
|
} catch {}
|
|
7588
7596
|
}
|
|
7589
|
-
function
|
|
7597
|
+
function ce(e) {
|
|
7590
7598
|
if (!e.length || !m?.sampled) return;
|
|
7591
7599
|
let t = {
|
|
7592
7600
|
b: m.b++,
|
|
@@ -7595,17 +7603,17 @@ function Cs(e, t, n = !1) {
|
|
|
7595
7603
|
sessionId: m.id,
|
|
7596
7604
|
...m.sk ? { sk: m.sk } : {},
|
|
7597
7605
|
b: m.b - 1,
|
|
7598
|
-
sdk:
|
|
7606
|
+
sdk: Jo,
|
|
7599
7607
|
meta: {
|
|
7600
7608
|
page: $(location.pathname),
|
|
7601
7609
|
userAgent: navigator.userAgent,
|
|
7602
|
-
visitorId:
|
|
7610
|
+
visitorId: gs(),
|
|
7603
7611
|
...D ? { release: D } : {}
|
|
7604
7612
|
},
|
|
7605
7613
|
events: e
|
|
7606
7614
|
})
|
|
7607
7615
|
};
|
|
7608
|
-
m.active = Math.max(m.active, T),
|
|
7616
|
+
m.active = Math.max(m.active, T), oe(), x ? (x.postMessage({
|
|
7609
7617
|
t: "upload",
|
|
7610
7618
|
item: t
|
|
7611
7619
|
}), S || C.push(t)) : w.push(t);
|
|
@@ -7625,10 +7633,10 @@ function Cs(e, t, n = !1) {
|
|
|
7625
7633
|
function ue() {
|
|
7626
7634
|
if (!a.length) return;
|
|
7627
7635
|
let e = a;
|
|
7628
|
-
a = [],
|
|
7636
|
+
a = [], ce(e);
|
|
7629
7637
|
}
|
|
7630
7638
|
function de(t) {
|
|
7631
|
-
t.t === "stop" ? F.stop(t.code) : t.t === "rotate" &&
|
|
7639
|
+
t.t === "stop" ? F.stop(t.code) : t.t === "rotate" && P(), e.onDelivery?.(t);
|
|
7632
7640
|
}
|
|
7633
7641
|
function fe() {
|
|
7634
7642
|
if (!a.length || !navigator.sendBeacon || !m?.sampled) return;
|
|
@@ -7641,7 +7649,7 @@ function Cs(e, t, n = !1) {
|
|
|
7641
7649
|
sessionId: m.id,
|
|
7642
7650
|
...m.sk ? { sk: m.sk } : {},
|
|
7643
7651
|
b: m.b++,
|
|
7644
|
-
sdk:
|
|
7652
|
+
sdk: Jo,
|
|
7645
7653
|
meta: { page: $(location.pathname) },
|
|
7646
7654
|
events: t
|
|
7647
7655
|
});
|
|
@@ -7654,7 +7662,7 @@ function Cs(e, t, n = !1) {
|
|
|
7654
7662
|
let e = JSON.stringify(r).length;
|
|
7655
7663
|
n + e > 55e3 && o(), !(e > 55e3) && (t.push(r), n += e);
|
|
7656
7664
|
}
|
|
7657
|
-
o(),
|
|
7665
|
+
o(), oe();
|
|
7658
7666
|
}
|
|
7659
7667
|
let F = {
|
|
7660
7668
|
disabled: !1,
|
|
@@ -7664,13 +7672,13 @@ function Cs(e, t, n = !1) {
|
|
|
7664
7672
|
count: () => o,
|
|
7665
7673
|
flushNow: () => ue(),
|
|
7666
7674
|
identify(e, t) {
|
|
7667
|
-
e != null && e !== "" && (A = String(e).slice(0, 256),
|
|
7675
|
+
e != null && e !== "" && (A = String(e).slice(0, 256), N("identify", {
|
|
7668
7676
|
id: A,
|
|
7669
7677
|
traits: t && typeof t == "object" ? t : void 0
|
|
7670
7678
|
}));
|
|
7671
7679
|
},
|
|
7672
7680
|
track(e, t) {
|
|
7673
|
-
e &&
|
|
7681
|
+
e && N("event", {
|
|
7674
7682
|
t: f(),
|
|
7675
7683
|
type: "custom",
|
|
7676
7684
|
name: String(e).slice(0, 120),
|
|
@@ -7682,8 +7690,8 @@ function Cs(e, t, n = !1) {
|
|
|
7682
7690
|
if (b.has(e)) return;
|
|
7683
7691
|
b.add(e);
|
|
7684
7692
|
}
|
|
7685
|
-
let n = Q(String(e && e.message || e || "error")).slice(0, 500), r =
|
|
7686
|
-
|
|
7693
|
+
let n = Q(String(e && e.message || e || "error")).slice(0, 500), r = Ts(e?.stack), i = t?.componentStack ? Q(String(t.componentStack)).split("\n").map((e) => e.trim()).filter(Boolean).slice(0, 8).join("\n").slice(0, 800) : void 0;
|
|
7694
|
+
N("event", {
|
|
7687
7695
|
t: f(),
|
|
7688
7696
|
type: "error",
|
|
7689
7697
|
message: n,
|
|
@@ -7700,12 +7708,13 @@ function Cs(e, t, n = !1) {
|
|
|
7700
7708
|
return null;
|
|
7701
7709
|
}
|
|
7702
7710
|
},
|
|
7703
|
-
_ready:
|
|
7711
|
+
_ready: re,
|
|
7704
7712
|
_point: {
|
|
7705
7713
|
key: r,
|
|
7706
7714
|
endpoint: i.replace(/\/api\/ingest$/, "/api/point"),
|
|
7707
7715
|
release: D,
|
|
7708
7716
|
strict: () => _().strict,
|
|
7717
|
+
unmask: () => _().unmask || "",
|
|
7709
7718
|
identified: () => A,
|
|
7710
7719
|
recent: () => ({
|
|
7711
7720
|
network: O.network.slice(),
|
|
@@ -7714,12 +7723,12 @@ function Cs(e, t, n = !1) {
|
|
|
7714
7723
|
clicks: O.clicks.slice()
|
|
7715
7724
|
}),
|
|
7716
7725
|
active: (e) => {
|
|
7717
|
-
|
|
7726
|
+
j = !!e;
|
|
7718
7727
|
}
|
|
7719
7728
|
},
|
|
7720
7729
|
stop(e) {
|
|
7721
7730
|
if (c) return;
|
|
7722
|
-
|
|
7731
|
+
ne(null), c = !0, F.disabled = !0, F.reason = e || "stopped";
|
|
7723
7732
|
try {
|
|
7724
7733
|
l?.();
|
|
7725
7734
|
} catch {}
|
|
@@ -7733,23 +7742,24 @@ function Cs(e, t, n = !1) {
|
|
|
7733
7742
|
_begin(a) {
|
|
7734
7743
|
if (c || s) return;
|
|
7735
7744
|
let o = a && typeof a == "object" ? a : {}, d = t.host || i;
|
|
7736
|
-
if (o.unknownKey) return F.stop("unknown-key"),
|
|
7737
|
-
if (o.failed && t.guessed) return F.stop("unconfirmed"),
|
|
7738
|
-
if (o.enabled === !1) return
|
|
7745
|
+
if (o.unknownKey) return F.stop("unknown-key"), Ss(`${d} has no project with the key ${r}, so nothing is recorded. Copy the key from the project's Install page${t.guessed ? " — a self-hosted or EU-region project includes its host: pk_…@your-host" : ""}.`);
|
|
7746
|
+
if (o.failed && t.guessed) return F.stop("unconfirmed"), Ss(`couldn't reach ${d} to confirm the key ${r}, so this page isn't recorded.`);
|
|
7747
|
+
if (o.enabled === !1) return ne(null), F.stop("recording-disabled");
|
|
7739
7748
|
if (n && (o.respectPrivacySignals === !0 || o.failed)) return F.stop("dnt");
|
|
7740
|
-
|
|
7749
|
+
ne(o), g = {
|
|
7741
7750
|
strict: e.privacy === "strict" || o.privacy === "strict",
|
|
7751
|
+
unmask: [typeof e.unmask == "string" ? e.unmask : "", typeof o.unmask == "string" ? o.unmask : ""].filter(Boolean).join(","),
|
|
7742
7752
|
console: e.console !== !1 && o.captureConsole !== !1,
|
|
7743
7753
|
networkDetails: e.networkDetails !== !1 && o.captureNetworkDetails !== !1,
|
|
7744
7754
|
sampleRate: Math.min(e.sampleRate ?? 1, typeof o.sampleRate == "number" ? o.sampleRate : 1)
|
|
7745
7755
|
};
|
|
7746
|
-
let f =
|
|
7756
|
+
let f = se(!1);
|
|
7747
7757
|
if (!m.sampled) return F.stop("not-sampled");
|
|
7748
|
-
let p = g.strict && !h.strict, _ = p ||
|
|
7758
|
+
let p = g.strict && !h.strict, _ = p || ae;
|
|
7749
7759
|
s = !0;
|
|
7750
|
-
for (let [e, t] of
|
|
7760
|
+
for (let [e, t] of M.splice(0)) {
|
|
7751
7761
|
let n = me(e, t, p, _);
|
|
7752
|
-
n &&
|
|
7762
|
+
n && N(e, n);
|
|
7753
7763
|
}
|
|
7754
7764
|
if (_) {
|
|
7755
7765
|
try {
|
|
@@ -7770,7 +7780,7 @@ function Cs(e, t, n = !1) {
|
|
|
7770
7780
|
});
|
|
7771
7781
|
let e = setTimeout(() => {
|
|
7772
7782
|
S || le();
|
|
7773
|
-
},
|
|
7783
|
+
}, ys);
|
|
7774
7784
|
u.push(() => clearTimeout(e));
|
|
7775
7785
|
}
|
|
7776
7786
|
} catch {
|
|
@@ -7787,7 +7797,7 @@ function Cs(e, t, n = !1) {
|
|
|
7787
7797
|
function pe() {
|
|
7788
7798
|
let e = _().strict;
|
|
7789
7799
|
return jo({
|
|
7790
|
-
emit: (e) =>
|
|
7800
|
+
emit: (e) => N("dom", Qo(e, _().strict)),
|
|
7791
7801
|
maskAllInputs: !0,
|
|
7792
7802
|
maskInputOptions: {
|
|
7793
7803
|
password: !0,
|
|
@@ -7797,6 +7807,7 @@ function Cs(e, t, n = !1) {
|
|
|
7797
7807
|
},
|
|
7798
7808
|
maskTextClass: "specto-mask",
|
|
7799
7809
|
maskTextSelector: e ? "*" : void 0,
|
|
7810
|
+
maskTextFn: (e, t) => _().strict && qo(t, _().unmask) ? Q(e) : String(e).replace(/\S/g, "*"),
|
|
7800
7811
|
blockClass: "specto-block",
|
|
7801
7812
|
recordCanvas: !1,
|
|
7802
7813
|
collectFonts: !1,
|
|
@@ -7827,10 +7838,10 @@ function Cs(e, t, n = !1) {
|
|
|
7827
7838
|
let t = console[e];
|
|
7828
7839
|
console[e] = (...n) => {
|
|
7829
7840
|
try {
|
|
7830
|
-
_().console &&
|
|
7841
|
+
_().console && N("console", {
|
|
7831
7842
|
t: f(),
|
|
7832
7843
|
level: e,
|
|
7833
|
-
text: _().strict ? "[masked]" : Q(n.map(
|
|
7844
|
+
text: _().strict ? "[masked]" : Q(n.map(js).join(" ")).slice(0, 2e3)
|
|
7834
7845
|
});
|
|
7835
7846
|
} catch {}
|
|
7836
7847
|
t.apply(console, n);
|
|
@@ -7867,10 +7878,10 @@ function Cs(e, t, n = !1) {
|
|
|
7867
7878
|
}
|
|
7868
7879
|
}, m = (e) => {
|
|
7869
7880
|
try {
|
|
7870
|
-
let [t, n] = e, r = typeof Request < "u" && t instanceof Request, i = new Headers(n?.headers ?? (r ? t.headers : void 0)), a =
|
|
7881
|
+
let [t, n] = e, r = typeof Request < "u" && t instanceof Request, i = new Headers(n?.headers ?? (r ? t.headers : void 0)), a = Ds.exec(i.get("traceparent") || "");
|
|
7871
7882
|
if (a) return [e, a[1].toLowerCase()];
|
|
7872
|
-
let o =
|
|
7873
|
-
return i.set("traceparent", `00-${o}-${
|
|
7883
|
+
let o = Es(16);
|
|
7884
|
+
return i.set("traceparent", `00-${o}-${Es(8)}-01`), [[t, {
|
|
7874
7885
|
...n,
|
|
7875
7886
|
headers: i
|
|
7876
7887
|
}], o];
|
|
@@ -7879,8 +7890,8 @@ function Cs(e, t, n = !1) {
|
|
|
7879
7890
|
}
|
|
7880
7891
|
};
|
|
7881
7892
|
window.fetch = async (...e) => {
|
|
7882
|
-
if (s(
|
|
7883
|
-
let t = performance.now(), i =
|
|
7893
|
+
if (s($o(e[0]))) return r.apply(window, e);
|
|
7894
|
+
let t = performance.now(), i = $o(e[0]), a = $(i, _().strict), o = (e[1]?.method || typeof e[0] != "string" && e[0]?.method || "GET").toUpperCase(), c;
|
|
7884
7895
|
p(i) && ([e, c] = m(e));
|
|
7885
7896
|
try {
|
|
7886
7897
|
let s = await r.apply(window, e), l = c;
|
|
@@ -7899,20 +7910,20 @@ function Cs(e, t, n = !1) {
|
|
|
7899
7910
|
let r = { initiator: "fetch" };
|
|
7900
7911
|
try {
|
|
7901
7912
|
s.statusText && (r.statusText = String(s.statusText).slice(0, 80));
|
|
7902
|
-
let t =
|
|
7913
|
+
let t = as((e) => s.headers.get(e));
|
|
7903
7914
|
t && (r.headers = t), t?.["content-type"] && (r.resType = t["content-type"].split(";")[0]);
|
|
7904
7915
|
let n = Number(t?.["content-length"]);
|
|
7905
7916
|
t?.["content-length"] != null && Number.isFinite(n) && (r.resSize = n);
|
|
7906
|
-
let i =
|
|
7917
|
+
let i = os((e[1] || (typeof e[0] == "object" ? e[0] : null))?.headers, "content-type");
|
|
7907
7918
|
i && (r.reqType = i.split(";")[0].slice(0, 80));
|
|
7908
|
-
let a =
|
|
7919
|
+
let a = ss(e[1]?.body);
|
|
7909
7920
|
a != null && (r.reqSize = a);
|
|
7910
7921
|
} catch {}
|
|
7911
|
-
u.detail = r,
|
|
7922
|
+
u.detail = r, cs(u, rs(i), t, n);
|
|
7912
7923
|
}
|
|
7913
|
-
return
|
|
7924
|
+
return N("network", u), s;
|
|
7914
7925
|
} catch (e) {
|
|
7915
|
-
throw
|
|
7926
|
+
throw N("network", {
|
|
7916
7927
|
t: f(),
|
|
7917
7928
|
method: o,
|
|
7918
7929
|
url: a,
|
|
@@ -7933,24 +7944,24 @@ function Cs(e, t, n = !1) {
|
|
|
7933
7944
|
return this.__specto = {
|
|
7934
7945
|
method: String(e).toUpperCase(),
|
|
7935
7946
|
url: $(t, _().strict),
|
|
7936
|
-
rawUrl:
|
|
7947
|
+
rawUrl: rs(t),
|
|
7937
7948
|
started: 0,
|
|
7938
7949
|
trace: p(t)
|
|
7939
7950
|
}, x.apply(this, arguments);
|
|
7940
7951
|
}, g.prototype.setRequestHeader = function(e, t) {
|
|
7941
7952
|
let n = String(e).toLowerCase();
|
|
7942
7953
|
if (this.__specto && n === "content-type" && (this.__specto.reqType = String(t).split(";")[0].slice(0, 80)), this.__specto && n === "traceparent") {
|
|
7943
|
-
let e =
|
|
7954
|
+
let e = Ds.exec(String(t));
|
|
7944
7955
|
e && (this.__specto.traceId = e[1].toLowerCase()), this.__specto.trace = !1;
|
|
7945
7956
|
}
|
|
7946
7957
|
return C.apply(this, arguments);
|
|
7947
7958
|
}, g.prototype.send = function(e) {
|
|
7948
7959
|
if (this.__specto) {
|
|
7949
7960
|
if (this.__specto.trace) try {
|
|
7950
|
-
let e =
|
|
7951
|
-
C.call(this, "traceparent", `00-${e}-${
|
|
7961
|
+
let e = Es(16);
|
|
7962
|
+
C.call(this, "traceparent", `00-${e}-${Es(8)}-01`), this.__specto.traceId = e;
|
|
7952
7963
|
} catch {}
|
|
7953
|
-
this.__specto.started = performance.now(), n() && (this.__specto.reqSize =
|
|
7964
|
+
this.__specto.started = performance.now(), n() && (this.__specto.reqSize = ss(e)), this.addEventListener("loadend", () => {
|
|
7954
7965
|
let e = this.__specto, t = e.traceId;
|
|
7955
7966
|
try {
|
|
7956
7967
|
t = t || this.getResponseHeader("x-trace-id") || void 0;
|
|
@@ -7968,14 +7979,14 @@ function Cs(e, t, n = !1) {
|
|
|
7968
7979
|
let t = { initiator: "xhr" };
|
|
7969
7980
|
try {
|
|
7970
7981
|
this.statusText && (t.statusText = String(this.statusText).slice(0, 80));
|
|
7971
|
-
let n =
|
|
7982
|
+
let n = as((e) => this.getResponseHeader(e));
|
|
7972
7983
|
n && (t.headers = n), n?.["content-type"] && (t.resType = n["content-type"].split(";")[0]);
|
|
7973
7984
|
let r = Number(n?.["content-length"]);
|
|
7974
7985
|
n?.["content-length"] != null && Number.isFinite(r) && (t.resSize = r), e.reqType && (t.reqType = e.reqType), e.reqSize != null && (t.reqSize = e.reqSize);
|
|
7975
7986
|
} catch {}
|
|
7976
|
-
r.detail = t,
|
|
7987
|
+
r.detail = t, cs(r, e.rawUrl, e.started, n);
|
|
7977
7988
|
}
|
|
7978
|
-
|
|
7989
|
+
N("network", r);
|
|
7979
7990
|
});
|
|
7980
7991
|
}
|
|
7981
7992
|
return S.apply(this, arguments);
|
|
@@ -7983,7 +7994,7 @@ function Cs(e, t, n = !1) {
|
|
|
7983
7994
|
g.prototype.open = x, g.prototype.send = S, g.prototype.setRequestHeader = C;
|
|
7984
7995
|
});
|
|
7985
7996
|
let w = (e) => {
|
|
7986
|
-
let t = e.error || e.reason, n =
|
|
7997
|
+
let t = e.error || e.reason, n = Ts(t?.stack), r = {
|
|
7987
7998
|
t: f(),
|
|
7988
7999
|
type: "error",
|
|
7989
8000
|
message: Q(String(e.message || t?.message || e.reason || "error")).slice(0, 500),
|
|
@@ -7995,13 +8006,13 @@ function Cs(e, t, n = !1) {
|
|
|
7995
8006
|
if (b.has(t)) return;
|
|
7996
8007
|
b.add(t);
|
|
7997
8008
|
}
|
|
7998
|
-
|
|
8009
|
+
N("event", r);
|
|
7999
8010
|
}, 0);
|
|
8000
8011
|
};
|
|
8001
8012
|
window.addEventListener("error", w), window.addEventListener("unhandledrejection", w), u.push(() => {
|
|
8002
8013
|
window.removeEventListener("error", w), window.removeEventListener("unhandledrejection", w);
|
|
8003
8014
|
}), ge = () => {
|
|
8004
|
-
y(),
|
|
8015
|
+
y(), N("event", {
|
|
8005
8016
|
t: f(),
|
|
8006
8017
|
type: "nav",
|
|
8007
8018
|
path: $(location.pathname + location.search + location.hash, _().strict).slice(0, 300)
|
|
@@ -8030,7 +8041,7 @@ function Cs(e, t, n = !1) {
|
|
|
8030
8041
|
function _e(e) {
|
|
8031
8042
|
let t = () => {
|
|
8032
8043
|
let e = Date.now();
|
|
8033
|
-
e - T >
|
|
8044
|
+
e - T > _s ? (T = e, P()) : T = e;
|
|
8034
8045
|
};
|
|
8035
8046
|
for (let e of [
|
|
8036
8047
|
"click",
|
|
@@ -8045,7 +8056,7 @@ function Cs(e, t, n = !1) {
|
|
|
8045
8056
|
ge();
|
|
8046
8057
|
} catch {}
|
|
8047
8058
|
let n = [], r = (e) => {
|
|
8048
|
-
if (
|
|
8059
|
+
if (j) return;
|
|
8049
8060
|
let t = performance.now();
|
|
8050
8061
|
if (n = n.filter((n) => t - n.t < 800 && Math.abs(n.x - e.clientX) < 40 && Math.abs(n.y - e.clientY) < 40), n.push({
|
|
8051
8062
|
t,
|
|
@@ -8053,7 +8064,7 @@ function Cs(e, t, n = !1) {
|
|
|
8053
8064
|
y: e.clientY
|
|
8054
8065
|
}), n.length >= 3) {
|
|
8055
8066
|
let t = e.target?.tagName ? e.target.tagName.toLowerCase() + (e.target.id ? "#" + e.target.id : "") : "element";
|
|
8056
|
-
|
|
8067
|
+
N("event", {
|
|
8057
8068
|
t: f(),
|
|
8058
8069
|
type: "rage",
|
|
8059
8070
|
target: t.slice(0, 80),
|
|
@@ -8074,7 +8085,7 @@ function Cs(e, t, n = !1) {
|
|
|
8074
8085
|
clicks: 0
|
|
8075
8086
|
}, o();
|
|
8076
8087
|
}, c = () => {
|
|
8077
|
-
a &&
|
|
8088
|
+
a && N("event", {
|
|
8078
8089
|
t: f(),
|
|
8079
8090
|
type: "scroll",
|
|
8080
8091
|
path: a.path,
|
|
@@ -8092,10 +8103,10 @@ function Cs(e, t, n = !1) {
|
|
|
8092
8103
|
l = !1, o();
|
|
8093
8104
|
}));
|
|
8094
8105
|
}, p = (e) => {
|
|
8095
|
-
|
|
8106
|
+
j || (O.clicks.push({
|
|
8096
8107
|
at: Date.now(),
|
|
8097
8108
|
el: e.target
|
|
8098
|
-
}), O.clicks.length > ee.clicks && O.clicks.shift(), h(e), !(!a || a.clicks >= 300) && (a.clicks++,
|
|
8109
|
+
}), O.clicks.length > ee.clicks && O.clicks.shift(), h(e), !(!a || a.clicks >= 300) && (a.clicks++, N("event", {
|
|
8099
8110
|
t: f(),
|
|
8100
8111
|
type: "click",
|
|
8101
8112
|
path: a.path,
|
|
@@ -8104,10 +8115,10 @@ function Cs(e, t, n = !1) {
|
|
|
8104
8115
|
y: Math.round(e.pageY),
|
|
8105
8116
|
vw: window.innerWidth,
|
|
8106
8117
|
dh: i(),
|
|
8107
|
-
sel:
|
|
8118
|
+
sel: Os(e.target)
|
|
8108
8119
|
})));
|
|
8109
8120
|
}, m = null, h = (e) => {
|
|
8110
|
-
let t = e.target, n = t?.closest?.("a,button,[role=button],[role=link],[role=tab],[onclick],[type=submit],summary") || (t?.nodeType === 1 &&
|
|
8121
|
+
let t = e.target, n = t?.closest?.("a,button,[role=button],[role=link],[role=tab],[onclick],[type=submit],summary") || (t?.nodeType === 1 && As(t) ? t : null);
|
|
8111
8122
|
if (!n || m || typeof MutationObserver > "u") return;
|
|
8112
8123
|
let r = te, i = location.href, a = !1, o = new MutationObserver(() => {
|
|
8113
8124
|
a = !0;
|
|
@@ -8123,10 +8134,10 @@ function Cs(e, t, n = !1) {
|
|
|
8123
8134
|
return;
|
|
8124
8135
|
}
|
|
8125
8136
|
m = setTimeout(() => {
|
|
8126
|
-
o.disconnect(), m = null, !a && te === r && location.href === i && !
|
|
8137
|
+
o.disconnect(), m = null, !a && te === r && location.href === i && !j && N("event", {
|
|
8127
8138
|
t: f(),
|
|
8128
8139
|
type: "dead",
|
|
8129
|
-
target:
|
|
8140
|
+
target: Os(n),
|
|
8130
8141
|
path: v()
|
|
8131
8142
|
});
|
|
8132
8143
|
}, 1e3);
|
|
@@ -8152,14 +8163,14 @@ function Cs(e, t, n = !1) {
|
|
|
8152
8163
|
}
|
|
8153
8164
|
return he(), F;
|
|
8154
8165
|
}
|
|
8155
|
-
function
|
|
8166
|
+
function Ts(e) {
|
|
8156
8167
|
if (e) return Q(String(e)).split("\n").slice(0, 6).map((e) => e.replace(/\?[^\s:)]*/g, "").slice(0, 300)).join("\n");
|
|
8157
8168
|
}
|
|
8158
|
-
var
|
|
8169
|
+
var Es = (e) => {
|
|
8159
8170
|
let t = new Uint8Array(e);
|
|
8160
8171
|
return crypto.getRandomValues(t), Array.from(t, (e) => e.toString(16).padStart(2, "0")).join("");
|
|
8161
|
-
},
|
|
8162
|
-
function
|
|
8172
|
+
}, Ds = /^00-([0-9a-f]{32})-[0-9a-f]{16}-[0-9a-f]{2}$/i;
|
|
8173
|
+
function Os(e) {
|
|
8163
8174
|
let t = [];
|
|
8164
8175
|
for (let n = e, r = 0; n && n.nodeType === 1 && r < 3 && n !== document.body && n !== document.documentElement; n = n.parentElement, r++) {
|
|
8165
8176
|
let e = String(n.tagName || "").toLowerCase(), r = n.getAttribute("data-testid");
|
|
@@ -8176,21 +8187,21 @@ function Ds(e) {
|
|
|
8176
8187
|
}
|
|
8177
8188
|
return Q(t.join(" > ") || "body").slice(0, 160);
|
|
8178
8189
|
}
|
|
8179
|
-
function
|
|
8190
|
+
function ks(e) {
|
|
8180
8191
|
let t = e.release;
|
|
8181
8192
|
try {
|
|
8182
8193
|
t ||= document.querySelector("meta[name=\"specto-release\"]")?.getAttribute("content");
|
|
8183
8194
|
} catch {}
|
|
8184
8195
|
return t && String(t).trim().slice(0, 80) || null;
|
|
8185
8196
|
}
|
|
8186
|
-
function
|
|
8197
|
+
function As(e) {
|
|
8187
8198
|
try {
|
|
8188
8199
|
return getComputedStyle(e).cursor === "pointer";
|
|
8189
8200
|
} catch {
|
|
8190
8201
|
return !1;
|
|
8191
8202
|
}
|
|
8192
8203
|
}
|
|
8193
|
-
function
|
|
8204
|
+
function js(e) {
|
|
8194
8205
|
if (typeof e == "string") return e;
|
|
8195
8206
|
if (e instanceof Error) return `${e.name}: ${e.message}`;
|
|
8196
8207
|
try {
|
|
@@ -8201,30 +8212,30 @@ function As(e) {
|
|
|
8201
8212
|
}
|
|
8202
8213
|
//#endregion
|
|
8203
8214
|
//#region src/recorder.worker.js?worker&inline
|
|
8204
|
-
var
|
|
8205
|
-
function
|
|
8215
|
+
var Ms = "(function(){async function e(e){if(typeof CompressionStream>`u`)return null;try{return await new Response(new Blob([e]).stream().pipeThrough(new CompressionStream(`gzip`))).blob()}catch{return null}}function t({endpoint:t,onEvent:n=()=>{}}){let r=[],i=!1,a=null,o=!1,s=(e,t)=>{if(e.tries++,e.tries>=7)return r.shift(),n({t:`drop`,b:e.b,reason:`retries`}),c();let i=t>0?t*1e3:Math.min(3e4,1e3*2**(e.tries-1))*(.75+Math.random()/2);a=setTimeout(()=>{a=null,c()},i)};async function c(){if(i||a||o||!r.length)return;i=!0;let l=r[0];try{let a=await e(l.json),c=a||l.json,u=a?a.size:l.json.length,d=await fetch(t,{method:`POST`,body:c,credentials:`omit`,mode:`cors`,headers:{\"Content-Type\":`text/plain;charset=UTF-8`},keepalive:u<6e4});if(d.ok)r.shift(),n({t:`ack`,b:l.b});else{let e=``;try{e=(await d.json())?.code||``}catch{}if(e===`session_limit`||e===`session_key`)r.length=0,n({t:`rotate`,code:e});else if(e===`quota_exceeded`||e===`recording_disabled`||d.status===401||d.status===403)r.length=0,o=!0,n({t:`stop`,code:e||String(d.status)});else if(d.status===429||d.status>=500)return i=!1,s(l,Number(d.headers.get(`Retry-After`))||0);else r.shift(),n({t:`drop`,b:l.b,reason:String(d.status)})}}catch{return i=!1,s(l,0)}i=!1,c()}return{push(e){o||(r.push({...e,tries:0}),r.length>40&&n({t:`drop`,b:r.shift().b,reason:`overflow`}),c())},nudge(){a&&=(clearTimeout(a),null),c()},stop(){o=!0,r.length=0,a&&clearTimeout(a)},pending:()=>r.length}}let n=null;self.onmessage=e=>{let r=e.data||{};r.t===`init`?(n=t({endpoint:r.endpoint,onEvent:e=>self.postMessage(e)}),self.postMessage({t:`ready`})):r.t===`upload`?n?.push(r.item):r.t===`nudge`?n?.nudge():r.t===`stop`&&n?.stop()}})();", Ns = typeof self < "u" && self.Blob && new Blob(["(self.URL || self.webkitURL).revokeObjectURL(self.location.href);", Ms], { type: "text/javascript;charset=utf-8" });
|
|
8216
|
+
function Ps(e) {
|
|
8206
8217
|
let t;
|
|
8207
8218
|
try {
|
|
8208
|
-
if (t =
|
|
8219
|
+
if (t = Ns && (self.URL || self.webkitURL).createObjectURL(Ns), !t) throw "";
|
|
8209
8220
|
let n = new Worker(t, { name: e?.name });
|
|
8210
8221
|
return n.addEventListener("error", () => {
|
|
8211
8222
|
(self.URL || self.webkitURL).revokeObjectURL(t);
|
|
8212
8223
|
}), n;
|
|
8213
8224
|
} catch {
|
|
8214
|
-
return new Worker("data:text/javascript;charset=utf-8," + encodeURIComponent(
|
|
8225
|
+
return new Worker("data:text/javascript;charset=utf-8," + encodeURIComponent(Ms), { name: e?.name });
|
|
8215
8226
|
}
|
|
8216
8227
|
}
|
|
8217
8228
|
//#endregion
|
|
8218
8229
|
//#region src/point/trigger.js
|
|
8219
|
-
var
|
|
8230
|
+
var Fs = 400, Is = 250, Ls = 330, Rs = 300, zs = 40, Bs = "specto-point", Vs = "specto-point-receipts", Hs = 6e5, Us = {
|
|
8220
8231
|
ControlLeft: "Control",
|
|
8221
8232
|
ControlRight: "Control",
|
|
8222
8233
|
AltLeft: "Alt",
|
|
8223
8234
|
AltRight: "Alt",
|
|
8224
8235
|
MetaLeft: "Meta",
|
|
8225
8236
|
MetaRight: "Meta"
|
|
8226
|
-
},
|
|
8227
|
-
function
|
|
8237
|
+
}, Ws = (e) => e.key || Us[e.code] || "", Gs = (e, t) => !!t && !!e.altKey == !!t.alt && !!e.shiftKey == !!t.shift && !!e.ctrlKey == !!t.ctrl && !!e.metaKey == !!t.meta && String(e.code || e.key).replace(/^(Key|Digit)/, "").toUpperCase() === t.key;
|
|
8238
|
+
function Ks(e, { arm: t, release: n = () => {}, now: r = () => Date.now(), setTimer: i = setTimeout, clearTimer: a = clearTimeout, shortcut: o } = {}) {
|
|
8228
8239
|
let s = e === "hold-alt" ? "Alt" : e === "hold-ctrl" ? "Control" : null, c = null, l = !1, u = null, d = 0, f = -Infinity, p = () => {
|
|
8229
8240
|
c && a(c), c = null, u = null;
|
|
8230
8241
|
}, m = (e) => e === "Control" || e === "Meta";
|
|
@@ -8232,14 +8243,14 @@ function Gs(e, { arm: t, release: n = () => {}, now: r = () => Date.now(), setTi
|
|
|
8232
8243
|
feed(a) {
|
|
8233
8244
|
let h = {
|
|
8234
8245
|
...a,
|
|
8235
|
-
key:
|
|
8246
|
+
key: Ws(a)
|
|
8236
8247
|
}, g = h.time ?? r();
|
|
8237
8248
|
if (h.type === "blur") p(), d = 0, l && (l = !1, n());
|
|
8238
8249
|
else if (h.type === "pointerdown" || h.type === "wheel") p(), d = 0;
|
|
8239
8250
|
else if (h.type === "keydown") {
|
|
8240
8251
|
if (h.repeat) return;
|
|
8241
8252
|
if (o || e === "none") {
|
|
8242
|
-
|
|
8253
|
+
Gs(h, o) && t(e);
|
|
8243
8254
|
return;
|
|
8244
8255
|
}
|
|
8245
8256
|
if (s) {
|
|
@@ -8248,13 +8259,13 @@ function Gs(e, { arm: t, release: n = () => {}, now: r = () => Date.now(), setTi
|
|
|
8248
8259
|
at: g
|
|
8249
8260
|
}, c = i(() => {
|
|
8250
8261
|
c = null, u && (u = null, l = !0, t(e));
|
|
8251
|
-
},
|
|
8262
|
+
}, Fs)) : p();
|
|
8252
8263
|
return;
|
|
8253
8264
|
}
|
|
8254
8265
|
m(h.key) && !u ? u = {
|
|
8255
8266
|
key: h.key,
|
|
8256
8267
|
at: g,
|
|
8257
|
-
quiet: g - f >=
|
|
8268
|
+
quiet: g - f >= Rs
|
|
8258
8269
|
} : (u = null, d = 0, f = g);
|
|
8259
8270
|
} else if (h.type === "keyup") {
|
|
8260
8271
|
if (s) {
|
|
@@ -8263,11 +8274,11 @@ function Gs(e, { arm: t, release: n = () => {}, now: r = () => Date.now(), setTi
|
|
|
8263
8274
|
}
|
|
8264
8275
|
if (e === "double-ctrl" && u && h.key === u.key) {
|
|
8265
8276
|
let e = u;
|
|
8266
|
-
if (u = null, g - e.at >=
|
|
8277
|
+
if (u = null, g - e.at >= Is) {
|
|
8267
8278
|
d = 0;
|
|
8268
8279
|
return;
|
|
8269
8280
|
}
|
|
8270
|
-
if (d && g - d <
|
|
8281
|
+
if (d && g - d < Ls && e.at - d >= zs) {
|
|
8271
8282
|
d = 0, t("double-ctrl");
|
|
8272
8283
|
return;
|
|
8273
8284
|
}
|
|
@@ -8278,11 +8289,11 @@ function Gs(e, { arm: t, release: n = () => {}, now: r = () => Date.now(), setTi
|
|
|
8278
8289
|
cancel: p
|
|
8279
8290
|
};
|
|
8280
8291
|
}
|
|
8281
|
-
function
|
|
8292
|
+
function qs(e, t, n) {
|
|
8282
8293
|
try {
|
|
8283
|
-
let r = Date.now(), i = JSON.parse(localStorage.getItem(
|
|
8284
|
-
if (!i.length || r - (+localStorage.getItem(
|
|
8285
|
-
localStorage.setItem(
|
|
8294
|
+
let r = Date.now(), i = JSON.parse(localStorage.getItem(Vs) || "[]").filter((e) => r - e.at < 7776e6);
|
|
8295
|
+
if (!i.length || r - (+localStorage.getItem(Vs + "-at") || 0) < Hs) return;
|
|
8296
|
+
localStorage.setItem(Vs + "-at", r), fetch(e._point.endpoint + "-status", {
|
|
8286
8297
|
method: "POST",
|
|
8287
8298
|
headers: { "Content-Type": "text/plain;charset=UTF-8" },
|
|
8288
8299
|
credentials: "omit",
|
|
@@ -8293,24 +8304,24 @@ function Ks(e, t, n) {
|
|
|
8293
8304
|
}).then((e) => e.ok ? e.json() : null).then((e) => {
|
|
8294
8305
|
if (!e) return;
|
|
8295
8306
|
let r = [...e.gone || [], ...(e.fixed || []).map((e) => e.receipt)];
|
|
8296
|
-
localStorage.setItem(
|
|
8307
|
+
localStorage.setItem(Vs, JSON.stringify(i.filter((e) => !r.includes(e.r)))), e.fixed?.length && t().then((t) => t.showFixed?.(e.fixed, { open: n }));
|
|
8297
8308
|
}).catch(() => {});
|
|
8298
8309
|
} catch {}
|
|
8299
8310
|
}
|
|
8300
|
-
function
|
|
8311
|
+
function Js(e, { identified: t, link: n }) {
|
|
8301
8312
|
return e === "everyone" ? !0 : e === "link" ? n : n || !!t;
|
|
8302
8313
|
}
|
|
8303
|
-
function
|
|
8314
|
+
function Ys() {
|
|
8304
8315
|
try {
|
|
8305
|
-
return /[?&#]specto=point\b/.test(location.href) && sessionStorage.setItem(
|
|
8316
|
+
return /[?&#]specto=point\b/.test(location.href) && sessionStorage.setItem(Bs, "1"), sessionStorage.getItem(Bs) === "1";
|
|
8306
8317
|
} catch {
|
|
8307
8318
|
return !1;
|
|
8308
8319
|
}
|
|
8309
8320
|
}
|
|
8310
|
-
function
|
|
8311
|
-
let r = null, i = null, a = null, o = null, s = null, c = () =>
|
|
8321
|
+
function Xs(e, t, { launcher: n } = {}) {
|
|
8322
|
+
let r = null, i = null, a = null, o = null, s = null, c = () => Js(r.who, {
|
|
8312
8323
|
identified: e._point?.identified(),
|
|
8313
|
-
link:
|
|
8324
|
+
link: Ys()
|
|
8314
8325
|
}), l = async (n = "api", o = null, s = null) => i || a || !e?._point ? i : (a = (async () => (r = (await e._ready)?.point || r, r?.enabled ? (i = (await t()).openPoint(e, {
|
|
8315
8326
|
...r,
|
|
8316
8327
|
via: n,
|
|
@@ -8373,7 +8384,7 @@ function Ys(e, t, { launcher: n } = {}) {
|
|
|
8373
8384
|
], m = !1;
|
|
8374
8385
|
return e._ready?.then((a) => {
|
|
8375
8386
|
if (r = a?.point || null, !r?.enabled) return;
|
|
8376
|
-
|
|
8387
|
+
Ys(), u = Ks(r.trigger, {
|
|
8377
8388
|
shortcut: r.shortcut,
|
|
8378
8389
|
arm: () => {
|
|
8379
8390
|
c() && (i ? i.toggle?.() : l("shortcut"));
|
|
@@ -8383,7 +8394,7 @@ function Ys(e, t, { launcher: n } = {}) {
|
|
|
8383
8394
|
for (let [e, t, n, r] of p) e.addEventListener(t, n, r);
|
|
8384
8395
|
m = !0;
|
|
8385
8396
|
let d = (location.hash.match(/specto-about=([\w-]{20,40})/) || [])[1];
|
|
8386
|
-
/[?&#]specto=point\b/.test(location.href) && l(d ? "fixed" : "link", null, d), r.notify &&
|
|
8397
|
+
/[?&#]specto=point\b/.test(location.href) && l(d ? "fixed" : "link", null, d), r.notify && qs(e, t, l), s = () => {
|
|
8387
8398
|
m && !o && (c() ? t().then((t) => {
|
|
8388
8399
|
o ||= t.mountEntry?.(e, r, {
|
|
8389
8400
|
open: l,
|
|
@@ -8405,60 +8416,60 @@ function Ys(e, t, { launcher: n } = {}) {
|
|
|
8405
8416
|
}
|
|
8406
8417
|
//#endregion
|
|
8407
8418
|
//#region src/index.js
|
|
8408
|
-
var
|
|
8409
|
-
function
|
|
8419
|
+
var Zs = null, Qs = null, $s = () => import("./point-B5SXBYaU.js");
|
|
8420
|
+
function ec(e = {}) {
|
|
8410
8421
|
if (!e.key) throw Error("@spectosh/browser: opts.key is required — your pk_… key from the project's Install page");
|
|
8411
|
-
|
|
8412
|
-
let t =
|
|
8413
|
-
createWorker: () => new
|
|
8422
|
+
Zs = e;
|
|
8423
|
+
let t = xs({
|
|
8424
|
+
createWorker: () => new Ps(),
|
|
8414
8425
|
_fallback: Vo,
|
|
8415
8426
|
_guessed: !0,
|
|
8416
8427
|
...e
|
|
8417
8428
|
});
|
|
8418
|
-
if (e.point !== !1 && t && !t.disabled && !
|
|
8419
|
-
|
|
8429
|
+
if (e.point !== !1 && t && !t.disabled && !Qs) try {
|
|
8430
|
+
Qs = Xs(t, $s, { launcher: e.launcher });
|
|
8420
8431
|
} catch {}
|
|
8421
8432
|
return t;
|
|
8422
8433
|
}
|
|
8423
|
-
var
|
|
8424
|
-
|
|
8425
|
-
},
|
|
8426
|
-
function
|
|
8434
|
+
var tc = () => typeof window < "u" ? window.__spectoRec : null, nc = (e, t) => tc()?.identify(e, t), rc = (e, t) => tc()?.track(e, t), ic = (e, t) => tc()?.captureError?.(e, t), ac = () => tc()?.sessionUrl?.() || null, oc = () => {
|
|
8435
|
+
Qs?.stop(), Qs = null, tc()?.stop();
|
|
8436
|
+
}, sc = (e) => Qs?.open(e) ?? null, cc = (e) => Qs?.launcher(e);
|
|
8437
|
+
function lc() {
|
|
8427
8438
|
try {
|
|
8428
8439
|
localStorage.setItem("specto-consent", JSON.stringify("granted"));
|
|
8429
8440
|
} catch {}
|
|
8430
|
-
return
|
|
8441
|
+
return Zs ? ec(Zs) : null;
|
|
8431
8442
|
}
|
|
8432
|
-
function
|
|
8443
|
+
function uc() {
|
|
8433
8444
|
try {
|
|
8434
8445
|
localStorage.removeItem("specto-consent");
|
|
8435
8446
|
} catch {}
|
|
8436
|
-
|
|
8447
|
+
oc();
|
|
8437
8448
|
}
|
|
8438
|
-
function
|
|
8449
|
+
function dc() {
|
|
8439
8450
|
try {
|
|
8440
8451
|
localStorage.setItem("specto-optout", "true");
|
|
8441
8452
|
} catch {}
|
|
8442
|
-
|
|
8453
|
+
oc();
|
|
8443
8454
|
}
|
|
8444
|
-
function
|
|
8455
|
+
function fc() {
|
|
8445
8456
|
try {
|
|
8446
8457
|
localStorage.removeItem("specto-optout");
|
|
8447
8458
|
} catch {}
|
|
8448
8459
|
}
|
|
8449
|
-
var
|
|
8450
|
-
startRecording:
|
|
8451
|
-
identify:
|
|
8452
|
-
track:
|
|
8453
|
-
captureError:
|
|
8454
|
-
sessionUrl:
|
|
8455
|
-
stopRecording:
|
|
8456
|
-
openPoint:
|
|
8457
|
-
setLauncher:
|
|
8458
|
-
grantConsent:
|
|
8459
|
-
revokeConsent:
|
|
8460
|
-
optOut:
|
|
8461
|
-
optIn:
|
|
8460
|
+
var pc = {
|
|
8461
|
+
startRecording: ec,
|
|
8462
|
+
identify: nc,
|
|
8463
|
+
track: rc,
|
|
8464
|
+
captureError: ic,
|
|
8465
|
+
sessionUrl: ac,
|
|
8466
|
+
stopRecording: oc,
|
|
8467
|
+
openPoint: sc,
|
|
8468
|
+
setLauncher: cc,
|
|
8469
|
+
grantConsent: lc,
|
|
8470
|
+
revokeConsent: uc,
|
|
8471
|
+
optOut: dc,
|
|
8472
|
+
optIn: fc
|
|
8462
8473
|
};
|
|
8463
8474
|
//#endregion
|
|
8464
|
-
export { Q as _,
|
|
8475
|
+
export { Q as _, fc as a, Uo as b, ac as c, ec as d, oc as f, ms as g, hs as h, sc as i, cc as l, Jo as m, lc as n, dc as o, rc as p, nc as r, uc as s, ic as t, pc as u, qo as v, Vo as y };
|