Files
discord-decomp/sources/modules/tti_analytics/native/TTIAnalyticsUtils.tsx
T
2026-07-27 16:20:00 +03:00

678 lines
30 KiB
TypeScript

/* Metro module 4884; source: modules/tti_analytics/native/TTIAnalyticsUtils.tsx; dependencies: [5, 4885, 4107, 1310, 1226, 1379, 691, 661, 5251, 1386, 33, 4092, 5252, 491, 1582, 4008, 4007, 20, 1216, 683, 5253, 4014, 5255, 14, 672, 5256, 4496, 4596, 1962, 2] */
function _fun42801(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#42801, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5062:6, offset: 0x0114274a, size: 609 bytes, params: 8, frame: 21
const env0_0 = require;
const _arrayLikeToArray_42804 = function(a0, a1) {
var r0;
var r1;
var r2;
var value3;
var length;
var value5;
var value = undefined;
var value2 = value == null;
reducibleJoin2: while (true) {
if (value2) {
r0 = value2;
break reducibleJoin2;
}
value3 = value > a0.length;
r0 = value3;
break reducibleJoin2;
}
reducibleJoin4: while (true) {
if (r0) {
length = a0.length;
r1 = length;
break reducibleJoin4;
}
r1 = value;
break reducibleJoin4;
}
value = (0, global.Array)(r1);
var value4 = 0;
if (value4 < r1) {
r2 = value4;
reducibleLoop5: while (true) {
value[r2] = a0[r2];
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
if (value5 < r1) {
r2 = value5;
continue reducibleLoop5;
}
break reducibleLoop5;
}
}
return value;
};
const closure = getDeviceMetadata;
const trackAppUIViewed2 = function() {
return _trackAppUIViewed.apply(this, arguments);
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const cacheStore = importDefault(4885) /* metro dependency 4885: CacheStore */;
const experimentStore = importDefault(4107) /* metro dependency 4107: ExperimentStore */;
const themeStore = importDefault(1310) /* metro dependency 1310: ThemeStore */;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const developerOptionsStore = importDefault(691) /* metro dependency 691: DeveloperOptionsStore */;
const env0_10 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
const env0_11 = (require(5251) /* metro dependency 5251: AcceptInviteConstants */).ACCEPT_INVITE_MODAL_KEY;
const env0_12 = (require(1386) /* metro dependency 1386: ChannelConstants */).StaticChannelRoutes;
const env0_13 = (require(33) /* metro dependency 33 */).jsx;
const env0_15 = (require(491) /* metro dependency 491 */).v4();
value = importAll(1582) /* metro dependency 1582: ClientInfoUtils */;
const getConstants = value.getConstants;
const env0_16 = Reflect.apply(getConstants, value, []).Manifest;
let Set = global.Set;
let set = new Set(['private_channel', 'guild-forum', 'guild-directory', 'guild-text', 'thread', 'redesign-guilds',
'redesign-messages']);
Set = global.Set;
set = new Set(['friends_list', 'guild-voice', 'redesign-guild-voice', 'unknown-channel', 'redesign-unknown-channel',
'channel-list', 'other']);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/tti_analytics/native/TTIAnalyticsUtils.tsx');
exports.getDeviceMetadata = closure;
exports.currentLoadId = currentLoadId;
exports.trackAppOpened = trackAppOpened;
exports.trackAppUIViewed = trackAppUIViewed;
exports.getLastTrackedAppUiViewed2Properties = getLastTrackedAppUiViewed2Properties;
exports.trackAppLaunchCompleted = trackAppLaunchCompleted;
}
function _createForOfIteratorHelperLoose_42802(a0, a1) { // fn#42802, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5062:286, offset: 0x011429ab, size: 370 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun42803;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_42804(a0, value);
r5 = value;
} else {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
value = _arrayLikeToArray_42804(a0, value);
r6 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_42804(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun42803;
}
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
}
function getDeviceMetadata() { // fn#42805, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5062:1207, offset: 0x01142b1d, size: 272 bytes, params: 1, frame: 16
var object2;
if (env0_14 == null) {
object2 = {};
object2.device_model = (require(4092) /* metro dependency 4092: DeviceUtils */).getDeviceModel();
object2.device_brand = (require(4092) /* metro dependency 4092: DeviceUtils */).getDeviceBrand();
object2.device_product = (require(4092) /* metro dependency 4092: DeviceUtils */).getDeviceProduct();
object2.device_manufacturer = (require(4092) /* metro dependency 4092: DeviceUtils */).getDeviceManufacturer();
object2.smallest_screen_width = (require(4092) /* metro dependency 4092: DeviceUtils */).getSmallestScreenWidth();
object2.device_performance_class = (importDefault(5252) /* metro dependency 5252: getMediaPerformanceClassAndroid */)();
object2.soc_name = (require(4092) /* metro dependency 4092: DeviceUtils */).getSocName();
object2.ram_size = (require(4092) /* metro dependency 4092: DeviceUtils */).getRamSize();
object2.max_cpu_freq = (require(4092) /* metro dependency 4092: DeviceUtils */).getMaxCpuFreq();
env0_14 = object2;
}
return env0_14;
}
function getRedesignScreenName() { // fn#42806, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5062:1953, offset: 0x01142c2d, size: 355 bytes, params: 1, frame: 17
var r6;
var r5;
var r4;
var r2;
var value;
const value2 = undefined;
const rootNavigationRef = (require(4008) /* metro dependency 4008: RootNavigationRefNative */).getRootNavigationRef();
let r3 = rootNavigationRef != null && rootNavigationRef.isReady() ? rootNavigationRef.getCurrentRoute() : value2;
if (r3 == null) {
return null;
}
const navigationRouteUtilsNativeModule = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
if (navigationRouteUtilsNativeModule.isModalOpen(ACCEPT_INVITE_MODAL_KEY)) {
return 'invite';
}
const name = r3.name;
const params = r3.params;
const channelId = params == null ? value2 : params.channelId;
if (name === 'channel') {
if (channelId != null) {
if (StaticChannelRoutes.has(channelId)) {
return channelId;
}
value = ChannelStore.getChannel(channelId);
if (value != null) {
if (value.isThread()) {
r3 = 'thread';
} else {
if (value.isPrivate()) {
r4 = 'private_channel';
} else {
if (value.isGuildVocal()) {
r5 = 'guild-voice';
} else {
if (value.isForumLikeChannel()) {
r6 = 'guild-forum';
} else {
value = value.isDirectory();
r6 = value ? 'guild-directory' : 'guild-text';
}
r5 = r6;
}
r4 = r5;
}
r3 = r4;
}
r2 = r3;
} else {
r2 = 'unknown-channel';
}
return r2;
}
}
return 'redesign-' + name;
}
function sharedProperties(a0, a1, a2) { // fn#42807, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5062:2490, offset: 0x01142d90, size: 96 bytes, params: 4, frame: 11
const object2 = {};
object2.load_id = env0_15;
const Date = global.Date;
object2.duration_ms_since_app_opened = Date.now() - a2;
object2.screen_name = a0;
object2.has_cached_data = a1;
const Manifest2 = Manifest.length > 0 ? Manifest : null;
object2.manifest = Manifest2;
return object2;
}
function _trackAppUIViewedAsync() { // fn#42808, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5062:2642, offset: 0x01142df0, size: 48 bytes, params: 1, frame: 14
return env0_3(_fun42810).apply(this, arguments);
}
function _logLegacyAppUiViewed() { // fn#42818, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5062:3756, offset: 0x011431c7, size: 48 bytes, params: 1, frame: 14
return env0_3(_fun42820).apply(this, arguments);
}
function _trackAppUIViewed() { // fn#42822, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5062:4471, offset: 0x0114337f, size: 48 bytes, params: 1, frame: 14
return env0_3(_fun42824).apply(this, arguments);
}
function batchKeys(a0) { // fn#42832, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5062:6316, offset: 0x01143928, size: 137 bytes, params: 2, frame: 22
var r5;
var r10;
var object2;
var _createForOfIteratorHelperLoose_42802Binding;
var slice;
var value4;
var value5;
var value6;
var done;
var value7;
var value8;
var push;
const Object = global.Object;
const value = Object.keys(a0);
const items2 = [];
let length = value.length;
const value2 = 0;
if (value2 < length) {
r5 = value2;
reducibleLoop1: while (true) {
object2 = {};
_createForOfIteratorHelperLoose_42802Binding = _createForOfIteratorHelperLoose_42802;
slice = value.slice;
value4 = r5 + 10;
value5 = _createForOfIteratorHelperLoose_42802Binding(Reflect.apply(slice, value, [r5, value4]));
value6 = value5();
done = value6.done;
if (!done) {
r10 = value6;
reducibleLoop2: while (true) {
value7 = r10.value;
object2[value7] = a0[value7];
value8 = value5();
done = value8.done;
if (done) {
break reducibleLoop2;
}
r10 = value8;
continue reducibleLoop2;
}
}
push = items2.push;
Reflect.apply(push, items2, [object2]);
length = value.length;
if (value4 < length) {
r5 = value4;
continue reducibleLoop1;
}
break reducibleLoop1;
}
}
return items2;
}
function _trackAppLaunchCompletedAsync() { // fn#42833, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5062:6515, offset: 0x011439b1, size: 48 bytes, params: 1, frame: 14
return env0_3(_fun42835).apply(this, arguments);
}
function currentLoadId() { // fn#42836, offset: 0x01143a6b, size: 9 bytes, params: 1, frame: 1
return env0_15;
}
function trackAppOpened(a0) { // fn#42837, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5062:6972, offset: 0x01143a74, size: 205 bytes, params: 2, frame: 20
var object2;
(importDefault(20) /* metro dependency 20: AppStartPerformance */).mark('🏃', 'Track app_opened');
(importDefault(1216) /* metro dependency 1216: SentryUtilsNative */).addBreadcrumb({'category': 'lifecycle',
'message': 'App opened', data: {openFrom: a0}});
const defaultImport3 = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport3.track;
const APP_OPENED = AnalyticEvents.APP_OPENED;
object2 = {};
copyDataProperties(object2, getDeviceMetadata(), undefined);
object2['opened_from'] = a0;
object2['load_id'] = env0_15;
object2['theme'] = ThemeStore.theme;
Reflect.apply(track, defaultImport3, [APP_OPENED, object2, {logEventProperties: true}]);
}
function trackAppUIViewed() { // fn#42838, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5062:7266, offset: 0x01143b41, size: 111 bytes, params: 1, frame: 17
const value = a0;
const value2 = a1;
const value3 = a2;
const r4 = value !== undefined ? value : getRedesignScreenName();
const r3 = value2 !== undefined ? value2 : {};
const r2 = value3 !== undefined ? value3 : CacheStore.hasCache();
const AppStartInfo = (require(5253) /* metro dependency 5253: AppStartInfoAndroid */).AppStartInfo;
const getAppUIViewed = AppStartInfo.getAppUIViewed;
if (!Reflect.apply(getAppUIViewed, AppStartInfo, [])) {
(function() {
return _trackAppUIViewedAsync.apply(this, arguments);
})(r4, r3, r2);
}
}
function getLastTrackedAppUiViewed2Properties() { // fn#42840, offset: 0x01143bce, size: 9 bytes, params: 1, frame: 1
return env0_21;
}
function trackAppLaunchCompleted() { // fn#42841, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5062:7599, offset: 0x01143bd7, size: 133 bytes, params: 1, frame: 17
const value = a0;
const value2 = a1;
if (!env0_17) {
(importDefault(20) /* metro dependency 20: AppStartPerformance */).mark('🏃', 'Track app_launch');
(function() {
return _trackAppLaunchCompletedAsync.apply(this, arguments);
})((value !== undefined ? value : getRedesignScreenName()) ?? 'unknown',
value2 !== undefined ? value2 : CacheStore.hasCache());
}
}
function* _fun42810(a0, a1, a2) { // fn#42810, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5062:2709, offset: 0x01142e29, size: 308 bytes, params: 4, frame: 24
if (true) {
var env0_0 = a0;
var env0_1 = a1;
var env0_2 = a2;
var Date = global.Date;
value = Date.now();
var binding = env2_1;
var value4 = binding(env2_2[21]);
var getAppFirstVisibleTimestamp = value4.getAppFirstVisibleTimestamp;
yield Reflect.apply(getAppFirstVisibleTimestamp, value4, []);
var value5 = undefined;
if (false) {
return value5;
}
value -= value5;
binding = env2_1;
var binding2 = env2_2;
binding(binding2[21]).reportFullyDrawn();
binding(binding2[17]).mark('❗', 'Track app_ui_viewed');
binding(binding2[17]).addDetail('TTI', value);
binding(binding2[17]).markAt('🏃', 'app_opened', value5);
env2_0(binding2[22]).ttiRecorded(value);
global.setTimeout(_fun42811, 1000);
scheduleTrackAppUiViewed2();
}
}
function* _fun42820(a0, a1, a2, a3, a4) { // fn#42820, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5062:3821, offset: 0x01143200, size: 383 bytes, params: 6, frame: 25
if (true) {
value = environment.__proto__.__proto__;
var value3 = env2_26(a0, a2, a4);
var binding = env2_1;
var value4 = binding(env2_2[21]);
var getJSBundleTimestamps = value4.getJSBundleTimestamps;
yield Reflect.apply(getJSBundleTimestamps, value4, []);
var value5 = undefined;
if (false) {
return value5;
}
var JSBundleLoadedTimestamp = value5.JSBundleLoadedTimestamp;
var JSBundleParsedTimestamp = value5.JSBundleParsedTimestamp;
binding = env2_1;
var binding2 = env2_2;
binding(binding2[17]).markAt('🏃', 'JS Bundle Loaded', JSBundleLoadedTimestamp);
binding(binding2[17]).mark('🏃', 'app_ui_viewed logged');
binding(binding2[17]).addDetail('Since Bundle Parsed', Number(a3 - JSBundleParsedTimestamp));
var value10 = binding(binding2[17]);
var Date = global.Date;
value10.endTime = Date.now() + 20000;
var value12 = binding(binding2[19]);
var track = value12.track;
var APP_UI_VIEWED = env2_10.APP_UI_VIEWED;
var object2 = {};
copyDataProperties(object2, value3, undefined);
copyDataProperties(object2, env2_24(), undefined);
object2['duration_ms_since_required_js_bundle_loaded'] = a3 - JSBundleLoadedTimestamp;
object2['duration_ms_since_required_js_bundle_parsed'] = a3 - JSBundleParsedTimestamp;
object2['theme'] = env2_6.theme;
copyDataProperties(object2, a1, undefined);
Reflect.apply(track, value12, [APP_UI_VIEWED, object2, {logEventProperties: true}]);
}
}
function* _fun42824() { // fn#42824, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5062:4528, offset: 0x011433b8, size: 580 bytes, params: 1, frame: 25
var value18;
let value = undefined;
if (true) {
value = undefined;
var env0_0;
var value4 = env2_25();
var value5 = null;
var r12 = value5 != value4 ? value4 : 'unknown';
var binding = env2_0;
var AppStartInfo = binding(env2_2[20]).AppStartInfo;
var getAppStartInfo = AppStartInfo.getAppStartInfo;
yield Reflect.apply(getAppStartInfo, AppStartInfo, []);
var value7 = undefined;
if (false) {
return value7;
}
env0_0 = value7.appCreatedTime;
var appFirstVisibleTime = value7.appFirstVisibleTime;
var extraProperties = value7.extraProperties;
binding = env2_1;
var allNativeTimestamps = binding(env2_2[21]).getAllNativeTimestamps();
yield allNativeTimestamps.then(_fun42825);
if (false) {
return undefined;
}
binding = env2_1;
var cumulativeCPUUsage = binding(env2_2[25]).getCumulativeCPUUsage();
var usage = value5 == cumulativeCPUUsage ? value : cumulativeCPUUsage.usage;
var r11 = value5 != usage ? usage : value5;
var object2 = {};
copyDataProperties(object2, env2_24(), undefined);
copyDataProperties(object2, value5 != extraProperties ? extraProperties : {}, undefined);
binding = env2_1;
var binding2 = env2_2;
var value15 = binding(binding2[23]);
copyDataProperties(object2, value15.serializeTTITracker(appFirstVisibleTime), undefined);
object2['load_id'] = env2_15;
object2['screen_name'] = r12;
object2['has_cached_data'] = env2_4.hasCache();
object2['startup_cpu_usage_cumulative'] = r11;
object2['theme'] = env2_6.theme;
binding(binding2[17]).mark('❗', 'Track app_ui_viewed2');
var value17 = binding(binding2[19]);
var track = value17.track;
var APP_UI_VIEWED2 = env2_10.APP_UI_VIEWED2;
Reflect.apply(track, value17, [APP_UI_VIEWED2, object2, {logEventProperties: true}]);
if (env2_9.alertStartupMetrics) {
value18 = env2_1(env2_2[26]);
value18.openLazy({importer: importer_42826});
}
binding = env2_1;
var value19 = binding(env2_2[21]);
if (value19.runningTTIAutomation()) {
logToDevice(object2);
}
}
return value;
}
function* _fun42835(a0, a1) { // fn#42835, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5062:6596, offset: 0x011439ea, size: 129 bytes, params: 3, frame: 19
if (true) {
value = environment.__proto__.__proto__;
var binding = env2_26;
var value3 = env2_1(env2_2[21]);
var getAppFirstVisibleTimestamp = value3.getAppFirstVisibleTimestamp;
yield Reflect.apply(getAppFirstVisibleTimestamp, value3, []);
var value4 = undefined;
if (false) {
return value4;
}
var value6 = binding(a0, a1, value4);
var value7 = env2_1(env2_2[19]);
var track = value7.track;
var APP_LAUNCH_COMPLETED = env2_10.APP_LAUNCH_COMPLETED;
Reflect.apply(track, value7, [APP_LAUNCH_COMPLETED, value6, {logEventProperties: true}]);
}
}
function _fun42811() { // fn#42811, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5062:2976, offset: 0x01142f5d, size: 65 bytes, params: 1, frame: 19
logLegacyAppUiViewed(env0_0 ?? 'unknownn', require, importDefault, env0_3, env0_4);
}
function scheduleTrackAppUiViewed2() { // fn#42813, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5062:3103, offset: 0x01142fbc, size: 113 bytes, params: 1, frame: 17
var environment;
const value = environment.__proto__.__proto__.__proto__;
if (env3_20 == null) {
var setTimeout = global.setTimeout;
var binding = env3_1;
var binding2 = env3_2;
var Millis = binding(binding2[24]).Millis;
var SECOND = Millis.SECOND;
env3_20 = setTimeout(_fun42814, 15 * SECOND);
binding(binding2[23]).setTTICallback(_fun42816);
}
}
function _fun42825(a0) { // fn#42825, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5062:4757, offset: 0x011435fc, size: 79 bytes, params: 2, frame: 15
let value = environment.__proto__.__proto__.__proto__;
const binding = env3_1;
const binding2 = env3_2;
binding(binding2[17]).logGroups[0].nativeLogs = a0;
value = binding(binding2[23]);
value.processNativeLogs(a0, appCreatedTime);
}
function importer_42826() { // fn#42826, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5062:5253, offset: 0x0114364b, size: 62 bytes, params: 1, frame: 13
var environment;
let value = environment.__proto__.__proto__.__proto__;
const binding = env3_0;
const binding2 = env3_2;
value = binding(binding2[28]);
value = value(binding2[27], binding2.paths);
return value.then(function({default: env0_0}) {
return _fun42828;
});
}
function logToDevice(a0) { // fn#42829, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5062:5843, offset: 0x01143773, size: 235 bytes, params: 2, frame: 18
var environment;
const object2 = {};
copyDataProperties(object2, a0, undefined);
let Date = global.Date;
object2['logged_at'] = Date.now();
value = environment.__proto__.__proto__.__proto__;
let binding = env3_7;
object2['user_id'] = binding.getId();
Date = global.Date;
const value3 = Date.now();
binding = env3_31;
binding(object2).forEach(_fun42830);
const env0_0 = typeof value3 === 'bigint' ? value3 + 1n : +value3 + 1;
const binding2 = env3_5;
const getAllExperimentAssignments = binding2.getAllExperimentAssignments;
binding(Reflect.apply(getAllExperimentAssignments, binding2, [])).forEach(_fun42831);
const JSON = global.JSON;
const value6 = JSON.stringify({type: 'finished'});
binding = env3_1;
const binding3 = env3_2;
binding(binding3[21]).logToDevice(value6);
binding(binding3[21]).trackTTILogged();
}
function _fun42814() { // fn#42814, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5062:3172, offset: 0x0114302d, size: 59 bytes, params: 1, frame: 13
env4_1(env4_2[23]).setTTICallback(function() {
return true;
});
env4_29();
}
function _fun42816() { // fn#42816, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5062:3295, offset: 0x01143068, size: 330 bytes, params: 1, frame: 19
var environment;
var r3;
var r0;
var r1;
var binding;
var readySupplemental;
var hasData2;
var hasData3;
var hasData4;
const value = environment.__proto__.__proto__.__proto__.__proto__;
const value2 = env4_25();
const value3 = false;
if (value2 == null) {
r1 = value3;
} else {
binding = env4_19;
if (binding.has(value2)) {
readySupplemental = env4_1(env4_2[23]).readySupplemental;
if (readySupplemental.hasData()) {
if (env4_18.has(value2)) {
hasData2 = env4_1(env4_2[23]).readySupplemental.hasData();
if (hasData2) {
hasData3 = env4_1(env4_2[23]).firstContentfulPaint.hasData();
if (hasData3) {
r3 = !!hasData3;
} else {
hasData4 = env4_1(env4_2[23]).renderLatestMessages.hasData();
r3 = hasData4 ? !!hasData4 : env4_1(env4_2[23]).interstitial != null;
}
r0 = r3;
} else {
r0 = !!hasData2;
}
r1 = r0;
} else {
r1 = true;
}
} else {
r1 = value3;
}
} else if (env4_18.has(value2)) {
hasData2 = env4_1(env4_2[23]).readySupplemental.hasData();
if (hasData2) {
hasData3 = env4_1(env4_2[23]).firstContentfulPaint.hasData();
if (hasData3) {
r3 = !!hasData3;
} else {
hasData4 = env4_1(env4_2[23]).renderLatestMessages.hasData();
r3 = hasData4 ? !!hasData4 : env4_1(env4_2[23]).interstitial != null;
}
r0 = r3;
} else {
r0 = !!hasData2;
}
r1 = r0;
} else {
r1 = true;
}
}
if (r1) {
global.clearTimeout(env4_20);
global.setTimeout(_fun42817, 1000);
r0 = true;
} else {
r0 = !!r1;
}
return r0;
}
function _fun42827({default: env0_0}) { // fn#42827, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5062:5288, offset: 0x01143689, size: 21 bytes, params: 2, frame: 2
return _fun42828;
}
function _fun42830(a0) { // fn#42830, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5062:5954, offset: 0x0114385e, size: 102 bytes, params: 2, frame: 14
const JSON = global.JSON;
const stringify = JSON.stringify;
const object2 = {};
copyDataProperties(object2, a0, undefined);
object2['type'] = 'app_ui_viewed';
object2['batch_id'] = env0_0;
env4_1(env4_2[21]).logToDevice(Reflect.apply(stringify, JSON, [object2]));
}
function _fun42831(a0) { // fn#42831, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5062:6103, offset: 0x011438c4, size: 100 bytes, params: 2, frame: 14
const JSON = global.JSON;
const stringify = JSON.stringify;
const object2 = {};
copyDataProperties(object2, a0, undefined);
object2['batch_id'] = env0_0;
object2['type'] = 'experiments';
env4_1(env4_2[21]).logToDevice(Reflect.apply(stringify, JSON, [object2]));
}
function _fun42817() { // fn#42817, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5062:3660, offset: 0x011431b2, size: 21 bytes, params: 1, frame: 10
env5_29();
}
function _fun42828(a0) { // fn#42828, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5062:5303, offset: 0x0114369e, size: 213 bytes, params: 2, frame: 36
let value = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
const binding = env5_13;
const binding2 = env0_0;
const object2 = {title: 'App start times'};
value = environment.__proto__.__proto__;
const time_first_contentful_paint = env2_1.time_first_contentful_paint;
const time_before_js_bundle_start = env2_1.time_before_js_bundle_start;
object2.body = ('\nFirstContentfulPaint (TTI): ' + time_first_contentful_paint + 'ms\n • App start → JS bundle start: ' + time_before_js_bundle_start + 'ms\n • MainAppl. → MainActivity start: ' + env2_1.android_time_creation_to_create_main_activity + 'ms\n • Start type: ' + env2_1.app_start_type + '\n • Launch scenario: ' + (env2_1.app_launch_scenario ?? '-') + '\n(legacy) Cached msg render: ' + env2_1.time_display_messages_with_cache_end + 'ms\n ').trimStart();
copyDataProperties(object2, a0, time_before_js_bundle_start);
return binding(binding2, object2);
}