121 lines
5.1 KiB
TypeScript
121 lines
5.1 KiB
TypeScript
/* Metro module 7221; source: modules/poggermode/trackPoggermodeSettingsUpdated.tsx; dependencies: [7073, 661, 22, 683, 2] */
|
|
function _fun57757(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#57757, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7399:6, offset: 0x016b569c, size: 207 bytes, params: 8, frame: 19
|
|
const getScreenshakeLocationName = function(a0) {
|
|
if (ShakeLocation.CHAT_INPUT === a0) {
|
|
return 'chat_input';
|
|
}
|
|
if (ShakeLocation.MENTION === a0) {
|
|
return 'mention';
|
|
}
|
|
if (ShakeLocation.VOICE_USER === a0) {
|
|
return 'voice_user';
|
|
}
|
|
};
|
|
const getConfettiLocationName = function(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 getListOfEnabledLocations = function(a0, a1) {
|
|
var env0_0 = a1;
|
|
var Object = global.Object;
|
|
var value = Object.entries(a0);
|
|
value = value.filter(_fun57761);
|
|
return value.map(_fun57762);
|
|
};
|
|
let Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = require(7073) /* metro dependency 7073: PoggermodeConstants */;
|
|
const env0_2 = value.ShakeLocation;
|
|
const env0_3 = value.ConfettiLocation;
|
|
const env0_4 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
|
|
value = importDefault(22) /* metro dependency 22 */;
|
|
value = value.throttle(_fun57763, 5000);
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/poggermode/trackPoggermodeSettingsUpdated.tsx');
|
|
exports.default = value;
|
|
}
|
|
|
|
function getListOfEnabledLocations(a0, a1) { // fn#57760, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7399:516, offset: 0x016b5815, size: 63 bytes, params: 3, frame: 12
|
|
const env0_0 = a1;
|
|
const Object = global.Object;
|
|
let value = Object.entries(a0);
|
|
value = value.filter(function(a0) {
|
|
var r0;
|
|
var r1;
|
|
var r2;
|
|
var item3;
|
|
var value3;
|
|
var iterator = a0[Symbol.iterator]();
|
|
var iterator2 = iterator.next;
|
|
var item2 = Reflect.apply(iterator2, iterator, []);
|
|
var item = item2.value;
|
|
item2 = item2.done ? undefined : iterator;
|
|
var value = undefined;
|
|
var value2 = item2 === value;
|
|
if (value2) {
|
|
r0 = value;
|
|
r1 = item2;
|
|
r2 = value2;
|
|
} else {
|
|
item3 = Reflect.apply(iterator2, item2, []);
|
|
item = item3.value;
|
|
item3 = item3.done ? undefined : item2;
|
|
value3 = item3 === value;
|
|
if (value3) {
|
|
r0 = value;
|
|
r1 = item3;
|
|
r2 = value3;
|
|
} else {
|
|
r0 = item;
|
|
r1 = item3;
|
|
r2 = value3;
|
|
}
|
|
}
|
|
if (!r2) {
|
|
r1.return();
|
|
}
|
|
return r0;
|
|
});
|
|
return value.map(function(a0) {
|
|
var iterator = a0[Symbol.iterator]();
|
|
var item2 = iterator.next();
|
|
var item = item2.value;
|
|
item2 = item2.done ? undefined : iterator;
|
|
var value = undefined;
|
|
var value2 = item2 === value;
|
|
var r4 = value2 ? value : item;
|
|
if (!value2) {
|
|
item2.return();
|
|
}
|
|
var Number = global.Number;
|
|
return require(Number.parseInt(r4));
|
|
});
|
|
}
|
|
|
|
function _fun57763({enabled, combosEnabled, combosRequiredCount, screenshakeEnabled, shakeIntensity, screenshakeEnabledLocations, confettiEnabled, confettiSize, confettiCount, confettiEnabledLocations}) { // fn#57763, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7399:662, offset: 0x016b5896, size: 203 bytes, params: 2, frame: 25
|
|
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
|
const track = defaultImport.track;
|
|
const POGGERMODE_SETTINGS_UPDATED = AnalyticEvents.POGGERMODE_SETTINGS_UPDATED;
|
|
const object2 = {enabled: enabled, combos_enabled: combosEnabled, combos_required_count: combosRequiredCount,
|
|
screenshake_enabled: screenshakeEnabled, shake_intensity: shakeIntensity};
|
|
const getListOfEnabledLocationsBinding = getListOfEnabledLocations;
|
|
object2.screenshake_enabled_locations = getListOfEnabledLocationsBinding(screenshakeEnabledLocations,
|
|
getScreenshakeLocationName);
|
|
object2.confetti_enabled = confettiEnabled;
|
|
object2.confetti_size = confettiSize;
|
|
object2.confetti_count = confettiCount;
|
|
object2.confetti_enabled_locations = getListOfEnabledLocationsBinding(confettiEnabledLocations,
|
|
getConfettiLocationName);
|
|
Reflect.apply(track, defaultImport, [POGGERMODE_SETTINGS_UPDATED, object2]);
|
|
}
|
|
|