/* Metro module 1550; source: unknown; dependencies: [77, 29, 31, 1506, 1489] */ import ObjectWithoutProperties from './module-00029-ObjectWithoutProperties.js'; /* Metro dependency 29 */ import Module00077 from './module-00077.js'; /* Metro dependency 77 */ import Module01506 from './module-01506.js'; /* Metro dependency 1506 */ import * as ReactModule from './module-00031-React.js'; /* Metro dependency 31 */ import * as Module01489Module from './module-01489.js'; /* Metro dependency 1489 */ function _fun17458(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#17458, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1677:6, offset: 0x00e6d920, size: 137 bytes, params: 8, frame: 18 const env0_0 = require; const env0_3 = ['emit']; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); exports.default = useNavigationCache; function useNavigationCache({state, getState, navigation, setOptions, router, emitter}) { // fn#17459, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1677:151, offset: 0x00e6d9a9, size: 238 bytes, params: 2, frame: 24 const useContext = ReactModule.useContext; Reflect.apply(useContext, ReactModule, [Module01506]).stackRef; const value2 = ReactModule.useMemo(function() { return {current: {}}; }, [getState, navigation, setOptions, router, emitter]); const Object = global.Object; const assign = Object.assign; const actionCreators = router.actionCreators; const CommonActions = (Module01489Module).CommonActions; const env0_5 = Reflect.apply(assign, Object, [{}, actionCreators, CommonActions]); value2.current = state.routes.reduce(_fun17461, {}); return value2.current; function _fun17461(a0, a1) { // fn#17461, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1677:446, offset: 0x00e6daa1, size: 243 bytes, params: 3, frame: 24 var environment; var navigationBinding; var value2; var value3; var Object; var value5; var assign; var emitterBinding; const env0_0 = a0; const env0_1 = a1; const current = Module00077.current; let key = a1.key; const property = current[key]; if (property) { a0[a1.key] = property; } else { navigationBinding = navigation; navigationBinding.emit; value2 = environment.__proto__; value3 = env1_5(navigationBinding, env1_3); var withStack = function(a0) { var error; try { a0(); } catch (error) { throw error; } }; Object = global.Object; value5 = Object.keys(env0_5).reduce(_fun17464, {}); key = a1.key; Object = global.Object; assign = Object.assign; emitterBinding = emitter; a0[key] = Reflect.apply(assign, Object, [{}, value3, value5, emitterBinding.create(a1.key), {dispatch: dispatch_17467, getParent: getParent_17469, setOptions: setOptions_17470, isFocused: isFocused_17472}]); } return a0; function dispatch_17462(a0) { // fn#17462, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1677:526, offset: 0x00e6db94, size: 99 bytes, params: 2, frame: 16 var r5; var value2; var navigationBinding; var dispatch; var Object; let value = a0; if (typeof value !== 'function') { r5 = value; } else { value2 = environment.__proto__; value = value(getState()); r5 = value; } if (r5 != null) { value = environment.__proto__; navigationBinding = navigation; dispatch = navigationBinding.dispatch; Object = global.Object; Reflect.apply(dispatch, navigationBinding, [Object.assign({source: require.key}, r5)]); } } function _fun17464(a0, a1) { // fn#17464, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1677:705, offset: 0x00e6dc09, size: 23 bytes, params: 3, frame: 4 const env0_0 = a1; a0[a1] = _fun17465; return a0; function _fun17465() { // fn#17465, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1677:731, offset: 0x00e6dc20, size: 87 bytes, params: 1, frame: 15 var environment; var r1; var value5; let value = arguments.length; const Array = global.Array; const array = new Array(value); const value4 = 0; if (value4 < value) { for (r1 = value4; true; r1 = value5) { array[r1] = arguments[r1]; value5 = typeof r1 === 'bigint' ? r1 + 1n : +r1 + 1; if (!(value5 < value)) { break; } } } value = environment.__proto__; return withStack(_fun17466); function _fun17466() { // fn#17466, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1677:824, offset: 0x00e6dc77, size: 52 bytes, params: 1, frame: 14 let value = environment.__proto__.__proto__; const dispatch_17462Binding = dispatch_17462; value = environment.__proto__.__proto__.__proto__; const binding = env3_5; value = environment.__proto__; return dispatch_17462Binding(binding[require].apply(binding, env0_0)); } } } function dispatch_17467(a0) { // fn#17467, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1677:929, offset: 0x00e6dcab, size: 30 bytes, params: 2, frame: 11 const env0_0 = a0; return withStack(_fun17468); function _fun17468() { // fn#17468, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1677:960, offset: 0x00e6dcc9, size: 23 bytes, params: 1, frame: 11 return dispatch_17462(env0_0); } } function getParent_17469(a0) { // fn#17469, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1677:997, offset: 0x00e6dce0, size: 69 bytes, params: 2, frame: 12 return a0 === undefined ? env0_2.getParent(a0) : a0 === env0_2.getId() ? env0_0[require.key] : env0_2.getParent(a0); } function setOptions_17470(a0) { // fn#17470, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1677:1088, offset: 0x00e6dd25, size: 30 bytes, params: 2, frame: 11 const env0_0 = a0; return setOptions(_fun17471); function _fun17471(a0) { // fn#17471, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1677:1121, offset: 0x00e6dd43, size: 93 bytes, params: 2, frame: 20 const Object = global.Object; const assign = Object.assign; let value = environment.__proto__.__proto__.__proto__; const binding = env3_4; value = environment.__proto__; const key = require.key; const Object2 = global.Object; value = Object2.assign({}, a0[require.key], env0_0); value = binding({}, key, value); return Reflect.apply(assign, Object, [{}, a0, value]); } } function isFocused_17472() { // fn#17472, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1677:1215, offset: 0x00e6dda0, size: 81 bytes, params: 1, frame: 11 const value = environment.__proto__; const state = getState(); return state.routes[state.index].key === require.key && (navigation ? navigation.isFocused() : !navigation); } } } } global.__d(_fun17458, 1550, [77, 29, 31, 1506, 1489]) /* metro module 1550, dependencies: [77, 29, 31, 1506, 1489] */;