decord/source/1030_items.js

55 lines
1.6 KiB
JavaScript
Raw Normal View History

2026-07-20 16:05:17 +00:00
// Module ID: 1030
2026-07-25 08:10:48 +00:00
// Function ID: 11108
2026-07-20 16:05:17 +00:00
// Name: items
2026-07-23 10:11:24 +00:00
// Dependencies: [1015, 1014, 1020, 1023, 1019, 1018]
2026-07-20 16:05:17 +00:00
// Module 1030 (items)
2026-07-23 10:11:24 +00:00
const require = arg1;
let dependencyMap = arg6;
2026-07-20 16:05:17 +00:00
Object.defineProperty(arg5, Symbol.toStringTag, { value: "Module" });
2026-07-23 10:11:24 +00:00
let items = [800, 1800];
function whenReady(id, arg1) {
const _require = id;
const _document = _require(1015).WINDOW.document;
2026-07-20 16:05:17 +00:00
if (null != _document) {
if (_document.prerendering) {
2026-07-23 10:11:24 +00:00
_require(1014).whenActivated(() => {
outer1_3(closure_0);
2026-07-20 16:05:17 +00:00
});
2026-07-23 10:11:24 +00:00
const obj = _require(1014);
2026-07-20 16:05:17 +00:00
}
}
2026-07-23 10:11:24 +00:00
const _document2 = _require(1015).WINDOW.document;
2026-07-20 16:05:17 +00:00
let readyState;
if (null != _document2) {
readyState = _document2.readyState;
}
if ("complete" !== readyState) {
const listener = globalThis.addEventListener("load", () => {
2026-07-23 10:11:24 +00:00
outer1_3(closure_0);
2026-07-20 16:05:17 +00:00
}, true);
} else {
const _setTimeout = setTimeout;
2026-07-23 10:11:24 +00:00
const timerId = setTimeout(id);
2026-07-20 16:05:17 +00:00
}
}
arg5.TTFBThresholds = items;
arg5.onTTFB = function onTTFB(closure_0) {
if (arguments.length > 1) {
2026-07-23 10:11:24 +00:00
metric = metric(1020).initMetric("TTFB");
let obj2 = metric(1023);
const dependencyMap = obj2.bindReporter(closure_0, metric, items, {}.reportAllChanges);
2026-07-20 16:05:17 +00:00
whenReady(() => {
2026-07-23 10:11:24 +00:00
const navigationEntry = metric(1019).getNavigationEntry();
2026-07-20 16:05:17 +00:00
if (navigationEntry) {
const _Math = Math;
2026-07-23 10:11:24 +00:00
metric.value = Math.max(navigationEntry.responseStart - metric(1018).getActivationStart(), 0);
2026-07-20 16:05:17 +00:00
const items = [navigationEntry];
metric.entries = items;
2026-07-23 10:11:24 +00:00
dependencyMap(true);
const obj2 = metric(1018);
2026-07-20 16:05:17 +00:00
}
});
}
};