Files
discord-decomp/_bundle/Module1037.js
T
2026-11-01 12:12:55 +02:00

39 lines
1.2 KiB
JavaScript

// Metro module 1037 (f1038).
import { whenActivated } from "./Module1038";
import { getVisibilityWatcher } from "./onVisibilityUpdate";
import { initMetric } from "./Module1044";
import { getActivationStart } from "./Module1042";
import { observe } from "./Module1046";
import { bindReporter } from "./Module1047";
Object.defineProperty(exports, Symbol.toStringTag, {
value: "Module"
});
let c850_2 = [1800, 3000];
export { c850_2 as FCPThresholds };
export const onFCP = function(c12674_0, r3 = {}) {
let c12674_1 = r3;
whenActivated(() => {
let c24021_0, c24021_3;
const visibilityWatcher = getVisibilityWatcher();
const r20 = initMetric("FCP");
let c24021_2 = r20;
const r24 = observe("paint", (a0) => {
for (const item of a0) {
if (item.name === "first-contentful-paint") {
c24021_3.disconnect();
if (item.startTime < visibilityWatcher.firstHiddenTime) {
const r14 = Math;
c24021_2.value = r14.max(item.startTime - getActivationStart(), 0);
c24021_2.entries.push(item);
c24021_0(true);
}
}
}
});
c24021_3 = r24;
if (r24) {
c24021_0 = bindReporter(c12674_0, r20, c850_2, c12674_1.reportAllChanges);
}
});
};