/* Metro module 11954; source: modules/keyboard/native/PortalKeyboardInlineComponent.ios.tsx; dependencies: [31, 27, 4502, 4022, 1851, 6996, 1583, 4594, 4023, 4015, 4026, 11577, 2] */ import UseSystemKeyboardHeightNative from './useSystemKeyboardHeight.native.tsx'; /* Metro dependency 1851 */ import UseKeyboardType from './useKeyboardType.tsx'; /* Metro dependency 4022 */ import AccessibilityStore from '../../a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */ import UseKeyboardIsOpen from './useKeyboardIsOpen.tsx'; /* Metro dependency 6996 */ 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 KeyboardTypesModule from './KeyboardTypes.tsx'; /* Metro dependency 1583 */ import * as UseKeyboardTypeModule from './useKeyboardType.tsx'; /* Metro dependency 4022 */ import * as PortalKeyboardUIStoreNativeModule from './PortalKeyboardUIStore.native.tsx'; /* Metro dependency 4023 */ import * as PortalKeyboardModule from './PortalKeyboard.tsx'; /* Metro dependency 4026 */ import * as UseKeyboardActionSheetHeightModule from '../../action_sheet/native/useKeyboardActionSheetHeight.tsx'; /* Metro dependency 11577 */ function _fun91730(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#91730, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12140:6, offset: 0x0206ff52, size: 201 bytes, params: 8, frame: 19 const env0_0 = require; const customKeyboardWillHide = function({viewHandle}) { var DCDChatManager = NativeModules.DCDChatManager; DCDChatManager.customKeyboardWillHide(viewHandle, 0.25, 7); }; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); let value = ReactModule; value = value.memo(InlinePortalKeyboard); (FileImportTrackerModule).fileFinishedImporting('modules/keyboard/native/PortalKeyboardInlineComponent.ios.tsx'); exports.default = value; function withChatViewHandle({current}, a1) { // fn#91732, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12140:260, offset: 0x02070051, size: 66 bytes, params: 3, frame: 13 var nodeHandle; const chatRef = current?.getChatRef(); if (chatRef != null) { nodeHandle = findNodeHandle(chatRef.current); if (nodeHandle != null) { a1(nodeHandle); } } } function InlinePortalKeyboard({channelId, messagesRef}) { // fn#91733, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12140:403, offset: 0x02070093, size: 341 bytes, params: 2, frame: 26 const binding = env0_3; const value2 = binding.useId(); const value3 = (UseKeyboardType)(); const value4 = (UseSystemKeyboardHeightNative)(); const value5 = (UseKeyboardIsOpen)({includeCustomKeyboard: false}); let value = UseKeyboardTypeModule; const useKeyboardContextForType = value.useKeyboardContextForType; const KeyboardTypes = (KeyboardTypesModule).KeyboardTypes; const SYSTEM = KeyboardTypes.SYSTEM; value = Reflect.apply(useKeyboardContextForType, value, [SYSTEM]); (importDefault(4594) /* metro dependency 4594: useMountEffect */)(function() { return _fun91735; }); const PortalKeyboardUIStore = (PortalKeyboardUIStoreNativeModule).PortalKeyboardUIStore; const value6 = PortalKeyboardUIStore.useField('keyboard'); const value7 = PortalKeyboardUIStore.useField('state'); const env0_7 = binding.useRef(false); binding.useLayoutEffect(_fun91736, [channelId, value2, value6, value7, value3, messagesRef, value, value4, value5]); return null; function _fun91734() { // fn#91734, offset: 0x020701e8, size: 11 bytes, params: 1, frame: 1 return _fun91735; function _fun91735() { // fn#91735, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12140:619, offset: 0x020701f3, size: 126 bytes, params: 1, frame: 14 let value = environment.__proto__.__proto__; const PortalKeyboardUIStore = (require(4023) /* metro dependency 4023: PortalKeyboardUIStoreNative */).PortalKeyboardUIStore; const field = PortalKeyboardUIStore.getField('keyboard'); if (field != null && field.handlerId === env1_1) { value = require(4015) /* metro dependency 4015: ChatInputUtils */; value.dismissKeyboard(); value = require(4023) /* metro dependency 4023: PortalKeyboardUIStoreNative */; value.closePortalKeyboard(); } } } function _fun91736() { // fn#91736, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12140:916, offset: 0x02070271, size: 413 bytes, params: 1, frame: 17 var environment; var binding; var handlerId; var value5; const PortalKeyboardState = (PortalKeyboardModule).PortalKeyboardState; var value6; const KeyboardTypes = (KeyboardTypesModule).KeyboardTypes; const closePortalKeyboardRequest = (require(4023) /* metro dependency 4023: PortalKeyboardUIStoreNative */).closePortalKeyboardRequest; if (ReactNativeModule.findNodeHandle != null) { handlerId = ReactNativeModule.findNodeHandle.handlerId; if (handlerId == null) { if (ReactNativeModule.findNodeHandle == null) { binding = env0_2; value6 = environment.__proto__; if (binding !== KeyboardTypes.SYSTEM) { return undefined; } if (ReactNativeModule.NativeModules.keyboardWillOpen) { if (env0_6 !== PortalKeyboardState.REQUEST_CLOSE) { var env0_0 = global.setTimeout(closePortalKeyboardRequest, 250); return _fun91737; } (require(4023) /* metro dependency 4023: PortalKeyboardUIStoreNative */).closePortalKeyboard(); withChatViewHandle(messagesRef, _fun91738); return undefined; } (require(4023) /* metro dependency 4023: PortalKeyboardUIStoreNative */).closePortalKeyboard(); withChatViewHandle(messagesRef, _fun91738); return undefined; } binding = env0_6; value5 = environment.__proto__; if (binding !== PortalKeyboardState.REQUEST_OPEN) { binding = env0_2; value6 = environment.__proto__; if (binding !== KeyboardTypes.SYSTEM) { return undefined; } if (ReactNativeModule.NativeModules.keyboardWillOpen) { if (env0_6 !== PortalKeyboardState.REQUEST_CLOSE) { var env0_0 = global.setTimeout(closePortalKeyboardRequest, 250); return _fun91737; } (require(4023) /* metro dependency 4023: PortalKeyboardUIStoreNative */).closePortalKeyboard(); withChatViewHandle(messagesRef, _fun91738); return undefined; } (require(4023) /* metro dependency 4023: PortalKeyboardUIStoreNative */).closePortalKeyboard(); withChatViewHandle(messagesRef, _fun91738); return undefined; } withChatViewHandle(messagesRef, _fun91739); return undefined; } handlerId = ReactNativeModule.findNodeHandle.handlerId; if (handlerId !== env0_1) { return undefined; } if (ReactNativeModule.findNodeHandle == null) { binding = env0_2; value6 = environment.__proto__; if (binding !== KeyboardTypes.SYSTEM) { return undefined; } if (ReactNativeModule.NativeModules.keyboardWillOpen) { if (env0_6 !== PortalKeyboardState.REQUEST_CLOSE) { var env0_0 = global.setTimeout(closePortalKeyboardRequest, 250); return _fun91737; } (require(4023) /* metro dependency 4023: PortalKeyboardUIStoreNative */).closePortalKeyboard(); withChatViewHandle(messagesRef, _fun91738); return undefined; } (require(4023) /* metro dependency 4023: PortalKeyboardUIStoreNative */).closePortalKeyboard(); withChatViewHandle(messagesRef, _fun91738); return undefined; } binding = env0_6; value5 = environment.__proto__; if (binding !== PortalKeyboardState.REQUEST_OPEN) { binding = env0_2; value6 = environment.__proto__; if (binding !== KeyboardTypes.SYSTEM) { return undefined; } if (ReactNativeModule.NativeModules.keyboardWillOpen) { if (env0_6 !== PortalKeyboardState.REQUEST_CLOSE) { var env0_0 = global.setTimeout(closePortalKeyboardRequest, 250); return _fun91737; } (require(4023) /* metro dependency 4023: PortalKeyboardUIStoreNative */).closePortalKeyboard(); withChatViewHandle(messagesRef, _fun91738); return undefined; } (require(4023) /* metro dependency 4023: PortalKeyboardUIStoreNative */).closePortalKeyboard(); withChatViewHandle(messagesRef, _fun91738); return undefined; } withChatViewHandle(messagesRef, _fun91739); } else if (!(env0_3 || !env0_7.current && !AccessibilityStore.systemPrefersCrossfades)) { withChatViewHandle(messagesRef, _fun91740); } function _fun91737() { // fn#91737, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12140:1217, offset: 0x016d7e7e, size: 24 bytes, params: 1, frame: 11 return global.clearTimeout(env0_0); } function _fun91738(a0) { // fn#91738, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12140:1289, offset: 0x0207040e, size: 41 bytes, params: 2, frame: 11 env1_7.current = false; customKeyboardWillHide({viewHandle: a0}); } function _fun91739(a0) { // fn#91739, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12140:1376, offset: 0x02070437, size: 148 bytes, params: 2, frame: 19 (PortalKeyboardUIStoreNativeModule).handlePortalKeyboardOpen(env1_1); env1_7.current = true; const object = {viewHandle: a0}; const getKeyboardActionSheetHeight = UseKeyboardActionSheetHeightModule.getKeyboardActionSheetHeight; object.height = Reflect.apply(getKeyboardActionSheetHeight, UseKeyboardActionSheetHeightModule, []).minimum; const viewHandle = object.viewHandle; const height = object.height; const DCDChatManager = NativeModules.DCDChatManager; DCDChatManager.customKeyboardWillShow(viewHandle, height, 0.25, 7); } function _fun91740(a0) { // fn#91740, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12140:1682, offset: 0x0207040e, size: 41 bytes, params: 2, frame: 11 env1_7.current = false; customKeyboardWillHide({viewHandle: a0}); } } } } global.__d(_fun91730, 11954, [31, 27, 4502, 4022, 1851, 6996, 1583, 4594, 4023, 4015, 4026, 11577, 2]) /* metro module 11954, dependencies: [31, 27, 4502, 4022, 1851, 6996, 1583, 4594, 4023, 4015, 4026, 11577, 2] */;