@brainfish-ai/web-tracker 0.0.14 → 0.0.16

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/index.js CHANGED
@@ -33,7 +33,7 @@ const sa = /* @__PURE__ */ Object.create(null);
33
33
  Object.keys(ve).forEach((t) => {
34
34
  sa[ve[t]] = t;
35
35
  });
36
- const Oa = { type: "error", data: "parser error" }, Wt = typeof Blob == "function" || typeof Blob != "undefined" && Object.prototype.toString.call(Blob) === "[object BlobConstructor]", Pt = typeof ArrayBuffer == "function", Zt = (t) => typeof ArrayBuffer.isView == "function" ? ArrayBuffer.isView(t) : t && t.buffer instanceof ArrayBuffer, Ha = ({ type: t, data: e }, a, n) => Wt && e instanceof Blob ? a ? n(e) : ct(e, n) : Pt && (e instanceof ArrayBuffer || Zt(e)) ? a ? n(e) : ct(new Blob([e]), n) : n(ve[t] + (e || "")), ct = (t, e) => {
36
+ const Oa = { type: "error", data: "parser error" }, Ut = typeof Blob == "function" || typeof Blob != "undefined" && Object.prototype.toString.call(Blob) === "[object BlobConstructor]", Pt = typeof ArrayBuffer == "function", Zt = (t) => typeof ArrayBuffer.isView == "function" ? ArrayBuffer.isView(t) : t && t.buffer instanceof ArrayBuffer, Ha = ({ type: t, data: e }, a, n) => Ut && e instanceof Blob ? a ? n(e) : ct(e, n) : Pt && (e instanceof ArrayBuffer || Zt(e)) ? a ? n(e) : ct(new Blob([e]), n) : n(ve[t] + (e || "")), ct = (t, e) => {
37
37
  const a = new FileReader();
38
38
  return a.onload = function() {
39
39
  const n = a.result.split(",")[1];
@@ -43,7 +43,7 @@ const Oa = { type: "error", data: "parser error" }, Wt = typeof Blob == "functio
43
43
  function ht(t) {
44
44
  return t instanceof Uint8Array ? t : t instanceof ArrayBuffer ? new Uint8Array(t) : new Uint8Array(t.buffer, t.byteOffset, t.byteLength);
45
45
  }
46
- let za;
46
+ let Ea;
47
47
  const tr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", Ke = typeof Uint8Array == "undefined" ? [] : new Uint8Array(256);
48
48
  for (let t = 0; t < 64; t++) Ke[tr.charCodeAt(t)] = t;
49
49
  const nr = typeof ArrayBuffer == "function", Ya = (t, e) => {
@@ -66,8 +66,8 @@ const nr = typeof ArrayBuffer == "function", Ya = (t, e) => {
66
66
  function ir() {
67
67
  return new TransformStream({ transform(t, e) {
68
68
  (function(a, n) {
69
- Wt && a.data instanceof Blob ? a.data.arrayBuffer().then(ht).then(n) : Pt && (a.data instanceof ArrayBuffer || Zt(a.data)) ? n(ht(a.data)) : Ha(a, !1, (r) => {
70
- za || (za = new TextEncoder()), n(za.encode(r));
69
+ Ut && a.data instanceof Blob ? a.data.arrayBuffer().then(ht).then(n) : Pt && (a.data instanceof ArrayBuffer || Zt(a.data)) ? n(ht(a.data)) : Ha(a, !1, (r) => {
70
+ Ea || (Ea = new TextEncoder()), n(Ea.encode(r));
71
71
  });
72
72
  })(t, (a) => {
73
73
  const n = a.length;
@@ -86,7 +86,7 @@ function ir() {
86
86
  });
87
87
  } });
88
88
  }
89
- let ja;
89
+ let za;
90
90
  function aa(t) {
91
91
  return t.reduce((e, a) => e + a.length, 0);
92
92
  }
@@ -415,9 +415,9 @@ class gr extends Ja {
415
415
  return this.opts.timestampRequests && (a[this.opts.timestampParam] = Ht()), this.supportsBinary || (a.b64 = 1), this.createUri(e, a);
416
416
  }
417
417
  }
418
- const Ea = pe.WebSocket || pe.MozWebSocket, pr = { websocket: class extends gr {
418
+ const ja = pe.WebSocket || pe.MozWebSocket, pr = { websocket: class extends gr {
419
419
  createSocket(t, e, a) {
420
- return Qt ? new Ea(t, e, a) : e ? new Ea(t, e) : new Ea(t);
420
+ return Qt ? new ja(t, e, a) : e ? new ja(t, e) : new ja(t);
421
421
  }
422
422
  doWrite(t, e) {
423
423
  this.ws.send(e);
@@ -439,7 +439,7 @@ const Ea = pe.WebSocket || pe.MozWebSocket, pr = { websocket: class extends gr {
439
439
  }), this._transport.ready.then(() => {
440
440
  this._transport.createBidirectionalStream().then((t) => {
441
441
  const e = function(o, s) {
442
- ja || (ja = new TextDecoder());
442
+ za || (za = new TextDecoder());
443
443
  const l = [];
444
444
  let c = 0, h = -1, d = !1;
445
445
  return new TransformStream({ transform(u, b) {
@@ -463,7 +463,7 @@ const Ea = pe.WebSocket || pe.MozWebSocket, pr = { websocket: class extends gr {
463
463
  } else {
464
464
  if (aa(l) < h) break;
465
465
  const v = ta(l, h);
466
- b.enqueue(Ya(d ? v : ja.decode(v), s)), c = 0;
466
+ b.enqueue(Ya(d ? v : za.decode(v), s)), c = 0;
467
467
  }
468
468
  if (h === 0 || h > o) {
469
469
  b.enqueue(Oa);
@@ -798,7 +798,7 @@ class Xa extends ae {
798
798
  if (this.reconstructor) throw new Error("got plaintext data when reconstructing a packet");
799
799
  a = this.decodeString(e);
800
800
  const n = a.type === B.BINARY_EVENT;
801
- n || a.type === B.BINARY_ACK ? (a.type = n ? B.EVENT : B.ACK, this.reconstructor = new zr(a), a.attachments === 0 && super.emitReserved("decoded", a)) : super.emitReserved("decoded", a);
801
+ n || a.type === B.BINARY_ACK ? (a.type = n ? B.EVENT : B.ACK, this.reconstructor = new Er(a), a.attachments === 0 && super.emitReserved("decoded", a)) : super.emitReserved("decoded", a);
802
802
  } else {
803
803
  if (!Qa(e) && !e.base64) throw new Error("Unknown type: " + e);
804
804
  if (!this.reconstructor) throw new Error("got binary data when not reconstructing a packet");
@@ -869,7 +869,7 @@ class Xa extends ae {
869
869
  this.reconstructor && (this.reconstructor.finishedReconstruction(), this.reconstructor = null);
870
870
  }
871
871
  }
872
- class zr {
872
+ class Er {
873
873
  constructor(e) {
874
874
  this.packet = e, this.buffers = [], this.reconPack = e;
875
875
  }
@@ -884,7 +884,7 @@ class zr {
884
884
  this.reconPack = null, this.buffers = [];
885
885
  }
886
886
  }
887
- const jr = Object.freeze(Object.defineProperty({ __proto__: null, Decoder: Xa, Encoder: class {
887
+ const zr = Object.freeze(Object.defineProperty({ __proto__: null, Decoder: Xa, Encoder: class {
888
888
  constructor(t) {
889
889
  this.replacer = t;
890
890
  }
@@ -907,7 +907,7 @@ function be(t, e, a) {
907
907
  t.off(e, a);
908
908
  };
909
909
  }
910
- const Er = Object.freeze({ connect: 1, connect_error: 1, disconnect: 1, disconnecting: 1, newListener: 1, removeListener: 1 });
910
+ const jr = Object.freeze({ connect: 1, connect_error: 1, disconnect: 1, disconnecting: 1, newListener: 1, removeListener: 1 });
911
911
  class $t extends ae {
912
912
  constructor(e, a, n) {
913
913
  super(), this.connected = !1, this.recovered = !1, this.receiveBuffer = [], this.sendBuffer = [], this._queue = [], this._queueSeq = 0, this.ids = 0, this.acks = {}, this.flags = {}, this.io = e, this.nsp = a, n && n.auth && (this.auth = n.auth), this._opts = Object.assign({}, n), this.io._autoConnect && this.open();
@@ -934,7 +934,7 @@ class $t extends ae {
934
934
  }
935
935
  emit(e, ...a) {
936
936
  var n, r, i;
937
- if (Er.hasOwnProperty(e)) throw new Error('"' + e.toString() + '" is a reserved event name');
937
+ if (jr.hasOwnProperty(e)) throw new Error('"' + e.toString() + '" is a reserved event name');
938
938
  if (a.unshift(e), this._opts.retries && !this.flags.fromQueue && !this.flags.volatile) return this._addToQueue(a), this;
939
939
  const o = { type: B.EVENT, data: a, options: {} };
940
940
  if (o.options.compress = this.flags.compress !== !1, typeof a[a.length - 1] == "function") {
@@ -1139,7 +1139,7 @@ class qa extends ae {
1139
1139
  constructor(e, a) {
1140
1140
  var n;
1141
1141
  super(), this.nsps = {}, this.subs = [], e && typeof e == "object" && (a = e, e = void 0), (a = a || {}).path = a.path || "/socket.io", this.opts = a, va(this, a), this.reconnection(a.reconnection !== !1), this.reconnectionAttempts(a.reconnectionAttempts || 1 / 0), this.reconnectionDelay(a.reconnectionDelay || 1e3), this.reconnectionDelayMax(a.reconnectionDelayMax || 5e3), this.randomizationFactor((n = a.randomizationFactor) !== null && n !== void 0 ? n : 0.5), this.backoff = new Be({ min: this.reconnectionDelay(), max: this.reconnectionDelayMax(), jitter: this.randomizationFactor() }), this.timeout(a.timeout == null ? 2e4 : a.timeout), this._readyState = "closed", this.uri = e;
1142
- const r = a.parser || jr;
1142
+ const r = a.parser || zr;
1143
1143
  this.encoder = new r.Encoder(), this.decoder = new r.Decoder(), this._autoConnect = a.autoConnect !== !1, this._autoConnect && this.open();
1144
1144
  }
1145
1145
  reconnection(e) {
@@ -1763,7 +1763,7 @@ function It(t) {
1763
1763
  }
1764
1764
  return e;
1765
1765
  }
1766
- function Ur(t, e) {
1766
+ function Wr(t, e) {
1767
1767
  return _(this, null, function* () {
1768
1768
  if (t.ownerDocument == null) throw new Error("Provided element is not within a Document");
1769
1769
  const a = Ae(t.ownerDocument.styleSheets), n = yield function(r, i) {
@@ -1810,11 +1810,11 @@ function Ur(t, e) {
1810
1810
  }(n);
1811
1811
  });
1812
1812
  }
1813
- function Wr(t, e) {
1813
+ function Ur(t, e) {
1814
1814
  return _(this, null, function* () {
1815
1815
  const a = e.fontEmbedCSS != null ? e.fontEmbedCSS : e.skipFonts ? null : yield function(n, r) {
1816
1816
  return _(this, null, function* () {
1817
- const i = yield Ur(n, r);
1817
+ const i = yield Wr(n, r);
1818
1818
  return (yield Promise.all(i.map((o) => {
1819
1819
  const s = o.parentStyleSheet ? o.parentStyleSheet.href : null;
1820
1820
  return rn(o.cssText, s, r);
@@ -1831,7 +1831,7 @@ function Wr(t, e) {
1831
1831
  function Pr(a) {
1832
1832
  return _(this, arguments, function* (t, e = {}) {
1833
1833
  const { width: n, height: r } = en(t, e), i = yield ya(t, e, !0);
1834
- return yield Wr(i, e), yield on(i, e), function(o, s) {
1834
+ return yield Ur(i, e), yield on(i, e), function(o, s) {
1835
1835
  const { style: l } = o;
1836
1836
  s.backgroundColor && (l.backgroundColor = s.backgroundColor), s.width && (l.width = `${s.width}px`), s.height && (l.height = `${s.height}px`);
1837
1837
  const c = s.style;
@@ -1978,7 +1978,7 @@ function Je(t) {
1978
1978
  function Qe(t) {
1979
1979
  return Object.prototype.toString.call(t) === "[object ShadowRoot]";
1980
1980
  }
1981
- function Ua(t) {
1981
+ function Wa(t) {
1982
1982
  try {
1983
1983
  var e = t.rules || t.cssRules;
1984
1984
  return e ? ((a = Array.from(e).map(cn).join("")).includes(" background-clip: text;") && !a.includes(" -webkit-background-clip: text;") && (a = a.replace(" background-clip: text;", " -webkit-background-clip: text; background-clip: text;")), a) : null;
@@ -1992,7 +1992,7 @@ function cn(t) {
1992
1992
  if (function(a) {
1993
1993
  return "styleSheet" in a;
1994
1994
  }(t)) try {
1995
- e = Ua(t.styleSheet) || e;
1995
+ e = Wa(t.styleSheet) || e;
1996
1996
  } catch (a) {
1997
1997
  }
1998
1998
  return e;
@@ -2042,7 +2042,7 @@ function at(t) {
2042
2042
  var e = t.maskInputOptions, a = t.tagName, n = t.type, r = t.value, i = t.maskInputFn, o = r || "";
2043
2043
  return (e[a.toLowerCase()] || e[n]) && (o = i ? i(o) : "*".repeat(o.length)), o;
2044
2044
  }
2045
- var At = "__rrweb_original__", Fe, zt, ei = 1, ai = new RegExp("[^a-z0-9-_:]");
2045
+ var At = "__rrweb_original__", Fe, Et, ei = 1, ai = new RegExp("[^a-z0-9-_:]");
2046
2046
  function dn() {
2047
2047
  return ei++;
2048
2048
  }
@@ -2073,7 +2073,7 @@ function Ge(t, e) {
2073
2073
  function si(t) {
2074
2074
  return !!(t.tagName === "svg" || t.ownerSVGElement);
2075
2075
  }
2076
- function Wa() {
2076
+ function Ua() {
2077
2077
  var t = document.createElement("a");
2078
2078
  return t.href = "", t.href;
2079
2079
  }
@@ -2110,7 +2110,7 @@ function un(t, e, a, n) {
2110
2110
  }
2111
2111
  }
2112
2112
  return l.join(", ");
2113
- }(t, n) : a === "style" && n ? ua(n, Wa()) : e === "object" && a === "data" && n ? Ge(t, n) : n : Ge(t, n);
2113
+ }(t, n) : a === "style" && n ? ua(n, Ua()) : e === "object" && a === "data" && n ? Ge(t, n) : n : Ge(t, n);
2114
2114
  }
2115
2115
  function fa(t, e, a) {
2116
2116
  if (!t) return !1;
@@ -2130,7 +2130,7 @@ function mn(t, e, a) {
2130
2130
  return !!(a && (n.matches(a) || n.closest(a)));
2131
2131
  }
2132
2132
  function li(t, e) {
2133
- var a = e.doc, n = e.mirror, r = e.blockClass, i = e.blockSelector, o = e.maskTextClass, s = e.maskTextSelector, l = e.inlineStylesheet, c = e.maskInputOptions, h = c === void 0 ? {} : c, d = e.maskTextFn, u = e.maskInputFn, b = e.dataURLOptions, v = b === void 0 ? {} : b, T = e.inlineImages, p = e.recordCanvas, g = e.keepIframeSrcFn, C = e.newlyAddedElement, j = C !== void 0 && C, M = function(k, I) {
2133
+ var a = e.doc, n = e.mirror, r = e.blockClass, i = e.blockSelector, o = e.maskTextClass, s = e.maskTextSelector, l = e.inlineStylesheet, c = e.maskInputOptions, h = c === void 0 ? {} : c, d = e.maskTextFn, u = e.maskInputFn, b = e.dataURLOptions, v = b === void 0 ? {} : b, T = e.inlineImages, p = e.recordCanvas, g = e.keepIframeSrcFn, C = e.newlyAddedElement, z = C !== void 0 && C, M = function(k, I) {
2134
2134
  if (I.hasNode(k)) {
2135
2135
  var m = I.getId(k);
2136
2136
  return m === 1 ? void 0 : m;
@@ -2143,12 +2143,12 @@ function li(t, e) {
2143
2143
  return { type: ie.DocumentType, name: t.name, publicId: t.publicId, systemId: t.systemId, rootId: M };
2144
2144
  case t.ELEMENT_NODE:
2145
2145
  return function(k, I) {
2146
- for (var m = I.doc, w = I.blockClass, y = I.blockSelector, z = I.inlineStylesheet, S = I.maskInputOptions, E = S === void 0 ? {} : S, x = I.maskInputFn, f = I.dataURLOptions, F = f === void 0 ? {} : f, W = I.inlineImages, D = I.recordCanvas, me = I.keepIframeSrcFn, ne = I.newlyAddedElement, ce = ne !== void 0 && ne, oe = I.rootId, U = function(ee, ge, ke) {
2146
+ for (var m = I.doc, w = I.blockClass, y = I.blockSelector, E = I.inlineStylesheet, S = I.maskInputOptions, j = S === void 0 ? {} : S, x = I.maskInputFn, f = I.dataURLOptions, F = f === void 0 ? {} : f, U = I.inlineImages, D = I.recordCanvas, me = I.keepIframeSrcFn, ne = I.newlyAddedElement, ce = ne !== void 0 && ne, oe = I.rootId, W = function(ee, ge, ke) {
2147
2147
  if (typeof ge == "string") {
2148
2148
  if (ee.classList.contains(ge)) return !0;
2149
2149
  } else for (var Ce = ee.classList.length; Ce--; ) {
2150
- var je = ee.classList[Ce];
2151
- if (ge.test(je)) return !0;
2150
+ var ze = ee.classList[Ce];
2151
+ if (ge.test(ze)) return !0;
2152
2152
  }
2153
2153
  return !!ke && ee.matches(ke);
2154
2154
  }(k, w, y), P = function(ee) {
@@ -2159,22 +2159,22 @@ function li(t, e) {
2159
2159
  var X = k.attributes[Y];
2160
2160
  O[X.name] = un(m, P, X.name, X.value);
2161
2161
  }
2162
- if (P === "link" && z) {
2162
+ if (P === "link" && E) {
2163
2163
  var J = Array.from(m.styleSheets).find(function(ee) {
2164
2164
  return ee.href === k.href;
2165
2165
  }), re = null;
2166
- J && (re = Ua(J)), re && (delete O.rel, delete O.href, O._cssText = ua(re, J.href));
2166
+ J && (re = Wa(J)), re && (delete O.rel, delete O.href, O._cssText = ua(re, J.href));
2167
2167
  }
2168
- if (P === "style" && k.sheet && !(k.innerText || k.textContent || "").trim().length && (re = Ua(k.sheet)) && (O._cssText = ua(re, Wa())), P === "input" || P === "textarea" || P === "select") {
2168
+ if (P === "style" && k.sheet && !(k.innerText || k.textContent || "").trim().length && (re = Wa(k.sheet)) && (O._cssText = ua(re, Ua())), P === "input" || P === "textarea" || P === "select") {
2169
2169
  var L = k.value, A = k.checked;
2170
- O.type !== "radio" && O.type !== "checkbox" && O.type !== "submit" && O.type !== "button" && L ? O.value = at({ type: O.type, tagName: P, value: L, maskInputOptions: E, maskInputFn: x }) : A && (O.checked = A);
2170
+ O.type !== "radio" && O.type !== "checkbox" && O.type !== "submit" && O.type !== "button" && L ? O.value = at({ type: O.type, tagName: P, value: L, maskInputOptions: j, maskInputFn: x }) : A && (O.checked = A);
2171
2171
  }
2172
- if (P === "option" && (k.selected && !E.select ? O.selected = !0 : delete O.selected), P === "canvas" && D) {
2172
+ if (P === "option" && (k.selected && !j.select ? O.selected = !0 : delete O.selected), P === "canvas" && D) {
2173
2173
  if (k.__context === "2d") (function(ee) {
2174
2174
  var ge = ee.getContext("2d");
2175
2175
  if (!ge) return !0;
2176
2176
  for (var ke = 0; ke < ee.width; ke += 50) for (var Ce = 0; Ce < ee.height; Ce += 50) {
2177
- var je = ge.getImageData, Ca = At in je ? je[At] : je;
2177
+ var ze = ge.getImageData, Ca = At in ze ? ze[At] : ze;
2178
2178
  if (new Uint32Array(Ca.call(ge, ke, Ce, Math.min(50, ee.width - ke), Math.min(50, ee.height - Ce)).data.buffer).some(function(ea) {
2179
2179
  return ea !== 0;
2180
2180
  })) return !1;
@@ -2186,13 +2186,13 @@ function li(t, e) {
2186
2186
  K.width = k.width, K.height = k.height, G !== K.toDataURL(F.type, F.quality) && (O.rr_dataURL = G);
2187
2187
  }
2188
2188
  }
2189
- if (P === "img" && W) {
2190
- Fe || (Fe = m.createElement("canvas"), zt = Fe.getContext("2d"));
2189
+ if (P === "img" && U) {
2190
+ Fe || (Fe = m.createElement("canvas"), Et = Fe.getContext("2d"));
2191
2191
  var Q = k, Z = Q.crossOrigin;
2192
2192
  Q.crossOrigin = "anonymous";
2193
2193
  var ye = function() {
2194
2194
  try {
2195
- Fe.width = Q.naturalWidth, Fe.height = Q.naturalHeight, zt.drawImage(Q, 0, 0), O.rr_dataURL = Fe.toDataURL(F.type, F.quality);
2195
+ Fe.width = Q.naturalWidth, Fe.height = Q.naturalHeight, Et.drawImage(Q, 0, 0), O.rr_dataURL = Fe.toDataURL(F.type, F.quality);
2196
2196
  } catch (ee) {
2197
2197
  console.warn("Cannot inline img src=".concat(Q.currentSrc, "! Error: ").concat(ee));
2198
2198
  }
@@ -2200,27 +2200,27 @@ function li(t, e) {
2200
2200
  };
2201
2201
  Q.complete && Q.naturalWidth !== 0 ? ye() : Q.onload = ye;
2202
2202
  }
2203
- if (P !== "audio" && P !== "video" || (O.rr_mediaState = k.paused ? "paused" : "played", O.rr_mediaCurrentTime = k.currentTime), ce || (k.scrollLeft && (O.rr_scrollLeft = k.scrollLeft), k.scrollTop && (O.rr_scrollTop = k.scrollTop)), U) {
2204
- var ze = k.getBoundingClientRect(), Oe = ze.width, $e = ze.height;
2203
+ if (P !== "audio" && P !== "video" || (O.rr_mediaState = k.paused ? "paused" : "played", O.rr_mediaCurrentTime = k.currentTime), ce || (k.scrollLeft && (O.rr_scrollLeft = k.scrollLeft), k.scrollTop && (O.rr_scrollTop = k.scrollTop)), W) {
2204
+ var Ee = k.getBoundingClientRect(), Oe = Ee.width, $e = Ee.height;
2205
2205
  O = { class: O.class, rr_width: "".concat(Oe, "px"), rr_height: "".concat($e, "px") };
2206
2206
  }
2207
- return P !== "iframe" || me(O.src) || (k.contentDocument || (O.rr_src = O.src), delete O.src), { type: ie.Element, tagName: P, attributes: O, childNodes: [], isSVG: si(k) || void 0, needBlock: U, rootId: oe };
2208
- }(t, { doc: a, blockClass: r, blockSelector: i, inlineStylesheet: l, maskInputOptions: h, maskInputFn: u, dataURLOptions: v, inlineImages: T, recordCanvas: p, keepIframeSrcFn: g, newlyAddedElement: j, rootId: M });
2207
+ return P !== "iframe" || me(O.src) || (k.contentDocument || (O.rr_src = O.src), delete O.src), { type: ie.Element, tagName: P, attributes: O, childNodes: [], isSVG: si(k) || void 0, needBlock: W, rootId: oe };
2208
+ }(t, { doc: a, blockClass: r, blockSelector: i, inlineStylesheet: l, maskInputOptions: h, maskInputFn: u, dataURLOptions: v, inlineImages: T, recordCanvas: p, keepIframeSrcFn: g, newlyAddedElement: z, rootId: M });
2209
2209
  case t.TEXT_NODE:
2210
2210
  return function(k, I) {
2211
- var m, w = I.maskTextClass, y = I.maskTextSelector, z = I.maskTextFn, S = I.rootId, E = k.parentNode && k.parentNode.tagName, x = k.textContent, f = E === "STYLE" || void 0, F = E === "SCRIPT" || void 0;
2211
+ var m, w = I.maskTextClass, y = I.maskTextSelector, E = I.maskTextFn, S = I.rootId, j = k.parentNode && k.parentNode.tagName, x = k.textContent, f = j === "STYLE" || void 0, F = j === "SCRIPT" || void 0;
2212
2212
  if (f && x) {
2213
2213
  try {
2214
- k.nextSibling || k.previousSibling || !((m = k.parentNode.sheet) === null || m === void 0) && m.cssRules && (x = (W = k.parentNode.sheet).cssRules ? Array.from(W.cssRules).map(function(D) {
2214
+ k.nextSibling || k.previousSibling || !((m = k.parentNode.sheet) === null || m === void 0) && m.cssRules && (x = (U = k.parentNode.sheet).cssRules ? Array.from(U.cssRules).map(function(D) {
2215
2215
  return D.cssText || "";
2216
2216
  }).join("") : "");
2217
2217
  } catch (D) {
2218
2218
  console.warn("Cannot get CSS styles from text's parentNode. Error: ".concat(D), k);
2219
2219
  }
2220
- x = ua(x, Wa());
2220
+ x = ua(x, Ua());
2221
2221
  }
2222
- var W;
2223
- return F && (x = "SCRIPT_PLACEHOLDER"), !f && !F && x && mn(k, w, y) && (x = z ? z(x) : x.replace(/[\S]/g, "*")), { type: ie.Text, textContent: x || "", isStyle: f, rootId: S };
2222
+ var U;
2223
+ return F && (x = "SCRIPT_PLACEHOLDER"), !f && !F && x && mn(k, w, y) && (x = E ? E(x) : x.replace(/[\S]/g, "*")), { type: ie.Text, textContent: x || "", isStyle: f, rootId: S };
2224
2224
  }(t, { maskTextClass: o, maskTextSelector: s, maskTextFn: d, rootId: M });
2225
2225
  case t.CDATA_SECTION_NODE:
2226
2226
  return { type: ie.CDATA, textContent: "", rootId: M };
@@ -2233,35 +2233,35 @@ function li(t, e) {
2233
2233
  function H(t) {
2234
2234
  return t === void 0 ? "" : t.toLowerCase();
2235
2235
  }
2236
- function Ue(t, e) {
2237
- var a, n = e.doc, r = e.mirror, i = e.blockClass, o = e.blockSelector, s = e.maskTextClass, l = e.maskTextSelector, c = e.skipChild, h = c !== void 0 && c, d = e.inlineStylesheet, u = d === void 0 || d, b = e.maskInputOptions, v = b === void 0 ? {} : b, T = e.maskTextFn, p = e.maskInputFn, g = e.slimDOMOptions, C = e.dataURLOptions, j = C === void 0 ? {} : C, M = e.inlineImages, k = M !== void 0 && M, I = e.recordCanvas, m = I !== void 0 && I, w = e.onSerialize, y = e.onIframeLoad, z = e.iframeLoadTimeout, S = z === void 0 ? 5e3 : z, E = e.onStylesheetLoad, x = e.stylesheetLoadTimeout, f = x === void 0 ? 5e3 : x, F = e.keepIframeSrcFn, W = F === void 0 ? function() {
2236
+ function We(t, e) {
2237
+ var a, n = e.doc, r = e.mirror, i = e.blockClass, o = e.blockSelector, s = e.maskTextClass, l = e.maskTextSelector, c = e.skipChild, h = c !== void 0 && c, d = e.inlineStylesheet, u = d === void 0 || d, b = e.maskInputOptions, v = b === void 0 ? {} : b, T = e.maskTextFn, p = e.maskInputFn, g = e.slimDOMOptions, C = e.dataURLOptions, z = C === void 0 ? {} : C, M = e.inlineImages, k = M !== void 0 && M, I = e.recordCanvas, m = I !== void 0 && I, w = e.onSerialize, y = e.onIframeLoad, E = e.iframeLoadTimeout, S = E === void 0 ? 5e3 : E, j = e.onStylesheetLoad, x = e.stylesheetLoadTimeout, f = x === void 0 ? 5e3 : x, F = e.keepIframeSrcFn, U = F === void 0 ? function() {
2238
2238
  return !1;
2239
- } : F, D = e.newlyAddedElement, me = D !== void 0 && D, ne = e.preserveWhiteSpace, ce = ne === void 0 || ne, oe = li(t, { doc: n, mirror: r, blockClass: i, blockSelector: o, maskTextClass: s, maskTextSelector: l, inlineStylesheet: u, maskInputOptions: v, maskTextFn: T, maskInputFn: p, dataURLOptions: j, inlineImages: k, recordCanvas: m, keepIframeSrcFn: W, newlyAddedElement: me });
2239
+ } : F, D = e.newlyAddedElement, me = D !== void 0 && D, ne = e.preserveWhiteSpace, ce = ne === void 0 || ne, oe = li(t, { doc: n, mirror: r, blockClass: i, blockSelector: o, maskTextClass: s, maskTextSelector: l, inlineStylesheet: u, maskInputOptions: v, maskTextFn: T, maskInputFn: p, dataURLOptions: z, inlineImages: k, recordCanvas: m, keepIframeSrcFn: U, newlyAddedElement: me });
2240
2240
  if (!oe) return console.warn(t, "not serialized"), null;
2241
2241
  a = r.hasNode(t) ? r.getId(t) : !function(A, G) {
2242
2242
  return !!(G.comment && A.type === ie.Comment || A.type === ie.Element && (G.script && (A.tagName === "script" || A.tagName === "link" && A.attributes.rel === "preload" && A.attributes.as === "script" || A.tagName === "link" && A.attributes.rel === "prefetch" && typeof A.attributes.href == "string" && A.attributes.href.endsWith(".js")) || G.headFavicon && (A.tagName === "link" && A.attributes.rel === "shortcut icon" || A.tagName === "meta" && (H(A.attributes.name).match(/^msapplication-tile(image|color)$/) || H(A.attributes.name) === "application-name" || H(A.attributes.rel) === "icon" || H(A.attributes.rel) === "apple-touch-icon" || H(A.attributes.rel) === "shortcut icon")) || A.tagName === "meta" && (G.headMetaDescKeywords && H(A.attributes.name).match(/^description|keywords$/) || G.headMetaSocial && (H(A.attributes.property).match(/^(og|twitter|fb):/) || H(A.attributes.name).match(/^(og|twitter):/) || H(A.attributes.name) === "pinterest") || G.headMetaRobots && (H(A.attributes.name) === "robots" || H(A.attributes.name) === "googlebot" || H(A.attributes.name) === "bingbot") || G.headMetaHttpEquiv && A.attributes["http-equiv"] !== void 0 || G.headMetaAuthorship && (H(A.attributes.name) === "author" || H(A.attributes.name) === "generator" || H(A.attributes.name) === "framework" || H(A.attributes.name) === "publisher" || H(A.attributes.name) === "progid" || H(A.attributes.property).match(/^article:/) || H(A.attributes.property).match(/^product:/)) || G.headMetaVerification && (H(A.attributes.name) === "google-site-verification" || H(A.attributes.name) === "yandex-verification" || H(A.attributes.name) === "csrf-token" || H(A.attributes.name) === "p:domain_verify" || H(A.attributes.name) === "verify-v1" || H(A.attributes.name) === "verification" || H(A.attributes.name) === "shopify-checkout-api-token"))));
2243
2243
  }(oe, g) && (ce || oe.type !== ie.Text || oe.isStyle || oe.textContent.replace(/^\s+|\s+$/gm, "").length) ? dn() : -2;
2244
- var U = Object.assign(oe, { id: a });
2245
- if (r.add(t, U), a === -2) return null;
2244
+ var W = Object.assign(oe, { id: a });
2245
+ if (r.add(t, W), a === -2) return null;
2246
2246
  w && w(t);
2247
2247
  var P = !h;
2248
- if (U.type === ie.Element) {
2249
- P = P && !U.needBlock, delete U.needBlock;
2248
+ if (W.type === ie.Element) {
2249
+ P = P && !W.needBlock, delete W.needBlock;
2250
2250
  var O = t.shadowRoot;
2251
- O && Qe(O) && (U.isShadowHost = !0);
2251
+ O && Qe(O) && (W.isShadowHost = !0);
2252
2252
  }
2253
- if ((U.type === ie.Document || U.type === ie.Element) && P) {
2254
- g.headWhitespace && U.type === ie.Element && U.tagName === "head" && (ce = !1);
2255
- for (var N = { doc: n, mirror: r, blockClass: i, blockSelector: o, maskTextClass: s, maskTextSelector: l, skipChild: h, inlineStylesheet: u, maskInputOptions: v, maskTextFn: T, maskInputFn: p, slimDOMOptions: g, dataURLOptions: j, inlineImages: k, recordCanvas: m, preserveWhiteSpace: ce, onSerialize: w, onIframeLoad: y, iframeLoadTimeout: S, onStylesheetLoad: E, stylesheetLoadTimeout: f, keepIframeSrcFn: W }, Y = 0, X = Array.from(t.childNodes); Y < X.length; Y++)
2256
- (L = Ue(X[Y], N)) && U.childNodes.push(L);
2253
+ if ((W.type === ie.Document || W.type === ie.Element) && P) {
2254
+ g.headWhitespace && W.type === ie.Element && W.tagName === "head" && (ce = !1);
2255
+ for (var N = { doc: n, mirror: r, blockClass: i, blockSelector: o, maskTextClass: s, maskTextSelector: l, skipChild: h, inlineStylesheet: u, maskInputOptions: v, maskTextFn: T, maskInputFn: p, slimDOMOptions: g, dataURLOptions: z, inlineImages: k, recordCanvas: m, preserveWhiteSpace: ce, onSerialize: w, onIframeLoad: y, iframeLoadTimeout: S, onStylesheetLoad: j, stylesheetLoadTimeout: f, keepIframeSrcFn: U }, Y = 0, X = Array.from(t.childNodes); Y < X.length; Y++)
2256
+ (L = We(X[Y], N)) && W.childNodes.push(L);
2257
2257
  if (function(A) {
2258
2258
  return A.nodeType === A.ELEMENT_NODE;
2259
2259
  }(t) && t.shadowRoot) for (var J = 0, re = Array.from(t.shadowRoot.childNodes); J < re.length; J++) {
2260
2260
  var L;
2261
- (L = Ue(re[J], N)) && (Qe(t.shadowRoot) && (L.isShadow = !0), U.childNodes.push(L));
2261
+ (L = We(re[J], N)) && (Qe(t.shadowRoot) && (L.isShadow = !0), W.childNodes.push(L));
2262
2262
  }
2263
2263
  }
2264
- return t.parentNode && Je(t.parentNode) && Qe(t.parentNode) && (U.isShadow = !0), U.type === ie.Element && U.tagName === "iframe" && function(A, G, K) {
2264
+ return t.parentNode && Je(t.parentNode) && Qe(t.parentNode) && (W.isShadow = !0), W.type === ie.Element && W.tagName === "iframe" && function(A, G, K) {
2265
2265
  var Q = A.contentWindow;
2266
2266
  if (Q) {
2267
2267
  var Z, ye = !1;
@@ -2271,8 +2271,8 @@ function Ue(t, e) {
2271
2271
  return;
2272
2272
  }
2273
2273
  if (Z === "complete") {
2274
- var ze = "about:blank";
2275
- if (Q.location.href !== ze || A.src === ze || A.src === "") return setTimeout(G, 0), A.addEventListener("load", G);
2274
+ var Ee = "about:blank";
2275
+ if (Q.location.href !== Ee || A.src === Ee || A.src === "") return setTimeout(G, 0), A.addEventListener("load", G);
2276
2276
  A.addEventListener("load", G);
2277
2277
  } else {
2278
2278
  var Oe = setTimeout(function() {
@@ -2286,14 +2286,14 @@ function Ue(t, e) {
2286
2286
  }(t, function() {
2287
2287
  var A = t.contentDocument;
2288
2288
  if (A && y) {
2289
- var G = Ue(A, { doc: A, mirror: r, blockClass: i, blockSelector: o, maskTextClass: s, maskTextSelector: l, skipChild: !1, inlineStylesheet: u, maskInputOptions: v, maskTextFn: T, maskInputFn: p, slimDOMOptions: g, dataURLOptions: j, inlineImages: k, recordCanvas: m, preserveWhiteSpace: ce, onSerialize: w, onIframeLoad: y, iframeLoadTimeout: S, onStylesheetLoad: E, stylesheetLoadTimeout: f, keepIframeSrcFn: W });
2289
+ var G = We(A, { doc: A, mirror: r, blockClass: i, blockSelector: o, maskTextClass: s, maskTextSelector: l, skipChild: !1, inlineStylesheet: u, maskInputOptions: v, maskTextFn: T, maskInputFn: p, slimDOMOptions: g, dataURLOptions: z, inlineImages: k, recordCanvas: m, preserveWhiteSpace: ce, onSerialize: w, onIframeLoad: y, iframeLoadTimeout: S, onStylesheetLoad: j, stylesheetLoadTimeout: f, keepIframeSrcFn: U });
2290
2290
  G && y(t, G);
2291
2291
  }
2292
- }, S), U.type === ie.Element && U.tagName === "link" && U.attributes.rel === "stylesheet" && function(A, G, K) {
2292
+ }, S), W.type === ie.Element && W.tagName === "link" && W.attributes.rel === "stylesheet" && function(A, G, K) {
2293
2293
  var Q, Z = !1;
2294
2294
  try {
2295
2295
  Q = A.sheet;
2296
- } catch (ze) {
2296
+ } catch (Ee) {
2297
2297
  return;
2298
2298
  }
2299
2299
  if (!Q) {
@@ -2305,11 +2305,11 @@ function Ue(t, e) {
2305
2305
  });
2306
2306
  }
2307
2307
  }(t, function() {
2308
- if (E) {
2309
- var A = Ue(t, { doc: n, mirror: r, blockClass: i, blockSelector: o, maskTextClass: s, maskTextSelector: l, skipChild: !1, inlineStylesheet: u, maskInputOptions: v, maskTextFn: T, maskInputFn: p, slimDOMOptions: g, dataURLOptions: j, inlineImages: k, recordCanvas: m, preserveWhiteSpace: ce, onSerialize: w, onIframeLoad: y, iframeLoadTimeout: S, onStylesheetLoad: E, stylesheetLoadTimeout: f, keepIframeSrcFn: W });
2310
- A && E(t, A);
2308
+ if (j) {
2309
+ var A = We(t, { doc: n, mirror: r, blockClass: i, blockSelector: o, maskTextClass: s, maskTextSelector: l, skipChild: !1, inlineStylesheet: u, maskInputOptions: v, maskTextFn: T, maskInputFn: p, slimDOMOptions: g, dataURLOptions: z, inlineImages: k, recordCanvas: m, preserveWhiteSpace: ce, onSerialize: w, onIframeLoad: y, iframeLoadTimeout: S, onStylesheetLoad: j, stylesheetLoadTimeout: f, keepIframeSrcFn: U });
2310
+ A && j(t, A);
2311
2311
  }
2312
- }, f), U;
2312
+ }, f), W;
2313
2313
  }
2314
2314
  function se(t, e, a = document) {
2315
2315
  const n = { capture: !0, passive: !0 };
@@ -2318,7 +2318,7 @@ function se(t, e, a = document) {
2318
2318
  const qe = `Please stop import mirror directly. Instead of that,\r
2319
2319
  now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
2320
2320
  or you can use record.mirror to access the mirror instance during recording.`;
2321
- let jt = { map: {}, getId: () => (console.error(qe), -1), getNode: () => (console.error(qe), null), removeNodeFromMap() {
2321
+ let zt = { map: {}, getId: () => (console.error(qe), -1), getNode: () => (console.error(qe), null), removeNodeFromMap() {
2322
2322
  console.error(qe);
2323
2323
  }, has: () => (console.error(qe), !1), reset() {
2324
2324
  console.error(qe);
@@ -2390,7 +2390,7 @@ function kn(t, e) {
2390
2390
  function wn(t) {
2391
2391
  return !!(t != null && t.shadowRoot);
2392
2392
  }
2393
- typeof window != "undefined" && window.Proxy && window.Reflect && (jt = new Proxy(jt, { get: (t, e, a) => (e === "map" && console.error(qe), Reflect.get(t, e, a)) }));
2393
+ typeof window != "undefined" && window.Proxy && window.Reflect && (zt = new Proxy(zt, { get: (t, e, a) => (e === "map" && console.error(qe), Reflect.get(t, e, a)) }));
2394
2394
  class ci {
2395
2395
  constructor() {
2396
2396
  this.id = 1, this.styleIDMap = /* @__PURE__ */ new WeakMap(), this.idStyleMap = /* @__PURE__ */ new Map();
@@ -2418,7 +2418,7 @@ class ci {
2418
2418
  }
2419
2419
  }
2420
2420
  var q = ((t) => (t[t.DomContentLoaded = 0] = "DomContentLoaded", t[t.Load = 1] = "Load", t[t.FullSnapshot = 2] = "FullSnapshot", t[t.IncrementalSnapshot = 3] = "IncrementalSnapshot", t[t.Meta = 4] = "Meta", t[t.Custom = 5] = "Custom", t[t.Plugin = 6] = "Plugin", t))(q || {}), V = ((t) => (t[t.Mutation = 0] = "Mutation", t[t.MouseMove = 1] = "MouseMove", t[t.MouseInteraction = 2] = "MouseInteraction", t[t.Scroll = 3] = "Scroll", t[t.ViewportResize = 4] = "ViewportResize", t[t.Input = 5] = "Input", t[t.TouchMove = 6] = "TouchMove", t[t.MediaInteraction = 7] = "MediaInteraction", t[t.StyleSheetRule = 8] = "StyleSheetRule", t[t.CanvasMutation = 9] = "CanvasMutation", t[t.Font = 10] = "Font", t[t.Log = 11] = "Log", t[t.Drag = 12] = "Drag", t[t.StyleDeclaration = 13] = "StyleDeclaration", t[t.Selection = 14] = "Selection", t[t.AdoptedStyleSheet = 15] = "AdoptedStyleSheet", t))(V || {}), Pa = ((t) => (t[t.MouseUp = 0] = "MouseUp", t[t.MouseDown = 1] = "MouseDown", t[t.Click = 2] = "Click", t[t.ContextMenu = 3] = "ContextMenu", t[t.DblClick = 4] = "DblClick", t[t.Focus = 5] = "Focus", t[t.Blur = 6] = "Blur", t[t.TouchStart = 7] = "TouchStart", t[t.TouchMove_Departed = 8] = "TouchMove_Departed", t[t.TouchEnd = 9] = "TouchEnd", t[t.TouchCancel = 10] = "TouchCancel", t))(Pa || {}), Ve = ((t) => (t[t["2D"] = 0] = "2D", t[t.WebGL = 1] = "WebGL", t[t.WebGL2 = 2] = "WebGL2", t))(Ve || {});
2421
- function Et(t) {
2421
+ function jt(t) {
2422
2422
  return "__ln" in t;
2423
2423
  }
2424
2424
  class hi {
@@ -2433,10 +2433,10 @@ class hi {
2433
2433
  }
2434
2434
  addNode(e) {
2435
2435
  const a = { value: e, previous: null, next: null };
2436
- if (e.__ln = a, e.previousSibling && Et(e.previousSibling)) {
2436
+ if (e.__ln = a, e.previousSibling && jt(e.previousSibling)) {
2437
2437
  const n = e.previousSibling.__ln.next;
2438
2438
  a.next = n, a.previous = e.previousSibling.__ln, e.previousSibling.__ln.next = a, n && (n.previous = a);
2439
- } else if (e.nextSibling && Et(e.nextSibling) && e.nextSibling.__ln.previous) {
2439
+ } else if (e.nextSibling && jt(e.nextSibling) && e.nextSibling.__ln.previous) {
2440
2440
  const n = e.nextSibling.__ln.previous;
2441
2441
  a.previous = n, a.next = e.nextSibling.__ln, e.nextSibling.__ln.previous = a, n && (n.next = a);
2442
2442
  } else this.head && (this.head.previous = a), a.next = this.head, this.head = a;
@@ -2468,12 +2468,12 @@ class di {
2468
2468
  if (!s.parentNode || v) return;
2469
2469
  const T = Je(s.parentNode) ? this.mirror.getId(u) : this.mirror.getId(s.parentNode), p = n(s);
2470
2470
  if (T === -1 || p === -1) return a.addNode(s);
2471
- const g = Ue(s, { 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: (C) => {
2471
+ const g = We(s, { 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: (C) => {
2472
2472
  bn(C, this.mirror) && this.iframeManager.addIframe(C), kn(C, this.mirror) && this.stylesheetManager.trackLinkElement(C), wn(s) && this.shadowDomManager.addShadowRoot(s.shadowRoot, this.doc);
2473
- }, onIframeLoad: (C, j) => {
2474
- this.iframeManager.attachIframe(C, j), this.shadowDomManager.observeAttachShadow(C);
2475
- }, onStylesheetLoad: (C, j) => {
2476
- this.stylesheetManager.attachLinkElement(C, j);
2473
+ }, onIframeLoad: (C, z) => {
2474
+ this.iframeManager.attachIframe(C, z), this.shadowDomManager.observeAttachShadow(C);
2475
+ }, onStylesheetLoad: (C, z) => {
2476
+ this.stylesheetManager.attachLinkElement(C, z);
2477
2477
  } });
2478
2478
  g && e.push({ parentId: T, nextId: p, node: g });
2479
2479
  };
@@ -2606,7 +2606,7 @@ function In(t, e) {
2606
2606
  const { parentNode: a } = e;
2607
2607
  return !!a && (!!t.has(a) || In(t, a));
2608
2608
  }
2609
- const Me = [], Cn = typeof CSSGroupingRule != "undefined", Sn = typeof CSSMediaRule != "undefined", An = typeof CSSSupportsRule != "undefined", zn = typeof CSSConditionRule != "undefined";
2609
+ const Me = [], Cn = typeof CSSGroupingRule != "undefined", Sn = typeof CSSMediaRule != "undefined", An = typeof CSSSupportsRule != "undefined", En = typeof CSSConditionRule != "undefined";
2610
2610
  function Xe(t) {
2611
2611
  try {
2612
2612
  if ("composedPath" in t) {
@@ -2618,7 +2618,7 @@ function Xe(t) {
2618
2618
  return t.target;
2619
2619
  }
2620
2620
  }
2621
- function jn(t, e) {
2621
+ function zn(t, e) {
2622
2622
  var a, n;
2623
2623
  const r = new di();
2624
2624
  Me.push(r), r.init(t);
@@ -2646,7 +2646,7 @@ function ui({ mouseInteractionCb: t, doc: e, mirror: a, blockClass: n, blockSele
2646
2646
  s.forEach((l) => l());
2647
2647
  };
2648
2648
  }
2649
- function En({ scrollCb: t, doc: e, mirror: a, blockClass: n, blockSelector: r, sampling: i }) {
2649
+ function jn({ scrollCb: t, doc: e, mirror: a, blockClass: n, blockSelector: r, sampling: i }) {
2650
2650
  return se("scroll", He((o) => {
2651
2651
  const s = Xe(o);
2652
2652
  if (!s || le(s, n, r, !0)) return;
@@ -2664,7 +2664,7 @@ function Nt(t, e) {
2664
2664
  const mi = ["INPUT", "TEXTAREA", "SELECT"], Mt = /* @__PURE__ */ new WeakMap();
2665
2665
  function ia(t) {
2666
2666
  return function(e, a) {
2667
- if (Cn && e.parentRule instanceof CSSGroupingRule || Sn && e.parentRule instanceof CSSMediaRule || An && e.parentRule instanceof CSSSupportsRule || zn && e.parentRule instanceof CSSConditionRule) {
2667
+ if (Cn && e.parentRule instanceof CSSGroupingRule || Sn && e.parentRule instanceof CSSMediaRule || An && e.parentRule instanceof CSSSupportsRule || En && e.parentRule instanceof CSSConditionRule) {
2668
2668
  const n = Array.from(e.parentRule.cssRules).indexOf(e);
2669
2669
  a.unshift(n);
2670
2670
  } else if (e.parentStyleSheet) {
@@ -2674,7 +2674,7 @@ function ia(t) {
2674
2674
  return a;
2675
2675
  }(t, []);
2676
2676
  }
2677
- function Ee(t, e, a) {
2677
+ function je(t, e, a) {
2678
2678
  let n, r;
2679
2679
  return t ? (t.ownerNode ? n = e.getId(t.ownerNode) : r = a.getId(t), { styleId: r, id: n }) : {};
2680
2680
  }
@@ -2704,11 +2704,11 @@ function gi(t, e = {}) {
2704
2704
  if (!a) return () => {
2705
2705
  };
2706
2706
  (function(p, g) {
2707
- const { mutationCb: C, mousemoveCb: j, mouseInteractionCb: M, scrollCb: k, viewportResizeCb: I, inputCb: m, mediaInteractionCb: w, styleSheetRuleCb: y, styleDeclarationCb: z, canvasMutationCb: S, fontCb: E, selectionCb: x } = p;
2707
+ const { mutationCb: C, mousemoveCb: z, mouseInteractionCb: M, scrollCb: k, viewportResizeCb: I, inputCb: m, mediaInteractionCb: w, styleSheetRuleCb: y, styleDeclarationCb: E, canvasMutationCb: S, fontCb: j, selectionCb: x } = p;
2708
2708
  p.mutationCb = (...f) => {
2709
2709
  g.mutation && g.mutation(...f), C(...f);
2710
2710
  }, p.mousemoveCb = (...f) => {
2711
- g.mousemove && g.mousemove(...f), j(...f);
2711
+ g.mousemove && g.mousemove(...f), z(...f);
2712
2712
  }, p.mouseInteractionCb = (...f) => {
2713
2713
  g.mouseInteraction && g.mouseInteraction(...f), M(...f);
2714
2714
  }, p.scrollCb = (...f) => {
@@ -2722,126 +2722,126 @@ function gi(t, e = {}) {
2722
2722
  }, p.styleSheetRuleCb = (...f) => {
2723
2723
  g.styleSheetRule && g.styleSheetRule(...f), y(...f);
2724
2724
  }, p.styleDeclarationCb = (...f) => {
2725
- g.styleDeclaration && g.styleDeclaration(...f), z(...f);
2725
+ g.styleDeclaration && g.styleDeclaration(...f), E(...f);
2726
2726
  }, p.canvasMutationCb = (...f) => {
2727
2727
  g.canvasMutation && g.canvasMutation(...f), S(...f);
2728
2728
  }, p.fontCb = (...f) => {
2729
- g.font && g.font(...f), E(...f);
2729
+ g.font && g.font(...f), j(...f);
2730
2730
  }, p.selectionCb = (...f) => {
2731
2731
  g.selection && g.selection(...f), x(...f);
2732
2732
  };
2733
2733
  })(t, e);
2734
- const n = jn(t, t.doc), r = function({ mousemoveCb: p, sampling: g, doc: C, mirror: j }) {
2734
+ const n = zn(t, t.doc), r = function({ mousemoveCb: p, sampling: g, doc: C, mirror: z }) {
2735
2735
  if (g.mousemove === !1) return () => {
2736
2736
  };
2737
2737
  const M = typeof g.mousemove == "number" ? g.mousemove : 50, k = typeof g.mousemoveCallback == "number" ? g.mousemoveCallback : 500;
2738
2738
  let I, m = [];
2739
2739
  const w = He((S) => {
2740
- const E = Date.now() - I;
2741
- p(m.map((x) => (x.timeOffset -= E, x)), S), m = [], I = null;
2740
+ const j = Date.now() - I;
2741
+ p(m.map((x) => (x.timeOffset -= j, x)), S), m = [], I = null;
2742
2742
  }, k), y = He((S) => {
2743
- const E = Xe(S), { clientX: x, clientY: f } = fn(S) ? S.changedTouches[0] : S;
2744
- I || (I = Date.now()), m.push({ x, y: f, id: j.getId(E), timeOffset: Date.now() - I }), w(typeof DragEvent != "undefined" && S instanceof DragEvent ? V.Drag : S instanceof MouseEvent ? V.MouseMove : V.TouchMove);
2745
- }, M, { trailing: !1 }), z = [se("mousemove", y, C), se("touchmove", y, C), se("drag", y, C)];
2743
+ const j = Xe(S), { clientX: x, clientY: f } = fn(S) ? S.changedTouches[0] : S;
2744
+ I || (I = Date.now()), m.push({ x, y: f, id: z.getId(j), timeOffset: Date.now() - I }), w(typeof DragEvent != "undefined" && S instanceof DragEvent ? V.Drag : S instanceof MouseEvent ? V.MouseMove : V.TouchMove);
2745
+ }, M, { trailing: !1 }), E = [se("mousemove", y, C), se("touchmove", y, C), se("drag", y, C)];
2746
2746
  return () => {
2747
- z.forEach((S) => S());
2747
+ E.forEach((S) => S());
2748
2748
  };
2749
- }(t), i = ui(t), o = En(t), s = function({ viewportResizeCb: p }) {
2749
+ }(t), i = ui(t), o = jn(t), s = function({ viewportResizeCb: p }) {
2750
2750
  let g = -1, C = -1;
2751
2751
  return se("resize", He(() => {
2752
- const j = gn(), M = pn();
2753
- g === j && C === M || (p({ width: Number(M), height: Number(j) }), g = j, C = M);
2752
+ const z = gn(), M = pn();
2753
+ g === z && C === M || (p({ width: Number(M), height: Number(z) }), g = z, C = M);
2754
2754
  }, 200), window);
2755
- }(t), l = function({ inputCb: p, doc: g, mirror: C, blockClass: j, blockSelector: M, ignoreClass: k, maskInputOptions: I, maskInputFn: m, sampling: w, userTriggeredOnInput: y }) {
2756
- function z(W) {
2757
- let D = Xe(W);
2758
- const me = W.isTrusted;
2759
- if (D && D.tagName === "OPTION" && (D = D.parentElement), !D || !D.tagName || mi.indexOf(D.tagName) < 0 || le(D, j, M, !0)) return;
2755
+ }(t), l = function({ inputCb: p, doc: g, mirror: C, blockClass: z, blockSelector: M, ignoreClass: k, maskInputOptions: I, maskInputFn: m, sampling: w, userTriggeredOnInput: y }) {
2756
+ function E(U) {
2757
+ let D = Xe(U);
2758
+ const me = U.isTrusted;
2759
+ if (D && D.tagName === "OPTION" && (D = D.parentElement), !D || !D.tagName || mi.indexOf(D.tagName) < 0 || le(D, z, M, !0)) return;
2760
2760
  const ne = D.type;
2761
2761
  if (D.classList.contains(k)) return;
2762
2762
  let ce = D.value, oe = !1;
2763
2763
  ne === "radio" || ne === "checkbox" ? oe = D.checked : (I[D.tagName.toLowerCase()] || I[ne]) && (ce = at({ maskInputOptions: I, tagName: D.tagName, type: ne, value: ce, maskInputFn: m })), S(D, Nt({ text: ce, isChecked: oe, userTriggered: me }, y));
2764
- const U = D.name;
2765
- ne === "radio" && U && oe && g.querySelectorAll(`input[type="radio"][name="${U}"]`).forEach((P) => {
2764
+ const W = D.name;
2765
+ ne === "radio" && W && oe && g.querySelectorAll(`input[type="radio"][name="${W}"]`).forEach((P) => {
2766
2766
  P !== D && S(P, Nt({ text: P.value, isChecked: !oe, userTriggered: !1 }, y));
2767
2767
  });
2768
2768
  }
2769
- function S(W, D) {
2770
- const me = Mt.get(W);
2769
+ function S(U, D) {
2770
+ const me = Mt.get(U);
2771
2771
  if (!me || me.text !== D.text || me.isChecked !== D.isChecked) {
2772
- Mt.set(W, D);
2773
- const ne = C.getId(W);
2772
+ Mt.set(U, D);
2773
+ const ne = C.getId(U);
2774
2774
  p(Object.assign(Object.assign({}, D), { id: ne }));
2775
2775
  }
2776
2776
  }
2777
- const E = (w.input === "last" ? ["change"] : ["input", "change"]).map((W) => se(W, z, g)), x = g.defaultView;
2777
+ const j = (w.input === "last" ? ["change"] : ["input", "change"]).map((U) => se(U, E, g)), x = g.defaultView;
2778
2778
  if (!x) return () => {
2779
- E.forEach((W) => W());
2779
+ j.forEach((U) => U());
2780
2780
  };
2781
2781
  const f = x.Object.getOwnPropertyDescriptor(x.HTMLInputElement.prototype, "value"), F = [[x.HTMLInputElement.prototype, "value"], [x.HTMLInputElement.prototype, "checked"], [x.HTMLSelectElement.prototype, "value"], [x.HTMLTextAreaElement.prototype, "value"], [x.HTMLSelectElement.prototype, "selectedIndex"], [x.HTMLOptionElement.prototype, "selected"]];
2782
- return f && f.set && E.push(...F.map((W) => Ia(W[0], W[1], { set() {
2783
- z({ target: this });
2782
+ return f && f.set && j.push(...F.map((U) => Ia(U[0], U[1], { set() {
2783
+ E({ target: this });
2784
2784
  } }, !1, x))), () => {
2785
- E.forEach((W) => W());
2785
+ j.forEach((U) => U());
2786
2786
  };
2787
- }(t), c = function({ mediaInteractionCb: p, blockClass: g, blockSelector: C, mirror: j, sampling: M }) {
2787
+ }(t), c = function({ mediaInteractionCb: p, blockClass: g, blockSelector: C, mirror: z, sampling: M }) {
2788
2788
  const k = (m) => He((w) => {
2789
2789
  const y = Xe(w);
2790
2790
  if (!y || le(y, g, C, !0)) return;
2791
- const { currentTime: z, volume: S, muted: E, playbackRate: x } = y;
2792
- p({ type: m, id: j.getId(y), currentTime: z, volume: S, muted: E, playbackRate: x });
2791
+ const { currentTime: E, volume: S, muted: j, playbackRate: x } = y;
2792
+ p({ type: m, id: z.getId(y), currentTime: E, volume: S, muted: j, playbackRate: x });
2793
2793
  }, M.media || 500), I = [se("play", k(0)), se("pause", k(1)), se("seeked", k(2)), se("volumechange", k(3)), se("ratechange", k(4))];
2794
2794
  return () => {
2795
2795
  I.forEach((m) => m());
2796
2796
  };
2797
- }(t), h = function({ styleSheetRuleCb: p, mirror: g, stylesheetManager: C }, { win: j }) {
2798
- const M = j.CSSStyleSheet.prototype.insertRule;
2799
- j.CSSStyleSheet.prototype.insertRule = function(z, S) {
2800
- const { id: E, styleId: x } = Ee(this, g, C.styleMirror);
2801
- return (E && E !== -1 || x && x !== -1) && p({ id: E, styleId: x, adds: [{ rule: z, index: S }] }), M.apply(this, [z, S]);
2797
+ }(t), h = function({ styleSheetRuleCb: p, mirror: g, stylesheetManager: C }, { win: z }) {
2798
+ const M = z.CSSStyleSheet.prototype.insertRule;
2799
+ z.CSSStyleSheet.prototype.insertRule = function(E, S) {
2800
+ const { id: j, styleId: x } = je(this, g, C.styleMirror);
2801
+ return (j && j !== -1 || x && x !== -1) && p({ id: j, styleId: x, adds: [{ rule: E, index: S }] }), M.apply(this, [E, S]);
2802
2802
  };
2803
- const k = j.CSSStyleSheet.prototype.deleteRule;
2803
+ const k = z.CSSStyleSheet.prototype.deleteRule;
2804
2804
  let I, m;
2805
- j.CSSStyleSheet.prototype.deleteRule = function(z) {
2806
- const { id: S, styleId: E } = Ee(this, g, C.styleMirror);
2807
- return (S && S !== -1 || E && E !== -1) && p({ id: S, styleId: E, removes: [{ index: z }] }), k.apply(this, [z]);
2808
- }, j.CSSStyleSheet.prototype.replace && (I = j.CSSStyleSheet.prototype.replace, j.CSSStyleSheet.prototype.replace = function(z) {
2809
- const { id: S, styleId: E } = Ee(this, g, C.styleMirror);
2810
- return (S && S !== -1 || E && E !== -1) && p({ id: S, styleId: E, replace: z }), I.apply(this, [z]);
2811
- }), j.CSSStyleSheet.prototype.replaceSync && (m = j.CSSStyleSheet.prototype.replaceSync, j.CSSStyleSheet.prototype.replaceSync = function(z) {
2812
- const { id: S, styleId: E } = Ee(this, g, C.styleMirror);
2813
- return (S && S !== -1 || E && E !== -1) && p({ id: S, styleId: E, replaceSync: z }), m.apply(this, [z]);
2805
+ z.CSSStyleSheet.prototype.deleteRule = function(E) {
2806
+ const { id: S, styleId: j } = je(this, g, C.styleMirror);
2807
+ return (S && S !== -1 || j && j !== -1) && p({ id: S, styleId: j, removes: [{ index: E }] }), k.apply(this, [E]);
2808
+ }, z.CSSStyleSheet.prototype.replace && (I = z.CSSStyleSheet.prototype.replace, z.CSSStyleSheet.prototype.replace = function(E) {
2809
+ const { id: S, styleId: j } = je(this, g, C.styleMirror);
2810
+ return (S && S !== -1 || j && j !== -1) && p({ id: S, styleId: j, replace: E }), I.apply(this, [E]);
2811
+ }), z.CSSStyleSheet.prototype.replaceSync && (m = z.CSSStyleSheet.prototype.replaceSync, z.CSSStyleSheet.prototype.replaceSync = function(E) {
2812
+ const { id: S, styleId: j } = je(this, g, C.styleMirror);
2813
+ return (S && S !== -1 || j && j !== -1) && p({ id: S, styleId: j, replaceSync: E }), m.apply(this, [E]);
2814
2814
  });
2815
2815
  const w = {};
2816
- Cn ? w.CSSGroupingRule = j.CSSGroupingRule : (Sn && (w.CSSMediaRule = j.CSSMediaRule), zn && (w.CSSConditionRule = j.CSSConditionRule), An && (w.CSSSupportsRule = j.CSSSupportsRule));
2816
+ Cn ? w.CSSGroupingRule = z.CSSGroupingRule : (Sn && (w.CSSMediaRule = z.CSSMediaRule), En && (w.CSSConditionRule = z.CSSConditionRule), An && (w.CSSSupportsRule = z.CSSSupportsRule));
2817
2817
  const y = {};
2818
- return Object.entries(w).forEach(([z, S]) => {
2819
- y[z] = { insertRule: S.prototype.insertRule, deleteRule: S.prototype.deleteRule }, S.prototype.insertRule = function(E, x) {
2820
- const { id: f, styleId: F } = Ee(this.parentStyleSheet, g, C.styleMirror);
2821
- return (f && f !== -1 || F && F !== -1) && p({ id: f, styleId: F, adds: [{ rule: E, index: [...ia(this), x || 0] }] }), y[z].insertRule.apply(this, [E, x]);
2822
- }, S.prototype.deleteRule = function(E) {
2823
- const { id: x, styleId: f } = Ee(this.parentStyleSheet, g, C.styleMirror);
2824
- return (x && x !== -1 || f && f !== -1) && p({ id: x, styleId: f, removes: [{ index: [...ia(this), E] }] }), y[z].deleteRule.apply(this, [E]);
2818
+ return Object.entries(w).forEach(([E, S]) => {
2819
+ y[E] = { insertRule: S.prototype.insertRule, deleteRule: S.prototype.deleteRule }, S.prototype.insertRule = function(j, x) {
2820
+ const { id: f, styleId: F } = je(this.parentStyleSheet, g, C.styleMirror);
2821
+ return (f && f !== -1 || F && F !== -1) && p({ id: f, styleId: F, adds: [{ rule: j, index: [...ia(this), x || 0] }] }), y[E].insertRule.apply(this, [j, x]);
2822
+ }, S.prototype.deleteRule = function(j) {
2823
+ const { id: x, styleId: f } = je(this.parentStyleSheet, g, C.styleMirror);
2824
+ return (x && x !== -1 || f && f !== -1) && p({ id: x, styleId: f, removes: [{ index: [...ia(this), j] }] }), y[E].deleteRule.apply(this, [j]);
2825
2825
  };
2826
2826
  }), () => {
2827
- j.CSSStyleSheet.prototype.insertRule = M, j.CSSStyleSheet.prototype.deleteRule = k, I && (j.CSSStyleSheet.prototype.replace = I), m && (j.CSSStyleSheet.prototype.replaceSync = m), Object.entries(w).forEach(([z, S]) => {
2828
- S.prototype.insertRule = y[z].insertRule, S.prototype.deleteRule = y[z].deleteRule;
2827
+ z.CSSStyleSheet.prototype.insertRule = M, z.CSSStyleSheet.prototype.deleteRule = k, I && (z.CSSStyleSheet.prototype.replace = I), m && (z.CSSStyleSheet.prototype.replaceSync = m), Object.entries(w).forEach(([E, S]) => {
2828
+ S.prototype.insertRule = y[E].insertRule, S.prototype.deleteRule = y[E].deleteRule;
2829
2829
  });
2830
2830
  };
2831
- }(t, { win: a }), d = Tn(t, t.doc), u = function({ styleDeclarationCb: p, mirror: g, ignoreCSSAttributes: C, stylesheetManager: j }, { win: M }) {
2831
+ }(t, { win: a }), d = Tn(t, t.doc), u = function({ styleDeclarationCb: p, mirror: g, ignoreCSSAttributes: C, stylesheetManager: z }, { win: M }) {
2832
2832
  const k = M.CSSStyleDeclaration.prototype.setProperty;
2833
2833
  M.CSSStyleDeclaration.prototype.setProperty = function(m, w, y) {
2834
- var z;
2834
+ var E;
2835
2835
  if (C.has(m)) return k.apply(this, [m, w, y]);
2836
- const { id: S, styleId: E } = Ee((z = this.parentRule) === null || z === void 0 ? void 0 : z.parentStyleSheet, g, j.styleMirror);
2837
- return (S && S !== -1 || E && E !== -1) && p({ id: S, styleId: E, set: { property: m, value: w, priority: y }, index: ia(this.parentRule) }), k.apply(this, [m, w, y]);
2836
+ const { id: S, styleId: j } = je((E = this.parentRule) === null || E === void 0 ? void 0 : E.parentStyleSheet, g, z.styleMirror);
2837
+ return (S && S !== -1 || j && j !== -1) && p({ id: S, styleId: j, set: { property: m, value: w, priority: y }, index: ia(this.parentRule) }), k.apply(this, [m, w, y]);
2838
2838
  };
2839
2839
  const I = M.CSSStyleDeclaration.prototype.removeProperty;
2840
2840
  return M.CSSStyleDeclaration.prototype.removeProperty = function(m) {
2841
2841
  var w;
2842
2842
  if (C.has(m)) return I.apply(this, [m]);
2843
- const { id: y, styleId: z } = Ee((w = this.parentRule) === null || w === void 0 ? void 0 : w.parentStyleSheet, g, j.styleMirror);
2844
- return (y && y !== -1 || z && z !== -1) && p({ id: y, styleId: z, remove: { property: m }, index: ia(this.parentRule) }), I.apply(this, [m]);
2843
+ const { id: y, styleId: E } = je((w = this.parentRule) === null || w === void 0 ? void 0 : w.parentStyleSheet, g, z.styleMirror);
2844
+ return (y && y !== -1 || E && E !== -1) && p({ id: y, styleId: E, remove: { property: m }, index: ia(this.parentRule) }), I.apply(this, [m]);
2845
2845
  }, () => {
2846
2846
  M.CSSStyleDeclaration.prototype.setProperty = k, M.CSSStyleDeclaration.prototype.removeProperty = I;
2847
2847
  };
@@ -2849,10 +2849,10 @@ function gi(t, e = {}) {
2849
2849
  const C = g.defaultView;
2850
2850
  if (!C) return () => {
2851
2851
  };
2852
- const j = [], M = /* @__PURE__ */ new WeakMap(), k = C.FontFace;
2852
+ const z = [], M = /* @__PURE__ */ new WeakMap(), k = C.FontFace;
2853
2853
  C.FontFace = function(m, w, y) {
2854
- const z = new k(m, w, y);
2855
- return M.set(z, { family: m, buffer: typeof w != "string", descriptors: y, fontSource: typeof w == "string" ? w : JSON.stringify(Array.from(new Uint8Array(w))) }), z;
2854
+ const E = new k(m, w, y);
2855
+ return M.set(E, { family: m, buffer: typeof w != "string", descriptors: y, fontSource: typeof w == "string" ? w : JSON.stringify(Array.from(new Uint8Array(w))) }), E;
2856
2856
  };
2857
2857
  const I = _e(g.fonts, "add", function(m) {
2858
2858
  return function(w) {
@@ -2862,23 +2862,23 @@ function gi(t, e = {}) {
2862
2862
  }, 0), m.apply(this, [w]);
2863
2863
  };
2864
2864
  });
2865
- return j.push(() => {
2865
+ return z.push(() => {
2866
2866
  C.FontFace = k;
2867
- }), j.push(I), () => {
2868
- j.forEach((m) => m());
2867
+ }), z.push(I), () => {
2868
+ z.forEach((m) => m());
2869
2869
  };
2870
2870
  }(t) : () => {
2871
2871
  }, v = function(p) {
2872
- const { doc: g, mirror: C, blockClass: j, blockSelector: M, selectionCb: k } = p;
2872
+ const { doc: g, mirror: C, blockClass: z, blockSelector: M, selectionCb: k } = p;
2873
2873
  let I = !0;
2874
2874
  const m = () => {
2875
2875
  const w = g.getSelection();
2876
2876
  if (!w || I && (w != null && w.isCollapsed)) return;
2877
2877
  I = w.isCollapsed || !1;
2878
- const y = [], z = w.rangeCount || 0;
2879
- for (let S = 0; S < z; S++) {
2880
- const E = w.getRangeAt(S), { startContainer: x, startOffset: f, endContainer: F, endOffset: W } = E;
2881
- le(x, j, M, !0) || le(F, j, M, !0) || y.push({ start: C.getId(x), startOffset: f, end: C.getId(F), endOffset: W });
2878
+ const y = [], E = w.rangeCount || 0;
2879
+ for (let S = 0; S < E; S++) {
2880
+ const j = w.getRangeAt(S), { startContainer: x, startOffset: f, endContainer: F, endOffset: U } = j;
2881
+ le(x, z, M, !0) || le(F, z, M, !0) || y.push({ start: C.getId(x), startOffset: f, end: C.getId(F), endOffset: U });
2882
2882
  }
2883
2883
  k({ ranges: y });
2884
2884
  };
@@ -3029,7 +3029,7 @@ class yi {
3029
3029
  }));
3030
3030
  }
3031
3031
  addShadowRoot(e, a) {
3032
- Qe(e) && (this.shadowDoms.has(e) || (this.shadowDoms.add(e), jn(Object.assign(Object.assign({}, this.bypassOptions), { doc: a, mutationCb: this.mutationCb, mirror: this.mirror, shadowDomManager: this }), e), En(Object.assign(Object.assign({}, this.bypassOptions), { scrollCb: this.scrollCb, doc: e, mirror: this.mirror })), setTimeout(() => {
3032
+ Qe(e) && (this.shadowDoms.has(e) || (this.shadowDoms.add(e), zn(Object.assign(Object.assign({}, this.bypassOptions), { doc: a, mutationCb: this.mutationCb, mirror: this.mirror, shadowDomManager: this }), e), jn(Object.assign(Object.assign({}, this.bypassOptions), { scrollCb: this.scrollCb, doc: e, mirror: this.mirror })), setTimeout(() => {
3033
3033
  e.adoptedStyleSheets && e.adoptedStyleSheets.length > 0 && this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets, this.mirror.getId(e.host)), Tn({ mirror: this.mirror, stylesheetManager: this.bypassOptions.stylesheetManager }, e);
3034
3034
  }, 0)));
3035
3035
  }
@@ -3344,17 +3344,17 @@ function te(t) {
3344
3344
  let $, ga, Ma, ba = !1;
3345
3345
  const fe = new hn();
3346
3346
  function Se(t = {}) {
3347
- const { emit: e, checkoutEveryNms: a, checkoutEveryNth: n, blockClass: r = "rr-block", blockSelector: i = null, ignoreClass: o = "rr-ignore", maskTextClass: s = "rr-mask", maskTextSelector: l = null, inlineStylesheet: c = !0, maskAllInputs: h, maskInputOptions: d, slimDOMOptions: u, maskInputFn: b, maskTextFn: v, hooks: T, packFn: p, sampling: g = {}, dataURLOptions: C = {}, mousemoveWait: j, recordCanvas: M = !1, recordCrossOriginIframes: k = !1, userTriggeredOnInput: I = !1, collectFonts: m = !1, inlineImages: w = !1, plugins: y, keepIframeSrcFn: z = () => !1, ignoreCSSAttributes: S = /* @__PURE__ */ new Set([]) } = t, E = !k || window.parent === window;
3347
+ const { emit: e, checkoutEveryNms: a, checkoutEveryNth: n, blockClass: r = "rr-block", blockSelector: i = null, ignoreClass: o = "rr-ignore", maskTextClass: s = "rr-mask", maskTextSelector: l = null, inlineStylesheet: c = !0, maskAllInputs: h, maskInputOptions: d, slimDOMOptions: u, maskInputFn: b, maskTextFn: v, hooks: T, packFn: p, sampling: g = {}, dataURLOptions: C = {}, mousemoveWait: z, recordCanvas: M = !1, recordCrossOriginIframes: k = !1, userTriggeredOnInput: I = !1, collectFonts: m = !1, inlineImages: w = !1, plugins: y, keepIframeSrcFn: E = () => !1, ignoreCSSAttributes: S = /* @__PURE__ */ new Set([]) } = t, j = !k || window.parent === window;
3348
3348
  let x = !1;
3349
- if (!E) try {
3349
+ if (!j) try {
3350
3350
  window.parent.document, x = !1;
3351
3351
  } catch (N) {
3352
3352
  x = !0;
3353
3353
  }
3354
- if (E && !e) throw new Error("emit function is required");
3355
- j !== void 0 && g.mousemove === void 0 && (g.mousemove = j), fe.reset();
3354
+ if (j && !e) throw new Error("emit function is required");
3355
+ z !== void 0 && g.mousemove === void 0 && (g.mousemove = z), fe.reset();
3356
3356
  const f = h === !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 } : d !== void 0 ? d : { password: !0 }, F = u === !0 || u === "all" ? { script: !0, comment: !0, headFavicon: !0, headWhitespace: !0, headMetaSocial: !0, headMetaRobots: !0, headMetaHttpEquiv: !0, headMetaVerification: !0, headMetaAuthorship: u === "all", headMetaDescKeywords: u === "all" } : u || {};
3357
- let W;
3357
+ let U;
3358
3358
  (function(N = window) {
3359
3359
  "NodeList" in N && !N.NodeList.prototype.forEach && (N.NodeList.prototype.forEach = Array.prototype.forEach), "DOMTokenList" in N && !N.DOMTokenList.prototype.forEach && (N.DOMTokenList.prototype.forEach = Array.prototype.forEach), Node.prototype.contains || (Node.prototype.contains = (...Y) => {
3360
3360
  let X = Y[0];
@@ -3372,42 +3372,42 @@ function Se(t = {}) {
3372
3372
  };
3373
3373
  $ = (N, Y) => {
3374
3374
  var X;
3375
- if (!(!((X = Me[0]) === null || X === void 0) && X.isFrozen()) || N.type === q.FullSnapshot || N.type === q.IncrementalSnapshot && N.data.source === V.Mutation || Me.forEach((J) => J.unfreeze()), E) e == null || e(me(N), Y);
3375
+ if (!(!((X = Me[0]) === null || X === void 0) && X.isFrozen()) || N.type === q.FullSnapshot || N.type === q.IncrementalSnapshot && N.data.source === V.Mutation || Me.forEach((J) => J.unfreeze()), j) e == null || e(me(N), Y);
3376
3376
  else if (x) {
3377
3377
  const J = { type: "rrweb", event: me(N), isCheckout: Y };
3378
3378
  window.parent.postMessage(J, "*");
3379
3379
  }
3380
- if (N.type === q.FullSnapshot) W = N, D = 0;
3380
+ if (N.type === q.FullSnapshot) U = N, D = 0;
3381
3381
  else if (N.type === q.IncrementalSnapshot) {
3382
3382
  if (N.data.source === V.Mutation && N.data.isAttachIframe) return;
3383
3383
  D++;
3384
- const J = n && D >= n, re = a && N.timestamp - W.timestamp > a;
3384
+ const J = n && D >= n, re = a && N.timestamp - U.timestamp > a;
3385
3385
  (J || re) && ga(!0);
3386
3386
  }
3387
3387
  };
3388
3388
  const ne = (N) => {
3389
3389
  $(te({ type: q.IncrementalSnapshot, data: Object.assign({ source: V.Mutation }, N) }));
3390
- }, ce = (N) => $(te({ type: q.IncrementalSnapshot, data: Object.assign({ source: V.Scroll }, N) })), oe = (N) => $(te({ type: q.IncrementalSnapshot, data: Object.assign({ source: V.CanvasMutation }, N) })), U = new Ai({ mutationCb: ne, adoptedStyleSheetCb: (N) => $(te({ type: q.IncrementalSnapshot, data: Object.assign({ source: V.AdoptedStyleSheet }, N) })) }), P = new pi({ mirror: fe, mutationCb: ne, stylesheetManager: U, recordCrossOriginIframes: k, wrappedEmit: $ });
3390
+ }, ce = (N) => $(te({ type: q.IncrementalSnapshot, data: Object.assign({ source: V.Scroll }, N) })), oe = (N) => $(te({ type: q.IncrementalSnapshot, data: Object.assign({ source: V.CanvasMutation }, N) })), W = new Ai({ mutationCb: ne, adoptedStyleSheetCb: (N) => $(te({ type: q.IncrementalSnapshot, data: Object.assign({ source: V.AdoptedStyleSheet }, N) })) }), P = new pi({ mirror: fe, mutationCb: ne, stylesheetManager: W, recordCrossOriginIframes: k, wrappedEmit: $ });
3391
3391
  for (const N of y || []) N.getMirror && N.getMirror({ nodeMirror: fe, crossOriginIframeMirror: P.crossOriginIframeMirror, crossOriginIframeStyleMirror: P.crossOriginIframeStyleMirror });
3392
3392
  Ma = new Si({ recordCanvas: M, mutationCb: oe, win: window, blockClass: r, blockSelector: i, mirror: fe, sampling: g.canvas, dataURLOptions: C });
3393
- const O = new yi({ mutationCb: ne, scrollCb: ce, bypassOptions: { blockClass: r, blockSelector: i, maskTextClass: s, maskTextSelector: l, inlineStylesheet: c, maskInputOptions: f, dataURLOptions: C, maskTextFn: v, maskInputFn: b, recordCanvas: M, inlineImages: w, sampling: g, slimDOMOptions: F, iframeManager: P, stylesheetManager: U, canvasManager: Ma, keepIframeSrcFn: z }, mirror: fe });
3393
+ const O = new yi({ mutationCb: ne, scrollCb: ce, bypassOptions: { blockClass: r, blockSelector: i, maskTextClass: s, maskTextSelector: l, inlineStylesheet: c, maskInputOptions: f, dataURLOptions: C, maskTextFn: v, maskInputFn: b, recordCanvas: M, inlineImages: w, sampling: g, slimDOMOptions: F, iframeManager: P, stylesheetManager: W, canvasManager: Ma, keepIframeSrcFn: E }, mirror: fe });
3394
3394
  ga = (N = !1) => {
3395
3395
  var Y, X, J, re, L, A;
3396
- $(te({ type: q.Meta, data: { href: window.location.href, width: pn(), height: gn() } }), N), U.reset(), Me.forEach((K) => K.lock());
3396
+ $(te({ type: q.Meta, data: { href: window.location.href, width: pn(), height: gn() } }), N), W.reset(), Me.forEach((K) => K.lock());
3397
3397
  const G = function(K, Q) {
3398
- var Z = Q || {}, ye = Z.mirror, ze = ye === void 0 ? new hn() : ye, Oe = Z.blockClass, $e = Oe === void 0 ? "rr-block" : Oe, ee = Z.blockSelector, ge = ee === void 0 ? null : ee, ke = Z.maskTextClass, Ce = ke === void 0 ? "rr-mask" : ke, je = Z.maskTextSelector, Ca = je === void 0 ? null : je, ea = Z.inlineStylesheet, Bn = ea === void 0 || ea, tt = Z.inlineImages, qn = tt !== void 0 && tt, nt = Z.recordCanvas, Vn = nt !== void 0 && nt, rt = Z.maskAllInputs, Sa = rt !== void 0 && rt, Un = Z.maskTextFn, Wn = Z.maskInputFn, it = Z.slimDOM, We = it !== void 0 && it, Pn = Z.dataURLOptions, Zn = Z.preserveWhiteSpace, Gn = Z.onSerialize, Kn = Z.onIframeLoad, Hn = Z.iframeLoadTimeout, Yn = Z.onStylesheetLoad, Jn = Z.stylesheetLoadTimeout, ot = Z.keepIframeSrcFn;
3399
- return Ue(K, { doc: K, mirror: ze, blockClass: $e, blockSelector: ge, maskTextClass: Ce, maskTextSelector: Ca, skipChild: !1, inlineStylesheet: Bn, maskInputOptions: Sa === !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 } : Sa === !1 ? { password: !0 } : Sa, maskTextFn: Un, maskInputFn: Wn, slimDOMOptions: We === !0 || We === "all" ? { script: !0, comment: !0, headFavicon: !0, headWhitespace: !0, headMetaDescKeywords: We === "all", headMetaSocial: !0, headMetaRobots: !0, headMetaHttpEquiv: !0, headMetaAuthorship: !0, headMetaVerification: !0 } : We === !1 ? {} : We, dataURLOptions: Pn, inlineImages: qn, recordCanvas: Vn, preserveWhiteSpace: Zn, onSerialize: Gn, onIframeLoad: Kn, iframeLoadTimeout: Hn, onStylesheetLoad: Yn, stylesheetLoadTimeout: Jn, keepIframeSrcFn: ot === void 0 ? function() {
3398
+ var Z = Q || {}, ye = Z.mirror, Ee = ye === void 0 ? new hn() : ye, Oe = Z.blockClass, $e = Oe === void 0 ? "rr-block" : Oe, ee = Z.blockSelector, ge = ee === void 0 ? null : ee, ke = Z.maskTextClass, Ce = ke === void 0 ? "rr-mask" : ke, ze = Z.maskTextSelector, Ca = ze === void 0 ? null : ze, ea = Z.inlineStylesheet, Bn = ea === void 0 || ea, tt = Z.inlineImages, qn = tt !== void 0 && tt, nt = Z.recordCanvas, Vn = nt !== void 0 && nt, rt = Z.maskAllInputs, Sa = rt !== void 0 && rt, Wn = Z.maskTextFn, Un = Z.maskInputFn, it = Z.slimDOM, Ue = it !== void 0 && it, Pn = Z.dataURLOptions, Zn = Z.preserveWhiteSpace, Gn = Z.onSerialize, Kn = Z.onIframeLoad, Hn = Z.iframeLoadTimeout, Yn = Z.onStylesheetLoad, Jn = Z.stylesheetLoadTimeout, ot = Z.keepIframeSrcFn;
3399
+ return We(K, { doc: K, mirror: Ee, blockClass: $e, blockSelector: ge, maskTextClass: Ce, maskTextSelector: Ca, skipChild: !1, inlineStylesheet: Bn, maskInputOptions: Sa === !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 } : Sa === !1 ? { password: !0 } : Sa, maskTextFn: Wn, maskInputFn: Un, slimDOMOptions: Ue === !0 || Ue === "all" ? { script: !0, comment: !0, headFavicon: !0, headWhitespace: !0, headMetaDescKeywords: Ue === "all", headMetaSocial: !0, headMetaRobots: !0, headMetaHttpEquiv: !0, headMetaAuthorship: !0, headMetaVerification: !0 } : Ue === !1 ? {} : Ue, dataURLOptions: Pn, inlineImages: qn, recordCanvas: Vn, preserveWhiteSpace: Zn, onSerialize: Gn, onIframeLoad: Kn, iframeLoadTimeout: Hn, onStylesheetLoad: Yn, stylesheetLoadTimeout: Jn, keepIframeSrcFn: ot === void 0 ? function() {
3400
3400
  return !1;
3401
3401
  } : ot, newlyAddedElement: !1 });
3402
3402
  }(document, { mirror: fe, blockClass: r, blockSelector: i, maskTextClass: s, maskTextSelector: l, inlineStylesheet: c, maskAllInputs: f, maskTextFn: v, slimDOM: F, dataURLOptions: C, recordCanvas: M, inlineImages: w, onSerialize: (K) => {
3403
- bn(K, fe) && P.addIframe(K), kn(K, fe) && U.trackLinkElement(K), wn(K) && O.addShadowRoot(K.shadowRoot, document);
3403
+ bn(K, fe) && P.addIframe(K), kn(K, fe) && W.trackLinkElement(K), wn(K) && O.addShadowRoot(K.shadowRoot, document);
3404
3404
  }, onIframeLoad: (K, Q) => {
3405
3405
  P.attachIframe(K, Q), O.observeAttachShadow(K);
3406
3406
  }, onStylesheetLoad: (K, Q) => {
3407
- U.attachLinkElement(K, Q);
3408
- }, keepIframeSrcFn: z });
3407
+ W.attachLinkElement(K, Q);
3408
+ }, keepIframeSrcFn: E });
3409
3409
  if (!G) return console.warn("Failed to snapshot the document");
3410
- $(te({ type: q.FullSnapshot, data: { node: G, initialOffset: { left: window.pageXOffset !== void 0 ? window.pageXOffset : (document == null ? void 0 : document.documentElement.scrollLeft) || ((X = (Y = document == null ? void 0 : document.body) === null || Y === void 0 ? void 0 : Y.parentElement) === null || X === void 0 ? void 0 : X.scrollLeft) || ((J = document == null ? void 0 : document.body) === null || J === void 0 ? void 0 : J.scrollLeft) || 0, top: window.pageYOffset !== void 0 ? window.pageYOffset : (document == null ? void 0 : document.documentElement.scrollTop) || ((L = (re = document == null ? void 0 : document.body) === null || re === void 0 ? void 0 : re.parentElement) === null || L === void 0 ? void 0 : L.scrollTop) || ((A = document == null ? void 0 : document.body) === null || A === void 0 ? void 0 : A.scrollTop) || 0 } } })), Me.forEach((K) => K.unlock()), document.adoptedStyleSheets && document.adoptedStyleSheets.length > 0 && U.adoptStyleSheets(document.adoptedStyleSheets, fe.getId(document));
3410
+ $(te({ type: q.FullSnapshot, data: { node: G, initialOffset: { left: window.pageXOffset !== void 0 ? window.pageXOffset : (document == null ? void 0 : document.documentElement.scrollLeft) || ((X = (Y = document == null ? void 0 : document.body) === null || Y === void 0 ? void 0 : Y.parentElement) === null || X === void 0 ? void 0 : X.scrollLeft) || ((J = document == null ? void 0 : document.body) === null || J === void 0 ? void 0 : J.scrollLeft) || 0, top: window.pageYOffset !== void 0 ? window.pageYOffset : (document == null ? void 0 : document.documentElement.scrollTop) || ((L = (re = document == null ? void 0 : document.body) === null || re === void 0 ? void 0 : re.parentElement) === null || L === void 0 ? void 0 : L.scrollTop) || ((A = document == null ? void 0 : document.body) === null || A === void 0 ? void 0 : A.scrollTop) || 0 } } })), Me.forEach((K) => K.unlock()), document.adoptedStyleSheets && document.adoptedStyleSheets.length > 0 && W.adoptStyleSheets(document.adoptedStyleSheets, fe.getId(document));
3411
3411
  };
3412
3412
  try {
3413
3413
  const N = [];
@@ -3418,7 +3418,7 @@ function Se(t = {}) {
3418
3418
  var re;
3419
3419
  return gi({ mutationCb: ne, mousemoveCb: (L, A) => $(te({ type: q.IncrementalSnapshot, data: { source: A, positions: L } })), mouseInteractionCb: (L) => $(te({ type: q.IncrementalSnapshot, data: Object.assign({ source: V.MouseInteraction }, L) })), scrollCb: ce, viewportResizeCb: (L) => $(te({ type: q.IncrementalSnapshot, data: Object.assign({ source: V.ViewportResize }, L) })), inputCb: (L) => $(te({ type: q.IncrementalSnapshot, data: Object.assign({ source: V.Input }, L) })), mediaInteractionCb: (L) => $(te({ type: q.IncrementalSnapshot, data: Object.assign({ source: V.MediaInteraction }, L) })), styleSheetRuleCb: (L) => $(te({ type: q.IncrementalSnapshot, data: Object.assign({ source: V.StyleSheetRule }, L) })), styleDeclarationCb: (L) => $(te({ type: q.IncrementalSnapshot, data: Object.assign({ source: V.StyleDeclaration }, L) })), canvasMutationCb: oe, fontCb: (L) => $(te({ type: q.IncrementalSnapshot, data: Object.assign({ source: V.Font }, L) })), selectionCb: (L) => {
3420
3420
  $(te({ type: q.IncrementalSnapshot, data: Object.assign({ source: V.Selection }, L) }));
3421
- }, blockClass: r, ignoreClass: o, maskTextClass: s, maskTextSelector: l, maskInputOptions: f, inlineStylesheet: c, sampling: g, recordCanvas: M, inlineImages: w, userTriggeredOnInput: I, collectFonts: m, doc: J, maskInputFn: b, maskTextFn: v, keepIframeSrcFn: z, blockSelector: i, slimDOMOptions: F, dataURLOptions: C, mirror: fe, iframeManager: P, stylesheetManager: U, shadowDomManager: O, canvasManager: Ma, ignoreCSSAttributes: S, plugins: ((re = y == null ? void 0 : y.filter((L) => L.observer)) === null || re === void 0 ? void 0 : re.map((L) => ({ observer: L.observer, options: L.options, callback: (A) => $(te({ type: q.Plugin, data: { plugin: L.name, payload: A } })) }))) || [] }, T);
3421
+ }, blockClass: r, ignoreClass: o, maskTextClass: s, maskTextSelector: l, maskInputOptions: f, inlineStylesheet: c, sampling: g, recordCanvas: M, inlineImages: w, userTriggeredOnInput: I, collectFonts: m, doc: J, maskInputFn: b, maskTextFn: v, keepIframeSrcFn: E, blockSelector: i, slimDOMOptions: F, dataURLOptions: C, mirror: fe, iframeManager: P, stylesheetManager: W, shadowDomManager: O, canvasManager: Ma, ignoreCSSAttributes: S, plugins: ((re = y == null ? void 0 : y.filter((L) => L.observer)) === null || re === void 0 ? void 0 : re.map((L) => ({ observer: L.observer, options: L.options, callback: (A) => $(te({ type: q.Plugin, data: { plugin: L.name, payload: A } })) }))) || [] }, T);
3422
3422
  };
3423
3423
  P.addLoadListener((J) => {
3424
3424
  N.push(Y(J.contentDocument));
@@ -3453,7 +3453,7 @@ class De {
3453
3453
  return this.functionName ? `${this.functionName} (${this.fileName}:${e}:${a})` : `${this.fileName}:${e}:${a}`;
3454
3454
  }
3455
3455
  }
3456
- const zi = /(^|@)\S+:\d+/, Dt = /^\s*at .*(\S+:\d+|\(native\))/m, ji = /^(eval@)?(\[native code])?$/, Bt = { parse: function(t) {
3456
+ const Ei = /(^|@)\S+:\d+/, Dt = /^\s*at .*(\S+:\d+|\(native\))/m, zi = /^(eval@)?(\[native code])?$/, Bt = { parse: function(t) {
3457
3457
  if (!t) return [];
3458
3458
  if (t.stacktrace !== void 0 || t["opera#sourceloc"] !== void 0) return this.parseOpera(t);
3459
3459
  if (t.stack && t.stack.match(Dt)) return this.parseV8OrIE(t);
@@ -3479,7 +3479,7 @@ const zi = /(^|@)\S+:\d+/, Dt = /^\s*at .*(\S+:\d+|\(native\))/m, ji = /^(eval@)
3479
3479
  }, parseFFOrSafari: function(t) {
3480
3480
  return t.stack.split(`
3481
3481
  `).filter(function(e) {
3482
- return !e.match(ji);
3482
+ return !e.match(zi);
3483
3483
  }, this).map(function(e) {
3484
3484
  if (e.indexOf(" > eval") > -1 && (e = e.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g, ":$1")), e.indexOf("@") === -1 && e.indexOf(":") === -1) return new De({ functionName: e });
3485
3485
  {
@@ -3511,13 +3511,13 @@ const zi = /(^|@)\S+:\d+/, Dt = /^\s*at .*(\S+:\d+|\(native\))/m, ji = /^(eval@)
3511
3511
  }, parseOpera11: function(t) {
3512
3512
  return t.stack.split(`
3513
3513
  `).filter(function(e) {
3514
- return !!e.match(zi) && !e.match(/^Error created at/);
3514
+ return !!e.match(Ei) && !e.match(/^Error created at/);
3515
3515
  }, this).map(function(e) {
3516
3516
  const a = e.split("@"), n = this.extractLocation(a.pop()), r = (a.shift() || "").replace(/<anonymous function(: (\w+))?>/, "$2").replace(/\([^)]*\)/g, "") || void 0;
3517
3517
  return new De({ functionName: r, fileName: n[0], lineNumber: n[1], columnNumber: n[2] });
3518
3518
  }, this);
3519
3519
  } };
3520
- function Ei(t) {
3520
+ function ji(t) {
3521
3521
  if (!t || !t.outerHTML) return "";
3522
3522
  let e = "";
3523
3523
  for (; t.parentElement; ) {
@@ -3563,7 +3563,7 @@ function _a(t, e) {
3563
3563
  const s = {};
3564
3564
  for (const l in o) {
3565
3565
  const c = o[l];
3566
- Array.isArray(c) ? s[l] = Ei(c.length ? c[0] : null) : s[l] = c;
3566
+ Array.isArray(c) ? s[l] = ji(c.length ? c[0] : null) : s[l] = c;
3567
3567
  }
3568
3568
  return s;
3569
3569
  }
@@ -3645,7 +3645,7 @@ class Ri {
3645
3645
  }
3646
3646
  var pa = ((t) => (t[t.DomContentLoaded = 0] = "DomContentLoaded", t[t.Load = 1] = "Load", t[t.FullSnapshot = 2] = "FullSnapshot", t[t.IncrementalSnapshot = 3] = "IncrementalSnapshot", t[t.Meta = 4] = "Meta", t[t.Custom = 5] = "Custom", t[t.Plugin = 6] = "Plugin", t))(pa || {}), we = ((t) => (t[t.Mutation = 0] = "Mutation", t[t.MouseMove = 1] = "MouseMove", t[t.MouseInteraction = 2] = "MouseInteraction", t[t.Scroll = 3] = "Scroll", t[t.ViewportResize = 4] = "ViewportResize", t[t.Input = 5] = "Input", t[t.TouchMove = 6] = "TouchMove", t[t.MediaInteraction = 7] = "MediaInteraction", t[t.StyleSheetRule = 8] = "StyleSheetRule", t[t.CanvasMutation = 9] = "CanvasMutation", t[t.Font = 10] = "Font", t[t.Log = 11] = "Log", t[t.Drag = 12] = "Drag", t[t.StyleDeclaration = 13] = "StyleDeclaration", t[t.Selection = 14] = "Selection", t[t.AdoptedStyleSheet = 15] = "AdoptedStyleSheet", t[t.CustomElement = 16] = "CustomElement", t))(we || {}), On = ((t) => (t[t.MouseUp = 0] = "MouseUp", t[t.MouseDown = 1] = "MouseDown", t[t.Click = 2] = "Click", t[t.ContextMenu = 3] = "ContextMenu", t[t.DblClick = 4] = "DblClick", t[t.Focus = 5] = "Focus", t[t.Blur = 6] = "Blur", t[t.TouchStart = 7] = "TouchStart", t[t.TouchMove_Departed = 8] = "TouchMove_Departed", t[t.TouchEnd = 9] = "TouchEnd", t[t.TouchCancel = 10] = "TouchCancel", t))(On || {});
3647
3647
  const Vt = { recordOptions: { blockClass: "data-bf-suppress", blockSelector: void 0, ignoreClass: "data-bf-ignore", ignoreCSSAttributes: void 0, maskTextClass: "data-bf-mask", maskTextSelector: void 0, maskAllInputs: !0, maskInputOptions: { password: !0 }, maskInputFn: void 0, maskTextFn: void 0 }, recordConsolePlugin: { level: ["error"], lengthThreshold: Number.POSITIVE_INFINITY, stringifyOptions: { stringLengthLimit: Number.POSITIVE_INFINITY, numOfKeysLimit: Number.POSITIVE_INFINITY, depthOfLimit: Number.POSITIVE_INFINITY } } };
3648
- class Ut {
3648
+ class Wt {
3649
3649
  constructor(e) {
3650
3650
  R(this, "options");
3651
3651
  R(this, "stop");
@@ -3704,10 +3704,10 @@ function Mi(t, e) {
3704
3704
  e === void 0 && (e = {});
3705
3705
  for (var a = function(m) {
3706
3706
  for (var w = [], y = 0; y < m.length; ) {
3707
- var z = m[y];
3708
- if (z !== "*" && z !== "+" && z !== "?") if (z !== "\\") if (z !== "{") if (z !== "}") if (z !== ":") if (z !== "(") w.push({ type: "CHAR", index: y, value: m[y++] });
3707
+ var E = m[y];
3708
+ if (E !== "*" && E !== "+" && E !== "?") if (E !== "\\") if (E !== "{") if (E !== "}") if (E !== ":") if (E !== "(") w.push({ type: "CHAR", index: y, value: m[y++] });
3709
3709
  else {
3710
- var S = 1, E = "";
3710
+ var S = 1, j = "";
3711
3711
  if (m[f = y + 1] === "?") throw new TypeError('Pattern cannot start with "?" at '.concat(f));
3712
3712
  for (; f < m.length; ) if (m[f] !== "\\") {
3713
3713
  if (m[f] === ")") {
@@ -3716,11 +3716,11 @@ function Mi(t, e) {
3716
3716
  break;
3717
3717
  }
3718
3718
  } else if (m[f] === "(" && (S++, m[f + 1] !== "?")) throw new TypeError("Capturing groups are not allowed at ".concat(f));
3719
- E += m[f++];
3720
- } else E += m[f++] + m[f++];
3719
+ j += m[f++];
3720
+ } else j += m[f++] + m[f++];
3721
3721
  if (S) throw new TypeError("Unbalanced pattern at ".concat(y));
3722
- if (!E) throw new TypeError("Missing pattern at ".concat(y));
3723
- w.push({ type: "PATTERN", index: y, value: E }), y = f;
3722
+ if (!j) throw new TypeError("Missing pattern at ".concat(y));
3723
+ w.push({ type: "PATTERN", index: y, value: j }), y = f;
3724
3724
  }
3725
3725
  else {
3726
3726
  for (var x = "", f = y + 1; f < m.length; ) {
@@ -3742,18 +3742,18 @@ function Mi(t, e) {
3742
3742
  }, u = function(m) {
3743
3743
  var w = d(m);
3744
3744
  if (w !== void 0) return w;
3745
- var y = a[c], z = y.type, S = y.index;
3746
- throw new TypeError("Unexpected ".concat(z, " at ").concat(S, ", expected ").concat(m));
3745
+ var y = a[c], E = y.type, S = y.index;
3746
+ throw new TypeError("Unexpected ".concat(E, " at ").concat(S, ", expected ").concat(m));
3747
3747
  }, b = function() {
3748
3748
  for (var m, w = ""; m = d("CHAR") || d("ESCAPED_CHAR"); ) w += m;
3749
3749
  return w;
3750
3750
  }, v = function(m) {
3751
3751
  var w = s[s.length - 1], y = m || (w && typeof w == "string" ? w : "");
3752
3752
  if (w && !y) throw new TypeError('Must have text between two parameters, missing text after "'.concat(w.name, '"'));
3753
- return !y || function(z) {
3754
- for (var S = 0, E = o; S < E.length; S++) {
3755
- var x = E[S];
3756
- if (z.indexOf(x) > -1) return !0;
3753
+ return !y || function(E) {
3754
+ for (var S = 0, j = o; S < j.length; S++) {
3755
+ var x = j[S];
3756
+ if (E.indexOf(x) > -1) return !0;
3757
3757
  }
3758
3758
  return !1;
3759
3759
  }(y) ? "[^".concat(Te(o), "]+?") : "(?:(?!".concat(Te(y), ")[^").concat(Te(o), "])+?");
@@ -3763,8 +3763,8 @@ function Mi(t, e) {
3763
3763
  var C = T || "";
3764
3764
  r.indexOf(C) === -1 && (h += C, C = ""), h && (s.push(h), h = ""), s.push({ name: p || l++, prefix: C, suffix: "", pattern: g || v(C), modifier: d("MODIFIER") || "" });
3765
3765
  } else {
3766
- var j = T || d("ESCAPED_CHAR");
3767
- if (j) h += j;
3766
+ var z = T || d("ESCAPED_CHAR");
3767
+ if (z) h += z;
3768
3768
  else if (h && (s.push(h), h = ""), d("OPEN")) {
3769
3769
  C = b();
3770
3770
  var M = d("NAME") || "", k = d("PATTERN") || "", I = b();
@@ -3804,30 +3804,30 @@ function Ln(t) {
3804
3804
  function Oi(t, e, a) {
3805
3805
  return function(n, r, i) {
3806
3806
  i === void 0 && (i = {});
3807
- for (var o = i.strict, s = o !== void 0 && o, l = i.start, c = l === void 0 || l, h = i.end, d = h === void 0 || h, u = i.encode, b = u === void 0 ? function(E) {
3808
- return E;
3809
- } : u, v = i.delimiter, T = v === void 0 ? "/#?" : v, p = i.endsWith, g = "[".concat(Te(p === void 0 ? "" : p), "]|$"), C = "[".concat(Te(T), "]"), j = c ? "^" : "", M = 0, k = n; M < k.length; M++) {
3807
+ for (var o = i.strict, s = o !== void 0 && o, l = i.start, c = l === void 0 || l, h = i.end, d = h === void 0 || h, u = i.encode, b = u === void 0 ? function(j) {
3808
+ return j;
3809
+ } : u, v = i.delimiter, T = v === void 0 ? "/#?" : v, p = i.endsWith, g = "[".concat(Te(p === void 0 ? "" : p), "]|$"), C = "[".concat(Te(T), "]"), z = c ? "^" : "", M = 0, k = n; M < k.length; M++) {
3810
3810
  var I = k[M];
3811
- if (typeof I == "string") j += Te(b(I));
3811
+ if (typeof I == "string") z += Te(b(I));
3812
3812
  else {
3813
3813
  var m = Te(b(I.prefix)), w = Te(b(I.suffix));
3814
3814
  if (I.pattern) if (r && r.push(I), m || w) if (I.modifier === "+" || I.modifier === "*") {
3815
3815
  var y = I.modifier === "*" ? "?" : "";
3816
- j += "(?:".concat(m, "((?:").concat(I.pattern, ")(?:").concat(w).concat(m, "(?:").concat(I.pattern, "))*)").concat(w, ")").concat(y);
3817
- } else j += "(?:".concat(m, "(").concat(I.pattern, ")").concat(w, ")").concat(I.modifier);
3816
+ z += "(?:".concat(m, "((?:").concat(I.pattern, ")(?:").concat(w).concat(m, "(?:").concat(I.pattern, "))*)").concat(w, ")").concat(y);
3817
+ } else z += "(?:".concat(m, "(").concat(I.pattern, ")").concat(w, ")").concat(I.modifier);
3818
3818
  else {
3819
3819
  if (I.modifier === "+" || I.modifier === "*") throw new TypeError('Can not repeat "'.concat(I.name, '" without a prefix and suffix'));
3820
- j += "(".concat(I.pattern, ")").concat(I.modifier);
3820
+ z += "(".concat(I.pattern, ")").concat(I.modifier);
3821
3821
  }
3822
- else j += "(?:".concat(m).concat(w, ")").concat(I.modifier);
3822
+ else z += "(?:".concat(m).concat(w, ")").concat(I.modifier);
3823
3823
  }
3824
3824
  }
3825
- if (d) s || (j += "".concat(C, "?")), j += i.endsWith ? "(?=".concat(g, ")") : "$";
3825
+ if (d) s || (z += "".concat(C, "?")), z += i.endsWith ? "(?=".concat(g, ")") : "$";
3826
3826
  else {
3827
- var z = n[n.length - 1], S = typeof z == "string" ? C.indexOf(z[z.length - 1]) > -1 : z === void 0;
3828
- s || (j += "(?:".concat(C, "(?=").concat(g, "))?")), S || (j += "(?=".concat(C, "|").concat(g, ")"));
3827
+ var E = n[n.length - 1], S = typeof E == "string" ? C.indexOf(E[E.length - 1]) > -1 : E === void 0;
3828
+ s || (z += "(?:".concat(C, "(?=").concat(g, "))?")), S || (z += "(?=".concat(C, "|").concat(g, ")"));
3829
3829
  }
3830
- return new RegExp(j, Ln(i));
3830
+ return new RegExp(z, Ln(i));
3831
3831
  }(Mi(t, a), e, a);
3832
3832
  }
3833
3833
  function Fn(t, e, a) {
@@ -3862,7 +3862,7 @@ class Fi {
3862
3862
  R(this, "agent");
3863
3863
  R(this, "recorder");
3864
3864
  R(this, "stasher");
3865
- this.agent = e, this.recorder = new Ut(this.handleEvent.bind(this)), this.stasher = new Ni(this);
3865
+ this.agent = e, this.recorder = new Wt(this.handleEvent.bind(this)), this.stasher = new Ni(this);
3866
3866
  }
3867
3867
  start() {
3868
3868
  this.recorder.start();
@@ -3886,7 +3886,7 @@ class Fi {
3886
3886
  this.agent.sender.handle(e), this.agent.timer && this.agent.timer.restart();
3887
3887
  }
3888
3888
  startRecorderWithStasher() {
3889
- this.stasher.start(), this.recorder = new Ut(this.handleEvent.bind(this)), this.recorder.start();
3889
+ this.stasher.start(), this.recorder = new Wt(this.handleEvent.bind(this)), this.recorder.start();
3890
3890
  }
3891
3891
  isClick(e) {
3892
3892
  return e.type === pa.IncrementalSnapshot && e.data.source === we.MouseInteraction && e.data.type === On.Click;
@@ -3962,7 +3962,6 @@ const Ne = class Ne {
3962
3962
  constructor() {
3963
3963
  R(this, "recordingManager");
3964
3964
  R(this, "sender");
3965
- R(this, "endpoint");
3966
3965
  R(this, "MAX_IDLE_TIME");
3967
3966
  R(this, "timer");
3968
3967
  R(this, "sendEvents");
@@ -3976,9 +3975,9 @@ const Ne = class Ne {
3976
3975
  get sessionManager() {
3977
3976
  return Ne._sessionManager;
3978
3977
  }
3979
- start(s) {
3980
- return _(this, arguments, function* ({ endpoint: e, sendEvents: a, sendScreenViewEvent: n, recordingBlocklist: r, _allowLocalhostRecording: i, _allowScreenRecording: o }) {
3981
- this.endpoint = e, this.sendEvents = a, this.sendScreenViewEvent = n, this.recordingBlocklist = r, this._allowLocalhostRecording = i, this._allowScreenRecording = o, this.MAX_IDLE_TIME = 6e4, this.timer = new Di(this, this.MAX_IDLE_TIME), this.sender.start(), this.recordingManager.start();
3978
+ start(o) {
3979
+ return _(this, arguments, function* ({ sendEvents: e, sendScreenViewEvent: a, recordingBlocklist: n, _allowLocalhostRecording: r, _allowScreenRecording: i }) {
3980
+ this.sendEvents = e, this.sendScreenViewEvent = a, this.recordingBlocklist = n, this._allowLocalhostRecording = r, this._allowScreenRecording = i, this.MAX_IDLE_TIME = 6e4, this.timer = new Di(this, this.MAX_IDLE_TIME), this.sender.start(), this.recordingManager.start();
3982
3981
  });
3983
3982
  }
3984
3983
  handleTimeout() {
@@ -4007,7 +4006,7 @@ const Ne = class Ne {
4007
4006
  };
4008
4007
  R(Ne, "_sessionManager", ka.getInstance());
4009
4008
  let Ka = Ne;
4010
- const Bi = "0.0.14";
4009
+ const Bi = "0.0.16";
4011
4010
  class Vi extends Rr {
4012
4011
  constructor(a) {
4013
4012
  super(de({ sdk: "web", sdkVersion: Bi }, a));
@@ -4016,6 +4015,7 @@ class Vi extends Rr {
4016
4015
  R(this, "agent");
4017
4016
  R(this, "sessionManager", ka.getInstance());
4018
4017
  R(this, "recordingBlocklist", []);
4018
+ R(this, "MAX_SCREENSHOT_SIZE", 768e3);
4019
4019
  this.options = a, this.agent = new Ka(), this.recordingBlocklist = a.recordingBlocklist || [], this.isServer() || (this.setGlobalProperties({ __referrer: document.referrer }), this.options.trackOutgoingLinks && this.trackOutgoingLinks(), this.options.trackScreenViews && this.trackScreenViews(), this.options.trackAttributes && this.trackAttributes(), this.options.enableRecording && this.options._allowScreenRecording && this.startRecording());
4020
4020
  }
4021
4021
  debounce(a, n) {
@@ -4064,10 +4064,7 @@ class Vi extends Rr {
4064
4064
  });
4065
4065
  }
4066
4066
  startRecording() {
4067
- if (this.isServer()) return;
4068
- const { apiUrl: a } = this.options;
4069
- if (!a) throw new Error("API URL is required");
4070
- this.agent.start({ endpoint: a, sendEvents: this.recordEventsToServer.bind(this), sendScreenViewEvent: this.sendScreenViewEvent.bind(this), recordingBlocklist: this.recordingBlocklist, _allowLocalhostRecording: this.options._allowLocalhostRecording });
4067
+ this.isServer() || this.agent.start({ sendEvents: this.recordEventsToServer.bind(this), sendScreenViewEvent: this.sendScreenViewEvent.bind(this), recordingBlocklist: this.recordingBlocklist, _allowLocalhostRecording: this.options._allowLocalhostRecording });
4071
4068
  }
4072
4069
  screenView(a, n) {
4073
4070
  return _(this, null, function* () {
@@ -4076,7 +4073,7 @@ class Vi extends Rr {
4076
4073
  if (typeof a == "string" ? (r = a, i = n) : (r = window.location.href, i = a), this.lastPath === r) return;
4077
4074
  this.lastPath = r;
4078
4075
  const o = Le(de({}, i != null ? i : {}), { __path: r, __title: document.title });
4079
- if (this.options.enableRecording && Dn(this.recordingBlocklist, this.options._allowLocalhostRecording)) {
4076
+ if (this.options.enableRecording && Dn(this.recordingBlocklist, this.options._allowLocalhostRecording)) try {
4080
4077
  const s = yield function(l) {
4081
4078
  return _(this, null, function* () {
4082
4079
  try {
@@ -4088,7 +4085,9 @@ class Vi extends Rr {
4088
4085
  }
4089
4086
  });
4090
4087
  }();
4091
- o.__screenshot = s;
4088
+ s && (s.length <= this.MAX_SCREENSHOT_SIZE ? o.__screenshot = s : (o.__screenshotOmitted = !0, o.__screenshotSizeInBytes = s.length));
4089
+ } catch (s) {
4090
+ o.__screenshotOmitted = !0, o.__screenshotError = s.message;
4092
4091
  }
4093
4092
  this.sendScreenViewEvent(o);
4094
4093
  });