Files
discord-decomp/sources/by-id/module-01538.jsx
T
2026-07-28 01:06:53 +03:00

770 lines
40 KiB
React

/* Metro module 1538; source: unknown; dependencies: [57, 77, 29, 65, 31, 33, 1488, 1515, 1514, 1539, 1511, 1498, 1540, 1541, 1489, 1508, 1504, 1542, 1500, 1501, 1543, 1545, 1546, 1547, 1548, 1549, 1553, 1554, 1530, 1532] */
import ObjectWithoutProperties from './module-00029-ObjectWithoutProperties.js'; /* Metro dependency 29 */
import Module00057 from './module-00057.js'; /* Metro dependency 57 */
import Module00065 from './module-00065.js'; /* Metro dependency 65 */
import Module00077 from './module-00077.js'; /* Metro dependency 77 */
import Module01511 from './module-01511.js'; /* Metro dependency 1511 */
import Module01530 from './module-01530.js'; /* Metro dependency 1530 */
import Module01532 from './module-01532.jsx'; /* Metro dependency 1532 */
import Module01539 from './module-01539.js'; /* Metro dependency 1539 */
import * as ReactModule from './module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from './module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as PrivateValueStoreModule from './module-01488-PrivateValueStore.js'; /* Metro dependency 1488 */
import * as Module01489Module from './module-01489.js'; /* Metro dependency 1489 */
function _fun17361(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#17361, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1665:6, offset: 0x00e6ab24, size: 226 bytes, params: 8, frame: 19
const env0_0 = require;
const env0_3 = ['children', 'screenListeners'];
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(PrivateValueStoreModule).PrivateValueStore;
const isValidKey = function(a0) {
return a0 === undefined || typeof a0 === 'string' && a0 !== '';
};
exports.default = useNavigationBuilder;
function getRouteConfigsFromChildren(a0, a1, a2) { // fn#17363, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1665:308, offset: 0x00e6ac2d, size: 66 bytes, params: 4, frame: 13
const env0_0 = a1;
const env0_1 = a2;
const Children = ReactModule.Children;
return Children.toArray(a0).reduce(_fun17364, []);
function _fun17364(a0, a1) { // fn#17364, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1665:389, offset: 0x00e6ac6f, size: 926 bytes, params: 3, frame: 27
var r8;
var r10;
var r2;
var type;
var Error;
var concat;
var JSON;
var stringify;
var props;
var isValidKeyBinding;
var navigationKey;
var push;
var apply;
var getRouteConfigsFromChildrenBinding;
var children;
var items2;
let value = environment.__proto__;
let binding = env1_8;
if (binding.isValidElement(a1)) {
type = a1.type;
if (type === (importDefault(1515) /* metro dependency 1515 */)) {
isValidKeyBinding = isValidKey;
props = a1.props;
navigationKey = props.navigationKey;
if (isValidKeyBinding(navigationKey)) {
push = a0.push;
props = a1.props;
props = a1.props;
Reflect.apply(push, a0, [{keys: [require, props.navigationKey], options: importDefault, props: props}]);
return a0;
}
Error = global.Error;
JSON = global.JSON;
stringify = JSON.stringify;
props = a1.props;
navigationKey = props.navigationKey;
value = Reflect.apply(stringify, JSON, [navigationKey]);
props = a1.props;
value = "Got an invalid 'navigationKey' prop (" + value + ") for the screen '" + props.name + "'. It must be a non-empty string or 'undefined'.";
throw new Error(value);
}
type = a1.type;
if (type === env1_8.Fragment) {
isValidKeyBinding = isValidKey;
props = a1.props;
navigationKey = props.navigationKey;
if (isValidKeyBinding(navigationKey)) {
push = a0.push;
apply = push.apply;
binding = env1_7;
getRouteConfigsFromChildrenBinding = getRouteConfigsFromChildren;
props = a1.props;
children = props.children;
props = a1.props;
navigationKey = props.navigationKey;
if (a1.type !== (importDefault(1514) /* metro dependency 1514 */)) {
r2 = importDefault;
} else if (importDefault != null) {
items2 = [];
concat = items2.concat;
value = env1_7(importDefault);
value = Reflect.apply(concat, items2, [value, [a1.props.screenOptions]]);
r2 = value;
} else {
r2 = [a1.props.screenOptions];
}
Reflect.apply(apply, push, [a0, binding(getRouteConfigsFromChildrenBinding(children, navigationKey,
r2))]);
return a0;
}
Error = global.Error;
JSON = global.JSON;
stringify = JSON.stringify;
props = a1.props;
navigationKey = props.navigationKey;
value = Reflect.apply(stringify, JSON, [navigationKey]);
concat = global.HermesInternal.concat;
value = "Got an invalid 'navigationKey' prop (" + value + ") for the group. It must be a non-empty string or 'undefined'.";
throw new Error(value);
}
type = a1.type;
if (type === (importDefault(1514) /* metro dependency 1514 */)) {
isValidKeyBinding = isValidKey;
props = a1.props;
navigationKey = props.navigationKey;
if (isValidKeyBinding(navigationKey)) {
push = a0.push;
apply = push.apply;
binding = env1_7;
getRouteConfigsFromChildrenBinding = getRouteConfigsFromChildren;
props = a1.props;
children = props.children;
props = a1.props;
navigationKey = props.navigationKey;
if (a1.type !== (importDefault(1514) /* metro dependency 1514 */)) {
r2 = importDefault;
} else if (importDefault != null) {
items2 = [];
concat = items2.concat;
value = env1_7(importDefault);
value = Reflect.apply(concat, items2, [value, [a1.props.screenOptions]]);
r2 = value;
} else {
r2 = [a1.props.screenOptions];
}
Reflect.apply(apply, push, [a0, binding(getRouteConfigsFromChildrenBinding(children, navigationKey,
r2))]);
return a0;
}
Error = global.Error;
JSON = global.JSON;
stringify = JSON.stringify;
props = a1.props;
navigationKey = props.navigationKey;
value = Reflect.apply(stringify, JSON, [navigationKey]);
concat = global.HermesInternal.concat;
value = "Got an invalid 'navigationKey' prop (" + value + ") for the group. It must be a non-empty string or 'undefined'.";
throw new Error(value);
}
Error = global.Error;
binding = env1_8;
if (binding.isValidElement(a1)) {
r10 = typeof a1.type === 'string' ? a1.type : a1.type?.name;
props = a1.props;
value = '';
value = "'" + r10 + "'" + (props != null ? typeof a1.props !== 'object' ? value : 'name' in a1.props && a1.props != null && a1.props.name ? " for the screen '" + a1.props.name + "'" : value : value);
r8 = value;
} else if (typeof a1 === 'object') {
r8 = global.JSON.stringify(a1);
} else {
value = global.String(a1);
value = "'" + value + "'";
r8 = value;
}
concat = global.HermesInternal.concat;
value = "A navigator can only contain 'Screen', 'Group' or 'React.Fragment' as its direct children (found " + r8 + "). To render this component in the navigator, pass it in the 'component' prop to 'Screen'.";
throw new Error(value);
}
Error = global.Error;
binding = env1_8;
if (binding.isValidElement(a1)) {
r10 = typeof a1.type === 'string' ? a1.type : a1.type?.name;
props = a1.props;
value = '';
value = "'" + r10 + "'" + (props != null ? typeof a1.props !== 'object' ? value : 'name' in a1.props && a1.props != null && a1.props.name ? " for the screen '" + a1.props.name + "'" : value : value);
r8 = value;
} else if (typeof a1 === 'object') {
r8 = global.JSON.stringify(a1);
} else {
value = global.String(a1);
value = "'" + value + "'";
r8 = value;
}
const HermesInternal = global.HermesInternal;
concat = HermesInternal.concat;
value = "A navigator can only contain 'Screen', 'Group' or 'React.Fragment' as its direct children (found " + r8 + "). To render this component in the navigator, pass it in the 'component' prop to 'Screen'.";
const value2 = Object.create(Error.prototype, {constructor: {value: Error}});
const error = new Error(value);
throw error instanceof Object ? error : value2;
}
}
function useNavigationBuilder(a0, a1) { // fn#17365, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1665:1628, offset: 0x00e6b00d, size: 2058 bytes, params: 3, frame: 35
var r3;
var r4;
var r8;
var params;
var r14;
var r12;
var r19;
var r18;
var key;
var state;
var object;
var value13;
var value14;
var value15;
var getState;
var setState;
var setKey;
var getKey;
var getIsInitial;
var value16;
var useMemo;
var value18;
var property;
var property2;
var value19;
var useEffect;
var current2;
var getStateForRouteNamesChange;
var value24;
var current3;
var value25;
const CommonActions = (Module01489Module).CommonActions;
var navigate;
var value33;
var value34;
var value35;
var listeners;
var addListener;
var value36;
var keyedListeners;
var addKeyedListener;
var defaultImport5;
var value37;
var defaultImport6;
var value38;
var defaultImport8;
var value39;
var value;
const value2 = undefined;
const env0_0 = (Module01539)();
let binding = env0_8;
const value3 = binding.useContext(Module01511);
const children = a1.children;
const env0_2 = a1.screenListeners;
const value4 = ObjectWithoutProperties(a1, env0_3);
let useRef = binding.useRef;
const Object = global.Object;
const assign = Object.assign;
const value5 = null;
const current = Reflect.apply(useRef, binding, [a0(Reflect.apply(assign, Object, [{}, value4,
value5 != value3 && value3.params && value5 == value3.params.state ? value3.params.initial === false || typeof value3.params.screen !== 'string' ? value5 : {initialRouteName: value3.params.screen} : value5]))]).current;
const routeConfigsFromChildren = getRouteConfigsFromChildren(children);
const value8 = routeConfigsFromChildren.reduce(function(a0, a1) {
var Error;
var value;
if (a1.props.name in a0) {
Error = global.Error;
value = "A navigator cannot contain multiple 'Screen' components with the same name (found duplicate screen named '" + a1.props.name + "')";
value = new Error();
throw value;
}
a0[a1.props.name] = a1;
return a0;
}, {});
const env0_4 = value8;
const value9 = routeConfigsFromChildren.map(function(a0) {
return a0.props.name;
});
const value10 = value9.reduce(_fun17368, {});
const value11 = value9.reduce(_fun17370, {});
const value12 = value9.reduce(_fun17371, {});
if (value9.length) {
binding = env0_8;
value13 = binding.useCallback(_fun17372, [current.type]);
var env0_8 = value13;
value14 = binding.useCallback(_fun17373, [value13]);
value15 = binding.useContext(importDefault(1498) /* metro dependency 1498 */);
state = value15.state;
getState = value15.getState;
setState = value15.setState;
setKey = value15.setKey;
getKey = value15.getKey;
getIsInitial = value15.getIsInitial;
var env0_16 = binding.useRef(false);
var env0_17 = binding.useCallback(_fun17374, [setState]);
value16 = binding.useCallback(_fun17375, [setState]);
useMemo = binding.useMemo;
object = [state, current, value13];
value18 = env0_4(Reflect.apply(useMemo, binding, [_fun17376, object]), 2);
property = value18[0];
property2 = value18[1];
value19 = binding.useRef(value10);
binding.useEffect(_fun17378);
current2 = value19.current;
r3 = value14(state) ? state : property;
r4 = (importDefault(1540) /* metro dependency 1540 */)(r3.routeNames,
value9) && (importDefault(1541) /* metro dependency 1541 */)(value10, current2);
if (r4) {
r8 = r3;
} else {
getStateForRouteNamesChange = current.getStateForRouteNamesChange;
object = {routeNames: value9, routeParamList: value11, routeGetIdList: value12};
object.routeKeyChanges = global.Object.keys(value10).filter(_fun17379);
r8 = Reflect.apply(getStateForRouteNamesChange, current, [r3, object]);
}
binding = env0_8;
useRef = binding.useRef;
params = value5 == value3 ? value2 : value3.params;
value24 = Reflect.apply(useRef, binding, [params]);
binding = env0_8;
useEffect = binding.useEffect;
params = value5 == value3 ? value2 : value3.params;
object = [params];
Reflect.apply(useEffect, binding, [_fun17380, object]);
if (value5 == value3) {
r4 = r8;
} else {
params = value3.params;
if (params) {
current3 = value24.current;
params = value3.params;
if (typeof params.state !== 'object') {
params = value3.params;
value25 = typeof params.screen === 'string';
if (value25) {
r14 = value3.params.initial === false && property2;
r14 = !r14 ? value3.params !== current3 : r14;
r12 = r14;
} else {
r12 = value25;
}
if (r12) {
navigate = CommonActions.navigate;
object = {};
params = value3.params;
object.name = params.screen;
params = value3.params;
params = params.params;
object.params = params;
params = value3.params;
object.path = params.path;
r19 = Reflect.apply(navigate, CommonActions, [object]);
} else {
r19 = value2;
}
} else {
params = value3.params;
if (value5 == params.state) {
params = value3.params;
value25 = typeof params.screen === 'string';
if (value25) {
r14 = value3.params.initial === false && property2;
r14 = !r14 ? value3.params !== current3 : r14;
r12 = r14;
} else {
r12 = value25;
}
if (r12) {
navigate = CommonActions.navigate;
object = {};
params = value3.params;
object.name = params.screen;
params = value3.params;
params = params.params;
object.params = params;
params = value3.params;
object.path = params.path;
r19 = Reflect.apply(navigate, CommonActions, [object]);
} else {
r19 = value2;
}
} else {
params = value3.params;
if (params !== current3) {
r19 = CommonActions.reset(value3.params.state);
} else {
params = value3.params;
value25 = typeof params.screen === 'string';
if (value25) {
r14 = value3.params.initial === false && property2;
r14 = !r14 ? value3.params !== current3 : r14;
r12 = r14;
} else {
r12 = value25;
}
if (r12) {
navigate = CommonActions.navigate;
object = {};
params = value3.params;
object.name = params.screen;
params = value3.params;
params = params.params;
object.params = params;
params = value3.params;
object.path = params.path;
r19 = Reflect.apply(navigate, CommonActions, [object]);
} else {
r19 = value2;
}
}
}
}
r18 = r19 ? current.getStateForAction(r8, r19, {routeNames: value9, routeParamList: value11,
routeGetIdList: value12}) : value5;
r8 = value5 !== r18 ? current.getRehydratedState(r18, {routeNames: value9, routeParamList: value11,
routeGetIdList: value12}) : r8;
r4 = r8;
} else {
r4 = r8;
}
}
var result = r3 !== r4;
(importDefault(1508) /* metro dependency 1508 */)(_fun17381);
binding = env0_8;
binding.useEffect(_fun17382, []);
binding.useRef().current = property;
value33 = binding.useCallback(_fun17385, [getState, value14]);
value34 = (importDefault(1504) /* metro dependency 1504 */)(_fun17386);
(importDefault(1542) /* metro dependency 1542 */)({state: r4, emitter: value34});
binding.useEffect(_fun17395, [value34, r4]);
value35 = (importDefault(1500) /* metro dependency 1500 */)();
listeners = value35.listeners;
addListener = value35.addListener;
value36 = (importDefault(1501) /* metro dependency 1501 */)();
keyedListeners = value36.keyedListeners;
addKeyedListener = value36.addKeyedListener;
defaultImport5 = importDefault(1543) /* metro dependency 1543 */;
key = value5 == value3 ? value2 : value3.key;
value37 = defaultImport5({router: current, getState: value33, setState: value16, key: key,
actionListeners: listeners.action, beforeRemoveListeners: keyedListeners.beforeRemove,
routerConfigOptions: {routeNames: value9, routeParamList: value11, routeGetIdList: value12},
emitter: value34});
defaultImport6 = importDefault(1545) /* metro dependency 1545 */;
key = value5 == value3 ? value2 : value3.key;
value38 = defaultImport6({router: current, key: key, getState: value33, setState: value16});
value = importDefault(1546) /* metro dependency 1546 */;
value = value({id: a1.id, onAction: value37, getState: value33, emitter: value34, router: current});
(importDefault(1547) /* metro dependency 1547 */)({navigation: value, focusedListeners: listeners.focus});
defaultImport8 = importDefault(1548) /* metro dependency 1548 */;
getState = keyedListeners.getState;
defaultImport8({getState: value33, getStateListeners: getState});
value39 = (importDefault(1549) /* metro dependency 1549 */)({state: r4, screens: value8, navigation: value,
screenOptions: a1.screenOptions, defaultScreenOptions: a1.defaultScreenOptions, onAction: value37,
getState: value33, setState: value16, onRouteFocus: value38, addListener: addListener,
addKeyedListener: addKeyedListener, router: current, emitter: value34});
(importDefault(1553) /* metro dependency 1553 */)({state: r4, navigation: value, descriptors: value39});
object = {state: r4, navigation: value, descriptors: value39,
NavigationContent: (importDefault(1554) /* metro dependency 1554 */)(_fun17396)};
return object;
}
let Error = global.Error;
throw new Error("Couldn't find any screens for the navigator. Have you defined any screens as its children?");
function _fun17368(a0, a1) { // fn#17368, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1665:2214, offset: 0x00e6b892, size: 59 bytes, params: 3, frame: 13
const value = env0_4[a1].keys.map(function(a0) {
return a0 ?? '';
});
a0[a1] = value.join(':');
return a0;
}
function _fun17370(a0, a1) { // fn#17370, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1665:2320, offset: 0x00e6b8e2, size: 34 bytes, params: 3, frame: 3
a0[a1] = env0_4[a1].props.initialParams;
return a0;
}
function _fun17371(a0, a1) { // fn#17371, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1665:2399, offset: 0x00e6b904, size: 67 bytes, params: 3, frame: 17
const Object = global.Object;
const assign = Object.assign;
const value = environment.__proto__;
const binding = env1_5;
const getId = env0_4[a1].props.getId;
return Reflect.apply(assign, Object, [a0, binding({}, a1, getId)]);
}
function _fun17372(a0) { // fn#17372, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1665:2612, offset: 0x00e6b947, size: 40 bytes, params: 2, frame: 3
return a0.type === undefined || a0.type === current.type;
}
function _fun17373(a0) { // fn#17373, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1665:2693, offset: 0x00e6b96f, size: 41 bytes, params: 2, frame: 13
return a0 !== undefined && a0.stale === false && env0_8(a0);
}
function _fun17374() { // fn#17374, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1665:2883, offset: 0x00e6b998, size: 28 bytes, params: 1, frame: 11
setState(undefined);
env0_16.current = true;
}
function _fun17375(a0) { // fn#17375, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1665:2941, offset: 0x00e6b9b4, size: 33 bytes, params: 2, frame: 11
if (!env0_16.current) {
setState(a0);
}
}
function _fun17376() { // fn#17376, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1665:2989, offset: 0x00e6b9d5, size: 260 bytes, params: 1, frame: 19
var state4;
var r0;
var currentBinding;
var getInitialState;
var object;
var getRehydratedState;
const value2 = Module00077.reduce(_fun17377, {});
const stateBinding = state;
const value3 = undefined;
if (value3 === stateBinding) {
if ((env0_1 == null || env0_1.params == null ? value3 : env0_1.params.state) != null) {
currentBinding = current;
getRehydratedState = currentBinding.getRehydratedState;
state4 = (env0_1 == null || env0_1.params == null ? value3 : env0_1.params.state) ?? state;
object = {routeNames: Module00077, routeParamList: value2, routeGetIdList: Module00065};
object = [Reflect.apply(getRehydratedState, currentBinding, [state4, object]), false];
r0 = object;
} else {
currentBinding = current;
getInitialState = currentBinding.getInitialState;
object = {routeNames: Module00077, routeParamList: value2, routeGetIdList: Module00065};
object = [Reflect.apply(getInitialState, currentBinding, [object]), true];
r0 = object;
}
} else if (env0_8(state)) {
currentBinding = current;
getRehydratedState = currentBinding.getRehydratedState;
state4 = (env0_1 == null || env0_1.params == null ? value3 : env0_1.params.state) ?? state;
object = {routeNames: Module00077, routeParamList: value2, routeGetIdList: Module00065};
object = [Reflect.apply(getRehydratedState, currentBinding, [state4, object]), false];
r0 = object;
} else if ((env0_1 == null || env0_1.params == null ? value3 : env0_1.params.state) != null) {
currentBinding = current;
getRehydratedState = currentBinding.getRehydratedState;
state4 = (env0_1 == null || env0_1.params == null ? value3 : env0_1.params.state) ?? state;
object = {routeNames: Module00077, routeParamList: value2, routeGetIdList: Module00065};
object = [Reflect.apply(getRehydratedState, currentBinding, [state4, object]), false];
r0 = object;
} else {
currentBinding = current;
getInitialState = currentBinding.getInitialState;
object = {routeNames: Module00077, routeParamList: value2, routeGetIdList: Module00065};
object = [Reflect.apply(getInitialState, currentBinding, [object]), true];
r0 = object;
}
return r0;
function _fun17377(a0, a1) { // fn#17377, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1665:3022, offset: 0x00e6bad9, size: 222 bytes, params: 3, frame: 20
var state;
var initial;
var screen;
var params;
const value = environment.__proto__;
const initialParams = env1_4[a1].props.initialParams;
const value2 = undefined;
if (env1_1 == null) {
state = value2;
} else {
params = env1_1.params;
state = params == null ? value2 : params.state;
}
if (state == null) {
if (env1_1 == null) {
initial = value2;
} else {
params = env1_1.params;
initial = params == null ? value2 : params.initial;
}
if (initial === false) {
params = value2;
} else {
if (env1_1 == null) {
screen = value2;
} else {
params = env1_1.params;
screen = params == null ? value2 : params.screen;
}
if (screen !== a1) {
params = value2;
} else {
params = env1_1.params;
params = params.params;
}
}
} else {
params = value2;
}
a0[a1] = value2 !== initialParams ? global.Object.assign({}, initialParams,
params) : value2 === params ? value2 : global.Object.assign({}, initialParams, params);
return a0;
}
}
function _fun17378() { // fn#17378, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1665:3668, offset: 0x00e6bbb7, size: 21 bytes, params: 1, frame: 2
env0_19.current = ObjectWithoutProperties;
}
function _fun17379(a0) { // fn#17379, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1665:3890, offset: 0x00e6bbcc, size: 46 bytes, params: 2, frame: 12
return current.hasOwnProperty(a0) && ObjectWithoutProperties[a0] !== current[a0];
}
function _fun17380() { // fn#17380, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1665:4004, offset: 0x00e6bbfa, size: 42 bytes, params: 1, frame: 5
const binding = env0_23;
const value2 = undefined;
binding.current = env0_1 == null ? value2 : env0_1.params;
return value2;
}
function _fun17381() { // fn#17381, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1665:4604, offset: 0x00e6bc24, size: 29 bytes, params: 1, frame: 11
if (result) {
env0_18(env0_22);
}
}
function _fun17382() { // fn#17382, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1665:4643, offset: 0x00e6bc41, size: 51 bytes, params: 1, frame: 12
setKey(env0_0);
if (!getIsInitial()) {
env0_18(env0_22);
}
return function() {
global.setTimeout(_fun17384, 0);
};
function _fun17383() { // fn#17383, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1665:4676, offset: 0x00e6bc74, size: 27 bytes, params: 1, frame: 13
global.setTimeout(_fun17384, 0);
function _fun17384() { // fn#17384, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1665:4699, offset: 0x00e6bc8f, size: 49 bytes, params: 1, frame: 12
if (getState() !== undefined && getKey() === env2_0) {
env2_17();
}
}
}
}
function _fun17385() { // fn#17385, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1665:4799, offset: 0x00e6bcc0, size: 36 bytes, params: 1, frame: 12
const state = getState();
return (0, JsxRuntimeModule.jsx)(state) ? state : env0_25.current;
}
function _fun17386(a0) { // fn#17386, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1665:4867, offset: 0x00e6bce4, size: 336 bytes, params: 2, frame: 20
var environment;
var r2;
var property;
var push;
var apply;
var value2;
var binding;
var value5;
var navigation;
var items2;
var concat;
var value7;
var items3;
var concat2;
const env0_0 = a0;
const items4 = [];
const target = a0.target;
var value;
const routes = env0_21.routes;
if (target) {
value5 = routes.find(_fun17387);
if (value5 != null && value5.name) {
items4.push(value5.name);
r2 = value5;
} else {
r2 = value5;
}
} else {
property = routes[env0_21.index];
push = items4.push;
apply = push.apply;
value2 = environment.__proto__;
Reflect.apply(apply, push, [items4, env1_7(global.Object.keys(env0_4).filter(_fun17388))]);
r2 = property;
}
if (r2 != null) {
binding = env0_28;
navigation = binding[r2.key].navigation;
items2 = [];
concat = items2.concat;
apply = concat.apply;
value7 = environment.__proto__;
binding = env1_7;
items3 = [screenListeners];
concat2 = items3.concat;
value = items4.map(_fun17389);
value = Reflect.apply(concat2, items3, [binding(value)]);
value = Reflect.apply(apply, concat, [items2, binding(value.map(_fun17390))]);
value = value.filter(function(a0, a1, a2) {
var r0;
var value = a0;
if (value) {
value = a2.lastIndexOf(value);
value = value === a1;
r0 = value;
} else {
r0 = value;
}
return r0;
});
value.forEach(_fun17394);
}
function _fun17387({key}) { // fn#17387, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1665:4929, offset: 0x00e6be34, size: 27 bytes, params: 2, frame: 2
return key === env0_0.target;
}
function _fun17388(a0) { // fn#17388, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1665:5054, offset: 0x00e6be4f, size: 32 bytes, params: 2, frame: 3
return env0_1?.name === a0;
}
function _fun17389(a0) { // fn#17389, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1665:5199, offset: 0x00e6be6f, size: 27 bytes, params: 2, frame: 2
return env1_4[a0].props.listeners;
}
function _fun17390(a0) { // fn#17390, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1665:5249, offset: 0x00e6be8a, size: 108 bytes, params: 2, frame: 14
var r4;
var r0;
let value = a0;
if (typeof value !== 'function') {
r4 = value;
} else {
value = value({route: env0_1, navigation: navigation});
r4 = value;
}
value = undefined;
if (r4) {
value = global.Object.keys(r4);
value = value.filter(_fun17391);
value = value.map(_fun17392);
r0 = value;
} else {
r0 = value;
}
return r0;
function _fun17391(a0) { // fn#17391, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1665:5348, offset: 0x00e6bef6, size: 21 bytes, params: 2, frame: 2
return a0 === env1_0.type;
}
function _fun17392(a0) { // fn#17392, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1665:5386, offset: 0x00c3fa6d, size: 31 bytes, params: 2, frame: 3
return env0_0?.[a0];
}
}
function _fun17394(a0) { // fn#17394, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1665:5507, offset: 0x00e6bf2b, size: 30 bytes, params: 2, frame: 12
return a0?.(env0_0);
}
}
function _fun17395() { // fn#17395, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1665:5598, offset: 0x00e6bf49, size: 46 bytes, params: 1, frame: 13
env0_26.emit({type: 'state', data: {state: env0_21}});
}
function _fun17396(a0) { // fn#17396, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1665:6531, offset: 0x00e6bf77, size: 87 bytes, params: 2, frame: 16
const value = environment.__proto__;
const Provider = (Module01530).Provider;
return (
<Provider value={env0_27}>
{((Component) => <Component>{a0}</Component>)(Module01532)}
</Provider>
);
}
}
}
global.__d(_fun17361, 1538, [57, 77, 29, 65, 31, 33, 1488, 1515, 1514, 1539, 1511, 1498, 1540, 1541, 1489, 1508,
1504, 1542, 1500, 1501, 1543, 1545, 1546, 1547, 1548, 1549, 1553, 1554, 1530,
1532]) /* metro module 1538, dependencies: [57, 77, 29, 65, 31, 33, 1488, 1515, 1514, 1539, 1511, 1498, 1540, 1541, 1489, 1508, 1504, 1542, 1500, 1501, 1543, 1545, 1546, 1547, 1548, 1549, 1553, 1554, 1530, 1532] */;