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

+66 -60
View File
@@ -1,9 +1,15 @@
/* Metro module 12081; source: modules/routing/KeybindRouterStore.tsx; dependencies: [661, 3974, 3987, 685, 690, 2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as ReactBatchUpdatesNativeModule from '../../external/discord_common/js/shared/utils/ReactBatchUpdates.native.tsx'; /* Metro dependency 690 */
import * as MatchPathCompatModule from './matchPathCompat.tsx'; /* Metro dependency 3974 */
import * as RouteUtilsModule from './RouteUtils.tsx'; /* Metro dependency 3987 */
function _fun92839(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#92839, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12267:6, offset: 0x0209ad62, size: 161 bytes, params: 8, frame: 18
let env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = require(661) /* metro dependency 661: Constants */;
let value = ConstantsModule;
const env0_2 = value.Routes;
const env0_3 = value.ME;
value = require(685) /* metro dependency 685 */;
@@ -12,71 +18,71 @@ function _fun92839(global, require, importDefault, importAll, module, exports, d
return {'path': null, 'basePath': '/', 'guildId': null, 'channelId': null, updatePath: _fun92842,
resetPath: _fun92844};
});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/routing/KeybindRouterStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/routing/KeybindRouterStore.tsx');
exports.default = value;
}
function getMatchData(a0) { // fn#92840, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12267:124, offset: 0x0209ae03, size: 357 bytes, params: 2, frame: 28
var params;
let value = a0;
const matchPathCompatModule = require(3974) /* metro dependency 3974: matchPathCompat */;
let matchPath = matchPathCompatModule.matchPath;
const value3 = null;
const value4 = '';
const r4 = value3 != value ? value : value4;
const object2 = {};
const CHANNEL = Routes.CHANNEL;
const RouteParam = (require(3987) /* metro dependency 3987: RouteUtils */).RouteParam;
let guildId = RouteParam.guildId;
object2.path = Reflect.apply(CHANNEL, Routes, [Reflect.apply(guildId, RouteParam, []),
RouteParam.channelId({optional: true}), ':messageId?']);
const value7 = Reflect.apply(matchPath, matchPathCompatModule, [r4, object2]);
if (value3 != value7) {
params = value7.params;
guildId = params.guildId;
channelId = params.channelId;
return {guildId: guildId === ME ? value3 : guildId, channelId: value3 != channelId ? channelId : value3};
function getMatchData_92840(a0) { // fn#92840, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12267:124, offset: 0x0209ae03, size: 357 bytes, params: 2, frame: 28
var params;
let value = a0;
let matchPath = MatchPathCompatModule.matchPath;
const value3 = null;
const value4 = '';
const r4 = value3 != value ? value : value4;
const object = {};
const CHANNEL = Routes.CHANNEL;
const RouteParam = (RouteUtilsModule).RouteParam;
let guildId = RouteParam.guildId;
object.path = Reflect.apply(CHANNEL, Routes, [Reflect.apply(guildId, RouteParam, []),
RouteParam.channelId({optional: true}), ':messageId?']);
const value7 = Reflect.apply(matchPath, MatchPathCompatModule, [r4, object]);
if (value3 != value7) {
params = value7.params;
guildId = params.guildId;
channelId = params.channelId;
return {guildId: guildId === ME ? value3 : guildId, channelId: value3 != channelId ? channelId : value3};
}
matchPath = MatchPathCompatModule.matchPath;
const r6 = value3 != value ? value : value4;
const GUILD_BOOSTING_MARKETING = Routes.GUILD_BOOSTING_MARKETING;
value = Reflect.apply(matchPath, MatchPathCompatModule, [r6, {path: Reflect.apply(GUILD_BOOSTING_MARKETING, Routes,
[RouteParam.guildId()])}]);
return value3 != value ? {guildId: value.params.guildId, channelId: value3} : {'guildId': null, 'channelId': null};
}
const moduleValue2 = matchPathCompatModule;
matchPath = moduleValue2.matchPath;
const r6 = value3 != value ? value : value4;
const GUILD_BOOSTING_MARKETING = Routes.GUILD_BOOSTING_MARKETING;
value = Reflect.apply(matchPath, moduleValue2, [r6, {path: Reflect.apply(GUILD_BOOSTING_MARKETING, Routes,
[RouteParam.guildId()])}]);
return value3 != value ? {guildId: value.params.guildId, channelId: value3} : {'guildId': null, 'channelId': null};
}
function _fun92841(a0) { // fn#92841, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12267:624, offset: 0x0209af68, size: 51 bytes, params: 2, frame: 3
const env0_0 = a0;
return {'path': null, 'basePath': '/', 'guildId': null, 'channelId': null, updatePath: updatePath,
resetPath: resetPath};
}
function _fun92841(a0) { // fn#92841, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12267:624, offset: 0x0209af68, size: 51 bytes, params: 2, frame: 3
const env0_0 = a0;
return {'path': null, 'basePath': '/', 'guildId': null, 'channelId': null, updatePath: updatePath,
resetPath: resetPath};
function updatePath(a0) { // fn#92842, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12267:680, offset: 0x0209af9b, size: 81 bytes, params: 2, frame: 13
var environment;
const env0_0 = a0;
const value = environment.__proto__;
const matchData_92840 = getMatchData_92840(a0);
const env0_1 = matchData_92840.guildId;
const env0_2 = matchData_92840.channelId;
(ReactBatchUpdatesNativeModule).batchUpdates(_fun92843);
function _fun92843() { // fn#92843, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12267:764, offset: 0x0209afec, size: 46 bytes, params: 1, frame: 12
return env1_0({path: env0_0, guildId: guildId, channelId: channelId});
}
function updatePath(a0) { // fn#92842, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12267:680, offset: 0x0209af9b, size: 81 bytes, params: 2, frame: 13
var environment;
const env0_0 = a0;
const value = environment.__proto__;
const matchData = getMatchData(a0);
const env0_1 = matchData.guildId;
const env0_2 = matchData.channelId;
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun92843);
}
}
function resetPath(a0) { // fn#92844, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12267:805, offset: 0x0209b01a, size: 81 bytes, params: 2, frame: 13
var environment;
const env0_0 = a0;
const value = environment.__proto__;
const matchData = getMatchData(a0);
const env0_1 = matchData.guildId;
const env0_2 = matchData.channelId;
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun92845);
}
function resetPath(a0) { // fn#92844, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12267:805, offset: 0x0209b01a, size: 81 bytes, params: 2, frame: 13
var environment;
const env0_0 = a0;
const value = environment.__proto__;
const matchData_92840 = getMatchData_92840(a0);
const env0_1 = matchData_92840.guildId;
const env0_2 = matchData_92840.channelId;
(ReactBatchUpdatesNativeModule).batchUpdates(_fun92845);
function _fun92845() { // fn#92845, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12267:888, offset: 0x0209b06b, size: 53 bytes, params: 1, frame: 12
return env1_0({path: null, guildId: guildId, channelId: channelId, basePath: env0_0});
}
function _fun92843() { // fn#92843, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12267:764, offset: 0x0209afec, size: 46 bytes, params: 1, frame: 12
return env1_0({path: env0_0, guildId: guildId, channelId: channelId});
}
}
}
function _fun92845() { // fn#92845, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12267:888, offset: 0x0209b06b, size: 53 bytes, params: 1, frame: 12
return env1_0({path: null, guildId: guildId, channelId: channelId, basePath: env0_0});
}
global.__d(_fun92839, 12081, [661, 3974, 3987, 685, 690,
2]) /* metro module 12081, dependencies: [661, 3974, 3987, 685, 690, 2] */;
+23 -18
View File
@@ -1,10 +1,14 @@
/* Metro module 662; source: modules/routing/RouteConstants.tsx; dependencies: [663, 668, 669, 484, 2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as CollectiblesShopConstantsModule from '../collectibles/CollectiblesShopConstants.tsx'; /* Metro dependency 663 */
import * as ConferenceModeConstantsModule from '../conference_mode/ConferenceModeConstants.tsx'; /* Metro dependency 668 */
import * as GlobalDiscoveryAppsConstantsModule from '../global_discovery_apps/GlobalDiscoveryAppsConstants.tsx'; /* Metro dependency 669 */
function _fun7941(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#7941, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:712:6, offset: 0x00d302c8, size: 1752 bytes, params: 8, frame: 29
let Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = (require(663) /* metro dependency 663: CollectiblesShopConstants */).CollectibleShopTab;
const CONFERENCE_MODE_ENABLED = (require(668) /* metro dependency 668: ConferenceModeConstants */).CONFERENCE_MODE_ENABLED;
let value = require(669) /* metro dependency 669: GlobalDiscoveryAppsConstants */;
const CONFERENCE_MODE_ENABLED = (ConferenceModeConstantsModule).CONFERENCE_MODE_ENABLED;
let value = GlobalDiscoveryAppsConstantsModule;
const env0_1 = value.ApplicationDirectoryProfileSections;
const env0_2 = value.GlobalDiscoveryAppsSections;
Object = global.Object;
@@ -211,7 +215,7 @@ function _fun7941(global, require, importDefault, importAll, module, exports, de
return '/quest-home?tab=preview_tool&quest_id=' + a0;
}, ICYMI: '/icymi'});
value = (require(484) /* metro dependency 484: PathUtils */).wrapPaths(value, [':', '?', '@']);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/routing/RouteConstants.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/routing/RouteConstants.tsx');
exports.ME = '@me';
exports.FAVORITES = '@favorites';
exports.NOTIFICATIONS_INBOX = '@inbox';
@@ -219,6 +223,20 @@ function _fun7941(global, require, importDefault, importAll, module, exports, de
exports.MOBILE_GUILD_UPSELL_LIST = '@guild-upsell-list';
exports.PSEUDO_GUILD_IDS = ['@me', '@favorites', '@guilds-empty-nux', '@inbox', '@guild-upsell-list'];
exports.Routes = value;
function COLLECTIBLES_SHOP_GAME_SHOP(a0, a1, a2, a3) { // fn#7999, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:712:7217, offset: 0x00d315df, size: 160 bytes, params: 5, frame: 19
var r5;
const GAME_SHOPS = CollectibleShopTab.GAME_SHOPS;
let value = '/shop?tab=' + GAME_SHOPS + '&applicationId=' + a0;
if (a1 == null) {
r5 = value;
} else {
value += '&pageIndex=' + a1;
r5 = value;
}
const r2 = a2 == null ? r5 : r5 + ('&skuId=' + a2);
return a3 == null ? r2 : r2 + ('&slug=' + a3);
}
}
function CHANNEL_7950(a0, a1, a2) { // fn#7950, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:712:1708, offset: 0x00d30ae8, size: 129 bytes, params: 4, frame: 18
@@ -263,17 +281,4 @@ function CHANNELS_GAME_SHOP(a0, a1, a2, a3) { // fn#7996, source: /ci/build/disc
return r0;
}
function COLLECTIBLES_SHOP_GAME_SHOP(a0, a1, a2, a3) { // fn#7999, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:712:7217, offset: 0x00d315df, size: 160 bytes, params: 5, frame: 19
var r5;
const GAME_SHOPS = CollectibleShopTab.GAME_SHOPS;
let value = '/shop?tab=' + GAME_SHOPS + '&applicationId=' + a0;
if (a1 == null) {
r5 = value;
} else {
value += '&pageIndex=' + a1;
r5 = value;
}
const r2 = a2 == null ? r5 : r5 + ('&skuId=' + a2);
return a3 == null ? r2 : r2 + ('&slug=' + a3);
}
global.__d(_fun7941, 662, [663, 668, 669, 484, 2]) /* metro module 662, dependencies: [663, 668, 669, 484, 2] */;
+376 -362
View File
@@ -1,4 +1,12 @@
/* Metro module 12080; source: modules/routing/RouteManager.tsx; dependencies: [6, 7, 4257, 12081, 661, 1230, 12082, 7364, 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 GatewayConnectionStore from '../gateway/GatewayConnectionStore.tsx'; /* Metro dependency 4257 */
import KeybindRouterStore from './KeybindRouterStore.tsx'; /* Metro dependency 12081 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as Router_utilsModule from './router_utils.tsx'; /* Metro dependency 1230 */
function _fun92819(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#92819, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12266:6, offset: 0x0209a336, size: 230 bytes, params: 8, frame: 19
const env0_0 = require;
const _arrayLikeToArray_92822 = function(a0, a1) {
@@ -46,386 +54,392 @@ function _fun92819(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(6) /* metro dependency 6 */;
const env0_3 = importDefault(7) /* metro dependency 7 */;
const gatewayConnectionStore = importDefault(4257) /* metro dependency 4257: GatewayConnectionStore */;
const keybindRouterStore = importDefault(12081) /* metro dependency 12081: KeybindRouterStore */;
const env0_6 = (require(661) /* metro dependency 661: Constants */).Routes;
let value = _fun92823();
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/routing/RouteManager.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/routing/RouteManager.tsx');
exports.default = value;
}
function _createForOfIteratorHelperLoose_92820(a0, a1) { // fn#92820, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12266:158, offset: 0x0209a41c, size: 372 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
const Array = global.Array;
if (Array.isArray(a0)) {
function _createForOfIteratorHelperLoose_92820(a0, a1) { // fn#92820, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12266:158, offset: 0x0209a41c, size: 372 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
return _fun92821;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_92822(a0, value);
r5 = value;
} else {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun92821;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_92822(a0, value);
r6 = value;
r5 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
value = _arrayLikeToArray_92822(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun92821;
}
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
}
function _fun92823() { // fn#92823, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12266:1078, offset: 0x0209a590, size: 236 bytes, params: 1, frame: 15
return env0_3(RouteManager, [{key: 'initialize', value: value_92829}, {key: 'executeRouteRewrites',
value: value_92830}, {key: 'cleanup', value: function() {
var property = this.unlistenHistory;
if (property != null) {
property.call(this);
}
this.unlistenHistory = undefined;
property = this.unlistenKeyboardChange;
if (property != null) {
property.call(this);
}
this.unlistenKeyboardChange = undefined;
GatewayConnectionStore.removeChangeListener(this.handleConnectionChange);
}}, {key: 'addRouteChangeListener', value: value_92832}, {key: 'addRouteRewriter', value: value_92834},
{key: 'removeRouteChangeListener', value: function(a0) {
this.listeners.delete(a0);
}}, {key: 'removeRouteRewriter', value: function(a0) {
this.rewrites.delete(a0);
}}, {key: 'getHistory', value: value_92838}]);
}
function RouteManager() { // fn#92824, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12266:1099, offset: 0x0209a67c, size: 179 bytes, params: 1, frame: 15
var environment;
const value = environment.__proto__;
env1_2(this, RouteManager);
let Set = global.Set;
this.rewrites = new Set();
Set = global.Set;
this.listeners = new Set();
this.routeChangeCount = 0;
this.timer = -1;
this.connected = false;
this.handleConnectionChange = handleConnectionChange;
this.handleRouteChange = handleRouteChange;
this.handleKeybindRouteChange = handleKeybindRouteChange;
this.flushRoute = flushRoute;
}
function value_92829() { // fn#92829, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12266:2084, offset: 0x0209a99d, size: 172 bytes, params: 1, frame: 17
this.cleanup();
const router_utilsModule = require(1230) /* metro dependency 1230: router_utils */;
let getHistory = router_utilsModule.getHistory;
const value2 = Reflect.apply(getHistory, router_utilsModule, []);
this.unlistenHistory = value2.listen(this.handleRouteChange);
const moduleValue2 = router_utilsModule;
getHistory = moduleValue2.getHistory;
KeybindRouterStore.getState().resetPath(Reflect.apply(getHistory, moduleValue2, []).location.pathname);
this.unlistenKeyboardChange = KeybindRouterStore.subscribe(this.handleKeybindRouteChange);
GatewayConnectionStore.addChangeListener(this.handleConnectionChange);
}
function value_92830(a0, a1) { // fn#92830, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12266:2412, offset: 0x0209aa49, size: 299 bytes, params: 3, frame: 21
var r5;
var value;
var value2;
var value3;
var done;
var value4;
var moduleValue;
var getHistory;
var location;
var pathname;
var value5;
var value6;
var addBreadcrumb;
var path;
var replaceWith;
this.routeChangeCount = this.routeChangeCount + 1;
if (this.routeChangeCount < 10) {
value = environment.__proto__;
value2 = _createForOfIteratorHelperLoose_92820(this.rewrites);
value3 = value2();
done = value3.done;
if (done) {
return false;
}
r5 = value3;
loopExit3: while (true) {
value4 = r5.value;
moduleValue = require(1230) /* metro dependency 1230: router_utils */;
getHistory = moduleValue.getHistory;
location = Reflect.apply(getHistory, moduleValue, []).location;
pathname = location.pathname;
value5 = value4(a0, a1);
if (value5 != null) {
break loopExit3;
}
value6 = value2();
done = value6.done;
if (done) {
return false;
}
r5 = value6;
continue;
}
value = require(7364) /* metro dependency 7364 */;
addBreadcrumb = value.addBreadcrumb;
path = value5.path;
Reflect.apply(addBreadcrumb, value,
[{message: 'RouteManager.handleRouteChange: A route rewrite is replacing the current route',
data: {replacePath: path, previousPath: pathname}}]);
value = require(1230) /* metro dependency 1230: router_utils */;
replaceWith = value.replaceWith;
path = value5.path;
Reflect.apply(replaceWith, value, [path, value5.state]);
return true;
}
const Error = global.Error;
throw new Error('RouteManager: Something has gone horribly wrong with rewrites');
}
function value_92832(a0) { // fn#92832, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12266:3218, offset: 0x0209abc9, size: 105 bytes, params: 2, frame: 15
var environment;
var value;
const env0_1 = a0;
if (this.unlistenHistory != null) {
value = environment.__proto__;
value = require(1230) /* metro dependency 1230: router_utils */;
a0(value.getHistory().location, 'REPLACE');
}
this.listeners.add(a0);
return _fun92833;
}
function value_92834(a0) { // fn#92834, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12266:3401, offset: 0x0209ac4a, size: 167 bytes, params: 2, frame: 20
var environment;
var value;
var moduleValue;
var getHistory;
var location;
var moduleValue2;
var value2;
const env0_1 = a0;
if (this.unlistenHistory != null) {
value = environment.__proto__;
moduleValue = require(1230) /* metro dependency 1230: router_utils */;
getHistory = moduleValue.getHistory;
location = Reflect.apply(getHistory, moduleValue, []).location;
moduleValue2 = require(1230) /* metro dependency 1230: router_utils */;
getHistory = moduleValue2.getHistory;
value2 = a0(location, Reflect.apply(getHistory, moduleValue2, []).action);
if (value2 != null) {
value = require(1230) /* metro dependency 1230: router_utils */;
value.replaceWith(value2.path, value2.state);
}
}
this.rewrites.add(a0);
return _fun92835;
}
function value_92838() { // fn#92838, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12266:3794, offset: 0x0209ad3d, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (require(1230) /* metro dependency 1230: router_utils */).getHistory();
}
function handleConnectionChange() { // fn#92825, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12266:1273, owner: RouteManager.handleConnectionChange, offset: 0x0209a72f, size: 126 bytes, params: 1, frame: 14
var binding;
var executeRouteRewrites;
let value = environment.__proto__.__proto__;
const isConnected2 = GatewayConnectionStore.isConnected();
const r2 = isConnected2 && !env0_0.connected;
env0_0.connected = isConnected2;
if (r2) {
binding = env0_0;
binding.routeChangeCount = 0;
executeRouteRewrites = binding.executeRouteRewrites;
value = require(1230) /* metro dependency 1230: router_utils */;
Reflect.apply(executeRouteRewrites, binding, [value.getHistory().location, 'REPLACE']);
}
}
function handleRouteChange(a0, a1) { // fn#92826, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12266:1459, owner: RouteManager.handleRouteChange, offset: 0x0209a7ad, size: 298 bytes, params: 3, frame: 19
var r5;
var value;
var binding;
var executeRouteRewrites;
var moduleValue;
var convertRouteToNavigation;
var moduleValue2;
var getState;
var value2;
var basePath;
var pathname;
var resetPath;
var _createForOfIteratorHelperLoose_92820Binding;
var listeners;
var value3;
var value4;
var done;
var value5;
var error;
var value6;
reducibleJoin8: while (true) {
reducibleJoin6: while (true) {
if (a1 === 'POP') {
value = environment.__proto__.__proto__;
value2 = KeybindRouterStore.getState();
basePath = value2.basePath;
pathname = a0.pathname;
if (basePath === pathname) {
break reducibleJoin6;
}
resetPath = value2.resetPath;
pathname = a0.pathname;
Reflect.apply(resetPath, value2, [pathname]);
break reducibleJoin6;
}
value = environment;
binding = env0_0;
executeRouteRewrites = binding.executeRouteRewrites;
if (Reflect.apply(executeRouteRewrites, binding, [a0, a1])) {
return undefined;
}
value = environment.__proto__.__proto__;
moduleValue = require(12082) /* metro dependency 12082: convertRouteToNavigationNative */;
convertRouteToNavigation = moduleValue.convertRouteToNavigation;
if (!Reflect.apply(convertRouteToNavigation, moduleValue, [a0])) {
moduleValue2 = require(1230) /* metro dependency 1230: router_utils */;
moduleValue2.replaceWith(Routes.ME);
return undefined;
}
value = environment.__proto__.__proto__;
getState = KeybindRouterStore.getState;
value2 = Reflect.apply(getState, KeybindRouterStore, []);
basePath = value2.basePath;
pathname = a0.pathname;
if (basePath === pathname) {
break reducibleJoin6;
}
resetPath = value2.resetPath;
pathname = a0.pathname;
Reflect.apply(resetPath, value2, [pathname]);
break reducibleJoin6;
}
_createForOfIteratorHelperLoose_92820Binding = _createForOfIteratorHelperLoose_92820;
value = environment;
listeners = env0_0.listeners;
value3 = _createForOfIteratorHelperLoose_92820Binding(listeners);
value4 = value3();
done = value4.done;
if (done) {
env0_0.routeChangeCount = 0;
return undefined;
}
r5 = value4;
value5 = r5.value;
break reducibleJoin8;
}
exceptionMain8: while (true) {
reducibleLoop8: while (true) {
try {
value5(a0, a1);
} catch (error) {
while (true) {
value6 = value3();
done = value6.done;
if (done) {
continue;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_92822(a0, value);
r6 = value;
} else {
r6 = value;
}
r5 = value6;
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun92821;
}
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
function _fun92821() { // fn#92821, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12266:729, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
return env0_1 >= env0_0.length ? {done: true} : {done: false,
value: env0_0[typeof env0_1 === 'bigint' ? env0_1 : +env0_1]};
}
}
function _fun92823() { // fn#92823, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12266:1078, offset: 0x0209a590, size: 236 bytes, params: 1, frame: 15
return CreateClass(RouteManager, [{key: 'initialize', value: value_92829}, {key: 'executeRouteRewrites',
value: value_92830}, {key: 'cleanup', value: function() {
var property = this.unlistenHistory;
if (property != null) {
property.call(this);
}
this.unlistenHistory = undefined;
property = this.unlistenKeyboardChange;
if (property != null) {
property.call(this);
}
this.unlistenKeyboardChange = undefined;
GatewayConnectionStore.removeChangeListener(this.handleConnectionChange);
}}, {key: 'addRouteChangeListener', value: value_92832}, {key: 'addRouteRewriter', value: value_92834},
{key: 'removeRouteChangeListener', value: function(a0) {
this.listeners.delete(a0);
}}, {key: 'removeRouteRewriter', value: function(a0) {
this.rewrites.delete(a0);
}}, {key: 'getHistory', value: value_92838}]);
function RouteManager() { // fn#92824, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12266:1099, offset: 0x0209a67c, size: 179 bytes, params: 1, frame: 15
var environment;
const value = environment.__proto__;
env1_2(this, RouteManager);
let Set = global.Set;
this.rewrites = new Set();
Set = global.Set;
this.listeners = new Set();
this.routeChangeCount = 0;
this.timer = -1;
this.connected = false;
this.handleConnectionChange = handleConnectionChange;
this.handleRouteChange = handleRouteChange;
this.handleKeybindRouteChange = handleKeybindRouteChange;
this.flushRoute = flushRoute;
function handleConnectionChange() { // fn#92825, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12266:1273, owner: RouteManager.handleConnectionChange, offset: 0x0209a72f, size: 126 bytes, params: 1, frame: 14
var binding;
var executeRouteRewrites;
let value = environment.__proto__.__proto__;
const isConnected2 = GatewayConnectionStore.isConnected();
const r2 = isConnected2 && !env0_0.connected;
env0_0.connected = isConnected2;
if (r2) {
binding = env0_0;
binding.routeChangeCount = 0;
executeRouteRewrites = binding.executeRouteRewrites;
value = require(1230) /* metro dependency 1230: router_utils */;
Reflect.apply(executeRouteRewrites, binding, [value.getHistory().location, 'REPLACE']);
}
}
function handleRouteChange(a0, a1) { // fn#92826, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12266:1459, owner: RouteManager.handleRouteChange, offset: 0x0209a7ad, size: 298 bytes, params: 3, frame: 19
var r5;
var value;
var binding;
var executeRouteRewrites;
var moduleValue;
var convertRouteToNavigation;
var moduleValue2;
var keybindRouterStoreBinding;
var getState;
var value2;
var basePath;
var pathname;
var resetPath;
var _createForOfIteratorHelperLoose_92820Binding;
var listeners;
var value3;
var value4;
var done;
var value5;
var error;
var value6;
reducibleJoin8: while (true) {
reducibleJoin6: while (true) {
if (a1 === 'POP') {
value = environment.__proto__.__proto__;
keybindRouterStoreBinding = KeybindRouterStore;
value2 = keybindRouterStoreBinding.getState();
basePath = value2.basePath;
pathname = a0.pathname;
if (basePath === pathname) {
break reducibleJoin6;
}
resetPath = value2.resetPath;
pathname = a0.pathname;
Reflect.apply(resetPath, value2, [pathname]);
break reducibleJoin6;
}
value = environment;
binding = env0_0;
executeRouteRewrites = binding.executeRouteRewrites;
if (Reflect.apply(executeRouteRewrites, binding, [a0, a1])) {
return undefined;
}
value = environment.__proto__.__proto__;
moduleValue = require(12082) /* metro dependency 12082: convertRouteToNavigationNative */;
convertRouteToNavigation = moduleValue.convertRouteToNavigation;
if (!Reflect.apply(convertRouteToNavigation, moduleValue, [a0])) {
moduleValue2 = require(1230) /* metro dependency 1230: router_utils */;
moduleValue2.replaceWith(Routes.ME);
return undefined;
}
value = environment.__proto__.__proto__;
keybindRouterStoreBinding = KeybindRouterStore;
getState = keybindRouterStoreBinding.getState;
value2 = Reflect.apply(getState, keybindRouterStoreBinding, []);
basePath = value2.basePath;
pathname = a0.pathname;
if (basePath === pathname) {
break reducibleJoin6;
}
resetPath = value2.resetPath;
pathname = a0.pathname;
Reflect.apply(resetPath, value2, [pathname]);
break reducibleJoin6;
}
_createForOfIteratorHelperLoose_92820Binding = _createForOfIteratorHelperLoose_92820;
value = environment;
listeners = env0_0.listeners;
value3 = _createForOfIteratorHelperLoose_92820Binding(listeners);
value4 = value3();
done = value4.done;
if (done) {
env0_0.routeChangeCount = 0;
return undefined;
}
r5 = value4;
value5 = r5.value;
break;
break reducibleJoin8;
}
exceptionMain8: while (true) {
reducibleLoop8: while (true) {
try {
value5(a0, a1);
} catch (error) {
while (true) {
value6 = value3();
done = value6.done;
if (done) {
continue;
}
r5 = value6;
value5 = r5.value;
break;
env0_0.routeChangeCount = 0;
return undefined;
continue exceptionMain8;
}
}
value6 = value3();
done = value6.done;
if (done) {
break reducibleLoop8;
}
r5 = value6;
value5 = r5.value;
continue reducibleLoop8;
}
env0_0.routeChangeCount = 0;
return undefined;
continue exceptionMain8;
}
}
value6 = value3();
done = value6.done;
if (done) {
break reducibleLoop8;
function handleKeybindRouteChange({path}) { // fn#92827, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12266:1837, owner: RouteManager.handleKeybindRouteChange, offset: 0x0209a8d7, size: 102 bytes, params: 2, frame: 14
var binding;
if (env0_0.timer !== -1) {
global.clearTimeout(env0_0.timer);
}
if (path != null) {
binding = env0_0;
binding.timer = global.setTimeout(binding.flushRoute, 200);
}
}
r5 = value6;
value5 = r5.value;
continue reducibleLoop8;
function flushRoute() { // fn#92828, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12266:1963, owner: RouteManager.flushRoute, offset: 0x0209a93d, size: 96 bytes, params: 1, frame: 13
const clearTimeout = global.clearTimeout;
clearTimeout(env0_0.timer);
let value = environment.__proto__.__proto__;
const state = KeybindRouterStore.getState();
if (state.path != null) {
value = require(1230) /* metro dependency 1230: router_utils */;
value.transitionTo(state.path);
}
}
}
env0_0.routeChangeCount = 0;
return undefined;
function value_92829() { // fn#92829, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12266:2084, offset: 0x0209a99d, size: 172 bytes, params: 1, frame: 17
this.cleanup();
let getHistory = Router_utilsModule.getHistory;
const value2 = Reflect.apply(getHistory, Router_utilsModule, []);
this.unlistenHistory = value2.listen(this.handleRouteChange);
getHistory = Router_utilsModule.getHistory;
const pathname = Reflect.apply(getHistory, Router_utilsModule, []).location.pathname;
const keybindRouterStoreBinding = KeybindRouterStore;
keybindRouterStoreBinding.getState().resetPath(pathname);
this.unlistenKeyboardChange = keybindRouterStoreBinding.subscribe(this.handleKeybindRouteChange);
const gatewayConnectionStoreBinding = GatewayConnectionStore;
gatewayConnectionStoreBinding.addChangeListener(this.handleConnectionChange);
}
function value_92830(a0, a1) { // fn#92830, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12266:2412, offset: 0x0209aa49, size: 299 bytes, params: 3, frame: 21
var r5;
var value;
var value2;
var value3;
var done;
var value4;
var moduleValue;
var getHistory;
var location;
var pathname;
var value5;
var value6;
var addBreadcrumb;
var path;
var replaceWith;
this.routeChangeCount = this.routeChangeCount + 1;
if (this.routeChangeCount < 10) {
value = environment.__proto__;
value2 = _createForOfIteratorHelperLoose_92820(this.rewrites);
value3 = value2();
done = value3.done;
if (done) {
return false;
}
r5 = value3;
loopExit3: while (true) {
value4 = r5.value;
moduleValue = require(1230) /* metro dependency 1230: router_utils */;
getHistory = moduleValue.getHistory;
location = Reflect.apply(getHistory, moduleValue, []).location;
pathname = location.pathname;
value5 = value4(a0, a1);
if (value5 != null) {
break loopExit3;
}
value6 = value2();
done = value6.done;
if (done) {
return false;
}
r5 = value6;
continue;
}
value = require(7364) /* metro dependency 7364 */;
addBreadcrumb = value.addBreadcrumb;
path = value5.path;
Reflect.apply(addBreadcrumb, value,
[{message: 'RouteManager.handleRouteChange: A route rewrite is replacing the current route',
data: {replacePath: path, previousPath: pathname}}]);
value = require(1230) /* metro dependency 1230: router_utils */;
replaceWith = value.replaceWith;
path = value5.path;
Reflect.apply(replaceWith, value, [path, value5.state]);
return true;
}
const Error = global.Error;
throw new Error('RouteManager: Something has gone horribly wrong with rewrites');
}
function value_92832(a0) { // fn#92832, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12266:3218, offset: 0x0209abc9, size: 105 bytes, params: 2, frame: 15
var environment;
var value;
const env0_1 = a0;
if (this.unlistenHistory != null) {
value = environment.__proto__;
value = require(1230) /* metro dependency 1230: router_utils */;
a0(value.getHistory().location, 'REPLACE');
}
this.listeners.add(a0);
return _fun92833;
function _fun92833() { // fn#92833, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12266:3331, offset: 0x0209ac32, size: 24 bytes, params: 1, frame: 11
return env0_0.removeRouteChangeListener(env0_1);
}
}
function value_92834(a0) { // fn#92834, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12266:3401, offset: 0x0209ac4a, size: 167 bytes, params: 2, frame: 20
var environment;
var value;
var moduleValue;
var getHistory;
var location;
var moduleValue2;
var value2;
const env0_1 = a0;
if (this.unlistenHistory != null) {
value = environment.__proto__;
moduleValue = require(1230) /* metro dependency 1230: router_utils */;
getHistory = moduleValue.getHistory;
location = Reflect.apply(getHistory, moduleValue, []).location;
moduleValue2 = require(1230) /* metro dependency 1230: router_utils */;
getHistory = moduleValue2.getHistory;
value2 = a0(location, Reflect.apply(getHistory, moduleValue2, []).action);
if (value2 != null) {
value = require(1230) /* metro dependency 1230: router_utils */;
value.replaceWith(value2.path, value2.state);
}
}
this.rewrites.add(a0);
return _fun92835;
function _fun92835() { // fn#92835, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12266:3587, offset: 0x0209acf1, size: 24 bytes, params: 1, frame: 11
return env0_0.removeRouteRewriter(env0_1);
}
}
function value_92838() { // fn#92838, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12266:3794, offset: 0x0209ad3d, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (Router_utilsModule).getHistory();
}
}
}
function handleKeybindRouteChange({path}) { // fn#92827, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12266:1837, owner: RouteManager.handleKeybindRouteChange, offset: 0x0209a8d7, size: 102 bytes, params: 2, frame: 14
var binding;
if (env0_0.timer !== -1) {
global.clearTimeout(env0_0.timer);
}
if (path != null) {
binding = env0_0;
binding.timer = global.setTimeout(binding.flushRoute, 200);
}
}
function flushRoute() { // fn#92828, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12266:1963, owner: RouteManager.flushRoute, offset: 0x0209a93d, size: 96 bytes, params: 1, frame: 13
const clearTimeout = global.clearTimeout;
clearTimeout(env0_0.timer);
let value = environment.__proto__.__proto__;
const state = KeybindRouterStore.getState();
if (state.path != null) {
value = require(1230) /* metro dependency 1230: router_utils */;
value.transitionTo(state.path);
}
}
function _fun92833() { // fn#92833, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12266:3331, offset: 0x0209ac32, size: 24 bytes, params: 1, frame: 11
return env0_0.removeRouteChangeListener(env0_1);
}
function _fun92835() { // fn#92835, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12266:3587, offset: 0x0209acf1, size: 24 bytes, params: 1, frame: 11
return env0_0.removeRouteRewriter(env0_1);
}
global.__d(_fun92819, 12080, [6, 7, 4257, 12081, 661, 1230, 12082, 7364,
2]) /* metro module 12080, dependencies: [6, 7, 4257, 12081, 661, 1230, 12082, 7364, 2] */;
+50 -46
View File
@@ -1,56 +1,60 @@
/* Metro module 3988; source: modules/routing/RouteParam.tsx; dependencies: [662, 1386, 484, 3989, 2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as PathUtilsModule from '../../external/discord_common/js/shared/utils/PathUtils.tsx'; /* Metro dependency 484 */
import * as RouteConstantsModule from './RouteConstants.tsx'; /* Metro dependency 662 */
import * as ChannelConstantsModule from '../channel/ChannelConstants.tsx'; /* Metro dependency 1386 */
function _fun32785(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#32785, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4146:6, offset: 0x0101e2d9, size: 168 bytes, params: 8, frame: 18
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(662) /* metro dependency 662: RouteConstants */).PSEUDO_GUILD_IDS;
const env0_4 = (require(1386) /* metro dependency 1386: ChannelConstants */).StaticChannelRoutes;
object2 = {guildId: guildId, channelId: channelId};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/routing/RouteParam.tsx');
exports.RouteParam = object2;
}
object = {guildId: guildId, channelId: channelId};
(FileImportTrackerModule).fileFinishedImporting('modules/routing/RouteParam.tsx');
exports.RouteParam = object;
function paramPattern(a0, a1) { // fn#32786, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4146:153, offset: 0x0101e381, size: 151 bytes, params: 3, frame: 20
let value = a2;
let optional = (value !== undefined ? value : {}).optional;
optional = !(optional === undefined) && optional;
const UnescapedPathParam = (PathUtilsModule).UnescapedPathParam;
value = importDefault(3989) /* metro dependency 3989 */;
value = value(a0);
value = ':' + value + '(' + a1 + ')' + (optional ? '?' : '');
const value4 = Object.create(UnescapedPathParam.prototype, {constructor: {value: UnescapedPathParam}});
const unescapedPathParam = new UnescapedPathParam(value);
return unescapedPathParam instanceof Object ? unescapedPathParam : value4;
}
function paramPattern(a0, a1) { // fn#32786, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4146:153, offset: 0x0101e381, size: 151 bytes, params: 3, frame: 20
let value = a2;
let optional = (value !== undefined ? value : {}).optional;
optional = !(optional === undefined) && optional;
const UnescapedPathParam = (require(484) /* metro dependency 484: PathUtils */).UnescapedPathParam;
value = importDefault(3989) /* metro dependency 3989 */;
value = value(a0);
value = ':' + value + '(' + a1 + ')' + (optional ? '?' : '');
const value4 = Object.create(UnescapedPathParam.prototype, {constructor: {value: UnescapedPathParam}});
const unescapedPathParam = new UnescapedPathParam(value);
return unescapedPathParam instanceof Object ? unescapedPathParam : value4;
}
function guildId() { // fn#32787, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4146:288, offset: 0x0101e418, size: 136 bytes, params: 1, frame: 19
let value = a0;
const r0 = value !== undefined ? value : {};
let name = r0.name;
name = name === undefined ? 'guildId' : name;
let optional = r0.optional;
optional = !(optional === undefined) && optional;
const paramPatternBinding = paramPattern;
value = PSEUDO_GUILD_IDS.map(importDefault(3989) /* metro dependency 3989 */);
value = value.join('|');
value = '' + value + '|\\d+';
return paramPatternBinding(name, value, {optional: optional});
}
function guildId() { // fn#32787, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4146:288, offset: 0x0101e418, size: 136 bytes, params: 1, frame: 19
let value = a0;
const r0 = value !== undefined ? value : {};
let name = r0.name;
name = name === undefined ? 'guildId' : name;
let optional = r0.optional;
optional = !(optional === undefined) && optional;
const paramPatternBinding = paramPattern;
value = PSEUDO_GUILD_IDS.map(importDefault(3989) /* metro dependency 3989 */);
value = value.join('|');
value = '' + value + '|\\d+';
return paramPatternBinding(name, value, {optional: optional});
}
function channelId() { // fn#32788, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4146:401, offset: 0x0101e4a0, size: 149 bytes, params: 1, frame: 19
let value = a0;
const r0 = value !== undefined ? value : {};
let name = r0.name;
name = name === undefined ? 'channelId' : name;
let optional = r0.optional;
optional = !(optional === undefined) && optional;
const paramPatternBinding = paramPattern;
const items2 = [];
arraySpread(items2, StaticChannelRoutes, 0, undefined);
value = items2.map(importDefault(3989) /* metro dependency 3989 */);
value = value.join('|');
value = '' + value + '|\\d+';
return paramPatternBinding(name, value, {optional: optional});
}
function channelId() { // fn#32788, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4146:401, offset: 0x0101e4a0, size: 149 bytes, params: 1, frame: 19
let value = a0;
const r0 = value !== undefined ? value : {};
let name = r0.name;
name = name === undefined ? 'channelId' : name;
let optional = r0.optional;
optional = !(optional === undefined) && optional;
const paramPatternBinding = paramPattern;
const items = [];
arraySpread(items, StaticChannelRoutes, 0, undefined);
value = items.map(importDefault(3989) /* metro dependency 3989 */);
value = value.join('|');
value = '' + value + '|\\d+';
return paramPatternBinding(name, value, {optional: optional});
}
global.__d(_fun32785, 3988, [662, 1386, 484, 3989,
2]) /* metro module 3988, dependencies: [662, 1386, 484, 3989, 2] */;
+31 -27
View File
@@ -1,44 +1,48 @@
/* Metro module 3987; source: modules/routing/RouteUtils.tsx; dependencies: [662, 1386, 2, 3988] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as RouteConstantsModule from './RouteConstants.tsx'; /* Metro dependency 662 */
import * as ChannelConstantsModule from '../channel/ChannelConstants.tsx'; /* Metro dependency 1386 */
import * as RouteParamModule from './RouteParam.tsx'; /* Metro dependency 3988 */
function _fun32781(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#32781, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4145:6, offset: 0x0101e19c, size: 197 bytes, params: 8, frame: 19
const closure = function(a0) {
return PSEUDO_GUILD_IDS.includes(a0);
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = (require(662) /* metro dependency 662: RouteConstants */).PSEUDO_GUILD_IDS;
const env0_1 = (require(1386) /* metro dependency 1386: ChannelConstants */).isStaticChannelRoute;
const env0_2 = RegExp('^\\d+$', '');
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/routing/RouteUtils.tsx');
const RouteParam = (require(3988) /* metro dependency 3988: RouteParam */).RouteParam;
(FileImportTrackerModule).fileFinishedImporting('modules/routing/RouteUtils.tsx');
const RouteParam = (RouteParamModule).RouteParam;
exports.RouteParam = RouteParam;
exports.isPseudoGuildId = closure;
exports.isValidGuildId = isValidGuildId;
exports.isValidChannelId = isValidChannelId;
}
function isValidGuildId(a0) { // fn#32783, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4145:360, offset: 0x0101e261, size: 60 bytes, params: 2, frame: 13
var r0;
var isPseudoGuildId2;
const value = a0 != null;
if (value) {
isPseudoGuildId2 = isPseudoGuildId(a0);
r0 = isPseudoGuildId2 ? !!isPseudoGuildId2 : !!env0_2.test(a0);
} else {
r0 = value;
function isValidGuildId(a0) { // fn#32783, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4145:360, offset: 0x0101e261, size: 60 bytes, params: 2, frame: 13
var r0;
var isPseudoGuildId2;
const value = a0 != null;
if (value) {
isPseudoGuildId2 = isPseudoGuildId(a0);
r0 = isPseudoGuildId2 ? !!isPseudoGuildId2 : !!env0_2.test(a0);
} else {
r0 = value;
}
return r0;
}
return r0;
}
function isValidChannelId(a0) { // fn#32784, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4145:459, offset: 0x0101e29d, size: 60 bytes, params: 2, frame: 13
var r0;
var value2;
const value = a0 == null;
if (value) {
r0 = value;
} else {
value2 = env0_2.test(a0);
r0 = value2 ? !!value2 : !!isStaticChannelRoute(a0);
function isValidChannelId(a0) { // fn#32784, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4145:459, offset: 0x0101e29d, size: 60 bytes, params: 2, frame: 13
var r0;
var value2;
const value = a0 == null;
if (value) {
r0 = value;
} else {
value2 = env0_2.test(a0);
r0 = value2 ? !!value2 : !!isStaticChannelRoute(a0);
}
return r0;
}
return r0;
}
global.__d(_fun32781, 3987, [662, 1386, 2, 3988]) /* metro module 3987, dependencies: [662, 1386, 2, 3988] */;
+6 -2
View File
@@ -1,15 +1,19 @@
/* Metro module 1242; source: modules/routing/RoutingSources.tsx; dependencies: [1243, 2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ThreadConstantsModule from '../threads/ThreadConstants.tsx'; /* Metro dependency 1243 */
function _fun13933(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#13933, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1369:6, offset: 0x00df84c7, size: 209 bytes, params: 8, frame: 19
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const OpenThreadAnalyticsLocations = (require(1243) /* metro dependency 1243: ThreadConstants */).OpenThreadAnalyticsLocations;
const OpenThreadAnalyticsLocations = (ThreadConstantsModule).OpenThreadAnalyticsLocations;
const Set = global.Set;
const EMBED = OpenThreadAnalyticsLocations.EMBED;
const FORUM = OpenThreadAnalyticsLocations.FORUM;
const set = new Set([EMBED, FORUM]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/routing/RoutingSources.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/routing/RoutingSources.tsx');
exports.default = {INVITE_ACCEPT: 'invite_accept', CHANNEL_LIST_SUGGESTED_SECTION: 'channel_list_suggested_section',
USER_NAVIGATED_BACK: 'user_navigated_back', USER_NAVIGATED_FORWARD: 'user_navigated_forward'};
exports.ChannelBackNavigationSources = set;
}
global.__d(_fun13933, 1242, [1243, 2]) /* metro module 1242, dependencies: [1243, 2] */;
@@ -1,133 +1,176 @@
/* Metro module 12082; source: modules/routing/convertRouteToNavigation.native.tsx; dependencies: [661, 4010, 4007, 4008, 3974, 3987, 2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as RouteUtilsModule from './RouteUtils.tsx'; /* Metro dependency 3987 */
function _fun92846(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#92846, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12268:6, offset: 0x0209b0a0, size: 117 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = (require(661) /* metro dependency 661: Constants */).Routes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/routing/convertRouteToNavigation.native.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/routing/convertRouteToNavigation.native.tsx');
exports.convertRouteToNavigation = convertRouteToNavigation;
}
function convertRouteToNavigation(a0) { // fn#92847, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12268:225, offset: 0x0209b115, size: 1386 bytes, params: 2, frame: 32
var r5;
var startsWith;
var moduleValue2;
var matchPath;
var object2;
const RouteParam = (require(3987) /* metro dependency 3987: RouteUtils */).RouteParam;
var guildId;
var moduleValue3;
var value11;
var moduleValue4;
var GUILD_MEMBER_VERIFICATION;
var value13;
var navigateToMemberVerification;
var params;
var channelId2;
var messageId;
var navigationReplace;
var openChannel;
var moduleValue5;
var moduleValue6;
var moduleValue7;
var coerceGuildsRoute;
var rootNavigationRef;
var value18;
const pathname = a0.pathname;
var value;
const value2 = undefined;
const rootNavigationRef2 = (require(4008) /* metro dependency 4008: RootNavigationRefNative */).getRootNavigationRef();
if (rootNavigationRef2 != null) {
if (rootNavigationRef2.isReady()) {
startsWith = pathname.startsWith;
if (Reflect.apply(startsWith, pathname, ['/channels/'])) {
moduleValue2 = require(3974) /* metro dependency 3974: matchPathCompat */;
matchPath = moduleValue2.matchPath;
object2 = {};
object2.path = '' + Routes.CHANNEL(RouteParam.guildId(),
RouteParam.channelId({optional: true})) + Routes.VOICE_CHAT_CHANNEL_PARTIAL(RouteParam.guildId({name: 'voiceGuildId'}),
RouteParam.channelId({name: 'voiceChannelId'}), ':voiceMessageId?');
if (Reflect.apply(matchPath, moduleValue2, [pathname, object2]) != null) {
return true;
}
moduleValue3 = require(3974) /* metro dependency 3974: matchPathCompat */;
matchPath = moduleValue3.matchPath;
object2 = {};
object2.path = Routes.CHANNEL(RouteParam.guildId(), RouteParam.channelId({optional: true}),
':messageId?');
value11 = Reflect.apply(matchPath, moduleValue3, [pathname, object2]);
if (value11 != null) {
params = value11.params;
channelId2 = params.channelId;
guildId = params.guildId;
messageId = params.messageId;
navigationReplace = a0.navigationReplace;
openChannel = a0.openChannel;
moduleValue5 = require(4010) /* metro dependency 4010: useChatLayout */;
if (moduleValue5.getChatLayout().isChatLockedOpen) {
if (channelId2 == null) {
value = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
value.navigateToRootTab({screen: 'guilds', guildId: guildId, channelId: channelId2,
resetRoot: navigationReplace});
} else if (navigationReplace !== false) {
value = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
value.navigateToRootTab({screen: 'guilds', guildId: guildId, channelId: channelId2,
resetRoot: navigationReplace});
} else {
moduleValue7 = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
coerceGuildsRoute = moduleValue7.coerceGuildsRoute;
rootNavigationRef = (require(4008) /* metro dependency 4008: RootNavigationRefNative */).getRootNavigationRef();
value18 = Reflect.apply(coerceGuildsRoute, moduleValue7,
[rootNavigationRef == null ? value2 : rootNavigationRef.getCurrentRoute()]);
if ((value18 == null || value18.params == null ? value2 : value18.params.channelId) === channelId2) {
function convertRouteToNavigation(a0) { // fn#92847, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12268:225, offset: 0x0209b115, size: 1386 bytes, params: 2, frame: 32
var r5;
var startsWith;
var moduleValue2;
var matchPath;
var object;
const RouteParam = (RouteUtilsModule).RouteParam;
var guildId;
var moduleValue3;
var value11;
var moduleValue4;
var GUILD_MEMBER_VERIFICATION;
var value13;
var navigateToMemberVerification;
var params;
var channelId2;
var messageId;
var navigationReplace;
var openChannel;
var moduleValue5;
var moduleValue6;
var moduleValue7;
var coerceGuildsRoute;
var rootNavigationRef;
var value18;
const pathname = a0.pathname;
var value;
const value2 = undefined;
const rootNavigationRef2 = (require(4008) /* metro dependency 4008: RootNavigationRefNative */).getRootNavigationRef();
if (rootNavigationRef2 != null) {
if (rootNavigationRef2.isReady()) {
startsWith = pathname.startsWith;
if (Reflect.apply(startsWith, pathname, ['/channels/'])) {
moduleValue2 = require(3974) /* metro dependency 3974: matchPathCompat */;
matchPath = moduleValue2.matchPath;
object = {};
object.path = '' + Routes.CHANNEL(RouteParam.guildId(),
RouteParam.channelId({optional: true})) + Routes.VOICE_CHAT_CHANNEL_PARTIAL(RouteParam.guildId({name: 'voiceGuildId'}),
RouteParam.channelId({name: 'voiceChannelId'}), ':voiceMessageId?');
if (Reflect.apply(matchPath, moduleValue2, [pathname, object]) != null) {
return true;
}
moduleValue3 = require(3974) /* metro dependency 3974: matchPathCompat */;
matchPath = moduleValue3.matchPath;
object = {};
object.path = Routes.CHANNEL(RouteParam.guildId(), RouteParam.channelId({optional: true}),
':messageId?');
value11 = Reflect.apply(matchPath, moduleValue3, [pathname, object]);
if (value11 != null) {
params = value11.params;
channelId2 = params.channelId;
guildId = params.guildId;
messageId = params.messageId;
navigationReplace = a0.navigationReplace;
openChannel = a0.openChannel;
moduleValue5 = require(4010) /* metro dependency 4010: useChatLayout */;
if (moduleValue5.getChatLayout().isChatLockedOpen) {
if (channelId2 == null) {
value = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
value.navigateToRootTab({screen: 'guilds', guildId: guildId, channelId: channelId2,
resetRoot: navigationReplace});
} else if (navigationReplace !== false) {
value = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
value.navigateToRootTab({screen: 'guilds', guildId: guildId, channelId: channelId2,
resetRoot: navigationReplace});
} else {
moduleValue7 = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
coerceGuildsRoute = moduleValue7.coerceGuildsRoute;
rootNavigationRef = (require(4008) /* metro dependency 4008: RootNavigationRefNative */).getRootNavigationRef();
value18 = Reflect.apply(coerceGuildsRoute, moduleValue7,
[rootNavigationRef == null ? value2 : rootNavigationRef.getCurrentRoute()]);
if ((value18 == null || value18.params == null ? value2 : value18.params.channelId) === channelId2) {
value = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
value.navigateToRootTab({screen: 'guilds', guildId: guildId, channelId: channelId2,
resetRoot: navigationReplace});
} else {
value = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
value.navigateToChannel({channelId: channelId2, guildId: guildId, messageId: messageId,
replaceChannelAndFixRoot: navigationReplace});
}
}
} else if (channelId2 != null) {
if (navigationReplace !== true) {
if (navigationReplace !== false) {
moduleValue6 = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
moduleValue6.navigateToRootTab({screen: 'guilds', guildId: guildId,
channelId: channelId2,
resetRoot: navigationReplace});
}
if (channelId2 != null && navigationReplace !== true) {
value = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
value.navigateToChannel({channelId: channelId2, guildId: guildId, messageId: messageId,
replaceChannelAndFixRoot: value2});
}
} else if (openChannel) {
value = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
value.navigateToChannel({channelId: channelId2, guildId: guildId, messageId: messageId,
replaceChannelAndFixRoot: navigationReplace});
replaceChannelAndFixRoot: navigationReplace, openChannel: true});
} else {
if (navigationReplace !== false) {
moduleValue6 = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
moduleValue6.navigateToRootTab({screen: 'guilds', guildId: guildId,
channelId: channelId2,
resetRoot: navigationReplace});
}
if (channelId2 != null && navigationReplace !== true) {
value = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
value.navigateToChannel({channelId: channelId2, guildId: guildId, messageId: messageId,
replaceChannelAndFixRoot: value2});
}
}
}
} else if (channelId2 != null) {
if (navigationReplace !== true) {
if (navigationReplace !== false) {
moduleValue6 = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
moduleValue6.navigateToRootTab({screen: 'guilds', guildId: guildId,
channelId: channelId2,
resetRoot: navigationReplace});
}
if (channelId2 != null && navigationReplace !== true) {
value = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
value.navigateToChannel({channelId: channelId2, guildId: guildId, messageId: messageId,
replaceChannelAndFixRoot: value2});
}
} else if (openChannel) {
value = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
value.navigateToChannel({channelId: channelId2, guildId: guildId, messageId: messageId,
replaceChannelAndFixRoot: navigationReplace, openChannel: true});
} else {
if (navigationReplace !== false) {
moduleValue6 = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
moduleValue6.navigateToRootTab({screen: 'guilds', guildId: guildId,
channelId: channelId2,
resetRoot: navigationReplace});
}
if (channelId2 != null && navigationReplace !== true) {
value = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
value.navigateToChannel({channelId: channelId2, guildId: guildId, messageId: messageId,
replaceChannelAndFixRoot: value2});
}
value = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
value.navigateToRootTab({screen: 'guilds', guildId: guildId, channelId: channelId2,
resetRoot: navigationReplace});
}
} else {
value = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
value.navigateToRootTab({screen: 'guilds', guildId: guildId, channelId: channelId2,
resetRoot: navigationReplace});
return true;
}
return true;
startsWith = pathname.startsWith;
if (Reflect.apply(startsWith, pathname, ['/member-verification/'])) {
moduleValue4 = require(3974) /* metro dependency 3974: matchPathCompat */;
matchPath = moduleValue4.matchPath;
GUILD_MEMBER_VERIFICATION = Routes.GUILD_MEMBER_VERIFICATION;
guildId = RouteParam.guildId;
value13 = Reflect.apply(matchPath, moduleValue4, [pathname,
{path: Reflect.apply(GUILD_MEMBER_VERIFICATION,
Routes,
[Reflect.apply(guildId, RouteParam, [])])}]);
if (value13 != null) {
value = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
navigateToMemberVerification = value.navigateToMemberVerification;
params = value13.params;
guildId = params.guildId;
params = value13.params;
Reflect.apply(navigateToMemberVerification, value, [guildId, params.inviteCode]);
}
return true;
}
startsWith = pathname.startsWith;
if (Reflect.apply(startsWith, pathname, [Routes.LOGIN])) {
value = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
value.resetToAuthRoute();
value = true;
r5 = value;
} else if (pathname.startsWith(Routes.REGISTER)) {
value = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
value.resetToAuthRoute();
value = true;
r5 = value;
} else {
value = pathname.startsWith(Routes.ACCOUNT_STANDING);
if (value) {
rootNavigationRef2.navigate({name: 'account-standing', params: value2});
r5 = true;
} else {
r5 = !!value;
}
}
return r5;
}
startsWith = pathname.startsWith;
if (Reflect.apply(startsWith, pathname, ['/member-verification/'])) {
@@ -171,49 +214,11 @@ function convertRouteToNavigation(a0) { // fn#92847, source: /ci/build/discord/d
}
return r5;
}
startsWith = pathname.startsWith;
if (Reflect.apply(startsWith, pathname, ['/member-verification/'])) {
moduleValue4 = require(3974) /* metro dependency 3974: matchPathCompat */;
matchPath = moduleValue4.matchPath;
GUILD_MEMBER_VERIFICATION = Routes.GUILD_MEMBER_VERIFICATION;
guildId = RouteParam.guildId;
value13 = Reflect.apply(matchPath, moduleValue4, [pathname,
{path: Reflect.apply(GUILD_MEMBER_VERIFICATION,
Routes,
[Reflect.apply(guildId, RouteParam, [])])}]);
if (value13 != null) {
value = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
navigateToMemberVerification = value.navigateToMemberVerification;
params = value13.params;
guildId = params.guildId;
params = value13.params;
Reflect.apply(navigateToMemberVerification, value, [guildId, params.inviteCode]);
}
return true;
}
startsWith = pathname.startsWith;
if (Reflect.apply(startsWith, pathname, [Routes.LOGIN])) {
value = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
value.resetToAuthRoute();
value = true;
r5 = value;
} else if (pathname.startsWith(Routes.REGISTER)) {
value = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
value.resetToAuthRoute();
value = true;
r5 = value;
} else {
value = pathname.startsWith(Routes.ACCOUNT_STANDING);
if (value) {
rootNavigationRef2.navigate({name: 'account-standing', params: value2});
r5 = true;
} else {
r5 = !!value;
}
}
return r5;
}
return true;
}
return true;
}
global.__d(_fun92846, 12082, [661, 4010, 4007, 4008, 3974, 3987,
2]) /* metro module 12082, dependencies: [661, 4010, 4007, 4008, 3974, 3987, 2] */;
@@ -1,96 +1,103 @@
/* Metro module 6828; source: modules/routing/getChannelIdForGuildTransition.tsx; dependencies: [6599, 1379, 1935, 1934, 5219, 661, 1386, 5103, 6829, 2] */
import ChannelStore from '../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import SelectedChannelStore from '../../stores/SelectedChannelStore.tsx'; /* Metro dependency 1934 */
import GuildChannelStore from '../../stores/GuildChannelStore.tsx'; /* Metro dependency 1935 */
import PrivateChannelSortStore from '../../stores/views/PrivateChannelSortStore.tsx'; /* Metro dependency 5219 */
import GuildOnboardingStore from '../guild_onboarding/GuildOnboardingStore.tsx'; /* Metro dependency 6599 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as ChannelConstantsModule from '../channel/ChannelConstants.tsx'; /* Metro dependency 1386 */
function _fun53666(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#53666, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7006:6, offset: 0x01352bb6, size: 220 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const guildOnboardingStore = importDefault(6599) /* metro dependency 6599: GuildOnboardingStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildChannelStore = importDefault(1935) /* metro dependency 1935: GuildChannelStore */;
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
const privateChannelSortStore = importDefault(5219) /* metro dependency 5219: PrivateChannelSortStore */;
const env0_7 = (require(661) /* metro dependency 661: Constants */).ME;
const env0_8 = (require(1386) /* metro dependency 1386: ChannelConstants */).StaticChannelRoute;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/routing/getChannelIdForGuildTransition.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/routing/getChannelIdForGuildTransition.tsx');
exports.getChannelIdForGuildTransition = getChannelIdForGuildTransition;
}
function getChannelIdForGuildTransition(a0) { // fn#53667, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7006:305, offset: 0x01352c92, size: 281 bytes, params: 2, frame: 19
var r4;
var r2;
var privateChannelIds;
var moduleValue;
var moduleValue2;
var channel;
const channelId = SelectedChannelStore.getChannelId(a0);
const defaultChannel = GuildChannelStore.getDefaultChannel(a0);
const value4 = undefined;
const id = defaultChannel == null ? value4 : defaultChannel.id;
if (id != null) {
r2 = id;
} else {
if (a0 !== ME) {
r4 = value4;
function getChannelIdForGuildTransition(a0) { // fn#53667, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7006:305, offset: 0x01352c92, size: 281 bytes, params: 2, frame: 19
var r4;
var r2;
var privateChannelIds;
var moduleValue;
var moduleValue2;
var channel;
const channelId = SelectedChannelStore.getChannelId(a0);
const defaultChannel = GuildChannelStore.getDefaultChannel(a0);
const value4 = undefined;
const id = defaultChannel == null ? value4 : defaultChannel.id;
if (id != null) {
r2 = id;
} else {
privateChannelIds = PrivateChannelSortStore.getPrivateChannelIds();
r4 = privateChannelIds.length > 0 ? privateChannelIds[0] : value4;
if (a0 !== ME) {
r4 = value4;
} else {
privateChannelIds = PrivateChannelSortStore.getPrivateChannelIds();
r4 = privateChannelIds.length > 0 ? privateChannelIds[0] : value4;
}
r2 = r4;
}
r2 = r4;
}
const GUILD_ONBOARDING = StaticChannelRoute.GUILD_ONBOARDING;
if (channelId !== GUILD_ONBOARDING) {
if (channelId !== StaticChannelRoute.GUILD_HOME) {
if (channelId !== StaticChannelRoute.GAME_SHOP) {
const GUILD_ONBOARDING = StaticChannelRoute.GUILD_ONBOARDING;
if (channelId !== GUILD_ONBOARDING) {
if (channelId !== StaticChannelRoute.GUILD_HOME) {
if (channelId !== StaticChannelRoute.GAME_SHOP) {
channel = ChannelStore.getChannel(channelId);
return channel == null || channel.isGuildVocal() ? r2 : channelId;
}
moduleValue2 = require(6829) /* metro dependency 6829: SlayerStorefrontUtils */;
if (moduleValue2.canSeeGameShop(a0)) {
return channelId;
}
channel = ChannelStore.getChannel(channelId);
return channel == null || channel.isGuildVocal() ? r2 : channelId;
}
moduleValue2 = require(6829) /* metro dependency 6829: SlayerStorefrontUtils */;
if (moduleValue2.canSeeGameShop(a0)) {
return channelId;
}
channel = ChannelStore.getChannel(channelId);
return channel == null || channel.isGuildVocal() ? r2 : channelId;
}
moduleValue = require(5103) /* metro dependency 5103: OnboardingHomeUtils */;
if (moduleValue.canSeeOnboardingHome(a0)) {
if (channelId !== StaticChannelRoute.GAME_SHOP) {
moduleValue = require(5103) /* metro dependency 5103: OnboardingHomeUtils */;
if (moduleValue.canSeeOnboardingHome(a0)) {
if (channelId !== StaticChannelRoute.GAME_SHOP) {
channel = ChannelStore.getChannel(channelId);
return channel == null || channel.isGuildVocal() ? r2 : channelId;
}
moduleValue2 = require(6829) /* metro dependency 6829: SlayerStorefrontUtils */;
if (moduleValue2.canSeeGameShop(a0)) {
return channelId;
}
channel = ChannelStore.getChannel(channelId);
return channel == null || channel.isGuildVocal() ? r2 : channelId;
}
moduleValue2 = require(6829) /* metro dependency 6829: SlayerStorefrontUtils */;
if (moduleValue2.canSeeGameShop(a0)) {
return channelId;
} else {
var guildOnboardingStoreBinding = GuildOnboardingStore;
if (guildOnboardingStoreBinding.shouldShowOnboarding(a0)) {
if (channelId !== StaticChannelRoute.GUILD_HOME) {
if (channelId !== StaticChannelRoute.GAME_SHOP) {
channel = ChannelStore.getChannel(channelId);
return channel == null || channel.isGuildVocal() ? r2 : channelId;
}
moduleValue2 = require(6829) /* metro dependency 6829: SlayerStorefrontUtils */;
if (moduleValue2.canSeeGameShop(a0)) {
return channelId;
}
channel = ChannelStore.getChannel(channelId);
return channel == null || channel.isGuildVocal() ? r2 : channelId;
}
moduleValue = require(5103) /* metro dependency 5103: OnboardingHomeUtils */;
if (moduleValue.canSeeOnboardingHome(a0)) {
if (channelId !== StaticChannelRoute.GAME_SHOP) {
channel = ChannelStore.getChannel(channelId);
return channel == null || channel.isGuildVocal() ? r2 : channelId;
}
moduleValue2 = require(6829) /* metro dependency 6829: SlayerStorefrontUtils */;
if (moduleValue2.canSeeGameShop(a0)) {
return channelId;
}
channel = ChannelStore.getChannel(channelId);
return channel == null || channel.isGuildVocal() ? r2 : channelId;
}
return r2;
}
channel = ChannelStore.getChannel(channelId);
return channel == null || channel.isGuildVocal() ? r2 : channelId;
}
} else if (GuildOnboardingStore.shouldShowOnboarding(a0)) {
if (channelId !== StaticChannelRoute.GUILD_HOME) {
if (channelId !== StaticChannelRoute.GAME_SHOP) {
channel = ChannelStore.getChannel(channelId);
return channel == null || channel.isGuildVocal() ? r2 : channelId;
}
moduleValue2 = require(6829) /* metro dependency 6829: SlayerStorefrontUtils */;
if (moduleValue2.canSeeGameShop(a0)) {
return channelId;
}
channel = ChannelStore.getChannel(channelId);
return channel == null || channel.isGuildVocal() ? r2 : channelId;
}
moduleValue = require(5103) /* metro dependency 5103: OnboardingHomeUtils */;
if (moduleValue.canSeeOnboardingHome(a0)) {
if (channelId !== StaticChannelRoute.GAME_SHOP) {
channel = ChannelStore.getChannel(channelId);
return channel == null || channel.isGuildVocal() ? r2 : channelId;
}
moduleValue2 = require(6829) /* metro dependency 6829: SlayerStorefrontUtils */;
if (moduleValue2.canSeeGameShop(a0)) {
return channelId;
}
channel = ChannelStore.getChannel(channelId);
return channel == null || channel.isGuildVocal() ? r2 : channelId;
}
return r2;
}
return r2;
}
global.__d(_fun53666, 6828, [6599, 1379, 1935, 1934, 5219, 661, 1386, 5103, 6829,
2]) /* metro module 6828, dependencies: [6599, 1379, 1935, 1934, 5219, 661, 1386, 5103, 6829, 2] */;
+4 -1
View File
@@ -1,8 +1,11 @@
/* Metro module 3974; source: modules/routing/matchPathCompat.tsx; dependencies: [2, 3975] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun32602(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#32602, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4123:6, offset: 0x0101a136, size: 96 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/routing/matchPathCompat.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/routing/matchPathCompat.tsx');
exports.matchPath = (require(3975) /* metro dependency 3975 */).matchPath;
}
global.__d(_fun32602, 3974, [2, 3975]) /* metro module 3974, dependencies: [2, 3975] */;
@@ -1,92 +1,108 @@
/* Metro module 12995; source: modules/routing/native/BackPressManager.tsx; dependencies: [6, 7, 15, 17, 18, 27, 8812, 4022, 1583, 1482, 477, 4561, 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 LifecycleManager from '../../../lib/LifecycleManager.tsx'; /* Metro dependency 4561 */
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 KeyboardTypesModule from '../../keyboard/native/KeyboardTypes.tsx'; /* Metro dependency 1583 */
import * as UseKeyboardTypeModule from '../../keyboard/native/useKeyboardType.tsx'; /* Metro dependency 4022 */
import * as ContextMenuStateNativeModule from '../../../design/components/ContextMenu/native/ContextMenuState.native.tsx'; /* Metro dependency 8812 */
function _fun99115(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#99115, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13185:6, offset: 0x021bb844, size: 259 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(6) /* metro dependency 6 */;
const env0_3 = importDefault(7) /* metro dependency 7 */;
const env0_4 = importDefault(15) /* metro dependency 15 */;
const env0_5 = importDefault(17) /* metro dependency 17 */;
const env0_6 = importDefault(18) /* metro dependency 18 */;
const env0_7 = (require(27) /* metro dependency 27 */).BackHandler;
let value = importDefault(4561) /* metro dependency 4561: LifecycleManager */;
let value = LifecycleManager;
value = _fun99120(value);
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/routing/native/BackPressManager.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/routing/native/BackPressManager.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_99116() { // fn#99116, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13185:170, offset: 0x021bb947, 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_99116_isNativeReflectConstruct = function() {
return !!result;
})();
}
function handleBackPress() { // fn#99119, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13185:363, offset: 0x021bb9a9, size: 156 bytes, params: 1, frame: 16
var r0;
var value;
(require(8812) /* metro dependency 8812: ContextMenuStateNative */).hideContextMenu();
const keyboardType = (require(4022) /* metro dependency 4022: useKeyboardType */).getKeyboardType();
const KeyboardTypes = (require(1583) /* metro dependency 1583: KeyboardTypes */).KeyboardTypes;
const SYSTEM = KeyboardTypes.SYSTEM;
const value3 = keyboardType !== SYSTEM;
if (value3) {
value = require(1482) /* metro dependency 1482: KeyboardUIStoreNative */;
value.setKeyboardType({type: KeyboardTypes.SYSTEM});
value = true;
r0 = value;
} else {
r0 = value3;
}
return !!r0;
}
function _fun99120(a0) { // fn#99120, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13185:605, offset: 0x021bba45, size: 124 bytes, params: 2, frame: 16
const closure = BackPressManager;
env0_6(closure, a0);
return env0_3(closure, [{key: '_initialize', value: value_99122}, {key: '_initializeGlobalBackPressListener',
value: value_99123}, {key: '_terminate', value: function() {
var _backPressEventSubscription = this._backPressEventSubscription;
if (_backPressEventSubscription != null) {
_backPressEventSubscription.remove();
function _isNativeReflectConstruct_99116() { // fn#99116, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13185:170, offset: 0x021bb947, 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 value_99122() { // fn#99122, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13185:916, offset: 0x021bbac1, size: 55 bytes, params: 1, frame: 12
let value = environment.__proto__;
value = require(477) /* metro dependency 477: PlatformUtils */;
if (value.isAndroid()) {
this._initializeGlobalBackPressListener();
return (_isNativeReflectConstruct_99116_isNativeReflectConstruct = function() {
return !!result;
})();
}
function handleBackPress() { // fn#99119, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13185:363, offset: 0x021bb9a9, size: 156 bytes, params: 1, frame: 16
var r0;
var value;
(ContextMenuStateNativeModule).hideContextMenu();
const keyboardType = (UseKeyboardTypeModule).getKeyboardType();
const KeyboardTypes = (KeyboardTypesModule).KeyboardTypes;
const SYSTEM = KeyboardTypes.SYSTEM;
const value3 = keyboardType !== SYSTEM;
if (value3) {
value = require(1482) /* metro dependency 1482: KeyboardUIStoreNative */;
value.setKeyboardType({type: KeyboardTypes.SYSTEM});
value = true;
r0 = value;
} else {
r0 = value3;
}
return !!r0;
}
function _fun99120(a0) { // fn#99120, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13185:605, offset: 0x021bba45, size: 124 bytes, params: 2, frame: 16
const BackPressManager2 = BackPressManager;
Inherits(BackPressManager2, a0);
return CreateClass(BackPressManager2, [{key: '_initialize', value: value_99122},
{key: '_initializeGlobalBackPressListener', value: value_99123}, {key: '_terminate', value: function() {
var _backPressEventSubscription = this._backPressEventSubscription;
if (_backPressEventSubscription != null) {
_backPressEventSubscription.remove();
}
}}]);
function BackPressManager() { // fn#99121, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13185:617, offset: 0x00c6223c, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_2(this, BackPressManager);
const value3 = env1_5(BackPressManager);
return env1_4(this, _isNativeReflectConstruct_99116() ? global.Reflect.construct(value3, arguments,
env1_5(this).constructor) : value3.apply(this, arguments));
}
function value_99122() { // fn#99122, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13185:916, offset: 0x021bbac1, size: 55 bytes, params: 1, frame: 12
let value = environment.__proto__;
value = require(477) /* metro dependency 477: PlatformUtils */;
if (value.isAndroid()) {
this._initializeGlobalBackPressListener();
}
}
function value_99123() { // fn#99123, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13185:1041, offset: 0x021bbaf8, size: 42 bytes, params: 1, frame: 13
const value = environment.__proto__;
this._backPressEventSubscription = BackHandler.addEventListener('hardwareBackPress', handleBackPress);
}
}
}
function value_99123() { // fn#99123, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13185:1041, offset: 0x021bbaf8, size: 42 bytes, params: 1, frame: 13
const value = environment.__proto__;
this._backPressEventSubscription = BackHandler.addEventListener('hardwareBackPress', handleBackPress);
}
global.__d(_fun99115, 12995, [6, 7, 15, 17, 18, 27, 8812, 4022, 1583, 1482, 477, 4561,
2]) /* metro module 12995, dependencies: [6, 7, 15, 17, 18, 27, 8812, 4022, 1583, 1482, 477, 4561, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,39 +1,52 @@
/* Metro module 4571; source: modules/routing/native/useBackPressHandler.tsx; dependencies: [31, 27, 477, 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 PlatformUtilsModule from '../../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
function _fun38813(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#38813, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4749:6, offset: 0x010cb2b8, size: 162 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importAll(31) /* metro dependency 31 */;
const value = require(27) /* metro dependency 27 */;
const env0_3 = value.BackHandler;
const env0_4 = value.NativeModules;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/routing/native/useBackPressHandler.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/routing/native/useBackPressHandler.tsx');
exports.default = useBackPressHandler;
exports.BackPressHandler = {minimize: function() {
var MinimizeApp = NativeModules.MinimizeApp;
MinimizeApp.minimizeApp();
return true;
}};
}
function useBackPressHandler(a0) { // fn#38815, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4749:294, offset: 0x010cb375, size: 91 bytes, params: 2, frame: 15
const value = a1;
const env0_0 = a0;
const r5 = !(value !== undefined) || value;
let env0_2 = undefined;
const binding = env0_2;
env0_2 = binding.useRef(a0);
binding.useLayoutEffect(_fun38816);
binding.useEffect(_fun38817, [r5]);
}
function _fun38817() { // fn#38817, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4749:401, offset: 0x010cb3e5, size: 90 bytes, params: 1, frame: 15
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (!platformUtilsModule.isIOS()) {
if (env0_1) {
var env0_0 = BackHandler.addEventListener('hardwareBackPress', _fun38818);
return _fun38819;
function useBackPressHandler(a0) { // fn#38815, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4749:294, offset: 0x010cb375, size: 91 bytes, params: 2, frame: 15
const value = a1;
const env0_0 = a0;
const r5 = !(value !== undefined) || value;
let env0_2 = undefined;
const binding = env0_2;
env0_2 = binding.useRef(a0);
binding.useLayoutEffect(_fun38816);
binding.useEffect(_fun38817, [r5]);
function _fun38816() { // fn#38816, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4749:368, offset: 0x010cb3d0, size: 21 bytes, params: 1, frame: 2
env0_2.current = env0_0;
}
function _fun38817() { // fn#38817, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4749:401, offset: 0x010cb3e5, size: 90 bytes, params: 1, frame: 15
if (!PlatformUtilsModule.isIOS()) {
if (env0_1) {
var env0_0 = BackHandler.addEventListener('hardwareBackPress', _fun38818);
return _fun38819;
}
}
function _fun38818() { // fn#38818, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4749:476, offset: 0x010cb43f, size: 18 bytes, params: 1, frame: 9
return env1_2.current();
}
function _fun38819() { // fn#38819, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4749:500, offset: 0x00cef11e, size: 19 bytes, params: 1, frame: 9
return env0_0.remove();
}
}
}
}
global.__d(_fun38813, 4571, [31, 27, 477, 2]) /* metro module 4571, dependencies: [31, 27, 477, 2] */;
+129 -108
View File
@@ -1,14 +1,17 @@
/* Metro module 1230; source: modules/routing/router_utils.tsx; dependencies: [661, 3, 1231, 1239, 1242, 2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
function _fun13788(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#13788, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1357:6, offset: 0x00df4e9a, size: 403 bytes, params: 8, frame: 21
const env0_0 = require;
const closure = function() {
var ComponentDispatch = require(dependencyMap[3]).ComponentDispatch;
return !ComponentDispatch.hasSubscribers(ComponentActions.MODAL_CLOSE);
};
const closure2 = transitionTo;
const transitionTo2 = transitionTo;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = require(661) /* metro dependency 661: Constants */;
let value = ConstantsModule;
const env0_5 = value.Routes;
const env0_6 = value.PageAnalyticsLocations;
const env0_7 = value.ComponentActions;
@@ -20,9 +23,9 @@ function _fun13788(global, require, importDefault, importAll, module, exports, d
value = require(1231) /* metro dependency 1231 */;
value = value.createMemoryHistory();
const env0_10 = value.listen(_fun13793);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/routing/router_utils.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/routing/router_utils.tsx');
exports.shouldNavigate = closure;
exports.transitionTo = closure2;
exports.transitionTo = transitionTo2;
exports.transitionToGuild = transitionToGuild;
exports.currentRouteHasBackNavigation = currentRouteHasBackNavigation;
exports.replaceWith = replaceWith;
@@ -36,124 +39,142 @@ function _fun13788(global, require, importDefault, importAll, module, exports, d
};
exports.back = back_13803;
exports.forward = forward;
}
function maybeExternallyNavigate(a0, a1) { // fn#13790, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1357:419, offset: 0x00df5066, size: 179 bytes, params: 3, frame: 19
var r0;
var window;
var dispatchEvent;
var event;
const env0_0 = a0;
const r2 = typeof a0 !== 'string' || !env0_9.some(_fun13791);
if (r2) {
r0 = !r2;
} else {
env0_8.log('' + a1 + ' - route to external path ' + a0);
window = global.window;
dispatchEvent = window.dispatchEvent;
event = new global.Event('beforeunload');
Reflect.apply(dispatchEvent, window, [event]);
window = global.window;
window.location[a1](a0);
event = true;
r0 = event;
}
return r0;
}
function transitionTo(a0, a1) { // fn#13792, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1357:636, offset: 0x00df5130, size: 258 bytes, params: 3, frame: 20
var source;
var sourceLocationStack;
var binding;
var URL;
var value3;
var uRL;
var push;
var object2;
var search;
const maybeExternallyNavigateBinding = maybeExternallyNavigate;
const value2 = undefined;
if (!maybeExternallyNavigateBinding(a0, 'assign')) {
binding = env0_8;
binding.log('transitionTo - Transitioning to ' + a0);
source = a1 == null ? value2 : a1.source;
sourceLocationStack = a1 == null ? value2 : a1.sourceLocationStack;
if (a1 == null) {
env0_2.push(a0);
function maybeExternallyNavigate(a0, a1) { // fn#13790, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1357:419, offset: 0x00df5066, size: 179 bytes, params: 3, frame: 19
var r0;
var window;
var dispatchEvent;
var event;
const env0_0 = a0;
const r2 = typeof a0 !== 'string' || !env0_9.some(_fun13791);
if (r2) {
r0 = !r2;
} else {
URL = global.URL;
value3 = 'https:' + global.window.GLOBAL_ENV.WEBAPP_ENDPOINT;
uRL = new URL(a0);
binding = env0_2;
push = binding.push;
object2 = {};
object2.pathname = uRL.pathname;
search = uRL.search;
object2.search = search;
object2.hash = uRL.hash;
copyDataProperties(object2, a1, search);
Reflect.apply(push, binding, [object2]);
env0_8.log('' + a1 + ' - route to external path ' + a0);
window = global.window;
dispatchEvent = window.dispatchEvent;
event = new global.Event('beforeunload');
Reflect.apply(dispatchEvent, window, [event]);
window = global.window;
window.location[a1](a0);
event = true;
r0 = event;
}
return r0;
function _fun13791(a0) { // fn#13791, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1357:494, offset: 0x00df5119, size: 23 bytes, params: 2, frame: 11
return env0_0.startsWith(a0);
}
}
function transitionTo(a0, a1) { // fn#13792, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1357:636, offset: 0x00df5130, size: 258 bytes, params: 3, frame: 20
var source;
var sourceLocationStack;
var binding;
var URL;
var value3;
var uRL;
var push;
var object;
var search;
const maybeExternallyNavigateBinding = maybeExternallyNavigate;
const value2 = undefined;
if (!maybeExternallyNavigateBinding(a0, 'assign')) {
binding = env0_8;
binding.log('transitionTo - Transitioning to ' + a0);
source = a1 == null ? value2 : a1.source;
sourceLocationStack = a1 == null ? value2 : a1.sourceLocationStack;
if (a1 == null) {
env0_2.push(a0);
} else {
URL = global.URL;
value3 = 'https:' + global.window.GLOBAL_ENV.WEBAPP_ENDPOINT;
uRL = new URL(a0);
binding = env0_2;
push = binding.push;
object = {};
object.pathname = uRL.pathname;
search = uRL.search;
object.search = search;
object.hash = uRL.hash;
copyDataProperties(object, a1, search);
Reflect.apply(push, binding, [object]);
}
}
return value2;
}
function _fun13793(a0, a1) { // fn#13793, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1357:300, offset: 0x00df5232, size: 30 bytes, params: 3, frame: 9
if (a1 !== 'REPLACE') {
env0_10();
}
}
return value2;
}
function _fun13793(a0, a1) { // fn#13793, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1357:300, offset: 0x00df5232, size: 30 bytes, params: 3, frame: 9
if (a1 !== 'REPLACE') {
env0_10();
function transitionToGuild(a0, a1, a2, a3) { // fn#13794, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1357:1125, offset: 0x00df5250, size: 116 bytes, params: 5, frame: 21
const binding = env0_8;
const log = binding.log;
const JSON = global.JSON;
Reflect.apply(log, binding, ['transitionToGuild - Transitioning to ' + JSON.stringify({guildId: a0, channelId: a1,
messageId: a2})]);
transitionTo(Routes.CHANNEL(a0, a1, a2), a3);
}
}
function transitionToGuild(a0, a1, a2, a3) { // fn#13794, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1357:1125, offset: 0x00df5250, size: 116 bytes, params: 5, frame: 21
const binding = env0_8;
const log = binding.log;
const JSON = global.JSON;
Reflect.apply(log, binding, ['transitionToGuild - Transitioning to ' + JSON.stringify({guildId: a0, channelId: a1,
messageId: a2})]);
transitionTo(Routes.CHANNEL(a0, a1, a2), a3);
}
function currentRouteHasBackNavigation() { // fn#13795, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1357:1328, offset: 0x00df52c4, size: 60 bytes, params: 1, frame: 13
return env0_3 != null && (require(1242) /* metro dependency 1242: RoutingSources */).ChannelBackNavigationSources.has(env0_3);
}
function currentRouteHasBackNavigation() { // fn#13795, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1357:1328, offset: 0x00df52c4, size: 60 bytes, params: 1, frame: 13
return env0_3 != null && (require(1242) /* metro dependency 1242: RoutingSources */).ChannelBackNavigationSources.has(env0_3);
}
function replaceWith(a0, a1, a2) { // fn#13796, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1357:1444, offset: 0x00df5300, size: 118 bytes, params: 4, frame: 16
if (!maybeExternallyNavigate(a0, 'replace')) {
env0_8.log('Replacing route with ' + a0);
if (typeof a0 === 'string') {
env0_2.replace(a0, a1);
} else {
env0_2.replace(a0);
function replaceWith(a0, a1, a2) { // fn#13796, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1357:1444, offset: 0x00df5300, size: 118 bytes, params: 4, frame: 16
if (!maybeExternallyNavigate(a0, 'replace')) {
env0_8.log('Replacing route with ' + a0);
if (typeof a0 === 'string') {
env0_2.replace(a0, a1);
} else {
env0_2.replace(a0);
}
env0_3 = a2;
}
env0_3 = a2;
}
}
function isValidFingerprintRoute(a0) { // fn#13800, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1357:1842, offset: 0x00df5376, size: 35 bytes, params: 2, frame: 2
if (a0 == null) {
env0_2.location.pathname != null;
function getHistory() { // fn#13797, offset: 0x00c36b39, size: 9 bytes, params: 1, frame: 1
return env0_2;
}
return true;
}
function getFingerprintLocation(a0) { // fn#13801, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1357:1968, offset: 0x00df5399, size: 595 bytes, params: 2, frame: 14
var r0;
const startsWith = (a0 ?? (env0_2.location.pathname ?? '')).startsWith;
const LOGIN = Routes.LOGIN;
r0 = Reflect.apply(startsWith, r0,
[LOGIN]) ? PageAnalyticsLocations.LOGIN : r0.startsWith(Routes.REGISTER) ? PageAnalyticsLocations.REGISTER : r0.startsWith(Routes.INVITE('')) ? PageAnalyticsLocations.INVITE : r0.startsWith(Routes.VERIFY) ? PageAnalyticsLocations.VERIFY : r0.startsWith(Routes.DISABLE_EMAIL_NOTIFICATIONS) ? PageAnalyticsLocations.DISABLE_EMAIL_NOTIFICATIONS : r0.startsWith(Routes.DISABLE_SERVER_HIGHLIGHT_NOTIFICATIONS) ? PageAnalyticsLocations.DISABLE_SERVER_HIGHLIGHT_NOTIFICATIONS : r0.startsWith(Routes.REJECT_IP) ? PageAnalyticsLocations.REJECT_IP : r0.startsWith(Routes.REJECT_MFA) ? PageAnalyticsLocations.REJECT_MFA : r0.startsWith(Routes.AUTHORIZE_IP) ? PageAnalyticsLocations.AUTHORIZE_IP : r0.startsWith(Routes.AUTHORIZE_PAYMENT) ? PageAnalyticsLocations.AUTHORIZE_PAYMENT : r0.startsWith(Routes.RESET) ? PageAnalyticsLocations.RESET : r0.startsWith(Routes.REPORT) ? PageAnalyticsLocations.REPORT : r0.startsWith(Routes.REPORT_SECOND_LOOK) ? PageAnalyticsLocations.REPORT_SECOND_LOOK : r0.startsWith(Routes.ACCOUNT_REVERT('')) ? PageAnalyticsLocations.ACCOUNT_REVERT : r0;
return r0;
}
function back_13803() { // fn#13803, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1357:2773, offset: 0x00df55ec, size: 38 bytes, params: 1, frame: 10
if (shouldNavigate()) {
env0_2.goBack();
function getLastRouteChangeSource() { // fn#13798, offset: 0x00c7c381, size: 9 bytes, params: 1, frame: 1
return env0_3;
}
}
function forward() { // fn#13804, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1357:2838, offset: 0x00df5612, size: 38 bytes, params: 1, frame: 10
if (shouldNavigate()) {
env0_2.goForward();
function getLastRouteChangeSourceLocationStack() { // fn#13799, offset: 0x00d16d26, size: 9 bytes, params: 1, frame: 1
return env0_4;
}
function isValidFingerprintRoute(a0) { // fn#13800, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1357:1842, offset: 0x00df5376, size: 35 bytes, params: 2, frame: 2
if (a0 == null) {
env0_2.location.pathname != null;
}
return true;
}
function getFingerprintLocation(a0) { // fn#13801, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1357:1968, offset: 0x00df5399, size: 595 bytes, params: 2, frame: 14
var r0;
const startsWith = (a0 ?? (env0_2.location.pathname ?? '')).startsWith;
const LOGIN = Routes.LOGIN;
r0 = Reflect.apply(startsWith, r0,
[LOGIN]) ? PageAnalyticsLocations.LOGIN : r0.startsWith(Routes.REGISTER) ? PageAnalyticsLocations.REGISTER : r0.startsWith(Routes.INVITE('')) ? PageAnalyticsLocations.INVITE : r0.startsWith(Routes.VERIFY) ? PageAnalyticsLocations.VERIFY : r0.startsWith(Routes.DISABLE_EMAIL_NOTIFICATIONS) ? PageAnalyticsLocations.DISABLE_EMAIL_NOTIFICATIONS : r0.startsWith(Routes.DISABLE_SERVER_HIGHLIGHT_NOTIFICATIONS) ? PageAnalyticsLocations.DISABLE_SERVER_HIGHLIGHT_NOTIFICATIONS : r0.startsWith(Routes.REJECT_IP) ? PageAnalyticsLocations.REJECT_IP : r0.startsWith(Routes.REJECT_MFA) ? PageAnalyticsLocations.REJECT_MFA : r0.startsWith(Routes.AUTHORIZE_IP) ? PageAnalyticsLocations.AUTHORIZE_IP : r0.startsWith(Routes.AUTHORIZE_PAYMENT) ? PageAnalyticsLocations.AUTHORIZE_PAYMENT : r0.startsWith(Routes.RESET) ? PageAnalyticsLocations.RESET : r0.startsWith(Routes.REPORT) ? PageAnalyticsLocations.REPORT : r0.startsWith(Routes.REPORT_SECOND_LOOK) ? PageAnalyticsLocations.REPORT_SECOND_LOOK : r0.startsWith(Routes.ACCOUNT_REVERT('')) ? PageAnalyticsLocations.ACCOUNT_REVERT : r0;
return r0;
}
function back_13803() { // fn#13803, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1357:2773, offset: 0x00df55ec, size: 38 bytes, params: 1, frame: 10
if (shouldNavigate()) {
env0_2.goBack();
}
}
function forward() { // fn#13804, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1357:2838, offset: 0x00df5612, size: 38 bytes, params: 1, frame: 10
if (shouldNavigate()) {
env0_2.goForward();
}
}
}
global.__d(_fun13788, 1230, [661, 3, 1231, 1239, 1242,
2]) /* metro module 1230, dependencies: [661, 3, 1231, 1239, 1242, 2] */;
+94 -90
View File
@@ -1,16 +1,21 @@
/* Metro module 4601; source: modules/routing/transitionToChannel.tsx; dependencies: [1379, 661, 4602, 4603, 1230, 7712, 44, 2] */
import Module00044 from '../../by-id/module-00044.js'; /* Metro dependency 44 */
import ChannelStore from '../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as Router_utilsModule from './router_utils.tsx'; /* Metro dependency 1230 */
import * as UseGuildIdForChannelRouteModule from '../favorites/useGuildIdForChannelRoute.tsx'; /* Metro dependency 4602 */
function _fun39050(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#39050, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4779:6, offset: 0x010d6b04, size: 201 bytes, params: 8, frame: 21
const env0_0 = require;
const closure = transitionToChannel;
const closure2 = transitionToThreadMessage;
const transitionToChannel2 = transitionToChannel;
const transitionToThreadMessage2 = transitionToThreadMessage;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const env0_4 = (require(661) /* metro dependency 661: Constants */).Routes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/routing/transitionToChannel.tsx');
exports.transitionToChannel = closure;
(FileImportTrackerModule).fileFinishedImporting('modules/routing/transitionToChannel.tsx');
exports.transitionToChannel = transitionToChannel2;
exports.transitionToThread = transitionToThread;
exports.transitionToThreadMessage = closure2;
exports.transitionToThreadMessage = transitionToThreadMessage2;
exports.tryTransitionToThreadMessage = function(a0, a1, a2, a3) {
var value2 = ChannelStore.getChannel(a1);
if (value2 != null) {
@@ -21,92 +26,91 @@ function _fun39050(global, require, importDefault, importAll, module, exports, d
};
exports.transitionToMessage = transitionToMessage;
exports.transitionToStaticChannelRoute = transitionToStaticChannelRoute;
}
function transitionToChannel(a0, a1) { // fn#39051, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4779:123, offset: 0x010d6bcd, size: 237 bytes, params: 3, frame: 21
var r2;
var guildIdForGenericRedirect;
var defaultImport;
var preload;
var guild_id;
var id;
var moduleValue2;
var transitionTo;
var CHANNEL;
var value4;
var object2;
var value;
const channel = ChannelStore.getChannel(a0);
if (channel != null) {
guildIdForGenericRedirect = (require(4602) /* metro dependency 4602: useGuildIdForChannelRoute */).getGuildIdForGenericRedirect(channel);
defaultImport = importDefault(4603) /* metro dependency 4603: ChannelActionCreators */;
preload = defaultImport.preload;
guild_id = channel.guild_id;
id = channel.id;
Reflect.apply(preload, defaultImport, [guild_id, id]);
moduleValue2 = require(1230) /* metro dependency 1230: router_utils */;
transitionTo = moduleValue2.transitionTo;
CHANNEL = Routes.CHANNEL;
id = channel.id;
value4 = Reflect.apply(CHANNEL, Routes, [guildIdForGenericRedirect, id]);
object2 = {openChannel: true};
copyDataProperties(object2, a1, defaultImport);
Reflect.apply(transitionTo, moduleValue2, [value4, object2]);
r2 = a1 != null && a1.openTextInVoiceIfVoiceChannel;
r2 = r2 && channel.isGuildVocal();
if (r2) {
value = importDefault(7712) /* metro dependency 7712: ChannelRTCActionCreators */;
value.updateChatOpen(channel.id, true);
function transitionToChannel(a0, a1) { // fn#39051, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4779:123, offset: 0x010d6bcd, size: 237 bytes, params: 3, frame: 21
var r2;
var guildIdForGenericRedirect;
var defaultImport;
var preload;
var guild_id;
var id;
var moduleValue2;
var transitionTo;
var CHANNEL;
var value4;
var object;
var value;
const channel = ChannelStore.getChannel(a0);
if (channel != null) {
guildIdForGenericRedirect = (require(4602) /* metro dependency 4602: useGuildIdForChannelRoute */).getGuildIdForGenericRedirect(channel);
defaultImport = importDefault(4603) /* metro dependency 4603: ChannelActionCreators */;
preload = defaultImport.preload;
guild_id = channel.guild_id;
id = channel.id;
Reflect.apply(preload, defaultImport, [guild_id, id]);
moduleValue2 = require(1230) /* metro dependency 1230: router_utils */;
transitionTo = moduleValue2.transitionTo;
CHANNEL = Routes.CHANNEL;
id = channel.id;
value4 = Reflect.apply(CHANNEL, Routes, [guildIdForGenericRedirect, id]);
object = {openChannel: true};
copyDataProperties(object, a1, defaultImport);
Reflect.apply(transitionTo, moduleValue2, [value4, object]);
r2 = a1 != null && a1.openTextInVoiceIfVoiceChannel;
r2 = r2 && channel.isGuildVocal();
if (r2) {
value = importDefault(7712) /* metro dependency 7712: ChannelRTCActionCreators */;
value.updateChatOpen(channel.id, true);
}
}
}
}
function transitionToThreadMessage(a0, a1, a2) { // fn#39052, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4779:425, offset: 0x010d6cba, size: 149 bytes, params: 4, frame: 18
(importDefault(44) /* metro dependency 44 */)(a0.parent_id != null, 'Thread must have a parent ID.');
const guildIdForGenericRedirect = (require(4602) /* metro dependency 4602: useGuildIdForChannelRoute */).getGuildIdForGenericRedirect(a0);
const router_utilsModule = require(1230) /* metro dependency 1230: router_utils */;
const transitionTo = router_utilsModule.transitionTo;
const value = Routes.CHANNEL(guildIdForGenericRedirect, a0.id, a1);
const object2 = {openChannel: true};
copyDataProperties(object2, a2, undefined);
Reflect.apply(transitionTo, router_utilsModule, [value, object2]);
}
function transitionToThread(a0, a1) { // fn#39053, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4779:772, offset: 0x010d6d4f, size: 145 bytes, params: 3, frame: 16
(importDefault(44) /* metro dependency 44 */)(a0.parent_id != null, 'Thread must have a parent ID.');
const guildIdForGenericRedirect = (require(4602) /* metro dependency 4602: useGuildIdForChannelRoute */).getGuildIdForGenericRedirect(a0);
const router_utilsModule = require(1230) /* metro dependency 1230: router_utils */;
const transitionTo = router_utilsModule.transitionTo;
const value = Routes.CHANNEL(guildIdForGenericRedirect, a0.id);
const object2 = {openChannel: true};
copyDataProperties(object2, a1, guildIdForGenericRedirect);
Reflect.apply(transitionTo, router_utilsModule, [value, object2]);
}
function transitionToMessage(a0, a1, a2) { // fn#39055, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4779:1216, offset: 0x010d6e22, size: 131 bytes, params: 4, frame: 17
var guildIdForGenericRedirect;
var moduleValue2;
var transitionTo;
var object2;
var value;
const channel = ChannelStore.getChannel(a0);
if (channel != null) {
guildIdForGenericRedirect = (require(4602) /* metro dependency 4602: useGuildIdForChannelRoute */).getGuildIdForGenericRedirect(channel);
moduleValue2 = require(1230) /* metro dependency 1230: router_utils */;
transitionTo = moduleValue2.transitionTo;
value = Routes.CHANNEL(guildIdForGenericRedirect, channel.id, a1);
object2 = {openChannel: true};
copyDataProperties(object2, a2, undefined);
Reflect.apply(transitionTo, moduleValue2, [value, object2]);
function transitionToThreadMessage(a0, a1, a2) { // fn#39052, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4779:425, offset: 0x010d6cba, size: 149 bytes, params: 4, frame: 18
(Module00044)(a0.parent_id != null, 'Thread must have a parent ID.');
const guildIdForGenericRedirect = (UseGuildIdForChannelRouteModule).getGuildIdForGenericRedirect(a0);
const transitionTo = Router_utilsModule.transitionTo;
const value = Routes.CHANNEL(guildIdForGenericRedirect, a0.id, a1);
const object = {openChannel: true};
copyDataProperties(object, a2, undefined);
Reflect.apply(transitionTo, Router_utilsModule, [value, object]);
}
function transitionToThread(a0, a1) { // fn#39053, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4779:772, offset: 0x010d6d4f, size: 145 bytes, params: 3, frame: 16
(Module00044)(a0.parent_id != null, 'Thread must have a parent ID.');
const guildIdForGenericRedirect = (UseGuildIdForChannelRouteModule).getGuildIdForGenericRedirect(a0);
const transitionTo = Router_utilsModule.transitionTo;
const value = Routes.CHANNEL(guildIdForGenericRedirect, a0.id);
const object = {openChannel: true};
copyDataProperties(object, a1, guildIdForGenericRedirect);
Reflect.apply(transitionTo, Router_utilsModule, [value, object]);
}
function transitionToMessage(a0, a1, a2) { // fn#39055, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4779:1216, offset: 0x010d6e22, size: 131 bytes, params: 4, frame: 17
var guildIdForGenericRedirect;
var moduleValue2;
var transitionTo;
var object;
var value;
const channel = ChannelStore.getChannel(a0);
if (channel != null) {
guildIdForGenericRedirect = (require(4602) /* metro dependency 4602: useGuildIdForChannelRoute */).getGuildIdForGenericRedirect(channel);
moduleValue2 = require(1230) /* metro dependency 1230: router_utils */;
transitionTo = moduleValue2.transitionTo;
value = Routes.CHANNEL(guildIdForGenericRedirect, channel.id, a1);
object = {openChannel: true};
copyDataProperties(object, a2, undefined);
Reflect.apply(transitionTo, moduleValue2, [value, object]);
}
}
function transitionToStaticChannelRoute(a0, a1, a2) { // fn#39056, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4779:1431, offset: 0x010d6ea5, size: 80 bytes, params: 4, frame: 16
const transitionTo = Router_utilsModule.transitionTo;
const value = Routes.CHANNEL(a0, a1);
const object = {openChannel: true};
copyDataProperties(object, a2, Routes);
Reflect.apply(transitionTo, Router_utilsModule, [value, object]);
}
}
function transitionToStaticChannelRoute(a0, a1, a2) { // fn#39056, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4779:1431, offset: 0x010d6ea5, size: 80 bytes, params: 4, frame: 16
const router_utilsModule = require(1230) /* metro dependency 1230: router_utils */;
const transitionTo = router_utilsModule.transitionTo;
const value = Routes.CHANNEL(a0, a1);
const object2 = {openChannel: true};
copyDataProperties(object2, a2, Routes);
Reflect.apply(transitionTo, router_utilsModule, [value, object2]);
}
global.__d(_fun39050, 4601, [1379, 661, 4602, 4603, 1230, 7712, 44,
2]) /* metro module 4601, dependencies: [1379, 661, 4602, 4603, 1230, 7712, 44, 2] */;
@@ -1,23 +1,28 @@
/* Metro module 6947; source: modules/routing/transitionToGuild.native.tsx; dependencies: [661, 6828, 5465, 1230, 2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as Router_utilsModule from './router_utils.tsx'; /* Metro dependency 1230 */
import * as DeprecatedLayoutAnimationModule from '../animations/native/DeprecatedLayoutAnimation.tsx'; /* Metro dependency 5465 */
import * as GetChannelIdForGuildTransitionModule from './getChannelIdForGuildTransition.tsx'; /* Metro dependency 6828 */
function _fun55260(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#55260, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7125:6, offset: 0x0137a0f6, size: 115 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = (require(661) /* metro dependency 661: Constants */).Routes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/routing/transitionToGuild.native.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/routing/transitionToGuild.native.tsx');
exports.transitionToGuild = transitionToGuild_55261;
function transitionToGuild_55261(a0, a1) { // fn#55261, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7125:211, offset: 0x0137a169, size: 144 bytes, params: 3, frame: 19
const channelIdForGuildTransition = (GetChannelIdForGuildTransitionModule).getChannelIdForGuildTransition(a0);
(DeprecatedLayoutAnimationModule).DeprecatedLayoutAnimation({duration: 0,
create: undefined, update: undefined, delete: undefined});
const transitionTo = Router_utilsModule.transitionTo;
const value = Routes.CHANNEL(a0, channelIdForGuildTransition);
object = {navigationReplace: true};
copyDataProperties(object, a1, 0);
Reflect.apply(transitionTo, Router_utilsModule, [value, object]);
}
}
function transitionToGuild_55261(a0, a1) { // fn#55261, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7125:211, offset: 0x0137a169, size: 144 bytes, params: 3, frame: 19
var object2;
const channelIdForGuildTransition = (require(6828) /* metro dependency 6828: getChannelIdForGuildTransition */).getChannelIdForGuildTransition(a0);
(require(5465) /* metro dependency 5465: DeprecatedLayoutAnimation */).DeprecatedLayoutAnimation({duration: 0,
create: undefined, update: undefined, delete: undefined});
const router_utilsModule = require(1230) /* metro dependency 1230: router_utils */;
const transitionTo = router_utilsModule.transitionTo;
const value = Routes.CHANNEL(a0, channelIdForGuildTransition);
object2 = {navigationReplace: true};
copyDataProperties(object2, a1, 0);
Reflect.apply(transitionTo, router_utilsModule, [value, object2]);
}
global.__d(_fun55260, 6947, [661, 6828, 5465, 1230,
2]) /* metro module 6947, dependencies: [661, 6828, 5465, 1230, 2] */;