68 lines
2.2 KiB
TypeScript
68 lines
2.2 KiB
TypeScript
// Metro module 6144 (f6145).
|
|
import { ConfettiLocation, ShakeLocation } from "./PoggermodeConstants";
|
|
import { AnalyticEvents } from "../../Constants";
|
|
import Module12 from "../../_bundle/Module12";
|
|
import AnalyticsUtils from "../../utils/AnalyticsUtils";
|
|
function $mk77796() {
|
|
return (a0) => {
|
|
const [, r13] = a0;
|
|
return r13;
|
|
};
|
|
}
|
|
function $mk77797($env) {
|
|
return (a0) => {
|
|
const [r5] = a0;
|
|
return (0, $env[0])(Number.parseInt(r5));
|
|
};
|
|
}
|
|
let getConfettiLocationName;
|
|
const getScreenshakeLocationName = function getScreenshakeLocationName(a0) {
|
|
if (ShakeLocation.CHAT_INPUT === a0) {
|
|
return "chat_input";
|
|
}
|
|
if (ShakeLocation.MENTION === a0) {
|
|
return "mention";
|
|
}
|
|
if (ShakeLocation.VOICE_USER === a0) {
|
|
return "voice_user";
|
|
}
|
|
};
|
|
getConfettiLocationName = function getConfettiLocationName(a0) {
|
|
if (ConfettiLocation.CHAT_INPUT === a0) {
|
|
return "chat_input";
|
|
}
|
|
if (ConfettiLocation.MEMBER_USER === a0) {
|
|
return "member_user";
|
|
}
|
|
if (ConfettiLocation.REACTION === a0) {
|
|
return "reaction";
|
|
}
|
|
if (ConfettiLocation.CALL_TILE === a0) {
|
|
return "call_tile";
|
|
}
|
|
};
|
|
const r26 = Module12.throttle(({ enabled, combosEnabled, combosRequiredCount, screenshakeEnabled, shakeIntensity, screenshakeEnabledLocations, confettiEnabled, confettiSize, confettiCount, confettiEnabledLocations }) => {
|
|
let env15501;
|
|
let env15502;
|
|
const POGGERMODE_SETTINGS_UPDATED = AnalyticEvents.POGGERMODE_SETTINGS_UPDATED;
|
|
const r22 = env15501 = {};
|
|
env15501[0] = getScreenshakeLocationName;
|
|
const r20 = {
|
|
enabled,
|
|
combos_enabled: combosEnabled,
|
|
combos_required_count: combosRequiredCount,
|
|
screenshake_enabled: screenshakeEnabled,
|
|
shake_intensity: shakeIntensity,
|
|
screenshake_enabled_locations: Object.entries(screenshakeEnabledLocations).filter($mk77796()).map($mk77797(r22)),
|
|
confetti_enabled: confettiEnabled,
|
|
confetti_size: confettiSize,
|
|
confetti_count: confettiCount,
|
|
confetti_enabled_locations: null
|
|
};
|
|
const r34 = env15502 = {};
|
|
env15502[0] = getConfettiLocationName;
|
|
r20.confetti_enabled_locations = Object.entries(confettiEnabledLocations).filter($mk77796()).map($mk77797(r34));
|
|
AnalyticsUtils.track(POGGERMODE_SETTINGS_UPDATED, r20);
|
|
}, 5000);
|
|
export default r26;
|