/* Metro module 11345; source: modules/messages/native/ChannelLatestMessageLoadingStatsManager.tsx; dependencies: [6, 7, 661, 4878, 2] */ import ClassCallCheck from '../../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */ import CreateClass from '../../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */ import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */ import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */ function _fun86743(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86743, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11531:6, offset: 0x01f9e4a5, size: 188 bytes, params: 8, frame: 20 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); const value = _fun86744(); const Set = global.Set; const value2 = Object.create(Set.prototype, {constructor: {value: Set}}); const set = new Set(); value.seenChannelIds = set instanceof Object ? set : value2; (FileImportTrackerModule).fileFinishedImporting('modules/messages/native/ChannelLatestMessageLoadingStatsManager.tsx'); exports.default = value; function _fun86744() { // fn#86744, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11531:143, offset: 0x01f9e561, size: 109 bytes, params: 1, frame: 15 return CreateClass(ChannelLatestMessageLoadingStatsManager, [{key: 'start', value: function(a0) { var object = {channelId: a0.channelId}; var Date = global.Date; object.startMs = Date.now(); this.latestChannelMessagesLoad = object; }}, {key: 'cancel', value: function() { this.latestChannelMessagesLoad = undefined; }}, {key: 'finish', value: value_86748}]); function ChannelLatestMessageLoadingStatsManager(a0) { // fn#86745, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11531:154, offset: 0x01f9e5ce, size: 36 bytes, params: 2, frame: 13 env1_2(this, ChannelLatestMessageLoadingStatsManager); this.label = a0; } function value_86748(a0) { // fn#86748, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11531:515, offset: 0x01f9e630, size: 204 bytes, params: 2, frame: 18 var value; var seenChannelIds; var value3; var value4; var moduleValue; const latestChannelMessagesLoad = this.latestChannelMessagesLoad; if (latestChannelMessagesLoad != null) { if (latestChannelMessagesLoad.channelId === a0.channelId) { value = global.Date.now(); value -= latestChannelMessagesLoad.startMs; seenChannelIds = ChannelLatestMessageLoadingStatsManager.seenChannelIds; value3 = seenChannelIds.has(a0.channelId); if (!value3) { seenChannelIds = ChannelLatestMessageLoadingStatsManager.seenChannelIds; seenChannelIds.add(a0.channelId); } value4 = environment.__proto__; moduleValue = require(4878) /* metro dependency 4878: Clickstream */; moduleValue.trackClickstream(AnalyticEvents.CHANNEL_LATEST_MESSAGES_LOADED_CLICKSTREAM, {load_duration_ms: value, were_messages_cached: a0.areMessagesCached, is_first_load: !value3}); this.latestChannelMessagesLoad = undefined; } } } } } global.__d(_fun86743, 11345, [6, 7, 661, 4878, 2]) /* metro module 11345, dependencies: [6, 7, 661, 4878, 2] */;