@askdialog/dialog-vue 1.0.19 → 1.0.21
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/dialog-vue.js +585 -581
- package/dist/dialog-vue.umd.cjs +5 -5
- package/package.json +2 -2
package/dist/dialog-vue.js
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as Ue, createElementBlock as Be, openBlock as ue, createElementVNode as J, toDisplayString as Ni, Fragment as Zs, renderList as Co, createVNode as Kt, createBlock as Jt, ref as Yt, withDirectives as Io, withKeys as Po, vModelText as To, onMounted as en, watch as Fo, renderSlot as Ro, computed as bi, withCtx as $o, createCommentVNode as Oo } from "vue";
|
|
2
2
|
var Mr;
|
|
3
3
|
(function(r) {
|
|
4
4
|
r.OPEN_ASSISTANT = "open_assistant", r.CLOSE_ASSISTANT = "close_assistant", r.SEND_MESSAGE = "PRODUCT_QUESTION", r.SEND_GENERIC_QUESTION = "GENERIC_QUESTION";
|
|
5
5
|
})(Mr || (Mr = {}));
|
|
6
|
-
var
|
|
6
|
+
var Dr;
|
|
7
|
+
(function(r) {
|
|
8
|
+
r.USER_OPENED_ASSISTANT = "userOpenedAssistant", r.USER_CLOSED_ASSISTANT = "userClosedAssistant", r.USER_SENT_MESSAGE = "userSentMessage", r.USER_CLICKED_ON_PRODUCT_CARD = "userClickedOnProductCard", r.USER_OPENED_RECOMMENDATION = "userOpenedRecommendation", r.USER_ADDED_TO_CART = "userAddedToCart", r.USER_SEND_POSITIVE_FEEDBACK = "userSendPositiveFeedback", r.USER_SEND_NEGATIVE_FEEDBACK = "userSendNegativeFeedback";
|
|
9
|
+
})(Dr || (Dr = {}));
|
|
10
|
+
var ge, g = typeof window < "u" ? window : void 0, ie = typeof globalThis < "u" ? globalThis : g, tn = Array.prototype, qr = tn.forEach, Nr = tn.indexOf, ne = ie == null ? void 0 : ie.navigator, k = ie == null ? void 0 : ie.document, te = ie == null ? void 0 : ie.location, Bi = ie == null ? void 0 : ie.fetch, Ui = ie != null && ie.XMLHttpRequest && "withCredentials" in new ie.XMLHttpRequest() ? ie.XMLHttpRequest : void 0, Br = ie == null ? void 0 : ie.AbortController, K = ne == null ? void 0 : ne.userAgent, I = g ?? {}, Ce = { DEBUG: !1, LIB_VERSION: "1.236.4" }, wi = "$copy_autocapture", Ao = ["$snapshot", "$pageview", "$pageleave", "$set", "survey dismissed", "survey sent", "survey shown", "$identify", "$groupidentify", "$create_alias", "$$client_ingestion_warning", "$web_experiment_applied", "$feature_enrollment_update", "$feature_flag_called"];
|
|
7
11
|
(function(r) {
|
|
8
12
|
r.GZipJS = "gzip-js", r.Base64 = "base64";
|
|
9
13
|
})(ge || (ge = {}));
|
|
@@ -13,17 +17,17 @@ function F(r, e) {
|
|
|
13
17
|
}
|
|
14
18
|
var di = function(r) {
|
|
15
19
|
return r.trim();
|
|
16
|
-
},
|
|
20
|
+
}, Hi = function(r) {
|
|
17
21
|
return r.replace(/^\$/, "");
|
|
18
|
-
},
|
|
22
|
+
}, Mo = Array.isArray, rn = Object.prototype, sn = rn.hasOwnProperty, _i = rn.toString, D = Mo || function(r) {
|
|
19
23
|
return _i.call(r) === "[object Array]";
|
|
20
24
|
}, ce = (r) => typeof r == "function", q = (r) => r === Object(r) && !D(r), nt = (r) => {
|
|
21
25
|
if (q(r)) {
|
|
22
|
-
for (var e in r) if (
|
|
26
|
+
for (var e in r) if (sn.call(r, e)) return !1;
|
|
23
27
|
return !0;
|
|
24
28
|
}
|
|
25
29
|
return !1;
|
|
26
|
-
}, S = (r) => r === void 0,
|
|
30
|
+
}, S = (r) => r === void 0, H = (r) => _i.call(r) == "[object String]", ji = (r) => H(r) && r.trim().length === 0, He = (r) => r === null, R = (r) => S(r) || He(r), Y = (r) => _i.call(r) == "[object Number]", Ie = (r) => _i.call(r) === "[object Boolean]", Do = (r) => r instanceof FormData, qo = (r) => F(Ao, r), nn = (r) => {
|
|
27
31
|
var e = { _log: function(t) {
|
|
28
32
|
if (g && (Ce.DEBUG || I.POSTHOG_DEBUG) && !S(g.console) && g.console) {
|
|
29
33
|
for (var i = ("__rrweb_original__" in g.console[t]) ? g.console[t].__rrweb_original__ : g.console[t], s = arguments.length, n = new Array(s > 1 ? s - 1 : 0), o = 1; o < s; o++) n[o - 1] = arguments[o];
|
|
@@ -43,10 +47,10 @@ var di = function(r) {
|
|
|
43
47
|
console.error(r, ...i);
|
|
44
48
|
}, uninitializedWarning: (t) => {
|
|
45
49
|
e.error("You must initialize PostHog before calling ".concat(t));
|
|
46
|
-
}, createLogger: (t) =>
|
|
50
|
+
}, createLogger: (t) => nn("".concat(r, " ").concat(t)) };
|
|
47
51
|
return e;
|
|
48
|
-
}, x =
|
|
49
|
-
if (r.config.disable_external_dependency_loading) return
|
|
52
|
+
}, x = nn("[PostHog.js]"), Q = x.createLogger, No = Q("[ExternalScriptsLoader]"), Ur = (r, e, t) => {
|
|
53
|
+
if (r.config.disable_external_dependency_loading) return No.warn("".concat(e, " was requested but loading of external scripts is disabled.")), t("Loading of external scripts is disabled");
|
|
50
54
|
var i = k == null ? void 0 : k.querySelectorAll("script");
|
|
51
55
|
if (i) {
|
|
52
56
|
for (var s = 0; s < i.length; s++) if (i[s].src === e) return t();
|
|
@@ -84,7 +88,7 @@ function f(r) {
|
|
|
84
88
|
function w(r, e, t) {
|
|
85
89
|
return e in r ? Object.defineProperty(r, e, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : r[e] = t, r;
|
|
86
90
|
}
|
|
87
|
-
function
|
|
91
|
+
function on(r, e) {
|
|
88
92
|
if (r == null) return {};
|
|
89
93
|
var t, i, s = function(o, a) {
|
|
90
94
|
if (o == null) return {};
|
|
@@ -105,15 +109,15 @@ I.__PosthogExtensions__ = I.__PosthogExtensions__ || {}, I.__PosthogExtensions__
|
|
|
105
109
|
i = "".concat(i, "&t=").concat(n);
|
|
106
110
|
}
|
|
107
111
|
var o = r.requestRouter.endpointFor("assets", i);
|
|
108
|
-
|
|
112
|
+
Ur(r, o, t);
|
|
109
113
|
}, I.__PosthogExtensions__.loadSiteApp = (r, e, t) => {
|
|
110
114
|
var i = r.requestRouter.endpointFor("api", e);
|
|
111
|
-
|
|
115
|
+
Ur(r, i, t);
|
|
112
116
|
};
|
|
113
117
|
var Qt = {};
|
|
114
118
|
function qe(r, e, t) {
|
|
115
119
|
if (D(r)) {
|
|
116
|
-
if (
|
|
120
|
+
if (qr && r.forEach === qr) r.forEach(e, t);
|
|
117
121
|
else if ("length" in r && r.length === +r.length) {
|
|
118
122
|
for (var i = 0, s = r.length; i < s; i++) if (i in r && e.call(t, r[i], i) === Qt) return;
|
|
119
123
|
}
|
|
@@ -122,12 +126,12 @@ function qe(r, e, t) {
|
|
|
122
126
|
function $(r, e, t) {
|
|
123
127
|
if (!R(r)) {
|
|
124
128
|
if (D(r)) return qe(r, e, t);
|
|
125
|
-
if (
|
|
129
|
+
if (Do(r)) {
|
|
126
130
|
for (var i of r.entries()) if (e.call(t, i[1], i[0]) === Qt) return;
|
|
127
|
-
} else for (var s in r) if (
|
|
131
|
+
} else for (var s in r) if (sn.call(r, s) && e.call(t, r[s], s) === Qt) return;
|
|
128
132
|
}
|
|
129
133
|
}
|
|
130
|
-
var
|
|
134
|
+
var U = function(r) {
|
|
131
135
|
for (var e = arguments.length, t = new Array(e > 1 ? e - 1 : 0), i = 1; i < e; i++) t[i - 1] = arguments[i];
|
|
132
136
|
return qe(t, function(s) {
|
|
133
137
|
for (var n in s) s[n] !== void 0 && (r[n] = s[n]);
|
|
@@ -150,7 +154,7 @@ var jr = function(r) {
|
|
|
150
154
|
} catch {
|
|
151
155
|
return;
|
|
152
156
|
}
|
|
153
|
-
},
|
|
157
|
+
}, Bo = function(r) {
|
|
154
158
|
return function() {
|
|
155
159
|
try {
|
|
156
160
|
for (var e = arguments.length, t = new Array(e), i = 0; i < e; i++) t[i] = arguments[i];
|
|
@@ -162,11 +166,11 @@ var jr = function(r) {
|
|
|
162
166
|
}, Xt = function(r) {
|
|
163
167
|
var e = {};
|
|
164
168
|
return $(r, function(t, i) {
|
|
165
|
-
(
|
|
169
|
+
(H(t) && t.length > 0 || Y(t)) && (e[i] = t);
|
|
166
170
|
}), e;
|
|
167
171
|
};
|
|
168
|
-
function
|
|
169
|
-
return t = r, i = (n) =>
|
|
172
|
+
function Uo(r, e) {
|
|
173
|
+
return t = r, i = (n) => H(n) && !He(e) ? n.slice(0, e) : n, s = /* @__PURE__ */ new Set(), function n(o, a) {
|
|
170
174
|
return o !== Object(o) ? i ? i(o, a) : o : s.has(o) ? void 0 : (s.add(o), D(o) ? (l = [], qe(o, (c) => {
|
|
171
175
|
l.push(n(c));
|
|
172
176
|
})) : (l = {}, $(o, (c, d) => {
|
|
@@ -179,22 +183,22 @@ function Bo(r, e) {
|
|
|
179
183
|
var Ho = ["herokuapp.com", "vercel.app", "netlify.app"];
|
|
180
184
|
function jo(r) {
|
|
181
185
|
var e = r == null ? void 0 : r.hostname;
|
|
182
|
-
if (!
|
|
186
|
+
if (!H(e)) return !1;
|
|
183
187
|
var t = e.split(".").slice(-2).join(".");
|
|
184
188
|
for (var i of Ho) if (t === i) return !1;
|
|
185
189
|
return !0;
|
|
186
190
|
}
|
|
187
|
-
function
|
|
191
|
+
function an(r, e) {
|
|
188
192
|
for (var t = 0; t < r.length; t++) if (e(r[t])) return r[t];
|
|
189
193
|
}
|
|
190
194
|
function N(r, e, t, i) {
|
|
191
195
|
var { capture: s = !1, passive: n = !0 } = i ?? {};
|
|
192
196
|
r == null || r.addEventListener(e, t, { capture: s, passive: n });
|
|
193
197
|
}
|
|
194
|
-
var
|
|
195
|
-
function
|
|
198
|
+
var ln = "$people_distinct_id", wt = "__alias", St = "__timers", zr = "$autocapture_disabled_server_side", zi = "$heatmaps_enabled_server_side", Wr = "$exception_capture_enabled_server_side", Vr = "$web_vitals_enabled_server_side", un = "$dead_clicks_enabled_server_side", Gr = "$web_vitals_allowed_metrics", Wi = "$session_recording_enabled_server_side", Kr = "$console_log_recording_enabled_server_side", Jr = "$session_recording_network_payload_capture", Yr = "$session_recording_masking", Qr = "$session_recording_canvas_recording", Xr = "$replay_sample_rate", Zr = "$replay_minimum_duration", es = "$replay_script_config", Zt = "$sesid", kt = "$session_is_sampled", Si = "$session_recording_url_trigger_activated_session", ki = "$session_recording_event_trigger_activated_session", ot = "$enabled_feature_flags", Wt = "$early_access_features", Vi = "$feature_flag_details", Et = "$stored_person_properties", Ke = "$stored_group_properties", Gi = "$surveys", Lt = "$surveys_activated", ei = "$flag_call_reported", ke = "$user_state", Ki = "$client_session_props", Ji = "$capture_rate_limit", Yi = "$initial_campaign_params", Qi = "$initial_referrer_info", Xi = "$initial_person_info", ti = "$epp", cn = "__POSTHOG_TOOLBAR__", ts = "$posthog_cookieless", zo = [ln, wt, "__cmpns", St, Wi, zi, Zt, ot, ke, Wt, Vi, Ke, Et, Gi, ei, Ki, Ji, Yi, Qi, ti];
|
|
199
|
+
function is(r) {
|
|
196
200
|
var e;
|
|
197
|
-
return r instanceof Element && (r.id ===
|
|
201
|
+
return r instanceof Element && (r.id === cn || !((e = r.closest) === null || e === void 0 || !e.call(r, ".toolbar-global-fade-container")));
|
|
198
202
|
}
|
|
199
203
|
function pi(r) {
|
|
200
204
|
return !!r && r.nodeType === 1;
|
|
@@ -202,16 +206,16 @@ function pi(r) {
|
|
|
202
206
|
function Ne(r, e) {
|
|
203
207
|
return !!r && !!r.tagName && r.tagName.toLowerCase() === e.toLowerCase();
|
|
204
208
|
}
|
|
205
|
-
function
|
|
209
|
+
function dn(r) {
|
|
206
210
|
return !!r && r.nodeType === 3;
|
|
207
211
|
}
|
|
208
|
-
function
|
|
212
|
+
function _n(r) {
|
|
209
213
|
return !!r && r.nodeType === 11;
|
|
210
214
|
}
|
|
211
215
|
function yr(r) {
|
|
212
216
|
return r ? di(r).split(/\s+/) : [];
|
|
213
217
|
}
|
|
214
|
-
function
|
|
218
|
+
function rs(r) {
|
|
215
219
|
var e = g == null ? void 0 : g.location.href;
|
|
216
220
|
return !!(e && r && r.some((t) => e.match(t)));
|
|
217
221
|
}
|
|
@@ -229,35 +233,35 @@ function ii(r) {
|
|
|
229
233
|
}
|
|
230
234
|
return yr(e);
|
|
231
235
|
}
|
|
232
|
-
function
|
|
236
|
+
function hn(r) {
|
|
233
237
|
return R(r) ? null : di(r).split(/(\s+)/).filter((e) => ct(e)).join("").replace(/[\r\n]/g, " ").replace(/[ ]+/g, " ").substring(0, 255);
|
|
234
238
|
}
|
|
235
239
|
function gi(r) {
|
|
236
240
|
var e = "";
|
|
237
|
-
return er(r) && !
|
|
241
|
+
return er(r) && !vn(r) && r.childNodes && r.childNodes.length && $(r.childNodes, function(t) {
|
|
238
242
|
var i;
|
|
239
|
-
|
|
243
|
+
dn(t) && t.textContent && (e += (i = hn(t.textContent)) !== null && i !== void 0 ? i : "");
|
|
240
244
|
}), di(e);
|
|
241
245
|
}
|
|
242
|
-
function
|
|
246
|
+
function pn(r) {
|
|
243
247
|
return S(r.target) ? r.srcElement || null : (e = r.target) !== null && e !== void 0 && e.shadowRoot ? r.composedPath()[0] || null : r.target || null;
|
|
244
248
|
var e;
|
|
245
249
|
}
|
|
246
250
|
var Zi = ["a", "button", "form", "input", "select", "textarea", "label"];
|
|
247
|
-
function
|
|
251
|
+
function gn(r) {
|
|
248
252
|
var e = r.parentNode;
|
|
249
253
|
return !(!e || !pi(e)) && e;
|
|
250
254
|
}
|
|
251
|
-
function
|
|
255
|
+
function Wo(r, e) {
|
|
252
256
|
var t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : void 0, i = arguments.length > 3 ? arguments[3] : void 0, s = arguments.length > 4 ? arguments[4] : void 0;
|
|
253
|
-
if (!g || !r || Ne(r, "html") || !pi(r) || t != null && t.url_allowlist && !
|
|
257
|
+
if (!g || !r || Ne(r, "html") || !pi(r) || t != null && t.url_allowlist && !rs(t.url_allowlist) || t != null && t.url_ignorelist && rs(t.url_ignorelist)) return !1;
|
|
254
258
|
if (t != null && t.dom_event_allowlist) {
|
|
255
259
|
var n = t.dom_event_allowlist;
|
|
256
260
|
if (n && !n.some((_) => e.type === _)) return !1;
|
|
257
261
|
}
|
|
258
|
-
for (var o = !1, a = [r], l = !0, c = r; c.parentNode && !Ne(c, "body"); ) if (
|
|
262
|
+
for (var o = !1, a = [r], l = !0, c = r; c.parentNode && !Ne(c, "body"); ) if (_n(c.parentNode)) a.push(c.parentNode.host), c = c.parentNode.host;
|
|
259
263
|
else {
|
|
260
|
-
if (!(l =
|
|
264
|
+
if (!(l = gn(c))) break;
|
|
261
265
|
if (i || Zi.indexOf(l.tagName.toLowerCase()) > -1) o = !0;
|
|
262
266
|
else {
|
|
263
267
|
var d = g.getComputedStyle(l);
|
|
@@ -311,39 +315,39 @@ function er(r) {
|
|
|
311
315
|
}
|
|
312
316
|
if (F(ii(r), "ph-include")) return !0;
|
|
313
317
|
var i = r.type || "";
|
|
314
|
-
if (
|
|
318
|
+
if (H(i)) switch (i.toLowerCase()) {
|
|
315
319
|
case "hidden":
|
|
316
320
|
case "password":
|
|
317
321
|
return !1;
|
|
318
322
|
}
|
|
319
323
|
var s = r.name || r.id || "";
|
|
320
|
-
return !(
|
|
324
|
+
return !(H(s) && /^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(s.replace(/[^a-zA-Z0-9]/g, "")));
|
|
321
325
|
}
|
|
322
|
-
function
|
|
326
|
+
function vn(r) {
|
|
323
327
|
return !!(Ne(r, "input") && !["button", "checkbox", "submit", "reset"].includes(r.type) || Ne(r, "select") || Ne(r, "textarea") || r.getAttribute("contenteditable") === "true");
|
|
324
328
|
}
|
|
325
|
-
var
|
|
329
|
+
var fn = "(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11})", Vo = new RegExp("^(?:".concat(fn, ")$")), Go = new RegExp(fn), mn = "\\d{3}-?\\d{2}-?\\d{4}", Ko = new RegExp("^(".concat(mn, ")$")), Jo = new RegExp("(".concat(mn, ")"));
|
|
326
330
|
function ct(r) {
|
|
327
331
|
var e = !(arguments.length > 1 && arguments[1] !== void 0) || arguments[1];
|
|
328
|
-
return !(R(r) ||
|
|
332
|
+
return !(R(r) || H(r) && (r = di(r), (e ? Vo : Go).test((r || "").replace(/[- ]/g, "")) || (e ? Ko : Jo).test(r)));
|
|
329
333
|
}
|
|
330
|
-
function
|
|
334
|
+
function yn(r) {
|
|
331
335
|
var e = gi(r);
|
|
332
|
-
return ct(e = "".concat(e, " ").concat(
|
|
336
|
+
return ct(e = "".concat(e, " ").concat(bn(r)).trim()) ? e : "";
|
|
333
337
|
}
|
|
334
|
-
function
|
|
338
|
+
function bn(r) {
|
|
335
339
|
var e = "";
|
|
336
340
|
return r && r.childNodes && r.childNodes.length && $(r.childNodes, function(t) {
|
|
337
341
|
var i;
|
|
338
342
|
if (t && ((i = t.tagName) === null || i === void 0 ? void 0 : i.toLowerCase()) === "span") try {
|
|
339
343
|
var s = gi(t);
|
|
340
|
-
e = "".concat(e, " ").concat(s).trim(), t.childNodes && t.childNodes.length && (e = "".concat(e, " ").concat(
|
|
344
|
+
e = "".concat(e, " ").concat(s).trim(), t.childNodes && t.childNodes.length && (e = "".concat(e, " ").concat(bn(t)).trim());
|
|
341
345
|
} catch (n) {
|
|
342
346
|
x.error("[AutoCapture]", n);
|
|
343
347
|
}
|
|
344
348
|
}), e;
|
|
345
349
|
}
|
|
346
|
-
function
|
|
350
|
+
function Yo(r) {
|
|
347
351
|
return function(e) {
|
|
348
352
|
var t = e.map((i) => {
|
|
349
353
|
var s, n, o = "";
|
|
@@ -354,7 +358,7 @@ function Ko(r) {
|
|
|
354
358
|
return h.localeCompare(_);
|
|
355
359
|
}).forEach((d) => {
|
|
356
360
|
var [u, h] = d;
|
|
357
|
-
return c[
|
|
361
|
+
return c[ss(u.toString())] = ss(h.toString());
|
|
358
362
|
}), o += ":", o += zt(l).map((d) => {
|
|
359
363
|
var [u, h] = d;
|
|
360
364
|
return "".concat(u, '="').concat(h, '"');
|
|
@@ -363,7 +367,7 @@ function Ko(r) {
|
|
|
363
367
|
return t.join(";");
|
|
364
368
|
}(function(e) {
|
|
365
369
|
return e.map((t) => {
|
|
366
|
-
var i, s, n = { text: (i = t.$el_text) === null || i === void 0 ? void 0 : i.slice(0, 400), tag_name: t.tag_name, href: (s = t.attr__href) === null || s === void 0 ? void 0 : s.slice(0, 2048), attr_class:
|
|
370
|
+
var i, s, n = { text: (i = t.$el_text) === null || i === void 0 ? void 0 : i.slice(0, 400), tag_name: t.tag_name, href: (s = t.attr__href) === null || s === void 0 ? void 0 : s.slice(0, 2048), attr_class: Qo(t), attr_id: t.attr__id, nth_child: t.nth_child, nth_of_type: t.nth_of_type, attributes: {} };
|
|
367
371
|
return zt(t).filter((o) => {
|
|
368
372
|
var [a] = o;
|
|
369
373
|
return a.indexOf("attr__") === 0;
|
|
@@ -374,14 +378,14 @@ function Ko(r) {
|
|
|
374
378
|
});
|
|
375
379
|
}(r));
|
|
376
380
|
}
|
|
377
|
-
function
|
|
381
|
+
function ss(r) {
|
|
378
382
|
return r.replace(/"|\\"/g, '\\"');
|
|
379
383
|
}
|
|
380
|
-
function
|
|
384
|
+
function Qo(r) {
|
|
381
385
|
var e = r.attr__class;
|
|
382
386
|
return e ? D(e) ? e : yr(e) : void 0;
|
|
383
387
|
}
|
|
384
|
-
class
|
|
388
|
+
class wn {
|
|
385
389
|
constructor() {
|
|
386
390
|
this.clicks = [];
|
|
387
391
|
}
|
|
@@ -393,10 +397,10 @@ class bn {
|
|
|
393
397
|
return !1;
|
|
394
398
|
}
|
|
395
399
|
}
|
|
396
|
-
var
|
|
400
|
+
var Xo = ["localhost", "127.0.0.1"], dt = (r) => {
|
|
397
401
|
var e = k == null ? void 0 : k.createElement("a");
|
|
398
402
|
return S(e) ? null : (e.href = r, e);
|
|
399
|
-
},
|
|
403
|
+
}, Zo = function(r) {
|
|
400
404
|
var e, t, i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "&", s = [];
|
|
401
405
|
return $(r, function(n, o) {
|
|
402
406
|
S(n) || S(o) || o === "undefined" || (e = encodeURIComponent(((a) => a instanceof File)(n) ? n.name : n.toString()), t = encodeURIComponent(o), s[s.length] = t + "=" + e);
|
|
@@ -428,11 +432,11 @@ var Qo = ["localhost", "127.0.0.1"], dt = (r) => {
|
|
|
428
432
|
}, si = function(r, e) {
|
|
429
433
|
var t = r.match(new RegExp(e + "=([^&]*)"));
|
|
430
434
|
return t ? t[1] : null;
|
|
431
|
-
},
|
|
435
|
+
}, ns = Q("[AutoCapture]");
|
|
432
436
|
function Ei(r, e) {
|
|
433
437
|
return e.length > r ? e.slice(0, r) + "..." : e;
|
|
434
438
|
}
|
|
435
|
-
function
|
|
439
|
+
function ea(r) {
|
|
436
440
|
if (r.previousElementSibling) return r.previousElementSibling;
|
|
437
441
|
var e = r;
|
|
438
442
|
do
|
|
@@ -440,51 +444,51 @@ function Zo(r) {
|
|
|
440
444
|
while (e && !pi(e));
|
|
441
445
|
return e;
|
|
442
446
|
}
|
|
443
|
-
function
|
|
447
|
+
function ta(r, e, t, i) {
|
|
444
448
|
var s = r.tagName.toLowerCase(), n = { tag_name: s };
|
|
445
|
-
Zi.indexOf(s) > -1 && !t && (s.toLowerCase() === "a" || s.toLowerCase() === "button" ? n.$el_text = Ei(1024,
|
|
449
|
+
Zi.indexOf(s) > -1 && !t && (s.toLowerCase() === "a" || s.toLowerCase() === "button" ? n.$el_text = Ei(1024, yn(r)) : n.$el_text = Ei(1024, gi(r)));
|
|
446
450
|
var o = ii(r);
|
|
447
451
|
o.length > 0 && (n.classes = o.filter(function(d) {
|
|
448
452
|
return d !== "";
|
|
449
453
|
})), $(r.attributes, function(d) {
|
|
450
454
|
var u;
|
|
451
|
-
if ((!
|
|
455
|
+
if ((!vn(r) || ["name", "id", "class", "aria-label"].indexOf(d.name) !== -1) && (i == null || !i.includes(d.name)) && !e && ct(d.value) && (u = d.name, !H(u) || u.substring(0, 10) !== "_ngcontent" && u.substring(0, 7) !== "_nghost")) {
|
|
452
456
|
var h = d.value;
|
|
453
457
|
d.name === "class" && (h = yr(h).join(" ")), n["attr__" + d.name] = Ei(1024, h);
|
|
454
458
|
}
|
|
455
459
|
});
|
|
456
|
-
for (var a = 1, l = 1, c = r; c =
|
|
460
|
+
for (var a = 1, l = 1, c = r; c = ea(c); ) a++, c.tagName === r.tagName && l++;
|
|
457
461
|
return n.nth_child = a, n.nth_of_type = l, n;
|
|
458
462
|
}
|
|
459
|
-
function
|
|
460
|
-
for (var t, i, { e: s, maskAllElementAttributes: n, maskAllText: o, elementAttributeIgnoreList: a, elementsChainAsString: l } = e, c = [r], d = r; d.parentNode && !Ne(d, "body"); )
|
|
463
|
+
function ia(r, e) {
|
|
464
|
+
for (var t, i, { e: s, maskAllElementAttributes: n, maskAllText: o, elementAttributeIgnoreList: a, elementsChainAsString: l } = e, c = [r], d = r; d.parentNode && !Ne(d, "body"); ) _n(d.parentNode) ? (c.push(d.parentNode.host), d = d.parentNode.host) : (c.push(d.parentNode), d = d.parentNode);
|
|
461
465
|
var u, h = [], _ = {}, p = !1, v = !1;
|
|
462
466
|
if ($(c, (C) => {
|
|
463
467
|
var T = er(C);
|
|
464
|
-
C.tagName.toLowerCase() === "a" && (p = C.getAttribute("href"), p = T && p && ct(p) && p), F(ii(C), "ph-no-capture") && (v = !0), h.push(
|
|
465
|
-
var O = function(
|
|
466
|
-
if (!er(
|
|
468
|
+
C.tagName.toLowerCase() === "a" && (p = C.getAttribute("href"), p = T && p && ct(p) && p), F(ii(C), "ph-no-capture") && (v = !0), h.push(ta(C, n, o, a));
|
|
469
|
+
var O = function(A) {
|
|
470
|
+
if (!er(A)) return {};
|
|
467
471
|
var P = {};
|
|
468
|
-
return $(
|
|
472
|
+
return $(A.attributes, function(M) {
|
|
469
473
|
if (M.name && M.name.indexOf("data-ph-capture-attribute") === 0) {
|
|
470
474
|
var z = M.name.replace("data-ph-capture-attribute-", ""), he = M.value;
|
|
471
475
|
z && he && ct(he) && (P[z] = he);
|
|
472
476
|
}
|
|
473
477
|
}), P;
|
|
474
478
|
}(C);
|
|
475
|
-
|
|
479
|
+
U(_, O);
|
|
476
480
|
}), v) return { props: {}, explicitNoCapture: v };
|
|
477
|
-
if (o || (r.tagName.toLowerCase() === "a" || r.tagName.toLowerCase() === "button" ? h[0].$el_text =
|
|
481
|
+
if (o || (r.tagName.toLowerCase() === "a" || r.tagName.toLowerCase() === "button" ? h[0].$el_text = yn(r) : h[0].$el_text = gi(r)), p) {
|
|
478
482
|
var b, y;
|
|
479
483
|
h[0].attr__href = p;
|
|
480
484
|
var m = (b = dt(p)) === null || b === void 0 ? void 0 : b.host, E = g == null || (y = g.location) === null || y === void 0 ? void 0 : y.host;
|
|
481
485
|
m && E && m !== E && (u = p);
|
|
482
486
|
}
|
|
483
|
-
return { props:
|
|
487
|
+
return { props: U({ $event_type: s.type, $ce_version: 1 }, l ? {} : { $elements: h }, { $elements_chain: Yo(h) }, (t = h[0]) !== null && t !== void 0 && t.$el_text ? { $el_text: (i = h[0]) === null || i === void 0 ? void 0 : i.$el_text } : {}, u && s.type === "click" ? { $external_click_url: u } : {}, _) };
|
|
484
488
|
}
|
|
485
|
-
class
|
|
489
|
+
class ra {
|
|
486
490
|
constructor(e) {
|
|
487
|
-
w(this, "_initialized", !1), w(this, "_isDisabledServerSide", null), w(this, "rageclicks", new
|
|
491
|
+
w(this, "_initialized", !1), w(this, "_isDisabledServerSide", null), w(this, "rageclicks", new wn()), w(this, "_elementsChainAsString", !1), this.instance = e, this._elementSelectors = null;
|
|
488
492
|
}
|
|
489
493
|
get _config() {
|
|
490
494
|
var e, t, i = q(this.instance.config.autocapture) ? this.instance.config.autocapture : {};
|
|
@@ -498,7 +502,7 @@ class ia {
|
|
|
498
502
|
try {
|
|
499
503
|
this._captureEvent(i);
|
|
500
504
|
} catch (s) {
|
|
501
|
-
|
|
505
|
+
ns.error("Failed to capture event", s);
|
|
502
506
|
}
|
|
503
507
|
};
|
|
504
508
|
if (N(k, "submit", e, { capture: !0 }), N(k, "change", e, { capture: !0 }), N(k, "click", e, { capture: !0 }), this._config.capture_copied_text) {
|
|
@@ -508,13 +512,13 @@ class ia {
|
|
|
508
512
|
N(k, "copy", t, { capture: !0 }), N(k, "cut", t, { capture: !0 });
|
|
509
513
|
}
|
|
510
514
|
}
|
|
511
|
-
} else
|
|
515
|
+
} else ns.info("Disabling Automatic Event Collection because this browser is not supported");
|
|
512
516
|
}
|
|
513
517
|
startIfEnabled() {
|
|
514
518
|
this.isEnabled && !this._initialized && (this._addDomEventHandlers(), this._initialized = !0);
|
|
515
519
|
}
|
|
516
520
|
onRemoteConfig(e) {
|
|
517
|
-
e.elementsChainAsString && (this._elementsChainAsString = e.elementsChainAsString), this.instance.persistence && this.instance.persistence.register({ [
|
|
521
|
+
e.elementsChainAsString && (this._elementsChainAsString = e.elementsChainAsString), this.instance.persistence && this.instance.persistence.register({ [zr]: !!e.autocapture_opt_out }), this._isDisabledServerSide = !!e.autocapture_opt_out, this.startIfEnabled();
|
|
518
522
|
}
|
|
519
523
|
setElementSelectors(e) {
|
|
520
524
|
this._elementSelectors = e;
|
|
@@ -529,23 +533,23 @@ class ia {
|
|
|
529
533
|
}), i;
|
|
530
534
|
}
|
|
531
535
|
get isEnabled() {
|
|
532
|
-
var e, t, i = (e = this.instance.persistence) === null || e === void 0 ? void 0 : e.props[
|
|
533
|
-
if (
|
|
536
|
+
var e, t, i = (e = this.instance.persistence) === null || e === void 0 ? void 0 : e.props[zr], s = this._isDisabledServerSide;
|
|
537
|
+
if (He(s) && !Ie(i) && !this.instance.config.advanced_disable_decide) return !1;
|
|
534
538
|
var n = (t = this._isDisabledServerSide) !== null && t !== void 0 ? t : !!i;
|
|
535
539
|
return !!this.instance.config.autocapture && !n;
|
|
536
540
|
}
|
|
537
541
|
_captureEvent(e) {
|
|
538
542
|
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "$autocapture";
|
|
539
543
|
if (this.isEnabled) {
|
|
540
|
-
var i, s =
|
|
541
|
-
|
|
544
|
+
var i, s = pn(e);
|
|
545
|
+
dn(s) && (s = s.parentNode || null), t === "$autocapture" && e.type === "click" && e instanceof MouseEvent && this.instance.config.rageclick && (i = this.rageclicks) !== null && i !== void 0 && i.isRageClick(e.clientX, e.clientY, (/* @__PURE__ */ new Date()).getTime()) && this._captureEvent(e, "$rageclick");
|
|
542
546
|
var n = t === wi;
|
|
543
|
-
if (s &&
|
|
544
|
-
var { props: o, explicitNoCapture: a } =
|
|
547
|
+
if (s && Wo(s, e, this._config, n, n ? ["copy", "cut"] : void 0)) {
|
|
548
|
+
var { props: o, explicitNoCapture: a } = ia(s, { e, maskAllElementAttributes: this.instance.config.mask_all_element_attributes, maskAllText: this.instance.config.mask_all_text, elementAttributeIgnoreList: this._config.element_attribute_ignorelist, elementsChainAsString: this._elementsChainAsString });
|
|
545
549
|
if (a) return !1;
|
|
546
550
|
var l = this.getElementSelectors(s);
|
|
547
551
|
if (l && l.length > 0 && (o.$element_selectors = l), t === wi) {
|
|
548
|
-
var c, d =
|
|
552
|
+
var c, d = hn(g == null || (c = g.getSelection()) === null || c === void 0 ? void 0 : c.toString()), u = e.type || "clipboard";
|
|
549
553
|
if (!d) return !1;
|
|
550
554
|
o.$selected_content = d, o.$copy_type = u;
|
|
551
555
|
}
|
|
@@ -562,7 +566,7 @@ Math.trunc || (Math.trunc = function(r) {
|
|
|
562
566
|
}), Number.isInteger || (Number.isInteger = function(r) {
|
|
563
567
|
return Y(r) && isFinite(r) && Math.floor(r) === r;
|
|
564
568
|
});
|
|
565
|
-
var
|
|
569
|
+
var os = "0123456789abcdef";
|
|
566
570
|
class ni {
|
|
567
571
|
constructor(e) {
|
|
568
572
|
if (this.bytes = e, e.length !== 16) throw new TypeError("not 128-bit length");
|
|
@@ -573,7 +577,7 @@ class ni {
|
|
|
573
577
|
return n[0] = e / Math.pow(2, 40), n[1] = e / Math.pow(2, 32), n[2] = e / Math.pow(2, 24), n[3] = e / Math.pow(2, 16), n[4] = e / Math.pow(2, 8), n[5] = e, n[6] = 112 | t >>> 8, n[7] = t, n[8] = 128 | i >>> 24, n[9] = i >>> 16, n[10] = i >>> 8, n[11] = i, n[12] = s >>> 24, n[13] = s >>> 16, n[14] = s >>> 8, n[15] = s, new ni(n);
|
|
574
578
|
}
|
|
575
579
|
toString() {
|
|
576
|
-
for (var e = "", t = 0; t < this.bytes.length; t++) e = e +
|
|
580
|
+
for (var e = "", t = 0; t < this.bytes.length; t++) e = e + os.charAt(this.bytes[t] >>> 4) + os.charAt(15 & this.bytes[t]), t !== 3 && t !== 5 && t !== 7 && t !== 9 || (e += "-");
|
|
577
581
|
if (e.length !== 36) throw new Error("Invalid UUIDv7 was generated");
|
|
578
582
|
return e;
|
|
579
583
|
}
|
|
@@ -591,9 +595,9 @@ class ni {
|
|
|
591
595
|
return 0;
|
|
592
596
|
}
|
|
593
597
|
}
|
|
594
|
-
class
|
|
598
|
+
class sa {
|
|
595
599
|
constructor() {
|
|
596
|
-
w(this, "_timestamp", 0), w(this, "_counter", 0), w(this, "_random", new
|
|
600
|
+
w(this, "_timestamp", 0), w(this, "_counter", 0), w(this, "_random", new na());
|
|
597
601
|
}
|
|
598
602
|
generate() {
|
|
599
603
|
var e = this.generateOrAbort();
|
|
@@ -618,22 +622,22 @@ class ra {
|
|
|
618
622
|
this._counter = 1024 * this._random.nextUint32() + (1023 & this._random.nextUint32());
|
|
619
623
|
}
|
|
620
624
|
}
|
|
621
|
-
var
|
|
625
|
+
var as, Sn = (r) => {
|
|
622
626
|
if (typeof UUIDV7_DENY_WEAK_RNG < "u" && UUIDV7_DENY_WEAK_RNG) throw new Error("no cryptographically strong RNG available");
|
|
623
627
|
for (var e = 0; e < r.length; e++) r[e] = 65536 * Math.trunc(65536 * Math.random()) + Math.trunc(65536 * Math.random());
|
|
624
628
|
return r;
|
|
625
629
|
};
|
|
626
|
-
g && !S(g.crypto) && crypto.getRandomValues && (
|
|
627
|
-
class
|
|
630
|
+
g && !S(g.crypto) && crypto.getRandomValues && (Sn = (r) => crypto.getRandomValues(r));
|
|
631
|
+
class na {
|
|
628
632
|
constructor() {
|
|
629
633
|
w(this, "_buffer", new Uint32Array(8)), w(this, "_cursor", 1 / 0);
|
|
630
634
|
}
|
|
631
635
|
nextUint32() {
|
|
632
|
-
return this._cursor >= this._buffer.length && (
|
|
636
|
+
return this._cursor >= this._buffer.length && (Sn(this._buffer), this._cursor = 0), this._buffer[this._cursor++];
|
|
633
637
|
}
|
|
634
638
|
}
|
|
635
|
-
var Me = () =>
|
|
636
|
-
function
|
|
639
|
+
var Me = () => oa().toString(), oa = () => (as || (as = new sa())).generate(), aa = "Thu, 01 Jan 1970 00:00:00 GMT", ft = "", la = /[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i;
|
|
640
|
+
function ua(r, e) {
|
|
637
641
|
if (e) {
|
|
638
642
|
var t = function(s) {
|
|
639
643
|
var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : k;
|
|
@@ -641,13 +645,13 @@ function la(r, e) {
|
|
|
641
645
|
if (!n || ["localhost", "127.0.0.1"].includes(s)) return "";
|
|
642
646
|
for (var o = s.split("."), a = Math.min(o.length, 8), l = "dmn_chk_" + Me(), c = new RegExp("(^|;)\\s*" + l + "=1"); !ft && a--; ) {
|
|
643
647
|
var d = o.slice(a).join("."), u = l + "=1;domain=." + d;
|
|
644
|
-
n.cookie = u, c.test(n.cookie) && (n.cookie = u + ";expires=" +
|
|
648
|
+
n.cookie = u, c.test(n.cookie) && (n.cookie = u + ";expires=" + aa, ft = d);
|
|
645
649
|
}
|
|
646
650
|
return ft;
|
|
647
651
|
}(r);
|
|
648
652
|
if (!t) {
|
|
649
653
|
var i = ((s) => {
|
|
650
|
-
var n = s.match(
|
|
654
|
+
var n = s.match(la);
|
|
651
655
|
return n ? n[0] : "";
|
|
652
656
|
})(r);
|
|
653
657
|
i !== t && x.info("Warning: cookie subdomain discovery mismatch", i, t), t = i;
|
|
@@ -656,7 +660,7 @@ function la(r, e) {
|
|
|
656
660
|
}
|
|
657
661
|
return "";
|
|
658
662
|
}
|
|
659
|
-
var
|
|
663
|
+
var Le, Pe = { is_supported: () => !!k, error: function(r) {
|
|
660
664
|
x.error("cookieStore error: " + r);
|
|
661
665
|
}, get: function(r) {
|
|
662
666
|
if (k) {
|
|
@@ -678,7 +682,7 @@ var Ae, Pe = { is_supported: () => !!k, error: function(r) {
|
|
|
678
682
|
return e;
|
|
679
683
|
}, set: function(r, e, t, i, s) {
|
|
680
684
|
if (k) try {
|
|
681
|
-
var n = "", o = "", a =
|
|
685
|
+
var n = "", o = "", a = ua(k.location.hostname, i);
|
|
682
686
|
if (t) {
|
|
683
687
|
var l = /* @__PURE__ */ new Date();
|
|
684
688
|
l.setTime(l.getTime() + 24 * t * 60 * 60 * 1e3), n = "; expires=" + l.toUTCString();
|
|
@@ -695,13 +699,13 @@ var Ae, Pe = { is_supported: () => !!k, error: function(r) {
|
|
|
695
699
|
} catch {
|
|
696
700
|
return;
|
|
697
701
|
}
|
|
698
|
-
} }, xi = null,
|
|
699
|
-
if (!
|
|
702
|
+
} }, xi = null, j = { is_supported: function() {
|
|
703
|
+
if (!He(xi)) return xi;
|
|
700
704
|
var r = !0;
|
|
701
705
|
if (S(g)) r = !1;
|
|
702
706
|
else try {
|
|
703
707
|
var e = "__mplssupport__";
|
|
704
|
-
|
|
708
|
+
j.set(e, "xyz"), j.get(e) !== '"xyz"' && (r = !1), j.remove(e);
|
|
705
709
|
} catch {
|
|
706
710
|
r = !1;
|
|
707
711
|
}
|
|
@@ -712,12 +716,12 @@ var Ae, Pe = { is_supported: () => !!k, error: function(r) {
|
|
|
712
716
|
try {
|
|
713
717
|
return g == null ? void 0 : g.localStorage.getItem(r);
|
|
714
718
|
} catch (e) {
|
|
715
|
-
|
|
719
|
+
j.error(e);
|
|
716
720
|
}
|
|
717
721
|
return null;
|
|
718
722
|
}, parse: function(r) {
|
|
719
723
|
try {
|
|
720
|
-
return JSON.parse(
|
|
724
|
+
return JSON.parse(j.get(r)) || {};
|
|
721
725
|
} catch {
|
|
722
726
|
}
|
|
723
727
|
return null;
|
|
@@ -725,43 +729,43 @@ var Ae, Pe = { is_supported: () => !!k, error: function(r) {
|
|
|
725
729
|
try {
|
|
726
730
|
g == null || g.localStorage.setItem(r, JSON.stringify(e));
|
|
727
731
|
} catch (t) {
|
|
728
|
-
|
|
732
|
+
j.error(t);
|
|
729
733
|
}
|
|
730
734
|
}, remove: function(r) {
|
|
731
735
|
try {
|
|
732
736
|
g == null || g.localStorage.removeItem(r);
|
|
733
737
|
} catch (e) {
|
|
734
|
-
|
|
738
|
+
j.error(e);
|
|
735
739
|
}
|
|
736
|
-
} },
|
|
740
|
+
} }, ca = ["distinct_id", Zt, kt, ti, Xi], Mt = f(f({}, j), {}, { parse: function(r) {
|
|
737
741
|
try {
|
|
738
742
|
var e = {};
|
|
739
743
|
try {
|
|
740
744
|
e = Pe.parse(r) || {};
|
|
741
745
|
} catch {
|
|
742
746
|
}
|
|
743
|
-
var t =
|
|
744
|
-
return
|
|
747
|
+
var t = U(e, JSON.parse(j.get(r) || "{}"));
|
|
748
|
+
return j.set(r, t), t;
|
|
745
749
|
} catch {
|
|
746
750
|
}
|
|
747
751
|
return null;
|
|
748
752
|
}, set: function(r, e, t, i, s, n) {
|
|
749
753
|
try {
|
|
750
|
-
|
|
754
|
+
j.set(r, e, void 0, void 0, n);
|
|
751
755
|
var o = {};
|
|
752
|
-
|
|
756
|
+
ca.forEach((a) => {
|
|
753
757
|
e[a] && (o[a] = e[a]);
|
|
754
758
|
}), Object.keys(o).length && Pe.set(r, o, t, i, s, n);
|
|
755
759
|
} catch (a) {
|
|
756
|
-
|
|
760
|
+
j.error(a);
|
|
757
761
|
}
|
|
758
762
|
}, remove: function(r, e) {
|
|
759
763
|
try {
|
|
760
764
|
g == null || g.localStorage.removeItem(r), Pe.remove(r, e);
|
|
761
765
|
} catch (t) {
|
|
762
|
-
|
|
766
|
+
j.error(t);
|
|
763
767
|
}
|
|
764
|
-
} }), Dt = {},
|
|
768
|
+
} }), Dt = {}, da = { is_supported: function() {
|
|
765
769
|
return !0;
|
|
766
770
|
}, error: function(r) {
|
|
767
771
|
x.error("memoryStorage error: " + r);
|
|
@@ -774,7 +778,7 @@ var Ae, Pe = { is_supported: () => !!k, error: function(r) {
|
|
|
774
778
|
}, remove: function(r) {
|
|
775
779
|
delete Dt[r];
|
|
776
780
|
} }, ze = null, W = { is_supported: function() {
|
|
777
|
-
if (!
|
|
781
|
+
if (!He(ze)) return ze;
|
|
778
782
|
if (ze = !0, S(g)) ze = !1;
|
|
779
783
|
else try {
|
|
780
784
|
var r = "__support__";
|
|
@@ -813,8 +817,8 @@ var Ae, Pe = { is_supported: () => !!k, error: function(r) {
|
|
|
813
817
|
} };
|
|
814
818
|
(function(r) {
|
|
815
819
|
r[r.PENDING = -1] = "PENDING", r[r.DENIED = 0] = "DENIED", r[r.GRANTED = 1] = "GRANTED";
|
|
816
|
-
})(
|
|
817
|
-
class
|
|
820
|
+
})(Le || (Le = {}));
|
|
821
|
+
class _a {
|
|
818
822
|
constructor(e) {
|
|
819
823
|
this._instance = e;
|
|
820
824
|
}
|
|
@@ -822,10 +826,10 @@ class da {
|
|
|
822
826
|
return this._instance.config;
|
|
823
827
|
}
|
|
824
828
|
get consent() {
|
|
825
|
-
return this._getDnt() ?
|
|
829
|
+
return this._getDnt() ? Le.DENIED : this._storedConsent;
|
|
826
830
|
}
|
|
827
831
|
isOptedOut() {
|
|
828
|
-
return this.consent ===
|
|
832
|
+
return this.consent === Le.DENIED || this.consent === Le.PENDING && this._config.opt_out_capturing_by_default;
|
|
829
833
|
}
|
|
830
834
|
isOptedIn() {
|
|
831
835
|
return !this.isOptedOut();
|
|
@@ -842,26 +846,26 @@ class da {
|
|
|
842
846
|
}
|
|
843
847
|
get _storedConsent() {
|
|
844
848
|
var e = this._storage.get(this._storageKey);
|
|
845
|
-
return e === "1" ?
|
|
849
|
+
return e === "1" ? Le.GRANTED : e === "0" ? Le.DENIED : Le.PENDING;
|
|
846
850
|
}
|
|
847
851
|
get _storage() {
|
|
848
852
|
if (!this._persistentStore) {
|
|
849
853
|
var e = this._config.opt_out_capturing_persistence_type;
|
|
850
|
-
this._persistentStore = e === "localStorage" ?
|
|
851
|
-
var t = e === "localStorage" ? Pe :
|
|
854
|
+
this._persistentStore = e === "localStorage" ? j : Pe;
|
|
855
|
+
var t = e === "localStorage" ? Pe : j;
|
|
852
856
|
t.get(this._storageKey) && (this._persistentStore.get(this._storageKey) || this.optInOut(t.get(this._storageKey) === "1"), t.remove(this._storageKey, this._config.cross_subdomain_cookie));
|
|
853
857
|
}
|
|
854
858
|
return this._persistentStore;
|
|
855
859
|
}
|
|
856
860
|
_getDnt() {
|
|
857
|
-
return !!this._config.respect_dnt && !!
|
|
861
|
+
return !!this._config.respect_dnt && !!an([ne == null ? void 0 : ne.doNotTrack, ne == null ? void 0 : ne.msDoNotTrack, I.doNotTrack], (e) => F([!0, 1, "1", "yes"], e));
|
|
858
862
|
}
|
|
859
863
|
}
|
|
860
|
-
var qt = Q("[Dead Clicks]"),
|
|
861
|
-
var e, t = !((e = r.instance.persistence) === null || e === void 0 || !e.get_property(
|
|
864
|
+
var qt = Q("[Dead Clicks]"), ha = () => !0, pa = (r) => {
|
|
865
|
+
var e, t = !((e = r.instance.persistence) === null || e === void 0 || !e.get_property(un)), i = r.instance.config.capture_dead_clicks;
|
|
862
866
|
return Ie(i) ? i : t;
|
|
863
867
|
};
|
|
864
|
-
class
|
|
868
|
+
class kn {
|
|
865
869
|
get lazyLoadedDeadClicksAutocapture() {
|
|
866
870
|
return this._lazyLoadedDeadClicksAutocapture;
|
|
867
871
|
}
|
|
@@ -869,7 +873,7 @@ class Sn {
|
|
|
869
873
|
this.instance = e, this.isEnabled = t, this.onCapture = i, this.startIfEnabled();
|
|
870
874
|
}
|
|
871
875
|
onRemoteConfig(e) {
|
|
872
|
-
this.instance.persistence && this.instance.persistence.register({ [
|
|
876
|
+
this.instance.persistence && this.instance.persistence.register({ [un]: e == null ? void 0 : e.captureDeadClicks }), this.startIfEnabled();
|
|
873
877
|
}
|
|
874
878
|
startIfEnabled() {
|
|
875
879
|
this.isEnabled(this) && this._loadScript(() => {
|
|
@@ -896,7 +900,7 @@ class Sn {
|
|
|
896
900
|
}
|
|
897
901
|
}
|
|
898
902
|
var Ci = Q("[ExceptionAutocapture]");
|
|
899
|
-
class
|
|
903
|
+
class ga {
|
|
900
904
|
constructor(e) {
|
|
901
905
|
var t;
|
|
902
906
|
w(this, "_startCapturing", () => {
|
|
@@ -909,7 +913,7 @@ class pa {
|
|
|
909
913
|
Ci.error("failed to start", a), this._stopCapturing();
|
|
910
914
|
}
|
|
911
915
|
}
|
|
912
|
-
}), this.instance = e, this.remoteEnabled = !((t = this.instance.persistence) === null || t === void 0 || !t.props[
|
|
916
|
+
}), this.instance = e, this.remoteEnabled = !((t = this.instance.persistence) === null || t === void 0 || !t.props[Wr]), this.config = this._requiredConfig(), this.startIfEnabled();
|
|
913
917
|
}
|
|
914
918
|
_requiredConfig() {
|
|
915
919
|
var e = this.instance.config.capture_exceptions, t = { capture_unhandled_errors: !1, capture_unhandled_rejections: !1, capture_console_errors: !1 };
|
|
@@ -934,24 +938,24 @@ class pa {
|
|
|
934
938
|
}
|
|
935
939
|
onRemoteConfig(e) {
|
|
936
940
|
var t = e.autocaptureExceptions;
|
|
937
|
-
this.remoteEnabled = !!t || !1, this.config = this._requiredConfig(), this.instance.persistence && this.instance.persistence.register({ [
|
|
941
|
+
this.remoteEnabled = !!t || !1, this.config = this._requiredConfig(), this.instance.persistence && this.instance.persistence.register({ [Wr]: this.remoteEnabled }), this.startIfEnabled();
|
|
938
942
|
}
|
|
939
943
|
captureException(e) {
|
|
940
944
|
var t = this.instance.requestRouter.endpointFor("ui");
|
|
941
945
|
e.$exception_personURL = "".concat(t, "/project/").concat(this.instance.config.token, "/person/").concat(this.instance.get_distinct_id()), this.instance.exceptions.sendExceptionEvent(e);
|
|
942
946
|
}
|
|
943
947
|
}
|
|
944
|
-
function
|
|
945
|
-
return !S(Event) &&
|
|
948
|
+
function En(r) {
|
|
949
|
+
return !S(Event) && xn(r, Event);
|
|
946
950
|
}
|
|
947
|
-
function
|
|
951
|
+
function xn(r, e) {
|
|
948
952
|
try {
|
|
949
953
|
return r instanceof e;
|
|
950
954
|
} catch {
|
|
951
955
|
return !1;
|
|
952
956
|
}
|
|
953
957
|
}
|
|
954
|
-
function
|
|
958
|
+
function Cn(r) {
|
|
955
959
|
switch (Object.prototype.toString.call(r)) {
|
|
956
960
|
case "[object Error]":
|
|
957
961
|
case "[object Exception]":
|
|
@@ -959,7 +963,7 @@ function xn(r) {
|
|
|
959
963
|
case "[object DOMError]":
|
|
960
964
|
return !0;
|
|
961
965
|
default:
|
|
962
|
-
return
|
|
966
|
+
return xn(r, Error);
|
|
963
967
|
}
|
|
964
968
|
}
|
|
965
969
|
function Vt(r, e) {
|
|
@@ -968,12 +972,12 @@ function Vt(r, e) {
|
|
|
968
972
|
function Ii(r) {
|
|
969
973
|
return Vt(r, "DOMError");
|
|
970
974
|
}
|
|
971
|
-
var
|
|
975
|
+
var ls = /\(error: (.*)\)/, us = 50, at = "?";
|
|
972
976
|
function Pi(r, e, t, i) {
|
|
973
977
|
var s = { platform: "web:javascript", filename: r, function: e === "<anonymous>" ? at : e, in_app: !0 };
|
|
974
978
|
return S(t) || (s.lineno = t), S(i) || (s.colno = i), s;
|
|
975
979
|
}
|
|
976
|
-
var
|
|
980
|
+
var va = /^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i, fa = /^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i, ma = /\((\S*)(?::(\d+))(?::(\d+))\)/, ya = /^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i, ba = /(\S+) line (\d+)(?: > eval line \d+)* > eval/i, wa = function() {
|
|
977
981
|
for (var r = arguments.length, e = new Array(r), t = 0; t < r; t++) e[t] = arguments[t];
|
|
978
982
|
var i = e.sort((s, n) => s[0] - n[0]).map((s) => s[1]);
|
|
979
983
|
return function(s) {
|
|
@@ -981,7 +985,7 @@ var ga = /^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i, va = /^\s*at (?:(.+?\)(?: \[.
|
|
|
981
985
|
`), l = n; l < a.length; l++) {
|
|
982
986
|
var c = a[l];
|
|
983
987
|
if (!(c.length > 1024)) {
|
|
984
|
-
var d =
|
|
988
|
+
var d = ls.test(c) ? c.replace(ls, "$1") : c;
|
|
985
989
|
if (!d.match(/\S*Error: /)) {
|
|
986
990
|
for (var u of i) {
|
|
987
991
|
var h = u(d);
|
|
@@ -990,60 +994,60 @@ var ga = /^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i, va = /^\s*at (?:(.+?\)(?: \[.
|
|
|
990
994
|
break;
|
|
991
995
|
}
|
|
992
996
|
}
|
|
993
|
-
if (o.length >=
|
|
997
|
+
if (o.length >= us) break;
|
|
994
998
|
}
|
|
995
999
|
}
|
|
996
1000
|
}
|
|
997
1001
|
return function(_) {
|
|
998
1002
|
if (!_.length) return [];
|
|
999
1003
|
var p = Array.from(_);
|
|
1000
|
-
return p.reverse(), p.slice(0,
|
|
1004
|
+
return p.reverse(), p.slice(0, us).map((v) => f(f({}, v), {}, { filename: v.filename || Sa(p).filename, function: v.function || at }));
|
|
1001
1005
|
}(o);
|
|
1002
1006
|
};
|
|
1003
1007
|
}([30, (r) => {
|
|
1004
|
-
var e =
|
|
1008
|
+
var e = va.exec(r);
|
|
1005
1009
|
if (e) {
|
|
1006
1010
|
var [, t, i, s] = e;
|
|
1007
1011
|
return Pi(t, at, +i, +s);
|
|
1008
1012
|
}
|
|
1009
|
-
var n =
|
|
1013
|
+
var n = fa.exec(r);
|
|
1010
1014
|
if (n) {
|
|
1011
1015
|
if (n[2] && n[2].indexOf("eval") === 0) {
|
|
1012
|
-
var o =
|
|
1016
|
+
var o = ma.exec(n[2]);
|
|
1013
1017
|
o && (n[2] = o[1], n[3] = o[2], n[4] = o[3]);
|
|
1014
1018
|
}
|
|
1015
|
-
var [a, l] =
|
|
1019
|
+
var [a, l] = ds(n[1] || at, n[2]);
|
|
1016
1020
|
return Pi(l, a, n[3] ? +n[3] : void 0, n[4] ? +n[4] : void 0);
|
|
1017
1021
|
}
|
|
1018
1022
|
}], [50, (r) => {
|
|
1019
|
-
var e =
|
|
1023
|
+
var e = ya.exec(r);
|
|
1020
1024
|
if (e) {
|
|
1021
1025
|
if (e[3] && e[3].indexOf(" > eval") > -1) {
|
|
1022
|
-
var t =
|
|
1026
|
+
var t = ba.exec(e[3]);
|
|
1023
1027
|
t && (e[1] = e[1] || "eval", e[3] = t[1], e[4] = t[2], e[5] = "");
|
|
1024
1028
|
}
|
|
1025
1029
|
var i = e[3], s = e[1] || at;
|
|
1026
|
-
return [s, i] =
|
|
1030
|
+
return [s, i] = ds(s, i), Pi(i, s, e[4] ? +e[4] : void 0, e[5] ? +e[5] : void 0);
|
|
1027
1031
|
}
|
|
1028
1032
|
}]);
|
|
1029
|
-
function
|
|
1033
|
+
function Sa(r) {
|
|
1030
1034
|
return r[r.length - 1] || {};
|
|
1031
1035
|
}
|
|
1032
|
-
var Nt,
|
|
1036
|
+
var Nt, cs, Ti, ds = (r, e) => {
|
|
1033
1037
|
var t = r.indexOf("safari-extension") !== -1, i = r.indexOf("safari-web-extension") !== -1;
|
|
1034
1038
|
return t || i ? [r.indexOf("@") !== -1 ? r.split("@")[0] : at, t ? "safari-extension:".concat(e) : "safari-web-extension:".concat(e)] : [r, e];
|
|
1035
|
-
},
|
|
1039
|
+
}, ka = /^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;
|
|
1036
1040
|
function wr(r) {
|
|
1037
1041
|
var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, t = r.stacktrace || r.stack || "", i = function(o) {
|
|
1038
|
-
return o &&
|
|
1042
|
+
return o && Ea.test(o.message) ? 1 : 0;
|
|
1039
1043
|
}(r);
|
|
1040
1044
|
try {
|
|
1041
|
-
var s =
|
|
1045
|
+
var s = wa, n = function(o, a) {
|
|
1042
1046
|
var l = function(c) {
|
|
1043
1047
|
var d = globalThis._posthogChunkIds;
|
|
1044
1048
|
if (!d) return {};
|
|
1045
1049
|
var u = Object.keys(d);
|
|
1046
|
-
return Ti && u.length ===
|
|
1050
|
+
return Ti && u.length === cs || (cs = u.length, Ti = u.reduce((h, _) => {
|
|
1047
1051
|
Nt || (Nt = {});
|
|
1048
1052
|
var p = Nt[_];
|
|
1049
1053
|
if (p) h[p[0]] = p[1];
|
|
@@ -1066,20 +1070,20 @@ function wr(r) {
|
|
|
1066
1070
|
}
|
|
1067
1071
|
return [];
|
|
1068
1072
|
}
|
|
1069
|
-
var
|
|
1070
|
-
function
|
|
1073
|
+
var Ea = /Minified React error #\d+;/i;
|
|
1074
|
+
function xa(r, e) {
|
|
1071
1075
|
var t, i, s = wr(r), n = (t = e == null ? void 0 : e.handled) === null || t === void 0 || t, o = (i = e == null ? void 0 : e.synthetic) !== null && i !== void 0 && i;
|
|
1072
1076
|
return { type: e != null && e.overrideExceptionType ? e.overrideExceptionType : r.name, value: function(a) {
|
|
1073
1077
|
var l = a.message;
|
|
1074
1078
|
return l.error && typeof l.error.message == "string" ? String(l.error.message) : String(l);
|
|
1075
1079
|
}(r), stacktrace: { frames: s, type: "raw" }, mechanism: { handled: n, synthetic: o } };
|
|
1076
1080
|
}
|
|
1077
|
-
function
|
|
1078
|
-
var t =
|
|
1079
|
-
return r.cause &&
|
|
1081
|
+
function In(r, e) {
|
|
1082
|
+
var t = xa(r, e);
|
|
1083
|
+
return r.cause && Cn(r.cause) && r.cause !== r ? [t, ...In(r.cause, { handled: e == null ? void 0 : e.handled, synthetic: e == null ? void 0 : e.synthetic })] : [t];
|
|
1080
1084
|
}
|
|
1081
1085
|
function Fi(r, e) {
|
|
1082
|
-
return { $exception_list:
|
|
1086
|
+
return { $exception_list: In(r, e), $exception_level: "error" };
|
|
1083
1087
|
}
|
|
1084
1088
|
function Ri(r, e) {
|
|
1085
1089
|
var t, i, s, n = (t = e == null ? void 0 : e.handled) === null || t === void 0 || t, o = (i = e == null ? void 0 : e.synthetic) === null || i === void 0 || i, a = { type: e != null && e.overrideExceptionType ? e.overrideExceptionType : (s = e == null ? void 0 : e.defaultExceptionType) !== null && s !== void 0 ? s : "Error", value: r || (e == null ? void 0 : e.defaultExceptionMessage), mechanism: { handled: n, synthetic: o } };
|
|
@@ -1089,11 +1093,11 @@ function Ri(r, e) {
|
|
|
1089
1093
|
}
|
|
1090
1094
|
return { $exception_list: [a], $exception_level: "error" };
|
|
1091
1095
|
}
|
|
1092
|
-
function
|
|
1093
|
-
return
|
|
1096
|
+
function Ca(r) {
|
|
1097
|
+
return H(r) && !ji(r) && Lo.indexOf(r) >= 0;
|
|
1094
1098
|
}
|
|
1095
|
-
function
|
|
1096
|
-
var t, i, s = (t = e == null ? void 0 : e.handled) === null || t === void 0 || t, n = (i = e == null ? void 0 : e.synthetic) === null || i === void 0 || i, o = e != null && e.overrideExceptionType ? e.overrideExceptionType :
|
|
1099
|
+
function Ia(r, e) {
|
|
1100
|
+
var t, i, s = (t = e == null ? void 0 : e.handled) === null || t === void 0 || t, n = (i = e == null ? void 0 : e.synthetic) === null || i === void 0 || i, o = e != null && e.overrideExceptionType ? e.overrideExceptionType : En(r) ? r.constructor.name : "Error", a = "Non-Error 'exception' captured with keys: ".concat(function(d) {
|
|
1097
1101
|
var u = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 40, h = Object.keys(d);
|
|
1098
1102
|
if (h.sort(), !h.length) return "[object has no keys]";
|
|
1099
1103
|
for (var _ = h.length; _ > 0; _--) {
|
|
@@ -1106,9 +1110,9 @@ function Ca(r, e) {
|
|
|
1106
1110
|
var c = wr(e == null ? void 0 : e.syntheticException, 1);
|
|
1107
1111
|
c.length && (l.stacktrace = { frames: c, type: "raw" });
|
|
1108
1112
|
}
|
|
1109
|
-
return { $exception_list: [l], $exception_level:
|
|
1113
|
+
return { $exception_list: [l], $exception_level: Ca(r.level) ? r.level : "error" };
|
|
1110
1114
|
}
|
|
1111
|
-
function
|
|
1115
|
+
function Pa(r, e) {
|
|
1112
1116
|
var { error: t, event: i } = r, s = { $exception_list: [] }, n = t || i;
|
|
1113
1117
|
if (Ii(n) || function(_) {
|
|
1114
1118
|
return Vt(_, "DOMException");
|
|
@@ -1126,12 +1130,12 @@ function Ia(r, e) {
|
|
|
1126
1130
|
if (function(_) {
|
|
1127
1131
|
return Vt(_, "ErrorEvent");
|
|
1128
1132
|
}(n) && n.error) return Fi(n.error, e);
|
|
1129
|
-
if (
|
|
1133
|
+
if (Cn(n)) return Fi(n, e);
|
|
1130
1134
|
if (function(_) {
|
|
1131
1135
|
return Vt(_, "Object");
|
|
1132
|
-
}(n) ||
|
|
1133
|
-
if (S(t) &&
|
|
1134
|
-
var d = "Error", u = i, h = i.match(
|
|
1136
|
+
}(n) || En(n)) return Ia(n, e);
|
|
1137
|
+
if (S(t) && H(i)) {
|
|
1138
|
+
var d = "Error", u = i, h = i.match(ka);
|
|
1135
1139
|
return h && (d = h[1], u = h[2]), Ri(u, f(f({}, e), {}, { overrideExceptionType: d, defaultExceptionMessage: u }));
|
|
1136
1140
|
}
|
|
1137
1141
|
return Ri(n, e);
|
|
@@ -1154,31 +1158,31 @@ function tr(r) {
|
|
|
1154
1158
|
}
|
|
1155
1159
|
return [r];
|
|
1156
1160
|
}
|
|
1157
|
-
var Ee = ((r) => (r[r.DomContentLoaded = 0] = "DomContentLoaded", r[r.Load = 1] = "Load", r[r.FullSnapshot = 2] = "FullSnapshot", r[r.IncrementalSnapshot = 3] = "IncrementalSnapshot", r[r.Meta = 4] = "Meta", r[r.Custom = 5] = "Custom", r[r.Plugin = 6] = "Plugin", r))(Ee || {}), pe = ((r) => (r[r.Mutation = 0] = "Mutation", r[r.MouseMove = 1] = "MouseMove", r[r.MouseInteraction = 2] = "MouseInteraction", r[r.Scroll = 3] = "Scroll", r[r.ViewportResize = 4] = "ViewportResize", r[r.Input = 5] = "Input", r[r.TouchMove = 6] = "TouchMove", r[r.MediaInteraction = 7] = "MediaInteraction", r[r.StyleSheetRule = 8] = "StyleSheetRule", r[r.CanvasMutation = 9] = "CanvasMutation", r[r.Font = 10] = "Font", r[r.Log = 11] = "Log", r[r.Drag = 12] = "Drag", r[r.StyleDeclaration = 13] = "StyleDeclaration", r[r.Selection = 14] = "Selection", r[r.AdoptedStyleSheet = 15] = "AdoptedStyleSheet", r[r.CustomElement = 16] = "CustomElement", r))(pe || {}), ir = "[SessionRecording]", rr = "redacted", Bt = { initiatorTypes: ["audio", "beacon", "body", "css", "early-hint", "embed", "fetch", "frame", "iframe", "icon", "image", "img", "input", "link", "navigation", "object", "ping", "script", "track", "video", "xmlhttprequest"], maskRequestFn: (r) => r, recordHeaders: !1, recordBody: !1, recordInitialRequests: !1, recordPerformance: !1, performanceEntryTypeToObserve: ["first-input", "navigation", "paint", "resource"], payloadSizeLimitBytes: 1e6, payloadHostDenyList: [".lr-ingest.io", ".ingest.sentry.io", ".clarity.ms", "analytics.google.com"] },
|
|
1158
|
-
function
|
|
1161
|
+
var Ee = ((r) => (r[r.DomContentLoaded = 0] = "DomContentLoaded", r[r.Load = 1] = "Load", r[r.FullSnapshot = 2] = "FullSnapshot", r[r.IncrementalSnapshot = 3] = "IncrementalSnapshot", r[r.Meta = 4] = "Meta", r[r.Custom = 5] = "Custom", r[r.Plugin = 6] = "Plugin", r))(Ee || {}), pe = ((r) => (r[r.Mutation = 0] = "Mutation", r[r.MouseMove = 1] = "MouseMove", r[r.MouseInteraction = 2] = "MouseInteraction", r[r.Scroll = 3] = "Scroll", r[r.ViewportResize = 4] = "ViewportResize", r[r.Input = 5] = "Input", r[r.TouchMove = 6] = "TouchMove", r[r.MediaInteraction = 7] = "MediaInteraction", r[r.StyleSheetRule = 8] = "StyleSheetRule", r[r.CanvasMutation = 9] = "CanvasMutation", r[r.Font = 10] = "Font", r[r.Log = 11] = "Log", r[r.Drag = 12] = "Drag", r[r.StyleDeclaration = 13] = "StyleDeclaration", r[r.Selection = 14] = "Selection", r[r.AdoptedStyleSheet = 15] = "AdoptedStyleSheet", r[r.CustomElement = 16] = "CustomElement", r))(pe || {}), ir = "[SessionRecording]", rr = "redacted", Bt = { initiatorTypes: ["audio", "beacon", "body", "css", "early-hint", "embed", "fetch", "frame", "iframe", "icon", "image", "img", "input", "link", "navigation", "object", "ping", "script", "track", "video", "xmlhttprequest"], maskRequestFn: (r) => r, recordHeaders: !1, recordBody: !1, recordInitialRequests: !1, recordPerformance: !1, performanceEntryTypeToObserve: ["first-input", "navigation", "paint", "resource"], payloadSizeLimitBytes: 1e6, payloadHostDenyList: [".lr-ingest.io", ".ingest.sentry.io", ".clarity.ms", "analytics.google.com"] }, Ta = ["authorization", "x-forwarded-for", "authorization", "cookie", "set-cookie", "x-api-key", "x-real-ip", "remote-addr", "forwarded", "proxy-authorization", "x-csrf-token", "x-csrftoken", "x-xsrf-token"], Fa = ["password", "secret", "passwd", "api_key", "apikey", "auth", "credentials", "mysql_pwd", "privatekey", "private_key", "token"], Ra = ["/s/", "/e/", "/i/"];
|
|
1162
|
+
function _s(r, e, t, i) {
|
|
1159
1163
|
if (R(r)) return r;
|
|
1160
1164
|
var s = (e == null ? void 0 : e["content-length"]) || function(n) {
|
|
1161
1165
|
return new Blob([n]).size;
|
|
1162
1166
|
}(r);
|
|
1163
|
-
return
|
|
1167
|
+
return H(s) && (s = parseInt(s)), s > t ? ir + " ".concat(i, " body too large to record (").concat(s, " bytes)") : r;
|
|
1164
1168
|
}
|
|
1165
|
-
function
|
|
1169
|
+
function hs(r, e) {
|
|
1166
1170
|
if (R(r)) return r;
|
|
1167
1171
|
var t = r;
|
|
1168
|
-
return ct(t, !1) || (t = ir + " " + e + " body " + rr), $(
|
|
1172
|
+
return ct(t, !1) || (t = ir + " " + e + " body " + rr), $(Fa, (i) => {
|
|
1169
1173
|
var s, n;
|
|
1170
1174
|
(s = t) !== null && s !== void 0 && s.length && ((n = t) === null || n === void 0 ? void 0 : n.indexOf(i)) !== -1 && (t = ir + " " + e + " body " + rr + " as might contain: " + i);
|
|
1171
1175
|
}), t;
|
|
1172
1176
|
}
|
|
1173
|
-
var
|
|
1174
|
-
var t, i, s, n = { payloadSizeLimitBytes: Bt.payloadSizeLimitBytes, performanceEntryTypeToObserve: [...Bt.performanceEntryTypeToObserve], payloadHostDenyList: [...e.payloadHostDenyList || [], ...Bt.payloadHostDenyList] }, o = r.session_recording.recordHeaders !== !1 && e.recordHeaders, a = r.session_recording.recordBody !== !1 && e.recordBody, l = r.capture_performance !== !1 && e.recordPerformance, c = (t = n, s = Math.min(1e6, (i = t.payloadSizeLimitBytes) !== null && i !== void 0 ? i : 1e6), (h) => (h != null && h.requestBody && (h.requestBody =
|
|
1177
|
+
var $a = (r, e) => {
|
|
1178
|
+
var t, i, s, n = { payloadSizeLimitBytes: Bt.payloadSizeLimitBytes, performanceEntryTypeToObserve: [...Bt.performanceEntryTypeToObserve], payloadHostDenyList: [...e.payloadHostDenyList || [], ...Bt.payloadHostDenyList] }, o = r.session_recording.recordHeaders !== !1 && e.recordHeaders, a = r.session_recording.recordBody !== !1 && e.recordBody, l = r.capture_performance !== !1 && e.recordPerformance, c = (t = n, s = Math.min(1e6, (i = t.payloadSizeLimitBytes) !== null && i !== void 0 ? i : 1e6), (h) => (h != null && h.requestBody && (h.requestBody = _s(h.requestBody, h.requestHeaders, s, "Request")), h != null && h.responseBody && (h.responseBody = _s(h.responseBody, h.responseHeaders, s, "Response")), h)), d = (h) => {
|
|
1175
1179
|
return c(((v, b) => {
|
|
1176
1180
|
var y, m = dt(v.name), E = b.indexOf("http") === 0 ? (y = dt(b)) === null || y === void 0 ? void 0 : y.pathname : b;
|
|
1177
1181
|
E === "/" && (E = "");
|
|
1178
1182
|
var C = m == null ? void 0 : m.pathname.replace(E || "", "");
|
|
1179
|
-
if (!(m && C &&
|
|
1183
|
+
if (!(m && C && Ra.some((T) => C.indexOf(T) === 0))) return v;
|
|
1180
1184
|
})((p = (_ = h).requestHeaders, R(p) || $(Object.keys(p ?? {}), (v) => {
|
|
1181
|
-
|
|
1185
|
+
Ta.includes(v.toLowerCase()) && (p[v] = rr);
|
|
1182
1186
|
}), _), r.api_host));
|
|
1183
1187
|
var _, p;
|
|
1184
1188
|
}, u = ce(r.session_recording.maskNetworkRequestFn);
|
|
@@ -1189,13 +1193,13 @@ var Ra = (r, e) => {
|
|
|
1189
1193
|
var _, p, v, b = d(h);
|
|
1190
1194
|
return b && (_ = (p = (v = r.session_recording).maskCapturedNetworkRequestFn) === null || p === void 0 ? void 0 : p.call(v, b)) !== null && _ !== void 0 ? _ : void 0;
|
|
1191
1195
|
} : (h) => function(_) {
|
|
1192
|
-
if (!S(_)) return _.requestBody =
|
|
1196
|
+
if (!S(_)) return _.requestBody = hs(_.requestBody, "Request"), _.responseBody = hs(_.responseBody, "Response"), _;
|
|
1193
1197
|
}(d(h)), f(f(f({}, Bt), n), {}, { recordHeaders: o, recordBody: a, recordPerformance: l, recordInitialRequests: l });
|
|
1194
1198
|
};
|
|
1195
1199
|
function le(r, e, t, i, s) {
|
|
1196
1200
|
return e > t && (x.warn("min cannot be greater than max."), e = t), Y(r) ? r > t ? (i && x.warn(i + " cannot be greater than max: " + t + ". Using max value instead."), t) : r < e ? (i && x.warn(i + " cannot be less than min: " + e + ". Using min value instead."), e) : r : (i && x.warn(i + " must be a number. using max or fallback. max: " + t + ", fallback: " + s), le(s || t, e, t, i));
|
|
1197
1201
|
}
|
|
1198
|
-
class
|
|
1202
|
+
class Oa {
|
|
1199
1203
|
constructor(e) {
|
|
1200
1204
|
var t, i, s = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
1201
1205
|
w(this, "_bucketSize", 100), w(this, "_refillRate", 10), w(this, "_mutationBuckets", {}), w(this, "_loggedTracker", {}), w(this, "_refillBuckets", () => {
|
|
@@ -1226,33 +1230,33 @@ class $a {
|
|
|
1226
1230
|
}, 1e3);
|
|
1227
1231
|
}
|
|
1228
1232
|
}
|
|
1229
|
-
var de = Uint8Array, re = Uint16Array, _t = Uint32Array, Sr = new de([0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 0, 0, 0]), kr = new de([0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 0, 0]),
|
|
1233
|
+
var de = Uint8Array, re = Uint16Array, _t = Uint32Array, Sr = new de([0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 0, 0, 0]), kr = new de([0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 0, 0]), ps = new de([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]), Pn = function(r, e) {
|
|
1230
1234
|
for (var t = new re(31), i = 0; i < 31; ++i) t[i] = e += 1 << r[i - 1];
|
|
1231
1235
|
var s = new _t(t[30]);
|
|
1232
1236
|
for (i = 1; i < 30; ++i) for (var n = t[i]; n < t[i + 1]; ++n) s[n] = n - t[i] << 5 | i;
|
|
1233
1237
|
return [t, s];
|
|
1234
|
-
},
|
|
1235
|
-
|
|
1236
|
-
for (var
|
|
1237
|
-
var We = (43690 &
|
|
1238
|
-
We = (61680 & (We = (52428 & We) >>> 2 | (13107 & We) << 2)) >>> 4 | (3855 & We) << 4,
|
|
1238
|
+
}, Tn = Pn(Sr, 2), Aa = Tn[0], sr = Tn[1];
|
|
1239
|
+
Aa[28] = 258, sr[258] = 28;
|
|
1240
|
+
for (var gs = Pn(kr, 0)[1], Fn = new re(32768), L = 0; L < 32768; ++L) {
|
|
1241
|
+
var We = (43690 & L) >>> 1 | (21845 & L) << 1;
|
|
1242
|
+
We = (61680 & (We = (52428 & We) >>> 2 | (13107 & We) << 2)) >>> 4 | (3855 & We) << 4, Fn[L] = ((65280 & We) >>> 8 | (255 & We) << 8) >>> 1;
|
|
1239
1243
|
}
|
|
1240
1244
|
var Pt = function(r, e, t) {
|
|
1241
1245
|
for (var i = r.length, s = 0, n = new re(e); s < i; ++s) ++n[r[s] - 1];
|
|
1242
1246
|
var o, a = new re(e);
|
|
1243
1247
|
for (s = 0; s < e; ++s) a[s] = a[s - 1] + n[s - 1] << 1;
|
|
1244
|
-
for (o = new re(i), s = 0; s < i; ++s) o[s] =
|
|
1248
|
+
for (o = new re(i), s = 0; s < i; ++s) o[s] = Fn[a[r[s] - 1]++] >>> 15 - r[s];
|
|
1245
1249
|
return o;
|
|
1246
1250
|
}, Xe = new de(288);
|
|
1247
|
-
for (
|
|
1248
|
-
for (
|
|
1249
|
-
for (
|
|
1250
|
-
for (
|
|
1251
|
+
for (L = 0; L < 144; ++L) Xe[L] = 8;
|
|
1252
|
+
for (L = 144; L < 256; ++L) Xe[L] = 9;
|
|
1253
|
+
for (L = 256; L < 280; ++L) Xe[L] = 7;
|
|
1254
|
+
for (L = 280; L < 288; ++L) Xe[L] = 8;
|
|
1251
1255
|
var ai = new de(32);
|
|
1252
|
-
for (
|
|
1253
|
-
var La = Pt(Xe, 9),
|
|
1256
|
+
for (L = 0; L < 32; ++L) ai[L] = 5;
|
|
1257
|
+
var La = Pt(Xe, 9), Ma = Pt(ai, 5), Rn = function(r) {
|
|
1254
1258
|
return (r / 8 >> 0) + (7 & r && 1);
|
|
1255
|
-
},
|
|
1259
|
+
}, $n = function(r, e, t) {
|
|
1256
1260
|
(t == null || t > r.length) && (t = r.length);
|
|
1257
1261
|
var i = new (r instanceof re ? re : r instanceof _t ? _t : de)(t - e);
|
|
1258
1262
|
return i.set(r.subarray(e, t)), i;
|
|
@@ -1303,7 +1307,7 @@ var La = Pt(Xe, 9), Aa = Pt(ai, 5), Fn = function(r) {
|
|
|
1303
1307
|
return [new de(_), p];
|
|
1304
1308
|
}, nr = function(r, e, t) {
|
|
1305
1309
|
return r.s == -1 ? Math.max(nr(r.l, e, t + 1), nr(r.r, e, t + 1)) : e[r.s] = t;
|
|
1306
|
-
},
|
|
1310
|
+
}, vs = function(r) {
|
|
1307
1311
|
for (var e = r.length; e && !r[--e]; ) ;
|
|
1308
1312
|
for (var t = new re(++e), i = 0, s = r[0], n = 1, o = function(l) {
|
|
1309
1313
|
t[i++] = l;
|
|
@@ -1324,21 +1328,21 @@ var La = Pt(Xe, 9), Aa = Pt(ai, 5), Fn = function(r) {
|
|
|
1324
1328
|
for (var t = 0, i = 0; i < e.length; ++i) t += r[i] * e[i];
|
|
1325
1329
|
return t;
|
|
1326
1330
|
}, or = function(r, e, t) {
|
|
1327
|
-
var i = t.length, s =
|
|
1331
|
+
var i = t.length, s = Rn(e + 2);
|
|
1328
1332
|
r[s] = 255 & i, r[s + 1] = i >>> 8, r[s + 2] = 255 ^ r[s], r[s + 3] = 255 ^ r[s + 1];
|
|
1329
1333
|
for (var n = 0; n < i; ++n) r[s + n + 4] = t[n];
|
|
1330
1334
|
return 8 * (s + 4 + i);
|
|
1331
|
-
},
|
|
1335
|
+
}, fs = function(r, e, t, i, s, n, o, a, l, c, d) {
|
|
1332
1336
|
Se(e, d++, t), ++s[256];
|
|
1333
|
-
for (var u = $i(s, 15), h = u[0], _ = u[1], p = $i(n, 15), v = p[0], b = p[1], y =
|
|
1334
|
-
for (P = 0; P < T.length; ++P)
|
|
1335
|
-
for (var M = $i(
|
|
1336
|
-
var we, ve, fe, et, Te = c + 5 << 3,
|
|
1337
|
-
if (Te <=
|
|
1338
|
-
if (Se(e, d, 1 + (me <
|
|
1337
|
+
for (var u = $i(s, 15), h = u[0], _ = u[1], p = $i(n, 15), v = p[0], b = p[1], y = vs(h), m = y[0], E = y[1], C = vs(v), T = C[0], O = C[1], A = new re(19), P = 0; P < m.length; ++P) A[31 & m[P]]++;
|
|
1338
|
+
for (P = 0; P < T.length; ++P) A[31 & T[P]]++;
|
|
1339
|
+
for (var M = $i(A, 7), z = M[0], he = M[1], oe = 19; oe > 4 && !z[ps[oe - 1]]; --oe) ;
|
|
1340
|
+
var we, ve, fe, et, Te = c + 5 << 3, je = yt(s, Xe) + yt(n, ai) + o, me = yt(s, h) + yt(n, v) + o + 14 + 3 * oe + yt(A, z) + (2 * A[16] + 3 * A[17] + 7 * A[18]);
|
|
1341
|
+
if (Te <= je && Te <= me) return or(e, d, r.subarray(l, l + c));
|
|
1342
|
+
if (Se(e, d, 1 + (me < je)), d += 2, me < je) {
|
|
1339
1343
|
we = Pt(h, _), ve = h, fe = Pt(v, b), et = v;
|
|
1340
1344
|
var Fe = Pt(z, he);
|
|
1341
|
-
for (Se(e, d, E - 257), Se(e, d + 5, O - 1), Se(e, d + 10, oe - 4), d += 14, P = 0; P < oe; ++P) Se(e, d + 3 * P, z[
|
|
1345
|
+
for (Se(e, d, E - 257), Se(e, d + 5, O - 1), Se(e, d + 10, oe - 4), d += 14, P = 0; P < oe; ++P) Se(e, d + 3 * P, z[ps[P]]);
|
|
1342
1346
|
d += 3 * oe;
|
|
1343
1347
|
for (var tt = [m, T], X = 0; X < 2; ++X) {
|
|
1344
1348
|
var ae = tt[X];
|
|
@@ -1347,28 +1351,28 @@ var La = Pt(Xe, 9), Aa = Pt(ai, 5), Fn = function(r) {
|
|
|
1347
1351
|
Se(e, d, Fe[se]), d += z[se], se > 15 && (Se(e, d, ae[P] >>> 5 & 127), d += ae[P] >>> 12);
|
|
1348
1352
|
}
|
|
1349
1353
|
}
|
|
1350
|
-
} else we = La, ve = Xe, fe =
|
|
1354
|
+
} else we = La, ve = Xe, fe = Ma, et = ai;
|
|
1351
1355
|
for (P = 0; P < a; ++P) if (i[P] > 255) {
|
|
1352
1356
|
se = i[P] >>> 18 & 31, mt(e, d, we[se + 257]), d += ve[se + 257], se > 7 && (Se(e, d, i[P] >>> 23 & 31), d += Sr[se]);
|
|
1353
1357
|
var it = 31 & i[P];
|
|
1354
1358
|
mt(e, d, fe[it]), d += et[it], it > 3 && (mt(e, d, i[P] >>> 5 & 8191), d += kr[it]);
|
|
1355
1359
|
} else mt(e, d, we[i[P]]), d += ve[i[P]];
|
|
1356
1360
|
return mt(e, d, we[256]), d + ve[256];
|
|
1357
|
-
},
|
|
1361
|
+
}, Da = new _t([65540, 131080, 131088, 131104, 262176, 1048704, 1048832, 2114560, 2117632]), qa = function() {
|
|
1358
1362
|
for (var r = new _t(256), e = 0; e < 256; ++e) {
|
|
1359
1363
|
for (var t = e, i = 9; --i; ) t = (1 & t && 3988292384) ^ t >>> 1;
|
|
1360
1364
|
r[e] = t;
|
|
1361
1365
|
}
|
|
1362
1366
|
return r;
|
|
1363
|
-
}(),
|
|
1367
|
+
}(), Na = function() {
|
|
1364
1368
|
var r = 4294967295;
|
|
1365
1369
|
return { p: function(e) {
|
|
1366
|
-
for (var t = r, i = 0; i < e.length; ++i) t =
|
|
1370
|
+
for (var t = r, i = 0; i < e.length; ++i) t = qa[255 & t ^ e[i]] ^ t >>> 8;
|
|
1367
1371
|
r = t;
|
|
1368
1372
|
}, d: function() {
|
|
1369
1373
|
return 4294967295 ^ r;
|
|
1370
1374
|
} };
|
|
1371
|
-
},
|
|
1375
|
+
}, Ba = function(r, e, t, i, s) {
|
|
1372
1376
|
return function(n, o, a, l, c, d) {
|
|
1373
1377
|
var u = n.length, h = new de(l + u + 5 * (1 + Math.floor(u / 7e3)) + c), _ = h.subarray(l, h.length - c), p = 0;
|
|
1374
1378
|
if (!o || u < 8) for (var v = 0; v <= u; v += 65535) {
|
|
@@ -1376,25 +1380,25 @@ var La = Pt(Xe, 9), Aa = Pt(ai, 5), Fn = function(r) {
|
|
|
1376
1380
|
b < u ? p = or(_, p, n.subarray(v, b)) : (_[v] = d, p = or(_, p, n.subarray(v, u)));
|
|
1377
1381
|
}
|
|
1378
1382
|
else {
|
|
1379
|
-
for (var y =
|
|
1380
|
-
return (n[yi] ^ n[yi + 1] <<
|
|
1383
|
+
for (var y = Da[o - 1], m = y >>> 13, E = 8191 & y, C = (1 << a) - 1, T = new re(32768), O = new re(C + 1), A = Math.ceil(a / 3), P = 2 * A, M = function(yi) {
|
|
1384
|
+
return (n[yi] ^ n[yi + 1] << A ^ n[yi + 2] << P) & C;
|
|
1381
1385
|
}, z = new _t(25e3), he = new re(288), oe = new re(32), we = 0, ve = 0, fe = (v = 0, 0), et = 0, Te = 0; v < u; ++v) {
|
|
1382
|
-
var
|
|
1383
|
-
if (T[me] = Fe, O[
|
|
1386
|
+
var je = M(v), me = 32767 & v, Fe = O[je];
|
|
1387
|
+
if (T[me] = Fe, O[je] = me, et <= v) {
|
|
1384
1388
|
var tt = u - v;
|
|
1385
1389
|
if ((we > 7e3 || fe > 24576) && tt > 423) {
|
|
1386
|
-
p =
|
|
1390
|
+
p = fs(n, _, 0, z, he, oe, ve, fe, Te, v - Te, p), fe = we = ve = 0, Te = v;
|
|
1387
1391
|
for (var X = 0; X < 286; ++X) he[X] = 0;
|
|
1388
1392
|
for (X = 0; X < 30; ++X) oe[X] = 0;
|
|
1389
1393
|
}
|
|
1390
1394
|
var ae = 2, se = 0, it = E, Re = me - Fe & 32767;
|
|
1391
|
-
if (tt > 2 &&
|
|
1395
|
+
if (tt > 2 && je == M(v - Re)) for (var So = Math.min(m, tt) - 1, ko = Math.min(32767, v), Eo = Math.min(258, tt); Re <= ko && --it && me != Fe; ) {
|
|
1392
1396
|
if (n[v + ae] == n[v + ae - Re]) {
|
|
1393
|
-
for (var $e = 0; $e <
|
|
1397
|
+
for (var $e = 0; $e < Eo && n[v + $e] == n[v + $e - Re]; ++$e) ;
|
|
1394
1398
|
if ($e > ae) {
|
|
1395
|
-
if (ae = $e, se = Re, $e >
|
|
1396
|
-
var
|
|
1397
|
-
for (X = 0; X <
|
|
1399
|
+
if (ae = $e, se = Re, $e > So) break;
|
|
1400
|
+
var xo = Math.min(Re, $e - 2), $r = 0;
|
|
1401
|
+
for (X = 0; X < xo; ++X) {
|
|
1398
1402
|
var mi = v - Re + X + 32768 & 32767, Or = mi - T[mi] + 32768 & 32767;
|
|
1399
1403
|
Or > $r && ($r = Or, Fe = mi);
|
|
1400
1404
|
}
|
|
@@ -1403,19 +1407,19 @@ var La = Pt(Xe, 9), Aa = Pt(ai, 5), Fn = function(r) {
|
|
|
1403
1407
|
Re += (me = Fe) - (Fe = T[me]) + 32768 & 32767;
|
|
1404
1408
|
}
|
|
1405
1409
|
if (se) {
|
|
1406
|
-
z[fe++] = 268435456 | sr[ae] << 18 |
|
|
1407
|
-
var
|
|
1408
|
-
ve += Sr[
|
|
1410
|
+
z[fe++] = 268435456 | sr[ae] << 18 | gs[se];
|
|
1411
|
+
var Ar = 31 & sr[ae], Lr = 31 & gs[se];
|
|
1412
|
+
ve += Sr[Ar] + kr[Lr], ++he[257 + Ar], ++oe[Lr], et = v + ae, ++we;
|
|
1409
1413
|
} else z[fe++] = n[v], ++he[n[v]];
|
|
1410
1414
|
}
|
|
1411
1415
|
}
|
|
1412
|
-
p =
|
|
1416
|
+
p = fs(n, _, d, z, he, oe, ve, fe, Te, v - Te, p);
|
|
1413
1417
|
}
|
|
1414
|
-
return
|
|
1418
|
+
return $n(h, 0, l + Rn(p) + c);
|
|
1415
1419
|
}(r, e.level == null ? 6 : e.level, e.mem == null ? Math.ceil(1.5 * Math.max(8, Math.min(13, Math.log(r.length)))) : 12 + e.mem, t, i, !0);
|
|
1416
1420
|
}, ar = function(r, e, t) {
|
|
1417
1421
|
for (; t; ++e) r[e] = t, t >>>= 8;
|
|
1418
|
-
},
|
|
1422
|
+
}, Ua = function(r, e) {
|
|
1419
1423
|
var t = e.filename;
|
|
1420
1424
|
if (r[0] = 31, r[1] = 139, r[2] = 8, r[8] = e.level < 2 ? 4 : e.level == 9 ? 2 : 0, r[9] = 3, e.mtime != 0 && ar(r, 4, Math.floor(new Date(e.mtime || Date.now()) / 1e3)), t) {
|
|
1421
1425
|
r[3] = 8;
|
|
@@ -1424,14 +1428,14 @@ var La = Pt(Xe, 9), Aa = Pt(ai, 5), Fn = function(r) {
|
|
|
1424
1428
|
}, Ha = function(r) {
|
|
1425
1429
|
return 10 + (r.filename && r.filename.length + 1 || 0);
|
|
1426
1430
|
};
|
|
1427
|
-
function
|
|
1431
|
+
function On(r, e) {
|
|
1428
1432
|
e === void 0 && (e = {});
|
|
1429
|
-
var t =
|
|
1433
|
+
var t = Na(), i = r.length;
|
|
1430
1434
|
t.p(r);
|
|
1431
|
-
var s =
|
|
1432
|
-
return
|
|
1435
|
+
var s = Ba(r, e, Ha(e), 8), n = s.length;
|
|
1436
|
+
return Ua(s, e), ar(s, n - 8, t.d()), ar(s, n - 4, i), s;
|
|
1433
1437
|
}
|
|
1434
|
-
function
|
|
1438
|
+
function An(r, e) {
|
|
1435
1439
|
var t = r.length;
|
|
1436
1440
|
if (typeof TextEncoder < "u") return new TextEncoder().encode(r);
|
|
1437
1441
|
for (var i = new de(r.length + (r.length >>> 1)), s = 0, n = function(c) {
|
|
@@ -1444,7 +1448,7 @@ function On(r, e) {
|
|
|
1444
1448
|
var l = r.charCodeAt(o);
|
|
1445
1449
|
l < 128 || e ? n(l) : l < 2048 ? (n(192 | l >>> 6), n(128 | 63 & l)) : l > 55295 && l < 57344 ? (n(240 | (l = 65536 + (1047552 & l) | 1023 & r.charCodeAt(++o)) >>> 18), n(128 | l >>> 12 & 63), n(128 | l >>> 6 & 63), n(128 | 63 & l)) : (n(224 | l >>> 12), n(128 | l >>> 6 & 63), n(128 | 63 & l));
|
|
1446
1450
|
}
|
|
1447
|
-
return
|
|
1451
|
+
return $n(i, 0, s);
|
|
1448
1452
|
}
|
|
1449
1453
|
function ja(r, e) {
|
|
1450
1454
|
return function(t) {
|
|
@@ -1453,11 +1457,11 @@ function ja(r, e) {
|
|
|
1453
1457
|
}(r) % 100 < le(100 * e, 0, 100);
|
|
1454
1458
|
}
|
|
1455
1459
|
var xt = "[SessionRecording]", V = Q(xt);
|
|
1456
|
-
function
|
|
1460
|
+
function Ut() {
|
|
1457
1461
|
var r, e;
|
|
1458
1462
|
return I == null || (r = I.__PosthogExtensions__) === null || r === void 0 || (e = r.rrweb) === null || e === void 0 ? void 0 : e.record;
|
|
1459
1463
|
}
|
|
1460
|
-
var
|
|
1464
|
+
var za = 3e5, Wa = [pe.MouseMove, pe.MouseInteraction, pe.Scroll, pe.ViewportResize, pe.Input, pe.TouchMove, pe.MediaInteraction, pe.Drag], ms = (r) => ({ rrwebMethod: r, enqueuedAt: Date.now(), attempt: 1 });
|
|
1461
1465
|
function Ve(r) {
|
|
1462
1466
|
return function(e, t) {
|
|
1463
1467
|
for (var i = "", s = 0; s < e.length; ) {
|
|
@@ -1465,15 +1469,15 @@ function Ve(r) {
|
|
|
1465
1469
|
i += String.fromCharCode(n);
|
|
1466
1470
|
}
|
|
1467
1471
|
return i;
|
|
1468
|
-
}(
|
|
1472
|
+
}(On(An(JSON.stringify(r))));
|
|
1469
1473
|
}
|
|
1470
|
-
function
|
|
1474
|
+
function ys(r) {
|
|
1471
1475
|
return r.type === Ee.Custom && r.data.tag === "sessionIdle";
|
|
1472
1476
|
}
|
|
1473
|
-
function
|
|
1477
|
+
function bs(r, e) {
|
|
1474
1478
|
return e.some((t) => t.matching === "regex" && new RegExp(t.url).test(r));
|
|
1475
1479
|
}
|
|
1476
|
-
class
|
|
1480
|
+
class Va {
|
|
1477
1481
|
get _sessionIdleThresholdMilliseconds() {
|
|
1478
1482
|
return this._instance.config.session_recording.session_idle_threshold_ms || 3e5;
|
|
1479
1483
|
}
|
|
@@ -1486,7 +1490,7 @@ class Wa {
|
|
|
1486
1490
|
}
|
|
1487
1491
|
get _fullSnapshotIntervalMillis() {
|
|
1488
1492
|
var e, t;
|
|
1489
|
-
return this._triggerStatus === "trigger_pending" ? 6e4 : (e = (t = this._instance.config.session_recording) === null || t === void 0 ? void 0 : t.full_snapshot_interval_millis) !== null && e !== void 0 ? e :
|
|
1493
|
+
return this._triggerStatus === "trigger_pending" ? 6e4 : (e = (t = this._instance.config.session_recording) === null || t === void 0 ? void 0 : t.full_snapshot_interval_millis) !== null && e !== void 0 ? e : za;
|
|
1490
1494
|
}
|
|
1491
1495
|
get _isSampled() {
|
|
1492
1496
|
var e = this._instance.get_property(kt);
|
|
@@ -1501,11 +1505,11 @@ class Wa {
|
|
|
1501
1505
|
return g && e && t;
|
|
1502
1506
|
}
|
|
1503
1507
|
get _isConsoleLogCaptureEnabled() {
|
|
1504
|
-
var e = !!this._instance.get_property(
|
|
1508
|
+
var e = !!this._instance.get_property(Kr), t = this._instance.config.enable_recording_console_log;
|
|
1505
1509
|
return t ?? e;
|
|
1506
1510
|
}
|
|
1507
1511
|
get _canvasRecording() {
|
|
1508
|
-
var e, t, i, s, n, o, a = this._instance.config.session_recording.captureCanvas, l = this._instance.get_property(
|
|
1512
|
+
var e, t, i, s, n, o, a = this._instance.config.session_recording.captureCanvas, l = this._instance.get_property(Qr), c = (e = (t = a == null ? void 0 : a.recordCanvas) !== null && t !== void 0 ? t : l == null ? void 0 : l.enabled) !== null && e !== void 0 && e, d = (i = (s = a == null ? void 0 : a.canvasFps) !== null && s !== void 0 ? s : l == null ? void 0 : l.fps) !== null && i !== void 0 ? i : 4, u = (n = (o = a == null ? void 0 : a.canvasQuality) !== null && o !== void 0 ? o : l == null ? void 0 : l.quality) !== null && n !== void 0 ? n : 0.4;
|
|
1509
1513
|
if (typeof u == "string") {
|
|
1510
1514
|
var h = parseFloat(u);
|
|
1511
1515
|
u = isNaN(h) ? 0.4 : h;
|
|
@@ -1517,15 +1521,15 @@ class Wa {
|
|
|
1517
1521
|
return n || o || l ? { recordHeaders: n, recordBody: o, recordPerformance: l } : void 0;
|
|
1518
1522
|
}
|
|
1519
1523
|
get _masking() {
|
|
1520
|
-
var e, t, i, s, n, o, a = this._instance.get_property(
|
|
1524
|
+
var e, t, i, s, n, o, a = this._instance.get_property(Yr), l = { maskAllInputs: (e = this._instance.config.session_recording) === null || e === void 0 ? void 0 : e.maskAllInputs, maskTextSelector: (t = this._instance.config.session_recording) === null || t === void 0 ? void 0 : t.maskTextSelector, blockSelector: (i = this._instance.config.session_recording) === null || i === void 0 ? void 0 : i.blockSelector }, c = (s = l == null ? void 0 : l.maskAllInputs) !== null && s !== void 0 ? s : a == null ? void 0 : a.maskAllInputs, d = (n = l == null ? void 0 : l.maskTextSelector) !== null && n !== void 0 ? n : a == null ? void 0 : a.maskTextSelector, u = (o = l == null ? void 0 : l.blockSelector) !== null && o !== void 0 ? o : a == null ? void 0 : a.blockSelector;
|
|
1521
1525
|
return S(c) && S(d) && S(u) ? void 0 : { maskAllInputs: c == null || c, maskTextSelector: d, blockSelector: u };
|
|
1522
1526
|
}
|
|
1523
1527
|
get _sampleRate() {
|
|
1524
|
-
var e = this._instance.get_property(
|
|
1528
|
+
var e = this._instance.get_property(Xr);
|
|
1525
1529
|
return Y(e) ? e : null;
|
|
1526
1530
|
}
|
|
1527
1531
|
get _minimumDuration() {
|
|
1528
|
-
var e = this._instance.get_property(
|
|
1532
|
+
var e = this._instance.get_property(Zr);
|
|
1529
1533
|
return Y(e) ? e : null;
|
|
1530
1534
|
}
|
|
1531
1535
|
get status() {
|
|
@@ -1594,7 +1598,7 @@ class Wa {
|
|
|
1594
1598
|
onRemoteConfig(e) {
|
|
1595
1599
|
var t, i, s, n, o, a;
|
|
1596
1600
|
if (this._tryAddCustomEvent("$remote_config_received", e), this._persistRemoteConfig(e), this._linkedFlag = ((t = e.sessionRecording) === null || t === void 0 ? void 0 : t.linkedFlag) || null, (i = e.sessionRecording) !== null && i !== void 0 && i.endpoint && (this._endpoint = (a = e.sessionRecording) === null || a === void 0 ? void 0 : a.endpoint), this._setupSampling(), !R(this._linkedFlag) && !this._linkedFlagSeen) {
|
|
1597
|
-
var l =
|
|
1601
|
+
var l = H(this._linkedFlag) ? this._linkedFlag : this._linkedFlag.flag, c = H(this._linkedFlag) ? null : this._linkedFlag.variant;
|
|
1598
1602
|
this._instance.onFeatureFlags((d, u) => {
|
|
1599
1603
|
var h = q(u) && l in u, _ = c ? u[l] === c : h;
|
|
1600
1604
|
_ && this._reportStarted("linked_flag_matched", { linkedFlag: l, linkedVariant: c }), this._linkedFlagSeen = _;
|
|
@@ -1613,7 +1617,7 @@ class Wa {
|
|
|
1613
1617
|
var n, o, a, l, c, d, u, h, _, p = (n = e.sessionRecording) === null || n === void 0 ? void 0 : n.sampleRate, v = R(p) ? null : parseFloat(p);
|
|
1614
1618
|
R(v) && this._resetSampling();
|
|
1615
1619
|
var b = (o = e.sessionRecording) === null || o === void 0 ? void 0 : o.minimumDurationMilliseconds;
|
|
1616
|
-
i.register({ [Wi]: !!e.sessionRecording, [
|
|
1620
|
+
i.register({ [Wi]: !!e.sessionRecording, [Kr]: (a = e.sessionRecording) === null || a === void 0 ? void 0 : a.consoleLogRecordingEnabled, [Jr]: f({ capturePerformance: e.capturePerformance }, (l = e.sessionRecording) === null || l === void 0 ? void 0 : l.networkPayloadCapture), [Yr]: (c = e.sessionRecording) === null || c === void 0 ? void 0 : c.masking, [Qr]: { enabled: (d = e.sessionRecording) === null || d === void 0 ? void 0 : d.recordCanvas, fps: (u = e.sessionRecording) === null || u === void 0 ? void 0 : u.canvasFps, quality: (h = e.sessionRecording) === null || h === void 0 ? void 0 : h.canvasQuality }, [Xr]: v, [Zr]: S(b) ? null : b, [es]: (_ = e.sessionRecording) === null || _ === void 0 ? void 0 : _.scriptConfig });
|
|
1617
1621
|
};
|
|
1618
1622
|
s(), (t = this._persistDecideOnSessionListener) === null || t === void 0 || t.call(this), this._persistDecideOnSessionListener = this._sessionManager.onSessionId(s);
|
|
1619
1623
|
}
|
|
@@ -1625,7 +1629,7 @@ class Wa {
|
|
|
1625
1629
|
_startCapture(e) {
|
|
1626
1630
|
if (!S(Object.assign) && !S(Array.from) && !(this._captureStarted || this._instance.config.disable_session_recording || this._instance.consent.isOptedOut())) {
|
|
1627
1631
|
var t, i;
|
|
1628
|
-
this._captureStarted = !0, this._sessionManager.checkAndGetSessionAndWindowId(),
|
|
1632
|
+
this._captureStarted = !0, this._sessionManager.checkAndGetSessionAndWindowId(), Ut() ? this._onScriptLoaded() : (t = I.__PosthogExtensions__) === null || t === void 0 || (i = t.loadExternalDependency) === null || i === void 0 || i.call(t, this._instance, this._scriptName, (s) => {
|
|
1629
1633
|
if (s) return V.error("could not load recorder", s);
|
|
1630
1634
|
this._onScriptLoaded();
|
|
1631
1635
|
}), V.info("starting"), this.status === "active" && this._reportStarted(e || "recording_initialized");
|
|
@@ -1633,11 +1637,11 @@ class Wa {
|
|
|
1633
1637
|
}
|
|
1634
1638
|
get _scriptName() {
|
|
1635
1639
|
var e, t, i;
|
|
1636
|
-
return ((e = this._instance) === null || e === void 0 || (t = e.persistence) === null || t === void 0 || (i = t.get_property(
|
|
1640
|
+
return ((e = this._instance) === null || e === void 0 || (t = e.persistence) === null || t === void 0 || (i = t.get_property(es)) === null || i === void 0 ? void 0 : i.script) || "recorder";
|
|
1637
1641
|
}
|
|
1638
1642
|
_isInteractiveEvent(e) {
|
|
1639
1643
|
var t;
|
|
1640
|
-
return e.type === 3 &&
|
|
1644
|
+
return e.type === 3 && Wa.indexOf((t = e.data) === null || t === void 0 ? void 0 : t.source) !== -1;
|
|
1641
1645
|
}
|
|
1642
1646
|
_updateWindowAndSessionIds(e) {
|
|
1643
1647
|
var t = this._isInteractiveEvent(e);
|
|
@@ -1660,18 +1664,18 @@ class Wa {
|
|
|
1660
1664
|
}
|
|
1661
1665
|
}
|
|
1662
1666
|
_tryAddCustomEvent(e, t) {
|
|
1663
|
-
return this._tryRRWebMethod(
|
|
1667
|
+
return this._tryRRWebMethod(ms(() => Ut().addCustomEvent(e, t)));
|
|
1664
1668
|
}
|
|
1665
1669
|
_tryTakeFullSnapshot() {
|
|
1666
|
-
return this._tryRRWebMethod(
|
|
1670
|
+
return this._tryRRWebMethod(ms(() => Ut().takeFullSnapshot()));
|
|
1667
1671
|
}
|
|
1668
1672
|
_onScriptLoaded() {
|
|
1669
1673
|
var e, t, i, s, n = { blockClass: "ph-no-capture", blockSelector: void 0, ignoreClass: "ph-ignore-input", maskTextClass: "ph-mask", maskTextSelector: void 0, maskTextFn: void 0, maskAllInputs: !0, maskInputOptions: { password: !0 }, maskInputFn: void 0, slimDOMOptions: {}, collectFonts: !1, inlineStylesheet: !0, recordCrossOriginIframes: !1 }, o = this._instance.config.session_recording;
|
|
1670
1674
|
for (var [a, l] of Object.entries(o || {})) a in n && (a === "maskInputOptions" ? n.maskInputOptions = f({ password: !0 }, l) : n[a] = l);
|
|
1671
1675
|
this._canvasRecording && this._canvasRecording.enabled && (n.recordCanvas = !0, n.sampling = { canvas: this._canvasRecording.fps }, n.dataURLOptions = { type: "image/webp", quality: this._canvasRecording.quality }), this._masking && (n.maskAllInputs = (t = this._masking.maskAllInputs) === null || t === void 0 || t, n.maskTextSelector = (i = this._masking.maskTextSelector) !== null && i !== void 0 ? i : void 0, n.blockSelector = (s = this._masking.blockSelector) !== null && s !== void 0 ? s : void 0);
|
|
1672
|
-
var c =
|
|
1676
|
+
var c = Ut();
|
|
1673
1677
|
if (c) {
|
|
1674
|
-
this._mutationRateLimiter = (e = this._mutationRateLimiter) !== null && e !== void 0 ? e : new
|
|
1678
|
+
this._mutationRateLimiter = (e = this._mutationRateLimiter) !== null && e !== void 0 ? e : new Oa(c, { refillRate: this._instance.config.session_recording.__mutationRateLimiterRefillRate, bucketSize: this._instance.config.session_recording.__mutationRateLimiterBucketSize, onBlockedNode: (u, h) => {
|
|
1675
1679
|
var _ = "Too many mutations on node '".concat(u, "'. Rate limiting. This could be due to SVG animations or something similar");
|
|
1676
1680
|
V.info(_, { node: h }), this.log(xt + " " + _, "warn");
|
|
1677
1681
|
} });
|
|
@@ -1693,7 +1697,7 @@ class Wa {
|
|
|
1693
1697
|
var e, t, i, s, n = [], o = (e = I.__PosthogExtensions__) === null || e === void 0 || (t = e.rrwebPlugins) === null || t === void 0 ? void 0 : t.getRecordConsolePlugin;
|
|
1694
1698
|
o && this._isConsoleLogCaptureEnabled && n.push(o());
|
|
1695
1699
|
var a = (i = I.__PosthogExtensions__) === null || i === void 0 || (s = i.rrwebPlugins) === null || s === void 0 ? void 0 : s.getRecordNetworkPlugin;
|
|
1696
|
-
return this._networkPayloadCapture && ce(a) && (!
|
|
1700
|
+
return this._networkPayloadCapture && ce(a) && (!Xo.includes(location.hostname) || this._forceAllowLocalhostNetworkCapture ? n.push(a($a(this._instance.config, this._networkPayloadCapture))) : V.info("NetworkCapture not started because we are on localhost.")), n;
|
|
1697
1701
|
}
|
|
1698
1702
|
onRRwebEmit(e) {
|
|
1699
1703
|
var t;
|
|
@@ -1718,8 +1722,8 @@ class Wa {
|
|
|
1718
1722
|
}
|
|
1719
1723
|
return u;
|
|
1720
1724
|
}(s);
|
|
1721
|
-
if (this._updateWindowAndSessionIds(n), this._isIdle !== !0 ||
|
|
1722
|
-
if (
|
|
1725
|
+
if (this._updateWindowAndSessionIds(n), this._isIdle !== !0 || ys(n)) {
|
|
1726
|
+
if (ys(n)) {
|
|
1723
1727
|
var o = n.data.payload;
|
|
1724
1728
|
if (o) {
|
|
1725
1729
|
var a = o.lastActivityTimestamp, l = o.threshold;
|
|
@@ -1788,8 +1792,8 @@ class Wa {
|
|
|
1788
1792
|
}
|
|
1789
1793
|
_checkUrlTriggerConditions() {
|
|
1790
1794
|
if (g !== void 0 && g.location.href) {
|
|
1791
|
-
var e = g.location.href, t = this._urlBlocked, i =
|
|
1792
|
-
i && !t ? this._pauseRecording() : !i && t && this._resumeRecording(),
|
|
1795
|
+
var e = g.location.href, t = this._urlBlocked, i = bs(e, this._urlBlocklist);
|
|
1796
|
+
i && !t ? this._pauseRecording() : !i && t && this._resumeRecording(), bs(e, this._urlTriggers) && this._activateTrigger("url");
|
|
1793
1797
|
}
|
|
1794
1798
|
}
|
|
1795
1799
|
_activateTrigger(e) {
|
|
@@ -1830,7 +1834,7 @@ class Wa {
|
|
|
1830
1834
|
}
|
|
1831
1835
|
}
|
|
1832
1836
|
var Oi = Q("[SegmentIntegration]");
|
|
1833
|
-
function
|
|
1837
|
+
function Ga(r, e) {
|
|
1834
1838
|
var t = r.config.segment;
|
|
1835
1839
|
if (!t) return e();
|
|
1836
1840
|
(function(i, s) {
|
|
@@ -1858,7 +1862,7 @@ function Va(r, e) {
|
|
|
1858
1862
|
});
|
|
1859
1863
|
}
|
|
1860
1864
|
var Ln = "posthog-js";
|
|
1861
|
-
function
|
|
1865
|
+
function Mn(r) {
|
|
1862
1866
|
var { organization: e, projectId: t, prefix: i, severityAllowList: s = ["error"] } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
1863
1867
|
return (n) => {
|
|
1864
1868
|
var o, a, l, c, d;
|
|
@@ -1870,18 +1874,18 @@ function An(r) {
|
|
|
1870
1874
|
return e && t && (p.$sentry_url = (i || "https://sentry.io/organizations/") + e + "/issues/?project=" + t + "&query=" + n.event_id), r.exceptions.sendExceptionEvent(p), n;
|
|
1871
1875
|
};
|
|
1872
1876
|
}
|
|
1873
|
-
class
|
|
1877
|
+
class Ka {
|
|
1874
1878
|
constructor(e, t, i, s, n) {
|
|
1875
1879
|
this.name = Ln, this.setupOnce = function(o) {
|
|
1876
|
-
o(
|
|
1880
|
+
o(Mn(e, { organization: t, projectId: i, prefix: s, severityAllowList: n }));
|
|
1877
1881
|
};
|
|
1878
1882
|
}
|
|
1879
1883
|
}
|
|
1880
|
-
var xe, Ja = g != null && g.location ? si(g.location.hash, "__posthog") || si(location.hash, "state") : null,
|
|
1884
|
+
var xe, Ja = g != null && g.location ? si(g.location.hash, "__posthog") || si(location.hash, "state") : null, ws = "_postHogToolbarParams", Ss = Q("[Toolbar]");
|
|
1881
1885
|
(function(r) {
|
|
1882
1886
|
r[r.UNINITIALIZED = 0] = "UNINITIALIZED", r[r.LOADING = 1] = "LOADING", r[r.LOADED = 2] = "LOADED";
|
|
1883
1887
|
})(xe || (xe = {}));
|
|
1884
|
-
class
|
|
1888
|
+
class Ya {
|
|
1885
1889
|
constructor(e) {
|
|
1886
1890
|
this.instance = e;
|
|
1887
1891
|
}
|
|
@@ -1906,24 +1910,24 @@ class Ka {
|
|
|
1906
1910
|
s = g == null ? void 0 : g.localStorage;
|
|
1907
1911
|
}
|
|
1908
1912
|
var o, a = Ja || si(i.hash, "__posthog") || si(i.hash, "state"), l = a ? jr(() => JSON.parse(atob(decodeURIComponent(a)))) || jr(() => JSON.parse(decodeURIComponent(a))) : null;
|
|
1909
|
-
return l && l.action === "ph_authorize" ? ((o = l).source = "url", o && Object.keys(o).length > 0 && (l.desiredHash ? i.hash = l.desiredHash : n ? n.replaceState(n.state, "", i.pathname + i.search) : i.hash = "")) : ((o = JSON.parse(s.getItem(
|
|
1913
|
+
return l && l.action === "ph_authorize" ? ((o = l).source = "url", o && Object.keys(o).length > 0 && (l.desiredHash ? i.hash = l.desiredHash : n ? n.replaceState(n.state, "", i.pathname + i.search) : i.hash = "")) : ((o = JSON.parse(s.getItem(ws) || "{}")).source = "localstorage", delete o.userIntent), !(!o.token || this.instance.config.token !== o.token) && (this.loadToolbar(o), !0);
|
|
1910
1914
|
} catch {
|
|
1911
1915
|
return !1;
|
|
1912
1916
|
}
|
|
1913
1917
|
}
|
|
1914
1918
|
_callLoadToolbar(e) {
|
|
1915
1919
|
var t = I.ph_load_toolbar || I.ph_load_editor;
|
|
1916
|
-
!R(t) && ce(t) ? t(e, this.instance) :
|
|
1920
|
+
!R(t) && ce(t) ? t(e, this.instance) : Ss.warn("No toolbar load function found");
|
|
1917
1921
|
}
|
|
1918
1922
|
loadToolbar(e) {
|
|
1919
|
-
var t = !(k == null || !k.getElementById(
|
|
1923
|
+
var t = !(k == null || !k.getElementById(cn));
|
|
1920
1924
|
if (!g || t) return !1;
|
|
1921
1925
|
var i = this.instance.requestRouter.region === "custom" && this.instance.config.advanced_disable_toolbar_metrics, s = f(f({ token: this.instance.config.token }, e), {}, { apiURL: this.instance.requestRouter.endpointFor("ui") }, i ? { instrument: !1 } : {});
|
|
1922
|
-
if (g.localStorage.setItem(
|
|
1926
|
+
if (g.localStorage.setItem(ws, JSON.stringify(f(f({}, s), {}, { source: void 0 }))), this._getToolbarState() === xe.LOADED) this._callLoadToolbar(s);
|
|
1923
1927
|
else if (this._getToolbarState() === xe.UNINITIALIZED) {
|
|
1924
1928
|
var n, o;
|
|
1925
1929
|
this._setToolbarState(xe.LOADING), (n = I.__PosthogExtensions__) === null || n === void 0 || (o = n.loadExternalDependency) === null || o === void 0 || o.call(n, this.instance, "toolbar", (a) => {
|
|
1926
|
-
if (a) return
|
|
1930
|
+
if (a) return Ss.error("[Toolbar] Failed to load", a), void this._setToolbarState(xe.UNINITIALIZED);
|
|
1927
1931
|
this._setToolbarState(xe.LOADED), this._callLoadToolbar(s);
|
|
1928
1932
|
}), N(g, "turbolinks:load", () => {
|
|
1929
1933
|
this._setToolbarState(xe.UNINITIALIZED), this.loadToolbar(s);
|
|
@@ -1939,8 +1943,8 @@ class Ka {
|
|
|
1939
1943
|
return this.maybeLoadToolbar(e, t, i);
|
|
1940
1944
|
}
|
|
1941
1945
|
}
|
|
1942
|
-
var
|
|
1943
|
-
class
|
|
1946
|
+
var Qa = Q("[TracingHeaders]");
|
|
1947
|
+
class Xa {
|
|
1944
1948
|
constructor(e) {
|
|
1945
1949
|
w(this, "_restoreXHRPatch", void 0), w(this, "_restoreFetchPatch", void 0), w(this, "_startCapturing", () => {
|
|
1946
1950
|
var t, i, s, n;
|
|
@@ -1950,7 +1954,7 @@ class Qa {
|
|
|
1950
1954
|
_loadScript(e) {
|
|
1951
1955
|
var t, i, s;
|
|
1952
1956
|
(t = I.__PosthogExtensions__) !== null && t !== void 0 && t.tracingHeadersPatchFns && e(), (i = I.__PosthogExtensions__) === null || i === void 0 || (s = i.loadExternalDependency) === null || s === void 0 || s.call(i, this._instance, "tracing-headers", (n) => {
|
|
1953
|
-
if (n) return
|
|
1957
|
+
if (n) return Qa.error("failed to load script", n);
|
|
1954
1958
|
e();
|
|
1955
1959
|
});
|
|
1956
1960
|
}
|
|
@@ -1959,8 +1963,8 @@ class Qa {
|
|
|
1959
1963
|
this._instance.config.__add_tracing_headers ? this._loadScript(this._startCapturing) : ((e = this._restoreXHRPatch) === null || e === void 0 || e.call(this), (t = this._restoreFetchPatch) === null || t === void 0 || t.call(this), this._restoreXHRPatch = void 0, this._restoreFetchPatch = void 0);
|
|
1960
1964
|
}
|
|
1961
1965
|
}
|
|
1962
|
-
var Oe = Q("[Web Vitals]"),
|
|
1963
|
-
class
|
|
1966
|
+
var Oe = Q("[Web Vitals]"), ks = 9e5;
|
|
1967
|
+
class Za {
|
|
1964
1968
|
constructor(e) {
|
|
1965
1969
|
var t;
|
|
1966
1970
|
w(this, "_enabledServerSide", !1), w(this, "_initialized", !1), w(this, "_buffer", { url: void 0, metrics: [], firstMetricTimestamp: void 0 }), w(this, "_flushToCapture", () => {
|
|
@@ -1976,18 +1980,18 @@ class Xa {
|
|
|
1976
1980
|
}), w(this, "_startCapturing", () => {
|
|
1977
1981
|
var i, s, n, o, a = I.__PosthogExtensions__;
|
|
1978
1982
|
S(a) || S(a.postHogWebVitalsCallbacks) || ({ onLCP: i, onCLS: s, onFCP: n, onINP: o } = a.postHogWebVitalsCallbacks), i && s && n && o ? (this.allowedMetrics.indexOf("LCP") > -1 && i(this._addToBuffer.bind(this)), this.allowedMetrics.indexOf("CLS") > -1 && s(this._addToBuffer.bind(this)), this.allowedMetrics.indexOf("FCP") > -1 && n(this._addToBuffer.bind(this)), this.allowedMetrics.indexOf("INP") > -1 && o(this._addToBuffer.bind(this)), this._initialized = !0) : Oe.error("web vitals callbacks not loaded - not starting");
|
|
1979
|
-
}), this._instance = e, this._enabledServerSide = !((t = this._instance.persistence) === null || t === void 0 || !t.props[
|
|
1983
|
+
}), this._instance = e, this._enabledServerSide = !((t = this._instance.persistence) === null || t === void 0 || !t.props[Vr]), this.startIfEnabled();
|
|
1980
1984
|
}
|
|
1981
1985
|
get allowedMetrics() {
|
|
1982
1986
|
var e, t, i = q(this._instance.config.capture_performance) ? (e = this._instance.config.capture_performance) === null || e === void 0 ? void 0 : e.web_vitals_allowed_metrics : void 0;
|
|
1983
|
-
return S(i) ? ((t = this._instance.persistence) === null || t === void 0 ? void 0 : t.props[
|
|
1987
|
+
return S(i) ? ((t = this._instance.persistence) === null || t === void 0 ? void 0 : t.props[Gr]) || ["CLS", "FCP", "INP", "LCP"] : i;
|
|
1984
1988
|
}
|
|
1985
1989
|
get flushToCaptureTimeoutMs() {
|
|
1986
1990
|
return (q(this._instance.config.capture_performance) ? this._instance.config.capture_performance.web_vitals_delayed_flush_ms : void 0) || 5e3;
|
|
1987
1991
|
}
|
|
1988
1992
|
get _maxAllowedValue() {
|
|
1989
|
-
var e = q(this._instance.config.capture_performance) && Y(this._instance.config.capture_performance.__web_vitals_max_value) ? this._instance.config.capture_performance.__web_vitals_max_value :
|
|
1990
|
-
return 0 < e && e <= 6e4 ?
|
|
1993
|
+
var e = q(this._instance.config.capture_performance) && Y(this._instance.config.capture_performance.__web_vitals_max_value) ? this._instance.config.capture_performance.__web_vitals_max_value : ks;
|
|
1994
|
+
return 0 < e && e <= 6e4 ? ks : e;
|
|
1991
1995
|
}
|
|
1992
1996
|
get isEnabled() {
|
|
1993
1997
|
var e = te == null ? void 0 : te.protocol;
|
|
@@ -2000,7 +2004,7 @@ class Xa {
|
|
|
2000
2004
|
}
|
|
2001
2005
|
onRemoteConfig(e) {
|
|
2002
2006
|
var t = q(e.capturePerformance) && !!e.capturePerformance.web_vitals, i = q(e.capturePerformance) ? e.capturePerformance.web_vitals_allowed_metrics : void 0;
|
|
2003
|
-
this._instance.persistence && (this._instance.persistence.register({ [
|
|
2007
|
+
this._instance.persistence && (this._instance.persistence.register({ [Vr]: t }), this._instance.persistence.register({ [Gr]: i })), this._enabledServerSide = t, this.startIfEnabled();
|
|
2004
2008
|
}
|
|
2005
2009
|
_loadScript(e) {
|
|
2006
2010
|
var t, i, s;
|
|
@@ -2013,14 +2017,14 @@ class Xa {
|
|
|
2013
2017
|
return e || Oe.error("Could not determine current URL"), e;
|
|
2014
2018
|
}
|
|
2015
2019
|
}
|
|
2016
|
-
var
|
|
2017
|
-
function
|
|
2020
|
+
var el = Q("[Heatmaps]");
|
|
2021
|
+
function Es(r) {
|
|
2018
2022
|
return q(r) && "clientX" in r && "clientY" in r && Y(r.clientX) && Y(r.clientY);
|
|
2019
2023
|
}
|
|
2020
|
-
class
|
|
2024
|
+
class tl {
|
|
2021
2025
|
constructor(e) {
|
|
2022
2026
|
var t;
|
|
2023
|
-
w(this, "rageclicks", new
|
|
2027
|
+
w(this, "rageclicks", new wn()), w(this, "_enabledServerSide", !1), w(this, "_initialized", !1), w(this, "_flushInterval", null), this.instance = e, this._enabledServerSide = !((t = this.instance.persistence) === null || t === void 0 || !t.props[zi]);
|
|
2024
2028
|
}
|
|
2025
2029
|
get flushIntervalMilliseconds() {
|
|
2026
2030
|
var e = 5e3;
|
|
@@ -2032,7 +2036,7 @@ class el {
|
|
|
2032
2036
|
startIfEnabled() {
|
|
2033
2037
|
if (this.isEnabled) {
|
|
2034
2038
|
if (this._initialized) return;
|
|
2035
|
-
|
|
2039
|
+
el.info("starting..."), this._setupListeners(), this._flushInterval = setInterval(this._flush.bind(this), this.flushIntervalMilliseconds);
|
|
2036
2040
|
} else {
|
|
2037
2041
|
var e, t;
|
|
2038
2042
|
clearInterval((e = this._flushInterval) !== null && e !== void 0 ? e : void 0), (t = this._deadClicksCapture) === null || t === void 0 || t.stop(), this.getAndClearBuffer();
|
|
@@ -2050,28 +2054,28 @@ class el {
|
|
|
2050
2054
|
this._onClick(e.originalEvent, "deadclick");
|
|
2051
2055
|
}
|
|
2052
2056
|
_setupListeners() {
|
|
2053
|
-
g && k && (N(g, "beforeunload", this._flush.bind(this)), N(k, "click", (e) => this._onClick(e || (g == null ? void 0 : g.event)), { capture: !0 }), N(k, "mousemove", (e) => this._onMouseMove(e || (g == null ? void 0 : g.event)), { capture: !0 }), this._deadClicksCapture = new
|
|
2057
|
+
g && k && (N(g, "beforeunload", this._flush.bind(this)), N(k, "click", (e) => this._onClick(e || (g == null ? void 0 : g.event)), { capture: !0 }), N(k, "mousemove", (e) => this._onMouseMove(e || (g == null ? void 0 : g.event)), { capture: !0 }), this._deadClicksCapture = new kn(this.instance, ha, this._onDeadClick.bind(this)), this._deadClicksCapture.startIfEnabled(), this._initialized = !0);
|
|
2054
2058
|
}
|
|
2055
2059
|
_getProperties(e, t) {
|
|
2056
2060
|
var i = this.instance.scrollManager.scrollY(), s = this.instance.scrollManager.scrollX(), n = this.instance.scrollManager.scrollElement(), o = function(a, l, c) {
|
|
2057
2061
|
for (var d = a; d && pi(d) && !Ne(d, "body"); ) {
|
|
2058
2062
|
if (d === c) return !1;
|
|
2059
2063
|
if (F(l, g == null ? void 0 : g.getComputedStyle(d).position)) return !0;
|
|
2060
|
-
d =
|
|
2064
|
+
d = gn(d);
|
|
2061
2065
|
}
|
|
2062
2066
|
return !1;
|
|
2063
|
-
}(
|
|
2067
|
+
}(pn(e), ["fixed", "sticky"], n);
|
|
2064
2068
|
return { x: e.clientX + (o ? 0 : s), y: e.clientY + (o ? 0 : i), target_fixed: o, type: t };
|
|
2065
2069
|
}
|
|
2066
2070
|
_onClick(e) {
|
|
2067
2071
|
var t, i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "click";
|
|
2068
|
-
if (!
|
|
2072
|
+
if (!is(e.target) && Es(e)) {
|
|
2069
2073
|
var s = this._getProperties(e, i);
|
|
2070
2074
|
(t = this.rageclicks) !== null && t !== void 0 && t.isRageClick(e.clientX, e.clientY, (/* @__PURE__ */ new Date()).getTime()) && this._capture(f(f({}, s), {}, { type: "rageclick" })), this._capture(s);
|
|
2071
2075
|
}
|
|
2072
2076
|
}
|
|
2073
2077
|
_onMouseMove(e) {
|
|
2074
|
-
!
|
|
2078
|
+
!is(e.target) && Es(e) && (clearTimeout(this._mouseMoveTimeout), this._mouseMoveTimeout = setTimeout(() => {
|
|
2075
2079
|
this._capture(this._getProperties(e, "mousemove"));
|
|
2076
2080
|
}, 500));
|
|
2077
2081
|
}
|
|
@@ -2085,7 +2089,7 @@ class el {
|
|
|
2085
2089
|
this._buffer && !nt(this._buffer) && this.instance.capture("$$heatmap", { $heatmap_data: this.getAndClearBuffer() });
|
|
2086
2090
|
}
|
|
2087
2091
|
}
|
|
2088
|
-
class
|
|
2092
|
+
class il {
|
|
2089
2093
|
constructor(e) {
|
|
2090
2094
|
this._instance = e;
|
|
2091
2095
|
}
|
|
@@ -2110,13 +2114,13 @@ class tl {
|
|
|
2110
2114
|
if (!(S(o) || S(a) || S(l) || S(c) || S(d) || S(u))) {
|
|
2111
2115
|
o = Math.ceil(o), a = Math.ceil(a), l = Math.ceil(l), c = Math.ceil(c), d = Math.ceil(d), u = Math.ceil(u);
|
|
2112
2116
|
var h = o <= 1 ? 1 : le(a / o, 0, 1), _ = o <= 1 ? 1 : le(l / o, 0, 1), p = c <= 1 ? 1 : le(d / c, 0, 1), v = c <= 1 ? 1 : le(u / c, 0, 1);
|
|
2113
|
-
s =
|
|
2117
|
+
s = U(s, { $prev_pageview_last_scroll: a, $prev_pageview_last_scroll_percentage: h, $prev_pageview_max_scroll: l, $prev_pageview_max_scroll_percentage: _, $prev_pageview_last_content: d, $prev_pageview_last_content_percentage: p, $prev_pageview_max_content: u, $prev_pageview_max_content_percentage: v });
|
|
2114
2118
|
}
|
|
2115
2119
|
}
|
|
2116
2120
|
return i.pathname && (s.$prev_pageview_pathname = i.pathname), i.timestamp && (s.$prev_pageview_duration = (e.getTime() - i.timestamp.getTime()) / 1e3), s;
|
|
2117
2121
|
}
|
|
2118
2122
|
}
|
|
2119
|
-
class
|
|
2123
|
+
class rl {
|
|
2120
2124
|
constructor(e) {
|
|
2121
2125
|
this._instance = e;
|
|
2122
2126
|
}
|
|
@@ -2124,24 +2128,24 @@ class il {
|
|
|
2124
2128
|
this._instance.capture("$exception", e, { _noTruncate: !0, _batchKey: "exceptionEvent" });
|
|
2125
2129
|
}
|
|
2126
2130
|
}
|
|
2127
|
-
var _e = "Mobile", li = "iOS", be = "Android", Rt = "Tablet",
|
|
2131
|
+
var _e = "Mobile", li = "iOS", be = "Android", Rt = "Tablet", Dn = be + " " + Rt, qn = "iPad", Nn = "Apple", Bn = Nn + " Watch", $t = "Safari", ht = "BlackBerry", Un = "Samsung", Hn = Un + "Browser", jn = Un + " Internet", Ze = "Chrome", sl = Ze + " OS", zn = Ze + " " + li, Er = "Internet Explorer", Wn = Er + " " + _e, xr = "Opera", nl = xr + " Mini", Cr = "Edge", Vn = "Microsoft " + Cr, lt = "Firefox", Gn = lt + " " + li, Ot = "Nintendo", At = "PlayStation", ut = "Xbox", Kn = be + " " + _e, Jn = _e + " " + $t, Ct = "Windows", lr = Ct + " Phone", xs = "Nokia", ur = "Ouya", Yn = "Generic", ol = Yn + " " + _e.toLowerCase(), Qn = Yn + " " + Rt.toLowerCase(), cr = "Konqueror", ee = "(\\d+(\\.\\d+)?)", Ai = new RegExp("Version/" + ee), al = new RegExp(ut, "i"), ll = new RegExp(At + " \\w+", "i"), ul = new RegExp(Ot + " \\w+", "i"), Ir = new RegExp(ht + "|PlayBook|BB10", "i"), cl = { "NT3.51": "NT 3.11", "NT4.0": "NT 4.0", "5.0": "2000", 5.1: "XP", 5.2: "XP", "6.0": "Vista", 6.1: "7", 6.2: "8", 6.3: "8.1", 6.4: "10", "10.0": "10" }, dl = (r, e) => e && F(e, Nn) || function(t) {
|
|
2128
2132
|
return F(t, $t) && !F(t, Ze) && !F(t, be);
|
|
2129
|
-
}(r),
|
|
2130
|
-
return e = e || "", F(r, " OPR/") && F(r, "Mini") ?
|
|
2131
|
-
},
|
|
2132
|
-
var t =
|
|
2133
|
+
}(r), Xn = function(r, e) {
|
|
2134
|
+
return e = e || "", F(r, " OPR/") && F(r, "Mini") ? nl : F(r, " OPR/") ? xr : Ir.test(r) ? ht : F(r, "IE" + _e) || F(r, "WPDesktop") ? Wn : F(r, Hn) ? jn : F(r, Cr) || F(r, "Edg/") ? Vn : F(r, "FBIOS") ? "Facebook " + _e : F(r, "UCWEB") || F(r, "UCBrowser") ? "UC Browser" : F(r, "CriOS") ? zn : F(r, "CrMo") || F(r, Ze) ? Ze : F(r, be) && F(r, $t) ? Kn : F(r, "FxiOS") ? Gn : F(r.toLowerCase(), cr.toLowerCase()) ? cr : dl(r, e) ? F(r, _e) ? Jn : $t : F(r, lt) ? lt : F(r, "MSIE") || F(r, "Trident/") ? Er : F(r, "Gecko") ? lt : "";
|
|
2135
|
+
}, _l = { [Wn]: [new RegExp("rv:" + ee)], [Vn]: [new RegExp(Cr + "?\\/" + ee)], [Ze]: [new RegExp("(" + Ze + "|CrMo)\\/" + ee)], [zn]: [new RegExp("CriOS\\/" + ee)], "UC Browser": [new RegExp("(UCBrowser|UCWEB)\\/" + ee)], [$t]: [Ai], [Jn]: [Ai], [xr]: [new RegExp("(Opera|OPR)\\/" + ee)], [lt]: [new RegExp(lt + "\\/" + ee)], [Gn]: [new RegExp("FxiOS\\/" + ee)], [cr]: [new RegExp("Konqueror[:/]?" + ee, "i")], [ht]: [new RegExp(ht + " " + ee), Ai], [Kn]: [new RegExp("android\\s" + ee, "i")], [jn]: [new RegExp(Hn + "\\/" + ee)], [Er]: [new RegExp("(rv:|MSIE )" + ee)], Mozilla: [new RegExp("rv:" + ee)] }, hl = function(r, e) {
|
|
2136
|
+
var t = Xn(r, e), i = _l[t];
|
|
2133
2137
|
if (S(i)) return null;
|
|
2134
2138
|
for (var s = 0; s < i.length; s++) {
|
|
2135
2139
|
var n = i[s], o = r.match(n);
|
|
2136
2140
|
if (o) return parseFloat(o[o.length - 2]);
|
|
2137
2141
|
}
|
|
2138
2142
|
return null;
|
|
2139
|
-
},
|
|
2143
|
+
}, Cs = [[new RegExp(ut + "; " + ut + " (.*?)[);]", "i"), (r) => [ut, r && r[1] || ""]], [new RegExp(Ot, "i"), [Ot, ""]], [new RegExp(At, "i"), [At, ""]], [Ir, [ht, ""]], [new RegExp(Ct, "i"), (r, e) => {
|
|
2140
2144
|
if (/Phone/.test(e) || /WPDesktop/.test(e)) return [lr, ""];
|
|
2141
2145
|
if (new RegExp(_e).test(e) && !/IEMobile\b/.test(e)) return [Ct + " " + _e, ""];
|
|
2142
2146
|
var t = /Windows NT ([0-9.]+)/i.exec(e);
|
|
2143
2147
|
if (t && t[1]) {
|
|
2144
|
-
var i = t[1], s =
|
|
2148
|
+
var i = t[1], s = cl[i] || "";
|
|
2145
2149
|
return /arm/i.test(e) && (s = "RT"), [Ct, s];
|
|
2146
2150
|
}
|
|
2147
2151
|
return [Ct, ""];
|
|
@@ -2167,90 +2171,90 @@ var _e = "Mobile", li = "iOS", be = "Android", Rt = "Tablet", Mn = be + " " + Rt
|
|
|
2167
2171
|
e[1] = t.join(".");
|
|
2168
2172
|
}
|
|
2169
2173
|
return e;
|
|
2170
|
-
}], [/Mac/i, ["Mac OS X", ""]], [/CrOS/, [
|
|
2171
|
-
return
|
|
2172
|
-
},
|
|
2173
|
-
var e =
|
|
2174
|
-
return e ===
|
|
2175
|
-
},
|
|
2176
|
-
function
|
|
2174
|
+
}], [/Mac/i, ["Mac OS X", ""]], [/CrOS/, [sl, ""]], [/Linux|debian/i, ["Linux", ""]]], Zn = function(r) {
|
|
2175
|
+
return ul.test(r) ? Ot : ll.test(r) ? At : al.test(r) ? ut : new RegExp(ur, "i").test(r) ? ur : new RegExp("(" + lr + "|WPDesktop)", "i").test(r) ? lr : /iPad/.test(r) ? qn : /iPod/.test(r) ? "iPod Touch" : /iPhone/.test(r) ? "iPhone" : /(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(r) ? Bn : Ir.test(r) ? ht : /(kobo)\s(ereader|touch)/i.test(r) ? "Kobo" : new RegExp(xs, "i").test(r) ? xs : /(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i.test(r) || /(kf[a-z]+)( bui|\)).+silk\//i.test(r) ? "Kindle Fire" : /(Android|ZTE)/i.test(r) ? !new RegExp(_e).test(r) || /(9138B|TB782B|Nexus [97]|pixel c|HUAWEISHT|BTV|noble nook|smart ultra 6)/i.test(r) ? /pixel[\daxl ]{1,6}/i.test(r) && !/pixel c/i.test(r) || /(huaweimed-al00|tah-|APA|SM-G92|i980|zte|U304AA)/i.test(r) || /lmy47v/i.test(r) && !/QTAQZ3/i.test(r) ? be : Dn : be : new RegExp("(pda|" + _e + ")", "i").test(r) ? ol : new RegExp(Rt, "i").test(r) && !new RegExp(Rt + " pc", "i").test(r) ? Qn : "";
|
|
2176
|
+
}, eo = function(r) {
|
|
2177
|
+
var e = Zn(r);
|
|
2178
|
+
return e === qn || e === Dn || e === "Kobo" || e === "Kindle Fire" || e === Qn ? Rt : e === Ot || e === ut || e === At || e === ur ? "Console" : e === Bn ? "Wearable" : e ? _e : "Desktop";
|
|
2179
|
+
}, Ht = "https?://(.*)", vi = ["gclid", "gclsrc", "dclid", "gbraid", "wbraid", "fbclid", "msclkid", "twclid", "li_fat_id", "igshid", "ttclid", "rdt_cid", "epik", "qclid", "sccid", "irclid", "_kx"], pl = hi(["utm_source", "utm_medium", "utm_campaign", "utm_content", "utm_term", "gad_source", "mc_cid"], vi), Pr = "<masked>";
|
|
2180
|
+
function to(r, e, t) {
|
|
2177
2181
|
if (!k) return {};
|
|
2178
2182
|
var i = e ? hi([], vi, t || []) : [];
|
|
2179
|
-
return
|
|
2183
|
+
return io(br(k.URL, i, Pr), r);
|
|
2180
2184
|
}
|
|
2181
|
-
function
|
|
2182
|
-
var t =
|
|
2185
|
+
function io(r, e) {
|
|
2186
|
+
var t = pl.concat(e || []), i = {};
|
|
2183
2187
|
return $(t, function(s) {
|
|
2184
2188
|
var n = ri(r, s);
|
|
2185
2189
|
i[s] = n || null;
|
|
2186
2190
|
}), i;
|
|
2187
2191
|
}
|
|
2188
|
-
function
|
|
2192
|
+
function ro(r) {
|
|
2189
2193
|
var e = function(n) {
|
|
2190
|
-
return n ? n.search(
|
|
2194
|
+
return n ? n.search(Ht + "google.([^/?]*)") === 0 ? "google" : n.search(Ht + "bing.com") === 0 ? "bing" : n.search(Ht + "yahoo.com") === 0 ? "yahoo" : n.search(Ht + "duckduckgo.com") === 0 ? "duckduckgo" : null : null;
|
|
2191
2195
|
}(r), t = e != "yahoo" ? "q" : "p", i = {};
|
|
2192
|
-
if (!
|
|
2196
|
+
if (!He(e)) {
|
|
2193
2197
|
i.$search_engine = e;
|
|
2194
2198
|
var s = k ? ri(k.referrer, t) : "";
|
|
2195
2199
|
s.length && (i.ph_keyword = s);
|
|
2196
2200
|
}
|
|
2197
2201
|
return i;
|
|
2198
2202
|
}
|
|
2199
|
-
function
|
|
2203
|
+
function Is() {
|
|
2200
2204
|
return navigator.language || navigator.userLanguage;
|
|
2201
2205
|
}
|
|
2202
|
-
function
|
|
2206
|
+
function so() {
|
|
2203
2207
|
return (k == null ? void 0 : k.referrer) || "$direct";
|
|
2204
2208
|
}
|
|
2205
|
-
function
|
|
2209
|
+
function no(r, e) {
|
|
2206
2210
|
var t = r ? hi([], vi, e || []) : [], i = te == null ? void 0 : te.href.substring(0, 1e3);
|
|
2207
|
-
return { r:
|
|
2211
|
+
return { r: so().substring(0, 1e3), u: i ? br(i, t, Pr) : void 0 };
|
|
2208
2212
|
}
|
|
2209
|
-
function
|
|
2213
|
+
function oo(r) {
|
|
2210
2214
|
var e, { r: t, u: i } = r, s = { $referrer: t, $referring_domain: t == null ? void 0 : t == "$direct" ? "$direct" : (e = dt(t)) === null || e === void 0 ? void 0 : e.host };
|
|
2211
2215
|
if (i) {
|
|
2212
2216
|
s.$current_url = i;
|
|
2213
2217
|
var n = dt(i);
|
|
2214
2218
|
s.$host = n == null ? void 0 : n.host, s.$pathname = n == null ? void 0 : n.pathname;
|
|
2215
|
-
var o =
|
|
2216
|
-
|
|
2219
|
+
var o = io(i);
|
|
2220
|
+
U(s, o);
|
|
2217
2221
|
}
|
|
2218
2222
|
if (t) {
|
|
2219
|
-
var a =
|
|
2220
|
-
|
|
2223
|
+
var a = ro(t);
|
|
2224
|
+
U(s, a);
|
|
2221
2225
|
}
|
|
2222
2226
|
return s;
|
|
2223
2227
|
}
|
|
2224
|
-
function
|
|
2228
|
+
function ao() {
|
|
2225
2229
|
try {
|
|
2226
2230
|
return Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
2227
2231
|
} catch {
|
|
2228
2232
|
return;
|
|
2229
2233
|
}
|
|
2230
2234
|
}
|
|
2231
|
-
function
|
|
2235
|
+
function gl() {
|
|
2232
2236
|
try {
|
|
2233
2237
|
return (/* @__PURE__ */ new Date()).getTimezoneOffset();
|
|
2234
2238
|
} catch {
|
|
2235
2239
|
return;
|
|
2236
2240
|
}
|
|
2237
2241
|
}
|
|
2238
|
-
function
|
|
2239
|
-
if (!
|
|
2242
|
+
function vl(r, e) {
|
|
2243
|
+
if (!K) return {};
|
|
2240
2244
|
var t, i = r ? hi([], vi, e || []) : [], [s, n] = function(o) {
|
|
2241
|
-
for (var a = 0; a <
|
|
2242
|
-
var [l, c] =
|
|
2245
|
+
for (var a = 0; a < Cs.length; a++) {
|
|
2246
|
+
var [l, c] = Cs[a], d = l.exec(o), u = d && (ce(c) ? c(d, o) : c);
|
|
2243
2247
|
if (u) return u;
|
|
2244
2248
|
}
|
|
2245
2249
|
return ["", ""];
|
|
2246
|
-
}(
|
|
2247
|
-
return
|
|
2250
|
+
}(K);
|
|
2251
|
+
return U(Xt({ $os: s, $os_version: n, $browser: Xn(K, navigator.vendor), $device: Zn(K), $device_type: eo(K), $timezone: ao(), $timezone_offset: gl() }), { $current_url: br(te == null ? void 0 : te.href, i, Pr), $host: te == null ? void 0 : te.host, $pathname: te == null ? void 0 : te.pathname, $raw_user_agent: K.length > 1e3 ? K.substring(0, 997) + "..." : K, $browser_version: hl(K, navigator.vendor), $browser_language: Is(), $browser_language_prefix: (t = Is(), typeof t == "string" ? t.split("-")[0] : void 0), $screen_height: g == null ? void 0 : g.screen.height, $screen_width: g == null ? void 0 : g.screen.width, $viewport_height: g == null ? void 0 : g.innerHeight, $viewport_width: g == null ? void 0 : g.innerWidth, $lib: "web", $lib_version: Ce.LIB_VERSION, $insert_id: Math.random().toString(36).substring(2, 10) + Math.random().toString(36).substring(2, 10), $time: Date.now() / 1e3 });
|
|
2248
2252
|
}
|
|
2249
|
-
var dr, ye = Q("[FeatureFlags]"),
|
|
2253
|
+
var dr, ye = Q("[FeatureFlags]"), Li = "$active_feature_flags", rt = "$override_feature_flags", Ps = "$feature_flag_payloads", bt = "$override_feature_flag_payloads", Ts = "$feature_flag_request_id", Fs = (r) => {
|
|
2250
2254
|
var e = {};
|
|
2251
2255
|
for (var [t, i] of zt(r || {})) i && (e[t] = i);
|
|
2252
2256
|
return e;
|
|
2253
|
-
},
|
|
2257
|
+
}, fl = (r) => {
|
|
2254
2258
|
var e = r.flags;
|
|
2255
2259
|
return e ? (r.featureFlags = Object.fromEntries(Object.keys(e).map((t) => {
|
|
2256
2260
|
var i;
|
|
@@ -2266,7 +2270,7 @@ var dr, ye = Q("[FeatureFlags]"), Ai = "$active_feature_flags", rt = "$override_
|
|
|
2266
2270
|
(function(r) {
|
|
2267
2271
|
r.FeatureFlags = "feature_flags", r.Recordings = "recordings";
|
|
2268
2272
|
})(dr || (dr = {}));
|
|
2269
|
-
class
|
|
2273
|
+
class ml {
|
|
2270
2274
|
constructor(e) {
|
|
2271
2275
|
w(this, "_override_warning", !1), w(this, "_hasLoadedFlags", !1), w(this, "_requestInFlight", !1), w(this, "_reloadingDisabled", !1), w(this, "_additionalReloadRequested", !1), w(this, "_decideCalled", !1), w(this, "_flagsLoadedFromRemote", !1), this._instance = e, this.featureFlagEventHandlers = [];
|
|
2272
2276
|
}
|
|
@@ -2286,7 +2290,7 @@ class fl {
|
|
|
2286
2290
|
getFlagsWithDetails() {
|
|
2287
2291
|
var e = this._instance.get_property(Vi), t = this._instance.get_property(rt), i = this._instance.get_property(bt);
|
|
2288
2292
|
if (!i && !t) return e || {};
|
|
2289
|
-
var s =
|
|
2293
|
+
var s = U({}, e || {}), n = [.../* @__PURE__ */ new Set([...Object.keys(i || {}), ...Object.keys(t || {})])];
|
|
2290
2294
|
for (var o of n) {
|
|
2291
2295
|
var a, l, c = s[o], d = t == null ? void 0 : t[o], u = S(d) ? (a = c == null ? void 0 : c.enabled) !== null && a !== void 0 && a : !!d, h = S(d) ? c.variant : typeof d == "string" ? d : void 0, _ = i == null ? void 0 : i[o], p = f(f({}, c), {}, { enabled: u, variant: u ? h ?? (c == null ? void 0 : c.variant) : void 0 });
|
|
2292
2296
|
u !== (c == null ? void 0 : c.enabled) && (p.original_enabled = c == null ? void 0 : c.enabled), h !== (c == null ? void 0 : c.variant) && (p.original_variant = c == null ? void 0 : c.variant), _ && (p.metadata = f(f({}, c == null ? void 0 : c.metadata), {}, { payload: _, original_payload: c == null || (l = c.metadata) === null || l === void 0 ? void 0 : l.payload })), s[o] = p;
|
|
@@ -2296,13 +2300,13 @@ class fl {
|
|
|
2296
2300
|
getFlagVariants() {
|
|
2297
2301
|
var e = this._instance.get_property(ot), t = this._instance.get_property(rt);
|
|
2298
2302
|
if (!t) return e || {};
|
|
2299
|
-
for (var i =
|
|
2303
|
+
for (var i = U({}, e), s = Object.keys(t), n = 0; n < s.length; n++) i[s[n]] = t[s[n]];
|
|
2300
2304
|
return this._override_warning || (ye.warn(" Overriding feature flags!", { enabledFlags: e, overriddenFlags: t, finalFlags: i }), this._override_warning = !0), i;
|
|
2301
2305
|
}
|
|
2302
2306
|
getFlagPayloads() {
|
|
2303
|
-
var e = this._instance.get_property(
|
|
2307
|
+
var e = this._instance.get_property(Ps), t = this._instance.get_property(bt);
|
|
2304
2308
|
if (!t) return e || {};
|
|
2305
|
-
for (var i =
|
|
2309
|
+
for (var i = U({}, e || {}), s = Object.keys(t), n = 0; n < s.length; n++) i[s[n]] = t[s[n]];
|
|
2306
2310
|
return this._override_warning || (ye.warn(" Overriding feature flag payloads!", { flagPayloads: e, overriddenPayloads: t, finalPayloads: i }), this._override_warning = !0), i;
|
|
2307
2311
|
}
|
|
2308
2312
|
reloadFeatureFlags() {
|
|
@@ -2326,10 +2330,10 @@ class fl {
|
|
|
2326
2330
|
var t;
|
|
2327
2331
|
if (this._clearDebouncer(), !this._instance.config.advanced_disable_decide) if (this._requestInFlight) this._additionalReloadRequested = !0;
|
|
2328
2332
|
else {
|
|
2329
|
-
var i = { token: this._instance.config.token, distinct_id: this._instance.get_distinct_id(), groups: this._instance.getGroups(), $anon_distinct_id: this.$anon_distinct_id, person_properties: f(f({}, ((t = this._instance.persistence) === null || t === void 0 ? void 0 : t.get_initial_props()) || {}), this._instance.get_property(Et) || {}), group_properties: this._instance.get_property(
|
|
2333
|
+
var i = { token: this._instance.config.token, distinct_id: this._instance.get_distinct_id(), groups: this._instance.getGroups(), $anon_distinct_id: this.$anon_distinct_id, person_properties: f(f({}, ((t = this._instance.persistence) === null || t === void 0 ? void 0 : t.get_initial_props()) || {}), this._instance.get_property(Et) || {}), group_properties: this._instance.get_property(Ke) };
|
|
2330
2334
|
(e != null && e.disableFlags || this._instance.config.advanced_disable_feature_flags) && (i.disable_flags = !0);
|
|
2331
2335
|
var s = this._instance.config.__preview_flags_v2 && this._instance.config.__preview_remote_config;
|
|
2332
|
-
s && (i.timezone =
|
|
2336
|
+
s && (i.timezone = ao()), this._requestInFlight = !0, this._instance._send_request({ method: "POST", url: this._instance.requestRouter.endpointFor("api", s ? "/flags/?v=2" : "/decide/?v=4"), data: i, compression: this._instance.config.disable_compression ? void 0 : ge.Base64, timeout: this._instance.config.feature_flag_request_timeout_ms, callback: (n) => {
|
|
2333
2337
|
var o, a, l, c = !0;
|
|
2334
2338
|
n.statusCode === 200 && (this._additionalReloadRequested || (this.$anon_distinct_id = void 0), c = !1), this._requestInFlight = !1, this._decideCalled || (this._decideCalled = !0, this._instance._onRemoteConfig((l = n.json) !== null && l !== void 0 ? l : {})), i.disable_flags && !this._additionalReloadRequested || (this._flagsLoadedFromRemote = !c, n.json && (o = n.json.quotaLimited) !== null && o !== void 0 && o.includes(dr.FeatureFlags) ? ye.warn("You have hit your feature flags quota limit, and will not be able to load feature flags until the quota is reset. Please visit https://posthog.com/docs/billing/limits-alerts to learn more.") : (this.receivedFeatureFlags((a = n.json) !== null && a !== void 0 ? a : {}, c), this._additionalReloadRequested && (this._additionalReloadRequested = !1, this._callDecideEndpoint())));
|
|
2335
2339
|
} });
|
|
@@ -2338,7 +2342,7 @@ class fl {
|
|
|
2338
2342
|
getFeatureFlag(e) {
|
|
2339
2343
|
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
2340
2344
|
if (this._hasLoadedFlags || this.getFlags() && this.getFlags().length > 0) {
|
|
2341
|
-
var i = this.getFlagVariants()[e], s = "".concat(i), n = this._instance.get_property(
|
|
2345
|
+
var i = this.getFlagVariants()[e], s = "".concat(i), n = this._instance.get_property(Ts) || void 0, o = this._instance.get_property(ei) || {};
|
|
2342
2346
|
if ((t.send_event || !("send_event" in t)) && (!(e in o) || !o[e].includes(s))) {
|
|
2343
2347
|
var a, l, c, d, u, h, _, p, v, b, y;
|
|
2344
2348
|
D(o[e]) ? o[e].push(s) : o[e] = [s], (a = this._instance.persistence) === null || a === void 0 || a.register({ [ei]: o });
|
|
@@ -2380,17 +2384,17 @@ class fl {
|
|
|
2380
2384
|
this._hasLoadedFlags = !0;
|
|
2381
2385
|
var i = this.getFlagVariants(), s = this.getFlagPayloads(), n = this.getFlagsWithDetails();
|
|
2382
2386
|
(function(o, a) {
|
|
2383
|
-
var l = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, c = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {}, d = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : {}, u =
|
|
2387
|
+
var l = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, c = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {}, d = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : {}, u = fl(o), h = u.flags, _ = u.featureFlags, p = u.featureFlagPayloads;
|
|
2384
2388
|
if (_) {
|
|
2385
2389
|
var v = o.requestId;
|
|
2386
2390
|
if (D(_)) {
|
|
2387
2391
|
ye.warn("v1 of the feature flags endpoint is deprecated. Please use the latest version.");
|
|
2388
2392
|
var b = {};
|
|
2389
2393
|
if (_) for (var y = 0; y < _.length; y++) b[_[y]] = !0;
|
|
2390
|
-
a && a.register({ [
|
|
2394
|
+
a && a.register({ [Li]: _, [ot]: b });
|
|
2391
2395
|
} else {
|
|
2392
2396
|
var m = _, E = p, C = h;
|
|
2393
|
-
o.errorsWhileComputingFlags && (m = f(f({}, l), m), E = f(f({}, c), E), C = f(f({}, d), C)), a && a.register(f({ [
|
|
2397
|
+
o.errorsWhileComputingFlags && (m = f(f({}, l), m), E = f(f({}, c), E), C = f(f({}, d), C)), a && a.register(f({ [Li]: Object.keys(Fs(m)), [ot]: m || {}, [Ps]: E || {}, [Vi]: C || {} }, v ? { [Ts]: v } : {}));
|
|
2394
2398
|
}
|
|
2395
2399
|
}
|
|
2396
2400
|
})(e, this._instance.persistence, i, s, n), this._fireFeatureFlagsCallbacks(t);
|
|
@@ -2427,7 +2431,7 @@ class fl {
|
|
|
2427
2431
|
var i, s = (this._instance.get_property(Wt) || []).find((l) => l.flagKey === e), n = { ["$feature_enrollment/".concat(e)]: t }, o = { $feature_flag: e, $feature_enrollment: t, $set: n };
|
|
2428
2432
|
s && (o.$early_access_feature_name = s.name), this._instance.capture("$feature_enrollment_update", o), this.setPersonPropertiesForFlags(n, !1);
|
|
2429
2433
|
var a = f(f({}, this.getFlagVariants()), {}, { [e]: t });
|
|
2430
|
-
(i = this._instance.persistence) === null || i === void 0 || i.register({ [
|
|
2434
|
+
(i = this._instance.persistence) === null || i === void 0 || i.register({ [Li]: Object.keys(Fs(a)), [ot]: a }), this._fireFeatureFlagsCallbacks();
|
|
2431
2435
|
}
|
|
2432
2436
|
getEarlyAccessFeatures(e) {
|
|
2433
2437
|
var t = arguments.length > 1 && arguments[1] !== void 0 && arguments[1], i = arguments.length > 2 ? arguments[2] : void 0, s = this._instance.get_property(Wt), n = i ? "&".concat(i.map((o) => "stage=".concat(o)).join("&")) : "";
|
|
@@ -2456,19 +2460,19 @@ class fl {
|
|
|
2456
2460
|
this._instance.unregister(Et);
|
|
2457
2461
|
}
|
|
2458
2462
|
setGroupPropertiesForFlags(e) {
|
|
2459
|
-
var t = !(arguments.length > 1 && arguments[1] !== void 0) || arguments[1], i = this._instance.get_property(
|
|
2463
|
+
var t = !(arguments.length > 1 && arguments[1] !== void 0) || arguments[1], i = this._instance.get_property(Ke) || {};
|
|
2460
2464
|
Object.keys(i).length !== 0 && Object.keys(i).forEach((s) => {
|
|
2461
2465
|
i[s] = f(f({}, i[s]), e[s]), delete e[s];
|
|
2462
|
-
}), this._instance.register({ [
|
|
2466
|
+
}), this._instance.register({ [Ke]: f(f({}, i), e) }), t && this._instance.reloadFeatureFlags();
|
|
2463
2467
|
}
|
|
2464
2468
|
resetGroupPropertiesForFlags(e) {
|
|
2465
2469
|
if (e) {
|
|
2466
|
-
var t = this._instance.get_property(
|
|
2467
|
-
this._instance.register({ [
|
|
2468
|
-
} else this._instance.unregister(
|
|
2470
|
+
var t = this._instance.get_property(Ke) || {};
|
|
2471
|
+
this._instance.register({ [Ke]: f(f({}, t), {}, { [e]: {} }) });
|
|
2472
|
+
} else this._instance.unregister(Ke);
|
|
2469
2473
|
}
|
|
2470
2474
|
}
|
|
2471
|
-
var
|
|
2475
|
+
var yl = ["cookie", "localstorage", "localstorage+cookie", "sessionstorage", "memory"];
|
|
2472
2476
|
class Mi {
|
|
2473
2477
|
constructor(e) {
|
|
2474
2478
|
this._config = e, this.props = {}, this.campaign_params_saved = !1, this.name = ((t) => {
|
|
@@ -2477,15 +2481,15 @@ class Mi {
|
|
|
2477
2481
|
})(e), this.storage = this._buildStorage(e), this.load(), e.debug && x.info("Persistence loaded", e.persistence, f({}, this.props)), this.update_config(e, e), this.save();
|
|
2478
2482
|
}
|
|
2479
2483
|
_buildStorage(e) {
|
|
2480
|
-
|
|
2484
|
+
yl.indexOf(e.persistence.toLowerCase()) === -1 && (x.critical("Unknown persistence type " + e.persistence + "; falling back to localStorage+cookie"), e.persistence = "localStorage+cookie");
|
|
2481
2485
|
var t = e.persistence.toLowerCase();
|
|
2482
|
-
return t === "localstorage" &&
|
|
2486
|
+
return t === "localstorage" && j.is_supported() ? j : t === "localstorage+cookie" && Mt.is_supported() ? Mt : t === "sessionstorage" && W.is_supported() ? W : t === "memory" ? da : t === "cookie" ? Pe : Mt.is_supported() ? Mt : Pe;
|
|
2483
2487
|
}
|
|
2484
2488
|
properties() {
|
|
2485
2489
|
var e = {};
|
|
2486
2490
|
return $(this.props, function(t, i) {
|
|
2487
2491
|
if (i === ot && q(t)) for (var s = Object.keys(t), n = 0; n < s.length; n++) e["$feature/".concat(s[n])] = t[s[n]];
|
|
2488
|
-
else a = i, l = !1, (
|
|
2492
|
+
else a = i, l = !1, (He(o = zo) ? l : Nr && o.indexOf === Nr ? o.indexOf(a) != -1 : ($(o, function(c) {
|
|
2489
2493
|
if (l || (l = c === a)) return Qt;
|
|
2490
2494
|
}), l)) || (e[i] = t);
|
|
2491
2495
|
var o, a, l;
|
|
@@ -2494,7 +2498,7 @@ class Mi {
|
|
|
2494
2498
|
load() {
|
|
2495
2499
|
if (!this.disabled) {
|
|
2496
2500
|
var e = this.storage.parse(this.name);
|
|
2497
|
-
e && (this.props =
|
|
2501
|
+
e && (this.props = U({}, e));
|
|
2498
2502
|
}
|
|
2499
2503
|
}
|
|
2500
2504
|
save() {
|
|
@@ -2531,20 +2535,20 @@ class Mi {
|
|
|
2531
2535
|
}
|
|
2532
2536
|
update_campaign_params() {
|
|
2533
2537
|
if (!this.campaign_params_saved) {
|
|
2534
|
-
var e =
|
|
2538
|
+
var e = to(this._config.custom_campaign_params, this._config.mask_personal_data_properties, this._config.custom_personal_data_properties);
|
|
2535
2539
|
nt(Xt(e)) || this.register(e), this.campaign_params_saved = !0;
|
|
2536
2540
|
}
|
|
2537
2541
|
}
|
|
2538
2542
|
update_search_keyword() {
|
|
2539
2543
|
var e;
|
|
2540
|
-
this.register((e = k == null ? void 0 : k.referrer) ?
|
|
2544
|
+
this.register((e = k == null ? void 0 : k.referrer) ? ro(e) : {});
|
|
2541
2545
|
}
|
|
2542
2546
|
update_referrer_info() {
|
|
2543
2547
|
var e;
|
|
2544
|
-
this.register_once({ $referrer:
|
|
2548
|
+
this.register_once({ $referrer: so(), $referring_domain: k != null && k.referrer && ((e = dt(k.referrer)) === null || e === void 0 ? void 0 : e.host) || "$direct" }, void 0);
|
|
2545
2549
|
}
|
|
2546
2550
|
set_initial_person_info() {
|
|
2547
|
-
this.props[Yi] || this.props[Qi] || this.register_once({ [Xi]:
|
|
2551
|
+
this.props[Yi] || this.props[Qi] || this.register_once({ [Xi]: no(this._config.mask_personal_data_properties, this._config.custom_personal_data_properties) }, void 0);
|
|
2548
2552
|
}
|
|
2549
2553
|
get_referrer_info() {
|
|
2550
2554
|
return Xt({ $referrer: this.props.$referrer, $referring_domain: this.props.$referring_domain });
|
|
@@ -2554,15 +2558,15 @@ class Mi {
|
|
|
2554
2558
|
$([Qi, Yi], (o) => {
|
|
2555
2559
|
var a = this.props[o];
|
|
2556
2560
|
a && $(a, function(l, c) {
|
|
2557
|
-
e["$initial_" +
|
|
2561
|
+
e["$initial_" + Hi(c)] = l;
|
|
2558
2562
|
});
|
|
2559
2563
|
});
|
|
2560
2564
|
var t, i, s = this.props[Xi];
|
|
2561
2565
|
if (s) {
|
|
2562
|
-
var n = (t =
|
|
2563
|
-
i["$initial_".concat(
|
|
2566
|
+
var n = (t = oo(s), i = {}, $(t, function(o, a) {
|
|
2567
|
+
i["$initial_".concat(Hi(a))] = o;
|
|
2564
2568
|
}), i);
|
|
2565
|
-
|
|
2569
|
+
U(e, n);
|
|
2566
2570
|
}
|
|
2567
2571
|
return e;
|
|
2568
2572
|
}
|
|
@@ -2604,17 +2608,17 @@ class Mi {
|
|
|
2604
2608
|
this.props[e] = t, this.save();
|
|
2605
2609
|
}
|
|
2606
2610
|
}
|
|
2607
|
-
var
|
|
2611
|
+
var lo, B, uo, Je, Rs, co, _r, _o, $s, hr, Os, As, Ls, Ms, pr = {}, ho = [], bl = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, Tr = Array.isArray;
|
|
2608
2612
|
function De(r, e) {
|
|
2609
2613
|
for (var t in e) r[t] = e[t];
|
|
2610
2614
|
return r;
|
|
2611
2615
|
}
|
|
2612
|
-
function
|
|
2616
|
+
function po(r) {
|
|
2613
2617
|
var e = r.parentNode;
|
|
2614
2618
|
e && e.removeChild(r);
|
|
2615
2619
|
}
|
|
2616
2620
|
function Di(r, e, t, i, s) {
|
|
2617
|
-
var n = { type: r, props: e, key: t, ref: i, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, constructor: void 0, __v: s ?? ++
|
|
2621
|
+
var n = { type: r, props: e, key: t, ref: i, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, constructor: void 0, __v: s ?? ++uo, __i: -1, __u: 0 };
|
|
2618
2622
|
return s == null && B.vnode != null && B.vnode(n), n;
|
|
2619
2623
|
}
|
|
2620
2624
|
function Fr(r) {
|
|
@@ -2628,43 +2632,43 @@ function pt(r, e) {
|
|
|
2628
2632
|
for (var t; e < r.__k.length; e++) if ((t = r.__k[e]) != null && t.__e != null) return t.__e;
|
|
2629
2633
|
return typeof r.type == "function" ? pt(r) : null;
|
|
2630
2634
|
}
|
|
2631
|
-
function
|
|
2635
|
+
function go(r) {
|
|
2632
2636
|
var e, t;
|
|
2633
2637
|
if ((r = r.__) != null && r.__c != null) {
|
|
2634
2638
|
for (r.__e = r.__c.base = null, e = 0; e < r.__k.length; e++) if ((t = r.__k[e]) != null && t.__e != null) {
|
|
2635
2639
|
r.__e = r.__c.base = t.__e;
|
|
2636
2640
|
break;
|
|
2637
2641
|
}
|
|
2638
|
-
return
|
|
2642
|
+
return go(r);
|
|
2639
2643
|
}
|
|
2640
2644
|
}
|
|
2641
2645
|
function gr(r) {
|
|
2642
|
-
(!r.__d && (r.__d = !0) &&
|
|
2646
|
+
(!r.__d && (r.__d = !0) && Je.push(r) && !ui.__r++ || Rs !== B.debounceRendering) && ((Rs = B.debounceRendering) || co)(ui);
|
|
2643
2647
|
}
|
|
2644
2648
|
function ui() {
|
|
2645
2649
|
var r, e, t, i, s, n, o, a, l;
|
|
2646
|
-
for (
|
|
2650
|
+
for (Je.sort(_r); r = Je.shift(); ) r.__d && (e = Je.length, i = void 0, n = (s = (t = r).__v).__e, a = [], l = [], (o = t.__P) && ((i = De({}, s)).__v = s.__v + 1, B.vnode && B.vnode(i), mo(o, i, s, t.__n, o.ownerSVGElement !== void 0, 32 & s.__u ? [n] : null, a, n ?? pt(s), !!(32 & s.__u), l), i.__.__k[i.__i] = i, kl(a, i, l), i.__e != n && go(i)), Je.length > e && Je.sort(_r));
|
|
2647
2651
|
ui.__r = 0;
|
|
2648
2652
|
}
|
|
2649
|
-
function
|
|
2650
|
-
var u, h, _, p, v, b = i && i.__k ||
|
|
2651
|
-
for (t.__d = l,
|
|
2653
|
+
function vo(r, e, t, i, s, n, o, a, l, c, d) {
|
|
2654
|
+
var u, h, _, p, v, b = i && i.__k || ho, y = e.length;
|
|
2655
|
+
for (t.__d = l, wl(t, e, b), l = t.__d, u = 0; u < y; u++) (_ = t.__k[u]) != null && typeof _ != "boolean" && typeof _ != "function" && (h = _.__i === -1 ? pr : b[_.__i] || pr, _.__i = u, mo(r, _, h, s, n, o, a, l, c, d), p = _.__e, _.ref && h.ref != _.ref && (h.ref && Rr(h.ref, null, _), d.push(_.ref, _.__c || p, _)), v == null && p != null && (v = p), 65536 & _.__u || h.__k === _.__k ? l = fo(_, l, r) : typeof _.type == "function" && _.__d !== void 0 ? l = _.__d : p && (l = p.nextSibling), _.__d = void 0, _.__u &= -196609);
|
|
2652
2656
|
t.__d = l, t.__e = v;
|
|
2653
2657
|
}
|
|
2654
|
-
function
|
|
2658
|
+
function wl(r, e, t) {
|
|
2655
2659
|
var i, s, n, o, a, l = e.length, c = t.length, d = c, u = 0;
|
|
2656
|
-
for (r.__k = [], i = 0; i < l; i++) (s = r.__k[i] = (s = e[i]) == null || typeof s == "boolean" || typeof s == "function" ? null : typeof s == "string" || typeof s == "number" || typeof s == "bigint" || s.constructor == String ? Di(null, s, null, null, s) : Tr(s) ? Di(Fr, { children: s }, null, null, null) : s.constructor === void 0 && s.__b > 0 ? Di(s.type, s.props, s.key, s.ref ? s.ref : null, s.__v) : s) != null ? (s.__ = r, s.__b = r.__b + 1, a =
|
|
2660
|
+
for (r.__k = [], i = 0; i < l; i++) (s = r.__k[i] = (s = e[i]) == null || typeof s == "boolean" || typeof s == "function" ? null : typeof s == "string" || typeof s == "number" || typeof s == "bigint" || s.constructor == String ? Di(null, s, null, null, s) : Tr(s) ? Di(Fr, { children: s }, null, null, null) : s.constructor === void 0 && s.__b > 0 ? Di(s.type, s.props, s.key, s.ref ? s.ref : null, s.__v) : s) != null ? (s.__ = r, s.__b = r.__b + 1, a = Sl(s, t, o = i + u, d), s.__i = a, n = null, a !== -1 && (d--, (n = t[a]) && (n.__u |= 131072)), n == null || n.__v === null ? (a == -1 && u--, typeof s.type != "function" && (s.__u |= 65536)) : a !== o && (a === o + 1 ? u++ : a > o ? d > l - o ? u += a - o : u-- : u = a < o && a == o - 1 ? a - o : 0, a !== i + u && (s.__u |= 65536))) : (n = t[i]) && n.key == null && n.__e && (n.__e == r.__d && (r.__d = pt(n)), vr(n, n, !1), t[i] = null, d--);
|
|
2657
2661
|
if (d) for (i = 0; i < c; i++) (n = t[i]) != null && (131072 & n.__u) == 0 && (n.__e == r.__d && (r.__d = pt(n)), vr(n, n));
|
|
2658
2662
|
}
|
|
2659
|
-
function
|
|
2663
|
+
function fo(r, e, t) {
|
|
2660
2664
|
var i, s;
|
|
2661
2665
|
if (typeof r.type == "function") {
|
|
2662
|
-
for (i = r.__k, s = 0; i && s < i.length; s++) i[s] && (i[s].__ = r, e =
|
|
2666
|
+
for (i = r.__k, s = 0; i && s < i.length; s++) i[s] && (i[s].__ = r, e = fo(i[s], e, t));
|
|
2663
2667
|
return e;
|
|
2664
2668
|
}
|
|
2665
2669
|
return r.__e != e && (t.insertBefore(r.__e, e || null), e = r.__e), e && e.nextSibling;
|
|
2666
2670
|
}
|
|
2667
|
-
function
|
|
2671
|
+
function Sl(r, e, t, i) {
|
|
2668
2672
|
var s = r.key, n = r.type, o = t - 1, a = t + 1, l = e[t];
|
|
2669
2673
|
if (l === null || l && s == l.key && n === l.type) return t;
|
|
2670
2674
|
if (i > (l != null && (131072 & l.__u) == 0 ? 1 : 0)) for (; o >= 0 || a < e.length; ) {
|
|
@@ -2679,17 +2683,17 @@ function wl(r, e, t, i) {
|
|
|
2679
2683
|
}
|
|
2680
2684
|
return -1;
|
|
2681
2685
|
}
|
|
2682
|
-
function
|
|
2683
|
-
e[0] === "-" ? r.setProperty(e, t ?? "") : r[e] = t == null ? "" : typeof t != "number" ||
|
|
2686
|
+
function Ds(r, e, t) {
|
|
2687
|
+
e[0] === "-" ? r.setProperty(e, t ?? "") : r[e] = t == null ? "" : typeof t != "number" || bl.test(e) ? t : t + "px";
|
|
2684
2688
|
}
|
|
2685
|
-
function
|
|
2689
|
+
function jt(r, e, t, i, s) {
|
|
2686
2690
|
var n;
|
|
2687
2691
|
e: if (e === "style") if (typeof t == "string") r.style.cssText = t;
|
|
2688
2692
|
else {
|
|
2689
|
-
if (typeof i == "string" && (r.style.cssText = i = ""), i) for (e in i) t && e in t ||
|
|
2690
|
-
if (t) for (e in t) i && t[e] === i[e] ||
|
|
2693
|
+
if (typeof i == "string" && (r.style.cssText = i = ""), i) for (e in i) t && e in t || Ds(r.style, e, "");
|
|
2694
|
+
if (t) for (e in t) i && t[e] === i[e] || Ds(r.style, e, t[e]);
|
|
2691
2695
|
}
|
|
2692
|
-
else if (e[0] === "o" && e[1] === "n") n = e !== (e = e.replace(/(PointerCapture)$|Capture$/, "$1")), e = e.toLowerCase() in r ? e.toLowerCase().slice(2) : e.slice(2), r.l || (r.l = {}), r.l[e + n] = t, t ? i ? t.u = i.u : (t.u = Date.now(), r.addEventListener(e, n ?
|
|
2696
|
+
else if (e[0] === "o" && e[1] === "n") n = e !== (e = e.replace(/(PointerCapture)$|Capture$/, "$1")), e = e.toLowerCase() in r ? e.toLowerCase().slice(2) : e.slice(2), r.l || (r.l = {}), r.l[e + n] = t, t ? i ? t.u = i.u : (t.u = Date.now(), r.addEventListener(e, n ? Ns : qs, n)) : r.removeEventListener(e, n ? Ns : qs, n);
|
|
2693
2697
|
else {
|
|
2694
2698
|
if (s) e = e.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s");
|
|
2695
2699
|
else if (e !== "width" && e !== "height" && e !== "href" && e !== "list" && e !== "form" && e !== "tabIndex" && e !== "download" && e !== "rowSpan" && e !== "colSpan" && e !== "role" && e in r) try {
|
|
@@ -2700,22 +2704,22 @@ function Ut(r, e, t, i, s) {
|
|
|
2700
2704
|
typeof t == "function" || (t == null || t === !1 && e[4] !== "-" ? r.removeAttribute(e) : r.setAttribute(e, t));
|
|
2701
2705
|
}
|
|
2702
2706
|
}
|
|
2703
|
-
function
|
|
2707
|
+
function qs(r) {
|
|
2704
2708
|
var e = this.l[r.type + !1];
|
|
2705
2709
|
if (r.t) {
|
|
2706
2710
|
if (r.t <= e.u) return;
|
|
2707
2711
|
} else r.t = Date.now();
|
|
2708
2712
|
return e(B.event ? B.event(r) : r);
|
|
2709
2713
|
}
|
|
2710
|
-
function
|
|
2714
|
+
function Ns(r) {
|
|
2711
2715
|
return this.l[r.type + !0](B.event ? B.event(r) : r);
|
|
2712
2716
|
}
|
|
2713
|
-
function
|
|
2714
|
-
var d, u, h, _, p, v, b, y, m, E, C, T, O,
|
|
2717
|
+
function mo(r, e, t, i, s, n, o, a, l, c) {
|
|
2718
|
+
var d, u, h, _, p, v, b, y, m, E, C, T, O, A, P, M = e.type;
|
|
2715
2719
|
if (e.constructor !== void 0) return null;
|
|
2716
2720
|
128 & t.__u && (l = !!(32 & t.__u), n = [a = e.__e = t.__e]), (d = B.__b) && d(e);
|
|
2717
2721
|
e: if (typeof M == "function") try {
|
|
2718
|
-
if (y = e.props, m = (d = M.contextType) && i[d.__c], E = d ? m ? m.props.value : d.__ : i, t.__c ? b = (u = e.__c = t.__c).__ = u.__E : ("prototype" in M && M.prototype.render ? e.__c = u = new M(y, E) : (e.__c = u = new Gt(y, E), u.constructor = M, u.render =
|
|
2722
|
+
if (y = e.props, m = (d = M.contextType) && i[d.__c], E = d ? m ? m.props.value : d.__ : i, t.__c ? b = (u = e.__c = t.__c).__ = u.__E : ("prototype" in M && M.prototype.render ? e.__c = u = new M(y, E) : (e.__c = u = new Gt(y, E), u.constructor = M, u.render = xl), m && m.sub(u), u.props = y, u.state || (u.state = {}), u.context = E, u.__n = i, h = u.__d = !0, u.__h = [], u._sb = []), u.__s == null && (u.__s = u.state), M.getDerivedStateFromProps != null && (u.__s == u.state && (u.__s = De({}, u.__s)), De(u.__s, M.getDerivedStateFromProps(y, u.__s))), _ = u.props, p = u.state, u.__v = e, h) M.getDerivedStateFromProps == null && u.componentWillMount != null && u.componentWillMount(), u.componentDidMount != null && u.__h.push(u.componentDidMount);
|
|
2719
2723
|
else {
|
|
2720
2724
|
if (M.getDerivedStateFromProps == null && y !== _ && u.componentWillReceiveProps != null && u.componentWillReceiveProps(y, E), !u.__e && (u.shouldComponentUpdate != null && u.shouldComponentUpdate(y, u.__s, E) === !1 || e.__v === t.__v)) {
|
|
2721
2725
|
for (e.__v !== t.__v && (u.props = y, u.state = u.__s, u.__d = !1), e.__e = t.__e, e.__k = t.__k, e.__k.forEach(function(z) {
|
|
@@ -2729,19 +2733,19 @@ function fo(r, e, t, i, s, n, o, a, l, c) {
|
|
|
2729
2733
|
});
|
|
2730
2734
|
}
|
|
2731
2735
|
if (u.context = E, u.props = y, u.__P = r, u.__e = !1, T = B.__r, O = 0, "prototype" in M && M.prototype.render) {
|
|
2732
|
-
for (u.state = u.__s, u.__d = !1, T && T(e), d = u.render(u.props, u.state, u.context),
|
|
2736
|
+
for (u.state = u.__s, u.__d = !1, T && T(e), d = u.render(u.props, u.state, u.context), A = 0; A < u._sb.length; A++) u.__h.push(u._sb[A]);
|
|
2733
2737
|
u._sb = [];
|
|
2734
2738
|
} else do
|
|
2735
2739
|
u.__d = !1, T && T(e), d = u.render(u.props, u.state, u.context), u.state = u.__s;
|
|
2736
2740
|
while (u.__d && ++O < 25);
|
|
2737
|
-
u.state = u.__s, u.getChildContext != null && (i = De(De({}, i), u.getChildContext())), h || u.getSnapshotBeforeUpdate == null || (v = u.getSnapshotBeforeUpdate(_, p)),
|
|
2741
|
+
u.state = u.__s, u.getChildContext != null && (i = De(De({}, i), u.getChildContext())), h || u.getSnapshotBeforeUpdate == null || (v = u.getSnapshotBeforeUpdate(_, p)), vo(r, Tr(P = d != null && d.type === Fr && d.key == null ? d.props.children : d) ? P : [P], e, t, i, s, n, o, a, l, c), u.base = e.__e, e.__u &= -161, u.__h.length && o.push(u), b && (u.__E = u.__ = null);
|
|
2738
2742
|
} catch (z) {
|
|
2739
2743
|
e.__v = null, l || n != null ? (e.__e = a, e.__u |= l ? 160 : 32, n[n.indexOf(a)] = null) : (e.__e = t.__e, e.__k = t.__k), B.__e(z, e, t);
|
|
2740
2744
|
}
|
|
2741
|
-
else n == null && e.__v === t.__v ? (e.__k = t.__k, e.__e = t.__e) : e.__e =
|
|
2745
|
+
else n == null && e.__v === t.__v ? (e.__k = t.__k, e.__e = t.__e) : e.__e = El(t.__e, e, t, i, s, n, o, l, c);
|
|
2742
2746
|
(d = B.diffed) && d(e);
|
|
2743
2747
|
}
|
|
2744
|
-
function
|
|
2748
|
+
function kl(r, e, t) {
|
|
2745
2749
|
e.__d = void 0;
|
|
2746
2750
|
for (var i = 0; i < t.length; i++) Rr(t[i], t[++i], t[++i]);
|
|
2747
2751
|
B.__c && B.__c(e, r), r.some(function(s) {
|
|
@@ -2754,7 +2758,7 @@ function Sl(r, e, t) {
|
|
|
2754
2758
|
}
|
|
2755
2759
|
});
|
|
2756
2760
|
}
|
|
2757
|
-
function
|
|
2761
|
+
function El(r, e, t, i, s, n, o, a, l) {
|
|
2758
2762
|
var c, d, u, h, _, p, v, b = t.props, y = e.props, m = e.type;
|
|
2759
2763
|
if (m === "svg" && (s = !0), n != null) {
|
|
2760
2764
|
for (c = 0; c < n.length; c++) if ((_ = n[c]) && "setAttribute" in _ == !!m && (m ? _.localName === m : _.nodeType === 3)) {
|
|
@@ -2768,12 +2772,12 @@ function kl(r, e, t, i, s, n, o, a, l) {
|
|
|
2768
2772
|
}
|
|
2769
2773
|
if (m === null) b === y || a && r.data === y || (r.data = y);
|
|
2770
2774
|
else {
|
|
2771
|
-
if (n = n &&
|
|
2772
|
-
for (c in b) _ = b[c], c == "children" || (c == "dangerouslySetInnerHTML" ? u = _ : c === "key" || c in y ||
|
|
2773
|
-
for (c in y) _ = y[c], c == "children" ? h = _ : c == "dangerouslySetInnerHTML" ? d = _ : c == "value" ? p = _ : c == "checked" ? v = _ : c === "key" || a && typeof _ != "function" || b[c] === _ ||
|
|
2775
|
+
if (n = n && lo.call(r.childNodes), b = t.props || pr, !a && n != null) for (b = {}, c = 0; c < r.attributes.length; c++) b[(_ = r.attributes[c]).name] = _.value;
|
|
2776
|
+
for (c in b) _ = b[c], c == "children" || (c == "dangerouslySetInnerHTML" ? u = _ : c === "key" || c in y || jt(r, c, null, _, s));
|
|
2777
|
+
for (c in y) _ = y[c], c == "children" ? h = _ : c == "dangerouslySetInnerHTML" ? d = _ : c == "value" ? p = _ : c == "checked" ? v = _ : c === "key" || a && typeof _ != "function" || b[c] === _ || jt(r, c, _, b[c], s);
|
|
2774
2778
|
if (d) a || u && (d.__html === u.__html || d.__html === r.innerHTML) || (r.innerHTML = d.__html), e.__k = [];
|
|
2775
|
-
else if (u && (r.innerHTML = ""),
|
|
2776
|
-
a || (c = "value", p !== void 0 && (p !== r[c] || m === "progress" && !p || m === "option" && p !== b[c]) &&
|
|
2779
|
+
else if (u && (r.innerHTML = ""), vo(r, Tr(h) ? h : [h], e, t, i, s && m !== "foreignObject", n, o, n ? n[0] : t.__k && pt(t, 0), a, l), n != null) for (c = n.length; c--; ) n[c] != null && po(n[c]);
|
|
2780
|
+
a || (c = "value", p !== void 0 && (p !== r[c] || m === "progress" && !p || m === "option" && p !== b[c]) && jt(r, c, p, b[c], !1), c = "checked", v !== void 0 && v !== r[c] && jt(r, c, v, b[c], !1));
|
|
2777
2781
|
}
|
|
2778
2782
|
return r;
|
|
2779
2783
|
}
|
|
@@ -2795,38 +2799,38 @@ function vr(r, e, t) {
|
|
|
2795
2799
|
i.base = i.__P = null, r.__c = void 0;
|
|
2796
2800
|
}
|
|
2797
2801
|
if (i = r.__k) for (s = 0; s < i.length; s++) i[s] && vr(i[s], e, t || typeof r.type != "function");
|
|
2798
|
-
t || r.__e == null ||
|
|
2802
|
+
t || r.__e == null || po(r.__e), r.__ = r.__e = r.__d = void 0;
|
|
2799
2803
|
}
|
|
2800
|
-
function
|
|
2804
|
+
function xl(r, e, t) {
|
|
2801
2805
|
return this.constructor(r, t);
|
|
2802
2806
|
}
|
|
2803
|
-
|
|
2807
|
+
lo = ho.slice, B = { __e: function(r, e, t, i) {
|
|
2804
2808
|
for (var s, n, o; e = e.__; ) if ((s = e.__c) && !s.__) try {
|
|
2805
2809
|
if ((n = s.constructor) && n.getDerivedStateFromError != null && (s.setState(n.getDerivedStateFromError(r)), o = s.__d), s.componentDidCatch != null && (s.componentDidCatch(r, i || {}), o = s.__d), o) return s.__E = s;
|
|
2806
2810
|
} catch (a) {
|
|
2807
2811
|
r = a;
|
|
2808
2812
|
}
|
|
2809
2813
|
throw r;
|
|
2810
|
-
} },
|
|
2814
|
+
} }, uo = 0, Gt.prototype.setState = function(r, e) {
|
|
2811
2815
|
var t;
|
|
2812
2816
|
t = this.__s != null && this.__s !== this.state ? this.__s : this.__s = De({}, this.state), typeof r == "function" && (r = r(De({}, t), this.props)), r && De(t, r), r != null && this.__v && (e && this._sb.push(e), gr(this));
|
|
2813
2817
|
}, Gt.prototype.forceUpdate = function(r) {
|
|
2814
2818
|
this.__v && (this.__e = !0, r && this.__h.push(r), gr(this));
|
|
2815
|
-
}, Gt.prototype.render = Fr,
|
|
2819
|
+
}, Gt.prototype.render = Fr, Je = [], co = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, _r = function(r, e) {
|
|
2816
2820
|
return r.__v.__b - e.__v.__b;
|
|
2817
|
-
}, ui.__r = 0,
|
|
2821
|
+
}, ui.__r = 0, _o = 0, function(r) {
|
|
2818
2822
|
r.Button = "button", r.Tab = "tab", r.Selector = "selector";
|
|
2819
|
-
}(
|
|
2823
|
+
}($s || ($s = {})), function(r) {
|
|
2820
2824
|
r.Left = "left", r.Center = "center", r.Right = "right", r.NextToTrigger = "next_to_trigger";
|
|
2821
2825
|
}(hr || (hr = {})), function(r) {
|
|
2822
2826
|
r.Popover = "popover", r.API = "api", r.Widget = "widget";
|
|
2823
|
-
}($s || ($s = {})), function(r) {
|
|
2824
|
-
r.Open = "open", r.MultipleChoice = "multiple_choice", r.SingleChoice = "single_choice", r.Rating = "rating", r.Link = "link";
|
|
2825
2827
|
}(Os || (Os = {})), function(r) {
|
|
2828
|
+
r.Open = "open", r.MultipleChoice = "multiple_choice", r.SingleChoice = "single_choice", r.Rating = "rating", r.Link = "link";
|
|
2829
|
+
}(As || (As = {})), function(r) {
|
|
2826
2830
|
r.NextQuestion = "next_question", r.End = "end", r.ResponseBased = "response_based", r.SpecificQuestion = "specific_question";
|
|
2827
2831
|
}(Ls || (Ls = {})), function(r) {
|
|
2828
2832
|
r.Once = "once", r.Recurring = "recurring", r.Always = "always";
|
|
2829
|
-
}(
|
|
2833
|
+
}(Ms || (Ms = {}));
|
|
2830
2834
|
var gt = function(r, e) {
|
|
2831
2835
|
if (!function(t) {
|
|
2832
2836
|
try {
|
|
@@ -2841,13 +2845,13 @@ var gt = function(r, e) {
|
|
|
2841
2845
|
} catch {
|
|
2842
2846
|
return !1;
|
|
2843
2847
|
}
|
|
2844
|
-
}, Z = Q("[Surveys]"),
|
|
2845
|
-
function
|
|
2848
|
+
}, Z = Q("[Surveys]"), Bs = { icontains: (r, e) => r.some((t) => e.toLowerCase().includes(t.toLowerCase())), not_icontains: (r, e) => r.every((t) => !e.toLowerCase().includes(t.toLowerCase())), regex: (r, e) => r.some((t) => gt(e, t)), not_regex: (r, e) => r.every((t) => !gt(e, t)), exact: (r, e) => r.some((t) => e === t), is_not: (r, e) => r.every((t) => e !== t) };
|
|
2849
|
+
function Us(r) {
|
|
2846
2850
|
return r ?? "icontains";
|
|
2847
2851
|
}
|
|
2848
2852
|
hr.Right;
|
|
2849
2853
|
(function(r, e) {
|
|
2850
|
-
var t = { __c: e = "__cC" +
|
|
2854
|
+
var t = { __c: e = "__cC" + _o++, __: r, Consumer: function(i, s) {
|
|
2851
2855
|
return i.children(s);
|
|
2852
2856
|
}, Provider: function(i) {
|
|
2853
2857
|
var s, n;
|
|
@@ -2869,7 +2873,7 @@ hr.Right;
|
|
|
2869
2873
|
})({ isPreviewMode: !1, previewPageIndex: 0, onPopupSurveyDismissed: () => {
|
|
2870
2874
|
}, isPopup: !0, onPreviewSubmit: () => {
|
|
2871
2875
|
} });
|
|
2872
|
-
class
|
|
2876
|
+
class yo {
|
|
2873
2877
|
constructor() {
|
|
2874
2878
|
w(this, "_events", {}), this._events = {};
|
|
2875
2879
|
}
|
|
@@ -2885,7 +2889,7 @@ class mo {
|
|
|
2885
2889
|
}
|
|
2886
2890
|
class Ye {
|
|
2887
2891
|
constructor(e) {
|
|
2888
|
-
w(this, "_debugEventEmitter", new
|
|
2892
|
+
w(this, "_debugEventEmitter", new yo()), w(this, "_checkStep", (t, i) => this._checkStepEvent(t, i) && this._checkStepUrl(t, i) && this._checkStepElement(t, i)), w(this, "_checkStepEvent", (t, i) => i == null || !i.event || (t == null ? void 0 : t.event) === (i == null ? void 0 : i.event)), this._instance = e, this._actionEvents = /* @__PURE__ */ new Set(), this._actionRegistry = /* @__PURE__ */ new Set();
|
|
2889
2893
|
}
|
|
2890
2894
|
init() {
|
|
2891
2895
|
var e;
|
|
@@ -2966,7 +2970,7 @@ class Ye {
|
|
|
2966
2970
|
return (e == null ? void 0 : e.properties.$elements) == null ? [] : e == null ? void 0 : e.properties.$elements;
|
|
2967
2971
|
}
|
|
2968
2972
|
}
|
|
2969
|
-
class
|
|
2973
|
+
class Cl {
|
|
2970
2974
|
constructor(e) {
|
|
2971
2975
|
this._instance = e, this._eventToSurveys = /* @__PURE__ */ new Map(), this._actionToSurveys = /* @__PURE__ */ new Map();
|
|
2972
2976
|
}
|
|
@@ -3009,7 +3013,7 @@ class xl {
|
|
|
3009
3013
|
}));
|
|
3010
3014
|
}
|
|
3011
3015
|
onEvent(e, t) {
|
|
3012
|
-
var i, s, n = ((i = this._instance) === null || i === void 0 || (s = i.persistence) === null || s === void 0 ? void 0 : s.props[
|
|
3016
|
+
var i, s, n = ((i = this._instance) === null || i === void 0 || (s = i.persistence) === null || s === void 0 ? void 0 : s.props[Lt]) || [];
|
|
3013
3017
|
if (e === "survey shown" && t && n.length > 0) {
|
|
3014
3018
|
var o, a = t == null || (o = t.properties) === null || o === void 0 ? void 0 : o.$survey_id;
|
|
3015
3019
|
if (a) {
|
|
@@ -3019,15 +3023,15 @@ class xl {
|
|
|
3019
3023
|
} else this._eventToSurveys.has(e) && this._updateActivatedSurveys(n.concat(this._eventToSurveys.get(e) || []));
|
|
3020
3024
|
}
|
|
3021
3025
|
onAction(e) {
|
|
3022
|
-
var t, i, s = ((t = this._instance) === null || t === void 0 || (i = t.persistence) === null || i === void 0 ? void 0 : i.props[
|
|
3026
|
+
var t, i, s = ((t = this._instance) === null || t === void 0 || (i = t.persistence) === null || i === void 0 ? void 0 : i.props[Lt]) || [];
|
|
3023
3027
|
this._actionToSurveys.has(e) && this._updateActivatedSurveys(s.concat(this._actionToSurveys.get(e) || []));
|
|
3024
3028
|
}
|
|
3025
3029
|
_updateActivatedSurveys(e) {
|
|
3026
3030
|
var t, i;
|
|
3027
|
-
(t = this._instance) === null || t === void 0 || (i = t.persistence) === null || i === void 0 || i.register({ [
|
|
3031
|
+
(t = this._instance) === null || t === void 0 || (i = t.persistence) === null || i === void 0 || i.register({ [Lt]: [...new Set(e)] });
|
|
3028
3032
|
}
|
|
3029
3033
|
getSurveys() {
|
|
3030
|
-
var e, t, i = (e = this._instance) === null || e === void 0 || (t = e.persistence) === null || t === void 0 ? void 0 : t.props[
|
|
3034
|
+
var e, t, i = (e = this._instance) === null || e === void 0 || (t = e.persistence) === null || t === void 0 ? void 0 : t.props[Lt];
|
|
3031
3035
|
return i || [];
|
|
3032
3036
|
}
|
|
3033
3037
|
getEventToSurveys() {
|
|
@@ -3037,7 +3041,7 @@ class xl {
|
|
|
3037
3041
|
return this._actionMatcher;
|
|
3038
3042
|
}
|
|
3039
3043
|
}
|
|
3040
|
-
class
|
|
3044
|
+
class Il {
|
|
3041
3045
|
constructor(e) {
|
|
3042
3046
|
w(this, "_isFetchingSurveys", !1), w(this, "_isInitializingSurveys", !1), w(this, "_surveyCallbacks", []), this._instance = e, this._surveyEventReceiver = null;
|
|
3043
3047
|
}
|
|
@@ -3082,7 +3086,7 @@ class Cl {
|
|
|
3082
3086
|
} else Z.info("No surveys to load.");
|
|
3083
3087
|
}
|
|
3084
3088
|
_completeSurveyInitialization(e) {
|
|
3085
|
-
this._surveyManager = e(this._instance), this._surveyEventReceiver = new
|
|
3089
|
+
this._surveyManager = e(this._instance), this._surveyEventReceiver = new Cl(this._instance), Z.info("Surveys loaded successfully"), this._notifySurveyCallbacks({ isLoaded: !0 });
|
|
3086
3090
|
}
|
|
3087
3091
|
_handleSurveyLoadError(e, t) {
|
|
3088
3092
|
Z.error(e, t), this._notifySurveyCallbacks({ isLoaded: !1, error: e });
|
|
@@ -3108,8 +3112,8 @@ class Cl {
|
|
|
3108
3112
|
return Z.error(a), e([], { isLoaded: !1, error: a });
|
|
3109
3113
|
}
|
|
3110
3114
|
var l, c = s.json.surveys || [], d = c.filter((u) => {
|
|
3111
|
-
var h, _, p, v, b, y, m, E, C, T, O,
|
|
3112
|
-
return ((h = u.conditions) === null || h === void 0 ? void 0 : h.events) && ((_ = u.conditions) === null || _ === void 0 || (p = _.events) === null || p === void 0 ? void 0 : p.values) && ((v = u.conditions) === null || v === void 0 || (b = v.events) === null || b === void 0 || (y = b.values) === null || y === void 0 ? void 0 : y.length) > 0 || ((m = u.conditions) === null || m === void 0 ? void 0 : m.actions) && ((E = u.conditions) === null || E === void 0 || (C = E.actions) === null || C === void 0 ? void 0 : C.values) && ((T = u.conditions) === null || T === void 0 || (O = T.actions) === null || O === void 0 || (
|
|
3115
|
+
var h, _, p, v, b, y, m, E, C, T, O, A;
|
|
3116
|
+
return ((h = u.conditions) === null || h === void 0 ? void 0 : h.events) && ((_ = u.conditions) === null || _ === void 0 || (p = _.events) === null || p === void 0 ? void 0 : p.values) && ((v = u.conditions) === null || v === void 0 || (b = v.events) === null || b === void 0 || (y = b.values) === null || y === void 0 ? void 0 : y.length) > 0 || ((m = u.conditions) === null || m === void 0 ? void 0 : m.actions) && ((E = u.conditions) === null || E === void 0 || (C = E.actions) === null || C === void 0 ? void 0 : C.values) && ((T = u.conditions) === null || T === void 0 || (O = T.actions) === null || O === void 0 || (A = O.values) === null || A === void 0 ? void 0 : A.length) > 0;
|
|
3113
3117
|
});
|
|
3114
3118
|
return d.length > 0 && ((l = this._surveyEventReceiver) === null || l === void 0 || l.register(d)), (n = this._instance.persistence) === null || n === void 0 || n.register({ [Gi]: c }), e(c, { isLoaded: !0 });
|
|
3115
3119
|
} });
|
|
@@ -3139,20 +3143,20 @@ class Cl {
|
|
|
3139
3143
|
var y = g == null || (v = g.location) === null || v === void 0 ? void 0 : v.href;
|
|
3140
3144
|
if (!y) return !1;
|
|
3141
3145
|
var m = [_.conditions.url];
|
|
3142
|
-
return
|
|
3146
|
+
return Bs[Us((b = _.conditions) === null || b === void 0 ? void 0 : b.urlMatchType)](m, y);
|
|
3143
3147
|
}(l), u = (c = l.conditions) === null || c === void 0 || !c.selector || (k == null ? void 0 : k.querySelector(l.conditions.selector)), h = function(_) {
|
|
3144
3148
|
var p, v, b;
|
|
3145
3149
|
if ((p = _.conditions) === null || p === void 0 || !p.deviceTypes || ((v = _.conditions) === null || v === void 0 ? void 0 : v.deviceTypes.length) === 0) return !0;
|
|
3146
|
-
if (!
|
|
3147
|
-
var y =
|
|
3148
|
-
return
|
|
3150
|
+
if (!K) return !1;
|
|
3151
|
+
var y = eo(K);
|
|
3152
|
+
return Bs[Us((b = _.conditions) === null || b === void 0 ? void 0 : b.deviceTypesMatchType)](_.conditions.deviceTypes, y);
|
|
3149
3153
|
}(l);
|
|
3150
3154
|
return d && u && h;
|
|
3151
3155
|
}), o = (s = this._surveyEventReceiver) === null || s === void 0 ? void 0 : s.getSurveys(), a = n.filter((l) => {
|
|
3152
3156
|
var c, d, u, h, _, p, v, b, y;
|
|
3153
3157
|
if (!(l.linked_flag_key || l.targeting_flag_key || l.internal_targeting_flag_key || (c = l.feature_flag_keys) !== null && c !== void 0 && c.length)) return !0;
|
|
3154
|
-
var m = this._isSurveyFeatureFlagEnabled(l.linked_flag_key), E = this._isSurveyFeatureFlagEnabled(l.targeting_flag_key), C = ((d = (u = l.conditions) === null || u === void 0 || (h = u.events) === null || h === void 0 || (_ = h.values) === null || _ === void 0 ? void 0 : _.length) !== null && d !== void 0 ? d : 0) > 0, T = ((p = (v = l.conditions) === null || v === void 0 || (b = v.actions) === null || b === void 0 || (y = b.values) === null || y === void 0 ? void 0 : y.length) !== null && p !== void 0 ? p : 0) > 0, O = !C && !T || (o == null ? void 0 : o.includes(l.id)),
|
|
3155
|
-
return m && E &&
|
|
3158
|
+
var m = this._isSurveyFeatureFlagEnabled(l.linked_flag_key), E = this._isSurveyFeatureFlagEnabled(l.targeting_flag_key), C = ((d = (u = l.conditions) === null || u === void 0 || (h = u.events) === null || h === void 0 || (_ = h.values) === null || _ === void 0 ? void 0 : _.length) !== null && d !== void 0 ? d : 0) > 0, T = ((p = (v = l.conditions) === null || v === void 0 || (b = v.actions) === null || b === void 0 || (y = b.values) === null || y === void 0 ? void 0 : y.length) !== null && p !== void 0 ? p : 0) > 0, O = !C && !T || (o == null ? void 0 : o.includes(l.id)), A = this._canActivateRepeatedly(l) || this._isSurveyFeatureFlagEnabled(l.internal_targeting_flag_key), P = this.checkFlags(l);
|
|
3159
|
+
return m && E && A && O && P;
|
|
3156
3160
|
});
|
|
3157
3161
|
return e(a);
|
|
3158
3162
|
}, t);
|
|
@@ -3192,7 +3196,7 @@ class Cl {
|
|
|
3192
3196
|
}
|
|
3193
3197
|
}
|
|
3194
3198
|
var Hs = Q("[RateLimiter]");
|
|
3195
|
-
class
|
|
3199
|
+
class Pl {
|
|
3196
3200
|
constructor(e) {
|
|
3197
3201
|
var t, i;
|
|
3198
3202
|
w(this, "serverLimits", {}), w(this, "lastEventRateLimited", !1), w(this, "checkForLimiting", (s) => {
|
|
@@ -3207,10 +3211,10 @@ class Il {
|
|
|
3207
3211
|
}), this.instance = e, this.captureEventsPerSecond = ((t = e.config.rate_limiting) === null || t === void 0 ? void 0 : t.events_per_second) || 10, this.captureEventsBurstLimit = Math.max(((i = e.config.rate_limiting) === null || i === void 0 ? void 0 : i.events_burst_limit) || 10 * this.captureEventsPerSecond, this.captureEventsPerSecond), this.lastEventRateLimited = this.clientRateLimitContext(!0).isRateLimited;
|
|
3208
3212
|
}
|
|
3209
3213
|
clientRateLimitContext() {
|
|
3210
|
-
var e, t, i, s = arguments.length > 0 && arguments[0] !== void 0 && arguments[0], n = (/* @__PURE__ */ new Date()).getTime(), o = (e = (t = this.instance.persistence) === null || t === void 0 ? void 0 : t.get_property(
|
|
3214
|
+
var e, t, i, s = arguments.length > 0 && arguments[0] !== void 0 && arguments[0], n = (/* @__PURE__ */ new Date()).getTime(), o = (e = (t = this.instance.persistence) === null || t === void 0 ? void 0 : t.get_property(Ji)) !== null && e !== void 0 ? e : { tokens: this.captureEventsBurstLimit, last: n };
|
|
3211
3215
|
o.tokens += (n - o.last) / 1e3 * this.captureEventsPerSecond, o.last = n, o.tokens > this.captureEventsBurstLimit && (o.tokens = this.captureEventsBurstLimit);
|
|
3212
3216
|
var a = o.tokens < 1;
|
|
3213
|
-
return a || s || (o.tokens = Math.max(0, o.tokens - 1)), !a || this.lastEventRateLimited || s || this.instance.capture("$$client_ingestion_warning", { $$client_ingestion_warning_message: "posthog-js client rate limited. Config is set to ".concat(this.captureEventsPerSecond, " events per second and ").concat(this.captureEventsBurstLimit, " events burst limit.") }, { skip_client_rate_limiting: !0 }), this.lastEventRateLimited = a, (i = this.instance.persistence) === null || i === void 0 || i.set_property(
|
|
3217
|
+
return a || s || (o.tokens = Math.max(0, o.tokens - 1)), !a || this.lastEventRateLimited || s || this.instance.capture("$$client_ingestion_warning", { $$client_ingestion_warning_message: "posthog-js client rate limited. Config is set to ".concat(this.captureEventsPerSecond, " events per second and ").concat(this.captureEventsBurstLimit, " events burst limit.") }, { skip_client_rate_limiting: !0 }), this.lastEventRateLimited = a, (i = this.instance.persistence) === null || i === void 0 || i.set_property(Ji, o), { isRateLimited: a, remainingTokens: o.tokens };
|
|
3214
3218
|
}
|
|
3215
3219
|
isServerRateLimited(e) {
|
|
3216
3220
|
var t = this.serverLimits[e || "events"] || !1;
|
|
@@ -3218,7 +3222,7 @@ class Il {
|
|
|
3218
3222
|
}
|
|
3219
3223
|
}
|
|
3220
3224
|
var Ge = Q("[RemoteConfig]");
|
|
3221
|
-
class
|
|
3225
|
+
class Tl {
|
|
3222
3226
|
constructor(e) {
|
|
3223
3227
|
this._instance = e;
|
|
3224
3228
|
}
|
|
@@ -3253,35 +3257,35 @@ class Pl {
|
|
|
3253
3257
|
e ? this._instance.config.__preview_remote_config ? (this._instance._onRemoteConfig(e), e.hasFeatureFlags !== !1 && this._instance.featureFlags.ensureFlagsLoaded()) : Ge.info("__preview_remote_config is disabled. Logging config instead", e) : Ge.error("Failed to fetch remote config from PostHog.");
|
|
3254
3258
|
}
|
|
3255
3259
|
}
|
|
3256
|
-
var
|
|
3260
|
+
var Fl = function(r) {
|
|
3257
3261
|
var e, t, i, s, n = "";
|
|
3258
3262
|
for (e = t = 0, i = (r = (r + "").replace(/\r\n/g, `
|
|
3259
3263
|
`).replace(/\r/g, `
|
|
3260
3264
|
`)).length, s = 0; s < i; s++) {
|
|
3261
3265
|
var o = r.charCodeAt(s), a = null;
|
|
3262
|
-
o < 128 ? t++ : a = o > 127 && o < 2048 ? String.fromCharCode(o >> 6 | 192, 63 & o | 128) : String.fromCharCode(o >> 12 | 224, o >> 6 & 63 | 128, 63 & o | 128),
|
|
3266
|
+
o < 128 ? t++ : a = o > 127 && o < 2048 ? String.fromCharCode(o >> 6 | 192, 63 & o | 128) : String.fromCharCode(o >> 12 | 224, o >> 6 & 63 | 128, 63 & o | 128), He(a) || (t > e && (n += r.substring(e, t)), n += a, e = t = s + 1);
|
|
3263
3267
|
}
|
|
3264
3268
|
return t > e && (n += r.substring(e, r.length)), n;
|
|
3265
|
-
},
|
|
3269
|
+
}, Rl = !!Ui || !!Bi, js = "text/plain", ci = (r, e) => {
|
|
3266
3270
|
var [t, i] = r.split("?"), s = f({}, e);
|
|
3267
3271
|
i == null || i.split("&").forEach((o) => {
|
|
3268
3272
|
var [a] = o.split("=");
|
|
3269
3273
|
delete s[a];
|
|
3270
3274
|
});
|
|
3271
|
-
var n =
|
|
3275
|
+
var n = Zo(s);
|
|
3272
3276
|
return n = n ? (i ? i + "&" : "") + n : i, "".concat(t, "?").concat(n);
|
|
3273
3277
|
}, It = (r, e) => JSON.stringify(r, (t, i) => typeof i == "bigint" ? i.toString() : i, e), qi = (r) => {
|
|
3274
3278
|
var { data: e, compression: t } = r;
|
|
3275
3279
|
if (e) {
|
|
3276
3280
|
if (t === ge.GZipJS) {
|
|
3277
|
-
var i =
|
|
3281
|
+
var i = On(An(It(e)), { mtime: 0 }), s = new Blob([i], { type: js });
|
|
3278
3282
|
return { contentType: js, body: s, estimatedSize: s.size };
|
|
3279
3283
|
}
|
|
3280
3284
|
if (t === ge.Base64) {
|
|
3281
3285
|
var n = function(l) {
|
|
3282
3286
|
var c, d, u, h, _, p = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", v = 0, b = 0, y = "", m = [];
|
|
3283
3287
|
if (!l) return l;
|
|
3284
|
-
l =
|
|
3288
|
+
l = Fl(l);
|
|
3285
3289
|
do
|
|
3286
3290
|
c = (_ = l.charCodeAt(v++) << 16 | l.charCodeAt(v++) << 8 | l.charCodeAt(v++)) >> 18 & 63, d = _ >> 12 & 63, u = _ >> 6 & 63, h = 63 & _, m[b++] = p.charAt(c) + p.charAt(d) + p.charAt(u) + p.charAt(h);
|
|
3287
3291
|
while (v < l.length);
|
|
@@ -3306,8 +3310,8 @@ Bi && Tt.push({ transport: "fetch", method: (r) => {
|
|
|
3306
3310
|
o.append(u, d);
|
|
3307
3311
|
}), i && o.append("Content-Type", i);
|
|
3308
3312
|
var a = r.url, l = null;
|
|
3309
|
-
if (
|
|
3310
|
-
var c = new
|
|
3313
|
+
if (Br) {
|
|
3314
|
+
var c = new Br();
|
|
3311
3315
|
l = { signal: c.signal, timeout: setTimeout(() => c.abort(), r.timeout) };
|
|
3312
3316
|
}
|
|
3313
3317
|
Bi(a, f({ method: (r == null ? void 0 : r.method) || "GET", headers: o, keepalive: r.method === "POST" && (n || 0) < 52428.8, body: s, signal: (t = l) === null || t === void 0 ? void 0 : t.signal }, r.fetchOptions)).then((d) => d.text().then((u) => {
|
|
@@ -3322,8 +3326,8 @@ Bi && Tt.push({ transport: "fetch", method: (r) => {
|
|
|
3322
3326
|
var u;
|
|
3323
3327
|
x.error(d), (u = r.callback) === null || u === void 0 || u.call(r, { statusCode: 0, text: d });
|
|
3324
3328
|
}).finally(() => l ? clearTimeout(l.timeout) : null);
|
|
3325
|
-
} }),
|
|
3326
|
-
var e, t = new
|
|
3329
|
+
} }), Ui && Tt.push({ transport: "XHR", method: (r) => {
|
|
3330
|
+
var e, t = new Ui();
|
|
3327
3331
|
t.open(r.method || "GET", r.url, !0);
|
|
3328
3332
|
var { contentType: i, body: s } = (e = qi(r)) !== null && e !== void 0 ? e : {};
|
|
3329
3333
|
$(r.headers, function(n, o) {
|
|
@@ -3347,7 +3351,7 @@ Bi && Tt.push({ transport: "fetch", method: (r) => {
|
|
|
3347
3351
|
}
|
|
3348
3352
|
} });
|
|
3349
3353
|
var fr = 3e3;
|
|
3350
|
-
class
|
|
3354
|
+
class $l {
|
|
3351
3355
|
constructor(e, t) {
|
|
3352
3356
|
w(this, "_isPaused", !0), w(this, "_queue", []), this._flushTimeoutMs = le((t == null ? void 0 : t.flush_interval_ms) || fr, 250, 5e3, "flush interval", fr), this._sendRequest = e;
|
|
3353
3357
|
}
|
|
@@ -3389,8 +3393,8 @@ class Rl {
|
|
|
3389
3393
|
}), this._queue = [], e;
|
|
3390
3394
|
}
|
|
3391
3395
|
}
|
|
3392
|
-
var
|
|
3393
|
-
class
|
|
3396
|
+
var Ol = ["retriesPerformedSoFar"];
|
|
3397
|
+
class Al {
|
|
3394
3398
|
constructor(e) {
|
|
3395
3399
|
w(this, "_isPolling", !1), w(this, "_pollIntervalMs", 3e3), w(this, "_queue", []), this._instance = e, this._queue = [], this._areWeOnline = !0, !S(g) && "onLine" in g.navigator && (this._areWeOnline = g.navigator.onLine, N(g, "online", () => {
|
|
3396
3400
|
this._areWeOnline = !0, this._flush();
|
|
@@ -3402,7 +3406,7 @@ class Ol {
|
|
|
3402
3406
|
return this._queue.length;
|
|
3403
3407
|
}
|
|
3404
3408
|
retriableRequest(e) {
|
|
3405
|
-
var { retriesPerformedSoFar: t } = e, i =
|
|
3409
|
+
var { retriesPerformedSoFar: t } = e, i = on(e, Ol);
|
|
3406
3410
|
Y(t) && t > 0 && (i.url = ci(i.url, { retry_count: t })), this._instance._send_request(f(f({}, i), {}, { callback: (s) => {
|
|
3407
3411
|
var n;
|
|
3408
3412
|
s.statusCode !== 200 && (s.statusCode < 400 || s.statusCode >= 500) && (t ?? 0) < 10 ? this._enqueue(f({ retriesPerformedSoFar: t }, i)) : (n = i.callback) === null || n === void 0 || n.call(i, s);
|
|
@@ -3479,33 +3483,33 @@ class Ll {
|
|
|
3479
3483
|
return g && (g.scrollX || g.pageXOffset || g.document.documentElement.scrollLeft) || 0;
|
|
3480
3484
|
}
|
|
3481
3485
|
}
|
|
3482
|
-
var
|
|
3483
|
-
class
|
|
3486
|
+
var Ml = (r) => no(r == null ? void 0 : r.config.mask_personal_data_properties, r == null ? void 0 : r.config.custom_personal_data_properties);
|
|
3487
|
+
class Dl {
|
|
3484
3488
|
constructor(e, t, i, s) {
|
|
3485
3489
|
w(this, "_onSessionIdCallback", (n) => {
|
|
3486
3490
|
var o = this._getStored();
|
|
3487
3491
|
if (!o || o.sessionId !== n) {
|
|
3488
3492
|
var a = { sessionId: n, props: this._sessionSourceParamGenerator(this._instance) };
|
|
3489
|
-
this._persistence.register({ [
|
|
3493
|
+
this._persistence.register({ [Ki]: a });
|
|
3490
3494
|
}
|
|
3491
|
-
}), this._instance = e, this._sessionIdManager = t, this._persistence = i, this._sessionSourceParamGenerator = s ||
|
|
3495
|
+
}), this._instance = e, this._sessionIdManager = t, this._persistence = i, this._sessionSourceParamGenerator = s || Ml, this._sessionIdManager.onSessionId(this._onSessionIdCallback);
|
|
3492
3496
|
}
|
|
3493
3497
|
_getStored() {
|
|
3494
|
-
return this._persistence.props[
|
|
3498
|
+
return this._persistence.props[Ki];
|
|
3495
3499
|
}
|
|
3496
3500
|
getSetOnceProps() {
|
|
3497
3501
|
var e, t = (e = this._getStored()) === null || e === void 0 ? void 0 : e.props;
|
|
3498
|
-
return t ? "r" in t ?
|
|
3502
|
+
return t ? "r" in t ? oo(t) : { $referring_domain: t.referringDomain, $pathname: t.initialPathName, utm_source: t.utm_source, utm_campaign: t.utm_campaign, utm_medium: t.utm_medium, utm_content: t.utm_content, utm_term: t.utm_term } : {};
|
|
3499
3503
|
}
|
|
3500
3504
|
getSessionProps() {
|
|
3501
3505
|
var e = {};
|
|
3502
3506
|
return $(Xt(this.getSetOnceProps()), (t, i) => {
|
|
3503
|
-
i === "$current_url" && (i = "url"), e["$session_entry_".concat(
|
|
3507
|
+
i === "$current_url" && (i = "url"), e["$session_entry_".concat(Hi(i))] = t;
|
|
3504
3508
|
}), e;
|
|
3505
3509
|
}
|
|
3506
3510
|
}
|
|
3507
|
-
var
|
|
3508
|
-
class
|
|
3511
|
+
var zs = Q("[SessionId]");
|
|
3512
|
+
class ql {
|
|
3509
3513
|
constructor(e, t, i) {
|
|
3510
3514
|
var s;
|
|
3511
3515
|
if (w(this, "_sessionIdChangedHandlers", []), !e.persistence) throw new Error("SessionIdManager requires a PostHogPersistence instance");
|
|
@@ -3525,7 +3529,7 @@ class Dl {
|
|
|
3525
3529
|
})(this._config.bootstrap.sessionID);
|
|
3526
3530
|
this._setSessionId(this._config.bootstrap.sessionID, (/* @__PURE__ */ new Date()).getTime(), c);
|
|
3527
3531
|
} catch (d) {
|
|
3528
|
-
|
|
3532
|
+
zs.error("Invalid sessionID in bootstrap", d);
|
|
3529
3533
|
}
|
|
3530
3534
|
this._listenToReloadWindow();
|
|
3531
3535
|
}
|
|
@@ -3566,7 +3570,7 @@ class Dl {
|
|
|
3566
3570
|
var e = arguments.length > 0 && arguments[0] !== void 0 && arguments[0], t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null;
|
|
3567
3571
|
if (this._config.__preview_experimental_cookieless_mode) throw new Error("checkAndGetSessionAndWindowId should not be called in __preview_experimental_cookieless_mode");
|
|
3568
3572
|
var i = t || (/* @__PURE__ */ new Date()).getTime(), [s, n, o] = this._getSessionId(), a = this._getWindowId(), l = Y(o) && o > 0 && Math.abs(i - o) > 864e5, c = !1, d = !n, u = !e && Math.abs(i - s) > this.sessionTimeoutMs;
|
|
3569
|
-
d || u || l ? (n = this._sessionIdGenerator(), a = this._windowIdGenerator(),
|
|
3573
|
+
d || u || l ? (n = this._sessionIdGenerator(), a = this._windowIdGenerator(), zs.info("new session ID generated", { sessionId: n, windowId: a, changeReason: { noSessionId: d, activityTimeout: u, sessionPastMaximumLength: l } }), o = i, c = !0) : a || (a = this._windowIdGenerator(), c = !0);
|
|
3570
3574
|
var h = s === 0 || !e || l ? i : s, _ = o === 0 ? (/* @__PURE__ */ new Date()).getTime() : o;
|
|
3571
3575
|
return this._setWindowId(a), this._setSessionId(n, h, _), e || this._resetIdleTimer(), c && this._sessionIdChangedHandlers.forEach((p) => p(n, a, c ? { noSessionId: d, activityTimeout: u, sessionPastMaximumLength: l } : void 0)), { sessionId: n, windowId: a, sessionStartTimestamp: _, changeReason: c ? { noSessionId: d, activityTimeout: u, sessionPastMaximumLength: l } : void 0, lastActivityTimestamp: s };
|
|
3572
3576
|
}
|
|
@@ -3576,8 +3580,8 @@ class Dl {
|
|
|
3576
3580
|
}, 1.1 * this.sessionTimeoutMs);
|
|
3577
3581
|
}
|
|
3578
3582
|
}
|
|
3579
|
-
var
|
|
3580
|
-
class
|
|
3583
|
+
var Nl = ["$set_once", "$set"], Ae = Q("[SiteApps]");
|
|
3584
|
+
class Bl {
|
|
3581
3585
|
constructor(e) {
|
|
3582
3586
|
this._instance = e, this._bufferedInvocations = [], this.apps = {};
|
|
3583
3587
|
}
|
|
@@ -3608,17 +3612,17 @@ class Nl {
|
|
|
3608
3612
|
var c = {}, d = this._instance.get_property("$groups") || [], u = this._instance.get_property("$stored_group_properties") || {};
|
|
3609
3613
|
for (var [h, _] of Object.entries(u)) c[h] = { id: d[h], type: h, properties: _ };
|
|
3610
3614
|
var { $set_once: p, $set: v } = e;
|
|
3611
|
-
return { event: f(f({},
|
|
3615
|
+
return { event: f(f({}, on(e, Nl)), {}, { properties: f(f(f({}, e.properties), v ? { $set: f(f({}, (t = (i = e.properties) === null || i === void 0 ? void 0 : i.$set) !== null && t !== void 0 ? t : {}), v) } : {}), p ? { $set_once: f(f({}, (s = (n = e.properties) === null || n === void 0 ? void 0 : n.$set_once) !== null && s !== void 0 ? s : {}), p) } : {}), elements_chain: (o = (a = e.properties) === null || a === void 0 ? void 0 : a.$elements_chain) !== null && o !== void 0 ? o : "", distinct_id: (l = e.properties) === null || l === void 0 ? void 0 : l.distinct_id }), person: { properties: this._instance.get_property("$stored_person_properties") }, groups: c };
|
|
3612
3616
|
}
|
|
3613
3617
|
setupSiteApp(e) {
|
|
3614
3618
|
var t = this.apps[e.id], i = () => {
|
|
3615
3619
|
var a;
|
|
3616
|
-
!t.errored && this._bufferedInvocations.length && (
|
|
3620
|
+
!t.errored && this._bufferedInvocations.length && (Ae.info("Processing ".concat(this._bufferedInvocations.length, " events for site app with id ").concat(e.id)), this._bufferedInvocations.forEach((l) => {
|
|
3617
3621
|
var c;
|
|
3618
3622
|
return (c = t.processEvent) === null || c === void 0 ? void 0 : c.call(t, l);
|
|
3619
3623
|
}), t.processedBuffer = !0), Object.values(this.apps).every((l) => l.processedBuffer || l.errored) && ((a = this._stopBuffering) === null || a === void 0 || a.call(this));
|
|
3620
3624
|
}, s = !1, n = (a) => {
|
|
3621
|
-
t.errored = !a, t.loaded = !0,
|
|
3625
|
+
t.errored = !a, t.loaded = !0, Ae.info("Site app with id ".concat(e.id, " ").concat(a ? "loaded" : "errored")), s && i();
|
|
3622
3626
|
};
|
|
3623
3627
|
try {
|
|
3624
3628
|
var { processEvent: o } = e.init({ posthog: this._instance, callback: (a) => {
|
|
@@ -3626,12 +3630,12 @@ class Nl {
|
|
|
3626
3630
|
} });
|
|
3627
3631
|
o && (t.processEvent = o), s = !0;
|
|
3628
3632
|
} catch (a) {
|
|
3629
|
-
|
|
3633
|
+
Ae.error("Error while initializing PostHog app with config id ".concat(e.id), a), n(!1);
|
|
3630
3634
|
}
|
|
3631
3635
|
if (s && t.loaded) try {
|
|
3632
3636
|
i();
|
|
3633
3637
|
} catch (a) {
|
|
3634
|
-
|
|
3638
|
+
Ae.error("Error while processing buffered events PostHog app with config id ".concat(e.id), a), t.errored = !0;
|
|
3635
3639
|
}
|
|
3636
3640
|
}
|
|
3637
3641
|
_setupSiteApps() {
|
|
@@ -3646,49 +3650,49 @@ class Nl {
|
|
|
3646
3650
|
var s;
|
|
3647
3651
|
(s = i.processEvent) === null || s === void 0 || s.call(i, t);
|
|
3648
3652
|
} catch (n) {
|
|
3649
|
-
|
|
3653
|
+
Ae.error("Error while processing event ".concat(e.event, " for site app ").concat(i.id), n);
|
|
3650
3654
|
}
|
|
3651
3655
|
}
|
|
3652
3656
|
}
|
|
3653
3657
|
onRemoteConfig(e) {
|
|
3654
3658
|
var t, i, s, n = this;
|
|
3655
|
-
if ((t = this.siteAppLoaders) !== null && t !== void 0 && t.length) return this.isEnabled ? (this._setupSiteApps(), void this._instance.on("eventCaptured", (c) => this._onCapturedEvent(c))) : void
|
|
3659
|
+
if ((t = this.siteAppLoaders) !== null && t !== void 0 && t.length) return this.isEnabled ? (this._setupSiteApps(), void this._instance.on("eventCaptured", (c) => this._onCapturedEvent(c))) : void Ae.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.');
|
|
3656
3660
|
if ((i = this._stopBuffering) === null || i === void 0 || i.call(this), (s = e.siteApps) !== null && s !== void 0 && s.length) if (this.isEnabled) {
|
|
3657
3661
|
var o = function(c, d) {
|
|
3658
3662
|
var u, h;
|
|
3659
3663
|
I["__$$ph_site_app_".concat(c)] = n._instance, (u = I.__PosthogExtensions__) === null || u === void 0 || (h = u.loadSiteApp) === null || h === void 0 || h.call(u, n._instance, d, (_) => {
|
|
3660
|
-
if (_) return
|
|
3664
|
+
if (_) return Ae.error("Error while initializing PostHog app with config id ".concat(c), _);
|
|
3661
3665
|
});
|
|
3662
3666
|
};
|
|
3663
3667
|
for (var { id: a, url: l } of e.siteApps) o(a, l);
|
|
3664
|
-
} else
|
|
3668
|
+
} else Ae.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.');
|
|
3665
3669
|
}
|
|
3666
3670
|
}
|
|
3667
|
-
var Qe,
|
|
3671
|
+
var Qe, Ul = ["amazonbot", "amazonproductbot", "app.hypefactors.com", "applebot", "archive.org_bot", "awariobot", "backlinksextendedbot", "baiduspider", "bingbot", "bingpreview", "chrome-lighthouse", "dataforseobot", "deepscan", "duckduckbot", "facebookexternal", "facebookcatalog", "http://yandex.com/bots", "hubspot", "ia_archiver", "linkedinbot", "meta-externalagent", "mj12bot", "msnbot", "nessus", "petalbot", "pinterest", "prerender", "rogerbot", "screaming frog", "sebot-wa", "sitebulb", "slackbot", "slurp", "trendictionbot", "turnitin", "twitterbot", "vercelbot", "yahoo! slurp", "yandexbot", "zoombot", "bot.htm", "bot.php", "(bot;", "bot/", "crawler", "ahrefsbot", "ahrefssiteaudit", "semrushbot", "siteauditbot", "splitsignalbot", "gptbot", "oai-searchbot", "chatgpt-user", "perplexitybot", "better uptime bot", "sentryuptimebot", "uptimerobot", "headlesschrome", "cypress", "google-hoteladsverifier", "adsbot-google", "apis-google", "duplexweb-google", "feedfetcher-google", "google favicon", "google web preview", "google-read-aloud", "googlebot", "googleweblight", "mediapartners-google", "storebot-google", "bytespider"], Ws = function(r, e) {
|
|
3668
3672
|
if (!r) return !1;
|
|
3669
3673
|
var t = r.toLowerCase();
|
|
3670
|
-
return
|
|
3674
|
+
return Ul.concat(e || []).some((i) => {
|
|
3671
3675
|
var s = i.toLowerCase();
|
|
3672
3676
|
return t.indexOf(s) !== -1;
|
|
3673
3677
|
});
|
|
3674
|
-
},
|
|
3678
|
+
}, bo = function(r, e) {
|
|
3675
3679
|
if (!r) return !1;
|
|
3676
3680
|
var t = r.userAgent;
|
|
3677
|
-
if (t &&
|
|
3681
|
+
if (t && Ws(t, e)) return !0;
|
|
3678
3682
|
try {
|
|
3679
3683
|
var i = r == null ? void 0 : r.userAgentData;
|
|
3680
|
-
if (i != null && i.brands && i.brands.some((s) =>
|
|
3684
|
+
if (i != null && i.brands && i.brands.some((s) => Ws(s == null ? void 0 : s.brand, e))) return !0;
|
|
3681
3685
|
} catch {
|
|
3682
3686
|
}
|
|
3683
3687
|
return !!r.webdriver;
|
|
3684
3688
|
};
|
|
3685
|
-
function
|
|
3689
|
+
function Vs(r, e, t) {
|
|
3686
3690
|
return It({ distinct_id: r, userPropertiesToSet: e, userPropertiesToSetOnce: t });
|
|
3687
3691
|
}
|
|
3688
3692
|
(function(r) {
|
|
3689
3693
|
r.US = "us", r.EU = "eu", r.CUSTOM = "custom";
|
|
3690
3694
|
})(Qe || (Qe = {}));
|
|
3691
|
-
var
|
|
3695
|
+
var Gs = "i.posthog.com";
|
|
3692
3696
|
class Hl {
|
|
3693
3697
|
constructor(e) {
|
|
3694
3698
|
w(this, "_regionCache", {}), this.instance = e;
|
|
@@ -3699,7 +3703,7 @@ class Hl {
|
|
|
3699
3703
|
}
|
|
3700
3704
|
get uiHost() {
|
|
3701
3705
|
var e, t = (e = this.instance.config.ui_host) === null || e === void 0 ? void 0 : e.replace(/\/$/, "");
|
|
3702
|
-
return t || (t = this.apiHost.replace(".".concat(
|
|
3706
|
+
return t || (t = this.apiHost.replace(".".concat(Gs), ".posthog.com")), t === "https://app.posthog.com" ? "https://us.posthog.com" : t;
|
|
3703
3707
|
}
|
|
3704
3708
|
get region() {
|
|
3705
3709
|
return this._regionCache[this.apiHost] || (/https:\/\/(app|us|us-assets)(\.i)?\.posthog\.com/i.test(this.apiHost) ? this._regionCache[this.apiHost] = Qe.US : /https:\/\/(eu|eu-assets)(\.i)?\.posthog\.com/i.test(this.apiHost) ? this._regionCache[this.apiHost] = Qe.EU : this._regionCache[this.apiHost] = Qe.CUSTOM), this._regionCache[this.apiHost];
|
|
@@ -3708,7 +3712,7 @@ class Hl {
|
|
|
3708
3712
|
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
|
|
3709
3713
|
if (t && (t = t[0] === "/" ? t : "/".concat(t)), e === "ui") return this.uiHost + t;
|
|
3710
3714
|
if (this.region === Qe.CUSTOM) return this.apiHost + t;
|
|
3711
|
-
var i =
|
|
3715
|
+
var i = Gs + t;
|
|
3712
3716
|
switch (e) {
|
|
3713
3717
|
case "assets":
|
|
3714
3718
|
return "https://".concat(this.region, "-assets.").concat(i);
|
|
@@ -3729,7 +3733,7 @@ class G {
|
|
|
3729
3733
|
var o;
|
|
3730
3734
|
t._flagToExperiments && (G._logInfo("setting flag key ", n.feature_flag_key, " to web experiment ", n), (o = t._flagToExperiments) === null || o === void 0 || o.set(n.feature_flag_key, n));
|
|
3731
3735
|
var a = t._instance.getFeatureFlag(n.feature_flag_key);
|
|
3732
|
-
|
|
3736
|
+
H(a) && n.variants[a] && t._applyTransforms(n.name, a, n.variants[a].transforms);
|
|
3733
3737
|
} else if (n.variants) for (var l in n.variants) {
|
|
3734
3738
|
var c = n.variants[l];
|
|
3735
3739
|
G._matchesTestVariant(c) && t._applyTransforms(n.name, l, c.transforms);
|
|
@@ -3794,10 +3798,10 @@ class G {
|
|
|
3794
3798
|
static _matchUTMConditions(e) {
|
|
3795
3799
|
var t;
|
|
3796
3800
|
if (R(e.conditions) || R((t = e.conditions) === null || t === void 0 ? void 0 : t.utm)) return !0;
|
|
3797
|
-
var i =
|
|
3801
|
+
var i = to();
|
|
3798
3802
|
if (i.utm_source) {
|
|
3799
|
-
var s, n, o, a, l, c, d, u, h, _, p, v, b, y, m, E, C = (s = e.conditions) === null || s === void 0 || (n = s.utm) === null || n === void 0 || !n.utm_campaign || ((o = e.conditions) === null || o === void 0 || (a = o.utm) === null || a === void 0 ? void 0 : a.utm_campaign) == i.utm_campaign, T = (l = e.conditions) === null || l === void 0 || (c = l.utm) === null || c === void 0 || !c.utm_source || ((d = e.conditions) === null || d === void 0 || (u = d.utm) === null || u === void 0 ? void 0 : u.utm_source) == i.utm_source, O = (h = e.conditions) === null || h === void 0 || (_ = h.utm) === null || _ === void 0 || !_.utm_medium || ((p = e.conditions) === null || p === void 0 || (v = p.utm) === null || v === void 0 ? void 0 : v.utm_medium) == i.utm_medium,
|
|
3800
|
-
return C && O &&
|
|
3803
|
+
var s, n, o, a, l, c, d, u, h, _, p, v, b, y, m, E, C = (s = e.conditions) === null || s === void 0 || (n = s.utm) === null || n === void 0 || !n.utm_campaign || ((o = e.conditions) === null || o === void 0 || (a = o.utm) === null || a === void 0 ? void 0 : a.utm_campaign) == i.utm_campaign, T = (l = e.conditions) === null || l === void 0 || (c = l.utm) === null || c === void 0 || !c.utm_source || ((d = e.conditions) === null || d === void 0 || (u = d.utm) === null || u === void 0 ? void 0 : u.utm_source) == i.utm_source, O = (h = e.conditions) === null || h === void 0 || (_ = h.utm) === null || _ === void 0 || !_.utm_medium || ((p = e.conditions) === null || p === void 0 || (v = p.utm) === null || v === void 0 ? void 0 : v.utm_medium) == i.utm_medium, A = (b = e.conditions) === null || b === void 0 || (y = b.utm) === null || y === void 0 || !y.utm_term || ((m = e.conditions) === null || m === void 0 || (E = m.utm) === null || E === void 0 ? void 0 : E.utm_term) == i.utm_term;
|
|
3804
|
+
return C && O && A && T;
|
|
3801
3805
|
}
|
|
3802
3806
|
return !1;
|
|
3803
3807
|
}
|
|
@@ -3819,10 +3823,10 @@ class G {
|
|
|
3819
3823
|
}) : G._logInfo("Control variants leave the page unmodified.");
|
|
3820
3824
|
}
|
|
3821
3825
|
_is_bot() {
|
|
3822
|
-
return ne && this._instance ?
|
|
3826
|
+
return ne && this._instance ? bo(ne, this._instance.config.custom_blocked_useragents) : void 0;
|
|
3823
3827
|
}
|
|
3824
3828
|
}
|
|
3825
|
-
function
|
|
3829
|
+
function Ks(r, e, t) {
|
|
3826
3830
|
try {
|
|
3827
3831
|
if (!(e in r)) return () => {
|
|
3828
3832
|
};
|
|
@@ -3835,7 +3839,7 @@ function Gs(r, e, t) {
|
|
|
3835
3839
|
};
|
|
3836
3840
|
}
|
|
3837
3841
|
}
|
|
3838
|
-
class
|
|
3842
|
+
class zl {
|
|
3839
3843
|
constructor(e) {
|
|
3840
3844
|
var t;
|
|
3841
3845
|
this._instance = e, this._lastPathname = (g == null || (t = g.location) === null || t === void 0 ? void 0 : t.pathname) || "";
|
|
@@ -3853,9 +3857,9 @@ class Ul {
|
|
|
3853
3857
|
var e, t;
|
|
3854
3858
|
if (g && g.history) {
|
|
3855
3859
|
var i = this;
|
|
3856
|
-
(e = g.history.pushState) !== null && e !== void 0 && e.__posthog_wrapped__ ||
|
|
3860
|
+
(e = g.history.pushState) !== null && e !== void 0 && e.__posthog_wrapped__ || Ks(g.history, "pushState", (s) => function(n, o, a) {
|
|
3857
3861
|
s.call(this, n, o, a), i._capturePageview("pushState");
|
|
3858
|
-
}), (t = g.history.replaceState) !== null && t !== void 0 && t.__posthog_wrapped__ ||
|
|
3862
|
+
}), (t = g.history.replaceState) !== null && t !== void 0 && t.__posthog_wrapped__ || Ks(g.history, "replaceState", (s) => function(n, o, a) {
|
|
3859
3863
|
s.call(this, n, o, a), i._capturePageview("replaceState");
|
|
3860
3864
|
}), this._setupPopstateListener();
|
|
3861
3865
|
}
|
|
@@ -3881,19 +3885,19 @@ class Ul {
|
|
|
3881
3885
|
}
|
|
3882
3886
|
}
|
|
3883
3887
|
var Ft = {}, mr = () => {
|
|
3884
|
-
}, st = "posthog",
|
|
3888
|
+
}, st = "posthog", wo = !Rl && (K == null ? void 0 : K.indexOf("MSIE")) === -1 && (K == null ? void 0 : K.indexOf("Mozilla")) === -1, Js = () => {
|
|
3885
3889
|
var r;
|
|
3886
|
-
return { api_host: "https://us.i.posthog.com", ui_host: null, token: "", autocapture: !0, rageclick: !0, cross_subdomain_cookie: jo(k == null ? void 0 : k.location), persistence: "localStorage+cookie", persistence_name: "", loaded: mr, save_campaign_params: !0, custom_campaign_params: [], custom_blocked_useragents: [], save_referrer: !0, capture_pageview: !0, capture_pageleave: "if_capture_pageview", debug: te &&
|
|
3890
|
+
return { api_host: "https://us.i.posthog.com", ui_host: null, token: "", autocapture: !0, rageclick: !0, cross_subdomain_cookie: jo(k == null ? void 0 : k.location), persistence: "localStorage+cookie", persistence_name: "", loaded: mr, save_campaign_params: !0, custom_campaign_params: [], custom_blocked_useragents: [], save_referrer: !0, capture_pageview: !0, capture_pageleave: "if_capture_pageview", debug: te && H(te == null ? void 0 : te.search) && te.search.indexOf("__posthog_debug=true") !== -1 || !1, cookie_expiration: 365, upgrade: !1, disable_session_recording: !1, disable_persistence: !1, disable_web_experiments: !0, disable_surveys: !1, disable_external_dependency_loading: !1, enable_recording_console_log: void 0, secure_cookie: (g == null || (r = g.location) === null || r === void 0 ? void 0 : r.protocol) === "https:", ip: !0, opt_out_capturing_by_default: !1, opt_out_persistence_by_default: !1, opt_out_useragent_filter: !1, opt_out_capturing_persistence_type: "localStorage", opt_out_capturing_cookie_prefix: null, opt_in_site_apps: !1, property_denylist: [], respect_dnt: !1, sanitize_properties: null, request_headers: {}, request_batching: !0, properties_string_max_length: 65535, session_recording: {}, mask_all_element_attributes: !1, mask_all_text: !1, mask_personal_data_properties: !1, custom_personal_data_properties: [], advanced_disable_decide: !1, advanced_disable_feature_flags: !1, advanced_disable_feature_flags_on_first_load: !1, advanced_disable_toolbar_metrics: !1, feature_flag_request_timeout_ms: 3e3, surveys_request_timeout_ms: 1e4, on_request_error: (e) => {
|
|
3887
3891
|
var t = "Bad HTTP status: " + e.statusCode + " " + e.text;
|
|
3888
3892
|
x.error(t);
|
|
3889
3893
|
}, get_device_id: (e) => e, capture_performance: void 0, name: "posthog", bootstrap: {}, disable_compression: !1, session_idle_timeout_seconds: 1800, person_profiles: "identified_only", before_send: void 0, request_queue_config: { flush_interval_ms: fr }, _onCapture: mr };
|
|
3890
|
-
},
|
|
3894
|
+
}, Ys = (r) => {
|
|
3891
3895
|
var e = {};
|
|
3892
3896
|
S(r.process_person) || (e.person_profiles = r.process_person), S(r.xhr_headers) || (e.request_headers = r.xhr_headers), S(r.cookie_name) || (e.persistence_name = r.cookie_name), S(r.disable_cookie) || (e.disable_persistence = r.disable_cookie), S(r.store_google) || (e.save_campaign_params = r.store_google), S(r.verbose) || (e.debug = r.verbose);
|
|
3893
|
-
var t =
|
|
3897
|
+
var t = U({}, e, r);
|
|
3894
3898
|
return D(r.property_blacklist) && (S(r.property_denylist) ? t.property_denylist = r.property_blacklist : D(r.property_denylist) ? t.property_denylist = [...r.property_blacklist, ...r.property_denylist] : x.error("Invalid value for property_denylist config: " + r.property_denylist)), t;
|
|
3895
3899
|
};
|
|
3896
|
-
class
|
|
3900
|
+
class Wl {
|
|
3897
3901
|
constructor() {
|
|
3898
3902
|
w(this, "__forceAllowLocalhost", !1);
|
|
3899
3903
|
}
|
|
@@ -3910,14 +3914,14 @@ class fi {
|
|
|
3910
3914
|
return (e = (t = this.featureFlags) === null || t === void 0 ? void 0 : t.hasLoadedFlags) !== null && e !== void 0 && e;
|
|
3911
3915
|
}
|
|
3912
3916
|
constructor() {
|
|
3913
|
-
w(this, "webPerformance", new
|
|
3914
|
-
var s =
|
|
3917
|
+
w(this, "webPerformance", new Wl()), w(this, "_personProcessingSetOncePropertiesSent", !1), w(this, "version", Ce.LIB_VERSION), w(this, "_internalEventEmitter", new yo()), this.config = Js(), this.SentryIntegration = Ka, this.sentryIntegration = (e) => function(t, i) {
|
|
3918
|
+
var s = Mn(t, i);
|
|
3915
3919
|
return { name: Ln, processEvent: (n) => s(n) };
|
|
3916
|
-
}(this, e), this.__request_queue = [], this.__loaded = !1, this.analyticsDefaultEndpoint = "/e/", this._initialPageviewCaptured = !1, this._initialPersonProfilesConfig = null, this._cachedPersonProperties = null, this.featureFlags = new
|
|
3917
|
-
var s =
|
|
3920
|
+
}(this, e), this.__request_queue = [], this.__loaded = !1, this.analyticsDefaultEndpoint = "/e/", this._initialPageviewCaptured = !1, this._initialPersonProfilesConfig = null, this._cachedPersonProperties = null, this.featureFlags = new ml(this), this.toolbar = new Ya(this), this.scrollManager = new Ll(this), this.pageViewManager = new il(this), this.surveys = new Il(this), this.experiments = new G(this), this.exceptions = new rl(this), this.rateLimiter = new Pl(this), this.requestRouter = new Hl(this), this.consent = new _a(this), this.people = { set: (e, t, i) => {
|
|
3921
|
+
var s = H(e) ? { [e]: t } : e;
|
|
3918
3922
|
this.setPersonProperties(s), i == null || i({});
|
|
3919
3923
|
}, set_once: (e, t, i) => {
|
|
3920
|
-
var s =
|
|
3924
|
+
var s = H(e) ? { [e]: t } : e;
|
|
3921
3925
|
this.setPersonProperties(void 0, s), i == null || i({});
|
|
3922
3926
|
} }, this.on("eventCaptured", (e) => x.info('send "'.concat(e == null ? void 0 : e.event, '"'), e));
|
|
3923
3927
|
}
|
|
@@ -3930,11 +3934,11 @@ class fi {
|
|
|
3930
3934
|
}
|
|
3931
3935
|
_init(e) {
|
|
3932
3936
|
var t, i, s = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = arguments.length > 2 ? arguments[2] : void 0;
|
|
3933
|
-
if (S(e) ||
|
|
3937
|
+
if (S(e) || ji(e)) return x.critical("PostHog was initialized without a token. This likely indicates a misconfiguration. Please check the first argument passed to posthog.init()"), this;
|
|
3934
3938
|
if (this.__loaded) return x.warn("You have already initialized PostHog! Re-initializing is a no-op"), this;
|
|
3935
|
-
this.__loaded = !0, this.config = {}, this._triggered_notifs = [], s.person_profiles && (this._initialPersonProfilesConfig = s.person_profiles), this.set_config(
|
|
3939
|
+
this.__loaded = !0, this.config = {}, this._triggered_notifs = [], s.person_profiles && (this._initialPersonProfilesConfig = s.person_profiles), this.set_config(U({}, Js(), Ys(s), { name: n, token: e })), this.config.on_xhr_error && x.error("on_xhr_error is deprecated. Use on_request_error instead"), this.compression = s.disable_compression ? void 0 : ge.GZipJS, this.persistence = new Mi(this.config), this.sessionPersistence = this.config.persistence === "sessionStorage" || this.config.persistence === "memory" ? this.persistence : new Mi(f(f({}, this.config), {}, { persistence: "sessionStorage" }));
|
|
3936
3940
|
var o = f({}, this.persistence.props), a = f({}, this.sessionPersistence.props);
|
|
3937
|
-
if (this._requestQueue = new
|
|
3941
|
+
if (this._requestQueue = new $l((y) => this._send_retriable_request(y), this.config.request_queue_config), this._retryQueue = new Al(this), this.__request_queue = [], this.config.__preview_experimental_cookieless_mode || (this.sessionManager = new ql(this), this.sessionPropsManager = new Dl(this, this.sessionManager, this.persistence)), new Xa(this).startIfEnabledOrStop(), this.siteApps = new Bl(this), (t = this.siteApps) === null || t === void 0 || t.init(), this.config.__preview_experimental_cookieless_mode || (this.sessionRecording = new Va(this), this.sessionRecording.startIfEnabledOrStop()), this.config.disable_scroll_properties || this.scrollManager.startMeasuringScrollPosition(), this.autocapture = new ra(this), this.autocapture.startIfEnabled(), this.surveys.loadIfEnabled(), this.heatmaps = new tl(this), this.heatmaps.startIfEnabled(), this.webVitalsAutocapture = new Za(this), this.exceptionObserver = new ga(this), this.exceptionObserver.startIfEnabled(), this.deadClicksAutocapture = new kn(this, pa), this.deadClicksAutocapture.startIfEnabled(), this.historyAutocapture = new zl(this), this.historyAutocapture.startIfEnabled(), Ce.DEBUG = Ce.DEBUG || this.config.debug, Ce.DEBUG && x.info("Starting in debug mode", { this: this, config: s, thisC: f({}, this.config), p: o, s: a }), this._sync_opt_out_with_persistence(), ((i = s.bootstrap) === null || i === void 0 ? void 0 : i.distinctID) !== void 0) {
|
|
3938
3942
|
var l, c, d = this.config.get_device_id(Me()), u = (l = s.bootstrap) !== null && l !== void 0 && l.isIdentifiedID ? d : s.bootstrap.distinctID;
|
|
3939
3943
|
this.persistence.set_property(ke, (c = s.bootstrap) !== null && c !== void 0 && c.isIdentifiedID ? "identified" : "anonymous"), this.register({ distinct_id: s.bootstrap.distinctID, $device_id: u });
|
|
3940
3944
|
}
|
|
@@ -3951,12 +3955,12 @@ class fi {
|
|
|
3951
3955
|
}, {});
|
|
3952
3956
|
this.featureFlags.receivedFeatureFlags({ featureFlags: p, featureFlagPayloads: v });
|
|
3953
3957
|
}
|
|
3954
|
-
if (this.config.__preview_experimental_cookieless_mode) this.register_once({ distinct_id:
|
|
3958
|
+
if (this.config.__preview_experimental_cookieless_mode) this.register_once({ distinct_id: ts, $device_id: null }, "");
|
|
3955
3959
|
else if (!this.get_distinct_id()) {
|
|
3956
3960
|
var b = this.config.get_device_id(Me());
|
|
3957
3961
|
this.register_once({ distinct_id: b, $device_id: b }, ""), this.persistence.set_property(ke, "anonymous");
|
|
3958
3962
|
}
|
|
3959
|
-
return N(g, "onpagehide" in self ? "pagehide" : "unload", this._handle_unload.bind(this), { passive: !1 }), this.toolbar.maybeLoadToolbar(), s.segment ?
|
|
3963
|
+
return N(g, "onpagehide" in self ? "pagehide" : "unload", this._handle_unload.bind(this), { passive: !1 }), this.toolbar.maybeLoadToolbar(), s.segment ? Ga(this, () => this._loaded()) : this._loaded(), ce(this.config._onCapture) && this.config._onCapture !== mr && (x.warn("onCapture is deprecated. Please use `before_send` instead"), this.on("eventCaptured", (y) => this.config._onCapture(y.event, y))), this;
|
|
3960
3964
|
}
|
|
3961
3965
|
_onRemoteConfig(e) {
|
|
3962
3966
|
var t, i, s, n, o, a, l, c;
|
|
@@ -3973,7 +3977,7 @@ class fi {
|
|
|
3973
3977
|
}
|
|
3974
3978
|
this._start_queue_if_opted_in(), this.config.capture_pageview && setTimeout(() => {
|
|
3975
3979
|
this.consent.isOptedIn() && this._captureInitialPageview();
|
|
3976
|
-
}, 1), new
|
|
3980
|
+
}, 1), new Tl(this).load(), this.featureFlags.decide();
|
|
3977
3981
|
}
|
|
3978
3982
|
_start_queue_if_opted_in() {
|
|
3979
3983
|
var e;
|
|
@@ -3987,10 +3991,10 @@ class fi {
|
|
|
3987
3991
|
this.config.request_batching ? (this._shouldCapturePageleave() && this.capture("$pageleave"), (e = this._requestQueue) === null || e === void 0 || e.unload(), (t = this._retryQueue) === null || t === void 0 || t.unload()) : this._shouldCapturePageleave() && this.capture("$pageleave", null, { transport: "sendBeacon" });
|
|
3988
3992
|
}
|
|
3989
3993
|
_send_request(e) {
|
|
3990
|
-
this.__loaded && (
|
|
3994
|
+
this.__loaded && (wo ? this.__request_queue.push(e) : this.rateLimiter.isServerRateLimited(e.batchKey) || (e.transport = e.transport || this.config.api_transport, e.url = ci(e.url, { ip: this.config.ip ? 1 : 0 }), e.headers = f({}, this.config.request_headers), e.compression = e.compression === "best-available" ? this.compression : e.compression, e.fetchOptions = e.fetchOptions || this.config.fetch_options, ((t) => {
|
|
3991
3995
|
var i, s, n, o = f({}, t);
|
|
3992
3996
|
o.timeout = o.timeout || 6e4, o.url = ci(o.url, { _: (/* @__PURE__ */ new Date()).getTime().toString(), ver: Ce.LIB_VERSION, compression: o.compression });
|
|
3993
|
-
var a = (i = o.transport) !== null && i !== void 0 ? i : "fetch", l = (s = (n =
|
|
3997
|
+
var a = (i = o.transport) !== null && i !== void 0 ? i : "fetch", l = (s = (n = an(Tt, (c) => c.transport === a)) === null || n === void 0 ? void 0 : n.method) !== null && s !== void 0 ? s : Tt[0].method;
|
|
3994
3998
|
if (!l) throw new Error("No available transport method");
|
|
3995
3999
|
l(o);
|
|
3996
4000
|
})(f(f({}, e), {}, { callback: (t) => {
|
|
@@ -4028,15 +4032,15 @@ class fi {
|
|
|
4028
4032
|
capture(e, t, i) {
|
|
4029
4033
|
var s;
|
|
4030
4034
|
if (this.__loaded && this.persistence && this.sessionPersistence && this._requestQueue) {
|
|
4031
|
-
if (!this.consent.isOptedOut()) if (!S(e) &&
|
|
4035
|
+
if (!this.consent.isOptedOut()) if (!S(e) && H(e)) {
|
|
4032
4036
|
if (this.config.opt_out_useragent_filter || !this._is_bot()) {
|
|
4033
4037
|
var n = i != null && i.skip_client_rate_limiting ? void 0 : this.rateLimiter.clientRateLimitContext();
|
|
4034
4038
|
if (n == null || !n.isRateLimited) {
|
|
4035
|
-
t != null && t.$current_url && !
|
|
4039
|
+
t != null && t.$current_url && !H(t == null ? void 0 : t.$current_url) && (x.error("Invalid `$current_url` property provided to `posthog.capture`. Input must be a string. Ignoring provided value."), t == null || delete t.$current_url), this.sessionPersistence.update_search_keyword(), this.config.save_campaign_params && this.sessionPersistence.update_campaign_params(), this.config.save_referrer && this.sessionPersistence.update_referrer_info(), (this.config.save_campaign_params || this.config.save_referrer) && this.persistence.set_initial_person_info();
|
|
4036
4040
|
var o = /* @__PURE__ */ new Date(), a = (i == null ? void 0 : i.timestamp) || o, l = Me(), c = { uuid: l, event: e, properties: this._calculate_event_properties(e, t || {}, a, l) };
|
|
4037
4041
|
n && (c.properties.$lib_rate_limit_remaining_tokens = n.remainingTokens), i != null && i.$set && (c.$set = i == null ? void 0 : i.$set);
|
|
4038
4042
|
var d = this._calculate_set_once_properties(i == null ? void 0 : i.$set_once);
|
|
4039
|
-
d && (c.$set_once = d), (c =
|
|
4043
|
+
d && (c.$set_once = d), (c = Uo(c, i != null && i._noTruncate ? null : this.config.properties_string_max_length)).timestamp = a, S(i == null ? void 0 : i.timestamp) || (c.properties.$event_time_override_provided = !0, c.properties.$event_time_override_system_time = o);
|
|
4040
4044
|
var u = f(f({}, c.properties.$set), c.$set);
|
|
4041
4045
|
if (nt(u) || this.setPersonPropertiesForFlags(u), !R(this.config.before_send)) {
|
|
4042
4046
|
var h = this._runBeforeSend(c);
|
|
@@ -4060,25 +4064,25 @@ class fi {
|
|
|
4060
4064
|
var n = this.persistence.remove_event_timer(e), o = f({}, t);
|
|
4061
4065
|
if (o.token = this.config.token, this.config.__preview_experimental_cookieless_mode && (o.$cookieless_mode = !0), e === "$snapshot") {
|
|
4062
4066
|
var a = f(f({}, this.persistence.properties()), this.sessionPersistence.properties());
|
|
4063
|
-
return o.distinct_id = a.distinct_id, (!
|
|
4067
|
+
return o.distinct_id = a.distinct_id, (!H(o.distinct_id) && !Y(o.distinct_id) || ji(o.distinct_id)) && x.error("Invalid distinct_id for replay event. This indicates a bug in your implementation"), o;
|
|
4064
4068
|
}
|
|
4065
|
-
var l, c =
|
|
4069
|
+
var l, c = vl(this.config.mask_personal_data_properties, this.config.custom_personal_data_properties);
|
|
4066
4070
|
if (this.sessionManager) {
|
|
4067
4071
|
var { sessionId: d, windowId: u } = this.sessionManager.checkAndGetSessionAndWindowId();
|
|
4068
4072
|
o.$session_id = d, o.$window_id = u;
|
|
4069
4073
|
}
|
|
4070
|
-
this.sessionPropsManager &&
|
|
4074
|
+
this.sessionPropsManager && U(o, this.sessionPropsManager.getSessionProps());
|
|
4071
4075
|
try {
|
|
4072
4076
|
var h;
|
|
4073
|
-
this.sessionRecording &&
|
|
4077
|
+
this.sessionRecording && U(o, this.sessionRecording.sdkDebugProperties), o.$sdk_debug_retry_queue_size = (h = this._retryQueue) === null || h === void 0 ? void 0 : h.length;
|
|
4074
4078
|
} catch (b) {
|
|
4075
4079
|
o.$sdk_debug_error_capturing_properties = String(b);
|
|
4076
4080
|
}
|
|
4077
|
-
if (this.requestRouter.region === Qe.CUSTOM && (o.$lib_custom_api_host = this.config.api_host), l = e === "$pageview" ? this.pageViewManager.doPageView(i, s) : e === "$pageleave" ? this.pageViewManager.doPageLeave(i) : this.pageViewManager.doEvent(), o =
|
|
4081
|
+
if (this.requestRouter.region === Qe.CUSTOM && (o.$lib_custom_api_host = this.config.api_host), l = e === "$pageview" ? this.pageViewManager.doPageView(i, s) : e === "$pageleave" ? this.pageViewManager.doPageLeave(i) : this.pageViewManager.doEvent(), o = U(o, l), e === "$pageview" && k && (o.title = k.title), !S(n)) {
|
|
4078
4082
|
var _ = i.getTime() - n;
|
|
4079
4083
|
o.$duration = parseFloat((_ / 1e3).toFixed(3));
|
|
4080
4084
|
}
|
|
4081
|
-
|
|
4085
|
+
K && this.config.opt_out_useragent_filter && (o.$browser_type = this._is_bot() ? "bot" : "browser"), (o = U({}, c, this.persistence.properties(), this.sessionPersistence.properties(), o)).$is_identified = this._isIdentified(), D(this.config.property_denylist) ? $(this.config.property_denylist, function(b) {
|
|
4082
4086
|
delete o[b];
|
|
4083
4087
|
}) : x.error("Invalid value for property_denylist config: " + this.config.property_denylist + " or property_blacklist config: " + this.config.property_blacklist);
|
|
4084
4088
|
var p = this.config.sanitize_properties;
|
|
@@ -4089,7 +4093,7 @@ class fi {
|
|
|
4089
4093
|
_calculate_set_once_properties(e) {
|
|
4090
4094
|
var t;
|
|
4091
4095
|
if (!this.persistence || !this._hasPersonProcessing() || this._personProcessingSetOncePropertiesSent) return e;
|
|
4092
|
-
var i = this.persistence.get_initial_props(), s = (t = this.sessionPropsManager) === null || t === void 0 ? void 0 : t.getSetOnceProps(), n =
|
|
4096
|
+
var i = this.persistence.get_initial_props(), s = (t = this.sessionPropsManager) === null || t === void 0 ? void 0 : t.getSetOnceProps(), n = U({}, i, s || {}, e || {}), o = this.config.sanitize_properties;
|
|
4093
4097
|
return o && (x.error("sanitize_properties is deprecated. Use before_send instead"), n = o(n, "$set_once")), this._personProcessingSetOncePropertiesSent = !0, nt(n) ? void 0 : n;
|
|
4094
4098
|
}
|
|
4095
4099
|
register(e, t) {
|
|
@@ -4183,13 +4187,13 @@ class fi {
|
|
|
4183
4187
|
}
|
|
4184
4188
|
e !== s && e !== this.get_property(wt) && (this.unregister(wt), this.register({ distinct_id: e }));
|
|
4185
4189
|
var o = (this.persistence.get_property(ke) || "anonymous") === "anonymous";
|
|
4186
|
-
e !== s && o ? (this.persistence.set_property(ke, "identified"), this.setPersonPropertiesForFlags(f(f({}, i || {}), t || {}), !1), this.capture("$identify", { distinct_id: e, $anon_distinct_id: s }, { $set: t || {}, $set_once: i || {} }), this._cachedPersonProperties =
|
|
4190
|
+
e !== s && o ? (this.persistence.set_property(ke, "identified"), this.setPersonPropertiesForFlags(f(f({}, i || {}), t || {}), !1), this.capture("$identify", { distinct_id: e, $anon_distinct_id: s }, { $set: t || {}, $set_once: i || {} }), this._cachedPersonProperties = Vs(e, t, i), this.featureFlags.setAnonymousDistinctId(s)) : (t || i) && this.setPersonProperties(t, i), e !== s && (this.reloadFeatureFlags(), this.unregister(ei));
|
|
4187
4191
|
}
|
|
4188
4192
|
} else x.error("Unique user id has not been set in posthog.identify");
|
|
4189
4193
|
}
|
|
4190
4194
|
setPersonProperties(e, t) {
|
|
4191
4195
|
if ((e || t) && this._requirePersonProcessing("posthog.setPersonProperties")) {
|
|
4192
|
-
var i =
|
|
4196
|
+
var i = Vs(this.get_distinct_id(), e, t);
|
|
4193
4197
|
this._cachedPersonProperties !== i ? (this.setPersonPropertiesForFlags(f(f({}, t || {}), e || {})), this.capture("$set", { $set: e || {}, $set_once: t || {} }), this._cachedPersonProperties = i) : x.info("A duplicate setPersonProperties call was made with the same properties. It has been ignored.");
|
|
4194
4198
|
}
|
|
4195
4199
|
}
|
|
@@ -4222,7 +4226,7 @@ class fi {
|
|
|
4222
4226
|
var t, i, s, n;
|
|
4223
4227
|
if (x.info("reset"), !this.__loaded) return x.uninitializedWarning("posthog.reset");
|
|
4224
4228
|
var o = this.get_property("$device_id");
|
|
4225
|
-
if (this.consent.reset(), (t = this.persistence) === null || t === void 0 || t.clear(), (i = this.sessionPersistence) === null || i === void 0 || i.clear(), this.surveys.reset(), (s = this.persistence) === null || s === void 0 || s.set_property(ke, "anonymous"), (n = this.sessionManager) === null || n === void 0 || n.resetSessionId(), this._cachedPersonProperties = null, this.config.__preview_experimental_cookieless_mode) this.register_once({ distinct_id:
|
|
4229
|
+
if (this.consent.reset(), (t = this.persistence) === null || t === void 0 || t.clear(), (i = this.sessionPersistence) === null || i === void 0 || i.clear(), this.surveys.reset(), (s = this.persistence) === null || s === void 0 || s.set_property(ke, "anonymous"), (n = this.sessionManager) === null || n === void 0 || n.resetSessionId(), this._cachedPersonProperties = null, this.config.__preview_experimental_cookieless_mode) this.register_once({ distinct_id: ts, $device_id: null }, "");
|
|
4226
4230
|
else {
|
|
4227
4231
|
var a = this.config.get_device_id(Me());
|
|
4228
4232
|
this.register_once({ distinct_id: a, $device_id: e ? a : o }, "");
|
|
@@ -4251,11 +4255,11 @@ class fi {
|
|
|
4251
4255
|
return s;
|
|
4252
4256
|
}
|
|
4253
4257
|
alias(e, t) {
|
|
4254
|
-
return e === this.get_property(
|
|
4258
|
+
return e === this.get_property(ln) ? (x.critical("Attempting to create alias for existing People user - aborting."), -2) : this._requirePersonProcessing("posthog.alias") ? (S(t) && (t = this.get_distinct_id()), e !== t ? (this._register_single(wt, e), this.capture("$create_alias", { alias: e, distinct_id: t })) : (x.warn("alias matches current distinct_id - skipping api call."), this.identify(e), -1)) : void 0;
|
|
4255
4259
|
}
|
|
4256
4260
|
set_config(e) {
|
|
4257
4261
|
var t, i, s, n, o = f({}, this.config);
|
|
4258
|
-
q(e) && (
|
|
4262
|
+
q(e) && (U(this.config, Ys(e)), (t = this.persistence) === null || t === void 0 || t.update_config(this.config, o), this.sessionPersistence = this.config.persistence === "sessionStorage" || this.config.persistence === "memory" ? this.persistence : new Mi(f(f({}, this.config), {}, { persistence: "sessionStorage" })), j.is_supported() && j.get("ph_debug") === "true" && (this.config.debug = !0), this.config.debug && (Ce.DEBUG = !0, x.info("set_config", JSON.stringify({ config: e, oldConfig: o, newConfig: f({}, this.config) }, null, 2))), (i = this.sessionRecording) === null || i === void 0 || i.startIfEnabledOrStop(), (s = this.autocapture) === null || s === void 0 || s.startIfEnabled(), (n = this.heatmaps) === null || n === void 0 || n.startIfEnabled(), this.surveys.loadIfEnabled(), this._sync_opt_out_with_persistence());
|
|
4259
4263
|
}
|
|
4260
4264
|
startSessionRecording(e) {
|
|
4261
4265
|
var t = e === !0, i = { sampling: t || !(e == null || !e.sampling), linked_flag: t || !(e == null || !e.linked_flag), url_trigger: t || !(e == null || !e.url_trigger), event_trigger: t || !(e == null || !e.event_trigger) };
|
|
@@ -4274,7 +4278,7 @@ class fi {
|
|
|
4274
4278
|
}
|
|
4275
4279
|
captureException(e, t) {
|
|
4276
4280
|
var i = new Error("PostHog syntheticException");
|
|
4277
|
-
this.exceptions.sendExceptionEvent(f(f({},
|
|
4281
|
+
this.exceptions.sendExceptionEvent(f(f({}, Pa(((s) => s instanceof Error)(e) ? { error: e, event: e.message } : { event: e }, { syntheticException: i })), t));
|
|
4278
4282
|
}
|
|
4279
4283
|
loadToolbar(e) {
|
|
4280
4284
|
return this.toolbar.loadToolbar(e);
|
|
@@ -4329,7 +4333,7 @@ class fi {
|
|
|
4329
4333
|
this.consent.reset(), this._sync_opt_out_with_persistence();
|
|
4330
4334
|
}
|
|
4331
4335
|
_is_bot() {
|
|
4332
|
-
return ne ?
|
|
4336
|
+
return ne ? bo(ne, this.config.custom_blocked_useragents) : void 0;
|
|
4333
4337
|
}
|
|
4334
4338
|
_captureInitialPageview() {
|
|
4335
4339
|
k && !this._initialPageviewCaptured && (this._initialPageviewCaptured = !0, this.capture("$pageview", { title: k.title }, { send_instantly: !0 }));
|
|
@@ -4343,7 +4347,7 @@ class fi {
|
|
|
4343
4347
|
for (var s of t) {
|
|
4344
4348
|
if (i = s(i), R(i)) {
|
|
4345
4349
|
var n = "Event '".concat(e.event, "' was rejected in beforeSend function");
|
|
4346
|
-
return
|
|
4350
|
+
return qo(e.event) ? x.warn("".concat(n, ". This can cause unexpected behavior.")) : x.info(n), null;
|
|
4347
4351
|
}
|
|
4348
4352
|
i.properties && !nt(i.properties) || x.warn("Event '".concat(e.event, "' has no properties after beforeSend function, this is likely an error."));
|
|
4349
4353
|
}
|
|
@@ -4361,22 +4365,22 @@ class fi {
|
|
|
4361
4365
|
}
|
|
4362
4366
|
}
|
|
4363
4367
|
(function(r, e) {
|
|
4364
|
-
for (var t = 0; t < e.length; t++) r.prototype[e[t]] =
|
|
4368
|
+
for (var t = 0; t < e.length; t++) r.prototype[e[t]] = Bo(r.prototype[e[t]]);
|
|
4365
4369
|
})(fi, ["identify"]);
|
|
4366
|
-
var
|
|
4367
|
-
|
|
4370
|
+
var Qs;
|
|
4371
|
+
Qs = Ft[st] = new fi(), function() {
|
|
4368
4372
|
function r() {
|
|
4369
|
-
r.done || (r.done = !0,
|
|
4373
|
+
r.done || (r.done = !0, wo = !1, $(Ft, function(e) {
|
|
4370
4374
|
e._dom_loaded();
|
|
4371
4375
|
}));
|
|
4372
4376
|
}
|
|
4373
4377
|
k != null && k.addEventListener ? k.readyState === "complete" ? r() : N(k, "DOMContentLoaded", r, { capture: !1 }) : g && x.error("Browser doesn't support `document.addEventListener` so PostHog couldn't be initialized");
|
|
4374
4378
|
}();
|
|
4375
|
-
var
|
|
4379
|
+
var Xs;
|
|
4376
4380
|
(function(r) {
|
|
4377
4381
|
r.USER_ADDED_TO_CART = "user_added_to_cart", r.USER_SUBMITTED_CHECKOUT = "user_submitted_checkout";
|
|
4378
|
-
})(
|
|
4379
|
-
const
|
|
4382
|
+
})(Xs || (Xs = {}));
|
|
4383
|
+
const Vl = { class: "dialog-block-header-container" }, Gl = { class: "dialog-block-title" }, Kl = { class: "dialog-block-description" }, Jl = /* @__PURE__ */ Ue({
|
|
4380
4384
|
__name: "DialogBlockHeader",
|
|
4381
4385
|
props: {
|
|
4382
4386
|
title: {},
|
|
@@ -4384,9 +4388,9 @@ const Wl = { class: "dialog-block-header-container" }, Vl = { class: "dialog-blo
|
|
|
4384
4388
|
},
|
|
4385
4389
|
setup(r) {
|
|
4386
4390
|
const e = r;
|
|
4387
|
-
return (t, i) => (ue(), Be("div",
|
|
4388
|
-
|
|
4389
|
-
|
|
4391
|
+
return (t, i) => (ue(), Be("div", Vl, [
|
|
4392
|
+
J("div", Gl, Ni(e.title ?? "Your expert"), 1),
|
|
4393
|
+
J("div", Kl, Ni(e.description ?? "A question about this product?"), 1)
|
|
4390
4394
|
]));
|
|
4391
4395
|
}
|
|
4392
4396
|
}), vt = (r, e) => {
|
|
@@ -4394,22 +4398,22 @@ const Wl = { class: "dialog-block-header-container" }, Vl = { class: "dialog-blo
|
|
|
4394
4398
|
for (const [i, s] of e)
|
|
4395
4399
|
t[i] = s;
|
|
4396
4400
|
return t;
|
|
4397
|
-
},
|
|
4401
|
+
}, Yl = /* @__PURE__ */ vt(Jl, [["__scopeId", "data-v-6abd4066"]]), Ql = {
|
|
4398
4402
|
width: "20",
|
|
4399
4403
|
height: "20",
|
|
4400
4404
|
viewBox: "0 0 20 20",
|
|
4401
4405
|
fill: "none",
|
|
4402
4406
|
xmlns: "http://www.w3.org/2000/svg"
|
|
4403
|
-
},
|
|
4407
|
+
}, Xl = { "clip-path": "url(#clip0_466_934)" }, Zl = ["stroke"], eu = ["stroke"], tu = /* @__PURE__ */ Ue({
|
|
4404
4408
|
__name: "AiStarsIcon",
|
|
4405
4409
|
props: {
|
|
4406
4410
|
color: {}
|
|
4407
4411
|
},
|
|
4408
4412
|
setup(r) {
|
|
4409
4413
|
const e = r;
|
|
4410
|
-
return (t, i) => (ue(), Be("svg",
|
|
4411
|
-
|
|
4412
|
-
|
|
4414
|
+
return (t, i) => (ue(), Be("svg", Ql, [
|
|
4415
|
+
J("g", Xl, [
|
|
4416
|
+
J("path", {
|
|
4413
4417
|
d: `M5.41675 10.8333L6.07046 12.1408C6.2917 12.5832 6.40232 12.8045 6.55011
|
|
4414
4418
|
12.9962C6.68124 13.1663 6.83375 13.3188 7.00388 13.45C7.19559 13.5977 7.41684
|
|
4415
4419
|
13.7084 7.85932 13.9296L9.16675 14.5833L7.85932 15.237C7.41684 15.4583 7.19559
|
|
@@ -4424,8 +4428,8 @@ const Wl = { class: "dialog-block-header-container" }, Vl = { class: "dialog-blo
|
|
|
4424
4428
|
"stroke-width": "1.5",
|
|
4425
4429
|
"stroke-linecap": "round",
|
|
4426
4430
|
"stroke-linejoin": "round"
|
|
4427
|
-
}, null, 8,
|
|
4428
|
-
|
|
4431
|
+
}, null, 8, Zl),
|
|
4432
|
+
J("path", {
|
|
4429
4433
|
d: `M12.5001 1.66666L13.4823 4.22034C13.7173 4.83136 13.8348 5.13688 14.0175
|
|
4430
4434
|
5.39386C14.1795 5.62162 14.3785 5.82061 14.6062 5.98256C14.8632 6.16529 15.1687
|
|
4431
4435
|
6.2828 15.7797 6.5178L18.3334 7.49999L15.7797 8.48217C15.1687 8.71718 14.8632
|
|
@@ -4440,11 +4444,11 @@ const Wl = { class: "dialog-block-header-container" }, Vl = { class: "dialog-blo
|
|
|
4440
4444
|
"stroke-width": "1.5",
|
|
4441
4445
|
"stroke-linecap": "round",
|
|
4442
4446
|
"stroke-linejoin": "round"
|
|
4443
|
-
}, null, 8,
|
|
4447
|
+
}, null, 8, eu)
|
|
4444
4448
|
]),
|
|
4445
|
-
i[0] || (i[0] =
|
|
4446
|
-
|
|
4447
|
-
|
|
4449
|
+
i[0] || (i[0] = J("defs", null, [
|
|
4450
|
+
J("clipPath", { id: "clip0_466_934" }, [
|
|
4451
|
+
J("rect", {
|
|
4448
4452
|
width: "20",
|
|
4449
4453
|
height: "20",
|
|
4450
4454
|
fill: "white"
|
|
@@ -4453,7 +4457,7 @@ const Wl = { class: "dialog-block-header-container" }, Vl = { class: "dialog-blo
|
|
|
4453
4457
|
], -1))
|
|
4454
4458
|
]));
|
|
4455
4459
|
}
|
|
4456
|
-
}),
|
|
4460
|
+
}), iu = ["onClick"], ru = { class: "dialog-block-suggestions-item-label" }, su = /* @__PURE__ */ Ue({
|
|
4457
4461
|
__name: "DialogBlockSuggestions",
|
|
4458
4462
|
props: {
|
|
4459
4463
|
client: {},
|
|
@@ -4472,27 +4476,27 @@ const Wl = { class: "dialog-block-header-container" }, Vl = { class: "dialog-blo
|
|
|
4472
4476
|
fromQuestionSuggestion: !0
|
|
4473
4477
|
});
|
|
4474
4478
|
};
|
|
4475
|
-
return (i, s) => (ue(!0), Be(
|
|
4479
|
+
return (i, s) => (ue(!0), Be(Zs, null, Co(e.questions, (n) => (ue(), Be("button", {
|
|
4476
4480
|
key: n.question,
|
|
4477
4481
|
class: "dialog-block-suggestions-item",
|
|
4478
4482
|
onClick: (o) => t(n.question)
|
|
4479
4483
|
}, [
|
|
4480
|
-
|
|
4484
|
+
Kt(tu, {
|
|
4481
4485
|
class: "dialog-block-suggestions-item-icon",
|
|
4482
4486
|
color: e.client.theme.primaryColor
|
|
4483
4487
|
}, null, 8, ["color"]),
|
|
4484
|
-
|
|
4485
|
-
], 8,
|
|
4486
|
-
}
|
|
4487
|
-
}),
|
|
4488
|
-
function
|
|
4489
|
-
return ue(), Be(
|
|
4490
|
-
e[0] || (e[0] =
|
|
4491
|
-
e[1] || (e[1] =
|
|
4492
|
-
e[2] || (e[2] =
|
|
4488
|
+
J("span", ru, Ni(n.question), 1)
|
|
4489
|
+
], 8, iu))), 128));
|
|
4490
|
+
}
|
|
4491
|
+
}), nu = /* @__PURE__ */ vt(su, [["__scopeId", "data-v-7a20db67"]]), ou = {};
|
|
4492
|
+
function au(r, e) {
|
|
4493
|
+
return ue(), Be(Zs, null, [
|
|
4494
|
+
e[0] || (e[0] = J("div", { class: "dialog-block-suggestions-skeleton-item" }, null, -1)),
|
|
4495
|
+
e[1] || (e[1] = J("div", { class: "dialog-block-suggestions-skeleton-item" }, null, -1)),
|
|
4496
|
+
e[2] || (e[2] = J("div", { class: "dialog-block-suggestions-skeleton-item" }, null, -1))
|
|
4493
4497
|
], 64);
|
|
4494
4498
|
}
|
|
4495
|
-
const
|
|
4499
|
+
const lu = /* @__PURE__ */ vt(ou, [["render", au], ["__scopeId", "data-v-26a64b58"]]), uu = { class: "dialog-block-suggestions-container" }, cu = /* @__PURE__ */ Ue({
|
|
4496
4500
|
__name: "DialogBlockSuggestionsContainer",
|
|
4497
4501
|
props: {
|
|
4498
4502
|
client: {},
|
|
@@ -4504,8 +4508,8 @@ const au = /* @__PURE__ */ vt(nu, [["render", ou], ["__scopeId", "data-v-26a64b5
|
|
|
4504
4508
|
},
|
|
4505
4509
|
setup(r) {
|
|
4506
4510
|
const e = r;
|
|
4507
|
-
return (t, i) => (ue(), Be("div",
|
|
4508
|
-
e.isLoading || !e.questions ? (ue(),
|
|
4511
|
+
return (t, i) => (ue(), Be("div", uu, [
|
|
4512
|
+
e.isLoading || !e.questions ? (ue(), Jt(lu, { key: 0 })) : (ue(), Jt(nu, {
|
|
4509
4513
|
key: 1,
|
|
4510
4514
|
client: e.client,
|
|
4511
4515
|
questions: e.questions,
|
|
@@ -4515,30 +4519,30 @@ const au = /* @__PURE__ */ vt(nu, [["render", ou], ["__scopeId", "data-v-26a64b5
|
|
|
4515
4519
|
}, null, 8, ["client", "questions", "product-id", "product-title", "selected-variant-id"]))
|
|
4516
4520
|
]));
|
|
4517
4521
|
}
|
|
4518
|
-
}),
|
|
4522
|
+
}), du = /* @__PURE__ */ vt(cu, [["__scopeId", "data-v-4509a683"]]), _u = {
|
|
4519
4523
|
width: "20",
|
|
4520
4524
|
height: "20",
|
|
4521
4525
|
viewBox: "0 0 20 20",
|
|
4522
4526
|
fill: "none",
|
|
4523
4527
|
xmlns: "http://www.w3.org/2000/svg"
|
|
4524
|
-
},
|
|
4528
|
+
}, hu = ["stroke"], pu = /* @__PURE__ */ Ue({
|
|
4525
4529
|
__name: "ArrowIcon",
|
|
4526
4530
|
props: {
|
|
4527
4531
|
color: {}
|
|
4528
4532
|
},
|
|
4529
4533
|
setup(r) {
|
|
4530
4534
|
const e = r;
|
|
4531
|
-
return (t, i) => (ue(), Be("svg",
|
|
4532
|
-
|
|
4535
|
+
return (t, i) => (ue(), Be("svg", _u, [
|
|
4536
|
+
J("path", {
|
|
4533
4537
|
d: "M10 16.6667V3.33334M10 3.33334L5 8.33334M10 3.33334L15 8.33334",
|
|
4534
4538
|
stroke: e.color || "#ffffff",
|
|
4535
4539
|
"stroke-width": "1.5",
|
|
4536
4540
|
"stroke-linecap": "round",
|
|
4537
4541
|
"stroke-linejoin": "round"
|
|
4538
|
-
}, null, 8,
|
|
4542
|
+
}, null, 8, hu)
|
|
4539
4543
|
]));
|
|
4540
4544
|
}
|
|
4541
|
-
}),
|
|
4545
|
+
}), gu = ["placeholder"], vu = ["disabled"], fu = /* @__PURE__ */ Ue({
|
|
4542
4546
|
__name: "DialogInput",
|
|
4543
4547
|
props: {
|
|
4544
4548
|
client: {},
|
|
@@ -4565,30 +4569,30 @@ const au = /* @__PURE__ */ vt(nu, [["render", ou], ["__scopeId", "data-v-26a64b5
|
|
|
4565
4569
|
class: "dialog-input-wrapper",
|
|
4566
4570
|
onClick: s
|
|
4567
4571
|
}, [
|
|
4568
|
-
|
|
4572
|
+
Io(J("input", {
|
|
4569
4573
|
id: "dialog-ask-anything-input-ai-input",
|
|
4570
4574
|
ref_key: "inputRef",
|
|
4571
4575
|
ref: t,
|
|
4572
4576
|
"onUpdate:modelValue": a[0] || (a[0] = (l) => i.value = l),
|
|
4573
4577
|
class: "dialog-ask-anything-input-ai-input",
|
|
4574
4578
|
placeholder: e.placeholder ?? "Ask anything...",
|
|
4575
|
-
onKeydown:
|
|
4576
|
-
}, null, 40,
|
|
4577
|
-
[
|
|
4579
|
+
onKeydown: Po(n, ["enter"])
|
|
4580
|
+
}, null, 40, gu), [
|
|
4581
|
+
[To, i.value]
|
|
4578
4582
|
]),
|
|
4579
|
-
|
|
4583
|
+
J("button", {
|
|
4580
4584
|
id: "send-message-button-ai-input",
|
|
4581
4585
|
class: "dialog-input-submit",
|
|
4582
4586
|
disabled: !i.value.trim(),
|
|
4583
4587
|
onClick: n
|
|
4584
4588
|
}, [
|
|
4585
|
-
|
|
4589
|
+
Kt(pu, {
|
|
4586
4590
|
color: e.client.theme.ctaTextColor
|
|
4587
4591
|
}, null, 8, ["color"])
|
|
4588
|
-
], 8,
|
|
4592
|
+
], 8, vu)
|
|
4589
4593
|
]));
|
|
4590
4594
|
}
|
|
4591
|
-
}),
|
|
4595
|
+
}), mu = /* @__PURE__ */ vt(fu, [["__scopeId", "data-v-c5beb945"]]), yu = /* @__PURE__ */ Ue({
|
|
4592
4596
|
__name: "ThemeProvider",
|
|
4593
4597
|
props: {
|
|
4594
4598
|
theme: {}
|
|
@@ -4624,17 +4628,17 @@ const au = /* @__PURE__ */ vt(nu, [["render", ou], ["__scopeId", "data-v-26a64b5
|
|
|
4624
4628
|
}
|
|
4625
4629
|
});
|
|
4626
4630
|
};
|
|
4627
|
-
return
|
|
4631
|
+
return en(() => {
|
|
4628
4632
|
e.theme && s(e.theme);
|
|
4629
|
-
}),
|
|
4633
|
+
}), Fo(
|
|
4630
4634
|
() => e.theme,
|
|
4631
4635
|
(n) => {
|
|
4632
4636
|
n && s(n);
|
|
4633
4637
|
},
|
|
4634
4638
|
{ deep: !0 }
|
|
4635
|
-
), (n, o) =>
|
|
4639
|
+
), (n, o) => Ro(n.$slots, "default");
|
|
4636
4640
|
}
|
|
4637
|
-
}),
|
|
4641
|
+
}), bu = { class: "dialog-block-container" }, wu = /* @__PURE__ */ Ue({
|
|
4638
4642
|
__name: "DialogProductBlock",
|
|
4639
4643
|
props: {
|
|
4640
4644
|
client: {},
|
|
@@ -4661,20 +4665,20 @@ const au = /* @__PURE__ */ vt(nu, [["render", ou], ["__scopeId", "data-v-26a64b5
|
|
|
4661
4665
|
console.error("error", l);
|
|
4662
4666
|
}
|
|
4663
4667
|
};
|
|
4664
|
-
return
|
|
4668
|
+
return en(async () => {
|
|
4665
4669
|
await a();
|
|
4666
|
-
}), (l, c) => (ue(),
|
|
4670
|
+
}), (l, c) => (ue(), Jt(yu, {
|
|
4667
4671
|
theme: e.client.theme
|
|
4668
4672
|
}, {
|
|
4669
|
-
default:
|
|
4673
|
+
default: $o(() => {
|
|
4670
4674
|
var d;
|
|
4671
4675
|
return [
|
|
4672
|
-
|
|
4673
|
-
|
|
4676
|
+
J("div", bu, [
|
|
4677
|
+
Kt(Yl, {
|
|
4674
4678
|
title: s.value,
|
|
4675
4679
|
description: n.value
|
|
4676
4680
|
}, null, 8, ["title", "description"]),
|
|
4677
|
-
|
|
4681
|
+
Kt(du, {
|
|
4678
4682
|
client: e.client,
|
|
4679
4683
|
questions: (d = i.value) == null ? void 0 : d.questions,
|
|
4680
4684
|
"is-loading": t.value,
|
|
@@ -4682,22 +4686,22 @@ const au = /* @__PURE__ */ vt(nu, [["render", ou], ["__scopeId", "data-v-26a64b5
|
|
|
4682
4686
|
"product-title": e.productTitle,
|
|
4683
4687
|
"selected-variant-id": e == null ? void 0 : e.selectedVariantId
|
|
4684
4688
|
}, null, 8, ["client", "questions", "is-loading", "product-id", "product-title", "selected-variant-id"]),
|
|
4685
|
-
e.enableInput ? (ue(),
|
|
4689
|
+
e.enableInput ? (ue(), Jt(mu, {
|
|
4686
4690
|
key: 0,
|
|
4687
4691
|
client: e.client,
|
|
4688
4692
|
placeholder: o.value,
|
|
4689
4693
|
"product-id": e.productId,
|
|
4690
4694
|
"product-title": e.productTitle,
|
|
4691
4695
|
"selected-variant-id": e == null ? void 0 : e.selectedVariantId
|
|
4692
|
-
}, null, 8, ["client", "placeholder", "product-id", "product-title", "selected-variant-id"])) :
|
|
4696
|
+
}, null, 8, ["client", "placeholder", "product-id", "product-title", "selected-variant-id"])) : Oo("", !0)
|
|
4693
4697
|
])
|
|
4694
4698
|
];
|
|
4695
4699
|
}),
|
|
4696
4700
|
_: 1
|
|
4697
4701
|
}, 8, ["theme"]));
|
|
4698
4702
|
}
|
|
4699
|
-
}),
|
|
4703
|
+
}), ku = /* @__PURE__ */ vt(wu, [["__scopeId", "data-v-6616d39e"]]);
|
|
4700
4704
|
export {
|
|
4701
|
-
|
|
4702
|
-
|
|
4705
|
+
mu as DialogInput,
|
|
4706
|
+
ku as DialogProductBlock
|
|
4703
4707
|
};
|