in static/js/tracker.js [457:584]
function (e, n, t) {
'use strict';
t.r(n),
t.d(n, 'sendPV', function () {
return m;
}),
t.d(n, 'switchPage', function () {
return x;
}),
t.d(n, 'clearAutoPV', function () {
return j;
}),
t.d(n, 'clearAutoSend', function () {
return j;
}),
t.d(n, 'sendLeave', function () {
return P;
}),
t.d(n, 'clearAutoLeave', function () {
return A;
});
var o,
r = t(0),
i = t.n(r);
var u,
a,
c,
l,
d = i.a.getConfig('plugin_pv') || {},
f = d.autoPV,
s = void 0 === f || f,
p = d.autoLeave,
v = void 0 === p || p,
y = d.enableHistory,
h = d.enableHash,
w = function (e, n) {
if (e) {
var t = n || 500;
return e.length > t ? e.slice(0, t - 3) + '...' : e;
}
},
b = null === (o = document) || void 0 === o ? void 0 : o.referrer,
g = function () {
return { p1: window.parent !== window, p2: w(b) };
},
P = function () {
try {
i.a.log('leave', g());
} catch (e) {}
},
S = !0;
function m() {
S ? (S = !1) : i.a.updatePVID && i.a.updatePVID(),
(function () {
try {
i.a.log('pv', g());
} catch (e) {}
})(),
(b = location.href);
}
function x(e) {
try {
e && i.a.setConfig(e), m();
} catch (e) {}
}
function j() {
u && (clearTimeout(u), (u = null));
}
(s &&
(u = setTimeout(function () {
m();
}, 10)),
y && s
? (function (e) {
var n, t, o, r;
window.addEventListener('popstate', function (n) {
e(n.state);
});
var i =
null === (n = window) ||
void 0 === n ||
null === (t = n.history) ||
void 0 === t
? void 0
: t.pushState;
i &&
(history.pushState = function (n) {
i.apply(this, arguments), e(n);
});
var u =
null === (o = window) ||
void 0 === o ||
null === (r = o.history) ||
void 0 === r
? void 0
: r.replaceState;
u &&
(history.replaceState = function (n) {
u.apply(this, arguments), e(n);
});
})(function (e) {
m();
})
: h &&
s &&
((a = m),
window.addEventListener('hashchange', function () {
a({ page_id: location.hash || '#' });
})),
v) &&
((c = function () {
P();
}),
null === (l = window) ||
void 0 === l ||
l.addEventListener('beforeunload', c));
function A() {
c && (window.removeEventListener('beforeunload', c), (c = null));
}
n.default = {
sendPV: m,
switchPage: x,
clearAutoPV: j,
clearAutoSend: j,
sendLeave: P,
clearAutoLeave: A,
};
},