-
-
Save laverdet/fe5b7016e1f8a5271dad89863d9738e2 to your computer and use it in GitHub Desktop.
tiktok payload
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; | |
(function() { | |
var bd_global = typeof window !== 'undefined'? window : typeof bd_global !== 'undefined' ? bd_global : typeof self !== 'undefined' ? self : {}; | |
function guid() { | |
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { | |
var r = Math.random()*16|0, v = c == 'x' ? r : (r&0x3|0x8); | |
return v.toString(16); | |
}); | |
} | |
var currentNaviID = guid(); | |
function needReport(params) { | |
if (window.location.href === 'about:blank') { | |
return false; | |
} | |
return true; | |
} | |
// pv | |
function jsIESLiveTimingMonitorReportStage(params, service) { | |
if (!needReport(params)) { | |
return | |
} | |
params.serviceType = service | |
if (window.webkit) { | |
window.webkit.messageHandlers.iesLiveTimingMonitorReportStage.postMessage(formatMonitorParams(params)); | |
} else if (window.iesLiveTimingMonitorReportStage) { | |
iesLiveTimingMonitorReportStage(formatMonitorParams(params)); | |
} | |
} | |
function formatMonitorParams(params) { | |
if (window.history.length <= 1) { | |
params.firstPage = true | |
} | |
params.url = window.location.href | |
params.navigation_id = currentNaviID | |
return JSON.parse(JSON.stringify(params)) | |
} | |
function onDomContentLoaded() { | |
var msg = {} | |
msg.stage = 'DomContentLoaded'; | |
jsIESLiveTimingMonitorReportStage(msg, 'pv') | |
} | |
bd_global.onDomContentLoaded = onDomContentLoaded; | |
// Use the handy event callback | |
window.addEventListener( "DOMContentLoaded", onDomContentLoaded ); | |
})() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!function(t, e, n) { | |
if (t && typeof t[e] != "function") { | |
var o = [], | |
i = [], | |
u = [], | |
c = "addEventListener", | |
f = "removeEventListener", | |
a = "error", | |
v = "unhandledrejection"; | |
t[e] = function() { | |
return n ? t[e].apply(null, arguments) : o.push(arguments); | |
}; | |
try { | |
t[c](a, s, true), t[c](v, l); | |
} catch (n) {} | |
setTimeout(() => { | |
try { | |
t[f](a, s), t[f](v, l); | |
} catch (n) {} | |
!function() { | |
var e = function(n, t) { | |
return (e = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, t) { | |
n.__proto__ = t; | |
} || function(n, t) { | |
for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && (n[r] = t[r]); | |
})(n, t); | |
}; | |
function n(n, t) { | |
if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); | |
function r() { | |
this.constructor = n; | |
} | |
e(n, t), n.prototype = t === null ? Object.create(t) : (r.prototype = t.prototype, new r()); | |
} | |
var H = function() { | |
return (H = Object.assign || function(n) { | |
for (var t, r = 1, e = arguments.length; r < e; r++) for (var o in t = arguments[r]) Object.prototype.hasOwnProperty.call(t, o) && (n[o] = t[o]); | |
return n; | |
}).apply(this, arguments); | |
}; | |
function T(n) { | |
var t = typeof Symbol == "function" && Symbol.iterator, | |
r = t && n[t], | |
e = 0; | |
if (r) return r.call(n); | |
if (n && typeof n.length == "number") { | |
return { next() { | |
return { value: (n = n && e >= n.length ? void 0 : n) && n[e++], done: !n }; | |
} }; | |
} | |
throw new TypeError(t ? "Object is not iterable." : "Symbol.iterator is not defined."); | |
} | |
function L(n, t) { | |
var r = typeof Symbol == "function" && n[Symbol.iterator]; | |
if (!r) return n; | |
var e, o, | |
i = r.call(n), | |
u = []; | |
try { | |
for (; (void 0 === t || t-- > 0) && !(e = i.next()).done;) u.push(e.value); | |
} catch (n) { | |
o = { error: n }; | |
} finally { | |
try { | |
e && !e.done && (r = i.return) && r.call(i); | |
} finally { | |
if (o) throw o.error; | |
} | |
} | |
return u; | |
} | |
function a(n, t, r) { | |
if (r || arguments.length === 2) for (var e, o = 0, i = t.length; o < i; o++) !e && o in t || ((e = e || Array.prototype.slice.call(t, 0, o))[o] = t[o]); | |
return n.concat(e || Array.prototype.slice.call(t)); | |
} | |
function i(n) { | |
return typeof Event != "undefined" && function(n, t) { | |
try { | |
return n instanceof t; | |
} catch (n) { | |
} | |
}(n, Event); | |
} | |
function f(n, t) { | |
if (typeof n == "object" && n !== null && !(Object.prototype.toString.call(n) === "[object Array]")) for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && t.call(null, r, n[r]); | |
} | |
function t() { | |
for (var n = [], t = 0; t < arguments.length; t++) n[t] = arguments[t]; | |
for (var r = {}, e = 0; e < n.length;) { | |
r = function(n, t) { | |
var r, | |
e = { ...n }; | |
for (r in t) Object.prototype.hasOwnProperty.call(t, r) && void 0 !== t[r] && (typeof t[r] == "object" && t[r] !== null && !(Object.prototype.toString.call(t[r]) === "[object Array]") && v(t[r]) ? e[r] = s(typeof n[r] == "object" && n[r] !== null && !(Object.prototype.toString.call(n[r]) === "[object Array]") ? n[r] : {}, t[r]) : Object.prototype.toString.call(t[r]) === "[object Array]" ? e[r] = t[r].slice() : e[r] = t[r]); | |
return e; | |
}(r, n[e]), e++; | |
} | |
return r; | |
} | |
function _() { | |
for (var n = [], t = 0; t < arguments.length; t++) n[t] = arguments[t]; | |
for (var r = {}, e = 0; e < n.length;) r = s(r, n[e]), e++; | |
return r; | |
} | |
var r = Object.getPrototypeOf ? Object.getPrototypeOf({}) : null; | |
function v(n) { | |
return Object.getPrototypeOf ? Object.getPrototypeOf(n) === r : n.constructor === Object; | |
} | |
function s(n, t) { | |
var r, | |
e = { ...n }; | |
for (r in t) { | |
Object.prototype.hasOwnProperty.call(t, r) && void 0 !== t[r] && (typeof t[r] == "object" && t[r] !== null && !(Object.prototype.toString.call(t[r]) === "[object Array]") && v(t[r]) ? e[r] = s(typeof n[r] == "object" && n[r] !== null && !(Object.prototype.toString.call(n[r]) === "[object Array]") ? n[r] : {}, t[r]) : Object.prototype.toString.call(n[r]) === "[object Array]" || Object.prototype.toString.call(t[r]) === "[object Array]" ? e[r] = function t(n, r) { | |
n = Object.prototype.toString.call(n) === "[object Array]" ? n : []; | |
r = Object.prototype.toString.call(r) === "[object Array]" ? r : []; | |
return Array.prototype.concat.call(n, r).map(n => !(n instanceof RegExp) && (Object.prototype.toString.call(n) === "[object Array]" || typeof n == "object" && n !== null && !(Object.prototype.toString.call(n) === "[object Array]") && v(n)) ? Object.prototype.toString.call(n) === "[object Array]" ? t([], n) : s({}, n) : n); | |
}(n[r], t[r]) : e[r] = t[r]); | |
} | |
return e; | |
} | |
function l(n, t) { | |
if (Object.prototype.toString.call(n) === "[object Array]" && n.length !== 0) { | |
for (var r = 0; r < n.length;) { | |
if (n[r] === t) return 1; | |
r++; | |
} | |
} | |
} | |
function p(n) { | |
var t = document.createElement("a"); | |
t.href = n; | |
n = t.pathname || "/"; | |
return n[0] !== "/" && (n = "/" + n), { href: t.href, protocol: t.protocol.slice(0, -1), hostname: t.hostname, host: t.host, search: t.search, pathname: n, hash: t.hash }; | |
} | |
var g = new RegExp("(" + [ "cookie", "auth", "jwt", "token", "key", "ticket", "secret", "credential", "session", "password" ].join("|") + ")", "i"), | |
M = new RegExp("(" + [ "bearer", "session" ].join("|") + ")", "i"); | |
function j() {} | |
function B(n) { | |
document.readyState !== "complete" ? window.addEventListener("load", () => { | |
setTimeout(() => { | |
n(); | |
}, 0); | |
}, false) : n(); | |
} | |
function x(n) { | |
var t = Object.prototype.toString.call(n) === "[object String]"; | |
return n ? t ? n.length : ArrayBuffer && n instanceof ArrayBuffer ? n.byteLength : window.Blob && n instanceof Blob ? n.size : n.length || 0 : 0; | |
} | |
function O(n) { | |
if (!n) return ""; | |
if (!(typeof n.forEach == "function")) return ""; | |
var r = []; | |
return n.forEach(n => { | |
var t; | |
Object.prototype.toString.call(n) === "[object Array]" && n[0] && !(!(!n[0] || !n[1]) && (g.test(n[0]) || M.test(n[1]))) && (t = n[0], n = n[1] || "", r.push(t + ": " + n)); | |
}), r.join("\r\n"); | |
} | |
function E(n) { | |
var t = {}, | |
r = p(n); | |
return t.ax_protocol = r.protocol, t.ax_domain = r.hostname, t.ax_path = r.pathname, t.ax_url = (r.href || n).split("?")[0], t.ax_search = r.search, t.ax_href = r.href, t; | |
} | |
function S(n) { | |
return Object.prototype.toString.call(n) === "[object Array]" && n.length ? function(n) { | |
for (var t = [], r = n.length, e = 0; e < r; e++) { | |
var o = n[e]; | |
Object.prototype.toString.call(o) === "[object String]" ? t.push(o.replace(/([.*+?^=!:${}()|[\]/\\])/g, "\\$1")) : o && o.source && t.push(o.source); | |
} | |
return new RegExp(t.join("|"), "i"); | |
}(n) : null; | |
} | |
var P = function(n) { | |
var t, r; | |
return void 0 === n && (n = window), !!(typeof window == "object" && window !== null && !(Object.prototype.toString.call(window) === "[object Array]")) && (t = n.screen) !== null && void 0 !== t && t.width && (r = n.screen) !== null && void 0 !== r && r.height ? n.screen.width + "x" + n.screen.height : "0x0"; | |
}, | |
k = function() { | |
var n = "unknown", | |
t = navigator.connection || navigator.mozConnection || navigator.webkitConnection; | |
return t && Object.prototype.toString.call(t.effectiveType) === "[object String]" ? t.effectiveType : n; | |
}, | |
F = function(t, r) { | |
typeof t == "function" && (typeof window.addEventListener == "function" && (window.addEventListener("unload", t), window.addEventListener("beforeunload", t), window.addEventListener("pagehide", t)), typeof document.addEventListener == "function" && document.addEventListener("visibilitychange", n => { | |
typeof r == "function" ? r(n) : document.visibilityState === "hidden" && t(n); | |
})); | |
}; | |
function D(n, t, r) { | |
if ((r = void 0 === r ? "0" : r).length > 1) throw new TypeError("expect the length of pad to be 1, but got " + n.length); | |
return n.length >= t ? n : "" + Array.from({ length: t - n.length }).fill(r).join("") + n; | |
} | |
function A(n) { | |
return n ? Math.floor(Math.random() * 10 ** 12).toString(16).substr(0, n) : ""; | |
} | |
var I = "x-tt-trace-id", | |
C = "x-tt-trace-host", | |
q = "x-tt-logid"; | |
function J(n, t, r) { | |
void 0 === r && (r = "01"); | |
t = "" + D((Date.now() % 4294967295).toString(16), 8) + function(n) { | |
if (typeof n == "number") { r = n; } else { | |
var t = n.replace(/-/g, ""); | |
if (!/^[0-9]+$/.test(t)) { | |
if (t.length > 18) return "18" + A(18); | |
n = 22 - t.length - 4; | |
return "" + D("" + t.length, 2) + t + A(n); | |
} | |
r = parseInt(t, 10); | |
} | |
var r = 22 - (t = r.toString(16)).length - 4; | |
return "" + D("" + t.length, 2) + t + A(r); | |
}(n) + (typeof t == "string" ? A(4) : D(t.toString(16), 4)); | |
return "00-" + t + "-" + t.substr(0, 16) + "-" + r; | |
} | |
function U() { | |
var n = function() { | |
for (var n = new Array(16), t = 0, r = 0; r < 16; r++) (3 & r) == 0 && (t = 4294967296 * Math.random()), n[r] = t >>> ((3 & r) << 3) & 255; | |
return n; | |
}(); | |
return n[6] = 15 & n[6] | 64, n[8] = 63 & n[8] | 128, function(n) { | |
for (var t = [], r = 0; r < 256; ++r) t[r] = (r + 256).toString(16).substr(1); | |
var e = 0, | |
o = t; | |
return [ o[n[e++]], o[n[e++]], o[n[e++]], o[n[e++]], "-", o[n[e++]], o[n[e++]], "-", o[n[e++]], o[n[e++]], "-", o[n[e++]], o[n[e++]], "-", o[n[e++]], o[n[e++]], o[n[e++]], o[n[e++]], o[n[+e]], o[n[15]] ].join(""); | |
}(n); | |
} | |
var X = 0.1, | |
z = [ "/log/sentry/", "/monitor_browser/collect" ], | |
G = 8e3, | |
$ = 4e3; | |
U(); | |
function W(t) { | |
return function(n) { | |
return t === n; | |
}; | |
} | |
var V = U(), | |
K = function(e) { | |
function o() { | |
for (var n = [], t = 0; t < arguments.length; t++) n[t] = arguments[t]; | |
var r = e.apply(void 0, a([], L(n), false)); | |
return o.returns = r, o.resolved = true, o.subs && o.subs.forEach(n => n()), r; | |
} | |
return o.then = Q(o).then, o; | |
}, | |
Q = function() { | |
for (var t = [], n = 0; n < arguments.length; n++) t[n] = arguments[n]; | |
function u() { | |
return t.every(n => n.resolved); | |
} | |
return Object.defineProperty({ then(r) { | |
function e() { | |
return n.apply(void 0, a([], L(t.map(n => n.returns)), false)); | |
} | |
var o, i, | |
n = K(function() { | |
for (var n = [], t = 0; t < arguments.length; t++) n[t] = arguments[t]; | |
return i ? o : (i = true, o = r.apply(void 0, a([], L(n), false))); | |
}); | |
return Object.prototype.hasOwnProperty.call(n, t) ? setTimeout(e) : t.forEach(n => { | |
n.subs ? n.subs.push(t) : n.subs = [ t ]; | |
}), Q(n); | |
} }, "resolved", { get: u }); | |
}; | |
function Z(n) { | |
try { | |
for (var t, r = n, e = [], o = 0, i = 0, u = " > ".length; r && o++ < 5 && !((t = function(n) { | |
var t, r, e, o, | |
i = n, | |
u = []; | |
if (!i || !i.tagName) return ""; | |
u.push(i.tagName.toLowerCase()), i.id && u.push("#" + i.id); | |
n = i.className; | |
if (n && Object.prototype.toString.call(n) === "[object String]") for (t = n.split(/\s+/), o = 0; o < t.length; o++) u.push("." + t[o]); | |
var c = [ "type", "name", "title", "alt" ]; | |
for (o = 0; o < c.length; o++) r = c[o], (e = i.getAttribute(r)) && u.push("[" + r + '="' + e + '"]'); | |
return u.join(""); | |
}(r)) === "html" || o > 1 && i + e.length * u + t.length >= 80);) e.push(t), i += t.length, r = r.parentNode; | |
return e.reverse().join(" > "); | |
} catch (n) { | |
return "<unknown>"; | |
} | |
} | |
function nn() { | |
try { | |
return new Headers(), new Request(""), new Response(), window.fetch; | |
} catch (n) {} | |
} | |
function tn() { | |
if (typeof window == "object" && window !== null && !(Object.prototype.toString.call(window) === "[object Array]")) return window; | |
} | |
function rn() { | |
if (typeof document == "object" && document !== null && !(Object.prototype.toString.call(document) === "[object Array]")) return document; | |
} | |
function en() { | |
if (tn() && (typeof window.performance == "object" && window.performance !== null && !(Object.prototype.toString.call(window.performance) === "[object Array]"))) return window.performance; | |
} | |
function on() { | |
if (typeof XMLHttpRequest == "function") return XMLHttpRequest; | |
} | |
function un() { | |
if (tn() && typeof window.MutationObserver == "function") return window.MutationObserver; | |
} | |
function cn() { | |
if (tn() && typeof window.PerformanceObserver == "function") return window.PerformanceObserver; | |
} | |
function fn(n, t, r) { | |
var e = n.commonParams, | |
o = n.ajaxMonitorOptions, | |
e = (n = e || {}).bid, | |
n = n.web_id, | |
o = (o || {}).sampleHitTrace, | |
t = (t = t, r = p(r = r), t = p(t), r.protocol === t.protocol && r.host === t.host); | |
return e && n && o && t; | |
} | |
var an = function(i, u, c) { | |
return function() { | |
for (var n = [], t = 0; t < arguments.length; t++) n[t] = arguments[t]; | |
if (!i) return j; | |
var r = i[u], | |
e = c.apply(void 0, a([ r ], L(n), false)), | |
o = e; | |
return typeof o == "function" && (o = function() { | |
for (var t = [], n = 0; n < arguments.length; n++) t[n] = arguments[n]; | |
try { | |
return e.apply(this, t); | |
} catch (n) { | |
return typeof r == "function" && r.apply(this, t); | |
} | |
}), i[u] = o, function(n) { | |
n && o !== i[u] || (i[u] = r); | |
}; | |
}; | |
}; | |
var dn = function(n) { | |
function t() { | |
return Object.keys(r).forEach(n => !(n in e) && Object.defineProperty(e, n, { get() { | |
return r[n]; | |
} })); | |
} | |
var r = n, | |
e = {}; | |
return t(), [ e, function(n) { | |
r = _({}, r, n), t(); | |
} ]; | |
}, | |
hn = function(n, t, r, e) { | |
void 0 === t && (t = {}), void 0 === e && (e = []); | |
try { | |
var o = n.apply(void 0, a([], L(e), false)); | |
return o && Object.prototype.toString.call(t) === "[object Object]" || []; | |
} catch (n) { | |
return []; | |
} | |
}, | |
pn = function(n, t) { | |
var r = n && new n(t); | |
return [ function(n, t) { | |
r && n && r.observe(n, t); | |
}, function() { | |
return r && r.disconnect(); | |
} ]; | |
}, | |
mn = function(r, o, t, i) { | |
var e = r && new r((n, e) => { | |
n.getEntries ? n.getEntries().forEach((n, t, r) => Object.prototype.toString.call(n) === "[object Object]") : i && i(), t && e.disconnect(); | |
}); | |
return [ function() { | |
for (var t = [], n = 0; n < arguments.length; n++) t[n] = arguments[n]; | |
if (!r || !e) return i && i(); | |
try { | |
t.forEach(n => r.supportedEntryTypes.indexOf(n) > -1 ? e.observe({ type: n, buffered: true }) : void (i && i())); | |
} catch (n) { | |
try { | |
e.observe({ entryTypes: t }); | |
} catch (n) { | |
i && i(); | |
} | |
} | |
}, function() { | |
return e && e.disconnect(); | |
} ]; | |
}, | |
yn = function(r) { | |
var n = r && r.timing || void 0; | |
return [ n, function() { | |
return r && r.now ? r.now() : (Date.now ? Date.now() : +new Date()) - (n && n.navigationStart || 0); | |
}, function(n) { | |
var t = (r || {}).getEntriesByType; | |
return typeof t == "function" && t.call(r, n) || []; | |
}, function() { | |
var n = (r || {}).clearResourceTimings; | |
typeof n == "function" && n.call(r); | |
}, function(n) { | |
var t = (r || {}).getEntriesByName; | |
return typeof t == "function" && t.call(r, n) || []; | |
} ]; | |
}, | |
wn = function(n) { | |
var t, | |
r = window.requestAnimationFrame, | |
e = window.cancelAnimationFrame, | |
o = !(typeof r == "function") || n && document && document.hidden ? function(n) { | |
return n(0), 0; | |
} : r, | |
i = typeof e == "function" ? e : j; | |
return [ function(n) { | |
t && i(t), t = Object.prototype.toString.call(n) === "[object Object]"; | |
}, o, i ]; | |
}; | |
function _n(n, e) { | |
void 0 === n && (n = on()), void 0 === e && (e = location === null || void 0 === location ? void 0 : location.href); | |
var o = n && n.prototype; | |
if (o) { | |
return function(n, t) { | |
var r = L(dn(n), 2), | |
n = r[0], | |
r = r[1]; | |
return an(o, "open", xn)(), an(o, "send", Tn)(n, t, e || ""), an(o, "setRequestHeader", On)(), [ r ]; | |
}; | |
} | |
} | |
function gn(n, t, r) { | |
var e = "", | |
e = n instanceof r ? n.url : n; | |
return e = !(t = void 0 === t ? false : t) ? Object.prototype.toString.call(e) === "[object String]" ? e.split("?")[0] : e : e; | |
} | |
var Mn = function(n, t, r, e) { | |
var o = n._method, | |
i = n._requestHeaders, | |
u = n._url, | |
c = n._start, | |
f = n._data, | |
o = { ev_type: "ajax", ax_status: (n.status || 0).toString(), ax_type: o, ax_request_header: O(i || []), ax_domain: "", ax_duration: 0, ax_path: "", ax_protocol: "", ax_response_header: "", ax_size: 0, ax_url: "", ax_href: "" }; | |
typeof n.getAllResponseHeaders == "function" && (o.ax_response_header = function(t) { | |
if (Object.prototype.toString.call(t) === "[object String]") { | |
var n = t.split("\r\n"), | |
r = []; | |
return n.forEach((n, t) => { | |
n && typeof n.split == "function" && (n = n.split(": "), !(!n[0] || !n[1]) && (g.test(n[0]) || M.test(n[1])) || r.push([ n[0], n[1] ])); | |
}), O(r); | |
} | |
return typeof t == "object" && t !== null && !(Object.prototype.toString.call(t) === "[object Array]") ? O(Object.keys(t).filter(n => !(!(!n || !t[n]) && (g.test(n) || M.test(t[n])))).map(n => [ n, t[n] ])) : t; | |
}(n.getAllResponseHeaders())), !fn(t, u, e) || (r = r || n.getResponseHeader(I)) && (o.trace_id = r, o.trace_host = n.getResponseHeader(C) || void 0, o.log_id = n.getResponseHeader(q) || void 0), o.ax_duration = Date.now() - c, n.status === 200 && (o.ax_size = function(n) { | |
if (n.responseType === "" || n.responseType === "text") return x(n.responseText); | |
if (n.response) return x(n.response); | |
try { | |
return x(n.responseText); | |
} catch (n) { | |
return 0; | |
} | |
}(n)), (o = { ...o, ...E(u) }).resource_timing = (void 0 === t && (t = en()), (0, L(yn(t), 5)[4])(o.ax_href).pop()); | |
n = o.ax_status; | |
return (t = (t = t.ajaxMonitorOptions) === null || void 0 === t ? void 0 : t.errorRequestCollect) !== null && void 0 !== t && t && n[0] !== "2" && n[0] !== "3" && (o.ax_request = { body: f ? "" + f : void 0, search: p(u).search, content_type: i && ((i = i.find(n => n[0].toLowerCase() === "content-type")) === null || void 0 === i ? void 0 : i[1]) }), o; | |
}, | |
jn = "AjaxMonitor", | |
xn = function(o) { | |
return function() { | |
for (var n = [], t = 0; t < arguments.length; t++) n[t] = arguments[t]; | |
var r = L(n, 2), | |
e = r[0], | |
r = r[1]; | |
return this._url = r || "", this._method = e && e.toLowerCase() || "", o.apply(this, n); | |
}; | |
}, | |
On = function(r) { | |
return function() { | |
for (var n = [], t = 0; t < arguments.length; t++) n[t] = arguments[t]; | |
return this._requestHeaders = this._requestHeaders || [], this._requestHeaders.push(n), r && r.apply(this, n); | |
}; | |
}, | |
Tn = function(o, i, u, f) { | |
var a = null; | |
return function() { | |
for (var n, t, c, r = [], e = 0; e < arguments.length; e++) r[e] = arguments[e]; | |
return fn(i, this._url, f) && (n = (t = i.commonParams || {}).bid, t = t.web_id, n && t && (a = J(t, n), this.setRequestHeader(I, a))), an(c = this, "onreadystatechange", (r, e, o, i, u) => function() { | |
for (var n = [], t = 0; t < arguments.length; t++) n[t] = arguments[t]; | |
return this.readyState === 4 && i && i({ name: jn, type: "get", event: Mn(c, e, o, u) }), r && r.apply(this, n); | |
})(i, a, u, f), this._start = Date.now(), this._data = r == null ? void 0 : r[0], o.apply(this, r); | |
}; | |
}; | |
function En(n, t) { | |
if (!n) return ""; | |
var r = []; | |
return n instanceof t ? n.forEach((n, t) => { | |
r.push([ t, n ]); | |
}) : Object.prototype.toString.call(n) === "[object Array]" ? r.push.apply(r, a([], L(n), false)) : r.push.apply(r, a([], L(Object.entries(n)), false)), O(r); | |
} | |
function Sn(n, t, r, e, o, i) { | |
var u = t.ax_status; | |
(n = (n = n.ajaxMonitorOptions) === null || void 0 === n ? void 0 : n.errorRequestCollect) !== null && void 0 !== n && n && u[0] !== "2" && u[0] !== "3" && (u = gn(r, true, o), t.ax_request = { body: (t = e, t = (r = r) instanceof o ? r.body : t == null ? void 0 : t.body) === null || void 0 === t ? void 0 : t.toString(), search: p(u).search, content_type: function(n, t, r) { | |
if (n) { | |
if (n instanceof r) return n.get(t) || void 0; | |
if (Object.prototype.toString.call(n) === "[object Array]") { | |
r = n.find(n => t === n[0]); | |
return r == null ? void 0 : r[1]; | |
} | |
return n[t]; | |
} | |
}(e.headers, "Content-Type", i) }); | |
} | |
function Pn(e, o, i, u) { | |
if (void 0 === e && (e = nn() && tn()), void 0 === o && (o = window.Headers), void 0 === i && (i = window.Request), void 0 === u && (u = location === null || void 0 === location ? void 0 : location.href), e && o && i) { | |
return function(n, t) { | |
var r = L(dn(n), 2), | |
n = r[0], | |
r = r[1]; | |
return an(e, "fetch", Fn)(n, t, o, i, u || ""), [ r ]; | |
}; | |
} | |
} | |
function kn(t) { | |
function r(n) { | |
n < o || !e || (window.clearTimeout(i), i = window.setTimeout(e, n - t()), o = n); | |
} | |
var e, | |
o = -Infinity, | |
i = void 0; | |
return [ function(n, t) { | |
e = n, r(t); | |
}, function() { | |
window.clearTimeout(i), e = void 0; | |
}, r ]; | |
} | |
function Rn(n, u) { | |
var c = [ "img", "script", "iframe", "link", "audio", "video", "source" ], | |
t = (n = L(pn(n, n => { | |
var t, r; | |
try { | |
for (var e = T(n), o = e.next(); !o.done; o = e.next()) { | |
var i = o.value; | |
(i.type === "childList" && function n(t, r) { | |
var e, o; | |
try { | |
for (var i = T(t), u = i.next(); !u.done; u = i.next()) { | |
var c = u.value; | |
if (l(r, c.nodeName.toLowerCase()) || c.children && n(c.children, r)) return 1; | |
} | |
} catch (n) { | |
e = { error: n }; | |
} finally { | |
try { | |
u && !u.done && (o = i.return) && o.call(i); | |
} finally { | |
if (e) throw e.error; | |
} | |
} | |
}(i.addedNodes, c) || i.type === "attributes" && l(c, i.target.nodeName.toLowerCase())) && Object.prototype.hasOwnProperty.call(i, t); | |
} | |
} catch (n) { | |
t = { error: n }; | |
} finally { | |
try { | |
o && !o.done && (r = e.return) && r.call(e); | |
} finally { | |
if (t) throw t.error; | |
} | |
} | |
}), 2))[0]; | |
return [ function() { | |
return t(document, { attributes: true, childList: true, subtree: true, attributeFilter: [ "href", "src" ] }); | |
}, n[1] ]; | |
} | |
function Dn(n) { | |
var n = (t = n || {}).domContentLoadedEventEnd, | |
t = t.navigationStart; | |
return n ? n - (void 0 === t ? 0 : t) : null; | |
} | |
function An(r) { | |
return function() { | |
for (var n = [], t = 0; t < arguments.length; t++) n[t] = arguments[t]; | |
return this._method = n[0], r.apply(this, n); | |
}; | |
} | |
function In(e, o, i) { | |
var u = 0; | |
return function() { | |
for (var n = [], t = 0; t < arguments.length; t++) n[t] = arguments[t]; | |
if (this._method !== "GET") return e.apply(this, n); | |
var r = u += 2; | |
return Object.prototype.toString.call(r) === "[object Object]", an(this, "onreadystatechange", t => function(n) { | |
t && t.call(this, n), this.readyState === 4 && i(r); | |
})(), e.apply(this, n); | |
}; | |
} | |
function Cn(i, u, c) { | |
var f = 1; | |
return function() { | |
for (var n, o = [], t = 0; t < arguments.length; t++) o[t] = arguments[t]; | |
return (((n = o[0]) === null || void 0 === n ? void 0 : n.method) || ((n = o[1]) === null || void 0 === n ? void 0 : n.method) || "GET") !== "GET" ? i.apply(void 0, a([], L(o), false)) : new Promise((t, r) => { | |
var e = f += 2; | |
Object.prototype.hasOwnProperty.call(e, Date.now()), i.apply(void 0, a([], L(o), false)).then(n => { | |
Object.prototype.toString.call(e) === "[object Array]", t(n); | |
}, n => { | |
Object.prototype.toString.call(e) === "[object Array]", r(n); | |
}); | |
}); | |
}; | |
} | |
function Hn(M, j, x, O) { | |
return function(n, r, t) { | |
var f, a, e, o, i, u, c, v, | |
s = L([ f = [], a = [], function(u, c) { | |
return function(n) { | |
var t = n.startTime, | |
r = n.duration, | |
e = n.fetchStart, | |
o = n.responseEnd, | |
i = n.entryType; | |
i === "longtask" ? (f.push({ start: t, end: t + r }), u && Object.prototype.hasOwnProperty.call(n, t)) : i === "resource" && (a.push({ start: e, end: o }), c && Object.prototype.toString.call(n) === "[object Array]"); | |
}; | |
} ], 3), | |
l = s[0], | |
d = s[1], | |
h = s[2], | |
p = L((e = M, o = j, p = L([ i = {}, function(n, t) { | |
return i[n] = t; | |
}, function(n) { | |
return delete i[n]; | |
} ], 3), w = p[0], s = p[1], p = p[2], u = o && an(o.prototype, "open", An)(), c = o && an(o.prototype, "send", In)(s, p), v = e && an(e, "fetch", Cn)(s, p), [ w, function() { | |
u && Object.prototype.hasOwnProperty.call(true, t), c && Object.prototype.toString.call(true) === "[object Array]", v && v(true); | |
} ]), 2), | |
m = p[0], | |
y = p[1], | |
w = L(Rn(O, () => r(t() + 5e3)) || [], 2), | |
p = w[0], | |
b = w[1]; | |
p && p(); | |
function _() { | |
return function(n, t, r) { | |
var e, o, i, u; | |
if (n.length > 2) return r(); | |
var c = []; | |
try { | |
for (var f = T(t), a = f.next(); !a.done; a = f.next()) { | |
var v = a.value; | |
c.push([ v.start, 0 ], [ v.end, 1 ]); | |
} | |
} catch (n) { | |
e = { error: n }; | |
} finally { | |
try { | |
a && !a.done && (o = f.return) && o.call(f); | |
} finally { | |
if (e) throw e.error; | |
} | |
} | |
try { | |
for (var s = T(n), l = s.next(); !l.done; l = s.next()) { | |
var d = l.value; | |
c.push([ d, 0 ]); | |
} | |
} catch (n) { | |
i = { error: n }; | |
} finally { | |
try { | |
l && !l.done && (u = s.return) && u.call(s); | |
} finally { | |
if (i) throw i.error; | |
} | |
} | |
c.sort((n, t) => n[0] - t[0]); | |
for (var h = n.length, p = c.length - 1; p >= 0; p--) { | |
var m = L(c[p], 2), | |
y = m[0]; | |
switch (m[1]) { | |
case 0: | |
h--; | |
break; | |
case 1: | |
if (++h > 2) return y; | |
} | |
} | |
return 0; | |
}(function(n) { | |
for (var t = Object.keys(n), r = [], e = 0; e < t.length; e++) { | |
var o = n[t[e]]; | |
typeof o == "number" && r.push(o); | |
} | |
return r; | |
}(m), d, t); | |
} | |
var w = L(mn(x, !!(typeof window == "object" && window !== null && !(Object.prototype.toString.call(window) === "[object Array]")) && (typeof window.performance == "object" && window.performance !== null && !(Object.prototype.toString.call(window.performance) === "[object Array]")) && !!(typeof window.performance.timing == "object" && window.performance.timing !== null && !(Object.prototype.toString.call(window.performance.timing) === "[object Array]")), false, () => l.notSupport = true), 2), | |
p = w[0], | |
g = w[1]; | |
return p("longtask", "resource"), n.forEach(!!(typeof window == "object" && window !== null && !(Object.prototype.toString.call(window) === "[object Array]")) && (typeof window.performance == "object" && window.performance !== null && !(Object.prototype.toString.call(window.performance) === "[object Array]")) && !!(typeof window.performance.timing == "object" && window.performance.timing !== null && !(Object.prototype.toString.call(window.performance.timing) === "[object Array]"))), [ l, function() { | |
typeof n == "object" && n !== null && !(Object.prototype.toString.call(n) === "[object Array]"), g(), b && Object.prototype.toString.call(n) === "[object String]"; | |
}, _ ]; | |
}; | |
} | |
function Ln(t, n) { | |
return (n = n.filter(n => n.name === t)[0]) ? Math.round(n.startTime) : 0; | |
} | |
function Nn(C) { | |
return void 0 === C && (C = en()), function(n, f) { | |
var e = n.prePerformanceObserver, | |
t = n.TTIMonitor, | |
a = n.renderType, | |
r = n.report, | |
v = n.fmpMonitor, | |
n = n.performanceAuto, | |
o = void 0 === n || n, | |
s = { ...it }, | |
i = t || Gn, | |
l = 0, | |
u = "", | |
d = true, | |
h = 0, | |
p = null, | |
n = { isAsync: 0, prePerformanceObserver: e }, | |
t = L(st(s), 3), | |
m = t[0], | |
y = t[1], | |
w = t[2], | |
c = L(yn(C), 2)[1], | |
t = L(at(f), 2), | |
b = t[0], | |
_ = t[1], | |
g = ft(), | |
M = L(hn(ot), 1)[0], | |
j = L(hn(Qn, n), 1)[0], | |
x = L(hn(Kn, { prePerformanceObserver: e }, n => { | |
n = n.lcp; | |
return !(!{ lcp: n } || !t) && (g.test({ lcp: n }) || M.test(t)); | |
}), 1)[0], | |
O = K(n => n.fid), | |
T = L(hn(Wn, 0, O), 1)[0], | |
E = K(Y), | |
S = L(hn(tt, 0, E), 1)[0], | |
P = K(n => { | |
if (n && n > 0) return Math.max(Math.round(n - l), 0); | |
}), | |
n = L(hn(i, n), 4), | |
k = n[0], | |
R = n[3], | |
D = Q(P), | |
A = function(n) { | |
if (clearTimeout(h), h = 0, f) { | |
d = false; | |
var t = s.isAsync; | |
typeof s == "function"; | |
var r = j().mpfid, | |
e = M(), | |
o = e && e.event.resources, | |
i = L(yn(C), 3), | |
u = i[0], | |
e = i[2], | |
i = ct(u, e), | |
u = vt(v, t, a, () => S().fcp), | |
e = x().lcp; | |
!(!S() || !t) && (g.test(S()) || M.test(t)), !(!{ ...s, ...i, mpfid: r, resources: o, has_resource: o ? 1 : 0, fmp: u, lcp: e } || !t) && (g.test({ ...s, ...i, mpfid: r, resources: o, has_resource: o ? 1 : 0, fmp: u, lcp: e }) || M.test(t)), s.load && (!(!{ load: s.load } || !t) && (g.test({ load: s.load }) || M.test(t))), t || (e = i == null ? void 0 : i.timing) !== null && void 0 !== e && e.loadEventEnd || ((i = i == null ? void 0 : i.timing) === null || void 0 === i ? void 0 : i.loadEventEnd) !== 0 || !(!{ bounced: true } || !t) && (g.test({ bounced: true }) || M.test(t)); | |
var c = function() { | |
p = null, _(t, typeof n == "object" && n !== null && !(Object.prototype.toString.call(n) === "[object Array]")); | |
}; | |
if (p = function() { | |
!(!{ fid: T() } || !t) && (g.test({ fid: T() }) || M.test(t)), !(!S() || !t) && (g.test(S()) || M.test(t)), R && (!(!{ tti: Math.round((!!n && Math.random() < Number(n)) - l) } || !t) && (g.test({ tti: Math.round((!!n && Math.random() < Number(n)) - l) }) || M.test(t))), Object.prototype.toString.call(n) === "[object Array]"; | |
}, O.then(n => !(!{ fid: n } || !t) && (g.test({ fid: n }) || M.test(t))), E.then(m), P.then(n => !(!{ tti: n } || !t) && (g.test({ tti: n }) || M.test(t))), n) return !(!S() || !t) && (g.test(S()) || M.test(t)), x && (!(!x() || !t) && (g.test(x()) || M.test(t))), Object.prototype.toString.call(n) === "[object Array]"; | |
k && k(P), D.then(() => setTimeout(c)); | |
} | |
}; | |
B(() => o && (h = setTimeout(A, 200))), F(() => { | |
o && !(Object.prototype.toString.call(n) === "[object String]") && (A(true), r && r()); | |
}); | |
var I = function() { | |
o = false, clearTimeout(h), h = 0; | |
}; | |
return [ function(n) { | |
void 0 === n && (n = ""), p ? p() : !h && Object.prototype.toString.call(n) === "[object String]" || (g() || I(), A(), p()), s.isAsync = 1, t = L(st(s), 3), m = t[0], y = t[1], w = t[2], d = true, l = Math.round(Object.prototype.toString.call(n) === "[object Array]"), u = n; | |
var t = { isAsync: 1, prePerformanceObserver: e }, | |
n = L(hn(ot, t), 1); | |
M = n[0], n = L(hn(Qn, t), 1), j = n[0], t = L(hn(i, { ...t, minValue: l }), 4), k = t[0], R = t[3], P = K(n => { | |
if (n && n > 0) return Math.max(Math.round(n - l), 0); | |
}); | |
var r = { fp: 0, fcp: 0 }; | |
S = function() { | |
return r; | |
}, (E = K(Y))(r), D = Q(P), v = hn(zn); | |
}, function() { | |
d && g() && !h && (s.isAsync && (s.load = Math.round((Object.prototype.toString.call(n) === "[object Array]") - l), s.route_from = u), h = setTimeout(A, 200)); | |
}, function() { | |
return D.resolved || A(!(document.readyState === "complete")), typeof n == "object" && n !== null && !(Object.prototype.toString.call(n) === "[object Array]"); | |
}, I ]; | |
}; | |
} | |
var Bn = "FetchMonitor", | |
Fn = function(i, h, u, p, m, y) { | |
return function(f, a) { | |
void 0 === a && (a = {}); | |
var v = gn(f, void 0, m); | |
if (!function(n) { | |
if (Object.prototype.toString.call(n) === "[object String]") { | |
var t = L(n.split(":"), 2), | |
n = t[0]; | |
return !t[1] || (n === "http" || n === "https"); | |
} | |
}(v)) return i(f, a); | |
var n, t, r, | |
e = h.commonParams || {}, | |
o = e.bid, | |
e = e.web_id, | |
s = Date.now(), | |
l = { ev_type: "ajax", ax_size: 0 }; | |
try { | |
fn(h, v, y) && (a.headers || (a.headers = []), o && e && (l.trace_id = J(o, e), n = a.headers, t = I, r = l.trace_id, n instanceof p ? n.append(t, r) : Object.prototype.toString.call(n) === "[object Array]" ? n.push([ t, r ]) : n[t] = r)); | |
} catch (n) {} | |
l.ax_type = function(n, t, r) { | |
t = t && t.method || "get"; | |
return (t = n instanceof r ? n.method || t : t).toLowerCase(); | |
}(f, a, m); | |
var l = { ...l, ...E(gn(f, true, m)) }, | |
d = function() { | |
l.resource_timing = (void 0 === t && (t = en()), (0, L(yn(t), 5)[4])(l.ax_href).pop()), Sn(h, l, f, a, m, p), u != null && Object.prototype.hasOwnProperty.call({ name: Bn, type: "get", event: l }, t); | |
}; | |
return i(f, a).then(r => { | |
var n, t, e, o, i, u; | |
try { | |
l.ax_status = (r.status || 0).toString(), l.ax_duration = Date.now() - s, l.ax_response_header = En(r.headers, p), l.ax_request_header = En((t = f, e = a, i = m, u = new (o = p)(), t instanceof i && t.headers && typeof t.headers.forEach == "function" && t.headers.forEach((n, t) => { | |
u.append(t, n); | |
}), e.headers && new o(e.headers).forEach((n, t) => { | |
u.append(t, n); | |
}), u), p); | |
var c = function(n, t) { | |
r.headers.has(n) && (l[t] = r.headers.get(n) || void 0); | |
}; | |
typeof ((n = r.headers) === null || void 0 === n ? void 0 : n.has) == "function" && (r.headers.has("content-length") && (l.ax_size = Number(r.headers.get("content-length")) || 0), fn(h, v, y) && (Object.prototype.toString.call(C) === "[object Array]", Object.prototype.toString.call(I) === "[object Array]", Object.prototype.toString.call(q) === "[object Array]")), setTimeout(() => { | |
!!(typeof window == "object" && window !== null && !(Object.prototype.toString.call(window) === "[object Array]")); | |
}, 100); | |
} catch (n) {} | |
return r; | |
}, n => { | |
try { | |
l.ax_status = "0", l.ax_duration = Date.now() - s, !!(typeof window == "object" && window !== null && !(Object.prototype.toString.call(window) === "[object Array]")); | |
} catch (n) {} | |
return Promise.reject(n); | |
}); | |
}; | |
}, | |
qn = [ "SCRIPT", "STYLE", "META", "HEAD" ], | |
Jn = function(n) { | |
return { name: "FMPMonitor", type: "post", event: { ev_type: "fmp", fmp: n } }; | |
}, | |
Un = function(n, r, t, e) { | |
if (!n || e.indexOf(n.tagName) > -1) return 0; | |
var o = n.children, | |
o = [].slice.call(void 0 === o ? [] : o).reduceRight((n, t) => n + Un(t, r + 1, n > 0, e), 0); | |
if (o <= 0 && !t) { | |
if (!(typeof n.getBoundingClientRect == "function")) return 0; | |
t = n.getBoundingClientRect() || {}, n = t.top, t = t.height; | |
if (n > window.innerHeight || t <= 0) return 0; | |
} | |
return o + 1 + 0.5 * r; | |
}, | |
Xn = function(n) { | |
var t = L(void 0 === n ? [] : n), | |
n = t[0], | |
t = t.slice(1); | |
return t && t.reduce((n, t) => { | |
var r = L(n, 2), | |
e = r[0], | |
n = r[1], | |
r = t.score - e.score; | |
return [ t, t.time >= e.time && n.rate < r ? { time: t.time, rate: r } : n ]; | |
}, [ n, { time: n == null ? void 0 : n.time, rate: 0 } ])[1].time || 0; | |
}, | |
zn = function(v, s, l) { | |
var n; | |
return void 0 === v && (v = rn()), void 0 === s && (s = un()), void 0 === l && (l = (n = function() { | |
var n = en(); | |
if (n && (typeof n.timing == "object" && n.timing !== null && !(Object.prototype.toString.call(n.timing) === "[object Array]"))) return n.timing; | |
}()) === null || void 0 === n ? void 0 : n.navigationStart), function(n, r) { | |
var e = Date.now(), | |
o = [], | |
i = qn.concat(n.ignoreTags || []), | |
u = L(wn(true), 1)[0], | |
c = L(pn(s, () => Object.prototype.hasOwnProperty.call(t, t)), 2), | |
f = c[0], | |
a = c[1], | |
n = function(n) { | |
void 0 === n && (n = 0), a(); | |
var t = Xn(o), | |
n = Jn(t ? t + n : 0); | |
return r && r(n), n; | |
}, | |
c = e - (l || 0); | |
return f(v, { subtree: true, childList: true }), [ a, n, n.bind(null, c) ]; | |
}; | |
}, | |
Gn = function(b, _, g, M, j) { | |
return void 0 === b && (b = on()), void 0 === _ && (_ = nn() && tn()), void 0 === g && (g = cn()), void 0 === M && (M = un()), void 0 === j && (j = en()), function(n, t, r) { | |
function e() { | |
!!(typeof window == "object" && window !== null && !(Object.prototype.toString.call(window) === "[object Array]")), !(!n || !t) && (g.test(n) || M.test(t)), r && r(), f && f.disconnect(), c.length = 0; | |
} | |
var o = n.prePerformanceObserver, | |
i = n.isAsync, | |
i = void 0 === i ? 0 : i, | |
n = n.minValue, | |
u = void 0 === n ? null : n, | |
n = o || {}, | |
o = n.precollect, | |
c = void 0 === o ? [] : o, | |
f = n.observer, | |
n = L(yn(j), 5), | |
a = n[0], | |
v = n[1], | |
s = n[4], | |
n = L(kn(v), 3), | |
l = n[0], | |
d = n[1], | |
h = n[2], | |
i = L(Hn(_, b, g, M)(i ? [] : c, h, v), 3), | |
p = i[0], | |
m = i[1], | |
y = i[2], | |
w = function(n) { | |
var t = s("first-contentful-paint")[0], | |
t = function(n, t, r, e, o) { | |
if (e - r < 5e3) return null; | |
o = o.length === 0 ? n : o[o.length - 1].end; | |
return e - o < 5e3 ? null : Math.max(o, t); | |
}((t ? t.startTime : Dn(a)) || 0, u || Dn(a) || 0, typeof n == "object" && n !== null && !(Object.prototype.toString.call(n) === "[object Array]"), v() + (n ? 0 : 5e3), p); | |
return n ? t ? (e(), void n(Math.round(t))) : !!(typeof window == "object" && window !== null && !(Object.prototype.toString.call(window) === "[object Array]")) && (typeof window.performance == "object" && window.performance !== null && !(Object.prototype.toString.call(window.performance) === "[object Array]")) && !!(typeof window.performance.timing == "object" && window.performance.timing !== null && !(Object.prototype.toString.call(window.performance.timing) === "[object Array]")) : (e(), t); | |
}; | |
return [ function(n) { | |
if (p.notSupport) return n(); | |
var t = p[p.length - 1]; | |
l(() => typeof n == "function", Math.max((typeof n == "object" && n !== null && !(Object.prototype.toString.call(n) === "[object Array]")) + 5e3, t ? t.end : 0)); | |
}, p, h, function() { | |
return !p.notSupport && typeof n == "function" || 0; | |
} ]; | |
}; | |
}, | |
$n = "first-input", | |
Wn = function(t, o) { | |
return void 0 === t && (t = cn()), void 0 === o && (o = en()), function(n, r) { | |
var e = L(yn(o), 3)[2]; | |
return (0, L(mn(t, n => { | |
var t = n.processingStart, | |
n = n.startTime; | |
return r && r({ name: "FIDMonitor", fid: Math.round(t - n) }); | |
}, true), 1)[0])($n), [ function() { | |
var n = e($n)[0] || {}, | |
t = n.processingStart, | |
n = n.startTime; | |
return n ? Math.round(t - n) : 0; | |
} ]; | |
}; | |
}, | |
Vn = "largest-contentful-paint", | |
Yn = [ "keydown", "click" ], | |
Kn = function(c) { | |
return void 0 === c && (c = cn()), function(n, t) { | |
var r = n.prePerformanceObserver, | |
e = 0; | |
(r.precollect || []).forEach(n => { | |
var t = n.entryType, | |
n = n.startTime; | |
t === Vn && (e = n); | |
}); | |
var n = L(mn(c, n => { | |
n = n.startTime; | |
e = n; | |
}), 2), | |
r = n[0], | |
o = n[1]; | |
r(Vn); | |
var i = function() { | |
Object.prototype.toString.call(n) === "[object Object]", Yn.forEach(n => { | |
window.removeEventListener(n, u, true); | |
}); | |
}, | |
u = function() { | |
t && t({ name: "LCPMonitor", lcp: e }), i(); | |
}; | |
Yn.forEach(n => { | |
window.addEventListener(n, u, true); | |
}), F(i); | |
return [ function() { | |
return { lcp: e }; | |
} ]; | |
}; | |
}, | |
Qn = function(u) { | |
return void 0 === u && (u = cn()), function(n) { | |
var t = [], | |
r = n.isAsync, | |
e = n.prePerformanceObserver, | |
o = L(mn(u, n => t.push(n)), 2), | |
n = o[0], | |
i = o[1]; | |
return !r && e && (e.precollect || []).forEach(n => { | |
n.entryType === "longtask" && t.push(n); | |
}), n("longtask"), [ function() { | |
i(); | |
var n = t.reduce((n, t) => { | |
t = t.duration; | |
return n < t ? t : n; | |
}, 0); | |
return { name: "MPFIDMonitor", mpfid: Math.round(n) }; | |
} ]; | |
}; | |
}, | |
Zn = "first-contentful-paint", | |
nt = "first-paint", | |
tt = function(o, c) { | |
return void 0 === o && (o = cn()), void 0 === c && (c = en()), function(n, i) { | |
function t() { | |
var n = r("paint"); | |
return { fp: Ln(nt, n), fcp: Ln(Zn, n) }; | |
} | |
var u = {}, | |
r = L(yn(c), 3)[2], | |
e = t(); | |
return e.fcp && e.fp ? i && i(e) : (0, L(mn(o, (n, t, r, e) => { | |
var o = n.name, | |
n = n.startTime; | |
u[o] = Math.round(n), u[nt] && u[Zn] && (i && i({ fp: u[nt], fcp: u[Zn] }), e.disconnect()); | |
}, false, () => i && i(t())), 1)[0])("paint"), [ t ]; | |
}; | |
}, | |
rt = "ResourcePerformanceMonitor", | |
et = function(n, t) { | |
var r = []; | |
if (n.forEach(n => { | |
typeof t == "function" && t(n) || r.push(n); | |
}), r.length) return { name: rt, type: "post", event: { ev_type: "resource_performance", resources: r } }; | |
}, | |
ot = function(f, a) { | |
return void 0 === f && (f = en()), void 0 === a && (a = cn()), function(n, t) { | |
function e(n) { | |
(n = et(n, i)) && t && t(n); | |
} | |
var r = (n = void 0 === n ? {} : n).isAsync, | |
o = void 0 === r ? 0 : r, | |
r = n.observe, | |
r = void 0 !== r && r, | |
i = n.checkIgnore, | |
n = L(yn(f), 4), | |
u = n[2], | |
n = n[3]; | |
return o && n(), r && (e(Object.prototype.hasOwnProperty.call("resource", t)), (0, L(mn(a, (n, t, r) => t === 0 && e(r)), 1)[0])("resource")), [ function() { | |
return et(Object.prototype.hasOwnProperty.call("resource", t)); | |
} ]; | |
}; | |
}, | |
it = { ev_type: "perf", isAsync: 0, dns: 0, tcp: 0, request: 0, response: 0, processing: 0, blank: 0, domready: 0, load: 0, has_resource: 0, domparse: 0, resource: 0, ttfb: 0, redirect: 0, tti: 0, upload_reason: "sample", network_type: "", timing: {}, navigation_timing: {}, navigation: {}, resources: [] }, | |
ut = "PerformanceMonitor", | |
ct = function(n, t) { | |
if (n && t) { | |
var r = n.domainLookupEnd, | |
e = n.domainLookupStart, | |
o = n.connectEnd, | |
i = n.connectStart, | |
u = n.responseEnd, | |
c = n.responseStart, | |
f = n.requestStart, | |
a = n.domComplete, | |
v = n.domLoading, | |
s = n.domInteractive, | |
l = n.navigationStart, | |
d = n.loadEventEnd, | |
h = n.loadEventStart, | |
p = n.secureConnectionStart, | |
f = { dns: r - e, tcp: o - i, request: c - f, response: u - c, processing: a - v, blank: u - l, domready: s - l, load: d - l, domparse: s - u, resource: h - n.domContentLoadedEventEnd, ttfb: c - f, redirect: n.redirectEnd - n.redirectStart }; | |
p && (f.ssl = o - p); | |
t = t("navigation")[0]; | |
return (t || n) && (f.navigation = t || n), n && (f.timing = n), t && (f.navigation_timing = t), f; | |
} | |
}, | |
ft = function() { | |
var n = false; | |
return B(() => n = true), function() { | |
return n; | |
}; | |
}, | |
at = function(r) { | |
var e = false; | |
return [ function() { | |
return e; | |
}, function(n, t) { | |
if (!n) { | |
if (e) return; | |
e = true; | |
} | |
r && r(t); | |
} ]; | |
}, | |
vt = function(n, t, r, e) { | |
if (!n) return 0; | |
var o, | |
i = L(n, 3), | |
u = i[0], | |
n = i[1], | |
c = i[2]; | |
if (Object.prototype.hasOwnProperty.call(n, t), t) return n().event.fmp || 0; | |
try { | |
return o = [ [ W(1), function() { | |
return (Object.prototype.toString.call(n) === "[object Array]").event.fmp; | |
} ], [ W(2), function() { | |
return e(); | |
} ] ], function(n) { | |
for (var t = 0; t < o.length;) { | |
if (o[t][0](n)) return o[t][1](n); | |
t += 1; | |
} | |
}(r) || 0; | |
} catch (n) { | |
return 0; | |
} | |
}, | |
st = function(n) { | |
var t = { ...n }; | |
return [ function(n) { | |
n = (t = n ? { ...t, ...n } : t).fmp; | |
t.fmp = n ? Math.max(Math.round(n), t.fcp || 0) : void 0; | |
}, function() { | |
return { name: ut, type: "post", event: t }; | |
}, function(n) { | |
return t = { ...n }; | |
} ]; | |
}, | |
lt = "StaticErrorMonitor"; | |
function dt(n, t) { | |
var r = t.length; | |
if (r) { | |
for (var e = r - 1; e > -1; e--) { | |
var o = t[e]; | |
if (o.name === n) return o; | |
} | |
} | |
} | |
function ht(n) { | |
return n = (t = n).tagName.toLowerCase() === "link" ? "href" : "src", typeof t.getAttribute == "function" ? t.getAttribute(n) || "" : t[n] || ""; | |
var t; | |
} | |
function pt(o, i, u) { | |
return void 0 === o && (o = tn()), void 0 === i && (i = en()), void 0 === u && (u = location === null || void 0 === location ? void 0 : location.href), function(n, t) { | |
var r = L(yn(i), 3)[2]; | |
return o && o.addEventListener("error", n => { | |
n = mt(r("resource"), n, u || ""); | |
n && t && t(n); | |
}, true), [ function(n) { | |
return mt(r("resource"), n, u || ""); | |
} ]; | |
}; | |
} | |
var mt = function(n, t, r) { | |
t = t || window.event || {}; | |
try { | |
e = t.target || t.srcElement || {}; | |
} catch (n) { | |
return; | |
} | |
t = e.tagName; | |
if (Object.prototype.toString.call(t) === "[object String]") { | |
var e = ht(e); | |
if (e && e !== r) { | |
return { name: lt, type: "get", event: function(n, t, r) { | |
var e = p(n), | |
o = { ev_type: "static", st_type: t, st_src: n, st_protocol: e.protocol, st_domain: e.hostname, st_path: e.pathname }, | |
i = r && dt(e.href, r); | |
if (i) o.timing = i; | |
return o; | |
}(e, t.toLowerCase(), n) }; | |
} | |
} | |
}, | |
yt = "StaticSRIErrorMonitor"; | |
function wt(r, e, o) { | |
if (void 0 === r && (r = tn()), void 0 === e && (e = function() { | |
if ("Promise" in window) return Promise; | |
}()), void 0 === o && (o = nn()), r && o && e) { | |
return function(n, t) { | |
n = Mt(gt(t, n.onError, e, o), r); | |
return r.addEventListener("error", n, true), [ n ]; | |
}; | |
} | |
} | |
function bt(o) { | |
return void 0 === o && (o = rn()), function(n) { | |
var t = L(jt(100), 2), | |
r = t[0], | |
e = t[1], | |
t = L(Tt(n.maxBreadcrumbs), 2), | |
n = t[0], | |
t = t[1], | |
t = Ot(t); | |
return o && (o.addEventListener("click", r("click", xt(t, "dom"))), o.addEventListener("keypress", e(xt(t, "dom")))), [ n ]; | |
}; | |
} | |
function _t(u) { | |
return void 0 === u && (u = tn()), function(n, r) { | |
var t = n.getBreadcrumbs, | |
e = n.enableCatchGlobalJSError, | |
o = void 0 === e || e, | |
e = n.catchUnhandledRejection, | |
e = void 0 === e || e, | |
n = n.release, | |
i = kt(void 0 === n ? "" : n, () => t && t() || []), | |
n = function(t) { | |
return function(n) { | |
n = t(n), n = n && i(n); | |
n && r && r(n); | |
}; | |
}; | |
u && (o && u.addEventListener("error", n(St)), e && u.addEventListener("unhandledrejection", n(Pt))); | |
return [ function(n) { | |
var t = null; | |
return (t = Object.prototype.toString.call(n) === "[object ErrorEvent]" ? St(n) : Object.prototype.toString.call(n) === "[object PromiseRejectionEvent]" ? Pt(n) : n) && i(t); | |
} ]; | |
}; | |
} | |
var gt = function(i, t, u, r) { | |
return function(o) { | |
var n; | |
typeof u.all == "function" && u.all([ r(o, { cache: "force-cache" }).then(n => n.ok ? n : new Response()), (n = o + "?vt=" + Date.now(), r(n, { cache: "no-store" }).then(n => n.ok ? n : new Response())) ]).then(n => { | |
var n = L(n, 2), | |
r = n[0], | |
e = n[1]; | |
if (r.status === 200 && e.status === 200) { | |
return u.all([ r.text(), e.text() ]).then(n => { | |
var t = n[0] || r.status + "," + e.status; | |
return [ t.length, n[1].length, t, o ]; | |
}); | |
} | |
}).then(n => { | |
var t, r, e; | |
n && i && (r = (t = L(n, 3))[0], e = t[1], t[2] && r !== e && i({ name: yt, type: "get", event: function(n, t, r, e) { | |
return { ev_type: "static_sri", sri: { error_file_size: n, real_file_size: t, error_file_context: r, static_file_src: e, static_file_url: p(e).href || "" } }; | |
}.apply(void 0, a([], L(n), false)) })); | |
}).catch(n => { | |
t && t(n); | |
}); | |
}; | |
}, | |
Mt = function(e, o) { | |
return function(n) { | |
var t, | |
r = n || o.event || {}; | |
try { | |
t = r.target || r.srcElement || {}; | |
} catch (r) { | |
return; | |
} | |
(typeof (n = t).getAttribute == "function" ? n.getAttribute("integrity") : n.integrity) && (n = typeof (n = t).getAttribute == "function" ? n.getAttribute("src") : n.src || n.href || "", t = ((t = t.tagName) === null || void 0 === t ? void 0 : t.toLowerCase()) || "", n && t && n !== location.href && e(n)); | |
}; | |
}, | |
jt = function(o) { | |
function i(t, r) { | |
var e; | |
return function(n) { | |
u = void 0, n && e !== n && r({ event: e = n, name: t }); | |
}; | |
} | |
var u; | |
return [ i, function(e) { | |
return function(n) { | |
var t; | |
try { | |
t = n.target; | |
} catch (n) { | |
return; | |
} | |
var r = t && t.tagName; | |
r && (r === "INPUT" || r === "TEXTAREA" || t.isContentEditable) && (u || i("input", e)(n), clearTimeout(u), u = window.setTimeout(() => { | |
u = void 0; | |
}, o)); | |
}; | |
} ]; | |
}, | |
xt = function(t, r) { | |
return function(n) { | |
if (r) { | |
try { | |
t(n); | |
} catch (n) {} | |
} | |
}; | |
}, | |
Ot = function(r) { | |
return function(n) { | |
var t; | |
try { | |
t = n.event.target ? Z(n.event.target) : Z(n.event); | |
} catch (n) { | |
t = "<unknown>"; | |
} | |
t.length !== 0 && r({ category: "ui." + n.name, message: t }); | |
}; | |
}, | |
Tt = function(t) { | |
void 0 === t && (t = 20); | |
var r = []; | |
return [ function() { | |
return r; | |
}, function(n) { | |
n = { ...n, timestamp: new Date().getTime() }; | |
r = t >= 0 ? a(a([], L(r), false), [ n ], false).slice(-t) : a(a([], L(r), false), [ n ], false); | |
} ]; | |
}, | |
Et = "JSExceptionMonitor", | |
St = function(n) { | |
n = n.error; | |
if (n) return n; | |
}, | |
Pt = function(n) { | |
var t; | |
try { | |
"reason" in n ? t = n.reason : "detail" in n && "reason" in n.detail && (t = n.detail.reason); | |
} catch (n) {} | |
if (t) return t; | |
}, | |
kt = function(r, e) { | |
return function(n) { | |
var t; | |
if (function(n) { | |
switch (Object.prototype.toString.call(n)) { | |
case "[object Error]": | |
case "[object Exception]": | |
case "[object DOMError]": | |
case "[object DOMException]": | |
return 1; | |
default: | |
return n instanceof Error; | |
} | |
}(n)) { t = n; } else { | |
if (Object.prototype.toString.call(n) === "[object Object]" || i(n)) { | |
try { | |
t = { message: JSON.stringify(n) }; | |
} catch (n) {} | |
} | |
Object.prototype.toString.call(n) === "[object String]" && (t = { message: n }); | |
} | |
if (t) { | |
n = { ev_type: "js_exception", exception: { message: (n = t).message, name: n.name, fileName: n.fileName, lineNumber: n.lineNumber, columnNumber: n.columnNumber, stack: n.stack, stacktrace: n.stacktrace, framesToPop: n.framesToPop }, release: r, breadcrumbs: e() }; | |
return { name: Et, type: "post", event: n }; | |
} | |
}; | |
}, | |
Rt = (Dt.prototype.sendEvent = function(n) { | |
n = this.getEventToBeSent(n); | |
n && this.idleSendEvent(n); | |
}, Dt.prototype.getEventToBeSent = function(n) { | |
n = this._modifyEvent(n); | |
if (this._shouldSend(n)) return n; | |
}, Dt.prototype._modifyEvent = function(n) { | |
return n; | |
}, Dt.prototype._shouldSend = function(n) { | |
return true; | |
}, Dt.prototype._send = function(n) {}, Dt.prototype.idleSendEvent = function(n) { | |
this._send(n); | |
}, Dt); | |
function Dt() {} | |
var At, | |
It = (n(Ct, At = Rt), Ct.prototype.send = function() { | |
clearTimeout(this.n), this.t(); | |
}, Ct.prototype.t = function() { | |
var n, t; | |
(n = this.e) !== null && void 0 !== n && n.length && (t = this.transport) !== null && void 0 !== t && t.batch && (this.transport.batch(this.e), this.e.length = 0); | |
}, Ct.prototype.o = function(n, t, r) { | |
if (this.transport) { | |
if (this.transport.supportBatch) return r && (t.serviceType = r), this.i(t); | |
this.transport[n](t, r); | |
} | |
}, Ct.prototype.i = function(n) { | |
var t = this; | |
if (clearTimeout(this.n), this.e.push(n), this.e.length >= this.u) return this.t(); | |
this.n = setTimeout(() => { | |
t.t(); | |
}, this.c); | |
}, Ct.prototype.f = function() { | |
window.addEventListener("unload", this.t.bind(this)); | |
}, Ct); | |
function Ct(n) { | |
var t = At.call(this) || this; | |
return t.e = [], t.f(), t.c = n.commonParams.batchReportWait || 1e3, t.u = n.commonParams.maxBatchReportLength || 10, t; | |
} | |
function Ht(n, t) { | |
return typeof n == "object" && n !== null && !(Object.prototype.toString.call(n) === "[object Array]") ? typeof t == "object" && t !== null && !(Object.prototype.toString.call(t) === "[object Array]") ? { ...n, overrides: t } : n : {}; | |
} | |
function Lt(n, t) { | |
var r, e; | |
if (typeof n == "object" && n !== null && !(Object.prototype.toString.call(n) === "[object Array]")) { | |
try { | |
for (var o = T(Object.keys(n)), i = o.next(); !i.done; i = o.next()) if (typeof n[i.value] !== t) return; | |
} catch (n) { | |
r = { error: n }; | |
} finally { | |
try { | |
i && !i.done && (e = o.return) && e.call(o); | |
} finally { | |
if (r) throw r.error; | |
} | |
} | |
return 1; | |
} | |
} | |
function Nt(n) { | |
var t = n.base, | |
n = n.info; | |
return { jsBase: t, jsInfo: n != null ? n : {}, serviceType: n.ev_type }; | |
} | |
var Bt = "CustomMonitor"; | |
function Ft(n) { | |
if (function(n) { | |
if (n != null && typeof n == "object" && typeof n.eventName == "string" && n.eventName !== "") { | |
var t = n.metrics, | |
r = n.category, | |
n = n.timing; | |
return !t || Lt(t, "number") ? (!r || Lt(r, "string")) && !(n && !Lt(n, "number")) : void 0; | |
} | |
}(n)) return { name: Bt, event: { ev_type: "custom", data: n }, type: "post" }; | |
} | |
var qt = { supportBatch: false, terminatedPreCollect: j, config: j, cover: j, accumulate: j, reportDirectly: j, batch: j, average: j, customReport: j }, | |
Jt = function(n) { | |
var e = this; | |
this.terminatedPreCollect = function(n) { | |
var t, r; | |
(r = (t = e.log).terminatedPreCollect) !== null && void 0 !== r && r.call(t, n); | |
}, this.config = function(n) { | |
var t, r; | |
(r = (t = e.log).config) !== null && void 0 !== r && r.call(t, n); | |
}, this.cover = function(n, t) { | |
e.log.cover(n, t); | |
}, this.accumulate = function(n, t) { | |
e.log.accumulate(n, t); | |
}, this.reportDirectly = function(n, t) { | |
e.log.reportDirectly(n, t); | |
}, this.batch = function(n) { | |
var t, r; | |
(r = (t = e.log).batch) !== null && void 0 !== r && r.call(t, n); | |
}, this.average = function(n, t) { | |
e.log.average(n, t); | |
}, this.customReport = function(n) { | |
var t, r; | |
(r = (t = e.log).customReport) !== null && void 0 !== r && r.call(t, n); | |
}, this.log = (n = n.transport) !== null && void 0 !== n ? n : qt, this.supportBatch = typeof this.log.batch == "function"; | |
}; | |
var Ut, | |
Xt = ((rr = {})[Et] = [ "exception.name", "exception.message", "exception.stack" ], rr[lt] = [ "st_src", "st_type", "st_domain", "st_path" ], rr[Bn] = [ "ax_url", "ax_status", "ax_type" ], rr[jn] = [ "ax_url", "ax_status", "ax_type" ], rr), | |
zt = function(n, t) { | |
var r, e, | |
t = t.split("."), | |
o = n; | |
try { | |
for (var i = T(t), u = i.next(); !u.done; u = i.next()) { | |
var c = u.value; | |
if (o == null) return; | |
o = o[c]; | |
} | |
} catch (n) { | |
r = { error: n }; | |
} finally { | |
try { | |
u && !u.done && (e = i.return) && e.call(i); | |
} finally { | |
if (r) throw r.error; | |
} | |
} | |
return o; | |
}, | |
Gt = (n($t, Ut = It), $t.prototype._shouldSend = function(n) { | |
if (!(typeof n == "object" && n !== null && !(Object.prototype.toString.call(n) === "[object Array]")) || !n.event) return false; | |
var t = this.options.monitors; | |
if (n.name === jn || n.name === Bn) { | |
var r = S(z || []); | |
if (r && r.test(n.event.ax_url)) return false; | |
} | |
return n.name === jn || n.name === Bn ? function(n) { | |
var r = n.sendParams, | |
t = n.ajaxMonitor; | |
if (Object.prototype.toString.call(n = t.whitelistUrls) === "[object Array]" && n.length > 0) { | |
var e = S(t.whitelistUrls || []); | |
return e && e.test(r.event.ax_url) ? true : false; | |
} | |
if ((e = S(t.ignore || [])) && e.test(r.event.ax_url)) return false; | |
if ((e = t.statusCodeSample) && Object.prototype.hasOwnProperty.call(e, r.event.ax_status)) return !!e[r.event.ax_status] && Math.random() < Number(e[r.event.ax_status]); | |
if (t = t.requestUrlSample) { | |
var o = false, | |
i = false; | |
if (t.forEach(n => { | |
var t; | |
o || (t = S([ n.url ])) != null && t.test(r.event.ax_url) && (o = true, i = !!n.sampleRate && Math.random() < Number(n.sampleRate)); | |
}), o) return i; | |
} | |
return true; | |
}({ sendParams: n, ajaxMonitor: t.AjaxMonitor }) : n.name === ut || (n.name !== lt || (n = { sendParams: n, staticErrorMonitor: t.StaticErrorMonitor }, t = n.sendParams, !(n = S(n.staticErrorMonitor.ignore || [])) || !n.test(t.event.st_src))); | |
}, $t.prototype._modifyEvent = function(n) { | |
if (!n || !(typeof n == "object" && n !== null && !(Object.prototype.toString.call(n) === "[object Array]"))) return {}; | |
var t, r, e, | |
o = this.options.monitors; | |
if (n.name !== ut) return n; | |
var i = (i = { sendParams: n, performanceMonitor: o.PerformanceMonitor }, n = i.sendParams, (o = i.performanceMonitor) ? !!(typeof window == "object" && window !== null && !(Object.prototype.toString.call(window) === "[object Array]")) && (typeof window.performance == "object" && window.performance !== null && !(Object.prototype.toString.call(window.performance) === "[object Array]")) && !!(typeof window.performance.timing == "object" && window.performance.timing !== null && !(Object.prototype.toString.call(window.performance.timing) === "[object Array]")) ? (i = n.event.isAsync ? n.event.load > o.spaSlowSessionTime : (t = window.performance.timing).loadEventEnd - t.navigationStart > o.slowSessionTime, Object.prototype.toString.call((t = n.event) === null || void 0 === t ? void 0 : t.resources) === "[object Array]" && (r = n.event.resources, e = S(o.geckoUrls || []), r.forEach((n, t) => { | |
r[t] && (typeof r[t] == "object" && r[t] !== null && !(Object.prototype.toString.call(r[t]) === "[object Array]")) && typeof r[t].toJSON == "function" && (r[t] = r[t].toJSON(), r[t].is_gecko = e && e.test(n.name || "") ? "1" : "0"); | |
})), o.webIDHitStaticResource || o.sampleHitStaticResource ? n.event.upload_reason = "sample" : i ? n.event.upload_reason = "slow_session" : ((i = n.event) === null || void 0 === i || delete i.resources, n.event.has_resource = 0), n) : {} : n); | |
return (n = i.event) === null || void 0 === n || delete n.resources, i; | |
}, $t.prototype._send = function(n) { | |
n && n.event && n.name && this.transport && (this.deDup(n) || (this.previousOptions = { count: 0, name: n.name, options: JSON.parse(JSON.stringify(n)) }, this.sendByTypes(n))); | |
}, $t.prototype.normalizeOptions = function(n) { | |
return t({}, this.options, n); | |
}, $t.prototype.sendByTypes = function(n) { | |
var t; | |
this.transport && (t = this.a(n), n.name === ut && this.o("cover", t, n.event.ev_type), [ lt, rt, jn, Bn, Et, yt ].indexOf(n.name) > -1 && this.o("reportDirectly", t, n.event.ev_type), n.name === "CustomMonitor" && this.o("customReport", (!(n = n.event.data).hasOwnProperty("canSample") && n.hasOwnProperty("level") && (n.canSample = +n.level == 0 ? 0 : 1), n))); | |
}, $t); | |
function $t(n) { | |
var i = Ut.call(this, n) || this; | |
return i.previousOptions = { count: 0 }, i.setTransport = function(n) { | |
i.transport = new Jt({ transport: n.transport }), i.preQueue.forEach(n => { | |
Ut.prototype.sendEvent.call(i, n); | |
}); | |
}, i.updateConfig = function(n) { | |
i.options = i.normalizeOptions(n); | |
}, i.sendEvent = function(n) { | |
i.transport ? Ut.prototype.sendEvent.call(i, n) : i.preQueue.push(n); | |
}, i.getEventToBeSent = function(n) { | |
return Ut.prototype.getEventToBeSent.call(i, n); | |
}, i.flushCacheData = function() { | |
var n = i.v(), | |
t = {}; | |
return n && ((t = i.a(n)).serviceType = t.jsInfo.ev_type), i.previousOptions = { count: 0 }, t; | |
}, i.v = function() { | |
var n = i.previousOptions, | |
t = n.count, | |
n = n.options; | |
if (t && n && n.event) return n.event.js_repeat_count = t, n; | |
}, i.s = function() { | |
var n = i.v(); | |
n && (i.sendByTypes(n), i.previousOptions = { count: 0 }); | |
}, i.deDup = function(n) { | |
var t, r, | |
e = Object.keys(Xt).indexOf(n.name) > -1, | |
o = i.previousOptions.name === n.name; | |
if (e && o && (t = i.previousOptions.options, ((n = Xt[(r = n).name]) == null ? void 0 : n.length) && n.every(n => JSON.stringify(zt(t == null ? void 0 : t.event, n)) === JSON.stringify(zt(r == null ? void 0 : r.event, n))))) return i.previousOptions.count++, true; | |
i.s(); | |
}, i.terminated = function() { | |
setTimeout(() => { | |
var n, t; | |
(t = (n = i.transport) === null || void 0 === n ? void 0 : n.terminatedPreCollect) !== null && void 0 !== t && t.call(n, {}); | |
}, 1e3); | |
}, i.terminatedPreCollect = function() { | |
if (document.readyState === "complete") return i.terminated(); | |
window.addEventListener("load", i.terminated); | |
}, i.a = function(n) { | |
var t = n.overrides || {}, | |
r = t.context, | |
e = function(n, t) { | |
var r = {}; | |
for (o in n) Object.prototype.hasOwnProperty.call(n, o) && t.indexOf(o) < 0 && (r[o] = n[o]); | |
if (n != null && typeof Object.getOwnPropertySymbols == "function") for (var e = 0, o = Object.getOwnPropertySymbols(n); e < o.length; e++) t.indexOf(o[e]) < 0 && Object.prototype.propertyIsEnumerable.call(n, o[e]) && (r[o[e]] = n[o[e]]); | |
return r; | |
}(t, [ "context" ]), | |
t = i.options.commonParams, | |
r = { ...typeof t.context == "object" && t.context !== null && !(Object.prototype.toString.call(t.context) === "[object Array]") ? t.context : {}, ...typeof r == "object" && r !== null && !(Object.prototype.toString.call(r) === "[object Array]") ? r : {} }, | |
r = { ...t, context: r }; | |
return { jsBase: r, jsInfo: n.event, ...e }; | |
}, i.l = function() { | |
window.addEventListener("unload", i.s.bind(i)); | |
}, i.options = n, i.preQueue = [], i.terminatedPreCollect(), i.l(), i; | |
} | |
var Wt = function() { | |
var n = ""; | |
try { | |
n = function(n, t) { | |
var r, e; | |
if (!n || !t) return ""; | |
var n = n.split(";"), | |
o = {}; | |
try { | |
for (var i = T(n), u = i.next(); !u.done; u = i.next()) { | |
var c = u.value.split("="), | |
f = Object.prototype.toString.call(c[0]) === "[object String]" && c[0].trim(); | |
f && Object.prototype.toString.call(c[1]) === "[object String]" && (o[f] = c[1].trim()); | |
} | |
} catch (n) { | |
r = { error: n }; | |
} finally { | |
try { | |
u && !u.done && (e = i.return) && e.call(i); | |
} finally { | |
if (r) throw r.error; | |
} | |
} | |
return o[t] || ""; | |
}(document.cookie, "MONITOR_WEB_ID"); | |
} catch (n) {} | |
return n; | |
}; | |
var Kt = (Qt.prototype.run = function(e) { | |
var n = this; | |
this.enable = true; | |
function o() { | |
var r; | |
n.enable && (r = Date.now() - performance.timing.navigationStart, t || e({ start: t = r, end: r }), setTimeout(() => { | |
var n = Date.now() - performance.timing.navigationStart, | |
t = n - r; | |
t - i < 10 ? i < 16 ? i *= 2 : i < 25 ? i += 1 : i = 25 : t > 50 && (i = Math.max(1, i / 2)), t > 50 && e({ start: r, end: n }), Object.prototype.toString.call(n) === "[object Object]"; | |
}, i)); | |
} | |
var t, | |
i = 1; | |
Object.prototype.toString.call(n) === "[object Object]"; | |
}, Qt.prototype.stop = function() { | |
this.enable = false; | |
}, Qt); | |
function Qt() { | |
this.enable = false; | |
} | |
function Zt() { | |
for (var n = [], t = 0; t < arguments.length; t++) n[t] = arguments[t]; | |
var r = n[2], | |
i = Gn.apply(void 0, a([], L(n), false)); | |
if (r) return i; | |
if (i) { | |
var r = L(ir(), 2), | |
u = r[0], | |
c = r[1]; | |
return function(n, t) { | |
var t = L(i(n, t, c), 4), | |
r = t[0], | |
e = t[1], | |
o = t[2], | |
t = t[3]; | |
return Object.prototype.hasOwnProperty.call(n => { | |
e.push(n), Object.prototype.toString.call(n.end + 5e3) === "[object Object]"; | |
}, t), [ function(n) { | |
e.notSupport = false, r(n); | |
}, e, o, t ]; | |
}; | |
} | |
} | |
function nr(n) { | |
var t, | |
r = _({}, (t = (n = void 0 === n ? {} : n).commonParams) !== null && void 0 !== t ? t : {}); | |
if (!(typeof n == "object" && n !== null && !(Object.prototype.toString.call(n) === "[object Array]"))) return r; | |
var e = [ "bid", "context", "pid", "slardar_web_id", "performanceAuto", "region", "env", "release" ]; | |
return f(n, (n, t) => { | |
l(e, n) && (r[n] = t); | |
}), r.slardar_web_id && (r.slardar_web_id = r.slardar_web_id.toString()), r; | |
} | |
function tr(n) { | |
var t, | |
r = _({}, (t = (n = void 0 === n ? {} : n).flags) !== null && void 0 !== t ? t : {}); | |
if (!(typeof n == "object" && n !== null && !(Object.prototype.toString.call(n) === "[object Array]"))) return r; | |
var e = [ "hookXHR", "hookFetch", "enableFMP", "enablePerformance", "enableStaticError", "enableCatchJSError" ]; | |
return f(n, (n, t) => { | |
l(e, n) && (r[n] = t); | |
}), r; | |
} | |
var rr, er, or, | |
ir = function() { | |
var t = new Kt(); | |
return [ function(n) { | |
return t.run(n); | |
}, function() { | |
return t.stop; | |
} ]; | |
}, | |
Rt = function() { | |
function v() { | |
(l = new Gt(h)).updateConfig(h); | |
var n = function() { | |
var n, t, r, e, | |
o = h.flags, | |
i = h.commonParams, | |
u = h.monitors, | |
c = l && l.sendEvent; | |
if (c) { | |
o.enableCatchJSError && (r = L(hn(bt, {}, c), 1)[0], e = L(hn(_t, { getBreadcrumbs: r }, c), 1)[0]); | |
var f, | |
i = { commonParams: { web_id: i.slardar_web_id, bid: i.bid }, ajaxMonitorOptions: u.AjaxMonitor }; | |
o.hookXHR && hn(_n, i, c), o.hookFetch && hn(Pn, i, c), o.enableStaticError && hn(pt, null, c), o.enablePerformance && (i = { renderType: 1, TTIMonitor: Zt, prePerformanceObserver: { precollect: [], observer: void 0 } }, o.enableFMP ? (f = hn(zn, u.FMPMonitor), f = L(hn(Nn, { ...i, fmpMonitor: f }, c), 3)[2]) : (n = (a = L(hn(Nn, i, c), 4))[1], f = a[2], t = a[3])), hn(wt, { onError(n) { | |
e && (n = Ht(e(n), void 0), Object.prototype.toString.call(n) === "[object Array]"); | |
} }, c); | |
var a = L(hn(ot, {}, c), 1)[0]; | |
return [ e, a, f, n, t ]; | |
} | |
}(); | |
return l && l.setTransport({ transport: p.transport || window.jsIESLiveTimingMonitor }), n; | |
} | |
function s() { | |
var n = { commonParams: nr(p), flags: tr(p), monitors: function(n) { | |
var t = n.setting, | |
n = _({ AjaxMonitor: {}, PerformanceMonitor: {}, StaticErrorMonitor: {}, BaseMonitor: { appTypeSetting: {} }, FMPMonitor: {} }, t.monitors); | |
return t.ajaxWhitelistUrls && Object.prototype.toString.call(t.ajaxWhitelistUrls) === "[object Array]" && (n.AjaxMonitor.whitelistUrls = (n.AjaxMonitor.whitelistUrls || []).concat(t.ajaxWhitelistUrls)), t.ignoreAjax && Object.prototype.toString.call(t.ignoreAjax) === "[object Array]" && (n.AjaxMonitor.ignore = (n.AjaxMonitor.ignore || []).concat(t.ignoreAjax)), t.fmpIgnoreTags && Object.prototype.toString.call(t.fmpIgnoreTags) === "[object Array]" && (n.FMPMonitor.ignoreTags = t.fmpIgnoreTags), Object.prototype.hasOwnProperty.call(t, "geckoUrls") && (n.PerformanceMonitor.geckoUrls = t.geckoUrls), t.ignoreStatic && Object.prototype.toString.call(t.ignoreStatic) === "[object Array]" && (n.StaticErrorMonitor.ignore = (n.StaticErrorMonitor.ignore || []).concat(t.ignoreStatic)), n; | |
}({ setting: p }) }, | |
n = _(r, n); | |
h = n; | |
} | |
var l, d, t, | |
r = _({}, { commonParams: { release: "", version: "", hostname: window.location.hostname, protocol: window.location.protocol.slice(0, -1), url: window.location.href, pid: location.pathname, screen_resolution: P(), network_type: k(), bid: "", context: {}, slardar_web_id: Wt() || V, performanceAuto: true, region: "cn", env: "production", maxBatchReportLength: 10, batchReportWait: 1e3 }, flags: { hookXHR: true, hookFetch: true, enableFMP: true, enablePerformance: true, enableResourcePerformance: true, enableStaticError: true, enableCatchJSError: true }, monitors: { BaseMonitor: { appTypeSetting: { type: 0, SPA: "", renderType: 0 } }, AjaxMonitor: { webIDHit: false, sampleHitTrace: false, ignore: z, abort: false, whitelistUrls: [], statusCodeSample: {}, requestUrlSample: [], errorRequestCollect: false }, PerformanceMonitor: { webIDHitStaticResource: false, sampleHitStaticResource: !!X && Math.random() < Number(X), slowSessionTime: G, spaSlowSessionTime: $, geckoUrls: [], interval: 0, checkPoint: [] }, StaticErrorMonitor: { ignore: z }, FMPMonitor: {} }, heatmap: { openList: [] } }, { commonParams: { version: "1.1.61" } }), | |
h = r, | |
p = {}, | |
m = (t = false, function(n) { | |
l && l.transport && (n.bid && (t ? delete n.bid : t = true), Object.keys(n).filter(n => [ "bid", "pid", "context", "env", "release" ].indexOf(n) > -1).length && l.transport.config(n)); | |
}); | |
return function() { | |
for (var n = [], t = 0; t < arguments.length; t++) n[t] = arguments[t]; | |
var r, | |
e = L(d || [], 5), | |
o = e[0], | |
i = e[1], | |
u = e[2], | |
c = e[3], | |
f = e[4]; | |
if (n[0] === "config") { | |
if (!(typeof n[1] == "object" && n[1] !== null && !(Object.prototype.toString.call(n[1]) === "[object Array]"))) return; | |
e = n[1]; | |
return p = { ...p || {}, ...e || {} }, !(!p || !t) && (g.test(p) || M.test(t)), s(), void (l ? l.updateConfig(h) : d = v()); | |
} | |
if (n[0] === "flushCacheData") return l && l.flushCacheData(); | |
if (n[0] === "send") return l && l.send(); | |
if (n[0] === "getCommonParams") return h.commonParams; | |
if (n[0] === "getLatestPerformance") { | |
var a = u && Object.prototype.hasOwnProperty.call(n, t), | |
a = a && (l == null ? void 0 : l.getEventToBeSent(a)); | |
return Nt({ base: h.commonParams, info: { ev_type: "perf", ...a && a.event || {} } }); | |
} | |
if (n[0] !== "getLatestResource") return n[0] === "performanceInit" ? f && f() : n[0] === "performanceSend" ? c && Object.prototype.toString.call(n) === "[object Array]" : void (l && l.sendEvent && (n[0] !== "captureException" ? n[0] === "emit" && n[1] === "custom" && (r = Ft(n[2])) && l.sendEvent(r) : o && (r = Ht(Object.prototype.toString.call(n[1]) === "[object Object]", n[2]), l.sendEvent(r)))); | |
i = i && i(), a = i && (l == null ? void 0 : l.getEventToBeSent(i)); | |
return Nt({ base: h.commonParams, info: { ev_type: "resource_performance", ...a && a.event || {} } }); | |
}; | |
}; | |
rr = window, It = "SlardarHybrid", !rr || (or = rr[It]) !== null && void 0 !== or && or.r || (er = Rt(), (or = function() { | |
for (var n = [], t = 0; t < arguments.length; t++) n[t] = arguments[t]; | |
try { | |
return er.apply(void 0, a([], L(n), false)); | |
} catch (n) {} | |
}).version = "1.1.61", or.r = 1, rr[It] = or); | |
}(); | |
var r = t[c]; | |
t[c] = function(n, t) { | |
return n == a && d(i, t), n == v && d(u, t), r.apply(null, arguments); | |
}, d(o, n => { | |
t[e].apply(null, n); | |
}), t[c] = r, n = 1; | |
}, 1); | |
} | |
function s(n) { | |
i.push(n); | |
} | |
function l(n) { | |
u.push(n); | |
} | |
function d(n, t) { | |
for (var r = 0; r < n.length; r++) t(n[r]); | |
} | |
}(window, "SlardarHybrid"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!function () { | |
"use strict"; | |
function i() {} | |
function n(i) { | |
a("iesLiveTimingMonitorReportCustom", i); | |
} | |
var o, e = window, r = function (i, n, t) { | |
"function" == typeof (t = void 0 === t ? e : t)[i] && t[i].apply(t, n); | |
}, u = "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (i) { | |
var n = 16 * Math.random() | 0; | |
return ("x" === i ? n : 3 & n | 8).toString(16); | |
}), c = function (i, n) { | |
if (!i) return i; | |
i = "[object Array]" === Object.prototype.toString.call(i) ? i.map(function (i) { | |
return i.nativeBase = i.nativeBase || {}, i.nativeBase.url = location.href, i.nativeBase.navigation_id = u, n && (i.serviceType = n), i; | |
}) : (i.nativeBase = i.nativeBase || {}, i.nativeBase.url = location.href, i.nativeBase.navigation_id = u, n && (i.serviceType = n), i); | |
try { | |
return JSON.parse(JSON.stringify(i)); | |
} catch (i) {} | |
}, a = function (i, n, t) { | |
var o; | |
!("about:blank" !== e.location.href) || (o = c(n, t)) && (e.webkit ? null !== (t = null === (n = null === (t = null === (n = e.webkit) || void 0 === n ? void 0 : n.messageHandlers) || void 0 === t ? void 0 : t[i]) || void 0 === n ? void 0 : n.postMessage) && void 0 !== t && t.call(n, o) : r(i, [o])); | |
}, l = "iesLiveTimingMonitor", v = l + "Batch", f = l + "ReportStage", m = l + "InitTimeName", s = {terminatedPreCollect: function (i) { | |
a("iesLiveTimingMonitorTerminatedPreCollect", i); | |
}, config: function (i) { | |
a("iesLiveTimingMonitorConfig", i); | |
}, cover: function (i, n) { | |
a("iesLiveTimingMonitorCover", i, n); | |
}, accumulate: function (i, n) { | |
a("iesLiveTimingMonitorAccumulate", i, n); | |
}, reportDirectly: function (i, n) { | |
a("iesLiveTimingMonitorReportDirectly", i, n); | |
}, batch: null !== (l = null === (l = e.webkit) || void 0 === l ? void 0 : l.messageHandlers) && void 0 !== l && l[v] || e[v] ? function (i) { | |
a(v, i); | |
} : null, average: function (i, n) { | |
a("iesLiveTimingMonitorAverage", i, n); | |
}, customReport: n}; | |
e.jsIESLiveTimingMonitor = s, e.jsIESWebviewMonitor = {customReport: n}, e.bdPerformance = {paintEntries: [], setFirstPaintTiming: i, setFirstMeaningfulPaintTiming: i}, o = "DOMContentLoaded", e && e.addEventListener(o, function () { | |
a(f, {stage: o}, "pv"), setTimeout(function () { | |
var i; | |
e.history.length <= 1 && (i = {url: location.href, duration: performance.now()}, a(m, i)); | |
}); | |
}), r("SlardarHybrid", ["config", {transport: s}]); | |
}(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment