171 lines
9.3 KiB
TypeScript
171 lines
9.3 KiB
TypeScript
/* Metro module 9963; source: modules/game_profile/GameProfileAnalyticUtils.tsx; dependencies: [9570, 661, 9588, 491, 683, 2] */
|
|
import AnalyticsUtils from '../../utils/AnalyticsUtils.tsx'; /* Metro dependency 683 */
|
|
import ContentInventoryStore from '../content_inventory/ContentInventoryStore.tsx'; /* Metro dependency 9570 */
|
|
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as Module00491Module from '../../by-id/module-00491.js'; /* Metro dependency 491 */
|
|
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
|
|
import * as ContentInventoryConstantsModule from '../content_inventory/ContentInventoryConstants.tsx'; /* Metro dependency 9588 */
|
|
|
|
function _fun78003(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78003, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10149:6, offset: 0x01e156a8, size: 1308 bytes, params: 8, frame: 20
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
object = {FollowGame: 0};
|
|
object[0] = 'FollowGame';
|
|
object.UnfollowGame = 1;
|
|
object[1] = 'UnfollowGame';
|
|
object.ClickMessageUser = 2;
|
|
object[2] = 'ClickMessageUser';
|
|
object.SendMessageUser = 3;
|
|
object[3] = 'SendMessageUser';
|
|
object.JoinVC = 4;
|
|
object[4] = 'JoinVC';
|
|
object.WatchStream = 5;
|
|
object[5] = 'WatchStream';
|
|
object.ClickSimilarGame = 6;
|
|
object[6] = 'ClickSimilarGame';
|
|
object.WebsiteLink = 7;
|
|
object[7] = 'WebsiteLink';
|
|
object.XLink = 8;
|
|
object[8] = 'XLink';
|
|
object.YouTubeLink = 9;
|
|
object[9] = 'YouTubeLink';
|
|
object.ShowMore = 10;
|
|
object[10] = 'ShowMore';
|
|
object.ShowLess = 11;
|
|
object[11] = 'ShowLess';
|
|
object.JoinServer = 12;
|
|
object[12] = 'JoinServer';
|
|
object.ClickImage = 13;
|
|
object[13] = 'ClickImage';
|
|
object.GameShop = 14;
|
|
object[14] = 'GameShop';
|
|
object.LinkAccount = 15;
|
|
object[15] = 'LinkAccount';
|
|
object.ClaimGame = 16;
|
|
object[16] = 'ClaimGame';
|
|
object.FacebookLink = 17;
|
|
object[17] = 'FacebookLink';
|
|
object.InstagramLink = 18;
|
|
object[18] = 'InstagramLink';
|
|
object.BlueskyLink = 19;
|
|
object[19] = 'BlueskyLink';
|
|
object.RedditLink = 20;
|
|
object[20] = 'RedditLink';
|
|
object.TwitchLink = 21;
|
|
object[21] = 'TwitchLink';
|
|
object.SteamStoreLink = 22;
|
|
object[22] = 'SteamStoreLink';
|
|
object.EpicStoreLink = 23;
|
|
object[23] = 'EpicStoreLink';
|
|
object.RobloxStoreLink = 24;
|
|
object[24] = 'RobloxStoreLink';
|
|
object.BattlenetStoreLink = 25;
|
|
object[25] = 'BattlenetStoreLink';
|
|
object.RiotStoreLink = 26;
|
|
object[26] = 'RiotStoreLink';
|
|
object.MinecraftStoreLink = 27;
|
|
object[27] = 'MinecraftStoreLink';
|
|
object.DiscordCollectiblesShop = 28;
|
|
object[28] = 'DiscordCollectiblesShop';
|
|
object.DiscordCollectiblesShopItem = 29;
|
|
object[29] = 'DiscordCollectiblesShopItem';
|
|
object.GameShopItem = 30;
|
|
object[30] = 'GameShopItem';
|
|
object.SteamReviews = 31;
|
|
object[31] = 'SteamReviews';
|
|
object.OpenCriticReviews = 32;
|
|
object[32] = 'OpenCriticReviews';
|
|
object.Announcements = 33;
|
|
object[33] = 'Announcements';
|
|
object.AnnouncementsItem = 34;
|
|
object[34] = 'AnnouncementsItem';
|
|
object.CloudPlay = 35;
|
|
object[35] = 'CloudPlay';
|
|
object.ClickTrailer = 36;
|
|
object[36] = 'ClickTrailer';
|
|
object.Feedback = 37;
|
|
object[37] = 'Feedback';
|
|
object.XboxGamePassStoreLink = 38;
|
|
object[38] = 'XboxGamePassStoreLink';
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/game_profile/GameProfileAnalyticUtils.tsx');
|
|
exports.GameProfileTrackActionActions = object;
|
|
exports.GameProfileSources = {ActivityCard: 'activity_card', ActivityCardContextMenu: 'activity_card_context_menu',
|
|
UserProfile: 'user_profile', UserProfileCardContextMenu: 'user_profile_card_context_menu',
|
|
SimilarGames: 'similar_games', DevTools: 'dev_tools', Embed: 'embed', RtcPanel: 'rtc_panel',
|
|
FriendsActivityFeed: 'friends_activity_feed', MiniGameProfile: 'mini_game_profile', GameMention: 'game_mention',
|
|
GameSheet: 'game_sheet', QuestBar: 'quest_bar', QuestHome: 'quest_home_desktop',
|
|
QuestInGameModal: 'quest_in_game_modal', QuestActivityPanel: 'quest_activity_panel', QuestEmbed: 'quest_embed',
|
|
QuestLiveStream: 'quest_live_stream', ClipEmbed: 'clip_embed', ClipsReminder: 'clips_reminder',
|
|
AnnouncementChannelReturn: 'announcement_channel_return', CallTile: 'call_tile',
|
|
InAppBrowserReturn: 'in_app_browser_return', Deeplink: 'deeplink', DmHeaderActivity: 'dm_header_activity'};
|
|
exports.GameProfileTypes = {FullProfile: 'full_profile', MiniProfile: 'mini_profile'};
|
|
exports.getGuildIdAndVerifiedFromInvite = function(a0) {
|
|
var r4;
|
|
var object = {};
|
|
var value = null;
|
|
var value2 = undefined;
|
|
r4 = value == a0 || value == a0.guild ? value2 : a0.guild.id;
|
|
var r2 = value != r4 ? r4 : value;
|
|
object.guildId = r2;
|
|
r2 = value == a0 || value == a0.guild ? value2 : a0.guild.features.includes(GuildFeatures.VERIFIED);
|
|
value = value != r2;
|
|
object.isVerified = value && r2;
|
|
return object;
|
|
};
|
|
exports.generateViewId = generateViewId;
|
|
exports.trackGameProfileOpen = trackGameProfileOpen;
|
|
exports.trackGameProfileClose = trackGameProfileClose;
|
|
exports.trackGameProfileAction = trackGameProfileAction;
|
|
exports.trackGameProfileFeedback = function({viewId, applicationId, suggestedGameName, suggestedGameApplicationId,
|
|
feedback, submitted}) {
|
|
var defaultImport = importDefault(dependencyMap[4]);
|
|
var GAME_PROFILE_FEEDBACK = AnalyticEvents.GAME_PROFILE_FEEDBACK;
|
|
return defaultImport.track(GAME_PROFILE_FEEDBACK, {view_id: viewId, application_id: applicationId,
|
|
suggested_game_name: suggestedGameName, suggested_game_application_id: suggestedGameApplicationId,
|
|
feedback: feedback, submitted: submitted});
|
|
};
|
|
function generateViewId() { // fn#78005, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10149:3068, offset: 0x01d729f5, size: 37 bytes, params: 1, frame: 11
|
|
return (Module00491Module).v4();
|
|
}
|
|
|
|
function trackGameProfileOpen({viewId, source, gameName, gameId, authorId, profileType}) { // fn#78006, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10149:3108, offset: 0x01e15c3c, size: 149 bytes, params: 2, frame: 21
|
|
const defaultImport = AnalyticsUtils;
|
|
const track = defaultImport.track;
|
|
const GAME_PROFILE_OPEN = AnalyticEvents.GAME_PROFILE_OPEN;
|
|
const contentInventoryStoreBinding = ContentInventoryStore;
|
|
const getFeedRequestId = contentInventoryStoreBinding.getFeedRequestId;
|
|
const GLOBAL_FEED = ContentInventoryFeedKey.GLOBAL_FEED;
|
|
Reflect.apply(track, defaultImport, [GAME_PROFILE_OPEN, {view_id: viewId, source: source, game_name: gameName,
|
|
application_id: gameId, author_id: authorId, request_id: Reflect.apply(getFeedRequestId,
|
|
contentInventoryStoreBinding, [GLOBAL_FEED]), profile_type: profileType}]);
|
|
return viewId;
|
|
}
|
|
|
|
function trackGameProfileClose({viewId, gameName, gameId, playedFriendIds, playedFriendsData, similarGames, guildId, isVerified}) { // fn#78007, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10149:3361, offset: 0x01e15cd1, size: 181 bytes, params: 2, frame: 23
|
|
const defaultImport = AnalyticsUtils;
|
|
const track = defaultImport.track;
|
|
const GAME_PROFILE_CLOSE = AnalyticEvents.GAME_PROFILE_CLOSE;
|
|
const contentInventoryStoreBinding = ContentInventoryStore;
|
|
const getFeedRequestId = contentInventoryStoreBinding.getFeedRequestId;
|
|
const GLOBAL_FEED = ContentInventoryFeedKey.GLOBAL_FEED;
|
|
Reflect.apply(track, defaultImport, [GAME_PROFILE_CLOSE, {view_id: viewId, game_name: gameName,
|
|
application_id: gameId, played_friend_ids: playedFriendIds, played_friends_data: playedFriendsData,
|
|
similar_games: similarGames, request_id: Reflect.apply(getFeedRequestId, contentInventoryStoreBinding,
|
|
[GLOBAL_FEED]), official_guild_id: isVerified ? guildId : undefined, guild_id: guildId}]);
|
|
}
|
|
|
|
function trackGameProfileAction({gameName, gameId, action, recipientUserId, similarGameId, viewId, guildId, isVerified, source}) { // fn#78008, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10149:3718, offset: 0x01e15d86, size: 160 bytes, params: 2, frame: 23
|
|
const defaultImport = AnalyticsUtils;
|
|
const track = defaultImport.track;
|
|
const GAME_PROFILE_ACTION = AnalyticEvents.GAME_PROFILE_ACTION;
|
|
Reflect.apply(track, defaultImport, [GAME_PROFILE_ACTION, {game_name: gameName, application_id: gameId,
|
|
action: action, recipient_user_id: recipientUserId, similar_game_id: similarGameId, view_id: viewId,
|
|
official_guild_id: isVerified ? guildId : undefined, guild_id: guildId, source: source}]);
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun78003, 9963, [9570, 661, 9588, 491, 683,
|
|
2]) /* metro module 9963, dependencies: [9570, 661, 9588, 491, 683, 2] */;
|