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,4 +1,15 @@
/* Metro module 9229; source: modules/voice_calls/AudioRouteStore.native.tsx; dependencies: [6, 7, 15, 17, 18, 27, 4294, 9230, 477, 9231, 566, 694, 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 Flux from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import RTCConnectionStore from '../../stores/RTCConnectionStore.tsx'; /* Metro dependency 4294 */
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 VoiceCallTypesModule from './VoiceCallTypes.tsx'; /* Metro dependency 9230 */
function _fun72192(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#72192, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9414:6, offset: 0x01d3dfbf, size: 417 bytes, params: 8, frame: 19
const env0_0 = require;
const resetState_72197 = function() {
@@ -6,97 +17,134 @@ function _fun72192(global, require, importDefault, importAll, module, exports, d
};
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 */;
const {NativeModules, NativeEventEmitter} = require(27) /* metro dependency 27 */;
const rtcConnectionStore = importDefault(4294) /* metro dependency 4294: RTCConnectionStore */;
const RouteTypes = (require(9230) /* metro dependency 9230: VoiceCallTypes */).RouteTypes;
const {NativeModules, NativeEventEmitter} = ReactNativeModule;
const RouteTypes = (VoiceCallTypesModule).RouteTypes;
let env0_10 = RouteTypes.UNKNOWN;
const AudioRouteEmitter = NativeModules.AudioRouteEmitter;
let nativeEventEmitter = new NativeEventEmitter(AudioRouteEmitter);
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
_fun72198(Store).displayName = 'AudioRouteStore';
nativeEventEmitter = new nativeEventEmitter(importDefault(694) /* metro dependency 694: Dispatcher */,
{RTC_CONNECTION_STATE: RTC_CONNECTION_STATE_72203});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_calls/AudioRouteStore.native.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_calls/AudioRouteStore.native.tsx');
exports.default = nativeEventEmitter;
}
function _isNativeReflectConstruct_72193() { // fn#72193, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9414:209, offset: 0x01d3e160, 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) {
function _isNativeReflectConstruct_72193() { // fn#72193, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9414:209, offset: 0x01d3e160, 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_72193_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_72193_isNativeReflectConstruct = function() {
return !!result;
})();
}
function handleAudioRouteChanged(a0) { // fn#72196, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9414:476, offset: 0x01d3e1c2, size: 257 bytes, params: 2, frame: 15
var r3;
const RouteTypes = (require(9230) /* metro dependency 9230: VoiceCallTypes */).RouteTypes;
var UNKNOWN;
var SPEAKER;
var BLUETOOTH;
if (a1 !== undefined) {
function handleAudioRouteChanged(a0) { // fn#72196, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9414:476, offset: 0x01d3e1c2, size: 257 bytes, params: 2, frame: 15
var r3;
const RouteTypes = (VoiceCallTypesModule).RouteTypes;
var UNKNOWN;
var SPEAKER;
var BLUETOOTH;
if (a1 !== undefined) {
}
if (a0 == null) {
UNKNOWN = RouteTypes.UNKNOWN;
} else if (a0 === '') {
UNKNOWN = RouteTypes.UNKNOWN;
} else if (a0.includes('Bluetooth')) {
BLUETOOTH = RouteTypes.BLUETOOTH;
} else if (a0.includes('Speaker')) {
SPEAKER = RouteTypes.SPEAKER;
} else {
r3 = a0.includes('Receiver') ? RouteTypes.RECEIVER : RouteTypes.UNKNOWN;
}
}
if (a0 == null) {
UNKNOWN = RouteTypes.UNKNOWN;
} else if (a0 === '') {
UNKNOWN = RouteTypes.UNKNOWN;
} else if (a0.includes('Bluetooth')) {
BLUETOOTH = RouteTypes.BLUETOOTH;
} else if (a0.includes('Speaker')) {
SPEAKER = RouteTypes.SPEAKER;
} else {
r3 = a0.includes('Receiver') ? RouteTypes.RECEIVER : RouteTypes.UNKNOWN;
function _fun72198(a0) { // fn#72198, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9414:846, offset: 0x01d3e2ee, size: 122 bytes, params: 2, frame: 16
const AudioRouteStoreClass2 = AudioRouteStoreClass;
Inherits(AudioRouteStoreClass2, a0);
return CreateClass(AudioRouteStoreClass2, [{key: 'initialize', value: function() {
this.waitFor(RTCConnectionStore);
}}, {key: 'getCurrentRouteType', value: function() {
return UNKNOWN;
}}, {key: 'getMultipleRoutesAvailable', value: value_72202}]);
function AudioRouteStoreClass() { // fn#72199, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9414:858, offset: 0x010e918b, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_3(this, AudioRouteStoreClass);
const value3 = env1_6(AudioRouteStoreClass);
return env1_5(this, _isNativeReflectConstruct_72193() ? global.Reflect.construct(value3, arguments,
env1_6(this).constructor) : value3.apply(this, arguments));
}
function value_72202() { // fn#72202, offset: 0x00ef8482, size: 9 bytes, params: 1, frame: 1
return env1_11;
}
}
}
function _fun72198(a0) { // fn#72198, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9414:846, offset: 0x01d3e2ee, size: 122 bytes, params: 2, frame: 16
const closure = AudioRouteStoreClass;
env0_7(closure, a0);
return env0_4(closure, [{key: 'initialize', value: function() {
this.waitFor(RTCConnectionStore);
}}, {key: 'getCurrentRouteType', value: function() {
return UNKNOWN;
}}, {key: 'getMultipleRoutesAvailable', value: value_72202}]);
}
function RTC_CONNECTION_STATE_72203() { // fn#72203, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9414:1416, offset: 0x01d3e368, size: 334 bytes, params: 1, frame: 18
var r1;
var r3;
var AudioRoutePicker;
var resetState_72197Binding;
var value2;
var moduleValue;
var value;
const isConnected2 = RTCConnectionStore.isConnected();
if (env0_12 !== null) {
if (env0_12 != null) {
function RTC_CONNECTION_STATE_72203() { // fn#72203, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9414:1416, offset: 0x01d3e368, size: 334 bytes, params: 1, frame: 18
var r1;
var r3;
var AudioRoutePicker;
var resetState_72197Binding;
var value2;
var moduleValue;
var value;
const isConnected2 = RTCConnectionStore.isConnected();
if (env0_12 !== null) {
if (env0_12 != null) {
if (!isConnected2) {
AudioRoutePicker = NativeModules.AudioRoutePicker;
if (AudioRoutePicker != null) {
AudioRoutePicker.resetPortOverride();
}
resetState_72197();
env0_12.remove();
}
}
} else if (isConnected2) {
resetState_72197Binding = resetState_72197;
value2 = undefined;
resetState_72197Binding();
r1 = env0_13 == null ? value2 : env0_13.addListener('audio-route-changed', _fun72204);
moduleValue = require(477) /* metro dependency 477: PlatformUtils */;
if (moduleValue.isAndroid()) {
if ((importDefault(9231) /* metro dependency 9231: NativeAudioRouteEmitterModule */) == null) {
r1 = value2;
} else {
value = importDefault(9231) /* metro dependency 9231: NativeAudioRouteEmitterModule */;
value = value.getCurrentRoute();
r1 = value;
}
r3 = r1;
} else {
r3 = NativeModules.AudioRouteEmitter.getCurrentRoute();
}
value = r3.then(function({routeType, multipleRoutesAvailable}) {
handleAudioRouteChanged(routeType, multipleRoutesAvailable);
});
value = value.then(_fun72206);
value.catch(_fun72207);
} else if (env0_12 != null) {
if (!isConnected2) {
AudioRoutePicker = NativeModules.AudioRoutePicker;
if (AudioRoutePicker != null) {
@@ -106,49 +154,23 @@ function RTC_CONNECTION_STATE_72203() { // fn#72203, source: /ci/build/discord/d
env0_12.remove();
}
}
} else if (isConnected2) {
resetState_72197Binding = resetState_72197;
value2 = undefined;
resetState_72197Binding();
r1 = env0_13 == null ? value2 : env0_13.addListener('audio-route-changed', _fun72204);
moduleValue = require(477) /* metro dependency 477: PlatformUtils */;
if (moduleValue.isAndroid()) {
if ((importDefault(9231) /* metro dependency 9231: NativeAudioRouteEmitterModule */) == null) {
r1 = value2;
} else {
value = importDefault(9231) /* metro dependency 9231: NativeAudioRouteEmitterModule */;
value = value.getCurrentRoute();
r1 = value;
}
r3 = r1;
} else {
r3 = NativeModules.AudioRouteEmitter.getCurrentRoute();
}
value = r3.then(function({routeType, multipleRoutesAvailable}) {
return false;
function _fun72204({routeType, multipleRoutesAvailable}) { // fn#72204, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9414:1525, offset: 0x01d3e4b6, size: 46 bytes, params: 2, frame: 14
handleAudioRouteChanged(routeType, multipleRoutesAvailable);
});
value = value.then(_fun72206);
value.catch(_fun72207);
} else if (env0_12 != null) {
if (!isConnected2) {
AudioRoutePicker = NativeModules.AudioRoutePicker;
if (AudioRoutePicker != null) {
AudioRoutePicker.resetPortOverride();
}
resetState_72197();
env0_12.remove();
env1_14.emitChange();
}
function _fun72206() { // fn#72206, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9414:1811, offset: 0x01d3e504, size: 34 bytes, params: 1, frame: 10
const value = environment.__proto__;
return env1_14?.emitChange();
}
}
return false;
}
function _fun72204({routeType, multipleRoutesAvailable}) { // fn#72204, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9414:1525, offset: 0x01d3e4b6, size: 46 bytes, params: 2, frame: 14
handleAudioRouteChanged(routeType, multipleRoutesAvailable);
env1_14.emitChange();
}
function _fun72206() { // fn#72206, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9414:1811, offset: 0x01d3e504, size: 34 bytes, params: 1, frame: 10
const value = environment.__proto__;
return env1_14?.emitChange();
function _fun72207() { // fn#72207, offset: 0x00c37b63, size: 4 bytes, params: 1, frame: 1
}
global.__d(_fun72192, 9229, [6, 7, 15, 17, 18, 27, 4294, 9230, 477, 9231, 566, 694,
2]) /* metro module 9229, dependencies: [6, 7, 15, 17, 18, 27, 4294, 9230, 477, 9231, 566, 694, 2] */;
+123 -117
View File
@@ -1,139 +1,145 @@
/* Metro module 15672; source: modules/voice_calls/CallIdleManager.tsx; dependencies: [7, 6, 15, 17, 18, 1378, 1379, 4297, 4300, 7067, 1244, 4796, 4041, 4860, 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 EmbeddedActivitiesStore from '../activities/EmbeddedActivitiesStore.tsx'; /* Metro dependency 1378 */
import ChannelStore from '../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import VoiceStateStore from '../../stores/VoiceStateStore.tsx'; /* Metro dependency 4297 */
import SortedVoiceStateStore from '../../stores/views/SortedVoiceStateStore.tsx'; /* Metro dependency 4300 */
import AutomaticLifecycleManager from '../../lib/AutomaticLifecycleManager.tsx'; /* Metro dependency 4860 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as TimersModule from '../../external/discord_common/js/packages/timers/Timers.tsx'; /* Metro dependency 4041 */
function _fun120207(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#120207, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15880:6, offset: 0x025247d6, size: 316 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(7) /* metro dependency 7 */;
const env0_4 = importDefault(6) /* metro dependency 6 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
const embeddedActivitiesStore = importDefault(1378) /* metro dependency 1378: EmbeddedActivitiesStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const voiceStateStore = importDefault(4297) /* metro dependency 4297: VoiceStateStore */;
const sortedVoiceStateStore = importDefault(4300) /* metro dependency 4300: SortedVoiceStateStore */;
let value = importDefault(4860) /* metro dependency 4860: AutomaticLifecycleManager */;
let value = AutomaticLifecycleManager;
value = _fun120213(value);
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_calls/CallIdleManager.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_calls/CallIdleManager.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_120208() { // fn#120208, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15880:188, offset: 0x02524912, 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) {
function _isNativeReflectConstruct_120208() { // fn#120208, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15880:188, offset: 0x02524912, 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_120208_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_120208_isNativeReflectConstruct = function() {
return !!result;
})();
}
function isIdle() { // fn#120211, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15880:392, offset: 0x02524974, size: 144 bytes, params: 1, frame: 16
const currentClientVoiceChannelId = VoiceStateStore.getCurrentClientVoiceChannelId(null);
if (currentClientVoiceChannelId == null) {
return false;
function isIdle() { // fn#120211, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15880:392, offset: 0x02524974, size: 144 bytes, params: 1, frame: 16
const currentClientVoiceChannelId = VoiceStateStore.getCurrentClientVoiceChannelId(null);
if (currentClientVoiceChannelId == null) {
return false;
}
const channel = ChannelStore.getChannel(currentClientVoiceChannelId);
return !(channel == null || !channel.isPrivate()) && (!(channel.recipients.length > 1) && (!(SortedVoiceStateStore.countVoiceStatesForChannel(currentClientVoiceChannelId) > 1) && EmbeddedActivitiesStore.getSelfEmbeddedActivityForChannel(currentClientVoiceChannelId) == null));
}
const channel = ChannelStore.getChannel(currentClientVoiceChannelId);
return !(channel == null || !channel.isPrivate()) && (!(channel.recipients.length > 1) && (!(SortedVoiceStateStore.countVoiceStatesForChannel(currentClientVoiceChannelId) > 1) && EmbeddedActivitiesStore.getSelfEmbeddedActivityForChannel(currentClientVoiceChannelId) == null));
}
function disconnect_120212() { // fn#120212, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15880:644, offset: 0x02524a04, size: 161 bytes, params: 1, frame: 21
var currentClientVoiceChannelId;
var defaultImport;
var sendBotMessage;
var intl;
if (isIdle()) {
currentClientVoiceChannelId = VoiceStateStore.getCurrentClientVoiceChannelId(null);
if (currentClientVoiceChannelId != null) {
defaultImport = importDefault(7067) /* metro dependency 7067: MessageActionCreators */;
sendBotMessage = defaultImport.sendBotMessage;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
Reflect.apply(sendBotMessage, defaultImport, [currentClientVoiceChannelId,
intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.XYof5G,
{number: 3})]);
(importDefault(4796) /* metro dependency 4796: SelectedChannelActionCreators */).selectVoiceChannel(null);
function disconnect_120212() { // fn#120212, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15880:644, offset: 0x02524a04, size: 161 bytes, params: 1, frame: 21
var currentClientVoiceChannelId;
var defaultImport;
var sendBotMessage;
var intl;
if (isIdle()) {
currentClientVoiceChannelId = VoiceStateStore.getCurrentClientVoiceChannelId(null);
if (currentClientVoiceChannelId != null) {
defaultImport = importDefault(7067) /* metro dependency 7067: MessageActionCreators */;
sendBotMessage = defaultImport.sendBotMessage;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
Reflect.apply(sendBotMessage, defaultImport, [currentClientVoiceChannelId,
intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.XYof5G,
{number: 3})]);
(importDefault(4796) /* metro dependency 4796: SelectedChannelActionCreators */).selectVoiceChannel(null);
}
}
}
}
function _fun120213(a0) { // fn#120213, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15880:870, offset: 0x02524aa5, size: 42 bytes, params: 2, frame: 14
const closure = CallIdleManager;
env0_7(closure, a0);
return env0_3(closure);
}
function _fun120213(a0) { // fn#120213, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15880:870, offset: 0x02524aa5, size: 42 bytes, params: 2, frame: 14
const CallIdleManager2 = CallIdleManager;
Inherits(CallIdleManager2, a0);
return CreateClass(CallIdleManager2);
function CallIdleManager(a0) { // fn#120214, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15880:882, offset: 0x02524acf, size: 264 bytes, params: 2, frame: 21
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_4;
binding(this, CallIdleManager);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_6(CallIdleManager);
binding = env1_5;
if (_isNativeReflectConstruct_120208()) {
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);
const Timeout = (TimersModule).Timeout;
const value4 = Object.create(Timeout.prototype, {constructor: {value: Timeout}});
const timeout = new Timeout();
value.idleTimeout = timeout instanceof Object ? timeout : value4;
value.handleConnectionClosed = handleConnectionClosed_120215;
value.handleEmbeddedActivityDisconnect = handleEmbeddedActivityDisconnect;
value.handleVoiceStateUpdates = handleVoiceStateUpdates_120217;
var handleEmbeddedActivityDisconnect = value.handleEmbeddedActivityDisconnect;
value.actions = {VOICE_STATE_UPDATES: value.handleVoiceStateUpdates,
CONNECTION_CLOSED: value.handleConnectionClosed, EMBEDDED_ACTIVITY_CLOSE: handleEmbeddedActivityDisconnect};
return value;
function CallIdleManagerHandleConnectionClosed() { // fn#120215, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15880:1174, owner: CallIdleManager.handleConnectionClosed, offset: 0x02524bd7, size: 27 bytes, params: 1, frame: 9
env0_0.idleTimeout.stop();
}
function CallIdleManager(a0) { // fn#120214, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15880:882, offset: 0x02524acf, size: 264 bytes, params: 2, frame: 21
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_4;
binding(this, CallIdleManager);
const items = [];
arraySpread(items, value, 0, items);
value = env1_6(CallIdleManager);
binding = env1_5;
if (_isNativeReflectConstruct_120208()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items, env1_6(this).constructor);
r0 = value;
} else {
value = value.apply(this, items);
r0 = value;
}
value = binding(this, r0);
const Timeout = (require(4041) /* metro dependency 4041: Timers */).Timeout;
const value4 = Object.create(Timeout.prototype, {constructor: {value: Timeout}});
const timeout = new Timeout();
value.idleTimeout = timeout instanceof Object ? timeout : value4;
value.handleConnectionClosed = handleConnectionClosed_120215;
value.handleEmbeddedActivityDisconnect = handleEmbeddedActivityDisconnect;
value.handleVoiceStateUpdates = handleVoiceStateUpdates_120217;
var handleEmbeddedActivityDisconnect = value.handleEmbeddedActivityDisconnect;
value.actions = {VOICE_STATE_UPDATES: value.handleVoiceStateUpdates,
CONNECTION_CLOSED: value.handleConnectionClosed, EMBEDDED_ACTIVITY_CLOSE: handleEmbeddedActivityDisconnect};
return value;
}
function handleEmbeddedActivityDisconnect() { // fn#120216, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15880:1236, owner: CallIdleManager.handleEmbeddedActivityDisconnect, offset: 0x02524bf2, size: 55 bytes, params: 1, frame: 16
var idleTimeout;
if (isIdle()) {
idleTimeout = env0_0.idleTimeout;
idleTimeout.start(180000, disconnect_120212, true);
}
}
function CallIdleManagerHandleConnectionClosed() { // fn#120215, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15880:1174, owner: CallIdleManager.handleConnectionClosed, offset: 0x02524bd7, size: 27 bytes, params: 1, frame: 9
env0_0.idleTimeout.stop();
}
function CallIdleManagerHandleVoiceStateUpdates() { // fn#120217, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15880:1315, owner: CallIdleManager.handleVoiceStateUpdates, offset: 0x02524c29, size: 67 bytes, params: 1, frame: 16
const isIdle2 = isIdle();
const idleTimeout = env0_0.idleTimeout;
if (isIdle2) {
idleTimeout.start(180000, disconnect_120212, false);
} else {
idleTimeout.stop();
}
}
function handleEmbeddedActivityDisconnect() { // fn#120216, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15880:1236, owner: CallIdleManager.handleEmbeddedActivityDisconnect, offset: 0x02524bf2, size: 55 bytes, params: 1, frame: 16
var idleTimeout;
if (isIdle()) {
idleTimeout = env0_0.idleTimeout;
idleTimeout.start(180000, disconnect_120212, true);
}
}
}
function CallIdleManagerHandleVoiceStateUpdates() { // fn#120217, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15880:1315, owner: CallIdleManager.handleVoiceStateUpdates, offset: 0x02524c29, size: 67 bytes, params: 1, frame: 16
const isIdle2 = isIdle();
const idleTimeout = env0_0.idleTimeout;
if (isIdle2) {
idleTimeout.start(180000, disconnect_120212, false);
} else {
idleTimeout.stop();
}
}
global.__d(_fun120207, 15672, [7, 6, 15, 17, 18, 1378, 1379, 4297, 4300, 7067, 1244, 4796, 4041, 4860,
2]) /* metro module 15672, dependencies: [7, 6, 15, 17, 18, 1378, 1379, 4297, 4300, 7067, 1244, 4796, 4041, 4860, 2] */;
@@ -1,11 +1,15 @@
/* Metro module 13886; source: modules/voice_calls/CallKitMetricCollectionExperiment.tsx; dependencies: [1854, 2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ApexModule from '../experiments/apex/index.tsx'; /* Metro dependency 1854 */
function _fun105543(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#105543, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14083:6, offset: 0x022bc442, size: 145 bytes, params: 8, frame: 20
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = require(1854) /* metro dependency 1854: apex */;
let value = ApexModule;
value = value.createApexExperiment({'name': '2026-02-callkit-metric-collection', 'kind': 'user',
defaultConfig: {enabled: true}, variations: {[1]: {enabled: false}}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_calls/CallKitMetricCollectionExperiment.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_calls/CallKitMetricCollectionExperiment.tsx');
exports.default = value;
}
global.__d(_fun105543, 13886, [1854, 2]) /* metro module 13886, dependencies: [1854, 2] */;
@@ -1,13 +1,17 @@
/* Metro module 15473; source: modules/voice_calls/DefaultAudioRouteExperiment.tsx; dependencies: [1854, 2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ApexModule from '../experiments/apex/index.tsx'; /* Metro dependency 1854 */
function _fun118436(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118436, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15670:6, offset: 0x024db790, size: 177 bytes, params: 8, frame: 19
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = require(1854) /* metro dependency 1854: apex */;
let value = ApexModule;
value = value.createApexExperiment({'name': '2026-02-default-audio-route', 'kind': 'user',
defaultConfig: {'defaultSpeakerForGuildCall': false, 'defaultSpeakerForDMCall': false},
variations: {[1]: {'defaultSpeakerForGuildCall': true, 'defaultSpeakerForDMCall': false},
[2]: {'defaultSpeakerForGuildCall': true, 'defaultSpeakerForDMCall': true}}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_calls/DefaultAudioRouteExperiment.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_calls/DefaultAudioRouteExperiment.tsx');
exports.default = value;
}
global.__d(_fun118436, 15473, [1854, 2]) /* metro module 15473, dependencies: [1854, 2] */;
@@ -1,16 +1,21 @@
/* Metro module 4619; source: modules/voice_calls/GuildVoiceRingingExperiment.tsx; dependencies: [4108, 4620, 2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ExperimentConstantsModule from '../experiments/ExperimentConstants.tsx'; /* Metro dependency 4108 */
import * as ExperimentsModule from '../experiments/index.tsx'; /* Metro dependency 4620 */
function _fun39649(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#39649, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4797:6, offset: 0x010e7715, size: 195 bytes, params: 8, frame: 21
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const CommonTriggerPoints = (require(4108) /* metro dependency 4108: ExperimentConstants */).CommonTriggerPoints;
let value = require(4620) /* metro dependency 4620: experiments */;
const CommonTriggerPoints = (ExperimentConstantsModule).CommonTriggerPoints;
let value = ExperimentsModule;
const createExperiment = value.createExperiment;
const VOICE_CALL = CommonTriggerPoints.VOICE_CALL;
value = Reflect.apply(createExperiment, value, [{'kind': 'guild', 'id': '2024-12_guild_voice_channel_ringing',
'label': 'Guild Voice Ringing', defaultConfig: {enabled: false}, commonTriggerPoint: VOICE_CALL,
treatments: [{'id': 1, 'label': 'Allow users to ring each other in Guild Voice Channels',
config: {enabled: true}}]}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_calls/GuildVoiceRingingExperiment.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_calls/GuildVoiceRingingExperiment.tsx');
exports.default = value;
}
global.__d(_fun39649, 4619, [4108, 4620, 2]) /* metro module 4619, dependencies: [4108, 4620, 2] */;
@@ -1,28 +1,31 @@
/* Metro module 12418; source: modules/voice_calls/PTTEducationExperiment.tsx; dependencies: [1854, 2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ApexModule from '../experiments/apex/index.tsx'; /* Metro dependency 1854 */
function _fun94715(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#94715, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12604:6, offset: 0x02124774, size: 215 bytes, params: 8, frame: 22
var object6;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object6 = {'showPTTJoinTooltip': false, 'showPTTIconIndicator': false, 'showPTTNoKeybindWarning': false,
object = {'showPTTJoinTooltip': false, 'showPTTIconIndicator': false, 'showPTTNoKeybindWarning': false,
'showPTTSpeakingIndicator': false};
let value = require(1854) /* metro dependency 1854: apex */;
let value = ApexModule;
const createApexExperiment = value.createApexExperiment;
const object7 = {'name': '2025-12-09-ptt-education', 'kind': 'user'};
object7.defaultConfig = object6;
const object8 = {};
const object9 = {};
copyDataProperties(object9, object6, undefined);
object9['showPTTJoinTooltip'] = true;
object9['showPTTNoKeybindWarning'] = true;
object9['showPTTSpeakingIndicator'] = true;
object8[1] = object9;
const object10 = {};
copyDataProperties(object10, object6, undefined);
object10['showPTTIconIndicator'] = true;
object8[2] = object10;
object7.variations = object8;
value = Reflect.apply(createApexExperiment, value, [object7]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_calls/PTTEducationExperiment.tsx');
const object2 = {'name': '2025-12-09-ptt-education', 'kind': 'user'};
object2.defaultConfig = object;
const object3 = {};
const object4 = {};
copyDataProperties(object4, object, undefined);
object4['showPTTJoinTooltip'] = true;
object4['showPTTNoKeybindWarning'] = true;
object4['showPTTSpeakingIndicator'] = true;
object3[1] = object4;
const object5 = {};
copyDataProperties(object5, object, undefined);
object5['showPTTIconIndicator'] = true;
object3[2] = object5;
object2.variations = object3;
value = Reflect.apply(createApexExperiment, value, [object2]);
(FileImportTrackerModule).fileFinishedImporting('modules/voice_calls/PTTEducationExperiment.tsx');
exports.default = value;
}
global.__d(_fun94715, 12418, [1854, 2]) /* metro module 12418, dependencies: [1854, 2] */;
@@ -1,29 +1,34 @@
/* Metro module 15685; source: modules/voice_calls/PastVcActivityMessagesExperiment.tsx; dependencies: [4108, 4620, 2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ExperimentConstantsModule from '../experiments/ExperimentConstants.tsx'; /* Metro dependency 4108 */
import * as ExperimentsModule from '../experiments/index.tsx'; /* Metro dependency 4620 */
function _fun120333(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#120333, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15893:6, offset: 0x02528426, size: 229 bytes, params: 8, frame: 21
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const CommonTriggerPoints = (require(4108) /* metro dependency 4108: ExperimentConstants */).CommonTriggerPoints;
let value = require(4620) /* metro dependency 4620: experiments */;
const CommonTriggerPoints = (ExperimentConstantsModule).CommonTriggerPoints;
let value = ExperimentsModule;
const createExperiment = value.createExperiment;
const VOICE_CALL = CommonTriggerPoints.VOICE_CALL;
value = Reflect.apply(createExperiment, value, [{'kind': 'guild', 'id': '2026-02_past_vc_activity_messages',
'label': 'Past VC Activity Messages', commonTriggerPoint: VOICE_CALL, defaultConfig: {enabled: false},
treatments: [{'id': 1, 'label': 'Show past VC activity messages in system channel', config: {enabled: true}}]}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_calls/PastVcActivityMessagesExperiment.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_calls/PastVcActivityMessagesExperiment.tsx');
exports.default = value;
exports.isPastVcActivityMessagesEnabled = isPastVcActivityMessagesEnabled;
exports.useIsPastVcActivityMessagesEnabled = useIsPastVcActivityMessagesEnabled;
function isPastVcActivityMessagesEnabled(a0, a1) { // fn#120334, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15893:542, offset: 0x0252850b, size: 51 bytes, params: 3, frame: 14
const binding = env0_0;
const getCurrentConfig = binding.getCurrentConfig;
return Reflect.apply(getCurrentConfig, binding, [{guildId: a0, location: a1}, {autoTrackExposure: true}]).enabled;
}
function useIsPastVcActivityMessagesEnabled(a0, a1) { // fn#120335, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15893:707, offset: 0x0252853e, size: 51 bytes, params: 3, frame: 14
const binding = env0_0;
const useExperiment = binding.useExperiment;
return Reflect.apply(useExperiment, binding, [{guildId: a0, location: a1}, {autoTrackExposure: true}]).enabled;
}
}
function isPastVcActivityMessagesEnabled(a0, a1) { // fn#120334, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15893:542, offset: 0x0252850b, size: 51 bytes, params: 3, frame: 14
const binding = env0_0;
const getCurrentConfig = binding.getCurrentConfig;
return Reflect.apply(getCurrentConfig, binding, [{guildId: a0, location: a1}, {autoTrackExposure: true}]).enabled;
}
function useIsPastVcActivityMessagesEnabled(a0, a1) { // fn#120335, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15893:707, offset: 0x0252853e, size: 51 bytes, params: 3, frame: 14
const binding = env0_0;
const useExperiment = binding.useExperiment;
return Reflect.apply(useExperiment, binding, [{guildId: a0, location: a1}, {autoTrackExposure: true}]).enabled;
}
global.__d(_fun120333, 15685, [4108, 4620, 2]) /* metro module 15685, dependencies: [4108, 4620, 2] */;
@@ -1,4 +1,21 @@
/* Metro module 14703; source: modules/voice_calls/RTCConnectionDesyncHooks.tsx; dependencies: [57, 31, 4606, 4298, 1226, 1379, 1945, 12603, 4294, 1878, 4297, 22, 566, 1360, 4610, 2] */
import Module00057 from '../../by-id/module-00057.js'; /* Metro dependency 57 */
import AuthenticationStore from '../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */
import ChannelStore from '../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import UserStore from '../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import GuildMemberStore from '../../stores/GuildMemberStore.tsx'; /* Metro dependency 1945 */
import RTCConnectionStore from '../../stores/RTCConnectionStore.tsx'; /* Metro dependency 4294 */
import VoiceStateStore from '../../stores/VoiceStateStore.tsx'; /* Metro dependency 4297 */
import VoiceStateRecord from '../../records/VoiceStateRecord.tsx'; /* Metro dependency 4298 */
import ChannelRTCStore from '../calls/ChannelRTCStore.tsx'; /* Metro dependency 4606 */
import RTCConnectionDesyncStore from '../../stores/RTCConnectionDesyncStore.tsx'; /* Metro dependency 12603 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as Module00022Module from '../../by-id/module-00022.js'; /* Metro dependency 22 */
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as FluxModule from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as GlobalUtilsModule from '../../utils/GlobalUtils.tsx'; /* Metro dependency 1360 */
import * as ChannelRTCParticipantsModule from '../calls/ChannelRTCParticipants.tsx'; /* Metro dependency 4610 */
function _fun110903(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#110903, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14900:6, offset: 0x0238bedf, size: 344 bytes, params: 8, frame: 20
let env0_0 = require;
const _arrayLikeToArray_110906 = function(a0, a1) {
@@ -51,302 +68,239 @@ function _fun110903(global, require, importDefault, importAll, module, exports,
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(57) /* metro dependency 57 */;
const env0_3 = importAll(31) /* metro dependency 31 */;
const channelRTCStore = importDefault(4606) /* metro dependency 4606: ChannelRTCStore */;
const voiceStateRecord = importDefault(4298) /* metro dependency 4298: VoiceStateRecord */;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
const rtcConnectionDesyncStore = importDefault(12603) /* metro dependency 12603: RTCConnectionDesyncStore */;
const rtcConnectionStore = importDefault(4294) /* metro dependency 4294: RTCConnectionStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const voiceStateStore = importDefault(4297) /* metro dependency 4297: VoiceStateStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_calls/RTCConnectionDesyncHooks.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_calls/RTCConnectionDesyncHooks.tsx');
exports.useEnsureSyncedChannelVoiceStates = useEnsureSyncedChannelVoiceStates;
exports.useDesyncedChannelParticipants = closure;
exports.useEnsureSyncedChannelParticipants = useEnsureSyncedChannelParticipants;
exports.useIsRTCDisconnectedUIVisible = useIsRTCDisconnectedUIVisible;
}
function _createForOfIteratorHelperLoose_110904(a0, a1) { // fn#110904, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14900:212, offset: 0x0238c037, size: 372 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
const Array = global.Array;
if (Array.isArray(a0)) {
function _createForOfIteratorHelperLoose_110904(a0, a1) { // fn#110904, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14900:212, offset: 0x0238c037, size: 372 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
return _fun110905;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_110906(a0, value);
r5 = value;
} else {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun110905;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_110906(a0, value);
r6 = value;
r5 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
value = _arrayLikeToArray_110906(a0, value);
r6 = value;
} else {
r6 = value;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_110906(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun110905;
}
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
}
function useDesyncedChannelParticipants(a0) { // fn#110907, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14900:1122, offset: 0x0238c1ab, size: 74 bytes, params: 2, frame: 15
const env0_0 = a0;
return (require(566) /* metro dependency 566: flux */).useStateFromStores([RTCConnectionDesyncStore,
RTCConnectionStore], _fun110908);
}
function useEnsureSyncedChannelVoiceStates(a0, a1) { // fn#110909, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14900:1389, offset: 0x0238c225, size: 306 bytes, params: 3, frame: 21
const env0_0 = a0;
const env0_1 = a1;
const value2 = undefined;
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([RTCConnectionDesyncStore,
RTCConnectionStore], _fun110910);
const env0_3 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([ChannelRTCStore],
_fun110911);
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([UserStore], _fun110912);
const basicChannel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], _fun110914);
return env0_3.useMemo(_fun110917, [value3, a1, env0_3.useMemo(_fun110915, [value4,
basicChannel == null ? value2 : basicChannel.guild_id])]);
}
function useEnsureSyncedChannelParticipants(a0, a1) { // fn#110923, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14900:2604, offset: 0x0238c6a2, size: 66 bytes, params: 3, frame: 15
const env0_0 = a1;
return env0_3.useMemo(_fun110924, [useDesyncedChannelParticipants(a0), a1]);
}
function useIsRTCDisconnectedUIVisible(a0, a1) { // fn#110928, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14900:2944, offset: 0x0238c7bb, size: 401 bytes, params: 3, frame: 26
const env0_0 = a0;
const env0_1 = a1;
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([AuthenticationStore], _fun110929);
const channelId = (require(566) /* metro dependency 566: flux */).useStateFromStores([RTCConnectionStore],
function() {
return RTCConnectionStore.getChannelId();
});
const env0_2 = channelId;
const binding = env0_3;
var env0_3 = binding.useRef(null);
let useState = binding.useState;
const value3 = Reflect.apply(useState, binding, [false]);
const binding2 = env0_2;
const value4 = binding2(value3, 2);
const property = value4[0];
const env0_4 = value4[1];
useState = binding.useState;
const value5 = binding2(Reflect.apply(useState, binding, [false]), 2);
const property2 = value5[0];
const env0_5 = value5[1];
const value6 = (require(566) /* metro dependency 566: flux */).useStateFromStores([RTCConnectionStore,
VoiceStateStore], _fun110931);
const value = (require(566) /* metro dependency 566: flux */).useStateFromStores([RTCConnectionStore,
VoiceStateStore], _fun110932);
binding.useEffect(_fun110933, [value6]);
binding.useEffect(_fun110934, [a0, channelId]);
binding.useEffect(_fun110935, [value]);
return !value2 && property2 && property;
}
function _fun110908() { // fn#110908, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14900:1208, offset: 0x0238c1f5, size: 48 bytes, params: 1, frame: 11
const binding = env0_0;
const value = environment.__proto__;
return binding !== RTCConnectionStore.getChannelId() ? null : RTCConnectionDesyncStore.getDesyncedParticipants();
}
function _fun110910() { // fn#110910, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14900:1479, offset: 0x0238c357, size: 48 bytes, params: 1, frame: 11
const binding = env0_0;
const value = environment.__proto__;
return binding !== RTCConnectionStore.getChannelId() ? null : RTCConnectionDesyncStore.getDesyncedVoiceStates();
}
function _fun110911() { // fn#110911, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14900:1579, offset: 0x0238c387, size: 56 bytes, params: 1, frame: 13
var r0;
var value2;
var items2;
var guildRingingUsers;
if (env0_0 == null) {
r0 = [];
} else {
value2 = environment.__proto__;
guildRingingUsers = ChannelRTCStore.getGuildRingingUsers(env0_0);
items2 = [];
arraySpread(items2, guildRingingUsers, 0, ChannelRTCStore);
r0 = items2;
}
return r0;
}
function _fun110912() { // fn#110912, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14900:1668, offset: 0x0238c3bf, size: 69 bytes, params: 1, frame: 13
const value = env0_3.map(function(a0) {
return UserStore.getUser(a0);
});
return value.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish);
}
function _fun110914() { // fn#110914, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14900:1766, offset: 0x0238c41b, size: 27 bytes, params: 1, frame: 11
return ChannelStore.getBasicChannel(env0_0);
}
function _fun110915() { // fn#110915, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14900:1806, offset: 0x0238c436, size: 28 bytes, params: 1, frame: 11
return env0_4.map(_fun110916);
}
function _fun110917() { // fn#110917, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14900:2056, offset: 0x0238c4f3, size: 35 bytes, params: 1, frame: 15
return syncChannelVoiceStates(env0_2, require, env0_6);
}
function _fun110924() { // fn#110924, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14900:2711, offset: 0x0238c6e4, size: 30 bytes, params: 1, frame: 13
return ((a0, a1) => {
if (a0 == null) {
return a1;
}
if (a0.length === 0) {
return a1;
}
var items = [];
arraySpread(items, a1, 0, a0);
var env0_0 = items;
a0.forEach(_fun110926);
return items;
})(env0_1, require);
}
function _fun110929() { // fn#110929, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14900:3028, offset: 0x0238c94c, size: 30 bytes, params: 1, frame: 9
const value = environment.__proto__;
return AuthenticationStore.getId() === require;
}
function _fun110931() { // fn#110931, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14900:3242, offset: 0x0238c96a, size: 113 bytes, params: 1, frame: 16
let r0 = require != null && env0_0 != null && RTCConnectionStore.getChannelId() === env0_0;
r0 = r0 && VoiceStateStore.isInChannel(env0_0, require) != null && RTCConnectionStore.isUserConnected(require);
return r0;
}
function _fun110932() { // fn#110932, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14900:3373, offset: 0x0238c9db, size: 116 bytes, params: 1, frame: 16
let r0 = require != null && env0_0 != null && RTCConnectionStore.getChannelId() === env0_0;
r0 = r0 && VoiceStateStore.isInChannel(env0_0, require) != null && !RTCConnectionStore.isUserConnected(require);
return r0;
}
function _fun110933() { // fn#110933, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14900:3487, offset: 0x0238ca4f, size: 27 bytes, params: 1, frame: 11
if (env0_6) {
env0_5(true);
}
}
function _fun110934() { // fn#110934, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14900:3521, offset: 0x0238ca6a, size: 32 bytes, params: 1, frame: 11
if (channelId !== env0_0) {
env0_5(false);
}
}
function _fun110935() { // fn#110935, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14900:3561, offset: 0x0238ca8a, size: 117 bytes, params: 1, frame: 15
var clearTimeout;
var binding;
if (env0_7) {
if (env0_3.current == null) {
env0_3.current = global.setTimeout(_fun110936, 250);
} else {
clearTimeout = global.clearTimeout;
binding = env0_3;
clearTimeout(binding.current);
binding.current = null;
env0_4(false);
r5 = value;
}
} else {
clearTimeout = global.clearTimeout;
binding = env0_3;
clearTimeout(binding.current);
binding.current = null;
env0_4(false);
if (r5) {
if (r5) {
}
return _fun110905;
}
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
function _fun110905() { // fn#110905, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14900:783, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
return env0_1 >= env0_0.length ? {done: true} : {done: false,
value: env0_0[typeof env0_1 === 'bigint' ? env0_1 : +env0_1]};
}
}
return _fun110937;
}
function _fun110916(a0) { // fn#110916, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14900:1817, offset: 0x0238c452, size: 161 bytes, params: 2, frame: 18
const value = environment.__proto__.__proto__;
const id = a0.id;
const value2 = Object.create(VoiceStateRecord.prototype, {constructor: {value: VoiceStateRecord}});
const voiceStateRecord = new VoiceStateRecord(id);
const basicChannelBinding = basicChannel;
const value5 = null;
const value6 = undefined;
return {voiceState: voiceStateRecord instanceof Object ? voiceStateRecord : value2, user: a0,
member: value5 != (value5 == basicChannelBinding ? value6 : basicChannel.guild_id) ? GuildMemberStore.getMember(value5 == basicChannel ? value6 : basicChannel.guild_id,
a0.id) : value5, nick: a0.globalName, comparator: a0.globalName, _isPlaceholder: false};
}
function useDesyncedChannelParticipants(a0) { // fn#110907, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14900:1122, offset: 0x0238c1ab, size: 74 bytes, params: 2, frame: 15
const env0_0 = a0;
return (FluxModule).useStateFromStores([RTCConnectionDesyncStore,
RTCConnectionStore], _fun110908);
function _fun110908() { // fn#110908, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14900:1208, offset: 0x0238c1f5, size: 48 bytes, params: 1, frame: 11
const binding = env0_0;
const value = environment.__proto__;
return binding !== RTCConnectionStore.getChannelId() ? null : RTCConnectionDesyncStore.getDesyncedParticipants();
}
function syncChannelVoiceStates(a0, a1, a2) { // fn#110918, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14900:2060, offset: 0x0238c516, size: 211 bytes, params: 4, frame: 20
var environment;
var r7;
var length;
var items2;
var Set;
var prototype;
var value;
var set;
var value2;
var value3;
var value4;
var done;
var value5;
var push;
var add;
var user;
var id;
var value6;
var forEach;
if (a0 != null) {
length = a0.length;
reducibleJoin2: while (true) {
if (length !== 0) {
}
function useEnsureSyncedChannelVoiceStates(a0, a1) { // fn#110909, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14900:1389, offset: 0x0238c225, size: 306 bytes, params: 3, frame: 21
const env0_0 = a0;
const env0_1 = a1;
const value2 = undefined;
const value3 = (FluxModule).useStateFromStores([RTCConnectionDesyncStore,
RTCConnectionStore], _fun110910);
const env0_3 = (FluxModule).useStateFromStoresArray([ChannelRTCStore],
_fun110911);
const value4 = (FluxModule).useStateFromStoresArray([UserStore], _fun110912);
const basicChannel = (FluxModule).useStateFromStores([ChannelStore], _fun110914);
return env0_3.useMemo(_fun110917, [value3, a1, env0_3.useMemo(_fun110915, [value4,
basicChannel == null ? value2 : basicChannel.guild_id])]);
function _fun110910() { // fn#110910, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14900:1479, offset: 0x0238c357, size: 48 bytes, params: 1, frame: 11
const binding = env0_0;
const value = environment.__proto__;
return binding !== RTCConnectionStore.getChannelId() ? null : RTCConnectionDesyncStore.getDesyncedVoiceStates();
}
function _fun110911() { // fn#110911, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14900:1579, offset: 0x0238c387, size: 56 bytes, params: 1, frame: 13
var r0;
var value2;
var channelRTCStoreBinding;
var items2;
var guildRingingUsers;
if (env0_0 == null) {
r0 = [];
} else {
value2 = environment.__proto__;
channelRTCStoreBinding = ChannelRTCStore;
guildRingingUsers = channelRTCStoreBinding.getGuildRingingUsers(env0_0);
items2 = [];
arraySpread(items2, guildRingingUsers, 0, channelRTCStoreBinding);
r0 = items2;
}
return r0;
}
function _fun110912() { // fn#110912, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14900:1668, offset: 0x0238c3bf, size: 69 bytes, params: 1, frame: 13
const value = env0_3.map(function(a0) {
return UserStore.getUser(a0);
});
return value.filter((GlobalUtilsModule).isNotNullish);
}
function _fun110914() { // fn#110914, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14900:1766, offset: 0x0238c41b, size: 27 bytes, params: 1, frame: 11
return ChannelStore.getBasicChannel(env0_0);
}
function _fun110915() { // fn#110915, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14900:1806, offset: 0x0238c436, size: 28 bytes, params: 1, frame: 11
return env0_4.map(_fun110916);
function _fun110916(a0) { // fn#110916, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14900:1817, offset: 0x0238c452, size: 161 bytes, params: 2, frame: 18
const value = environment.__proto__.__proto__;
const voiceStateRecordBinding = VoiceStateRecord;
const id = a0.id;
const value2 = Object.create(voiceStateRecordBinding.prototype, {constructor: {value: voiceStateRecordBinding}});
const voiceStateRecord2 = new voiceStateRecordBinding(id);
const basicChannelBinding = basicChannel;
const value5 = null;
const value6 = undefined;
return {voiceState: voiceStateRecord2 instanceof Object ? voiceStateRecord2 : value2, user: a0,
member: value5 != (value5 == basicChannelBinding ? value6 : basicChannel.guild_id) ? GuildMemberStore.getMember(value5 == basicChannel ? value6 : basicChannel.guild_id,
a0.id) : value5, nick: a0.globalName, comparator: a0.globalName, _isPlaceholder: false};
}
}
function _fun110917() { // fn#110917, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14900:2056, offset: 0x0238c4f3, size: 35 bytes, params: 1, frame: 15
return syncChannelVoiceStates(Module00057, require, env0_6);
function syncChannelVoiceStates(a0, a1, a2) { // fn#110918, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14900:2060, offset: 0x0238c516, size: 211 bytes, params: 4, frame: 20
var environment;
var r7;
var length;
var items2;
var Set;
var prototype;
var value;
var set;
var value2;
var value3;
var value4;
var done;
var value5;
var push;
var add;
var user;
var id;
var value6;
var forEach;
if (a0 != null) {
length = a0.length;
reducibleJoin2: while (true) {
if (length !== 0) {
items2 = [];
var env0_0 = items2;
Set = global.Set;
prototype = Set.prototype;
value = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
value = set instanceof Object ? set : value;
var env0_1 = value;
value2 = environment.__proto__.__proto__;
value3 = _createForOfIteratorHelperLoose_110904(a1);
value4 = value3();
done = value4.done;
if (!done) {
r7 = value4;
reducibleLoop4: while (true) {
value5 = r7.value;
push = items2.push;
Reflect.apply(push, items2, [value5]);
add = value.add;
user = value5.user;
id = user.id;
Reflect.apply(add, value, [id]);
value6 = value3();
done = value6.done;
if (done) {
break reducibleLoop4;
}
r7 = value6;
continue reducibleLoop4;
}
}
reducibleJoin7: while (true) {
if (a0 == null) {
break reducibleJoin7;
}
forEach = a0.forEach;
Reflect.apply(forEach, a0, [_fun110919]);
break reducibleJoin7;
}
length = a2.length;
reducibleJoin9: while (true) {
if (length > 0) {
forEach = a2.forEach;
Reflect.apply(forEach, a2, [_fun110921]);
break reducibleJoin9;
}
break reducibleJoin9;
}
return items2;
}
break reducibleJoin2;
}
}
if (a2.length === 0) {
return a1;
}
items2 = [];
var env0_0 = items2;
Set = global.Set;
prototype = Set.prototype;
value = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
value = set instanceof Object ? set : value;
var env0_1 = value;
value2 = environment.__proto__.__proto__;
value3 = _createForOfIteratorHelperLoose_110904(a1);
value4 = value3();
done = value4.done;
@@ -356,10 +310,10 @@ function syncChannelVoiceStates(a0, a1, a2) { // fn#110918, source: /ci/build/di
value5 = r7.value;
push = items2.push;
Reflect.apply(push, items2, [value5]);
add = value.add;
add = set.add;
user = value5.user;
id = user.id;
Reflect.apply(add, value, [id]);
Reflect.apply(add, set, [id]);
value6 = value3();
done = value6.done;
if (done) {
@@ -377,9 +331,8 @@ function syncChannelVoiceStates(a0, a1, a2) { // fn#110918, source: /ci/build/di
Reflect.apply(forEach, a0, [_fun110919]);
break reducibleJoin7;
}
length = a2.length;
reducibleJoin9: while (true) {
if (length > 0) {
if (a2.length > 0) {
forEach = a2.forEach;
Reflect.apply(forEach, a2, [_fun110921]);
break reducibleJoin9;
@@ -387,119 +340,181 @@ function syncChannelVoiceStates(a0, a1, a2) { // fn#110918, source: /ci/build/di
break reducibleJoin9;
}
return items2;
function _fun110919(a0) { // fn#110919, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14900:2295, offset: 0x0238c5e9, size: 78 bytes, params: 2, frame: 18
const binding = env0_0;
const splice = binding.splice;
Reflect.apply(splice, binding, [Module00022Module.sortedIndexBy(env0_0, a0, function(a0) {
return a0.comparator;
}), 0, a0]);
}
function _fun110921(a0) { // fn#110921, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14900:2390, offset: 0x0238c637, size: 107 bytes, params: 2, frame: 17
var environment;
var splice;
var value2;
var moduleValue;
let binding = env0_1;
const has = binding.has;
const user = a0.user;
if (!Reflect.apply(has, binding, [user.id])) {
binding = env0_0;
splice = binding.splice;
value2 = environment.__proto__.__proto__.__proto__;
moduleValue = require(22) /* metro dependency 22 */;
Reflect.apply(splice, binding, [moduleValue.sortedIndexBy(env0_0, a0, function(a0) {
return a0.comparator;
}), 0, a0]);
}
}
}
break reducibleJoin2;
}
}
if (a2.length === 0) {
return a1;
}
items2 = [];
Set = global.Set;
set = new Set();
value3 = _createForOfIteratorHelperLoose_110904(a1);
value4 = value3();
done = value4.done;
if (!done) {
r7 = value4;
reducibleLoop4: while (true) {
value5 = r7.value;
push = items2.push;
Reflect.apply(push, items2, [value5]);
add = set.add;
user = value5.user;
id = user.id;
Reflect.apply(add, set, [id]);
value6 = value3();
done = value6.done;
if (done) {
break reducibleLoop4;
function useEnsureSyncedChannelParticipants(a0, a1) { // fn#110923, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14900:2604, offset: 0x0238c6a2, size: 66 bytes, params: 3, frame: 15
const env0_0 = a1;
return ReactModule.useMemo(_fun110924, [useDesyncedChannelParticipants(a0), a1]);
function _fun110924() { // fn#110924, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14900:2711, offset: 0x0238c6e4, size: 30 bytes, params: 1, frame: 13
return ((a0, a1) => {
if (a0 == null) {
return a1;
}
if (a0.length === 0) {
return a1;
}
var items = [];
arraySpread(items, a1, 0, a0);
var env0_0 = items;
a0.forEach(_fun110926);
return items;
})(env0_1, require);
function syncChannelParticipants(a0, a1) { // fn#110925, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14900:2715, offset: 0x0238c702, size: 66 bytes, params: 3, frame: 15
if (a0 == null) {
return a1;
}
if (a0.length === 0) {
return a1;
}
const items2 = [];
arraySpread(items2, a1, 0, a0);
a0.forEach(_fun110926);
return items2;
function _fun110926(a0) { // fn#110926, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14900:2818, offset: 0x0238c744, size: 78 bytes, params: 2, frame: 18
const binding = env0_0;
const splice = binding.splice;
Reflect.apply(splice, binding, [Module00022Module.sortedIndexBy(env0_0, a0, _fun110927), 0, a0]);
function _fun110927(a0) { // fn#110927, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14900:2860, offset: 0x0238c792, size: 41 bytes, params: 2, frame: 11
const value = environment.__proto__.__proto__.__proto__.__proto__;
return (ChannelRTCParticipantsModule).sortKey(a0);
}
}
}
r7 = value6;
continue reducibleLoop4;
}
}
reducibleJoin7: while (true) {
if (a0 == null) {
break reducibleJoin7;
function useIsRTCDisconnectedUIVisible(a0, a1) { // fn#110928, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14900:2944, offset: 0x0238c7bb, size: 401 bytes, params: 3, frame: 26
const env0_0 = a0;
const env0_1 = a1;
let useStateFromStores = FluxModule.useStateFromStores;
const value2 = Reflect.apply(useStateFromStores, FluxModule, [[AuthenticationStore], _fun110929]);
const channelId = FluxModule.useStateFromStores([RTCConnectionStore], function() {
return RTCConnectionStore.getChannelId();
});
const channelId2 = channelId;
const binding = env0_3;
var env0_3 = binding.useRef(null);
let useState = binding.useState;
const value3 = Reflect.apply(useState, binding, [false]);
const binding2 = channelId2;
const value4 = binding2(value3, 2);
const property = value4[0];
const env0_4 = value4[1];
useState = binding.useState;
const value5 = binding2(Reflect.apply(useState, binding, [false]), 2);
const property2 = value5[0];
const env0_5 = value5[1];
useStateFromStores = FluxModule.useStateFromStores;
const voiceStateStoreBinding = VoiceStateStore;
const value6 = Reflect.apply(useStateFromStores, FluxModule, [[RTCConnectionStore, voiceStateStoreBinding],
_fun110931]);
const value = FluxModule.useStateFromStores([RTCConnectionStore, voiceStateStoreBinding], _fun110932);
binding.useEffect(_fun110933, [value6]);
binding.useEffect(_fun110934, [a0, channelId]);
binding.useEffect(_fun110935, [value]);
return !value2 && property2 && property;
function _fun110929() { // fn#110929, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14900:3028, offset: 0x0238c94c, size: 30 bytes, params: 1, frame: 9
const value = environment.__proto__;
return AuthenticationStore.getId() === require;
}
forEach = a0.forEach;
Reflect.apply(forEach, a0, [_fun110919]);
break reducibleJoin7;
}
reducibleJoin9: while (true) {
if (a2.length > 0) {
forEach = a2.forEach;
Reflect.apply(forEach, a2, [_fun110921]);
break reducibleJoin9;
function _fun110931() { // fn#110931, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14900:3242, offset: 0x0238c96a, size: 113 bytes, params: 1, frame: 16
let r0 = require != null && env0_0 != null && RTCConnectionStore.getChannelId() === env0_0;
r0 = r0 && VoiceStateStore.isInChannel(env0_0, require) != null && RTCConnectionStore.isUserConnected(require);
return r0;
}
break reducibleJoin9;
function _fun110932() { // fn#110932, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14900:3373, offset: 0x0238c9db, size: 116 bytes, params: 1, frame: 16
let r0 = require != null && env0_0 != null && RTCConnectionStore.getChannelId() === env0_0;
r0 = r0 && VoiceStateStore.isInChannel(env0_0, require) != null && !RTCConnectionStore.isUserConnected(require);
return r0;
}
function _fun110933() { // fn#110933, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14900:3487, offset: 0x0238ca4f, size: 27 bytes, params: 1, frame: 11
if (env0_6) {
env0_5(true);
}
}
function _fun110934() { // fn#110934, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14900:3521, offset: 0x0238ca6a, size: 32 bytes, params: 1, frame: 11
if (channelId !== env0_0) {
env0_5(false);
}
}
function _fun110935() { // fn#110935, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14900:3561, offset: 0x0238ca8a, size: 117 bytes, params: 1, frame: 15
var clearTimeout;
var binding;
if (env0_7) {
if (env0_3.current == null) {
env0_3.current = global.setTimeout(_fun110936, 250);
} else {
clearTimeout = global.clearTimeout;
binding = env0_3;
clearTimeout(binding.current);
binding.current = null;
env0_4(false);
}
} else {
clearTimeout = global.clearTimeout;
binding = env0_3;
clearTimeout(binding.current);
binding.current = null;
env0_4(false);
}
return _fun110937;
function _fun110936() { // fn#110936, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14900:3607, offset: 0x0238caff, size: 30 bytes, params: 1, frame: 11
env1_3.current = null;
env1_4(true);
}
function _fun110937() { // fn#110937, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14900:3687, offset: 0x0238cb1d, size: 37 bytes, params: 1, frame: 12
const clearTimeout = global.clearTimeout;
const binding = env1_3;
clearTimeout(binding.current);
binding.current = null;
}
}
}
return items2;
}
function syncChannelParticipants(a0, a1) { // fn#110925, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14900:2715, offset: 0x0238c702, size: 66 bytes, params: 3, frame: 15
if (a0 == null) {
return a1;
}
if (a0.length === 0) {
return a1;
}
const items2 = [];
arraySpread(items2, a1, 0, a0);
a0.forEach(_fun110926);
return items2;
}
function _fun110936() { // fn#110936, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14900:3607, offset: 0x0238caff, size: 30 bytes, params: 1, frame: 11
env1_3.current = null;
env1_4(true);
}
function _fun110937() { // fn#110937, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14900:3687, offset: 0x0238cb1d, size: 37 bytes, params: 1, frame: 12
const clearTimeout = global.clearTimeout;
const binding = env1_3;
clearTimeout(binding.current);
binding.current = null;
}
function _fun110919(a0) { // fn#110919, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14900:2295, offset: 0x0238c5e9, size: 78 bytes, params: 2, frame: 18
const binding = env0_0;
const splice = binding.splice;
const moduleValue = require(22) /* metro dependency 22 */;
Reflect.apply(splice, binding, [moduleValue.sortedIndexBy(env0_0, a0, function(a0) {
return a0.comparator;
}), 0, a0]);
}
function _fun110921(a0) { // fn#110921, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14900:2390, offset: 0x0238c637, size: 107 bytes, params: 2, frame: 17
var environment;
var splice;
var value2;
var moduleValue;
let binding = env0_1;
const has = binding.has;
const user = a0.user;
if (!Reflect.apply(has, binding, [user.id])) {
binding = env0_0;
splice = binding.splice;
value2 = environment.__proto__.__proto__.__proto__;
moduleValue = require(22) /* metro dependency 22 */;
Reflect.apply(splice, binding, [moduleValue.sortedIndexBy(env0_0, a0, function(a0) {
return a0.comparator;
}), 0, a0]);
}
}
function _fun110926(a0) { // fn#110926, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14900:2818, offset: 0x0238c744, size: 78 bytes, params: 2, frame: 18
const binding = env0_0;
const splice = binding.splice;
const moduleValue = require(22) /* metro dependency 22 */;
Reflect.apply(splice, binding, [moduleValue.sortedIndexBy(env0_0, a0, _fun110927), 0, a0]);
}
function _fun110927(a0) { // fn#110927, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14900:2860, offset: 0x0238c792, size: 41 bytes, params: 2, frame: 11
const value = environment.__proto__.__proto__.__proto__.__proto__;
return (require(4610) /* metro dependency 4610: ChannelRTCParticipants */).sortKey(a0);
}
global.__d(_fun110903, 14703, [57, 31, 4606, 4298, 1226, 1379, 1945, 12603, 4294, 1878, 4297, 22, 566, 1360, 4610,
2]) /* metro module 14703, dependencies: [57, 31, 4606, 4298, 1226, 1379, 1945, 12603, 4294, 1878, 4297, 22, 566, 1360, 4610, 2] */;
@@ -1,15 +1,20 @@
/* Metro module 15686; source: modules/voice_calls/VoiceCallTriggerPointExperiment.tsx; dependencies: [4108, 4620, 2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ExperimentConstantsModule from '../experiments/ExperimentConstants.tsx'; /* Metro dependency 4108 */
import * as ExperimentsModule from '../experiments/index.tsx'; /* Metro dependency 4620 */
function _fun120336(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#120336, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15894:6, offset: 0x02528571, size: 195 bytes, params: 8, frame: 20
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const CommonTriggerPoints = (require(4108) /* metro dependency 4108: ExperimentConstants */).CommonTriggerPoints;
let value = require(4620) /* metro dependency 4620: experiments */;
const CommonTriggerPoints = (ExperimentConstantsModule).CommonTriggerPoints;
let value = ExperimentsModule;
const createExperiment = value.createExperiment;
const VOICE_CALL = CommonTriggerPoints.VOICE_CALL;
value = Reflect.apply(createExperiment, value, [{'kind': 'guild', 'id': '2026-04_voice_call_trigger_point',
'label': 'Voice Call Trigger Point Experiment', commonTriggerPoint: VOICE_CALL, defaultConfig: {enabled: false},
treatments: [{'id': 1, 'label': 'Treatment', config: {enabled: true}}]}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_calls/VoiceCallTriggerPointExperiment.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_calls/VoiceCallTriggerPointExperiment.tsx');
exports.default = value;
}
global.__d(_fun120336, 15686, [4108, 4620, 2]) /* metro module 15686, dependencies: [4108, 4620, 2] */;
@@ -1,8 +1,11 @@
/* Metro module 9230; source: modules/voice_calls/VoiceCallTypes.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun72208(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#72208, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9415:6, offset: 0x01d3e526, size: 122 bytes, params: 8, frame: 16
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_calls/VoiceCallTypes.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_calls/VoiceCallTypes.tsx');
exports.RouteTypes = {UNKNOWN: 'unknown', BLUETOOTH: 'bluetooth', SPEAKER: 'speaker', RECEIVER: 'receiver'};
}
global.__d(_fun72208, 9230, [2]) /* metro module 9230, dependencies: [2] */;
@@ -1,160 +1,170 @@
/* Metro module 15666; source: modules/voice_calls/VoicePermissionManager.tsx; dependencies: [6, 7, 15, 17, 18, 4811, 4298, 1226, 1379, 4259, 4294, 661, 4661, 4662, 15667, 4802, 4860, 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 AuthenticationStore from '../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */
import ChannelStore from '../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import MediaEngineStore from '../../stores/MediaEngineStore.tsx'; /* Metro dependency 4259 */
import RTCConnectionStore from '../../stores/RTCConnectionStore.tsx'; /* Metro dependency 4294 */
import VoiceStateRecord from '../../records/VoiceStateRecord.tsx'; /* Metro dependency 4298 */
import NativePermissionUtils from '../native_permissions/NativePermissionUtils.tsx'; /* Metro dependency 4662 */
import StageChannelRoleStore from '../stage_channels/StageChannelRoleStore.tsx'; /* Metro dependency 4811 */
import AutomaticLifecycleManager from '../../lib/AutomaticLifecycleManager.tsx'; /* Metro dependency 4860 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as NativePermissionConstantsModule from '../native_permissions/NativePermissionConstants.tsx'; /* Metro dependency 4661 */
function _fun120113(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#120113, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15874:6, offset: 0x025213d0, size: 404 bytes, params: 8, frame: 20
const env0_0 = require;
const closure = shouldImmediatelyRequestVoicePermissions;
const shouldImmediatelyRequestVoicePermissions2 = shouldImmediatelyRequestVoicePermissions;
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 */;
const stageChannelRoleStore = importDefault(4811) /* metro dependency 4811: StageChannelRoleStore */;
const voiceStateRecord = importDefault(4298) /* metro dependency 4298: VoiceStateRecord */;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const mediaEngineStore = importDefault(4259) /* metro dependency 4259: MediaEngineStore */;
const rtcConnectionStore = importDefault(4294) /* metro dependency 4294: RTCConnectionStore */;
const env0_14 = (require(661) /* metro dependency 661: Constants */).InputModes;
const env0_15 = (require(4661) /* metro dependency 4661: NativePermissionConstants */).NativePermissionTypes;
let value = importDefault(4860) /* metro dependency 4860: AutomaticLifecycleManager */;
let value = AutomaticLifecycleManager;
value = _fun120120(value);
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_calls/VoicePermissionManager.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_calls/VoicePermissionManager.tsx');
exports.default = value;
exports.shouldImmediatelyRequestVoicePermissions = closure;
}
function _isNativeReflectConstruct_120114() { // fn#120114, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15874:264, offset: 0x02521564, 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_120114_isNativeReflectConstruct = function() {
return !!result;
})();
}
function voicePermissionRequest() { // fn#120117, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15874:468, offset: 0x025215c6, size: 133 bytes, params: 1, frame: 14
var defaultImport2;
const defaultImport = importDefault(4662) /* metro dependency 4662: NativePermissionUtils */;
const requestPermission = defaultImport.requestPermission;
const AUDIO = NativePermissionTypes.AUDIO;
Reflect.apply(requestPermission, defaultImport, [AUDIO]).then(_fun120118);
const mode = MediaEngineStore.getMode();
const PUSH_TO_TALK = InputModes.PUSH_TO_TALK;
if (mode === PUSH_TO_TALK) {
defaultImport2 = defaultImport;
defaultImport2.requestPermission(NativePermissionTypes.INPUT_MONITORING);
}
}
function shouldImmediatelyRequestVoicePermissions(a0, a1) { // fn#120119, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15874:644, offset: 0x02521675, size: 70 bytes, params: 3, frame: 14
let r0 = ChannelStore.getChannel(a1)?.isListenModeCapable();
r0 = r0 ? StageChannelRoleStore.isSpeaker(a0, a1) : !r0;
return r0;
}
function _fun120120(a0) { // fn#120120, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15874:799, offset: 0x025216bb, size: 97 bytes, params: 2, frame: 16
const closure = VoicePermissionManager;
env0_7(closure, a0);
return env0_4(closure, [{key: 'handleVoiceChannelSelect', value: value_120122}, {key: 'handleVoiceStateUpdates',
value: function({voiceStates}) {
voiceStates.forEach(_fun120124);
}}]);
}
function _fun120118(a0) { // fn#120118, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15874:544, offset: 0x0252164b, size: 42 bytes, params: 2, frame: 11
var value;
if (a0) {
value = environment.__proto__;
value = importDefault(15667) /* metro dependency 15667: setAudioInputEnabledAndroid */;
value(true);
}
}
function VoicePermissionManager(a0) { // fn#120121, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15874:811, offset: 0x0252171c, size: 156 bytes, params: 2, frame: 19
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_3;
binding(this, VoicePermissionManager);
const items = [];
arraySpread(items, value, 0, items);
value = env1_6(VoicePermissionManager);
binding = env1_5;
if (_isNativeReflectConstruct_120114()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items, env1_6(this).constructor);
r0 = value;
} else {
value = value.apply(this, items);
r0 = value;
}
value = binding(this, r0);
value.actions = {VOICE_STATE_UPDATES: value.handleVoiceStateUpdates,
VOICE_CHANNEL_SELECT: value.handleVoiceChannelSelect};
return value;
}
function value_120122({channelId}) { // fn#120122, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15874:1270, offset: 0x025217b8, size: 25 bytes, params: 2, frame: 2
var value;
if (channelId == null) {
value = environment.__proto__;
}
}
function value_120123({voiceStates}) { // fn#120123, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15874:1351, offset: 0x025217d1, size: 32 bytes, params: 2, frame: 11
voiceStates.forEach(_fun120124);
}
function _fun120124(a0) { // fn#120124, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15874:1388, offset: 0x025217f1, size: 200 bytes, params: 2, frame: 18
const userId = a0.userId;
const channelId = a0.channelId;
if (channelId != null) {
var getId = AuthenticationStore.getId;
if (Reflect.apply(getId, AuthenticationStore, []) !== userId) {
return undefined;
}
var getRTCConnectionId = RTCConnectionStore.getRTCConnectionId;
if (Reflect.apply(getRTCConnectionId, RTCConnectionStore, []) == null) {
return undefined;
}
if (env2_16 === channelId) {
return undefined;
}
if (shouldImmediatelyRequestVoicePermissions(userId, channelId)) {
voicePermissionRequest();
return undefined;
}
var value2 = Object.create(VoiceStateRecord.prototype, {constructor: {value: VoiceStateRecord}});
var voiceStateRecord = new VoiceStateRecord(a0);
var audienceRequestToSpeakState = (require(4802) /* metro dependency 4802: useAudienceRequestToSpeakState */).getAudienceRequestToSpeakState(voiceStateRecord instanceof Object ? voiceStateRecord : value2);
var RequestToSpeakStates = (require(4802) /* metro dependency 4802: useAudienceRequestToSpeakState */).RequestToSpeakStates;
var REQUESTED_TO_SPEAK_AND_AWAITING_USER_ACK = RequestToSpeakStates.REQUESTED_TO_SPEAK_AND_AWAITING_USER_ACK;
if (audienceRequestToSpeakState === REQUESTED_TO_SPEAK_AND_AWAITING_USER_ACK) {
voicePermissionRequest();
exports.shouldImmediatelyRequestVoicePermissions = shouldImmediatelyRequestVoicePermissions2;
function _isNativeReflectConstruct_120114() { // fn#120114, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15874:264, offset: 0x02521564, 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_120114_isNativeReflectConstruct = function() {
return !!result;
})();
}
function voicePermissionRequest() { // fn#120117, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15874:468, offset: 0x025215c6, size: 133 bytes, params: 1, frame: 14
var defaultImport2;
const defaultImport = NativePermissionUtils;
const requestPermission = defaultImport.requestPermission;
const AUDIO = NativePermissionTypes.AUDIO;
Reflect.apply(requestPermission, defaultImport, [AUDIO]).then(_fun120118);
const mode = MediaEngineStore.getMode();
const PUSH_TO_TALK = InputModes.PUSH_TO_TALK;
if (mode === PUSH_TO_TALK) {
defaultImport2 = defaultImport;
defaultImport2.requestPermission(NativePermissionTypes.INPUT_MONITORING);
}
function _fun120118(a0) { // fn#120118, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15874:544, offset: 0x0252164b, size: 42 bytes, params: 2, frame: 11
var value;
if (a0) {
value = environment.__proto__;
value = importDefault(15667) /* metro dependency 15667: setAudioInputEnabledAndroid */;
value(true);
}
}
}
function shouldImmediatelyRequestVoicePermissions(a0, a1) { // fn#120119, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15874:644, offset: 0x02521675, size: 70 bytes, params: 3, frame: 14
let r0 = ChannelStore.getChannel(a1)?.isListenModeCapable();
r0 = r0 ? StageChannelRoleStore.isSpeaker(a0, a1) : !r0;
return r0;
}
function _fun120120(a0) { // fn#120120, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15874:799, offset: 0x025216bb, size: 97 bytes, params: 2, frame: 16
const VoicePermissionManager2 = VoicePermissionManager;
Inherits(VoicePermissionManager2, a0);
return CreateClass(VoicePermissionManager2, [{key: 'handleVoiceChannelSelect', value: value_120122},
{key: 'handleVoiceStateUpdates', value: function({voiceStates}) {
voiceStates.forEach(_fun120124);
}}]);
function VoicePermissionManager(a0) { // fn#120121, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15874:811, offset: 0x0252171c, size: 156 bytes, params: 2, frame: 19
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_3;
binding(this, VoicePermissionManager);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_6(VoicePermissionManager);
binding = env1_5;
if (_isNativeReflectConstruct_120114()) {
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.actions = {VOICE_STATE_UPDATES: value.handleVoiceStateUpdates,
VOICE_CHANNEL_SELECT: value.handleVoiceChannelSelect};
return value;
}
function value_120122({channelId}) { // fn#120122, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15874:1270, offset: 0x025217b8, size: 25 bytes, params: 2, frame: 2
var value;
if (channelId == null) {
value = environment.__proto__;
}
}
function value_120123({voiceStates}) { // fn#120123, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15874:1351, offset: 0x025217d1, size: 32 bytes, params: 2, frame: 11
voiceStates.forEach(_fun120124);
function _fun120124(a0) { // fn#120124, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15874:1388, offset: 0x025217f1, size: 200 bytes, params: 2, frame: 18
const userId = a0.userId;
const channelId = a0.channelId;
if (channelId != null) {
var authenticationStoreBinding = AuthenticationStore;
var getId = authenticationStoreBinding.getId;
if (Reflect.apply(getId, authenticationStoreBinding, []) !== userId) {
return undefined;
}
var rtcConnectionStoreBinding = RTCConnectionStore;
var getRTCConnectionId = rtcConnectionStoreBinding.getRTCConnectionId;
if (Reflect.apply(getRTCConnectionId, rtcConnectionStoreBinding, []) == null) {
return undefined;
}
if (env2_16 === channelId) {
return undefined;
}
if (shouldImmediatelyRequestVoicePermissions(userId, channelId)) {
voicePermissionRequest();
return undefined;
}
var voiceStateRecordBinding = VoiceStateRecord;
var value2 = Object.create(voiceStateRecordBinding.prototype, {constructor: {value: voiceStateRecordBinding}});
var voiceStateRecord2 = new voiceStateRecordBinding(a0);
var audienceRequestToSpeakState = (require(4802) /* metro dependency 4802: useAudienceRequestToSpeakState */).getAudienceRequestToSpeakState(voiceStateRecord2 instanceof Object ? voiceStateRecord2 : value2);
var RequestToSpeakStates = (require(4802) /* metro dependency 4802: useAudienceRequestToSpeakState */).RequestToSpeakStates;
var REQUESTED_TO_SPEAK_AND_AWAITING_USER_ACK = RequestToSpeakStates.REQUESTED_TO_SPEAK_AND_AWAITING_USER_ACK;
if (audienceRequestToSpeakState === REQUESTED_TO_SPEAK_AND_AWAITING_USER_ACK) {
voicePermissionRequest();
}
}
}
}
}
}
global.__d(_fun120113, 15666, [6, 7, 15, 17, 18, 4811, 4298, 1226, 1379, 4259, 4294, 661, 4661, 4662, 15667, 4802,
4860,
2]) /* metro module 15666, dependencies: [6, 7, 15, 17, 18, 4811, 4298, 1226, 1379, 4259, 4294, 661, 4661, 4662, 15667, 4802, 4860, 2] */;
@@ -1,78 +1,91 @@
/* Metro module 12366; source: modules/voice_calls/collectCallFeedback.tsx; dependencies: [8905, 1379, 4259, 4294, 1934, 1878, 9229, 4863, 8909, 8906, 694, 2] */
import ChannelStore from '../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import UserStore from '../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import SelectedChannelStore from '../../stores/SelectedChannelStore.tsx'; /* Metro dependency 1934 */
import MediaEngineStore from '../../stores/MediaEngineStore.tsx'; /* Metro dependency 4259 */
import RTCConnectionStore from '../../stores/RTCConnectionStore.tsx'; /* Metro dependency 4294 */
import VideoBackgroundStore from '../video_backgrounds/VideoBackgroundStore.tsx'; /* Metro dependency 8905 */
import AudioRouteStoreNative from './AudioRouteStore.native.tsx'; /* Metro dependency 9229 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun94269(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#94269, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12552:6, offset: 0x021125a2, size: 214 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const videoBackgroundStore = importDefault(8905) /* metro dependency 8905: VideoBackgroundStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const mediaEngineStore = importDefault(4259) /* metro dependency 4259: MediaEngineStore */;
const rtcConnectionStore = importDefault(4294) /* metro dependency 4294: RTCConnectionStore */;
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const audioRouteStoreNative = importDefault(9229) /* metro dependency 9229: AudioRouteStoreNative */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_calls/collectCallFeedback.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_calls/collectCallFeedback.tsx');
exports.default = collectCallFeedback;
}
function collectCallFeedback(a0, a1, a2, a3) { // fn#94270, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12552:254, offset: 0x02112678, size: 625 bytes, params: 5, frame: 21
var r6;
var duration_muted_ms;
var rTCConnection;
var value6;
var object2;
var moduleValue;
var object4;
var moduleValue2;
var value11;
var property;
var value;
const voiceChannelId = SelectedChannelStore.getVoiceChannelId();
const channel = ChannelStore.getChannel(voiceChannelId);
const value4 = null;
if (value4 != a1) {
a0();
} else if (value4 == voiceChannelId) {
a0();
} else if (value4 != channel) {
rTCConnection = RTCConnectionStore.getRTCConnection();
value6 = undefined;
r6 = value4 == rTCConnection ? value6 : rTCConnection.getVoiceDurationStats();
object2 = {};
object2.channel_id = channel.id;
object2.channel_type = channel.type;
object2.guild_id = channel.getGuildId();
object2.rtc_connection_id = RTCConnectionStore.getRTCConnectionId();
object2.duration = RTCConnectionStore.getDuration();
object2.media_session_id = RTCConnectionStore.getMediaSessionId();
moduleValue = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
copyDataProperties(object2, moduleValue.getVoiceStateMetadata(RTCConnectionStore.getGuildId(),
RTCConnectionStore.getChannelId(), a3), undefined);
duration_muted_ms = value4 == r6 ? value6 : r6.duration_muted_ms;
r6 = value4 != duration_muted_ms ? duration_muted_ms : value4;
object2['duration_muted_ms'] = r6;
object2['output_audio_route_type'] = AudioRouteStoreNative.getCurrentRouteType();
a0();
if (VideoBackgroundStore.hasUsedBackgroundInCall) {
object4 = {};
copyDataProperties(object4, object2, undefined);
moduleValue2 = require(8909) /* metro dependency 8909: LastUsedVideoBackgroundOption */;
value11 = moduleValue2.getLastUsedVideoBackgroundOption(UserStore.getCurrentUser());
object2 = {};
property = MediaEngineStore.getVideoDevices()[MediaEngineStore.getVideoDeviceId()];
object2.video_device_name = value4 == property ? value6 : property.name;
object2.video_hardware_scaling_enabled = MediaEngineStore.getHardwareEncoding();
object2.video_effect_type = (require(8906) /* metro dependency 8906: VideoBackgroundUtils */).getEffectAnalyticsType(value11);
object2.video_effect_detail = (require(8906) /* metro dependency 8906: VideoBackgroundUtils */).getEffectDetailAnalyticsName(value11);
copyDataProperties(object4, object2, undefined);
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'VIDEO_BACKGROUND_SHOW_FEEDBACK',
analyticsData: object4});
function collectCallFeedback(a0, a1, a2, a3) { // fn#94270, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12552:254, offset: 0x02112678, size: 625 bytes, params: 5, frame: 21
var r6;
var duration_muted_ms;
var rtcConnectionStoreBinding;
var rTCConnection;
var value6;
var object;
var moduleValue;
var object3;
var moduleValue2;
var getLastUsedVideoBackgroundOption;
var userStoreBinding;
var value11;
var mediaEngineStoreBinding;
var property;
var value;
const voiceChannelId = SelectedChannelStore.getVoiceChannelId();
const channel = ChannelStore.getChannel(voiceChannelId);
const value4 = null;
if (value4 != a1) {
a0();
} else if (value4 == voiceChannelId) {
a0();
} else if (value4 != channel) {
rTCConnection = RTCConnectionStore.getRTCConnection();
value6 = undefined;
r6 = value4 == rTCConnection ? value6 : rTCConnection.getVoiceDurationStats();
object = {};
object.channel_id = channel.id;
object.channel_type = channel.type;
object.guild_id = channel.getGuildId();
rtcConnectionStoreBinding = RTCConnectionStore;
object.rtc_connection_id = rtcConnectionStoreBinding.getRTCConnectionId();
object.duration = rtcConnectionStoreBinding.getDuration();
object.media_session_id = rtcConnectionStoreBinding.getMediaSessionId();
moduleValue = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
copyDataProperties(object, moduleValue.getVoiceStateMetadata(rtcConnectionStoreBinding.getGuildId(),
rtcConnectionStoreBinding.getChannelId(), a3), undefined);
duration_muted_ms = value4 == r6 ? value6 : r6.duration_muted_ms;
r6 = value4 != duration_muted_ms ? duration_muted_ms : value4;
object['duration_muted_ms'] = r6;
object['output_audio_route_type'] = AudioRouteStoreNative.getCurrentRouteType();
a0();
if (VideoBackgroundStore.hasUsedBackgroundInCall) {
object3 = {};
copyDataProperties(object3, object, undefined);
moduleValue2 = require(8909) /* metro dependency 8909: LastUsedVideoBackgroundOption */;
getLastUsedVideoBackgroundOption = moduleValue2.getLastUsedVideoBackgroundOption;
userStoreBinding = UserStore;
value11 = Reflect.apply(getLastUsedVideoBackgroundOption, moduleValue2,
[userStoreBinding.getCurrentUser()]);
object = {};
mediaEngineStoreBinding = MediaEngineStore;
property = mediaEngineStoreBinding.getVideoDevices()[mediaEngineStoreBinding.getVideoDeviceId()];
object.video_device_name = value4 == property ? value6 : property.name;
object.video_hardware_scaling_enabled = MediaEngineStore.getHardwareEncoding();
object.video_effect_type = (require(8906) /* metro dependency 8906: VideoBackgroundUtils */).getEffectAnalyticsType(value11);
object.video_effect_detail = (require(8906) /* metro dependency 8906: VideoBackgroundUtils */).getEffectDetailAnalyticsName(value11);
copyDataProperties(object3, object, undefined);
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'VIDEO_BACKGROUND_SHOW_FEEDBACK',
analyticsData: object3});
} else {
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.dispatch({type: 'VOICE_CHANNEL_SHOW_FEEDBACK', analyticsData: object});
}
} else {
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.dispatch({type: 'VOICE_CHANNEL_SHOW_FEEDBACK', analyticsData: object2});
a0();
}
} else {
a0();
}
}
global.__d(_fun94269, 12366, [8905, 1379, 4259, 4294, 1934, 1878, 9229, 4863, 8909, 8906, 694,
2]) /* metro module 12366, dependencies: [8905, 1379, 4259, 4294, 1934, 1878, 9229, 4863, 8909, 8906, 694, 2] */;
@@ -1,12 +1,16 @@
/* Metro module 13008; source: modules/voice_calls/native/AndroidVoiceNotificationExperiment.tsx; dependencies: [1358, 2] */
import ApexExperiment from '../../experiments/apex/ApexExperiment.tsx'; /* Metro dependency 1358 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun99217(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#99217, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13198:6, offset: 0x021c03d8, size: 174 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importDefault(1358) /* metro dependency 1358: ApexExperiment */;
let value = ApexExperiment;
value = value({'kind': 'user', 'name': '2026-05-android-voice-notification', defaultConfig: {'enabled': false,
'showSpeakingIcon': false}, variations: {[1]: {'enabled': true, 'showSpeakingIcon': true},
[2]: {'enabled': true, 'showSpeakingIcon': false}}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_calls/native/AndroidVoiceNotificationExperiment.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_calls/native/AndroidVoiceNotificationExperiment.tsx');
exports.default = value;
}
global.__d(_fun99217, 13008, [1358, 2]) /* metro module 13008, dependencies: [1358, 2] */;
@@ -1,13 +1,17 @@
/* Metro module 9242; source: modules/voice_calls/native/AudioManagerActionCreator.tsx; dependencies: [694, 2] */
import Dispatcher from '../../../Dispatcher.tsx'; /* Metro dependency 694 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun72266(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#72266, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9427:6, offset: 0x01d40661, 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_calls/native/AudioManagerActionCreator.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_calls/native/AudioManagerActionCreator.tsx');
exports.setAudioOutputDevice = setAudioOutputDevice;
function setAudioOutputDevice(a0) { // fn#72267, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9427:205, offset: 0x01d406c4, size: 56 bytes, params: 2, frame: 13
(Dispatcher).dispatch({type: 'NATIVE_AUDIO_SET_OUTPUT_DEVICE',
device: a0});
}
}
function setAudioOutputDevice(a0) { // fn#72267, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9427:205, offset: 0x01d406c4, size: 56 bytes, params: 2, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'NATIVE_AUDIO_SET_OUTPUT_DEVICE',
device: a0});
}
global.__d(_fun72266, 9242, [694, 2]) /* metro module 9242, dependencies: [694, 2] */;
@@ -1,131 +1,160 @@
/* Metro module 9232; source: modules/voice_calls/native/AudioManagerStore.android.tsx; dependencies: [6, 7, 15, 17, 18, 27, 661, 4291, 9233, 22, 1216, 566, 694, 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 Flux from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import NativeAudioManagerModule from '../../../external/discord_common/js/packages/rtn-codegen/js/NativeAudioManagerModule.tsx'; /* Metro dependency 9233 */
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 ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as ConstantsModule2 from '../../../external/discord_common/js/packages/media-engine/Constants.tsx'; /* Metro dependency 4291 */
import * as NativeAudioManagerModuleModule from '../../../external/discord_common/js/packages/rtn-codegen/js/NativeAudioManagerModule.tsx'; /* Metro dependency 9233 */
function _fun72210(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#72210, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9417:6, offset: 0x01d3e611, size: 460 bytes, params: 8, frame: 20
const env0_0 = require;
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 */;
const NativeEventEmitter = (require(27) /* metro dependency 27 */).NativeEventEmitter;
const env0_8 = (require(661) /* metro dependency 661: Constants */).RTCConnectionStates;
const env0_9 = (require(4291) /* metro dependency 4291: Constants */).MediaEngineContextTypes;
let nativeEventEmitter = new NativeEventEmitter(importDefault(9233) /* metro dependency 9233: NativeAudioManagerModule */);
const NativeEventEmitter = (ReactNativeModule).NativeEventEmitter;
let nativeEventEmitter = new NativeEventEmitter(NativeAudioManagerModule);
const env0_11 = [];
const env0_12 = (require(9233) /* metro dependency 9233: NativeAudioManagerModule */).getInvalidAndroidDevice();
const env0_13 = (require(9233) /* metro dependency 9233: NativeAudioManagerModule */).getInvalidAndroidDevice();
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const env0_12 = (NativeAudioManagerModuleModule).getInvalidAndroidDevice();
const env0_13 = (NativeAudioManagerModuleModule).getInvalidAndroidDevice();
const Store = (Flux).Store;
_fun72215(Store).displayName = 'AudioManagerStore';
nativeEventEmitter = new nativeEventEmitter(importDefault(694) /* metro dependency 694: Dispatcher */,
{RTC_CONNECTION_STATE: RTC_CONNECTION_STATE_72225,
NATIVE_AUDIO_SET_OUTPUT_DEVICE: NATIVE_AUDIO_SET_OUTPUT_DEVICE});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_calls/native/AudioManagerStore.android.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_calls/native/AudioManagerStore.android.tsx');
exports.default = nativeEventEmitter;
}
function _isNativeReflectConstruct_72211() { // fn#72211, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9417:241, offset: 0x01d3e7dd, 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_72211_isNativeReflectConstruct = function() {
return !!result;
})();
}
function setActiveAudioDevice(a0) { // fn#72214, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9417:537, offset: 0x01d3e83f, size: 125 bytes, params: 2, frame: 15
if ((importDefault(22) /* metro dependency 22 */).isString(a0)) {
(importDefault(1216) /* metro dependency 1216: SentryUtilsNative */).captureMessage('AudioManagerStore received a string for an android audio device',
{extra: {deviceString: a0}});
} else {
(importDefault(9233) /* metro dependency 9233: NativeAudioManagerModule */).setActiveAudioDevice(a0);
}
}
function _fun72215(a0) { // fn#72215, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9417:744, offset: 0x01d3e8bc, size: 149 bytes, params: 2, frame: 16
const closure = AudioManagerStore;
env0_7(closure, a0);
return env0_4(closure, [{key: 'initialize', value: value_72217}, {key: 'getAudioDevices', value: value_72222},
{key: 'getActiveAudioDevice', value: value_72223}, {key: 'getRequestedActiveAudioDevice', value: value_72224}]);
}
function RTC_CONNECTION_STATE_72225(a0) { // fn#72225, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9417:1676, offset: 0x01d3ea93, size: 238 bytes, params: 2, frame: 15
const context = a0.context;
const DEFAULT = MediaEngineContextTypes.DEFAULT;
if (context !== DEFAULT) {
return false;
}
const state = a0.state;
const CONNECTING = RTCConnectionStates.CONNECTING;
if (CONNECTING === state) {
(importDefault(9233) /* metro dependency 9233: NativeAudioManagerModule */).setCommunicationModeOn(true);
if (env0_12 !== env0_13 && env0_13.simpleDeviceType !== (require(9233) /* metro dependency 9233: NativeAudioManagerModule */).AudioDeviceType.INVALID) {
setActiveAudioDevice(env0_13);
function _isNativeReflectConstruct_72211() { // fn#72211, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9417:241, offset: 0x01d3e7dd, 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) {
}
} else if (RTCConnectionStates.DISCONNECTED === state) {
if (!a0.willReconnect) {
(importDefault(9233) /* metro dependency 9233: NativeAudioManagerModule */).setCommunicationModeOn(false);
return (_isNativeReflectConstruct_72211_isNativeReflectConstruct = function() {
return !!result;
})();
}
function setActiveAudioDevice(a0) { // fn#72214, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9417:537, offset: 0x01d3e83f, size: 125 bytes, params: 2, frame: 15
if ((importDefault(22) /* metro dependency 22 */).isString(a0)) {
(importDefault(1216) /* metro dependency 1216: SentryUtilsNative */).captureMessage('AudioManagerStore received a string for an android audio device',
{extra: {deviceString: a0}});
} else {
(importDefault(9233) /* metro dependency 9233: NativeAudioManagerModule */).setActiveAudioDevice(a0);
}
}
}
function NATIVE_AUDIO_SET_OUTPUT_DEVICE({device}) { // fn#72226, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9417:2030, offset: 0x01d3eb81, size: 38 bytes, params: 2, frame: 11
if (env0_14) {
setActiveAudioDevice(device);
function _fun72215(a0) { // fn#72215, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9417:744, offset: 0x01d3e8bc, size: 149 bytes, params: 2, frame: 16
const AudioManagerStore2 = AudioManagerStore;
Inherits(AudioManagerStore2, a0);
return CreateClass(AudioManagerStore2, [{key: 'initialize', value: value_72217}, {key: 'getAudioDevices',
value: value_72222}, {key: 'getActiveAudioDevice', value: value_72223}, {key: 'getRequestedActiveAudioDevice',
value: value_72224}]);
function AudioManagerStore() { // fn#72216, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9417:756, offset: 0x010e918b, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_3(this, AudioManagerStore);
const value3 = env1_6(AudioManagerStore);
return env1_5(this, _isNativeReflectConstruct_72211() ? global.Reflect.construct(value3, arguments,
env1_6(this).constructor) : value3.apply(this, arguments));
}
function value_72217() { // fn#72217, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9417:1059, offset: 0x01d3e951, size: 124 bytes, params: 1, frame: 16
var environment;
let value = environment.__proto__;
value = importDefault(9233) /* metro dependency 9233: NativeAudioManagerModule */;
value = value.getAudioDevices();
value.then(_fun72218);
value = importDefault(9233) /* metro dependency 9233: NativeAudioManagerModule */;
value = value.getActiveAudioDevice();
value.then(_fun72220);
(importDefault(9233) /* metro dependency 9233: NativeAudioManagerModule */).setSCORetryCount(4);
function _fun72218(a0) { // fn#72218, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9417:1102, offset: 0x01d3e9cd, size: 62 bytes, params: 2, frame: 13
env2_11 = a0;
env0_0.emitChange();
env2_10.addListener('android-audio-devices-updated', _fun72219);
function _fun72219({devices}) { // fn#72219, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9417:1175, offset: 0x01d3ea0b, size: 37 bytes, params: 2, frame: 9
env1_0.emitChange();
}
}
function _fun72220(a0) { // fn#72220, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9417:1256, offset: 0x01d3ea30, size: 62 bytes, params: 2, frame: 13
env2_12 = a0;
env0_0.emitChange();
env2_10.addListener('android-active-audio-device-changed', _fun72221);
function _fun72221({device}) { // fn#72221, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9417:1335, offset: 0x01d3ea6e, size: 37 bytes, params: 2, frame: 9
env1_0.emitChange();
}
}
}
function value_72222() { // fn#72222, offset: 0x00ef8482, size: 9 bytes, params: 1, frame: 1
return env1_11;
}
function value_72223() { // fn#72223, offset: 0x00e2f9de, size: 9 bytes, params: 1, frame: 1
return env1_12;
}
function value_72224() { // fn#72224, offset: 0x00e2f9d5, size: 9 bytes, params: 1, frame: 1
return env1_13;
}
}
function RTC_CONNECTION_STATE_72225(a0) { // fn#72225, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9417:1676, offset: 0x01d3ea93, size: 238 bytes, params: 2, frame: 15
const context = a0.context;
const DEFAULT = MediaEngineContextTypes.DEFAULT;
if (context !== DEFAULT) {
return false;
}
const state = a0.state;
const CONNECTING = RTCConnectionStates.CONNECTING;
if (CONNECTING === state) {
(importDefault(9233) /* metro dependency 9233: NativeAudioManagerModule */).setCommunicationModeOn(true);
if (env0_12 !== env0_13 && env0_13.simpleDeviceType !== (require(9233) /* metro dependency 9233: NativeAudioManagerModule */).AudioDeviceType.INVALID) {
setActiveAudioDevice(env0_13);
}
} else if (RTCConnectionStates.DISCONNECTED === state) {
if (!a0.willReconnect) {
(importDefault(9233) /* metro dependency 9233: NativeAudioManagerModule */).setCommunicationModeOn(false);
}
}
}
function NATIVE_AUDIO_SET_OUTPUT_DEVICE({device}) { // fn#72226, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9417:2030, offset: 0x01d3eb81, size: 38 bytes, params: 2, frame: 11
if (env0_14) {
setActiveAudioDevice(device);
}
}
}
function value_72217() { // fn#72217, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9417:1059, offset: 0x01d3e951, size: 124 bytes, params: 1, frame: 16
var environment;
let value = environment.__proto__;
value = importDefault(9233) /* metro dependency 9233: NativeAudioManagerModule */;
value = value.getAudioDevices();
value.then(_fun72218);
value = importDefault(9233) /* metro dependency 9233: NativeAudioManagerModule */;
value = value.getActiveAudioDevice();
value.then(_fun72220);
(importDefault(9233) /* metro dependency 9233: NativeAudioManagerModule */).setSCORetryCount(4);
}
function _fun72218(a0) { // fn#72218, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9417:1102, offset: 0x01d3e9cd, size: 62 bytes, params: 2, frame: 13
env2_11 = a0;
env0_0.emitChange();
env2_10.addListener('android-audio-devices-updated', _fun72219);
}
function _fun72220(a0) { // fn#72220, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9417:1256, offset: 0x01d3ea30, size: 62 bytes, params: 2, frame: 13
env2_12 = a0;
env0_0.emitChange();
env2_10.addListener('android-active-audio-device-changed', _fun72221);
}
function _fun72219({devices}) { // fn#72219, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9417:1175, offset: 0x01d3ea0b, size: 37 bytes, params: 2, frame: 9
env1_0.emitChange();
}
function _fun72221({device}) { // fn#72221, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9417:1335, offset: 0x01d3ea6e, size: 37 bytes, params: 2, frame: 9
env1_0.emitChange();
}
global.__d(_fun72210, 9232, [6, 7, 15, 17, 18, 27, 661, 4291, 9233, 22, 1216, 566, 694,
2]) /* metro module 9232, dependencies: [6, 7, 15, 17, 18, 27, 661, 4291, 9233, 22, 1216, 566, 694, 2] */;
@@ -1,25 +1,29 @@
/* Metro module 15665; source: modules/voice_calls/native/AudioSessionModeManager.tsx; dependencies: [7, 6, 15, 17, 18, 27, 1378, 4811, 4492, 1226, 1379, 4259, 1934, 4297, 7030, 661, 477, 15666, 4860, 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 AuthenticationStore from '../../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */
import EmbeddedActivitiesStore from '../../activities/EmbeddedActivitiesStore.tsx'; /* Metro dependency 1378 */
import ChannelStore from '../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import SelectedChannelStore from '../../../stores/SelectedChannelStore.tsx'; /* Metro dependency 1934 */
import MediaEngineStore from '../../../stores/MediaEngineStore.tsx'; /* Metro dependency 4259 */
import VoiceStateStore from '../../../stores/VoiceStateStore.tsx'; /* Metro dependency 4297 */
import ApplicationStreamingStore from '../../../stores/ApplicationStreamingStore.tsx'; /* Metro dependency 4492 */
import StageChannelRoleStore from '../../stage_channels/StageChannelRoleStore.tsx'; /* Metro dependency 4811 */
import AppStateStore from '../../../stores/native/AppStateStore.tsx'; /* Metro dependency 7030 */
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 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
function _fun120105(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#120105, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15873:6, offset: 0x02520f21, size: 510 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(7) /* metro dependency 7 */;
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(15) /* metro dependency 15 */;
const env0_5 = importDefault(17) /* metro dependency 17 */;
const env0_6 = importDefault(18) /* metro dependency 18 */;
const NativeModules = (require(27) /* metro dependency 27 */).NativeModules;
const embeddedActivitiesStore = importDefault(1378) /* metro dependency 1378: EmbeddedActivitiesStore */;
const stageChannelRoleStore = importDefault(4811) /* metro dependency 4811: StageChannelRoleStore */;
const applicationStreamingStore = importDefault(4492) /* metro dependency 4492: ApplicationStreamingStore */;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const mediaEngineStore = importDefault(4259) /* metro dependency 4259: MediaEngineStore */;
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
const voiceStateStore = importDefault(4297) /* metro dependency 4297: VoiceStateStore */;
const appStateStore = importDefault(7030) /* metro dependency 7030: AppStateStore */;
const env0_16 = (require(661) /* metro dependency 661: Constants */).AppStates;
let value = require(477) /* metro dependency 477: PlatformUtils */;
const NativeModules = (ReactNativeModule).NativeModules;
let value = PlatformUtilsModule;
const AVAudioSessionMode = (value.isAndroid() ? {setAVAudioSessionMode: function() {
}, AVAudioSessionMode: {'VOICE': 'AVAudioSessionModeVoiceChat', 'VIDEO': 'AVAudioSessionModeVideoChat',
'LISTEN': 'AVAudioSessionModeSpokenAudio',
@@ -28,106 +32,118 @@ function _fun120105(global, require, importDefault, importAll, module, exports,
value = importDefault(4860) /* metro dependency 4860: AutomaticLifecycleManager */;
value = _fun120111(value);
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_calls/native/AudioSessionModeManager.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_calls/native/AudioSessionModeManager.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_120106() { // fn#120106, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15873:288, offset: 0x0252111f, 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) {
function _isNativeReflectConstruct_120106() { // fn#120106, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15873:288, offset: 0x0252111f, 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_120106_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_120106_isNativeReflectConstruct = function() {
return !!result;
})();
}
function handleAVAudioSessionMode() { // fn#120109, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15873:750, offset: 0x02521181, size: 310 bytes, params: 1, frame: 16
var r3;
var r2;
var moduleValue;
var shouldImmediatelyRequestVoicePermissions2;
var AVAudioSessionMode;
const getChannel = ChannelStore.getChannel;
const getVoiceChannelId = SelectedChannelStore.getVoiceChannelId;
const value2 = Reflect.apply(getChannel, ChannelStore, [Reflect.apply(getVoiceChannelId, SelectedChannelStore, [])]);
if (value2 == null) {
r2 = env0_17.AVAudioSessionMode.DEFAULT;
} else {
r3 = ApplicationStreamingStore.getAllActiveStreams().length > 0 || VoiceStateStore.hasVideo(value2.id);
r3 = !r3 ? MediaEngineStore.isVideoEnabled() : r3;
if (r3) {
r2 = env0_17.AVAudioSessionMode.VIDEO;
} else if (EmbeddedActivitiesStore.getCurrentEmbeddedActivity() != null) {
r2 = env0_17.AVAudioSessionMode.VIDEO;
function handleAVAudioSessionMode() { // fn#120109, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15873:750, offset: 0x02521181, size: 310 bytes, params: 1, frame: 16
var r3;
var r2;
var applicationStreamingStoreBinding;
var embeddedActivitiesStoreBinding;
var moduleValue;
var shouldImmediatelyRequestVoicePermissions2;
var AVAudioSessionMode;
const channelStoreBinding = ChannelStore;
const getChannel = channelStoreBinding.getChannel;
const selectedChannelStoreBinding = SelectedChannelStore;
const getVoiceChannelId = selectedChannelStoreBinding.getVoiceChannelId;
const value2 = Reflect.apply(getChannel, channelStoreBinding, [Reflect.apply(getVoiceChannelId,
selectedChannelStoreBinding, [])]);
if (value2 == null) {
r2 = env0_17.AVAudioSessionMode.DEFAULT;
} else {
moduleValue = require(15666) /* metro dependency 15666: VoicePermissionManager */;
shouldImmediatelyRequestVoicePermissions2 = moduleValue.shouldImmediatelyRequestVoicePermissions(AuthenticationStore.getId(),
value2.id);
AVAudioSessionMode = env0_17.AVAudioSessionMode;
r2 = shouldImmediatelyRequestVoicePermissions2 ? AVAudioSessionMode.VOICE : AVAudioSessionMode.LISTEN;
applicationStreamingStoreBinding = ApplicationStreamingStore;
r3 = applicationStreamingStoreBinding.getAllActiveStreams().length > 0 || VoiceStateStore.hasVideo(value2.id);
r3 = !r3 ? MediaEngineStore.isVideoEnabled() : r3;
embeddedActivitiesStoreBinding = EmbeddedActivitiesStore;
if (r3) {
r2 = env0_17.AVAudioSessionMode.VIDEO;
} else if (embeddedActivitiesStoreBinding.getCurrentEmbeddedActivity() != null) {
r2 = env0_17.AVAudioSessionMode.VIDEO;
} else {
moduleValue = require(15666) /* metro dependency 15666: VoicePermissionManager */;
shouldImmediatelyRequestVoicePermissions2 = moduleValue.shouldImmediatelyRequestVoicePermissions(AuthenticationStore.getId(),
value2.id);
AVAudioSessionMode = env0_17.AVAudioSessionMode;
r2 = shouldImmediatelyRequestVoicePermissions2 ? AVAudioSessionMode.VOICE : AVAudioSessionMode.LISTEN;
}
}
if (VOICE !== r2 && AppStateStore.getState() === AppStates.ACTIVE) {
env0_17.setAVAudioSessionMode(r2);
}
}
if (VOICE !== r2 && AppStateStore.getState() === AppStates.ACTIVE) {
env0_17.setAVAudioSessionMode(r2);
function _fun120111(a0) { // fn#120111, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15873:1293, offset: 0x025212b7, size: 42 bytes, params: 2, frame: 14
const AudioSessionModeManager2 = AudioSessionModeManager;
Inherits(AudioSessionModeManager2, a0);
return CreateClass(AudioSessionModeManager2);
function AudioSessionModeManager(a0) { // fn#120112, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15873:1305, offset: 0x025212e1, size: 239 bytes, params: 2, frame: 20
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_3;
binding(this, AudioSessionModeManager);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_5(AudioSessionModeManager);
binding = env1_4;
if (_isNativeReflectConstruct_120106()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_5(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
const Map = global.Map;
const map = new Map();
const set = map.set;
const applicationStreamingStoreBinding = ApplicationStreamingStore;
const handleAVAudioSessionModeBinding = handleAVAudioSessionMode;
const value6 = Reflect.apply(set, map, [applicationStreamingStoreBinding, handleAVAudioSessionModeBinding]);
const value7 = value6.set(VoiceStateStore, handleAVAudioSessionModeBinding);
const value8 = value7.set(MediaEngineStore, handleAVAudioSessionModeBinding);
const value9 = value8.set(StageChannelRoleStore, handleAVAudioSessionModeBinding);
value.stores = value9.set(EmbeddedActivitiesStore, handleAVAudioSessionModeBinding);
return value;
}
}
}
function _fun120111(a0) { // fn#120111, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15873:1293, offset: 0x025212b7, size: 42 bytes, params: 2, frame: 14
const closure = AudioSessionModeManager;
env0_6(closure, a0);
return env0_2(closure);
}
function AudioSessionModeManager(a0) { // fn#120112, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15873:1305, offset: 0x025212e1, size: 239 bytes, params: 2, frame: 20
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_3;
binding(this, AudioSessionModeManager);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_5(AudioSessionModeManager);
binding = env1_4;
if (_isNativeReflectConstruct_120106()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_5(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
const Map = global.Map;
const map = new Map();
const set = map.set;
const handleAVAudioSessionModeBinding = handleAVAudioSessionMode;
value.stores = Reflect.apply(set, map, [ApplicationStreamingStore,
handleAVAudioSessionModeBinding]).set(VoiceStateStore, handleAVAudioSessionModeBinding).set(MediaEngineStore,
handleAVAudioSessionModeBinding).set(StageChannelRoleStore,
handleAVAudioSessionModeBinding).set(EmbeddedActivitiesStore, handleAVAudioSessionModeBinding);
return value;
}
global.__d(_fun120105, 15665, [7, 6, 15, 17, 18, 27, 1378, 4811, 4492, 1226, 1379, 4259, 1934, 4297, 7030, 661, 477,
15666, 4860,
2]) /* metro module 15665, dependencies: [7, 6, 15, 17, 18, 27, 1378, 4811, 4492, 1226, 1379, 4259, 1934, 4297, 7030, 661, 477, 15666, 4860, 2] */;
@@ -1,79 +1,88 @@
/* Metro module 12115; source: modules/voice_calls/native/CallStateHooks.tsx; dependencies: [4606, 1226, 4258, 4294, 661, 4299, 566, 9325, 2] */
import AuthenticationStore from '../../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */
import CallStore from '../../../stores/CallStore.tsx'; /* Metro dependency 4258 */
import RTCConnectionStore from '../../../stores/RTCConnectionStore.tsx'; /* Metro dependency 4294 */
import ChannelRTCStore from '../../calls/ChannelRTCStore.tsx'; /* Metro dependency 4606 */
import UseVoiceStateForRemoteSession from '../../game_console/hooks/useVoiceStateForRemoteSession.tsx'; /* Metro dependency 9325 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as CallConstantsModule from '../../calls/CallConstants.tsx'; /* Metro dependency 4299 */
function _fun93007(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#93007, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12301:6, offset: 0x020a2a7e, size: 318 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const channelRTCStore = importDefault(4606) /* metro dependency 4606: ChannelRTCStore */;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const callStore = importDefault(4258) /* metro dependency 4258: CallStore */;
const rtcConnectionStore = importDefault(4294) /* metro dependency 4294: RTCConnectionStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_7 = constantsModule.EMPTY_STRING_SNOWFLAKE_ID;
const env0_8 = constantsModule.RTCConnectionStates;
const env0_9 = (require(4299) /* metro dependency 4299: CallConstants */).ParticipantTypes;
copyDataProperties({}, {initialized: false, callId: undefined}, undefined);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_calls/native/CallStateHooks.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_calls/native/CallStateHooks.tsx');
exports.default = _default_93008;
exports.CallStates = {DISCONNECTED: 'disconneted', DISCONNECTING: 'disconnecting', CONNECTING: 'connecting',
RINGING: 'ringing', CONNECTED: 'connected'};
}
function _default_93008() { // fn#93008, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12301:433, offset: 0x020a2bbc, size: 452 bytes, params: 1, frame: 28
const value = a0;
const value2 = a1;
const value3 = a2;
const r10 = value !== undefined ? value : EMPTY_STRING_SNOWFLAKE_ID;
const r6 = value2 !== undefined ? value2 : false;
const r7 = value3 !== undefined ? value3 : false;
const value5 = (FluxModule).useStateFromStoresArray([CallStore], _fun93009, [r10,
AuthenticationStore.getId()]);
const value7 = ChannelRTCStore.getParticipants(r10).filter(_fun93011);
const value8 = (UseVoiceStateForRemoteSession)();
const useStateFromStores = FluxModule.useStateFromStores;
const rtcConnectionStoreBinding = RTCConnectionStore;
const getRTCConnectionId = rtcConnectionStoreBinding.getRTCConnectionId;
const value10 = FluxModule.useStateFromStores([rtcConnectionStoreBinding], _fun93012,
[Reflect.apply(useStateFromStores, FluxModule, [[rtcConnectionStoreBinding], getRTCConnectionId, []]), value8,
r10]);
const binding = env0_10;
let initialized = binding.initialized;
binding.initialized = initialized || r7;
const CONNECTING = env0_11.CONNECTING;
initialized = env0_10.initialized;
return {state: r6 ? env0_11.DISCONNECTING : initialized && value10 === RTCConnectionStates.DISCONNECTED ? env0_11.DISCONNECTED : value5.length > 0 && value7.length === value5.length ? env0_11.RINGING : value10 !== RTCConnectionStates.RTC_CONNECTED ? CONNECTING : env0_11.CONNECTED,
initialized: initialized};
function _fun93009() { // fn#93009, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12301:506, offset: 0x020a2d80, size: 94 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__;
const call = CallStore.getCall(env0_0);
const r0 = call != null ? call.ringing.filter(_fun93010) : [];
const binding = env1_10;
binding.initialized = binding.initialized || r0.length > 0;
return r0;
function _fun93010(a0) { // fn#93010, offset: 0x020a2dde, size: 16 bytes, params: 2, frame: 2
return a0 !== env1_1;
}
function _default_93008() { // fn#93008, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12301:433, offset: 0x020a2bbc, size: 452 bytes, params: 1, frame: 28
const value = a0;
const value2 = a1;
const value3 = a2;
const r10 = value !== undefined ? value : EMPTY_STRING_SNOWFLAKE_ID;
const r6 = value2 !== undefined ? value2 : false;
const r7 = value3 !== undefined ? value3 : false;
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([CallStore], _fun93009, [r10,
AuthenticationStore.getId()]);
const value7 = ChannelRTCStore.getParticipants(r10).filter(_fun93011);
const value8 = (importDefault(9325) /* metro dependency 9325: useVoiceStateForRemoteSession */)();
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStores = fluxModule.useStateFromStores;
const getRTCConnectionId = RTCConnectionStore.getRTCConnectionId;
const value10 = fluxModule.useStateFromStores([RTCConnectionStore], _fun93012, [Reflect.apply(useStateFromStores,
fluxModule, [[RTCConnectionStore], getRTCConnectionId, []]), value8, r10]);
const binding = env0_10;
let initialized = binding.initialized;
binding.initialized = initialized || r7;
const CONNECTING = env0_11.CONNECTING;
initialized = env0_10.initialized;
return {state: r6 ? env0_11.DISCONNECTING : initialized && value10 === RTCConnectionStates.DISCONNECTED ? env0_11.DISCONNECTED : value5.length > 0 && value7.length === value5.length ? env0_11.RINGING : value10 !== RTCConnectionStates.RTC_CONNECTED ? CONNECTING : env0_11.CONNECTED,
initialized: initialized};
}
}
function _fun93009() { // fn#93009, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12301:506, offset: 0x020a2d80, size: 94 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__;
const call = CallStore.getCall(env0_0);
const r0 = call != null ? call.ringing.filter(_fun93010) : [];
const binding = env1_10;
binding.initialized = binding.initialized || r0.length > 0;
return r0;
}
function _fun93011(a0) { // fn#93011, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12301:661, offset: 0x020a2dee, size: 51 bytes, params: 2, frame: 3
const type = a0.type;
const value = environment.__proto__;
const ACTIVITY = ParticipantTypes.ACTIVITY;
return type !== ACTIVITY && a0.user.id !== env0_1;
}
function _fun93011(a0) { // fn#93011, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12301:661, offset: 0x020a2dee, size: 51 bytes, params: 2, frame: 3
const type = a0.type;
const value = environment.__proto__;
const ACTIVITY = ParticipantTypes.ACTIVITY;
return type !== ACTIVITY && a0.user.id !== env0_1;
}
function _fun93012() { // fn#93012, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12301:805, offset: 0x020a2e21, size: 191 bytes, params: 1, frame: 13
var value;
if (env0_2?.channelId === env0_0) {
value = environment.__proto__;
env1_10.initialized = true;
return RTCConnectionStates.RTC_CONNECTED;
}
if (!(env0_3 != null && env1_10.callId === env0_3)) {
env1_10.initialized = false;
}
const binding = env1_10;
binding.callId = env0_3;
value = RTCConnectionStore.getState();
binding.initialized = binding.initialized || value !== RTCConnectionStates.DISCONNECTED && value !== RTCConnectionStates.RTC_DISCONNECTED;
return value;
}
function _fun93012() { // fn#93012, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12301:805, offset: 0x020a2e21, size: 191 bytes, params: 1, frame: 13
var value;
if (env0_2?.channelId === env0_0) {
value = environment.__proto__;
env1_10.initialized = true;
return RTCConnectionStates.RTC_CONNECTED;
}
if (!(env0_3 != null && env1_10.callId === env0_3)) {
env1_10.initialized = false;
}
const binding = env1_10;
binding.callId = env0_3;
value = RTCConnectionStore.getState();
binding.initialized = binding.initialized || value !== RTCConnectionStates.DISCONNECTED && value !== RTCConnectionStates.RTC_DISCONNECTED;
return value;
}
global.__d(_fun93007, 12115, [4606, 1226, 4258, 4294, 661, 4299, 566, 9325,
2]) /* metro module 12115, dependencies: [4606, 1226, 4258, 4294, 661, 4299, 566, 9325, 2] */;
+403 -381
View File
@@ -1,21 +1,34 @@
/* Metro module 9228; source: modules/voice_calls/native/CallsUtils.tsx; dependencies: [57, 5, 31, 27, 4492, 1379, 4259, 1934, 4297, 9229, 9232, 4661, 9234, 4496, 1244, 4662, 8899, 9235, 1848, 7709, 4796, 22, 9236, 9237, 9238, 477, 566, 9239, 9233, 9438, 9230, 2] */
import Module00005 from '../../../by-id/module-00005.js'; /* Metro dependency 5 */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import ChannelStore from '../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import SelectedChannelStore from '../../../stores/SelectedChannelStore.tsx'; /* Metro dependency 1934 */
import MediaEngineStore from '../../../stores/MediaEngineStore.tsx'; /* Metro dependency 4259 */
import VoiceStateStore from '../../../stores/VoiceStateStore.tsx'; /* Metro dependency 4297 */
import ApplicationStreamingStore from '../../../stores/ApplicationStreamingStore.tsx'; /* Metro dependency 4492 */
import AlertActionCreators from '../../../actions/native/AlertActionCreators.tsx'; /* Metro dependency 4496 */
import NativePermissionUtils from '../../native_permissions/NativePermissionUtils.tsx'; /* Metro dependency 4662 */
import SelectedChannelActionCreators from '../../../actions/SelectedChannelActionCreators.tsx'; /* Metro dependency 4796 */
import AudioActionCreators from '../../../actions/AudioActionCreators.tsx'; /* Metro dependency 8899 */
import AudioRouteStoreNative from '../AudioRouteStore.native.tsx'; /* Metro dependency 9229 */
import AudioManagerStoreAndroid from './AudioManagerStore.android.tsx'; /* Metro dependency 9232 */
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 PlatformUtilsModule from '../../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
import * as FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as KeyboardManagerUtilsModule from '../../../utils/native/KeyboardManagerUtils.tsx'; /* Metro dependency 1848 */
import * as NativePermissionConstantsModule from '../../native_permissions/NativePermissionConstants.tsx'; /* Metro dependency 4661 */
import * as PrivateChannelCallUtilsModule from '../../../utils/native/PrivateChannelCallUtils.tsx'; /* Metro dependency 7709 */
import * as VoiceCallTypesModule from '../VoiceCallTypes.tsx'; /* Metro dependency 9230 */
import * as AVErrorModule from '../../errors/av_errors/AVError.tsx'; /* Metro dependency 9235 */
import * as UseIsVideoModeModule from '../../video_calls/native/useIsVideoMode.tsx'; /* Metro dependency 9438 */
function _fun72162(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#72162, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9413:6, offset: 0x01d3ccd1, size: 1305 bytes, params: 8, frame: 35
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = importDefault(57) /* metro dependency 57 */;
const env0_5 = importDefault(5) /* metro dependency 5 */;
const env0_6 = importAll(31) /* metro dependency 31 */;
const env0_7 = (require(27) /* metro dependency 27 */).NativeModules;
const applicationStreamingStore = importDefault(4492) /* metro dependency 4492: ApplicationStreamingStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const mediaEngineStore = importDefault(4259) /* metro dependency 4259: MediaEngineStore */;
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
const voiceStateStore = importDefault(4297) /* metro dependency 4297: VoiceStateStore */;
const audioRouteStoreNative = importDefault(9229) /* metro dependency 9229: AudioRouteStoreNative */;
const audioManagerStoreAndroid = importDefault(9232) /* metro dependency 9232: AudioManagerStoreAndroid */;
const env0_15 = (require(4661) /* metro dependency 4661: NativePermissionConstants */).NativePermissionTypes;
const value = _fun72163();
const env0_16 = (importDefault(22) /* metro dependency 22 */).debounce(function(a0) {
var AudioRoutePicker = NativeModules.AudioRoutePicker;
@@ -26,80 +39,79 @@ function _fun72162(global, require, importDefault, importAll, module, exports, d
const env0_17 = (importDefault(22) /* metro dependency 22 */).debounce(function(a0) {
a0();
}, 1);
object3 = {EARPIECE: importDefault(9236) /* metro dependency 9236 */,
object = {EARPIECE: importDefault(9236) /* metro dependency 9236 */,
BLUETOOTH_HEADSET: importDefault(9237) /* metro dependency 9237 */,
WIRED_HEADSET: importDefault(9238) /* metro dependency 9238 */,
SPEAKERPHONE: importDefault(9238) /* metro dependency 9238 */,
INVALID: importDefault(9238) /* metro dependency 9238 */};
const object4 = {TYPE_UNKNOWN: 0};
object4[0] = 'TYPE_UNKNOWN';
object4.TYPE_BUILTIN_EARPIECE = 1;
object4[1] = 'TYPE_BUILTIN_EARPIECE';
object4.TYPE_BUILTIN_SPEAKER = 2;
object4[2] = 'TYPE_BUILTIN_SPEAKER';
object4.TYPE_WIRED_HEADSET = 3;
object4[3] = 'TYPE_WIRED_HEADSET';
object4.TYPE_WIRED_HEADPHONES = 4;
object4[4] = 'TYPE_WIRED_HEADPHONES';
object4.TYPE_LINE_ANALOG = 5;
object4[5] = 'TYPE_LINE_ANALOG';
object4.TYPE_LINE_DIGITAL = 6;
object4[6] = 'TYPE_LINE_DIGITAL';
object4.TYPE_BLUETOOTH_SCO = 7;
object4[7] = 'TYPE_BLUETOOTH_SCO';
object4.TYPE_BLUETOOTH_A2DP = 8;
object4[8] = 'TYPE_BLUETOOTH_A2DP';
object4.TYPE_HDMI = 9;
object4[9] = 'TYPE_HDMI';
object4.TYPE_HDMI_ARC = 10;
object4[10] = 'TYPE_HDMI_ARC';
object4.TYPE_USB_DEVICE = 11;
object4[11] = 'TYPE_USB_DEVICE';
object4.TYPE_USB_ACCESSORY = 12;
object4[12] = 'TYPE_USB_ACCESSORY';
object4.TYPE_DOCK = 13;
object4[13] = 'TYPE_DOCK';
object4.TYPE_FM = 14;
object4[14] = 'TYPE_FM';
object4.TYPE_BUILTIN_MIC = 15;
object4[15] = 'TYPE_BUILTIN_MIC';
object4.TYPE_FM_TUNER = 16;
object4[16] = 'TYPE_FM_TUNER';
object4.TYPE_TV_TUNER = 17;
object4[17] = 'TYPE_TV_TUNER';
object4.TYPE_TELEPHONY = 18;
object4[18] = 'TYPE_TELEPHONY';
object4.TYPE_AUX_LINE = 19;
object4[19] = 'TYPE_AUX_LINE';
object4.TYPE_IP = 20;
object4[20] = 'TYPE_IP';
object4.TYPE_BUS = 21;
object4[21] = 'TYPE_BUS';
object4.TYPE_USB_HEADSET = 22;
object4[22] = 'TYPE_USB_HEADSET';
object4.TYPE_HEARING_AID = 23;
object4[23] = 'TYPE_HEARING_AID';
object4.TYPE_BUILTIN_SPEAKER_SAFE = 24;
object4[24] = 'TYPE_BUILTIN_SPEAKER_SAFE';
object4.TYPE_REMOTE_SUBMIX = 25;
object4[25] = 'TYPE_REMOTE_SUBMIX';
object4.TYPE_BLE_HEADSET = 26;
object4[26] = 'TYPE_BLE_HEADSET';
object4.TYPE_BLE_SPEAKER = 27;
object4[27] = 'TYPE_BLE_SPEAKER';
object4.TYPE_ECHO_REFERENCE = 28;
object4[28] = 'TYPE_ECHO_REFERENCE';
object4.TYPE_HDMI_EARC = 29;
object4[29] = 'TYPE_HDMI_EARC';
object4.TYPE_BLE_BROADCAST = 30;
object4[30] = 'TYPE_BLE_BROADCAST';
object4.TYPE_DOCK_ANALOG = 31;
object4[31] = 'TYPE_DOCK_ANALOG';
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
const r3 = platformUtilsModule.isAndroid() ? function() {
const object2 = {TYPE_UNKNOWN: 0};
object2[0] = 'TYPE_UNKNOWN';
object2.TYPE_BUILTIN_EARPIECE = 1;
object2[1] = 'TYPE_BUILTIN_EARPIECE';
object2.TYPE_BUILTIN_SPEAKER = 2;
object2[2] = 'TYPE_BUILTIN_SPEAKER';
object2.TYPE_WIRED_HEADSET = 3;
object2[3] = 'TYPE_WIRED_HEADSET';
object2.TYPE_WIRED_HEADPHONES = 4;
object2[4] = 'TYPE_WIRED_HEADPHONES';
object2.TYPE_LINE_ANALOG = 5;
object2[5] = 'TYPE_LINE_ANALOG';
object2.TYPE_LINE_DIGITAL = 6;
object2[6] = 'TYPE_LINE_DIGITAL';
object2.TYPE_BLUETOOTH_SCO = 7;
object2[7] = 'TYPE_BLUETOOTH_SCO';
object2.TYPE_BLUETOOTH_A2DP = 8;
object2[8] = 'TYPE_BLUETOOTH_A2DP';
object2.TYPE_HDMI = 9;
object2[9] = 'TYPE_HDMI';
object2.TYPE_HDMI_ARC = 10;
object2[10] = 'TYPE_HDMI_ARC';
object2.TYPE_USB_DEVICE = 11;
object2[11] = 'TYPE_USB_DEVICE';
object2.TYPE_USB_ACCESSORY = 12;
object2[12] = 'TYPE_USB_ACCESSORY';
object2.TYPE_DOCK = 13;
object2[13] = 'TYPE_DOCK';
object2.TYPE_FM = 14;
object2[14] = 'TYPE_FM';
object2.TYPE_BUILTIN_MIC = 15;
object2[15] = 'TYPE_BUILTIN_MIC';
object2.TYPE_FM_TUNER = 16;
object2[16] = 'TYPE_FM_TUNER';
object2.TYPE_TV_TUNER = 17;
object2[17] = 'TYPE_TV_TUNER';
object2.TYPE_TELEPHONY = 18;
object2[18] = 'TYPE_TELEPHONY';
object2.TYPE_AUX_LINE = 19;
object2[19] = 'TYPE_AUX_LINE';
object2.TYPE_IP = 20;
object2[20] = 'TYPE_IP';
object2.TYPE_BUS = 21;
object2[21] = 'TYPE_BUS';
object2.TYPE_USB_HEADSET = 22;
object2[22] = 'TYPE_USB_HEADSET';
object2.TYPE_HEARING_AID = 23;
object2[23] = 'TYPE_HEARING_AID';
object2.TYPE_BUILTIN_SPEAKER_SAFE = 24;
object2[24] = 'TYPE_BUILTIN_SPEAKER_SAFE';
object2.TYPE_REMOTE_SUBMIX = 25;
object2[25] = 'TYPE_REMOTE_SUBMIX';
object2.TYPE_BLE_HEADSET = 26;
object2[26] = 'TYPE_BLE_HEADSET';
object2.TYPE_BLE_SPEAKER = 27;
object2[27] = 'TYPE_BLE_SPEAKER';
object2.TYPE_ECHO_REFERENCE = 28;
object2[28] = 'TYPE_ECHO_REFERENCE';
object2.TYPE_HDMI_EARC = 29;
object2[29] = 'TYPE_HDMI_EARC';
object2.TYPE_BLE_BROADCAST = 30;
object2[30] = 'TYPE_BLE_BROADCAST';
object2.TYPE_DOCK_ANALOG = 31;
object2[31] = 'TYPE_DOCK_ANALOG';
const r3 = PlatformUtilsModule.isAndroid() ? function() {
return require(dependencyMap[26]).useStateFromStoresObject([AudioManagerStoreAndroid], _fun72170, []);
} : _fun72171;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_calls/native/CallsUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_calls/native/CallsUtils.tsx');
exports.handleToggleVideo = value;
exports.handleToggleSelfDeaf = handleToggleSelfDeaf;
exports.handleToggleSelfMute = handleToggleSelfMute;
@@ -111,317 +123,327 @@ function _fun72162(global, require, importDefault, importAll, module, exports, d
exports.showMinOSScreenshareRequirementAlert = showMinOSScreenshareRequirementAlert;
exports.showTabletRequirementAlert = showTabletRequirementAlert;
exports.handleDisconnect = handleDisconnect;
exports.audioDeviceToIconMap = object3;
exports.audioDeviceToIconMap = object;
exports.getAudioDeviceToDisplayText = getAudioDeviceToDisplayText;
exports.useMaskedSpeakerStates = r3;
exports.useImmediateMaskedSpeakerStates = useImmediateMaskedSpeakerStates;
}
function _fun72163() { // fn#72163, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9413:256, offset: 0x01d3d1ea, size: 36 bytes, params: 1, frame: 12
const env0_0 = env0_5(_fun72165);
return _fun72166;
}
function _fun72169() { // fn#72169, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9413:2342, offset: 0x01d3d3dd, size: 65 bytes, params: 1, frame: 15
return (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([AudioManagerStoreAndroid],
_fun72170, []);
}
function _fun72171() { // fn#72171, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9413:2599, offset: 0x01d3d49d, size: 283 bytes, params: 1, frame: 20
const {isEnabled, isVideoMode,
isBluetoothRoute} = require(dependencyMap[26]).useStateFromStoresObject([ChannelStore, SelectedChannelStore,
ApplicationStreamingStore, VoiceStateStore, MediaEngineStore, AudioRouteStoreNative], _fun72172);
const binding = env0_6;
const [property, env0_3] = env0_4(binding.useState(isEnabled), 2);
const value5 = binding.useCallback(_fun72173, [property, isVideoMode]);
binding.useEffect(_fun72174, [isEnabled, isVideoMode]);
return {isAudioRouteEnabled: property, toggleAudio: value5,
routeSource: importDefault(isBluetoothRoute ? dependencyMap[23] : dependencyMap[24])};
}
function handleToggleSelfDeaf() { // fn#72176, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9413:3324, offset: 0x01d3d707, size: 37 bytes, params: 1, frame: 11
(importDefault(8899) /* metro dependency 8899: AudioActionCreators */).toggleSelfDeaf();
}
function handleToggleSelfMute() { // fn#72177, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9413:3379, offset: 0x01d3d72c, size: 80 bytes, params: 1, frame: 17
const defaultImport = importDefault(4662) /* metro dependency 4662: NativePermissionUtils */;
const requestPermission = defaultImport.requestPermission;
const AUDIO = NativePermissionTypes.AUDIO;
Reflect.apply(requestPermission, defaultImport, [AUDIO, {showAuthorizationError: true}]);
(importDefault(8899) /* metro dependency 8899: AudioActionCreators */).toggleSelfMute();
}
function showSuppressedAlert() { // fn#72178, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9413:3497, offset: 0x01d3d77c, size: 150 bytes, params: 1, frame: 18
const defaultImport = importDefault(4496) /* metro dependency 4496: AlertActionCreators */;
const show = defaultImport.show;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const FJSZVM = t.FJSZVM;
Reflect.apply(show, defaultImport, [{title: Reflect.apply(string, intl, [FJSZVM]), body: intl.string(t.etJjgW),
hideActionSheet: false}]);
}
function showServerMuteAlert() { // fn#72179, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9413:3652, offset: 0x01d3d812, size: 154 bytes, params: 1, frame: 18
const defaultImport = importDefault(4496) /* metro dependency 4496: AlertActionCreators */;
const show = defaultImport.show;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
Reflect.apply(show, defaultImport, [{title: Reflect.apply(string, intl, [t['+JQCa/']]), body: intl.string(t.hsNm7d),
hideActionSheet: false}]);
}
function showServerDeafenAlert() { // fn#72180, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9413:3812, offset: 0x01d3d8ac, size: 154 bytes, params: 1, frame: 18
const defaultImport = importDefault(4496) /* metro dependency 4496: AlertActionCreators */;
const show = defaultImport.show;
const object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const QZ7WSS = t.QZ7WSS;
object2.title = Reflect.apply(string, intl, [QZ7WSS]);
string = intl.string;
const Tl9JpL = t.Tl9JpL;
object2.body = Reflect.apply(string, intl, [Tl9JpL]);
object2.hideActionSheet = false;
Reflect.apply(show, defaultImport, [object2]);
}
function showCameraDisabledAlert() { // fn#72181, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9413:3971, offset: 0x01d3d946, size: 150 bytes, params: 1, frame: 18
const defaultImport = importDefault(4496) /* metro dependency 4496: AlertActionCreators */;
const show = defaultImport.show;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const OYzPcW = t.OYzPcW;
Reflect.apply(show, defaultImport, [{title: Reflect.apply(string, intl, [OYzPcW]), body: intl.string(t.oBH7Y2),
hideActionSheet: false}]);
}
function showScreenshareDisabledAlert() { // fn#72182, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9413:4135, offset: 0x01d3d9dc, size: 154 bytes, params: 1, frame: 18
const defaultImport = importDefault(4496) /* metro dependency 4496: AlertActionCreators */;
const show = defaultImport.show;
const object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
object2.title = Reflect.apply(string, intl, [t['/x4knx']]);
string = intl.string;
const PpfzUE = t.PpfzUE;
object2.body = Reflect.apply(string, intl, [PpfzUE]);
object2.hideActionSheet = false;
Reflect.apply(show, defaultImport, [object2]);
}
function showMinOSScreenshareRequirementAlert() { // fn#72183, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9413:4310, offset: 0x01d3da76, size: 305 bytes, params: 1, frame: 22
var object2;
const value2 = undefined;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const formatToPlainString = intl.formatToPlainString;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const ejOT95 = t.ejOT95;
const avErrorModule = require(9235) /* metro dependency 9235: AVError */;
const getErrorInfo = avErrorModule.getErrorInfo;
const AVError = avErrorModule.AVError;
const SCREENSHARE_OS_NOT_SUPPORTED = AVError.SCREENSHARE_OS_NOT_SUPPORTED;
const value3 = Reflect.apply(getErrorInfo, avErrorModule, [SCREENSHARE_OS_NOT_SUPPORTED]);
const value4 = Reflect.apply(formatToPlainString, intl, [ejOT95,
{errorCode: value3 == null ? value2 : value3.errorCode}]);
const defaultImport = importDefault(4496) /* metro dependency 4496: AlertActionCreators */;
const show = defaultImport.show;
object2 = {};
let string = intl.string;
object2.title = Reflect.apply(string, intl, [t.oblMYa]);
string = intl.string;
const Wnhd3q = t.Wnhd3q;
object2.body = '' + Reflect.apply(string, intl, [Wnhd3q]) + '\n\n' + value4;
object2.hideActionSheet = false;
Reflect.apply(show, defaultImport, [object2]);
return value2;
}
function showTabletRequirementAlert() { // fn#72184, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9413:4656, offset: 0x01d3dba7, size: 154 bytes, params: 1, frame: 18
const defaultImport = importDefault(4496) /* metro dependency 4496: AlertActionCreators */;
const show = defaultImport.show;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
Reflect.apply(show, defaultImport, [{title: Reflect.apply(string, intl, [t['1N0dxa']]), body: intl.string(t.qqDFVb),
hideActionSheet: false}]);
}
function handleDisconnect(a0) { // fn#72185, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9413:4811, offset: 0x01d3dc41, size: 77 bytes, params: 2, frame: 14
(importAll(1848) /* metro dependency 1848: KeyboardManagerUtils */).dismissGlobalKeyboard();
(require(7709) /* metro dependency 7709: PrivateChannelCallUtils */).dismissVoiceChannelScreens(a0, _fun72186);
}
function getAudioDeviceToDisplayText(a0) { // fn#72187, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9413:4985, offset: 0x01d3dcb6, size: 364 bytes, params: 2, frame: 18
const object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const Ouoi6E = t.Ouoi6E;
object2.EARPIECE = Reflect.apply(string, intl, [Ouoi6E]);
object2.BLUETOOTH_HEADSET = intl.string(t.i6eV3z);
string = intl.string;
const Dluojr = t.Dluojr;
object2.WIRED_HEADSET = Reflect.apply(string, intl, [Dluojr]);
object2.SPEAKERPHONE = intl.string(t.snEhlu);
object2.INVALID = intl.string(t.kCBL6t);
const deviceType = a0.deviceType;
const TYPE_BLE_HEADSET = env0_19.TYPE_BLE_HEADSET;
return deviceType === TYPE_BLE_HEADSET ? intl.string(t.BtXSp9) : object2[a0.simpleDeviceType];
}
function useImmediateMaskedSpeakerStates() { // fn#72188, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9413:5460, offset: 0x01d3de22, size: 309 bytes, params: 1, frame: 20
const currentRouteType = require(dependencyMap[26]).useStateFromStores([AudioRouteStoreNative], function() {
return AudioRouteStoreNative.getCurrentRouteType();
});
const value2 = importDefault(dependencyMap[29])();
const RouteTypes = require(dependencyMap[30]).RouteTypes;
const SPEAKER = RouteTypes.SPEAKER;
const value3 = currentRouteType === SPEAKER;
const BLUETOOTH = RouteTypes.BLUETOOTH;
const value4 = currentRouteType === BLUETOOTH;
let r10 = value3 || value4;
r10 = !r10 ? value2 : r10;
const binding = env0_6;
const [property, env0_3] = env0_4(binding.useState(r10), 2);
const value7 = binding.useCallback(_fun72190, [property, value2]);
binding.useEffect(_fun72191, [r10, value2]);
return {isAudioRouteEnabled: property, toggleAudio: value7,
routeSource: importDefault(value4 ? dependencyMap[23] : dependencyMap[24])};
}
async function _fun72165(a0) { // fn#72165, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9413:276, offset: 0x01d3d222, size: 404 bytes, params: 2, frame: 22
var binding3;
var value10;
var show;
var object3;
var intl;
var string;
var t;
var formatToPlainString;
var x9mtl4;
var object4;
let value = a1;
if (true) {
var r3 = !(value !== undefined) || value;
await undefined;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
var binding = env2_10;
var isVideoEnabled2 = binding.isVideoEnabled();
var channelVideoLimit = env2_0(env2_3[12]).getChannelVideoLimit(a0);
if (channelVideoLimit.reachedLimit) {
if (r3) {
binding = env2_1;
binding3 = env2_3;
value10 = binding(binding3[13]);
show = value10.show;
object3 = {};
binding = env2_0;
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
object3.title = Reflect.apply(string, intl, [t['3ffmE+']]);
intl = binding(binding3[14]).intl;
formatToPlainString = intl.formatToPlainString;
t = binding(binding3[14]).t;
x9mtl4 = t.x9mtl4;
object4 = {};
object4.limit = channelVideoLimit.limit.toString();
object3.body = Reflect.apply(formatToPlainString, intl, [x9mtl4, object4]);
Reflect.apply(show, value10, [object3]);
}
} else {
binding = env2_1;
var binding2 = env2_3;
if (isVideoEnabled2) {
binding(binding2[16]).setVideoEnabled(false);
return undefined;
}
var value7 = binding(binding2[15]);
var requestPermission = value7.requestPermission;
var CAMERA = env2_15.CAMERA;
await Reflect.apply(requestPermission, value7, [CAMERA]);
var value8 = undefined;
if (false) {
return value8;
}
if (value8) {
env2_1(env2_3[16]).setVideoEnabled(true);
function _fun72163() { // fn#72163, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9413:256, offset: 0x01d3d1ea, size: 36 bytes, params: 1, frame: 12
const env0_0 = Module00005(_fun72165);
return _fun72166;
async function _fun72165(a0) { // fn#72165, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9413:276, offset: 0x01d3d222, size: 404 bytes, params: 2, frame: 22
var binding3;
var value10;
var show;
var object;
var intl;
var string;
var t;
var formatToPlainString;
var x9mtl4;
var object2;
let value = a1;
if (true) {
var r3 = !(value !== undefined) || value;
await undefined;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
var binding = env2_10;
var isVideoEnabled2 = binding.isVideoEnabled();
var channelVideoLimit = env2_0(env2_3[12]).getChannelVideoLimit(a0);
if (channelVideoLimit.reachedLimit) {
if (r3) {
binding = env2_1;
binding3 = env2_3;
value10 = binding(binding3[13]);
show = value10.show;
object = {};
binding = env2_0;
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
object.title = Reflect.apply(string, intl, [t['3ffmE+']]);
intl = binding(binding3[14]).intl;
formatToPlainString = intl.formatToPlainString;
t = binding(binding3[14]).t;
x9mtl4 = t.x9mtl4;
object2 = {};
object2.limit = channelVideoLimit.limit.toString();
object.body = Reflect.apply(formatToPlainString, intl, [x9mtl4, object2]);
Reflect.apply(show, value10, [object]);
}
} else {
binding = env2_1;
var binding2 = env2_3;
if (isVideoEnabled2) {
binding(binding2[16]).setVideoEnabled(false);
return undefined;
}
var value7 = binding(binding2[15]);
var requestPermission = value7.requestPermission;
var CAMERA = env2_15.CAMERA;
await Reflect.apply(requestPermission, value7, [CAMERA]);
var value8 = undefined;
if (false) {
return value8;
}
if (value8) {
env2_1(env2_3[16]).setVideoEnabled(true);
}
}
}
}
}
}
function _fun72170() { // fn#72170, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9413:2385, offset: 0x01d3d41e, size: 127 bytes, params: 1, frame: 16
const activeAudioDevice = AudioManagerStoreAndroid.getActiveAudioDevice();
const object2 = {isAudioRouteEnabled: true};
const value3 = undefined;
object2.toggleAudio = (require(9239) /* metro dependency 9239: showAudioOutputSelector */).showAudioOutputSelector;
object2.routeSource = env1_18[(activeAudioDevice == null ? value3 : activeAudioDevice.simpleDeviceType) ?? (require(9233) /* metro dependency 9233: NativeAudioManagerModule */).AudioDeviceType.INVALID];
return object2;
}
function _fun72172() { // fn#72172, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9413:2659, offset: 0x01d3d5b8, size: 156 bytes, params: 1, frame: 23
let value = environment.__proto__;
const isVideoMode2 = (require(9438) /* metro dependency 9438: useIsVideoMode */).isVideoMode(ChannelStore,
SelectedChannelStore, ApplicationStreamingStore, VoiceStateStore, MediaEngineStore);
value = AudioRouteStoreNative.getCurrentRouteType();
const RouteTypes = (require(9230) /* metro dependency 9230: VoiceCallTypes */).RouteTypes;
const SPEAKER = RouteTypes.SPEAKER;
const value2 = value === SPEAKER;
const BLUETOOTH = RouteTypes.BLUETOOTH;
value = value === BLUETOOTH;
let r3 = value2 || value;
r3 = !r3 ? isVideoMode2 : r3;
return {isEnabled: r3, isVideoMode: isVideoMode2, isBluetoothRoute: value};
}
function _fun72173() { // fn#72173, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9413:2967, offset: 0x01d3d654, size: 85 bytes, params: 1, frame: 12
const getMultipleRoutesAvailable = AudioRouteStoreNative.getMultipleRoutesAvailable;
if (!Reflect.apply(getMultipleRoutesAvailable, AudioRouteStoreNative, [])) {
env1_17.cancel();
if (!isVideoMode) {
env0_3(!env0_2);
function _fun72166() { // fn#72166, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9413:647, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
return env0_0.apply(this, arguments);
}
}
env1_16(!env0_2);
}
function _fun72174() { // fn#72174, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9413:3054, offset: 0x01d3d6a9, size: 74 bytes, params: 1, frame: 11
const getMultipleRoutesAvailable = AudioRouteStoreNative.getMultipleRoutesAvailable;
if (Reflect.apply(getMultipleRoutesAvailable, AudioRouteStoreNative, [])) {
env0_3(isEnabled);
} else if (isVideoMode) {
env0_3(isEnabled);
} else {
env1_17(_fun72175);
}
}
function _fun72186() { // fn#72186, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9413:4887, offset: 0x01d3dc8e, size: 40 bytes, params: 1, frame: 12
const value = environment.__proto__;
(importDefault(4796) /* metro dependency 4796: SelectedChannelActionCreators */).selectVoiceChannel(null);
}
function _fun72190() { // fn#72190, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9413:5683, offset: 0x01d3df6a, size: 85 bytes, params: 1, frame: 12
const getMultipleRoutesAvailable = AudioRouteStoreNative.getMultipleRoutesAvailable;
if (!Reflect.apply(getMultipleRoutesAvailable, AudioRouteStoreNative, [])) {
env1_17.cancel();
if (!env0_0) {
env0_3(!env0_2);
function _fun72169() { // fn#72169, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9413:2342, offset: 0x01d3d3dd, size: 65 bytes, params: 1, frame: 15
return (FluxModule).useStateFromStoresObject([AudioManagerStoreAndroid],
_fun72170, []);
function _fun72170() { // fn#72170, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9413:2385, offset: 0x01d3d41e, size: 127 bytes, params: 1, frame: 16
const activeAudioDevice = AudioManagerStoreAndroid.getActiveAudioDevice();
const object = {isAudioRouteEnabled: true};
const value3 = undefined;
object.toggleAudio = (require(9239) /* metro dependency 9239: showAudioOutputSelector */).showAudioOutputSelector;
object.routeSource = env1_18[(activeAudioDevice == null ? value3 : activeAudioDevice.simpleDeviceType) ?? (require(9233) /* metro dependency 9233: NativeAudioManagerModule */).AudioDeviceType.INVALID];
return object;
}
}
function _fun72171() { // fn#72171, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9413:2599, offset: 0x01d3d49d, size: 283 bytes, params: 1, frame: 20
const {isEnabled, isVideoMode,
isBluetoothRoute} = require(dependencyMap[26]).useStateFromStoresObject([ChannelStore, SelectedChannelStore,
ApplicationStreamingStore, VoiceStateStore, MediaEngineStore, AudioRouteStoreNative], _fun72172);
const [property, env0_3] = Module00057(ReactModule.useState(isEnabled), 2);
const value5 = ReactModule.useCallback(_fun72173, [property, isVideoMode]);
ReactModule.useEffect(_fun72174, [isEnabled, isVideoMode]);
return {isAudioRouteEnabled: property, toggleAudio: value5,
routeSource: importDefault(isBluetoothRoute ? dependencyMap[23] : dependencyMap[24])};
function _fun72172() { // fn#72172, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9413:2659, offset: 0x01d3d5b8, size: 156 bytes, params: 1, frame: 23
let value = environment.__proto__;
const isVideoMode2 = UseIsVideoModeModule.isVideoMode(ChannelStore, SelectedChannelStore, ApplicationStreamingStore,
VoiceStateStore, MediaEngineStore);
value = AudioRouteStoreNative.getCurrentRouteType();
const RouteTypes = (VoiceCallTypesModule).RouteTypes;
const SPEAKER = RouteTypes.SPEAKER;
const value2 = value === SPEAKER;
const BLUETOOTH = RouteTypes.BLUETOOTH;
value = value === BLUETOOTH;
let r3 = value2 || value;
r3 = !r3 ? isVideoMode2 : r3;
return {isEnabled: r3, isVideoMode: isVideoMode2, isBluetoothRoute: value};
}
function _fun72173() { // fn#72173, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9413:2967, offset: 0x01d3d654, size: 85 bytes, params: 1, frame: 12
const audioRouteStoreNativeBinding = AudioRouteStoreNative;
const getMultipleRoutesAvailable = audioRouteStoreNativeBinding.getMultipleRoutesAvailable;
if (!Reflect.apply(getMultipleRoutesAvailable, audioRouteStoreNativeBinding, [])) {
env1_17.cancel();
if (!isVideoMode) {
env0_3(!env0_2);
}
}
env1_16(!env0_2);
}
function _fun72174() { // fn#72174, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9413:3054, offset: 0x01d3d6a9, size: 74 bytes, params: 1, frame: 11
const audioRouteStoreNativeBinding = AudioRouteStoreNative;
const getMultipleRoutesAvailable = audioRouteStoreNativeBinding.getMultipleRoutesAvailable;
if (Reflect.apply(getMultipleRoutesAvailable, audioRouteStoreNativeBinding, [])) {
env0_3(isEnabled);
} else if (isVideoMode) {
env0_3(isEnabled);
} else {
env1_17(_fun72175);
}
function _fun72175() { // fn#72175, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9413:3101, offset: 0x01d3d6f3, size: 20 bytes, params: 1, frame: 11
return env1_3(isEnabled);
}
}
}
function handleToggleSelfDeaf() { // fn#72176, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9413:3324, offset: 0x01d3d707, size: 37 bytes, params: 1, frame: 11
(AudioActionCreators).toggleSelfDeaf();
}
function handleToggleSelfMute() { // fn#72177, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9413:3379, offset: 0x01d3d72c, size: 80 bytes, params: 1, frame: 17
const defaultImport = NativePermissionUtils;
const requestPermission = defaultImport.requestPermission;
const AUDIO = NativePermissionTypes.AUDIO;
Reflect.apply(requestPermission, defaultImport, [AUDIO, {showAuthorizationError: true}]);
(AudioActionCreators).toggleSelfMute();
}
function showSuppressedAlert() { // fn#72178, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9413:3497, offset: 0x01d3d77c, size: 150 bytes, params: 1, frame: 18
const defaultImport = AlertActionCreators;
const show = defaultImport.show;
const intl = (IndexNativeModule).intl;
const string = intl.string;
const t = (IndexNativeModule).t;
const FJSZVM = t.FJSZVM;
Reflect.apply(show, defaultImport, [{title: Reflect.apply(string, intl, [FJSZVM]), body: intl.string(t.etJjgW),
hideActionSheet: false}]);
}
function showServerMuteAlert() { // fn#72179, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9413:3652, offset: 0x01d3d812, size: 154 bytes, params: 1, frame: 18
const defaultImport = AlertActionCreators;
const show = defaultImport.show;
const intl = (IndexNativeModule).intl;
const string = intl.string;
const t = (IndexNativeModule).t;
Reflect.apply(show, defaultImport, [{title: Reflect.apply(string, intl, [t['+JQCa/']]), body: intl.string(t.hsNm7d),
hideActionSheet: false}]);
}
function showServerDeafenAlert() { // fn#72180, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9413:3812, offset: 0x01d3d8ac, size: 154 bytes, params: 1, frame: 18
const defaultImport = AlertActionCreators;
const show = defaultImport.show;
const object = {};
const intl = (IndexNativeModule).intl;
let string = intl.string;
const t = (IndexNativeModule).t;
const QZ7WSS = t.QZ7WSS;
object.title = Reflect.apply(string, intl, [QZ7WSS]);
string = intl.string;
const Tl9JpL = t.Tl9JpL;
object.body = Reflect.apply(string, intl, [Tl9JpL]);
object.hideActionSheet = false;
Reflect.apply(show, defaultImport, [object]);
}
function showCameraDisabledAlert() { // fn#72181, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9413:3971, offset: 0x01d3d946, size: 150 bytes, params: 1, frame: 18
const defaultImport = AlertActionCreators;
const show = defaultImport.show;
const intl = (IndexNativeModule).intl;
const string = intl.string;
const t = (IndexNativeModule).t;
const OYzPcW = t.OYzPcW;
Reflect.apply(show, defaultImport, [{title: Reflect.apply(string, intl, [OYzPcW]), body: intl.string(t.oBH7Y2),
hideActionSheet: false}]);
}
function showScreenshareDisabledAlert() { // fn#72182, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9413:4135, offset: 0x01d3d9dc, size: 154 bytes, params: 1, frame: 18
const defaultImport = AlertActionCreators;
const show = defaultImport.show;
const object = {};
const intl = (IndexNativeModule).intl;
let string = intl.string;
const t = (IndexNativeModule).t;
object.title = Reflect.apply(string, intl, [t['/x4knx']]);
string = intl.string;
const PpfzUE = t.PpfzUE;
object.body = Reflect.apply(string, intl, [PpfzUE]);
object.hideActionSheet = false;
Reflect.apply(show, defaultImport, [object]);
}
function showMinOSScreenshareRequirementAlert() { // fn#72183, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9413:4310, offset: 0x01d3da76, size: 305 bytes, params: 1, frame: 22
const value2 = undefined;
const intl = (IndexNativeModule).intl;
const formatToPlainString = intl.formatToPlainString;
const t = (IndexNativeModule).t;
const ejOT95 = t.ejOT95;
const getErrorInfo = AVErrorModule.getErrorInfo;
const AVError = AVErrorModule.AVError;
const SCREENSHARE_OS_NOT_SUPPORTED = AVError.SCREENSHARE_OS_NOT_SUPPORTED;
const value3 = Reflect.apply(getErrorInfo, AVErrorModule, [SCREENSHARE_OS_NOT_SUPPORTED]);
const value4 = Reflect.apply(formatToPlainString, intl, [ejOT95,
{errorCode: value3 == null ? value2 : value3.errorCode}]);
const defaultImport = AlertActionCreators;
const show = defaultImport.show;
object = {};
let string = intl.string;
object.title = Reflect.apply(string, intl, [t.oblMYa]);
string = intl.string;
const Wnhd3q = t.Wnhd3q;
object.body = '' + Reflect.apply(string, intl, [Wnhd3q]) + '\n\n' + value4;
object.hideActionSheet = false;
Reflect.apply(show, defaultImport, [object]);
return value2;
}
function showTabletRequirementAlert() { // fn#72184, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9413:4656, offset: 0x01d3dba7, size: 154 bytes, params: 1, frame: 18
const defaultImport = AlertActionCreators;
const show = defaultImport.show;
const intl = (IndexNativeModule).intl;
const string = intl.string;
const t = (IndexNativeModule).t;
Reflect.apply(show, defaultImport, [{title: Reflect.apply(string, intl, [t['1N0dxa']]), body: intl.string(t.qqDFVb),
hideActionSheet: false}]);
}
function handleDisconnect(a0) { // fn#72185, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9413:4811, offset: 0x01d3dc41, size: 77 bytes, params: 2, frame: 14
(KeyboardManagerUtilsModule).dismissGlobalKeyboard();
(PrivateChannelCallUtilsModule).dismissVoiceChannelScreens(a0, _fun72186);
function _fun72186() { // fn#72186, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9413:4887, offset: 0x01d3dc8e, size: 40 bytes, params: 1, frame: 12
const value = environment.__proto__;
(SelectedChannelActionCreators).selectVoiceChannel(null);
}
}
function getAudioDeviceToDisplayText(a0) { // fn#72187, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9413:4985, offset: 0x01d3dcb6, size: 364 bytes, params: 2, frame: 18
const object = {};
const intl = (IndexNativeModule).intl;
let string = intl.string;
const t = (IndexNativeModule).t;
const Ouoi6E = t.Ouoi6E;
object.EARPIECE = Reflect.apply(string, intl, [Ouoi6E]);
object.BLUETOOTH_HEADSET = intl.string(t.i6eV3z);
string = intl.string;
const Dluojr = t.Dluojr;
object.WIRED_HEADSET = Reflect.apply(string, intl, [Dluojr]);
object.SPEAKERPHONE = intl.string(t.snEhlu);
object.INVALID = intl.string(t.kCBL6t);
const deviceType = a0.deviceType;
const TYPE_BLE_HEADSET = env0_19.TYPE_BLE_HEADSET;
return deviceType === TYPE_BLE_HEADSET ? intl.string(t.BtXSp9) : object[a0.simpleDeviceType];
}
function useImmediateMaskedSpeakerStates() { // fn#72188, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9413:5460, offset: 0x01d3de22, size: 309 bytes, params: 1, frame: 20
const currentRouteType = require(dependencyMap[26]).useStateFromStores([AudioRouteStoreNative], function() {
return AudioRouteStoreNative.getCurrentRouteType();
});
const value2 = importDefault(dependencyMap[29])();
const RouteTypes = require(dependencyMap[30]).RouteTypes;
const SPEAKER = RouteTypes.SPEAKER;
const value3 = currentRouteType === SPEAKER;
const BLUETOOTH = RouteTypes.BLUETOOTH;
const value4 = currentRouteType === BLUETOOTH;
let r10 = value3 || value4;
r10 = !r10 ? value2 : r10;
const [property, env0_3] = Module00057(ReactModule.useState(r10), 2);
const value7 = ReactModule.useCallback(_fun72190, [property, value2]);
ReactModule.useEffect(_fun72191, [r10, value2]);
return {isAudioRouteEnabled: property, toggleAudio: value7,
routeSource: importDefault(value4 ? dependencyMap[23] : dependencyMap[24])};
function _fun72190() { // fn#72190, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9413:5683, offset: 0x01d3df6a, size: 85 bytes, params: 1, frame: 12
const audioRouteStoreNativeBinding = AudioRouteStoreNative;
const getMultipleRoutesAvailable = audioRouteStoreNativeBinding.getMultipleRoutesAvailable;
if (!Reflect.apply(getMultipleRoutesAvailable, audioRouteStoreNativeBinding, [])) {
env1_17.cancel();
if (!env0_0) {
env0_3(!env0_2);
}
}
env1_16(!env0_2);
}
function _fun72191() { // fn#72191, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9413:5770, offset: 0x01b83ce8, size: 20 bytes, params: 1, frame: 11
env0_3(env0_1);
}
}
env1_16(!env0_2);
}
function _fun72175() { // fn#72175, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9413:3101, offset: 0x01d3d6f3, size: 20 bytes, params: 1, frame: 11
return env1_3(isEnabled);
}
global.__d(_fun72162, 9228, [57, 5, 31, 27, 4492, 1379, 4259, 1934, 4297, 9229, 9232, 4661, 9234, 4496, 1244, 4662,
8899, 9235, 1848, 7709, 4796, 22, 9236, 9237, 9238, 477, 566, 9239, 9233, 9438, 9230,
2]) /* metro module 9228, dependencies: [57, 5, 31, 27, 4492, 1379, 4259, 1934, 4297, 9229, 9232, 4661, 9234, 4496, 1244, 4662, 8899, 9235, 1848, 7709, 4796, 22, 9236, 9237, 9238, 477, 566, 9239, 9233, 9438, 9230, 2] */;
@@ -1,32 +1,51 @@
/* Metro module 9708; source: modules/voice_calls/native/ConfirmStartCall.tsx; dependencies: [31, 33, 4500, 1244, 4500, 4497, 2] */
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 JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as UseAlertStoreNativeModule from '../../../design/components/AlertModal/native/useAlertStore.native.tsx'; /* Metro dependency 4497 */
import * as AlertModalNativeModule from '../../../design/components/AlertModal/native/AlertModal.native.tsx'; /* Metro dependency 4500 */
function _fun76304(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76304, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9894:6, offset: 0x01dc9b1d, size: 151 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const value = require(33) /* metro dependency 33 */;
const env0_2 = value.jsx;
const env0_3 = value.jsxs;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_calls/native/ConfirmStartCall.tsx');
ReactModule;
(FileImportTrackerModule).fileFinishedImporting('modules/voice_calls/native/ConfirmStartCall.tsx');
exports.confirmStartCall = confirmStartCall;
function ConfirmStartCall({onConfirm}) { // fn#76305, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9894:131, offset: 0x01dc9bb4, size: 390 bytes, params: 2, frame: 29
const AlertModal = (AlertModalNativeModule).AlertModal;
const object = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const HlAPoq = (require(1244) /* metro dependency 1244: indexNative */).t.HlAPoq;
object.title = Reflect.apply(string, intl, [HlAPoq]);
object.content = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['cRW4D/']);
const AlertActions = (AlertModalNativeModule).AlertActions;
const AlertActionButton = (AlertModalNativeModule).AlertActionButton;
object.actions = (
<AlertActions>
<AlertActionButton
variant="active"
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.rimG2R)}
onPress={onConfirm}
key="confirm"
/>
<AlertActionButton
variant="secondary"
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['ETE/oC'])}
key="cancel"
/>
</AlertActions>
);
return <AlertModal {...object} />;
}
function confirmStartCall(a0) { // fn#76306, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9894:658, offset: 0x01dc9d3a, size: 69 bytes, params: 2, frame: 16
(UseAlertStoreNativeModule).openAlert('start-voice-call',
<ConfirmStartCall onConfirm={a0} />);
}
}
function ConfirmStartCall({onConfirm}) { // fn#76305, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9894:131, offset: 0x01dc9bb4, size: 390 bytes, params: 2, frame: 29
const AlertModal = (require(4500) /* metro dependency 4500: AlertModalNative */).AlertModal;
const object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const HlAPoq = (require(1244) /* metro dependency 1244: indexNative */).t.HlAPoq;
object2.title = Reflect.apply(string, intl, [HlAPoq]);
object2.content = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['cRW4D/']);
const AlertActions = (require(4500) /* metro dependency 4500: AlertModalNative */).AlertActions;
const AlertActionButton = (require(4500) /* metro dependency 4500: AlertModalNative */).AlertActionButton;
object2.actions = <AlertActions><AlertActionButton variant="active" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.rimG2R)} onPress={onConfirm} key="confirm" /><AlertActionButton variant="secondary" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['ETE/oC'])} key="cancel" /></AlertActions>;
return <AlertModal {...object2} />;
}
function confirmStartCall(a0) { // fn#76306, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9894:658, offset: 0x01dc9d3a, size: 69 bytes, params: 2, frame: 16
(require(4497) /* metro dependency 4497: useAlertStoreNative */).openAlert('start-voice-call',
<ConfirmStartCall onConfirm={a0} />);
}
global.__d(_fun76304, 9708, [31, 33, 4500, 1244, 4500, 4497,
2]) /* metro module 9708, dependencies: [31, 33, 4500, 1244, 4500, 4497, 2] */;
@@ -1,15 +1,19 @@
/* Metro module 13093; source: modules/voice_calls/native/IOSVoiceLiveActivityExperiment.tsx; dependencies: [1358, 2] */
import ApexExperiment from '../../experiments/apex/ApexExperiment.tsx'; /* Metro dependency 1358 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun100056(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100056, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13283:6, offset: 0x021dce5c, size: 192 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importDefault(1358) /* metro dependency 1358: ApexExperiment */;
let value = ApexExperiment;
value = value({'kind': 'user', 'name': '2026-05-ios-voice-live-activity', defaultConfig: {'enabled': false,
'suppressWhenCallKitEnabled': false, 'showSpeakingIndicator': false, 'useSpeakerMuteLockscreenButtons': false},
variations: {[1]: {'enabled': true, 'suppressWhenCallKitEnabled': false, 'showSpeakingIndicator': true,
'useSpeakerMuteLockscreenButtons': false}, [2]: {'enabled': true, 'suppressWhenCallKitEnabled': true,
'showSpeakingIndicator': false, 'useSpeakerMuteLockscreenButtons': false}, [3]: {'enabled': true,
'suppressWhenCallKitEnabled': false, 'showSpeakingIndicator': true, 'useSpeakerMuteLockscreenButtons': true}}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_calls/native/IOSVoiceLiveActivityExperiment.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_calls/native/IOSVoiceLiveActivityExperiment.tsx');
exports.default = value;
}
global.__d(_fun100056, 13093, [1358, 2]) /* metro module 13093, dependencies: [1358, 2] */;
@@ -1,20 +1,25 @@
/* Metro module 15812; source: modules/voice_calls/native/ProximitySensorManager.tsx; dependencies: [7, 6, 15, 17, 18, 27, 1378, 4492, 4294, 9229, 477, 15813, 9230, 4860, 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 EmbeddedActivitiesStore from '../../activities/EmbeddedActivitiesStore.tsx'; /* Metro dependency 1378 */
import RTCConnectionStore from '../../../stores/RTCConnectionStore.tsx'; /* Metro dependency 4294 */
import ApplicationStreamingStore from '../../../stores/ApplicationStreamingStore.tsx'; /* Metro dependency 4492 */
import AudioRouteStoreNative from '../AudioRouteStore.native.tsx'; /* Metro dependency 9229 */
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 */
import * as VoiceCallTypesModule from '../VoiceCallTypes.tsx'; /* Metro dependency 9230 */
function _fun121522(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#121522, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16020:6, offset: 0x02549ffa, size: 368 bytes, params: 8, frame: 19
var ProximitySensorManager;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(7) /* metro dependency 7 */;
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(15) /* metro dependency 15 */;
const env0_5 = importDefault(17) /* metro dependency 17 */;
const env0_6 = importDefault(18) /* metro dependency 18 */;
const NativeModules = (require(27) /* metro dependency 27 */).NativeModules;
const embeddedActivitiesStore = importDefault(1378) /* metro dependency 1378: EmbeddedActivitiesStore */;
const applicationStreamingStore = importDefault(4492) /* metro dependency 4492: ApplicationStreamingStore */;
const rtcConnectionStore = importDefault(4294) /* metro dependency 4294: RTCConnectionStore */;
const audioRouteStoreNative = importDefault(9229) /* metro dependency 9229: AudioRouteStoreNative */;
let value = require(477) /* metro dependency 477: PlatformUtils */;
const NativeModules = (ReactNativeModule).NativeModules;
let value = PlatformUtilsModule;
if (value.isIOS()) {
ProximitySensorManager = NativeModules.ProximitySensorManager;
} else {
@@ -23,91 +28,95 @@ function _fun121522(global, require, importDefault, importAll, module, exports,
value = importDefault(4860) /* metro dependency 4860: AutomaticLifecycleManager */;
value = _fun121527(value);
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_calls/native/ProximitySensorManager.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_calls/native/ProximitySensorManager.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_121523() { // fn#121523, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16020:212, offset: 0x0254a16a, 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) {
function _isNativeReflectConstruct_121523() { // fn#121523, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16020:212, offset: 0x0254a16a, 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_121523_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_121523_isNativeReflectConstruct = function() {
return !!result;
})();
}
function handleChange_121526() { // fn#121526, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16020:462, offset: 0x0254a1cc, size: 190 bytes, params: 1, frame: 18
var value;
const currentRouteType = AudioRouteStoreNative.getCurrentRouteType();
const isConnected2 = RTCConnectionStore.isConnected();
const value4 = EmbeddedActivitiesStore.getCurrentEmbeddedActivity() != null;
const getAllActiveStreams = ApplicationStreamingStore.getAllActiveStreams;
const value5 = Reflect.apply(getAllActiveStreams, ApplicationStreamingStore, []).length > 0;
const binding = env0_11;
const setProximityMonitoringEnabled = binding.setProximityMonitoringEnabled;
const RouteTypes = (require(9230) /* metro dependency 9230: VoiceCallTypes */).RouteTypes;
const RECEIVER = RouteTypes.RECEIVER;
let r1 = currentRouteType === RECEIVER && isConnected2;
if (r1) {
value = require(477) /* metro dependency 477: PlatformUtils */;
value = value.isIOS();
r1 = value || !value4 && !value5;
function handleChange_121526() { // fn#121526, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16020:462, offset: 0x0254a1cc, size: 190 bytes, params: 1, frame: 18
var value;
const currentRouteType = AudioRouteStoreNative.getCurrentRouteType();
const isConnected2 = RTCConnectionStore.isConnected();
const value4 = EmbeddedActivitiesStore.getCurrentEmbeddedActivity() != null;
const applicationStreamingStoreBinding = ApplicationStreamingStore;
const getAllActiveStreams = applicationStreamingStoreBinding.getAllActiveStreams;
const value5 = Reflect.apply(getAllActiveStreams, applicationStreamingStoreBinding, []).length > 0;
const binding = env0_11;
const setProximityMonitoringEnabled = binding.setProximityMonitoringEnabled;
const RouteTypes = (VoiceCallTypesModule).RouteTypes;
const RECEIVER = RouteTypes.RECEIVER;
let r1 = currentRouteType === RECEIVER && isConnected2;
if (r1) {
value = require(477) /* metro dependency 477: PlatformUtils */;
value = value.isIOS();
r1 = value || !value4 && !value5;
}
Reflect.apply(setProximityMonitoringEnabled, binding, [r1]);
}
Reflect.apply(setProximityMonitoringEnabled, binding, [r1]);
}
function _fun121527(a0) { // fn#121527, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16020:715, offset: 0x0254a28a, size: 42 bytes, params: 2, frame: 14
const closure = ProximitySensorManager;
env0_6(closure, a0);
return env0_2(closure);
}
function _fun121527(a0) { // fn#121527, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16020:715, offset: 0x0254a28a, size: 42 bytes, params: 2, frame: 14
const ProximitySensorManager2 = ProximitySensorManager;
Inherits(ProximitySensorManager2, a0);
return CreateClass(ProximitySensorManager2);
function ProximitySensorManager(a0) { // fn#121528, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16020:727, offset: 0x0254a2b4, size: 194 bytes, params: 2, frame: 20
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_3;
binding(this, ProximitySensorManager);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_5(ProximitySensorManager);
binding = env1_4;
if (_isNativeReflectConstruct_121523()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_5(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
const Map = global.Map;
const map = new Map();
const set = map.set;
const audioRouteStoreNativeBinding = AudioRouteStoreNative;
const handleChange_121526Binding = handleChange_121526;
const value6 = Reflect.apply(set, map, [audioRouteStoreNativeBinding, handleChange_121526Binding]);
value.stores = value6.set(RTCConnectionStore, handleChange_121526Binding);
return value;
}
function ProximitySensorManager(a0) { // fn#121528, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16020:727, offset: 0x0254a2b4, size: 194 bytes, params: 2, frame: 20
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_3;
binding(this, ProximitySensorManager);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_5(ProximitySensorManager);
binding = env1_4;
if (_isNativeReflectConstruct_121523()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_5(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
const Map = global.Map;
const map = new Map();
const set = map.set;
const handleChange_121526Binding = handleChange_121526;
value.stores = Reflect.apply(set, map, [AudioRouteStoreNative, handleChange_121526Binding]).set(RTCConnectionStore,
handleChange_121526Binding);
return value;
}
global.__d(_fun121522, 15812, [7, 6, 15, 17, 18, 27, 1378, 4492, 4294, 9229, 477, 15813, 9230, 4860,
2]) /* metro module 15812, dependencies: [7, 6, 15, 17, 18, 27, 1378, 4492, 4294, 9229, 477, 15813, 9230, 4860, 2] */;
@@ -1,107 +1,112 @@
/* Metro module 12085; source: modules/voice_calls/native/VoiceActionSheetManager.tsx; dependencies: [6, 7, 15, 17, 18, 4259, 4297, 694, 7709, 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 MediaEngineStore from '../../../stores/MediaEngineStore.tsx'; /* Metro dependency 4259 */
import VoiceStateStore from '../../../stores/VoiceStateStore.tsx'; /* Metro dependency 4297 */
import LifecycleManager from '../../../lib/LifecycleManager.tsx'; /* Metro dependency 4561 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun92859(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#92859, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12271:6, offset: 0x0209c013, size: 262 bytes, params: 8, frame: 19
const env0_0 = require;
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 */;
const mediaEngineStore = importDefault(4259) /* metro dependency 4259: MediaEngineStore */;
const voiceStateStore = importDefault(4297) /* metro dependency 4297: VoiceStateStore */;
let value = importDefault(4561) /* metro dependency 4561: LifecycleManager */;
let value = LifecycleManager;
value = _fun92863(value);
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_calls/native/VoiceActionSheetManager.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_calls/native/VoiceActionSheetManager.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_92860() { // fn#92860, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12271:168, offset: 0x0209c119, 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) {
function _isNativeReflectConstruct_92860() { // fn#92860, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12271:168, offset: 0x0209c119, 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_92860_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_92860_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun92863(a0) { // fn#92863, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12271:371, offset: 0x0209c17b, size: 97 bytes, params: 2, frame: 16
const closure = VoiceActionSheetManager;
env0_7(closure, a0);
return env0_4(closure, [{key: '_initialize', value: function(a0) {
this.channel = a0;
VoiceStateStore.addChangeListener(this.handleOpenChannelCallModal);
MediaEngineStore.addChangeListener(this.handleOpenChannelCallModal);
}}, {key: '_terminate', value: function() {
VoiceStateStore.removeChangeListener(this.handleOpenChannelCallModal);
MediaEngineStore.removeChangeListener(this.handleOpenChannelCallModal);
}}]);
}
function _fun92863(a0) { // fn#92863, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12271:371, offset: 0x0209c17b, size: 97 bytes, params: 2, frame: 16
const VoiceActionSheetManager2 = VoiceActionSheetManager;
Inherits(VoiceActionSheetManager2, a0);
return CreateClass(VoiceActionSheetManager2, [{key: '_initialize', value: function(a0) {
this.channel = a0;
VoiceStateStore.addChangeListener(this.handleOpenChannelCallModal);
MediaEngineStore.addChangeListener(this.handleOpenChannelCallModal);
}}, {key: '_terminate', value: function() {
VoiceStateStore.removeChangeListener(this.handleOpenChannelCallModal);
MediaEngineStore.removeChangeListener(this.handleOpenChannelCallModal);
}}]);
function VoiceActionSheetManager(a0) { // fn#92864, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12271:383, offset: 0x0209c1dc, size: 153 bytes, params: 2, frame: 20
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_3;
binding(this, VoiceActionSheetManager);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_6(VoiceActionSheetManager);
binding = env1_5;
if (_isNativeReflectConstruct_92860()) {
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.channel = null;
value.handleOpenChannelCallModal = handleOpenChannelCallModal;
return value;
function handleOpenChannelCallModal() { // fn#92865, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12271:682, owner: VoiceActionSheetManager.handleOpenChannelCallModal, offset: 0x0209c275, size: 85 bytes, params: 1, frame: 13
var environment;
var value2;
const channel = channel2.channel;
var channel2 = channel;
if (channel != null) {
value2 = environment.__proto__.__proto__;
(importDefault(694) /* metro dependency 694: Dispatcher */).wait(_fun92866);
channel2.terminate();
}
function _fun92866() { // fn#92866, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12271:727, offset: 0x0209c2ca, size: 65 bytes, params: 1, frame: 15
let value = environment.__proto__.__proto__.__proto__;
value = require(7709) /* metro dependency 7709: PrivateChannelCallUtils */;
const dismissVoiceChannelScreens = value.dismissVoiceChannelScreens;
const channelBinding = channel;
Reflect.apply(dismissVoiceChannelScreens, value, [channelBinding]);
(require(7709) /* metro dependency 7709: PrivateChannelCallUtils */).openChannelCallModal(channelBinding);
}
}
}
function VoiceActionSheetManager(a0) { // fn#92864, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12271:383, offset: 0x0209c1dc, size: 153 bytes, params: 2, frame: 20
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_3;
binding(this, VoiceActionSheetManager);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_6(VoiceActionSheetManager);
binding = env1_5;
if (_isNativeReflectConstruct_92860()) {
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.channel = null;
value.handleOpenChannelCallModal = handleOpenChannelCallModal;
return value;
}
function handleOpenChannelCallModal() { // fn#92865, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12271:682, owner: VoiceActionSheetManager.handleOpenChannelCallModal, offset: 0x0209c275, size: 85 bytes, params: 1, frame: 13
var environment;
var value2;
const channel = env0_0.channel;
var env0_0 = channel;
if (channel != null) {
value2 = environment.__proto__.__proto__;
(importDefault(694) /* metro dependency 694: Dispatcher */).wait(_fun92866);
env0_0.terminate();
}
}
function _fun92866() { // fn#92866, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12271:727, offset: 0x0209c2ca, size: 65 bytes, params: 1, frame: 15
let value = environment.__proto__.__proto__.__proto__;
value = require(7709) /* metro dependency 7709: PrivateChannelCallUtils */;
const dismissVoiceChannelScreens = value.dismissVoiceChannelScreens;
const channelBinding = channel;
Reflect.apply(dismissVoiceChannelScreens, value, [channelBinding]);
(require(7709) /* metro dependency 7709: PrivateChannelCallUtils */).openChannelCallModal(channelBinding);
}
global.__d(_fun92859, 12085, [6, 7, 15, 17, 18, 4259, 4297, 694, 7709, 4561,
2]) /* metro module 12085, dependencies: [6, 7, 15, 17, 18, 4259, 4297, 694, 7709, 4561, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,64 +1,73 @@
/* Metro module 12102; source: modules/voice_calls/native/action_sheet/JoinVoiceChannelButton.tsx; dependencies: [31, 27, 3784, 661, 33, 4501, 10785, 566, 1244, 1848, 4796, 4578, 2] */
import PermissionStore from '../../../../stores/PermissionStore.tsx'; /* Metro dependency 3784 */
import UseIsVoiceChannelFull from '../../useIsVoiceChannelFull.tsx'; /* Metro dependency 10785 */
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 ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as KeyboardManagerUtilsModule from '../../../../utils/native/KeyboardManagerUtils.tsx'; /* Metro dependency 1848 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as ButtonNativeModule from '../../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
function _fun92922(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#92922, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12288:6, offset: 0x0209e6e0, size: 247 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
const env0_7 = (require(661) /* metro dependency 661: Constants */).Permissions;
const env0_8 = (require(33) /* metro dependency 33 */).jsx;
const env0_9 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {flexDirection: 'row'}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_calls/native/action_sheet/JoinVoiceChannelButton.tsx');
const env0_9 = (CreateStylesModule).createStyles({container: {flexDirection: 'row'}});
(FileImportTrackerModule).fileFinishedImporting('modules/voice_calls/native/action_sheet/JoinVoiceChannelButton.tsx');
exports.default = _default_92923;
}
function _default_92923({channel, style}) { // fn#92923, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12288:234, offset: 0x0209e7d7, size: 394 bytes, params: 2, frame: 22
var r7;
var r8;
var value6;
var value7;
var value8;
var value9;
const styles = useStyles();
const value2 = (UseIsVoiceChannelFull)(channel);
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([PermissionStore], function() {
var permissionStoreBinding = PermissionStore;
var CONNECT = Permissions.CONNECT;
return !permissionStoreBinding.can(CONNECT, channel);
});
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
if (value2) {
value8 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.rZfiNq);
value9 = true;
r7 = value8;
r8 = value9;
} else if (value3) {
value6 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.TVBCKZ);
value7 = true;
r7 = value6;
r8 = value7;
} else {
r7 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.eIi3Om);
r8 = false;
}
const value10 = ReactModule.useCallback(_fun92925, [channel.id]);
const items2 = [styles.container, style];
const Button = (ButtonNativeModule).Button;
return (
<View style={items2}>
<Button
disabled={r8}
text={r7}
onPress={value10}
/>
</View>
);
function _fun92925() { // fn#92925, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12288:506, offset: 0x0209e98a, size: 76 bytes, params: 1, frame: 13
let value = environment.__proto__;
(KeyboardManagerUtilsModule).dismissGlobalKeyboard();
value = importDefault(4796) /* metro dependency 4796: SelectedChannelActionCreators */;
value.selectVoiceChannel(channel.id);
}
function _default_92923({channel, style}) { // fn#92923, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12288:234, offset: 0x0209e7d7, size: 394 bytes, params: 2, frame: 22
var r7;
var r8;
var value6;
var value7;
var value8;
var value9;
const styles = useStyles();
const value2 = (importDefault(10785) /* metro dependency 10785: useIsVoiceChannelFull */)(channel);
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([PermissionStore], function() {
var CONNECT = Permissions.CONNECT;
return !PermissionStore.can(CONNECT, channel);
});
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
if (value2) {
value8 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.rZfiNq);
value9 = true;
r7 = value8;
r8 = value9;
} else if (value3) {
value6 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.TVBCKZ);
value7 = true;
r7 = value6;
r8 = value7;
} else {
r7 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.eIi3Om);
r8 = false;
}
const value10 = env0_4.useCallback(_fun92925, [channel.id]);
const items2 = [styles.container, style];
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
return (
<View style={items2}>
<Button
disabled={r8}
text={r7}
onPress={value10}
/>
</View>
);
}
function _fun92925() { // fn#92925, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12288:506, offset: 0x0209e98a, size: 76 bytes, params: 1, frame: 13
let value = environment.__proto__;
(importAll(1848) /* metro dependency 1848: KeyboardManagerUtils */).dismissGlobalKeyboard();
value = importDefault(4796) /* metro dependency 4796: SelectedChannelActionCreators */;
value.selectVoiceChannel(channel.id);
}
global.__d(_fun92922, 12102, [31, 27, 3784, 661, 33, 4501, 10785, 566, 1244, 1848, 4796, 4578,
2]) /* metro module 12102, dependencies: [31, 27, 3784, 661, 33, 4501, 10785, 566, 1244, 1848, 4796, 4578, 2] */;
@@ -1,67 +1,105 @@
/* Metro module 12084; source: modules/voice_calls/native/action_sheet/VoiceActionSheet.tsx; dependencies: [31, 27, 4300, 33, 4501, 6771, 6789, 566, 4007, 7709, 12085, 12086, 6805, 12096, 12099, 12100, 4564, 12103, 2] */
import SortedVoiceStateStore from '../../../../stores/views/SortedVoiceStateStore.tsx'; /* Metro dependency 4300 */
import UseAnalyticsLocations from '../../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
import AnalyticsLocation from '../../../app_analytics/AnalyticsLocation.tsx'; /* Metro dependency 6789 */
import VoiceActionSheetManager from '../VoiceActionSheetManager.tsx'; /* Metro dependency 12085 */
import NUFChannelsManager from '../../../nuf_channels/native/NUFChannelsManager.tsx'; /* Metro dependency 12086 */
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 FluxModule from '../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as NavigationRouteUtilsNativeModule from '../../../main_tabs_v2/helpers/NavigationRouteUtils.native.tsx'; /* Metro dependency 4007 */
import * as UseAnalyticsLocationsModule from '../../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
import * as ActionSheetNativeModule from '../../../../design/components/Sheet/native/ActionSheet.native.tsx'; /* Metro dependency 6805 */
import * as PrivateChannelCallUtilsModule from '../../../../utils/native/PrivateChannelCallUtils.tsx'; /* Metro dependency 7709 */
function _fun92854(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#92854, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12270:6, offset: 0x0209bc06, size: 265 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_4 = value.View;
const StyleSheet = value.StyleSheet;
const sortedVoiceStateStore = importDefault(4300) /* metro dependency 4300: SortedVoiceStateStore */;
value = require(33) /* metro dependency 33 */;
const env0_6 = value.jsx;
const env0_7 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const object = {};
copyDataProperties(object, StyleSheet.absoluteFillObject, undefined);
object['overflow'] = 'hidden';
const env0_8 = Reflect.apply(createStyles, value, [{container: {flex: 1}, visualEffectView: object}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_calls/native/action_sheet/VoiceActionSheet.tsx');
const object2 = {};
copyDataProperties(object2, StyleSheet.absoluteFillObject, undefined);
object2['overflow'] = 'hidden';
const env0_8 = Reflect.apply(createStyles, value, [{container: {flex: 1}, visualEffectView: object2}]);
(FileImportTrackerModule).fileFinishedImporting('modules/voice_calls/native/action_sheet/VoiceActionSheet.tsx');
exports.default = _default_92855;
}
function _default_92855({channel}) { // fn#92855, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12270:292, offset: 0x0209bd0f, size: 577 bytes, params: 2, frame: 26
const ActionSheet = (ActionSheetNativeModule).ActionSheet;
const styles = useStyles();
const defaultImport = UseAnalyticsLocations;
const VOICE_ACTION_SHEET = (AnalyticsLocation).VOICE_ACTION_SHEET;
const analyticsLocations = defaultImport(VOICE_ACTION_SHEET).analyticsLocations;
const value2 = (FluxModule).useStateFromStores([SortedVoiceStateStore],
_fun92856);
ReactModule.useEffect(_fun92857, [channel]);
const defaultImport2 = NUFChannelsManager;
const r4 = (
defaultImport2.requiresVoiceChannelsOnboard()
? (
<ActionSheet>
{((Component) => <Component channel={channel} />)(importDefault(12096) /* metro dependency 12096: NUFVoiceChannelsTemplate */)}
</ActionSheet>
)
: (
value2
? (
<ActionSheet>
{((Component) => <Component channel={channel} />)(importDefault(12099) /* metro dependency 12099: GuildEventVoiceBanner */)}
{((Component) => <Component channel={channel} />)(importDefault(12100) /* metro dependency 12100: VoiceEmptyState */)}
</ActionSheet>
)
: (
<ActionSheet scrollable startExpanded>
<View style={styles.container}>
{((Component) => <Component blurTheme="dark" style={styles.visualEffectView} />)(importDefault(4564) /* metro dependency 4564: VisualEffectView */)}
{((Component) => <Component channel={channel} />)(importDefault(12103) /* metro dependency 12103: VoiceMemberList */)}
</View>
</ActionSheet>
)
)
);
const AnalyticsLocationProvider = (UseAnalyticsLocationsModule).AnalyticsLocationProvider;
return (
<AnalyticsLocationProvider value={analyticsLocations}>
{r4}
</AnalyticsLocationProvider>
);
function _fun92856() { // fn#92856, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12270:411, offset: 0x0209bf50, size: 38 bytes, params: 1, frame: 11
const value = environment.__proto__;
const sortedVoiceStateStoreBinding = SortedVoiceStateStore;
return sortedVoiceStateStoreBinding.countVoiceStatesForChannel(channel.id) === 0;
}
function _default_92855({channel}) { // fn#92855, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12270:292, offset: 0x0209bd0f, size: 577 bytes, params: 2, frame: 26
const ActionSheet = (require(6805) /* metro dependency 6805: ActionSheetNative */).ActionSheet;
const styles = useStyles();
const defaultImport = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
const VOICE_ACTION_SHEET = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).VOICE_ACTION_SHEET;
const analyticsLocations = defaultImport(VOICE_ACTION_SHEET).analyticsLocations;
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([SortedVoiceStateStore],
_fun92856);
env0_3.useEffect(_fun92857, [channel]);
const defaultImport2 = importDefault(12086) /* metro dependency 12086: NUFChannelsManager */;
const r4 = defaultImport2.requiresVoiceChannelsOnboard() ? <ActionSheet>{((Component) => <Component channel={channel} />)(importDefault(12096) /* metro dependency 12096: NUFVoiceChannelsTemplate */)}</ActionSheet> : value2 ? <ActionSheet>{((Component) => <Component channel={channel} />)(importDefault(12099) /* metro dependency 12099: GuildEventVoiceBanner */)}{((Component) => <Component channel={channel} />)(importDefault(12100) /* metro dependency 12100: VoiceEmptyState */)}</ActionSheet> : <ActionSheet scrollable startExpanded><View style={styles.container}>{((Component) => <Component blurTheme="dark" style={styles.visualEffectView} />)(importDefault(4564) /* metro dependency 4564: VisualEffectView */)}{((Component) => <Component channel={channel} />)(importDefault(12103) /* metro dependency 12103: VoiceMemberList */)}</View></ActionSheet>;
const AnalyticsLocationProvider = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider;
return (
<AnalyticsLocationProvider value={analyticsLocations}>
{r4}
</AnalyticsLocationProvider>
);
}
function _fun92857() { // fn#92857, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12270:476, offset: 0x0209bf76, size: 120 bytes, params: 1, frame: 16
var environment;
let value = environment.__proto__;
const isModalOpen = NavigationRouteUtilsNativeModule.isModalOpen;
const getVoiceChannelKey = PrivateChannelCallUtilsModule.getVoiceChannelKey;
if (!Reflect.apply(isModalOpen, NavigationRouteUtilsNativeModule, [Reflect.apply(getVoiceChannelKey,
PrivateChannelCallUtilsModule, [channel.id])])) {
value = importDefault(12085) /* metro dependency 12085: VoiceActionSheetManager */;
value.initialize(channel);
}
return _fun92858;
function _fun92858() { // fn#92858, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12270:559, offset: 0x0209bfee, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__.__proto__;
(VoiceActionSheetManager).terminate();
}
function _fun92856() { // fn#92856, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12270:411, offset: 0x0209bf50, size: 38 bytes, params: 1, frame: 11
const value = environment.__proto__;
return SortedVoiceStateStore.countVoiceStatesForChannel(channel.id) === 0;
}
}
function _fun92857() { // fn#92857, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12270:476, offset: 0x0209bf76, size: 120 bytes, params: 1, frame: 16
var environment;
let value = environment.__proto__;
const navigationRouteUtilsNativeModule = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
const isModalOpen = navigationRouteUtilsNativeModule.isModalOpen;
const privateChannelCallUtilsModule = require(7709) /* metro dependency 7709: PrivateChannelCallUtils */;
const getVoiceChannelKey = privateChannelCallUtilsModule.getVoiceChannelKey;
if (!Reflect.apply(isModalOpen, navigationRouteUtilsNativeModule, [Reflect.apply(getVoiceChannelKey,
privateChannelCallUtilsModule, [channel.id])])) {
value = importDefault(12085) /* metro dependency 12085: VoiceActionSheetManager */;
value.initialize(channel);
}
return _fun92858;
}
function _fun92858() { // fn#92858, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12270:559, offset: 0x0209bfee, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__.__proto__;
(importDefault(12085) /* metro dependency 12085: VoiceActionSheetManager */).terminate();
}
global.__d(_fun92854, 12084, [31, 27, 4300, 33, 4501, 6771, 6789, 566, 4007, 7709, 12085, 12086, 6805, 12096, 12099,
12100, 4564, 12103,
2]) /* metro module 12084, dependencies: [31, 27, 4300, 33, 4501, 6771, 6789, 566, 4007, 7709, 12085, 12086, 6805, 12096, 12099, 12100, 4564, 12103, 2] */;
@@ -1,15 +1,27 @@
/* Metro module 12114; source: modules/voice_calls/native/action_sheet/VoiceChannelHeader.tsx; dependencies: [31, 27, 1378, 1867, 3784, 661, 33, 4501, 697, 12115, 12116, 4573, 12117, 566, 10785, 4805, 9151, 1244, 4007, 1305, 5107, 12119, 9803, 10858, 5278, 2] */
import EmbeddedActivitiesStore from '../../../activities/EmbeddedActivitiesStore.tsx'; /* Metro dependency 1378 */
import GuildStore from '../../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import PermissionStore from '../../../../stores/PermissionStore.tsx'; /* Metro dependency 3784 */
import UseChannelName from '../../../channel/useChannelName.tsx'; /* Metro dependency 4805 */
import UseIsVoiceChannelFull from '../../useIsVoiceChannelFull.tsx'; /* Metro dependency 10785 */
import Module10858 from '../../../../by-id/module-10858.js'; /* Metro dependency 10858 */
import CallStateHooks from '../CallStateHooks.tsx'; /* Metro dependency 12115 */
import OngoingCallStatusLabel from '../components/OngoingCallStatusLabel.tsx'; /* Metro dependency 12116 */
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 ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as NativeModule from '../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as PressablesModule from '../../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as InstantInviteUtilsModule from '../../../instant_invite/native/InstantInviteUtils.tsx'; /* Metro dependency 9151 */
import * as CallStateHooksModule from '../CallStateHooks.tsx'; /* Metro dependency 12115 */
function _fun92998(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#92998, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12300:6, offset: 0x020a2275, size: 465 bytes, params: 8, frame: 23
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const embeddedActivitiesStore = importDefault(1378) /* metro dependency 1378: EmbeddedActivitiesStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
let value = require(661) /* metro dependency 661: Constants */;
ReactModule;
let value = ConstantsModule;
const env0_7 = value.Permissions;
const env0_8 = value.AnalyticsPages;
const env0_9 = value.InstantInviteSources;
@@ -18,146 +30,160 @@ function _fun92998(global, require, importDefault, importAll, module, exports, d
const env0_11 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {container: {'alignSelf': 'stretch', 'flexDirection': 'row', 'paddingVertical': 10,
object = {container: {'alignSelf': 'stretch', 'flexDirection': 'row', 'paddingVertical': 10,
'paddingHorizontal': 16, 'alignItems': 'center'}, middle: {'flex': 1, 'justifyContent': 'space-around',
'marginHorizontal': 16}};
let WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
object2.icons = {flexDirection: 'row', tintColor: WHITE};
object.icons = {flexDirection: 'row', tintColor: WHITE};
WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
object2.subtitle = {'fontSize': 12, 'lineHeight': 16, color: WHITE};
object2.subtitleWrapper = {flexDirection: 'row'};
const env0_12 = Reflect.apply(createStyles, value, [object2]);
const closure = VoiceChannelHeader;
const closure2 = IconButton;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_calls/native/action_sheet/VoiceChannelHeader.tsx');
exports.default = closure;
exports.VoiceChannelHeader = closure;
exports.IconButton = closure2;
}
function PrivateChannelSubtitle({channel}) { // fn#92999, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12300:634, offset: 0x020a2446, size: 334 bytes, params: 2, frame: 24
var r5;
var value;
const styles = useStyles();
const state = (importDefault(12115) /* metro dependency 12115: CallStateHooks */)(channel.id).state;
const items2 = [((Component) => <Component useAllAloneText={false} channel={channel} voiceState={state} style={styles.subtitle} />)(importDefault(12116) /* metro dependency 12116: OngoingCallStatusLabel */)];
const CallStates = (require(12115) /* metro dependency 12115: CallStateHooks */).CallStates;
let CONNECTED = CallStates.CONNECTED;
items2[1] = state === CONNECTED && ((Text) => <Text style={styles.subtitle} variant="text-xs/medium" color="always-white">{' - '}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
CONNECTED = CallStates.CONNECTED;
const value5 = state === CONNECTED;
if (value5) {
value = importDefault(12117) /* metro dependency 12117: OngoingCallTimer */;
value = ((Component) => <Component channelId={channel.id} style={styles.subtitle} />)(value);
r5 = value;
} else {
r5 = value5;
}
items2[2] = r5;
return (
<View style={styles.subtitleWrapper}>
{items2}
</View>
);
}
function VoiceChannelHeader({channel}) { // fn#93000, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12300:1035, offset: 0x020a2594, size: 773 bytes, params: 2, frame: 30
var r12;
var r17;
var r18;
var intl;
var value6;
var privateChannelSubtitle;
const styles = useStyles();
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
return GuildStore.getGuild(channel.getGuildId());
});
const value3 = (importDefault(10785) /* metro dependency 10785: useIsVoiceChannelFull */)(channel);
const env0_1 = (require(566) /* metro dependency 566: flux */).useStateFromStores([EmbeddedActivitiesStore],
function() {
return EmbeddedActivitiesStore.getSelfEmbeddedActivityForChannel(channel.id);
}, [channel]);
const value4 = (importDefault(4805) /* metro dependency 4805: useChannelName */)(channel);
const name = guild?.name;
const can = PermissionStore.can;
const CREATE_INSTANT_INVITE = Permissions.CREATE_INSTANT_INVITE;
if (Reflect.apply(can, PermissionStore, [CREATE_INSTANT_INVITE, channel])) {
if (value3) {
r12 = null;
object.subtitle = {'fontSize': 12, 'lineHeight': 16, color: WHITE};
object.subtitleWrapper = {flexDirection: 'row'};
const env0_12 = Reflect.apply(createStyles, value, [object]);
const VoiceChannelHeader2 = VoiceChannelHeader;
const IconButton2 = IconButton;
(FileImportTrackerModule).fileFinishedImporting('modules/voice_calls/native/action_sheet/VoiceChannelHeader.tsx');
exports.default = VoiceChannelHeader2;
exports.VoiceChannelHeader = VoiceChannelHeader2;
exports.IconButton = IconButton2;
function PrivateChannelSubtitle({channel}) { // fn#92999, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12300:634, offset: 0x020a2446, size: 334 bytes, params: 2, frame: 24
var r5;
var value;
const styles = useStyles();
const state = (CallStateHooks)(channel.id).state;
const items2 = [
((Component) => <Component useAllAloneText={false} channel={channel} voiceState={state} style={styles.subtitle} />)(OngoingCallStatusLabel),
];
const CallStates = (CallStateHooksModule).CallStates;
let CONNECTED = CallStates.CONNECTED;
items2[1] = state === CONNECTED && ((Text) => <Text style={styles.subtitle} variant="text-xs/medium" color="always-white">{' - '}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
CONNECTED = CallStates.CONNECTED;
const value5 = state === CONNECTED;
if (value5) {
value = importDefault(12117) /* metro dependency 12117: OngoingCallTimer */;
value = ((Component) => <Component channelId={channel.id} style={styles.subtitle} />)(value);
r5 = value;
} else {
r12 = _fun93003;
r5 = value5;
}
} else {
r12 = null;
}
if (channel.isPrivate()) {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
value6 = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['8bn8Br'],
{count: channel.recipients.length + 1});
privateChannelSubtitle = <PrivateChannelSubtitle channel={channel} />;
r12 = function() {
return require(dependencyMap[18]).navigateToNewGroupDM(channel.id, AnalyticsPages.CHANNEL_CALL);
};
r17 = privateChannelSubtitle;
r18 = value6;
} else {
r17 = name;
r18 = value4;
}
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
const Icon2 = (require(1305) /* metro dependency 1305: native */).Icon;
const Sizes = Icon2.Sizes;
const MEDIUM = Sizes.MEDIUM;
return (
<View style={styles.container}>
<Icon
size={MEDIUM}
source={(importDefault(5107) /* metro dependency 5107: isRoleRequired */)(channel) ? importDefault(12119) /* metro dependency 12119 */ : importDefault(9803) /* metro dependency 9803 */}
disableColor
style={styles.icons}
/>
<View style={styles.middle}>
{typeof r18 !== 'string' ? r18 : ((Text) => <Text lineClamp={1} lineBreakMode="tail" variant="text-md/semibold" color="always-white">{r18}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}
{typeof r17 !== 'string' ? r17 : ((Text) => <Text lineClamp={1} lineBreakMode="tail" variant="text-xs/medium" color="always-white">{r17}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}
items2[2] = r5;
return (
<View style={styles.subtitleWrapper}>
{items2}
</View>
<View style={styles.icons}>
{r12 != null && <AddMemberButton onPress={r12} />}
);
}
function VoiceChannelHeader({channel}) { // fn#93000, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12300:1035, offset: 0x020a2594, size: 773 bytes, params: 2, frame: 30
var r12;
var r17;
var r18;
var intl;
var value6;
var privateChannelSubtitle;
const styles = useStyles();
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
return GuildStore.getGuild(channel.getGuildId());
});
const value3 = (UseIsVoiceChannelFull)(channel);
const env0_1 = (require(566) /* metro dependency 566: flux */).useStateFromStores([EmbeddedActivitiesStore],
function() {
return EmbeddedActivitiesStore.getSelfEmbeddedActivityForChannel(channel.id);
}, [channel]);
const value4 = (UseChannelName)(channel);
const name = guild?.name;
const permissionStoreBinding = PermissionStore;
const can = permissionStoreBinding.can;
const CREATE_INSTANT_INVITE = Permissions.CREATE_INSTANT_INVITE;
if (Reflect.apply(can, permissionStoreBinding, [CREATE_INSTANT_INVITE, channel])) {
if (value3) {
r12 = null;
} else {
r12 = _fun93003;
}
} else {
r12 = null;
}
if (channel.isPrivate()) {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
value6 = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['8bn8Br'],
{count: channel.recipients.length + 1});
privateChannelSubtitle = <PrivateChannelSubtitle channel={channel} />;
r12 = function() {
return require(dependencyMap[18]).navigateToNewGroupDM(channel.id, AnalyticsPages.CHANNEL_CALL);
};
r17 = privateChannelSubtitle;
r18 = value6;
} else {
r17 = name;
r18 = value4;
}
const Icon = (NativeModule).Icon;
const Icon2 = (NativeModule).Icon;
const Sizes = Icon2.Sizes;
const MEDIUM = Sizes.MEDIUM;
return (
<View style={styles.container}>
<Icon
size={MEDIUM}
source={(importDefault(5107) /* metro dependency 5107: isRoleRequired */)(channel) ? importDefault(12119) /* metro dependency 12119 */ : importDefault(9803) /* metro dependency 9803 */}
disableColor
style={styles.icons}
/>
<View style={styles.middle}>
{
typeof r18 !== 'string'
? r18
: ((Text) => <Text lineClamp={1} lineBreakMode="tail" variant="text-md/semibold" color="always-white">{r18}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)
}
{
typeof r17 !== 'string'
? r17
: ((Text) => <Text lineClamp={1} lineBreakMode="tail" variant="text-xs/medium" color="always-white">{r17}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)
}
</View>
<View style={styles.icons}>
{r12 != null && <AddMemberButton onPress={r12} />}
</View>
</View>
</View>
);
}
);
function _fun93003() { // fn#93003, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12300:1307, offset: 0x020a28de, size: 89 bytes, params: 1, frame: 17
const value2 = undefined;
const showInstantInviteActionSheet = InstantInviteUtilsModule.showInstantInviteActionSheet;
const channelBinding = channel;
const VOICE_CHANNEL = InstantInviteSources.VOICE_CHANNEL;
return Reflect.apply(showInstantInviteActionSheet, InstantInviteUtilsModule, [channelBinding,
{source: VOICE_CHANNEL, targetApplicationId: env0_1 == null ? value2 : env0_1.applicationId}]);
}
function AddMemberButton({onPress}) { // fn#93005, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12300:2178, offset: 0x020a2974, size: 134 bytes, params: 2, frame: 18
const styles = useStyles();
const iconButtonProps = {onPress: onPress, iconSource: importDefault(10858) /* metro dependency 10858 */,
iconStyle: styles.icons};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
iconButtonProps.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['6Qgrev']);
return <IconButton {...iconButtonProps} />;
}
}
function IconButton({onPress, iconStyle, iconSource, accessibilityLabel, style}) { // fn#93006, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12300:2349, offset: 0x020a29fa, size: 132 bytes, params: 2, frame: 21
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
return (
<PressableOpacity
accessibilityRole="button"
accessibilityLabel={accessibilityLabel}
onPress={onPress}
style={style}
>
<Icon source={iconSource} style={iconStyle} />
</PressableOpacity>
);
}
function AddMemberButton({onPress}) { // fn#93005, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12300:2178, offset: 0x020a2974, size: 134 bytes, params: 2, frame: 18
const styles = useStyles();
const iconButtonProps = {onPress: onPress, iconSource: Module10858,
iconStyle: styles.icons};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
iconButtonProps.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['6Qgrev']);
return <IconButton {...iconButtonProps} />;
}
function IconButton({onPress, iconStyle, iconSource, accessibilityLabel, style}) { // fn#93006, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12300:2349, offset: 0x020a29fa, size: 132 bytes, params: 2, frame: 21
const PressableOpacity = (PressablesModule).PressableOpacity;
const Icon = (NativeModule).Icon;
return (
<PressableOpacity
accessibilityRole="button"
accessibilityLabel={accessibilityLabel}
onPress={onPress}
style={style}
>
<Icon source={iconSource} style={iconStyle} />
</PressableOpacity>
);
}
function _fun93003() { // fn#93003, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12300:1307, offset: 0x020a28de, size: 89 bytes, params: 1, frame: 17
const value2 = undefined;
const instantInviteUtilsModule = require(9151) /* metro dependency 9151: InstantInviteUtils */;
const showInstantInviteActionSheet = instantInviteUtilsModule.showInstantInviteActionSheet;
const channelBinding = channel;
const VOICE_CHANNEL = InstantInviteSources.VOICE_CHANNEL;
return Reflect.apply(showInstantInviteActionSheet, instantInviteUtilsModule, [channelBinding,
{source: VOICE_CHANNEL, targetApplicationId: env0_1 == null ? value2 : env0_1.applicationId}]);
}
global.__d(_fun92998, 12114, [31, 27, 1378, 1867, 3784, 661, 33, 4501, 697, 12115, 12116, 4573, 12117, 566, 10785,
4805, 9151, 1244, 4007, 1305, 5107, 12119, 9803, 10858, 5278,
2]) /* metro module 12114, dependencies: [31, 27, 1378, 1867, 3784, 661, 33, 4501, 697, 12115, 12116, 4573, 12117, 566, 10785, 4805, 9151, 1244, 4007, 1305, 5107, 12119, 9803, 10858, 5278, 2] */;
@@ -1,61 +1,72 @@
/* Metro module 12100; source: modules/voice_calls/native/action_sheet/VoiceEmptyState.tsx; dependencies: [31, 27, 661, 33, 4501, 6597, 697, 1585, 1305, 1244, 12101, 12102, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UseSafeAreaInsetsNative from '../../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import TextStyles from '../../../rebrand/native/TextStyles.tsx'; /* Metro dependency 6597 */
import Module12101 from '../../../../by-id/module-12101.js'; /* Metro dependency 12101 */
import JoinVoiceChannelButton from './JoinVoiceChannelButton.tsx'; /* Metro dependency 12102 */
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 ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as NativeModule from '../../../../design/void/native.tsx'; /* Metro dependency 1305 */
function _fun92919(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#92919, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12286:6, offset: 0x0209e394, size: 419 bytes, params: 8, frame: 29
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const Fonts = (require(661) /* metro dependency 661: Constants */).Fonts;
let value = require(33) /* metro dependency 33 */;
ReactModule;
const Fonts = (ConstantsModule).Fonts;
let value = JsxRuntimeModule;
const env0_4 = value.jsx;
const env0_5 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object2.container = {justifyContent: 'center'};
object2.button = {'paddingHorizontal': 12, 'paddingTop': 16};
const object5 = {};
const textStyles = importDefault(6597) /* metro dependency 6597: TextStyles */;
object = {};
object.container = {justifyContent: 'center'};
object.button = {'paddingHorizontal': 12, 'paddingTop': 16};
const object3 = {};
const DISPLAY_EXTRABOLD = Fonts.DISPLAY_EXTRABOLD;
const MOBILE_TEXT_HEADING_PRIMARY = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_TEXT_HEADING_PRIMARY;
copyDataProperties(object5, textStyles(DISPLAY_EXTRABOLD, MOBILE_TEXT_HEADING_PRIMARY, 18), undefined);
object5['textTransform'] = 'none';
object5['lineHeight'] = 24;
object2.emptyTitle = object5;
const object6 = {};
const value3 = textStyles;
const MOBILE_TEXT_HEADING_PRIMARY = (Native).colors.MOBILE_TEXT_HEADING_PRIMARY;
copyDataProperties(object3, TextStyles(DISPLAY_EXTRABOLD, MOBILE_TEXT_HEADING_PRIMARY, 18), undefined);
object3['textTransform'] = 'none';
object3['lineHeight'] = 24;
object.emptyTitle = object3;
const object4 = {};
const PRIMARY_MEDIUM = Fonts.PRIMARY_MEDIUM;
const TEXT_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_SUBTLE;
copyDataProperties(object6, value3(PRIMARY_MEDIUM, TEXT_SUBTLE, 16), undefined);
object6['lineHeight'] = 20;
object6['fontWeight'] = '600';
object2.emptyBody = object6;
const env0_6 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_calls/native/action_sheet/VoiceEmptyState.tsx');
const TEXT_SUBTLE = (Native).colors.TEXT_SUBTLE;
copyDataProperties(object4, TextStyles(PRIMARY_MEDIUM, TEXT_SUBTLE, 16), undefined);
object4['lineHeight'] = 20;
object4['fontWeight'] = '600';
object.emptyBody = object4;
const env0_6 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/voice_calls/native/action_sheet/VoiceEmptyState.tsx');
exports.default = _default_92920;
function _default_92920({channel}) { // fn#92920, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12286:505, offset: 0x0209e537, size: 355 bytes, params: 2, frame: 25
const styles = useStyles();
const bottom = (UseSafeAreaInsetsNative)().bottom;
const items2 = [styles.container];
items2[1] = {paddingBottom: bottom};
const ThemedEmptyState = (NativeModule).ThemedEmptyState;
const intl = (IndexNativeModule).intl;
return (
<View style={items2}>
<ThemedEmptyState
title={intl.string((IndexNativeModule).t['/HABZo'])}
body={intl.string((IndexNativeModule).t['5Jy2FY'])}
lightSource={Module12101}
darkSource={Module12101}
titleStyle={styles.emptyTitle}
bodyStyle={styles.emptyBody}
imageStyle={{'marginBottom': 16, 'marginTop': 20}}
/>
{((Component) => <Component channel={channel} style={styles.button} />)(JoinVoiceChannelButton)}
</View>
);
}
}
function _default_92920({channel}) { // fn#92920, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12286:505, offset: 0x0209e537, size: 355 bytes, params: 2, frame: 25
const styles = useStyles();
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
const items2 = [styles.container];
items2[1] = {paddingBottom: bottom};
const ThemedEmptyState = (require(1305) /* metro dependency 1305: native */).ThemedEmptyState;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<View style={items2}>
<ThemedEmptyState
title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['/HABZo'])}
body={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5Jy2FY'])}
lightSource={importDefault(12101) /* metro dependency 12101 */}
darkSource={importDefault(12101) /* metro dependency 12101 */}
titleStyle={styles.emptyTitle}
bodyStyle={styles.emptyBody}
imageStyle={{'marginBottom': 16, 'marginTop': 20}}
/>
{((Component) => <Component channel={channel} style={styles.button} />)(importDefault(12102) /* metro dependency 12102: JoinVoiceChannelButton */)}
</View>
);
}
global.__d(_fun92919, 12100, [31, 27, 661, 33, 4501, 6597, 697, 1585, 1305, 1244, 12101, 12102,
2]) /* metro module 12100, dependencies: [31, 27, 661, 33, 4501, 6597, 697, 1585, 1305, 1244, 12101, 12102, 2] */;
@@ -1,147 +1,155 @@
/* Metro module 15705; source: modules/voice_calls/native/action_sheet/VoiceFeedbackActionSheet.tsx; dependencies: [31, 661, 9906, 33, 683, 1244, 2454, 9909, 15699, 15706, 15700, 4080, 15701, 1962, 3856, 2] */
import FeedbackActionSheetV2 from '../../../feedback/native/FeedbackActionSheetV2.tsx'; /* Metro dependency 15699 */
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 JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as ConstantsModule2 from '../../../feedback/Constants.tsx'; /* Metro dependency 9906 */
function _fun120536(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#120536, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15913:6, offset: 0x0252e9ba, size: 243 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
const constantsModule = require(9906) /* metro dependency 9906: Constants */;
ReactModule;
const constantsModule = ConstantsModule2;
const env0_4 = constantsModule.AudioFeedbackOption;
const env0_5 = constantsModule.ConnectionFeedbackOption;
const env0_6 = constantsModule.FeedbackCategory;
const env0_7 = constantsModule.FeedbackType;
const env0_8 = constantsModule.PeopleFeedbackOption;
const env0_9 = constantsModule.VideoFeedbackOption;
const env0_10 = (require(33) /* metro dependency 33 */).jsx;
const trackOpen_120537 = function() {
var defaultImport = importDefault(dependencyMap[4]);
var OPEN_POPOUT = AnalyticEvents.OPEN_POPOUT;
defaultImport.track(OPEN_POPOUT, {type: 'Call Session Feedback'});
};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_calls/native/action_sheet/VoiceFeedbackActionSheet.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_calls/native/action_sheet/VoiceFeedbackActionSheet.tsx');
exports.default = VoiceFeedbackActionSheet;
}
function VoiceFeedbackActionSheet({analyticsData}) { // fn#120538, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15913:482, offset: 0x0252eae9, size: 1074 bytes, params: 2, frame: 29
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const Ss6tlb = (require(1244) /* metro dependency 1244: indexNative */).t.Ss6tlb;
const value2 = Reflect.apply(string, intl, [Ss6tlb]);
const value3 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.tLi4cR);
const object4 = {};
const CONNECTION = FeedbackCategory.CONNECTION;
object4.value = CONNECTION;
string = intl.string;
const FVhMw6 = (importDefault(2454) /* metro dependency 2454: FeedbackMessages */).FVhMw6;
object4.label = Reflect.apply(string, intl, [FVhMw6]);
string = intl.string;
let FJmoxF = (require(1244) /* metro dependency 1244: indexNative */).t.FJmoxF;
object4.problemsHeader = Reflect.apply(string, intl, [FJmoxF]);
object4.problemOptions = (require(9909) /* metro dependency 9909: FeedbackUtils */).getConnectionFeedbackOptions();
const object10 = {};
let FREEFORM = ConnectionFeedbackOption.FREEFORM;
object10.value = FREEFORM;
object10.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.emlT91);
object4.freeformConfig = object10;
const object11 = {};
const AUDIO = FeedbackCategory.AUDIO;
object11.value = AUDIO;
string = intl.string;
const PL2l6A = (importDefault(2454) /* metro dependency 2454: FeedbackMessages */).PL2l6A;
object11.label = Reflect.apply(string, intl, [PL2l6A]);
string = intl.string;
FJmoxF = (require(1244) /* metro dependency 1244: indexNative */).t.FJmoxF;
object11.problemsHeader = Reflect.apply(string, intl, [FJmoxF]);
object11.problemOptions = (require(9909) /* metro dependency 9909: FeedbackUtils */).getAudioFeedbackOptions({isMobile: true});
const object12 = {};
FREEFORM = AudioFeedbackOption.FREEFORM;
object12.value = FREEFORM;
object12.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.emlT91);
object11.freeformConfig = object12;
const object13 = {};
const VIDEO = FeedbackCategory.VIDEO;
object13.value = VIDEO;
object13.label = (require(1244) /* metro dependency 1244: indexNative */).intl.string((importDefault(2454) /* metro dependency 2454: FeedbackMessages */)['0WFzPh']);
string = intl.string;
FJmoxF = (require(1244) /* metro dependency 1244: indexNative */).t.FJmoxF;
object13.problemsHeader = Reflect.apply(string, intl, [FJmoxF]);
object13.problemOptions = (require(9909) /* metro dependency 9909: FeedbackUtils */).getVideoFeedbackOptions();
const object14 = {};
FREEFORM = VideoFeedbackOption.FREEFORM;
object14.value = FREEFORM;
object14.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.emlT91);
object13.freeformConfig = object14;
const object15 = {};
const PEOPLE = FeedbackCategory.PEOPLE;
object15.value = PEOPLE;
string = intl.string;
const Moa3W9 = (importDefault(2454) /* metro dependency 2454: FeedbackMessages */).Moa3W9;
object15.label = Reflect.apply(string, intl, [Moa3W9]);
string = intl.string;
FJmoxF = (require(1244) /* metro dependency 1244: indexNative */).t.FJmoxF;
object15.problemsHeader = Reflect.apply(string, intl, [FJmoxF]);
object15.problemOptions = (require(9909) /* metro dependency 9909: FeedbackUtils */).getPeopleFeedbackOptions();
const object16 = {};
FREEFORM = PeopleFeedbackOption.FREEFORM;
object16.value = FREEFORM;
object16.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.emlT91);
object15.freeformConfig = object16;
return ((Component) => <Component headerLabel={value2} showHeaderCloseButton ratingBody={value3} categoriesHeader={intl.string((importDefault(2454) /* metro dependency 2454: FeedbackMessages */).tq8598)} optionsTree={[object4,
object11, object13,
object15]} trackOpen={trackOpen_120537} trackReport={trackReport} />)(importDefault(15699) /* metro dependency 15699: FeedbackActionSheetV2 */);
}
function VoiceFeedbackActionSheetTrackReport({rating, category, reason, dontShowAgain, feedback}) { // fn#120539, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15913:1784, owner: VoiceFeedbackActionSheet.trackReport, offset: 0x0252ef1b, size: 428 bytes, params: 2, frame: 23
var r11;
var r0;
var variant;
var value;
var object2;
var value2;
var value3;
var defaultImport;
var CALL_REPORT_PROBLEM;
var analyticsDataBinding;
var openLazy;
var value7;
if (dontShowAgain) {
value = environment.__proto__;
require(dependencyMap[7]).processOptOut({feedbackType: FeedbackType.VOICE,
location: 'VoiceFeedbackActionSheet'});
}
value = null;
if (value != rating) {
value2 = environment.__proto__;
value3 = undefined;
defaultImport = importDefault(dependencyMap[9]);
CALL_REPORT_PROBLEM = AnalyticEvents.CALL_REPORT_PROBLEM;
object2 = {rating: rating, category: category};
r11 = value == reason ? value3 : reason.value;
r0 = value != r11 ? r11 : value;
object2.reasonDescription = r0;
variant = value == reason ? value3 : reason.variant;
r0 = value != variant ? variant : value;
object2.variant = r0;
r0 = value != feedback ? feedback : '';
object2.feedback = r0;
object2.analyticsData = analyticsData;
defaultImport(CALL_REPORT_PROBLEM, object2);
if (value == reason) {
require(dependencyMap[14]).presentFeedbackSent();
} else {
value = require(dependencyMap[10]);
if (value.shouldShowLogUploadForCategory(rating, category, reason)) {
value = importDefault(dependencyMap[11]);
openLazy = value.openLazy;
value7 = require(dependencyMap[13])(dependencyMap[12], dependencyMap.paths);
analyticsDataBinding = analyticsData;
Reflect.apply(openLazy, value, [value7, 'UploadLogs',
{mediaSessionId: analyticsDataBinding.media_session_id,
rtcConnectionId: analyticsDataBinding.rtc_connection_id}]);
} else {
require(dependencyMap[14]).presentFeedbackSent();
function VoiceFeedbackActionSheet({analyticsData}) { // fn#120538, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15913:482, offset: 0x0252eae9, size: 1074 bytes, params: 2, frame: 29
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const Ss6tlb = (require(1244) /* metro dependency 1244: indexNative */).t.Ss6tlb;
const value2 = Reflect.apply(string, intl, [Ss6tlb]);
const value3 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.tLi4cR);
const object = {};
const CONNECTION = FeedbackCategory.CONNECTION;
object.value = CONNECTION;
string = intl.string;
const FVhMw6 = (importDefault(2454) /* metro dependency 2454: FeedbackMessages */).FVhMw6;
object.label = Reflect.apply(string, intl, [FVhMw6]);
string = intl.string;
let FJmoxF = (require(1244) /* metro dependency 1244: indexNative */).t.FJmoxF;
object.problemsHeader = Reflect.apply(string, intl, [FJmoxF]);
object.problemOptions = (require(9909) /* metro dependency 9909: FeedbackUtils */).getConnectionFeedbackOptions();
const object2 = {};
let FREEFORM = ConnectionFeedbackOption.FREEFORM;
object2.value = FREEFORM;
object2.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.emlT91);
object.freeformConfig = object2;
const object3 = {};
const AUDIO = FeedbackCategory.AUDIO;
object3.value = AUDIO;
string = intl.string;
const PL2l6A = (importDefault(2454) /* metro dependency 2454: FeedbackMessages */).PL2l6A;
object3.label = Reflect.apply(string, intl, [PL2l6A]);
string = intl.string;
FJmoxF = (require(1244) /* metro dependency 1244: indexNative */).t.FJmoxF;
object3.problemsHeader = Reflect.apply(string, intl, [FJmoxF]);
object3.problemOptions = (require(9909) /* metro dependency 9909: FeedbackUtils */).getAudioFeedbackOptions({isMobile: true});
const object5 = {};
FREEFORM = AudioFeedbackOption.FREEFORM;
object5.value = FREEFORM;
object5.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.emlT91);
object3.freeformConfig = object5;
const object6 = {};
const VIDEO = FeedbackCategory.VIDEO;
object6.value = VIDEO;
object6.label = (require(1244) /* metro dependency 1244: indexNative */).intl.string((importDefault(2454) /* metro dependency 2454: FeedbackMessages */)['0WFzPh']);
string = intl.string;
FJmoxF = (require(1244) /* metro dependency 1244: indexNative */).t.FJmoxF;
object6.problemsHeader = Reflect.apply(string, intl, [FJmoxF]);
object6.problemOptions = (require(9909) /* metro dependency 9909: FeedbackUtils */).getVideoFeedbackOptions();
const object7 = {};
FREEFORM = VideoFeedbackOption.FREEFORM;
object7.value = FREEFORM;
object7.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.emlT91);
object6.freeformConfig = object7;
const object8 = {};
const PEOPLE = FeedbackCategory.PEOPLE;
object8.value = PEOPLE;
string = intl.string;
const Moa3W9 = (importDefault(2454) /* metro dependency 2454: FeedbackMessages */).Moa3W9;
object8.label = Reflect.apply(string, intl, [Moa3W9]);
string = intl.string;
FJmoxF = (require(1244) /* metro dependency 1244: indexNative */).t.FJmoxF;
object8.problemsHeader = Reflect.apply(string, intl, [FJmoxF]);
object8.problemOptions = (require(9909) /* metro dependency 9909: FeedbackUtils */).getPeopleFeedbackOptions();
const object9 = {};
FREEFORM = PeopleFeedbackOption.FREEFORM;
object9.value = FREEFORM;
object9.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.emlT91);
object8.freeformConfig = object9;
return ((Component) => <Component headerLabel={value2} showHeaderCloseButton ratingBody={value3} categoriesHeader={intl.string((importDefault(2454) /* metro dependency 2454: FeedbackMessages */).tq8598)} optionsTree={[object,
object3, object6,
object8]} trackOpen={trackOpen_120537} trackReport={trackReport_120539} />)(FeedbackActionSheetV2);
function VoiceFeedbackActionSheetTrackReport({rating, category, reason, dontShowAgain, feedback}) { // fn#120539, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15913:1784, owner: VoiceFeedbackActionSheet.trackReport, offset: 0x0252ef1b, size: 428 bytes, params: 2, frame: 23
var r11;
var r0;
var variant;
var value;
var object;
var value2;
var value3;
var defaultImport;
var CALL_REPORT_PROBLEM;
var analyticsDataBinding;
var openLazy;
var value7;
if (dontShowAgain) {
value = environment.__proto__;
require(dependencyMap[7]).processOptOut({feedbackType: FeedbackType.VOICE,
location: 'VoiceFeedbackActionSheet'});
}
value = null;
if (value != rating) {
value2 = environment.__proto__;
value3 = undefined;
defaultImport = importDefault(dependencyMap[9]);
CALL_REPORT_PROBLEM = AnalyticEvents.CALL_REPORT_PROBLEM;
object = {rating: rating, category: category};
r11 = value == reason ? value3 : reason.value;
r0 = value != r11 ? r11 : value;
object.reasonDescription = r0;
variant = value == reason ? value3 : reason.variant;
r0 = value != variant ? variant : value;
object.variant = r0;
r0 = value != feedback ? feedback : '';
object.feedback = r0;
object.analyticsData = analyticsData;
defaultImport(CALL_REPORT_PROBLEM, object);
if (value == reason) {
require(dependencyMap[14]).presentFeedbackSent();
} else {
value = require(dependencyMap[10]);
if (value.shouldShowLogUploadForCategory(rating, category, reason)) {
value = importDefault(dependencyMap[11]);
openLazy = value.openLazy;
value7 = require(dependencyMap[13])(dependencyMap[12], dependencyMap.paths);
analyticsDataBinding = analyticsData;
Reflect.apply(openLazy, value, [value7, 'UploadLogs',
{mediaSessionId: analyticsDataBinding.media_session_id,
rtcConnectionId: analyticsDataBinding.rtc_connection_id}]);
} else {
require(dependencyMap[14]).presentFeedbackSent();
}
}
}
}
}
}
global.__d(_fun120536, 15705, [31, 661, 9906, 33, 683, 1244, 2454, 9909, 15699, 15706, 15700, 4080, 15701, 1962,
3856,
2]) /* metro module 15705, dependencies: [31, 661, 9906, 33, 683, 1244, 2454, 9909, 15699, 15706, 15700, 4080, 15701, 1962, 3856, 2] */;
@@ -1,202 +1,257 @@
/* Metro module 12105; source: modules/voice_calls/native/action_sheet/VoiceMemberEmbeddedActivity.tsx; dependencies: [57, 31, 27, 1378, 1379, 1878, 1309, 6276, 33, 1305, 4501, 697, 6777, 1360, 566, 3774, 8107, 1478, 8379, 8106, 5278, 1244, 4573, 10717, 4579, 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 EmbeddedActivitiesStore from '../../../activities/EmbeddedActivitiesStore.tsx'; /* Metro dependency 1378 */
import ChannelStore from '../../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import UseWindowDimensionsNative from '../../../screen/useWindowDimensions.native.tsx'; /* Metro dependency 1478 */
import UserStore from '../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import UseGetOrFetchApplications from '../../../applications/useGetOrFetchApplications.tsx'; /* Metro dependency 6777 */
import HandlePressJoinActivity from '../../../activities/handlePressJoinActivity.tsx'; /* Metro dependency 8106 */
import EmbeddedActivityBackgroundImageWithOverlay from '../../../activities/native/EmbeddedActivityBackgroundImageWithOverlay.tsx'; /* Metro dependency 10717 */
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 NativeModule from '../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as FormConstantsModule from '../../../../design/void/Form/native/FormConstants.tsx'; /* Metro dependency 1309 */
import * as EmbeddedActivityLocationUtilsModule from '../../../activities/utils/embeddedActivityLocationUtils.tsx'; /* Metro dependency 3774 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as PressablesModule from '../../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as ActionSheetConstantsModule from '../../../action_sheet/native/ActionSheetConstants.tsx'; /* Metro dependency 6276 */
function _fun92958(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#92958, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12291:6, offset: 0x020a0132, size: 701 bytes, params: 8, frame: 27
var object4;
const env0_0 = require;
const closure = function(a0) {
return 40 + calculateActivityPreviewImageDimensions(a0).height + 12 + 16;
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
ReactModule;
let value = ReactNativeModule;
const env0_4 = value.Image;
const env0_5 = value.View;
const embeddedActivitiesStore = importDefault(1378) /* metro dependency 1378: EmbeddedActivitiesStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const getThemedRippleConfig = (require(1309) /* metro dependency 1309: FormConstants */).getThemedRippleConfig;
const env0_9 = (require(6276) /* metro dependency 6276: ActionSheetConstants */).ACTION_SHEET_MAX_WIDTH;
const getThemedRippleConfig = (FormConstantsModule).getThemedRippleConfig;
value = require(33) /* metro dependency 33 */;
const env0_10 = value.jsx;
const env0_11 = value.jsxs;
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
const AvatarSizes = (NativeModule).AvatarSizes;
const XSMALL = AvatarSizes.XSMALL;
const env0_13 = getThemedRippleConfig({foreground: true});
object4 = {'width': 32, 'height': 32, 'marginRight': 16, 'borderRadius': 4};
object = {'width': 32, 'height': 32, 'marginRight': 16, 'borderRadius': 4};
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const object5 = {voiceMemberItemRow: {'paddingTop': 12, 'paddingBottom': 16, 'flexDirection': 'column',
const object2 = {voiceMemberItemRow: {'paddingTop': 12, 'paddingBottom': 16, 'flexDirection': 'column',
'display': 'flex', 'justifyContent': 'flex-start'}, innerRow: {'paddingHorizontal': 16, 'alignItems': 'center'},
activityDetails: {'marginBottom': 8, 'flexDirection': 'row', 'display': 'flex'}, appIcon: object4};
const object6 = {};
copyDataProperties(object6, object4, undefined);
const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
object6['tintColor'] = INTERACTIVE_TEXT_DEFAULT;
object5.appIconPlaceholder = object6;
object5.centerGroup = {'flex': 1, 'paddingRight': 4};
object5.applicationName = {lineHeight: 20};
object5.joinButton = {alignSelf: 'center'};
object5.joinButtonPill = {'borderRadius': 100, 'paddingHorizontal': 24};
object5.joinButtonContainer = {'alignItems': 'center', 'justifyContent': 'center', 'display': 'flex',
activityDetails: {'marginBottom': 8, 'flexDirection': 'row', 'display': 'flex'}, appIcon: object};
const object3 = {};
copyDataProperties(object3, object, undefined);
const INTERACTIVE_TEXT_DEFAULT = (Native).colors.INTERACTIVE_TEXT_DEFAULT;
object3['tintColor'] = INTERACTIVE_TEXT_DEFAULT;
object2.appIconPlaceholder = object3;
object2.centerGroup = {'flex': 1, 'paddingRight': 4};
object2.applicationName = {lineHeight: 20};
object2.joinButton = {alignSelf: 'center'};
object2.joinButtonPill = {'borderRadius': 100, 'paddingHorizontal': 24};
object2.joinButtonContainer = {'alignItems': 'center', 'justifyContent': 'center', 'display': 'flex',
'width': '100%', 'paddingHorizontal': 16};
const AVATAR_SIZE_MAP = (require(1305) /* metro dependency 1305: native */).AVATAR_SIZE_MAP;
object5.overflow = {height: AVATAR_SIZE_MAP[XSMALL]};
const BACKGROUND_MOD_NORMAL = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_NORMAL;
object5.overflowBackgroundColor = {backgroundColor: BACKGROUND_MOD_NORMAL};
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object5.overflowBackgroundColorActionSheet = {backgroundColor: BACKGROUND_BASE_LOWEST};
const env0_15 = Reflect.apply(createStyles, value, [object5]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_calls/native/action_sheet/VoiceMemberEmbeddedActivity.tsx');
const AVATAR_SIZE_MAP = (NativeModule).AVATAR_SIZE_MAP;
object2.overflow = {height: AVATAR_SIZE_MAP[XSMALL]};
const BACKGROUND_MOD_NORMAL = (Native).colors.BACKGROUND_MOD_NORMAL;
object2.overflowBackgroundColor = {backgroundColor: BACKGROUND_MOD_NORMAL};
const BACKGROUND_BASE_LOWEST = (Native).colors.BACKGROUND_BASE_LOWEST;
object2.overflowBackgroundColorActionSheet = {backgroundColor: BACKGROUND_BASE_LOWEST};
const env0_15 = Reflect.apply(createStyles, value, [object2]);
(FileImportTrackerModule).fileFinishedImporting('modules/voice_calls/native/action_sheet/VoiceMemberEmbeddedActivity.tsx');
exports.default = VoiceMemberEmbeddedActivity;
exports.calculateActivityRowHeight = closure;
}
function calculateActivityPreviewImageDimensions(a0) { // fn#92959, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12291:319, offset: 0x020a03ef, size: 33 bytes, params: 2, frame: 3
const value = a0 - 32;
return {width: value, height: value / env0_14};
}
function VoiceMemberEmbeddedActivity({embeddedActivity, channelId, onItemPress, isActionSheet}) { // fn#92961, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12291:1547, offset: 0x020a043d, size: 1410 bytes, params: 2, frame: 38
var object2;
var r15;
var BaseTextButton;
let env0_3 = undefined;
const styles = useStyles();
const property = env0_3((importDefault(6777) /* metro dependency 6777: useGetOrFetchApplications */)([embeddedActivity.applicationId]),
1)[0];
const Array = global.Array;
const from = Array.from;
const userIds = embeddedActivity.userIds;
const value7 = Reflect.apply(from, Array, [userIds]).map(function(a0) {
return UserStore.getUser(a0);
}).filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish);
env0_3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channelId);
});
const value8 = (require(566) /* metro dependency 566: flux */).useStateFromStores([EmbeddedActivitiesStore],
_fun92965);
const env0_5 = (require(3774) /* metro dependency 3774: embeddedActivityLocationUtils */).getEmbeddedActivityLocationGuildId(embeddedActivity.location);
const value11 = (require(8107) /* metro dependency 8107: getEmbeddedActivityJoinability */).useEmbeddedActivityJoinability({userId: UserStore.getCurrentUser()?.id,
channelId: channelId, application: property});
const width = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)().width;
const Math = global.Math;
const value12 = Math.min(ACTION_SHEET_MAX_WIDTH, width);
const value13 = calculateActivityRowHeight(value12);
if (property == null) {
return null;
function calculateActivityPreviewImageDimensions(a0) { // fn#92959, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12291:319, offset: 0x020a03ef, size: 33 bytes, params: 2, frame: 3
const value = a0 - 32;
return {width: value, height: value / env0_14};
}
if (value8 == null) {
return null;
}
const r11 = property.getIconSource(32) ?? (importDefault(8379) /* metro dependency 8379 */);
const name = property.name;
const value15 = calculateActivityPreviewImageDimensions(value12);
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
object2 = {accessibilityRole: 'button'};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const formatToPlainString = intl.formatToPlainString;
const Yw5Hr2 = (require(1244) /* metro dependency 1244: indexNative */).t.Yw5Hr2;
object2.accessibilityLabel = Reflect.apply(formatToPlainString, intl, [Yw5Hr2, {applicationName: name}]);
object2.androidRippleConfig = env0_13;
object2.onPress = function() {
onEmbeddedActivityItemPress();
};
const items5 = [styles.voiceMemberItemRow];
items5[1] = {height: value13};
const items2 = [styles.innerRow];
items2[1] = styles.activityDetails;
const items3 = [<Image style={r11 === (importDefault(8379) /* metro dependency 8379 */) ? styles.appIconPlaceholder : styles.appIcon} source={r11} />];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
items3[1] = <View style={styles.centerGroup}><Text style={styles.applicationName} variant="text-md/semibold" color="mobile-text-heading-primary">{name}</Text></View>;
const SummarizedIconRow = (require(1305) /* metro dependency 1305: native */).SummarizedIconRow;
const items4 = [styles.overflow];
items4[1] = isActionSheet ? styles.overflowBackgroundColorActionSheet : styles.overflowBackgroundColor;
const OverflowText = (require(1305) /* metro dependency 1305: native */).OverflowText;
items3[2] = <SummarizedIconRow offsetAmount={-6} overflowStyle={items4} overflowComponent={OverflowText} items={value7} max={5} renderItem={renderItem_92969} />;
const view = <View style={items2}>{items3}</View>;
const items6 = [styles.innerRow];
items6[1] = {height: value15.height, justifyContent: 'center'};
const value18 = ((Component) => <Component application={property} dimensionsStyle={{position: 'absolute',
width: value15.width,
height: value15.height}} borderRadius={8} resizeMode="contain" />)(importDefault(10717) /* metro dependency 10717: EmbeddedActivityBackgroundImageWithOverlay */);
const EmbeddedActivityJoinability = (require(8107) /* metro dependency 8107: getEmbeddedActivityJoinability */).EmbeddedActivityJoinability;
const CAN_JOIN = EmbeddedActivityJoinability.CAN_JOIN;
if (value11 !== CAN_JOIN) {
r15 = null;
} else {
BaseTextButton = (require(4579) /* metro dependency 4579: BaseTextButtonNative */).BaseTextButton;
r15 = <BaseTextButton onPress={function() {
function VoiceMemberEmbeddedActivity({embeddedActivity, channelId, onItemPress, isActionSheet}) { // fn#92961, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12291:1547, offset: 0x020a043d, size: 1410 bytes, params: 2, frame: 38
var r15;
var BaseTextButton;
let env0_3 = undefined;
const styles = useStyles();
const property = env0_3((UseGetOrFetchApplications)([embeddedActivity.applicationId]),
1)[0];
const Array = global.Array;
const from = Array.from;
const userIds = embeddedActivity.userIds;
const value7 = Reflect.apply(from, Array, [userIds]).map(function(a0) {
return UserStore.getUser(a0);
}).filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish);
env0_3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channelId);
});
const value8 = (require(566) /* metro dependency 566: flux */).useStateFromStores([EmbeddedActivitiesStore],
_fun92965);
const env0_5 = (EmbeddedActivityLocationUtilsModule).getEmbeddedActivityLocationGuildId(embeddedActivity.location);
const value11 = (require(8107) /* metro dependency 8107: getEmbeddedActivityJoinability */).useEmbeddedActivityJoinability({userId: UserStore.getCurrentUser()?.id,
channelId: channelId, application: property});
const width = (UseWindowDimensionsNative)().width;
const Math = global.Math;
const value12 = Math.min(ACTION_SHEET_MAX_WIDTH, width);
const value13 = calculateActivityRowHeight(value12);
if (property == null) {
return null;
}
if (value8 == null) {
return null;
}
const r11 = property.getIconSource(32) ?? (importDefault(8379) /* metro dependency 8379 */);
const name = property.name;
const value15 = calculateActivityPreviewImageDimensions(value12);
const PressableOpacity = (PressablesModule).PressableOpacity;
object = {accessibilityRole: 'button'};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const formatToPlainString = intl.formatToPlainString;
const Yw5Hr2 = (require(1244) /* metro dependency 1244: indexNative */).t.Yw5Hr2;
object.accessibilityLabel = Reflect.apply(formatToPlainString, intl, [Yw5Hr2, {applicationName: name}]);
object.androidRippleConfig = env0_13;
object.onPress = function() {
onEmbeddedActivityItemPress();
}} style={styles.joinButton} pillStyle={styles.joinButtonPill} text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['4i2vj+'])} variant="secondary" size="sm" shrink />;
}
return (
<PressableOpacity {...object2}>
<View style={items5}>
{view}
<View style={items6}>
{value18}
<View style={styles.joinButtonContainer}>
{r15}
};
const items5 = [styles.voiceMemberItemRow];
items5[1] = {height: value13};
const items2 = [styles.innerRow];
items2[1] = styles.activityDetails;
const items3 = [
<Image
style={r11 === (importDefault(8379) /* metro dependency 8379 */) ? styles.appIconPlaceholder : styles.appIcon}
source={r11}
/>,
];
const Text = (TextModule).Text;
items3[1] = (
<View style={styles.centerGroup}>
<Text
style={styles.applicationName}
variant="text-md/semibold"
color="mobile-text-heading-primary"
>
{name}
</Text>
</View>
);
const SummarizedIconRow = (NativeModule).SummarizedIconRow;
const items4 = [styles.overflow];
items4[1] = isActionSheet ? styles.overflowBackgroundColorActionSheet : styles.overflowBackgroundColor;
const OverflowText = (NativeModule).OverflowText;
items3[2] = (
<SummarizedIconRow
offsetAmount={-6}
overflowStyle={items4}
overflowComponent={OverflowText}
items={value7}
max={5}
renderItem={renderItem_92969}
/>
);
const view = (
<View style={items2}>
{items3}
</View>
);
const items6 = [styles.innerRow];
items6[1] = {height: value15.height, justifyContent: 'center'};
const value18 = ((Component) => <Component application={property} dimensionsStyle={{position: 'absolute',
width: value15.width,
height: value15.height}} borderRadius={8} resizeMode="contain" />)(EmbeddedActivityBackgroundImageWithOverlay);
const EmbeddedActivityJoinability = (require(8107) /* metro dependency 8107: getEmbeddedActivityJoinability */).EmbeddedActivityJoinability;
const CAN_JOIN = EmbeddedActivityJoinability.CAN_JOIN;
if (value11 !== CAN_JOIN) {
r15 = null;
} else {
BaseTextButton = (require(4579) /* metro dependency 4579: BaseTextButtonNative */).BaseTextButton;
r15 = (
<BaseTextButton
onPress={function() {
onEmbeddedActivityItemPress();
}}
style={styles.joinButton}
pillStyle={styles.joinButtonPill}
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['4i2vj+'])}
variant="secondary"
size="sm"
shrink
/>
);
}
return (
<PressableOpacity {...object}>
<View style={items5}>
{view}
<View style={items6}>
{value18}
<View style={styles.joinButtonContainer}>
{r15}
</View>
</View>
</View>
</View>
</PressableOpacity>
);
}
</PressableOpacity>
);
function VoiceMemberEmbeddedActivityHandleCanJoin() { // fn#92962, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12291:2315, owner: VoiceMemberEmbeddedActivity.handleCanJoin, offset: 0x020a09bf, size: 58 bytes, params: 1, frame: 17
const onItemPressBinding = onItemPress;
const channelBinding = channel;
const value2 = undefined;
onItemPressBinding(channelBinding, env0_2 ?? value2, env0_4 ?? value2);
return value2;
}
function VoiceMemberEmbeddedActivityHandleCanJoin() { // fn#92962, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12291:2315, owner: VoiceMemberEmbeddedActivity.handleCanJoin, offset: 0x020a09bf, size: 58 bytes, params: 1, frame: 17
const onItemPressBinding = onItemPress;
const channelBinding = channel;
const value2 = undefined;
onItemPressBinding(channelBinding, env0_2 ?? value2, env0_4 ?? value2);
return value2;
}
function _fun92965() { // fn#92965, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12291:1873, offset: 0x020a0a10, size: 65 bytes, params: 1, frame: 12
var environment;
var r0;
var value3;
var embeddedActivitiesStoreBinding;
var value;
const channelBinding = channel;
const value2 = null;
if (value2 == channelBinding) {
r0 = value2;
} else {
value3 = environment.__proto__;
embeddedActivitiesStoreBinding = EmbeddedActivitiesStore;
value = embeddedActivitiesStoreBinding.getEmbeddedActivitiesForChannel(channel.id);
value = value.find(_fun92966);
r0 = value;
}
return r0;
function _fun92966({applicationId}) { // fn#92966, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12291:1936, offset: 0x020a0a51, size: 41 bytes, params: 2, frame: 4
return applicationId === env1_2?.id;
}
}
function onEmbeddedActivityItemPress() { // fn#92967, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12291:2411, owner: VoiceMemberEmbeddedActivity.onEmbeddedActivityItemPress, offset: 0x020a0a7a, size: 55 bytes, params: 1, frame: 13
const value = environment.__proto__;
(HandlePressJoinActivity)({embeddedActivityJoinability: env0_6,
handleCanJoin: VoiceMemberEmbeddedActivityHandleCanJoin});
}
function VoiceMemberEmbeddedActivityRenderItem(a0, a1) { // fn#92969, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12291:3289, owner: VoiceMemberEmbeddedActivity.renderItem, offset: 0x020a0ab1, size: 176 bytes, params: 3, frame: 20
var r4;
var object2;
const value2 = undefined;
const CutoutableAvatarImage = (require(1305) /* metro dependency 1305: native */).CutoutableAvatarImage;
const cutoutableAvatarImageProps2 = {user: a0, guildId: env0_5, size: XSMALL};
if (a1) {
r4 = value2;
} else {
object2 = {};
object2.radius = (require(1305) /* metro dependency 1305: native */).AVATAR_SIZE_MAP[XSMALL] / 2 + 3;
object2.direction = (require(1305) /* metro dependency 1305: native */).CutoutDirection.RIGHT;
object2.inset = -6;
r4 = object2;
}
cutoutableAvatarImageProps2.cutout = r4;
return <CutoutableAvatarImage {...cutoutableAvatarImageProps2} />;
}
function _fun92965() { // fn#92965, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12291:1873, offset: 0x020a0a10, size: 65 bytes, params: 1, frame: 12
var environment;
var r0;
var value3;
var value;
const channelBinding = channel;
const value2 = null;
if (value2 == channelBinding) {
r0 = value2;
} else {
value3 = environment.__proto__;
value = EmbeddedActivitiesStore.getEmbeddedActivitiesForChannel(channel.id);
value = value.find(_fun92966);
r0 = value;
}
return r0;
}
function onEmbeddedActivityItemPress() { // fn#92967, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12291:2411, owner: VoiceMemberEmbeddedActivity.onEmbeddedActivityItemPress, offset: 0x020a0a7a, size: 55 bytes, params: 1, frame: 13
const value = environment.__proto__;
(importDefault(8106) /* metro dependency 8106: handlePressJoinActivity */)({embeddedActivityJoinability: env0_6,
handleCanJoin: VoiceMemberEmbeddedActivityHandleCanJoin});
}
function VoiceMemberEmbeddedActivityRenderItem(a0, a1) { // fn#92969, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12291:3289, owner: VoiceMemberEmbeddedActivity.renderItem, offset: 0x020a0ab1, size: 176 bytes, params: 3, frame: 20
var r4;
var object;
const value2 = undefined;
const CutoutableAvatarImage = (require(1305) /* metro dependency 1305: native */).CutoutableAvatarImage;
const cutoutableAvatarImageProps2 = {user: a0, guildId: env0_5, size: XSMALL};
if (a1) {
r4 = value2;
} else {
object = {};
object.radius = (require(1305) /* metro dependency 1305: native */).AVATAR_SIZE_MAP[XSMALL] / 2 + 3;
object.direction = (require(1305) /* metro dependency 1305: native */).CutoutDirection.RIGHT;
object.inset = -6;
r4 = object;
}
cutoutableAvatarImageProps2.cutout = r4;
return <CutoutableAvatarImage {...cutoutableAvatarImageProps2} />;
}
function _fun92966({applicationId}) { // fn#92966, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12291:1936, offset: 0x020a0a51, size: 41 bytes, params: 2, frame: 4
return applicationId === env1_2?.id;
}
global.__d(_fun92958, 12105, [57, 31, 27, 1378, 1379, 1878, 1309, 6276, 33, 1305, 4501, 697, 6777, 1360, 566, 3774,
8107, 1478, 8379, 8106, 5278, 1244, 4573, 10717, 4579,
2]) /* metro module 12105, dependencies: [57, 31, 27, 1378, 1379, 1878, 1309, 6276, 33, 1305, 4501, 697, 6777, 1360, 566, 3774, 8107, 1478, 8379, 8106, 5278, 1244, 4573, 10717, 4579, 2] */;
@@ -1,431 +1,502 @@
/* Metro module 12103; source: modules/voice_calls/native/action_sheet/VoiceMemberList.tsx; dependencies: [57, 5, 31, 27, 1378, 1885, 4492, 3784, 1878, 4300, 661, 1309, 6276, 482, 33, 4501, 12099, 10785, 566, 7972, 12104, 1244, 10858, 4007, 9151, 4573, 8620, 6771, 1848, 4796, 8109, 7709, 12105, 12106, 1478, 12113, 22, 4080, 8743, 3868, 12114, 8140, 2] */
import Module00005 from '../../../../by-id/module-00005.js'; /* Metro dependency 5 */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import EmbeddedActivitiesStore from '../../../activities/EmbeddedActivitiesStore.tsx'; /* Metro dependency 1378 */
import UseWindowDimensionsNative from '../../../screen/useWindowDimensions.native.tsx'; /* Metro dependency 1478 */
import UserStore from '../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import UserRecord from '../../../../records/UserRecord.tsx'; /* Metro dependency 1885 */
import PermissionStore from '../../../../stores/PermissionStore.tsx'; /* Metro dependency 3784 */
import ActionSheetActionCreators from '../../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
import SortedVoiceStateStore from '../../../../stores/views/SortedVoiceStateStore.tsx'; /* Metro dependency 4300 */
import ApplicationStreamingStore from '../../../../stores/ApplicationStreamingStore.tsx'; /* Metro dependency 4492 */
import UseAnalyticsLocations from '../../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
import ShowUserProfileActionSheet from '../../../user_profile/native/showUserProfileActionSheet.tsx'; /* Metro dependency 8743 */
import GuildEventVoiceBanner from '../../../guild_scheduled_events/native/components/GuildEventVoiceBanner.tsx'; /* Metro dependency 12099 */
import VoiceMemberUser from './VoiceMemberUser.tsx'; /* Metro dependency 12106 */
import UseSelectedActiveStream from '../../../video_calls/native/useSelectedActiveStream.tsx'; /* Metro dependency 12113 */
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 ConstantsModule from '../../../../external/discord_common/js/shared/Constants.tsx'; /* Metro dependency 482 */
import * as ConstantsModule2 from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as FormConstantsModule from '../../../../design/void/Form/native/FormConstants.tsx'; /* Metro dependency 1309 */
import * as NavigationRouteUtilsNativeModule from '../../../main_tabs_v2/helpers/NavigationRouteUtils.native.tsx'; /* Metro dependency 4007 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ActionSheetConstantsModule from '../../../action_sheet/native/ActionSheetConstants.tsx'; /* Metro dependency 6276 */
import * as PrivateChannelCallUtilsModule from '../../../../utils/native/PrivateChannelCallUtils.tsx'; /* Metro dependency 7709 */
import * as NativeModule from '../../../../design/void/Form/native/index.tsx'; /* Metro dependency 7972 */
import * as AnalyticsModule from '../../../../hooks/analytics.tsx'; /* Metro dependency 8620 */
import * as VoiceMemberUserModule from './VoiceMemberUser.tsx'; /* Metro dependency 12106 */
function _fun92926(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#92926, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12289:6, offset: 0x0209e9d6, size: 722 bytes, params: 8, frame: 25
var object2;
const env0_0 = require;
const isEmbeddedActivity_92928 = function(a0) {
return a0.url !== undefined && a0.applicationId !== undefined;
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = importDefault(57) /* metro dependency 57 */;
const env0_5 = importDefault(5) /* metro dependency 5 */;
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_7 = value2.SectionList;
const env0_8 = value2.View;
const embeddedActivitiesStore = importDefault(1378) /* metro dependency 1378: EmbeddedActivitiesStore */;
const userRecord = importDefault(1885) /* metro dependency 1885: UserRecord */;
const applicationStreamingStore = importDefault(4492) /* metro dependency 4492: ApplicationStreamingStore */;
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const sortedVoiceStateStore = importDefault(4300) /* metro dependency 4300: SortedVoiceStateStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
let value = ReactModule;
const constantsModule = ConstantsModule2;
const env0_15 = constantsModule.AnalyticsPages;
const env0_16 = constantsModule.InstantInviteSources;
const env0_17 = constantsModule.Permissions;
const env0_18 = (require(1309) /* metro dependency 1309: FormConstants */).FORM_ROW_VERTICAL_PADDING;
const env0_19 = (require(6276) /* metro dependency 6276: ActionSheetConstants */).ACTION_SHEET_MAX_WIDTH;
const env0_20 = (require(482) /* metro dependency 482: Constants */).ThemeTypes;
const value4 = require(33) /* metro dependency 33 */;
const env0_21 = value4.jsx;
const env0_22 = value4.jsxs;
const env0_23 = value4.Fragment;
const env0_24 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {'flex': 1,
const env0_24 = (CreateStylesModule).createStyles({container: {'flex': 1,
'flexShrink': 1}, sectionContainer: {'paddingTop': 16, 'paddingHorizontal': 16}, sectionTitle: {lineHeight: 16},
voiceChannelContainer: {'overflow': 'hidden', 'flexGrow': 1, 'flexShrink': 1, 'minHeight': 1},
headerFormDivider: {marginLeft: 0}, rowFormDivider: {marginHorizontal: 16}});
const env0_25 = value.memo(_fun92929);
const env0_26 = value.memo(_fun92930);
object2 = {VOICE: 0};
object2[0] = 'VOICE';
object2.SPECTATING = 1;
object2[1] = 'SPECTATING';
object2.DISCONNECTED = 2;
object2[2] = 'DISCONNECTED';
object = {VOICE: 0};
object[0] = 'VOICE';
object.SPECTATING = 1;
object[1] = 'SPECTATING';
object.DISCONNECTED = 2;
object[2] = 'DISCONNECTED';
const extractKey_92935 = function(a0) {
return a0 instanceof UserRecord ? a0.id : isEmbeddedActivity_92928(a0) ? a0.applicationId : a0.user.id;
};
value = value.forwardRef(VoiceMemberList);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_calls/native/action_sheet/VoiceMemberList.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_calls/native/action_sheet/VoiceMemberList.tsx');
exports.default = value;
}
function VoiceMemberListSectionHeader({title}) { // fn#92927, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12289:1486, offset: 0x0209eca8, size: 128 bytes, params: 2, frame: 19
const styles = useStyles();
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<View style={styles.sectionContainer}>
<Text
style={styles.sectionTitle}
variant="text-xs/bold"
color="text-default"
>
{title.toUpperCase()}
</Text>
</View>
);
}
function _fun92929({channel}) { // fn#92929, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12289:726, offset: 0x0209ed44, size: 51 bytes, params: 2, frame: 14
return ((Component) => <Component channel={channel} />)(importDefault(12099) /* metro dependency 12099: GuildEventVoiceBanner */);
}
function _fun92930({channel}) { // fn#92930, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12289:792, offset: 0x0209ed77, size: 412 bytes, params: 2, frame: 31
var r0;
var Fragment;
var items2;
var FormRow;
var object2;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
if ((importDefault(10785) /* metro dependency 10785: useIsVoiceChannelFull */)(channel)) {
r0 = null;
} else if ((require(566) /* metro dependency 566: flux */).useStateFromStores([PermissionStore], _fun92931,
[channel])) {
Fragment = env0_6.Fragment;
items2 = [<ItemSeparator />];
FormRow = (require(7972) /* metro dependency 7972: native */).FormRow;
items2[1] = <FormRow leading={((CircularIconButton) => <CircularIconButton accessibilityLabel={intl.string(t['6Qgrev'])} accessibilityHidden source={importDefault(10858) /* metro dependency 10858 */} size={(require(12104) /* metro dependency 12104: IconButton */).CircularIconButton.Sizes.MEDIUM_32} />)((require(12104) /* metro dependency 12104: IconButton */).CircularIconButton)} label={intl.string(t['6Qgrev'])} onPress={function() {
if (channel.isPrivate()) {
require(dependencyMap[23]).navigateToNewGroupDM(channel.id, AnalyticsPages.CHANNEL_CALL);
} else {
require(dependencyMap[24]).showInstantInviteActionSheet(channel,
{source: InstantInviteSources.VOICE_CHANNEL});
}
}} />;
r0 = <Fragment>{items2}</Fragment>;
} else {
r0 = null;
}
return r0;
}
function ItemSeparator() { // fn#92933, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12289:1414, offset: 0x0209efca, size: 63 bytes, params: 1, frame: 15
const styles = useStyles();
const FormDivider = (require(7972) /* metro dependency 7972: native */).FormDivider;
return <FormDivider style={styles.rowFormDivider} />;
}
function renderSectionHeader(a0) { // fn#92934, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12289:1726, offset: 0x0209f009, size: 50 bytes, params: 2, frame: 14
const title = a0.section.title;
const value = null;
return value != title ? <VoiceMemberListSectionHeader title={title} /> : value;
}
function VoiceSectionRow({item, channelId, onPressUser, isActionSheet}) { // fn#92936, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12289:2103, offset: 0x0209f074, size: 238 bytes, params: 2, frame: 20
const env0_1 = (require(8620) /* metro dependency 8620: analytics */).useAnalyticsContext();
const env0_2 = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().analyticsLocations;
if (isEmbeddedActivity_92928(item)) {
return ((Component) => <Component embeddedActivity={item} channelId={channelId} onItemPress={_fun92937()} isActionSheet={isActionSheet} />)(importDefault(12105) /* metro dependency 12105: VoiceMemberEmbeddedActivity */);
}
return ((Component) => <Component {...item} {...{['onPress']: onPressUser}} {...{['isActionSheet']: isActionSheet}} />)(importDefault(12106) /* metro dependency 12106: VoiceMemberUser */);
}
function VoiceMemberList(a0, a1) { // fn#92941, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12289:2764, offset: 0x0209f27c, size: 1572 bytes, params: 3, frame: 34
var nick;
var r22;
var r0;
var push;
var object3;
var length;
var value15;
var value18;
var property;
var property2;
var object5;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var object8;
var object9;
var ThemeContextProvider;
var items9;
var FastList;
const channel = a0.channel;
let isActionSheet = a0.isActionSheet;
const value = undefined;
isActionSheet = isActionSheet === value || isActionSheet;
let disableFooter = a0.disableFooter;
disableFooter = !(disableFooter === value) && disableFooter;
const object10 = {'channel': 0, 'isActionSheet': 0, 'disableFooter': 0};
const value4 = null;
silentSetPrototypeOf(object10, value4, undefined);
const value5 = copyDataProperties({}, a0, object10, undefined);
const styles = useStyles();
const analyticsLocations = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().analyticsLocations;
const width = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)().width;
const Math = global.Math;
const env0_4 = Math.min(width, ACTION_SHEET_MAX_WIDTH);
const value7 = (require(566) /* metro dependency 566: flux */).useStateFromStores([SortedVoiceStateStore],
function() {
return SortedVoiceStateStore.getVoiceStatesForChannel(channel);
}, [channel]);
const value8 = (importDefault(12113) /* metro dependency 12113: useSelectedActiveStream */)(channel);
const value9 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([ApplicationStreamingStore],
_fun92943);
const env0_6 = value9;
const navigationRouteUtilsNativeModule = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
const useIsModalOpen = navigationRouteUtilsNativeModule.useIsModalOpen;
const privateChannelCallUtilsModule = require(7709) /* metro dependency 7709: PrivateChannelCallUtils */;
const getVoiceChannelKey = privateChannelCallUtilsModule.getVoiceChannelKey;
const value10 = Reflect.apply(useIsModalOpen, navigationRouteUtilsNativeModule, [Reflect.apply(getVoiceChannelKey,
privateChannelCallUtilsModule, [channel.id])]);
const embeddedActivitiesForChannel = (require(566) /* metro dependency 566: flux */).useStateFromStores([EmbeddedActivitiesStore],
function() {
return EmbeddedActivitiesStore.getEmbeddedActivitiesForChannel(channel.id);
});
const Set = global.Set;
const set = new Set(value7.map(function(a0) {
return a0.voiceState.userId;
}));
const isPrivate2 = channel.isPrivate();
const items5 = [];
const r7 = isPrivate2 ? channel.recipients.reduce(_fun92946, items5) : items5;
const items6 = [];
if (value4 == value8) {
push = items6.push;
object3 = {};
object3.type = env0_29.VOICE;
object3.title = value4;
object3.data = embeddedActivitiesForChannel.concat(value7);
Reflect.apply(push, items6, [object3]);
if (r7.length > 0) {
items6.push({type: env0_29.DISCONNECTED, title: value4, data: r7});
}
} else if (value4 == value9) {
push = items6.push;
object3 = {};
object3.type = env0_29.VOICE;
object3.title = value4;
object3.data = embeddedActivitiesForChannel.concat(value7);
Reflect.apply(push, items6, [object3]);
if (r7.length > 0) {
items6.push({type: env0_29.DISCONNECTED, title: value4, data: r7});
}
} else if (value10) {
value15 = value7.find(_fun92947);
nick = value4 == value15 ? value : value15.nick;
r22 = value4 != nick ? nick : '';
value18 = env0_4((importDefault(22) /* metro dependency 22 */).partition(value7, _fun92948), 2);
property = value18[0];
property2 = value18[1];
length = property.length;
if (length > 0) {
push = items6.push;
object5 = {};
object5.type = env0_29.SPECTATING;
object5.title = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.Fb0eT9,
{username: r22});
object5.data = property;
Reflect.apply(push, items6, [object5]);
}
length = property2.length;
if (length > 0) {
push = items6.push;
object8 = {};
object8.type = env0_29.VOICE;
object8.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.C7iIKB);
object8.data = embeddedActivitiesForChannel.concat(property2);
Reflect.apply(push, items6, [object8]);
}
length = r7.length;
if (length > 0) {
push = items6.push;
object9 = {};
object9.type = env0_29.DISCONNECTED;
object9.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.BnSq1I);
object9.data = r7;
Reflect.apply(push, items6, [object9]);
}
} else {
push = items6.push;
object3 = {};
object3.type = env0_29.VOICE;
object3.title = value4;
object3.data = embeddedActivitiesForChannel.concat(value7);
Reflect.apply(push, items6, [object3]);
if (r7.length > 0) {
items6.push({type: env0_29.DISCONNECTED, title: value4, data: r7});
}
}
const binding = env0_6;
if (isActionSheet) {
ThemeContextProvider = (require(3868) /* metro dependency 3868: native */).ThemeContextProvider;
var themeContextProviderProps = {theme: ThemeTypes.DARK};
var viewBindingProps = {style: styles.container};
items9 = [((VoiceChannelHeader) => <VoiceChannelHeader channel={channel} />)((require(12114) /* metro dependency 12114: VoiceChannelHeader */).VoiceChannelHeader)];
items9[1] = ((FormDivider) => <FormDivider style={styles.headerFormDivider} />)((require(7972) /* metro dependency 7972: native */).FormDivider);
FastList = importDefault(8140) /* metro dependency 8140: FastList */;
var defaultImport2Props = {inActionSheet: true, style: styles.voiceChannelContainer, ...value5};
defaultImport2Props['renderItem'] = VoiceMemberListRenderItem;
defaultImport2Props['itemSize'] = VoiceMemberListItemSize;
defaultImport2Props['sections'] = items6.map(function(a0) {
return a0.data.length;
});
items9[2] = <FastList {...defaultImport2Props} />;
r0 = <ThemeContextProvider {...themeContextProviderProps}><View {...viewBindingProps}>{items9}</View></ThemeContextProvider>;
} else {
r0 = <SectionList ref={a1} sections={items6} renderSectionHeader={renderSectionHeader} renderItem={binding.useCallback(_fun92950,
[channel, isActionSheet, binding.useCallback(_fun92949, [channel.id,
analyticsLocations])])} keyExtractor={extractKey_92935} ItemSeparatorComponent={ItemSeparator} ListFooterComponent={disableFooter ? value4 : ((Component) => <Component channel={channel} />)(env0_26)} ListHeaderComponent={((Component) => <Component channel={channel} />)(env0_25)} stickySectionHeadersEnabled={false} {...value5} />;
}
return r0;
}
function _fun92931() { // fn#92931, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12289:867, offset: 0x0209ef13, size: 55 bytes, params: 1, frame: 14
const value = environment.__proto__;
const can = PermissionStore.can;
const CREATE_INSTANT_INVITE = Permissions.CREATE_INSTANT_INVITE;
return Reflect.apply(can, PermissionStore, [CREATE_INSTANT_INVITE, channel]) || channel.isPrivate();
}
function _fun92937() { // fn#92937, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12289:2259, offset: 0x0209f162, size: 36 bytes, params: 1, frame: 12
const env0_0 = env1_5(_fun92939);
return _fun92940;
}
function _fun92943() { // fn#92943, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12289:3053, offset: 0x0209f8bb, size: 43 bytes, params: 1, frame: 12
return env0_5 != null ? ApplicationStreamingStore.getViewerIds(env0_5) : [];
}
function _fun92946(a0, a1) { // fn#92946, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12289:3310, offset: 0x0209f916, size: 70 bytes, params: 3, frame: 14
let value = environment.__proto__;
value = UserStore.getUser(a1);
if (!(value == null || env0_7.has(value.id))) {
a0.push(value);
}
return a0;
}
function _fun92947({user}) { // fn#92947, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12289:3432, offset: 0x0209f95c, size: 32 bytes, params: 2, frame: 2
return user.id === env0_5.ownerId;
}
function _fun92948({user}) { // fn#92948, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12289:3526, offset: 0x0209f97c, size: 32 bytes, params: 2, frame: 11
const binding = env0_6;
return binding.includes(user.id);
}
function _fun92949({id}) { // fn#92949, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12289:4029, offset: 0x0209f99c, size: 100 bytes, params: 2, frame: 13
const value = environment.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
(importDefault(8743) /* metro dependency 8743: showUserProfileActionSheet */)({userId: id, channelId: channel.id,
isVoiceContext: true, sourceAnalyticsLocations: analyticsLocations});
}
function _fun92950(a0) { // fn#92950, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12289:4173, offset: 0x0209fa00, size: 302 bytes, params: 2, frame: 18
const item = a0.item;
const type = a0.section.type;
const value = environment.__proto__;
const VOICE = env1_29.VOICE;
if (VOICE === type) {
return item instanceof UserRecord ? null : <VoiceSectionRow item={item} channelId={channel.id} onPressUser={env0_9} isActionSheet={isActionSheet} />;
}
const SPECTATING = env1_29.SPECTATING;
if (SPECTATING === type) {
return ((Component) => <Component {...item} {...{['onPress']: env0_9}} {...{['isSpectating']: true}} {...{['isActionSheet']: isActionSheet}} />)(importDefault(12106) /* metro dependency 12106: VoiceMemberUser */);
}
const DISCONNECTED = env1_29.DISCONNECTED;
if (DISCONNECTED === type) {
const DisconnectedUserRow = (require(12106) /* metro dependency 12106: VoiceMemberUser */).DisconnectedUserRow;
function VoiceMemberListSectionHeader({title}) { // fn#92927, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12289:1486, offset: 0x0209eca8, size: 128 bytes, params: 2, frame: 19
const styles = useStyles();
const Text = (TextModule).Text;
return (
<DisconnectedUserRow
user={item}
channel={channel}
isActionSheet={isActionSheet}
onPress={env0_9}
/>
<View style={styles.sectionContainer}>
<Text
style={styles.sectionTitle}
variant="text-xs/bold"
color="text-default"
>
{title.toUpperCase()}
</Text>
</View>
);
}
}
function VoiceMemberListRenderItem(a0, a1) { // fn#92951, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12289:4793, owner: VoiceMemberList.renderItem, offset: 0x0209fb2e, size: 153 bytes, params: 3, frame: 20
const property = env0_8[a0].data[a1];
if (property == null) {
return null;
function _fun92929({channel}) { // fn#92929, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12289:726, offset: 0x0209ed44, size: 51 bytes, params: 2, frame: 14
return ((Component) => <Component channel={channel} />)(GuildEventVoiceBanner);
}
const value2 = env0_10({item: property, section: env0_8[a0]});
const jsxRuntimeEnv1_23Binding = jsxRuntimeEnv1_23;
const FormDivider = (require(7972) /* metro dependency 7972: native */).FormDivider;
return (
<>
{value2}
<FormDivider style={styles.rowFormDivider} />
</>
);
}
function VoiceMemberListItemSize(a0, a1) { // fn#92952, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12289:4960, owner: VoiceMemberList.itemSize, offset: 0x0209fbc7, size: 237 bytes, params: 3, frame: 21
var r1;
var r0;
var voiceState;
const STREAM_PREVIEW_MARGIN = (require(12106) /* metro dependency 12106: VoiceMemberUser */).STREAM_PREVIEW_MARGIN;
if (a1 == null) {
return 0;
}
var value;
const property = env0_8[a0].data[a1];
if (property == null) {
return 0;
}
const value3 = FORM_ROW_VERTICAL_PADDING + 32;
if (property instanceof UserRecord) {
r0 = value3;
} else {
if (isEmbeddedActivity_92928(property)) {
r1 = (require(12105) /* metro dependency 12105: VoiceMemberEmbeddedActivity */).calculateActivityRowHeight(env0_4);
function _fun92930({channel}) { // fn#92930, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12289:792, offset: 0x0209ed77, size: 412 bytes, params: 2, frame: 31
var r0;
var Fragment;
var items2;
var FormRow;
var object;
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
if ((importDefault(10785) /* metro dependency 10785: useIsVoiceChannelFull */)(channel)) {
r0 = null;
} else if ((require(566) /* metro dependency 566: flux */).useStateFromStores([PermissionStore], _fun92931,
[channel])) {
Fragment = env0_6.Fragment;
items2 = [
<ItemSeparator />,
];
FormRow = (require(7972) /* metro dependency 7972: native */).FormRow;
items2[1] = (
<FormRow
leading={((CircularIconButton) => <CircularIconButton accessibilityLabel={intl.string(t['6Qgrev'])} accessibilityHidden source={importDefault(10858) /* metro dependency 10858 */} size={(require(12104) /* metro dependency 12104: IconButton */).CircularIconButton.Sizes.MEDIUM_32} />)((require(12104) /* metro dependency 12104: IconButton */).CircularIconButton)}
label={intl.string(t['6Qgrev'])}
onPress={function() {
if (channel.isPrivate()) {
require(dependencyMap[23]).navigateToNewGroupDM(channel.id, AnalyticsPages.CHANNEL_CALL);
} else {
require(dependencyMap[24]).showInstantInviteActionSheet(channel,
{source: InstantInviteSources.VOICE_CHANNEL});
}
}}
/>
);
r0 = (
<Fragment>
{items2}
</Fragment>
);
} else {
voiceState = property.voiceState;
if (voiceState == null) {
r1 = value3;
} else if (voiceState.selfStream) {
value = env0_4 - 2 * STREAM_PREVIEW_MARGIN;
value = value3 + (0.5625 * value + STREAM_PREVIEW_MARGIN);
r1 = value;
r0 = null;
}
return r0;
function _fun92931() { // fn#92931, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12289:867, offset: 0x0209ef13, size: 55 bytes, params: 1, frame: 14
const value = environment.__proto__;
const permissionStoreBinding = PermissionStore;
const can = permissionStoreBinding.can;
const CREATE_INSTANT_INVITE = Permissions.CREATE_INSTANT_INVITE;
return Reflect.apply(can, permissionStoreBinding, [CREATE_INSTANT_INVITE, channel]) || channel.isPrivate();
}
}
function ItemSeparator() { // fn#92933, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12289:1414, offset: 0x0209efca, size: 63 bytes, params: 1, frame: 15
const styles = useStyles();
const FormDivider = (NativeModule).FormDivider;
return <FormDivider style={styles.rowFormDivider} />;
}
function renderSectionHeader_92934(a0) { // fn#92934, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12289:1726, offset: 0x0209f009, size: 50 bytes, params: 2, frame: 14
const title = a0.section.title;
const value = null;
return (
value != title
? (
<VoiceMemberListSectionHeader title={title} />
)
: value
);
}
function VoiceSectionRow({item, channelId, onPressUser, isActionSheet}) { // fn#92936, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12289:2103, offset: 0x0209f074, size: 238 bytes, params: 2, frame: 20
const env0_1 = (AnalyticsModule).useAnalyticsContext();
const env0_2 = (UseAnalyticsLocations)().analyticsLocations;
if (isEmbeddedActivity_92928(item)) {
return ((Component) => <Component embeddedActivity={item} channelId={channelId} onItemPress={_fun92937()} isActionSheet={isActionSheet} />)(importDefault(12105) /* metro dependency 12105: VoiceMemberEmbeddedActivity */);
}
return ((Component) => <Component {...item} {...{['onPress']: onPressUser}} {...{['isActionSheet']: isActionSheet}} />)(VoiceMemberUser);
function _fun92937() { // fn#92937, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12289:2259, offset: 0x0209f162, size: 36 bytes, params: 1, frame: 12
const env0_0 = env1_5(_fun92939);
return _fun92940;
function* _fun92939(a0, a1, a2) { // fn#92939, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12289:2279, offset: 0x0209f191, size: 235 bytes, params: 4, frame: 18
var r1;
var binding;
var binding2;
var value4;
var selectVoiceChannel;
var id;
var value5;
var value6;
if (true) {
value = a0 != null;
r1 = value && a1 != null;
r1 = r1 && a2 != null;
if (r1) {
value = environment.__proto__.__proto__.__proto__;
binding = env3_2;
binding2 = env3_3;
binding(binding2[28]).dismissGlobalKeyboard();
binding = env3_1;
value4 = binding(binding2[29]);
selectVoiceChannel = value4.selectVoiceChannel;
id = a0.id;
Reflect.apply(selectVoiceChannel, value4, [id]);
value5 = binding(binding2[30]);
id = a0.id;
value6 = environment.__proto__.__proto__;
yield value5({applicationId: a2.applicationId, activityChannelId: id,
locationObject: importDefault.location,
analyticsLocations: importAll});
if (false) {
return undefined;
}
if (require) {
env3_0(env3_3[31]).hideVoiceChannelActionSheet(a0);
}
}
}
}
function _fun92940() { // fn#92940, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12289:2563, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
return env0_0.apply(this, arguments);
}
}
}
function VoiceMemberList(a0, a1) { // fn#92941, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12289:2764, offset: 0x0209f27c, size: 1572 bytes, params: 3, frame: 34
var nick;
var r22;
var r0;
var push;
var object;
var length;
var value15;
var value18;
var property;
var property2;
var object2;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var object4;
var object6;
var ThemeContextProvider;
var items9;
var FastList;
const channel = a0.channel;
let isActionSheet = a0.isActionSheet;
const value = undefined;
isActionSheet = isActionSheet === value || isActionSheet;
let disableFooter = a0.disableFooter;
disableFooter = !(disableFooter === value) && disableFooter;
const object7 = {'channel': 0, 'isActionSheet': 0, 'disableFooter': 0};
const value4 = null;
silentSetPrototypeOf(object7, value4, undefined);
const value5 = copyDataProperties({}, a0, object7, undefined);
const styles = useStyles();
const analyticsLocations = (UseAnalyticsLocations)().analyticsLocations;
const width = (UseWindowDimensionsNative)().width;
const Math = global.Math;
const env0_4 = Math.min(width, ACTION_SHEET_MAX_WIDTH);
const value7 = (require(566) /* metro dependency 566: flux */).useStateFromStores([SortedVoiceStateStore],
function() {
return SortedVoiceStateStore.getVoiceStatesForChannel(channel);
}, [channel]);
const value8 = (UseSelectedActiveStream)(channel);
const value9 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([ApplicationStreamingStore],
_fun92943);
const env0_6 = value9;
const useIsModalOpen = NavigationRouteUtilsNativeModule.useIsModalOpen;
const getVoiceChannelKey = PrivateChannelCallUtilsModule.getVoiceChannelKey;
const value10 = Reflect.apply(useIsModalOpen, NavigationRouteUtilsNativeModule, [Reflect.apply(getVoiceChannelKey,
PrivateChannelCallUtilsModule, [channel.id])]);
const embeddedActivitiesForChannel = (require(566) /* metro dependency 566: flux */).useStateFromStores([EmbeddedActivitiesStore],
function() {
return EmbeddedActivitiesStore.getEmbeddedActivitiesForChannel(channel.id);
});
const Set = global.Set;
const set = new Set(value7.map(function(a0) {
return a0.voiceState.userId;
}));
const isPrivate2 = channel.isPrivate();
const items5 = [];
const r7 = isPrivate2 ? channel.recipients.reduce(_fun92946, items5) : items5;
const items6 = [];
if (value4 == value8) {
push = items6.push;
object = {};
object.type = env0_29.VOICE;
object.title = value4;
object.data = embeddedActivitiesForChannel.concat(value7);
Reflect.apply(push, items6, [object]);
if (r7.length > 0) {
items6.push({type: env0_29.DISCONNECTED, title: value4, data: r7});
}
} else if (value4 == value9) {
push = items6.push;
object = {};
object.type = env0_29.VOICE;
object.title = value4;
object.data = embeddedActivitiesForChannel.concat(value7);
Reflect.apply(push, items6, [object]);
if (r7.length > 0) {
items6.push({type: env0_29.DISCONNECTED, title: value4, data: r7});
}
} else if (value10) {
value15 = value7.find(_fun92947);
nick = value4 == value15 ? value : value15.nick;
r22 = value4 != nick ? nick : '';
value18 = env0_4((importDefault(22) /* metro dependency 22 */).partition(value7, _fun92948), 2);
property = value18[0];
property2 = value18[1];
length = property.length;
if (length > 0) {
push = items6.push;
object2 = {};
object2.type = env0_29.SPECTATING;
object2.title = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.Fb0eT9,
{username: r22});
object2.data = property;
Reflect.apply(push, items6, [object2]);
}
length = property2.length;
if (length > 0) {
push = items6.push;
object4 = {};
object4.type = env0_29.VOICE;
object4.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.C7iIKB);
object4.data = embeddedActivitiesForChannel.concat(property2);
Reflect.apply(push, items6, [object4]);
}
length = r7.length;
if (length > 0) {
push = items6.push;
object6 = {};
object6.type = env0_29.DISCONNECTED;
object6.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.BnSq1I);
object6.data = r7;
Reflect.apply(push, items6, [object6]);
}
} else {
push = items6.push;
object = {};
object.type = env0_29.VOICE;
object.title = value4;
object.data = embeddedActivitiesForChannel.concat(value7);
Reflect.apply(push, items6, [object]);
if (r7.length > 0) {
items6.push({type: env0_29.DISCONNECTED, title: value4, data: r7});
}
}
const binding = env0_6;
if (isActionSheet) {
ThemeContextProvider = (require(3868) /* metro dependency 3868: native */).ThemeContextProvider;
var themeContextProviderProps = {theme: ThemeTypes.DARK};
var viewBindingProps = {style: styles.container};
const VoiceChannelHeader = (require(12114) /* metro dependency 12114: VoiceChannelHeader */).VoiceChannelHeader;
items9 = [
<VoiceChannelHeader channel={channel} />,
];
items9[1] = ((FormDivider) => <FormDivider style={styles.headerFormDivider} />)((require(7972) /* metro dependency 7972: native */).FormDivider);
FastList = importDefault(8140) /* metro dependency 8140: FastList */;
var defaultImport2Props = {inActionSheet: true, style: styles.voiceChannelContainer, ...value5};
defaultImport2Props['renderItem'] = VoiceMemberListRenderItem;
defaultImport2Props['itemSize'] = VoiceMemberListItemSize;
defaultImport2Props['sections'] = items6.map(function(a0) {
return a0.data.length;
});
items9[2] = <FastList {...defaultImport2Props} />;
r0 = (
<ThemeContextProvider {...themeContextProviderProps}>
<View {...viewBindingProps}>
{items9}
</View>
</ThemeContextProvider>
);
} else {
r0 = (
<SectionList
ref={a1}
sections={items6}
renderSectionHeader={renderSectionHeader_92934}
renderItem={binding.useCallback(_fun92950, [channel, isActionSheet, binding.useCallback(_fun92949,
[channel.id, analyticsLocations])])}
keyExtractor={extractKey_92935}
ItemSeparatorComponent={ItemSeparator}
ListFooterComponent={disableFooter
? value4
: ((Component) => <Component channel={channel} />)(env0_26)}
ListHeaderComponent={((Component) => <Component channel={channel} />)(env0_25)}
stickySectionHeadersEnabled={false}
{...value5}
/>
);
}
return r0;
function _fun92943() { // fn#92943, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12289:3053, offset: 0x0209f8bb, size: 43 bytes, params: 1, frame: 12
return Module00005 != null ? ApplicationStreamingStore.getViewerIds(Module00005) : [];
}
function _fun92946(a0, a1) { // fn#92946, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12289:3310, offset: 0x0209f916, size: 70 bytes, params: 3, frame: 14
let value = environment.__proto__;
value = UserStore.getUser(a1);
if (!(value == null || ReactNativeModule.SectionList.has(value.id))) {
a0.push(value);
}
return a0;
}
function _fun92947({user}) { // fn#92947, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12289:3432, offset: 0x0209f95c, size: 32 bytes, params: 2, frame: 2
return user.id === Module00005.ownerId;
}
function _fun92948({user}) { // fn#92948, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12289:3526, offset: 0x0209f97c, size: 32 bytes, params: 2, frame: 11
const binding = env0_6;
return binding.includes(user.id);
}
function _fun92949({id}) { // fn#92949, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12289:4029, offset: 0x0209f99c, size: 100 bytes, params: 2, frame: 13
const value = environment.__proto__;
(ActionSheetActionCreators).hideActionSheet();
(ShowUserProfileActionSheet)({userId: id, channelId: channel.id,
isVoiceContext: true, sourceAnalyticsLocations: analyticsLocations});
}
function _fun92950(a0) { // fn#92950, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12289:4173, offset: 0x0209fa00, size: 302 bytes, params: 2, frame: 18
const item = a0.item;
const type = a0.section.type;
const value = environment.__proto__;
const VOICE = env1_29.VOICE;
if (VOICE === type) {
return (
item instanceof UserRecord
? null
: (
<VoiceSectionRow
item={item}
channelId={channel.id}
onPressUser={env0_9}
isActionSheet={isActionSheet}
/>
)
);
}
const SPECTATING = env1_29.SPECTATING;
if (SPECTATING === type) {
return ((Component) => <Component {...item} {...{['onPress']: env0_9}} {...{['isSpectating']: true}} {...{['isActionSheet']: isActionSheet}} />)(importDefault(12106) /* metro dependency 12106: VoiceMemberUser */);
}
const DISCONNECTED = env1_29.DISCONNECTED;
if (DISCONNECTED === type) {
const DisconnectedUserRow = (require(12106) /* metro dependency 12106: VoiceMemberUser */).DisconnectedUserRow;
return (
<DisconnectedUserRow
user={item}
channel={channel}
isActionSheet={isActionSheet}
onPress={env0_9}
/>
);
}
}
function VoiceMemberListRenderItem(a0, a1) { // fn#92951, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12289:4793, owner: VoiceMemberList.renderItem, offset: 0x0209fb2e, size: 153 bytes, params: 3, frame: 20
const property = ReactNativeModule.View[a0].data[a1];
if (property == null) {
return null;
}
const value2 = env0_10({item: property, section: ReactNativeModule.View[a0]});
const jsxRuntimeEnv1_23Binding = jsxRuntimeEnv1_23;
const FormDivider = (NativeModule).FormDivider;
return (
<>
{value2}
<FormDivider style={styles.rowFormDivider} />
</>
);
}
function VoiceMemberListItemSize(a0, a1) { // fn#92952, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12289:4960, owner: VoiceMemberList.itemSize, offset: 0x0209fbc7, size: 237 bytes, params: 3, frame: 21
var r1;
var r0;
var voiceState;
const STREAM_PREVIEW_MARGIN = (VoiceMemberUserModule).STREAM_PREVIEW_MARGIN;
if (a1 == null) {
return 0;
}
var value;
const property = ReactNativeModule.View[a0].data[a1];
if (property == null) {
return 0;
}
const value3 = FORM_ROW_VERTICAL_PADDING + 32;
if (property instanceof UserRecord) {
r0 = value3;
} else {
r1 = value3;
}
}
r0 = r1;
}
return r0;
}
function* _fun92939(a0, a1, a2) { // fn#92939, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12289:2279, offset: 0x0209f191, size: 235 bytes, params: 4, frame: 18
var r1;
var binding;
var binding2;
var value4;
var selectVoiceChannel;
var id;
var value5;
var value6;
if (true) {
value = a0 != null;
r1 = value && a1 != null;
r1 = r1 && a2 != null;
if (r1) {
value = environment.__proto__.__proto__.__proto__;
binding = env3_2;
binding2 = env3_3;
binding(binding2[28]).dismissGlobalKeyboard();
binding = env3_1;
value4 = binding(binding2[29]);
selectVoiceChannel = value4.selectVoiceChannel;
id = a0.id;
Reflect.apply(selectVoiceChannel, value4, [id]);
value5 = binding(binding2[30]);
id = a0.id;
value6 = environment.__proto__.__proto__;
yield value5({applicationId: a2.applicationId, activityChannelId: id,
locationObject: importDefault.location,
analyticsLocations: importAll});
if (false) {
return undefined;
}
if (require) {
env3_0(env3_3[31]).hideVoiceChannelActionSheet(a0);
if (isEmbeddedActivity_92928(property)) {
r1 = (require(12105) /* metro dependency 12105: VoiceMemberEmbeddedActivity */).calculateActivityRowHeight(env0_4);
} else {
voiceState = property.voiceState;
if (voiceState == null) {
r1 = value3;
} else if (voiceState.selfStream) {
value = env0_4 - 2 * STREAM_PREVIEW_MARGIN;
value = value3 + (0.5625 * value + STREAM_PREVIEW_MARGIN);
r1 = value;
} else {
r1 = value3;
}
}
r0 = r1;
}
return r0;
}
}
}
global.__d(_fun92926, 12103, [57, 5, 31, 27, 1378, 1885, 4492, 3784, 1878, 4300, 661, 1309, 6276, 482, 33, 4501,
12099, 10785, 566, 7972, 12104, 1244, 10858, 4007, 9151, 4573, 8620, 6771, 1848, 4796, 8109, 7709, 12105, 12106,
1478, 12113, 22, 4080, 8743, 3868, 12114, 8140,
2]) /* metro module 12103, dependencies: [57, 5, 31, 27, 1378, 1885, 4492, 3784, 1878, 4300, 661, 1309, 6276, 482, 33, 4501, 12099, 10785, 566, 7972, 12104, 1244, 10858, 4007, 9151, 4573, 8620, 6771, 1848, 4796, 8109, 7709, 12105, 12106, 1478, 12113, 22, 4080, 8743, 3868, 12114, 8140, 2] */;
@@ -1,438 +1,551 @@
/* Metro module 12106; source: modules/voice_calls/native/action_sheet/VoiceMemberUser.tsx; dependencies: [31, 27, 1310, 1226, 4258, 1379, 1945, 4259, 4396, 661, 33, 4501, 697, 4612, 566, 4002, 12107, 12108, 1305, 12109, 12110, 12111, 12112, 9149, 4573, 1244, 7972, 7128, 10885, 4007, 7709, 4080, 8916, 5278, 4617, 8917, 3995, 2] */
import AuthenticationStore from '../../../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */
import ThemeStore from '../../../user_settings/ThemeStore.tsx'; /* Metro dependency 1310 */
import ChannelStore from '../../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import GuildMemberStore from '../../../../stores/GuildMemberStore.tsx'; /* Metro dependency 1945 */
import UserUtils from '../../../../utils/UserUtils.tsx'; /* Metro dependency 3995 */
import CallStore from '../../../../stores/CallStore.tsx'; /* Metro dependency 4258 */
import MediaEngineStore from '../../../../stores/MediaEngineStore.tsx'; /* Metro dependency 4259 */
import PresenceStore from '../../../../stores/PresenceStore.tsx'; /* Metro dependency 4396 */
import UseIsSpeaking from '../../../../hooks/useIsSpeaking.tsx'; /* Metro dependency 4612 */
import NicknameUtils from '../../../../utils/NicknameUtils.tsx'; /* Metro dependency 4617 */
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 FluxModule from '../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as NativeModule from '../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as PressablesModule from '../../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as NativeModule2 from '../../../../design/void/Form/native/index.tsx'; /* Metro dependency 7972 */
import * as UseCanRingModule from '../../../calls/useCanRing.tsx'; /* Metro dependency 8917 */
function _fun92971(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#92971, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12292:6, offset: 0x020a0b61, size: 911 bytes, params: 8, frame: 28
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_3 = value2.View;
value2.Platform;
const themeStore = importDefault(1310) /* metro dependency 1310: ThemeStore */;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const callStore = importDefault(4258) /* metro dependency 4258: CallStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
const mediaEngineStore = importDefault(4259) /* metro dependency 4259: MediaEngineStore */;
const presenceStore = importDefault(4396) /* metro dependency 4396: PresenceStore */;
const Fonts = (require(661) /* metro dependency 661: Constants */).Fonts;
const value3 = require(33) /* metro dependency 33 */;
const env0_11 = value3.jsx;
const env0_12 = value3.jsxs;
const env0_13 = value3.Fragment;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
let createStyles = createStylesModule.createStyles;
object2 = {};
object2.row = {flexDirection: 'row'};
let value = ReactModule;
ReactNativeModule.Platform;
const Fonts = (ConstantsModule).Fonts;
let createStyles = CreateStylesModule.createStyles;
object = {};
object.row = {flexDirection: 'row'};
let INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
object2.voiceStatusIcon = {tintColor: INTERACTIVE_TEXT_DEFAULT, marginLeft: 8};
object2.voiceStatusIconMargin = {marginLeft: 8};
object2.streamPreview = {'marginHorizontal': 16, 'marginBottom': 16, 'alignItems': 'center', 'flex': 1};
const object3 = {'backgroundColor': null, 'borderRadius': null, 'height': 32, 'alignItems': 'center',
object.voiceStatusIcon = {tintColor: INTERACTIVE_TEXT_DEFAULT, marginLeft: 8};
object.voiceStatusIconMargin = {marginLeft: 8};
object.streamPreview = {'marginHorizontal': 16, 'marginBottom': 16, 'alignItems': 'center', 'flex': 1};
const object5 = {'backgroundColor': null, 'borderRadius': null, 'height': 32, 'alignItems': 'center',
'justifyContent': 'center'};
let BACKGROUND_MOD_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_MUTED;
object3.backgroundColor = BACKGROUND_MOD_MUTED;
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object2.ringingButton = object3;
const object4 = {'fontFamily': null, 'fontSize': 14, 'lineHeight': 18, 'marginHorizontal': 16};
object5.backgroundColor = BACKGROUND_MOD_MUTED;
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object.ringingButton = object5;
const object6 = {'fontFamily': null, 'fontSize': 14, 'lineHeight': 18, 'marginHorizontal': 16};
let PRIMARY_SEMIBOLD = Fonts.PRIMARY_SEMIBOLD;
object4.fontFamily = PRIMARY_SEMIBOLD;
object6.fontFamily = PRIMARY_SEMIBOLD;
let INTERACTIVE_TEXT_ACTIVE = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_ACTIVE;
object4.color = INTERACTIVE_TEXT_ACTIVE;
object2.ringingButtonLabel = object4;
object2.autoDisabledVideo = {'flexDirection': 'row', 'alignItems': 'center'};
object2.autoDisabledVideoLabel = {marginLeft: 4};
const env0_14 = Reflect.apply(createStyles, createStylesModule, [object2]);
const value5 = createStylesModule;
createStyles = value5.createStyles;
object2 = {};
const object7 = {};
object6.color = INTERACTIVE_TEXT_ACTIVE;
object.ringingButtonLabel = object6;
object.autoDisabledVideo = {'flexDirection': 'row', 'alignItems': 'center'};
object.autoDisabledVideoLabel = {marginLeft: 4};
const env0_14 = Reflect.apply(createStyles, CreateStylesModule, [object]);
createStyles = CreateStylesModule.createStyles;
object = {};
const object8 = {};
const PRIMARY_MEDIUM = Fonts.PRIMARY_MEDIUM;
object7.fontFamily = PRIMARY_MEDIUM;
object8.fontFamily = PRIMARY_MEDIUM;
const MOBILE_TEXT_HEADING_PRIMARY = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_TEXT_HEADING_PRIMARY;
object7.color = MOBILE_TEXT_HEADING_PRIMARY;
object2.labelCallScreen = object7;
object8.color = MOBILE_TEXT_HEADING_PRIMARY;
object.labelCallScreen = object8;
INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
object2.voiceStatusIcon = {tintColor: INTERACTIVE_TEXT_DEFAULT, marginLeft: 8};
const object9 = {'backgroundColor': null, 'borderRadius': null, 'height': 32, 'alignItems': 'center',
object.voiceStatusIcon = {tintColor: INTERACTIVE_TEXT_DEFAULT, marginLeft: 8};
const object10 = {'backgroundColor': null, 'borderRadius': null, 'height': 32, 'alignItems': 'center',
'justifyContent': 'center'};
BACKGROUND_MOD_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_MUTED;
object9.backgroundColor = BACKGROUND_MOD_MUTED;
object9.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object2.ringingButton = object9;
const object12 = {'fontFamily': null, 'fontSize': 14, 'lineHeight': 18, 'marginHorizontal': 16};
object10.backgroundColor = BACKGROUND_MOD_MUTED;
object10.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object.ringingButton = object10;
const object11 = {'fontFamily': null, 'fontSize': 14, 'lineHeight': 18, 'marginHorizontal': 16};
PRIMARY_SEMIBOLD = Fonts.PRIMARY_SEMIBOLD;
object12.fontFamily = PRIMARY_SEMIBOLD;
object11.fontFamily = PRIMARY_SEMIBOLD;
INTERACTIVE_TEXT_ACTIVE = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_ACTIVE;
object12.color = INTERACTIVE_TEXT_ACTIVE;
object2.ringingButtonLabel = object12;
const env0_15 = Reflect.apply(createStyles, value5, [object2]);
object11.color = INTERACTIVE_TEXT_ACTIVE;
object.ringingButtonLabel = object11;
const env0_15 = Reflect.apply(createStyles, CreateStylesModule, [object]);
const env0_16 = value.memo(_fun92972);
const value6 = value.memo(DisconnectedUserRow);
value = value.memo(_fun92987);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_calls/native/action_sheet/VoiceMemberUser.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_calls/native/action_sheet/VoiceMemberUser.tsx');
exports.default = value;
exports.STREAM_PREVIEW_MARGIN = 16;
exports.DisconnectedUserRow = value6;
}
function _fun92972(a0) { // fn#92972, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12292:1423, offset: 0x020a0ef0, size: 1876 bytes, params: 2, frame: 42
var r16;
var r29;
var r7;
var r2;
var r1;
var r4;
var r18;
var r21;
var r23;
var r24;
var r9;
var r20;
var r0;
var r5;
var sessionId;
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
var items4;
var object2;
var object4;
var jsxRuntimeEnv0_13Binding;
var items5;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var items7;
const user = a0.user;
const name = a0.name;
const channel = a0.channel;
const voiceState = a0.voiceState;
let withStream = a0.withStream;
const value = undefined;
withStream = withStream === value || withStream;
const isSpectating = a0.isSpectating;
const isActionSheet = a0.isActionSheet;
const env0_2 = a0.onPress;
const object5 = {'user': 0, 'name': 0, 'channel': 0, 'voiceState': 0, 'withStream': 0, 'isSpectating': 0,
'isActionSheet': 0, 'onPress': 0};
const value3 = null;
silentSetPrototypeOf(object5, value3, undefined);
const value4 = copyDataProperties({}, a0, object5, undefined);
const styles = useStyles();
const styles2 = useStyles();
const id = AuthenticationStore.getId();
const value7 = (importDefault(4612) /* metro dependency 4612: useIsSpeaking */)({userId: user.id});
const theme = (require(566) /* metro dependency 566: flux */).useStateFromStores([ThemeStore], function() {
return ThemeStore.theme;
});
const {localMute, localDeaf, localVideo, isSelfMute, localVideoDisabled,
localVideoAutoDisabled} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([MediaEngineStore],
_fun92974);
const value9 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildMemberStore], function() {
return GuildMemberStore.isGuestOrLurker(channel?.guild_id, user.id);
});
let r10 = localMute || isSelfMute;
const r22 = localVideo || localVideoDisabled;
const value10 = false;
if (value3 != voiceState) {
r16 = withStream && voiceState.selfStream;
r29 = r10 || voiceState.isVoiceMuted();
r10 = localDeaf || voiceState.isVoiceDeafened();
r7 = r22 || voiceState.selfVideo;
sessionId = voiceState.sessionId;
r2 = value3 != sessionId && id === user.id;
r2 = r2 && sessionId !== AuthenticationStore.getSessionId();
r1 = true;
r4 = r2;
r18 = r16;
r21 = r7;
r23 = r10;
r24 = r29;
} else {
r1 = value10;
r4 = value10;
r18 = value10;
r21 = r22;
r23 = localDeaf;
r24 = r10;
}
const voiceStatusIcon = isActionSheet ? styles2.voiceStatusIcon : styles.voiceStatusIcon;
const object6 = {onPress: function() {
return onPress(user);
}, label: name};
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
const guild_id = value3 == channel ? value : channel.guild_id;
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
const REFRESH_MEDIUM_32 = AvatarSizes.REFRESH_MEDIUM_32;
object6.leading = <Avatar user={user} guildId={guild_id} size={REFRESH_MEDIUM_32} speaking={value7} />;
if (r1) {
if (r4) {
r0 = value3;
function _fun92972(a0) { // fn#92972, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12292:1423, offset: 0x020a0ef0, size: 1876 bytes, params: 2, frame: 42
var r16;
var r29;
var r7;
var r2;
var r1;
var r4;
var r18;
var r21;
var r23;
var r24;
var r9;
var r20;
var r0;
var r5;
var sessionId;
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
var items4;
var object;
var object3;
var jsxRuntimeEnv0_13Binding;
var items5;
const Text = (TextModule).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var items7;
const user = a0.user;
const name = a0.name;
const channel = a0.channel;
const voiceState = a0.voiceState;
let withStream = a0.withStream;
const value = undefined;
withStream = withStream === value || withStream;
const isSpectating = a0.isSpectating;
const isActionSheet = a0.isActionSheet;
const env0_2 = a0.onPress;
const object7 = {'user': 0, 'name': 0, 'channel': 0, 'voiceState': 0, 'withStream': 0, 'isSpectating': 0,
'isActionSheet': 0, 'onPress': 0};
const value3 = null;
silentSetPrototypeOf(object7, value3, undefined);
const value4 = copyDataProperties({}, a0, object7, undefined);
const styles = useStyles();
const styles2 = useStyles();
const id = AuthenticationStore.getId();
const value7 = (UseIsSpeaking)({userId: user.id});
const theme = (require(566) /* metro dependency 566: flux */).useStateFromStores([ThemeStore], function() {
return ThemeStore.theme;
});
const {localMute, localDeaf, localVideo, isSelfMute, localVideoDisabled,
localVideoAutoDisabled} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([MediaEngineStore],
_fun92974);
const value9 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildMemberStore], function() {
var guildMemberStoreBinding = GuildMemberStore;
return guildMemberStoreBinding.isGuestOrLurker(channel?.guild_id, user.id);
});
let r10 = localMute || isSelfMute;
const r22 = localVideo || localVideoDisabled;
const value10 = false;
if (value3 != voiceState) {
r16 = withStream && voiceState.selfStream;
r29 = r10 || voiceState.isVoiceMuted();
r10 = localDeaf || voiceState.isVoiceDeafened();
r7 = r22 || voiceState.selfVideo;
sessionId = voiceState.sessionId;
r2 = value3 != sessionId && id === user.id;
r2 = r2 && sessionId !== AuthenticationStore.getSessionId();
r1 = true;
r4 = r2;
r18 = r16;
r21 = r7;
r23 = r10;
r24 = r29;
} else {
var viewBindingProps = {style: styles.row};
r9 = isSpectating ? <Icon size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.REFRESH_SMALL_16} source={importDefault(12112) /* metro dependency 12112 */} style={voiceStatusIcon} /> : value3;
items4 = [r9];
r9 = r24 ? <Icon size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.REFRESH_SMALL_16} source={(require(4002) /* metro dependency 4002: shared */).isThemeDark(theme) ? importDefault(12107) /* metro dependency 12107 */ : importDefault(12108) /* metro dependency 12108 */} style={styles.voiceStatusIconMargin} color={voiceStatusIcon.tintColor} disableColor={localMute} /> : value3;
items4[1] = r9;
r9 = r23 ? <Icon size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.REFRESH_SMALL_16} source={importDefault(12109) /* metro dependency 12109 */} style={voiceStatusIcon} /> : value3;
items4[2] = r9;
if (r21) {
if (localVideoDisabled) {
object4 = {};
object4.size = (require(1305) /* metro dependency 1305: native */).Icon.Sizes.REFRESH_SMALL_16;
object4.source = importDefault(12110) /* metro dependency 12110 */;
object4.style = styles.voiceStatusIconMargin;
object4.disableColor = true;
r20 = object4;
} else {
object2 = {};
object2.size = (require(1305) /* metro dependency 1305: native */).Icon.Sizes.REFRESH_SMALL_16;
object2.source = importDefault(12111) /* metro dependency 12111 */;
object2.style = voiceStatusIcon;
r20 = object2;
}
r9 = <Icon {...r20} />;
} else {
r9 = value3;
}
items4[3] = r9;
if (r18) {
const LiveTag = (require(1305) /* metro dependency 1305: native */).LiveTag;
r9 = <LiveTag style={voiceStatusIcon} />;
} else {
r9 = value3;
}
items4[4] = r9;
r0 = <View {...viewBindingProps}>{items4}</View>;
r1 = value10;
r4 = value10;
r18 = value10;
r21 = r22;
r23 = localDeaf;
r24 = r10;
}
} else {
r0 = value3;
const voiceStatusIcon = isActionSheet ? styles2.voiceStatusIcon : styles.voiceStatusIcon;
const object8 = {onPress: function() {
return onPress(user);
}, label: name};
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
const guild_id = value3 == channel ? value : channel.guild_id;
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
const REFRESH_MEDIUM_32 = AvatarSizes.REFRESH_MEDIUM_32;
object8.leading = (
<Avatar
user={user}
guildId={guild_id}
size={REFRESH_MEDIUM_32}
speaking={value7}
/>
);
if (r1) {
if (r4) {
r0 = value3;
} else {
var viewBindingProps = {style: styles.row};
r9 = (
isSpectating
? (
<Icon
size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.REFRESH_SMALL_16}
source={importDefault(12112) /* metro dependency 12112 */}
style={voiceStatusIcon}
/>
)
: value3
);
items4 = [r9];
r9 = (
r24
? (
<Icon
size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.REFRESH_SMALL_16}
source={(require(4002) /* metro dependency 4002: shared */).isThemeDark(theme) ? importDefault(12107) /* metro dependency 12107 */ : importDefault(12108) /* metro dependency 12108 */}
style={styles.voiceStatusIconMargin}
color={voiceStatusIcon.tintColor}
disableColor={localMute}
/>
)
: value3
);
items4[1] = r9;
r9 = (
r23
? (
<Icon
size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.REFRESH_SMALL_16}
source={importDefault(12109) /* metro dependency 12109 */}
style={voiceStatusIcon}
/>
)
: value3
);
items4[2] = r9;
if (r21) {
if (localVideoDisabled) {
object3 = {};
object3.size = (require(1305) /* metro dependency 1305: native */).Icon.Sizes.REFRESH_SMALL_16;
object3.source = importDefault(12110) /* metro dependency 12110 */;
object3.style = styles.voiceStatusIconMargin;
object3.disableColor = true;
r20 = object3;
} else {
object = {};
object.size = (require(1305) /* metro dependency 1305: native */).Icon.Sizes.REFRESH_SMALL_16;
object.source = importDefault(12111) /* metro dependency 12111 */;
object.style = voiceStatusIcon;
r20 = object;
}
r9 = <Icon {...r20} />;
} else {
r9 = value3;
}
items4[3] = r9;
if (r18) {
const LiveTag = (require(1305) /* metro dependency 1305: native */).LiveTag;
r9 = <LiveTag style={voiceStatusIcon} />;
} else {
r9 = value3;
}
items4[4] = r9;
r0 = (
<View {...viewBindingProps}>
{items4}
</View>
);
}
} else {
r0 = value3;
}
object8.trailing = r0;
const FormRow = (NativeModule2).FormRow;
const formRowProps = {disabled: r4, ...value4, ...object8};
const FormRow2 = (NativeModule2).FormRow;
const Label = FormRow2.Label;
if (value9) {
jsxRuntimeEnv0_13Binding = jsxRuntimeEnv0_13;
items5 = [name];
items5[1] = (
<Text
variant="text-md/semibold"
lineClamp={1}
color="status-positive"
>
{'\xa0'}
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['pFO/Ph'])}
</Text>
);
r9 = (
<>
{items5}
</>
);
} else {
r9 = name;
}
formRowProps['label'] = <Label text={r9} style={isActionSheet ? styles2.labelCallScreen : value3} />;
if (localVideoAutoDisabled) {
var viewBindingProps = {style: styles.autoDisabledVideo};
items7 = [
<Icon
source={importDefault(9149) /* metro dependency 9149 */}
size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.EXTRA_SMALL}
disableColor
/>,
];
items7[1] = (
<Text
variant="text-xs/medium"
color="text-default"
style={styles.autoDisabledVideoLabel}
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.m2Hyj0)}
</Text>
);
r5 = (
<View {...viewBindingProps}>
{items7}
</View>
);
} else {
r5 = r4 ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.IyYqqY) : value3;
}
formRowProps['subLabel'] = r5;
return <FormRow {...formRowProps} />;
function _fun92974() { // fn#92974, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12292:1678, offset: 0x020a1644, size: 181 bytes, params: 1, frame: 15
const value2 = ReactNativeModule.View === user.id;
const object = {};
object.isSelfMute = value2 && MediaEngineStore.isSelfMute();
let mediaEngineStoreBinding = MediaEngineStore;
object.localMute = mediaEngineStoreBinding.isLocalMute(user.id);
object.localDeaf = value2 && MediaEngineStore.isSelfDeaf();
object.localVideo = value2 && MediaEngineStore.isVideoEnabled();
mediaEngineStoreBinding = MediaEngineStore;
const isLocalVideoDisabled = mediaEngineStoreBinding.isLocalVideoDisabled;
userBinding = user;
object.localVideoDisabled = Reflect.apply(isLocalVideoDisabled, mediaEngineStoreBinding, [userBinding.id]);
object.localVideoAutoDisabled = mediaEngineStoreBinding.isLocalVideoAutoDisabled(userBinding.id);
return object;
}
}
object6.trailing = r0;
const FormRow = (require(7972) /* metro dependency 7972: native */).FormRow;
const formRowProps = {disabled: r4, ...value4, ...object6};
const FormRow2 = (require(7972) /* metro dependency 7972: native */).FormRow;
const Label = FormRow2.Label;
if (value9) {
jsxRuntimeEnv0_13Binding = jsxRuntimeEnv0_13;
items5 = [name];
items5[1] = <Text variant="text-md/semibold" lineClamp={1} color="status-positive">{'\xa0'}{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['pFO/Ph'])}</Text>;
r9 = <>{items5}</>;
} else {
r9 = name;
function StreamingUserRow(a0) { // fn#92977, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12292:3875, offset: 0x020a1732, size: 518 bytes, params: 2, frame: 28
var r5;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var value;
const value2 = undefined;
const styles = useStyles();
const styles2 = useStyles();
const user = a0.user;
const channel = a0.channel;
const isActionSheet = a0.isActionSheet;
const streamerActivityByUserId = (require(566) /* metro dependency 566: flux */).useStateFromStores([PresenceStore],
function() {
return require(dependencyMap[27]).getStreamerActivityByUserId(user.id, PresenceStore);
});
const value3 = null;
const r14 = value3 != streamerActivityByUserId ? intl.format((require(1244) /* metro dependency 1244: indexNative */).t['0wJXSh'],
{name: value3 == streamerActivityByUserId.details ? streamerActivityByUserId.name : streamerActivityByUserId.details !== '' ? streamerActivityByUserId.details : streamerActivityByUserId.name}) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.eXan7B);
const jsxRuntimeEnv0_13Binding = jsxRuntimeEnv0_13;
const binding = env0_16;
const bindingProps = {...a0};
const FormSubLabel = (NativeModule2).FormSubLabel;
bindingProps['subLabel'] = <FormSubLabel text={r14} style={isActionSheet ? styles2.labelCallScreen : value3} />;
const binding2 = ((Component) => <Component {...bindingProps} />)(binding);
const id = user.id;
const authenticationStoreBinding = AuthenticationStore;
const getId = authenticationStoreBinding.getId;
const value8 = id !== Reflect.apply(getId, authenticationStoreBinding, []);
if (value8) {
var viewBindingProps = {style: styles.streamPreview};
value = importDefault(10885) /* metro dependency 10885: TouchableStreamPreview */;
value = (
<View {...viewBindingProps}>
{((Component) => <Component guildId={value3 == channel ? value2 : channel.getGuildId()} userId={user.id} disableTransition onPress={onPress_92979} />)(value)}
</View>
);
r5 = value;
} else {
r5 = value8;
}
return (
<>
{binding2}
{r5}
</>
);
function StreamingUserRowOnPress() { // fn#92979, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12292:4422, owner: StreamingUserRow.onPress, offset: 0x020a196f, size: 163 bytes, params: 1, frame: 16
var r1;
var value3;
var moduleValue;
var isModalOpen;
var moduleValue2;
var value4;
var defaultImport;
var hideActionSheet;
var moduleValue3;
const value2 = channel != null;
if (value2) {
value3 = environment.__proto__;
moduleValue = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
isModalOpen = moduleValue.isModalOpen;
moduleValue2 = require(7709) /* metro dependency 7709: PrivateChannelCallUtils */;
r1 = Reflect.apply(isModalOpen, moduleValue, [moduleValue2.getVoiceChannelKey(channel.id)]);
} else {
r1 = value2;
}
if (r1) {
value4 = environment.__proto__;
defaultImport = importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */;
hideActionSheet = defaultImport.hideActionSheet;
moduleValue3 = require(7709) /* metro dependency 7709: PrivateChannelCallUtils */;
Reflect.apply(hideActionSheet, defaultImport, [moduleValue3.getVoiceChannelKey(channel.id)]);
}
}
}
formRowProps['label'] = <Label text={r9} style={isActionSheet ? styles2.labelCallScreen : value3} />;
if (localVideoAutoDisabled) {
var viewBindingProps = {style: styles.autoDisabledVideo};
items7 = [<Icon source={importDefault(9149) /* metro dependency 9149 */} size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.EXTRA_SMALL} disableColor />];
items7[1] = <Text variant="text-xs/medium" color="text-default" style={styles.autoDisabledVideoLabel}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.m2Hyj0)}</Text>;
r5 = <View {...viewBindingProps}>{items7}</View>;
} else {
r5 = r4 ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.IyYqqY) : value3;
function RingButton({channelId, userId, isActionSheet}) { // fn#92980, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12292:4573, offset: 0x020a1a12, size: 270 bytes, params: 2, frame: 22
const styles = useStyles();
const styles2 = useStyles();
if (userId == null) {
return null;
}
if (channelId == null) {
return null;
}
const PressableOpacity = (PressablesModule).PressableOpacity;
const pressableOpacityProps = {onPress: onPress_92981, accessibilityRole: 'button',
style: isActionSheet ? styles2.ringingButton : styles.ringingButton};
const LegacyText = (NativeModule).LegacyText;
const ringingButtonLabel = isActionSheet ? styles2.ringingButtonLabel : styles.ringingButtonLabel;
const intl = (IndexNativeModule).intl;
return (
<PressableOpacity {...pressableOpacityProps}>
<LegacyText style={ringingButtonLabel}>
{intl.string((IndexNativeModule).t.bHa9kN)}
</LegacyText>
</PressableOpacity>
);
function RingButtonOnPress() { // fn#92981, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12292:4708, owner: RingButton.onPress, offset: 0x020a1b20, size: 65 bytes, params: 1, frame: 15
let value = environment.__proto__;
value = importDefault(8916) /* metro dependency 8916: CallActionCreators */;
return value.ring(channelId, [userId], 'voice_user_action_sheet');
}
}
formRowProps['subLabel'] = r5;
return <FormRow {...formRowProps} />;
}
function StreamingUserRow(a0) { // fn#92977, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12292:3875, offset: 0x020a1732, size: 518 bytes, params: 2, frame: 28
var r5;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var value;
const value2 = undefined;
const styles = useStyles();
const styles2 = useStyles();
const user = a0.user;
const channel = a0.channel;
const isActionSheet = a0.isActionSheet;
const streamerActivityByUserId = (require(566) /* metro dependency 566: flux */).useStateFromStores([PresenceStore],
function() {
return require(dependencyMap[27]).getStreamerActivityByUserId(user.id, PresenceStore);
});
const value3 = null;
const r14 = value3 != streamerActivityByUserId ? intl.format((require(1244) /* metro dependency 1244: indexNative */).t['0wJXSh'],
{name: value3 == streamerActivityByUserId.details ? streamerActivityByUserId.name : streamerActivityByUserId.details !== '' ? streamerActivityByUserId.details : streamerActivityByUserId.name}) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.eXan7B);
const jsxRuntimeEnv0_13Binding = jsxRuntimeEnv0_13;
const binding = env0_16;
const bindingProps = {...a0};
const FormSubLabel = (require(7972) /* metro dependency 7972: native */).FormSubLabel;
bindingProps['subLabel'] = <FormSubLabel text={r14} style={isActionSheet ? styles2.labelCallScreen : value3} />;
const binding2 = ((Component) => <Component {...bindingProps} />)(binding);
const id = user.id;
const getId = AuthenticationStore.getId;
const value8 = id !== Reflect.apply(getId, AuthenticationStore, []);
if (value8) {
var viewBindingProps = {style: styles.streamPreview};
value = importDefault(10885) /* metro dependency 10885: TouchableStreamPreview */;
value = <View {...viewBindingProps}>{((Component) => <Component guildId={value3 == channel ? value2 : channel.getGuildId()} userId={user.id} disableTransition onPress={onPress_92979} />)(value)}</View>;
r5 = value;
} else {
r5 = value8;
}
return (
<>
{binding2}
{r5}
</>
);
}
function StopRingButton({channelId, userId, isActionSheet}) { // fn#92982, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12292:4977, offset: 0x020a1b61, size: 270 bytes, params: 2, frame: 22
const styles = useStyles();
const styles2 = useStyles();
if (userId == null) {
return null;
}
if (channelId == null) {
return null;
}
const PressableOpacity = (PressablesModule).PressableOpacity;
const pressableOpacityProps = {onPress: onPress_92983, accessibilityRole: 'button',
style: isActionSheet ? styles2.ringingButton : styles.ringingButton};
const LegacyText = (NativeModule).LegacyText;
const ringingButtonLabel = isActionSheet ? styles2.ringingButtonLabel : styles.ringingButtonLabel;
const intl = (IndexNativeModule).intl;
return (
<PressableOpacity {...pressableOpacityProps}>
<LegacyText style={ringingButtonLabel}>
{intl.string((IndexNativeModule).t.ygslb0)}
</LegacyText>
</PressableOpacity>
);
function StopRingButtonOnPress() { // fn#92983, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12292:5112, owner: StopRingButton.onPress, offset: 0x020a1c6f, size: 58 bytes, params: 1, frame: 14
let value = environment.__proto__;
value = importDefault(8916) /* metro dependency 8916: CallActionCreators */;
return value.stopRinging(channelId, [userId]);
}
function RingButton({channelId, userId, isActionSheet}) { // fn#92980, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12292:4573, offset: 0x020a1a12, size: 270 bytes, params: 2, frame: 22
const styles = useStyles();
const styles2 = useStyles();
if (userId == null) {
return null;
}
if (channelId == null) {
return null;
}
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const pressableOpacityProps = {onPress: onPress_92981, accessibilityRole: 'button',
style: isActionSheet ? styles2.ringingButton : styles.ringingButton};
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
const ringingButtonLabel = isActionSheet ? styles2.ringingButtonLabel : styles.ringingButtonLabel;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<PressableOpacity {...pressableOpacityProps}>
<LegacyText style={ringingButtonLabel}>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.bHa9kN)}
</LegacyText>
</PressableOpacity>
);
}
function StopRingButton({channelId, userId, isActionSheet}) { // fn#92982, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12292:4977, offset: 0x020a1b61, size: 270 bytes, params: 2, frame: 22
const styles = useStyles();
const styles2 = useStyles();
if (userId == null) {
return null;
}
if (channelId == null) {
return null;
}
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const pressableOpacityProps = {onPress: onPress_92983, accessibilityRole: 'button',
style: isActionSheet ? styles2.ringingButton : styles.ringingButton};
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
const ringingButtonLabel = isActionSheet ? styles2.ringingButtonLabel : styles.ringingButtonLabel;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<PressableOpacity {...pressableOpacityProps}>
<LegacyText style={ringingButtonLabel}>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ygslb0)}
</LegacyText>
</PressableOpacity>
);
}
function DisconnectedUserRow({user, channel, isActionSheet, onPress}) { // fn#92984, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12292:5357, offset: 0x020a1ca9, size: 449 bytes, params: 2, frame: 27
var object4;
var r6;
var r1;
var object;
const styles = useStyles();
const useStateFromStores = FluxModule.useStateFromStores;
let id = channel.id;
const value2 = Reflect.apply(useStateFromStores, FluxModule, [[CallStore], _fun92985, [id, user.id]]);
const defaultImport = NicknameUtils;
const getName = defaultImport.getName;
let guild_id = channel.guild_id;
const value3 = Reflect.apply(getName, defaultImport, [guild_id, channel.id, user]);
const value4 = (UseCanRingModule).useCanRing(user, 'DisconnectedUserRow');
object4 = {onPress: function() {
return onPress(user);
}};
const FormRow = (NativeModule2).FormRow;
const Label = FormRow.Label;
object4.label = <Label text={value3} style={isActionSheet ? styles.labelCallScreen : null} />;
const Avatar = (NativeModule).Avatar;
guild_id = channel.guild_id;
const AvatarSizes = (NativeModule).AvatarSizes;
const REFRESH_MEDIUM_32 = AvatarSizes.REFRESH_MEDIUM_32;
object4.leading = (
<Avatar
user={user}
guildId={guild_id}
size={REFRESH_MEDIUM_32}
/>
);
if (value4) {
r6 = value2 ? StopRingButton : RingButton;
object = {};
id = channel.id;
object.channelId = id;
id = user.id;
object.userId = id;
object.isActionSheet = isActionSheet;
r1 = ((Component) => <Component {...object} />)(r6);
} else {
r1 = null;
}
object4.trailing = r1;
return <FormRow {...object4} />;
function _fun92985() { // fn#92985, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12292:5477, offset: 0x020a1e6a, size: 66 bytes, params: 1, frame: 12
const value = environment.__proto__;
const call = CallStore.getCall(channel.id);
return call != null && call.ringing.includes(user.id);
}
function DisconnectedUserRow({user, channel, isActionSheet, onPress}) { // fn#92984, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12292:5357, offset: 0x020a1ca9, size: 449 bytes, params: 2, frame: 27
var object3;
var r6;
var r1;
var object2;
const styles = useStyles();
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStores = fluxModule.useStateFromStores;
let id = channel.id;
const value2 = Reflect.apply(useStateFromStores, fluxModule, [[CallStore], _fun92985, [id, user.id]]);
const defaultImport = importDefault(4617) /* metro dependency 4617: NicknameUtils */;
const getName = defaultImport.getName;
let guild_id = channel.guild_id;
const value3 = Reflect.apply(getName, defaultImport, [guild_id, channel.id, user]);
const value4 = (require(8917) /* metro dependency 8917: useCanRing */).useCanRing(user, 'DisconnectedUserRow');
object3 = {onPress: function() {
return onPress(user);
}};
const FormRow = (require(7972) /* metro dependency 7972: native */).FormRow;
const Label = FormRow.Label;
object3.label = <Label text={value3} style={isActionSheet ? styles.labelCallScreen : null} />;
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
guild_id = channel.guild_id;
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
const REFRESH_MEDIUM_32 = AvatarSizes.REFRESH_MEDIUM_32;
object3.leading = <Avatar user={user} guildId={guild_id} size={REFRESH_MEDIUM_32} />;
if (value4) {
r6 = value2 ? StopRingButton : RingButton;
object2 = {};
id = channel.id;
object2.channelId = id;
id = user.id;
object2.userId = id;
object2.isActionSheet = isActionSheet;
r1 = ((Component) => <Component {...object2} />)(r6);
} else {
r1 = null;
}
object3.trailing = r1;
return <FormRow {...object3} />;
}
function _fun92987(a0) { // fn#92987, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12292:5976, offset: 0x020a1eac, size: 243 bytes, params: 2, frame: 21
const voiceState = a0.voiceState;
const user = a0.user;
const nick = a0.nick;
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(voiceState?.channelId);
});
const value2 = (importDefault(3995) /* metro dependency 3995: UserUtils */).useName(user);
return voiceState == null ? ((Component) => <Component {...a0} {...{['name']: nick ?? value2}} {...{['channel']: channel}} {...{['withStream']: false}} />)(env0_16) : voiceState.selfStream ? <StreamingUserRow {...a0} {...{['name']: nick ?? value2}} {...{['channel']: channel}} /> : ((Component) => <Component {...a0} {...{['name']: nick ?? value2}} {...{['channel']: channel}} {...{['withStream']: false}} />)(env0_16);
}
function _fun92974() { // fn#92974, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12292:1678, offset: 0x020a1644, size: 181 bytes, params: 1, frame: 15
const value2 = env0_3 === user.id;
const object2 = {};
object2.isSelfMute = value2 && MediaEngineStore.isSelfMute();
object2.localMute = MediaEngineStore.isLocalMute(user.id);
object2.localDeaf = value2 && MediaEngineStore.isSelfDeaf();
object2.localVideo = value2 && MediaEngineStore.isVideoEnabled();
const isLocalVideoDisabled = MediaEngineStore.isLocalVideoDisabled;
userBinding = user;
object2.localVideoDisabled = Reflect.apply(isLocalVideoDisabled, MediaEngineStore, [userBinding.id]);
object2.localVideoAutoDisabled = MediaEngineStore.isLocalVideoAutoDisabled(userBinding.id);
return object2;
}
function StreamingUserRowOnPress() { // fn#92979, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12292:4422, owner: StreamingUserRow.onPress, offset: 0x020a196f, size: 163 bytes, params: 1, frame: 16
var r1;
var value3;
var moduleValue;
var isModalOpen;
var moduleValue2;
var value4;
var defaultImport;
var hideActionSheet;
var moduleValue3;
const value2 = channel != null;
if (value2) {
value3 = environment.__proto__;
moduleValue = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
isModalOpen = moduleValue.isModalOpen;
moduleValue2 = require(7709) /* metro dependency 7709: PrivateChannelCallUtils */;
r1 = Reflect.apply(isModalOpen, moduleValue, [moduleValue2.getVoiceChannelKey(channel.id)]);
} else {
r1 = value2;
}
if (r1) {
value4 = environment.__proto__;
defaultImport = importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */;
hideActionSheet = defaultImport.hideActionSheet;
moduleValue3 = require(7709) /* metro dependency 7709: PrivateChannelCallUtils */;
Reflect.apply(hideActionSheet, defaultImport, [moduleValue3.getVoiceChannelKey(channel.id)]);
function _fun92987(a0) { // fn#92987, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12292:5976, offset: 0x020a1eac, size: 243 bytes, params: 2, frame: 21
const voiceState = a0.voiceState;
const user = a0.user;
const nick = a0.nick;
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(voiceState?.channelId);
});
const value2 = (UserUtils).useName(user);
return (
voiceState == null
? ((Component) => <Component {...a0} {...{['name']: nick ?? value2}} {...{['channel']: channel}} {...{['withStream']: false}} />)(env0_16)
: (
voiceState.selfStream
? (
<StreamingUserRow
{...a0}
{...{['name']: nick ?? value2}}
{...{['channel']: channel}}
/>
)
: ((Component) => <Component {...a0} {...{['name']: nick ?? value2}} {...{['channel']: channel}} {...{['withStream']: false}} />)(env0_16)
)
);
}
}
function RingButtonOnPress() { // fn#92981, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12292:4708, owner: RingButton.onPress, offset: 0x020a1b20, size: 65 bytes, params: 1, frame: 15
let value = environment.__proto__;
value = importDefault(8916) /* metro dependency 8916: CallActionCreators */;
return value.ring(channelId, [userId], 'voice_user_action_sheet');
}
function StopRingButtonOnPress() { // fn#92983, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12292:5112, owner: StopRingButton.onPress, offset: 0x020a1c6f, size: 58 bytes, params: 1, frame: 14
let value = environment.__proto__;
value = importDefault(8916) /* metro dependency 8916: CallActionCreators */;
return value.stopRinging(channelId, [userId]);
}
function _fun92985() { // fn#92985, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12292:5477, offset: 0x020a1e6a, size: 66 bytes, params: 1, frame: 12
const value = environment.__proto__;
const call = CallStore.getCall(channel.id);
return call != null && call.ringing.includes(user.id);
}
global.__d(_fun92971, 12106, [31, 27, 1310, 1226, 4258, 1379, 1945, 4259, 4396, 661, 33, 4501, 697, 4612, 566, 4002,
12107, 12108, 1305, 12109, 12110, 12111, 12112, 9149, 4573, 1244, 7972, 7128, 10885, 4007, 7709, 4080, 8916,
5278, 4617, 8917, 3995,
2]) /* metro module 12106, dependencies: [31, 27, 1310, 1226, 4258, 1379, 1945, 4259, 4396, 661, 33, 4501, 697, 4612, 566, 4002, 12107, 12108, 1305, 12109, 12110, 12111, 12112, 9149, 4573, 1244, 7972, 7128, 10885, 4007, 7709, 4080, 8916, 5278, 4617, 8917, 3995, 2] */;
@@ -1,27 +1,31 @@
/* Metro module 9239; source: modules/voice_calls/native/audio_output_selector/showAudioOutputSelector.tsx; dependencies: [27, 9240, 477, 4080, 9241, 1962, 2] */
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 VoicePanelHeaderConstantsModule from '../../../voice_panel/native/header/VoicePanelHeaderConstants.tsx'; /* Metro dependency 9240 */
function _fun72244(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#72244, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9424:6, offset: 0x01d3fa27, size: 146 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(27) /* metro dependency 27 */).NativeModules;
const env0_4 = (require(9240) /* metro dependency 9240: VoicePanelHeaderConstants */).VOICE_PANEL_AUDIO_OUTPUT_ACTION_SHEET_KEY;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_calls/native/audio_output_selector/showAudioOutputSelector.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_calls/native/audio_output_selector/showAudioOutputSelector.tsx');
exports.showAudioOutputSelector = showAudioOutputSelector;
}
function showAudioOutputSelector(a0, a1) { // fn#72245, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9424:308, offset: 0x01d3fab9, size: 158 bytes, params: 3, frame: 17
var AudioRoutePicker;
var defaultImport;
const moduleValue = require(dependencyMap[2]);
if (moduleValue.isAndroid()) {
defaultImport = importDefault(dependencyMap[3]);
defaultImport.openLazy(require(dependencyMap[5])(dependencyMap[4], dependencyMap.paths),
VOICE_PANEL_AUDIO_OUTPUT_ACTION_SHEET_KEY, {channelId: a0, isConnectedToVoiceChannel: a1});
} else {
AudioRoutePicker = NativeModules.AudioRoutePicker;
if (AudioRoutePicker != null) {
AudioRoutePicker.showAudioPicker();
function showAudioOutputSelector(a0, a1) { // fn#72245, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9424:308, offset: 0x01d3fab9, size: 158 bytes, params: 3, frame: 17
var AudioRoutePicker;
var defaultImport;
const moduleValue = require(dependencyMap[2]);
if (moduleValue.isAndroid()) {
defaultImport = importDefault(dependencyMap[3]);
defaultImport.openLazy(require(dependencyMap[5])(dependencyMap[4], dependencyMap.paths),
VOICE_PANEL_AUDIO_OUTPUT_ACTION_SHEET_KEY, {channelId: a0, isConnectedToVoiceChannel: a1});
} else {
AudioRoutePicker = NativeModules.AudioRoutePicker;
if (AudioRoutePicker != null) {
AudioRoutePicker.showAudioPicker();
}
}
}
}
global.__d(_fun72244, 9239, [27, 9240, 477, 4080, 9241, 1962,
2]) /* metro module 9239, dependencies: [27, 9240, 477, 4080, 9241, 1962, 2] */;
@@ -1,66 +1,76 @@
/* Metro module 12116; source: modules/voice_calls/native/components/OngoingCallStatusLabel.tsx; dependencies: [31, 1226, 4258, 4297, 33, 566, 1244, 12115, 1305, 2] */
import AuthenticationStore from '../../../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */
import CallStore from '../../../../stores/CallStore.tsx'; /* Metro dependency 4258 */
import VoiceStateStore from '../../../../stores/VoiceStateStore.tsx'; /* Metro dependency 4297 */
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 JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as FluxModule from '../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as NativeModule from '../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as CallStateHooksModule from '../CallStateHooks.tsx'; /* Metro dependency 12115 */
function _fun93013(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#93013, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12302:6, offset: 0x020a2ee0, size: 182 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const callStore = importDefault(4258) /* metro dependency 4258: CallStore */;
const voiceStateStore = importDefault(4297) /* metro dependency 4297: VoiceStateStore */;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_calls/native/components/OngoingCallStatusLabel.tsx');
ReactModule;
(FileImportTrackerModule).fileFinishedImporting('modules/voice_calls/native/components/OngoingCallStatusLabel.tsx');
exports.default = _default_93014;
}
function _default_93014({style, channel, voiceState, useAllAloneText}) { // fn#93014, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12302:157, offset: 0x020a2f96, size: 100 bytes, params: 2, frame: 17
useAllAloneText = useAllAloneText === undefined || useAllAloneText;
const value = _fun93015(channel, voiceState, useAllAloneText);
const LegacyText = (NativeModule).LegacyText;
return (
<LegacyText style={style}>
{value}
</LegacyText>
);
function _fun93015(a0, a1) { // fn#93015, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12302:222, offset: 0x020a2ffa, size: 538 bytes, params: 3, frame: 23
var environment;
var r0;
let value = a2;
const env0_0 = a0;
let r1 = !(value !== undefined) || value;
value = environment.__proto__;
const value3 = (FluxModule).useStateFromStores([VoiceStateStore, CallStore],
_fun93016, [AuthenticationStore.getId(), a0]);
const intl = (IndexNativeModule).intl;
const string = intl.string;
const t = (IndexNativeModule).t;
const value4 = Reflect.apply(string, intl, [t['1zFMqU']]);
const CallStates = (CallStateHooksModule).CallStates;
const DISCONNECTING = CallStates.DISCONNECTING;
if (DISCONNECTING === a1) {
r1 = value3 && r1 ? intl.string(t.xNeSms) : intl.string(t['NGg/fm']);
r0 = r1;
} else if (CallStates.CONNECTED === a1) {
r1 = value3 && r1 ? intl.string(t.xNeSms) : intl.string(t['NGg/fm']);
r0 = r1;
} else {
r0 = CallStates.RINGING === a1 ? intl.string(t.Xuzre8) : CallStates.DISCONNECTED !== a1 ? value4 : intl.string(t['w//7ET']);
}
return r0;
function _fun93016() { // fn#93016, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12302:287, offset: 0x020a3214, size: 151 bytes, params: 1, frame: 17
if (env0_0 == null) {
return false;
}
const Object = global.Object;
const values = Object.values;
const voiceStateStoreBinding = VoiceStateStore;
const getVoiceStatesForChannel = voiceStateStoreBinding.getVoiceStatesForChannel;
const binding = env0_0;
const value3 = Reflect.apply(values, Object, [Reflect.apply(getVoiceStatesForChannel, voiceStateStoreBinding,
[binding.id])]);
const call = CallStore.getCall(binding.id);
return !(call != null && call.ringing.length > 0) && value3.length === 1 && value3[0].userId === env0_1;
}
function _default_93014({style, channel, voiceState, useAllAloneText}) { // fn#93014, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12302:157, offset: 0x020a2f96, size: 100 bytes, params: 2, frame: 17
useAllAloneText = useAllAloneText === undefined || useAllAloneText;
const value = _fun93015(channel, voiceState, useAllAloneText);
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
return (
<LegacyText style={style}>
{value}
</LegacyText>
);
}
}
function _fun93015(a0, a1) { // fn#93015, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12302:222, offset: 0x020a2ffa, size: 538 bytes, params: 3, frame: 23
var environment;
var r0;
let value = a2;
const env0_0 = a0;
let r1 = !(value !== undefined) || value;
value = environment.__proto__;
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([VoiceStateStore, CallStore],
_fun93016, [AuthenticationStore.getId(), a0]);
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const value4 = Reflect.apply(string, intl, [t['1zFMqU']]);
const CallStates = (require(12115) /* metro dependency 12115: CallStateHooks */).CallStates;
const DISCONNECTING = CallStates.DISCONNECTING;
if (DISCONNECTING === a1) {
r1 = value3 && r1 ? intl.string(t.xNeSms) : intl.string(t['NGg/fm']);
r0 = r1;
} else if (CallStates.CONNECTED === a1) {
r1 = value3 && r1 ? intl.string(t.xNeSms) : intl.string(t['NGg/fm']);
r0 = r1;
} else {
r0 = CallStates.RINGING === a1 ? intl.string(t.Xuzre8) : CallStates.DISCONNECTED !== a1 ? value4 : intl.string(t['w//7ET']);
}
return r0;
}
function _fun93016() { // fn#93016, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12302:287, offset: 0x020a3214, size: 151 bytes, params: 1, frame: 17
if (env0_0 == null) {
return false;
}
const Object = global.Object;
const values = Object.values;
const getVoiceStatesForChannel = VoiceStateStore.getVoiceStatesForChannel;
const binding = env0_0;
const value3 = Reflect.apply(values, Object, [Reflect.apply(getVoiceStatesForChannel, VoiceStateStore,
[binding.id])]);
const call = CallStore.getCall(binding.id);
return !(call != null && call.ringing.length > 0) && value3.length === 1 && value3[0].userId === env0_1;
}
global.__d(_fun93013, 12116, [31, 1226, 4258, 4297, 33, 566, 1244, 12115, 1305,
2]) /* metro module 12116, dependencies: [31, 1226, 4258, 4297, 33, 566, 1244, 12115, 1305, 2] */;
@@ -1,23 +1,29 @@
/* Metro module 12117; source: modules/voice_calls/native/components/OngoingCallTimer.tsx; dependencies: [31, 4258, 33, 566, 21, 12118, 2] */
import CallStore from '../../../../stores/CallStore.tsx'; /* Metro dependency 4258 */
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 JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as FluxModule from '../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
function _fun93017(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#93017, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12303:6, offset: 0x020a32ab, size: 154 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const callStore = importDefault(4258) /* metro dependency 4258: CallStore */;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_calls/native/components/OngoingCallTimer.tsx');
ReactModule;
(FileImportTrackerModule).fileFinishedImporting('modules/voice_calls/native/components/OngoingCallTimer.tsx');
exports.default = _default_93018;
function _default_93018({style, channelId}) { // fn#93018, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12303:137, offset: 0x020a3345, size: 168 bytes, params: 2, frame: 19
const value2 = (FluxModule).useStateFromStores([CallStore], _fun93019,
[channelId]);
return ((Component) => <Component style={style} timestamp={value2 != null ? (importDefault(21) /* metro dependency 21: SnowflakeUtils */).extractTimestamp(value2) : 0} />)(importDefault(12118) /* metro dependency 12118: Timer */);
function _fun93019() { // fn#93019, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12303:201, offset: 0x020a33ed, size: 43 bytes, params: 1, frame: 11
const value = environment.__proto__;
return CallStore.getCall(channelId)?.messageId;
}
}
}
function _default_93018({style, channelId}) { // fn#93018, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12303:137, offset: 0x020a3345, size: 168 bytes, params: 2, frame: 19
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([CallStore], _fun93019,
[channelId]);
return ((Component) => <Component style={style} timestamp={value2 != null ? (importDefault(21) /* metro dependency 21: SnowflakeUtils */).extractTimestamp(value2) : 0} />)(importDefault(12118) /* metro dependency 12118: Timer */);
}
function _fun93019() { // fn#93019, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12303:201, offset: 0x020a33ed, size: 43 bytes, params: 1, frame: 11
const value = environment.__proto__;
return CallStore.getCall(channelId)?.messageId;
}
global.__d(_fun93017, 12117, [31, 4258, 33, 566, 21, 12118,
2]) /* metro module 12117, dependencies: [31, 4258, 33, 566, 21, 12118, 2] */;
@@ -1,285 +1,291 @@
/* Metro module 12118; source: modules/voice_calls/native/components/Timer.tsx; dependencies: [6, 7, 15, 17, 18, 31, 33, 22, 1305, 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 * 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 JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as NativeModule from '../../../../design/void/native.tsx'; /* Metro dependency 1305 */
function _fun93020(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#93020, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12304:6, offset: 0x020a3418, size: 260 bytes, params: 8, frame: 19
const env0_0 = require;
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 = importAll(31) /* metro dependency 31 */;
const env0_8 = (require(33) /* metro dependency 33 */).jsxs;
let value = ReactModule;
const PureComponent = value.PureComponent;
value = _fun93024(PureComponent);
value.defaultProps = {'hideMinutes': false, 'hideHours': false};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_calls/native/components/Timer.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_calls/native/components/Timer.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_93021() { // fn#93021, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12304:173, offset: 0x020a351c, 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_93021_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun93024(a0) { // fn#93024, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12304:372, offset: 0x020a357e, size: 122 bytes, params: 2, frame: 16
const closure = Timer;
env0_7(closure, a0);
return env0_4(closure, [{key: 'componentDidMount', value: function() {
var countdown = this.props.countdown;
var setInterval = global.setInterval;
if (countdown) {
this._timerId = setInterval(this._decrementSecond, 1000);
} else {
this._timerId = setInterval(this._incrementSecond, 1000);
function _isNativeReflectConstruct_93021() { // fn#93021, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12304:173, offset: 0x020a351c, 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) {
}
}}, {key: 'componentWillUnmount', value: function() {
global.clearInterval(this._timerId);
this._timerId = null;
}}, {key: 'render', value: value_93030}]);
}
function Timer(a0) { // fn#93025, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12304:384, offset: 0x020a35f8, size: 400 bytes, params: 2, frame: 22
var environment;
var r3;
var r6;
var r7;
var Math;
var max;
var Date;
var value5;
var floor;
var value6;
var value7;
var value8;
var value9;
var value10;
let value = environment.__proto__;
env1_3(this, Timer);
const items = [a0];
const value3 = env1_6(Timer);
value = env1_5(this, _isNativeReflectConstruct_93021() ? global.Reflect.construct(value3, items,
env1_6(this).constructor) : value3.apply(this, items));
value._incrementSecond = _incrementSecond;
value._decrementSecond = _decrementSecond;
const seconds = a0.seconds;
const minutes = a0.minutes;
const hours = a0.hours;
const timestamp = a0.timestamp;
if (timestamp == null) {
r3 = hours;
r6 = minutes;
r7 = seconds;
} else if (timestamp > 0) {
Math = global.Math;
max = Math.max;
Date = global.Date;
value5 = Reflect.apply(max, Math, [0, Date.now() - timestamp]) / 1000;
Math = global.Math;
floor = Math.floor;
value6 = value5 % 86400;
value7 = Reflect.apply(floor, Math, [value6 / 3600]);
Math = global.Math;
floor = Math.floor;
value8 = value6 % 3600;
value9 = Reflect.apply(floor, Math, [value8 / 60]);
Math = global.Math;
value10 = Math.floor(value8 % 60);
r3 = value7;
r6 = value9;
r7 = value10;
} else {
r3 = hours;
r6 = minutes;
r7 = seconds;
return (_isNativeReflectConstruct_93021_isNativeReflectConstruct = function() {
return !!result;
})();
}
const value11 = 0;
value.state = {seconds: r7 ?? value11, minutes: r6 ?? value11, hours: r3 ?? value11};
return value;
}
function value_93030() { // fn#93030, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12304:1564, offset: 0x020a3935, size: 404 bytes, params: 1, frame: 21
var r7;
var r6;
var r5;
var value;
const {style, hideHours, hideMinutes} = this.props;
const {seconds, minutes, hours} = this.state;
if (hideHours) {
value = '';
if (hours === 0) {
r7 = value;
} else {
function _fun93024(a0) { // fn#93024, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12304:372, offset: 0x020a357e, size: 122 bytes, params: 2, frame: 16
const Timer_930252 = Timer_93025;
Inherits(Timer_930252, a0);
return CreateClass(Timer_930252, [{key: 'componentDidMount', value: function() {
var countdown = this.props.countdown;
var setInterval = global.setInterval;
if (countdown) {
this._timerId = setInterval(this._decrementSecond, 1000);
} else {
this._timerId = setInterval(this._incrementSecond, 1000);
}
}}, {key: 'componentWillUnmount', value: function() {
global.clearInterval(this._timerId);
this._timerId = null;
}}, {key: 'render', value: value_93030}]);
function Timer_93025(a0) { // fn#93025, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12304:384, offset: 0x020a35f8, size: 400 bytes, params: 2, frame: 22
var environment;
var r3;
var r6;
var r7;
var Math;
var max;
var Date;
var value5;
var floor;
var value6;
var value7;
var value8;
var value9;
var value10;
let value = environment.__proto__;
env1_3(this, Timer_93025);
const items2 = [a0];
const value3 = env1_6(Timer_93025);
value = env1_5(this, _isNativeReflectConstruct_93021() ? global.Reflect.construct(value3, items2,
env1_6(this).constructor) : value3.apply(this, items2));
value._incrementSecond = _incrementSecond;
value._decrementSecond = _decrementSecond;
const seconds = a0.seconds;
const minutes = a0.minutes;
const hours = a0.hours;
const timestamp = a0.timestamp;
if (timestamp == null) {
r3 = hours;
r6 = minutes;
r7 = seconds;
} else if (timestamp > 0) {
Math = global.Math;
max = Math.max;
Date = global.Date;
value5 = Reflect.apply(max, Math, [0, Date.now() - timestamp]) / 1000;
Math = global.Math;
floor = Math.floor;
value6 = value5 % 86400;
value7 = Reflect.apply(floor, Math, [value6 / 3600]);
Math = global.Math;
floor = Math.floor;
value8 = value6 % 3600;
value9 = Reflect.apply(floor, Math, [value8 / 60]);
Math = global.Math;
value10 = Math.floor(value8 % 60);
r3 = value7;
r6 = value9;
r7 = value10;
} else {
r3 = hours;
r6 = minutes;
r7 = seconds;
}
const value11 = 0;
value.state = {seconds: r7 ?? value11, minutes: r6 ?? value11, hours: r3 ?? value11};
return value;
function _incrementSecond() { // fn#93026, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12304:591, owner: Timer_93025._incrementSecond, offset: 0x020a3788, size: 111 bytes, params: 1, frame: 17
var r1;
var r2;
var r3;
var r4;
var r5;
var value3;
var value4;
var value5;
var value6;
const {seconds, minutes, hours} = env0_0.state;
const value2 = seconds + 1;
if (value2 >= 60) {
value3 = minutes + 1;
if (value3 >= 60) {
value4 = hours + 1;
value5 = 0;
r1 = value4;
r2 = value5;
} else {
r1 = hours;
r2 = value3;
}
value6 = 0;
r3 = r1;
r4 = r2;
r5 = value6;
} else {
r3 = hours;
r4 = minutes;
r5 = value2;
}
const binding = env0_0;
binding.setState({seconds: r5, minutes: r4, hours: r3});
}
function _decrementSecond() { // fn#93027, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12304:747, owner: Timer_93025._decrementSecond, offset: 0x020a37f7, size: 201 bytes, params: 1, frame: 20
var r1;
var r2;
var r3;
var r4;
var r5;
var r6;
var value5;
var value6;
var value7;
var value8;
var binding;
var clearInterval;
var onComplete;
const {seconds, minutes, hours} = env0_0.state;
const value2 = seconds - 1;
if (value2 < 1) {
if (minutes >= 1) {
value7 = minutes - 1;
value8 = 59;
r1 = hours;
r2 = value7;
r3 = value8;
} else if (minutes < 1 && hours >= 1) {
value5 = hours - 1;
value6 = 59;
r1 = value5;
r2 = value6;
r3 = value6;
} else {
r1 = hours;
r2 = minutes;
r3 = value2;
}
r4 = r1;
r5 = r2;
r6 = r3;
} else {
r4 = hours;
r5 = minutes;
r6 = value2;
}
if (r6 <= 0) {
clearInterval = global.clearInterval;
binding = env0_0;
clearInterval(binding._timerId);
binding._timerId = null;
onComplete = binding.props.onComplete;
if (onComplete != null) {
onComplete();
}
} else {
binding = env0_0;
binding.setState({seconds: r6, minutes: r5, hours: r4});
}
}
}
function value_93030() { // fn#93030, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12304:1564, offset: 0x020a3935, size: 404 bytes, params: 1, frame: 21
var r7;
var r6;
var r5;
var value;
const {style, hideHours, hideMinutes} = this.props;
const {seconds, minutes, hours} = this.state;
if (hideHours) {
value = '';
if (hours === 0) {
r7 = value;
} else {
value = environment.__proto__;
value = importDefault(22) /* metro dependency 22 */;
value = value.padStart(global.String(hours), 2, '0');
value = '' + value + ':';
r7 = value;
}
} else {
value = environment.__proto__;
value = importDefault(22) /* metro dependency 22 */;
value = value.padStart(global.String(hours), 2, '0');
value = '' + value + ':';
r7 = value;
}
if (hideMinutes) {
value = '';
if (minutes === 0) {
r6 = value;
} else {
value = environment.__proto__;
value = importDefault(22) /* metro dependency 22 */;
value = value.padStart(global.String(minutes), 2, '0');
value = '' + value + ':';
r6 = value;
}
} else {
value = environment.__proto__;
value = importDefault(22) /* metro dependency 22 */;
value = value.padStart(global.String(minutes), 2, '0');
value = '' + value + ':';
r6 = value;
}
if (r7.length > 0) {
value = environment.__proto__;
value = importDefault(22) /* metro dependency 22 */;
value = value.padStart(global.String(seconds), 2, '0');
r5 = value;
} else if (r6.length > 0) {
value = environment.__proto__;
value = importDefault(22) /* metro dependency 22 */;
value = value.padStart(global.String(seconds), 2, '0');
r5 = value;
} else {
r5 = seconds;
}
value = environment.__proto__;
value = importDefault(22) /* metro dependency 22 */;
value = value.padStart(global.String(hours), 2, '0');
value = '' + value + ':';
r7 = value;
const LegacyText = (NativeModule).LegacyText;
return (
<LegacyText style={style} accessibilityRole="timer">
{r7}
{r6}
{r5}
</LegacyText>
);
}
} else {
value = environment.__proto__;
value = importDefault(22) /* metro dependency 22 */;
value = value.padStart(global.String(hours), 2, '0');
value = '' + value + ':';
r7 = value;
}
if (hideMinutes) {
value = '';
if (minutes === 0) {
r6 = value;
} else {
value = environment.__proto__;
value = importDefault(22) /* metro dependency 22 */;
value = value.padStart(global.String(minutes), 2, '0');
value = '' + value + ':';
r6 = value;
}
} else {
value = environment.__proto__;
value = importDefault(22) /* metro dependency 22 */;
value = value.padStart(global.String(minutes), 2, '0');
value = '' + value + ':';
r6 = value;
}
if (r7.length > 0) {
value = environment.__proto__;
value = importDefault(22) /* metro dependency 22 */;
value = value.padStart(global.String(seconds), 2, '0');
r5 = value;
} else if (r6.length > 0) {
value = environment.__proto__;
value = importDefault(22) /* metro dependency 22 */;
value = value.padStart(global.String(seconds), 2, '0');
r5 = value;
} else {
r5 = seconds;
}
value = environment.__proto__;
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
return (
<LegacyText style={style} accessibilityRole="timer">
{r7}
{r6}
{r5}
</LegacyText>
);
}
function _incrementSecond() { // fn#93026, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12304:591, owner: Timer._incrementSecond, offset: 0x020a3788, size: 111 bytes, params: 1, frame: 17
var r1;
var r2;
var r3;
var r4;
var r5;
var value3;
var value4;
var value5;
var value6;
const {seconds, minutes, hours} = env0_0.state;
const value2 = seconds + 1;
if (value2 >= 60) {
value3 = minutes + 1;
if (value3 >= 60) {
value4 = hours + 1;
value5 = 0;
r1 = value4;
r2 = value5;
} else {
r1 = hours;
r2 = value3;
}
value6 = 0;
r3 = r1;
r4 = r2;
r5 = value6;
} else {
r3 = hours;
r4 = minutes;
r5 = value2;
}
const binding = env0_0;
binding.setState({seconds: r5, minutes: r4, hours: r3});
}
function _decrementSecond() { // fn#93027, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12304:747, owner: Timer._decrementSecond, offset: 0x020a37f7, size: 201 bytes, params: 1, frame: 20
var r1;
var r2;
var r3;
var r4;
var r5;
var r6;
var value5;
var value6;
var value7;
var value8;
var binding;
var clearInterval;
var onComplete;
const {seconds, minutes, hours} = env0_0.state;
const value2 = seconds - 1;
if (value2 < 1) {
if (minutes >= 1) {
value7 = minutes - 1;
value8 = 59;
r1 = hours;
r2 = value7;
r3 = value8;
} else if (minutes < 1 && hours >= 1) {
value5 = hours - 1;
value6 = 59;
r1 = value5;
r2 = value6;
r3 = value6;
} else {
r1 = hours;
r2 = minutes;
r3 = value2;
}
r4 = r1;
r5 = r2;
r6 = r3;
} else {
r4 = hours;
r5 = minutes;
r6 = value2;
}
if (r6 <= 0) {
clearInterval = global.clearInterval;
binding = env0_0;
clearInterval(binding._timerId);
binding._timerId = null;
onComplete = binding.props.onComplete;
if (onComplete != null) {
onComplete();
}
} else {
binding = env0_0;
binding.setState({seconds: r6, minutes: r5, hours: r4});
}
}
global.__d(_fun93020, 12118, [6, 7, 15, 17, 18, 31, 33, 22, 1305,
2]) /* metro module 12118, dependencies: [6, 7, 15, 17, 18, 31, 33, 22, 1305, 2] */;
@@ -1,22 +1,27 @@
/* Metro module 8108; source: modules/voice_calls/showActivitiesInvalidPermissionsAlert.tsx; dependencies: [4647, 1244, 2] */
import AlertActionCreators from '../../actions/AlertActionCreators.tsx'; /* Metro dependency 4647 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as IndexNativeModule from '../../intl/index.native.tsx'; /* Metro dependency 1244 */
function _fun64987(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#64987, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8293:6, offset: 0x01bbc281, size: 101 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_calls/showActivitiesInvalidPermissionsAlert.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_calls/showActivitiesInvalidPermissionsAlert.tsx');
exports.showActivitiesInvalidPermissionsAlert = showActivitiesInvalidPermissionsAlert;
function showActivitiesInvalidPermissionsAlert() { // fn#64988, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8293:227, offset: 0x01bbc2e6, size: 153 bytes, params: 1, frame: 18
const defaultImport = AlertActionCreators;
const show = defaultImport.show;
const object = {};
const intl = (IndexNativeModule).intl;
const string = intl.string;
const t = (IndexNativeModule).t;
object.title = Reflect.apply(string, intl, [t.otsg2R]);
object.body = intl.string(t['/Yx5qX']);
object.hideActionSheet = false;
Reflect.apply(show, defaultImport, [object]);
}
}
function showActivitiesInvalidPermissionsAlert() { // fn#64988, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8293:227, offset: 0x01bbc2e6, size: 153 bytes, params: 1, frame: 18
const defaultImport = importDefault(4647) /* metro dependency 4647: AlertActionCreators */;
const show = defaultImport.show;
const object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
object2.title = Reflect.apply(string, intl, [t.otsg2R]);
object2.body = intl.string(t['/Yx5qX']);
object2.hideActionSheet = false;
Reflect.apply(show, defaultImport, [object2]);
}
global.__d(_fun64987, 8108, [4647, 1244, 2]) /* metro module 8108, dependencies: [4647, 1244, 2] */;
@@ -1,85 +1,89 @@
/* Metro module 15706; source: modules/voice_calls/trackVoiceFeedback.tsx; dependencies: [29, 5, 4259, 12396, 683, 2] */
import Module00005 from '../../by-id/module-00005.js'; /* Metro dependency 5 */
import ObjectWithoutProperties from '../../by-id/module-00029-ObjectWithoutProperties.js'; /* Metro dependency 29 */
import MediaEngineStore from '../../stores/MediaEngineStore.tsx'; /* Metro dependency 4259 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun120540(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#120540, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15914:6, offset: 0x0252f0c7, size: 171 bytes, params: 8, frame: 18
const env0_2 = ['output_audio_route_type'];
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(29) /* metro dependency 29 */;
const env0_4 = importDefault(5) /* metro dependency 5 */;
const mediaEngineStore = importDefault(4259) /* metro dependency 4259: MediaEngineStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_calls/trackVoiceFeedback.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_calls/trackVoiceFeedback.tsx');
exports.default = function() {
return _trackVoiceFeedback.apply(this, arguments);
};
function _trackVoiceFeedback() { // fn#120541, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15914:160, offset: 0x0252f172, size: 50 bytes, params: 1, frame: 14
return Module00005(_fun120543).apply(this, arguments);
async function _fun120543(a0, {rating, category, reasonCode, reasonDescription, variant, feedback, analyticsData}) { // fn#120543, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15914:221, offset: 0x0252f1b8, size: 629 bytes, params: 3, frame: 34
if (false) {
return undefined;
}
value = undefined;
await value;
if (false) {
return undefined;
}
let binding = env2_5;
const settings = binding.getSettings();
const inputDeviceId = env2_5.getInputDeviceId();
binding = env2_5;
const getInputDevices = binding.getInputDevices;
const property = Reflect.apply(getInputDevices, binding, [])[inputDeviceId];
const outputDeviceId = env2_5.getOutputDeviceId();
binding = env2_5;
const getOutputDevices = binding.getOutputDevices;
const property2 = Reflect.apply(getOutputDevices, binding, [])[outputDeviceId];
const videoDeviceId = env2_5.getVideoDeviceId();
binding = env2_5;
const getVideoDevices = binding.getVideoDevices;
const property3 = Reflect.apply(getVideoDevices, binding, [])[videoDeviceId];
const noiseCancellation = env2_5.getNoiseCancellation();
const audioSubsystem = env2_5.getMediaEngine().getAudioSubsystem();
const audioLayer = env2_5.getMediaEngine().getAudioLayer();
const value15 = env2_0(env2_1[3]);
const getKrispModel = value15.getKrispModel;
await Reflect.apply(getKrispModel, value15, []);
if (false) {
return undefined;
}
const r7 = analyticsData ?? ({});
const output_audio_route_type = r7.output_audio_route_type;
const value18 = env2_3(r7, env2_2);
const value19 = env2_0(env2_1[4]);
const track = value19.track;
const object = {};
const value20 = rating != null;
object.rating = value20 ? rating : 'no response';
object.category = category;
object.reason_code = reasonCode;
object.reason_description = reasonDescription;
object.reason_variant = variant;
object.feedback = feedback;
object.audio_input_mode = settings.mode;
object.automatic_audio_input_sensitivity_enabled = settings.modeOptions.autoThreshold;
object.audio_input_sensitivity = settings.modeOptions.threshold;
object.vad_use_advanced_voice_activity = settings.modeOptions.vadUseKrisp;
object.echo_cancellation_enabled = settings.echoCancellation;
object.noise_suppression_enabled = settings.noiseSuppression;
object.automatic_gain_control_enabled = settings.automaticGainControl;
object.voice_output_volume = settings.outputVolume;
object.noise_cancellation_enabled = noiseCancellation;
object.input_device_name = property == null ? value : property.name;
object.output_device_name = property2 == null ? value : property2.name;
object.video_device_name = property3 == null ? value : property3.name;
object.audio_subsystem = audioSubsystem;
object.audio_layer = audioLayer;
object.automatic_audio_subsystem = settings.automaticAudioSubsystem;
object.krisp_nc_model = undefined;
object.audio_output_mode = output_audio_route_type;
copyDataProperties(object, value18, value20);
Reflect.apply(track, value19, [a0, object]);
return value;
}
}
}
function _trackVoiceFeedback() { // fn#120541, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15914:160, offset: 0x0252f172, size: 50 bytes, params: 1, frame: 14
return env0_4(_fun120543).apply(this, arguments);
}
async function _fun120543(a0, {rating, category, reasonCode, reasonDescription, variant, feedback, analyticsData}) { // fn#120543, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15914:221, offset: 0x0252f1b8, size: 629 bytes, params: 3, frame: 34
if (false) {
return undefined;
}
value = undefined;
await value;
if (false) {
return undefined;
}
let binding = env2_5;
const settings = binding.getSettings();
const inputDeviceId = env2_5.getInputDeviceId();
binding = env2_5;
const getInputDevices = binding.getInputDevices;
const property = Reflect.apply(getInputDevices, binding, [])[inputDeviceId];
const outputDeviceId = env2_5.getOutputDeviceId();
binding = env2_5;
const getOutputDevices = binding.getOutputDevices;
const property2 = Reflect.apply(getOutputDevices, binding, [])[outputDeviceId];
const videoDeviceId = env2_5.getVideoDeviceId();
binding = env2_5;
const getVideoDevices = binding.getVideoDevices;
const property3 = Reflect.apply(getVideoDevices, binding, [])[videoDeviceId];
const noiseCancellation = env2_5.getNoiseCancellation();
const audioSubsystem = env2_5.getMediaEngine().getAudioSubsystem();
const audioLayer = env2_5.getMediaEngine().getAudioLayer();
const value15 = env2_0(env2_1[3]);
const getKrispModel = value15.getKrispModel;
await Reflect.apply(getKrispModel, value15, []);
if (false) {
return undefined;
}
const r7 = analyticsData ?? ({});
const output_audio_route_type = r7.output_audio_route_type;
const value18 = env2_3(r7, env2_2);
const value19 = env2_0(env2_1[4]);
const track = value19.track;
const object2 = {};
const value20 = rating != null;
object2.rating = value20 ? rating : 'no response';
object2.category = category;
object2.reason_code = reasonCode;
object2.reason_description = reasonDescription;
object2.reason_variant = variant;
object2.feedback = feedback;
object2.audio_input_mode = settings.mode;
object2.automatic_audio_input_sensitivity_enabled = settings.modeOptions.autoThreshold;
object2.audio_input_sensitivity = settings.modeOptions.threshold;
object2.vad_use_advanced_voice_activity = settings.modeOptions.vadUseKrisp;
object2.echo_cancellation_enabled = settings.echoCancellation;
object2.noise_suppression_enabled = settings.noiseSuppression;
object2.automatic_gain_control_enabled = settings.automaticGainControl;
object2.voice_output_volume = settings.outputVolume;
object2.noise_cancellation_enabled = noiseCancellation;
object2.input_device_name = property == null ? value : property.name;
object2.output_device_name = property2 == null ? value : property2.name;
object2.video_device_name = property3 == null ? value : property3.name;
object2.audio_subsystem = audioSubsystem;
object2.audio_layer = audioLayer;
object2.automatic_audio_subsystem = settings.automaticAudioSubsystem;
object2.krisp_nc_model = undefined;
object2.audio_output_mode = output_audio_route_type;
copyDataProperties(object2, value18, value20);
Reflect.apply(track, value19, [a0, object2]);
return value;
}
global.__d(_fun120540, 15706, [29, 5, 4259, 12396, 683,
2]) /* metro module 15706, dependencies: [29, 5, 4259, 12396, 683, 2] */;
@@ -1,13 +1,17 @@
/* Metro module 10785; source: modules/voice_calls/useIsVoiceChannelFull.tsx; dependencies: [1867, 3784, 4297, 482, 566, 4800, 2] */
import GuildStore from '../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import PermissionStore from '../../stores/PermissionStore.tsx'; /* Metro dependency 3784 */
import VoiceStateStore from '../../stores/VoiceStateStore.tsx'; /* Metro dependency 4297 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../external/discord_common/js/shared/Constants.tsx'; /* Metro dependency 482 */
import * as FluxModule from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ChannelUtilsModule from '../../utils/ChannelUtils.tsx'; /* Metro dependency 4800 */
function _fun82859(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#82859, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10971:6, offset: 0x01f03edd, size: 181 bytes, params: 8, frame: 19
let env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
const voiceStateStore = importDefault(4297) /* metro dependency 4297: VoiceStateStore */;
const env0_5 = (require(482) /* metro dependency 482: Constants */).Permissions;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_calls/useIsVoiceChannelFull.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_calls/useIsVoiceChannelFull.tsx');
exports.default = function(a0) {
var env0_0 = a0;
return require(dependencyMap[4]).useStateFromStores([VoiceStateStore, GuildStore], _fun82861);
@@ -16,24 +20,25 @@ function _fun82859(global, require, importDefault, importAll, module, exports, d
var env0_0 = a0;
return require(dependencyMap[4]).useStateFromStores([PermissionStore], _fun82863, [a0]);
};
function useIsVoiceChannelFull(a0) { // fn#82860, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10971:237, offset: 0x01f03f92, size: 74 bytes, params: 2, frame: 15
const env0_0 = a0;
return (FluxModule).useStateFromStores([VoiceStateStore, GuildStore], _fun82861);
function _fun82861() { // fn#82861, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10971:312, offset: 0x01f03fdc, size: 55 bytes, params: 1, frame: 15
return ChannelUtilsModule.isChannelFull(env0_0, VoiceStateStore, GuildStore);
}
}
function useIsVoiceChannelLocked(a0) { // fn#82862, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10971:374, offset: 0x01f04013, size: 75 bytes, params: 2, frame: 16
const env0_0 = a0;
return (FluxModule).useStateFromStores([PermissionStore], _fun82863, [a0]);
function _fun82863() { // fn#82863, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10971:449, offset: 0x01f0405e, size: 54 bytes, params: 1, frame: 14
return env0_0 == null || !PermissionStore.can(Permissions.CONNECT, env0_0);
}
}
}
function useIsVoiceChannelFull(a0) { // fn#82860, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10971:237, offset: 0x01f03f92, size: 74 bytes, params: 2, frame: 15
const env0_0 = a0;
return (require(566) /* metro dependency 566: flux */).useStateFromStores([VoiceStateStore, GuildStore], _fun82861);
}
function useIsVoiceChannelLocked(a0) { // fn#82862, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10971:374, offset: 0x01f04013, size: 75 bytes, params: 2, frame: 16
const env0_0 = a0;
return (require(566) /* metro dependency 566: flux */).useStateFromStores([PermissionStore], _fun82863, [a0]);
}
function _fun82861() { // fn#82861, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10971:312, offset: 0x01f03fdc, size: 55 bytes, params: 1, frame: 15
const channelUtilsModule = require(4800) /* metro dependency 4800: ChannelUtils */;
return channelUtilsModule.isChannelFull(env0_0, VoiceStateStore, GuildStore);
}
function _fun82863() { // fn#82863, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10971:449, offset: 0x01f0405e, size: 54 bytes, params: 1, frame: 14
return env0_0 == null || !PermissionStore.can(Permissions.CONNECT, env0_0);
}
global.__d(_fun82859, 10785, [1867, 3784, 4297, 482, 566, 4800,
2]) /* metro module 10785, dependencies: [1867, 3784, 4297, 482, 566, 4800, 2] */;
@@ -1,12 +1,16 @@
/* Metro module 15667; source: modules/voice_calls/utils/setAudioInputEnabled.android.tsx; dependencies: [4264, 2] */
import NativeMediaEngineModule from '../../../external/discord_common/js/packages/rtn-codegen/js/NativeMediaEngineModule.tsx'; /* Metro dependency 4264 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun120125(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#120125, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15875:6, offset: 0x025218b9, 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_calls/utils/setAudioInputEnabled.android.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_calls/utils/setAudioInputEnabled.android.tsx');
exports.default = setAudioInputEnabled;
function setAudioInputEnabled(a0) { // fn#120126, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15875:194, offset: 0x0252191c, size: 42 bytes, params: 2, frame: 12
(NativeMediaEngineModule).setAudioInputEnabled(a0);
}
}
function setAudioInputEnabled(a0) { // fn#120126, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15875:194, offset: 0x0252191c, size: 42 bytes, params: 2, frame: 12
(importDefault(4264) /* metro dependency 4264: NativeMediaEngineModule */).setAudioInputEnabled(a0);
}
global.__d(_fun120125, 15667, [4264, 2]) /* metro module 15667, dependencies: [4264, 2] */;