You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
22 KiB

2 years ago
{"ast":null,"code":"var e,\n t,\n n,\n i,\n r = function (e, t) {\n return {\n name: e,\n value: void 0 === t ? -1 : t,\n delta: 0,\n entries: [],\n id: \"v2-\".concat(Date.now(), \"-\").concat(Math.floor(8999999999999 * Math.random()) + 1e12)\n };\n},\n a = function (e, t) {\n try {\n if (PerformanceObserver.supportedEntryTypes.includes(e)) {\n if (\"first-input\" === e && !(\"PerformanceEventTiming\" in self)) return;\n var n = new PerformanceObserver(function (e) {\n return e.getEntries().map(t);\n });\n return n.observe({\n type: e,\n buffered: !0\n }), n;\n }\n } catch (e) {}\n},\n o = function (e, t) {\n var n = function n(i) {\n \"pagehide\" !== i.type && \"hidden\" !== document.visibilityState || (e(i), t && (removeEventListener(\"visibilitychange\", n, !0), removeEventListener(\"pagehide\", n, !0)));\n };\n\n addEventListener(\"visibilitychange\", n, !0), addEventListener(\"pagehide\", n, !0);\n},\n u = function (e) {\n addEventListener(\"pageshow\", function (t) {\n t.persisted && e(t);\n }, !0);\n},\n c = function (e, t, n) {\n var i;\n return function (r) {\n t.value >= 0 && (r || n) && (t.delta = t.value - (i || 0), (t.delta || void 0 === i) && (i = t.value, e(t)));\n };\n},\n f = -1,\n s = function () {\n return \"hidden\" === document.visibilityState ? 0 : 1 / 0;\n},\n m = function () {\n o(function (e) {\n var t = e.timeStamp;\n f = t;\n }, !0);\n},\n v = function () {\n return f < 0 && (f = s(), m(), u(function () {\n setTimeout(function () {\n f = s(), m();\n }, 0);\n })), {\n get firstHiddenTime() {\n return f;\n }\n\n };\n},\n d = function (e, t) {\n var n,\n i = v(),\n o = r(\"FCP\"),\n f = function (e) {\n \"first-contentful-paint\" === e.name && (m && m.disconnect(), e.startTime < i.firstHiddenTime && (o.value = e.startTime, o.entries.push(e), n(!0)));\n },\n s = window.performance && performance.getEntriesByName && performance.getEntriesByName(\"first-contentful-paint\")[0],\n m = s ? null : a(\"paint\", f);\n\n (s || m) && (n = c(e, o, t), s && f(s), u(function (i) {\n o = r(\"FCP\"), n = c(e, o, t), requestAnimationFrame(function () {\n requestAnimationFrame(function () {\n o.value = performance.now() - i.timeStamp, n(!0);\n });\n });\n }));\n},\n p = !1,\n l = -1,\n h = function (e, t) {\n p || (d(function (e) {\n l = e.value;\n }), p = !0);\n\n var n,\n i = function (t) {\n l > -1 && e(t);\n },\n f = r(\"CLS\", 0),\n s = 0,\n m = [],\n v = function (e) {\n if (!e.hadRecentInput) {\n var t = m[0],\n i = m[m.length - 1];\n s && e.startTime - i.startTime < 1e3 && e.startTime - t.startTime < 5e3 ? (s += e.value, m.push(e)) : (s = e.value, m = [e]), s > f.value && (f.value = s, f.entries = m, n());\n }\n },\n h = a(\"layout-shift\", v);\n\n h && (n = c(i, f, t), o(function () {\n h.takeRecords().map(v), n(!0);\n }), u(function () {\n s = 0, l = -1, f = r(\"CLS\", 0), n = c(i, f, t);\n }));\n},\n T = {\n passive: !0,\n capture: !0\n},\n y = new Date(),\n g = function (i, r) {\n e || (e = r, t = i, n = new Date(), w(removeEventListener), E());\n},\n E = function () {\n if (t >= 0 && t < n - y) {\n var r = {\n entryType: \"first-input\",\n name: e.type,\n target: e.target,\n cancelable: e.cancelable,\n startTime: e.timeStamp,\n processingStart: e.timeStamp + t\n };\n i.forEach(function (e) {\n e(r);\n }), i = [];\n }\n},\n S = function (e) {\n if (e.cancelable) {\n var t = (e.timeStamp > 1e12 ? new Date() : performance.now()) - e.timeStamp;\n \"pointerdown\" == e.type ? function (e, t) {\n var n = function () {\n g(e, t), r();\n },\n i = function () {\n r();\n },\n r = function () {\n removeEventListener(\"pointerup\", n, T), removeEventListener(\"pointercancel\", i, T);\n };