Initial commit

This commit is contained in:
janisslsm committed 2026-07-27 16:20:00 +03:00
commit af3b49f756
16065 files changed
+2938410

No files matched your search

@@ -0,0 +1,44 @@
/* Metro module 14811; source: modules/notification_center/native/ForYouEmptyState.tsx; dependencies: [31, 27, 33, 4501, 5473, 4573, 1244, 2] */
function _fun111773(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111773, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15008:6, offset: 0x023b186c, size: 254 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_2 = (require(27) /* metro dependency 27 */).View;
const value = require(33) /* metro dependency 33 */;
const env0_3 = value.jsx;
const env0_4 = value.jsxs;
const env0_5 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({image: {marginBottom: 16},
container: {'paddingHorizontal': 48, 'alignItems': 'center', 'justifyContent': 'center'},
headerText: {'fontSize': 18, 'marginTop': 16, 'marginBottom': 8}, text: {textAlign: 'center'}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notification_center/native/ForYouEmptyState.tsx');
exports.ForYouEmptyState = ForYouEmptyState;
}
function ForYouEmptyState({height}) { // fn#111774, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15008:460, offset: 0x023b196a, size: 371 bytes, params: 2, frame: 25
const styles = useStyles();
const items4 = [styles.container];
items4[1] = {height: height};
const MailboxSpotIllustration = (require(5473) /* metro dependency 5473: native */).MailboxSpotIllustration;
const items2 = [<View style={styles.image}><MailboxSpotIllustration scale={0.75} /></View>];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
let text = styles.text;
const items3 = [text];
items3[1] = styles.headerText;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const MwjTvn = (require(1244) /* metro dependency 1244: indexNative */).t.MwjTvn;
items2[1] = <Text accessibilityRole="header" color="mobile-text-heading-primary" variant="heading-md/bold" style={items3}>{Reflect.apply(string,
intl, [MwjTvn])}</Text>;
text = styles.text;
string = intl.string;
const AKBgPy = (require(1244) /* metro dependency 1244: indexNative */).t.AKBgPy;
items2[2] = <Text color="text-default" variant="text-md/medium" style={text}>{Reflect.apply(string, intl,
[AKBgPy])}</Text>;
return (
<View style={items4}>
{items2}
</View>
);
}
@@ -0,0 +1,15 @@
/* Metro module 14800; source: modules/notification_center/native/ForYouHoistedItemsHeader.tsx; dependencies: [31, 27, 33, 4501, 697, 2] */
function _fun111722(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111722, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14997:6, offset: 0x023aea4d, size: 207 bytes, params: 8, frame: 21
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_0 = (require(27) /* metro dependency 27 */).View;
const env0_1 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
const env0_2 = Reflect.apply(createStyles, createStylesModule, [{container: {marginTop: PX_16}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notification_center/native/ForYouHoistedItemsHeader.tsx');
exports.ForYouHoistedItemsHeader = ForYouHoistedItemsHeader;
}
@@ -0,0 +1,836 @@
/* Metro module 14786; source: modules/notification_center/native/ForYouItemActionButtons.tsx; dependencies: [5, 31, 27, 1379, 1878, 661, 33, 4501, 1239, 4017, 4504, 4572, 4578, 1244, 4573, 632, 8228, 14478, 4093, 4254, 8800, 4624, 4603, 8783, 3857, 11004, 683, 2] */
function _fun111666(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111666, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14983:6, offset: 0x023aaf19, size: 507 bytes, params: 8, frame: 20
let env0_0 = require;
const focusChatInput = function(a0) {
var value = undefined;
var env0_0 = a0 != null ? {channelId: a0} : value;
global.setTimeout(_fun111668, 0);
return value;
};
const closure = IncomingFriendRequestActions;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
let value = require(661) /* metro dependency 661: Constants */;
const env0_8 = value.AnalyticEvents;
const env0_9 = value.ComponentActions;
const env0_10 = value.EMPTY_STRING_SNOWFLAKE_ID;
const env0_11 = value.MessageTypes;
value = require(33) /* metro dependency 33 */;
const env0_12 = value.jsx;
const env0_13 = value.jsxs;
const env0_14 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({buttonsContainer: {'flexDirection': 'row',
'marginTop': 8}, actionButtonsContainer: {'flexDirection': 'row', 'position': 'absolute', 'left': 0}});
object = {ACCEPT: 'accept', IGNORE: 'ignore', WAVE: 'wave', ACTION: 'action'};
object = {code: "function ForYouItemActionButtonsTsx1(){const{withTiming,pressed}=this.__closure;return{opacity:withTiming(!pressed.get()?1:0,{duration:150}),pointerEvents:!pressed.get()?'auto':'none'};}"};
object = {code: "function ForYouItemActionButtonsTsx2(){const{pressed,acceptButtonWidth,buttonWidth,withTiming}=this.__closure;const scaleX=!pressed.get()?acceptButtonWidth.get()/buttonWidth.get():1;const scaledWidth=buttonWidth.get()-buttonWidth.get()*scaleX;const translateX=!pressed.get()?-scaledWidth/2:0;return{transform:[{scaleX:withTiming(scaleX)},{translateX:withTiming(translateX)}],opacity:withTiming(!pressed.get()?0:1),pointerEvents:!pressed.get()?'none':'auto'};}"};
object = {code: 'function ForYouItemActionButtonsTsx3(){const{waveWidth,waveHeight}=this.__closure;return{transform:[{translateX:waveWidth.get()/2},{translateY:waveHeight.get()/2}]};}'};
object = {code: "function ForYouItemActionButtonsTsx4(){const{withDelay,withRepeat,withTiming,pressed,Easing,waveWidth,waveHeight}=this.__closure;return{transform:[{rotateZ:withDelay(450,withRepeat(withTiming(pressed.get()?'8deg':'-2deg',{duration:150,easing:Easing.inOut(Easing.quad)}),4,true))},{translateX:-waveWidth.get()/2},{translateY:-waveHeight.get()/2}]};}"};
object = {code: "function ForYouItemActionButtonsTsx5(){const{pressed}=this.__closure;return{pointerEvents:!pressed.get()?'none':'none'};}"};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notification_center/native/ForYouItemActionButtons.tsx');
exports.IncomingFriendRequestActions = closure;
exports.useItemActionButtonPropsV2 = useItemActionButtonPropsV2;
exports.ForYouItemActionButtons = ForYouItemActionButtons;
}
function focusChatInput(a0) { // fn#111667, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14983:523, offset: 0x023ab114, size: 56 bytes, params: 2, frame: 14
const value = undefined;
const env0_0 = a0 != null ? {channelId: a0} : value;
global.setTimeout(_fun111668, 0);
return value;
}
function IncomingFriendRequestActions({onAccept, onIgnore, onWavePress, pressed, compactMode}) { // fn#111669, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14983:2004, offset: 0x023ab189, size: 1358 bytes, params: 2, frame: 43
const styles = useStyles();
const value2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
const value3 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(-1);
const value4 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(-1);
const value5 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(-1);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
let useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
let closure = IncomingFriendRequestActionsU;
let object2 = {};
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
object2.pressed = pressed;
closure.__closure = object2;
closure.__workletHash = 100815030677;
closure.__initData = env0_16;
const value6 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const moduleValue6 = reanimatedRexportModule;
useAnimatedStyle = moduleValue6.useAnimatedStyle;
closure = IncomingFriendRequestActions_;
object2 = {pressed: pressed, acceptButtonWidth: value2, buttonWidth: value3};
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
closure.__closure = object2;
closure.__workletHash = 12358515723480;
closure.__initData = env0_17;
const value7 = Reflect.apply(useAnimatedStyle, moduleValue6, [closure]);
const moduleValue7 = reanimatedRexportModule;
useAnimatedStyle = moduleValue7.useAnimatedStyle;
closure = IncomingFriendRequestActionsE;
closure.__closure = {waveWidth: value4, waveHeight: value5};
closure.__workletHash = 667441788226;
closure.__initData = env0_18;
const value8 = Reflect.apply(useAnimatedStyle, moduleValue7, [closure]);
const moduleValue8 = reanimatedRexportModule;
useAnimatedStyle = moduleValue8.useAnimatedStyle;
closure = IncomingFriendRequestActionsI;
object2 = {withDelay: reanimatedRexportModule.withDelay, withRepeat: reanimatedRexportModule.withRepeat,
withTiming: (require(4504) /* metro dependency 4504: timing */).withTiming, pressed: pressed};
const Easing = reanimatedRexportModule.Easing;
object2.Easing = Easing;
object2.waveWidth = value4;
object2.waveHeight = value5;
closure.__closure = object2;
closure.__workletHash = 498167545082;
closure.__initData = env0_19;
const value9 = Reflect.apply(useAnimatedStyle, moduleValue8, [closure]);
const moduleValue9 = reanimatedRexportModule;
const useAnimatedProps = moduleValue9.useAnimatedProps;
closure = function() {
pressed.get();
return {pointerEvents: 'none'};
};
closure.__closure = {pressed: pressed};
closure.__workletHash = 3473531476662;
closure.__initData = env0_20;
const value10 = Reflect.apply(useAnimatedProps, moduleValue9, [closure]);
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const items2 = [styles.actionButtonsContainer, value6];
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const object3 = {onLayout: onLayout_111675};
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const zf5jU5 = (require(1244) /* metro dependency 1244: indexNative */).t.zf5jU5;
const value11 = 'md';
const view = <View {...object3}><Button text={Reflect.apply(string, intl,
[zf5jU5])} variant="primary" size={compactMode ? 'sm' : value11} onPress={onAccept} key="accept_friend_request" /></View>;
string = intl.string;
const EBN847 = (require(1244) /* metro dependency 1244: indexNative */).t.EBN847;
const view2 = <View2 style={items2}><Stack direction="horizontal" spacing={8}>{view}<Button text={Reflect.apply(string,
intl,
[EBN847])} variant="secondary" size={compactMode ? 'sm' : value11} onPress={onIgnore} key="ignore_friend_request" /></Stack></View2>;
const View3 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const view3Props = {style: value7, onLayout: onLayout_111676, ...value10};
const buttonProps = {variant: 'secondary',
text: intl.string((require(1244) /* metro dependency 1244: indexNative */).t.n8nU4W)};
const View4 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const View5 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const object5 = {style: value9, onLayout: onLayout_111677};
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
buttonProps.icon = <View4 style={value8} accessibilityElementsHidden importantForAccessibility="no-hide-descendants"><View5 {...object5}><Text maxFontSizeMultiplier={2} variant="text-sm/normal">{'👋'}</Text></View5></View4>;
buttonProps.size = compactMode ? 'sm' : value11;
buttonProps.onPress = onWavePress;
return (
<View>
{view2}
<View3 {...view3Props}>
<Button {...buttonProps} />
</View3>
</View>
);
}
function useItemActionButtonPropsV2(a0, a1, a2, a3, a4, a5, a6, a7) { // fn#111678, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14983:4915, offset: 0x023aba6d, size: 3422 bytes, params: 9, frame: 37
var r14;
var r15;
var r2;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var k0Q31F;
var vBq3iT;
var item_enum;
var value16;
var value17;
var value18;
var value19;
var value20;
var value21;
var value22;
var value23;
var hRKdcn;
var object2;
var object3;
var object4;
var object5;
var object6;
var object7;
var object8;
var object9;
var object18;
var items17;
var object22;
var object23;
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const env0_3 = a3;
const env0_4 = a5;
const env0_5 = a6;
const other_user = a0.other_user;
const value = null;
const value2 = undefined;
const id = value == other_user ? value2 : other_user.id;
const r6 = value != id ? id : EMPTY_STRING_SNOWFLAKE_ID;
const channel = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([ChannelStore],
_fun111679);
const canReplyToMessageModule = require(8228) /* metro dependency 8228: canReplyToMessage */;
const useCanReplyToMessage = canReplyToMessageModule.useCanReplyToMessage;
let message = a0.message;
const value5 = Reflect.apply(useCanReplyToMessage, canReplyToMessageModule, [channel, message]);
message = a0.message;
const type = value == message ? value2 : message.type;
const POLL_RESULT = MessageTypes.POLL_RESULT;
let binding = env0_4;
let useCallback = binding.useCallback;
const value6 = Reflect.apply(useCallback, binding, [_fun111680, [r6, a5, a0]]);
const value7 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(false);
const value8 = binding.useCallback(_fun111681, [a3, value7, a0, r6, a6]);
const value9 = binding.useCallback(_fun111683, [a0.applicationId, a0.type, r6]);
const value10 = binding.useCallback(function() {
if (importDefault != null) {
importDefault.navigate('friends', {screen: 'requests'});
}
}, [a2]);
const value11 = binding.useCallback(_fun111685, [r6]);
const value12 = binding.useCallback(_fun111687, [r6]);
const value14 = binding.useCallback(env0_3(_fun111689), [a1, channel, a0.message_id, a0.message_channel_id]);
useCallback = binding.useCallback;
object = [a1];
object[1] = a0.message_channel_id;
const value15 = Reflect.apply(useCallback, binding, [_fun111690, object]);
if (a0.disable_action) {
return {actionButtons: []};
}
const type3 = a0.type;
const NotificationCenterLocalItems = (require(4624) /* metro dependency 4624: NotificationCenterItemsTypes */).NotificationCenterLocalItems;
const INCOMING_FRIEND_REQUESTS = NotificationCenterLocalItems.INCOMING_FRIEND_REQUESTS;
if (type3 === INCOMING_FRIEND_REQUESTS) {
object = {};
object.actionsNode = <IncomingFriendRequestActions onWavePress={value6} onAccept={value8} onIgnore={value9} pressed={value7} compactMode={a7} />;
if (a0.type === (require(4624) /* metro dependency 4624: NotificationCenterItemsTypes */).NotificationCenterLocalItems.INCOMING_FRIEND_REQUESTS_ACCEPTED) {
object23 = {};
object23.name = env0_15.WAVE;
object23.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.n8nU4W);
r2 = [object23];
} else {
object18 = {};
binding = env0_15;
object18.name = binding.ACCEPT;
object18.label = intl.string(t.zf5jU5);
items17 = [object18];
object22 = {};
object22.name = binding.IGNORE;
object22.label = intl.string(t.EBN847);
items17[1] = object22;
r2 = items17;
}
object.accessibilityActions = r2;
object.onAccessibilityAction = onAccessibilityAction_111691;
return object;
}
const type4 = a0.type;
let INCOMING_FRIEND_REQUESTS_ACCEPTED = NotificationCenterLocalItems.INCOMING_FRIEND_REQUESTS_ACCEPTED;
if (type4 === INCOMING_FRIEND_REQUESTS_ACCEPTED) {
if (a4(a0)) {
object = {};
object.actionsNode = <IncomingFriendRequestActions onWavePress={value6} onAccept={value8} onIgnore={value9} pressed={value7} compactMode={a7} />;
if (a0.type === (require(4624) /* metro dependency 4624: NotificationCenterItemsTypes */).NotificationCenterLocalItems.INCOMING_FRIEND_REQUESTS_ACCEPTED) {
object23 = {};
object23.name = env0_15.WAVE;
object23.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.n8nU4W);
r2 = [object23];
} else {
object18 = {};
binding = env0_15;
object18.name = binding.ACCEPT;
object18.label = intl.string(t.zf5jU5);
items17 = [object18];
object22 = {};
object22.name = binding.IGNORE;
object22.label = intl.string(t.EBN847);
items17[1] = object22;
r2 = items17;
}
object.accessibilityActions = r2;
object.onAccessibilityAction = onAccessibilityAction_111691;
return object;
}
}
const type5 = a0.type;
const INCOMING_GAME_FRIEND_REQUESTS = NotificationCenterLocalItems.INCOMING_GAME_FRIEND_REQUESTS;
if (type5 === INCOMING_GAME_FRIEND_REQUESTS) {
object = {};
object.actionsNode = <IncomingFriendRequestActions onWavePress={value6} onAccept={value8} onIgnore={value9} pressed={value7} compactMode={a7} />;
if (a0.type === (require(4624) /* metro dependency 4624: NotificationCenterItemsTypes */).NotificationCenterLocalItems.INCOMING_FRIEND_REQUESTS_ACCEPTED) {
object23 = {};
object23.name = env0_15.WAVE;
object23.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.n8nU4W);
r2 = [object23];
} else {
object18 = {};
binding = env0_15;
object18.name = binding.ACCEPT;
object18.label = intl.string(t.zf5jU5);
items17 = [object18];
object22 = {};
object22.name = binding.IGNORE;
object22.label = intl.string(t.EBN847);
items17[1] = object22;
r2 = items17;
}
object.accessibilityActions = r2;
object.onAccessibilityAction = onAccessibilityAction_111691;
return object;
}
const type6 = a0.type;
const INCOMING_GAME_FRIEND_REQUESTS_ACCEPTED = NotificationCenterLocalItems.INCOMING_GAME_FRIEND_REQUESTS_ACCEPTED;
if (type6 === INCOMING_GAME_FRIEND_REQUESTS_ACCEPTED) {
if (a4(a0)) {
object = {};
object.actionsNode = <IncomingFriendRequestActions onWavePress={value6} onAccept={value8} onIgnore={value9} pressed={value7} compactMode={a7} />;
if (a0.type === (require(4624) /* metro dependency 4624: NotificationCenterItemsTypes */).NotificationCenterLocalItems.INCOMING_FRIEND_REQUESTS_ACCEPTED) {
object23 = {};
object23.name = env0_15.WAVE;
object23.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.n8nU4W);
r2 = [object23];
} else {
object18 = {};
binding = env0_15;
object18.name = binding.ACCEPT;
object18.label = intl.string(t.zf5jU5);
items17 = [object18];
object22 = {};
object22.name = binding.IGNORE;
object22.label = intl.string(t.EBN847);
items17[1] = object22;
r2 = items17;
}
object.accessibilityActions = r2;
object.onAccessibilityAction = onAccessibilityAction_111691;
return object;
}
}
const type7 = a0.type;
const FRIEND_REQUESTS_GROUPED = NotificationCenterLocalItems.FRIEND_REQUESTS_GROUPED;
if (type7 === FRIEND_REQUESTS_GROUPED) {
object = {};
object8 = {'id': 'view_friend_requests', 'text': null, 'variant': 'secondary', 'size': 'md'};
object8.text = intl.string(t['lMR96+']);
object8.onPress = value10;
object.actionButtons = [object8];
object9 = {};
object9.name = env0_15.ACTION;
object9.label = intl.string(t['lMR96+']);
object.accessibilityActions = [object9];
object.onAccessibilityAction = value10;
return object;
}
const type8 = a0.type;
const NotificationCenterItems = (require(4624) /* metro dependency 4624: NotificationCenterItemsTypes */).NotificationCenterItems;
const GO_LIVE_PUSH = NotificationCenterItems.GO_LIVE_PUSH;
if (type8 === GO_LIVE_PUSH) {
object = {};
object6 = {'id': 'join_stream', 'text': null, 'variant': 'secondary', 'size': 'md'};
object6.text = intl.string(t['Pqj7h+']);
object6.onPress = a1;
object.actionButtons = [object6];
object7 = {};
object7.name = env0_15.ACTION;
object7.label = intl.string(t['Pqj7h+']);
object.accessibilityActions = [object7];
object.onAccessibilityAction = a1;
return object;
}
const type9 = a0.type;
INCOMING_FRIEND_REQUESTS_ACCEPTED = NotificationCenterLocalItems.INCOMING_FRIEND_REQUESTS_ACCEPTED;
if (type9 === INCOMING_FRIEND_REQUESTS_ACCEPTED) {
object = {};
object4 = {'id': 'send_message', 'text': null, 'variant': 'secondary', 'size': 'md'};
object4.text = intl.string(t['GuUH7/']);
object4.onPress = value11;
object.actionButtons = [object4];
object5 = {};
object5.name = env0_15.ACTION;
object5.label = intl.string(t['GuUH7/']);
object.accessibilityActions = [object5];
object.onAccessibilityAction = value11;
return object;
}
const type10 = a0.type;
const DM_FRIEND_NUDGE = NotificationCenterItems.DM_FRIEND_NUDGE;
if (type10 === DM_FRIEND_NUDGE) {
object = {};
object4 = {'id': 'send_message', 'text': null, 'variant': 'secondary', 'size': 'md'};
object4.text = intl.string(t['GuUH7/']);
object4.onPress = value11;
object.actionButtons = [object4];
object5 = {};
object5.name = env0_15.ACTION;
object5.label = intl.string(t['GuUH7/']);
object.accessibilityActions = [object5];
object.onAccessibilityAction = value11;
return object;
}
const type11 = a0.type;
const FRIEND_REQUEST_ACCEPTED = NotificationCenterItems.FRIEND_REQUEST_ACCEPTED;
if (type11 === FRIEND_REQUEST_ACCEPTED) {
object = {};
object4 = {'id': 'send_message', 'text': null, 'variant': 'secondary', 'size': 'md'};
object4.text = intl.string(t['GuUH7/']);
object4.onPress = value11;
object.actionButtons = [object4];
object5 = {};
object5.name = env0_15.ACTION;
object5.label = intl.string(t['GuUH7/']);
object.accessibilityActions = [object5];
object.onAccessibilityAction = value11;
return object;
}
const type12 = a0.type;
const GAME_FRIEND_REQUEST_ACCEPTED = NotificationCenterItems.GAME_FRIEND_REQUEST_ACCEPTED;
if (type12 === GAME_FRIEND_REQUEST_ACCEPTED) {
object = {};
object4 = {'id': 'send_message', 'text': null, 'variant': 'secondary', 'size': 'md'};
object4.text = intl.string(t['GuUH7/']);
object4.onPress = value11;
object.actionButtons = [object4];
object5 = {};
object5.name = env0_15.ACTION;
object5.label = intl.string(t['GuUH7/']);
object.accessibilityActions = [object5];
object.onAccessibilityAction = value11;
return object;
}
const type13 = a0.type;
const FRIEND_SUGGESTION_CREATED = NotificationCenterItems.FRIEND_SUGGESTION_CREATED;
if (type13 === FRIEND_SUGGESTION_CREATED) {
object = {};
object2 = {'id': 'add_friend', 'text': null, 'variant': 'secondary', 'size': 'md'};
object2.text = intl.string(t['boL/YX']);
object2.onPress = value12;
object.actionButtons = [object2];
object3 = {};
object3.name = env0_15.ACTION;
object3.label = intl.string(t['boL/YX']);
object.accessibilityActions = [object3];
object.onAccessibilityAction = value12;
return object;
}
const type14 = a0.type;
const GUILD_SCHEDULED_EVENT_STARTED = NotificationCenterItems.GUILD_SCHEDULED_EVENT_STARTED;
if (type14 === GUILD_SCHEDULED_EVENT_STARTED) {
object = {};
string = intl.string;
hRKdcn = t.hRKdcn;
object.actionButtons = [{'id': 'join_event', 'text': null, 'variant': 'secondary', 'size': 'md',
text: Reflect.apply(string, intl, [hRKdcn]), onPress: a1}];
string = intl.string;
hRKdcn = t.hRKdcn;
object.accessibilityActions = [{name: env0_15.ACTION, label: Reflect.apply(string, intl, [hRKdcn])}];
object.onAccessibilityAction = a1;
return object;
}
const type15 = a0.type;
const LIFECYCLE_ITEM = NotificationCenterItems.LIFECYCLE_ITEM;
if (type15 === LIFECYCLE_ITEM) {
item_enum = a0.item_enum;
if ((require(4624) /* metro dependency 4624: NotificationCenterItemsTypes */).ItemEnum.UPDATE_PROFILE === item_enum) {
value22 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.zMRcWL);
value23 = 'update_profile';
r14 = value22;
r15 = value23;
} else if ((require(4624) /* metro dependency 4624: NotificationCenterItemsTypes */).ItemEnum.FIND_FRIENDS === item_enum) {
value20 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['vwL/4s']);
value21 = 'find_friends';
r14 = value20;
r15 = value21;
} else if ((require(4624) /* metro dependency 4624: NotificationCenterItemsTypes */).ItemEnum.ADD_FRIEND === item_enum) {
value18 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['boL/YX']);
value19 = 'add_friend';
r14 = value18;
r15 = value19;
} else if ((require(4624) /* metro dependency 4624: NotificationCenterItemsTypes */).ItemEnum.FIRST_MESSAGE !== item_enum) {
r14 = value;
r15 = value;
} else {
value16 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['GuUH7/']);
value17 = 'send_message';
r14 = value16;
r15 = value17;
}
return value == r14 || value == r15 ? {actionButtons: []} : {actionButtons: [{id: r15, text: r14,
variant: 'secondary', size: 'md', onPress: a1}], accessibilityActions: [{name: env0_15.ACTION, label: r14}],
onAccessibilityAction: a1};
}
const type16 = a0.type;
const RECENT_MENTION = NotificationCenterItems.RECENT_MENTION;
if (type16 === RECENT_MENTION) {
if (value5) {
if (type === POLL_RESULT) {
r15 = {actionButtons: []};
} else {
object = {};
string = intl.string;
vBq3iT = t.vBq3iT;
object.actionButtons = [{'id': 'send_reply', 'text': null, 'variant': 'secondary', 'size': 'md',
text: Reflect.apply(string, intl, [vBq3iT]), onPress: value14}];
string = intl.string;
vBq3iT = t.vBq3iT;
object.accessibilityActions = [{name: env0_15.ACTION, label: Reflect.apply(string, intl, [vBq3iT])}];
object.onAccessibilityAction = value14;
r15 = object;
}
} else {
r15 = {actionButtons: []};
}
r14 = r15;
} else if (a0.type === (require(4624) /* metro dependency 4624: NotificationCenterItemsTypes */).NotificationCenterItems.REPLY_MENTION) {
if (value5) {
if (type === POLL_RESULT) {
r15 = {actionButtons: []};
} else {
object = {};
string = intl.string;
vBq3iT = t.vBq3iT;
object.actionButtons = [{'id': 'send_reply', 'text': null, 'variant': 'secondary', 'size': 'md',
text: Reflect.apply(string, intl, [vBq3iT]), onPress: value14}];
string = intl.string;
vBq3iT = t.vBq3iT;
object.accessibilityActions = [{name: env0_15.ACTION, label: Reflect.apply(string, intl, [vBq3iT])}];
object.onAccessibilityAction = value14;
r15 = object;
}
} else {
r15 = {actionButtons: []};
}
r14 = r15;
} else if (a0.type === (require(4624) /* metro dependency 4624: NotificationCenterItemsTypes */).NotificationCenterItems.TRENDING_CONTENT) {
object = {};
string = intl.string;
k0Q31F = t.k0Q31F;
object.actionButtons = [{'id': 'read_summary', 'text': null, 'variant': 'secondary', 'size': 'md',
text: Reflect.apply(string, intl, [k0Q31F]), onPress: value15}];
string = intl.string;
k0Q31F = t.k0Q31F;
object.accessibilityActions = [{name: env0_15.ACTION, label: Reflect.apply(string, intl, [k0Q31F])}];
object.onAccessibilityAction = value15;
r14 = object;
} else {
r14 = {actionButtons: []};
}
return r14;
}
function ForYouItemActionButtons(a0) { // fn#111692, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14983:11064, offset: 0x023acd1f, size: 211 bytes, params: 2, frame: 23
var r0;
const env0_0 = a0.item;
const env0_1 = a0.rowIndex;
const env0_2 = a0.onSoftAckItem;
const actionButtons = a0.actionButtons;
const actionsNode = a0.actionsNode;
const compactMode = a0.compactMode;
const object2 = {'item': 0, 'rowIndex': 0, 'onSoftAckItem': 0, 'actionButtons': 0, 'actionsNode': 0,
'compactMode': 0};
let value = null;
silentSetPrototypeOf(object2, value, undefined);
const value2 = copyDataProperties({}, a0, object2, undefined);
const styles = useStyles();
let r9 = !compactMode && value != actionButtons;
const value6 = value != actionsNode;
if (r9) {
var viewBindingProps = {style: styles.buttonsContainer, ...value2};
r9 = r9 && actionButtons.map(_fun111693);
value = <View {...viewBindingProps}>{r9}{value6 ? actionsNode : value}</View>;
r0 = value;
} else if (value6) {
var viewBindingProps = {style: styles.buttonsContainer, ...value2};
r9 = r9 && actionButtons.map(_fun111693);
value = <View {...viewBindingProps}>{r9}{value6 ? actionsNode : value}</View>;
r0 = value;
} else {
r0 = value;
}
return r0;
}
function _fun111668() { // fn#111668, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14983:597, offset: 0x023ab14c, size: 61 bytes, params: 1, frame: 13
const ComponentDispatch = (require(1239) /* metro dependency 1239: ComponentDispatchUtils */).ComponentDispatch;
const dispatch = ComponentDispatch.dispatch;
const TEXTAREA_FOCUS = ComponentActions.TEXTAREA_FOCUS;
return Reflect.apply(dispatch, ComponentDispatch, [TEXTAREA_FOCUS, env0_0]);
}
function IncomingFriendRequestActionsU() { // fn#111670, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14983:2271, owner: IncomingFriendRequestActions.u, offset: 0x023ab6d7, size: 106 bytes, params: 1, frame: 16
const object2 = {};
let value = environment.__proto__;
value = require(4504) /* metro dependency 4504: timing */;
object2.opacity = value.withTiming(pressed.get() ? 0 : 1, {duration: 150});
object2.pointerEvents = pressed.get() ? 'none' : 'auto';
return object2;
}
function IncomingFriendRequestActions_() { // fn#111671, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14983:2516, owner: IncomingFriendRequestActions._, offset: 0x023ab741, size: 274 bytes, params: 1, frame: 21
var r11;
var binding;
var value4;
let pressedBinding = pressed;
let get = pressedBinding.get;
const value2 = Reflect.apply(get, pressedBinding, []);
const value3 = 1;
if (value2) {
r11 = value3;
} else {
binding = env0_1;
value4 = binding.get();
binding = env0_2;
r11 = value4 / binding.get();
}
binding = env0_2;
const value6 = binding.get();
get = binding.get;
const value7 = value6 - Reflect.apply(get, binding, []) * r11;
const value8 = pressed.get();
const value9 = 0;
const r12 = value8 ? value9 : -value7 / 2;
const object2 = {};
const timingModule = require(4504) /* metro dependency 4504: timing */;
let withTiming = timingModule.withTiming;
const items2 = [{scaleX: Reflect.apply(withTiming, timingModule, [r11])}];
const object4 = {};
object4.translateX = timingModule.withTiming(r12);
items2[1] = object4;
object2.transform = items2;
const moduleValue3 = timingModule;
withTiming = moduleValue3.withTiming;
pressedBinding = pressed;
get = pressedBinding.get;
object2.opacity = Reflect.apply(withTiming, moduleValue3, [Reflect.apply(get, pressedBinding,
[]) ? value3 : value9]);
object2.pointerEvents = pressed.get() ? 'auto' : 'none';
return object2;
}
function IncomingFriendRequestActionsE() { // fn#111672, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14983:2930, owner: IncomingFriendRequestActions.E, offset: 0x023ab853, size: 74 bytes, params: 1, frame: 13
let binding = env0_3;
let get = binding.get;
const items2 = [{translateX: Reflect.apply(get, binding, []) / 2}];
binding = env0_4;
get = binding.get;
items2[1] = {translateY: Reflect.apply(get, binding, []) / 2};
return {transform: items2};
}
function IncomingFriendRequestActionsI() { // fn#111673, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14983:3113, owner: IncomingFriendRequestActions.I, offset: 0x023ab89d, size: 281 bytes, params: 1, frame: 27
let value = environment.__proto__;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const withDelay = reanimatedRexportModule.withDelay;
const moduleValue2 = reanimatedRexportModule;
const withRepeat = moduleValue2.withRepeat;
const timingModule = require(4504) /* metro dependency 4504: timing */;
const withTiming = timingModule.withTiming;
const pressedBinding = pressed;
let get = pressedBinding.get;
const r4 = Reflect.apply(get, pressedBinding, []) ? '8deg' : '-2deg';
const Easing = reanimatedRexportModule.Easing;
const inOut = Easing.inOut;
const Easing2 = reanimatedRexportModule.Easing;
value = Reflect.apply(withTiming, timingModule, [r4, {duration: 150, easing: Reflect.apply(inOut, Easing,
[Easing2.quad])}]);
value = Reflect.apply(withRepeat, moduleValue2, [value, 4, true]);
const items2 = [{rotateZ: Reflect.apply(withDelay, reanimatedRexportModule, [450, value])}];
let binding = env0_3;
get = binding.get;
items2[1] = {translateX: -Reflect.apply(get, binding, []) / 2};
binding = env0_4;
get = binding.get;
items2[2] = {translateY: -Reflect.apply(get, binding, []) / 2};
return {transform: items2};
}
function IncomingFriendRequestActionsOnLayout({nativeEvent}) { // fn#111675, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14983:3877, owner: IncomingFriendRequestActions.onLayout, offset: 0x023ab9d3, size: 41 bytes, params: 2, frame: 11
const binding = env0_1;
binding.set(nativeEvent.layout.width);
}
function IncomingFriendRequestActionsOnLayout_111676({nativeEvent}) { // fn#111676, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14983:4237, owner: IncomingFriendRequestActions.onLayout, offset: 0x023ab9fc, size: 41 bytes, params: 2, frame: 11
const binding = env0_2;
binding.set(nativeEvent.layout.width);
}
function IncomingFriendRequestActionsOnLayout_111677(a0) { // fn#111677, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14983:4524, owner: IncomingFriendRequestActions.onLayout, offset: 0x023aba25, size: 72 bytes, params: 2, frame: 13
let binding = env0_3;
binding.set(a0.nativeEvent.layout.width);
binding = env0_4;
binding.set(a0.nativeEvent.layout.height);
}
function _fun111679() { // fn#111679, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14983:5091, offset: 0x023ac7cb, size: 47 bytes, params: 1, frame: 13
const value = environment.__proto__;
return ChannelStore.getChannel(env0_0.message?.channel_id);
}
function _fun111680() { // fn#111680, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14983:5282, offset: 0x023ac7fa, size: 185 bytes, params: 1, frame: 18
var payload;
let value = environment.__proto__;
(require(14478) /* metro dependency 14478: AddFriendsScreenUtils */).sendWave(env0_6, false, 'You Tab');
const dMFromUserId = ChannelStore.getDMFromUserId(env0_6);
if (dMFromUserId != null) {
value = importDefault(4093) /* metro dependency 4093: parseURL */;
payload = value('https://discord.com/channels/@me/' + dMFromUserId).payload;
value = importDefault(4254) /* metro dependency 4254: handleSupportedURL */;
value({'payload': null, 'safe': true, 'navigationReplace': false, payload: payload});
}
env0_4(env0_0);
}
function _fun111681() { // fn#111681, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14983:5537, offset: 0x023ac8b3, size: 129 bytes, params: 1, frame: 17
const value2 = undefined;
const defaultImport = importDefault(8800) /* metro dependency 8800: PeopleUtils */;
const maybeConfirmFriendRequestAccept = defaultImport.maybeConfirmFriendRequestAccept;
const object2 = {};
object2.userId = env0_6;
const type = env0_0.type;
const NotificationCenterLocalItems = (require(4624) /* metro dependency 4624: NotificationCenterItemsTypes */).NotificationCenterLocalItems;
const INCOMING_GAME_FRIEND_REQUESTS = NotificationCenterLocalItems.INCOMING_GAME_FRIEND_REQUESTS;
object2.applicationId = type !== INCOMING_GAME_FRIEND_REQUESTS ? value2 : env0_0.applicationId;
object2.location = env0_7;
object2.onConfirm = onConfirm_111682;
Reflect.apply(maybeConfirmFriendRequestAccept, defaultImport, [object2]);
return value2;
}
function _fun111683() { // fn#111683, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14983:5945, offset: 0x023ac9ef, size: 115 bytes, params: 1, frame: 17
const value2 = undefined;
const defaultImport = importDefault(8800) /* metro dependency 8800: PeopleUtils */;
const cancelFriendRequest = defaultImport.cancelFriendRequest;
const object2 = {};
object2.userId = env0_6;
const type = env0_0.type;
const NotificationCenterLocalItems = (require(4624) /* metro dependency 4624: NotificationCenterItemsTypes */).NotificationCenterLocalItems;
const INCOMING_GAME_FRIEND_REQUESTS = NotificationCenterLocalItems.INCOMING_GAME_FRIEND_REQUESTS;
object2.applicationId = type !== INCOMING_GAME_FRIEND_REQUESTS ? value2 : env0_0.applicationId;
object2.location = env0_7;
Reflect.apply(cancelFriendRequest, defaultImport, [object2]);
return value2;
}
function _fun111685() { // fn#111685, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14983:6243, offset: 0x023aca92, size: 64 bytes, params: 1, frame: 12
var environment;
let value = environment.__proto__;
value = importDefault(4603) /* metro dependency 4603: ChannelActionCreators */;
value = value.getDMChannel(env0_6);
value.then(function(a0) {
importDefault(dependencyMap[19])({'payload': null, 'safe': true, 'navigationReplace': false,
payload: importDefault(dependencyMap[18])('https://discord.com/channels/@me/' + a0).payload});
focusChatInput(a0);
});
}
function _fun111687() { // fn#111687, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14983:6443, offset: 0x023acb41, size: 157 bytes, params: 1, frame: 17
var object2;
(importDefault(8783) /* metro dependency 8783: RelationshipActionCreators */).addRelationship({userId: env0_6,
context: {location: env0_7}});
const defaultImport2 = importDefault(3857) /* metro dependency 3857: ToastActionCreators */;
const open = defaultImport2.open;
object2 = {key: 'NOTIF_CENTER_V2_ADD_FRIEND_TOAST'};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.content = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['7MAxkR']);
Reflect.apply(open, defaultImport2, [object2]);
}
function* _fun111689() { // fn#111689, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14983:6639, offset: 0x023acbe9, size: 166 bytes, params: 1, frame: 15
var value5;
var value6;
var value9;
if (true) {
value = environment.__proto__;
if (require.message_id != null && AnalyticEvents != null) {
value5 = environment.__proto__.__proto__;
value6 = env2_0(env2_2[25]);
yield value6.createShallowPendingReply({messageId: require.message_id, channel: AnalyticEvents,
shouldMention: true,
showMentionToggle: true});
if (false) {
return undefined;
}
importDefault();
value9 = environment.__proto__.__proto__;
} else {
importDefault();
}
env2_21(require.message_channel_id);
}
}
function _fun111690() { // fn#111690, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14983:6899, offset: 0x023acc8f, size: 37 bytes, params: 1, frame: 11
require();
focusChatInput(env0_0.message_channel_id);
}
function useItemActionButtonPropsV2OnAccessibilityAction({nativeEvent}) { // fn#111691, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14983:7777, owner: useItemActionButtonPropsV2.onAccessibilityAction, offset: 0x023accb4, size: 107 bytes, params: 2, frame: 10
const actionName = nativeEvent.actionName;
const WAVE = env1_15.WAVE;
if (WAVE === actionName) {
env0_9();
} else if (env1_15.ACCEPT === actionName) {
env0_11();
} else if (env1_15.IGNORE === actionName) {
env0_12();
}
}
function _fun111693(a0, a1) { // fn#111693, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14983:11254, offset: 0x023acdf2, size: 122 bytes, params: 3, frame: 19
const value = a1;
const id = a0.id;
const value2 = Object.create(null);
value2.id = 0;
const value3 = copyDataProperties({}, a0, value2, undefined);
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
return (
<Button
{...value3}
{...{['onPress']: onPress_111694}}
key={id ?? value}
/>
);
}
function onConfirm_111682() { // fn#111682, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14983:5728, offset: 0x023ac934, size: 187 bytes, params: 1, frame: 19
var intl;
const user = UserStore.getUser(env1_6);
if (user != null) {
intl = require(dependencyMap[13]).intl;
dependencyMap(intl.formatToPlainString(require(dependencyMap[13]).t['5Uzkdp'],
{username: '**' + (user.globalName ?? user.username) + '**'}));
}
let binding = env1_10;
binding.set(true);
binding = env1_0;
binding.enableBadge = false;
importAll(binding);
}
function onPress_111694(a0) { // fn#111694, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14983:11303, offset: 0x023ace6c, size: 192 bytes, params: 2, frame: 20
if (env0_1.onPress != null) {
env0_1.onPress(a0);
}
const onSoftAckItemBinding = onSoftAckItem;
const itemBinding = item;
onSoftAckItemBinding(itemBinding);
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const NOTIFICATION_CENTER_ACTION = AnalyticEvents.NOTIFICATION_CENTER_ACTION;
const NotificationCenterActionTypes = (require(4624) /* metro dependency 4624: NotificationCenterItemsTypes */).NotificationCenterActionTypes;
const ACTION_BUTTON = NotificationCenterActionTypes.ACTION_BUTTON;
Reflect.apply(track, defaultImport, [NOTIFICATION_CENTER_ACTION, {action_type: ACTION_BUTTON,
notification_center_id: itemBinding.id, item_type: itemBinding.type, acked: false, item_index: rowIndex,
deeplink: itemBinding.deeplink, action_button_id: id}]);
}
@@ -0,0 +1,228 @@
/* Metro module 14788; source: modules/notification_center/native/ForYouItemImage.tsx; dependencies: [31, 27, 1422, 1867, 1878, 14789, 33, 4501, 697, 4624, 9195, 14790, 14791, 14792, 14793, 5475, 14794, 1305, 14795, 14796, 6771, 566, 5278, 8743, 8420, 14797, 4573, 2] */
function _fun111703(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111703, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14985:6, offset: 0x023ad89a, size: 475 bytes, params: 8, frame: 26
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const env0_5 = (require(1422) /* metro dependency 1422: GuildRecord */).getGuildAcronym;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const {FRIEND_BACKGROUND, MESSAGE_BACKGROUND,
PROFILE_BACKGROUND} = require(14789) /* metro dependency 14789: Constants */;
const env0_8 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
let createStyles = createStylesModule.createStyles;
const env0_9 = Reflect.apply(createStyles, createStylesModule, [_fun111704]);
const value4 = createStylesModule;
createStyles = value4.createStyles;
object2 = {};
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
object2.fallbackImage = {color: WHITE};
const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
object2.fallbackImageV2 = {color: INTERACTIVE_TEXT_DEFAULT};
const BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
object2.brandBackground = {backgroundColor: BACKGROUND_BRAND};
object2.profileBackground = {backgroundColor: PROFILE_BACKGROUND};
object2.friendBackground = {backgroundColor: FRIEND_BACKGROUND};
object2.messageBackground = {backgroundColor: MESSAGE_BACKGROUND};
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object2.guildGridBackground = {backgroundColor: BACKGROUND_SURFACE_HIGH};
const env0_10 = Reflect.apply(createStyles, value4, [object2]);
value = value.memo(_fun111705);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notification_center/native/ForYouItemImage.tsx');
exports.ForYouItemImage = value;
}
function _fun111704(a0) { // fn#111704, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14985:283, offset: 0x023ada75, size: 151 bytes, params: 2, frame: 14
const r3 = a0 ? 32 : 48;
const object2 = {};
value = r3 / 2;
object2.container = {height: r3, width: r3, borderRadius: value, marginEnd: a0 ? 8 : 12, alignItems: 'center',
justifyContent: 'center'};
object2.rowImage = {height: r3, width: r3, borderRadius: value};
const object3 = {'height': 'auto', 'maxHeight': null, 'width': 'auto'};
object3.maxHeight = value;
const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
object3.color = INTERACTIVE_TEXT_DEFAULT;
object2.guildFallbackImage = object3;
return object2;
}
function _fun111705({item, compactMode}) { // fn#111705, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14985:971, offset: 0x023adb0c, size: 2001 bytes, params: 2, frame: 28
var r14;
var r2;
var r10;
var r4;
var r6;
var type;
var value5;
const Icon = require(dependencyMap[17]).Icon;
var brandBackground;
var value11;
var item_enum;
const ItemEnum = require(dependencyMap[9]).ItemEnum;
var UPDATE_PROFILE;
var value16;
var icon;
const styles = useStyles(compactMode);
const analyticsLocations = importDefault(dependencyMap[20])().analyticsLocations;
const styles2 = useStyles();
const env0_3 = item.other_user?.id;
const user = require(dependencyMap[21]).useStateFromStores([UserStore], function() {
return UserStore.getUser(id);
});
const binding = env0_3;
const useMemo = binding.useMemo;
object = [user, compactMode];
object[2] = item.acked;
object[3] = item.guild_id;
object[4] = item.message_id;
object[5] = analyticsLocations;
const value4 = Reflect.apply(useMemo, binding, [_fun111707, object]);
if (item.icon_name != null) {
icon = <Icon source={importDefault(item.icon_name === 'icHighlight' ? dependencyMap[13] : dependencyMap[14])} color={styles2.fallbackImage.color} />;
brandBackground = styles2.brandBackground;
r4 = icon;
r6 = brandBackground;
} else if (item.icon_url != null) {
if (value4 != null) {
r4 = value4;
r6 = null;
} else {
value16 = ((Component) => <Component style={styles.rowImage} source={{uri: item.icon_url}} resizeMode="contain" />)(importDefault(dependencyMap[15]));
brandBackground = styles2.brandBackground;
r4 = value16;
r6 = brandBackground;
}
} else if (value4 != null) {
r4 = value4;
r6 = null;
} else {
type = item.type;
if (type === 'lifecycle_item') {
item_enum = item.item_enum;
UPDATE_PROFILE = ItemEnum.UPDATE_PROFILE;
r10 = item_enum === UPDATE_PROFILE ? ((Component) => <Component source={importDefault(dependencyMap[16])} />)(importDefault(dependencyMap[15])) : item_enum === require(dependencyMap[9]).ItemEnum.FIND_FRIENDS || item_enum === require(dependencyMap[9]).ItemEnum.ADD_FRIEND ? <Icon source={importDefault(dependencyMap[18])} size={require(dependencyMap[17]).IconSizes.SMALL_20} color={importDefault(dependencyMap[8]).unsafe_rawColors.WHITE} /> : item_enum === require(dependencyMap[9]).ItemEnum.FIRST_MESSAGE ? ((Component) => <Component source={importDefault(dependencyMap[19])} style={{width: '105%'}} />)(importDefault(dependencyMap[15])) : <Icon source={importDefault(dependencyMap[14])} />;
item_enum = item.item_enum;
UPDATE_PROFILE = ItemEnum.UPDATE_PROFILE;
r2 = (item_enum === UPDATE_PROFILE ? styles2.profileBackground : item_enum === require(dependencyMap[9]).ItemEnum.FIND_FRIENDS || item_enum === require(dependencyMap[9]).ItemEnum.ADD_FRIEND ? styles2.friendBackground : item_enum === require(dependencyMap[9]).ItemEnum.FIRST_MESSAGE ? styles2.messageBackground : styles2.brandBackground) ?? null;
r4 = r10;
r6 = r2;
} else {
type = item.type;
if (type === require(dependencyMap[9]).NotificationCenterItems.REFERRAL_PROGRAM_ENTRYPOINT_REMINDER) {
value11 = ((Component) => <Component source={importDefault(dependencyMap[25])} style={styles.rowImage} resizeMode="contain" />)(importDefault(dependencyMap[15]));
brandBackground = styles2.brandBackground;
r4 = value11;
r6 = brandBackground;
} else {
value5 = GuildStore.getGuild(item.guild_id);
r14 = value5 != null ? getGuildAcronym(value5) : null;
type = item.type;
if (require(dependencyMap[9]).NotificationCenterItems.MISSED_MESSAGES === type) {
object = {};
object.icon = importDefault(dependencyMap[10]);
object.color = styles2.fallbackImage.color;
r2 = object;
} else if (require(dependencyMap[9]).NotificationCenterItems.FRIEND_REQUEST_REMINDER === type) {
object = {};
object.icon = importDefault(dependencyMap[11]);
object.color = styles2.fallbackImage.color;
r2 = object;
} else if (require(dependencyMap[9]).NotificationCenterItems.GUILD_SCHEDULED_EVENT_STARTED === type) {
object = {};
object.icon = importDefault(dependencyMap[12]);
object.color = styles2.fallbackImageV2.color;
object.backgroundStyle = styles2.guildGridBackground;
r2 = object;
} else if (require(dependencyMap[9]).NotificationCenterItems.TOP_MESSAGES === type) {
object = {};
object.icon = importDefault(dependencyMap[12]);
object.color = styles2.fallbackImageV2.color;
object.backgroundStyle = styles2.guildGridBackground;
r2 = object;
} else if (require(dependencyMap[9]).NotificationCenterItems.MISSED_MESSAGES === type) {
object = {};
object.icon = importDefault(dependencyMap[12]);
object.color = styles2.fallbackImageV2.color;
object.backgroundStyle = styles2.guildGridBackground;
r2 = object;
} else if (require(dependencyMap[9]).NotificationCenterItems.TOP_MESSAGES === type) {
object = {};
object.icon = importDefault(dependencyMap[13]);
object.color = styles2.fallbackImage.color;
r2 = object;
} else {
object = {};
object.icon = importDefault(dependencyMap[14]);
object.color = styles2.fallbackImage.color;
r2 = object;
}
if (r2.icon !== importDefault(dependencyMap[12])) {
r10 = <Icon source={r2.icon} color={r2.color} />;
} else if (r14 != null) {
const Text = require(dependencyMap[26]).Text;
r10 = <Text variant={r14.length > 4 ? 'text-md/normal' : 'text-lg/normal'} style={[styles.rowImage,
styles.guildFallbackImage]}>{r14}</Text>;
} else {
r10 = <Icon source={r2.icon} color={r2.color} />;
}
r2 = r2.backgroundStyle ?? styles2.brandBackground;
r4 = r10;
r6 = r2;
}
}
}
return (
<View style={[styles.container, r6]}>
{r4}
</View>
);
}
function _fun111707() { // fn#111707, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14985:1163, offset: 0x023ae2f8, size: 220 bytes, params: 1, frame: 26
var environment;
var r0;
var value3;
var PressableOpacity;
var object3;
var Avatar;
var object4;
var moduleValue;
var getAvatarSource;
var itemBinding;
var compactModeBinding;
var AvatarSizes;
let userBinding = user;
const value2 = null;
if (value2 == userBinding) {
r0 = value2;
} else {
value3 = environment.__proto__;
PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
object3 = {onPress: onPress_111708};
Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
object4 = {};
moduleValue = require(8420) /* metro dependency 8420: ProfileCustomizationUtils */;
getAvatarSource = moduleValue.getAvatarSource;
userBinding = user;
itemBinding = item;
object4.source = Reflect.apply(getAvatarSource, moduleValue, [userBinding, itemBinding.guild_id, undefined,
itemBinding.acked]);
compactModeBinding = compactMode;
AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
object4.size = compactModeBinding ? AvatarSizes.REFRESH_MEDIUM_32 : AvatarSizes.LARGE_48;
object4.avatarDecoration = user.avatarDecoration;
r0 = <PressableOpacity {...object3}><Avatar {...object4} /></PressableOpacity>;
}
return r0;
}
function onPress_111708() { // fn#111708, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14985:1217, offset: 0x023ae3d4, size: 82 bytes, params: 1, frame: 13
const value = environment.__proto__.__proto__;
(importDefault(8743) /* metro dependency 8743: showUserProfileActionSheet */)({userId: user.id, localUser: user,
messageId: item.message_id, sourceAnalyticsLocations: analyticsLocations});
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,40 @@
/* Metro module 14810; source: modules/notification_center/native/ForYouLoadMore.tsx; dependencies: [31, 27, 4623, 33, 4501, 632, 4578, 1244, 2] */
function _fun111770(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111770, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15007:6, offset: 0x023b1696, size: 227 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const value = require(27) /* metro dependency 27 */;
const env0_2 = value.ActivityIndicator;
const env0_3 = value.View;
const notificationCenterItemsStore = importDefault(4623) /* metro dependency 4623: NotificationCenterItemsStore */;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
const env0_6 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {'alignItems': 'center',
'flexDirection': 'row', 'justifyContent': 'center', 'marginTop': 8, 'marginBottom': 24, 'marginHorizontal': 16,
'height': 42}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notification_center/native/ForYouLoadMore.tsx');
exports.ForYouLoadMore = ForYouLoadMore;
}
function ForYouLoadMore({onPressLoad}) { // fn#111771, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15007:433, offset: 0x023b1779, size: 228 bytes, params: 2, frame: 23
var r4;
var Button;
var intl;
const styles = useStyles();
if ((require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([NotificationCenterItemsStore],
function() {
return NotificationCenterItemsStore.loading;
})) {
r4 = <ActivityIndicator />;
} else {
Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r4 = <Button variant="secondary" grow size="md" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['Q/LSXp'])} onPress={onPressLoad} />;
}
return (
<View style={styles.container}>
{r4}
</View>
);
}
@@ -0,0 +1,84 @@
/* Metro module 14780; source: modules/notification_center/native/ForYouMentionPlaceholder.tsx; dependencies: [31, 27, 4502, 33, 4501, 697, 566, 4017, 4504, 2] */
function _fun111623(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111623, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14977:6, offset: 0x023a839d, size: 465 bytes, params: 8, frame: 23
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
let value = require(33) /* metro dependency 33 */;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {placeholder: {'flexDirection': 'row', 'marginBottom': 16, 'marginHorizontal': 24}};
let BACKGROUND_MOD_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_STRONG;
object2.placeholderImage = {'backgroundColor': null, 'height': 52, 'width': 52, 'borderRadius': 26, 'marginEnd': 12,
backgroundColor: BACKGROUND_MOD_STRONG};
const object5 = {'backgroundColor': null, 'height': 15, 'borderRadius': null, 'marginRight': 12, 'marginBottom': 4};
BACKGROUND_MOD_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_STRONG;
object5.backgroundColor = BACKGROUND_MOD_STRONG;
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object2.placeholderText = object5;
object2.placeholderTextContainer = {'flexDirection': 'row', 'flexWrap': 'wrap'};
const object6 = {};
BACKGROUND_MOD_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_STRONG;
object6.backgroundColor = BACKGROUND_MOD_STRONG;
object6.height = 40;
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object6.marginTop = 4;
object2.placeholderBody = object6;
const env0_7 = Reflect.apply(createStyles, value, [object2]);
const env0_8 = [70, 50];
object2 = {code: 'function ForYouMentionPlaceholderTsx1(){const{reducedMotion,opacity}=this.__closure;return{opacity:reducedMotion?0.7:opacity.get()};}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notification_center/native/ForYouMentionPlaceholder.tsx');
exports.ForYouMentionPlaceholder = ForYouMentionPlaceholder;
}
function ForYouMentionPlaceholder() { // fn#111624, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14977:978, offset: 0x023a856e, size: 522 bytes, params: 1, frame: 28
const styles = useStyles();
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
const value2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0.3);
const set = value2.set;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const withRepeat = reanimatedRexportModule.withRepeat;
const timingModule = require(4504) /* metro dependency 4504: timing */;
const withTiming = timingModule.withTiming;
const Easing = reanimatedRexportModule.Easing;
const inOut = Easing.inOut;
const Easing2 = reanimatedRexportModule.Easing;
Reflect.apply(set, value2, [Reflect.apply(withRepeat, reanimatedRexportModule, [Reflect.apply(withTiming,
timingModule, [0.7, {duration: 1000, easing: Reflect.apply(inOut, Easing, [Easing2.ease])}]), -1, true])]);
const moduleValue5 = reanimatedRexportModule;
const useAnimatedStyle = moduleValue5.useAnimatedStyle;
const closure = ForYouMentionPlaceholderY;
closure.__closure = {reducedMotion: useReducedMotion, opacity: value2};
closure.__workletHash = 8828208724188;
closure.__initData = env0_9;
const value4 = Reflect.apply(useAnimatedStyle, moduleValue5, [closure]);
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
return (
<View2 style={[styles.placeholder, value4]}>
<View style={styles.placeholderImage} />
<View>
<View style={styles.placeholderTextContainer}>
{env0_8.map(_fun111627)}
</View>
<View style={[styles.placeholderBody, {width: '85%'}]} />
</View>
</View2>
);
}
function ForYouMentionPlaceholderY() { // fn#111626, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14977:1238, owner: ForYouMentionPlaceholder.y, offset: 0x023a8778, size: 41 bytes, params: 1, frame: 11
return {opacity: useReducedMotion ? 0.7 : env0_2.get()};
}
function _fun111627(a0, a1) { // fn#111627, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14977:1525, offset: 0x023a87a1, size: 92 bytes, params: 3, frame: 19
return <View style={[styles.placeholderText, {width: '' + a0 + '%'}]} key={a1} />;
}
@@ -0,0 +1,41 @@
/* Metro module 14798; source: modules/notification_center/native/ForYouReadSectionHeader.tsx; dependencies: [31, 27, 33, 4501, 697, 4573, 1244, 2] */
function _fun111718(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111718, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14995:6, offset: 0x023ae6dc, size: 287 bytes, params: 8, frame: 22
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
const env0_2 = value.View;
const StyleSheet = value.StyleSheet;
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object3 = {};
const object4 = {};
object4.borderTopWidth = StyleSheet.hairlineWidth;
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object4.borderTopColor = BORDER_SUBTLE;
object4.marginVertical = 8;
object4.paddingHorizontal = 24;
object3.container = object4;
const TEXT_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_SUBTLE;
object3.textHeader = {color: TEXT_SUBTLE, marginTop: 20};
const env0_4 = Reflect.apply(createStyles, value, [object3]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notification_center/native/ForYouReadSectionHeader.tsx');
exports.ForYouReadSectionHeader = ForYouReadSectionHeader;
}
function ForYouReadSectionHeader() { // fn#111719, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14995:484, offset: 0x023ae7fb, size: 150 bytes, params: 1, frame: 20
const styles = useStyles();
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<View style={styles.container}>
<Text style={styles.textHeader} variant="text-sm/semibold">
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.hftC1K)}
</Text>
</View>
);
}
@@ -0,0 +1,45 @@
/* Metro module 14799; source: modules/notification_center/native/ForYouRecentActivitySectionHeader.tsx; dependencies: [31, 27, 33, 4501, 697, 4573, 1244, 2] */
function _fun111720(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111720, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14996:6, offset: 0x023ae891, size: 292 bytes, params: 8, frame: 22
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_2 = (require(27) /* metro dependency 27 */).View;
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object3 = {};
const object4 = {};
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object4.marginTop = PX_8;
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object4.marginBottom = PX_8;
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object4.paddingHorizontal = PX_24;
object3.container = object4;
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object3.textHeader = {marginTop: PX_8};
const env0_4 = Reflect.apply(createStyles, createStylesModule, [object3]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notification_center/native/ForYouRecentActivitySectionHeader.tsx');
exports.ForYouRecentActivitySectionHeader = ForYouRecentActivitySectionHeader;
}
function ForYouRecentActivitySectionHeader() { // fn#111721, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14996:454, offset: 0x023ae9b5, size: 152 bytes, params: 1, frame: 20
const styles = useStyles();
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<View style={styles.container}>
<Text
style={styles.textHeader}
color="text-muted"
variant="text-sm/semibold"
accessibilityRole="header"
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.yM9Krm)}
</Text>
</View>
);
}
@@ -0,0 +1,130 @@
/* Metro module 14808; source: modules/notification_center/native/ForYouShowAllRow.tsx; dependencies: [31, 27, 661, 12016, 33, 4501, 10981, 697, 477, 1484, 683, 1305, 4584, 14803, 5278, 14804, 12808, 4573, 1244, 6245, 2] */
function _fun111761(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111761, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15005:6, offset: 0x023b0c3c, size: 270 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const env0_5 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
const env0_6 = (require(12016) /* metro dependency 12016: FriendsScreenConstants */).Sections;
const value = require(33) /* metro dependency 33 */;
const env0_7 = value.jsx;
const env0_8 = value.Fragment;
const env0_9 = value.jsxs;
const env0_10 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun111763);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notification_center/native/ForYouShowAllRow.tsx');
exports.ForYouSuggestedFriendShowAllRow = ForYouSuggestedFriendShowAllRow;
}
function ForYouShowAllRow({children, count, onPress, panelVariant}) { // fn#111762, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15005:901, offset: 0x023b0d4a, size: 736 bytes, params: 2, frame: 40
panelVariant = !(panelVariant === undefined) && panelVariant;
const value2 = (require(10981) /* metro dependency 10981: ChannelListLayout */).useMessagesTabLayout(panelVariant);
const styles = useStyles(value2);
const layoutStyles = (require(10981) /* metro dependency 10981: ChannelListLayout */).getLayoutStyles(value2);
const value4 = (require(4584) /* metro dependency 4584: useFontScale */).useFontScale();
const channelPressableWrapperModule = require(14803) /* metro dependency 14803: ChannelPressableWrapper */;
const renderChannelPressableWrapper = channelPressableWrapperModule.renderChannelPressableWrapper;
const PressableHighlight = (require(5278) /* metro dependency 5278: Pressables */).PressableHighlight;
const backgroundColor = styles.rowActive.backgroundColor;
const items3 = [styles.pressable];
items3[1] = {borderRadius: layoutStyles.container.borderRadius};
const channelWrapperModule = require(14804) /* metro dependency 14804: ChannelWrapper */;
const renderChannelWrapper = channelWrapperModule.renderChannelWrapper;
const jsxRuntimeEnv0_8Binding = jsxRuntimeEnv0_8;
const AvatarDuoPile = (require(12808) /* metro dependency 12808: AvatarDuoPileNative */).AvatarDuoPile;
const isLayoutCompact2 = (require(10981) /* metro dependency 10981: ChannelListLayout */).isLayoutCompact(value2);
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
const items2 = [<View style={styles.avatar}><AvatarDuoPile size={isLayoutCompact2 ? AvatarSizes.XSMALL_20 : AvatarSizes.SMALL} {...{['aria-label']: ''}}>{children}</AvatarDuoPile></View>];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const variant = layoutStyles.channelName.text.variant;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const format = intl.format;
const NrzztX = (require(1244) /* metro dependency 1244: indexNative */).t.NrzztX;
items2[1] = <View style={styles.textContainer}><Text lineClamp={1} variant={variant} color="text-brand" style={styles.nameText}>{Reflect.apply(format,
intl, [NrzztX, {count: count}])}</Text></View>;
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
const iconProps = {style: styles.icon, color: styles.iconColor.color,
source: importDefault(6245) /* metro dependency 6245 */};
const IconSizes = (require(1305) /* metro dependency 1305: native */).IconSizes;
const CUSTOM = IconSizes.CUSTOM;
iconProps.size = CUSTOM;
items2[2] = <Icon {...iconProps} />;
let value = <>{items2}</>;
value = <PressableHighlight accessibilityRole="button" underlayColor={backgroundColor} onPress={onPress} style={items3}>{Reflect.apply(renderChannelWrapper,
channelWrapperModule, [value, {layout: value2, fontScale: value4,
panelVariant: panelVariant}])}</PressableHighlight>;
return Reflect.apply(renderChannelPressableWrapper, channelPressableWrapperModule, [value, {layout: value2,
panelVariant: panelVariant}]);
}
function _fun111763(a0) { // fn#111763, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15005:229, offset: 0x023b102a, size: 392 bytes, params: 2, frame: 22
const layoutStyles = (require(10981) /* metro dependency 10981: ChannelListLayout */).getLayoutStyles(a0);
const channelListLayoutModule = require(10981) /* metro dependency 10981: ChannelListLayout */;
const sizeStyle = channelListLayoutModule.makeSizeStyle(layoutStyles.icon.wrapper.size);
const object2 = {};
const BACKGROUND_MOD_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_MUTED;
object2.rowActive = {backgroundColor: BACKGROUND_MOD_MUTED};
object2.pressable = {flex: 1};
const value3 = 2;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.textContainer = {'flexDirection': 'column', 'flexGrow': 2, 'flexShrink': 2, 'alignSelf': 'center',
'overflow': 'hidden', 'marginTop': -2, marginRight: PX_8};
const object3 = {flexShrink: 1};
object3.marginBottom = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid() ? value3 : 0;
object2.nameText = object3;
const object4 = {'position': 'relative', 'borderRadius': null, 'justifyContent': 'center', 'alignItems': 'center',
'flexShrink': 0, 'flexGrow': 0};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
copyDataProperties(object4, sizeStyle, importDefault);
object4['marginRight'] = layoutStyles.icon.margin.marginRight + 4;
object2.avatar = object4;
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object2.icon = {'width': 8, 'height': 32, paddingRight: PX_24};
const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
object2.iconColor = {color: INTERACTIVE_TEXT_DEFAULT};
return object2;
}
function ForYouSuggestedFriendShowAllRow({suggestedFriends, panelVariant}) { // fn#111764, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15005:2020, offset: 0x023b11b2, size: 205 bytes, params: 2, frame: 19
panelVariant = !(panelVariant === undefined) && panelVariant;
const value2 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const value3 = (require(10981) /* metro dependency 10981: ChannelListLayout */).useMessagesTabLayout(panelVariant);
const binding = env0_3;
const useCallback = binding.useCallback;
return (
<ForYouShowAllRow
children={binding.useMemo(_fun111766, [value3, suggestedFriends])}
count={suggestedFriends.length}
onPress={Reflect.apply(useCallback, binding, [_fun111765, [value2, suggestedFriends]])}
panelVariant={panelVariant}
/>
);
}
function _fun111765() { // fn#111765, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15005:2182, offset: 0x023b127f, size: 149 bytes, params: 1, frame: 16
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const FRIEND_FINDER_SECTION_EXPANDED = AnalyticEvents.FRIEND_FINDER_SECTION_EXPANDED;
const FRIEND_SUGGESTIONS = Sections.FRIEND_SUGGESTIONS;
Reflect.apply(track, defaultImport, [FRIEND_FINDER_SECTION_EXPANDED, {section_id: FRIEND_SUGGESTIONS,
truncated_count: 2, expanded_count: suggestedFriends.length, location: 'NotificationsTab'}]);
env0_1.navigate('friends', {screen: 'suggested-friends', params: {presentation: 'card'}});
}
function _fun111766() { // fn#111766, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15005:2442, offset: 0x023b1314, size: 45 bytes, params: 1, frame: 13
return suggestedFriends.slice(2, 4).map(_fun111767);
}
function _fun111767(a0) { // fn#111767, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15005:2464, offset: 0x023b1341, size: 146 bytes, params: 2, frame: 20
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
const object2 = {};
let user = a0.user;
object2.user = user;
object2.guildId = undefined;
const isLayoutCompact2 = (require(10981) /* metro dependency 10981: ChannelListLayout */).isLayoutCompact(env1_2);
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
object2.size = isLayoutCompact2 ? AvatarSizes.XSMALL_20 : AvatarSizes.SMALL;
user = a0.user;
return <Avatar {...object2} key={user.id} />;
}
@@ -0,0 +1,161 @@
/* Metro module 14802; source: modules/notification_center/native/ForYouSuggestedFriendRow.tsx; dependencies: [31, 27, 4502, 3793, 661, 33, 4501, 10981, 697, 477, 6771, 4584, 632, 8743, 1962, 3995, 14477, 1244, 4017, 14803, 5278, 14804, 1305, 4573, 14805, 14806, 683, 2] */
function _fun111726(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111726, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14999:6, offset: 0x023aecee, size: 279 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
let value = require(661) /* metro dependency 661: Constants */;
const env0_7 = value.AnalyticEvents;
const env0_8 = value.RelationshipTypes;
value = require(33) /* metro dependency 33 */;
const env0_9 = value.jsx;
const env0_10 = value.jsxs;
const env0_11 = value.Fragment;
const env0_12 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun111727);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notification_center/native/ForYouSuggestedFriendRow.tsx');
exports.default = ForYouSuggestedFriendRow;
}
function _fun111727(a0) { // fn#111727, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14999:256, offset: 0x023aee05, size: 318 bytes, params: 2, frame: 22
const layoutStyles = (require(10981) /* metro dependency 10981: ChannelListLayout */).getLayoutStyles(a0);
const channelListLayoutModule = require(10981) /* metro dependency 10981: ChannelListLayout */;
const sizeStyle = channelListLayoutModule.makeSizeStyle(layoutStyles.icon.wrapper.size);
const object2 = {};
const BACKGROUND_MOD_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_MUTED;
object2.rowActive = {backgroundColor: BACKGROUND_MOD_MUTED};
object2.pressable = {flex: 1};
const value3 = 2;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.textContainer = {'flexDirection': 'column', 'flexGrow': 2, 'flexShrink': 2, 'alignSelf': 'center',
'overflow': 'hidden', 'marginTop': -2, marginRight: PX_8};
const object3 = {flexShrink: 1};
object3.marginBottom = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid() ? value3 : 0;
object2.nameText = object3;
const object4 = {'position': 'relative', 'borderRadius': null, 'justifyContent': 'center', 'alignItems': 'center',
'flexShrink': 0, 'flexGrow': 0};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
copyDataProperties(object4, sizeStyle, importDefault);
object4['marginRight'] = layoutStyles.icon.margin.marginRight + 4;
object2.avatar = object4;
return object2;
}
function ForYouSuggestedFriendRow({suggestedFriend, onAddSuggestion, onAddSuggestionAnimationFinish, panelVariant}) { // fn#111728, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14999:920, offset: 0x023aef43, size: 1437 bytes, params: 2, frame: 46
var r3;
var r21;
var defaultImport;
var defaultImport2;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
panelVariant = !(panelVariant === undefined) && panelVariant;
const value2 = (require(10981) /* metro dependency 10981: ChannelListLayout */).useMessagesTabLayout(panelVariant);
const styles = useStyles(value2);
const analyticsLocations = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().analyticsLocations;
const env0_3 = analyticsLocations;
const layoutStyles = (require(10981) /* metro dependency 10981: ChannelListLayout */).getLayoutStyles(value2);
const value4 = (require(4584) /* metro dependency 4584: useFontScale */).useFontScale();
const value5 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStoresObject([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
const value6 = env0_3.useCallback(_fun111730, [suggestedFriend, analyticsLocations]);
if (suggestedFriend.friendSuggestionName == null) {
defaultImport = importDefault(3995) /* metro dependency 3995: UserUtils */;
r3 = defaultImport.getName(suggestedFriend.user);
} else if (suggestedFriend.friendSuggestionName.length > 0) {
r3 = suggestedFriend.friendSuggestionName;
} else {
defaultImport = importDefault(3995) /* metro dependency 3995: UserUtils */;
r3 = defaultImport.getName(suggestedFriend.user);
}
const suggestedContactNameForSuggestion = (require(14477) /* metro dependency 14477: FriendSuggestionUtils */).getSuggestedContactNameForSuggestion(r3,
suggestedFriend);
const value9 = '';
const r30 = suggestedContactNameForSuggestion != null ? ' · ' + suggestedContactNameForSuggestion : value9;
if (suggestedFriend.mutualFriendsCount == null) {
defaultImport2 = importDefault(3995) /* metro dependency 3995: UserUtils */;
r21 = defaultImport2.getName(suggestedFriend.user);
} else if (suggestedFriend.mutualFriendsCount > 0) {
r21 = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.z7y34b,
{count: suggestedFriend.mutualFriendsCount});
} else {
defaultImport2 = importDefault(3995) /* metro dependency 3995: UserUtils */;
r21 = defaultImport2.getName(suggestedFriend.user);
}
const value13 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(false);
env0_3.useEffect(_fun111733, [value13,
(require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([RelationshipStore],
function() {
return RelationshipStore.getRelationshipType(suggestedFriend.user.id) === RelationshipTypes.PENDING_OUTGOING;
})]);
const channelPressableWrapperModule = require(14803) /* metro dependency 14803: ChannelPressableWrapper */;
const renderChannelPressableWrapper = channelPressableWrapperModule.renderChannelPressableWrapper;
const PressableHighlight = (require(5278) /* metro dependency 5278: Pressables */).PressableHighlight;
const backgroundColor = styles.rowActive.backgroundColor;
const items3 = [styles.pressable];
items3[1] = {borderRadius: layoutStyles.container.borderRadius};
const channelWrapperModule = require(14804) /* metro dependency 14804: ChannelWrapper */;
const renderChannelWrapper = channelWrapperModule.renderChannelWrapper;
const jsxRuntimeEnv0_11Binding = jsxRuntimeEnv0_11;
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
let user = suggestedFriend.user;
const avatarSize = layoutStyles.icon.avatarSize;
const value15 = !value5;
const items2 = [<View style={styles.avatar}><Avatar user={user} guildId={undefined} size={avatarSize} animate={value15} /></View>];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
let variant = layoutStyles.channelName.text.variant;
const text = <Text lineClamp={1} variant={variant} color="text-default" style={styles.nameText}>{r3}</Text>;
const object = {};
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
object.marginTop = platformUtilsModule.isAndroid() ? -2 : 0;
const ActionStatusSubLabel = (require(14805) /* metro dependency 14805: ActionStatusSubLabel */).ActionStatusSubLabel;
const height = layoutStyles.messagePreview.height;
const moduleValue11 = platformUtilsModule;
const r33 = moduleValue11.isAndroid() ? 2 : 0;
variant = layoutStyles.messagePreview.text.variant;
const string = intl.string;
const Kzyxm9 = (require(1244) /* metro dependency 1244: indexNative */).t.Kzyxm9;
items2[1] = <View style={styles.textContainer}>{text}<View style={object}><ActionStatusSubLabel lineHeight={height + r33} textVariant={variant} actioned={value13} maxFontSizeMultiplier={1.75} label={value9 + r21 + r30} actionStatus={Reflect.apply(string,
intl, [Kzyxm9])} animate={value15} /></View></View>;
const ContactSuggestionActions = (require(14806) /* metro dependency 14806: ContactSuggestionActions */).ContactSuggestionActions;
user = suggestedFriend.user;
let value = require(10981) /* metro dependency 10981: ChannelListLayout */;
value = value.isLayoutCozy(value2);
items2[2] = <ContactSuggestionActions user={user} added={value13} size={value ? 'md' : 'sm'} onAddSuggestion={function(a0) {
var defaultImport = importDefault(dependencyMap[26]);
var FRIEND_SUGGESTION_ADDED = AnalyticEvents.FRIEND_SUGGESTION_ADDED;
var suggestedFriendBinding = suggestedFriend;
defaultImport.track(FRIEND_SUGGESTION_ADDED, {suggested_user_id: a0.id,
suggestion_source: suggestedFriendBinding.source, location: 'Notifications Tab'});
onAddSuggestion(suggestedFriendBinding);
}} onFinishAnimation={function() {
onAddSuggestionAnimationFinish(suggestedFriend);
}} animate={value15} />;
value = <>{items2}</>;
value = <PressableHighlight accessibilityRole="button" underlayColor={backgroundColor} onPress={value6} style={items3}>{Reflect.apply(renderChannelWrapper,
channelWrapperModule, [value, {layout: value2, fontScale: value4,
panelVariant: panelVariant}])}</PressableHighlight>;
return Reflect.apply(renderChannelPressableWrapper, channelPressableWrapperModule, [value, {layout: value2,
panelVariant: panelVariant}]);
}
function _fun111730() { // fn#111730, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14999:1259, offset: 0x023af4e0, size: 64 bytes, params: 1, frame: 13
var environment;
let value = environment.__proto__;
value = require(dependencyMap[14]);
value = value(dependencyMap[13], dependencyMap.paths);
value.then(function({default: property}) {
var suggestedFriendBinding = suggestedFriend;
return property({userId: suggestedFriendBinding.user.id, localUser: suggestedFriendBinding.user,
sourceAnalyticsLocations: analyticsLocations, location: 'Notifications Tab User Profile'});
});
}
function _fun111733() { // fn#111733, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14999:1922, offset: 0x023af598, size: 30 bytes, params: 1, frame: 11
if (!env0_5) {
env0_4.set(false);
}
}
@@ -0,0 +1,43 @@
/* Metro module 14801; source: modules/notification_center/native/ForYouSuggestedFriendsSectionHeader.tsx; dependencies: [31, 27, 33, 4501, 697, 4573, 1244, 2] */
function _fun111724(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111724, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14998:6, offset: 0x023aeb1c, size: 278 bytes, params: 8, frame: 22
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_2 = (require(27) /* metro dependency 27 */).View;
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {};
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object2.container = {'borderTopWidth': 1, 'borderTopColor': null, 'marginTop': 12, 'marginBottom': 8,
'paddingHorizontal': 24, 'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'space-between',
borderTopColor: BORDER_SUBTLE};
object2.noDivider = {'borderTopWidth': 0, 'marginTop': 0};
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.text = {marginTop: PX_16};
const env0_4 = Reflect.apply(createStyles, createStylesModule, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notification_center/native/ForYouSuggestedFriendsSectionHeader.tsx');
exports.default = ForYouSuggestedFriendsSectionHeader;
}
function ForYouSuggestedFriendsSectionHeader({showDivider}) { // fn#111725, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14998:548, offset: 0x023aec32, size: 188 bytes, params: 2, frame: 21
const styles = useStyles();
const items2 = [styles.container];
items2[1] = !showDivider && styles.noDivider;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<View style={items2}>
<Text
style={styles.text}
color="text-muted"
variant="text-sm/semibold"
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['1uAmCw'])}
</Text>
</View>
);
}
@@ -0,0 +1,47 @@
/* Metro module 14809; source: modules/notification_center/native/ForYouUnreadClearedState.tsx; dependencies: [31, 27, 33, 4501, 697, 1305, 11111, 4573, 1244, 2] */
function _fun111768(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111768, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15006:6, offset: 0x023b13d3, size: 341 bytes, params: 8, frame: 23
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
let value = require(33) /* metro dependency 33 */;
const env0_4 = value.jsx;
const env0_5 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object3 = {container: {'marginBottom': 4, 'marginHorizontal': 24, 'alignItems': 'center', 'flexDirection': 'row'}};
const object4 = {'width': 48, 'height': 48, 'backgroundColor': null, 'opacity': 0.16, 'borderRadius': null,
'marginRight': 16, 'justifyContent': 'center', 'alignItems': 'center'};
let GREEN_400 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.GREEN_400;
object4.backgroundColor = GREEN_400;
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xl;
object3.imageContainer = object4;
GREEN_400 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.GREEN_400;
object3.icon = {'margin': 12, 'position': 'absolute', color: GREEN_400};
object3.headerText = {marginBottom: 2};
const env0_6 = Reflect.apply(createStyles, value, [object3]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notification_center/native/ForYouUnreadClearedState.tsx');
exports.ForYouUnreadClearedState = ForYouUnreadClearedState;
}
function ForYouUnreadClearedState() { // fn#111769, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15006:677, offset: 0x023b1528, size: 366 bytes, params: 1, frame: 25
const styles = useStyles();
const items2 = [<View style={styles.imageContainer} />];
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
items2[1] = <Icon source={importDefault(11111) /* metro dependency 11111 */} style={styles.icon} color={styles.icon.color} />;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const DonStq = (require(1244) /* metro dependency 1244: indexNative */).t.DonStq;
items2[2] = <View><Text color="mobile-text-heading-primary" variant="text-md/semibold" style={styles.headerText}>{Reflect.apply(string,
intl,
[DonStq])}</Text><Text color="text-default" variant="text-md/medium">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.jXFsai)}</Text></View>;
return (
<View style={styles.container}>
{items2}
</View>
);
}
@@ -0,0 +1,30 @@
/* Metro module 14767; source: modules/notification_center/native/NotificationCenterActionButton.tsx; dependencies: [31, 33, 8341, 8639, 4080, 14768, 1962, 1244, 2] */
function _fun111479(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111479, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14964:6, offset: 0x023a3e97, size: 138 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notification_center/native/NotificationCenterActionButton.tsx');
exports.default = NotificationCenterActionButton;
}
function NotificationCenterActionButton() { // fn#111480, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14964:231, offset: 0x023a3f21, size: 146 bytes, params: 1, frame: 19
const IconButton = (require(8341) /* metro dependency 8341: IconButtonNative */).IconButton;
const iconButtonProps = {'variant': 'tertiary', 'size': 'sm', icon: importDefault(8639) /* metro dependency 8639 */,
onPress: onPress_111481};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
iconButtonProps.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['UKOtz+']);
iconButtonProps.maxFontSizeMultiplier = 2;
return <IconButton {...iconButtonProps} />;
}
function NotificationCenterActionButtonOnPress() { // fn#111481, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14964:352, owner: NotificationCenterActionButton.onPress, offset: 0x023a3fb3, size: 79 bytes, params: 1, frame: 15
let value = environment.__proto__;
const defaultImport = importDefault(dependencyMap[4]);
const openLazy = defaultImport.openLazy;
value = require(dependencyMap[6]);
value = value(dependencyMap[5], dependencyMap.paths);
return Reflect.apply(openLazy, defaultImport, [value, 'NotificationCenterActionSheet']);
}
@@ -0,0 +1,120 @@
/* Metro module 14768; source: modules/notification_center/native/NotificationCenterActionSheet.tsx; dependencies: [31, 5215, 661, 33, 566, 14769, 10929, 4080, 11177, 7890, 7892, 5080, 11179, 1962, 7007, 6805, 6758, 1244, 6807, 6700, 11003, 9216, 14770, 11190, 14771, 7002, 11944, 2] */
function _fun111482(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111482, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14965:6, offset: 0x023a4002, size: 189 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const recentMentionsStore = importDefault(5215) /* metro dependency 5215: RecentMentionsStore */;
const env0_5 = (require(661) /* metro dependency 661: Constants */).UserSettingsSections;
const value = require(33) /* metro dependency 33 */;
const env0_6 = value.jsx;
const env0_7 = value.jsxs;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notification_center/native/NotificationCenterActionSheet.tsx');
exports.default = _default_111483;
}
function _default_111483() { // fn#111483, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14965:183, offset: 0x023a40bf, size: 1168 bytes, params: 1, frame: 34
var object3;
var r9;
const {roleFilter,
everyoneFilter} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([RecentMentionsStore],
function() {
return {everyoneFilter: RecentMentionsStore.everyoneFilter, roleFilter: RecentMentionsStore.roleFilter};
});
const binding = env0_3;
const env0_2 = binding.useCallback(_fun111485, [everyoneFilter, roleFilter]);
const defaultImport = importDefault(10929) /* metro dependency 10929: ForLaterExperiment */;
const useConfig = defaultImport.useConfig;
const enabled = Reflect.apply(useConfig, defaultImport, [{location: 'NotificationCenterActionSheet'}]).enabled;
const value3 = binding.useCallback(_fun111486, []);
const value4 = binding.useCallback(function() {
importDefault(dependencyMap[7]).hideActionSheet();
require(dependencyMap[14]).openUserSettings({screen: UserSettingsSections.NOTIFICATIONS});
}, []);
const ActionSheet = (require(6805) /* metro dependency 6805: ActionSheetNative */).ActionSheet;
object3 = {showGradient: true};
const BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const HcoRu0 = (require(1244) /* metro dependency 1244: indexNative */).t.HcoRu0;
object3.header = <BottomSheetTitleHeader title={Reflect.apply(string, intl, [HcoRu0])} />;
const ActionSheetRow = (require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow;
let Group = ActionSheetRow.Group;
const ActionSheetSwitchRow = (require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetSwitchRow;
const actionSheetSwitchRowProps = {onValueChange: onValueChange_111488, value: roleFilter,
label: intl.string((require(1244) /* metro dependency 1244: indexNative */).t.asInft)};
let Icon = ActionSheetRow.Icon;
const AtIcon = (require(6700) /* metro dependency 6700: AtIcon */).AtIcon;
actionSheetSwitchRowProps.icon = <Icon IconComponent={AtIcon} source={importDefault(11003) /* metro dependency 11003 */} />;
const actionSheetSwitchRow = <ActionSheetSwitchRow {...actionSheetSwitchRowProps} />;
const object2 = {onValueChange: onValueChange_111489, value: everyoneFilter};
string = intl.string;
const S9GLtt = (require(1244) /* metro dependency 1244: indexNative */).t.S9GLtt;
object2.label = Reflect.apply(string, intl, [S9GLtt]);
object2.subLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.jYgZa4);
Icon = ActionSheetRow.Icon;
const BellIcon = (require(9216) /* metro dependency 9216: BellIcon */).BellIcon;
object2.icon = <Icon IconComponent={BellIcon} source={importDefault(14770) /* metro dependency 14770 */} />;
const group = <Group hasIcons>{actionSheetSwitchRow}<ActionSheetSwitchRow {...object2} /></Group>;
Group = ActionSheetRow.Group;
if (enabled) {
r9 = <ActionSheetRow icon={((Icon) => <Icon IconComponent={(require(11190) /* metro dependency 11190: BookmarkIcon */).BookmarkIcon} source={importDefault(14771) /* metro dependency 14771 */} />)((require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow.Icon)} label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['2pAkDA'])} onPress={value3} arrow key="for-later" />;
} else {
r9 = null;
}
const ActionSheetRow3 = (require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow;
Icon = ActionSheetRow3.Icon;
const SettingsIcon = (require(7002) /* metro dependency 7002: SettingsIcon */).SettingsIcon;
return (
<ActionSheet {...object3}>
{group}
<Group hasIcons>
{r9}
<ActionSheetRow
icon={<Icon IconComponent={SettingsIcon} source={importDefault(11944) /* metro dependency 11944 */} />}
label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.h850Ss)}
onPress={value4}
arrow
key="settings"
/>
</Group>
</ActionSheet>
);
}
function _fun111485(a0) { // fn#111485, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14965:349, offset: 0x023a4570, size: 71 bytes, params: 2, frame: 15
let value = environment.__proto__;
value = importDefault(14769) /* metro dependency 14769: MentionActionCreators */;
const setGuildFilter = value.setGuildFilter;
const object2 = {};
const roleFilterBinding = roleFilter;
object2.roleFilter = roleFilterBinding;
object2.everyoneFilter = everyoneFilter;
copyDataProperties(object2, a0, roleFilterBinding);
Reflect.apply(setGuildFilter, value, [object2]);
}
function _fun111486() { // fn#111486, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14965:512, offset: 0x023a45b7, size: 192 bytes, params: 1, frame: 18
var defaultImport3;
var pushLazy;
let value = environment.__proto__;
importDefault(dependencyMap[7]).hideActionSheet();
if (importDefault(dependencyMap[8])()) {
defaultImport3 = importDefault(dependencyMap[11]);
pushLazy = defaultImport3.pushLazy;
value = require(dependencyMap[13]);
value = value(dependencyMap[12], dependencyMap.paths);
Reflect.apply(pushLazy, defaultImport3, [value, {}, 'for-later-modal', {presentation: 'modal'}]);
} else {
importDefault(dependencyMap[9])(require(dependencyMap[10]).EntitlementFeatureNames.SAVED_MESSAGES);
}
}
function _default_111483OnValueChange() { // fn#111488, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14965:1058, owner: _default_111483.onValueChange, offset: 0x023a46c8, size: 30 bytes, params: 1, frame: 11
return env0_2({roleFilter: !roleFilter});
}
function _default_111483OnValueChange_111489() { // fn#111489, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14965:1269, owner: _default_111483.onValueChange, offset: 0x023a46e6, size: 30 bytes, params: 1, frame: 11
return env0_2({everyoneFilter: !everyoneFilter});
}
@@ -0,0 +1,844 @@
/* Metro module 14774; source: modules/notification_center/native/NotificationCenterForYou.tsx; dependencies: [57, 31, 27, 5214, 4605, 1878, 4623, 14775, 661, 7607, 4865, 33, 4624, 1485, 4007, 3829, 1478, 3834, 14776, 566, 14778, 14480, 5072, 21, 4788, 4093, 676, 22, 683, 14777, 14779, 8742, 480, 14780, 14781, 2] */
function _fun111509(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111509, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14971:6, offset: 0x023a5377, size: 336 bytes, params: 8, frame: 19
const env0_0 = require;
const isHoisted = function({type}) {
return type === require(dependencyMap[12]).NotificationCenterLocalItems.INCOMING_FRIEND_REQUESTS;
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
const guildReadStateStore = importDefault(5214) /* metro dependency 5214: GuildReadStateStore */;
const readStateStore = importDefault(4605) /* metro dependency 4605: ReadStateStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const notificationCenterItemsStore = importDefault(4623) /* metro dependency 4623: NotificationCenterItemsStore */;
const notificationCenterStore = importDefault(14775) /* metro dependency 14775: NotificationCenterStore */;
const env0_11 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
const env0_12 = (require(7607) /* metro dependency 7607: MainTabsConstants */).MainTabsNavigatorScreens;
const env0_13 = (require(4865) /* metro dependency 4865: ReadStateConstants */).ReadStateTypes;
const env0_14 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notification_center/native/NotificationCenterForYou.tsx');
exports.NotificationCenterForYou = NotificationCenterForYou;
}
function NotificationCenterForYou(a0) { // fn#111511, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14971:517, offset: 0x023a54fa, size: 1699 bytes, params: 2, frame: 50
var object2;
var r0;
var value;
var Array;
let panelVariant = a0.panelVariant;
panelVariant = !(panelVariant === undefined) && panelVariant;
Object.create(null).panelVariant = 0;
value = copyDataProperties({}, a0, value, undefined);
const env0_4 = undefined;
const value3 = (require(1485) /* metro dependency 1485 */).useIsFocused();
const value4 = (require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */).useCurrentNavigationRouteName();
const NotificationCenterAckedBeforeId = (require(3829) /* metro dependency 3829: UserSettings */).NotificationCenterAckedBeforeId;
const value5 = NotificationCenterAckedBeforeId.useSetting();
const binding = env0_4;
const value6 = binding.useMemo(_fun111512, [value4, value3]);
const env0_3 = value6;
const height = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)().height;
const ChannelListLayoutSetting = (require(3829) /* metro dependency 3829: UserSettings */).ChannelListLayoutSetting;
const value7 = ChannelListLayoutSetting.useSetting();
const ChannelListLayoutTypes = (require(3834) /* metro dependency 3834: ChannelListLayoutTypes */).ChannelListLayoutTypes;
const COMPACT = ChannelListLayoutTypes.COMPACT;
const {initialized, hasMore, items, loadMore, loadingMore, setReadNotifItemToAcked,
errored} = (require(14776) /* metro dependency 14776: useNotificationCenterItemsLoader */).useNotificationCenterItemsLoader({isFocused: value3,
navigatedAway: value6, withMentions: true, initialPageSize: binding.useMemo(_fun111513, [value7 === COMPACT,
height])});
const value11 = (require(566) /* metro dependency 566: flux */).useStateFromStores([NotificationCenterStore],
function() {
return NotificationCenterStore.hasNewMentions();
});
const value12 = (require(566) /* metro dependency 566: flux */).useStateFromStores([NotificationCenterItemsStore],
function() {
return NotificationCenterItemsStore.localItems;
}, []);
(require(14778) /* metro dependency 14778: useGetOrFetchNotificationCenterItemApplications */).useGetOrFetchNotificationCenterItemsApplications(value12);
const value13 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore, ReadStateStore],
_fun111516);
const totalNotificationsMentionCount = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildReadStateStore],
function() {
return GuildReadStateStore.getTotalNotificationsMentionCount(true);
});
let useState = binding.useState;
const value14 = Reflect.apply(useState, binding, [value13]);
const binding2 = env0_3;
const value15 = binding2(value14, 2);
const property = value15[0];
const property2 = value15[1];
useState = binding.useState;
const value16 = binding2(Reflect.apply(useState, binding, [false]), 2);
const property3 = value16[0];
const property4 = value16[1];
useState = binding.useState;
const Date = global.Date;
const value17 = binding2(Reflect.apply(useState, binding, [Date.now()]), 2);
const property5 = value17[0];
value17[1];
useState = binding.useState;
let Set = global.Set;
const value18 = Object.create(Set.prototype, {constructor: {value: Set}});
let set = new Set();
const value20 = binding2(Reflect.apply(useState, binding, [set instanceof Object ? set : value18]), 2);
const property6 = value20[0];
const env0_20 = value20[1];
const value21 = binding.useCallback(_fun111518, [property6]);
const value22 = binding.useCallback(_fun111519, [property6]);
let useRef = binding.useRef;
Set = global.Set;
const value23 = Object.create(Set.prototype, {constructor: {value: Set}});
set = new Set();
const env0_21 = Reflect.apply(useRef, binding, [set instanceof Object ? set : value23]);
useRef = binding.useRef;
Set = global.Set;
const value25 = Object.create(Set.prototype, {constructor: {value: Set}});
set = new Set();
const env0_22 = Reflect.apply(useRef, binding, [set instanceof Object ? set : value25]);
const value27 = binding.useCallback(_fun111520, []);
const value28 = binding.useCallback(_fun111521, []);
const {setAdded, friendSuggestions} = (importDefault(14480) /* metro dependency 14480: useSuggestedFriends */)();
const value30 = binding.useCallback(function(a0) {
var env0_0 = a0;
setAdded(_fun111523);
}, [setAdded]);
const value31 = binding.useCallback(function(a0) {
var env0_0 = a0;
setAdded(_fun111525);
}, [setAdded]);
const value33 = binding.useMemo(_fun111527, [items, hasMore, value12, friendSuggestions, initialized, value11,
errored, value5, property, setReadNotifItemToAcked, value28, totalNotificationsMentionCount,
(require(5072) /* metro dependency 5072: AgeGateUtils */).useShouldAgeVerifyForAgeGate()]);
binding.useLayoutEffect(_fun111537, [initialized, property5]);
binding.useEffect(_fun111538, [value6, value13, property, value33, value5, property2, value28]);
binding.useEffect(_fun111544, [value3, property4]);
binding.useEffect(_fun111546, [value6, property4]);
const defaultImport = importDefault(8742) /* metro dependency 8742: useTrackImpression */;
object2 = {};
const ImpressionTypes = (require(480) /* metro dependency 480: AnalyticsUtils */).ImpressionTypes;
const VIEW = ImpressionTypes.VIEW;
object2.type = VIEW;
const ImpressionNames = (require(480) /* metro dependency 480: AnalyticsUtils */).ImpressionNames;
const NOTIFICATION_CENTER_LANDING = ImpressionNames.NOTIFICATION_CENTER_LANDING;
object2.name = NOTIFICATION_CENTER_LANDING;
object2.properties = {empty: value33.length === 0};
defaultImport(object2, {disableTrack: !initialized}, [initialized]);
if (initialized) {
const ForYouItems = (require(14781) /* metro dependency 14781: ForYouItems */).ForYouItems;
value = <ForYouItems items={value33} loadingMore={loadingMore} loadMore={loadMore} nestedInLaunchPad={value.nestedInLaunchPad} shouldScrollToTop={property3} isSoftAcked={value21} onSoftAckItem={value22} forceHoistItem={value27} isForceHoisted={value28} suggestedFriendAdded={value30} onAddSuggestionAnimationFinish={value31} panelVariant={panelVariant} />;
r0 = value;
} else {
Array = global.Array;
value = Array.from(global.Array(10));
value = <View>{value.map(_fun111547)}</View>;
r0 = value;
}
return r0;
}
function _fun111512() { // fn#111512, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14971:688, offset: 0x023a5b9d, size: 78 bytes, params: 1, frame: 13
const Object = global.Object;
const values = Object.values;
const value = environment.__proto__;
return !env0_0 && env0_1 !== MainTabsNavigatorScreens.NOTIFICATIONS && Reflect.apply(values, Object,
[MainTabsNavigatorScreens]).includes(env0_1);
}
function _fun111513() { // fn#111513, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14971:895, offset: 0x023a5beb, size: 85 bytes, params: 1, frame: 17
const r7 = env0_5 ? 48 : 68;
const Math = global.Math;
const min = Math.min;
const Math2 = global.Math;
const max = Math2.max;
const Math3 = global.Math;
let value = Math3.ceil(height / r7);
value = Reflect.apply(max, Math2, [8, value]);
return Reflect.apply(min, Math, [50, value]);
}
function _fun111516() { // fn#111516, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14971:1405, offset: 0x023a5c62, size: 58 bytes, params: 1, frame: 14
const value = environment.__proto__;
const currentUser = UserStore.getCurrentUser();
const value3 = null;
return value3 == currentUser ? value3 : ReadStateStore.ackMessageId(currentUser.id,
ReadStateTypes.NOTIFICATION_CENTER);
}
function _fun111518(a0) { // fn#111518, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14971:1771, offset: 0x023a5cb4, size: 22 bytes, params: 2, frame: 11
return env0_19.has(a0);
}
function _fun111519(a0) { // fn#111519, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14971:1807, offset: 0x023a5cca, size: 99 bytes, params: 2, frame: 13
var binding;
var Set;
var set;
if (!a0.forceUnacked) {
binding = env0_19;
if (!binding.has(a0.id)) {
Set = global.Set;
binding = env0_19;
set = new Set();
set.add(a0.id);
env0_20(set);
}
}
}
function _fun111520({id}) { // fn#111520, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14971:1947, offset: 0x023a5d2d, size: 34 bytes, params: 2, frame: 11
env0_22.current.add(id);
}
function _fun111521({id}) { // fn#111521, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14971:1996, offset: 0x023a5d4f, size: 32 bytes, params: 2, frame: 11
return env0_22.current.has(id);
}
function _fun111522(a0) { // fn#111522, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14971:2097, offset: 0x023a5d6f, size: 32 bytes, params: 2, frame: 11
const env0_0 = a0;
setAdded(_fun111523);
}
function _fun111524(a0) { // fn#111524, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14971:2145, offset: 0x023a5d8f, size: 32 bytes, params: 2, frame: 11
const env0_0 = a0;
setAdded(function(a0) {
return a0.filter(_fun111526);
});
}
function _fun111527() { // fn#111527, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14971:2260, offset: 0x023a5deb, size: 1253 bytes, params: 1, frame: 27
var r16;
var environment;
var id;
var r4;
var r9;
var r7;
var r14;
var r2;
var r10;
var r6;
var r1;
var binding;
var filter;
var value4;
var value5;
var push;
var NotificationCenterLocalItems;
var FRIEND_REQUESTS_GROUPED;
var other_user;
var map;
var slice;
var Math;
var min;
var value11;
var Math2;
var max;
var value12;
var value13;
var unshift;
var HermesInternal;
var concat;
var value14;
var value15;
var kind;
var value16;
var value17;
var value19;
var items6;
var items7;
var value20;
var value21;
let value = environment;
let length = items.length;
const value2 = 0;
reducibleJoin2: while (true) {
if (length > value2) {
itemsBinding = items;
length = itemsBinding.length;
id = itemsBinding[length - 1].id;
break reducibleJoin2;
}
id = undefined;
break reducibleJoin2;
}
reducibleJoin6: while (true) {
reducibleJoin4: while (true) {
if (hasMore) {
if (id != null) {
binding = env0_12;
filter = binding.filter;
value4 = Reflect.apply(filter, binding, [_fun111528]);
r4 = value4;
break reducibleJoin6;
}
break reducibleJoin4;
}
break reducibleJoin4;
}
binding = env0_12;
r4 = binding;
break reducibleJoin6;
}
const closure = function(a0) {
a0.sort(_fun111530);
};
itemsBinding = items;
let items8 = [];
arraySpread(items8, r4, arraySpread(items8, itemsBinding, value2, r16), r16);
reducibleJoin8: while (true) {
if (env0_26) {
filter = items8.filter;
value5 = Reflect.apply(filter, items8, [_fun111531]);
r9 = value5;
break reducibleJoin8;
}
r9 = items8;
break reducibleJoin8;
}
items8 = [];
var env0_1;
const items2 = [];
const items3 = [];
let forEach = r9.forEach;
Reflect.apply(forEach, r9, [_fun111532]);
closure(items8);
closure(items2);
closure(items3);
const value7 = importDefault(dependencyMap[27]).partition(items8, _fun111533);
const value8 = 2;
const value9 = env1_3(value7, value8);
const property = value9[value2];
const property2 = value9[1];
length = property.length;
const value10 = 3;
reducibleJoin10: while (true) {
if (length > value10) {
push = property2.push;
NotificationCenterLocalItems = require(dependencyMap[12]).NotificationCenterLocalItems;
FRIEND_REQUESTS_GROUPED = NotificationCenterLocalItems.FRIEND_REQUESTS_GROUPED;
id = property[value2].id;
other_user = property[value2].other_user;
map = property.map;
Reflect.apply(push, property2, [{'kind': 'notification-center-item', 'type': null, 'id': null,
'local_id': 'friend_requests_grouped', 'acked': false, type: FRIEND_REQUESTS_GROUPED, id: id,
other_user: other_user, other_users: Reflect.apply(map, property, [function(a0) {
return a0.other_user;
}]), forceUnacked: true}]);
env0_1 = property2;
r7 = property2;
r16 = dependencyMap;
break reducibleJoin10;
}
r7 = items8;
break reducibleJoin10;
}
r7.forEach(_fun111535);
items8 = [];
length = friendSuggestions.length;
reducibleJoin15: while (true) {
if (length > value2) {
push = items8.push;
length = r7.length;
Reflect.apply(push, items8, [{'kind': 'suggested-friends-header', 'id': 'suggested-friends-header',
showDivider: length > value2}]);
length = friendSuggestions.length;
reducibleJoin13: while (true) {
if (length > value10) {
r14 = value8;
break reducibleJoin13;
}
length = friendSuggestions.length;
r14 = length;
break reducibleJoin13;
}
friendSuggestionsBinding = friendSuggestions;
slice = friendSuggestionsBinding.slice;
Math = global.Math;
min = Math.min;
length = friendSuggestions.length;
value11 = Reflect.apply(slice, friendSuggestionsBinding, [value2, Reflect.apply(min, Math, [length, r14])]);
forEach = value11.forEach;
Reflect.apply(forEach, value11, [_fun111536]);
length = friendSuggestions.length;
if (length > value10) {
push = items8.push;
Reflect.apply(push, items8, [{'kind': 'suggested-friends-show-all-row',
'id': 'suggested-friends-show-all-row',
suggestedFriends: friendSuggestions}]);
break reducibleJoin15;
}
break reducibleJoin15;
}
break reducibleJoin15;
}
const items4 = [];
arraySpread(items4, items3, arraySpread(items4, items2, value2, r16), r16);
reducibleJoin19: while (true) {
if (!initialized) {
r10 = value2;
break reducibleJoin19;
}
if (!env0_11) {
r10 = value2;
break reducibleJoin19;
}
Math = global.Math;
min = Math.min;
Math2 = global.Math;
max = Math2.max;
value12 = Reflect.apply(max, Math2, [totalNotificationsMentionCount, 1]);
value13 = Reflect.apply(min, Math, [value12, 6]);
if (!(value2 < value13)) {
r10 = value13;
break reducibleJoin19;
}
r2 = value2;
reducibleLoop18: while (true) {
unshift = items4.unshift;
HermesInternal = global.HermesInternal;
concat = HermesInternal.concat;
value14 = 'mp-' + r2;
Reflect.apply(unshift, items4, [{kind: 'mentions-placeholder', id: value14}]);
value15 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
if (value15 < value13) {
r2 = value15;
continue reducibleLoop18;
}
r10 = value13;
r16 = value14;
break reducibleJoin19;
}
}
reducibleJoin21: while (true) {
if (errored) {
push = items4.push;
Reflect.apply(push, items4, [{'kind': 'load-more', 'id': 'load-more'}]);
break reducibleJoin21;
}
break reducibleJoin21;
}
const object2 = {'kind': 'recent-activity-section-header', 'id': 'rash'};
reducibleJoin23: while (true) {
if (r7.length > value2) {
unshift = r7.unshift;
Reflect.apply(unshift, r7, [{'kind': 'hoisted-items-header', 'id': 'hoisted-items-header'}]);
break reducibleJoin23;
}
break reducibleJoin23;
}
const items5 = [];
length = r7.length;
if (length > value2) {
value = items4.splice(value2, value10);
push = items5.push;
items7 = [];
arraySpread(items7, items8, arraySpread(items7, r7, value2, r16), r16);
apply(push, items7, items5, r16);
length = value.length;
value20 = length > value2;
reducibleJoin39: while (true) {
if (value20) {
r1 = value20;
break reducibleJoin39;
}
length = items4.length;
value21 = length > value2;
r1 = value21;
break reducibleJoin39;
}
reducibleJoin41: while (true) {
if (r1) {
push = items5.push;
Reflect.apply(push, items5, [object2]);
break reducibleJoin41;
}
break reducibleJoin41;
}
push = items5.push;
items8 = [];
arraySpread(items8, items4, arraySpread(items8, value, value2, r16), r16);
apply(push, items8, items5, r16);
} else {
length = items2.length;
reducibleJoin28: while (true) {
if (length > value2) {
length = items4.length;
if (length > value2) {
kind = items4[value2].kind;
if (kind !== 'mentions-placeholder') {
r6 = value10;
break reducibleJoin28;
}
length = items2.length;
value = r10 + length - 1;
r6 = value;
break reducibleJoin28;
}
r6 = value10;
break reducibleJoin28;
}
r6 = value10;
break reducibleJoin28;
}
value = items4.splice(value2, r6);
length = items8.length;
value16 = value2 === length;
reducibleJoin30: while (true) {
if (value16) {
length = items4.length;
value17 = length > value2;
r1 = value17;
break reducibleJoin30;
}
r1 = value16;
break reducibleJoin30;
}
reducibleJoin32: while (true) {
if (r1) {
push = items5.push;
Reflect.apply(push, items5, [object2]);
value19 = true;
r6 = value19;
break reducibleJoin32;
}
r6 = false;
break reducibleJoin32;
}
push = items5.push;
items6 = [];
arraySpread(items6, items8, arraySpread(items6, value, value2, r16), r16);
apply(push, items6, items5, r16);
value = !r6;
reducibleJoin34: while (true) {
if (r6) {
r1 = value;
break reducibleJoin34;
}
length = items4.length;
value = length > value2;
r1 = value;
break reducibleJoin34;
}
reducibleJoin36: while (true) {
if (r1) {
push = items5.push;
Reflect.apply(push, items5, [object2]);
break reducibleJoin36;
}
break reducibleJoin36;
}
push = items5.push;
items8 = [];
arraySpread(items8, items4, value2, r16);
apply(push, items8, items5, r16);
}
return items5;
}
function _fun111537() { // fn#111537, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14971:4859, offset: 0x023a66d9, size: 116 bytes, params: 1, frame: 16
var value2;
var defaultImport;
var track;
var NOTIFICATION_CENTER_LOADED;
var object2;
if (initialized) {
value2 = environment.__proto__;
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
track = defaultImport.track;
NOTIFICATION_CENTER_LOADED = AnalyticEvents.NOTIFICATION_CENTER_LOADED;
object2 = {version: 'v2', load_start_timestamp: env0_18};
object2.tti_millis = global.Date.now() - env0_18;
Reflect.apply(track, defaultImport, [NOTIFICATION_CENTER_LOADED, object2]);
}
}
function _fun111538() { // fn#111538, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14971:4997, offset: 0x023a674d, size: 233 bytes, params: 1, frame: 17
var environment;
var binding;
var value2;
var value3;
var value;
if (env0_3) {
binding = env0_27;
value2 = binding.filter(function(a0) {
return a0.kind === 'notification-center-item';
});
env0_22.current.clear();
value2.forEach(_fun111540);
binding = env0_13;
if (binding !== env0_15) {
env0_16(env0_13);
value = value2.filter(_fun111541);
value = value.map(_fun111542);
value3 = environment.__proto__;
(require(14777) /* metro dependency 14777: NotificationCenterItemsActions */).markNotificationCenterLocalItemsAcked(value);
value = require(14777) /* metro dependency 14777: NotificationCenterItemsActions */;
value.bulkMarkNotificationCenterItemsAcked(value2.filter(_fun111543));
value = require(14779) /* metro dependency 14779: NotificationCenterStoreActions */;
value.clearNotificationGuildMentions();
}
}
}
function _fun111544() { // fn#111544, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14971:5453, offset: 0x023a68d0, size: 74 bytes, params: 1, frame: 12
if (env0_0) {
env0_17(false);
}
(require(14777) /* metro dependency 14777: NotificationCenterItemsActions */).setNotificationCenterTabFocused(env0_0);
return _fun111545;
}
function _fun111546() { // fn#111546, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14971:5582, offset: 0x023a6942, size: 27 bytes, params: 1, frame: 11
if (env0_3) {
env0_17(true);
}
}
function _fun111547(a0, a1) { // fn#111547, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14971:6067, offset: 0x023a695d, size: 49 bytes, params: 3, frame: 15
const ForYouMentionPlaceholder = (require(14780) /* metro dependency 14780: ForYouMentionPlaceholder */).ForYouMentionPlaceholder;
return <ForYouMentionPlaceholder key={a1} />;
}
function _fun111525(a0) { // fn#111525, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14971:2153, offset: 0x023a5daf, size: 24 bytes, params: 2, frame: 11
return a0.filter(_fun111526);
}
function _fun111528(a0) { // fn#111528, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14971:2329, offset: 0x023a62d0, size: 69 bytes, params: 2, frame: 14
var r0;
var value;
const forceUnacked = a0.forceUnacked;
if (forceUnacked) {
r0 = forceUnacked;
} else {
value = environment.__proto__.__proto__;
value = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
value = value.compare(a0.id, id);
value = value > 0;
r0 = value;
}
return r0;
}
function sortBySnowflake(a0) { // fn#111529, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14971:2396, offset: 0x023a6315, size: 27 bytes, params: 2, frame: 11
a0.sort(_fun111530);
}
function _fun111531(a0) { // fn#111531, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14971:2481, offset: 0x023a6371, size: 68 bytes, params: 2, frame: 13
var r0;
let value = a0.kind !== 'notification-center-item';
if (value) {
r0 = value;
} else {
value = environment.__proto__.__proto__;
value = require(5072) /* metro dependency 5072: AgeGateUtils */;
value = !value.shouldShowAgeGateForChannelId(a0.message_channel_id);
r0 = value;
}
return r0;
}
function _fun111532(a0) { // fn#111532, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14971:2616, offset: 0x023a63b5, size: 650 bytes, params: 2, frame: 19
var r1;
var r3;
var value;
var moduleValue;
var acked;
var value2;
var current;
var has;
var id;
var value3;
var defaultImport;
var value5;
var moduleValue2;
var isRemoteAcked;
var value6;
var isRemoteAcked2;
const LinkingTypes = (require(676) /* metro dependency 676: ConstantsIOS */).LinkingTypes;
var value7;
var add;
if (a0.kind === 'notification-center-item') {
if (a0.local_id != null) {
acked = a0.acked;
value = !acked;
if (acked) {
r1 = value;
} else {
value = environment.__proto__.__proto__;
value = !NotificationCenterStore.isLocalItemAcked(a0);
r1 = value;
}
r3 = r1;
} else {
value = environment.__proto__.__proto__;
moduleValue = require(4788) /* metro dependency 4788: NotificationCenterUtils */;
if (moduleValue.isMentionItem(a0)) {
if (a0.acked) {
moduleValue2 = require(4788) /* metro dependency 4788: NotificationCenterUtils */;
isRemoteAcked = moduleValue2.isRemoteAcked;
value6 = environment.__proto__;
isRemoteAcked2 = Reflect.apply(isRemoteAcked, moduleValue2, [a0, env1_2]);
r3 = a0.type !== 'go_live_push' ? !isRemoteAcked2 : a0.deeplink != null ? (importDefault(4093) /* metro dependency 4093: parseURL */)(a0.deeplink).payload.type === LinkingTypes.VOICE_CHANNEL && !isRemoteAcked2 : !isRemoteAcked2;
} else if (a0.message_channel_id == null) {
value5 = environment.__proto__;
if (env1_15 == null) {
moduleValue2 = require(4788) /* metro dependency 4788: NotificationCenterUtils */;
isRemoteAcked = moduleValue2.isRemoteAcked;
value6 = environment.__proto__;
isRemoteAcked2 = Reflect.apply(isRemoteAcked, moduleValue2, [a0, env1_2]);
r3 = a0.type !== 'go_live_push' ? !isRemoteAcked2 : a0.deeplink != null ? (importDefault(4093) /* metro dependency 4093: parseURL */)(a0.deeplink).payload.type === LinkingTypes.VOICE_CHANNEL && !isRemoteAcked2 : !isRemoteAcked2;
} else {
value = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
value = value.compare(a0.id, env1_15);
value = value > 0;
r3 = value;
}
} else {
value2 = environment.__proto__;
current = env1_21.current;
if (current.has(a0.id)) {
value5 = environment.__proto__;
if (env1_15 == null) {
moduleValue2 = require(4788) /* metro dependency 4788: NotificationCenterUtils */;
isRemoteAcked = moduleValue2.isRemoteAcked;
value6 = environment.__proto__;
isRemoteAcked2 = Reflect.apply(isRemoteAcked, moduleValue2, [a0, env1_2]);
r3 = a0.type !== 'go_live_push' ? !isRemoteAcked2 : a0.deeplink != null ? (importDefault(4093) /* metro dependency 4093: parseURL */)(a0.deeplink).payload.type === LinkingTypes.VOICE_CHANNEL && !isRemoteAcked2 : !isRemoteAcked2;
} else {
value = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
value = value.compare(a0.id, env1_15);
value = value > 0;
r3 = value;
}
} else {
value3 = ReadStateStore.ackMessageId(a0.message_channel_id);
defaultImport = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
if (defaultImport.compare(a0.message_id, value3) <= 0) {
setReadNotifItemToAcked(a0);
r3 = false;
} else {
value5 = environment.__proto__;
if (env1_15 == null) {
moduleValue2 = require(4788) /* metro dependency 4788: NotificationCenterUtils */;
isRemoteAcked = moduleValue2.isRemoteAcked;
value6 = environment.__proto__;
isRemoteAcked2 = Reflect.apply(isRemoteAcked, moduleValue2, [a0, env1_2]);
r3 = a0.type !== 'go_live_push' ? !isRemoteAcked2 : a0.deeplink != null ? (importDefault(4093) /* metro dependency 4093: parseURL */)(a0.deeplink).payload.type === LinkingTypes.VOICE_CHANNEL && !isRemoteAcked2 : !isRemoteAcked2;
} else {
value = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
value = value.compare(a0.id, env1_15);
value = value > 0;
r3 = value;
}
}
}
}
} else {
moduleValue2 = require(4788) /* metro dependency 4788: NotificationCenterUtils */;
isRemoteAcked = moduleValue2.isRemoteAcked;
value6 = environment.__proto__;
isRemoteAcked2 = Reflect.apply(isRemoteAcked, moduleValue2, [a0, env1_2]);
r3 = a0.type !== 'go_live_push' ? !isRemoteAcked2 : a0.deeplink != null ? (importDefault(4093) /* metro dependency 4093: parseURL */)(a0.deeplink).payload.type === LinkingTypes.VOICE_CHANNEL && !isRemoteAcked2 : !isRemoteAcked2;
}
}
if (!r3) {
value = environment.__proto__;
setReadNotifItemToAcked(a0);
}
value = environment.__proto__;
current = env1_22.current;
has = current.has;
id = a0.id;
if (Reflect.apply(has, current, [id])) {
env0_1.push(a0);
a0.acked = false;
} else {
value7 = environment.__proto__.__proto__;
if (isHoisted(a0)) {
if (r3) {
env0_1.push(a0);
} else if (a0.forceUnacked) {
env0_1.push(a0);
} else if (r3) {
env0_2.push(a0);
} else {
env0_3.push(a0);
}
} else if (r3) {
env0_2.push(a0);
} else {
env0_3.push(a0);
}
}
current = env1_21.current;
add = current.add;
id = a0.id;
Reflect.apply(add, current, [id]);
}
}
function _fun111533(a0) { // fn#111533, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14971:3364, offset: 0x023a663f, size: 60 bytes, params: 2, frame: 13
const type = a0.type;
const value = environment.__proto__.__proto__;
const NotificationCenterLocalItems = (require(4624) /* metro dependency 4624: NotificationCenterItemsTypes */).NotificationCenterLocalItems;
const INCOMING_FRIEND_REQUESTS = NotificationCenterLocalItems.INCOMING_FRIEND_REQUESTS;
return type === INCOMING_FRIEND_REQUESTS && a0.acked;
}
function _fun111535(a0) { // fn#111535, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14971:3746, offset: 0x023a6686, size: 28 bytes, params: 2, frame: 11
let value = environment.__proto__;
value = !env1_23(a0);
a0.enableBadge = value;
return value;
}
function _fun111536(a0) { // fn#111536, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14971:3965, offset: 0x023a66a2, size: 55 bytes, params: 2, frame: 13
const binding = env0_4;
const push = binding.push;
const user = a0.user;
Reflect.apply(push, binding, [{kind: 'suggested-friends-row', id: user.id, suggestedFriend: a0}]);
}
function _fun111540(a0) { // fn#111540, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14971:5099, offset: 0x023a684a, size: 30 bytes, params: 2, frame: 11
if (!isHoisted(a0)) {
a0.enableBadge = false;
}
}
function _fun111541(a0) { // fn#111541, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14971:5167, offset: 0x023a6868, size: 41 bytes, params: 2, frame: 12
var r0;
let value = a0.local_id != null;
if (value) {
value = environment.__proto__.__proto__;
value = !NotificationCenterStore.isLocalItemAcked(a0);
r0 = value;
} else {
r0 = value;
}
return r0;
}
function _fun111543(a0) { // fn#111543, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14971:5340, offset: 0x023a689c, size: 52 bytes, params: 2, frame: 13
let value = environment.__proto__.__proto__;
value = require(4788) /* metro dependency 4788: NotificationCenterUtils */;
return !value.isRemoteAcked(a0, env1_2);
}
function _fun111545() { // fn#111545, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14971:5511, offset: 0x023a691a, size: 40 bytes, params: 1, frame: 11
const value = environment.__proto__.__proto__;
return (require(14777) /* metro dependency 14777: NotificationCenterItemsActions */).setNotificationCenterTabFocused(false);
}
function _fun111526({user}) { // fn#111526, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14971:2166, offset: 0x023a5dc7, size: 36 bytes, params: 2, frame: 2
const id = user.id;
user = env1_0.user;
return id !== user.id;
}
function _fun111530({id}, {id}) { // fn#111530, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14971:2408, offset: 0x023a6330, size: 65 bytes, params: 3, frame: 13
let value = environment.__proto__.__proto__.__proto__;
value = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
value = value.compare(id, id);
return -1 * value;
}
@@ -0,0 +1,127 @@
/* Metro module 14772; source: modules/notification_center/native/NotificationCenterPermissionNudge.tsx; dependencies: [57, 31, 27, 661, 1376, 11873, 33, 4501, 697, 683, 10629, 4573, 1244, 4578, 11874, 5278, 5312, 14773, 7013, 1365, 2] */
function _fun111501(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111501, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14969:6, offset: 0x023a4b4f, size: 597 bytes, params: 8, frame: 24
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
let value = require(31) /* metro dependency 31 */;
const env0_4 = value.useCallback;
const env0_5 = value.useEffect;
const env0_6 = (require(27) /* metro dependency 27 */).View;
value = require(661) /* metro dependency 661: Constants */;
const env0_7 = value.AnalyticEvents;
const env0_8 = value.NOOP;
const env0_9 = (require(1376) /* metro dependency 1376: DismissibleContentConstants */).ContentDismissActionType;
value = require(11873) /* metro dependency 11873: NotificationPermissionConstants */;
const env0_10 = value.EventActionType;
const env0_11 = value.EventActionLocation;
const env0_12 = value.NotificationNudgeAnalyticsAction;
const env0_13 = value.NotificationNudgeSurface;
value = require(33) /* metro dependency 33 */;
const env0_14 = value.jsx;
const env0_15 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object3 = {};
const object5 = {'flexDirection': 'row', 'paddingLeft': 24, 'paddingRight': null, 'paddingVertical': null,
'backgroundColor': null, 'alignItems': 'flex-start', 'borderBottomWidth': 1};
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object5.paddingRight = PX_12;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object5.paddingVertical = PX_16;
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object5.backgroundColor = BACKGROUND_BASE_LOW;
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object5.borderColor = BORDER_SUBTLE;
object5.gap = 16;
object3.container = object5;
object3.contentContainer = {flex: 1};
const object6 = {'width': 48, 'height': 48, 'borderRadius': null, 'backgroundColor': null, 'alignItems': 'center',
'justifyContent': 'center'};
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
const BACKGROUND_MOD_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_STRONG;
object6.backgroundColor = BACKGROUND_MOD_STRONG;
object3.iconContainer = object6;
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object3.ctaButton = {alignSelf: 'flex-start', marginTop: PX_12};
const env0_16 = Reflect.apply(createStyles, value, [object3]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notification_center/native/NotificationCenterPermissionNudge.tsx');
exports.default = NotificationCenterPermissionNudge;
}
function NotificationCenterBannerImpl({onDismiss}) { // fn#111502, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14969:922, offset: 0x023a4da4, size: 740 bytes, params: 2, frame: 32
const styles = useStyles();
useEffect(function() {
var defaultImport = importDefault(dependencyMap[9]);
var CONTEXTUAL_REMINDER_ACTION = AnalyticEvents.CONTEXTUAL_REMINDER_ACTION;
defaultImport.track(CONTEXTUAL_REMINDER_ACTION, {action: NotificationNudgeAnalyticsAction.IMPRESSION,
prompt_type: NotificationNudgeSurface.NOTIFICATION_CENTER_BANNER});
}, []);
const BellSlashIcon = (require(10629) /* metro dependency 10629: BellSlashIcon */).BellSlashIcon;
const ICON_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.ICON_STRONG;
const items3 = [<View style={styles.iconContainer}><BellSlashIcon size="md" color={ICON_STRONG} /></View>];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const G6YBna = (require(1244) /* metro dependency 1244: indexNative */).t.G6YBna;
const items2 = [<Text variant="text-md/semibold" color="text-default">{Reflect.apply(string, intl,
[G6YBna])}</Text>];
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
items2[1] = <Text variant="text-md/medium" color="text-muted" style={{marginTop: PX_4}}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['9CoPDE'])}</Text>;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
items2[2] = <View style={styles.ctaButton}><Button variant="primary" size="md" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.a4bgO0)} onPress={onPress_111504} /></View>;
items3[1] = <View style={styles.contentContainer}>{items2}</View>;
const PressableHighlight = (require(5278) /* metro dependency 5278: Pressables */).PressableHighlight;
string = intl.string;
const WAI6xu = (require(1244) /* metro dependency 1244: indexNative */).t.WAI6xu;
const XSmallIcon = (require(5312) /* metro dependency 5312: XSmallIcon */).XSmallIcon;
items3[2] = <PressableHighlight onPress={function() {
var defaultImport = importDefault(dependencyMap[9]);
var CONTEXTUAL_REMINDER_ACTION = AnalyticEvents.CONTEXTUAL_REMINDER_ACTION;
defaultImport.track(CONTEXTUAL_REMINDER_ACTION, {action: NotificationNudgeAnalyticsAction.DISMISS,
prompt_type: NotificationNudgeSurface.NOTIFICATION_CENTER_BANNER});
onDismiss();
}} hitSlop={8} accessibilityRole="button" accessibilityLabel={Reflect.apply(string, intl,
[WAI6xu])}><XSmallIcon size="sm" color="icon-strong" /></PressableHighlight>;
return (
<View style={styles.container}>
{items3}
</View>
);
}
function NotificationCenterPermissionNudge() { // fn#111506, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14969:2333, offset: 0x023a51b5, size: 276 bytes, params: 1, frame: 19
const defaultImport = importDefault(14773) /* metro dependency 14773: NotificationCenterPermissionNudgeExperiment */;
const useConfig = defaultImport.useConfig;
const enabled = Reflect.apply(useConfig, defaultImport, [{location: 'NotificationCenterPermissionNudge'}]).enabled;
const value2 = (require(11874) /* metro dependency 11874: NotificationPermissionUtil */).useCanSeePushNotificationNudge();
const useSelectedDismissibleContentModule = require(7013) /* metro dependency 7013: useSelectedDismissibleContent */;
const useSelectedTimeRecurringDismissibleContent = useSelectedDismissibleContentModule.useSelectedTimeRecurringDismissibleContent;
const value3 = null;
let NOTIFICATION_NUDGE_NOTIFICATION_CENTER_BANNER = enabled && value2 ? (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent.NOTIFICATION_NUDGE_NOTIFICATION_CENTER_BANNER : value3;
const value5 = env0_3(Reflect.apply(useSelectedTimeRecurringDismissibleContent, useSelectedDismissibleContentModule,
[NOTIFICATION_NUDGE_NOTIFICATION_CENTER_BANNER, {cooldownDurationMs: 604800000}]), 2);
const property = value5[0];
const value6 = useCallback(_fun111507, [value5[1]]);
const DismissibleContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent;
NOTIFICATION_NUDGE_NOTIFICATION_CENTER_BANNER = DismissibleContent.NOTIFICATION_NUDGE_NOTIFICATION_CENTER_BANNER;
return property !== NOTIFICATION_NUDGE_NOTIFICATION_CENTER_BANNER ? value3 : <NotificationCenterBannerImpl onDismiss={value6} />;
}
function NotificationCenterBannerImplOnPress() { // fn#111504, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14969:1695, owner: NotificationCenterBannerImpl.onPress, offset: 0x023a50d7, size: 132 bytes, params: 1, frame: 18
const notificationPermissionUtilModule = require(11874) /* metro dependency 11874: NotificationPermissionUtil */;
const requestPushNotificationPermission = notificationPermissionUtilModule.requestPushNotificationPermission;
const ALLOW_TO_REQUEST = EventActionType.ALLOW_TO_REQUEST;
const NOTIFICATION_CENTER = EventActionLocation.NOTIFICATION_CENTER;
Reflect.apply(requestPushNotificationPermission, notificationPermissionUtilModule, [ALLOW_TO_REQUEST,
NOTIFICATION_CENTER, NOOP]);
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const CONTEXTUAL_REMINDER_ACTION = AnalyticEvents.CONTEXTUAL_REMINDER_ACTION;
const ACCEPT = NotificationNudgeAnalyticsAction.ACCEPT;
const NOTIFICATION_CENTER_BANNER = NotificationNudgeSurface.NOTIFICATION_CENTER_BANNER;
Reflect.apply(track, defaultImport, [CONTEXTUAL_REMINDER_ACTION, {action: ACCEPT,
prompt_type: NOTIFICATION_CENTER_BANNER}]);
}
@@ -0,0 +1,11 @@
/* Metro module 14773; source: modules/notification_center/native/NotificationCenterPermissionNudgeExperiment.tsx; dependencies: [1854, 2] */
function _fun111508(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111508, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14970:6, offset: 0x023a52e6, size: 145 bytes, params: 8, frame: 20
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = require(1854) /* metro dependency 1854: apex */;
value = value.createApexExperiment({'name': '2026-04-notification-center-push-banner', 'kind': 'user',
defaultConfig: {enabled: false}, variations: {[1]: {enabled: true}}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notification_center/native/NotificationCenterPermissionNudgeExperiment.tsx');
exports.default = value;
}