2105 lines
81 KiB
React
2105 lines
81 KiB
React
/* Metro module 884; source: unknown; dependencies: [57, 5, 6, 7, 77, 885, 886, 846, 832, 833, 883, 888, 893, 839, 836, 854, 895, 871, 872, 866, 878, 857, 865, 896, 845, 840, 881, 897, 898, 867, 828, 855] */
|
|
function _fun9530(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#9530, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1011:6, offset: 0x00d6a0cd, size: 323 bytes, params: 8, frame: 19
|
|
let env0_0 = require;
|
|
const setupWeightBasedFlushing = function(a0, a1, a2, a3, a4) {
|
|
var env0_0 = a0;
|
|
var env0_1 = a3;
|
|
var env0_2 = a4;
|
|
var env0_4 = 0;
|
|
var env0_5 = false;
|
|
a0.on(a2, _fun9536);
|
|
a0.on(a1, _fun9537);
|
|
a0.on('flush', _fun9539);
|
|
};
|
|
const getDataCategoryByType = function(a0) {
|
|
var value = a0;
|
|
return value === 'replay_event' ? 'replay' : value || 'error';
|
|
};
|
|
const isErrorEvent_9541 = function(a0) {
|
|
return a0.type === undefined;
|
|
};
|
|
const isTransactionEvent = function(a0) {
|
|
return a0.type === 'transaction';
|
|
};
|
|
const estimatePrimitiveSizeInBytes = function(a0) {
|
|
var value = typeof a0;
|
|
return value === 'string' ? 2 * a0.length : value === 'number' ? 8 : value !== 'boolean' ? 0 : 4;
|
|
};
|
|
let env0_2 = require(57) /* metro dependency 57 */;
|
|
const env0_3 = require(5) /* metro dependency 5 */;
|
|
let env0_4 = require(6) /* metro dependency 6 */;
|
|
let env0_5 = require(7) /* metro dependency 7 */;
|
|
const env0_6 = require(77) /* metro dependency 77 */;
|
|
const Object = global.Object;
|
|
const defineProperty = Object.defineProperty;
|
|
let Symbol = global.Symbol;
|
|
Reflect.apply(defineProperty, Object, [exports, Symbol.toStringTag, {value: 'Module'}]);
|
|
Symbol = global.Symbol;
|
|
const env0_7 = Symbol.for('SentryInternalError');
|
|
Symbol = global.Symbol;
|
|
const env0_8 = Symbol.for('SentryDoNotSendEventError');
|
|
exports.Client = _fun9548();
|
|
}
|
|
|
|
function _makeInternalError(a0) { // fn#9531, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1011:356, offset: 0x00d6a210, size: 33 bytes, params: 2, frame: 15
|
|
return env0_6({message: a0}, env0_7, true);
|
|
}
|
|
|
|
function _makeDoNotSendEventError(a0) { // fn#9532, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1011:414, offset: 0x00d6a231, size: 33 bytes, params: 2, frame: 15
|
|
return env0_6({message: a0}, env0_8, true);
|
|
}
|
|
|
|
function _isInternalError(a0) { // fn#9533, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1011:478, offset: 0x00d6a252, size: 39 bytes, params: 2, frame: 4
|
|
return (a0 ? typeof a0 === 'object' : !!a0) && env0_7 in a0;
|
|
}
|
|
|
|
function _isDoNotSendEventError(a0) { // fn#9534, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1011:545, offset: 0x00d6a279, size: 39 bytes, params: 2, frame: 4
|
|
return (a0 ? typeof a0 === 'object' : !!a0) && env0_8 in a0;
|
|
}
|
|
|
|
function setupWeightBasedFlushing(a0, a1, a2, a3, a4) { // fn#9535, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1011:618, offset: 0x00d6a2a0, size: 100 bytes, params: 6, frame: 14
|
|
const env0_0 = a0;
|
|
const env0_1 = a3;
|
|
const env0_2 = a4;
|
|
a0.on(a2, _fun9536);
|
|
a0.on(a1, _fun9537);
|
|
a0.on('flush', _fun9539);
|
|
}
|
|
|
|
function estimateMetricSizeInBytes(a0) { // fn#9543, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1011:13433, offset: 0x00d6a3f1, size: 69 bytes, params: 2, frame: 13
|
|
var r2;
|
|
const name = a0.name;
|
|
let value = 0;
|
|
if (name) {
|
|
value += 2 * a0.name.length;
|
|
r2 = value;
|
|
} else {
|
|
r2 = value;
|
|
}
|
|
return r2 + 8 + estimateAttributesSizeInBytes(a0.attributes);
|
|
}
|
|
|
|
function estimateLogSizeInBytes(a0) { // fn#9544, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1011:13566, offset: 0x00d6a436, size: 62 bytes, params: 2, frame: 13
|
|
var r1;
|
|
const message = a0.message;
|
|
let value = 0;
|
|
if (message) {
|
|
value += 2 * a0.message.length;
|
|
r1 = value;
|
|
} else {
|
|
r1 = value;
|
|
}
|
|
return r1 + estimateAttributesSizeInBytes(a0.attributes);
|
|
}
|
|
|
|
function estimateAttributesSizeInBytes(a0) { // fn#9545, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1011:13697, offset: 0x00d6a474, size: 55 bytes, params: 2, frame: 12
|
|
if (a0) {
|
|
var env0_0 = 0;
|
|
global.Object.values(a0).forEach(_fun9546);
|
|
return env0_0;
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
function _fun9548() { // fn#9548, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1011:854, offset: 0x00d6a577, size: 807 bytes, params: 1, frame: 17
|
|
const binding = env0_5;
|
|
let closure = Client;
|
|
const items2 = [{key: 'captureException', value: value_9550}];
|
|
items2[1] = {key: 'captureMessage', value: value_9554};
|
|
items2[2] = {key: 'captureEvent', value: value_9557};
|
|
items2[3] = {key: 'captureSession', value: value_9559};
|
|
items2[4] = {key: 'getDsn', value: function() {
|
|
return this._dsn;
|
|
}};
|
|
items2[5] = {key: 'getOptions', value: function() {
|
|
return this._options;
|
|
}};
|
|
items2[6] = {key: 'getSdkMetadata', value: function() {
|
|
return this._options._metadata;
|
|
}};
|
|
items2[7] = {key: 'getTransport', value: function() {
|
|
return this._transport;
|
|
}};
|
|
const binding2 = env0_3;
|
|
var env0_3 = binding2(_fun9565);
|
|
items2[8] = {key: 'flush', value: value_9566};
|
|
let env0_2 = binding2(_fun9568);
|
|
items2[9] = {key: 'close', value: value_9569};
|
|
items2[10] = {key: 'getEventProcessors', value: function() {
|
|
return this._eventProcessors;
|
|
}};
|
|
items2[11] = {key: 'addEventProcessor', value: function(a0) {
|
|
this._eventProcessors.push(a0);
|
|
}};
|
|
items2[12] = {key: 'init', value: function() {
|
|
if (this._isEnabled() || this._options.integrations.some(_fun9573)) {
|
|
this._setupIntegrations();
|
|
}
|
|
}};
|
|
items2[13] = {key: 'getIntegrationByName', value: function(a0) {
|
|
return this._integrations[a0];
|
|
}};
|
|
items2[14] = {key: 'addIntegration', value: value_9575};
|
|
items2[15] = {key: 'sendEvent', value: value_9576};
|
|
items2[16] = {key: 'sendSession', value: value_9578};
|
|
items2[17] = {key: 'recordDroppedEvent', value: value_9579};
|
|
items2[18] = {key: 'on', value: function(a0, a1) {
|
|
var r3;
|
|
var env0_0 = a1;
|
|
var _hooks = this._hooks;
|
|
r3 = this._hooks[a0] || new global.Set();
|
|
_hooks[a0] = r3;
|
|
var env0_1 = r3;
|
|
var closure = _fun9581;
|
|
var env0_2 = closure;
|
|
r3.add(closure);
|
|
return _fun9582;
|
|
}};
|
|
items2[19] = {key: 'emit', value: function(a0) {
|
|
var r2;
|
|
var value4;
|
|
var value8;
|
|
var value9;
|
|
var value = arguments.length;
|
|
var property = global.Array;
|
|
var value2 = 1;
|
|
reducibleJoin2: while (true) {
|
|
if (value > value2) {
|
|
value4 = value - value2;
|
|
r2 = value4;
|
|
break reducibleJoin2;
|
|
}
|
|
r2 = 0;
|
|
break reducibleJoin2;
|
|
}
|
|
var value6 = new property();
|
|
var env0_0 = value6;
|
|
if (value2 < value) {
|
|
r2 = value2;
|
|
reducibleLoop3: while (true) {
|
|
value8 = r2 - value2;
|
|
value6[value8] = arguments[r2];
|
|
value9 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
|
|
if (value9 < value) {
|
|
r2 = value9;
|
|
continue reducibleLoop3;
|
|
}
|
|
break reducibleLoop3;
|
|
}
|
|
}
|
|
property = this._hooks[a0];
|
|
reducibleJoin6: while (true) {
|
|
if (property) {
|
|
property.forEach(_fun9584);
|
|
break reducibleJoin6;
|
|
}
|
|
break reducibleJoin6;
|
|
}
|
|
}};
|
|
let env0_1 = binding2(_fun9586);
|
|
items2[20] = {key: 'sendEnvelope', value: value_9587};
|
|
items2[21] = {key: '_setupIntegrations', value: value_9588};
|
|
items2[22] = {key: '_updateSessionFromEvent', value: value_9589};
|
|
let env0_0 = binding2(_fun9591);
|
|
items2[23] = {key: '_isClientDoneProcessing', value: value_9593};
|
|
items2[24] = {key: '_isEnabled', value: function() {
|
|
return this.getOptions().enabled !== false && this._transport !== undefined;
|
|
}};
|
|
items2[25] = {key: '_prepareEvent', value: value_9595};
|
|
items2[26] = {key: '_captureEvent', value: value_9597};
|
|
items2[27] = {key: '_processEvent', value: value_9600};
|
|
items2[28] = {key: '_process', value: function(a0, a1) {
|
|
var env0_0 = a1;
|
|
var env0_1 = this;
|
|
var property = this._numProcessing;
|
|
this._numProcessing = typeof property === 'bigint' ? property + 1n : +property + 1;
|
|
this._promiseBuffer.add(a0).then(_fun9608, _fun9609);
|
|
}};
|
|
items2[29] = {key: '_clearOutcomes', value: function() {
|
|
var _outcomes = this._outcomes;
|
|
this._outcomes = {};
|
|
var Object = global.Object;
|
|
return Object.entries(_outcomes).map(_fun9611);
|
|
}};
|
|
items2[30] = {key: '_flushOutcomes', value: value_9612};
|
|
return binding(closure, items2);
|
|
}
|
|
|
|
function _fun9536() { // fn#9536, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1011:686, offset: 0x00d6a304, size: 36 bytes, params: 1, frame: 12
|
|
global.clearTimeout(env0_3);
|
|
}
|
|
|
|
function _fun9537(a0) { // fn#9537, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1011:733, offset: 0x00d6a328, size: 100 bytes, params: 2, frame: 14
|
|
if (env0_4 + importAll(a0) >= 800000) {
|
|
env0_2(env0_0);
|
|
} else if (!env0_5) {
|
|
env0_3 = global.setTimeout(_fun9538, 5000);
|
|
}
|
|
}
|
|
|
|
function _fun9539() { // fn#9539, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1011:829, offset: 0x00d6a3a0, size: 20 bytes, params: 1, frame: 11
|
|
env0_2(env0_0);
|
|
}
|
|
|
|
function _fun9546(a0) { // fn#9546, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1011:13795, offset: 0x00d6a4ab, size: 147 bytes, params: 2, frame: 14
|
|
var binding;
|
|
const Array = global.Array;
|
|
let value = Array.isArray(a0);
|
|
if (value) {
|
|
env0_0 = env0_0 + a0.length * estimatePrimitiveSizeInBytes(a0[0]);
|
|
} else {
|
|
value = require(836) /* metro dependency 836 */;
|
|
value = value.isPrimitive(a0);
|
|
binding = env0_0;
|
|
if (value) {
|
|
env0_0 = binding + estimatePrimitiveSizeInBytes(a0);
|
|
} else {
|
|
env0_0 = binding + 100;
|
|
}
|
|
}
|
|
}
|
|
|
|
function Client(a0) { // fn#9549, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1011:888, offset: 0x00d6a89e, size: 696 bytes, params: 2, frame: 24
|
|
var moduleValue2;
|
|
var moduleValue3;
|
|
var getEnvelopeEndpointWithUrlEncodedAuth;
|
|
var tunnel;
|
|
var value4;
|
|
var transport;
|
|
var Object;
|
|
var assign;
|
|
var object2;
|
|
const binding = env1_4;
|
|
const value3 = undefined;
|
|
binding(this, Client);
|
|
this._options = a0;
|
|
this._integrations = {};
|
|
this._numProcessing = 0;
|
|
this._outcomes = {};
|
|
this._hooks = {};
|
|
this._eventProcessors = [];
|
|
const moduleValue = require(885) /* metro dependency 885 */;
|
|
const makePromiseBuffer = moduleValue.makePromiseBuffer;
|
|
const transportOptions = a0.transportOptions;
|
|
this._promiseBuffer = Reflect.apply(makePromiseBuffer, moduleValue,
|
|
[(transportOptions == null ? value3 : transportOptions.bufferSize) ?? (require(886) /* metro dependency 886 */).DEFAULT_TRANSPORT_BUFFER_SIZE]);
|
|
if (a0.dsn) {
|
|
moduleValue2 = require(846) /* metro dependency 846 */;
|
|
this._dsn = moduleValue2.makeDsn(a0.dsn);
|
|
} else if ((require(832) /* metro dependency 832 */).DEBUG_BUILD) {
|
|
(require(833) /* metro dependency 833 */).debug.warn('No DSN provided, client will not send events.');
|
|
}
|
|
let _dsn = this._dsn;
|
|
if (_dsn) {
|
|
moduleValue3 = require(883) /* metro dependency 883 */;
|
|
getEnvelopeEndpointWithUrlEncodedAuth = moduleValue3.getEnvelopeEndpointWithUrlEncodedAuth;
|
|
_dsn = this._dsn;
|
|
tunnel = a0.tunnel;
|
|
value4 = Reflect.apply(getEnvelopeEndpointWithUrlEncodedAuth, moduleValue3, [_dsn, tunnel,
|
|
a0._metadata ? a0._metadata.sdk : value3]);
|
|
transport = a0.transport;
|
|
Object = global.Object;
|
|
assign = Object.assign;
|
|
object2 = {};
|
|
tunnel = this._options.tunnel;
|
|
object2.tunnel = tunnel;
|
|
object2.recordDroppedEvent = this.recordDroppedEvent.bind(this);
|
|
this._transport = Reflect.apply(transport, a0, [Reflect.apply(assign, Object, [object2, a0.transportOptions,
|
|
{url: value4}])]);
|
|
}
|
|
this._options.enableLogs = this._options.enableLogs ?? (this._options._experiments == null ? value3 : this._options._experiments.enableLogs);
|
|
if (this._options.enableLogs) {
|
|
setupWeightBasedFlushing(this, 'afterCaptureLog', 'flushLogs', estimateLogSizeInBytes,
|
|
(require(888) /* metro dependency 888 */)._INTERNAL_flushLogsBuffer);
|
|
}
|
|
const r3 = this._options.enableMetrics ?? (this._options._experiments == null ? value3 : this._options._experiments.enableMetrics);
|
|
if (r3 == null || r3) {
|
|
setupWeightBasedFlushing(this, 'afterCaptureMetric', 'flushMetrics', estimateMetricSizeInBytes,
|
|
(require(893) /* metro dependency 893 */)._INTERNAL_flushMetricsBuffer);
|
|
}
|
|
return value3;
|
|
}
|
|
|
|
function value_9550(a0, a1, a2) { // fn#9550, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1011:2153, offset: 0x00d6ab56, size: 217 bytes, params: 4, frame: 19
|
|
var environment;
|
|
const env0_0 = a0;
|
|
const env0_1 = a2;
|
|
let value = environment.__proto__;
|
|
const value2 = (require(839) /* metro dependency 839 */).uuid4();
|
|
const moduleValue2 = require(839) /* metro dependency 839 */;
|
|
if (moduleValue2.checkOrSetAlreadyCaught(a0)) {
|
|
if ((require(832) /* metro dependency 832 */).DEBUG_BUILD) {
|
|
(require(833) /* metro dependency 833 */).debug.log("Not capturing exception because it's already been captured.");
|
|
}
|
|
return value2;
|
|
}
|
|
const Object = global.Object;
|
|
value = Object.assign({event_id: value2}, a1);
|
|
this._process(_fun9551, 'error');
|
|
return value.event_id;
|
|
}
|
|
|
|
function value_9554(a0, a1, a2, a3) { // fn#9554, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1011:2541, offset: 0x00d6ac8d, size: 228 bytes, params: 5, frame: 23
|
|
let value = a0;
|
|
const env0_0 = a3;
|
|
const Object = global.Object;
|
|
const assign = Object.assign;
|
|
const object2 = {};
|
|
object2.event_id = (require(839) /* metro dependency 839 */).uuid4();
|
|
const value3 = Reflect.apply(assign, Object, [object2, a2]);
|
|
const moduleValue2 = require(836) /* metro dependency 836 */;
|
|
const r7 = moduleValue2.isParameterizedString(value) ? value : global.String(value);
|
|
const isPrimitive2 = moduleValue2.isPrimitive(value);
|
|
if (isPrimitive2) {
|
|
value = this.eventFromMessage(r7, a1, value3);
|
|
} else {
|
|
value = this.eventFromException(value, value3);
|
|
}
|
|
this._process(_fun9555, isPrimitive2 ? 'unknown' : 'error');
|
|
return value3.event_id;
|
|
}
|
|
|
|
function value_9557(a0, a1, a2) { // fn#9557, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1011:2923, offset: 0x00d6adac, size: 287 bytes, params: 4, frame: 20
|
|
var environment;
|
|
var r6;
|
|
var moduleValue2;
|
|
var Object;
|
|
var value3;
|
|
var capturedSpanScope;
|
|
var capturedSpanIsolationScope;
|
|
const env0_0 = a0;
|
|
const env0_1 = a2;
|
|
const value = environment.__proto__;
|
|
const value2 = (require(839) /* metro dependency 839 */).uuid4();
|
|
if (a1 != null) {
|
|
if (a1.originalException) {
|
|
moduleValue2 = require(839) /* metro dependency 839 */;
|
|
if (moduleValue2.checkOrSetAlreadyCaught(a1.originalException)) {
|
|
if ((require(832) /* metro dependency 832 */).DEBUG_BUILD) {
|
|
(require(833) /* metro dependency 833 */).debug.log("Not capturing exception because it's already been captured.");
|
|
}
|
|
return value2;
|
|
}
|
|
Object = global.Object;
|
|
value3 = Object.assign({event_id: value2}, a1);
|
|
r6 = a0.sdkProcessingMetadata || ({});
|
|
capturedSpanScope = r6.capturedSpanScope;
|
|
capturedSpanIsolationScope = r6.capturedSpanIsolationScope;
|
|
this._process(_fun9558, getDataCategoryByType(a0.type));
|
|
return value3.event_id;
|
|
}
|
|
}
|
|
Object = global.Object;
|
|
value3 = Object.assign({event_id: value2}, a1);
|
|
r6 = a0.sdkProcessingMetadata || ({});
|
|
capturedSpanScope = r6.capturedSpanScope;
|
|
capturedSpanIsolationScope = r6.capturedSpanIsolationScope;
|
|
this._process(_fun9558, getDataCategoryByType(a0.type));
|
|
return value3.event_id;
|
|
}
|
|
|
|
function value_9559(a0) { // fn#9559, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1011:3385, offset: 0x00d6af01, size: 65 bytes, params: 2, frame: 15
|
|
this.sendSession(a0);
|
|
const value = environment.__proto__;
|
|
(require(854) /* metro dependency 854 */).updateSession(a0, {init: false});
|
|
}
|
|
|
|
function* _fun9565(a0) { // fn#9565, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1011:3783, offset: 0x00d6af7d, size: 105 bytes, params: 2, frame: 14
|
|
var value4;
|
|
let value = undefined;
|
|
if (false) {
|
|
return value;
|
|
}
|
|
const _transport = this._transport;
|
|
if (_transport) {
|
|
this.emit('flush');
|
|
yield this._isClientDoneProcessing(a0);
|
|
value = undefined;
|
|
if (false) {
|
|
return value;
|
|
}
|
|
yield _transport.flush(a0);
|
|
value4 = undefined;
|
|
if (false) {
|
|
return value4;
|
|
}
|
|
return value && value4;
|
|
}
|
|
return true;
|
|
}
|
|
|
|
function* _fun9568(a0) { // fn#9568, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1011:4007, offset: 0x00d6b00d, size: 76 bytes, params: 2, frame: 13
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
yield this.flush(a0);
|
|
value = undefined;
|
|
if (true) {
|
|
this.getOptions().enabled = false;
|
|
this.emit('close');
|
|
}
|
|
return value;
|
|
}
|
|
|
|
function value_9572() { // fn#9572, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1011:4362, offset: 0x00d6b09c, size: 63 bytes, params: 1, frame: 13
|
|
if (this._isEnabled() || this._options.integrations.some(function({name}) {
|
|
return name.startsWith('Spotlight');
|
|
})) {
|
|
this._setupIntegrations();
|
|
}
|
|
}
|
|
|
|
function value_9575(a0) { // fn#9575, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1011:4640, offset: 0x00d6b108, size: 107 bytes, params: 2, frame: 19
|
|
const property = this._integrations[a0.name];
|
|
const value = environment.__proto__;
|
|
const moduleValue = require(895) /* metro dependency 895 */;
|
|
moduleValue.setupIntegration(this, a0, this._integrations);
|
|
if (!property) {
|
|
moduleValue.afterSetupIntegrations(this, [a0]);
|
|
}
|
|
}
|
|
|
|
function value_9576(a0) { // fn#9576, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1011:4823, offset: 0x00d6b173, size: 258 bytes, params: 2, frame: 25
|
|
var environment;
|
|
var r3;
|
|
var value;
|
|
var property;
|
|
var moduleValue2;
|
|
var addItemToEnvelope;
|
|
var moduleValue3;
|
|
var createAttachmentEnvelopeItem;
|
|
var attachmentEnvelopeItem;
|
|
var value2;
|
|
var error;
|
|
const env0_0 = a0;
|
|
reducibleJoin4: while (true) {
|
|
reducibleJoin2: while (true) {
|
|
if (arguments.length > 1) {
|
|
if (arguments[1] !== undefined) {
|
|
value = arguments[1];
|
|
r3 = value;
|
|
break reducibleJoin4;
|
|
}
|
|
break reducibleJoin2;
|
|
}
|
|
break reducibleJoin2;
|
|
}
|
|
r3 = {};
|
|
break reducibleJoin4;
|
|
}
|
|
this.emit('beforeSendEvent', a0, r3);
|
|
value = environment.__proto__;
|
|
const moduleValue = require(dependencyMap[17]);
|
|
const eventEnvelope = moduleValue.createEventEnvelope(a0, this._dsn, this._options._metadata, this._options.tunnel);
|
|
const attachments = r3.attachments;
|
|
reducibleJoin6: while (true) {
|
|
if (attachments) {
|
|
r3 = attachments;
|
|
break reducibleJoin6;
|
|
}
|
|
r3 = [];
|
|
break reducibleJoin6;
|
|
}
|
|
const iterator = r3[Symbol.iterator]();
|
|
const iterator2 = iterator.next;
|
|
let r2 = eventEnvelope;
|
|
let r5 = iterator;
|
|
let item2 = Reflect.apply(iterator2, r5, []);
|
|
let item = item2.value;
|
|
item2 = item2.done ? undefined : r5;
|
|
reducibleJoin8: while (true) {
|
|
if (item2 === undefined) {
|
|
value = this.sendEnvelope(r2);
|
|
value.then(_fun9577);
|
|
return undefined;
|
|
}
|
|
break reducibleJoin8;
|
|
}
|
|
reducibleLoop8: while (true) {
|
|
try {
|
|
} catch (error) {
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
}
|
|
try {
|
|
} catch (error) {
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
}
|
|
try {
|
|
property = dependencyMap[18];
|
|
} catch (error) {
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
}
|
|
try {
|
|
moduleValue2 = require(property);
|
|
} catch (error) {
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
}
|
|
try {
|
|
addItemToEnvelope = moduleValue2.addItemToEnvelope;
|
|
} catch (error) {
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
}
|
|
try {
|
|
property = dependencyMap[18];
|
|
} catch (error) {
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
}
|
|
try {
|
|
moduleValue3 = require(property);
|
|
} catch (error) {
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
}
|
|
try {
|
|
createAttachmentEnvelopeItem = moduleValue3.createAttachmentEnvelopeItem;
|
|
} catch (error) {
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
}
|
|
try {
|
|
attachmentEnvelopeItem = Reflect.apply(createAttachmentEnvelopeItem, moduleValue3, [item]);
|
|
} catch (error) {
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
}
|
|
try {
|
|
value2 = Reflect.apply(addItemToEnvelope, moduleValue2, [r2, attachmentEnvelopeItem]);
|
|
} catch (error) {
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
}
|
|
r2 = value2;
|
|
r5 = item2;
|
|
item2 = Reflect.apply(iterator2, r5, []);
|
|
item = item2.value;
|
|
item2 = item2.done ? undefined : r5;
|
|
if (item2 === undefined) {
|
|
break reducibleLoop8;
|
|
}
|
|
continue reducibleLoop8;
|
|
}
|
|
this.sendEnvelope(r2).then(_fun9577);
|
|
}
|
|
|
|
function value_9578(a0) { // fn#9578, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1011:5251, offset: 0x00d6b298, size: 447 bytes, params: 2, frame: 21
|
|
var r4;
|
|
var r1;
|
|
var r2;
|
|
var value;
|
|
const DEBUG_BUILD = (require(832) /* metro dependency 832 */).DEBUG_BUILD;
|
|
const debug = (require(833) /* metro dependency 833 */).debug;
|
|
var createSessionEnvelope;
|
|
var _dsn;
|
|
var _metadata;
|
|
let _options = this._options;
|
|
const release = _options.release;
|
|
let environment = _options.environment;
|
|
if (environment !== undefined) {
|
|
r4 = environment;
|
|
} else {
|
|
value = environment.__proto__;
|
|
r4 = (require(866) /* metro dependency 866 */).DEFAULT_ENVIRONMENT;
|
|
}
|
|
if ('aggregates' in a0) {
|
|
r1 = a0.attrs || ({});
|
|
if (r1.release) {
|
|
r2 = r1.release || release;
|
|
r1.release = r2;
|
|
environment = r1.environment;
|
|
r2 = environment || r4;
|
|
r1.environment = r2;
|
|
a0.attrs = r1;
|
|
this.emit('beforeSendSession', a0);
|
|
value = environment.__proto__;
|
|
value = require(871) /* metro dependency 871 */;
|
|
createSessionEnvelope = value.createSessionEnvelope;
|
|
_dsn = this._dsn;
|
|
_options = this._options;
|
|
_metadata = _options._metadata;
|
|
_options = this._options;
|
|
value = Reflect.apply(createSessionEnvelope, value, [a0, _dsn, _metadata, _options.tunnel]);
|
|
this.sendEnvelope(value);
|
|
return undefined;
|
|
}
|
|
if (release) {
|
|
r2 = r1.release || release;
|
|
r1.release = r2;
|
|
environment = r1.environment;
|
|
r2 = environment || r4;
|
|
r1.environment = r2;
|
|
a0.attrs = r1;
|
|
this.emit('beforeSendSession', a0);
|
|
value = environment.__proto__;
|
|
value = require(871) /* metro dependency 871 */;
|
|
createSessionEnvelope = value.createSessionEnvelope;
|
|
_dsn = this._dsn;
|
|
_options = this._options;
|
|
_metadata = _options._metadata;
|
|
_options = this._options;
|
|
value = Reflect.apply(createSessionEnvelope, value, [a0, _dsn, _metadata, _options.tunnel]);
|
|
this.sendEnvelope(value);
|
|
return undefined;
|
|
}
|
|
value = environment.__proto__;
|
|
if (DEBUG_BUILD) {
|
|
debug.warn('Discarded session because of missing or non-string release');
|
|
}
|
|
} else {
|
|
if (a0.release) {
|
|
r1 = a0.release || release;
|
|
a0.release = r1;
|
|
environment = a0.environment;
|
|
r1 = environment || r4;
|
|
a0.environment = r1;
|
|
this.emit('beforeSendSession', a0);
|
|
value = environment.__proto__;
|
|
value = require(871) /* metro dependency 871 */;
|
|
createSessionEnvelope = value.createSessionEnvelope;
|
|
_dsn = this._dsn;
|
|
_options = this._options;
|
|
_metadata = _options._metadata;
|
|
_options = this._options;
|
|
value = Reflect.apply(createSessionEnvelope, value, [a0, _dsn, _metadata, _options.tunnel]);
|
|
this.sendEnvelope(value);
|
|
return undefined;
|
|
}
|
|
if (release) {
|
|
r1 = a0.release || release;
|
|
a0.release = r1;
|
|
environment = a0.environment;
|
|
r1 = environment || r4;
|
|
a0.environment = r1;
|
|
this.emit('beforeSendSession', a0);
|
|
value = environment.__proto__;
|
|
value = require(871) /* metro dependency 871 */;
|
|
createSessionEnvelope = value.createSessionEnvelope;
|
|
_dsn = this._dsn;
|
|
_options = this._options;
|
|
_metadata = _options._metadata;
|
|
_options = this._options;
|
|
value = Reflect.apply(createSessionEnvelope, value, [a0, _dsn, _metadata, _options.tunnel]);
|
|
this.sendEnvelope(value);
|
|
return undefined;
|
|
}
|
|
value = environment.__proto__;
|
|
if (DEBUG_BUILD) {
|
|
debug.warn('Discarded session because of missing or non-string release');
|
|
}
|
|
}
|
|
}
|
|
|
|
function value_9579(a0, a1) { // fn#9579, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1011:5860, offset: 0x00d6b457, size: 260 bytes, params: 3, frame: 21
|
|
var value3;
|
|
var value4;
|
|
var value5;
|
|
var debug;
|
|
const value = 1;
|
|
const r4 = arguments.length > 2 ? arguments[2] === undefined ? value : arguments[2] : value;
|
|
if (this._options.sendClientReports) {
|
|
value3 = '';
|
|
value4 = value3 + a0 + ':' + a1;
|
|
value5 = environment.__proto__;
|
|
if ((require(832) /* metro dependency 832 */).DEBUG_BUILD) {
|
|
debug = (require(833) /* metro dependency 833 */).debug;
|
|
debug.log('Recording outcome: "' + value4 + '"' + (r4 > value ? ' (' + r4 + ' times)' : value3));
|
|
}
|
|
this._outcomes[value4] = (this._outcomes[value4] || 0) + r4;
|
|
}
|
|
}
|
|
|
|
function value_9580(a0, a1) { // fn#9580, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1011:6165, offset: 0x00d6b55b, size: 96 bytes, params: 3, frame: 14
|
|
const env0_0 = a1;
|
|
const _hooks = this._hooks;
|
|
const r3 = this._hooks[a0] || new global.Set();
|
|
_hooks[a0] = r3;
|
|
r3.add(function() {
|
|
return require.apply(undefined, arguments);
|
|
});
|
|
return _fun9582;
|
|
}
|
|
|
|
function value_9583(a0) { // fn#9583, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1011:6349, offset: 0x00d6b5ee, size: 125 bytes, params: 2, frame: 17
|
|
var r2;
|
|
var value4;
|
|
var value7;
|
|
var value8;
|
|
var forEach;
|
|
const length = arguments.length;
|
|
const Array = global.Array;
|
|
const value2 = 1;
|
|
reducibleJoin2: while (true) {
|
|
if (length > value2) {
|
|
value4 = length - value2;
|
|
r2 = value4;
|
|
break reducibleJoin2;
|
|
}
|
|
r2 = 0;
|
|
break reducibleJoin2;
|
|
}
|
|
const value5 = Object.create(Array.prototype, {constructor: {value: Array}});
|
|
const array = new Array();
|
|
if (value2 < length) {
|
|
r2 = value2;
|
|
reducibleLoop3: while (true) {
|
|
value7 = r2 - value2;
|
|
(array instanceof Object ? array : value5)[value7] = arguments[r2];
|
|
value8 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
|
|
if (value8 < length) {
|
|
r2 = value8;
|
|
continue reducibleLoop3;
|
|
}
|
|
break reducibleLoop3;
|
|
}
|
|
}
|
|
const property = this._hooks[a0];
|
|
reducibleJoin6: while (true) {
|
|
if (property) {
|
|
forEach = property.forEach;
|
|
Reflect.apply(forEach, property, [_fun9584]);
|
|
break reducibleJoin6;
|
|
}
|
|
break reducibleJoin6;
|
|
}
|
|
}
|
|
|
|
function* _fun9586(a0) { // fn#9586, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1011:6557, offset: 0x00d6b674, size: 263 bytes, params: 2, frame: 17
|
|
var binding;
|
|
var DEBUG_BUILD;
|
|
var debug;
|
|
var error;
|
|
var send;
|
|
var value3;
|
|
let value = undefined;
|
|
if (false) {
|
|
return value;
|
|
}
|
|
this.emit('beforeEnvelope', a0);
|
|
if (!this._isEnabled()) {
|
|
value = environment.__proto__.__proto__;
|
|
if (env2_0(env2_1[8]).DEBUG_BUILD) {
|
|
env2_0(env2_1[9]).debug.error('Transport disabled');
|
|
}
|
|
return {};
|
|
}
|
|
let _transport = this._transport;
|
|
if (!_transport) {
|
|
value = environment.__proto__.__proto__;
|
|
if (env2_0(env2_1[8]).DEBUG_BUILD) {
|
|
env2_0(env2_1[9]).debug.error('Transport disabled');
|
|
}
|
|
return {};
|
|
}
|
|
try {
|
|
_transport = this._transport;
|
|
} catch (error) {
|
|
value = environment.__proto__.__proto__;
|
|
binding = env2_0;
|
|
DEBUG_BUILD = binding(env2_1[8]).DEBUG_BUILD;
|
|
if (DEBUG_BUILD) {
|
|
binding = env2_0;
|
|
debug = binding(env2_1[9]).debug;
|
|
debug.error('Error while sending envelope:', error);
|
|
return {};
|
|
}
|
|
return {};
|
|
}
|
|
try {
|
|
send = _transport.send;
|
|
} catch (error) {
|
|
value = environment.__proto__.__proto__;
|
|
binding = env2_0;
|
|
DEBUG_BUILD = binding(env2_1[8]).DEBUG_BUILD;
|
|
if (DEBUG_BUILD) {
|
|
binding = env2_0;
|
|
debug = binding(env2_1[9]).debug;
|
|
debug.error('Error while sending envelope:', error);
|
|
return {};
|
|
}
|
|
return {};
|
|
}
|
|
try {
|
|
value = Reflect.apply(send, _transport, [a0]);
|
|
} catch (error) {
|
|
value = environment.__proto__.__proto__;
|
|
binding = env2_0;
|
|
DEBUG_BUILD = binding(env2_1[8]).DEBUG_BUILD;
|
|
if (DEBUG_BUILD) {
|
|
binding = env2_0;
|
|
debug = binding(env2_1[9]).debug;
|
|
debug.error('Error while sending envelope:', error);
|
|
return {};
|
|
}
|
|
return {};
|
|
}
|
|
yield value;
|
|
try {
|
|
value = undefined;
|
|
value3 = false;
|
|
} catch (error) {
|
|
value = environment.__proto__.__proto__;
|
|
binding = env2_0;
|
|
DEBUG_BUILD = binding(env2_1[8]).DEBUG_BUILD;
|
|
if (DEBUG_BUILD) {
|
|
binding = env2_0;
|
|
debug = binding(env2_1[9]).debug;
|
|
debug.error('Error while sending envelope:', error);
|
|
return {};
|
|
}
|
|
return {};
|
|
}
|
|
return value3 ? value : value;
|
|
}
|
|
|
|
function value_9588() { // fn#9588, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1011:6941, offset: 0x00d6b77b, size: 81 bytes, params: 1, frame: 17
|
|
const integrations = this._options.integrations;
|
|
let value = environment.__proto__;
|
|
value = require(895) /* metro dependency 895 */;
|
|
this._integrations = value.setupIntegrations(this, integrations);
|
|
(require(895) /* metro dependency 895 */).afterSetupIntegrations(this, integrations);
|
|
}
|
|
|
|
function value_9589(a0, a1) { // fn#9589, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1011:7137, offset: 0x00d6b7cc, size: 296 bytes, params: 3, frame: 24
|
|
var values;
|
|
var r4;
|
|
var handled;
|
|
var r11;
|
|
var r12;
|
|
var r1;
|
|
var r7;
|
|
var value;
|
|
var level;
|
|
var value2;
|
|
var exception;
|
|
var value3;
|
|
var iterator;
|
|
var iterator2;
|
|
var item;
|
|
var item2;
|
|
var value4;
|
|
var mechanism;
|
|
var value5;
|
|
var value6;
|
|
var error;
|
|
var status;
|
|
var value7;
|
|
var errors;
|
|
var value8;
|
|
var value9;
|
|
var moduleValue;
|
|
var updateSession;
|
|
var Object;
|
|
var assign;
|
|
var Number;
|
|
var value10;
|
|
var captureSession;
|
|
exceptionSkip14: while (true) {
|
|
exceptionLanding14: while (true) {
|
|
value = undefined;
|
|
level = a1.level;
|
|
value2 = level === 'fatal';
|
|
exception = a1.exception;
|
|
values = exception == null ? value : exception.values;
|
|
value3 = false;
|
|
if (values) {
|
|
iterator = values[Symbol.iterator]();
|
|
iterator2 = iterator.next;
|
|
r4 = iterator;
|
|
loopExit4: while (true) {
|
|
item2 = Reflect.apply(iterator2, r4, []);
|
|
item = item2.value;
|
|
item2 = item2.done ? undefined : r4;
|
|
value4 = true;
|
|
if (item2 === value) {
|
|
r11 = value4;
|
|
r12 = value3;
|
|
break loopExit4;
|
|
}
|
|
try {
|
|
mechanism = item.mechanism;
|
|
} catch (error) {
|
|
break exceptionLanding14;
|
|
}
|
|
try {
|
|
value5 = mechanism == null;
|
|
} catch (error) {
|
|
break exceptionLanding14;
|
|
}
|
|
if (value5) {
|
|
handled = value;
|
|
continue;
|
|
}
|
|
try {
|
|
handled = mechanism.handled;
|
|
} catch (error) {
|
|
break exceptionLanding14;
|
|
}
|
|
try {
|
|
value6 = value3 === handled;
|
|
} catch (error) {
|
|
break exceptionLanding14;
|
|
}
|
|
if (value6) {
|
|
item2.return();
|
|
r11 = value4;
|
|
r12 = value4;
|
|
break loopExit4;
|
|
}
|
|
r4 = item2;
|
|
continue;
|
|
}
|
|
} else {
|
|
r11 = value3;
|
|
r12 = value2;
|
|
}
|
|
status = a0.status;
|
|
value7 = status === 'ok';
|
|
if (value7) {
|
|
errors = a0.errors;
|
|
value8 = errors === 0;
|
|
r1 = value8;
|
|
} else {
|
|
r1 = value7;
|
|
}
|
|
if (!r1) {
|
|
if (value7) {
|
|
r4 = r12;
|
|
continue;
|
|
}
|
|
r4 = value7;
|
|
continue;
|
|
r1 = r4;
|
|
}
|
|
if (r1) {
|
|
value9 = environment.__proto__;
|
|
moduleValue = require(854) /* metro dependency 854 */;
|
|
updateSession = moduleValue.updateSession;
|
|
Object = global.Object;
|
|
assign = Object.assign;
|
|
if (!r12) {
|
|
r7 = r12;
|
|
continue;
|
|
}
|
|
errors = a0.errors;
|
|
if (errors) {
|
|
r1 = errors;
|
|
continue;
|
|
}
|
|
Number = global.Number;
|
|
if (r11) {
|
|
continue;
|
|
}
|
|
r11 = r12;
|
|
continue;
|
|
value10 = Number(r11);
|
|
r1 = value10;
|
|
Reflect.apply(updateSession, moduleValue, [a0, Reflect.apply(assign, Object, [{}, {status: 'crashed'},
|
|
{errors: r1}])]);
|
|
captureSession = this.captureSession;
|
|
Reflect.apply(captureSession, this, [a0]);
|
|
}
|
|
return value;
|
|
break exceptionSkip14;
|
|
}
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
break exceptionSkip14;
|
|
}
|
|
}
|
|
|
|
function* _fun9591(a0) { // fn#9591, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1011:7561, offset: 0x00d6b8fd, size: 115 bytes, params: 2, frame: 17
|
|
var r2;
|
|
var Promise;
|
|
var prototype;
|
|
var closure;
|
|
var promise;
|
|
var value3;
|
|
var _numProcessing;
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
value = 0;
|
|
if (a0) {
|
|
reducibleJoin3: while (true) {
|
|
if (!(value < a0)) {
|
|
return false;
|
|
}
|
|
r2 = value;
|
|
break reducibleJoin3;
|
|
}
|
|
} else {
|
|
r2 = value;
|
|
}
|
|
reducibleLoop3: while (true) {
|
|
Promise = global.Promise;
|
|
prototype = Promise.prototype;
|
|
value = Object.create(prototype, {constructor: {value: Promise}});
|
|
closure = function(a0) {
|
|
return (0, global.setTimeout)(a0, 1);
|
|
};
|
|
promise = new Promise();
|
|
value = promise instanceof Object ? promise : value;
|
|
yield value;
|
|
value = undefined;
|
|
value3 = false;
|
|
if (value3) {
|
|
return value;
|
|
}
|
|
_numProcessing = this._numProcessing;
|
|
if (!_numProcessing) {
|
|
return true;
|
|
}
|
|
value = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
|
|
if (a0) {
|
|
if (!(value < a0)) {
|
|
return false;
|
|
}
|
|
r2 = value;
|
|
continue reducibleLoop3;
|
|
}
|
|
r2 = value;
|
|
continue reducibleLoop3;
|
|
}
|
|
}
|
|
|
|
function value_9595(a0, a1, a2, a3) { // fn#9595, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1011:7910, offset: 0x00d6b9b1, size: 222 bytes, params: 5, frame: 23
|
|
var event_id;
|
|
var setLastEventId;
|
|
const env0_0 = a1;
|
|
const env0_1 = a2;
|
|
let value = this.getOptions();
|
|
const Object = global.Object;
|
|
const value2 = Object.keys(this._integrations);
|
|
if (!a1.integrations && value2 != null && value2.length) {
|
|
a1.integrations = value2;
|
|
}
|
|
this.emit('preprocessEvent', a0, a1);
|
|
if (!a0.type) {
|
|
setLastEventId = a3.setLastEventId;
|
|
event_id = a0.event_id;
|
|
event_id = !event_id ? a1.event_id : event_id;
|
|
Reflect.apply(setLastEventId, a3, [event_id]);
|
|
}
|
|
value = (require(878) /* metro dependency 878 */).prepareEvent(value, a0, a1, a2, this, a3);
|
|
return value.then(_fun9596);
|
|
}
|
|
|
|
function value_9597(a0) { // fn#9597, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1011:8526, offset: 0x00d6bb47, size: 348 bytes, params: 2, frame: 23
|
|
var environment;
|
|
var r3;
|
|
var r2;
|
|
var value;
|
|
var debug;
|
|
var log;
|
|
const r4 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
if (arguments.length > 2) {
|
|
if (arguments[2] !== undefined) {
|
|
r3 = arguments[2];
|
|
} else {
|
|
value = environment.__proto__;
|
|
value = require(857) /* metro dependency 857 */;
|
|
value = value.getCurrentScope();
|
|
r3 = value;
|
|
}
|
|
} else {
|
|
value = environment.__proto__;
|
|
value = require(857) /* metro dependency 857 */;
|
|
value = value.getCurrentScope();
|
|
r3 = value;
|
|
}
|
|
if (arguments.length > 3) {
|
|
if (arguments[3] !== undefined) {
|
|
r2 = arguments[3];
|
|
} else {
|
|
value = environment.__proto__;
|
|
value = require(857) /* metro dependency 857 */;
|
|
value = value.getIsolationScope();
|
|
r2 = value;
|
|
}
|
|
} else {
|
|
value = environment.__proto__;
|
|
value = require(857) /* metro dependency 857 */;
|
|
value = value.getIsolationScope();
|
|
r2 = value;
|
|
}
|
|
value = environment.__proto__;
|
|
const DEBUG_BUILD = (require(832) /* metro dependency 832 */).DEBUG_BUILD;
|
|
if (DEBUG_BUILD && isErrorEvent_9541(a0)) {
|
|
debug = (require(833) /* metro dependency 833 */).debug;
|
|
log = debug.log;
|
|
value = require(896) /* metro dependency 896 */;
|
|
value = value.getPossibleEventMessages(a0);
|
|
Reflect.apply(log, debug, ['Captured error event `' + (value[0] || '<unknown>') + '`']);
|
|
}
|
|
return this._processEvent(a0, r4, r3, r2).then(function(a0) {
|
|
return a0.event_id;
|
|
}, _fun9599);
|
|
}
|
|
|
|
function value_9600(a0, a1, a2, a3) { // fn#9600, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1011:9194, offset: 0x00d6bd49, size: 402 bytes, params: 5, frame: 26
|
|
var environment;
|
|
var moduleValue2;
|
|
var moduleValue3;
|
|
const env0_0 = a0;
|
|
const env0_1 = a1;
|
|
const env0_2 = a2;
|
|
const env0_3 = a3;
|
|
const sampleRate = this.getOptions().sampleRate;
|
|
value = environment.__proto__;
|
|
const isTransactionEventBinding = isTransactionEvent;
|
|
const value2 = undefined;
|
|
const env0_6 = isTransactionEventBinding(a0);
|
|
const isErrorEvent_95412 = isErrorEvent_9541(a0);
|
|
let type = a0.type;
|
|
type = !type ? 'error' : type;
|
|
const env0_8 = 'before send for type `' + type + '`';
|
|
const r11 = value2 === sampleRate ? value2 : (require(845) /* metro dependency 845 */).parseSampleRate(sampleRate);
|
|
if (isErrorEvent_95412) {
|
|
if (typeof r11 !== 'number') {
|
|
var env0_9 = getDataCategoryByType(a0.type);
|
|
value = this._prepareEvent(a0, a1, a2, a3);
|
|
value = value.then(_fun9601);
|
|
value = value.then(_fun9605);
|
|
return value.then(null, _fun9606);
|
|
}
|
|
moduleValue2 = require(840) /* metro dependency 840 */;
|
|
if (moduleValue2.safeMathRandom() > r11) {
|
|
this.recordDroppedEvent('sample_rate', 'error');
|
|
moduleValue3 = require(881) /* metro dependency 881 */;
|
|
return moduleValue3.rejectedSyncPromise(_makeDoNotSendEventError("Discarding event because it's not included in the random sample (sampling rate = " + sampleRate + ')'));
|
|
}
|
|
}
|
|
var env0_9 = getDataCategoryByType(a0.type);
|
|
value = this._prepareEvent(a0, a1, a2, a3);
|
|
value = value.then(_fun9601);
|
|
value = value.then(_fun9605);
|
|
return value.then(null, _fun9606);
|
|
}
|
|
|
|
function value_9607(a0, a1) { // fn#9607, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1011:12225, offset: 0x00d6c53a, size: 75 bytes, params: 3, frame: 13
|
|
const env0_0 = a1;
|
|
const _numProcessing = this._numProcessing;
|
|
this._numProcessing = typeof _numProcessing === 'bigint' ? _numProcessing + 1n : +_numProcessing + 1;
|
|
this._promiseBuffer.add(a0).then(_fun9608, _fun9609);
|
|
}
|
|
|
|
function value_9610() { // fn#9610, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1011:12509, offset: 0x00d6c5f8, size: 55 bytes, params: 1, frame: 11
|
|
const _outcomes = this._outcomes;
|
|
this._outcomes = {};
|
|
const Object = global.Object;
|
|
return Object.entries(_outcomes).map(_fun9611);
|
|
}
|
|
|
|
function value_9612() { // fn#9612, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1011:12745, offset: 0x00d6c67f, size: 408 bytes, params: 1, frame: 18
|
|
var r1;
|
|
const debug = (require(833) /* metro dependency 833 */).debug;
|
|
var moduleValue;
|
|
var createClientReportEnvelope;
|
|
var tunnel;
|
|
let value = environment.__proto__;
|
|
const DEBUG_BUILD = (require(832) /* metro dependency 832 */).DEBUG_BUILD;
|
|
if (DEBUG_BUILD) {
|
|
debug.log('Flushing outcomes...');
|
|
}
|
|
const value2 = this._clearOutcomes();
|
|
if (value2.length !== 0) {
|
|
if (this._dsn) {
|
|
if (DEBUG_BUILD) {
|
|
debug.log('Sending outcomes:', value2);
|
|
}
|
|
moduleValue = require(897) /* metro dependency 897 */;
|
|
createClientReportEnvelope = moduleValue.createClientReportEnvelope;
|
|
tunnel = this._options.tunnel;
|
|
if (tunnel) {
|
|
value = require(846) /* metro dependency 846 */;
|
|
value = value.dsnToString(this._dsn);
|
|
r1 = value;
|
|
} else {
|
|
r1 = tunnel;
|
|
}
|
|
value = Reflect.apply(createClientReportEnvelope, moduleValue, [value2, r1]);
|
|
this.sendEnvelope(value);
|
|
} else if (DEBUG_BUILD) {
|
|
debug.log('No dsn provided, will not send outcomes');
|
|
}
|
|
} else if (DEBUG_BUILD) {
|
|
debug.log('No outcomes to send');
|
|
}
|
|
}
|
|
|
|
function _fun9538() { // fn#9538, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1011:788, offset: 0x00d6a38c, size: 20 bytes, params: 1, frame: 11
|
|
env1_2(env1_0);
|
|
}
|
|
|
|
function _fun9551() { // fn#9551, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1011:2364, offset: 0x00d6ac2f, size: 61 bytes, params: 1, frame: 14
|
|
const binding = env0_2;
|
|
let value = binding.eventFromException(env0_0, env0_3);
|
|
value = value.then(_fun9552);
|
|
return value.then(function(a0) {
|
|
return a0;
|
|
});
|
|
}
|
|
|
|
function _fun9555() { // fn#9555, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1011:2790, offset: 0x00d6ad71, size: 26 bytes, params: 1, frame: 11
|
|
return env0_3.then(_fun9556);
|
|
}
|
|
|
|
function _fun9558() { // fn#9558, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1011:3293, offset: 0x00d6aecb, size: 54 bytes, params: 1, frame: 18
|
|
const binding = env0_2;
|
|
return binding._captureEvent(env0_0, env0_3, capturedSpanScope || importDefault, capturedSpanIsolationScope);
|
|
}
|
|
|
|
function _fun9582() { // fn#9582, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1011:6305, offset: 0x00d6b5d5, size: 25 bytes, params: 1, frame: 11
|
|
env0_1.delete(uniqueCallback);
|
|
}
|
|
|
|
function _fun9596(a0) { // fn#9596, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1011:8194, offset: 0x00d6ba8f, size: 184 bytes, params: 2, frame: 22
|
|
if (a0 !== null) {
|
|
var value;
|
|
var binding = env0_2;
|
|
binding.emit('postprocessEvent', a0, require);
|
|
var Object = global.Object;
|
|
var assign = Object.assign;
|
|
var object2 = {};
|
|
object2.trace = (require(857) /* metro dependency 857 */).getTraceContextFromScope(importDefault);
|
|
a0.contexts = Reflect.apply(assign, Object, [object2, a0.contexts]);
|
|
value = require(865) /* metro dependency 865 */;
|
|
value = value.getDynamicSamplingContextFromScope(binding, importDefault);
|
|
Object = global.Object;
|
|
assign = Object.assign;
|
|
a0.sdkProcessingMetadata = Reflect.apply(assign, Object, [{dynamicSamplingContext: value},
|
|
a0.sdkProcessingMetadata]);
|
|
}
|
|
return a0;
|
|
}
|
|
|
|
function _fun9599(a0) { // fn#9599, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1011:9000, offset: 0x00d6bcae, size: 155 bytes, params: 2, frame: 15
|
|
var value2;
|
|
const debug = (require(833) /* metro dependency 833 */).debug;
|
|
var warn;
|
|
if ((require(832) /* metro dependency 832 */).DEBUG_BUILD) {
|
|
if (_isDoNotSendEventError(a0)) {
|
|
debug.log(a0.message);
|
|
} else {
|
|
value2 = _isInternalError(a0);
|
|
warn = debug.warn;
|
|
if (value2) {
|
|
Reflect.apply(warn, debug, [a0.message]);
|
|
} else {
|
|
Reflect.apply(warn, debug, [a0]);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
function _fun9601(a0) { // fn#9601, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1011:9740, offset: 0x00d6bedb, size: 829 bytes, params: 2, frame: 37
|
|
var environment;
|
|
var r9;
|
|
var r12;
|
|
var r6;
|
|
var r8;
|
|
var r3;
|
|
var __sentry__;
|
|
var binding;
|
|
var binding2;
|
|
var beforeSend;
|
|
var beforeSendTransaction;
|
|
var beforeSendSpan;
|
|
var ignoreSpans;
|
|
var value4;
|
|
var moduleValue;
|
|
var convertTransactionEventToSpanJson;
|
|
var value5;
|
|
var length;
|
|
var moduleValue2;
|
|
var shouldIgnoreSpan;
|
|
var value6;
|
|
var moduleValue3;
|
|
var showSpanDropWarning;
|
|
var moduleValue4;
|
|
var merge;
|
|
var moduleValue5;
|
|
var convertSpanJsonToTransactionEvent;
|
|
var value7;
|
|
var spans;
|
|
var items;
|
|
var iterator;
|
|
var iterator2;
|
|
var item;
|
|
var item2;
|
|
var value8;
|
|
var property;
|
|
var moduleValue6;
|
|
var shouldIgnoreSpan2;
|
|
var push;
|
|
var value9;
|
|
var moduleValue7;
|
|
var moduleValue8;
|
|
var reparentChildSpans;
|
|
var error;
|
|
var length2;
|
|
var value10;
|
|
var recordDroppedEvent;
|
|
var Object;
|
|
var assign;
|
|
var sdkProcessingMetadata;
|
|
let value = a0;
|
|
const value2 = null;
|
|
if (value2 === value) {
|
|
env0_4.recordDroppedEvent('event_processor', env0_9);
|
|
value = environment.__proto__.__proto__;
|
|
throw _makeDoNotSendEventError('An event processor returned `null`, will not send event.');
|
|
}
|
|
let data = require.data;
|
|
reducibleJoin18: while (true) {
|
|
reducibleJoin73: while (true) {
|
|
if (data) {
|
|
data = require.data;
|
|
__sentry__ = data.__sentry__;
|
|
if (__sentry__ === true) {
|
|
return value;
|
|
}
|
|
binding = env0_4;
|
|
binding2 = env0_5;
|
|
beforeSend = binding2.beforeSend;
|
|
beforeSendTransaction = binding2.beforeSendTransaction;
|
|
beforeSendSpan = binding2.beforeSendSpan;
|
|
ignoreSpans = binding2.ignoreSpans;
|
|
value4 = environment.__proto__.__proto__;
|
|
if (isErrorEvent_9541(value)) {
|
|
if (beforeSend) {
|
|
value = beforeSend(value, require);
|
|
r3 = value;
|
|
break reducibleJoin73;
|
|
}
|
|
}
|
|
if (isTransactionEvent(value)) {
|
|
if (!beforeSendSpan) {
|
|
if (!ignoreSpans) {
|
|
r6 = value;
|
|
if (beforeSendTransaction) {
|
|
spans = r6.spans;
|
|
reducibleJoin71: while (true) {
|
|
if (spans) {
|
|
spans = r6.spans;
|
|
length = spans.length;
|
|
Object = global.Object;
|
|
assign = Object.assign;
|
|
sdkProcessingMetadata = value.sdkProcessingMetadata;
|
|
r6.sdkProcessingMetadata = Reflect.apply(assign, Object, [{},
|
|
sdkProcessingMetadata,
|
|
{spanCountBeforeProcessing: length}]);
|
|
break reducibleJoin71;
|
|
}
|
|
break reducibleJoin71;
|
|
}
|
|
value = beforeSendTransaction(r6, require);
|
|
r3 = value;
|
|
break reducibleJoin73;
|
|
}
|
|
r3 = r6;
|
|
break reducibleJoin73;
|
|
}
|
|
}
|
|
moduleValue = require(dependencyMap[28]);
|
|
convertTransactionEventToSpanJson = moduleValue.convertTransactionEventToSpanJson;
|
|
value5 = Reflect.apply(convertTransactionEventToSpanJson, moduleValue, [value]);
|
|
if (value2 != ignoreSpans) {
|
|
length = ignoreSpans.length;
|
|
if (length) {
|
|
moduleValue2 = require(dependencyMap[29]);
|
|
shouldIgnoreSpan = moduleValue2.shouldIgnoreSpan;
|
|
if (Reflect.apply(shouldIgnoreSpan, moduleValue2, [value5, ignoreSpans])) {
|
|
r3 = value2;
|
|
break reducibleJoin73;
|
|
}
|
|
}
|
|
}
|
|
reducibleJoin15: while (true) {
|
|
if (beforeSendSpan) {
|
|
value6 = beforeSendSpan(value5);
|
|
if (value6) {
|
|
moduleValue4 = require(dependencyMap[31]);
|
|
merge = moduleValue4.merge;
|
|
moduleValue5 = require(dependencyMap[28]);
|
|
convertSpanJsonToTransactionEvent = moduleValue5.convertSpanJsonToTransactionEvent;
|
|
value7 = Reflect.apply(merge, moduleValue4, [value,
|
|
Reflect.apply(convertSpanJsonToTransactionEvent,
|
|
moduleValue5,
|
|
[value6])]);
|
|
r9 = value7;
|
|
break reducibleJoin15;
|
|
}
|
|
moduleValue3 = require(dependencyMap[30]);
|
|
showSpanDropWarning = moduleValue3.showSpanDropWarning;
|
|
Reflect.apply(showSpanDropWarning, moduleValue3, []);
|
|
r9 = value;
|
|
break reducibleJoin15;
|
|
}
|
|
r9 = value;
|
|
break reducibleJoin15;
|
|
}
|
|
spans = r9.spans;
|
|
reducibleJoin67: while (true) {
|
|
if (spans) {
|
|
items = [];
|
|
spans = r9.spans;
|
|
iterator = spans[Symbol.iterator]();
|
|
iterator2 = iterator.next;
|
|
r12 = iterator;
|
|
item2 = Reflect.apply(iterator2, r12, []);
|
|
item = item2.value;
|
|
item2 = item2.done ? undefined : r12;
|
|
if (item2 === undefined) {
|
|
spans = r9.spans;
|
|
length = spans.length;
|
|
length2 = items.length;
|
|
value10 = length - length2;
|
|
reducibleJoin66: while (true) {
|
|
if (value10) {
|
|
recordDroppedEvent = binding.recordDroppedEvent;
|
|
Reflect.apply(recordDroppedEvent, binding, ['before_send', 'span', value10]);
|
|
break reducibleJoin66;
|
|
}
|
|
break reducibleJoin66;
|
|
}
|
|
r9.spans = items;
|
|
r6 = r9;
|
|
break reducibleJoin67;
|
|
}
|
|
break reducibleJoin18;
|
|
}
|
|
r6 = r9;
|
|
break reducibleJoin67;
|
|
}
|
|
if (beforeSendTransaction) {
|
|
spans = r6.spans;
|
|
reducibleJoin71: while (true) {
|
|
if (spans) {
|
|
spans = r6.spans;
|
|
length = spans.length;
|
|
Object = global.Object;
|
|
assign = Object.assign;
|
|
sdkProcessingMetadata = value.sdkProcessingMetadata;
|
|
r6.sdkProcessingMetadata = Reflect.apply(assign, Object, [{}, sdkProcessingMetadata,
|
|
{spanCountBeforeProcessing: length}]);
|
|
break reducibleJoin71;
|
|
}
|
|
break reducibleJoin71;
|
|
}
|
|
value = beforeSendTransaction(r6, require);
|
|
r3 = value;
|
|
break reducibleJoin73;
|
|
}
|
|
r8 = r6;
|
|
} else {
|
|
r8 = value;
|
|
}
|
|
r3 = r8;
|
|
break reducibleJoin73;
|
|
}
|
|
binding = env0_4;
|
|
binding2 = env0_5;
|
|
beforeSend = binding2.beforeSend;
|
|
beforeSendTransaction = binding2.beforeSendTransaction;
|
|
beforeSendSpan = binding2.beforeSendSpan;
|
|
ignoreSpans = binding2.ignoreSpans;
|
|
value4 = environment.__proto__.__proto__;
|
|
if (isErrorEvent_9541(value)) {
|
|
if (beforeSend) {
|
|
value = beforeSend(value, require);
|
|
r3 = value;
|
|
break reducibleJoin73;
|
|
}
|
|
}
|
|
if (isTransactionEvent(value)) {
|
|
if (!beforeSendSpan) {
|
|
if (!ignoreSpans) {
|
|
r6 = value;
|
|
if (beforeSendTransaction) {
|
|
spans = r6.spans;
|
|
reducibleJoin71: while (true) {
|
|
if (spans) {
|
|
spans = r6.spans;
|
|
length = spans.length;
|
|
Object = global.Object;
|
|
assign = Object.assign;
|
|
sdkProcessingMetadata = value.sdkProcessingMetadata;
|
|
r6.sdkProcessingMetadata = Reflect.apply(assign, Object, [{}, sdkProcessingMetadata,
|
|
{spanCountBeforeProcessing: length}]);
|
|
break reducibleJoin71;
|
|
}
|
|
break reducibleJoin71;
|
|
}
|
|
value = beforeSendTransaction(r6, require);
|
|
r3 = value;
|
|
break reducibleJoin73;
|
|
}
|
|
r3 = r6;
|
|
break reducibleJoin73;
|
|
}
|
|
}
|
|
moduleValue = require(dependencyMap[28]);
|
|
convertTransactionEventToSpanJson = moduleValue.convertTransactionEventToSpanJson;
|
|
value5 = Reflect.apply(convertTransactionEventToSpanJson, moduleValue, [value]);
|
|
if (value2 != ignoreSpans) {
|
|
length = ignoreSpans.length;
|
|
if (length) {
|
|
moduleValue2 = require(dependencyMap[29]);
|
|
shouldIgnoreSpan = moduleValue2.shouldIgnoreSpan;
|
|
if (Reflect.apply(shouldIgnoreSpan, moduleValue2, [value5, ignoreSpans])) {
|
|
r3 = value2;
|
|
break reducibleJoin73;
|
|
}
|
|
}
|
|
}
|
|
reducibleJoin15: while (true) {
|
|
if (beforeSendSpan) {
|
|
value6 = beforeSendSpan(value5);
|
|
if (value6) {
|
|
moduleValue4 = require(dependencyMap[31]);
|
|
merge = moduleValue4.merge;
|
|
moduleValue5 = require(dependencyMap[28]);
|
|
convertSpanJsonToTransactionEvent = moduleValue5.convertSpanJsonToTransactionEvent;
|
|
value7 = Reflect.apply(merge, moduleValue4, [value,
|
|
Reflect.apply(convertSpanJsonToTransactionEvent,
|
|
moduleValue5,
|
|
[value6])]);
|
|
r9 = value7;
|
|
break reducibleJoin15;
|
|
}
|
|
moduleValue3 = require(dependencyMap[30]);
|
|
showSpanDropWarning = moduleValue3.showSpanDropWarning;
|
|
Reflect.apply(showSpanDropWarning, moduleValue3, []);
|
|
r9 = value;
|
|
break reducibleJoin15;
|
|
}
|
|
r9 = value;
|
|
break reducibleJoin15;
|
|
}
|
|
spans = r9.spans;
|
|
reducibleJoin67: while (true) {
|
|
if (spans) {
|
|
items = [];
|
|
spans = r9.spans;
|
|
iterator = spans[Symbol.iterator]();
|
|
iterator2 = iterator.next;
|
|
r12 = iterator;
|
|
item2 = Reflect.apply(iterator2, r12, []);
|
|
item = item2.value;
|
|
item2 = item2.done ? undefined : r12;
|
|
if (item2 === undefined) {
|
|
spans = r9.spans;
|
|
length = spans.length;
|
|
length2 = items.length;
|
|
value10 = length - length2;
|
|
reducibleJoin66: while (true) {
|
|
if (value10) {
|
|
recordDroppedEvent = binding.recordDroppedEvent;
|
|
Reflect.apply(recordDroppedEvent, binding, ['before_send', 'span', value10]);
|
|
break reducibleJoin66;
|
|
}
|
|
break reducibleJoin66;
|
|
}
|
|
r9.spans = items;
|
|
r6 = r9;
|
|
break reducibleJoin67;
|
|
}
|
|
break reducibleJoin18;
|
|
}
|
|
r6 = r9;
|
|
break reducibleJoin67;
|
|
}
|
|
if (beforeSendTransaction) {
|
|
spans = r6.spans;
|
|
reducibleJoin71: while (true) {
|
|
if (spans) {
|
|
spans = r6.spans;
|
|
length = spans.length;
|
|
Object = global.Object;
|
|
assign = Object.assign;
|
|
sdkProcessingMetadata = value.sdkProcessingMetadata;
|
|
r6.sdkProcessingMetadata = Reflect.apply(assign, Object, [{}, sdkProcessingMetadata,
|
|
{spanCountBeforeProcessing: length}]);
|
|
break reducibleJoin71;
|
|
}
|
|
break reducibleJoin71;
|
|
}
|
|
value = beforeSendTransaction(r6, require);
|
|
r3 = value;
|
|
break reducibleJoin73;
|
|
}
|
|
r8 = r6;
|
|
} else {
|
|
r8 = value;
|
|
}
|
|
r3 = r8;
|
|
break reducibleJoin73;
|
|
}
|
|
binding = env0_8;
|
|
return _validateBeforeSendResult(r3, binding);
|
|
}
|
|
reducibleLoop18: while (true) {
|
|
try {
|
|
value8 = value2 == ignoreSpans;
|
|
} catch (error) {
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
}
|
|
reducibleJoin17: while (true) {
|
|
reducibleJoin31: while (true) {
|
|
if (value8) {
|
|
break reducibleJoin31;
|
|
}
|
|
try {
|
|
length = ignoreSpans.length;
|
|
} catch (error) {
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
}
|
|
if (length) {
|
|
try {
|
|
} catch (error) {
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
}
|
|
try {
|
|
} catch (error) {
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
}
|
|
try {
|
|
property = dependencyMap[29];
|
|
} catch (error) {
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
}
|
|
try {
|
|
moduleValue6 = require(property);
|
|
} catch (error) {
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
}
|
|
try {
|
|
shouldIgnoreSpan = moduleValue6.shouldIgnoreSpan;
|
|
} catch (error) {
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
}
|
|
try {
|
|
shouldIgnoreSpan2 = Reflect.apply(shouldIgnoreSpan, moduleValue6, [item, ignoreSpans]);
|
|
} catch (error) {
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
}
|
|
if (shouldIgnoreSpan2) {
|
|
try {
|
|
} catch (error) {
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
}
|
|
try {
|
|
} catch (error) {
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
}
|
|
try {
|
|
property = dependencyMap[29];
|
|
} catch (error) {
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
}
|
|
try {
|
|
moduleValue8 = require(property);
|
|
} catch (error) {
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
}
|
|
try {
|
|
reparentChildSpans = moduleValue8.reparentChildSpans;
|
|
} catch (error) {
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
}
|
|
try {
|
|
Reflect.apply(reparentChildSpans, moduleValue8, [spans, item]);
|
|
} catch (error) {
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
}
|
|
r12 = item2;
|
|
break reducibleJoin17;
|
|
}
|
|
break reducibleJoin31;
|
|
}
|
|
break reducibleJoin31;
|
|
}
|
|
if (beforeSendSpan) {
|
|
try {
|
|
value9 = beforeSendSpan(item);
|
|
} catch (error) {
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
}
|
|
if (value9) {
|
|
try {
|
|
push = items.push;
|
|
} catch (error) {
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
}
|
|
try {
|
|
Reflect.apply(push, items, [value9]);
|
|
} catch (error) {
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
}
|
|
r12 = item2;
|
|
break reducibleJoin17;
|
|
}
|
|
try {
|
|
} catch (error) {
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
}
|
|
try {
|
|
} catch (error) {
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
}
|
|
try {
|
|
property = dependencyMap[30];
|
|
} catch (error) {
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
}
|
|
try {
|
|
moduleValue7 = require(property);
|
|
} catch (error) {
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
}
|
|
try {
|
|
showSpanDropWarning = moduleValue7.showSpanDropWarning;
|
|
} catch (error) {
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
}
|
|
try {
|
|
Reflect.apply(showSpanDropWarning, moduleValue7, []);
|
|
} catch (error) {
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
}
|
|
try {
|
|
push = items.push;
|
|
} catch (error) {
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
}
|
|
try {
|
|
Reflect.apply(push, items, [item]);
|
|
} catch (error) {
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
}
|
|
r12 = item2;
|
|
break reducibleJoin17;
|
|
}
|
|
try {
|
|
push = items.push;
|
|
} catch (error) {
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
}
|
|
try {
|
|
Reflect.apply(push, items, [item]);
|
|
} catch (error) {
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
}
|
|
r12 = item2;
|
|
break reducibleJoin17;
|
|
}
|
|
item2 = Reflect.apply(iterator2, r12, []);
|
|
item = item2.value;
|
|
item2 = item2.done ? undefined : r12;
|
|
if (item2 === undefined) {
|
|
break reducibleLoop18;
|
|
}
|
|
continue reducibleLoop18;
|
|
}
|
|
value10 = r9.spans.length - items.length;
|
|
reducibleJoin66: while (true) {
|
|
if (value10) {
|
|
recordDroppedEvent = binding.recordDroppedEvent;
|
|
Reflect.apply(recordDroppedEvent, binding, ['before_send', 'span', value10]);
|
|
break reducibleJoin66;
|
|
}
|
|
break reducibleJoin66;
|
|
}
|
|
r9.spans = items;
|
|
r6 = r9;
|
|
if (beforeSendTransaction) {
|
|
spans = r6.spans;
|
|
reducibleJoin71: while (true) {
|
|
if (spans) {
|
|
spans = r6.spans;
|
|
length = spans.length;
|
|
Object = global.Object;
|
|
assign = Object.assign;
|
|
sdkProcessingMetadata = value.sdkProcessingMetadata;
|
|
r6.sdkProcessingMetadata = Reflect.apply(assign, Object, [{}, sdkProcessingMetadata,
|
|
{spanCountBeforeProcessing: length}]);
|
|
break reducibleJoin71;
|
|
}
|
|
break reducibleJoin71;
|
|
}
|
|
value = beforeSendTransaction(r6, require);
|
|
r3 = value;
|
|
} else {
|
|
r3 = r6;
|
|
}
|
|
return _validateBeforeSendResult(r3, env0_8);
|
|
}
|
|
|
|
function _fun9605(a0) { // fn#9605, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1011:11243, offset: 0x00d6c331, size: 398 bytes, params: 2, frame: 17
|
|
var spanCountBeforeProcessing;
|
|
var binding;
|
|
var spans;
|
|
var value6;
|
|
var value7;
|
|
var Object;
|
|
var value9;
|
|
var _makeDoNotSendEventErrorBinding;
|
|
if (a0 === null) {
|
|
binding = env0_4;
|
|
binding.recordDroppedEvent('before_send', env0_9);
|
|
if (env0_6) {
|
|
env0_4.recordDroppedEvent('before_send', 'span', 1 + (env0_0.spans || []).length);
|
|
}
|
|
value9 = environment.__proto__.__proto__;
|
|
_makeDoNotSendEventErrorBinding = _makeDoNotSendEventError;
|
|
binding = env0_8;
|
|
throw _makeDoNotSendEventErrorBinding('' + binding + ' returned `null`, will not send event.');
|
|
}
|
|
const r5 = importDefault.getSession() || importAll.getSession();
|
|
if (env0_7 && r5) {
|
|
env0_4._updateSessionFromEvent(r5, a0);
|
|
}
|
|
if (env0_6) {
|
|
spanCountBeforeProcessing = a0.sdkProcessingMetadata?.spanCountBeforeProcessing;
|
|
spanCountBeforeProcessing = !spanCountBeforeProcessing ? 0 : spanCountBeforeProcessing;
|
|
spans = a0.spans;
|
|
value6 = 0;
|
|
value7 = spanCountBeforeProcessing - (spans ? a0.spans.length : value6);
|
|
if (value7 > value6) {
|
|
env0_4.recordDroppedEvent('before_send', 'span', value7);
|
|
}
|
|
}
|
|
const transaction_info = a0.transaction_info;
|
|
if (env0_6) {
|
|
if (transaction_info) {
|
|
if (a0.transaction !== env0_0.transaction) {
|
|
Object = global.Object;
|
|
a0.transaction_info = Object.assign({}, transaction_info, {source: 'custom'});
|
|
}
|
|
}
|
|
}
|
|
env0_4.sendEvent(a0, require);
|
|
return a0;
|
|
}
|
|
|
|
function _fun9606(a0) { // fn#9606, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1011:11868, offset: 0x00d6c4bf, size: 123 bytes, params: 2, frame: 17
|
|
if (_isDoNotSendEventError(a0)) {
|
|
throw a0;
|
|
}
|
|
if (_isInternalError(a0)) {
|
|
throw a0;
|
|
}
|
|
env0_4.captureException(a0, {mechanism: {'handled': false, 'type': 'internal'}, data: {__sentry__: true},
|
|
originalException: a0});
|
|
throw _makeInternalError('Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ' + a0);
|
|
}
|
|
|
|
function _fun9608(a0) { // fn#9608, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1011:12314, offset: 0x00d6c585, size: 27 bytes, params: 2, frame: 2
|
|
const binding = env0_1;
|
|
const _numProcessing = binding._numProcessing;
|
|
binding._numProcessing = typeof _numProcessing === 'bigint' ? _numProcessing - 1n : +_numProcessing - 1;
|
|
return a0;
|
|
}
|
|
|
|
function _fun9609(a0) { // fn#9609, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1011:12357, offset: 0x00d6c5a0, size: 88 bytes, params: 2, frame: 14
|
|
const binding = env0_1;
|
|
const _numProcessing = binding._numProcessing;
|
|
binding._numProcessing = typeof _numProcessing === 'bigint' ? _numProcessing - 1n : +_numProcessing - 1;
|
|
const SENTRY_BUFFER_FULL_ERROR = (require(885) /* metro dependency 885 */).SENTRY_BUFFER_FULL_ERROR;
|
|
if (a0 === SENTRY_BUFFER_FULL_ERROR) {
|
|
env0_1.recordDroppedEvent('queue_overflow', require);
|
|
}
|
|
return a0;
|
|
}
|
|
|
|
function _fun9552(a0) { // fn#9552, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1011:2414, offset: 0x00d6ac6c, size: 33 bytes, params: 2, frame: 15
|
|
const binding = env1_2;
|
|
return binding._captureEvent(a0, env1_3, importDefault);
|
|
}
|
|
|
|
function _fun9556(a0) { // fn#9556, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1011:2816, offset: 0x00d6ad8b, size: 33 bytes, params: 2, frame: 15
|
|
const binding = env1_1;
|
|
return binding._captureEvent(a0, env1_2, importAll);
|
|
}
|
|
|
|
function _validateBeforeSendResult(a0, a1) { // fn#9602, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1011:10859, offset: 0x00d6c218, size: 157 bytes, params: 3, frame: 17
|
|
const env0_0 = a1;
|
|
const value = '' + a1 + ' must return `null` or a valid event.';
|
|
const moduleValue = require(836) /* metro dependency 836 */;
|
|
if (moduleValue.isThenable(a0)) {
|
|
return a0.then(_fun9603, _fun9604);
|
|
}
|
|
const moduleValue2 = moduleValue;
|
|
if (moduleValue2.isPlainObject(a0)) {
|
|
return a0;
|
|
}
|
|
if (a0 === null) {
|
|
return a0;
|
|
}
|
|
throw _makeInternalError(value);
|
|
}
|
|
|
|
function _fun9603(a0) { // fn#9603, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1011:10992, offset: 0x00d6c2b5, size: 68 bytes, params: 2, frame: 13
|
|
const moduleValue = require(836) /* metro dependency 836 */;
|
|
if (moduleValue.isPlainObject(a0)) {
|
|
return a0;
|
|
}
|
|
if (a0 === null) {
|
|
return a0;
|
|
}
|
|
throw _makeInternalError(env0_1);
|
|
}
|
|
|
|
function _fun9604(a0) { // fn#9604, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1011:11084, offset: 0x00d6c2f9, size: 56 bytes, params: 2, frame: 16
|
|
const value = environment.__proto__.__proto__.__proto__.__proto__;
|
|
throw _makeInternalError('' + require + ' rejected with ' + a0);
|
|
}
|
|
|