This commit is contained in:
janisslsm committed 2026-07-28 01:06:53 +03:00
1 parent af3b49f756
commit 1781d25a15
22448 files changed
+2731829 -2650550

No files matched your search

@@ -1,8 +1,10 @@
/* Metro module 14789; source: modules/notification_center/Constants.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun111709(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111709, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14986:6, offset: 0x023ae426, size: 134 bytes, params: 8, frame: 15
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notification_center/Constants.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/notification_center/Constants.tsx');
exports.PROFILE_BACKGROUND = '#83DDC5';
exports.FRIEND_BACKGROUND = '#F47FFF';
exports.MESSAGE_BACKGROUND = '#FFDE4D';
@@ -10,3 +12,4 @@ function _fun111709(global, require, importDefault, importAll, module, exports,
exports.REPLY_BACKGROUND = '#3498DB';
}
global.__d(_fun111709, 14789, [2]) /* metro module 14789, dependencies: [2] */;
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
@@ -1,18 +1,20 @@
/* Metro module 4624; source: modules/notification_center/NotificationCenterItemsTypes.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun39773(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#39773, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4802:6, offset: 0x010e9d73, size: 555 bytes, params: 8, frame: 21
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const object = {UPDATE_PROFILE: 0};
object[0] = 'UPDATE_PROFILE';
object.FIND_FRIENDS = 1;
object[1] = 'FIND_FRIENDS';
object.ADD_FRIEND = 2;
object[2] = 'ADD_FRIEND';
object.FIRST_MESSAGE = 3;
object[3] = 'FIRST_MESSAGE';
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notification_center/NotificationCenterItemsTypes.tsx');
const object2 = {UPDATE_PROFILE: 0};
object2[0] = 'UPDATE_PROFILE';
object2.FIND_FRIENDS = 1;
object2[1] = 'FIND_FRIENDS';
object2.ADD_FRIEND = 2;
object2[2] = 'ADD_FRIEND';
object2.FIRST_MESSAGE = 3;
object2[3] = 'FIRST_MESSAGE';
(FileImportTrackerModule).fileFinishedImporting('modules/notification_center/NotificationCenterItemsTypes.tsx');
exports.NotificationCenterScenes = {LANDING: 'notification_center_landing'};
exports.ItemEnum = object;
exports.ItemEnum = object2;
exports.NotificationCenterActionTypes = {MARK_ALL_READ: 'mark_all_read', CLICKED: 'clicked',
FRIEND_REQUESTS_BUTTON_CLICK: 'friend_requests_button_click', ACTION_BUTTON: 'action_button'};
exports.NotificationCenterTabs = {ForYou: 'ForYou', Mentions: 'Mentions', MessageReminders: 'MessageReminders'};
@@ -32,3 +34,4 @@ function _fun39773(global, require, importDefault, importAll, module, exports, d
INCOMING_GAME_FRIEND_REQUESTS_ACCEPTED: 'INCOMING_GAME_FRIEND_REQUESTS_ACCEPTED'};
}
global.__d(_fun39773, 4624, [2]) /* metro module 4624, dependencies: [2] */;
@@ -1,22 +1,26 @@
/* Metro module 14775; source: modules/notification_center/NotificationCenterStore.tsx; dependencies: [6, 7, 15, 17, 18, 57, 5215, 672, 4624, 21, 566, 694, 2] */
import ClassCallCheck from '../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import Module00057 from '../../by-id/module-00057.js'; /* Metro dependency 57 */
import Flux from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import Durations from '../../utils/Durations.tsx'; /* Metro dependency 672 */
import RecentMentionsStore from '../recents/RecentMentionsStore.tsx'; /* Metro dependency 5215 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun111548(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111548, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14972:6, offset: 0x023a698e, size: 435 bytes, params: 8, frame: 20
const env0_0 = require;
const closure = LOAD_NOTIFICATION_CENTER_ITEMS_FAILURE_111552;
const LOAD_NOTIFICATION_CENTER_ITEMS_FAILURE_1115522 = LOAD_NOTIFICATION_CENTER_ITEMS_FAILURE_111552;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
const env0_8 = importDefault(57) /* metro dependency 57 */;
const recentMentionsStore = importDefault(5215) /* metro dependency 5215: RecentMentionsStore */;
const Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
const Millis = (Durations).Millis;
const DAY = Millis.DAY;
const env0_10 = 90 * DAY;
({'tab': null, 'localItemAcks': null, 'hasNewMentions': false, 'isDataStale': false,
'isRefreshing': false}).localItemAcks = {};
const PersistedStore = (importDefault(566) /* metro dependency 566: flux */).PersistedStore;
const PersistedStore = (Flux).PersistedStore;
let value = _fun111553(PersistedStore);
value.displayName = 'NotificationCenterStore';
value.persistKey = 'NotificationCenterStore';
@@ -24,177 +28,193 @@ function _fun111548(global, require, importDefault, importAll, module, exports,
NOTIFICATION_CENTER_SET_TAB: NOTIFICATION_CENTER_SET_TAB,
NOTIFICATION_CENTER_ITEMS_LOCAL_ACK: function({localIds}) {
localIds.forEach(_fun111566);
}, NOTIFICATION_CENTER_REFRESH: NOTIFICATION_CENTER_REFRESH, LOAD_NOTIFICATION_CENTER_ITEMS_FAILURE: closure,
LOAD_NOTIFICATION_CENTER_ITEMS_SUCCESS: closure});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notification_center/NotificationCenterStore.tsx');
}, NOTIFICATION_CENTER_REFRESH: NOTIFICATION_CENTER_REFRESH,
LOAD_NOTIFICATION_CENTER_ITEMS_FAILURE: LOAD_NOTIFICATION_CENTER_ITEMS_FAILURE_1115522,
LOAD_NOTIFICATION_CENTER_ITEMS_SUCCESS: LOAD_NOTIFICATION_CENTER_ITEMS_FAILURE_1115522});
(FileImportTrackerModule).fileFinishedImporting('modules/notification_center/NotificationCenterStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_111549() { // fn#111549, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14972:168, offset: 0x023a6b41, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
function _isNativeReflectConstruct_111549() { // fn#111549, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14972:168, offset: 0x023a6b41, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_111549_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_111549_isNativeReflectConstruct = function() {
return !!result;
})();
}
function LOAD_NOTIFICATION_CENTER_ITEMS_FAILURE_111552() { // fn#111552, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14972:1656, offset: 0x023a6ba3, size: 39 bytes, params: 1, frame: 3
env0_11.hasNewMentions = false;
env0_11.isDataStale = false;
env0_11.isRefreshing = false;
}
function _fun111553(a0) { // fn#111553, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14972:474, offset: 0x023a6bca, size: 251 bytes, params: 2, frame: 16
const closure = NotificationCenterStore;
env0_7(closure, a0);
return env0_4(closure, [{key: 'initialize', value: value_111555}, {key: 'getState', value: value_111556},
{key: 'getTab', value: value_111557}, {key: 'isLocalItemAcked', value: value_111558}, {key: 'hasNewMentions',
value: value_111559}, {key: 'isDataStale', value: value_111560}, {key: 'isRefreshing', value: value_111561},
{key: 'shouldReload', value: value_111562}]);
}
function MESSAGE_CREATE_111563({message}) { // fn#111563, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14972:1857, offset: 0x023a6e6a, size: 52 bytes, params: 2, frame: 12
if (RecentMentionsStore.hasMention(message.id)) {
env0_11.hasNewMentions = true;
function LOAD_NOTIFICATION_CENTER_ITEMS_FAILURE_111552() { // fn#111552, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14972:1656, offset: 0x023a6ba3, size: 39 bytes, params: 1, frame: 3
env0_11.hasNewMentions = false;
env0_11.isDataStale = false;
env0_11.isRefreshing = false;
}
}
function NOTIFICATION_CENTER_SET_TAB({tab}) { // fn#111564, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14972:1970, offset: 0x023a6e9e, size: 42 bytes, params: 2, frame: 13
const object2 = {};
copyDataProperties(object2, env0_11, undefined);
object2['tab'] = tab;
}
function _fun111553(a0) { // fn#111553, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14972:474, offset: 0x023a6bca, size: 251 bytes, params: 2, frame: 16
const NotificationCenterStore2 = NotificationCenterStore;
Inherits(NotificationCenterStore2, a0);
return CreateClass(NotificationCenterStore2, [{key: 'initialize', value: value_111555}, {key: 'getState',
value: value_111556}, {key: 'getTab', value: value_111557}, {key: 'isLocalItemAcked', value: value_111558},
{key: 'hasNewMentions', value: value_111559}, {key: 'isDataStale', value: value_111560}, {key: 'isRefreshing',
value: value_111561}, {key: 'shouldReload', value: value_111562}]);
function NotificationCenterStore() { // fn#111554, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14972:486, offset: 0x0108afcb, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_3(this, NotificationCenterStore);
const value3 = env1_6(NotificationCenterStore);
return env1_5(this, _isNativeReflectConstruct_111549() ? global.Reflect.construct(value3, arguments,
env1_6(this).constructor) : value3.apply(this, arguments));
}
function NOTIFICATION_CENTER_ITEMS_LOCAL_ACK({localIds}) { // fn#111565, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14972:2051, offset: 0x023a6ec8, size: 32 bytes, params: 2, frame: 11
localIds.forEach(_fun111566);
}
function NOTIFICATION_CENTER_REFRESH() { // fn#111567, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14972:2190, offset: 0x023a6f35, size: 19 bytes, params: 1, frame: 2
env0_11.isRefreshing = true;
}
function value_111555(a0) { // fn#111555, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14972:819, offset: 0x023a6cc5, size: 181 bytes, params: 2, frame: 23
var r5;
var r4;
var object2;
var value2;
var length;
var value3;
var property;
var value4;
var property2;
var Date;
var now;
var value5;
var value6;
this.waitFor(RecentMentionsStore);
if (a0 != null) {
env1_11 = a0;
r5 = a0.localItemAcks ?? ({});
object2 = {};
value2 = global.Object.entries(r5);
length = value2.length;
value3 = 0;
if (value3 < length) {
r4 = value3;
while (true) {
property = value2[r4];
value4 = env1_8(property, 2);
property = value4[value3];
property2 = value4[1];
Date = global.Date;
now = Date.now;
value5 = Reflect.apply(now, Date, []) - property2;
if (value5 < env1_10) {
object2[property] = property2;
}
value6 = typeof r4 === 'bigint' ? r4 + 1n : +r4 + 1;
function value_111555(a0) { // fn#111555, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14972:819, offset: 0x023a6cc5, size: 181 bytes, params: 2, frame: 23
var r5;
var r4;
var object;
var value2;
var length;
var value3;
var property;
var value4;
var property2;
var Date;
var now;
var value5;
var value6;
this.waitFor(RecentMentionsStore);
if (a0 != null) {
env1_11 = a0;
r5 = a0.localItemAcks ?? ({});
object = {};
value2 = global.Object.entries(r5);
length = value2.length;
if (value6 < length) {
r4 = value6;
continue;
value3 = 0;
if (value3 < length) {
r4 = value3;
while (true) {
property = value2[r4];
value4 = env1_8(property, 2);
property = value4[value3];
property2 = value4[1];
Date = global.Date;
now = Date.now;
value5 = Reflect.apply(now, Date, []) - property2;
if (value5 < env1_10) {
object[property] = property2;
}
value6 = typeof r4 === 'bigint' ? r4 + 1n : +r4 + 1;
length = value2.length;
if (value6 < length) {
r4 = value6;
continue;
}
break;
}
}
break;
a0.localItemAcks = object;
env1_11.isDataStale = true;
}
}
a0.localItemAcks = object2;
env1_11.isDataStale = true;
}
}
function value_111557() { // fn#111557, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14972:1141, offset: 0x023a6d7a, size: 55 bytes, params: 1, frame: 12
return env1_11.tab ?? (require(4624) /* metro dependency 4624: NotificationCenterItemsTypes */).NotificationCenterTabs.ForYou;
}
function value_111558(a0) { // fn#111558, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14972:1253, offset: 0x023a6db1, size: 99 bytes, params: 2, frame: 15
var r1;
var r0;
var value2;
var defaultImport;
let value = a0.local_id != null;
if (value) {
value = environment.__proto__;
value2 = env1_11.localItemAcks[a0.local_id] != null;
if (value2) {
r1 = value2;
} else {
defaultImport = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
r1 = defaultImport.age(a0.id) > env1_10;
function value_111556() { // fn#111556, offset: 0x00ef8482, size: 9 bytes, params: 1, frame: 1
return env1_11;
}
r0 = r1;
} else {
r0 = value;
function value_111557() { // fn#111557, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14972:1141, offset: 0x023a6d7a, size: 55 bytes, params: 1, frame: 12
return env1_11.tab ?? (require(4624) /* metro dependency 4624: NotificationCenterItemsTypes */).NotificationCenterTabs.ForYou;
}
function value_111558(a0) { // fn#111558, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14972:1253, offset: 0x023a6db1, size: 99 bytes, params: 2, frame: 15
var r1;
var r0;
var value2;
var defaultImport;
let value = a0.local_id != null;
if (value) {
value = environment.__proto__;
value2 = env1_11.localItemAcks[a0.local_id] != null;
if (value2) {
r1 = value2;
} else {
defaultImport = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
r1 = defaultImport.age(a0.id) > env1_10;
}
r0 = r1;
} else {
r0 = value;
}
return r0;
}
function value_111559() { // fn#111559, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14972:1377, offset: 0x023a6e14, size: 15 bytes, params: 1, frame: 1
return env1_11.hasNewMentions;
}
function value_111560() { // fn#111560, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14972:1439, offset: 0x023a6e23, size: 15 bytes, params: 1, frame: 1
return env1_11.isDataStale;
}
function value_111561() { // fn#111561, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14972:1499, offset: 0x023a6e32, size: 15 bytes, params: 1, frame: 1
return env1_11.isRefreshing;
}
function value_111562() { // fn#111562, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14972:1560, offset: 0x023a6e41, size: 41 bytes, params: 1, frame: 3
let r0 = env1_11.hasNewMentions || env1_11.isDataStale;
r0 = !r0 ? env1_11.isRefreshing : r0;
return r0;
}
}
return r0;
}
function value_111559() { // fn#111559, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14972:1377, offset: 0x023a6e14, size: 15 bytes, params: 1, frame: 1
return env1_11.hasNewMentions;
}
function MESSAGE_CREATE_111563({message}) { // fn#111563, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14972:1857, offset: 0x023a6e6a, size: 52 bytes, params: 2, frame: 12
const recentMentionsStoreBinding = RecentMentionsStore;
if (recentMentionsStoreBinding.hasMention(message.id)) {
env0_11.hasNewMentions = true;
}
}
function value_111560() { // fn#111560, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14972:1439, offset: 0x023a6e23, size: 15 bytes, params: 1, frame: 1
return env1_11.isDataStale;
}
function NOTIFICATION_CENTER_SET_TAB({tab}) { // fn#111564, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14972:1970, offset: 0x023a6e9e, size: 42 bytes, params: 2, frame: 13
const object = {};
copyDataProperties(object, env0_11, undefined);
object['tab'] = tab;
}
function value_111561() { // fn#111561, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14972:1499, offset: 0x023a6e32, size: 15 bytes, params: 1, frame: 1
return env1_11.isRefreshing;
}
function NOTIFICATION_CENTER_ITEMS_LOCAL_ACK({localIds}) { // fn#111565, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14972:2051, offset: 0x023a6ec8, size: 32 bytes, params: 2, frame: 11
localIds.forEach(_fun111566);
function _fun111566(a0) { // fn#111566, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14972:2095, offset: 0x023a6ee8, size: 77 bytes, params: 2, frame: 14
const object = {};
copyDataProperties(object, env1_11, undefined);
const object2 = {};
copyDataProperties(object2, env1_11.localItemAcks, undefined);
const Date = global.Date;
object2[a0] = Date.now();
object['localItemAcks'] = object2;
}
function value_111562() { // fn#111562, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14972:1560, offset: 0x023a6e41, size: 41 bytes, params: 1, frame: 3
let r0 = env1_11.hasNewMentions || env1_11.isDataStale;
r0 = !r0 ? env1_11.isRefreshing : r0;
return r0;
}
}
function NOTIFICATION_CENTER_REFRESH() { // fn#111567, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14972:2190, offset: 0x023a6f35, size: 19 bytes, params: 1, frame: 2
env0_11.isRefreshing = true;
}
function _fun111566(a0) { // fn#111566, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14972:2095, offset: 0x023a6ee8, size: 77 bytes, params: 2, frame: 14
const object3 = {};
copyDataProperties(object3, env1_11, undefined);
const object4 = {};
copyDataProperties(object4, env1_11.localItemAcks, undefined);
const Date = global.Date;
object4[a0] = Date.now();
object3['localItemAcks'] = object4;
}
global.__d(_fun111548, 14775, [6, 7, 15, 17, 18, 57, 5215, 672, 4624, 21, 566, 694,
2]) /* metro module 14775, dependencies: [6, 7, 15, 17, 18, 57, 5215, 672, 4624, 21, 566, 694, 2] */;
@@ -1,22 +1,26 @@
/* Metro module 14779; source: modules/notification_center/NotificationCenterStoreActions.tsx; dependencies: [694, 2] */
import Dispatcher from '../../Dispatcher.tsx'; /* Metro dependency 694 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun111619(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111619, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14976:6, offset: 0x023a8288, size: 125 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notification_center/NotificationCenterStoreActions.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/notification_center/NotificationCenterStoreActions.tsx');
exports.setTab = setTab;
exports.clearNotificationGuildMentions = clearNotificationGuildMentions;
exports.refreshNotifications = refreshNotifications;
function setTab(a0) { // fn#111620, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14976:197, offset: 0x023a8305, size: 56 bytes, params: 2, frame: 13
(Dispatcher).dispatch({type: 'NOTIFICATION_CENTER_SET_TAB', tab: a0});
}
function clearNotificationGuildMentions() { // fn#111621, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14976:311, offset: 0x023a833d, size: 48 bytes, params: 1, frame: 13
(Dispatcher).dispatch({type: 'NOTIFICATION_CENTER_CLEAR_GUILD_MENTIONS'});
}
function refreshNotifications() { // fn#111622, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14976:445, offset: 0x023a836d, size: 48 bytes, params: 1, frame: 13
(Dispatcher).dispatch({type: 'NOTIFICATION_CENTER_REFRESH'});
}
}
function setTab(a0) { // fn#111620, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14976:197, offset: 0x023a8305, size: 56 bytes, params: 2, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'NOTIFICATION_CENTER_SET_TAB', tab: a0});
}
function clearNotificationGuildMentions() { // fn#111621, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14976:311, offset: 0x023a833d, size: 48 bytes, params: 1, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'NOTIFICATION_CENTER_CLEAR_GUILD_MENTIONS'});
}
function refreshNotifications() { // fn#111622, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14976:445, offset: 0x023a836d, size: 48 bytes, params: 1, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'NOTIFICATION_CENTER_REFRESH'});
}
global.__d(_fun111619, 14779, [694, 2]) /* metro module 14779, dependencies: [694, 2] */;
@@ -1,107 +1,114 @@
/* Metro module 4788; source: modules/notification_center/NotificationCenterUtils.tsx; dependencies: [4789, 3829, 21, 4624, 2] */
import SnowflakeUtils from '../../utils/SnowflakeUtils.tsx'; /* Metro dependency 21 */
import GetTimestampString from './getTimestampString.tsx'; /* Metro dependency 4789 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as NotificationCenterItemsTypesModule from './NotificationCenterItemsTypes.tsx'; /* Metro dependency 4624 */
function _fun41354(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#41354, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4966:6, offset: 0x0111cc1c, size: 156 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notification_center/NotificationCenterUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/notification_center/NotificationCenterUtils.tsx');
exports.getRelativeTimestamp = getRelativeTimestamp;
exports.isRemoteAcked = isRemoteAcked;
exports.incomingFriendRequestLocalItem = incomingFriendRequestLocalItem;
exports.incomingGameFriendRequestLocalItem = incomingGameFriendRequestLocalItem;
exports.mobileNativeUpdateAvailableLocalItem = mobileNativeUpdateAvailableLocalItem;
exports.isMentionItem = isMentionItem;
}
function getRelativeTimestamp(a0) { // fn#41355, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4966:204, offset: 0x0111ccb8, size: 89 bytes, params: 2, frame: 15
let value = a1;
let r3 = !(value !== undefined) || value;
const defaultImport = importDefault(4789) /* metro dependency 4789: getTimestampString */;
value = require(4789) /* metro dependency 4789: getTimestampString */;
r3 = r3 ? value.getAbbreviatedFormatter : value.getFullFormatter;
return defaultImport({since: a0, getFormatter: r3});
}
function isRemoteAcked(a0, a1) { // fn#41356, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4966:321, offset: 0x0111cd11, size: 101 bytes, params: 3, frame: 17
var r1;
var r0;
var value;
var value2;
const acked = a0.acked;
if (acked) {
r0 = acked;
} else {
value2 = a1 !== (require(3829) /* metro dependency 3829: UserSettings */).NOTIFICATION_CENTER_ACKED_BEFORE_ID_UNSET;
if (value2) {
value = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
value = value.compare(a1, a0.id);
value = value >= 0;
r1 = value;
} else {
r1 = value2;
}
r0 = r1;
function getRelativeTimestamp(a0) { // fn#41355, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4966:204, offset: 0x0111ccb8, size: 89 bytes, params: 2, frame: 15
let value = a1;
let r3 = !(value !== undefined) || value;
const defaultImport = GetTimestampString;
value = require(4789) /* metro dependency 4789: getTimestampString */;
r3 = r3 ? value.getAbbreviatedFormatter : value.getFullFormatter;
return defaultImport({since: a0, getFormatter: r3});
}
return r0;
}
function incomingFriendRequestLocalItem(a0, a1, a2) { // fn#41357, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4966:452, offset: 0x0111cd76, size: 215 bytes, params: 4, frame: 21
const defaultImport = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
const fromTimestamp = defaultImport.fromTimestamp;
const Date = global.Date;
const date = new Date(a1);
const getTime = date.getTime;
const value4 = Reflect.apply(fromTimestamp, defaultImport, [Reflect.apply(getTime, date, [])]);
const object2 = {'acked': false, 'forceUnacked': true, 'other_user': null, 'kind': 'notification-center-item'};
object2.other_user = a0;
object2.local_id = 'incoming_friend_requests_' + a0.id + '_' + value4;
object2.deeplink = 'https://discord.com/users/' + a0.id;
const NotificationCenterLocalItems = (require(4624) /* metro dependency 4624: NotificationCenterItemsTypes */).NotificationCenterLocalItems;
const INCOMING_FRIEND_REQUESTS = NotificationCenterLocalItems.INCOMING_FRIEND_REQUESTS;
object2.type = INCOMING_FRIEND_REQUESTS;
object2.id = value4;
object2.applicationId = a2;
return object2;
}
function isRemoteAcked(a0, a1) { // fn#41356, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4966:321, offset: 0x0111cd11, size: 101 bytes, params: 3, frame: 17
var r1;
var r0;
var value;
var value2;
const acked = a0.acked;
if (acked) {
r0 = acked;
} else {
value2 = a1 !== (require(3829) /* metro dependency 3829: UserSettings */).NOTIFICATION_CENTER_ACKED_BEFORE_ID_UNSET;
if (value2) {
value = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
value = value.compare(a1, a0.id);
value = value >= 0;
r1 = value;
} else {
r1 = value2;
}
r0 = r1;
}
return r0;
}
function incomingGameFriendRequestLocalItem(a0, a1, a2) { // fn#41358, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4966:848, offset: 0x0111ce4d, size: 215 bytes, params: 4, frame: 21
const defaultImport = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
const fromTimestamp = defaultImport.fromTimestamp;
const Date = global.Date;
const date = new Date(a1);
const getTime = date.getTime;
const value4 = Reflect.apply(fromTimestamp, defaultImport, [Reflect.apply(getTime, date, [])]);
const object2 = {'acked': false, 'forceUnacked': true, 'other_user': null, 'kind': 'notification-center-item'};
object2.other_user = a0;
object2.local_id = 'incoming_game_friend_requests_' + a0.id + '_' + value4;
object2.deeplink = 'https://discord.com/users/' + a0.id;
const NotificationCenterLocalItems = (require(4624) /* metro dependency 4624: NotificationCenterItemsTypes */).NotificationCenterLocalItems;
const INCOMING_GAME_FRIEND_REQUESTS = NotificationCenterLocalItems.INCOMING_GAME_FRIEND_REQUESTS;
object2.type = INCOMING_GAME_FRIEND_REQUESTS;
object2.id = value4;
object2.applicationId = a2;
return object2;
}
function incomingFriendRequestLocalItem(a0, a1, a2) { // fn#41357, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4966:452, offset: 0x0111cd76, size: 215 bytes, params: 4, frame: 21
const defaultImport = SnowflakeUtils;
const fromTimestamp = defaultImport.fromTimestamp;
const Date = global.Date;
const date = new Date(a1);
const getTime = date.getTime;
const value4 = Reflect.apply(fromTimestamp, defaultImport, [Reflect.apply(getTime, date, [])]);
const object = {'acked': false, 'forceUnacked': true, 'other_user': null, 'kind': 'notification-center-item'};
object.other_user = a0;
object.local_id = 'incoming_friend_requests_' + a0.id + '_' + value4;
object.deeplink = 'https://discord.com/users/' + a0.id;
const NotificationCenterLocalItems = (NotificationCenterItemsTypesModule).NotificationCenterLocalItems;
const INCOMING_FRIEND_REQUESTS = NotificationCenterLocalItems.INCOMING_FRIEND_REQUESTS;
object.type = INCOMING_FRIEND_REQUESTS;
object.id = value4;
object.applicationId = a2;
return object;
}
function mobileNativeUpdateAvailableLocalItem({build, urls}) { // fn#41359, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4966:1260, offset: 0x0111cf24, size: 190 bytes, params: 2, frame: 18
const object2 = {'acked': false, 'enableBadge': true, 'id': null, 'kind': 'notification-center-item'};
const defaultImport = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
const fromTimestamp = defaultImport.fromTimestamp;
const Date = global.Date;
const date = new Date();
const getTime = date.getTime;
object2.id = Reflect.apply(fromTimestamp, defaultImport, [Reflect.apply(getTime, date, [])]);
object2.local_id = 'mobile_update_available_' + build;
const NotificationCenterLocalItems = (require(4624) /* metro dependency 4624: NotificationCenterItemsTypes */).NotificationCenterLocalItems;
const MOBILE_NATIVE_UPDATE_AVAILABLE = NotificationCenterLocalItems.MOBILE_NATIVE_UPDATE_AVAILABLE;
object2.type = MOBILE_NATIVE_UPDATE_AVAILABLE;
object2.deeplink = urls.install.toString();
return object2;
}
function incomingGameFriendRequestLocalItem(a0, a1, a2) { // fn#41358, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4966:848, offset: 0x0111ce4d, size: 215 bytes, params: 4, frame: 21
const defaultImport = SnowflakeUtils;
const fromTimestamp = defaultImport.fromTimestamp;
const Date = global.Date;
const date = new Date(a1);
const getTime = date.getTime;
const value4 = Reflect.apply(fromTimestamp, defaultImport, [Reflect.apply(getTime, date, [])]);
const object = {'acked': false, 'forceUnacked': true, 'other_user': null, 'kind': 'notification-center-item'};
object.other_user = a0;
object.local_id = 'incoming_game_friend_requests_' + a0.id + '_' + value4;
object.deeplink = 'https://discord.com/users/' + a0.id;
const NotificationCenterLocalItems = (NotificationCenterItemsTypesModule).NotificationCenterLocalItems;
const INCOMING_GAME_FRIEND_REQUESTS = NotificationCenterLocalItems.INCOMING_GAME_FRIEND_REQUESTS;
object.type = INCOMING_GAME_FRIEND_REQUESTS;
object.id = value4;
object.applicationId = a2;
return object;
}
function mobileNativeUpdateAvailableLocalItem({build, urls}) { // fn#41359, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4966:1260, offset: 0x0111cf24, size: 190 bytes, params: 2, frame: 18
const object = {'acked': false, 'enableBadge': true, 'id': null, 'kind': 'notification-center-item'};
const defaultImport = SnowflakeUtils;
const fromTimestamp = defaultImport.fromTimestamp;
const Date = global.Date;
const date = new Date();
const getTime = date.getTime;
object.id = Reflect.apply(fromTimestamp, defaultImport, [Reflect.apply(getTime, date, [])]);
object.local_id = 'mobile_update_available_' + build;
const NotificationCenterLocalItems = (NotificationCenterItemsTypesModule).NotificationCenterLocalItems;
const MOBILE_NATIVE_UPDATE_AVAILABLE = NotificationCenterLocalItems.MOBILE_NATIVE_UPDATE_AVAILABLE;
object.type = MOBILE_NATIVE_UPDATE_AVAILABLE;
object.deeplink = urls.install.toString();
return object;
}
function isMentionItem(a0) { // fn#41360, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4966:1591, offset: 0x0111cfe2, size: 92 bytes, params: 2, frame: 15
const type = a0.type;
const NotificationCenterItems = (NotificationCenterItemsTypesModule).NotificationCenterItems;
const RECENT_MENTION = NotificationCenterItems.RECENT_MENTION;
return type === RECENT_MENTION || a0.type === NotificationCenterItems.REPLY_MENTION;
}
function isMentionItem(a0) { // fn#41360, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4966:1591, offset: 0x0111cfe2, size: 92 bytes, params: 2, frame: 15
const type = a0.type;
const NotificationCenterItems = (require(4624) /* metro dependency 4624: NotificationCenterItemsTypes */).NotificationCenterItems;
const RECENT_MENTION = NotificationCenterItems.RECENT_MENTION;
return type === RECENT_MENTION || a0.type === NotificationCenterItems.REPLY_MENTION;
}
global.__d(_fun41354, 4788, [4789, 3829, 21, 4624,
2]) /* metro module 4788, dependencies: [4789, 3829, 21, 4624, 2] */;
@@ -1,188 +1,197 @@
/* Metro module 14787; source: modules/notification_center/getNotificationCenterItemBody.tsx; dependencies: [4117, 1867, 3793, 1878, 661, 1244, 3995, 4624, 1861, 44, 2] */
import GuildStore from '../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import UserStore from '../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import RelationshipStore from '../../stores/RelationshipStore.tsx'; /* Metro dependency 3793 */
import GuildScheduledEventStore from '../guild_scheduled_events/GuildScheduledEventStore.tsx'; /* Metro dependency 4117 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as GuildScheduledEventStoreModule from '../guild_scheduled_events/GuildScheduledEventStore.tsx'; /* Metro dependency 4117 */
import * as NotificationCenterItemsTypesModule from './NotificationCenterItemsTypes.tsx'; /* Metro dependency 4624 */
function _fun111695(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111695, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14984:6, offset: 0x023acf2c, size: 257 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const guildScheduledEventStore = importDefault(4117) /* metro dependency 4117: GuildScheduledEventStore */;
const env0_4 = (require(4117) /* metro dependency 4117: GuildScheduledEventStore */).isGuildEventEnded;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_8 = constantsModule.EMPTY_STRING_SNOWFLAKE_ID;
const env0_9 = constantsModule.RelationshipTypes;
const env0_10 = RegExp('[\\\\`*_~|<>[\\]:]', 'g');
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notification_center/getNotificationCenterItemBody.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/notification_center/getNotificationCenterItemBody.tsx');
exports.default = getNotificationCenterItemBody;
}
function escapeMarkdown(a0) { // fn#111696, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14984:247, offset: 0x023ad02d, size: 37 bytes, params: 2, frame: 13
if (a0 !== undefined) {
return a0.replace(env0_10, '\\$&');
}
}
function getFriendRequestItemBody({username, applicationId, renderApplication, withApplication, withDefault}) { // fn#111697, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14984:315, offset: 0x023ad052, size: 160 bytes, params: 2, frame: 17
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return applicationId != null ? intl.format(withApplication, {username: username, applicationName: function() {
return renderApplication(applicationId);
}}) : intl.format(withDefault, {username: username});
}
function getNotificationCenterItemBody({item, renderApplication}) { // fn#111699, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14984:649, offset: 0x023ad0f2, size: 1960 bytes, params: 2, frame: 25
var r3;
var r6;
var name;
var name2;
var length;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var format;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var object2;
var guild_scheduled_event_id;
var value9;
var isGuildEventEndedBinding;
var isGuildEventEnded2;
var moduleValue;
var moduleValue2;
var AyvfXR;
var local_id;
var defaultImport4;
var other_users;
var value11;
var defaultImport5;
var value12;
var Math;
var max;
var value13;
let value = undefined;
let other_user = item.other_user;
let id = other_user == null ? value : other_user.id;
const r5 = id ?? EMPTY_STRING_SNOWFLAKE_ID;
let escapeMarkdownBinding = escapeMarkdown;
const defaultImport = importDefault(3995) /* metro dependency 3995: UserUtils */;
let getName = defaultImport.getName;
let getUser = UserStore.getUser;
other_user = item.other_user;
const value5 = escapeMarkdownBinding(Reflect.apply(getName, defaultImport, [Reflect.apply(getUser, UserStore,
[other_user == null ? value : other_user.id])]));
const applicationId = item.applicationId;
const type = item.type;
const NotificationCenterLocalItems = (require(4624) /* metro dependency 4624: NotificationCenterItemsTypes */).NotificationCenterLocalItems;
const FRIEND_REQUESTS_GROUPED = NotificationCenterLocalItems.FRIEND_REQUESTS_GROUPED;
if (FRIEND_REQUESTS_GROUPED === type) {
escapeMarkdownBinding = escapeMarkdown;
defaultImport4 = defaultImport;
getName = defaultImport4.getName;
getUser = UserStore.getUser;
other_users = item.other_users;
id = other_users == null || other_users[0] == null ? value : other_users[0].id;
value11 = escapeMarkdownBinding(Reflect.apply(getName, defaultImport4, [Reflect.apply(getUser, UserStore,
[id])]));
escapeMarkdownBinding = escapeMarkdown;
defaultImport5 = importDefault(3995) /* metro dependency 3995: UserUtils */;
getName = defaultImport5.getName;
getUser = UserStore.getUser;
other_users = item.other_users;
id = other_users == null || other_users[1] == null ? value : other_users[1].id;
value12 = escapeMarkdownBinding(Reflect.apply(getName, defaultImport5, [Reflect.apply(getUser, UserStore,
[id])]));
Math = global.Math;
max = Math.max;
other_users = item.other_users;
length = other_users == null ? value : other_users.length;
value13 = 0;
return intl.format(t.g5xyIC, {user: value11, user2: value12, count: Reflect.apply(max, Math,
[(length ?? value13) - 2, value13])});
}
const MOBILE_NATIVE_UPDATE_AVAILABLE = NotificationCenterLocalItems.MOBILE_NATIVE_UPDATE_AVAILABLE;
if (MOBILE_NATIVE_UPDATE_AVAILABLE === type) {
local_id = item.local_id;
if (local_id == null) {
r3 = value;
} else {
value = local_id.split('_');
value = value.pop();
r3 = value;
function escapeMarkdown(a0) { // fn#111696, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14984:247, offset: 0x023ad02d, size: 37 bytes, params: 2, frame: 13
if (a0 !== undefined) {
return a0.replace(env0_10, '\\$&');
}
value = 'unknown';
return 'Update to build ' + (r3 ?? value) + ' available!';
}
const NotificationCenterItems = (require(4624) /* metro dependency 4624: NotificationCenterItemsTypes */).NotificationCenterItems;
const FRIEND_SUGGESTION_CREATED = NotificationCenterItems.FRIEND_SUGGESTION_CREATED;
if (FRIEND_SUGGESTION_CREATED === type) {
return RelationshipStore.getRelationshipType(r5) === RelationshipTypes.PENDING_OUTGOING ? intl.format(t.gZVTy2,
{user: value5}) : item.body ?? '';
function getFriendRequestItemBody({username, applicationId, renderApplication, withApplication, withDefault}) { // fn#111697, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14984:315, offset: 0x023ad052, size: 160 bytes, params: 2, frame: 17
const intl = (IndexNativeModule).intl;
return applicationId != null ? intl.format(withApplication, {username: username, applicationName: function() {
return renderApplication(applicationId);
}}) : intl.format(withDefault, {username: username});
}
const GUILD_SCHEDULED_EVENT_STARTED = NotificationCenterItems.GUILD_SCHEDULED_EVENT_STARTED;
if (GUILD_SCHEDULED_EVENT_STARTED === type) {
guild_scheduled_event_id = item.guild_scheduled_event_id;
r6 = guild_scheduled_event_id != null ? GuildScheduledEventStore.getGuildScheduledEvent(guild_scheduled_event_id) : null;
name = r6 == null ? value : r6.name;
value9 = GuildStore.getGuild(r6 == null ? value : r6.guild_id);
name2 = value9 == null ? value : value9.name;
isGuildEventEndedBinding = isGuildEventEnded;
r3 = r6 ?? value;
isGuildEventEnded2 = isGuildEventEndedBinding(r3);
moduleValue = require(1861) /* metro dependency 1861: StringUtils */;
if (moduleValue.isNullOrEmpty(name2)) {
r3 = item.body ?? '';
} else {
moduleValue2 = require(1861) /* metro dependency 1861: StringUtils */;
if (moduleValue2.isNullOrEmpty(name)) {
r3 = item.body ?? '';
} else if (isGuildEventEnded2) {
format = intl.format;
AyvfXR = t.AyvfXR;
object2 = {};
escapeMarkdownBinding = escapeMarkdown;
object2.event_name = escapeMarkdownBinding(name);
object2.guild_name = escapeMarkdownBinding(name2);
r3 = Reflect.apply(format, intl, [AyvfXR, object2]);
function getNotificationCenterItemBody({item, renderApplication}) { // fn#111699, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14984:649, offset: 0x023ad0f2, size: 1960 bytes, params: 2, frame: 25
var r3;
var r6;
var name;
var name2;
var length;
const intl = (IndexNativeModule).intl;
var format;
const t = (IndexNativeModule).t;
var object;
var guild_scheduled_event_id;
var guildStoreBinding;
var value9;
var isGuildEventEndedBinding;
var isGuildEventEnded2;
var moduleValue;
var moduleValue2;
var AyvfXR;
var local_id;
var defaultImport4;
var other_users;
var value11;
var defaultImport5;
var value12;
var Math;
var max;
var value13;
let value = undefined;
let other_user = item.other_user;
let id = other_user == null ? value : other_user.id;
const r5 = id ?? EMPTY_STRING_SNOWFLAKE_ID;
let escapeMarkdownBinding = escapeMarkdown;
const defaultImport = importDefault(3995) /* metro dependency 3995: UserUtils */;
let getName = defaultImport.getName;
let userStoreBinding = UserStore;
let getUser = userStoreBinding.getUser;
other_user = item.other_user;
const value5 = escapeMarkdownBinding(Reflect.apply(getName, defaultImport, [Reflect.apply(getUser, userStoreBinding,
[other_user == null ? value : other_user.id])]));
const applicationId = item.applicationId;
const type = item.type;
const NotificationCenterLocalItems = (NotificationCenterItemsTypesModule).NotificationCenterLocalItems;
const FRIEND_REQUESTS_GROUPED = NotificationCenterLocalItems.FRIEND_REQUESTS_GROUPED;
if (FRIEND_REQUESTS_GROUPED === type) {
escapeMarkdownBinding = escapeMarkdown;
defaultImport4 = defaultImport;
getName = defaultImport4.getName;
userStoreBinding = UserStore;
getUser = userStoreBinding.getUser;
other_users = item.other_users;
id = other_users == null || other_users[0] == null ? value : other_users[0].id;
value11 = escapeMarkdownBinding(Reflect.apply(getName, defaultImport4, [Reflect.apply(getUser, userStoreBinding,
[id])]));
escapeMarkdownBinding = escapeMarkdown;
defaultImport5 = importDefault(3995) /* metro dependency 3995: UserUtils */;
getName = defaultImport5.getName;
userStoreBinding = UserStore;
getUser = userStoreBinding.getUser;
other_users = item.other_users;
id = other_users == null || other_users[1] == null ? value : other_users[1].id;
value12 = escapeMarkdownBinding(Reflect.apply(getName, defaultImport5, [Reflect.apply(getUser, userStoreBinding,
[id])]));
Math = global.Math;
max = Math.max;
other_users = item.other_users;
length = other_users == null ? value : other_users.length;
value13 = 0;
return intl.format(t.g5xyIC, {user: value11, user2: value12, count: Reflect.apply(max, Math,
[(length ?? value13) - 2, value13])});
}
const MOBILE_NATIVE_UPDATE_AVAILABLE = NotificationCenterLocalItems.MOBILE_NATIVE_UPDATE_AVAILABLE;
if (MOBILE_NATIVE_UPDATE_AVAILABLE === type) {
local_id = item.local_id;
if (local_id == null) {
r3 = value;
} else {
r3 = item.body ?? '';
value = local_id.split('_');
value = value.pop();
r3 = value;
}
value = 'unknown';
return 'Update to build ' + (r3 ?? value) + ' available!';
}
return r3;
const NotificationCenterItems = (NotificationCenterItemsTypesModule).NotificationCenterItems;
const FRIEND_SUGGESTION_CREATED = NotificationCenterItems.FRIEND_SUGGESTION_CREATED;
if (FRIEND_SUGGESTION_CREATED === type) {
return RelationshipStore.getRelationshipType(r5) === RelationshipTypes.PENDING_OUTGOING ? intl.format(t.gZVTy2,
{user: value5}) : item.body ?? '';
}
const GUILD_SCHEDULED_EVENT_STARTED = NotificationCenterItems.GUILD_SCHEDULED_EVENT_STARTED;
if (GUILD_SCHEDULED_EVENT_STARTED === type) {
guild_scheduled_event_id = item.guild_scheduled_event_id;
r6 = guild_scheduled_event_id != null ? GuildScheduledEventStore.getGuildScheduledEvent(guild_scheduled_event_id) : null;
name = r6 == null ? value : r6.name;
guildStoreBinding = GuildStore;
value9 = guildStoreBinding.getGuild(r6 == null ? value : r6.guild_id);
name2 = value9 == null ? value : value9.name;
isGuildEventEndedBinding = isGuildEventEnded;
r3 = r6 ?? value;
isGuildEventEnded2 = isGuildEventEndedBinding(r3);
moduleValue = require(1861) /* metro dependency 1861: StringUtils */;
if (moduleValue.isNullOrEmpty(name2)) {
r3 = item.body ?? '';
} else {
moduleValue2 = require(1861) /* metro dependency 1861: StringUtils */;
if (moduleValue2.isNullOrEmpty(name)) {
r3 = item.body ?? '';
} else if (isGuildEventEnded2) {
format = intl.format;
AyvfXR = t.AyvfXR;
object = {};
escapeMarkdownBinding = escapeMarkdown;
object.event_name = escapeMarkdownBinding(name);
object.guild_name = escapeMarkdownBinding(name2);
r3 = Reflect.apply(format, intl, [AyvfXR, object]);
} else {
r3 = item.body ?? '';
}
}
return r3;
}
const INCOMING_FRIEND_REQUESTS = NotificationCenterLocalItems.INCOMING_FRIEND_REQUESTS;
if (INCOMING_FRIEND_REQUESTS === type) {
return getFriendRequestItemBody({username: value5, applicationId: applicationId,
renderApplication: renderApplication, withApplication: t['9Dgf1L'], withDefault: t.uIomXw});
}
const INCOMING_FRIEND_REQUESTS_ACCEPTED = NotificationCenterLocalItems.INCOMING_FRIEND_REQUESTS_ACCEPTED;
if (INCOMING_FRIEND_REQUESTS_ACCEPTED === type) {
return getFriendRequestItemBody({username: value5, applicationId: applicationId,
renderApplication: renderApplication, withApplication: t.nnC1q9, withDefault: t['5Uzkdp']});
}
const FRIEND_REQUEST_ACCEPTED = NotificationCenterItems.FRIEND_REQUEST_ACCEPTED;
if (FRIEND_REQUEST_ACCEPTED === type) {
return getFriendRequestItemBody({username: value5, applicationId: applicationId,
renderApplication: renderApplication, withApplication: t.jXlYiF, withDefault: t.McYRBk});
}
const INCOMING_GAME_FRIEND_REQUESTS_ACCEPTED = NotificationCenterLocalItems.INCOMING_GAME_FRIEND_REQUESTS_ACCEPTED;
if (INCOMING_GAME_FRIEND_REQUESTS_ACCEPTED === type) {
(importDefault(44) /* metro dependency 44 */)(applicationId != null,
'Expected application id for ' + item.type);
return intl.format(t['BB/0vn'], {username: value5, applicationName: function() {
return renderApplication(applicationId);
}});
}
const INCOMING_GAME_FRIEND_REQUESTS = NotificationCenterLocalItems.INCOMING_GAME_FRIEND_REQUESTS;
if (INCOMING_GAME_FRIEND_REQUESTS === type) {
(importDefault(44) /* metro dependency 44 */)(applicationId != null,
'Expected application id for ' + item.type);
return intl.format(t['7cqOLI'], {username: value5, applicationName: function() {
return renderApplication(applicationId);
}});
}
const GAME_FRIEND_REQUEST_ACCEPTED = NotificationCenterItems.GAME_FRIEND_REQUEST_ACCEPTED;
if (GAME_FRIEND_REQUEST_ACCEPTED === type) {
return applicationId == null ? item.body : intl.format(t.Wi64vN, {username: value5,
applicationName: function() {
return renderApplication(applicationId);
}});
}
return item.body ?? '';
}
const INCOMING_FRIEND_REQUESTS = NotificationCenterLocalItems.INCOMING_FRIEND_REQUESTS;
if (INCOMING_FRIEND_REQUESTS === type) {
return getFriendRequestItemBody({username: value5, applicationId: applicationId,
renderApplication: renderApplication, withApplication: t['9Dgf1L'], withDefault: t.uIomXw});
}
const INCOMING_FRIEND_REQUESTS_ACCEPTED = NotificationCenterLocalItems.INCOMING_FRIEND_REQUESTS_ACCEPTED;
if (INCOMING_FRIEND_REQUESTS_ACCEPTED === type) {
return getFriendRequestItemBody({username: value5, applicationId: applicationId,
renderApplication: renderApplication, withApplication: t.nnC1q9, withDefault: t['5Uzkdp']});
}
const FRIEND_REQUEST_ACCEPTED = NotificationCenterItems.FRIEND_REQUEST_ACCEPTED;
if (FRIEND_REQUEST_ACCEPTED === type) {
return getFriendRequestItemBody({username: value5, applicationId: applicationId,
renderApplication: renderApplication, withApplication: t.jXlYiF, withDefault: t.McYRBk});
}
const INCOMING_GAME_FRIEND_REQUESTS_ACCEPTED = NotificationCenterLocalItems.INCOMING_GAME_FRIEND_REQUESTS_ACCEPTED;
if (INCOMING_GAME_FRIEND_REQUESTS_ACCEPTED === type) {
(importDefault(44) /* metro dependency 44 */)(applicationId != null,
'Expected application id for ' + item.type);
return intl.format(t['BB/0vn'], {username: value5, applicationName: function() {
return renderApplication(applicationId);
}});
}
const INCOMING_GAME_FRIEND_REQUESTS = NotificationCenterLocalItems.INCOMING_GAME_FRIEND_REQUESTS;
if (INCOMING_GAME_FRIEND_REQUESTS === type) {
(importDefault(44) /* metro dependency 44 */)(applicationId != null,
'Expected application id for ' + item.type);
return intl.format(t['7cqOLI'], {username: value5, applicationName: function() {
return renderApplication(applicationId);
}});
}
const GAME_FRIEND_REQUEST_ACCEPTED = NotificationCenterItems.GAME_FRIEND_REQUEST_ACCEPTED;
if (GAME_FRIEND_REQUEST_ACCEPTED === type) {
return applicationId == null ? item.body : intl.format(t.Wi64vN, {username: value5,
applicationName: function() {
return renderApplication(applicationId);
}});
}
return item.body ?? '';
}
global.__d(_fun111695, 14787, [4117, 1867, 3793, 1878, 661, 1244, 3995, 4624, 1861, 44,
2]) /* metro module 14787, dependencies: [4117, 1867, 3793, 1878, 661, 1244, 3995, 4624, 1861, 44, 2] */;
@@ -1,89 +1,93 @@
/* Metro module 4789; source: modules/notification_center/getTimestampString.tsx; dependencies: [1244, 3738, 2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as IndexNativeModule from '../../intl/index.native.tsx'; /* Metro dependency 1244 */
function _fun41361(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#41361, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4967:6, offset: 0x0111d03e, size: 160 bytes, params: 8, frame: 19
const env0_0 = require;
const closure = getDurationString;
const getDurationString2 = getDurationString;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notification_center/getTimestampString.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/notification_center/getTimestampString.tsx');
exports.default = getTimestampString;
exports.getAbbreviatedFormatter = getAbbreviatedFormatter;
exports.getFullFormatter = getFullFormatter;
exports.getDurationString = closure;
}
function getDurationString({seconds, getFormatter}) { // fn#41362, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4967:115, offset: 0x0111d0de, size: 514 bytes, params: 2, frame: 24
var r0;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var formatToPlainString;
var years;
var object2;
var months;
var days;
var hours;
var minutes;
let value = getFormatter();
if (seconds < 60) {
value = intl.formatToPlainString(value.minutes, {minutes: 1});
r0 = value;
} else if (seconds < 3600) {
formatToPlainString = intl.formatToPlainString;
minutes = value.minutes;
object2 = {};
object2.minutes = global.Math.floor(seconds / 60);
value = Reflect.apply(formatToPlainString, intl, [minutes, object2]);
r0 = value;
} else if (seconds < 86400) {
formatToPlainString = intl.formatToPlainString;
hours = value.hours;
object2 = {};
object2.hours = global.Math.floor(seconds / 3600);
value = Reflect.apply(formatToPlainString, intl, [hours, object2]);
r0 = value;
} else if (seconds < env0_3) {
formatToPlainString = intl.formatToPlainString;
days = value.days;
object2 = {};
object2.days = global.Math.floor(seconds / 86400);
value = Reflect.apply(formatToPlainString, intl, [days, object2]);
r0 = value;
} else if (seconds < env0_4) {
formatToPlainString = intl.formatToPlainString;
months = value.months;
object2 = {};
object2.months = global.Math.floor(seconds / env0_3);
value = Reflect.apply(formatToPlainString, intl, [months, object2]);
r0 = value;
} else {
formatToPlainString = intl.formatToPlainString;
years = value.years;
object2 = {};
object2.years = global.Math.floor(seconds / env0_4);
value = Reflect.apply(formatToPlainString, intl, [years, object2]);
r0 = value;
exports.getDurationString = getDurationString2;
function getDurationString({seconds, getFormatter}) { // fn#41362, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4967:115, offset: 0x0111d0de, size: 514 bytes, params: 2, frame: 24
var r0;
const intl = (IndexNativeModule).intl;
var formatToPlainString;
var years;
var object;
var months;
var days;
var hours;
var minutes;
let value = getFormatter();
if (seconds < 60) {
value = intl.formatToPlainString(value.minutes, {minutes: 1});
r0 = value;
} else if (seconds < 3600) {
formatToPlainString = intl.formatToPlainString;
minutes = value.minutes;
object = {};
object.minutes = global.Math.floor(seconds / 60);
value = Reflect.apply(formatToPlainString, intl, [minutes, object]);
r0 = value;
} else if (seconds < 86400) {
formatToPlainString = intl.formatToPlainString;
hours = value.hours;
object = {};
object.hours = global.Math.floor(seconds / 3600);
value = Reflect.apply(formatToPlainString, intl, [hours, object]);
r0 = value;
} else if (seconds < env0_3) {
formatToPlainString = intl.formatToPlainString;
days = value.days;
object = {};
object.days = global.Math.floor(seconds / 86400);
value = Reflect.apply(formatToPlainString, intl, [days, object]);
r0 = value;
} else if (seconds < env0_4) {
formatToPlainString = intl.formatToPlainString;
months = value.months;
object = {};
object.months = global.Math.floor(seconds / env0_3);
value = Reflect.apply(formatToPlainString, intl, [months, object]);
r0 = value;
} else {
formatToPlainString = intl.formatToPlainString;
years = value.years;
object = {};
object.years = global.Math.floor(seconds / env0_4);
value = Reflect.apply(formatToPlainString, intl, [years, object]);
r0 = value;
}
return r0;
}
return r0;
}
function getTimestampString({since, getFormatter}) { // fn#41363, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4967:707, offset: 0x0111d2e0, size: 97 bytes, params: 2, frame: 19
const getDurationStringBinding = getDurationString;
const object2 = {};
const value = (importDefault(3738) /* metro dependency 3738 */)();
object2.seconds = value.diff((importDefault(3738) /* metro dependency 3738 */)(since), 's');
object2.getFormatter = getFormatter;
return getDurationStringBinding(object2);
}
function getTimestampString({since, getFormatter}) { // fn#41363, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4967:707, offset: 0x0111d2e0, size: 97 bytes, params: 2, frame: 19
const getDurationStringBinding = getDurationString;
const object = {};
const value = (importDefault(3738) /* metro dependency 3738 */)();
object.seconds = value.diff((importDefault(3738) /* metro dependency 3738 */)(since), 's');
object.getFormatter = getFormatter;
return getDurationStringBinding(object);
}
function getAbbreviatedFormatter() { // fn#41364, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4967:870, offset: 0x0111d341, size: 148 bytes, params: 1, frame: 14
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const GBLpQ8 = t.GBLpQ8;
const XzBNbS = t.XzBNbS;
const I1E8p6 = t.I1E8p6;
return {minutes: t['XIGt+W'], hours: t.rhY1Rs, days: GBLpQ8, months: XzBNbS, years: I1E8p6};
}
function getAbbreviatedFormatter() { // fn#41364, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4967:870, offset: 0x0111d341, size: 148 bytes, params: 1, frame: 14
const t = (IndexNativeModule).t;
const GBLpQ8 = t.GBLpQ8;
const XzBNbS = t.XzBNbS;
const I1E8p6 = t.I1E8p6;
return {minutes: t['XIGt+W'], hours: t.rhY1Rs, days: GBLpQ8, months: XzBNbS, years: I1E8p6};
}
function getFullFormatter() { // fn#41365, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4967:1017, offset: 0x0111d3d5, size: 154 bytes, params: 1, frame: 14
const t = (IndexNativeModule).t;
const SoON3V = t.SoON3V;
return {minutes: t['GqQ/Y9'], hours: t.c5zfWZ, days: t.amjnaI, months: SoON3V, years: t['12B3Re']};
}
function getFullFormatter() { // fn#41365, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4967:1017, offset: 0x0111d3d5, size: 154 bytes, params: 1, frame: 14
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const SoON3V = t.SoON3V;
return {minutes: t['GqQ/Y9'], hours: t.c5zfWZ, days: t.amjnaI, months: SoON3V, years: t['12B3Re']};
}
global.__d(_fun41361, 4789, [1244, 3738, 2]) /* metro module 4789, dependencies: [1244, 3738, 2] */;
@@ -1,44 +1,70 @@
/* Metro module 14811; source: modules/notification_center/native/ForYouEmptyState.tsx; dependencies: [31, 27, 33, 4501, 5473, 4573, 1244, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as NativeModule from '../../../design/assets/native.tsx'; /* Metro dependency 5473 */
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},
ReactModule;
const env0_5 = (CreateStylesModule).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');
(FileImportTrackerModule).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 = (NativeModule).MailboxSpotIllustration;
const items2 = [
<View style={styles.image}>
<MailboxSpotIllustration scale={0.75} />
</View>,
];
const Text = (TextModule).Text;
let text = styles.text;
const items3 = [text];
items3[1] = styles.headerText;
const intl = (IndexNativeModule).intl;
let string = intl.string;
const MwjTvn = (IndexNativeModule).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 = (IndexNativeModule).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>
);
}
}
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>
);
}
global.__d(_fun111773, 14811, [31, 27, 33, 4501, 5473, 4573, 1244,
2]) /* metro module 14811, dependencies: [31, 27, 33, 4501, 5473, 4573, 1244, 2] */;
@@ -1,15 +1,26 @@
/* Metro module 14800; source: modules/notification_center/native/ForYouHoistedItemsHeader.tsx; dependencies: [31, 27, 33, 4501, 697, 2] */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
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');
ReactModule;
const createStyles = CreateStylesModule.createStyles;
const PX_16 = (Native).space.PX_16;
const env0_2 = Reflect.apply(createStyles, CreateStylesModule, [{container: {marginTop: PX_16}}]);
(FileImportTrackerModule).fileFinishedImporting('modules/notification_center/native/ForYouHoistedItemsHeader.tsx');
exports.ForYouHoistedItemsHeader = ForYouHoistedItemsHeader;
function ForYouHoistedItemsHeader() { // fn#111723, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14997:325, offset: 0x022d4e06, size: 40 bytes, params: 1, frame: 14
const styles = useStyles();
return <View style={styles.container} />;
}
}
global.__d(_fun111722, 14800, [31, 27, 33, 4501, 697,
2]) /* metro module 14800, dependencies: [31, 27, 33, 4501, 697, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,228 +1,272 @@
/* 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] */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import GuildStore from '../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import UserStore from '../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import ShowUserProfileActionSheet from '../../user_profile/native/showUserProfileActionSheet.tsx'; /* Metro dependency 8743 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as GuildRecordModule from '../../../records/GuildRecord.tsx'; /* Metro dependency 1422 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 14789 */
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 */;
let value = ReactModule;
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]);
PROFILE_BACKGROUND} = ConstantsModule;
let createStyles = CreateStylesModule.createStyles;
const env0_9 = Reflect.apply(createStyles, CreateStylesModule, [_fun111704]);
createStyles = CreateStylesModule.createStyles;
object = {};
const WHITE = (Native).colors.WHITE;
object.fallbackImage = {color: WHITE};
const INTERACTIVE_TEXT_DEFAULT = (Native).colors.INTERACTIVE_TEXT_DEFAULT;
object.fallbackImageV2 = {color: INTERACTIVE_TEXT_DEFAULT};
const BACKGROUND_BRAND = (Native).colors.BACKGROUND_BRAND;
object.brandBackground = {backgroundColor: BACKGROUND_BRAND};
object.profileBackground = {backgroundColor: PROFILE_BACKGROUND};
object.friendBackground = {backgroundColor: FRIEND_BACKGROUND};
object.messageBackground = {backgroundColor: MESSAGE_BACKGROUND};
const BACKGROUND_SURFACE_HIGH = (Native).colors.BACKGROUND_SURFACE_HIGH;
object.guildGridBackground = {backgroundColor: BACKGROUND_SURFACE_HIGH};
const env0_10 = Reflect.apply(createStyles, CreateStylesModule, [object]);
value = value.memo(_fun111705);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notification_center/native/ForYouItemImage.tsx');
(FileImportTrackerModule).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 object = {};
value = r3 / 2;
object.container = {height: r3, width: r3, borderRadius: value, marginEnd: a0 ? 8 : 12, alignItems: 'center',
justifyContent: 'center'};
object.rowImage = {height: r3, width: r3, borderRadius: value};
const object4 = {'height': 'auto', 'maxHeight': null, 'width': 'auto'};
object4.maxHeight = value;
const INTERACTIVE_TEXT_DEFAULT = (Native).colors.INTERACTIVE_TEXT_DEFAULT;
object4.color = INTERACTIVE_TEXT_DEFAULT;
object.guildFallbackImage = object4;
return object;
}
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) {
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 guildStoreBinding;
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 id = item.other_user?.id;
const user = require(dependencyMap[21]).useStateFromStores([UserStore], function() {
return UserStore.getUser(id);
});
const binding = id;
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 {
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;
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 {
guildStoreBinding = GuildStore;
value5 = guildStoreBinding.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 object;
var Avatar;
var object2;
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;
object = {onPress: onPress_111708};
Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
object2 = {};
moduleValue = require(8420) /* metro dependency 8420: ProfileCustomizationUtils */;
getAvatarSource = moduleValue.getAvatarSource;
userBinding = user;
itemBinding = item;
object2.source = Reflect.apply(getAvatarSource, moduleValue, [userBinding, itemBinding.guild_id, undefined,
itemBinding.acked]);
compactModeBinding = compactMode;
AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
object2.size = compactModeBinding ? AvatarSizes.REFRESH_MEDIUM_32 : AvatarSizes.LARGE_48;
object2.avatarDecoration = user.avatarDecoration;
r0 = (
<PressableOpacity {...object}>
<Avatar {...object2} />
</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__;
(ShowUserProfileActionSheet)({userId: user.id, localUser: user,
messageId: item.message_id, sourceAnalyticsLocations: analyticsLocations});
}
}
}
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});
}
global.__d(_fun111703, 14788, [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]) /* metro module 14788, 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] */;
File diff suppressed because it is too large. Load diff
@@ -1,40 +1,52 @@
/* Metro module 14810; source: modules/notification_center/native/ForYouLoadMore.tsx; dependencies: [31, 27, 4623, 33, 4501, 632, 4578, 1244, 2] */
import NotificationCenterItemsStore from '../NotificationCenterItemsStore.tsx'; /* Metro dependency 4623 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
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',
ReactModule;
const env0_6 = (CreateStylesModule).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');
(FileImportTrackerModule).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} />;
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>
);
}
return (
<View style={styles.container}>
{r4}
</View>
);
}
global.__d(_fun111770, 14810, [31, 27, 4623, 33, 4501, 632, 4578, 1244,
2]) /* metro module 14810, dependencies: [31, 27, 4623, 33, 4501, 632, 4578, 1244, 2] */;
@@ -1,84 +1,89 @@
/* Metro module 14780; source: modules/notification_center/native/ForYouMentionPlaceholder.tsx; dependencies: [31, 27, 4502, 33, 4501, 697, 566, 4017, 4504, 2] */
import ReanimatedRexport from '../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import AccessibilityStore from '../../a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ReanimatedRexportModule from '../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as TimingModule from '../../../design/animation/reanimated/timing/timing.tsx'; /* Metro dependency 4504 */
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 */;
ReactModule;
let value = JsxRuntimeModule;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {placeholder: {'flexDirection': 'row', 'marginBottom': 16, 'marginHorizontal': 24}};
object = {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,
object.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};
const object3 = {'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 = {};
object3.backgroundColor = BACKGROUND_MOD_STRONG;
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object.placeholderText = object3;
object.placeholderTextContainer = {'flexDirection': 'row', 'flexWrap': 'wrap'};
const object4 = {};
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]);
object4.backgroundColor = BACKGROUND_MOD_STRONG;
object4.height = 40;
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object4.marginTop = 4;
object.placeholderBody = object4;
const env0_7 = Reflect.apply(createStyles, value, [object]);
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');
object = {code: 'function ForYouMentionPlaceholderTsx1(){const{reducedMotion,opacity}=this.__closure;return{opacity:reducedMotion?0.7:opacity.get()};}'};
(FileImportTrackerModule).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)}
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 = (ReanimatedRexportModule).useSharedValue(0.3);
const set = value2.set;
const withRepeat = ReanimatedRexportModule.withRepeat;
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 useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
const ForYouMentionPlaceholderY2 = ForYouMentionPlaceholderY;
ForYouMentionPlaceholderY2.__closure = {reducedMotion: useReducedMotion, opacity: value2};
ForYouMentionPlaceholderY2.__workletHash = 8828208724188;
ForYouMentionPlaceholderY2.__initData = env0_9;
const value4 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [ForYouMentionPlaceholderY2]);
const View2 = (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>
<View style={[styles.placeholderBody, {width: '85%'}]} />
</View>
</View2>
);
}
</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 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} />;
}
}
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} />;
}
global.__d(_fun111623, 14780, [31, 27, 4502, 33, 4501, 697, 566, 4017, 4504,
2]) /* metro module 14780, dependencies: [31, 27, 4502, 33, 4501, 697, 566, 4017, 4504, 2] */;
@@ -1,41 +1,49 @@
/* Metro module 14798; source: modules/notification_center/native/ForYouReadSectionHeader.tsx; dependencies: [31, 27, 33, 4501, 697, 4573, 1244, 2] */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
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 */;
ReactModule;
let value = ReactNativeModule;
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');
object = {};
const object2 = {};
object2.borderTopWidth = StyleSheet.hairlineWidth;
const BORDER_SUBTLE = (Native).colors.BORDER_SUBTLE;
object2.borderTopColor = BORDER_SUBTLE;
object2.marginVertical = 8;
object2.paddingHorizontal = 24;
object.container = object2;
const TEXT_SUBTLE = (Native).colors.TEXT_SUBTLE;
object.textHeader = {color: TEXT_SUBTLE, marginTop: 20};
const env0_4 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).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 = (TextModule).Text;
const intl = (IndexNativeModule).intl;
return (
<View style={styles.container}>
<Text style={styles.textHeader} variant="text-sm/semibold">
{intl.string((IndexNativeModule).t.hftC1K)}
</Text>
</View>
);
}
}
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>
);
}
global.__d(_fun111718, 14798, [31, 27, 33, 4501, 697, 4573, 1244,
2]) /* metro module 14798, dependencies: [31, 27, 33, 4501, 697, 4573, 1244, 2] */;
@@ -1,45 +1,51 @@
/* Metro module 14799; source: modules/notification_center/native/ForYouRecentActivitySectionHeader.tsx; dependencies: [31, 27, 33, 4501, 697, 4573, 1244, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
function _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 = {};
ReactModule;
const createStyles = CreateStylesModule.createStyles;
object = {};
const object2 = {};
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object4.marginTop = PX_8;
object2.marginTop = PX_8;
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object4.marginBottom = PX_8;
object2.marginBottom = PX_8;
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object4.paddingHorizontal = PX_24;
object3.container = object4;
object2.paddingHorizontal = PX_24;
object.container = object2;
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');
object.textHeader = {marginTop: PX_8};
const env0_4 = Reflect.apply(createStyles, CreateStylesModule, [object]);
(FileImportTrackerModule).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 = (TextModule).Text;
const intl = (IndexNativeModule).intl;
return (
<View style={styles.container}>
<Text
style={styles.textHeader}
color="text-muted"
variant="text-sm/semibold"
accessibilityRole="header"
>
{intl.string((IndexNativeModule).t.yM9Krm)}
</Text>
</View>
);
}
}
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>
);
}
global.__d(_fun111720, 14799, [31, 27, 33, 4501, 697, 4573, 1244,
2]) /* metro module 14799, dependencies: [31, 27, 33, 4501, 697, 4573, 1244, 2] */;
@@ -1,130 +1,169 @@
/* 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] */
import AnalyticsUtils from '../../../utils/AnalyticsUtils.tsx'; /* Metro dependency 683 */
import Module06245 from '../../../by-id/module-06245.js'; /* Metro dependency 6245 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as NativeModule from '../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as UseNavigationNativeModule from '../../../design/components/Navigator/native/useNavigation.native.tsx'; /* Metro dependency 1484 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as UseFontScaleModule from '../../screen/native/useFontScale.tsx'; /* Metro dependency 4584 */
import * as PressablesModule from '../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as ChannelListLayoutModule from '../../main_tabs_v2/native/shared_components/guild_channels/layouts/ChannelListLayout.tsx'; /* Metro dependency 10981 */
import * as FriendsScreenConstantsModule from '../../main_tabs_v2/native/friends/screens/FriendsScreenConstants.tsx'; /* Metro dependency 12016 */
import * as AvatarDuoPileNativeModule from '../../../design/components/Pile/native/AvatarDuoPile.native.tsx'; /* Metro dependency 12808 */
import * as ChannelPressableWrapperModule from '../../main_tabs_v2/native/shared_components/guild_channels/ChannelPressableWrapper.tsx'; /* Metro dependency 14803 */
import * as ChannelWrapperModule from '../../main_tabs_v2/native/shared_components/guild_channels/ChannelWrapper.tsx'; /* Metro dependency 14804 */
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');
const env0_10 = (CreateStylesModule).createStyles(_fun111763);
(FileImportTrackerModule).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 = (ChannelListLayoutModule).useMessagesTabLayout(panelVariant);
const styles = useStyles(value2);
const layoutStyles = (ChannelListLayoutModule).getLayoutStyles(value2);
const value4 = (UseFontScaleModule).useFontScale();
const renderChannelPressableWrapper = ChannelPressableWrapperModule.renderChannelPressableWrapper;
const PressableHighlight = (PressablesModule).PressableHighlight;
const backgroundColor = styles.rowActive.backgroundColor;
const items3 = [styles.pressable];
items3[1] = {borderRadius: layoutStyles.container.borderRadius};
const renderChannelWrapper = ChannelWrapperModule.renderChannelWrapper;
const jsxRuntimeEnv0_8Binding = jsxRuntimeEnv0_8;
const AvatarDuoPile = (AvatarDuoPileNativeModule).AvatarDuoPile;
const isLayoutCompact2 = (ChannelListLayoutModule).isLayoutCompact(value2);
const AvatarSizes = (NativeModule).AvatarSizes;
const items2 = [
<View style={styles.avatar}>
<AvatarDuoPile size={isLayoutCompact2 ? AvatarSizes.XSMALL_20 : AvatarSizes.SMALL} {...{['aria-label']: ''}}>
{children}
</AvatarDuoPile>
</View>,
];
const Text = (TextModule).Text;
const variant = layoutStyles.channelName.text.variant;
const intl = (IndexNativeModule).intl;
const format = intl.format;
const NrzztX = (IndexNativeModule).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 = (NativeModule).Icon;
const iconProps = {style: styles.icon, color: styles.iconColor.color,
source: Module06245};
const IconSizes = (NativeModule).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 = (ChannelListLayoutModule).getLayoutStyles(a0);
const sizeStyle = ChannelListLayoutModule.makeSizeStyle(layoutStyles.icon.wrapper.size);
const object = {};
const BACKGROUND_MOD_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_MUTED;
object.rowActive = {backgroundColor: BACKGROUND_MOD_MUTED};
object.pressable = {flex: 1};
const value3 = 2;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object.textContainer = {'flexDirection': 'column', 'flexGrow': 2, 'flexShrink': 2, 'alignSelf': 'center',
'overflow': 'hidden', 'marginTop': -2, marginRight: PX_8};
const object5 = {flexShrink: 1};
object5.marginBottom = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid() ? value3 : 0;
object.nameText = object5;
const object6 = {'position': 'relative', 'borderRadius': null, 'justifyContent': 'center', 'alignItems': 'center',
'flexShrink': 0, 'flexGrow': 0};
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
copyDataProperties(object6, sizeStyle, importDefault);
object6['marginRight'] = layoutStyles.icon.margin.marginRight + 4;
object.avatar = object6;
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object.icon = {'width': 8, 'height': 32, paddingRight: PX_24};
const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
object.iconColor = {color: INTERACTIVE_TEXT_DEFAULT};
return object;
}
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 = (UseNavigationNativeModule).useNavigation();
const value3 = (ChannelListLayoutModule).useMessagesTabLayout(panelVariant);
const useCallback = ReactModule.useCallback;
return (
<ForYouShowAllRow
children={ReactModule.useMemo(_fun111766, [value3, suggestedFriends])}
count={suggestedFriends.length}
onPress={Reflect.apply(useCallback, ReactModule, [_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 = 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 = (NativeModule).Avatar;
const object = {};
let user = a0.user;
object.user = user;
object.guildId = undefined;
const isLayoutCompact2 = (ChannelListLayoutModule).isLayoutCompact(env1_2);
const AvatarSizes = (NativeModule).AvatarSizes;
object.size = isLayoutCompact2 ? AvatarSizes.XSMALL_20 : AvatarSizes.SMALL;
user = a0.user;
return <Avatar {...object} key={user.id} />;
}
}
}
}
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} />;
}
global.__d(_fun111761, 14808, [31, 27, 661, 12016, 33, 4501, 10981, 697, 477, 1484, 683, 1305, 4584, 14803, 5278,
14804, 12808, 4573, 1244, 6245,
2]) /* metro module 14808, dependencies: [31, 27, 661, 12016, 33, 4501, 10981, 697, 477, 1484, 683, 1305, 4584, 14803, 5278, 14804, 12808, 4573, 1244, 6245, 2] */;
@@ -1,161 +1,229 @@
/* 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] */
import RelationshipStore from '../../../stores/RelationshipStore.tsx'; /* Metro dependency 3793 */
import AccessibilityStore from '../../a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */
import UseAnalyticsLocations from '../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as PlatformUtilsModule from '../../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as NativeModule from '../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as ReanimatedRexportModule from '../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as UseFontScaleModule from '../../screen/native/useFontScale.tsx'; /* Metro dependency 4584 */
import * as PressablesModule from '../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as ChannelListLayoutModule from '../../main_tabs_v2/native/shared_components/guild_channels/layouts/ChannelListLayout.tsx'; /* Metro dependency 10981 */
import * as FriendSuggestionUtilsModule from '../../friend_suggestions/FriendSuggestionUtils.tsx'; /* Metro dependency 14477 */
import * as ChannelPressableWrapperModule from '../../main_tabs_v2/native/shared_components/guild_channels/ChannelPressableWrapper.tsx'; /* Metro dependency 14803 */
import * as ChannelWrapperModule from '../../main_tabs_v2/native/shared_components/guild_channels/ChannelWrapper.tsx'; /* Metro dependency 14804 */
import * as ActionStatusSubLabelModule from '../../main_tabs_v2/native/friends/components/ActionStatusSubLabel.tsx'; /* Metro dependency 14805 */
import * as ContactSuggestionActionsModule from '../../main_tabs_v2/native/friends/components/ContactSuggestionActions.tsx'; /* Metro dependency 14806 */
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 */;
let value = ConstantsModule;
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');
const env0_12 = (CreateStylesModule).createStyles(_fun111727);
(FileImportTrackerModule).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);
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 = (ChannelListLayoutModule).getLayoutStyles(a0);
const sizeStyle = ChannelListLayoutModule.makeSizeStyle(layoutStyles.icon.wrapper.size);
const object = {};
const BACKGROUND_MOD_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_MUTED;
object.rowActive = {backgroundColor: BACKGROUND_MOD_MUTED};
object.pressable = {flex: 1};
const value3 = 2;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object.textContainer = {'flexDirection': 'column', 'flexGrow': 2, 'flexShrink': 2, 'alignSelf': 'center',
'overflow': 'hidden', 'marginTop': -2, marginRight: PX_8};
const object5 = {flexShrink: 1};
object5.marginBottom = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid() ? value3 : 0;
object.nameText = object5;
const object6 = {'position': 'relative', 'borderRadius': null, 'justifyContent': 'center', 'alignItems': 'center',
'flexShrink': 0, 'flexGrow': 0};
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
copyDataProperties(object6, sizeStyle, importDefault);
object6['marginRight'] = layoutStyles.icon.margin.marginRight + 4;
object.avatar = object6;
return object;
}
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 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 = (ChannelListLayoutModule).useMessagesTabLayout(panelVariant);
const styles = useStyles(value2);
const analyticsLocations = (UseAnalyticsLocations)().analyticsLocations;
const analyticsLocations2 = analyticsLocations;
const layoutStyles = (ChannelListLayoutModule).getLayoutStyles(value2);
const value4 = (UseFontScaleModule).useFontScale();
const value5 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStoresObject([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
const value6 = analyticsLocations2.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 = (FriendSuggestionUtilsModule).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 = (ReanimatedRexportModule).useSharedValue(false);
analyticsLocations2.useEffect(_fun111733, [value13,
(require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([RelationshipStore],
function() {
return RelationshipStore.getRelationshipType(suggestedFriend.user.id) === RelationshipTypes.PENDING_OUTGOING;
})]);
const renderChannelPressableWrapper = ChannelPressableWrapperModule.renderChannelPressableWrapper;
const PressableHighlight = (PressablesModule).PressableHighlight;
const backgroundColor = styles.rowActive.backgroundColor;
const items3 = [styles.pressable];
items3[1] = {borderRadius: layoutStyles.container.borderRadius};
const renderChannelWrapper = ChannelWrapperModule.renderChannelWrapper;
const jsxRuntimeEnv0_11Binding = jsxRuntimeEnv0_11;
const Avatar = (NativeModule).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 = (TextModule).Text;
let variant = layoutStyles.channelName.text.variant;
const text = (
<Text
lineClamp={1}
variant={variant}
color="text-default"
style={styles.nameText}
>
{r3}
</Text>
);
const object2 = {};
object2.marginTop = PlatformUtilsModule.isAndroid() ? -2 : 0;
const ActionStatusSubLabel = (ActionStatusSubLabelModule).ActionStatusSubLabel;
const height = layoutStyles.messagePreview.height;
const r33 = PlatformUtilsModule.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={object2}>
<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 = (ContactSuggestionActionsModule).ContactSuggestionActions;
user = suggestedFriend.user;
let value = ChannelListLayoutModule;
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) {
ReactNativeModule.View.set(false);
}
}
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);
}
}
global.__d(_fun111726, 14802, [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]) /* metro module 14802, 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] */;
@@ -1,43 +1,50 @@
/* Metro module 14801; source: modules/notification_center/native/ForYouSuggestedFriendsSectionHeader.tsx; dependencies: [31, 27, 33, 4501, 697, 4573, 1244, 2] */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
function _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,
ReactModule;
const createStyles = CreateStylesModule.createStyles;
object = {};
const BORDER_SUBTLE = (Native).colors.BORDER_SUBTLE;
object.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');
object.noDivider = {'borderTopWidth': 0, 'marginTop': 0};
const PX_16 = (Native).space.PX_16;
object.text = {marginTop: PX_16};
const env0_4 = Reflect.apply(createStyles, CreateStylesModule, [object]);
(FileImportTrackerModule).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 = (TextModule).Text;
const intl = (IndexNativeModule).intl;
return (
<View style={items2}>
<Text
style={styles.text}
color="text-muted"
variant="text-sm/semibold"
>
{intl.string((IndexNativeModule).t['1uAmCw'])}
</Text>
</View>
);
}
}
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>
);
}
global.__d(_fun111724, 14801, [31, 27, 33, 4501, 697, 4573, 1244,
2]) /* metro module 14801, dependencies: [31, 27, 33, 4501, 697, 4573, 1244, 2] */;
@@ -1,47 +1,73 @@
/* Metro module 14809; source: modules/notification_center/native/ForYouUnreadClearedState.tsx; dependencies: [31, 27, 33, 4501, 697, 1305, 11111, 4573, 1244, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as NativeModule from '../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
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 */;
ReactModule;
let value = JsxRuntimeModule;
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,
object = {container: {'marginBottom': 4, 'marginHorizontal': 24, 'alignItems': 'center', 'flexDirection': 'row'}};
const object2 = {'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;
object2.backgroundColor = GREEN_400;
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xl;
object.imageContainer = object2;
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');
object.icon = {'margin': 12, 'position': 'absolute', color: GREEN_400};
object.headerText = {marginBottom: 2};
const env0_6 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).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 = (NativeModule).Icon;
items2[1] = (
<Icon
source={importDefault(11111) /* metro dependency 11111 */}
style={styles.icon}
color={styles.icon.color}
/>
);
const Text = (TextModule).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>
);
}
}
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>
);
}
global.__d(_fun111768, 14809, [31, 27, 33, 4501, 697, 1305, 11111, 4573, 1244,
2]) /* metro module 14809, dependencies: [31, 27, 33, 4501, 697, 1305, 11111, 4573, 1244, 2] */;
@@ -1,30 +1,37 @@
/* Metro module 14767; source: modules/notification_center/native/NotificationCenterActionButton.tsx; dependencies: [31, 33, 8341, 8639, 4080, 14768, 1962, 1244, 2] */
import Module08639 from '../../../by-id/module-08639.js'; /* Metro dependency 8639 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as IconButtonNativeModule from '../../../design/components/Button/native/IconButton.native.tsx'; /* Metro dependency 8341 */
function _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');
ReactModule;
(FileImportTrackerModule).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 = (IconButtonNativeModule).IconButton;
const iconButtonProps = {'variant': 'tertiary', 'size': 'sm', icon: Module08639,
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']);
}
}
}
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']);
}
global.__d(_fun111479, 14767, [31, 33, 8341, 8639, 4080, 14768, 1962, 1244,
2]) /* metro module 14767, dependencies: [31, 33, 8341, 8639, 4080, 14768, 1962, 1244, 2] */;
@@ -1,120 +1,146 @@
/* 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] */
import RecentMentionsStore from '../../recents/RecentMentionsStore.tsx'; /* Metro dependency 5215 */
import ForLaterExperiment from '../../saved_messages/ForLaterExperiment.tsx'; /* Metro dependency 10929 */
import Module11944 from '../../../by-id/module-11944.js'; /* Metro dependency 11944 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as AtIconModule from '../../../design/components/Icon/native/redesign/generated/AtIcon.tsx'; /* Metro dependency 6700 */
import * as BottomSheetTitleHeaderNativeModule from '../../../design/components/Sheet/native/BottomSheetTitleHeader.native.tsx'; /* Metro dependency 6758 */
import * as ActionSheetNativeModule from '../../../design/components/Sheet/native/ActionSheet.native.tsx'; /* Metro dependency 6805 */
import * as SettingsIconModule from '../../../design/components/Icon/native/redesign/generated/SettingsIcon.tsx'; /* Metro dependency 7002 */
import * as BellIconModule from '../../../design/components/Icon/native/redesign/generated/BellIcon.tsx'; /* Metro dependency 9216 */
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');
(FileImportTrackerModule).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}
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() {
var recentMentionsStoreBinding = RecentMentionsStore;
return {everyoneFilter: recentMentionsStoreBinding.everyoneFilter,
roleFilter: recentMentionsStoreBinding.roleFilter};
});
const env0_2 = ReactModule.useCallback(_fun111485, [everyoneFilter, roleFilter]);
const defaultImport = ForLaterExperiment;
const useConfig = defaultImport.useConfig;
const enabled = Reflect.apply(useConfig, defaultImport, [{location: 'NotificationCenterActionSheet'}]).enabled;
const value3 = ReactModule.useCallback(_fun111486, []);
const value4 = ReactModule.useCallback(function() {
importDefault(dependencyMap[7]).hideActionSheet();
require(dependencyMap[14]).openUserSettings({screen: UserSettingsSections.NOTIFICATIONS});
}, []);
const ActionSheet = (ActionSheetNativeModule).ActionSheet;
object3 = {showGradient: true};
const BottomSheetTitleHeader = (BottomSheetTitleHeaderNativeModule).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 = (AtIconModule).AtIcon;
actionSheetSwitchRowProps.icon = (
<Icon IconComponent={AtIcon} source={importDefault(11003) /* metro dependency 11003 */} />
);
const actionSheetSwitchRow = <ActionSheetSwitchRow {...actionSheetSwitchRowProps} />;
const object = {onValueChange: onValueChange_111489, value: everyoneFilter};
string = intl.string;
const S9GLtt = (require(1244) /* metro dependency 1244: indexNative */).t.S9GLtt;
object.label = Reflect.apply(string, intl, [S9GLtt]);
object.subLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.jYgZa4);
Icon = ActionSheetRow.Icon;
const BellIcon = (BellIconModule).BellIcon;
object.icon = <Icon IconComponent={BellIcon} source={importDefault(14770) /* metro dependency 14770 */} />;
const 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"
/>
{actionSheetSwitchRow}
<ActionSheetSwitchRow {...object} />
</Group>
</ActionSheet>
);
}
);
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 = (SettingsIconModule).SettingsIcon;
return (
<ActionSheet {...object3}>
{group}
<Group hasIcons>
{r9}
<ActionSheetRow
icon={<Icon IconComponent={SettingsIcon} source={Module11944} />}
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 object = {};
const roleFilterBinding = roleFilter;
object.roleFilter = roleFilterBinding;
object.everyoneFilter = everyoneFilter;
copyDataProperties(object, a0, roleFilterBinding);
Reflect.apply(setGuildFilter, value, [object]);
}
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});
}
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});
}
global.__d(_fun111482, 14768, [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]) /* metro module 14768, 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] */;
File diff suppressed because it is too large. Load diff
@@ -1,18 +1,30 @@
/* 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] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import AnalyticsUtils from '../../../utils/AnalyticsUtils.tsx'; /* Metro dependency 683 */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import NotificationCenterPermissionNudgeExperiment from './NotificationCenterPermissionNudgeExperiment.tsx'; /* Metro dependency 14773 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as DismissibleContentConstantsModule from '../../dismissible_content/DismissibleContentConstants.tsx'; /* Metro dependency 1376 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ButtonNativeModule from '../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as PressablesModule from '../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as XSmallIconModule from '../../../design/components/Icon/native/redesign/generated/XSmallIcon.tsx'; /* Metro dependency 5312 */
import * as UseSelectedDismissibleContentModule from '../../dismissible_content/hooks/useSelectedDismissibleContent.tsx'; /* Metro dependency 7013 */
import * as BellSlashIconModule from '../../../design/components/Icon/native/redesign/generated/BellSlashIcon.tsx'; /* Metro dependency 10629 */
import * as NotificationPermissionUtilModule from '../../nuf/native/NotificationPermissionUtil.tsx'; /* Metro dependency 11874 */
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 */;
let value = ReactModule;
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;
@@ -23,105 +35,154 @@ function _fun111501(global, require, importDefault, importAll, module, exports,
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,
object = {};
const object2 = {'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;
object2.paddingRight = PX_12;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object5.paddingVertical = PX_16;
object2.paddingVertical = PX_16;
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object5.backgroundColor = BACKGROUND_BASE_LOW;
object2.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',
object2.borderColor = BORDER_SUBTLE;
object2.gap = 16;
object.container = object2;
object.contentContainer = {flex: 1};
const object4 = {'width': 48, 'height': 48, 'borderRadius': null, 'backgroundColor': null, 'alignItems': 'center',
'justifyContent': 'center'};
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object4.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;
object4.backgroundColor = BACKGROUND_MOD_STRONG;
object.iconContainer = object4;
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');
object.ctaButton = {alignSelf: 'flex-start', marginTop: PX_12};
const env0_16 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).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 = (BellSlashIconModule).BellSlashIcon;
const ICON_STRONG = (Native).colors.ICON_STRONG;
const items3 = [
<View style={styles.iconContainer}>
<BellSlashIcon size="md" color={ICON_STRONG} />
</View>,
];
const Text = (TextModule).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 = (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 = (ButtonNativeModule).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 = (PressablesModule).PressableHighlight;
string = intl.string;
const WAI6xu = (require(1244) /* metro dependency 1244: indexNative */).t.WAI6xu;
const XSmallIcon = (XSmallIconModule).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 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 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 = 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}]);
}
}
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 = NotificationCenterPermissionNudgeExperiment;
const useConfig = defaultImport.useConfig;
const enabled = Reflect.apply(useConfig, defaultImport, [{location: 'NotificationCenterPermissionNudge'}]).enabled;
const value2 = (NotificationPermissionUtilModule).useCanSeePushNotificationNudge();
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 = Module00057(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 _fun111507() { // fn#111507, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14969:2698, offset: 0x023a52c9, size: 29 bytes, params: 1, frame: 11
const binding = env0_0;
const USER_DISMISS = ContentDismissActionType.USER_DISMISS;
return binding(USER_DISMISS);
}
}
}
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}]);
}
global.__d(_fun111501, 14772, [57, 31, 27, 661, 1376, 11873, 33, 4501, 697, 683, 10629, 4573, 1244, 4578, 11874,
5278, 5312, 14773, 7013, 1365,
2]) /* metro module 14772, dependencies: [57, 31, 27, 661, 1376, 11873, 33, 4501, 697, 683, 10629, 4573, 1244, 4578, 11874, 5278, 5312, 14773, 7013, 1365, 2] */;
@@ -1,11 +1,15 @@
/* Metro module 14773; source: modules/notification_center/native/NotificationCenterPermissionNudgeExperiment.tsx; dependencies: [1854, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ApexModule from '../../experiments/apex/index.tsx'; /* Metro dependency 1854 */
function _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 */;
let value = ApexModule;
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');
(FileImportTrackerModule).fileFinishedImporting('modules/notification_center/native/NotificationCenterPermissionNudgeExperiment.tsx');
exports.default = value;
}
global.__d(_fun111508, 14773, [1854, 2]) /* metro module 14773, dependencies: [1854, 2] */;
@@ -1,39 +1,44 @@
/* Metro module 14778; source: modules/notification_center/useGetOrFetchNotificationCenterItemApplications.tsx; dependencies: [31, 4624, 6777, 2] */
import UseGetOrFetchApplications from '../applications/useGetOrFetchApplications.tsx'; /* Metro dependency 6777 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as NotificationCenterItemsTypesModule from './NotificationCenterItemsTypes.tsx'; /* Metro dependency 4624 */
function _fun111615(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111615, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14975:6, offset: 0x023a809b, size: 257 bytes, params: 8, frame: 19
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importAll(31) /* metro dependency 31 */;
const Set = global.Set;
const {INCOMING_GAME_FRIEND_REQUESTS, INCOMING_GAME_FRIEND_REQUESTS_ACCEPTED, INCOMING_FRIEND_REQUESTS,
INCOMING_FRIEND_REQUESTS_ACCEPTED} = (require(4624) /* metro dependency 4624: NotificationCenterItemsTypes */).NotificationCenterLocalItems;
INCOMING_FRIEND_REQUESTS_ACCEPTED} = (NotificationCenterItemsTypesModule).NotificationCenterLocalItems;
const set = new Set([INCOMING_GAME_FRIEND_REQUESTS, INCOMING_GAME_FRIEND_REQUESTS_ACCEPTED,
INCOMING_FRIEND_REQUESTS, INCOMING_FRIEND_REQUESTS_ACCEPTED]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notification_center/useGetOrFetchNotificationCenterItemApplications.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/notification_center/useGetOrFetchNotificationCenterItemApplications.tsx');
exports.useGetOrFetchNotificationCenterItemsApplications = useGetOrFetchNotificationCenterItemsApplications;
}
function useGetOrFetchNotificationCenterItemsApplications(a0) { // fn#111616, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14975:559, offset: 0x023a819c, size: 71 bytes, params: 2, frame: 15
const env0_0 = a0;
return (UseGetOrFetchApplications)(ReactModule.useMemo(_fun111617,
[a0]));
function _fun111617() { // fn#111617, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14975:637, offset: 0x023a81e3, size: 68 bytes, params: 1, frame: 12
const Set = global.Set;
new Set().forEach(_fun111618);
return [];
function _fun111618({applicationId, type}) { // fn#111618, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14975:679, offset: 0x023a8227, size: 97 bytes, params: 2, frame: 12
const value = environment.__proto__.__proto__;
let binding = env2_3;
if (binding.has(type)) {
if (!(applicationId == null || env0_0.has(applicationId))) {
binding = env0_0;
binding.add(applicationId);
binding = env0_1;
binding.push(applicationId);
}
}
}
function useGetOrFetchNotificationCenterItemsApplications(a0) { // fn#111616, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14975:559, offset: 0x023a819c, size: 71 bytes, params: 2, frame: 15
const env0_0 = a0;
return (importDefault(6777) /* metro dependency 6777: useGetOrFetchApplications */)(env0_2.useMemo(_fun111617,
[a0]));
}
function _fun111617() { // fn#111617, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14975:637, offset: 0x023a81e3, size: 68 bytes, params: 1, frame: 12
const Set = global.Set;
new Set().forEach(_fun111618);
return [];
}
function _fun111618({applicationId, type}) { // fn#111618, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14975:679, offset: 0x023a8227, size: 97 bytes, params: 2, frame: 12
const value = environment.__proto__.__proto__;
let binding = env2_3;
if (binding.has(type)) {
if (!(applicationId == null || env0_0.has(applicationId))) {
binding = env0_0;
binding.add(applicationId);
binding = env0_1;
binding.push(applicationId);
}
}
}
global.__d(_fun111615, 14778, [31, 4624, 6777, 2]) /* metro module 14778, dependencies: [31, 4624, 6777, 2] */;
@@ -1,37 +1,41 @@
/* Metro module 14782; source: modules/notification_center/useNotificationCenterItemAcked.tsx; dependencies: [14775, 566, 4788, 2] */
import NotificationCenterStore from './NotificationCenterStore.tsx'; /* Metro dependency 14775 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as FluxModule from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
function _fun111659(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111659, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14979:6, offset: 0x023aacff, size: 114 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const notificationCenterStore = importDefault(14775) /* metro dependency 14775: NotificationCenterStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notification_center/useNotificationCenterItemAcked.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/notification_center/useNotificationCenterItemAcked.tsx');
exports.useNotificationCenterItemAcked = useNotificationCenterItemAcked;
}
function useNotificationCenterItemAcked(a0, a1) { // fn#111660, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14979:235, offset: 0x023aad71, size: 119 bytes, params: 3, frame: 17
var r1;
var r0;
const env0_0 = a0;
var value;
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([NotificationCenterStore],
_fun111661);
const forceUnacked = a0.forceUnacked;
if (forceUnacked) {
r0 = !forceUnacked;
} else {
if (value2) {
r1 = value2;
function useNotificationCenterItemAcked(a0, a1) { // fn#111660, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14979:235, offset: 0x023aad71, size: 119 bytes, params: 3, frame: 17
var r1;
var r0;
const env0_0 = a0;
var value;
const value2 = (FluxModule).useStateFromStores([NotificationCenterStore],
_fun111661);
const forceUnacked = a0.forceUnacked;
if (forceUnacked) {
r0 = !forceUnacked;
} else {
value = require(4788) /* metro dependency 4788: NotificationCenterUtils */;
value = value.isRemoteAcked(a0, a1);
r1 = value;
if (value2) {
r1 = value2;
} else {
value = require(4788) /* metro dependency 4788: NotificationCenterUtils */;
value = value.isRemoteAcked(a0, a1);
r1 = value;
}
r0 = r1;
}
r0 = r1;
return r0;
function _fun111661() { // fn#111661, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14979:281, offset: 0x023aade8, size: 27 bytes, params: 1, frame: 11
return NotificationCenterStore.isLocalItemAcked(env0_0);
}
}
return r0;
}
function _fun111661() { // fn#111661, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14979:281, offset: 0x023aade8, size: 27 bytes, params: 1, frame: 11
return NotificationCenterStore.isLocalItemAcked(env0_0);
}
global.__d(_fun111659, 14782, [14775, 566, 4788, 2]) /* metro module 14782, dependencies: [14775, 566, 4788, 2] */;
@@ -1,164 +1,177 @@
/* Metro module 14776; source: modules/notification_center/useNotificationCenterItemsLoader.tsx; dependencies: [5, 57, 31, 5215, 4623, 14775, 4865, 566, 14777, 5097, 8422, 2] */
import Module00005 from '../../by-id/module-00005.js'; /* Metro dependency 5 */
import Module00057 from '../../by-id/module-00057.js'; /* Metro dependency 57 */
import NotificationCenterItemsStore from './NotificationCenterItemsStore.tsx'; /* Metro dependency 4623 */
import RecentMentionsStore from '../recents/RecentMentionsStore.tsx'; /* Metro dependency 5215 */
import NotificationCenterStore from './NotificationCenterStore.tsx'; /* Metro dependency 14775 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ReadStateConstantsModule from '../read_states/ReadStateConstants.tsx'; /* Metro dependency 4865 */
import * as NotificationCenterItemsActionsModule from './NotificationCenterItemsActions.tsx'; /* Metro dependency 14777 */
function _fun111568(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111568, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14973:6, offset: 0x023a6f48, size: 260 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = importDefault(57) /* metro dependency 57 */;
const env0_5 = importAll(31) /* metro dependency 31 */;
const recentMentionsStore = importDefault(5215) /* metro dependency 5215: RecentMentionsStore */;
const notificationCenterItemsStore = importDefault(4623) /* metro dependency 4623: NotificationCenterItemsStore */;
const notificationCenterStore = importDefault(14775) /* metro dependency 14775: NotificationCenterStore */;
const env0_9 = (require(4865) /* metro dependency 4865: ReadStateConstants */).ReadStateTypes;
const closure = useNotificationCenterItemsLoader;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notification_center/useNotificationCenterItemsLoader.tsx');
const useNotificationCenterItemsLoader2 = useNotificationCenterItemsLoader;
(FileImportTrackerModule).fileFinishedImporting('modules/notification_center/useNotificationCenterItemsLoader.tsx');
exports.PAGE_SIZE_WITH_MENTIONS = 8;
exports.PAGE_SIZE = 20;
exports.useNotificationCenterItemsLoader = closure;
exports.useNotificationCenterItemsLoader = useNotificationCenterItemsLoader2;
exports.useDesktopNotificationCenterItemsLoader = useDesktopNotificationCenterItemsLoader;
}
function useNotificationCenterItemsLoader({isFocused, navigatedAway, isDesktop, withMentions, initialPageSize}) { // fn#111569, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14973:214, offset: 0x023a704c, size: 652 bytes, params: 2, frame: 32
withMentions = !(withMentions === undefined) && withMentions;
const env0_4 = initialPageSize;
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([NotificationCenterStore],
function() {
return NotificationCenterStore.shouldReload();
});
const binding = value2;
const env0_6 = binding.useRef(false);
const [property, env0_7] = env0_4(binding.useState(false), 2);
const {initialized, loading, items, hasMore, cursor,
errored} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([NotificationCenterItemsStore],
function() {
return {initialized: NotificationCenterItemsStore.initialized, loading: NotificationCenterItemsStore.loading,
items: NotificationCenterItemsStore.items, hasMore: NotificationCenterItemsStore.hasMore,
cursor: NotificationCenterItemsStore.cursor, errored: NotificationCenterItemsStore.errored};
});
const {roleFilter,
everyoneFilter} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([RecentMentionsStore],
function() {
return {everyoneFilter: RecentMentionsStore.everyoneFilter, roleFilter: RecentMentionsStore.roleFilter};
});
binding.useEffect(_fun111573, []);
binding.useEffect(_fun111575, [isFocused, initialized]);
binding.useEffect(function() {
return _fun111577;
}, [navigatedAway, items, isDesktop, (importDefault(8422) /* metro dependency 8422: useGetIsMounted */)(), errored]);
binding.useEffect(_fun111578, [initialized, value2, isFocused, withMentions, roleFilter, everyoneFilter,
initialPageSize]);
const useCallback = binding.useCallback;
let value = _fun111579();
value = Reflect.apply(useCallback, binding, [value, [initialized, hasMore, cursor, errored, withMentions,
roleFilter, everyoneFilter]]);
return {initialized: initialized, loading: loading, items: items, hasMore: hasMore, loadMore: value,
loadingMore: property, setReadNotifItemToAcked: function(a0) {
if (!a0.acked) {
a0.acked = true;
}
}, errored: errored};
}
function useDesktopNotificationCenterItemsLoader() { // fn#111585, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14973:2013, offset: 0x023a7661, size: 106 bytes, params: 1, frame: 14
const value = useNotificationCenterItemsLoader({'isFocused': true, 'isDesktop': true});
const initialized = value.initialized;
const loading = value.loading;
const items2 = value.items;
const hasMore = value.hasMore;
const loadMore = value.loadMore;
const object2 = {initialized: initialized, loading: loading};
object2.items = items2.filter(function(a0) {
return a0.kind === 'notification-center-item';
});
object2.hasMore = hasMore;
object2.loadMore = loadMore;
return object2;
}
function _fun111573() { // fn#111573, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14973:798, offset: 0x023a7359, size: 49 bytes, params: 1, frame: 11
var environment;
const value = environment.__proto__;
(require(14777) /* metro dependency 14777: NotificationCenterItemsActions */).setNotificationCenterActive(true);
return _fun111574;
}
function _fun111575() { // fn#111575, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14973:906, offset: 0x023a73b2, size: 67 bytes, params: 1, frame: 12
var moduleValue;
if (initialized && isFocused) {
value = environment.__proto__;
moduleValue = require(5097) /* metro dependency 5097: ReadStateActionCreators */;
moduleValue.ackUserFeature(ReadStateTypes.NOTIFICATION_CENTER);
}
}
function _fun111576() { // fn#111576, offset: 0x023a73f5, size: 11 bytes, params: 1, frame: 1
return _fun111577;
}
function _fun111578() { // fn#111578, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14973:1151, offset: 0x023a749b, size: 132 bytes, params: 1, frame: 15
var value3;
var value4;
const initializedBinding = initialized;
if (initializedBinding ? env0_5 && isFocused : !initializedBinding) {
value3 = environment.__proto__;
value4 = 8;
require(dependencyMap[value4]).fetchNotificationCenterItems({limit: initialPageSize ?? (withMentions ? value4 : 20),
with_mentions: withMentions, roles_filter: roleFilter, everyone_filter: everyoneFilter});
}
}
function _fun111579() { // fn#111579, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14973:1319, offset: 0x023a751f, size: 36 bytes, params: 1, frame: 12
const env0_0 = env1_3(_fun111581);
return _fun111583;
}
function _fun111574() { // fn#111574, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14973:843, offset: 0x023a738a, size: 40 bytes, params: 1, frame: 11
const value = environment.__proto__.__proto__;
return (require(14777) /* metro dependency 14777: NotificationCenterItemsActions */).setNotificationCenterActive(false);
}
function _fun111577() { // fn#111577, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14973:1006, offset: 0x023a7400, size: 155 bytes, params: 1, frame: 13
let value = environment.__proto__;
if (isDesktop) {
if (!env1_15() && (errored || items.length > 100)) {
value = environment.__proto__.__proto__;
value = require(14777) /* metro dependency 14777: NotificationCenterItemsActions */;
value.resetNotificationCenter();
}
} else if (navigatedAway && items.length > 100) {
value = environment.__proto__.__proto__;
value = require(14777) /* metro dependency 14777: NotificationCenterItemsActions */;
value.resetNotificationCenter();
}
}
function* _fun111581(a0) { // fn#111581, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14973:1339, offset: 0x023a754e, size: 232 bytes, params: 2, frame: 18
var environment;
var binding;
if (true) {
value = environment.__proto__.__proto__;
var r1 = RecentMentionsStore.current || !NotificationCenterStore;
r1 = !r1 ? !useNotificationCenterItemsLoader : r1;
r1 = !r1 ? env2_11 == null : r1;
r1 = !r1 ? !a0 && env2_12 : r1;
if (!r1) {
RecentMentionsStore.current = true;
NotificationCenterItemsStore(true);
binding = env3_0;
var value8 = 8;
var value9 = binding(env3_2[value8]);
var fetchNotificationCenterItems = value9.fetchNotificationCenterItems;
binding = env2_3;
yield Reflect.apply(fetchNotificationCenterItems, value9, [{after: env2_11, with_mentions: binding,
roles_filter: env2_13, everyone_filter: env2_14, limit: binding ? value8 : 20}, function() {
RecentMentionsStore.current = false;
}]);
if (false) {
return undefined;
function useNotificationCenterItemsLoader({isFocused, navigatedAway, isDesktop, withMentions, initialPageSize}) { // fn#111569, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14973:214, offset: 0x023a704c, size: 652 bytes, params: 2, frame: 32
withMentions = !(withMentions === undefined) && withMentions;
const initialPageSize2 = initialPageSize;
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([NotificationCenterStore],
function() {
return NotificationCenterStore.shouldReload();
});
const binding = value2;
const env0_6 = binding.useRef(false);
const [property, env0_7] = initialPageSize2(binding.useState(false), 2);
const {initialized, loading, items, hasMore, cursor,
errored} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([NotificationCenterItemsStore],
function() {
var notificationCenterItemsStoreBinding = NotificationCenterItemsStore;
return {initialized: notificationCenterItemsStoreBinding.initialized,
loading: notificationCenterItemsStoreBinding.loading, items: notificationCenterItemsStoreBinding.items,
hasMore: notificationCenterItemsStoreBinding.hasMore, cursor: notificationCenterItemsStoreBinding.cursor,
errored: notificationCenterItemsStoreBinding.errored};
});
const {roleFilter,
everyoneFilter} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([RecentMentionsStore],
function() {
var recentMentionsStoreBinding = RecentMentionsStore;
return {everyoneFilter: recentMentionsStoreBinding.everyoneFilter,
roleFilter: recentMentionsStoreBinding.roleFilter};
});
binding.useEffect(_fun111573, []);
binding.useEffect(_fun111575, [isFocused, initialized]);
binding.useEffect(function() {
return _fun111577;
}, [navigatedAway, items, isDesktop, (importDefault(8422) /* metro dependency 8422: useGetIsMounted */)(), errored]);
binding.useEffect(_fun111578, [initialized, value2, isFocused, withMentions, roleFilter, everyoneFilter,
initialPageSize]);
const useCallback = binding.useCallback;
let value = _fun111579();
value = Reflect.apply(useCallback, binding, [value, [initialized, hasMore, cursor, errored, withMentions,
roleFilter, everyoneFilter]]);
return {initialized: initialized, loading: loading, items: items, hasMore: hasMore, loadMore: value,
loadingMore: property, setReadNotifItemToAcked: function(a0) {
if (!a0.acked) {
a0.acked = true;
}
NotificationCenterItemsStore(false);
}, errored: errored};
function _fun111573() { // fn#111573, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14973:798, offset: 0x023a7359, size: 49 bytes, params: 1, frame: 11
var environment;
const value = environment.__proto__;
(NotificationCenterItemsActionsModule).setNotificationCenterActive(true);
return _fun111574;
function _fun111574() { // fn#111574, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14973:843, offset: 0x023a738a, size: 40 bytes, params: 1, frame: 11
const value = environment.__proto__.__proto__;
return (NotificationCenterItemsActionsModule).setNotificationCenterActive(false);
}
}
function _fun111575() { // fn#111575, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14973:906, offset: 0x023a73b2, size: 67 bytes, params: 1, frame: 12
var moduleValue;
if (initialized && isFocused) {
value = environment.__proto__;
moduleValue = require(5097) /* metro dependency 5097: ReadStateActionCreators */;
moduleValue.ackUserFeature(ReadStateTypes.NOTIFICATION_CENTER);
}
}
function _fun111576() { // fn#111576, offset: 0x023a73f5, size: 11 bytes, params: 1, frame: 1
return _fun111577;
function _fun111577() { // fn#111577, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14973:1006, offset: 0x023a7400, size: 155 bytes, params: 1, frame: 13
let value = environment.__proto__;
if (isDesktop) {
if (!env1_15() && (errored || items.length > 100)) {
value = environment.__proto__.__proto__;
value = require(14777) /* metro dependency 14777: NotificationCenterItemsActions */;
value.resetNotificationCenter();
}
} else if (navigatedAway && items.length > 100) {
value = environment.__proto__.__proto__;
value = require(14777) /* metro dependency 14777: NotificationCenterItemsActions */;
value.resetNotificationCenter();
}
}
}
function _fun111578() { // fn#111578, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14973:1151, offset: 0x023a749b, size: 132 bytes, params: 1, frame: 15
var value3;
var value4;
const initializedBinding = initialized;
if (initializedBinding ? ReactModule && isFocused : !initializedBinding) {
value3 = environment.__proto__;
value4 = 8;
require(dependencyMap[value4]).fetchNotificationCenterItems({limit: initialPageSize ?? (withMentions ? value4 : 20),
with_mentions: withMentions, roles_filter: roleFilter, everyone_filter: everyoneFilter});
}
}
function _fun111579() { // fn#111579, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14973:1319, offset: 0x023a751f, size: 36 bytes, params: 1, frame: 12
const env0_0 = env1_3(_fun111581);
return _fun111583;
function* _fun111581(a0) { // fn#111581, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14973:1339, offset: 0x023a754e, size: 232 bytes, params: 2, frame: 18
var environment;
var binding;
if (true) {
value = environment.__proto__.__proto__;
var r1 = RecentMentionsStore.current || !NotificationCenterStore;
r1 = !r1 ? !useNotificationCenterItemsLoader : r1;
r1 = !r1 ? env2_11 == null : r1;
r1 = !r1 ? !a0 && env2_12 : r1;
if (!r1) {
RecentMentionsStore.current = true;
NotificationCenterItemsStore(true);
binding = env3_0;
var value8 = 8;
var value9 = binding(env3_2[value8]);
var fetchNotificationCenterItems = value9.fetchNotificationCenterItems;
binding = env2_3;
yield Reflect.apply(fetchNotificationCenterItems, value9, [{after: env2_11, with_mentions: binding,
roles_filter: env2_13, everyone_filter: env2_14, limit: binding ? value8 : 20}, function() {
RecentMentionsStore.current = false;
}]);
if (false) {
return undefined;
}
NotificationCenterItemsStore(false);
}
}
}
function _fun111583() { // fn#111583, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14973:1561, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
return env0_0.apply(this, arguments);
}
}
}
function useDesktopNotificationCenterItemsLoader() { // fn#111585, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14973:2013, offset: 0x023a7661, size: 106 bytes, params: 1, frame: 14
const value = useNotificationCenterItemsLoader({'isFocused': true, 'isDesktop': true});
const initialized = value.initialized;
const loading = value.loading;
const items2 = value.items;
const hasMore = value.hasMore;
const loadMore = value.loadMore;
const object = {initialized: initialized, loading: loading};
object.items = items2.filter(function(a0) {
return a0.kind === 'notification-center-item';
});
object.hasMore = hasMore;
object.loadMore = loadMore;
return object;
}
}
global.__d(_fun111568, 14776, [5, 57, 31, 5215, 4623, 14775, 4865, 566, 14777, 5097, 8422,
2]) /* metro module 14776, dependencies: [5, 57, 31, 5215, 4623, 14775, 4865, 566, 14777, 5097, 8422, 2] */;
@@ -1,56 +1,61 @@
/* Metro module 14471; source: modules/notification_center/useRelativeTimestamp.tsx; dependencies: [57, 31, 4788, 672, 2] */
import Module00057 from '../../by-id/module-00057.js'; /* Metro dependency 57 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as NotificationCenterUtilsModule from './NotificationCenterUtils.tsx'; /* Metro dependency 4788 */
function _fun109503(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#109503, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14668:6, offset: 0x0234f8ad, size: 137 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notification_center/useRelativeTimestamp.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/notification_center/useRelativeTimestamp.tsx');
exports.useRelativeTimestamp = useRelativeTimestamp;
}
function useRelativeTimestamp({timestamp, abbreviated}) { // fn#109504, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14668:225, offset: 0x0234f936, size: 123 bytes, params: 2, frame: 17
abbreviated = abbreviated === undefined || abbreviated;
const value = Module00057(ReactModule.useState(_fun109505), 2);
const property = value[0];
const env0_2 = value[1];
ReactModule.useEffect(_fun109506, [timestamp, abbreviated]);
return property;
function _fun109505() { // fn#109505, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14668:305, offset: 0x0234f9b1, size: 50 bytes, params: 1, frame: 13
const value = environment.__proto__;
return (NotificationCenterUtilsModule).getRelativeTimestamp(timestamp,
abbreviated);
}
function useRelativeTimestamp({timestamp, abbreviated}) { // fn#109504, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14668:225, offset: 0x0234f936, size: 123 bytes, params: 2, frame: 17
abbreviated = abbreviated === undefined || abbreviated;
const binding = env0_4;
const value = env0_3(binding.useState(_fun109505), 2);
const property = value[0];
const env0_2 = value[1];
binding.useEffect(_fun109506, [timestamp, abbreviated]);
return property;
}
function _fun109506() { // fn#109506, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14668:388, offset: 0x0234f9e3, size: 251 bytes, params: 1, frame: 19
const binding = env0_2;
const getRelativeTimestamp = NotificationCenterUtilsModule.getRelativeTimestamp;
const timestampBinding = timestamp;
binding(Reflect.apply(getRelativeTimestamp, NotificationCenterUtilsModule, [timestampBinding, abbreviated]));
const Date = global.Date;
let value = Date.now() - timestampBinding;
let Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
const DAY = Millis.DAY;
if (value > DAY) {
return undefined;
}
Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
const HOUR = Millis.HOUR;
const r5 = value >= HOUR ? (importDefault(672) /* metro dependency 672: Durations */).Millis.HOUR : (importDefault(672) /* metro dependency 672: Durations */).Millis.MINUTE;
const setInterval = global.setInterval;
value = r5 - value % r5;
const env0_0 = setInterval(_fun109507, r5, value);
return _fun109508;
function _fun109507() { // fn#109507, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14668:563, offset: 0x0234fade, size: 59 bytes, params: 1, frame: 15
const binding = env1_2;
const getRelativeTimestamp = NotificationCenterUtilsModule.getRelativeTimestamp;
binding(Reflect.apply(getRelativeTimestamp, NotificationCenterUtilsModule, [timestamp, abbreviated]));
}
function _fun109505() { // fn#109505, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14668:305, offset: 0x0234f9b1, size: 50 bytes, params: 1, frame: 13
const value = environment.__proto__;
return (require(4788) /* metro dependency 4788: NotificationCenterUtils */).getRelativeTimestamp(timestamp,
abbreviated);
}
function _fun109508() { // fn#109508, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14668:622, offset: 0x013378b1, size: 24 bytes, params: 1, frame: 11
return global.clearInterval(env0_0);
}
}
function _fun109506() { // fn#109506, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14668:388, offset: 0x0234f9e3, size: 251 bytes, params: 1, frame: 19
const binding = env0_2;
const notificationCenterUtilsModule = require(4788) /* metro dependency 4788: NotificationCenterUtils */;
const getRelativeTimestamp = notificationCenterUtilsModule.getRelativeTimestamp;
const timestampBinding = timestamp;
binding(Reflect.apply(getRelativeTimestamp, notificationCenterUtilsModule, [timestampBinding, abbreviated]));
const Date = global.Date;
let value = Date.now() - timestampBinding;
let Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
const DAY = Millis.DAY;
if (value > DAY) {
return undefined;
}
Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
const HOUR = Millis.HOUR;
const r5 = value >= HOUR ? (importDefault(672) /* metro dependency 672: Durations */).Millis.HOUR : (importDefault(672) /* metro dependency 672: Durations */).Millis.MINUTE;
const setInterval = global.setInterval;
value = r5 - value % r5;
const env0_0 = setInterval(_fun109507, r5, value);
return _fun109508;
}
function _fun109507() { // fn#109507, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14668:563, offset: 0x0234fade, size: 59 bytes, params: 1, frame: 15
const binding = env1_2;
const notificationCenterUtilsModule = require(4788) /* metro dependency 4788: NotificationCenterUtils */;
const getRelativeTimestamp = notificationCenterUtilsModule.getRelativeTimestamp;
binding(Reflect.apply(getRelativeTimestamp, notificationCenterUtilsModule, [timestamp, abbreviated]));
}
global.__d(_fun109503, 14471, [57, 31, 4788, 672, 2]) /* metro module 14471, dependencies: [57, 31, 4788, 672, 2] */;