This commit is contained in:
janisslsm committed 2026-07-28 01:06:53 +03:00
1 parent af3b49f756
commit 1781d25a15
22448 files changed
+2731829 -2650550

No files matched your search

@@ -1,9 +1,11 @@
/* Metro module 11465; source: modules/voice_messages/VoiceMessageAnalytics.tsx; dependencies: [661, 683, 2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
function _fun87780(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87780, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11651:6, offset: 0x01fcb079, size: 212 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_messages/VoiceMessageAnalytics.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_messages/VoiceMessageAnalytics.tsx');
exports.VoiceMessageRecordingResult = {SENT: 'sent', CANCELLED_DURATION: 'cancelled_duration',
CANCELLED_USER_REQUESTED: 'cancelled_user_requested', CANCELLED_GESTURE_CONFLICT: 'cancelled_gesture_conflict',
CANCELLED_ON_BACKGROUND: 'cancelled_on_background'};
@@ -35,3 +37,4 @@ function _fun87780(global, require, importDefault, importAll, module, exports, d
};
}
global.__d(_fun87780, 11465, [661, 683, 2]) /* metro module 11465, dependencies: [661, 683, 2] */;
@@ -1,18 +1,19 @@
/* Metro module 11528; source: modules/voice_messages/VoiceMessageConstants.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun88304(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88304, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11714:6, offset: 0x01fdec33, size: 256 bytes, params: 8, frame: 17
var object2;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object2 = {SENDING: 0};
object2[0] = 'SENDING';
object2.CANCELLING = 1;
object2[1] = 'CANCELLING';
object2.LOCKING = 2;
object2[2] = 'LOCKING';
object2.LOCKED = 3;
object2[3] = 'LOCKED';
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_messages/VoiceMessageConstants.tsx');
exports.VoiceMessageAnimationState = object2;
object = {SENDING: 0};
object[0] = 'SENDING';
object.CANCELLING = 1;
object[1] = 'CANCELLING';
object.LOCKING = 2;
object[2] = 'LOCKING';
object.LOCKED = 3;
object[3] = 'LOCKED';
(FileImportTrackerModule).fileFinishedImporting('modules/voice_messages/VoiceMessageConstants.tsx');
exports.VoiceMessageAnimationState = object;
exports.VOICE_RECORDING_MIN_DB = -100;
exports.VOICE_RECORDING_MAX_DB = 0;
exports.VOICE_RECORDING_MIN_DURATION_MILLIS = 500;
@@ -25,3 +26,4 @@ function _fun88304(global, require, importDefault, importAll, module, exports, d
exports.PLAYBACK_RATES = [0.75, 1, 1.5, 2];
}
global.__d(_fun88304, 11528, [2]) /* metro module 11528, dependencies: [2] */;
@@ -1,83 +1,86 @@
/* Metro module 11779; source: modules/voice_messages/downsampleWaveform.tsx; dependencies: [44, 2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun90244(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90244, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11965:6, offset: 0x02031812, size: 99 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_messages/downsampleWaveform.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_messages/downsampleWaveform.tsx');
exports.default = downsampleWaveform;
}
function downsampleWaveform(a0, a1) { // fn#90245, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11965:182, offset: 0x02031875, size: 232 bytes, params: 3, frame: 25
var r3;
var r12;
var r13;
var r2;
var r11;
var Math;
var round;
var value3;
var value4;
var value5;
var value6;
const value = 0;
const defaultImport = importDefault(dependencyMap[value]);
let length = a0.length;
defaultImport(length >= a1, 'Waveform smaller than samples');
if (a0.length === a1) {
return a0;
}
const value2 = a0.length / a1;
const items2 = [];
length = items2.length;
if (length < a1) {
r3 = value;
while (true) {
Math = global.Math;
round = Math.round;
length = items2.length;
value3 = Reflect.apply(round, Math, [(length + 1) * value2]);
if (r3 < value3) {
length = a0.length;
if (!(r3 < length)) {
r2 = value;
r11 = value;
break;
}
r12 = value;
r13 = value;
while (true) {
value4 = r13 + a0[r3];
value5 = typeof r12 === 'bigint' ? r12 + 1n : +r12 + 1;
value6 = typeof r3 === 'bigint' ? r3 + 1n : +r3 + 1;
if (!(value6 < value3)) {
function downsampleWaveform(a0, a1) { // fn#90245, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11965:182, offset: 0x02031875, size: 232 bytes, params: 3, frame: 25
var r3;
var r12;
var r13;
var r2;
var r11;
var Math;
var round;
var value3;
var value4;
var value5;
var value6;
const value = 0;
const defaultImport = importDefault(dependencyMap[value]);
let length = a0.length;
defaultImport(length >= a1, 'Waveform smaller than samples');
if (a0.length === a1) {
return a0;
}
const value2 = a0.length / a1;
const items2 = [];
length = items2.length;
if (length < a1) {
r3 = value;
while (true) {
Math = global.Math;
round = Math.round;
length = items2.length;
value3 = Reflect.apply(round, Math, [(length + 1) * value2]);
if (r3 < value3) {
length = a0.length;
if (!(r3 < length)) {
r2 = value;
r11 = value;
break;
}
r12 = value;
r13 = value;
while (true) {
value4 = r13 + a0[r3];
value5 = typeof r12 === 'bigint' ? r12 + 1n : +r12 + 1;
value6 = typeof r3 === 'bigint' ? r3 + 1n : +r3 + 1;
if (!(value6 < value3)) {
r2 = value5;
r11 = value4;
break;
}
length = a0.length;
if (value6 < length) {
r3 = value6;
r12 = value5;
r13 = value4;
continue;
}
r2 = value5;
r11 = value4;
break;
}
length = a0.length;
if (value6 < length) {
r3 = value6;
r12 = value5;
r13 = value4;
continue;
}
r2 = value5;
r11 = value4;
break;
} else {
r2 = value;
r11 = value;
}
} else {
r2 = value;
r11 = value;
length = items2.length;
items2[length] = r11 / r2;
length = items2.length;
if (length < a1) {
r3 = value3;
continue;
}
break;
}
length = items2.length;
items2[length] = r11 / r2;
length = items2.length;
if (length < a1) {
r3 = value3;
continue;
}
break;
}
return items2;
}
return items2;
}
global.__d(_fun90244, 11779, [44, 2]) /* metro module 11779, dependencies: [44, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,199 +1,202 @@
/* Metro module 13085; source: modules/voice_messages/native/VoiceMessagesPlaybackManager.tsx; dependencies: [6, 7, 15, 17, 18, 27, 4502, 1934, 477, 13086, 4560, 694, 4561, 2] */
import ClassCallCheck from '../../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import Dispatcher from '../../../Dispatcher.tsx'; /* Metro dependency 694 */
import SelectedChannelStore from '../../../stores/SelectedChannelStore.tsx'; /* Metro dependency 1934 */
import AccessibilityStore from '../../a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as PlatformUtilsModule from '../../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
function _fun99980(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#99980, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13275:6, offset: 0x021db066, size: 349 bytes, params: 8, frame: 22
const env0_0 = require;
const closure = pauseCurrentAudioPlayer;
const closure2 = playCurrentAudioPlayer;
const closure3 = handleVoiceMessageDeleted;
const pauseCurrentAudioPlayer2 = pauseCurrentAudioPlayer;
const playCurrentAudioPlayer2 = playCurrentAudioPlayer;
const handleVoiceMessageDeleted2 = handleVoiceMessageDeleted;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_8 = value.AppState;
const env0_9 = value.NativeModules;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
value = importDefault(4561) /* metro dependency 4561: LifecycleManager */;
value = _fun99987(value);
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_messages/native/VoiceMessagesPlaybackManager.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_messages/native/VoiceMessagesPlaybackManager.tsx');
exports.default = value;
exports.pauseCurrentAudioPlayer = closure;
exports.playCurrentAudioPlayer = closure2;
exports.handleVoiceMessageDeleted = closure3;
}
function _isNativeReflectConstruct_99981() { // fn#99981, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13275:209, offset: 0x021db1c3, 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_99981_isNativeReflectConstruct = function() {
return !!result;
})();
}
function pauseCurrentAudioPlayer(a0) { // fn#99984, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13275:402, offset: 0x021db225, size: 103 bytes, params: 2, frame: 13
var DCDAudioPlayerManager;
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (platformUtilsModule.isAndroid()) {
(importDefault(13086) /* metro dependency 13086: NativeAudioPlayerModule */).pauseCurrentPlayer(a0);
} else {
DCDAudioPlayerManager = NativeModules.DCDAudioPlayerManager;
if (DCDAudioPlayerManager != null) {
DCDAudioPlayerManager.pauseCurrentPlayer(a0);
exports.pauseCurrentAudioPlayer = pauseCurrentAudioPlayer2;
exports.playCurrentAudioPlayer = playCurrentAudioPlayer2;
exports.handleVoiceMessageDeleted = handleVoiceMessageDeleted2;
function _isNativeReflectConstruct_99981() { // fn#99981, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13275:209, offset: 0x021db1c3, 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_99981_isNativeReflectConstruct = function() {
return !!result;
})();
}
}
function playCurrentAudioPlayer() { // fn#99985, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13275:553, offset: 0x021db28c, size: 98 bytes, params: 1, frame: 12
var DCDAudioPlayerManager;
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (platformUtilsModule.isAndroid()) {
(importDefault(13086) /* metro dependency 13086: NativeAudioPlayerModule */).maybePlayCurrentPlayer();
} else {
DCDAudioPlayerManager = NativeModules.DCDAudioPlayerManager;
if (DCDAudioPlayerManager != null) {
DCDAudioPlayerManager.maybePlayCurrentPlayer();
}
}
}
function handleVoiceMessageDeleted(a0) { // fn#99986, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13275:708, offset: 0x021db2ee, size: 103 bytes, params: 2, frame: 13
var DCDAudioPlayerManager;
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (platformUtilsModule.isAndroid()) {
(importDefault(13086) /* metro dependency 13086: NativeAudioPlayerModule */).handleVoiceMessageDeleted(a0);
} else {
DCDAudioPlayerManager = NativeModules.DCDAudioPlayerManager;
if (DCDAudioPlayerManager != null) {
DCDAudioPlayerManager.handleVoiceMessageDeleted(a0);
}
}
}
function _fun99987(a0) { // fn#99987, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13275:885, offset: 0x021db355, size: 97 bytes, params: 2, frame: 16
const closure = VoiceMessagesPlaybackManager;
env0_7(closure, a0);
return env0_4(closure, [{key: '_terminate', value: value_99993}, {key: '_initialize', value: value_99994}]);
}
function VoiceMessagesPlaybackManager(a0) { // fn#99988, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13275:897, offset: 0x021db3b6, size: 200 bytes, params: 2, frame: 21
var environment;
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let value2 = environment.__proto__;
let binding = env1_3;
binding(this, VoiceMessagesPlaybackManager);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_6(VoiceMessagesPlaybackManager);
binding = env1_5;
if (_isNativeReflectConstruct_99981()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_6(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
value.appState = AppState.currentState;
value.handleSetPrefersReducedMotion = handleSetPrefersReducedMotion;
value.handleMessageDelete = function({id, channelId}) {
var value2 = channelId === SelectedChannelStore.getCurrentlySelectedChannelId();
if (value2 != null && value2) {
if (handleVoiceMessageDeleted != null) {
handleVoiceMessageDeleted(id);
function pauseCurrentAudioPlayer(a0) { // fn#99984, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13275:402, offset: 0x021db225, size: 103 bytes, params: 2, frame: 13
var DCDAudioPlayerManager;
if (PlatformUtilsModule.isAndroid()) {
(importDefault(13086) /* metro dependency 13086: NativeAudioPlayerModule */).pauseCurrentPlayer(a0);
} else {
DCDAudioPlayerManager = NativeModules.DCDAudioPlayerManager;
if (DCDAudioPlayerManager != null) {
DCDAudioPlayerManager.pauseCurrentPlayer(a0);
}
}
};
value.handleLogout = function() {
pauseCurrentAudioPlayer(false);
};
value.handleAppStateChanged = handleAppStateChanged_99992;
return value;
}
function value_99993() { // fn#99993, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13275:1911, offset: 0x021db5a5, size: 147 bytes, params: 1, frame: 18
let value = environment.__proto__;
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.unsubscribe('LOGOUT', this.handleLogout);
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.unsubscribe('MESSAGE_DELETE', this.handleMessageDelete);
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.unsubscribe('APP_STATE_UPDATE', this.handleAppStateChanged);
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.unsubscribe('ACCESSIBILITY_SET_PREFERS_REDUCED_MOTION', this.handleSetPrefersReducedMotion);
}
function value_99994() { // fn#99994, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13275:2230, offset: 0x021db638, size: 179 bytes, params: 1, frame: 19
const defaultImport = importDefault(694) /* metro dependency 694: Dispatcher */;
defaultImport.subscribe('LOGOUT', this.handleLogout);
const defaultImport2 = defaultImport;
defaultImport2.subscribe('MESSAGE_DELETE', this.handleMessageDelete);
const defaultImport3 = defaultImport;
defaultImport3.subscribe('APP_STATE_UPDATE', this.handleAppStateChanged);
const defaultImport4 = defaultImport;
defaultImport4.subscribe('ACCESSIBILITY_SET_PREFERS_REDUCED_MOTION', this.handleSetPrefersReducedMotion);
this.handleSetPrefersReducedMotion({type: 'ACCESSIBILITY_SET_PREFERS_REDUCED_MOTION',
prefersReducedMotion: AccessibilityStore.rawPrefersReducedMotion});
}
function handleSetPrefersReducedMotion(a0) { // fn#99989, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13275:1225, owner: VoiceMessagesPlaybackManager.handleSetPrefersReducedMotion, offset: 0x021db47e, size: 109 bytes, params: 2, frame: 14
var DCDAccessibilityManager;
let value = environment.__proto__.__proto__;
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (platformUtilsModule.isAndroid()) {
value = importDefault(4560) /* metro dependency 4560: NativeDeviceAccessibilityModule */;
value.handleSetPrefersReducedMotion(a0.prefersReducedMotion);
} else {
DCDAccessibilityManager = NativeModules.DCDAccessibilityManager;
DCDAccessibilityManager.handleSetPrefersReducedMotion(a0.prefersReducedMotion);
}
}
function VoiceMessagesPlaybackManagerHandleAppStateChanged({state}) { // fn#99992, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13275:1634, owner: VoiceMessagesPlaybackManager.handleAppStateChanged, offset: 0x021db533, size: 114 bytes, params: 2, frame: 14
var binding;
var appState;
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (platformUtilsModule.isAndroid()) {
binding = env0_0;
appState = binding.appState;
binding.appState = state;
if (state !== 'active') {
if (state !== 'active' && appState === 'active') {
pauseCurrentAudioPlayer(true);
function playCurrentAudioPlayer() { // fn#99985, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13275:553, offset: 0x021db28c, size: 98 bytes, params: 1, frame: 12
var DCDAudioPlayerManager;
if (PlatformUtilsModule.isAndroid()) {
(importDefault(13086) /* metro dependency 13086: NativeAudioPlayerModule */).maybePlayCurrentPlayer();
} else {
DCDAudioPlayerManager = NativeModules.DCDAudioPlayerManager;
if (DCDAudioPlayerManager != null) {
DCDAudioPlayerManager.maybePlayCurrentPlayer();
}
} else if (appState !== 'active') {
playCurrentAudioPlayer();
} else if (state !== 'active' && appState === 'active') {
pauseCurrentAudioPlayer(true);
}
}
function handleVoiceMessageDeleted(a0) { // fn#99986, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13275:708, offset: 0x021db2ee, size: 103 bytes, params: 2, frame: 13
var DCDAudioPlayerManager;
if (PlatformUtilsModule.isAndroid()) {
(importDefault(13086) /* metro dependency 13086: NativeAudioPlayerModule */).handleVoiceMessageDeleted(a0);
} else {
DCDAudioPlayerManager = NativeModules.DCDAudioPlayerManager;
if (DCDAudioPlayerManager != null) {
DCDAudioPlayerManager.handleVoiceMessageDeleted(a0);
}
}
}
function _fun99987(a0) { // fn#99987, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13275:885, offset: 0x021db355, size: 97 bytes, params: 2, frame: 16
const VoiceMessagesPlaybackManager2 = VoiceMessagesPlaybackManager;
Inherits(VoiceMessagesPlaybackManager2, a0);
return CreateClass(VoiceMessagesPlaybackManager2, [{key: '_terminate', value: value_99993}, {key: '_initialize',
value: value_99994}]);
function VoiceMessagesPlaybackManager(a0) { // fn#99988, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13275:897, offset: 0x021db3b6, size: 200 bytes, params: 2, frame: 21
var environment;
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let value2 = environment.__proto__;
let binding = env1_3;
binding(this, VoiceMessagesPlaybackManager);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_6(VoiceMessagesPlaybackManager);
binding = env1_5;
if (_isNativeReflectConstruct_99981()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_6(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
value.appState = AppState.currentState;
value.handleSetPrefersReducedMotion = handleSetPrefersReducedMotion;
value.handleMessageDelete = function({id, channelId}) {
var value2 = channelId === SelectedChannelStore.getCurrentlySelectedChannelId();
if (value2 != null && value2) {
if (handleVoiceMessageDeleted != null) {
handleVoiceMessageDeleted(id);
}
}
};
value.handleLogout = function() {
pauseCurrentAudioPlayer(false);
};
value.handleAppStateChanged = handleAppStateChanged_99992;
return value;
function handleSetPrefersReducedMotion(a0) { // fn#99989, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13275:1225, owner: VoiceMessagesPlaybackManager.handleSetPrefersReducedMotion, offset: 0x021db47e, size: 109 bytes, params: 2, frame: 14
var DCDAccessibilityManager;
let value = environment.__proto__.__proto__;
if (PlatformUtilsModule.isAndroid()) {
value = importDefault(4560) /* metro dependency 4560: NativeDeviceAccessibilityModule */;
value.handleSetPrefersReducedMotion(a0.prefersReducedMotion);
} else {
DCDAccessibilityManager = NativeModules.DCDAccessibilityManager;
DCDAccessibilityManager.handleSetPrefersReducedMotion(a0.prefersReducedMotion);
}
}
function VoiceMessagesPlaybackManagerHandleAppStateChanged({state}) { // fn#99992, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13275:1634, owner: VoiceMessagesPlaybackManager.handleAppStateChanged, offset: 0x021db533, size: 114 bytes, params: 2, frame: 14
var binding;
var appState;
if (PlatformUtilsModule.isAndroid()) {
binding = env0_0;
appState = binding.appState;
binding.appState = state;
if (state !== 'active') {
if (state !== 'active' && appState === 'active') {
pauseCurrentAudioPlayer(true);
}
} else if (appState !== 'active') {
playCurrentAudioPlayer();
} else if (state !== 'active' && appState === 'active') {
pauseCurrentAudioPlayer(true);
}
}
}
}
function value_99993() { // fn#99993, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13275:1911, offset: 0x021db5a5, size: 147 bytes, params: 1, frame: 18
let value = environment.__proto__;
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.unsubscribe('LOGOUT', this.handleLogout);
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.unsubscribe('MESSAGE_DELETE', this.handleMessageDelete);
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.unsubscribe('APP_STATE_UPDATE', this.handleAppStateChanged);
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.unsubscribe('ACCESSIBILITY_SET_PREFERS_REDUCED_MOTION', this.handleSetPrefersReducedMotion);
}
function value_99994() { // fn#99994, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13275:2230, offset: 0x021db638, size: 179 bytes, params: 1, frame: 19
const defaultImport = Dispatcher;
defaultImport.subscribe('LOGOUT', this.handleLogout);
const defaultImport2 = defaultImport;
defaultImport2.subscribe('MESSAGE_DELETE', this.handleMessageDelete);
const defaultImport3 = defaultImport;
defaultImport3.subscribe('APP_STATE_UPDATE', this.handleAppStateChanged);
const defaultImport4 = defaultImport;
defaultImport4.subscribe('ACCESSIBILITY_SET_PREFERS_REDUCED_MOTION', this.handleSetPrefersReducedMotion);
this.handleSetPrefersReducedMotion({type: 'ACCESSIBILITY_SET_PREFERS_REDUCED_MOTION',
prefersReducedMotion: AccessibilityStore.rawPrefersReducedMotion});
}
}
}
global.__d(_fun99980, 13085, [6, 7, 15, 17, 18, 27, 4502, 1934, 477, 13086, 4560, 694, 4561,
2]) /* metro module 13085, dependencies: [6, 7, 15, 17, 18, 27, 4502, 1934, 477, 13086, 4560, 694, 4561, 2] */;
@@ -1,20 +1,24 @@
/* Metro module 11527; source: modules/voice_messages/native/VoiceMessagesUIStore.tsx; dependencies: [11528, 629, 4017, 690, 4577, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactBatchUpdatesNativeModule from '../../../external/discord_common/js/shared/utils/ReactBatchUpdates.native.tsx'; /* Metro dependency 690 */
import * as ReanimatedRexportModule from '../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as VoiceMessageConstantsModule from '../VoiceMessageConstants.tsx'; /* Metro dependency 11528 */
function _fun88278(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88278, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11713:6, offset: 0x01fde553, size: 349 bytes, params: 8, frame: 19
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = require(11528) /* metro dependency 11528: VoiceMessageConstants */;
let value = VoiceMessageConstantsModule;
const env0_2 = value.VoiceMessageAnimationState;
const env0_3 = value.WAVEFORM_WAVE_MAX_VALUE;
object2 = {REQUESTED: 0};
object2[0] = 'REQUESTED';
object2.STARTED = 1;
object2[1] = 'STARTED';
object = {REQUESTED: 0};
object[0] = 'REQUESTED';
object.STARTED = 1;
object[1] = 'STARTED';
value = require(629) /* metro dependency 629 */;
value = value.create(_fun88279);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_messages/native/VoiceMessagesUIStore.tsx');
exports.VoiceMessageRecordingStatus = object2;
(FileImportTrackerModule).fileFinishedImporting('modules/voice_messages/native/VoiceMessagesUIStore.tsx');
exports.VoiceMessageRecordingStatus = object;
exports.useVoiceMessagesUIStore = value;
exports.setShowRecordingOverlay = setShowRecordingOverlay;
exports.setVoiceMessageRecordingState = setVoiceMessageRecordingState;
@@ -28,154 +32,155 @@ function _fun88278(global, require, importDefault, importAll, module, exports, d
exports.setSavedVoiceMessageUploadData = setSavedVoiceMessageUploadData;
exports.setIsVoiceMessageButtonMounted = setIsVoiceMessageButtonMounted;
exports.setIsUsingHoldGesture = setIsUsingHoldGesture;
}
function _fun88279() { // fn#88279, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11713:265, offset: 0x01fde6b0, size: 135 bytes, params: 1, frame: 15
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const makeMutable = reanimatedRexportModule.makeMutable;
let SENDING = VoiceMessageAnimationState.SENDING;
const items2 = [SENDING];
SENDING = VoiceMessageAnimationState.SENDING;
items2[1] = SENDING;
return {'voiceMessageAnimationState': null, 'recordingStatus': null, 'recordingId': null, 'currWaveHeight': null,
'showRecordingOverlay': false, voiceMessageAnimationState: Reflect.apply(makeMutable, reanimatedRexportModule,
[items2]), currWaveHeight: undefined, startTimeMillis: undefined, waveform: [], waveformVersion: 0,
showVoiceMessagesTooltip: false, savedVoiceMessageUploadData: undefined, isVoiceMessageButtonMounted: false,
isUsingHoldGesture: false};
}
function setShowRecordingOverlay(a0) { // fn#88280, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11713:776, offset: 0x01fde737, size: 54 bytes, params: 2, frame: 12
const env0_0 = a0;
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun88281);
}
function setVoiceMessageRecordingState(a0) { // fn#88282, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11713:912, offset: 0x01fde791, size: 54 bytes, params: 2, frame: 12
const env0_0 = a0;
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun88283);
}
function setVoiceMessageRecordingId(a0) { // fn#88284, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11713:1046, offset: 0x01fde7eb, size: 54 bytes, params: 2, frame: 12
const env0_0 = a0;
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun88285);
}
function setVoiceMessageStartTimeMillis(a0) { // fn#88286, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11713:1177, offset: 0x01fde845, size: 54 bytes, params: 2, frame: 12
const env0_0 = a0;
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun88287);
}
function setVoiceMessageAnimationState(a0) { // fn#88288, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11713:1315, offset: 0x01fde89f, size: 54 bytes, params: 2, frame: 12
const env0_0 = a0;
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun88289);
}
function addVoiceMessageWave(a0) { // fn#88290, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11713:1429, offset: 0x01fde8fb, size: 184 bytes, params: 2, frame: 18
var set;
var moduleValue;
const binding = env0_5;
let getState = binding.getState;
const waveform = Reflect.apply(getState, binding, []).waveform;
getState = binding.getState;
const waveformVersion = Reflect.apply(getState, binding, []).waveformVersion;
getState = binding.getState;
const currWaveHeight = Reflect.apply(getState, binding, []).currWaveHeight;
if (currWaveHeight != null) {
set = currWaveHeight.set;
moduleValue = require(4577) /* metro dependency 4577: spring */;
Reflect.apply(set, currWaveHeight, [moduleValue.withSpring(a0 / WAVEFORM_WAVE_MAX_VALUE)]);
function _fun88279() { // fn#88279, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11713:265, offset: 0x01fde6b0, size: 135 bytes, params: 1, frame: 15
const makeMutable = ReanimatedRexportModule.makeMutable;
let SENDING = VoiceMessageAnimationState.SENDING;
const items2 = [SENDING];
SENDING = VoiceMessageAnimationState.SENDING;
items2[1] = SENDING;
return {'voiceMessageAnimationState': null, 'recordingStatus': null, 'recordingId': null, 'currWaveHeight': null,
'showRecordingOverlay': false, voiceMessageAnimationState: Reflect.apply(makeMutable, ReanimatedRexportModule,
[items2]), currWaveHeight: undefined, startTimeMillis: undefined, waveform: [], waveformVersion: 0,
showVoiceMessagesTooltip: false, savedVoiceMessageUploadData: undefined, isVoiceMessageButtonMounted: false,
isUsingHoldGesture: false};
}
waveform.push([a0, waveformVersion]);
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun88291);
}
function showVoiceMessagesTooltip() { // fn#88292, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11713:1696, offset: 0x01fde9de, size: 47 bytes, params: 1, frame: 12
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun88293);
}
function setShowRecordingOverlay(a0) { // fn#88280, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11713:776, offset: 0x01fde737, size: 54 bytes, params: 2, frame: 12
const env0_0 = a0;
(ReactBatchUpdatesNativeModule).batchUpdates(_fun88281);
function _fun88281() { // fn#88281, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11713:834, offset: 0x01fde76d, size: 36 bytes, params: 1, frame: 12
env1_4.setState({showRecordingOverlay: env0_0});
}
function hideVoiceMessagesTooltip() { // fn#88294, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11713:1832, offset: 0x01fdea2c, size: 47 bytes, params: 1, frame: 12
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun88295);
}
function resetVoiceMessageState() { // fn#88296, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11713:1966, offset: 0x01fdea7a, size: 115 bytes, params: 1, frame: 14
var set;
var value;
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun88297);
const binding = env0_5;
const getState = binding.getState;
const currWaveHeight = Reflect.apply(getState, binding, []).currWaveHeight;
if (currWaveHeight != null) {
set = currWaveHeight.set;
value = require(4577) /* metro dependency 4577: spring */;
Reflect.apply(set, currWaveHeight, [value.withSpring(0)]);
}
function setVoiceMessageRecordingState(a0) { // fn#88282, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11713:912, offset: 0x01fde791, size: 54 bytes, params: 2, frame: 12
const env0_0 = a0;
(ReactBatchUpdatesNativeModule).batchUpdates(_fun88283);
function _fun88283() { // fn#88283, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11713:976, offset: 0x01fde7c7, size: 36 bytes, params: 1, frame: 12
env1_4.setState({recordingStatus: env0_0});
}
}
function setVoiceMessageRecordingId(a0) { // fn#88284, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11713:1046, offset: 0x01fde7eb, size: 54 bytes, params: 2, frame: 12
const env0_0 = a0;
(ReactBatchUpdatesNativeModule).batchUpdates(_fun88285);
function _fun88285() { // fn#88285, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11713:1107, offset: 0x01fde821, size: 36 bytes, params: 1, frame: 12
env1_4.setState({recordingId: env0_0});
}
}
function setVoiceMessageStartTimeMillis(a0) { // fn#88286, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11713:1177, offset: 0x01fde845, size: 54 bytes, params: 2, frame: 12
const env0_0 = a0;
(ReactBatchUpdatesNativeModule).batchUpdates(_fun88287);
function _fun88287() { // fn#88287, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11713:1242, offset: 0x01fde87b, size: 36 bytes, params: 1, frame: 12
env1_4.setState({startTimeMillis: env0_0});
}
}
function setVoiceMessageAnimationState(a0) { // fn#88288, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11713:1315, offset: 0x01fde89f, size: 54 bytes, params: 2, frame: 12
const env0_0 = a0;
(ReactBatchUpdatesNativeModule).batchUpdates(_fun88289);
function _fun88289() { // fn#88289, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11713:1379, offset: 0x01fde8d5, size: 38 bytes, params: 1, frame: 13
const value = environment.__proto__;
const binding = env1_4;
const setState = binding.setState;
const object = {};
copyDataProperties(object, env0_0, environment);
Reflect.apply(setState, binding, [object]);
}
}
function addVoiceMessageWave(a0) { // fn#88290, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11713:1429, offset: 0x01fde8fb, size: 184 bytes, params: 2, frame: 18
var set;
var moduleValue;
const binding = env0_5;
let getState = binding.getState;
const waveform = Reflect.apply(getState, binding, []).waveform;
getState = binding.getState;
const waveformVersion = Reflect.apply(getState, binding, []).waveformVersion;
getState = binding.getState;
const currWaveHeight = Reflect.apply(getState, binding, []).currWaveHeight;
if (currWaveHeight != null) {
set = currWaveHeight.set;
moduleValue = require(4577) /* metro dependency 4577: spring */;
Reflect.apply(set, currWaveHeight, [moduleValue.withSpring(a0 / WAVEFORM_WAVE_MAX_VALUE)]);
}
waveform.push([a0, waveformVersion]);
(ReactBatchUpdatesNativeModule).batchUpdates(_fun88291);
function _fun88291() { // fn#88291, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11713:1626, offset: 0x01fde9b3, size: 43 bytes, params: 1, frame: 13
env1_4.setState({waveformVersion: waveformVersion + 1});
}
}
function showVoiceMessagesTooltip() { // fn#88292, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11713:1696, offset: 0x01fde9de, size: 47 bytes, params: 1, frame: 12
(ReactBatchUpdatesNativeModule).batchUpdates(_fun88293);
function _fun88293() { // fn#88293, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11713:1754, offset: 0x01fdea0d, size: 31 bytes, params: 1, frame: 12
env1_4.setState({showVoiceMessagesTooltip: true});
}
}
function hideVoiceMessagesTooltip() { // fn#88294, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11713:1832, offset: 0x01fdea2c, size: 47 bytes, params: 1, frame: 12
(ReactBatchUpdatesNativeModule).batchUpdates(_fun88295);
function _fun88295() { // fn#88295, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11713:1890, offset: 0x01fdea5b, size: 31 bytes, params: 1, frame: 12
env1_4.setState({showVoiceMessagesTooltip: false});
}
}
function resetVoiceMessageState() { // fn#88296, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11713:1966, offset: 0x01fdea7a, size: 115 bytes, params: 1, frame: 14
var set;
var value;
(ReactBatchUpdatesNativeModule).batchUpdates(_fun88297);
const binding = env0_5;
const getState = binding.getState;
const currWaveHeight = Reflect.apply(getState, binding, []).currWaveHeight;
if (currWaveHeight != null) {
set = currWaveHeight.set;
value = require(4577) /* metro dependency 4577: spring */;
Reflect.apply(set, currWaveHeight, [value.withSpring(0)]);
}
function _fun88297() { // fn#88297, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11713:2022, offset: 0x01fdeaed, size: 56 bytes, params: 1, frame: 13
env1_4.setState({'waveform': null, 'waveformVersion': 0, 'showRecordingOverlay': false, waveform: [],
startTimeMillis: undefined, savedVoiceMessageUploadData: undefined});
}
}
function setSavedVoiceMessageUploadData(a0) { // fn#88298, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11713:2262, offset: 0x01fdeb25, size: 54 bytes, params: 2, frame: 12
const env0_0 = a0;
(ReactBatchUpdatesNativeModule).batchUpdates(_fun88299);
function _fun88299() { // fn#88299, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11713:2327, offset: 0x01fdeb5b, size: 36 bytes, params: 1, frame: 12
env1_4.setState({savedVoiceMessageUploadData: env0_0});
}
}
function setIsVoiceMessageButtonMounted(a0) { // fn#88300, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11713:2413, offset: 0x01fdeb7f, size: 54 bytes, params: 2, frame: 12
const env0_0 = a0;
(ReactBatchUpdatesNativeModule).batchUpdates(_fun88301);
function _fun88301() { // fn#88301, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11713:2478, offset: 0x01fdebb5, size: 36 bytes, params: 1, frame: 12
env1_4.setState({isVoiceMessageButtonMounted: env0_0});
}
}
function setIsUsingHoldGesture(a0) { // fn#88302, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11713:2555, offset: 0x01fdebd9, size: 54 bytes, params: 2, frame: 12
const env0_0 = a0;
(ReactBatchUpdatesNativeModule).batchUpdates(_fun88303);
function _fun88303() { // fn#88303, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11713:2611, offset: 0x01fdec0f, size: 36 bytes, params: 1, frame: 12
env1_4.setState({isUsingHoldGesture: env0_0});
}
}
}
function setSavedVoiceMessageUploadData(a0) { // fn#88298, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11713:2262, offset: 0x01fdeb25, size: 54 bytes, params: 2, frame: 12
const env0_0 = a0;
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun88299);
}
function setIsVoiceMessageButtonMounted(a0) { // fn#88300, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11713:2413, offset: 0x01fdeb7f, size: 54 bytes, params: 2, frame: 12
const env0_0 = a0;
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun88301);
}
function setIsUsingHoldGesture(a0) { // fn#88302, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11713:2555, offset: 0x01fdebd9, size: 54 bytes, params: 2, frame: 12
const env0_0 = a0;
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun88303);
}
function _fun88281() { // fn#88281, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11713:834, offset: 0x01fde76d, size: 36 bytes, params: 1, frame: 12
env1_4.setState({showRecordingOverlay: env0_0});
}
function _fun88283() { // fn#88283, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11713:976, offset: 0x01fde7c7, size: 36 bytes, params: 1, frame: 12
env1_4.setState({recordingStatus: env0_0});
}
function _fun88285() { // fn#88285, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11713:1107, offset: 0x01fde821, size: 36 bytes, params: 1, frame: 12
env1_4.setState({recordingId: env0_0});
}
function _fun88287() { // fn#88287, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11713:1242, offset: 0x01fde87b, size: 36 bytes, params: 1, frame: 12
env1_4.setState({startTimeMillis: env0_0});
}
function _fun88289() { // fn#88289, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11713:1379, offset: 0x01fde8d5, size: 38 bytes, params: 1, frame: 13
const value = environment.__proto__;
const binding = env1_4;
const setState = binding.setState;
const object2 = {};
copyDataProperties(object2, env0_0, environment);
Reflect.apply(setState, binding, [object2]);
}
function _fun88291() { // fn#88291, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11713:1626, offset: 0x01fde9b3, size: 43 bytes, params: 1, frame: 13
env1_4.setState({waveformVersion: waveformVersion + 1});
}
function _fun88293() { // fn#88293, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11713:1754, offset: 0x01fdea0d, size: 31 bytes, params: 1, frame: 12
env1_4.setState({showVoiceMessagesTooltip: true});
}
function _fun88295() { // fn#88295, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11713:1890, offset: 0x01fdea5b, size: 31 bytes, params: 1, frame: 12
env1_4.setState({showVoiceMessagesTooltip: false});
}
function _fun88297() { // fn#88297, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11713:2022, offset: 0x01fdeaed, size: 56 bytes, params: 1, frame: 13
env1_4.setState({'waveform': null, 'waveformVersion': 0, 'showRecordingOverlay': false, waveform: [],
startTimeMillis: undefined, savedVoiceMessageUploadData: undefined});
}
function _fun88299() { // fn#88299, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11713:2327, offset: 0x01fdeb5b, size: 36 bytes, params: 1, frame: 12
env1_4.setState({savedVoiceMessageUploadData: env0_0});
}
function _fun88301() { // fn#88301, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11713:2478, offset: 0x01fdebb5, size: 36 bytes, params: 1, frame: 12
env1_4.setState({isVoiceMessageButtonMounted: env0_0});
}
function _fun88303() { // fn#88303, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11713:2611, offset: 0x01fdec0f, size: 36 bytes, params: 1, frame: 12
env1_4.setState({isUsingHoldGesture: env0_0});
}
global.__d(_fun88278, 11527, [11528, 629, 4017, 690, 4577,
2]) /* metro module 11527, dependencies: [11528, 629, 4017, 690, 4577, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,407 +1,423 @@
/* Metro module 11964; source: modules/voice_messages/native/components/VoiceMessageChat.tsx; dependencies: [57, 31, 27, 4502, 11527, 11528, 661, 33, 4017, 4501, 697, 477, 4577, 4504, 3860, 4690, 3868, 4573, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import ReanimatedRexport from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import AccessibilityStore from '../../../a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as PlatformUtilsModule from '../../../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as UseTokenModule from '../../../../design/tokens/native/useToken.tsx'; /* Metro dependency 3860 */
import * as NativeModule from '../../../../external/discord_common/js/packages/design/native.tsx'; /* Metro dependency 3868 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TimingModule from '../../../../design/animation/reanimated/timing/timing.tsx'; /* Metro dependency 4504 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as SpringModule from '../../../../design/animation/reanimated/spring/spring.tsx'; /* Metro dependency 4577 */
import * as TimeUtilsModule from '../../../../utils/native/TimeUtils.tsx'; /* Metro dependency 4690 */
import * as VoiceMessagesUIStoreModule from '../VoiceMessagesUIStore.tsx'; /* Metro dependency 11527 */
import * as VoiceMessageConstantsModule from '../../VoiceMessageConstants.tsx'; /* Metro dependency 11528 */
function _fun91820(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#91820, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12150:6, offset: 0x02073ea3, size: 895 bytes, params: 8, frame: 29
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const value = undefined;
const env0_3 = importDefault(57) /* metro dependency 57 */;
const value2 = importAll(31) /* metro dependency 31 */;
const value3 = require(27) /* metro dependency 27 */;
const ActivityIndicator = value3.ActivityIndicator;
const env0_5 = value3.View;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const env0_7 = (require(11527) /* metro dependency 11527: VoiceMessagesUIStore */).useVoiceMessagesUIStore;
const voiceMessageConstantsModule = require(11528) /* metro dependency 11528: VoiceMessageConstants */;
const env0_8 = voiceMessageConstantsModule.VOICE_RECORDING_MAX_DURATION_MILLIS;
const env0_9 = voiceMessageConstantsModule.VOICE_RECORDING_MAX_DURATION_OFFSET;
const env0_10 = voiceMessageConstantsModule.VOICE_RECORDING_REALLY_WARN_DURATION_MILLIS;
const env0_11 = voiceMessageConstantsModule.VOICE_RECORDING_WARN_DURATION_MILLIS;
const env0_12 = voiceMessageConstantsModule.WAVEFORM_WAVE_MAX_VALUE;
const env0_13 = (require(661) /* metro dependency 661: Constants */).ThemeTypes;
const value5 = require(33) /* metro dependency 33 */;
const env0_14 = value5.jsx;
const env0_15 = value5.jsxs;
const env0_16 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).createAnimatedComponent(ActivityIndicator);
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object3 = {};
const object4 = {'height': '100%', 'flexDirection': 'row', 'alignItems': 'center', 'paddingVertical': null,
const ActivityIndicator = ReactNativeModule.ActivityIndicator;
const env0_16 = (ReanimatedRexport).createAnimatedComponent(ActivityIndicator);
const createStyles = CreateStylesModule.createStyles;
object = {};
const object2 = {'height': '100%', 'flexDirection': 'row', 'alignItems': 'center', 'paddingVertical': null,
'paddingHorizontal': 12};
const value8 = 'center';
let mobile = (importDefault(697) /* metro dependency 697: native */).modules.mobile;
const VOICE_MESSAGE_RECORDING_CONTAINER_PADDING_VERTICAL = mobile.VOICE_MESSAGE_RECORDING_CONTAINER_PADDING_VERTICAL;
object4.paddingVertical = VOICE_MESSAGE_RECORDING_CONTAINER_PADDING_VERTICAL;
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xxl;
object3.container = object4;
object3.loading = {'position': 'absolute', 'left': 12};
object2.paddingVertical = VOICE_MESSAGE_RECORDING_CONTAINER_PADDING_VERTICAL;
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xxl;
object.container = object2;
object.loading = {'position': 'absolute', 'left': 12};
const RED_400 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.RED_400;
object3.dot = {'height': 6, 'width': 6, 'backgroundColor': null, 'marginHorizontal': 4, 'borderRadius': 6,
object.dot = {'height': 6, 'width': 6, 'backgroundColor': null, 'marginHorizontal': 4, 'borderRadius': 6,
backgroundColor: RED_400};
object3.dotDismissed = {backgroundColor: 'transparent'};
object3.waveformContainer = {'flex': 1, 'height': '100%', 'overflow': 'hidden', 'justifyContent': 'flex-end',
object.dotDismissed = {backgroundColor: 'transparent'};
object.waveformContainer = {'flex': 1, 'height': '100%', 'overflow': 'hidden', 'justifyContent': 'flex-end',
'flexDirection': 'row', 'alignItems': 'center', 'marginLeft': 8};
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
object3.waveformBar = {backgroundColor: WHITE, borderRadius: 1};
object3.durationContainer = {'flexDirection': 'row', 'alignItems': 'center'};
const object5 = {};
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
const isAndroid2 = platformUtilsModule.isAndroid();
object.waveformBar = {backgroundColor: WHITE, borderRadius: 1};
object.durationContainer = {'flexDirection': 'row', 'alignItems': 'center'};
const object6 = {};
const isAndroid2 = PlatformUtilsModule.isAndroid();
mobile = (importDefault(697) /* metro dependency 697: native */).modules.mobile;
object5.lineHeight = isAndroid2 ? mobile.VOICE_MESSAGE_DURATION_LINE_HEIGHT_ANDROID : mobile.VOICE_MESSAGE_DURATION_LINE_HEIGHT_IOS;
const value10 = platformUtilsModule;
object5.textAlignVertical = value10.isAndroid() ? value8 : value;
object3.duration = object5;
const env0_17 = Reflect.apply(createStyles, createStylesModule, [object3]);
object3 = {code: 'function VoiceMessageChatTsx1(){const{animatedHeight,animatedWidth,animatedMargin}=this.__closure;return{height:animatedHeight.get(),width:animatedWidth.get(),marginRight:animatedMargin.get()};}'};
object3 = {WARN: 0};
object3[0] = 'WARN';
object3.REALLY_WARN = 1;
object3[1] = 'REALLY_WARN';
object3.ENDED = 2;
object3[2] = 'ENDED';
object3 = {code: 'function VoiceMessageChatTsx2(){const{animationValue}=this.__closure;return{opacity:animationValue.get()};}'};
object3 = {code: 'function VoiceMessageChatTsx3(){const{initialAnimation,isRecording}=this.__closure;return initialAnimation.get()===1&&isRecording;}'};
object3 = {code: 'function VoiceMessageChatTsx4(result,previous){const{animationValue,withTiming,Easing,loadingOpacity}=this.__closure;if(result&&result!==previous){animationValue.set(withTiming(1,{easing:Easing.quad,duration:200}));loadingOpacity.set(0);}}'};
object3 = {code: 'function VoiceMessageChatTsx5(){const{initialAnimation,backgroundColor}=this.__closure;return{width:80+20*initialAnimation.get()+"%",backgroundColor:backgroundColor.get()};}'};
object3 = {code: 'function VoiceMessageChatTsx6(){const{loadingOpacity}=this.__closure;return{opacity:loadingOpacity.get()};}'};
const value11 = value2.memo(_fun91843);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_messages/native/components/VoiceMessageChat.tsx');
object6.lineHeight = isAndroid2 ? mobile.VOICE_MESSAGE_DURATION_LINE_HEIGHT_ANDROID : mobile.VOICE_MESSAGE_DURATION_LINE_HEIGHT_IOS;
object6.textAlignVertical = PlatformUtilsModule.isAndroid() ? value8 : value;
object.duration = object6;
const env0_17 = Reflect.apply(createStyles, CreateStylesModule, [object]);
object = {code: 'function VoiceMessageChatTsx1(){const{animatedHeight,animatedWidth,animatedMargin}=this.__closure;return{height:animatedHeight.get(),width:animatedWidth.get(),marginRight:animatedMargin.get()};}'};
object = {WARN: 0};
object[0] = 'WARN';
object.REALLY_WARN = 1;
object[1] = 'REALLY_WARN';
object.ENDED = 2;
object[2] = 'ENDED';
object = {code: 'function VoiceMessageChatTsx2(){const{animationValue}=this.__closure;return{opacity:animationValue.get()};}'};
object = {code: 'function VoiceMessageChatTsx3(){const{initialAnimation,isRecording}=this.__closure;return initialAnimation.get()===1&&isRecording;}'};
object = {code: 'function VoiceMessageChatTsx4(result,previous){const{animationValue,withTiming,Easing,loadingOpacity}=this.__closure;if(result&&result!==previous){animationValue.set(withTiming(1,{easing:Easing.quad,duration:200}));loadingOpacity.set(0);}}'};
object = {code: 'function VoiceMessageChatTsx5(){const{initialAnimation,backgroundColor}=this.__closure;return{width:80+20*initialAnimation.get()+"%",backgroundColor:backgroundColor.get()};}'};
object = {code: 'function VoiceMessageChatTsx6(){const{loadingOpacity}=this.__closure;return{opacity:loadingOpacity.get()};}'};
const value11 = ReactModule.memo(_fun91843);
(FileImportTrackerModule).fileFinishedImporting('modules/voice_messages/native/components/VoiceMessageChat.tsx');
exports.default = value11;
return value;
}
function WaveformBar({value}) { // fn#91821, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12150:1618, offset: 0x02074222, size: 314 bytes, params: 2, frame: 24
const styles = useStyles();
const value3 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
const value4 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
const value5 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = WaveformBarO;
closure.__closure = {animatedHeight: value3, animatedWidth: value4, animatedMargin: value5};
closure.__workletHash = 8768145898720;
closure.__initData = env0_18;
const value6 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
env0_4.useEffect(_fun91823, [value3, value]);
env0_4.useEffect(_fun91824, [value4, value5]);
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
return <View style={[styles.waveformBar, value6]} />;
}
function Waveform() { // fn#91825, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12150:2281, offset: 0x020744c0, size: 184 bytes, params: 1, frame: 18
const styles = useStyles();
useVoiceMessagesUIStore(function(a0) {
return a0.waveformVersion;
});
const value2 = useVoiceMessagesUIStore(function(a0) {
return a0.waveform;
});
const [property, env0_0] = env0_3(env0_4.useState(0), 2);
return (
<View style={styles.waveformContainer} onLayout={env0_4.useCallback(_fun91828, [])}>
{value2.slice(-property).map(_fun91829)}
</View>
);
}
function Duration({animationValue}) { // fn#91830, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12150:2824, offset: 0x0207462b, size: 685 bytes, params: 2, frame: 29
const styles = useStyles();
const value2 = useVoiceMessagesUIStore(function(a0) {
return a0.startTimeMillis;
});
var [property, env0_3] = env0_3Binding(env0_4.useState(_fun91832), 2);
const value6 = env0_3Binding(env0_4.useState(undefined), 2);
const property2 = value6[0];
var env0_4 = property2;
const env0_5 = value6[1];
const value7 = useVoiceMessagesUIStore(function(a0) {
return a0.savedVoiceMessageUploadData != null;
});
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
const useToken = useTokenModule.useToken;
const VOICE_MESSAGE_DURATION_TEXT_STYLE = (importDefault(697) /* metro dependency 697: native */).modules.mobile.VOICE_MESSAGE_DURATION_TEXT_STYLE;
const value8 = Reflect.apply(useToken, useTokenModule, [VOICE_MESSAGE_DURATION_TEXT_STYLE]);
env0_4.useEffect(_fun91834, [value2, value7]);
const value9 = env0_4.useMemo(_fun91837, [property]);
var [property, env0_7] = env0_3Binding(env0_4.useState(false), 2);
env0_4.useEffect(_fun91838, [property2]);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = function() {
var object = {};
object.opacity = animationValue.get();
return object;
};
closure.__closure = {animationValue: animationValue};
closure.__workletHash = 4012974382717;
closure.__initData = env0_20;
const value12 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const ThemeContextProvider = (require(3868) /* metro dependency 3868: native */).ThemeContextProvider;
const DARK = ThemeTypes.DARK;
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const items2 = [styles.durationContainer, value12];
const view = <View style={[styles.dot, !(value2 != null && !value7) && styles.dotDismissed]} />;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<ThemeContextProvider theme={DARK}>
<View2 style={items2}>
{view}
<Text
style={styles.duration}
variant={value8}
color={property ? 'text-feedback-critical' : 'always-white'}
tabularNumbers
>
{value9}
</Text>
</View2>
</ThemeContextProvider>
);
}
function _fun91843({isRecording, initialAnimation, backgroundColor}) { // fn#91843, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12150:4807, offset: 0x02074aee, size: 638 bytes, params: 2, frame: 27
var object2;
const styles = useStyles();
const value2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
env0_4.useEffect(function() {
if (isRecording) {
return undefined;
function WaveformBar({value}) { // fn#91821, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12150:1618, offset: 0x02074222, size: 314 bytes, params: 2, frame: 24
const styles = useStyles();
const value3 = (ReanimatedRexportModule).useSharedValue(0);
const value4 = (ReanimatedRexportModule).useSharedValue(0);
const value5 = (ReanimatedRexportModule).useSharedValue(0);
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
const WaveformBarO2 = WaveformBarO;
WaveformBarO2.__closure = {animatedHeight: value3, animatedWidth: value4, animatedMargin: value5};
WaveformBarO2.__workletHash = 8768145898720;
WaveformBarO2.__initData = env0_18;
const value6 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [WaveformBarO2]);
env0_4.useEffect(_fun91823, [value3, value]);
env0_4.useEffect(_fun91824, [value4, value5]);
const View = (ReanimatedRexport).View;
return <View style={[styles.waveformBar, value6]} />;
function WaveformBarO() { // fn#91822, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12150:1777, owner: WaveformBar.o, offset: 0x0207435c, size: 59 bytes, params: 1, frame: 11
const object = {};
object.height = env0_1.get();
object.width = env0_2.get();
object.marginRight = Module00057.get();
return object;
}
var env0_0 = global.setTimeout(_fun91845, 1000);
return _fun91846;
}, [value2, isRecording]);
const value3 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedReaction = reanimatedRexportModule.useAnimatedReaction;
let closure = function() {
return initialAnimation.get() === 1 && isRecording;
};
closure.__closure = {initialAnimation: initialAnimation, isRecording: isRecording};
closure.__workletHash = 7599681139161;
closure.__initData = env0_21;
const closure2 = c_91848;
object2 = {animationValue: value3};
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
const Easing = reanimatedRexportModule.Easing;
object2.Easing = Easing;
object2.loadingOpacity = value2;
closure2.__closure = object2;
closure2.__workletHash = 7661977794788;
closure2.__initData = env0_22;
Reflect.apply(useAnimatedReaction, reanimatedRexportModule, [closure, closure2]);
const moduleValue4 = reanimatedRexportModule;
let useAnimatedStyle = moduleValue4.useAnimatedStyle;
closure = function() {
var object = {};
object.width = 80 + 20 * initialAnimation.get() + '%';
object.backgroundColor = backgroundColor.get();
return object;
};
closure.__closure = {initialAnimation: initialAnimation, backgroundColor: backgroundColor};
closure.__workletHash = 9739486182352;
closure.__initData = env0_23;
const value4 = Reflect.apply(useAnimatedStyle, moduleValue4, [closure]);
const moduleValue5 = reanimatedRexportModule;
useAnimatedStyle = moduleValue5.useAnimatedStyle;
closure = E_91850;
closure.__closure = {loadingOpacity: value2};
closure.__workletHash = 17421928475897;
closure.__initData = env0_24;
const value5 = Reflect.apply(useAnimatedStyle, moduleValue5, [closure]);
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
return (
<View style={[styles.container, value4]}>
{isRecording ? null : ((Component) => <Component style={[styles.loading,
value5]} color={(importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE} size="small" />)(env0_16)}
<Duration animationValue={value3} />
<Waveform />
</View>
);
}
function WaveformBarO() { // fn#91822, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12150:1777, owner: WaveformBar.o, offset: 0x0207435c, size: 59 bytes, params: 1, frame: 11
const object2 = {};
object2.height = env0_1.get();
object2.width = env0_2.get();
object2.marginRight = env0_3.get();
return object2;
}
function _fun91823() { // fn#91823, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12150:1978, offset: 0x02074397, size: 129 bytes, params: 1, frame: 18
let Math = global.Math;
const value5 = 20 * Math.min(1, value / WAVEFORM_WAVE_MAX_VALUE * 1.25);
const binding = env0_1;
const set = binding.set;
const springModule = require(4577) /* metro dependency 4577: spring */;
const withSpring = springModule.withSpring;
Math = global.Math;
Reflect.apply(set, binding, [Reflect.apply(withSpring, springModule, [Math.max(2, value5)])]);
}
function _fun91824() { // fn#91824, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12150:2077, offset: 0x02074418, size: 168 bytes, params: 1, frame: 22
let binding = env0_2;
let set = binding.set;
const timingModule = require(4504) /* metro dependency 4504: timing */;
const withTiming = timingModule.withTiming;
const Easing = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing;
Reflect.apply(set, binding, [Reflect.apply(withTiming, timingModule, [2, {duration: 300, easing: Easing.linear}])]);
binding = env0_3;
set = binding.set;
const value = timingModule;
Reflect.apply(set, binding, [value.withTiming(4, {duration: 300, easing: Easing.linear})]);
}
function _fun91828({nativeEvent}) { // fn#91828, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12150:2436, offset: 0x0207458e, size: 68 bytes, params: 2, frame: 13
const binding = env0_0;
const Math = global.Math;
binding(Math.round(nativeEvent.layout.width / 6) + 2);
}
function _fun91829(a0) { // fn#91829, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12150:2557, offset: 0x020745d2, size: 89 bytes, params: 2, frame: 18
var r0;
var r1;
var r3;
var item3;
var value3;
const iterator = a0[Symbol.iterator]();
const iterator2 = iterator.next;
let item2 = Reflect.apply(iterator2, iterator, []);
let item = item2.value;
item2 = item2.done ? undefined : iterator;
const value = undefined;
const value2 = item2 === value;
const r5 = value2 ? value : item;
if (value2) {
r0 = item2;
r1 = value2;
r3 = value;
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
if (value3) {
r0 = item3;
r1 = value3;
r3 = value;
} else {
r0 = item3;
r1 = value3;
r3 = item;
function _fun91823() { // fn#91823, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12150:1978, offset: 0x02074397, size: 129 bytes, params: 1, frame: 18
let Math = global.Math;
const value5 = 20 * Math.min(1, value / WAVEFORM_WAVE_MAX_VALUE * 1.25);
const binding = env0_1;
const set = binding.set;
const withSpring = SpringModule.withSpring;
Math = global.Math;
Reflect.apply(set, binding, [Reflect.apply(withSpring, SpringModule, [Math.max(2, value5)])]);
}
}
if (!r1) {
r0.return();
}
return <WaveformBar value={r5} key={r3} />;
}
function _fun91832() { // fn#91832, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12150:2914, offset: 0x020748e3, size: 45 bytes, params: 1, frame: 11
return env0_1 != null ? global.Date.now() - env0_1 : 0;
}
function _fun91834() { // fn#91834, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12150:3148, offset: 0x02074910, size: 100 bytes, params: 1, frame: 15
var environment;
var binding;
var value2;
if (env0_6) {
binding = env0_3;
value2 = environment.__proto__;
binding(VOICE_RECORDING_MAX_DURATION_MILLIS + VOICE_RECORDING_MAX_DURATION_OFFSET);
binding = env0_5;
binding(env1_19.ENDED);
return undefined;
}
const env0_0 = global.setInterval(_fun91835, 100);
return _fun91836;
}
function _fun91837() { // fn#91837, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12150:3347, offset: 0x020749e4, size: 65 bytes, params: 1, frame: 14
const value = environment.__proto__;
return (require(4690) /* metro dependency 4690: TimeUtils */).getTimeFormat(env0_2 / 1000, {padMinutes: false});
}
function _fun91838() { // fn#91838, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12150:3456, offset: 0x02074a25, size: 147 bytes, params: 1, frame: 14
var environment;
var r1;
var binding;
var value2;
if (env0_4 != null) {
binding = env0_4;
value2 = environment.__proto__;
if (binding !== env1_19.ENDED) {
r1 = AccessibilityStore.useReducedMotion ? 1000 : env0_4 !== env1_19.WARN ? 250 : 500;
flash();
return _fun91841;
function _fun91824() { // fn#91824, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12150:2077, offset: 0x02074418, size: 168 bytes, params: 1, frame: 22
let binding = env0_2;
let set = binding.set;
const withTiming = TimingModule.withTiming;
const Easing = (ReanimatedRexportModule).Easing;
Reflect.apply(set, binding, [Reflect.apply(withTiming, TimingModule, [2, {duration: 300, easing: Easing.linear}])]);
binding = Module00057;
set = binding.set;
Reflect.apply(set, binding, [TimingModule.withTiming(4, {duration: 300, easing: Easing.linear})]);
}
env0_7(true);
} else {
env0_7(false);
}
}
function _fun91844() { // fn#91844, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12150:4921, offset: 0x02074d6c, size: 56 bytes, params: 1, frame: 14
if (isRecording) {
return undefined;
}
const env0_0 = global.setTimeout(_fun91845, 1000);
return _fun91846;
}
function c_91848(a0, a1) { // fn#91848, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12150:5273, offset: 0x02074e24, size: 133 bytes, params: 3, frame: 19
var binding;
var set;
var value2;
var moduleValue;
var withTiming;
var object2;
const value = a0;
if (value && value !== a1) {
binding = env0_4;
set = binding.set;
value2 = environment.__proto__;
moduleValue = require(4504) /* metro dependency 4504: timing */;
withTiming = moduleValue.withTiming;
object2 = {};
object2.easing = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing.quad;
object2.duration = 200;
Reflect.apply(set, binding, [Reflect.apply(withTiming, moduleValue, [1, object2])]);
binding = env0_3;
binding.set(0);
}
}
function _fun91835() { // fn#91835, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12150:3207, offset: 0x02074974, size: 112 bytes, params: 1, frame: 13
var value3;
var value4;
if (env1_1 != null) {
value3 = global.Date.now() - env1_1;
env1_3(value3);
value4 = environment.__proto__.__proto__;
if (value3 > VOICE_RECORDING_REALLY_WARN_DURATION_MILLIS) {
env1_5(env2_19.REALLY_WARN);
} else if (value3 > VOICE_RECORDING_WARN_DURATION_MILLIS) {
env1_5(env2_19.WARN);
function Waveform() { // fn#91825, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12150:2281, offset: 0x020744c0, size: 184 bytes, params: 1, frame: 18
const styles = useStyles();
useVoiceMessagesUIStore(function(a0) {
return a0.waveformVersion;
});
const value2 = useVoiceMessagesUIStore(function(a0) {
return a0.waveform;
});
const [property, env0_0] = Module00057(env0_4.useState(0), 2);
return (
<View style={styles.waveformContainer} onLayout={env0_4.useCallback(_fun91828, [])}>
{value2.slice(-property).map(_fun91829)}
</View>
);
function _fun91828({nativeEvent}) { // fn#91828, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12150:2436, offset: 0x0207458e, size: 68 bytes, params: 2, frame: 13
const binding = env0_0;
const Math = global.Math;
binding(Math.round(nativeEvent.layout.width / 6) + 2);
}
function _fun91829(a0) { // fn#91829, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12150:2557, offset: 0x020745d2, size: 89 bytes, params: 2, frame: 18
var r0;
var r1;
var r3;
var item3;
var value3;
const iterator = a0[Symbol.iterator]();
const iterator2 = iterator.next;
let item2 = Reflect.apply(iterator2, iterator, []);
let item = item2.value;
item2 = item2.done ? undefined : iterator;
const value = undefined;
const value2 = item2 === value;
const r5 = value2 ? value : item;
if (value2) {
r0 = item2;
r1 = value2;
r3 = value;
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
if (value3) {
r0 = item3;
r1 = value3;
r3 = value;
} else {
r0 = item3;
r1 = value3;
r3 = item;
}
}
if (!r1) {
r0.return();
}
return <WaveformBar value={r5} key={r3} />;
}
}
function Duration_91830({animationValue}) { // fn#91830, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12150:2824, offset: 0x0207462b, size: 685 bytes, params: 2, frame: 29
const styles = useStyles();
const value2 = useVoiceMessagesUIStore(function(a0) {
return a0.startTimeMillis;
});
var [property, env0_3] = env0_3Binding(property22.useState(_fun91832), 2);
const value6 = env0_3Binding(property22.useState(undefined), 2);
const property2 = value6[0];
var property22 = property2;
const env0_5 = value6[1];
const value7 = useVoiceMessagesUIStore(function(a0) {
return a0.savedVoiceMessageUploadData != null;
});
const useToken = UseTokenModule.useToken;
const VOICE_MESSAGE_DURATION_TEXT_STYLE = (Native).modules.mobile.VOICE_MESSAGE_DURATION_TEXT_STYLE;
const value8 = Reflect.apply(useToken, UseTokenModule, [VOICE_MESSAGE_DURATION_TEXT_STYLE]);
property22.useEffect(_fun91834, [value2, value7]);
const value9 = property22.useMemo(_fun91837, [property]);
var [property, env0_7] = env0_3Binding(property22.useState(false), 2);
property22.useEffect(_fun91838, [property2]);
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
const closure = function() {
var object = {};
object.opacity = animationValue.get();
return object;
};
closure.__closure = {animationValue: animationValue};
closure.__workletHash = 4012974382717;
closure.__initData = env0_20;
const value12 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
const ThemeContextProvider = (NativeModule).ThemeContextProvider;
const DARK = ThemeTypes.DARK;
const View2 = (ReanimatedRexport).View;
const items2 = [styles.durationContainer, value12];
const view = <View style={[styles.dot, !(value2 != null && !value7) && styles.dotDismissed]} />;
const Text = (TextModule).Text;
return (
<ThemeContextProvider theme={DARK}>
<View2 style={items2}>
{view}
<Text
style={styles.duration}
variant={value8}
color={property ? 'text-feedback-critical' : 'always-white'}
tabularNumbers
>
{value9}
</Text>
</View2>
</ThemeContextProvider>
);
function _fun91832() { // fn#91832, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12150:2914, offset: 0x020748e3, size: 45 bytes, params: 1, frame: 11
return env0_1 != null ? global.Date.now() - env0_1 : 0;
}
function _fun91834() { // fn#91834, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12150:3148, offset: 0x02074910, size: 100 bytes, params: 1, frame: 15
var environment;
var binding;
var value2;
if (env0_6) {
binding = env0_3;
value2 = environment.__proto__;
binding(VOICE_RECORDING_MAX_DURATION_MILLIS + VOICE_RECORDING_MAX_DURATION_OFFSET);
binding = env0_5;
binding(env1_19.ENDED);
return undefined;
}
const env0_0 = global.setInterval(_fun91835, 100);
return _fun91836;
function _fun91835() { // fn#91835, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12150:3207, offset: 0x02074974, size: 112 bytes, params: 1, frame: 13
var value3;
var value4;
if (env1_1 != null) {
value3 = global.Date.now() - env1_1;
env1_3(value3);
value4 = environment.__proto__.__proto__;
if (value3 > VOICE_RECORDING_REALLY_WARN_DURATION_MILLIS) {
env1_5(env2_19.REALLY_WARN);
} else if (value3 > VOICE_RECORDING_WARN_DURATION_MILLIS) {
env1_5(env2_19.WARN);
}
}
}
function _fun91836() { // fn#91836, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12150:3298, offset: 0x01f6d8c0, size: 24 bytes, params: 1, frame: 11
global.clearInterval(env0_0);
}
}
function _fun91837() { // fn#91837, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12150:3347, offset: 0x020749e4, size: 65 bytes, params: 1, frame: 14
const value = environment.__proto__;
return (TimeUtilsModule).getTimeFormat(env0_2 / 1000, {padMinutes: false});
}
function _fun91838() { // fn#91838, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12150:3456, offset: 0x02074a25, size: 147 bytes, params: 1, frame: 14
var environment;
var r1;
var binding;
var value2;
if (env0_4 != null) {
binding = env0_4;
value2 = environment.__proto__;
if (binding !== env1_19.ENDED) {
r1 = AccessibilityStore.useReducedMotion ? 1000 : env0_4 !== env1_19.WARN ? 250 : 500;
flash();
return _fun91841;
}
env0_7(true);
} else {
env0_7(false);
}
function flash() { // fn#91839, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12150:3546, offset: 0x02074ab8, size: 54 bytes, params: 1, frame: 14
env1_7(function(a0) {
return !a0;
});
env0_0 = global.setTimeout(flash, env0_1);
}
function _fun91841() { // fn#91841, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12150:3599, offset: 0x00e59c84, size: 24 bytes, params: 1, frame: 11
global.clearTimeout(env0_0);
}
}
}
function _fun91843({isRecording, initialAnimation, backgroundColor}) { // fn#91843, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12150:4807, offset: 0x02074aee, size: 638 bytes, params: 2, frame: 27
const styles = useStyles();
const value2 = (ReanimatedRexportModule).useSharedValue(0);
env0_4.useEffect(function() {
if (isRecording) {
return undefined;
}
var env0_0 = global.setTimeout(_fun91845, 1000);
return _fun91846;
}, [value2, isRecording]);
const value3 = (ReanimatedRexportModule).useSharedValue(0);
const useAnimatedReaction = ReanimatedRexportModule.useAnimatedReaction;
let closure = function() {
return initialAnimation.get() === 1 && isRecording;
};
closure.__closure = {initialAnimation: initialAnimation, isRecording: isRecording};
closure.__workletHash = 7599681139161;
closure.__initData = env0_21;
const c_918482 = c_91848;
object = {animationValue: value3};
object.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
const Easing = ReanimatedRexportModule.Easing;
object.Easing = Easing;
object.loadingOpacity = value2;
c_918482.__closure = object;
c_918482.__workletHash = 7661977794788;
c_918482.__initData = env0_22;
Reflect.apply(useAnimatedReaction, ReanimatedRexportModule, [closure, c_918482]);
let useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
closure = function() {
var object = {};
object.width = 80 + 20 * initialAnimation.get() + '%';
object.backgroundColor = backgroundColor.get();
return object;
};
closure.__closure = {initialAnimation: initialAnimation, backgroundColor: backgroundColor};
closure.__workletHash = 9739486182352;
closure.__initData = env0_23;
const value4 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
closure = E_91850;
closure.__closure = {loadingOpacity: value2};
closure.__workletHash = 17421928475897;
closure.__initData = env0_24;
const value5 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
const View = (ReanimatedRexport).View;
return (
<View style={[styles.container, value4]}>
{
isRecording
? null
: ((Component) => <Component style={[styles.loading,
value5]} color={(importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE} size="small" />)(env0_16)
}
<Duration_91830 animationValue={value3} />
<Waveform />
</View>
);
function _fun91844() { // fn#91844, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12150:4921, offset: 0x02074d6c, size: 56 bytes, params: 1, frame: 14
if (isRecording) {
return undefined;
}
const env0_0 = global.setTimeout(_fun91845, 1000);
return _fun91846;
function _fun91845() { // fn#91845, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12150:4951, offset: 0x02074da4, size: 96 bytes, params: 1, frame: 18
let value = environment.__proto__;
const binding = env1_3;
const set = binding.set;
value = environment.__proto__.__proto__;
value = require(4504) /* metro dependency 4504: timing */;
const withTiming = value.withTiming;
const Easing = (ReanimatedRexportModule).Easing;
Reflect.apply(set, binding, [Reflect.apply(withTiming, value, [1, {easing: Easing.quad, duration: 200}])]);
}
function _fun91846() { // fn#91846, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12150:5041, offset: 0x00e59c84, size: 24 bytes, params: 1, frame: 11
global.clearTimeout(env0_0);
}
}
function c_91848(a0, a1) { // fn#91848, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12150:5273, offset: 0x02074e24, size: 133 bytes, params: 3, frame: 19
var binding;
var set;
var value2;
var moduleValue;
var withTiming;
var object;
const value = a0;
if (value && value !== a1) {
binding = env0_4;
set = binding.set;
value2 = environment.__proto__;
moduleValue = require(4504) /* metro dependency 4504: timing */;
withTiming = moduleValue.withTiming;
object = {};
object.easing = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing.quad;
object.duration = 200;
Reflect.apply(set, binding, [Reflect.apply(withTiming, moduleValue, [1, object])]);
binding = Module00057;
binding.set(0);
}
}
function E_91850() { // fn#91850, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12150:5767, offset: 0x01de68e5, size: 24 bytes, params: 1, frame: 10
const object = {};
object.opacity = Module00057.get();
return object;
}
}
}
function flash() { // fn#91839, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12150:3546, offset: 0x02074ab8, size: 54 bytes, params: 1, frame: 14
env1_7(function(a0) {
return !a0;
});
env0_0 = global.setTimeout(flash, env0_1);
}
function _fun91845() { // fn#91845, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12150:4951, offset: 0x02074da4, size: 96 bytes, params: 1, frame: 18
let value = environment.__proto__;
const binding = env1_3;
const set = binding.set;
value = environment.__proto__.__proto__;
value = require(4504) /* metro dependency 4504: timing */;
const withTiming = value.withTiming;
const Easing = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing;
Reflect.apply(set, binding, [Reflect.apply(withTiming, value, [1, {easing: Easing.quad, duration: 200}])]);
}
global.__d(_fun91820, 11964, [57, 31, 27, 4502, 11527, 11528, 661, 33, 4017, 4501, 697, 477, 4577, 4504, 3860, 4690,
3868, 4573,
2]) /* metro module 11964, dependencies: [57, 31, 27, 4502, 11527, 11528, 661, 33, 4017, 4501, 697, 477, 4577, 4504, 3860, 4690, 3868, 4573, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,62 +1,63 @@
/* Metro module 11780; source: modules/voice_messages/native/useVoiceMessageTooltip.tsx; dependencies: [31, 1480, 11527, 1244, 6996, 8544, 2] */
import SubscribeToKeyboardUIStore from '../../keyboard/native/subscribeToKeyboardUIStore.tsx'; /* Metro dependency 1480 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as UseKeyboardIsOpenModule from '../../keyboard/native/useKeyboardIsOpen.tsx'; /* Metro dependency 6996 */
import * as UseTooltipNativeModule from '../../../design/components/Tooltip/native/useTooltip.native.tsx'; /* Metro dependency 8544 */
import * as VoiceMessagesUIStoreModule from './VoiceMessagesUIStore.tsx'; /* Metro dependency 11527 */
function _fun90246(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90246, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11966:6, offset: 0x0203195d, size: 175 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importAll(31) /* metro dependency 31 */;
const subscribeToKeyboardUIStore = importDefault(1480) /* metro dependency 1480: subscribeToKeyboardUIStore */;
const voiceMessagesUIStoreModule = require(11527) /* metro dependency 11527: VoiceMessagesUIStore */;
const env0_4 = voiceMessagesUIStoreModule.hideVoiceMessagesTooltip;
const env0_5 = voiceMessagesUIStoreModule.showVoiceMessagesTooltip;
const env0_6 = voiceMessagesUIStoreModule.useVoiceMessagesUIStore;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_messages/native/useVoiceMessageTooltip.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_messages/native/useVoiceMessageTooltip.tsx');
exports.default = useVoiceMessageTooltip;
}
function useVoiceMessageTooltip() { // fn#90247, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11966:312, offset: 0x02031a0c, size: 145 bytes, params: 1, frame: 18
const value2 = ReactModule.useRef(null);
const value3 = useVoiceMessagesUIStore(function(a0) {
return a0.showVoiceMessagesTooltip;
});
const value4 = ReactModule.useMemo(_fun90249, [value3]);
ReactModule.useEffect(_fun90250, [value3]);
(UseTooltipNativeModule).useTooltip(value2, value4);
return {tooltipTargetRef: value2, showVoiceMessagesTooltip: showVoiceMessagesTooltip};
function _fun90249() { // fn#90249, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11966:417, offset: 0x02031aa8, size: 90 bytes, params: 1, frame: 15
const object = {position: 'top'};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['hP6+07']);
object.visible = env0_0;
return object;
}
function useVoiceMessageTooltip() { // fn#90247, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11966:312, offset: 0x02031a0c, size: 145 bytes, params: 1, frame: 18
const binding = env0_2;
const value2 = binding.useRef(null);
const value3 = useVoiceMessagesUIStore(function(a0) {
return a0.showVoiceMessagesTooltip;
});
const value4 = binding.useMemo(_fun90249, [value3]);
binding.useEffect(_fun90250, [value3]);
(require(8544) /* metro dependency 8544: useTooltipNative */).useTooltip(value2, value4);
return {tooltipTargetRef: value2, showVoiceMessagesTooltip: showVoiceMessagesTooltip};
}
function _fun90250() { // fn#90250, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11966:523, offset: 0x02031b02, size: 125 bytes, params: 1, frame: 16
var environment;
if (keyboardIsOpen) {
value = environment.__proto__;
var keyboardIsOpen = (require(6996) /* metro dependency 6996: useKeyboardIsOpen */).getKeyboardIsOpen({includeCustomKeyboard: true});
var env0_1 = SubscribeToKeyboardUIStore(_fun90251);
var env0_2 = global.setTimeout(function() {
hideVoiceMessagesTooltip();
}, 2000);
return _fun90253;
}
function _fun90251() { // fn#90251, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11966:599, offset: 0x02031b7f, size: 66 bytes, params: 1, frame: 15
const binding = env0_0;
const getKeyboardIsOpen = UseKeyboardIsOpenModule.getKeyboardIsOpen;
if (binding !== Reflect.apply(getKeyboardIsOpen, UseKeyboardIsOpenModule, [{includeCustomKeyboard: true}])) {
hideVoiceMessagesTooltip();
}
}
function _fun90249() { // fn#90249, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11966:417, offset: 0x02031aa8, size: 90 bytes, params: 1, frame: 15
const object2 = {position: 'top'};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['hP6+07']);
object2.visible = env0_0;
return object2;
}
function _fun90253() { // fn#90253, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11966:706, offset: 0x02031bd0, size: 32 bytes, params: 1, frame: 12
global.clearTimeout(env0_2);
env0_1();
}
}
function _fun90250() { // fn#90250, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11966:523, offset: 0x02031b02, size: 125 bytes, params: 1, frame: 16
var environment;
if (env0_0) {
value = environment.__proto__;
var env0_0 = (require(6996) /* metro dependency 6996: useKeyboardIsOpen */).getKeyboardIsOpen({includeCustomKeyboard: true});
var env0_1 = subscribeToKeyboardUIStore(_fun90251);
var env0_2 = global.setTimeout(function() {
hideVoiceMessagesTooltip();
}, 2000);
return _fun90253;
}
}
function _fun90251() { // fn#90251, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11966:599, offset: 0x02031b7f, size: 66 bytes, params: 1, frame: 15
const binding = env0_0;
const useKeyboardIsOpenModule = require(6996) /* metro dependency 6996: useKeyboardIsOpen */;
const getKeyboardIsOpen = useKeyboardIsOpenModule.getKeyboardIsOpen;
if (binding !== Reflect.apply(getKeyboardIsOpen, useKeyboardIsOpenModule, [{includeCustomKeyboard: true}])) {
hideVoiceMessagesTooltip();
}
}
function _fun90253() { // fn#90253, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11966:706, offset: 0x02031bd0, size: 32 bytes, params: 1, frame: 12
global.clearTimeout(env0_2);
env0_1();
}
global.__d(_fun90246, 11780, [31, 1480, 11527, 1244, 6996, 8544,
2]) /* metro module 11780, dependencies: [31, 1480, 11527, 1244, 6996, 8544, 2] */;