Files
discord-decomp/sources/modules/notification_center/NotificationCenterItemsActions.tsx
T
2026-07-27 16:20:00 +03:00

1366 lines
44 KiB
TypeScript

/* Metro module 14777; source: modules/notification_center/NotificationCenterItemsActions.tsx; dependencies: [5, 4623, 661, 694, 5046, 480, 1392, 4788, 507, 3829, 2] */
function _fun111587(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111587, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14974:6, offset: 0x023a76cb, size: 333 bytes, params: 8, frame: 22
const env0_0 = require;
const closure = markNotificationCenterLocalItemsAcked;
const closure2 = function() {
return _markNotificationCenterRemoteItemAcked.apply(this, arguments);
};
const closure3 = markNotificationCenterMentionAcked;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const notificationCenterItemsStore = importDefault(4623) /* metro dependency 4623: NotificationCenterItemsStore */;
const env0_5 = (require(661) /* metro dependency 661: Constants */).Endpoints;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notification_center/NotificationCenterItemsActions.tsx');
exports.setNotificationCenterActive = setNotificationCenterActive;
exports.setNotificationCenterTabFocused = setNotificationCenterTabFocused;
exports.resetNotificationCenter = resetNotificationCenter;
exports.fetchNotificationCenterItems = function() {
return _fetchNotificationCenterItems.apply(this, arguments);
};
exports.markNotificationCenterItemAcked = markNotificationCenterItemAcked;
exports.markNotificationCenterLocalItemsAcked = closure;
exports.markNotificationCenterRemoteItemAcked = closure2;
exports.markNotificationCenterMentionAcked = closure3;
exports.bulkMarkNotificationCenterItemsAcked = function() {
return _bulkMarkNotificationCenterItemsAcked.apply(this, arguments);
};
exports.deleteNotificationCenterItem = function() {
return _deleteNotificationCenterItem.apply(this, arguments);
};
}
function _fetchNotificationCenterItems() { // fn#111588, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14974:141, offset: 0x023a7818, size: 50 bytes, params: 1, frame: 14
return env0_3(_fun111590).apply(this, arguments);
}
function markNotificationCenterLocalItemsAcked(a0) { // fn#111593, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14974:945, offset: 0x023a7aaa, size: 57 bytes, params: 2, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'NOTIFICATION_CENTER_ITEMS_LOCAL_ACK',
localIds: a0});
}
function _markNotificationCenterRemoteItemAcked() { // fn#111595, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14974:1187, offset: 0x023a7ae3, size: 50 bytes, params: 1, frame: 14
return env0_3(_fun111597).apply(this, arguments);
}
function markNotificationCenterMentionAcked(a0) { // fn#111598, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14974:1571, offset: 0x023a7c01, size: 67 bytes, params: 2, frame: 14
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({'type': 'NOTIFICATION_CENTER_ITEMS_ACK',
'optimistic': true, ids: [a0]});
}
function _bulkMarkNotificationCenterItemsAcked() { // fn#111599, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14974:1698, offset: 0x023a7c44, size: 50 bytes, params: 1, frame: 14
return env0_3(_fun111601).apply(this, arguments);
}
function _deleteNotificationCenterItem() { // fn#111605, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14974:2199, offset: 0x023a7dc9, size: 50 bytes, params: 1, frame: 14
return env0_3(_fun111607).apply(this, arguments);
}
function setNotificationCenterActive(a0) { // fn#111608, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14974:2984, offset: 0x023a7f82, size: 57 bytes, params: 2, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'NOTIFICATION_CENTER_SET_ACTIVE',
active: a0});
}
function setNotificationCenterTabFocused(a0) { // fn#111609, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14974:3128, offset: 0x023a7fbb, size: 57 bytes, params: 2, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'NOTIFICATION_CENTER_TAB_FOCUSED',
focused: a0});
}
function resetNotificationCenter() { // fn#111610, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14974:3270, offset: 0x023a7ff4, size: 49 bytes, params: 1, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'RESET_NOTIFICATION_CENTER'});
}
function markNotificationCenterItemAcked(a0) { // fn#111612, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14974:3527, offset: 0x023a8025, size: 118 bytes, params: 2, frame: 13
var moduleValue;
if (a0.local_id != null) {
markNotificationCenterLocalItemsAcked([a0.local_id]);
} else {
moduleValue = require(4788) /* metro dependency 4788: NotificationCenterUtils */;
if (moduleValue.isMentionItem(a0)) {
markNotificationCenterMentionAcked(a0.id);
} else {
markNotificationCenterRemoteItemAcked(a0.id);
}
}
}
function* _fun111590(a0, a1) { // fn#111590, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14974:222, offset: 0x023a7855, size: 479 bytes, params: 3, frame: 25
var environment;
var loading;
var binding;
var value3;
var dispatch;
var object4;
var value4;
var value5;
var Math;
var ceil;
var items2;
var length;
var limit;
var binding2;
var property;
var value6;
var get;
var NOTIF_CENTER_ITEMS;
var value7;
var object5;
var value8;
var NetworkActionNames;
var NOTIFICATION_CENTER_PAGE_FETCH;
var closure;
var object6;
var value9;
var value10;
var value11;
var value12;
var binding3;
var value13;
var body;
var cursor;
var has_more;
var value14;
var value15;
var value16;
var error;
var value17;
let value = undefined;
if (false) {
return value;
}
reduciblePort70: while (true) {
exceptionLanding64: while (true) {
var env0_0 = undefined;
value = environment.__proto__.__proto__;
loading = env2_4.loading;
if (loading) {
break reduciblePort70;
}
binding = env2_1;
value3 = binding(env2_2[3]);
dispatch = value3.dispatch;
yield Reflect.apply(dispatch, value3, [{type: 'LOAD_NOTIFICATION_CENTER_ITEMS'}]);
value4 = undefined;
value5 = false;
if (value5) {
return value4;
}
Math = global.Math;
ceil = Math.ceil;
items2 = env2_4.items;
length = items2.length;
limit = a0.limit;
env0_0 = Reflect.apply(ceil, Math, [length / limit]);
try {
binding = env2_1;
} catch (error) {
break exceptionLanding64;
}
try {
binding2 = env2_2;
} catch (error) {
break exceptionLanding64;
}
try {
property = binding2[4];
} catch (error) {
break exceptionLanding64;
}
try {
value6 = binding(property);
} catch (error) {
break exceptionLanding64;
}
try {
get = value6.get;
} catch (error) {
break exceptionLanding64;
}
try {
object4 = {};
} catch (error) {
break exceptionLanding64;
}
try {
binding = env2_5;
} catch (error) {
break exceptionLanding64;
}
try {
NOTIF_CENTER_ITEMS = binding.NOTIF_CENTER_ITEMS;
} catch (error) {
break exceptionLanding64;
}
try {
value7 = Reflect.apply(NOTIF_CENTER_ITEMS, binding, []);
} catch (error) {
break exceptionLanding64;
}
try {
object4.url = value7;
} catch (error) {
break exceptionLanding64;
}
try {
object5 = {};
} catch (error) {
break exceptionLanding64;
}
try {
binding = env2_0;
} catch (error) {
break exceptionLanding64;
}
try {
property = binding2[5];
} catch (error) {
break exceptionLanding64;
}
try {
value8 = binding(property);
} catch (error) {
break exceptionLanding64;
}
try {
NetworkActionNames = value8.NetworkActionNames;
} catch (error) {
break exceptionLanding64;
}
try {
NOTIFICATION_CENTER_PAGE_FETCH = NetworkActionNames.NOTIFICATION_CENTER_PAGE_FETCH;
} catch (error) {
break exceptionLanding64;
}
try {
object5.event = NOTIFICATION_CENTER_PAGE_FETCH;
} catch (error) {
break exceptionLanding64;
}
try {
closure = properties_111591;
} catch (error) {
break exceptionLanding64;
}
try {
object5.properties = closure;
} catch (error) {
break exceptionLanding64;
}
try {
object4.trackedActionData = object5;
} catch (error) {
break exceptionLanding64;
}
try {
object6 = {};
} catch (error) {
break exceptionLanding64;
}
try {
copyDataProperties(object6, a0, binding2);
} catch (error) {
break exceptionLanding64;
}
try {
object4.query = object6;
} catch (error) {
break exceptionLanding64;
}
try {
object4.rejectWithError = true;
} catch (error) {
break exceptionLanding64;
}
try {
value9 = Reflect.apply(get, value6, [object4]);
} catch (error) {
break exceptionLanding64;
}
yield value9;
try {
value10 = undefined;
value11 = false;
} catch (error) {
break exceptionLanding64;
}
if (value11) {
return value10;
}
try {
value12 = a1 == null;
} catch (error) {
break exceptionLanding64;
}
reducibleJoin41: while (true) {
if (value12) {
break reducibleJoin41;
}
try {
a1();
} catch (error) {
break exceptionLanding64;
}
break reducibleJoin41;
}
try {
binding = env2_1;
} catch (error) {
break exceptionLanding64;
}
try {
binding3 = env2_2;
} catch (error) {
break exceptionLanding64;
}
try {
property = binding3[3];
} catch (error) {
break exceptionLanding64;
}
try {
value13 = binding(property);
} catch (error) {
break exceptionLanding64;
}
try {
dispatch = value13.dispatch;
} catch (error) {
break exceptionLanding64;
}
try {
object4 = {};
} catch (error) {
break exceptionLanding64;
}
try {
object4.type = 'LOAD_NOTIFICATION_CENTER_ITEMS_SUCCESS';
} catch (error) {
break exceptionLanding64;
}
try {
body = value10.body;
} catch (error) {
break exceptionLanding64;
}
try {
items2 = body.items;
} catch (error) {
break exceptionLanding64;
}
try {
object4.items = items2;
} catch (error) {
break exceptionLanding64;
}
try {
body = value10.body;
} catch (error) {
break exceptionLanding64;
}
try {
cursor = body.cursor;
} catch (error) {
break exceptionLanding64;
}
try {
object4.cursor = cursor;
} catch (error) {
break exceptionLanding64;
}
try {
body = value10.body;
} catch (error) {
break exceptionLanding64;
}
try {
has_more = body.has_more;
} catch (error) {
break exceptionLanding64;
}
try {
object4.hasMore = has_more;
} catch (error) {
break exceptionLanding64;
}
try {
value14 = Reflect.apply(dispatch, value13, [object4]);
} catch (error) {
break exceptionLanding64;
}
yield value14;
try {
value15 = undefined;
value16 = false;
} catch (error) {
break exceptionLanding64;
}
if (value16) {
return value15;
}
break reduciblePort70;
}
reducibleJoin66: while (true) {
if (a1 == null) {
break reducibleJoin66;
}
a1();
break reducibleJoin66;
}
binding = env2_1;
value = binding(env2_2[3]);
dispatch = value.dispatch;
yield Reflect.apply(dispatch, value, [{type: 'LOAD_NOTIFICATION_CENTER_ITEMS_FAILURE'}]);
value = undefined;
value17 = false;
reducibleJoin70: while (true) {
if (value17) {
return value;
}
break reducibleJoin70;
}
break reduciblePort70;
}
}
function* _fun111597(a0) { // fn#111597, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14974:1286, offset: 0x023a7b20, size: 225 bytes, params: 2, frame: 20
var binding;
var binding2;
var property;
var value3;
var dispatch;
var object2;
var items2;
var value4;
var HTTP;
var post;
var NOTIF_CENTER_ITEMS_ACK;
var value5;
var value6;
var value7;
var value8;
var error;
if (true) {
value = environment.__proto__.__proto__;
try {
binding = env2_1;
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'NOTIFICATION_CENTER_ITEMS_ACK_FAILURE', ids: [a0]});
return undefined;
}
try {
binding2 = env2_2;
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'NOTIFICATION_CENTER_ITEMS_ACK_FAILURE', ids: [a0]});
return undefined;
}
try {
property = binding2[3];
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'NOTIFICATION_CENTER_ITEMS_ACK_FAILURE', ids: [a0]});
return undefined;
}
try {
value3 = binding(property);
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'NOTIFICATION_CENTER_ITEMS_ACK_FAILURE', ids: [a0]});
return undefined;
}
try {
dispatch = value3.dispatch;
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'NOTIFICATION_CENTER_ITEMS_ACK_FAILURE', ids: [a0]});
return undefined;
}
try {
object2 = {'type': 'NOTIFICATION_CENTER_ITEMS_ACK', 'optimistic': true};
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'NOTIFICATION_CENTER_ITEMS_ACK_FAILURE', ids: [a0]});
return undefined;
}
try {
items2 = [];
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'NOTIFICATION_CENTER_ITEMS_ACK_FAILURE', ids: [a0]});
return undefined;
}
try {
items2[0] = a0;
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'NOTIFICATION_CENTER_ITEMS_ACK_FAILURE', ids: [a0]});
return undefined;
}
try {
object2.ids = items2;
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'NOTIFICATION_CENTER_ITEMS_ACK_FAILURE', ids: [a0]});
return undefined;
}
try {
Reflect.apply(dispatch, value3, [object2]);
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'NOTIFICATION_CENTER_ITEMS_ACK_FAILURE', ids: [a0]});
return undefined;
}
try {
binding = env2_0;
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'NOTIFICATION_CENTER_ITEMS_ACK_FAILURE', ids: [a0]});
return undefined;
}
try {
property = binding2[8];
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'NOTIFICATION_CENTER_ITEMS_ACK_FAILURE', ids: [a0]});
return undefined;
}
try {
value4 = binding(property);
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'NOTIFICATION_CENTER_ITEMS_ACK_FAILURE', ids: [a0]});
return undefined;
}
try {
HTTP = value4.HTTP;
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'NOTIFICATION_CENTER_ITEMS_ACK_FAILURE', ids: [a0]});
return undefined;
}
try {
post = HTTP.post;
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'NOTIFICATION_CENTER_ITEMS_ACK_FAILURE', ids: [a0]});
return undefined;
}
try {
object2 = {};
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'NOTIFICATION_CENTER_ITEMS_ACK_FAILURE', ids: [a0]});
return undefined;
}
try {
binding = env2_5;
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'NOTIFICATION_CENTER_ITEMS_ACK_FAILURE', ids: [a0]});
return undefined;
}
try {
NOTIF_CENTER_ITEMS_ACK = binding.NOTIF_CENTER_ITEMS_ACK;
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'NOTIFICATION_CENTER_ITEMS_ACK_FAILURE', ids: [a0]});
return undefined;
}
try {
value5 = Reflect.apply(NOTIF_CENTER_ITEMS_ACK, binding, [a0]);
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'NOTIFICATION_CENTER_ITEMS_ACK_FAILURE', ids: [a0]});
return undefined;
}
try {
object2.url = value5;
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'NOTIFICATION_CENTER_ITEMS_ACK_FAILURE', ids: [a0]});
return undefined;
}
try {
object2.rejectWithError = true;
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'NOTIFICATION_CENTER_ITEMS_ACK_FAILURE', ids: [a0]});
return undefined;
}
try {
value6 = Reflect.apply(post, HTTP, [object2]);
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'NOTIFICATION_CENTER_ITEMS_ACK_FAILURE', ids: [a0]});
return undefined;
}
yield value6;
try {
value7 = undefined;
value8 = false;
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'NOTIFICATION_CENTER_ITEMS_ACK_FAILURE', ids: [a0]});
return undefined;
}
if (value8) {
return value7;
}
}
}
function* _fun111601(a0) { // fn#111601, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14974:1795, offset: 0x023a7c81, size: 272 bytes, params: 2, frame: 20
var binding;
var binding2;
var property;
var value4;
var dispatch;
var object3;
var filter;
var closure;
var value5;
var value6;
var value7;
var HTTP;
var post;
var NOTIF_CENTER_ITEMS_BULK_ACK;
var object4;
var value8;
var value9;
var value10;
var error;
var value11;
if (false) {
return undefined;
}
value = a0.map(function(a0) {
return a0.id;
});
try {
binding = env2_1;
} catch (error) {
binding = env2_1;
value11 = binding(env2_2[3]);
value11.dispatch({type: 'NOTIFICATION_CENTER_ITEMS_ACK_FAILURE', ids: value});
return undefined;
}
try {
binding2 = env2_2;
} catch (error) {
binding = env2_1;
value11 = binding(env2_2[3]);
value11.dispatch({type: 'NOTIFICATION_CENTER_ITEMS_ACK_FAILURE', ids: value});
return undefined;
}
try {
property = binding2[3];
} catch (error) {
binding = env2_1;
value11 = binding(env2_2[3]);
value11.dispatch({type: 'NOTIFICATION_CENTER_ITEMS_ACK_FAILURE', ids: value});
return undefined;
}
try {
value4 = binding(property);
} catch (error) {
binding = env2_1;
value11 = binding(env2_2[3]);
value11.dispatch({type: 'NOTIFICATION_CENTER_ITEMS_ACK_FAILURE', ids: value});
return undefined;
}
try {
dispatch = value4.dispatch;
} catch (error) {
binding = env2_1;
value11 = binding(env2_2[3]);
value11.dispatch({type: 'NOTIFICATION_CENTER_ITEMS_ACK_FAILURE', ids: value});
return undefined;
}
try {
object3 = {'type': 'NOTIFICATION_CENTER_ITEMS_ACK', 'optimistic': true};
} catch (error) {
binding = env2_1;
value11 = binding(env2_2[3]);
value11.dispatch({type: 'NOTIFICATION_CENTER_ITEMS_ACK_FAILURE', ids: value});
return undefined;
}
try {
object3.ids = value;
} catch (error) {
binding = env2_1;
value11 = binding(env2_2[3]);
value11.dispatch({type: 'NOTIFICATION_CENTER_ITEMS_ACK_FAILURE', ids: value});
return undefined;
}
try {
Reflect.apply(dispatch, value4, [object3]);
} catch (error) {
binding = env2_1;
value11 = binding(env2_2[3]);
value11.dispatch({type: 'NOTIFICATION_CENTER_ITEMS_ACK_FAILURE', ids: value});
return undefined;
}
try {
filter = a0.filter;
} catch (error) {
binding = env2_1;
value11 = binding(env2_2[3]);
value11.dispatch({type: 'NOTIFICATION_CENTER_ITEMS_ACK_FAILURE', ids: value});
return undefined;
}
try {
closure = _fun111603;
} catch (error) {
binding = env2_1;
value11 = binding(env2_2[3]);
value11.dispatch({type: 'NOTIFICATION_CENTER_ITEMS_ACK_FAILURE', ids: value});
return undefined;
}
try {
value5 = Reflect.apply(filter, a0, [closure]);
} catch (error) {
binding = env2_1;
value11 = binding(env2_2[3]);
value11.dispatch({type: 'NOTIFICATION_CENTER_ITEMS_ACK_FAILURE', ids: value});
return undefined;
}
try {
map = value5.map;
} catch (error) {
binding = env2_1;
value11 = binding(env2_2[3]);
value11.dispatch({type: 'NOTIFICATION_CENTER_ITEMS_ACK_FAILURE', ids: value});
return undefined;
}
try {
closure = function(a0) {
return a0.id;
};
} catch (error) {
binding = env2_1;
value11 = binding(env2_2[3]);
value11.dispatch({type: 'NOTIFICATION_CENTER_ITEMS_ACK_FAILURE', ids: value});
return undefined;
}
try {
value6 = Reflect.apply(map, value5, [closure]);
} catch (error) {
binding = env2_1;
value11 = binding(env2_2[3]);
value11.dispatch({type: 'NOTIFICATION_CENTER_ITEMS_ACK_FAILURE', ids: value});
return undefined;
}
try {
binding = env2_0;
} catch (error) {
binding = env2_1;
value11 = binding(env2_2[3]);
value11.dispatch({type: 'NOTIFICATION_CENTER_ITEMS_ACK_FAILURE', ids: value});
return undefined;
}
try {
property = binding2[8];
} catch (error) {
binding = env2_1;
value11 = binding(env2_2[3]);
value11.dispatch({type: 'NOTIFICATION_CENTER_ITEMS_ACK_FAILURE', ids: value});
return undefined;
}
try {
value7 = binding(property);
} catch (error) {
binding = env2_1;
value11 = binding(env2_2[3]);
value11.dispatch({type: 'NOTIFICATION_CENTER_ITEMS_ACK_FAILURE', ids: value});
return undefined;
}
try {
HTTP = value7.HTTP;
} catch (error) {
binding = env2_1;
value11 = binding(env2_2[3]);
value11.dispatch({type: 'NOTIFICATION_CENTER_ITEMS_ACK_FAILURE', ids: value});
return undefined;
}
try {
post = HTTP.post;
} catch (error) {
binding = env2_1;
value11 = binding(env2_2[3]);
value11.dispatch({type: 'NOTIFICATION_CENTER_ITEMS_ACK_FAILURE', ids: value});
return undefined;
}
try {
object3 = {};
} catch (error) {
binding = env2_1;
value11 = binding(env2_2[3]);
value11.dispatch({type: 'NOTIFICATION_CENTER_ITEMS_ACK_FAILURE', ids: value});
return undefined;
}
try {
binding = env2_5;
} catch (error) {
binding = env2_1;
value11 = binding(env2_2[3]);
value11.dispatch({type: 'NOTIFICATION_CENTER_ITEMS_ACK_FAILURE', ids: value});
return undefined;
}
try {
NOTIF_CENTER_ITEMS_BULK_ACK = binding.NOTIF_CENTER_ITEMS_BULK_ACK;
} catch (error) {
binding = env2_1;
value11 = binding(env2_2[3]);
value11.dispatch({type: 'NOTIFICATION_CENTER_ITEMS_ACK_FAILURE', ids: value});
return undefined;
}
try {
object3.url = NOTIF_CENTER_ITEMS_BULK_ACK;
} catch (error) {
binding = env2_1;
value11 = binding(env2_2[3]);
value11.dispatch({type: 'NOTIFICATION_CENTER_ITEMS_ACK_FAILURE', ids: value});
return undefined;
}
try {
object4 = {};
} catch (error) {
binding = env2_1;
value11 = binding(env2_2[3]);
value11.dispatch({type: 'NOTIFICATION_CENTER_ITEMS_ACK_FAILURE', ids: value});
return undefined;
}
try {
object4.item_ids = value6;
} catch (error) {
binding = env2_1;
value11 = binding(env2_2[3]);
value11.dispatch({type: 'NOTIFICATION_CENTER_ITEMS_ACK_FAILURE', ids: value});
return undefined;
}
try {
object3.query = object4;
} catch (error) {
binding = env2_1;
value11 = binding(env2_2[3]);
value11.dispatch({type: 'NOTIFICATION_CENTER_ITEMS_ACK_FAILURE', ids: value});
return undefined;
}
try {
object3.rejectWithError = true;
} catch (error) {
binding = env2_1;
value11 = binding(env2_2[3]);
value11.dispatch({type: 'NOTIFICATION_CENTER_ITEMS_ACK_FAILURE', ids: value});
return undefined;
}
try {
value8 = Reflect.apply(post, HTTP, [object3]);
} catch (error) {
binding = env2_1;
value11 = binding(env2_2[3]);
value11.dispatch({type: 'NOTIFICATION_CENTER_ITEMS_ACK_FAILURE', ids: value});
return undefined;
}
yield value8;
try {
value9 = undefined;
value10 = false;
} catch (error) {
binding = env2_1;
value11 = binding(env2_2[3]);
value11.dispatch({type: 'NOTIFICATION_CENTER_ITEMS_ACK_FAILURE', ids: value});
return undefined;
}
return value10 ? value9 : undefined;
}
function* _fun111607(a0) { // fn#111607, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14974:2280, offset: 0x023a7e06, size: 380 bytes, params: 2, frame: 24
var binding2;
var property;
var value4;
var dispatch;
var object5;
var id;
var value5;
var NOTIF_CENTER_ITEMS;
var value6;
var object6;
var property2;
var value7;
var isMentionItem;
var isMentionItem2;
var object7;
var binding3;
var property3;
var value10;
var NetworkActionNames;
var NOTIFICATION_CENTER_ITEM_DELETE;
var object8;
var property4;
var value11;
var isRemoteAcked;
var isRemoteAcked2;
var type;
var value12;
var value13;
var value14;
var error;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
let binding = env2_0;
const NotificationCenterAckedBeforeId = binding(env2_2[9]).NotificationCenterAckedBeforeId;
const setting = NotificationCenterAckedBeforeId.getSetting();
try {
binding = env2_1;
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'NOTIFICATION_CENTER_ITEM_DELETE_FAILURE', item: a0});
throw error;
}
try {
binding2 = env2_2;
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'NOTIFICATION_CENTER_ITEM_DELETE_FAILURE', item: a0});
throw error;
}
try {
property = binding2[3];
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'NOTIFICATION_CENTER_ITEM_DELETE_FAILURE', item: a0});
throw error;
}
try {
value4 = binding(property);
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'NOTIFICATION_CENTER_ITEM_DELETE_FAILURE', item: a0});
throw error;
}
try {
dispatch = value4.dispatch;
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'NOTIFICATION_CENTER_ITEM_DELETE_FAILURE', item: a0});
throw error;
}
try {
object5 = {};
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'NOTIFICATION_CENTER_ITEM_DELETE_FAILURE', item: a0});
throw error;
}
try {
object5.type = 'NOTIFICATION_CENTER_ITEM_DELETE';
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'NOTIFICATION_CENTER_ITEM_DELETE_FAILURE', item: a0});
throw error;
}
try {
id = a0.id;
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'NOTIFICATION_CENTER_ITEM_DELETE_FAILURE', item: a0});
throw error;
}
try {
object5.id = id;
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'NOTIFICATION_CENTER_ITEM_DELETE_FAILURE', item: a0});
throw error;
}
try {
Reflect.apply(dispatch, value4, [object5]);
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'NOTIFICATION_CENTER_ITEM_DELETE_FAILURE', item: a0});
throw error;
}
try {
property = binding2[4];
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'NOTIFICATION_CENTER_ITEM_DELETE_FAILURE', item: a0});
throw error;
}
try {
value5 = binding(property);
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'NOTIFICATION_CENTER_ITEM_DELETE_FAILURE', item: a0});
throw error;
}
try {
property = value5.delete;
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'NOTIFICATION_CENTER_ITEM_DELETE_FAILURE', item: a0});
throw error;
}
try {
object5 = {};
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'NOTIFICATION_CENTER_ITEM_DELETE_FAILURE', item: a0});
throw error;
}
try {
binding = env2_5;
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'NOTIFICATION_CENTER_ITEM_DELETE_FAILURE', item: a0});
throw error;
}
try {
NOTIF_CENTER_ITEMS = binding.NOTIF_CENTER_ITEMS;
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'NOTIFICATION_CENTER_ITEM_DELETE_FAILURE', item: a0});
throw error;
}
try {
id = a0.id;
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'NOTIFICATION_CENTER_ITEM_DELETE_FAILURE', item: a0});
throw error;
}
try {
value6 = Reflect.apply(NOTIF_CENTER_ITEMS, binding, [id]);
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'NOTIFICATION_CENTER_ITEM_DELETE_FAILURE', item: a0});
throw error;
}
try {
object5.url = value6;
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'NOTIFICATION_CENTER_ITEM_DELETE_FAILURE', item: a0});
throw error;
}
try {
object6 = {};
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'NOTIFICATION_CENTER_ITEM_DELETE_FAILURE', item: a0});
throw error;
}
try {
binding = env2_0;
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'NOTIFICATION_CENTER_ITEM_DELETE_FAILURE', item: a0});
throw error;
}
try {
property2 = binding2[7];
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'NOTIFICATION_CENTER_ITEM_DELETE_FAILURE', item: a0});
throw error;
}
try {
value7 = binding(property2);
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'NOTIFICATION_CENTER_ITEM_DELETE_FAILURE', item: a0});
throw error;
}
try {
isMentionItem = value7.isMentionItem;
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'NOTIFICATION_CENTER_ITEM_DELETE_FAILURE', item: a0});
throw error;
}
try {
isMentionItem2 = Reflect.apply(isMentionItem, value7, [a0]);
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'NOTIFICATION_CENTER_ITEM_DELETE_FAILURE', item: a0});
throw error;
}
try {
object6.item_type = isMentionItem2 ? 'mention' : 'regular';
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'NOTIFICATION_CENTER_ITEM_DELETE_FAILURE', item: a0});
throw error;
}
try {
object5.body = object6;
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'NOTIFICATION_CENTER_ITEM_DELETE_FAILURE', item: a0});
throw error;
}
try {
object7 = {};
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'NOTIFICATION_CENTER_ITEM_DELETE_FAILURE', item: a0});
throw error;
}
try {
binding = env2_0;
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'NOTIFICATION_CENTER_ITEM_DELETE_FAILURE', item: a0});
throw error;
}
try {
binding3 = env2_2;
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'NOTIFICATION_CENTER_ITEM_DELETE_FAILURE', item: a0});
throw error;
}
try {
property3 = binding3[5];
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'NOTIFICATION_CENTER_ITEM_DELETE_FAILURE', item: a0});
throw error;
}
try {
value10 = binding(property3);
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'NOTIFICATION_CENTER_ITEM_DELETE_FAILURE', item: a0});
throw error;
}
try {
NetworkActionNames = value10.NetworkActionNames;
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'NOTIFICATION_CENTER_ITEM_DELETE_FAILURE', item: a0});
throw error;
}
try {
NOTIFICATION_CENTER_ITEM_DELETE = NetworkActionNames.NOTIFICATION_CENTER_ITEM_DELETE;
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'NOTIFICATION_CENTER_ITEM_DELETE_FAILURE', item: a0});
throw error;
}
try {
object7.event = NOTIFICATION_CENTER_ITEM_DELETE;
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'NOTIFICATION_CENTER_ITEM_DELETE_FAILURE', item: a0});
throw error;
}
try {
object8 = {};
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'NOTIFICATION_CENTER_ITEM_DELETE_FAILURE', item: a0});
throw error;
}
try {
id = a0.id;
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'NOTIFICATION_CENTER_ITEM_DELETE_FAILURE', item: a0});
throw error;
}
try {
object8.notification_center_id = id;
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'NOTIFICATION_CENTER_ITEM_DELETE_FAILURE', item: a0});
throw error;
}
try {
property4 = binding3[7];
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'NOTIFICATION_CENTER_ITEM_DELETE_FAILURE', item: a0});
throw error;
}
try {
value11 = binding(property4);
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'NOTIFICATION_CENTER_ITEM_DELETE_FAILURE', item: a0});
throw error;
}
try {
isRemoteAcked = value11.isRemoteAcked;
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'NOTIFICATION_CENTER_ITEM_DELETE_FAILURE', item: a0});
throw error;
}
try {
isRemoteAcked2 = Reflect.apply(isRemoteAcked, value11, [a0, setting]);
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'NOTIFICATION_CENTER_ITEM_DELETE_FAILURE', item: a0});
throw error;
}
try {
object8.acked = isRemoteAcked2;
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'NOTIFICATION_CENTER_ITEM_DELETE_FAILURE', item: a0});
throw error;
}
try {
type = a0.type;
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'NOTIFICATION_CENTER_ITEM_DELETE_FAILURE', item: a0});
throw error;
}
try {
object8.item_type = type;
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'NOTIFICATION_CENTER_ITEM_DELETE_FAILURE', item: a0});
throw error;
}
try {
object7.properties = object8;
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'NOTIFICATION_CENTER_ITEM_DELETE_FAILURE', item: a0});
throw error;
}
try {
object5.trackedActionData = object7;
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'NOTIFICATION_CENTER_ITEM_DELETE_FAILURE', item: a0});
throw error;
}
try {
object5.rejectWithError = false;
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'NOTIFICATION_CENTER_ITEM_DELETE_FAILURE', item: a0});
throw error;
}
try {
value12 = Reflect.apply(property, value5, [object5]);
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'NOTIFICATION_CENTER_ITEM_DELETE_FAILURE', item: a0});
throw error;
}
yield value12;
try {
value13 = undefined;
value14 = false;
} catch (error) {
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'NOTIFICATION_CENTER_ITEM_DELETE_FAILURE', item: a0});
throw error;
}
return value14 ? value13 : undefined;
}
function properties_111591({body}) { // fn#111591, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14974:508, offset: 0x023a7a34, size: 118 bytes, params: 2, frame: 13
const value2 = (body?.items || []).map(function(a0) {
return a0.type;
});
return env3_0(env3_2[6]).exact({page: env0_0, items: value2, item_count: value2.length});
}
function _fun111603(a0) { // fn#111603, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14974:1929, offset: 0x023a7d91, size: 56 bytes, params: 2, frame: 13
var r0;
let value = a0.local_id == null;
if (value) {
r0 = value;
} else {
value = environment.__proto__.__proto__.__proto__;
value = env3_0(env3_2[7]);
value = value.isMentionItem(a0);
r0 = value;
}
return r0;
}