decord/source/__polyfill/13xxx/module_13012.js
github-actions a36fe4ec9c chore: update source for alpha 347.0
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4821.js (118.4 MB)
2026-09-14 20:04:03 +00:00

73 lines
2.7 KiB
JavaScript

// Module ID: 13012
// Function ID: 13013
// Dependencies: [12927, 12928, 13013, 12954, 12983, 13014, 12938, 12936, 12975]
// Module 13012
import _mod12954 from "module_12954" /* 12954 */;
import setupIntegration from "module_12983" /* 12983 */;
export const captureConsoleIntegration = setupIntegration.defineIntegration(() => {
let obj = arg0;
if (arg0 === undefined) {
obj = {};
}
let handled;
let CONSOLE_LEVELS = obj.levels;
if (!CONSOLE_LEVELS) {
CONSOLE_LEVELS = CONSOLE_LEVELS(handled[0]).CONSOLE_LEVELS;
}
handled = obj.handled;
return {
name: "CaptureConsole",
setup(arg0) {
closure_0 = arg0;
if ("console" in CONSOLE_LEVELS(handled[1]).GLOBAL_OBJ) {
let result = CONSOLE_LEVELS(handled[2]).addConsoleInstrumentationHandler((arg0) => {
({ args, level } = arg0);
let hasItem = _mod12954.getClient() === args;
if (hasItem) {
hasItem = CONSOLE_LEVELS.includes(level);
}
if (hasItem) {
closure_2 = handled;
let obj2 = { level: tmp(13014).severityLevelFromString(level), extra: null };
const obj3 = { arguments: args };
obj2.extra = obj3;
const tmpResult = tmp(13014);
tmp(12954).withScope((addEventProcessor) => {
addEventProcessor.addEventProcessor((arg0) => {
arg0.logger = "console";
const result = args(level[6]).addExceptionMechanism(arg0, { handled, type: "console" });
return arg0;
});
if ("assert" !== level) {
const found = args.find((item) => item instanceof Error);
if (found) {
tmp14(12975).captureException(found, obj2);
const tmp14Result = tmp14(12975);
} else {
const tmp14Result2 = tmp14(12936);
const safeJoinResult = tmp14(12936).safeJoin(tmp12, " ");
args(12975).captureMessage(safeJoinResult, obj2);
const obj4 = args(12975);
}
tmp12 = args;
} else if (!args[0]) {
const obj = args(12936);
const _HermesInternal = HermesInternal;
const combined = "Assertion failed: " + args(12936).safeJoin(arr.slice(1), " ") || "console.assert";
addEventProcessor.setExtra("arguments", arr.slice(1));
obj2 = args(12975);
obj2.captureMessage(combined, obj2);
const tmp4 = args(12936).safeJoin(arr.slice(1), " ") || "console.assert";
}
});
const tmpResult2 = tmp(12954);
}
});
let tmpResult = CONSOLE_LEVELS(handled[2]);
}
}
};
});