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,18 +1,20 @@
/* Metro module 8044; source: modules/activities/panel/ActivityPanelConstants.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun63763(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#63763, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8222:6, offset: 0x01b8f517, size: 301 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const object = {NO_CHAT: 0};
object[0] = 'NO_CHAT';
object.RESIZABLE = 1;
object[1] = 'RESIZABLE';
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/panel/ActivityPanelConstants.tsx');
const object2 = {NO_CHAT: 0};
object2[0] = 'NO_CHAT';
object2.RESIZABLE = 1;
object2[1] = 'RESIZABLE';
(FileImportTrackerModule).fileFinishedImporting('modules/activities/panel/ActivityPanelConstants.tsx');
exports.ActivityPanelModes = {DISCONNECTED: 'disconnected',
LAUNCHING_WITH_ORIENTATION_CHANGE: 'launching_with_orientation_change', PANEL: 'panel', PIP: 'pip',
ACTIVITY_POPOUT_WINDOW: 'activity_popout_window'};
exports.SCREEN_HEADER_HEIGHT = 64;
exports.ACTIVITY_PANEL_LAYOUT_PHYSICS = {'stiffness': 320, 'mass': 0.25, 'damping': 15, 'overshootClamping': true};
exports.FocusedActivityLayouts = object;
exports.FocusedActivityLayouts = object2;
exports.LANDSCAPE_ACTIVITY_ASPECT_RATIO = 1.7777777777777777;
exports.ACTIVITY_PANEL_PORTRAIT_HEADER_HEIGHT = 48;
exports.LANDSCAPE_IFRAME_HORIZONTAL_MARGIN = 64;
@@ -21,3 +23,4 @@ function _fun63763(global, require, importDefault, importAll, module, exports, d
exports.ACTIVITY_LAYOUT_PHYSICS_DEFAULT = {'stiffness': 150, 'mass': 0.35, 'damping': 40, 'overshootClamping': true};
}
global.__d(_fun63763, 8044, [2]) /* metro module 8044, dependencies: [2] */;
File diff suppressed because it is too large. Load diff
@@ -1,104 +1,126 @@
/* Metro module 15381; source: modules/activities/panel/native/ActivityInviteSheetList.tsx; dependencies: [31, 661, 33, 4501, 6597, 697, 1305, 1244, 5278, 4080, 4008, 4573, 15382, 5463, 6277, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import ActionSheetActionCreators from '../../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
import UseSafeAreaInsetsKeyboardAwareNative from '../../../safe_area/useSafeAreaInsetsKeyboardAware.native.tsx'; /* Metro dependency 5463 */
import TextStyles from '../../../rebrand/native/TextStyles.tsx'; /* Metro dependency 6597 */
import ActivityInviteSheetRow from './ActivityInviteSheetRow.tsx'; /* Metro dependency 15382 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as NativeModule from '../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as PressablesModule from '../../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as Module06277Module from '../../../../by-id/module-06277.js'; /* Metro dependency 6277 */
function _fun117584(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117584, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15578:6, offset: 0x024b92d7, size: 416 bytes, params: 8, frame: 27
var object4;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const Fonts = (require(661) /* metro dependency 661: Constants */).Fonts;
let value = require(33) /* metro dependency 33 */;
const Fonts = (ConstantsModule).Fonts;
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;
object4 = {};
const object5 = {};
const textStyles = importDefault(6597) /* metro dependency 6597: TextStyles */;
object = {};
const object2 = {};
const DISPLAY_EXTRABOLD = Fonts.DISPLAY_EXTRABOLD;
const MOBILE_TEXT_HEADING_PRIMARY = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_TEXT_HEADING_PRIMARY;
copyDataProperties(object5, textStyles(DISPLAY_EXTRABOLD, MOBILE_TEXT_HEADING_PRIMARY, 18), undefined);
object5['textTransform'] = 'none';
object5['lineHeight'] = 24;
object4.emptyTitle = object5;
const object6 = {};
const value3 = textStyles;
const MOBILE_TEXT_HEADING_PRIMARY = (Native).colors.MOBILE_TEXT_HEADING_PRIMARY;
copyDataProperties(object2, TextStyles(DISPLAY_EXTRABOLD, MOBILE_TEXT_HEADING_PRIMARY, 18), undefined);
object2['textTransform'] = 'none';
object2['lineHeight'] = 24;
object.emptyTitle = object2;
const object3 = {};
const PRIMARY_MEDIUM = Fonts.PRIMARY_MEDIUM;
const TEXT_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_SUBTLE;
copyDataProperties(object6, value3(PRIMARY_MEDIUM, TEXT_SUBTLE, 16), undefined);
object6['lineHeight'] = 20;
object6['fontWeight'] = '600';
object4.emptyBody = object6;
object4.goToFriendsLink = {textAlign: 'center'};
const env0_7 = Reflect.apply(createStyles, value, [object4]);
const TEXT_SUBTLE = (Native).colors.TEXT_SUBTLE;
copyDataProperties(object3, TextStyles(PRIMARY_MEDIUM, TEXT_SUBTLE, 16), undefined);
object3['lineHeight'] = 20;
object3['fontWeight'] = '600';
object.emptyBody = object3;
object.goToFriendsLink = {textAlign: 'center'};
const env0_7 = Reflect.apply(createStyles, value, [object]);
const keyExtractor_117587 = function(a0) {
return a0.item.id;
};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/panel/native/ActivityInviteSheetList.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/activities/panel/native/ActivityInviteSheetList.tsx');
exports.default = ActivityInviteSheetList;
function FriendsEmptyComponent_117585() { // fn#117585, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15578:479, offset: 0x024b9477, size: 437 bytes, params: 1, frame: 25
const styles = useStyles();
const jsxRuntimeEnv0_5Binding = jsxRuntimeEnv0_5;
const RefreshEmptyState = (NativeModule).RefreshEmptyState;
const object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
object2.title = Reflect.apply(string, intl, [(require(1244) /* metro dependency 1244: indexNative */).t.dz4UlO]);
string = intl.string;
const MBQBI7 = (require(1244) /* metro dependency 1244: indexNative */).t.MBQBI7;
object2.body = Reflect.apply(string, intl, [MBQBI7]);
object2.titleStyle = styles.emptyTitle;
object2.bodyStyle = styles.emptyBody;
const refreshEmptyState = <RefreshEmptyState {...object2} />;
const PressableOpacity = (PressablesModule).PressableOpacity;
const pressableOpacityProps = {onPress: onPress_117586, accessibilityRole: 'link',
accessibilityLabel: intl.string((require(1244) /* metro dependency 1244: indexNative */).t.a7FVbE),
hitSlop: {'top': 8, 'left': 8, 'bottom': 8, 'right': 8}};
const Text = (TextModule).Text;
return (
<>
{refreshEmptyState}
<PressableOpacity {...pressableOpacityProps}>
<Text
style={[styles.goToFriendsLink]}
variant="text-sm/semibold"
color="text-link"
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.a7FVbE)}
</Text>
</PressableOpacity>
</>
);
function FriendsEmptyComponent_117585OnPress() { // fn#117586, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15578:744, owner: FriendsEmptyComponent_117585.onPress, offset: 0x01d376ff, size: 116 bytes, params: 1, frame: 15
let value = environment.__proto__;
(ActionSheetActionCreators).hideActionSheet();
value = require(4008) /* metro dependency 4008: RootNavigationRefNative */;
value = value.getRootNavigationRef();
if (value != null) {
value.navigate('friends', {screen: 'add-friends', params: {sourcePage: 'Instant Invite Empty State'}});
}
}
}
function ActivityInviteSheetList({data, error, getSendState, isSubmitting, onInviteSent, onPressAvatar}) { // fn#117588, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15578:1294, offset: 0x024b962c, size: 307 bytes, params: 2, frame: 23
const value2 = isSubmitting.useCallback(_fun117589, [error, isSubmitting, getSendState, onPressAvatar, onInviteSent,
data.length]);
const insets = (UseSafeAreaInsetsKeyboardAwareNative)({isKeyboardAwareOnAndroid: false}).insets;
const BottomSheetFlatList = (Module06277Module).BottomSheetFlatList;
const object2 = {};
const bottom = insets.bottom;
const PX_16 = (Native).space.PX_16;
object2.paddingBottom = bottom + PX_16;
const PX_12 = (Native).space.PX_12;
object2.paddingHorizontal = PX_12;
return (
<BottomSheetFlatList
contentContainerStyle={object2}
bounces={false}
renderItem={value2}
data={data}
keyExtractor={keyExtractor_117587}
keyboardShouldPersistTaps="always"
ListEmptyComponent={FriendsEmptyComponent_117585}
/>
);
function _fun117589({item, index}) { // fn#117589, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15578:1427, offset: 0x024b975f, size: 143 bytes, params: 2, frame: 18
const value = environment.__proto__;
return ((Component) => <Component start={index === 0} end={index === data.length - 1} row={item} onPressAvatar={onPressAvatar} onInviteSent={onInviteSent} isSubmitting={isSubmitting} error={error} sendState={getSendState(item)} />)(ActivityInviteSheetRow);
}
}
}
function FriendsEmptyComponent_117585() { // fn#117585, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15578:479, offset: 0x024b9477, size: 437 bytes, params: 1, frame: 25
const styles = useStyles();
const jsxRuntimeEnv0_5Binding = jsxRuntimeEnv0_5;
const RefreshEmptyState = (require(1305) /* metro dependency 1305: native */).RefreshEmptyState;
const object = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
object.title = Reflect.apply(string, intl, [(require(1244) /* metro dependency 1244: indexNative */).t.dz4UlO]);
string = intl.string;
const MBQBI7 = (require(1244) /* metro dependency 1244: indexNative */).t.MBQBI7;
object.body = Reflect.apply(string, intl, [MBQBI7]);
object.titleStyle = styles.emptyTitle;
object.bodyStyle = styles.emptyBody;
const refreshEmptyState = <RefreshEmptyState {...object} />;
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const pressableOpacityProps = {onPress: onPress_117586, accessibilityRole: 'link',
accessibilityLabel: intl.string((require(1244) /* metro dependency 1244: indexNative */).t.a7FVbE),
hitSlop: {'top': 8, 'left': 8, 'bottom': 8, 'right': 8}};
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<>
{refreshEmptyState}
<PressableOpacity {...pressableOpacityProps}>
<Text
style={[styles.goToFriendsLink]}
variant="text-sm/semibold"
color="text-link"
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.a7FVbE)}
</Text>
</PressableOpacity>
</>
);
}
function ActivityInviteSheetList({data, error, getSendState, isSubmitting, onInviteSent, onPressAvatar}) { // fn#117588, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15578:1294, offset: 0x024b962c, size: 307 bytes, params: 2, frame: 23
const value2 = isSubmitting.useCallback(_fun117589, [error, isSubmitting, getSendState, onPressAvatar, onInviteSent,
data.length]);
const insets = (importDefault(5463) /* metro dependency 5463: useSafeAreaInsetsKeyboardAwareNative */)({isKeyboardAwareOnAndroid: false}).insets;
const BottomSheetFlatList = (require(6277) /* metro dependency 6277 */).BottomSheetFlatList;
const object = {};
const bottom = insets.bottom;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object.paddingBottom = bottom + PX_16;
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object.paddingHorizontal = PX_12;
return (
<BottomSheetFlatList
contentContainerStyle={object}
bounces={false}
renderItem={value2}
data={data}
keyExtractor={keyExtractor_117587}
keyboardShouldPersistTaps="always"
ListEmptyComponent={FriendsEmptyComponent_117585}
/>
);
}
function _fun117589({item, index}) { // fn#117589, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15578:1427, offset: 0x024b975f, size: 143 bytes, params: 2, frame: 18
const value = environment.__proto__;
return ((Component) => <Component start={index === 0} end={index === data.length - 1} row={item} onPressAvatar={onPressAvatar} onInviteSent={onInviteSent} isSubmitting={isSubmitting} error={error} sendState={getSendState(item)} />)(importDefault(15382) /* metro dependency 15382: ActivityInviteSheetRow */);
}
global.__d(_fun117584, 15381, [31, 661, 33, 4501, 6597, 697, 1305, 1244, 5278, 4080, 4008, 4573, 15382, 5463, 6277,
2]) /* metro module 15381, dependencies: [31, 661, 33, 4501, 6597, 697, 1305, 1244, 5278, 4080, 4008, 4573, 15382, 5463, 6277, 2] */;
@@ -1,193 +1,236 @@
/* Metro module 15382; source: modules/activities/panel/native/ActivityInviteSheetRow.tsx; dependencies: [31, 27, 1379, 1867, 1878, 4118, 33, 4501, 697, 566, 4805, 9153, 5278, 1305, 9210, 3995, 1244, 1423, 1861, 4573, 6238, 9211, 2] */
import ChannelStore from '../../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import GuildStore from '../../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import UserStore from '../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import UseChannelName from '../../../channel/useChannelName.tsx'; /* Metro dependency 4805 */
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 '../../../instant_invite/Constants.tsx'; /* Metro dependency 4118 */
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 */
import * as TableRowNativeModule from '../../../../design/components/TableRow/native/TableRow.native.tsx'; /* Metro dependency 6238 */
import * as InstantInviteUtilsModule from '../../../../utils/InstantInviteUtils.tsx'; /* Metro dependency 9153 */
function _fun117590(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117590, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15579:6, offset: 0x024b97ee, size: 367 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 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_7 = (require(4118) /* metro dependency 4118: Constants */).InviteSendStates;
const env0_8 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const object = {'width': 32, 'height': 32, 'borderRadius': null, 'backgroundColor': null, 'alignItems': 'center',
let value = ReactModule;
const createStyles = CreateStylesModule.createStyles;
const object2 = {'width': 32, 'height': 32, 'borderRadius': null, 'backgroundColor': null, 'alignItems': 'center',
'justifyContent': 'center', 'overflow': 'hidden', 'marginTop': 0, 'marginRight': 10, 'borderColor': null,
'borderStyle': 'solid', 'borderWidth': 2};
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object.backgroundColor = BACKGROUND_BASE_LOW;
object2.backgroundColor = BACKGROUND_BASE_LOW;
const BORDER_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_MUTED;
object.borderColor = BORDER_MUTED;
const env0_9 = Reflect.apply(createStyles, createStylesModule, [{acronym: object}]);
object2.borderColor = BORDER_MUTED;
const env0_9 = Reflect.apply(createStyles, CreateStylesModule, [{acronym: object2}]);
value = value.memo(_fun117591);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/panel/native/ActivityInviteSheetRow.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/activities/panel/native/ActivityInviteSheetRow.tsx');
exports.default = value;
}
function _fun117591({end, error, isSubmitting, onInviteSent, onPressAvatar, row, sendState, start}) { // fn#117591, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15579:501, offset: 0x024b995d, size: 1388 bytes, params: 2, frame: 40
var r25;
var r12;
var r11;
var r13;
var r2;
var r23;
var r1;
var r4;
var r5;
var r6;
var moduleValue2;
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
var defaultImport;
var makeSource;
var defaultImport2;
var value10;
var defaultImport3;
var defaultImport4;
var user;
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
var value14;
var pressableOpacity;
var value17;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const styles = useStyles();
const id = row.item.id;
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(id);
});
const value3 = (importDefault(4805) /* metro dependency 4805: useChannelName */)(channel);
const closure = function() {
onInviteSent(row);
};
const type = row.type;
const RowTypes = (require(9153) /* metro dependency 9153: InstantInviteUtils */).RowTypes;
const DM = RowTypes.DM;
if (DM === type) {
user = UserStore.getUser(id);
value14 = null;
r23 = value14 == user ? undefined : user.getAvatarSource(undefined);
pressableOpacity = <PressableOpacity importantForAccessibility="no-hide-descendants" accessibilityElementsHidden onPress={function(a0) {
a0.stopPropagation();
if (onPressAvatar != null) {
onPressAvatar(id);
function _fun117591({end, error, isSubmitting, onInviteSent, onPressAvatar, row, sendState, start}) { // fn#117591, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15579:501, offset: 0x024b995d, size: 1388 bytes, params: 2, frame: 40
var r25;
var r12;
var r11;
var r13;
var r2;
var r23;
var r1;
var r4;
var r5;
var r6;
var moduleValue2;
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
var defaultImport;
var makeSource;
var defaultImport2;
var value10;
var defaultImport3;
var defaultImport4;
var user;
const PressableOpacity = (PressablesModule).PressableOpacity;
var value14;
var pressableOpacity;
var value17;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const TableRow = (TableRowNativeModule).TableRow;
const styles = useStyles();
const id = row.item.id;
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(id);
});
const value3 = (UseChannelName)(channel);
const closure = function() {
onInviteSent(row);
};
const type = row.type;
const RowTypes = (InstantInviteUtilsModule).RowTypes;
const DM = RowTypes.DM;
if (DM === type) {
user = UserStore.getUser(id);
value14 = null;
r23 = value14 == user ? undefined : user.getAvatarSource(undefined);
pressableOpacity = (
<PressableOpacity
importantForAccessibility="no-hide-descendants"
accessibilityElementsHidden
onPress={function(a0) {
a0.stopPropagation();
if (onPressAvatar != null) {
onPressAvatar(id);
}
}}
style={{'padding': 8, 'margin': -8}}
>
<Avatar
source={value14 != r23 ? r23 : value14}
size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.REFRESH_MEDIUM_32}
/>
</PressableOpacity>
);
value17 = ((Component) => <Component nick={(importDefault(3995) /* metro dependency 3995: UserUtils */).getGlobalName(user)} user={user} />)(importDefault(9210) /* metro dependency 9210: DiscordTag */);
r1 = value14 != onPressAvatar ? [{name: 'viewProfile',
label: intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.uCenkh,
{username: value14 == user ? undefined : user.tag})}] : undefined;
r4 = I_117595;
r5 = r1;
var tableRowProps = {start: start, end: end, icon: pressableOpacity, label: value17,
trailing: ((Component) => <Component sendState={sendState} onPressSend={closure} />)(importDefault(9211) /* metro dependency 9211: InviteButton */),
onPress: closure};
r6 = error != null || isSubmitting;
r6 = !r6 ? sendState === InviteSendStates.SENT : r6;
tableRowProps.disabled = r6;
tableRowProps.accessibilityActions = r5;
tableRowProps.onAccessibilityAction = r4;
return <TableRow {...tableRowProps} />;
}
const FRIEND = RowTypes.FRIEND;
if (FRIEND === type) {
user = UserStore.getUser(id);
value14 = null;
r23 = value14 == user ? undefined : user.getAvatarSource(undefined);
pressableOpacity = (
<PressableOpacity
importantForAccessibility="no-hide-descendants"
accessibilityElementsHidden
onPress={function(a0) {
a0.stopPropagation();
if (onPressAvatar != null) {
onPressAvatar(id);
}
}}
style={{'padding': 8, 'margin': -8}}
>
<Avatar
source={value14 != r23 ? r23 : value14}
size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.REFRESH_MEDIUM_32}
/>
</PressableOpacity>
);
value17 = ((Component) => <Component nick={(importDefault(3995) /* metro dependency 3995: UserUtils */).getGlobalName(user)} user={user} />)(importDefault(9210) /* metro dependency 9210: DiscordTag */);
r1 = value14 != onPressAvatar ? [{name: 'viewProfile',
label: intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.uCenkh,
{username: value14 == user ? undefined : user.tag})}] : undefined;
r4 = I_117595;
r5 = r1;
var tableRowProps = {start: start, end: end, icon: pressableOpacity, label: value17,
trailing: ((Component) => <Component sendState={sendState} onPressSend={closure} />)(importDefault(9211) /* metro dependency 9211: InviteButton */),
onPress: closure};
r6 = error != null || isSubmitting;
r6 = !r6 ? sendState === InviteSendStates.SENT : r6;
tableRowProps.disabled = r6;
tableRowProps.accessibilityActions = r5;
tableRowProps.onAccessibilityAction = r4;
return <TableRow {...tableRowProps} />;
}
const GROUP_DM = RowTypes.GROUP_DM;
if (GROUP_DM === type) {
value10 = null;
if (value10 != channel) {
defaultImport3 = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
makeSource = defaultImport3.makeSource;
defaultImport4 = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
r13 = (
<Avatar
source={Reflect.apply(makeSource, defaultImport3, [defaultImport4.getChannelIconURL({id: channel.id,
icon: channel.icon, applicationId: channel.application_id, size: 32})])}
size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.REFRESH_MEDIUM_32}
/>
);
} else {
r13 = value10;
}
}} style={{'padding': 8,
'margin': -8}}><Avatar source={value14 != r23 ? r23 : value14} size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.REFRESH_MEDIUM_32} /></PressableOpacity>;
value17 = ((Component) => <Component nick={(importDefault(3995) /* metro dependency 3995: UserUtils */).getGlobalName(user)} user={user} />)(importDefault(9210) /* metro dependency 9210: DiscordTag */);
r1 = value14 != onPressAvatar ? [{name: 'viewProfile',
label: intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.uCenkh,
{username: value14 == user ? undefined : user.tag})}] : undefined;
r4 = I_117595;
r5 = r1;
var tableRowProps = {start: start, end: end, icon: pressableOpacity, label: value17,
trailing: ((Component) => <Component sendState={sendState} onPressSend={closure} />)(importDefault(9211) /* metro dependency 9211: InviteButton */),
onPress: closure};
r6 = error != null || isSubmitting;
r6 = !r6 ? sendState === InviteSendStates.SENT : r6;
tableRowProps.disabled = r6;
tableRowProps.accessibilityActions = r5;
tableRowProps.onAccessibilityAction = r4;
return <TableRow {...tableRowProps} />;
}
const FRIEND = RowTypes.FRIEND;
if (FRIEND === type) {
user = UserStore.getUser(id);
value14 = null;
r23 = value14 == user ? undefined : user.getAvatarSource(undefined);
pressableOpacity = <PressableOpacity importantForAccessibility="no-hide-descendants" accessibilityElementsHidden onPress={function(a0) {
a0.stopPropagation();
if (onPressAvatar != null) {
onPressAvatar(id);
r2 = value10 != value3 ? value3 : '';
r4 = undefined;
r5 = undefined;
var tableRowProps = {start: start, end: end, icon: r13, label: r2,
trailing: ((Component) => <Component sendState={sendState} onPressSend={closure} />)(importDefault(9211) /* metro dependency 9211: InviteButton */),
onPress: closure};
r6 = error != null || isSubmitting;
r6 = !r6 ? sendState === InviteSendStates.SENT : r6;
tableRowProps.disabled = r6;
tableRowProps.accessibilityActions = r5;
tableRowProps.onAccessibilityAction = r4;
return <TableRow {...tableRowProps} />;
}
const CHANNEL = RowTypes.CHANNEL;
if (CHANNEL === type) {
r25 = channel?.guild_id != null ? GuildStore.getGuild(channel.guild_id) : undefined;
if (r25 == null) {
return null;
}
}} style={{'padding': 8,
'margin': -8}}><Avatar source={value14 != r23 ? r23 : value14} size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.REFRESH_MEDIUM_32} /></PressableOpacity>;
value17 = ((Component) => <Component nick={(importDefault(3995) /* metro dependency 3995: UserUtils */).getGlobalName(user)} user={user} />)(importDefault(9210) /* metro dependency 9210: DiscordTag */);
r1 = value14 != onPressAvatar ? [{name: 'viewProfile',
label: intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.uCenkh,
{username: value14 == user ? undefined : user.tag})}] : undefined;
r4 = I_117595;
r5 = r1;
var tableRowProps = {start: start, end: end, icon: pressableOpacity, label: value17,
trailing: ((Component) => <Component sendState={sendState} onPressSend={closure} />)(importDefault(9211) /* metro dependency 9211: InviteButton */),
onPress: closure};
r6 = error != null || isSubmitting;
r6 = !r6 ? sendState === InviteSendStates.SENT : r6;
tableRowProps.disabled = r6;
tableRowProps.accessibilityActions = r5;
tableRowProps.onAccessibilityAction = r4;
return <TableRow {...tableRowProps} />;
}
const GROUP_DM = RowTypes.GROUP_DM;
if (GROUP_DM === type) {
value10 = null;
if (value10 != channel) {
defaultImport3 = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
makeSource = defaultImport3.makeSource;
defaultImport4 = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
r13 = <Avatar source={Reflect.apply(makeSource, defaultImport3,
[defaultImport4.getChannelIconURL({id: channel.id,
icon: channel.icon, applicationId: channel.application_id,
size: 32})])} size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.REFRESH_MEDIUM_32} />;
} else {
r13 = value10;
if (r25.icon != null) {
defaultImport = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
makeSource = defaultImport.makeSource;
defaultImport2 = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
r12 = (
<Avatar
source={Reflect.apply(makeSource, defaultImport, [defaultImport2.getGuildIconURL({id: r25.id,
icon: r25.icon, size: 32})])}
size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.REFRESH_MEDIUM_32}
/>
);
} else {
moduleValue2 = require(1861) /* metro dependency 1861: StringUtils */;
r12 = (
<View style={styles.acronym}>
{((Text) => <Text variant="text-sm/bold">{moduleValue2.getAcronym(r25.name)}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}
</View>
);
}
r11 = value3 == null ? '' : '#' + value3;
r4 = undefined;
r5 = undefined;
var tableRowProps = {start: start, end: end, icon: r12, label: r11,
trailing: ((Component) => <Component sendState={sendState} onPressSend={closure} />)(importDefault(9211) /* metro dependency 9211: InviteButton */),
onPress: closure};
r6 = error != null || isSubmitting;
r6 = !r6 ? sendState === InviteSendStates.SENT : r6;
tableRowProps.disabled = r6;
tableRowProps.accessibilityActions = r5;
tableRowProps.onAccessibilityAction = r4;
return <TableRow {...tableRowProps} />;
}
r2 = value10 != value3 ? value3 : '';
r4 = undefined;
r5 = undefined;
var tableRowProps = {start: start, end: end, icon: r13, label: r2,
trailing: ((Component) => <Component sendState={sendState} onPressSend={closure} />)(importDefault(9211) /* metro dependency 9211: InviteButton */),
onPress: closure};
r6 = error != null || isSubmitting;
r6 = !r6 ? sendState === InviteSendStates.SENT : r6;
tableRowProps.disabled = r6;
tableRowProps.accessibilityActions = r5;
tableRowProps.onAccessibilityAction = r4;
return <TableRow {...tableRowProps} />;
}
const CHANNEL = RowTypes.CHANNEL;
if (CHANNEL === type) {
r25 = channel?.guild_id != null ? GuildStore.getGuild(channel.guild_id) : undefined;
if (r25 == null) {
return null;
}
if (r25.icon != null) {
defaultImport = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
makeSource = defaultImport.makeSource;
defaultImport2 = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
r12 = <Avatar source={Reflect.apply(makeSource, defaultImport, [defaultImport2.getGuildIconURL({id: r25.id,
icon: r25.icon,
size: 32})])} size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.REFRESH_MEDIUM_32} />;
} else {
moduleValue2 = require(1861) /* metro dependency 1861: StringUtils */;
r12 = <View style={styles.acronym}>{((Text) => <Text variant="text-sm/bold">{moduleValue2.getAcronym(r25.name)}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}</View>;
}
r11 = value3 == null ? '' : '#' + value3;
r4 = undefined;
r5 = undefined;
var tableRowProps = {start: start, end: end, icon: r12, label: r11,
trailing: ((Component) => <Component sendState={sendState} onPressSend={closure} />)(importDefault(9211) /* metro dependency 9211: InviteButton */),
onPress: closure};
r6 = error != null || isSubmitting;
r6 = !r6 ? sendState === InviteSendStates.SENT : r6;
tableRowProps.disabled = r6;
tableRowProps.accessibilityActions = r5;
tableRowProps.onAccessibilityAction = r4;
return <TableRow {...tableRowProps} />;
}
return null;
}
function I_117595({nativeEvent}) { // fn#117595, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15579:1321, offset: 0x024b9f10, size: 76 bytes, params: 2, frame: 11
if (nativeEvent.actionName === 'viewProfile' && onPressAvatar !== null) {
if (onPressAvatar != null) {
onPressAvatar(id);
return null;
function I_117595({nativeEvent}) { // fn#117595, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15579:1321, offset: 0x024b9f10, size: 76 bytes, params: 2, frame: 11
if (nativeEvent.actionName === 'viewProfile' && onPressAvatar !== null) {
if (onPressAvatar != null) {
onPressAvatar(id);
}
}
}
}
}
global.__d(_fun117590, 15382, [31, 27, 1379, 1867, 1878, 4118, 33, 4501, 697, 566, 4805, 9153, 5278, 1305, 9210,
3995, 1244, 1423, 1861, 4573, 6238, 9211,
2]) /* metro module 15382, dependencies: [31, 27, 1379, 1867, 1878, 4118, 33, 4501, 697, 566, 4805, 9153, 5278, 1305, 9210, 3995, 1244, 1423, 1861, 4573, 6238, 9211, 2] */;
@@ -1,51 +1,58 @@
/* Metro module 15359; source: modules/activities/panel/native/ActivityPanelContainer.tsx; dependencies: [31, 1379, 1934, 1378, 33, 566, 3774, 677, 15360, 15369, 2] */
import EmbeddedActivitiesStore from '../../EmbeddedActivitiesStore.tsx'; /* Metro dependency 1378 */
import ChannelStore from '../../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import SelectedChannelStore from '../../../../stores/SelectedChannelStore.tsx'; /* Metro dependency 1934 */
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 ChannelTypesModule from '../../../../external/discord_common/js/shared/shared-constants/ChannelTypes.tsx'; /* Metro dependency 677 */
import * as EmbeddedActivityLocationUtilsModule from '../../utils/embeddedActivityLocationUtils.tsx'; /* Metro dependency 3774 */
function _fun117414(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117414, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15556:6, offset: 0x024b20b5, size: 196 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
const embeddedActivitiesStore = importDefault(1378) /* metro dependency 1378: EmbeddedActivitiesStore */;
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
let value = ReactModule;
value = value.memo(ActivityPanelContainer);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/panel/native/ActivityPanelContainer.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/activities/panel/native/ActivityPanelContainer.tsx');
exports.default = value;
function ActivityPanelContainer() { // fn#117415, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15556:164, offset: 0x024b2179, size: 141 bytes, params: 1, frame: 18
var r0;
var value;
const useStateFromStores = FluxModule.useStateFromStores;
const items2 = [EmbeddedActivitiesStore];
items2[1] = ChannelStore;
items2[2] = SelectedChannelStore;
if (Reflect.apply(useStateFromStores, FluxModule, [items2, _fun117416, []])) {
value = importDefault(15360) /* metro dependency 15360: ActivityPanelController */;
value = ((Component) => <Component>{((Component) => <Component />)(importDefault(15369) /* metro dependency 15369: ActivityPanelUI */)}</Component>)(value);
r0 = value;
} else {
r0 = null;
}
return r0;
function _fun117416() { // fn#117416, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15556:241, offset: 0x024b2206, size: 188 bytes, params: 1, frame: 17
const value = environment.__proto__;
const connectedActivityLocation = EmbeddedActivitiesStore.getConnectedActivityLocation();
if (connectedActivityLocation == null) {
return false;
}
const value3 = undefined;
const embeddedActivityLocationChannelId = (EmbeddedActivityLocationUtilsModule).getEmbeddedActivityLocationChannelId(connectedActivityLocation);
if (embeddedActivityLocationChannelId == null) {
return false;
}
const channel = ChannelStore.getChannel(embeddedActivityLocationChannelId);
const type = channel == null ? value3 : channel.type;
const ChannelTypes = (ChannelTypesModule).ChannelTypes;
const GUILD_TEXT = ChannelTypes.GUILD_TEXT;
return type === GUILD_TEXT || ((channel == null ? value3 : channel.isPrivate()) !== true ? value3 : SelectedChannelStore.getVoiceChannelId() !== embeddedActivityLocationChannelId);
}
}
}
function ActivityPanelContainer() { // fn#117415, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15556:164, offset: 0x024b2179, size: 141 bytes, params: 1, frame: 18
var r0;
var value;
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStores = fluxModule.useStateFromStores;
const items = [EmbeddedActivitiesStore];
items[1] = ChannelStore;
items[2] = SelectedChannelStore;
if (Reflect.apply(useStateFromStores, fluxModule, [items, _fun117416, []])) {
value = importDefault(15360) /* metro dependency 15360: ActivityPanelController */;
value = ((Component) => <Component>{((Component) => <Component />)(importDefault(15369) /* metro dependency 15369: ActivityPanelUI */)}</Component>)(value);
r0 = value;
} else {
r0 = null;
}
return r0;
}
function _fun117416() { // fn#117416, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15556:241, offset: 0x024b2206, size: 188 bytes, params: 1, frame: 17
const value = environment.__proto__;
const connectedActivityLocation = EmbeddedActivitiesStore.getConnectedActivityLocation();
if (connectedActivityLocation == null) {
return false;
}
const value3 = undefined;
const embeddedActivityLocationChannelId = (require(3774) /* metro dependency 3774: embeddedActivityLocationUtils */).getEmbeddedActivityLocationChannelId(connectedActivityLocation);
if (embeddedActivityLocationChannelId == null) {
return false;
}
const channel = ChannelStore.getChannel(embeddedActivityLocationChannelId);
const type = channel == null ? value3 : channel.type;
const ChannelTypes = (require(677) /* metro dependency 677: ChannelTypes */).ChannelTypes;
const GUILD_TEXT = ChannelTypes.GUILD_TEXT;
return type === GUILD_TEXT || ((channel == null ? value3 : channel.isPrivate()) !== true ? value3 : SelectedChannelStore.getVoiceChannelId() !== embeddedActivityLocationChannelId);
}
global.__d(_fun117414, 15359, [31, 1379, 1934, 1378, 33, 566, 3774, 677, 15360, 15369,
2]) /* metro module 15359, dependencies: [31, 1379, 1934, 1378, 33, 566, 3774, 677, 15360, 15369, 2] */;
@@ -1,402 +1,420 @@
/* Metro module 15360; source: modules/activities/panel/native/ActivityPanelController.tsx; dependencies: [57, 31, 4234, 9559, 10724, 1379, 1378, 4237, 8044, 33, 1944, 15361, 4017, 7717, 15362, 1585, 1478, 15363, 15366, 10703, 7713, 15367, 5286, 10705, 4015, 566, 3774, 8102, 4796, 4601, 15368, 7860, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import EmbeddedActivitiesStore from '../../EmbeddedActivitiesStore.tsx'; /* Metro dependency 1378 */
import ChannelStore from '../../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import UseWindowDimensionsNative from '../../../screen/useWindowDimensions.native.tsx'; /* Metro dependency 1478 */
import UseSafeAreaInsetsNative from '../../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import ApplicationStore from '../../../applications/ApplicationStore.tsx'; /* Metro dependency 4234 */
import AppFreezeStore from '../../../panels/morphable/AppFreezeStore.tsx'; /* Metro dependency 9559 */
import SafeAreaDisabledStore from '../../../panels/morphable/native/SafeAreaDisabledStore.tsx'; /* Metro dependency 10724 */
import UsePIPAvoidanceSpecs from './pip/usePIPAvoidanceSpecs.tsx'; /* Metro dependency 15363 */
import UseActivityWebViewLockManager from './useActivityWebViewLockManager.tsx'; /* Metro dependency 15366 */
import UseHandleOAuthNavigation from '../../utils/native/useHandleOAuthNavigation.tsx'; /* Metro dependency 15367 */
import ActivityPanelStateContext from './ActivityPanelStateContext.tsx'; /* Metro dependency 15368 */
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 FunctionUtilsModule from '../../../../utils/FunctionUtils.tsx'; /* Metro dependency 1944 */
import * as EmbeddedActivityLocationUtilsModule from '../../utils/embeddedActivityLocationUtils.tsx'; /* Metro dependency 3774 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 4237 */
import * as UseNavigatorBackPressHandlerNativeModule from '../../../../design/components/Navigator/native/useNavigatorBackPressHandler.native.tsx'; /* Metro dependency 5286 */
import * as VoicePanelUtilsNativeModule from '../../../voice_panel/VoicePanelUtils.native.tsx'; /* Metro dependency 7713 */
import * as DeviceOrientationModule from '../../../device/native/DeviceOrientation.tsx'; /* Metro dependency 7717 */
import * as EmbeddedActivitiesActionCreatorsModule from '../../EmbeddedActivitiesActionCreators.tsx'; /* Metro dependency 7860 */
import * as ActivityPanelConstantsModule from '../ActivityPanelConstants.tsx'; /* Metro dependency 8044 */
import * as ActivityPanelUtilsModule from './utils/ActivityPanelUtils.tsx'; /* Metro dependency 15361 */
function _fun117417(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117417, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15557:6, offset: 0x024b22c2, size: 407 bytes, params: 8, frame: 21
const env0_0 = require;
const closure = BaseActivityPanelController;
const BaseActivityPanelController2 = BaseActivityPanelController;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = importDefault(57) /* metro dependency 57 */;
const env0_5 = importAll(31) /* metro dependency 31 */;
const applicationStore = importDefault(4234) /* metro dependency 4234: ApplicationStore */;
const appFreezeStore = importDefault(9559) /* metro dependency 9559: AppFreezeStore */;
const safeAreaDisabledStore = importDefault(10724) /* metro dependency 10724: SafeAreaDisabledStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const embeddedActivitiesStore = importDefault(1378) /* metro dependency 1378: EmbeddedActivitiesStore */;
const constantsModule = require(4237) /* metro dependency 4237: Constants */;
const env0_11 = constantsModule.OrientationLockState;
const env0_12 = constantsModule.ACTIVITY_PORTRAIT_ASPECT_RATIO;
const env0_13 = constantsModule.ACTIVITY_LANDSCAPE_ASPECT_RATIO;
const env0_14 = (require(8044) /* metro dependency 8044: ActivityPanelConstants */).ActivityPanelModes;
const env0_15 = (require(33) /* metro dependency 33 */).jsx;
const env0_16 = {'x': 0, 'y': 0, 'gestureActive': false};
const env0_17 = (require(1944) /* metro dependency 1944: FunctionUtils */).cachedFunction(_fun117435);
const env0_17 = (FunctionUtilsModule).cachedFunction(_fun117435);
object = {code: 'function ActivityPanelControllerTsx1(){const{wrapperOffset}=this.__closure;return wrapperOffset.get().gestureActive;}'};
object = {code: 'function ActivityPanelControllerTsx2(gestureActive,previous){const{runOnJS,setWrapperGestureInProgress}=this.__closure;if(gestureActive===previous)return;runOnJS(setWrapperGestureInProgress)(gestureActive);}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/panel/native/ActivityPanelController.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/activities/panel/native/ActivityPanelController.tsx');
exports.default = ActivityPanelController;
exports.BaseActivityPanelController = closure;
}
function BaseActivityPanelController({children, context, orientationLockStateForApp, mode, hasConnectedActivity, connectedActivityAppId, currentApp, updateActivityPanelMode}) { // fn#117418, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15557:1197, offset: 0x024b2459, size: 708 bytes, params: 2, frame: 33
const value2 = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
const value3 = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)();
const value4 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue({'x': -1, 'y': -1});
const value5 = (importDefault(15363) /* metro dependency 15363: usePIPAvoidanceSpecs */)(value2);
const value6 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(env0_16);
const env0_5 = value6;
const env0_6 = env0_5.useRef(mode);
const value7 = (importDefault(15366) /* metro dependency 15366: useActivityWebViewLockManager */)();
const isTabletActivitySurface = (require(10703) /* metro dependency 10703: getDefaultOrientationLockState */).getIsTabletActivitySurface();
const r20 = orientationLockStateForApp ?? (require(10703) /* metro dependency 10703: getDefaultOrientationLockState */).getDefaultOrientationLockState(currentApp);
const value10 = env0_17(value3, value2.top, r20, isTabletActivitySurface);
const env0_11 = env0_5.useRef(connectedActivityAppId);
const value11 = (require(7713) /* metro dependency 7713: VoicePanelUtilsNative */).useIsVoicePanelFullscreen();
(importDefault(15367) /* metro dependency 15367: useHandleOAuthNavigation */)();
(require(5286) /* metro dependency 5286: useNavigatorBackPressHandlerNative */).useNavigatorBackPressHandler(_fun117419);
env0_5.useEffect(_fun117420, [connectedActivityAppId, r20, mode, value10.isWindowLandscape, isTabletActivitySurface,
updateActivityPanelMode]);
env0_5.useEffect(_fun117421, [mode, value6]);
BaseActivityPanelControllerUseActivityOrientationState({isConnected: hasConnectedActivity, selectedMode: mode,
isVoicePanelFullscreen: value11, applicationId: connectedActivityAppId,
orientationLockStateForApp: orientationLockStateForApp});
useSafeAreaLock({isActivityConnected: hasConnectedActivity,
isActivityFocused: hasConnectedActivity && mode === ActivityPanelModes.PANEL, isVoicePanelFullscreen: value11});
useAppFreeze(value6);
const value13 = env0_5.useMemo(_fun117434, [mode, value5, value4, updateActivityPanelMode, value7, value10, value6]);
const Provider = context.Provider;
return (
<Provider value={value13}>
{children}
</Provider>
);
}
function _fun117435({width, height}, a1, a2, a3) { // fn#117435, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15557:371, offset: 0x024b2d4f, size: 312 bytes, params: 5, frame: 19
var r6;
var r0;
var object2;
var Math;
const value = width > height;
const LANDSCAPE = OrientationLockState.LANDSCAPE;
if (LANDSCAPE === a2) {
if (a3) {
if (value) {
object2 = {};
Math = global.Math;
object2.width = Math.max(width, height);
Math = global.Math;
object2.height = Math.min(height, width);
object2.isLandscape = true;
object2.isWindowLandscape = true;
r0 = object2;
exports.BaseActivityPanelController = BaseActivityPanelController2;
function BaseActivityPanelController({children, context, orientationLockStateForApp, mode, hasConnectedActivity, connectedActivityAppId, currentApp, updateActivityPanelMode}) { // fn#117418, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15557:1197, offset: 0x024b2459, size: 708 bytes, params: 2, frame: 33
const value2 = (UseSafeAreaInsetsNative)();
const value3 = (UseWindowDimensionsNative)();
const value4 = (ReanimatedRexportModule).useSharedValue({'x': -1, 'y': -1});
const value5 = (UsePIPAvoidanceSpecs)(value2);
const value6 = (ReanimatedRexportModule).useSharedValue(env0_16);
const env0_5 = value6;
const env0_6 = env0_5.useRef(mode);
const value7 = (UseActivityWebViewLockManager)();
const isTabletActivitySurface = (require(10703) /* metro dependency 10703: getDefaultOrientationLockState */).getIsTabletActivitySurface();
const r20 = orientationLockStateForApp ?? (require(10703) /* metro dependency 10703: getDefaultOrientationLockState */).getDefaultOrientationLockState(currentApp);
const value10 = env0_17(value3, value2.top, r20, isTabletActivitySurface);
const env0_11 = env0_5.useRef(connectedActivityAppId);
const value11 = (VoicePanelUtilsNativeModule).useIsVoicePanelFullscreen();
(UseHandleOAuthNavigation)();
(UseNavigatorBackPressHandlerNativeModule).useNavigatorBackPressHandler(_fun117419);
env0_5.useEffect(_fun117420, [connectedActivityAppId, r20, mode, value10.isWindowLandscape, isTabletActivitySurface,
updateActivityPanelMode]);
env0_5.useEffect(_fun117421, [mode, value6]);
useActivityOrientationState({isConnected: hasConnectedActivity, selectedMode: mode, isVoicePanelFullscreen: value11,
applicationId: connectedActivityAppId, orientationLockStateForApp: orientationLockStateForApp});
useSafeAreaLock({isActivityConnected: hasConnectedActivity,
isActivityFocused: hasConnectedActivity && mode === ActivityPanelModes.PANEL, isVoicePanelFullscreen: value11});
useAppFreeze(value6);
const value13 = env0_5.useMemo(_fun117434, [mode, value5, value4, updateActivityPanelMode, value7, value10, value6]);
const Provider = context.Provider;
return (
<Provider value={value13}>
{children}
</Provider>
);
function _fun117419() { // fn#117419, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15557:1735, offset: 0x024b271d, size: 52 bytes, params: 1, frame: 12
var r0;
const modeBinding = mode;
const PANEL = ActivityPanelModes.PANEL;
const value3 = modeBinding === PANEL;
if (value3) {
updateActivityPanelMode(ActivityPanelModes.PIP);
r0 = true;
} else {
r0 = {width: width, height: width * ACTIVITY_LANDSCAPE_ASPECT_RATIO - a1, isLandscape: true,
isWindowLandscape: value};
r0 = value3;
}
} else {
object2 = {};
Math = global.Math;
object2.width = Math.max(width, height);
Math = global.Math;
object2.height = Math.min(height, width);
object2.isLandscape = true;
object2.isWindowLandscape = true;
r0 = object2;
return r0;
}
return r0;
}
const PORTRAIT = OrientationLockState.PORTRAIT;
if (PORTRAIT === a2) {
if (a3) {
if (value) {
r6 = {width: height * ACTIVITY_PORTRAIT_ASPECT_RATIO, height: height, isLandscape: false,
isWindowLandscape: value};
function _fun117420() { // fn#117420, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15557:1781, offset: 0x024b2751, size: 284 bytes, params: 1, frame: 16
var modeBinding;
var value2;
var updateActivityPanelModeBinding;
var value5;
var value6;
if (connectedActivityAppId == null) {
if (connectedActivityAppId != null) {
modeBinding = mode;
value2 = environment.__proto__;
if (modeBinding === ActivityPanelModes.LAUNCHING_WITH_ORIENTATION_CHANGE && (importDefault(10705) /* metro dependency 10705: doesOrientationMatchLockState */)(env0_10.isWindowLandscape,
env0_9)) {
updateActivityPanelMode(ActivityPanelModes.PANEL);
}
} else if (env0_11.current != null) {
updateActivityPanelModeBinding = updateActivityPanelMode;
value5 = environment.__proto__;
updateActivityPanelModeBinding(ActivityPanelModes.DISCONNECTED);
} else {
modeBinding = mode;
value2 = environment.__proto__;
if (modeBinding === ActivityPanelModes.LAUNCHING_WITH_ORIENTATION_CHANGE && (importDefault(10705) /* metro dependency 10705: doesOrientationMatchLockState */)(env0_10.isWindowLandscape,
env0_9)) {
updateActivityPanelMode(ActivityPanelModes.PANEL);
}
}
} else if (env0_11.current == null) {
value6 = environment.__proto__;
if ((importDefault(10705) /* metro dependency 10705: doesOrientationMatchLockState */)(env0_10.isWindowLandscape,
env0_9)) {
updateActivityPanelMode(ActivityPanelModes.PANEL);
} else if (env0_8) {
updateActivityPanelMode(ActivityPanelModes.PANEL);
} else {
updateActivityPanelMode(ActivityPanelModes.LAUNCHING_WITH_ORIENTATION_CHANGE);
}
} else if (connectedActivityAppId != null) {
modeBinding = mode;
value2 = environment.__proto__;
if (modeBinding === ActivityPanelModes.LAUNCHING_WITH_ORIENTATION_CHANGE && (importDefault(10705) /* metro dependency 10705: doesOrientationMatchLockState */)(env0_10.isWindowLandscape,
env0_9)) {
updateActivityPanelMode(ActivityPanelModes.PANEL);
}
} else if (env0_11.current != null) {
updateActivityPanelModeBinding = updateActivityPanelMode;
value5 = environment.__proto__;
updateActivityPanelModeBinding(ActivityPanelModes.DISCONNECTED);
} else {
object2 = {};
Math = global.Math;
object2.width = Math.min(width, height);
Math = global.Math;
object2.height = Math.max(height, width) - a1;
object2.isLandscape = false;
object2.isWindowLandscape = false;
r6 = object2;
modeBinding = mode;
value2 = environment.__proto__;
if (modeBinding === ActivityPanelModes.LAUNCHING_WITH_ORIENTATION_CHANGE && (importDefault(10705) /* metro dependency 10705: doesOrientationMatchLockState */)(env0_10.isWindowLandscape,
env0_9)) {
updateActivityPanelMode(ActivityPanelModes.PANEL);
}
}
} else {
object2 = {};
Math = global.Math;
object2.width = Math.min(width, height);
Math = global.Math;
object2.height = Math.max(height, width) - a1;
object2.isLandscape = false;
object2.isWindowLandscape = false;
r6 = object2;
env0_11.current = connectedActivityAppId;
}
return r6;
}
OrientationLockState.UNLOCKED;
return {width: width, height: value ? height : height - a1, isLandscape: value, isWindowLandscape: value};
}
function ActivityPanelController({children}) { // fn#117436, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15557:3937, offset: 0x024b2e87, size: 249 bytes, params: 2, frame: 25
const {mode, connectedActivityInTextChannelId, hasConnectedActivity, connectedActivityAppId, currentApp,
orientationLockStateForApp} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([EmbeddedActivitiesStore,
ApplicationStore], _fun117437, []);
env0_5.useEffect(_fun117438, [mode, connectedActivityInTextChannelId]);
return (
<BaseActivityPanelController
context={importDefault(15368) /* metro dependency 15368: ActivityPanelStateContext */}
orientationLockStateForApp={orientationLockStateForApp}
mode={mode}
hasConnectedActivity={hasConnectedActivity}
connectedActivityAppId={connectedActivityAppId}
currentApp={currentApp}
updateActivityPanelMode={(importAll(7860) /* metro dependency 7860: EmbeddedActivitiesActionCreators */).updateActivityPanelMode}
>
{children}
</BaseActivityPanelController>
);
}
function _fun117419() { // fn#117419, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15557:1735, offset: 0x024b271d, size: 52 bytes, params: 1, frame: 12
var r0;
const modeBinding = mode;
const PANEL = ActivityPanelModes.PANEL;
const value3 = modeBinding === PANEL;
if (value3) {
updateActivityPanelMode(ActivityPanelModes.PIP);
r0 = true;
} else {
r0 = value3;
}
return r0;
}
function _fun117420() { // fn#117420, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15557:1781, offset: 0x024b2751, size: 284 bytes, params: 1, frame: 16
var modeBinding;
var value2;
var updateActivityPanelModeBinding;
var value5;
var value6;
if (connectedActivityAppId == null) {
if (connectedActivityAppId != null) {
modeBinding = mode;
value2 = environment.__proto__;
if (modeBinding === ActivityPanelModes.LAUNCHING_WITH_ORIENTATION_CHANGE && (importDefault(10705) /* metro dependency 10705: doesOrientationMatchLockState */)(env0_10.isWindowLandscape,
env0_9)) {
updateActivityPanelMode(ActivityPanelModes.PANEL);
function _fun117421() { // fn#117421, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15557:2084, offset: 0x024b286d, size: 121 bytes, params: 1, frame: 13
const modeBinding = mode;
const PANEL = ActivityPanelModes.PANEL;
if (modeBinding === PANEL && env0_6.current !== ActivityPanelModes.PANEL) {
(require(4015) /* metro dependency 4015: ChatInputUtils */).dismissKeyboard();
env0_5.set(env1_16);
}
} else if (env0_11.current != null) {
updateActivityPanelModeBinding = updateActivityPanelMode;
value5 = environment.__proto__;
updateActivityPanelModeBinding(ActivityPanelModes.DISCONNECTED);
} else {
modeBinding = mode;
value2 = environment.__proto__;
if (modeBinding === ActivityPanelModes.LAUNCHING_WITH_ORIENTATION_CHANGE && (importDefault(10705) /* metro dependency 10705: doesOrientationMatchLockState */)(env0_10.isWindowLandscape,
env0_9)) {
updateActivityPanelMode(ActivityPanelModes.PANEL);
env0_6.current = mode;
}
function useActivityOrientationState({isConnected, selectedMode, isVoicePanelFullscreen, applicationId, orientationLockStateForApp}) { // fn#117422, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15557:2182, owner: BaseActivityPanelController.useActivityOrientationState, offset: 0x024b28e6, size: 154 bytes, params: 2, frame: 20
env1_5.useLayoutEffect(_fun117423, [applicationId, isConnected, selectedMode,
orientationLockStateForApp ?? OrientationLockState.UNLOCKED, isVoicePanelFullscreen]);
env1_5.useLayoutEffect(function() {
return _fun117425;
}, []);
function _fun117423() { // fn#117423, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15557:2367, offset: 0x024b2980, size: 125 bytes, params: 1, frame: 13
var selectedModeBinding;
var value2;
if (!isVoicePanelFullscreen) {
selectedModeBinding = selectedMode;
value2 = environment.__proto__.__proto__;
if (selectedModeBinding === ActivityPanelModes.PANEL) {
if (isConnected) {
(importDefault(15362) /* metro dependency 15362: applyActivityOrientationLock */)(env0_3);
} else {
(require(7717) /* metro dependency 7717: DeviceOrientation */).restoreDefaultOrientation();
}
} else if (selectedMode !== ActivityPanelModes.LAUNCHING_WITH_ORIENTATION_CHANGE) {
(require(7717) /* metro dependency 7717: DeviceOrientation */).restoreDefaultOrientation();
} else if (isConnected) {
(importDefault(15362) /* metro dependency 15362: applyActivityOrientationLock */)(env0_3);
} else {
(require(7717) /* metro dependency 7717: DeviceOrientation */).restoreDefaultOrientation();
}
}
}
function _fun117424() { // fn#117424, offset: 0x024b29fd, size: 11 bytes, params: 1, frame: 1
return _fun117425;
function _fun117425() { // fn#117425, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15557:2521, offset: 0x024b2a08, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__.__proto__.__proto__;
return (DeviceOrientationModule).restoreDefaultOrientation();
}
}
}
} else if (env0_11.current == null) {
value6 = environment.__proto__;
if ((importDefault(10705) /* metro dependency 10705: doesOrientationMatchLockState */)(env0_10.isWindowLandscape,
env0_9)) {
updateActivityPanelMode(ActivityPanelModes.PANEL);
} else if (env0_8) {
updateActivityPanelMode(ActivityPanelModes.PANEL);
} else {
updateActivityPanelMode(ActivityPanelModes.LAUNCHING_WITH_ORIENTATION_CHANGE);
function useSafeAreaLock({isActivityConnected, isActivityFocused, isVoicePanelFullscreen}) { // fn#117426, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15557:2670, owner: BaseActivityPanelController.useSafeAreaLock, offset: 0x024b2a2d, size: 103 bytes, params: 2, frame: 17
env1_5.useLayoutEffect(_fun117427, [env1_5.useId(), isActivityConnected, isActivityFocused, isVoicePanelFullscreen]);
function _fun117427() { // fn#117427, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15557:2800, offset: 0x024b2a94, size: 81 bytes, params: 1, frame: 15
var environment;
var r1;
var value3;
const isVoicePanelFullscreenBinding = isVoicePanelFullscreen;
const value2 = undefined;
if (isVoicePanelFullscreenBinding) {
return value2;
}
if (isActivityConnected) {
value3 = environment.__proto__.__proto__;
SafeAreaDisabledStore.getState().requestSafeAreaDisableLock({key: env0_3, lockEnabled: isActivityFocused});
r1 = _fun117428;
} else {
r1 = value2;
}
return r1;
function _fun117428() { // fn#117428, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15557:2884, offset: 0x024b2ae5, size: 52 bytes, params: 1, frame: 12
const value = environment.__proto__.__proto__.__proto__;
SafeAreaDisabledStore.getState().requestSafeAreaDisableLock({key: env1_3, lockEnabled: false});
}
}
}
} else if (connectedActivityAppId != null) {
modeBinding = mode;
value2 = environment.__proto__;
if (modeBinding === ActivityPanelModes.LAUNCHING_WITH_ORIENTATION_CHANGE && (importDefault(10705) /* metro dependency 10705: doesOrientationMatchLockState */)(env0_10.isWindowLandscape,
env0_9)) {
updateActivityPanelMode(ActivityPanelModes.PANEL);
function useAppFreeze(a0) { // fn#117429, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15557:3059, owner: BaseActivityPanelController.useAppFreeze, offset: 0x024b2b19, size: 292 bytes, params: 2, frame: 24
const env0_0 = a0;
const value2 = (ActivityPanelUtilsModule).useIsActivityPanelFullscreen();
const [property, property2] = env1_4(env1_5.useState(false), 2);
const value5 = env1_5.useId();
const useAnimatedReaction = ReanimatedRexportModule.useAnimatedReaction;
const useAppFreezeL2 = useAppFreezeL;
useAppFreezeL2.__closure = {wrapperOffset: a0};
useAppFreezeL2.__workletHash = 5299695936442;
useAppFreezeL2.__initData = env1_18;
const useAppFreezeS2 = useAppFreezeS;
object = {};
object.runOnJS = ReanimatedRexportModule.runOnJS;
object.setWrapperGestureInProgress = property2;
useAppFreezeS2.__closure = object;
useAppFreezeS2.__workletHash = 5831467313798;
useAppFreezeS2.__initData = env1_19;
Reflect.apply(useAnimatedReaction, ReanimatedRexportModule, [useAppFreezeL2, useAppFreezeS2]);
env1_5.useEffect(_fun117432, [value2, property, value5]);
function useAppFreezeL() { // fn#117430, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15557:3219, owner: BaseActivityPanelController.useAppFreeze.l, offset: 0x024b2c3d, size: 24 bytes, params: 1, frame: 9
const binding = env0_0;
const get = binding.get;
return Reflect.apply(get, binding, []).gestureActive;
}
function useAppFreezeS(a0, a1) { // fn#117431, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15557:3326, owner: BaseActivityPanelController.useAppFreeze.s, offset: 0x024b2c55, size: 61 bytes, params: 3, frame: 13
var value;
if (a0 !== a1) {
value = environment.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value.runOnJS(env0_3)(a0);
}
}
function _fun117432() { // fn#117432, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15557:3501, offset: 0x024b2c92, size: 68 bytes, params: 1, frame: 14
var environment;
let value = environment.__proto__.__proto__;
value = AppFreezeStore.getState();
value.requestFreezeLock({lockEnabled: env0_1 && env0_2, key: Module00057});
return _fun117433;
function _fun117433() { // fn#117433, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15557:3563, offset: 0x024b2cd6, size: 52 bytes, params: 1, frame: 12
const value = environment.__proto__.__proto__.__proto__;
AppFreezeStore.getState().requestFreezeLock({lockEnabled: false, key: env1_4});
}
}
}
} else if (env0_11.current != null) {
updateActivityPanelModeBinding = updateActivityPanelMode;
value5 = environment.__proto__;
updateActivityPanelModeBinding(ActivityPanelModes.DISCONNECTED);
} else {
modeBinding = mode;
value2 = environment.__proto__;
if (modeBinding === ActivityPanelModes.LAUNCHING_WITH_ORIENTATION_CHANGE && (importDefault(10705) /* metro dependency 10705: doesOrientationMatchLockState */)(env0_10.isWindowLandscape,
env0_9)) {
updateActivityPanelMode(ActivityPanelModes.PANEL);
function _fun117434() { // fn#117434, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15557:3656, offset: 0x024b2d0a, size: 69 bytes, params: 1, frame: 3
return {mode: mode, setMode: updateActivityPanelMode, wrapperDimensions: env0_10, pipState: env0_3,
pipAvoidanceSpecs: Module00057, wrapperOffset: env0_5, useActivityWebViewLock: env0_7};
}
}
env0_11.current = connectedActivityAppId;
}
function _fun117421() { // fn#117421, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15557:2084, offset: 0x024b286d, size: 121 bytes, params: 1, frame: 13
const modeBinding = mode;
const PANEL = ActivityPanelModes.PANEL;
if (modeBinding === PANEL && env0_6.current !== ActivityPanelModes.PANEL) {
(require(4015) /* metro dependency 4015: ChatInputUtils */).dismissKeyboard();
env0_5.set(env1_16);
}
env0_6.current = mode;
}
function BaseActivityPanelControllerUseActivityOrientationState({isConnected, selectedMode, isVoicePanelFullscreen, applicationId, orientationLockStateForApp}) { // fn#117422, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15557:2182, owner: BaseActivityPanelController.useActivityOrientationState, offset: 0x024b28e6, size: 154 bytes, params: 2, frame: 20
env1_5.useLayoutEffect(_fun117423, [applicationId, isConnected, selectedMode,
orientationLockStateForApp ?? OrientationLockState.UNLOCKED, isVoicePanelFullscreen]);
env1_5.useLayoutEffect(function() {
return _fun117425;
}, []);
}
function useSafeAreaLock({isActivityConnected, isActivityFocused, isVoicePanelFullscreen}) { // fn#117426, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15557:2670, owner: BaseActivityPanelController.useSafeAreaLock, offset: 0x024b2a2d, size: 103 bytes, params: 2, frame: 17
env1_5.useLayoutEffect(_fun117427, [env1_5.useId(), isActivityConnected, isActivityFocused, isVoicePanelFullscreen]);
}
function useAppFreeze(a0) { // fn#117429, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15557:3059, owner: BaseActivityPanelController.useAppFreeze, offset: 0x024b2b19, size: 292 bytes, params: 2, frame: 24
var object2;
const env0_0 = a0;
const value2 = (require(15361) /* metro dependency 15361: ActivityPanelUtils */).useIsActivityPanelFullscreen();
const [property, property2] = env1_4(env1_5.useState(false), 2);
const value5 = env1_5.useId();
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedReaction = reanimatedRexportModule.useAnimatedReaction;
const closure = useAppFreezeL;
closure.__closure = {wrapperOffset: a0};
closure.__workletHash = 5299695936442;
closure.__initData = env1_18;
const closure2 = useAppFreezeS;
object2 = {};
object2.runOnJS = reanimatedRexportModule.runOnJS;
object2.setWrapperGestureInProgress = property2;
closure2.__closure = object2;
closure2.__workletHash = 5831467313798;
closure2.__initData = env1_19;
Reflect.apply(useAnimatedReaction, reanimatedRexportModule, [closure, closure2]);
env1_5.useEffect(_fun117432, [value2, property, value5]);
}
function _fun117434() { // fn#117434, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15557:3656, offset: 0x024b2d0a, size: 69 bytes, params: 1, frame: 3
return {mode: mode, setMode: updateActivityPanelMode, wrapperDimensions: env0_10, pipState: env0_3,
pipAvoidanceSpecs: env0_4, wrapperOffset: env0_5, useActivityWebViewLock: env0_7};
}
function _fun117437() { // fn#117437, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15557:4031, offset: 0x024b2f80, size: 214 bytes, params: 1, frame: 20
const value = environment.__proto__;
const activityPanelMode = EmbeddedActivitiesStore.getActivityPanelMode();
const connectedActivityLocation = EmbeddedActivitiesStore.getConnectedActivityLocation();
const selfEmbeddedActivityForLocation = EmbeddedActivitiesStore.getSelfEmbeddedActivityForLocation(connectedActivityLocation);
const value5 = undefined;
const applicationId = selfEmbeddedActivityForLocation == null ? value5 : selfEmbeddedActivityForLocation.applicationId;
const r5 = applicationId != null ? ApplicationStore.getApplication(applicationId) : value5;
const embeddedActivityLocationChannelId = (require(3774) /* metro dependency 3774: embeddedActivityLocationUtils */).getEmbeddedActivityLocationChannelId(connectedActivityLocation);
const object2 = {mode: activityPanelMode};
object2.connectedActivityInTextChannelId = embeddedActivityLocationChannelId == null || (importDefault(8102) /* metro dependency 8102: isVoiceEmbeddedActivity */)(embeddedActivityLocationChannelId) ? value5 : embeddedActivityLocationChannelId;
object2.hasConnectedActivity = selfEmbeddedActivityForLocation != null;
object2.connectedActivityAppId = applicationId;
object2.currentApp = r5;
object2.orientationLockStateForApp = applicationId == null ? value5 : EmbeddedActivitiesStore.getOrientationLockStateForApp(applicationId);
return object2;
}
function _fun117438() { // fn#117438, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15557:4657, offset: 0x024b3056, size: 135 bytes, params: 1, frame: 16
var defaultImport;
var selectChannel;
var id;
var moduleValue;
var transitionToChannel;
var value;
const modeBinding = mode;
const PANEL = ActivityPanelModes.PANEL;
if (modeBinding === PANEL) {
value = ChannelStore.getChannel(connectedActivityInTextChannelId);
if (value !== undefined) {
defaultImport = importDefault(4796) /* metro dependency 4796: SelectedChannelActionCreators */;
selectChannel = defaultImport.selectChannel;
id = value.id;
Reflect.apply(selectChannel, defaultImport, [{guildId: value.guild_id, channelId: id}]);
moduleValue = require(4601) /* metro dependency 4601: transitionToChannel */;
transitionToChannel = moduleValue.transitionToChannel;
id = value.id;
Reflect.apply(transitionToChannel, moduleValue, [id]);
}
}
}
function _fun117423() { // fn#117423, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15557:2367, offset: 0x024b2980, size: 125 bytes, params: 1, frame: 13
var selectedModeBinding;
var value2;
if (!isVoicePanelFullscreen) {
selectedModeBinding = selectedMode;
value2 = environment.__proto__.__proto__;
if (selectedModeBinding === ActivityPanelModes.PANEL) {
if (isConnected) {
(importDefault(15362) /* metro dependency 15362: applyActivityOrientationLock */)(env0_3);
function _fun117435({width, height}, a1, a2, a3) { // fn#117435, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15557:371, offset: 0x024b2d4f, size: 312 bytes, params: 5, frame: 19
var r6;
var r0;
var object;
var Math;
const value = width > height;
const LANDSCAPE = OrientationLockState.LANDSCAPE;
if (LANDSCAPE === a2) {
if (a3) {
if (value) {
object = {};
Math = global.Math;
object.width = Math.max(width, height);
Math = global.Math;
object.height = Math.min(height, width);
object.isLandscape = true;
object.isWindowLandscape = true;
r0 = object;
} else {
r0 = {width: width, height: width * ACTIVITY_LANDSCAPE_ASPECT_RATIO - a1, isLandscape: true,
isWindowLandscape: value};
}
} else {
(require(7717) /* metro dependency 7717: DeviceOrientation */).restoreDefaultOrientation();
object = {};
Math = global.Math;
object.width = Math.max(width, height);
Math = global.Math;
object.height = Math.min(height, width);
object.isLandscape = true;
object.isWindowLandscape = true;
r0 = object;
}
} else if (selectedMode !== ActivityPanelModes.LAUNCHING_WITH_ORIENTATION_CHANGE) {
(require(7717) /* metro dependency 7717: DeviceOrientation */).restoreDefaultOrientation();
} else if (isConnected) {
(importDefault(15362) /* metro dependency 15362: applyActivityOrientationLock */)(env0_3);
} else {
(require(7717) /* metro dependency 7717: DeviceOrientation */).restoreDefaultOrientation();
return r0;
}
const PORTRAIT = OrientationLockState.PORTRAIT;
if (PORTRAIT === a2) {
if (a3) {
if (value) {
r6 = {width: height * ACTIVITY_PORTRAIT_ASPECT_RATIO, height: height, isLandscape: false,
isWindowLandscape: value};
} else {
object = {};
Math = global.Math;
object.width = Math.min(width, height);
Math = global.Math;
object.height = Math.max(height, width) - a1;
object.isLandscape = false;
object.isWindowLandscape = false;
r6 = object;
}
} else {
object = {};
Math = global.Math;
object.width = Math.min(width, height);
Math = global.Math;
object.height = Math.max(height, width) - a1;
object.isLandscape = false;
object.isWindowLandscape = false;
r6 = object;
}
return r6;
}
OrientationLockState.UNLOCKED;
return {width: width, height: value ? height : height - a1, isLandscape: value, isWindowLandscape: value};
}
}
function _fun117424() { // fn#117424, offset: 0x024b29fd, size: 11 bytes, params: 1, frame: 1
return _fun117425;
}
function ActivityPanelController({children}) { // fn#117436, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15557:3937, offset: 0x024b2e87, size: 249 bytes, params: 2, frame: 25
const {mode, connectedActivityInTextChannelId, hasConnectedActivity, connectedActivityAppId, currentApp,
orientationLockStateForApp} = (FluxModule).useStateFromStoresObject([EmbeddedActivitiesStore,
ApplicationStore], _fun117437, []);
ReactModule.useEffect(_fun117438, [mode, connectedActivityInTextChannelId]);
return (
<BaseActivityPanelController
context={ActivityPanelStateContext}
orientationLockStateForApp={orientationLockStateForApp}
mode={mode}
hasConnectedActivity={hasConnectedActivity}
connectedActivityAppId={connectedActivityAppId}
currentApp={currentApp}
updateActivityPanelMode={(EmbeddedActivitiesActionCreatorsModule).updateActivityPanelMode}
>
{children}
</BaseActivityPanelController>
);
function _fun117437() { // fn#117437, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15557:4031, offset: 0x024b2f80, size: 214 bytes, params: 1, frame: 20
const value = environment.__proto__;
const embeddedActivitiesStoreBinding = EmbeddedActivitiesStore;
const activityPanelMode = embeddedActivitiesStoreBinding.getActivityPanelMode();
const connectedActivityLocation = embeddedActivitiesStoreBinding.getConnectedActivityLocation();
const selfEmbeddedActivityForLocation = embeddedActivitiesStoreBinding.getSelfEmbeddedActivityForLocation(connectedActivityLocation);
const value5 = undefined;
const applicationId = selfEmbeddedActivityForLocation == null ? value5 : selfEmbeddedActivityForLocation.applicationId;
const r5 = applicationId != null ? ApplicationStore.getApplication(applicationId) : value5;
const embeddedActivityLocationChannelId = (EmbeddedActivityLocationUtilsModule).getEmbeddedActivityLocationChannelId(connectedActivityLocation);
const object = {mode: activityPanelMode};
object.connectedActivityInTextChannelId = embeddedActivityLocationChannelId == null || (importDefault(8102) /* metro dependency 8102: isVoiceEmbeddedActivity */)(embeddedActivityLocationChannelId) ? value5 : embeddedActivityLocationChannelId;
object.hasConnectedActivity = selfEmbeddedActivityForLocation != null;
object.connectedActivityAppId = applicationId;
object.currentApp = r5;
object.orientationLockStateForApp = applicationId == null ? value5 : EmbeddedActivitiesStore.getOrientationLockStateForApp(applicationId);
return object;
}
function _fun117438() { // fn#117438, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15557:4657, offset: 0x024b3056, size: 135 bytes, params: 1, frame: 16
var channelStoreBinding;
var defaultImport;
var selectChannel;
var id;
var moduleValue;
var transitionToChannel;
var value;
const modeBinding = mode;
const PANEL = ActivityPanelModes.PANEL;
if (modeBinding === PANEL) {
channelStoreBinding = ChannelStore;
value = channelStoreBinding.getChannel(connectedActivityInTextChannelId);
if (value !== undefined) {
defaultImport = importDefault(4796) /* metro dependency 4796: SelectedChannelActionCreators */;
selectChannel = defaultImport.selectChannel;
id = value.id;
Reflect.apply(selectChannel, defaultImport, [{guildId: value.guild_id, channelId: id}]);
moduleValue = require(4601) /* metro dependency 4601: transitionToChannel */;
transitionToChannel = moduleValue.transitionToChannel;
id = value.id;
Reflect.apply(transitionToChannel, moduleValue, [id]);
}
}
}
function _fun117427() { // fn#117427, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15557:2800, offset: 0x024b2a94, size: 81 bytes, params: 1, frame: 15
var environment;
var r1;
var value3;
const isVoicePanelFullscreenBinding = isVoicePanelFullscreen;
const value2 = undefined;
if (isVoicePanelFullscreenBinding) {
return value2;
}
if (isActivityConnected) {
value3 = environment.__proto__.__proto__;
SafeAreaDisabledStore.getState().requestSafeAreaDisableLock({key: env0_3, lockEnabled: isActivityFocused});
r1 = _fun117428;
} else {
r1 = value2;
}
return r1;
}
function useAppFreezeL() { // fn#117430, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15557:3219, owner: BaseActivityPanelController.useAppFreeze.l, offset: 0x024b2c3d, size: 24 bytes, params: 1, frame: 9
const binding = env0_0;
const get = binding.get;
return Reflect.apply(get, binding, []).gestureActive;
}
function useAppFreezeS(a0, a1) { // fn#117431, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15557:3326, owner: BaseActivityPanelController.useAppFreeze.s, offset: 0x024b2c55, size: 61 bytes, params: 3, frame: 13
var value;
if (a0 !== a1) {
value = environment.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value.runOnJS(env0_3)(a0);
}
}
function _fun117432() { // fn#117432, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15557:3501, offset: 0x024b2c92, size: 68 bytes, params: 1, frame: 14
var environment;
let value = environment.__proto__.__proto__;
value = AppFreezeStore.getState();
value.requestFreezeLock({lockEnabled: env0_1 && env0_2, key: env0_4});
return _fun117433;
}
function _fun117425() { // fn#117425, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15557:2521, offset: 0x024b2a08, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__.__proto__.__proto__;
return (require(7717) /* metro dependency 7717: DeviceOrientation */).restoreDefaultOrientation();
}
function _fun117428() { // fn#117428, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15557:2884, offset: 0x024b2ae5, size: 52 bytes, params: 1, frame: 12
const value = environment.__proto__.__proto__.__proto__;
SafeAreaDisabledStore.getState().requestSafeAreaDisableLock({key: env1_3, lockEnabled: false});
}
function _fun117433() { // fn#117433, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15557:3563, offset: 0x024b2cd6, size: 52 bytes, params: 1, frame: 12
const value = environment.__proto__.__proto__.__proto__;
AppFreezeStore.getState().requestFreezeLock({lockEnabled: false, key: env1_4});
}
global.__d(_fun117417, 15360, [57, 31, 4234, 9559, 10724, 1379, 1378, 4237, 8044, 33, 1944, 15361, 4017, 7717,
15362, 1585, 1478, 15363, 15366, 10703, 7713, 15367, 5286, 10705, 4015, 566, 3774, 8102, 4796, 4601, 15368,
7860,
2]) /* metro module 15360, dependencies: [57, 31, 4234, 9559, 10724, 1379, 1378, 4237, 8044, 33, 1944, 15361, 4017, 7717, 15362, 1585, 1478, 15363, 15366, 10703, 7713, 15367, 5286, 10705, 4015, 566, 3774, 8102, 4796, 4601, 15368, 7860, 2] */;
@@ -1,337 +1,346 @@
/* Metro module 15376; source: modules/activities/panel/native/ActivityPanelFocusedView.tsx; dependencies: [31, 27, 4502, 1379, 1378, 4237, 8044, 15371, 661, 11795, 33, 4501, 697, 1585, 566, 1478, 15366, 15319, 4017, 4508, 4504, 4577, 3868, 4556, 3774, 15368, 15377, 7860, 10704, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import EmbeddedActivitiesStore from '../../EmbeddedActivitiesStore.tsx'; /* Metro dependency 1378 */
import ChannelStore from '../../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import UseWindowDimensionsNative from '../../../screen/useWindowDimensions.native.tsx'; /* Metro dependency 1478 */
import UseSafeAreaInsetsNative from '../../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import AccessibilityStore from '../../../a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */
import EmbeddedActivityView from '../../native/EmbeddedActivityView.tsx'; /* Metro dependency 10704 */
import UseAnimatedKeyboardHeight from '../../../keyboard/native/useAnimatedKeyboardHeight.tsx'; /* Metro dependency 15319 */
import ActivityPanelStateContext from './ActivityPanelStateContext.tsx'; /* Metro dependency 15368 */
import ActivityPanelHeader from './ActivityPanelHeader.tsx'; /* Metro dependency 15377 */
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 NativeModule from '../../../../external/discord_common/js/packages/design/native.tsx'; /* Metro dependency 3868 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as ConstantsModule2 from '../../Constants.tsx'; /* Metro dependency 4237 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TransitionGroupModule from '../../../../design/components/TransitionGroup/TransitionGroup.tsx'; /* Metro dependency 4508 */
import * as AccessibilityViewNativeModule from '../../../../design/components/AccessibilityView/AccessibilityView.native.tsx'; /* Metro dependency 4556 */
import * as ActivityPanelConstantsModule from '../ActivityPanelConstants.tsx'; /* Metro dependency 8044 */
import * as VoicePanelConstantsModule from '../../../voice_panel/VoicePanelConstants.tsx'; /* Metro dependency 11795 */
import * as UseActivityWebViewLockManagerModule from './useActivityWebViewLockManager.tsx'; /* Metro dependency 15366 */
import * as ActivityPanelNativeConstantsModule from './ActivityPanelNativeConstants.tsx'; /* Metro dependency 15371 */
function _fun117537(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117537, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15573:6, offset: 0x024b6bf1, size: 614 bytes, params: 8, frame: 26
var object2;
const env0_0 = require;
const closure = useBaseActivityPanelFocusedView;
const closure2 = BaseActivityPanelFocusedView;
const useBaseActivityPanelFocusedView2 = useBaseActivityPanelFocusedView;
const BaseActivityPanelFocusedView2 = BaseActivityPanelFocusedView;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const StyleSheet = (require(27) /* metro dependency 27 */).StyleSheet;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const embeddedActivitiesStore = importDefault(1378) /* metro dependency 1378: EmbeddedActivitiesStore */;
const env0_7 = (require(4237) /* metro dependency 4237: Constants */).ActivityLayoutMode;
const activityPanelConstantsModule = require(8044) /* metro dependency 8044: ActivityPanelConstants */;
const env0_8 = activityPanelConstantsModule.ACTIVITY_LAYOUT_PHYSICS_GESTURE;
const env0_9 = activityPanelConstantsModule.ACTIVITY_LAYOUT_PHYSICS_DEFAULT;
const env0_10 = activityPanelConstantsModule.ActivityPanelModes;
const activityPanelNativeConstantsModule = require(15371) /* metro dependency 15371: ActivityPanelNativeConstants */;
const env0_11 = activityPanelNativeConstantsModule.DEFAULT_PORTRAIT_SAFE_AREAS_CONFIG;
const env0_12 = activityPanelNativeConstantsModule.DEFAULT_PORTRAIT_LETTERBOX_CONFIG;
const env0_13 = activityPanelNativeConstantsModule.DEFAULT_LANDSCAPE_PILLERBOX_CONFIG;
const env0_14 = (require(661) /* metro dependency 661: Constants */).ThemeTypes;
const env0_15 = (require(11795) /* metro dependency 11795: VoicePanelConstants */).IS_IOS;
const value4 = require(33) /* metro dependency 33 */;
const env0_16 = value4.jsx;
const env0_17 = value4.jsxs;
object2 = {duration: 300};
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object2.wrapper = {'position': 'absolute', 'flexDirection': 'row', 'alignItems': 'center',
let value = ReactModule;
const StyleSheet = (ReactNativeModule).StyleSheet;
object = {duration: 300};
const createStyles = CreateStylesModule.createStyles;
object = {};
const BACKGROUND_BASE_LOW = (Native).colors.BACKGROUND_BASE_LOW;
object.wrapper = {'position': 'absolute', 'flexDirection': 'row', 'alignItems': 'center',
'justifyContent': 'center', 'overflow': 'hidden', backgroundColor: BACKGROUND_BASE_LOW};
const object4 = {};
copyDataProperties(object4, StyleSheet.absoluteFillObject, undefined);
const BLACK = (importDefault(697) /* metro dependency 697: native */).colors.BLACK;
object4['backgroundColor'] = BLACK;
object2.shade = object4;
const env0_19 = Reflect.apply(createStyles, createStylesModule, [object2]);
object2 = {code: "function ActivityPanelFocusedViewTsx1(){const{wrapperDimensions,lg,IS_IOS,animatedKeyboardHeight,windowDimensions,safeArea,shown,wrapperOffset,transitionState,TransitionStates,runOnJS,transitionCleanUp,reduceMotion,withTiming,REDUCED_MOTION_TIMING,withSpring,ACTIVITY_LAYOUT_PHYSICS_GESTURE,ACTIVITY_LAYOUT_PHYSICS_DEFAULT}=this.__closure;const topBorderRadius=!wrapperDimensions.isWindowLandscape?lg:0;const keyboardHeight=IS_IOS?animatedKeyboardHeight.get():0;const width=windowDimensions.width;const height=windowDimensions.height-keyboardHeight-(!wrapperDimensions.isWindowLandscape?safeArea.top:0);const y=shown.get()?wrapperOffset.get().y:windowDimensions.height;const transitionComplete=function(finished=false){if(finished&&transitionState===TransitionStates.YEETED){runOnJS(transitionCleanUp)();}};const targetOpacity=reduceMotion&&shown.get()?1-wrapperOffset.get().y/windowDimensions.height:0;return{opacity:reduceMotion?withTiming(targetOpacity,REDUCED_MOTION_TIMING,shown.get()&&wrapperOffset.get().gestureActive?'animate-never':'animate-always',transitionComplete):1,transform:[{translateY:!reduceMotion?withSpring(y,wrapperOffset.get().gestureActive&&transitionState!==TransitionStates.YEETED?ACTIVITY_LAYOUT_PHYSICS_GESTURE:ACTIVITY_LAYOUT_PHYSICS_DEFAULT,'animate-always',transitionComplete):0}],top:!wrapperDimensions.isWindowLandscape?safeArea.top:0,width:width,height:height,borderTopStartRadius:topBorderRadius,borderTopEndRadius:topBorderRadius};}"};
object2 = {code: 'function ActivityPanelFocusedViewTsx2(finished=false){const{transitionState,TransitionStates,runOnJS,transitionCleanUp}=this.__closure;if(finished&&transitionState===TransitionStates.YEETED){runOnJS(transitionCleanUp)();}}'};
object2 = {code: 'function ActivityPanelFocusedViewTsx3(){const{wrapperOffset,shown,windowDimensions,withSpring,ACTIVITY_LAYOUT_PHYSICS_DEFAULT}=this.__closure;const opacity=function(){if(!wrapperOffset.get().gestureActive){return shown.get()?1:0;}return 1-wrapperOffset.get().y/windowDimensions.height;}();return{opacity:withSpring(opacity,ACTIVITY_LAYOUT_PHYSICS_DEFAULT)};}'};
object2 = {code: 'function ActivityPanelFocusedViewTsx4(){const{IS_IOS,animatedKeyboardHeight,wrapperDimensions}=this.__closure;const keyboardHeight=IS_IOS?animatedKeyboardHeight.get():0;return{width:wrapperDimensions.width,height:wrapperDimensions.height-keyboardHeight};}'};
const object3 = {};
copyDataProperties(object3, StyleSheet.absoluteFillObject, undefined);
const BLACK = (Native).colors.BLACK;
object3['backgroundColor'] = BLACK;
object.shade = object3;
const env0_19 = Reflect.apply(createStyles, CreateStylesModule, [object]);
object = {code: "function ActivityPanelFocusedViewTsx1(){const{wrapperDimensions,lg,IS_IOS,animatedKeyboardHeight,windowDimensions,safeArea,shown,wrapperOffset,transitionState,TransitionStates,runOnJS,transitionCleanUp,reduceMotion,withTiming,REDUCED_MOTION_TIMING,withSpring,ACTIVITY_LAYOUT_PHYSICS_GESTURE,ACTIVITY_LAYOUT_PHYSICS_DEFAULT}=this.__closure;const topBorderRadius=!wrapperDimensions.isWindowLandscape?lg:0;const keyboardHeight=IS_IOS?animatedKeyboardHeight.get():0;const width=windowDimensions.width;const height=windowDimensions.height-keyboardHeight-(!wrapperDimensions.isWindowLandscape?safeArea.top:0);const y=shown.get()?wrapperOffset.get().y:windowDimensions.height;const transitionComplete=function(finished=false){if(finished&&transitionState===TransitionStates.YEETED){runOnJS(transitionCleanUp)();}};const targetOpacity=reduceMotion&&shown.get()?1-wrapperOffset.get().y/windowDimensions.height:0;return{opacity:reduceMotion?withTiming(targetOpacity,REDUCED_MOTION_TIMING,shown.get()&&wrapperOffset.get().gestureActive?'animate-never':'animate-always',transitionComplete):1,transform:[{translateY:!reduceMotion?withSpring(y,wrapperOffset.get().gestureActive&&transitionState!==TransitionStates.YEETED?ACTIVITY_LAYOUT_PHYSICS_GESTURE:ACTIVITY_LAYOUT_PHYSICS_DEFAULT,'animate-always',transitionComplete):0}],top:!wrapperDimensions.isWindowLandscape?safeArea.top:0,width:width,height:height,borderTopStartRadius:topBorderRadius,borderTopEndRadius:topBorderRadius};}"};
object = {code: 'function ActivityPanelFocusedViewTsx2(finished=false){const{transitionState,TransitionStates,runOnJS,transitionCleanUp}=this.__closure;if(finished&&transitionState===TransitionStates.YEETED){runOnJS(transitionCleanUp)();}}'};
object = {code: 'function ActivityPanelFocusedViewTsx3(){const{wrapperOffset,shown,windowDimensions,withSpring,ACTIVITY_LAYOUT_PHYSICS_DEFAULT}=this.__closure;const opacity=function(){if(!wrapperOffset.get().gestureActive){return shown.get()?1:0;}return 1-wrapperOffset.get().y/windowDimensions.height;}();return{opacity:withSpring(opacity,ACTIVITY_LAYOUT_PHYSICS_DEFAULT)};}'};
object = {code: 'function ActivityPanelFocusedViewTsx4(){const{IS_IOS,animatedKeyboardHeight,wrapperDimensions}=this.__closure;const keyboardHeight=IS_IOS?animatedKeyboardHeight.get():0;return{width:wrapperDimensions.width,height:wrapperDimensions.height-keyboardHeight};}'};
value = value.memo(_fun117549);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/panel/native/ActivityPanelFocusedView.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/activities/panel/native/ActivityPanelFocusedView.tsx');
exports.default = value;
exports.useBaseActivityPanelFocusedView = closure;
exports.BaseActivityPanelFocusedView = closure2;
}
function useBaseActivityPanelFocusedView({context}) { // fn#117538, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15573:761, offset: 0x024b6e57, size: 174 bytes, params: 2, frame: 16
const value2 = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
let binding = env0_3;
const useContext = binding.useContext;
const wrapperDimensions = Reflect.apply(useContext, binding, [context]).wrapperDimensions;
let r4 = wrapperDimensions.isLandscape && !wrapperDimensions.isWindowLandscape;
const r5 = !wrapperDimensions.isLandscape && wrapperDimensions.isWindowLandscape;
r4 = r4 ? DEFAULT_PORTRAIT_LETTERBOX_CONFIG : DEFAULT_PORTRAIT_SAFE_AREAS_CONFIG;
binding = env0_3;
const useMemo = binding.useMemo;
return {portraitSafeAreasConfig: r4, landscapeSafeAreasConfig: Reflect.apply(useMemo, binding, [_fun117539,
[value2.right, r5]])};
}
function BaseActivityPanelFocusedView({children, header, transitionState, transitionCleanUp, updateActivityPanelModeToPIP, hasActivity, context}) { // fn#117540, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15573:3446, offset: 0x024b6f4d, size: 1028 bytes, params: 2, frame: 37
var object2;
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
const env0_3 = useReducedMotion;
const styles = useStyles();
const value2 = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)();
const value3 = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
const {wrapperDimensions, wrapperOffset} = env0_3.useContext(context);
const {shown,
renderWebView} = (require(15366) /* metro dependency 15366: useActivityWebViewLockManager */).useLockedWebView({transitionState: transitionState,
context: context});
const value6 = (importDefault(15319) /* metro dependency 15319: useAnimatedKeyboardHeight */)();
const lg = (importDefault(697) /* metro dependency 697: native */).radii.lg;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
let useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
let closure = BaseActivityPanelFocusedView_;
object2 = {wrapperDimensions: wrapperDimensions, lg: lg};
object2.IS_IOS = IS_IOS;
object2.animatedKeyboardHeight = value6;
object2.windowDimensions = value2;
object2.safeArea = value3;
object2.shown = shown;
object2.wrapperOffset = wrapperOffset;
object2.transitionState = transitionState;
const TransitionStates = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates;
object2.TransitionStates = TransitionStates;
object2.runOnJS = reanimatedRexportModule.runOnJS;
object2.transitionCleanUp = transitionCleanUp;
object2.reduceMotion = useReducedMotion;
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
object2.REDUCED_MOTION_TIMING = env0_18;
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object2.ACTIVITY_LAYOUT_PHYSICS_GESTURE = ACTIVITY_LAYOUT_PHYSICS_GESTURE;
object2.ACTIVITY_LAYOUT_PHYSICS_DEFAULT = ACTIVITY_LAYOUT_PHYSICS_DEFAULT;
closure.__closure = object2;
closure.__workletHash = 14941136536014;
closure.__initData = env0_20;
const value7 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const moduleValue4 = reanimatedRexportModule;
useAnimatedStyle = moduleValue4.useAnimatedStyle;
closure = BaseActivityPanelFocusedViewT;
object2 = {wrapperOffset: wrapperOffset, shown: shown, windowDimensions: value2};
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object2.ACTIVITY_LAYOUT_PHYSICS_DEFAULT = ACTIVITY_LAYOUT_PHYSICS_DEFAULT;
closure.__closure = object2;
closure.__workletHash = 8351375063373;
closure.__initData = env0_22;
const value8 = Reflect.apply(useAnimatedStyle, moduleValue4, [closure]);
const value9 = env0_3.useMemo(_fun117546, [value7, styles.wrapper]);
const moduleValue5 = reanimatedRexportModule;
useAnimatedStyle = moduleValue5.useAnimatedStyle;
closure = BaseActivityPanelFocusedViewA;
closure.__closure = {IS_IOS: IS_IOS, animatedKeyboardHeight: value6, wrapperDimensions: wrapperDimensions};
closure.__workletHash = 10029372697959;
closure.__initData = env0_23;
const value10 = Reflect.apply(useAnimatedStyle, moduleValue5, [closure]);
const value11 = env0_3.useCallback(function() {
updateActivityPanelModeToPIP();
}, [updateActivityPanelModeToPIP]);
const ThemeContextProvider = (require(3868) /* metro dependency 3868: native */).ThemeContextProvider;
const DARK = ThemeTypes.DARK;
let View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const view = <View style={[styles.shade, value8]} pointerEvents="none" />;
const AccessibilityViewAnimated = (require(4556) /* metro dependency 4556: AccessibilityViewNative */).AccessibilityViewAnimated;
View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
let value = null;
value = <View style={value10}>{renderWebView && hasActivity ? children : value}</View>;
return (
<ThemeContextProvider theme={DARK}>
{view}
<AccessibilityViewAnimated
style={value9}
nativeID="activity-panel-focused-view"
accessibilityViewIsModal
onAccessibilityEscape={value11}
>
{value}
{header}
</AccessibilityViewAnimated>
</ThemeContextProvider>
);
}
function _fun117549({transitionState, transitionCleanUp}) { // fn#117549, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15573:6239, offset: 0x024b7730, size: 284 bytes, params: 2, frame: 23
var object2;
const {channel,
hasActivity} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([EmbeddedActivitiesStore,
ChannelStore], function() {
var value2 = EmbeddedActivitiesStore.getConnectedActivityLocation();
var value3 = EmbeddedActivitiesStore.getSelfEmbeddedActivityForLocation(value2);
var value4 = require(dependencyMap[24]).getEmbeddedActivityLocationChannelId(value2);
var object = {};
object.channel = ChannelStore.getChannel(value4);
object.hasActivity = value3 != null;
return object;
}, []);
const env0_3 = hasActivity;
object2 = {};
object2.context = importDefault(15368) /* metro dependency 15368: ActivityPanelStateContext */;
const {portraitSafeAreasConfig, landscapeSafeAreasConfig} = useBaseActivityPanelFocusedView(object2);
return env0_3.useMemo(_fun117553, [transitionState, transitionCleanUp, env0_3.useCallback(function() {
require(dependencyMap[27]).updateActivityPanelMode(ActivityPanelModes.PIP);
}, []), hasActivity, env0_3.useMemo(_fun117551, []), channel, portraitSafeAreasConfig, landscapeSafeAreasConfig]);
}
function _fun117539() { // fn#117539, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15573:1017, offset: 0x024b6f05, size: 72 bytes, params: 1, frame: 15
return env0_1 ? DEFAULT_LANDSCAPE_PILLERBOX_CONFIG : {right: {disable: false, override: global.Math.max(64,
env0_0.right)}};
}
function BaseActivityPanelFocusedView_() { // fn#117542, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15573:3912, owner: BaseActivityPanelFocusedView._, offset: 0x024b7351, size: 533 bytes, params: 1, frame: 30
var r13;
var r14;
var r7;
var r6;
var wrapperOffsetBinding;
var moduleValue;
var withTiming;
var value10;
var value11;
var moduleValue2;
var withSpring;
const isWindowLandscape = wrapperDimensions.isWindowLandscape;
const value2 = 0;
const lg2 = isWindowLandscape ? value2 : lg;
const r2 = IS_IOS ? env0_10.get() : value2;
let binding = env0_5;
const width = binding.width;
const value6 = binding.height - r2 - (wrapperDimensions.isWindowLandscape ? value2 : env0_6.top);
let shownBinding = shown;
const get = shownBinding.get;
if (Reflect.apply(get, shownBinding, [])) {
wrapperOffsetBinding = wrapperOffset;
r13 = wrapperOffsetBinding.get().y;
} else {
r13 = env0_5.height;
}
const value7 = _fun117543();
if (useReducedMotion) {
shownBinding = shown;
if (shownBinding.get()) {
wrapperOffsetBinding = wrapperOffset;
r14 = 1 - wrapperOffsetBinding.get().y / env0_5.height;
} else {
r14 = value2;
exports.useBaseActivityPanelFocusedView = useBaseActivityPanelFocusedView2;
exports.BaseActivityPanelFocusedView = BaseActivityPanelFocusedView2;
function useBaseActivityPanelFocusedView({context}) { // fn#117538, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15573:761, offset: 0x024b6e57, size: 174 bytes, params: 2, frame: 16
const value2 = (UseSafeAreaInsetsNative)();
let binding = env0_3;
const useContext = binding.useContext;
const wrapperDimensions = Reflect.apply(useContext, binding, [context]).wrapperDimensions;
let r4 = wrapperDimensions.isLandscape && !wrapperDimensions.isWindowLandscape;
const r5 = !wrapperDimensions.isLandscape && wrapperDimensions.isWindowLandscape;
r4 = r4 ? DEFAULT_PORTRAIT_LETTERBOX_CONFIG : DEFAULT_PORTRAIT_SAFE_AREAS_CONFIG;
binding = env0_3;
const useMemo = binding.useMemo;
return {portraitSafeAreasConfig: r4, landscapeSafeAreasConfig: Reflect.apply(useMemo, binding, [_fun117539,
[value2.right, r5]])};
function _fun117539() { // fn#117539, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15573:1017, offset: 0x024b6f05, size: 72 bytes, params: 1, frame: 15
return env0_1 ? DEFAULT_LANDSCAPE_PILLERBOX_CONFIG : {right: {disable: false, override: global.Math.max(64,
env0_0.right)}};
}
} else {
r14 = value2;
}
const object2 = {};
if (useReducedMotion) {
moduleValue = require(4504) /* metro dependency 4504: timing */;
withTiming = moduleValue.withTiming;
binding = env1_18;
value10 = shown.get();
value11 = 'animate-always';
if (value10) {
wrapperOffsetBinding = wrapperOffset;
r7 = wrapperOffsetBinding.get().gestureActive ? 'animate-never' : value11;
} else {
r7 = value11;
function BaseActivityPanelFocusedView({children, header, transitionState, transitionCleanUp, updateActivityPanelModeToPIP, hasActivity, context}) { // fn#117540, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15573:3446, offset: 0x024b6f4d, size: 1028 bytes, params: 2, frame: 37
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
const useReducedMotion2 = useReducedMotion;
const styles = useStyles();
const value2 = (UseWindowDimensionsNative)();
const value3 = (UseSafeAreaInsetsNative)();
const {wrapperDimensions, wrapperOffset} = useReducedMotion2.useContext(context);
const {shown,
renderWebView} = (UseActivityWebViewLockManagerModule).useLockedWebView({transitionState: transitionState,
context: context});
const value6 = (UseAnimatedKeyboardHeight)();
const lg = (Native).radii.lg;
let useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
let closure = BaseActivityPanelFocusedView_;
object = {wrapperDimensions: wrapperDimensions, lg: lg};
object.IS_IOS = IS_IOS;
object.animatedKeyboardHeight = value6;
object.windowDimensions = value2;
object.safeArea = value3;
object.shown = shown;
object.wrapperOffset = wrapperOffset;
object.transitionState = transitionState;
const TransitionStates = (TransitionGroupModule).TransitionStates;
object.TransitionStates = TransitionStates;
object.runOnJS = ReanimatedRexportModule.runOnJS;
object.transitionCleanUp = transitionCleanUp;
object.reduceMotion = useReducedMotion;
object.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
object.REDUCED_MOTION_TIMING = env0_18;
object.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object.ACTIVITY_LAYOUT_PHYSICS_GESTURE = ACTIVITY_LAYOUT_PHYSICS_GESTURE;
object.ACTIVITY_LAYOUT_PHYSICS_DEFAULT = ACTIVITY_LAYOUT_PHYSICS_DEFAULT;
closure.__closure = object;
closure.__workletHash = 14941136536014;
closure.__initData = env0_20;
const value7 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
closure = BaseActivityPanelFocusedViewT;
object = {wrapperOffset: wrapperOffset, shown: shown, windowDimensions: value2};
object.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object.ACTIVITY_LAYOUT_PHYSICS_DEFAULT = ACTIVITY_LAYOUT_PHYSICS_DEFAULT;
closure.__closure = object;
closure.__workletHash = 8351375063373;
closure.__initData = env0_22;
const value8 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
const value9 = useReducedMotion2.useMemo(_fun117546, [value7, styles.wrapper]);
useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
closure = BaseActivityPanelFocusedViewA;
closure.__closure = {IS_IOS: IS_IOS, animatedKeyboardHeight: value6, wrapperDimensions: wrapperDimensions};
closure.__workletHash = 10029372697959;
closure.__initData = env0_23;
const value10 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
const value11 = useReducedMotion2.useCallback(function() {
updateActivityPanelModeToPIP();
}, [updateActivityPanelModeToPIP]);
const ThemeContextProvider = (NativeModule).ThemeContextProvider;
const DARK = ThemeTypes.DARK;
let View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const view = <View style={[styles.shade, value8]} pointerEvents="none" />;
const AccessibilityViewAnimated = (AccessibilityViewNativeModule).AccessibilityViewAnimated;
View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
let value = null;
value = (
<View style={value10}>
{renderWebView && hasActivity ? children : value}
</View>
);
return (
<ThemeContextProvider theme={DARK}>
{view}
<AccessibilityViewAnimated
style={value9}
nativeID="activity-panel-focused-view"
accessibilityViewIsModal
onAccessibilityEscape={value11}
>
{value}
{header}
</AccessibilityViewAnimated>
</ThemeContextProvider>
);
function BaseActivityPanelFocusedView_() { // fn#117542, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15573:3912, owner: BaseActivityPanelFocusedView._, offset: 0x024b7351, size: 533 bytes, params: 1, frame: 30
var r13;
var r14;
var r7;
var r6;
var wrapperOffsetBinding;
var moduleValue;
var withTiming;
var value10;
var value11;
var moduleValue2;
var withSpring;
const isWindowLandscape = wrapperDimensions.isWindowLandscape;
const value2 = 0;
const lg2 = isWindowLandscape ? value2 : lg;
const r2 = IS_IOS ? ActivityPanelConstantsModule.ActivityPanelModes.get() : value2;
let binding = env0_5;
const width = binding.width;
const value6 = binding.height - r2 - (wrapperDimensions.isWindowLandscape ? value2 : env0_6.top);
let shownBinding = shown;
const get = shownBinding.get;
if (Reflect.apply(get, shownBinding, [])) {
wrapperOffsetBinding = wrapperOffset;
r13 = wrapperOffsetBinding.get().y;
} else {
r13 = env0_5.height;
}
const value7 = _fun117543();
if (useReducedMotion) {
shownBinding = shown;
if (shownBinding.get()) {
wrapperOffsetBinding = wrapperOffset;
r14 = 1 - wrapperOffsetBinding.get().y / env0_5.height;
} else {
r14 = value2;
}
} else {
r14 = value2;
}
const object = {};
if (useReducedMotion) {
moduleValue = require(4504) /* metro dependency 4504: timing */;
withTiming = moduleValue.withTiming;
binding = env1_18;
value10 = shown.get();
value11 = 'animate-always';
if (value10) {
wrapperOffsetBinding = wrapperOffset;
r7 = wrapperOffsetBinding.get().gestureActive ? 'animate-never' : value11;
} else {
r7 = value11;
}
r6 = Reflect.apply(withTiming, moduleValue, [r14, binding, r7, value7]);
} else {
r6 = 1;
}
object.opacity = r6;
if (useReducedMotion) {
r6 = value2;
} else {
moduleValue2 = require(4577) /* metro dependency 4577: spring */;
withSpring = moduleValue2.withSpring;
wrapperOffsetBinding = wrapperOffset;
r6 = Reflect.apply(withSpring, moduleValue2, [r13,
wrapperOffsetBinding.get().gestureActive && transitionState !== (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates.YEETED ? ACTIVITY_LAYOUT_PHYSICS_GESTURE : ACTIVITY_LAYOUT_PHYSICS_DEFAULT,
'animate-always', value7]);
}
object.transform = [{translateY: r6}];
object.top = wrapperDimensions.isWindowLandscape ? value2 : env0_6.top;
object.width = width;
object.height = value6;
object.borderTopStartRadius = lg2;
object.borderTopEndRadius = lg2;
return object;
function _fun117543() { // fn#117543, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15573:4051, offset: 0x024b7566, size: 123 bytes, params: 1, frame: 16
const ActivityPanelFocusedViewTsx22 = ActivityPanelFocusedViewTsx2;
const object = {};
object.transitionState = transitionState;
const TransitionStates = (TransitionGroupModule).TransitionStates;
object.TransitionStates = TransitionStates;
object.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
object.transitionCleanUp = transitionCleanUp;
ActivityPanelFocusedViewTsx22.__closure = object;
ActivityPanelFocusedViewTsx22.__workletHash = 2890456430056;
ActivityPanelFocusedViewTsx22.__initData = env2_21;
return ActivityPanelFocusedViewTsx22;
function ActivityPanelFocusedViewTsx2() { // fn#117544, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15573:4097, offset: 0x024b75e1, size: 109 bytes, params: 1, frame: 14
var transitionStateBinding;
var runOnJS;
var value2;
let value = a0;
let r1 = value !== undefined ? value : false;
if (r1) {
value = environment.__proto__.__proto__;
transitionStateBinding = transitionState;
value = environment.__proto__.__proto__.__proto__;
value = transitionStateBinding === (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates.YEETED;
r1 = value;
}
if (r1) {
value = environment.__proto__.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
runOnJS = value.runOnJS;
value2 = environment.__proto__.__proto__;
Reflect.apply(runOnJS, value, [transitionCleanUp])();
}
}
}
}
r6 = Reflect.apply(withTiming, moduleValue, [r14, binding, r7, value7]);
} else {
r6 = 1;
function BaseActivityPanelFocusedViewT() { // fn#117545, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15573:5319, owner: BaseActivityPanelFocusedView.T, offset: 0x024b764e, size: 134 bytes, params: 1, frame: 15
const get = wrapperOffset.get;
const r4 = Reflect.apply(get, wrapperOffsetBinding,
[]).gestureActive ? 1 - wrapperOffset.get().y / env0_5.height : shown.get() ? 1 : 0;
const object = {};
const value = environment.__proto__;
object.opacity = (require(4577) /* metro dependency 4577: spring */).withSpring(r4, ACTIVITY_LAYOUT_PHYSICS_DEFAULT);
return object;
}
function _fun117546() { // fn#117546, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15573:5616, offset: 0x024b76d4, size: 31 bytes, params: 1, frame: 3
return [styles.wrapper, ActivityPanelNativeConstantsModule.DEFAULT_PORTRAIT_LETTERBOX_CONFIG];
}
function BaseActivityPanelFocusedViewA() { // fn#117547, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15573:5682, owner: BaseActivityPanelFocusedView.A, offset: 0x024b76f3, size: 61 bytes, params: 1, frame: 11
const value = environment.__proto__;
const r2 = IS_IOS ? ActivityPanelConstantsModule.ActivityPanelModes.get() : 0;
const wrapperDimensionsBinding = wrapperDimensions;
return {width: wrapperDimensionsBinding.width, height: wrapperDimensionsBinding.height - r2};
}
}
object2.opacity = r6;
if (useReducedMotion) {
r6 = value2;
} else {
moduleValue2 = require(4577) /* metro dependency 4577: spring */;
withSpring = moduleValue2.withSpring;
wrapperOffsetBinding = wrapperOffset;
r6 = Reflect.apply(withSpring, moduleValue2, [r13,
wrapperOffsetBinding.get().gestureActive && transitionState !== (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates.YEETED ? ACTIVITY_LAYOUT_PHYSICS_GESTURE : ACTIVITY_LAYOUT_PHYSICS_DEFAULT,
'animate-always', value7]);
}
object2.transform = [{translateY: r6}];
object2.top = wrapperDimensions.isWindowLandscape ? value2 : env0_6.top;
object2.width = width;
object2.height = value6;
object2.borderTopStartRadius = lg2;
object2.borderTopEndRadius = lg2;
return object2;
}
function BaseActivityPanelFocusedViewT() { // fn#117545, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15573:5319, owner: BaseActivityPanelFocusedView.T, offset: 0x024b764e, size: 134 bytes, params: 1, frame: 15
const get = wrapperOffset.get;
const r4 = Reflect.apply(get, wrapperOffsetBinding,
[]).gestureActive ? 1 - wrapperOffset.get().y / env0_5.height : shown.get() ? 1 : 0;
const object2 = {};
const value = environment.__proto__;
object2.opacity = (require(4577) /* metro dependency 4577: spring */).withSpring(r4,
ACTIVITY_LAYOUT_PHYSICS_DEFAULT);
return object2;
}
function _fun117549({transitionState, transitionCleanUp}) { // fn#117549, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15573:6239, offset: 0x024b7730, size: 284 bytes, params: 2, frame: 23
const {channel,
hasActivity} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([EmbeddedActivitiesStore,
ChannelStore], function() {
var embeddedActivitiesStoreBinding = EmbeddedActivitiesStore;
var value2 = embeddedActivitiesStoreBinding.getConnectedActivityLocation();
var value3 = embeddedActivitiesStoreBinding.getSelfEmbeddedActivityForLocation(value2);
var value4 = require(dependencyMap[24]).getEmbeddedActivityLocationChannelId(value2);
var object = {};
object.channel = ChannelStore.getChannel(value4);
object.hasActivity = value3 != null;
return object;
}, []);
const hasActivity2 = hasActivity;
object = {};
object.context = importDefault(15368) /* metro dependency 15368: ActivityPanelStateContext */;
const {portraitSafeAreasConfig, landscapeSafeAreasConfig} = useBaseActivityPanelFocusedView(object);
return hasActivity2.useMemo(_fun117553, [transitionState, transitionCleanUp, hasActivity2.useCallback(function() {
require(dependencyMap[27]).updateActivityPanelMode(ActivityPanelModes.PIP);
}, []), hasActivity, hasActivity2.useMemo(_fun117551, []), channel, portraitSafeAreasConfig,
landscapeSafeAreasConfig]);
function _fun117551() { // fn#117551, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15573:6683, offset: 0x024b78aa, size: 39 bytes, params: 1, frame: 13
const value = environment.__proto__;
return ((Component) => <Component />)(ActivityPanelHeader);
}
function _fun117546() { // fn#117546, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15573:5616, offset: 0x024b76d4, size: 31 bytes, params: 1, frame: 3
return [styles.wrapper, env0_12];
}
function _fun117553() { // fn#117553, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15573:6793, offset: 0x024b7901, size: 163 bytes, params: 1, frame: 19
const baseActivityPanelFocusedViewProps = {transitionState: transitionState, transitionCleanUp: transitionCleanUp,
updateActivityPanelModeToPIP: ConstantsModule2.ActivityLayoutMode, hasActivity: hasActivity,
context: ActivityPanelStateContext, header: env0_6};
const channelBinding = channel;
const FOCUSED = ActivityLayoutMode.FOCUSED;
return (
<BaseActivityPanelFocusedView {...baseActivityPanelFocusedViewProps}>
<EmbeddedActivityView
channel={channelBinding}
layoutMode={FOCUSED}
portraitSafeAreasConfig={portraitSafeAreasConfig}
landscapeSafeAreasConfig={landscapeSafeAreasConfig}
/>
</BaseActivityPanelFocusedView>
);
}
function BaseActivityPanelFocusedViewA() { // fn#117547, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15573:5682, owner: BaseActivityPanelFocusedView.A, offset: 0x024b76f3, size: 61 bytes, params: 1, frame: 11
const value = environment.__proto__;
const r2 = IS_IOS ? env0_10.get() : 0;
const wrapperDimensionsBinding = wrapperDimensions;
return {width: wrapperDimensionsBinding.width, height: wrapperDimensionsBinding.height - r2};
}
function _fun117551() { // fn#117551, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15573:6683, offset: 0x024b78aa, size: 39 bytes, params: 1, frame: 13
const value = environment.__proto__;
return ((Component) => <Component />)(importDefault(15377) /* metro dependency 15377: ActivityPanelHeader */);
}
function _fun117553() { // fn#117553, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15573:6793, offset: 0x024b7901, size: 163 bytes, params: 1, frame: 19
const baseActivityPanelFocusedViewProps = {transitionState: transitionState, transitionCleanUp: transitionCleanUp,
updateActivityPanelModeToPIP: env0_7, hasActivity: hasActivity,
context: importDefault(15368) /* metro dependency 15368: ActivityPanelStateContext */, header: env0_6};
const EmbeddedActivityView = importDefault(10704) /* metro dependency 10704: EmbeddedActivityView */;
const channelBinding = channel;
const FOCUSED = ActivityLayoutMode.FOCUSED;
return (
<BaseActivityPanelFocusedView {...baseActivityPanelFocusedViewProps}>
<EmbeddedActivityView
channel={channelBinding}
layoutMode={FOCUSED}
portraitSafeAreasConfig={portraitSafeAreasConfig}
landscapeSafeAreasConfig={landscapeSafeAreasConfig}
/>
</BaseActivityPanelFocusedView>
);
}
function _fun117543() { // fn#117543, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15573:4051, offset: 0x024b7566, size: 123 bytes, params: 1, frame: 16
const closure = ActivityPanelFocusedViewTsx2;
const object2 = {};
object2.transitionState = transitionState;
const TransitionStates = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates;
object2.TransitionStates = TransitionStates;
object2.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
object2.transitionCleanUp = transitionCleanUp;
closure.__closure = object2;
closure.__workletHash = 2890456430056;
closure.__initData = env2_21;
return closure;
}
function ActivityPanelFocusedViewTsx2() { // fn#117544, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15573:4097, offset: 0x024b75e1, size: 109 bytes, params: 1, frame: 14
var transitionStateBinding;
var runOnJS;
var value2;
let value = a0;
let r1 = value !== undefined ? value : false;
if (r1) {
value = environment.__proto__.__proto__;
transitionStateBinding = transitionState;
value = environment.__proto__.__proto__.__proto__;
value = transitionStateBinding === (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates.YEETED;
r1 = value;
}
if (r1) {
value = environment.__proto__.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
runOnJS = value.runOnJS;
value2 = environment.__proto__.__proto__;
Reflect.apply(runOnJS, value, [transitionCleanUp])();
}
}
global.__d(_fun117537, 15376, [31, 27, 4502, 1379, 1378, 4237, 8044, 15371, 661, 11795, 33, 4501, 697, 1585, 566,
1478, 15366, 15319, 4017, 4508, 4504, 4577, 3868, 4556, 3774, 15368, 15377, 7860, 10704,
2]) /* metro module 15376, dependencies: [31, 27, 4502, 1379, 1378, 4237, 8044, 15371, 661, 11795, 33, 4501, 697, 1585, 566, 1478, 15366, 15319, 4017, 4508, 4504, 4577, 3868, 4556, 3774, 15368, 15377, 7860, 10704, 2] */;
@@ -1,212 +1,231 @@
/* Metro module 15377; source: modules/activities/panel/native/ActivityPanelHeader.tsx; dependencies: [57, 31, 27, 1378, 8044, 482, 33, 4501, 697, 1585, 4017, 15374, 3868, 5321, 15378, 566, 6777, 15379, 15383, 15384, 15389, 15368, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import EmbeddedActivitiesStore from '../../EmbeddedActivitiesStore.tsx'; /* Metro dependency 1378 */
import UseSafeAreaInsetsNative from '../../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import UseGetOrFetchApplications from '../../../applications/useGetOrFetchApplications.tsx'; /* Metro dependency 6777 */
import UseMorphablePanelGesture from '../../../panels/morphable/native/useMorphablePanelGesture.tsx'; /* Metro dependency 15374 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../../external/discord_common/js/shared/Constants.tsx'; /* Metro dependency 482 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as ActivityPanelConstantsModule from '../ActivityPanelConstants.tsx'; /* Metro dependency 8044 */
import * as UseMorphablePanelGestureModule from '../../../panels/morphable/native/useMorphablePanelGesture.tsx'; /* Metro dependency 15374 */
function _fun117554(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117554, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15574:6, offset: 0x024b79a4, size: 670 bytes, params: 8, frame: 28
var object3;
const env0_0 = require;
const closure = useBaseActivityPanelHeaderContent;
const closure2 = BaseActivityPanelContent;
const closure3 = useBaseActivityPanelHeader;
const useBaseActivityPanelHeaderContent2 = useBaseActivityPanelHeaderContent;
const BaseActivityPanelContent2 = BaseActivityPanelContent;
const useBaseActivityPanelHeader2 = useBaseActivityPanelHeader;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_5 = value2.View;
const StyleSheet = value2.StyleSheet;
const embeddedActivitiesStore = importDefault(1378) /* metro dependency 1378: EmbeddedActivitiesStore */;
const activityPanelConstantsModule = require(8044) /* metro dependency 8044: ActivityPanelConstants */;
const env0_8 = activityPanelConstantsModule.ACTIVITY_PANEL_PORTRAIT_HEADER_HEIGHT;
const env0_9 = activityPanelConstantsModule.LANDSCAPE_IFRAME_HORIZONTAL_MARGIN;
const env0_10 = activityPanelConstantsModule.ActivityPanelModes;
const env0_11 = (require(482) /* metro dependency 482: Constants */).ThemeTypes;
const value4 = require(33) /* metro dependency 33 */;
const env0_12 = value4.jsx;
const env0_13 = value4.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
let createStyles = createStylesModule.createStyles;
object3 = {};
const object5 = {};
copyDataProperties(object5, StyleSheet.absoluteFillObject, undefined);
object5['justifyContent'] = 'space-between';
object5['alignItems'] = 'center';
object5['flexDirection'] = 'row';
object5['gap'] = 8;
object3.panelHeader = object5;
object3.panelLandscape = {flexDirection: 'column-reverse'};
object3.headerContainer = {'position': 'absolute', 'top': 0};
const object6 = {'backgroundColor': null, 'borderRadius': null, 'width': 32, 'height': 4, 'alignSelf': 'center',
let value = ReactModule;
const StyleSheet = ReactNativeModule.StyleSheet;
let createStyles = CreateStylesModule.createStyles;
object = {};
const object2 = {};
copyDataProperties(object2, StyleSheet.absoluteFillObject, undefined);
object2['justifyContent'] = 'space-between';
object2['alignItems'] = 'center';
object2['flexDirection'] = 'row';
object2['gap'] = 8;
object.panelHeader = object2;
object.panelLandscape = {flexDirection: 'column-reverse'};
object.headerContainer = {'position': 'absolute', 'top': 0};
const object4 = {'backgroundColor': null, 'borderRadius': null, 'width': 32, 'height': 4, 'alignSelf': 'center',
'marginTop': 4, 'opacity': 0.3};
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
object6.backgroundColor = WHITE;
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object3.pullIndicator = object6;
const env0_14 = Reflect.apply(createStyles, createStylesModule, [object3]);
object3 = {code: 'function ActivityPanelHeaderTsx1(){const{runOnJS,setMode,ActivityPanelModes}=this.__closure;runOnJS(setMode)(ActivityPanelModes.PIP);}'};
const value6 = createStylesModule;
createStyles = value6.createStyles;
object4.backgroundColor = WHITE;
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object.pullIndicator = object4;
const env0_14 = Reflect.apply(createStyles, CreateStylesModule, [object]);
object = {code: 'function ActivityPanelHeaderTsx1(){const{runOnJS,setMode,ActivityPanelModes}=this.__closure;runOnJS(setMode)(ActivityPanelModes.PIP);}'};
createStyles = CreateStylesModule.createStyles;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
const styles = Reflect.apply(createStyles, value6, [{buttonContainer: {'flexDirection': 'row',
const styles = Reflect.apply(createStyles, CreateStylesModule, [{buttonContainer: {'flexDirection': 'row',
'alignItems': 'center', 'gap': null, 'flexShrink': 1, gap: PX_8},
buttonContainerLandscape: {flexDirection: 'column-reverse'}}]);
const env0_17 = value.memo(ActivityPanelHeaderContentInner);
value = value.memo(_fun117564);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/panel/native/ActivityPanelHeader.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/activities/panel/native/ActivityPanelHeader.tsx');
exports.default = value;
exports.useBaseActivityPanelHeaderContent = closure;
exports.BaseActivityPanelContent = closure2;
exports.useBaseActivityPanelHeaderContent = useBaseActivityPanelHeaderContent2;
exports.BaseActivityPanelContent = BaseActivityPanelContent2;
exports.useMinimizeAndQuestButtonContainerStyles = styles;
exports.useBaseActivityPanelHeader = closure3;
}
function useBaseActivityPanelHeaderContent({landscape, setMode, wrapperOffset, pipState}) { // fn#117555, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15574:844, offset: 0x024b7c42, size: 369 bytes, params: 2, frame: 25
var object2;
const styles = useStyles();
const value2 = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
let binding = env0_4;
const value3 = binding.useMemo(_fun117556, [landscape]);
const value4 = env0_4.useMemo(_fun117557, [landscape, value2, styles.panelHeader, styles.panelLandscape]);
binding = env0_4;
const useCallback = binding.useCallback;
const closure = function() {
require(dependencyMap[10]).runOnJS(setMode)(ActivityPanelModes.PIP);
};
object2 = {};
object2.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
object2.setMode = setMode;
object2.ActivityPanelModes = ActivityPanelModes;
closure.__closure = object2;
closure.__workletHash = 14504167937928;
closure.__initData = env0_15;
const value = Reflect.apply(useCallback, binding, [closure, [setMode]]);
object2 = {};
const defaultImport = importDefault(15374) /* metro dependency 15374: useMorphablePanelGesture */;
const MorphablePanelModes = (require(15374) /* metro dependency 15374: useMorphablePanelGesture */).MorphablePanelModes;
const PANEL = MorphablePanelModes.PANEL;
object2.gesture = defaultImport({mode: PANEL, panGestureEnabled: true, pipState: pipState, swipeRequiresPop: true,
wrapperOffset: wrapperOffset, onPanMinimizeGestureEnd: value, disableHorizontalSafeAreas: true});
object2.headerWrapperStyles = value3;
object2.headerStyles = value4;
object2.styles = styles;
return object2;
}
function BaseActivityPanelContent({children, hasConnectedActivity, gesture, headerWrapperStyles, headerStyles, landscape}) { // fn#117559, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15574:1712, offset: 0x024b7ed8, size: 280 bytes, params: 2, frame: 29
var r0;
var ThemeContextProvider;
var GestureDetector;
var object;
var object4;
var items2;
const styles = useStyles();
if (hasConnectedActivity) {
ThemeContextProvider = (require(3868) /* metro dependency 3868: native */).ThemeContextProvider;
var themeContextProviderProps = {theme: ThemeTypes.DARK};
GestureDetector = (require(5321) /* metro dependency 5321 */).GestureDetector;
object = {gesture: gesture};
object4 = {style: headerWrapperStyles};
items2 = [((Component) => <Component />)(importDefault(15378) /* metro dependency 15378: BlurVisualEffectView */)];
items2[1] = !landscape && <View style={styles.pullIndicator} />;
items2[2] = <View style={headerStyles}>{children}</View>;
r0 = <ThemeContextProvider {...themeContextProviderProps}><GestureDetector {...object}><View {...object4}>{items2}</View></GestureDetector></ThemeContextProvider>;
} else {
r0 = null;
}
return r0;
}
function useBaseActivityPanelHeader({context}) { // fn#117560, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15574:3138, offset: 0x024b7ff0, size: 145 bytes, params: 2, frame: 19
const styles = useStyles();
let binding = env0_4;
const {wrapperDimensions, setMode, wrapperOffset, pipState} = binding.useContext(context);
binding = env0_4;
const useMemo = binding.useMemo;
return {headerStyles: Reflect.apply(useMemo, binding, [function() {
var r2;
var r3;
var r4;
var r5;
var value3;
var value4;
var value6;
var value7;
if (wrapperDimensions.isWindowLandscape) {
value6 = 'auto';
value7 = null;
r2 = 0;
r3 = value7;
r4 = value6;
r5 = LANDSCAPE_IFRAME_HORIZONTAL_MARGIN;
} else {
value3 = 'auto';
value4 = 0;
r2 = null;
r3 = value4;
r4 = ACTIVITY_PANEL_PORTRAIT_HEADER_HEIGHT;
r5 = value3;
exports.useBaseActivityPanelHeader = useBaseActivityPanelHeader2;
function useBaseActivityPanelHeaderContent({landscape, setMode, wrapperOffset, pipState}) { // fn#117555, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15574:844, offset: 0x024b7c42, size: 369 bytes, params: 2, frame: 25
const styles = useStyles();
const value2 = (UseSafeAreaInsetsNative)();
let binding = env0_4;
const value3 = binding.useMemo(_fun117556, [landscape]);
const value4 = env0_4.useMemo(_fun117557, [landscape, value2, styles.panelHeader, styles.panelLandscape]);
binding = env0_4;
const useCallback = binding.useCallback;
const closure = function() {
require(dependencyMap[10]).runOnJS(setMode)(ActivityPanelModes.PIP);
};
object = {};
object.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
object.setMode = setMode;
object.ActivityPanelModes = ActivityPanelModes;
closure.__closure = object;
closure.__workletHash = 14504167937928;
closure.__initData = env0_15;
const value = Reflect.apply(useCallback, binding, [closure, [setMode]]);
object = {};
const defaultImport = UseMorphablePanelGesture;
const MorphablePanelModes = (UseMorphablePanelGestureModule).MorphablePanelModes;
const PANEL = MorphablePanelModes.PANEL;
object.gesture = defaultImport({mode: PANEL, panGestureEnabled: true, pipState: pipState, swipeRequiresPop: true,
wrapperOffset: wrapperOffset, onPanMinimizeGestureEnd: value, disableHorizontalSafeAreas: true});
object.headerWrapperStyles = value3;
object.headerStyles = value4;
object.styles = styles;
return object;
function _fun117556() { // fn#117556, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15574:976, offset: 0x024b7db3, size: 87 bytes, params: 1, frame: 12
const lg = landscape ? 0 : (importDefault(697) /* metro dependency 697: native */).radii.lg;
const value = environment.__proto__;
return [StyleSheet.absoluteFill, {borderTopStartRadius: lg, borderTopEndRadius: lg}];
}
return [styles.headerContainer, {width: r5, height: r4, right: 0, left: r3, bottom: r2}];
}, [styles.headerContainer, wrapperDimensions.isWindowLandscape]]), wrapperDimensions: wrapperDimensions,
setMode: setMode, wrapperOffset: wrapperOffset, pipState: pipState};
}
function ActivityPanelHeaderContentInner({landscape, setMode, pipState, wrapperOffset}) { // fn#117562, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15574:2268, offset: 0x024b80de, size: 566 bytes, params: 2, frame: 30
const {gesture, headerWrapperStyles, headerStyles} = useBaseActivityPanelHeaderContent({landscape: landscape,
setMode: setMode, wrapperOffset: wrapperOffset, pipState: pipState});
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([EmbeddedActivitiesStore],
function() {
return EmbeddedActivitiesStore.getSelfEmbeddedActivityForLocation(EmbeddedActivitiesStore.getConnectedActivityLocation());
}, []);
const applicationId = value4?.applicationId;
const property = env0_3((importDefault(6777) /* metro dependency 6777: useGetOrFetchApplications */)([applicationId]),
1)[0];
const styles = useStyles();
const value8 = ((Component) => <Component applicationId={property?.id} />)(importDefault(15379) /* metro dependency 15379: InviteActivityButton */);
const items3 = [styles.buttonContainer];
items3[1] = landscape ? styles.buttonContainerLandscape : undefined;
const items2 = [((Component) => <Component activityName={landscape || property == null ? undefined : property.name} setMode={setMode} />)(importDefault(15383) /* metro dependency 15383: MinimizeActivityButton */)];
items2[1] = applicationId != null && ((Component) => <Component applicationId={applicationId} />)(importDefault(15384) /* metro dependency 15384: QuestActivityButton */);
items2[2] = landscape ? value8 : null;
return (
<BaseActivityPanelContent
hasConnectedActivity={value4 != null}
gesture={gesture}
headerWrapperStyles={headerWrapperStyles}
headerStyles={headerStyles}
landscape={landscape}
>
<View style={items3}>
{items2}
function _fun117557() { // fn#117557, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15574:1097, offset: 0x024b7e0a, size: 147 bytes, params: 1, frame: 7
let landscapeBinding = landscape;
const value2 = 8;
const r2 = landscapeBinding ? 24 : value2;
landscapeBinding = landscape;
const value6 = 16;
return [styles.panelHeader, landscape ? styles.panelLandscape : undefined, {paddingTop: r2,
paddingBottom: landscape ? 24 : value2, paddingLeft: landscapeBinding ? value6 : value2 + Module00057.left,
paddingRight: landscape ? value6 : value2 + Module00057.right}];
}
}
function BaseActivityPanelContent({children, hasConnectedActivity, gesture, headerWrapperStyles, headerStyles, landscape}) { // fn#117559, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15574:1712, offset: 0x024b7ed8, size: 280 bytes, params: 2, frame: 29
var r0;
var ThemeContextProvider;
var GestureDetector;
var object2;
var object3;
var items2;
const styles = useStyles();
if (hasConnectedActivity) {
ThemeContextProvider = (require(3868) /* metro dependency 3868: native */).ThemeContextProvider;
var themeContextProviderProps = {theme: ThemeTypes.DARK};
GestureDetector = (require(5321) /* metro dependency 5321 */).GestureDetector;
object2 = {gesture: gesture};
object3 = {style: headerWrapperStyles};
items2 = [
((Component) => <Component />)(importDefault(15378) /* metro dependency 15378: BlurVisualEffectView */),
];
items2[1] = !landscape && <View style={styles.pullIndicator} />;
items2[2] = (
<View style={headerStyles}>
{children}
</View>
);
r0 = (
<ThemeContextProvider {...themeContextProviderProps}>
<GestureDetector {...object2}>
<View {...object3}>
{items2}
</View>
</GestureDetector>
</ThemeContextProvider>
);
} else {
r0 = null;
}
return r0;
}
function useBaseActivityPanelHeader({context}) { // fn#117560, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15574:3138, offset: 0x024b7ff0, size: 145 bytes, params: 2, frame: 19
const styles = useStyles();
let binding = env0_4;
const {wrapperDimensions, setMode, wrapperOffset, pipState} = binding.useContext(context);
binding = env0_4;
const useMemo = binding.useMemo;
return {headerStyles: Reflect.apply(useMemo, binding, [function() {
var r2;
var r3;
var r4;
var r5;
var value3;
var value4;
var value6;
var value7;
if (wrapperDimensions.isWindowLandscape) {
value6 = 'auto';
value7 = null;
r2 = 0;
r3 = value7;
r4 = value6;
r5 = LANDSCAPE_IFRAME_HORIZONTAL_MARGIN;
} else {
value3 = 'auto';
value4 = 0;
r2 = null;
r3 = value4;
r4 = ACTIVITY_PANEL_PORTRAIT_HEADER_HEIGHT;
r5 = value3;
}
return [styles.headerContainer, {width: r5, height: r4, right: 0, left: r3, bottom: r2}];
}, [styles.headerContainer, wrapperDimensions.isWindowLandscape]]), wrapperDimensions: wrapperDimensions,
setMode: setMode, wrapperOffset: wrapperOffset, pipState: pipState};
}
function ActivityPanelHeaderContentInner({landscape, setMode, pipState, wrapperOffset}) { // fn#117562, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15574:2268, offset: 0x024b80de, size: 566 bytes, params: 2, frame: 30
const {gesture, headerWrapperStyles, headerStyles} = useBaseActivityPanelHeaderContent({landscape: landscape,
setMode: setMode, wrapperOffset: wrapperOffset, pipState: pipState});
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([EmbeddedActivitiesStore],
function() {
var embeddedActivitiesStoreBinding = EmbeddedActivitiesStore;
return embeddedActivitiesStoreBinding.getSelfEmbeddedActivityForLocation(embeddedActivitiesStoreBinding.getConnectedActivityLocation());
}, []);
const applicationId = value4?.applicationId;
const property = Module00057((UseGetOrFetchApplications)([applicationId]),
1)[0];
const styles = useStyles();
const value8 = ((Component) => <Component applicationId={property?.id} />)(importDefault(15379) /* metro dependency 15379: InviteActivityButton */);
const items3 = [styles.buttonContainer];
items3[1] = landscape ? styles.buttonContainerLandscape : undefined;
const items2 = [
((Component) => <Component activityName={landscape || property == null ? undefined : property.name} setMode={setMode} />)(importDefault(15383) /* metro dependency 15383: MinimizeActivityButton */),
];
items2[1] = applicationId != null && ((Component) => <Component applicationId={applicationId} />)(importDefault(15384) /* metro dependency 15384: QuestActivityButton */);
items2[2] = landscape ? value8 : null;
return (
<BaseActivityPanelContent
hasConnectedActivity={value4 != null}
gesture={gesture}
headerWrapperStyles={headerWrapperStyles}
headerStyles={headerStyles}
landscape={landscape}
>
<View style={items3}>
{items2}
</View>
{landscape ? null : value8}
{((Component) => <Component selfEmbeddedActivity={value4 ?? undefined} setMode={setMode} />)(importDefault(15389) /* metro dependency 15389: LeaveActivityButton */)}
</BaseActivityPanelContent>
);
}
function _fun117564() { // fn#117564, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15574:3592, offset: 0x024b8332, size: 138 bytes, params: 1, frame: 20
const object = {};
object.context = importDefault(15368) /* metro dependency 15368: ActivityPanelStateContext */;
const {headerStyles, wrapperDimensions, setMode, wrapperOffset, pipState} = useBaseActivityPanelHeader(object);
return (
<View style={headerStyles}>
{((Component) => <Component landscape={wrapperDimensions.isWindowLandscape} setMode={setMode} wrapperOffset={wrapperOffset} pipState={pipState} />)(env0_17)}
</View>
{landscape ? null : value8}
{((Component) => <Component selfEmbeddedActivity={value4 ?? undefined} setMode={setMode} />)(importDefault(15389) /* metro dependency 15389: LeaveActivityButton */)}
</BaseActivityPanelContent>
);
}
);
}
function _fun117564() { // fn#117564, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15574:3592, offset: 0x024b8332, size: 138 bytes, params: 1, frame: 20
const object2 = {};
object2.context = importDefault(15368) /* metro dependency 15368: ActivityPanelStateContext */;
const {headerStyles, wrapperDimensions, setMode, wrapperOffset, pipState} = useBaseActivityPanelHeader(object2);
return (
<View style={headerStyles}>
{((Component) => <Component landscape={wrapperDimensions.isWindowLandscape} setMode={setMode} wrapperOffset={wrapperOffset} pipState={pipState} />)(env0_17)}
</View>
);
}
function _fun117556() { // fn#117556, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15574:976, offset: 0x024b7db3, size: 87 bytes, params: 1, frame: 12
const lg = landscape ? 0 : (importDefault(697) /* metro dependency 697: native */).radii.lg;
const value = environment.__proto__;
return [StyleSheet.absoluteFill, {borderTopStartRadius: lg, borderTopEndRadius: lg}];
}
function _fun117557() { // fn#117557, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15574:1097, offset: 0x024b7e0a, size: 147 bytes, params: 1, frame: 7
let landscapeBinding = landscape;
const value2 = 8;
const r2 = landscapeBinding ? 24 : value2;
landscapeBinding = landscape;
const value6 = 16;
return [styles.panelHeader, landscape ? styles.panelLandscape : undefined, {paddingTop: r2,
paddingBottom: landscape ? 24 : value2, paddingLeft: landscapeBinding ? value6 : value2 + env0_3.left,
paddingRight: landscape ? value6 : value2 + env0_3.right}];
}
global.__d(_fun117554, 15377, [57, 31, 27, 1378, 8044, 482, 33, 4501, 697, 1585, 4017, 15374, 3868, 5321, 15378,
566, 6777, 15379, 15383, 15384, 15389, 15368,
2]) /* metro module 15377, dependencies: [57, 31, 27, 1378, 8044, 482, 33, 4501, 697, 1585, 4017, 15374, 3868, 5321, 15378, 566, 6777, 15379, 15383, 15384, 15389, 15368, 2] */;
@@ -1,14 +1,17 @@
/* Metro module 15371; source: modules/activities/panel/native/ActivityPanelNativeConstants.tsx; dependencies: [8044, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ActivityPanelConstantsModule from '../ActivityPanelConstants.tsx'; /* Metro dependency 8044 */
function _fun117509(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117509, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15568:6, offset: 0x024b53ad, size: 176 bytes, params: 8, frame: 18
var object2;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object2 = {};
const ACTIVITY_PANEL_PORTRAIT_HEADER_HEIGHT = (require(8044) /* metro dependency 8044: ActivityPanelConstants */).ACTIVITY_PANEL_PORTRAIT_HEADER_HEIGHT;
object2.top = {disable: false, override: ACTIVITY_PANEL_PORTRAIT_HEADER_HEIGHT};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/panel/native/ActivityPanelNativeConstants.tsx');
exports.DEFAULT_PORTRAIT_SAFE_AREAS_CONFIG = object2;
object = {};
const ACTIVITY_PANEL_PORTRAIT_HEADER_HEIGHT = (ActivityPanelConstantsModule).ACTIVITY_PANEL_PORTRAIT_HEADER_HEIGHT;
object.top = {disable: false, override: ACTIVITY_PANEL_PORTRAIT_HEADER_HEIGHT};
(FileImportTrackerModule).fileFinishedImporting('modules/activities/panel/native/ActivityPanelNativeConstants.tsx');
exports.DEFAULT_PORTRAIT_SAFE_AREAS_CONFIG = object;
exports.DEFAULT_PORTRAIT_LETTERBOX_CONFIG = {top: {disable: true}, bottom: {disable: true}};
exports.DEFAULT_LANDSCAPE_PILLERBOX_CONFIG = {left: {disable: true}, right: {disable: true}};
}
global.__d(_fun117509, 15371, [8044, 2]) /* metro module 15371, dependencies: [8044, 2] */;
@@ -1,323 +1,342 @@
/* Metro module 15370; source: modules/activities/panel/native/ActivityPanelPIPView.tsx; dependencies: [31, 27, 4502, 10724, 1379, 1378, 4237, 8044, 15371, 661, 11796, 33, 1305, 4501, 697, 1585, 566, 1478, 15366, 11282, 4017, 15372, 4508, 4504, 4577, 15373, 15374, 1244, 3868, 5321, 3774, 15368, 10704, 2] */
import EmbeddedActivitiesStore from '../../EmbeddedActivitiesStore.tsx'; /* Metro dependency 1378 */
import ChannelStore from '../../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import UseWindowDimensionsNative from '../../../screen/useWindowDimensions.native.tsx'; /* Metro dependency 1478 */
import UseSafeAreaInsetsNative from '../../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import ReanimatedRexport from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import AccessibilityStore from '../../../a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */
import EmbeddedActivityView from '../../native/EmbeddedActivityView.tsx'; /* Metro dependency 10704 */
import SafeAreaDisabledStore from '../../../panels/morphable/native/SafeAreaDisabledStore.tsx'; /* Metro dependency 10724 */
import UpdateSharedValueIfChangedNative from '../../../reanimated/utils/updateSharedValueIfChanged.native.tsx'; /* Metro dependency 11282 */
import ActivityPanelStateContext from './ActivityPanelStateContext.tsx'; /* Metro dependency 15368 */
import GetActivityContainerPIPStylesSpec from './pip/getActivityContainerPIPStylesSpec.tsx'; /* Metro dependency 15373 */
import UseMorphablePanelGesture from '../../../panels/morphable/native/useMorphablePanelGesture.tsx'; /* Metro dependency 15374 */
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 NativeModule from '../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as NativeModule2 from '../../../../external/discord_common/js/packages/design/native.tsx'; /* Metro dependency 3868 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as ConstantsModule2 from '../../Constants.tsx'; /* Metro dependency 4237 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TransitionGroupModule from '../../../../design/components/TransitionGroup/TransitionGroup.tsx'; /* Metro dependency 4508 */
import * as SpringModule from '../../../../design/animation/reanimated/spring/spring.tsx'; /* Metro dependency 4577 */
import * as Module05321Module from '../../../../by-id/module-05321.js'; /* Metro dependency 5321 */
import * as ActivityPanelConstantsModule from '../ActivityPanelConstants.tsx'; /* Metro dependency 8044 */
import * as MorphablePanelConstantsModule from '../../../panels/morphable/native/MorphablePanelConstants.tsx'; /* Metro dependency 11796 */
import * as UseActivityWebViewLockManagerModule from './useActivityWebViewLockManager.tsx'; /* Metro dependency 15366 */
import * as ActivityPanelNativeConstantsModule from './ActivityPanelNativeConstants.tsx'; /* Metro dependency 15371 */
import * as MorphablePanelUtilsModule from '../../../panels/morphable/native/MorphablePanelUtils.tsx'; /* Metro dependency 15372 */
import * as UseMorphablePanelGestureModule from '../../../panels/morphable/native/useMorphablePanelGesture.tsx'; /* Metro dependency 15374 */
function _fun117490(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117490, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15567:6, offset: 0x024b451b, size: 682 bytes, params: 8, frame: 27
var object4;
const env0_0 = require;
const closure = useBaseActivityPanelPIPView;
const closure2 = BaseActivityPanelPIPView;
const useBaseActivityPanelPIPView2 = useBaseActivityPanelPIPView;
const BaseActivityPanelPIPView2 = BaseActivityPanelPIPView;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const safeAreaDisabledStore = importDefault(10724) /* metro dependency 10724: SafeAreaDisabledStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const embeddedActivitiesStore = importDefault(1378) /* metro dependency 1378: EmbeddedActivitiesStore */;
const env0_9 = (require(4237) /* metro dependency 4237: Constants */).ActivityLayoutMode;
const activityPanelConstantsModule = require(8044) /* metro dependency 8044: ActivityPanelConstants */;
const ACTIVITY_PIP_SIZE = activityPanelConstantsModule.ACTIVITY_PIP_SIZE;
const env0_11 = activityPanelConstantsModule.ActivityPanelModes;
const env0_12 = activityPanelConstantsModule.ACTIVITY_LAYOUT_PHYSICS_GESTURE;
const env0_13 = activityPanelConstantsModule.ACTIVITY_LAYOUT_PHYSICS_DEFAULT;
const env0_14 = activityPanelConstantsModule.LANDSCAPE_IFRAME_HORIZONTAL_MARGIN;
const env0_15 = (require(15371) /* metro dependency 15371: ActivityPanelNativeConstants */).DEFAULT_PORTRAIT_LETTERBOX_CONFIG;
const env0_16 = (require(661) /* metro dependency 661: Constants */).ThemeTypes;
const env0_17 = (require(11796) /* metro dependency 11796: MorphablePanelConstants */).PIP_WINDOW_OFFSET;
const env0_18 = (require(33) /* metro dependency 33 */).jsx;
object4 = {duration: 300};
const nativeModule = require(1305) /* metro dependency 1305: native */;
const generateBoxShadowStyle = nativeModule.generateBoxShadowStyle;
const EXPERIMENTAL_HIGH_ELEVATION_SHADOW_PARAMS = nativeModule.EXPERIMENTAL_HIGH_ELEVATION_SHADOW_PARAMS;
const value4 = Reflect.apply(generateBoxShadowStyle, nativeModule, [EXPERIMENTAL_HIGH_ELEVATION_SHADOW_PARAMS]);
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object4 = {};
const object5 = {};
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
copyDataProperties(object5, ACTIVITY_PIP_SIZE, undefined);
copyDataProperties(object5, value4, undefined);
object4.wrapper = object5;
const object6 = {'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'center', 'overflow': 'hidden'};
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
let value = ReactModule;
const ACTIVITY_PIP_SIZE = ActivityPanelConstantsModule.ACTIVITY_PIP_SIZE;
object = {duration: 300};
const generateBoxShadowStyle = NativeModule.generateBoxShadowStyle;
const EXPERIMENTAL_HIGH_ELEVATION_SHADOW_PARAMS = NativeModule.EXPERIMENTAL_HIGH_ELEVATION_SHADOW_PARAMS;
const value4 = Reflect.apply(generateBoxShadowStyle, NativeModule, [EXPERIMENTAL_HIGH_ELEVATION_SHADOW_PARAMS]);
const createStyles = CreateStylesModule.createStyles;
object = {};
const object2 = {};
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
copyDataProperties(object2, ACTIVITY_PIP_SIZE, undefined);
copyDataProperties(object2, value4, undefined);
object.wrapper = object2;
const object3 = {'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'center', 'overflow': 'hidden'};
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object6.backgroundColor = BACKGROUND_BASE_LOW;
copyDataProperties(object6, ACTIVITY_PIP_SIZE, undefined);
object4.mask = object6;
const env0_20 = Reflect.apply(createStyles, createStylesModule, [object4]);
object4 = {code: "function ActivityPanelPIPViewTsx1(){const{pipState,getClampedPIPPosition,ACTIVITY_PIP_SIZE,windowDimensions,safeArea,pipAvoidanceSpecs,wrapperOffset,disableHorizontalSafeAreas,shown,reduceMotion,PIP_WINDOW_OFFSET,transitionState,TransitionStates,runOnJS,transitionCleanUp,withTiming,REDUCED_MOTION_TIMING,withSpring,ACTIVITY_LAYOUT_PHYSICS_GESTURE,ACTIVITY_LAYOUT_PHYSICS_DEFAULT}=this.__closure;const{x:pipX,y:pipY}=pipState.get();let{x:x,y:y}=getClampedPIPPosition({pipX:pipX,pipY:pipY,width:ACTIVITY_PIP_SIZE.width,height:ACTIVITY_PIP_SIZE.height,windowDimensions:windowDimensions,safeArea:safeArea,bottomAvoidanceRegion:pipAvoidanceSpecs.get().bottom,topAvoidanceRegion:pipAvoidanceSpecs.get().top,positionOffset:wrapperOffset.get().gestureActive?wrapperOffset.get():undefined,disableHorizontalSafeAreas:disableHorizontalSafeAreas});if(!shown.get()&&!reduceMotion){if(pipX<0.5&&pipX>=0){x=-(ACTIVITY_PIP_SIZE.width+Math.max(safeArea.right,PIP_WINDOW_OFFSET));}else{x=windowDimensions.width+Math.max(safeArea.right,PIP_WINDOW_OFFSET);}}const transitionComplete=function(finished=false){if(finished&&transitionState===TransitionStates.YEETED){runOnJS(transitionCleanUp)();}};return{opacity:reduceMotion?withTiming(shown.get()?1:0,REDUCED_MOTION_TIMING,'animate-always',transitionComplete):1,transform:[{translateY:withSpring(y,wrapperOffset.get().gestureActive?ACTIVITY_LAYOUT_PHYSICS_GESTURE:ACTIVITY_LAYOUT_PHYSICS_DEFAULT,'animate-always')},{translateX:withSpring(x,wrapperOffset.get().gestureActive?ACTIVITY_LAYOUT_PHYSICS_GESTURE:ACTIVITY_LAYOUT_PHYSICS_DEFAULT,'animate-always',!reduceMotion?transitionComplete:undefined)}]};}"};
object4 = {code: 'function ActivityPanelPIPViewTsx2(finished=false){const{transitionState,TransitionStates,runOnJS,transitionCleanUp}=this.__closure;if(finished&&transitionState===TransitionStates.YEETED){runOnJS(transitionCleanUp)();}}'};
object4 = {code: 'function ActivityPanelPIPViewTsx3(){const{runOnJS,setMode,ActivityPanelModes}=this.__closure;runOnJS(setMode)(ActivityPanelModes.PANEL);}'};
object3.backgroundColor = BACKGROUND_BASE_LOW;
copyDataProperties(object3, ACTIVITY_PIP_SIZE, undefined);
object.mask = object3;
const env0_20 = Reflect.apply(createStyles, CreateStylesModule, [object]);
object = {code: "function ActivityPanelPIPViewTsx1(){const{pipState,getClampedPIPPosition,ACTIVITY_PIP_SIZE,windowDimensions,safeArea,pipAvoidanceSpecs,wrapperOffset,disableHorizontalSafeAreas,shown,reduceMotion,PIP_WINDOW_OFFSET,transitionState,TransitionStates,runOnJS,transitionCleanUp,withTiming,REDUCED_MOTION_TIMING,withSpring,ACTIVITY_LAYOUT_PHYSICS_GESTURE,ACTIVITY_LAYOUT_PHYSICS_DEFAULT}=this.__closure;const{x:pipX,y:pipY}=pipState.get();let{x:x,y:y}=getClampedPIPPosition({pipX:pipX,pipY:pipY,width:ACTIVITY_PIP_SIZE.width,height:ACTIVITY_PIP_SIZE.height,windowDimensions:windowDimensions,safeArea:safeArea,bottomAvoidanceRegion:pipAvoidanceSpecs.get().bottom,topAvoidanceRegion:pipAvoidanceSpecs.get().top,positionOffset:wrapperOffset.get().gestureActive?wrapperOffset.get():undefined,disableHorizontalSafeAreas:disableHorizontalSafeAreas});if(!shown.get()&&!reduceMotion){if(pipX<0.5&&pipX>=0){x=-(ACTIVITY_PIP_SIZE.width+Math.max(safeArea.right,PIP_WINDOW_OFFSET));}else{x=windowDimensions.width+Math.max(safeArea.right,PIP_WINDOW_OFFSET);}}const transitionComplete=function(finished=false){if(finished&&transitionState===TransitionStates.YEETED){runOnJS(transitionCleanUp)();}};return{opacity:reduceMotion?withTiming(shown.get()?1:0,REDUCED_MOTION_TIMING,'animate-always',transitionComplete):1,transform:[{translateY:withSpring(y,wrapperOffset.get().gestureActive?ACTIVITY_LAYOUT_PHYSICS_GESTURE:ACTIVITY_LAYOUT_PHYSICS_DEFAULT,'animate-always')},{translateX:withSpring(x,wrapperOffset.get().gestureActive?ACTIVITY_LAYOUT_PHYSICS_GESTURE:ACTIVITY_LAYOUT_PHYSICS_DEFAULT,'animate-always',!reduceMotion?transitionComplete:undefined)}]};}"};
object = {code: 'function ActivityPanelPIPViewTsx2(finished=false){const{transitionState,TransitionStates,runOnJS,transitionCleanUp}=this.__closure;if(finished&&transitionState===TransitionStates.YEETED){runOnJS(transitionCleanUp)();}}'};
object = {code: 'function ActivityPanelPIPViewTsx3(){const{runOnJS,setMode,ActivityPanelModes}=this.__closure;runOnJS(setMode)(ActivityPanelModes.PANEL);}'};
value = value.memo(_fun117504);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/panel/native/ActivityPanelPIPView.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/activities/panel/native/ActivityPanelPIPView.tsx');
exports.default = value;
exports.useBaseActivityPanelPIPView = closure;
exports.BaseActivityPanelPIPView = closure2;
}
exports.useBaseActivityPanelPIPView = useBaseActivityPanelPIPView2;
exports.BaseActivityPanelPIPView = BaseActivityPanelPIPView2;
function useBaseActivityPanelPIPView() { // fn#117491, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15567:823, offset: 0x024b47c5, size: 79 bytes, params: 1, frame: 15
const value2 = (UseSafeAreaInsetsNative)();
const binding = env0_3;
const useMemo = binding.useMemo;
return {landscapeSafeAreasConfig: Reflect.apply(useMemo, binding, [_fun117492, [value2.right]])};
function _fun117492() { // fn#117492, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15567:922, offset: 0x024b4814, size: 87 bytes, params: 1, frame: 18
const Math = global.Math;
const max = Math.max;
const value = environment.__proto__;
return {right: {disable: false, override: Reflect.apply(max, Math, [LANDSCAPE_IFRAME_HORIZONTAL_MARGIN,
env0_0?.right ?? 0])}};
}
function useBaseActivityPanelPIPView() { // fn#117491, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15567:823, offset: 0x024b47c5, size: 79 bytes, params: 1, frame: 15
const value2 = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
const binding = env0_3;
const useMemo = binding.useMemo;
return {landscapeSafeAreasConfig: Reflect.apply(useMemo, binding, [_fun117492, [value2.right]])};
}
function BaseActivityPanelPIPView({children, transitionState, transitionCleanUp, pipOrientationLockState, hasActivity, context}) { // fn#117493, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15567:3061, offset: 0x024b486b, size: 1120 bytes, params: 2, frame: 38
var object2;
const styles = useStyles();
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
const value2 = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)();
const env0_3 = value2;
const value3 = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
let binding = env0_3;
const {wrapperOffset, setMode, pipState, pipAvoidanceSpecs, wrapperDimensions} = binding.useContext(context);
const {shown,
renderWebView} = (require(15366) /* metro dependency 15366: useActivityWebViewLockManager */).useLockedWebView({transitionState: transitionState,
context: context});
env0_3.useEffect(_fun117495, [wrapperOffset]);
const value6 = SafeAreaDisabledStore(function(a0) {
return a0.shouldDisableSafeAreas();
});
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
let closure = BaseActivityPanelPIPViewJ;
object2 = {pipState: pipState};
const getClampedPIPPosition = (require(15372) /* metro dependency 15372: MorphablePanelUtils */).getClampedPIPPosition;
object2.getClampedPIPPosition = getClampedPIPPosition;
object2.ACTIVITY_PIP_SIZE = ACTIVITY_PIP_SIZE;
object2.windowDimensions = value2;
object2.safeArea = value3;
object2.pipAvoidanceSpecs = pipAvoidanceSpecs;
object2.wrapperOffset = wrapperOffset;
object2.disableHorizontalSafeAreas = value6;
object2.shown = shown;
object2.reduceMotion = useReducedMotion;
object2.PIP_WINDOW_OFFSET = PIP_WINDOW_OFFSET;
object2.transitionState = transitionState;
const TransitionStates = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates;
object2.TransitionStates = TransitionStates;
object2.runOnJS = reanimatedRexportModule.runOnJS;
object2.transitionCleanUp = transitionCleanUp;
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
object2.REDUCED_MOTION_TIMING = env0_19;
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object2.ACTIVITY_LAYOUT_PHYSICS_GESTURE = ACTIVITY_LAYOUT_PHYSICS_GESTURE;
object2.ACTIVITY_LAYOUT_PHYSICS_DEFAULT = ACTIVITY_LAYOUT_PHYSICS_DEFAULT;
closure.__closure = object2;
closure.__workletHash = 8039199265160;
closure.__initData = env0_21;
const value7 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const value8 = (importDefault(15373) /* metro dependency 15373: getActivityContainerPIPStylesSpec */)({pipWidth: ACTIVITY_PIP_SIZE.width,
pipHeight: ACTIVITY_PIP_SIZE.height, pipOrientationLockState: pipOrientationLockState,
isLandscape: wrapperDimensions.isLandscape});
const value9 = env0_3.useMemo(function() {
return {width: width, height: height, pointerEvents: 'none'};
}, [value8.width, value8.height]);
binding = env0_3;
const useCallback = binding.useCallback;
closure = function() {
require(dependencyMap[20]).runOnJS(setMode)(ActivityPanelModes.PANEL);
};
closure.__closure = {runOnJS: reanimatedRexportModule.runOnJS, setMode: setMode,
ActivityPanelModes: ActivityPanelModes};
closure.__workletHash = 2951177166574;
closure.__initData = env0_23;
const value10 = Reflect.apply(useCallback, binding, [closure, [setMode]]);
const defaultImport2 = importDefault(15374) /* metro dependency 15374: useMorphablePanelGesture */;
object2 = {panGestureEnabled: true, onTapGestureStart: value10};
const MorphablePanelModes = (require(15374) /* metro dependency 15374: useMorphablePanelGesture */).MorphablePanelModes;
const PIP = MorphablePanelModes.PIP;
object2.mode = PIP;
object2.pipState = pipState;
object2.wrapperOffset = wrapperOffset;
object2.disableHorizontalSafeAreas = false;
const value11 = defaultImport2(object2);
const value12 = env0_3.useMemo(function() {
var object = {'accessible': true, 'accessibilityLabel': null, 'accessibilityRole': 'button'};
object.accessibilityLabel = require(dependencyMap[27]).intl.string(require(dependencyMap[27]).t['3ejJer']);
object.accessibilityActions = [{name: 'activate'}];
object.onAccessibilityAction = _fun117503;
return object;
}, [setMode]);
const ThemeContextProvider = (require(3868) /* metro dependency 3868: native */).ThemeContextProvider;
const DARK = ThemeTypes.DARK;
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const view2Props = {style: [styles.wrapper, value7], ...value12};
const GestureDetector = (require(5321) /* metro dependency 5321 */).GestureDetector;
return (
<ThemeContextProvider theme={DARK}>
<View2 {...view2Props}>
<GestureDetector gesture={value11}>
<View style={styles.mask}>
{!(renderWebView ? !hasActivity : !renderWebView) && <View style={value9}>{children}</View>}
</View>
</GestureDetector>
</View2>
</ThemeContextProvider>
);
}
function _fun117504({transitionState, transitionCleanUp}) { // fn#117504, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15567:6187, offset: 0x024b516c, size: 300 bytes, params: 2, frame: 22
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([EmbeddedActivitiesStore],
_fun117505);
const env0_2 = value3.channelId;
const activity = value3.activity;
const env0_3 = activity;
const env0_4 = activity?.applicationId;
return env0_3.useMemo(_fun117508, [activity,
(require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channelId);
}), useBaseActivityPanelPIPView().landscapeSafeAreasConfig,
(require(566) /* metro dependency 566: flux */).useStateFromStores([EmbeddedActivitiesStore], _fun117506),
transitionCleanUp, transitionState]);
}
function _fun117492() { // fn#117492, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15567:922, offset: 0x024b4814, size: 87 bytes, params: 1, frame: 18
const Math = global.Math;
const max = Math.max;
const value = environment.__proto__;
return {right: {disable: false, override: Reflect.apply(max, Math, [LANDSCAPE_IFRAME_HORIZONTAL_MARGIN,
env0_0?.right ?? 0])}};
}
function _fun117495() { // fn#117495, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15567:3498, offset: 0x024b4ccb, size: 49 bytes, params: 1, frame: 14
const value = environment.__proto__;
(importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */)(wrapperOffset,
{gestureActive: false});
}
function BaseActivityPanelPIPViewJ() { // fn#117497, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15567:3618, owner: BaseActivityPanelPIPView.J, offset: 0x024b4d0b, size: 650 bytes, params: 1, frame: 24
var r1;
var moduleValue2;
const pipStateBinding = pipState;
let get = pipStateBinding.get;
let {x, y} = Reflect.apply(get, pipStateBinding, []);
const value4 = undefined;
const morphablePanelUtilsModule = require(15372) /* metro dependency 15372: MorphablePanelUtils */;
const getClampedPIPPosition = morphablePanelUtilsModule.getClampedPIPPosition;
let object2 = {pipX: x, pipY: y};
object2.width = ACTIVITY_PIP_SIZE.width;
object2.height = ACTIVITY_PIP_SIZE.height;
object2.windowDimensions = env0_3;
object2.safeArea = env0_4;
const pipAvoidanceSpecsBinding = pipAvoidanceSpecs;
get = pipAvoidanceSpecsBinding.get;
object2.bottomAvoidanceRegion = Reflect.apply(get, pipAvoidanceSpecsBinding, []).bottom;
get = pipAvoidanceSpecsBinding.get;
object2.topAvoidanceRegion = Reflect.apply(get, pipAvoidanceSpecsBinding, []).top;
let wrapperOffsetBinding = wrapperOffset;
get = wrapperOffsetBinding.get;
object2.positionOffset = Reflect.apply(get, wrapperOffsetBinding, []).gestureActive ? wrapperOffset.get() : value4;
object2.disableHorizontalSafeAreas = env0_10;
const value6 = Reflect.apply(getClampedPIPPosition, morphablePanelUtilsModule, [object2]);
const x2 = value6.x;
y = value6.y;
const r8 = shown.get() || useReducedMotion ? x2 : x < 0.5 && x >= 0 ? -(ACTIVITY_PIP_SIZE.width + global.Math.max(env0_4.right,
PIP_WINDOW_OFFSET)) : env0_3.width + global.Math.max(env0_4.right, PIP_WINDOW_OFFSET);
const value10 = _fun117498();
object2 = {};
const value11 = 1;
if (useReducedMotion) {
moduleValue2 = require(4504) /* metro dependency 4504: timing */;
r1 = moduleValue2.withTiming(shown.get() ? value11 : 0, env1_19, 'animate-always', value10);
} else {
r1 = value11;
}
object2.opacity = r1;
const springModule = require(4577) /* metro dependency 4577: spring */;
let withSpring = springModule.withSpring;
wrapperOffsetBinding = wrapperOffset;
get = wrapperOffsetBinding.get;
const items2 = [{translateY: Reflect.apply(withSpring, springModule, [y, Reflect.apply(get, wrapperOffsetBinding,
[]).gestureActive ? ACTIVITY_LAYOUT_PHYSICS_GESTURE : ACTIVITY_LAYOUT_PHYSICS_DEFAULT, 'animate-always'])}];
const moduleValue4 = springModule;
withSpring = moduleValue4.withSpring;
wrapperOffsetBinding = wrapperOffset;
get = wrapperOffsetBinding.get;
items2[1] = {translateX: Reflect.apply(withSpring, moduleValue4, [r8, Reflect.apply(get, wrapperOffsetBinding,
[]).gestureActive ? ACTIVITY_LAYOUT_PHYSICS_GESTURE : ACTIVITY_LAYOUT_PHYSICS_DEFAULT, 'animate-always',
useReducedMotion ? value4 : value10])};
object2.transform = items2;
return object2;
}
function _fun117502() { // fn#117502, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15567:5744, offset: 0x024b50d8, size: 119 bytes, params: 1, frame: 15
const object2 = {'accessible': true, 'accessibilityLabel': null, 'accessibilityRole': 'button'};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['3ejJer']);
object2.accessibilityActions = [{name: 'activate'}];
object2.onAccessibilityAction = function() {
setMode(ActivityPanelModes.PANEL);
};
return object2;
}
function BaseActivityPanelPIPView({children, transitionState, transitionCleanUp, pipOrientationLockState, hasActivity, context}) { // fn#117493, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15567:3061, offset: 0x024b486b, size: 1120 bytes, params: 2, frame: 38
const styles = useStyles();
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
const value2 = (UseWindowDimensionsNative)();
const env0_3 = value2;
const value3 = (UseSafeAreaInsetsNative)();
let binding = env0_3;
const {wrapperOffset, setMode, pipState, pipAvoidanceSpecs, wrapperDimensions} = binding.useContext(context);
const {shown,
renderWebView} = (UseActivityWebViewLockManagerModule).useLockedWebView({transitionState: transitionState,
context: context});
env0_3.useEffect(_fun117495, [wrapperOffset]);
const value6 = SafeAreaDisabledStore(function(a0) {
return a0.shouldDisableSafeAreas();
});
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
let closure = BaseActivityPanelPIPViewJ;
object = {pipState: pipState};
const getClampedPIPPosition = (MorphablePanelUtilsModule).getClampedPIPPosition;
object.getClampedPIPPosition = getClampedPIPPosition;
object.ACTIVITY_PIP_SIZE = ACTIVITY_PIP_SIZE;
object.windowDimensions = value2;
object.safeArea = value3;
object.pipAvoidanceSpecs = pipAvoidanceSpecs;
object.wrapperOffset = wrapperOffset;
object.disableHorizontalSafeAreas = value6;
object.shown = shown;
object.reduceMotion = useReducedMotion;
object.PIP_WINDOW_OFFSET = PIP_WINDOW_OFFSET;
object.transitionState = transitionState;
const TransitionStates = (TransitionGroupModule).TransitionStates;
object.TransitionStates = TransitionStates;
object.runOnJS = ReanimatedRexportModule.runOnJS;
object.transitionCleanUp = transitionCleanUp;
object.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
object.REDUCED_MOTION_TIMING = env0_19;
object.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object.ACTIVITY_LAYOUT_PHYSICS_GESTURE = ACTIVITY_LAYOUT_PHYSICS_GESTURE;
object.ACTIVITY_LAYOUT_PHYSICS_DEFAULT = ACTIVITY_LAYOUT_PHYSICS_DEFAULT;
closure.__closure = object;
closure.__workletHash = 8039199265160;
closure.__initData = env0_21;
const value7 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
const value8 = (GetActivityContainerPIPStylesSpec)({pipWidth: ACTIVITY_PIP_SIZE.width,
pipHeight: ACTIVITY_PIP_SIZE.height, pipOrientationLockState: pipOrientationLockState,
isLandscape: wrapperDimensions.isLandscape});
const value9 = env0_3.useMemo(function() {
return {width: width, height: height, pointerEvents: 'none'};
}, [value8.width, value8.height]);
binding = env0_3;
const useCallback = binding.useCallback;
closure = function() {
require(dependencyMap[20]).runOnJS(setMode)(ActivityPanelModes.PANEL);
};
closure.__closure = {runOnJS: ReanimatedRexportModule.runOnJS, setMode: setMode,
ActivityPanelModes: ActivityPanelModes};
closure.__workletHash = 2951177166574;
closure.__initData = env0_23;
const value10 = Reflect.apply(useCallback, binding, [closure, [setMode]]);
const defaultImport2 = UseMorphablePanelGesture;
object = {panGestureEnabled: true, onTapGestureStart: value10};
const MorphablePanelModes = (UseMorphablePanelGestureModule).MorphablePanelModes;
const PIP = MorphablePanelModes.PIP;
object.mode = PIP;
object.pipState = pipState;
object.wrapperOffset = wrapperOffset;
object.disableHorizontalSafeAreas = false;
const value11 = defaultImport2(object);
const value12 = env0_3.useMemo(function() {
var object = {'accessible': true, 'accessibilityLabel': null, 'accessibilityRole': 'button'};
object.accessibilityLabel = require(dependencyMap[27]).intl.string(require(dependencyMap[27]).t['3ejJer']);
object.accessibilityActions = [{name: 'activate'}];
object.onAccessibilityAction = _fun117503;
return object;
}, [setMode]);
const ThemeContextProvider = (NativeModule2).ThemeContextProvider;
const DARK = ThemeTypes.DARK;
const View2 = (ReanimatedRexport).View;
const view2Props = {style: [styles.wrapper, value7], ...value12};
const GestureDetector = (Module05321Module).GestureDetector;
return (
<ThemeContextProvider theme={DARK}>
<View2 {...view2Props}>
<GestureDetector gesture={value11}>
<View style={styles.mask}>
{!(renderWebView ? !hasActivity : !renderWebView) && <View style={value9}>{children}</View>}
</View>
</GestureDetector>
</View2>
</ThemeContextProvider>
);
function _fun117495() { // fn#117495, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15567:3498, offset: 0x024b4ccb, size: 49 bytes, params: 1, frame: 14
const value = environment.__proto__;
(UpdateSharedValueIfChangedNative)(wrapperOffset,
{gestureActive: false});
}
function _fun117505() { // fn#117505, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15567:6282, offset: 0x024b5298, size: 74 bytes, params: 1, frame: 14
const value = environment.__proto__;
const connectedActivityLocation = EmbeddedActivitiesStore.getConnectedActivityLocation();
const object2 = {};
object2.channelId = (require(3774) /* metro dependency 3774: embeddedActivityLocationUtils */).getEmbeddedActivityLocationChannelId(connectedActivityLocation);
object2.activity = EmbeddedActivitiesStore.getSelfEmbeddedActivityForLocation(connectedActivityLocation);
return object2;
}
function BaseActivityPanelPIPViewJ() { // fn#117497, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15567:3618, owner: BaseActivityPanelPIPView.J, offset: 0x024b4d0b, size: 650 bytes, params: 1, frame: 24
var r1;
var moduleValue2;
const pipStateBinding = pipState;
let get = pipStateBinding.get;
let {x, y} = Reflect.apply(get, pipStateBinding, []);
const value4 = undefined;
const getClampedPIPPosition = MorphablePanelUtilsModule.getClampedPIPPosition;
let object = {pipX: x, pipY: y};
object.width = ACTIVITY_PIP_SIZE.width;
object.height = ACTIVITY_PIP_SIZE.height;
object.windowDimensions = env0_3;
object.safeArea = ReactNativeModule.View;
const pipAvoidanceSpecsBinding = pipAvoidanceSpecs;
get = pipAvoidanceSpecsBinding.get;
object.bottomAvoidanceRegion = Reflect.apply(get, pipAvoidanceSpecsBinding, []).bottom;
get = pipAvoidanceSpecsBinding.get;
object.topAvoidanceRegion = Reflect.apply(get, pipAvoidanceSpecsBinding, []).top;
let wrapperOffsetBinding = wrapperOffset;
get = wrapperOffsetBinding.get;
object.positionOffset = Reflect.apply(get, wrapperOffsetBinding, []).gestureActive ? wrapperOffset.get() : value4;
object.disableHorizontalSafeAreas = env0_10;
const value6 = Reflect.apply(getClampedPIPPosition, MorphablePanelUtilsModule, [object]);
const x2 = value6.x;
y = value6.y;
const r8 = shown.get() || useReducedMotion ? x2 : x < 0.5 && x >= 0 ? -(ACTIVITY_PIP_SIZE.width + global.Math.max(ReactNativeModule.View.right,
PIP_WINDOW_OFFSET)) : env0_3.width + global.Math.max(ReactNativeModule.View.right, PIP_WINDOW_OFFSET);
const value10 = _fun117498();
object = {};
const value11 = 1;
if (useReducedMotion) {
moduleValue2 = require(4504) /* metro dependency 4504: timing */;
r1 = moduleValue2.withTiming(shown.get() ? value11 : 0, env1_19, 'animate-always', value10);
} else {
r1 = value11;
}
object.opacity = r1;
let withSpring = SpringModule.withSpring;
wrapperOffsetBinding = wrapperOffset;
get = wrapperOffsetBinding.get;
const items2 = [{translateY: Reflect.apply(withSpring, SpringModule, [y, Reflect.apply(get, wrapperOffsetBinding,
[]).gestureActive ? ACTIVITY_LAYOUT_PHYSICS_GESTURE : ACTIVITY_LAYOUT_PHYSICS_DEFAULT, 'animate-always'])}];
withSpring = SpringModule.withSpring;
wrapperOffsetBinding = wrapperOffset;
get = wrapperOffsetBinding.get;
items2[1] = {translateX: Reflect.apply(withSpring, SpringModule, [r8, Reflect.apply(get, wrapperOffsetBinding,
[]).gestureActive ? ACTIVITY_LAYOUT_PHYSICS_GESTURE : ACTIVITY_LAYOUT_PHYSICS_DEFAULT, 'animate-always',
useReducedMotion ? value4 : value10])};
object.transform = items2;
return object;
function _fun117498() { // fn#117498, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15567:4018, offset: 0x024b4f95, size: 123 bytes, params: 1, frame: 16
const ActivityPanelPIPViewTsx22 = ActivityPanelPIPViewTsx2;
const object = {};
object.transitionState = transitionState;
const TransitionStates = (TransitionGroupModule).TransitionStates;
object.TransitionStates = TransitionStates;
object.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
object.transitionCleanUp = transitionCleanUp;
ActivityPanelPIPViewTsx22.__closure = object;
ActivityPanelPIPViewTsx22.__workletHash = 5141562491372;
ActivityPanelPIPViewTsx22.__initData = env2_22;
return ActivityPanelPIPViewTsx22;
function ActivityPanelPIPViewTsx2() { // fn#117499, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15567:4060, offset: 0x024b5010, size: 109 bytes, params: 1, frame: 14
var transitionStateBinding;
var runOnJS;
var value2;
let value = a0;
let r1 = value !== undefined ? value : false;
if (r1) {
value = environment.__proto__.__proto__;
transitionStateBinding = transitionState;
value = environment.__proto__.__proto__.__proto__;
value = transitionStateBinding === (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates.YEETED;
r1 = value;
}
if (r1) {
value = environment.__proto__.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
runOnJS = value.runOnJS;
value2 = environment.__proto__.__proto__;
Reflect.apply(runOnJS, value, [transitionCleanUp])();
}
}
function _fun117506() { // fn#117506, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15567:6540, offset: 0x024b52e2, size: 42 bytes, params: 1, frame: 12
return applicationId == null ? undefined : EmbeddedActivitiesStore.getPipOrientationLockStateForApp(applicationId);
}
}
function _fun117508() { // fn#117508, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15567:6731, offset: 0x024b530c, size: 161 bytes, params: 1, frame: 19
const baseActivityPanelPIPViewProps = {transitionState: transitionState, transitionCleanUp: transitionCleanUp,
pipOrientationLockState: env0_5, hasActivity: activity != null,
context: importDefault(15368) /* metro dependency 15368: ActivityPanelStateContext */};
const EmbeddedActivityView = importDefault(10704) /* metro dependency 10704: EmbeddedActivityView */;
const channelBinding = channel;
const PIP = ActivityLayoutMode.PIP;
return (
<BaseActivityPanelPIPView {...baseActivityPanelPIPViewProps}>
<EmbeddedActivityView
channel={channelBinding}
layoutMode={PIP}
portraitSafeAreasConfig={DEFAULT_PORTRAIT_LETTERBOX_CONFIG}
landscapeSafeAreasConfig={landscapeSafeAreasConfig}
/>
</BaseActivityPanelPIPView>
);
}
}
function _fun117498() { // fn#117498, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15567:4018, offset: 0x024b4f95, size: 123 bytes, params: 1, frame: 16
const closure = ActivityPanelPIPViewTsx2;
const object2 = {};
object2.transitionState = transitionState;
const TransitionStates = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates;
object2.TransitionStates = TransitionStates;
object2.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
object2.transitionCleanUp = transitionCleanUp;
closure.__closure = object2;
closure.__workletHash = 5141562491372;
closure.__initData = env2_22;
return closure;
}
function _fun117502() { // fn#117502, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15567:5744, offset: 0x024b50d8, size: 119 bytes, params: 1, frame: 15
const object = {'accessible': true, 'accessibilityLabel': null, 'accessibilityRole': 'button'};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['3ejJer']);
object.accessibilityActions = [{name: 'activate'}];
object.onAccessibilityAction = function() {
setMode(ActivityPanelModes.PANEL);
};
return object;
function onAccessibilityAction_117503() { // fn#117503, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15567:5916, offset: 0x024b514f, size: 29 bytes, params: 1, frame: 11
const setModeBinding = setMode;
const PANEL = ActivityPanelModes.PANEL;
setModeBinding(PANEL);
}
}
function ActivityPanelPIPViewTsx2() { // fn#117499, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15567:4060, offset: 0x024b5010, size: 109 bytes, params: 1, frame: 14
var transitionStateBinding;
var runOnJS;
var value2;
let value = a0;
let r1 = value !== undefined ? value : false;
if (r1) {
value = environment.__proto__.__proto__;
transitionStateBinding = transitionState;
value = environment.__proto__.__proto__.__proto__;
value = transitionStateBinding === (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates.YEETED;
r1 = value;
}
if (r1) {
value = environment.__proto__.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
runOnJS = value.runOnJS;
value2 = environment.__proto__.__proto__;
Reflect.apply(runOnJS, value, [transitionCleanUp])();
function _fun117504({transitionState, transitionCleanUp}) { // fn#117504, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15567:6187, offset: 0x024b516c, size: 300 bytes, params: 2, frame: 22
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([EmbeddedActivitiesStore],
_fun117505);
const env0_2 = value3.channelId;
const activity = value3.activity;
const activity2 = activity;
const env0_4 = activity?.applicationId;
return activity2.useMemo(_fun117508, [activity,
(require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channelId);
}), useBaseActivityPanelPIPView().landscapeSafeAreasConfig,
(require(566) /* metro dependency 566: flux */).useStateFromStores([EmbeddedActivitiesStore], _fun117506),
transitionCleanUp, transitionState]);
function _fun117505() { // fn#117505, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15567:6282, offset: 0x024b5298, size: 74 bytes, params: 1, frame: 14
const value = environment.__proto__;
const embeddedActivitiesStoreBinding = EmbeddedActivitiesStore;
const connectedActivityLocation = embeddedActivitiesStoreBinding.getConnectedActivityLocation();
const object = {};
object.channelId = (require(3774) /* metro dependency 3774: embeddedActivityLocationUtils */).getEmbeddedActivityLocationChannelId(connectedActivityLocation);
object.activity = embeddedActivitiesStoreBinding.getSelfEmbeddedActivityForLocation(connectedActivityLocation);
return object;
}
function _fun117506() { // fn#117506, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15567:6540, offset: 0x024b52e2, size: 42 bytes, params: 1, frame: 12
return applicationId == null ? undefined : EmbeddedActivitiesStore.getPipOrientationLockStateForApp(applicationId);
}
function _fun117508() { // fn#117508, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15567:6731, offset: 0x024b530c, size: 161 bytes, params: 1, frame: 19
const baseActivityPanelPIPViewProps = {transitionState: transitionState, transitionCleanUp: transitionCleanUp,
pipOrientationLockState: env0_5, hasActivity: activity != null,
context: ActivityPanelStateContext};
const channelBinding = channel;
const PIP = ActivityLayoutMode.PIP;
return (
<BaseActivityPanelPIPView {...baseActivityPanelPIPViewProps}>
<EmbeddedActivityView
channel={channelBinding}
layoutMode={PIP}
portraitSafeAreasConfig={DEFAULT_PORTRAIT_LETTERBOX_CONFIG}
landscapeSafeAreasConfig={landscapeSafeAreasConfig}
/>
</BaseActivityPanelPIPView>
);
}
}
}
global.__d(_fun117490, 15370, [31, 27, 4502, 10724, 1379, 1378, 4237, 8044, 15371, 661, 11796, 33, 1305, 4501, 697,
1585, 566, 1478, 15366, 11282, 4017, 15372, 4508, 4504, 4577, 15373, 15374, 1244, 3868, 5321, 3774, 15368,
10704,
2]) /* metro module 15370, dependencies: [31, 27, 4502, 10724, 1379, 1378, 4237, 8044, 15371, 661, 11796, 33, 1305, 4501, 697, 1585, 566, 1478, 15366, 11282, 4017, 15372, 4508, 4504, 4577, 15373, 15374, 1244, 3868, 5321, 3774, 15368, 10704, 2] */;
@@ -1,30 +1,34 @@
/* Metro module 15368; source: modules/activities/panel/native/ActivityPanelStateContext.tsx; dependencies: [31, 8044, 8142, 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 ActivityPanelConstantsModule from '../ActivityPanelConstants.tsx'; /* Metro dependency 8044 */
function _fun117478(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117478, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15565:6, offset: 0x024b403c, size: 297 bytes, params: 8, frame: 21
var object2;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
object2 = {};
const ActivityPanelModes = (require(8044) /* metro dependency 8044: ActivityPanelConstants */).ActivityPanelModes;
let value = ReactModule;
object = {};
const ActivityPanelModes = (ActivityPanelConstantsModule).ActivityPanelModes;
const PANEL = ActivityPanelModes.PANEL;
object2.mode = PANEL;
object2.setMode = function() {
object.mode = PANEL;
object.setMode = function() {
var Error = global.Error;
throw new Error('ActivityPanelStateContextType.Provider.setMode: not called within a context provider');
};
object2.wrapperDimensions = {'width': 9, 'height': 16, 'isLandscape': false, 'isWindowLandscape': false};
object2.pipState = (require(8142) /* metro dependency 8142: ReanimatedHelperTypes */).createFakeSharedValue({'x': -1,
object.wrapperDimensions = {'width': 9, 'height': 16, 'isLandscape': false, 'isWindowLandscape': false};
object.pipState = (require(8142) /* metro dependency 8142: ReanimatedHelperTypes */).createFakeSharedValue({'x': -1,
'y': -1});
object2.pipAvoidanceSpecs = (require(8142) /* metro dependency 8142: ReanimatedHelperTypes */).createFakeSharedValue({'top': 0,
object.pipAvoidanceSpecs = (require(8142) /* metro dependency 8142: ReanimatedHelperTypes */).createFakeSharedValue({'top': 0,
'bottom': 0});
object2.wrapperOffset = (require(8142) /* metro dependency 8142: ReanimatedHelperTypes */).createFakeSharedValue({'x': 0,
object.wrapperOffset = (require(8142) /* metro dependency 8142: ReanimatedHelperTypes */).createFakeSharedValue({'x': 0,
'y': 0, 'gestureActive': false});
object2.useActivityWebViewLock = function() {
object.useActivityWebViewLock = function() {
return true;
};
value = value.createContext(object2);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/panel/native/ActivityPanelStateContext.tsx');
value = value.createContext(object);
(FileImportTrackerModule).fileFinishedImporting('modules/activities/panel/native/ActivityPanelStateContext.tsx');
exports.default = value;
exports.activityPanelStateContextDefault = object2;
exports.activityPanelStateContextDefault = object;
}
global.__d(_fun117478, 15368, [31, 8044, 8142, 2]) /* metro module 15368, dependencies: [31, 8044, 8142, 2] */;
@@ -1,38 +1,46 @@
/* Metro module 15391; source: modules/activities/panel/native/ActivityPanelSystemUIManager.tsx; dependencies: [31, 8044, 33, 15368, 477, 7725, 7727, 2] */
import ActivityPanelStateContext from './ActivityPanelStateContext.tsx'; /* Metro dependency 15368 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as PlatformUtilsModule from '../../../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
import * as ActivityPanelConstantsModule from '../ActivityPanelConstants.tsx'; /* Metro dependency 8044 */
function _fun117669(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117669, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15588:6, offset: 0x024bd494, size: 210 bytes, params: 8, frame: 19
const env0_0 = require;
const closure = BaseActivityPanelSystemUIManager;
const BaseActivityPanelSystemUIManager2 = BaseActivityPanelSystemUIManager;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(8044) /* metro dependency 8044: ActivityPanelConstants */).ActivityPanelModes;
const value2 = require(33) /* metro dependency 33 */;
const env0_5 = value2.jsx;
const env0_6 = value2.Fragment;
const env0_7 = value2.jsxs;
let value = ReactModule;
value = value.memo(_fun117671);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/panel/native/ActivityPanelSystemUIManager.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/activities/panel/native/ActivityPanelSystemUIManager.tsx');
exports.default = value;
exports.BaseActivityPanelSystemUIManager = closure;
}
exports.BaseActivityPanelSystemUIManager = BaseActivityPanelSystemUIManager2;
function BaseActivityPanelSystemUIManager({mode, isWindowLandscape}) { // fn#117670, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15588:348, offset: 0x024bd566, size: 233 bytes, params: 2, frame: 22
const PANEL = ActivityPanelModes.PANEL;
const value2 = mode === PANEL;
const PIP = ActivityPanelModes.PIP;
const isIOS2 = (PlatformUtilsModule).isIOS();
const r8 = isIOS2 ? value2 : !!isIOS2;
return (
<>
{
mode === PIP
? null
: ((Component) => <Component hidden={!(isWindowLandscape ? !value2 : !isWindowLandscape)} barStyle="light-content" />)(importDefault(7725) /* metro dependency 7725: StatusBarAndroid */)
}
{((Component) => <Component prefersHidden={value2 && !r8} prefersDeferringSystemGestures={r8} />)(importDefault(7727) /* metro dependency 7727: HomeIndicator */)}
</>
);
}
function BaseActivityPanelSystemUIManager({mode, isWindowLandscape}) { // fn#117670, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15588:348, offset: 0x024bd566, size: 233 bytes, params: 2, frame: 22
const PANEL = ActivityPanelModes.PANEL;
const value2 = mode === PANEL;
const PIP = ActivityPanelModes.PIP;
const isIOS2 = (require(477) /* metro dependency 477: PlatformUtils */).isIOS();
const r8 = isIOS2 ? value2 : !!isIOS2;
return (
<>
{mode === PIP ? null : ((Component) => <Component hidden={!(isWindowLandscape ? !value2 : !isWindowLandscape)} barStyle="light-content" />)(importDefault(7725) /* metro dependency 7725: StatusBarAndroid */)}
{((Component) => <Component prefersHidden={value2 && !r8} prefersDeferringSystemGestures={r8} />)(importDefault(7727) /* metro dependency 7727: HomeIndicator */)}
</>
);
}
function _fun117671() { // fn#117671, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15588:185, offset: 0x024bd64f, size: 84 bytes, params: 1, frame: 15
const {mode,
wrapperDimensions} = env0_3.useContext(ActivityPanelStateContext);
return <BaseActivityPanelSystemUIManager mode={mode} isWindowLandscape={wrapperDimensions.isWindowLandscape} />;
}
function _fun117671() { // fn#117671, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15588:185, offset: 0x024bd64f, size: 84 bytes, params: 1, frame: 15
const {mode,
wrapperDimensions} = env0_3.useContext(importDefault(15368) /* metro dependency 15368: ActivityPanelStateContext */);
return <BaseActivityPanelSystemUIManager mode={mode} isWindowLandscape={wrapperDimensions.isWindowLandscape} />;
}
global.__d(_fun117669, 15391, [31, 8044, 33, 15368, 477, 7725, 7727,
2]) /* metro module 15391, dependencies: [31, 8044, 33, 15368, 477, 7725, 7727, 2] */;
@@ -1,83 +1,92 @@
/* Metro module 15369; source: modules/activities/panel/native/ActivityPanelUI.tsx; dependencies: [31, 27, 8044, 33, 15370, 15376, 15390, 6517, 4508, 15391, 15368, 2] */
import ActivityPanelStateContext from './ActivityPanelStateContext.tsx'; /* Metro dependency 15368 */
import UseIsConnectedToVoiceChannel from '../../../voice_panel/native/hooks/useIsConnectedToVoiceChannel.tsx'; /* Metro dependency 15390 */
import ActivityPanelSystemUIManager from './ActivityPanelSystemUIManager.tsx'; /* Metro dependency 15391 */
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 TransitionGroupModule from '../../../../design/components/TransitionGroup/TransitionGroup.tsx'; /* Metro dependency 4508 */
import * as LayerScopeNativeModule from '../../../../design/components/Layers/native/LayerScope.native.tsx'; /* Metro dependency 6517 */
import * as ActivityPanelConstantsModule from '../ActivityPanelConstants.tsx'; /* Metro dependency 8044 */
function _fun117481(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117481, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15566:6, offset: 0x024b4189, size: 290 bytes, params: 8, frame: 19
const env0_0 = require;
const getKey_117483 = function(a0) {
return a0;
};
const closure = BaseActivityPanelUI;
const BaseActivityPanelUI2 = BaseActivityPanelUI;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_4 = value.View;
const env0_5 = value.StyleSheet;
const env0_6 = (require(8044) /* metro dependency 8044: ActivityPanelConstants */).ActivityPanelModes;
value = require(33) /* metro dependency 33 */;
const env0_7 = value.jsx;
const env0_8 = value.jsxs;
const env0_9 = [];
const env0_10 = ['pip'];
const env0_11 = ['activity'];
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/panel/native/ActivityPanelUI.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/activities/panel/native/ActivityPanelUI.tsx');
exports.default = ActivityPanelUI;
exports.BaseActivityPanelUI = closure;
}
exports.BaseActivityPanelUI = BaseActivityPanelUI2;
function renderActivityOrPIP(a0, a1, a2, a3) { // fn#117482, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15566:196, offset: 0x024b42ab, size: 83 bytes, params: 5, frame: 15
return ((Component) => <Component transitionState={a2} transitionCleanUp={a3} key={a0} />)(importDefault(a1 === 'pip' ? dependencyMap[4] : dependencyMap[5]));
}
function renderActivityOrPIP(a0, a1, a2, a3) { // fn#117482, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15566:196, offset: 0x024b42ab, size: 83 bytes, params: 5, frame: 15
return ((Component) => <Component transitionState={a2} transitionCleanUp={a3} key={a0} />)(importDefault(a1 === 'pip' ? dependencyMap[4] : dependencyMap[5]));
}
function wrapChildren_117484(a0) { // fn#117484, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15566:337, offset: 0x024b42fe, size: 55 bytes, params: 2, frame: 13
return (
<View style={StyleSheet.absoluteFill} pointerEvents="box-none">
{a0}
</View>
);
}
function wrapChildren_117484(a0) { // fn#117484, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15566:337, offset: 0x024b42fe, size: 55 bytes, params: 2, frame: 13
return (
<View style={StyleSheet.absoluteFill} pointerEvents="box-none">
{a0}
</View>
);
}
function BaseActivityPanelUI({renderActivityOrPIP, context, renderActivityPanelSystemUIManager}) { // fn#117485, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15566:467, offset: 0x024b4335, size: 227 bytes, params: 2, frame: 21
const useContext = ReactModule.useContext;
const value3 = ReactModule.useMemo(_fun117486, [Reflect.apply(useContext, ReactModule, [context]).mode,
(UseIsConnectedToVoiceChannel)()]);
const LayerScope = (LayerScopeNativeModule).LayerScope;
const value4 = renderActivityPanelSystemUIManager();
const TransitionGroup = (TransitionGroupModule).TransitionGroup;
return (
<LayerScope>
{value4}
<TransitionGroup
items={value3}
renderItem={renderActivityOrPIP}
getItemKey={getKey_117483}
wrapChildren={wrapChildren_117484}
/>
</LayerScope>
);
function _fun117486() { // fn#117486, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15566:620, offset: 0x024b4418, size: 85 bytes, params: 1, frame: 4
const modeBinding = mode;
const DISCONNECTED = ActivityPanelModes.DISCONNECTED;
return modeBinding === DISCONNECTED ? env1_9 : mode !== ActivityPanelModes.PIP ? mode === ActivityPanelModes.PIP ? env1_10 : env1_11 : env0_1 ? env1_9 : mode === ActivityPanelModes.PIP ? env1_10 : env1_11;
}
function BaseActivityPanelUI({renderActivityOrPIP, context, renderActivityPanelSystemUIManager}) { // fn#117485, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15566:467, offset: 0x024b4335, size: 227 bytes, params: 2, frame: 21
const binding = env0_3;
const useContext = binding.useContext;
const value3 = env0_3.useMemo(_fun117486, [Reflect.apply(useContext, binding, [context]).mode,
(importDefault(15390) /* metro dependency 15390: useIsConnectedToVoiceChannel */)()]);
const LayerScope = (require(6517) /* metro dependency 6517: LayerScopeNative */).LayerScope;
const value4 = renderActivityPanelSystemUIManager();
const TransitionGroup = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionGroup;
return (
<LayerScope>
{value4}
<TransitionGroup
items={value3}
renderItem={renderActivityOrPIP}
getItemKey={getKey_117483}
wrapChildren={wrapChildren_117484}
/>
</LayerScope>
);
}
}
function ActivityPanelUI() { // fn#117487, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15566:917, offset: 0x024b446d, size: 67 bytes, params: 1, frame: 15
return env0_3.useMemo(_fun117489, [env0_3.useCallback(_fun117488, [])]);
}
function ActivityPanelUI() { // fn#117487, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15566:917, offset: 0x024b446d, size: 67 bytes, params: 1, frame: 15
return ReactModule.useMemo(_fun117489, [ReactModule.useCallback(_fun117488, [])]);
function _fun117488() { // fn#117488, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15566:965, offset: 0x024b44b0, size: 39 bytes, params: 1, frame: 13
const value = environment.__proto__;
return ((Component) => <Component />)(ActivityPanelSystemUIManager);
}
function _fun117486() { // fn#117486, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15566:620, offset: 0x024b4418, size: 85 bytes, params: 1, frame: 4
const modeBinding = mode;
const DISCONNECTED = ActivityPanelModes.DISCONNECTED;
return modeBinding === DISCONNECTED ? env1_9 : mode !== ActivityPanelModes.PIP ? mode === ActivityPanelModes.PIP ? env1_10 : env1_11 : env0_1 ? env1_9 : mode === ActivityPanelModes.PIP ? env1_10 : env1_11;
}
function _fun117489() { // fn#117489, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15566:1006, offset: 0x024b44d7, size: 68 bytes, params: 1, frame: 15
return (
<BaseActivityPanelUI
renderActivityOrPIP={renderActivityOrPIP}
context={ActivityPanelStateContext}
renderActivityPanelSystemUIManager={env0_0}
/>
);
}
function _fun117488() { // fn#117488, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15566:965, offset: 0x024b44b0, size: 39 bytes, params: 1, frame: 13
const value = environment.__proto__;
return ((Component) => <Component />)(importDefault(15391) /* metro dependency 15391: ActivityPanelSystemUIManager */);
}
}
function _fun117489() { // fn#117489, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15566:1006, offset: 0x024b44d7, size: 68 bytes, params: 1, frame: 15
return (
<BaseActivityPanelUI
renderActivityOrPIP={renderActivityOrPIP}
context={importDefault(15368) /* metro dependency 15368: ActivityPanelStateContext */}
renderActivityPanelSystemUIManager={env0_0}
/>
);
}
global.__d(_fun117481, 15369, [31, 27, 8044, 33, 15370, 15376, 15390, 6517, 4508, 15391, 15368,
2]) /* metro module 15369, dependencies: [31, 27, 8044, 33, 15370, 15376, 15390, 6517, 4508, 15391, 15368, 2] */;
@@ -1,26 +1,33 @@
/* Metro module 15378; source: modules/activities/panel/native/BlurVisualEffectView.tsx; dependencies: [31, 27, 33, 4000, 697, 3860, 4564, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import VisualEffectView from '../../../visual_effect_view/native/VisualEffectView.tsx'; /* Metro dependency 4564 */
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 UseTokenModule from '../../../../design/tokens/native/useToken.tsx'; /* Metro dependency 3860 */
import * as ColorUtilsModule from '../../../../utils/ColorUtils.tsx'; /* Metro dependency 4000 */
function _fun117565(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117565, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15575:6, offset: 0x024b83bc, size: 231 bytes, params: 8, frame: 20
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 env0_4 = (require(33) /* metro dependency 33 */).jsx;
const colorUtilsModule = require(4000) /* metro dependency 4000: ColorUtils */;
const hexWithOpacity = colorUtilsModule.hexWithOpacity;
const BLACK = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BLACK;
const env0_5 = Reflect.apply(hexWithOpacity, colorUtilsModule, [BLACK, 0.24]);
let value = ReactModule;
const hexWithOpacity = ColorUtilsModule.hexWithOpacity;
const BLACK = (Native).unsafe_rawColors.BLACK;
const env0_5 = Reflect.apply(hexWithOpacity, ColorUtilsModule, [BLACK, 0.24]);
value = value.memo(_fun117566);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/panel/native/BlurVisualEffectView.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/activities/panel/native/BlurVisualEffectView.tsx');
exports.default = value;
function _fun117566() { // fn#117566, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15575:212, offset: 0x024b84a3, size: 161 bytes, params: 1, frame: 18
const useToken = UseTokenModule.useToken;
const VOICE_VIDEO_VIDEO_TILE_BLUR_FALLBACK = (Native).colors.VOICE_VIDEO_VIDEO_TILE_BLUR_FALLBACK;
return ((Component) => <Component style={StyleSheet.absoluteFill} blurStyle="default" blurTintRgba={(ColorUtilsModule).hexToRgbaString(env0_5)} android_fallbackColor={Reflect.apply(useToken,
UseTokenModule, [VOICE_VIDEO_VIDEO_TILE_BLUR_FALLBACK,
'dark'])} blurAmount={0.24} blurTheme="dark" />)(VisualEffectView);
}
}
function _fun117566() { // fn#117566, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15575:212, offset: 0x024b84a3, size: 161 bytes, params: 1, frame: 18
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
const useToken = useTokenModule.useToken;
const VOICE_VIDEO_VIDEO_TILE_BLUR_FALLBACK = (importDefault(697) /* metro dependency 697: native */).colors.VOICE_VIDEO_VIDEO_TILE_BLUR_FALLBACK;
return ((Component) => <Component style={StyleSheet.absoluteFill} blurStyle="default" blurTintRgba={(require(4000) /* metro dependency 4000: ColorUtils */).hexToRgbaString(env0_5)} android_fallbackColor={Reflect.apply(useToken,
useTokenModule, [VOICE_VIDEO_VIDEO_TILE_BLUR_FALLBACK,
'dark'])} blurAmount={0.24} blurTheme="dark" />)(importDefault(4564) /* metro dependency 4564: VisualEffectView */);
}
global.__d(_fun117565, 15378, [31, 27, 33, 4000, 697, 3860, 4564,
2]) /* metro module 15378, dependencies: [31, 27, 33, 4000, 697, 3860, 4564, 2] */;
@@ -1,44 +1,61 @@
/* Metro module 15379; source: modules/activities/panel/native/InviteActivityButton.tsx; dependencies: [31, 6877, 6876, 33, 4080, 15380, 1962, 566, 10259, 4578, 10858, 1244, 2] */
import SelfPresenceStore from '../../../../stores/SelfPresenceStore.tsx'; /* Metro dependency 6876 */
import LocalActivityStore from '../../../../stores/LocalActivityStore.tsx'; /* Metro dependency 6877 */
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 */
function _fun117567(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117567, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15576:6, offset: 0x024b8544, size: 180 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const localActivityStore = importDefault(6877) /* metro dependency 6877: LocalActivityStore */;
const selfPresenceStore = importDefault(6876) /* metro dependency 6876: SelfPresenceStore */;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
let value = ReactModule;
value = value.memo(InviteActivityButton);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/panel/native/InviteActivityButton.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/activities/panel/native/InviteActivityButton.tsx');
exports.default = value;
}
function InviteActivityButton({applicationId}) { // fn#117568, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15576:154, offset: 0x024b85f8, size: 304 bytes, params: 2, frame: 21
var r0;
var Button;
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
const useStateFromStores = FluxModule.useStateFromStores;
const items2 = [LocalActivityStore];
items2[1] = SelfPresenceStore;
if (Reflect.apply(useStateFromStores, FluxModule, [items2, function() {
return importDefault(dependencyMap[8])(LocalActivityStore, SelfPresenceStore, applicationId);
}, [applicationId]]) == null) {
r0 = null;
} else {
Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
r0 = (
<Button
onPress={onPress_117570}
icon={importDefault(10858) /* metro dependency 10858 */}
text={intl.string(t['OzOM/q'])}
accessibilityLabel={intl.string(t['OzOM/q'])}
variant="secondary-overlay"
size="sm"
shrink
maxFontSizeMultiplier={1}
/>
);
}
return r0;
function InviteActivityButtonOnPress() { // fn#117570, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15576:314, owner: InviteActivityButton.onPress, offset: 0x024b8759, size: 118 bytes, params: 1, frame: 18
const binding = env0_1;
let value = environment.__proto__;
const defaultImport = importDefault(dependencyMap[4]);
const openLazy = defaultImport.openLazy;
value = require(dependencyMap[6]);
value = value(dependencyMap[5], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport, [value, 'ActivityInviteSheet-' + binding.session_id, {activity: binding}]);
}
function InviteActivityButton({applicationId}) { // fn#117568, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15576:154, offset: 0x024b85f8, size: 304 bytes, params: 2, frame: 21
var r0;
var Button;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStores = fluxModule.useStateFromStores;
const items = [LocalActivityStore];
items[1] = SelfPresenceStore;
if (Reflect.apply(useStateFromStores, fluxModule, [items, function() {
return importDefault(dependencyMap[8])(LocalActivityStore, SelfPresenceStore, applicationId);
}, [applicationId]]) == null) {
r0 = null;
} else {
Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
r0 = <Button onPress={onPress_117570} icon={importDefault(10858) /* metro dependency 10858 */} text={intl.string(t['OzOM/q'])} accessibilityLabel={intl.string(t['OzOM/q'])} variant="secondary-overlay" size="sm" shrink maxFontSizeMultiplier={1} />;
}
return r0;
}
function InviteActivityButtonOnPress() { // fn#117570, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15576:314, owner: InviteActivityButton.onPress, offset: 0x024b8759, size: 118 bytes, params: 1, frame: 18
const binding = env0_1;
let value = environment.__proto__;
const defaultImport = importDefault(dependencyMap[4]);
const openLazy = defaultImport.openLazy;
value = require(dependencyMap[6]);
value = value(dependencyMap[5], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport, [value, 'ActivityInviteSheet-' + binding.session_id, {activity: binding}]);
}
global.__d(_fun117567, 15379, [31, 6877, 6876, 33, 4080, 15380, 1962, 566, 10259, 4578, 10858, 1244,
2]) /* metro module 15379, dependencies: [31, 6877, 6876, 33, 4080, 15380, 1962, 566, 10259, 4578, 10858, 1244, 2] */;
@@ -1,53 +1,60 @@
/* Metro module 15389; source: modules/activities/panel/native/LeaveActivityButton.tsx; dependencies: [31, 8044, 33, 4578, 10634, 1244, 8092, 2] */
import Module10634 from '../../../../by-id/module-10634.js'; /* Metro dependency 10634 */
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 ButtonNativeModule from '../../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as ActivityPanelConstantsModule from '../ActivityPanelConstants.tsx'; /* Metro dependency 8044 */
function _fun117661(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117661, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15586:6, offset: 0x024bd0bc, size: 187 bytes, params: 8, frame: 19
const env0_0 = require;
const closure = BaseLeaveActivityButton;
const BaseLeaveActivityButton2 = BaseLeaveActivityButton;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_3 = (require(8044) /* metro dependency 8044: ActivityPanelConstants */).ActivityPanelModes;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
let value = ReactModule;
value = value.memo(LeaveActivityButton_117663);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/panel/native/LeaveActivityButton.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/activities/panel/native/LeaveActivityButton.tsx');
exports.default = value;
exports.BaseLeaveActivityButton = closure;
}
exports.BaseLeaveActivityButton = BaseLeaveActivityButton2;
function BaseLeaveActivityButton({onPress}) { // fn#117662, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15586:149, offset: 0x024bd177, size: 201 bytes, params: 2, frame: 19
const Button = (ButtonNativeModule).Button;
const buttonProps = {onPress: onPress, icon: Module10634};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
buttonProps.text = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['Hi1/aQ']);
buttonProps.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.k0Aph0);
buttonProps.variant = 'destructive';
buttonProps.size = 'sm';
buttonProps.maxFontSizeMultiplier = 1;
return <Button {...buttonProps} />;
}
function BaseLeaveActivityButton({onPress}) { // fn#117662, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15586:149, offset: 0x024bd177, size: 201 bytes, params: 2, frame: 19
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
const buttonProps = {onPress: onPress, icon: importDefault(10634) /* metro dependency 10634 */};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
buttonProps.text = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['Hi1/aQ']);
buttonProps.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.k0Aph0);
buttonProps.variant = 'destructive';
buttonProps.size = 'sm';
buttonProps.maxFontSizeMultiplier = 1;
return <Button {...buttonProps} />;
}
function LeaveActivityButton_117663({selfEmbeddedActivity, setMode}) { // fn#117663, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15586:418, offset: 0x024bd240, size: 59 bytes, params: 2, frame: 13
return (
<BaseLeaveActivityButton
onPress={function() {
setMode(ActivityPanelModes.DISCONNECTED);
global.setTimeout(_fun117665, 400);
}}
/>
);
function LeaveActivityButton_117663OnPress() { // fn#117664, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15586:525, owner: LeaveActivityButton_117663.onPress, offset: 0x024bd27b, size: 58 bytes, params: 1, frame: 13
const setModeBinding = setMode;
const DISCONNECTED = ActivityPanelModes.DISCONNECTED;
setModeBinding(DISCONNECTED);
global.setTimeout(_fun117665, 400);
function _fun117665() { // fn#117665, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15586:560, offset: 0x024bd2b5, size: 97 bytes, params: 1, frame: 16
let value = environment.__proto__.__proto__;
value = undefined;
(importDefault(8092) /* metro dependency 8092: EmbeddedActivitiesNativeManager */).leaveActivity({location: selfEmbeddedActivity == null ? value : selfEmbeddedActivity.location,
applicationId: selfEmbeddedActivity == null ? value : selfEmbeddedActivity.applicationId});
return value;
}
function LeaveActivityButton_117663({selfEmbeddedActivity, setMode}) { // fn#117663, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15586:418, offset: 0x024bd240, size: 59 bytes, params: 2, frame: 13
return (
<BaseLeaveActivityButton
onPress={function() {
setMode(ActivityPanelModes.DISCONNECTED);
global.setTimeout(_fun117665, 400);
}}
/>
);
}
}
function LeaveActivityButton_117663OnPress() { // fn#117664, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15586:525, owner: LeaveActivityButton_117663.onPress, offset: 0x024bd27b, size: 58 bytes, params: 1, frame: 13
const setModeBinding = setMode;
const DISCONNECTED = ActivityPanelModes.DISCONNECTED;
setModeBinding(DISCONNECTED);
global.setTimeout(_fun117665, 400);
}
}
function _fun117665() { // fn#117665, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15586:560, offset: 0x024bd2b5, size: 97 bytes, params: 1, frame: 16
let value = environment.__proto__.__proto__;
value = undefined;
(importDefault(8092) /* metro dependency 8092: EmbeddedActivitiesNativeManager */).leaveActivity({location: selfEmbeddedActivity == null ? value : selfEmbeddedActivity.location,
applicationId: selfEmbeddedActivity == null ? value : selfEmbeddedActivity.applicationId});
return value;
}
global.__d(_fun117661, 15389, [31, 8044, 33, 4578, 10634, 1244, 8092,
2]) /* metro module 15389, dependencies: [31, 8044, 33, 4578, 10634, 1244, 8092, 2] */;
@@ -1,36 +1,74 @@
/* Metro module 15383; source: modules/activities/panel/native/MinimizeActivityButton.tsx; dependencies: [31, 27, 8044, 33, 4501, 4578, 8709, 1244, 8341, 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 CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as ActivityPanelConstantsModule from '../ActivityPanelConstants.tsx'; /* Metro dependency 8044 */
import * as IconButtonNativeModule from '../../../../design/components/Button/native/IconButton.native.tsx'; /* Metro dependency 8341 */
function _fun117596(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117596, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15580:6, offset: 0x024b9f5c, size: 235 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const env0_5 = (require(8044) /* metro dependency 8044: ActivityPanelConstants */).ActivityPanelModes;
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
const env0_7 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({buttonParent: {flexShrink: 1}});
let value = ReactModule;
const env0_7 = (CreateStylesModule).createStyles({buttonParent: {flexShrink: 1}});
value = value.memo(MinimizeActivityButton);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/panel/native/MinimizeActivityButton.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/activities/panel/native/MinimizeActivityButton.tsx');
exports.default = value;
}
function MinimizeActivityButton({activityName, setMode}) { // fn#117597, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15580:232, offset: 0x024ba047, size: 392 bytes, params: 2, frame: 23
var r0;
const IconButton = (require(8341) /* metro dependency 8341: IconButtonNative */).IconButton;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var Button;
const value2 = env0_3.useCallback(function() {
setMode(ActivityPanelModes.PIP);
}, [setMode]);
const styles = useStyles();
if (activityName === undefined) {
r0 = <IconButton icon={importDefault(8709) /* metro dependency 8709 */} accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.brPQ5U)} onPress={value2} size="sm" variant="secondary-overlay" maxFontSizeMultiplier={1} />;
} else if (activityName !== '') {
var viewBindingProps = {style: styles.buttonParent};
Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
r0 = <View {...viewBindingProps}><Button icon={importDefault(8709) /* metro dependency 8709 */} accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.brPQ5U)} onPress={value2} text={activityName} size="sm" variant="secondary-overlay" maxFontSizeMultiplier={1} shrink /></View>;
} else {
r0 = <IconButton icon={importDefault(8709) /* metro dependency 8709 */} accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.brPQ5U)} onPress={value2} size="sm" variant="secondary-overlay" maxFontSizeMultiplier={1} />;
function MinimizeActivityButton({activityName, setMode}) { // fn#117597, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15580:232, offset: 0x024ba047, size: 392 bytes, params: 2, frame: 23
var r0;
const IconButton = (IconButtonNativeModule).IconButton;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var Button;
const value2 = env0_3.useCallback(function() {
setMode(ActivityPanelModes.PIP);
}, [setMode]);
const styles = useStyles();
if (activityName === undefined) {
r0 = (
<IconButton
icon={importDefault(8709) /* metro dependency 8709 */}
accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.brPQ5U)}
onPress={value2}
size="sm"
variant="secondary-overlay"
maxFontSizeMultiplier={1}
/>
);
} else if (activityName !== '') {
var viewBindingProps = {style: styles.buttonParent};
Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
r0 = (
<View {...viewBindingProps}>
<Button
icon={importDefault(8709) /* metro dependency 8709 */}
accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.brPQ5U)}
onPress={value2}
text={activityName}
size="sm"
variant="secondary-overlay"
maxFontSizeMultiplier={1}
shrink
/>
</View>
);
} else {
r0 = (
<IconButton
icon={importDefault(8709) /* metro dependency 8709 */}
accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.brPQ5U)}
onPress={value2}
size="sm"
variant="secondary-overlay"
maxFontSizeMultiplier={1}
/>
);
}
return r0;
}
return r0;
}
global.__d(_fun117596, 15383, [31, 27, 8044, 33, 4501, 4578, 8709, 1244, 8341,
2]) /* metro module 15383, dependencies: [31, 27, 8044, 33, 4501, 4578, 8709, 1244, 8341, 2] */;
@@ -1,91 +1,96 @@
/* Metro module 15373; source: modules/activities/panel/native/pip/getActivityContainerPIPStylesSpec.tsx; dependencies: [4237, 8044, 11624, 2] */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 4237 */
import * as ActivityPanelConstantsModule from '../../ActivityPanelConstants.tsx'; /* Metro dependency 8044 */
function _fun117523(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117523, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15570:6, offset: 0x024b5c40, size: 211 bytes, params: 8, frame: 20
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const OrientationLockState = (require(4237) /* metro dependency 4237: Constants */).OrientationLockState;
const LANDSCAPE_ACTIVITY_ASPECT_RATIO = (require(8044) /* metro dependency 8044: ActivityPanelConstants */).LANDSCAPE_ACTIVITY_ASPECT_RATIO;
const closure = t_117524;
closure.__closure = {OrientationLockState: OrientationLockState,
const OrientationLockState = (ConstantsModule).OrientationLockState;
const LANDSCAPE_ACTIVITY_ASPECT_RATIO = (ActivityPanelConstantsModule).LANDSCAPE_ACTIVITY_ASPECT_RATIO;
const t_1175242 = t_117524;
t_1175242.__closure = {OrientationLockState: OrientationLockState,
LANDSCAPE_ACTIVITY_ASPECT_RATIO: LANDSCAPE_ACTIVITY_ASPECT_RATIO,
roundToNearestPixel: importDefault(11624) /* metro dependency 11624: roundToNearestPixel */};
closure.__workletHash = 7141745103186;
closure.__initData = {code: 'function getActivityContainerPipStylesSpec_getActivityContainerPIPStylesSpecTsx1({pipWidth:pipWidth,pipHeight:pipHeight,pipOrientationLockState:pipOrientationLockState,isLandscape:isLandscape}){const{OrientationLockState,LANDSCAPE_ACTIVITY_ASPECT_RATIO,roundToNearestPixel}=this.__closure;const nonNullPipOrientationLockState=pipOrientationLockState!==null&&pipOrientationLockState!==void 0?pipOrientationLockState:OrientationLockState.UNLOCKED;const shouldUsePortraitAspectRatio=nonNullPipOrientationLockState===OrientationLockState.PORTRAIT||nonNullPipOrientationLockState===OrientationLockState.UNLOCKED&&!isLandscape;let width=pipWidth;let height=pipHeight;let shouldHorizontallyCenter=false;let shouldVerticallyCenter=false;let marginLeft=0;let marginTop=0;if(shouldUsePortraitAspectRatio){width=pipWidth;height=width*LANDSCAPE_ACTIVITY_ASPECT_RATIO;shouldVerticallyCenter=true;marginTop=roundToNearestPixel(height/2)*-1;}else{height=pipHeight;width=height*LANDSCAPE_ACTIVITY_ASPECT_RATIO;shouldHorizontallyCenter=true;marginLeft=roundToNearestPixel(width/2)*-1;}return{width:width,height:height,shouldHorizontallyCenter:shouldHorizontallyCenter,shouldVerticallyCenter:shouldVerticallyCenter,marginLeft:marginLeft,marginTop:marginTop};}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/panel/native/pip/getActivityContainerPIPStylesSpec.tsx');
exports.default = closure;
}
function t_117524({pipWidth, pipHeight, pipOrientationLockState, isLandscape}) { // fn#117524, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15570:1430, offset: 0x024b5d13, size: 229 bytes, params: 2, frame: 20
var r1;
var r2;
var r4;
var r5;
var r6;
var value;
var value2;
var value3;
var value4;
var value6;
var value7;
var value8;
var value9;
let r3 = pipOrientationLockState ?? OrientationLockState.UNLOCKED;
const PORTRAIT = OrientationLockState.PORTRAIT;
if (r3 === PORTRAIT) {
value6 = pipWidth * LANDSCAPE_ACTIVITY_ASPECT_RATIO;
value = importDefault(11624) /* metro dependency 11624: roundToNearestPixel */;
value = value(value6 / 2);
value = -1 * value;
value7 = false;
value8 = true;
value9 = 0;
r1 = value;
r2 = value9;
r3 = value8;
r4 = value7;
r5 = value6;
r6 = pipWidth;
} else if (r3 !== OrientationLockState.UNLOCKED) {
value2 = pipHeight * LANDSCAPE_ACTIVITY_ASPECT_RATIO;
value = importDefault(11624) /* metro dependency 11624: roundToNearestPixel */;
value = value(value2 / 2);
value = -1 * value;
value3 = true;
value4 = false;
r1 = 0;
r2 = value;
r3 = value4;
r4 = value3;
r5 = pipHeight;
r6 = value2;
} else if (isLandscape) {
value2 = pipHeight * LANDSCAPE_ACTIVITY_ASPECT_RATIO;
value = importDefault(11624) /* metro dependency 11624: roundToNearestPixel */;
value = value(value2 / 2);
value = -1 * value;
value3 = true;
value4 = false;
r1 = 0;
r2 = value;
r3 = value4;
r4 = value3;
r5 = pipHeight;
r6 = value2;
} else {
value6 = pipWidth * LANDSCAPE_ACTIVITY_ASPECT_RATIO;
value = importDefault(11624) /* metro dependency 11624: roundToNearestPixel */;
value = value(value6 / 2);
value = -1 * value;
value7 = false;
value8 = true;
value9 = 0;
r1 = value;
r2 = value9;
r3 = value8;
r4 = value7;
r5 = value6;
r6 = pipWidth;
t_1175242.__workletHash = 7141745103186;
t_1175242.__initData = {code: 'function getActivityContainerPipStylesSpec_getActivityContainerPIPStylesSpecTsx1({pipWidth:pipWidth,pipHeight:pipHeight,pipOrientationLockState:pipOrientationLockState,isLandscape:isLandscape}){const{OrientationLockState,LANDSCAPE_ACTIVITY_ASPECT_RATIO,roundToNearestPixel}=this.__closure;const nonNullPipOrientationLockState=pipOrientationLockState!==null&&pipOrientationLockState!==void 0?pipOrientationLockState:OrientationLockState.UNLOCKED;const shouldUsePortraitAspectRatio=nonNullPipOrientationLockState===OrientationLockState.PORTRAIT||nonNullPipOrientationLockState===OrientationLockState.UNLOCKED&&!isLandscape;let width=pipWidth;let height=pipHeight;let shouldHorizontallyCenter=false;let shouldVerticallyCenter=false;let marginLeft=0;let marginTop=0;if(shouldUsePortraitAspectRatio){width=pipWidth;height=width*LANDSCAPE_ACTIVITY_ASPECT_RATIO;shouldVerticallyCenter=true;marginTop=roundToNearestPixel(height/2)*-1;}else{height=pipHeight;width=height*LANDSCAPE_ACTIVITY_ASPECT_RATIO;shouldHorizontallyCenter=true;marginLeft=roundToNearestPixel(width/2)*-1;}return{width:width,height:height,shouldHorizontallyCenter:shouldHorizontallyCenter,shouldVerticallyCenter:shouldVerticallyCenter,marginLeft:marginLeft,marginTop:marginTop};}'};
(FileImportTrackerModule).fileFinishedImporting('modules/activities/panel/native/pip/getActivityContainerPIPStylesSpec.tsx');
exports.default = t_1175242;
function t_117524({pipWidth, pipHeight, pipOrientationLockState, isLandscape}) { // fn#117524, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15570:1430, offset: 0x024b5d13, size: 229 bytes, params: 2, frame: 20
var r1;
var r2;
var r4;
var r5;
var r6;
var value;
var value2;
var value3;
var value4;
var value6;
var value7;
var value8;
var value9;
let r3 = pipOrientationLockState ?? OrientationLockState.UNLOCKED;
const PORTRAIT = OrientationLockState.PORTRAIT;
if (r3 === PORTRAIT) {
value6 = pipWidth * LANDSCAPE_ACTIVITY_ASPECT_RATIO;
value = importDefault(11624) /* metro dependency 11624: roundToNearestPixel */;
value = value(value6 / 2);
value = -1 * value;
value7 = false;
value8 = true;
value9 = 0;
r1 = value;
r2 = value9;
r3 = value8;
r4 = value7;
r5 = value6;
r6 = pipWidth;
} else if (r3 !== OrientationLockState.UNLOCKED) {
value2 = pipHeight * LANDSCAPE_ACTIVITY_ASPECT_RATIO;
value = importDefault(11624) /* metro dependency 11624: roundToNearestPixel */;
value = value(value2 / 2);
value = -1 * value;
value3 = true;
value4 = false;
r1 = 0;
r2 = value;
r3 = value4;
r4 = value3;
r5 = pipHeight;
r6 = value2;
} else if (isLandscape) {
value2 = pipHeight * LANDSCAPE_ACTIVITY_ASPECT_RATIO;
value = importDefault(11624) /* metro dependency 11624: roundToNearestPixel */;
value = value(value2 / 2);
value = -1 * value;
value3 = true;
value4 = false;
r1 = 0;
r2 = value;
r3 = value4;
r4 = value3;
r5 = pipHeight;
r6 = value2;
} else {
value6 = pipWidth * LANDSCAPE_ACTIVITY_ASPECT_RATIO;
value = importDefault(11624) /* metro dependency 11624: roundToNearestPixel */;
value = value(value6 / 2);
value = -1 * value;
value7 = false;
value8 = true;
value9 = 0;
r1 = value;
r2 = value9;
r3 = value8;
r4 = value7;
r5 = value6;
r6 = pipWidth;
}
return {width: r6, height: r5, shouldHorizontallyCenter: r4, shouldVerticallyCenter: r3, marginLeft: r2,
marginTop: r1};
}
return {width: r6, height: r5, shouldHorizontallyCenter: r4, shouldVerticallyCenter: r3, marginLeft: r2,
marginTop: r1};
}
global.__d(_fun117523, 15373, [4237, 8044, 11624, 2]) /* metro module 15373, dependencies: [4237, 8044, 11624, 2] */;
@@ -1,67 +1,72 @@
/* Metro module 15363; source: modules/activities/panel/native/pip/usePIPAvoidanceSpecs.tsx; dependencies: [4017, 15319, 15364, 7739, 15263, 15365, 11282, 2] */
import UseAnimatedKeyboardHeight from '../../../../keyboard/native/useAnimatedKeyboardHeight.tsx'; /* Metro dependency 15319 */
import UseScreenNameSharedValue from '../../../../panels/morphable/native/useScreenNameSharedValue.tsx'; /* Metro dependency 15364 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReanimatedRexportModule from '../../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as CheapWorkletShallowEqualModule from '../../../../reanimated/native/cheapWorkletShallowEqual.tsx'; /* Metro dependency 7739 */
function _fun117444(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117444, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15560:6, offset: 0x024b3354, size: 135 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object = {code: 'function usePIPAvoidanceSpecsTsx1(){const{keyboardHeight,safeArea,screenName}=this.__closure;return{keyboardHeight:keyboardHeight.get(),safeAreaBottom:safeArea.bottom,screenName:screenName.get()};}'};
object = {code: 'function usePIPAvoidanceSpecsTsx2(props,previous){const{cheapWorkletShallowEqual,getPIPBottomOffsetForPIPMode,getAdjustedBottomOffsets,updateSharedValueIfChanged,pipAvoidanceSpecs}=this.__closure;if(cheapWorkletShallowEqual(props,previous!==null&&previous!==void 0?previous:undefined))return;const{keyboardHeight:keyboardHeight,safeAreaBottom:safeAreaBottom,screenName:screenName}=props;const screenBottomOffset=getPIPBottomOffsetForPIPMode(screenName);const{bottomOffset:bottomOffset}=getAdjustedBottomOffsets({screenBottomOffset:screenBottomOffset,safeAreaBottom:safeAreaBottom,keyboardHeight:keyboardHeight});updateSharedValueIfChanged(pipAvoidanceSpecs,{top:0,bottom:bottomOffset});}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/panel/native/pip/usePIPAvoidanceSpecs.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/activities/panel/native/pip/usePIPAvoidanceSpecs.tsx');
exports.default = usePIPAvoidanceSpecs;
}
function usePIPAvoidanceSpecs(a0) { // fn#117445, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15560:1108, offset: 0x024b33db, size: 301 bytes, params: 2, frame: 23
const env0_0 = a0;
const value2 = (ReanimatedRexportModule).useSharedValue({'top': 0,
'bottom': 0});
const value3 = (UseAnimatedKeyboardHeight)();
const value4 = (UseScreenNameSharedValue)();
const env0_3 = value4;
const useAnimatedReaction = ReanimatedRexportModule.useAnimatedReaction;
const usePIPAvoidanceSpecsF2 = usePIPAvoidanceSpecsF;
usePIPAvoidanceSpecsF2.__closure = {keyboardHeight: value3, safeArea: a0, screenName: value4};
usePIPAvoidanceSpecsF2.__workletHash = 9790941132204;
usePIPAvoidanceSpecsF2.__initData = env0_3;
const usePIPAvoidanceSpecsN2 = usePIPAvoidanceSpecsN;
object = {};
object.cheapWorkletShallowEqual = (require(7739) /* metro dependency 7739: cheapWorkletShallowEqual */).cheapWorkletShallowEqual;
object.getPIPBottomOffsetForPIPMode = importDefault(15263) /* metro dependency 15263: getPIPBottomOffsetForPIPMode */;
object.getAdjustedBottomOffsets = importDefault(15365) /* metro dependency 15365: getAdjustedBottomOffsets */;
object.updateSharedValueIfChanged = importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */;
object.pipAvoidanceSpecs = value2;
usePIPAvoidanceSpecsN2.__closure = object;
usePIPAvoidanceSpecsN2.__workletHash = 643938425459;
usePIPAvoidanceSpecsN2.__initData = env0_4;
Reflect.apply(useAnimatedReaction, ReanimatedRexportModule, [usePIPAvoidanceSpecsF2, usePIPAvoidanceSpecsN2]);
return value2;
function usePIPAvoidanceSpecsF() { // fn#117446, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15560:1255, owner: usePIPAvoidanceSpecs.f, offset: 0x024b3508, size: 57 bytes, params: 1, frame: 11
const object = {};
object.keyboardHeight = env0_2.get();
object.safeAreaBottom = env0_0.bottom;
object.screenName = env0_3.get();
return object;
}
function usePIPAvoidanceSpecs(a0) { // fn#117445, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15560:1108, offset: 0x024b33db, size: 301 bytes, params: 2, frame: 23
var object2;
const env0_0 = a0;
const value2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue({'top': 0,
'bottom': 0});
const value3 = (importDefault(15319) /* metro dependency 15319: useAnimatedKeyboardHeight */)();
const value4 = (importDefault(15364) /* metro dependency 15364: useScreenNameSharedValue */)();
const env0_3 = value4;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedReaction = reanimatedRexportModule.useAnimatedReaction;
const closure = usePIPAvoidanceSpecsF;
closure.__closure = {keyboardHeight: value3, safeArea: a0, screenName: value4};
closure.__workletHash = 9790941132204;
closure.__initData = env0_3;
const closure2 = usePIPAvoidanceSpecsN;
object2 = {};
object2.cheapWorkletShallowEqual = (require(7739) /* metro dependency 7739: cheapWorkletShallowEqual */).cheapWorkletShallowEqual;
object2.getPIPBottomOffsetForPIPMode = importDefault(15263) /* metro dependency 15263: getPIPBottomOffsetForPIPMode */;
object2.getAdjustedBottomOffsets = importDefault(15365) /* metro dependency 15365: getAdjustedBottomOffsets */;
object2.updateSharedValueIfChanged = importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */;
object2.pipAvoidanceSpecs = value2;
closure2.__closure = object2;
closure2.__workletHash = 643938425459;
closure2.__initData = env0_4;
Reflect.apply(useAnimatedReaction, reanimatedRexportModule, [closure, closure2]);
return value2;
}
function usePIPAvoidanceSpecsN(a0, a1) { // fn#117447, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15560:1435, owner: usePIPAvoidanceSpecs.n, offset: 0x024b3541, size: 182 bytes, params: 3, frame: 17
var keyboardHeight;
var safeAreaBottom;
var bottomOffset;
let value = a1;
const value3 = undefined;
if (!CheapWorkletShallowEqualModule.cheapWorkletShallowEqual(a0, value ?? value3)) {
keyboardHeight = a0.keyboardHeight;
safeAreaBottom = a0.safeAreaBottom;
value = (importDefault(15263) /* metro dependency 15263: getPIPBottomOffsetForPIPMode */)(a0.screenName);
bottomOffset = (importDefault(15365) /* metro dependency 15365: getAdjustedBottomOffsets */)({screenBottomOffset: value,
safeAreaBottom: safeAreaBottom, keyboardHeight: keyboardHeight}).bottomOffset;
value = importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */;
value(env0_1, {top: 0, bottom: bottomOffset});
}
return value3;
}
function usePIPAvoidanceSpecsF() { // fn#117446, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15560:1255, owner: usePIPAvoidanceSpecs.f, offset: 0x024b3508, size: 57 bytes, params: 1, frame: 11
const object2 = {};
object2.keyboardHeight = env0_2.get();
object2.safeAreaBottom = env0_0.bottom;
object2.screenName = env0_3.get();
return object2;
}
function usePIPAvoidanceSpecsN(a0, a1) { // fn#117447, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15560:1435, owner: usePIPAvoidanceSpecs.n, offset: 0x024b3541, size: 182 bytes, params: 3, frame: 17
var keyboardHeight;
var safeAreaBottom;
var bottomOffset;
let value = a1;
const value3 = undefined;
const cheapWorkletShallowEqualModule = require(7739) /* metro dependency 7739: cheapWorkletShallowEqual */;
if (!cheapWorkletShallowEqualModule.cheapWorkletShallowEqual(a0, value ?? value3)) {
keyboardHeight = a0.keyboardHeight;
safeAreaBottom = a0.safeAreaBottom;
value = (importDefault(15263) /* metro dependency 15263: getPIPBottomOffsetForPIPMode */)(a0.screenName);
bottomOffset = (importDefault(15365) /* metro dependency 15365: getAdjustedBottomOffsets */)({screenBottomOffset: value,
safeAreaBottom: safeAreaBottom, keyboardHeight: keyboardHeight}).bottomOffset;
value = importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */;
value(env0_1, {top: 0, bottom: bottomOffset});
}
return value3;
}
global.__d(_fun117444, 15363, [4017, 15319, 15364, 7739, 15263, 15365, 11282,
2]) /* metro module 15363, dependencies: [4017, 15319, 15364, 7739, 15263, 15365, 11282, 2] */;
@@ -1,4 +1,10 @@
/* Metro module 15366; source: modules/activities/panel/native/useActivityWebViewLockManager.tsx; dependencies: [57, 31, 4017, 4508, 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 ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as TransitionGroupModule from '../../../../design/components/TransitionGroup/TransitionGroup.tsx'; /* Metro dependency 4508 */
function _fun117455(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117455, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15563:6, offset: 0x024b38a0, size: 168 bytes, params: 8, frame: 18
const env0_0 = require;
const _arrayLikeToArray_117458 = function(a0, a1) {
@@ -46,215 +52,227 @@ function _fun117455(global, require, importDefault, importAll, module, exports,
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(57) /* metro dependency 57 */;
const env0_3 = importAll(31) /* metro dependency 31 */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/panel/native/useActivityWebViewLockManager.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/activities/panel/native/useActivityWebViewLockManager.tsx');
exports.default = useActivityWebViewLockManager;
exports.useLockedWebView = useLockedWebView;
}
function _createForOfIteratorHelperLoose_117456(a0, a1) { // fn#117456, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15563:121, offset: 0x024b3948, 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_117456(a0, a1) { // fn#117456, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15563:121, offset: 0x024b3948, 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 _fun117457;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_117458(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 _fun117457;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_117458(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_117458(a0, value);
r6 = value;
} else {
r6 = value;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_117458(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
r5 = r6;
} else {
r5 = value;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun117457;
}
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 useActivityWebViewLockManager() { // fn#117459, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15563:1142, offset: 0x024b3abc, size: 34 bytes, params: 1, frame: 11
return env0_3.useState(function() {
var env0_3 = _fun117461;
var env0_4 = _fun117462;
var env0_1 = new global.Set();
var env0_2 = new global.Map();
return _fun117464;
})[0];
}
function useLockedWebView({transitionState, context}) { // fn#117470, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15563:1938, offset: 0x024b3d5b, size: 139 bytes, params: 2, frame: 17
const value2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(false);
const binding = env0_3;
const useContext = binding.useContext;
const useActivityWebViewLock = Reflect.apply(useContext, binding, [context]).useActivityWebViewLock;
const value = useActivityWebViewLock();
binding.useEffect(_fun117471, [value2, transitionState, value]);
return {shown: value2, renderWebView: value};
}
function _fun117460() { // fn#117460, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15563:1202, offset: 0x024b3ade, size: 95 bytes, params: 1, frame: 11
const Set = global.Set;
const set = new Set();
const Map = global.Map;
const map = new Map();
return _fun117464;
}
function _fun117471() { // fn#117471, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15563:2096, offset: 0x024b3de6, size: 91 bytes, params: 1, frame: 13
const transitionStateBinding = transitionState;
const TransitionStates = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates;
const YEETED = TransitionStates.YEETED;
if (transitionStateBinding === YEETED) {
env0_1.set(false);
} else if (env0_2) {
env0_1.set(true);
} else {
env0_1.set(false);
}
}
function getCanRender(a0) { // fn#117461, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15563:1233, offset: 0x024b3b3d, size: 68 bytes, params: 2, frame: 11
var r0;
var value;
const value2 = env0_1.size === 0;
if (value2) {
r0 = value2;
} else {
value = env0_1.values();
value = value.next();
value = value?.value === a0;
r0 = value;
}
return r0;
}
function queueRenderUpdate() { // fn#117462, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15563:1332, offset: 0x024b3b81, size: 57 bytes, params: 1, frame: 12
if (env0_0 == null) {
env0_0 = global.Promise.resolve().then(_fun117463);
}
}
function _fun117464() { // fn#117464, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15563:1615, offset: 0x024b3c48, size: 132 bytes, params: 1, frame: 17
var environment;
let value = environment.__proto__.__proto__;
const binding = env2_3;
const value2 = binding.useId();
value = env2_2(binding.useState(_fun117465), 2);
const property = value[0];
const property2 = value[1];
binding.useInsertionEffect(_fun117466, [value2]);
binding.useLayoutEffect(function() {
queueRenderUpdate();
return _fun117469;
}, [value2, property2]);
return property;
}
function _fun117463() { // fn#117463, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15563:1397, offset: 0x024b3bba, size: 142 bytes, params: 1, frame: 24
var r3;
var value5;
var value6;
var property;
var property2;
var canRender;
var callback;
var canRender2;
var binding;
var value8;
const value3 = _createForOfIteratorHelperLoose_117456(env1_2);
const value4 = value3();
let done = value4.done;
if (!done) {
r3 = value4;
while (true) {
value5 = r3.value;
value6 = env3_2(value5, 2);
property = value6[0];
property2 = value6[1];
canRender = property2.canRender;
callback = property2.callback;
canRender2 = getCanRender(property);
if (canRender2 !== canRender) {
binding = env1_2;
binding.set(property, {canRender: canRender2, callback: callback});
callback(canRender2);
if (r5) {
}
value8 = value3();
done = value8.done;
if (done) {
break;
}
r3 = value8;
continue;
return _fun117457;
}
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 _fun117457() { // fn#117457, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15563:692, 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 useActivityWebViewLockManager() { // fn#117459, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15563:1142, offset: 0x024b3abc, size: 34 bytes, params: 1, frame: 11
return ReactModule.useState(function() {
var env0_3 = _fun117461;
var env0_4 = _fun117462;
var env0_1 = new global.Set();
var env0_2 = new global.Map();
return _fun117464;
})[0];
function _fun117460() { // fn#117460, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15563:1202, offset: 0x024b3ade, size: 95 bytes, params: 1, frame: 11
const Set = global.Set;
const set = new Set();
const Map = global.Map;
const map = new Map();
return _fun117464;
function getCanRender(a0) { // fn#117461, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15563:1233, offset: 0x024b3b3d, size: 68 bytes, params: 2, frame: 11
var r0;
var value;
const value2 = env0_1.size === 0;
if (value2) {
r0 = value2;
} else {
value = env0_1.values();
value = value.next();
value = value?.value === a0;
r0 = value;
}
return r0;
}
function queueRenderUpdate() { // fn#117462, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15563:1332, offset: 0x024b3b81, size: 57 bytes, params: 1, frame: 12
if (env0_0 == null) {
env0_0 = global.Promise.resolve().then(_fun117463);
}
function _fun117463() { // fn#117463, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15563:1397, offset: 0x024b3bba, size: 142 bytes, params: 1, frame: 24
var r3;
var value5;
var value6;
var property;
var property2;
var canRender;
var callback;
var canRender2;
var binding;
var value8;
const value3 = _createForOfIteratorHelperLoose_117456(env1_2);
const value4 = value3();
let done = value4.done;
if (!done) {
r3 = value4;
while (true) {
value5 = r3.value;
value6 = env3_2(value5, 2);
property = value6[0];
property2 = value6[1];
canRender = property2.canRender;
callback = property2.callback;
canRender2 = getCanRender(property);
if (canRender2 !== canRender) {
binding = env1_2;
binding.set(property, {canRender: canRender2, callback: callback});
callback(canRender2);
}
value8 = value3();
done = value8.done;
if (done) {
break;
}
r3 = value8;
continue;
}
}
}
}
function _fun117464() { // fn#117464, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15563:1615, offset: 0x024b3c48, size: 132 bytes, params: 1, frame: 17
var environment;
let value = environment.__proto__.__proto__;
const binding = env2_3;
const value2 = binding.useId();
value = env2_2(binding.useState(_fun117465), 2);
const property = value[0];
const property2 = value[1];
binding.useInsertionEffect(_fun117466, [value2]);
binding.useLayoutEffect(function() {
queueRenderUpdate();
return _fun117469;
}, [value2, property2]);
return property;
function _fun117465() { // fn#117465, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15563:1656, offset: 0x00e6dcc9, size: 23 bytes, params: 1, frame: 11
return getCanRender(env0_0);
}
function _fun117466() { // fn#117466, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15563:1730, offset: 0x024b3ccc, size: 77 bytes, params: 1, frame: 15
let binding = env1_1;
const add = binding.add;
const binding2 = env0_0;
Reflect.apply(add, binding, [binding2]);
binding = env1_2;
const set = binding.set;
const object = {callback: env0_1};
object.canRender = getCanRender(binding2);
Reflect.apply(set, binding, [binding2, object]);
return _fun117467;
function _fun117467() { // fn#117467, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15563:1792, offset: 0x024b3d19, size: 42 bytes, params: 1, frame: 12
const binding = env2_1;
const binding2 = env1_0;
binding.delete(binding2);
env2_2.delete(binding2);
}
}
function _fun117468() { // fn#117468, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15563:1848, offset: 0x024b3d43, size: 24 bytes, params: 1, frame: 9
queueRenderUpdate();
return function() {
queueRenderUpdate();
};
function _fun117469() { // fn#117469, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15563:1873, offset: 0x02031bc1, size: 15 bytes, params: 1, frame: 9
queueRenderUpdate();
}
}
}
}
}
function useLockedWebView({transitionState, context}) { // fn#117470, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15563:1938, offset: 0x024b3d5b, size: 139 bytes, params: 2, frame: 17
const value2 = (ReanimatedRexportModule).useSharedValue(false);
const useContext = ReactModule.useContext;
const useActivityWebViewLock = Reflect.apply(useContext, ReactModule, [context]).useActivityWebViewLock;
const value = useActivityWebViewLock();
ReactModule.useEffect(_fun117471, [value2, transitionState, value]);
return {shown: value2, renderWebView: value};
function _fun117471() { // fn#117471, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15563:2096, offset: 0x024b3de6, size: 91 bytes, params: 1, frame: 13
const transitionStateBinding = transitionState;
const TransitionStates = (TransitionGroupModule).TransitionStates;
const YEETED = TransitionStates.YEETED;
if (transitionStateBinding === YEETED) {
env0_1.set(false);
} else if (Module00057) {
env0_1.set(true);
} else {
env0_1.set(false);
}
}
}
}
function _fun117466() { // fn#117466, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15563:1730, offset: 0x024b3ccc, size: 77 bytes, params: 1, frame: 15
let binding = env1_1;
const add = binding.add;
const binding2 = env0_0;
Reflect.apply(add, binding, [binding2]);
binding = env1_2;
const set = binding.set;
const object2 = {callback: env0_1};
object2.canRender = getCanRender(binding2);
Reflect.apply(set, binding, [binding2, object2]);
return _fun117467;
}
function _fun117468() { // fn#117468, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15563:1848, offset: 0x024b3d43, size: 24 bytes, params: 1, frame: 9
queueRenderUpdate();
return function() {
queueRenderUpdate();
};
}
function _fun117467() { // fn#117467, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15563:1792, offset: 0x024b3d19, size: 42 bytes, params: 1, frame: 12
const binding = env2_1;
const binding2 = env1_0;
binding.delete(binding2);
env2_2.delete(binding2);
}
global.__d(_fun117455, 15366, [57, 31, 4017, 4508,
2]) /* metro module 15366, dependencies: [57, 31, 4017, 4508, 2] */;
@@ -1,29 +1,35 @@
/* Metro module 15361; source: modules/activities/panel/native/utils/ActivityPanelUtils.tsx; dependencies: [1378, 8044, 566, 3774, 8102, 2] */
import EmbeddedActivitiesStore from '../../../EmbeddedActivitiesStore.tsx'; /* Metro dependency 1378 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as FluxModule from '../../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as EmbeddedActivityLocationUtilsModule from '../../../utils/embeddedActivityLocationUtils.tsx'; /* Metro dependency 3774 */
import * as ActivityPanelConstantsModule from '../../ActivityPanelConstants.tsx'; /* Metro dependency 8044 */
function _fun117439(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117439, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15558:6, offset: 0x024b30dd, size: 140 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const embeddedActivitiesStore = importDefault(1378) /* metro dependency 1378: EmbeddedActivitiesStore */;
const env0_4 = (require(8044) /* metro dependency 8044: ActivityPanelConstants */).ActivityPanelModes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/panel/native/utils/ActivityPanelUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/activities/panel/native/utils/ActivityPanelUtils.tsx');
exports.useIsActivityPanelFullscreen = function() {
return require(dependencyMap[2]).useStateFromStores([EmbeddedActivitiesStore], _fun117441);
};
function useIsActivityPanelFullscreen() { // fn#117440, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15558:260, offset: 0x024b3169, size: 59 bytes, params: 1, frame: 13
return (FluxModule).useStateFromStores([EmbeddedActivitiesStore], _fun117441);
function _fun117441() { // fn#117441, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15558:339, offset: 0x024b31a4, size: 107 bytes, params: 1, frame: 14
const value = environment.__proto__;
const getEmbeddedActivityLocationChannelId = EmbeddedActivityLocationUtilsModule.getEmbeddedActivityLocationChannelId;
const embeddedActivitiesStoreBinding = EmbeddedActivitiesStore;
const getConnectedActivityLocation = embeddedActivitiesStoreBinding.getConnectedActivityLocation;
const value2 = Reflect.apply(getEmbeddedActivityLocationChannelId, EmbeddedActivityLocationUtilsModule,
[Reflect.apply(getConnectedActivityLocation, embeddedActivitiesStoreBinding, [])]);
const activityPanelMode = embeddedActivitiesStoreBinding.getActivityPanelMode();
const PANEL = ActivityPanelModes.PANEL;
return activityPanelMode === PANEL && !(importDefault(8102) /* metro dependency 8102: isVoiceEmbeddedActivity */)(value2);
}
}
}
function useIsActivityPanelFullscreen() { // fn#117440, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15558:260, offset: 0x024b3169, size: 59 bytes, params: 1, frame: 13
return (require(566) /* metro dependency 566: flux */).useStateFromStores([EmbeddedActivitiesStore], _fun117441);
}
function _fun117441() { // fn#117441, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15558:339, offset: 0x024b31a4, size: 107 bytes, params: 1, frame: 14
const value = environment.__proto__;
const embeddedActivityLocationUtilsModule = require(3774) /* metro dependency 3774: embeddedActivityLocationUtils */;
const getEmbeddedActivityLocationChannelId = embeddedActivityLocationUtilsModule.getEmbeddedActivityLocationChannelId;
const getConnectedActivityLocation = EmbeddedActivitiesStore.getConnectedActivityLocation;
const value2 = Reflect.apply(getEmbeddedActivityLocationChannelId, embeddedActivityLocationUtilsModule,
[Reflect.apply(getConnectedActivityLocation, EmbeddedActivitiesStore, [])]);
const activityPanelMode = EmbeddedActivitiesStore.getActivityPanelMode();
const PANEL = ActivityPanelModes.PANEL;
return activityPanelMode === PANEL && !(importDefault(8102) /* metro dependency 8102: isVoiceEmbeddedActivity */)(value2);
}
global.__d(_fun117439, 15361, [1378, 8044, 566, 3774, 8102,
2]) /* metro module 15361, dependencies: [1378, 8044, 566, 3774, 8102, 2] */;