698 lines
36 KiB
TypeScript
698 lines
36 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] */
|
|
import Module00005 from '../../../by-id/module-00005.js'; /* Metro dependency 5 */
|
|
import AppStartPerformance from '../../../external/discord_common/js/packages/app-start-performance/AppStartPerformance.tsx'; /* Metro dependency 20 */
|
|
import AnalyticsUtils from '../../../utils/AnalyticsUtils.tsx'; /* Metro dependency 683 */
|
|
import DeveloperOptionsStore from '../../../stores/DeveloperOptionsStore.tsx'; /* Metro dependency 691 */
|
|
import SentryUtilsNative from '../../../utils/SentryUtils.native.tsx'; /* Metro dependency 1216 */
|
|
import AuthenticationStore from '../../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */
|
|
import ThemeStore from '../../user_settings/ThemeStore.tsx'; /* Metro dependency 1310 */
|
|
import ChannelStore from '../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
|
|
import ExperimentStore from '../../experiments/ExperimentStore.tsx'; /* Metro dependency 4107 */
|
|
import CacheStore from '../../cache/CacheStore.tsx'; /* Metro dependency 4885 */
|
|
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
|
|
import * as Module00491Module from '../../../by-id/module-00491.js'; /* Metro dependency 491 */
|
|
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
|
|
import * as ChannelConstantsModule from '../../channel/ChannelConstants.tsx'; /* Metro dependency 1386 */
|
|
import * as NavigationRouteUtilsNativeModule from '../../main_tabs_v2/helpers/NavigationRouteUtils.native.tsx'; /* Metro dependency 4007 */
|
|
import * as RootNavigationRefNativeModule from '../../main_tabs_v2/RootNavigationRef.native.tsx'; /* Metro dependency 4008 */
|
|
import * as AcceptInviteConstantsModule from '../../accept_invite/native/AcceptInviteConstants.tsx'; /* Metro dependency 5251 */
|
|
import * as AppStartInfoAndroidModule from './AppStartInfo.android.tsx'; /* Metro dependency 5253 */
|
|
|
|
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 getDeviceMetadata2 = getDeviceMetadata;
|
|
const trackAppUIViewed2 = function() {
|
|
return _trackAppUIViewed.apply(this, arguments);
|
|
};
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_15 = (Module00491Module).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']);
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/tti_analytics/native/TTIAnalyticsUtils.tsx');
|
|
exports.getDeviceMetadata = getDeviceMetadata2;
|
|
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 _fun42803() { // fn#42803, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5062:857, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
|
|
return env0_1 >= env0_0.length ? {done: true} : {done: false,
|
|
value: env0_0[typeof env0_1 === 'bigint' ? env0_1 : +env0_1]};
|
|
}
|
|
|
|
}
|
|
|
|
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 object3;
|
|
var object;
|
|
if (object3 == null) {
|
|
object = {};
|
|
object.device_model = (require(4092) /* metro dependency 4092: DeviceUtils */).getDeviceModel();
|
|
object.device_brand = (require(4092) /* metro dependency 4092: DeviceUtils */).getDeviceBrand();
|
|
object.device_product = (require(4092) /* metro dependency 4092: DeviceUtils */).getDeviceProduct();
|
|
object.device_manufacturer = (require(4092) /* metro dependency 4092: DeviceUtils */).getDeviceManufacturer();
|
|
object.smallest_screen_width = (require(4092) /* metro dependency 4092: DeviceUtils */).getSmallestScreenWidth();
|
|
object.device_performance_class = (importDefault(5252) /* metro dependency 5252: getMediaPerformanceClassAndroid */)();
|
|
object.soc_name = (require(4092) /* metro dependency 4092: DeviceUtils */).getSocName();
|
|
object.ram_size = (require(4092) /* metro dependency 4092: DeviceUtils */).getRamSize();
|
|
object.max_cpu_freq = (require(4092) /* metro dependency 4092: DeviceUtils */).getMaxCpuFreq();
|
|
object3 = object;
|
|
}
|
|
return object3;
|
|
}
|
|
|
|
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 = (RootNavigationRefNativeModule).getRootNavigationRef();
|
|
let r3 = rootNavigationRef != null && rootNavigationRef.isReady() ? rootNavigationRef.getCurrentRoute() : value2;
|
|
if (r3 == null) {
|
|
return null;
|
|
}
|
|
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 object = {};
|
|
object.load_id = env0_15;
|
|
const Date = global.Date;
|
|
object.duration_ms_since_app_opened = Date.now() - a2;
|
|
object.screen_name = a0;
|
|
object.has_cached_data = a1;
|
|
const Manifest2 = Manifest.length > 0 ? Manifest : null;
|
|
object.manifest = Manifest2;
|
|
return object;
|
|
}
|
|
|
|
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 Module00005(_fun42810).apply(this, arguments);
|
|
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 _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, Module00005, env0_4);
|
|
function logLegacyAppUiViewed() { // fn#42812, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5062:2982, offset: 0x01142f9e, size: 30 bytes, params: 1, frame: 13
|
|
return env4_28.apply(this, arguments);
|
|
}
|
|
|
|
}
|
|
|
|
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 _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 _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 _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 Module00005(_fun42820).apply(this, arguments);
|
|
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 object = {};
|
|
copyDataProperties(object, value3, undefined);
|
|
copyDataProperties(object, env2_24(), undefined);
|
|
object['duration_ms_since_required_js_bundle_loaded'] = a3 - JSBundleLoadedTimestamp;
|
|
object['duration_ms_since_required_js_bundle_parsed'] = a3 - JSBundleParsedTimestamp;
|
|
object['theme'] = env2_6.theme;
|
|
copyDataProperties(object, a1, undefined);
|
|
Reflect.apply(track, value12, [APP_UI_VIEWED, object, {logEventProperties: true}]);
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
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 Module00005(_fun42824).apply(this, arguments);
|
|
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 object = {};
|
|
copyDataProperties(object, env2_24(), undefined);
|
|
copyDataProperties(object, value5 != extraProperties ? extraProperties : {}, undefined);
|
|
binding = env2_1;
|
|
var binding2 = env2_2;
|
|
var value15 = binding(binding2[23]);
|
|
copyDataProperties(object, value15.serializeTTITracker(appFirstVisibleTime), undefined);
|
|
object['load_id'] = env2_15;
|
|
object['screen_name'] = r12;
|
|
object['has_cached_data'] = env2_4.hasCache();
|
|
object['startup_cpu_usage_cumulative'] = r11;
|
|
object['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, object, {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(object);
|
|
}
|
|
}
|
|
return value;
|
|
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 _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 _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 object = {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;
|
|
object.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(object, a0, time_before_js_bundle_start);
|
|
return binding(binding2, object);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
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 object = {};
|
|
copyDataProperties(object, a0, undefined);
|
|
let Date = global.Date;
|
|
object['logged_at'] = Date.now();
|
|
value = environment.__proto__.__proto__.__proto__;
|
|
let binding = env3_7;
|
|
object['user_id'] = binding.getId();
|
|
Date = global.Date;
|
|
const value3 = Date.now();
|
|
binding = env3_31;
|
|
binding(object).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 _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 object = {};
|
|
copyDataProperties(object, a0, undefined);
|
|
object['type'] = 'app_ui_viewed';
|
|
object['batch_id'] = env0_0;
|
|
env4_1(env4_2[21]).logToDevice(Reflect.apply(stringify, JSON, [object]));
|
|
}
|
|
|
|
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 object = {};
|
|
copyDataProperties(object, a0, undefined);
|
|
object['batch_id'] = env0_0;
|
|
object['type'] = 'experiments';
|
|
env4_1(env4_2[21]).logToDevice(Reflect.apply(stringify, JSON, [object]));
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
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 object;
|
|
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) {
|
|
object = {};
|
|
_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;
|
|
object[value7] = a0[value7];
|
|
value8 = value5();
|
|
done = value8.done;
|
|
if (done) {
|
|
break reducibleLoop2;
|
|
}
|
|
r10 = value8;
|
|
continue reducibleLoop2;
|
|
}
|
|
}
|
|
push = items2.push;
|
|
Reflect.apply(push, items2, [object]);
|
|
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 Module00005(_fun42835).apply(this, arguments);
|
|
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 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
|
|
(AppStartPerformance).mark('🏃', 'Track app_opened');
|
|
(SentryUtilsNative).addBreadcrumb({'category': 'lifecycle',
|
|
'message': 'App opened', data: {openFrom: a0}});
|
|
const defaultImport3 = AnalyticsUtils;
|
|
const track = defaultImport3.track;
|
|
const APP_OPENED = AnalyticEvents.APP_OPENED;
|
|
object = {};
|
|
copyDataProperties(object, getDeviceMetadata(), undefined);
|
|
object['opened_from'] = a0;
|
|
object['load_id'] = env0_15;
|
|
object['theme'] = ThemeStore.theme;
|
|
Reflect.apply(track, defaultImport3, [APP_OPENED, object, {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 = (AppStartInfoAndroidModule).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());
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun42801, 4884, [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]) /* metro module 4884, 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] */;
|