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

903 lines
28 KiB
JavaScript

// Metro module 1001 (f1002).
import { NativeModules, Platform } from "react-native";
import { isTurboModuleEnabled } from "./Module1002";
import { ReactNativeLibraries } from "./Module997";
import { encodeUTF8 } from "./Module1004";
import * as _Module817 from "./Module817";
import { normalize, SentryError } from "./Module817";
import { isHardCrash } from "./Module1013";
import { base64StringFromByteArray } from "./Module1007";
import { convertToNormalizedObject } from "./Module1014";
function $mk117575($env) {
return function(a0) {
a0($env[0]);
};
}
let r30;
let c824_5, c824_6, c824_7, c824_8;
Platform;
let c824_4 = (this ? this.__awaiter : this) || function(c12614_0, c12614_1, a2, c12614_3) {
let r2 = a2;
let Promise2 = a2;
if (!a2) {
Promise2 = Promise;
r2 = Promise2;
}
return new r2(function(a0, c23963_1) {
let rejected2, step2;
let c23963_0 = a0;
const fulfilled2 = function fulfilled(a0) {
try {
step2(c12614_3.next(a0));
} catch ($e) {
c23963_1($e);
}
};
rejected2 = function rejected(a0) {
try {
step2(c12614_3.throw(a0));
} catch ($e) {
c23963_1($e);
}
};
step2 = function step(a0) {
if (a0.done) {
c23963_0(a0.value);
} else {
let env28709;
let value = a0.value;
const r10 = env28709 = {};
env28709[0] = value;
if (!(value instanceof Promise2)) {
value = new Promise2($mk117575(r10));
}
value.then(fulfilled2, rejected2);
}
};
const r16 = c12614_3.apply(c12614_0, c12614_1 || []);
c12614_3 = r16;
const r18 = r16.next();
const { done, value } = r18;
if (done) {
a0(value);
} else {
let env23964;
const r21 = env23964 = {};
env23964[0] = value;
(value instanceof Promise2 ? value : new Promise2($mk117575(r21))).then(fulfilled2, rejected2);
}
});
};
c824_5 = (this ? this.__rest : this) || function(a0, a1) {
const r5 = {};
for (const key in a0) {
if (Object.prototype.hasOwnProperty.call(a0, key) && a1.indexOf(key) < 0) {
r5[key] = a0[key];
}
}
if (a0 != null && typeof Object.getOwnPropertySymbols === "function") {
const ownPropertySymbols = Object.getOwnPropertySymbols(a0);
const r27 = 0 < ownPropertySymbols.length;
let r29 = 0;
if (r27) {
do {
let r33 = a1.indexOf(ownPropertySymbols[r29]) < 0;
const r1 = r29;
if (r33) {
r33 = Object.prototype.propertyIsEnumerable.call(a0, ownPropertySymbols[r1]);
}
if (r33) {
r5[ownPropertySymbols[r1]] = a0[ownPropertySymbols[r1]];
}
r29 = r1 + 1;
} while (r29 < ownPropertySymbols.length);
}
}
return r5;
};
if (isTurboModuleEnabled()) {
const TurboModuleRegistry = ReactNativeLibraries.TurboModuleRegistry;
r30 = TurboModuleRegistry !== null ? TurboModuleRegistry !== void 0 ? TurboModuleRegistry.get("RNSentry") : void 0 : void 0;
} else {
r30 = NativeModules.RNSentry;
}
export function getRNSentryModule() {
let r10;
if (isTurboModuleEnabled()) {
const TurboModuleRegistry = ReactNativeLibraries.TurboModuleRegistry;
r10 = TurboModuleRegistry !== null ? TurboModuleRegistry !== void 0 ? TurboModuleRegistry.get("RNSentry") : void 0 : void 0;
} else {
r10 = NativeModules.RNSentry;
}
return r10;
}
c824_6 = r30;
c824_7 = encodeUTF8("\n");
c824_8 = {
fetchModules: async function fetchModules() {
const _this = this;
if (!_this.enableNative) {
throw _this._DisabledNativeError;
}
if (!_this._isModuleLoaded(c824_6)) {
throw _this._NativeClientError;
}
let c28710_0 = await c824_6.fetchModules();
return c28710_0 ? JSON.parse(c28710_0) : null;
},
sendEnvelope: async function sendEnvelope(c12615_0) {
let r27, r44, r114, r185, content_type2;
let c23966_1, c23966_2, c23966_5;
const _this2 = this;
let c23966_6 = 0;
L30: {
try {
if (_this2.enableNative) {
if (_this2._isModuleLoaded(c824_6)) {
const [r24, r66] = c12615_0;
const r74 = encodeUTF8(JSON.stringify(r24));
const uint8Array = new Uint8Array(r74.length + c824_7.length);
uint8Array.set(r74);
uint8Array.set(c824_7, r74.length);
c23966_2 = r66;
const r86 = r66[Symbol.iterator]();
c23966_2 = r86.next;
c23966_1 = r86;
const r88 = false;
const r90 = c23966_2;
let r91 = c23966_1;
let r92 = r91 === void 0 ? void 0 : (r44 = r90.call(r91)).done ? r91 = void 0 : r44.value;
c23966_1 = r91;
let hardCrashed = r88;
let r94 = uint8Array;
if (r91 !== void 0) {
do {
c23966_6 = 1;
const [r29, r31] = _this2._processItem(r92);
if (typeof r31 === "string") {
r27 = encodeUTF8(r31);
content_type2 = "text/plain";
r114 = hardCrashed;
} else {
const r116 = r31 instanceof Uint8Array;
const content_type = r29.content_type;
if (r116) {
content_type2 = typeof content_type === "string" ? r29.content_type : "application/octet-stream";
r27 = r31;
r114 = hardCrashed;
} else {
content_type2 = typeof content_type === "string" ? r29.content_type : "application/json";
r27 = encodeUTF8(JSON.stringify(r31));
r114 = hardCrashed ? hardCrashed : isHardCrash(r31);
}
}
r29.content_type = content_type2;
r29.length = r27.length;
const r140 = encodeUTF8(JSON.stringify(r29));
const uint8Array2 = new Uint8Array(r94.length + r140.length + c824_7.length + r27.length + c824_7.length);
uint8Array2.set(r94);
uint8Array2.set(r140, r94.length);
uint8Array2.set(c824_7, r94.length + r140.length);
uint8Array2.set(r27, r94.length + r140.length + c824_7.length);
uint8Array2.set(c824_7, r94.length + r140.length + c824_7.length + r27.length);
c23966_6 = 0;
const r182 = r114;
const r184 = c23966_2;
r185 = c23966_1;
r92 = r185 === void 0 ? void 0 : (r44 = r184.call(r185)).done ? r185 = void 0 : r44.value;
c23966_1 = r185;
hardCrashed = r182;
r94 = uint8Array2;
} while (r185 !== void 0);
}
await c824_6.captureEnvelope(base64StringFromByteArray(r94), {
hardCrashed
});
break L30;
}
throw _this2._NativeClientError;
}
_Module817.debug.warn("Event was skipped as native SDK is not enabled.");
} catch ($e) {
const r50 = $e;
let r8 = r50;
c23966_5 = r50;
if (c23966_6 !== 0) {
while (true) {
try {
const r212 = c23966_5;
c23966_6 = 0;
const r214 = c23966_1;
if (r214 !== void 0 && typeof r214.return === "function") {
try {
r214.return();
} catch {}
}
throw r212;
} catch (r210) {
r8 = r210;
c23966_5 = r210;
if (c23966_6 === 0) {
break;
}
}
}
}
throw r8;
}
return void 0;
}
},
initNativeSdk: async function initNativeSdk(c12616_0) {
let r134;
let c23967_1, _this4;
const _this3 = this;
L43: {
L22: {
L19: {
let env28711;
_this4 = _this3;
const r9 = env28711 = {};
c23967_1 = r9;
env28711[0] = void 0;
const r16 = Object;
const r19 = Object;
const r36 = r16.assign(r19.assign({
enableNative: true,
autoInitializeNativeSdk: true
}, c12616_0), c12616_0.enableLogs !== void 0 ? {
enableLogs: c12616_0.enableLogs && c12616_0.logsOrigin !== "js"
} : {});
if (r36.enableNative) {
if (r36.autoInitializeNativeSdk) {
if (r36.dsn) {
if (_this3._isModuleLoaded(c824_6)) {
const ignoreErrors = r36.ignoreErrors;
const ignoreErrorsStr = ignoreErrors !== null ? ignoreErrors !== void 0 ? ignoreErrors.filter((ignoreError) => typeof ignoreError === "string") : void 0 : void 0;
const ignoreErrors2 = r36.ignoreErrors;
const ignoreErrorsRegex = ignoreErrors2 !== null ? ignoreErrors2 !== void 0 ? ignoreErrors2.filter((item) => item instanceof RegExp).map((item) => item.source) : void 0 : void 0;
if (ignoreErrorsStr && ignoreErrorsStr.length > 0) {
r36.ignoreErrorsStr = ignoreErrorsStr;
}
if (ignoreErrorsRegex && ignoreErrorsRegex.length > 0) {
r36.ignoreErrorsRegex = ignoreErrorsRegex;
}
r36.beforeSend;
r36.beforeBreadcrumb;
r36.beforeSendTransaction;
r36.beforeSendMetric;
r36.integrations;
r36.ignoreErrors;
r36.logsOrigin;
const androidProfilingOptions = r36.androidProfilingOptions;
const r105 = c824_5(r36, ["beforeSend", "beforeBreadcrumb", "beforeSendTransaction", "beforeSendMetric", "integrations", "ignoreErrors", "logsOrigin", "androidProfilingOptions"]);
if (androidProfilingOptions) {
r105._experiments = {
...r105._experiments,
androidProfilingOptions
};
}
env28711[0] = await c824_6.initNativeSdk(r105);
_this4.nativeIsReady = env28711[0];
_this4.enableNative = true;
r134 = env28711[0];
break L43;
}
throw _this3._NativeClientError;
}
_Module817.debug.warn("Warning: No DSN was provided. The Sentry SDK will be disabled. Native SDK will also not be initalized.");
_this3.enableNative = false;
break L22;
}
if (r36.enableNativeNagger) {
_Module817.debug.warn("Note: Native Sentry SDK was not initialized automatically, you will need to initialize it manually. If you wish to disable the native SDK and get rid of this warning, pass enableNative: false");
}
_this3.enableNative = true;
break L19;
}
if (r36.enableNativeNagger) {
_Module817.debug.warn("Note: Native Sentry SDK is disabled.");
}
_this3.enableNative = false;
return false;
}
return false;
}
return false;
}
return r134;
},
fetchNativeLogAttributes: async function fetchNativeLogAttributes() {
const _this5 = this;
if (!_this5.enableNative) {
throw _this5._DisabledNativeError;
}
if (!_this5._isModuleLoaded(c824_6)) {
throw _this5._NativeClientError;
}
return c824_6.fetchNativeLogAttributes();
},
fetchNativeRelease: async function fetchNativeRelease() {
const _this6 = this;
if (!_this6.enableNative) {
throw _this6._DisabledNativeError;
}
if (!_this6._isModuleLoaded(c824_6)) {
throw _this6._NativeClientError;
}
return c824_6.fetchNativeRelease();
},
fetchNativeSdkInfo: async function fetchNativeSdkInfo() {
const _this7 = this;
if (!_this7.enableNative) {
throw _this7._DisabledNativeError;
}
if (!_this7._isModuleLoaded(c824_6)) {
throw _this7._NativeClientError;
}
return c824_6.fetchNativeSdkInfo();
},
fetchNativeDeviceContexts: async function fetchNativeDeviceContexts() {
const _this8 = this;
if (!_this8.enableNative) {
throw _this8._DisabledNativeError;
}
if (!_this8._isModuleLoaded(c824_6)) {
throw _this8._NativeClientError;
}
return c824_6.fetchNativeDeviceContexts();
},
fetchNativeAppStart: async function fetchNativeAppStart() {
let r30, r33;
const _this9 = this;
if (_this9.enableNative) {
if (_this9._isModuleLoaded(c824_6)) {
r33 = c824_6.fetchNativeAppStart();
} else {
_Module817.debug.error(_this9._NativeClientError);
r33 = null;
}
r30 = r33;
} else {
_Module817.debug.warn(_this9._DisabledNativeError);
r30 = null;
}
return r30;
},
fetchNativeFrames: async function fetchNativeFrames() {
const _this10 = this;
if (!_this10.enableNative) {
throw _this10._DisabledNativeError;
}
if (!_this10._isModuleLoaded(c824_6)) {
throw _this10._NativeClientError;
}
return c824_6.fetchNativeFrames();
},
nativeCrash: function nativeCrash() {
if (this.enableNative) {
if (!this._isModuleLoaded(c824_6)) {
throw this._NativeClientError;
}
c824_6.crash();
}
},
setUser: function setUser(a0) {
if (this.enableNative) {
if (!this._isModuleLoaded(c824_6)) {
throw this._NativeClientError;
}
let r3 = null;
let r2 = null;
if (a0) {
const { id, ip_address, email, username, geo } = a0;
const r18 = c824_5(a0, ["id", "ip_address", "email", "username", "geo"]);
r2 = this._serializeObject({
id,
ip_address,
email,
username,
geo
});
r3 = this._serializeObject(r18);
}
c824_6.setUser(r2, r3);
}
},
setTag: function setTag(a0, a1) {
if (this.enableNative) {
if (!this._isModuleLoaded(c824_6)) {
throw this._NativeClientError;
}
c824_6.setTag(a0, typeof a1 !== "string" ? JSON.stringify(a1) : a1);
}
},
setExtra: function setExtra(a0, a1) {
let r20;
if (this.enableNative) {
if (this._isModuleLoaded(c824_6)) {
if (typeof a1 === "string") {
return c824_6.setExtra(a0, a1);
}
if (a1 === void 0) {
return c824_6.setExtra(a0, "undefined");
}
try {
r20 = JSON.stringify(normalize(a1));
} catch ($e) {
_Module817.debug.error("Extra for key ${key} not passed to native SDK, because it contains non-stringifiable values", $e);
}
return typeof r20 === "string" ? c824_6.setExtra(a0, r20) : c824_6.setExtra(a0, "**non-stringifiable**");
}
throw this._NativeClientError;
}
},
addBreadcrumb: function addBreadcrumb(a0) {
if (this.enableNative) {
if (!this._isModuleLoaded(c824_6)) {
throw this._NativeClientError;
}
c824_6.addBreadcrumb({
...a0,
level: a0.level ? this._processLevel(a0.level) : void 0
});
}
},
clearBreadcrumbs: function clearBreadcrumbs() {
if (this.enableNative) {
if (!this._isModuleLoaded(c824_6)) {
throw this._NativeClientError;
}
c824_6.clearBreadcrumbs();
}
},
setContext: function setContext(a0, a1) {
let r17;
if (this.enableNative) {
if (!this._isModuleLoaded(c824_6)) {
throw this._NativeClientError;
}
if (a1 === null) {
return c824_6.setContext(a0, null);
}
try {
r17 = convertToNormalizedObject(a1);
} catch ($e) {
_Module817.debug.error("Context for key ${key} not passed to native SDK, because it contains non-serializable values", $e);
}
if (r17) {
c824_6.setContext(a0, r17);
} else {
c824_6.setContext(a0, {
error: "**non-serializable**"
});
}
}
},
closeNativeSdk: async function closeNativeSdk() {
let r26;
const _this11 = this;
L10: {
L9: {
if (!_this11.enableNative) {
break L10;
}
if (_this11._isModuleLoaded(c824_6)) {
r26 = c824_6.closeNativeSdk().then(() => {
this.enableNative = false;
});
break L9;
}
break L10;
}
return r26;
}
},
disableNativeFramesTracking: function disableNativeFramesTracking() {
if (this.enableNative && this._isModuleLoaded(c824_6)) {
c824_6.disableNativeFramesTracking();
}
},
enableNativeFramesTracking: function enableNativeFramesTracking() {
if (this.enableNative && this._isModuleLoaded(c824_6)) {
c824_6.enableNativeFramesTracking();
}
},
isNativeAvailable: function isNativeAvailable() {
return this._isModuleLoaded(c824_6);
},
captureScreenshot: async function captureScreenshot() {
let r70;
let c23975_1, c23975_2, c23975_3;
const _this12 = this;
let c23975_4 = 0;
const r12 = void 0;
L18: {
L12: {
try {
let env28713;
c23975_2 = r12;
const r16 = env28713 = {};
c23975_1 = r16;
env28713[0] = void 0;
if (_this12.enableNative) {
if (_this12._isModuleLoaded(c824_6)) {
c23975_4 = 1;
env28713[0] = await c824_6.captureScreenshot();
c23975_4 = 0;
const r69 = env28713[0];
r70 = null;
if (!r69) {
break L18;
}
r70 = env28713[0].map((item) => ({
...item,
data: new Uint8Array(item.data)
}));
break L18;
}
_Module817.debug.error(_this12._NativeClientError);
break L12;
}
_Module817.debug.warn(_this12._DisabledNativeError);
} catch ($e) {
const r26 = $e;
let r8 = r26;
c23975_3 = r26;
if (c23975_4 !== 0) {
while (true) {
try {
const r82 = c23975_3;
c23975_4 = 0;
env28713[1] = r82;
_Module817.debug.warn("Failed to capture screenshot", env28713[1]);
const r93 = env28713[0];
r70 = null;
if (!r93) {
break L18;
}
r70 = env28713[0].map((item) => ({
...item,
data: new Uint8Array(item.data)
}));
break L18;
} catch (r78) {
r8 = r78;
c23975_3 = r78;
if (c23975_4 === 0) {
break;
}
}
}
}
throw r8;
}
return null;
}
return null;
}
return r70;
},
fetchViewHierarchy: async function fetchViewHierarchy() {
const _this13 = this;
if (!_this13.enableNative) {
throw _this13._DisabledNativeError;
}
if (!_this13._isModuleLoaded(c824_6)) {
throw _this13._NativeClientError;
}
let c28714_0 = await c824_6.fetchViewHierarchy();
return c28714_0 ? new Uint8Array(c28714_0) : null;
},
startProfiling: function startProfiling(a0) {
if (this.enableNative) {
if (this._isModuleLoaded(c824_6)) {
const r12 = c824_6.startProfiling(a0);
const { started, error } = r12;
if (started) {
_Module817.debug.log("[NATIVE] Start Profiling");
} else {
_Module817.debug.error("[NATIVE] Start Profiling Failed", error);
}
return !!started;
}
throw this._NativeClientError;
}
throw this._DisabledNativeError;
},
stopProfiling: function stopProfiling() {
let r27;
if (this.enableNative) {
if (this._isModuleLoaded(c824_6)) {
const r13 = c824_6.stopProfiling();
const { profile, nativeProfile, androidProfile, error } = r13;
if (profile && !error) {
if (!androidProfile) {
_Module817.debug.warn("[NATIVE] Stop Profiling Failed: No Android Profile");
}
try {
r27 = {
hermesProfile: JSON.parse(profile),
nativeProfile,
androidProfile
};
} catch ($e) {
_Module817.debug.error("[NATIVE] Failed to parse Hermes Profile JSON", $e);
return null;
}
return r27;
}
_Module817.debug.error("[NATIVE] Stop Profiling Failed", error);
return null;
}
throw this._NativeClientError;
}
throw this._DisabledNativeError;
},
fetchNativePackageName: function fetchNativePackageName() {
return this.enableNative && this._isModuleLoaded(c824_6) && c824_6.fetchNativePackageName() || null;
},
fetchNativeStackFramesBy: function fetchNativeStackFramesBy(a0) {
return this.enableNative && this._isModuleLoaded(c824_6) && c824_6.fetchNativeStackFramesBy(a0) || null;
},
initNativeReactNavigationNewFrameTracking: async function initNativeReactNavigationNewFrameTracking() {
let r22;
const _this14 = this;
L10: {
L9: {
if (!_this14.enableNative) {
break L10;
}
if (_this14._isModuleLoaded(c824_6)) {
r22 = c824_6.initNativeReactNavigationNewFrameTracking();
break L9;
}
break L10;
}
return r22;
}
},
captureReplay: async function captureReplay(c12617_0) {
let r47, r85;
const _this15 = this;
L20: {
if (_this15.enableNative) {
if (_this15._isModuleLoaded(c824_6)) {
r85 = await c824_6.captureReplay(c12617_0) || null;
break L20;
}
_Module817.debug.warn(`[NATIVE] \`${_this15.captureReplay.name}\` is not available when native is not available.`);
r47 = Promise.resolve(null);
} else {
_Module817.debug.warn(`[NATIVE] \`${_this15.captureReplay.name}\` is not available when native is disabled.`);
r47 = Promise.resolve(null);
}
return r47;
}
return r85;
},
getCurrentReplayId: function getCurrentReplayId() {
let r19, r39;
if (this.enableNative) {
if (this._isModuleLoaded(c824_6)) {
r39 = c824_6.getCurrentReplayId() || null;
} else {
_Module817.debug.warn(`[NATIVE] \`${this.getCurrentReplayId.name}\` is not available when native is not available.`);
r39 = null;
}
r19 = r39;
} else {
_Module817.debug.warn(`[NATIVE] \`${this.getCurrentReplayId.name}\` is not available when native is disabled.`);
r19 = null;
}
return r19;
},
crashedLastRun: async function crashedLastRun() {
let r46;
const _this16 = this;
let c28715_0;
L17: {
L12: {
c28715_0 = void 0;
if (_this16.enableNative) {
if (_this16._isModuleLoaded(c824_6)) {
c28715_0 = await c824_6.crashedLastRun();
const r45 = c28715_0;
r46 = null;
if (typeof r45 !== "boolean") {
break L17;
}
r46 = c28715_0;
break L17;
}
break L12;
}
return null;
}
return null;
}
return r46;
},
getNewScreenTimeToDisplay: function getNewScreenTimeToDisplay() {
return this.enableNative && this._isModuleLoaded(c824_6) ? c824_6.getNewScreenTimeToDisplay() : Promise.resolve(null);
},
getDataFromUri: async function getDataFromUri(c12618_0) {
let uint8Array;
let c23980_3;
const _this17 = this;
let c23980_4 = 0;
let c28716_0, c28716_1;
L13: {
L12: {
try {
c28716_0 = void 0;
if (!_this17.enableNative) {
break L13;
}
if (_this17._isModuleLoaded(c824_6)) {
c23980_4 = 1;
c28716_0 = await c824_6.getDataFromUri(c12618_0);
uint8Array = new Uint8Array(c28716_0);
c23980_4 = 0;
break L12;
}
break L13;
} catch ($e) {
const r26 = $e;
let r8 = r26;
c23980_3 = r26;
if (c23980_4 !== 0) {
while (true) {
try {
const r67 = c23980_3;
c23980_4 = 0;
c28716_1 = r67;
_Module817.debug.error("Error:", c28716_1);
} catch (r63) {
r8 = r63;
c23980_3 = r63;
if (c23980_4 === 0) {
break;
}
continue;
}
return null;
}
}
throw r8;
}
}
return uint8Array;
}
return null;
},
popTimeToDisplayFor: function popTimeToDisplayFor(a0) {
let r13;
if (this.enableNative && this._isModuleLoaded(c824_6)) {
try {
r13 = c824_6.popTimeToDisplayFor(a0);
} catch ($e) {
_Module817.debug.error("Error:", $e);
return Promise.resolve(null);
}
return r13;
}
return Promise.resolve(null);
},
setActiveSpanId: function setActiveSpanId(a0) {
if (this.enableNative && this._isModuleLoaded(c824_6)) {
try {
c824_6.setActiveSpanId(a0);
} catch ($e) {
_Module817.debug.error("Error:", $e);
return void 0;
}
}
},
encodeToBase64: async function encodeToBase64(c12619_0) {
let r33, r61, r83;
let c23981_3;
const _this18 = this;
let c23981_4 = 0;
let c28717_0;
L15: {
L14: {
try {
if (_this18.enableNative && _this18._isModuleLoaded(c824_6)) {
c23981_4 = 1;
r61 = await c824_6.encodeToBase64(Array.from(c12619_0)) || null;
c23981_4 = 0;
break L14;
}
r33 = Promise.resolve(null);
break L15;
} catch ($e) {
const r27 = $e;
let r8 = r27;
c23981_3 = r27;
if (c23981_4 !== 0) {
while (true) {
try {
const r70 = c23981_3;
c23981_4 = 0;
c28717_0 = r70;
_Module817.debug.error("Error:", c28717_0);
r83 = Promise.resolve(null);
} catch (r66) {
r8 = r66;
c23981_3 = r66;
if (c23981_4 === 0) {
break;
}
continue;
}
return r83;
}
}
throw r8;
}
}
return r61;
}
return r33;
},
primitiveProcessor: function primitiveProcessor(a0) {
return a0;
},
_processItem: function _processItem(a0) {
const [r9, r7] = a0;
if (r9.type != "event" && r9.type != "transaction") {
return a0;
}
const r15 = this._processLevels(r7);
if (c824_8.platform === "android" && "message" in r15) {
r15.message = {
message: r15.message
};
}
return [r9, r15];
},
_serializeObject: (a0) => {
const r0 = {};
let c12620_1 = r0;
Object.keys(a0).forEach((item) => {
const r6 = a0[item];
let r8 = r6;
if (typeof r8 !== "string") {
r8 = JSON.stringify(r6);
}
c12620_1[item] = r8;
});
return r0;
},
_processLevels: function _processLevels(a0) {
const r5 = Object;
const r12 = {
...a0
};
const level = a0.level ? this._processLevel(a0.level) : void 0;
const breadcrumbs = a0.breadcrumbs;
return r5.assign(r12, {
level,
breadcrumbs: breadcrumbs !== null ? breadcrumbs !== void 0 ? breadcrumbs.map((breadcrumb) => ({
...breadcrumb,
level: breadcrumb.level ? this._processLevel(breadcrumb.level) : void 0
})) : void 0 : void 0
});
},
_processLevel: (a0) => a0 == "log" ? "debug" : a0,
_isModuleLoaded: (a0) => !!a0,
_setPrimitiveProcessor: function _setPrimitiveProcessor(a0) {
this.primitiveProcessor = a0;
},
_DisabledNativeError: new SentryError("Native is disabled"),
_NativeClientError: new SentryError("Native Client is not available, can't start on native."),
enableNative: true,
nativeIsReady: false,
platform: "android"
};
export { c824_8 as NATIVE };
export async function getDataFromUri(c12622_0) {
return c824_8.getDataFromUri(c12622_0);
}