2026-07-20 16:05:17 +00:00
|
|
|
// Module ID: 810
|
2026-07-21 22:01:30 +00:00
|
|
|
// Function ID: 9078
|
2026-07-20 16:05:17 +00:00
|
|
|
// Name: createStackParser
|
|
|
|
|
// Dependencies: []
|
|
|
|
|
// Exports: getFramesFromEvent, getFunctionName, getVueInternalName, normalizeStackTracePath, stackParserFromStackParserOptions
|
|
|
|
|
|
|
|
|
|
// Module 810 (createStackParser)
|
|
|
|
|
function createStackParser() {
|
|
|
|
|
const length = arguments.length;
|
|
|
|
|
const array = new Array(length);
|
|
|
|
|
for (let num = 0; num < length; num = num + 1) {
|
|
|
|
|
array[num] = arguments[num];
|
|
|
|
|
}
|
|
|
|
|
const sorted = array.sort((arg0, arg1) => arg0[0] - arg1[0]);
|
|
|
|
|
let closure_0 = sorted.map((arg0) => arg0[1]);
|
|
|
|
|
return (str) => {
|
|
|
|
|
let num = 0;
|
|
|
|
|
if (arguments.length > 1) {
|
|
|
|
|
num = 0;
|
|
|
|
|
if (undefined !== arguments[1]) {
|
|
|
|
|
num = arguments[1];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
let num2 = 0;
|
|
|
|
|
if (arguments.length > 2) {
|
|
|
|
|
num2 = 0;
|
|
|
|
|
if (undefined !== arguments[2]) {
|
|
|
|
|
num2 = arguments[2];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
const items = [];
|
|
|
|
|
const parts = str.split("\n");
|
|
|
|
|
if (num < parts.length) {
|
|
|
|
|
while (true) {
|
|
|
|
|
let arr3 = parts[num];
|
|
|
|
|
str = arr3;
|
|
|
|
|
if (arr3.length > 1024) {
|
|
|
|
|
str = arr3.slice(0, 1024);
|
|
|
|
|
}
|
|
|
|
|
let tmp = regex;
|
|
|
|
|
let tmp2 = str;
|
|
|
|
|
let str2 = str;
|
|
|
|
|
if (regex.test(str)) {
|
|
|
|
|
let tmp3 = regex;
|
|
|
|
|
str2 = str.replace(regex, "$1");
|
|
|
|
|
}
|
|
|
|
|
let tmp4 = str2;
|
|
|
|
|
if (str2.match(/\S*Error: /)) {
|
|
|
|
|
num = num + 1;
|
|
|
|
|
if (num >= parts.length) {
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
let tmp5 = closure_0;
|
|
|
|
|
let tmp6 = closure_0;
|
|
|
|
|
for (const item10043 of closure_0) {
|
|
|
|
|
let tmp7 = str2;
|
|
|
|
|
let item10043Result = item10043(tmp4);
|
|
|
|
|
if (item10043Result) {
|
|
|
|
|
let tmp10 = items;
|
|
|
|
|
let tmp11 = item10043Result;
|
|
|
|
|
let arr = items.push(tmp9);
|
|
|
|
|
obj.return();
|
|
|
|
|
// break
|
|
|
|
|
} else {
|
|
|
|
|
// continue
|
|
|
|
|
}
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
let tmp13 = items;
|
|
|
|
|
if (items.length >= 50 + num2) {
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return callback(items.slice(num2));
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
function stripSentryFramesAndReverse(arg0) {
|
|
|
|
|
if (arg0.length) {
|
|
|
|
|
const _Array = Array;
|
|
|
|
|
let arr = Array.from(arg0);
|
|
|
|
|
let closure_0 = arr;
|
|
|
|
|
if (obj.test(tmp3)) {
|
|
|
|
|
arr = arr.pop();
|
|
|
|
|
}
|
|
|
|
|
const reversed = arr.reverse();
|
|
|
|
|
const obj = /sentryWrapped/;
|
|
|
|
|
const tmp3 = getLastStackFrame(arr).function || "";
|
|
|
|
|
if (regex.test(tmp8)) {
|
|
|
|
|
arr = arr.pop();
|
|
|
|
|
if (regex.test(tmp12)) {
|
|
|
|
|
arr.pop();
|
|
|
|
|
}
|
|
|
|
|
const tmp12 = getLastStackFrame(arr).function || "";
|
|
|
|
|
}
|
|
|
|
|
const substr = arr.slice(0, 50);
|
|
|
|
|
return substr.map((filename) => {
|
|
|
|
|
const obj = {};
|
|
|
|
|
filename = filename.filename;
|
|
|
|
|
if (!filename) {
|
|
|
|
|
filename = callback(arr).filename;
|
|
|
|
|
}
|
|
|
|
|
obj.filename = filename;
|
|
|
|
|
obj.function = filename.function || "?";
|
|
|
|
|
return Object.assign({}, filename, obj);
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
return [];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
function getLastStackFrame(arg0) {
|
|
|
|
|
return arg0[arg0.length - 1] || {};
|
|
|
|
|
}
|
|
|
|
|
let closure_0 = require(dependencyMap[0]);
|
|
|
|
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
|
|
let closure_1 = /\(error: (.*)\)/;
|
|
|
|
|
let closure_2 = /captureMessage|captureException/;
|
|
|
|
|
|
|
|
|
|
export const UNKNOWN_FUNCTION = "?";
|
|
|
|
|
export { createStackParser };
|
|
|
|
|
export const getFramesFromEvent = function getFramesFromEvent(exception) {
|
|
|
|
|
exception = exception.exception;
|
|
|
|
|
if (exception) {
|
|
|
|
|
const items = [];
|
|
|
|
|
let closure_0 = items;
|
|
|
|
|
const values = exception.values;
|
|
|
|
|
const item = values.forEach((stacktrace) => {
|
|
|
|
|
if (stacktrace.stacktrace.frames) {
|
|
|
|
|
const push = items.push;
|
|
|
|
|
push.apply(items, items(stacktrace.stacktrace.frames));
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
return items;
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
export const getFunctionName = function getFunctionName(name) {
|
|
|
|
|
let tmp = name;
|
|
|
|
|
if (name) {
|
|
|
|
|
tmp = "function" === typeof name;
|
|
|
|
|
}
|
|
|
|
|
name = tmp;
|
|
|
|
|
if (tmp) {
|
|
|
|
|
name = name.name;
|
|
|
|
|
}
|
|
|
|
|
let str2 = name;
|
|
|
|
|
if (!name) {
|
|
|
|
|
str2 = "<anonymous>";
|
|
|
|
|
}
|
|
|
|
|
return str2;
|
|
|
|
|
};
|
|
|
|
|
export const getVueInternalName = function getVueInternalName(__v_isVNode) {
|
|
|
|
|
let str = "[VueViewModel]";
|
|
|
|
|
if ("__v_isVNode" in __v_isVNode) {
|
|
|
|
|
str = "[VueViewModel]";
|
|
|
|
|
if (__v_isVNode.__v_isVNode) {
|
|
|
|
|
str = "[VueVNode]";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return str;
|
|
|
|
|
};
|
|
|
|
|
export const normalizeStackTracePath = function normalizeStackTracePath(nextResult) {
|
|
|
|
|
let str = nextResult;
|
|
|
|
|
if (null != nextResult) {
|
|
|
|
|
str = nextResult;
|
|
|
|
|
if (nextResult.startsWith("file://")) {
|
|
|
|
|
str = nextResult.slice(7);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
let substr = str;
|
|
|
|
|
if (tmp) {
|
|
|
|
|
substr = str.slice(1);
|
|
|
|
|
}
|
|
|
|
|
return substr;
|
|
|
|
|
};
|
|
|
|
|
export const stackParserFromStackParserOptions = function stackParserFromStackParserOptions(arg0) {
|
|
|
|
|
let applyResult = arg0;
|
|
|
|
|
if (Array.isArray(arg0)) {
|
|
|
|
|
applyResult = createStackParser.apply(undefined, callback(arg0));
|
|
|
|
|
}
|
|
|
|
|
return applyResult;
|
|
|
|
|
};
|
|
|
|
|
export { stripSentryFramesAndReverse };
|