This commit is contained in:
janisslsm committed 2026-11-01 12:12:55 +02:00
1 parent 1781d25a15
commit 732c0ad767
33051 files changed
+2591613 -3019689

No files matched your search

@@ -0,0 +1,79 @@
// Metro module 5978 (f5979).
import { useRef } from "react";
import { AnalyticEvents } from "../../../../Constants";
import AnalyticsUtils from "../../../../utils/AnalyticsUtils";
import { trackingConfigWithDefaults } from "./appMessageEmbedTrackingConfig";
import { useIsVisible } from "../../../../_bundle/Module5980";
const r18 = {
VIEW: "view",
PLAY: "play",
CLOUD_PLAY: "cloud_play",
JOIN: "join",
ADD_APP: "add_app",
JOIN_SERVER: "join_server",
INVITE: "invite",
SYNC: "sync",
CONTENT: "content",
BANNER: "banner",
STREAM: "stream",
CONNECT_ACCOUNT: "connect_account"
};
export { r18 as ClickArea };
export function trackAppEmbedClick(a0) {
const { applicationId, linkType, area } = a0;
AnalyticsUtils.track(AnalyticEvents.APP_EMBED_CLICKED, {
application_id: applicationId,
link_type: linkType,
area,
referrer_id: a0.referrerId,
custom_id: a0.customId,
is_dead_end: a0.isDeadEnd,
message_id: a0.messageId
});
}
export function trackAppEmbedViewed(a0) {
const { appId, linkType, referrerId, customId } = a0;
AnalyticsUtils.track(AnalyticEvents.APP_EMBED_VIEWED, {
application_id: appId,
link_type: linkType,
referrer_id: referrerId,
custom_id: customId,
guild_id: a0.guildId,
channel_id: a0.channelId,
message_id: a0.messageId,
app_embed_state: a0.appEmbedState
});
}
export function useTrackAppEmbedViewed(a0) {
let c15339_0 = trackingConfigWithDefaults(a0);
const ref = useRef(false);
return useIsVisible((a0) => {
const current = ref.current;
if (current ? !current : a0) {
ref.current = true;
const onView = c15339_0.onView;
if (onView != null) {
onView.call(c15339_0);
}
const { id, linkType, referrerId, activityCustomId } = c15339_0;
AnalyticsUtils.track(AnalyticEvents.APP_EMBED_VIEWED, {
application_id: id,
link_type: linkType,
referrer_id: referrerId,
custom_id: activityCustomId,
guild_id: c15339_0.guildId,
channel_id: c15339_0.channelId,
message_id: c15339_0.messageId,
app_embed_state: c15339_0.appEmbedState
});
}
}, void 0);
}
export function trackAppEmbedLinkSent(a0, a1, a2, a3) {
AnalyticsUtils.track(AnalyticEvents.APP_EMBED_LINK_SENT, {
application_id: a0,
link_type: a1,
referrer_id: a2,
custom_id: a3
});
}
@@ -0,0 +1,40 @@
// Metro module 5979 (f5980).
import AuthenticationStore from "../../../../stores/AuthenticationStore";
import { LinkType } from "../MessageEmbedConstants";
export function trackingConfigWithDefaults(a0) {
let id = a0?.id;
if (id == null) {
id = "0";
}
let linkType = a0?.linkType;
if (linkType == null) {
linkType = LinkType.UNKNOWN;
}
let referrerId = a0?.referrerId;
if (referrerId == null) {
referrerId = AuthenticationStore.getId();
}
const activityCustomId = a0?.activityCustomId;
const onView = a0?.onView;
const onLinkCopied = a0?.onLinkCopied;
const guildId = a0?.guildId;
const channelId = a0?.channelId;
const messageId = a0?.messageId;
let isDeadEnd = a0?.isDeadEnd;
if (isDeadEnd == null) {
isDeadEnd = false;
}
return {
id,
linkType,
referrerId,
activityCustomId,
onView,
onLinkCopied,
guildId,
channelId,
messageId,
isDeadEnd,
appEmbedState: a0?.appEmbedState
};
}