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 7727; source: modules/voice_panel/native/HomeIndicator.tsx; dependencies: [6, 7, 15, 17, 18, 31, 27, 629, 690, 477, 1597, 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 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 ReactBatchUpdatesNativeModule from '../../../external/discord_common/js/shared/utils/ReactBatchUpdates.native.tsx'; /* Metro dependency 690 */
function _fun61804(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#61804, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7905:6, offset: 0x01b4b0da, size: 321 bytes, params: 8, frame: 19
const env0_0 = require;
const createStackEntry_61808 = function(a0) {
@@ -6,13 +17,7 @@ function _fun61804(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 */;
let value = importAll(31) /* metro dependency 31 */;
const env0_8 = (require(27) /* metro dependency 27 */).NativeModules;
let value = ReactModule;
const value3 = (require(629) /* metro dependency 629 */).create(function() {
return {autoHideHomeIndicator: false};
});
@@ -21,143 +26,144 @@ function _fun61804(global, require, importDefault, importAll, module, exports, d
value.defaultProps = {'prefersHidden': false, 'prefersDeferringSystemGestures': false};
value._propsStack = [];
value._updateImmediate = null;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/HomeIndicator.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/HomeIndicator.tsx');
exports.default = value;
exports.useHomeIndicatorStore = value3;
}
function _isNativeReflectConstruct_61805() { // fn#61805, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7905:182, offset: 0x01b4b21b, size: 94 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_61805_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun61810(a0) { // fn#61810, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7905:569, offset: 0x01b4b2a1, size: 234 bytes, params: 2, frame: 18
const closure = HomeIndicator;
env0_7(closure, a0);
return env0_4(closure, [{key: 'componentDidMount', value: function() {
this._stackEntry = HomeIndicator.pushStackEntry(this.props);
}}, {key: 'componentDidUpdate', value: function() {
this._stackEntry = HomeIndicator.replaceStackEntry(this._stackEntry, this.props);
}}, {key: 'componentWillUnmount', value: function() {
HomeIndicator.popStackEntry(this._stackEntry);
this._stackEntry = null;
}}, {key: 'render', value: function() {
return null;
}}], [{key: 'pushStackEntry', value: value_61816}, {key: 'popStackEntry', value: value_61817},
{key: 'replaceStackEntry', value: value_61818}, {key: '_updatePropsStack', value: function() {
global.clearImmediate(HomeIndicator._updateImmediate);
HomeIndicator._updateImmediate = global.setImmediate(_fun61820);
}}]);
}
function HomeIndicator(a0) { // fn#61811, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7905:581, offset: 0x01b4b38b, size: 134 bytes, params: 2, frame: 19
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_3;
binding(this, HomeIndicator);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_6(HomeIndicator);
binding = env1_5;
if (_isNativeReflectConstruct_61805()) {
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._stackEntry = null;
return value;
}
function value_61816(a0) { // fn#61816, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7905:1285, offset: 0x01b4b463, size: 52 bytes, params: 2, frame: 12
let value = environment.__proto__;
value = createStackEntry_61808(a0);
HomeIndicator._propsStack.push(value);
HomeIndicator._updatePropsStack();
return value;
}
function value_61817(a0) { // fn#61817, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7905:1429, offset: 0x01b4b497, size: 91 bytes, params: 2, frame: 14
const value = -1;
const r4 = a0 != null ? HomeIndicator._propsStack.indexOf(a0) : value;
if (value !== r4) {
HomeIndicator._propsStack.splice(r4, 1);
HomeIndicator._updatePropsStack();
}
}
function value_61818(a0, a1) { // fn#61818, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7905:1610, offset: 0x01b4b4f2, size: 102 bytes, params: 3, frame: 14
let value = environment.__proto__;
value = createStackEntry_61808(a1);
const value2 = -1;
const r2 = a0 != null ? HomeIndicator._propsStack.indexOf(a0) : value2;
if (value2 !== r2) {
HomeIndicator._propsStack[r2] = value;
}
HomeIndicator._updatePropsStack();
return value;
}
function value_61819() { // fn#61819, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7905:1816, offset: 0x01b4b558, size: 54 bytes, params: 1, frame: 13
global.clearImmediate(HomeIndicator._updateImmediate);
HomeIndicator._updateImmediate = global.setImmediate(_fun61820);
}
function _fun61820() { // fn#61820, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7905:1919, offset: 0x01b4b58e, size: 242 bytes, params: 1, frame: 17
var environment;
var DCDHomeIndicator;
let value = environment.__proto__;
const r2 = HomeIndicator._propsStack[HomeIndicator._propsStack.length - 1] ?? ({});
const prefersHidden = r2.prefersHidden;
const r1 = prefersHidden !== undefined && prefersHidden;
const prefersDeferringSystemGestures = r2.prefersDeferringSystemGestures;
const r5 = prefersDeferringSystemGestures !== undefined && prefersDeferringSystemGestures;
value = environment.__proto__.__proto__;
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun61821);
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (platformUtilsModule.isAndroid()) {
(importDefault(1597) /* metro dependency 1597: NativeSafeAreaInsetsModule */).setNavigationBarVisible(!r1);
} else {
DCDHomeIndicator = NativeModules.DCDHomeIndicator;
if (DCDHomeIndicator) {
DCDHomeIndicator = NativeModules.DCDHomeIndicator;
DCDHomeIndicator.setPrefersAutoHidden(r1);
DCDHomeIndicator = NativeModules.DCDHomeIndicator;
DCDHomeIndicator.setPrefersDeferringSystemGestures(r5);
function _isNativeReflectConstruct_61805() { // fn#61805, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7905:182, offset: 0x01b4b21b, size: 94 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_61805_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun61810(a0) { // fn#61810, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7905:569, offset: 0x01b4b2a1, size: 234 bytes, params: 2, frame: 18
const HomeIndicator2 = HomeIndicator;
Inherits(HomeIndicator2, a0);
return CreateClass(HomeIndicator2, [{key: 'componentDidMount', value: function() {
this._stackEntry = HomeIndicator.pushStackEntry(this.props);
}}, {key: 'componentDidUpdate', value: function() {
this._stackEntry = HomeIndicator.replaceStackEntry(this._stackEntry, this.props);
}}, {key: 'componentWillUnmount', value: function() {
HomeIndicator.popStackEntry(this._stackEntry);
this._stackEntry = null;
}}, {key: 'render', value: function() {
return null;
}}], [{key: 'pushStackEntry', value: value_61816}, {key: 'popStackEntry', value: value_61817},
{key: 'replaceStackEntry', value: value_61818}, {key: '_updatePropsStack', value: function() {
global.clearImmediate(HomeIndicator._updateImmediate);
HomeIndicator._updateImmediate = global.setImmediate(_fun61820);
}}]);
function HomeIndicator(a0) { // fn#61811, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7905:581, offset: 0x01b4b38b, size: 134 bytes, params: 2, frame: 19
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_3;
binding(this, HomeIndicator);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_6(HomeIndicator);
binding = env1_5;
if (_isNativeReflectConstruct_61805()) {
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._stackEntry = null;
return value;
}
function value_61816(a0) { // fn#61816, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7905:1285, offset: 0x01b4b463, size: 52 bytes, params: 2, frame: 12
let value = environment.__proto__;
value = createStackEntry_61808(a0);
HomeIndicator._propsStack.push(value);
HomeIndicator._updatePropsStack();
return value;
}
function value_61817(a0) { // fn#61817, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7905:1429, offset: 0x01b4b497, size: 91 bytes, params: 2, frame: 14
const value = -1;
const r4 = a0 != null ? HomeIndicator._propsStack.indexOf(a0) : value;
if (value !== r4) {
HomeIndicator._propsStack.splice(r4, 1);
HomeIndicator._updatePropsStack();
}
}
function value_61818(a0, a1) { // fn#61818, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7905:1610, offset: 0x01b4b4f2, size: 102 bytes, params: 3, frame: 14
let value = environment.__proto__;
value = createStackEntry_61808(a1);
const value2 = -1;
const r2 = a0 != null ? HomeIndicator._propsStack.indexOf(a0) : value2;
if (value2 !== r2) {
HomeIndicator._propsStack[r2] = value;
}
HomeIndicator._updatePropsStack();
return value;
}
function value_61819() { // fn#61819, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7905:1816, offset: 0x01b4b558, size: 54 bytes, params: 1, frame: 13
global.clearImmediate(HomeIndicator._updateImmediate);
HomeIndicator._updateImmediate = global.setImmediate(_fun61820);
function _fun61820() { // fn#61820, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7905:1919, offset: 0x01b4b58e, size: 242 bytes, params: 1, frame: 17
var environment;
var DCDHomeIndicator;
let value = environment.__proto__;
const r2 = HomeIndicator._propsStack[HomeIndicator._propsStack.length - 1] ?? ({});
const prefersHidden = r2.prefersHidden;
const r1 = prefersHidden !== undefined && prefersHidden;
const prefersDeferringSystemGestures = r2.prefersDeferringSystemGestures;
const r5 = prefersDeferringSystemGestures !== undefined && prefersDeferringSystemGestures;
value = environment.__proto__.__proto__;
(ReactBatchUpdatesNativeModule).batchUpdates(_fun61821);
if (PlatformUtilsModule.isAndroid()) {
(importDefault(1597) /* metro dependency 1597: NativeSafeAreaInsetsModule */).setNavigationBarVisible(!r1);
} else {
DCDHomeIndicator = NativeModules.DCDHomeIndicator;
if (DCDHomeIndicator) {
DCDHomeIndicator = NativeModules.DCDHomeIndicator;
DCDHomeIndicator.setPrefersAutoHidden(r1);
DCDHomeIndicator = NativeModules.DCDHomeIndicator;
DCDHomeIndicator.setPrefersDeferringSystemGestures(r5);
}
}
function _fun61821() { // fn#61821, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7905:2116, offset: 0x01b4b680, size: 34 bytes, params: 1, frame: 12
return env3_9.setState({autoHideHomeIndicator: env0_0});
}
}
}
}
}
function _fun61821() { // fn#61821, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7905:2116, offset: 0x01b4b680, size: 34 bytes, params: 1, frame: 12
return env3_9.setState({autoHideHomeIndicator: env0_0});
}
global.__d(_fun61804, 7727, [6, 7, 15, 17, 18, 31, 27, 629, 690, 477, 1597,
2]) /* metro module 7727, dependencies: [6, 7, 15, 17, 18, 31, 27, 629, 690, 477, 1597, 2] */;
@@ -1,29 +1,34 @@
/* Metro module 15449; source: modules/voice_panel/native/VoicePanelAccessibilityView.tsx; dependencies: [31, 15440, 33, 4556, 15444, 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 AccessibilityViewNativeModule from '../../../design/components/AccessibilityView/AccessibilityView.native.tsx'; /* Metro dependency 4556 */
import * as VoicePanelPIPConstantsModule from './pip/VoicePanelPIPConstants.tsx'; /* Metro dependency 15440 */
function _fun118251(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118251, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15646:6, offset: 0x024d2ec6, size: 185 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const value = importAll(31) /* metro dependency 31 */;
const env0_2 = (require(15440) /* metro dependency 15440: VoicePanelPIPConstants */).VoicePanelPIPModes;
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
const memo = value.memo;
const AccessibilityViewAnimated = (require(4556) /* metro dependency 4556: AccessibilityViewNative */).AccessibilityViewAnimated;
const env0_4 = Reflect.apply(memo, value, [AccessibilityViewAnimated]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/VoicePanelAccessibilityView.tsx');
const memo = ReactModule.memo;
const AccessibilityViewAnimated = (AccessibilityViewNativeModule).AccessibilityViewAnimated;
const env0_4 = Reflect.apply(memo, ReactModule, [AccessibilityViewAnimated]);
(FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/VoicePanelAccessibilityView.tsx');
exports.default = VoicePanelAccessibilityView;
function VoicePanelAccessibilityView(a0) { // fn#118252, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15646:199, offset: 0x024d2f7f, size: 186 bytes, params: 2, frame: 22
const style = a0.style;
let pointerEvents = a0.pointerEvents;
pointerEvents = pointerEvents === undefined ? 'box-none' : pointerEvents;
const nativeID = a0.nativeID;
const accessibilityViewIsModal = a0.accessibilityViewIsModal;
const onAccessibilityEscape = a0.onAccessibilityEscape;
const object = {'style': 0, 'pointerEvents': 0, 'nativeID': 0, 'accessibilityViewIsModal': 0,
'onAccessibilityEscape': 0};
silentSetPrototypeOf(object, null, undefined);
return ((Component) => <Component style={style} pointerEvents={pointerEvents} nativeID={nativeID} accessibilityViewIsModal={accessibilityViewIsModal && (require(15444) /* metro dependency 15444: VoicePanelPIPStateContext */).usePIPState().mode !== VoicePanelPIPModes.IN_APP} onAccessibilityEscape={onAccessibilityEscape} {...copyDataProperties({},
a0, object, style)} />)(env0_4);
}
}
function VoicePanelAccessibilityView(a0) { // fn#118252, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15646:199, offset: 0x024d2f7f, size: 186 bytes, params: 2, frame: 22
const style = a0.style;
let pointerEvents = a0.pointerEvents;
pointerEvents = pointerEvents === undefined ? 'box-none' : pointerEvents;
const nativeID = a0.nativeID;
const accessibilityViewIsModal = a0.accessibilityViewIsModal;
const onAccessibilityEscape = a0.onAccessibilityEscape;
const object2 = {'style': 0, 'pointerEvents': 0, 'nativeID': 0, 'accessibilityViewIsModal': 0,
'onAccessibilityEscape': 0};
silentSetPrototypeOf(object2, null, undefined);
return ((Component) => <Component style={style} pointerEvents={pointerEvents} nativeID={nativeID} accessibilityViewIsModal={accessibilityViewIsModal && (require(15444) /* metro dependency 15444: VoicePanelPIPStateContext */).usePIPState().mode !== VoicePanelPIPModes.IN_APP} onAccessibilityEscape={onAccessibilityEscape} {...copyDataProperties({},
a0, object2, style)} />)(env0_4);
}
global.__d(_fun118251, 15449, [31, 15440, 33, 4556, 15444,
2]) /* metro module 15449, dependencies: [31, 15440, 33, 4556, 15444, 2] */;
@@ -1,4 +1,14 @@
/* Metro module 15404; source: modules/voice_panel/native/VoicePanelContainer.tsx; dependencies: [31, 1379, 7710, 33, 566, 15405, 15445, 3769, 4508, 2] */
import ChannelStore from '../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import VoicePanelStore from '../VoicePanelStore.tsx'; /* Metro dependency 7710 */
import VoicePanelController from './VoicePanelController.tsx'; /* Metro dependency 15405 */
import VoicePanelUI from './VoicePanelUI.tsx'; /* Metro dependency 15445 */
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 TransitionGroupModule from '../../../design/components/TransitionGroup/TransitionGroup.tsx'; /* Metro dependency 4508 */
function _fun117721(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117721, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15601:6, offset: 0x024bef64, size: 217 bytes, params: 8, frame: 19
const env0_0 = require;
const getChannelKey = function(a0) {
@@ -6,55 +16,54 @@ function _fun117721(global, require, importDefault, importAll, module, exports,
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const voicePanelStore = importDefault(7710) /* metro dependency 7710: VoicePanelStore */;
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
let value = ReactModule;
value = value.memo(VoicePanelContainer);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/VoicePanelContainer.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/VoicePanelContainer.tsx');
exports.default = value;
function VoicePanel(a0) { // fn#117722, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15601:140, offset: 0x024bf03d, size: 148 bytes, params: 2, frame: 18
const env0_0 = a0;
return ((Component) => <Component {...a0} {...{['guildId']: (FluxModule).useStateFromStores([ChannelStore],
_fun117723)}}>{env0_3.useMemo(_fun117724,
[])}</Component>)(VoicePanelController);
function _fun117723() { // fn#117723, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15601:201, offset: 0x024bf0d1, size: 47 bytes, params: 1, frame: 11
const value = environment.__proto__;
return ChannelStore.getChannel(env0_0.channelId)?.guild_id;
}
function _fun117724() { // fn#117724, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15601:329, offset: 0x024bf100, size: 39 bytes, params: 1, frame: 13
const value = environment.__proto__;
return ((Component) => <Component />)(VoicePanelUI);
}
}
function renderVoicePanel(a0, a1, a2, a3) { // fn#117726, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15601:389, offset: 0x024bf127, size: 47 bytes, params: 5, frame: 15
return (
<VoicePanel
channelId={a1}
transitionState={a2}
transitionCleanUp={a3}
key={a1}
/>
);
}
function VoicePanelContainer() { // fn#117727, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15601:513, offset: 0x024bf156, size: 105 bytes, params: 1, frame: 16
const value2 = VoicePanelStore(function({channels}) {
var Array = global.Array;
return Array.from(channels);
}, (require(3769) /* metro dependency 3769 */).shallow);
const TransitionGroup = (TransitionGroupModule).TransitionGroup;
return (
<TransitionGroup
items={value2}
getItemKey={getChannelKey}
renderItem={renderVoicePanel}
/>
);
}
}
function VoicePanel(a0) { // fn#117722, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15601:140, offset: 0x024bf03d, size: 148 bytes, params: 2, frame: 18
const env0_0 = a0;
return ((Component) => <Component {...a0} {...{['guildId']: (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore],
_fun117723)}}>{env0_3.useMemo(_fun117724,
[])}</Component>)(importDefault(15405) /* metro dependency 15405: VoicePanelController */);
}
function renderVoicePanel(a0, a1, a2, a3) { // fn#117726, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15601:389, offset: 0x024bf127, size: 47 bytes, params: 5, frame: 15
return (
<VoicePanel
channelId={a1}
transitionState={a2}
transitionCleanUp={a3}
key={a1}
/>
);
}
function VoicePanelContainer() { // fn#117727, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15601:513, offset: 0x024bf156, size: 105 bytes, params: 1, frame: 16
const value2 = VoicePanelStore(function({channels}) {
var Array = global.Array;
return Array.from(channels);
}, (require(3769) /* metro dependency 3769 */).shallow);
const TransitionGroup = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionGroup;
return (
<TransitionGroup
items={value2}
getItemKey={getChannelKey}
renderItem={renderVoicePanel}
/>
);
}
function _fun117723() { // fn#117723, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15601:201, offset: 0x024bf0d1, size: 47 bytes, params: 1, frame: 11
const value = environment.__proto__;
return ChannelStore.getChannel(env0_0.channelId)?.guild_id;
}
function _fun117724() { // fn#117724, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15601:329, offset: 0x024bf100, size: 39 bytes, params: 1, frame: 13
const value = environment.__proto__;
return ((Component) => <Component />)(importDefault(15445) /* metro dependency 15445: VoicePanelUI */);
}
global.__d(_fun117721, 15404, [31, 1379, 7710, 33, 566, 15405, 15445, 3769, 4508,
2]) /* metro module 15404, dependencies: [31, 1379, 7710, 33, 566, 15405, 15445, 3769, 4508, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,104 +1,107 @@
/* Metro module 11794; source: modules/voice_panel/native/VoicePanelStateContext.tsx; dependencies: [31, 11795, 11793, 11796, 8142, 11797, 1587, 2] */
import VoicePanelCardLayoutManager from './card/VoicePanelCardLayoutManager.tsx'; /* Metro dependency 11797 */
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 SafeAreaConstantsNativeModule from '../../safe_area/SafeAreaConstants.native.tsx'; /* Metro dependency 1587 */
import * as ReanimatedHelperTypesModule from '../../reanimated/ReanimatedHelperTypes.tsx'; /* Metro dependency 8142 */
import * as VoicePanelControlsConstantsModule from './controls/VoicePanelControlsConstants.tsx'; /* Metro dependency 11793 */
import * as VoicePanelConstantsModule from '../VoicePanelConstants.tsx'; /* Metro dependency 11795 */
import * as MorphablePanelConstantsModule from '../../panels/morphable/native/MorphablePanelConstants.tsx'; /* Metro dependency 11796 */
function _fun90320(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90320, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11980:6, offset: 0x02034822, size: 977 bytes, params: 8, frame: 29
var object2;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const VoicePanelModes = (require(11795) /* metro dependency 11795: VoicePanelConstants */).VoicePanelModes;
let value = ReactModule;
const VoicePanelModes = (VoicePanelConstantsModule).VoicePanelModes;
const {CONTROLS_HEIGHT,
VoicePanelControlsModes} = require(11793) /* metro dependency 11793: VoicePanelControlsConstants */;
const MorphablePanelModes = (require(11796) /* metro dependency 11796: MorphablePanelConstants */).MorphablePanelModes;
VoicePanelControlsModes} = VoicePanelControlsConstantsModule;
const MorphablePanelModes = (MorphablePanelConstantsModule).MorphablePanelModes;
const createContext = value.createContext;
object2 = {channelId: 'context-not-initialized', channelType: undefined};
const reanimatedHelperTypesModule = require(8142) /* metro dependency 8142: ReanimatedHelperTypes */;
let createFakeSharedValue = reanimatedHelperTypesModule.createFakeSharedValue;
object2.connected = Reflect.apply(createFakeSharedValue, reanimatedHelperTypesModule, [false]);
object2.contentDimensions = reanimatedHelperTypesModule.createFakeSharedValue({'width': 0, 'height': 0});
const value5 = reanimatedHelperTypesModule;
createFakeSharedValue = value5.createFakeSharedValue;
object = {channelId: 'context-not-initialized', channelType: undefined};
let createFakeSharedValue = ReanimatedHelperTypesModule.createFakeSharedValue;
object.connected = Reflect.apply(createFakeSharedValue, ReanimatedHelperTypesModule, [false]);
object.contentDimensions = ReanimatedHelperTypesModule.createFakeSharedValue({'width': 0, 'height': 0});
createFakeSharedValue = ReanimatedHelperTypesModule.createFakeSharedValue;
const FLOATING_DEFAULT = VoicePanelControlsModes.FLOATING_DEFAULT;
object2.controlsSpecs = Reflect.apply(createFakeSharedValue, value5, [{mode: FLOATING_DEFAULT, locked: false,
object.controlsSpecs = Reflect.apply(createFakeSharedValue, ReanimatedHelperTypesModule, [{mode: FLOATING_DEFAULT, locked: false,
height: CONTROLS_HEIGHT, pushToTalk: false}]);
object2.dismissPanel = function() {
object.dismissPanel = function() {
var Error = global.Error;
throw new Error('VoicePanelContextType.Provider.dismissDrawer: not called within a context provider');
};
object2.dismissToPIPGestureRef = {current: undefined};
object2.dragScrolling = reanimatedHelperTypesModule.createFakeSharedValue(false);
object2.focused = reanimatedHelperTypesModule.createFakeSharedValue(null);
object2.generateStateLocker = function() {
object.dismissToPIPGestureRef = {current: undefined};
object.dragScrolling = ReanimatedHelperTypesModule.createFakeSharedValue(false);
object.focused = ReanimatedHelperTypesModule.createFakeSharedValue(null);
object.generateStateLocker = function() {
var Error = global.Error;
throw new Error('VoicePanelContextType.Provider.generateStateLocker: not called within a context provider');
};
object2.guildId = undefined;
object2.hideControls = function() {
object.guildId = undefined;
object.hideControls = function() {
var Error = global.Error;
throw new Error('VoicePanelContextType.Provider.hideControls: not called within a context provider');
};
object2.isCall = false;
object2.isFocusedVideoZoomed = reanimatedHelperTypesModule.createFakeSharedValue(false);
const voicePanelCardLayoutManager = importDefault(11797) /* metro dependency 11797: VoicePanelCardLayoutManager */;
const value10 = Object.create(voicePanelCardLayoutManager.prototype,
{constructor: {value: voicePanelCardLayoutManager}});
const voicePanelCardLayoutManager2 = new voicePanelCardLayoutManager('invalid');
object2.layoutManager = voicePanelCardLayoutManager2 instanceof Object ? voicePanelCardLayoutManager2 : value10;
const value13 = reanimatedHelperTypesModule;
createFakeSharedValue = value13.createFakeSharedValue;
object.isCall = false;
object.isFocusedVideoZoomed = ReanimatedHelperTypesModule.createFakeSharedValue(false);
const value10 = Object.create(VoicePanelCardLayoutManager.prototype,
{constructor: {value: VoicePanelCardLayoutManager}});
const voicePanelCardLayoutManager2 = new VoicePanelCardLayoutManager('invalid');
object.layoutManager = voicePanelCardLayoutManager2 instanceof Object ? voicePanelCardLayoutManager2 : value10;
createFakeSharedValue = ReanimatedHelperTypesModule.createFakeSharedValue;
let PANEL = VoicePanelModes.PANEL;
object2.mode = Reflect.apply(createFakeSharedValue, value13, [PANEL]);
const value14 = reanimatedHelperTypesModule;
createFakeSharedValue = value14.createFakeSharedValue;
object.mode = Reflect.apply(createFakeSharedValue, ReanimatedHelperTypesModule, [PANEL]);
createFakeSharedValue = ReanimatedHelperTypesModule.createFakeSharedValue;
PANEL = MorphablePanelModes.PANEL;
object2.morphablePanelMode = Reflect.apply(createFakeSharedValue, value14, [PANEL]);
object.morphablePanelMode = Reflect.apply(createFakeSharedValue, ReanimatedHelperTypesModule, [PANEL]);
const Set = global.Set;
const value15 = Object.create(Set.prototype, {constructor: {value: Set}});
const set = new Set();
object2.mountedCards = set instanceof Object ? set : value15;
object2.pipAvoidanceSpecs = reanimatedHelperTypesModule.createFakeSharedValue({'top': 0, 'bottom': 0});
object2.preJoinContentSize = reanimatedHelperTypesModule.createFakeSharedValue(0);
const value19 = reanimatedHelperTypesModule;
createFakeSharedValue = value19.createFakeSharedValue;
const EMPTY_SAFE_AREA_INSETS = (require(1587) /* metro dependency 1587: SafeAreaConstantsNative */).EMPTY_SAFE_AREA_INSETS;
object2.safeArea = Reflect.apply(createFakeSharedValue, value19, [EMPTY_SAFE_AREA_INSETS]);
object2.scrollPosition = reanimatedHelperTypesModule.createFakeSharedValue(0);
object2.setControlsMode = function() {
object.mountedCards = set instanceof Object ? set : value15;
object.pipAvoidanceSpecs = ReanimatedHelperTypesModule.createFakeSharedValue({'top': 0, 'bottom': 0});
object.preJoinContentSize = ReanimatedHelperTypesModule.createFakeSharedValue(0);
createFakeSharedValue = ReanimatedHelperTypesModule.createFakeSharedValue;
const EMPTY_SAFE_AREA_INSETS = (SafeAreaConstantsNativeModule).EMPTY_SAFE_AREA_INSETS;
object.safeArea = Reflect.apply(createFakeSharedValue, ReanimatedHelperTypesModule, [EMPTY_SAFE_AREA_INSETS]);
object.scrollPosition = ReanimatedHelperTypesModule.createFakeSharedValue(0);
object.setControlsMode = function() {
var Error = global.Error;
throw new Error('VoicePanelContextType.Provider.setControlsMode: not called within a context provider');
};
object2.setFocused = function() {
object.setFocused = function() {
var Error = global.Error;
throw new Error('VoicePanelContextType.Provider.setFocused: not called within a context provider');
};
object2.setIsFocusedVideoZoomed = function() {
object.setIsFocusedVideoZoomed = function() {
var Error = global.Error;
throw new Error('VoicePanelContextType.Provider.showControls: not called within a context provider');
};
object2.setMode = function() {
object.setMode = function() {
var Error = global.Error;
throw new Error('VoicePanelContextType.Provider.setMode: not called within a context provider');
};
object2.setShowFloatingCTA = function() {
object.setShowFloatingCTA = function() {
var Error = global.Error;
throw new Error('VoicePanelContextType.Provider.showFloatingCTA: not called within a context provider');
};
object2.showControls = function() {
object.showControls = function() {
var Error = global.Error;
throw new Error('VoicePanelContextType.Provider.showControls: not called within a context provider');
};
object2.showFloatingCTA = reanimatedHelperTypesModule.createFakeSharedValue(null);
object2.streamOutputSinkStack = {};
object2.windowDimensions = reanimatedHelperTypesModule.createFakeSharedValue({'width': 0, 'height': 0,
object.showFloatingCTA = ReanimatedHelperTypesModule.createFakeSharedValue(null);
object.streamOutputSinkStack = {};
object.windowDimensions = ReanimatedHelperTypesModule.createFakeSharedValue({'width': 0, 'height': 0,
'landscape': false});
const value23 = reanimatedHelperTypesModule;
createFakeSharedValue = value23.createFakeSharedValue;
createFakeSharedValue = ReanimatedHelperTypesModule.createFakeSharedValue;
PANEL = VoicePanelModes.PANEL;
object2.wrapperDimensions = Reflect.apply(createFakeSharedValue, value23, [{'drawerWidth': 0, 'drawerHeight': 0,
object.wrapperDimensions = Reflect.apply(createFakeSharedValue, ReanimatedHelperTypesModule, [{'drawerWidth': 0, 'drawerHeight': 0,
'drawerX': 0, 'drawerY': 0, 'pipX': 0, 'pipY': 0, 'animated': true, mode: PANEL}]);
object2.useReducedMotion = reanimatedHelperTypesModule.createFakeSharedValue(false);
object2.wrapperOffset = reanimatedHelperTypesModule.createFakeSharedValue({'gestureActive': false, 'x': 0, 'y': 0});
object2.panelCardStillInPIP = reanimatedHelperTypesModule.createFakeSharedValue(false);
value = Reflect.apply(createContext, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/VoicePanelStateContext.tsx');
object.useReducedMotion = ReanimatedHelperTypesModule.createFakeSharedValue(false);
object.wrapperOffset = ReanimatedHelperTypesModule.createFakeSharedValue({'gestureActive': false, 'x': 0, 'y': 0});
object.panelCardStillInPIP = ReanimatedHelperTypesModule.createFakeSharedValue(false);
value = Reflect.apply(createContext, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/VoicePanelStateContext.tsx');
exports.default = value;
}
global.__d(_fun90320, 11794, [31, 11795, 11793, 11796, 8142, 11797, 1587,
2]) /* metro module 11794, dependencies: [31, 11795, 11793, 11796, 8142, 11797, 1587, 2] */;
@@ -1,151 +1,165 @@
/* Metro module 15448; source: modules/voice_panel/native/VoicePanelSystemUIManager.tsx; dependencies: [57, 31, 4606, 11795, 11793, 4299, 33, 11794, 690, 477, 6949, 4017, 7739, 7725, 7727, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import ChannelRTCStore from '../../calls/ChannelRTCStore.tsx'; /* Metro dependency 4606 */
import Module06949 from '../../../by-id/module-06949.js'; /* Metro dependency 6949 */
import VoicePanelStateContext from './VoicePanelStateContext.tsx'; /* Metro dependency 11794 */
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 PlatformUtilsModule from '../../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
import * as ReactBatchUpdatesNativeModule from '../../../external/discord_common/js/shared/utils/ReactBatchUpdates.native.tsx'; /* Metro dependency 690 */
import * as ReanimatedRexportModule from '../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as CallConstantsModule from '../../calls/CallConstants.tsx'; /* Metro dependency 4299 */
import * as CheapWorkletShallowEqualModule from '../../reanimated/native/cheapWorkletShallowEqual.tsx'; /* Metro dependency 7739 */
import * as VoicePanelControlsConstantsModule from './controls/VoicePanelControlsConstants.tsx'; /* Metro dependency 11793 */
import * as VoicePanelConstantsModule from '../VoicePanelConstants.tsx'; /* Metro dependency 11795 */
function _fun118240(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118240, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15645:6, offset: 0x024d2865, size: 301 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const channelRTCStore = importDefault(4606) /* metro dependency 4606: ChannelRTCStore */;
const env0_6 = (require(11795) /* metro dependency 11795: VoicePanelConstants */).VoicePanelModes;
const env0_7 = (require(11793) /* metro dependency 11793: VoicePanelControlsConstants */).VoicePanelControlsModes;
const env0_8 = (require(4299) /* metro dependency 4299: CallConstants */).ParticipantTypes;
const value2 = require(33) /* metro dependency 33 */;
const env0_9 = value2.jsx;
const env0_10 = value2.Fragment;
const env0_11 = value2.jsxs;
let value = ReactModule;
object = {code: 'function VoicePanelSystemUIManagerTsx1(){const{focused,mode,controlsSpecs,windowDimensions}=this.__closure;var _focused$get;return{focusedId:(_focused$get=focused.get())===null||_focused$get===void 0?void 0:_focused$get.id,mode:mode.get(),controlsMode:controlsSpecs.get().mode,landscape:windowDimensions.get().landscape};}'};
object = {code: 'function VoicePanelSystemUIManagerTsx2(props,previous){const{cheapWorkletShallowEqual,runOnJS,handleStateChange}=this.__closure;if(cheapWorkletShallowEqual(props,previous!==null&&previous!==void 0?previous:undefined))return;runOnJS(handleStateChange)(props);}'};
value = value.memo(VoicePanelSystemUIManager);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/VoicePanelSystemUIManager.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/VoicePanelSystemUIManager.tsx');
exports.default = value;
}
function VoicePanelSystemUIManager() { // fn#118241, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15645:872, offset: 0x024d2992, size: 597 bytes, params: 1, frame: 28
const binding = env0_4;
const value2 = binding.useContext(VoicePanelStateContext);
const focused = value2.focused;
const channelId = value2.channelId;
const mode = value2.mode;
const controlsSpecs = value2.controlsSpecs;
const controlsSpecs2 = controlsSpecs;
const windowDimensions = value2.windowDimensions;
let useState = binding.useState;
const value3 = Reflect.apply(useState, binding, [true]);
const binding2 = controlsSpecs2;
const value4 = binding2(value3, 2);
const property = value4[0];
const env0_5 = value4[1];
useState = binding.useState;
const value5 = binding2(Reflect.apply(useState, binding, [true]), 2);
const property2 = value5[0];
const env0_6 = value5[1];
useState = binding.useState;
const value6 = binding2(Reflect.apply(useState, binding, [false]), 2);
const property3 = value6[0];
const env0_7 = value6[1];
useState = binding.useState;
const value7 = binding2(Reflect.apply(useState, binding, [false]), 2);
const property4 = value7[0];
const env0_8 = value7[1];
const {cancelPendingDebounce, handleStateChange} = binding.useMemo(_fun118242, [channelId]);
binding.useEffect(function() {
return _fun118248;
}, [cancelPendingDebounce]);
const useAnimatedReaction = ReanimatedRexportModule.useAnimatedReaction;
const closure = function() {
var object = {};
object.focusedId = focused.get()?.id;
object.mode = mode.get();
object.controlsMode = controlsSpecs.get().mode;
object.landscape = windowDimensions.get().landscape;
return object;
};
closure.__closure = {focused: focused, mode: mode, controlsSpecs: controlsSpecs, windowDimensions: windowDimensions};
closure.__workletHash = 2478376475717;
closure.__initData = env0_12;
const VoicePanelSystemUIManagerU2 = VoicePanelSystemUIManagerU;
VoicePanelSystemUIManagerU2.__closure = {cheapWorkletShallowEqual: (require(7739) /* metro dependency 7739: cheapWorkletShallowEqual */).cheapWorkletShallowEqual,
runOnJS: ReanimatedRexportModule.runOnJS, handleStateChange: handleStateChange};
VoicePanelSystemUIManagerU2.__workletHash = 3592680244658;
VoicePanelSystemUIManagerU2.__initData = env0_13;
Reflect.apply(useAnimatedReaction, ReanimatedRexportModule, [closure, VoicePanelSystemUIManagerU2]);
return (
<>
{
property2
? ((Component) => <Component hidden={!property} barStyle="light-content" />)(importDefault(7725) /* metro dependency 7725: StatusBarAndroid */)
: null
}
{((Component) => <Component prefersHidden={property3} prefersDeferringSystemGestures={property4} />)(importDefault(7727) /* metro dependency 7727: HomeIndicator */)}
</>
);
function _fun118242() { // fn#118242, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15645:1188, offset: 0x024d2be7, size: 100 bytes, params: 1, frame: 16
var environment;
const updateState_1182432 = updateState_118243;
const value = environment.__proto__;
const env0_1 = (Module06949)(updateState_1182432, 500, {maxWait: 2000});
return {cancelPendingDebounce: cancelPendingDebounce, handleStateChange: handleStateChange_118246};
function updateState_118243({focusedId, mode, controlsMode, landscape}) { // fn#118243, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15645:1209, offset: 0x024d2c4b, size: 89 bytes, params: 2, frame: 12
var environment;
const value = environment.__proto__.__proto__;
(ReactBatchUpdatesNativeModule).batchUpdates(_fun118244);
function _fun118244() { // fn#118244, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15645:1283, offset: 0x024d2ca4, size: 233 bytes, params: 1, frame: 19
const value = environment.__proto__.__proto__;
const binding = env2_6;
const modeBinding = mode;
const PIP = VoicePanelModes.PIP;
const value4 = undefined;
binding(modeBinding !== PIP);
const controlsModeBinding = controlsMode;
const HIDDEN = VoicePanelControlsModes.HIDDEN;
const value5 = controlsModeBinding !== HIDDEN;
let r2 = !(focusedId != null) && !landscape;
r2 = !r2 ? value5 : r2;
env2_5(r2);
const r22 = focusedId != null ? ChannelRTCStore.getParticipant(channelId, focusedId) : value4;
const type = r22 == null ? value4 : r22.type;
const ACTIVITY = ParticipantTypes.ACTIVITY;
const value10 = type === ACTIVITY;
const isIOS2 = (PlatformUtilsModule).isIOS();
const r3 = isIOS2 ? value10 : !!isIOS2;
env2_8(r3);
env2_7(!r2 && !r3);
return value4;
}
function VoicePanelSystemUIManager() { // fn#118241, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15645:872, offset: 0x024d2992, size: 597 bytes, params: 1, frame: 28
const binding = env0_4;
const value2 = binding.useContext(importDefault(11794) /* metro dependency 11794: VoicePanelStateContext */);
const focused = value2.focused;
const channelId = value2.channelId;
const mode = value2.mode;
const controlsSpecs = value2.controlsSpecs;
const env0_3 = controlsSpecs;
const windowDimensions = value2.windowDimensions;
let useState = binding.useState;
const value3 = Reflect.apply(useState, binding, [true]);
const binding2 = env0_3;
const value4 = binding2(value3, 2);
const property = value4[0];
const env0_5 = value4[1];
useState = binding.useState;
const value5 = binding2(Reflect.apply(useState, binding, [true]), 2);
const property2 = value5[0];
const env0_6 = value5[1];
useState = binding.useState;
const value6 = binding2(Reflect.apply(useState, binding, [false]), 2);
const property3 = value6[0];
const env0_7 = value6[1];
useState = binding.useState;
const value7 = binding2(Reflect.apply(useState, binding, [false]), 2);
const property4 = value7[0];
const env0_8 = value7[1];
const {cancelPendingDebounce, handleStateChange} = binding.useMemo(_fun118242, [channelId]);
binding.useEffect(function() {
return _fun118248;
}, [cancelPendingDebounce]);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedReaction = reanimatedRexportModule.useAnimatedReaction;
const closure = function() {
var object = {};
object.focusedId = focused.get()?.id;
object.mode = mode.get();
object.controlsMode = controlsSpecs.get().mode;
object.landscape = windowDimensions.get().landscape;
return object;
};
closure.__closure = {focused: focused, mode: mode, controlsSpecs: controlsSpecs, windowDimensions: windowDimensions};
closure.__workletHash = 2478376475717;
closure.__initData = env0_12;
const closure2 = VoicePanelSystemUIManagerU;
closure2.__closure = {cheapWorkletShallowEqual: (require(7739) /* metro dependency 7739: cheapWorkletShallowEqual */).cheapWorkletShallowEqual,
runOnJS: reanimatedRexportModule.runOnJS, handleStateChange: handleStateChange};
closure2.__workletHash = 3592680244658;
closure2.__initData = env0_13;
Reflect.apply(useAnimatedReaction, reanimatedRexportModule, [closure, closure2]);
return (
<>
{property2 ? ((Component) => <Component hidden={!property} barStyle="light-content" />)(importDefault(7725) /* metro dependency 7725: StatusBarAndroid */) : null}
{((Component) => <Component prefersHidden={property3} prefersDeferringSystemGestures={property4} />)(importDefault(7727) /* metro dependency 7727: HomeIndicator */)}
</>
);
}
}
function _fun118242() { // fn#118242, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15645:1188, offset: 0x024d2be7, size: 100 bytes, params: 1, frame: 16
var environment;
const closure = updateState_118243;
const value = environment.__proto__;
const env0_1 = (importDefault(6949) /* metro dependency 6949 */)(closure, 500, {maxWait: 2000});
return {cancelPendingDebounce: cancelPendingDebounce, handleStateChange: handleStateChange_118246};
}
function cancelPendingDebounce() { // fn#118245, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15645:1527, offset: 0x024d2d8d, size: 21 bytes, params: 1, frame: 9
env0_1.cancel();
}
function _fun118247() { // fn#118247, offset: 0x024d2dea, size: 11 bytes, params: 1, frame: 1
return function() {
return cancelPendingDebounce();
};
}
function handleStateChange_118246(a0) { // fn#118246, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15645:1563, offset: 0x024d2da2, size: 72 bytes, params: 2, frame: 12
const binding = env0_2;
let focusedId = a0.focusedId;
if (binding !== focusedId) {
focusedId = a0.focusedId;
env0_1(a0);
} else {
env0_1.cancel();
updateState_118243(a0);
}
}
}
function _fun118247() { // fn#118247, offset: 0x024d2dea, size: 11 bytes, params: 1, frame: 1
return function() {
return cancelPendingDebounce();
};
function _fun118248() { // fn#118248, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15645:1730, offset: 0x01010e35, size: 15 bytes, params: 1, frame: 9
return cancelPendingDebounce();
}
}
function VoicePanelSystemUIManagerU(a0, a1) { // fn#118250, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15645:2021, owner: VoicePanelSystemUIManager.u, offset: 0x024d2e5e, size: 104 bytes, params: 3, frame: 17
let value = a1;
const value3 = undefined;
if (!CheapWorkletShallowEqualModule.cheapWorkletShallowEqual(a0, value ?? value3)) {
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value.runOnJS(handleStateChange)(a0);
}
return value3;
}
function VoicePanelSystemUIManagerU(a0, a1) { // fn#118250, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15645:2021, owner: VoicePanelSystemUIManager.u, offset: 0x024d2e5e, size: 104 bytes, params: 3, frame: 17
let value = a1;
const value3 = undefined;
const cheapWorkletShallowEqualModule = require(7739) /* metro dependency 7739: cheapWorkletShallowEqual */;
if (!cheapWorkletShallowEqualModule.cheapWorkletShallowEqual(a0, value ?? value3)) {
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value.runOnJS(handleStateChange)(a0);
}
return value3;
}
function updateState_118243({focusedId, mode, controlsMode, landscape}) { // fn#118243, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15645:1209, offset: 0x024d2c4b, size: 89 bytes, params: 2, frame: 12
var environment;
const value = environment.__proto__.__proto__;
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun118244);
}
function cancelPendingDebounce() { // fn#118245, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15645:1527, offset: 0x024d2d8d, size: 21 bytes, params: 1, frame: 9
env0_1.cancel();
}
function handleStateChange_118246(a0) { // fn#118246, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15645:1563, offset: 0x024d2da2, size: 72 bytes, params: 2, frame: 12
const binding = env0_2;
let focusedId = a0.focusedId;
if (binding !== focusedId) {
focusedId = a0.focusedId;
env0_1(a0);
} else {
env0_1.cancel();
updateState_118243(a0);
}
}
function _fun118244() { // fn#118244, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15645:1283, offset: 0x024d2ca4, size: 233 bytes, params: 1, frame: 19
const value = environment.__proto__.__proto__;
const binding = env2_6;
const modeBinding = mode;
const PIP = VoicePanelModes.PIP;
const value4 = undefined;
binding(modeBinding !== PIP);
const controlsModeBinding = controlsMode;
const HIDDEN = VoicePanelControlsModes.HIDDEN;
const value5 = controlsModeBinding !== HIDDEN;
let r2 = !(focusedId != null) && !landscape;
r2 = !r2 ? value5 : r2;
env2_5(r2);
const r22 = focusedId != null ? ChannelRTCStore.getParticipant(channelId, focusedId) : value4;
const type = r22 == null ? value4 : r22.type;
const ACTIVITY = ParticipantTypes.ACTIVITY;
const value10 = type === ACTIVITY;
const isIOS2 = (require(477) /* metro dependency 477: PlatformUtils */).isIOS();
const r3 = isIOS2 ? value10 : !!isIOS2;
env2_8(r3);
env2_7(!r2 && !r3);
return value4;
}
global.__d(_fun118240, 15448, [57, 31, 4606, 11795, 11793, 4299, 33, 11794, 690, 477, 6949, 4017, 7739, 7725, 7727,
2]) /* metro module 15448, dependencies: [57, 31, 4606, 11795, 11793, 4299, 33, 11794, 690, 477, 6949, 4017, 7739, 7725, 7727, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,34 +1,41 @@
/* Metro module 15531; source: modules/voice_panel/native/alerts/VoicePanelLockedIcon.tsx; dependencies: [31, 33, 4501, 697, 6821, 1305, 15532, 2] */
import NativeView from '../../../core/native/NativeView.tsx'; /* Metro dependency 6821 */
import Module15532 from '../../../../by-id/module-15532.js'; /* Metro dependency 15532 */
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 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
function _fun118926(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118926, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15728:6, offset: 0x024f4ffb, size: 240 bytes, params: 8, frame: 22
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const object = {'alignItems': 'center', 'justifyContent': 'center', 'alignSelf': 'center', 'width': 64,
ReactModule;
const createStyles = CreateStylesModule.createStyles;
const object2 = {'alignItems': 'center', 'justifyContent': 'center', 'alignSelf': 'center', 'width': 64,
'height': 64};
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object.backgroundColor = BACKGROUND_SURFACE_HIGH;
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
const env0_4 = Reflect.apply(createStyles, createStylesModule, [{container: object, icon: {}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/alerts/VoicePanelLockedIcon.tsx');
object2.backgroundColor = BACKGROUND_SURFACE_HIGH;
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
const env0_4 = Reflect.apply(createStyles, CreateStylesModule, [{container: object2, icon: {}}]);
(FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/alerts/VoicePanelLockedIcon.tsx');
exports.default = VoicePanelLockedIcon;
function VoicePanelLockedIcon() { // fn#118927, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15728:436, offset: 0x024f50eb, size: 139 bytes, params: 1, frame: 20
const styles = useStyles();
const Icon = (NativeModule).Icon;
const iconProps = {style: styles.icon, source: Module15532};
const IconSizes = (NativeModule).IconSizes;
const LARGE = IconSizes.LARGE;
iconProps.size = LARGE;
return (
<NativeView style={styles.container}>
<Icon {...iconProps} />
</NativeView>
);
}
}
function VoicePanelLockedIcon() { // fn#118927, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15728:436, offset: 0x024f50eb, size: 139 bytes, params: 1, frame: 20
const styles = useStyles();
const NativeView = importDefault(6821) /* metro dependency 6821: NativeView */;
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
const iconProps = {style: styles.icon, source: importDefault(15532) /* metro dependency 15532 */};
const IconSizes = (require(1305) /* metro dependency 1305: native */).IconSizes;
const LARGE = IconSizes.LARGE;
iconProps.size = LARGE;
return (
<NativeView style={styles.container}>
<Icon {...iconProps} />
</NativeView>
);
}
global.__d(_fun118926, 15531, [31, 33, 4501, 697, 6821, 1305, 15532,
2]) /* metro module 15531, dependencies: [31, 33, 4501, 697, 6821, 1305, 15532, 2] */;
@@ -1,35 +1,47 @@
/* Metro module 15533; source: modules/voice_panel/native/alerts/VoicePanelMaxCapacityAlert.tsx; dependencies: [31, 1379, 33, 632, 4500, 4500, 15531, 1244, 2] */
import ChannelStore from '../../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
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 UseStateFromStoresModule from '../../../../external/discord_common/js/packages/flux/useStateFromStores.tsx'; /* Metro dependency 632 */
import * as AlertModalNativeModule from '../../../../design/components/AlertModal/native/AlertModal.native.tsx'; /* Metro dependency 4500 */
function _fun118929(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118929, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15730:6, offset: 0x024f51bc, size: 166 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 channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/alerts/VoicePanelMaxCapacityAlert.tsx');
ReactModule;
(FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/alerts/VoicePanelMaxCapacityAlert.tsx');
exports.default = VoicePanelMaxCapacityAlert;
exports.VOICE_PANEL_MAX_CAPACITY_KEY = 'voice-panel-max-capacity';
function VoicePanelMaxCapacityAlert({channelId}) { // fn#118930, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15730:236, offset: 0x024f5262, size: 358 bytes, params: 2, frame: 24
const value2 = (UseStateFromStoresModule).useStateFromStores([ChannelStore],
_fun118931, [channelId]);
const value3 = (AlertModalNativeModule).useDismissModalCallback();
const AlertModal = (AlertModalNativeModule).AlertModal;
object = {header: ((Component) => <Component />)(importDefault(15531) /* metro dependency 15531: VoicePanelLockedIcon */)};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.hHbsQj);
object.content = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['387SQH'],
{count: value2});
const AlertActionButton = (AlertModalNativeModule).AlertActionButton;
object.actions = (
<AlertActionButton
variant="secondary"
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['NX+WJN'])}
onPress={value3}
/>
);
return <AlertModal {...object} />;
function _fun118931() { // fn#118931, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15730:325, offset: 0x024f53c8, size: 55 bytes, params: 1, frame: 12
const value = environment.__proto__;
const userLimit = ChannelStore.getChannel(channelId)?.userLimit;
return userLimit ?? 0;
}
}
}
function VoicePanelMaxCapacityAlert({channelId}) { // fn#118930, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15730:236, offset: 0x024f5262, size: 358 bytes, params: 2, frame: 24
var object2;
const value2 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([ChannelStore],
_fun118931, [channelId]);
const value3 = (require(4500) /* metro dependency 4500: AlertModalNative */).useDismissModalCallback();
const AlertModal = (require(4500) /* metro dependency 4500: AlertModalNative */).AlertModal;
object2 = {header: ((Component) => <Component />)(importDefault(15531) /* metro dependency 15531: VoicePanelLockedIcon */)};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.hHbsQj);
object2.content = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['387SQH'],
{count: value2});
const AlertActionButton = (require(4500) /* metro dependency 4500: AlertModalNative */).AlertActionButton;
object2.actions = <AlertActionButton variant="secondary" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['NX+WJN'])} onPress={value3} />;
return <AlertModal {...object2} />;
}
function _fun118931() { // fn#118931, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15730:325, offset: 0x024f53c8, size: 55 bytes, params: 1, frame: 12
const value = environment.__proto__;
const userLimit = ChannelStore.getChannel(channelId)?.userLimit;
return userLimit ?? 0;
}
global.__d(_fun118929, 15533, [31, 1379, 33, 632, 4500, 4500, 15531, 1244,
2]) /* metro module 15533, dependencies: [31, 1379, 33, 632, 4500, 4500, 15531, 1244, 2] */;
@@ -1,24 +1,37 @@
/* Metro module 15530; source: modules/voice_panel/native/alerts/VoicePanelNoJoinPermissionsAlert.tsx; dependencies: [31, 33, 4500, 4500, 15531, 1244, 2] */
import VoicePanelLockedIcon from './VoicePanelLockedIcon.tsx'; /* Metro dependency 15531 */
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 AlertModalNativeModule from '../../../../design/components/AlertModal/native/AlertModal.native.tsx'; /* Metro dependency 4500 */
function _fun118924(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118924, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15727:6, offset: 0x024f4e47, size: 150 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(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/alerts/VoicePanelNoJoinPermissionsAlert.tsx');
ReactModule;
(FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/alerts/VoicePanelNoJoinPermissionsAlert.tsx');
exports.default = VoicePanelNoJoinPermissionsAlert;
exports.VOICE_PANEL_NO_JOIN_PERMS_KEY = 'voice-panel-no-join-perms';
function VoicePanelNoJoinPermissionsAlert() { // fn#118925, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15727:232, offset: 0x024f4edd, size: 286 bytes, params: 1, frame: 21
const value2 = (AlertModalNativeModule).useDismissModalCallback();
const AlertModal = (AlertModalNativeModule).AlertModal;
const alertModalProps = {header: ((Component) => <Component />)(VoicePanelLockedIcon)};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
alertModalProps.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['7/2/3M']);
alertModalProps.content = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.xsenup);
const AlertActionButton = (AlertModalNativeModule).AlertActionButton;
alertModalProps.actions = (
<AlertActionButton
variant="secondary"
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['NX+WJN'])}
onPress={value2}
/>
);
return <AlertModal {...alertModalProps} />;
}
}
function VoicePanelNoJoinPermissionsAlert() { // fn#118925, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15727:232, offset: 0x024f4edd, size: 286 bytes, params: 1, frame: 21
const value2 = (require(4500) /* metro dependency 4500: AlertModalNative */).useDismissModalCallback();
const AlertModal = (require(4500) /* metro dependency 4500: AlertModalNative */).AlertModal;
const alertModalProps = {header: ((Component) => <Component />)(importDefault(15531) /* metro dependency 15531: VoicePanelLockedIcon */)};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
alertModalProps.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['7/2/3M']);
alertModalProps.content = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.xsenup);
const AlertActionButton = (require(4500) /* metro dependency 4500: AlertModalNative */).AlertActionButton;
alertModalProps.actions = <AlertActionButton variant="secondary" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['NX+WJN'])} onPress={value2} />;
return <AlertModal {...alertModalProps} />;
}
global.__d(_fun118924, 15530, [31, 33, 4500, 4500, 15531, 1244,
2]) /* metro module 15530, dependencies: [31, 33, 4500, 4500, 15531, 1244, 2] */;
@@ -1,26 +1,38 @@
/* Metro module 15540; source: modules/voice_panel/native/alerts/VoicePanelNoVideoPermissionsAlert.tsx; dependencies: [31, 33, 4500, 4500, 1244, 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 AlertModalNativeModule from '../../../../design/components/AlertModal/native/AlertModal.native.tsx'; /* Metro dependency 4500 */
function _fun118961(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118961, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15737:6, offset: 0x024f6bb1, size: 143 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_2 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/alerts/VoicePanelNoVideoPermissionsAlert.tsx');
ReactModule;
(FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/alerts/VoicePanelNoVideoPermissionsAlert.tsx');
exports.default = VoicePanelNoVideoPermissionsAlert;
exports.VOICE_PANEL_NO_VIDEO_PERMS_KEY = 'voice-panel-no-video-perms';
function VoicePanelNoVideoPermissionsAlert() { // fn#118962, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15737:233, offset: 0x024f6c40, size: 254 bytes, params: 1, frame: 21
const value2 = (AlertModalNativeModule).useDismissModalCallback();
const AlertModal = (AlertModalNativeModule).AlertModal;
const object = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const OYzPcW = (require(1244) /* metro dependency 1244: indexNative */).t.OYzPcW;
object.title = Reflect.apply(string, intl, [OYzPcW]);
object.content = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.oBH7Y2);
const AlertActionButton = (AlertModalNativeModule).AlertActionButton;
object.actions = (
<AlertActionButton
variant="secondary"
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['NX+WJN'])}
onPress={value2}
/>
);
return <AlertModal {...object} />;
}
}
function VoicePanelNoVideoPermissionsAlert() { // fn#118962, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15737:233, offset: 0x024f6c40, size: 254 bytes, params: 1, frame: 21
const value2 = (require(4500) /* metro dependency 4500: AlertModalNative */).useDismissModalCallback();
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 OYzPcW = (require(1244) /* metro dependency 1244: indexNative */).t.OYzPcW;
object2.title = Reflect.apply(string, intl, [OYzPcW]);
object2.content = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.oBH7Y2);
const AlertActionButton = (require(4500) /* metro dependency 4500: AlertModalNative */).AlertActionButton;
object2.actions = <AlertActionButton variant="secondary" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['NX+WJN'])} onPress={value2} />;
return <AlertModal {...object2} />;
}
global.__d(_fun118961, 15540, [31, 33, 4500, 4500, 1244,
2]) /* metro module 15540, dependencies: [31, 33, 4500, 4500, 1244, 2] */;
@@ -1,56 +1,77 @@
/* Metro module 15534; source: modules/voice_panel/native/alerts/VoicePanelNsfwAlert.tsx; dependencies: [31, 1422, 1867, 33, 4500, 4500, 1244, 6593, 4796, 2] */
import GuildStore from '../../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
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 IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as GuildRecordModule from '../../../../records/GuildRecord.tsx'; /* Metro dependency 1422 */
import * as AlertModalNativeModule from '../../../../design/components/AlertModal/native/AlertModal.native.tsx'; /* Metro dependency 4500 */
function _fun118932(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118932, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15731:6, offset: 0x024f53ff, size: 197 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 env0_3 = (require(1422) /* metro dependency 1422: GuildRecord */).isGuildNSFW;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const value = require(33) /* metro dependency 33 */;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/alerts/VoicePanelNsfwAlert.tsx');
ReactModule;
(FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/alerts/VoicePanelNsfwAlert.tsx');
exports.default = VoicePanelNsfwAlert;
exports.VOICE_PANEL_NSFW_KEY = 'voice-panel-nsfw';
function VoicePanelNsfwAlert({guildId, channelId}) { // fn#118933, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15731:264, offset: 0x024f54c4, size: 517 bytes, params: 2, frame: 28
const env0_2 = (AlertModalNativeModule).useDismissModalCallback();
const isGuildNSFWBinding = isGuildNSFW;
const guildStoreBinding = GuildStore;
const getGuild = guildStoreBinding.getGuild;
const isGuildNSFW2 = isGuildNSFWBinding(Reflect.apply(getGuild, guildStoreBinding, [guildId]));
const AlertModal = (AlertModalNativeModule).AlertModal;
const intl = (IndexNativeModule).intl;
let string = intl.string;
const t = (IndexNativeModule).t;
const r6 = isGuildNSFW2 ? Reflect.apply(string, intl, [t.xi46lg]) : Reflect.apply(string, intl, [t.ZmwvDc]);
string = intl.string;
const r5 = isGuildNSFW2 ? Reflect.apply(string, intl, [t.ZtuRts]) : Reflect.apply(string, intl, [t.E4Cd5I]);
const AlertActions = (AlertModalNativeModule).AlertActions;
const AlertActionButton = (AlertModalNativeModule).AlertActionButton;
const alertActionButton = (
<AlertActionButton
variant="primary"
onPress={onPress_118934}
text={intl.string((IndexNativeModule).t.wVq7uo)}
key="confirm"
/>
);
return (
<AlertModal
title={r6}
content={r5}
actions={<AlertActions>
{alertActionButton}
<AlertActionButton
variant="secondary"
onPress={onPress_118935}
text={intl.string((IndexNativeModule).t['/g10LC'])}
key="add-profile-picture"
/>
</AlertActions>}
/>
);
function VoicePanelNsfwAlertOnPress() { // fn#118934, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15731:673, owner: VoicePanelNsfwAlert.onPress, offset: 0x024f56c9, size: 80 bytes, params: 1, frame: 15
let value = environment.__proto__;
value = importDefault(6593) /* metro dependency 6593: GuildActionCreators */;
value.nsfwAgree(guildId);
value = importDefault(4796) /* metro dependency 4796: SelectedChannelActionCreators */;
value.selectVoiceChannel(channelId);
env0_2();
}
function VoicePanelNsfwAlertOnPress_118935() { // fn#118935, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15731:846, owner: VoicePanelNsfwAlert.onPress, offset: 0x024f5719, size: 53 bytes, params: 1, frame: 13
let value = environment.__proto__;
value = importDefault(6593) /* metro dependency 6593: GuildActionCreators */;
value.nsfwReturnToSafety(guildId);
env0_2();
}
}
}
function VoicePanelNsfwAlert({guildId, channelId}) { // fn#118933, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15731:264, offset: 0x024f54c4, size: 517 bytes, params: 2, frame: 28
const env0_2 = (require(4500) /* metro dependency 4500: AlertModalNative */).useDismissModalCallback();
const isGuildNSFWBinding = isGuildNSFW;
const getGuild = GuildStore.getGuild;
const isGuildNSFW2 = isGuildNSFWBinding(Reflect.apply(getGuild, GuildStore, [guildId]));
const AlertModal = (require(4500) /* metro dependency 4500: AlertModalNative */).AlertModal;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const r6 = isGuildNSFW2 ? Reflect.apply(string, intl, [t.xi46lg]) : Reflect.apply(string, intl, [t.ZmwvDc]);
string = intl.string;
const r5 = isGuildNSFW2 ? Reflect.apply(string, intl, [t.ZtuRts]) : Reflect.apply(string, intl, [t.E4Cd5I]);
const AlertActions = (require(4500) /* metro dependency 4500: AlertModalNative */).AlertActions;
const AlertActionButton = (require(4500) /* metro dependency 4500: AlertModalNative */).AlertActionButton;
const alertActionButton = <AlertActionButton variant="primary" onPress={onPress_118934} text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.wVq7uo)} key="confirm" />;
return (
<AlertModal
title={r6}
content={r5}
actions={<AlertActions>{alertActionButton}<AlertActionButton variant="secondary" onPress={onPress_118935} text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['/g10LC'])} key="add-profile-picture" /></AlertActions>}
/>
);
}
function VoicePanelNsfwAlertOnPress() { // fn#118934, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15731:673, owner: VoicePanelNsfwAlert.onPress, offset: 0x024f56c9, size: 80 bytes, params: 1, frame: 15
let value = environment.__proto__;
value = importDefault(6593) /* metro dependency 6593: GuildActionCreators */;
value.nsfwAgree(guildId);
value = importDefault(4796) /* metro dependency 4796: SelectedChannelActionCreators */;
value.selectVoiceChannel(channelId);
env0_2();
}
function VoicePanelNsfwAlertOnPress_118935() { // fn#118935, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15731:846, owner: VoicePanelNsfwAlert.onPress, offset: 0x024f5719, size: 53 bytes, params: 1, frame: 13
let value = environment.__proto__;
value = importDefault(6593) /* metro dependency 6593: GuildActionCreators */;
value.nsfwReturnToSafety(guildId);
env0_2();
}
global.__d(_fun118932, 15534, [31, 1422, 1867, 33, 4500, 4500, 1244, 6593, 4796,
2]) /* metro module 15534, dependencies: [31, 1422, 1867, 33, 4500, 4500, 1244, 6593, 4796, 2] */;
@@ -1,104 +1,109 @@
/* Metro module 8468; source: modules/voice_panel/native/card/DominantColorUtils.tsx; dependencies: [57, 31, 27, 1393, 4000, 697, 628, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
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 */
function _fun67250(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#67250, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8653:6, offset: 0x01c1b512, size: 296 bytes, params: 8, frame: 23
const env0_0 = require;
const closure = getCachedSourceFromURI;
const closure2 = useDominantRGBFromImage_67252;
const getCachedSourceFromURI2 = getCachedSourceFromURI;
const useDominantRGBFromImage_672522 = useDominantRGBFromImage_67252;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_5 = value.NativeModules;
const env0_6 = value.Image;
value = importDefault(1393) /* metro dependency 1393 */;
value = new value({max: 1000});
value = importDefault(1393) /* metro dependency 1393 */;
value = new value({max: 1000});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/card/DominantColorUtils.tsx');
exports.getCachedSourceFromURI = closure;
exports.useDominantRGBFromImage = closure2;
(FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/card/DominantColorUtils.tsx');
exports.getCachedSourceFromURI = getCachedSourceFromURI2;
exports.useDominantRGBFromImage = useDominantRGBFromImage_672522;
exports.useDominantColorFromImage = useDominantColorFromImage_67259;
}
function getCachedSourceFromURI(a0) { // fn#67251, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8653:209, offset: 0x01c1b63a, size: 101 bytes, params: 2, frame: 17
const value = a0;
const value3 = env0_8.get(value);
const value4 = null;
const r0 = value4 != value3 ? value3 : typeof value === 'number' ? value : value4 == value || value.trim() === '' ? value4 : {uri: value};
env0_8.set(value, r0);
return r0;
}
function useDominantRGBFromImage_67252(a0) { // fn#67252, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8653:387, offset: 0x01c1b69f, size: 223 bytes, params: 2, frame: 21
var moduleValue;
const env0_0 = a0;
let binding = env0_4;
const env0_1 = binding.useRef(true);
env0_4.useEffect(function() {
return _fun67254;
}, []);
binding = env0_4;
const useState = binding.useState;
let r0 = a0 != null ? env0_7.get(a0) : undefined;
if (r0 == null) {
moduleValue = require(4000) /* metro dependency 4000: ColorUtils */;
r0 = moduleValue.hexToRgb((importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_800);
function getCachedSourceFromURI(a0) { // fn#67251, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8653:209, offset: 0x01c1b63a, size: 101 bytes, params: 2, frame: 17
const value = a0;
const value3 = env0_8.get(value);
const value4 = null;
const r0 = value4 != value3 ? value3 : typeof value === 'number' ? value : value4 == value || value.trim() === '' ? value4 : {uri: value};
env0_8.set(value, r0);
return r0;
}
const value6 = env0_3(Reflect.apply(useState, binding, [r0]), 2);
const property = value6[0];
const env0_2 = value6[1];
env0_4.useEffect(_fun67255, [a0]);
return property;
}
function useDominantColorFromImage_67259(a0) { // fn#67259, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8653:1244, offset: 0x01c1b926, size: 76 bytes, params: 2, frame: 20
const value = useDominantRGBFromImage_67252(a0);
return 'rgb(' + value.r + ', ' + value.g + ', ' + value.b + ')';
}
function _fun67253() { // fn#67253, offset: 0x01c1b77e, size: 11 bytes, params: 1, frame: 1
return _fun67254;
}
function _fun67255() { // fn#67255, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8653:638, offset: 0x01c1b79c, size: 225 bytes, params: 1, frame: 16
var environment;
var value5;
var value;
const value2 = undefined;
const r2 = env0_0 != null ? env1_7.get(env0_0) : value2;
var env0_0 = r2;
if (env0_0 != null) {
if (r2 == null) {
value5 = environment.__proto__;
value = getCachedSourceFromURI(env0_0);
if (value != null) {
value = (typeof value === 'number' ? NativeModules.ImageManager.getDominantColorsLocalAsset(Image.resolveAssetSource(value)) : NativeModules.ImageManager.getDominantColors(Image.resolveAssetSource(value))).then(_fun67256);
value.catch(function() {
});
}
} else {
env0_2(_fun67258);
function useDominantRGBFromImage_67252(a0) { // fn#67252, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8653:387, offset: 0x01c1b69f, size: 223 bytes, params: 2, frame: 21
var moduleValue;
const env0_0 = a0;
let binding = ReactModule;
const env0_1 = binding.useRef(true);
ReactModule.useEffect(function() {
return _fun67254;
}, []);
binding = ReactModule;
const useState = binding.useState;
let r0 = a0 != null ? env0_7.get(a0) : undefined;
if (r0 == null) {
moduleValue = require(4000) /* metro dependency 4000: ColorUtils */;
r0 = moduleValue.hexToRgb((importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_800);
}
const value6 = Module00057(Reflect.apply(useState, binding, [r0]), 2);
const property = value6[0];
const env0_2 = value6[1];
ReactModule.useEffect(_fun67255, [a0]);
return property;
function _fun67253() { // fn#67253, offset: 0x01c1b77e, size: 11 bytes, params: 1, frame: 1
return _fun67254;
function _fun67254() { // fn#67254, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8653:461, offset: 0x01c1b789, size: 19 bytes, params: 1, frame: 2
env1_1.current = false;
}
}
function _fun67255() { // fn#67255, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8653:638, offset: 0x01c1b79c, size: 225 bytes, params: 1, frame: 16
var environment;
var value5;
var value;
const value2 = undefined;
const r2 = env0_0 != null ? env1_7.get(env0_0) : value2;
var env0_0 = r2;
if (env0_0 != null) {
if (r2 == null) {
value5 = environment.__proto__;
value = getCachedSourceFromURI(env0_0);
if (value != null) {
value = (typeof value === 'number' ? NativeModules.ImageManager.getDominantColorsLocalAsset(Image.resolveAssetSource(value)) : NativeModules.ImageManager.getDominantColors(Image.resolveAssetSource(value))).then(_fun67256);
value.catch(function() {
});
}
} else {
env0_2(_fun67258);
}
}
return value2;
function _fun67256(a0) { // fn#67256, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8653:892, offset: 0x01c1b87d, size: 105 bytes, params: 2, frame: 15
const value2 = env2_3(a0[0], 3);
const object = {r: value2[0], g: value2[1], b: value2[2]};
env2_7.set(env1_0, object);
if (env1_1.current) {
env1_2(object);
}
}
function _fun67258(a0) { // fn#67258, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8653:991, offset: 0x01c1b8e6, size: 64 bytes, params: 2, frame: 15
const value = a0;
return env0_0 === value || (importDefault(628) /* metro dependency 628: shallowEqual */)(env0_0,
value) ? value : env0_0;
}
}
}
return value2;
}
function _fun67254() { // fn#67254, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8653:461, offset: 0x01c1b789, size: 19 bytes, params: 1, frame: 2
env1_1.current = false;
}
function _fun67256(a0) { // fn#67256, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8653:892, offset: 0x01c1b87d, size: 105 bytes, params: 2, frame: 15
const value2 = env2_3(a0[0], 3);
const object2 = {r: value2[0], g: value2[1], b: value2[2]};
env2_7.set(env1_0, object2);
if (env1_1.current) {
env1_2(object2);
function useDominantColorFromImage_67259(a0) { // fn#67259, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8653:1244, offset: 0x01c1b926, size: 76 bytes, params: 2, frame: 20
const value = useDominantRGBFromImage_67252(a0);
return 'rgb(' + value.r + ', ' + value.g + ', ' + value.b + ')';
}
}
function _fun67258(a0) { // fn#67258, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8653:991, offset: 0x01c1b8e6, size: 64 bytes, params: 2, frame: 15
const value = a0;
return env0_0 === value || (importDefault(628) /* metro dependency 628: shallowEqual */)(env0_0,
value) ? value : env0_0;
}
global.__d(_fun67250, 8468, [57, 31, 27, 1393, 4000, 697, 628,
2]) /* metro module 8468, dependencies: [57, 31, 27, 1393, 4000, 697, 628, 2] */;
@@ -1,29 +1,45 @@
/* Metro module 15496; source: modules/voice_panel/native/card/VoicePanelAnimatedActivityCard.tsx; dependencies: [57, 31, 1378, 7730, 1379, 11795, 11793, 661, 4237, 33, 4501, 697, 11794, 15319, 566, 15497, 7860, 6777, 10701, 6771, 6789, 8620, 12711, 4017, 4610, 5321, 1478, 10703, 8141, 10704, 15498, 15499, 15503, 3868, 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 UseAnalyticsLocations from '../../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
import UseGetOrFetchApplications from '../../../applications/useGetOrFetchApplications.tsx'; /* Metro dependency 6777 */
import AnalyticsLocation from '../../../app_analytics/AnalyticsLocation.tsx'; /* Metro dependency 6789 */
import ChannelCallLifecycleStore from '../../../video_calls/native/ChannelCallLifecycleStore.tsx'; /* Metro dependency 7730 */
import UseCurrentEmbeddedApplication from '../../../activities/utils/useCurrentEmbeddedApplication.tsx'; /* Metro dependency 10701 */
import VoicePanelStateContext from '../VoicePanelStateContext.tsx'; /* Metro dependency 11794 */
import UseAnimatedKeyboardHeight from '../../../keyboard/native/useAnimatedKeyboardHeight.tsx'; /* Metro dependency 15319 */
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 NativeModule from '../../../../external/discord_common/js/packages/design/native.tsx'; /* Metro dependency 3868 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as ConstantsModule2 from '../../../activities/Constants.tsx'; /* Metro dependency 4237 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as Module05321Module from '../../../../by-id/module-05321.js'; /* Metro dependency 5321 */
import * as UseAnalyticsLocationsModule from '../../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
import * as EmbeddedActivitiesActionCreatorsModule from '../../../activities/EmbeddedActivitiesActionCreators.tsx'; /* Metro dependency 7860 */
import * as AnalyticsModule from '../../../../hooks/analytics.tsx'; /* Metro dependency 8620 */
import * as GetDefaultOrientationLockStateModule from '../../../activities/native/getDefaultOrientationLockState.tsx'; /* Metro dependency 10703 */
import * as VoicePanelControlsConstantsModule from '../controls/VoicePanelControlsConstants.tsx'; /* Metro dependency 11793 */
import * as VoicePanelConstantsModule from '../../VoicePanelConstants.tsx'; /* Metro dependency 11795 */
import * as IsActivityParticipantCurrentUserCurrentSessionModule from '../../../activities/isActivityParticipantCurrentUserCurrentSession.tsx'; /* Metro dependency 12711 */
import * as UseActivityShelfItemDataModule from '../../../activities/useActivityShelfItemData.tsx'; /* Metro dependency 15497 */
function _fun118643(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118643, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15693:6, offset: 0x024e6309, size: 544 bytes, params: 8, frame: 22
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const embeddedActivitiesStore = importDefault(1378) /* metro dependency 1378: EmbeddedActivitiesStore */;
const channelCallLifecycleStore = importDefault(7730) /* metro dependency 7730: ChannelCallLifecycleStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const voicePanelConstantsModule = require(11795) /* metro dependency 11795: VoicePanelConstants */;
const env0_8 = voicePanelConstantsModule.IS_IOS;
const env0_9 = voicePanelConstantsModule.VoicePanelModes;
const env0_10 = (require(11793) /* metro dependency 11793: VoicePanelControlsConstants */).VoicePanelControlsModes;
const env0_11 = (require(661) /* metro dependency 661: Constants */).ThemeTypes;
const constantsModule = require(4237) /* metro dependency 4237: Constants */;
let value = ReactModule;
const constantsModule = ConstantsModule2;
const env0_12 = constantsModule.ACTIVITY_PORTRAIT_ASPECT_RATIO;
const env0_13 = constantsModule.ActivityLayoutMode;
const env0_14 = constantsModule.OrientationLockState;
const value4 = require(33) /* metro dependency 33 */;
const env0_15 = value4.jsx;
const env0_16 = value4.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
const env0_17 = Reflect.apply(createStyles, createStylesModule,
const createStyles = CreateStylesModule.createStyles;
const BACKGROUND_SURFACE_HIGH = (Native).colors.BACKGROUND_SURFACE_HIGH;
const env0_17 = Reflect.apply(createStyles, CreateStylesModule,
[{activityContainerBackground: {backgroundColor: BACKGROUND_SURFACE_HIGH}}]);
object = {code: 'function VoicePanelAnimatedActivityCardTsx1(){const{sharedVisible,mode}=this.__closure;return{visible:sharedVisible.get(),mode:mode.get()};}'};
object = {code: 'function VoicePanelAnimatedActivityCardTsx2({visible:visible,mode:mode},prev){const{VoicePanelModes,runOnJS,incrementActivityKey}=this.__closure;if(visible===1&&prev!=null&&prev.visible===0||mode!==VoicePanelModes.PIP&&(prev===null||prev===void 0?void 0:prev.mode)===VoicePanelModes.PIP){runOnJS(incrementActivityKey)();}}'};
@@ -34,366 +50,397 @@ function _fun118643(global, require, importDefault, importAll, module, exports,
object = {code: "function VoicePanelAnimatedActivityCardTsx7(){const{IS_IOS,animatedKeyboardHeight,windowDimensions,isTabletActivitySurface,focusedOrientationLockState,OrientationLockState,ACTIVITY_PORTRAIT_ASPECT_RATIO,isActivityFocused,backgroundColor}=this.__closure;const keyboardHeight=IS_IOS?animatedKeyboardHeight.get():0;const isScreenLandscape=windowDimensions.get().landscape;const screenWidth=windowDimensions.get().width;const screenHeight=windowDimensions.get().height;const shouldLetterBox=isTabletActivitySurface&&focusedOrientationLockState===OrientationLockState.LANDSCAPE&&!isScreenLandscape;const shouldPillarBox=isTabletActivitySurface&&focusedOrientationLockState===OrientationLockState.PORTRAIT&&isScreenLandscape;let containerPaddingVertical=0;let containerPaddingHorizontal=0;if(shouldLetterBox){containerPaddingVertical=(screenHeight-screenWidth*ACTIVITY_PORTRAIT_ASPECT_RATIO)/2;}else if(shouldPillarBox){containerPaddingHorizontal=(screenWidth-screenHeight*ACTIVITY_PORTRAIT_ASPECT_RATIO)/2;}return{flex:isActivityFocused?0:1,backgroundColor:backgroundColor,paddingVertical:containerPaddingVertical,paddingHorizontal:containerPaddingHorizontal,width:isActivityFocused?screenWidth:'auto',height:isActivityFocused?screenHeight-keyboardHeight:'auto',maxHeight:'100%',maxWidth:'100%'};}"};
object = {code: 'function VoicePanelAnimatedActivityCardTsx8(event,manager){const{controlsSpecs,VoicePanelControlsModes,runOnJS,hideControls}=this.__closure;manager.fail();if(controlsSpecs.get().mode!==VoicePanelControlsModes.HIDDEN){runOnJS(hideControls)({debounce:true});}}'};
value = value.memo(VoicePanelAnimatedActivityCard);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/card/VoicePanelAnimatedActivityCard.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/card/VoicePanelAnimatedActivityCard.tsx');
exports.default = value;
}
function VoicePanelAnimatedActivityCardInner({applicationId, sharedVisible, layout}) { // fn#118644, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15693:3773, offset: 0x024e6529, size: 2256 bytes, params: 2, frame: 50
var object4;
var r13;
const GestureDetector = (require(5321) /* metro dependency 5321 */).GestureDetector;
var ReanimatedNativeView;
var object2;
var items2;
const env0_18 = undefined;
const env0_19 = undefined;
const env0_21 = undefined;
const styles = useStyles();
let binding = env0_4;
let useState = binding.useState;
const value4 = env0_3(Reflect.apply(useState, binding, [0]), 2);
const property = value4[0];
const env0_2 = value4[1];
const value5 = env0_4.useContext(importDefault(11794) /* metro dependency 11794: VoicePanelStateContext */);
var env0_3 = value5.channelId;
const focused = value5.focused;
var env0_4 = focused;
const layoutManager = value5.layoutManager;
const mode = value5.mode;
const windowDimensions = value5.windowDimensions;
const hideControls = value5.hideControls;
const controlsSpecs = value5.controlsSpecs;
const value6 = (importDefault(15319) /* metro dependency 15319: useAnimatedKeyboardHeight */)();
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channelId);
});
const value7 = env0_4.useMemo(function() {
return {channel: channel, type: 'channel'};
}, [channel]);
const guild_id = channel?.guild_id;
const useActivityShelfItemDataModule = require(15497) /* metro dependency 15497: useActivityShelfItemData */;
const useActivityShelfItemData = useActivityShelfItemDataModule.useActivityShelfItemData;
let r5 = channel?.guild_id ?? null;
const value9 = Reflect.apply(useActivityShelfItemData, useActivityShelfItemDataModule, [r5, applicationId]);
env0_4.useEffect(_fun118647, [guild_id]);
const property2 = env0_3((importDefault(6777) /* metro dependency 6777: useGetOrFetchApplications */)([applicationId]),
1)[0];
const {gridOrientationLockState,
focusedOrientationLockState} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([EmbeddedActivitiesStore],
function() {
var object = {};
var applicationIdBinding = applicationId;
object.gridOrientationLockState = EmbeddedActivitiesStore.getGridOrientationLockStateForApp(applicationIdBinding);
object.focusedOrientationLockState = EmbeddedActivitiesStore.getOrientationLockStateForApp(applicationIdBinding);
return object;
}, [applicationId]);
const value12 = (importDefault(10701) /* metro dependency 10701: useCurrentEmbeddedApplication */)();
const value13 = (require(566) /* metro dependency 566: flux */).useStateFromStores([EmbeddedActivitiesStore],
_fun118649);
const defaultImport2 = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
const ACTIVITY_TILE = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).ACTIVITY_TILE;
const analyticsLocations = defaultImport2(ACTIVITY_TILE).analyticsLocations;
const value14 = (require(8620) /* metro dependency 8620: analytics */).useAnalyticsContext();
let r2 = value12 != null && value12.id === property2?.id;
r2 = !r2 ? (value13 == null || value13.participants == null ? undefined : value13.participants.find(_fun118652)) != null : r2;
const value19 = env0_4.useCallback(_fun118653, [r2]);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
let useAnimatedReaction = reanimatedRexportModule.useAnimatedReaction;
let closure = function() {
var object = {};
object.visible = sharedVisible.get();
object.mode = mode.get();
return object;
};
closure.__closure = {sharedVisible: sharedVisible, mode: mode};
closure.__workletHash = 2072430391020;
closure.__initData = env0_18;
const closure2 = VoicePanelAnimatedActivityCardInnerQ;
closure2.__closure = {VoicePanelModes: VoicePanelModes, runOnJS: reanimatedRexportModule.runOnJS,
incrementActivityKey: value19};
closure2.__workletHash = 9732208421749;
closure2.__initData = env0_19;
Reflect.apply(useAnimatedReaction, reanimatedRexportModule, [closure, closure2]);
const [property3, property4] = env0_3(env0_4.useState(false), 2);
const r39 = value13 != null ? (require(4610) /* metro dependency 4610: ChannelRTCParticipants */).getEmbeddedActivityParticipantId({applicationId: value13.applicationId,
instanceId: value13.compositeInstanceId}) : null;
const env0_20 = r39;
const moduleValue8 = reanimatedRexportModule;
useAnimatedReaction = moduleValue8.useAnimatedReaction;
closure = VoicePanelAnimatedActivityCardInnerUe;
object4 = {activityParticipantId: r39, focused: focused, mode: mode};
object4.VoicePanelModes = VoicePanelModes;
closure.__closure = object4;
closure.__workletHash = 2833167890519;
closure.__initData = env0_20;
const closure3 = VoicePanelAnimatedActivityCardInnerLe;
closure3.__closure = {runOnJS: reanimatedRexportModule.runOnJS, setIsActivityFocused: property4};
closure3.__workletHash = 12291590020155;
closure3.__initData = env0_21;
Reflect.apply(useAnimatedReaction, moduleValue8, [closure, closure3]);
const value23 = env0_4.useMemo(function() {
var Gesture = require(dependencyMap[25]).Gesture;
return Gesture.Tap();
}, []);
const value24 = env0_4.useCallback(_fun118660, [layoutManager, applicationId]);
env0_4.useLayoutEffect(_fun118661, [value24, windowDimensions, gridOrientationLockState, r2]);
binding = env0_4;
useState = binding.useState;
const getDefaultTargetDimensions = layoutManager.getDefaultTargetDimensions;
const value26 = env0_3(Reflect.apply(useState, binding, [Reflect.apply(getDefaultTargetDimensions, layoutManager,
[])]), 2);
const property5 = value26[0];
const property6 = value26[1];
const env0_22 = property6;
const value27 = env0_4.useCallback(_fun118662, [layoutManager, property6]);
const env0_23 = value27;
const moduleValue9 = reanimatedRexportModule;
useAnimatedReaction = moduleValue9.useAnimatedReaction;
closure = function() {
return windowDimensions.get();
};
closure.__closure = {windowDimensions: windowDimensions};
closure.__workletHash = 12220613662042;
closure.__initData = env0_22;
const closure4 = VoicePanelAnimatedActivityCardInnerPe;
closure4.__closure = {runOnJS: reanimatedRexportModule.runOnJS, handleTargetAspectRatioParams: value24,
gridOrientationLockState: gridOrientationLockState, hasJoined: r2, updateNotJoinedActivityDimensions: value27};
closure4.__workletHash = 13125606009235;
closure4.__initData = env0_23;
Reflect.apply(useAnimatedReaction, moduleValue9, [closure, closure4]);
const isTabletActivitySurface = (require(10703) /* metro dependency 10703: getDefaultOrientationLockState */).getIsTabletActivitySurface();
const env0_24 = isTabletActivitySurface;
const backgroundColor = styles.activityContainerBackground.backgroundColor;
const moduleValue11 = reanimatedRexportModule;
const useAnimatedStyle = moduleValue11.useAnimatedStyle;
closure = Ce;
closure.__closure = {IS_IOS: IS_IOS, animatedKeyboardHeight: value6, windowDimensions: windowDimensions,
isTabletActivitySurface: isTabletActivitySurface, focusedOrientationLockState: focusedOrientationLockState,
OrientationLockState: OrientationLockState, ACTIVITY_PORTRAIT_ASPECT_RATIO: ACTIVITY_PORTRAIT_ASPECT_RATIO,
isActivityFocused: property3, backgroundColor: backgroundColor};
closure.__workletHash = 13392050824169;
closure.__initData = env0_24;
const value29 = Reflect.apply(useAnimatedStyle, moduleValue11, [closure]);
const showActivitiesDebugOverlay = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelCallLifecycleStore],
function() {
return ChannelCallLifecycleStore.getShowActivitiesDebugOverlay();
});
const value30 = env0_4.useMemo(_fun118667, [controlsSpecs, property3, hideControls]);
if (channel == null) {
return null;
}
if (r2) {
object4 = {gesture: value30};
ReanimatedNativeView = importDefault(8141) /* metro dependency 8141: ReanimatedNativeView */;
object2 = {layout: layout};
r13 = property3 ? 'auto' : 'none';
object2.pointerEvents = r13;
object2.style = value29;
items2 = [((Component) => <Component channel={channel} layoutMode={property3 ? ActivityLayoutMode.FOCUSED : ActivityLayoutMode.GRID} key={property} />)(importDefault(10704) /* metro dependency 10704: EmbeddedActivityView */)];
r13 = showActivitiesDebugOverlay ? ((Component) => <Component />)(importDefault(15498) /* metro dependency 15498: ActivitiesDebugOverlay */) : null;
items2[1] = r13;
r5 = <GestureDetector {...object4}><ReanimatedNativeView {...object2}>{items2}</ReanimatedNativeView></GestureDetector>;
} else {
r5 = value9 == null ? ((Component) => <Component activity={value13} application={property2} />)(importDefault(15499) /* metro dependency 15499: ActivityItemMissingCard */) : <GestureDetector gesture={value23}>{((Component) => <Component context={value7} guildId={channel.guild_id} activityItem={value9} locationObject={value14.location} itemDimensions={property5} disableBadges />)(importDefault(15503) /* metro dependency 15503: ActivityShelfItem */)}</GestureDetector>;
}
const AnalyticsLocationProvider = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider;
return (
<AnalyticsLocationProvider value={analyticsLocations}>
{r5}
</AnalyticsLocationProvider>
);
}
function VoicePanelAnimatedActivityCard(a0) { // fn#118669, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15693:8950, offset: 0x024e74b6, size: 89 bytes, params: 2, frame: 17
const ThemeContextProvider = (require(3868) /* metro dependency 3868: native */).ThemeContextProvider;
const DARK = ThemeTypes.DARK;
return (
<ThemeContextProvider theme={DARK}>
<VoicePanelAnimatedActivityCardInner {...a0} />
</ThemeContextProvider>
);
}
function _fun118647() { // fn#118647, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15693:4294, offset: 0x024e6e10, size: 51 bytes, params: 1, frame: 13
const value = environment.__proto__;
(require(7860) /* metro dependency 7860: EmbeddedActivitiesActionCreators */).fetchShelf({guildId: guild_id});
}
function _fun118649() { // fn#118649, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15693:4674, offset: 0x024e6e7b, size: 92 bytes, params: 1, frame: 14
var environment;
var r0;
let value = environment.__proto__;
const getEmbeddedActivitiesForChannel = EmbeddedActivitiesStore.getEmbeddedActivitiesForChannel;
const value4 = Reflect.apply(getEmbeddedActivitiesForChannel, EmbeddedActivitiesStore, [channelId]).find(_fun118650);
if (value4 != null) {
r0 = value4;
} else {
value = EmbeddedActivitiesStore.getEmbeddedActivitiesForStartingChannel(channelId);
value = value.find(_fun118651);
r0 = value;
}
return r0;
}
function _fun118652(a0) { // fn#118652, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15693:5088, offset: 0x024e6f00, size: 41 bytes, params: 2, frame: 11
const value = environment.__proto__;
return (require(12711) /* metro dependency 12711: isActivityParticipantCurrentUserCurrentSession */).isActivityParticipantCurrentUserCurrentSession(a0);
}
function _fun118653() { // fn#118653, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15693:5171, offset: 0x024e6f29, size: 34 bytes, params: 1, frame: 11
if (env0_16) {
env0_2(function(a0) {
return typeof a0 === 'bigint' ? a0 + 1n : +a0 + 1;
function VoicePanelAnimatedActivityCardInner({applicationId, sharedVisible, layout}) { // fn#118644, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15693:3773, offset: 0x024e6529, size: 2256 bytes, params: 2, frame: 50
var object3;
var r13;
const GestureDetector = (Module05321Module).GestureDetector;
var ReanimatedNativeView;
var object;
var items2;
const env0_18 = undefined;
const env0_19 = undefined;
const env0_21 = undefined;
const styles = useStyles();
let binding = focused2;
let useState = binding.useState;
const value4 = channelId(Reflect.apply(useState, binding, [0]), 2);
const property = value4[0];
const env0_2 = value4[1];
const value5 = focused2.useContext(VoicePanelStateContext);
var channelId = value5.channelId;
const focused = value5.focused;
var focused2 = focused;
const layoutManager = value5.layoutManager;
const mode = value5.mode;
const windowDimensions = value5.windowDimensions;
const hideControls = value5.hideControls;
const controlsSpecs = value5.controlsSpecs;
const value6 = (UseAnimatedKeyboardHeight)();
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channelId);
});
}
}
function VoicePanelAnimatedActivityCardInnerQ({visible, mode}, a1) { // fn#118656, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15693:5357, owner: VoicePanelAnimatedActivityCardInner.Q, offset: 0x024e6f7d, size: 157 bytes, params: 3, frame: 14
let value = visible === 1;
let r0 = value && a1 != null && a1.visible === 0;
if (!r0) {
value = environment.__proto__;
r0 = mode !== VoicePanelModes.PIP && a1?.mode === VoicePanelModes.PIP;
}
if (r0) {
value = environment.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value.runOnJS(env0_17)();
}
}
function VoicePanelAnimatedActivityCardInnerUe() { // fn#118657, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15693:5837, owner: VoicePanelAnimatedActivityCardInner.ue, offset: 0x024e701a, size: 86 bytes, params: 1, frame: 12
var value6;
var value;
let r0 = env0_20 != null && focused.get()?.id === env0_20;
if (r0) {
value = mode.get();
value6 = environment.__proto__;
value = value === VoicePanelModes.PANEL;
r0 = value;
}
return r0;
}
function VoicePanelAnimatedActivityCardInnerLe(a0, a1) { // fn#118658, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15693:6056, owner: VoicePanelAnimatedActivityCardInner.le, offset: 0x024e7070, size: 61 bytes, params: 3, frame: 13
var value;
if (a0 !== a1) {
value = environment.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value.runOnJS(env0_19)(a0);
}
}
function _fun118660(a0, a1, a2) { // fn#118660, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15693:6286, offset: 0x024e70d8, size: 195 bytes, params: 4, frame: 14
var value;
var layoutManagerBinding;
if (a2) {
value = environment.__proto__;
if (OrientationLockState.LANDSCAPE === a1) {
layoutManagerBinding = layoutManager;
layoutManagerBinding.setTargetAspectRatio(applicationId, 'landscape');
} else if (OrientationLockState.PORTRAIT === a1) {
layoutManagerBinding = layoutManager;
layoutManagerBinding.setTargetAspectRatio(applicationId, 'portrait');
} else if (OrientationLockState.UNLOCKED === a1) {
layoutManagerBinding = layoutManager;
layoutManagerBinding.setTargetAspectRatio(applicationId, a0 ? 'landscape' : 'portrait');
} else if (a1 === null) {
layoutManagerBinding = layoutManager;
layoutManagerBinding.setTargetAspectRatio(applicationId, a0 ? 'landscape' : 'portrait');
const value7 = focused2.useMemo(function() {
return {channel: channel, type: 'channel'};
}, [channel]);
const guild_id = channel?.guild_id;
const useActivityShelfItemData = UseActivityShelfItemDataModule.useActivityShelfItemData;
let r5 = channel?.guild_id ?? null;
const value9 = Reflect.apply(useActivityShelfItemData, UseActivityShelfItemDataModule, [r5, applicationId]);
focused2.useEffect(_fun118647, [guild_id]);
const property2 = channelId((UseGetOrFetchApplications)([applicationId]),
1)[0];
const {gridOrientationLockState,
focusedOrientationLockState} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([EmbeddedActivitiesStore],
function() {
var object = {};
var embeddedActivitiesStoreBinding = EmbeddedActivitiesStore;
var applicationIdBinding = applicationId;
object.gridOrientationLockState = embeddedActivitiesStoreBinding.getGridOrientationLockStateForApp(applicationIdBinding);
object.focusedOrientationLockState = EmbeddedActivitiesStore.getOrientationLockStateForApp(applicationIdBinding);
return object;
}, [applicationId]);
const value12 = (UseCurrentEmbeddedApplication)();
const value13 = (require(566) /* metro dependency 566: flux */).useStateFromStores([EmbeddedActivitiesStore],
_fun118649);
const defaultImport2 = UseAnalyticsLocations;
const ACTIVITY_TILE = (AnalyticsLocation).ACTIVITY_TILE;
const analyticsLocations = defaultImport2(ACTIVITY_TILE).analyticsLocations;
const value14 = (AnalyticsModule).useAnalyticsContext();
let r2 = value12 != null && value12.id === property2?.id;
r2 = !r2 ? (value13 == null || value13.participants == null ? undefined : value13.participants.find(_fun118652)) != null : r2;
const value19 = focused2.useCallback(_fun118653, [r2]);
let useAnimatedReaction = ReanimatedRexportModule.useAnimatedReaction;
let closure = function() {
var object = {};
object.visible = sharedVisible.get();
object.mode = mode.get();
return object;
};
closure.__closure = {sharedVisible: sharedVisible, mode: mode};
closure.__workletHash = 2072430391020;
closure.__initData = env0_18;
const VoicePanelAnimatedActivityCardInnerQ2 = VoicePanelAnimatedActivityCardInnerQ;
VoicePanelAnimatedActivityCardInnerQ2.__closure = {VoicePanelModes: VoicePanelModes,
runOnJS: ReanimatedRexportModule.runOnJS, incrementActivityKey: value19};
VoicePanelAnimatedActivityCardInnerQ2.__workletHash = 9732208421749;
VoicePanelAnimatedActivityCardInnerQ2.__initData = env0_19;
Reflect.apply(useAnimatedReaction, ReanimatedRexportModule, [closure, VoicePanelAnimatedActivityCardInnerQ2]);
const [property3, property4] = channelId(focused2.useState(false), 2);
const r39 = value13 != null ? (require(4610) /* metro dependency 4610: ChannelRTCParticipants */).getEmbeddedActivityParticipantId({applicationId: value13.applicationId,
instanceId: value13.compositeInstanceId}) : null;
const env0_20 = r39;
useAnimatedReaction = ReanimatedRexportModule.useAnimatedReaction;
closure = VoicePanelAnimatedActivityCardInnerUe;
object3 = {activityParticipantId: r39, focused: focused, mode: mode};
object3.VoicePanelModes = VoicePanelModes;
closure.__closure = object3;
closure.__workletHash = 2833167890519;
closure.__initData = env0_20;
const VoicePanelAnimatedActivityCardInnerLe2 = VoicePanelAnimatedActivityCardInnerLe;
VoicePanelAnimatedActivityCardInnerLe2.__closure = {runOnJS: ReanimatedRexportModule.runOnJS,
setIsActivityFocused: property4};
VoicePanelAnimatedActivityCardInnerLe2.__workletHash = 12291590020155;
VoicePanelAnimatedActivityCardInnerLe2.__initData = env0_21;
Reflect.apply(useAnimatedReaction, ReanimatedRexportModule, [closure, VoicePanelAnimatedActivityCardInnerLe2]);
const value23 = focused2.useMemo(function() {
var Gesture = require(dependencyMap[25]).Gesture;
return Gesture.Tap();
}, []);
const value24 = focused2.useCallback(_fun118660, [layoutManager, applicationId]);
focused2.useLayoutEffect(_fun118661, [value24, windowDimensions, gridOrientationLockState, r2]);
binding = focused2;
useState = binding.useState;
const getDefaultTargetDimensions = layoutManager.getDefaultTargetDimensions;
const value26 = channelId(Reflect.apply(useState, binding, [Reflect.apply(getDefaultTargetDimensions, layoutManager,
[])]), 2);
const property5 = value26[0];
const property6 = value26[1];
const property62 = property6;
const value27 = focused2.useCallback(_fun118662, [layoutManager, property6]);
const env0_23 = value27;
useAnimatedReaction = ReanimatedRexportModule.useAnimatedReaction;
closure = function() {
return windowDimensions.get();
};
closure.__closure = {windowDimensions: windowDimensions};
closure.__workletHash = 12220613662042;
closure.__initData = property62;
const VoicePanelAnimatedActivityCardInnerPe2 = VoicePanelAnimatedActivityCardInnerPe;
VoicePanelAnimatedActivityCardInnerPe2.__closure = {runOnJS: ReanimatedRexportModule.runOnJS,
handleTargetAspectRatioParams: value24, gridOrientationLockState: gridOrientationLockState, hasJoined: r2,
updateNotJoinedActivityDimensions: value27};
VoicePanelAnimatedActivityCardInnerPe2.__workletHash = 13125606009235;
VoicePanelAnimatedActivityCardInnerPe2.__initData = env0_23;
Reflect.apply(useAnimatedReaction, ReanimatedRexportModule, [closure, VoicePanelAnimatedActivityCardInnerPe2]);
const isTabletActivitySurface = (GetDefaultOrientationLockStateModule).getIsTabletActivitySurface();
const isTabletActivitySurface2 = isTabletActivitySurface;
const backgroundColor = styles.activityContainerBackground.backgroundColor;
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
closure = Ce;
closure.__closure = {IS_IOS: IS_IOS, animatedKeyboardHeight: value6, windowDimensions: windowDimensions,
isTabletActivitySurface: isTabletActivitySurface, focusedOrientationLockState: focusedOrientationLockState,
OrientationLockState: OrientationLockState, ACTIVITY_PORTRAIT_ASPECT_RATIO: ACTIVITY_PORTRAIT_ASPECT_RATIO,
isActivityFocused: property3, backgroundColor: backgroundColor};
closure.__workletHash = 13392050824169;
closure.__initData = isTabletActivitySurface2;
const value29 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
const showActivitiesDebugOverlay = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelCallLifecycleStore],
function() {
return ChannelCallLifecycleStore.getShowActivitiesDebugOverlay();
});
const value30 = focused2.useMemo(_fun118667, [controlsSpecs, property3, hideControls]);
if (channel == null) {
return null;
}
} else {
layoutManagerBinding = layoutManager;
layoutManagerBinding.setTargetAspectRatio(applicationId, 'square');
if (r2) {
object3 = {gesture: value30};
ReanimatedNativeView = importDefault(8141) /* metro dependency 8141: ReanimatedNativeView */;
object = {layout: layout};
r13 = property3 ? 'auto' : 'none';
object.pointerEvents = r13;
object.style = value29;
items2 = [
((Component) => <Component channel={channel} layoutMode={property3 ? ActivityLayoutMode.FOCUSED : ActivityLayoutMode.GRID} key={property} />)(importDefault(10704) /* metro dependency 10704: EmbeddedActivityView */),
];
r13 = (
showActivitiesDebugOverlay
? ((Component) => <Component />)(importDefault(15498) /* metro dependency 15498: ActivitiesDebugOverlay */)
: null
);
items2[1] = r13;
r5 = (
<GestureDetector {...object3}>
<ReanimatedNativeView {...object}>
{items2}
</ReanimatedNativeView>
</GestureDetector>
);
} else {
r5 = (
value9 == null
? ((Component) => <Component activity={value13} application={property2} />)(importDefault(15499) /* metro dependency 15499: ActivityItemMissingCard */)
: (
<GestureDetector gesture={value23}>
{((Component) => <Component context={value7} guildId={channel.guild_id} activityItem={value9} locationObject={value14.location} itemDimensions={property5} disableBadges />)(importDefault(15503) /* metro dependency 15503: ActivityShelfItem */)}
</GestureDetector>
)
);
}
const AnalyticsLocationProvider = (UseAnalyticsLocationsModule).AnalyticsLocationProvider;
return (
<AnalyticsLocationProvider value={analyticsLocations}>
{r5}
</AnalyticsLocationProvider>
);
function _fun118647() { // fn#118647, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15693:4294, offset: 0x024e6e10, size: 51 bytes, params: 1, frame: 13
const value = environment.__proto__;
(EmbeddedActivitiesActionCreatorsModule).fetchShelf({guildId: guild_id});
}
function _fun118649() { // fn#118649, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15693:4674, offset: 0x024e6e7b, size: 92 bytes, params: 1, frame: 14
var environment;
var r0;
let value = environment.__proto__;
let embeddedActivitiesStoreBinding = EmbeddedActivitiesStore;
const getEmbeddedActivitiesForChannel = embeddedActivitiesStoreBinding.getEmbeddedActivitiesForChannel;
const value4 = Reflect.apply(getEmbeddedActivitiesForChannel, embeddedActivitiesStoreBinding,
[channelId]).find(_fun118650);
if (value4 != null) {
r0 = value4;
} else {
embeddedActivitiesStoreBinding = EmbeddedActivitiesStore;
value = embeddedActivitiesStoreBinding.getEmbeddedActivitiesForStartingChannel(channelId);
value = value.find(_fun118651);
r0 = value;
}
return r0;
function _fun118650({applicationId}) { // fn#118650, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15693:4744, offset: 0x024e6ed7, size: 41 bytes, params: 2, frame: 4
return applicationId === env1_13?.id;
}
function _fun118651({applicationId}) { // fn#118651, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15693:4845, offset: 0x024e6ed7, size: 41 bytes, params: 2, frame: 4
return applicationId === env1_13?.id;
}
}
function _fun118652(a0) { // fn#118652, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15693:5088, offset: 0x024e6f00, size: 41 bytes, params: 2, frame: 11
const value = environment.__proto__;
return (IsActivityParticipantCurrentUserCurrentSessionModule).isActivityParticipantCurrentUserCurrentSession(a0);
}
function _fun118653() { // fn#118653, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15693:5171, offset: 0x024e6f29, size: 34 bytes, params: 1, frame: 11
if (JsxRuntimeModule.jsxs) {
env0_2(function(a0) {
return typeof a0 === 'bigint' ? a0 + 1n : +a0 + 1;
});
}
}
function VoicePanelAnimatedActivityCardInnerQ({visible, mode}, a1) { // fn#118656, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15693:5357, owner: VoicePanelAnimatedActivityCardInner.Q, offset: 0x024e6f7d, size: 157 bytes, params: 3, frame: 14
let value = visible === 1;
let r0 = value && a1 != null && a1.visible === 0;
if (!r0) {
value = environment.__proto__;
r0 = mode !== VoicePanelModes.PIP && a1?.mode === VoicePanelModes.PIP;
}
if (r0) {
value = environment.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value.runOnJS(env0_17)();
}
}
function VoicePanelAnimatedActivityCardInnerUe() { // fn#118657, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15693:5837, owner: VoicePanelAnimatedActivityCardInner.ue, offset: 0x024e701a, size: 86 bytes, params: 1, frame: 12
var value6;
var value;
let r0 = env0_20 != null && focused.get()?.id === env0_20;
if (r0) {
value = mode.get();
value6 = environment.__proto__;
value = value === VoicePanelModes.PANEL;
r0 = value;
}
return r0;
}
function VoicePanelAnimatedActivityCardInnerLe(a0, a1) { // fn#118658, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15693:6056, owner: VoicePanelAnimatedActivityCardInner.le, offset: 0x024e7070, size: 61 bytes, params: 3, frame: 13
var value;
if (a0 !== a1) {
value = environment.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value.runOnJS(env0_19)(a0);
}
}
function _fun118660(a0, a1, a2) { // fn#118660, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15693:6286, offset: 0x024e70d8, size: 195 bytes, params: 4, frame: 14
var value;
var layoutManagerBinding;
if (a2) {
value = environment.__proto__;
if (OrientationLockState.LANDSCAPE === a1) {
layoutManagerBinding = layoutManager;
layoutManagerBinding.setTargetAspectRatio(applicationId, 'landscape');
} else if (OrientationLockState.PORTRAIT === a1) {
layoutManagerBinding = layoutManager;
layoutManagerBinding.setTargetAspectRatio(applicationId, 'portrait');
} else if (OrientationLockState.UNLOCKED === a1) {
layoutManagerBinding = layoutManager;
layoutManagerBinding.setTargetAspectRatio(applicationId, a0 ? 'landscape' : 'portrait');
} else if (a1 === null) {
layoutManagerBinding = layoutManager;
layoutManagerBinding.setTargetAspectRatio(applicationId, a0 ? 'landscape' : 'portrait');
}
} else {
layoutManagerBinding = layoutManager;
layoutManagerBinding.setTargetAspectRatio(applicationId, 'square');
}
}
function _fun118661() { // fn#118661, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15693:6576, offset: 0x024e719b, size: 73 bytes, params: 1, frame: 15
let value = environment.__proto__;
value = require(1478) /* metro dependency 1478: useWindowDimensionsNative */;
value = value.getWindowDimensions();
value = value.width > value.height;
env0_21(value, gridOrientationLockState, JsxRuntimeModule.jsxs);
}
function _fun118662() { // fn#118662, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15693:6768, offset: 0x024e71e4, size: 30 bytes, params: 1, frame: 11
env0_22(layoutManager.getDefaultTargetDimensions());
}
function VoicePanelAnimatedActivityCardInnerPe(a0, a1) { // fn#118664, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15693:6952, owner: VoicePanelAnimatedActivityCardInner.pe, offset: 0x024e7202, size: 142 bytes, params: 3, frame: 16
var value2;
const landscape2 = a0.landscape;
const value = undefined;
if (landscape2 !== (a1 == null ? value : a1.landscape)) {
value2 = environment.__proto__;
(require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS(env0_21)(a0.landscape,
gridOrientationLockState, JsxRuntimeModule.jsxs);
}
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
reanimatedRexportModule.runOnJS(env0_23)();
return value;
}
function Ce() { // fn#118665, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15693:7406, owner: VoicePanelAnimatedActivityCardInner.Ce, offset: 0x024e7290, size: 283 bytes, params: 1, frame: 18
var r5;
let value = environment.__proto__;
const value2 = 0;
const r3 = IS_IOS ? VoicePanelControlsConstantsModule.VoicePanelControlsModes.get() : value2;
const windowDimensionsBinding = windowDimensions;
let get = windowDimensionsBinding.get;
const landscape = Reflect.apply(get, windowDimensionsBinding, []).landscape;
get = windowDimensionsBinding.get;
const width = Reflect.apply(get, windowDimensionsBinding, []).width;
get = windowDimensionsBinding.get;
const height = Reflect.apply(get, windowDimensionsBinding, []).height;
let r1 = env0_24 && focusedOrientationLockState === OrientationLockState.LANDSCAPE && !landscape;
if (r1) {
value = (height - width * ACTIVITY_PORTRAIT_ASPECT_RATIO) / 2;
r1 = value2;
r5 = value;
} else if (env0_24 && focusedOrientationLockState === OrientationLockState.PORTRAIT && landscape) {
r1 = (width - height * ACTIVITY_PORTRAIT_ASPECT_RATIO) / 2;
r5 = value2;
} else {
r1 = value2;
r5 = value2;
}
value = 'auto';
return {flex: env0_18 ? value2 : 1, backgroundColor: backgroundColor, paddingVertical: r5, paddingHorizontal: r1,
width: env0_18 ? width : value, height: env0_18 ? height - r3 : value, maxHeight: '100%', maxWidth: '100%'};
}
function _fun118667() { // fn#118667, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15693:8092, offset: 0x024e73ab, size: 162 bytes, params: 1, frame: 18
const Gesture = (Module05321Module).Gesture;
const value4 = Gesture.Manual().enabled(env0_18);
const onTouchesDown = value4.onTouchesDown;
const t_1186682 = t_118668;
const object = {};
object.controlsSpecs = controlsSpecs;
object.VoicePanelControlsModes = VoicePanelControlsModes;
object.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
object.hideControls = hideControls;
t_1186682.__closure = object;
t_1186682.__workletHash = 14924492513532;
t_1186682.__initData = env1_25;
return Reflect.apply(onTouchesDown, value4, [t_1186682]);
function t_118668(a0, a1) { // fn#118668, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15693:8160, offset: 0x024e744d, size: 105 bytes, params: 3, frame: 12
var moduleValue;
a1.fail();
const value = environment.__proto__;
const controlsSpecsBinding = controlsSpecs;
const get = controlsSpecsBinding.get;
const mode = Reflect.apply(get, controlsSpecsBinding, []).mode;
const HIDDEN = VoicePanelControlsModes.HIDDEN;
if (mode !== HIDDEN) {
moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */;
moduleValue.runOnJS(hideControls)({debounce: true});
}
}
}
}
}
function _fun118661() { // fn#118661, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15693:6576, offset: 0x024e719b, size: 73 bytes, params: 1, frame: 15
let value = environment.__proto__;
value = require(1478) /* metro dependency 1478: useWindowDimensionsNative */;
value = value.getWindowDimensions();
value = value.width > value.height;
env0_21(value, gridOrientationLockState, env0_16);
}
function _fun118662() { // fn#118662, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15693:6768, offset: 0x024e71e4, size: 30 bytes, params: 1, frame: 11
env0_22(layoutManager.getDefaultTargetDimensions());
}
function VoicePanelAnimatedActivityCardInnerPe(a0, a1) { // fn#118664, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15693:6952, owner: VoicePanelAnimatedActivityCardInner.pe, offset: 0x024e7202, size: 142 bytes, params: 3, frame: 16
var value2;
const landscape2 = a0.landscape;
const value = undefined;
if (landscape2 !== (a1 == null ? value : a1.landscape)) {
value2 = environment.__proto__;
(require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS(env0_21)(a0.landscape,
gridOrientationLockState, env0_16);
}
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
reanimatedRexportModule.runOnJS(env0_23)();
return value;
}
function Ce() { // fn#118665, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15693:7406, owner: VoicePanelAnimatedActivityCardInner.Ce, offset: 0x024e7290, size: 283 bytes, params: 1, frame: 18
var r5;
let value = environment.__proto__;
const value2 = 0;
const r3 = IS_IOS ? env0_10.get() : value2;
const windowDimensionsBinding = windowDimensions;
let get = windowDimensionsBinding.get;
const landscape = Reflect.apply(get, windowDimensionsBinding, []).landscape;
get = windowDimensionsBinding.get;
const width = Reflect.apply(get, windowDimensionsBinding, []).width;
get = windowDimensionsBinding.get;
const height = Reflect.apply(get, windowDimensionsBinding, []).height;
let r1 = env0_24 && focusedOrientationLockState === OrientationLockState.LANDSCAPE && !landscape;
if (r1) {
value = (height - width * ACTIVITY_PORTRAIT_ASPECT_RATIO) / 2;
r1 = value2;
r5 = value;
} else if (env0_24 && focusedOrientationLockState === OrientationLockState.PORTRAIT && landscape) {
r1 = (width - height * ACTIVITY_PORTRAIT_ASPECT_RATIO) / 2;
r5 = value2;
} else {
r1 = value2;
r5 = value2;
}
value = 'auto';
return {flex: env0_18 ? value2 : 1, backgroundColor: backgroundColor, paddingVertical: r5, paddingHorizontal: r1,
width: env0_18 ? width : value, height: env0_18 ? height - r3 : value, maxHeight: '100%', maxWidth: '100%'};
}
function _fun118667() { // fn#118667, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15693:8092, offset: 0x024e73ab, size: 162 bytes, params: 1, frame: 18
const Gesture = (require(5321) /* metro dependency 5321 */).Gesture;
const value4 = Gesture.Manual().enabled(env0_18);
const onTouchesDown = value4.onTouchesDown;
const closure = t_118668;
const object2 = {};
object2.controlsSpecs = controlsSpecs;
object2.VoicePanelControlsModes = VoicePanelControlsModes;
object2.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
object2.hideControls = hideControls;
closure.__closure = object2;
closure.__workletHash = 14924492513532;
closure.__initData = env1_25;
return Reflect.apply(onTouchesDown, value4, [closure]);
}
function _fun118650({applicationId}) { // fn#118650, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15693:4744, offset: 0x024e6ed7, size: 41 bytes, params: 2, frame: 4
return applicationId === env1_13?.id;
}
function t_118668(a0, a1) { // fn#118668, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15693:8160, offset: 0x024e744d, size: 105 bytes, params: 3, frame: 12
var moduleValue;
a1.fail();
const value = environment.__proto__;
const controlsSpecsBinding = controlsSpecs;
const get = controlsSpecsBinding.get;
const mode = Reflect.apply(get, controlsSpecsBinding, []).mode;
const HIDDEN = VoicePanelControlsModes.HIDDEN;
if (mode !== HIDDEN) {
moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */;
moduleValue.runOnJS(hideControls)({debounce: true});
function VoicePanelAnimatedActivityCard(a0) { // fn#118669, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15693:8950, offset: 0x024e74b6, size: 89 bytes, params: 2, frame: 17
const ThemeContextProvider = (NativeModule).ThemeContextProvider;
const DARK = ThemeTypes.DARK;
return (
<ThemeContextProvider theme={DARK}>
<VoicePanelAnimatedActivityCardInner {...a0} />
</ThemeContextProvider>
);
}
}
global.__d(_fun118643, 15496, [57, 31, 1378, 7730, 1379, 11795, 11793, 661, 4237, 33, 4501, 697, 11794, 15319, 566,
15497, 7860, 6777, 10701, 6771, 6789, 8620, 12711, 4017, 4610, 5321, 1478, 10703, 8141, 10704, 15498, 15499,
15503, 3868,
2]) /* metro module 15496, dependencies: [57, 31, 1378, 7730, 1379, 11795, 11793, 661, 4237, 33, 4501, 697, 11794, 15319, 566, 15497, 7860, 6777, 10701, 6771, 6789, 8620, 12711, 4017, 4610, 5321, 1478, 10703, 8141, 10704, 15498, 15499, 15503, 3868, 2] */;
@@ -1,6 +1,18 @@
/* Metro module 15494; source: modules/voice_panel/native/card/VoicePanelCTACardCallerDisconnected.tsx; dependencies: [57, 31, 1226, 1379, 1878, 33, 4501, 697, 11794, 566, 4617, 6821, 5475, 4573, 1244, 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 NativeView2 from '../../../core/native/NativeView.tsx'; /* Metro dependency 6821 */
import VoicePanelStateContext from '../VoicePanelStateContext.tsx'; /* Metro dependency 11794 */
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 CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
function _fun118635(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118635, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15691:6, offset: 0x024e58e0, size: 445 bytes, params: 8, frame: 24
var object2;
const env0_0 = require;
const getSourceFromURI = function(a0) {
var value = a0;
@@ -8,97 +20,96 @@ function _fun118635(global, require, importDefault, importAll, module, exports,
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const value2 = require(33) /* metro dependency 33 */;
const env0_8 = value2.jsx;
const env0_9 = value2.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {};
let value = ReactModule;
const createStyles = CreateStylesModule.createStyles;
object = {};
const VOICE_VIDEO_VIDEO_TILE_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.VOICE_VIDEO_VIDEO_TILE_BACKGROUND;
object2.container = {'width': '100%', 'height': '100%', 'alignItems': 'center', 'justifyContent': 'center',
object.container = {'width': '100%', 'height': '100%', 'alignItems': 'center', 'justifyContent': 'center',
backgroundColor: VOICE_VIDEO_VIDEO_TILE_BACKGROUND};
object2.avatarContainer = {'flexDirection': 'row', 'gap': 24};
const object4 = {'width': 80, 'height': 80, 'borderRadius': null, 'overflow': 'hidden'};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object2.avatarWrapper = object4;
object2.avatar = {'width': 80, 'height': 80};
object2.disconnectedAvatar = {opacity: 0.2};
object2.textContainer = {'position': 'absolute', 'left': 0, 'right': 0, 'bottom': 0, 'padding': 16, 'width': '100%'};
object2.text = {textAlign: 'center'};
const env0_10 = Reflect.apply(createStyles, createStylesModule, [object2]);
object.avatarContainer = {'flexDirection': 'row', 'gap': 24};
const object3 = {'width': 80, 'height': 80, 'borderRadius': null, 'overflow': 'hidden'};
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object.avatarWrapper = object3;
object.avatar = {'width': 80, 'height': 80};
object.disconnectedAvatar = {opacity: 0.2};
object.textContainer = {'position': 'absolute', 'left': 0, 'right': 0, 'bottom': 0, 'padding': 16, 'width': '100%'};
object.text = {textAlign: 'center'};
const env0_10 = Reflect.apply(createStyles, CreateStylesModule, [object]);
value = value.memo(VoicePanelCTACardCallerDisconnected);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/card/VoicePanelCTACardCallerDisconnected.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/card/VoicePanelCTACardCallerDisconnected.tsx');
exports.default = value;
}
function VoicePanelCTACardCallerDisconnected() { // fn#118637, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15691:726, offset: 0x024e5ab9, size: 819 bytes, params: 1, frame: 31
var r8;
var NativeView;
var FastImage;
let binding = env0_4;
const useContext = binding.useContext;
const value2 = undefined;
const channelId = Reflect.apply(useContext, binding,
[VoicePanelStateContext]).channelId;
const styles = useStyles();
const channel = ChannelStore.getChannel(channelId);
const r2 = (channel == null ? value2 : channel.recipients) ?? [];
binding = Module00057;
let property = binding(r2, 1)[0];
const id = AuthenticationStore.getId();
const useStateFromStoresArray = FluxModule.useStateFromStoresArray;
const value7 = binding(Reflect.apply(useStateFromStoresArray, FluxModule, [[UserStore], _fun118638, [channelId, id,
property]]), 3);
property = value7[0];
const property2 = value7[1];
const property3 = value7[2];
const defaultImport2 = NativeView2;
const items2 = [
property != null && <NativeView2 style={styles.avatarWrapper}>{((Component) => <Component source={getSourceFromURI(property)} style={styles.avatar} />)(importDefault(5475) /* metro dependency 5475: FastImage */)}</NativeView2>,
];
const value10 = property2 != null;
if (value10) {
NativeView = NativeView2;
var defaultImport5Props = {style: styles.avatarWrapper};
FastImage = importDefault(5475) /* metro dependency 5475: FastImage */;
r8 = (
<NativeView {...defaultImport5Props}>
<FastImage source={getSourceFromURI(property2)} style={[styles.avatar, styles.disconnectedAvatar]} />
</NativeView>
);
} else {
r8 = value10;
}
items2[1] = r8;
const defaultImport22 = ((Component) => <Component style={styles.avatarContainer}>{items2}</Component>)(defaultImport2);
const defaultImport7 = NativeView2;
const Text = (TextModule).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const WkAgPU = (require(1244) /* metro dependency 1244: indexNative */).t.WkAgPU;
return (
<NativeView2 style={styles.container}>
{defaultImport22}
{((Component) => <Component style={styles.textContainer}><Text style={styles.text} variant="heading-sm/semibold" color="always-white">{Reflect.apply(string,
intl,
[WkAgPU])}</Text>{property3 != null && <Text style={styles.text} variant="text-xs/medium" color="always-white">{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.kXrAqz,
{username: property3})}</Text>}</Component>)(defaultImport7)}
</NativeView2>
);
function _fun118638() { // fn#118638, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15691:947, offset: 0x024e5dec, size: 147 bytes, params: 1, frame: 19
let value = environment.__proto__;
const userStoreBinding = UserStore;
const user = userStoreBinding.getUser(env0_2);
const user2 = userStoreBinding.getUser(env0_1);
const value5 = undefined;
const items2 = [user == null ? value5 : user.getAvatarURL(value5, 80)];
items2[1] = user2 == null ? value5 : user2.getAvatarURL(value5, 80);
value = importDefault(4617) /* metro dependency 4617: NicknameUtils */;
const getName = value.getName;
items2[2] = Reflect.apply(getName, value, [value5, channelId, user2]);
return items2;
}
function VoicePanelCTACardCallerDisconnected() { // fn#118637, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15691:726, offset: 0x024e5ab9, size: 819 bytes, params: 1, frame: 31
var r8;
var NativeView;
var FastImage;
let binding = env0_4;
const useContext = binding.useContext;
const value2 = undefined;
const channelId = Reflect.apply(useContext, binding,
[importDefault(11794) /* metro dependency 11794: VoicePanelStateContext */]).channelId;
const styles = useStyles();
const channel = ChannelStore.getChannel(channelId);
const r2 = (channel == null ? value2 : channel.recipients) ?? [];
binding = env0_3;
let property = binding(r2, 1)[0];
const id = AuthenticationStore.getId();
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStoresArray = fluxModule.useStateFromStoresArray;
const value7 = binding(Reflect.apply(useStateFromStoresArray, fluxModule, [[UserStore], _fun118638, [channelId, id,
property]]), 3);
property = value7[0];
const property2 = value7[1];
const property3 = value7[2];
const NativeView2 = importDefault(6821) /* metro dependency 6821: NativeView */;
const defaultImport2 = NativeView2;
const items2 = [property != null && <NativeView2 style={styles.avatarWrapper}>{((Component) => <Component source={getSourceFromURI(property)} style={styles.avatar} />)(importDefault(5475) /* metro dependency 5475: FastImage */)}</NativeView2>];
const value10 = property2 != null;
if (value10) {
NativeView = NativeView2;
var defaultImport5Props = {style: styles.avatarWrapper};
FastImage = importDefault(5475) /* metro dependency 5475: FastImage */;
r8 = <NativeView {...defaultImport5Props}><FastImage source={getSourceFromURI(property2)} style={[styles.avatar,
styles.disconnectedAvatar]} /></NativeView>;
} else {
r8 = value10;
}
items2[1] = r8;
const defaultImport22 = ((Component) => <Component style={styles.avatarContainer}>{items2}</Component>)(defaultImport2);
const defaultImport7 = NativeView2;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const WkAgPU = (require(1244) /* metro dependency 1244: indexNative */).t.WkAgPU;
return (
<NativeView2 style={styles.container}>
{defaultImport22}
{((Component) => <Component style={styles.textContainer}><Text style={styles.text} variant="heading-sm/semibold" color="always-white">{Reflect.apply(string,
intl,
[WkAgPU])}</Text>{property3 != null && <Text style={styles.text} variant="text-xs/medium" color="always-white">{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.kXrAqz,
{username: property3})}</Text>}</Component>)(defaultImport7)}
</NativeView2>
);
}
function _fun118638() { // fn#118638, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15691:947, offset: 0x024e5dec, size: 147 bytes, params: 1, frame: 19
let value = environment.__proto__;
const user = UserStore.getUser(env0_2);
const user2 = UserStore.getUser(env0_1);
const value5 = undefined;
const items2 = [user == null ? value5 : user.getAvatarURL(value5, 80)];
items2[1] = user2 == null ? value5 : user2.getAvatarURL(value5, 80);
value = importDefault(4617) /* metro dependency 4617: NicknameUtils */;
const getName = value.getName;
items2[2] = Reflect.apply(getName, value, [value5, channelId, user2]);
return items2;
}
global.__d(_fun118635, 15494, [57, 31, 1226, 1379, 1878, 33, 4501, 697, 11794, 566, 4617, 6821, 5475, 4573, 1244,
2]) /* metro module 15494, dependencies: [57, 31, 1226, 1379, 1878, 33, 4501, 697, 11794, 566, 4617, 6821, 5475, 4573, 1244, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,8 +1,11 @@
/* Metro module 11798; source: modules/voice_panel/native/card/VoicePanelCardConstants.tsx; dependencies: [697, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun90382(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90382, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11984:6, offset: 0x020371cd, size: 187 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/card/VoicePanelCardConstants.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/card/VoicePanelCardConstants.tsx');
exports.CARD_SIZE = 165;
exports.CALL_TILE_GUTTER = 12;
exports.EDGE_GUTTER = 12;
@@ -11,12 +14,20 @@ function _fun90382(global, require, importDefault, importAll, module, exports, d
exports.CARD_BACKGROUND_OPACITY_ANDROID = 0.32;
exports.VOICE_PANEL_CONTROLS_OPACITY_ANDROID = 0.54;
exports.VOICE_PANEL_CARD_INNER_PADDING = 8;
function getCallTileGutter() { // fn#90383, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11984:260, offset: 0x02037288, size: 72 bytes, params: 1, frame: 13
const value = a0;
const r3 = value !== undefined ? value : [];
const VOICE_PANEL_GUTTER = (Native).modules.mobile.VOICE_PANEL_GUTTER;
return VOICE_PANEL_GUTTER.resolve({enabledExperiments: r3});
}
function getEdgeGutter() { // fn#90384, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11984:391, offset: 0x02037288, size: 72 bytes, params: 1, frame: 13
const value = a0;
const r3 = value !== undefined ? value : [];
const VOICE_PANEL_GUTTER = (Native).modules.mobile.VOICE_PANEL_GUTTER;
return VOICE_PANEL_GUTTER.resolve({enabledExperiments: r3});
}
}
function getCallTileGutter() { // fn#90383, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11984:260, offset: 0x02037288, size: 72 bytes, params: 1, frame: 13
const value = a0;
const r3 = value !== undefined ? value : [];
const VOICE_PANEL_GUTTER = (importDefault(697) /* metro dependency 697: native */).modules.mobile.VOICE_PANEL_GUTTER;
return VOICE_PANEL_GUTTER.resolve({enabledExperiments: r3});
}
global.__d(_fun90382, 11798, [697, 2]) /* metro module 11798, dependencies: [697, 2] */;
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
@@ -1,374 +1,393 @@
/* Metro module 15483; source: modules/voice_panel/native/card/VoicePanelCardView.tsx; dependencies: [57, 31, 27, 4606, 11795, 11793, 15440, 11798, 4299, 33, 15484, 4017, 7739, 1357, 11794, 3860, 697, 11799, 11624, 4577, 15444, 6619, 8141, 4521, 15435, 566, 22, 3869, 1244, 4508, 2] */
import Module00022 from '../../../../by-id/module-00022.js'; /* Metro dependency 22 */
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 MobileVisualRefreshExperiment from '../../../themes/experiments/MobileVisualRefreshExperiment.tsx'; /* Metro dependency 1357 */
import ChannelRTCStore from '../../../calls/ChannelRTCStore.tsx'; /* Metro dependency 4606 */
import UseRefValue from '../../../../hooks/useRefValue.tsx'; /* Metro dependency 6619 */
import ReanimatedNativeView from '../../../core/native/ReanimatedNativeView.tsx'; /* Metro dependency 8141 */
import VoicePanelStateContext from '../VoicePanelStateContext.tsx'; /* Metro dependency 11794 */
import CalculateVoicePanelHeaderSpecs from '../header/calculateVoicePanelHeaderSpecs.tsx'; /* Metro dependency 11799 */
import VoicePanelCard from './VoicePanelCard.tsx'; /* Metro dependency 15484 */
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 UseTokenModule from '../../../../design/tokens/native/useToken.tsx'; /* Metro dependency 3860 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as CallConstantsModule from '../../../calls/CallConstants.tsx'; /* Metro dependency 4299 */
import * as TransitionGroupModule from '../../../../design/components/TransitionGroup/TransitionGroup.tsx'; /* Metro dependency 4508 */
import * as FreezeModule from '../../../../by-id/module-04521-Freeze.jsx'; /* Metro dependency 4521 */
import * as SpringModule from '../../../../design/animation/reanimated/spring/spring.tsx'; /* Metro dependency 4577 */
import * as CheapWorkletShallowEqualModule from '../../../reanimated/native/cheapWorkletShallowEqual.tsx'; /* Metro dependency 7739 */
import * as VoicePanelControlsConstantsModule from '../controls/VoicePanelControlsConstants.tsx'; /* Metro dependency 11793 */
import * as VoicePanelConstantsModule from '../../VoicePanelConstants.tsx'; /* Metro dependency 11795 */
import * as VoicePanelCardConstantsModule from './VoicePanelCardConstants.tsx'; /* Metro dependency 11798 */
import * as UseVoicePanelParticipantsModule from '../hooks/useVoicePanelParticipants.tsx'; /* Metro dependency 15435 */
import * as VoicePanelPIPConstantsModule from '../pip/VoicePanelPIPConstants.tsx'; /* Metro dependency 15440 */
import * as VoicePanelPIPStateContextModule from '../pip/VoicePanelPIPStateContext.tsx'; /* Metro dependency 15444 */
function _fun118477(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118477, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15680:6, offset: 0x024dccee, size: 483 bytes, params: 8, frame: 22
var object2;
const env0_0 = require;
const getCardKey = function({type, id}) {
return '' + type + '-' + id;
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_5 = value2.StyleSheet;
const env0_6 = value2.View;
const channelRTCStore = importDefault(4606) /* metro dependency 4606: ChannelRTCStore */;
const voicePanelConstantsModule = require(11795) /* metro dependency 11795: VoicePanelConstants */;
const UI_SHOW_HIDE_PHYSICS = voicePanelConstantsModule.UI_SHOW_HIDE_PHYSICS;
const VOICE_PANEL_CHUNK_DIVISOR = voicePanelConstantsModule.VOICE_PANEL_CHUNK_DIVISOR;
const env0_8 = voicePanelConstantsModule.LAYOUT_PHYSICS;
const env0_9 = voicePanelConstantsModule.VoicePanelModes;
const env0_10 = (require(11793) /* metro dependency 11793: VoicePanelControlsConstants */).VoicePanelControlsModes;
const env0_11 = (require(15440) /* metro dependency 15440: VoicePanelPIPConstants */).VoicePanelPIPModes;
const env0_12 = (require(11798) /* metro dependency 11798: VoicePanelCardConstants */).EDGE_GUTTER;
const env0_13 = (require(4299) /* metro dependency 4299: CallConstants */).isUserParticipant;
const env0_14 = (require(33) /* metro dependency 33 */).jsx;
object2 = {};
copyDataProperties(object2, UI_SHOW_HIDE_PHYSICS, undefined);
object2['mass'] = 1;
object2['restSpeedThreshold'] = 0.00001;
object2 = {start: 0, end: VOICE_PANEL_CHUNK_DIVISOR};
object2 = {code: 'function VoicePanelCardViewTsx1(){const{viewableChunks}=this.__closure;return viewableChunks.get();}'};
object2 = {code: 'function VoicePanelCardViewTsx2(newChunks,previous){const{cheapWorkletShallowEqual,runOnJS,updateValueIfChange}=this.__closure;if(cheapWorkletShallowEqual(newChunks,previous!==null&&previous!==void 0?previous:undefined))return;runOnJS(updateValueIfChange)(newChunks);}'};
object2 = {code: "function VoicePanelCardViewTsx3(){const{controlsSpecs,VoicePanelControlsModes,safeArea,EDGE_GUTTER,calculateVoicePanelHeaderSpecs,edgeGutter,connected,contentDimensions,windowDimensions,mode,VoicePanelModes,focused,isRefreshEnabled,roundToNearestPixel,withSpring,wrapperOffset,LAYOUT_PHYSICS,SCALE_PHYSICS,freeze}=this.__closure;const hidden=controlsSpecs.get().mode===VoicePanelControlsModes.HIDDEN;let height=0;let scale=1;let top=0;const safeAreaBottom=Math.max(safeArea.get().bottom,EDGE_GUTTER);const{height:headerBarHeight,paddingTop:safeAreaTop}=calculateVoicePanelHeaderSpecs(safeArea.get(),edgeGutter);if(connected.get()){height+=safeAreaTop;height+=contentDimensions.get().height;height+=safeAreaBottom;if(height-windowDimensions.get().height<8){height=windowDimensions.get().height;}if(mode.get()!==VoicePanelModes.PIP&&!hidden&&focused.get()==null){const targetHeight=height-headerBarHeight-EDGE_GUTTER-controlsSpecs.get().height-safeAreaBottom;const fullView=windowDimensions.get().height-safeAreaTop-safeAreaBottom;const controlsView=windowDimensions.get().height-headerBarHeight-controlsSpecs.get().height-safeAreaBottom;top=headerBarHeight;scale=function(){if(contentDimensions.get().height>targetHeight){return targetHeight/contentDimensions.get().height;}return isRefreshEnabled?windowDimensions.get().width/windowDimensions.get().width:(windowDimensions.get().width-48)/windowDimensions.get().width;}();if(contentDimensions.get().height<fullView&&contentDimensions.get().height>controlsView){const offsetOriginal=(fullView-contentDimensions.get().height)/2;const scaledContent=contentDimensions.get().height*scale;const scaledOffset=(controlsView-scaledContent)/2;top-=(offsetOriginal-scaledOffset)*scale;}if(contentDimensions.get().height>targetHeight){top+=(height*scale-height)/2;}else{top+=(targetHeight-(windowDimensions.get().height-safeAreaTop-safeAreaBottom))/2;}top-=safeAreaTop*scale;}}return{position:'relative',width:windowDimensions.get().width,height:roundToNearestPixel(height),transform:[{translateY:withSpring(top+wrapperOffset.get().y,wrapperOffset.get().gestureActive||mode.get()===VoicePanelModes.PIP?LAYOUT_PHYSICS:SCALE_PHYSICS)},{scale:withSpring(scale,SCALE_PHYSICS)}],opacity:freeze?0:1};}"};
let value = ReactModule;
const UI_SHOW_HIDE_PHYSICS = VoicePanelConstantsModule.UI_SHOW_HIDE_PHYSICS;
const VOICE_PANEL_CHUNK_DIVISOR = VoicePanelConstantsModule.VOICE_PANEL_CHUNK_DIVISOR;
object = {};
copyDataProperties(object, UI_SHOW_HIDE_PHYSICS, undefined);
object['mass'] = 1;
object['restSpeedThreshold'] = 0.00001;
object = {start: 0, end: VOICE_PANEL_CHUNK_DIVISOR};
object = {code: 'function VoicePanelCardViewTsx1(){const{viewableChunks}=this.__closure;return viewableChunks.get();}'};
object = {code: 'function VoicePanelCardViewTsx2(newChunks,previous){const{cheapWorkletShallowEqual,runOnJS,updateValueIfChange}=this.__closure;if(cheapWorkletShallowEqual(newChunks,previous!==null&&previous!==void 0?previous:undefined))return;runOnJS(updateValueIfChange)(newChunks);}'};
object = {code: "function VoicePanelCardViewTsx3(){const{controlsSpecs,VoicePanelControlsModes,safeArea,EDGE_GUTTER,calculateVoicePanelHeaderSpecs,edgeGutter,connected,contentDimensions,windowDimensions,mode,VoicePanelModes,focused,isRefreshEnabled,roundToNearestPixel,withSpring,wrapperOffset,LAYOUT_PHYSICS,SCALE_PHYSICS,freeze}=this.__closure;const hidden=controlsSpecs.get().mode===VoicePanelControlsModes.HIDDEN;let height=0;let scale=1;let top=0;const safeAreaBottom=Math.max(safeArea.get().bottom,EDGE_GUTTER);const{height:headerBarHeight,paddingTop:safeAreaTop}=calculateVoicePanelHeaderSpecs(safeArea.get(),edgeGutter);if(connected.get()){height+=safeAreaTop;height+=contentDimensions.get().height;height+=safeAreaBottom;if(height-windowDimensions.get().height<8){height=windowDimensions.get().height;}if(mode.get()!==VoicePanelModes.PIP&&!hidden&&focused.get()==null){const targetHeight=height-headerBarHeight-EDGE_GUTTER-controlsSpecs.get().height-safeAreaBottom;const fullView=windowDimensions.get().height-safeAreaTop-safeAreaBottom;const controlsView=windowDimensions.get().height-headerBarHeight-controlsSpecs.get().height-safeAreaBottom;top=headerBarHeight;scale=function(){if(contentDimensions.get().height>targetHeight){return targetHeight/contentDimensions.get().height;}return isRefreshEnabled?windowDimensions.get().width/windowDimensions.get().width:(windowDimensions.get().width-48)/windowDimensions.get().width;}();if(contentDimensions.get().height<fullView&&contentDimensions.get().height>controlsView){const offsetOriginal=(fullView-contentDimensions.get().height)/2;const scaledContent=contentDimensions.get().height*scale;const scaledOffset=(controlsView-scaledContent)/2;top-=(offsetOriginal-scaledOffset)*scale;}if(contentDimensions.get().height>targetHeight){top+=(height*scale-height)/2;}else{top+=(targetHeight-(windowDimensions.get().height-safeAreaTop-safeAreaBottom))/2;}top-=safeAreaTop*scale;}}return{position:'relative',width:windowDimensions.get().width,height:roundToNearestPixel(height),transform:[{translateY:withSpring(top+wrapperOffset.get().y,wrapperOffset.get().gestureActive||mode.get()===VoicePanelModes.PIP?LAYOUT_PHYSICS:SCALE_PHYSICS)},{scale:withSpring(scale,SCALE_PHYSICS)}],opacity:freeze?0:1};}"};
value = value.memo(VoicePanelCardView);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/card/VoicePanelCardView.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/card/VoicePanelCardView.tsx');
exports.default = value;
}
function renderCard_118479(a0, a1, a2, a3) { // fn#118479, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15680:480, offset: 0x024dced1, size: 66 bytes, params: 5, frame: 15
return ((Component) => <Component item={a1} transitionState={a2} cleanUp={a3} key={a0} />)(importDefault(15484) /* metro dependency 15484: VoicePanelCard */);
}
function CardContentFreezer({children}) { // fn#118480, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15680:3230, offset: 0x024dcf13, size: 90 bytes, params: 2, frame: 16
const value = useLazyContentFreeze();
return env0_4.useMemo(_fun118487, [useSpacerStyles(value), value, children]);
}
function VoicePanelCardView({viewableChunks}) { // fn#118488, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15680:5295, offset: 0x024dd6db, size: 244 bytes, params: 2, frame: 19
const binding = env0_4;
const useContext = binding.useContext;
const channelId = Reflect.apply(useContext, binding,
[importDefault(11794) /* metro dependency 11794: VoicePanelStateContext */]).channelId;
const value3 = (require(15435) /* metro dependency 15435: useVoicePanelParticipants */).useChunkedParticipants(channelId,
useViewableChunkState(viewableChunks));
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([ChannelRTCStore],
_fun118494, [channelId]);
const env0_3 = env0_4.useRef(value4);
env0_4.useEffect(_fun118496, [value4, channelId]);
return env0_4.useMemo(_fun118498, [value3]);
}
function useLazyContentFreeze() { // fn#118481, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15680:3278, owner: CardContentFreezer.useLazyContentFreeze, offset: 0x024dcf6d, size: 191 bytes, params: 1, frame: 19
var environment;
const value = environment.__proto__;
const voicePanelPIPStateContextModule = require(15444) /* metro dependency 15444: VoicePanelPIPStateContext */;
const usePIPState = voicePanelPIPStateContextModule.usePIPState;
const mode = Reflect.apply(usePIPState, voicePanelPIPStateContextModule, []).mode;
const binding = env1_4;
const useRef = binding.useRef;
let IN_APP = VoicePanelPIPModes.IN_APP;
const value2 = Reflect.apply(useRef, binding, [mode === IN_APP]);
const env0_2 = env1_3(env1_4.useState({}), 2)[1];
env1_4.useEffect(_fun118482, [mode]);
const value5 = (importDefault(6619) /* metro dependency 6619: useRefValue */)(value2);
IN_APP = VoicePanelPIPModes.IN_APP;
return mode === IN_APP && value5;
}
function useSpacerStyles(a0) { // fn#118485, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15680:3589, owner: CardContentFreezer.useSpacerStyles, offset: 0x024dd0ac, size: 436 bytes, params: 2, frame: 28
const env0_0 = a0;
const value2 = (importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('VoicePanelCardView');
const {connected, controlsSpecs, safeArea, contentDimensions, windowDimensions, mode, focused,
wrapperOffset} = env1_4.useContext(importDefault(11794) /* metro dependency 11794: VoicePanelStateContext */);
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
const useToken = useTokenModule.useToken;
const VOICE_PANEL_GUTTER = (importDefault(697) /* metro dependency 697: native */).modules.mobile.VOICE_PANEL_GUTTER;
const value4 = Reflect.apply(useToken, useTokenModule, [VOICE_PANEL_GUTTER]);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = useSpacerStylesO;
const object2 = {controlsSpecs: controlsSpecs};
object2.VoicePanelControlsModes = VoicePanelControlsModes;
object2.safeArea = safeArea;
object2.EDGE_GUTTER = EDGE_GUTTER;
object2.calculateVoicePanelHeaderSpecs = importDefault(11799) /* metro dependency 11799: calculateVoicePanelHeaderSpecs */;
object2.edgeGutter = value4;
object2.connected = connected;
object2.contentDimensions = contentDimensions;
object2.windowDimensions = windowDimensions;
object2.mode = mode;
object2.VoicePanelModes = VoicePanelModes;
object2.focused = focused;
object2.isRefreshEnabled = value2;
object2.roundToNearestPixel = importDefault(11624) /* metro dependency 11624: roundToNearestPixel */;
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object2.wrapperOffset = wrapperOffset;
object2.LAYOUT_PHYSICS = LAYOUT_PHYSICS;
object2.SCALE_PHYSICS = env1_15;
object2.freeze = a0;
closure.__closure = object2;
closure.__workletHash = 495797244676;
closure.__initData = env1_19;
return Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
}
function _fun118487() { // fn#118487, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15680:5143, offset: 0x024dd649, size: 146 bytes, params: 1, frame: 22
const ReanimatedNativeView = importDefault(8141) /* metro dependency 8141: ReanimatedNativeView */;
const defaultImportProps = {style: env0_2};
const Freeze = (require(4521) /* metro dependency 4521 */).Freeze;
return (
<ReanimatedNativeView {...defaultImportProps}>
<Freeze freeze={env0_1}>
<View collapsable={false} style={StyleSheet.absoluteFill}>
{children}
</View>
</Freeze>
</ReanimatedNativeView>
);
}
function useViewableChunkState(a0) { // fn#118489, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15680:5384, owner: VoicePanelCardView.useViewableChunkState, offset: 0x024dd7cf, size: 261 bytes, params: 2, frame: 22
var object2;
const env0_0 = a0;
let binding = env1_4;
const [property, env0_1] = env1_3(binding.useState(env1_16), 2);
binding = env1_4;
let closure = _fun118490;
const value4 = binding.useCallback(closure, []);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedReaction = reanimatedRexportModule.useAnimatedReaction;
closure = useViewableChunkStateH;
closure.__closure = {viewableChunks: a0};
closure.__workletHash = 1074173860641;
closure.__initData = env1_17;
const closure2 = useViewableChunkStateS;
object2 = {};
object2.cheapWorkletShallowEqual = (require(7739) /* metro dependency 7739: cheapWorkletShallowEqual */).cheapWorkletShallowEqual;
object2.runOnJS = reanimatedRexportModule.runOnJS;
object2.updateValueIfChange = value4;
closure2.__closure = object2;
closure2.__workletHash = 13543715159803;
closure2.__initData = env1_18;
Reflect.apply(useAnimatedReaction, reanimatedRexportModule, [closure, closure2]);
return property;
}
function _fun118494() { // fn#118494, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15680:6016, offset: 0x024dd98c, size: 46 bytes, params: 1, frame: 11
var environment;
const value = environment.__proto__;
const getParticipants = ChannelRTCStore.getParticipants;
return Reflect.apply(getParticipants, ChannelRTCStore, [channelId]).filter(function(a0) {
return isUserParticipant(a0);
});
}
function _fun118496() { // fn#118496, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15680:6099, offset: 0x024dd9cd, size: 258 bytes, params: 1, frame: 20
var user;
var defaultImport2;
var value3;
var length;
var value4;
var AccessibilityAnnouncer;
var announce;
var intl;
const defaultImport = importDefault(22) /* metro dependency 22 */;
if (!defaultImport.isEqual(env0_3.current, env0_2)) {
defaultImport2 = defaultImport;
value3 = defaultImport2.differenceWith(env0_3.current, env0_2, function({id}, a1) {
return id === a1.id;
});
length = value3.length;
value4 = null;
user = length > 0 ? value3[0].user : value4;
if (value4 != user) {
AccessibilityAnnouncer = (require(3869) /* metro dependency 3869: AccessibilityAnnouncerAndroid */).AccessibilityAnnouncer;
announce = AccessibilityAnnouncer.announce;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
Reflect.apply(announce, AccessibilityAnnouncer,
[intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['9NqwWZ'],
{username: user.username})]);
}
function renderCard_118479(a0, a1, a2, a3) { // fn#118479, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15680:480, offset: 0x024dced1, size: 66 bytes, params: 5, frame: 15
return ((Component) => <Component item={a1} transitionState={a2} cleanUp={a3} key={a0} />)(VoicePanelCard);
}
env0_3.current = env0_2;
}
function _fun118498() { // fn#118498, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15680:6392, offset: 0x024ddae5, size: 102 bytes, params: 1, frame: 17
const TransitionGroup = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionGroup;
return (
<CardContentFreezer>
<TransitionGroup
items={env0_1}
renderItem={renderCard_118479}
getItemKey={getCardKey}
lazyCleanUpDelay={1000}
/>
</CardContentFreezer>
);
}
function CardContentFreezer({children}) { // fn#118480, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15680:3230, offset: 0x024dcf13, size: 90 bytes, params: 2, frame: 16
const value = useLazyContentFreeze();
return env0_4.useMemo(_fun118487, [useSpacerStyles(value), value, children]);
function useLazyContentFreeze() { // fn#118481, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15680:3278, owner: CardContentFreezer.useLazyContentFreeze, offset: 0x024dcf6d, size: 191 bytes, params: 1, frame: 19
var environment;
const value = environment.__proto__;
const usePIPState = VoicePanelPIPStateContextModule.usePIPState;
const mode = Reflect.apply(usePIPState, VoicePanelPIPStateContextModule, []).mode;
const binding = env1_4;
const useRef = binding.useRef;
let IN_APP = VoicePanelPIPModes.IN_APP;
const value2 = Reflect.apply(useRef, binding, [mode === IN_APP]);
const env0_2 = env1_3(env1_4.useState({}), 2)[1];
env1_4.useEffect(_fun118482, [mode]);
const value5 = (UseRefValue)(value2);
IN_APP = VoicePanelPIPModes.IN_APP;
return mode === IN_APP && value5;
function _fun118482() { // fn#118482, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15680:3411, offset: 0x024dd02c, size: 84 bytes, params: 1, frame: 14
const modeBinding = mode;
const IN_APP = VoicePanelPIPModes.IN_APP;
if (modeBinding === IN_APP) {
var env0_0 = global.setTimeout(_fun118483, 700);
return _fun118484;
}
env0_1.current = false;
function _fun118483() { // fn#118483, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15680:3451, offset: 0x024dd080, size: 44 bytes, params: 1, frame: 11
if (!env1_1.current) {
env1_1.current = true;
env1_2({});
}
}
function _fun118482() { // fn#118482, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15680:3411, offset: 0x024dd02c, size: 84 bytes, params: 1, frame: 14
const modeBinding = mode;
const IN_APP = VoicePanelPIPModes.IN_APP;
if (modeBinding === IN_APP) {
var env0_0 = global.setTimeout(_fun118483, 700);
return _fun118484;
}
env0_1.current = false;
}
function _fun118484() { // fn#118484, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15680:3501, offset: 0x00e59c84, size: 24 bytes, params: 1, frame: 11
global.clearTimeout(env0_0);
}
function useSpacerStylesO() { // fn#118486, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15680:3909, owner: CardContentFreezer.useSpacerStyles.o, offset: 0x024dd260, size: 1001 bytes, params: 1, frame: 29
var r5;
var r4;
var r11;
var r13;
var r7;
var r8;
var r9;
var value9;
var contentDimensionsBinding;
var value10;
var windowDimensionsBinding;
var value14;
var value15;
var value16;
var value17;
var value18;
var value23;
var value25;
let controlsSpecsBinding = controlsSpecs;
let get = controlsSpecsBinding.get;
const mode2 = Reflect.apply(get, controlsSpecsBinding, []).mode;
const HIDDEN = VoicePanelControlsModes.HIDDEN;
const Math = global.Math;
const max = Math.max;
const safeAreaBinding = safeArea;
get = safeAreaBinding.get;
const value3 = Reflect.apply(max, Math, [Reflect.apply(get, safeAreaBinding, []).bottom, EDGE_GUTTER]);
let {height,
paddingTop} = (importDefault(11799) /* metro dependency 11799: calculateVoicePanelHeaderSpecs */)(safeAreaBinding.get(),
env0_10);
const value6 = connected.get();
const value7 = 0;
const value8 = 1;
if (value6) {
value9 = value7 + paddingTop;
contentDimensionsBinding = contentDimensions;
get = contentDimensionsBinding.get;
value10 = value9 + Reflect.apply(get, contentDimensionsBinding, []).height + value3;
get = windowDimensions.get;
if (value10 - Reflect.apply(get, windowDimensionsBinding, []).height < 8) {
windowDimensionsBinding = windowDimensions;
r5 = windowDimensionsBinding.get().height;
} else {
r5 = value10;
}
if (mode.get() === VoicePanelModes.PIP) {
r7 = value7;
r8 = r5;
r9 = value8;
} else if (mode2 === HIDDEN) {
r7 = value7;
r8 = r5;
r9 = value8;
} else if (focused.get() == null) {
value14 = r5 - height - EDGE_GUTTER;
controlsSpecsBinding = controlsSpecs;
get = controlsSpecsBinding.get;
value15 = value14 - Reflect.apply(get, controlsSpecsBinding, []).height - value3;
windowDimensionsBinding = windowDimensions;
get = windowDimensionsBinding.get;
value16 = Reflect.apply(get, windowDimensionsBinding, []).height - paddingTop - value3;
get = windowDimensionsBinding.get;
value17 = Reflect.apply(get, windowDimensionsBinding, []).height - height;
get = controlsSpecsBinding.get;
value18 = value17 - Reflect.apply(get, controlsSpecsBinding, []).height - value3;
contentDimensionsBinding = contentDimensions;
get = contentDimensionsBinding.get;
r4 = Reflect.apply(get, contentDimensionsBinding,
[]).height > value15 ? value15 / contentDimensions.get().height : env0_1 ? windowDimensions.get().width / windowDimensions.get().width : (windowDimensions.get().width - 48) / windowDimensions.get().width;
contentDimensionsBinding = contentDimensions;
get = contentDimensionsBinding.get;
value23 = Reflect.apply(get, contentDimensionsBinding, []).height < value16;
if (value23) {
contentDimensionsBinding = contentDimensions;
r11 = contentDimensionsBinding.get().height > value18;
} else {
r11 = value23;
}
if (r11) {
contentDimensionsBinding = contentDimensions;
get = contentDimensionsBinding.get;
value25 = (value16 - Reflect.apply(get, contentDimensionsBinding, []).height) / 2;
get = contentDimensionsBinding.get;
r13 = height - (value25 - (value18 - Reflect.apply(get, contentDimensionsBinding,
[]).height * r4) / 2) * r4;
} else {
r13 = height;
}
contentDimensionsBinding = contentDimensions;
get = contentDimensionsBinding.get;
height = Reflect.apply(get, contentDimensionsBinding, []).height;
r11 = height > value15 ? r13 + (r5 * r4 - r5) / 2 : r13 + (value15 - (windowDimensions.get().height - paddingTop - value3)) / 2;
r7 = r11 - paddingTop * r4;
r8 = r5;
r9 = r4;
} else {
r7 = value7;
r8 = r5;
r9 = value8;
}
} else {
r7 = value7;
r8 = value7;
r9 = value8;
function useSpacerStyles(a0) { // fn#118485, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15680:3589, owner: CardContentFreezer.useSpacerStyles, offset: 0x024dd0ac, size: 436 bytes, params: 2, frame: 28
const env0_0 = a0;
const value2 = (MobileVisualRefreshExperiment)('VoicePanelCardView');
const {connected, controlsSpecs, safeArea, contentDimensions, windowDimensions, mode, focused,
wrapperOffset} = env1_4.useContext(VoicePanelStateContext);
const useToken = UseTokenModule.useToken;
const VOICE_PANEL_GUTTER = (Native).modules.mobile.VOICE_PANEL_GUTTER;
const value4 = Reflect.apply(useToken, UseTokenModule, [VOICE_PANEL_GUTTER]);
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
const useSpacerStylesO2 = useSpacerStylesO;
const object = {controlsSpecs: controlsSpecs};
object.VoicePanelControlsModes = VoicePanelControlsModes;
object.safeArea = safeArea;
object.EDGE_GUTTER = EDGE_GUTTER;
object.calculateVoicePanelHeaderSpecs = importDefault(11799) /* metro dependency 11799: calculateVoicePanelHeaderSpecs */;
object.edgeGutter = value4;
object.connected = connected;
object.contentDimensions = contentDimensions;
object.windowDimensions = windowDimensions;
object.mode = mode;
object.VoicePanelModes = VoicePanelModes;
object.focused = focused;
object.isRefreshEnabled = value2;
object.roundToNearestPixel = importDefault(11624) /* metro dependency 11624: roundToNearestPixel */;
object.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object.wrapperOffset = wrapperOffset;
object.LAYOUT_PHYSICS = LAYOUT_PHYSICS;
object.SCALE_PHYSICS = env1_15;
object.freeze = a0;
useSpacerStylesO2.__closure = object;
useSpacerStylesO2.__workletHash = 495797244676;
useSpacerStylesO2.__initData = env1_19;
return Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [useSpacerStylesO2]);
function useSpacerStylesO() { // fn#118486, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15680:3909, owner: CardContentFreezer.useSpacerStyles.o, offset: 0x024dd260, size: 1001 bytes, params: 1, frame: 29
var r5;
var r4;
var r11;
var r13;
var r7;
var r8;
var r9;
var value9;
var contentDimensionsBinding;
var value10;
var windowDimensionsBinding;
var value14;
var value15;
var value16;
var value17;
var value18;
var value23;
var value25;
let controlsSpecsBinding = controlsSpecs;
let get = controlsSpecsBinding.get;
const mode2 = Reflect.apply(get, controlsSpecsBinding, []).mode;
const HIDDEN = VoicePanelControlsModes.HIDDEN;
const Math = global.Math;
const max = Math.max;
const safeAreaBinding = safeArea;
get = safeAreaBinding.get;
const value3 = Reflect.apply(max, Math, [Reflect.apply(get, safeAreaBinding, []).bottom, EDGE_GUTTER]);
let {height,
paddingTop} = (CalculateVoicePanelHeaderSpecs)(safeAreaBinding.get(),
VoicePanelControlsConstantsModule.VoicePanelControlsModes);
const value6 = connected.get();
const value7 = 0;
const value8 = 1;
if (value6) {
value9 = value7 + paddingTop;
contentDimensionsBinding = contentDimensions;
get = contentDimensionsBinding.get;
value10 = value9 + Reflect.apply(get, contentDimensionsBinding, []).height + value3;
get = windowDimensions.get;
if (value10 - Reflect.apply(get, windowDimensionsBinding, []).height < 8) {
windowDimensionsBinding = windowDimensions;
r5 = windowDimensionsBinding.get().height;
} else {
r5 = value10;
}
if (mode.get() === VoicePanelModes.PIP) {
r7 = value7;
r8 = r5;
r9 = value8;
} else if (mode2 === HIDDEN) {
r7 = value7;
r8 = r5;
r9 = value8;
} else if (focused.get() == null) {
value14 = r5 - height - EDGE_GUTTER;
controlsSpecsBinding = controlsSpecs;
get = controlsSpecsBinding.get;
value15 = value14 - Reflect.apply(get, controlsSpecsBinding, []).height - value3;
windowDimensionsBinding = windowDimensions;
get = windowDimensionsBinding.get;
value16 = Reflect.apply(get, windowDimensionsBinding, []).height - paddingTop - value3;
get = windowDimensionsBinding.get;
value17 = Reflect.apply(get, windowDimensionsBinding, []).height - height;
get = controlsSpecsBinding.get;
value18 = value17 - Reflect.apply(get, controlsSpecsBinding, []).height - value3;
contentDimensionsBinding = contentDimensions;
get = contentDimensionsBinding.get;
r4 = Reflect.apply(get, contentDimensionsBinding,
[]).height > value15 ? value15 / contentDimensions.get().height : env0_1 ? windowDimensions.get().width / windowDimensions.get().width : (windowDimensions.get().width - 48) / windowDimensions.get().width;
contentDimensionsBinding = contentDimensions;
get = contentDimensionsBinding.get;
value23 = Reflect.apply(get, contentDimensionsBinding, []).height < value16;
if (value23) {
contentDimensionsBinding = contentDimensions;
r11 = contentDimensionsBinding.get().height > value18;
} else {
r11 = value23;
}
if (r11) {
contentDimensionsBinding = contentDimensions;
get = contentDimensionsBinding.get;
value25 = (value16 - Reflect.apply(get, contentDimensionsBinding, []).height) / 2;
get = contentDimensionsBinding.get;
r13 = height - (value25 - (value18 - Reflect.apply(get, contentDimensionsBinding,
[]).height * r4) / 2) * r4;
} else {
r13 = height;
}
contentDimensionsBinding = contentDimensions;
get = contentDimensionsBinding.get;
height = Reflect.apply(get, contentDimensionsBinding, []).height;
r11 = height > value15 ? r13 + (r5 * r4 - r5) / 2 : r13 + (value15 - (windowDimensions.get().height - paddingTop - value3)) / 2;
r7 = r11 - paddingTop * r4;
r8 = r5;
r9 = r4;
} else {
r7 = value7;
r8 = r5;
r9 = value8;
}
} else {
r7 = value7;
r8 = value7;
r9 = value8;
}
const object = {position: 'relative'};
windowDimensionsBinding = windowDimensions;
get = windowDimensionsBinding.get;
object.width = Reflect.apply(get, windowDimensionsBinding, []).width;
object.height = (importDefault(11624) /* metro dependency 11624: roundToNearestPixel */)(r8);
const withSpring = SpringModule.withSpring;
const wrapperOffsetBinding = wrapperOffset;
get = wrapperOffsetBinding.get;
const value30 = r7 + Reflect.apply(get, wrapperOffsetBinding, []).y;
get = wrapperOffsetBinding.get;
const items2 = [{translateY: Reflect.apply(withSpring, SpringModule, [value30, Reflect.apply(get,
wrapperOffsetBinding, []).gestureActive || mode.get() === VoicePanelModes.PIP ? LAYOUT_PHYSICS : env2_15])}];
const object3 = {};
object3.scale = SpringModule.withSpring(r9, env2_15);
items2[1] = object3;
object.transform = items2;
object.opacity = env0_0 ? value7 : value8;
return object;
}
}
function _fun118487() { // fn#118487, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15680:5143, offset: 0x024dd649, size: 146 bytes, params: 1, frame: 22
const defaultImportProps = {style: env0_2};
const Freeze = (FreezeModule).Freeze;
return (
<ReanimatedNativeView {...defaultImportProps}>
<Freeze freeze={env0_1}>
<View collapsable={false} style={StyleSheet.absoluteFill}>
{children}
</View>
</Freeze>
</ReanimatedNativeView>
);
}
}
const object2 = {position: 'relative'};
windowDimensionsBinding = windowDimensions;
get = windowDimensionsBinding.get;
object2.width = Reflect.apply(get, windowDimensionsBinding, []).width;
object2.height = (importDefault(11624) /* metro dependency 11624: roundToNearestPixel */)(r8);
const springModule = require(4577) /* metro dependency 4577: spring */;
const withSpring = springModule.withSpring;
const wrapperOffsetBinding = wrapperOffset;
get = wrapperOffsetBinding.get;
const value30 = r7 + Reflect.apply(get, wrapperOffsetBinding, []).y;
get = wrapperOffsetBinding.get;
const items2 = [{translateY: Reflect.apply(withSpring, springModule, [value30, Reflect.apply(get,
wrapperOffsetBinding, []).gestureActive || mode.get() === VoicePanelModes.PIP ? LAYOUT_PHYSICS : env2_15])}];
const object4 = {};
object4.scale = springModule.withSpring(r9, env2_15);
items2[1] = object4;
object2.transform = items2;
object2.opacity = env0_0 ? value7 : value8;
return object2;
}
function _fun118490(a0) { // fn#118490, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15680:5482, offset: 0x024dd8d4, size: 32 bytes, params: 2, frame: 11
const env0_0 = a0;
env0_1(_fun118491);
}
function VoicePanelCardView({viewableChunks}) { // fn#118488, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15680:5295, offset: 0x024dd6db, size: 244 bytes, params: 2, frame: 19
const binding = env0_4;
const useContext = binding.useContext;
const channelId = Reflect.apply(useContext, binding,
[VoicePanelStateContext]).channelId;
const value3 = (UseVoicePanelParticipantsModule).useChunkedParticipants(channelId,
useViewableChunkState(viewableChunks));
const value4 = (FluxModule).useStateFromStoresArray([ChannelRTCStore],
_fun118494, [channelId]);
const env0_3 = env0_4.useRef(value4);
env0_4.useEffect(_fun118496, [value4, channelId]);
return env0_4.useMemo(_fun118498, [value3]);
function useViewableChunkState(a0) { // fn#118489, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15680:5384, owner: VoicePanelCardView.useViewableChunkState, offset: 0x024dd7cf, size: 261 bytes, params: 2, frame: 22
const env0_0 = a0;
let binding = env1_4;
const [property, env0_1] = env1_3(binding.useState(env1_16), 2);
binding = env1_4;
let closure = _fun118490;
const value4 = binding.useCallback(closure, []);
const useAnimatedReaction = ReanimatedRexportModule.useAnimatedReaction;
closure = useViewableChunkStateH;
closure.__closure = {viewableChunks: a0};
closure.__workletHash = 1074173860641;
closure.__initData = env1_17;
const useViewableChunkStateS2 = useViewableChunkStateS;
object = {};
object.cheapWorkletShallowEqual = (require(7739) /* metro dependency 7739: cheapWorkletShallowEqual */).cheapWorkletShallowEqual;
object.runOnJS = ReanimatedRexportModule.runOnJS;
object.updateValueIfChange = value4;
useViewableChunkStateS2.__closure = object;
useViewableChunkStateS2.__workletHash = 13543715159803;
useViewableChunkStateS2.__initData = env1_18;
Reflect.apply(useAnimatedReaction, ReanimatedRexportModule, [closure, useViewableChunkStateS2]);
return property;
function _fun118490(a0) { // fn#118490, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15680:5482, offset: 0x024dd8d4, size: 32 bytes, params: 2, frame: 11
const env0_0 = a0;
env0_1(_fun118491);
function _fun118491(a0) { // fn#118491, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15680:5489, offset: 0x024dd8f4, size: 48 bytes, params: 2, frame: 4
const value = a0;
return value.start !== env0_0.start ? env0_0 : value.end === env0_0.end ? value : env0_0;
}
}
function useViewableChunkStateH() { // fn#118492, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15680:5577, owner: VoicePanelCardView.useViewableChunkState.h, offset: 0x01c3cd06, size: 18 bytes, params: 1, frame: 9
return env0_0.get();
}
function useViewableChunkStateS(a0, a1) { // fn#118493, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15680:5670, owner: VoicePanelCardView.useViewableChunkState.s, offset: 0x024dd924, size: 104 bytes, params: 3, frame: 17
let value = a1;
const value3 = undefined;
if (!CheapWorkletShallowEqualModule.cheapWorkletShallowEqual(a0, value ?? value3)) {
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value.runOnJS(env0_2)(a0);
}
return value3;
}
}
function _fun118494() { // fn#118494, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15680:6016, offset: 0x024dd98c, size: 46 bytes, params: 1, frame: 11
var environment;
const value = environment.__proto__;
const channelRTCStoreBinding = ChannelRTCStore;
const getParticipants = channelRTCStoreBinding.getParticipants;
return Reflect.apply(getParticipants, channelRTCStoreBinding, [channelId]).filter(function(a0) {
return isUserParticipant(a0);
});
}
function _fun118496() { // fn#118496, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15680:6099, offset: 0x024dd9cd, size: 258 bytes, params: 1, frame: 20
var user;
var defaultImport2;
var value3;
var length;
var value4;
var AccessibilityAnnouncer;
var announce;
var intl;
const defaultImport = Module00022;
if (!defaultImport.isEqual(env0_3.current, env0_2)) {
defaultImport2 = defaultImport;
value3 = defaultImport2.differenceWith(env0_3.current, env0_2, function({id}, a1) {
return id === a1.id;
});
length = value3.length;
value4 = null;
user = length > 0 ? value3[0].user : value4;
if (value4 != user) {
AccessibilityAnnouncer = (require(3869) /* metro dependency 3869: AccessibilityAnnouncerAndroid */).AccessibilityAnnouncer;
announce = AccessibilityAnnouncer.announce;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
Reflect.apply(announce, AccessibilityAnnouncer,
[intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['9NqwWZ'],
{username: user.username})]);
}
}
env0_3.current = env0_2;
}
function _fun118498() { // fn#118498, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15680:6392, offset: 0x024ddae5, size: 102 bytes, params: 1, frame: 17
const TransitionGroup = (TransitionGroupModule).TransitionGroup;
return (
<CardContentFreezer>
<TransitionGroup
items={env0_1}
renderItem={renderCard_118479}
getItemKey={getCardKey}
lazyCleanUpDelay={1000}
/>
</CardContentFreezer>
);
}
function useViewableChunkStateS(a0, a1) { // fn#118493, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15680:5670, owner: VoicePanelCardView.useViewableChunkState.s, offset: 0x024dd924, size: 104 bytes, params: 3, frame: 17
let value = a1;
const value3 = undefined;
const cheapWorkletShallowEqualModule = require(7739) /* metro dependency 7739: cheapWorkletShallowEqual */;
if (!cheapWorkletShallowEqualModule.cheapWorkletShallowEqual(a0, value ?? value3)) {
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value.runOnJS(env0_2)(a0);
}
return value3;
}
function _fun118483() { // fn#118483, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15680:3451, offset: 0x024dd080, size: 44 bytes, params: 1, frame: 11
if (!env1_1.current) {
env1_1.current = true;
env1_2({});
}
}
function _fun118491(a0) { // fn#118491, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15680:5489, offset: 0x024dd8f4, size: 48 bytes, params: 2, frame: 4
const value = a0;
return value.start !== env0_0.start ? env0_0 : value.end === env0_0.end ? value : env0_0;
}
global.__d(_fun118477, 15483, [57, 31, 27, 4606, 11795, 11793, 15440, 11798, 4299, 33, 15484, 4017, 7739, 1357,
11794, 3860, 697, 11799, 11624, 4577, 15444, 6619, 8141, 4521, 15435, 566, 22, 3869, 1244, 4508,
2]) /* metro module 15483, dependencies: [57, 31, 27, 4606, 11795, 11793, 15440, 11798, 4299, 33, 15484, 4017, 7739, 1357, 11794, 3860, 697, 11799, 11624, 4577, 15444, 6619, 8141, 4521, 15435, 566, 22, 3869, 1244, 4508, 2] */;
@@ -1,63 +1,76 @@
/* Metro module 15493; source: modules/voice_panel/native/card/VoicePanelNoVideoParticipantsCard.tsx; dependencies: [31, 27, 33, 4501, 697, 11794, 7712, 6821, 4573, 1244, 2] */
import NativeView from '../../../core/native/NativeView.tsx'; /* Metro dependency 6821 */
import VoicePanelStateContext from '../VoicePanelStateContext.tsx'; /* Metro dependency 11794 */
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 IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
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 */
function _fun118632(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118632, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15690:6, offset: 0x024e55b0, size: 347 bytes, params: 8, frame: 23
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).Pressable;
const value2 = require(33) /* metro dependency 33 */;
const env0_5 = value2.jsx;
const env0_6 = value2.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {};
let value = ReactModule;
const createStyles = CreateStylesModule.createStyles;
object = {};
const VOICE_VIDEO_VIDEO_TILE_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.VOICE_VIDEO_VIDEO_TILE_BACKGROUND;
object2.container = {'width': '100%', 'height': '100%', 'alignItems': 'center', 'justifyContent': 'center',
object.container = {'width': '100%', 'height': '100%', 'alignItems': 'center', 'justifyContent': 'center',
'padding': 16, backgroundColor: VOICE_VIDEO_VIDEO_TILE_BACKGROUND};
object2.label = {'marginBottom': 16, 'textAlign': 'center'};
const object4 = {'paddingHorizontal': 20, 'paddingVertical': 12, 'backgroundColor': 'white'};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object2.button = object4;
object.label = {'marginBottom': 16, 'textAlign': 'center'};
const object3 = {'paddingHorizontal': 20, 'paddingVertical': 12, 'backgroundColor': 'white'};
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object.button = object3;
const PRIMARY_860 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_860;
object2.buttonText = {color: PRIMARY_860};
const env0_7 = Reflect.apply(createStyles, createStylesModule, [object2]);
object.buttonText = {color: PRIMARY_860};
const env0_7 = Reflect.apply(createStyles, CreateStylesModule, [object]);
value = value.memo(VoicePanelNoVideoParticipantsCard);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/card/VoicePanelNoVideoParticipantsCard.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/card/VoicePanelNoVideoParticipantsCard.tsx');
exports.default = value;
}
function VoicePanelNoVideoParticipantsCard() { // fn#118633, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15690:557, offset: 0x024e570b, size: 421 bytes, params: 1, frame: 26
const binding = env0_3;
const useContext = binding.useContext;
const channelId = Reflect.apply(useContext, binding,
[importDefault(11794) /* metro dependency 11794: VoicePanelStateContext */]).channelId;
const styles = useStyles();
const value2 = binding.useCallback(_fun118634, [channelId]);
const NativeView = importDefault(6821) /* metro dependency 6821: NativeView */;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const text = <Text style={styles.label} variant="text-md/semibold" color="always-white">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['8eBJ73'])}</Text>;
return (
<NativeView style={styles.container}>
{text}
<Pressable
style={styles.button}
onPress={value2}
accessibilityRole="button"
accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.kLQySL)}
function VoicePanelNoVideoParticipantsCard() { // fn#118633, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15690:557, offset: 0x024e570b, size: 421 bytes, params: 1, frame: 26
const binding = env0_3;
const useContext = binding.useContext;
const channelId = Reflect.apply(useContext, binding,
[VoicePanelStateContext]).channelId;
const styles = useStyles();
const value2 = binding.useCallback(_fun118634, [channelId]);
const Text = (TextModule).Text;
const intl = (IndexNativeModule).intl;
const text = (
<Text
style={styles.label}
variant="text-md/semibold"
color="always-white"
>
<Text variant="text-sm/semibold" style={styles.buttonText}>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.kLQySL)}
</Text>
</Pressable>
</NativeView>
);
}
{intl.string((IndexNativeModule).t['8eBJ73'])}
</Text>
);
return (
<NativeView style={styles.container}>
{text}
<Pressable
style={styles.button}
onPress={value2}
accessibilityRole="button"
accessibilityLabel={intl.string((IndexNativeModule).t.kLQySL)}
>
<Text variant="text-sm/semibold" style={styles.buttonText}>
{intl.string((IndexNativeModule).t.kLQySL)}
</Text>
</Pressable>
</NativeView>
);
function _fun118634() { // fn#118634, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15690:663, offset: 0x024e58b0, size: 48 bytes, params: 1, frame: 14
let value = environment.__proto__;
value = importDefault(7712) /* metro dependency 7712: ChannelRTCActionCreators */;
value.toggleVoiceParticipantsHidden(channelId, false);
}
}
function _fun118634() { // fn#118634, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15690:663, offset: 0x024e58b0, size: 48 bytes, params: 1, frame: 14
let value = environment.__proto__;
value = importDefault(7712) /* metro dependency 7712: ChannelRTCActionCreators */;
value.toggleVoiceParticipantsHidden(channelId, false);
}
global.__d(_fun118632, 15493, [31, 27, 33, 4501, 697, 11794, 7712, 6821, 4573, 1244,
2]) /* metro module 15493, dependencies: [31, 27, 33, 4501, 697, 11794, 7712, 6821, 4573, 1244, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,4 +1,10 @@
/* Metro module 15434; source: modules/voice_panel/native/controller/VoicePanelStreamOutputSinkStack.tsx; dependencies: [57, 6, 7, 31, 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 Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
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 */
function _fun118063(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118063, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15631:6, offset: 0x024cab6b, size: 196 bytes, params: 8, frame: 18
const _arrayLikeToArray_118066 = function(a0, a1) {
var r0;
@@ -45,149 +51,224 @@ function _fun118063(global, require, importDefault, importAll, module, exports,
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(57) /* metro dependency 57 */;
const env0_1 = importDefault(6) /* metro dependency 6 */;
const env0_2 = importDefault(7) /* metro dependency 7 */;
const env0_3 = importAll(31) /* metro dependency 31 */;
let value = _fun118067();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/controller/VoicePanelStreamOutputSinkStack.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/controller/VoicePanelStreamOutputSinkStack.tsx');
exports.default = value;
exports.useSetHasActiveVideoOutputSink = useSetHasActiveVideoOutputSink;
}
function _createForOfIteratorHelperLoose_118064(a0, a1) { // fn#118064, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15631:141, offset: 0x024cac2f, 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)) {
exports.useSetHasActiveVideoOutputSink = useSetHasActiveVideoOutputSink_118077;
function _createForOfIteratorHelperLoose_118064(a0, a1) { // fn#118064, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15631:141, offset: 0x024cac2f, 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 _fun118065;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_118066(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 _fun118065;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_118066(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_118066(a0, value);
r6 = value;
} else {
r6 = value;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_118066(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun118065;
}
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 _fun118065() { // fn#118065, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15631:712, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
return ClassCallCheck >= env0_0.length ? {done: true} : {done: false,
value: env0_0[typeof ClassCallCheck === 'bigint' ? ClassCallCheck : +ClassCallCheck]};
}
}
function _fun118067() { // fn#118067, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15631:1057, offset: 0x024cada3, size: 188 bytes, params: 1, frame: 15
return CreateClass(VoicePanelStreamOutputSinkStack, [{key: 'cleanUp', value: function() {
global.clearInterval(this.timer);
}}, {key: 'logSinks', value: value_118071}, {key: 'setHasActiveVideoOutputSink', value: value_118072},
{key: 'clearLock', value: value_118073}, {key: 'setActive', value: function(a0, a1, a2) {
var env0_0 = a0;
var env0_1 = a1;
var env0_2 = a2;
this.mediaEngine.eachConnection(_fun118075);
}}, {key: 'sourceId', value: function(a0) {
return 'VoicePanelStreamOutputSinkStack-' + a0;
}}]);
function VoicePanelStreamOutputSinkStack(a0) { // fn#118068, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15631:1078, offset: 0x024cae5f, size: 131 bytes, params: 2, frame: 16
var environment;
let value = a1;
const r4 = value !== undefined ? value : false;
value = environment.__proto__;
env1_1(this, VoicePanelStreamOutputSinkStack);
this.mediaEngine = a0;
const Map = global.Map;
this.activeSinks = new Map();
this.timer = -1;
if (r4) {
this.timer = global.setInterval(_fun118069, 2000);
}
function _fun118069() { // fn#118069, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15631:1253, offset: 0x024caee2, size: 21 bytes, params: 1, frame: 9
return Module00057.logSinks();
}
}
function value_118071() { // fn#118071, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15631:1365, offset: 0x024caf11, size: 174 bytes, params: 1, frame: 29
var r2;
var value4;
var value5;
var property;
var property2;
var push;
var Array;
var value6;
var value7;
var value8;
const items2 = [];
const value2 = _createForOfIteratorHelperLoose_118064(this.activeSinks);
const value3 = value2();
let done = value3.done;
if (!done) {
for (r2 = value3; true; r2 = value8) {
value4 = r2.value;
value5 = env1_0(value4, 2);
property = value5[0];
property2 = value5[1];
push = items2.push;
Array = global.Array;
value6 = Array.from(property2);
value7 = value6.join(',');
Reflect.apply(push, items2, ['[Stream:' + property + ', Locks:[' + value7 + ']]']);
value8 = value2();
done = value8.done;
if (done) {
break;
}
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun118065;
}
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 _fun118067() { // fn#118067, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15631:1057, offset: 0x024cada3, size: 188 bytes, params: 1, frame: 15
return env0_2(VoicePanelStreamOutputSinkStack, [{key: 'cleanUp', value: function() {
global.clearInterval(this.timer);
}}, {key: 'logSinks', value: value_118071}, {key: 'setHasActiveVideoOutputSink', value: value_118072},
{key: 'clearLock', value: value_118073}, {key: 'setActive', value: function(a0, a1, a2) {
var env0_0 = a0;
var env0_1 = a1;
var env0_2 = a2;
this.mediaEngine.eachConnection(_fun118075);
}}, {key: 'sourceId', value: function(a0) {
return 'VoicePanelStreamOutputSinkStack-' + a0;
}}]);
}
function useSetHasActiveVideoOutputSink(a0) { // fn#118077, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15631:2512, offset: 0x024cb1b2, size: 96 bytes, params: 2, frame: 16
const env0_0 = a0;
const binding = env0_3;
const value = binding.useId();
const value2 = binding.useCallback(_fun118078, [value, a0]);
binding.useEffect(function() {
return _fun118080;
}, [value, value2, a0]);
return value2;
}
function VoicePanelStreamOutputSinkStack(a0) { // fn#118068, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15631:1078, offset: 0x024cae5f, size: 131 bytes, params: 2, frame: 16
var environment;
let value = a1;
const r4 = value !== undefined ? value : false;
value = environment.__proto__;
env1_1(this, VoicePanelStreamOutputSinkStack);
this.mediaEngine = a0;
const Map = global.Map;
this.activeSinks = new Map();
this.timer = -1;
if (r4) {
this.timer = global.setInterval(_fun118069, 2000);
}
}
function value_118071() { // fn#118071, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15631:1365, offset: 0x024caf11, size: 174 bytes, params: 1, frame: 29
var r2;
var value4;
var value5;
var property;
var property2;
var push;
var Array;
var value6;
var value7;
var value8;
const items2 = [];
const value2 = _createForOfIteratorHelperLoose_118064(this.activeSinks);
const value3 = value2();
let done = value3.done;
if (!done) {
for (r2 = value3; true; r2 = value8) {
value4 = r2.value;
value5 = env1_0(value4, 2);
property = value5[0];
property2 = value5[1];
push = items2.push;
Array = global.Array;
value6 = Array.from(property2);
value7 = value6.join(',');
Reflect.apply(push, items2, ['[Stream:' + property + ', Locks:[' + value7 + ']]']);
value8 = value2();
done = value8.done;
if (done) {
break;
function value_118073(a0) { // fn#118073, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15631:1922, offset: 0x024cb09e, size: 160 bytes, params: 2, frame: 23
var r2;
var value4;
var value5;
var property;
var property2;
var has;
var size;
var setActive;
var sourceId;
var value6;
const _createForOfIteratorHelperLoose_118064Binding = _createForOfIteratorHelperLoose_118064;
let activeSinks = this.activeSinks;
const value2 = _createForOfIteratorHelperLoose_118064Binding(activeSinks);
const value3 = value2();
let done = value3.done;
if (!done) {
r2 = value3;
while (true) {
value4 = r2.value;
value5 = env1_0(value4, 2);
property = value5[0];
property2 = value5[1];
has = property2.has;
if (Reflect.apply(has, property2, [a0])) {
property2.delete(a0);
size = property2.size;
if (size !== 0) {
break;
}
setActive = this.setActive;
sourceId = this.sourceId;
Reflect.apply(setActive, this, [property, false, Reflect.apply(sourceId, this, [a0])]);
activeSinks = this.activeSinks;
activeSinks.delete(property);
break;
}
value6 = value2();
done = value6.done;
if (done) {
break;
}
r2 = value6;
continue;
}
}
}
function value_118074(a0, a1, a2) { // fn#118074, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15631:2178, offset: 0x024cb13e, size: 54 bytes, params: 4, frame: 11
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
this.mediaEngine.eachConnection(_fun118075);
function _fun118075(a0) { // fn#118075, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15631:2227, offset: 0x024cb174, size: 33 bytes, params: 2, frame: 15
return a0.setHasActiveVideoOutputSink(env0_0, require, importDefault);
}
}
}
function useSetHasActiveVideoOutputSink_118077(a0) { // fn#118077, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15631:2512, offset: 0x024cb1b2, size: 96 bytes, params: 2, frame: 16
const env0_0 = a0;
const value = ReactModule.useId();
const value2 = ReactModule.useCallback(_fun118078, [value, a0]);
ReactModule.useEffect(function() {
return _fun118080;
}, [value, value2, a0]);
return value2;
function _fun118078(a0, a1) { // fn#118078, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15631:2588, offset: 0x024cb212, size: 34 bytes, params: 3, frame: 15
env0_0.setHasActiveVideoOutputSink(ClassCallCheck, a0, a1);
}
function _fun118079() { // fn#118079, offset: 0x024cb234, size: 11 bytes, params: 1, frame: 1
return _fun118080;
function _fun118080() { // fn#118080, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15631:2666, offset: 0x024cb23f, size: 26 bytes, params: 1, frame: 11
return env1_0.clearLock(env1_1);
}
}
}
}
function value_118072(a0, a1, a2) { // fn#118072, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15631:1600, offset: 0x024cafbf, size: 223 bytes, params: 4, frame: 18
@@ -212,78 +293,4 @@ function value_118072(a0, a1, a2) { // fn#118072, source: /ci/build/discord/disc
}
}
function value_118073(a0) { // fn#118073, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15631:1922, offset: 0x024cb09e, size: 160 bytes, params: 2, frame: 23
var r2;
var value4;
var value5;
var property;
var property2;
var has;
var size;
var setActive;
var sourceId;
var value6;
const _createForOfIteratorHelperLoose_118064Binding = _createForOfIteratorHelperLoose_118064;
let activeSinks = this.activeSinks;
const value2 = _createForOfIteratorHelperLoose_118064Binding(activeSinks);
const value3 = value2();
let done = value3.done;
if (!done) {
r2 = value3;
while (true) {
value4 = r2.value;
value5 = env1_0(value4, 2);
property = value5[0];
property2 = value5[1];
has = property2.has;
if (Reflect.apply(has, property2, [a0])) {
property2.delete(a0);
size = property2.size;
if (size !== 0) {
break;
}
setActive = this.setActive;
sourceId = this.sourceId;
Reflect.apply(setActive, this, [property, false, Reflect.apply(sourceId, this, [a0])]);
activeSinks = this.activeSinks;
activeSinks.delete(property);
break;
}
value6 = value2();
done = value6.done;
if (done) {
break;
}
r2 = value6;
continue;
}
}
}
function value_118074(a0, a1, a2) { // fn#118074, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15631:2178, offset: 0x024cb13e, size: 54 bytes, params: 4, frame: 11
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
this.mediaEngine.eachConnection(_fun118075);
}
function _fun118078(a0, a1) { // fn#118078, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15631:2588, offset: 0x024cb212, size: 34 bytes, params: 3, frame: 15
env0_0.setHasActiveVideoOutputSink(env0_1, a0, a1);
}
function _fun118079() { // fn#118079, offset: 0x024cb234, size: 11 bytes, params: 1, frame: 1
return _fun118080;
}
function _fun118069() { // fn#118069, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15631:1253, offset: 0x024caee2, size: 21 bytes, params: 1, frame: 9
return env0_0.logSinks();
}
function _fun118075(a0) { // fn#118075, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15631:2227, offset: 0x024cb174, size: 33 bytes, params: 2, frame: 15
return a0.setHasActiveVideoOutputSink(env0_0, require, importDefault);
}
function _fun118080() { // fn#118080, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15631:2666, offset: 0x024cb23f, size: 26 bytes, params: 1, frame: 11
return env1_0.clearLock(env1_1);
}
global.__d(_fun118063, 15434, [57, 6, 7, 31, 2]) /* metro module 15434, dependencies: [57, 6, 7, 31, 2] */;
@@ -1,166 +1,183 @@
/* Metro module 15443; source: modules/voice_panel/native/controller/usePanelOpenState.tsx; dependencies: [57, 31, 7710, 11795, 661, 4017, 1239, 12080, 3974, 3987, 12073, 8088, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import VoicePanelStore from '../../VoicePanelStore.tsx'; /* Metro dependency 7710 */
import RouteManager from '../../../routing/RouteManager.tsx'; /* Metro dependency 12080 */
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 ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as ComponentDispatchUtilsModule from '../../../../utils/ComponentDispatchUtils.tsx'; /* Metro dependency 1239 */
import * as RouteUtilsModule from '../../../routing/RouteUtils.tsx'; /* Metro dependency 3987 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as VoicePanelConstantsModule from '../../VoicePanelConstants.tsx'; /* Metro dependency 11795 */
function _fun118156(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118156, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15640:6, offset: 0x024ce238, size: 239 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const voicePanelStore = importDefault(7710) /* metro dependency 7710: VoicePanelStore */;
const env0_6 = (require(11795) /* metro dependency 11795: VoicePanelConstants */).VoicePanelModes;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_7 = constantsModule.ComponentActions;
const env0_8 = constantsModule.Routes;
object = {code: 'function usePanelOpenStateTsx1(){const{connected}=this.__closure;return{connected:connected.get()};}'};
object = {code: 'function usePanelOpenStateTsx2(props,previous){const{runOnJS,doCloseChannel}=this.__closure;const isConnected=props.connected;const wasConnected=(previous===null||previous===void 0?void 0:previous.connected)===true;if(wasConnected&&!isConnected){runOnJS(doCloseChannel)();}}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/controller/usePanelOpenState.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/controller/usePanelOpenState.tsx');
exports.default = usePanelOpenState;
}
function usePanelOpenState(a0, a1, a2, a3) { // fn#118157, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15640:696, offset: 0x024ce327, size: 315 bytes, params: 5, frame: 25
var object2;
let env0_0 = a0;
let env0_1 = a1;
const env0_2 = a2;
const env0_3 = a3;
let closure = doCloseChannel;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedReaction = reanimatedRexportModule.useAnimatedReaction;
let closure2 = function() {
var object = {};
object.connected = importAll.get();
return object;
};
closure2.__closure = {connected: a3};
closure2.__workletHash = 8350408810765;
closure2.__initData = env0_9;
const closure3 = usePanelOpenStateO;
object2 = {};
object2.runOnJS = reanimatedRexportModule.runOnJS;
object2.doCloseChannel = closure;
closure3.__closure = object2;
closure3.__workletHash = 9166012598595;
closure3.__initData = env0_10;
Reflect.apply(useAnimatedReaction, reanimatedRexportModule, [closure2, closure3]);
const binding = env0_4;
binding.useEffect(function() {
var closure = _fun118162;
var env0_0 = closure;
var closure2 = _fun118163;
var env0_1 = closure2;
var ComponentDispatch = require(dependencyMap[6]).ComponentDispatch;
ComponentDispatch.subscribe(ComponentActions.VOICE_PANEL_OPEN, closure);
ComponentDispatch.subscribe(ComponentActions.VOICE_PANEL_CLOSE, closure2);
return _fun118164;
}, [a0, a1, a2, a3]);
const value = env0_3(binding.useState(_fun118165), 2);
const property = value[0];
const env0_6 = value[1];
binding.useEffect(_fun118166, [a0, property]);
}
function doCloseChannel() { // fn#118158, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15640:755, owner: usePanelOpenState.doCloseChannel, offset: 0x024ce462, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
return VoicePanelStore.getState().closeChannel(env0_0);
}
function usePanelOpenStateO({connected}, a1) { // fn#118160, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15640:923, owner: usePanelOpenState.O, offset: 0x024ce4a0, size: 92 bytes, params: 3, frame: 13
var value4;
var moduleValue;
const connected = a1?.connected;
if (connected === true && !connected) {
value4 = environment.__proto__;
moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */;
moduleValue.runOnJS(doCloseChannel)();
}
}
function _fun118161() { // fn#118161, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15640:1158, offset: 0x024ce4fc, size: 119 bytes, params: 1, frame: 20
const closure = componentActionOpen;
const closure2 = componentActionClose;
let ComponentDispatch = (require(1239) /* metro dependency 1239: ComponentDispatchUtils */).ComponentDispatch;
let subscribe = ComponentDispatch.subscribe;
let VOICE_PANEL_OPEN = ComponentActions.VOICE_PANEL_OPEN;
Reflect.apply(subscribe, ComponentDispatch, [VOICE_PANEL_OPEN, closure]);
subscribe = ComponentDispatch.subscribe;
let VOICE_PANEL_CLOSE = ComponentActions.VOICE_PANEL_CLOSE;
Reflect.apply(subscribe, ComponentDispatch, [VOICE_PANEL_CLOSE, closure2]);
return function() {
var ComponentDispatch = require(dependencyMap[6]).ComponentDispatch;
var VOICE_PANEL_OPEN = ComponentActions.VOICE_PANEL_OPEN;
ComponentDispatch.unsubscribe(VOICE_PANEL_OPEN, componentActionOpen);
var VOICE_PANEL_CLOSE = ComponentActions.VOICE_PANEL_CLOSE;
ComponentDispatch.unsubscribe(VOICE_PANEL_CLOSE, componentActionClose);
};
}
function _fun118165() { // fn#118165, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15640:1693, offset: 0x024ce692, size: 48 bytes, params: 1, frame: 11
let value = environment.__proto__;
value = importDefault(12080) /* metro dependency 12080: RouteManager */;
const getHistory = value.getHistory;
return Reflect.apply(getHistory, value, []).location.pathname;
}
function _fun118166() { // fn#118166, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15640:1774, offset: 0x024ce6c2, size: 58 bytes, params: 1, frame: 12
var environment;
const value = environment.__proto__;
const env0_0 = (importDefault(12080) /* metro dependency 12080: RouteManager */).addRouteChangeListener(_fun118167);
return _fun118168;
}
function componentActionOpen({channelId}) { // fn#118162, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15640:1163, offset: 0x024ce573, size: 83 bytes, params: 2, frame: 12
var r1;
var value3;
var value4;
const value2 = env1_0 === channelId;
if (value2) {
value3 = require.get();
value4 = environment.__proto__.__proto__;
r1 = value3 !== VoicePanelModes.PANEL;
} else {
r1 = value2;
}
if (r1) {
value = environment.__proto__.__proto__;
importDefault(VoicePanelModes.PANEL);
}
}
function componentActionClose() { // fn#118163, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15640:1242, offset: 0x024ce5c6, size: 105 bytes, params: 1, frame: 13
if (importAll.get()) {
if (require.get() !== VoicePanelModes.PIP) {
importDefault(VoicePanelModes.PIP);
function usePanelOpenState(a0, a1, a2, a3) { // fn#118157, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15640:696, offset: 0x024ce327, size: 315 bytes, params: 5, frame: 25
let env0_0 = a0;
let env0_1 = a1;
const env0_2 = a2;
const env0_3 = a3;
const doCloseChannel2 = doCloseChannel;
const useAnimatedReaction = ReanimatedRexportModule.useAnimatedReaction;
let closure2 = function() {
var object = {};
object.connected = importAll.get();
return object;
};
closure2.__closure = {connected: a3};
closure2.__workletHash = 8350408810765;
closure2.__initData = env0_9;
const usePanelOpenStateO2 = usePanelOpenStateO;
object = {};
object.runOnJS = ReanimatedRexportModule.runOnJS;
object.doCloseChannel = doCloseChannel2;
usePanelOpenStateO2.__closure = object;
usePanelOpenStateO2.__workletHash = 9166012598595;
usePanelOpenStateO2.__initData = env0_10;
Reflect.apply(useAnimatedReaction, ReanimatedRexportModule, [closure2, usePanelOpenStateO2]);
ReactModule.useEffect(function() {
var closure = _fun118162;
var env0_0 = closure;
var closure2 = _fun118163;
var env0_1 = closure2;
var ComponentDispatch = require(dependencyMap[6]).ComponentDispatch;
ComponentDispatch.subscribe(ComponentActions.VOICE_PANEL_OPEN, closure);
ComponentDispatch.subscribe(ComponentActions.VOICE_PANEL_CLOSE, closure2);
return _fun118164;
}, [a0, a1, a2, a3]);
const value = env0_3(ReactModule.useState(_fun118165), 2);
const property = value[0];
const env0_6 = value[1];
ReactModule.useEffect(_fun118166, [a0, property]);
function doCloseChannel() { // fn#118158, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15640:755, owner: usePanelOpenState.doCloseChannel, offset: 0x024ce462, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
return VoicePanelStore.getState().closeChannel(env0_0);
}
} else {
VoicePanelStore.getState().closeChannel(env1_0);
}
}
function _fun118167(a0) { // fn#118167, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15640:1817, offset: 0x024ce6fc, size: 245 bytes, params: 2, frame: 24
var value2;
var moduleValue;
var matchPath;
var object2;
const RouteParam = (require(3987) /* metro dependency 3987: RouteUtils */).RouteParam;
var value4;
var moduleValue2;
const value = environment.__proto__;
const binding = env1_5;
let pathname = a0.pathname;
if (binding !== pathname) {
env1_6(env1_5);
value2 = environment.__proto__.__proto__;
moduleValue = require(3974) /* metro dependency 3974: matchPathCompat */;
matchPath = moduleValue.matchPath;
pathname = a0.pathname;
object2 = {};
object2.path = Routes.CHANNEL(RouteParam.guildId(), RouteParam.channelId());
value4 = Reflect.apply(matchPath, moduleValue, [pathname, object2]);
moduleValue2 = require(12073) /* metro dependency 12073: RouteManagerUtils */;
if (moduleValue2.extractParamsFromVoiceModalRoute(a0).voiceChannelId == null) {
if (!(value4 != null && value4.params.channelId === env1_0)) {
(importDefault(8088) /* metro dependency 8088: closeVoicePanels */)();
function usePanelOpenStateO({connected}, a1) { // fn#118160, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15640:923, owner: usePanelOpenState.O, offset: 0x024ce4a0, size: 92 bytes, params: 3, frame: 13
var value4;
var moduleValue;
const connected = a1?.connected;
if (connected === true && !connected) {
value4 = environment.__proto__;
moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */;
moduleValue.runOnJS(doCloseChannel)();
}
}
function _fun118161() { // fn#118161, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15640:1158, offset: 0x024ce4fc, size: 119 bytes, params: 1, frame: 20
const componentActionOpen2 = componentActionOpen;
const componentActionClose2 = componentActionClose;
let ComponentDispatch = (ComponentDispatchUtilsModule).ComponentDispatch;
let subscribe = ComponentDispatch.subscribe;
let VOICE_PANEL_OPEN = ComponentActions.VOICE_PANEL_OPEN;
Reflect.apply(subscribe, ComponentDispatch, [VOICE_PANEL_OPEN, componentActionOpen2]);
subscribe = ComponentDispatch.subscribe;
let VOICE_PANEL_CLOSE = ComponentActions.VOICE_PANEL_CLOSE;
Reflect.apply(subscribe, ComponentDispatch, [VOICE_PANEL_CLOSE, componentActionClose2]);
return function() {
var ComponentDispatch = require(dependencyMap[6]).ComponentDispatch;
var VOICE_PANEL_OPEN = ComponentActions.VOICE_PANEL_OPEN;
ComponentDispatch.unsubscribe(VOICE_PANEL_OPEN, componentActionOpen);
var VOICE_PANEL_CLOSE = ComponentActions.VOICE_PANEL_CLOSE;
ComponentDispatch.unsubscribe(VOICE_PANEL_CLOSE, componentActionClose);
};
function componentActionOpen({channelId}) { // fn#118162, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15640:1163, offset: 0x024ce573, size: 83 bytes, params: 2, frame: 12
var r1;
var value3;
var value4;
const value2 = env1_0 === channelId;
if (value2) {
value3 = require.get();
value4 = environment.__proto__.__proto__;
r1 = value3 !== VoicePanelModes.PANEL;
} else {
r1 = value2;
}
if (r1) {
value = environment.__proto__.__proto__;
importDefault(VoicePanelModes.PANEL);
}
}
function componentActionClose() { // fn#118163, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15640:1242, offset: 0x024ce5c6, size: 105 bytes, params: 1, frame: 13
if (importAll.get()) {
if (require.get() !== VoicePanelModes.PIP) {
importDefault(VoicePanelModes.PIP);
}
} else {
VoicePanelStore.getState().closeChannel(env1_0);
}
}
function _fun118164() { // fn#118164, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15640:1498, offset: 0x024ce62f, size: 99 bytes, params: 1, frame: 19
const ComponentDispatch = (ComponentDispatchUtilsModule).ComponentDispatch;
let unsubscribe = ComponentDispatch.unsubscribe;
const VOICE_PANEL_OPEN = ComponentActions.VOICE_PANEL_OPEN;
Reflect.apply(unsubscribe, ComponentDispatch, [VOICE_PANEL_OPEN, componentActionOpen]);
unsubscribe = ComponentDispatch.unsubscribe;
const VOICE_PANEL_CLOSE = ComponentActions.VOICE_PANEL_CLOSE;
Reflect.apply(unsubscribe, ComponentDispatch, [VOICE_PANEL_CLOSE, componentActionClose]);
}
}
function _fun118165() { // fn#118165, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15640:1693, offset: 0x024ce692, size: 48 bytes, params: 1, frame: 11
let value = environment.__proto__;
value = importDefault(12080) /* metro dependency 12080: RouteManager */;
const getHistory = value.getHistory;
return Reflect.apply(getHistory, value, []).location.pathname;
}
function _fun118166() { // fn#118166, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15640:1774, offset: 0x024ce6c2, size: 58 bytes, params: 1, frame: 12
var environment;
const value = environment.__proto__;
const env0_0 = (RouteManager).addRouteChangeListener(_fun118167);
return _fun118168;
function _fun118167(a0) { // fn#118167, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15640:1817, offset: 0x024ce6fc, size: 245 bytes, params: 2, frame: 24
var value2;
var moduleValue;
var matchPath;
var object;
const RouteParam = (RouteUtilsModule).RouteParam;
var value4;
var moduleValue2;
const value = environment.__proto__;
const binding = env1_5;
let pathname = a0.pathname;
if (binding !== pathname) {
env1_6(env1_5);
value2 = environment.__proto__.__proto__;
moduleValue = require(3974) /* metro dependency 3974: matchPathCompat */;
matchPath = moduleValue.matchPath;
pathname = a0.pathname;
object = {};
object.path = Routes.CHANNEL(RouteParam.guildId(), RouteParam.channelId());
value4 = Reflect.apply(matchPath, moduleValue, [pathname, object]);
moduleValue2 = require(12073) /* metro dependency 12073: RouteManagerUtils */;
if (moduleValue2.extractParamsFromVoiceModalRoute(a0).voiceChannelId == null) {
if (!(value4 != null && value4.params.channelId === env1_0)) {
(importDefault(8088) /* metro dependency 8088: closeVoicePanels */)();
}
}
}
}
function _fun118168() { // fn#118168, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15640:2082, offset: 0x00da750c, size: 15 bytes, params: 1, frame: 9
env0_0();
}
}
}
}
global.__d(_fun118156, 15443, [57, 31, 7710, 11795, 661, 4017, 1239, 12080, 3974, 3987, 12073, 8088,
2]) /* metro module 15443, dependencies: [57, 31, 7710, 11795, 661, 4017, 1239, 12080, 3974, 3987, 12073, 8088, 2] */;
@@ -1,146 +1,179 @@
/* Metro module 11792; source: modules/voice_panel/native/controls/VoicePanelChatView.tsx; dependencies: [31, 27, 11793, 661, 33, 4501, 7712, 1239, 8341, 1244, 4067, 11794, 4017, 8141, 7704, 7701, 1478, 1585, 11801, 4603, 4003, 11337, 3868, 4556, 11802, 11273, 2] */
import UseWindowDimensionsNative from '../../../screen/useWindowDimensions.native.tsx'; /* Metro dependency 1478 */
import UseSafeAreaInsetsNative from '../../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import UseColorThemeBackground from '../../../client_themes/native/useColorThemeBackground.tsx'; /* Metro dependency 4003 */
import Module04067 from '../../../../by-id/module-04067.js'; /* Metro dependency 4067 */
import ChannelActionCreators from '../../../../actions/ChannelActionCreators.tsx'; /* Metro dependency 4603 */
import ThemedGradient from '../../../client_themes/native/ThemedGradient.tsx'; /* Metro dependency 7704 */
import ChannelRTCActionCreators from '../../../../actions/ChannelRTCActionCreators.tsx'; /* Metro dependency 7712 */
import ReanimatedNativeView from '../../../core/native/ReanimatedNativeView.tsx'; /* Metro dependency 8141 */
import ChatViewWidthContext from '../../../chat/native/ChatViewWidthContext.tsx'; /* Metro dependency 11337 */
import VoicePanelStateContext from '../VoicePanelStateContext.tsx'; /* Metro dependency 11794 */
import VoicePanelControlsDrawerTitle from './VoicePanelControlsDrawerTitle.tsx'; /* Metro dependency 11802 */
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 '../../../../external/discord_common/js/packages/design/native.tsx'; /* Metro dependency 3868 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as AccessibilityViewNativeModule from '../../../../design/components/AccessibilityView/AccessibilityView.native.tsx'; /* Metro dependency 4556 */
import * as ClientThemesOverridesModule from '../../../client_themes/native/ClientThemesOverrides.tsx'; /* Metro dependency 7701 */
import * as IconButtonNativeModule from '../../../../design/components/Button/native/IconButton.native.tsx'; /* Metro dependency 8341 */
import * as VoicePanelControlsConstantsModule from './VoicePanelControlsConstants.tsx'; /* Metro dependency 11793 */
import * as VoicePanelControlsUtilsModule from '../utils/VoicePanelControlsUtils.tsx'; /* Metro dependency 11801 */
function _fun90308(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90308, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11978:6, offset: 0x0203408b, size: 387 bytes, params: 8, frame: 23
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
(require(27) /* metro dependency 27 */).Platform;
const CONTROLS_DRAWER_HEADER_SIZE = (require(11793) /* metro dependency 11793: VoicePanelControlsConstants */).CONTROLS_DRAWER_HEADER_SIZE;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_4 = constantsModule.ComponentActions;
const env0_5 = constantsModule.ME;
const value3 = require(33) /* metro dependency 33 */;
const env0_6 = value3.jsx;
const env0_7 = value3.jsxs;
const env0_8 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {'flex': 1,
let value = ReactModule;
(ReactNativeModule).Platform;
const CONTROLS_DRAWER_HEADER_SIZE = (VoicePanelControlsConstantsModule).CONTROLS_DRAWER_HEADER_SIZE;
const env0_8 = (CreateStylesModule).createStyles({container: {'flex': 1,
'overflow': 'hidden', paddingTop: CONTROLS_DRAWER_HEADER_SIZE}, gradientWrapper: {'position': 'absolute',
'top': null, 'left': 0, top: CONTROLS_DRAWER_HEADER_SIZE}, titleBlur: {opacity: 0}});
const value5 = value.memo(VoicePanelDismissChatButton);
object = {code: 'function VoicePanelChatViewTsx1(){const{windowDimensions}=this.__closure;return{width:windowDimensions.get().width,height:windowDimensions.get().height};}'};
const env0_10 = value.memo(_fun90312);
value = value.memo(VoicePanelChatView);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/controls/VoicePanelChatView.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/controls/VoicePanelChatView.tsx');
exports.default = value;
exports.MemoedVoicePanelDismissChatButton = value5;
}
function updateChatOpen_90309(a0, a1) { // fn#90309, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11978:377, offset: 0x0203420e, size: 45 bytes, params: 3, frame: 14
(importDefault(7712) /* metro dependency 7712: ChannelRTCActionCreators */).updateChatOpen(a0, a1);
}
function VoicePanelDismissChatButton() { // fn#90310, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11978:448, offset: 0x0203423b, size: 160 bytes, params: 1, frame: 20
const value2 = env0_3.useCallback(function() {
var ComponentDispatch = require(dependencyMap[7]).ComponentDispatch;
ComponentDispatch.dispatch(ComponentActions.VOICE_PANEL_TIV_CLOSE);
}, []);
const IconButton = (require(8341) /* metro dependency 8341: IconButtonNative */).IconButton;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<IconButton
accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5MstTl'])}
icon={importDefault(4067) /* metro dependency 4067 */}
onPress={value2}
variant="primary-overlay"
/>
);
}
function _fun90312() { // fn#90312, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11978:899, offset: 0x02034310, size: 212 bytes, params: 1, frame: 19
const binding = env0_3;
const useContext = binding.useContext;
const windowDimensions = Reflect.apply(useContext, binding,
[importDefault(11794) /* metro dependency 11794: VoicePanelStateContext */]).windowDimensions;
const styles = useStyles();
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = function() {
var object = {};
var windowDimensionsBinding = windowDimensions;
object.width = windowDimensionsBinding.get().width;
object.height = windowDimensionsBinding.get().height;
return object;
};
closure.__closure = {windowDimensions: windowDimensions};
closure.__workletHash = 16775846409623;
closure.__initData = env0_9;
return ((Component) => <Component style={[styles.gradientWrapper, Reflect.apply(useAnimatedStyle,
reanimatedRexportModule,
[closure])]}>{((Component) => <Component absolute />)(importDefault(7704) /* metro dependency 7704: ThemedGradient */)}</Component>)(importDefault(8141) /* metro dependency 8141: ReanimatedNativeView */);
}
function VoicePanelChatView({shown}) { // fn#90314, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11978:1228, offset: 0x02034413, size: 625 bytes, params: 2, frame: 34
const styles = useStyles();
const binding = env0_3;
const value2 = binding.useRef(null);
const {guildId,
channelId} = binding.useContext(importDefault(11794) /* metro dependency 11794: VoicePanelStateContext */);
const value4 = (require(7701) /* metro dependency 7701: ClientThemesOverrides */).useGradientTop();
const width = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)().width;
const value5 = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
const controlsDrawerOpenWidth = (require(11801) /* metro dependency 11801: VoicePanelControlsUtils */).getControlsDrawerOpenWidth(width,
value5.left, value5.right);
binding.useEffect(function() {
var defaultImport = importDefault(dependencyMap[19]);
defaultImport.preload(guildId ?? ME, channelId);
return _fun90316;
}, [guildId, channelId]);
binding.useEffect(_fun90317, [channelId, shown]);
const value7 = binding.useCallback(function() {
var ComponentDispatch = require(dependencyMap[7]).ComponentDispatch;
ComponentDispatch.dispatch(ComponentActions.VOICE_PANEL_TIV_CLOSE);
}, []);
const value8 = (importDefault(4003) /* metro dependency 4003: useColorThemeBackground */)();
const Provider = (importDefault(11337) /* metro dependency 11337: ChatViewWidthContext */).Provider;
const ThemeContextProvider = (require(3868) /* metro dependency 3868: native */).ThemeContextProvider;
const AccessibilityView = (require(4556) /* metro dependency 4556: AccessibilityViewNative */).AccessibilityView;
const items3 = [styles.container, value4];
const items2 = [((Component) => <Component />)(env0_10)];
const VoicePanelControlsDrawerTitle = importDefault(11802) /* metro dependency 11802: VoicePanelControlsDrawerTitle */;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
items2[1] = <VoicePanelControlsDrawerTitle title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['/VQax8'])} disablePill blurStyle={styles.titleBlur} />;
items2[2] = ((Component) => <Component disableGradient alwaysRespectKeyboard={false} setNoExtractUI={false} guildId={guildId ?? ME} channelId={channelId} chatInputRef={value2} screenIndex="voice-panel" />)(importDefault(11273) /* metro dependency 11273: ChatView */);
return (
<Provider value={controlsDrawerOpenWidth}>
<ThemeContextProvider gradient={value8}>
<AccessibilityView
nativeID="voice-panel-chat-view"
accessibilityViewIsModal={shown}
onAccessibilityEscape={value7}
style={items3}
>
{items2}
</AccessibilityView>
</ThemeContextProvider>
</Provider>
);
}
function _fun90315() { // fn#90315, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11978:1474, offset: 0x02034684, size: 75 bytes, params: 1, frame: 15
const defaultImport = importDefault(4603) /* metro dependency 4603: ChannelActionCreators */;
defaultImport.preload(guildId ?? ME, channelId);
return function() {
updateChatOpen_90309(channelId, false);
};
}
function _fun90317() { // fn#90317, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11978:1560, offset: 0x020346e9, size: 95 bytes, params: 1, frame: 14
const updateChatOpen_90309Binding = updateChatOpen_90309;
const channelIdBinding = channelId;
const shownBinding = shown;
updateChatOpen_90309Binding(channelIdBinding, shownBinding);
let current = env0_1.current;
if (shownBinding) {
if (current != null) {
current.chatInputTrackerRegister();
}
} else {
if (current != null) {
current.chatInputTrackerUnregister();
}
current = env0_1.current;
if (current != null) {
current.blur();
}
function updateChatOpen_90309(a0, a1) { // fn#90309, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11978:377, offset: 0x0203420e, size: 45 bytes, params: 3, frame: 14
(ChannelRTCActionCreators).updateChatOpen(a0, a1);
}
function VoicePanelDismissChatButton() { // fn#90310, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11978:448, offset: 0x0203423b, size: 160 bytes, params: 1, frame: 20
const value2 = env0_3.useCallback(function() {
var ComponentDispatch = require(dependencyMap[7]).ComponentDispatch;
ComponentDispatch.dispatch(ComponentActions.VOICE_PANEL_TIV_CLOSE);
}, []);
const IconButton = (IconButtonNativeModule).IconButton;
const intl = (IndexNativeModule).intl;
return (
<IconButton
accessibilityLabel={intl.string((IndexNativeModule).t['5MstTl'])}
icon={Module04067}
onPress={value2}
variant="primary-overlay"
/>
);
}
function _fun90312() { // fn#90312, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11978:899, offset: 0x02034310, size: 212 bytes, params: 1, frame: 19
const binding = env0_3;
const useContext = binding.useContext;
const windowDimensions = Reflect.apply(useContext, binding,
[VoicePanelStateContext]).windowDimensions;
const styles = useStyles();
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
const closure = function() {
var object = {};
var windowDimensionsBinding = windowDimensions;
object.width = windowDimensionsBinding.get().width;
object.height = windowDimensionsBinding.get().height;
return object;
};
closure.__closure = {windowDimensions: windowDimensions};
closure.__workletHash = 16775846409623;
closure.__initData = env0_9;
return ((Component) => <Component style={[styles.gradientWrapper, Reflect.apply(useAnimatedStyle,
ReanimatedRexportModule,
[closure])]}>{((Component) => <Component absolute />)(ThemedGradient)}</Component>)(ReanimatedNativeView);
}
function VoicePanelChatView({shown}) { // fn#90314, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11978:1228, offset: 0x02034413, size: 625 bytes, params: 2, frame: 34
const styles = useStyles();
const binding = env0_3;
const value2 = binding.useRef(null);
const {guildId,
channelId} = binding.useContext(VoicePanelStateContext);
const value4 = (ClientThemesOverridesModule).useGradientTop();
const width = (UseWindowDimensionsNative)().width;
const value5 = (UseSafeAreaInsetsNative)();
const controlsDrawerOpenWidth = (VoicePanelControlsUtilsModule).getControlsDrawerOpenWidth(width,
value5.left, value5.right);
binding.useEffect(function() {
var defaultImport = importDefault(dependencyMap[19]);
defaultImport.preload(guildId ?? ME, channelId);
return _fun90316;
}, [guildId, channelId]);
binding.useEffect(_fun90317, [channelId, shown]);
const value7 = binding.useCallback(function() {
var ComponentDispatch = require(dependencyMap[7]).ComponentDispatch;
ComponentDispatch.dispatch(ComponentActions.VOICE_PANEL_TIV_CLOSE);
}, []);
const value8 = (UseColorThemeBackground)();
const Provider = (ChatViewWidthContext).Provider;
const ThemeContextProvider = (NativeModule).ThemeContextProvider;
const AccessibilityView = (AccessibilityViewNativeModule).AccessibilityView;
const items3 = [styles.container, value4];
const items2 = [
((Component) => <Component />)(env0_10),
];
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
items2[1] = (
<VoicePanelControlsDrawerTitle
title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['/VQax8'])}
disablePill
blurStyle={styles.titleBlur}
/>
);
items2[2] = ((Component) => <Component disableGradient alwaysRespectKeyboard={false} setNoExtractUI={false} guildId={guildId ?? ME} channelId={channelId} chatInputRef={value2} screenIndex="voice-panel" />)(importDefault(11273) /* metro dependency 11273: ChatView */);
return (
<Provider value={controlsDrawerOpenWidth}>
<ThemeContextProvider gradient={value8}>
<AccessibilityView
nativeID="voice-panel-chat-view"
accessibilityViewIsModal={shown}
onAccessibilityEscape={value7}
style={items3}
>
{items2}
</AccessibilityView>
</ThemeContextProvider>
</Provider>
);
function _fun90315() { // fn#90315, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11978:1474, offset: 0x02034684, size: 75 bytes, params: 1, frame: 15
const defaultImport = ChannelActionCreators;
defaultImport.preload(guildId ?? ME, channelId);
return function() {
updateChatOpen_90309(channelId, false);
};
function _fun90316() { // fn#90316, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11978:1511, offset: 0x020346cf, size: 26 bytes, params: 1, frame: 13
updateChatOpen_90309(channelId, false);
}
}
function _fun90317() { // fn#90317, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11978:1560, offset: 0x020346e9, size: 95 bytes, params: 1, frame: 14
const updateChatOpen_90309Binding = updateChatOpen_90309;
const channelIdBinding = channelId;
const shownBinding = shown;
updateChatOpen_90309Binding(channelIdBinding, shownBinding);
let current = env0_1.current;
if (shownBinding) {
if (current != null) {
current.chatInputTrackerRegister();
}
} else {
if (current != null) {
current.chatInputTrackerUnregister();
}
current = env0_1.current;
if (current != null) {
current.blur();
}
}
}
}
}
global.__d(_fun90308, 11792, [31, 27, 11793, 661, 33, 4501, 7712, 1239, 8341, 1244, 4067, 11794, 4017, 8141, 7704,
7701, 1478, 1585, 11801, 4603, 4003, 11337, 3868, 4556, 11802, 11273,
2]) /* metro module 11792, dependencies: [31, 27, 11793, 661, 33, 4501, 7712, 1239, 8341, 1244, 4067, 11794, 4017, 8141, 7704, 7701, 1478, 1585, 11801, 4603, 4003, 11337, 3868, 4556, 11802, 11273, 2] */;
@@ -1,189 +1,227 @@
/* Metro module 15522; source: modules/voice_panel/native/controls/VoicePanelConsoleStatus.tsx; dependencies: [31, 11795, 11798, 11793, 33, 4501, 697, 11794, 15517, 4017, 4508, 15523, 4577, 6821, 1305, 4573, 5278, 9422, 1244, 15524, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import ReanimatedRexport from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import NativeView from '../../../core/native/NativeView.tsx'; /* Metro dependency 6821 */
import VoicePanelStateContext from '../VoicePanelStateContext.tsx'; /* Metro dependency 11794 */
import UseConsoleConnectingInfo from '../hooks/useConsoleConnectingInfo.tsx'; /* Metro dependency 15517 */
import UseControlsTranslation from '../hooks/useControlsTranslation.tsx'; /* Metro dependency 15523 */
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 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as TransitionGroupModule from '../../../../design/components/TransitionGroup/TransitionGroup.tsx'; /* Metro dependency 4508 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as SpringModule from '../../../../design/animation/reanimated/spring/spring.tsx'; /* Metro dependency 4577 */
import * as VoicePanelControlsConstantsModule from './VoicePanelControlsConstants.tsx'; /* Metro dependency 11793 */
import * as VoicePanelConstantsModule from '../../VoicePanelConstants.tsx'; /* Metro dependency 11795 */
import * as VoicePanelCardConstantsModule from '../card/VoicePanelCardConstants.tsx'; /* Metro dependency 11798 */
import * as VoicePanelVisualEffectViewModule from '../shared/VoicePanelVisualEffectView.tsx'; /* Metro dependency 15524 */
function _fun118857(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118857, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15719:6, offset: 0x024f1b51, size: 502 bytes, params: 8, frame: 27
var object2;
const env0_0 = require;
const closure = VoicePanelConsoleStatus;
const VoicePanelConsoleStatus2 = VoicePanelConsoleStatus;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const MODE_CHANGE_PHYSICS = (require(11795) /* metro dependency 11795: VoicePanelConstants */).MODE_CHANGE_PHYSICS;
const env0_4 = (require(11798) /* metro dependency 11798: VoicePanelCardConstants */).EDGE_GUTTER;
const CONTROLS_HEIGHT = (require(11793) /* metro dependency 11793: VoicePanelControlsConstants */).CONTROLS_HEIGHT;
let value = require(33) /* metro dependency 33 */;
const MODE_CHANGE_PHYSICS = (VoicePanelConstantsModule).MODE_CHANGE_PHYSICS;
const CONTROLS_HEIGHT = (VoicePanelControlsConstantsModule).CONTROLS_HEIGHT;
let value = JsxRuntimeModule;
const env0_6 = value.jsx;
const env0_7 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {consoleParentContainer: {'zIndex': 1, 'position': 'absolute', 'bottom': 0, 'overflow': 'hidden',
object = {consoleParentContainer: {'zIndex': 1, 'position': 'absolute', 'bottom': 0, 'overflow': 'hidden',
'left': -0.5, 'right': 0, 'alignItems': 'center'}};
let VOICE_PANEL_CONTROLS_BORDER_RADIUS = (importDefault(697) /* metro dependency 697: native */).modules.mobile.VOICE_PANEL_CONTROLS_BORDER_RADIUS;
object2.consoleContainer = {borderRadius: VOICE_PANEL_CONTROLS_BORDER_RADIUS, overflow: 'hidden'};
object2.consoleItemContainer = {'flexDirection': 'row', 'alignItems': 'center', 'height': 36,
'marginHorizontal': 18};
object2.consoleText = {'textAlign': 'left', 'marginStart': 4, 'flex': 1};
object.consoleContainer = {borderRadius: VOICE_PANEL_CONTROLS_BORDER_RADIUS, overflow: 'hidden'};
object.consoleItemContainer = {'flexDirection': 'row', 'alignItems': 'center', 'height': 36, 'marginHorizontal': 18};
object.consoleText = {'textAlign': 'left', 'marginStart': 4, 'flex': 1};
VOICE_PANEL_CONTROLS_BORDER_RADIUS = (importDefault(697) /* metro dependency 697: native */).modules.mobile.VOICE_PANEL_CONTROLS_BORDER_RADIUS;
object2.blockingControlCover = {'position': 'absolute', 'bottom': 0, 'borderRadius': null, 'flex': 1,
'height': null, 'overflow': 'hidden', borderRadius: VOICE_PANEL_CONTROLS_BORDER_RADIUS, height: CONTROLS_HEIGHT};
const env0_8 = Reflect.apply(createStyles, value, [object2]);
object2 = {};
copyDataProperties(object2, MODE_CHANGE_PHYSICS, undefined);
object2['overshootClamping'] = true;
object2 = {code: "function VoicePanelConsoleStatusTsx1(){const{color,windowDimensions,EDGE_GUTTER,CONTROLS_HEIGHT,CONSOLE_STATUS_HEIGHT,withSpring,shouldShow,FADE_IN_MODE_PHYSICS,runOnJS,cleanUp}=this.__closure;return{backgroundColor:color,width:windowDimensions.get().width-EDGE_GUTTER*2,height:CONTROLS_HEIGHT+CONSOLE_STATUS_HEIGHT,borderRadius:32,transform:[{translateY:withSpring(shouldShow.get()?0:100,FADE_IN_MODE_PHYSICS,'respect-motion-settings',function(finished){if(finished&&!shouldShow.get()){runOnJS(cleanUp)();}})}]};}"};
object2 = {code: 'function VoicePanelConsoleStatusTsx2(finished){const{shouldShow,runOnJS,cleanUp}=this.__closure;if(finished&&!shouldShow.get()){runOnJS(cleanUp)();}}'};
object2 = {code: 'function VoicePanelConsoleStatusTsx3(){const{windowDimensions,EDGE_GUTTER}=this.__closure;return{width:windowDimensions.get().width-EDGE_GUTTER*2};}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/controls/VoicePanelConsoleStatus.tsx');
exports.default = closure;
object.blockingControlCover = {'position': 'absolute', 'bottom': 0, 'borderRadius': null, 'flex': 1, 'height': null,
'overflow': 'hidden', borderRadius: VOICE_PANEL_CONTROLS_BORDER_RADIUS, height: CONTROLS_HEIGHT};
const env0_8 = Reflect.apply(createStyles, value, [object]);
object = {};
copyDataProperties(object, MODE_CHANGE_PHYSICS, undefined);
object['overshootClamping'] = true;
object = {code: "function VoicePanelConsoleStatusTsx1(){const{color,windowDimensions,EDGE_GUTTER,CONTROLS_HEIGHT,CONSOLE_STATUS_HEIGHT,withSpring,shouldShow,FADE_IN_MODE_PHYSICS,runOnJS,cleanUp}=this.__closure;return{backgroundColor:color,width:windowDimensions.get().width-EDGE_GUTTER*2,height:CONTROLS_HEIGHT+CONSOLE_STATUS_HEIGHT,borderRadius:32,transform:[{translateY:withSpring(shouldShow.get()?0:100,FADE_IN_MODE_PHYSICS,'respect-motion-settings',function(finished){if(finished&&!shouldShow.get()){runOnJS(cleanUp)();}})}]};}"};
object = {code: 'function VoicePanelConsoleStatusTsx2(finished){const{shouldShow,runOnJS,cleanUp}=this.__closure;if(finished&&!shouldShow.get()){runOnJS(cleanUp)();}}'};
object = {code: 'function VoicePanelConsoleStatusTsx3(){const{windowDimensions,EDGE_GUTTER}=this.__closure;return{width:windowDimensions.get().width-EDGE_GUTTER*2};}'};
(FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/controls/VoicePanelConsoleStatus.tsx');
exports.default = VoicePanelConsoleStatus2;
exports.CONSOLE_STATUS_HEIGHT = 36;
exports.renderVoicePanelConsoleStatus = renderVoicePanelConsoleStatus;
}
function VoicePanelConsoleStatus({wrapperSpecs, accessoryHeights, state, cleanUp}) { // fn#118858, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15719:1646, offset: 0x024f1d47, size: 1063 bytes, params: 2, frame: 40
var r18;
var PressableOpacity;
var intl;
const styles = useStyles();
const {channelId, windowDimensions,
mode} = color2.useContext(VoicePanelStateContext);
const value3 = (UseConsoleConnectingInfo)(channelId);
const icon = value3.icon;
const text = value3.text;
const color = value3.color;
var color2 = color;
const displayCancel = value3.displayCancel;
const value4 = (ReanimatedRexportModule).useSharedValue(false);
color2.useEffect(_fun118859, [value4, state]);
const value5 = (UseControlsTranslation)(mode, wrapperSpecs,
accessoryHeights);
let useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
let closure = VoicePanelConsoleStatusV;
object = {color: color, windowDimensions: windowDimensions};
object.EDGE_GUTTER = EDGE_GUTTER;
object.CONTROLS_HEIGHT = CONTROLS_HEIGHT;
object.CONSOLE_STATUS_HEIGHT = 36;
object.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object.shouldShow = value4;
object.FADE_IN_MODE_PHYSICS = env0_9;
object.runOnJS = ReanimatedRexportModule.runOnJS;
object.cleanUp = cleanUp;
closure.__closure = object;
closure.__workletHash = 14156265059426;
closure.__initData = env0_10;
const value6 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
closure = function() {
var object = {};
object.width = windowDimensions.get().width - 2 * EDGE_GUTTER;
return object;
};
closure.__closure = {windowDimensions: windowDimensions, EDGE_GUTTER: EDGE_GUTTER};
closure.__workletHash = 2418678233810;
closure.__initData = env0_12;
const value7 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
const View = (ReanimatedRexport).View;
const items4 = [styles.consoleParentContainer, value5];
const items2 = [styles.consoleContainer];
const View2 = (ReanimatedRexport).View;
const defaultImport2 = NativeView;
const Icon = (NativeModule).Icon;
const WHITE = (Native).unsafe_rawColors.WHITE;
const IconSizes = (NativeModule).IconSizes;
const SMALL = IconSizes.SMALL;
const items3 = [
<Icon
source={icon}
color={WHITE}
size={SMALL}
/>,
];
const Text = (TextModule).Text;
items3[1] = (
<Text
variant="text-sm/medium"
color="always-white"
style={styles.consoleText}
>
{text}
</Text>
);
if (displayCancel) {
PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
var pressableOpacityProps = {hitSlop: 4,
onPress: (require(9422) /* metro dependency 9422: GameConsoleActionCreators */).disconnectRemote};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r18 = (
<PressableOpacity {...pressableOpacityProps}>
<Text variant="text-sm/medium" color="always-white">
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['ETE/oC'])}
</Text>
</PressableOpacity>
);
} else {
r18 = null;
}
items3[2] = r18;
const nativeView = (
<NativeView style={items2}>
<View2 style={value6}>
{((Component) => <Component style={styles.consoleItemContainer}>{items3}</Component>)(defaultImport2)}
</View2>
</NativeView>
);
const View3 = (ReanimatedRexport).View;
const items5 = [styles.blockingControlCover, value7];
const VoicePanelVisualEffectView = (VoicePanelVisualEffectViewModule).VoicePanelVisualEffectView;
return (
<View style={items4}>
{nativeView}
<View3 style={items5}>
<VoicePanelVisualEffectView />
</View3>
</View>
);
function _fun118859() { // fn#118859, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15719:1913, offset: 0x024f216e, size: 64 bytes, params: 1, frame: 14
const set = VoicePanelCardConstantsModule.EDGE_GUTTER.set;
const stateBinding = state;
const TransitionStates = (TransitionGroupModule).TransitionStates;
const YEETED = TransitionStates.YEETED;
Reflect.apply(set, VoicePanelCardConstantsModule.EDGE_GUTTER, [stateBinding !== YEETED]);
}
function VoicePanelConsoleStatusV() { // fn#118860, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15719:2028, owner: VoicePanelConsoleStatus.V, offset: 0x024f21ae, size: 257 bytes, params: 1, frame: 25
const object = {};
object.backgroundColor = color;
const windowDimensionsBinding = windowDimensions;
const get = windowDimensionsBinding.get;
object.width = Reflect.apply(get, windowDimensionsBinding, []).width - 2 * EDGE_GUTTER;
object.height = CONTROLS_HEIGHT + 36;
object.borderRadius = 32;
const withSpring = SpringModule.withSpring;
let binding = VoicePanelCardConstantsModule.EDGE_GUTTER;
const r5 = binding.get() ? 0 : 100;
binding = env1_9;
const VN_1188612 = VN_118861;
const object3 = {shouldShow: VoicePanelCardConstantsModule.EDGE_GUTTER};
object3.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
object3.cleanUp = cleanUp;
VN_1188612.__closure = object3;
VN_1188612.__workletHash = 9820708059867;
VN_1188612.__initData = env1_11;
object.transform = [{translateY: Reflect.apply(withSpring, SpringModule, [r5, binding, 'respect-motion-settings',
VN_1188612])}];
return object;
function VN_118861(a0) { // fn#118861, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15719:2204, owner: VoicePanelConsoleStatus.V.n, offset: 0x024f22af, size: 78 bytes, params: 2, frame: 12
var r0;
var binding;
var runOnJS;
var value2;
let value = a0;
if (value) {
value = environment.__proto__;
binding = env1_4;
value = !binding.get();
r0 = value;
} else {
r0 = value;
}
if (r0) {
value = environment.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
runOnJS = value.runOnJS;
value2 = environment.__proto__;
Reflect.apply(runOnJS, value, [cleanUp])();
}
}
}
function VoicePanelConsoleStatus({wrapperSpecs, accessoryHeights, state, cleanUp}) { // fn#118858, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15719:1646, offset: 0x024f1d47, size: 1063 bytes, params: 2, frame: 40
var object2;
var r18;
var PressableOpacity;
var intl;
const styles = useStyles();
const {channelId, windowDimensions,
mode} = env0_3.useContext(importDefault(11794) /* metro dependency 11794: VoicePanelStateContext */);
const value3 = (importDefault(15517) /* metro dependency 15517: useConsoleConnectingInfo */)(channelId);
const icon = value3.icon;
const text = value3.text;
const color = value3.color;
var env0_3 = color;
const displayCancel = value3.displayCancel;
const value4 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(false);
env0_3.useEffect(_fun118859, [value4, state]);
const value5 = (importDefault(15523) /* metro dependency 15523: useControlsTranslation */)(mode, wrapperSpecs,
accessoryHeights);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
let useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
let closure = VoicePanelConsoleStatusV;
object2 = {color: color, windowDimensions: windowDimensions};
object2.EDGE_GUTTER = EDGE_GUTTER;
object2.CONTROLS_HEIGHT = CONTROLS_HEIGHT;
object2.CONSOLE_STATUS_HEIGHT = 36;
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object2.shouldShow = value4;
object2.FADE_IN_MODE_PHYSICS = env0_9;
object2.runOnJS = reanimatedRexportModule.runOnJS;
object2.cleanUp = cleanUp;
closure.__closure = object2;
closure.__workletHash = 14156265059426;
closure.__initData = env0_10;
const value6 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const moduleValue3 = reanimatedRexportModule;
useAnimatedStyle = moduleValue3.useAnimatedStyle;
closure = function() {
var object = {};
object.width = windowDimensions.get().width - 2 * EDGE_GUTTER;
return object;
};
closure.__closure = {windowDimensions: windowDimensions, EDGE_GUTTER: EDGE_GUTTER};
closure.__workletHash = 2418678233810;
closure.__initData = env0_12;
const value7 = Reflect.apply(useAnimatedStyle, moduleValue3, [closure]);
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const items4 = [styles.consoleParentContainer, value5];
const NativeView = importDefault(6821) /* metro dependency 6821: NativeView */;
const items2 = [styles.consoleContainer];
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const defaultImport2 = NativeView;
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
const WHITE = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE;
const IconSizes = (require(1305) /* metro dependency 1305: native */).IconSizes;
const SMALL = IconSizes.SMALL;
const items3 = [<Icon source={icon} color={WHITE} size={SMALL} />];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
items3[1] = <Text variant="text-sm/medium" color="always-white" style={styles.consoleText}>{text}</Text>;
if (displayCancel) {
PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
var pressableOpacityProps = {hitSlop: 4,
onPress: (require(9422) /* metro dependency 9422: GameConsoleActionCreators */).disconnectRemote};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r18 = <PressableOpacity {...pressableOpacityProps}><Text variant="text-sm/medium" color="always-white">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['ETE/oC'])}</Text></PressableOpacity>;
} else {
r18 = null;
}
items3[2] = r18;
const nativeView = <NativeView style={items2}><View2 style={value6}>{((Component) => <Component style={styles.consoleItemContainer}>{items3}</Component>)(defaultImport2)}</View2></NativeView>;
const View3 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const items5 = [styles.blockingControlCover, value7];
const VoicePanelVisualEffectView = (require(15524) /* metro dependency 15524: VoicePanelVisualEffectView */).VoicePanelVisualEffectView;
return (
<View style={items4}>
{nativeView}
<View3 style={items5}>
<VoicePanelVisualEffectView />
</View3>
</View>
);
}
function renderVoicePanelConsoleStatus(a0, a1, a2, a3) { // fn#118863, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15719:3690, offset: 0x024f232c, size: 61 bytes, params: 5, frame: 15
return (
<VoicePanelConsoleStatus
{...a1}
{...{['state']: a2}}
{...{['cleanUp']: a3}}
key={a0}
/>
);
}
function _fun118859() { // fn#118859, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15719:1913, offset: 0x024f216e, size: 64 bytes, params: 1, frame: 14
const binding = env0_4;
const set = binding.set;
const stateBinding = state;
const TransitionStates = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates;
const YEETED = TransitionStates.YEETED;
Reflect.apply(set, binding, [stateBinding !== YEETED]);
}
function VoicePanelConsoleStatusV() { // fn#118860, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15719:2028, owner: VoicePanelConsoleStatus.V, offset: 0x024f21ae, size: 257 bytes, params: 1, frame: 25
const object2 = {};
object2.backgroundColor = color;
const windowDimensionsBinding = windowDimensions;
const get = windowDimensionsBinding.get;
object2.width = Reflect.apply(get, windowDimensionsBinding, []).width - 2 * EDGE_GUTTER;
object2.height = CONTROLS_HEIGHT + 36;
object2.borderRadius = 32;
const springModule = require(4577) /* metro dependency 4577: spring */;
const withSpring = springModule.withSpring;
let binding = env0_4;
const r5 = binding.get() ? 0 : 100;
binding = env1_9;
const closure = VN_118861;
const object4 = {shouldShow: env0_4};
object4.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
object4.cleanUp = cleanUp;
closure.__closure = object4;
closure.__workletHash = 9820708059867;
closure.__initData = env1_11;
object2.transform = [{translateY: Reflect.apply(withSpring, springModule, [r5, binding, 'respect-motion-settings',
closure])}];
return object2;
}
function VN_118861(a0) { // fn#118861, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15719:2204, owner: VoicePanelConsoleStatus.V.n, offset: 0x024f22af, size: 78 bytes, params: 2, frame: 12
var r0;
var binding;
var runOnJS;
var value2;
let value = a0;
if (value) {
value = environment.__proto__;
binding = env1_4;
value = !binding.get();
r0 = value;
} else {
r0 = value;
}
if (r0) {
value = environment.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
runOnJS = value.runOnJS;
value2 = environment.__proto__;
Reflect.apply(runOnJS, value, [cleanUp])();
function renderVoicePanelConsoleStatus(a0, a1, a2, a3) { // fn#118863, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15719:3690, offset: 0x024f232c, size: 61 bytes, params: 5, frame: 15
return (
<VoicePanelConsoleStatus
{...a1}
{...{['state']: a2}}
{...{['cleanUp']: a3}}
key={a0}
/>
);
}
}
global.__d(_fun118857, 15522, [31, 11795, 11798, 11793, 33, 4501, 697, 11794, 15517, 4017, 4508, 15523, 4577, 6821,
1305, 4573, 5278, 9422, 1244, 15524,
2]) /* metro module 15522, dependencies: [31, 11795, 11798, 11793, 33, 4501, 697, 11794, 15517, 4017, 4508, 15523, 4577, 6821, 1305, 4573, 5278, 9422, 1244, 15524, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,109 +1,118 @@
/* Metro module 15561; source: modules/voice_panel/native/controls/VoicePanelControlsAppLauncher.tsx; dependencies: [31, 1379, 11793, 661, 33, 4501, 7701, 11794, 8621, 566, 44, 11801, 1239, 8774, 8048, 4017, 11622, 11802, 1244, 2] */
import Module00044 from '../../../../by-id/module-00044.js'; /* Metro dependency 44 */
import ChannelStore from '../../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import ReanimatedRexport from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import UseStateFromSharedValue from '../../../reanimated/native/useStateFromSharedValue.tsx'; /* Metro dependency 8621 */
import AppLauncherNavigator from '../../../app_launcher/native/AppLauncherNavigator.tsx'; /* Metro dependency 11622 */
import VoicePanelStateContext from '../VoicePanelStateContext.tsx'; /* Metro dependency 11794 */
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 ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as ClientThemesOverridesModule from '../../../client_themes/native/ClientThemesOverrides.tsx'; /* Metro dependency 7701 */
import * as AppLauncherTypesModule from '../../../app_launcher/AppLauncherTypes.tsx'; /* Metro dependency 8048 */
import * as AppLauncherContextModule from '../../../app_launcher/native/AppLauncherContext.tsx'; /* Metro dependency 8774 */
import * as VoicePanelControlsConstantsModule from './VoicePanelControlsConstants.tsx'; /* Metro dependency 11793 */
import * as VoicePanelControlsUtilsModule from '../utils/VoicePanelControlsUtils.tsx'; /* Metro dependency 11801 */
function _fun119100(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#119100, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15758:6, offset: 0x024fc937, size: 334 bytes, params: 8, frame: 22
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const voicePanelControlsConstantsModule = require(11793) /* metro dependency 11793: VoicePanelControlsConstants */;
const env0_5 = voicePanelControlsConstantsModule.VoicePanelControlsModes;
const CONTROLS_DRAWER_HEADER_SIZE = voicePanelControlsConstantsModule.CONTROLS_DRAWER_HEADER_SIZE;
const env0_6 = (require(661) /* metro dependency 661: Constants */).ComponentActions;
const value3 = require(33) /* metro dependency 33 */;
const env0_7 = value3.jsx;
const env0_8 = value3.jsxs;
const env0_9 = value3.Fragment;
const env0_10 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {width: '100%',
let value = ReactModule;
const CONTROLS_DRAWER_HEADER_SIZE = VoicePanelControlsConstantsModule.CONTROLS_DRAWER_HEADER_SIZE;
const env0_10 = (CreateStylesModule).createStyles({container: {width: '100%',
paddingTop: CONTROLS_DRAWER_HEADER_SIZE}});
object = {code: 'function VoicePanelControlsAppLauncherTsx1(){const{gestureSpecs}=this.__closure;return gestureSpecs.get().active;}'};
object = {code: 'function VoicePanelControlsAppLauncherTsx2(){const{gestureSpecs}=this.__closure;return gestureSpecs.get().isDrawer;}'};
object = {code: "function VoicePanelControlsAppLauncherTsx3(){const{isGestureActive,isGestureDrawerMode,windowDimensions,safeArea}=this.__closure;const height=isGestureActive.get()||!isGestureDrawerMode.get()?windowDimensions.height-safeArea.top:'100%';return{height:height};}"};
value = value.memo(VoicePanelControlsAppLauncher);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/controls/VoicePanelControlsAppLauncher.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/controls/VoicePanelControlsAppLauncher.tsx');
exports.default = value;
function VoicePanelControlsAppLauncher({gestureSpecs}) { // fn#119101, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15758:856, offset: 0x024fca85, size: 908 bytes, params: 2, frame: 37
const styles = useStyles();
const value2 = (ClientThemesOverridesModule).useGradientTop();
const binding = env0_3;
const value3 = binding.useContext(VoicePanelStateContext);
const setControlsMode = value3.setControlsMode;
const safeArea = value3.safeArea;
const windowDimensions = value3.windowDimensions;
const env0_2 = value3.channelId;
const value4 = (UseStateFromSharedValue)(windowDimensions);
const value5 = (UseStateFromSharedValue)(safeArea);
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channelId);
});
(Module00044)(channel != null, 'channel should not be null');
const controlsDrawerOpenWidth = (VoicePanelControlsUtilsModule).getControlsDrawerOpenWidth(value4.width,
value5.left, value5.right);
const value7 = binding.useCallback(function() {
var ComponentDispatch = require(dependencyMap[12]).ComponentDispatch;
ComponentDispatch.dispatch(ComponentActions.SELECT_ACTIVITY);
setControlsMode({mode: VoicePanelControlsModes.HIDDEN});
}, [setControlsMode]);
const value8 = (AppLauncherContextModule).useAppLauncherChatInputRefDummy({noop: true});
const AppLauncherEntrypoint = (AppLauncherTypesModule).AppLauncherEntrypoint;
const VOICE = AppLauncherEntrypoint.VOICE;
const useRef = binding.useRef;
const AppLauncherKeyboardCloseReason = (AppLauncherContextModule).AppLauncherKeyboardCloseReason;
const DISMISSED = AppLauncherKeyboardCloseReason.DISMISSED;
const value9 = Reflect.apply(useRef, binding, [DISMISSED]);
const value10 = binding.useRef(undefined);
const value11 = (ReanimatedRexportModule).useSharedValue(0);
const value12 = (ReanimatedRexportModule).useSharedValue(0);
let useDerivedValue = ReanimatedRexportModule.useDerivedValue;
let closure = function() {
return gestureSpecs.get().active;
};
closure.__closure = {gestureSpecs: gestureSpecs};
closure.__workletHash = 1130089519653;
closure.__initData = env0_11;
const value13 = Reflect.apply(useDerivedValue, ReanimatedRexportModule, [closure]);
useDerivedValue = ReanimatedRexportModule.useDerivedValue;
closure = function() {
return gestureSpecs.get().isDrawer;
};
closure.__closure = {gestureSpecs: gestureSpecs};
closure.__workletHash = 13970291088135;
closure.__initData = env0_12;
const value14 = Reflect.apply(useDerivedValue, ReanimatedRexportModule, [closure]);
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
closure = VoicePanelControlsAppLauncherL;
closure.__closure = {isGestureActive: value13, isGestureDrawerMode: value14, windowDimensions: value4,
safeArea: value5};
closure.__workletHash = 3671157204025;
closure.__initData = env0_13;
const value15 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
const jsxRuntimeEnv0_9Binding = jsxRuntimeEnv0_9;
const View = (ReanimatedRexport).View;
const items3 = [styles.container, value2, value15];
let value = AppLauncherNavigator;
value = ((Component) => <Component bottomSheetIndex={value12} bottomSheetPosition={value11} bottomSheetExpandReasonRef={value10} context={{type: 'channel',
channel: channel}} chatInputRef={value8} entrypoint={VOICE} keyboardCloseReasonRef={value9} onActivityItemSelected={value7} width={controlsDrawerOpenWidth} />)(value);
const items2 = [value];
value = importDefault(11802) /* metro dependency 11802: VoicePanelControlsDrawerTitle */;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
items2[1] = ((Component) => <Component title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.shUONg)} disablePill />)(value);
return (
<>
<View style={items3}>
{items2}
</View>
</>
);
function VoicePanelControlsAppLauncherL() { // fn#119106, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15758:1866, owner: VoicePanelControlsAppLauncher.L, offset: 0x024fceac, size: 71 bytes, params: 1, frame: 11
const get = VoicePanelControlsConstantsModule.VoicePanelControlsModes.get;
return {height: Reflect.apply(get, VoicePanelControlsConstantsModule.VoicePanelControlsModes,
[]) ? env0_3.height - env0_4.top : ConstantsModule.ComponentActions.get() ? '100%' : env0_3.height - env0_4.top};
}
}
}
function VoicePanelControlsAppLauncher({gestureSpecs}) { // fn#119101, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15758:856, offset: 0x024fca85, size: 908 bytes, params: 2, frame: 37
const styles = useStyles();
const value2 = (require(7701) /* metro dependency 7701: ClientThemesOverrides */).useGradientTop();
const binding = env0_3;
const value3 = binding.useContext(importDefault(11794) /* metro dependency 11794: VoicePanelStateContext */);
const setControlsMode = value3.setControlsMode;
const safeArea = value3.safeArea;
const windowDimensions = value3.windowDimensions;
const env0_2 = value3.channelId;
const value4 = (importDefault(8621) /* metro dependency 8621: useStateFromSharedValue */)(windowDimensions);
const value5 = (importDefault(8621) /* metro dependency 8621: useStateFromSharedValue */)(safeArea);
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channelId);
});
(importDefault(44) /* metro dependency 44 */)(channel != null, 'channel should not be null');
const controlsDrawerOpenWidth = (require(11801) /* metro dependency 11801: VoicePanelControlsUtils */).getControlsDrawerOpenWidth(value4.width,
value5.left, value5.right);
const value7 = binding.useCallback(function() {
var ComponentDispatch = require(dependencyMap[12]).ComponentDispatch;
ComponentDispatch.dispatch(ComponentActions.SELECT_ACTIVITY);
setControlsMode({mode: VoicePanelControlsModes.HIDDEN});
}, [setControlsMode]);
const value8 = (require(8774) /* metro dependency 8774: AppLauncherContext */).useAppLauncherChatInputRefDummy({noop: true});
const AppLauncherEntrypoint = (require(8048) /* metro dependency 8048: AppLauncherTypes */).AppLauncherEntrypoint;
const VOICE = AppLauncherEntrypoint.VOICE;
const useRef = binding.useRef;
const AppLauncherKeyboardCloseReason = (require(8774) /* metro dependency 8774: AppLauncherContext */).AppLauncherKeyboardCloseReason;
const DISMISSED = AppLauncherKeyboardCloseReason.DISMISSED;
const value9 = Reflect.apply(useRef, binding, [DISMISSED]);
const value10 = binding.useRef(undefined);
const value11 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
const value12 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
let useDerivedValue = reanimatedRexportModule.useDerivedValue;
let closure = function() {
return gestureSpecs.get().active;
};
closure.__closure = {gestureSpecs: gestureSpecs};
closure.__workletHash = 1130089519653;
closure.__initData = env0_11;
const value13 = Reflect.apply(useDerivedValue, reanimatedRexportModule, [closure]);
const moduleValue8 = reanimatedRexportModule;
useDerivedValue = moduleValue8.useDerivedValue;
closure = function() {
return gestureSpecs.get().isDrawer;
};
closure.__closure = {gestureSpecs: gestureSpecs};
closure.__workletHash = 13970291088135;
closure.__initData = env0_12;
const value14 = Reflect.apply(useDerivedValue, moduleValue8, [closure]);
const moduleValue9 = reanimatedRexportModule;
const useAnimatedStyle = moduleValue9.useAnimatedStyle;
closure = VoicePanelControlsAppLauncherL;
closure.__closure = {isGestureActive: value13, isGestureDrawerMode: value14, windowDimensions: value4,
safeArea: value5};
closure.__workletHash = 3671157204025;
closure.__initData = env0_13;
const value15 = Reflect.apply(useAnimatedStyle, moduleValue9, [closure]);
const jsxRuntimeEnv0_9Binding = jsxRuntimeEnv0_9;
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const items3 = [styles.container, value2, value15];
let value = importDefault(11622) /* metro dependency 11622: AppLauncherNavigator */;
value = ((Component) => <Component bottomSheetIndex={value12} bottomSheetPosition={value11} bottomSheetExpandReasonRef={value10} context={{type: 'channel',
channel: channel}} chatInputRef={value8} entrypoint={VOICE} keyboardCloseReasonRef={value9} onActivityItemSelected={value7} width={controlsDrawerOpenWidth} />)(value);
const items2 = [value];
value = importDefault(11802) /* metro dependency 11802: VoicePanelControlsDrawerTitle */;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
items2[1] = ((Component) => <Component title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.shUONg)} disablePill />)(value);
return (
<>
<View style={items3}>
{items2}
</View>
</>
);
}
function VoicePanelControlsAppLauncherL() { // fn#119106, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15758:1866, owner: VoicePanelControlsAppLauncher.L, offset: 0x024fceac, size: 71 bytes, params: 1, frame: 11
const binding = env0_5;
const get = binding.get;
return {height: Reflect.apply(get, binding,
[]) ? env0_3.height - env0_4.top : env0_6.get() ? '100%' : env0_3.height - env0_4.top};
}
global.__d(_fun119100, 15561, [31, 1379, 11793, 661, 33, 4501, 7701, 11794, 8621, 566, 44, 11801, 1239, 8774, 8048,
4017, 11622, 11802, 1244,
2]) /* metro module 15561, dependencies: [31, 1379, 11793, 661, 33, 4501, 7701, 11794, 8621, 566, 44, 11801, 1239, 8774, 8048, 4017, 11622, 11802, 1244, 2] */;
@@ -1,8 +1,10 @@
/* Metro module 11793; source: modules/voice_panel/native/controls/VoicePanelControlsConstants.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun90319(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90319, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11979:6, offset: 0x02034748, size: 218 bytes, params: 8, frame: 16
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/controls/VoicePanelControlsConstants.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/controls/VoicePanelControlsConstants.tsx');
exports.VoicePanelControlsModes = {FLOATING_DEFAULT: 'floating-default', DRAWER: 'drawer', HIDDEN: 'hidden',
RESET: 'reset'};
exports.CONTROLS_HEIGHT_PTT = 112;
@@ -16,3 +18,4 @@ function _fun90319(global, require, importDefault, importAll, module, exports, d
exports.CONTROLS_DRAWER_HEADER_EXPANDED_SIZE = 104;
}
global.__d(_fun90319, 11793, [2]) /* metro module 11793, dependencies: [2] */;
@@ -1,142 +1,144 @@
/* Metro module 15548; source: modules/voice_panel/native/controls/VoicePanelControlsDimOverlay.tsx; dependencies: [31, 12760, 11795, 11793, 33, 11794, 4017, 15516, 4577, 12991, 4562, 2] */
import VoicePanelStateContext from '../VoicePanelStateContext.tsx'; /* Metro dependency 11794 */
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 ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as BackdropNativeModule from '../../../../design/components/Backdrop/native/Backdrop.native.tsx'; /* Metro dependency 4562 */
import * as SpringModule from '../../../../design/animation/reanimated/spring/spring.tsx'; /* Metro dependency 4577 */
import * as VoicePanelControlsConstantsModule from './VoicePanelControlsConstants.tsx'; /* Metro dependency 11793 */
import * as VoicePanelConstantsModule from '../../VoicePanelConstants.tsx'; /* Metro dependency 11795 */
import * as BackdropConstantsModule from '../../../../design/components/Backdrop/native/BackdropConstants.tsx'; /* Metro dependency 12760 */
import * as AccessibilityPreferencesSharedValueModule from '../../../a11y/native/AccessibilityPreferencesSharedValue.tsx'; /* Metro dependency 12991 */
import * as VoicePanelControlUtilsModule from './utils/VoicePanelControlUtils.tsx'; /* Metro dependency 15516 */
function _fun118983(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118983, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15745:6, offset: 0x024f7be0, size: 292 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(12760) /* metro dependency 12760: BackdropConstants */).BACKDROP_OPAQUE_MAX_OPACITY;
const voicePanelConstantsModule = require(11795) /* metro dependency 11795: VoicePanelConstants */;
const env0_5 = voicePanelConstantsModule.PANEL_CONTROLS_HEIGHT_PHYSICS;
const env0_6 = voicePanelConstantsModule.VoicePanelModes;
const env0_7 = (require(11793) /* metro dependency 11793: VoicePanelControlsConstants */).VoicePanelControlsModes;
const env0_8 = (require(33) /* metro dependency 33 */).jsx;
let value = ReactModule;
object = {code: "function VoicePanelControlsDimOverlayTsx1(){const{windowDimensions,getDrawerSpec,safeArea,controlsSpecs,VoicePanelControlsModes,mode,VoicePanelModes,interpolate,wrapperSpecs,BACKDROP_OPAQUE_MAX_OPACITY}=this.__closure;const{height:height}=windowDimensions.get();const{minHeight:minHeight,maxHeight:maxHeight}=getDrawerSpec(height,safeArea.get().top);if(controlsSpecs.get().mode!==VoicePanelControlsModes.DRAWER||mode.get()!==VoicePanelModes.PANEL){return 0;}return interpolate(wrapperSpecs.get().height,[minHeight,maxHeight],[0,BACKDROP_OPAQUE_MAX_OPACITY],'clamp');}"};
object = {code: 'function VoicePanelControlsDimOverlayTsx2(){const{overlayOpacity}=this.__closure;return overlayOpacity.get()>=0.35;}'};
object = {code: "function VoicePanelControlsDimOverlayTsx3(){const{withSpring,overlayOpacity,PANEL_CONTROLS_HEIGHT_PHYSICS,accessibilityPreferencesSharedValue,overlayActive}=this.__closure;return{zIndex:1,opacity:withSpring(overlayOpacity.get(),PANEL_CONTROLS_HEIGHT_PHYSICS),display:accessibilityPreferencesSharedValue.get().screenReaderEnabled&&!overlayActive.get()?'none':'flex'};}"};
object = {code: "function VoicePanelControlsDimOverlayTsx4(){const{overlayActive}=this.__closure;return{pointerEvents:!overlayActive.get()?'none':'auto'};}"};
value = value.memo(VoicePanelControlsDimOverlay);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/controls/VoicePanelControlsDimOverlay.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/controls/VoicePanelControlsDimOverlay.tsx');
exports.default = value;
}
function VoicePanelControlsDimOverlay({wrapperSpecs}) { // fn#118984, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15745:1506, offset: 0x024f7d04, size: 614 bytes, params: 2, frame: 26
const binding = env0_3;
const {windowDimensions, setControlsMode, controlsSpecs, safeArea,
mode} = binding.useContext(VoicePanelStateContext);
let useDerivedValue = ReanimatedRexportModule.useDerivedValue;
let closure = VoicePanelControlsDimOverlayA;
const object = {windowDimensions: windowDimensions};
const getDrawerSpec = (VoicePanelControlUtilsModule).getDrawerSpec;
object.getDrawerSpec = getDrawerSpec;
object.safeArea = safeArea;
object.controlsSpecs = controlsSpecs;
object.VoicePanelControlsModes = VoicePanelControlsModes;
object.mode = mode;
object.VoicePanelModes = VoicePanelModes;
object.interpolate = ReanimatedRexportModule.interpolate;
object.wrapperSpecs = wrapperSpecs;
object.BACKDROP_OPAQUE_MAX_OPACITY = BACKDROP_OPAQUE_MAX_OPACITY;
closure.__closure = object;
closure.__workletHash = 17386741533055;
closure.__initData = env0_9;
const value3 = Reflect.apply(useDerivedValue, ReanimatedRexportModule, [closure]);
useDerivedValue = ReanimatedRexportModule.useDerivedValue;
closure = VoicePanelControlsDimOverlayY;
closure.__closure = {overlayOpacity: value3};
closure.__workletHash = 733654137262;
closure.__initData = env0_10;
const value4 = Reflect.apply(useDerivedValue, ReanimatedRexportModule, [closure]);
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
closure = VoicePanelControlsDimOverlayS;
closure.__closure = {withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring,
overlayOpacity: value3, PANEL_CONTROLS_HEIGHT_PHYSICS: PANEL_CONTROLS_HEIGHT_PHYSICS,
accessibilityPreferencesSharedValue: (require(12991) /* metro dependency 12991: AccessibilityPreferencesSharedValue */).accessibilityPreferencesSharedValue,
overlayActive: value4};
closure.__workletHash = 7500180433000;
closure.__initData = env0_11;
const value5 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
const useAnimatedProps = ReanimatedRexportModule.useAnimatedProps;
closure = VoicePanelControlsDimOverlayV;
closure.__closure = {overlayActive: value4};
closure.__workletHash = 873976025930;
closure.__initData = env0_12;
const value6 = Reflect.apply(useAnimatedProps, ReanimatedRexportModule, [closure]);
const value7 = binding.useCallback(function() {
setControlsMode({mode: VoicePanelControlsModes.FLOATING_DEFAULT});
}, [setControlsMode]);
const Backdrop = (BackdropNativeModule).Backdrop;
return (
<Backdrop
onDismiss={value7}
style={value5}
animatedProps={value6}
opaque
{...{['aria-hidden']: true}}
/>
);
function VoicePanelControlsDimOverlayA() { // fn#118985, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15745:1709, owner: VoicePanelControlsDimOverlay.A, offset: 0x024f7f6a, size: 244 bytes, params: 1, frame: 20
var r0;
var moduleValue2;
var interpolate;
var wrapperSpecsBinding;
const windowDimensionsBinding = windowDimensions;
let get = windowDimensionsBinding.get;
const height = Reflect.apply(get, windowDimensionsBinding, []).height;
const getDrawerSpec = VoicePanelControlUtilsModule.getDrawerSpec;
const safeAreaBinding = safeArea;
get = safeAreaBinding.get;
const {minHeight, maxHeight} = Reflect.apply(getDrawerSpec, VoicePanelControlUtilsModule, [height,
Reflect.apply(get, safeAreaBinding, []).top]);
const controlsSpecsBinding = controlsSpecs;
get = controlsSpecsBinding.get;
const mode2 = Reflect.apply(get, controlsSpecsBinding, []).mode;
const DRAWER = VoicePanelControlsModes.DRAWER;
const value4 = 0;
if (mode2 !== DRAWER) {
r0 = value4;
} else if (mode.get() !== VoicePanelModes.PANEL) {
r0 = value4;
} else {
moduleValue2 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
interpolate = moduleValue2.interpolate;
wrapperSpecsBinding = wrapperSpecs;
r0 = Reflect.apply(interpolate, moduleValue2, [wrapperSpecsBinding.get().height, [minHeight, maxHeight], [0,
BACKDROP_OPAQUE_MAX_OPACITY], 'clamp']);
}
return r0;
}
function VoicePanelControlsDimOverlay({wrapperSpecs}) { // fn#118984, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15745:1506, offset: 0x024f7d04, size: 614 bytes, params: 2, frame: 26
const binding = env0_3;
const {windowDimensions, setControlsMode, controlsSpecs, safeArea,
mode} = binding.useContext(importDefault(11794) /* metro dependency 11794: VoicePanelStateContext */);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
let useDerivedValue = reanimatedRexportModule.useDerivedValue;
let closure = VoicePanelControlsDimOverlayA;
const object2 = {windowDimensions: windowDimensions};
const getDrawerSpec = (require(15516) /* metro dependency 15516: VoicePanelControlUtils */).getDrawerSpec;
object2.getDrawerSpec = getDrawerSpec;
object2.safeArea = safeArea;
object2.controlsSpecs = controlsSpecs;
object2.VoicePanelControlsModes = VoicePanelControlsModes;
object2.mode = mode;
object2.VoicePanelModes = VoicePanelModes;
object2.interpolate = reanimatedRexportModule.interpolate;
object2.wrapperSpecs = wrapperSpecs;
object2.BACKDROP_OPAQUE_MAX_OPACITY = BACKDROP_OPAQUE_MAX_OPACITY;
closure.__closure = object2;
closure.__workletHash = 17386741533055;
closure.__initData = env0_9;
const value3 = Reflect.apply(useDerivedValue, reanimatedRexportModule, [closure]);
const moduleValue2 = reanimatedRexportModule;
useDerivedValue = moduleValue2.useDerivedValue;
closure = VoicePanelControlsDimOverlayY;
closure.__closure = {overlayOpacity: value3};
closure.__workletHash = 733654137262;
closure.__initData = env0_10;
const value4 = Reflect.apply(useDerivedValue, moduleValue2, [closure]);
const moduleValue3 = reanimatedRexportModule;
const useAnimatedStyle = moduleValue3.useAnimatedStyle;
closure = VoicePanelControlsDimOverlayS;
closure.__closure = {withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring,
overlayOpacity: value3, PANEL_CONTROLS_HEIGHT_PHYSICS: PANEL_CONTROLS_HEIGHT_PHYSICS,
accessibilityPreferencesSharedValue: (require(12991) /* metro dependency 12991: AccessibilityPreferencesSharedValue */).accessibilityPreferencesSharedValue,
overlayActive: value4};
closure.__workletHash = 7500180433000;
closure.__initData = env0_11;
const value5 = Reflect.apply(useAnimatedStyle, moduleValue3, [closure]);
const moduleValue4 = reanimatedRexportModule;
const useAnimatedProps = moduleValue4.useAnimatedProps;
closure = VoicePanelControlsDimOverlayV;
closure.__closure = {overlayActive: value4};
closure.__workletHash = 873976025930;
closure.__initData = env0_12;
const value6 = Reflect.apply(useAnimatedProps, moduleValue4, [closure]);
const value7 = binding.useCallback(function() {
setControlsMode({mode: VoicePanelControlsModes.FLOATING_DEFAULT});
}, [setControlsMode]);
const Backdrop = (require(4562) /* metro dependency 4562: BackdropNative */).Backdrop;
return (
<Backdrop
onDismiss={value7}
style={value5}
animatedProps={value6}
opaque
{...{['aria-hidden']: true}}
/>
);
}
function VoicePanelControlsDimOverlayY() { // fn#118986, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15745:2219, owner: VoicePanelControlsDimOverlay.y, offset: 0x024f805e, size: 32 bytes, params: 1, frame: 9
return VoicePanelConstantsModule.VoicePanelModes.get() >= 0.35;
}
function VoicePanelControlsDimOverlayS() { // fn#118987, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15745:2345, owner: VoicePanelControlsDimOverlay.S, offset: 0x024f807e, size: 143 bytes, params: 1, frame: 19
const object = {zIndex: 1};
let value = environment.__proto__;
const withSpring = SpringModule.withSpring;
let get = VoicePanelConstantsModule.VoicePanelModes.get;
object.opacity = Reflect.apply(withSpring, SpringModule, [Reflect.apply(get, VoicePanelConstantsModule.VoicePanelModes, []),
PANEL_CONTROLS_HEIGHT_PHYSICS]);
const accessibilityPreferencesSharedValue = (AccessibilityPreferencesSharedValueModule).accessibilityPreferencesSharedValue;
get = accessibilityPreferencesSharedValue.get;
const screenReaderEnabled = Reflect.apply(get, accessibilityPreferencesSharedValue, []).screenReaderEnabled;
value = 'flex';
object.display = screenReaderEnabled ? VoicePanelControlsConstantsModule.VoicePanelControlsModes.get() ? value : 'none' : value;
return object;
}
function VoicePanelControlsDimOverlayV() { // fn#118988, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15745:2781, owner: VoicePanelControlsDimOverlay.v, offset: 0x024f810d, size: 36 bytes, params: 1, frame: 10
const object = {};
object.pointerEvents = VoicePanelControlsConstantsModule.VoicePanelControlsModes.get() ? 'auto' : 'none';
return object;
}
function VoicePanelControlsDimOverlayA() { // fn#118985, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15745:1709, owner: VoicePanelControlsDimOverlay.A, offset: 0x024f7f6a, size: 244 bytes, params: 1, frame: 20
var r0;
var moduleValue2;
var interpolate;
var wrapperSpecsBinding;
const windowDimensionsBinding = windowDimensions;
let get = windowDimensionsBinding.get;
const height = Reflect.apply(get, windowDimensionsBinding, []).height;
const voicePanelControlUtilsModule = require(15516) /* metro dependency 15516: VoicePanelControlUtils */;
const getDrawerSpec = voicePanelControlUtilsModule.getDrawerSpec;
const safeAreaBinding = safeArea;
get = safeAreaBinding.get;
const {minHeight, maxHeight} = Reflect.apply(getDrawerSpec, voicePanelControlUtilsModule, [height,
Reflect.apply(get, safeAreaBinding, []).top]);
const controlsSpecsBinding = controlsSpecs;
get = controlsSpecsBinding.get;
const mode2 = Reflect.apply(get, controlsSpecsBinding, []).mode;
const DRAWER = VoicePanelControlsModes.DRAWER;
const value4 = 0;
if (mode2 !== DRAWER) {
r0 = value4;
} else if (mode.get() !== VoicePanelModes.PANEL) {
r0 = value4;
} else {
moduleValue2 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
interpolate = moduleValue2.interpolate;
wrapperSpecsBinding = wrapperSpecs;
r0 = Reflect.apply(interpolate, moduleValue2, [wrapperSpecsBinding.get().height, [minHeight, maxHeight], [0,
BACKDROP_OPAQUE_MAX_OPACITY], 'clamp']);
}
return r0;
}
function VoicePanelControlsDimOverlayY() { // fn#118986, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15745:2219, owner: VoicePanelControlsDimOverlay.y, offset: 0x024f805e, size: 32 bytes, params: 1, frame: 9
return env0_6.get() >= 0.35;
}
function VoicePanelControlsDimOverlayS() { // fn#118987, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15745:2345, owner: VoicePanelControlsDimOverlay.S, offset: 0x024f807e, size: 143 bytes, params: 1, frame: 19
const object2 = {zIndex: 1};
let value = environment.__proto__;
const springModule = require(4577) /* metro dependency 4577: spring */;
const withSpring = springModule.withSpring;
const binding = env0_6;
let get = binding.get;
object2.opacity = Reflect.apply(withSpring, springModule, [Reflect.apply(get, binding, []),
PANEL_CONTROLS_HEIGHT_PHYSICS]);
const accessibilityPreferencesSharedValue = (require(12991) /* metro dependency 12991: AccessibilityPreferencesSharedValue */).accessibilityPreferencesSharedValue;
get = accessibilityPreferencesSharedValue.get;
const screenReaderEnabled = Reflect.apply(get, accessibilityPreferencesSharedValue, []).screenReaderEnabled;
value = 'flex';
object2.display = screenReaderEnabled ? env0_7.get() ? value : 'none' : value;
return object2;
}
function VoicePanelControlsDimOverlayV() { // fn#118988, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15745:2781, owner: VoicePanelControlsDimOverlay.v, offset: 0x024f810d, size: 36 bytes, params: 1, frame: 10
const object2 = {};
object2.pointerEvents = env0_7.get() ? 'auto' : 'none';
return object2;
}
global.__d(_fun118983, 15548, [31, 12760, 11795, 11793, 33, 11794, 4017, 15516, 4577, 12991, 4562,
2]) /* metro module 15548, dependencies: [31, 12760, 11795, 11793, 33, 11794, 4017, 15516, 4577, 12991, 4562, 2] */;
@@ -1,219 +1,222 @@
/* Metro module 15549; source: modules/voice_panel/native/controls/VoicePanelControlsDrawer.tsx; dependencies: [57, 31, 27, 11795, 33, 4501, 697, 6619, 4521, 11792, 11794, 4017, 11801, 4577, 7739, 15550, 15561, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import ReanimatedRexport from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import VoicePanelChatView from './VoicePanelChatView.tsx'; /* Metro dependency 11792 */
import VoicePanelStateContext from '../VoicePanelStateContext.tsx'; /* Metro dependency 11794 */
import VoicePanelVoiceControls from './VoicePanelVoiceControls.tsx'; /* Metro dependency 15550 */
import VoicePanelControlsAppLauncher from './VoicePanelControlsAppLauncher.tsx'; /* Metro dependency 15561 */
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 ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as SpringModule from '../../../../design/animation/reanimated/spring/spring.tsx'; /* Metro dependency 4577 */
import * as CheapWorkletShallowEqualModule from '../../../reanimated/native/cheapWorkletShallowEqual.tsx'; /* Metro dependency 7739 */
import * as VoicePanelConstantsModule from '../../VoicePanelConstants.tsx'; /* Metro dependency 11795 */
import * as VoicePanelControlsUtilsModule from '../utils/VoicePanelControlsUtils.tsx'; /* Metro dependency 11801 */
function _fun118990(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118990, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15746:6, offset: 0x024f8154, size: 451 bytes, params: 8, frame: 24
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const StyleSheet = value2.StyleSheet;
const env0_6 = value2.View;
const voicePanelConstantsModule = require(11795) /* metro dependency 11795: VoicePanelConstants */;
const env0_7 = voicePanelConstantsModule.MODE_CHANGE_PHYSICS;
const env0_8 = voicePanelConstantsModule.VoicePanelModes;
const value4 = require(33) /* metro dependency 33 */;
const env0_9 = value4.jsx;
const env0_10 = value4.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {};
let value = ReactModule;
const StyleSheet = ReactNativeModule.StyleSheet;
const createStyles = CreateStylesModule.createStyles;
object = {};
let BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
object2.drawer = {'flex': 1, 'zIndex': 1, backgroundColor: BACKGROUND_BASE_LOWER};
const object4 = {};
copyDataProperties(object4, StyleSheet.absoluteFillObject, undefined);
object.drawer = {'flex': 1, 'zIndex': 1, backgroundColor: BACKGROUND_BASE_LOWER};
const object3 = {};
copyDataProperties(object3, StyleSheet.absoluteFillObject, undefined);
BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
object4['backgroundColor'] = BACKGROUND_BASE_LOWER;
object2.tabOverlay = object4;
const env0_11 = Reflect.apply(createStyles, createStylesModule, [object2]);
object3['backgroundColor'] = BACKGROUND_BASE_LOWER;
object.tabOverlay = object3;
const env0_11 = Reflect.apply(createStyles, CreateStylesModule, [object]);
const value6 = value.memo(_fun118992);
object2 = {code: 'function VoicePanelControlsDrawerTsx1(){const{getControlsDrawerOpenWidth,windowDimensions,safeArea,withSpring,wrapperSpecs,TRANSITIONAL_HEIGHT,MODE_CHANGE_PHYSICS}=this.__closure;return{width:getControlsDrawerOpenWidth(windowDimensions.get().width,safeArea.get().left,safeArea.get().right),opacity:withSpring(wrapperSpecs.get().height>=TRANSITIONAL_HEIGHT?1:0,MODE_CHANGE_PHYSICS)};}'};
object2 = {code: 'function VoicePanelControlsDrawerTsx2(){const{wrapperSpecs,mode}=this.__closure;return[wrapperSpecs.get().drawerMode,mode.get()];}'};
object2 = {code: 'function VoicePanelControlsDrawerTsx3(props,previous){const{cheapWorkletArrayShallowEqual,VoicePanelModes,runOnJS,setFreeze}=this.__closure;if(cheapWorkletArrayShallowEqual(props,previous!==null&&previous!==void 0?previous:undefined))return;const[isDrawer,mode]=props;if(previous!=null&&isDrawer===previous[0]&&mode===previous[1]){return;}if(mode!==VoicePanelModes.PANEL||!isDrawer){runOnJS(setFreeze)(true);}else{runOnJS(setFreeze)(false);}}'};
object = {code: 'function VoicePanelControlsDrawerTsx1(){const{getControlsDrawerOpenWidth,windowDimensions,safeArea,withSpring,wrapperSpecs,TRANSITIONAL_HEIGHT,MODE_CHANGE_PHYSICS}=this.__closure;return{width:getControlsDrawerOpenWidth(windowDimensions.get().width,safeArea.get().left,safeArea.get().right),opacity:withSpring(wrapperSpecs.get().height>=TRANSITIONAL_HEIGHT?1:0,MODE_CHANGE_PHYSICS)};}'};
object = {code: 'function VoicePanelControlsDrawerTsx2(){const{wrapperSpecs,mode}=this.__closure;return[wrapperSpecs.get().drawerMode,mode.get()];}'};
object = {code: 'function VoicePanelControlsDrawerTsx3(props,previous){const{cheapWorkletArrayShallowEqual,VoicePanelModes,runOnJS,setFreeze}=this.__closure;if(cheapWorkletArrayShallowEqual(props,previous!==null&&previous!==void 0?previous:undefined))return;const[isDrawer,mode]=props;if(previous!=null&&isDrawer===previous[0]&&mode===previous[1]){return;}if(mode!==VoicePanelModes.PANEL||!isDrawer){runOnJS(setFreeze)(true);}else{runOnJS(setFreeze)(false);}}'};
value = value.memo(VoicePanelControlsDrawer);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/controls/VoicePanelControlsDrawer.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/controls/VoicePanelControlsDrawer.tsx');
exports.default = value;
exports.LazyContentFreezer = value6;
}
function renderChat(a0) { // fn#118991, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15746:726, offset: 0x024f8317, size: 88 bytes, params: 2, frame: 17
return (
<View collapsable={false} style={StyleSheet.absoluteFill}>
{((Component) => <Component shown={a0} />)(importDefault(11792) /* metro dependency 11792: VoicePanelChatView */)}
</View>
);
}
function _fun118992({shown, renderContent}) { // fn#118992, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15746:435, offset: 0x024f836f, size: 273 bytes, params: 2, frame: 20
let binding = env0_4;
const value3 = undefined(binding.useState(!shown), 2);
const property = value3[0];
if (shown && property) {
value3[1](false);
}
binding = env0_4;
const value4 = binding.useRef(shown);
binding.useEffect(_fun118993);
binding.useEffect(_fun118994, [shown]);
if ((importDefault(6619) /* metro dependency 6619: useRefValue */)(value4) || shown) {
const Freeze = (require(4521) /* metro dependency 4521 */).Freeze;
function renderChat(a0) { // fn#118991, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15746:726, offset: 0x024f8317, size: 88 bytes, params: 2, frame: 17
return (
<Freeze freeze={property}>
{binding.useMemo(function() {
return renderContent(shown);
}, [renderContent, shown])}
</Freeze>
<View collapsable={false} style={StyleSheet.absoluteFill}>
{((Component) => <Component shown={a0} />)(VoicePanelChatView)}
</View>
);
} else {
return null;
}
}
function VoicePanelControlsDrawer({tab, sharedTab, wrapperSpecs, gestureSpecs, openTab}) { // fn#118996, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15746:1838, offset: 0x024f84b8, size: 782 bytes, params: 2, frame: 30
let binding = env0_4;
const value2 = binding.useContext(importDefault(11794) /* metro dependency 11794: VoicePanelStateContext */);
const mode = value2.mode;
const env0_3 = mode;
const windowDimensions = value2.windowDimensions;
var env0_4 = windowDimensions;
const safeArea = value2.safeArea;
const styles = useStyles();
const [property, property2] = env0_3(binding.useState(tab == null), 2);
const get = sharedTab.get;
if (tab !== Reflect.apply(get, sharedTab, []) && property) {
property2(false);
}
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
let closure = VoicePanelControlsDrawerK;
const object2 = {};
const getControlsDrawerOpenWidth = (require(11801) /* metro dependency 11801: VoicePanelControlsUtils */).getControlsDrawerOpenWidth;
object2.getControlsDrawerOpenWidth = getControlsDrawerOpenWidth;
object2.windowDimensions = windowDimensions;
object2.safeArea = safeArea;
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object2.wrapperSpecs = wrapperSpecs;
object2.TRANSITIONAL_HEIGHT = 200;
object2.MODE_CHANGE_PHYSICS = MODE_CHANGE_PHYSICS;
closure.__closure = object2;
closure.__workletHash = 8777106499672;
closure.__initData = env0_13;
const value6 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const moduleValue2 = reanimatedRexportModule;
const useAnimatedReaction = moduleValue2.useAnimatedReaction;
closure = function() {
var items = [wrapperSpecs.get().drawerMode];
items[1] = mode.get();
return items;
};
closure.__closure = {wrapperSpecs: wrapperSpecs, mode: mode};
closure.__workletHash = 16802013961309;
closure.__initData = env0_14;
const closure2 = VoicePanelControlsDrawerM;
closure2.__closure = {cheapWorkletArrayShallowEqual: (require(7739) /* metro dependency 7739: cheapWorkletShallowEqual */).cheapWorkletArrayShallowEqual,
VoicePanelModes: VoicePanelModes, runOnJS: reanimatedRexportModule.runOnJS, setFreeze: property2};
closure2.__workletHash = 10375596551326;
closure2.__initData = env0_15;
Reflect.apply(useAnimatedReaction, moduleValue2, [closure, closure2]);
binding = env0_4;
const value7 = binding.useCallback(_fun119000, [openTab, styles]);
const value8 = binding.useCallback(_fun119001, [gestureSpecs, styles]);
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
binding = env0_12;
const value9 = !property;
return (
<View style={[styles.drawer, value6]}>
{((Component) => <Component shown={property ? value9 : tab === 'chat'} renderContent={renderChat} />)(binding)}
{((Component) => <Component shown={property ? value9 : tab === 'settings'} renderContent={value7} />)(env0_12)}
{((Component) => <Component shown={property ? value9 : tab === 'app_launcher'} renderContent={value8} />)(env0_12)}
</View>
);
}
function _fun118993() { // fn#118993, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15746:558, offset: 0x024f8480, size: 29 bytes, params: 1, frame: 4
const binding = env0_3;
binding.current = binding.current || shown;
}
function _fun118994() { // fn#118994, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15746:602, offset: 0x024f849d, size: 27 bytes, params: 1, frame: 11
if (!shown) {
env0_2(true);
}
}
function VoicePanelControlsDrawerK() { // fn#118997, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15746:2120, owner: VoicePanelControlsDrawer.k, offset: 0x024f87c6, size: 163 bytes, params: 1, frame: 22
const object2 = {};
const voicePanelControlsUtilsModule = require(11801) /* metro dependency 11801: VoicePanelControlsUtils */;
const getControlsDrawerOpenWidth = voicePanelControlsUtilsModule.getControlsDrawerOpenWidth;
const windowDimensionsBinding = windowDimensions;
let get = windowDimensionsBinding.get;
const width = Reflect.apply(get, windowDimensionsBinding, []).width;
const safeAreaBinding = safeArea;
get = safeAreaBinding.get;
const left = Reflect.apply(get, safeAreaBinding, []).left;
get = safeAreaBinding.get;
object2.width = Reflect.apply(getControlsDrawerOpenWidth, voicePanelControlsUtilsModule, [width, left,
Reflect.apply(get, safeAreaBinding, []).right]);
const springModule = require(4577) /* metro dependency 4577: spring */;
const withSpring = springModule.withSpring;
const wrapperSpecsBinding = wrapperSpecs;
get = wrapperSpecsBinding.get;
object2.opacity = Reflect.apply(withSpring, springModule, [Reflect.apply(get, wrapperSpecsBinding,
[]).height >= 200 ? 1 : 0, MODE_CHANGE_PHYSICS]);
return object2;
}
function VoicePanelControlsDrawerM(a0, a1) { // fn#118999, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15746:2667, owner: VoicePanelControlsDrawer.M, offset: 0x024f889a, size: 227 bytes, params: 3, frame: 18
var r3;
var value4;
var property;
var property2;
let value = a1;
const value3 = undefined;
const cheapWorkletShallowEqualModule = require(7739) /* metro dependency 7739: cheapWorkletShallowEqual */;
if (!cheapWorkletShallowEqualModule.cheapWorkletArrayShallowEqual(a0, value ?? value3)) {
value4 = env1_3(a0, 2);
property = value4[0];
property2 = value4[1];
r3 = value != null && property === value[0];
if (r3) {
value = property2 === value[1];
r3 = value;
function _fun118992({shown, renderContent}) { // fn#118992, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15746:435, offset: 0x024f836f, size: 273 bytes, params: 2, frame: 20
let binding = env0_4;
const value3 = undefined(binding.useState(!shown), 2);
const property = value3[0];
if (shown && property) {
value3[1](false);
}
if (!r3) {
if (property2 !== VoicePanelModes.PANEL) {
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value = value.runOnJS(env0_7);
value(true);
} else if (property) {
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value = value.runOnJS(env0_7);
value(false);
} else {
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value = value.runOnJS(env0_7);
value(true);
binding = env0_4;
const value4 = binding.useRef(shown);
binding.useEffect(_fun118993);
binding.useEffect(_fun118994, [shown]);
if ((importDefault(6619) /* metro dependency 6619: useRefValue */)(value4) || shown) {
const Freeze = (require(4521) /* metro dependency 4521 */).Freeze;
return (
<Freeze freeze={property}>
{binding.useMemo(function() {
return renderContent(shown);
}, [renderContent, shown])}
</Freeze>
);
} else {
return null;
}
function _fun118993() { // fn#118993, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15746:558, offset: 0x024f8480, size: 29 bytes, params: 1, frame: 4
Module00057.current = Module00057.current || shown;
}
function _fun118994() { // fn#118994, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15746:602, offset: 0x024f849d, size: 27 bytes, params: 1, frame: 11
if (!shown) {
env0_2(true);
}
}
}
return value3;
}
function _fun119000(a0) { // fn#119000, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15746:3075, offset: 0x024f897d, size: 93 bytes, params: 2, frame: 18
const value = environment.__proto__;
return (
<View style={styles.tabOverlay}>
{((Component) => <Component isVisible={a0} openTab={openTab} />)(importDefault(15550) /* metro dependency 15550: VoicePanelVoiceControls */)}
</View>
);
}
function VoicePanelControlsDrawer({tab, sharedTab, wrapperSpecs, gestureSpecs, openTab}) { // fn#118996, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15746:1838, offset: 0x024f84b8, size: 782 bytes, params: 2, frame: 30
let binding = windowDimensions2;
const value2 = binding.useContext(VoicePanelStateContext);
const mode = value2.mode;
const mode2 = mode;
const windowDimensions = value2.windowDimensions;
var windowDimensions2 = windowDimensions;
const safeArea = value2.safeArea;
const styles = useStyles();
const [property, property2] = mode2(binding.useState(tab == null), 2);
const get = sharedTab.get;
if (tab !== Reflect.apply(get, sharedTab, []) && property) {
property2(false);
}
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
let closure = VoicePanelControlsDrawerK;
const object = {};
const getControlsDrawerOpenWidth = (VoicePanelControlsUtilsModule).getControlsDrawerOpenWidth;
object.getControlsDrawerOpenWidth = getControlsDrawerOpenWidth;
object.windowDimensions = windowDimensions;
object.safeArea = safeArea;
object.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object.wrapperSpecs = wrapperSpecs;
object.TRANSITIONAL_HEIGHT = 200;
object.MODE_CHANGE_PHYSICS = MODE_CHANGE_PHYSICS;
closure.__closure = object;
closure.__workletHash = 8777106499672;
closure.__initData = env0_13;
const value6 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
const useAnimatedReaction = ReanimatedRexportModule.useAnimatedReaction;
closure = function() {
var items = [wrapperSpecs.get().drawerMode];
items[1] = mode.get();
return items;
};
closure.__closure = {wrapperSpecs: wrapperSpecs, mode: mode};
closure.__workletHash = 16802013961309;
closure.__initData = env0_14;
const VoicePanelControlsDrawerM2 = VoicePanelControlsDrawerM;
VoicePanelControlsDrawerM2.__closure = {cheapWorkletArrayShallowEqual: (require(7739) /* metro dependency 7739: cheapWorkletShallowEqual */).cheapWorkletArrayShallowEqual,
VoicePanelModes: VoicePanelModes, runOnJS: ReanimatedRexportModule.runOnJS, setFreeze: property2};
VoicePanelControlsDrawerM2.__workletHash = 10375596551326;
VoicePanelControlsDrawerM2.__initData = env0_15;
Reflect.apply(useAnimatedReaction, ReanimatedRexportModule, [closure, VoicePanelControlsDrawerM2]);
binding = windowDimensions2;
const value7 = binding.useCallback(_fun119000, [openTab, styles]);
const value8 = binding.useCallback(_fun119001, [gestureSpecs, styles]);
const View = (ReanimatedRexport).View;
binding = env0_12;
const value9 = !property;
return (
<View style={[styles.drawer, value6]}>
{((Component) => <Component shown={property ? value9 : tab === 'chat'} renderContent={renderChat} />)(binding)}
{((Component) => <Component shown={property ? value9 : tab === 'settings'} renderContent={value7} />)(env0_12)}
{((Component) => <Component shown={property ? value9 : tab === 'app_launcher'} renderContent={value8} />)(env0_12)}
</View>
);
function VoicePanelControlsDrawerK() { // fn#118997, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15746:2120, owner: VoicePanelControlsDrawer.k, offset: 0x024f87c6, size: 163 bytes, params: 1, frame: 22
const object = {};
const getControlsDrawerOpenWidth = VoicePanelControlsUtilsModule.getControlsDrawerOpenWidth;
const windowDimensionsBinding = windowDimensions;
let get = windowDimensionsBinding.get;
const width = Reflect.apply(get, windowDimensionsBinding, []).width;
const safeAreaBinding = safeArea;
get = safeAreaBinding.get;
const left = Reflect.apply(get, safeAreaBinding, []).left;
get = safeAreaBinding.get;
object.width = Reflect.apply(getControlsDrawerOpenWidth, VoicePanelControlsUtilsModule, [width, left,
Reflect.apply(get, safeAreaBinding, []).right]);
const withSpring = SpringModule.withSpring;
const wrapperSpecsBinding = wrapperSpecs;
get = wrapperSpecsBinding.get;
object.opacity = Reflect.apply(withSpring, SpringModule, [Reflect.apply(get, wrapperSpecsBinding,
[]).height >= 200 ? 1 : 0, MODE_CHANGE_PHYSICS]);
return object;
}
function VoicePanelControlsDrawerM(a0, a1) { // fn#118999, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15746:2667, owner: VoicePanelControlsDrawer.M, offset: 0x024f889a, size: 227 bytes, params: 3, frame: 18
var r3;
var value4;
var property;
var property2;
let value = a1;
const value3 = undefined;
if (!CheapWorkletShallowEqualModule.cheapWorkletArrayShallowEqual(a0, value ?? value3)) {
value4 = env1_3(a0, 2);
property = value4[0];
property2 = value4[1];
r3 = value != null && property === value[0];
if (r3) {
value = property2 === value[1];
r3 = value;
}
if (!r3) {
if (property2 !== VoicePanelModes.PANEL) {
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value = value.runOnJS(VoicePanelConstantsModule.MODE_CHANGE_PHYSICS);
value(true);
} else if (property) {
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value = value.runOnJS(VoicePanelConstantsModule.MODE_CHANGE_PHYSICS);
value(false);
} else {
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value = value.runOnJS(VoicePanelConstantsModule.MODE_CHANGE_PHYSICS);
value(true);
}
}
}
return value3;
}
function _fun119000(a0) { // fn#119000, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15746:3075, offset: 0x024f897d, size: 93 bytes, params: 2, frame: 18
const value = environment.__proto__;
return (
<View style={styles.tabOverlay}>
{((Component) => <Component isVisible={a0} openTab={openTab} />)(VoicePanelVoiceControls)}
</View>
);
}
function _fun119001() { // fn#119001, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15746:3174, offset: 0x024f89da, size: 85 bytes, params: 1, frame: 17
const value = environment.__proto__;
return (
<View style={styles.tabOverlay}>
{((Component) => <Component gestureSpecs={gestureSpecs} />)(VoicePanelControlsAppLauncher)}
</View>
);
}
}
function _fun119001() { // fn#119001, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15746:3174, offset: 0x024f89da, size: 85 bytes, params: 1, frame: 17
const value = environment.__proto__;
return (
<View style={styles.tabOverlay}>
{((Component) => <Component gestureSpecs={gestureSpecs} />)(importDefault(15561) /* metro dependency 15561: VoicePanelControlsAppLauncher */)}
</View>
);
}
global.__d(_fun118990, 15549, [57, 31, 27, 11795, 33, 4501, 697, 6619, 4521, 11792, 11794, 4017, 11801, 4577, 7739,
15550, 15561,
2]) /* metro module 15549, dependencies: [57, 31, 27, 11795, 33, 4501, 697, 6619, 4521, 11792, 11794, 4017, 11801, 4577, 7739, 15550, 15561, 2] */;
@@ -1,69 +1,74 @@
/* Metro module 11802; source: modules/voice_panel/native/controls/VoicePanelControlsDrawerTitle.tsx; dependencies: [31, 27, 11793, 33, 4501, 697, 4017, 6821, 11803, 8141, 4573, 2] */
import NativeView from '../../../core/native/NativeView.tsx'; /* Metro dependency 6821 */
import ReanimatedNativeView from '../../../core/native/ReanimatedNativeView.tsx'; /* Metro dependency 8141 */
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 ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
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 VoicePanelControlsConstantsModule from './VoicePanelControlsConstants.tsx'; /* Metro dependency 11793 */
function _fun90395(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90395, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11988:6, offset: 0x02037924, size: 342 bytes, params: 8, frame: 23
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).StyleSheet;
const CONTROLS_DRAWER_HEADER_SIZE = (require(11793) /* metro dependency 11793: VoicePanelControlsConstants */).CONTROLS_DRAWER_HEADER_SIZE;
const value2 = require(33) /* metro dependency 33 */;
const env0_4 = value2.jsx;
const env0_5 = value2.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {};
object2.titleWrapper = {'position': 'absolute', 'top': 0, 'left': 0, 'right': 0, 'justifyContent': 'center',
let value = ReactModule;
const CONTROLS_DRAWER_HEADER_SIZE = (VoicePanelControlsConstantsModule).CONTROLS_DRAWER_HEADER_SIZE;
const createStyles = CreateStylesModule.createStyles;
object = {};
object.titleWrapper = {'position': 'absolute', 'top': 0, 'left': 0, 'right': 0, 'justifyContent': 'center',
'alignItems': 'center', 'padding': 16, height: CONTROLS_DRAWER_HEADER_SIZE};
const object4 = {'borderRadius': null, 'paddingHorizontal': 12, 'paddingTop': 1, 'paddingBottom': 2};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object2.titlePill = object4;
const object3 = {'borderRadius': null, 'paddingHorizontal': 12, 'paddingTop': 1, 'paddingBottom': 2};
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object.titlePill = object3;
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object2.titlePillBG = {backgroundColor: BACKGROUND_SURFACE_HIGH};
const env0_6 = Reflect.apply(createStyles, createStylesModule, [object2]);
object2 = {code: "function VoicePanelControlsDrawerTitleTsx1(){const{shown,_shown,disablePill,backgroundColor}=this.__closure;const showBGColor=shown!=null?shown.get():_shown.get();return{backgroundColor:showBGColor&&!disablePill?backgroundColor:'transparent'};}"};
object.titlePillBG = {backgroundColor: BACKGROUND_SURFACE_HIGH};
const env0_6 = Reflect.apply(createStyles, CreateStylesModule, [object]);
object = {code: "function VoicePanelControlsDrawerTitleTsx1(){const{shown,_shown,disablePill,backgroundColor}=this.__closure;const showBGColor=shown!=null?shown.get():_shown.get();return{backgroundColor:showBGColor&&!disablePill?backgroundColor:'transparent'};}"};
value = value.memo(VoicePanelControlsDrawerTitle);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/controls/VoicePanelControlsDrawerTitle.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/controls/VoicePanelControlsDrawerTitle.tsx');
exports.default = value;
function VoicePanelControlsDrawerTitle({title, shown, disablePill, style, blurStyle}) { // fn#90396, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11988:772, offset: 0x02037a7a, size: 430 bytes, params: 2, frame: 25
disablePill = !(disablePill === undefined) && disablePill;
const styles = useStyles();
const value2 = (ReanimatedRexportModule).useSharedValue(true);
const backgroundColor = styles.titlePillBG.backgroundColor;
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
const VoicePanelControlsDrawerTitleP2 = VoicePanelControlsDrawerTitleP;
VoicePanelControlsDrawerTitleP2.__closure = {shown: shown, _shown: value2, disablePill: disablePill,
backgroundColor: backgroundColor};
VoicePanelControlsDrawerTitleP2.__workletHash = 14837285839887;
VoicePanelControlsDrawerTitleP2.__initData = env0_7;
const value3 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [VoicePanelControlsDrawerTitleP2]);
const items2 = [styles.titleWrapper, style];
const value4 = ((Component) => <Component shown={shown ?? value2} style={StyleSheet.absoluteFillObject} blurStyle={blurStyle} />)(importDefault(11803) /* metro dependency 11803: VoicePanelHeaderGlassBlur */);
const items3 = [styles.titlePill, value3];
const Text = (TextModule).Text;
return (
<NativeView style={items2}>
{value4}
<ReanimatedNativeView style={items3}>
<Text
variant="redesign/heading-18/bold"
color="mobile-text-heading-primary"
accessibilityRole="header"
>
{title}
</Text>
</ReanimatedNativeView>
</NativeView>
);
function VoicePanelControlsDrawerTitleP() { // fn#90397, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11988:971, owner: VoicePanelControlsDrawerTitle.p, offset: 0x02037c28, size: 73 bytes, params: 1, frame: 12
const r3 = shown != null ? shown.get() : env0_2.get();
const value4 = 'transparent';
return {backgroundColor: r3 ? disablePill ? value4 : backgroundColor : value4};
}
}
}
function VoicePanelControlsDrawerTitle({title, shown, disablePill, style, blurStyle}) { // fn#90396, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11988:772, offset: 0x02037a7a, size: 430 bytes, params: 2, frame: 25
disablePill = !(disablePill === undefined) && disablePill;
const styles = useStyles();
const value2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(true);
const backgroundColor = styles.titlePillBG.backgroundColor;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = VoicePanelControlsDrawerTitleP;
closure.__closure = {shown: shown, _shown: value2, disablePill: disablePill, backgroundColor: backgroundColor};
closure.__workletHash = 14837285839887;
closure.__initData = env0_7;
const value3 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const NativeView = importDefault(6821) /* metro dependency 6821: NativeView */;
const items2 = [styles.titleWrapper, style];
const value4 = ((Component) => <Component shown={shown ?? value2} style={StyleSheet.absoluteFillObject} blurStyle={blurStyle} />)(importDefault(11803) /* metro dependency 11803: VoicePanelHeaderGlassBlur */);
const ReanimatedNativeView = importDefault(8141) /* metro dependency 8141: ReanimatedNativeView */;
const items3 = [styles.titlePill, value3];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<NativeView style={items2}>
{value4}
<ReanimatedNativeView style={items3}>
<Text
variant="redesign/heading-18/bold"
color="mobile-text-heading-primary"
accessibilityRole="header"
>
{title}
</Text>
</ReanimatedNativeView>
</NativeView>
);
}
function VoicePanelControlsDrawerTitleP() { // fn#90397, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11988:971, owner: VoicePanelControlsDrawerTitle.p, offset: 0x02037c28, size: 73 bytes, params: 1, frame: 12
const r3 = shown != null ? shown.get() : env0_2.get();
const value4 = 'transparent';
return {backgroundColor: r3 ? disablePill ? value4 : backgroundColor : value4};
}
global.__d(_fun90395, 11802, [31, 27, 11793, 33, 4501, 697, 4017, 6821, 11803, 8141, 4573,
2]) /* metro module 11802, dependencies: [31, 27, 11793, 33, 4501, 697, 4017, 6821, 11803, 8141, 4573, 2] */;
@@ -1,249 +1,266 @@
/* Metro module 15521; source: modules/voice_panel/native/controls/VoicePanelFloatingCTAContainer.tsx; dependencies: [57, 31, 1379, 11795, 11798, 482, 33, 1357, 697, 4501, 4572, 7975, 3868, 11794, 15414, 7014, 632, 15410, 4017, 11801, 4508, 11624, 4577, 8141, 10357, 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 ChannelStore from '../../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import ReanimatedNativeView from '../../../core/native/ReanimatedNativeView.tsx'; /* Metro dependency 8141 */
import VoicePanelStateContext from '../VoicePanelStateContext.tsx'; /* Metro dependency 11794 */
import UseChannelFloatingCTAContent from '../../../video_calls/native/useChannelFloatingCTAContent.tsx'; /* Metro dependency 15414 */
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 '../../../../external/discord_common/js/shared/Constants.tsx'; /* Metro dependency 482 */
import * as MobileVisualRefreshExperimentModule from '../../../themes/experiments/MobileVisualRefreshExperiment.tsx'; /* Metro dependency 1357 */
import * as NativeModule from '../../../../external/discord_common/js/packages/design/native.tsx'; /* Metro dependency 3868 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as TransitionGroupModule from '../../../../design/components/TransitionGroup/TransitionGroup.tsx'; /* Metro dependency 4508 */
import * as StackNativeModule from '../../../../design/components/Stack/native/Stack.native.tsx'; /* Metro dependency 4572 */
import * as SpringModule from '../../../../design/animation/reanimated/spring/spring.tsx'; /* Metro dependency 4577 */
import * as UseGetDismissibleContentModule from '../../../dismissible_content/useGetDismissibleContent.tsx'; /* Metro dependency 7014 */
import * as RowButtonNativeModule from '../../../../design/components/TableRow/native/RowButton.native.tsx'; /* Metro dependency 7975 */
import * as VoicePanelConstantsModule from '../../VoicePanelConstants.tsx'; /* Metro dependency 11795 */
import * as VoicePanelCardConstantsModule from '../card/VoicePanelCardConstants.tsx'; /* Metro dependency 11798 */
import * as VoicePanelControlsUtilsModule from '../utils/VoicePanelControlsUtils.tsx'; /* Metro dependency 11801 */
import * as VoicePanelFloatingCTAUtilsModule from './utils/VoicePanelFloatingCTAUtils.tsx'; /* Metro dependency 15410 */
function _fun118847(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118847, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15718:6, offset: 0x024f1280, size: 414 bytes, params: 8, frame: 24
var object3;
const env0_0 = require;
const closure = VoicePanelFloatingCTAContainer;
const VoicePanelFloatingCTAContainer2 = VoicePanelFloatingCTAContainer;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
let value = require(11795) /* metro dependency 11795: VoicePanelConstants */;
let value = VoicePanelConstantsModule;
const MODE_CHANGE_PHYSICS = value.MODE_CHANGE_PHYSICS;
const env0_6 = value.UI_SHOW_HIDE_PHYSICS;
const env0_7 = (require(11798) /* metro dependency 11798: VoicePanelCardConstants */).CALL_TILE_GUTTER;
const env0_8 = (require(482) /* metro dependency 482: Constants */).ThemeTypes;
const env0_9 = (require(33) /* metro dependency 33 */).jsx;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const object4 = {'zIndex': 1, 'position': 'absolute', 'bottom': 0, 'left': '50%', 'overflow': 'hidden',
const object2 = {'zIndex': 1, 'position': 'absolute', 'bottom': 0, 'left': '50%', 'overflow': 'hidden',
'alignItems': 'center'};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
const env0_10 = Reflect.apply(createStyles, value, [{container: object4}]);
object3 = {};
copyDataProperties(object3, MODE_CHANGE_PHYSICS, undefined);
object3['overshootClamping'] = true;
object3 = {code: "function VoicePanelFloatingCTAContainerTsx1(){const{getControlsDefaultWidth,windowDimensions,safeArea,state,TransitionStates,controlsSpecs,roundToNearestPixel,withSpring,OPACITY_CHANGE_PHYSICS,runOnJS,cleanUp,wrapperSpecs,UI_SHOW_HIDE_PHYSICS,gestureState,CALL_TILE_GUTTER,accessoryHeights}=this.__closure;const width=getControlsDefaultWidth(windowDimensions.get().width,safeArea.get().left,safeArea.get().right);const opacity=state===TransitionStates.YEETED?0:1;return{bottom:controlsSpecs.get().height+16,width:width,marginLeft:roundToNearestPixel(width/2)*-1,opacity:withSpring(opacity,OPACITY_CHANGE_PHYSICS,'respect-motion-settings',function(finished){if(finished&&state===TransitionStates.YEETED){runOnJS(cleanUp)();}}),transform:[{translateX:withSpring(wrapperSpecs.get().x,UI_SHOW_HIDE_PHYSICS)},{translateY:withSpring(wrapperSpecs.get().hidden||gestureState.get().active&&!gestureState.get().requiresPop?wrapperSpecs.get().height+CALL_TILE_GUTTER+accessoryHeights.get():wrapperSpecs.get().y,UI_SHOW_HIDE_PHYSICS)}]};}"};
object3 = {code: 'function VoicePanelFloatingCTAContainerTsx2(finished){const{state,TransitionStates,runOnJS,cleanUp}=this.__closure;if(finished&&state===TransitionStates.YEETED){runOnJS(cleanUp)();}}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/controls/VoicePanelFloatingCTAContainer.tsx');
exports.default = closure;
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
const env0_10 = Reflect.apply(createStyles, value, [{container: object2}]);
object = {};
copyDataProperties(object, MODE_CHANGE_PHYSICS, undefined);
object['overshootClamping'] = true;
object = {code: "function VoicePanelFloatingCTAContainerTsx1(){const{getControlsDefaultWidth,windowDimensions,safeArea,state,TransitionStates,controlsSpecs,roundToNearestPixel,withSpring,OPACITY_CHANGE_PHYSICS,runOnJS,cleanUp,wrapperSpecs,UI_SHOW_HIDE_PHYSICS,gestureState,CALL_TILE_GUTTER,accessoryHeights}=this.__closure;const width=getControlsDefaultWidth(windowDimensions.get().width,safeArea.get().left,safeArea.get().right);const opacity=state===TransitionStates.YEETED?0:1;return{bottom:controlsSpecs.get().height+16,width:width,marginLeft:roundToNearestPixel(width/2)*-1,opacity:withSpring(opacity,OPACITY_CHANGE_PHYSICS,'respect-motion-settings',function(finished){if(finished&&state===TransitionStates.YEETED){runOnJS(cleanUp)();}}),transform:[{translateX:withSpring(wrapperSpecs.get().x,UI_SHOW_HIDE_PHYSICS)},{translateY:withSpring(wrapperSpecs.get().hidden||gestureState.get().active&&!gestureState.get().requiresPop?wrapperSpecs.get().height+CALL_TILE_GUTTER+accessoryHeights.get():wrapperSpecs.get().y,UI_SHOW_HIDE_PHYSICS)}]};}"};
object = {code: 'function VoicePanelFloatingCTAContainerTsx2(finished){const{state,TransitionStates,runOnJS,cleanUp}=this.__closure;if(finished&&state===TransitionStates.YEETED){runOnJS(cleanUp)();}}'};
(FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/controls/VoicePanelFloatingCTAContainer.tsx');
exports.default = VoicePanelFloatingCTAContainer2;
exports.getFloatingCTATotalViewHeight = getFloatingCTATotalViewHeight;
exports.renderVoicePanelFloatingCTA = renderVoicePanelFloatingCTA;
}
function FloatingCTA(a0) { // fn#118848, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15718:406, offset: 0x024f141e, size: 140 bytes, params: 2, frame: 21
const trailing = a0.trailing;
const value = Object.create(null);
value.trailing = 0;
const value2 = copyDataProperties({}, a0, value, undefined);
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const RowButton = (require(7975) /* metro dependency 7975: RowButtonNative */).RowButton;
return (
<Stack>
<RowButton
experimental_withBlurBackground
arrow={trailing == null}
trailing={trailing}
{...value2}
/>
</Stack>
);
}
function VoicePanelFloatingCTAContainer({wrapperSpecs, accessoryHeights, controlsSpecs, state, cleanUp, gestureState}) { // fn#118849, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15718:1837, offset: 0x024f14aa, size: 691 bytes, params: 2, frame: 33
var object2;
var r4;
const env0_3 = state;
const env0_4 = cleanUp;
var value;
const styles = useStyles();
const {windowDimensions, channelId,
safeArea} = env0_4.useContext(importDefault(11794) /* metro dependency 11794: VoicePanelStateContext */);
const value3 = (importDefault(15414) /* metro dependency 15414: useChannelFloatingCTAContent */)(channelId);
const property = env0_3((require(7014) /* metro dependency 7014: useGetDismissibleContent */).useGetDismissibleContent(value3),
1)[0];
const channel = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([ChannelStore],
function() {
return ChannelStore.getChannel(channelId);
});
const value6 = env0_4.useMemo(_fun118851, [property, channel]);
const env0_11 = value6;
const value7 = (require(15410) /* metro dependency 15410: VoicePanelFloatingCTAUtils */).useFloatingCTAProps(channel);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = VoicePanelFloatingCTAContainerA;
object2 = {};
const getControlsDefaultWidth = (require(11801) /* metro dependency 11801: VoicePanelControlsUtils */).getControlsDefaultWidth;
object2.getControlsDefaultWidth = getControlsDefaultWidth;
object2.windowDimensions = windowDimensions;
object2.safeArea = safeArea;
object2.state = state;
const TransitionStates = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates;
object2.TransitionStates = TransitionStates;
object2.controlsSpecs = controlsSpecs;
object2.roundToNearestPixel = importDefault(11624) /* metro dependency 11624: roundToNearestPixel */;
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object2.OPACITY_CHANGE_PHYSICS = env0_11;
object2.runOnJS = reanimatedRexportModule.runOnJS;
object2.cleanUp = cleanUp;
object2.wrapperSpecs = wrapperSpecs;
object2.UI_SHOW_HIDE_PHYSICS = UI_SHOW_HIDE_PHYSICS;
object2.gestureState = gestureState;
object2.CALL_TILE_GUTTER = CALL_TILE_GUTTER;
object2.accessoryHeights = accessoryHeights;
closure.__closure = object2;
closure.__workletHash = 3338259366067;
closure.__initData = env0_12;
const value8 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const ReanimatedNativeView = importDefault(8141) /* metro dependency 8141: ReanimatedNativeView */;
const items2 = [styles.container, value8];
if (value6 != null) {
value = importDefault(10357) /* metro dependency 10357: SelectedDismissibleContent */;
value = ((Component) => <Component contentTypes={value3}>{children_118854}</Component>)(value);
r4 = value;
} else {
r4 = value7 != null ? <FloatingCTA {...value7} /> : null;
function FloatingCTA(a0) { // fn#118848, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15718:406, offset: 0x024f141e, size: 140 bytes, params: 2, frame: 21
const trailing = a0.trailing;
const value = Object.create(null);
value.trailing = 0;
const value2 = copyDataProperties({}, a0, value, undefined);
const Stack = (StackNativeModule).Stack;
const RowButton = (RowButtonNativeModule).RowButton;
return (
<Stack>
<RowButton
experimental_withBlurBackground
arrow={trailing == null}
trailing={trailing}
{...value2}
/>
</Stack>
);
}
return (
<ReanimatedNativeView style={items2}>
{r4}
</ReanimatedNativeView>
);
}
function getFloatingCTATotalViewHeight(a0) { // fn#118855, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15718:3766, offset: 0x024f1a89, size: 83 bytes, params: 2, frame: 15
const mobileVisualRefreshExperimentModule = require(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */;
const resolveRefreshToken = mobileVisualRefreshExperimentModule.resolveRefreshToken;
const TABLE_ROW_HEIGHT = (importDefault(697) /* metro dependency 697: native */).modules.mobile.TABLE_ROW_HEIGHT;
return Reflect.apply(resolveRefreshToken, mobileVisualRefreshExperimentModule, [TABLE_ROW_HEIGHT, a0]) + 16;
}
function VoicePanelFloatingCTAContainer({wrapperSpecs, accessoryHeights, controlsSpecs, state, cleanUp, gestureState}) { // fn#118849, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15718:1837, offset: 0x024f14aa, size: 691 bytes, params: 2, frame: 33
var r4;
const state2 = state;
const cleanUp2 = cleanUp;
var value;
const styles = useStyles();
const {windowDimensions, channelId,
safeArea} = cleanUp2.useContext(VoicePanelStateContext);
const value3 = (UseChannelFloatingCTAContent)(channelId);
const property = state2((UseGetDismissibleContentModule).useGetDismissibleContent(value3),
1)[0];
const channel = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([ChannelStore],
function() {
return ChannelStore.getChannel(channelId);
});
const value6 = cleanUp2.useMemo(_fun118851, [property, channel]);
const env0_11 = value6;
const value7 = (VoicePanelFloatingCTAUtilsModule).useFloatingCTAProps(channel);
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
const VoicePanelFloatingCTAContainerA2 = VoicePanelFloatingCTAContainerA;
object = {};
const getControlsDefaultWidth = (VoicePanelControlsUtilsModule).getControlsDefaultWidth;
object.getControlsDefaultWidth = getControlsDefaultWidth;
object.windowDimensions = windowDimensions;
object.safeArea = safeArea;
object.state = state;
const TransitionStates = (TransitionGroupModule).TransitionStates;
object.TransitionStates = TransitionStates;
object.controlsSpecs = controlsSpecs;
object.roundToNearestPixel = importDefault(11624) /* metro dependency 11624: roundToNearestPixel */;
object.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object.OPACITY_CHANGE_PHYSICS = env0_11;
object.runOnJS = ReanimatedRexportModule.runOnJS;
object.cleanUp = cleanUp;
object.wrapperSpecs = wrapperSpecs;
object.UI_SHOW_HIDE_PHYSICS = UI_SHOW_HIDE_PHYSICS;
object.gestureState = gestureState;
object.CALL_TILE_GUTTER = CALL_TILE_GUTTER;
object.accessoryHeights = accessoryHeights;
VoicePanelFloatingCTAContainerA2.__closure = object;
VoicePanelFloatingCTAContainerA2.__workletHash = 3338259366067;
VoicePanelFloatingCTAContainerA2.__initData = env0_12;
const value8 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [VoicePanelFloatingCTAContainerA2]);
const items2 = [styles.container, value8];
if (value6 != null) {
value = importDefault(10357) /* metro dependency 10357: SelectedDismissibleContent */;
value = ((Component) => <Component contentTypes={value3}>{children_118854}</Component>)(value);
r4 = value;
} else {
r4 = (
value7 != null
? (
<FloatingCTA {...value7} />
)
: null
);
}
return (
<ReanimatedNativeView style={items2}>
{r4}
</ReanimatedNativeView>
);
function _fun118851() { // fn#118851, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15718:2183, offset: 0x024f1777, size: 60 bytes, params: 1, frame: 13
const value = environment.__proto__;
return (VoicePanelFloatingCTAUtilsModule).getDismissableCTAProps({dismissableContent: JsxRuntimeModule.jsx,
channel: channel});
}
function renderVoicePanelFloatingCTA(a0, a1, a2, a3) { // fn#118856, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15718:3920, offset: 0x024f1adc, size: 117 bytes, params: 5, frame: 19
const ThemeContextProvider = (require(3868) /* metro dependency 3868: native */).ThemeContextProvider;
const DARK = ThemeTypes.DARK;
return (
<ThemeContextProvider theme={DARK} key={a0}>
<VoicePanelFloatingCTAContainer
{...a1}
{...{['state']: a2}}
{...{['cleanUp']: a3}}
/>
</ThemeContextProvider>
);
}
function _fun118851() { // fn#118851, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15718:2183, offset: 0x024f1777, size: 60 bytes, params: 1, frame: 13
const value = environment.__proto__;
return (require(15410) /* metro dependency 15410: VoicePanelFloatingCTAUtils */).getDismissableCTAProps({dismissableContent: env0_9,
channel: channel});
}
function VoicePanelFloatingCTAContainerA() { // fn#118852, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15718:2327, owner: VoicePanelFloatingCTAContainer.A, offset: 0x024f17b3, size: 582 bytes, params: 1, frame: 26
var r4;
var gestureStateBinding;
var value7;
var accessoryHeightsBinding;
const voicePanelControlsUtilsModule = require(11801) /* metro dependency 11801: VoicePanelControlsUtils */;
const getControlsDefaultWidth = voicePanelControlsUtilsModule.getControlsDefaultWidth;
const windowDimensionsBinding = windowDimensions;
let get = windowDimensionsBinding.get;
const width = Reflect.apply(get, windowDimensionsBinding, []).width;
const safeAreaBinding = safeArea;
get = safeAreaBinding.get;
const left = Reflect.apply(get, safeAreaBinding, []).left;
get = safeAreaBinding.get;
const value3 = Reflect.apply(getControlsDefaultWidth, voicePanelControlsUtilsModule, [width, left,
Reflect.apply(get, safeAreaBinding, []).right]);
const stateBinding = state;
const TransitionStates = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates;
const YEETED = TransitionStates.YEETED;
const r12 = stateBinding !== YEETED ? 1 : 0;
const object3 = {};
const controlsSpecsBinding = controlsSpecs;
get = controlsSpecsBinding.get;
object3.bottom = Reflect.apply(get, controlsSpecsBinding, []).height + 16;
object3.width = value3;
object3.marginLeft = -1 * (importDefault(11624) /* metro dependency 11624: roundToNearestPixel */)(value3 / 2);
const springModule = require(4577) /* metro dependency 4577: spring */;
let withSpring = springModule.withSpring;
const binding = env1_11;
const closure = AT_118853;
const object4 = {};
object4.state = state;
object4.TransitionStates = TransitionStates;
object4.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
object4.cleanUp = cleanUp;
closure.__closure = object4;
closure.__workletHash = 7334460639890;
closure.__initData = env1_13;
object3.opacity = Reflect.apply(withSpring, springModule, [r12, binding, 'respect-motion-settings', closure]);
const moduleValue3 = springModule;
withSpring = moduleValue3.withSpring;
let wrapperSpecsBinding = wrapperSpecs;
get = wrapperSpecsBinding.get;
const items2 = [{translateX: Reflect.apply(withSpring, moduleValue3, [Reflect.apply(get, wrapperSpecsBinding, []).x,
UI_SHOW_HIDE_PHYSICS])}];
const moduleValue4 = springModule;
withSpring = moduleValue4.withSpring;
get = wrapperSpecsBinding.get;
if (Reflect.apply(get, wrapperSpecsBinding, []).hidden) {
wrapperSpecsBinding = wrapperSpecs;
get = wrapperSpecsBinding.get;
value7 = Reflect.apply(get, wrapperSpecsBinding, []).height + CALL_TILE_GUTTER;
accessoryHeightsBinding = accessoryHeights;
get = accessoryHeightsBinding.get;
r4 = value7 + Reflect.apply(get, accessoryHeightsBinding, []);
} else {
get = gestureState.get;
if (Reflect.apply(get, gestureStateBinding, []).active) {
gestureStateBinding = gestureState;
get = gestureStateBinding.get;
if (Reflect.apply(get, gestureStateBinding, []).requiresPop) {
wrapperSpecsBinding = wrapperSpecs;
r4 = wrapperSpecsBinding.get().y;
} else {
function VoicePanelFloatingCTAContainerA() { // fn#118852, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15718:2327, owner: VoicePanelFloatingCTAContainer.A, offset: 0x024f17b3, size: 582 bytes, params: 1, frame: 26
var r4;
var gestureStateBinding;
var value7;
var accessoryHeightsBinding;
const getControlsDefaultWidth = VoicePanelControlsUtilsModule.getControlsDefaultWidth;
const windowDimensionsBinding = windowDimensions;
let get = windowDimensionsBinding.get;
const width = Reflect.apply(get, windowDimensionsBinding, []).width;
const safeAreaBinding = safeArea;
get = safeAreaBinding.get;
const left = Reflect.apply(get, safeAreaBinding, []).left;
get = safeAreaBinding.get;
const value3 = Reflect.apply(getControlsDefaultWidth, VoicePanelControlsUtilsModule, [width, left,
Reflect.apply(get, safeAreaBinding, []).right]);
const stateBinding = state;
const TransitionStates = (TransitionGroupModule).TransitionStates;
const YEETED = TransitionStates.YEETED;
const r12 = stateBinding !== YEETED ? 1 : 0;
const object = {};
const controlsSpecsBinding = controlsSpecs;
get = controlsSpecsBinding.get;
object.bottom = Reflect.apply(get, controlsSpecsBinding, []).height + 16;
object.width = value3;
object.marginLeft = -1 * (importDefault(11624) /* metro dependency 11624: roundToNearestPixel */)(value3 / 2);
let withSpring = SpringModule.withSpring;
const binding = env1_11;
const AT_1188532 = AT_118853;
const object2 = {};
object2.state = state;
object2.TransitionStates = TransitionStates;
object2.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
object2.cleanUp = cleanUp;
AT_1188532.__closure = object2;
AT_1188532.__workletHash = 7334460639890;
AT_1188532.__initData = env1_13;
object.opacity = Reflect.apply(withSpring, SpringModule, [r12, binding, 'respect-motion-settings', AT_1188532]);
withSpring = SpringModule.withSpring;
let wrapperSpecsBinding = wrapperSpecs;
get = wrapperSpecsBinding.get;
const items2 = [{translateX: Reflect.apply(withSpring, SpringModule, [Reflect.apply(get, wrapperSpecsBinding, []).x,
UI_SHOW_HIDE_PHYSICS])}];
withSpring = SpringModule.withSpring;
get = wrapperSpecsBinding.get;
if (Reflect.apply(get, wrapperSpecsBinding, []).hidden) {
wrapperSpecsBinding = wrapperSpecs;
get = wrapperSpecsBinding.get;
value7 = Reflect.apply(get, wrapperSpecsBinding, []).height + CALL_TILE_GUTTER;
accessoryHeightsBinding = accessoryHeights;
get = accessoryHeightsBinding.get;
r4 = value7 + Reflect.apply(get, accessoryHeightsBinding, []);
} else {
get = gestureState.get;
if (Reflect.apply(get, gestureStateBinding, []).active) {
gestureStateBinding = gestureState;
get = gestureStateBinding.get;
if (Reflect.apply(get, gestureStateBinding, []).requiresPop) {
wrapperSpecsBinding = wrapperSpecs;
r4 = wrapperSpecsBinding.get().y;
} else {
wrapperSpecsBinding = wrapperSpecs;
get = wrapperSpecsBinding.get;
value7 = Reflect.apply(get, wrapperSpecsBinding, []).height + CALL_TILE_GUTTER;
accessoryHeightsBinding = accessoryHeights;
get = accessoryHeightsBinding.get;
r4 = value7 + Reflect.apply(get, accessoryHeightsBinding, []);
}
} else {
wrapperSpecsBinding = wrapperSpecs;
r4 = wrapperSpecsBinding.get().y;
}
}
} else {
wrapperSpecsBinding = wrapperSpecs;
r4 = wrapperSpecsBinding.get().y;
items2[1] = {translateY: Reflect.apply(withSpring, SpringModule, [r4, UI_SHOW_HIDE_PHYSICS])};
object.transform = items2;
return object;
function AT_118853(a0) { // fn#118853, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15718:2593, owner: VoicePanelFloatingCTAContainer.A.t, offset: 0x024f19f9, size: 107 bytes, params: 2, frame: 13
var r0;
var stateBinding;
var runOnJS;
var value2;
let value = a0;
if (value) {
value = environment.__proto__;
stateBinding = state;
value = environment.__proto__.__proto__;
value = stateBinding === (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates.YEETED;
r0 = value;
} else {
r0 = value;
}
if (r0) {
value = environment.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
runOnJS = value.runOnJS;
value2 = environment.__proto__;
Reflect.apply(runOnJS, value, [cleanUp])();
}
}
}
function VoicePanelFloatingCTAContainerChildren() { // fn#118854, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15718:3523, owner: VoicePanelFloatingCTAContainer.children, offset: 0x024f1a64, size: 37 bytes, params: 1, frame: 13
return <FloatingCTA {...env0_11} />;
}
}
items2[1] = {translateY: Reflect.apply(withSpring, moduleValue4, [r4, UI_SHOW_HIDE_PHYSICS])};
object3.transform = items2;
return object3;
}
function VoicePanelFloatingCTAContainerChildren() { // fn#118854, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15718:3523, owner: VoicePanelFloatingCTAContainer.children, offset: 0x024f1a64, size: 37 bytes, params: 1, frame: 13
return <FloatingCTA {...env0_11} />;
}
function AT_118853(a0) { // fn#118853, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15718:2593, owner: VoicePanelFloatingCTAContainer.A.t, offset: 0x024f19f9, size: 107 bytes, params: 2, frame: 13
var r0;
var stateBinding;
var runOnJS;
var value2;
let value = a0;
if (value) {
value = environment.__proto__;
stateBinding = state;
value = environment.__proto__.__proto__;
value = stateBinding === (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates.YEETED;
r0 = value;
} else {
r0 = value;
function getFloatingCTATotalViewHeight(a0) { // fn#118855, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15718:3766, offset: 0x024f1a89, size: 83 bytes, params: 2, frame: 15
const resolveRefreshToken = MobileVisualRefreshExperimentModule.resolveRefreshToken;
const TABLE_ROW_HEIGHT = (Native).modules.mobile.TABLE_ROW_HEIGHT;
return Reflect.apply(resolveRefreshToken, MobileVisualRefreshExperimentModule, [TABLE_ROW_HEIGHT, a0]) + 16;
}
if (r0) {
value = environment.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
runOnJS = value.runOnJS;
value2 = environment.__proto__;
Reflect.apply(runOnJS, value, [cleanUp])();
function renderVoicePanelFloatingCTA(a0, a1, a2, a3) { // fn#118856, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15718:3920, offset: 0x024f1adc, size: 117 bytes, params: 5, frame: 19
const ThemeContextProvider = (NativeModule).ThemeContextProvider;
const DARK = ThemeTypes.DARK;
return (
<ThemeContextProvider theme={DARK} key={a0}>
<VoicePanelFloatingCTAContainer
{...a1}
{...{['state']: a2}}
{...{['cleanUp']: a3}}
/>
</ThemeContextProvider>
);
}
}
global.__d(_fun118847, 15521, [57, 31, 1379, 11795, 11798, 482, 33, 1357, 697, 4501, 4572, 7975, 3868, 11794, 15414,
7014, 632, 15410, 4017, 11801, 4508, 11624, 4577, 8141, 10357,
2]) /* metro module 15521, dependencies: [57, 31, 1379, 11795, 11798, 482, 33, 1357, 697, 4501, 4572, 7975, 3868, 11794, 15414, 7014, 632, 15410, 4017, 11801, 4508, 11624, 4577, 8141, 10357, 2] */;
@@ -1,188 +1,247 @@
/* Metro module 15550; source: modules/voice_panel/native/controls/VoicePanelVoiceControls.tsx; dependencies: [31, 27, 1379, 11793, 33, 4501, 697, 4017, 11794, 15390, 9467, 3829, 15453, 10269, 12113, 4572, 6231, 15551, 1244, 10823, 566, 11644, 4559, 5321, 1581, 6821, 6618, 11803, 2] */
import ChannelStore from '../../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import ReanimatedRexport from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import MobileAudioOutputExperiment from '../../../media_engine/MobileAudioOutputExperiment.tsx'; /* Metro dependency 10269 */
import VoicePanelStateContext from '../VoicePanelStateContext.tsx'; /* Metro dependency 11794 */
import UseSelectedActiveStream from '../../../video_calls/native/useSelectedActiveStream.tsx'; /* Metro dependency 12113 */
import UseIsConnectedToVoiceChannel from '../hooks/useIsConnectedToVoiceChannel.tsx'; /* Metro dependency 15390 */
import MobileGoLiveEntrypointExperiment from '../../../go_live/MobileGoLiveEntrypointExperiment.tsx'; /* Metro dependency 15453 */
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 MetaQuestUtilsAndroidModule from '../../../device/MetaQuestUtils.android.tsx'; /* Metro dependency 1581 */
import * as UserSettingsModule from '../../../user_settings/UserSettings.tsx'; /* Metro dependency 3829 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as UseIsScreenReaderEnabledNativeModule from '../../../a11y/native/useIsScreenReaderEnabled.native.tsx'; /* Metro dependency 4559 */
import * as StackNativeModule from '../../../../design/components/Stack/native/Stack.native.tsx'; /* Metro dependency 4572 */
import * as Module05321Module from '../../../../by-id/module-05321.js'; /* Metro dependency 5321 */
import * as TableRowGroupNativeModule from '../../../../design/components/TableRow/native/TableRowGroup.native.tsx'; /* Metro dependency 6231 */
import * as SafeAreaViewModule from '../../../../components_native/common/SafeAreaView.tsx'; /* Metro dependency 6618 */
import * as UserSettingsVoiceProcessingModule from '../../../user_settings/voice/native/UserSettingsVoiceProcessing.tsx'; /* Metro dependency 10823 */
import * as CreateUseAnimatedScrollLockModule from './utils/createUseAnimatedScrollLock.tsx'; /* Metro dependency 11644 */
import * as VoicePanelControlsConstantsModule from './VoicePanelControlsConstants.tsx'; /* Metro dependency 11793 */
function _fun119002(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#119002, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15747:6, offset: 0x024f8a2f, size: 422 bytes, params: 8, frame: 26
var object2;
const env0_0 = require;
const NOOP_119003 = function() {
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const ScrollView = (require(27) /* metro dependency 27 */).ScrollView;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const CONTROLS_DRAWER_HEADER_EXPANDED_SIZE = (require(11793) /* metro dependency 11793: VoicePanelControlsConstants */).CONTROLS_DRAWER_HEADER_EXPANDED_SIZE;
const value2 = require(33) /* metro dependency 33 */;
const env0_5 = value2.jsx;
const env0_6 = value2.jsxs;
const env0_7 = value2.Fragment;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {};
let value = ReactModule;
const ScrollView = (ReactNativeModule).ScrollView;
const CONTROLS_DRAWER_HEADER_EXPANDED_SIZE = (VoicePanelControlsConstantsModule).CONTROLS_DRAWER_HEADER_EXPANDED_SIZE;
const createStyles = CreateStylesModule.createStyles;
object = {};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.scrollView = {flex: 1, paddingHorizontal: PX_16};
object.scrollView = {flex: 1, paddingHorizontal: PX_16};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.scrollViewScreenReader = {flex: 1, paddingHorizontal: PX_16,
marginTop: CONTROLS_DRAWER_HEADER_EXPANDED_SIZE};
object2.blurRegion = {height: CONTROLS_DRAWER_HEADER_EXPANDED_SIZE};
const env0_8 = Reflect.apply(createStyles, createStylesModule, [object2]);
const env0_9 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).createAnimatedComponent(ScrollView);
object.scrollViewScreenReader = {flex: 1, paddingHorizontal: PX_16, marginTop: CONTROLS_DRAWER_HEADER_EXPANDED_SIZE};
object.blurRegion = {height: CONTROLS_DRAWER_HEADER_EXPANDED_SIZE};
const env0_8 = Reflect.apply(createStyles, CreateStylesModule, [object]);
const env0_9 = (ReanimatedRexport).createAnimatedComponent(ScrollView);
const env0_10 = value.memo(_fun119004);
object2 = {top: CONTROLS_DRAWER_HEADER_EXPANDED_SIZE};
object2 = {code: 'function VoicePanelVoiceControlsTsx1({offset:offset}){const{isScrolled}=this.__closure;isScrolled.set(offset>0);}'};
object = {top: CONTROLS_DRAWER_HEADER_EXPANDED_SIZE};
object = {code: 'function VoicePanelVoiceControlsTsx1({offset:offset}){const{isScrolled}=this.__closure;isScrolled.set(offset>0);}'};
value = value.memo(VoicePanelVoiceControls);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/controls/VoicePanelVoiceControls.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/controls/VoicePanelVoiceControls.tsx');
exports.default = value;
}
function _fun119004({channel, openTab}) { // fn#119004, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15747:459, offset: 0x024f8bd5, size: 1355 bytes, params: 2, frame: 36
var r6;
var r5;
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
var items4;
var object15;
var value;
const binding = env0_3;
const useContext = binding.useContext;
const channelId = Reflect.apply(useContext, binding,
[importDefault(11794) /* metro dependency 11794: VoicePanelStateContext */]).channelId;
const value2 = (importDefault(15390) /* metro dependency 15390: useIsConnectedToVoiceChannel */)(channelId);
const value3 = (require(9467) /* metro dependency 9467: getEmbeddedActivityLaunchability */).useEmbeddedActivityLaunchability(channelId);
const DeveloperMode = (require(3829) /* metro dependency 3829: UserSettings */).DeveloperMode;
const value4 = DeveloperMode.useSetting();
const defaultImport = importDefault(15453) /* metro dependency 15453: MobileGoLiveEntrypointExperiment */;
let useConfig = defaultImport.useConfig;
const treatment = Reflect.apply(useConfig, defaultImport, [{location: 'VoicePanelVoiceControls'}]).treatment;
const defaultImport2 = importDefault(10269) /* metro dependency 10269: MobileAudioOutputExperiment */;
useConfig = defaultImport2.useConfig;
const nonContextualStreamOutputPresent = Reflect.apply(useConfig, defaultImport2,
[{location: 'VoicePanelVoiceControls'}]).nonContextualStreamOutputPresent;
const value5 = (importDefault(12113) /* metro dependency 12113: useSelectedActiveStream */)(channel);
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
if (value2) {
items4 = [((ActivitiesButton) => <ActivitiesButton openTab={openTab} />)((require(15551) /* metro dependency 15551: VoicePanelVoiceControlsButtons */).ActivitiesButton)];
items4[1] = (require(15453) /* metro dependency 15453: MobileGoLiveEntrypointExperiment */).MobileGoLiveEntrypointTreatment.SCREENSHARE_REPLACES_CHAT === treatment ? ((ChatButton) => <ChatButton openTab={openTab} />)((require(15551) /* metro dependency 15551: VoicePanelVoiceControlsButtons */).ChatButton) : (require(15453) /* metro dependency 15453: MobileGoLiveEntrypointExperiment */).MobileGoLiveEntrypointTreatment.SCREENSHARE_REPLACES_SOUNDBOARD === treatment ? ((SoundboardButton) => <SoundboardButton channel={channel} />)((require(15551) /* metro dependency 15551: VoicePanelVoiceControlsButtons */).SoundboardButton) : ((ScreenshareButton) => <ScreenshareButton channel={channel} />)((require(15551) /* metro dependency 15551: VoicePanelVoiceControlsButtons */).ScreenshareButton);
r6 = <TableRowGroup hasIcons>{items4}</TableRowGroup>;
} else {
r6 = value2;
}
const items2 = [r6];
const GameConsoles = (require(15551) /* metro dependency 15551: VoicePanelVoiceControlsButtons */).GameConsoles;
items2[1] = <GameConsoles channel={channel} connected={value2} />;
items2[2] = nonContextualStreamOutputPresent && ((StreamVolumeItem) => <StreamVolumeItem />)((require(15551) /* metro dependency 15551: VoicePanelVoiceControlsButtons */).StreamVolumeItem);
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const NiTd0e = (require(1244) /* metro dependency 1244: indexNative */).t.NiTd0e;
const DeafenSwitch = (require(15551) /* metro dependency 15551: VoicePanelVoiceControlsButtons */).DeafenSwitch;
const items3 = [<DeafenSwitch />];
const AudioRouteButton = (require(15551) /* metro dependency 15551: VoicePanelVoiceControlsButtons */).AudioRouteButton;
items3[1] = <AudioRouteButton channel={channel} connected={value2} />;
const HideNonVideoParticipants = (require(15551) /* metro dependency 15551: VoicePanelVoiceControlsButtons */).HideNonVideoParticipants;
items3[2] = <HideNonVideoParticipants channelId={channelId} />;
const HideSelfVideo = (require(15551) /* metro dependency 15551: VoicePanelVoiceControlsButtons */).HideSelfVideo;
items3[3] = <HideSelfVideo />;
items3[4] = value2 && ((InviteButton) => <InviteButton channel={channel} connected={value2} />)((require(15551) /* metro dependency 15551: VoicePanelVoiceControlsButtons */).InviteButton);
items2[3] = <TableRowGroup title={Reflect.apply(string, intl, [NiTd0e])} hasIcons>{items3}</TableRowGroup>;
const VoiceProcessingOptions = (require(10823) /* metro dependency 10823: UserSettingsVoiceProcessing */).VoiceProcessingOptions;
items2[4] = <VoiceProcessingOptions />;
const VoiceSettingsButton = (require(15551) /* metro dependency 15551: VoicePanelVoiceControlsButtons */).VoiceSettingsButton;
items2[5] = <TableRowGroup hasIcons><VoiceSettingsButton guildId={channel.guild_id} />{value5 != null && ((ReportStreamIssueButton) => <ReportStreamIssueButton stream={value5} />)((require(15551) /* metro dependency 15551: VoicePanelVoiceControlsButtons */).ReportStreamIssueButton)}</TableRowGroup>;
if (value2) {
if (value4) {
if (value3 !== (require(9467) /* metro dependency 9467: getEmbeddedActivityLaunchability */).EmbeddedActivityLaunchability.CAN_LAUNCH) {
r5 = null;
function _fun119004({channel, openTab}) { // fn#119004, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15747:459, offset: 0x024f8bd5, size: 1355 bytes, params: 2, frame: 36
var r6;
var r5;
const TableRowGroup = (TableRowGroupNativeModule).TableRowGroup;
var items4;
var object;
var value;
const binding = env0_3;
const useContext = binding.useContext;
const channelId = Reflect.apply(useContext, binding,
[VoicePanelStateContext]).channelId;
const value2 = (UseIsConnectedToVoiceChannel)(channelId);
const value3 = (require(9467) /* metro dependency 9467: getEmbeddedActivityLaunchability */).useEmbeddedActivityLaunchability(channelId);
const DeveloperMode = (UserSettingsModule).DeveloperMode;
const value4 = DeveloperMode.useSetting();
const defaultImport = MobileGoLiveEntrypointExperiment;
let useConfig = defaultImport.useConfig;
const treatment = Reflect.apply(useConfig, defaultImport, [{location: 'VoicePanelVoiceControls'}]).treatment;
const defaultImport2 = MobileAudioOutputExperiment;
useConfig = defaultImport2.useConfig;
const nonContextualStreamOutputPresent = Reflect.apply(useConfig, defaultImport2,
[{location: 'VoicePanelVoiceControls'}]).nonContextualStreamOutputPresent;
const value5 = (UseSelectedActiveStream)(channel);
const Stack = (StackNativeModule).Stack;
if (value2) {
const ActivitiesButton = (require(15551) /* metro dependency 15551: VoicePanelVoiceControlsButtons */).ActivitiesButton;
items4 = [
<ActivitiesButton openTab={openTab} />,
];
items4[1] = (
(require(15453) /* metro dependency 15453: MobileGoLiveEntrypointExperiment */).MobileGoLiveEntrypointTreatment.SCREENSHARE_REPLACES_CHAT === treatment
? ((ChatButton) => <ChatButton openTab={openTab} />)((require(15551) /* metro dependency 15551: VoicePanelVoiceControlsButtons */).ChatButton)
: (
(require(15453) /* metro dependency 15453: MobileGoLiveEntrypointExperiment */).MobileGoLiveEntrypointTreatment.SCREENSHARE_REPLACES_SOUNDBOARD === treatment
? ((SoundboardButton) => <SoundboardButton channel={channel} />)((require(15551) /* metro dependency 15551: VoicePanelVoiceControlsButtons */).SoundboardButton)
: ((ScreenshareButton) => <ScreenshareButton channel={channel} />)((require(15551) /* metro dependency 15551: VoicePanelVoiceControlsButtons */).ScreenshareButton)
)
);
r6 = (
<TableRowGroup hasIcons>
{items4}
</TableRowGroup>
);
} else {
r6 = value2;
}
const items2 = [r6];
const GameConsoles = (require(15551) /* metro dependency 15551: VoicePanelVoiceControlsButtons */).GameConsoles;
items2[1] = <GameConsoles channel={channel} connected={value2} />;
items2[2] = nonContextualStreamOutputPresent && ((StreamVolumeItem) => <StreamVolumeItem />)((require(15551) /* metro dependency 15551: VoicePanelVoiceControlsButtons */).StreamVolumeItem);
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const NiTd0e = (require(1244) /* metro dependency 1244: indexNative */).t.NiTd0e;
const DeafenSwitch = (require(15551) /* metro dependency 15551: VoicePanelVoiceControlsButtons */).DeafenSwitch;
const items3 = [
<DeafenSwitch />,
];
const AudioRouteButton = (require(15551) /* metro dependency 15551: VoicePanelVoiceControlsButtons */).AudioRouteButton;
items3[1] = <AudioRouteButton channel={channel} connected={value2} />;
const HideNonVideoParticipants = (require(15551) /* metro dependency 15551: VoicePanelVoiceControlsButtons */).HideNonVideoParticipants;
items3[2] = <HideNonVideoParticipants channelId={channelId} />;
const HideSelfVideo = (require(15551) /* metro dependency 15551: VoicePanelVoiceControlsButtons */).HideSelfVideo;
items3[3] = <HideSelfVideo />;
items3[4] = value2 && ((InviteButton) => <InviteButton channel={channel} connected={value2} />)((require(15551) /* metro dependency 15551: VoicePanelVoiceControlsButtons */).InviteButton);
items2[3] = (
<TableRowGroup title={Reflect.apply(string, intl, [NiTd0e])} hasIcons>
{items3}
</TableRowGroup>
);
const VoiceProcessingOptions = (UserSettingsVoiceProcessingModule).VoiceProcessingOptions;
items2[4] = <VoiceProcessingOptions />;
const VoiceSettingsButton = (require(15551) /* metro dependency 15551: VoicePanelVoiceControlsButtons */).VoiceSettingsButton;
items2[5] = (
<TableRowGroup hasIcons>
<VoiceSettingsButton guildId={channel.guild_id} />
{value5 != null && ((ReportStreamIssueButton) => <ReportStreamIssueButton stream={value5} />)((require(15551) /* metro dependency 15551: VoicePanelVoiceControlsButtons */).ReportStreamIssueButton)}
</TableRowGroup>
);
if (value2) {
if (value4) {
if (value3 !== (require(9467) /* metro dependency 9467: getEmbeddedActivityLaunchability */).EmbeddedActivityLaunchability.CAN_LAUNCH) {
r5 = null;
} else {
var tableRowGroupProps = {title: intl.string((require(1244) /* metro dependency 1244: indexNative */).t.J6rqB7),
hasIcons: true};
const LeaveActivitiesButton = (require(15551) /* metro dependency 15551: VoicePanelVoiceControlsButtons */).LeaveActivitiesButton;
value = <LeaveActivitiesButton />;
value = (
<TableRowGroup {...tableRowGroupProps}>
{value}
{((ShareActivityLogsButton) => <ShareActivityLogsButton />)((require(15551) /* metro dependency 15551: VoicePanelVoiceControlsButtons */).ShareActivityLogsButton)}
{((ToggleShowActivitiesDebugOverlay) => <ToggleShowActivitiesDebugOverlay />)((require(15551) /* metro dependency 15551: VoicePanelVoiceControlsButtons */).ToggleShowActivitiesDebugOverlay)}
</TableRowGroup>
);
r5 = value;
}
} else {
var tableRowGroupProps = {title: intl.string((require(1244) /* metro dependency 1244: indexNative */).t.J6rqB7),
hasIcons: true};
const LeaveActivitiesButton = (require(15551) /* metro dependency 15551: VoicePanelVoiceControlsButtons */).LeaveActivitiesButton;
value = <LeaveActivitiesButton />;
value = <TableRowGroup {...tableRowGroupProps}>{value}{((ShareActivityLogsButton) => <ShareActivityLogsButton />)((require(15551) /* metro dependency 15551: VoicePanelVoiceControlsButtons */).ShareActivityLogsButton)}{((ToggleShowActivitiesDebugOverlay) => <ToggleShowActivitiesDebugOverlay />)((require(15551) /* metro dependency 15551: VoicePanelVoiceControlsButtons */).ToggleShowActivitiesDebugOverlay)}</TableRowGroup>;
r5 = value;
r5 = null;
}
} else {
r5 = null;
}
} else {
r5 = null;
items2[6] = r5;
return (
<Stack spacing={24}>
{items2}
</Stack>
);
}
items2[6] = r5;
return (
<Stack spacing={24}>
{items2}
</Stack>
);
}
function VoicePanelVoiceControls({isVisible, openTab}) { // fn#119005, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15747:2315, offset: 0x024f9120, size: 723 bytes, params: 2, frame: 29
var r5;
var value;
const styles = useStyles();
let binding = env0_3;
let useContext = binding.useContext;
const env0_1 = Reflect.apply(useContext, binding,
[importDefault(11794) /* metro dependency 11794: VoicePanelStateContext */]).channelId;
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channelId);
});
const value2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(false);
const useCallback = binding.useCallback;
const closure = VoicePanelVoiceControlsS;
closure.__closure = {isScrolled: value2};
closure.__workletHash = 16758626276795;
closure.__initData = env0_12;
const value3 = Reflect.apply(useCallback, binding, [closure, [value2]]);
useContext = binding.useContext;
const ControlsGestureScrollLock = (require(11644) /* metro dependency 11644: createUseAnimatedScrollLock */).ControlsGestureScrollLock;
const {onScroll, gestureRef, scrollerRef, animatedProps} = Reflect.apply(useContext, binding,
[ControlsGestureScrollLock])({onScrollHandlerWorkletized: value3});
const value6 = (require(4559) /* metro dependency 4559: useIsScreenReaderEnabledNative */).useIsScreenReaderEnabled();
binding.useEffect(function() {
var current;
if (isVisible && scrollerRef != null) {
current = scrollerRef.current;
if (current != null) {
current.scrollTo({'x': 0, 'y': 0, 'animated': false});
function VoicePanelVoiceControls({isVisible, openTab}) { // fn#119005, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15747:2315, offset: 0x024f9120, size: 723 bytes, params: 2, frame: 29
var r5;
var value;
const styles = useStyles();
let binding = env0_3;
let useContext = binding.useContext;
const env0_1 = Reflect.apply(useContext, binding,
[VoicePanelStateContext]).channelId;
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channelId);
});
const value2 = (ReanimatedRexportModule).useSharedValue(false);
const useCallback = binding.useCallback;
const VoicePanelVoiceControlsS2 = VoicePanelVoiceControlsS;
VoicePanelVoiceControlsS2.__closure = {isScrolled: value2};
VoicePanelVoiceControlsS2.__workletHash = 16758626276795;
VoicePanelVoiceControlsS2.__initData = env0_12;
const value3 = Reflect.apply(useCallback, binding, [VoicePanelVoiceControlsS2, [value2]]);
useContext = binding.useContext;
const ControlsGestureScrollLock = (CreateUseAnimatedScrollLockModule).ControlsGestureScrollLock;
const {onScroll, gestureRef, scrollerRef, animatedProps} = Reflect.apply(useContext, binding,
[ControlsGestureScrollLock])({onScrollHandlerWorkletized: value3});
const value6 = (UseIsScreenReaderEnabledNativeModule).useIsScreenReaderEnabled();
binding.useEffect(function() {
var current;
if (isVisible && scrollerRef != null) {
current = scrollerRef.current;
if (current != null) {
current.scrollTo({'x': 0, 'y': 0, 'animated': false});
}
}
}, [isVisible, scrollerRef]);
const value7 = binding.useMemo(_fun119009, [gestureRef]);
const jsxRuntimeEnv0_7Binding = jsxRuntimeEnv0_7;
const GestureDetector = (Module05321Module).GestureDetector;
binding = env0_9;
const bindingProps = {style: value6 ? styles.scrollViewScreenReader : styles.scrollView, ref: scrollerRef,
onScroll: onScroll, animatedProps: animatedProps, onMomentumScrollEnd: NOOP_119003,
scrollEventThrottle: 8.333333333333334, scrollIndicatorInsets: env0_11};
const value8 = !value6;
const items2 = [
value6
? value8
: ((Component) => <Component style={styles.blurRegion} />)(importDefault(6821) /* metro dependency 6821: NativeView */),
];
items2[1] = channel != null && ((Component) => <Component channel={channel} openTab={openTab} />)(env0_10);
const SafeAreaPaddingView = (SafeAreaViewModule).SafeAreaPaddingView;
items2[2] = <SafeAreaPaddingView bottom />;
const gestureDetector = (
<GestureDetector gesture={value7}>
{((Component) => <Component {...bindingProps}>{items2}</Component>)(binding)}
</GestureDetector>
);
if (value6) {
r5 = value8;
} else {
value = importDefault(11803) /* metro dependency 11803: VoicePanelHeaderGlassBlur */;
value = ((Component) => <Component shown={value2} style={styles.blurRegion} />)(value);
r5 = value;
}
}, [isVisible, scrollerRef]);
const value7 = binding.useMemo(_fun119009, [gestureRef]);
const jsxRuntimeEnv0_7Binding = jsxRuntimeEnv0_7;
const GestureDetector = (require(5321) /* metro dependency 5321 */).GestureDetector;
binding = env0_9;
const bindingProps = {style: value6 ? styles.scrollViewScreenReader : styles.scrollView, ref: scrollerRef,
onScroll: onScroll, animatedProps: animatedProps, onMomentumScrollEnd: NOOP_119003,
scrollEventThrottle: 8.333333333333334, scrollIndicatorInsets: env0_11};
const value8 = !value6;
const items2 = [value6 ? value8 : ((Component) => <Component style={styles.blurRegion} />)(importDefault(6821) /* metro dependency 6821: NativeView */)];
items2[1] = channel != null && ((Component) => <Component channel={channel} openTab={openTab} />)(env0_10);
const SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
items2[2] = <SafeAreaPaddingView bottom />;
const gestureDetector = <GestureDetector gesture={value7}>{((Component) => <Component {...bindingProps}>{items2}</Component>)(binding)}</GestureDetector>;
if (value6) {
r5 = value8;
} else {
value = importDefault(11803) /* metro dependency 11803: VoicePanelHeaderGlassBlur */;
value = ((Component) => <Component shown={value2} style={styles.blurRegion} />)(value);
r5 = value;
return (
<>
{gestureDetector}
{r5}
</>
);
function VoicePanelVoiceControlsS({offset}) { // fn#119007, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15747:2525, owner: VoicePanelVoiceControls.s, offset: 0x024f93f3, size: 36 bytes, params: 2, frame: 12
env0_2.set(offset > 0);
}
function _fun119009() { // fn#119009, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15747:2939, offset: 0x024f945a, size: 109 bytes, params: 1, frame: 14
let value = environment.__proto__;
const Gesture = (Module05321Module).Gesture;
const enabled = Gesture.Native().enabled;
value = Reflect.apply(enabled, value, [!MetaQuestUtilsAndroidModule.isMetaQuest()]);
return gestureRef == null ? value : value.simultaneousWithExternalGesture(gestureRef);
}
}
return (
<>
{gestureDetector}
{r5}
</>
);
}
function VoicePanelVoiceControlsS({offset}) { // fn#119007, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15747:2525, owner: VoicePanelVoiceControls.s, offset: 0x024f93f3, size: 36 bytes, params: 2, frame: 12
env0_2.set(offset > 0);
}
function _fun119009() { // fn#119009, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15747:2939, offset: 0x024f945a, size: 109 bytes, params: 1, frame: 14
let value = environment.__proto__;
const Gesture = (require(5321) /* metro dependency 5321 */).Gesture;
const enabled = Gesture.Native().enabled;
const metaQuestUtilsAndroidModule = require(1581) /* metro dependency 1581: MetaQuestUtilsAndroid */;
value = Reflect.apply(enabled, value, [!metaQuestUtilsAndroidModule.isMetaQuest()]);
return gestureRef == null ? value : value.simultaneousWithExternalGesture(gestureRef);
}
global.__d(_fun119002, 15550, [31, 27, 1379, 11793, 33, 4501, 697, 4017, 11794, 15390, 9467, 3829, 15453, 10269,
12113, 4572, 6231, 15551, 1244, 10823, 566, 11644, 4559, 5321, 1581, 6821, 6618, 11803,
2]) /* metro module 15550, dependencies: [31, 27, 1379, 11793, 33, 4501, 697, 4017, 11794, 15390, 9467, 3829, 15453, 10269, 12113, 4572, 6231, 15551, 1244, 10823, 566, 11644, 4559, 5321, 1581, 6821, 6618, 11803, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,63 +1,77 @@
/* Metro module 15499; source: modules/voice_panel/native/controls/activities/ActivityItemMissingCard.tsx; dependencies: [5, 31, 27, 33, 4501, 697, 11794, 6771, 8106, 10718, 5278, 15500, 15501, 6821, 2] */
import Module00005 from '../../../../../by-id/module-00005.js'; /* Metro dependency 5 */
import UseAnalyticsLocations from '../../../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
import UseEmbeddedActivityBackground from '../../../../activities/utils/useEmbeddedActivityBackground.tsx'; /* Metro dependency 10718 */
import VoicePanelStateContext from '../../VoicePanelStateContext.tsx'; /* Metro dependency 11794 */
import ActivityShelfItemBackground from './ActivityShelfItemBackground.tsx'; /* Metro dependency 15500 */
import ActivityShelfItemSummary from './ActivityShelfItemSummary.tsx'; /* Metro dependency 15501 */
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 CreateStylesModule from '../../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as PressablesModule from '../../../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
function _fun118676(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118676, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15696:6, offset: 0x024e793f, size: 327 bytes, params: 8, frame: 23
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
let value = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).ActivityIndicator;
const value2 = require(33) /* metro dependency 33 */;
const env0_6 = value2.jsx;
const env0_7 = value2.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {};
let value = ReactModule;
const createStyles = CreateStylesModule.createStyles;
object = {};
let BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object2.loadingActivity = {'width': '100%', 'height': '100%', 'alignItems': 'center', 'justifyContent': 'center',
object.loadingActivity = {'width': '100%', 'height': '100%', 'alignItems': 'center', 'justifyContent': 'center',
backgroundColor: BACKGROUND_SURFACE_HIGH};
BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object2.disabledActivity = {'width': '100%', 'height': '100%', backgroundColor: BACKGROUND_SURFACE_HIGH};
const env0_8 = Reflect.apply(createStyles, createStylesModule, [object2]);
object.disabledActivity = {'width': '100%', 'height': '100%', backgroundColor: BACKGROUND_SURFACE_HIGH};
const env0_8 = Reflect.apply(createStyles, CreateStylesModule, [object]);
value = value.memo(ActivityItemMissingCard);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/controls/activities/ActivityItemMissingCard.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/controls/activities/ActivityItemMissingCard.tsx');
exports.default = value;
}
function ActivityItemEmptyCard({activity, application}) { // fn#118677, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15696:442, offset: 0x024e7a86, size: 403 bytes, params: 2, frame: 25
const styles = useStyles();
const value2 = env0_4.useContext(VoicePanelStateContext);
const channelId = value2.channelId;
const {width, height} = value2.layoutManager.getTargetDimensions(undefined);
const analyticsLocations = (UseAnalyticsLocations)().analyticsLocations;
const value5 = env0_4.useCallback(analyticsLocations(_fun118679), [activity.launchId, analyticsLocations,
application, channelId]);
const value6 = (UseEmbeddedActivityBackground)({applicationId: activity.applicationId,
size: width, names: ['embedded_background']});
const PressableOpacity = (PressablesModule).PressableOpacity;
return (
<PressableOpacity
activeOpacity={0.7}
onPress={value5}
style={styles.disabledActivity}
>
{((Component) => <Component imageBackground={value6} aspectRatio={width / height} />)(ActivityShelfItemBackground)}
{((Component) => <Component channelId={channelId} applicationId={application.id} applicationName={application.name} />)(ActivityShelfItemSummary)}
</PressableOpacity>
);
function* _fun118679() { // fn#118679, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15696:666, offset: 0x024e7c24, size: 117 bytes, params: 1, frame: 16
if (true) {
value = environment.__proto__.__proto__;
value = env2_0(env2_2[8]);
yield value.maybeJoinEmbeddedActivity({channelId: dependencyMap, applicationId: importDefault.id,
launchId: require.launchId, inputApplication: importDefault, analyticsLocations: env1_3});
}
}
function ActivityItemEmptyCard({activity, application}) { // fn#118677, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15696:442, offset: 0x024e7a86, size: 403 bytes, params: 2, frame: 25
const styles = useStyles();
const value2 = env0_4.useContext(importDefault(11794) /* metro dependency 11794: VoicePanelStateContext */);
const channelId = value2.channelId;
const {width, height} = value2.layoutManager.getTargetDimensions(undefined);
const analyticsLocations = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().analyticsLocations;
const value5 = env0_4.useCallback(analyticsLocations(_fun118679), [activity.launchId, analyticsLocations,
application, channelId]);
const value6 = (importDefault(10718) /* metro dependency 10718: useEmbeddedActivityBackground */)({applicationId: activity.applicationId,
size: width, names: ['embedded_background']});
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
return (
<PressableOpacity
activeOpacity={0.7}
onPress={value5}
style={styles.disabledActivity}
>
{((Component) => <Component imageBackground={value6} aspectRatio={width / height} />)(importDefault(15500) /* metro dependency 15500: ActivityShelfItemBackground */)}
{((Component) => <Component channelId={channelId} applicationId={application.id} applicationName={application.name} />)(importDefault(15501) /* metro dependency 15501: ActivityShelfItemSummary */)}
</PressableOpacity>
);
}
function ActivityItemMissingCard({activity, application}) { // fn#118680, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15696:1146, offset: 0x024e7c99, size: 136 bytes, params: 2, frame: 18
const styles = useStyles();
return activity == null || application == null ? ((Component) => <Component style={styles.loadingActivity}><ActivityIndicator size="large" /></Component>)(importDefault(6821) /* metro dependency 6821: NativeView */) : <ActivityItemEmptyCard activity={activity} application={application} />;
}
function* _fun118679() { // fn#118679, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15696:666, offset: 0x024e7c24, size: 117 bytes, params: 1, frame: 16
if (true) {
value = environment.__proto__.__proto__;
value = env2_0(env2_2[8]);
yield value.maybeJoinEmbeddedActivity({channelId: dependencyMap, applicationId: importDefault.id,
launchId: require.launchId, inputApplication: importDefault, analyticsLocations: env1_3});
}
function ActivityItemMissingCard({activity, application}) { // fn#118680, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15696:1146, offset: 0x024e7c99, size: 136 bytes, params: 2, frame: 18
const styles = useStyles();
return (
activity == null || application == null
? ((Component) => <Component style={styles.loadingActivity}><ActivityIndicator size="large" /></Component>)(importDefault(6821) /* metro dependency 6821: NativeView */)
: (
<ActivityItemEmptyCard activity={activity} application={application} />
)
);
}
}
global.__d(_fun118676, 15499, [5, 31, 27, 33, 4501, 697, 11794, 6771, 8106, 10718, 5278, 15500, 15501, 6821,
2]) /* metro module 15499, dependencies: [5, 31, 27, 33, 4501, 697, 11794, 6771, 8106, 10718, 5278, 15500, 15501, 6821, 2] */;
@@ -1,186 +1,243 @@
/* Metro module 15503; source: modules/voice_panel/native/controls/activities/ActivityShelfItem.tsx; dependencies: [31, 1309, 33, 4501, 697, 4000, 11680, 11598, 6821, 15501, 1852, 8092, 5068, 10718, 7502, 5278, 3868, 15500, 11627, 1305, 15504, 15502, 4617, 12070, 4573, 11684, 1244, 2] */
import GetDevicePixelRatioNative from '../../../../../utils/getDevicePixelRatio.native.tsx'; /* Metro dependency 1852 */
import NativeView from '../../../../core/native/NativeView.tsx'; /* Metro dependency 6821 */
import EmbeddedActivitiesNativeManager from '../../../../activities/native/EmbeddedActivitiesNativeManager.tsx'; /* Metro dependency 8092 */
import UseEmbeddedActivityBackground from '../../../../activities/utils/useEmbeddedActivityBackground.tsx'; /* Metro dependency 10718 */
import UseActivityShelfItem from '../../../../activities/utils/useActivityShelfItem.tsx'; /* Metro dependency 11598 */
import UseLaunchingActivityButtonState from '../../../../app_launcher/utils/useLaunchingActivityButtonState.tsx'; /* Metro dependency 11680 */
import Module12070 from '../../../../../by-id/module-12070.js'; /* Metro dependency 12070 */
import ActivityShelfItemBackground from './ActivityShelfItemBackground.tsx'; /* Metro dependency 15500 */
import UseActivityUsers from '../../../../activities/useActivityUsers.tsx'; /* Metro dependency 15502 */
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 */
import * as FormConstantsModule from '../../../../../design/void/Form/native/FormConstants.tsx'; /* Metro dependency 1309 */
import * as NativeModule2 from '../../../../../external/discord_common/js/packages/design/native.tsx'; /* Metro dependency 3868 */
import * as ColorUtilsModule from '../../../../../utils/ColorUtils.tsx'; /* Metro dependency 4000 */
import * as TextModule from '../../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ApplicationCommandTypesModule from '../../../../application_commands/ApplicationCommandTypes.tsx'; /* Metro dependency 5068 */
import * as PressablesModule from '../../../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as TestModeUtilsModule from '../../../../game_store/TestModeUtils.tsx'; /* Metro dependency 7502 */
import * as UseActivityShelfItemModule from '../../../../activities/utils/useActivityShelfItem.tsx'; /* Metro dependency 11598 */
function _fun118694(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118694, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15700:6, offset: 0x024e84d6, size: 542 bytes, params: 8, frame: 25
var object5;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(1309) /* metro dependency 1309: FormConstants */).ANDROID_FOREGROUND_RIPPLE;
let value = require(33) /* metro dependency 33 */;
let value = JsxRuntimeModule;
const env0_5 = value.jsx;
const env0_6 = value.Fragment;
const env0_7 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object5 = {};
const object6 = {'borderRadius': null, 'overflow': 'hidden', 'height': 120, 'position': 'relative',
object = {};
const object2 = {'borderRadius': null, 'overflow': 'hidden', 'height': 120, 'position': 'relative',
'backgroundColor': 'black', 'justifyContent': 'center'};
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
object5.container = object6;
object5.imageOuterContainer = {'justifyContent': 'center', 'alignItems': 'center'};
object5.ongoingActivityJoinedContainer = {'position': 'absolute', 'width': '100%', 'height': '100%',
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
object.container = object2;
object.imageOuterContainer = {'justifyContent': 'center', 'alignItems': 'center'};
object.ongoingActivityJoinedContainer = {'position': 'absolute', 'width': '100%', 'height': '100%',
'backgroundColor': 'rgba(255,255,255,0.5)', 'zIndex': 1};
const object7 = {};
const colorUtilsModule = require(4000) /* metro dependency 4000: ColorUtils */;
const hexWithOpacity = colorUtilsModule.hexWithOpacity;
const object3 = {};
const hexWithOpacity = ColorUtilsModule.hexWithOpacity;
const BLACK = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BLACK;
object7.backgroundColor = Reflect.apply(hexWithOpacity, colorUtilsModule, [BLACK, 0.5]);
object7.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object5.overlayBubble = object7;
object5.participantsContainer = {'paddingHorizontal': 8, 'position': 'absolute', 'left': 8, 'bottom': 8,
object3.backgroundColor = Reflect.apply(hexWithOpacity, ColorUtilsModule, [BLACK, 0.5]);
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object.overlayBubble = object3;
object.participantsContainer = {'paddingHorizontal': 8, 'position': 'absolute', 'left': 8, 'bottom': 8,
'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'center', 'height': 20};
object5.participantsText = {'marginLeft': 4, 'lineHeight': 20};
const object8 = {'position': 'absolute', 'top': 4, 'right': 4, 'width': 22, 'height': 22, 'borderRadius': null,
object.participantsText = {'marginLeft': 4, 'lineHeight': 20};
const object4 = {'position': 'absolute', 'top': 4, 'right': 4, 'width': 22, 'height': 22, 'borderRadius': null,
'backgroundColor': null, 'alignItems': 'center', 'justifyContent': 'center'};
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
const BACKGROUND_MOD_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_STRONG;
object8.backgroundColor = BACKGROUND_MOD_STRONG;
object5.developerIconContainer = object8;
object4.backgroundColor = BACKGROUND_MOD_STRONG;
object.developerIconContainer = object4;
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
object5.developerIconColor = {color: WHITE};
const env0_8 = Reflect.apply(createStyles, value, [object5]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/controls/activities/ActivityShelfItem.tsx');
object.developerIconColor = {color: WHITE};
const env0_8 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/controls/activities/ActivityShelfItem.tsx');
exports.default = ActivityShelfItem;
}
function ActivityActionOverlay({action, applicationId, context, activityItem, launchingComponentId}) { // fn#118695, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15700:1133, offset: 0x024e86f4, size: 360 bytes, params: 2, frame: 24
var jsxRuntimeEnv0_6Binding;
var items2;
const submitting = (UseLaunchingActivityButtonState)({applicationId: applicationId,
context: context, launchingComponentId: launchingComponentId}).submitting;
const styles = useStyles();
const application = activityItem.application;
const id2 = application.id;
const name = application.name;
const ActivityAction = (require(11598) /* metro dependency 11598: useActivityShelfItem */).ActivityAction;
const JOIN = ActivityAction.JOIN;
if (JOIN === action) {
jsxRuntimeEnv0_6Binding = jsxRuntimeEnv0_6;
items2 = [
action === (require(11598) /* metro dependency 11598: useActivityShelfItem */).ActivityAction.LEAVE && ((Component) => <Component style={styles.ongoingActivityJoinedContainer} />)(importDefault(6821) /* metro dependency 6821: NativeView */),
];
items2[1] = ((Component) => <Component channelId={context.type !== 'channel' ? undefined : context.channel.id} applicationId={id2} applicationName={name} submitting={submitting} />)(importDefault(15501) /* metro dependency 15501: ActivityShelfItemSummary */);
return (
<>
{items2}
</>
);
}
const LEAVE = ActivityAction.LEAVE;
if (LEAVE === action) {
jsxRuntimeEnv0_6Binding = jsxRuntimeEnv0_6;
items2 = [
action === (require(11598) /* metro dependency 11598: useActivityShelfItem */).ActivityAction.LEAVE && ((Component) => <Component style={styles.ongoingActivityJoinedContainer} />)(importDefault(6821) /* metro dependency 6821: NativeView */),
];
items2[1] = ((Component) => <Component channelId={context.type !== 'channel' ? undefined : context.channel.id} applicationId={id2} applicationName={name} submitting={submitting} />)(importDefault(15501) /* metro dependency 15501: ActivityShelfItemSummary */);
return (
<>
{items2}
</>
);
}
return null;
}
function ActivityActionOverlay({action, applicationId, context, activityItem, launchingComponentId}) { // fn#118695, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15700:1133, offset: 0x024e86f4, size: 360 bytes, params: 2, frame: 24
var jsxRuntimeEnv0_6Binding;
var items2;
const submitting = (importDefault(11680) /* metro dependency 11680: useLaunchingActivityButtonState */)({applicationId: applicationId,
context: context, launchingComponentId: launchingComponentId}).submitting;
const styles = useStyles();
const application = activityItem.application;
const id2 = application.id;
const name = application.name;
const ActivityAction = (require(11598) /* metro dependency 11598: useActivityShelfItem */).ActivityAction;
const JOIN = ActivityAction.JOIN;
if (JOIN === action) {
jsxRuntimeEnv0_6Binding = jsxRuntimeEnv0_6;
items2 = [action === (require(11598) /* metro dependency 11598: useActivityShelfItem */).ActivityAction.LEAVE && ((Component) => <Component style={styles.ongoingActivityJoinedContainer} />)(importDefault(6821) /* metro dependency 6821: NativeView */)];
items2[1] = ((Component) => <Component channelId={context.type !== 'channel' ? undefined : context.channel.id} applicationId={id2} applicationName={name} submitting={submitting} />)(importDefault(15501) /* metro dependency 15501: ActivityShelfItemSummary */);
function ParticipantsText({action, activityItem, channelId, guildId}) { // fn#118696, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15700:1673, offset: 0x024e885c, size: 512 bytes, params: 2, frame: 30
var r8;
var intl;
var value;
const styles = useStyles();
const value3 = (UseActivityUsers)(activityItem.application.id,
channelId);
const name = (importDefault(4617) /* metro dependency 4617: NicknameUtils */).getName(guildId, channelId,
value3?.[0]);
const items2 = [styles.participantsContainer];
items2[1] = styles.overlayBubble;
const Icon = (NativeModule).Icon;
const object2 = {source: Module12070};
const Icon2 = (NativeModule).Icon;
const Sizes = Icon2.Sizes;
const EXTRA_SMALL = Sizes.EXTRA_SMALL;
object2.size = EXTRA_SMALL;
object2.color = 'white';
const icon = <Icon {...object2} />;
const Text = (TextModule).Text;
const ActivityAction = (UseActivityShelfItemModule).ActivityAction;
const START = ActivityAction.START;
if (action === START) {
value = require(11684) /* metro dependency 11684: getItemSubtitleForMaxPlayers */;
value = value.getItemSubtitleForMaxPlayersShort(activityItem.application.maxParticipants ?? 0);
r8 = value;
} else if (value3.length <= 1) {
r8 = name;
} else {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r8 = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.cpe6CK,
{count: value3.length - 1, username: name});
}
return (
<>
{items2}
</>
<NativeView style={items2}>
{icon}
<Text
lineClamp={1}
style={styles.participantsText}
variant="text-xxs/medium"
color="always-white"
>
{r8}
</Text>
</NativeView>
);
}
const LEAVE = ActivityAction.LEAVE;
if (LEAVE === action) {
jsxRuntimeEnv0_6Binding = jsxRuntimeEnv0_6;
items2 = [action === (require(11598) /* metro dependency 11598: useActivityShelfItem */).ActivityAction.LEAVE && ((Component) => <Component style={styles.ongoingActivityJoinedContainer} />)(importDefault(6821) /* metro dependency 6821: NativeView */)];
items2[1] = ((Component) => <Component channelId={context.type !== 'channel' ? undefined : context.channel.id} applicationId={id2} applicationName={name} submitting={submitting} />)(importDefault(15501) /* metro dependency 15501: ActivityShelfItemSummary */);
return (
<>
{items2}
</>
);
}
return null;
}
function ParticipantsText({action, activityItem, channelId, guildId}) { // fn#118696, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15700:1673, offset: 0x024e885c, size: 512 bytes, params: 2, frame: 30
var r8;
var intl;
var value;
const styles = useStyles();
const value3 = (importDefault(15502) /* metro dependency 15502: useActivityUsers */)(activityItem.application.id,
channelId);
const name = (importDefault(4617) /* metro dependency 4617: NicknameUtils */).getName(guildId, channelId,
value3?.[0]);
const NativeView = importDefault(6821) /* metro dependency 6821: NativeView */;
const items2 = [styles.participantsContainer];
items2[1] = styles.overlayBubble;
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
const object = {source: importDefault(12070) /* metro dependency 12070 */};
const Icon2 = (require(1305) /* metro dependency 1305: native */).Icon;
const Sizes = Icon2.Sizes;
const EXTRA_SMALL = Sizes.EXTRA_SMALL;
object.size = EXTRA_SMALL;
object.color = 'white';
const icon = <Icon {...object} />;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const ActivityAction = (require(11598) /* metro dependency 11598: useActivityShelfItem */).ActivityAction;
const START = ActivityAction.START;
if (action === START) {
value = require(11684) /* metro dependency 11684: getItemSubtitleForMaxPlayers */;
value = value.getItemSubtitleForMaxPlayersShort(activityItem.application.maxParticipants ?? 0);
r8 = value;
} else if (value3.length <= 1) {
r8 = name;
} else {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r8 = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.cpe6CK,
{count: value3.length - 1, username: name});
}
return (
<NativeView style={items2}>
{icon}
<Text
lineClamp={1}
style={styles.participantsText}
variant="text-xxs/medium"
color="always-white"
function ActivityShelfItem({itemDimensions, activityItem, context, guildId, locationObject, onActivityItemSelected, disableBadges}) { // fn#118697, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15700:2443, offset: 0x024e8a5c, size: 1136 bytes, params: 2, frame: 42
var r17;
const ActivityAction = (UseActivityShelfItemModule).ActivityAction;
disableBadges = !(disableBadges === undefined) && disableBadges;
const styles = useStyles();
const channel = context.type !== 'channel' ? null : context.channel;
const width = itemDimensions.width;
const height = itemDimensions.height;
const value5 = width * (GetDevicePixelRatioNative)();
const value6 = ReactModule.useId();
const defaultImport = UseActivityShelfItem;
let object = {activityItem: activityItem, context: context, guildId: guildId, locationObject: locationObject,
onActivityItemSelected: onActivityItemSelected,
embeddedActivitiesManager: EmbeddedActivitiesNativeManager,
backgroundResolution: value5, assetNames: ['embedded_cover'], launchingComponentId: value6};
const CommandOrigin = (ApplicationCommandTypesModule).CommandOrigin;
const VOICE_UI = CommandOrigin.VOICE_UI;
object.commandOrigin = VOICE_UI;
var {imageBackground, activityAction, onActivityItemSelected, labelType} = defaultImport(object);
const value8 = (UseEmbeddedActivityBackground)({applicationId: activityItem.application.id,
size: value5, names: ['embedded_background']});
if (disableBadges) {
r17 = !disableBadges;
} else {
object = [ActivityAction.LEAVE];
object[1] = ActivityAction.JOIN;
r17 = !object.includes(activityAction);
}
const value11 = (TestModeUtilsModule).useIsTestModeForApplication(activityItem.application.id);
const PressableOpacity = (PressablesModule).PressableOpacity;
const LEAVE = ActivityAction.LEAVE;
const items2 = [styles.container];
items2[1] = {width: width, height: height};
const ThemeContextProvider = (NativeModule2).ThemeContextProvider;
const name = activityItem.application.name;
let START = ActivityAction.START;
const items3 = [
<NativeView style={styles.imageOuterContainer}>
<ActivityShelfItemBackground
accessibilityLabel={name}
imageBackground={activityAction !== START ? value8 : imageBackground}
aspectRatio={width / height}
/>
<ActivityActionOverlay
action={activityAction}
applicationId={activityItem.application.id}
context={context}
activityItem={activityItem}
launchingComponentId={value6}
/>
</NativeView>,
];
items3[1] = (
r17
? ((Component) => <Component labelType={labelType} />)(importDefault(11627) /* metro dependency 11627: ActivityShelfBadge */)
: null
);
items3[2] = (
r17 && value11
? (
<NativeView style={styles.developerIconContainer}>
{((Icon) => <Icon size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.REFRESH_SMALL_16} source={importDefault(15504) /* metro dependency 15504 */} color={styles.developerIconColor.color} />)((require(1305) /* metro dependency 1305: native */).Icon)}
</NativeView>
)
: null
);
const themeContextProvider = (
<ThemeContextProvider theme="dark">
{items3}
</ThemeContextProvider>
);
START = ActivityAction.START;
return (
<PressableOpacity
activeOpacity={0.7}
onPress={onActivityItemSelected}
disabled={activityAction === LEAVE}
androidRippleConfig={ANDROID_FOREGROUND_RIPPLE}
style={items2}
>
{r8}
</Text>
</NativeView>
);
}
function ActivityShelfItem({itemDimensions, activityItem, context, guildId, locationObject, onActivityItemSelected, disableBadges}) { // fn#118697, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15700:2443, offset: 0x024e8a5c, size: 1136 bytes, params: 2, frame: 42
var r17;
const ActivityAction = (require(11598) /* metro dependency 11598: useActivityShelfItem */).ActivityAction;
disableBadges = !(disableBadges === undefined) && disableBadges;
const styles = useStyles();
const channel = context.type !== 'channel' ? null : context.channel;
const width = itemDimensions.width;
const height = itemDimensions.height;
const value5 = width * (importDefault(1852) /* metro dependency 1852: getDevicePixelRatioNative */)();
const value6 = env0_3.useId();
const defaultImport = importDefault(11598) /* metro dependency 11598: useActivityShelfItem */;
let object = {activityItem: activityItem, context: context, guildId: guildId, locationObject: locationObject,
onActivityItemSelected: onActivityItemSelected,
embeddedActivitiesManager: importDefault(8092) /* metro dependency 8092: EmbeddedActivitiesNativeManager */,
backgroundResolution: value5, assetNames: ['embedded_cover'], launchingComponentId: value6};
const CommandOrigin = (require(5068) /* metro dependency 5068: ApplicationCommandTypes */).CommandOrigin;
const VOICE_UI = CommandOrigin.VOICE_UI;
object.commandOrigin = VOICE_UI;
var {imageBackground, activityAction, onActivityItemSelected, labelType} = defaultImport(object);
const value8 = (importDefault(10718) /* metro dependency 10718: useEmbeddedActivityBackground */)({applicationId: activityItem.application.id,
size: value5, names: ['embedded_background']});
if (disableBadges) {
r17 = !disableBadges;
} else {
object = [ActivityAction.LEAVE];
object[1] = ActivityAction.JOIN;
r17 = !object.includes(activityAction);
{themeContextProvider}
{activityAction === START && <ParticipantsText action={activityAction} channelId={channel?.id} guildId={channel?.getGuildId() ?? undefined} activityItem={activityItem} />}
</PressableOpacity>
);
}
const value11 = (require(7502) /* metro dependency 7502: TestModeUtils */).useIsTestModeForApplication(activityItem.application.id);
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const LEAVE = ActivityAction.LEAVE;
const items2 = [styles.container];
items2[1] = {width: width, height: height};
const ThemeContextProvider = (require(3868) /* metro dependency 3868: native */).ThemeContextProvider;
const NativeView = importDefault(6821) /* metro dependency 6821: NativeView */;
const ActivityShelfItemBackground = importDefault(15500) /* metro dependency 15500: ActivityShelfItemBackground */;
const name = activityItem.application.name;
let START = ActivityAction.START;
const items3 = [<NativeView style={styles.imageOuterContainer}><ActivityShelfItemBackground accessibilityLabel={name} imageBackground={activityAction !== START ? value8 : imageBackground} aspectRatio={width / height} /><ActivityActionOverlay action={activityAction} applicationId={activityItem.application.id} context={context} activityItem={activityItem} launchingComponentId={value6} /></NativeView>];
items3[1] = r17 ? ((Component) => <Component labelType={labelType} />)(importDefault(11627) /* metro dependency 11627: ActivityShelfBadge */) : null;
items3[2] = r17 && value11 ? <NativeView style={styles.developerIconContainer}>{((Icon) => <Icon size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.REFRESH_SMALL_16} source={importDefault(15504) /* metro dependency 15504 */} color={styles.developerIconColor.color} />)((require(1305) /* metro dependency 1305: native */).Icon)}</NativeView> : null;
const themeContextProvider = <ThemeContextProvider theme="dark">{items3}</ThemeContextProvider>;
START = ActivityAction.START;
return (
<PressableOpacity
activeOpacity={0.7}
onPress={onActivityItemSelected}
disabled={activityAction === LEAVE}
androidRippleConfig={ANDROID_FOREGROUND_RIPPLE}
style={items2}
>
{themeContextProvider}
{activityAction === START && <ParticipantsText action={activityAction} channelId={channel?.id} guildId={channel?.getGuildId() ?? undefined} activityItem={activityItem} />}
</PressableOpacity>
);
}
global.__d(_fun118694, 15503, [31, 1309, 33, 4501, 697, 4000, 11680, 11598, 6821, 15501, 1852, 8092, 5068, 10718,
7502, 5278, 3868, 15500, 11627, 1305, 15504, 15502, 4617, 12070, 4573, 11684, 1244,
2]) /* metro module 15503, dependencies: [31, 1309, 33, 4501, 697, 4000, 11680, 11598, 6821, 15501, 1852, 8092, 5068, 10718, 7502, 5278, 3868, 15500, 11627, 1305, 15504, 15502, 4617, 12070, 4573, 11684, 1244, 2] */;
@@ -1,48 +1,67 @@
/* Metro module 15500; source: modules/voice_panel/native/controls/activities/ActivityShelfItemBackground.tsx; dependencies: [57, 31, 27, 33, 4501, 6821, 11626, 2] */
import Module00057 from '../../../../../by-id/module-00057.js'; /* Metro dependency 57 */
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 */
function _fun118681(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118681, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15697:6, offset: 0x024e7d21, size: 219 bytes, params: 8, frame: 19
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).Image;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
let value = ReactModule;
const env0_6 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(function(a0) {
return {previewImage: {'alignItems': 'center', 'justifyContent': 'center', 'backgroundColor': 'black'},
activityImage: {width: '100%', aspectRatio: a0}};
});
value = value.memo(ActivityShelfItemBackground);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/controls/activities/ActivityShelfItemBackground.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/controls/activities/ActivityShelfItemBackground.tsx');
exports.default = value;
}
function ActivityShelfItemBackground({imageBackground, aspectRatio, accessibilityLabel}) { // fn#118683, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15697:319, offset: 0x024e7e2c, size: 371 bytes, params: 2, frame: 21
var r0;
var NativeView;
var value;
const styles = useStyles(aspectRatio);
const [property, env0_0] = Module00057(env0_3.useState(false), 2);
if (imageBackground.state === 'not-found') {
value = importDefault(6821) /* metro dependency 6821: NativeView */;
value = ((Component) => <Component style={styles.previewImage}>{((Component) => <Component />)(importDefault(11626) /* metro dependency 11626: BrokenImage */)}</Component>)(value);
r0 = value;
} else if (property) {
value = importDefault(6821) /* metro dependency 6821: NativeView */;
value = ((Component) => <Component style={styles.previewImage}>{((Component) => <Component />)(importDefault(11626) /* metro dependency 11626: BrokenImage */)}</Component>)(value);
r0 = value;
} else if (imageBackground.state === 'loading') {
value = importDefault(6821) /* metro dependency 6821: NativeView */;
value = ((Component) => <Component style={styles.previewImage} />)(value);
r0 = value;
} else if (imageBackground.url == null) {
value = importDefault(6821) /* metro dependency 6821: NativeView */;
value = ((Component) => <Component style={styles.previewImage} />)(value);
r0 = value;
} else {
NativeView = importDefault(6821) /* metro dependency 6821: NativeView */;
value = '';
value = (
<NativeView style={styles.previewImage}>
<Image
onError={onError_118684}
source={{uri: imageBackground.url}}
style={styles.activityImage}
accessibilityRole="image"
accessibilityLabel={accessibilityLabel ?? value}
/>
</NativeView>
);
r0 = value;
}
return r0;
function ActivityShelfItemBackgroundOnError() { // fn#118684, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15697:672, owner: ActivityShelfItemBackground.onError, offset: 0x01d72e0f, size: 18 bytes, params: 1, frame: 11
return env0_0(true);
}
function ActivityShelfItemBackground({imageBackground, aspectRatio, accessibilityLabel}) { // fn#118683, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15697:319, offset: 0x024e7e2c, size: 371 bytes, params: 2, frame: 21
var r0;
var NativeView;
var value;
const styles = useStyles(aspectRatio);
const [property, env0_0] = env0_2(env0_3.useState(false), 2);
if (imageBackground.state === 'not-found') {
value = importDefault(6821) /* metro dependency 6821: NativeView */;
value = ((Component) => <Component style={styles.previewImage}>{((Component) => <Component />)(importDefault(11626) /* metro dependency 11626: BrokenImage */)}</Component>)(value);
r0 = value;
} else if (property) {
value = importDefault(6821) /* metro dependency 6821: NativeView */;
value = ((Component) => <Component style={styles.previewImage}>{((Component) => <Component />)(importDefault(11626) /* metro dependency 11626: BrokenImage */)}</Component>)(value);
r0 = value;
} else if (imageBackground.state === 'loading') {
value = importDefault(6821) /* metro dependency 6821: NativeView */;
value = ((Component) => <Component style={styles.previewImage} />)(value);
r0 = value;
} else if (imageBackground.url == null) {
value = importDefault(6821) /* metro dependency 6821: NativeView */;
value = ((Component) => <Component style={styles.previewImage} />)(value);
r0 = value;
} else {
NativeView = importDefault(6821) /* metro dependency 6821: NativeView */;
value = '';
value = <NativeView style={styles.previewImage}><Image onError={onError} source={{uri: imageBackground.url}} style={styles.activityImage} accessibilityRole="image" accessibilityLabel={accessibilityLabel ?? value} /></NativeView>;
r0 = value;
}
return r0;
}
global.__d(_fun118681, 15500, [57, 31, 27, 33, 4501, 6821, 11626,
2]) /* metro module 15500, dependencies: [57, 31, 27, 33, 4501, 6821, 11626, 2] */;
@@ -1,74 +1,92 @@
/* Metro module 15501; source: modules/voice_panel/native/controls/activities/ActivityShelfItemSummary.tsx; dependencies: [57, 31, 27, 33, 4501, 697, 4000, 15502, 10881, 1305, 4587, 4573, 4017, 4593, 2] */
import Module00057 from '../../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import ReanimatedRexport from '../../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import UserSummaryItem from '../../../../../components_native/common/UserSummaryItem.tsx'; /* Metro dependency 10881 */
import UseActivityUsers from '../../../../activities/useActivityUsers.tsx'; /* Metro dependency 15502 */
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 NativeModule from '../../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as ColorUtilsModule from '../../../../../utils/ColorUtils.tsx'; /* Metro dependency 4000 */
import * as TextModule from '../../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ButtonPillNativeModule from '../../../../../design/components/Button/native/ButtonPill.native.tsx'; /* Metro dependency 4587 */
function _fun118685(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118685, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15698:6, offset: 0x024e7f9f, size: 414 bytes, params: 8, frame: 25
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
let value = require(33) /* metro dependency 33 */;
ReactModule;
let value = JsxRuntimeModule;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object3 = {ongoingActivityContainer: {'position': 'absolute', 'width': '100%', 'height': '100%',
object = {ongoingActivityContainer: {'position': 'absolute', 'width': '100%', 'height': '100%',
'backgroundColor': 'rgba(0,0,0,0.4)', 'alignItems': 'center', 'justifyContent': 'center'}};
const object4 = {'paddingHorizontal': 12, 'paddingVertical': 4, 'borderRadius': null, 'backgroundColor': null,
const object2 = {'paddingHorizontal': 12, 'paddingVertical': 4, 'borderRadius': null, 'backgroundColor': null,
'marginBottom': 8};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
const colorUtilsModule = require(4000) /* metro dependency 4000: ColorUtils */;
const hexWithOpacity = colorUtilsModule.hexWithOpacity;
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
const hexWithOpacity = ColorUtilsModule.hexWithOpacity;
const BLACK = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BLACK;
object4.backgroundColor = Reflect.apply(hexWithOpacity, colorUtilsModule, [BLACK, 0.64]);
object3.overlayActivityName = object4;
object2.backgroundColor = Reflect.apply(hexWithOpacity, ColorUtilsModule, [BLACK, 0.64]);
object.overlayActivityName = object2;
const MOBILE_TEXT_HEADING_PRIMARY = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_TEXT_HEADING_PRIMARY;
object3.overlayActivityNameText = {color: MOBILE_TEXT_HEADING_PRIMARY};
object3.loadingTextColor = {color: 'transparent'};
object3.ellipsis = {'flex': 1, 'flexShrink': 1, 'flexGrow': 0, 'justifyContent': 'center', 'alignItems': 'center',
object.overlayActivityNameText = {color: MOBILE_TEXT_HEADING_PRIMARY};
object.loadingTextColor = {color: 'transparent'};
object.ellipsis = {'flex': 1, 'flexShrink': 1, 'flexGrow': 0, 'justifyContent': 'center', 'alignItems': 'center',
'top': -12};
const env0_7 = Reflect.apply(createStyles, value, [object3]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/controls/activities/ActivityShelfItemSummary.tsx');
const env0_7 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/controls/activities/ActivityShelfItemSummary.tsx');
exports.default = ActivityShelfItemSummary;
}
function ParticipantsSummary({applicationId, channelId}) { // fn#118686, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15698:728, offset: 0x024e813d, size: 150 bytes, params: 2, frame: 17
const value2 = (UseActivityUsers)(applicationId, channelId);
const AvatarSizes = (NativeModule).AvatarSizes;
const REFRESH_MEDIUM_32 = AvatarSizes.REFRESH_MEDIUM_32;
return (
<UserSummaryItem
users={value2}
max={5}
avatarSize={REFRESH_MEDIUM_32}
withPlusCount
style={{marginBottom: 8}}
cutout={{inset: -8}}
/>
);
}
function ParticipantsSummary({applicationId, channelId}) { // fn#118686, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15698:728, offset: 0x024e813d, size: 150 bytes, params: 2, frame: 17
const value2 = (importDefault(15502) /* metro dependency 15502: useActivityUsers */)(applicationId, channelId);
const UserSummaryItem = importDefault(10881) /* metro dependency 10881: UserSummaryItem */;
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
const REFRESH_MEDIUM_32 = AvatarSizes.REFRESH_MEDIUM_32;
return (
<UserSummaryItem
users={value2}
max={5}
avatarSize={REFRESH_MEDIUM_32}
withPlusCount
style={{marginBottom: 8}}
cutout={{inset: -8}}
/>
);
}
function ActivityShelfItemSummary({channelId, applicationId, applicationName, submitting}) { // fn#118687, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15698:1068, offset: 0x024e81d3, size: 392 bytes, params: 2, frame: 26
submitting = !(submitting === undefined) && submitting;
const styles = useStyles();
const value3 = env0_3((require(4587) /* metro dependency 4587: ButtonPillNative */).useLoadingStyles(submitting,
'md'), 2);
value3[0];
const property = value3[1];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const text = <Text variant="text-md/semibold" style={submitting ? styles.loadingTextColor : styles.overlayActivityNameText} lineClamp={2}>{applicationName}</Text>;
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
return (
<View style={styles.ongoingActivityContainer}>
<View style={styles.overlayActivityName}>
{text}
<View2 style={[styles.ellipsis, property]}>
{submitting && ((Ellipsis) => <Ellipsis variant="active" size="md" />)((require(4593) /* metro dependency 4593: ButtonEllipsisNative */).Ellipsis)}
</View2>
function ActivityShelfItemSummary({channelId, applicationId, applicationName, submitting}) { // fn#118687, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15698:1068, offset: 0x024e81d3, size: 392 bytes, params: 2, frame: 26
submitting = !(submitting === undefined) && submitting;
const styles = useStyles();
const value3 = Module00057((ButtonPillNativeModule).useLoadingStyles(submitting,
'md'), 2);
value3[0];
const property = value3[1];
const Text = (TextModule).Text;
const text = (
<Text
variant="text-md/semibold"
style={submitting ? styles.loadingTextColor : styles.overlayActivityNameText}
lineClamp={2}
>
{applicationName}
</Text>
);
const View2 = (ReanimatedRexport).View;
return (
<View style={styles.ongoingActivityContainer}>
<View style={styles.overlayActivityName}>
{text}
<View2 style={[styles.ellipsis, property]}>
{submitting && ((Ellipsis) => <Ellipsis variant="active" size="md" />)((require(4593) /* metro dependency 4593: ButtonEllipsisNative */).Ellipsis)}
</View2>
</View>
<ParticipantsSummary channelId={channelId} applicationId={applicationId} />
</View>
<ParticipantsSummary channelId={channelId} applicationId={applicationId} />
</View>
);
);
}
}
global.__d(_fun118685, 15501, [57, 31, 27, 33, 4501, 697, 4000, 15502, 10881, 1305, 4587, 4573, 4017, 4593,
2]) /* metro module 15501, dependencies: [57, 31, 27, 33, 4501, 697, 4000, 15502, 10881, 1305, 4587, 4573, 4017, 4593, 2] */;
@@ -1,132 +1,138 @@
/* Metro module 15528; source: modules/voice_panel/native/controls/buttons/VoicePanelAnimatedButtonWrapper.tsx; dependencies: [31, 27, 11795, 33, 4501, 697, 4017, 15447, 477, 4577, 4504, 2] */
import Native from '../../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import ReanimatedRexport from '../../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import UseControlsLock from '../useControlsLock.tsx'; /* Metro dependency 15447 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as PlatformUtilsModule from '../../../../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
import * as CreateStylesModule from '../../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as SpringModule from '../../../../../design/animation/reanimated/spring/spring.tsx'; /* Metro dependency 4577 */
import * as VoicePanelConstantsModule from '../../../VoicePanelConstants.tsx'; /* Metro dependency 11795 */
function _fun118909(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118909, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15725:6, offset: 0x024f421c, size: 318 bytes, params: 8, frame: 22
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const Pressable = (require(27) /* metro dependency 27 */).Pressable;
const env0_4 = (require(11795) /* metro dependency 11795: VoicePanelConstants */).MODE_CHANGE_PHYSICS;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const BORDER_RADIUS_LG = (importDefault(697) /* metro dependency 697: native */).modules.button.BORDER_RADIUS_LG;
const env0_6 = Reflect.apply(createStyles, createStylesModule, [{pressableWrapper: {'justifyContent': 'center',
const Pressable = (ReactNativeModule).Pressable;
const createStyles = CreateStylesModule.createStyles;
const BORDER_RADIUS_LG = (Native).modules.button.BORDER_RADIUS_LG;
const env0_6 = Reflect.apply(createStyles, CreateStylesModule, [{pressableWrapper: {'justifyContent': 'center',
'alignItems': 'center', borderRadius: BORDER_RADIUS_LG}}]);
const env0_7 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).createAnimatedComponent(Pressable);
const env0_7 = (ReanimatedRexport).createAnimatedComponent(Pressable);
object = {code: 'function VoicePanelAnimatedButtonWrapperTsx1(values){const{offsetFromCenter,withSpring,MODE_CHANGE_PHYSICS,withTiming}=this.__closure;offsetFromCenter.set(values.windowWidth/2-values.targetGlobalOriginX-values.targetWidth/2);return{initialValues:{originX:values.targetOriginX+offsetFromCenter.get(),opacity:0,transform:[{scale:0.5}]},animations:{originX:withSpring(values.targetOriginX,MODE_CHANGE_PHYSICS),opacity:withTiming(1,{duration:100}),transform:[{scale:withSpring(1,MODE_CHANGE_PHYSICS)}]}};}'};
object = {code: 'function VoicePanelAnimatedButtonWrapperTsx2(values){const{withSpring,offsetFromCenter,MODE_CHANGE_PHYSICS,withTiming}=this.__closure;return{initialValues:{originX:values.currentOriginX,opacity:1,transform:[{scale:1}]},animations:{originX:withSpring(values.currentOriginX+offsetFromCenter.get(),MODE_CHANGE_PHYSICS),opacity:withTiming(0,{duration:100}),transform:[{scale:withSpring(0.5,MODE_CHANGE_PHYSICS)}]}};}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/controls/buttons/VoicePanelAnimatedButtonWrapper.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/controls/buttons/VoicePanelAnimatedButtonWrapper.tsx');
exports.default = AnimatedButtonWrapper;
}
function AnimatedButtonWrapper({props, onPress, onLongPress, onPressIn, onPressOut, accessibilityLabel, style, children, pressed, disabled}) { // fn#118910, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15725:1410, offset: 0x024f435a, size: 463 bytes, params: 2, frame: 29
const r19 = pressed ?? (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(false);
const env0_3 = r19;
const value3 = (UseControlsLock)();
const styles = useStyles();
const binding = env0_3;
const value4 = binding.useMemo(function() {
return {onPressIn: onPressIn ?? _fun118912, onPressOut: onPressOut ?? _fun118913};
}, [r19, value3, onPressIn, onPressOut]);
const width = props.width;
const height = props.height;
const height2 = height;
const value5 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
return ((Component) => <Component entering={binding.useMemo(_fun118914,
[value5])} exiting={binding.useMemo(_fun118916,
[value5])} onPress={onPress} onLongPress={onLongPress} disabled={disabled} {...value4} {...{['accessibilityRole']: 'button'}} {...{['accessibilityLabel']: accessibilityLabel}} {...{['style']: binding.useMemo(function() {
return [styles.pressableWrapper, {width: width, height: height}, style];
}, [style, styles.pressableWrapper, width, height])}}>{children}</Component>)(height2);
function _fun118911() { // fn#118911, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15725:1640, offset: 0x024f4529, size: 63 bytes, params: 1, frame: 6
return {onPressIn: onPressIn ?? _fun118912, onPressOut: onPressOut ?? _fun118913};
function _fun118912() { // fn#118912, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15725:1666, offset: 0x024f4568, size: 37 bytes, params: 1, frame: 11
env1_4.lock();
env1_3.set(true);
}
function AnimatedButtonWrapper({props, onPress, onLongPress, onPressIn, onPressOut, accessibilityLabel, style, children, pressed, disabled}) { // fn#118910, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15725:1410, offset: 0x024f435a, size: 463 bytes, params: 2, frame: 29
const r19 = pressed ?? (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(false);
const env0_3 = r19;
const value3 = (importDefault(15447) /* metro dependency 15447: useControlsLock */)();
const styles = useStyles();
const binding = env0_3;
const value4 = binding.useMemo(function() {
return {onPressIn: onPressIn ?? _fun118912, onPressOut: onPressOut ?? _fun118913};
}, [r19, value3, onPressIn, onPressOut]);
const width = props.width;
const height = props.height;
const env0_7 = height;
const value5 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
return ((Component) => <Component entering={binding.useMemo(_fun118914,
[value5])} exiting={binding.useMemo(_fun118916,
[value5])} onPress={onPress} onLongPress={onLongPress} disabled={disabled} {...value4} {...{['accessibilityRole']: 'button'}} {...{['accessibilityLabel']: accessibilityLabel}} {...{['style']: binding.useMemo(function() {
return [styles.pressableWrapper, {width: width, height: height}, style];
}, [style, styles.pressableWrapper, width, height])}}>{children}</Component>)(env0_7);
}
function _fun118913() { // fn#118913, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15725:1712, offset: 0x024f458d, size: 37 bytes, params: 1, frame: 11
env1_4.unlock();
env1_3.set(false);
}
function _fun118911() { // fn#118911, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15725:1640, offset: 0x024f4529, size: 63 bytes, params: 1, frame: 6
return {onPressIn: onPressIn ?? _fun118912, onPressOut: onPressOut ?? _fun118913};
}
}
function _fun118914() { // fn#118914, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15725:1815, offset: 0x024f45b2, size: 156 bytes, params: 1, frame: 15
if (PlatformUtilsModule.isAndroid()) {
return undefined;
}
const t_1189152 = t_118915;
const object = {};
object.offsetFromCenter = env0_8;
object.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object.MODE_CHANGE_PHYSICS = MODE_CHANGE_PHYSICS;
object.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
t_1189152.__closure = object;
t_1189152.__workletHash = 16238937246135;
t_1189152.__initData = env1_8;
return t_1189152;
function t_118915(a0) { // fn#118915, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15725:1859, offset: 0x024f464e, size: 269 bytes, params: 2, frame: 20
let value = environment.__proto__;
let binding = env1_8;
binding.set(a0.windowWidth / 2 - a0.targetGlobalOriginX - a0.targetWidth / 2);
const object = {};
const targetOriginX = a0.targetOriginX;
binding = env1_8;
const get = binding.get;
object.initialValues = {originX: targetOriginX + Reflect.apply(get, binding, []), opacity: 0,
transform: [{scale: 0.5}]};
const object4 = {};
value = environment.__proto__.__proto__;
object4.originX = SpringModule.withSpring(a0.targetOriginX, MODE_CHANGE_PHYSICS);
object4.opacity = (require(4504) /* metro dependency 4504: timing */).withTiming(1, {duration: 100});
const object6 = {};
object6.scale = SpringModule.withSpring(1, MODE_CHANGE_PHYSICS);
object4.transform = [object6];
object.animations = object4;
return object;
}
}
function _fun118916() { // fn#118916, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15725:2354, offset: 0x024f475b, size: 156 bytes, params: 1, frame: 15
if (PlatformUtilsModule.isAndroid()) {
return undefined;
}
const t_1189172 = t_118917;
const object = {};
object.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object.offsetFromCenter = env0_8;
object.MODE_CHANGE_PHYSICS = MODE_CHANGE_PHYSICS;
object.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
t_1189172.__closure = object;
t_1189172.__workletHash = 17504057367727;
t_1189172.__initData = env1_9;
return t_1189172;
function t_118917(a0) { // fn#118917, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15725:2398, offset: 0x024f47f7, size: 216 bytes, params: 2, frame: 21
const object = {};
let currentOriginX = a0.currentOriginX;
object.initialValues = {originX: currentOriginX, opacity: 1, transform: [{scale: 1}]};
const object4 = {};
const value = environment.__proto__.__proto__;
const withSpring = SpringModule.withSpring;
currentOriginX = a0.currentOriginX;
const binding = env1_8;
const get = binding.get;
object4.originX = Reflect.apply(withSpring, SpringModule, [currentOriginX + Reflect.apply(get, binding, []),
MODE_CHANGE_PHYSICS]);
object4.opacity = (require(4504) /* metro dependency 4504: timing */).withTiming(0, {duration: 100});
const object6 = {};
object6.scale = SpringModule.withSpring(0.5, MODE_CHANGE_PHYSICS);
object4.transform = [object6];
object.animations = object4;
return object;
}
}
function _fun118914() { // fn#118914, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15725:1815, offset: 0x024f45b2, size: 156 bytes, params: 1, frame: 15
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (platformUtilsModule.isAndroid()) {
return undefined;
}
const closure = t_118915;
const object2 = {};
object2.offsetFromCenter = env0_8;
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object2.MODE_CHANGE_PHYSICS = MODE_CHANGE_PHYSICS;
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
closure.__closure = object2;
closure.__workletHash = 16238937246135;
closure.__initData = env1_8;
return closure;
}
function _fun118916() { // fn#118916, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15725:2354, offset: 0x024f475b, size: 156 bytes, params: 1, frame: 15
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (platformUtilsModule.isAndroid()) {
return undefined;
}
const closure = t_118917;
const object2 = {};
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object2.offsetFromCenter = env0_8;
object2.MODE_CHANGE_PHYSICS = MODE_CHANGE_PHYSICS;
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
closure.__closure = object2;
closure.__workletHash = 17504057367727;
closure.__initData = env1_9;
return closure;
}
function _fun118912() { // fn#118912, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15725:1666, offset: 0x024f4568, size: 37 bytes, params: 1, frame: 11
env1_4.lock();
env1_3.set(true);
}
function _fun118913() { // fn#118913, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15725:1712, offset: 0x024f458d, size: 37 bytes, params: 1, frame: 11
env1_4.unlock();
env1_3.set(false);
}
function t_118915(a0) { // fn#118915, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15725:1859, offset: 0x024f464e, size: 269 bytes, params: 2, frame: 20
let value = environment.__proto__;
let binding = env1_8;
binding.set(a0.windowWidth / 2 - a0.targetGlobalOriginX - a0.targetWidth / 2);
const object2 = {};
const targetOriginX = a0.targetOriginX;
binding = env1_8;
const get = binding.get;
object2.initialValues = {originX: targetOriginX + Reflect.apply(get, binding, []), opacity: 0,
transform: [{scale: 0.5}]};
const object3 = {};
value = environment.__proto__.__proto__;
const springModule = require(4577) /* metro dependency 4577: spring */;
object3.originX = springModule.withSpring(a0.targetOriginX, MODE_CHANGE_PHYSICS);
object3.opacity = (require(4504) /* metro dependency 4504: timing */).withTiming(1, {duration: 100});
const object5 = {};
object5.scale = springModule.withSpring(1, MODE_CHANGE_PHYSICS);
object3.transform = [object5];
object2.animations = object3;
return object2;
}
function t_118917(a0) { // fn#118917, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15725:2398, offset: 0x024f47f7, size: 216 bytes, params: 2, frame: 21
const object2 = {};
let currentOriginX = a0.currentOriginX;
object2.initialValues = {originX: currentOriginX, opacity: 1, transform: [{scale: 1}]};
const object3 = {};
const value = environment.__proto__.__proto__;
const springModule = require(4577) /* metro dependency 4577: spring */;
const withSpring = springModule.withSpring;
currentOriginX = a0.currentOriginX;
const binding = env1_8;
const get = binding.get;
object3.originX = Reflect.apply(withSpring, springModule, [currentOriginX + Reflect.apply(get, binding, []),
MODE_CHANGE_PHYSICS]);
object3.opacity = (require(4504) /* metro dependency 4504: timing */).withTiming(0, {duration: 100});
const object5 = {};
object5.scale = springModule.withSpring(0.5, MODE_CHANGE_PHYSICS);
object3.transform = [object5];
object2.animations = object3;
return object2;
}
global.__d(_fun118909, 15528, [31, 27, 11795, 33, 4501, 697, 4017, 15447, 477, 4577, 4504,
2]) /* metro module 15528, dependencies: [31, 27, 11795, 33, 4501, 697, 4017, 15447, 477, 4577, 4504, 2] */;
@@ -1,88 +1,110 @@
/* Metro module 15535; source: modules/voice_panel/native/controls/buttons/VoicePanelChatButton.tsx; dependencies: [31, 33, 4501, 697, 11794, 15527, 15482, 15515, 15528, 1244, 15536, 6821, 6682, 2] */
import NativeView from '../../../../core/native/NativeView.tsx'; /* Metro dependency 6821 */
import VoicePanelStateContext from '../../VoicePanelStateContext.tsx'; /* Metro dependency 11794 */
import UseChatBadge from '../../hooks/useChatBadge.tsx'; /* Metro dependency 15482 */
import VoicePanelAnimatedButtonWrapper from './VoicePanelAnimatedButtonWrapper.tsx'; /* Metro dependency 15528 */
import CircleWithCutout from '../../shared/CircleWithCutout.tsx'; /* Metro dependency 15536 */
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 ChatIconModule from '../../../../../design/components/Icon/native/redesign/generated/ChatIcon.tsx'; /* Metro dependency 6682 */
import * as TrackVoicePanelTabOpenedModule from '../trackVoicePanelTabOpened.tsx'; /* Metro dependency 15515 */
import * as VoicePanelStylesModule from './VoicePanelStyles.tsx'; /* Metro dependency 15527 */
function _fun118936(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118936, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15732:6, offset: 0x024f574e, size: 286 bytes, params: 8, frame: 22
var object3;
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(33) /* metro dependency 33 */;
let value = JsxRuntimeModule;
const env0_4 = value.jsx;
const env0_5 = value.Fragment;
const env0_6 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object3 = {iconContainer: {'position': 'absolute', 'justifyContent': 'center', 'alignItems': 'center',
object = {iconContainer: {'position': 'absolute', 'justifyContent': 'center', 'alignItems': 'center',
'width': '100%', 'height': '100%'}};
const object4 = {'position': 'absolute', 'zIndex': 1, 'width': 10, 'height': 10, 'borderRadius': null, 'top': 0,
const object2 = {'position': 'absolute', 'zIndex': 1, 'width': 10, 'height': 10, 'borderRadius': null, 'top': 0,
'right': 0};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object3.badge = object4;
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object.badge = object2;
const RED_400 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.RED_400;
object3.redBG = {backgroundColor: RED_400};
const env0_7 = Reflect.apply(createStyles, value, [object3]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/controls/buttons/VoicePanelChatButton.tsx');
object.redBG = {backgroundColor: RED_400};
const env0_7 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/controls/buttons/VoicePanelChatButton.tsx');
exports.default = ChatButton_118937;
}
function ChatButton_118937({props, openTab, wrapperSpecs}) { // fn#118937, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15732:552, offset: 0x024f586c, size: 411 bytes, params: 2, frame: 26
const {channelId,
connected} = ReactModule.useContext(VoicePanelStateContext);
const styles = useStyles();
const value3 = (VoicePanelStylesModule).useVoicePanelButtonStyles(wrapperSpecs);
const value4 = (UseChatBadge)(channelId);
const backgroundColor = value3.iconBg.backgroundColor;
let useMemo = ReactModule.useMemo;
const value5 = Reflect.apply(useMemo, ReactModule, [_fun118938, [value4, styles.redBG, value3.iconBadgeIndicator]]);
const value6 = ReactModule.useCallback(_fun118939, [openTab, connected]);
object = {onPress: value6, props: props};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5KxXrK']);
useMemo = ReactModule.useMemo;
return ((Component) => <Component {...object}>{Reflect.apply(useMemo, ReactModule, [_fun118940, [backgroundColor,
props.width, value4, styles.iconContainer, styles.badge, value3.iconFill.color,
value5]])}</Component>)(VoicePanelAnimatedButtonWrapper);
function _fun118938() { // fn#118938, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15732:762, offset: 0x024f5a07, size: 39 bytes, params: 1, frame: 3
return env0_5 === 'mention' ? styles.redBG : env0_4.iconBadgeIndicator;
}
function ChatButton_118937({props, openTab, wrapperSpecs}) { // fn#118937, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15732:552, offset: 0x024f586c, size: 411 bytes, params: 2, frame: 26
var object2;
const binding = env0_3;
const {channelId,
connected} = binding.useContext(importDefault(11794) /* metro dependency 11794: VoicePanelStateContext */);
const styles = useStyles();
const value3 = (require(15527) /* metro dependency 15527: VoicePanelStyles */).useVoicePanelButtonStyles(wrapperSpecs);
const value4 = (importDefault(15482) /* metro dependency 15482: useChatBadge */)(channelId);
const backgroundColor = value3.iconBg.backgroundColor;
let useMemo = binding.useMemo;
const value5 = Reflect.apply(useMemo, binding, [_fun118938, [value4, styles.redBG, value3.iconBadgeIndicator]]);
const value6 = binding.useCallback(_fun118939, [openTab, connected]);
const voicePanelAnimatedButtonWrapper = importDefault(15528) /* metro dependency 15528: VoicePanelAnimatedButtonWrapper */;
object2 = {onPress: value6, props: props};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5KxXrK']);
useMemo = binding.useMemo;
return ((Component) => <Component {...object2}>{Reflect.apply(useMemo, binding, [_fun118940, [backgroundColor,
props.width, value4, styles.iconContainer, styles.badge, value3.iconFill.color,
value5]])}</Component>)(voicePanelAnimatedButtonWrapper);
}
function _fun118939() { // fn#118939, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15732:861, offset: 0x024f5a2e, size: 90 bytes, params: 1, frame: 14
const openTabBinding = openTab;
const value = connected.get();
const VoicePanelTabAnalyticsSources = (TrackVoicePanelTabOpenedModule).VoicePanelTabAnalyticsSources;
openTabBinding({tab: 'chat',
source: value ? VoicePanelTabAnalyticsSources.CONNECTED_BUTTON : VoicePanelTabAnalyticsSources.PREJOIN_BUTTON});
}
function _fun118938() { // fn#118938, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15732:762, offset: 0x024f5a07, size: 39 bytes, params: 1, frame: 3
return env0_5 === 'mention' ? styles.redBG : env0_4.iconBadgeIndicator;
}
function _fun118940() { // fn#118940, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15732:1130, offset: 0x024f5a88, size: 291 bytes, params: 1, frame: 25
var r5;
let value = environment.__proto__;
const jsxRuntimeEnv1_5Binding = jsxRuntimeEnv1_5;
const backgroundColorBinding = backgroundColor;
const width = props.width;
const binding = env0_5;
const items2 = [
<CircleWithCutout
fill={backgroundColorBinding}
circleRadius={width / 2}
cutoutRadius={8}
enableCutout={binding != null}
cutoutPositionInDegrees={45}
alignBadgeEdgeWithCircleEdge
badgeRadius={5}
scaleToPixelDensity
/>,
];
const ChatIcon = (ChatIconModule).ChatIcon;
items2[1] = (
<NativeView style={styles.iconContainer}>
<ChatIcon color={env0_4.iconFill.color} />
</NativeView>
);
const value4 = binding != null;
if (value4) {
value = NativeView;
value = ((Component) => <Component style={[styles.badge, env0_7]} />)(value);
r5 = value;
} else {
r5 = value4;
}
items2[2] = r5;
return (
<>
{items2}
</>
);
}
function _fun118939() { // fn#118939, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15732:861, offset: 0x024f5a2e, size: 90 bytes, params: 1, frame: 14
const openTabBinding = openTab;
const value = connected.get();
const VoicePanelTabAnalyticsSources = (require(15515) /* metro dependency 15515: trackVoicePanelTabOpened */).VoicePanelTabAnalyticsSources;
openTabBinding({tab: 'chat',
source: value ? VoicePanelTabAnalyticsSources.CONNECTED_BUTTON : VoicePanelTabAnalyticsSources.PREJOIN_BUTTON});
}
function _fun118940() { // fn#118940, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15732:1130, offset: 0x024f5a88, size: 291 bytes, params: 1, frame: 25
var r5;
let value = environment.__proto__;
const jsxRuntimeEnv1_5Binding = jsxRuntimeEnv1_5;
const CircleWithCutout = importDefault(15536) /* metro dependency 15536: CircleWithCutout */;
const backgroundColorBinding = backgroundColor;
const width = props.width;
const binding = env0_5;
const items2 = [<CircleWithCutout fill={backgroundColorBinding} circleRadius={width / 2} cutoutRadius={8} enableCutout={binding != null} cutoutPositionInDegrees={45} alignBadgeEdgeWithCircleEdge badgeRadius={5} scaleToPixelDensity />];
const NativeView = importDefault(6821) /* metro dependency 6821: NativeView */;
const ChatIcon = (require(6682) /* metro dependency 6682: ChatIcon */).ChatIcon;
items2[1] = <NativeView style={styles.iconContainer}><ChatIcon color={env0_4.iconFill.color} /></NativeView>;
const value4 = binding != null;
if (value4) {
value = NativeView;
value = ((Component) => <Component style={[styles.badge, env0_7]} />)(value);
r5 = value;
} else {
r5 = value4;
}
items2[2] = r5;
return (
<>
{items2}
</>
);
}
global.__d(_fun118936, 15535, [31, 33, 4501, 697, 11794, 15527, 15482, 15515, 15528, 1244, 15536, 6821, 6682,
2]) /* metro module 15535, dependencies: [31, 33, 4501, 697, 11794, 15527, 15482, 15515, 15528, 1244, 15536, 6821, 6682, 2] */;
@@ -1,81 +1,162 @@
/* Metro module 15529; source: modules/voice_panel/native/controls/buttons/VoicePanelConnectButton.tsx; dependencies: [31, 1379, 33, 4501, 697, 11794, 15478, 566, 5072, 5087, 4796, 4497, 15530, 15533, 15534, 9441, 15528, 1244, 4573, 2] */
import ChannelStore from '../../../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import VoicePanelStateContext from '../../VoicePanelStateContext.tsx'; /* Metro dependency 11794 */
import UseCanConnect from '../../hooks/useCanConnect.tsx'; /* Metro dependency 15478 */
import VoicePanelAnimatedButtonWrapper from './VoicePanelAnimatedButtonWrapper.tsx'; /* Metro dependency 15528 */
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 IndexNativeModule from '../../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
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 VoicePanelSpoilerAlertModule from '../../../../spoiler_channels/native/VoicePanelSpoilerAlert.tsx'; /* Metro dependency 9441 */
import * as VoicePanelNoJoinPermissionsAlertModule from '../../alerts/VoicePanelNoJoinPermissionsAlert.tsx'; /* Metro dependency 15530 */
import * as VoicePanelMaxCapacityAlertModule from '../../alerts/VoicePanelMaxCapacityAlert.tsx'; /* Metro dependency 15533 */
import * as VoicePanelNsfwAlertModule from '../../alerts/VoicePanelNsfwAlert.tsx'; /* Metro dependency 15534 */
function _fun118919(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118919, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15726:6, offset: 0x024f4904, size: 283 bytes, params: 8, frame: 22
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const object = {};
const createStyles = CreateStylesModule.createStyles;
const object2 = {};
const GREEN_360 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.GREEN_360;
object.backgroundColor = GREEN_360;
object2.backgroundColor = GREEN_360;
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object.paddingLeft = PX_8;
object2.paddingLeft = PX_8;
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object.paddingRight = PX_8;
const env0_6 = Reflect.apply(createStyles, createStylesModule, [{connectButton: object,
object2.paddingRight = PX_8;
const env0_6 = Reflect.apply(createStyles, CreateStylesModule, [{connectButton: object2,
connectText: {textAlign: 'center'}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/controls/buttons/VoicePanelConnectButton.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/controls/buttons/VoicePanelConnectButton.tsx');
exports.default = ConnectButton;
}
function ConnectButton({props}) { // fn#118920, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15726:435, offset: 0x024f4a1f, size: 462 bytes, params: 2, frame: 24
const styles = useStyles();
let binding = env0_3;
const {channelId,
guildId} = binding.useContext(importDefault(11794) /* metro dependency 11794: VoicePanelStateContext */);
const value3 = (importDefault(15478) /* metro dependency 15478: useCanConnect */)(channelId);
const canConnect = value3.canConnect;
var env0_3 = canConnect;
const isAtMaxCapacity = value3.isAtMaxCapacity;
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channelId);
});
const r10 = (require(5072) /* metro dependency 5072: AgeGateUtils */).useIsChannelContentGated(channel) && guildId != null && channelId != null;
const r9 = (require(5087) /* metro dependency 5087: SpoilerChannelUtils */).useIsChannelSpoilerGated(channel) && guildId != null && channelId != null;
binding = env0_3;
const value10 = binding.useCallback(_fun118922, [canConnect, isAtMaxCapacity, channelId, r10, r9, guildId]);
const VoicePanelAnimatedButtonWrapper = importDefault(15528) /* metro dependency 15528: VoicePanelAnimatedButtonWrapper */;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const useMemo = binding.useMemo;
return (
<VoicePanelAnimatedButtonWrapper
onPress={value10}
props={props}
accessibilityLabel={Reflect.apply(string, intl, [t['96ANUN']])}
style={styles.connectButton}
>
{Reflect.apply(useMemo, binding, [_fun118923, [styles.connectText]])}
</VoicePanelAnimatedButtonWrapper>
);
}
function _fun118922() { // fn#118922, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15726:762, offset: 0x024f4bed, size: 478 bytes, params: 1, frame: 18
var value2;
var defaultImport;
var moduleValue;
var openAlert;
const VOICE_PANEL_NO_JOIN_PERMS_KEY = (require(15530) /* metro dependency 15530: VoicePanelNoJoinPermissionsAlert */).VOICE_PANEL_NO_JOIN_PERMS_KEY;
var value3;
const VOICE_PANEL_SPOILER_KEY = (require(9441) /* metro dependency 9441: VoicePanelSpoilerAlert */).VOICE_PANEL_SPOILER_KEY;
var value4;
const VOICE_PANEL_NSFW_KEY = (require(15534) /* metro dependency 15534: VoicePanelNsfwAlert */).VOICE_PANEL_NSFW_KEY;
var value5;
const VOICE_PANEL_MAX_CAPACITY_KEY = (require(15533) /* metro dependency 15533: VoicePanelMaxCapacityAlert */).VOICE_PANEL_MAX_CAPACITY_KEY;
var value;
if (canConnect) {
if (isAtMaxCapacity) {
function ConnectButton({props}) { // fn#118920, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15726:435, offset: 0x024f4a1f, size: 462 bytes, params: 2, frame: 24
const styles = useStyles();
let binding = canConnect2;
const {channelId,
guildId} = binding.useContext(VoicePanelStateContext);
const value3 = (UseCanConnect)(channelId);
const canConnect = value3.canConnect;
var canConnect2 = canConnect;
const isAtMaxCapacity = value3.isAtMaxCapacity;
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channelId);
});
const r10 = (require(5072) /* metro dependency 5072: AgeGateUtils */).useIsChannelContentGated(channel) && guildId != null && channelId != null;
const r9 = (require(5087) /* metro dependency 5087: SpoilerChannelUtils */).useIsChannelSpoilerGated(channel) && guildId != null && channelId != null;
binding = canConnect2;
const value10 = binding.useCallback(_fun118922, [canConnect, isAtMaxCapacity, channelId, r10, r9, guildId]);
const intl = (IndexNativeModule).intl;
const string = intl.string;
const t = (IndexNativeModule).t;
const useMemo = binding.useMemo;
return (
<VoicePanelAnimatedButtonWrapper
onPress={value10}
props={props}
accessibilityLabel={Reflect.apply(string, intl, [t['96ANUN']])}
style={styles.connectButton}
>
{Reflect.apply(useMemo, binding, [_fun118923, [styles.connectText]])}
</VoicePanelAnimatedButtonWrapper>
);
function _fun118922() { // fn#118922, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15726:762, offset: 0x024f4bed, size: 478 bytes, params: 1, frame: 18
var value2;
var defaultImport;
var moduleValue;
var openAlert;
const VOICE_PANEL_NO_JOIN_PERMS_KEY = (VoicePanelNoJoinPermissionsAlertModule).VOICE_PANEL_NO_JOIN_PERMS_KEY;
var value3;
const VOICE_PANEL_SPOILER_KEY = (VoicePanelSpoilerAlertModule).VOICE_PANEL_SPOILER_KEY;
var value4;
const VOICE_PANEL_NSFW_KEY = (VoicePanelNsfwAlertModule).VOICE_PANEL_NSFW_KEY;
var value5;
const VOICE_PANEL_MAX_CAPACITY_KEY = (VoicePanelMaxCapacityAlertModule).VOICE_PANEL_MAX_CAPACITY_KEY;
var value;
if (canConnect) {
if (isAtMaxCapacity) {
if (canConnect) {
if (isAtMaxCapacity) {
value5 = environment.__proto__;
(require(4497) /* metro dependency 4497: useAlertStoreNative */).openAlert(VOICE_PANEL_MAX_CAPACITY_KEY,
((Component) => <Component channelId={channelId} />)(importDefault(15533) /* metro dependency 15533: VoicePanelMaxCapacityAlert */));
} else if (JsxRuntimeModule.jsx) {
value4 = environment.__proto__;
(require(4497) /* metro dependency 4497: useAlertStoreNative */).openAlert(VOICE_PANEL_NSFW_KEY,
((Component) => <Component guildId={guildId} channelId={channelId} />)(importDefault(15534) /* metro dependency 15534: VoicePanelNsfwAlert */));
} else if (env0_6) {
value3 = environment.__proto__;
(require(4497) /* metro dependency 4497: useAlertStoreNative */).openAlert(VOICE_PANEL_SPOILER_KEY,
((Component) => <Component channelId={channelId} />)(importDefault(9441) /* metro dependency 9441: VoicePanelSpoilerAlert */));
}
} else {
value = environment.__proto__;
moduleValue = require(4497) /* metro dependency 4497: useAlertStoreNative */;
openAlert = moduleValue.openAlert;
value = importDefault(15530) /* metro dependency 15530: VoicePanelNoJoinPermissionsAlert */;
Reflect.apply(openAlert, moduleValue, [VOICE_PANEL_NO_JOIN_PERMS_KEY,
((Component) => <Component />)(value)]);
}
} else if (JsxRuntimeModule.jsx) {
if (canConnect) {
if (isAtMaxCapacity) {
value5 = environment.__proto__;
(require(4497) /* metro dependency 4497: useAlertStoreNative */).openAlert(VOICE_PANEL_MAX_CAPACITY_KEY,
((Component) => <Component channelId={channelId} />)(importDefault(15533) /* metro dependency 15533: VoicePanelMaxCapacityAlert */));
} else if (JsxRuntimeModule.jsx) {
value4 = environment.__proto__;
(require(4497) /* metro dependency 4497: useAlertStoreNative */).openAlert(VOICE_PANEL_NSFW_KEY,
((Component) => <Component guildId={guildId} channelId={channelId} />)(importDefault(15534) /* metro dependency 15534: VoicePanelNsfwAlert */));
} else if (env0_6) {
value3 = environment.__proto__;
(require(4497) /* metro dependency 4497: useAlertStoreNative */).openAlert(VOICE_PANEL_SPOILER_KEY,
((Component) => <Component channelId={channelId} />)(importDefault(9441) /* metro dependency 9441: VoicePanelSpoilerAlert */));
}
} else {
value = environment.__proto__;
moduleValue = require(4497) /* metro dependency 4497: useAlertStoreNative */;
openAlert = moduleValue.openAlert;
value = importDefault(15530) /* metro dependency 15530: VoicePanelNoJoinPermissionsAlert */;
Reflect.apply(openAlert, moduleValue, [VOICE_PANEL_NO_JOIN_PERMS_KEY,
((Component) => <Component />)(value)]);
}
} else if (env0_6) {
if (canConnect) {
if (isAtMaxCapacity) {
value5 = environment.__proto__;
(require(4497) /* metro dependency 4497: useAlertStoreNative */).openAlert(VOICE_PANEL_MAX_CAPACITY_KEY,
((Component) => <Component channelId={channelId} />)(importDefault(15533) /* metro dependency 15533: VoicePanelMaxCapacityAlert */));
} else if (JsxRuntimeModule.jsx) {
value4 = environment.__proto__;
(require(4497) /* metro dependency 4497: useAlertStoreNative */).openAlert(VOICE_PANEL_NSFW_KEY,
((Component) => <Component guildId={guildId} channelId={channelId} />)(importDefault(15534) /* metro dependency 15534: VoicePanelNsfwAlert */));
} else if (env0_6) {
value3 = environment.__proto__;
(require(4497) /* metro dependency 4497: useAlertStoreNative */).openAlert(VOICE_PANEL_SPOILER_KEY,
((Component) => <Component channelId={channelId} />)(importDefault(9441) /* metro dependency 9441: VoicePanelSpoilerAlert */));
}
} else {
value = environment.__proto__;
moduleValue = require(4497) /* metro dependency 4497: useAlertStoreNative */;
openAlert = moduleValue.openAlert;
value = importDefault(15530) /* metro dependency 15530: VoicePanelNoJoinPermissionsAlert */;
Reflect.apply(openAlert, moduleValue, [VOICE_PANEL_NO_JOIN_PERMS_KEY,
((Component) => <Component />)(value)]);
}
} else {
value2 = environment.__proto__;
defaultImport = importDefault(4796) /* metro dependency 4796: SelectedChannelActionCreators */;
defaultImport.selectVoiceChannel(channelId);
}
} else if (canConnect) {
if (isAtMaxCapacity) {
value5 = environment.__proto__;
(require(4497) /* metro dependency 4497: useAlertStoreNative */).openAlert(VOICE_PANEL_MAX_CAPACITY_KEY,
((Component) => <Component channelId={channelId} />)(importDefault(15533) /* metro dependency 15533: VoicePanelMaxCapacityAlert */));
} else if (env0_5) {
} else if (JsxRuntimeModule.jsx) {
value4 = environment.__proto__;
(require(4497) /* metro dependency 4497: useAlertStoreNative */).openAlert(VOICE_PANEL_NSFW_KEY,
((Component) => <Component guildId={guildId} channelId={channelId} />)(importDefault(15534) /* metro dependency 15534: VoicePanelNsfwAlert */));
@@ -89,96 +170,28 @@ function _fun118922() { // fn#118922, source: /ci/build/discord/discord/discord_
moduleValue = require(4497) /* metro dependency 4497: useAlertStoreNative */;
openAlert = moduleValue.openAlert;
value = importDefault(15530) /* metro dependency 15530: VoicePanelNoJoinPermissionsAlert */;
Reflect.apply(openAlert, moduleValue, [VOICE_PANEL_NO_JOIN_PERMS_KEY,
((Component) => <Component />)(value)]);
Reflect.apply(openAlert, moduleValue, [VOICE_PANEL_NO_JOIN_PERMS_KEY, ((Component) => <Component />)(value)]);
}
} else if (env0_5) {
if (canConnect) {
if (isAtMaxCapacity) {
value5 = environment.__proto__;
(require(4497) /* metro dependency 4497: useAlertStoreNative */).openAlert(VOICE_PANEL_MAX_CAPACITY_KEY,
((Component) => <Component channelId={channelId} />)(importDefault(15533) /* metro dependency 15533: VoicePanelMaxCapacityAlert */));
} else if (env0_5) {
value4 = environment.__proto__;
(require(4497) /* metro dependency 4497: useAlertStoreNative */).openAlert(VOICE_PANEL_NSFW_KEY,
((Component) => <Component guildId={guildId} channelId={channelId} />)(importDefault(15534) /* metro dependency 15534: VoicePanelNsfwAlert */));
} else if (env0_6) {
value3 = environment.__proto__;
(require(4497) /* metro dependency 4497: useAlertStoreNative */).openAlert(VOICE_PANEL_SPOILER_KEY,
((Component) => <Component channelId={channelId} />)(importDefault(9441) /* metro dependency 9441: VoicePanelSpoilerAlert */));
}
} else {
value = environment.__proto__;
moduleValue = require(4497) /* metro dependency 4497: useAlertStoreNative */;
openAlert = moduleValue.openAlert;
value = importDefault(15530) /* metro dependency 15530: VoicePanelNoJoinPermissionsAlert */;
Reflect.apply(openAlert, moduleValue, [VOICE_PANEL_NO_JOIN_PERMS_KEY,
((Component) => <Component />)(value)]);
}
} else if (env0_6) {
if (canConnect) {
if (isAtMaxCapacity) {
value5 = environment.__proto__;
(require(4497) /* metro dependency 4497: useAlertStoreNative */).openAlert(VOICE_PANEL_MAX_CAPACITY_KEY,
((Component) => <Component channelId={channelId} />)(importDefault(15533) /* metro dependency 15533: VoicePanelMaxCapacityAlert */));
} else if (env0_5) {
value4 = environment.__proto__;
(require(4497) /* metro dependency 4497: useAlertStoreNative */).openAlert(VOICE_PANEL_NSFW_KEY,
((Component) => <Component guildId={guildId} channelId={channelId} />)(importDefault(15534) /* metro dependency 15534: VoicePanelNsfwAlert */));
} else if (env0_6) {
value3 = environment.__proto__;
(require(4497) /* metro dependency 4497: useAlertStoreNative */).openAlert(VOICE_PANEL_SPOILER_KEY,
((Component) => <Component channelId={channelId} />)(importDefault(9441) /* metro dependency 9441: VoicePanelSpoilerAlert */));
}
} else {
value = environment.__proto__;
moduleValue = require(4497) /* metro dependency 4497: useAlertStoreNative */;
openAlert = moduleValue.openAlert;
value = importDefault(15530) /* metro dependency 15530: VoicePanelNoJoinPermissionsAlert */;
Reflect.apply(openAlert, moduleValue, [VOICE_PANEL_NO_JOIN_PERMS_KEY,
((Component) => <Component />)(value)]);
}
} else {
value2 = environment.__proto__;
defaultImport = importDefault(4796) /* metro dependency 4796: SelectedChannelActionCreators */;
defaultImport.selectVoiceChannel(channelId);
}
} else if (canConnect) {
if (isAtMaxCapacity) {
value5 = environment.__proto__;
(require(4497) /* metro dependency 4497: useAlertStoreNative */).openAlert(VOICE_PANEL_MAX_CAPACITY_KEY,
((Component) => <Component channelId={channelId} />)(importDefault(15533) /* metro dependency 15533: VoicePanelMaxCapacityAlert */));
} else if (env0_5) {
value4 = environment.__proto__;
(require(4497) /* metro dependency 4497: useAlertStoreNative */).openAlert(VOICE_PANEL_NSFW_KEY,
((Component) => <Component guildId={guildId} channelId={channelId} />)(importDefault(15534) /* metro dependency 15534: VoicePanelNsfwAlert */));
} else if (env0_6) {
value3 = environment.__proto__;
(require(4497) /* metro dependency 4497: useAlertStoreNative */).openAlert(VOICE_PANEL_SPOILER_KEY,
((Component) => <Component channelId={channelId} />)(importDefault(9441) /* metro dependency 9441: VoicePanelSpoilerAlert */));
function _fun118923() { // fn#118923, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15726:1300, offset: 0x024f4dcb, size: 124 bytes, params: 1, frame: 18
const Text = (TextModule).Text;
const intl = (IndexNativeModule).intl;
return (
<Text
variant="text-sm/semibold"
color="always-white"
style={styles.connectText}
>
{intl.string((IndexNativeModule).t['96ANUN'])}
</Text>
);
}
} else {
value = environment.__proto__;
moduleValue = require(4497) /* metro dependency 4497: useAlertStoreNative */;
openAlert = moduleValue.openAlert;
value = importDefault(15530) /* metro dependency 15530: VoicePanelNoJoinPermissionsAlert */;
Reflect.apply(openAlert, moduleValue, [VOICE_PANEL_NO_JOIN_PERMS_KEY, ((Component) => <Component />)(value)]);
}
}
function _fun118923() { // fn#118923, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15726:1300, offset: 0x024f4dcb, size: 124 bytes, params: 1, frame: 18
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<Text
variant="text-sm/semibold"
color="always-white"
style={styles.connectText}
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['96ANUN'])}
</Text>
);
}
global.__d(_fun118919, 15529, [31, 1379, 33, 4501, 697, 11794, 15478, 566, 5072, 5087, 4796, 4497, 15530, 15533,
15534, 9441, 15528, 1244, 4573,
2]) /* metro module 15529, dependencies: [31, 1379, 33, 4501, 697, 11794, 15478, 566, 5072, 5087, 4796, 4497, 15530, 15533, 15534, 9441, 15528, 1244, 4573, 2] */;
@@ -1,168 +1,173 @@
/* Metro module 15537; source: modules/voice_panel/native/controls/buttons/VoicePanelDisconnectCancelButton.tsx; dependencies: [57, 31, 1378, 4492, 7710, 11795, 33, 4501, 697, 11794, 4610, 4017, 8092, 7712, 8913, 4796, 10633, 15538, 9616, 15528, 1244, 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 ApplicationStreamingStore from '../../../../../stores/ApplicationStreamingStore.tsx'; /* Metro dependency 4492 */
import VoicePanelStore from '../../../VoicePanelStore.tsx'; /* Metro dependency 7710 */
import VoicePanelStateContext from '../../VoicePanelStateContext.tsx'; /* Metro dependency 11794 */
import VoicePanelAnimatedButtonWrapper from './VoicePanelAnimatedButtonWrapper.tsx'; /* Metro dependency 15528 */
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 ReanimatedRexportModule from '../../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as CreateStylesModule from '../../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as VoicePanelConstantsModule from '../../../VoicePanelConstants.tsx'; /* Metro dependency 11795 */
function _fun118943(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118943, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15734:6, offset: 0x024f5e8f, size: 433 bytes, params: 8, frame: 22
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const embeddedActivitiesStore = importDefault(1378) /* metro dependency 1378: EmbeddedActivitiesStore */;
const applicationStreamingStore = importDefault(4492) /* metro dependency 4492: ApplicationStreamingStore */;
const voicePanelStore = importDefault(7710) /* metro dependency 7710: VoicePanelStore */;
const env0_8 = (require(11795) /* metro dependency 11795: VoicePanelConstants */).VoicePanelModes;
const env0_9 = (require(33) /* metro dependency 33 */).jsx;
object3 = {USER: 0};
object3[0] = 'USER';
object3.STREAM = 1;
object3[1] = 'STREAM';
object3.ACTIVITY = 2;
object3[2] = 'ACTIVITY';
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object3 = {};
const object4 = {};
const VOICE_PANEL_DISCONNECT_BUTTON_MIN_WIDTH = (importDefault(697) /* metro dependency 697: native */).modules.mobile.VOICE_PANEL_DISCONNECT_BUTTON_MIN_WIDTH;
object4.minWidth = VOICE_PANEL_DISCONNECT_BUTTON_MIN_WIDTH;
const CONTROL_CRITICAL_PRIMARY_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_CRITICAL_PRIMARY_BACKGROUND_DEFAULT;
object4.backgroundColor = CONTROL_CRITICAL_PRIMARY_BACKGROUND_DEFAULT;
object3.disconnectCancelBG = object4;
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
object3.icon = {tintColor: WHITE};
const env0_11 = Reflect.apply(createStyles, createStylesModule, [object3]);
object3 = {code: 'function VoicePanelDisconnectCancelButtonTsx1(){const{mode,VoicePanelModes,focused}=this.__closure;var _focused$get$id,_focused$get;if(mode.get()!==VoicePanelModes.PANEL){return null;}return(_focused$get$id=(_focused$get=focused.get())===null||_focused$get===void 0?void 0:_focused$get.id)!==null&&_focused$get$id!==void 0?_focused$get$id:null;}'};
object3 = {code: 'function VoicePanelDisconnectCancelButtonTsx2(focusId,lastFocusId){const{runOnJS,handleFocusChange}=this.__closure;if(focusId!==lastFocusId){runOnJS(handleFocusChange)(focusId);}}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/controls/buttons/VoicePanelDisconnectCancelButton.tsx');
object = {USER: 0};
object[0] = 'USER';
object.STREAM = 1;
object[1] = 'STREAM';
object.ACTIVITY = 2;
object[2] = 'ACTIVITY';
const createStyles = CreateStylesModule.createStyles;
object = {};
const object2 = {};
const VOICE_PANEL_DISCONNECT_BUTTON_MIN_WIDTH = (Native).modules.mobile.VOICE_PANEL_DISCONNECT_BUTTON_MIN_WIDTH;
object2.minWidth = VOICE_PANEL_DISCONNECT_BUTTON_MIN_WIDTH;
const CONTROL_CRITICAL_PRIMARY_BACKGROUND_DEFAULT = (Native).colors.CONTROL_CRITICAL_PRIMARY_BACKGROUND_DEFAULT;
object2.backgroundColor = CONTROL_CRITICAL_PRIMARY_BACKGROUND_DEFAULT;
object.disconnectCancelBG = object2;
const WHITE = (Native).colors.WHITE;
object.icon = {tintColor: WHITE};
const env0_11 = Reflect.apply(createStyles, CreateStylesModule, [object]);
object = {code: 'function VoicePanelDisconnectCancelButtonTsx1(){const{mode,VoicePanelModes,focused}=this.__closure;var _focused$get$id,_focused$get;if(mode.get()!==VoicePanelModes.PANEL){return null;}return(_focused$get$id=(_focused$get=focused.get())===null||_focused$get===void 0?void 0:_focused$get.id)!==null&&_focused$get$id!==void 0?_focused$get$id:null;}'};
object = {code: 'function VoicePanelDisconnectCancelButtonTsx2(focusId,lastFocusId){const{runOnJS,handleFocusChange}=this.__closure;if(focusId!==lastFocusId){runOnJS(handleFocusChange)(focusId);}}'};
(FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/controls/buttons/VoicePanelDisconnectCancelButton.tsx');
exports.default = DisconnectCancelButton;
}
function DisconnectCancelButton({props}) { // fn#118944, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15734:1191, offset: 0x024f6040, size: 764 bytes, params: 2, frame: 27
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const styles = useStyles();
let binding = env0_4;
const {channelId, focused,
mode} = binding.useContext(importDefault(11794) /* metro dependency 11794: VoicePanelStateContext */);
const value4 = mode(binding.useState(null), 2);
const property = value4[0];
var env0_4 = property;
const env0_5 = value4[1];
let closure = _fun118945;
const value5 = binding.useCallback(closure, []);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedReaction = reanimatedRexportModule.useAnimatedReaction;
closure = DisconnectCancelButtonA;
closure.__closure = {mode: mode, VoicePanelModes: VoicePanelModes, focused: focused};
closure.__workletHash = 1109426015268;
closure.__initData = env0_12;
const closure2 = DisconnectCancelButtonV;
closure2.__closure = {runOnJS: reanimatedRexportModule.runOnJS, handleFocusChange: value5};
closure2.__workletHash = 16719769067952;
closure2.__initData = env0_13;
Reflect.apply(useAnimatedReaction, reanimatedRexportModule, [closure, closure2]);
const value6 = binding.useCallback(_fun118948, [channelId, property, focused]);
let ACTIVITY = env0_10.ACTIVITY;
const r9 = property === ACTIVITY ? (require(10633) /* metro dependency 10633: DoorExitIcon */).DoorExitIcon : property === env0_10.STREAM ? (require(15538) /* metro dependency 15538: ScreenXIcon */).ScreenXIcon : (require(9616) /* metro dependency 9616: PhoneHangUpIcon */).PhoneHangUpIcon;
const VoicePanelAnimatedButtonWrapper = importDefault(15528) /* metro dependency 15528: VoicePanelAnimatedButtonWrapper */;
ACTIVITY = env0_10.ACTIVITY;
const r6 = property === ACTIVITY ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t['R/FK4A']) : property === env0_10.STREAM ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.q3O3J8) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t['6vrfgt']);
binding = env0_4;
const useMemo = binding.useMemo;
return (
<VoicePanelAnimatedButtonWrapper
onPress={value6}
props={props}
style={styles.disconnectCancelBG}
accessibilityLabel={r6}
>
{Reflect.apply(useMemo, binding, [_fun118949, [r9, styles.icon]])}
</VoicePanelAnimatedButtonWrapper>
);
}
function _fun118945(a0) { // fn#118945, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15734:1366, offset: 0x024f633c, size: 203 bytes, params: 2, frame: 17
var value;
var currentEmbeddedActivity;
var moduleValue;
var getEmbeddedActivityParticipantId;
var object2;
if (a0 != null) {
value = environment.__proto__;
currentEmbeddedActivity = EmbeddedActivitiesStore.getCurrentEmbeddedActivity();
if (currentEmbeddedActivity?.applicationId == null) {
env0_5(ApplicationStreamingStore.getActiveStreamForStreamKey(a0) == null ? env1_10.USER : env1_10.STREAM);
} else {
moduleValue = require(4610) /* metro dependency 4610: ChannelRTCParticipants */;
getEmbeddedActivityParticipantId = moduleValue.getEmbeddedActivityParticipantId;
object2 = {};
object2.applicationId = currentEmbeddedActivity.applicationId;
object2.instanceId = currentEmbeddedActivity.compositeInstanceId;
if (a0 !== Reflect.apply(getEmbeddedActivityParticipantId, moduleValue, [object2])) {
env0_5(ApplicationStreamingStore.getActiveStreamForStreamKey(a0) == null ? env1_10.USER : env1_10.STREAM);
function DisconnectCancelButton({props}) { // fn#118944, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15734:1191, offset: 0x024f6040, size: 764 bytes, params: 2, frame: 27
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const styles = useStyles();
let binding = property2;
const {channelId, focused,
mode} = binding.useContext(VoicePanelStateContext);
const value4 = mode(binding.useState(null), 2);
const property = value4[0];
var property2 = property;
const env0_5 = value4[1];
let closure = _fun118945;
const value5 = binding.useCallback(closure, []);
const useAnimatedReaction = ReanimatedRexportModule.useAnimatedReaction;
closure = DisconnectCancelButtonA;
closure.__closure = {mode: mode, VoicePanelModes: VoicePanelModes, focused: focused};
closure.__workletHash = 1109426015268;
closure.__initData = env0_12;
const DisconnectCancelButtonV2 = DisconnectCancelButtonV;
DisconnectCancelButtonV2.__closure = {runOnJS: ReanimatedRexportModule.runOnJS, handleFocusChange: value5};
DisconnectCancelButtonV2.__workletHash = 16719769067952;
DisconnectCancelButtonV2.__initData = env0_13;
Reflect.apply(useAnimatedReaction, ReanimatedRexportModule, [closure, DisconnectCancelButtonV2]);
const value6 = binding.useCallback(_fun118948, [channelId, property, focused]);
let ACTIVITY = env0_10.ACTIVITY;
const r9 = property === ACTIVITY ? (require(10633) /* metro dependency 10633: DoorExitIcon */).DoorExitIcon : property === env0_10.STREAM ? (require(15538) /* metro dependency 15538: ScreenXIcon */).ScreenXIcon : (require(9616) /* metro dependency 9616: PhoneHangUpIcon */).PhoneHangUpIcon;
ACTIVITY = env0_10.ACTIVITY;
const r6 = property === ACTIVITY ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t['R/FK4A']) : property === env0_10.STREAM ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.q3O3J8) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t['6vrfgt']);
binding = property2;
const useMemo = binding.useMemo;
return (
<VoicePanelAnimatedButtonWrapper
onPress={value6}
props={props}
style={styles.disconnectCancelBG}
accessibilityLabel={r6}
>
{Reflect.apply(useMemo, binding, [_fun118949, [r9, styles.icon]])}
</VoicePanelAnimatedButtonWrapper>
);
function _fun118945(a0) { // fn#118945, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15734:1366, offset: 0x024f633c, size: 203 bytes, params: 2, frame: 17
var value;
var currentEmbeddedActivity;
var moduleValue;
var getEmbeddedActivityParticipantId;
var object;
if (a0 != null) {
value = environment.__proto__;
currentEmbeddedActivity = EmbeddedActivitiesStore.getCurrentEmbeddedActivity();
if (currentEmbeddedActivity?.applicationId == null) {
env0_5(ApplicationStreamingStore.getActiveStreamForStreamKey(a0) == null ? env1_10.USER : env1_10.STREAM);
} else {
moduleValue = require(4610) /* metro dependency 4610: ChannelRTCParticipants */;
getEmbeddedActivityParticipantId = moduleValue.getEmbeddedActivityParticipantId;
object = {};
object.applicationId = currentEmbeddedActivity.applicationId;
object.instanceId = currentEmbeddedActivity.compositeInstanceId;
if (a0 !== Reflect.apply(getEmbeddedActivityParticipantId, moduleValue, [object])) {
env0_5(ApplicationStreamingStore.getActiveStreamForStreamKey(a0) == null ? env1_10.USER : env1_10.STREAM);
} else {
env0_5(env1_10.ACTIVITY);
}
}
} else {
env0_5(env1_10.ACTIVITY);
env0_5(null);
}
}
} else {
env0_5(null);
}
}
function DisconnectCancelButtonA() { // fn#118946, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15734:1712, owner: DisconnectCancelButton.A, offset: 0x024f6407, size: 81 bytes, params: 1, frame: 12
var id;
var r0;
var value;
const value2 = mode.get();
const PANEL = VoicePanelModes.PANEL;
const value4 = null;
if (value2 !== PANEL) {
r0 = value4;
} else {
value = focused.get();
id = value4 == value ? undefined : value.id;
r0 = value4 != id ? id : value4;
}
return r0;
}
function DisconnectCancelButtonA() { // fn#118946, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15734:1712, owner: DisconnectCancelButton.A, offset: 0x024f6407, size: 81 bytes, params: 1, frame: 12
var id;
var r0;
var value;
const value2 = mode.get();
const PANEL = VoicePanelModes.PANEL;
const value4 = null;
if (value2 !== PANEL) {
r0 = value4;
} else {
value = focused.get();
id = value4 == value ? undefined : value.id;
r0 = value4 != id ? id : value4;
}
return r0;
}
function DisconnectCancelButtonV(a0, a1) { // fn#118947, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15734:1909, owner: DisconnectCancelButton.v, offset: 0x024f6458, size: 61 bytes, params: 3, frame: 13
var value;
if (a0 !== a1) {
value = environment.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value.runOnJS(env0_6)(a0);
}
}
function DisconnectCancelButtonV(a0, a1) { // fn#118947, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15734:1909, owner: DisconnectCancelButton.v, offset: 0x024f6458, size: 61 bytes, params: 3, frame: 13
var value;
if (a0 !== a1) {
value = environment.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value.runOnJS(env0_6)(a0);
}
}
function _fun118948() { // fn#118948, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15734:2082, offset: 0x024f6495, size: 310 bytes, params: 1, frame: 21
var state;
var defaultImport3;
var currentEmbeddedActivity;
const value2 = focused.get();
const value3 = undefined;
const id = value2 == null ? value3 : value2.id;
const binding = env0_4;
const ACTIVITY = env1_10.ACTIVITY;
if (binding !== ACTIVITY) {
if (env0_4 === env1_10.STREAM) {
defaultImport3 = importDefault(7712) /* metro dependency 7712: ChannelRTCActionCreators */;
defaultImport3.selectParticipant(channelId, null);
if (id != null) {
(require(8913) /* metro dependency 8913: StreamActionCreators */).stopStream(id);
function _fun118948() { // fn#118948, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15734:2082, offset: 0x024f6495, size: 310 bytes, params: 1, frame: 21
var state;
var defaultImport3;
var currentEmbeddedActivity;
const value2 = focused.get();
const value3 = undefined;
const id = value2 == null ? value3 : value2.id;
const ACTIVITY = env1_10.ACTIVITY;
if (ReactModule !== ACTIVITY) {
if (ReactModule === env1_10.STREAM) {
defaultImport3 = importDefault(7712) /* metro dependency 7712: ChannelRTCActionCreators */;
defaultImport3.selectParticipant(channelId, null);
if (id != null) {
(require(8913) /* metro dependency 8913: StreamActionCreators */).stopStream(id);
}
return value3;
}
(importDefault(4796) /* metro dependency 4796: SelectedChannelActionCreators */).disconnect();
state = VoicePanelStore.getState();
state.closeChannel(channelId);
} else {
currentEmbeddedActivity = EmbeddedActivitiesStore.getCurrentEmbeddedActivity();
(importDefault(8092) /* metro dependency 8092: EmbeddedActivitiesNativeManager */).leaveActivity({location: currentEmbeddedActivity == null ? value3 : currentEmbeddedActivity.location,
applicationId: (require(4610) /* metro dependency 4610: ChannelRTCParticipants */).activityParticipantIdToApplicationId(id)});
}
return value3;
}
(importDefault(4796) /* metro dependency 4796: SelectedChannelActionCreators */).disconnect();
state = VoicePanelStore.getState();
state.closeChannel(channelId);
} else {
currentEmbeddedActivity = EmbeddedActivitiesStore.getCurrentEmbeddedActivity();
(importDefault(8092) /* metro dependency 8092: EmbeddedActivitiesNativeManager */).leaveActivity({location: currentEmbeddedActivity == null ? value3 : currentEmbeddedActivity.location,
applicationId: (require(4610) /* metro dependency 4610: ChannelRTCParticipants */).activityParticipantIdToApplicationId(id)});
function _fun118949() { // fn#118949, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15734:2828, offset: 0x024f65cb, size: 39 bytes, params: 1, frame: 13
return ((Component) => <Component style={styles.icon} />)(env0_7);
}
}
return value3;
}
function _fun118949() { // fn#118949, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15734:2828, offset: 0x024f65cb, size: 39 bytes, params: 1, frame: 13
return ((Component) => <Component style={styles.icon} />)(env0_7);
}
global.__d(_fun118943, 15537, [57, 31, 1378, 4492, 7710, 11795, 33, 4501, 697, 11794, 4610, 4017, 8092, 7712, 8913,
4796, 10633, 15538, 9616, 15528, 1244,
2]) /* metro module 15537, dependencies: [57, 31, 1378, 4492, 7710, 11795, 33, 4501, 697, 11794, 4610, 4017, 8092, 7712, 8913, 4796, 10633, 15538, 9616, 15528, 1244, 2] */;
@@ -1,30 +1,38 @@
/* Metro module 15546; source: modules/voice_panel/native/controls/buttons/VoicePanelDrawerToggleButton.tsx; dependencies: [31, 33, 4501, 697, 15527, 15514, 15528, 6821, 8708, 12298, 2] */
import UseDrawerToggle from '../useDrawerToggle.tsx'; /* Metro dependency 15514 */
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 VoicePanelStylesModule from './VoicePanelStyles.tsx'; /* Metro dependency 15527 */
function _fun118976(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118976, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15743:6, offset: 0x024f7747, size: 239 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
let value = require(33) /* metro dependency 33 */;
ReactModule;
let value = JsxRuntimeModule;
const env0_3 = value.jsx;
const env0_4 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const object = {'width': '100%', 'height': '100%'};
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
const env0_5 = Reflect.apply(createStyles, value, [{circle: object, iconContainer: {'position': 'absolute',
const object2 = {'width': '100%', 'height': '100%'};
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
const env0_5 = Reflect.apply(createStyles, value, [{circle: object2, iconContainer: {'position': 'absolute',
'justifyContent': 'center', 'alignItems': 'center', 'width': '100%', 'height': '100%'}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/controls/buttons/VoicePanelDrawerToggleButton.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/controls/buttons/VoicePanelDrawerToggleButton.tsx');
exports.default = VoicePanelDrawerToggleButton;
function VoicePanelDrawerToggleButton({props, openTab, wrapperSpecs}) { // fn#118977, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15743:454, offset: 0x024f7836, size: 322 bytes, params: 2, frame: 26
const styles = useStyles();
const value2 = (VoicePanelStylesModule).useVoicePanelButtonStyles(wrapperSpecs);
const backgroundColor = value2.iconBg.backgroundColor;
const color = value2.iconFill.color;
const {isDrawerOpen, handlePress,
accessibilityLabel} = (UseDrawerToggle)(openTab);
return ((Component) => <Component onPress={handlePress} props={props} accessibilityLabel={accessibilityLabel}>{((Component) => <Component style={[styles.circle,
{backgroundColor: backgroundColor}]} />)(importDefault(6821) /* metro dependency 6821: NativeView */)}{((Component) => <Component style={styles.iconContainer}>{((Component) => <Component color={color} />)(isDrawerOpen ? (require(8708) /* metro dependency 8708: ChevronSmallDownIcon */).ChevronSmallDownIcon : (require(12298) /* metro dependency 12298: ChevronSmallUpIcon */).ChevronSmallUpIcon)}</Component>)(importDefault(6821) /* metro dependency 6821: NativeView */)}</Component>)(importDefault(15528) /* metro dependency 15528: VoicePanelAnimatedButtonWrapper */);
}
}
function VoicePanelDrawerToggleButton({props, openTab, wrapperSpecs}) { // fn#118977, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15743:454, offset: 0x024f7836, size: 322 bytes, params: 2, frame: 26
const styles = useStyles();
const value2 = (require(15527) /* metro dependency 15527: VoicePanelStyles */).useVoicePanelButtonStyles(wrapperSpecs);
const backgroundColor = value2.iconBg.backgroundColor;
const color = value2.iconFill.color;
const {isDrawerOpen, handlePress,
accessibilityLabel} = (importDefault(15514) /* metro dependency 15514: useDrawerToggle */)(openTab);
return ((Component) => <Component onPress={handlePress} props={props} accessibilityLabel={accessibilityLabel}>{((Component) => <Component style={[styles.circle,
{backgroundColor: backgroundColor}]} />)(importDefault(6821) /* metro dependency 6821: NativeView */)}{((Component) => <Component style={styles.iconContainer}>{((Component) => <Component color={color} />)(isDrawerOpen ? (require(8708) /* metro dependency 8708: ChevronSmallDownIcon */).ChevronSmallDownIcon : (require(12298) /* metro dependency 12298: ChevronSmallUpIcon */).ChevronSmallUpIcon)}</Component>)(importDefault(6821) /* metro dependency 6821: NativeView */)}</Component>)(importDefault(15528) /* metro dependency 15528: VoicePanelAnimatedButtonWrapper */);
}
global.__d(_fun118976, 15546, [31, 33, 4501, 697, 15527, 15514, 15528, 6821, 8708, 12298,
2]) /* metro module 15546, dependencies: [31, 33, 4501, 697, 15527, 15514, 15528, 6821, 8708, 12298, 2] */;
@@ -1,287 +1,324 @@
/* Metro module 15526; source: modules/voice_panel/native/controls/buttons/VoicePanelMicButton.tsx; dependencies: [57, 31, 4295, 1937, 1226, 1379, 4259, 3784, 1878, 4297, 33, 3, 4501, 566, 6952, 10834, 10845, 11794, 4017, 15447, 4081, 10750, 5321, 15527, 15528, 1244, 10280, 4573, 9250, 10835, 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 ImpersonateStore from '../../../../impersonate/ImpersonateStore.tsx'; /* Metro dependency 1937 */
import PermissionStore from '../../../../../stores/PermissionStore.tsx'; /* Metro dependency 3784 */
import MediaEngineStore from '../../../../../stores/MediaEngineStore.tsx'; /* Metro dependency 4259 */
import GameConsoleStore from '../../../../game_console/GameConsoleStore.tsx'; /* Metro dependency 4295 */
import VoiceStateStore from '../../../../../stores/VoiceStateStore.tsx'; /* Metro dependency 4297 */
import VoicePanelStateContext from '../../VoicePanelStateContext.tsx'; /* Metro dependency 11794 */
import UseControlsLock from '../useControlsLock.tsx'; /* Metro dependency 15447 */
import VoicePanelAnimatedButtonWrapper from './VoicePanelAnimatedButtonWrapper.tsx'; /* Metro dependency 15528 */
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 ReanimatedRexportModule from '../../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
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 Module05321Module from '../../../../../by-id/module-05321.js'; /* Metro dependency 5321 */
import * as MicrophoneIconModule from '../../../../../design/components/Icon/native/redesign/generated/MicrophoneIcon.tsx'; /* Metro dependency 10280 */
import * as VoiceActionUtilsModule from '../../../../video_calls/native/VoiceActionUtils.tsx'; /* Metro dependency 10834 */
import * as VoicePanelStylesModule from './VoicePanelStyles.tsx'; /* Metro dependency 15527 */
function _fun118888(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118888, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15723:6, offset: 0x024f327a, size: 449 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const gameConsoleStore = importDefault(4295) /* metro dependency 4295: GameConsoleStore */;
const impersonateStore = importDefault(1937) /* metro dependency 1937: ImpersonateStore */;
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 permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const voiceStateStore = importDefault(4297) /* metro dependency 4297: VoiceStateStore */;
let value = require(33) /* metro dependency 33 */;
let value = JsxRuntimeModule;
const env0_13 = value.jsx;
const env0_14 = value.Fragment;
const env0_15 = value.jsxs;
value = importDefault(3) /* metro dependency 3: Logger */;
value = new value('VoicePanelMicButton');
const env0_17 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({text: {'position': 'absolute',
const env0_17 = (CreateStylesModule).createStyles({text: {'position': 'absolute',
'left': 0, 'right': 0, 'bottom': 4, 'textAlign': 'center', 'opacity': 0.5}});
object = {code: 'function VoicePanelMicButtonTsx1(){const{runOnJS,handlePTTEnd}=this.__closure;runOnJS(handlePTTEnd)();}'};
object = {code: 'function VoicePanelMicButtonTsx2(event,manager){const{State,runOnJS,handleDragStart}=this.__closure;if(event.state!==State.BEGAN)return;manager.activate();runOnJS(handleDragStart)();}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/controls/buttons/VoicePanelMicButton.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/controls/buttons/VoicePanelMicButton.tsx');
exports.PTTButton = PTTButton;
exports.MicButton = MicButton;
}
function useMuteHandlers(a0) { // fn#118889, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15723:384, offset: 0x024f343b, size: 144 bytes, params: 2, frame: 17
const env0_0 = a0;
const env0_1 = env0_4.useRef(null);
return (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([ChannelStore, AuthenticationStore,
VoiceStateStore, MediaEngineStore, PermissionStore, ImpersonateStore, GameConsoleStore], _fun118890, [a0]);
}
function PTTButton({props, wrapperSpecs}) { // fn#118891, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15723:1401, offset: 0x024f3614, size: 913 bytes, params: 2, frame: 28
const env0_3 = undefined;
let env0_4 = undefined;
const styles = useStyles();
const binding = env0_4;
const useContext = binding.useContext;
const channelId = Reflect.apply(useContext, binding,
[importDefault(11794) /* metro dependency 11794: VoicePanelStateContext */]).channelId;
let [property, env0_0] = env0_3(env0_4.useState(false), 2);
const {mute, onPress} = useMuteHandlers(channelId);
const value6 = ((a0) => {
var env0_0 = a0;
return (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([ChannelStore,
AuthenticationStore,
VoiceStateStore, MediaEngineStore, PermissionStore, ImpersonateStore], _fun118893, [a0]);
})(channelId);
const r4 = value6.deaf ? value6.onPress : mute ? onPress : undefined;
const value7 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(false);
const value8 = (importDefault(15447) /* metro dependency 15447: useControlsLock */)();
env0_4 = env0_4.useRef({'active': false, 'dragging': false});
const value9 = env0_4.useCallback(_fun118894, [value8, value7, r4]);
const value10 = env0_4.useCallback(_fun118895, [value8, value7]);
const value11 = env0_4.useCallback(_fun118896, [value10]);
const value13 = env0_4.useMemo(_fun118898, [env0_4.useCallback(_fun118897, [value9]), value10]);
env0_4.useEffect(function() {
return _fun118902;
}, [value10]);
const value14 = (require(15527) /* metro dependency 15527: VoicePanelStyles */).useVoicePanelButtonStyles(wrapperSpecs);
const jsxRuntimeEnv0_14Binding = jsxRuntimeEnv0_14;
const GestureDetector = (require(5321) /* metro dependency 5321 */).GestureDetector;
const VoicePanelAnimatedButtonWrapper = importDefault(15528) /* metro dependency 15528: VoicePanelAnimatedButtonWrapper */;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
let Q8gkVL = (require(1244) /* metro dependency 1244: indexNative */).t.Q8gkVL;
const r13 = property ? value14.iconBgSelected : value14.iconBg;
const MicrophoneIcon = (require(10280) /* metro dependency 10280: MicrophoneIcon */).MicrophoneIcon;
const gestureDetector = <GestureDetector gesture={value13}><VoicePanelAnimatedButtonWrapper onPressIn={value9} onPressOut={value11} props={props} pressed={value7} accessibilityLabel={Reflect.apply(string,
intl,
[Q8gkVL])} style={r13}><MicrophoneIcon color={property ? value14.iconFillSelected.color : value14.iconFill.color} size="lg" /></VoicePanelAnimatedButtonWrapper></GestureDetector>;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const items2 = [styles.text];
items2[1] = value14.iconFill;
string = intl.string;
Q8gkVL = (require(1244) /* metro dependency 1244: indexNative */).t.Q8gkVL;
return (
<>
{gestureDetector}
<Text style={items2} variant="text-xxs/medium">
{Reflect.apply(string, intl, [Q8gkVL])}
</Text>
</>
);
}
function MicButton({props, wrapperSpecs}) { // fn#118903, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15723:3410, offset: 0x024f3dc5, size: 298 bytes, params: 2, frame: 23
const binding = env0_4;
const useContext = binding.useContext;
const {mute, onPress, dominantMuteState} = useMuteHandlers(Reflect.apply(useContext, binding,
[importDefault(11794) /* metro dependency 11794: VoicePanelStateContext */]).channelId);
const value3 = (require(15527) /* metro dependency 15527: VoicePanelStyles */).useVoicePanelButtonStyles(wrapperSpecs);
const value4 = env0_4.useMemo(_fun118904, [value3, mute, dominantMuteState]);
const VoicePanelAnimatedButtonWrapper = importDefault(15528) /* metro dependency 15528: VoicePanelAnimatedButtonWrapper */;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
return (
<VoicePanelAnimatedButtonWrapper
props={props}
onPress={onPress}
accessibilityLabel={mute ? Reflect.apply(string, intl, [t.YqAjXy]) : Reflect.apply(string, intl,
[t.w4m945])}
style={mute ? value3.iconBgVoiceMuted : value3.iconBg}
>
{value4}
</VoicePanelAnimatedButtonWrapper>
);
}
function _fun118890() { // fn#118890, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15723:491, offset: 0x024f34cb, size: 329 bytes, params: 1, frame: 22
var r2;
var r7;
var currentUser;
var binding;
var info;
const channel = ChannelStore.getChannel(env0_0);
const r3 = channel != null ? (require(6952) /* metro dependency 6952: useMuteStates */).getMuteStates({channel: channel,
authenticationStore: AuthenticationStore, voiceStateStore: VoiceStateStore, mediaEngineStore: MediaEngineStore,
permissionStore: PermissionStore, impersonateStore: ImpersonateStore}) : {'selfMute': false, 'suppress': false,
'mute': false};
let current = env0_1.current;
const value5 = undefined;
const value6 = (current == null ? value5 : current.selfMute) !== r3.selfMute;
if (value6) {
currentUser = UserStore.getCurrentUser();
r2 = currentUser != null;
r7 = currentUser;
} else {
r2 = value6;
r7 = value5;
}
r2 = r2 && r7.isStaff();
if (r2) {
binding = env1_16;
info = binding.info;
current = env0_1.current;
Reflect.apply(info, binding, ['Self mute changed', current == null ? value5 : current.selfMute, '>',
r3.selfMute]);
}
env0_1.current = r3;
const voiceActionUtilsModule = require(10834) /* metro dependency 10834: VoiceActionUtils */;
const createMuteHandler = voiceActionUtilsModule.createMuteHandler;
const getAwaitingRemoteSessionInfo = GameConsoleStore.getAwaitingRemoteSessionInfo;
return Reflect.apply(createMuteHandler, voiceActionUtilsModule, [r3, Reflect.apply(getAwaitingRemoteSessionInfo,
GameConsoleStore, []) != null]);
}
function useDeafHandlers(a0) { // fn#118892, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15723:1575, owner: PTTButton.useDeafHandlers, offset: 0x024f39a5, size: 116 bytes, params: 2, frame: 17
const env0_0 = a0;
return (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([ChannelStore, AuthenticationStore,
VoiceStateStore, MediaEngineStore, PermissionStore, ImpersonateStore], _fun118893, [a0]);
}
function _fun118894() { // fn#118894, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15723:1932, offset: 0x024f3a9c, size: 182 bytes, params: 1, frame: 16
var value2;
var moduleValue;
var binding;
if (!env0_4.current.active) {
if (env0_1 != null) {
env0_1();
function useMuteHandlers(a0) { // fn#118889, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15723:384, offset: 0x024f343b, size: 144 bytes, params: 2, frame: 17
const env0_0 = a0;
const env0_1 = ReactModule.useRef(null);
return (FluxModule).useStateFromStoresObject([ChannelStore, AuthenticationStore,
VoiceStateStore, MediaEngineStore, PermissionStore, ImpersonateStore, GameConsoleStore], _fun118890, [a0]);
function _fun118890() { // fn#118890, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15723:491, offset: 0x024f34cb, size: 329 bytes, params: 1, frame: 22
var r2;
var r7;
var currentUser;
var binding;
var info;
const channel = ChannelStore.getChannel(env0_0);
const r3 = channel != null ? (require(6952) /* metro dependency 6952: useMuteStates */).getMuteStates({channel: channel,
authenticationStore: AuthenticationStore, voiceStateStore: VoiceStateStore, mediaEngineStore: MediaEngineStore,
permissionStore: PermissionStore, impersonateStore: ImpersonateStore}) : {'selfMute': false, 'suppress': false,
'mute': false};
let current = env0_1.current;
const value5 = undefined;
const value6 = (current == null ? value5 : current.selfMute) !== r3.selfMute;
if (value6) {
currentUser = UserStore.getCurrentUser();
r2 = currentUser != null;
r7 = currentUser;
} else {
r2 = value6;
r7 = value5;
}
r2 = r2 && r7.isStaff();
if (r2) {
binding = env1_16;
info = binding.info;
current = env0_1.current;
Reflect.apply(info, binding, ['Self mute changed', current == null ? value5 : current.selfMute, '>',
r3.selfMute]);
}
env0_1.current = r3;
const createMuteHandler = VoiceActionUtilsModule.createMuteHandler;
const gameConsoleStoreBinding = GameConsoleStore;
const getAwaitingRemoteSessionInfo = gameConsoleStoreBinding.getAwaitingRemoteSessionInfo;
return Reflect.apply(createMuteHandler, VoiceActionUtilsModule, [r3, Reflect.apply(getAwaitingRemoteSessionInfo,
gameConsoleStoreBinding, []) != null]);
}
env0_4.current.active = true;
value2 = environment.__proto__;
moduleValue = require(4081) /* metro dependency 4081: HapticUtilsNative */;
moduleValue.triggerHapticFeedback((require(4081) /* metro dependency 4081: HapticUtilsNative */).HapticFeedbackTypes.IMPACT_MEDIUM);
(require(10750) /* metro dependency 10750: MediaEngineActionCreators */).setPushToTalkState(true);
binding = env0_3;
binding.lock();
binding = env0_2;
binding.set(true);
env0_0(true);
}
}
function _fun118895() { // fn#118895, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15723:2150, offset: 0x024f3b52, size: 130 bytes, params: 1, frame: 13
var value2;
var binding;
let current = env0_4.current;
if (current.active) {
current = env0_4.current;
current.active = false;
current = env0_4.current;
current.dragging = false;
value2 = environment.__proto__;
(require(10750) /* metro dependency 10750: MediaEngineActionCreators */).setPushToTalkState(false);
binding = env0_3;
binding.unlock();
binding = env0_2;
binding.set(false);
env0_0(false);
function PTTButton({props, wrapperSpecs}) { // fn#118891, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15723:1401, offset: 0x024f3614, size: 913 bytes, params: 2, frame: 28
const env0_3 = undefined;
let env0_4 = undefined;
const styles = useStyles();
const binding = env0_4;
const useContext = binding.useContext;
const channelId = Reflect.apply(useContext, binding,
[VoicePanelStateContext]).channelId;
let [property, env0_0] = env0_3(env0_4.useState(false), 2);
const {mute, onPress} = useMuteHandlers(channelId);
const value6 = ((a0) => {
var env0_0 = a0;
return (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([ChannelStore,
AuthenticationStore,
VoiceStateStore, MediaEngineStore, PermissionStore, ImpersonateStore], _fun118893, [a0]);
})(channelId);
const r4 = value6.deaf ? value6.onPress : mute ? onPress : undefined;
const value7 = (ReanimatedRexportModule).useSharedValue(false);
const value8 = (UseControlsLock)();
env0_4 = env0_4.useRef({'active': false, 'dragging': false});
const value9 = env0_4.useCallback(_fun118894, [value8, value7, r4]);
const value10 = env0_4.useCallback(_fun118895, [value8, value7]);
const value11 = env0_4.useCallback(_fun118896, [value10]);
const value13 = env0_4.useMemo(_fun118898, [env0_4.useCallback(_fun118897, [value9]), value10]);
env0_4.useEffect(function() {
return _fun118902;
}, [value10]);
const value14 = (VoicePanelStylesModule).useVoicePanelButtonStyles(wrapperSpecs);
const jsxRuntimeEnv0_14Binding = jsxRuntimeEnv0_14;
const GestureDetector = (Module05321Module).GestureDetector;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
let Q8gkVL = (require(1244) /* metro dependency 1244: indexNative */).t.Q8gkVL;
const r13 = property ? value14.iconBgSelected : value14.iconBg;
const MicrophoneIcon = (MicrophoneIconModule).MicrophoneIcon;
const gestureDetector = (
<GestureDetector gesture={value13}>
<VoicePanelAnimatedButtonWrapper
onPressIn={value9}
onPressOut={value11}
props={props}
pressed={value7}
accessibilityLabel={Reflect.apply(string, intl, [Q8gkVL])}
style={r13}
>
<MicrophoneIcon color={property ? value14.iconFillSelected.color : value14.iconFill.color} size="lg" />
</VoicePanelAnimatedButtonWrapper>
</GestureDetector>
);
const Text = (TextModule).Text;
const items2 = [styles.text];
items2[1] = value14.iconFill;
string = intl.string;
Q8gkVL = (require(1244) /* metro dependency 1244: indexNative */).t.Q8gkVL;
return (
<>
{gestureDetector}
<Text style={items2} variant="text-xxs/medium">
{Reflect.apply(string, intl, [Q8gkVL])}
</Text>
</>
);
function useDeafHandlers(a0) { // fn#118892, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15723:1575, owner: PTTButton.useDeafHandlers, offset: 0x024f39a5, size: 116 bytes, params: 2, frame: 17
const env0_0 = a0;
return (FluxModule).useStateFromStoresObject([ChannelStore, AuthenticationStore,
VoiceStateStore, MediaEngineStore, PermissionStore, ImpersonateStore], _fun118893, [a0]);
function _fun118893() { // fn#118893, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15723:1659, offset: 0x024f3a19, size: 131 bytes, params: 1, frame: 19
var r2;
var moduleValue;
const value = environment.__proto__.__proto__;
const channel = ChannelStore.getChannel(env0_0);
if (channel != null) {
moduleValue = require(10845) /* metro dependency 10845: useDeafStates */;
r2 = moduleValue.getDeafStates(channel, VoiceStateStore, MediaEngineStore, AuthenticationStore);
} else {
r2 = {'selfDeaf': false, 'deaf': false};
}
return (VoiceActionUtilsModule).createDeafHandler(r2);
}
}
function _fun118894() { // fn#118894, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15723:1932, offset: 0x024f3a9c, size: 182 bytes, params: 1, frame: 16
var value2;
var moduleValue;
var binding;
if (!env0_4.current.active) {
if (env0_1 != null) {
env0_1();
}
env0_4.current.active = true;
value2 = environment.__proto__;
moduleValue = require(4081) /* metro dependency 4081: HapticUtilsNative */;
moduleValue.triggerHapticFeedback((require(4081) /* metro dependency 4081: HapticUtilsNative */).HapticFeedbackTypes.IMPACT_MEDIUM);
(require(10750) /* metro dependency 10750: MediaEngineActionCreators */).setPushToTalkState(true);
binding = env0_3;
binding.lock();
binding = env0_2;
binding.set(true);
env0_0(true);
}
}
function _fun118895() { // fn#118895, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15723:2150, offset: 0x024f3b52, size: 130 bytes, params: 1, frame: 13
var value2;
var binding;
let current = env0_4.current;
if (current.active) {
current = env0_4.current;
current.active = false;
current = env0_4.current;
current.dragging = false;
value2 = environment.__proto__;
(require(10750) /* metro dependency 10750: MediaEngineActionCreators */).setPushToTalkState(false);
binding = env0_3;
binding.unlock();
binding = env0_2;
binding.set(false);
env0_0(false);
}
}
function _fun118896() { // fn#118896, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15723:2302, offset: 0x024f3bd4, size: 35 bytes, params: 1, frame: 9
if (!env0_4.current.dragging) {
env0_6();
}
}
function _fun118897() { // fn#118897, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15723:2355, offset: 0x024f3bf7, size: 52 bytes, params: 1, frame: 10
if (!env0_4.current.dragging) {
env0_4.current.dragging = true;
env0_5();
}
}
function _fun118898() { // fn#118898, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15723:2428, offset: 0x024f3c2b, size: 246 bytes, params: 1, frame: 20
const Gesture = (Module05321Module).Gesture;
const value3 = Gesture.Pan().manualActivation(true);
const onTouchesMove = value3.onTouchesMove;
let closure = n_118899;
const object = {};
const State = (Module05321Module).State;
object.State = State;
const runOnJS = (ReanimatedRexportModule).runOnJS;
object.runOnJS = runOnJS;
object.handleDragStart = env0_7;
closure.__closure = object;
closure.__workletHash = 13866422602014;
closure.__initData = env1_19;
const value5 = Reflect.apply(onTouchesMove, value3, [closure]);
const onFinalize = value5.onFinalize;
closure = t_118900;
closure.__closure = {runOnJS: runOnJS, handlePTTEnd: env0_6};
closure.__workletHash = 12941114426646;
closure.__initData = env1_18;
return Reflect.apply(onFinalize, value5, [closure]);
function n_118899({state}, a1) { // fn#118899, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15723:2501, offset: 0x024f3d21, size: 105 bytes, params: 3, frame: 14
var runOnJS;
var value2;
let value = environment.__proto__.__proto__;
const State = (Module05321Module).State;
const BEGAN = State.BEGAN;
if (state === BEGAN) {
a1.activate();
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
runOnJS = value.runOnJS;
value2 = environment.__proto__;
Reflect.apply(runOnJS, value, [env1_7])();
}
}
function t_118900() { // fn#118900, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15723:2727, offset: 0x024f3d8a, size: 48 bytes, params: 1, frame: 12
let value = environment.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value.runOnJS(env1_6)();
}
}
function _fun118901() { // fn#118901, offset: 0x024f3dba, size: 11 bytes, params: 1, frame: 1
return _fun118902;
function _fun118902() { // fn#118902, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15723:2897, offset: 0x01d7f97e, size: 15 bytes, params: 1, frame: 9
return env1_6();
}
}
}
}
function _fun118896() { // fn#118896, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15723:2302, offset: 0x024f3bd4, size: 35 bytes, params: 1, frame: 9
if (!env0_4.current.dragging) {
env0_6();
function MicButton({props, wrapperSpecs}) { // fn#118903, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15723:3410, offset: 0x024f3dc5, size: 298 bytes, params: 2, frame: 23
const useContext = ReactModule.useContext;
const {mute, onPress, dominantMuteState} = useMuteHandlers(Reflect.apply(useContext, ReactModule,
[VoicePanelStateContext]).channelId);
const value3 = (VoicePanelStylesModule).useVoicePanelButtonStyles(wrapperSpecs);
const value4 = ReactModule.useMemo(_fun118904, [value3, mute, dominantMuteState]);
const intl = (IndexNativeModule).intl;
const string = intl.string;
const t = (IndexNativeModule).t;
return (
<VoicePanelAnimatedButtonWrapper
props={props}
onPress={onPress}
accessibilityLabel={mute ? Reflect.apply(string, intl, [t.YqAjXy]) : Reflect.apply(string, intl,
[t.w4m945])}
style={mute ? value3.iconBgVoiceMuted : value3.iconBg}
>
{value4}
</VoicePanelAnimatedButtonWrapper>
);
function _fun118904() { // fn#118904, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15723:3607, offset: 0x024f3eef, size: 195 bytes, params: 1, frame: 18
var r0;
var VoicePanelRiveMicButton;
var muteBinding;
var binding;
const dominantMuteStateBinding = dominantMuteState;
const DominantMuteState = (VoiceActionUtilsModule).DominantMuteState;
const SERVER_MUTE = DominantMuteState.SERVER_MUTE;
if (dominantMuteStateBinding === SERVER_MUTE) {
const MicrophoneDenyIcon = (require(9250) /* metro dependency 9250: MicrophoneDenyIcon */).MicrophoneDenyIcon;
r0 = <MicrophoneDenyIcon color={env0_2.iconFillRed.color} />;
} else {
VoicePanelRiveMicButton = (require(10835) /* metro dependency 10835: VoicePanelRiveMicButton */).VoicePanelRiveMicButton;
muteBinding = mute;
binding = env0_2;
r0 = <VoicePanelRiveMicButton color={muteBinding ? binding.iconFillRed.color : binding.iconFill.color} muted={mute} />;
}
return r0;
}
}
}
function _fun118897() { // fn#118897, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15723:2355, offset: 0x024f3bf7, size: 52 bytes, params: 1, frame: 10
if (!env0_4.current.dragging) {
env0_4.current.dragging = true;
env0_5();
}
}
function _fun118898() { // fn#118898, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15723:2428, offset: 0x024f3c2b, size: 246 bytes, params: 1, frame: 20
const Gesture = (require(5321) /* metro dependency 5321 */).Gesture;
const value3 = Gesture.Pan().manualActivation(true);
const onTouchesMove = value3.onTouchesMove;
let closure = n_118899;
const object2 = {};
const State = (require(5321) /* metro dependency 5321 */).State;
object2.State = State;
const runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
object2.runOnJS = runOnJS;
object2.handleDragStart = env0_7;
closure.__closure = object2;
closure.__workletHash = 13866422602014;
closure.__initData = env1_19;
const value5 = Reflect.apply(onTouchesMove, value3, [closure]);
const onFinalize = value5.onFinalize;
closure = t_118900;
closure.__closure = {runOnJS: runOnJS, handlePTTEnd: env0_6};
closure.__workletHash = 12941114426646;
closure.__initData = env1_18;
return Reflect.apply(onFinalize, value5, [closure]);
}
function _fun118901() { // fn#118901, offset: 0x024f3dba, size: 11 bytes, params: 1, frame: 1
return _fun118902;
}
function _fun118904() { // fn#118904, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15723:3607, offset: 0x024f3eef, size: 195 bytes, params: 1, frame: 18
var r0;
var VoicePanelRiveMicButton;
var muteBinding;
var binding;
const dominantMuteStateBinding = dominantMuteState;
const DominantMuteState = (require(10834) /* metro dependency 10834: VoiceActionUtils */).DominantMuteState;
const SERVER_MUTE = DominantMuteState.SERVER_MUTE;
if (dominantMuteStateBinding === SERVER_MUTE) {
const MicrophoneDenyIcon = (require(9250) /* metro dependency 9250: MicrophoneDenyIcon */).MicrophoneDenyIcon;
r0 = <MicrophoneDenyIcon color={env0_2.iconFillRed.color} />;
} else {
VoicePanelRiveMicButton = (require(10835) /* metro dependency 10835: VoicePanelRiveMicButton */).VoicePanelRiveMicButton;
muteBinding = mute;
binding = env0_2;
r0 = <VoicePanelRiveMicButton color={muteBinding ? binding.iconFillRed.color : binding.iconFill.color} muted={mute} />;
}
return r0;
}
function _fun118893() { // fn#118893, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15723:1659, offset: 0x024f3a19, size: 131 bytes, params: 1, frame: 19
const value = environment.__proto__.__proto__;
const channel = ChannelStore.getChannel(env0_0);
return (require(10834) /* metro dependency 10834: VoiceActionUtils */).createDeafHandler(channel != null ? (require(10845) /* metro dependency 10845: useDeafStates */).getDeafStates(channel,
VoiceStateStore, MediaEngineStore, AuthenticationStore) : {'selfDeaf': false, 'deaf': false});
}
function n_118899({state}, a1) { // fn#118899, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15723:2501, offset: 0x024f3d21, size: 105 bytes, params: 3, frame: 14
var runOnJS;
var value2;
let value = environment.__proto__.__proto__;
const State = (require(5321) /* metro dependency 5321 */).State;
const BEGAN = State.BEGAN;
if (state === BEGAN) {
a1.activate();
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
runOnJS = value.runOnJS;
value2 = environment.__proto__;
Reflect.apply(runOnJS, value, [env1_7])();
}
}
function t_118900() { // fn#118900, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15723:2727, offset: 0x024f3d8a, size: 48 bytes, params: 1, frame: 12
let value = environment.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value.runOnJS(env1_6)();
}
global.__d(_fun118888, 15526, [57, 31, 4295, 1937, 1226, 1379, 4259, 3784, 1878, 4297, 33, 3, 4501, 566, 6952,
10834, 10845, 11794, 4017, 15447, 4081, 10750, 5321, 15527, 15528, 1244, 10280, 4573, 9250, 10835,
2]) /* metro module 15526, dependencies: [57, 31, 4295, 1937, 1226, 1379, 4259, 3784, 1878, 4297, 33, 3, 4501, 566, 6952, 10834, 10845, 11794, 4017, 15447, 4081, 10750, 5321, 15527, 15528, 1244, 10280, 4573, 9250, 10835, 2] */;
@@ -1,25 +1,31 @@
/* Metro module 10835; source: modules/voice_panel/native/controls/buttons/VoicePanelRiveMicButton.tsx; dependencies: [31, 27, 33, 3868, 9252, 10280, 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 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 '../../../../../external/discord_common/js/packages/design/native.tsx'; /* Metro dependency 3868 */
function _fun83090(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83090, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11021:6, offset: 0x01f0cf44, size: 152 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_2 = (require(27) /* metro dependency 27 */).View;
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/controls/buttons/VoicePanelRiveMicButton.tsx');
ReactModule;
(FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/controls/buttons/VoicePanelRiveMicButton.tsx');
exports.VoicePanelRiveMicButton = VoicePanelRiveMicButton;
function VoicePanelRiveMicButton({color, muted}) { // fn#83091, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11021:264, offset: 0x01f0cfdc, size: 203 bytes, params: 2, frame: 21
const MicrophoneRive = (NativeModule).MicrophoneRive;
return (
<View style={{'width': 24, 'height': 24, 'pointerEvents': 'none'}}>
<MicrophoneRive
dataBinding={{fill: color, on: !muted}}
defaultViewModelInstance={muted ? 'Off' : 'On'}
fallback={((Component) => <Component color={color} />)(muted ? (require(9252) /* metro dependency 9252: MicrophoneSlashIcon */).MicrophoneSlashIcon : (require(10280) /* metro dependency 10280: MicrophoneIcon */).MicrophoneIcon)}
/>
</View>
);
}
}
function VoicePanelRiveMicButton({color, muted}) { // fn#83091, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11021:264, offset: 0x01f0cfdc, size: 203 bytes, params: 2, frame: 21
const MicrophoneRive = (require(3868) /* metro dependency 3868: native */).MicrophoneRive;
return (
<View style={{'width': 24, 'height': 24, 'pointerEvents': 'none'}}>
<MicrophoneRive
dataBinding={{fill: color, on: !muted}}
defaultViewModelInstance={muted ? 'Off' : 'On'}
fallback={((Component) => <Component color={color} />)(muted ? (require(9252) /* metro dependency 9252: MicrophoneSlashIcon */).MicrophoneSlashIcon : (require(10280) /* metro dependency 10280: MicrophoneIcon */).MicrophoneIcon)}
/>
</View>
);
}
global.__d(_fun83090, 10835, [31, 27, 33, 3868, 9252, 10280,
2]) /* metro module 10835, dependencies: [31, 27, 33, 3868, 9252, 10280, 2] */;
@@ -1,15 +1,25 @@
/* Metro module 15543; source: modules/voice_panel/native/controls/buttons/VoicePanelScreenshareButton.tsx; dependencies: [31, 27, 1379, 661, 33, 1581, 12323, 15544, 4501, 697, 11794, 15527, 566, 44, 10794, 683, 1357, 15528, 1244, 6821, 2] */
import Module00044 from '../../../../../by-id/module-00044.js'; /* Metro dependency 44 */
import MobileVisualRefreshExperiment from '../../../../themes/experiments/MobileVisualRefreshExperiment.tsx'; /* Metro dependency 1357 */
import ChannelStore from '../../../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import UseScreenshareUtils from '../../../../video_calls/native/useScreenshareUtils.tsx'; /* Metro dependency 10794 */
import VoicePanelStateContext from '../../VoicePanelStateContext.tsx'; /* Metro dependency 11794 */
import VoicePanelAnimatedButtonWrapper from './VoicePanelAnimatedButtonWrapper.tsx'; /* Metro dependency 15528 */
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 VoicePanelStylesModule from './VoicePanelStyles.tsx'; /* Metro dependency 15527 */
function _fun118969(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118969, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15740:6, offset: 0x024f7204, size: 388 bytes, params: 8, frame: 21
var MobilePhoneShareIcon;
var ScreenArrowIcon;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).Image;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const env0_6 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
let value = require(33) /* metro dependency 33 */;
let value = JsxRuntimeModule;
const env0_7 = value.jsx;
const env0_8 = value.jsxs;
value = require(1581) /* metro dependency 1581: MetaQuestUtilsAndroid */;
@@ -20,63 +30,64 @@ function _fun118969(global, require, importDefault, importAll, module, exports,
}
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const object = {'width': '100%', 'height': '100%'};
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
const env0_10 = Reflect.apply(createStyles, value, [{circle: object, iconContainer: {'position': 'absolute',
const object2 = {'width': '100%', 'height': '100%'};
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
const env0_10 = Reflect.apply(createStyles, value, [{circle: object2, iconContainer: {'position': 'absolute',
'justifyContent': 'center', 'alignItems': 'center', 'width': '100%', 'height': '100%'}, icon: {'width': 24,
'height': 24}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/controls/buttons/VoicePanelScreenshareButton.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/controls/buttons/VoicePanelScreenshareButton.tsx');
exports.default = ScreenshareButton_118970;
}
function ScreenshareButton_118970({props, wrapperSpecs}) { // fn#118970, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15740:609, offset: 0x024f7388, size: 662 bytes, params: 2, frame: 27
const useContext = ReactModule.useContext;
const env0_0 = Reflect.apply(useContext, ReactModule,
[VoicePanelStateContext]).channelId;
const styles = useStyles();
const value3 = (VoicePanelStylesModule).useVoicePanelButtonStyles(wrapperSpecs);
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channelId);
});
(Module00044)(channel != null, 'null channel in VoicePanelScreenshareButton');
const {isActive, isFeatureEnabled, onPress,
imgSource} = (UseScreenshareUtils)(channel);
const value5 = ReactModule.useCallback(_fun118972, [isActive, isFeatureEnabled, onPress]);
let color = isFeatureEnabled ? value3.iconFill.color : value3.iconFillMuted.color;
const backgroundColor = isActive ? value3.iconBgSelected.backgroundColor : value3.iconBg.backgroundColor;
color = isActive ? value3.iconFillSelected.color : color;
const value6 = (MobileVisualRefreshExperiment)('ScreenshareButton');
const intl = (IndexNativeModule).intl;
const string = intl.string;
const t = (IndexNativeModule).t;
return (
<VoicePanelAnimatedButtonWrapper
onPress={value5}
disabled={!isFeatureEnabled}
props={props}
accessibilityLabel={isActive ? Reflect.apply(string, intl, [t.CpkXwZ]) : Reflect.apply(string, intl,
[t.fjBNo1])}
style={isActive ? value3.iconBgSelected : undefined}
>
{((Component) => <Component style={[styles.circle,
{backgroundColor: backgroundColor}]} />)(importDefault(6821) /* metro dependency 6821: NativeView */)}
{((Component) => <Component style={styles.iconContainer}>{value6 ? ((Component) => <Component color={color} />)(env0_9) : <Image source={imgSource} style={[styles.icon,
{tintColor: color}]} />}</Component>)(importDefault(6821) /* metro dependency 6821: NativeView */)}
</VoicePanelAnimatedButtonWrapper>
);
function _fun118972() { // fn#118972, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15740:963, offset: 0x024f761e, size: 89 bytes, params: 1, frame: 16
var value2;
var defaultImport;
if (isFeatureEnabled) {
value2 = environment.__proto__;
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
defaultImport.track(AnalyticEvents.VOICE_PANEL_SCREENSHARE_BUTTON_TAPPED, {source: 'connected button',
was_active: isActive});
onPress();
}
}
function ScreenshareButton_118970({props, wrapperSpecs}) { // fn#118970, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15740:609, offset: 0x024f7388, size: 662 bytes, params: 2, frame: 27
const binding = env0_3;
const useContext = binding.useContext;
const env0_0 = Reflect.apply(useContext, binding,
[importDefault(11794) /* metro dependency 11794: VoicePanelStateContext */]).channelId;
const styles = useStyles();
const value3 = (require(15527) /* metro dependency 15527: VoicePanelStyles */).useVoicePanelButtonStyles(wrapperSpecs);
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channelId);
});
(importDefault(44) /* metro dependency 44 */)(channel != null, 'null channel in VoicePanelScreenshareButton');
const {isActive, isFeatureEnabled, onPress,
imgSource} = (importDefault(10794) /* metro dependency 10794: useScreenshareUtils */)(channel);
const value5 = binding.useCallback(_fun118972, [isActive, isFeatureEnabled, onPress]);
let color = isFeatureEnabled ? value3.iconFill.color : value3.iconFillMuted.color;
const backgroundColor = isActive ? value3.iconBgSelected.backgroundColor : value3.iconBg.backgroundColor;
color = isActive ? value3.iconFillSelected.color : color;
const value6 = (importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('ScreenshareButton');
const VoicePanelAnimatedButtonWrapper = importDefault(15528) /* metro dependency 15528: VoicePanelAnimatedButtonWrapper */;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
return (
<VoicePanelAnimatedButtonWrapper
onPress={value5}
disabled={!isFeatureEnabled}
props={props}
accessibilityLabel={isActive ? Reflect.apply(string, intl, [t.CpkXwZ]) : Reflect.apply(string, intl,
[t.fjBNo1])}
style={isActive ? value3.iconBgSelected : undefined}
>
{((Component) => <Component style={[styles.circle,
{backgroundColor: backgroundColor}]} />)(importDefault(6821) /* metro dependency 6821: NativeView */)}
{((Component) => <Component style={styles.iconContainer}>{value6 ? ((Component) => <Component color={color} />)(env0_9) : <Image source={imgSource} style={[styles.icon,
{tintColor: color}]} />}</Component>)(importDefault(6821) /* metro dependency 6821: NativeView */)}
</VoicePanelAnimatedButtonWrapper>
);
}
function _fun118972() { // fn#118972, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15740:963, offset: 0x024f761e, size: 89 bytes, params: 1, frame: 16
var value2;
var defaultImport;
if (isFeatureEnabled) {
value2 = environment.__proto__;
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
defaultImport.track(AnalyticEvents.VOICE_PANEL_SCREENSHARE_BUTTON_TAPPED, {source: 'connected button',
was_active: isActive});
onPress();
}
}
global.__d(_fun118969, 15543, [31, 27, 1379, 661, 33, 1581, 12323, 15544, 4501, 697, 11794, 15527, 566, 44, 10794,
683, 1357, 15528, 1244, 6821,
2]) /* metro module 15543, dependencies: [31, 27, 1379, 661, 33, 1581, 12323, 15544, 4501, 697, 11794, 15527, 566, 44, 10794, 683, 1357, 15528, 1244, 6821, 2] */;
@@ -1,55 +1,67 @@
/* Metro module 15541; source: modules/voice_panel/native/controls/buttons/VoicePanelSoundboardButton.tsx; dependencies: [31, 33, 4501, 697, 11794, 15527, 15542, 15528, 1244, 6821, 10284, 2] */
import VoicePanelStateContext from '../../VoicePanelStateContext.tsx'; /* Metro dependency 11794 */
import UseSoundboardConfig from '../../hooks/useSoundboardConfig.tsx'; /* Metro dependency 15542 */
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 VoicePanelStylesModule from './VoicePanelStyles.tsx'; /* Metro dependency 15527 */
import * as UseSoundboardConfigModule from '../../hooks/useSoundboardConfig.tsx'; /* Metro dependency 15542 */
function _fun118963(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118963, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15738:6, offset: 0x024f6d3e, size: 243 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(33) /* metro dependency 33 */;
let value = JsxRuntimeModule;
const env0_4 = value.jsx;
const env0_5 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const object = {'width': '100%', 'height': '100%'};
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
const env0_6 = Reflect.apply(createStyles, value, [{circle: object, iconContainer: {'position': 'absolute',
const object2 = {'width': '100%', 'height': '100%'};
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
const env0_6 = Reflect.apply(createStyles, value, [{circle: object2, iconContainer: {'position': 'absolute',
'justifyContent': 'center', 'alignItems': 'center', 'width': '100%', 'height': '100%'}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/controls/buttons/VoicePanelSoundboardButton.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/controls/buttons/VoicePanelSoundboardButton.tsx');
exports.default = SoundboardButton;
}
function SoundboardButton({props, wrapperSpecs}) { // fn#118964, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15738:454, offset: 0x024f6e31, size: 448 bytes, params: 2, frame: 26
var r0;
var VoicePanelAnimatedButtonWrapper;
var object2;
var intl;
var items2;
var value;
const binding = env0_3;
const useContext = binding.useContext;
const channelId = Reflect.apply(useContext, binding,
[importDefault(11794) /* metro dependency 11794: VoicePanelStateContext */]).channelId;
const styles = useStyles();
const value2 = (require(15527) /* metro dependency 15527: VoicePanelStyles */).useVoicePanelButtonStyles(wrapperSpecs);
const backgroundColor = value2.iconBg.backgroundColor;
const defaultImport = importDefault(15542) /* metro dependency 15542: useSoundboardConfig */;
const SoundboardButtonLocation = (require(15542) /* metro dependency 15542: useSoundboardConfig */).SoundboardButtonLocation;
const VOICE_PANEL_CONTROLS = SoundboardButtonLocation.VOICE_PANEL_CONTROLS;
const {handlePress, disabled, visible} = defaultImport(channelId, VOICE_PANEL_CONTROLS);
if (visible) {
VoicePanelAnimatedButtonWrapper = importDefault(15528) /* metro dependency 15528: VoicePanelAnimatedButtonWrapper */;
object2 = {onPress: handlePress, disabled: disabled, props: props};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['6EJvHt']);
value = importDefault(6821) /* metro dependency 6821: NativeView */;
value = ((Component) => <Component style={[styles.circle, {backgroundColor: backgroundColor}]} />)(value);
items2 = [value];
value = importDefault(6821) /* metro dependency 6821: NativeView */;
items2[1] = ((Component) => <Component style={styles.iconContainer}>{((SoundboardIcon) => <SoundboardIcon color={disabled ? (importDefault(697) /* metro dependency 697: native */).colors.ICON_MUTED : value2.iconFill.color} />)((require(10284) /* metro dependency 10284: SoundboardIcon */).SoundboardIcon)}</Component>)(value);
value = <VoicePanelAnimatedButtonWrapper {...object2}>{items2}</VoicePanelAnimatedButtonWrapper>;
r0 = value;
} else {
r0 = null;
function SoundboardButton({props, wrapperSpecs}) { // fn#118964, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15738:454, offset: 0x024f6e31, size: 448 bytes, params: 2, frame: 26
var r0;
var VoicePanelAnimatedButtonWrapper;
var object;
var intl;
var items2;
var value;
const useContext = ReactModule.useContext;
const channelId = Reflect.apply(useContext, ReactModule,
[VoicePanelStateContext]).channelId;
const styles = useStyles();
const value2 = (VoicePanelStylesModule).useVoicePanelButtonStyles(wrapperSpecs);
const backgroundColor = value2.iconBg.backgroundColor;
const defaultImport = UseSoundboardConfig;
const SoundboardButtonLocation = (UseSoundboardConfigModule).SoundboardButtonLocation;
const VOICE_PANEL_CONTROLS = SoundboardButtonLocation.VOICE_PANEL_CONTROLS;
const {handlePress, disabled, visible} = defaultImport(channelId, VOICE_PANEL_CONTROLS);
if (visible) {
VoicePanelAnimatedButtonWrapper = importDefault(15528) /* metro dependency 15528: VoicePanelAnimatedButtonWrapper */;
object = {onPress: handlePress, disabled: disabled, props: props};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['6EJvHt']);
value = importDefault(6821) /* metro dependency 6821: NativeView */;
value = ((Component) => <Component style={[styles.circle, {backgroundColor: backgroundColor}]} />)(value);
items2 = [value];
value = importDefault(6821) /* metro dependency 6821: NativeView */;
items2[1] = ((Component) => <Component style={styles.iconContainer}>{((SoundboardIcon) => <SoundboardIcon color={disabled ? (importDefault(697) /* metro dependency 697: native */).colors.ICON_MUTED : value2.iconFill.color} />)((require(10284) /* metro dependency 10284: SoundboardIcon */).SoundboardIcon)}</Component>)(value);
value = (
<VoicePanelAnimatedButtonWrapper {...object}>
{items2}
</VoicePanelAnimatedButtonWrapper>
);
r0 = value;
} else {
r0 = null;
}
return r0;
}
return r0;
}
global.__d(_fun118963, 15541, [31, 33, 4501, 697, 11794, 15527, 15542, 15528, 1244, 6821, 10284,
2]) /* metro module 15541, dependencies: [31, 33, 4501, 697, 11794, 15527, 15542, 15528, 1244, 6821, 10284, 2] */;
@@ -1,45 +1,54 @@
/* Metro module 15527; source: modules/voice_panel/native/controls/buttons/VoicePanelStyles.tsx; dependencies: [4501, 697, 8621, 1357, 2] */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as CreateStylesModule from '../../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
function _fun118905(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118905, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15724:6, offset: 0x024f3fb2, size: 135 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun118906);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/controls/buttons/VoicePanelStyles.tsx');
const env0_3 = (CreateStylesModule).createStyles(_fun118906);
(FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/controls/buttons/VoicePanelStyles.tsx');
exports.useVoicePanelButtonStyles = function(a0) {
return useStyles(require(dependencyMap[2]).useDerivedStateFromSharedValue(a0, _fun118908),
importDefault(dependencyMap[3])('VoicePanelStyles'));
};
function _fun118906(a0, a1) { // fn#118906, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15724:120, offset: 0x024f4039, size: 384 bytes, params: 3, frame: 18
const object = {};
const BACKGROUND_MOD_STRONG = a1 ? 'transparent' : (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_STRONG;
object.iconBg = {backgroundColor: BACKGROUND_MOD_STRONG};
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
object.iconBgSelected = {backgroundColor: WHITE};
const object4 = {borderWidth: 1};
let BACKGROUND_VOICE_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_VOICE_MUTED;
object4.borderColor = BACKGROUND_VOICE_MUTED;
BACKGROUND_VOICE_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_VOICE_MUTED;
object4.backgroundColor = BACKGROUND_VOICE_MUTED;
object.iconBgVoiceMuted = object4;
let colors = (importDefault(697) /* metro dependency 697: native */).colors;
object.iconFill = {color: a0 ? colors.INTERACTIVE_TEXT_DEFAULT : a1 ? colors.ICON_STRONG : colors.WHITE};
const ICON_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.ICON_MUTED;
object.iconFillMuted = {color: ICON_MUTED};
const RED_400 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.RED_400;
object.iconFillRed = {color: RED_400};
const BLACK = (importDefault(697) /* metro dependency 697: native */).colors.BLACK;
object.iconFillSelected = {color: BLACK};
colors = (importDefault(697) /* metro dependency 697: native */).colors;
object.iconBadgeIndicator = {backgroundColor: a0 ? colors.CONTROL_BRAND_FOREGROUND : colors.WHITE};
return object;
}
function useVoicePanelButtonStyles(a0) { // fn#118907, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15724:884, offset: 0x024f41b9, size: 88 bytes, params: 2, frame: 16
return useStyles((require(8621) /* metro dependency 8621: useStateFromSharedValue */).useDerivedStateFromSharedValue(a0,
function(a0) {
return a0.drawerMode;
}), (importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('VoicePanelStyles'));
}
}
function _fun118906(a0, a1) { // fn#118906, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15724:120, offset: 0x024f4039, size: 384 bytes, params: 3, frame: 18
const object2 = {};
const BACKGROUND_MOD_STRONG = a1 ? 'transparent' : (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_STRONG;
object2.iconBg = {backgroundColor: BACKGROUND_MOD_STRONG};
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
object2.iconBgSelected = {backgroundColor: WHITE};
const object3 = {borderWidth: 1};
let BACKGROUND_VOICE_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_VOICE_MUTED;
object3.borderColor = BACKGROUND_VOICE_MUTED;
BACKGROUND_VOICE_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_VOICE_MUTED;
object3.backgroundColor = BACKGROUND_VOICE_MUTED;
object2.iconBgVoiceMuted = object3;
let colors = (importDefault(697) /* metro dependency 697: native */).colors;
object2.iconFill = {color: a0 ? colors.INTERACTIVE_TEXT_DEFAULT : a1 ? colors.ICON_STRONG : colors.WHITE};
const ICON_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.ICON_MUTED;
object2.iconFillMuted = {color: ICON_MUTED};
const RED_400 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.RED_400;
object2.iconFillRed = {color: RED_400};
const BLACK = (importDefault(697) /* metro dependency 697: native */).colors.BLACK;
object2.iconFillSelected = {color: BLACK};
colors = (importDefault(697) /* metro dependency 697: native */).colors;
object2.iconBadgeIndicator = {backgroundColor: a0 ? colors.CONTROL_BRAND_FOREGROUND : colors.WHITE};
return object2;
}
function useVoicePanelButtonStyles(a0) { // fn#118907, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15724:884, offset: 0x024f41b9, size: 88 bytes, params: 2, frame: 16
return useStyles((require(8621) /* metro dependency 8621: useStateFromSharedValue */).useDerivedStateFromSharedValue(a0,
function(a0) {
return a0.drawerMode;
}), (importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('VoicePanelStyles'));
function _fun118908(a0) { // fn#118908, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15724:970, offset: 0x024f4211, size: 11 bytes, params: 2, frame: 1
return a0.drawerMode;
}
global.__d(_fun118905, 15527, [4501, 697, 8621, 1357,
2]) /* metro module 15527, dependencies: [4501, 697, 8621, 1357, 2] */;
@@ -1,109 +1,140 @@
/* Metro module 15539; source: modules/voice_panel/native/controls/buttons/VoicePanelVideoButton.tsx; dependencies: [31, 27, 7730, 1379, 1867, 4259, 3784, 33, 11794, 15527, 566, 7118, 4497, 15540, 9228, 10661, 15528, 1244, 3868, 9759, 10286, 2] */
import ChannelStore from '../../../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import GuildStore from '../../../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import PermissionStore from '../../../../../stores/PermissionStore.tsx'; /* Metro dependency 3784 */
import MediaEngineStore from '../../../../../stores/MediaEngineStore.tsx'; /* Metro dependency 4259 */
import ChannelCallLifecycleStore from '../../../../video_calls/native/ChannelCallLifecycleStore.tsx'; /* Metro dependency 7730 */
import VoicePanelStateContext from '../../VoicePanelStateContext.tsx'; /* Metro dependency 11794 */
import VoicePanelAnimatedButtonWrapper from './VoicePanelAnimatedButtonWrapper.tsx'; /* Metro dependency 15528 */
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 IndexNativeModule from '../../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as NativeModule from '../../../../../external/discord_common/js/packages/design/native.tsx'; /* Metro dependency 3868 */
import * as CallsUtilsModule from '../../../../voice_calls/native/CallsUtils.tsx'; /* Metro dependency 9228 */
import * as VoicePanelStylesModule from './VoicePanelStyles.tsx'; /* Metro dependency 15527 */
function _fun118952(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118952, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15736:6, offset: 0x024f667c, size: 254 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const channelCallLifecycleStore = importDefault(7730) /* metro dependency 7730: ChannelCallLifecycleStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const mediaEngineStore = importDefault(4259) /* metro dependency 4259: MediaEngineStore */;
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
const env0_10 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/controls/buttons/VoicePanelVideoButton.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/controls/buttons/VoicePanelVideoButton.tsx');
exports.default = VideoButton_118954;
}
function VideoButtonRive({isVideoEnabled, color}) { // fn#118953, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15736:185, offset: 0x024f677a, size: 204 bytes, params: 2, frame: 22
const CameraRive = (require(3868) /* metro dependency 3868: native */).CameraRive;
return (
<View style={{'width': 24, 'height': 24, 'pointerEvents': 'none'}}>
<CameraRive
dataBinding={{fill: color, on: isVideoEnabled}}
defaultViewModelInstance={isVideoEnabled ? 'CamOn' : 'CamOff'}
fallback={((Component) => <Component color={color} />)(isVideoEnabled ? (require(9759) /* metro dependency 9759: VideoIcon */).VideoIcon : (require(10286) /* metro dependency 10286: VideoSlashIcon */).VideoSlashIcon)}
/>
</View>
);
}
function VideoButton_118954({props, wrapperSpecs}) { // fn#118954, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15736:585, offset: 0x024f6846, size: 433 bytes, params: 2, frame: 24
var object2;
let binding = env0_3;
const useContext = binding.useContext;
const channelId = Reflect.apply(useContext, binding,
[importDefault(11794) /* metro dependency 11794: VoicePanelStateContext */]).channelId;
const value2 = (require(15527) /* metro dependency 15527: VoicePanelStyles */).useVoicePanelButtonStyles(wrapperSpecs);
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore, PermissionStore,
ChannelStore], _fun118955);
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([MediaEngineStore], function() {
return MediaEngineStore.isVideoEnabled();
});
var env0_3 = value4;
const value5 = binding.useCallback(_fun118957, [channelId, value4, value3]);
const VoicePanelAnimatedButtonWrapper = importDefault(15528) /* metro dependency 15528: VoicePanelAnimatedButtonWrapper */;
object2 = {onPress: value5, props: props};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
object2.accessibilityLabel = value4 ? Reflect.apply(string, intl, [t.EnX2Jl]) : Reflect.apply(string, intl,
[t['v8K+8W']]);
object2.style = value4 ? value2.iconBgSelected : value2.iconBg;
binding = env0_3;
const useMemo = binding.useMemo;
return (
<VoicePanelAnimatedButtonWrapper {...object2}>
{Reflect.apply(useMemo, binding, [_fun118960, [value2.iconFill.color, value2.iconFillSelected.color,
value4]])}
</VoicePanelAnimatedButtonWrapper>
);
}
function _fun118955() { // fn#118955, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15736:748, offset: 0x024f69f7, size: 99 bytes, params: 1, frame: 19
const value = environment.__proto__;
const channel = ChannelStore.getChannel(channelId);
return channel != null && (channel.isPrivate() || (require(7118) /* metro dependency 7118: StreamPermissionUtils */).canStreamInChannel(channel,
GuildStore, PermissionStore, false));
}
function _fun118957() { // fn#118957, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15736:926, offset: 0x024f6a6d, size: 209 bytes, params: 1, frame: 20
var closure;
var value;
if (env0_2) {
if (ChannelStore.getChannel(channelId) != null) {
closure = animateToggleVideo;
if (env0_3) {
closure();
} else if (ChannelCallLifecycleStore.isReactingToThermalState()) {
(require(10661) /* metro dependency 10661: openIgnoreThermalStateAlert */).openIgnoreThermalStateAlert(function() {
return animateToggleVideo();
});
} else {
closure();
}
}
} else {
value = require(4497) /* metro dependency 4497: useAlertStoreNative */;
value.openAlert((require(15540) /* metro dependency 15540: VoicePanelNoVideoPermissionsAlert */).VOICE_PANEL_NO_VIDEO_PERMS_KEY,
((Component) => <Component />)(importDefault(15540) /* metro dependency 15540: VoicePanelNoVideoPermissionsAlert */));
function VideoButtonRive({isVideoEnabled, color}) { // fn#118953, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15736:185, offset: 0x024f677a, size: 204 bytes, params: 2, frame: 22
const CameraRive = (NativeModule).CameraRive;
return (
<View style={{'width': 24, 'height': 24, 'pointerEvents': 'none'}}>
<CameraRive
dataBinding={{fill: color, on: isVideoEnabled}}
defaultViewModelInstance={isVideoEnabled ? 'CamOn' : 'CamOff'}
fallback={((Component) => <Component color={color} />)(isVideoEnabled ? (require(9759) /* metro dependency 9759: VideoIcon */).VideoIcon : (require(10286) /* metro dependency 10286: VideoSlashIcon */).VideoSlashIcon)}
/>
</View>
);
}
function VideoButton_118954({props, wrapperSpecs}) { // fn#118954, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15736:585, offset: 0x024f6846, size: 433 bytes, params: 2, frame: 24
let binding = env0_3;
const useContext = binding.useContext;
const channelId = Reflect.apply(useContext, binding,
[VoicePanelStateContext]).channelId;
const value2 = (VoicePanelStylesModule).useVoicePanelButtonStyles(wrapperSpecs);
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore, PermissionStore,
ChannelStore], _fun118955);
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([MediaEngineStore], function() {
return MediaEngineStore.isVideoEnabled();
});
var env0_3 = value4;
const value5 = binding.useCallback(_fun118957, [channelId, value4, value3]);
object = {onPress: value5, props: props};
const intl = (IndexNativeModule).intl;
const string = intl.string;
const t = (IndexNativeModule).t;
object.accessibilityLabel = value4 ? Reflect.apply(string, intl, [t.EnX2Jl]) : Reflect.apply(string, intl,
[t['v8K+8W']]);
object.style = value4 ? value2.iconBgSelected : value2.iconBg;
binding = env0_3;
const useMemo = binding.useMemo;
return (
<VoicePanelAnimatedButtonWrapper {...object}>
{Reflect.apply(useMemo, binding, [_fun118960, [value2.iconFill.color, value2.iconFillSelected.color,
value4]])}
</VoicePanelAnimatedButtonWrapper>
);
function _fun118955() { // fn#118955, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15736:748, offset: 0x024f69f7, size: 99 bytes, params: 1, frame: 19
var r1;
var r0;
var isPrivate2;
var moduleValue;
const value = environment.__proto__;
const channel = ChannelStore.getChannel(channelId);
const value4 = channel != null;
if (value4) {
isPrivate2 = channel.isPrivate();
if (isPrivate2) {
r1 = isPrivate2;
} else {
moduleValue = require(7118) /* metro dependency 7118: StreamPermissionUtils */;
r1 = moduleValue.canStreamInChannel(channel, GuildStore, PermissionStore, false);
}
r0 = r1;
} else {
r0 = value4;
}
return r0;
}
function _fun118957() { // fn#118957, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15736:926, offset: 0x024f6a6d, size: 209 bytes, params: 1, frame: 20
var channelStoreBinding;
var animateToggleVideo2;
var channelCallLifecycleStoreBinding;
var value;
if (env0_2) {
channelStoreBinding = ChannelStore;
if (channelStoreBinding.getChannel(channelId) != null) {
animateToggleVideo2 = animateToggleVideo;
if (env0_3) {
animateToggleVideo2();
} else {
channelCallLifecycleStoreBinding = ChannelCallLifecycleStore;
if (channelCallLifecycleStoreBinding.isReactingToThermalState()) {
(require(10661) /* metro dependency 10661: openIgnoreThermalStateAlert */).openIgnoreThermalStateAlert(function() {
return animateToggleVideo();
});
} else {
animateToggleVideo2();
}
}
}
} else {
value = require(4497) /* metro dependency 4497: useAlertStoreNative */;
value.openAlert((require(15540) /* metro dependency 15540: VoicePanelNoVideoPermissionsAlert */).VOICE_PANEL_NO_VIDEO_PERMS_KEY,
((Component) => <Component />)(importDefault(15540) /* metro dependency 15540: VoicePanelNoVideoPermissionsAlert */));
}
function animateToggleVideo() { // fn#118958, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15736:994, offset: 0x024f6b3e, size: 45 bytes, params: 1, frame: 12
const value = environment.__proto__.__proto__;
(CallsUtilsModule).handleToggleVideo(env0_0);
}
}
function _fun118960() { // fn#118960, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15736:1436, offset: 0x024f6b6b, size: 70 bytes, params: 1, frame: 15
const binding = env0_3;
const binding2 = env0_1;
return (
<VideoButtonRive
isVideoEnabled={binding}
color={binding ? binding2.iconFillSelected.color : binding2.iconFill.color}
/>
);
}
}
}
function _fun118960() { // fn#118960, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15736:1436, offset: 0x024f6b6b, size: 70 bytes, params: 1, frame: 15
const binding = env0_3;
const binding2 = env0_1;
return (
<VideoButtonRive
isVideoEnabled={binding}
color={binding ? binding2.iconFillSelected.color : binding2.iconFill.color}
/>
);
}
function animateToggleVideo() { // fn#118958, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15736:994, offset: 0x024f6b3e, size: 45 bytes, params: 1, frame: 12
const value = environment.__proto__.__proto__;
(require(9228) /* metro dependency 9228: CallsUtils */).handleToggleVideo(env0_0);
}
global.__d(_fun118952, 15539, [31, 27, 7730, 1379, 1867, 4259, 3784, 33, 11794, 15527, 566, 7118, 4497, 15540, 9228,
10661, 15528, 1244, 3868, 9759, 10286,
2]) /* metro module 15539, dependencies: [31, 27, 7730, 1379, 1867, 4259, 3784, 33, 11794, 15527, 566, 7118, 4497, 15540, 9228, 10661, 15528, 1244, 3868, 9759, 10286, 2] */;
@@ -1,10 +1,12 @@
/* Metro module 15515; source: modules/voice_panel/native/controls/trackVoicePanelTabOpened.tsx; dependencies: [4605, 661, 683, 2] */
import ReadStateStore from '../../../../stores/ReadStateStore.tsx'; /* Metro dependency 4605 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
function _fun118827(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118827, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15712:6, offset: 0x024f0979, size: 212 bytes, params: 8, frame: 19
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const readStateStore = importDefault(4605) /* metro dependency 4605: ReadStateStore */;
const env0_3 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/controls/trackVoicePanelTabOpened.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/controls/trackVoicePanelTabOpened.tsx');
exports.default = function(a0, a1, a2) {
var r5;
r5 = ReadStateStore.hasUnread(a0) || ReadStateStore.getMentionCount(a0) > 0;
@@ -16,3 +18,4 @@ function _fun118827(global, require, importDefault, importAll, module, exports,
CONNECTED_BUTTON: 'connected button', VOICE_CONTROLS: 'voice controls', HEADER_BUTTON: 'header button'};
}
global.__d(_fun118827, 15515, [4605, 661, 683, 2]) /* metro module 15515, dependencies: [4605, 661, 683, 2] */;
@@ -1,4 +1,26 @@
/* Metro module 15525; source: modules/voice_panel/native/controls/useControlsButtons.tsx; dependencies: [31, 4259, 11793, 661, 33, 15526, 15529, 15535, 15537, 15539, 15541, 15543, 15546, 15453, 1581, 11794, 15390, 566, 4017, 11801, 8621, 2] */
import MediaEngineStore from '../../../../stores/MediaEngineStore.tsx'; /* Metro dependency 4259 */
import VoicePanelStateContext from '../VoicePanelStateContext.tsx'; /* Metro dependency 11794 */
import UseIsConnectedToVoiceChannel from '../hooks/useIsConnectedToVoiceChannel.tsx'; /* Metro dependency 15390 */
import MobileGoLiveEntrypointExperiment from '../../../go_live/MobileGoLiveEntrypointExperiment.tsx'; /* Metro dependency 15453 */
import VoicePanelConnectButton from './buttons/VoicePanelConnectButton.tsx'; /* Metro dependency 15529 */
import VoicePanelChatButton from './buttons/VoicePanelChatButton.tsx'; /* Metro dependency 15535 */
import VoicePanelDisconnectCancelButton from './buttons/VoicePanelDisconnectCancelButton.tsx'; /* Metro dependency 15537 */
import VoicePanelVideoButton from './buttons/VoicePanelVideoButton.tsx'; /* Metro dependency 15539 */
import VoicePanelSoundboardButton from './buttons/VoicePanelSoundboardButton.tsx'; /* Metro dependency 15541 */
import VoicePanelScreenshareButton from './buttons/VoicePanelScreenshareButton.tsx'; /* Metro dependency 15543 */
import VoicePanelDrawerToggleButton from './buttons/VoicePanelDrawerToggleButton.tsx'; /* Metro dependency 15546 */
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 MetaQuestUtilsAndroidModule from '../../../device/MetaQuestUtils.android.tsx'; /* Metro dependency 1581 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as VoicePanelControlsConstantsModule from './VoicePanelControlsConstants.tsx'; /* Metro dependency 11793 */
import * as VoicePanelControlsUtilsModule from '../utils/VoicePanelControlsUtils.tsx'; /* Metro dependency 11801 */
import * as MobileGoLiveEntrypointExperimentModule from '../../../go_live/MobileGoLiveEntrypointExperiment.tsx'; /* Metro dependency 15453 */
import * as VoicePanelMicButtonModule from './buttons/VoicePanelMicButton.tsx'; /* Metro dependency 15526 */
function _fun118869(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118869, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15722:6, offset: 0x024f27dc, size: 376 bytes, params: 8, frame: 19
const env0_0 = require;
const _arrayLikeToArray_118872 = function(a0, a1) {
@@ -46,291 +68,294 @@ function _fun118869(global, require, importDefault, importAll, module, exports,
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const mediaEngineStore = importDefault(4259) /* metro dependency 4259: MediaEngineStore */;
const voicePanelControlsConstantsModule = require(11793) /* metro dependency 11793: VoicePanelControlsConstants */;
const env0_5 = voicePanelControlsConstantsModule.CONTROLS_BUTTON_SIZE_LARGE;
const env0_6 = voicePanelControlsConstantsModule.CONTROLS_BUTTON_SIZE_NORMAL;
const env0_7 = (require(661) /* metro dependency 661: Constants */).InputModes;
const env0_8 = (require(33) /* metro dependency 33 */).jsx;
object = {mic: mic, ptt: ptt, micConnected: micConnected, connect: connect_118876, chat: chat,
disconnectCancel: disconnectCancel, video: video, soundboard: soundboard, screenshare: screenshare,
drawerToggle: drawerToggle};
object = {code: 'function useControlsButtonsTsx1(){const{getControlsDefaultWidth,windowDimensions,safeArea}=this.__closure;return getControlsDefaultWidth(windowDimensions.get().width,safeArea.get().left,safeArea.get().right);}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/controls/useControlsButtons.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/controls/useControlsButtons.tsx');
exports.default = useControlsButtons;
}
function _createForOfIteratorHelperLoose_118870(a0, a1) { // fn#118870, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15722:232, offset: 0x024f2954, 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_118870(a0, a1) { // fn#118870, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15722:232, offset: 0x024f2954, 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 _fun118871;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_118872(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 _fun118871;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_118872(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_118872(a0, value);
r6 = value;
} else {
r6 = value;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_118872(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun118871;
}
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 _fun118871() { // fn#118871, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15722:803, 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]};
}
}
function mic(a0, a1) { // fn#118873, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15722:1153, offset: 0x024f2ac8, size: 59 bytes, params: 3, frame: 15
const MicButton = (VoicePanelMicButtonModule).MicButton;
return <MicButton {...a1} key={a0} />;
}
function ptt(a0, a1) { // fn#118874, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15722:1195, offset: 0x024f2b03, size: 59 bytes, params: 3, frame: 15
const PTTButton = (VoicePanelMicButtonModule).PTTButton;
return <PTTButton {...a1} key={a0} />;
}
function micConnected(a0, a1) { // fn#118875, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15722:1246, offset: 0x024f2ac8, size: 59 bytes, params: 3, frame: 15
const MicButton = (VoicePanelMicButtonModule).MicButton;
return <MicButton {...a1} key={a0} />;
}
function connect_118876(a0, a1) { // fn#118876, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15722:1292, offset: 0x024f2b3e, size: 53 bytes, params: 3, frame: 15
return ((Component) => <Component {...a1} key={a0} />)(VoicePanelConnectButton);
}
function chat(a0, a1) { // fn#118877, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15722:1324, offset: 0x024f2b73, size: 53 bytes, params: 3, frame: 15
return ((Component) => <Component {...a1} key={a0} />)(VoicePanelChatButton);
}
function disconnectCancel(a0, a1) { // fn#118878, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15722:1368, offset: 0x024f2ba8, size: 53 bytes, params: 3, frame: 15
return ((Component) => <Component {...a1} key={a0} />)(VoicePanelDisconnectCancelButton);
}
function video(a0, a1) { // fn#118879, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15722:1401, offset: 0x024f2bdd, size: 53 bytes, params: 3, frame: 15
return ((Component) => <Component {...a1} key={a0} />)(VoicePanelVideoButton);
}
function soundboard(a0, a1) { // fn#118880, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15722:1439, offset: 0x024f2c12, size: 53 bytes, params: 3, frame: 15
return ((Component) => <Component {...a1} key={a0} />)(VoicePanelSoundboardButton);
}
function screenshare(a0, a1) { // fn#118881, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15722:1479, offset: 0x024f2c47, size: 53 bytes, params: 3, frame: 15
return ((Component) => <Component {...a1} key={a0} />)(VoicePanelScreenshareButton);
}
function drawerToggle(a0, a1) { // fn#118882, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15722:1520, offset: 0x024f2c7c, size: 53 bytes, params: 3, frame: 15
return ((Component) => <Component {...a1} key={a0} />)(VoicePanelDrawerToggleButton);
}
function useControlsButtons() { // fn#118883, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15722:1879, offset: 0x024f2cb1, size: 341 bytes, params: 1, frame: 26
const {channelId, windowDimensions,
safeArea} = ReactModule.useContext(VoicePanelStateContext);
const value3 = (UseIsConnectedToVoiceChannel)(channelId);
const defaultImport = MobileGoLiveEntrypointExperiment;
const useConfig = defaultImport.useConfig;
const treatment = Reflect.apply(useConfig, defaultImport, [{location: 'VoicePanelControlButtons'}]).treatment;
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([MediaEngineStore], function() {
return MediaEngineStore.getMode() === InputModes.PUSH_TO_TALK;
});
const useDerivedValue = ReanimatedRexportModule.useDerivedValue;
const useControlsButtonsN2 = useControlsButtonsN;
const getControlsDefaultWidth = (VoicePanelControlsUtilsModule).getControlsDefaultWidth;
useControlsButtonsN2.__closure = {getControlsDefaultWidth: getControlsDefaultWidth,
windowDimensions: windowDimensions, safeArea: safeArea};
useControlsButtonsN2.__workletHash = 16456936876254;
useControlsButtonsN2.__initData = env0_10;
let value = Reflect.apply(useDerivedValue, ReanimatedRexportModule, [useControlsButtonsN2]);
value = (importDefault(8621) /* metro dependency 8621: useStateFromSharedValue */)(value);
return ReactModule.useMemo(_fun118886, [value3, value4, value, treatment]);
function useControlsButtonsN() { // fn#118885, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15722:2175, owner: useControlsButtons.n, offset: 0x024f2e27, size: 93 bytes, params: 1, frame: 16
let value = environment.__proto__;
value = require(11801) /* metro dependency 11801: VoicePanelControlsUtils */;
const getControlsDefaultWidth = value.getControlsDefaultWidth;
const windowDimensionsBinding = windowDimensions;
let get = windowDimensionsBinding.get;
const width = Reflect.apply(get, windowDimensionsBinding, []).width;
const safeAreaBinding = safeArea;
get = safeAreaBinding.get;
const left = Reflect.apply(get, safeAreaBinding, []).left;
get = safeAreaBinding.get;
return Reflect.apply(getControlsDefaultWidth, value, [width, left, Reflect.apply(get, safeAreaBinding, []).right]);
}
function _fun118886() { // fn#118886, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15722:2437, offset: 0x024f2e84, size: 875 bytes, params: 1, frame: 25
var environment;
var r8;
var r2;
var r9;
var r1;
var value2;
var value3;
const MobileGoLiveEntrypointTreatment = (MobileGoLiveEntrypointExperimentModule).MobileGoLiveEntrypointTreatment;
var value7;
var length;
var value9;
var value14;
var width;
var value15;
var value16;
var value17;
var value18;
var value19;
var value20;
var value21;
var value22;
var value23;
const env0_0 = false;
const env0_1 = 0;
let binding = env0_2;
const binding2 = env0_4;
const treatmentBinding = treatment;
const items2 = [];
const push = items2.push;
if (binding) {
value3 = environment.__proto__;
Reflect.apply(push, items2, [{'type': 'icon-normal', 'key': 'connected-video', render: env1_9.video}]);
if (!binding2) {
items2.push({'type': 'icon-normal', 'key': 'connected-mic', render: env1_9.micConnected});
}
if (treatmentBinding === MobileGoLiveEntrypointTreatment.SCREENSHARE_REPLACES_CHAT) {
items2.push({'type': 'icon-normal', 'key': 'connected-screenshare', render: env1_9.screenshare});
} else {
items2.push({'type': 'icon-normal', 'key': 'connected-chat', render: env1_9.chat});
}
if (binding2) {
items2.push({'type': 'icon-large', 'key': 'connected-ptt', render: env1_9.ptt});
}
if (treatmentBinding === MobileGoLiveEntrypointTreatment.SCREENSHARE_REPLACES_SOUNDBOARD) {
items2.push({'type': 'icon-normal', 'key': 'connected-screenshare', render: env1_9.screenshare});
} else {
items2.push({'type': 'icon-normal', 'key': 'connected-soundboard', render: env1_9.soundboard});
}
items2.push({'type': 'icon-normal', 'key': 'connected-disconnect', render: env1_9.disconnectCancel});
} else {
value2 = environment.__proto__;
binding = env1_9;
Reflect.apply(push, items2, [{'type': 'icon-normal', 'key': 'disconnected-mute', render: binding.mic}]);
items2.push({'type': 'label', 'key': 'disconnected-connect', render: binding.connect});
items2.push({'type': 'icon-normal', 'key': 'disconnected-chat', render: binding.chat});
}
if (MetaQuestUtilsAndroidModule.isMetaQuest()) {
items2.push({'type': 'icon-normal', 'key': 'drawer-toggle', render: env1_9.drawerToggle});
}
const value5 = items2.map(_fun118887);
const value6 = 16;
if (env0_0) {
r8 = value6;
} else {
binding = VoicePanelControlsConstantsModule.CONTROLS_BUTTON_SIZE_LARGE;
value7 = binding - env0_1 * CONTROLS_BUTTON_SIZE_LARGE;
length = value5.length;
value9 = (length - env0_1) * CONTROLS_BUTTON_SIZE_NORMAL;
length = value5.length;
r8 = (value7 - value9 - 32) / (length - 1);
}
const value12 = _createForOfIteratorHelperLoose_118870(value5);
const value13 = value12();
let done = value13.done;
if (!done) {
r2 = value13;
r9 = value6;
while (true) {
value14 = r2.value;
width = value14.width;
if (width !== -1) {
r1 = width;
} else {
length = value5.length;
value15 = length - 1;
value16 = value15 * CONTROLS_BUTTON_SIZE_NORMAL;
length = value5.length;
value17 = length - 1;
binding = VoicePanelControlsConstantsModule.CONTROLS_BUTTON_SIZE_LARGE;
value18 = 32 + value16;
value19 = binding - (value18 + value17 * r8);
value14.width = value19;
r1 = value19;
}
value20 = VoicePanelControlsConstantsModule.CONTROLS_BUTTON_SIZE_LARGE / 2;
value21 = r1 / 2;
value14.x = r9 - value20 + value21;
value22 = r9 + (r1 + r8);
value23 = value12();
done = value23.done;
if (done) {
break;
}
r2 = value23;
r9 = value22;
continue;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun118871;
}
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 mic(a0, a1) { // fn#118873, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15722:1153, offset: 0x024f2ac8, size: 59 bytes, params: 3, frame: 15
const MicButton = (require(15526) /* metro dependency 15526: VoicePanelMicButton */).MicButton;
return <MicButton {...a1} key={a0} />;
}
function ptt(a0, a1) { // fn#118874, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15722:1195, offset: 0x024f2b03, size: 59 bytes, params: 3, frame: 15
const PTTButton = (require(15526) /* metro dependency 15526: VoicePanelMicButton */).PTTButton;
return <PTTButton {...a1} key={a0} />;
}
function connect_118876(a0, a1) { // fn#118876, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15722:1292, offset: 0x024f2b3e, size: 53 bytes, params: 3, frame: 15
return ((Component) => <Component {...a1} key={a0} />)(importDefault(15529) /* metro dependency 15529: VoicePanelConnectButton */);
}
function chat(a0, a1) { // fn#118877, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15722:1324, offset: 0x024f2b73, size: 53 bytes, params: 3, frame: 15
return ((Component) => <Component {...a1} key={a0} />)(importDefault(15535) /* metro dependency 15535: VoicePanelChatButton */);
}
function disconnectCancel(a0, a1) { // fn#118878, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15722:1368, offset: 0x024f2ba8, size: 53 bytes, params: 3, frame: 15
return ((Component) => <Component {...a1} key={a0} />)(importDefault(15537) /* metro dependency 15537: VoicePanelDisconnectCancelButton */);
}
function video(a0, a1) { // fn#118879, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15722:1401, offset: 0x024f2bdd, size: 53 bytes, params: 3, frame: 15
return ((Component) => <Component {...a1} key={a0} />)(importDefault(15539) /* metro dependency 15539: VoicePanelVideoButton */);
}
function soundboard(a0, a1) { // fn#118880, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15722:1439, offset: 0x024f2c12, size: 53 bytes, params: 3, frame: 15
return ((Component) => <Component {...a1} key={a0} />)(importDefault(15541) /* metro dependency 15541: VoicePanelSoundboardButton */);
}
function screenshare(a0, a1) { // fn#118881, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15722:1479, offset: 0x024f2c47, size: 53 bytes, params: 3, frame: 15
return ((Component) => <Component {...a1} key={a0} />)(importDefault(15543) /* metro dependency 15543: VoicePanelScreenshareButton */);
}
function drawerToggle(a0, a1) { // fn#118882, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15722:1520, offset: 0x024f2c7c, size: 53 bytes, params: 3, frame: 15
return ((Component) => <Component {...a1} key={a0} />)(importDefault(15546) /* metro dependency 15546: VoicePanelDrawerToggleButton */);
}
function useControlsButtons() { // fn#118883, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15722:1879, offset: 0x024f2cb1, size: 341 bytes, params: 1, frame: 26
const binding = env0_3;
const {channelId, windowDimensions,
safeArea} = binding.useContext(importDefault(11794) /* metro dependency 11794: VoicePanelStateContext */);
const value3 = (importDefault(15390) /* metro dependency 15390: useIsConnectedToVoiceChannel */)(channelId);
const defaultImport = importDefault(15453) /* metro dependency 15453: MobileGoLiveEntrypointExperiment */;
const useConfig = defaultImport.useConfig;
const treatment = Reflect.apply(useConfig, defaultImport, [{location: 'VoicePanelControlButtons'}]).treatment;
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([MediaEngineStore], function() {
return MediaEngineStore.getMode() === InputModes.PUSH_TO_TALK;
});
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useDerivedValue = reanimatedRexportModule.useDerivedValue;
const closure = useControlsButtonsN;
const getControlsDefaultWidth = (require(11801) /* metro dependency 11801: VoicePanelControlsUtils */).getControlsDefaultWidth;
closure.__closure = {getControlsDefaultWidth: getControlsDefaultWidth, windowDimensions: windowDimensions,
safeArea: safeArea};
closure.__workletHash = 16456936876254;
closure.__initData = env0_10;
let value = Reflect.apply(useDerivedValue, reanimatedRexportModule, [closure]);
value = (importDefault(8621) /* metro dependency 8621: useStateFromSharedValue */)(value);
return binding.useMemo(_fun118886, [value3, value4, value, treatment]);
}
function useControlsButtonsN() { // fn#118885, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15722:2175, owner: useControlsButtons.n, offset: 0x024f2e27, size: 93 bytes, params: 1, frame: 16
let value = environment.__proto__;
value = require(11801) /* metro dependency 11801: VoicePanelControlsUtils */;
const getControlsDefaultWidth = value.getControlsDefaultWidth;
const windowDimensionsBinding = windowDimensions;
let get = windowDimensionsBinding.get;
const width = Reflect.apply(get, windowDimensionsBinding, []).width;
const safeAreaBinding = safeArea;
get = safeAreaBinding.get;
const left = Reflect.apply(get, safeAreaBinding, []).left;
get = safeAreaBinding.get;
return Reflect.apply(getControlsDefaultWidth, value, [width, left, Reflect.apply(get, safeAreaBinding, []).right]);
}
function _fun118886() { // fn#118886, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15722:2437, offset: 0x024f2e84, size: 875 bytes, params: 1, frame: 25
var environment;
var r8;
var r2;
var r9;
var r1;
var value2;
var value3;
const MobileGoLiveEntrypointTreatment = (require(15453) /* metro dependency 15453: MobileGoLiveEntrypointExperiment */).MobileGoLiveEntrypointTreatment;
var value7;
var length;
var value9;
var value14;
var width;
var value15;
var value16;
var value17;
var value18;
var value19;
var value20;
var value21;
var value22;
var value23;
const env0_0 = false;
const env0_1 = 0;
let binding = env0_2;
const binding2 = env0_4;
const treatmentBinding = treatment;
const items2 = [];
const push = items2.push;
if (binding) {
value3 = environment.__proto__;
Reflect.apply(push, items2, [{'type': 'icon-normal', 'key': 'connected-video', render: env1_9.video}]);
if (!binding2) {
items2.push({'type': 'icon-normal', 'key': 'connected-mic', render: env1_9.micConnected});
}
if (treatmentBinding === MobileGoLiveEntrypointTreatment.SCREENSHARE_REPLACES_CHAT) {
items2.push({'type': 'icon-normal', 'key': 'connected-screenshare', render: env1_9.screenshare});
} else {
items2.push({'type': 'icon-normal', 'key': 'connected-chat', render: env1_9.chat});
}
if (binding2) {
items2.push({'type': 'icon-large', 'key': 'connected-ptt', render: env1_9.ptt});
}
if (treatmentBinding === MobileGoLiveEntrypointTreatment.SCREENSHARE_REPLACES_SOUNDBOARD) {
items2.push({'type': 'icon-normal', 'key': 'connected-screenshare', render: env1_9.screenshare});
} else {
items2.push({'type': 'icon-normal', 'key': 'connected-soundboard', render: env1_9.soundboard});
}
items2.push({'type': 'icon-normal', 'key': 'connected-disconnect', render: env1_9.disconnectCancel});
} else {
value2 = environment.__proto__;
binding = env1_9;
Reflect.apply(push, items2, [{'type': 'icon-normal', 'key': 'disconnected-mute', render: binding.mic}]);
items2.push({'type': 'label', 'key': 'disconnected-connect', render: binding.connect});
items2.push({'type': 'icon-normal', 'key': 'disconnected-chat', render: binding.chat});
}
const metaQuestUtilsAndroidModule = require(1581) /* metro dependency 1581: MetaQuestUtilsAndroid */;
if (metaQuestUtilsAndroidModule.isMetaQuest()) {
items2.push({'type': 'icon-normal', 'key': 'drawer-toggle', render: env1_9.drawerToggle});
}
const value5 = items2.map(_fun118887);
const value6 = 16;
if (env0_0) {
r8 = value6;
} else {
binding = env0_5;
value7 = binding - env0_1 * CONTROLS_BUTTON_SIZE_LARGE;
length = value5.length;
value9 = (length - env0_1) * CONTROLS_BUTTON_SIZE_NORMAL;
length = value5.length;
r8 = (value7 - value9 - 32) / (length - 1);
}
const value12 = _createForOfIteratorHelperLoose_118870(value5);
const value13 = value12();
let done = value13.done;
if (!done) {
r2 = value13;
r9 = value6;
while (true) {
value14 = r2.value;
width = value14.width;
if (width !== -1) {
r1 = width;
} else {
length = value5.length;
value15 = length - 1;
value16 = value15 * CONTROLS_BUTTON_SIZE_NORMAL;
length = value5.length;
value17 = length - 1;
binding = env0_5;
value18 = 32 + value16;
value19 = binding - (value18 + value17 * r8);
value14.width = value19;
r1 = value19;
return value5;
function _fun118887(a0) { // fn#118887, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15722:3555, offset: 0x024f31ef, size: 139 bytes, params: 2, frame: 16
var r6;
var r1;
var binding;
if (a0.type !== 'label') {
}
const value = environment.__proto__.__proto__;
if (a0.type !== 'icon-large') {
r1 = CONTROLS_BUTTON_SIZE_NORMAL;
} else {
binding = env0_1;
env0_1 = binding + 1;
r1 = CONTROLS_BUTTON_SIZE_LARGE;
r6 = binding;
}
const object = {};
copyDataProperties(object, a0, r6);
object['height'] = r1;
object['width'] = a0.type === 'label' ? -1 : r1;
object['x'] = 0;
object['y'] = 0;
return object;
}
value20 = env0_5 / 2;
value21 = r1 / 2;
value14.x = r9 - value20 + value21;
value22 = r9 + (r1 + r8);
value23 = value12();
done = value23.done;
if (done) {
break;
}
r2 = value23;
r9 = value22;
continue;
}
}
return value5;
}
function _fun118887(a0) { // fn#118887, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15722:3555, offset: 0x024f31ef, size: 139 bytes, params: 2, frame: 16
var r6;
var r1;
var binding;
if (a0.type !== 'label') {
}
const value = environment.__proto__.__proto__;
if (a0.type !== 'icon-large') {
r1 = CONTROLS_BUTTON_SIZE_NORMAL;
} else {
binding = env0_1;
env0_1 = binding + 1;
r1 = CONTROLS_BUTTON_SIZE_LARGE;
r6 = binding;
}
const object2 = {};
copyDataProperties(object2, a0, r6);
object2['height'] = r1;
object2['width'] = a0.type === 'label' ? -1 : r1;
object2['x'] = 0;
object2['y'] = 0;
return object2;
}
global.__d(_fun118869, 15525, [31, 4259, 11793, 661, 33, 15526, 15529, 15535, 15537, 15539, 15541, 15543, 15546,
15453, 1581, 11794, 15390, 566, 4017, 11801, 8621,
2]) /* metro module 15525, dependencies: [31, 4259, 11793, 661, 33, 15526, 15529, 15535, 15537, 15539, 15541, 15543, 15546, 15453, 1581, 11794, 15390, 566, 4017, 11801, 8621, 2] */;
@@ -1,30 +1,37 @@
/* Metro module 15447; source: modules/voice_panel/native/controls/useControlsLock.tsx; dependencies: [31, 11794, 2] */
import VoicePanelStateContext from '../VoicePanelStateContext.tsx'; /* Metro dependency 11794 */
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 */
function _fun118235(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118235, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15644:6, offset: 0x024d275f, size: 117 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importAll(31) /* metro dependency 31 */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/controls/useControlsLock.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/controls/useControlsLock.tsx');
exports.default = useControlsLock;
function useControlsLock(a0) { // fn#118236, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15644:205, offset: 0x024d27d4, size: 115 bytes, params: 2, frame: 15
const env0_0 = a0;
const useContext = ReactModule.useContext;
const env0_1 = Reflect.apply(useContext, ReactModule,
[VoicePanelStateContext]).generateStateLocker;
const property = ReactModule.useState(_fun118237)[0];
ReactModule.useLayoutEffect(function() {
return _fun118239;
}, [property]);
return property;
function _fun118237() { // fn#118237, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15644:295, offset: 0x01db3350, size: 20 bytes, params: 1, frame: 11
return generateStateLocker(env0_0);
}
function _fun118238() { // fn#118238, offset: 0x024d2847, size: 11 bytes, params: 1, frame: 1
return _fun118239;
function _fun118239() { // fn#118239, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15644:339, offset: 0x024d2852, size: 19 bytes, params: 1, frame: 9
return env1_2.unlock();
}
}
}
}
function useControlsLock(a0) { // fn#118236, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15644:205, offset: 0x024d27d4, size: 115 bytes, params: 2, frame: 15
const env0_0 = a0;
const binding = env0_2;
const useContext = binding.useContext;
const env0_1 = Reflect.apply(useContext, binding,
[importDefault(11794) /* metro dependency 11794: VoicePanelStateContext */]).generateStateLocker;
const property = binding.useState(_fun118237)[0];
binding.useLayoutEffect(function() {
return _fun118239;
}, [property]);
return property;
}
function _fun118238() { // fn#118238, offset: 0x024d2847, size: 11 bytes, params: 1, frame: 1
return _fun118239;
}
function _fun118239() { // fn#118239, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15644:339, offset: 0x024d2852, size: 19 bytes, params: 1, frame: 9
return env1_2.unlock();
}
global.__d(_fun118235, 15447, [31, 11794, 2]) /* metro module 15447, dependencies: [31, 11794, 2] */;
@@ -1,59 +1,64 @@
/* Metro module 15514; source: modules/voice_panel/native/controls/useDrawerToggle.tsx; dependencies: [31, 11793, 11794, 4017, 8621, 15515, 1244, 2] */
import UseStateFromSharedValue from '../../../reanimated/native/useStateFromSharedValue.tsx'; /* Metro dependency 8621 */
import VoicePanelStateContext from '../VoicePanelStateContext.tsx'; /* Metro dependency 11794 */
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 IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as VoicePanelControlsConstantsModule from './VoicePanelControlsConstants.tsx'; /* Metro dependency 11793 */
function _fun118823(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118823, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15711:6, offset: 0x024f06df, size: 159 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(11793) /* metro dependency 11793: VoicePanelControlsConstants */).VoicePanelControlsModes;
object = {code: 'function useDrawerToggleTsx1(){const{controlsSpecs,VoicePanelControlsModes}=this.__closure;return controlsSpecs.get().mode===VoicePanelControlsModes.DRAWER;}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/controls/useDrawerToggle.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/controls/useDrawerToggle.tsx');
exports.default = useDrawerToggle;
}
function useDrawerToggle(a0) { // fn#118824, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15711:408, offset: 0x024f077e, size: 331 bytes, params: 2, frame: 24
const env0_0 = a0;
const {controlsSpecs, connected,
dismissPanel} = ReactModule.useContext(VoicePanelStateContext);
const useDerivedValue = ReanimatedRexportModule.useDerivedValue;
const closure = function() {
return controlsSpecs.get().mode === VoicePanelControlsModes.DRAWER;
};
closure.__closure = {controlsSpecs: controlsSpecs, VoicePanelControlsModes: VoicePanelControlsModes};
closure.__workletHash = 900483810235;
closure.__initData = env0_5;
const value4 = (UseStateFromSharedValue)(Reflect.apply(useDerivedValue,
ReanimatedRexportModule, [closure]));
const value5 = ReactModule.useCallback(_fun118826, [a0, dismissPanel, connected, controlsSpecs]);
const value6 = (UseStateFromSharedValue)(connected);
object = {isDrawerOpen: value4, handlePress: value5};
const intl = (IndexNativeModule).intl;
const string = intl.string;
const t = (IndexNativeModule).t;
object.accessibilityLabel = value4 ? Reflect.apply(string, intl, [t['awDmr/']]) : Reflect.apply(string, intl,
[t.OXW7dL]);
object.ariaHidden = !value6;
return object;
function _fun118826() { // fn#118826, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15711:706, offset: 0x024f08f1, size: 136 bytes, params: 1, frame: 15
var binding;
var VoicePanelTabAnalyticsSources;
var value;
const controlsSpecsBinding = controlsSpecs;
const get = controlsSpecsBinding.get;
const mode = Reflect.apply(get, controlsSpecsBinding, []).mode;
const DRAWER = VoicePanelControlsModes.DRAWER;
if (mode === DRAWER) {
dismissPanel();
} else {
binding = env0_0;
value = connected.get();
VoicePanelTabAnalyticsSources = (require(15515) /* metro dependency 15515: trackVoicePanelTabOpened */).VoicePanelTabAnalyticsSources;
binding({tab: 'settings',
source: value ? VoicePanelTabAnalyticsSources.CONNECTED_BUTTON : VoicePanelTabAnalyticsSources.PREJOIN_BUTTON});
}
}
function useDrawerToggle(a0) { // fn#118824, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15711:408, offset: 0x024f077e, size: 331 bytes, params: 2, frame: 24
var object2;
const env0_0 = a0;
const binding = env0_3;
const {controlsSpecs, connected,
dismissPanel} = binding.useContext(importDefault(11794) /* metro dependency 11794: VoicePanelStateContext */);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useDerivedValue = reanimatedRexportModule.useDerivedValue;
const closure = function() {
return controlsSpecs.get().mode === VoicePanelControlsModes.DRAWER;
};
closure.__closure = {controlsSpecs: controlsSpecs, VoicePanelControlsModes: VoicePanelControlsModes};
closure.__workletHash = 900483810235;
closure.__initData = env0_5;
const value4 = (importDefault(8621) /* metro dependency 8621: useStateFromSharedValue */)(Reflect.apply(useDerivedValue,
reanimatedRexportModule, [closure]));
const value5 = binding.useCallback(_fun118826, [a0, dismissPanel, connected, controlsSpecs]);
const value6 = (importDefault(8621) /* metro dependency 8621: useStateFromSharedValue */)(connected);
object2 = {isDrawerOpen: value4, handlePress: value5};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
object2.accessibilityLabel = value4 ? Reflect.apply(string, intl, [t['awDmr/']]) : Reflect.apply(string, intl,
[t.OXW7dL]);
object2.ariaHidden = !value6;
return object2;
}
function _fun118826() { // fn#118826, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15711:706, offset: 0x024f08f1, size: 136 bytes, params: 1, frame: 15
var binding;
var VoicePanelTabAnalyticsSources;
var value;
const controlsSpecsBinding = controlsSpecs;
const get = controlsSpecsBinding.get;
const mode = Reflect.apply(get, controlsSpecsBinding, []).mode;
const DRAWER = VoicePanelControlsModes.DRAWER;
if (mode === DRAWER) {
dismissPanel();
} else {
binding = env0_0;
value = connected.get();
VoicePanelTabAnalyticsSources = (require(15515) /* metro dependency 15515: trackVoicePanelTabOpened */).VoicePanelTabAnalyticsSources;
binding({tab: 'settings',
source: value ? VoicePanelTabAnalyticsSources.CONNECTED_BUTTON : VoicePanelTabAnalyticsSources.PREJOIN_BUTTON});
}
}
global.__d(_fun118823, 15514, [31, 11793, 11794, 4017, 8621, 15515, 1244,
2]) /* metro module 15514, dependencies: [31, 11793, 11794, 4017, 8621, 15515, 1244, 2] */;
@@ -1,26 +1,29 @@
/* Metro module 15516; source: modules/voice_panel/native/controls/utils/VoicePanelControlUtils.tsx; dependencies: [11624, 2] */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun118829(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118829, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15713:6, offset: 0x024f0abf, size: 119 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object = {code: 'function getDrawerSpec_VoicePanelControlUtilsTsx1(height,top){const{roundToNearestPixel}=this.__closure;const maxHeight=height-top;return{minHeight:roundToNearestPixel(maxHeight*0.65),maxHeight:maxHeight};}'};
const value = _fun118830();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/controls/utils/VoicePanelControlUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/controls/utils/VoicePanelControlUtils.tsx');
exports.getDrawerSpec = value;
function _fun118830() { // fn#118830, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15713:316, offset: 0x024f0b36, size: 74 bytes, params: 1, frame: 14
const closure = function(a0, a1) {
var value = a0 - a1;
var object = {};
object.minHeight = importDefault(dependencyMap[0])(0.65 * value);
object.maxHeight = value;
return object;
};
let object = {};
object.roundToNearestPixel = importDefault(11624) /* metro dependency 11624: roundToNearestPixel */;
closure.__closure = object;
closure.__workletHash = 3647675988513;
closure.__initData = env0_2;
return closure;
}
}
function _fun118830() { // fn#118830, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15713:316, offset: 0x024f0b36, size: 74 bytes, params: 1, frame: 14
const closure = function(a0, a1) {
var value = a0 - a1;
var object = {};
object.minHeight = importDefault(dependencyMap[0])(0.65 * value);
object.maxHeight = value;
return object;
};
const object2 = {};
object2.roundToNearestPixel = importDefault(11624) /* metro dependency 11624: roundToNearestPixel */;
closure.__closure = object2;
closure.__workletHash = 3647675988513;
closure.__initData = env0_2;
return closure;
}
global.__d(_fun118829, 15516, [11624, 2]) /* metro module 15516, dependencies: [11624, 2] */;
@@ -1,300 +1,327 @@
/* Metro module 15410; source: modules/voice_panel/native/controls/utils/VoicePanelFloatingCTAUtils.tsx; dependencies: [57, 31, 27, 4606, 15411, 4117, 1379, 1385, 33, 4048, 11794, 15390, 9127, 632, 9077, 9039, 9035, 4080, 9052, 15412, 9219, 7975, 9133, 1244, 5312, 15413, 10859, 15414, 7014, 8621, 3968, 7684, 1365, 15415, 10284, 7212, 2] */
import Module00057 from '../../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import ChannelStore from '../../../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import UseTheme from '../../../../../hooks/useTheme.tsx'; /* Metro dependency 4048 */
import ChannelRTCStore from '../../../../calls/ChannelRTCStore.tsx'; /* Metro dependency 4606 */
import UseStateFromSharedValue from '../../../../reanimated/native/useStateFromSharedValue.tsx'; /* Metro dependency 8621 */
import VoicePanelStateContext from '../../VoicePanelStateContext.tsx'; /* Metro dependency 11794 */
import UseIsConnectedToVoiceChannel from '../../hooks/useIsConnectedToVoiceChannel.tsx'; /* Metro dependency 15390 */
import EventBannerStore from '../../../../guild_scheduled_events/EventBannerStore.tsx'; /* Metro dependency 15411 */
import UseChannelFloatingCTAContent from '../../../../video_calls/native/useChannelFloatingCTAContent.tsx'; /* Metro dependency 15414 */
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 UseStateFromStoresModule from '../../../../../external/discord_common/js/packages/flux/useStateFromStores.tsx'; /* Metro dependency 632 */
import * as IndexNativeModule from '../../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as Dismissible_contentModule from '../../../../../external/discord_common/js/packages/protos/discord_protos/discord_users/v1/dismissible_content.tsx'; /* Metro dependency 1365 */
import * as GuildScheduledEventsConstantsModule from '../../../../guild_scheduled_events/GuildScheduledEventsConstants.tsx'; /* Metro dependency 1385 */
import * as DismissibleContentUnsafeUtilsModule from '../../../../dismissible_content/DismissibleContentUnsafeUtils.tsx'; /* Metro dependency 3968 */
import * as GuildScheduledEventStoreModule from '../../../../guild_scheduled_events/GuildScheduledEventStore.tsx'; /* Metro dependency 4117 */
import * as XSmallIconModule from '../../../../../design/components/Icon/native/redesign/generated/XSmallIcon.tsx'; /* Metro dependency 5312 */
import * as UseGetDismissibleContentModule from '../../../../dismissible_content/useGetDismissibleContent.tsx'; /* Metro dependency 7014 */
import * as CircleErrorIconModule from '../../../../../design/components/Icon/native/redesign/generated/CircleErrorIcon.tsx'; /* Metro dependency 7684 */
import * as RowButtonNativeModule from '../../../../../design/components/TableRow/native/RowButton.native.tsx'; /* Metro dependency 7975 */
import * as UseManageResourcePermissionsModule from '../../../../permissions/useManageResourcePermissions.tsx'; /* Metro dependency 9077 */
import * as UseInviteMembersCallbackModule from '../../hooks/useInviteMembersCallback.tsx'; /* Metro dependency 15413 */
function _fun117870(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117870, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15607:6, offset: 0x024c3af9, size: 381 bytes, params: 8, frame: 22
const env0_0 = require;
const closure = useFloatingCTAProps;
const closure2 = getBadConnectionCTAProps;
const closure3 = getDismissableCTAProps;
const useFloatingCTAProps2 = useFloatingCTAProps;
const getBadConnectionCTAProps2 = getBadConnectionCTAProps;
const getDismissableCTAProps2 = getDismissableCTAProps;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).Pressable;
const channelRTCStore = importDefault(4606) /* metro dependency 4606: ChannelRTCStore */;
const eventBannerStore = importDefault(15411) /* metro dependency 15411: EventBannerStore */;
const env0_8 = (require(4117) /* metro dependency 4117: GuildScheduledEventStore */).isGuildScheduledEventActive;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const env0_10 = (require(1385) /* metro dependency 1385: GuildScheduledEventsConstants */).GuildScheduledEventEntityTypes;
const env0_11 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/controls/utils/VoicePanelFloatingCTAUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/controls/utils/VoicePanelFloatingCTAUtils.tsx');
exports.FLOATING_CTA_HIDE_TIMEOUT = 5000;
exports.OverrideFloatingCTA = {BAD_CONNECTION: 'BAD_CONNECTION'};
exports.useShouldShowFloatingCTA = useShouldShowFloatingCTA;
exports.useFloatingCTAProps = closure;
exports.getBadConnectionCTAProps = closure2;
exports.getDismissableCTAProps = closure3;
}
function useFloatingCTAProps(a0) { // fn#117871, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15607:321, offset: 0x024c3c76, size: 122 bytes, params: 2, frame: 16
const binding = env0_4;
const useContext = binding.useContext;
let value = (importDefault(8621) /* metro dependency 8621: useStateFromSharedValue */)(Reflect.apply(useContext,
binding, [importDefault(11794) /* metro dependency 11794: VoicePanelStateContext */]).showFloatingCTA);
value = useOverrideFloatingCTAProps(value);
return value ?? useGuildEventControlsProps(a0) ?? useCallInviteProps(a0);
}
function getBadConnectionCTAProps(a0) { // fn#117882, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15607:2391, offset: 0x024c437e, size: 348 bytes, params: 2, frame: 21
const env0_0 = a0;
const object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.uv1tVh);
object2.subLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['gQ14+g']);
const RowButton = (require(7975) /* metro dependency 7975: RowButtonNative */).RowButton;
const Icon = RowButton.Icon;
const CircleErrorIcon = (require(7684) /* metro dependency 7684: CircleErrorIcon */).CircleErrorIcon;
object2.icon = <Icon IconComponent={CircleErrorIcon} variant="translucent" />;
object2.onPress = onPress_117883;
const pressableProps = {'accessibilityRole': 'button', 'accessibilityLabel': null, 'hitSlop': 4,
accessibilityLabel: intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq),
onPress: onPress_117884};
const XSmallIcon = (require(5312) /* metro dependency 5312: XSmallIcon */).XSmallIcon;
object2.trailing = <Pressable {...pressableProps}><XSmallIcon color="interactive-icon-default" /></Pressable>;
return object2;
}
function handleSoundboardMobileFloatingCtaClose() { // fn#117885, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15607:3008, offset: 0x024c454b, size: 62 bytes, params: 1, frame: 14
const value = require(3968) /* metro dependency 3968: DismissibleContentUnsafeUtils */;
const UNSAFE_markDismissibleContentAsDismissed = value.UNSAFE_markDismissibleContentAsDismissed;
const DismissibleContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent;
const SOUNDBOARD_MOBILE_FLOATING_CTA = DismissibleContent.SOUNDBOARD_MOBILE_FLOATING_CTA;
Reflect.apply(UNSAFE_markDismissibleContentAsDismissed, value, [SOUNDBOARD_MOBILE_FLOATING_CTA]);
}
function getDismissableCTAProps({dismissableContent, channel}) { // fn#117886, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15607:3420, offset: 0x024c4589, size: 310 bytes, params: 2, frame: 19
var object2;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const DismissibleContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent;
const VOICE_PANEL_BAD_CONNECTION_CTA = DismissibleContent.VOICE_PANEL_BAD_CONNECTION_CTA;
if (VOICE_PANEL_BAD_CONNECTION_CTA === dismissableContent) {
return getBadConnectionCTAProps();
}
const SOUNDBOARD_MOBILE_FLOATING_CTA = DismissibleContent.SOUNDBOARD_MOBILE_FLOATING_CTA;
if (SOUNDBOARD_MOBILE_FLOATING_CTA === dismissableContent) {
object2 = {};
object2.icon = ((SoundboardIcon) => <SoundboardIcon color="interactive-icon-default" />)((require(10284) /* metro dependency 10284: SoundboardIcon */).SoundboardIcon);
object2.onPress = onPress_117887;
object2.label = (require(7212) /* metro dependency 7212: getDeviceSpecificString */).getDeviceSpecificString({quest: t.XLlWUe},
t.IJgkPX);
object2.trailing = <CloseSoundboardMobileFloatingCtaIcon />;
return object2;
}
DismissibleContent.DONUT_MOBILE_NUX;
return null;
}
function CloseSoundboardMobileFloatingCtaIcon() { // fn#117888, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15607:3209, offset: 0x024c470e, size: 142 bytes, params: 1, frame: 19
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const cpT0Cq = (require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq;
const handleSoundboardMobileFloatingCtaCloseBinding = handleSoundboardMobileFloatingCtaClose;
const XSmallIcon = (require(5312) /* metro dependency 5312: XSmallIcon */).XSmallIcon;
return (
<Pressable
accessibilityRole="button"
accessibilityLabel={Reflect.apply(string, intl, [cpT0Cq])}
onPress={handleSoundboardMobileFloatingCtaCloseBinding}
>
<XSmallIcon color="interactive-icon-default" />
</Pressable>
);
}
function useShouldShowFloatingCTA(a0) { // fn#117889, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15607:4355, offset: 0x024c479c, size: 193 bytes, params: 2, frame: 17
const env0_0 = a0;
const property = env0_3((require(7014) /* metro dependency 7014: useGetDismissibleContent */).useGetDismissibleContent((importDefault(15414) /* metro dependency 15414: useChannelFloatingCTAContent */)(a0)),
1)[0];
const channel = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([ChannelStore],
_fun117890);
return env0_4.useMemo(_fun117891, [property, channel]) != null || useFloatingCTAProps(channel) != null;
}
function useOverrideFloatingCTAProps(a0) { // fn#117872, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15607:402, owner: useFloatingCTAProps.useOverrideFloatingCTAProps, offset: 0x024c3cf0, size: 95 bytes, params: 2, frame: 17
const env0_0 = a0;
const binding = env1_4;
const useContext = binding.useContext;
return env1_4.useMemo(_fun117873, [Reflect.apply(useContext, binding,
[importDefault(11794) /* metro dependency 11794: VoicePanelStateContext */]).setShowFloatingCTA, a0]);
}
function useGuildEventControlsProps(a0) { // fn#117875, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15607:602, owner: useFloatingCTAProps.useGuildEventControlsProps, offset: 0x024c3d91, size: 842 bytes, params: 2, frame: 28
var scheduled_start_time;
var name;
var entity_type;
var STAGE_INSTANCE;
var moduleValue5;
var getGuildScheduledEventHeaderProps;
var text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const value2 = undefined;
const value3 = (importDefault(4048) /* metro dependency 4048: useTheme */)();
let binding = env1_4;
const useContext = binding.useContext;
const value4 = (importDefault(15390) /* metro dependency 15390: useIsConnectedToVoiceChannel */)(Reflect.apply(useContext,
binding, [importDefault(11794) /* metro dependency 11794: VoicePanelStateContext */]).channelId);
const value5 = (require(9127) /* metro dependency 9127: useGuildScheduledEvents */).useImminentUpcomingGuildEvents(a0 == null ? value2 : a0.id);
const useStateFromStoresModule = require(632) /* metro dependency 632: useStateFromStores */;
const useStateFromStores = useStateFromStoresModule.useStateFromStores;
let object = [EventBannerStore];
const value6 = Reflect.apply(useStateFromStores, useStateFromStoresModule, [object, _fun117876, [value5]]);
const useManageResourcePermissionsModule = require(9077) /* metro dependency 9077: useManageResourcePermissions */;
const useManageResourcePermissions = useManageResourcePermissionsModule.useManageResourcePermissions;
const canManageGuildEvent2 = Reflect.apply(useManageResourcePermissions, useManageResourcePermissionsModule,
[a0]).canManageGuildEvent(value6);
const r1 = value6 != null && isGuildScheduledEventActive(value6);
const r3 = (require(9039) /* metro dependency 9039: ScheduleUtils */).getNextRecurrenceIdInEvent(value6) ?? value2;
const value9 = (importDefault(9035) /* metro dependency 9035: useGuildScheduledEventUserCount */)(value6 == null ? value2 : value6.guild_id,
value6 == null ? value2 : value6.id, r3);
binding = env1_4;
let useCallback = binding.useCallback;
const value10 = Reflect.apply(useCallback, binding, [_fun117878, [value6, r3]]);
binding = env1_4;
useCallback = binding.useCallback;
if (value4) {
if (value6 == null) {
return value2;
}
if (canManageGuildEvent2) {
if (r1) {
return value2;
exports.useFloatingCTAProps = useFloatingCTAProps2;
exports.getBadConnectionCTAProps = getBadConnectionCTAProps2;
exports.getDismissableCTAProps = getDismissableCTAProps2;
function useFloatingCTAProps(a0) { // fn#117871, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15607:321, offset: 0x024c3c76, size: 122 bytes, params: 2, frame: 16
const useContext = ReactModule.useContext;
let value = (UseStateFromSharedValue)(Reflect.apply(useContext,
ReactModule, [VoicePanelStateContext]).showFloatingCTA);
value = useOverrideFloatingCTAProps(value);
return value ?? useGuildEventControlsProps(a0) ?? useCallInviteProps(a0);
function useOverrideFloatingCTAProps(a0) { // fn#117872, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15607:402, owner: useFloatingCTAProps.useOverrideFloatingCTAProps, offset: 0x024c3cf0, size: 95 bytes, params: 2, frame: 17
const env0_0 = a0;
const binding = env1_4;
const useContext = binding.useContext;
return env1_4.useMemo(_fun117873, [Reflect.apply(useContext, binding,
[VoicePanelStateContext]).setShowFloatingCTA, a0]);
function _fun117873() { // fn#117873, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15607:508, offset: 0x024c3d4f, size: 48 bytes, params: 1, frame: 12
var environment;
const binding = env0_0;
const value = environment.__proto__.__proto__;
const BAD_CONNECTION = env2_12.BAD_CONNECTION;
return binding !== BAD_CONNECTION ? null : getBadConnectionCTAProps(function() {
return setShowFloatingCTA(null);
});
}
scheduled_start_time = value6.scheduled_start_time;
name = value6.name;
entity_type = value6.entity_type;
STAGE_INSTANCE = GuildScheduledEventEntityTypes.STAGE_INSTANCE;
moduleValue5 = require(9219) /* metro dependency 9219: GuildScheduledEventHeaderUtils */;
getGuildScheduledEventHeaderProps = moduleValue5.getGuildScheduledEventHeaderProps;
object = {};
object.eventTimeData = (require(9039) /* metro dependency 9039: ScheduleUtils */).getEventTimeData(scheduled_start_time);
object.isStage = entity_type === STAGE_INSTANCE;
object.theme = value3;
object.event = value6;
text = Reflect.apply(getGuildScheduledEventHeaderProps, moduleValue5, [object]).text;
object = {onPress: value10};
object.icon = ((Icon) => <Icon IconComponent={(require(9133) /* metro dependency 9133: CalendarIcon */).CalendarIcon} variant="translucent" />)((require(7975) /* metro dependency 7975: RowButtonNative */).RowButton.Icon);
object.label = name;
object.subLabel = '' + text + ' • ' + intl.formatToPlainString(t.NywdIj, {count: value9});
object.trailing = <Pressable accessibilityRole="button" accessibilityLabel={intl.string(t.cpT0Cq)} onPress={Reflect.apply(useCallback,
binding, [_fun117879,
[value6]])}>{((XSmallIcon) => <XSmallIcon color="interactive-icon-default" />)((require(5312) /* metro dependency 5312: XSmallIcon */).XSmallIcon)}</Pressable>;
return object;
}
}
return value2;
}
function useCallInviteProps(a0) { // fn#117880, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15607:1880, owner: useFloatingCTAProps.useCallInviteProps, offset: 0x024c41bb, size: 376 bytes, params: 2, frame: 20
var r0;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const env0_0 = a0;
const binding = env1_4;
const useContext = binding.useContext;
const value2 = undefined;
const value3 = (importDefault(15390) /* metro dependency 15390: useIsConnectedToVoiceChannel */)(Reflect.apply(useContext,
binding, [importDefault(11794) /* metro dependency 11794: VoicePanelStateContext */]).channelId);
const useStateFromStoresModule = require(632) /* metro dependency 632: useStateFromStores */;
const useStateFromStores = useStateFromStoresModule.useStateFromStores;
let object = [ChannelRTCStore];
const value4 = Reflect.apply(useStateFromStores, useStateFromStoresModule, [object, _fun117881]);
const useInviteMembersCallbackModule = require(15413) /* metro dependency 15413: useInviteMembersCallback */;
const useInviteMembersCallback = useInviteMembersCallbackModule.useInviteMembersCallback;
if (a0 != null) {
if (value3) {
}
function useGuildEventControlsProps(a0) { // fn#117875, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15607:602, owner: useFloatingCTAProps.useGuildEventControlsProps, offset: 0x024c3d91, size: 842 bytes, params: 2, frame: 28
var scheduled_start_time;
var name;
var entity_type;
var STAGE_INSTANCE;
var moduleValue5;
var getGuildScheduledEventHeaderProps;
var text;
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
const value2 = undefined;
const value3 = (UseTheme)();
let binding = env1_4;
const useContext = binding.useContext;
const value4 = (UseIsConnectedToVoiceChannel)(Reflect.apply(useContext,
binding, [VoicePanelStateContext]).channelId);
const value5 = (require(9127) /* metro dependency 9127: useGuildScheduledEvents */).useImminentUpcomingGuildEvents(a0 == null ? value2 : a0.id);
const useStateFromStores = UseStateFromStoresModule.useStateFromStores;
let object = [EventBannerStore];
const value6 = Reflect.apply(useStateFromStores, UseStateFromStoresModule, [object, _fun117876, [value5]]);
const useManageResourcePermissions = UseManageResourcePermissionsModule.useManageResourcePermissions;
const canManageGuildEvent2 = Reflect.apply(useManageResourcePermissions, UseManageResourcePermissionsModule,
[a0]).canManageGuildEvent(value6);
const r1 = value6 != null && isGuildScheduledEventActive(value6);
const r3 = (require(9039) /* metro dependency 9039: ScheduleUtils */).getNextRecurrenceIdInEvent(value6) ?? value2;
const value9 = (importDefault(9035) /* metro dependency 9035: useGuildScheduledEventUserCount */)(value6 == null ? value2 : value6.guild_id,
value6 == null ? value2 : value6.id, r3);
binding = env1_4;
let useCallback = binding.useCallback;
const value10 = Reflect.apply(useCallback, binding, [_fun117878, [value6, r3]]);
binding = env1_4;
useCallback = binding.useCallback;
if (value4) {
object = {};
object.label = intl.string(t.N4nebq);
object.subLabel = intl.string(t.o2XPr2);
object.icon = ((Icon) => <Icon IconComponent={(require(10859) /* metro dependency 10859: GroupPlusIcon */).GroupPlusIcon} variant="translucent" />)((require(7975) /* metro dependency 7975: RowButtonNative */).RowButton.Icon);
object.onPress = Reflect.apply(useInviteMembersCallback, useInviteMembersCallbackModule,
[a0 == null ? value2 : a0.id]);
r0 = object;
if (value6 == null) {
return value2;
}
if (canManageGuildEvent2) {
if (r1) {
return value2;
}
scheduled_start_time = value6.scheduled_start_time;
name = value6.name;
entity_type = value6.entity_type;
STAGE_INSTANCE = GuildScheduledEventEntityTypes.STAGE_INSTANCE;
moduleValue5 = require(9219) /* metro dependency 9219: GuildScheduledEventHeaderUtils */;
getGuildScheduledEventHeaderProps = moduleValue5.getGuildScheduledEventHeaderProps;
object = {};
object.eventTimeData = (require(9039) /* metro dependency 9039: ScheduleUtils */).getEventTimeData(scheduled_start_time);
object.isStage = entity_type === STAGE_INSTANCE;
object.theme = value3;
object.event = value6;
text = Reflect.apply(getGuildScheduledEventHeaderProps, moduleValue5, [object]).text;
object = {onPress: value10};
object.icon = ((Icon) => <Icon IconComponent={(require(9133) /* metro dependency 9133: CalendarIcon */).CalendarIcon} variant="translucent" />)((require(7975) /* metro dependency 7975: RowButtonNative */).RowButton.Icon);
object.label = name;
object.subLabel = '' + text + ' • ' + intl.formatToPlainString(t.NywdIj, {count: value9});
object.trailing = (
<Pressable
accessibilityRole="button"
accessibilityLabel={intl.string(t.cpT0Cq)}
onPress={Reflect.apply(useCallback, binding, [_fun117879, [value6]])}
>
{((XSmallIcon) => <XSmallIcon color="interactive-icon-default" />)((require(5312) /* metro dependency 5312: XSmallIcon */).XSmallIcon)}
</Pressable>
);
return object;
}
}
return value2;
function _fun117876() { // fn#117876, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15607:806, offset: 0x024c40db, size: 41 bytes, params: 1, frame: 11
const value = env0_0.find(function(a0) {
return !EventBannerStore.isEventDismissed(a0.id);
});
const value2 = null;
return value2 != value ? value : value2;
}
function _fun117878() { // fn#117878, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15607:1110, offset: 0x024c4125, size: 88 bytes, params: 1, frame: 15
var value2;
var moduleValue;
if (env0_1 != null) {
value2 = environment.__proto__.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
moduleValue = require(9052) /* metro dependency 9052: GuildScheduledEventModalActionCreators */;
moduleValue.openStartGuildEventModal(env0_1, env0_2);
}
}
function _fun117879() { // fn#117879, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15607:1218, offset: 0x024c417d, size: 62 bytes, params: 1, frame: 12
var value2;
var moduleValue;
if (env0_1 != null) {
value2 = environment.__proto__.__proto__;
moduleValue = require(15412) /* metro dependency 15412: GuildScheduledEventsNoticesActionCreators */;
moduleValue.dismissEventBanner(env0_1.id);
}
}
}
function useCallInviteProps(a0) { // fn#117880, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15607:1880, owner: useFloatingCTAProps.useCallInviteProps, offset: 0x024c41bb, size: 376 bytes, params: 2, frame: 20
var r0;
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
const env0_0 = a0;
const binding = env1_4;
const useContext = binding.useContext;
const value2 = undefined;
const value3 = (UseIsConnectedToVoiceChannel)(Reflect.apply(useContext,
binding, [VoicePanelStateContext]).channelId);
const useStateFromStores = UseStateFromStoresModule.useStateFromStores;
let object = [ChannelRTCStore];
const value4 = Reflect.apply(useStateFromStores, UseStateFromStoresModule, [object, _fun117881]);
const useInviteMembersCallback = UseInviteMembersCallbackModule.useInviteMembersCallback;
if (a0 != null) {
if (value3) {
if (value4) {
object = {};
object.label = intl.string(t.N4nebq);
object.subLabel = intl.string(t.o2XPr2);
object.icon = ((Icon) => <Icon IconComponent={(require(10859) /* metro dependency 10859: GroupPlusIcon */).GroupPlusIcon} variant="translucent" />)((require(7975) /* metro dependency 7975: RowButtonNative */).RowButton.Icon);
object.onPress = Reflect.apply(useInviteMembersCallback, UseInviteMembersCallbackModule,
[a0 == null ? value2 : a0.id]);
r0 = object;
} else {
r0 = value2;
}
} else {
r0 = value2;
}
} else {
r0 = value2;
}
} else {
r0 = value2;
return r0;
function _fun117881() { // fn#117881, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15607:1999, offset: 0x024c4333, size: 75 bytes, params: 1, frame: 12
return env0_0?.id != null && ChannelRTCStore.getParticipants(env0_0.id).length === 1;
}
}
} else {
r0 = value2;
}
return r0;
}
function getBadConnectionCTAPropsOnPress() { // fn#117883, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15607:2636, owner: getBadConnectionCTAProps.onPress, offset: 0x024c44da, size: 30 bytes, params: 1, frame: 11
return env0_0?.();
}
function getBadConnectionCTAProps(a0) { // fn#117882, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15607:2391, offset: 0x024c437e, size: 348 bytes, params: 2, frame: 21
const env0_0 = a0;
const object = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.uv1tVh);
object.subLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['gQ14+g']);
const RowButton = (RowButtonNativeModule).RowButton;
const Icon = RowButton.Icon;
const CircleErrorIcon = (CircleErrorIconModule).CircleErrorIcon;
object.icon = <Icon IconComponent={CircleErrorIcon} variant="translucent" />;
object.onPress = onPress_117883;
const pressableProps = {'accessibilityRole': 'button', 'accessibilityLabel': null, 'hitSlop': 4,
accessibilityLabel: intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq),
onPress: onPress_117884};
const XSmallIcon = (XSmallIconModule).XSmallIcon;
object.trailing = (
<Pressable {...pressableProps}>
<XSmallIcon color="interactive-icon-default" />
</Pressable>
);
return object;
function getBadConnectionCTAPropsOnPress() { // fn#117883, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15607:2636, owner: getBadConnectionCTAProps.onPress, offset: 0x024c44da, size: 30 bytes, params: 1, frame: 11
return env0_0?.();
}
function getBadConnectionCTAPropsOnPress_117884() { // fn#117884, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15607:2777, owner: getBadConnectionCTAProps.onPress, offset: 0x024c44f8, size: 83 bytes, params: 1, frame: 13
const value = environment.__proto__;
const DismissibleContent = (Dismissible_contentModule).DismissibleContent;
const VOICE_PANEL_BAD_CONNECTION_CTA = DismissibleContent.VOICE_PANEL_BAD_CONNECTION_CTA;
(DismissibleContentUnsafeUtilsModule).UNSAFE_markDismissibleContentAsDismissed(VOICE_PANEL_BAD_CONNECTION_CTA);
if (env0_0 != null) {
env0_0();
}
}
function getBadConnectionCTAPropsOnPress_117884() { // fn#117884, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15607:2777, owner: getBadConnectionCTAProps.onPress, offset: 0x024c44f8, size: 83 bytes, params: 1, frame: 13
const value = environment.__proto__;
const DismissibleContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent;
const VOICE_PANEL_BAD_CONNECTION_CTA = DismissibleContent.VOICE_PANEL_BAD_CONNECTION_CTA;
(require(3968) /* metro dependency 3968: DismissibleContentUnsafeUtils */).UNSAFE_markDismissibleContentAsDismissed(VOICE_PANEL_BAD_CONNECTION_CTA);
if (env0_0 != null) {
env0_0();
}
}
function getDismissableCTAPropsOnPress() { // fn#117887, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15607:3740, owner: getDismissableCTAProps.onPress, offset: 0x024c46bf, size: 79 bytes, params: 1, frame: 12
var value;
const channelBinding = channel;
if (channelBinding != null) {
value = environment.__proto__;
value = require(15415) /* metro dependency 15415: SoundboardActionCreators */;
value.showSoundboardSoundPickerActionSheet({channel: channelBinding,
analyticsSource: 'SOUNDBOARD_MOBILE_FLOATING_CTA'});
function handleSoundboardMobileFloatingCtaClose() { // fn#117885, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15607:3008, offset: 0x024c454b, size: 62 bytes, params: 1, frame: 14
const UNSAFE_markDismissibleContentAsDismissed = DismissibleContentUnsafeUtilsModule.UNSAFE_markDismissibleContentAsDismissed;
const DismissibleContent = (Dismissible_contentModule).DismissibleContent;
const SOUNDBOARD_MOBILE_FLOATING_CTA = DismissibleContent.SOUNDBOARD_MOBILE_FLOATING_CTA;
Reflect.apply(UNSAFE_markDismissibleContentAsDismissed, DismissibleContentUnsafeUtilsModule, [SOUNDBOARD_MOBILE_FLOATING_CTA]);
}
value = environment.__proto__;
handleSoundboardMobileFloatingCtaClose();
}
function _fun117891() { // fn#117891, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15607:4531, offset: 0x024c485d, size: 38 bytes, params: 1, frame: 12
return getDismissableCTAProps({dismissableContent: env0_1, channel: channel});
}
function getDismissableCTAProps({dismissableContent, channel}) { // fn#117886, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15607:3420, offset: 0x024c4589, size: 310 bytes, params: 2, frame: 19
var object;
const t = (IndexNativeModule).t;
const DismissibleContent = (Dismissible_contentModule).DismissibleContent;
const VOICE_PANEL_BAD_CONNECTION_CTA = DismissibleContent.VOICE_PANEL_BAD_CONNECTION_CTA;
if (VOICE_PANEL_BAD_CONNECTION_CTA === dismissableContent) {
return getBadConnectionCTAProps();
}
const SOUNDBOARD_MOBILE_FLOATING_CTA = DismissibleContent.SOUNDBOARD_MOBILE_FLOATING_CTA;
if (SOUNDBOARD_MOBILE_FLOATING_CTA === dismissableContent) {
object = {};
object.icon = ((SoundboardIcon) => <SoundboardIcon color="interactive-icon-default" />)((require(10284) /* metro dependency 10284: SoundboardIcon */).SoundboardIcon);
object.onPress = onPress_117887;
object.label = (require(7212) /* metro dependency 7212: getDeviceSpecificString */).getDeviceSpecificString({quest: t.XLlWUe},
t.IJgkPX);
object.trailing = <CloseSoundboardMobileFloatingCtaIcon />;
return object;
}
DismissibleContent.DONUT_MOBILE_NUX;
return null;
function getDismissableCTAPropsOnPress() { // fn#117887, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15607:3740, owner: getDismissableCTAProps.onPress, offset: 0x024c46bf, size: 79 bytes, params: 1, frame: 12
var value;
const channelBinding = channel;
if (channelBinding != null) {
value = environment.__proto__;
value = require(15415) /* metro dependency 15415: SoundboardActionCreators */;
value.showSoundboardSoundPickerActionSheet({channel: channelBinding,
analyticsSource: 'SOUNDBOARD_MOBILE_FLOATING_CTA'});
}
value = environment.__proto__;
handleSoundboardMobileFloatingCtaClose();
}
function _fun117873() { // fn#117873, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15607:508, offset: 0x024c3d4f, size: 48 bytes, params: 1, frame: 12
var environment;
const binding = env0_0;
const value = environment.__proto__.__proto__;
const BAD_CONNECTION = env2_12.BAD_CONNECTION;
return binding !== BAD_CONNECTION ? null : getBadConnectionCTAProps(function() {
return setShowFloatingCTA(null);
});
}
function _fun117876() { // fn#117876, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15607:806, offset: 0x024c40db, size: 41 bytes, params: 1, frame: 11
const value = env0_0.find(function(a0) {
return !EventBannerStore.isEventDismissed(a0.id);
});
const value2 = null;
return value2 != value ? value : value2;
}
function _fun117878() { // fn#117878, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15607:1110, offset: 0x024c4125, size: 88 bytes, params: 1, frame: 15
var value2;
var moduleValue;
if (env0_1 != null) {
value2 = environment.__proto__.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
moduleValue = require(9052) /* metro dependency 9052: GuildScheduledEventModalActionCreators */;
moduleValue.openStartGuildEventModal(env0_1, env0_2);
}
}
function _fun117879() { // fn#117879, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15607:1218, offset: 0x024c417d, size: 62 bytes, params: 1, frame: 12
var value2;
var moduleValue;
if (env0_1 != null) {
value2 = environment.__proto__.__proto__;
moduleValue = require(15412) /* metro dependency 15412: GuildScheduledEventsNoticesActionCreators */;
moduleValue.dismissEventBanner(env0_1.id);
function CloseSoundboardMobileFloatingCtaIcon() { // fn#117888, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15607:3209, offset: 0x024c470e, size: 142 bytes, params: 1, frame: 19
const intl = (IndexNativeModule).intl;
const string = intl.string;
const cpT0Cq = (IndexNativeModule).t.cpT0Cq;
const handleSoundboardMobileFloatingCtaCloseBinding = handleSoundboardMobileFloatingCtaClose;
const XSmallIcon = (XSmallIconModule).XSmallIcon;
return (
<Pressable
accessibilityRole="button"
accessibilityLabel={Reflect.apply(string, intl, [cpT0Cq])}
onPress={handleSoundboardMobileFloatingCtaCloseBinding}
>
<XSmallIcon color="interactive-icon-default" />
</Pressable>
);
}
function useShouldShowFloatingCTA(a0) { // fn#117889, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15607:4355, offset: 0x024c479c, size: 193 bytes, params: 2, frame: 17
const env0_0 = a0;
const property = Module00057((UseGetDismissibleContentModule).useGetDismissibleContent((UseChannelFloatingCTAContent)(a0)),
1)[0];
const channel = (UseStateFromStoresModule).useStateFromStores([ChannelStore],
_fun117890);
return ReactModule.useMemo(_fun117891, [property, channel]) != null || useFloatingCTAProps(channel) != null;
function _fun117890() { // fn#117890, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15607:4496, offset: 0x02073def, size: 26 bytes, params: 1, frame: 11
return ChannelStore.getChannel(env0_0);
}
function _fun117891() { // fn#117891, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15607:4531, offset: 0x024c485d, size: 38 bytes, params: 1, frame: 12
return getDismissableCTAProps({dismissableContent: env0_1, channel: channel});
}
}
}
function _fun117881() { // fn#117881, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15607:1999, offset: 0x024c4333, size: 75 bytes, params: 1, frame: 12
return env0_0?.id != null && ChannelRTCStore.getParticipants(env0_0.id).length === 1;
}
global.__d(_fun117870, 15410, [57, 31, 27, 4606, 15411, 4117, 1379, 1385, 33, 4048, 11794, 15390, 9127, 632, 9077,
9039, 9035, 4080, 9052, 15412, 9219, 7975, 9133, 1244, 5312, 15413, 10859, 15414, 7014, 8621, 3968, 7684, 1365,
15415, 10284, 7212,
2]) /* metro module 15410, dependencies: [57, 31, 27, 4606, 15411, 4117, 1379, 1385, 33, 4048, 11794, 15390, 9127, 632, 9077, 9039, 9035, 4080, 9052, 15412, 9219, 7975, 9133, 1244, 5312, 15413, 10859, 15414, 7014, 8621, 3968, 7684, 1365, 15415, 10284, 7212, 2] */;
@@ -1,10 +1,15 @@
/* Metro module 11644; source: modules/voice_panel/native/controls/utils/createUseAnimatedScrollLock.tsx; dependencies: [31, 477, 4017, 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 PlatformUtilsModule from '../../../../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
import * as ReanimatedRexportModule from '../../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
function _fun89251(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#89251, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11830:6, offset: 0x020067d7, size: 240 bytes, params: 8, frame: 18
let env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
let env0_2 = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid();
let value = ReactModule;
let env0_2 = (PlatformUtilsModule).isAndroid();
value = value.createContext(function() {
return {};
});
@@ -13,7 +18,7 @@ function _fun89251(global, require, importDefault, importAll, module, exports, d
object = {code: 'function onMomentumEnd_createUseAnimatedScrollLockTsx3(event,context){const{IS_ANDROID,scrollLocked}=this.__closure;if(IS_ANDROID){var _context$momentumEndC;let count=(_context$momentumEndC=context===null||context===void 0?void 0:context.momentumEndCount)!==null&&_context$momentumEndC!==void 0?_context$momentumEndC:0;count+=1;if(count===3){scrollLocked.set(false);}else if(context!=null){context.momentumEndCount=count;}}else{scrollLocked.set(false);}}'};
object = {code: 'function onScroll_createUseAnimatedScrollLockTsx4(event){const{isDragScrolling,IS_ANDROID,scrollTo,scrollerRef,scrollOffsetValue,scrollLocked,onScrollHandler,runOnJS,onScrollHandlerWorkletized}=this.__closure;var _onScrollHandlerWorkl;const newScrollPosition=event.contentOffset.y;if(isDragScrolling.get()!==true){let scrollPosition=newScrollPosition;if(IS_ANDROID&&scrollPosition<0){scrollPosition=0;scrollTo(scrollerRef,0,0,false);}scrollOffsetValue.set(scrollPosition);}else{const isUp=newScrollPosition<scrollOffsetValue.get();if(scrollLocked.get()||isUp&&newScrollPosition<=0){if(!scrollLocked.get()){scrollLocked.set(true);}scrollTo(scrollerRef,0,0,false);scrollOffsetValue.set(0);}else{scrollOffsetValue.set(newScrollPosition);}}const{width:width,height:height}=event.layoutMeasurement;const{width:contentWidth,height:contentHeight}=event.contentSize;onScrollHandler!=null&&runOnJS(onScrollHandler)({width:width,height:height,offset:newScrollPosition,contentWidth:contentWidth,contentHeight:contentHeight});(_onScrollHandlerWorkl=onScrollHandlerWorkletized)===null||_onScrollHandlerWorkl===void 0||_onScrollHandlerWorkl({width:width,height:height,offset:newScrollPosition,contentWidth:contentWidth,contentHeight:contentHeight});}'};
object = {code: 'function createUseAnimatedScrollLockTsx5(){const{scrollLocked}=this.__closure;return{showsVerticalScrollIndicator:!scrollLocked.get()};}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/controls/utils/createUseAnimatedScrollLock.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/controls/utils/createUseAnimatedScrollLock.tsx');
exports.ControlsGestureScrollLock = value;
exports.createUseAnimatedScrollLock = function(a0, a1, a2, a3) {
var env0_0 = a0;
@@ -22,171 +27,170 @@ function _fun89251(global, require, importDefault, importAll, module, exports, d
var env0_3 = a3;
return _fun89254;
};
}
function createUseAnimatedScrollLock(a0, a1, a2, a3) { // fn#89253, offset: 0x020068c7, size: 39 bytes, params: 5, frame: 2
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const env0_3 = a3;
return _fun89254;
}
function _fun89254() { // fn#89254, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11830:2804, offset: 0x020068ee, size: 491 bytes, params: 1, frame: 28
var environment;
let value = a0;
const r0 = value !== undefined ? value : {};
const onScrollHandler = r0.onScrollHandler;
const env0_0 = onScrollHandler;
const onScrollHandlerWorkletized = r0.onScrollHandlerWorkletized;
value = environment.__proto__;
let value2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useAnimatedRef();
const object3 = {};
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedScrollHandler = reanimatedRexportModule.useAnimatedScrollHandler;
const object4 = {};
let closure = function(a0, a1) {
a1.momentumEndCount = 0;
importAll.set(true);
};
closure.__closure = {isDragScrolling: importAll};
closure.__workletHash = 16433590303176;
closure.__initData = env1_3;
object4.onBeginDrag = closure;
closure = function(a0) {
var r7;
importAll.set(false);
var Math = global.Math;
var abs = Math.abs;
var velocity = a0.velocity;
var value2 = undefined;
r7 = velocity == null ? value2 : velocity.y;
var value3 = 0;
if (value3 === Reflect.apply(abs, Math, [r7 ?? value3])) {
require.set(false);
}
return value2;
};
closure.__closure = {isDragScrolling: importAll, scrollLocked: require};
closure.__workletHash = 1594981610850;
closure.__initData = env1_4;
object4.onEndDrag = closure;
closure = onMomentumEnd;
const binding = env1_2;
closure.__closure = {IS_ANDROID: binding, scrollLocked: require};
closure.__workletHash = 17525906195822;
closure.__initData = env1_5;
object4.onMomentumEnd = closure;
closure = onScroll_89258;
const object5 = {isDragScrolling: importAll, IS_ANDROID: binding};
object5.scrollTo = reanimatedRexportModule.scrollTo;
object5.scrollerRef = value2;
object5.scrollOffsetValue = importDefault;
object5.scrollLocked = require;
object5.onScrollHandler = onScrollHandler;
object5.runOnJS = reanimatedRexportModule.runOnJS;
object5.onScrollHandlerWorkletized = onScrollHandlerWorkletized;
closure.__closure = object5;
closure.__workletHash = 13271628494164;
closure.__initData = env1_6;
object4.onScroll = closure;
object3.onScroll = Reflect.apply(useAnimatedScrollHandler, reanimatedRexportModule, [object4]);
const moduleValue3 = reanimatedRexportModule;
const useAnimatedProps = moduleValue3.useAnimatedProps;
closure = function() {
var object = {};
object.showsVerticalScrollIndicator = !require.get();
return object;
};
closure.__closure = {scrollLocked: require};
closure.__workletHash = 3670657775473;
closure.__initData = env1_7;
object3.animatedProps = Reflect.apply(useAnimatedProps, moduleValue3, [closure]);
object3.scrollerRef = value2;
object3.gestureRef = env0_0;
return object3;
}
function onMomentumEnd(a0, a1) { // fn#89257, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11830:3325, offset: 0x02006b5e, size: 112 bytes, params: 3, frame: 13
var momentumEndCount;
let value = environment.__proto__.__proto__;
if (env2_2) {
value = undefined;
momentumEndCount = a1 == null ? value : a1.momentumEndCount;
value = 0;
value = (momentumEndCount ?? value) + 1;
if (value === 3) {
function createUseAnimatedScrollLock(a0, a1, a2, a3) { // fn#89253, offset: 0x020068c7, size: 39 bytes, params: 5, frame: 2
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const env0_3 = a3;
return _fun89254;
function _fun89254() { // fn#89254, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11830:2804, offset: 0x020068ee, size: 491 bytes, params: 1, frame: 28
var environment;
let value = a0;
const r0 = value !== undefined ? value : {};
const onScrollHandler = r0.onScrollHandler;
const onScrollHandler2 = onScrollHandler;
const onScrollHandlerWorkletized = r0.onScrollHandlerWorkletized;
value = environment.__proto__;
require.set(false);
} else if (a1 != null) {
a1.momentumEndCount = value;
}
} else {
value = environment.__proto__;
require.set(false);
}
}
function onScroll_89258({contentOffset, layoutMeasurement, contentSize}) { // fn#89258, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11830:3572, offset: 0x02006bce, size: 447 bytes, params: 2, frame: 22
var r3;
var value3;
var value4;
var value6;
var moduleValue2;
var value9;
var value10;
var moduleValue3;
const y = contentOffset.y;
if (importAll.get() !== true) {
value6 = environment.__proto__.__proto__;
if (env2_2 && y < 0) {
moduleValue2 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value9 = 0;
moduleValue2.scrollTo(env0_2, value9, value9, false);
r3 = value9;
} else {
r3 = y;
}
importDefault.set(r3);
} else {
get = importDefault.get;
value3 = y < Reflect.apply(get, importDefault, []);
get = require.get;
if (Reflect.apply(get, require, [])) {
if (!require.get()) {
require.set(true);
}
value4 = environment.__proto__.__proto__;
(require(4017) /* metro dependency 4017: ReanimatedRexport */).scrollTo(env0_2, 0, 0, false);
importDefault.set(0);
} else if (value3) {
if (y <= 0) {
if (!require.get()) {
require.set(true);
let value2 = (ReanimatedRexportModule).useAnimatedRef();
let object = {};
const useAnimatedScrollHandler = ReanimatedRexportModule.useAnimatedScrollHandler;
const object2 = {};
let closure = function(a0, a1) {
a1.momentumEndCount = 0;
importAll.set(true);
};
closure.__closure = {isDragScrolling: importAll};
closure.__workletHash = 16433590303176;
closure.__initData = env1_3;
object2.onBeginDrag = closure;
closure = function(a0) {
var r7;
importAll.set(false);
var Math = global.Math;
var abs = Math.abs;
var velocity = a0.velocity;
var value2 = undefined;
r7 = velocity == null ? value2 : velocity.y;
var value3 = 0;
if (value3 === Reflect.apply(abs, Math, [r7 ?? value3])) {
require.set(false);
}
return value2;
};
closure.__closure = {isDragScrolling: importAll, scrollLocked: require};
closure.__workletHash = 1594981610850;
closure.__initData = env1_4;
object2.onEndDrag = closure;
closure = onMomentumEnd_89257;
const binding = env1_2;
closure.__closure = {IS_ANDROID: binding, scrollLocked: require};
closure.__workletHash = 17525906195822;
closure.__initData = env1_5;
object2.onMomentumEnd = closure;
closure = onScroll_89258;
const object6 = {isDragScrolling: importAll, IS_ANDROID: binding};
object6.scrollTo = ReanimatedRexportModule.scrollTo;
object6.scrollerRef = value2;
object6.scrollOffsetValue = importDefault;
object6.scrollLocked = require;
object6.onScrollHandler = onScrollHandler;
object6.runOnJS = ReanimatedRexportModule.runOnJS;
object6.onScrollHandlerWorkletized = onScrollHandlerWorkletized;
closure.__closure = object6;
closure.__workletHash = 13271628494164;
closure.__initData = env1_6;
object2.onScroll = closure;
object.onScroll = Reflect.apply(useAnimatedScrollHandler, ReanimatedRexportModule, [object2]);
const useAnimatedProps = ReanimatedRexportModule.useAnimatedProps;
closure = function() {
var object = {};
object.showsVerticalScrollIndicator = !require.get();
return object;
};
closure.__closure = {scrollLocked: require};
closure.__workletHash = 3670657775473;
closure.__initData = env1_7;
object.animatedProps = Reflect.apply(useAnimatedProps, ReanimatedRexportModule, [closure]);
object.scrollerRef = value2;
object.gestureRef = onScrollHandler2;
return object;
function onMomentumEnd_89257(a0, a1) { // fn#89257, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11830:3325, offset: 0x02006b5e, size: 112 bytes, params: 3, frame: 13
var momentumEndCount;
let value = environment.__proto__.__proto__;
if (env2_2) {
value = undefined;
momentumEndCount = a1 == null ? value : a1.momentumEndCount;
value = 0;
value = (momentumEndCount ?? value) + 1;
if (value === 3) {
value = environment.__proto__;
require.set(false);
} else if (a1 != null) {
a1.momentumEndCount = value;
}
} else {
value = environment.__proto__;
require.set(false);
}
value4 = environment.__proto__.__proto__;
(require(4017) /* metro dependency 4017: ReanimatedRexport */).scrollTo(env0_2, 0, 0, false);
importDefault.set(0);
} else {
importDefault.set(y);
}
} else {
importDefault.set(y);
function onScroll_89258({contentOffset, layoutMeasurement, contentSize}) { // fn#89258, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11830:3572, offset: 0x02006bce, size: 447 bytes, params: 2, frame: 22
var r3;
var value3;
var value4;
var value6;
var moduleValue2;
var value9;
var value10;
var moduleValue3;
const y = contentOffset.y;
if (importAll.get() !== true) {
value6 = environment.__proto__.__proto__;
if (env2_2 && y < 0) {
moduleValue2 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value9 = 0;
moduleValue2.scrollTo(env0_2, value9, value9, false);
r3 = value9;
} else {
r3 = y;
}
importDefault.set(r3);
} else {
get = importDefault.get;
value3 = y < Reflect.apply(get, importDefault, []);
get = require.get;
if (Reflect.apply(get, require, [])) {
if (!require.get()) {
require.set(true);
}
value4 = environment.__proto__.__proto__;
(require(4017) /* metro dependency 4017: ReanimatedRexport */).scrollTo(env0_2, 0, 0, false);
importDefault.set(0);
} else if (value3) {
if (y <= 0) {
if (!require.get()) {
require.set(true);
}
value4 = environment.__proto__.__proto__;
(require(4017) /* metro dependency 4017: ReanimatedRexport */).scrollTo(env0_2, 0, 0, false);
importDefault.set(0);
} else {
importDefault.set(y);
}
} else {
importDefault.set(y);
}
}
const width = layoutMeasurement.width;
const height = layoutMeasurement.height;
const width2 = contentSize.width;
const height2 = contentSize.height;
if (onScrollHandler != null) {
value10 = environment.__proto__.__proto__;
moduleValue3 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
moduleValue3.runOnJS(onScrollHandler)({width: width, height: height, offset: y, contentWidth: width2,
contentHeight: height2});
}
if (onScrollHandlerWorkletized != null) {
onScrollHandlerWorkletized({width: width, height: height, offset: y, contentWidth: width2,
contentHeight: height2});
}
}
}
}
const width = layoutMeasurement.width;
const height = layoutMeasurement.height;
const width2 = contentSize.width;
const height2 = contentSize.height;
if (onScrollHandler != null) {
value10 = environment.__proto__.__proto__;
moduleValue3 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
moduleValue3.runOnJS(onScrollHandler)({width: width, height: height, offset: y, contentWidth: width2,
contentHeight: height2});
}
if (onScrollHandlerWorkletized != null) {
onScrollHandlerWorkletized({width: width, height: height, offset: y, contentWidth: width2,
contentHeight: height2});
}
}
global.__d(_fun89251, 11644, [31, 477, 4017, 2]) /* metro module 11644, dependencies: [31, 477, 4017, 2] */;
@@ -1,4 +1,23 @@
/* Metro module 9241; source: modules/voice_panel/native/header/VoicePanelAudioOutputActionSheet.tsx; dependencies: [31, 27, 4295, 9232, 1379, 4296, 9240, 661, 33, 4501, 4080, 632, 9242, 9243, 1244, 7988, 7987, 6242, 9228, 9324, 9325, 9326, 3968, 1365, 9436, 6275, 6758, 6821, 2] */
import ChannelStore from '../../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import GameConsoleStore from '../../../game_console/GameConsoleStore.tsx'; /* Metro dependency 4295 */
import SessionsStore from '../../../../stores/SessionsStore.tsx'; /* Metro dependency 4296 */
import AudioManagerStoreAndroid from '../../../voice_calls/native/AudioManagerStore.android.tsx'; /* Metro dependency 9232 */
import UseGameConsoleAccounts from '../../../game_console/useGameConsoleAccounts.tsx'; /* Metro dependency 9324 */
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 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 UseStateFromStoresModule from '../../../../external/discord_common/js/packages/flux/useStateFromStores.tsx'; /* Metro dependency 632 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as Dismissible_contentModule from '../../../../external/discord_common/js/packages/protos/discord_protos/discord_users/v1/dismissible_content.tsx'; /* Metro dependency 1365 */
import * as DismissibleContentUnsafeUtilsModule from '../../../dismissible_content/DismissibleContentUnsafeUtils.tsx'; /* Metro dependency 3968 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TableRowIconNativeModule from '../../../../design/components/TableRow/native/TableRowIcon.native.tsx'; /* Metro dependency 6242 */
import * as TableRadioRowNativeModule from '../../../../design/components/TableRow/native/TableRadioRow.native.tsx'; /* Metro dependency 7987 */
import * as VoicePanelHeaderConstantsModule from './VoicePanelHeaderConstants.tsx'; /* Metro dependency 9240 */
function _fun72247(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#72247, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9426:6, offset: 0x01d3fbb9, size: 371 bytes, params: 8, frame: 20
const env0_0 = require;
const closeActionSheet_72248 = function() {
@@ -6,223 +25,240 @@ function _fun72247(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).ScrollView;
const gameConsoleStore = importDefault(4295) /* metro dependency 4295: GameConsoleStore */;
const audioManagerStoreAndroid = importDefault(9232) /* metro dependency 9232: AudioManagerStoreAndroid */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const sessionsStore = importDefault(4296) /* metro dependency 4296: SessionsStore */;
const env0_9 = (require(9240) /* metro dependency 9240: VoicePanelHeaderConstants */).VOICE_PANEL_AUDIO_OUTPUT_ACTION_SHEET_KEY;
const env0_10 = (require(661) /* metro dependency 661: Constants */).PlatformTypes;
const value2 = require(33) /* metro dependency 33 */;
const env0_11 = value2.jsx;
const env0_12 = value2.jsxs;
const env0_13 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({sectionContainer: {'marginTop': 0,
let value = ReactModule;
const env0_13 = (CreateStylesModule).createStyles({sectionContainer: {'marginTop': 0,
'marginBottom': 24}});
value = value.memo(VoicePanelAudioOutputActionSheet);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/header/VoicePanelAudioOutputActionSheet.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/header/VoicePanelAudioOutputActionSheet.tsx');
exports.default = value;
}
function VoicePanelAudioPhoneOutputSection() { // fn#72249, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9426:399, offset: 0x01d3fd56, size: 324 bytes, params: 1, frame: 23
var r0;
var VoicePanelFormSection;
var intl;
const styles = useStyles();
const {activeDevice,
availableDevices} = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStoresObject([AudioManagerStoreAndroid],
function() {
var object = {};
object.activeDevice = AudioManagerStoreAndroid.getActiveAudioDevice();
object.availableDevices = AudioManagerStoreAndroid.getAudioDevices();
return object;
});
const env0_1 = env0_3.useCallback(function(a0) {
require(dependencyMap[12]).setAudioOutputDevice(a0);
closeActionSheet_72248();
}, []);
if (availableDevices.length > 0) {
VoicePanelFormSection = (require(9243) /* metro dependency 9243: FormComponents */).VoicePanelFormSection;
var voicePanelFormSectionProps = {style: styles.sectionContainer};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
voicePanelFormSectionProps.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.CxyS15);
voicePanelFormSectionProps.hasIcons = true;
r0 = (
<VoicePanelFormSection {...voicePanelFormSectionProps}>
{((TableRadioGroup) => <TableRadioGroup defaultValue={activeDevice.deviceId} onChange={onChange_72252} hasIcons>{availableDevices.map(_fun72254)}</TableRadioGroup>)((require(7988) /* metro dependency 7988: TableRadioGroupNative */).TableRadioGroup)}
</VoicePanelFormSection>
);
} else {
r0 = null;
}
return r0;
function VoicePanelAudioPhoneOutputSectionOnChange(a0) { // fn#72252, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9426:902, owner: VoicePanelAudioPhoneOutputSection.onChange, offset: 0x01d3fef8, size: 55 bytes, params: 2, frame: 12
const env0_0 = a0;
const value2 = availableDevices.find(_fun72253);
if (value2 != null) {
env0_1(value2);
}
function _fun72253({deviceId}) { // fn#72253, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9426:920, offset: 0x01d3ff2f, size: 22 bytes, params: 2, frame: 2
return deviceId === env0_0;
}
}
function _fun72254(a0) { // fn#72254, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9426:983, offset: 0x01d3ff45, size: 199 bytes, params: 2, frame: 23
const value = environment.__proto__;
const value2 = undefined;
const TableRadioRow = (TableRadioRowNativeModule).TableRadioRow;
const tableRadioRowProps = {value: a0.deviceId};
const TableRowIcon = (TableRowIconNativeModule).TableRowIcon;
tableRadioRowProps.icon = (
<TableRowIcon
source={(require(9228) /* metro dependency 9228: CallsUtils */).audioDeviceToIconMap[a0.simpleDeviceType]}
/>
);
tableRadioRowProps.label = (require(9228) /* metro dependency 9228: CallsUtils */).getAudioDeviceToDisplayText(a0);
let deviceName = a0.deviceName;
deviceName = (deviceName == null ? value2 : deviceName.length) > 0 ? a0.deviceName : value2;
tableRadioRowProps.subLabel = deviceName;
return <TableRadioRow {...tableRadioRowProps} key={a0.deviceId} />;
}
function VoicePanelAudioPhoneOutputSection() { // fn#72249, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9426:399, offset: 0x01d3fd56, size: 324 bytes, params: 1, frame: 23
var r0;
var VoicePanelFormSection;
var intl;
const styles = useStyles();
const {activeDevice,
availableDevices} = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStoresObject([AudioManagerStoreAndroid],
function() {
var object = {};
object.activeDevice = AudioManagerStoreAndroid.getActiveAudioDevice();
object.availableDevices = AudioManagerStoreAndroid.getAudioDevices();
return object;
});
const env0_1 = env0_3.useCallback(function(a0) {
require(dependencyMap[12]).setAudioOutputDevice(a0);
closeActionSheet_72248();
}, []);
if (availableDevices.length > 0) {
VoicePanelFormSection = (require(9243) /* metro dependency 9243: FormComponents */).VoicePanelFormSection;
var voicePanelFormSectionProps = {style: styles.sectionContainer};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
voicePanelFormSectionProps.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.CxyS15);
voicePanelFormSectionProps.hasIcons = true;
r0 = <VoicePanelFormSection {...voicePanelFormSectionProps}>{((TableRadioGroup) => <TableRadioGroup defaultValue={activeDevice.deviceId} onChange={onChange_72252} hasIcons>{availableDevices.map(_fun72254)}</TableRadioGroup>)((require(7988) /* metro dependency 7988: TableRadioGroupNative */).TableRadioGroup)}</VoicePanelFormSection>;
} else {
r0 = null;
}
return r0;
}
function VoicePanelAudioConsoleSection({channel}) { // fn#72255, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9426:1275, offset: 0x01d4000c, size: 540 bytes, params: 2, frame: 25
var r0;
var VoicePanelFormSection;
var intl;
var TableRadioGroup;
var object3;
var value;
const styles = useStyles();
const value2 = (importDefault(9324) /* metro dependency 9324: useGameConsoleAccounts */)();
const env0_2 = (importDefault(9325) /* metro dependency 9325: useVoiceStateForRemoteSession */)();
const useStateFromStoresModule = require(632) /* metro dependency 632: useStateFromStores */;
const useStateFromStores = useStateFromStoresModule.useStateFromStores;
let object = [GameConsoleStore];
const awaitingRemoteSessionInfo = Reflect.apply(useStateFromStores, useStateFromStoresModule, [object, function() {
return GameConsoleStore.getAwaitingRemoteSessionInfo();
}]);
const env0_3 = awaitingRemoteSessionInfo;
const value3 = env0_3.useMemo(_fun72258, [awaitingRemoteSessionInfo,
useStateFromStoresModule.useStateFromStores([SessionsStore], _fun72257)]);
const value4 = env0_3.useCallback(_fun72259, [value2, channel]);
const dismissibleContentUnsafeUtilsModule = require(3968) /* metro dependency 3968: DismissibleContentUnsafeUtils */;
const UNSAFE_useIsDismissibleContentDismissed = dismissibleContentUnsafeUtilsModule.UNSAFE_useIsDismissibleContentDismissed;
const DismissibleContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent;
const DONUT_MOBILE_NUX = DismissibleContent.DONUT_MOBILE_NUX;
env0_3.useEffect(_fun72261, [value2, !Reflect.apply(UNSAFE_useIsDismissibleContentDismissed,
dismissibleContentUnsafeUtilsModule, [DONUT_MOBILE_NUX])]);
if (value2.length > 0) {
VoicePanelFormSection = (require(9243) /* metro dependency 9243: FormComponents */).VoicePanelFormSection;
object = {};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.q22XnQ);
object.style = styles.sectionContainer;
object.hasIcons = true;
TableRadioGroup = (require(7988) /* metro dependency 7988: TableRadioGroupNative */).TableRadioGroup;
object3 = {defaultValue: value3, onChange: value4, hasIcons: true};
value = value2.map(_fun72262);
value = <VoicePanelFormSection {...object}><TableRadioGroup {...object3}>{value.filter(function(a0) {
return (0, global.Boolean)(a0);
})}</TableRadioGroup></VoicePanelFormSection>;
r0 = value;
} else {
r0 = null;
function VoicePanelAudioConsoleSection({channel}) { // fn#72255, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9426:1275, offset: 0x01d4000c, size: 540 bytes, params: 2, frame: 25
var r0;
var VoicePanelFormSection;
var intl;
var TableRadioGroup;
var object2;
var value;
const styles = useStyles();
const value2 = (UseGameConsoleAccounts)();
const env0_2 = (UseVoiceStateForRemoteSession)();
const useStateFromStores = UseStateFromStoresModule.useStateFromStores;
let object = [GameConsoleStore];
const awaitingRemoteSessionInfo = Reflect.apply(useStateFromStores, UseStateFromStoresModule, [object, function() {
return GameConsoleStore.getAwaitingRemoteSessionInfo();
}]);
const awaitingRemoteSessionInfo2 = awaitingRemoteSessionInfo;
const value3 = awaitingRemoteSessionInfo2.useMemo(_fun72258, [awaitingRemoteSessionInfo,
UseStateFromStoresModule.useStateFromStores([SessionsStore], _fun72257)]);
const value4 = awaitingRemoteSessionInfo2.useCallback(_fun72259, [value2, channel]);
const UNSAFE_useIsDismissibleContentDismissed = DismissibleContentUnsafeUtilsModule.UNSAFE_useIsDismissibleContentDismissed;
const DismissibleContent = (Dismissible_contentModule).DismissibleContent;
const DONUT_MOBILE_NUX = DismissibleContent.DONUT_MOBILE_NUX;
awaitingRemoteSessionInfo2.useEffect(_fun72261, [value2, !Reflect.apply(UNSAFE_useIsDismissibleContentDismissed,
DismissibleContentUnsafeUtilsModule, [DONUT_MOBILE_NUX])]);
if (value2.length > 0) {
VoicePanelFormSection = (require(9243) /* metro dependency 9243: FormComponents */).VoicePanelFormSection;
object = {};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.q22XnQ);
object.style = styles.sectionContainer;
object.hasIcons = true;
TableRadioGroup = (require(7988) /* metro dependency 7988: TableRadioGroupNative */).TableRadioGroup;
object2 = {defaultValue: value3, onChange: value4, hasIcons: true};
value = value2.map(_fun72262);
value = (
<VoicePanelFormSection {...object}>
<TableRadioGroup {...object2}>
{value.filter(function(a0) {
return (0, global.Boolean)(a0);
})}
</TableRadioGroup>
</VoicePanelFormSection>
);
r0 = value;
} else {
r0 = null;
}
return r0;
function _fun72257() { // fn#72257, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9426:1472, offset: 0x01d4023b, size: 62 bytes, params: 1, frame: 14
const value = environment.__proto__;
return SessionsStore.getSessionById(env0_2?.sessionId ?? '');
}
function _fun72258() { // fn#72258, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9426:1566, offset: 0x01d40279, size: 88 bytes, params: 1, frame: 6
const awaitingRemoteSessionInfoBinding = awaitingRemoteSessionInfo;
const value2 = undefined;
return (awaitingRemoteSessionInfoBinding == null ? value2 : awaitingRemoteSessionInfo.type) ?? (sessionById == null || sessionById.clientInfo == null ? value2 : sessionById.clientInfo.os) ?? '';
}
function _fun72259(a0) { // fn#72259, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9426:1707, offset: 0x01d402d1, size: 108 bytes, params: 2, frame: 15
var environment;
var value3;
var moduleValue;
const env0_0 = a0;
const value2 = env0_1.find(_fun72260);
if (value2 != null) {
value3 = environment.__proto__;
moduleValue = require(9326) /* metro dependency 9326: useOnConnectToConsole */;
moduleValue.onConnectToConsole(channel, value2);
closeActionSheet_72248();
} else {
value = environment.__proto__;
closeActionSheet_72248();
}
function _fun72260({type}) { // fn#72260, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9426:1725, offset: 0x0108b18c, size: 21 bytes, params: 2, frame: 2
return type === env0_0;
}
}
function _fun72261() { // fn#72261, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9426:1949, offset: 0x01d4033d, size: 92 bytes, params: 1, frame: 14
var value;
if (result && env0_1.length > 0) {
value = environment.__proto__;
value = require(3968) /* metro dependency 3968: DismissibleContentUnsafeUtils */;
value.UNSAFE_markDismissibleContentAsDismissed((require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent.DONUT_MOBILE_NUX);
}
}
function _fun72262(a0) { // fn#72262, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9426:2293, offset: 0x01d40399, size: 345 bytes, params: 2, frame: 23
var r6;
var r0;
var object;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var TableRadioRow;
var TableRowIcon;
let type = a0.type;
let value = environment.__proto__;
const XBOX = PlatformTypes.XBOX;
if (XBOX === type) {
object = {};
object.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.Nfvo72);
object.variant = 'xbox';
r6 = object;
} else if (PlatformTypes.PLAYSTATION !== type) {
r6 = null;
} else {
object = {};
object.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.fFl4jo);
object.variant = 'playstation';
r6 = object;
}
const value3 = r6 != null;
if (value3) {
TableRadioRow = (require(7987) /* metro dependency 7987: TableRadioRowNative */).TableRadioRow;
object = {};
TableRowIcon = (require(6242) /* metro dependency 6242: TableRowIconNative */).TableRowIcon;
value = importDefault(9436) /* metro dependency 9436: getConsoleIcon */;
type = a0.type;
object.icon = <TableRowIcon source={value(type)} variant={r6.variant} />;
object.label = r6.label;
type = a0.type;
object.value = type;
type = a0.type;
value = <TableRadioRow {...object} key={type} />;
r0 = value;
} else {
r0 = value3;
}
return r0;
}
}
return r0;
}
function VoicePanelAudioOutputActionSheet({channelId, isConnectedToVoiceChannel}) { // fn#72264, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9426:2748, offset: 0x01d40506, size: 321 bytes, params: 2, frame: 26
var r0;
var BottomSheet;
var BottomSheetTitleHeader;
var intl;
const channel = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([ChannelStore],
function() {
return ChannelStore.getChannel(channelId);
});
if (channel == null) {
r0 = null;
} else {
BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r0 = <BottomSheet header={<BottomSheetTitleHeader title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.iwxPM3)} />}><ScrollView>{((Component) => <Component>{isConnectedToVoiceChannel && <VoicePanelAudioPhoneOutputSection />}<VoicePanelAudioConsoleSection channel={channel} /></Component>)(importDefault(6821) /* metro dependency 6821: NativeView */)}</ScrollView></BottomSheet>;
function VoicePanelAudioOutputActionSheet({channelId, isConnectedToVoiceChannel}) { // fn#72264, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9426:2748, offset: 0x01d40506, size: 321 bytes, params: 2, frame: 26
var r0;
var BottomSheet;
var BottomSheetTitleHeader;
var intl;
const channel = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([ChannelStore],
function() {
return ChannelStore.getChannel(channelId);
});
if (channel == null) {
r0 = null;
} else {
BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r0 = (
<BottomSheet
header={<BottomSheetTitleHeader title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.iwxPM3)} />}
>
<ScrollView>
{((Component) => <Component>{isConnectedToVoiceChannel && <VoicePanelAudioPhoneOutputSection />}<VoicePanelAudioConsoleSection channel={channel} /></Component>)(importDefault(6821) /* metro dependency 6821: NativeView */)}
</ScrollView>
</BottomSheet>
);
}
return r0;
}
return r0;
}
function VoicePanelAudioPhoneOutputSectionOnChange(a0) { // fn#72252, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9426:902, owner: VoicePanelAudioPhoneOutputSection.onChange, offset: 0x01d3fef8, size: 55 bytes, params: 2, frame: 12
const env0_0 = a0;
const value2 = availableDevices.find(_fun72253);
if (value2 != null) {
env0_1(value2);
}
}
function _fun72254(a0) { // fn#72254, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9426:983, offset: 0x01d3ff45, size: 199 bytes, params: 2, frame: 23
const value = environment.__proto__;
const value2 = undefined;
const TableRadioRow = (require(7987) /* metro dependency 7987: TableRadioRowNative */).TableRadioRow;
const tableRadioRowProps = {value: a0.deviceId};
const TableRowIcon = (require(6242) /* metro dependency 6242: TableRowIconNative */).TableRowIcon;
tableRadioRowProps.icon = <TableRowIcon source={(require(9228) /* metro dependency 9228: CallsUtils */).audioDeviceToIconMap[a0.simpleDeviceType]} />;
tableRadioRowProps.label = (require(9228) /* metro dependency 9228: CallsUtils */).getAudioDeviceToDisplayText(a0);
let deviceName = a0.deviceName;
deviceName = (deviceName == null ? value2 : deviceName.length) > 0 ? a0.deviceName : value2;
tableRadioRowProps.subLabel = deviceName;
return <TableRadioRow {...tableRadioRowProps} key={a0.deviceId} />;
}
function _fun72257() { // fn#72257, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9426:1472, offset: 0x01d4023b, size: 62 bytes, params: 1, frame: 14
const value = environment.__proto__;
return SessionsStore.getSessionById(env0_2?.sessionId ?? '');
}
function _fun72258() { // fn#72258, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9426:1566, offset: 0x01d40279, size: 88 bytes, params: 1, frame: 6
const awaitingRemoteSessionInfoBinding = awaitingRemoteSessionInfo;
const value2 = undefined;
return (awaitingRemoteSessionInfoBinding == null ? value2 : awaitingRemoteSessionInfo.type) ?? (sessionById == null || sessionById.clientInfo == null ? value2 : sessionById.clientInfo.os) ?? '';
}
function _fun72259(a0) { // fn#72259, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9426:1707, offset: 0x01d402d1, size: 108 bytes, params: 2, frame: 15
var environment;
var value3;
var moduleValue;
const env0_0 = a0;
const value2 = env0_1.find(_fun72260);
if (value2 != null) {
value3 = environment.__proto__;
moduleValue = require(9326) /* metro dependency 9326: useOnConnectToConsole */;
moduleValue.onConnectToConsole(channel, value2);
closeActionSheet_72248();
} else {
value = environment.__proto__;
closeActionSheet_72248();
}
}
function _fun72261() { // fn#72261, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9426:1949, offset: 0x01d4033d, size: 92 bytes, params: 1, frame: 14
var value;
if (result && env0_1.length > 0) {
value = environment.__proto__;
value = require(3968) /* metro dependency 3968: DismissibleContentUnsafeUtils */;
value.UNSAFE_markDismissibleContentAsDismissed((require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent.DONUT_MOBILE_NUX);
}
}
function _fun72262(a0) { // fn#72262, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9426:2293, offset: 0x01d40399, size: 345 bytes, params: 2, frame: 23
var r6;
var r0;
var object2;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var TableRadioRow;
var TableRowIcon;
let type = a0.type;
let value = environment.__proto__;
const XBOX = PlatformTypes.XBOX;
if (XBOX === type) {
object2 = {};
object2.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.Nfvo72);
object2.variant = 'xbox';
r6 = object2;
} else if (PlatformTypes.PLAYSTATION !== type) {
r6 = null;
} else {
object2 = {};
object2.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.fFl4jo);
object2.variant = 'playstation';
r6 = object2;
}
const value3 = r6 != null;
if (value3) {
TableRadioRow = (require(7987) /* metro dependency 7987: TableRadioRowNative */).TableRadioRow;
object2 = {};
TableRowIcon = (require(6242) /* metro dependency 6242: TableRowIconNative */).TableRowIcon;
value = importDefault(9436) /* metro dependency 9436: getConsoleIcon */;
type = a0.type;
object2.icon = <TableRowIcon source={value(type)} variant={r6.variant} />;
object2.label = r6.label;
type = a0.type;
object2.value = type;
type = a0.type;
value = <TableRadioRow {...object2} key={type} />;
r0 = value;
} else {
r0 = value3;
}
return r0;
}
function _fun72253({deviceId}) { // fn#72253, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9426:920, offset: 0x01d3ff2f, size: 22 bytes, params: 2, frame: 2
return deviceId === env0_0;
}
global.__d(_fun72247, 9241, [31, 27, 4295, 9232, 1379, 4296, 9240, 661, 33, 4501, 4080, 632, 9242, 9243, 1244, 7988,
7987, 6242, 9228, 9324, 9325, 9326, 3968, 1365, 9436, 6275, 6758, 6821,
2]) /* metro module 9241, dependencies: [31, 27, 4295, 9232, 1379, 4296, 9240, 661, 33, 4501, 4080, 632, 9242, 9243, 1244, 7988, 7987, 6242, 9228, 9324, 9325, 9326, 3968, 1365, 9436, 6275, 6758, 6821, 2] */;
@@ -1,95 +1,101 @@
/* Metro module 15477; source: modules/voice_panel/native/header/VoicePanelConsoleFacepile.tsx; dependencies: [31, 661, 33, 4501, 697, 9436, 1244, 9324, 1360, 6821, 1305, 2] */
import NativeView from '../../../core/native/NativeView.tsx'; /* Metro dependency 6821 */
import UseGameConsoleAccounts from '../../../game_console/useGameConsoleAccounts.tsx'; /* Metro dependency 9324 */
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 IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as NativeModule from '../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as GlobalUtilsModule from '../../../../utils/GlobalUtils.tsx'; /* Metro dependency 1360 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
function _fun118461(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118461, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15674:6, offset: 0x024dc278, size: 313 bytes, params: 8, frame: 23
var object3;
const env0_0 = require;
const closure = getConsoleInfo;
const getConsoleInfo2 = getConsoleInfo;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(661) /* metro dependency 661: Constants */).PlatformTypes;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object3 = {};
const object4 = {'borderRadius': null, 'padding': 8, 'margin': -3, 'borderWidth': 3};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
const createStyles = CreateStylesModule.createStyles;
object = {};
const object2 = {'borderRadius': null, 'padding': 8, 'margin': -3, 'borderWidth': 3};
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object4.borderColor = BACKGROUND_BASE_LOW;
object3.consoleIconContainer = object4;
object2.borderColor = BACKGROUND_BASE_LOW;
object.consoleIconContainer = object2;
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
object3.consoleIcon = {tintColor: WHITE};
const env0_6 = Reflect.apply(createStyles, createStylesModule, [object3]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/header/VoicePanelConsoleFacepile.tsx');
object.consoleIcon = {tintColor: WHITE};
const env0_6 = Reflect.apply(createStyles, CreateStylesModule, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/header/VoicePanelConsoleFacepile.tsx');
exports.default = VoicePanelConsoleFacepile;
exports.getConsoleInfo = closure;
}
function getConsoleInfo(a0) { // fn#118462, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15674:352, offset: 0x024dc3b1, size: 398 bytes, params: 2, frame: 18
var object2;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const type = a0.type;
const XBOX = PlatformTypes.XBOX;
if (XBOX === type) {
object2 = {};
object2.icon = (importDefault(9436) /* metro dependency 9436: getConsoleIcon */)(a0.type);
object2.color = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PLATFORM_XBOX;
object2.connectLabel = intl.string(t.QN7HXV);
object2.connectSublabel = intl.string(t['M/Ld86']);
return object2;
exports.getConsoleInfo = getConsoleInfo2;
function getConsoleInfo(a0) { // fn#118462, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15674:352, offset: 0x024dc3b1, size: 398 bytes, params: 2, frame: 18
var object;
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
const type = a0.type;
const XBOX = PlatformTypes.XBOX;
if (XBOX === type) {
object = {};
object.icon = (importDefault(9436) /* metro dependency 9436: getConsoleIcon */)(a0.type);
object.color = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PLATFORM_XBOX;
object.connectLabel = intl.string(t.QN7HXV);
object.connectSublabel = intl.string(t['M/Ld86']);
return object;
}
const PLAYSTATION = PlatformTypes.PLAYSTATION;
if (PLAYSTATION === type) {
object = {};
object.icon = (importDefault(9436) /* metro dependency 9436: getConsoleIcon */)(a0.type);
object.color = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PLATFORM_PLAYSTATION;
object.connectLabel = intl.string(t['3qLlTS']);
object.connectSublabel = intl.string(t['/uR9x1']);
return object;
}
return null;
}
const PLAYSTATION = PlatformTypes.PLAYSTATION;
if (PLAYSTATION === type) {
object2 = {};
object2.icon = (importDefault(9436) /* metro dependency 9436: getConsoleIcon */)(a0.type);
object2.color = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PLATFORM_PLAYSTATION;
object2.connectLabel = intl.string(t['3qLlTS']);
object2.connectSublabel = intl.string(t['/uR9x1']);
return object2;
}
return null;
}
function VoicePanelConsoleFacepile() { // fn#118463, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15674:928, offset: 0x024dc53f, size: 160 bytes, params: 1, frame: 18
const styles = useStyles();
const value2 = (importDefault(9324) /* metro dependency 9324: useGameConsoleAccounts */)();
const binding = env0_3;
const value3 = binding.useMemo(_fun118464, [value2]);
const value4 = binding.useCallback(_fun118465, [styles]);
const SummarizedIconRow = (require(1305) /* metro dependency 1305: native */).SummarizedIconRow;
return (
<SummarizedIconRow
items={value3}
renderItem={value4}
offsetAmount={-3}
/>
);
}
function _fun118464() { // fn#118464, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15674:1000, offset: 0x024dc5df, size: 64 bytes, params: 1, frame: 13
const binding = env0_1;
const value2 = binding.map(getConsoleInfo);
return value2.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish);
}
function _fun118465(a0) { // fn#118465, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15674:1078, offset: 0x024dc61f, size: 164 bytes, params: 2, frame: 20
const NativeView = importDefault(6821) /* metro dependency 6821: NativeView */;
const stylesBinding = styles;
const items2 = [stylesBinding.consoleIconContainer];
items2[1] = {backgroundColor: a0.color};
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
const consoleIcon = stylesBinding.consoleIcon;
const Icon2 = (require(1305) /* metro dependency 1305: native */).Icon;
const Sizes = Icon2.Sizes;
const MEDIUM = Sizes.MEDIUM;
return (
<NativeView style={items2}>
<Icon
style={consoleIcon}
size={MEDIUM}
source={a0.icon}
function VoicePanelConsoleFacepile() { // fn#118463, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15674:928, offset: 0x024dc53f, size: 160 bytes, params: 1, frame: 18
const styles = useStyles();
const value2 = (UseGameConsoleAccounts)();
const value3 = ReactModule.useMemo(_fun118464, [value2]);
const value4 = ReactModule.useCallback(_fun118465, [styles]);
const SummarizedIconRow = (NativeModule).SummarizedIconRow;
return (
<SummarizedIconRow
items={value3}
renderItem={value4}
offsetAmount={-3}
/>
</NativeView>
);
);
function _fun118464() { // fn#118464, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15674:1000, offset: 0x024dc5df, size: 64 bytes, params: 1, frame: 13
const binding = env0_1;
const value2 = binding.map(getConsoleInfo);
return value2.filter((GlobalUtilsModule).isNotNullish);
}
function _fun118465(a0) { // fn#118465, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15674:1078, offset: 0x024dc61f, size: 164 bytes, params: 2, frame: 20
const stylesBinding = styles;
const items2 = [stylesBinding.consoleIconContainer];
items2[1] = {backgroundColor: a0.color};
const Icon = (NativeModule).Icon;
const consoleIcon = stylesBinding.consoleIcon;
const Icon2 = (NativeModule).Icon;
const Sizes = Icon2.Sizes;
const MEDIUM = Sizes.MEDIUM;
return (
<NativeView style={items2}>
<Icon
style={consoleIcon}
size={MEDIUM}
source={a0.icon}
/>
</NativeView>
);
}
}
}
global.__d(_fun118461, 15477, [31, 661, 33, 4501, 697, 9436, 1244, 9324, 1360, 6821, 1305,
2]) /* metro module 15477, dependencies: [31, 661, 33, 4501, 697, 9436, 1244, 9324, 1360, 6821, 1305, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,64 +1,71 @@
/* Metro module 15481; source: modules/voice_panel/native/header/VoicePanelHeaderChatButton.tsx; dependencies: [31, 661, 33, 4501, 697, 1239, 15482, 6821, 15388, 6682, 1244, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import VoicePanelIconButton from '../shared/VoicePanelIconButton.tsx'; /* Metro dependency 15388 */
import UseChatBadge from '../hooks/useChatBadge.tsx'; /* Metro dependency 15482 */
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 ChatIconModule from '../../../../design/components/Icon/native/redesign/generated/ChatIcon.tsx'; /* Metro dependency 6682 */
function _fun118471(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118471, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15678:6, offset: 0x024dc8f6, size: 327 bytes, params: 8, frame: 22
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(661) /* metro dependency 661: Constants */).ComponentActions;
let value = require(33) /* metro dependency 33 */;
let value = JsxRuntimeModule;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object3 = {badgeContainer: {'position': 'absolute', 'top': -2, 'right': -2}};
const object4 = {'width': 8, 'height': 8};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object3.badge = object4;
object = {badgeContainer: {'position': 'absolute', 'top': -2, 'right': -2}};
const object2 = {'width': 8, 'height': 8};
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object.badge = object2;
const RED_400 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.RED_400;
object3.redBG = {backgroundColor: RED_400};
object.redBG = {backgroundColor: RED_400};
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
object3.whiteBG = {backgroundColor: WHITE};
const env0_7 = Reflect.apply(createStyles, value, [object3]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/header/VoicePanelHeaderChatButton.tsx');
object.whiteBG = {backgroundColor: WHITE};
const env0_7 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/header/VoicePanelHeaderChatButton.tsx');
exports.default = VoicePanelHeaderChatButton;
}
function VoicePanelHeaderChatButton({channelId}) { // fn#118472, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15678:510, offset: 0x024dca3d, size: 385 bytes, params: 2, frame: 28
var r5;
var value;
const styles = useStyles();
const value2 = env0_3.useCallback(function() {
var ComponentDispatch = require(dependencyMap[5]).ComponentDispatch;
ComponentDispatch.dispatch(ComponentActions.VOICE_PANEL_OPEN_CHAT_TAB);
}, []);
const value3 = (importDefault(15482) /* metro dependency 15482: useChatBadge */)(channelId);
const r12 = value3 === 'mention' ? styles.redBG : styles.whiteBG;
const NativeView = importDefault(6821) /* metro dependency 6821: NativeView */;
const VoicePanelIconButton = importDefault(15388) /* metro dependency 15388: VoicePanelIconButton */;
const object = {};
const ChatIcon = (require(6682) /* metro dependency 6682: ChatIcon */).ChatIcon;
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
object.icon = <ChatIcon color={WHITE} size="sm" />;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5KxXrK']);
object.onPress = value2;
const voicePanelIconButton = <VoicePanelIconButton {...object} />;
const value5 = value3 != null;
if (value5) {
value = NativeView;
value = ((Component) => <Component style={styles.badgeContainer}>{((Component) => <Component style={[styles.badge,
r12]} />)(importDefault(6821) /* metro dependency 6821: NativeView */)}</Component>)(value);
r5 = value;
} else {
r5 = value5;
function VoicePanelHeaderChatButton({channelId}) { // fn#118472, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15678:510, offset: 0x024dca3d, size: 385 bytes, params: 2, frame: 28
var r5;
var value;
const styles = useStyles();
const value2 = ReactModule.useCallback(function() {
var ComponentDispatch = require(dependencyMap[5]).ComponentDispatch;
ComponentDispatch.dispatch(ComponentActions.VOICE_PANEL_OPEN_CHAT_TAB);
}, []);
const value3 = (UseChatBadge)(channelId);
const r12 = value3 === 'mention' ? styles.redBG : styles.whiteBG;
const NativeView = importDefault(6821) /* metro dependency 6821: NativeView */;
const object2 = {};
const ChatIcon = (ChatIconModule).ChatIcon;
const WHITE = (Native).colors.WHITE;
object2.icon = <ChatIcon color={WHITE} size="sm" />;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5KxXrK']);
object2.onPress = value2;
const voicePanelIconButton = <VoicePanelIconButton {...object2} />;
const value5 = value3 != null;
if (value5) {
value = NativeView;
value = ((Component) => <Component style={styles.badgeContainer}>{((Component) => <Component style={[styles.badge,
r12]} />)(importDefault(6821) /* metro dependency 6821: NativeView */)}</Component>)(value);
r5 = value;
} else {
r5 = value5;
}
return (
<NativeView>
{voicePanelIconButton}
{r5}
</NativeView>
);
}
return (
<NativeView>
{voicePanelIconButton}
{r5}
</NativeView>
);
}
global.__d(_fun118471, 15481, [31, 661, 33, 4501, 697, 1239, 15482, 6821, 15388, 6682, 1244,
2]) /* metro module 15481, dependencies: [31, 661, 33, 4501, 697, 1239, 15482, 6821, 15388, 6682, 1244, 2] */;
@@ -1,9 +1,12 @@
/* Metro module 9240; source: modules/voice_panel/native/header/VoicePanelHeaderConstants.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun72246(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#72246, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9425:6, offset: 0x01d3fb57, size: 98 bytes, params: 8, frame: 15
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/header/VoicePanelHeaderConstants.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/header/VoicePanelHeaderConstants.tsx');
exports.VOICE_PANEL_SETTINGS_KEY = 'voice-panel-settings-action-sheet';
exports.VOICE_PANEL_AUDIO_OUTPUT_ACTION_SHEET_KEY = 'VoicePanelAudioOutputActionSheet';
}
global.__d(_fun72246, 9240, [2]) /* metro module 9240, dependencies: [2] */;
@@ -1,4 +1,30 @@
/* Metro module 15470; source: modules/voice_panel/native/header/VoicePanelHeaderSpeaker.tsx; dependencies: [29, 31, 27, 15471, 4295, 15472, 9229, 1379, 4296, 661, 33, 15474, 15447, 9228, 9438, 9325, 632, 9436, 9324, 15478, 477, 9239, 9230, 1244, 9236, 9238, 15479, 9326, 3968, 1365, 6821, 15388, 12764, 2] */
import ObjectWithoutProperties from '../../../../by-id/module-00029-ObjectWithoutProperties.js'; /* Metro dependency 29 */
import ChannelStore from '../../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import GameConsoleStore from '../../../game_console/GameConsoleStore.tsx'; /* Metro dependency 4295 */
import SessionsStore from '../../../../stores/SessionsStore.tsx'; /* Metro dependency 4296 */
import NativeView from '../../../core/native/NativeView.tsx'; /* Metro dependency 6821 */
import AudioRouteStoreNative from '../../../voice_calls/AudioRouteStore.native.tsx'; /* Metro dependency 9229 */
import UseGameConsoleAccounts from '../../../game_console/useGameConsoleAccounts.tsx'; /* Metro dependency 9324 */
import UseVoiceStateForRemoteSession from '../../../game_console/hooks/useVoiceStateForRemoteSession.tsx'; /* Metro dependency 9325 */
import UseIsVideoMode from '../../../video_calls/native/useIsVideoMode.tsx'; /* Metro dependency 9438 */
import VoicePanelIconButton from '../shared/VoicePanelIconButton.tsx'; /* Metro dependency 15388 */
import UseControlsLock from '../controls/useControlsLock.tsx'; /* Metro dependency 15447 */
import StageChannelAudioStore from '../../../stage_channels/native/StageChannelAudioStore.tsx'; /* Metro dependency 15472 */
import UseCanConnect from '../hooks/useCanConnect.tsx'; /* Metro dependency 15478 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as PlatformUtilsModule from '../../../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as Dismissible_contentModule from '../../../../external/discord_common/js/packages/protos/discord_protos/discord_users/v1/dismissible_content.tsx'; /* Metro dependency 1365 */
import * as DismissibleContentUnsafeUtilsModule from '../../../dismissible_content/DismissibleContentUnsafeUtils.tsx'; /* Metro dependency 3968 */
import * as CallsUtilsModule from '../../../voice_calls/native/CallsUtils.tsx'; /* Metro dependency 9228 */
import * as VoiceCallTypesModule from '../../../voice_calls/VoiceCallTypes.tsx'; /* Metro dependency 9230 */
import * as ConsoleVoiceUpsellStoreModule from '../../../game_console/ConsoleVoiceUpsellStore.tsx'; /* Metro dependency 15471 */
function _fun118397(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118397, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15667:6, offset: 0x024da3bc, size: 398 bytes, params: 8, frame: 19
const env0_0 = require;
const _arrayLikeToArray_118400 = function(a0, a1) {
@@ -47,17 +73,8 @@ function _fun118397(global, require, importDefault, importAll, module, exports,
const env0_3 = ['ref'];
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = importDefault(29) /* metro dependency 29 */;
let value = importAll(31) /* metro dependency 31 */;
const env0_6 = (require(27) /* metro dependency 27 */).NativeModules;
const env0_7 = (require(15471) /* metro dependency 15471: ConsoleVoiceUpsellStore */).setVoiceUpsellDismissed;
const gameConsoleStore = importDefault(4295) /* metro dependency 4295: GameConsoleStore */;
const stageChannelAudioStore = importDefault(15472) /* metro dependency 15472: StageChannelAudioStore */;
const audioRouteStoreNative = importDefault(9229) /* metro dependency 9229: AudioRouteStoreNative */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const sessionsStore = importDefault(4296) /* metro dependency 4296: SessionsStore */;
const env0_13 = (require(661) /* metro dependency 661: Constants */).PlatformTypes;
let value2 = require(33) /* metro dependency 33 */;
let value = ReactModule;
let value2 = JsxRuntimeModule;
const env0_14 = value2.jsx;
const env0_15 = value2.Fragment;
const env0_16 = value2.jsxs;
@@ -67,366 +84,390 @@ function _fun118397(global, require, importDefault, importAll, module, exports,
return null;
});
value = value.memo(VoicePanelHeaderSpeaker);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/header/VoicePanelHeaderSpeaker.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/header/VoicePanelHeaderSpeaker.tsx');
exports.default = value;
}
function _createForOfIteratorHelperLoose_118398(a0, a1) { // fn#118398, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15667:312, offset: 0x024da54a, 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_118398(a0, a1) { // fn#118398, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15667:312, offset: 0x024da54a, 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 _fun118399;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_118400(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 _fun118399;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_118400(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_118400(a0, value);
r6 = value;
} else {
r6 = value;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_118400(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
r5 = r6;
} else {
r5 = value;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun118399;
}
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 VoicePanelHeaderSpeaker({isConnectedToVoiceChannel, channelId, style}) { // fn#118402, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15667:1325, offset: 0x024da6f0, size: 822 bytes, params: 2, frame: 27
var moduleValue6;
const closure = children_118403;
const value2 = (importDefault(15447) /* metro dependency 15447: useControlsLock */)();
const value3 = (require(9228) /* metro dependency 9228: CallsUtils */).useMaskedSpeakerStates();
const toggleAudio = value3.toggleAudio;
const env0_5 = value3.routeSource;
const env0_6 = value3.isAudioRouteEnabled;
const value4 = (importDefault(9438) /* metro dependency 9438: useIsVideoMode */)();
const env0_8 = (importDefault(9325) /* metro dependency 9325: useVoiceStateForRemoteSession */)();
const awaitingRemoteSessionInfo = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([GameConsoleStore],
function() {
return GameConsoleStore.getAwaitingRemoteSessionInfo();
});
const env0_10 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([StageChannelAudioStore],
function() {
return StageChannelAudioStore.getQueueAudioSwap();
});
const sessionById = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([SessionsStore],
_fun118406);
let binding = env0_5;
const env0_12 = binding.useMemo(_fun118407, [awaitingRemoteSessionInfo, sessionById]);
const value5 = (importDefault(9324) /* metro dependency 9324: useGameConsoleAccounts */)();
const value6 = value5.length > 0;
const value7 = (importDefault(15478) /* metro dependency 15478: useCanConnect */)(channelId);
const r4 = value7.canConnect && !value7.isAtMaxCapacity && (isConnectedToVoiceChannel || value6);
binding = env0_5;
const env0_15 = binding.useCallback(_fun118408, [channelId, isConnectedToVoiceChannel, toggleAudio]);
if (r4) {
moduleValue6 = require(477) /* metro dependency 477: PlatformUtils */;
return moduleValue6.isAndroid() ? closure() : value6 ? <>{((Component) => <Component targetRef={binding.useRef(null)} canShowTooltip={isConnectedToVoiceChannel} />)(env0_18)}{((MenuPopout) => <MenuPopout menuItems={binding.useMemo(_fun118410,
[value5, channelId, isConnectedToVoiceChannel,
(require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([AudioRouteStoreNative],
function() {
return AudioRouteStoreNative.getCurrentRouteType();
}), value4])} position="bottom" align="end" onRequestOpen={binding.useCallback(_fun118417,
[value2])} onRequestClose={value2.unlock}>{closure}</MenuPopout>)((require(12764) /* metro dependency 12764: MenuPopout */).MenuPopout)}</> : closure();
}
return null;
}
function VoicePanelHeaderSpeakerChildren(a0) { // fn#118403, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15667:3561, owner: VoicePanelHeaderSpeaker.children, offset: 0x024daa26, size: 373 bytes, params: 2, frame: 25
const r2 = a0 ?? ({onPress: env0_15, ref: undefined});
const ref = r2.ref;
value = environment.__proto__;
const binding = env1_4;
const value2 = undefined;
const value3 = binding(r2, env1_3);
const jsxRuntimeEnv1_15Binding = jsxRuntimeEnv1_15;
const env1_182 = ((Component) => <Component targetRef={env0_17} canShowTooltip={env0_14 && isConnectedToVoiceChannel} />)(env1_18);
const NativeView = importDefault(6821) /* metro dependency 6821: NativeView */;
const defaultImportProps = {style: style, ref: env0_17};
const VoicePanelIconButton = importDefault(15388) /* metro dependency 15388: VoicePanelIconButton */;
const defaultImport2Props = {ref: ref, ...value3};
defaultImport2Props['disabled'] = queueAudioSwap;
defaultImport2Props['overrideVariant'] = isConnectedToVoiceChannel && isAudioRouteEnabled ? 'primary-overlay' : value2;
defaultImport2Props['loading'] = awaitingRemoteSessionInfo != null;
defaultImport2Props['icon'] = env0_12 ?? routeSource;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
defaultImport2Props['accessibilityLabel'] = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.dnI0AL);
return (
<>
{env1_182}
<NativeView {...defaultImportProps}>
<VoicePanelIconButton {...defaultImport2Props} />
</NativeView>
</>
);
}
function _fun118406() { // fn#118406, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15667:1720, offset: 0x024dabc3, size: 62 bytes, params: 1, frame: 14
const value = environment.__proto__;
return SessionsStore.getSessionById(env0_8?.sessionId ?? '');
}
function _fun118407() { // fn#118407, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15667:1814, offset: 0x024dac01, size: 113 bytes, params: 1, frame: 14
var r0;
var value;
const awaitingRemoteSessionInfoBinding = awaitingRemoteSessionInfo;
const value2 = null;
const value3 = undefined;
const type = value2 == awaitingRemoteSessionInfoBinding ? value3 : awaitingRemoteSessionInfo.type;
const r2 = value2 != type ? type : value2 == sessionById || value2 == sessionById.clientInfo ? value3 : sessionById.clientInfo.os;
if (value2 != r2) {
value = environment.__proto__;
value = (importDefault(9436) /* metro dependency 9436: getConsoleIcon */)(r2);
r0 = value;
} else {
r0 = value2;
}
return r0;
}
function _fun118408() { // fn#118408, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15667:2056, offset: 0x024dac72, size: 106 bytes, params: 1, frame: 14
let value = environment.__proto__;
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (platformUtilsModule.isAndroid()) {
value = require(9239) /* metro dependency 9239: showAudioOutputSelector */;
value.showAudioOutputSelector(channelId, isConnectedToVoiceChannel);
} else {
toggleAudio(channelId, isConnectedToVoiceChannel);
}
}
function _fun118410() { // fn#118410, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15667:2219, offset: 0x024dacef, size: 571 bytes, params: 1, frame: 20
var environment;
var r4;
var r3;
var items2;
var binding;
var currentRouteTypeBinding;
const RouteTypes = (require(9230) /* metro dependency 9230: VoiceCallTypes */).RouteTypes;
var SPEAKER;
var value3;
var push;
var object4;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var gvQIzx;
var RECEIVER;
var value4;
var object5;
var wwTN1g;
var object6;
var dnI0AL;
var closure;
var value5;
var done;
var value6;
var value7;
let value = environment.__proto__;
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (!platformUtilsModule.isAndroid()) {
reducibleJoin13: while (true) {
if (env0_13.length !== 0) {
items2 = [];
var env0_0 = items2;
binding = env0_7;
reducibleJoin4: while (true) {
if (binding) {
r4 = binding;
break reducibleJoin4;
}
currentRouteTypeBinding = currentRouteType;
SPEAKER = RouteTypes.SPEAKER;
value3 = currentRouteTypeBinding !== SPEAKER;
r4 = value3;
break reducibleJoin4;
}
reducibleJoin6: while (true) {
if (r4) {
break reducibleJoin6;
}
push = items2.push;
object4 = {};
string = intl.string;
gvQIzx = t.gvQIzx;
object4.label = Reflect.apply(string, intl, [gvQIzx]);
object4.iconSource = importDefault(9236) /* metro dependency 9236 */;
object4.showIconFirst = false;
object4.action = action_118411;
Reflect.apply(push, items2, [object4]);
break reducibleJoin6;
}
binding = env0_7;
reducibleJoin8: while (true) {
if (binding) {
r4 = binding;
break reducibleJoin8;
}
currentRouteTypeBinding = currentRouteType;
RECEIVER = RouteTypes.RECEIVER;
value4 = currentRouteTypeBinding !== RECEIVER;
r4 = value4;
break reducibleJoin8;
}
reducibleJoin10: while (true) {
if (r4) {
break reducibleJoin10;
}
push = items2.push;
object5 = {};
string = intl.string;
wwTN1g = t.wwTN1g;
object5.label = Reflect.apply(string, intl, [wwTN1g]);
object5.iconSource = importDefault(9238) /* metro dependency 9238 */;
object5.showIconFirst = false;
object5.action = action_118412;
Reflect.apply(push, items2, [object5]);
break reducibleJoin10;
}
push = items2.push;
object6 = {};
string = intl.string;
dnI0AL = t.dnI0AL;
object6.label = Reflect.apply(string, intl, [dnI0AL]);
object6.iconSource = importDefault(15479) /* metro dependency 15479 */;
object6.showIconFirst = false;
object6.action = action_118413;
Reflect.apply(push, items2, [object6]);
closure = _loop_118414;
value = _createForOfIteratorHelperLoose_118398(env0_13);
value5 = value();
done = value5.done;
if (!done) {
r3 = value5;
reducibleLoop11: while (true) {
value6 = r3.value;
closure(value6);
value7 = value();
done = value7.done;
if (done) {
break reducibleLoop11;
}
r3 = value7;
continue reducibleLoop11;
}
}
return items2;
if (r5) {
}
break reducibleJoin13;
return _fun118399;
}
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 _fun118399() { // fn#118399, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15667:883, 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 env1_17;
}
function _fun118417() { // fn#118417, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15667:3401, offset: 0x024db133, size: 90 bytes, params: 1, frame: 15
const dismissibleContentUnsafeUtilsModule = require(3968) /* metro dependency 3968: DismissibleContentUnsafeUtils */;
const UNSAFE_markDismissibleContentAsDismissed = dismissibleContentUnsafeUtilsModule.UNSAFE_markDismissibleContentAsDismissed;
const DismissibleContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent;
const DONUT_MOBILE_NUX = DismissibleContent.DONUT_MOBILE_NUX;
Reflect.apply(UNSAFE_markDismissibleContentAsDismissed, dismissibleContentUnsafeUtilsModule, [DONUT_MOBILE_NUX]);
setVoiceUpsellDismissed(true);
env0_3.lock();
}
function VoicePanelHeaderSpeaker({isConnectedToVoiceChannel, channelId, style}) { // fn#118402, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15667:1325, offset: 0x024da6f0, size: 822 bytes, params: 2, frame: 27
var moduleValue6;
const children_1184032 = children_118403;
const value2 = (UseControlsLock)();
const value3 = (CallsUtilsModule).useMaskedSpeakerStates();
const toggleAudio = value3.toggleAudio;
const routeSource = value3.routeSource;
const env0_6 = value3.isAudioRouteEnabled;
const value4 = (UseIsVideoMode)();
const env0_8 = (UseVoiceStateForRemoteSession)();
const awaitingRemoteSessionInfo = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([GameConsoleStore],
function() {
return GameConsoleStore.getAwaitingRemoteSessionInfo();
});
const env0_10 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([StageChannelAudioStore],
function() {
return StageChannelAudioStore.getQueueAudioSwap();
});
const sessionById = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([SessionsStore],
_fun118406);
let binding = routeSource;
const env0_12 = binding.useMemo(_fun118407, [awaitingRemoteSessionInfo, sessionById]);
const value5 = (UseGameConsoleAccounts)();
const value6 = value5.length > 0;
const value7 = (UseCanConnect)(channelId);
const r4 = value7.canConnect && !value7.isAtMaxCapacity && (isConnectedToVoiceChannel || value6);
binding = routeSource;
const env0_15 = binding.useCallback(_fun118408, [channelId, isConnectedToVoiceChannel, toggleAudio]);
if (r4) {
moduleValue6 = require(477) /* metro dependency 477: PlatformUtils */;
return (
moduleValue6.isAndroid()
? children_1184032()
: (
value6
? (
<>
{((Component) => <Component targetRef={binding.useRef(null)} canShowTooltip={isConnectedToVoiceChannel} />)(env0_18)}
{((MenuPopout) => <MenuPopout menuItems={binding.useMemo(_fun118410, [value5, channelId,
isConnectedToVoiceChannel,
(require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([AudioRouteStoreNative],
function() {
return AudioRouteStoreNative.getCurrentRouteType();
}), value4])} position="bottom" align="end" onRequestOpen={binding.useCallback(_fun118417,
[value2])} onRequestClose={value2.unlock}>{children_1184032}</MenuPopout>)((require(12764) /* metro dependency 12764: MenuPopout */).MenuPopout)}
</>
)
: children_1184032()
)
);
}
return null;
function VoicePanelHeaderSpeakerChildren(a0) { // fn#118403, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15667:3561, owner: VoicePanelHeaderSpeaker.children, offset: 0x024daa26, size: 373 bytes, params: 2, frame: 25
const r2 = a0 ?? ({onPress: env0_15, ref: undefined});
const ref = r2.ref;
value = environment.__proto__;
const binding = env1_4;
const value2 = undefined;
const value3 = binding(r2, env1_3);
const jsxRuntimeEnv1_15Binding = jsxRuntimeEnv1_15;
const env1_183 = ((Component) => <Component targetRef={env0_17} canShowTooltip={env0_14 && isConnectedToVoiceChannel} />)(env1_18);
const defaultImportProps = {style: style, ref: env0_17};
const defaultImport2Props = {ref: ref, ...value3};
defaultImport2Props['disabled'] = queueAudioSwap;
defaultImport2Props['overrideVariant'] = isConnectedToVoiceChannel && isAudioRouteEnabled ? 'primary-overlay' : value2;
defaultImport2Props['loading'] = awaitingRemoteSessionInfo != null;
defaultImport2Props['icon'] = env0_12 ?? routeSource;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
defaultImport2Props['accessibilityLabel'] = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.dnI0AL);
return (
<>
{env1_183}
<NativeView {...defaultImportProps}>
<VoicePanelIconButton {...defaultImport2Props} />
</NativeView>
</>
);
}
function action_118411() { // fn#118411, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15667:2418, offset: 0x024daf2a, size: 39 bytes, params: 1, frame: 12
const value = environment.__proto__.__proto__;
const AudioRoutePicker = NativeModules.AudioRoutePicker;
return AudioRoutePicker?.toggleSpeaker(false);
}
function _fun118406() { // fn#118406, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15667:1720, offset: 0x024dabc3, size: 62 bytes, params: 1, frame: 14
const value = environment.__proto__;
return SessionsStore.getSessionById(env0_8?.sessionId ?? '');
}
function action_118412() { // fn#118412, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15667:2633, offset: 0x024daf51, size: 39 bytes, params: 1, frame: 12
const value = environment.__proto__.__proto__;
const AudioRoutePicker = NativeModules.AudioRoutePicker;
return AudioRoutePicker?.toggleSpeaker(true);
}
function _fun118407() { // fn#118407, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15667:1814, offset: 0x024dac01, size: 113 bytes, params: 1, frame: 14
var r0;
var value;
const awaitingRemoteSessionInfoBinding = awaitingRemoteSessionInfo;
const value2 = null;
const value3 = undefined;
const type = value2 == awaitingRemoteSessionInfoBinding ? value3 : awaitingRemoteSessionInfo.type;
const r2 = value2 != type ? type : value2 == sessionById || value2 == sessionById.clientInfo ? value3 : sessionById.clientInfo.os;
if (value2 != r2) {
value = environment.__proto__;
value = (importDefault(9436) /* metro dependency 9436: getConsoleIcon */)(r2);
r0 = value;
} else {
r0 = value2;
}
return r0;
}
function action_118413() { // fn#118413, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15667:2810, offset: 0x024daf78, size: 50 bytes, params: 1, frame: 14
let value = environment.__proto__.__proto__;
value = require(9239) /* metro dependency 9239: showAudioOutputSelector */;
value.showAudioOutputSelector(channelId, isConnectedToVoiceChannel);
}
function _fun118408() { // fn#118408, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15667:2056, offset: 0x024dac72, size: 106 bytes, params: 1, frame: 14
let value = environment.__proto__;
if (PlatformUtilsModule.isAndroid()) {
value = require(9239) /* metro dependency 9239: showAudioOutputSelector */;
value.showAudioOutputSelector(channelId, isConnectedToVoiceChannel);
} else {
toggleAudio(channelId, isConnectedToVoiceChannel);
}
}
function _fun118410() { // fn#118410, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15667:2219, offset: 0x024dacef, size: 571 bytes, params: 1, frame: 20
var environment;
var r4;
var r3;
var items2;
var binding;
var currentRouteTypeBinding;
const RouteTypes = (VoiceCallTypesModule).RouteTypes;
var SPEAKER;
var value3;
var push;
var object;
const intl = (IndexNativeModule).intl;
var string;
const t = (IndexNativeModule).t;
var gvQIzx;
var RECEIVER;
var value4;
var object2;
var wwTN1g;
var object3;
var dnI0AL;
var _loop_1184142;
var value5;
var done;
var value6;
var value7;
let value = environment.__proto__;
if (!PlatformUtilsModule.isAndroid()) {
reducibleJoin13: while (true) {
if (ConstantsModule.PlatformTypes.length !== 0) {
items2 = [];
var env0_0 = items2;
binding = ConsoleVoiceUpsellStoreModule.setVoiceUpsellDismissed;
reducibleJoin4: while (true) {
if (binding) {
r4 = binding;
break reducibleJoin4;
}
currentRouteTypeBinding = currentRouteType;
SPEAKER = RouteTypes.SPEAKER;
value3 = currentRouteTypeBinding !== SPEAKER;
r4 = value3;
break reducibleJoin4;
}
reducibleJoin6: while (true) {
if (r4) {
break reducibleJoin6;
}
push = items2.push;
object = {};
string = intl.string;
gvQIzx = t.gvQIzx;
object.label = Reflect.apply(string, intl, [gvQIzx]);
object.iconSource = importDefault(9236) /* metro dependency 9236 */;
object.showIconFirst = false;
object.action = action_118411;
Reflect.apply(push, items2, [object]);
break reducibleJoin6;
}
binding = ConsoleVoiceUpsellStoreModule.setVoiceUpsellDismissed;
reducibleJoin8: while (true) {
if (binding) {
r4 = binding;
break reducibleJoin8;
}
currentRouteTypeBinding = currentRouteType;
RECEIVER = RouteTypes.RECEIVER;
value4 = currentRouteTypeBinding !== RECEIVER;
r4 = value4;
break reducibleJoin8;
}
reducibleJoin10: while (true) {
if (r4) {
break reducibleJoin10;
}
push = items2.push;
object2 = {};
string = intl.string;
wwTN1g = t.wwTN1g;
object2.label = Reflect.apply(string, intl, [wwTN1g]);
object2.iconSource = importDefault(9238) /* metro dependency 9238 */;
object2.showIconFirst = false;
object2.action = action_118412;
Reflect.apply(push, items2, [object2]);
break reducibleJoin10;
}
push = items2.push;
object3 = {};
string = intl.string;
dnI0AL = t.dnI0AL;
object3.label = Reflect.apply(string, intl, [dnI0AL]);
object3.iconSource = importDefault(15479) /* metro dependency 15479 */;
object3.showIconFirst = false;
object3.action = action_118413;
Reflect.apply(push, items2, [object3]);
_loop_1184142 = _loop_118414;
value = _createForOfIteratorHelperLoose_118398(ConstantsModule.PlatformTypes);
value5 = value();
done = value5.done;
if (!done) {
r3 = value5;
reducibleLoop11: while (true) {
value6 = r3.value;
_loop_1184142(value6);
value7 = value();
done = value7.done;
if (done) {
break reducibleLoop11;
}
r3 = value7;
continue reducibleLoop11;
}
}
return items2;
}
break reducibleJoin13;
}
}
return env1_17;
function action_118411() { // fn#118411, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15667:2418, offset: 0x024daf2a, size: 39 bytes, params: 1, frame: 12
const value = environment.__proto__.__proto__;
const AudioRoutePicker = NativeModules.AudioRoutePicker;
return AudioRoutePicker?.toggleSpeaker(false);
}
function action_118412() { // fn#118412, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15667:2633, offset: 0x024daf51, size: 39 bytes, params: 1, frame: 12
const value = environment.__proto__.__proto__;
const AudioRoutePicker = NativeModules.AudioRoutePicker;
return AudioRoutePicker?.toggleSpeaker(true);
}
function action_118413() { // fn#118413, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15667:2810, offset: 0x024daf78, size: 50 bytes, params: 1, frame: 14
let value = environment.__proto__.__proto__;
value = require(9239) /* metro dependency 9239: showAudioOutputSelector */;
value.showAudioOutputSelector(channelId, isConnectedToVoiceChannel);
}
function _loop_118414(a0) { // fn#118414, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15667:2873, offset: 0x024dafaa, size: 318 bytes, params: 2, frame: 20
var environment;
var binding;
var push;
var object;
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
const env0_0 = a0;
let type = a0.type;
const value = environment.__proto__.__proto__;
const XBOX = PlatformTypes.XBOX;
if (type === XBOX) {
binding = env0_0;
push = binding.push;
object = {};
object.label = intl.string(t['qVE/VF']);
object.iconSource = (importDefault(9436) /* metro dependency 9436: getConsoleIcon */)(a0.type);
object.showIconFirst = false;
object.action = action_118415;
Reflect.apply(push, binding, [object]);
}
type = a0.type;
const PLAYSTATION = PlatformTypes.PLAYSTATION;
if (type === PLAYSTATION) {
binding = env0_0;
push = binding.push;
object = {};
object.label = intl.string(t.vzfxmY);
object.iconSource = (importDefault(9436) /* metro dependency 9436: getConsoleIcon */)(a0.type);
object.showIconFirst = false;
object.action = action_118416;
Reflect.apply(push, binding, [object]);
}
function _loop_118414Action() { // fn#118415, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15667:3013, owner: _loop_118414.action, offset: 0x024db0e8, size: 75 bytes, params: 1, frame: 13
const value = environment.__proto__.__proto__.__proto__;
const channel = ChannelStore.getChannel(channelId);
if (channel != null) {
(require(9326) /* metro dependency 9326: useOnConnectToConsole */).onConnectToConsole(channel, env0_0);
}
}
function _loop_118414Action_118416() { // fn#118416, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15667:3218, owner: _loop_118414.action, offset: 0x024db0e8, size: 75 bytes, params: 1, frame: 13
const value = environment.__proto__.__proto__.__proto__;
const channel = ChannelStore.getChannel(channelId);
if (channel != null) {
(require(9326) /* metro dependency 9326: useOnConnectToConsole */).onConnectToConsole(channel, env0_0);
}
}
}
}
function _fun118417() { // fn#118417, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15667:3401, offset: 0x024db133, size: 90 bytes, params: 1, frame: 15
const UNSAFE_markDismissibleContentAsDismissed = DismissibleContentUnsafeUtilsModule.UNSAFE_markDismissibleContentAsDismissed;
const DismissibleContent = (Dismissible_contentModule).DismissibleContent;
const DONUT_MOBILE_NUX = DismissibleContent.DONUT_MOBILE_NUX;
Reflect.apply(UNSAFE_markDismissibleContentAsDismissed, DismissibleContentUnsafeUtilsModule, [DONUT_MOBILE_NUX]);
setVoiceUpsellDismissed(true);
env0_3.lock();
}
function _loop_118414(a0) { // fn#118414, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15667:2873, offset: 0x024dafaa, size: 318 bytes, params: 2, frame: 20
var environment;
var binding;
var push;
var object2;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const env0_0 = a0;
let type = a0.type;
const value = environment.__proto__.__proto__;
const XBOX = PlatformTypes.XBOX;
if (type === XBOX) {
binding = env0_0;
push = binding.push;
object2 = {};
object2.label = intl.string(t['qVE/VF']);
object2.iconSource = (importDefault(9436) /* metro dependency 9436: getConsoleIcon */)(a0.type);
object2.showIconFirst = false;
object2.action = action_118415;
Reflect.apply(push, binding, [object2]);
}
type = a0.type;
const PLAYSTATION = PlatformTypes.PLAYSTATION;
if (type === PLAYSTATION) {
binding = env0_0;
push = binding.push;
object2 = {};
object2.label = intl.string(t.vzfxmY);
object2.iconSource = (importDefault(9436) /* metro dependency 9436: getConsoleIcon */)(a0.type);
object2.showIconFirst = false;
object2.action = action_118416;
Reflect.apply(push, binding, [object2]);
}
}
function _loop_118414Action() { // fn#118415, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15667:3013, owner: _loop_118414.action, offset: 0x024db0e8, size: 75 bytes, params: 1, frame: 13
const value = environment.__proto__.__proto__.__proto__;
const channel = ChannelStore.getChannel(channelId);
if (channel != null) {
(require(9326) /* metro dependency 9326: useOnConnectToConsole */).onConnectToConsole(channel, env0_0);
}
}
global.__d(_fun118397, 15470, [29, 31, 27, 15471, 4295, 15472, 9229, 1379, 4296, 661, 33, 15474, 15447, 9228, 9438,
9325, 632, 9436, 9324, 15478, 477, 9239, 9230, 1244, 9236, 9238, 15479, 9326, 3968, 1365, 6821, 15388, 12764,
2]) /* metro module 15470, dependencies: [29, 31, 27, 15471, 4295, 15472, 9229, 1379, 4296, 661, 33, 15474, 15447, 9228, 9438, 9325, 632, 9436, 9324, 15478, 477, 9239, 9230, 1244, 9236, 9238, 15479, 9326, 3968, 1365, 6821, 15388, 12764, 2] */;
@@ -1,6 +1,21 @@
/* Metro module 15457; source: modules/voice_panel/native/header/VoicePanelHeaderUserState.tsx; dependencies: [31, 4606, 33, 4017, 8554, 4501, 697, 15458, 15456, 9244, 6821, 11794, 566, 4504, 2] */
import ReanimatedRexport from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import ChannelRTCStore from '../../../calls/ChannelRTCStore.tsx'; /* Metro dependency 4606 */
import VoicePanelStateContext from '../VoicePanelStateContext.tsx'; /* Metro dependency 11794 */
import UseStableParticipant from '../utils/useStableParticipant.tsx'; /* Metro dependency 15456 */
import UseVoicePanelCardUserStateIcons from '../hooks/useVoicePanelCardUserStateIcons.tsx'; /* Metro dependency 15458 */
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 ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TimingModule from '../../../../design/animation/reanimated/timing/timing.tsx'; /* Metro dependency 4504 */
import * as NativeModule from '../../../../design/components/experimental/native.tsx'; /* Metro dependency 8554 */
import * as UseStableParticipantModule from '../utils/useStableParticipant.tsx'; /* Metro dependency 15456 */
import * as UseVoicePanelCardUserStateIconsModule from '../hooks/useVoicePanelCardUserStateIcons.tsx'; /* Metro dependency 15458 */
function _fun118311(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118311, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15654:6, offset: 0x024d60eb, size: 470 bytes, params: 8, frame: 25
var object3;
const env0_0 = require;
const _arrayLikeToArray_118314 = function(a0, a1) {
var r0;
@@ -45,213 +60,216 @@ function _fun118311(global, require, importDefault, importAll, module, exports,
}
return value;
};
const closure = useVoicePanelHeaderUserStateIcons;
const useVoicePanelHeaderUserStateIcons2 = useVoicePanelHeaderUserStateIcons;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const channelRTCStore = importDefault(4606) /* metro dependency 4606: ChannelRTCStore */;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
const reanimatedRexport = importDefault(4017) /* metro dependency 4017: ReanimatedRexport */;
const createAnimatedComponent = reanimatedRexport.createAnimatedComponent;
const BackgroundBlurView = (require(8554) /* metro dependency 8554: native */).BackgroundBlurView;
const env0_6 = Reflect.apply(createAnimatedComponent, reanimatedRexport, [BackgroundBlurView]);
object3 = {duration: 100};
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object3 = {};
const object5 = {'position': 'absolute', 'top': 0, 'left': 0, 'borderRadius': null, 'padding': 6};
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object3.container = object5;
object3.iconContainer = {flexDirection: 'row'};
const object6 = {'width': 20, 'height': 20, 'borderRadius': null, 'alignItems': 'center',
let value = ReactModule;
const createAnimatedComponent = ReanimatedRexport.createAnimatedComponent;
const BackgroundBlurView = (NativeModule).BackgroundBlurView;
const env0_6 = Reflect.apply(createAnimatedComponent, ReanimatedRexport, [BackgroundBlurView]);
object = {duration: 100};
const createStyles = CreateStylesModule.createStyles;
object = {};
const object2 = {'position': 'absolute', 'top': 0, 'left': 0, 'borderRadius': null, 'padding': 6};
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object.container = object2;
object.iconContainer = {flexDirection: 'row'};
const object4 = {'width': 20, 'height': 20, 'borderRadius': null, 'alignItems': 'center',
'justifyContent': 'center'};
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object3.floatingIconWrapper = object6;
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object.floatingIconWrapper = object4;
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
object3.floatingIcon = {'width': 12, 'height': 12, tintColor: WHITE};
object3.leftMargin = {marginLeft: 4};
const env0_8 = Reflect.apply(createStyles, createStylesModule, [object3]);
object3 = {code: 'function VoicePanelHeaderUserStateTsx1(){const{withTiming,isHeaderHidden,OPACITY_TIMING}=this.__closure;return{opacity:withTiming(isHeaderHidden.get()?1:0,OPACITY_TIMING)};}'};
object.floatingIcon = {'width': 12, 'height': 12, tintColor: WHITE};
object.leftMargin = {marginLeft: 4};
const env0_8 = Reflect.apply(createStyles, CreateStylesModule, [object]);
object = {code: 'function VoicePanelHeaderUserStateTsx1(){const{withTiming,isHeaderHidden,OPACITY_TIMING}=this.__closure;return{opacity:withTiming(isHeaderHidden.get()?1:0,OPACITY_TIMING)};}'};
value = value.memo(VoicePanelHeaderUserState);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/header/VoicePanelHeaderUserState.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/header/VoicePanelHeaderUserState.tsx');
exports.default = value;
exports.useVoicePanelHeaderUserStateIcons = closure;
}
function _createForOfIteratorHelperLoose_118312(a0, a1) { // fn#118312, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15654:136, offset: 0x024d62c1, 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)) {
exports.useVoicePanelHeaderUserStateIcons = useVoicePanelHeaderUserStateIcons2;
function _createForOfIteratorHelperLoose_118312(a0, a1) { // fn#118312, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15654:136, offset: 0x024d62c1, 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 _fun118313;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_118314(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 _fun118313;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_118314(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_118314(a0, value);
r6 = value;
} else {
r6 = value;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_118314(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
r5 = r6;
} else {
r5 = value;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
if (r5) {
}
return _fun118313;
}
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 _fun118313() { // fn#118313, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15654:707, 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 _fun118313;
}
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 useVoicePanelHeaderUserStateIcons(a0, a1, a2) { // fn#118315, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15654:1490, offset: 0x024d6435, size: 595 bytes, params: 4, frame: 31
var r2;
var leftMargin;
var value5;
const VoicePanelCardUserStateIconType = (require(15458) /* metro dependency 15458: useVoicePanelCardUserStateIcons */).VoicePanelCardUserStateIconType;
var USER_VIDEO_ICON;
var push;
var jsxRuntimeEnv0_5Binding;
const BackgroundBlurView = (require(8554) /* metro dependency 8554: native */).BackgroundBlurView;
var object;
var floatingIconWrapper;
var jsxRuntimeEnv0_5Binding2;
var VideoIcon;
var videoIconState;
var MUTE_DEAFEN_ICON;
var object2;
var withLeftMargin;
var jsxRuntimeEnv0_5Binding3;
var MuteDeafenIcon;
var muteDeafenIconState;
var value6;
const value2 = undefined;
const styles = useStyles();
const items2 = [];
const _createForOfIteratorHelperLoose_118312Binding = _createForOfIteratorHelperLoose_118312;
const defaultImport = importDefault(15458) /* metro dependency 15458: useVoicePanelCardUserStateIcons */;
let type = a0 == null ? value2 : a0.type;
const useStableParticipantModule = require(15456) /* metro dependency 15456: useStableParticipant */;
const value3 = _createForOfIteratorHelperLoose_118312Binding(defaultImport(type,
useStableParticipantModule.isStableParticipantWithUser(a0) ? a0.user.id : value2, a1));
const value4 = value3();
let done = value4.done;
if (!done) {
r2 = value4;
while (true) {
value5 = r2.value;
type = value5.type;
USER_VIDEO_ICON = VoicePanelCardUserStateIconType.USER_VIDEO_ICON;
if (type === USER_VIDEO_ICON) {
}
function useVoicePanelHeaderUserStateIcons(a0, a1, a2) { // fn#118315, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15654:1490, offset: 0x024d6435, size: 595 bytes, params: 4, frame: 31
var r2;
var leftMargin;
var value5;
const VoicePanelCardUserStateIconType = (UseVoicePanelCardUserStateIconsModule).VoicePanelCardUserStateIconType;
var USER_VIDEO_ICON;
var push;
var jsxRuntimeEnv0_5Binding;
const BackgroundBlurView = (NativeModule).BackgroundBlurView;
var object2;
var floatingIconWrapper;
var jsxRuntimeEnv0_5Binding2;
var VideoIcon;
var videoIconState;
var MUTE_DEAFEN_ICON;
var object;
var withLeftMargin;
var jsxRuntimeEnv0_5Binding3;
var MuteDeafenIcon;
var muteDeafenIconState;
var value6;
const value2 = undefined;
const styles = useStyles();
const items2 = [];
const _createForOfIteratorHelperLoose_118312Binding = _createForOfIteratorHelperLoose_118312;
const defaultImport = UseVoicePanelCardUserStateIcons;
let type = a0 == null ? value2 : a0.type;
const value3 = _createForOfIteratorHelperLoose_118312Binding(defaultImport(type,
UseStableParticipantModule.isStableParticipantWithUser(a0) ? a0.user.id : value2, a1));
const value4 = value3();
let done = value4.done;
if (!done) {
r2 = value4;
while (true) {
value5 = r2.value;
type = value5.type;
USER_VIDEO_ICON = VoicePanelCardUserStateIconType.USER_VIDEO_ICON;
if (type === USER_VIDEO_ICON) {
push = items2.push;
jsxRuntimeEnv0_5Binding = jsxRuntimeEnv0_5;
var backgroundBlurViewProps = {blurTheme: 'dark', style: styles.floatingIconWrapper};
jsxRuntimeEnv0_5Binding2 = jsxRuntimeEnv0_5;
VideoIcon = (require(9244) /* metro dependency 9244: VoiceStateIcons */).VideoIcon;
videoIconState = value5.videoIconState;
Reflect.apply(push, items2,
[<BackgroundBlurView {...backgroundBlurViewProps} key="video"><VideoIcon style={styles.floatingIcon} state={videoIconState} /></BackgroundBlurView>]);
}
type = value5.type;
MUTE_DEAFEN_ICON = VoicePanelCardUserStateIconType.MUTE_DEAFEN_ICON;
if (type !== MUTE_DEAFEN_ICON) {
continue;
}
push = items2.push;
jsxRuntimeEnv0_5Binding = jsxRuntimeEnv0_5;
var backgroundBlurViewProps = {blurTheme: 'dark', style: styles.floatingIconWrapper};
jsxRuntimeEnv0_5Binding2 = jsxRuntimeEnv0_5;
VideoIcon = (require(9244) /* metro dependency 9244: VoiceStateIcons */).VideoIcon;
videoIconState = value5.videoIconState;
object = {blurTheme: 'dark'};
floatingIconWrapper = styles.floatingIconWrapper;
withLeftMargin = value5.withLeftMargin;
if (!withLeftMargin) {
leftMargin = value2;
continue;
}
leftMargin = styles.leftMargin;
object.style = [floatingIconWrapper, leftMargin];
jsxRuntimeEnv0_5Binding3 = jsxRuntimeEnv0_5;
MuteDeafenIcon = (require(9244) /* metro dependency 9244: VoiceStateIcons */).MuteDeafenIcon;
muteDeafenIconState = value5.muteDeafenIconState;
Reflect.apply(push, items2,
[<BackgroundBlurView {...backgroundBlurViewProps} key="video"><VideoIcon style={styles.floatingIcon} state={videoIconState} /></BackgroundBlurView>]);
}
type = value5.type;
MUTE_DEAFEN_ICON = VoicePanelCardUserStateIconType.MUTE_DEAFEN_ICON;
if (type !== MUTE_DEAFEN_ICON) {
[<BackgroundBlurView {...object} key="mute-deafen"><MuteDeafenIcon style={styles.floatingIcon} state={muteDeafenIconState} /></BackgroundBlurView>]);
value6 = value3();
done = value6.done;
if (done) {
break;
}
r2 = value6;
continue;
}
push = items2.push;
jsxRuntimeEnv0_5Binding = jsxRuntimeEnv0_5;
object2 = {blurTheme: 'dark'};
floatingIconWrapper = styles.floatingIconWrapper;
withLeftMargin = value5.withLeftMargin;
if (!withLeftMargin) {
leftMargin = value2;
continue;
}
leftMargin = styles.leftMargin;
object2.style = [floatingIconWrapper, leftMargin];
jsxRuntimeEnv0_5Binding3 = jsxRuntimeEnv0_5;
MuteDeafenIcon = (require(9244) /* metro dependency 9244: VoiceStateIcons */).MuteDeafenIcon;
muteDeafenIconState = value5.muteDeafenIconState;
Reflect.apply(push, items2,
[<BackgroundBlurView {...object2} key="mute-deafen"><MuteDeafenIcon style={styles.floatingIcon} state={muteDeafenIconState} /></BackgroundBlurView>]);
value6 = value3();
done = value6.done;
if (done) {
break;
}
r2 = value6;
continue;
}
if (items2.length !== 0) {
return ((Component) => <Component style={[styles.iconContainer,
a2]}>{items2}</Component>)(importDefault(6821) /* metro dependency 6821: NativeView */);
}
return value2;
}
if (items2.length !== 0) {
return ((Component) => <Component style={[styles.iconContainer,
a2]}>{items2}</Component>)(importDefault(6821) /* metro dependency 6821: NativeView */);
function VoicePanelHeaderUserState({isHeaderHidden}) { // fn#118316, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15654:2525, offset: 0x024d6688, size: 317 bytes, params: 2, frame: 24
const {channelId,
guildId} = env0_3.useContext(VoicePanelStateContext);
const styles = useStyles();
const useStateFromStores = FluxModule.useStateFromStores;
const value4 = useVoicePanelHeaderUserStateIcons((UseStableParticipant)(Reflect.apply(useStateFromStores,
FluxModule, [[ChannelRTCStore], _fun118317]), channelId, guildId), guildId);
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
const VoicePanelHeaderUserStateS2 = VoicePanelHeaderUserStateS;
VoicePanelHeaderUserStateS2.__closure = {withTiming: (require(4504) /* metro dependency 4504: timing */).withTiming,
isHeaderHidden: isHeaderHidden, OPACITY_TIMING: env0_7};
VoicePanelHeaderUserStateS2.__workletHash = 7032221979181;
VoicePanelHeaderUserStateS2.__initData = env0_9;
return (
value4 == null
? null
: ((Component) => <Component blurTheme="dark" style={[styles.container, Reflect.apply(useAnimatedStyle,
ReanimatedRexportModule,
[VoicePanelHeaderUserStateS2])]} pointerEvents="none">{value4}</Component>)(env0_6)
);
function _fun118317() { // fn#118317, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15654:2679, offset: 0x024d67c5, size: 43 bytes, params: 1, frame: 11
const value = environment.__proto__;
return ChannelRTCStore.getSelectedParticipant(channelId)?.id;
}
function VoicePanelHeaderUserStateS() { // fn#118318, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15654:2836, owner: VoicePanelHeaderUserState.s, offset: 0x024d67f0, size: 72 bytes, params: 1, frame: 15
const object = {};
object.opacity = TimingModule.withTiming(isHeaderHidden.get() ? 1 : 0, env1_7);
return object;
}
}
return value2;
}
function VoicePanelHeaderUserState({isHeaderHidden}) { // fn#118316, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15654:2525, offset: 0x024d6688, size: 317 bytes, params: 2, frame: 24
const {channelId,
guildId} = env0_3.useContext(importDefault(11794) /* metro dependency 11794: VoicePanelStateContext */);
const styles = useStyles();
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStores = fluxModule.useStateFromStores;
const value4 = useVoicePanelHeaderUserStateIcons((importDefault(15456) /* metro dependency 15456: useStableParticipant */)(Reflect.apply(useStateFromStores,
fluxModule, [[ChannelRTCStore], _fun118317]), channelId, guildId), guildId);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = VoicePanelHeaderUserStateS;
closure.__closure = {withTiming: (require(4504) /* metro dependency 4504: timing */).withTiming,
isHeaderHidden: isHeaderHidden, OPACITY_TIMING: env0_7};
closure.__workletHash = 7032221979181;
closure.__initData = env0_9;
return value4 == null ? null : ((Component) => <Component blurTheme="dark" style={[styles.container,
Reflect.apply(useAnimatedStyle, reanimatedRexportModule,
[closure])]} pointerEvents="none">{value4}</Component>)(env0_6);
}
function _fun118317() { // fn#118317, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15654:2679, offset: 0x024d67c5, size: 43 bytes, params: 1, frame: 11
const value = environment.__proto__;
return ChannelRTCStore.getSelectedParticipant(channelId)?.id;
}
function VoicePanelHeaderUserStateS() { // fn#118318, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15654:2836, owner: VoicePanelHeaderUserState.s, offset: 0x024d67f0, size: 72 bytes, params: 1, frame: 15
const object2 = {};
const timingModule = require(4504) /* metro dependency 4504: timing */;
object2.opacity = timingModule.withTiming(isHeaderHidden.get() ? 1 : 0, env1_7);
return object2;
}
global.__d(_fun118311, 15457, [31, 4606, 33, 4017, 8554, 4501, 697, 15458, 15456, 9244, 6821, 11794, 566, 4504,
2]) /* metro module 15457, dependencies: [31, 4606, 33, 4017, 8554, 4501, 697, 15458, 15456, 9244, 6821, 11794, 566, 4504, 2] */;
@@ -1,23 +1,27 @@
/* Metro module 15461; source: modules/voice_panel/native/header/VoicePanelSettingsActionCreators.tsx; dependencies: [4080, 15462, 1962, 2] */
import ActionSheetActionCreators from '../../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun118344(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118344, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15658:6, offset: 0x024d7d41, size: 130 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_panel/native/header/VoicePanelSettingsActionCreators.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/header/VoicePanelSettingsActionCreators.tsx');
exports.VOICE_PANEL_SETTINGS_ACTION_SHEET_KEY = 'VoicePanelSettingsActionSheet';
exports.closeVoicePanelSettingsActionSheet = closeVoicePanelSettingsActionSheet;
exports.openVoicePanelSettingsActionSheet = openVoicePanelSettingsActionSheet;
function closeVoicePanelSettingsActionSheet() { // fn#118345, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15658:313, offset: 0x024d7dc3, size: 43 bytes, params: 1, frame: 12
(ActionSheetActionCreators).hideActionSheet('VoicePanelSettingsActionSheet');
}
function openVoicePanelSettingsActionSheet(a0, a1) { // fn#118346, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15658:423, offset: 0x024d7dee, size: 95 bytes, params: 3, frame: 16
const defaultImport = importDefault(dependencyMap[0]);
const openLazy = defaultImport.openLazy;
let value = require(dependencyMap[2]);
value = value(dependencyMap[1], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport, [value, 'VoicePanelSettingsActionSheet', {guildId: a0, channelId: a1}]);
}
}
function closeVoicePanelSettingsActionSheet() { // fn#118345, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15658:313, offset: 0x024d7dc3, size: 43 bytes, params: 1, frame: 12
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet('VoicePanelSettingsActionSheet');
}
function openVoicePanelSettingsActionSheet(a0, a1) { // fn#118346, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15658:423, offset: 0x024d7dee, size: 95 bytes, params: 3, frame: 16
const defaultImport = importDefault(dependencyMap[0]);
const openLazy = defaultImport.openLazy;
let value = require(dependencyMap[2]);
value = value(dependencyMap[1], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport, [value, 'VoicePanelSettingsActionSheet', {guildId: a0, channelId: a1}]);
}
global.__d(_fun118344, 15461, [4080, 15462, 1962, 2]) /* metro module 15461, dependencies: [4080, 15462, 1962, 2] */;
@@ -1,29 +1,39 @@
/* Metro module 15462; source: modules/voice_panel/native/header/VoicePanelSettingsActionSheet.tsx; dependencies: [31, 33, 4501, 6275, 6277, 6618, 15463, 2] */
import VoicePanelSettingsOverview from './VoicePanelSettingsOverview.tsx'; /* Metro dependency 15463 */
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 CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as BottomSheetNativeModule from '../../../../design/components/Sheet/native/BottomSheet.native.tsx'; /* Metro dependency 6275 */
import * as Module06277Module from '../../../../by-id/module-06277.js'; /* Metro dependency 6277 */
import * as SafeAreaViewModule from '../../../../components_native/common/SafeAreaView.tsx'; /* Metro dependency 6618 */
function _fun118347(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118347, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15659:6, offset: 0x024d7e4d, size: 190 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
const env0_4 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({wrapper: {gap: 24}});
let value = ReactModule;
const env0_4 = (CreateStylesModule).createStyles({wrapper: {gap: 24}});
value = value.memo(VoicePanelSettingsActionSheet);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/header/VoicePanelSettingsActionSheet.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/header/VoicePanelSettingsActionSheet.tsx');
exports.default = value;
function VoicePanelSettingsActionSheet({guildId, channelId}) { // fn#118348, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15659:177, offset: 0x024d7f0b, size: 190 bytes, params: 2, frame: 23
const styles = useStyles();
const BottomSheet = (BottomSheetNativeModule).BottomSheet;
const BottomSheetScrollView = (Module06277Module).BottomSheetScrollView;
const SafeAreaPaddingView = (SafeAreaViewModule).SafeAreaPaddingView;
return (
<BottomSheet startExpanded scrollable>
<BottomSheetScrollView>
<SafeAreaPaddingView bottom style={styles.wrapper}>
{((Component) => <Component guildId={guildId} channelId={channelId} />)(VoicePanelSettingsOverview)}
</SafeAreaPaddingView>
</BottomSheetScrollView>
</BottomSheet>
);
}
}
function VoicePanelSettingsActionSheet({guildId, channelId}) { // fn#118348, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15659:177, offset: 0x024d7f0b, size: 190 bytes, params: 2, frame: 23
const styles = useStyles();
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
const BottomSheetScrollView = (require(6277) /* metro dependency 6277 */).BottomSheetScrollView;
const SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
return (
<BottomSheet startExpanded scrollable>
<BottomSheetScrollView>
<SafeAreaPaddingView bottom style={styles.wrapper}>
{((Component) => <Component guildId={guildId} channelId={channelId} />)(importDefault(15463) /* metro dependency 15463: VoicePanelSettingsOverview */)}
</SafeAreaPaddingView>
</BottomSheetScrollView>
</BottomSheet>
);
}
global.__d(_fun118347, 15462, [31, 33, 4501, 6275, 6277, 6618, 15463,
2]) /* metro module 15462, dependencies: [31, 33, 4501, 6275, 6277, 6618, 15463, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,4 +1,6 @@
/* Metro module 11799; source: modules/voice_panel/native/header/calculateVoicePanelHeaderSpecs.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun90385(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90385, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11985:6, offset: 0x020372d0, size: 143 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
@@ -15,8 +17,9 @@ function _fun90385(global, require, importDefault, importAll, module, exports, d
closure.__closure = {BASE_VOICE_PANEL_HEADER_HEIGHT: 44};
closure.__workletHash = 6201232972174;
closure.__initData = {code: 'function calculateVoicePanelHeaderSpecs_calculateVoicePanelHeaderSpecsTsx1(safeArea,edgeGutter){const{BASE_VOICE_PANEL_HEADER_HEIGHT}=this.__closure;const paddingTop=Math.max(edgeGutter,safeArea.top);const paddingLeft=Math.max(edgeGutter,safeArea.left);const paddingRight=Math.max(edgeGutter,safeArea.right);const height=BASE_VOICE_PANEL_HEADER_HEIGHT+paddingTop;return{height:height,paddingTop:paddingTop,paddingLeft:paddingLeft,paddingRight:paddingRight};}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/header/calculateVoicePanelHeaderSpecs.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/header/calculateVoicePanelHeaderSpecs.tsx');
exports.default = closure;
exports.BASE_VOICE_PANEL_HEADER_HEIGHT = 44;
}
global.__d(_fun90385, 11799, [2]) /* metro module 11799, dependencies: [2] */;
@@ -1,34 +1,47 @@
/* Metro module 15478; source: modules/voice_panel/native/hooks/useCanConnect.tsx; dependencies: [1379, 1867, 3784, 4297, 482, 566, 4800, 2] */
import ChannelStore from '../../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
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 */
function _fun118466(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118466, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15675:6, offset: 0x024dc6c3, size: 184 bytes, params: 8, frame: 19
let env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
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_6 = (require(482) /* metro dependency 482: Constants */).Permissions;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/hooks/useCanConnect.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/hooks/useCanConnect.tsx');
exports.default = function(a0) {
var env0_0 = a0;
return require(dependencyMap[5]).useStateFromStoresObject([ChannelStore, PermissionStore, GuildStore,
VoiceStateStore], _fun118468, [a0]);
};
function useCanConnect(a0) { // fn#118467, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15675:252, offset: 0x024dc77b, size: 100 bytes, params: 2, frame: 17
const env0_0 = a0;
return (FluxModule).useStateFromStoresObject([ChannelStore, PermissionStore,
GuildStore, VoiceStateStore], _fun118468, [a0]);
function _fun118468() { // fn#118468, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15675:329, offset: 0x024dc7df, size: 139 bytes, params: 1, frame: 19
var r1;
var moduleValue;
const value = environment.__proto__;
const channel = ChannelStore.getChannel(env0_0);
const object = {};
object.canConnect = channel != null && (channel.isPrivate() || PermissionStore.can(Permissions.CONNECT, channel));
const value6 = channel == null;
if (value6) {
r1 = value6;
} else {
moduleValue = require(4800) /* metro dependency 4800: ChannelUtils */;
r1 = moduleValue.isChannelFull(channel, VoiceStateStore, GuildStore);
}
object.isAtMaxCapacity = r1;
return object;
}
}
}
function useCanConnect(a0) { // fn#118467, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15675:252, offset: 0x024dc77b, size: 100 bytes, params: 2, frame: 17
const env0_0 = a0;
return (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([ChannelStore, PermissionStore,
GuildStore, VoiceStateStore], _fun118468, [a0]);
}
function _fun118468() { // fn#118468, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15675:329, offset: 0x024dc7df, size: 139 bytes, params: 1, frame: 19
const value = environment.__proto__;
const channel = ChannelStore.getChannel(env0_0);
const object2 = {};
object2.canConnect = channel != null && (channel.isPrivate() || PermissionStore.can(Permissions.CONNECT, channel));
object2.isAtMaxCapacity = channel == null || (require(4800) /* metro dependency 4800: ChannelUtils */).isChannelFull(channel,
VoiceStateStore, GuildStore);
return object2;
}
global.__d(_fun118466, 15478, [1379, 1867, 3784, 4297, 482, 566, 4800,
2]) /* metro module 15478, dependencies: [1379, 1867, 3784, 4297, 482, 566, 4800, 2] */;
@@ -1,28 +1,33 @@
/* Metro module 15454; source: modules/voice_panel/native/hooks/useCanInviteMembers.tsx; dependencies: [1379, 3784, 482, 632, 2] */
import ChannelStore from '../../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import PermissionStore from '../../../../stores/PermissionStore.tsx'; /* Metro dependency 3784 */
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 UseStateFromStoresModule from '../../../../external/discord_common/js/packages/flux/useStateFromStores.tsx'; /* Metro dependency 632 */
function _fun118296(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118296, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15651:6, offset: 0x024d588a, size: 152 bytes, params: 8, frame: 19
let env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
const env0_4 = (require(482) /* metro dependency 482: Constants */).Permissions;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/hooks/useCanInviteMembers.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/hooks/useCanInviteMembers.tsx');
exports.useCanInviteMembers = function(a0) {
var env0_0 = a0;
return require(dependencyMap[3]).useStateFromStores([ChannelStore, PermissionStore], _fun118298, [a0]);
};
function useCanInviteMembers(a0) { // fn#118297, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15651:250, offset: 0x024d5922, size: 83 bytes, params: 2, frame: 17
const env0_0 = a0;
return (UseStateFromStoresModule).useStateFromStores([ChannelStore,
PermissionStore], _fun118298, [a0]);
function _fun118298() { // fn#118298, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15651:323, offset: 0x024d5975, size: 90 bytes, params: 1, frame: 15
const value = environment.__proto__;
const channel = ChannelStore.getChannel(env0_0);
return channel != null && PermissionStore.can(Permissions.CONNECT,
channel) && PermissionStore.can(Permissions.CREATE_INSTANT_INVITE, channel);
}
}
}
function useCanInviteMembers(a0) { // fn#118297, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15651:250, offset: 0x024d5922, size: 83 bytes, params: 2, frame: 17
const env0_0 = a0;
return (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([ChannelStore,
PermissionStore], _fun118298, [a0]);
}
function _fun118298() { // fn#118298, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15651:323, offset: 0x024d5975, size: 90 bytes, params: 1, frame: 15
const value = environment.__proto__;
const channel = ChannelStore.getChannel(env0_0);
return channel != null && PermissionStore.can(Permissions.CONNECT,
channel) && PermissionStore.can(Permissions.CREATE_INSTANT_INVITE, channel);
}
global.__d(_fun118296, 15454, [1379, 3784, 482, 632,
2]) /* metro module 15454, dependencies: [1379, 3784, 482, 632, 2] */;
@@ -1,23 +1,27 @@
/* Metro module 15482; source: modules/voice_panel/native/hooks/useChatBadge.tsx; dependencies: [4605, 566, 2] */
import ReadStateStore from '../../../../stores/ReadStateStore.tsx'; /* Metro dependency 4605 */
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 */
function _fun118474(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118474, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15679:6, offset: 0x024dcbf3, size: 114 bytes, params: 8, frame: 18
let env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const readStateStore = importDefault(4605) /* metro dependency 4605: ReadStateStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/hooks/useChatBadge.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/hooks/useChatBadge.tsx');
exports.default = function(a0) {
var env0_0 = a0;
return require(dependencyMap[1]).useStateFromStores([ReadStateStore], _fun118476);
};
function useChatBadge(a0) { // fn#118475, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15679:199, offset: 0x024dcc65, size: 66 bytes, params: 2, frame: 14
const env0_0 = a0;
return (FluxModule).useStateFromStores([ReadStateStore], _fun118476);
function _fun118476() { // fn#118476, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15679:263, offset: 0x024dcca7, size: 71 bytes, params: 1, frame: 13
const value = environment.__proto__;
return ReadStateStore.getMentionCount(env0_0) > 0 ? 'mention' : ReadStateStore.hasUnread(env0_0) ? 'unread' : null;
}
}
}
function useChatBadge(a0) { // fn#118475, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15679:199, offset: 0x024dcc65, size: 66 bytes, params: 2, frame: 14
const env0_0 = a0;
return (require(566) /* metro dependency 566: flux */).useStateFromStores([ReadStateStore], _fun118476);
}
function _fun118476() { // fn#118476, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15679:263, offset: 0x024dcca7, size: 71 bytes, params: 1, frame: 13
const value = environment.__proto__;
return ReadStateStore.getMentionCount(env0_0) > 0 ? 'mention' : ReadStateStore.hasUnread(env0_0) ? 'unread' : null;
}
global.__d(_fun118474, 15482, [4605, 566, 2]) /* metro module 15482, dependencies: [4605, 566, 2] */;
@@ -1,40 +1,45 @@
/* Metro module 15517; source: modules/voice_panel/native/hooks/useConsoleConnectingInfo.tsx; dependencies: [4295, 4296, 9325, 632, 15518, 9436, 15519, 15520, 2] */
import GameConsoleStore from '../../../game_console/GameConsoleStore.tsx'; /* Metro dependency 4295 */
import SessionsStore from '../../../../stores/SessionsStore.tsx'; /* Metro dependency 4296 */
import UseVoiceStateForRemoteSession from '../../../game_console/hooks/useVoiceStateForRemoteSession.tsx'; /* Metro dependency 9325 */
import UseShouldDisplayCancelConsoleTransfer from '../../../game_console/native/useShouldDisplayCancelConsoleTransfer.tsx'; /* Metro dependency 15518 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun118832(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118832, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15714:6, offset: 0x024f0bc3, size: 134 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const gameConsoleStore = importDefault(4295) /* metro dependency 4295: GameConsoleStore */;
const sessionsStore = importDefault(4296) /* metro dependency 4296: SessionsStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/hooks/useConsoleConnectingInfo.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/hooks/useConsoleConnectingInfo.tsx');
exports.default = useConsoleConnectingInfo;
function useConsoleConnectingInfo(a0) { // fn#118833, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15714:221, offset: 0x024f0c49, size: 372 bytes, params: 2, frame: 23
const value2 = undefined;
const value3 = (UseVoiceStateForRemoteSession)();
const value4 = (value3 == null ? value2 : value3.channelId) === a0;
const awaitingRemoteSessionInfo = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([GameConsoleStore],
function() {
return GameConsoleStore.getAwaitingRemoteSessionInfo();
});
const sessionById = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([SessionsStore],
_fun118835);
const r3 = (awaitingRemoteSessionInfo == null ? value2 : awaitingRemoteSessionInfo.type) ?? (sessionById == null ? value2 : sessionById.clientInfo.os) ?? '';
const value6 = (UseShouldDisplayCancelConsoleTransfer)(awaitingRemoteSessionInfo);
object = {};
object.isConnectingToConsole = (awaitingRemoteSessionInfo == null ? value2 : awaitingRemoteSessionInfo.channelId) === a0;
object.isConnectingOrConnectedToConsole = (awaitingRemoteSessionInfo == null ? value2 : awaitingRemoteSessionInfo.channelId) === a0 || value4;
object.icon = (importDefault(9436) /* metro dependency 9436: getConsoleIcon */)(r3);
object.text = (require(15519) /* metro dependency 15519: getConsoleConnectingText */).getConsoleConnectingText(sessionById,
awaitingRemoteSessionInfo, value4);
object.color = (importDefault(15520) /* metro dependency 15520: getConsoleColor */)(r3);
object.displayCancel = value6;
return object;
function _fun118835() { // fn#118835, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15714:420, offset: 0x024f0dd0, size: 62 bytes, params: 1, frame: 14
const value = environment.__proto__;
return SessionsStore.getSessionById(env0_0?.sessionId ?? '');
}
}
}
function useConsoleConnectingInfo(a0) { // fn#118833, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15714:221, offset: 0x024f0c49, size: 372 bytes, params: 2, frame: 23
var object2;
const value2 = undefined;
const value3 = (importDefault(9325) /* metro dependency 9325: useVoiceStateForRemoteSession */)();
const value4 = (value3 == null ? value2 : value3.channelId) === a0;
const awaitingRemoteSessionInfo = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([GameConsoleStore],
function() {
return GameConsoleStore.getAwaitingRemoteSessionInfo();
});
const sessionById = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([SessionsStore],
_fun118835);
const r3 = (awaitingRemoteSessionInfo == null ? value2 : awaitingRemoteSessionInfo.type) ?? (sessionById == null ? value2 : sessionById.clientInfo.os) ?? '';
const value6 = (importDefault(15518) /* metro dependency 15518: useShouldDisplayCancelConsoleTransfer */)(awaitingRemoteSessionInfo);
object2 = {};
object2.isConnectingToConsole = (awaitingRemoteSessionInfo == null ? value2 : awaitingRemoteSessionInfo.channelId) === a0;
object2.isConnectingOrConnectedToConsole = (awaitingRemoteSessionInfo == null ? value2 : awaitingRemoteSessionInfo.channelId) === a0 || value4;
object2.icon = (importDefault(9436) /* metro dependency 9436: getConsoleIcon */)(r3);
object2.text = (require(15519) /* metro dependency 15519: getConsoleConnectingText */).getConsoleConnectingText(sessionById,
awaitingRemoteSessionInfo, value4);
object2.color = (importDefault(15520) /* metro dependency 15520: getConsoleColor */)(r3);
object2.displayCancel = value6;
return object2;
}
function _fun118835() { // fn#118835, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15714:420, offset: 0x024f0dd0, size: 62 bytes, params: 1, frame: 14
const value = environment.__proto__;
return SessionsStore.getSessionById(env0_0?.sessionId ?? '');
}
global.__d(_fun118832, 15517, [4295, 4296, 9325, 632, 15518, 9436, 15519, 15520,
2]) /* metro module 15517, dependencies: [4295, 4296, 9325, 632, 15518, 9436, 15519, 15520, 2] */;
@@ -1,55 +1,62 @@
/* Metro module 15547; source: modules/voice_panel/native/hooks/useControlAccessoryHeight.tsx; dependencies: [31, 11794, 1357, 15517, 4017, 15522, 15410, 15521, 2] */
import MobileVisualRefreshExperiment from '../../../themes/experiments/MobileVisualRefreshExperiment.tsx'; /* Metro dependency 1357 */
import VoicePanelStateContext from '../VoicePanelStateContext.tsx'; /* Metro dependency 11794 */
import UseConsoleConnectingInfo from './useConsoleConnectingInfo.tsx'; /* Metro dependency 15517 */
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 ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as VoicePanelFloatingCTAUtilsModule from '../controls/utils/VoicePanelFloatingCTAUtils.tsx'; /* Metro dependency 15410 */
import * as VoicePanelFloatingCTAContainerModule from '../controls/VoicePanelFloatingCTAContainer.tsx'; /* Metro dependency 15521 */
function _fun118978(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118978, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15744:6, offset: 0x024f7978, size: 137 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
object = {code: 'function useControlAccessoryHeightTsx1(){const{consoleStatusHeight,floatingCTAHeight}=this.__closure;return consoleStatusHeight.get()+floatingCTAHeight.get();}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/hooks/useControlAccessoryHeight.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/hooks/useControlAccessoryHeight.tsx');
exports.default = useControlAccessoryHeight;
function useControlAccessoryHeight() { // fn#118979, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15744:383, offset: 0x024f7a01, size: 349 bytes, params: 1, frame: 24
const useContext = ReactModule.useContext;
const channelId = Reflect.apply(useContext, ReactModule,
[VoicePanelStateContext]).channelId;
const value2 = (MobileVisualRefreshExperiment)('useControlAccessoryHeight');
const isConnectingOrConnectedToConsole = (UseConsoleConnectingInfo)(channelId).isConnectingOrConnectedToConsole;
const value3 = (ReanimatedRexportModule).useSharedValue(0);
ReactModule.useEffect(_fun118980, [value3, isConnectingOrConnectedToConsole]);
const value4 = (VoicePanelFloatingCTAUtilsModule).useShouldShowFloatingCTA(channelId);
const value5 = (ReanimatedRexportModule).useSharedValue(0);
const floatingCTATotalViewHeight = (VoicePanelFloatingCTAContainerModule).getFloatingCTATotalViewHeight(value2);
const floatingCTATotalViewHeight2 = floatingCTATotalViewHeight;
ReactModule.useEffect(_fun118981, [value5, value4, floatingCTATotalViewHeight]);
const useDerivedValue = ReanimatedRexportModule.useDerivedValue;
const useControlAccessoryHeightC2 = useControlAccessoryHeightC;
useControlAccessoryHeightC2.__closure = {consoleStatusHeight: value3, floatingCTAHeight: value5};
useControlAccessoryHeightC2.__workletHash = 7974849446653;
useControlAccessoryHeightC2.__initData = floatingCTATotalViewHeight2;
return Reflect.apply(useDerivedValue, ReanimatedRexportModule, [useControlAccessoryHeightC2]);
function _fun118980() { // fn#118980, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15744:584, offset: 0x024f7b5e, size: 61 bytes, params: 1, frame: 14
const binding = env0_1;
const set = binding.set;
const CONSOLE_STATUS_HEIGHT = isConnectingOrConnectedToConsole ? (require(15522) /* metro dependency 15522: VoicePanelConsoleStatus */).CONSOLE_STATUS_HEIGHT : 0;
Reflect.apply(set, binding, [CONSOLE_STATUS_HEIGHT]);
}
function _fun118981() { // fn#118981, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15744:774, offset: 0x024f7b9b, size: 34 bytes, params: 1, frame: 13
ReactModule.set(env0_2 ? env0_4 : 0);
}
function useControlAccessoryHeightC() { // fn#118982, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15744:831, owner: useControlAccessoryHeight.c, offset: 0x024f7bbd, size: 35 bytes, params: 1, frame: 10
let binding = env0_1;
let get = binding.get;
const value2 = Reflect.apply(get, binding, []);
binding = ReactModule;
get = binding.get;
return value2 + Reflect.apply(get, binding, []);
}
}
}
function useControlAccessoryHeight() { // fn#118979, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15744:383, offset: 0x024f7a01, size: 349 bytes, params: 1, frame: 24
const binding = env0_3;
const useContext = binding.useContext;
const channelId = Reflect.apply(useContext, binding,
[importDefault(11794) /* metro dependency 11794: VoicePanelStateContext */]).channelId;
const value2 = (importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('useControlAccessoryHeight');
const isConnectingOrConnectedToConsole = (importDefault(15517) /* metro dependency 15517: useConsoleConnectingInfo */)(channelId).isConnectingOrConnectedToConsole;
const value3 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
binding.useEffect(_fun118980, [value3, isConnectingOrConnectedToConsole]);
const value4 = (require(15410) /* metro dependency 15410: VoicePanelFloatingCTAUtils */).useShouldShowFloatingCTA(channelId);
const value5 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
const floatingCTATotalViewHeight = (require(15521) /* metro dependency 15521: VoicePanelFloatingCTAContainer */).getFloatingCTATotalViewHeight(value2);
const env0_4 = floatingCTATotalViewHeight;
binding.useEffect(_fun118981, [value5, value4, floatingCTATotalViewHeight]);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useDerivedValue = reanimatedRexportModule.useDerivedValue;
const closure = useControlAccessoryHeightC;
closure.__closure = {consoleStatusHeight: value3, floatingCTAHeight: value5};
closure.__workletHash = 7974849446653;
closure.__initData = env0_4;
return Reflect.apply(useDerivedValue, reanimatedRexportModule, [closure]);
}
function _fun118980() { // fn#118980, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15744:584, offset: 0x024f7b5e, size: 61 bytes, params: 1, frame: 14
const binding = env0_1;
const set = binding.set;
const CONSOLE_STATUS_HEIGHT = isConnectingOrConnectedToConsole ? (require(15522) /* metro dependency 15522: VoicePanelConsoleStatus */).CONSOLE_STATUS_HEIGHT : 0;
Reflect.apply(set, binding, [CONSOLE_STATUS_HEIGHT]);
}
function _fun118981() { // fn#118981, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15744:774, offset: 0x024f7b9b, size: 34 bytes, params: 1, frame: 13
const binding = env0_3;
binding.set(env0_2 ? env0_4 : 0);
}
function useControlAccessoryHeightC() { // fn#118982, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15744:831, owner: useControlAccessoryHeight.c, offset: 0x024f7bbd, size: 35 bytes, params: 1, frame: 10
let binding = env0_1;
let get = binding.get;
const value2 = Reflect.apply(get, binding, []);
binding = env0_3;
get = binding.get;
return value2 + Reflect.apply(get, binding, []);
}
global.__d(_fun118978, 15547, [31, 11794, 1357, 15517, 4017, 15522, 15410, 15521,
2]) /* metro module 15547, dependencies: [31, 11794, 1357, 15517, 4017, 15522, 15410, 15521, 2] */;
@@ -1,64 +1,67 @@
/* Metro module 15523; source: modules/voice_panel/native/hooks/useControlsTranslation.tsx; dependencies: [31, 11795, 11798, 11794, 4017, 4577, 2] */
import VoicePanelStateContext from '../VoicePanelStateContext.tsx'; /* Metro dependency 11794 */
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 ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as SpringModule from '../../../../design/animation/reanimated/spring/spring.tsx'; /* Metro dependency 4577 */
import * as VoicePanelConstantsModule from '../../VoicePanelConstants.tsx'; /* Metro dependency 11795 */
import * as VoicePanelCardConstantsModule from '../card/VoicePanelCardConstants.tsx'; /* Metro dependency 11798 */
function _fun118864(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118864, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15720:6, offset: 0x024f2369, size: 181 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(11795) /* metro dependency 11795: VoicePanelConstants */).MODE_CHANGE_PHYSICS;
const env0_5 = (require(11798) /* metro dependency 11798: VoicePanelCardConstants */).CALL_TILE_GUTTER;
object = {code: 'function useControlsTranslationTsx1(){const{withSpring,wrapperSpecs,MODE_CHANGE_PHYSICS,useReducedMotion,CALL_TILE_GUTTER,viewHeight}=this.__closure;return{transform:[{translateX:withSpring(wrapperSpecs.get().x,MODE_CHANGE_PHYSICS)},{translateY:withSpring(!useReducedMotion.get()&&wrapperSpecs.get().hidden?wrapperSpecs.get().height+CALL_TILE_GUTTER+viewHeight.get():wrapperSpecs.get().y,MODE_CHANGE_PHYSICS)}]};}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/hooks/useControlsTranslation.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/hooks/useControlsTranslation.tsx');
exports.default = useControlsTranslation;
}
function useControlsTranslation(a0, a1, a2) { // fn#118865, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15720:691, offset: 0x024f241e, size: 192 bytes, params: 4, frame: 20
const env0_0 = a1;
const env0_1 = a2;
const binding = env0_3;
const useContext = binding.useContext;
const useReducedMotion = Reflect.apply(useContext, binding,
[importDefault(11794) /* metro dependency 11794: VoicePanelStateContext */]).useReducedMotion;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = useControlsTranslationS;
const object2 = {};
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object2.wrapperSpecs = a1;
object2.MODE_CHANGE_PHYSICS = MODE_CHANGE_PHYSICS;
object2.useReducedMotion = useReducedMotion;
object2.CALL_TILE_GUTTER = CALL_TILE_GUTTER;
object2.viewHeight = a2;
closure.__closure = object2;
closure.__workletHash = 11281989557090;
closure.__initData = env0_6;
return Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
}
function useControlsTranslationS() { // fn#118866, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15720:813, owner: useControlsTranslation.S, offset: 0x024f24de, size: 220 bytes, params: 1, frame: 21
var r4;
var value3;
const springModule = require(4577) /* metro dependency 4577: spring */;
let withSpring = springModule.withSpring;
let get = require.get;
const items2 = [{translateX: Reflect.apply(withSpring, springModule, [Reflect.apply(get, require, []).x,
MODE_CHANGE_PHYSICS])}];
const moduleValue2 = springModule;
withSpring = moduleValue2.withSpring;
get = useReducedMotion.get;
if (Reflect.apply(get, useReducedMotion, [])) {
r4 = require.get().y;
} else {
get = require.get;
if (Reflect.apply(get, require, []).hidden) {
get = require.get;
value3 = Reflect.apply(get, require, []).height + CALL_TILE_GUTTER;
get = importDefault.get;
r4 = value3 + Reflect.apply(get, importDefault, []);
} else {
r4 = require.get().y;
function useControlsTranslation(a0, a1, a2) { // fn#118865, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15720:691, offset: 0x024f241e, size: 192 bytes, params: 4, frame: 20
const env0_0 = a1;
const env0_1 = a2;
const useContext = ReactModule.useContext;
const useReducedMotion = Reflect.apply(useContext, ReactModule,
[VoicePanelStateContext]).useReducedMotion;
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
const useControlsTranslationS2 = useControlsTranslationS;
const object = {};
object.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object.wrapperSpecs = a1;
object.MODE_CHANGE_PHYSICS = MODE_CHANGE_PHYSICS;
object.useReducedMotion = useReducedMotion;
object.CALL_TILE_GUTTER = CALL_TILE_GUTTER;
object.viewHeight = a2;
useControlsTranslationS2.__closure = object;
useControlsTranslationS2.__workletHash = 11281989557090;
useControlsTranslationS2.__initData = env0_6;
return Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [useControlsTranslationS2]);
function useControlsTranslationS() { // fn#118866, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15720:813, owner: useControlsTranslation.S, offset: 0x024f24de, size: 220 bytes, params: 1, frame: 21
var r4;
var value3;
let withSpring = SpringModule.withSpring;
let get = require.get;
const items2 = [{translateX: Reflect.apply(withSpring, SpringModule, [Reflect.apply(get, require, []).x,
MODE_CHANGE_PHYSICS])}];
withSpring = SpringModule.withSpring;
get = useReducedMotion.get;
if (Reflect.apply(get, useReducedMotion, [])) {
r4 = require.get().y;
} else {
get = require.get;
if (Reflect.apply(get, require, []).hidden) {
get = require.get;
value3 = Reflect.apply(get, require, []).height + CALL_TILE_GUTTER;
get = importDefault.get;
r4 = value3 + Reflect.apply(get, importDefault, []);
} else {
r4 = require.get().y;
}
}
items2[1] = {translateY: Reflect.apply(withSpring, SpringModule, [r4, MODE_CHANGE_PHYSICS])};
return {transform: items2};
}
}
items2[1] = {translateY: Reflect.apply(withSpring, moduleValue2, [r4, MODE_CHANGE_PHYSICS])};
return {transform: items2};
}
global.__d(_fun118864, 15523, [31, 11795, 11798, 11794, 4017, 4577,
2]) /* metro module 15523, dependencies: [31, 11795, 11798, 11794, 4017, 4577, 2] */;
@@ -1,41 +1,43 @@
/* Metro module 15413; source: modules/voice_panel/native/hooks/useInviteMembersCallback.tsx; dependencies: [31, 1379, 661, 4007, 9151, 2] */
import ChannelStore from '../../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
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 ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
function _fun117909(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117909, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15610:6, offset: 0x024c4d59, size: 165 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importAll(31) /* metro dependency 31 */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_4 = constantsModule.AnalyticsPages;
const env0_5 = constantsModule.InstantInviteSources;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/hooks/useInviteMembersCallback.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/hooks/useInviteMembersCallback.tsx');
exports.useInviteMembersCallback = useInviteMembersCallback;
}
function useInviteMembersCallback(a0) { // fn#117910, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15610:292, offset: 0x024c4dfe, size: 44 bytes, params: 2, frame: 14
const env0_0 = a0;
return env0_2.useCallback(_fun117911, [a0]);
}
function _fun117911() { // fn#117911, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15610:351, offset: 0x024c4e2a, size: 144 bytes, params: 1, frame: 18
var r1;
var r0;
var moduleValue2;
const value = environment.__proto__;
const channel = ChannelStore.getChannel(env0_0);
const value4 = null;
if (value4 != channel) {
if (channel.isPrivate()) {
moduleValue2 = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
r1 = moduleValue2.navigateToNewGroupDM(channel.id, AnalyticsPages.CHANNEL_CALL);
} else {
r1 = (require(9151) /* metro dependency 9151: InstantInviteUtils */).showInstantInviteActionSheet(channel,
{source: InstantInviteSources.VOICE_CHANNEL});
function useInviteMembersCallback(a0) { // fn#117910, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15610:292, offset: 0x024c4dfe, size: 44 bytes, params: 2, frame: 14
const env0_0 = a0;
return ReactModule.useCallback(_fun117911, [a0]);
function _fun117911() { // fn#117911, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15610:351, offset: 0x024c4e2a, size: 144 bytes, params: 1, frame: 18
var r1;
var r0;
var moduleValue2;
const value = environment.__proto__;
const channel = ChannelStore.getChannel(env0_0);
const value4 = null;
if (value4 != channel) {
if (channel.isPrivate()) {
moduleValue2 = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
r1 = moduleValue2.navigateToNewGroupDM(channel.id, AnalyticsPages.CHANNEL_CALL);
} else {
r1 = (require(9151) /* metro dependency 9151: InstantInviteUtils */).showInstantInviteActionSheet(channel,
{source: InstantInviteSources.VOICE_CHANNEL});
}
r0 = r1;
} else {
r0 = value4;
}
return r0;
}
r0 = r1;
} else {
r0 = value4;
}
return r0;
}
global.__d(_fun117909, 15413, [31, 1379, 661, 4007, 9151,
2]) /* metro module 15413, dependencies: [31, 1379, 661, 4007, 9151, 2] */;
@@ -1,45 +1,53 @@
/* Metro module 15390; source: modules/voice_panel/native/hooks/useIsConnectedToVoiceChannel.tsx; dependencies: [1226, 4294, 4297, 661, 566, 2] */
import AuthenticationStore from '../../../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */
import RTCConnectionStore from '../../../../stores/RTCConnectionStore.tsx'; /* Metro dependency 4294 */
import VoiceStateStore from '../../../../stores/VoiceStateStore.tsx'; /* Metro dependency 4297 */
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 */
function _fun117666(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117666, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15587:6, offset: 0x024bd316, size: 168 bytes, params: 8, frame: 19
let env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const rtcConnectionStore = importDefault(4294) /* metro dependency 4294: RTCConnectionStore */;
const voiceStateStore = importDefault(4297) /* metro dependency 4297: VoiceStateStore */;
const env0_5 = (require(661) /* metro dependency 661: Constants */).RTCConnectionStates;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/hooks/useIsConnectedToVoiceChannel.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/hooks/useIsConnectedToVoiceChannel.tsx');
exports.default = function(a0) {
var env0_0 = a0;
return require(dependencyMap[4]).useStateFromStores([RTCConnectionStore, VoiceStateStore, AuthenticationStore],
_fun117668);
};
}
function useIsConnectedToVoiceChannel_117667(a0) { // fn#117667, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15587:265, offset: 0x024bd3be, size: 82 bytes, params: 2, frame: 15
const env0_0 = a0;
return (require(566) /* metro dependency 566: flux */).useStateFromStores([RTCConnectionStore, VoiceStateStore,
AuthenticationStore], _fun117668);
}
function _fun117668() { // fn#117668, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15587:349, offset: 0x024bd410, size: 132 bytes, params: 1, frame: 15
const channelId = RTCConnectionStore.getChannelId();
const r4 = env0_0 ?? channelId;
if (r4 !== channelId) {
return false;
}
const isInChannel = VoiceStateStore.isInChannel;
const getId = AuthenticationStore.getId;
if (!Reflect.apply(isInChannel, VoiceStateStore, [r4, Reflect.apply(getId, AuthenticationStore, [])])) {
var state = RTCConnectionStore.getState();
var DISCONNECTED = RTCConnectionStates.DISCONNECTED;
if (DISCONNECTED === state) {
return false;
}
var NO_ROUTE = RTCConnectionStates.NO_ROUTE;
if (NO_ROUTE === state) {
return false;
function useIsConnectedToVoiceChannel_117667(a0) { // fn#117667, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15587:265, offset: 0x024bd3be, size: 82 bytes, params: 2, frame: 15
const env0_0 = a0;
return (FluxModule).useStateFromStores([RTCConnectionStore, VoiceStateStore,
AuthenticationStore], _fun117668);
function _fun117668() { // fn#117668, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15587:349, offset: 0x024bd410, size: 132 bytes, params: 1, frame: 15
const channelId = RTCConnectionStore.getChannelId();
const r4 = env0_0 ?? channelId;
if (r4 !== channelId) {
return false;
}
const voiceStateStoreBinding = VoiceStateStore;
const isInChannel = voiceStateStoreBinding.isInChannel;
const authenticationStoreBinding = AuthenticationStore;
const getId = authenticationStoreBinding.getId;
if (!Reflect.apply(isInChannel, voiceStateStoreBinding, [r4, Reflect.apply(getId, authenticationStoreBinding,
[])])) {
var state = RTCConnectionStore.getState();
var DISCONNECTED = RTCConnectionStates.DISCONNECTED;
if (DISCONNECTED === state) {
return false;
}
var NO_ROUTE = RTCConnectionStates.NO_ROUTE;
if (NO_ROUTE === state) {
return false;
}
}
return true;
}
}
return true;
}
global.__d(_fun117666, 15390, [1226, 4294, 4297, 661, 566,
2]) /* metro module 15390, dependencies: [1226, 4294, 4297, 661, 566, 2] */;
@@ -1,48 +1,55 @@
/* Metro module 15542; source: modules/voice_panel/native/hooks/useSoundboardConfig.tsx; dependencies: [31, 1379, 15390, 3968, 1365, 15415, 6982, 2] */
import ChannelStore from '../../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import CanChannelUseSoundboard from '../../../soundboard/canChannelUseSoundboard.tsx'; /* Metro dependency 6982 */
import UseIsConnectedToVoiceChannel from './useIsConnectedToVoiceChannel.tsx'; /* Metro dependency 15390 */
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 Dismissible_contentModule from '../../../../external/discord_common/js/packages/protos/discord_protos/discord_users/v1/dismissible_content.tsx'; /* Metro dependency 1365 */
import * as DismissibleContentUnsafeUtilsModule from '../../../dismissible_content/DismissibleContentUnsafeUtils.tsx'; /* Metro dependency 3968 */
function _fun118965(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118965, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15739:6, offset: 0x024f6ff1, size: 173 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/hooks/useSoundboardConfig.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/hooks/useSoundboardConfig.tsx');
exports.default = useSoundboardConfig;
exports.SoundboardButtonLocation = {VOICE_CONTROLS: 'call control drawer',
VOICE_PANEL_CONTROLS: 'voice panel controls'};
}
function useSoundboardConfig(a0, a1) { // fn#118966, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15739:329, offset: 0x024f709e, size: 220 bytes, params: 3, frame: 20
const env0_0 = a0;
const env0_1 = a1;
const value2 = (UseIsConnectedToVoiceChannel)(a0);
const UNSAFE_useIsDismissibleContentDismissed = DismissibleContentUnsafeUtilsModule.UNSAFE_useIsDismissibleContentDismissed;
const DismissibleContent = (Dismissible_contentModule).DismissibleContent;
const SOUNDBOARD_MOBILE_NEW_BADGE = DismissibleContent.SOUNDBOARD_MOBILE_NEW_BADGE;
const value3 = !Reflect.apply(UNSAFE_useIsDismissibleContentDismissed, DismissibleContentUnsafeUtilsModule,
[SOUNDBOARD_MOBILE_NEW_BADGE]);
const object = {};
object.visible = value2 && (a1 === env0_5.VOICE_CONTROLS || a1 === env0_5.VOICE_PANEL_CONTROLS);
object.handlePress = ReactModule.useCallback(_fun118967, [a0, a1]);
object.disabled = ReactModule.useMemo(_fun118968, [a0]);
object.showIndicator = value3;
return object;
function _fun118967() { // fn#118967, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15739:583, offset: 0x024f717a, size: 82 bytes, params: 1, frame: 13
const value = environment.__proto__;
const channel = ChannelStore.getChannel(env0_0);
if (channel != null) {
(require(15415) /* metro dependency 15415: SoundboardActionCreators */).showSoundboardSoundPickerActionSheet({channel: channel,
analyticsSource: require});
}
}
function useSoundboardConfig(a0, a1) { // fn#118966, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15739:329, offset: 0x024f709e, size: 220 bytes, params: 3, frame: 20
const env0_0 = a0;
const env0_1 = a1;
const value2 = (importDefault(15390) /* metro dependency 15390: useIsConnectedToVoiceChannel */)(a0);
const dismissibleContentUnsafeUtilsModule = require(3968) /* metro dependency 3968: DismissibleContentUnsafeUtils */;
const UNSAFE_useIsDismissibleContentDismissed = dismissibleContentUnsafeUtilsModule.UNSAFE_useIsDismissibleContentDismissed;
const DismissibleContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent;
const SOUNDBOARD_MOBILE_NEW_BADGE = DismissibleContent.SOUNDBOARD_MOBILE_NEW_BADGE;
const value3 = !Reflect.apply(UNSAFE_useIsDismissibleContentDismissed, dismissibleContentUnsafeUtilsModule,
[SOUNDBOARD_MOBILE_NEW_BADGE]);
const object2 = {};
object2.visible = value2 && (a1 === env0_5.VOICE_CONTROLS || a1 === env0_5.VOICE_PANEL_CONTROLS);
const binding = env0_3;
object2.handlePress = binding.useCallback(_fun118967, [a0, a1]);
object2.disabled = binding.useMemo(_fun118968, [a0]);
object2.showIndicator = value3;
return object2;
}
function _fun118968() { // fn#118968, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15739:724, offset: 0x024f71cc, size: 56 bytes, params: 1, frame: 13
const defaultImport = CanChannelUseSoundboard;
const channelStoreBinding = ChannelStore;
const getChannel = channelStoreBinding.getChannel;
return !defaultImport(Reflect.apply(getChannel, channelStoreBinding, [env0_0]));
}
function _fun118967() { // fn#118967, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15739:583, offset: 0x024f717a, size: 82 bytes, params: 1, frame: 13
const value = environment.__proto__;
const channel = ChannelStore.getChannel(env0_0);
if (channel != null) {
(require(15415) /* metro dependency 15415: SoundboardActionCreators */).showSoundboardSoundPickerActionSheet({channel: channel,
analyticsSource: require});
}
}
function _fun118968() { // fn#118968, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15739:724, offset: 0x024f71cc, size: 56 bytes, params: 1, frame: 13
const defaultImport = importDefault(6982) /* metro dependency 6982: canChannelUseSoundboard */;
const getChannel = ChannelStore.getChannel;
return !defaultImport(Reflect.apply(getChannel, ChannelStore, [env0_0]));
}
global.__d(_fun118965, 15542, [31, 1379, 15390, 3968, 1365, 15415, 6982,
2]) /* metro module 15542, dependencies: [31, 1379, 15390, 3968, 1365, 15415, 6982, 2] */;
@@ -1,156 +1,164 @@
/* Metro module 15474; source: modules/voice_panel/native/hooks/useSpeakerTooltips.tsx; dependencies: [57, 31, 15471, 11793, 1376, 33, 15475, 15414, 7713, 11794, 4017, 7013, 15447, 1244, 1365, 15477, 8543, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import VoicePanelStateContext from '../VoicePanelStateContext.tsx'; /* Metro dependency 11794 */
import UseChannelFloatingCTAContent from '../../../video_calls/native/useChannelFloatingCTAContent.tsx'; /* Metro dependency 15414 */
import UseConsoleConnectedAccountForVoiceUpsell from '../../../game_console/useConsoleConnectedAccountForVoiceUpsell.tsx'; /* Metro dependency 15475 */
import VoicePanelConsoleFacepile from '../header/VoicePanelConsoleFacepile.tsx'; /* Metro dependency 15477 */
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 IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as DismissibleContentConstantsModule from '../../../dismissible_content/DismissibleContentConstants.tsx'; /* Metro dependency 1376 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as VoicePanelUtilsNativeModule from '../../VoicePanelUtils.native.tsx'; /* Metro dependency 7713 */
import * as UseCoachmarkNativeModule from '../../../../design/components/Coachmark/native/useCoachmark.native.tsx'; /* Metro dependency 8543 */
import * as VoicePanelControlsConstantsModule from '../controls/VoicePanelControlsConstants.tsx'; /* Metro dependency 11793 */
import * as ConsoleVoiceUpsellStoreModule from '../../../game_console/ConsoleVoiceUpsellStore.tsx'; /* Metro dependency 15471 */
function _fun118437(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118437, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15671:6, offset: 0x024db841, size: 277 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const consoleVoiceUpsellStoreModule = require(15471) /* metro dependency 15471: ConsoleVoiceUpsellStore */;
const env0_5 = consoleVoiceUpsellStoreModule.setVoiceUpsellDismissed;
const env0_6 = consoleVoiceUpsellStoreModule.useConsoleVoiceUpsellStore;
const env0_7 = (require(11793) /* metro dependency 11793: VoicePanelControlsConstants */).VoicePanelControlsModes;
const env0_8 = (require(1376) /* metro dependency 1376: DismissibleContentConstants */).ContentDismissActionType;
const env0_9 = (require(33) /* metro dependency 33 */).jsx;
object = {code: 'function useSpeakerTooltipsTsx1(){const{controlsSpecs}=this.__closure;return controlsSpecs.get().mode;}'};
object = {code: 'function useSpeakerTooltipsTsx2(currentControlsMode,previous){const{runOnJS,setIsShowingControls,VoicePanelControlsModes}=this.__closure;if(currentControlsMode===previous)return;runOnJS(setIsShowingControls)(currentControlsMode===VoicePanelControlsModes.FLOATING_DEFAULT);}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/hooks/useSpeakerTooltips.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/hooks/useSpeakerTooltips.tsx');
exports.default = useSpeakerTooltips;
}
function useCoachmarkHelper(a0, a1, a2) { // fn#118438, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15671:668, offset: 0x024db956, size: 126 bytes, params: 4, frame: 17
const env0_0 = a1;
const env0_1 = a2;
env0_4.useEffect(_fun118440, [a2, env0_4.useCallback(function() {
if (require.visible) {
require.onDismiss();
function useCoachmarkHelper(a0, a1, a2) { // fn#118438, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15671:668, offset: 0x024db956, size: 126 bytes, params: 4, frame: 17
const env0_0 = a1;
const env0_1 = a2;
ReactModule.useEffect(_fun118440, [a2, ReactModule.useCallback(function() {
if (require.visible) {
require.onDismiss();
}
}, [a1])]);
(UseCoachmarkNativeModule).useCoachmark(a0, a1);
function _fun118440() { // fn#118440, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15671:774, offset: 0x024db9f6, size: 24 bytes, params: 1, frame: 9
if (!importDefault) {
env0_2();
}
}
}, [a1])]);
(require(8543) /* metro dependency 8543: useCoachmarkNative */).useCoachmark(a0, a1);
}
function useSpeakerTooltips(a0, a1) { // fn#118441, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15671:922, offset: 0x024dba0e, size: 632 bytes, params: 3, frame: 32
var object2;
let value = a1;
const value3 = (importDefault(15475) /* metro dependency 15475: useConsoleConnectedAccountForVoiceUpsell */)();
const voiceUpsellDismissed = useConsoleVoiceUpsellStore().voiceUpsellDismissed;
const value4 = (importDefault(15414) /* metro dependency 15414: useChannelFloatingCTAContent */)(undefined);
const env0_3 = value4;
const value5 = (require(7713) /* metro dependency 7713: VoicePanelUtilsNative */).useIsVoicePanelFullscreen();
let binding = env0_4;
const useContext = binding.useContext;
const controlsSpecs = Reflect.apply(useContext, binding,
[importDefault(11794) /* metro dependency 11794: VoicePanelStateContext */]).controlsSpecs;
var env0_4 = controlsSpecs;
let [property, property2] = env0_3(env0_4.useState(true), 2);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedReaction = reanimatedRexportModule.useAnimatedReaction;
const closure = function() {
return controlsSpecs.get().mode;
};
closure.__closure = {controlsSpecs: controlsSpecs};
closure.__workletHash = 13952338295275;
closure.__initData = env0_10;
const closure2 = useSpeakerTooltipsS;
object2 = {};
object2.runOnJS = reanimatedRexportModule.runOnJS;
object2.setIsShowingControls = property2;
object2.VoicePanelControlsModes = VoicePanelControlsModes;
closure2.__closure = object2;
closure2.__workletHash = 5084069556209;
closure2.__initData = env0_11;
Reflect.apply(useAnimatedReaction, reanimatedRexportModule, [closure, closure2]);
const r3 = value && value5 && property;
binding = env0_4;
let useMemo = binding.useMemo;
value = Reflect.apply(useMemo, binding, [_fun118444, [r3, value4]]);
value = (require(7013) /* metro dependency 7013: useSelectedDismissibleContent */).useSelectedDismissibleContent(value);
value = env0_3(value, 2);
property = value[0];
const property3 = value[1];
value = (importDefault(15447) /* metro dependency 15447: useControlsLock */)();
const value8 = env0_4.useMemo(_fun118445, [r3, property3, property]);
binding = env0_4;
useMemo = binding.useMemo;
let visible = value8.visible;
const value9 = Reflect.apply(useMemo, binding, [_fun118448, [value3, r3, voiceUpsellDismissed, visible]]);
visible = value8.visible;
visible = !visible ? value9.visible : visible;
env0_4.useEffect(_fun118450, [visible, value]);
useCoachmarkHelper(a0, value8, r3);
useCoachmarkHelper(a0, value9, r3);
}
function _fun118440() { // fn#118440, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15671:774, offset: 0x024db9f6, size: 24 bytes, params: 1, frame: 9
if (!importDefault) {
env0_2();
}
}
function useSpeakerTooltipsS(a0, a1) { // fn#118443, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15671:1267, owner: useSpeakerTooltips.S, offset: 0x024dbc9d, size: 75 bytes, params: 3, frame: 14
var value;
if (a0 !== a1) {
value = environment.__proto__;
(require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS(env0_5)(a0 === VoicePanelControlsModes.FLOATING_DEFAULT);
function useSpeakerTooltips(a0, a1) { // fn#118441, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15671:922, offset: 0x024dba0e, size: 632 bytes, params: 3, frame: 32
let value = a1;
const value3 = (UseConsoleConnectedAccountForVoiceUpsell)();
const voiceUpsellDismissed = useConsoleVoiceUpsellStore().voiceUpsellDismissed;
const value4 = (UseChannelFloatingCTAContent)(undefined);
const env0_3 = value4;
const value5 = (VoicePanelUtilsNativeModule).useIsVoicePanelFullscreen();
let binding = controlsSpecs2;
const useContext = binding.useContext;
const controlsSpecs = Reflect.apply(useContext, binding,
[VoicePanelStateContext]).controlsSpecs;
var controlsSpecs2 = controlsSpecs;
let [property, property2] = env0_3(controlsSpecs2.useState(true), 2);
const useAnimatedReaction = ReanimatedRexportModule.useAnimatedReaction;
const closure = function() {
return controlsSpecs.get().mode;
};
closure.__closure = {controlsSpecs: controlsSpecs};
closure.__workletHash = 13952338295275;
closure.__initData = env0_10;
const useSpeakerTooltipsS2 = useSpeakerTooltipsS;
object = {};
object.runOnJS = ReanimatedRexportModule.runOnJS;
object.setIsShowingControls = property2;
object.VoicePanelControlsModes = VoicePanelControlsModes;
useSpeakerTooltipsS2.__closure = object;
useSpeakerTooltipsS2.__workletHash = 5084069556209;
useSpeakerTooltipsS2.__initData = env0_11;
Reflect.apply(useAnimatedReaction, ReanimatedRexportModule, [closure, useSpeakerTooltipsS2]);
const r3 = value && value5 && property;
binding = controlsSpecs2;
let useMemo = binding.useMemo;
value = Reflect.apply(useMemo, binding, [_fun118444, [r3, value4]]);
value = (require(7013) /* metro dependency 7013: useSelectedDismissibleContent */).useSelectedDismissibleContent(value);
value = env0_3(value, 2);
property = value[0];
const property3 = value[1];
value = (importDefault(15447) /* metro dependency 15447: useControlsLock */)();
const value8 = controlsSpecs2.useMemo(_fun118445, [r3, property3, property]);
binding = controlsSpecs2;
useMemo = binding.useMemo;
let visible = value8.visible;
const value9 = Reflect.apply(useMemo, binding, [_fun118448, [value3, r3, voiceUpsellDismissed, visible]]);
visible = value8.visible;
visible = !visible ? value9.visible : visible;
controlsSpecs2.useEffect(_fun118450, [visible, value]);
useCoachmarkHelper(a0, value8, r3);
useCoachmarkHelper(a0, value9, r3);
function useSpeakerTooltipsS(a0, a1) { // fn#118443, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15671:1267, owner: useSpeakerTooltips.S, offset: 0x024dbc9d, size: 75 bytes, params: 3, frame: 14
var value;
if (a0 !== a1) {
value = environment.__proto__;
(require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS(ConsoleVoiceUpsellStoreModule.setVoiceUpsellDismissed)(a0 === VoicePanelControlsModes.FLOATING_DEFAULT);
}
}
function _fun118444() { // fn#118444, offset: 0x024dbce8, size: 22 bytes, params: 1, frame: 3
return require ? env0_3 : [];
}
function _fun118445() { // fn#118445, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15671:1608, offset: 0x024dbcfe, size: 216 bytes, params: 1, frame: 18
var environment;
const object = {position: 'bottom'};
const value = environment.__proto__;
const intl = (IndexNativeModule).intl;
const string = intl.string;
const t = (IndexNativeModule).t;
const O2WA4u = t.O2WA4u;
object.title = Reflect.apply(string, intl, [O2WA4u]);
object.description = intl.string(t.fr5bJy);
object.visible = require && ConsoleVoiceUpsellStoreModule.useConsoleVoiceUpsellStore === (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent.DONUT_MOBILE_NUX;
object.renderImgComponent = renderImgComponent_118446;
object.withBlurBackground = true;
object.onDismiss = onDismiss_118447;
return object;
function renderImgComponent_118446() { // fn#118446, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15671:1809, offset: 0x024dbdd6, size: 39 bytes, params: 1, frame: 13
const value = environment.__proto__.__proto__;
return ((Component) => <Component />)(VoicePanelConsoleFacepile);
}
function onDismiss_118447() { // fn#118447, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15671:1860, offset: 0x024dbdfd, size: 29 bytes, params: 1, frame: 11
const binding = env1_7;
const UNKNOWN = ContentDismissActionType.UNKNOWN;
return binding(UNKNOWN);
}
}
function _fun118448() { // fn#118448, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15671:1902, offset: 0x024dbe1a, size: 217 bytes, params: 1, frame: 17
const value2 = null;
const r2 = value2 != env0_1 ? (require(15477) /* metro dependency 15477: VoicePanelConsoleFacepile */).getConsoleInfo(env0_1) : value2;
const r4 = require && !voiceUpsellDismissed && value2 != r2 && !JsxRuntimeModule.jsx.visible;
const value = undefined;
const connectLabel = value2 == r2 ? value : r2.connectLabel;
const value7 = '';
const connectSublabel = value2 == r2 ? value : r2.connectSublabel;
return {position: 'bottom', title: value2 != connectLabel ? connectLabel : value7,
description: value2 != connectSublabel ? connectSublabel : value7, visible: r4,
imgSource: value2 == r2 ? value : r2.icon, withBlurBackground: true, onDismiss: function() {
setVoiceUpsellDismissed(true);
}};
}
function _fun118450() { // fn#118450, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15671:2266, offset: 0x024dbf05, size: 54 bytes, params: 1, frame: 11
var lock;
const visibleBinding = visible;
if (visibleBinding) {
lock = DismissibleContentConstantsModule.ContentDismissActionType.lock;
value = environment.__proto__;
Reflect.apply(lock, DismissibleContentConstantsModule.ContentDismissActionType, [VoicePanelControlsModes.FLOATING_DEFAULT]);
} else {
DismissibleContentConstantsModule.ContentDismissActionType.unlock();
}
}
}
}
function _fun118444() { // fn#118444, offset: 0x024dbce8, size: 22 bytes, params: 1, frame: 3
return require ? env0_3 : [];
}
function _fun118445() { // fn#118445, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15671:1608, offset: 0x024dbcfe, size: 216 bytes, params: 1, frame: 18
var environment;
const object2 = {position: 'bottom'};
const value = environment.__proto__;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const O2WA4u = t.O2WA4u;
object2.title = Reflect.apply(string, intl, [O2WA4u]);
object2.description = intl.string(t.fr5bJy);
object2.visible = require && env0_6 === (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent.DONUT_MOBILE_NUX;
object2.renderImgComponent = renderImgComponent_118446;
object2.withBlurBackground = true;
object2.onDismiss = onDismiss_118447;
return object2;
}
function _fun118448() { // fn#118448, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15671:1902, offset: 0x024dbe1a, size: 217 bytes, params: 1, frame: 17
const value2 = null;
const r2 = value2 != env0_1 ? (require(15477) /* metro dependency 15477: VoicePanelConsoleFacepile */).getConsoleInfo(env0_1) : value2;
const r4 = require && !voiceUpsellDismissed && value2 != r2 && !env0_9.visible;
const value = undefined;
const connectLabel = value2 == r2 ? value : r2.connectLabel;
const value7 = '';
const connectSublabel = value2 == r2 ? value : r2.connectSublabel;
return {position: 'bottom', title: value2 != connectLabel ? connectLabel : value7,
description: value2 != connectSublabel ? connectSublabel : value7, visible: r4,
imgSource: value2 == r2 ? value : r2.icon, withBlurBackground: true, onDismiss: function() {
setVoiceUpsellDismissed(true);
}};
}
function _fun118450() { // fn#118450, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15671:2266, offset: 0x024dbf05, size: 54 bytes, params: 1, frame: 11
var lock;
const visibleBinding = visible;
const binding = env0_8;
if (visibleBinding) {
lock = binding.lock;
value = environment.__proto__;
Reflect.apply(lock, binding, [VoicePanelControlsModes.FLOATING_DEFAULT]);
} else {
binding.unlock();
}
}
function renderImgComponent_118446() { // fn#118446, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15671:1809, offset: 0x024dbdd6, size: 39 bytes, params: 1, frame: 13
const value = environment.__proto__.__proto__;
return ((Component) => <Component />)(importDefault(15477) /* metro dependency 15477: VoicePanelConsoleFacepile */);
}
function onDismiss_118447() { // fn#118447, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15671:1860, offset: 0x024dbdfd, size: 29 bytes, params: 1, frame: 11
const binding = env1_7;
const UNKNOWN = ContentDismissActionType.UNKNOWN;
return binding(UNKNOWN);
}
global.__d(_fun118437, 15474, [57, 31, 15471, 11793, 1376, 33, 15475, 15414, 7713, 11794, 4017, 7013, 15447, 1244,
1365, 15477, 8543,
2]) /* metro module 15474, dependencies: [57, 31, 15471, 11793, 1376, 33, 15475, 15414, 7713, 11794, 4017, 7013, 15447, 1244, 1365, 15477, 8543, 2] */;
@@ -1,123 +1,135 @@
/* Metro module 15490; source: modules/voice_panel/native/hooks/useTapGestures.tsx; dependencies: [31, 11794, 5321, 4017, 4081, 2] */
import VoicePanelStateContext from '../VoicePanelStateContext.tsx'; /* Metro dependency 11794 */
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 ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as Module05321Module from '../../../../by-id/module-05321.js'; /* Metro dependency 5321 */
function _fun118618(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118618, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15687:6, offset: 0x024e4e67, size: 185 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
object = {code: "function useTapGesturesTsx1(){const{runOnJS,handleEvent}=this.__closure;return runOnJS(handleEvent)('double');}"};
object = {code: 'function useTapGesturesTsx2(event,manager){const{isFocusedVideoZoomed}=this.__closure;if(isFocusedVideoZoomed.get()){manager.fail();}}'};
object = {code: "function useTapGesturesTsx3(){const{runOnJS,handleEvent}=this.__closure;return runOnJS(handleEvent)('single');}"};
object = {code: "function useTapGesturesTsx4(){const{runOnJS,triggerHapticFeedback,HapticFeedbackTypes,handleEvent}=this.__closure;runOnJS(triggerHapticFeedback)(HapticFeedbackTypes.IMPACT_MEDIUM);runOnJS(handleEvent)('long');}"};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/hooks/useTapGestures.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/hooks/useTapGestures.tsx');
exports.default = useTapGestures;
}
function useTapGestures(a0) { // fn#118619, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15687:815, offset: 0x024e4f20, size: 189 bytes, params: 2, frame: 18
const env0_0 = a0;
const useContext = ReactModule.useContext;
const isFocusedVideoZoomed = Reflect.apply(useContext, ReactModule,
[VoicePanelStateContext]).isFocusedVideoZoomed;
const env0_2 = ReactModule.useRef(a0);
const value = a0.onSingleTap != null;
const value2 = a0.onDoubleTap != null;
const value3 = a0.onLongPress != null;
const gesturesEnabled = a0.gesturesEnabled;
ReactModule.useLayoutEffect(_fun118620);
return ReactModule.useMemo(_fun118621, [value, value2, value3, gesturesEnabled, isFocusedVideoZoomed]);
function _fun118620() { // fn#118620, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15687:1017, offset: 0x010cb3d0, size: 21 bytes, params: 1, frame: 2
env0_2.current = env0_0;
}
function useTapGestures(a0) { // fn#118619, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15687:815, offset: 0x024e4f20, size: 189 bytes, params: 2, frame: 18
const env0_0 = a0;
const binding = env0_3;
const useContext = binding.useContext;
const isFocusedVideoZoomed = Reflect.apply(useContext, binding,
[importDefault(11794) /* metro dependency 11794: VoicePanelStateContext */]).isFocusedVideoZoomed;
const env0_2 = binding.useRef(a0);
const value = a0.onSingleTap != null;
const value2 = a0.onDoubleTap != null;
const value3 = a0.onLongPress != null;
const gesturesEnabled = a0.gesturesEnabled;
binding.useLayoutEffect(_fun118620);
return binding.useMemo(_fun118621, [value, value2, value3, gesturesEnabled, isFocusedVideoZoomed]);
}
function _fun118621() { // fn#118621, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15687:1048, offset: 0x024e4fdd, size: 592 bytes, params: 1, frame: 27
const handleEvent_1186222 = handleEvent_118622;
const Gesture = (Module05321Module).Gesture;
const Exclusive = Gesture.Exclusive;
const Gesture2 = (Module05321Module).Gesture;
const value2 = Gesture2.Tap();
const value6 = value2.enabled(gesturesEnabled && result_2).maxDistance(30).numberOfTaps(2);
const onTouchesDown = value6.onTouchesDown;
const closure2 = function(a0, a1) {
if (isFocusedVideoZoomed.get()) {
a1.fail();
}
};
closure2.__closure = {isFocusedVideoZoomed: isFocusedVideoZoomed};
closure2.__workletHash = 3236469126950;
closure2.__initData = env1_5;
const value7 = Reflect.apply(onTouchesDown, value6, [closure2]);
let onStart = value7.onStart;
const h_1186242 = h_118624;
const runOnJS = (ReanimatedRexportModule).runOnJS;
h_1186242.__closure = {runOnJS: runOnJS, handleEvent: handleEvent_1186222};
h_1186242.__workletHash = 13571114432746;
h_1186242.__initData = env1_4;
const value8 = Reflect.apply(onStart, value7, [h_1186242]);
const Gesture3 = (Module05321Module).Gesture;
const value9 = Gesture3.Tap();
const value11 = value9.enabled(gesturesEnabled && result).maxDistance(30);
onStart = value11.onStart;
const c_1186252 = c_118625;
c_1186252.__closure = {runOnJS: runOnJS, handleEvent: handleEvent_1186222};
c_1186252.__workletHash = 14109132753191;
c_1186252.__initData = env1_6;
const value12 = Reflect.apply(onStart, value11, [c_1186252]);
const Gesture4 = (Module05321Module).Gesture;
const value13 = Gesture4.LongPress();
const value14 = value13.enabled(gesturesEnabled && result_3);
onStart = value14.onStart;
const n_1186262 = n_118626;
object = {};
object.runOnJS = runOnJS;
object.triggerHapticFeedback = (require(4081) /* metro dependency 4081: HapticUtilsNative */).triggerHapticFeedback;
const HapticFeedbackTypes = (require(4081) /* metro dependency 4081: HapticUtilsNative */).HapticFeedbackTypes;
object.HapticFeedbackTypes = HapticFeedbackTypes;
object.handleEvent = handleEvent_1186222;
n_1186262.__closure = object;
n_1186262.__workletHash = 1947700378974;
n_1186262.__initData = env1_7;
return Reflect.apply(Exclusive, Gesture, [value8, value12, Reflect.apply(onStart, value14, [n_1186262])]);
function handleEvent_118622(a0) { // fn#118622, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15687:1077, offset: 0x024e522d, size: 167 bytes, params: 2, frame: 10
var value;
if (a0 === 'single') {
value = environment.__proto__;
if (env1_2.current.onSingleTap != null) {
env1_2.current.onSingleTap();
}
} else if (a0 === 'double') {
value = environment.__proto__;
if (env1_2.current.onDoubleTap != null) {
env1_2.current.onDoubleTap();
}
} else if (a0 === 'long') {
value = environment.__proto__;
if (env1_2.current.onLongPress != null) {
env1_2.current.onLongPress();
}
}
}
function _fun118621() { // fn#118621, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15687:1048, offset: 0x024e4fdd, size: 592 bytes, params: 1, frame: 27
var object2;
const closure = handleEvent;
const Gesture = (require(5321) /* metro dependency 5321 */).Gesture;
const Exclusive = Gesture.Exclusive;
const Gesture2 = (require(5321) /* metro dependency 5321 */).Gesture;
const value2 = Gesture2.Tap();
const value6 = value2.enabled(gesturesEnabled && result_2).maxDistance(30).numberOfTaps(2);
const onTouchesDown = value6.onTouchesDown;
const closure2 = function(a0, a1) {
if (isFocusedVideoZoomed.get()) {
a1.fail();
}
};
closure2.__closure = {isFocusedVideoZoomed: isFocusedVideoZoomed};
closure2.__workletHash = 3236469126950;
closure2.__initData = env1_5;
const value7 = Reflect.apply(onTouchesDown, value6, [closure2]);
let onStart = value7.onStart;
const closure3 = h_118624;
const runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
closure3.__closure = {runOnJS: runOnJS, handleEvent: closure};
closure3.__workletHash = 13571114432746;
closure3.__initData = env1_4;
const value8 = Reflect.apply(onStart, value7, [closure3]);
const Gesture3 = (require(5321) /* metro dependency 5321 */).Gesture;
const value9 = Gesture3.Tap();
const value11 = value9.enabled(gesturesEnabled && result).maxDistance(30);
onStart = value11.onStart;
const closure4 = c_118625;
closure4.__closure = {runOnJS: runOnJS, handleEvent: closure};
closure4.__workletHash = 14109132753191;
closure4.__initData = env1_6;
const value12 = Reflect.apply(onStart, value11, [closure4]);
const Gesture4 = (require(5321) /* metro dependency 5321 */).Gesture;
const value13 = Gesture4.LongPress();
const value14 = value13.enabled(gesturesEnabled && result_3);
onStart = value14.onStart;
const closure5 = n_118626;
object2 = {};
object2.runOnJS = runOnJS;
object2.triggerHapticFeedback = (require(4081) /* metro dependency 4081: HapticUtilsNative */).triggerHapticFeedback;
const HapticFeedbackTypes = (require(4081) /* metro dependency 4081: HapticUtilsNative */).HapticFeedbackTypes;
object2.HapticFeedbackTypes = HapticFeedbackTypes;
object2.handleEvent = closure;
closure5.__closure = object2;
closure5.__workletHash = 1947700378974;
closure5.__initData = env1_7;
return Reflect.apply(Exclusive, Gesture, [value8, value12, Reflect.apply(onStart, value14, [closure5])]);
}
function h_118624() { // fn#118624, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15687:1550, offset: 0x024e52f8, size: 53 bytes, params: 1, frame: 12
let value = environment.__proto__.__proto__;
value = Reflect.apply((require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS, value,
[handleEvent_118622]);
return value('double');
}
function c_118625() { // fn#118625, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15687:1767, offset: 0x024e532d, size: 53 bytes, params: 1, frame: 12
let value = environment.__proto__.__proto__;
value = Reflect.apply((require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS, value,
[handleEvent_118622]);
return value('single');
}
function n_118626() { // fn#118626, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15687:1974, offset: 0x024e5362, size: 116 bytes, params: 1, frame: 16
let value = environment.__proto__.__proto__;
value = Reflect.apply((require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS, value,
[(require(4081) /* metro dependency 4081: HapticUtilsNative */).triggerHapticFeedback]);
const HapticFeedbackTypes = (require(4081) /* metro dependency 4081: HapticUtilsNative */).HapticFeedbackTypes;
const IMPACT_MEDIUM = HapticFeedbackTypes.IMPACT_MEDIUM;
value(IMPACT_MEDIUM);
value = Reflect.apply((require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS, value,
[handleEvent_118622]);
value('long');
}
function handleEvent(a0) { // fn#118622, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15687:1077, offset: 0x024e522d, size: 167 bytes, params: 2, frame: 10
var value;
if (a0 === 'single') {
value = environment.__proto__;
if (env1_2.current.onSingleTap != null) {
env1_2.current.onSingleTap();
}
} else if (a0 === 'double') {
value = environment.__proto__;
if (env1_2.current.onDoubleTap != null) {
env1_2.current.onDoubleTap();
}
} else if (a0 === 'long') {
value = environment.__proto__;
if (env1_2.current.onLongPress != null) {
env1_2.current.onLongPress();
}
}
}
function h_118624() { // fn#118624, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15687:1550, offset: 0x024e52f8, size: 53 bytes, params: 1, frame: 12
let value = environment.__proto__.__proto__;
value = Reflect.apply((require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS, value, [handleEvent]);
return value('double');
}
function c_118625() { // fn#118625, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15687:1767, offset: 0x024e532d, size: 53 bytes, params: 1, frame: 12
let value = environment.__proto__.__proto__;
value = Reflect.apply((require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS, value, [handleEvent]);
return value('single');
}
function n_118626() { // fn#118626, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15687:1974, offset: 0x024e5362, size: 116 bytes, params: 1, frame: 16
let value = environment.__proto__.__proto__;
value = Reflect.apply((require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS, value,
[(require(4081) /* metro dependency 4081: HapticUtilsNative */).triggerHapticFeedback]);
const HapticFeedbackTypes = (require(4081) /* metro dependency 4081: HapticUtilsNative */).HapticFeedbackTypes;
const IMPACT_MEDIUM = HapticFeedbackTypes.IMPACT_MEDIUM;
value(IMPACT_MEDIUM);
value = Reflect.apply((require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS, value, [handleEvent]);
value('long');
}
global.__d(_fun118618, 15490, [31, 11794, 5321, 4017, 4081,
2]) /* metro module 15490, dependencies: [31, 11794, 5321, 4017, 4081, 2] */;
@@ -1,162 +1,175 @@
/* Metro module 15458; source: modules/voice_panel/native/hooks/useVoicePanelCardUserStateIcons.tsx; dependencies: [31, 4294, 4297, 4299, 33, 11794, 9245, 632, 10268, 4406, 10269, 14703, 15410, 3857, 7684, 697, 1244, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import ToastActionCreators from '../../../toast/native/ToastActionCreators.tsx'; /* Metro dependency 3857 */
import RTCConnectionStore from '../../../../stores/RTCConnectionStore.tsx'; /* Metro dependency 4294 */
import VoiceStateStore from '../../../../stores/VoiceStateStore.tsx'; /* Metro dependency 4297 */
import UseMuteAwareLocalVolume from '../../../media_engine/useMuteAwareLocalVolume.tsx'; /* Metro dependency 10268 */
import MobileAudioOutputExperiment from '../../../media_engine/MobileAudioOutputExperiment.tsx'; /* Metro dependency 10269 */
import VoicePanelStateContext from '../VoicePanelStateContext.tsx'; /* Metro dependency 11794 */
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 IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as CallConstantsModule from '../../../calls/CallConstants.tsx'; /* Metro dependency 4299 */
import * as MediaEngineModule from '../../../../external/discord_common/js/packages/media-engine/index.tsx'; /* Metro dependency 4406 */
import * as CircleErrorIconModule from '../../../../design/components/Icon/native/redesign/generated/CircleErrorIcon.tsx'; /* Metro dependency 7684 */
import * as VoiceStateIconUtilsModule from '../utils/VoiceStateIconUtils.tsx'; /* Metro dependency 9245 */
import * as RTCConnectionDesyncHooksModule from '../../../voice_calls/RTCConnectionDesyncHooks.tsx'; /* Metro dependency 14703 */
function _fun118319(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118319, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15655:6, offset: 0x024d6838, size: 260 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const rtcConnectionStore = importDefault(4294) /* metro dependency 4294: RTCConnectionStore */;
const voiceStateStore = importDefault(4297) /* metro dependency 4297: VoiceStateStore */;
const env0_6 = (require(4299) /* metro dependency 4299: CallConstants */).ParticipantTypes;
const env0_7 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/hooks/useVoicePanelCardUserStateIcons.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/hooks/useVoicePanelCardUserStateIcons.tsx');
exports.default = useVoicePanelCardUserStateIcons;
exports.VoicePanelCardUserStateIconType = {STREAM_ICON: 'STREAM_ICON', USER_VIDEO_ICON: 'USER_VIDEO_ICON',
MUTE_DEAFEN_ICON: 'MUTE_DEAFEN_ICON', USER_DISCONNECTED_ICON: 'DISCONNECTED_ICON',
SPEAKER_MUTE_ICON: 'SPEAKER_MUTE_ICON'};
}
function useVoicePanelCardUserStateIcons(a0, a1, a2) { // fn#118320, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15655:495, offset: 0x024d693c, size: 645 bytes, params: 4, frame: 26
const value = a1;
const value2 = a3;
const env0_0 = a0;
const value3 = undefined;
const r7 = value2 !== value3 ? value2 : null;
let env0_3 = value3;
let binding = env0_3;
const useContext = binding.useContext;
const setShowFloatingCTA = Reflect.apply(useContext, binding,
[VoicePanelStateContext]).setShowFloatingCTA;
env0_3 = setShowFloatingCTA;
const useMuteDeafenIconState = VoiceStateIconUtilsModule.useMuteDeafenIconState;
let USER = ParticipantTypes.USER;
const value6 = Reflect.apply(useMuteDeafenIconState, VoiceStateIconUtilsModule, [a0 !== USER ? value3 : value, a2]);
const useVideoIconState = VoiceStateIconUtilsModule.useVideoIconState;
USER = ParticipantTypes.USER;
const value7 = Reflect.apply(useVideoIconState, VoiceStateIconUtilsModule, [a0 !== USER ? value3 : value, a2]);
const value8 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([RTCConnectionStore],
function() {
return RTCConnectionStore.isConnected();
});
const value9 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([VoiceStateStore],
_fun118322, [r7, value]);
let defaultImport = UseMuteAwareLocalVolume;
let STREAM = ParticipantTypes.STREAM;
let r4 = a0 !== STREAM ? value3 : value;
const MediaEngineContextTypes = (MediaEngineModule).MediaEngineContextTypes;
STREAM = MediaEngineContextTypes.STREAM;
const effectiveVolume = defaultImport(r4, STREAM).effectiveVolume;
const defaultImport2 = MobileAudioOutputExperiment;
const useConfig = defaultImport2.useConfig;
r4 = Reflect.apply(useConfig, defaultImport2,
[{location: 'useVoicePanelCardUserStateIcons'}]).showTileVolumeIndicator && effectiveVolume === 0 && a0 === ParticipantTypes.STREAM;
const value12 = (RTCConnectionDesyncHooksModule).useIsRTCDisconnectedUIVisible(r7,
value);
binding = env0_3;
return binding.useMemo(_fun118326, [value8, a0, value7, value6, value12, value9, binding.useCallback(function() {
setShowFloatingCTA(require(dependencyMap[12]).OverrideFloatingCTA.BAD_CONNECTION);
}, [setShowFloatingCTA]), value, binding.useCallback(function() {
var defaultImport = importDefault(dependencyMap[13]);
var object = {key: 'user-disconnected-indicator', icon: _fun118325};
object.content = require(dependencyMap[16]).intl.string(require(dependencyMap[16]).t.HFwRpk);
defaultImport.open(object);
}, []), r4]);
function _fun118322() { // fn#118322, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15655:794, offset: 0x024d6bc1, size: 60 bytes, params: 1, frame: 14
const value2 = null;
return value2 != env0_2 && value2 != require ? VoiceStateStore.getVoicePlatformForChannel(env0_2, require) : value2;
}
function useVoicePanelCardUserStateIcons(a0, a1, a2) { // fn#118320, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15655:495, offset: 0x024d693c, size: 645 bytes, params: 4, frame: 26
const value = a1;
const value2 = a3;
const env0_0 = a0;
const value3 = undefined;
const r7 = value2 !== value3 ? value2 : null;
let env0_3 = value3;
let binding = env0_3;
const useContext = binding.useContext;
const setShowFloatingCTA = Reflect.apply(useContext, binding,
[importDefault(11794) /* metro dependency 11794: VoicePanelStateContext */]).setShowFloatingCTA;
env0_3 = setShowFloatingCTA;
const voiceStateIconUtilsModule = require(9245) /* metro dependency 9245: VoiceStateIconUtils */;
const useMuteDeafenIconState = voiceStateIconUtilsModule.useMuteDeafenIconState;
let USER = ParticipantTypes.USER;
const value6 = Reflect.apply(useMuteDeafenIconState, voiceStateIconUtilsModule, [a0 !== USER ? value3 : value, a2]);
const moduleValue2 = voiceStateIconUtilsModule;
const useVideoIconState = moduleValue2.useVideoIconState;
USER = ParticipantTypes.USER;
const value7 = Reflect.apply(useVideoIconState, moduleValue2, [a0 !== USER ? value3 : value, a2]);
const value8 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([RTCConnectionStore],
function() {
return RTCConnectionStore.isConnected();
});
const value9 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([VoiceStateStore],
_fun118322, [r7, value]);
let defaultImport = importDefault(10268) /* metro dependency 10268: useMuteAwareLocalVolume */;
let STREAM = ParticipantTypes.STREAM;
let r4 = a0 !== STREAM ? value3 : value;
const MediaEngineContextTypes = (require(4406) /* metro dependency 4406: mediaEngine */).MediaEngineContextTypes;
STREAM = MediaEngineContextTypes.STREAM;
const effectiveVolume = defaultImport(r4, STREAM).effectiveVolume;
const defaultImport2 = importDefault(10269) /* metro dependency 10269: MobileAudioOutputExperiment */;
const useConfig = defaultImport2.useConfig;
r4 = Reflect.apply(useConfig, defaultImport2,
[{location: 'useVoicePanelCardUserStateIcons'}]).showTileVolumeIndicator && effectiveVolume === 0 && a0 === ParticipantTypes.STREAM;
const value12 = (require(14703) /* metro dependency 14703: RTCConnectionDesyncHooks */).useIsRTCDisconnectedUIVisible(r7,
value);
binding = env0_3;
return binding.useMemo(_fun118326, [value8, a0, value7, value6, value12, value9, binding.useCallback(function() {
setShowFloatingCTA(require(dependencyMap[12]).OverrideFloatingCTA.BAD_CONNECTION);
}, [setShowFloatingCTA]), value, binding.useCallback(function() {
var defaultImport = importDefault(dependencyMap[13]);
var object = {key: 'user-disconnected-indicator', icon: _fun118325};
object.content = require(dependencyMap[16]).intl.string(require(dependencyMap[16]).t.HFwRpk);
defaultImport.open(object);
}, []), r4]);
}
function _fun118322() { // fn#118322, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15655:794, offset: 0x024d6bc1, size: 60 bytes, params: 1, frame: 14
const value2 = null;
return value2 != env0_2 && value2 != require ? VoiceStateStore.getVoicePlatformForChannel(env0_2, require) : value2;
}
function _fun118324() { // fn#118324, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15655:1201, offset: 0x024d6c30, size: 120 bytes, params: 1, frame: 17
const defaultImport = importDefault(3857) /* metro dependency 3857: ToastActionCreators */;
const open = defaultImport.open;
const object2 = {key: 'user-disconnected-indicator', icon: icon_118325};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const HFwRpk = (require(1244) /* metro dependency 1244: indexNative */).t.HFwRpk;
object2.content = Reflect.apply(string, intl, [HFwRpk]);
Reflect.apply(open, defaultImport, [object2]);
}
function _fun118326() { // fn#118326, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15655:1415, offset: 0x024d6cfc, size: 414 bytes, params: 1, frame: 19
var environment;
var binding;
var value2;
var items2;
const VideoIconState = (require(9245) /* metro dependency 9245: VoiceStateIconUtils */).VideoIconState;
if (env0_6) {
binding = env0_0;
value2 = environment.__proto__;
if (binding === ParticipantTypes.STREAM) {
items2 = [];
if (env0_8) {
items2.push({type: env1_8.SPEAKER_MUTE_ICON, onPress: onPress_118327});
function _fun118324() { // fn#118324, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15655:1201, offset: 0x024d6c30, size: 120 bytes, params: 1, frame: 17
const defaultImport = ToastActionCreators;
const open = defaultImport.open;
const object = {key: 'user-disconnected-indicator', icon: icon_118325};
const intl = (IndexNativeModule).intl;
const string = intl.string;
const HFwRpk = (IndexNativeModule).t.HFwRpk;
object.content = Reflect.apply(string, intl, [HFwRpk]);
Reflect.apply(open, defaultImport, [object]);
function icon_118325() { // fn#118325, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15655:1260, offset: 0x024d6ca8, size: 84 bytes, params: 1, frame: 16
const CircleErrorIcon = (CircleErrorIconModule).CircleErrorIcon;
const STATUS_WARNING = (Native).colors.STATUS_WARNING;
return <CircleErrorIcon size="xs" color={STATUS_WARNING} />;
}
items2.push({type: env1_8.STREAM_ICON, voicePlatform: env0_7});
return items2;
}
binding = env0_0;
if (binding !== ParticipantTypes.USER) {
function _fun118326() { // fn#118326, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15655:1415, offset: 0x024d6cfc, size: 414 bytes, params: 1, frame: 19
var environment;
var binding;
var value2;
var items2;
const VideoIconState = (VoiceStateIconUtilsModule).VideoIconState;
if (CallConstantsModule.ParticipantTypes) {
binding = env0_0;
value2 = environment.__proto__;
if (binding === ParticipantTypes.STREAM) {
items2 = [];
if (env0_8) {
items2.push({type: env1_8.SPEAKER_MUTE_ICON, onPress: onPress_118327});
}
items2.push({type: env1_8.STREAM_ICON, voicePlatform: JsxRuntimeModule.jsx});
return items2;
}
binding = env0_0;
if (binding !== ParticipantTypes.USER) {
return [];
}
items2 = [];
if (env0_9) {
items2.push({type: env1_8.USER_DISCONNECTED_ICON, onPress: env0_11});
}
if (env0_5 != null && env0_5 !== VideoIconState.VIDEO_ACTIVE) {
items2.push({type: env1_8.USER_VIDEO_ICON, videoIconState: env0_5,
onPress: env0_5 !== VideoIconState.VIDEO_DISABLED_LOCAL_AUTO ? undefined : env0_10});
}
if (env0_4 != null) {
items2.push({type: env1_8.MUTE_DEAFEN_ICON, muteDeafenIconState: env0_4, withLeftMargin: items2.length > 0,
onPress: onPress_118328});
}
return items2;
}
return [];
function onPress_118327() { // fn#118327, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15655:1512, offset: 0x024d6e9a, size: 135 bytes, params: 1, frame: 19
const defaultImport = ToastActionCreators;
const open = defaultImport.open;
const object = {};
object.key = '' + require + '-stream-status';
const intl = (IndexNativeModule).intl;
const string = intl.string;
const Q8Uzof = (IndexNativeModule).t.Q8Uzof;
object.content = Reflect.apply(string, intl, [Q8Uzof]);
Reflect.apply(open, defaultImport, [object]);
}
function onPress_118328() { // fn#118328, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15655:2008, offset: 0x024d6f21, size: 850 bytes, params: 1, frame: 20
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
const binding = env1_4;
const MuteDeafenIconState = (VoiceStateIconUtilsModule).MuteDeafenIconState;
const DEAFENED_SERVER = MuteDeafenIconState.DEAFENED_SERVER;
if (DEAFENED_SERVER === binding) {
(importDefault(3857) /* metro dependency 3857: ToastActionCreators */).open({key: '' + require + '-status',
content: intl.string(t.btxSdB)});
} else if (MuteDeafenIconState.DEAFENED === binding) {
(importDefault(3857) /* metro dependency 3857: ToastActionCreators */).open({key: '' + require + '-status',
content: intl.string(t.NjmiOL)});
} else if (MuteDeafenIconState.MUTED_SERVER === binding) {
(importDefault(3857) /* metro dependency 3857: ToastActionCreators */).open({key: '' + require + '-status',
content: intl.string(t.uLddbQ)});
} else if (MuteDeafenIconState.MUTED_LOCAL === binding) {
(importDefault(3857) /* metro dependency 3857: ToastActionCreators */).open({key: '' + require + '-status',
content: intl.string(t.Q8Uzof)});
} else if (MuteDeafenIconState.MUTED === binding) {
(importDefault(3857) /* metro dependency 3857: ToastActionCreators */).open({key: '' + require + '-status',
content: intl.string(t.tjtv3P)});
}
}
}
items2 = [];
if (env0_9) {
items2.push({type: env1_8.USER_DISCONNECTED_ICON, onPress: env0_11});
}
if (env0_5 != null && env0_5 !== VideoIconState.VIDEO_ACTIVE) {
items2.push({type: env1_8.USER_VIDEO_ICON, videoIconState: env0_5,
onPress: env0_5 !== VideoIconState.VIDEO_DISABLED_LOCAL_AUTO ? undefined : env0_10});
}
if (env0_4 != null) {
items2.push({type: env1_8.MUTE_DEAFEN_ICON, muteDeafenIconState: env0_4, withLeftMargin: items2.length > 0,
onPress: onPress_118328});
}
return items2;
}
return [];
}
function icon_118325() { // fn#118325, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15655:1260, offset: 0x024d6ca8, size: 84 bytes, params: 1, frame: 16
const CircleErrorIcon = (require(7684) /* metro dependency 7684: CircleErrorIcon */).CircleErrorIcon;
const STATUS_WARNING = (importDefault(697) /* metro dependency 697: native */).colors.STATUS_WARNING;
return <CircleErrorIcon size="xs" color={STATUS_WARNING} />;
}
function onPress_118327() { // fn#118327, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15655:1512, offset: 0x024d6e9a, size: 135 bytes, params: 1, frame: 19
const defaultImport = importDefault(3857) /* metro dependency 3857: ToastActionCreators */;
const open = defaultImport.open;
const object2 = {};
object2.key = '' + require + '-stream-status';
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const Q8Uzof = (require(1244) /* metro dependency 1244: indexNative */).t.Q8Uzof;
object2.content = Reflect.apply(string, intl, [Q8Uzof]);
Reflect.apply(open, defaultImport, [object2]);
}
function onPress_118328() { // fn#118328, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15655:2008, offset: 0x024d6f21, size: 850 bytes, params: 1, frame: 20
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const binding = env1_4;
const MuteDeafenIconState = (require(9245) /* metro dependency 9245: VoiceStateIconUtils */).MuteDeafenIconState;
const DEAFENED_SERVER = MuteDeafenIconState.DEAFENED_SERVER;
if (DEAFENED_SERVER === binding) {
(importDefault(3857) /* metro dependency 3857: ToastActionCreators */).open({key: '' + require + '-status',
content: intl.string(t.btxSdB)});
} else if (MuteDeafenIconState.DEAFENED === binding) {
(importDefault(3857) /* metro dependency 3857: ToastActionCreators */).open({key: '' + require + '-status',
content: intl.string(t.NjmiOL)});
} else if (MuteDeafenIconState.MUTED_SERVER === binding) {
(importDefault(3857) /* metro dependency 3857: ToastActionCreators */).open({key: '' + require + '-status',
content: intl.string(t.uLddbQ)});
} else if (MuteDeafenIconState.MUTED_LOCAL === binding) {
(importDefault(3857) /* metro dependency 3857: ToastActionCreators */).open({key: '' + require + '-status',
content: intl.string(t.Q8Uzof)});
} else if (MuteDeafenIconState.MUTED === binding) {
(importDefault(3857) /* metro dependency 3857: ToastActionCreators */).open({key: '' + require + '-status',
content: intl.string(t.tjtv3P)});
}
}
global.__d(_fun118319, 15458, [31, 4294, 4297, 4299, 33, 11794, 9245, 632, 10268, 4406, 10269, 14703, 15410, 3857,
7684, 697, 1244,
2]) /* metro module 15458, dependencies: [31, 4294, 4297, 4299, 33, 11794, 9245, 632, 10268, 4406, 10269, 14703, 15410, 3857, 7684, 697, 1244, 2] */;
@@ -1,37 +1,40 @@
/* Metro module 15455; source: modules/voice_panel/native/hooks/useVoicePanelNavArrowPressed.tsx; dependencies: [31, 11793, 11794, 2] */
import VoicePanelStateContext from '../VoicePanelStateContext.tsx'; /* Metro dependency 11794 */
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 VoicePanelControlsConstantsModule from '../controls/VoicePanelControlsConstants.tsx'; /* Metro dependency 11793 */
function _fun118299(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118299, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15652:6, offset: 0x024d59cf, size: 139 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importAll(31) /* metro dependency 31 */;
const env0_3 = (require(11793) /* metro dependency 11793: VoicePanelControlsConstants */).VoicePanelControlsModes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/hooks/useVoicePanelNavArrowPressed.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/hooks/useVoicePanelNavArrowPressed.tsx');
exports.default = useVoicePanelNavArrowPressed;
}
function useVoicePanelNavArrowPressed() { // fn#118300, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15652:249, offset: 0x024d5a5a, size: 122 bytes, params: 1, frame: 17
const binding = env0_2;
const value = binding.useContext(importDefault(11794) /* metro dependency 11794: VoicePanelStateContext */);
return binding.useCallback(_fun118301, [value.focused, value.controlsSpecs, value.dismissPanel, value.setFocused]);
}
function _fun118301() { // fn#118301, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15652:401, offset: 0x024d5ad4, size: 96 bytes, params: 1, frame: 14
var r0;
var controlsSpecsBinding;
var mode;
var value4;
if (focused.get()?.id == null) {
r0 = dismissPanel();
} else {
controlsSpecsBinding = controlsSpecs;
mode = controlsSpecsBinding.get().mode;
value4 = environment.__proto__;
if (mode !== VoicePanelControlsModes.DRAWER) {
setFocused(null);
r0 = true;
} else {
r0 = dismissPanel();
function useVoicePanelNavArrowPressed() { // fn#118300, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15652:249, offset: 0x024d5a5a, size: 122 bytes, params: 1, frame: 17
const value = ReactModule.useContext(VoicePanelStateContext);
return ReactModule.useCallback(_fun118301, [value.focused, value.controlsSpecs, value.dismissPanel, value.setFocused]);
function _fun118301() { // fn#118301, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15652:401, offset: 0x024d5ad4, size: 96 bytes, params: 1, frame: 14
var r0;
var controlsSpecsBinding;
var mode;
var value4;
if (focused.get()?.id == null) {
r0 = dismissPanel();
} else {
controlsSpecsBinding = controlsSpecs;
mode = controlsSpecsBinding.get().mode;
value4 = environment.__proto__;
if (mode !== VoicePanelControlsModes.DRAWER) {
setFocused(null);
r0 = true;
} else {
r0 = dismissPanel();
}
}
return r0;
}
}
return r0;
}
global.__d(_fun118299, 15455, [31, 11793, 11794, 2]) /* metro module 15455, dependencies: [31, 11793, 11794, 2] */;
@@ -1,4 +1,21 @@
/* Metro module 15435; source: modules/voice_panel/native/hooks/useVoicePanelParticipants.tsx; dependencies: [57, 31, 4606, 1226, 1379, 4294, 4297, 4300, 11795, 661, 15390, 566, 14703, 11794, 11797, 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 RTCConnectionStore from '../../../../stores/RTCConnectionStore.tsx'; /* Metro dependency 4294 */
import VoiceStateStore from '../../../../stores/VoiceStateStore.tsx'; /* Metro dependency 4297 */
import SortedVoiceStateStore from '../../../../stores/views/SortedVoiceStateStore.tsx'; /* Metro dependency 4300 */
import ChannelRTCStore from '../../../calls/ChannelRTCStore.tsx'; /* Metro dependency 4606 */
import VoicePanelStateContext from '../VoicePanelStateContext.tsx'; /* Metro dependency 11794 */
import UseIsConnectedToVoiceChannel from './useIsConnectedToVoiceChannel.tsx'; /* Metro dependency 15390 */
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 FluxModule from '../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as VoicePanelConstantsModule from '../../VoicePanelConstants.tsx'; /* Metro dependency 11795 */
import * as VoicePanelCardLayoutManagerModule from '../card/VoicePanelCardLayoutManager.tsx'; /* Metro dependency 11797 */
import * as RTCConnectionDesyncHooksModule from '../../../voice_calls/RTCConnectionDesyncHooks.tsx'; /* Metro dependency 14703 */
function _fun118081(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118081, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15632:6, offset: 0x024cb259, size: 341 bytes, params: 8, frame: 19
const env0_0 = require;
const _arrayLikeToArray_118084 = function(a0, a1) {
@@ -59,500 +76,502 @@ function _fun118081(global, require, importDefault, importAll, module, exports,
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const channelRTCStore = importDefault(4606) /* metro dependency 4606: ChannelRTCStore */;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const rtcConnectionStore = importDefault(4294) /* metro dependency 4294: RTCConnectionStore */;
const voiceStateStore = importDefault(4297) /* metro dependency 4297: VoiceStateStore */;
const sortedVoiceStateStore = importDefault(4300) /* metro dependency 4300: SortedVoiceStateStore */;
const voicePanelConstantsModule = require(11795) /* metro dependency 11795: VoicePanelConstants */;
const env0_11 = voicePanelConstantsModule.VoicePanelCardItemType;
const env0_12 = voicePanelConstantsModule.VoicePanelCTACard;
const env0_13 = (require(661) /* metro dependency 661: Constants */).RTCConnectionStates;
const env0_14 = [];
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/hooks/useVoicePanelParticipants.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/hooks/useVoicePanelParticipants.tsx');
exports.default = useVoicePanelCards;
exports.useChunkedParticipants = useChunkedParticipants;
}
function _createForOfIteratorHelperLoose_118082(a0, a1) { // fn#118082, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15632:288, offset: 0x024cb3ae, 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_118082(a0, a1) { // fn#118082, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15632:288, offset: 0x024cb3ae, 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 _fun118083;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_118084(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 _fun118083;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_118084(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_118084(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun118083;
}
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 useVoicePanelCards(a0, a1) { // fn#118086, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15632:1425, offset: 0x024cb56e, size: 363 bytes, params: 3, frame: 26
const env0_0 = a0;
const env0_1 = a1;
const id = AuthenticationStore.getId();
const isDM = ChannelStore.getChannel(a0)?.isDM();
const r9 = isDM != null && isDM;
const env0_3 = r9;
const value6 = (importDefault(15390) /* metro dependency 15390: useIsConnectedToVoiceChannel */)(a0);
const binding = value6;
const property = env0_3(binding.useState(function() {
var Map = global.Map;
var value = Object.create(Map.prototype, {constructor: {value: Map}});
var value2 = new Map();
return value2 instanceof Object ? value2 : value;
}), 1)[0];
binding.useEffect(function() {
return _fun118089;
}, [property]);
const value9 = (require(566) /* metro dependency 566: flux */).useStateFromStores([RTCConnectionStore], function() {
return RTCConnectionStore.getState() === RTCConnectionStates.RTC_CONNECTED;
});
const value10 = (require(14703) /* metro dependency 14703: RTCConnectionDesyncHooks */).useDesyncedChannelParticipants(a0);
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStoresArray = fluxModule.useStateFromStoresArray;
return {items: Reflect.apply(useStateFromStoresArray, fluxModule, [[ChannelRTCStore, SortedVoiceStateStore],
_fun118091, [value6, value10, a0, a1, property, r9, id, value9]]), isConnected: value6};
}
function useChunkedParticipants(a0, a1) { // fn#118093, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15632:2602, offset: 0x024cb969, size: 263 bytes, params: 3, frame: 25
const env0_0 = a0;
const env0_1 = a1;
const id = AuthenticationStore.getId();
const binding = env0_4;
const useContext = binding.useContext;
const layoutManager = Reflect.apply(useContext, binding,
[importDefault(11794) /* metro dependency 11794: VoicePanelStateContext */]).layoutManager;
const env0_3 = layoutManager;
const value3 = (require(11797) /* metro dependency 11797: VoicePanelCardLayoutManager */).useManagerSubscription(layoutManager);
const property = env0_3(binding.useState(function() {
var Map = global.Map;
var value = Object.create(Map.prototype, {constructor: {value: Map}});
var value2 = new Map();
return value2 instanceof Object ? value2 : value;
}), 1)[0];
binding.useEffect(function() {
return _fun118096;
}, [property]);
return (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([VoiceStateStore, ChannelRTCStore],
_fun118097, [a0, property, layoutManager, a1, value3, id]);
}
function _fun118088() { // fn#118088, offset: 0x024cb6d9, size: 11 bytes, params: 1, frame: 1
return _fun118089;
}
function _fun118091() { // fn#118091, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15632:1805, offset: 0x024cb718, size: 536 bytes, params: 1, frame: 25
var r0;
var r6;
var r12;
var r10;
var r11;
var r13;
var r8;
var r4;
var binding;
var length;
var getVoiceParticipantsHidden;
var value3;
var items2;
var filteredParticipants;
var value5;
var property;
var push;
var value6;
var value7;
var value8;
var done;
var value9;
var value10;
var items3;
var value11;
var getMemoizedParticipantBinding;
var PARTICIPANT;
var id;
var memoizedParticipantBinding;
var value13;
var value14;
var CTA;
var CALLER_DISCONNECTED;
var value15;
var NO_VIDEO_PARTICIPANTS;
var value;
if (env0_4) {
getVoiceParticipantsHidden = ChannelRTCStore.getVoiceParticipantsHidden;
binding = env0_0;
value3 = Reflect.apply(getVoiceParticipantsHidden, ChannelRTCStore, [binding]);
items2 = [];
filteredParticipants = ChannelRTCStore.getFilteredParticipants(binding);
length = filteredParticipants.length;
value5 = 0;
if (value5 < length) {
r6 = value5;
reducibleLoop5: while (true) {
property = filteredParticipants[r6];
push = items2.push;
Reflect.apply(push, items2, [property]);
value6 = typeof r6 === 'bigint' ? r6 + 1n : +r6 + 1;
length = filteredParticipants.length;
if (value6 < length) {
r6 = value6;
continue reducibleLoop5;
}
break reducibleLoop5;
}
}
reducibleJoin10: while (true) {
if (value3) {
break reducibleJoin10;
}
if (env0_7 == null) {
break reducibleJoin10;
}
value7 = _createForOfIteratorHelperLoose_118082(env0_7);
value8 = value7();
done = value8.done;
if (done) {
break reducibleJoin10;
}
r6 = value8;
reducibleLoop9: while (true) {
value9 = r6.value;
push = items2.push;
Reflect.apply(push, items2, [value9]);
value10 = value7();
done = value10.done;
if (done) {
break reducibleJoin10;
}
r6 = value10;
continue reducibleLoop9;
}
}
items3 = [];
reducibleJoin12: while (true) {
if (items2 != null) {
r12 = items2;
break reducibleJoin12;
}
r12 = [];
break reducibleJoin12;
}
length = r12.length;
value11 = undefined;
if (value5 < length) {
r10 = value5;
r11 = value11;
reducibleLoop13: while (true) {
property = r12[r10];
getMemoizedParticipantBinding = getMemoizedParticipant;
PARTICIPANT = VoicePanelCardItemType.PARTICIPANT;
id = property.id;
memoizedParticipantBinding = getMemoizedParticipantBinding({type: PARTICIPANT, id: id}, env0_5);
reducibleJoin16: while (true) {
reducibleJoin15: while (true) {
if (env0_3) {
id = memoizedParticipantBinding.id;
if (id === env0_2) {
r13 = memoizedParticipantBinding;
break reducibleJoin16;
}
break reducibleJoin15;
}
break reducibleJoin15;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_118084(a0, value);
r6 = value;
} else {
r6 = value;
}
push = items3.push;
Reflect.apply(push, items3, [memoizedParticipantBinding]);
r13 = r11;
break reducibleJoin16;
}
value13 = typeof r10 === 'bigint' ? r10 + 1n : +r10 + 1;
length = r12.length;
if (value13 < length) {
r10 = value13;
r11 = r13;
continue reducibleLoop13;
}
r8 = r13;
break reducibleLoop13;
r5 = r6;
}
} else {
r8 = value11;
r5 = value;
}
reducibleJoin19: while (true) {
if (r8 == null) {
break reducibleJoin19;
if (r5) {
if (r5) {
}
push = items3.push;
Reflect.apply(push, items3, [r8]);
break reducibleJoin19;
return _fun118083;
}
binding = env0_3;
reducibleJoin21: while (true) {
if (binding) {
binding = env0_6;
r6 = binding;
break reducibleJoin21;
}
r6 = binding;
break reducibleJoin21;
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 _fun118083() { // fn#118083, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15632:859, 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]};
}
reducibleJoin23: while (true) {
if (r6) {
length = items3.length;
value14 = length === 1;
r6 = value14;
break reducibleJoin23;
}
break reducibleJoin23;
}
reducibleJoin25: while (true) {
if (r6) {
push = items3.push;
getMemoizedParticipantBinding = getMemoizedParticipant;
CTA = VoicePanelCardItemType.CTA;
CALLER_DISCONNECTED = VoicePanelCTACard.CALLER_DISCONNECTED;
Reflect.apply(push, items3, [getMemoizedParticipantBinding({type: CTA, id: CALLER_DISCONNECTED},
env0_5)]);
break reducibleJoin25;
}
break reducibleJoin25;
}
reducibleJoin27: while (true) {
if (value3) {
length = items2.length;
value15 = value5 === length;
r4 = value15;
break reducibleJoin27;
}
r4 = value3;
break reducibleJoin27;
}
reducibleJoin29: while (true) {
if (r4) {
push = items3.push;
getMemoizedParticipantBinding = getMemoizedParticipant;
CTA = VoicePanelCardItemType.CTA;
NO_VIDEO_PARTICIPANTS = VoicePanelCTACard.NO_VIDEO_PARTICIPANTS;
Reflect.apply(push, items3, [getMemoizedParticipantBinding({type: CTA, id: NO_VIDEO_PARTICIPANTS},
env0_5)]);
break reducibleJoin29;
}
break reducibleJoin29;
}
length = items3.length;
reducibleJoin31: while (true) {
if (length > value5) {
r0 = items3;
break reducibleJoin31;
}
binding = env1_14;
r0 = binding;
break reducibleJoin31;
}
} else {
value = SortedVoiceStateStore.getVoiceStatesForChannelAlt(env0_0, require);
value = value.map(_fun118092);
reducibleJoin3: while (true) {
if (value.length > 0) {
r0 = value;
break reducibleJoin3;
}
binding = env1_14;
r0 = binding;
break reducibleJoin3;
}
}
return r0;
}
function _fun118095() { // fn#118095, offset: 0x024cba70, size: 11 bytes, params: 1, frame: 1
return _fun118096;
}
function _fun118097() { // fn#118097, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15632:2859, offset: 0x024cba7b, size: 362 bytes, params: 1, frame: 23
var r8;
var r5;
var r4;
var r0;
var _createForOfIteratorHelperLoose_118082Binding;
var Set;
var items2;
var start;
var end;
var layoutManagerBinding;
var getChunk;
var value3;
var push;
var Array;
var from;
var value4;
var items3;
var value5;
var value6;
var set;
var value8;
var value9;
var done;
var value10;
var getMemoizedParticipantBinding;
var value11;
var voiceParticipantsHidden;
var length;
var value13;
var CTA;
var NO_VIDEO_PARTICIPANTS;
if (env0_4 < 0) {
value = environment.__proto__;
return env1_14;
}
const isInChannel = VoiceStateStore.isInChannel;
let binding = env0_0;
const isInChannel2 = Reflect.apply(isInChannel, VoiceStateStore, [binding, env0_2]);
const items4 = [];
if (isInChannel2) {
_createForOfIteratorHelperLoose_118082Binding = _createForOfIteratorHelperLoose_118082;
Set = global.Set;
items2 = [];
start = require.start;
end = require.end;
if (start <= end) {
r8 = start;
reducibleLoop4: while (true) {
layoutManagerBinding = layoutManager;
getChunk = layoutManagerBinding.getChunk;
value3 = Reflect.apply(getChunk, layoutManagerBinding, [r8]);
push = items2.push;
Array = global.Array;
from = Array.from;
value4 = Reflect.apply(from, Array, [value3]);
function useVoicePanelCards(a0, a1) { // fn#118086, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15632:1425, offset: 0x024cb56e, size: 363 bytes, params: 3, frame: 26
const env0_0 = a0;
const env0_1 = a1;
const id = AuthenticationStore.getId();
const isDM = ChannelStore.getChannel(a0)?.isDM();
const r9 = isDM != null && isDM;
const env0_3 = r9;
const value6 = (UseIsConnectedToVoiceChannel)(a0);
const binding = value6;
const property = env0_3(binding.useState(function() {
var Map = global.Map;
var value = Object.create(Map.prototype, {constructor: {value: Map}});
var value2 = new Map();
return value2 instanceof Object ? value2 : value;
}), 1)[0];
binding.useEffect(function() {
return _fun118089;
}, [property]);
const value9 = (require(566) /* metro dependency 566: flux */).useStateFromStores([RTCConnectionStore], function() {
return RTCConnectionStore.getState() === RTCConnectionStates.RTC_CONNECTED;
});
const value10 = (RTCConnectionDesyncHooksModule).useDesyncedChannelParticipants(a0);
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStoresArray = fluxModule.useStateFromStoresArray;
return {items: Reflect.apply(useStateFromStoresArray, fluxModule, [[ChannelRTCStore, SortedVoiceStateStore],
_fun118091, [value6, value10, a0, a1, property, r9, id, value9]]), isConnected: value6};
function _fun118088() { // fn#118088, offset: 0x024cb6d9, size: 11 bytes, params: 1, frame: 1
return _fun118089;
function _fun118089() { // fn#118089, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15632:1608, offset: 0x024cb6e4, size: 19 bytes, params: 1, frame: 9
return env1_5.clear();
}
}
function _fun118091() { // fn#118091, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15632:1805, offset: 0x024cb718, size: 536 bytes, params: 1, frame: 25
var r0;
var r6;
var r12;
var r10;
var r11;
var r13;
var r8;
var r4;
var binding;
var length;
var channelRTCStoreBinding;
var getVoiceParticipantsHidden;
var value3;
var items2;
var filteredParticipants;
var value5;
var property;
var push;
var value6;
var value7;
var value8;
var done;
var value9;
var value10;
var items3;
var value11;
var getMemoizedParticipantBinding;
var PARTICIPANT;
var id;
var memoizedParticipantBinding;
var value13;
var value14;
var CTA;
var CALLER_DISCONNECTED;
var value15;
var NO_VIDEO_PARTICIPANTS;
var value;
if (ReactModule) {
channelRTCStoreBinding = ChannelRTCStore;
getVoiceParticipantsHidden = channelRTCStoreBinding.getVoiceParticipantsHidden;
binding = env0_0;
value3 = Reflect.apply(getVoiceParticipantsHidden, channelRTCStoreBinding, [binding]);
items2 = [];
filteredParticipants = channelRTCStoreBinding.getFilteredParticipants(binding);
length = filteredParticipants.length;
value5 = 0;
if (value5 < length) {
r6 = value5;
reducibleLoop5: while (true) {
property = filteredParticipants[r6];
push = items2.push;
Reflect.apply(push, items2, [property]);
value6 = typeof r6 === 'bigint' ? r6 + 1n : +r6 + 1;
length = filteredParticipants.length;
if (value6 < length) {
r6 = value6;
continue reducibleLoop5;
}
break reducibleLoop5;
}
}
reducibleJoin10: while (true) {
if (value3) {
break reducibleJoin10;
}
if (env0_7 == null) {
break reducibleJoin10;
}
value7 = _createForOfIteratorHelperLoose_118082(env0_7);
value8 = value7();
done = value8.done;
if (done) {
break reducibleJoin10;
}
r6 = value8;
reducibleLoop9: while (true) {
value9 = r6.value;
push = items2.push;
Reflect.apply(push, items2, [value9]);
value10 = value7();
done = value10.done;
if (done) {
break reducibleJoin10;
}
r6 = value10;
continue reducibleLoop9;
}
}
items3 = [];
arraySpread(items3, value4, 0, value3);
apply(push, items3, items2, value3);
value5 = typeof r8 === 'bigint' ? r8 + 1n : +r8 + 1;
end = require.end;
if (value5 <= end) {
r8 = value5;
continue reducibleLoop4;
reducibleJoin12: while (true) {
if (items2 != null) {
r12 = items2;
break reducibleJoin12;
}
r12 = [];
break reducibleJoin12;
}
break reducibleLoop4;
}
}
value6 = Object.create(Set.prototype, {constructor: {value: Set}});
set = new Set();
value8 = _createForOfIteratorHelperLoose_118082Binding(set instanceof Object ? set : value6);
value9 = value8();
done = value9.done;
if (!done) {
r5 = value9;
reducibleLoop6: while (true) {
value10 = r5.value;
push = items4.push;
Reflect.apply(push, items4, [getMemoizedParticipant(value10, env0_5)]);
value11 = value8();
done = value11.done;
if (done) {
break reducibleLoop6;
length = r12.length;
value11 = undefined;
if (value5 < length) {
r10 = value5;
r11 = value11;
reducibleLoop13: while (true) {
property = r12[r10];
getMemoizedParticipantBinding = getMemoizedParticipant;
PARTICIPANT = VoicePanelCardItemType.PARTICIPANT;
id = property.id;
memoizedParticipantBinding = getMemoizedParticipantBinding({type: PARTICIPANT, id: id}, env0_5);
reducibleJoin16: while (true) {
reducibleJoin15: while (true) {
if (env0_3) {
id = memoizedParticipantBinding.id;
if (id === env0_2) {
r13 = memoizedParticipantBinding;
break reducibleJoin16;
}
break reducibleJoin15;
}
break reducibleJoin15;
}
push = items3.push;
Reflect.apply(push, items3, [memoizedParticipantBinding]);
r13 = r11;
break reducibleJoin16;
}
value13 = typeof r10 === 'bigint' ? r10 + 1n : +r10 + 1;
length = r12.length;
if (value13 < length) {
r10 = value13;
r11 = r13;
continue reducibleLoop13;
}
r8 = r13;
break reducibleLoop13;
}
} else {
r8 = value11;
}
reducibleJoin19: while (true) {
if (r8 == null) {
break reducibleJoin19;
}
push = items3.push;
Reflect.apply(push, items3, [r8]);
break reducibleJoin19;
}
binding = env0_3;
reducibleJoin21: while (true) {
if (binding) {
binding = env0_6;
r6 = binding;
break reducibleJoin21;
}
r6 = binding;
break reducibleJoin21;
}
reducibleJoin23: while (true) {
if (r6) {
length = items3.length;
value14 = length === 1;
r6 = value14;
break reducibleJoin23;
}
break reducibleJoin23;
}
reducibleJoin25: while (true) {
if (r6) {
push = items3.push;
getMemoizedParticipantBinding = getMemoizedParticipant;
CTA = VoicePanelCardItemType.CTA;
CALLER_DISCONNECTED = VoicePanelCTACard.CALLER_DISCONNECTED;
Reflect.apply(push, items3, [getMemoizedParticipantBinding({type: CTA, id: CALLER_DISCONNECTED},
env0_5)]);
break reducibleJoin25;
}
break reducibleJoin25;
}
reducibleJoin27: while (true) {
if (value3) {
length = items2.length;
value15 = value5 === length;
r4 = value15;
break reducibleJoin27;
}
r4 = value3;
break reducibleJoin27;
}
reducibleJoin29: while (true) {
if (r4) {
push = items3.push;
getMemoizedParticipantBinding = getMemoizedParticipant;
CTA = VoicePanelCardItemType.CTA;
NO_VIDEO_PARTICIPANTS = VoicePanelCTACard.NO_VIDEO_PARTICIPANTS;
Reflect.apply(push, items3, [getMemoizedParticipantBinding({type: CTA, id: NO_VIDEO_PARTICIPANTS},
env0_5)]);
break reducibleJoin29;
}
break reducibleJoin29;
}
length = items3.length;
reducibleJoin31: while (true) {
if (length > value5) {
r0 = items3;
break reducibleJoin31;
}
binding = env1_14;
r0 = binding;
break reducibleJoin31;
}
} else {
value = SortedVoiceStateStore.getVoiceStatesForChannelAlt(env0_0, require);
value = value.map(_fun118092);
reducibleJoin3: while (true) {
if (value.length > 0) {
r0 = value;
break reducibleJoin3;
}
binding = env1_14;
r0 = binding;
break reducibleJoin3;
}
r5 = value11;
continue reducibleLoop6;
}
}
voiceParticipantsHidden = ChannelRTCStore.getVoiceParticipantsHidden(env0_0);
reducibleJoin9: while (true) {
if (voiceParticipantsHidden) {
length = items4.length;
value13 = length === 0;
r4 = value13;
break reducibleJoin9;
return r0;
function _fun118092({user}) { // fn#118092, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15632:1863, offset: 0x024cb930, size: 57 bytes, params: 2, frame: 13
const getMemoizedParticipantBinding = getMemoizedParticipant;
const PARTICIPANT = VoicePanelCardItemType.PARTICIPANT;
return getMemoizedParticipantBinding({type: PARTICIPANT, id: user.id}, env1_5);
}
r4 = voiceParticipantsHidden;
break reducibleJoin9;
}
reducibleJoin11: while (true) {
if (r4) {
push = items4.push;
getMemoizedParticipantBinding = getMemoizedParticipant;
CTA = VoicePanelCardItemType.CTA;
NO_VIDEO_PARTICIPANTS = VoicePanelCTACard.NO_VIDEO_PARTICIPANTS;
Reflect.apply(push, items4, [getMemoizedParticipantBinding({type: CTA, id: NO_VIDEO_PARTICIPANTS},
env0_5)]);
break reducibleJoin11;
}
break reducibleJoin11;
}
length = items4.length;
reducibleJoin13: while (true) {
if (length > 0) {
r0 = items4;
break reducibleJoin13;
}
binding = env1_14;
r0 = binding;
break reducibleJoin13;
}
return r0;
}
return items4;
}
function _fun118089() { // fn#118089, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15632:1608, offset: 0x024cb6e4, size: 19 bytes, params: 1, frame: 9
return env1_5.clear();
}
function useChunkedParticipants(a0, a1) { // fn#118093, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15632:2602, offset: 0x024cb969, size: 263 bytes, params: 3, frame: 25
const env0_0 = a0;
const env0_1 = a1;
const id = AuthenticationStore.getId();
const useContext = ReactModule.useContext;
const layoutManager = Reflect.apply(useContext, ReactModule,
[VoicePanelStateContext]).layoutManager;
const layoutManager2 = layoutManager;
const value3 = (VoicePanelCardLayoutManagerModule).useManagerSubscription(layoutManager);
const property = layoutManager2(ReactModule.useState(function() {
var Map = global.Map;
var value = Object.create(Map.prototype, {constructor: {value: Map}});
var value2 = new Map();
return value2 instanceof Object ? value2 : value;
}), 1)[0];
ReactModule.useEffect(function() {
return _fun118096;
}, [property]);
return (FluxModule).useStateFromStoresArray([VoiceStateStore, ChannelRTCStore],
_fun118097, [a0, property, layoutManager, a1, value3, id]);
function _fun118095() { // fn#118095, offset: 0x024cba70, size: 11 bytes, params: 1, frame: 1
return _fun118096;
function _fun118096() { // fn#118096, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15632:2798, offset: 0x024cb6e4, size: 19 bytes, params: 1, frame: 9
return env1_5.clear();
}
}
function _fun118097() { // fn#118097, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15632:2859, offset: 0x024cba7b, size: 362 bytes, params: 1, frame: 23
var r8;
var r5;
var r4;
var r0;
var _createForOfIteratorHelperLoose_118082Binding;
var Set;
var items2;
var start;
var end;
var layoutManagerBinding;
var getChunk;
var value3;
var push;
var Array;
var from;
var value4;
var items3;
var value5;
var value6;
var set;
var value8;
var value9;
var done;
var value10;
var getMemoizedParticipantBinding;
var value11;
var voiceParticipantsHidden;
var length;
var value13;
var CTA;
var NO_VIDEO_PARTICIPANTS;
if (ReactModule < 0) {
value = environment.__proto__;
return env1_14;
}
const voiceStateStoreBinding = VoiceStateStore;
const isInChannel = voiceStateStoreBinding.isInChannel;
let binding = env0_0;
const isInChannel2 = Reflect.apply(isInChannel, voiceStateStoreBinding, [binding, env0_2]);
const items4 = [];
if (isInChannel2) {
_createForOfIteratorHelperLoose_118082Binding = _createForOfIteratorHelperLoose_118082;
Set = global.Set;
items2 = [];
start = require.start;
end = require.end;
if (start <= end) {
r8 = start;
reducibleLoop4: while (true) {
layoutManagerBinding = layoutManager;
getChunk = layoutManagerBinding.getChunk;
value3 = Reflect.apply(getChunk, layoutManagerBinding, [r8]);
push = items2.push;
Array = global.Array;
from = Array.from;
value4 = Reflect.apply(from, Array, [value3]);
items3 = [];
arraySpread(items3, value4, 0, value3);
apply(push, items3, items2, value3);
value5 = typeof r8 === 'bigint' ? r8 + 1n : +r8 + 1;
end = require.end;
if (value5 <= end) {
r8 = value5;
continue reducibleLoop4;
}
break reducibleLoop4;
}
}
value6 = Object.create(Set.prototype, {constructor: {value: Set}});
set = new Set();
value8 = _createForOfIteratorHelperLoose_118082Binding(set instanceof Object ? set : value6);
value9 = value8();
done = value9.done;
if (!done) {
r5 = value9;
reducibleLoop6: while (true) {
value10 = r5.value;
push = items4.push;
Reflect.apply(push, items4, [getMemoizedParticipant(value10, env0_5)]);
value11 = value8();
done = value11.done;
if (done) {
break reducibleLoop6;
}
r5 = value11;
continue reducibleLoop6;
}
}
voiceParticipantsHidden = ChannelRTCStore.getVoiceParticipantsHidden(env0_0);
reducibleJoin9: while (true) {
if (voiceParticipantsHidden) {
length = items4.length;
value13 = length === 0;
r4 = value13;
break reducibleJoin9;
}
r4 = voiceParticipantsHidden;
break reducibleJoin9;
}
reducibleJoin11: while (true) {
if (r4) {
push = items4.push;
getMemoizedParticipantBinding = getMemoizedParticipant;
CTA = VoicePanelCardItemType.CTA;
NO_VIDEO_PARTICIPANTS = VoicePanelCTACard.NO_VIDEO_PARTICIPANTS;
Reflect.apply(push, items4, [getMemoizedParticipantBinding({type: CTA, id: NO_VIDEO_PARTICIPANTS},
env0_5)]);
break reducibleJoin11;
}
break reducibleJoin11;
}
length = items4.length;
reducibleJoin13: while (true) {
if (length > 0) {
r0 = items4;
break reducibleJoin13;
}
binding = env1_14;
r0 = binding;
break reducibleJoin13;
}
return r0;
}
return items4;
}
}
function _fun118092({user}) { // fn#118092, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15632:1863, offset: 0x024cb930, size: 57 bytes, params: 2, frame: 13
const getMemoizedParticipantBinding = getMemoizedParticipant;
const PARTICIPANT = VoicePanelCardItemType.PARTICIPANT;
return getMemoizedParticipantBinding({type: PARTICIPANT, id: user.id}, env1_5);
}
global.__d(_fun118081, 15435, [57, 31, 4606, 1226, 1379, 4294, 4297, 4300, 11795, 661, 15390, 566, 14703, 11794,
11797,
2]) /* metro module 15435, dependencies: [57, 31, 4606, 1226, 1379, 4294, 4297, 4300, 11795, 661, 15390, 566, 14703, 11794, 11797, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,8 +1,10 @@
/* Metro module 15440; source: modules/voice_panel/native/pip/VoicePanelPIPConstants.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun118146(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118146, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15637:6, offset: 0x024cdb4a, size: 182 bytes, params: 8, frame: 16
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/pip/VoicePanelPIPConstants.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/pip/VoicePanelPIPConstants.tsx');
exports.VoicePanelPIPModes = {IN_APP: 'IN_APP', IN_PANEL: 'IN_PANEL'};
exports.PIP_OFFSET_BOTTOM = 44;
exports.PIPReferenceDimensions = {'width': 200, 'height': 200};
@@ -11,3 +13,4 @@ function _fun118146(global, require, importDefault, importAll, module, exports,
exports.DEFAULT_PIP_POSITION_OFFSET = 72;
}
global.__d(_fun118146, 15440, [2]) /* metro module 15440, dependencies: [2] */;
File diff suppressed because it is too large. Load diff
@@ -1,228 +1,235 @@
/* Metro module 15564; source: modules/voice_panel/native/pip/VoicePanelPIPPushToTalkOverlay.tsx; dependencies: [57, 31, 27, 11795, 33, 4017, 6821, 1305, 4501, 697, 10750, 15444, 4577, 15439, 5321, 15565, 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 NativeView from '../../../core/native/NativeView.tsx'; /* Metro dependency 6821 */
import Module15565 from '../../../../by-id/module-15565.js'; /* Metro dependency 15565 */
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 NativeModule from '../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as SpringModule from '../../../../design/animation/reanimated/spring/spring.tsx'; /* Metro dependency 4577 */
import * as Module05321Module from '../../../../by-id/module-05321.js'; /* Metro dependency 5321 */
import * as VoicePanelConstantsModule from '../../VoicePanelConstants.tsx'; /* Metro dependency 11795 */
import * as VoicePanelPIPUtilsModule from './VoicePanelPIPUtils.tsx'; /* Metro dependency 15439 */
import * as VoicePanelPIPStateContextModule from './VoicePanelPIPStateContext.tsx'; /* Metro dependency 15444 */
function _fun119209(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#119209, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15761:6, offset: 0x02501063, size: 533 bytes, params: 8, frame: 23
var object4;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const StyleSheet = (require(27) /* metro dependency 27 */).StyleSheet;
const env0_5 = (require(11795) /* metro dependency 11795: VoicePanelConstants */).PUSH_TO_TALK_PIP_PHYSICS;
let value = require(33) /* metro dependency 33 */;
const StyleSheet = (ReactNativeModule).StyleSheet;
let value = JsxRuntimeModule;
const env0_6 = value.jsx;
const env0_7 = value.Fragment;
const env0_8 = value.jsxs;
value = importDefault(4017) /* metro dependency 4017: ReanimatedRexport */;
let createAnimatedComponent = value.createAnimatedComponent;
const env0_9 = Reflect.apply(createAnimatedComponent, value,
[importDefault(6821) /* metro dependency 6821: NativeView */]);
[NativeView]);
value = importDefault(4017) /* metro dependency 4017: ReanimatedRexport */;
createAnimatedComponent = value.createAnimatedComponent;
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
const Icon = (NativeModule).Icon;
const env0_10 = Reflect.apply(createAnimatedComponent, value, [Icon]);
const env0_11 = {'top': 6, 'bottom': 6, 'left': 6, 'right': 6};
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object4 = {};
const object5 = {'position': 'absolute', 'width': 32, 'height': 32, 'alignItems': 'center',
object = {};
const object2 = {'position': 'absolute', 'width': 32, 'height': 32, 'alignItems': 'center',
'justifyContent': 'center'};
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object4.iconContainer = object5;
const object6 = {};
copyDataProperties(object6, StyleSheet.absoluteFillObject, undefined);
const BLACK = (importDefault(697) /* metro dependency 697: native */).colors.BLACK;
object6['backgroundColor'] = BLACK;
object4.overlay = object6;
const env0_12 = Reflect.apply(createStyles, value, [object4]);
object4 = {code: "function VoicePanelPIPPushToTalkOverlayTsx1(){const{isPushingToTalk,EXPANDED_ICON_SIZE,BASE_ICON_SIZE,withSpring,PUSH_TO_TALK_PIP_PHYSICS,white}=this.__closure;const padding=isPushingToTalk.get()?8*EXPANDED_ICON_SIZE/BASE_ICON_SIZE+8:8;return{right:withSpring(padding,PUSH_TO_TALK_PIP_PHYSICS),bottom:withSpring(padding,PUSH_TO_TALK_PIP_PHYSICS),transform:[{scale:withSpring(isPushingToTalk.get()?EXPANDED_ICON_SIZE/BASE_ICON_SIZE:1,PUSH_TO_TALK_PIP_PHYSICS)}],backgroundColor:withSpring(isPushingToTalk.get()?white:'rgba(0, 0, 0, 0.54)',PUSH_TO_TALK_PIP_PHYSICS)};}"};
object4 = {code: 'function VoicePanelPIPPushToTalkOverlayTsx2(){const{withSpring,isPushingToTalk,black,white,PUSH_TO_TALK_PIP_PHYSICS}=this.__closure;return{tintColor:withSpring(isPushingToTalk.get()?black:white,PUSH_TO_TALK_PIP_PHYSICS)};}'};
object4 = {code: 'function VoicePanelPIPPushToTalkOverlayTsx3(){const{withSpring,isPushingToTalk,PUSH_TO_TALK_PIP_PHYSICS,getVoicePanelPIPBorderRadius,pipState}=this.__closure;return{opacity:withSpring(isPushingToTalk.get()?0.5:0,PUSH_TO_TALK_PIP_PHYSICS),borderRadius:getVoicePanelPIPBorderRadius(pipState.width,pipState.height)};}'};
object4 = {code: 'function VoicePanelPIPPushToTalkOverlayTsx4(event,success){const{runOnJS,handlePushToTalk}=this.__closure;if(!success){return;}runOnJS(handlePushToTalk)(false);}'};
object4 = {code: 'function VoicePanelPIPPushToTalkOverlayTsx5(){const{runOnJS,handlePushToTalk}=this.__closure;runOnJS(handlePushToTalk)(false);}'};
object4 = {code: 'function VoicePanelPIPPushToTalkOverlayTsx6(){const{runOnJS,handlePushToTalk}=this.__closure;runOnJS(handlePushToTalk)(true);}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/pip/VoicePanelPIPPushToTalkOverlay.tsx');
exports.default = VoicePanelPIPPushToTalkOverlay;
}
function VoicePanelPIPPushToTalkOverlay() { // fn#119210, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15761:2268, offset: 0x02501278, size: 743 bytes, params: 1, frame: 30
const value2 = (require(15444) /* metro dependency 15444: VoicePanelPIPStateContext */).usePIPState();
const styles = useStyles();
const value4 = env0_3(usePushToTalk(), 2);
const property = value4[0];
const property2 = value4[1];
const WHITE = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE;
const BLACK = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BLACK;
const env0_4 = BLACK;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
let useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
let closure = VoicePanelPIPPushToTalkOverlayO;
let object2 = {'isPushingToTalk': null, 'EXPANDED_ICON_SIZE': 48, 'BASE_ICON_SIZE': 32};
object2.isPushingToTalk = property;
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object2.PUSH_TO_TALK_PIP_PHYSICS = PUSH_TO_TALK_PIP_PHYSICS;
object2.white = WHITE;
closure.__closure = object2;
closure.__workletHash = 3936373516983;
closure.__initData = env0_13;
const value5 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const moduleValue3 = reanimatedRexportModule;
useAnimatedStyle = moduleValue3.useAnimatedStyle;
closure = VoicePanelPIPPushToTalkOverlayP;
closure.__closure = {withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring,
isPushingToTalk: property, black: BLACK, white: WHITE, PUSH_TO_TALK_PIP_PHYSICS: PUSH_TO_TALK_PIP_PHYSICS};
closure.__workletHash = 11469896791985;
closure.__initData = env0_14;
const value6 = Reflect.apply(useAnimatedStyle, moduleValue3, [closure]);
const moduleValue4 = reanimatedRexportModule;
useAnimatedStyle = moduleValue4.useAnimatedStyle;
closure = VoicePanelPIPPushToTalkOverlayH;
object2 = {withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring, isPushingToTalk: property,
PUSH_TO_TALK_PIP_PHYSICS: PUSH_TO_TALK_PIP_PHYSICS};
const getVoicePanelPIPBorderRadius = (require(15439) /* metro dependency 15439: VoicePanelPIPUtils */).getVoicePanelPIPBorderRadius;
object2.getVoicePanelPIPBorderRadius = getVoicePanelPIPBorderRadius;
object2.pipState = value2;
closure.__closure = object2;
closure.__workletHash = 450590017248;
closure.__initData = env0_15;
const value7 = Reflect.apply(useAnimatedStyle, moduleValue4, [closure]);
let binding = env0_4;
const value8 = binding.useMemo(_fun119216, [property2]);
const jsxRuntimeEnv0_7Binding = jsxRuntimeEnv0_7;
binding = env0_9;
const binding3 = ((Component) => <Component pointerEvents="none" style={[styles.overlay, value7]} />)(binding);
const GestureDetector = (require(5321) /* metro dependency 5321 */).GestureDetector;
const bindingProps = {style: [styles.iconContainer, value5], hitSlop: env0_11};
const binding2 = env0_10;
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
const Sizes = Icon.Sizes;
const SMALL_20 = Sizes.SMALL_20;
return (
<>
{binding3}
<GestureDetector gesture={value8}>
{((Component) => <Component {...bindingProps}>{((Component) => <Component style={value6} size={SMALL_20} source={importDefault(15565) /* metro dependency 15565 */} disableColor />)(binding2)}</Component>)(binding)}
</GestureDetector>
</>
);
}
function usePushToTalk() { // fn#119211, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15761:2353, owner: VoicePanelPIPPushToTalkOverlay.usePushToTalk, offset: 0x0250155f, size: 102 bytes, params: 1, frame: 15
var environment;
const value = environment.__proto__;
const value2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(false);
const binding = env1_4;
const env0_1 = binding.useRef(false);
const useCallback = binding.useCallback;
let items2 = [value2];
items2 = [value2, Reflect.apply(useCallback, binding, [_fun119212, items2])];
return items2;
}
function VoicePanelPIPPushToTalkOverlayO() { // fn#119213, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15761:2658, owner: VoicePanelPIPPushToTalkOverlay.o, offset: 0x02501618, size: 231 bytes, params: 1, frame: 20
const r10 = env0_1.get() ? 20 : 8;
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object.iconContainer = object2;
const object3 = {};
const springModule = require(4577) /* metro dependency 4577: spring */;
let withSpring = springModule.withSpring;
object3.right = Reflect.apply(withSpring, springModule, [r10, PUSH_TO_TALK_PIP_PHYSICS]);
object3.bottom = springModule.withSpring(r10, PUSH_TO_TALK_PIP_PHYSICS);
const object4 = {};
const moduleValue3 = springModule;
object4.scale = moduleValue3.withSpring(env0_1.get() ? 1.5 : 1, PUSH_TO_TALK_PIP_PHYSICS);
object3.transform = [object4];
const moduleValue4 = springModule;
withSpring = moduleValue4.withSpring;
const WHITE2 = env0_1.get() ? WHITE : 'rgba(0, 0, 0, 0.54)';
object3.backgroundColor = Reflect.apply(withSpring, moduleValue4, [WHITE2, PUSH_TO_TALK_PIP_PHYSICS]);
return object3;
}
copyDataProperties(object3, StyleSheet.absoluteFillObject, undefined);
const BLACK = (importDefault(697) /* metro dependency 697: native */).colors.BLACK;
object3['backgroundColor'] = BLACK;
object.overlay = object3;
const env0_12 = Reflect.apply(createStyles, value, [object]);
object = {code: "function VoicePanelPIPPushToTalkOverlayTsx1(){const{isPushingToTalk,EXPANDED_ICON_SIZE,BASE_ICON_SIZE,withSpring,PUSH_TO_TALK_PIP_PHYSICS,white}=this.__closure;const padding=isPushingToTalk.get()?8*EXPANDED_ICON_SIZE/BASE_ICON_SIZE+8:8;return{right:withSpring(padding,PUSH_TO_TALK_PIP_PHYSICS),bottom:withSpring(padding,PUSH_TO_TALK_PIP_PHYSICS),transform:[{scale:withSpring(isPushingToTalk.get()?EXPANDED_ICON_SIZE/BASE_ICON_SIZE:1,PUSH_TO_TALK_PIP_PHYSICS)}],backgroundColor:withSpring(isPushingToTalk.get()?white:'rgba(0, 0, 0, 0.54)',PUSH_TO_TALK_PIP_PHYSICS)};}"};
object = {code: 'function VoicePanelPIPPushToTalkOverlayTsx2(){const{withSpring,isPushingToTalk,black,white,PUSH_TO_TALK_PIP_PHYSICS}=this.__closure;return{tintColor:withSpring(isPushingToTalk.get()?black:white,PUSH_TO_TALK_PIP_PHYSICS)};}'};
object = {code: 'function VoicePanelPIPPushToTalkOverlayTsx3(){const{withSpring,isPushingToTalk,PUSH_TO_TALK_PIP_PHYSICS,getVoicePanelPIPBorderRadius,pipState}=this.__closure;return{opacity:withSpring(isPushingToTalk.get()?0.5:0,PUSH_TO_TALK_PIP_PHYSICS),borderRadius:getVoicePanelPIPBorderRadius(pipState.width,pipState.height)};}'};
object = {code: 'function VoicePanelPIPPushToTalkOverlayTsx4(event,success){const{runOnJS,handlePushToTalk}=this.__closure;if(!success){return;}runOnJS(handlePushToTalk)(false);}'};
object = {code: 'function VoicePanelPIPPushToTalkOverlayTsx5(){const{runOnJS,handlePushToTalk}=this.__closure;runOnJS(handlePushToTalk)(false);}'};
object = {code: 'function VoicePanelPIPPushToTalkOverlayTsx6(){const{runOnJS,handlePushToTalk}=this.__closure;runOnJS(handlePushToTalk)(true);}'};
(FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/pip/VoicePanelPIPPushToTalkOverlay.tsx');
exports.default = VoicePanelPIPPushToTalkOverlay;
function VoicePanelPIPPushToTalkOverlay() { // fn#119210, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15761:2268, offset: 0x02501278, size: 743 bytes, params: 1, frame: 30
const value2 = (VoicePanelPIPStateContextModule).usePIPState();
const styles = useStyles();
const value4 = Module00057(usePushToTalk(), 2);
const property = value4[0];
const property2 = value4[1];
const WHITE = (Native).unsafe_rawColors.WHITE;
const BLACK = (Native).unsafe_rawColors.BLACK;
const BLACK2 = BLACK;
let useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
let closure = VoicePanelPIPPushToTalkOverlayO;
let object = {'isPushingToTalk': null, 'EXPANDED_ICON_SIZE': 48, 'BASE_ICON_SIZE': 32};
object.isPushingToTalk = property;
object.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object.PUSH_TO_TALK_PIP_PHYSICS = PUSH_TO_TALK_PIP_PHYSICS;
object.white = WHITE;
closure.__closure = object;
closure.__workletHash = 3936373516983;
closure.__initData = env0_13;
const value5 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
closure = VoicePanelPIPPushToTalkOverlayP;
closure.__closure = {withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring,
isPushingToTalk: property, black: BLACK, white: WHITE, PUSH_TO_TALK_PIP_PHYSICS: PUSH_TO_TALK_PIP_PHYSICS};
closure.__workletHash = 11469896791985;
closure.__initData = env0_14;
const value6 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
closure = VoicePanelPIPPushToTalkOverlayH;
object = {withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring, isPushingToTalk: property,
PUSH_TO_TALK_PIP_PHYSICS: PUSH_TO_TALK_PIP_PHYSICS};
const getVoicePanelPIPBorderRadius = (VoicePanelPIPUtilsModule).getVoicePanelPIPBorderRadius;
object.getVoicePanelPIPBorderRadius = getVoicePanelPIPBorderRadius;
object.pipState = value2;
closure.__closure = object;
closure.__workletHash = 450590017248;
closure.__initData = env0_15;
const value7 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
let binding = BLACK2;
const value8 = binding.useMemo(_fun119216, [property2]);
const jsxRuntimeEnv0_7Binding = jsxRuntimeEnv0_7;
binding = env0_9;
const binding3 = ((Component) => <Component pointerEvents="none" style={[styles.overlay, value7]} />)(binding);
const GestureDetector = (Module05321Module).GestureDetector;
const bindingProps = {style: [styles.iconContainer, value5], hitSlop: env0_11};
const binding2 = env0_10;
const Icon = (NativeModule).Icon;
const Sizes = Icon.Sizes;
const SMALL_20 = Sizes.SMALL_20;
return (
<>
{binding3}
<GestureDetector gesture={value8}>
{((Component) => <Component {...bindingProps}>{((Component) => <Component style={value6} size={SMALL_20} source={Module15565} disableColor />)(binding2)}</Component>)(binding)}
</GestureDetector>
</>
);
function usePushToTalk() { // fn#119211, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15761:2353, owner: VoicePanelPIPPushToTalkOverlay.usePushToTalk, offset: 0x0250155f, size: 102 bytes, params: 1, frame: 15
var environment;
const value = environment.__proto__;
const value2 = (ReanimatedRexportModule).useSharedValue(false);
const binding = env1_4;
const env0_1 = binding.useRef(false);
const useCallback = binding.useCallback;
let items2 = [value2];
items2 = [value2, Reflect.apply(useCallback, binding, [_fun119212, items2])];
return items2;
function _fun119212(a0) { // fn#119212, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15761:2443, offset: 0x025015c5, size: 83 bytes, params: 2, frame: 13
var value2;
if (a0 !== env0_1.current) {
env0_1.current = a0;
value2 = environment.__proto__.__proto__;
(require(10750) /* metro dependency 10750: MediaEngineActionCreators */).setPushToTalkState(a0);
env0_0.set(a0);
}
}
function VoicePanelPIPPushToTalkOverlayP() { // fn#119214, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15761:3105, owner: VoicePanelPIPPushToTalkOverlay.P, offset: 0x025016ff, size: 78 bytes, params: 1, frame: 16
const springModule = require(4577) /* metro dependency 4577: spring */;
const withSpring = springModule.withSpring;
const binding = env0_1;
const get = binding.get;
return {tintColor: Reflect.apply(withSpring, springModule, [Reflect.apply(get, binding, []) ? BLACK : WHITE,
PUSH_TO_TALK_PIP_PHYSICS])};
}
}
function VoicePanelPIPPushToTalkOverlayH() { // fn#119215, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15761:3355, owner: VoicePanelPIPPushToTalkOverlay.H, offset: 0x0250174d, size: 129 bytes, params: 1, frame: 17
const object2 = {};
let value = environment.__proto__;
const springModule = require(4577) /* metro dependency 4577: spring */;
const withSpring = springModule.withSpring;
let binding = env0_1;
object2.opacity = Reflect.apply(withSpring, springModule, [binding.get() ? 0.5 : 0, PUSH_TO_TALK_PIP_PHYSICS]);
value = require(15439) /* metro dependency 15439: VoicePanelPIPUtils */;
const getVoicePanelPIPBorderRadius = value.getVoicePanelPIPBorderRadius;
binding = env0_0;
object2.borderRadius = Reflect.apply(getVoicePanelPIPBorderRadius, value, [binding.width, binding.height]);
return object2;
}
function VoicePanelPIPPushToTalkOverlayO() { // fn#119213, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15761:2658, owner: VoicePanelPIPPushToTalkOverlay.o, offset: 0x02501618, size: 231 bytes, params: 1, frame: 20
const r10 = env0_1.get() ? 20 : 8;
const object = {};
let withSpring = SpringModule.withSpring;
object.right = Reflect.apply(withSpring, SpringModule, [r10, PUSH_TO_TALK_PIP_PHYSICS]);
object.bottom = SpringModule.withSpring(r10, PUSH_TO_TALK_PIP_PHYSICS);
const object2 = {};
object2.scale = SpringModule.withSpring(env0_1.get() ? 1.5 : 1, PUSH_TO_TALK_PIP_PHYSICS);
object.transform = [object2];
withSpring = SpringModule.withSpring;
const WHITE2 = env0_1.get() ? WHITE : 'rgba(0, 0, 0, 0.54)';
object.backgroundColor = Reflect.apply(withSpring, SpringModule, [WHITE2, PUSH_TO_TALK_PIP_PHYSICS]);
return object;
}
function _fun119216() { // fn#119216, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15761:3716, offset: 0x025017ce, size: 373 bytes, params: 1, frame: 24
const Gesture = (require(5321) /* metro dependency 5321 */).Gesture;
const Exclusive = Gesture.Exclusive;
const Gesture2 = (require(5321) /* metro dependency 5321 */).Gesture;
const value3 = Gesture2.Tap().maxDistance(30);
const onEnd = value3.onEnd;
let closure = o_119217;
const runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
const binding = env0_2;
closure.__closure = {runOnJS: runOnJS, handlePushToTalk: binding};
closure.__workletHash = 13736796804739;
closure.__initData = env1_16;
const value5 = Reflect.apply(onEnd, value3, [closure]);
const Gesture3 = (require(5321) /* metro dependency 5321 */).Gesture;
const shouldCancelWhenOutside2 = Gesture3.Pan().maxPointers(1).shouldCancelWhenOutside(false);
const onBegin = shouldCancelWhenOutside2.onBegin;
closure = t_119218;
closure.__closure = {runOnJS: runOnJS, handlePushToTalk: binding};
closure.__workletHash = 246779667986;
closure.__initData = env1_18;
const value8 = Reflect.apply(onBegin, shouldCancelWhenOutside2, [closure]);
const onFinalize = value8.onFinalize;
closure = n_119219;
closure.__closure = {runOnJS: runOnJS, handlePushToTalk: binding};
closure.__workletHash = 12223608557562;
closure.__initData = env1_17;
return Reflect.apply(Exclusive, Gesture, [value5, Reflect.apply(onFinalize, value8, [closure])]);
}
function VoicePanelPIPPushToTalkOverlayP() { // fn#119214, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15761:3105, owner: VoicePanelPIPPushToTalkOverlay.P, offset: 0x025016ff, size: 78 bytes, params: 1, frame: 16
const withSpring = SpringModule.withSpring;
const binding = env0_1;
const get = binding.get;
return {tintColor: Reflect.apply(withSpring, SpringModule, [Reflect.apply(get, binding, []) ? BLACK : WHITE,
PUSH_TO_TALK_PIP_PHYSICS])};
}
function VoicePanelPIPPushToTalkOverlayH() { // fn#119215, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15761:3355, owner: VoicePanelPIPPushToTalkOverlay.H, offset: 0x0250174d, size: 129 bytes, params: 1, frame: 17
const object = {};
let value = environment.__proto__;
const withSpring = SpringModule.withSpring;
let binding = env0_1;
object.opacity = Reflect.apply(withSpring, SpringModule, [binding.get() ? 0.5 : 0, PUSH_TO_TALK_PIP_PHYSICS]);
value = require(15439) /* metro dependency 15439: VoicePanelPIPUtils */;
const getVoicePanelPIPBorderRadius = value.getVoicePanelPIPBorderRadius;
binding = env0_0;
object.borderRadius = Reflect.apply(getVoicePanelPIPBorderRadius, value, [binding.width, binding.height]);
return object;
}
function _fun119216() { // fn#119216, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15761:3716, offset: 0x025017ce, size: 373 bytes, params: 1, frame: 24
const Gesture = (Module05321Module).Gesture;
const Exclusive = Gesture.Exclusive;
const Gesture2 = (Module05321Module).Gesture;
const value3 = Gesture2.Tap().maxDistance(30);
const onEnd = value3.onEnd;
let closure = o_119217;
const runOnJS = (ReanimatedRexportModule).runOnJS;
const binding = env0_2;
closure.__closure = {runOnJS: runOnJS, handlePushToTalk: binding};
closure.__workletHash = 13736796804739;
closure.__initData = env1_16;
const value5 = Reflect.apply(onEnd, value3, [closure]);
const Gesture3 = (Module05321Module).Gesture;
const shouldCancelWhenOutside2 = Gesture3.Pan().maxPointers(1).shouldCancelWhenOutside(false);
const onBegin = shouldCancelWhenOutside2.onBegin;
closure = t_119218;
closure.__closure = {runOnJS: runOnJS, handlePushToTalk: binding};
closure.__workletHash = 246779667986;
closure.__initData = env1_18;
const value8 = Reflect.apply(onBegin, shouldCancelWhenOutside2, [closure]);
const onFinalize = value8.onFinalize;
closure = n_119219;
closure.__closure = {runOnJS: runOnJS, handlePushToTalk: binding};
closure.__workletHash = 12223608557562;
closure.__initData = env1_17;
return Reflect.apply(Exclusive, Gesture, [value5, Reflect.apply(onFinalize, value8, [closure])]);
function o_119217(a0, a1) { // fn#119217, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15761:3804, offset: 0x02501943, size: 59 bytes, params: 3, frame: 12
var value;
var runOnJS;
var value2;
if (a1) {
value = environment.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
runOnJS = value.runOnJS;
value2 = environment.__proto__;
value = Reflect.apply(runOnJS, value, [env1_2]);
value(false);
}
}
function t_119218() { // fn#119218, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15761:4027, offset: 0x0250197e, size: 51 bytes, params: 1, frame: 12
let value = environment.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value = value.runOnJS(env1_2);
value(true);
}
function n_119219() { // fn#119219, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15761:4182, offset: 0x025019b1, size: 51 bytes, params: 1, frame: 12
let value = environment.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value = value.runOnJS(env1_2);
value(false);
}
}
function _fun119212(a0) { // fn#119212, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15761:2443, offset: 0x025015c5, size: 83 bytes, params: 2, frame: 13
var value2;
if (a0 !== env0_1.current) {
env0_1.current = a0;
value2 = environment.__proto__.__proto__;
(require(10750) /* metro dependency 10750: MediaEngineActionCreators */).setPushToTalkState(a0);
env0_0.set(a0);
}
}
function o_119217(a0, a1) { // fn#119217, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15761:3804, offset: 0x02501943, size: 59 bytes, params: 3, frame: 12
var value;
var runOnJS;
var value2;
if (a1) {
value = environment.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
runOnJS = value.runOnJS;
value2 = environment.__proto__;
value = Reflect.apply(runOnJS, value, [env1_2]);
value(false);
}
}
function t_119218() { // fn#119218, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15761:4027, offset: 0x0250197e, size: 51 bytes, params: 1, frame: 12
let value = environment.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value = value.runOnJS(env1_2);
value(true);
}
function n_119219() { // fn#119219, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15761:4182, offset: 0x025019b1, size: 51 bytes, params: 1, frame: 12
let value = environment.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value = value.runOnJS(env1_2);
value(false);
}
global.__d(_fun119209, 15564, [57, 31, 27, 11795, 33, 4017, 6821, 1305, 4501, 697, 10750, 15444, 4577, 15439, 5321,
15565,
2]) /* metro module 15564, dependencies: [57, 31, 27, 11795, 33, 4017, 6821, 1305, 4501, 697, 10750, 15444, 4577, 15439, 5321, 15565, 2] */;
@@ -1,12 +1,20 @@
/* Metro module 15444; source: modules/voice_panel/native/pip/VoicePanelPIPStateContext.tsx; dependencies: [31, 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 */
function _fun118169(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118169, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15641:6, offset: 0x024ce7f1, size: 153 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
let value = ReactModule;
value = value.createContext({'id': null, 'mode': null, 'width': 0, 'height': 0, 'containerHeight': 0,
'showSecondaryPIP': false, id: undefined, mode: undefined});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/pip/VoicePanelPIPStateContext.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/pip/VoicePanelPIPStateContext.tsx');
exports.VoicePanelPIPStateContext = value;
exports.usePIPState = usePIPState;
function usePIPState() { // fn#118170, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15641:342, offset: 0x01ee8a20, size: 24 bytes, params: 1, frame: 11
return env0_0.useContext(env0_1);
}
}
global.__d(_fun118169, 15444, [31, 2]) /* metro module 15444, dependencies: [31, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,128 +1,144 @@
/* Metro module 15566; source: modules/voice_panel/native/pip/VoicePanelSecondaryPIPContent.tsx; dependencies: [31, 1378, 8065, 1379, 4237, 8044, 8066, 33, 4501, 11794, 15444, 566, 3774, 11624, 8102, 4017, 15373, 6821, 8141, 15397, 10704, 2] */
import EmbeddedActivitiesStore from '../../../activities/EmbeddedActivitiesStore.tsx'; /* Metro dependency 1378 */
import ChannelStore from '../../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import FramesStore from '../../../frames/FramesStore.tsx'; /* Metro dependency 8065 */
import VoicePanelStateContext from '../VoicePanelStateContext.tsx'; /* Metro dependency 11794 */
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 ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as ConstantsModule from '../../../activities/Constants.tsx'; /* Metro dependency 4237 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as ActivityPanelConstantsModule from '../../../activities/panel/ActivityPanelConstants.tsx'; /* Metro dependency 8044 */
import * as FramesConstantsModule from '../../../frames/FramesConstants.tsx'; /* Metro dependency 8066 */
import * as VoicePanelPIPStateContextModule from './VoicePanelPIPStateContext.tsx'; /* Metro dependency 15444 */
function _fun119221(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#119221, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15763:6, offset: 0x02501a2a, size: 311 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const embeddedActivitiesStore = importDefault(1378) /* metro dependency 1378: EmbeddedActivitiesStore */;
const framesStore = importDefault(8065) /* metro dependency 8065: FramesStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const env0_7 = (require(4237) /* metro dependency 4237: Constants */).ActivityLayoutMode;
const env0_8 = (require(8044) /* metro dependency 8044: ActivityPanelConstants */).ActivityPanelModes;
const env0_9 = (require(8066) /* metro dependency 8066: FramesConstants */).FrameLayoutModes;
const env0_10 = (require(33) /* metro dependency 33 */).jsx;
const env0_11 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({activityContainer: {flex: 1}});
const env0_11 = (CreateStylesModule).createStyles({activityContainer: {flex: 1}});
object = {code: "function VoicePanelSecondaryPIPContentTsx1(){const{getActivityContainerPipStylesSpec,pipState,activePipOrientationLockState,windowDimensions}=this.__closure;const{width:width,height:height,shouldVerticallyCenter:shouldVerticallyCenter,shouldHorizontallyCenter:shouldHorizontallyCenter,marginLeft:marginLeft,marginTop:marginTop}=getActivityContainerPipStylesSpec({pipWidth:pipState.width,pipHeight:pipState.height,pipOrientationLockState:activePipOrientationLockState,isLandscape:windowDimensions.get().landscape});return{width:width,height:height,left:shouldHorizontallyCenter?'50%':'0%',top:shouldVerticallyCenter?'50%':'0%',marginLeft:marginLeft,marginTop:marginTop};}"};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/pip/VoicePanelSecondaryPIPContent.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/pip/VoicePanelSecondaryPIPContent.tsx');
exports.default = VoicePanelSecondaryPIPContent;
}
function VoicePanelSecondaryPIPContent() { // fn#119222, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15763:1079, offset: 0x02501b61, size: 702 bytes, params: 1, frame: 28
var r7;
var r0;
var defaultImport;
var defaultImport2;
const useContext = ReactModule.useContext;
const windowDimensions = Reflect.apply(useContext, ReactModule,
[VoicePanelStateContext]).windowDimensions;
const value2 = (VoicePanelPIPStateContextModule).usePIPState();
const styles = useStyles();
const useStateFromStoresObject = FluxModule.useStateFromStoresObject;
let object = [EmbeddedActivitiesStore];
const {connectedEmbeddedActivityChannelId, connectedEmbeddedActivity, pipOrientationLockState,
panelMode} = Reflect.apply(useStateFromStoresObject, FluxModule, [object, _fun119223]);
const {connectedFrame, framePanelMode,
framePipOrientationLockState} = FluxModule.useStateFromStoresObject([FramesStore], _fun119224);
const channel = FluxModule.useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(connectedEmbeddedActivityChannelId);
});
const value5 = ReactModule.useMemo(_fun119226, [value2.width, value2.height]);
const value6 = null;
const r1 = value6 != connectedEmbeddedActivity && !(importDefault(8102) /* metro dependency 8102: isVoiceEmbeddedActivity */)(connectedEmbeddedActivityChannelId) && panelMode === ActivityPanelModes.PIP;
const r12 = value6 != connectedFrame && framePanelMode === ActivityPanelModes.PIP ? framePipOrientationLockState : pipOrientationLockState;
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
const VoicePanelSecondaryPIPContentP2 = VoicePanelSecondaryPIPContentP;
VoicePanelSecondaryPIPContentP2.__closure = {getActivityContainerPipStylesSpec: importDefault(15373) /* metro dependency 15373: getActivityContainerPIPStylesSpec */,
pipState: value2, activePipOrientationLockState: r12, windowDimensions: windowDimensions};
VoicePanelSecondaryPIPContentP2.__workletHash = 12186082276755;
VoicePanelSecondaryPIPContentP2.__initData = env0_12;
const value12 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [VoicePanelSecondaryPIPContentP2]);
if (r1) {
defaultImport = importDefault(6821) /* metro dependency 6821: NativeView */;
object = {style: value5, pointerEvents: 'none'};
defaultImport2 = importDefault(8141) /* metro dependency 8141: ReanimatedNativeView */;
var defaultImport2Props = {style: [styles.activityContainer, value12]};
r7 = (
r7
? ((Component) => <Component layoutMode={FrameLayoutModes.PIP} />)(importDefault(15397) /* metro dependency 15397: FrameView */)
: ((Component) => <Component channel={channel} layoutMode={ActivityLayoutMode.PIP} />)(importDefault(10704) /* metro dependency 10704: EmbeddedActivityView */)
);
r0 = ((Component) => <Component {...object}>{((Component) => <Component {...defaultImport2Props}>{r7}</Component>)(defaultImport2)}</Component>)(defaultImport);
} else if (r7) {
defaultImport = importDefault(6821) /* metro dependency 6821: NativeView */;
object = {style: value5, pointerEvents: 'none'};
defaultImport2 = importDefault(8141) /* metro dependency 8141: ReanimatedNativeView */;
var defaultImport2Props = {style: [styles.activityContainer, value12]};
r7 = (
r7
? ((Component) => <Component layoutMode={FrameLayoutModes.PIP} />)(importDefault(15397) /* metro dependency 15397: FrameView */)
: ((Component) => <Component channel={channel} layoutMode={ActivityLayoutMode.PIP} />)(importDefault(10704) /* metro dependency 10704: EmbeddedActivityView */)
);
r0 = ((Component) => <Component {...object}>{((Component) => <Component {...defaultImport2Props}>{r7}</Component>)(defaultImport2)}</Component>)(defaultImport);
} else {
r0 = value6;
}
return r0;
function _fun119223() { // fn#119223, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15763:1239, offset: 0x02501e1f, size: 139 bytes, params: 1, frame: 18
const embeddedActivitiesStoreBinding = EmbeddedActivitiesStore;
const connectedActivityLocation = embeddedActivitiesStoreBinding.getConnectedActivityLocation();
const selfEmbeddedActivityForLocation = embeddedActivitiesStoreBinding.getSelfEmbeddedActivityForLocation(connectedActivityLocation);
const value4 = undefined;
const applicationId = selfEmbeddedActivityForLocation == null ? value4 : selfEmbeddedActivityForLocation.applicationId;
const object = {};
object.connectedEmbeddedActivityChannelId = (require(3774) /* metro dependency 3774: embeddedActivityLocationUtils */).getEmbeddedActivityLocationChannelId(connectedActivityLocation);
object.connectedEmbeddedActivity = selfEmbeddedActivityForLocation;
object.pipOrientationLockState = applicationId == null ? value4 : EmbeddedActivitiesStore.getPipOrientationLockStateForApp(applicationId);
object.panelMode = EmbeddedActivitiesStore.getActivityPanelMode();
return object;
}
function _fun119224() { // fn#119224, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15763:1745, offset: 0x02501eaa, size: 90 bytes, params: 1, frame: 15
const value = environment.__proto__;
const connectedFrame = FramesStore.getConnectedFrame();
const value3 = undefined;
const applicationId = connectedFrame == null ? value3 : connectedFrame.applicationId;
const object = {connectedFrame: connectedFrame};
object.framePanelMode = FramesStore.getActivityPanelMode();
object.framePipOrientationLockState = applicationId == null ? value3 : FramesStore.getPipOrientationLockStateForApp(applicationId);
return object;
}
function _fun119226() { // fn#119226, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15763:2123, offset: 0x02501f1e, size: 118 bytes, params: 1, frame: 17
const object = {'width': null, 'height': null, 'position': 'absolute', 'left': '50%', 'marginLeft': null,
'top': '50%'};
const widthBinding = width;
object.width = widthBinding;
const heightBinding = height;
object.height = heightBinding;
let value = environment.__proto__;
value = importDefault(11624) /* metro dependency 11624: roundToNearestPixel */;
value = value(widthBinding / 2);
object.marginLeft = -1 * value;
object.marginTop = -1 * (importDefault(11624) /* metro dependency 11624: roundToNearestPixel */)(heightBinding / 2);
return object;
}
function VoicePanelSecondaryPIPContentP() { // fn#119227, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15763:2348, owner: VoicePanelSecondaryPIPContent.P, offset: 0x02501f94, size: 181 bytes, params: 1, frame: 14
let value = environment.__proto__;
value = importDefault(15373) /* metro dependency 15373: getActivityContainerPIPStylesSpec */;
let {width, height} = env0_1;
const windowDimensionsBinding = windowDimensions;
const get = windowDimensionsBinding.get;
value = value({pipWidth: width, pipHeight: height, pipOrientationLockState: env0_5, isLandscape: Reflect.apply(get,
windowDimensionsBinding, []).landscape});
width = value.width;
height = value.height;
const shouldVerticallyCenter = value.shouldVerticallyCenter;
const shouldHorizontallyCenter = value.shouldHorizontallyCenter;
const value3 = '0%';
return {width: width, height: height, left: shouldHorizontallyCenter ? '50%' : value3,
top: shouldVerticallyCenter ? '50%' : value3, marginLeft: value.marginLeft, marginTop: value.marginTop};
}
function VoicePanelSecondaryPIPContent() { // fn#119222, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15763:1079, offset: 0x02501b61, size: 702 bytes, params: 1, frame: 28
var r7;
var r0;
var defaultImport;
var defaultImport2;
const binding = env0_3;
const useContext = binding.useContext;
const windowDimensions = Reflect.apply(useContext, binding,
[importDefault(11794) /* metro dependency 11794: VoicePanelStateContext */]).windowDimensions;
const value2 = (require(15444) /* metro dependency 15444: VoicePanelPIPStateContext */).usePIPState();
const styles = useStyles();
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStoresObject = fluxModule.useStateFromStoresObject;
let object = [EmbeddedActivitiesStore];
const {connectedEmbeddedActivityChannelId, connectedEmbeddedActivity, pipOrientationLockState,
panelMode} = Reflect.apply(useStateFromStoresObject, fluxModule, [object, _fun119223]);
const {connectedFrame, framePanelMode,
framePipOrientationLockState} = fluxModule.useStateFromStoresObject([FramesStore], _fun119224);
const channel = fluxModule.useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(connectedEmbeddedActivityChannelId);
});
const value5 = binding.useMemo(_fun119226, [value2.width, value2.height]);
const value6 = null;
const r1 = value6 != connectedEmbeddedActivity && !(importDefault(8102) /* metro dependency 8102: isVoiceEmbeddedActivity */)(connectedEmbeddedActivityChannelId) && panelMode === ActivityPanelModes.PIP;
const r12 = value6 != connectedFrame && framePanelMode === ActivityPanelModes.PIP ? framePipOrientationLockState : pipOrientationLockState;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = VoicePanelSecondaryPIPContentP;
closure.__closure = {getActivityContainerPipStylesSpec: importDefault(15373) /* metro dependency 15373: getActivityContainerPIPStylesSpec */,
pipState: value2, activePipOrientationLockState: r12, windowDimensions: windowDimensions};
closure.__workletHash = 12186082276755;
closure.__initData = env0_12;
const value12 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
if (r1) {
defaultImport = importDefault(6821) /* metro dependency 6821: NativeView */;
object = {style: value5, pointerEvents: 'none'};
defaultImport2 = importDefault(8141) /* metro dependency 8141: ReanimatedNativeView */;
var defaultImport2Props = {style: [styles.activityContainer, value12]};
r7 = r7 ? ((Component) => <Component layoutMode={FrameLayoutModes.PIP} />)(importDefault(15397) /* metro dependency 15397: FrameView */) : ((Component) => <Component channel={channel} layoutMode={ActivityLayoutMode.PIP} />)(importDefault(10704) /* metro dependency 10704: EmbeddedActivityView */);
r0 = ((Component) => <Component {...object}>{((Component) => <Component {...defaultImport2Props}>{r7}</Component>)(defaultImport2)}</Component>)(defaultImport);
} else if (r7) {
defaultImport = importDefault(6821) /* metro dependency 6821: NativeView */;
object = {style: value5, pointerEvents: 'none'};
defaultImport2 = importDefault(8141) /* metro dependency 8141: ReanimatedNativeView */;
var defaultImport2Props = {style: [styles.activityContainer, value12]};
r7 = r7 ? ((Component) => <Component layoutMode={FrameLayoutModes.PIP} />)(importDefault(15397) /* metro dependency 15397: FrameView */) : ((Component) => <Component channel={channel} layoutMode={ActivityLayoutMode.PIP} />)(importDefault(10704) /* metro dependency 10704: EmbeddedActivityView */);
r0 = ((Component) => <Component {...object}>{((Component) => <Component {...defaultImport2Props}>{r7}</Component>)(defaultImport2)}</Component>)(defaultImport);
} else {
r0 = value6;
}
return r0;
}
function _fun119223() { // fn#119223, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15763:1239, offset: 0x02501e1f, size: 139 bytes, params: 1, frame: 18
const connectedActivityLocation = EmbeddedActivitiesStore.getConnectedActivityLocation();
const selfEmbeddedActivityForLocation = EmbeddedActivitiesStore.getSelfEmbeddedActivityForLocation(connectedActivityLocation);
const value4 = undefined;
const applicationId = selfEmbeddedActivityForLocation == null ? value4 : selfEmbeddedActivityForLocation.applicationId;
const object2 = {};
object2.connectedEmbeddedActivityChannelId = (require(3774) /* metro dependency 3774: embeddedActivityLocationUtils */).getEmbeddedActivityLocationChannelId(connectedActivityLocation);
object2.connectedEmbeddedActivity = selfEmbeddedActivityForLocation;
object2.pipOrientationLockState = applicationId == null ? value4 : EmbeddedActivitiesStore.getPipOrientationLockStateForApp(applicationId);
object2.panelMode = EmbeddedActivitiesStore.getActivityPanelMode();
return object2;
}
function _fun119224() { // fn#119224, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15763:1745, offset: 0x02501eaa, size: 90 bytes, params: 1, frame: 15
const value = environment.__proto__;
const connectedFrame = FramesStore.getConnectedFrame();
const value3 = undefined;
const applicationId = connectedFrame == null ? value3 : connectedFrame.applicationId;
const object2 = {connectedFrame: connectedFrame};
object2.framePanelMode = FramesStore.getActivityPanelMode();
object2.framePipOrientationLockState = applicationId == null ? value3 : FramesStore.getPipOrientationLockStateForApp(applicationId);
return object2;
}
function _fun119226() { // fn#119226, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15763:2123, offset: 0x02501f1e, size: 118 bytes, params: 1, frame: 17
const object2 = {'width': null, 'height': null, 'position': 'absolute', 'left': '50%', 'marginLeft': null,
'top': '50%'};
const widthBinding = width;
object2.width = widthBinding;
const heightBinding = height;
object2.height = heightBinding;
let value = environment.__proto__;
value = importDefault(11624) /* metro dependency 11624: roundToNearestPixel */;
value = value(widthBinding / 2);
object2.marginLeft = -1 * value;
object2.marginTop = -1 * (importDefault(11624) /* metro dependency 11624: roundToNearestPixel */)(heightBinding / 2);
return object2;
}
function VoicePanelSecondaryPIPContentP() { // fn#119227, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15763:2348, owner: VoicePanelSecondaryPIPContent.P, offset: 0x02501f94, size: 181 bytes, params: 1, frame: 14
let value = environment.__proto__;
value = importDefault(15373) /* metro dependency 15373: getActivityContainerPIPStylesSpec */;
let {width, height} = env0_1;
const windowDimensionsBinding = windowDimensions;
const get = windowDimensionsBinding.get;
value = value({pipWidth: width, pipHeight: height, pipOrientationLockState: env0_5, isLandscape: Reflect.apply(get,
windowDimensionsBinding, []).landscape});
width = value.width;
height = value.height;
const shouldVerticallyCenter = value.shouldVerticallyCenter;
const shouldHorizontallyCenter = value.shouldHorizontallyCenter;
const value3 = '0%';
return {width: width, height: height, left: shouldHorizontallyCenter ? '50%' : value3,
top: shouldVerticallyCenter ? '50%' : value3, marginLeft: value.marginLeft, marginTop: value.marginTop};
}
global.__d(_fun119221, 15566, [31, 1378, 8065, 1379, 4237, 8044, 8066, 33, 4501, 11794, 15444, 566, 3774, 11624,
8102, 4017, 15373, 6821, 8141, 15397, 10704,
2]) /* metro module 15566, dependencies: [31, 1378, 8065, 1379, 4237, 8044, 8066, 33, 4501, 11794, 15444, 566, 3774, 11624, 8102, 4017, 15373, 6821, 8141, 15397, 10704, 2] */;
@@ -1,4 +1,22 @@
/* Metro module 15436; source: modules/voice_panel/native/pip/useControllerPIPState.tsx; dependencies: [57, 31, 1378, 4606, 8065, 1379, 4607, 11795, 8044, 15390, 566, 3774, 8448, 7739, 15437, 11383, 15438, 15439, 15441, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import EmbeddedActivitiesStore from '../../../activities/EmbeddedActivitiesStore.tsx'; /* Metro dependency 1378 */
import ChannelStore from '../../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import ChannelRTCStore from '../../../calls/ChannelRTCStore.tsx'; /* Metro dependency 4606 */
import SpeakingStore from '../../../../stores/SpeakingStore.tsx'; /* Metro dependency 4607 */
import FramesStore from '../../../frames/FramesStore.tsx'; /* Metro dependency 8065 */
import UseIsConnectedToVoiceChannel from '../hooks/useIsConnectedToVoiceChannel.tsx'; /* Metro dependency 15390 */
import UseSelfHasVideo from '../utils/useSelfHasVideo.tsx'; /* Metro dependency 15437 */
import CalculatePIPState from '../utils/calculatePIPState.tsx'; /* Metro dependency 15438 */
import UseExternalPipAspectRatioUpdaterNative from '../../../external_pip/useExternalPipAspectRatioUpdater.native.tsx'; /* Metro dependency 15441 */
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 FluxModule from '../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as CheapWorkletShallowEqualModule from '../../../reanimated/native/cheapWorkletShallowEqual.tsx'; /* Metro dependency 7739 */
import * as ActivityPanelConstantsModule from '../../../activities/panel/ActivityPanelConstants.tsx'; /* Metro dependency 8044 */
import * as VoicePanelConstantsModule from '../../VoicePanelConstants.tsx'; /* Metro dependency 11795 */
import * as VoicePanelPIPUtilsModule from './VoicePanelPIPUtils.tsx'; /* Metro dependency 15439 */
function _fun118098(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118098, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15633:6, offset: 0x024cbbe5, size: 283 bytes, params: 8, frame: 19
const env0_0 = require;
const _arrayLikeToArray_118101 = function(a0, a1) {
@@ -46,262 +64,273 @@ function _fun118098(global, require, importDefault, importAll, module, exports,
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const embeddedActivitiesStore = importDefault(1378) /* metro dependency 1378: EmbeddedActivitiesStore */;
const channelRTCStore = importDefault(4606) /* metro dependency 4606: ChannelRTCStore */;
const framesStore = importDefault(8065) /* metro dependency 8065: FramesStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const speakingStore = importDefault(4607) /* metro dependency 4607: SpeakingStore */;
const env0_10 = (require(11795) /* metro dependency 11795: VoicePanelConstants */).VoicePanelModes;
const env0_11 = (require(8044) /* metro dependency 8044: ActivityPanelConstants */).ActivityPanelModes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/pip/useControllerPIPState.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/pip/useControllerPIPState.tsx');
exports.useControllerPIPState = useControllerPIPState;
}
function _createForOfIteratorHelperLoose_118099(a0, a1) { // fn#118099, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15633:228, offset: 0x024cbd00, 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_118099(a0, a1) { // fn#118099, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15633:228, offset: 0x024cbd00, 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 _fun118100;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_118101(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 _fun118100;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_118101(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_118101(a0, value);
r6 = value;
} else {
r6 = value;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_118101(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
r5 = r6;
} else {
r5 = value;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
if (r5) {
}
return _fun118100;
}
return _fun118100;
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 _fun118100() { // fn#118100, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15633:799, 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]};
}
}
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 useControllerPIPState({channelId, connected, focusedId, layoutManager, mode}) { // fn#118102, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15633:1255, offset: 0x024cbe74, size: 613 bytes, params: 2, frame: 35
var object2;
let binding = env0_4;
const value3 = binding.useRef({'id': null, 'mode': null, 'width': 0, 'height': 0, 'containerHeight': 0,
'showSecondaryPIP': false, id: undefined, mode: undefined});
let useState = binding.useState;
const value4 = Reflect.apply(useState, binding, [undefined]);
const binding2 = env0_3;
const value5 = binding2(value4, 2);
const property = value5[0];
var env0_4 = value5[1];
const env0_5 = binding.useRef(property);
binding.useInsertionEffect(_fun118103);
const value6 = useShowSecondaryPIP({channelId: channelId, mode: mode});
const value7 = (importDefault(15437) /* metro dependency 15437: useSelfHasVideo */)(channelId);
useState = binding.useState;
const property2 = binding2(Reflect.apply(useState, binding, [_fun118106]), 1)[0];
binding.useLayoutEffect(function() {
return _fun118109;
}, [property2]);
useState = binding.useState;
const value8 = binding2(Reflect.apply(useState, binding, [function() {
return layoutManager.getTargetDimensions(focusedId);
}]), 2);
const property3 = value8[0];
const env0_7 = value8[1];
const {participant, dimensions} = (importDefault(15438) /* metro dependency 15438: calculatePIPState */)(channelId,
layoutManager, focusedId, property, {connected: connected, mode: mode, focusedId: focusedId,
participantTargetDimensions: property3, selfHasVideo: value7, showSecondaryPIP: value6});
object2 = {};
copyDataProperties(object2, value3.current, focusedId);
copyDataProperties(object2, dimensions, focusedId);
object2['id'] = participant?.id;
object2['showSecondaryPIP'] = value6;
const voicePanelPIPUtilsModule = require(15439) /* metro dependency 15439: VoicePanelPIPUtils */;
const getPIPMode = voicePanelPIPUtilsModule.getPIPMode;
object2['mode'] = Reflect.apply(getPIPMode, voicePanelPIPUtilsModule, [{channelId: channelId, connected: connected,
manuallyFocusedId: focusedId, mode: mode, selfHasVideo: value7}]);
const value11 = useCachedPipState(object2, value3);
binding = env0_4;
binding.useEffect(_fun118113, [channelId, property2]);
binding.useEffect(function() {
var closure = _fun118118;
closure();
return layoutManager.subscribeFromItem(closure);
}, [focusedId, layoutManager, property3]);
(importDefault(15441) /* metro dependency 15441: useExternalPipAspectRatioUpdaterNative */)(channelId,
layoutManager, focusedId);
return value11;
}
function useShowSecondaryPIP({channelId, mode}) { // fn#118104, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15633:1549, owner: useControllerPIPState.useShowSecondaryPIP, offset: 0x024cc0d9, size: 138 bytes, params: 2, frame: 19
return (require(566) /* metro dependency 566: flux */).useStateFromStores([EmbeddedActivitiesStore, FramesStore,
ChannelStore], _fun118105, [channelId,
(importDefault(15390) /* metro dependency 15390: useIsConnectedToVoiceChannel */)(channelId), mode]);
}
function _fun118106() { // fn#118106, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15633:2171, offset: 0x024cc2b1, size: 58 bytes, params: 1, frame: 15
var environment;
const value = environment.__proto__;
return (importDefault(11383) /* metro dependency 11383 */)(function(a0) {
return a0();
}, 1000, {leading: true});
}
function _fun118108() { // fn#118108, offset: 0x024cc2eb, size: 11 bytes, params: 1, frame: 1
return _fun118109;
}
function useCachedPipState(a0, a1) { // fn#118111, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15633:2665, owner: useControllerPIPState.useCachedPipState, offset: 0x024cc321, size: 96 bytes, params: 3, frame: 16
const value = a0;
const env0_1 = a1;
const cheapWorkletShallowEqualModule = require(7739) /* metro dependency 7739: cheapWorkletShallowEqual */;
const value3 = cheapWorkletShallowEqualModule.cheapWorkletShallowEqual(value, a1.current);
const result = !value3;
env1_4.useEffect(_fun118112);
return value3 ? a1.current : value;
}
function _fun118113() { // fn#118113, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15633:2830, offset: 0x024cc39d, size: 138 bytes, params: 1, frame: 15
var environment;
const value = environment.__proto__;
const BatchedStoreListener = (require(566) /* metro dependency 566: flux */).BatchedStoreListener;
const batchedStoreListener = new BatchedStoreListener([SpeakingStore, ChannelRTCStore], _fun118114);
batchedStoreListener.attach('pipstate-change-listeners-' + channelId);
return _fun118116;
}
function _fun118117() { // fn#118117, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15633:3188, offset: 0x024cc4e8, size: 35 bytes, params: 1, frame: 11
const closure = updateParticipantDimensions;
closure();
return layoutManager.subscribeFromItem(closure);
}
function _fun118105() { // fn#118105, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15633:1662, offset: 0x024cc163, size: 334 bytes, params: 1, frame: 18
var r0;
var connectedFrame;
var activityPanelMode;
var PIP;
var modeBinding;
var connectedActivityLocation;
var embeddedActivityLocationChannelId;
var channel;
var activityPanelMode2;
const value = environment.__proto__.__proto__;
const channel2 = ChannelStore.getChannel(channelId);
if (channel2 == null) {
connectedFrame = FramesStore.getConnectedFrame();
activityPanelMode = FramesStore.getActivityPanelMode();
if (connectedFrame == null) {
connectedActivityLocation = EmbeddedActivitiesStore.getConnectedActivityLocation();
if (connectedActivityLocation == null) {
return false;
}
embeddedActivityLocationChannelId = (require(3774) /* metro dependency 3774: embeddedActivityLocationUtils */).getEmbeddedActivityLocationChannelId(connectedActivityLocation);
channel = ChannelStore.getChannel(embeddedActivityLocationChannelId);
activityPanelMode2 = EmbeddedActivitiesStore.getActivityPanelMode();
r0 = channel != null && (require(8448) /* metro dependency 8448: ActivitiesInTextUtils */).isActivityInTextSupportedForChannel(channel);
r0 = r0 && embeddedActivityLocationChannelId !== channelId;
r0 = r0 && (activityPanelMode2 === ActivityPanelModes.PIP && (mode === VoicePanelModes.PIP || embeddedActivityLocationChannelId !== channelId));
return r0;
function useControllerPIPState({channelId, connected, focusedId, layoutManager, mode}) { // fn#118102, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15633:1255, offset: 0x024cbe74, size: 613 bytes, params: 2, frame: 35
let binding = env0_4;
const value3 = binding.useRef({'id': null, 'mode': null, 'width': 0, 'height': 0, 'containerHeight': 0,
'showSecondaryPIP': false, id: undefined, mode: undefined});
let useState = binding.useState;
const value4 = Reflect.apply(useState, binding, [undefined]);
const value5 = Module00057(value4, 2);
const property = value5[0];
var env0_4 = value5[1];
const env0_5 = binding.useRef(property);
binding.useInsertionEffect(_fun118103);
const value6 = useShowSecondaryPIP({channelId: channelId, mode: mode});
const value7 = (UseSelfHasVideo)(channelId);
useState = binding.useState;
const property2 = Module00057(Reflect.apply(useState, binding, [_fun118106]), 1)[0];
binding.useLayoutEffect(function() {
return _fun118109;
}, [property2]);
useState = binding.useState;
const value8 = Module00057(Reflect.apply(useState, binding, [function() {
return layoutManager.getTargetDimensions(focusedId);
}]), 2);
const property3 = value8[0];
const env0_7 = value8[1];
const {participant, dimensions} = (CalculatePIPState)(channelId,
layoutManager, focusedId, property, {connected: connected, mode: mode, focusedId: focusedId,
participantTargetDimensions: property3, selfHasVideo: value7, showSecondaryPIP: value6});
object = {};
copyDataProperties(object, value3.current, focusedId);
copyDataProperties(object, dimensions, focusedId);
object['id'] = participant?.id;
object['showSecondaryPIP'] = value6;
const getPIPMode = VoicePanelPIPUtilsModule.getPIPMode;
object['mode'] = Reflect.apply(getPIPMode, VoicePanelPIPUtilsModule, [{channelId: channelId, connected: connected,
manuallyFocusedId: focusedId, mode: mode, selfHasVideo: value7}]);
const value11 = useCachedPipState(object, value3);
binding = env0_4;
binding.useEffect(_fun118113, [channelId, property2]);
binding.useEffect(function() {
var closure = _fun118118;
closure();
return layoutManager.subscribeFromItem(closure);
}, [focusedId, layoutManager, property3]);
(UseExternalPipAspectRatioUpdaterNative)(channelId,
layoutManager, focusedId);
return value11;
function _fun118103() { // fn#118103, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15633:1523, offset: 0x0100bd4b, size: 21 bytes, params: 1, frame: 2
env0_5.current = Module00057;
}
PIP = ActivityPanelModes.PIP;
if (activityPanelMode !== PIP) {
connectedActivityLocation = EmbeddedActivitiesStore.getConnectedActivityLocation();
if (connectedActivityLocation == null) {
return false;
}
embeddedActivityLocationChannelId = (require(3774) /* metro dependency 3774: embeddedActivityLocationUtils */).getEmbeddedActivityLocationChannelId(connectedActivityLocation);
channel = ChannelStore.getChannel(embeddedActivityLocationChannelId);
activityPanelMode2 = EmbeddedActivitiesStore.getActivityPanelMode();
r0 = channel != null && (require(8448) /* metro dependency 8448: ActivitiesInTextUtils */).isActivityInTextSupportedForChannel(channel);
r0 = r0 && embeddedActivityLocationChannelId !== channelId;
r0 = r0 && (activityPanelMode2 === ActivityPanelModes.PIP && (mode === VoicePanelModes.PIP || embeddedActivityLocationChannelId !== channelId));
return r0;
}
modeBinding = mode;
PIP = VoicePanelModes.PIP;
if (modeBinding === PIP) {
return true;
}
if (mode === VoicePanelModes.PANEL) {
return true;
}
} else {
if (channel2.isVocal()) {
if (env0_2) {
connectedFrame = FramesStore.getConnectedFrame();
activityPanelMode = FramesStore.getActivityPanelMode();
if (connectedFrame == null) {
connectedActivityLocation = EmbeddedActivitiesStore.getConnectedActivityLocation();
if (connectedActivityLocation == null) {
function useShowSecondaryPIP({channelId, mode}) { // fn#118104, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15633:1549, owner: useControllerPIPState.useShowSecondaryPIP, offset: 0x024cc0d9, size: 138 bytes, params: 2, frame: 19
return (FluxModule).useStateFromStores([EmbeddedActivitiesStore, FramesStore,
ChannelStore], _fun118105, [channelId,
(UseIsConnectedToVoiceChannel)(channelId), mode]);
function _fun118105() { // fn#118105, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15633:1662, offset: 0x024cc163, size: 334 bytes, params: 1, frame: 18
var r0;
var framesStoreBinding;
var connectedFrame;
var activityPanelMode;
var PIP;
var modeBinding;
var connectedActivityLocation;
var embeddedActivityLocationChannelId;
var channel;
var activityPanelMode2;
const value = environment.__proto__.__proto__;
const channel2 = ChannelStore.getChannel(channelId);
if (channel2 == null) {
framesStoreBinding = FramesStore;
connectedFrame = framesStoreBinding.getConnectedFrame();
activityPanelMode = framesStoreBinding.getActivityPanelMode();
if (connectedFrame == null) {
connectedActivityLocation = EmbeddedActivitiesStore.getConnectedActivityLocation();
if (connectedActivityLocation == null) {
return false;
}
embeddedActivityLocationChannelId = (require(3774) /* metro dependency 3774: embeddedActivityLocationUtils */).getEmbeddedActivityLocationChannelId(connectedActivityLocation);
channel = ChannelStore.getChannel(embeddedActivityLocationChannelId);
activityPanelMode2 = EmbeddedActivitiesStore.getActivityPanelMode();
r0 = channel != null && (require(8448) /* metro dependency 8448: ActivitiesInTextUtils */).isActivityInTextSupportedForChannel(channel);
r0 = r0 && embeddedActivityLocationChannelId !== channelId;
r0 = r0 && (activityPanelMode2 === ActivityPanelModes.PIP && (mode === VoicePanelModes.PIP || embeddedActivityLocationChannelId !== channelId));
return r0;
}
PIP = ActivityPanelModes.PIP;
if (activityPanelMode !== PIP) {
connectedActivityLocation = EmbeddedActivitiesStore.getConnectedActivityLocation();
if (connectedActivityLocation == null) {
return false;
}
embeddedActivityLocationChannelId = (require(3774) /* metro dependency 3774: embeddedActivityLocationUtils */).getEmbeddedActivityLocationChannelId(connectedActivityLocation);
channel = ChannelStore.getChannel(embeddedActivityLocationChannelId);
activityPanelMode2 = EmbeddedActivitiesStore.getActivityPanelMode();
r0 = channel != null && (require(8448) /* metro dependency 8448: ActivitiesInTextUtils */).isActivityInTextSupportedForChannel(channel);
r0 = r0 && embeddedActivityLocationChannelId !== channelId;
r0 = r0 && (activityPanelMode2 === ActivityPanelModes.PIP && (mode === VoicePanelModes.PIP || embeddedActivityLocationChannelId !== channelId));
return r0;
}
modeBinding = mode;
PIP = VoicePanelModes.PIP;
if (modeBinding === PIP) {
return true;
}
if (mode === VoicePanelModes.PANEL) {
return true;
}
} else {
if (channel2.isVocal()) {
if (env0_2) {
framesStoreBinding = FramesStore;
connectedFrame = framesStoreBinding.getConnectedFrame();
activityPanelMode = framesStoreBinding.getActivityPanelMode();
if (connectedFrame == null) {
connectedActivityLocation = EmbeddedActivitiesStore.getConnectedActivityLocation();
if (connectedActivityLocation == null) {
return false;
}
embeddedActivityLocationChannelId = (require(3774) /* metro dependency 3774: embeddedActivityLocationUtils */).getEmbeddedActivityLocationChannelId(connectedActivityLocation);
channel = ChannelStore.getChannel(embeddedActivityLocationChannelId);
activityPanelMode2 = EmbeddedActivitiesStore.getActivityPanelMode();
r0 = channel != null && (require(8448) /* metro dependency 8448: ActivitiesInTextUtils */).isActivityInTextSupportedForChannel(channel);
r0 = r0 && embeddedActivityLocationChannelId !== channelId;
r0 = r0 && (activityPanelMode2 === ActivityPanelModes.PIP && (mode === VoicePanelModes.PIP || embeddedActivityLocationChannelId !== channelId));
return r0;
}
PIP = ActivityPanelModes.PIP;
if (activityPanelMode !== PIP) {
connectedActivityLocation = EmbeddedActivitiesStore.getConnectedActivityLocation();
if (connectedActivityLocation == null) {
return false;
}
embeddedActivityLocationChannelId = (require(3774) /* metro dependency 3774: embeddedActivityLocationUtils */).getEmbeddedActivityLocationChannelId(connectedActivityLocation);
channel = ChannelStore.getChannel(embeddedActivityLocationChannelId);
activityPanelMode2 = EmbeddedActivitiesStore.getActivityPanelMode();
r0 = channel != null && (require(8448) /* metro dependency 8448: ActivitiesInTextUtils */).isActivityInTextSupportedForChannel(channel);
r0 = r0 && embeddedActivityLocationChannelId !== channelId;
r0 = r0 && (activityPanelMode2 === ActivityPanelModes.PIP && (mode === VoicePanelModes.PIP || embeddedActivityLocationChannelId !== channelId));
return r0;
}
modeBinding = mode;
PIP = VoicePanelModes.PIP;
if (modeBinding === PIP) {
return true;
}
if (mode === VoicePanelModes.PANEL) {
return true;
}
connectedActivityLocation = EmbeddedActivitiesStore.getConnectedActivityLocation();
if (connectedActivityLocation == null) {
return false;
}
embeddedActivityLocationChannelId = (require(3774) /* metro dependency 3774: embeddedActivityLocationUtils */).getEmbeddedActivityLocationChannelId(connectedActivityLocation);
channel = ChannelStore.getChannel(embeddedActivityLocationChannelId);
activityPanelMode2 = EmbeddedActivitiesStore.getActivityPanelMode();
r0 = channel != null && (require(8448) /* metro dependency 8448: ActivitiesInTextUtils */).isActivityInTextSupportedForChannel(channel);
r0 = r0 && embeddedActivityLocationChannelId !== channelId;
PIP = ActivityPanelModes.PIP;
r0 = r0 && (activityPanelMode2 === PIP && (mode === VoicePanelModes.PIP || embeddedActivityLocationChannelId !== channelId));
return r0;
}
return false;
}
embeddedActivityLocationChannelId = (require(3774) /* metro dependency 3774: embeddedActivityLocationUtils */).getEmbeddedActivityLocationChannelId(connectedActivityLocation);
channel = ChannelStore.getChannel(embeddedActivityLocationChannelId);
activityPanelMode2 = EmbeddedActivitiesStore.getActivityPanelMode();
r0 = channel != null && (require(8448) /* metro dependency 8448: ActivitiesInTextUtils */).isActivityInTextSupportedForChannel(channel);
r0 = r0 && embeddedActivityLocationChannelId !== channelId;
r0 = r0 && (activityPanelMode2 === ActivityPanelModes.PIP && (mode === VoicePanelModes.PIP || embeddedActivityLocationChannelId !== channelId));
return r0;
}
PIP = ActivityPanelModes.PIP;
if (activityPanelMode !== PIP) {
connectedActivityLocation = EmbeddedActivitiesStore.getConnectedActivityLocation();
if (connectedActivityLocation == null) {
return false;
framesStoreBinding = FramesStore;
connectedFrame = framesStoreBinding.getConnectedFrame();
activityPanelMode = framesStoreBinding.getActivityPanelMode();
if (connectedFrame == null) {
connectedActivityLocation = EmbeddedActivitiesStore.getConnectedActivityLocation();
if (connectedActivityLocation == null) {
return false;
}
embeddedActivityLocationChannelId = (require(3774) /* metro dependency 3774: embeddedActivityLocationUtils */).getEmbeddedActivityLocationChannelId(connectedActivityLocation);
channel = ChannelStore.getChannel(embeddedActivityLocationChannelId);
activityPanelMode2 = EmbeddedActivitiesStore.getActivityPanelMode();
r0 = channel != null && (require(8448) /* metro dependency 8448: ActivitiesInTextUtils */).isActivityInTextSupportedForChannel(channel);
r0 = r0 && embeddedActivityLocationChannelId !== channelId;
r0 = r0 && (activityPanelMode2 === ActivityPanelModes.PIP && (mode === VoicePanelModes.PIP || embeddedActivityLocationChannelId !== channelId));
return r0;
}
PIP = ActivityPanelModes.PIP;
if (activityPanelMode !== PIP) {
connectedActivityLocation = EmbeddedActivitiesStore.getConnectedActivityLocation();
if (connectedActivityLocation == null) {
return false;
}
embeddedActivityLocationChannelId = (require(3774) /* metro dependency 3774: embeddedActivityLocationUtils */).getEmbeddedActivityLocationChannelId(connectedActivityLocation);
channel = ChannelStore.getChannel(embeddedActivityLocationChannelId);
activityPanelMode2 = EmbeddedActivitiesStore.getActivityPanelMode();
r0 = channel != null && (require(8448) /* metro dependency 8448: ActivitiesInTextUtils */).isActivityInTextSupportedForChannel(channel);
r0 = r0 && embeddedActivityLocationChannelId !== channelId;
r0 = r0 && (activityPanelMode2 === ActivityPanelModes.PIP && (mode === VoicePanelModes.PIP || embeddedActivityLocationChannelId !== channelId));
return r0;
}
modeBinding = mode;
PIP = VoicePanelModes.PIP;
if (modeBinding === PIP) {
return true;
}
if (mode === VoicePanelModes.PANEL) {
return true;
}
embeddedActivityLocationChannelId = (require(3774) /* metro dependency 3774: embeddedActivityLocationUtils */).getEmbeddedActivityLocationChannelId(connectedActivityLocation);
channel = ChannelStore.getChannel(embeddedActivityLocationChannelId);
activityPanelMode2 = EmbeddedActivitiesStore.getActivityPanelMode();
r0 = channel != null && (require(8448) /* metro dependency 8448: ActivitiesInTextUtils */).isActivityInTextSupportedForChannel(channel);
r0 = r0 && embeddedActivityLocationChannelId !== channelId;
r0 = r0 && (activityPanelMode2 === ActivityPanelModes.PIP && (mode === VoicePanelModes.PIP || embeddedActivityLocationChannelId !== channelId));
return r0;
}
modeBinding = mode;
PIP = VoicePanelModes.PIP;
if (modeBinding === PIP) {
return true;
}
if (mode === VoicePanelModes.PANEL) {
return true;
}
connectedActivityLocation = EmbeddedActivitiesStore.getConnectedActivityLocation();
if (connectedActivityLocation == null) {
@@ -310,131 +339,129 @@ function _fun118105() { // fn#118105, source: /ci/build/discord/discord/discord_
embeddedActivityLocationChannelId = (require(3774) /* metro dependency 3774: embeddedActivityLocationUtils */).getEmbeddedActivityLocationChannelId(connectedActivityLocation);
channel = ChannelStore.getChannel(embeddedActivityLocationChannelId);
activityPanelMode2 = EmbeddedActivitiesStore.getActivityPanelMode();
r0 = channel != null && (require(8448) /* metro dependency 8448: ActivitiesInTextUtils */).isActivityInTextSupportedForChannel(channel);
r0 = r0 && embeddedActivityLocationChannelId !== channelId;
r0 = channel != null && (require(8448) /* metro dependency 8448: ActivitiesInTextUtils */).isActivityInTextSupportedForChannel(channel) && embeddedActivityLocationChannelId !== channelId;
PIP = ActivityPanelModes.PIP;
r0 = r0 && (activityPanelMode2 === PIP && (mode === VoicePanelModes.PIP || embeddedActivityLocationChannelId !== channelId));
return r0;
}
return false;
}
connectedFrame = FramesStore.getConnectedFrame();
activityPanelMode = FramesStore.getActivityPanelMode();
if (connectedFrame == null) {
connectedActivityLocation = EmbeddedActivitiesStore.getConnectedActivityLocation();
if (connectedActivityLocation == null) {
return false;
function _fun118106() { // fn#118106, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15633:2171, offset: 0x024cc2b1, size: 58 bytes, params: 1, frame: 15
var environment;
const value = environment.__proto__;
return (importDefault(11383) /* metro dependency 11383 */)(function(a0) {
return a0();
}, 1000, {leading: true});
}
function _fun118108() { // fn#118108, offset: 0x024cc2eb, size: 11 bytes, params: 1, frame: 1
return _fun118109;
function _fun118109() { // fn#118109, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15633:2248, offset: 0x024cc2f6, size: 19 bytes, params: 1, frame: 9
return env1_6.cancel();
}
embeddedActivityLocationChannelId = (require(3774) /* metro dependency 3774: embeddedActivityLocationUtils */).getEmbeddedActivityLocationChannelId(connectedActivityLocation);
channel = ChannelStore.getChannel(embeddedActivityLocationChannelId);
activityPanelMode2 = EmbeddedActivitiesStore.getActivityPanelMode();
r0 = channel != null && (require(8448) /* metro dependency 8448: ActivitiesInTextUtils */).isActivityInTextSupportedForChannel(channel);
r0 = r0 && embeddedActivityLocationChannelId !== channelId;
r0 = r0 && (activityPanelMode2 === ActivityPanelModes.PIP && (mode === VoicePanelModes.PIP || embeddedActivityLocationChannelId !== channelId));
return r0;
}
PIP = ActivityPanelModes.PIP;
if (activityPanelMode !== PIP) {
connectedActivityLocation = EmbeddedActivitiesStore.getConnectedActivityLocation();
if (connectedActivityLocation == null) {
return false;
function useCachedPipState(a0, a1) { // fn#118111, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15633:2665, owner: useControllerPIPState.useCachedPipState, offset: 0x024cc321, size: 96 bytes, params: 3, frame: 16
const value = a0;
const env0_1 = a1;
const value3 = CheapWorkletShallowEqualModule.cheapWorkletShallowEqual(value, a1.current);
const result = !value3;
env1_4.useEffect(_fun118112);
return value3 ? a1.current : value;
function _fun118112() { // fn#118112, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15633:2772, offset: 0x024cc381, size: 28 bytes, params: 1, frame: 2
if (result) {
require.current = env0_0;
}
}
embeddedActivityLocationChannelId = (require(3774) /* metro dependency 3774: embeddedActivityLocationUtils */).getEmbeddedActivityLocationChannelId(connectedActivityLocation);
channel = ChannelStore.getChannel(embeddedActivityLocationChannelId);
activityPanelMode2 = EmbeddedActivitiesStore.getActivityPanelMode();
r0 = channel != null && (require(8448) /* metro dependency 8448: ActivitiesInTextUtils */).isActivityInTextSupportedForChannel(channel);
r0 = r0 && embeddedActivityLocationChannelId !== channelId;
r0 = r0 && (activityPanelMode2 === ActivityPanelModes.PIP && (mode === VoicePanelModes.PIP || embeddedActivityLocationChannelId !== channelId));
return r0;
}
modeBinding = mode;
PIP = VoicePanelModes.PIP;
if (modeBinding === PIP) {
return true;
}
if (mode === VoicePanelModes.PANEL) {
return true;
}
}
connectedActivityLocation = EmbeddedActivitiesStore.getConnectedActivityLocation();
if (connectedActivityLocation == null) {
return false;
}
embeddedActivityLocationChannelId = (require(3774) /* metro dependency 3774: embeddedActivityLocationUtils */).getEmbeddedActivityLocationChannelId(connectedActivityLocation);
channel = ChannelStore.getChannel(embeddedActivityLocationChannelId);
activityPanelMode2 = EmbeddedActivitiesStore.getActivityPanelMode();
r0 = channel != null && (require(8448) /* metro dependency 8448: ActivitiesInTextUtils */).isActivityInTextSupportedForChannel(channel) && embeddedActivityLocationChannelId !== channelId;
PIP = ActivityPanelModes.PIP;
r0 = r0 && (activityPanelMode2 === PIP && (mode === VoicePanelModes.PIP || embeddedActivityLocationChannelId !== channelId));
return r0;
}
function _fun118109() { // fn#118109, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15633:2248, offset: 0x024cc2f6, size: 19 bytes, params: 1, frame: 9
return env1_6.cancel();
}
}
function _fun118112() { // fn#118112, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15633:2772, offset: 0x024cc381, size: 28 bytes, params: 1, frame: 2
if (result) {
require.current = env0_0;
}
}
function _fun118113() { // fn#118113, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15633:2830, offset: 0x024cc39d, size: 138 bytes, params: 1, frame: 15
var environment;
const value = environment.__proto__;
const BatchedStoreListener = (FluxModule).BatchedStoreListener;
const batchedStoreListener = new BatchedStoreListener([SpeakingStore, ChannelRTCStore], _fun118114);
batchedStoreListener.attach('pipstate-change-listeners-' + channelId);
return _fun118116;
function _fun118114() { // fn#118114, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15633:2884, offset: 0x024cc427, size: 170 bytes, params: 1, frame: 21
var environment;
var r6;
var r2;
var value7;
var channelRTCStoreBinding;
var getParticipant;
var value8;
const value = environment.__proto__.__proto__;
const _createForOfIteratorHelperLoose_118099Binding = _createForOfIteratorHelperLoose_118099;
const speakers = SpeakingStore.getSpeakers();
const value3 = undefined;
const value4 = _createForOfIteratorHelperLoose_118099Binding(speakers);
const value5 = value4();
let done = value5.done;
if (done) {
r2 = value3;
} else {
r6 = value5;
while (true) {
value7 = r6.value;
channelRTCStoreBinding = ChannelRTCStore;
getParticipant = channelRTCStoreBinding.getParticipant;
if (Reflect.apply(getParticipant, channelRTCStoreBinding, [channelId, value7]) != null) {
r2 = value7;
break;
}
value8 = value4();
done = value8.done;
if (done) {
r2 = value3;
break;
}
r6 = value8;
continue;
}
}
if (r2 !== env1_5.current && r2 != null) {
if (env1_5.current == null) {
env1_4(r2);
} else {
env1_6(_fun118115);
}
}
return value3;
function _fun118115() { // fn#118115, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15633:3086, offset: 0x024cc4d1, size: 23 bytes, params: 1, frame: 11
return env2_4(env0_0);
}
function _fun118114() { // fn#118114, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15633:2884, offset: 0x024cc427, size: 170 bytes, params: 1, frame: 21
var environment;
var r6;
var r2;
var value7;
var getParticipant;
var value8;
const value = environment.__proto__.__proto__;
const _createForOfIteratorHelperLoose_118099Binding = _createForOfIteratorHelperLoose_118099;
const speakers = SpeakingStore.getSpeakers();
const value3 = undefined;
const value4 = _createForOfIteratorHelperLoose_118099Binding(speakers);
const value5 = value4();
let done = value5.done;
if (done) {
r2 = value3;
} else {
r6 = value5;
while (true) {
value7 = r6.value;
getParticipant = ChannelRTCStore.getParticipant;
if (Reflect.apply(getParticipant, ChannelRTCStore, [channelId, value7]) != null) {
r2 = value7;
break;
}
value8 = value4();
done = value8.done;
if (done) {
r2 = value3;
break;
function _fun118116() { // fn#118116, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15633:3151, offset: 0x00d0ff6d, size: 19 bytes, params: 1, frame: 9
return env0_0.detach();
}
r6 = value8;
continue;
}
}
if (r2 !== env1_5.current && r2 != null) {
if (env1_5.current == null) {
env1_4(r2);
} else {
env1_6(_fun118115);
function _fun118117() { // fn#118117, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15633:3188, offset: 0x024cc4e8, size: 35 bytes, params: 1, frame: 11
const updateParticipantDimensions2 = updateParticipantDimensions;
updateParticipantDimensions2();
return layoutManager.subscribeFromItem(updateParticipantDimensions2);
function updateParticipantDimensions() { // fn#118118, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15633:3225, offset: 0x024cc50b, size: 25 bytes, params: 1, frame: 11
var environment;
let value = environment.__proto__;
env1_7(function(a0) {
var value = a0;
var value3 = layoutManager.getTargetDimensions(focusedId);
return require(dependencyMap[13]).cheapWorkletShallowEqual(value, value3) ? value : value3;
});
}
}
}
return value3;
}
function updateParticipantDimensions() { // fn#118118, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15633:3225, offset: 0x024cc50b, size: 25 bytes, params: 1, frame: 11
var environment;
let value = environment.__proto__;
env1_7(function(a0) {
var value = a0;
var value3 = layoutManager.getTargetDimensions(focusedId);
return require(dependencyMap[13]).cheapWorkletShallowEqual(value, value3) ? value : value3;
});
}
function _fun118115() { // fn#118115, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15633:3086, offset: 0x024cc4d1, size: 23 bytes, params: 1, frame: 11
return env2_4(env0_0);
}
global.__d(_fun118098, 15436, [57, 31, 1378, 4606, 8065, 1379, 4607, 11795, 8044, 15390, 566, 3774, 8448, 7739,
15437, 11383, 15438, 15439, 15441,
2]) /* metro module 15436, dependencies: [57, 31, 1378, 4606, 8065, 1379, 4607, 11795, 8044, 15390, 566, 3774, 8448, 7739, 15437, 11383, 15438, 15439, 15441, 2] */;
@@ -1,95 +1,102 @@
/* Metro module 15442; source: modules/voice_panel/native/pip/usePIPAvoidanceSpecs.tsx; dependencies: [11795, 11793, 11796, 4017, 15319, 15364, 3860, 697, 7739, 15263, 15365, 11799, 11282, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UseAnimatedKeyboardHeight from '../../../keyboard/native/useAnimatedKeyboardHeight.tsx'; /* Metro dependency 15319 */
import UseScreenNameSharedValue from '../../../panels/morphable/native/useScreenNameSharedValue.tsx'; /* Metro dependency 15364 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as UseTokenModule from '../../../../design/tokens/native/useToken.tsx'; /* Metro dependency 3860 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as CheapWorkletShallowEqualModule from '../../../reanimated/native/cheapWorkletShallowEqual.tsx'; /* Metro dependency 7739 */
import * as VoicePanelControlsConstantsModule from '../controls/VoicePanelControlsConstants.tsx'; /* Metro dependency 11793 */
import * as VoicePanelConstantsModule from '../../VoicePanelConstants.tsx'; /* Metro dependency 11795 */
import * as MorphablePanelConstantsModule from '../../../panels/morphable/native/MorphablePanelConstants.tsx'; /* Metro dependency 11796 */
function _fun118152(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118152, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15639:6, offset: 0x024cddad, size: 200 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(11795) /* metro dependency 11795: VoicePanelConstants */).VoicePanelModes;
const env0_4 = (require(11793) /* metro dependency 11793: VoicePanelControlsConstants */).VoicePanelControlsModes;
const env0_5 = (require(11796) /* metro dependency 11796: MorphablePanelConstants */).PIP_WINDOW_OFFSET;
object = {code: 'function usePIPAvoidanceSpecsTsx1(){const{mode,controlsSpecs,keyboardHeight,safeArea,screenName}=this.__closure;return{mode:mode.get(),controlsSpecs:controlsSpecs.get(),keyboardHeight:keyboardHeight.get(),safeArea:safeArea.get(),screenName:screenName.get()};}'};
object = {code: 'function usePIPAvoidanceSpecsTsx2(props,previous){const{cheapWorkletShallowEqual,VoicePanelModes,VoicePanelControlsModes,DEFAULT_CHANNEL_INPUT_HEIGHT,PIP_WINDOW_OFFSET,getPIPBottomOffsetForPIPMode,getAdjustedBottomOffsets,calculateVoicePanelHeaderSpecs,edgeGutter,updateSharedValueIfChanged,pipAvoidanceSpecs}=this.__closure;if(cheapWorkletShallowEqual(props,previous!==null&&previous!==void 0?previous:undefined))return;const{mode:mode,controlsSpecs:controlsSpecs,keyboardHeight:keyboardHeight,safeArea:safeArea,screenName:screenName}=props;const screenBottomOffset=function(){if(mode!==VoicePanelModes.PIP){if(mode===VoicePanelModes.PANEL&&controlsSpecs.mode===VoicePanelControlsModes.DRAWER){return DEFAULT_CHANNEL_INPUT_HEIGHT+PIP_WINDOW_OFFSET;}return 0;}return getPIPBottomOffsetForPIPMode(screenName);}();let{bottomOffset:bottomOffset}=getAdjustedBottomOffsets({screenBottomOffset:screenBottomOffset,safeAreaBottom:safeArea.bottom,keyboardHeight:keyboardHeight});if(keyboardHeight<=0&&mode===VoicePanelModes.PANEL&&controlsSpecs.mode===VoicePanelControlsModes.FLOATING_DEFAULT){bottomOffset+=controlsSpecs.height+PIP_WINDOW_OFFSET;}const{height:headerHeight}=calculateVoicePanelHeaderSpecs(safeArea,edgeGutter);updateSharedValueIfChanged(pipAvoidanceSpecs,{top:mode===VoicePanelModes.PANEL&&controlsSpecs.mode===VoicePanelControlsModes.FLOATING_DEFAULT?headerHeight:0,bottom:bottomOffset});}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/pip/usePIPAvoidanceSpecs.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/pip/usePIPAvoidanceSpecs.tsx');
exports.default = usePIPAvoidanceSpecs_118153;
}
function usePIPAvoidanceSpecs_118153({mode, controlsSpecs, safeArea}) { // fn#118153, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15639:1965, offset: 0x024cde75, size: 450 bytes, params: 2, frame: 26
const value2 = (ReanimatedRexportModule).useSharedValue({'top': 0,
'bottom': 0});
const value3 = (UseAnimatedKeyboardHeight)();
const value4 = (UseScreenNameSharedValue)();
const useToken = UseTokenModule.useToken;
const VOICE_PANEL_GUTTER = (Native).modules.mobile.VOICE_PANEL_GUTTER;
const value5 = Reflect.apply(useToken, UseTokenModule, [VOICE_PANEL_GUTTER]);
const env0_6 = value5;
const useAnimatedReaction = ReanimatedRexportModule.useAnimatedReaction;
const usePIPAvoidanceSpecs_118153P2 = usePIPAvoidanceSpecs_118153P;
usePIPAvoidanceSpecs_118153P2.__closure = {mode: mode, controlsSpecs: controlsSpecs, keyboardHeight: value3,
safeArea: safeArea, screenName: value4};
usePIPAvoidanceSpecs_118153P2.__workletHash = 17017598468922;
usePIPAvoidanceSpecs_118153P2.__initData = env0_6;
const usePIPAvoidanceSpecs_118153U2 = usePIPAvoidanceSpecs_118153U;
object = {};
object.cheapWorkletShallowEqual = (require(7739) /* metro dependency 7739: cheapWorkletShallowEqual */).cheapWorkletShallowEqual;
object.VoicePanelModes = VoicePanelModes;
object.VoicePanelControlsModes = VoicePanelControlsModes;
object.DEFAULT_CHANNEL_INPUT_HEIGHT = 60;
object.PIP_WINDOW_OFFSET = PIP_WINDOW_OFFSET;
object.getPIPBottomOffsetForPIPMode = importDefault(15263) /* metro dependency 15263: getPIPBottomOffsetForPIPMode */;
object.getAdjustedBottomOffsets = importDefault(15365) /* metro dependency 15365: getAdjustedBottomOffsets */;
object.calculateVoicePanelHeaderSpecs = importDefault(11799) /* metro dependency 11799: calculateVoicePanelHeaderSpecs */;
object.edgeGutter = value5;
object.updateSharedValueIfChanged = importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */;
object.pipAvoidanceSpecs = value2;
usePIPAvoidanceSpecs_118153U2.__closure = object;
usePIPAvoidanceSpecs_118153U2.__workletHash = 13029906729161;
usePIPAvoidanceSpecs_118153U2.__initData = env0_7;
Reflect.apply(useAnimatedReaction, ReanimatedRexportModule, [usePIPAvoidanceSpecs_118153P2,
usePIPAvoidanceSpecs_118153U2]);
return value2;
function usePIPAvoidanceSpecs_118153P() { // fn#118154, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15639:2208, owner: usePIPAvoidanceSpecs_118153.p, offset: 0x024ce037, size: 96 bytes, params: 1, frame: 11
const object = {};
object.mode = mode.get();
object.controlsSpecs = controlsSpecs.get();
object.keyboardHeight = VoicePanelControlsConstantsModule.VoicePanelControlsModes.get();
object.safeArea = safeArea.get();
object.screenName = MorphablePanelConstantsModule.PIP_WINDOW_OFFSET.get();
return object;
}
function usePIPAvoidanceSpecs_118153({mode, controlsSpecs, safeArea}) { // fn#118153, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15639:1965, offset: 0x024cde75, size: 450 bytes, params: 2, frame: 26
var object2;
const value2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue({'top': 0,
'bottom': 0});
const value3 = (importDefault(15319) /* metro dependency 15319: useAnimatedKeyboardHeight */)();
const value4 = (importDefault(15364) /* metro dependency 15364: useScreenNameSharedValue */)();
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
const useToken = useTokenModule.useToken;
const VOICE_PANEL_GUTTER = (importDefault(697) /* metro dependency 697: native */).modules.mobile.VOICE_PANEL_GUTTER;
const value5 = Reflect.apply(useToken, useTokenModule, [VOICE_PANEL_GUTTER]);
const env0_6 = value5;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedReaction = reanimatedRexportModule.useAnimatedReaction;
const closure = usePIPAvoidanceSpecs_118153P;
closure.__closure = {mode: mode, controlsSpecs: controlsSpecs, keyboardHeight: value3, safeArea: safeArea,
screenName: value4};
closure.__workletHash = 17017598468922;
closure.__initData = env0_6;
const closure2 = usePIPAvoidanceSpecs_118153U;
object2 = {};
object2.cheapWorkletShallowEqual = (require(7739) /* metro dependency 7739: cheapWorkletShallowEqual */).cheapWorkletShallowEqual;
object2.VoicePanelModes = VoicePanelModes;
object2.VoicePanelControlsModes = VoicePanelControlsModes;
object2.DEFAULT_CHANNEL_INPUT_HEIGHT = 60;
object2.PIP_WINDOW_OFFSET = PIP_WINDOW_OFFSET;
object2.getPIPBottomOffsetForPIPMode = importDefault(15263) /* metro dependency 15263: getPIPBottomOffsetForPIPMode */;
object2.getAdjustedBottomOffsets = importDefault(15365) /* metro dependency 15365: getAdjustedBottomOffsets */;
object2.calculateVoicePanelHeaderSpecs = importDefault(11799) /* metro dependency 11799: calculateVoicePanelHeaderSpecs */;
object2.edgeGutter = value5;
object2.updateSharedValueIfChanged = importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */;
object2.pipAvoidanceSpecs = value2;
closure2.__closure = object2;
closure2.__workletHash = 13029906729161;
closure2.__initData = env0_7;
Reflect.apply(useAnimatedReaction, reanimatedRexportModule, [closure, closure2]);
return value2;
}
function usePIPAvoidanceSpecs_118153U(a0, a1) { // fn#118155, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15639:2439, owner: usePIPAvoidanceSpecs_118153.u, offset: 0x024ce097, size: 417 bytes, params: 3, frame: 21
var r4;
var mode;
var controlsSpecs;
var keyboardHeight;
var safeArea;
var bottomOffset;
let value = a1;
const value3 = undefined;
const cheapWorkletShallowEqual = CheapWorkletShallowEqualModule.cheapWorkletShallowEqual;
let r1 = value ?? value3;
if (!Reflect.apply(cheapWorkletShallowEqual, CheapWorkletShallowEqualModule, [a0, r1])) {
mode = a0.mode;
controlsSpecs = a0.controlsSpecs;
keyboardHeight = a0.keyboardHeight;
safeArea = a0.safeArea;
r4 = mode !== VoicePanelModes.PIP ? mode !== VoicePanelModes.PANEL || controlsSpecs.mode !== VoicePanelControlsModes.DRAWER ? 0 : 60 + PIP_WINDOW_OFFSET : (importDefault(15263) /* metro dependency 15263: getPIPBottomOffsetForPIPMode */)(a0.screenName);
value = importDefault(15365) /* metro dependency 15365: getAdjustedBottomOffsets */;
bottomOffset = value({screenBottomOffset: r4, safeAreaBottom: safeArea.bottom,
keyboardHeight: keyboardHeight}).bottomOffset;
value = 0;
r1 = keyboardHeight <= value && mode === VoicePanelModes.PANEL;
r1 = r1 && controlsSpecs.mode === VoicePanelControlsModes.FLOATING_DEFAULT;
r4 = r1 ? bottomOffset + (controlsSpecs.height + PIP_WINDOW_OFFSET) : bottomOffset;
(importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */)(VoicePanelConstantsModule.VoicePanelModes,
{top: mode !== VoicePanelModes.PANEL || controlsSpecs.mode !== VoicePanelControlsModes.FLOATING_DEFAULT ? value : (importDefault(11799) /* metro dependency 11799: calculateVoicePanelHeaderSpecs */)(safeArea,
env0_6).height, bottom: r4});
}
return value3;
}
function usePIPAvoidanceSpecs_118153P() { // fn#118154, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15639:2208, owner: usePIPAvoidanceSpecs_118153.p, offset: 0x024ce037, size: 96 bytes, params: 1, frame: 11
const object2 = {};
object2.mode = mode.get();
object2.controlsSpecs = controlsSpecs.get();
object2.keyboardHeight = env0_4.get();
object2.safeArea = safeArea.get();
object2.screenName = env0_5.get();
return object2;
}
function usePIPAvoidanceSpecs_118153U(a0, a1) { // fn#118155, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15639:2439, owner: usePIPAvoidanceSpecs_118153.u, offset: 0x024ce097, size: 417 bytes, params: 3, frame: 21
var r4;
var mode;
var controlsSpecs;
var keyboardHeight;
var safeArea;
var bottomOffset;
let value = a1;
const value3 = undefined;
const cheapWorkletShallowEqualModule = require(7739) /* metro dependency 7739: cheapWorkletShallowEqual */;
const cheapWorkletShallowEqual = cheapWorkletShallowEqualModule.cheapWorkletShallowEqual;
let r1 = value ?? value3;
if (!Reflect.apply(cheapWorkletShallowEqual, cheapWorkletShallowEqualModule, [a0, r1])) {
mode = a0.mode;
controlsSpecs = a0.controlsSpecs;
keyboardHeight = a0.keyboardHeight;
safeArea = a0.safeArea;
r4 = mode !== VoicePanelModes.PIP ? mode !== VoicePanelModes.PANEL || controlsSpecs.mode !== VoicePanelControlsModes.DRAWER ? 0 : 60 + PIP_WINDOW_OFFSET : (importDefault(15263) /* metro dependency 15263: getPIPBottomOffsetForPIPMode */)(a0.screenName);
value = importDefault(15365) /* metro dependency 15365: getAdjustedBottomOffsets */;
bottomOffset = value({screenBottomOffset: r4, safeAreaBottom: safeArea.bottom,
keyboardHeight: keyboardHeight}).bottomOffset;
value = 0;
r1 = keyboardHeight <= value && mode === VoicePanelModes.PANEL;
r1 = r1 && controlsSpecs.mode === VoicePanelControlsModes.FLOATING_DEFAULT;
r4 = r1 ? bottomOffset + (controlsSpecs.height + PIP_WINDOW_OFFSET) : bottomOffset;
(importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */)(env0_3,
{top: mode !== VoicePanelModes.PANEL || controlsSpecs.mode !== VoicePanelControlsModes.FLOATING_DEFAULT ? value : (importDefault(11799) /* metro dependency 11799: calculateVoicePanelHeaderSpecs */)(safeArea,
env0_6).height, bottom: r4});
}
return value3;
}
global.__d(_fun118152, 15442, [11795, 11793, 11796, 4017, 15319, 15364, 3860, 697, 7739, 15263, 15365, 11799, 11282,
2]) /* metro module 15442, dependencies: [11795, 11793, 11796, 4017, 15319, 15364, 3860, 697, 7739, 15263, 15365, 11799, 11282, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,4 +1,6 @@
/* Metro module 15512; source: modules/voice_panel/native/prejoin/VoicePanelPreJoinUtils.tsx; dependencies: [628, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun118776(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118776, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15709:6, offset: 0x024ed4bb, size: 121 bytes, params: 8, frame: 17
const _arrayLikeToArray_118779 = function(a0, a1) {
var r0;
@@ -45,128 +47,134 @@ function _fun118776(global, require, importDefault, importAll, module, exports,
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/prejoin/VoicePanelPreJoinUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/prejoin/VoicePanelPreJoinUtils.tsx');
exports.areVoicePanelPreJoinContentPropsEqual = areVoicePanelPreJoinContentPropsEqual;
}
function _createForOfIteratorHelperLoose_118777(a0, a1) { // fn#118777, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15709:46, offset: 0x024ed534, 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_118777(a0, a1) { // fn#118777, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15709:46, offset: 0x024ed534, 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 _fun118778;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_118779(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 _fun118778;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_118779(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_118779(a0, value);
r6 = value;
} else {
r6 = value;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_118779(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
r5 = r6;
} else {
r5 = value;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
if (r5) {
}
return _fun118778;
}
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 _fun118778() { // fn#118778, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15709:617, 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 _fun118778;
}
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 areVoicePanelPreJoinContentPropsEqual(a0, a1) { // fn#118780, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15709:1143, offset: 0x024ed6a8, size: 186 bytes, params: 3, frame: 23
var r3;
var r4;
var _createForOfIteratorHelperLoose_118777Binding;
var streamingMembers;
var value3;
var done;
var value4;
var property;
var property2;
var property3;
var value5;
var value6;
if (a0 == null) {
return a0 === a1;
}
if (a1 == null) {
return a0 === a1;
}
var value;
const value2 = 0;
if (importDefault(dependencyMap[value2])(a0, a1, ['streamingMembers'])) {
_createForOfIteratorHelperLoose_118777Binding = _createForOfIteratorHelperLoose_118777;
streamingMembers = a0.streamingMembers;
value = _createForOfIteratorHelperLoose_118777Binding(streamingMembers);
value3 = value();
done = value3.done;
if (done) {
return true;
function areVoicePanelPreJoinContentPropsEqual(a0, a1) { // fn#118780, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15709:1143, offset: 0x024ed6a8, size: 186 bytes, params: 3, frame: 23
var r3;
var r4;
var _createForOfIteratorHelperLoose_118777Binding;
var streamingMembers;
var value3;
var done;
var value4;
var property;
var property2;
var property3;
var value5;
var value6;
if (a0 == null) {
return a0 === a1;
}
r3 = value2;
r4 = value3;
loopExit5: while (true) {
value4 = r4.value;
streamingMembers = a1.streamingMembers;
property = streamingMembers[r3];
if (property == null) {
return false;
}
property2 = value4[value2];
if (property2 !== property[value2]) {
break loopExit5;
}
property3 = value4[1];
if (property3 !== property[1]) {
break loopExit5;
}
value5 = typeof r3 === 'bigint' ? r3 + 1n : +r3 + 1;
value6 = value();
done = value6.done;
if (a1 == null) {
return a0 === a1;
}
var value;
const value2 = 0;
if (importDefault(dependencyMap[value2])(a0, a1, ['streamingMembers'])) {
_createForOfIteratorHelperLoose_118777Binding = _createForOfIteratorHelperLoose_118777;
streamingMembers = a0.streamingMembers;
value = _createForOfIteratorHelperLoose_118777Binding(streamingMembers);
value3 = value();
done = value3.done;
if (done) {
return true;
}
r3 = value5;
r4 = value6;
continue;
r3 = value2;
r4 = value3;
loopExit5: while (true) {
value4 = r4.value;
streamingMembers = a1.streamingMembers;
property = streamingMembers[r3];
if (property == null) {
return false;
}
property2 = value4[value2];
if (property2 !== property[value2]) {
break loopExit5;
}
property3 = value4[1];
if (property3 !== property[1]) {
break loopExit5;
}
value5 = typeof r3 === 'bigint' ? r3 + 1n : +r3 + 1;
value6 = value();
done = value6.done;
if (done) {
return true;
}
r3 = value5;
r4 = value6;
continue;
}
}
return false;
}
return false;
}
global.__d(_fun118776, 15512, [628, 2]) /* metro module 15512, dependencies: [628, 2] */;
@@ -1,51 +1,64 @@
/* Metro module 15536; source: modules/voice_panel/native/shared/CircleWithCutout.tsx; dependencies: [31, 27, 33, 7743, 7744, 2] */
import Module07744 from '../../../../by-id/module-07744.js'; /* Metro dependency 7744 */
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 CircleWithCutoutUtilsModule from './CircleWithCutoutUtils.tsx'; /* Metro dependency 7743 */
import * as Module07744Module from '../../../../by-id/module-07744.js'; /* Metro dependency 7744 */
function _fun118941(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118941, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15733:6, offset: 0x024f5bab, size: 233 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const PixelRatio = (require(27) /* metro dependency 27 */).PixelRatio;
const value2 = require(33) /* metro dependency 33 */;
const env0_3 = value2.jsx;
const env0_4 = value2.jsxs;
let value = ReactModule;
const PixelRatio = (ReactNativeModule).PixelRatio;
const env0_5 = PixelRatio.get();
value = value.memo(CircleWithCutout_118942);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/shared/CircleWithCutout.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/shared/CircleWithCutout.tsx');
exports.default = value;
const getBadgeLeft = (require(7743) /* metro dependency 7743: CircleWithCutoutUtils */).getBadgeLeft;
const getBadgeLeft = (CircleWithCutoutUtilsModule).getBadgeLeft;
exports.getBadgeLeft = getBadgeLeft;
const getBadgeTop = (require(7743) /* metro dependency 7743: CircleWithCutoutUtils */).getBadgeTop;
const getBadgeTop = (CircleWithCutoutUtilsModule).getBadgeTop;
exports.getBadgeTop = getBadgeTop;
}
function CircleWithCutout_118942({fill, circleRadius, cutoutRadius, enableCutout, cutoutPositionInDegrees, alignBadgeEdgeWithCircleEdge, badgeRadius, scaleToPixelDensity}) { // fn#118942, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15733:178, offset: 0x024f5c94, size: 507 bytes, params: 2, frame: 32
var r20;
var r21;
var value13;
alignBadgeEdgeWithCircleEdge = !(alignBadgeEdgeWithCircleEdge === undefined) && alignBadgeEdgeWithCircleEdge;
scaleToPixelDensity = scaleToPixelDensity === undefined || scaleToPixelDensity;
const r18 = scaleToPixelDensity ? env0_5 : 1;
const value6 = circleRadius * r18;
const r0 = badgeRadius != null ? badgeRadius * r18 : undefined;
const value8 = 2 * value6;
if (alignBadgeEdgeWithCircleEdge && r0 != null) {
value13 = 2 * value6 - r0;
r20 = r0;
r21 = value13;
} else {
r20 = (require(7743) /* metro dependency 7743: CircleWithCutoutUtils */).getCutoutCenterY(value6,
cutoutPositionInDegrees);
r21 = (require(7743) /* metro dependency 7743: CircleWithCutoutUtils */).getCutoutCenterX(value6,
cutoutPositionInDegrees);
function CircleWithCutout_118942({fill, circleRadius, cutoutRadius, enableCutout, cutoutPositionInDegrees, alignBadgeEdgeWithCircleEdge, badgeRadius, scaleToPixelDensity}) { // fn#118942, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15733:178, offset: 0x024f5c94, size: 507 bytes, params: 2, frame: 32
var r20;
var r21;
var value13;
alignBadgeEdgeWithCircleEdge = !(alignBadgeEdgeWithCircleEdge === undefined) && alignBadgeEdgeWithCircleEdge;
scaleToPixelDensity = scaleToPixelDensity === undefined || scaleToPixelDensity;
const r18 = scaleToPixelDensity ? env0_5 : 1;
const value6 = circleRadius * r18;
const r0 = badgeRadius != null ? badgeRadius * r18 : undefined;
const value8 = 2 * value6;
if (alignBadgeEdgeWithCircleEdge && r0 != null) {
value13 = 2 * value6 - r0;
r20 = r0;
r21 = value13;
} else {
r20 = (require(7743) /* metro dependency 7743: CircleWithCutoutUtils */).getCutoutCenterY(value6,
cutoutPositionInDegrees);
r21 = (require(7743) /* metro dependency 7743: CircleWithCutoutUtils */).getCutoutCenterX(value6,
cutoutPositionInDegrees);
}
const defaultImport = Module07744;
const object2 = {};
object2.transform = [{scale: 1 / r18}];
const Defs = (Module07744Module).Defs;
const Mask = (Module07744Module).Mask;
const Rect = (Module07744Module).Rect;
const rect = (
<Rect
width={value8}
height={value8}
fill="white"
/>
);
const Circle = (Module07744Module).Circle;
return ((Component) => <Component height={value8} width={value8} style={object2}><Defs><Mask id="mask">{rect}<Circle cx={r21} cy={r20} r={cutoutRadius * r18} fill="black" /></Mask></Defs><Circle cx={value6} cy={value6} r={value6} fill={fill} mask={enableCutout ? 'url(#mask)' : undefined} /></Component>)(defaultImport);
}
const defaultImport = importDefault(7744) /* metro dependency 7744 */;
const object = {};
object.transform = [{scale: 1 / r18}];
const Defs = (require(7744) /* metro dependency 7744 */).Defs;
const Mask = (require(7744) /* metro dependency 7744 */).Mask;
const Rect = (require(7744) /* metro dependency 7744 */).Rect;
const rect = <Rect width={value8} height={value8} fill="white" />;
const Circle = (require(7744) /* metro dependency 7744 */).Circle;
return ((Component) => <Component height={value8} width={value8} style={object}><Defs><Mask id="mask">{rect}<Circle cx={r21} cy={r20} r={cutoutRadius * r18} fill="black" /></Mask></Defs><Circle cx={value6} cy={value6} r={value6} fill={fill} mask={enableCutout ? 'url(#mask)' : undefined} /></Component>)(defaultImport);
}
global.__d(_fun118941, 15536, [31, 27, 33, 7743, 7744,
2]) /* metro module 15536, dependencies: [31, 27, 33, 7743, 7744, 2] */;
@@ -1,55 +1,77 @@
/* Metro module 7743; source: modules/voice_panel/native/shared/CircleWithCutoutUtils.tsx; dependencies: [31, 33, 7744, 2] */
import Module07744 from '../../../../by-id/module-07744.js'; /* Metro dependency 7744 */
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 Module07744Module from '../../../../by-id/module-07744.js'; /* Metro dependency 7744 */
function _fun61971(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#61971, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7921:6, offset: 0x01b509b4, size: 220 bytes, params: 8, frame: 21
const env0_0 = require;
const closure = getCutoutCenterX;
const closure2 = getCutoutCenterY;
const getCutoutCenterX2 = getCutoutCenterX;
const getCutoutCenterY2 = getCutoutCenterY;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const value = require(33) /* metro dependency 33 */;
const env0_3 = value.jsx;
const env0_4 = value.jsxs;
ReactModule;
const Math = global.Math;
const PI = Math.PI;
const env0_5 = PI / 180;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/shared/CircleWithCutoutUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/shared/CircleWithCutoutUtils.tsx');
exports.default = CircleWithCutout;
exports.getBadgeTop = getBadgeTop;
exports.getBadgeLeft = getBadgeLeft;
exports.getCutoutCenterX = closure;
exports.getCutoutCenterY = closure2;
}
exports.getCutoutCenterX = getCutoutCenterX2;
exports.getCutoutCenterY = getCutoutCenterY2;
function getCutoutCenterX(a0, a1) { // fn#61972, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7921:145, offset: 0x01b50a90, size: 46 bytes, params: 3, frame: 13
const Math = global.Math;
return a0 + a0 * Math.sin(a1 * env0_5);
}
function getCutoutCenterX(a0, a1) { // fn#61972, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7921:145, offset: 0x01b50a90, size: 46 bytes, params: 3, frame: 13
const Math = global.Math;
return a0 + a0 * Math.sin(a1 * env0_5);
}
function getCutoutCenterY(a0, a1) { // fn#61973, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7921:201, offset: 0x01b50abe, size: 46 bytes, params: 3, frame: 13
const Math = global.Math;
return a0 - a0 * Math.cos(a1 * env0_5);
}
function getCutoutCenterY(a0, a1) { // fn#61973, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7921:201, offset: 0x01b50abe, size: 46 bytes, params: 3, frame: 13
const Math = global.Math;
return a0 - a0 * Math.cos(a1 * env0_5);
}
function CircleWithCutout({circleRadius, cutoutRadius, enableCutout, cutoutPositionInDegrees, circleFillColor}) { // fn#61974, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7921:360, offset: 0x01b50aec, size: 346 bytes, params: 2, frame: 31
let value = 2 * circleRadius;
const cutoutCenterX = getCutoutCenterX(circleRadius, cutoutPositionInDegrees);
const cutoutCenterY = getCutoutCenterY(circleRadius, cutoutPositionInDegrees);
const defaultImport = Module07744;
const object = {height: value, width: value};
const Defs = (Module07744Module).Defs;
const Mask = (Module07744Module).Mask;
const Rect = (Module07744Module).Rect;
value = (
<Rect
width={value}
height={value}
fill="white"
/>
);
const Circle = (Module07744Module).Circle;
value = (
<Defs>
<Mask id="mask">
{value}
<Circle
cx={cutoutCenterX}
cy={cutoutCenterY}
r={cutoutRadius}
fill="black"
/>
</Mask>
</Defs>
);
return ((Component) => <Component {...object}>{value}<Circle cx={circleRadius} cy={circleRadius} r={circleRadius} fill={circleFillColor} mask={enableCutout ? 'url(#mask)' : undefined} /></Component>)(defaultImport);
}
function CircleWithCutout({circleRadius, cutoutRadius, enableCutout, cutoutPositionInDegrees, circleFillColor}) { // fn#61974, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7921:360, offset: 0x01b50aec, size: 346 bytes, params: 2, frame: 31
let value = 2 * circleRadius;
const cutoutCenterX = getCutoutCenterX(circleRadius, cutoutPositionInDegrees);
const cutoutCenterY = getCutoutCenterY(circleRadius, cutoutPositionInDegrees);
const defaultImport = importDefault(7744) /* metro dependency 7744 */;
const object2 = {height: value, width: value};
const Defs = (require(7744) /* metro dependency 7744 */).Defs;
const Mask = (require(7744) /* metro dependency 7744 */).Mask;
const Rect = (require(7744) /* metro dependency 7744 */).Rect;
value = <Rect width={value} height={value} fill="white" />;
const Circle = (require(7744) /* metro dependency 7744 */).Circle;
value = <Defs><Mask id="mask">{value}<Circle cx={cutoutCenterX} cy={cutoutCenterY} r={cutoutRadius} fill="black" /></Mask></Defs>;
return ((Component) => <Component {...object2}>{value}<Circle cx={circleRadius} cy={circleRadius} r={circleRadius} fill={circleFillColor} mask={enableCutout ? 'url(#mask)' : undefined} /></Component>)(defaultImport);
}
function getBadgeTop(a0, a1, a2) { // fn#61975, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7921:828, offset: 0x01b50c46, size: 30 bytes, params: 4, frame: 13
return getCutoutCenterY(a1, a2) - a0;
}
function getBadgeTop(a0, a1, a2) { // fn#61975, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7921:828, offset: 0x01b50c46, size: 30 bytes, params: 4, frame: 13
return getCutoutCenterY(a1, a2) - a0;
}
function getBadgeLeft(a0, a1, a2) { // fn#61976, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7921:903, offset: 0x01b50c64, size: 30 bytes, params: 4, frame: 13
return getCutoutCenterX(a1, a2) - a0;
}
function getBadgeLeft(a0, a1, a2) { // fn#61976, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7921:903, offset: 0x01b50c64, size: 30 bytes, params: 4, frame: 13
return getCutoutCenterX(a1, a2) - a0;
}
global.__d(_fun61971, 7743, [31, 33, 7744, 2]) /* metro module 7743, dependencies: [31, 33, 7744, 2] */;
@@ -1,151 +1,205 @@
/* Metro module 9243; source: modules/voice_panel/native/shared/FormComponents.tsx; dependencies: [31, 4396, 33, 4501, 697, 6821, 6231, 9244, 1305, 6771, 9245, 9256, 8917, 4635, 8699, 8743, 566, 7128, 4573, 1244, 6238, 4578, 8916, 3995, 9299, 9322, 2] */
import PresenceStore from '../../../../stores/PresenceStore.tsx'; /* Metro dependency 4396 */
import UseDisplayNameStyles from '../../../display_name_styles/hooks/useDisplayNameStyles.tsx'; /* Metro dependency 4635 */
import UseAnalyticsLocations from '../../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
import NativeView from '../../../core/native/NativeView.tsx'; /* Metro dependency 6821 */
import ShowUserProfileActionSheet from '../../../user_profile/native/showUserProfileActionSheet.tsx'; /* Metro dependency 8743 */
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 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as TableRowGroupNativeModule from '../../../../design/components/TableRow/native/TableRowGroup.native.tsx'; /* Metro dependency 6231 */
import * as TableRowNativeModule from '../../../../design/components/TableRow/native/TableRow.native.tsx'; /* Metro dependency 6238 */
import * as UseDisplayNameStylesFontModule from '../../../display_name_styles/native/useDisplayNameStylesFont.tsx'; /* Metro dependency 8699 */
import * as UseCanRingModule from '../../../calls/useCanRing.tsx'; /* Metro dependency 8917 */
import * as VoiceStateIconUtilsModule from '../utils/VoiceStateIconUtils.tsx'; /* Metro dependency 9245 */
import * as UseIsSecureFramesVerifiedModule from '../../../rtc/hooks/useIsSecureFramesVerified.tsx'; /* Metro dependency 9256 */
function _fun72268(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#72268, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9428:6, offset: 0x01d406fc, size: 400 bytes, params: 8, frame: 22
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const presenceStore = importDefault(4396) /* metro dependency 4396: PresenceStore */;
let value = require(33) /* metro dependency 33 */;
let value = JsxRuntimeModule;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object2.container = {marginHorizontal: 16};
object2.voiceBadgesContainer = {flexDirection: 'row'};
const object3 = {'marginLeft': 8, 'padding': 6};
object = {};
object.container = {marginHorizontal: 16};
object.voiceBadgesContainer = {flexDirection: 'row'};
const object4 = {'marginLeft': 8, 'padding': 6};
const MOBILE_VOICE_PANEL_BADGE_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_VOICE_PANEL_BADGE_BACKGROUND;
object3.backgroundColor = MOBILE_VOICE_PANEL_BADGE_BACKGROUND;
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object2.iconWrapper = object3;
object4.backgroundColor = MOBILE_VOICE_PANEL_BADGE_BACKGROUND;
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object.iconWrapper = object4;
const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
object2.icon = {'width': 16, 'height': 16, tintColor: INTERACTIVE_TEXT_DEFAULT};
object2.notConnectedAvatar = {opacity: 0.5};
object2.memberRow = {'flexDirection': 'row', 'alignItems': 'center', 'gap': 4};
const env0_7 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/shared/FormComponents.tsx');
object.icon = {'width': 16, 'height': 16, tintColor: INTERACTIVE_TEXT_DEFAULT};
object.notConnectedAvatar = {opacity: 0.5};
object.memberRow = {'flexDirection': 'row', 'alignItems': 'center', 'gap': 4};
const env0_7 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/shared/FormComponents.tsx');
exports.VoicePanelFormSection = VoicePanelFormSection;
exports.MemberRowItem = MemberRowItem;
}
function VoiceBadges({muteDeafenIconState, videoIconState}) { // fn#72269, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9428:547, offset: 0x01d4088c, size: 344 bytes, params: 2, frame: 28
const styles = useStyles();
return ((Component) => <Component style={styles.voiceBadgesContainer}>{muteDeafenIconState != null ? ((Component) => <Component style={styles.iconWrapper}>{((MuteDeafenIcon) => <MuteDeafenIcon state={muteDeafenIconState} size={(require(1305) /* metro dependency 1305: native */).IconSizes.SMALL} style={styles.icon} />)((require(9244) /* metro dependency 9244: VoiceStateIcons */).MuteDeafenIcon)}</Component>)(importDefault(6821) /* metro dependency 6821: NativeView */) : null}{videoIconState != null ? ((Component) => <Component style={styles.iconWrapper}>{((VideoIcon) => <VideoIcon state={videoIconState} size={(require(1305) /* metro dependency 1305: native */).IconSizes.SMALL} style={styles.icon} />)((require(9244) /* metro dependency 9244: VoiceStateIcons */).VideoIcon)}</Component>)(importDefault(6821) /* metro dependency 6821: NativeView */) : null}</Component>)(importDefault(6821) /* metro dependency 6821: NativeView */);
}
function VoicePanelFormSection(a0) { // fn#72270, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9428:1052, offset: 0x01d409e4, size: 144 bytes, params: 2, frame: 20
const style = a0.style;
const value = Object.create(null);
value.style = 0;
const value2 = copyDataProperties({}, a0, value, undefined);
const styles = useStyles();
const NativeView = importDefault(6821) /* metro dependency 6821: NativeView */;
const items2 = [styles.container, style];
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
return (
<NativeView style={items2}>
<TableRowGroup {...value2} />
</NativeView>
);
}
function MemberRowItem({user, channelId, selfStream, nick, guildId, notConnected, showRing, showSecureFramesUI}) { // fn#72271, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9428:1209, offset: 0x01d40a74, size: 1026 bytes, params: 2, frame: 35
var object2;
var r4;
var Button;
var intl;
selfStream = !(selfStream === undefined) && selfStream;
notConnected = !(notConnected === undefined) && notConnected;
showSecureFramesUI = !(showSecureFramesUI === undefined) && showSecureFramesUI;
const styles = useStyles();
const analyticsLocations = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().analyticsLocations;
const env0_3 = analyticsLocations;
const voiceStateIconUtilsModule = require(9245) /* metro dependency 9245: VoiceStateIconUtils */;
const useMuteDeafenIconState = voiceStateIconUtilsModule.useMuteDeafenIconState;
let id = user.id;
const value6 = Reflect.apply(useMuteDeafenIconState, voiceStateIconUtilsModule, [id, guildId]);
const value7 = voiceStateIconUtilsModule.useVideoIconState(user.id, guildId);
id = user.id;
const value8 = (require(9256) /* metro dependency 9256: useIsSecureFramesVerified */).useIsUserSecureFramesVerified({userId: id,
channelId: channelId});
const value9 = (require(8917) /* metro dependency 8917: useCanRing */).useCanRing(user, 'MemberRowItem');
const value11 = (require(8699) /* metro dependency 8699: useDisplayNameStylesFont */).useDisplayNameStylesFont({displayNameStyles: (importDefault(4635) /* metro dependency 4635: useDisplayNameStyles */)({userId: user.id,
guildId: guildId})});
const binding = env0_3;
const value12 = binding.useCallback(_fun72272, [id, channelId, analyticsLocations]);
const value13 = binding.useMemo(_fun72274,
[(require(566) /* metro dependency 566: flux */).useStateFromStores([PresenceStore], function() {
return require(dependencyMap[17]).getStreamerActivityByUserId(id, PresenceStore);
}), selfStream]);
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
object2 = {onPress: value12};
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
const REFRESH_MEDIUM_32 = AvatarSizes.REFRESH_MEDIUM_32;
object2.icon = <Avatar user={user} guildId={guildId} size={REFRESH_MEDIUM_32} style={notConnected ? styles.notConnectedAvatar : undefined} />;
object2.subLabel = value13;
if (showRing) {
if (value9) {
Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
var buttonProps = {'size': 'sm', 'variant': 'secondary', onPress: onPress_72275};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
buttonProps.text = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.bHa9kN);
r4 = <Button {...buttonProps} />;
} else {
r4 = value6 != null || value7 != null ? <VoiceBadges muteDeafenIconState={value6} videoIconState={value7} /> : undefined;
}
} else {
r4 = value6 != null || value7 != null ? <VoiceBadges muteDeafenIconState={value6} videoIconState={value7} /> : undefined;
function VoiceBadges({muteDeafenIconState, videoIconState}) { // fn#72269, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9428:547, offset: 0x01d4088c, size: 344 bytes, params: 2, frame: 28
const styles = useStyles();
return ((Component) => <Component style={styles.voiceBadgesContainer}>{muteDeafenIconState != null ? ((Component) => <Component style={styles.iconWrapper}>{((MuteDeafenIcon) => <MuteDeafenIcon state={muteDeafenIconState} size={(require(1305) /* metro dependency 1305: native */).IconSizes.SMALL} style={styles.icon} />)((require(9244) /* metro dependency 9244: VoiceStateIcons */).MuteDeafenIcon)}</Component>)(importDefault(6821) /* metro dependency 6821: NativeView */) : null}{videoIconState != null ? ((Component) => <Component style={styles.iconWrapper}>{((VideoIcon) => <VideoIcon state={videoIconState} size={(require(1305) /* metro dependency 1305: native */).IconSizes.SMALL} style={styles.icon} />)((require(9244) /* metro dependency 9244: VoiceStateIcons */).VideoIcon)}</Component>)(importDefault(6821) /* metro dependency 6821: NativeView */) : null}</Component>)(importDefault(6821) /* metro dependency 6821: NativeView */);
}
object2.trailing = r4;
const r15 = nick ?? (require(3995) /* metro dependency 3995: UserUtils */).getName(user);
const NativeView = importDefault(6821) /* metro dependency 6821: NativeView */;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const items2 = [<Text variant="text-md/semibold" color={notConnected ? 'text-muted' : 'text-default'} style={value11 != null && ({fontFamily: value11})}>{r15}</Text>];
items2[1] = ((Component) => <Component userId={user.id} />)(importDefault(9299) /* metro dependency 9299: GuildTag */);
items2[2] = showSecureFramesUI && value8 ? ((ShieldLockIcon) => <ShieldLockIcon size="xs" style={styles.icon} />)((require(9322) /* metro dependency 9322: ShieldLockIcon */).ShieldLockIcon) : null;
object2.label = <NativeView style={styles.memberRow}>{items2}</NativeView>;
return <TableRow {...object2} />;
}
function _fun72272() { // fn#72272, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9428:1687, offset: 0x01d40e76, size: 69 bytes, params: 1, frame: 13
const value = environment.__proto__;
(importDefault(8743) /* metro dependency 8743: showUserProfileActionSheet */)({userId: id, channelId: channelId,
isVoiceContext: true, sourceAnalyticsLocations: analyticsLocations});
}
function VoicePanelFormSection(a0) { // fn#72270, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9428:1052, offset: 0x01d409e4, size: 144 bytes, params: 2, frame: 20
const style = a0.style;
const value = Object.create(null);
value.style = 0;
const value2 = copyDataProperties({}, a0, value, undefined);
const styles = useStyles();
const items2 = [styles.container, style];
const TableRowGroup = (TableRowGroupNativeModule).TableRowGroup;
return (
<NativeView style={items2}>
<TableRowGroup {...value2} />
</NativeView>
);
}
function _fun72274() { // fn#72274, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9428:1877, offset: 0x01d40eed, size: 260 bytes, params: 1, frame: 22
var r1;
var r0;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var value3;
var value;
const selfStreamBinding = selfStream;
const value2 = null;
if (selfStreamBinding) {
if (value2 != streamerActivityByUserId) {
value3 = environment.__proto__;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
r1 = <Text variant="text-xs/medium" color="text-muted" lineClamp={1}>{intl.format((require(1244) /* metro dependency 1244: indexNative */).t['0wJXSh'],
{name: value2 == streamerActivityByUserId.details ? streamerActivityByUserId.name : streamerActivityByUserId.details !== '' ? streamerActivityByUserId.details : streamerActivityByUserId.name})}</Text>;
function MemberRowItem({user, channelId, selfStream, nick, guildId, notConnected, showRing, showSecureFramesUI}) { // fn#72271, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9428:1209, offset: 0x01d40a74, size: 1026 bytes, params: 2, frame: 35
var r4;
var Button;
var intl;
selfStream = !(selfStream === undefined) && selfStream;
notConnected = !(notConnected === undefined) && notConnected;
showSecureFramesUI = !(showSecureFramesUI === undefined) && showSecureFramesUI;
const styles = useStyles();
const analyticsLocations = (UseAnalyticsLocations)().analyticsLocations;
const analyticsLocations2 = analyticsLocations;
const useMuteDeafenIconState = VoiceStateIconUtilsModule.useMuteDeafenIconState;
let id = user.id;
const value6 = Reflect.apply(useMuteDeafenIconState, VoiceStateIconUtilsModule, [id, guildId]);
const value7 = VoiceStateIconUtilsModule.useVideoIconState(user.id, guildId);
id = user.id;
const value8 = (UseIsSecureFramesVerifiedModule).useIsUserSecureFramesVerified({userId: id,
channelId: channelId});
const value9 = (UseCanRingModule).useCanRing(user, 'MemberRowItem');
const value11 = (UseDisplayNameStylesFontModule).useDisplayNameStylesFont({displayNameStyles: (UseDisplayNameStyles)({userId: user.id,
guildId: guildId})});
const binding = analyticsLocations2;
const value12 = binding.useCallback(_fun72272, [id, channelId, analyticsLocations]);
const value13 = binding.useMemo(_fun72274,
[(require(566) /* metro dependency 566: flux */).useStateFromStores([PresenceStore], function() {
return require(dependencyMap[17]).getStreamerActivityByUserId(id, PresenceStore);
}), selfStream]);
const TableRow = (TableRowNativeModule).TableRow;
object = {onPress: value12};
const Avatar = (NativeModule).Avatar;
const AvatarSizes = (NativeModule).AvatarSizes;
const REFRESH_MEDIUM_32 = AvatarSizes.REFRESH_MEDIUM_32;
object.icon = (
<Avatar
user={user}
guildId={guildId}
size={REFRESH_MEDIUM_32}
style={notConnected ? styles.notConnectedAvatar : undefined}
/>
);
object.subLabel = value13;
if (showRing) {
if (value9) {
Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
var buttonProps = {'size': 'sm', 'variant': 'secondary', onPress: onPress_72275};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
buttonProps.text = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.bHa9kN);
r4 = <Button {...buttonProps} />;
} else {
r4 = (
value6 != null || value7 != null
? (
<VoiceBadges muteDeafenIconState={value6} videoIconState={value7} />
)
: undefined
);
}
} else {
value = environment.__proto__;
value = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.eXan7B);
r1 = value;
r4 = (
value6 != null || value7 != null
? (
<VoiceBadges muteDeafenIconState={value6} videoIconState={value7} />
)
: undefined
);
}
r0 = r1;
} else {
r0 = value2;
object.trailing = r4;
const r15 = nick ?? (require(3995) /* metro dependency 3995: UserUtils */).getName(user);
const Text = (TextModule).Text;
const items2 = [
<Text
variant="text-md/semibold"
color={notConnected ? 'text-muted' : 'text-default'}
style={value11 != null && ({fontFamily: value11})}
>
{r15}
</Text>,
];
items2[1] = ((Component) => <Component userId={user.id} />)(importDefault(9299) /* metro dependency 9299: GuildTag */);
items2[2] = (
showSecureFramesUI && value8
? ((ShieldLockIcon) => <ShieldLockIcon size="xs" style={styles.icon} />)((require(9322) /* metro dependency 9322: ShieldLockIcon */).ShieldLockIcon)
: null
);
object.label = (
<NativeView style={styles.memberRow}>
{items2}
</NativeView>
);
return <TableRow {...object} />;
function _fun72272() { // fn#72272, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9428:1687, offset: 0x01d40e76, size: 69 bytes, params: 1, frame: 13
const value = environment.__proto__;
(ShowUserProfileActionSheet)({userId: id, channelId: channelId,
isVoiceContext: true, sourceAnalyticsLocations: analyticsLocations});
}
function _fun72274() { // fn#72274, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9428:1877, offset: 0x01d40eed, size: 260 bytes, params: 1, frame: 22
var r1;
var r0;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var value3;
var value;
const selfStreamBinding = selfStream;
const value2 = null;
if (selfStreamBinding) {
if (value2 != streamerActivityByUserId) {
value3 = environment.__proto__;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
r1 = (
<Text
variant="text-xs/medium"
color="text-muted"
lineClamp={1}
>
{intl.format((require(1244) /* metro dependency 1244: indexNative */).t['0wJXSh'],
{name: value2 == streamerActivityByUserId.details ? streamerActivityByUserId.name : streamerActivityByUserId.details !== '' ? streamerActivityByUserId.details : streamerActivityByUserId.name})}
</Text>
);
} else {
value = environment.__proto__;
value = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.eXan7B);
r1 = value;
}
r0 = r1;
} else {
r0 = value2;
}
return r0;
}
function MemberRowItemOnPress() { // fn#72275, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9428:2368, owner: MemberRowItem.onPress, offset: 0x01d40ff1, size: 70 bytes, params: 1, frame: 15
let value = environment.__proto__;
value = importDefault(8916) /* metro dependency 8916: CallActionCreators */;
return value.ring(channelId, [user.id], 'voice_panel_floating_cta');
}
}
return r0;
}
function MemberRowItemOnPress() { // fn#72275, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9428:2368, owner: MemberRowItem.onPress, offset: 0x01d40ff1, size: 70 bytes, params: 1, frame: 15
let value = environment.__proto__;
value = importDefault(8916) /* metro dependency 8916: CallActionCreators */;
return value.ring(channelId, [user.id], 'voice_panel_floating_cta');
}
global.__d(_fun72268, 9243, [31, 4396, 33, 4501, 697, 6821, 6231, 9244, 1305, 6771, 9245, 9256, 8917, 4635, 8699,
8743, 566, 7128, 4573, 1244, 6238, 4578, 8916, 3995, 9299, 9322,
2]) /* metro module 9243, dependencies: [31, 4396, 33, 4501, 697, 6821, 6231, 9244, 1305, 6771, 9245, 9256, 8917, 4635, 8699, 8743, 566, 7128, 4573, 1244, 6238, 4578, 8916, 3995, 9299, 9322, 2] */;
@@ -1,45 +1,53 @@
/* Metro module 15467; source: modules/voice_panel/native/shared/VoicePanelChannelOptInNotice.tsx; dependencies: [31, 33, 6609, 6821, 6238, 1244, 6242, 12376, 2] */
import NativeView from '../../../core/native/NativeView.tsx'; /* Metro dependency 6821 */
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 TableRowNativeModule from '../../../../design/components/TableRow/native/TableRow.native.tsx'; /* Metro dependency 6238 */
import * as TableRowIconNativeModule from '../../../../design/components/TableRow/native/TableRowIcon.native.tsx'; /* Metro dependency 6242 */
import * as ChannelListMagnifyingGlassIconModule from '../../../../design/components/Icon/native/redesign/generated/ChannelListMagnifyingGlassIcon.tsx'; /* Metro dependency 12376 */
function _fun118392(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118392, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15664:6, offset: 0x024da116, size: 152 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
let value = ReactModule;
value = value.memo(VoicePanelChannelOptInNotice);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/shared/VoicePanelChannelOptInNotice.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/shared/VoicePanelChannelOptInNotice.tsx');
exports.default = value;
function VoicePanelChannelOptInNotice({style, channel, analyticsSection}) { // fn#118393, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15664:134, offset: 0x024da1ae, size: 313 bytes, params: 2, frame: 22
const value2 = env0_3.useCallback(_fun118394, [channel, analyticsSection]);
const TableRow = (TableRowNativeModule).TableRow;
const object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
object2.label = Reflect.apply(string, intl, [(require(1244) /* metro dependency 1244: indexNative */).t['9mysCh']]);
string = intl.string;
const PDUCIN = (require(1244) /* metro dependency 1244: indexNative */).t.PDUCIN;
object2.subLabel = Reflect.apply(string, intl, [PDUCIN]);
const TableRowIcon = (TableRowIconNativeModule).TableRowIcon;
const ChannelListMagnifyingGlassIcon = (ChannelListMagnifyingGlassIconModule).ChannelListMagnifyingGlassIcon;
object2.icon = <TableRowIcon IconComponent={ChannelListMagnifyingGlassIcon} />;
object2.onPress = value2;
object2.start = true;
object2.end = true;
object2.arrow = true;
return (
<NativeView style={style}>
<TableRow {...object2} />
</NativeView>
);
function _fun118394() { // fn#118394, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15664:233, offset: 0x024da2e7, size: 73 bytes, params: 1, frame: 18
let value = environment.__proto__;
value = require(6609) /* metro dependency 6609: OptInChannelsActionCreators */;
const setOptInChannel = value.setOptInChannel;
const {guild_id, id} = channel;
Reflect.apply(setOptInChannel, value, [guild_id, id, true, {section: analyticsSection}]);
}
}
}
function VoicePanelChannelOptInNotice({style, channel, analyticsSection}) { // fn#118393, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15664:134, offset: 0x024da1ae, size: 313 bytes, params: 2, frame: 22
const value2 = env0_3.useCallback(_fun118394, [channel, analyticsSection]);
const NativeView = importDefault(6821) /* metro dependency 6821: NativeView */;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const object = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
object.label = Reflect.apply(string, intl, [(require(1244) /* metro dependency 1244: indexNative */).t['9mysCh']]);
string = intl.string;
const PDUCIN = (require(1244) /* metro dependency 1244: indexNative */).t.PDUCIN;
object.subLabel = Reflect.apply(string, intl, [PDUCIN]);
const TableRowIcon = (require(6242) /* metro dependency 6242: TableRowIconNative */).TableRowIcon;
const ChannelListMagnifyingGlassIcon = (require(12376) /* metro dependency 12376: ChannelListMagnifyingGlassIcon */).ChannelListMagnifyingGlassIcon;
object.icon = <TableRowIcon IconComponent={ChannelListMagnifyingGlassIcon} />;
object.onPress = value2;
object.start = true;
object.end = true;
object.arrow = true;
return (
<NativeView style={style}>
<TableRow {...object} />
</NativeView>
);
}
function _fun118394() { // fn#118394, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15664:233, offset: 0x024da2e7, size: 73 bytes, params: 1, frame: 18
let value = environment.__proto__;
value = require(6609) /* metro dependency 6609: OptInChannelsActionCreators */;
const setOptInChannel = value.setOptInChannel;
const {guild_id, id} = channel;
Reflect.apply(setOptInChannel, value, [guild_id, id, true, {section: analyticsSection}]);
}
global.__d(_fun118392, 15467, [31, 33, 6609, 6821, 6238, 1244, 6242, 12376,
2]) /* metro module 15467, dependencies: [31, 33, 6609, 6821, 6238, 1244, 6242, 12376, 2] */;
@@ -1,100 +1,110 @@
/* Metro module 15450; source: modules/voice_panel/native/shared/VoicePanelDismissableContent.tsx; dependencies: [57, 31, 4606, 11795, 4299, 33, 15451, 1962, 11794, 4017, 1365, 10357, 11088, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import ChannelRTCStore from '../../../calls/ChannelRTCStore.tsx'; /* Metro dependency 4606 */
import VoicePanelStateContext from '../VoicePanelStateContext.tsx'; /* Metro dependency 11794 */
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 Dismissible_contentModule from '../../../../external/discord_common/js/packages/protos/discord_protos/discord_users/v1/dismissible_content.tsx'; /* Metro dependency 1365 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as CallConstantsModule from '../../../calls/CallConstants.tsx'; /* Metro dependency 4299 */
import * as VoicePanelConstantsModule from '../../VoicePanelConstants.tsx'; /* Metro dependency 11795 */
function _fun118253(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118253, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15647:6, offset: 0x024d3039, size: 271 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const channelRTCStore = importDefault(4606) /* metro dependency 4606: ChannelRTCStore */;
const env0_6 = (require(11795) /* metro dependency 11795: VoicePanelConstants */).VoicePanelModes;
const env0_7 = (require(4299) /* metro dependency 4299: CallConstants */).isActivityParticipant;
const env0_8 = (require(33) /* metro dependency 33 */).jsx;
let value = ReactModule;
object = {code: 'function VoicePanelDismissableContentTsx1(){const{mode,VoicePanelModes,focused}=this.__closure;var _focused$get;return mode.get()===VoicePanelModes.PANEL?(_focused$get=focused.get())===null||_focused$get===void 0?void 0:_focused$get.id:undefined;}'};
object = {code: 'function VoicePanelDismissableContentTsx2(manualId,previousManualId){const{runOnJS,handleFocusChange}=this.__closure;if(manualId!==previousManualId){runOnJS(handleFocusChange)(manualId);}}'};
value = value.memo(VoicePanelDismissibleContent);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/shared/VoicePanelDismissableContent.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/shared/VoicePanelDismissableContent.tsx');
exports.default = value;
}
function VoiceControlsNuxActionSheetImporter() { // fn#118254, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15647:234, offset: 0x024d3148, size: 45 bytes, params: 1, frame: 13
return require(dependencyMap[7])(dependencyMap[6], dependencyMap.paths);
}
function VoicePanelDismissibleContent() { // fn#118255, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15647:733, offset: 0x024d3175, size: 395 bytes, params: 1, frame: 23
const binding = env0_4;
const {channelId, focused,
mode} = binding.useContext(importDefault(11794) /* metro dependency 11794: VoicePanelStateContext */);
const [property, env0_3] = env0_3Binding(binding.useState(false), 2);
const value5 = binding.useCallback(_fun118256, [channelId]);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedReaction = reanimatedRexportModule.useAnimatedReaction;
const closure = VoicePanelDismissibleContentH;
closure.__closure = {mode: mode, VoicePanelModes: VoicePanelModes, focused: focused};
closure.__workletHash = 11330064461661;
closure.__initData = env0_10;
const closure2 = VoicePanelDismissibleContentF;
closure2.__closure = {runOnJS: reanimatedRexportModule.runOnJS, handleFocusChange: value5};
closure2.__workletHash = 15579591345007;
closure2.__initData = env0_11;
Reflect.apply(useAnimatedReaction, reanimatedRexportModule, [closure, closure2]);
return ((Component) => <Component contentTypes={property ? [(require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent.ACTIVITIES_MOBILE_PIP_FAB_NUX] : []}>{children_118259}</Component>)(importDefault(10357) /* metro dependency 10357: SelectedDismissibleContent */);
}
function _fun118256(a0) { // fn#118256, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15647:897, offset: 0x024d3300, size: 65 bytes, params: 2, frame: 15
var r2;
var isActivityParticipantBinding;
let value = a0 != null;
if (value) {
value = environment.__proto__;
isActivityParticipantBinding = isActivityParticipant;
value = ChannelRTCStore.getParticipant(channelId, a0);
value = isActivityParticipantBinding(value);
r2 = value;
} else {
r2 = value;
function VoiceControlsNuxActionSheetImporter() { // fn#118254, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15647:234, offset: 0x024d3148, size: 45 bytes, params: 1, frame: 13
return require(dependencyMap[7])(dependencyMap[6], dependencyMap.paths);
}
env0_3(r2);
}
function VoicePanelDismissibleContentH() { // fn#118257, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15647:985, owner: VoicePanelDismissibleContent.h, offset: 0x024d3341, size: 69 bytes, params: 1, frame: 12
var r0;
var value;
const value2 = mode.get();
const PANEL = VoicePanelModes.PANEL;
const value4 = undefined;
if (value2 !== PANEL) {
r0 = value4;
} else {
value = focused.get();
r0 = value == null ? value4 : value.id;
}
return r0;
}
function VoicePanelDismissibleContent() { // fn#118255, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15647:733, offset: 0x024d3175, size: 395 bytes, params: 1, frame: 23
const binding = env0_4;
const {channelId, focused,
mode} = binding.useContext(VoicePanelStateContext);
const [property, env0_3] = env0_3Binding(binding.useState(false), 2);
const value5 = binding.useCallback(_fun118256, [channelId]);
const useAnimatedReaction = ReanimatedRexportModule.useAnimatedReaction;
const VoicePanelDismissibleContentH2 = VoicePanelDismissibleContentH;
VoicePanelDismissibleContentH2.__closure = {mode: mode, VoicePanelModes: VoicePanelModes, focused: focused};
VoicePanelDismissibleContentH2.__workletHash = 11330064461661;
VoicePanelDismissibleContentH2.__initData = env0_10;
const VoicePanelDismissibleContentF2 = VoicePanelDismissibleContentF;
VoicePanelDismissibleContentF2.__closure = {runOnJS: ReanimatedRexportModule.runOnJS, handleFocusChange: value5};
VoicePanelDismissibleContentF2.__workletHash = 15579591345007;
VoicePanelDismissibleContentF2.__initData = env0_11;
Reflect.apply(useAnimatedReaction, ReanimatedRexportModule, [VoicePanelDismissibleContentH2,
VoicePanelDismissibleContentF2]);
return ((Component) => <Component contentTypes={property ? [(require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent.ACTIVITIES_MOBILE_PIP_FAB_NUX] : []}>{children_118259}</Component>)(importDefault(10357) /* metro dependency 10357: SelectedDismissibleContent */);
function _fun118256(a0) { // fn#118256, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15647:897, offset: 0x024d3300, size: 65 bytes, params: 2, frame: 15
var r2;
var isActivityParticipantBinding;
var channelRTCStoreBinding;
let value = a0 != null;
if (value) {
value = environment.__proto__;
isActivityParticipantBinding = isActivityParticipant;
channelRTCStoreBinding = ChannelRTCStore;
value = channelRTCStoreBinding.getParticipant(channelId, a0);
value = isActivityParticipantBinding(value);
r2 = value;
} else {
r2 = value;
}
env0_3(r2);
}
function VoicePanelDismissibleContentF(a0, a1) { // fn#118258, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15647:1159, owner: VoicePanelDismissibleContent.f, offset: 0x024d3386, size: 61 bytes, params: 3, frame: 13
var value;
if (a0 !== a1) {
value = environment.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value.runOnJS(env0_4)(a0);
}
}
function VoicePanelDismissibleContentH() { // fn#118257, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15647:985, owner: VoicePanelDismissibleContent.h, offset: 0x024d3341, size: 69 bytes, params: 1, frame: 12
var r0;
var value;
const value2 = mode.get();
const PANEL = VoicePanelModes.PANEL;
const value4 = undefined;
if (value2 !== PANEL) {
r0 = value4;
} else {
value = focused.get();
r0 = value == null ? value4 : value.id;
}
return r0;
}
function VoicePanelDismissibleContentF(a0, a1) { // fn#118258, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15647:1159, owner: VoicePanelDismissibleContent.f, offset: 0x024d3386, size: 61 bytes, params: 3, frame: 13
var value;
if (a0 !== a1) {
value = environment.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value.runOnJS(env0_4)(a0);
}
}
function VoicePanelDismissibleContentChildren({visibleContent, markAsDismissed}) { // fn#118259, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15647:1423, owner: VoicePanelDismissibleContent.children, offset: 0x024d33c3, size: 123 bytes, params: 2, frame: 17
const value = environment.__proto__;
const DismissibleContent = (Dismissible_contentModule).DismissibleContent;
const ACTIVITIES_MOBILE_PIP_FAB_NUX = DismissibleContent.ACTIVITIES_MOBILE_PIP_FAB_NUX;
if (visibleContent !== ACTIVITIES_MOBILE_PIP_FAB_NUX) {
return null;
} else {
const DismissibleActionSheet = (require(11088) /* metro dependency 11088: DismissibleActionSheet */).DismissibleActionSheet;
return (
<DismissibleActionSheet
markAsDismissed={markAsDismissed}
importer={VoiceControlsNuxActionSheetImporter}
actionSheetKey="VoiceControlToggleNuxActionSheet"
/>
);
}
}
function VoicePanelDismissibleContentChildren({visibleContent, markAsDismissed}) { // fn#118259, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15647:1423, owner: VoicePanelDismissibleContent.children, offset: 0x024d33c3, size: 123 bytes, params: 2, frame: 17
const value = environment.__proto__;
const DismissibleContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent;
const ACTIVITIES_MOBILE_PIP_FAB_NUX = DismissibleContent.ACTIVITIES_MOBILE_PIP_FAB_NUX;
if (visibleContent !== ACTIVITIES_MOBILE_PIP_FAB_NUX) {
return null;
} else {
const DismissibleActionSheet = (require(11088) /* metro dependency 11088: DismissibleActionSheet */).DismissibleActionSheet;
return (
<DismissibleActionSheet
markAsDismissed={markAsDismissed}
importer={VoiceControlsNuxActionSheetImporter}
actionSheetKey="VoiceControlToggleNuxActionSheet"
/>
);
}
}
global.__d(_fun118253, 15450, [57, 31, 4606, 11795, 4299, 33, 15451, 1962, 11794, 4017, 1365, 10357, 11088,
2]) /* metro module 15450, dependencies: [57, 31, 4606, 11795, 4299, 33, 15451, 1962, 11794, 4017, 1365, 10357, 11088, 2] */;
@@ -1,83 +1,94 @@
/* Metro module 11803; source: modules/voice_panel/native/shared/VoicePanelHeaderGlassBlur.tsx; dependencies: [31, 27, 33, 4501, 477, 4017, 4577, 4048, 8141, 4563, 4002, 6821, 2] */
import UseTheme from '../../../../hooks/useTheme.tsx'; /* Metro dependency 4048 */
import VisualEffectViewAnimated from '../../../visual_effect_view/native/VisualEffectViewAnimated.tsx'; /* Metro dependency 4563 */
import NativeView from '../../../core/native/NativeView.tsx'; /* Metro dependency 6821 */
import ReanimatedNativeView from '../../../core/native/ReanimatedNativeView.tsx'; /* Metro dependency 8141 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as PlatformUtilsModule from '../../../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
import * as SharedModule from '../../../../design/shared.tsx'; /* Metro dependency 4002 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
function _fun90398(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90398, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11989:6, offset: 0x02037c71, size: 419 bytes, params: 8, frame: 22
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const StyleSheet = (require(27) /* metro dependency 27 */).StyleSheet;
const value2 = require(33) /* metro dependency 33 */;
const env0_4 = value2.jsx;
const env0_5 = value2.jsxs;
const env0_6 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({blur: {'position': 'absolute',
let value = ReactModule;
const StyleSheet = (ReactNativeModule).StyleSheet;
const env0_6 = (CreateStylesModule).createStyles({blur: {'position': 'absolute',
'top': 0, 'left': 0, 'right': 0}, strokeContainer: {'position': 'absolute', 'left': 0, 'right': 0,
bottom: -StyleSheet.hairlineWidth, height: StyleSheet.hairlineWidth}, stroke: {'height': null, 'opacity': 0.15,
'backgroundColor': 'white', height: StyleSheet.hairlineWidth}, strokeAlt: {'height': null, 'opacity': 0.8,
'backgroundColor': 'black', height: StyleSheet.hairlineWidth}, strokeAltLight: {'height': null, 'opacity': 0.2,
'backgroundColor': 'black', height: StyleSheet.hairlineWidth}});
const env0_7 = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid();
const env0_7 = (PlatformUtilsModule).isAndroid();
object = {code: 'function VoicePanelHeaderGlassBlurTsx1(){const{shown,IS_ANDROID}=this.__closure;return{opacity:shown.get()?IS_ANDROID?0.7:1:0};}'};
object = {code: 'function VoicePanelHeaderGlassBlurTsx2(){const{withSpring,shown}=this.__closure;return{blurAmount:withSpring(shown.get()?0.3:0)};}'};
value = value.memo(HeaderGlassBlur);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/shared/VoicePanelHeaderGlassBlur.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/shared/VoicePanelHeaderGlassBlur.tsx');
exports.default = value;
}
function HeaderGlassBlur({shown, blurStyle, style}) { // fn#90399, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11989:859, offset: 0x02037e14, size: 556 bytes, params: 2, frame: 28
const styles = useStyles();
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
let closure = HeaderGlassBlurK;
closure.__closure = {shown: shown, IS_ANDROID: env0_7};
closure.__workletHash = 3451055086565;
closure.__initData = env0_8;
const value2 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
const useAnimatedProps = ReanimatedRexportModule.useAnimatedProps;
closure = HeaderGlassBlurP;
closure.__closure = {withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring, shown: shown};
closure.__workletHash = 5642055202507;
closure.__initData = env0_9;
const value3 = Reflect.apply(useAnimatedProps, ReanimatedRexportModule, [closure]);
const value4 = (UseTheme)();
const items2 = [styles.blur, style, value2];
const visualEffectViewAnimated = (
<VisualEffectViewAnimated
blurStyle="ultra-thin"
blurTheme={SharedModule.isThemeDark(value4) ? 'dark' : 'light'}
style={[StyleSheet.absoluteFillObject, blurStyle]}
animatedProps={value3}
/>
);
const nativeView = <NativeView style={styles.stroke} />;
const defaultImport5 = NativeView;
return (
<ReanimatedNativeView style={items2}>
{visualEffectViewAnimated}
<NativeView style={styles.strokeContainer}>
{nativeView}
{((Component) => <Component style={SharedModule.isThemeDark(value4) ? styles.strokeAlt : styles.strokeAltLight} />)(defaultImport5)}
</NativeView>
</ReanimatedNativeView>
);
function HeaderGlassBlurK() { // fn#90400, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11989:960, owner: HeaderGlassBlur.k, offset: 0x02038040, size: 55 bytes, params: 1, frame: 11
var r1;
let value = shown.get();
if (value) {
value = environment.__proto__;
value = 1;
r1 = env1_7 ? 0.7 : value;
} else {
r1 = 0;
}
return {opacity: r1};
}
function HeaderGlassBlur({shown, blurStyle, style}) { // fn#90399, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11989:859, offset: 0x02037e14, size: 556 bytes, params: 2, frame: 28
const styles = useStyles();
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
let closure = HeaderGlassBlurK;
closure.__closure = {shown: shown, IS_ANDROID: env0_7};
closure.__workletHash = 3451055086565;
closure.__initData = env0_8;
const value2 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const moduleValue2 = reanimatedRexportModule;
const useAnimatedProps = moduleValue2.useAnimatedProps;
closure = HeaderGlassBlurP;
closure.__closure = {withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring, shown: shown};
closure.__workletHash = 5642055202507;
closure.__initData = env0_9;
const value3 = Reflect.apply(useAnimatedProps, moduleValue2, [closure]);
const value4 = (importDefault(4048) /* metro dependency 4048: useTheme */)();
const ReanimatedNativeView = importDefault(8141) /* metro dependency 8141: ReanimatedNativeView */;
const items2 = [styles.blur, style, value2];
const VisualEffectViewAnimated = importDefault(4563) /* metro dependency 4563: VisualEffectViewAnimated */;
const sharedModule = require(4002) /* metro dependency 4002: shared */;
const visualEffectViewAnimated = <VisualEffectViewAnimated blurStyle="ultra-thin" blurTheme={sharedModule.isThemeDark(value4) ? 'dark' : 'light'} style={[StyleSheet.absoluteFillObject,
blurStyle]} animatedProps={value3} />;
const NativeView = importDefault(6821) /* metro dependency 6821: NativeView */;
const nativeView = <NativeView style={styles.stroke} />;
const defaultImport5 = NativeView;
const value = sharedModule;
return (
<ReanimatedNativeView style={items2}>
{visualEffectViewAnimated}
<NativeView style={styles.strokeContainer}>
{nativeView}
{((Component) => <Component style={value.isThemeDark(value4) ? styles.strokeAlt : styles.strokeAltLight} />)(defaultImport5)}
</NativeView>
</ReanimatedNativeView>
);
}
function HeaderGlassBlurP() { // fn#90401, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11989:1107, owner: HeaderGlassBlur.p, offset: 0x02038077, size: 75 bytes, params: 1, frame: 13
const object = {};
let value = environment.__proto__;
value = require(4577) /* metro dependency 4577: spring */;
object.blurAmount = value.withSpring(shown.get() ? 0.3 : 0);
return object;
}
function HeaderGlassBlurK() { // fn#90400, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11989:960, owner: HeaderGlassBlur.k, offset: 0x02038040, size: 55 bytes, params: 1, frame: 11
var r1;
let value = shown.get();
if (value) {
value = environment.__proto__;
value = 1;
r1 = env1_7 ? 0.7 : value;
} else {
r1 = 0;
}
return {opacity: r1};
}
function HeaderGlassBlurP() { // fn#90401, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11989:1107, owner: HeaderGlassBlur.p, offset: 0x02038077, size: 75 bytes, params: 1, frame: 13
const object2 = {};
let value = environment.__proto__;
value = require(4577) /* metro dependency 4577: spring */;
object2.blurAmount = value.withSpring(shown.get() ? 0.3 : 0);
return object2;
}
global.__d(_fun90398, 11803, [31, 27, 33, 4501, 477, 4017, 4577, 4048, 8141, 4563, 4002, 6821,
2]) /* metro module 11803, dependencies: [31, 27, 33, 4501, 477, 4017, 4577, 4048, 8141, 4563, 4002, 6821, 2] */;
@@ -1,37 +1,43 @@
/* Metro module 15388; source: modules/voice_panel/native/shared/VoicePanelIconButton.tsx; dependencies: [31, 33, 8141, 8341, 2] */
import ReanimatedNativeView from '../../../core/native/ReanimatedNativeView.tsx'; /* Metro dependency 8141 */
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 IconButtonNativeModule from '../../../../design/components/Button/native/IconButton.native.tsx'; /* Metro dependency 8341 */
function _fun117659(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117659, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15585:6, offset: 0x024bcf55, size: 159 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
let value = ReactModule;
value = value.memo(value.forwardRef(_fun117660));
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/shared/VoicePanelIconButton.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/shared/VoicePanelIconButton.tsx');
exports.default = value;
function _fun117660(a0, a1) { // fn#117660, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15585:136, offset: 0x024bcff4, size: 200 bytes, params: 3, frame: 23
const style = a0.style;
const overrideVariant = a0.overrideVariant;
const layout = a0.layout;
const object = {'style': 0, 'overrideVariant': 0, 'layout': 0};
silentSetPrototypeOf(object, null, undefined);
const value = copyDataProperties({}, a0, object, undefined);
const IconButton = (IconButtonNativeModule).IconButton;
return (
<ReanimatedNativeView
ref={a1}
style={style}
layout={layout}
>
<IconButton
{...value}
{...{['size']: 'sm'}}
{...{['variant']: overrideVariant ?? 'secondary-overlay'}}
{...{['maxFontSizeMultiplier']: 2}}
/>
</ReanimatedNativeView>
);
}
}
function _fun117660(a0, a1) { // fn#117660, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15585:136, offset: 0x024bcff4, size: 200 bytes, params: 3, frame: 23
const style = a0.style;
const overrideVariant = a0.overrideVariant;
const layout = a0.layout;
const object2 = {'style': 0, 'overrideVariant': 0, 'layout': 0};
silentSetPrototypeOf(object2, null, undefined);
const value = copyDataProperties({}, a0, object2, undefined);
const ReanimatedNativeView = importDefault(8141) /* metro dependency 8141: ReanimatedNativeView */;
const IconButton = (require(8341) /* metro dependency 8341: IconButtonNative */).IconButton;
return (
<ReanimatedNativeView
ref={a1}
style={style}
layout={layout}
>
<IconButton
{...value}
{...{['size']: 'sm'}}
{...{['variant']: overrideVariant ?? 'secondary-overlay'}}
{...{['maxFontSizeMultiplier']: 2}}
/>
</ReanimatedNativeView>
);
}
global.__d(_fun117659, 15388, [31, 33, 8141, 8341,
2]) /* metro module 15388, dependencies: [31, 33, 8141, 8341, 2] */;
Loaded 100 of 22448 files, more files were not shown because too many files have changed in this diff. Show more