Files
2026-07-28 01:06:53 +03:00

1957 lines
97 KiB
JavaScript

/* Metro module 1196; source: unknown; dependencies: [57, 31, 826, 1197, 1166, 1164, 1009] */
import Module00057 from './module-00057.js'; /* Metro dependency 57 */
import * as ReactModule from './module-00031-React.js'; /* Metro dependency 31 */
import * as Module00826Module from './module-00826.js'; /* Metro dependency 826 */
import * as Module01009Module from './module-01009.js'; /* Metro dependency 1009 */
import * as moduleValue22 from './module-01164.js'; /* Metro dependency 1164 */
import * as Module01197Module from './module-01197.js'; /* Metro dependency 1197 */
function _fun13243(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#13243, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1323:6, offset: 0x00de5320, size: 384 bytes, params: 8, frame: 24
var closure5;
let value = this;
let env0_0 = require;
const TimeToInitialDisplay2 = TimeToInitialDisplay;
const TimeToFullDisplay2 = TimeToFullDisplay;
const startTimeToInitialDisplaySpan2 = startTimeToInitialDisplaySpan;
const startTimeToFullDisplaySpan2 = startTimeToFullDisplaySpan;
const createTimeToDisplay = function({useFocusEffect, Component}) {
var closure = _fun13264;
closure.displayName = 'TimeToDisplayWrapper';
return closure;
};
const fetchNativeFramesWithTimeout = function() {
var Promise = global.Promise;
var value = Object.create(Promise.prototype, {constructor: {value: Promise}});
var value2 = new Promise(_fun13275);
return value2 instanceof Object ? value2 : value;
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let env0_2 = Module00057;
let env0_3 = ReactModule;
if (!(value && value.__awaiter)) {
closure5 = function(a0, a1, a2, a3) {
var r2;
var value = a2;
var env0_0 = a0;
var env0_1 = a1;
var env0_2 = value;
var env0_3 = a3;
r2 = value || global.Promise;
value = Object.create(r2.prototype, {constructor: {value: r2}});
var value2 = new r2(_fun13280);
return value2 instanceof Object ? value2 : value;
};
}
let WeakMap = global.WeakMap;
let weakMap = new WeakMap();
WeakMap = global.WeakMap;
weakMap = new WeakMap();
const Map = global.Map;
const map = new Map();
exports.manualInitialDisplaySpans = weakMap;
exports.TimeToInitialDisplay = TimeToInitialDisplay2;
exports.TimeToFullDisplay = TimeToFullDisplay2;
exports.startTimeToInitialDisplaySpan = startTimeToInitialDisplaySpan2;
exports.startTimeToFullDisplaySpan = startTimeToFullDisplaySpan2;
exports.updateInitialDisplaySpan = updateInitialDisplaySpan;
exports.createTimeToFullDisplay = function(a0) {
return createTimeToDisplay({useFocusEffect: a0.useFocusEffect, Component: TimeToFullDisplay});
};
exports.createTimeToInitialDisplay = function(a0) {
return createTimeToDisplay({useFocusEffect: a0.useFocusEffect, Component: TimeToInitialDisplay});
};
function TimeToInitialDisplay({record, children}) { // fn#13244, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1323:550, offset: 0x00de54a0, size: 144 bytes, params: 2, frame: 18
var r5;
var moduleValue2;
const activeSpan = (require(826) /* metro dependency 826 */).getActiveSpan();
if (activeSpan) {
env0_6.set(activeSpan, true);
}
if (activeSpan) {
moduleValue2 = require(826) /* metro dependency 826 */;
r5 = moduleValue2.spanToJSON(activeSpan).span_id;
} else {
r5 = activeSpan;
}
return env0_3.createElement(TimeToDisplay, {initialDisplay: record, parentSpanId: r5}, children);
}
function TimeToFullDisplay({record, children}) { // fn#13245, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1323:757, offset: 0x00de5530, size: 124 bytes, params: 2, frame: 18
var r5;
var moduleValue2;
const activeSpan = (require(826) /* metro dependency 826 */).getActiveSpan();
if (activeSpan) {
moduleValue2 = require(826) /* metro dependency 826 */;
r5 = moduleValue2.spanToJSON(activeSpan).span_id;
} else {
r5 = activeSpan;
}
return env0_3.createElement(TimeToDisplay, {fullDisplay: record, parentSpanId: r5}, children);
}
function TimeToDisplay({initialDisplay, fullDisplay, parentSpanId, children}) { // fn#13246, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1323:939, offset: 0x00de55ac, size: 128 bytes, params: 2, frame: 20
const rNSentryOnDrawReporter = (Module01197Module).getRNSentryOnDrawReporter();
const binding = env0_3;
const createElement = binding.createElement;
const Fragment = env0_3.Fragment;
const binding2 = env0_3;
return Reflect.apply(createElement, binding, [Fragment, null, binding2.createElement(rNSentryOnDrawReporter,
{initialDisplay: initialDisplay, fullDisplay: fullDisplay, parentSpanId: parentSpanId}), children]);
}
function startTimeToInitialDisplaySpan(a0) { // fn#13247, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1323:1165, offset: 0x00de562c, size: 434 bytes, params: 2, frame: 23
var value5;
var moduleValue3;
var startInactiveSpan;
var Object;
var assign;
var moduleValue4;
var value6;
const SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN = (require(826) /* metro dependency 826 */).SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN;
const value2 = undefined;
const activeSpan = (require(826) /* metro dependency 826 */).getActiveSpan();
const moduleValue2 = require(826) /* metro dependency 826 */;
if (activeSpan) {
value5 = moduleValue2.getSpanDescendants(activeSpan).find(_fun13248);
moduleValue3 = moduleValue2;
if (value5) {
moduleValue3.debug.log('[TimeToDisplay] Found existing ui.load.initial_display span.');
return value5;
}
startInactiveSpan = moduleValue3.startInactiveSpan;
Object = global.Object;
assign = Object.assign;
moduleValue4 = require(826) /* metro dependency 826 */;
value6 = Reflect.apply(startInactiveSpan, moduleValue3, [Reflect.apply(assign, Object,
[{'op': 'ui.load.initial_display', 'name': 'Time To Initial Display',
startTime: moduleValue4.spanToJSON(activeSpan).start_timestamp}, a0])]);
if (value6) {
captureStartFramesForSpan(value6.spanContext().spanId).catch(_fun13249);
if (a0 == null ? value2 : a0.isAutoInstrumented) {
value6.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,
(require(1166) /* metro dependency 1166 */).SPAN_ORIGIN_AUTO_UI_TIME_TO_DISPLAY);
} else {
env0_6.set(activeSpan, true);
value6.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,
(require(1166) /* metro dependency 1166 */).SPAN_ORIGIN_MANUAL_UI_TIME_TO_DISPLAY);
}
return value6;
}
} else {
moduleValue2.debug.warn('[TimeToDisplay] No active span found to attach ui.load.initial_display to.');
}
return value2;
function _fun13248(a0) { // fn#13248, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1323:1285, offset: 0x00de57de, size: 56 bytes, params: 2, frame: 11
let value = environment.__proto__;
value = require(826) /* metro dependency 826 */;
return value.spanToJSON(a0).op === 'ui.load.initial_display';
}
function _fun13249(a0) { // fn#13249, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1323:1684, offset: 0x00de5816, size: 102 bytes, params: 2, frame: 16
const value = environment.__proto__;
const debug = (Module00826Module).debug;
const log = debug.log;
const binding = env0_0;
Reflect.apply(log, debug,
['[TimeToDisplay] Failed to capture start frames for initial display span (' + binding.spanContext().spanId + ').',
a0]);
}
}
function startTimeToFullDisplaySpan() { // fn#13250, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1323:2183, offset: 0x00de587c, size: 541 bytes, params: 1, frame: 25
var isAutoInstrumented;
var spanDescendants;
var value6;
var value7;
var moduleValue3;
var startInactiveSpan;
var Object;
var assign;
var moduleValue4;
var value8;
var setAttribute;
var SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN;
let value = undefined;
const r5 = arguments.length > 0 && value !== arguments[0] ? arguments[0] : {timeoutMs: 30000};
const activeSpan = (require(826) /* metro dependency 826 */).getActiveSpan();
const moduleValue2 = require(826) /* metro dependency 826 */;
if (activeSpan) {
spanDescendants = moduleValue2.getSpanDescendants(activeSpan);
value6 = spanDescendants.find(_fun13251);
if (value6) {
value7 = spanDescendants.find(_fun13252);
moduleValue3 = moduleValue2;
if (value7) {
moduleValue3.debug.log('[TimeToDisplay] Found existing ui.load.full_display span.');
return value7;
}
startInactiveSpan = moduleValue3.startInactiveSpan;
Object = global.Object;
assign = Object.assign;
moduleValue4 = require(826) /* metro dependency 826 */;
value8 = Reflect.apply(startInactiveSpan, moduleValue3, [Reflect.apply(assign, Object,
[{'op': 'ui.load.full_display', 'name': 'Time To Full Display',
startTime: moduleValue4.spanToJSON(value6).start_timestamp}, r5])]);
if (value8) {
captureStartFramesForSpan(value8.spanContext().spanId).catch(_fun13253);
var env0_2 = global.setTimeout(_fun13254, r5.timeoutMs);
(require(826) /* metro dependency 826 */).fill(value8, 'end', function(a0) {
var env0_0 = a0;
return _fun13258;
});
isAutoInstrumented = r5 == null ? value : r5.isAutoInstrumented;
setAttribute = value8.setAttribute;
SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN = (require(826) /* metro dependency 826 */).SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN;
value = require(1166) /* metro dependency 1166 */;
if (isAutoInstrumented) {
Reflect.apply(setAttribute, value8, [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,
value.SPAN_ORIGIN_AUTO_UI_TIME_TO_DISPLAY]);
} else {
Reflect.apply(setAttribute, value8, [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,
value.SPAN_ORIGIN_MANUAL_UI_TIME_TO_DISPLAY]);
}
return value8;
}
return value;
}
(require(826) /* metro dependency 826 */).debug.warn('[TimeToDisplay] No initial display span found to attach ui.load.full_display to.');
} else {
moduleValue2.debug.warn('[TimeToDisplay] No active span found to attach ui.load.full_display to.');
}
return value;
function _fun13251(a0) { // fn#13251, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1323:2376, offset: 0x00de57de, size: 56 bytes, params: 2, frame: 11
let value = environment.__proto__;
value = require(826) /* metro dependency 826 */;
return value.spanToJSON(a0).op === 'ui.load.initial_display';
}
function _fun13252(a0) { // fn#13252, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1323:2470, offset: 0x00de5a99, size: 56 bytes, params: 2, frame: 11
let value = environment.__proto__;
value = require(826) /* metro dependency 826 */;
return value.spanToJSON(a0).op === 'ui.load.full_display';
}
function _fun13253(a0) { // fn#13253, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1323:2851, offset: 0x00de5ad1, size: 102 bytes, params: 2, frame: 16
const value = environment.__proto__;
const debug = (Module00826Module).debug;
const log = debug.log;
const binding = env0_1;
Reflect.apply(log, debug,
['[TimeToDisplay] Failed to capture start frames for full display span (' + binding.spanContext().spanId + ').',
a0]);
}
function _fun13254() { // fn#13254, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1323:3005, offset: 0x00de5b37, size: 188 bytes, params: 1, frame: 19
var environment;
var binding;
var setStatus;
var object;
let value = environment.__proto__;
const moduleValue = require(826) /* metro dependency 826 */;
if (!moduleValue.spanToJSON(env0_1).timestamp) {
binding = env0_1;
setStatus = binding.setStatus;
object = {};
object.code = moduleValue.SPAN_STATUS_ERROR;
object.message = 'deadline_exceeded';
Reflect.apply(setStatus, binding, [object]);
value = captureEndFramesAndAttachToSpan(env0_1);
value = value.then(_fun13255);
value.catch(_fun13256);
(require(826) /* metro dependency 826 */).debug.warn('[TimeToDisplay] Full display span deadline_exceeded.');
}
function _fun13255() { // fn#13255, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1323:3165, offset: 0x00de5bf3, size: 174 bytes, params: 1, frame: 20
const debug = (Module00826Module).debug;
const log = debug.log;
let binding = env1_1;
Reflect.apply(log, debug, ['[TimeToDisplay] span ' + binding.spanContext().spanId + ' updated with frame data.']);
binding = env1_1;
const end = binding.end;
Reflect.apply(end, binding, [Module00826Module.spanToJSON(env1_0).timestamp]);
(moduleValue22).setSpanDurationAsMeasurement('time_to_full_display', env1_1);
}
function _fun13256() { // fn#13256, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1323:3381, offset: 0x00de5ca1, size: 173 bytes, params: 1, frame: 20
const debug = (Module00826Module).debug;
const warn = debug.warn;
let binding = env1_1;
Reflect.apply(warn, debug,
['[TimeToDisplay] Failed to capture end frames for full display span (' + binding.spanContext().spanId + ').']);
binding = env1_1;
const end = binding.end;
Reflect.apply(end, binding, [Module00826Module.spanToJSON(env1_0).timestamp]);
(moduleValue22).setSpanDurationAsMeasurement('time_to_full_display', env1_1);
}
}
function _fun13257(a0) { // fn#13257, offset: 0x00de5d4e, size: 16 bytes, params: 2, frame: 2
const env0_0 = a0;
return _fun13258;
function _fun13258(a0) { // fn#13258, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1323:3754, offset: 0x00de5d5e, size: 49 bytes, params: 2, frame: 14
global.clearTimeout(env1_2);
env0_0.call(env1_1, a0);
}
}
}
function updateFullDisplaySpan(a0, a1) { // fn#13259, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1323:4250, offset: 0x00de5d8f, size: 505 bytes, params: 3, frame: 21
var r8;
var r1;
const debug = (require(826) /* metro dependency 826 */).debug;
var moduleValue2;
var value4;
let value = a1;
const env0_0 = a0;
const activeSpan = (require(826) /* metro dependency 826 */).getActiveSpan();
if (activeSpan) {
if (value) {
r8 = value;
} else {
value = require(826) /* metro dependency 826 */;
value = value.getSpanDescendants(activeSpan);
value = value.find(_fun13260);
r8 = value;
}
if (r8) {
value = require(826) /* metro dependency 826 */;
r1 = value.spanToJSON(r8).timestamp;
} else {
r1 = r8;
}
if (r1) {
value = startTimeToFullDisplaySpan({isAutoInstrumented: true});
moduleValue2 = require(826) /* metro dependency 826 */;
if (value) {
value4 = moduleValue2.spanToJSON(value);
if (value4.timestamp) {
debug.warn('[TimeToDisplay] ' + value4.description + ' (' + value4.span_id + ') span already ended.');
} else {
value = captureEndFramesAndAttachToSpan(value);
value = value.then(_fun13261);
value.catch(_fun13262);
}
} else {
moduleValue2.debug.warn('[TimeToDisplay] No TimeToFullDisplay span found or created, possibly performance is disabled.');
}
return undefined;
}
env0_7.set(activeSpan, true);
debug.warn('[TimeToDisplay] Full display called before initial display for active span (' + activeSpan.spanContext().spanId + ').');
} else {
(require(826) /* metro dependency 826 */).debug.warn('[TimeToDisplay] No active span found to update ui.load.full_display in.');
}
function _fun13260(a0) { // fn#13260, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1323:4367, offset: 0x00de57de, size: 56 bytes, params: 2, frame: 11
let value = environment.__proto__;
value = require(826) /* metro dependency 826 */;
return value.spanToJSON(a0).op === 'ui.load.initial_display';
}
function _fun13261() { // fn#13261, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1323:4869, offset: 0x00de5f88, size: 264 bytes, params: 1, frame: 23
var value2;
const debug = (Module00826Module).debug;
let binding = env0_1;
const r3 = binding > env0_0 ? env0_1 : env0_0;
if (env0_1 > env0_0) {
value2 = environment.__proto__;
debug.warn('[TimeToDisplay] Using initial display end. Full display end frame timestamp is before initial display end.');
}
env0_2.end(r3);
binding = env0_2;
const setStatus = binding.setStatus;
const SPAN_STATUS_OK = (Module00826Module).SPAN_STATUS_OK;
Reflect.apply(setStatus, binding, [{code: SPAN_STATUS_OK}]);
debug.log('[TimeToDisplay] span ' + env0_3.description + ' (' + env0_3.span_id + ') updated with end timestamp and frame data.');
(moduleValue22).setSpanDurationAsMeasurement('time_to_full_display', env0_2);
}
function _fun13262(a0) { // fn#13262, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1323:5270, offset: 0x00de6090, size: 169 bytes, params: 2, frame: 17
const value = environment.__proto__;
(Module00826Module).debug.log('[TimeToDisplay] Failed to capture frame data for full display span.',
a0);
let binding = env0_1;
env0_2.end(binding > env0_0 ? env0_1 : env0_0);
binding = env0_2;
const setStatus = binding.setStatus;
const SPAN_STATUS_OK = (Module00826Module).SPAN_STATUS_OK;
Reflect.apply(setStatus, binding, [{code: SPAN_STATUS_OK}]);
(moduleValue22).setSpanDurationAsMeasurement('time_to_full_display', env0_2);
}
}
function createTimeToDisplay({useFocusEffect, Component}) { // fn#13263, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1323:5725, offset: 0x00de6139, size: 44 bytes, params: 2, frame: 3
const TimeToDisplayWrapper2 = TimeToDisplayWrapper;
TimeToDisplayWrapper2.displayName = 'TimeToDisplayWrapper';
return TimeToDisplayWrapper2;
function TimeToDisplayWrapper(a0) { // fn#13264, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1323:5796, owner: createTimeToDisplay.TimeToDisplayWrapper, offset: 0x00de6165, size: 128 bytes, params: 2, frame: 19
const [property, env0_0] = env1_2(useState(false), 2);
useFocusEffect(_fun13265);
const binding = env1_3;
const createElement = binding.createElement;
const Object = global.Object;
return Reflect.apply(createElement, binding, [Component, Object.assign({}, a0, {record: property && a0.record})]);
function _fun13265() { // fn#13265, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1323:5874, offset: 0x00de61e5, size: 25 bytes, params: 1, frame: 11
env0_0(true);
return _fun13266;
function _fun13266() { // fn#13266, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1323:5898, offset: 0x00de61fe, size: 18 bytes, params: 1, frame: 11
env1_0(false);
}
}
}
}
function captureStartFramesForSpan(a0) { // fn#13267, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1323:6026, offset: 0x00de6210, size: 36 bytes, params: 2, frame: 15
const env0_0 = a0;
return env0_5(this, undefined, undefined, _fun13269);
function* _fun13269() { // fn#13269, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1323:6093, offset: 0x00de623d, size: 452 bytes, params: 1, frame: 24
var environment;
var binding;
var NATIVE;
var enableNative;
var value3;
var value4;
var value5;
var setTimeout;
var closure;
var value6;
var has;
var value7;
var value8;
var set;
var object;
var get;
var value9;
var clearTimeout;
var binding2;
var property;
var value10;
var debug;
var log;
var HermesInternal;
var concat;
var value11;
var binding3;
var value12;
var value13;
var error;
if (true) {
reduciblePort65: while (true) {
exceptionLanding64: while (true) {
value = environment.__proto__.__proto__;
binding = env2_0;
NATIVE = binding(env2_1[6]).NATIVE;
enableNative = NATIVE.enableNative;
if (enableNative) {
try {
binding = env2_18;
} catch (error) {
break exceptionLanding64;
}
try {
value3 = binding();
} catch (error) {
break exceptionLanding64;
}
yield value3;
try {
value4 = undefined;
value5 = false;
} catch (error) {
break exceptionLanding64;
}
if (value5) {
return value4;
}
try {
setTimeout = global.setTimeout;
} catch (error) {
break exceptionLanding64;
}
try {
} catch (error) {
break exceptionLanding64;
}
try {
closure = _fun13270;
} catch (error) {
break exceptionLanding64;
}
try {
value6 = setTimeout(closure, 60000);
} catch (error) {
break exceptionLanding64;
}
try {
binding = env2_8;
} catch (error) {
break exceptionLanding64;
}
try {
has = binding.has;
} catch (error) {
break exceptionLanding64;
}
value7 = environment.__proto__;
try {
} catch (error) {
break exceptionLanding64;
}
try {
value8 = Reflect.apply(has, binding, [require]);
} catch (error) {
break exceptionLanding64;
}
reducibleJoin26: while (true) {
if (value8) {
break reducibleJoin26;
}
try {
binding = env2_8;
} catch (error) {
break exceptionLanding64;
}
try {
set = binding.set;
} catch (error) {
break exceptionLanding64;
}
try {
} catch (error) {
break exceptionLanding64;
}
try {
object = {'startFrames': null, 'endFrames': null};
} catch (error) {
break exceptionLanding64;
}
try {
object.cleanupTimeout = value6;
} catch (error) {
break exceptionLanding64;
}
try {
Reflect.apply(set, binding, [require, object]);
} catch (error) {
break exceptionLanding64;
}
break reducibleJoin26;
}
try {
binding = env2_8;
} catch (error) {
break exceptionLanding64;
}
try {
get = binding.get;
} catch (error) {
break exceptionLanding64;
}
try {
} catch (error) {
break exceptionLanding64;
}
try {
value9 = Reflect.apply(get, binding, [require]);
} catch (error) {
break exceptionLanding64;
}
if (!value9) {
try {
clearTimeout = global.clearTimeout;
} catch (error) {
break exceptionLanding64;
}
try {
clearTimeout(value6);
} catch (error) {
break exceptionLanding64;
}
try {
binding = env2_0;
} catch (error) {
break exceptionLanding64;
}
try {
binding2 = env2_1;
} catch (error) {
break exceptionLanding64;
}
try {
property = binding2[2];
} catch (error) {
break exceptionLanding64;
}
try {
value10 = binding(property);
} catch (error) {
break exceptionLanding64;
}
try {
debug = value10.debug;
} catch (error) {
break exceptionLanding64;
}
try {
log = debug.log;
} catch (error) {
break exceptionLanding64;
}
try {
} catch (error) {
break exceptionLanding64;
}
try {
HermesInternal = global.HermesInternal;
} catch (error) {
break exceptionLanding64;
}
try {
concat = HermesInternal.concat;
} catch (error) {
break exceptionLanding64;
}
try {
value11 = '[TimeToDisplay] Span ' + require + ' already ended, discarding start frames.';
} catch (error) {
break exceptionLanding64;
}
try {
Reflect.apply(log, debug, [value11]);
} catch (error) {
break exceptionLanding64;
}
return undefined;
}
try {
value9.startFrames = value4;
} catch (error) {
break exceptionLanding64;
}
try {
value9.cleanupTimeout = value6;
} catch (error) {
break exceptionLanding64;
}
try {
binding = env2_0;
} catch (error) {
break exceptionLanding64;
}
try {
binding3 = env2_1;
} catch (error) {
break exceptionLanding64;
}
try {
property = binding3[2];
} catch (error) {
break exceptionLanding64;
}
try {
value12 = binding(property);
} catch (error) {
break exceptionLanding64;
}
try {
debug = value12.debug;
} catch (error) {
break exceptionLanding64;
}
try {
log = debug.log;
} catch (error) {
break exceptionLanding64;
}
try {
} catch (error) {
break exceptionLanding64;
}
try {
HermesInternal = global.HermesInternal;
} catch (error) {
break exceptionLanding64;
}
try {
concat = HermesInternal.concat;
} catch (error) {
break exceptionLanding64;
}
try {
value13 = '[TimeToDisplay] Captured start frames for span ' + require + '.';
} catch (error) {
break exceptionLanding64;
}
try {
Reflect.apply(log, debug, [value13, value4]);
} catch (error) {
break exceptionLanding64;
}
break reduciblePort65;
}
break reduciblePort65;
}
binding = env2_0;
debug = binding(env2_1[2]).debug;
log = debug.log;
value = environment.__proto__;
HermesInternal = global.HermesInternal;
concat = HermesInternal.concat;
Reflect.apply(log, debug, ['[TimeToDisplay] Failed to capture start frames for span ' + require + '.',
error]);
break reduciblePort65;
}
}
function _fun13270() { // fn#13270, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1323:6197, offset: 0x00de6401, size: 119 bytes, params: 1, frame: 15
let binding = env3_8;
const get = binding.get;
if (Reflect.apply(get, binding, [require])) {
binding = env3_8;
binding.delete(require);
binding = env3_0;
binding(env3_1[2]).debug.log('[TimeToDisplay] Cleaned up stale frame data for span ' + require + ' after timeout.');
}
}
}
}
function captureEndFramesAndAttachToSpan(a0) { // fn#13271, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1323:6748, offset: 0x00de6478, size: 36 bytes, params: 2, frame: 15
const env0_0 = a0;
return env0_5(this, undefined, undefined, _fun13273);
function* _fun13273() { // fn#13273, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1323:6821, offset: 0x00de64a5, size: 839 bytes, params: 1, frame: 23
var startFrames;
var value;
var value2;
var value3;
var binding;
var NATIVE;
var enableNative;
var value4;
var spanContext;
var spanId;
var get;
var value5;
var debug;
var log;
var HermesInternal;
var concat;
var value6;
var value7;
var value8;
var totalFrames;
var totalFrames2;
var value9;
var slowFrames;
var slowFrames2;
var value10;
var frozenFrames;
var frozenFrames2;
var value11;
var value12;
var value13;
var value14;
var setAttribute;
var binding2;
var property;
var value15;
var object;
var value16;
var spanId2;
var object2;
var binding3;
var value17;
var warn;
var value18;
var spanId3;
var value19;
var binding4;
var value20;
var value21;
var cleanupTimeout;
var clearTimeout;
var error;
var binding5;
var value22;
var value23;
exceptionLanding108: while (true) {
value = undefined;
value2 = false;
if (value2) {
return value;
}
value = undefined;
value3 = environment.__proto__.__proto__;
binding = env2_0;
NATIVE = binding(env2_1[6]).NATIVE;
enableNative = NATIVE.enableNative;
if (enableNative) {
value4 = environment.__proto__;
spanContext = require.spanContext;
spanId = Reflect.apply(spanContext, require, []).spanId;
binding = env2_8;
get = binding.get;
value5 = Reflect.apply(get, binding, [spanId]);
reducibleJoin4: while (true) {
if (value5 == null) {
startFrames = value;
break reducibleJoin4;
}
startFrames = value5.startFrames;
break reducibleJoin4;
}
if (startFrames) {
reducibleJoin7: while (true) {
reduciblePort104: while (true) {
exceptionLanding90: while (true) {
try {
try {
binding = env2_18;
} catch (error) {
break exceptionLanding90;
}
} catch (error) {
break exceptionLanding108;
}
break reducibleJoin7;
}
try {
binding = env2_0;
} catch (error) {
break exceptionLanding108;
}
try {
binding5 = env2_1;
} catch (error) {
break exceptionLanding108;
}
try {
property = binding5[2];
} catch (error) {
break exceptionLanding108;
}
try {
value22 = binding(property);
} catch (error) {
break exceptionLanding108;
}
try {
debug = value22.debug;
} catch (error) {
break exceptionLanding108;
}
try {
log = debug.log;
} catch (error) {
break exceptionLanding108;
}
try {
HermesInternal = global.HermesInternal;
} catch (error) {
break exceptionLanding108;
}
try {
concat = HermesInternal.concat;
} catch (error) {
break exceptionLanding108;
}
try {
value23 = '[TimeToDisplay] Failed to capture end frames for span ' + spanId + '.';
} catch (error) {
break exceptionLanding108;
}
try {
Reflect.apply(log, debug, [value23, error]);
} catch (error) {
break exceptionLanding108;
}
break reduciblePort104;
}
cleanupTimeout = value5.cleanupTimeout;
reducibleJoin106: while (true) {
if (cleanupTimeout) {
clearTimeout = global.clearTimeout;
cleanupTimeout = value5.cleanupTimeout;
clearTimeout(cleanupTimeout);
break reducibleJoin106;
}
break reducibleJoin106;
}
binding = env2_8;
binding.delete(spanId);
return value;
}
try {
try {
value6 = binding();
} catch (error) {
break exceptionLanding90;
}
} catch (error) {
break exceptionLanding108;
}
yield value6;
try {
try {
value7 = undefined;
value8 = false;
} catch (error) {
break exceptionLanding90;
}
} catch (error) {
break exceptionLanding108;
}
if (value8) {
cleanupTimeout = value5.cleanupTimeout;
reducibleJoin89: while (true) {
if (cleanupTimeout) {
clearTimeout = global.clearTimeout;
cleanupTimeout = value5.cleanupTimeout;
clearTimeout(cleanupTimeout);
break reducibleJoin89;
}
break reducibleJoin89;
}
binding = env2_8;
binding.delete(spanId);
return value7;
}
try {
try {
value5.endFrames = value7;
} catch (error) {
break exceptionLanding90;
}
} catch (error) {
break exceptionLanding108;
}
try {
try {
} catch (error) {
break exceptionLanding90;
}
} catch (error) {
break exceptionLanding108;
}
try {
try {
startFrames = value5.startFrames;
} catch (error) {
break exceptionLanding90;
}
} catch (error) {
break exceptionLanding108;
}
try {
try {
totalFrames = value7.totalFrames;
} catch (error) {
break exceptionLanding90;
}
} catch (error) {
break exceptionLanding108;
}
try {
try {
totalFrames2 = startFrames.totalFrames;
} catch (error) {
break exceptionLanding90;
}
} catch (error) {
break exceptionLanding108;
}
try {
try {
value9 = totalFrames - totalFrames2;
} catch (error) {
break exceptionLanding90;
}
} catch (error) {
break exceptionLanding108;
}
try {
try {
slowFrames = value7.slowFrames;
} catch (error) {
break exceptionLanding90;
}
} catch (error) {
break exceptionLanding108;
}
try {
try {
slowFrames2 = startFrames.slowFrames;
} catch (error) {
break exceptionLanding90;
}
} catch (error) {
break exceptionLanding108;
}
try {
try {
value10 = slowFrames - slowFrames2;
} catch (error) {
break exceptionLanding90;
}
} catch (error) {
break exceptionLanding108;
}
try {
try {
frozenFrames = value7.frozenFrames;
} catch (error) {
break exceptionLanding90;
}
} catch (error) {
break exceptionLanding108;
}
try {
try {
frozenFrames2 = startFrames.frozenFrames;
} catch (error) {
break exceptionLanding90;
}
} catch (error) {
break exceptionLanding108;
}
try {
try {
value11 = frozenFrames - frozenFrames2;
} catch (error) {
break exceptionLanding90;
}
} catch (error) {
break exceptionLanding108;
}
try {
try {
value12 = value9 <= 0;
} catch (error) {
break exceptionLanding90;
}
} catch (error) {
break exceptionLanding108;
}
reducibleJoin73: while (true) {
reducibleJoin56: while (true) {
if (value12) {
try {
try {
value13 = value10 <= 0;
} catch (error) {
break exceptionLanding90;
}
} catch (error) {
break exceptionLanding108;
}
if (value13) {
try {
try {
value14 = value11 <= 0;
} catch (error) {
break exceptionLanding90;
}
} catch (error) {
break exceptionLanding108;
}
if (value14) {
try {
try {
binding = env2_0;
} catch (error) {
break exceptionLanding90;
}
} catch (error) {
break exceptionLanding108;
}
try {
try {
binding3 = env2_1;
} catch (error) {
break exceptionLanding90;
}
} catch (error) {
break exceptionLanding108;
}
try {
try {
property = binding3[2];
} catch (error) {
break exceptionLanding90;
}
} catch (error) {
break exceptionLanding108;
}
try {
try {
value17 = binding(property);
} catch (error) {
break exceptionLanding90;
}
} catch (error) {
break exceptionLanding108;
}
try {
try {
debug = value17.debug;
} catch (error) {
break exceptionLanding90;
}
} catch (error) {
break exceptionLanding108;
}
try {
try {
warn = debug.warn;
} catch (error) {
break exceptionLanding90;
}
} catch (error) {
break exceptionLanding108;
}
try {
try {
spanContext = require.spanContext;
} catch (error) {
break exceptionLanding90;
}
} catch (error) {
break exceptionLanding108;
}
try {
try {
value18 = Reflect.apply(spanContext, require, []);
} catch (error) {
break exceptionLanding90;
}
} catch (error) {
break exceptionLanding108;
}
try {
try {
spanId3 = value18.spanId;
} catch (error) {
break exceptionLanding90;
}
} catch (error) {
break exceptionLanding108;
}
try {
try {
HermesInternal = global.HermesInternal;
} catch (error) {
break exceptionLanding90;
}
} catch (error) {
break exceptionLanding108;
}
try {
try {
concat = HermesInternal.concat;
} catch (error) {
break exceptionLanding90;
}
} catch (error) {
break exceptionLanding108;
}
try {
try {
value19 = '[TimeToDisplay] Detected zero slow or frozen frames. Not adding measurements to span (' + spanId3 + ').';
} catch (error) {
break exceptionLanding90;
}
} catch (error) {
break exceptionLanding108;
}
try {
try {
Reflect.apply(warn, debug, [value19]);
} catch (error) {
break exceptionLanding90;
}
} catch (error) {
break exceptionLanding108;
}
break reducibleJoin73;
}
}
try {
try {
setAttribute = require.setAttribute;
} catch (error) {
break exceptionLanding90;
}
} catch (error) {
break exceptionLanding108;
}
try {
try {
Reflect.apply(setAttribute, require, ['frames.total', value9]);
} catch (error) {
break exceptionLanding90;
}
} catch (error) {
break exceptionLanding108;
}
try {
try {
setAttribute = require.setAttribute;
} catch (error) {
break exceptionLanding90;
}
} catch (error) {
break exceptionLanding108;
}
try {
try {
Reflect.apply(setAttribute, require, ['frames.slow', value10]);
} catch (error) {
break exceptionLanding90;
}
} catch (error) {
break exceptionLanding108;
}
try {
try {
setAttribute = require.setAttribute;
} catch (error) {
break exceptionLanding90;
}
} catch (error) {
break exceptionLanding108;
}
try {
try {
Reflect.apply(setAttribute, require, ['frames.frozen', value11]);
} catch (error) {
break exceptionLanding90;
}
} catch (error) {
break exceptionLanding108;
}
try {
try {
binding = env2_0;
} catch (error) {
break exceptionLanding90;
}
} catch (error) {
break exceptionLanding108;
}
try {
try {
binding2 = env2_1;
} catch (error) {
break exceptionLanding90;
}
} catch (error) {
break exceptionLanding108;
}
try {
try {
property = binding2[2];
} catch (error) {
break exceptionLanding90;
}
} catch (error) {
break exceptionLanding108;
}
try {
try {
value15 = binding(property);
} catch (error) {
break exceptionLanding90;
}
} catch (error) {
break exceptionLanding108;
}
try {
try {
debug = value15.debug;
} catch (error) {
break exceptionLanding90;
}
} catch (error) {
break exceptionLanding108;
}
try {
try {
log = debug.log;
} catch (error) {
break exceptionLanding90;
}
} catch (error) {
break exceptionLanding108;
}
try {
try {
object = {};
} catch (error) {
break exceptionLanding90;
}
} catch (error) {
break exceptionLanding108;
}
try {
try {
spanContext = require.spanContext;
} catch (error) {
break exceptionLanding90;
}
} catch (error) {
break exceptionLanding108;
}
try {
try {
value16 = Reflect.apply(spanContext, require, []);
} catch (error) {
break exceptionLanding90;
}
} catch (error) {
break exceptionLanding108;
}
try {
try {
spanId2 = value16.spanId;
} catch (error) {
break exceptionLanding90;
}
} catch (error) {
break exceptionLanding108;
}
try {
try {
object.spanId = spanId2;
} catch (error) {
break exceptionLanding90;
}
} catch (error) {
break exceptionLanding108;
}
try {
try {
object2 = {};
} catch (error) {
break exceptionLanding90;
}
} catch (error) {
break exceptionLanding108;
}
try {
try {
object2.total = value9;
} catch (error) {
break exceptionLanding90;
}
} catch (error) {
break exceptionLanding108;
}
try {
try {
object2.slow = value10;
} catch (error) {
break exceptionLanding90;
}
} catch (error) {
break exceptionLanding108;
}
try {
try {
object2.frozen = value11;
} catch (error) {
break exceptionLanding90;
}
} catch (error) {
break exceptionLanding108;
}
try {
try {
object.frameData = object2;
} catch (error) {
break exceptionLanding90;
}
} catch (error) {
break exceptionLanding108;
}
try {
try {
Reflect.apply(log, debug, ['[TimeToDisplay] Attached frame data to span.', object]);
} catch (error) {
break exceptionLanding90;
}
} catch (error) {
break exceptionLanding108;
}
break reducibleJoin56;
}
try {
try {
setAttribute = require.setAttribute;
} catch (error) {
break exceptionLanding90;
}
} catch (error) {
break exceptionLanding108;
}
try {
try {
Reflect.apply(setAttribute, require, ['frames.total', value9]);
} catch (error) {
break exceptionLanding90;
}
} catch (error) {
break exceptionLanding108;
}
try {
try {
setAttribute = require.setAttribute;
} catch (error) {
break exceptionLanding90;
}
} catch (error) {
break exceptionLanding108;
}
try {
try {
Reflect.apply(setAttribute, require, ['frames.slow', value10]);
} catch (error) {
break exceptionLanding90;
}
} catch (error) {
break exceptionLanding108;
}
try {
try {
setAttribute = require.setAttribute;
} catch (error) {
break exceptionLanding90;
}
} catch (error) {
break exceptionLanding108;
}
try {
try {
Reflect.apply(setAttribute, require, ['frames.frozen', value11]);
} catch (error) {
break exceptionLanding90;
}
} catch (error) {
break exceptionLanding108;
}
try {
try {
binding = env2_0;
} catch (error) {
break exceptionLanding90;
}
} catch (error) {
break exceptionLanding108;
}
try {
try {
binding2 = env2_1;
} catch (error) {
break exceptionLanding90;
}
} catch (error) {
break exceptionLanding108;
}
try {
try {
property = binding2[2];
} catch (error) {
break exceptionLanding90;
}
} catch (error) {
break exceptionLanding108;
}
try {
try {
value15 = binding(property);
} catch (error) {
break exceptionLanding90;
}
} catch (error) {
break exceptionLanding108;
}
try {
try {
debug = value15.debug;
} catch (error) {
break exceptionLanding90;
}
} catch (error) {
break exceptionLanding108;
}
try {
try {
log = debug.log;
} catch (error) {
break exceptionLanding90;
}
} catch (error) {
break exceptionLanding108;
}
try {
try {
object = {};
} catch (error) {
break exceptionLanding90;
}
} catch (error) {
break exceptionLanding108;
}
try {
try {
spanContext = require.spanContext;
} catch (error) {
break exceptionLanding90;
}
} catch (error) {
break exceptionLanding108;
}
try {
try {
value16 = Reflect.apply(spanContext, require, []);
} catch (error) {
break exceptionLanding90;
}
} catch (error) {
break exceptionLanding108;
}
try {
try {
spanId2 = value16.spanId;
} catch (error) {
break exceptionLanding90;
}
} catch (error) {
break exceptionLanding108;
}
try {
try {
object.spanId = spanId2;
} catch (error) {
break exceptionLanding90;
}
} catch (error) {
break exceptionLanding108;
}
try {
try {
object2 = {};
} catch (error) {
break exceptionLanding90;
}
} catch (error) {
break exceptionLanding108;
}
try {
try {
object2.total = value9;
} catch (error) {
break exceptionLanding90;
}
} catch (error) {
break exceptionLanding108;
}
try {
try {
object2.slow = value10;
} catch (error) {
break exceptionLanding90;
}
} catch (error) {
break exceptionLanding108;
}
try {
try {
object2.frozen = value11;
} catch (error) {
break exceptionLanding90;
}
} catch (error) {
break exceptionLanding108;
}
try {
try {
object.frameData = object2;
} catch (error) {
break exceptionLanding90;
}
} catch (error) {
break exceptionLanding108;
}
try {
try {
Reflect.apply(log, debug, ['[TimeToDisplay] Attached frame data to span.', object]);
} catch (error) {
break exceptionLanding90;
}
} catch (error) {
break exceptionLanding108;
}
break reducibleJoin56;
}
break reducibleJoin73;
}
try {
try {
binding = env2_0;
} catch (error) {
break exceptionLanding90;
}
} catch (error) {
break exceptionLanding108;
}
try {
try {
binding4 = env2_1;
} catch (error) {
break exceptionLanding90;
}
} catch (error) {
break exceptionLanding108;
}
try {
try {
property = binding4[2];
} catch (error) {
break exceptionLanding90;
}
} catch (error) {
break exceptionLanding108;
}
try {
try {
value20 = binding(property);
} catch (error) {
break exceptionLanding90;
}
} catch (error) {
break exceptionLanding108;
}
try {
try {
debug = value20.debug;
} catch (error) {
break exceptionLanding90;
}
} catch (error) {
break exceptionLanding108;
}
try {
try {
log = debug.log;
} catch (error) {
break exceptionLanding90;
}
} catch (error) {
break exceptionLanding108;
}
try {
try {
HermesInternal = global.HermesInternal;
} catch (error) {
break exceptionLanding90;
}
} catch (error) {
break exceptionLanding108;
}
try {
try {
concat = HermesInternal.concat;
} catch (error) {
break exceptionLanding90;
}
} catch (error) {
break exceptionLanding108;
}
try {
try {
value21 = '[TimeToDisplay] Captured and attached end frames for span ' + spanId + '.';
} catch (error) {
break exceptionLanding90;
}
} catch (error) {
break exceptionLanding108;
}
try {
try {
Reflect.apply(log, debug, [value21, value7]);
} catch (error) {
break exceptionLanding90;
}
} catch (error) {
break exceptionLanding108;
}
cleanupTimeout = value5.cleanupTimeout;
reducibleJoin106: while (true) {
if (cleanupTimeout) {
clearTimeout = global.clearTimeout;
cleanupTimeout = value5.cleanupTimeout;
clearTimeout(cleanupTimeout);
break reducibleJoin106;
}
break reducibleJoin106;
}
binding = env2_8;
binding.delete(spanId);
} else {
binding = env2_0;
debug = binding(env2_1[2]).debug;
log = debug.log;
HermesInternal = global.HermesInternal;
concat = HermesInternal.concat;
Reflect.apply(log, debug,
['[TimeToDisplay] No start frames found for span ' + spanId + ', skipping frame data collection.']);
}
}
return value;
}
if (value5.cleanupTimeout) {
global.clearTimeout(value5.cleanupTimeout);
env2_8.delete(spanId);
throw error;
}
env2_8.delete(spanId);
throw error;
}
}
function fetchNativeFramesWithTimeout() { // fn#13274, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1323:7901, offset: 0x00de67ec, size: 37 bytes, params: 1, frame: 11
const Promise = global.Promise;
const value = Object.create(Promise.prototype, {constructor: {value: Promise}});
const promise = new Promise(_fun13275);
return promise instanceof Object ? promise : value;
function _fun13275(a0, a1) { // fn#13275, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1323:7961, offset: 0x00de6811, size: 125 bytes, params: 3, frame: 14
var environment;
const env0_0 = a0;
const env0_1 = a1;
const env0_3 = global.setTimeout(_fun13276, 2000);
let value = environment.__proto__;
const NATIVE = (Module01009Module).NATIVE;
value = NATIVE.fetchNativeFrames();
value = value.then(_fun13277);
value.then(undefined, _fun13278);
function _fun13276() { // fn#13276, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1323:7998, offset: 0x00ddcfd5, size: 37 bytes, params: 1, frame: 11
if (!env0_2) {
require('Fetching native frames took too long. Dropping frames.');
}
}
function _fun13277(a0) { // fn#13277, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1323:8127, offset: 0x00ddcffa, size: 71 bytes, params: 2, frame: 13
if (!env0_2) {
global.clearTimeout(env0_3);
if (a0) {
env0_0(a0);
} else {
require('Native frames response is null.');
}
}
}
function _fun13278(a0) { // fn#13278, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1323:8225, offset: 0x00ddd041, size: 51 bytes, params: 2, frame: 12
if (!env0_2) {
global.clearTimeout(env0_3);
require(a0);
}
}
}
}
function _fun13279(a0, a1, a2, a3) { // fn#13279, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1323:161, offset: 0x00de688e, size: 75 bytes, params: 5, frame: 12
let value = a2;
const env0_0 = a0;
const env0_1 = a1;
const env0_3 = a3;
let r2 = value || global.Promise;
value = Object.create(r2.prototype, {constructor: {value: r2}});
r2 = new r2(_fun13280);
return r2 instanceof Object ? r2 : value;
function _fun13280(a0, a1) { // fn#13280, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1323:207, offset: 0x00de68d9, size: 98 bytes, params: 3, frame: 16
const env0_0 = a0;
const env0_1 = a1;
const step_132832 = step_13283;
const value2 = importAll.apply(env0_0, require || []);
step_132832(value2.next());
function fulfilled_13281(a0) { // fn#13281, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1323:221, offset: 0x00d57fb9, size: 56 bytes, params: 2, frame: 12
var value;
var step_13283Binding;
var value2;
var next;
var value3;
var error;
try {
value = environment;
step_13283Binding = step_13283;
value2 = environment.__proto__;
next = importAll.next;
value3 = Reflect.apply(next, importAll, [a0]);
step_13283Binding(value3);
} catch (error) {
require(error);
}
}
function rejected_13282(a0) { // fn#13282, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1323:278, offset: 0x00d57ff1, size: 57 bytes, params: 2, frame: 12
var value;
var step_13283Binding;
var value2;
var value3;
var error;
try {
value = environment;
step_13283Binding = step_13283;
value2 = environment.__proto__;
value3 = importAll.throw(a0);
step_13283Binding(value3);
} catch (error) {
require(error);
}
}
function step_13283(a0) { // fn#13283, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1323:335, offset: 0x00de693b, size: 77 bytes, params: 2, frame: 14
var value;
if (a0.done) {
env0_0(a0.value);
} else {
value = a0.value;
value = step_13283Adopt(value);
value.then(fulfilled_13281, rejected_13282);
}
function step_13283Adopt(a0) { // fn#13284, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1323:370, owner: step_13283.adopt, offset: 0x00de6988, size: 54 bytes, params: 2, frame: 12
const value = a0;
return value instanceof env2_2 ? value : new env2_2(_fun13285);
function _fun13285(a0) { // fn#13285, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1323:419, offset: 0x00cd9b0e, size: 19 bytes, params: 2, frame: 11
a0(env0_0);
}
}
}
}
}
function updateInitialDisplaySpan(a0) { // fn#13286, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1323:8537, offset: 0x00de69be, size: 457 bytes, params: 2, frame: 21
var r8;
var value;
var debug;
var warn;
var spanToJSON;
var parent_span_id;
var moduleValue2;
var moduleValue3;
const env0_0 = a0;
const r1 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
const activeSpan = r1.activeSpan;
if (activeSpan !== undefined) {
r8 = activeSpan;
} else {
value = require(826) /* metro dependency 826 */;
value = value.getActiveSpan();
r8 = value;
}
const span = r1.span;
const r5 = span !== undefined ? span : startTimeToInitialDisplaySpan();
const moduleValue = require(826) /* metro dependency 826 */;
if (r5) {
if (r8) {
spanToJSON = moduleValue.spanToJSON;
parent_span_id = Reflect.apply(spanToJSON, moduleValue, [r5]).parent_span_id;
moduleValue2 = moduleValue;
spanToJSON = moduleValue2.spanToJSON;
if (parent_span_id === Reflect.apply(spanToJSON, moduleValue2, [r8]).span_id) {
moduleValue3 = require(826) /* metro dependency 826 */;
if (moduleValue3.spanToJSON(r5).timestamp) {
debug = (require(826) /* metro dependency 826 */).debug;
warn = debug.warn;
value = require(826) /* metro dependency 826 */;
Reflect.apply(warn, debug,
['[TimeToDisplay] ' + value.spanToJSON(r5).description + ' span already ended.']);
} else {
value = captureEndFramesAndAttachToSpan(r5);
value = value.then(_fun13287);
value.catch(_fun13288);
}
} else {
(require(826) /* metro dependency 826 */).debug.warn('[TimeToDisplay] Initial display span is not a child of current active span.');
}
} else {
moduleValue.debug.warn('[TimeToDisplay] No active span found to attach ui.load.initial_display to.');
}
} else {
moduleValue.debug.warn('[TimeToDisplay] No span found or created, possibly performance is disabled.');
}
function _fun13287() { // fn#13287, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1323:8989, offset: 0x00de6b87, size: 346 bytes, params: 1, frame: 21
var updateFullDisplaySpanBinding;
let binding = env0_2;
binding.end(env0_0);
binding = env0_2;
const setStatus = binding.setStatus;
const SPAN_STATUS_OK = (Module00826Module).SPAN_STATUS_OK;
Reflect.apply(setStatus, binding, [{code: SPAN_STATUS_OK}]);
const debug = (Module00826Module).debug;
let log = debug.log;
Reflect.apply(log, debug,
['[TimeToDisplay] ' + Module00826Module.spanToJSON(env0_2).description + ' span updated with end timestamp and frame data.']);
if (Reflect.apply(env1_7.has, binding, [env0_1])) {
binding = env1_7;
binding.delete(env0_1);
log = debug.log;
binding = env0_2;
Reflect.apply(log, debug,
['[TimeToDisplay] Updating full display with initial display (' + binding.spanContext().spanId + ') end.']);
updateFullDisplaySpanBinding = updateFullDisplaySpan;
binding = env0_0;
updateFullDisplaySpanBinding(binding, env0_2);
}
moduleValue22.setSpanDurationAsMeasurementOnSpan('time_to_initial_display', env0_2, env0_1);
}
function _fun13288(a0) { // fn#13288, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1323:9422, offset: 0x00de6ce1, size: 298 bytes, params: 2, frame: 19
var updateFullDisplaySpanBinding;
let value = environment.__proto__;
const debug = (Module00826Module).debug;
debug.log('[TimeToDisplay] Failed to capture frame data for initial display span.', a0);
let binding = env0_2;
binding.end(env0_0);
binding = env0_2;
const setStatus = binding.setStatus;
const SPAN_STATUS_OK = (Module00826Module).SPAN_STATUS_OK;
Reflect.apply(setStatus, binding, [{code: SPAN_STATUS_OK}]);
if (Reflect.apply(env1_7.has, binding, [env0_1])) {
binding = env1_7;
binding.delete(env0_1);
log = debug.log;
binding = env0_2;
Reflect.apply(log, debug,
['[TimeToDisplay] Updating full display with initial display (' + binding.spanContext().spanId + ') end.']);
updateFullDisplaySpanBinding = updateFullDisplaySpan;
binding = env0_0;
updateFullDisplaySpanBinding(binding, env0_2);
}
value = require(1164) /* metro dependency 1164 */;
value.setSpanDurationAsMeasurementOnSpan('time_to_initial_display', env0_2, env0_1);
}
}
}
global.__d(_fun13243, 1196, [57, 31, 826, 1197, 1166, 1164,
1009]) /* metro module 1196, dependencies: [57, 31, 826, 1197, 1166, 1164, 1009] */;