Initial commit

This commit is contained in:
janisslsm committed 2026-07-27 16:20:00 +03:00
commit af3b49f756
16065 files changed
+2938410

No files matched your search

@@ -0,0 +1,105 @@
/* Metro module 6953; source: modules/voice_channel_effects/VoiceChannelEffectsActionCreators.tsx; dependencies: [6540, 1934, 6954, 6955, 661, 4614, 22, 6956, 507, 6979, 6789, 6639, 2] */
function _fun55309(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#55309, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7131:6, offset: 0x0137b588, size: 280 bytes, params: 8, frame: 19
let env0_0 = require;
const _getCancellationSlowConnection = function(a0) {
var env0_0 = a0;
var AbortController = global.AbortController;
var value2 = new AbortController();
var env0_1 = value2;
return {abortController: value2, onRequestProgress: require(dependencyMap[6]).throttle(_fun55311, 1000)};
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const emojiStore = importDefault(6540) /* metro dependency 6540: EmojiStore */;
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
const voiceChannelEffectsPersistedStore = importDefault(6954) /* metro dependency 6954: VoiceChannelEffectsPersistedStore */;
const env0_6 = (require(6955) /* metro dependency 6955: VoiceChannelEffectsConstants */).VoiceChannelEffectAnimationType;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_7 = constantsModule.Endpoints;
const env0_8 = constantsModule.NOOP_NULL;
const env0_9 = (require(4614) /* metro dependency 4614: SoundboardConstants */).DEFAULT_SOUND_GUILD_ID;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_channel_effects/VoiceChannelEffectsActionCreators.tsx');
exports.VoiceChannelEffectSentLocation = {EMOJI_PICKER: 'emoji_picker', EFFECT_BAR: 'effect_bar'};
exports.sendVoiceChannelCustomCallSoundEffect = sendVoiceChannelCustomCallSoundEffect;
exports.sendVoiceChannelSoundboardEffect = sendVoiceChannelSoundboardEffect;
}
function _getCancellationSlowConnection(a0) { // fn#55310, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7131:323, offset: 0x0137b6a0, size: 103 bytes, params: 2, frame: 14
const env0_0 = a0;
const AbortController = global.AbortController;
return {abortController: new AbortController(),
onRequestProgress: (require(22) /* metro dependency 22 */).throttle(_fun55311, 1000)};
}
function sendVoiceChannelCustomCallSoundEffect(a0, a1, a2) { // fn#55312, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7131:684, offset: 0x0137b735, size: 308 bytes, params: 4, frame: 25
const {abortController, onRequestProgress} = _getCancellationSlowConnection(a0);
const getState = VoiceChannelEffectsPersistedStore.getState;
const r11 = Reflect.apply(getState, VoiceChannelEffectsPersistedStore,
[]).animationType ?? VoiceChannelEffectAnimationType.BASIC;
let object = {animation_type: r11};
const voiceChannelEffectsUtilsModule = require(6956) /* metro dependency 6956: VoiceChannelEffectsUtils */;
const sampleAnimationId = voiceChannelEffectsUtilsModule.sampleAnimationId;
const CUSTOM_CALL_SOUND_ANIMATION_RANGE = voiceChannelEffectsUtilsModule.CUSTOM_CALL_SOUND_ANIMATION_RANGE;
object.animation_id = Reflect.apply(sampleAnimationId, voiceChannelEffectsUtilsModule, [r11,
CUSTOM_CALL_SOUND_ANIMATION_RANGE]);
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
const post = HTTP.post;
const object3 = {};
object3.url = Endpoints.CUSTOM_CALL_SOUNDS(a0);
object3.body = object;
object3.signal = abortController.signal;
object3.onRequestProgress = onRequestProgress;
object3.rejectWithError = true;
Reflect.apply(post, HTTP, [object3]).then(NOOP_NULL, function() {
abortController.signal.aborted;
});
const value = importDefault(6979) /* metro dependency 6979: trackSoundPlayed */;
const CHANNEL_CALL = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).CHANNEL_CALL;
object = [CHANNEL_CALL];
const AnalyticsSoundType = (require(6639) /* metro dependency 6639: SoundboardTypes */).AnalyticsSoundType;
const ENTRY = AnalyticsSoundType.ENTRY;
value(object, a2, a1, ENTRY);
}
function sendVoiceChannelSoundboardEffect(a0, a1, a2, a3, a4) { // fn#55314, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7131:1227, offset: 0x0137b880, size: 341 bytes, params: 6, frame: 28
const value = a3;
const emojiId = a1.emojiId;
const value2 = null;
const r8 = value2 != emojiId ? EmojiStore.getCustomEmojiById(a1.emojiId) : value2;
const _getCancellationSlowConnectionBinding = _getCancellationSlowConnection;
const value6 = undefined;
const {abortController, onRequestProgress} = _getCancellationSlowConnectionBinding(a0);
const object3 = {};
object3.sound_id = a1.soundId;
object3.emoji_id = a1.emojiId;
const emojiName = a1.emojiName;
object3.emoji_name = value2 != emojiName ? emojiName : value2 == r8 ? value6 : r8.name;
if (a1.guildId !== DEFAULT_SOUND_GUILD_ID) {
object3.source_guild_id = a1.guildId;
}
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
const post = HTTP.post;
const object4 = {};
object4.url = Endpoints.SEND_SOUNDBOARD_SOUND(a0);
object4.body = object3;
object4.signal = abortController.signal;
object4.onRequestProgress = onRequestProgress;
object4.rejectWithError = true;
Reflect.apply(post, HTTP, [object4]).then(NOOP_NULL, function() {
abortController.signal.aborted;
});
const defaultImport = importDefault(6979) /* metro dependency 6979: trackSoundPlayed */;
const r5 = value2 != value ? value : [];
const AnalyticsSoundType = (require(6639) /* metro dependency 6639: SoundboardTypes */).AnalyticsSoundType;
const DEFAULT = AnalyticsSoundType.DEFAULT;
defaultImport(r5, a2, a1, DEFAULT, a4);
return value6;
}
function _fun55311() { // fn#55311, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7131:412, offset: 0x0137b707, size: 46 bytes, params: 1, frame: 10
const value = environment.__proto__;
if (SelectedChannelStore.getVoiceChannelId() !== env0_0) {
env0_1.abort();
}
}
@@ -0,0 +1,14 @@
/* Metro module 6955; source: modules/voice_channel_effects/VoiceChannelEffectsConstants.tsx; dependencies: [2] */
function _fun55325(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#55325, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7133:6, offset: 0x0137bc91, size: 120 bytes, params: 8, frame: 16
var object2;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object2 = {PREMIUM: 0};
object2[0] = 'PREMIUM';
object2.BASIC = 1;
object2[1] = 'BASIC';
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_channel_effects/VoiceChannelEffectsConstants.tsx');
exports.VoiceChannelEffectAnimationType = object2;
exports.EMOJI_SIZE = 32;
}
@@ -0,0 +1,73 @@
/* Metro module 6954; source: modules/voice_channel_effects/VoiceChannelEffectsPersistedStore.tsx; dependencies: [6, 7, 15, 17, 18, 6955, 566, 694, 2] */
function _fun55316(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#55316, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7132:6, offset: 0x0137b9d5, size: 287 bytes, params: 8, frame: 19
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_1 = importDefault(6) /* metro dependency 6 */;
const env0_2 = importDefault(7) /* metro dependency 7 */;
const env0_3 = importDefault(15) /* metro dependency 15 */;
const env0_4 = importDefault(17) /* metro dependency 17 */;
const env0_5 = importDefault(18) /* metro dependency 18 */;
const env0_6 = (require(6955) /* metro dependency 6955: VoiceChannelEffectsConstants */).VoiceChannelEffectAnimationType;
const PersistedStore = (importDefault(566) /* metro dependency 566: flux */).PersistedStore;
let value = _fun55320(PersistedStore);
value.displayName = 'VoiceChannelEffectsPersistedStore';
value.persistKey = 'VoiceChannelEffectsPersistedStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
{VOICE_CHANNEL_EFFECT_TOGGLE_ANIMATION_TYPE: VOICE_CHANNEL_EFFECT_TOGGLE_ANIMATION_TYPE});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_channel_effects/VoiceChannelEffectsPersistedStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_55317() { // fn#55317, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7132:192, offset: 0x0137baf4, size: 94 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_55317_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun55320(a0) { // fn#55320, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7132:391, offset: 0x0137bb52, size: 91 bytes, params: 2, frame: 16
const closure = VoiceChannelEffectsPersistedStore;
env0_5(closure, a0);
return env0_2(closure, [{key: 'initialize', value: function(a0) {
var r2;
var value = undefined;
r2 = a0 == null ? value : a0.animationType;
r2 = r2 ?? VoiceChannelEffectAnimationType.PREMIUM;
env1_0 = r2;
return value;
}}, {key: 'getState', value: value_55323}]);
}
function VOICE_CHANNEL_EFFECT_TOGGLE_ANIMATION_TYPE() { // fn#55324, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7132:1110, offset: 0x0137bc5e, size: 51 bytes, params: 1, frame: 3
const binding = env0_0;
const BASIC = VoiceChannelEffectAnimationType.BASIC;
env0_0 = binding === BASIC ? VoiceChannelEffectAnimationType.PREMIUM : VoiceChannelEffectAnimationType.BASIC;
}
function value_55323() { // fn#55323, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7132:883, offset: 0x0137bc4e, size: 16 bytes, params: 1, frame: 2
return {animationType: env1_0};
}
@@ -0,0 +1,176 @@
/* Metro module 10694; source: modules/voice_channel_effects/VoiceChannelEffectsStore.tsx; dependencies: [6, 7, 15, 17, 18, 4299, 694, 672, 22, 6956, 4002, 566, 2] */
function _fun82196(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#82196, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10880:6, offset: 0x01eeebed, size: 472 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = importDefault(6) /* metro dependency 6 */;
const env0_5 = importDefault(7) /* metro dependency 7 */;
const env0_6 = importDefault(15) /* metro dependency 15 */;
const env0_7 = importDefault(17) /* metro dependency 17 */;
const env0_8 = importDefault(18) /* metro dependency 18 */;
const env0_9 = (require(4299) /* metro dependency 4299: CallConstants */).EMOJI_PICKER_EMOJI_TO_SHOW_COUNT;
const env0_10 = [];
const env0_11 = {};
const env0_12 = [];
const env0_13 = [];
const Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
const SECOND = Millis.SECOND;
const env0_14 = 10 * SECOND;
const env0_15 = (require(22) /* metro dependency 22 */).debounce(_fun82200, 500);
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
_fun82201(Store).displayName = 'VoiceChannelEffectsStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
{VOICE_CHANNEL_EFFECT_CLEAR: VOICE_CHANNEL_EFFECT_CLEAR,
VOICE_CHANNEL_EFFECT_RECENT_EMOJI: VOICE_CHANNEL_EFFECT_RECENT_EMOJI,
VOICE_CHANNEL_EFFECT_SEND: VOICE_CHANNEL_EFFECT_SEND,
VOICE_CHANNEL_EFFECT_SENT_LOCAL: VOICE_CHANNEL_EFFECT_SENT_LOCAL,
VOICE_CHANNEL_EFFECT_UPDATE_TIME_STAMP: function({cooldownEndsAtMs}) {
var Date = global.Date;
var Date2 = global.Date;
var value = Date2.now() + cooldownEndsAtMs;
value = new Date(value);
env0_3 = value;
}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_channel_effects/VoiceChannelEffectsStore.tsx');
exports.default = value;
exports.clearVoiceChannelEffectForUser = clearVoiceChannelEffectForUser;
}
function _isNativeReflectConstruct_82197() { // fn#82197, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10880:193, offset: 0x01eeedc5, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_82197_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun82200() { // fn#82200, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10880:457, offset: 0x01eeee27, size: 86 bytes, params: 1, frame: 16
const effectAnnouncement = (require(6956) /* metro dependency 6956: VoiceChannelEffectsUtils */).getEffectAnnouncement(env0_12);
const AccessibilityAnnouncer = (require(4002) /* metro dependency 4002: shared */).AccessibilityAnnouncer;
AccessibilityAnnouncer.announce(effectAnnouncement, 'polite');
env0_12 = [];
}
function _fun82201(a0) { // fn#82201, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10880:568, offset: 0x01eeee7d, size: 153 bytes, params: 2, frame: 16
const closure = VoiceChannelEffectsStore;
env0_8(closure, a0);
return env0_5(closure, [{key: 'recentlyUsedEmojis', get: get_82203}, {key: 'isOnCooldown', get: get_82204},
{key: 'effectCooldownEndTime', get: get_82205}, {key: 'getEffectForUserId', value: value_82206}]);
}
function VOICE_CHANNEL_EFFECT_CLEAR({userId}) { // fn#82207, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10880:1231, offset: 0x01eeefbd, size: 37 bytes, params: 2, frame: 4
if (env0_11[userId] != null) {
delete env0_11[userId];
}
}
function VOICE_CHANNEL_EFFECT_RECENT_EMOJI({emoji}) { // fn#82208, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10880:1305, offset: 0x01eeefe2, size: 117 bytes, params: 2, frame: 14
var value2;
if (emoji != null) {
env0_10.unshift(emoji);
value2 = (require(22) /* metro dependency 22 */).uniqBy(env0_10, 'name');
env0_10 = value2;
if (value2.length > EMOJI_PICKER_EMOJI_TO_SHOW_COUNT + 1) {
env0_10.pop();
}
}
}
function VOICE_CHANNEL_EFFECT_SEND({emoji, userId, animationType}) { // fn#82209, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10880:1419, offset: 0x01eef057, size: 144 bytes, params: 2, frame: 18
var binding;
var object;
var Date;
var value2;
if (emoji != null && animationType != null) {
binding = env0_11;
object = {emoji: emoji};
Date = global.Date;
object.sentAt = Date.now();
object.animationType = animationType;
binding[userId] = object;
binding = env0_12;
object = [];
value2 = arraySpread(object, binding, 0, Date);
object[value2] = {emojiName: emoji.name, userId: userId};
value2 + 1;
env0_15();
}
}
function VOICE_CHANNEL_EFFECT_SENT_LOCAL() { // fn#82210, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10880:1601, offset: 0x01eef0e7, size: 190 bytes, params: 1, frame: 18
var binding;
var property;
var value5;
let Date = global.Date;
let date = new Date();
const items2 = [date];
arraySpread(items2, env0_13, 1, items2);
const value3 = items2.slice(0, 20);
if (value3.length >= 20) {
binding = value3;
property = binding[binding.length - 1];
value5 = date.getTime() - property.getTime();
if (value5 < env0_14) {
Date = global.Date;
date = date.getTime();
date = date + env0_14 - value5;
date = new Date(date);
}
}
}
function clearVoiceChannelEffectForUser(a0) { // fn#82212, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10880:1976, offset: 0x01eef1ea, size: 64 bytes, params: 2, frame: 13
if (a0 != null) {
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'VOICE_CHANNEL_EFFECT_CLEAR',
userId: a0});
}
}
function VoiceChannelEffectsStore() { // fn#82202, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10880:580, offset: 0x01eeef16, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_4(this, VoiceChannelEffectsStore);
const value3 = env1_7(VoiceChannelEffectsStore);
return env1_6(this, _isNativeReflectConstruct_82197() ? global.Reflect.construct(value3, arguments,
env1_7(this).constructor) : value3.apply(this, arguments));
}
function get_82204() { // fn#82204, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10880:970, offset: 0x01eeef87, size: 54 bytes, params: 1, frame: 11
var r0;
var Date;
var value3;
var date;
const value = environment.__proto__;
const value2 = env1_3 != null;
if (value2) {
Date = global.Date;
value3 = Object.create(Date.prototype, {constructor: {value: Date}});
date = new Date();
r0 = (date instanceof Object ? date : value3) < env1_3;
} else {
r0 = value2;
}
return r0;
}
@@ -0,0 +1,222 @@
/* Metro module 6956; source: modules/voice_channel_effects/VoiceChannelEffectsUtils.tsx; dependencies: [1878, 6955, 6957, 6958, 6959, 6960, 6961, 6962, 6963, 6964, 6965, 6966, 6967, 6968, 6969, 6970, 6971, 6972, 6973, 6974, 6975, 6976, 6977, 6978, 22, 1457, 1423, 3797, 3801, 1244, 2] */
function _fun55326(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#55326, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7134:6, offset: 0x0137bd09, size: 655 bytes, params: 8, frame: 21
var object3;
let env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
let value = require(6955) /* metro dependency 6955: VoiceChannelEffectsConstants */;
const env0_4 = value.EMOJI_SIZE;
const VoiceChannelEffectAnimationType = value.VoiceChannelEffectAnimationType;
object3 = {};
object3.BASIC = [importDefault(6957) /* metro dependency 6957 */];
object3.PREMIUM = [importDefault(6958) /* metro dependency 6958 */, importDefault(6959) /* metro dependency 6959 */,
importDefault(6960) /* metro dependency 6960 */, importDefault(6961) /* metro dependency 6961 */,
importDefault(6962) /* metro dependency 6962 */, importDefault(6963) /* metro dependency 6963 */,
importDefault(6964) /* metro dependency 6964 */, importDefault(6965) /* metro dependency 6965 */,
importDefault(6966) /* metro dependency 6966 */, importDefault(6967) /* metro dependency 6967 */,
importDefault(6968) /* metro dependency 6968 */, importDefault(6969) /* metro dependency 6969 */,
importDefault(6970) /* metro dependency 6970 */, importDefault(6971) /* metro dependency 6971 */,
importDefault(6972) /* metro dependency 6972 */, importDefault(6973) /* metro dependency 6973 */,
importDefault(6974) /* metro dependency 6974 */, importDefault(6975) /* metro dependency 6975 */,
importDefault(6976) /* metro dependency 6976 */, importDefault(6977) /* metro dependency 6977 */,
importDefault(6978) /* metro dependency 6978 */];
const object4 = {};
const BASIC = VoiceChannelEffectAnimationType.BASIC;
const BASIC2 = object3.BASIC;
object4[BASIC] = BASIC2;
const PREMIUM = VoiceChannelEffectAnimationType.PREMIUM;
const PREMIUM2 = object3.PREMIUM;
object4[PREMIUM] = PREMIUM2;
value = importDefault(22) /* metro dependency 22 */;
value = value.memoize(function(a0) {
var env0_0 = a0;
var Promise = global.Promise;
var value = Object.create(Promise.prototype, {constructor: {value: Promise}});
var value2 = new Promise(_fun55331);
return value2 instanceof Object ? value2 : value;
});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_channel_effects/VoiceChannelEffectsUtils.tsx');
exports.CUSTOM_CALL_SOUND_ANIMATION_RANGE = {'start': 10, 'end': 15};
exports.AnimationTypeToAnimations = object4;
exports.getResizedEmojiData = value;
exports.sampleAnimationId = sampleAnimationId;
exports.getEffectUrl = getEffectUrl;
exports.getEffectAnnouncement = getEffectAnnouncement;
}
function getUniqueListFromMetadata(a0, a1) { // fn#55327, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7134:751, offset: 0x0137bf98, size: 93 bytes, params: 3, frame: 12
const env0_0 = a1;
let value = importDefault(22) /* metro dependency 22 */;
value = value(a0);
value = value.map(_fun55328);
value = value.filter(function(a0) {
return a0 != null;
});
value = value.uniq();
return value.value();
}
function _fun55330(a0) { // fn#55330, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7134:443, offset: 0x0137c011, size: 44 bytes, params: 2, frame: 11
const env0_0 = a0;
const Promise = global.Promise;
const value = Object.create(Promise.prototype, {constructor: {value: Promise}});
const promise = new Promise(_fun55331);
return promise instanceof Object ? promise : value;
}
function sampleAnimationId(a0, a1) { // fn#55333, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7134:1114, offset: 0x0137c151, size: 149 bytes, params: 3, frame: 14
var Math;
var value;
const property = env0_6[a0];
if (a1 == null) {
Math = global.Math;
return Math.floor(global.Math.random() * property.length);
}
const PREMIUM = VoiceChannelEffectAnimationType.PREMIUM;
if (a0 === PREMIUM) {
value = a1.end + 1;
Math = global.Math;
return Math.floor(global.Math.random() * (a1.start - value) + value);
}
Math = global.Math;
const floor = Math.floor;
const Math2 = global.Math;
return Reflect.apply(floor, Math, [Math2.random() * property.length]);
}
function getEffectUrl(a0) { // fn#55334, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7134:1279, offset: 0x0137c1e6, size: 213 bytes, params: 2, frame: 21
var r0;
var getEmojiURL;
var animated;
let value = a1;
if (a0.id != null) {
value = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
getEmojiURL = value.getEmojiURL;
animated = a0.animated;
return Reflect.apply(getEmojiURL, value, [{id: a0.id, animated: animated != null && animated,
size: value !== undefined ? value : EMOJI_SIZE}]);
}
const defaultImport = importDefault(3797) /* metro dependency 3797: UnicodeEmojis */;
const byName = defaultImport.getByName(defaultImport.convertSurrogateToName(a0.name, false));
if (byName != null) {
value = importDefault(3801) /* metro dependency 3801: EmojiUtils */;
value = value.getURL(byName.surrogates);
r0 = value;
} else {
r0 = '';
}
return r0;
}
function getEffectAnnouncement(a0) { // fn#55335, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7134:1553, offset: 0x0137c2bb, size: 587 bytes, params: 2, frame: 24
var r1;
var r0;
var username;
var property;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var formatToPlainString;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var object2;
var user;
var user2;
var yZYxzF;
if (a0.length < 1) {
return '';
}
var value;
const getUniqueListFromMetadataBinding = getUniqueListFromMetadata;
const value2 = undefined;
const uniqueListFromMetadataBinding = getUniqueListFromMetadataBinding(a0, 'userId');
const uniqueListFromMetadataBinding2 = getUniqueListFromMetadataBinding(a0, 'emojiName');
const r6 = uniqueListFromMetadataBinding2.length < 2 ? (uniqueListFromMetadataBinding2 == null ? value2 : uniqueListFromMetadataBinding2[0]) ?? '' : uniqueListFromMetadataBinding2.join(', ');
if (uniqueListFromMetadataBinding.length < 1) {
r0 = '';
} else {
if (uniqueListFromMetadataBinding.length === 1) {
formatToPlainString = intl.formatToPlainString;
yZYxzF = t.yZYxzF;
value = UserStore.getUser(uniqueListFromMetadataBinding[0]);
value = Reflect.apply(formatToPlainString, intl, [yZYxzF,
{firstUsername: value == null ? value2 : value.username,
emojiNames: r6}]);
r1 = value;
} else if (uniqueListFromMetadataBinding.length === 2) {
formatToPlainString = intl.formatToPlainString;
property = t['8rmtbd'];
object2 = {};
user2 = UserStore.getUser(uniqueListFromMetadataBinding[0]);
username = user2 == null ? value2 : user2.username;
object2.firstUsername = username;
value = UserStore.getUser(uniqueListFromMetadataBinding[1]);
username = value == null ? value2 : value.username;
object2.secondUsername = username;
object2.emojiNames = r6;
value = Reflect.apply(formatToPlainString, intl, [property, object2]);
r1 = value;
} else {
formatToPlainString = intl.formatToPlainString;
property = t['/okjv0'];
object2 = {};
user = UserStore.getUser(uniqueListFromMetadataBinding[0]);
username = user == null ? value2 : user.username;
object2.firstUsername = username;
value = UserStore.getUser(uniqueListFromMetadataBinding[1]);
username = value == null ? value2 : value.username;
object2.secondUsername = username;
object2.count = uniqueListFromMetadataBinding.length - 2;
object2.emojiNames = r6;
value = Reflect.apply(formatToPlainString, intl, [property, object2]);
r1 = value;
}
r0 = r1;
}
return r0;
}
function _fun55328(a0) { // fn#55328, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7134:815, offset: 0x0137bff5, size: 28 bytes, params: 2, frame: 3
const property = a0[require];
const value = null;
return value != property ? property : value;
}
function _fun55331(a0) { // fn#55331, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7134:459, offset: 0x0137c03d, size: 81 bytes, params: 2, frame: 10
const env0_0 = a0;
const Image = global.Image;
const image = new Image();
image.src = env0_0;
image.crossOrigin = 'Anonymous';
image.onload = onload_55332;
}
function onload_55332() { // fn#55332, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7134:522, offset: 0x0137c08e, size: 195 bytes, params: 1, frame: 17
var element;
var binding;
let value = environment.__proto__.__proto__;
const getDevicePixelRatio = (require(1457) /* metro dependency 1457: ImageLoaderUtils */).getDevicePixelRatio;
value = EMOJI_SIZE * Reflect.apply(getDevicePixelRatio, value, []);
if (env0_1.width !== value) {
element = global.document.createElement('canvas');
element.width = value;
element.height = value;
value = element.getContext('2d');
if (value != null) {
value.drawImage(env0_1, 0, 0);
}
env0_0(element.toDataURL('image/png'));
} else if (env0_1.height === value) {
binding = env0_0;
value = environment.__proto__;
binding(env1_0);
} else {
element = global.document.createElement('canvas');
element.width = value;
element.height = value;
value = element.getContext('2d');
if (value != null) {
value.drawImage(env0_1, 0, 0);
}
env0_0(element.toDataURL('image/png'));
}
}
@@ -0,0 +1,141 @@
/* Metro module 10699; source: modules/voice_channel_effects/native/AnimatedEffectEmoji.tsx; dependencies: [31, 27, 4502, 33, 672, 4501, 697, 5475, 1305, 566, 4017, 4504, 6956, 2] */
function _fun82218(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#82218, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10885:6, offset: 0x01eef3d2, size: 439 bytes, params: 8, frame: 22
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
let Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
let SECOND = Millis.SECOND;
const env0_7 = 6 * SECOND;
Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
SECOND = Millis.SECOND;
const env0_8 = 2 * SECOND;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const object3 = {'backgroundColor': null, 'borderRadius': null, 'position': 'absolute', 'right': 16, 'top': 16};
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object3.backgroundColor = BACKGROUND_SURFACE_HIGH;
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
const env0_9 = Reflect.apply(createStyles, createStylesModule, [{voiceChannelEffectEmojiContainer: object3,
voiceChannelEffectEmojiContainerTileNotch: {'right': 'auto', 'left': 16},
voiceChannelEffectEmoji: {padding: 12}, textEmoji: {'fontSize': 32, 'lineHeight': 38, 'alignContent': 'center',
'justifyContent': 'center', 'display': 'flex', 'width': 32, 'height': 32}, imageEmoji: {'width': 32,
'height': 32}}]);
object = {code: 'function AnimatedEffectEmojiTsx1(){const{withSequence,withTiming,ANIMATION_ROTATION_DEG,withDelay,useReducedMotion,STANDARD_EASING}=this.__closure;const rotate=withSequence(withTiming(ANIMATION_ROTATION_DEG+"deg",{duration:0}),withDelay(100,withTiming(\'0deg\',{duration:useReducedMotion?0:300,easing:STANDARD_EASING})));const scale=withSequence(withTiming(0,{duration:0}),withDelay(100,withTiming(1,{duration:useReducedMotion?0:300,easing:STANDARD_EASING})));return{transform:[{scale:scale},{rotate:rotate}]};}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_channel_effects/native/AnimatedEffectEmoji.tsx');
exports.default = AnimatedEffectEmoji;
}
function Emoji_82219({url, surrogates}) { // fn#82219, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10885:640, offset: 0x01eef589, size: 173 bytes, params: 2, frame: 19
var r0;
var value;
const styles = useStyles();
if (url !== '') {
value = importDefault(5475) /* metro dependency 5475: FastImage */;
value = ((Component) => <Component resizeMode="contain" style={[styles.imageEmoji]} source={{uri: url}} />)(value);
r0 = value;
} else {
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
r0 = <LegacyText style={[styles.textEmoji]} allowFontScaling={false}>{surrogates}</LegacyText>;
}
return r0;
}
function AnimatedEffectEmoji({userId, voiceChannelEffect, hasNotch, onComplete}) { // fn#82220, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10885:1462, offset: 0x01eef636, size: 549 bytes, params: 2, frame: 25
var object2;
var r0;
var View2;
var items2;
var moduleValue3;
hasNotch = !(hasNotch === undefined) && hasNotch;
var value;
const styles = useStyles();
const emoji = voiceChannelEffect.emoji;
const sentAt = voiceChannelEffect.sentAt;
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
env0_3.useEffect(_fun82222, [sentAt, userId, onComplete]);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = AnimatedEffectEmojiN;
object2 = {withSequence: reanimatedRexportModule.withSequence,
withTiming: (require(4504) /* metro dependency 4504: timing */).withTiming, ANIMATION_ROTATION_DEG: -120,
withDelay: reanimatedRexportModule.withDelay, useReducedMotion: useReducedMotion};
const STANDARD_EASING = (require(1305) /* metro dependency 1305: native */).STANDARD_EASING;
object2.STANDARD_EASING = STANDARD_EASING;
closure.__closure = object2;
closure.__workletHash = 75069010226;
closure.__initData = env0_11;
if (emoji != null) {
View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
object2 = {};
items2 = [styles.voiceChannelEffectEmojiContainer];
moduleValue3 = require(1305) /* metro dependency 1305: native */;
items2[1] = moduleValue3.generateBoxShadowStyle((require(1305) /* metro dependency 1305: native */).EIGHT_DP_ELEVATION_SHADOW_PARAMS);
items2[2] = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
items2[3] = hasNotch && styles.voiceChannelEffectEmojiContainerTileNotch;
object2.style = items2;
var viewBindingProps = {style: styles.voiceChannelEffectEmoji};
value = require(6956) /* metro dependency 6956: VoiceChannelEffectsUtils */;
value = <View2 {...object2}><View {...viewBindingProps}><Emoji_82219 url={value.getEffectUrl(emoji)} surrogates={emoji.name} /></View></View2>;
r0 = value;
} else {
r0 = null;
}
return r0;
}
function _fun82222() { // fn#82222, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10885:1654, offset: 0x01eef85b, size: 101 bytes, params: 1, frame: 15
const Date = global.Date;
let value = Date.now();
value -= sentAt;
if (value >= env1_8) {
if (onComplete != null) {
onComplete();
}
} else {
var env0_0 = global.setTimeout(function() {
if (onComplete != null) {
onComplete();
}
}, env1_7);
}
return _fun82224;
}
function AnimatedEffectEmojiN() { // fn#82225, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10885:1818, owner: AnimatedEffectEmoji.N, offset: 0x01eef8db, size: 350 bytes, params: 1, frame: 29
var object2;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
let withSequence = reanimatedRexportModule.withSequence;
const timingModule = require(4504) /* metro dependency 4504: timing */;
let withTiming = timingModule.withTiming;
const value2 = 0;
const value3 = Reflect.apply(withTiming, timingModule, ['-120deg', {duration: value2}]);
const moduleValue3 = reanimatedRexportModule;
let withDelay = moduleValue3.withDelay;
const moduleValue4 = timingModule;
withTiming = moduleValue4.withTiming;
object2 = {};
const value5 = 300;
object2.duration = useReducedMotion ? value2 : value5;
const STANDARD_EASING = (require(1305) /* metro dependency 1305: native */).STANDARD_EASING;
object2.easing = STANDARD_EASING;
const value7 = Reflect.apply(withSequence, reanimatedRexportModule, [value3, Reflect.apply(withDelay, moduleValue3,
[100, Reflect.apply(withTiming, moduleValue4, ['0deg', object2])])]);
const moduleValue5 = reanimatedRexportModule;
withSequence = moduleValue5.withSequence;
const moduleValue6 = timingModule;
const value8 = moduleValue6.withTiming(value2, {duration: value2});
const moduleValue7 = reanimatedRexportModule;
withDelay = moduleValue7.withDelay;
const moduleValue8 = timingModule;
return {transform: [{scale: Reflect.apply(withSequence, moduleValue5, [value8, Reflect.apply(withDelay,
moduleValue7, [100, moduleValue8.withTiming(1, {duration: useReducedMotion ? value2 : value5,
easing: STANDARD_EASING})])])}, {rotate: value7}]};
}