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,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] */;