91 lines
2.5 KiB
JavaScript
91 lines
2.5 KiB
JavaScript
// Metro module 914 (f915).
|
|
import { GLOBAL_OBJ } from "./Module821";
|
|
let $mk67327 = function() {
|
|
return function ensureMetadataStacksAreParsed(a0) {
|
|
if (GLOBAL_OBJ._sentryModuleMetadata) {
|
|
loop2: for (const r44 of Object.keys(GLOBAL_OBJ._sentryModuleMetadata)) {
|
|
const r46 = r44;
|
|
const r54 = GLOBAL_OBJ._sentryModuleMetadata[r44];
|
|
if (!c751_3.has(r44)) {
|
|
c751_3.add(r46);
|
|
for (const item of a0(r46).reverse()) {
|
|
if (!item.filename) {
|
|
continue;
|
|
}
|
|
c751_2.set(item.filename, r54);
|
|
continue loop2;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
};
|
|
Object.defineProperty(exports, Symbol.toStringTag, {
|
|
value: "Module"
|
|
});
|
|
let c751_2 = new Map();
|
|
let c751_3 = new Set();
|
|
export function addMetadataToStackFrames(c12560_0, { exception }) {
|
|
if (exception != null) {
|
|
const values = exception.values;
|
|
if (values != null) {
|
|
values.forEach(({ stacktrace }) => {
|
|
if (stacktrace != null) {
|
|
const frames = stacktrace.frames;
|
|
if (frames != null) {
|
|
frames.forEach((frame) => {
|
|
if (frame.filename && !frame.module_metadata) {
|
|
const filename = frame.filename;
|
|
$mk67327()(c12560_0);
|
|
const module_metadata = c751_2.get(filename);
|
|
if (module_metadata) {
|
|
frame.module_metadata = module_metadata;
|
|
}
|
|
}
|
|
});
|
|
}
|
|
}
|
|
});
|
|
}
|
|
}
|
|
}
|
|
export function getFilenameToMetadataMap(a0) {
|
|
const _sentryModuleMetadata = GLOBAL_OBJ._sentryModuleMetadata;
|
|
const r30 = {};
|
|
if (!_sentryModuleMetadata) {
|
|
return r30;
|
|
}
|
|
loop3: for (const r42 of Object.keys(GLOBAL_OBJ._sentryModuleMetadata)) {
|
|
const r51 = GLOBAL_OBJ._sentryModuleMetadata[r42];
|
|
for (const item of a0(r42).reverse()) {
|
|
if (!item.filename) {
|
|
continue;
|
|
}
|
|
r30[item.filename] = r51;
|
|
continue loop3;
|
|
}
|
|
}
|
|
return r30;
|
|
}
|
|
export function getMetadataForUrl(a0, a1) {
|
|
$mk67327()(a0);
|
|
return c751_2.get(a1);
|
|
}
|
|
export function stripMetadataFromStackFrames({ exception }) {
|
|
if (exception != null) {
|
|
const values = exception.values;
|
|
if (values != null) {
|
|
values.forEach(({ stacktrace }) => {
|
|
if (stacktrace != null) {
|
|
const frames = stacktrace.frames;
|
|
if (frames != null) {
|
|
frames.forEach((frame) => {
|
|
delete frame["module_metadata"];
|
|
});
|
|
}
|
|
}
|
|
});
|
|
}
|
|
}
|
|
}
|