Initial commit

This commit is contained in:
janisslsm committed 2026-07-27 16:20:00 +03:00
commit af3b49f756
16065 files changed
+2938410

No files matched your search

@@ -0,0 +1,18 @@
/* Metro module 11278; source: modules/keyboard/native/AnimatedKeyboardExperiment.tsx; dependencies: [1854, 477, 2] */
function _fun86118(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86118, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11464:6, offset: 0x01f88684, size: 202 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = require(1854) /* metro dependency 1854: apex */;
value = value.createApexExperiment({'name': '2025-08-animated-keyboard-android', 'kind': 'user',
defaultConfig: {enabled: false}, variations: {[1]: {enabled: true}}});
const getConfig = value.getConfig;
const env0_2 = Reflect.apply(getConfig, value, [{location: 'isAnimatedKeyboardEnabled'}]).enabled;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/keyboard/native/AnimatedKeyboardExperiment.tsx');
exports.AnimatedKeyboardExperiment = value;
exports.isAnimatedAndroidKeyboard = function() {
var isAndroid = require(dependencyMap[1]).isAndroid();
return isAndroid ? enabled : !!isAndroid;
};
}
@@ -0,0 +1,9 @@
/* Metro module 13113; source: modules/keyboard/native/AnimatedKeyboardProvider.android.tsx; dependencies: [1597, 2, 13114] */
function _fun100216(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100216, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13303:6, offset: 0x021e1704, size: 120 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(importDefault(1597) /* metro dependency 1597: NativeSafeAreaInsetsModule */).setNavigationBarContrastEnforced(false);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/keyboard/native/AnimatedKeyboardProvider.android.tsx');
exports.default = importDefault(13114) /* metro dependency 13114: AnimatedKeyboardProviderController */;
}
@@ -0,0 +1,89 @@
/* Metro module 13114; source: modules/keyboard/native/AnimatedKeyboardProviderController.tsx; dependencies: [31, 33, 4017, 1599, 2] */
function _fun100217(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100217, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13304:6, offset: 0x021e177c, size: 298 bytes, params: 8, frame: 20
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const value = importAll(31) /* metro dependency 31 */;
const value2 = require(33) /* metro dependency 33 */;
const env0_2 = value2.jsx;
const env0_3 = value2.jsxs;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
let makeMutable = reanimatedRexportModule.makeMutable;
const mutable = Reflect.apply(makeMutable, reanimatedRexportModule, [0]);
const value4 = reanimatedRexportModule;
makeMutable = value4.makeMutable;
const KeyboardState = reanimatedRexportModule.KeyboardState;
const UNKNOWN = KeyboardState.UNKNOWN;
const mutable2 = Reflect.apply(makeMutable, value4, [UNKNOWN]);
object2 = {code: 'function AnimatedKeyboardProviderControllerTsx1(e){const{animatedKeyboardState,KeyboardState}=this.__closure;animatedKeyboardState.set(e.height===0?KeyboardState.CLOSED:KeyboardState.OPEN);}'};
object2 = {code: 'function AnimatedKeyboardProviderControllerTsx2(e){const{animatedKeyboardHeight}=this.__closure;animatedKeyboardHeight.set(e.height);}'};
object2 = {code: 'function AnimatedKeyboardProviderControllerTsx3(e){const{animatedKeyboardState,KeyboardState,animatedKeyboardHeight}=this.__closure;animatedKeyboardState.set(e.height===0?KeyboardState.CLOSED:KeyboardState.OPEN);animatedKeyboardHeight.set(e.height);}'};
const env0_9 = value.memo(_fun100218);
object2 = {Component: Component_100222, animatedKeyboardHeight: mutable, animatedKeyboardState: mutable2};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/keyboard/native/AnimatedKeyboardProviderController.tsx');
exports.default = object2;
}
function _fun100218() { // fn#100218, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13304:837, offset: 0x021e18a6, size: 258 bytes, params: 1, frame: 23
const moduleValue = require(1599) /* metro dependency 1599 */;
const useKeyboardHandler = moduleValue.useKeyboardHandler;
const object3 = {};
let closure = onStart_100219;
const object4 = {};
const binding = env0_5;
object4.animatedKeyboardState = binding;
const KeyboardState = (require(4017) /* metro dependency 4017: ReanimatedRexport */).KeyboardState;
object4.KeyboardState = KeyboardState;
closure.__closure = object4;
closure.__workletHash = 12130162639136;
closure.__initData = env0_6;
object3.onStart = closure;
closure = onMove_100220;
const binding2 = env0_4;
closure.__closure = {animatedKeyboardHeight: binding2};
closure.__workletHash = 1398293011995;
closure.__initData = env0_7;
object3.onMove = closure;
closure = onEnd_100221;
closure.__closure = {animatedKeyboardState: binding, KeyboardState: KeyboardState, animatedKeyboardHeight: binding2};
closure.__workletHash = 10688534401196;
closure.__initData = env0_8;
object3.onEnd = closure;
Reflect.apply(useKeyboardHandler, moduleValue, [object3, []]);
return null;
}
function Component_100222({children}) { // fn#100222, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13304:1528, offset: 0x021e1aaa, size: 97 bytes, params: 2, frame: 17
const KeyboardProvider = (require(1599) /* metro dependency 1599 */).KeyboardProvider;
return (
<KeyboardProvider
enabled
navigationBarTranslucent
preserveEdgeToEdge
statusBarTranslucent
>
{children}
{((Component) => <Component />)(env0_9)}
</KeyboardProvider>
);
}
function onStart_100219({height}) { // fn#100219, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13304:904, offset: 0x021e19a8, size: 105 bytes, params: 2, frame: 14
const KeyboardState = (require(4017) /* metro dependency 4017: ReanimatedRexport */).KeyboardState;
const binding = env1_5;
binding.set(height === 0 ? KeyboardState.CLOSED : KeyboardState.OPEN);
}
function onMove_100220({height}) { // fn#100220, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13304:1125, offset: 0x021e1a11, size: 29 bytes, params: 2, frame: 11
env1_4.set(height);
}
function onEnd_100221(a0) { // fn#100221, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13304:1250, offset: 0x021e1a2e, size: 124 bytes, params: 2, frame: 16
const KeyboardState = (require(4017) /* metro dependency 4017: ReanimatedRexport */).KeyboardState;
let binding = env1_5;
binding.set(a0.height === 0 ? KeyboardState.CLOSED : KeyboardState.OPEN);
binding = env1_4;
binding.set(a0.height);
}
@@ -0,0 +1,11 @@
/* Metro module 1584; source: modules/keyboard/native/ChatInputFocused.tsx; dependencies: [2] */
function _fun17602(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#17602, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1711:6, offset: 0x00e71009, size: 102 bytes, params: 8, frame: 16
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/keyboard/native/ChatInputFocused.tsx');
exports.setIsAnyChatInputFocused = function(a0) {
env0_0 = a0;
};
exports.getIsAnyChatInputFocused = getIsAnyChatInputFocused;
}
@@ -0,0 +1,223 @@
/* Metro module 13115; source: modules/keyboard/native/KeyCommandsView.tsx; dependencies: [57, 31, 33, 4501, 13116, 2] */
function _fun100223(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100223, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13305:6, offset: 0x021e1b0b, size: 278 bytes, params: 8, frame: 21
const _arrayLikeToArray_100226 = function(a0, a1) {
var r0;
var r1;
var r2;
var value3;
var length;
var value5;
var value = undefined;
var value2 = value == null;
reducibleJoin2: while (true) {
if (value2) {
r0 = value2;
break reducibleJoin2;
}
value3 = value > a0.length;
r0 = value3;
break reducibleJoin2;
}
reducibleJoin4: while (true) {
if (r0) {
length = a0.length;
r1 = length;
break reducibleJoin4;
}
r1 = value;
break reducibleJoin4;
}
value = (0, global.Array)(r1);
var value4 = 0;
if (value4 < r1) {
r2 = value4;
reducibleLoop5: while (true) {
value[r2] = a0[r2];
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
if (value5 < r1) {
r2 = value5;
continue reducibleLoop5;
}
break reducibleLoop5;
}
}
return value;
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
const env0_5 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({viewDefaults: {flex: 1}});
const env0_6 = value.createContext({keyCommands: [], addKeyCommand: function() {
}, removeKeyCommand: function() {
}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/keyboard/native/KeyCommandsView.tsx');
exports.default = KeyCommandsView;
exports.useKeyCommands = useKeyCommands;
}
function _createForOfIteratorHelperLoose_100224(a0, a1) { // fn#100224, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13305:136, offset: 0x021e1c21, 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)) {
if (r1) {
}
return _fun100225;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_100226(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') {
value = _arrayLikeToArray_100226(a0, value);
r6 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_100226(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun100225;
}
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 KeyCommandsView(a0) { // fn#100229, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13305:1263, offset: 0x021e1d95, size: 304 bytes, params: 2, frame: 23
const style = a0.style;
const value = Object.create(null);
value.style = 0;
const value2 = copyDataProperties({}, a0, value, undefined);
const styles = useStyles();
const binding = env0_3;
const [property, env0_1] = env0_2(binding.useState([]), 2);
const value8 = binding.useMemo(_fun100235, [property, binding.useCallback(_fun100230, []),
binding.useCallback(_fun100232, [])]);
const Provider = env0_6.Provider;
return (
<Provider value={value8}>
{((Component) => <Component {...value2} {...{['style']: [styles.viewDefaults,
style]}} {...{['keyCommands']: property}} {...{['onKeyCommand']: KeyCommandsViewOnKeyCommand}} />)(importDefault(13116) /* metro dependency 13116: KeyCommandsNativeComponent */)}
</Provider>
);
}
function useKeyCommands(a0) { // fn#100238, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13305:1768, offset: 0x021e1fae, size: 89 bytes, params: 2, frame: 16
const env0_0 = a0;
const binding = env0_3;
const value = binding.useContext(env0_6);
binding.useEffect(_fun100239, [value.addKeyCommand, value.removeKeyCommand, a0]);
}
function _fun100230(a0) { // fn#100230, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13305:1371, offset: 0x021e1ec5, size: 32 bytes, params: 2, frame: 11
const env0_0 = a0;
env0_1(_fun100231);
}
function _fun100232(a0) { // fn#100232, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13305:1415, offset: 0x021e1ee5, size: 32 bytes, params: 2, frame: 11
const env0_0 = a0;
env0_1(function(a0) {
return a0.filter(_fun100234);
});
}
function _fun100235() { // fn#100235, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13305:1477, offset: 0x021e1f33, size: 34 bytes, params: 1, frame: 3
return {keyCommands: env0_0, addKeyCommand: env0_2, removeKeyCommand: env0_3};
}
function KeyCommandsViewOnKeyCommand({nativeEvent}) { // fn#100236, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13305:1650, owner: KeyCommandsView.onKeyCommand, offset: 0x021e1f55, size: 61 bytes, params: 2, frame: 12
const value = nativeEvent.find(function({eventName}) {
return eventName === nativeEvent.eventName;
});
if (value != null) {
value.onKeyCommand(nativeEvent);
}
}
function _fun100239() { // fn#100239, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13305:1869, offset: 0x021e2007, size: 73 bytes, params: 1, frame: 14
var r1;
var value4;
var value5;
const value2 = _createForOfIteratorHelperLoose_100224(env0_0);
const value3 = value2();
let done = value3.done;
if (!done) {
for (r1 = value3; true; r1 = value5) {
value4 = r1.value;
addKeyCommand(value4);
value5 = value2();
done = value5.done;
if (done) {
break;
}
}
}
return _fun100240;
}
function _fun100233(a0) { // fn#100233, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13305:1422, offset: 0x021e1f05, size: 24 bytes, params: 2, frame: 11
return a0.filter(_fun100234);
}
function _fun100240() { // fn#100240, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13305:1962, offset: 0x021e2050, size: 70 bytes, params: 1, frame: 14
var r2;
var value4;
var removeKeyCommandBinding;
var eventName;
var value5;
const value2 = _createForOfIteratorHelperLoose_100224(env1_0);
const value3 = value2();
let done = value3.done;
if (!done) {
for (r2 = value3; true; r2 = value5) {
value4 = r2.value;
removeKeyCommandBinding = removeKeyCommand;
eventName = value4.eventName;
removeKeyCommandBinding(eventName);
value5 = value2();
done = value5.done;
if (done) {
break;
}
}
}
}
function _fun100234({eventName}) { // fn#100234, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13305:1435, offset: 0x021e1f1d, size: 22 bytes, params: 2, frame: 2
return eventName !== env1_0;
}
@@ -0,0 +1,109 @@
/* Metro module 5467; source: modules/keyboard/native/KeyboardAwareView.tsx; dependencies: [57, 31, 27, 1480, 33, 1851, 4022, 1583, 5466, 5464, 5465, 2] */
function _fun48049(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#48049, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5645:6, offset: 0x011d8449, size: 218 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_4 = value2.View;
const env0_5 = value2.StyleSheet;
const subscribeToKeyboardUIStore = importDefault(1480) /* metro dependency 1480: subscribeToKeyboardUIStore */;
const env0_7 = (require(33) /* metro dependency 33 */).jsx;
value = value.memo(KeyboardAwareView);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/keyboard/native/KeyboardAwareView.tsx');
exports.default = value;
}
function getKeyboardHeightWithOffset(a0) { // fn#48050, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5645:174, offset: 0x011d8523, size: 162 bytes, params: 2, frame: 19
var r0;
var r4;
const Math = global.Math;
const max = Math.max;
var value;
const systemKeyboardHeight = (require(1851) /* metro dependency 1851: useSystemKeyboardHeightNative */).getSystemKeyboardHeight();
const value3 = 0;
if (value3 !== systemKeyboardHeight) {
r4 = systemKeyboardHeight;
} else {
if ((require(4022) /* metro dependency 4022: useKeyboardType */).getKeyboardType() === (require(1583) /* metro dependency 1583: KeyboardTypes */).KeyboardTypes.SYSTEM) {
r0 = value3;
} else {
value = require(5466) /* metro dependency 5466: useCustomKeyboardHeight */;
value = value.getCustomKeyboardHeight();
r0 = value;
}
r4 = r0;
}
return Reflect.apply(max, Math, [value3, r4 + a0]);
}
function KeyboardAwareView({style, children, pointerEvents, animated, keyboardHeightOffset}) { // fn#48051, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5645:429, offset: 0x011d85c5, size: 283 bytes, params: 2, frame: 21
animated = animated === undefined || animated;
keyboardHeightOffset = keyboardHeightOffset === undefined ? 0 : keyboardHeightOffset;
const env0_2 = keyboardHeightOffset;
const binding = undefined;
const value2 = binding.useRef(getKeyboardHeightWithOffset(keyboardHeightOffset));
const useState = binding.useState;
const value4 = env0_2(Reflect.apply(useState, binding, [value2.current]), 2);
const property = value4[0];
const env0_5 = value4[1];
binding.useEffect(function() {
return subscribeToKeyboardUIStore(_fun48053);
}, [keyboardHeightOffset]);
const env0_6 = binding.useRef(false);
binding.useEffect(_fun48054, [animated, property]);
return (
<View style={binding.useMemo(_fun48055, [property, style])} pointerEvents={pointerEvents}>
{children}
</View>
);
}
function _fun48052() { // fn#48052, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5645:640, offset: 0x011d86e0, size: 23 bytes, params: 1, frame: 11
return subscribeToKeyboardUIStore(_fun48053);
}
function _fun48054() { // fn#48054, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5645:764, offset: 0x011d872e, size: 115 bytes, params: 1, frame: 13
var value2;
var keyboardDuration;
if (env0_6.current) {
value2 = environment.__proto__;
keyboardDuration = (require(5464) /* metro dependency 5464: useKeyboardDuration */).getKeyboardDuration();
if (animated && keyboardDuration > 0) {
(require(5465) /* metro dependency 5465: DeprecatedLayoutAnimation */).DeprecatedLayoutAnimationKeyboard(keyboardDuration);
}
} else {
env0_6.current = true;
}
}
function _fun48055() { // fn#48055, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5645:917, offset: 0x011d87a1, size: 129 bytes, params: 1, frame: 14
var r0;
var object2;
if (style == null) {
return {marginBottom: env0_4};
}
const value3 = StyleSheet.flatten(style);
if (typeof value3.marginBottom === 'number') {
object2 = {};
copyDataProperties(object2, value3, undefined);
object2['marginBottom'] = value3.marginBottom + env0_4;
r0 = object2;
} else {
object2 = {};
copyDataProperties(object2, value3, undefined);
object2['marginBottom'] = env0_4;
r0 = object2;
}
return r0;
}
function _fun48053() { // fn#48053, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5645:647, offset: 0x011d86f7, size: 55 bytes, params: 1, frame: 12
const keyboardHeightWithOffset = getKeyboardHeightWithOffset(keyboardHeightOffset);
if (env1_3.current !== keyboardHeightWithOffset) {
env1_3.current = keyboardHeightWithOffset;
env1_5(keyboardHeightWithOffset);
}
}
@@ -0,0 +1,8 @@
/* Metro module 1583; source: modules/keyboard/native/KeyboardTypes.tsx; dependencies: [2] */
function _fun17601(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#17601, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1710:6, offset: 0x00e70f8d, size: 124 bytes, params: 8, frame: 16
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/keyboard/native/KeyboardTypes.tsx');
exports.KeyboardTypes = {SYSTEM: 'system', EXPRESSION: 'expression', MEDIA: 'media', APP_LAUNCHER: 'app_launcher'};
}
@@ -0,0 +1,457 @@
/* Metro module 1482; source: modules/keyboard/native/KeyboardUIStore.native.tsx; dependencies: [1483, 1346, 1580, 587, 1583, 1584, 1585, 477, 1597, 628, 690, 1598, 629, 1599, 1847, 1848, 1586, 1481, 2] */
function _fun16964(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#16964, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1609:6, offset: 0x00e600ae, size: 522 bytes, params: 8, frame: 23
const env0_0 = require;
const _arrayLikeToArray_16967 = function(a0, a1) {
var r0;
var r1;
var r2;
var value3;
var length;
var value5;
var value = undefined;
var value2 = value == null;
reducibleJoin2: while (true) {
if (value2) {
r0 = value2;
break reducibleJoin2;
}
value3 = value > a0.length;
r0 = value3;
break reducibleJoin2;
}
reducibleJoin4: while (true) {
if (r0) {
length = a0.length;
r1 = length;
break reducibleJoin4;
}
r1 = value;
break reducibleJoin4;
}
value = (0, global.Array)(r1);
var value4 = 0;
if (value4 < r1) {
r2 = value4;
reducibleLoop5: while (true) {
value[r2] = a0[r2];
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
if (value5 < r1) {
r2 = value5;
continue reducibleLoop5;
}
break reducibleLoop5;
}
}
return value;
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(1483) /* metro dependency 1483: AppLauncherNativeConstants */).AppLauncherRouteName;
const env0_4 = (require(1346) /* metro dependency 1346: ExpressionPickerConstants */).ExpressionPickerViewType;
const env0_5 = (require(1580) /* metro dependency 1580: MediaKeyboardConstants */).MediaKeyboardTarget;
let Set = global.Set;
let set = new Set();
Set = global.Set;
set = new Set();
set = require(477) /* metro dependency 477: PlatformUtils */;
set = set.isAndroid();
const r12 = set ? 'keyboardDidShow' : 'keyboardWillShow';
set = require(477) /* metro dependency 477: PlatformUtils */;
set = set.isAndroid();
const r10 = set ? 'keyboardDidHide' : 'keyboardWillHide';
set = require(629) /* metro dependency 629 */;
set = set.create(function() {
var object2 = {};
var createInitialEntryStateBinding = createInitialEntryState;
object2.main = createInitialEntryStateBinding('main');
object2.share = createInitialEntryStateBinding('share');
return {byAppEntry: object2};
});
const KeyboardEvents = (require(1599) /* metro dependency 1599 */).KeyboardEvents;
KeyboardEvents.addListener(r12, _fun16976);
KeyboardEvents.addListener(r10, _fun16978);
(importDefault(1586) /* metro dependency 1586: SafeAreaStoreNative */).subscribe(function() {
updateKeyboardStoreState({});
});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/keyboard/native/KeyboardUIStore.native.tsx');
exports.default = set;
exports.setKeyboardType = setKeyboardType;
exports.addKeyboardWillOpenChangedListener = addKeyboardWillOpenChangedListener;
exports.addKeyboardTypeChangedListener = addKeyboardTypeChangedListener;
}
function _createForOfIteratorHelperLoose_16965(a0, a1) { // fn#16965, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1609:199, offset: 0x00e602b8, size: 370 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)) {
if (r1) {
}
return _fun16966;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_16967(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') {
value = _arrayLikeToArray_16967(a0, value);
r6 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_16967(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun16966;
}
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 getCustomKeyboardHeight(a0, a1, a2, a3) { // fn#16968, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1609:1158, offset: 0x00e6042a, size: 312 bytes, params: 5, frame: 20
var bottom;
var value5;
var value;
const Storage = (require(587) /* metro dependency 587: Storage */).Storage;
const value2 = 253;
const r1 = Storage.get(env0_6, value2) ?? value2;
const KeyboardTypes = (require(1583) /* metro dependency 1583: KeyboardTypes */).KeyboardTypes;
const SYSTEM = KeyboardTypes.SYSTEM;
if (a1 === SYSTEM) {
var value4 = 0;
if (value4 === a0) {
if (a2) {
value = require(1585) /* metro dependency 1585: useSafeAreaInsetsNative */;
bottom = value.getSafeAreaInsets(a3).bottom;
} else {
bottom = 0;
}
return r1 - bottom;
}
var moduleValue = require(1584) /* metro dependency 1584: ChatInputFocused */;
var getIsAnyChatInputFocused = moduleValue.getIsAnyChatInputFocused;
if (Reflect.apply(getIsAnyChatInputFocused, moduleValue, [])) {
value5 = global.Math.max(a0, 200);
if (value5 !== r1) {
Storage.set(env0_6, value5);
}
if (a2) {
value = require(1585) /* metro dependency 1585: useSafeAreaInsetsNative */;
bottom = value.getSafeAreaInsets(a3).bottom;
} else {
bottom = value4;
}
return value5 - bottom;
}
}
if (a2) {
value = require(1585) /* metro dependency 1585: useSafeAreaInsetsNative */;
bottom = value.getSafeAreaInsets(a3).bottom;
} else {
bottom = 0;
}
return r1 - bottom;
}
function getSystemKeyboardHeight({keyboardHeight, excludeSafeAreaInsets, appEntryKey}) { // fn#16969, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1609:1617, offset: 0x00e60562, size: 146 bytes, params: 2, frame: 19
var bottom;
var r0;
var value2;
var value;
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (platformUtilsModule.isAndroid()) {
value = importDefault(1597) /* metro dependency 1597: NativeSafeAreaInsetsModule */;
value = value.getImeInsets(excludeSafeAreaInsets, appEntryKey);
r0 = value;
} else {
value2 = 0;
if (value2 === keyboardHeight) {
r0 = value2;
} else {
if (excludeSafeAreaInsets) {
value = require(1585) /* metro dependency 1585: useSafeAreaInsetsNative */;
bottom = value.getSafeAreaInsets(appEntryKey).bottom;
} else {
bottom = value2;
}
value = keyboardHeight - bottom;
r0 = value;
}
}
return r0;
}
function computeEntryState(a0, a1, a2) { // fn#16970, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1609:1815, offset: 0x00e605f4, size: 718 bytes, params: 4, frame: 31
var object4;
var systemKeyboardOpen;
var r6;
var object3;
const value = a0;
let keyboardDuration = a1.keyboardDuration;
keyboardDuration = keyboardDuration ?? value.keyboardDuration;
let getSystemKeyboardHeightBinding = getSystemKeyboardHeight;
let keyboardHeight = a1.keyboardHeight;
keyboardHeight = keyboardHeight ?? value.keyboardHeight;
const value3 = undefined;
const systemKeyboardHeightBinding = getSystemKeyboardHeightBinding({keyboardHeight: keyboardHeight,
excludeSafeAreaInsets: false, appEntryKey: a2});
getSystemKeyboardHeightBinding = getSystemKeyboardHeight;
object4 = {};
keyboardHeight = a1.keyboardHeight;
keyboardHeight = keyboardHeight ?? value.keyboardHeight;
object4.keyboardHeight = keyboardHeight;
object4.excludeSafeAreaInsets = true;
object4.appEntryKey = a2;
const systemKeyboardHeightBinding2 = getSystemKeyboardHeightBinding(object4);
let keyboardType = a1.keyboardType;
const r5 = (keyboardType == null ? value3 : keyboardType.type) ?? value.keyboardType;
const r4 = r5 !== value.keyboardType ? value.keyboardType : value.keyboardTypePrevious;
const getCustomKeyboardHeightBinding = getCustomKeyboardHeight;
const customKeyboardHeightBinding = getCustomKeyboardHeightBinding(systemKeyboardHeightBinding, r5, false, a2);
const customKeyboardHeightBinding2 = getCustomKeyboardHeightBinding(systemKeyboardHeightBinding, r5, true, a2);
let keyboardContexts = value.keyboardContexts;
const property = keyboardContexts[r5];
keyboardType = a1.keyboardType;
const r13 = (keyboardType == null ? value3 : keyboardType.context) ?? property;
let r10 = typeof property !== 'object' ? property !== r13 : typeof r13 === 'object' ? !(importDefault(628) /* metro dependency 628: shallowEqual */)(property,
r13) : property !== r13;
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (platformUtilsModule.isAndroid()) {
r6 = systemKeyboardHeightBinding > 0;
} else {
systemKeyboardOpen = a1.systemKeyboardOpen;
systemKeyboardOpen = systemKeyboardOpen ?? value.systemKeyboardOpen;
r6 = systemKeyboardOpen;
}
keyboardContexts = value.keyboardContexts;
const KeyboardTypes = (require(1583) /* metro dependency 1583: KeyboardTypes */).KeyboardTypes;
let SYSTEM = KeyboardTypes.SYSTEM;
if (keyboardContexts[SYSTEM].keyboardWillOpen) {
if (a1.systemKeyboardOpen != null) {
object4 = {};
keyboardContexts = value.keyboardContexts;
copyDataProperties(object4, keyboardContexts, true);
SYSTEM = KeyboardTypes.SYSTEM;
object3 = {};
keyboardContexts = value.keyboardContexts;
copyDataProperties(object3, keyboardContexts[KeyboardTypes.SYSTEM], true);
object3['keyboardWillOpen'] = false;
object4[SYSTEM] = object3;
r10 = object4;
} else {
keyboardContexts = value.keyboardContexts;
if (r10) {
object4 = {};
copyDataProperties(object4, keyboardContexts, true);
object4[r5] = r13;
r10 = object4;
} else {
r10 = keyboardContexts;
}
}
} else {
keyboardContexts = value.keyboardContexts;
if (r10) {
object4 = {};
copyDataProperties(object4, keyboardContexts, true);
object4[r5] = r13;
r10 = object4;
} else {
r10 = keyboardContexts;
}
}
return value.keyboardDuration !== keyboardDuration ? {keyboardContexts: r10, keyboardDuration: keyboardDuration,
keyboardHeight: systemKeyboardHeightBinding,
keyboardHeightExcludingSafeAreaInsets: systemKeyboardHeightBinding2, systemKeyboardOpen: r6, keyboardType: r5,
keyboardTypePrevious: r4, customKeyboardHeight: customKeyboardHeightBinding,
customKeyboardHeightExcludingSafeAreaInsets: customKeyboardHeightBinding2} : (importDefault(628) /* metro dependency 628: shallowEqual */)(value.keyboardContexts,
r10) ? value.keyboardHeight !== systemKeyboardHeightBinding || value.keyboardHeightExcludingSafeAreaInsets !== systemKeyboardHeightBinding2 || (value.keyboardType !== r5 || value.customKeyboardHeight !== customKeyboardHeightBinding) || value.customKeyboardHeightExcludingSafeAreaInsets !== customKeyboardHeightBinding2 ? {keyboardContexts: r10,
keyboardDuration: keyboardDuration, keyboardHeight: systemKeyboardHeightBinding,
keyboardHeightExcludingSafeAreaInsets: systemKeyboardHeightBinding2, systemKeyboardOpen: r6, keyboardType: r5,
keyboardTypePrevious: r4, customKeyboardHeight: customKeyboardHeightBinding,
customKeyboardHeightExcludingSafeAreaInsets: customKeyboardHeightBinding2} : value.systemKeyboardOpen === r6 ? value : {keyboardContexts: r10,
keyboardDuration: keyboardDuration, keyboardHeight: systemKeyboardHeightBinding,
keyboardHeightExcludingSafeAreaInsets: systemKeyboardHeightBinding2, systemKeyboardOpen: r6, keyboardType: r5,
keyboardTypePrevious: r4, customKeyboardHeight: customKeyboardHeightBinding,
customKeyboardHeightExcludingSafeAreaInsets: customKeyboardHeightBinding2} : {keyboardContexts: r10,
keyboardDuration: keyboardDuration, keyboardHeight: systemKeyboardHeightBinding,
keyboardHeightExcludingSafeAreaInsets: systemKeyboardHeightBinding2, systemKeyboardOpen: r6, keyboardType: r5,
keyboardTypePrevious: r4, customKeyboardHeight: customKeyboardHeightBinding,
customKeyboardHeightExcludingSafeAreaInsets: customKeyboardHeightBinding2};
}
function updateKeyboardStoreState(a0, a1) { // fn#16971, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1609:3366, offset: 0x00e608c2, size: 59 bytes, params: 3, frame: 12
const env0_0 = a0;
const env0_1 = a1;
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun16972);
}
function createInitialEntryState(a0) { // fn#16974, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1609:3684, offset: 0x00e609df, size: 391 bytes, params: 2, frame: 24
const object2 = {};
const getCustomKeyboardHeightBinding = getCustomKeyboardHeight;
const KeyboardTypes = (require(1583) /* metro dependency 1583: KeyboardTypes */).KeyboardTypes;
let SYSTEM = KeyboardTypes.SYSTEM;
object2.customKeyboardHeight = getCustomKeyboardHeightBinding(0, SYSTEM, false, a0);
SYSTEM = KeyboardTypes.SYSTEM;
object2.customKeyboardHeightExcludingSafeAreaInsets = getCustomKeyboardHeightBinding(0, SYSTEM, true, a0);
SYSTEM = KeyboardTypes.SYSTEM;
const EXPRESSION = KeyboardTypes.EXPRESSION;
const EMOJI = ExpressionPickerViewType.EMOJI;
const MEDIA = KeyboardTypes.MEDIA;
const CHAT = MediaKeyboardTarget.CHAT;
const APP_LAUNCHER = KeyboardTypes.APP_LAUNCHER;
const HOME = AppLauncherRouteName.HOME;
object2.keyboardContexts = {[SYSTEM]: {keyboardWillOpen: false}, [EXPRESSION]: EMOJI, [MEDIA]: {target: CHAT},
[APP_LAUNCHER]: {initialRouteName: HOME}};
object2.keyboardDuration = 0;
const getSystemKeyboardHeightBinding = getSystemKeyboardHeight;
object2.keyboardHeight = getSystemKeyboardHeightBinding({'keyboardHeight': 0, 'excludeSafeAreaInsets': false,
appEntryKey: a0});
object2.keyboardHeightExcludingSafeAreaInsets = getSystemKeyboardHeightBinding({'keyboardHeight': 0,
'excludeSafeAreaInsets': true, appEntryKey: a0});
object2.systemKeyboardOpen = false;
SYSTEM = KeyboardTypes.SYSTEM;
object2.keyboardType = SYSTEM;
SYSTEM = KeyboardTypes.SYSTEM;
object2.keyboardTypePrevious = SYSTEM;
return object2;
}
function _fun16976({duration, height}) { // fn#16976, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1609:4662, offset: 0x00e60b96, size: 134 bytes, params: 2, frame: 17
(importDefault(1847) /* metro dependency 1847: KeyboardStateDebugging */).reactNativeKeyboardDidShow(height,
'KeyboardUIStore');
updateKeyboardStoreState({keyboardHeight: height, keyboardDuration: duration, systemKeyboardOpen: true});
(require(1848) /* metro dependency 1848: KeyboardManagerUtils */).onKeyboardChanged(true);
env0_8.forEach(function(a0) {
return a0(false);
});
}
function _fun16978() { // fn#16978, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1609:4928, offset: 0x00e60c2a, size: 113 bytes, params: 1, frame: 14
(importDefault(1847) /* metro dependency 1847: KeyboardStateDebugging */).reactNativeKeyboardDidHide('KeyboardUIStore');
updateKeyboardStoreState({'keyboardHeight': 0, 'systemKeyboardOpen': false});
(require(1848) /* metro dependency 1848: KeyboardManagerUtils */).onKeyboardChanged(false);
env0_8.forEach(function(a0) {
return a0(false);
});
}
function setKeyboardType(a0) { // fn#16981, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1609:5295, offset: 0x00e60cad, size: 111 bytes, params: 2, frame: 17
const value = a1;
const env0_0 = a0;
const r3 = value !== undefined ? value : (require(1481) /* metro dependency 1481: AppEntryKeyContext */).DEFAULT_APP_ENTRY_KEY;
env0_7.forEach(_fun16982);
env0_8.forEach(_fun16983);
updateKeyboardStoreState({keyboardType: a0}, r3);
}
function addKeyboardWillOpenChangedListener(a0) { // fn#16984, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1609:5593, offset: 0x00e60d83, size: 33 bytes, params: 2, frame: 12
const env0_0 = a0;
env0_8.add(a0);
return _fun16985;
}
function addKeyboardTypeChangedListener(a0) { // fn#16986, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1609:5707, offset: 0x00e60dbe, size: 33 bytes, params: 2, frame: 12
const env0_0 = a0;
env0_7.add(a0);
return _fun16987;
}
function _fun16972() { // fn#16972, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1609:3429, offset: 0x00e608fd, size: 27 bytes, params: 1, frame: 11
return env1_9.setState(_fun16973);
}
function _fun16983(a0) { // fn#16983, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1609:5391, offset: 0x00e60d1c, size: 103 bytes, params: 2, frame: 15
const type = env0_0.type;
const value3 = undefined;
const KeyboardTypes = (require(1583) /* metro dependency 1583: KeyboardTypes */).KeyboardTypes;
const SYSTEM = KeyboardTypes.SYSTEM;
return a0(type === SYSTEM && (env0_0.context == null ? value3 : env0_0.context.keyboardWillOpen) === true, env0_1);
}
function _fun16985() { // fn#16985, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1609:5656, offset: 0x00e60da4, size: 26 bytes, params: 1, frame: 11
return env1_8.delete(env0_0);
}
function _fun16987() { // fn#16987, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1609:5766, offset: 0x00e60ddf, size: 26 bytes, params: 1, frame: 11
return env1_7.delete(env0_0);
}
function _fun16973(a0) { // fn#16973, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1609:3445, offset: 0x00e60918, size: 199 bytes, params: 2, frame: 23
var r4;
var r9;
var r2;
var object2;
var value7;
var property;
var entryState;
var value8;
const value = a0;
let r3 = require != null ? [require] : (require(1598) /* metro dependency 1598: AppEntryKey */).APP_ENTRY_KEYS;
const byAppEntry = value.byAppEntry;
const value5 = _createForOfIteratorHelperLoose_16965(r3);
const value6 = value5();
let done = value6.done;
if (done) {
r2 = byAppEntry;
} else {
r3 = byAppEntry;
r4 = value6;
while (true) {
value7 = r4.value;
property = r3[value7];
entryState = computeEntryState(property, env1_0, value7);
if (property === entryState) {
r9 = r3;
} else {
object2 = {};
copyDataProperties(object2, r3, undefined);
object2[value7] = entryState;
r9 = object2;
}
value8 = value5();
done = value8.done;
if (done) {
r2 = r9;
break;
}
r3 = r9;
r4 = value8;
continue;
}
}
return r2 === value.byAppEntry ? value : {byAppEntry: r2};
}
@@ -0,0 +1,41 @@
/* Metro module 4026; source: modules/keyboard/native/PortalKeyboard.tsx; dependencies: [31, 33, 4007, 477, 4027, 2] */
function _fun33203(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#33203, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4184:6, offset: 0x01029b53, size: 248 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_2 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/keyboard/native/PortalKeyboard.tsx');
exports.PortalKeyboardState = {EMPTY: 'empty', REQUEST_OPEN: 'request_open', OPENING: 'opening', OPEN: 'open',
REQUEST_CLOSE: 'request_close', CLOSING: 'closing', CLOSED: 'closed'};
exports.PORTAL_HOST_NAME_DEFAULT = 'default';
exports.PORTAL_HOST_NAME_MODAL = 'modal';
exports.PortalKeyboard = PortalKeyboard;
exports.PortalKeyboardHost = PortalKeyboardHost;
}
function PortalKeyboard({children}) { // fn#33204, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4184:491, offset: 0x01029c4b, size: 142 bytes, params: 2, frame: 17
var r5;
var moduleValue2;
const value2 = (require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */).useIsModalOpen();
const value3 = 'default';
if (value2) {
moduleValue2 = require(477) /* metro dependency 477: PlatformUtils */;
r5 = moduleValue2.isIOS() ? 'modal' : value3;
} else {
r5 = value3;
}
const Portal = (require(4027) /* metro dependency 4027 */).Portal;
return (
<Portal hostName={r5}>
{children}
</Portal>
);
}
function PortalKeyboardHost({name}) { // fn#33205, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4184:652, offset: 0x01029cd9, size: 65 bytes, params: 2, frame: 15
name = name === undefined ? 'default' : name;
const PortalHost = (require(4027) /* metro dependency 4027 */).PortalHost;
return <PortalHost name={name} />;
}
@@ -0,0 +1,343 @@
/* Metro module 11620; source: modules/keyboard/native/PortalKeyboardBottomSheet.tsx; dependencies: [57, 31, 27, 10738, 33, 477, 4501, 697, 8554, 4559, 11621, 4508, 6514, 566, 6277, 4081, 10915, 4017, 1848, 4594, 1585, 1478, 4027, 4556, 8575, 5462, 2] */
function _fun89063(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#89063, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11806:6, offset: 0x01ffd372, size: 630 bytes, params: 8, frame: 24
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
value2.Platform;
const env0_5 = value2.View;
const nativeMenuStore = importDefault(10738) /* metro dependency 10738: NativeMenuStore */;
const value3 = require(33) /* metro dependency 33 */;
const env0_7 = value3.jsx;
const env0_8 = value3.jsxs;
const env0_9 = (require(477) /* metro dependency 477: PlatformUtils */).isIOS();
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {container: {'position': 'absolute', 'top': 0, 'left': 0}};
let MOBILE_KEYBOARD_PANEL_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_KEYBOARD_PANEL_BACKGROUND;
object2.background = {backgroundColor: MOBILE_KEYBOARD_PANEL_BACKGROUND, overflow: 'hidden'};
const object4 = {};
object4.borderTopLeftRadius = (importDefault(697) /* metro dependency 697: native */).radii.none;
object4.borderTopRightRadius = (importDefault(697) /* metro dependency 697: native */).radii.none;
object4.width = '100%';
const ACTION_SHEET_DRAG_HANDLE_HEIGHT = (require(8554) /* metro dependency 8554: native */).ACTION_SHEET_DRAG_HANDLE_HEIGHT;
object4.height = ACTION_SHEET_DRAG_HANDLE_HEIGHT;
object4.marginBottom = -ACTION_SHEET_DRAG_HANDLE_HEIGHT;
object2.headerContainer = object4;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.headerContainerScreenReaderEnabled = {marginBottom: -PX_8};
MOBILE_KEYBOARD_PANEL_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_KEYBOARD_PANEL_BACKGROUND;
object2.roundingView = {'overflow': 'hidden', 'display': 'flex', backgroundColor: MOBILE_KEYBOARD_PANEL_BACKGROUND};
const env0_10 = Reflect.apply(createStyles, createStylesModule, [object2]);
object2 = {code: 'function PortalKeyboardBottomSheetTsx1(){const{animatedIndex}=this.__closure;return animatedIndex.get()>0.975;}'};
object2 = {code: 'function PortalKeyboardBottomSheetTsx2(){const{isFullyExpanded}=this.__closure;return isFullyExpanded.get();}'};
object2 = {code: 'function PortalKeyboardBottomSheetTsx3(isFullyExpanded,isFullExpandedPrevious){const{forceMaxHeight,runOnJS,dismissGlobalKeyboard}=this.__closure;if(isFullExpandedPrevious==null){return;}if(!isFullyExpanded&&!forceMaxHeight){runOnJS(dismissGlobalKeyboard)();}}'};
object2 = {code: "function PortalKeyboardBottomSheetTsx4(){const{interpolate,animatedIndex}=this.__closure;return{borderTopLeftRadius:interpolate(animatedIndex.get(),[0,1],[0,15],'clamp'),borderTopRightRadius:interpolate(animatedIndex.get(),[0,1],[0,15],'clamp')};}"};
object2 = {code: 'function PortalKeyboardBottomSheetTsx5(){const{animatedIndex}=this.__closure;return Math.max(animatedIndex.get(),0)>0;}'};
object2 = {code: 'function PortalKeyboardBottomSheetTsx6(result,previous){const{runOnJS,setAccessibilityViewIsModal}=this.__closure;if(result===previous)return;runOnJS(setAccessibilityViewIsModal)(result);}'};
value = value.forwardRef(PortalKeyboardBottomSheet);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/keyboard/native/PortalKeyboardBottomSheet.tsx');
exports.default = value;
}
function PortalKeyboardBottomSheetHeader({style, handleCollapse}) { // fn#89064, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11806:762, offset: 0x01ffd5e8, size: 158 bytes, params: 2, frame: 20
const styles = useStyles();
const value3 = (require(4559) /* metro dependency 4559: useIsScreenReaderEnabledNative */).useIsScreenReaderEnabled();
const items2 = [styles.headerContainer];
items2[1] = value3 ? styles.headerContainerScreenReaderEnabled : undefined;
items2[2] = style;
const ActionSheetDragHandle = (require(8554) /* metro dependency 8554: native */).ActionSheetDragHandle;
return (
<View style={items2}>
<ActionSheetDragHandle onPress={handleCollapse} />
</View>
);
}
function PortalKeyboardBottomSheet({animatedIndex, animatedPosition, chatInputRef, children, isAppsKeyboard, animationConfigs, onClose, transitionState, backdropComponent, headerStyle, disableHeaderRoundingAnimation, roundingViewStyle, onAnimate, rendersHandle, width, forceMaxHeight, enablePanDownToClose, renderExpressionFooter}, a1) { // fn#89065, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11806:2150, offset: 0x01ffd686, size: 1749 bytes, params: 3, frame: 51
var object3;
isAppsKeyboard = !(isAppsKeyboard === undefined) && isAppsKeyboard;
const env0_3 = onClose;
const env0_4 = headerStyle;
rendersHandle = rendersHandle === undefined || rendersHandle;
forceMaxHeight = !(forceMaxHeight === undefined) && forceMaxHeight;
enablePanDownToClose = !(enablePanDownToClose === undefined) && enablePanDownToClose;
renderExpressionFooter = !(renderExpressionFooter === undefined) && renderExpressionFooter;
const env0_11 = undefined;
const env0_12 = undefined;
const styles = useStyles();
let binding = env0_4;
const value8 = binding.useRef(null);
const value9 = (importDefault(11621) /* metro dependency 11621: useCustomKeyboardBottomSheetConfig */)({forceMaxHeight: forceMaxHeight,
enablePanDownToClose: enablePanDownToClose});
const TransitionStates = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates;
const YEETED = TransitionStates.YEETED;
const value10 = transitionState === YEETED;
const env0_9 = value10;
(require(6514) /* metro dependency 6514: BottomSheetHandle */).useBottomSheetImperativeHandle(a1, value8);
binding.useLayoutEffect(_fun89066, [value8, value10]);
const value11 = (require(566) /* metro dependency 566: flux */).useStateFromStores([NativeMenuStore], function() {
return NativeMenuStore.isOpen();
});
const r7 = renderExpressionFooter && !value10;
const value13 = (require(4559) /* metro dependency 4559: useIsScreenReaderEnabledNative */).useIsScreenReaderEnabled();
binding = env0_4;
const value14 = binding.useCallback(_fun89068, [chatInputRef, value10, onAnimate, onClose, isAppsKeyboard]);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useDerivedValue = reanimatedRexportModule.useDerivedValue;
let closure = PortalKeyboardBottomSheetJ;
closure.__closure = {animatedIndex: animatedIndex};
closure.__workletHash = 2001839633402;
closure.__initData = env0_11;
const value15 = Reflect.apply(useDerivedValue, reanimatedRexportModule, [closure]);
const moduleValue5 = reanimatedRexportModule;
let useAnimatedReaction = moduleValue5.useAnimatedReaction;
closure = PortalKeyboardBottomSheetJ_89070;
closure.__closure = {isFullyExpanded: value15};
closure.__workletHash = 9531298805666;
closure.__initData = env0_12;
const closure2 = PortalKeyboardBottomSheetY;
object3 = {forceMaxHeight: forceMaxHeight};
object3.runOnJS = reanimatedRexportModule.runOnJS;
object3.dismissGlobalKeyboard = (require(1848) /* metro dependency 1848: KeyboardManagerUtils */).dismissGlobalKeyboard;
closure2.__closure = object3;
closure2.__workletHash = 14649856286006;
closure2.__initData = env0_13;
Reflect.apply(useAnimatedReaction, moduleValue5, [closure, closure2]);
(importDefault(4594) /* metro dependency 4594: useMountEffect */)(function() {
return _fun89073;
});
const value16 = binding.useCallback(_fun89074, []);
const value17 = binding.useCallback(_fun89075, [headerStyle, value8, rendersHandle, value15, value13]);
const moduleValue6 = reanimatedRexportModule;
const useAnimatedStyle = moduleValue6.useAnimatedStyle;
closure = PortalKeyboardBottomSheetW;
closure.__closure = {interpolate: reanimatedRexportModule.interpolate, animatedIndex: animatedIndex};
closure.__workletHash = 13716272266662;
closure.__initData = env0_14;
const value18 = Reflect.apply(useAnimatedStyle, moduleValue6, [closure]);
const {left, right} = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
const value20 = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)({ignoreKeyboard: true});
const height = value20.height;
const width2 = value20.width;
const value21 = binding.useCallback(_fun89078, []);
const [property, property2] = env0_3(binding.useState(false), 2);
const moduleValue7 = reanimatedRexportModule;
useAnimatedReaction = moduleValue7.useAnimatedReaction;
closure = PortalKeyboardBottomSheet$;
closure.__closure = {animatedIndex: animatedIndex};
closure.__workletHash = 8952872079740;
closure.__initData = env0_15;
const closure3 = PortalKeyboardBottomSheetZ;
closure3.__closure = {runOnJS: reanimatedRexportModule.runOnJS, setAccessibilityViewIsModal: property2};
closure3.__workletHash = 16051387075966;
closure3.__initData = env0_16;
Reflect.apply(useAnimatedReaction, moduleValue7, [closure, closure3]);
const r26 = value13 || value10;
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const r4 = value11 ? 'no-hide-descendants' : undefined;
const items2 = [styles.container];
items2[1] = {marginLeft: left, marginRight: right};
const Math = global.Math;
items2[2] = {width: Math.min(width ?? global.Number.MAX_SAFE_INTEGER, width2 - left - right), height: height};
const defaultImport4 = importDefault(6277) /* metro dependency 6277 */;
const object2 = {ref: value8, animatedIndex: animatedIndex, animatedPosition: animatedPosition,
animationConfigs: animationConfigs, onClose: onClose, onAnimate: value14};
const value26 = !r26;
object2.enableContentPanningGesture = value26;
object2.enableHandlePanningGesture = value26;
object2.handleComponent = value17;
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
object2.renderFooter = platformUtilsModule.isAndroid() && r7 ? value21 : undefined;
object2.backgroundStyle = styles.background;
object2.backdropComponent = backdropComponent ?? value16;
object2.activeOffsetY = [-10, 10];
const ACTION_SHEET_DRAG_HANDLE_HEIGHT = rendersHandle ? (require(8554) /* metro dependency 8554: native */).ACTION_SHEET_DRAG_HANDLE_HEIGHT : 0;
object2.handleHeight = ACTION_SHEET_DRAG_HANDLE_HEIGHT;
copyDataProperties(object2, value9, require);
const AccessibilityViewAnimated = (require(4556) /* metro dependency 4556: AccessibilityViewNative */).AccessibilityViewAnimated;
const defaultImport42 = ((Component) => <Component {...object2}><AccessibilityViewAnimated nativeID="portal-keyboard-sheet" style={[styles.roundingView,
!disableHeaderRoundingAnimation && value18,
roundingViewStyle]} onAccessibilityEscape={onAccessibilityEscape_89081} accessibilityViewIsModal={property}>{children}</AccessibilityViewAnimated></Component>)(defaultImport4);
const r6 = env0_9 && r7 && ((Component) => <Component animatedSheetIndex={animatedIndex} />)(importDefault(8575) /* metro dependency 8575: PortalKeyboardFooterIOSIos */);
const NavScrim = (require(5462) /* metro dependency 5462: NavScrimAndroid */).NavScrim;
return (
<View
importantForAccessibility={r4}
style={items2}
pointerEvents="box-none"
>
{defaultImport42}
{r6}
<NavScrim />
</View>
);
}
function _fun89066() { // fn#89066, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11806:2702, offset: 0x01ffdd5b, size: 39 bytes, params: 1, frame: 9
var current;
if (env0_9) {
current = env0_8.current;
if (current != null) {
current.forceClose();
}
}
}
function _fun89068(a0, a1, a2) { // fn#89068, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11806:2887, offset: 0x01ffdd95, size: 296 bytes, params: 4, frame: 17
var value2;
var moduleValue;
var current;
const ANIMATION_SOURCE = (require(6277) /* metro dependency 6277 */).ANIMATION_SOURCE;
const HapticFeedbackTypes = (require(4081) /* metro dependency 4081: HapticUtilsNative */).HapticFeedbackTypes;
var value;
if (env0_9) {
if (a1 !== -1) {
if (onClose != null) {
onClose();
}
} else if (a0 !== a1) {
if (a1 !== -1) {
if (onAnimate != null) {
onAnimate(a0, a1, a2);
}
if (a0 === 0) {
value = environment.__proto__;
if (a2 !== ANIMATION_SOURCE.KEYBOARD) {
value = require(4081) /* metro dependency 4081: HapticUtilsNative */;
value.triggerHapticFeedback(HapticFeedbackTypes.IMPACT_LIGHT);
}
} else if (a0 === 1) {
if (a1 === 0) {
value2 = environment.__proto__;
moduleValue = require(10915) /* metro dependency 10915: isChannelFocusedNative */;
if (!moduleValue.isChannelFocused()) {
if (isAppsKeyboard) {
current = chatInputRef.current;
if (current != null) {
current.closeCustomKeyboard();
}
}
}
}
}
}
}
} else if (a0 !== a1) {
if (a1 !== -1) {
if (onAnimate != null) {
onAnimate(a0, a1, a2);
}
if (a0 === 0) {
value = environment.__proto__;
if (a2 !== ANIMATION_SOURCE.KEYBOARD) {
value = require(4081) /* metro dependency 4081: HapticUtilsNative */;
value.triggerHapticFeedback(HapticFeedbackTypes.IMPACT_LIGHT);
}
} else if (a0 === 1) {
if (a1 === 0) {
value2 = environment.__proto__;
moduleValue = require(10915) /* metro dependency 10915: isChannelFocusedNative */;
if (!moduleValue.isChannelFocused()) {
if (isAppsKeyboard) {
current = chatInputRef.current;
if (current != null) {
current.closeCustomKeyboard();
}
}
}
}
}
}
}
}
function PortalKeyboardBottomSheetJ() { // fn#89069, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11806:3241, owner: PortalKeyboardBottomSheet.J, offset: 0x01ffdebd, size: 32 bytes, params: 1, frame: 9
return animatedIndex.get() > 0.975;
}
function PortalKeyboardBottomSheetY(a0, a1) { // fn#89071, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11806:3479, owner: PortalKeyboardBottomSheet.Y, offset: 0x01ffdeef, size: 86 bytes, params: 3, frame: 14
let value = a0;
if (a1 != null) {
if (!(value || forceMaxHeight)) {
value = environment.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value.runOnJS((require(1848) /* metro dependency 1848: KeyboardManagerUtils */).dismissGlobalKeyboard)();
}
}
}
function _fun89072() { // fn#89072, offset: 0x01ffdf45, size: 11 bytes, params: 1, frame: 1
return function() {
if (onClose != null) {
onClose();
}
};
}
function _fun89074(a0) { // fn#89074, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11806:3782, offset: 0x01ffdf6b, size: 68 bytes, params: 2, frame: 15
const BottomSheetBackdrop = (require(6277) /* metro dependency 6277 */).BottomSheetBackdrop;
return <BottomSheetBackdrop {...a0} {...{['pressBehavior']: 'collapse'}} />;
}
function _fun89075() { // fn#89075, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11806:3872, offset: 0x01ffdfaf, size: 69 bytes, params: 1, frame: 15
return rendersHandle === false ? null : <PortalKeyboardBottomSheetHeader style={headerStyle} handleCollapse={handleCollapse_89076} isFullyExpanded={env0_11} />;
}
function PortalKeyboardBottomSheetW() { // fn#89077, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11806:4104, owner: PortalKeyboardBottomSheet.W, offset: 0x01ffe032, size: 146 bytes, params: 1, frame: 23
const object2 = {};
let value = environment.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const interpolate = value.interpolate;
const animatedIndexBinding = animatedIndex;
object2.borderTopLeftRadius = Reflect.apply(interpolate, value, [animatedIndexBinding.get(), [0, 1], [0, 15],
'clamp']);
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
object2.borderTopRightRadius = value.interpolate(animatedIndexBinding.get(), [0, 1], [0, 15], 'clamp');
return object2;
}
function _fun89078(a0) { // fn#89078, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11806:4479, offset: 0x01ffe0c4, size: 104 bytes, params: 2, frame: 17
const value = environment.__proto__;
const BottomSheetFooter = (require(6277) /* metro dependency 6277 */).BottomSheetFooter;
const bottomSheetFooterProps = {...a0};
const PortalHost = (require(4027) /* metro dependency 4027 */).PortalHost;
return (
<BottomSheetFooter {...bottomSheetFooterProps}>
<PortalHost name="expression-footer" />
</BottomSheetFooter>
);
}
function PortalKeyboardBottomSheetZ(a0, a1) { // fn#89080, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11806:4770, owner: PortalKeyboardBottomSheet.Z, offset: 0x01ffe157, size: 61 bytes, params: 3, frame: 13
var value;
if (a0 !== a1) {
value = environment.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value.runOnJS(env0_12)(a0);
}
}
function PortalKeyboardBottomSheetOnAccessibilityEscape() { // fn#89081, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11806:5685, owner: PortalKeyboardBottomSheet.onAccessibilityEscape, offset: 0x01ffe194, size: 32 bytes, params: 1, frame: 9
const current = env0_8.current;
if (current != null) {
current.collapse();
}
}
function handleCollapse_89076() { // fn#89076, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11806:3946, offset: 0x01ffdff4, size: 62 bytes, params: 1, frame: 11
let current = env1_8.current;
if (current != null) {
current.collapse();
}
if (env1_10) {
current = env1_8.current;
if (current != null) {
current.forceClose();
}
}
}
@@ -0,0 +1,11 @@
/* Metro module 11576; source: modules/keyboard/native/PortalKeyboardConstants.tsx; dependencies: [6277, 2] */
function _fun88646(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88646, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11762:6, offset: 0x01fed5c0, size: 117 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = require(6277) /* metro dependency 6277 */;
value = value.getKeyboardAnimationConfigs('keyboard', 250);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/keyboard/native/PortalKeyboardConstants.tsx');
exports.KEYBOARD_ANIMATION_DURATION = 250;
exports.KEYBOARD_ANIMATION_CONFIG = value;
}
@@ -0,0 +1,91 @@
/* Metro module 8575; source: modules/keyboard/native/PortalKeyboardFooterIOS.ios.tsx; dependencies: [31, 33, 4501, 697, 1585, 1599, 4022, 4017, 1583, 676, 4027, 2] */
function _fun67845(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#67845, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8760:6, offset: 0x01c34353, size: 232 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const MOBILE_KEYBOARD_PANEL_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_KEYBOARD_PANEL_BACKGROUND;
const env0_5 = Reflect.apply(createStyles, createStylesModule, [{keyboardStickyFooter: {'position': 'absolute',
'bottom': 0, 'left': 0, 'right': 0, 'zIndex': 1, 'flex': 1,
backgroundColor: MOBILE_KEYBOARD_PANEL_BACKGROUND}}]);
object = {code: "function PortalKeyboardFooterIOSIosTsx1(){const{interpolate,progress,bottom,keyboardType,KeyboardTypes,animatedSheetIndex,height,EXPRESSION_FOOTER_HEIGHT}=this.__closure;const offset=interpolate(progress.get(),[0,1],[0,bottom]);if(keyboardType.get()===KeyboardTypes.EXPRESSION&&animatedSheetIndex.get()>=0){return{transform:[{translateY:height.get()+offset}]};}return{transform:[{translateY:interpolate(animatedSheetIndex.get(),[-1,0],[EXPRESSION_FOOTER_HEIGHT+bottom,0],'clamp')}]};}"};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/keyboard/native/PortalKeyboardFooterIOS.ios.tsx');
exports.default = PortalKeyboardFooterIOS;
}
function PortalKeyboardFooterIOS({animatedSheetIndex, portalHostName}) { // fn#67846, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8760:889, offset: 0x01c3443b, size: 433 bytes, params: 2, frame: 28
portalHostName = portalHostName === undefined ? 'expression-footer' : portalHostName;
const styles = useStyles();
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
const value2 = (require(1599) /* metro dependency 1599 */).useReanimatedKeyboardAnimation();
const height = value2.height;
const env0_3 = height;
const progress = value2.progress;
const value3 = (require(4022) /* metro dependency 4022: useKeyboardType */).useKeyboardTypeSharedValue();
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = PortalKeyboardFooterIOSP;
const object2 = {};
object2.interpolate = reanimatedRexportModule.interpolate;
object2.progress = progress;
object2.bottom = bottom;
object2.keyboardType = value3;
const KeyboardTypes = (require(1583) /* metro dependency 1583: KeyboardTypes */).KeyboardTypes;
object2.KeyboardTypes = KeyboardTypes;
object2.animatedSheetIndex = animatedSheetIndex;
object2.height = height;
const EXPRESSION_FOOTER_HEIGHT = (require(676) /* metro dependency 676: ConstantsIOS */).EXPRESSION_FOOTER_HEIGHT;
object2.EXPRESSION_FOOTER_HEIGHT = EXPRESSION_FOOTER_HEIGHT;
closure.__closure = object2;
closure.__workletHash = 9642021588244;
closure.__initData = undefined;
const value5 = env0_3.useMemo(_fun67848, [Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]),
styles]);
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const PortalHost = (require(4027) /* metro dependency 4027 */).PortalHost;
return (
<View style={value5}>
<PortalHost name={portalHostName} />
</View>
);
}
function PortalKeyboardFooterIOSP() { // fn#67847, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8760:1151, owner: PortalKeyboardFooterIOS.p, offset: 0x01c345ec, size: 325 bytes, params: 1, frame: 24
var object;
var object3;
const EXPRESSION_FOOTER_HEIGHT = (require(676) /* metro dependency 676: ConstantsIOS */).EXPRESSION_FOOTER_HEIGHT;
var heightBinding;
let value = environment.__proto__;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const value4 = reanimatedRexportModule.interpolate(progress.get(), [0, 1], [0, bottom]);
const value5 = env0_5.get();
const KeyboardTypes = (require(1583) /* metro dependency 1583: KeyboardTypes */).KeyboardTypes;
const EXPRESSION = KeyboardTypes.EXPRESSION;
if (value5 !== EXPRESSION) {
object3 = {};
value = reanimatedRexportModule;
object3.translateY = value.interpolate(animatedSheetIndex.get(), [-1, 0], [EXPRESSION_FOOTER_HEIGHT + bottom,
0],
'clamp');
object = {transform: [object3]};
} else if (animatedSheetIndex.get() >= 0) {
heightBinding = height;
object = {transform: [{translateY: heightBinding.get() + value4}]};
} else {
object3 = {};
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
object3.translateY = value.interpolate(animatedSheetIndex.get(), [-1, 0], [EXPRESSION_FOOTER_HEIGHT + bottom,
0],
'clamp');
object = {transform: [object3]};
}
return object;
}
function _fun67848() { // fn#67848, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8760:1685, offset: 0x01c34731, size: 31 bytes, params: 1, frame: 3
return [styles.keyboardStickyFooter, env0_6];
}
@@ -0,0 +1,191 @@
/* Metro module 11954; source: modules/keyboard/native/PortalKeyboardInlineComponent.ios.tsx; dependencies: [31, 27, 4502, 4022, 1851, 6996, 1583, 4594, 4023, 4015, 4026, 11577, 2] */
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 = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_4 = value2.NativeModules;
const env0_5 = value2.findNodeHandle;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
value = value.memo(InlinePortalKeyboard);
(require(2) /* metro dependency 2 */).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 = (importDefault(4022) /* metro dependency 4022: useKeyboardType */)();
const value4 = (importDefault(1851) /* metro dependency 1851: useSystemKeyboardHeightNative */)();
const value5 = (importDefault(6996) /* metro dependency 6996: useKeyboardIsOpen */)({includeCustomKeyboard: false});
let value = require(4022) /* metro dependency 4022: useKeyboardType */;
const useKeyboardContextForType = value.useKeyboardContextForType;
const KeyboardTypes = (require(1583) /* metro dependency 1583: KeyboardTypes */).KeyboardTypes;
const SYSTEM = KeyboardTypes.SYSTEM;
value = Reflect.apply(useKeyboardContextForType, value, [SYSTEM]);
(importDefault(4594) /* metro dependency 4594: useMountEffect */)(function() {
return _fun91735;
});
const PortalKeyboardUIStore = (require(4023) /* metro dependency 4023: PortalKeyboardUIStoreNative */).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 _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 = (require(4026) /* metro dependency 4026: PortalKeyboard */).PortalKeyboardState;
var value6;
const KeyboardTypes = (require(1583) /* metro dependency 1583: KeyboardTypes */).KeyboardTypes;
const closePortalKeyboardRequest = (require(4023) /* metro dependency 4023: PortalKeyboardUIStoreNative */).closePortalKeyboardRequest;
if (env0_5 != null) {
handlerId = env0_5.handlerId;
if (handlerId == null) {
if (env0_5 == null) {
binding = env0_2;
value6 = environment.__proto__;
if (binding !== KeyboardTypes.SYSTEM) {
return undefined;
}
if (env0_4.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 (env0_4.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 = env0_5.handlerId;
if (handlerId !== env0_1) {
return undefined;
}
if (env0_5 == null) {
binding = env0_2;
value6 = environment.__proto__;
if (binding !== KeyboardTypes.SYSTEM) {
return undefined;
}
if (env0_4.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 (env0_4.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 _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 _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
(require(4023) /* metro dependency 4023: PortalKeyboardUIStoreNative */).handlePortalKeyboardOpen(env1_1);
env1_7.current = true;
const object2 = {viewHandle: a0};
const useKeyboardActionSheetHeightModule = require(11577) /* metro dependency 11577: useKeyboardActionSheetHeight */;
const getKeyboardActionSheetHeight = useKeyboardActionSheetHeightModule.getKeyboardActionSheetHeight;
object2.height = Reflect.apply(getKeyboardActionSheetHeight, useKeyboardActionSheetHeightModule, []).minimum;
const viewHandle = object2.viewHandle;
const height = object2.height;
const DCDChatManager = NativeModules.DCDChatManager;
DCDChatManager.customKeyboardWillShow(viewHandle, height, 0.25, 7);
}
@@ -0,0 +1,65 @@
/* Metro module 11774; source: modules/keyboard/native/PortalKeyboardPlaceholder.tsx; dependencies: [31, 27, 33, 4501, 477, 697, 1583, 1585, 7556, 1478, 5466, 7701, 4022, 1851, 2] */
function _fun90159(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90159, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11960:6, offset: 0x0202e6d9, size: 221 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
const env0_3 = value.View;
const env0_4 = value.StyleSheet;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
value = <PortalKeyboardPlaceholder />;
const env0_6 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun90162);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/keyboard/native/PortalKeyboardPlaceholder.tsx');
exports.PORTAL_KEYBOARD_PLACEHOLDER_INSTANCE = value;
}
function PortalKeyboardPlaceholderInner({keyboardType}) { // fn#90160, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11960:770, offset: 0x0202e7b6, size: 187 bytes, params: 2, frame: 20
const value2 = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
const styles = useStyles(keyboardType,
(importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)().width - value2.left - value2.right,
(importDefault(5466) /* metro dependency 5466: useCustomKeyboardHeight */)(),
(importDefault(7556) /* metro dependency 7556: useIsWindowLarge */)());
return (
<View
style={[styles.container,
(require(7701) /* metro dependency 7701: ClientThemesOverrides */).useGradientBottom()]}
/>
);
}
function PortalKeyboardPlaceholder() { // fn#90161, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11960:986, offset: 0x0202e871, size: 183 bytes, params: 1, frame: 16
const value2 = (importDefault(4022) /* metro dependency 4022: useKeyboardType */)();
const r2 = (importDefault(1851) /* metro dependency 1851: useSystemKeyboardHeightNative */)() > 0 && (require(477) /* metro dependency 477: PlatformUtils */).isAndroid();
const KeyboardTypes = (require(1583) /* metro dependency 1583: KeyboardTypes */).KeyboardTypes;
const SYSTEM = KeyboardTypes.SYSTEM;
return value2 !== SYSTEM ? r2 ? null : <PortalKeyboardPlaceholderInner keyboardType={value2} /> : (require(477) /* metro dependency 477: PlatformUtils */).isAndroid() || r2 ? null : <PortalKeyboardPlaceholderInner keyboardType={value2} />;
}
function _fun90162(a0, a1, a2, a3) { // fn#90162, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11960:210, offset: 0x0202e928, size: 484 bytes, params: 5, frame: 22
let value = a1;
const value2 = a2;
const object = {};
const value4 = undefined;
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
copyDataProperties(object, platformUtilsModule.isIOS() ? StyleSheet.absoluteFillObject : null, undefined);
object['borderTopWidth'] = StyleSheet.hairlineWidth;
let BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object['borderTopColor'] = BORDER_SUBTLE;
BORDER_SUBTLE = a3 ? (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE : value4;
object['borderRightColor'] = BORDER_SUBTLE;
object['borderRightWidth'] = a3 ? StyleSheet.hairlineWidth : value4;
BORDER_SUBTLE = a3 ? (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE : value4;
object['borderLeftColor'] = BORDER_SUBTLE;
object['borderLeftWidth'] = a3 ? StyleSheet.hairlineWidth : value4;
const KeyboardTypes = (require(1583) /* metro dependency 1583: KeyboardTypes */).KeyboardTypes;
KeyboardTypes.APP_LAUNCHER;
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object['backgroundColor'] = BACKGROUND_BASE_LOW;
const moduleValue2 = platformUtilsModule;
object['width'] = moduleValue2.isIOS() ? value : a0 === KeyboardTypes.SYSTEM ? value4 : value;
value = platformUtilsModule;
object['height'] = value.isIOS() ? value2 : a0 === KeyboardTypes.SYSTEM ? value4 : value2;
return {container: object};
}
@@ -0,0 +1,106 @@
/* Metro module 15143; source: modules/keyboard/native/PortalKeyboardRenderer.tsx; dependencies: [31, 1480, 33, 4508, 4022, 1583, 477, 15144, 4023, 4008, 5225, 10915, 1482, 4026, 2] */
function _fun115462(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115462, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15340:6, offset: 0x02461631, size: 188 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const subscribeToKeyboardUIStore = importDefault(1480) /* metro dependency 1480: subscribeToKeyboardUIStore */;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
const env0_6 = [];
const transitionGroupGetItemKey = function(a0) {
return a0.id;
};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/keyboard/native/PortalKeyboardRenderer.tsx');
exports.PortalKeyboardRenderer = PortalKeyboardRenderer;
}
function transitionGroupRenderItem(a0, a1, a2, a3) { // fn#115464, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15340:199, offset: 0x024616ed, size: 200 bytes, params: 5, frame: 18
var r0;
var value;
const TransitionStates = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates;
const YEETED = TransitionStates.YEETED;
if (a2 === YEETED && (require(4022) /* metro dependency 4022: useKeyboardType */).getKeyboardType() === (require(1583) /* metro dependency 1583: KeyboardTypes */).KeyboardTypes.SYSTEM && (require(477) /* metro dependency 477: PlatformUtils */).isAndroid()) {
r0 = null;
} else {
value = importDefault(15144) /* metro dependency 15144: PortalKeyboardRendererComponent */;
value = ((Component) => <Component item={a1} state={a2} cleanUp={a3} key={a0} />)(value);
r0 = value;
}
return r0;
}
function PortalKeyboardRenderer({portal}) { // fn#115465, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15340:525, offset: 0x024617b5, size: 388 bytes, params: 2, frame: 20
portal = portal === undefined || portal;
const binding = env0_3;
const value2 = binding.useId();
binding.useLayoutEffect(_fun115466, [value2]);
binding.useLayoutEffect(function() {
var env0_0 = subscribeToKeyboardUIStore(_fun115468);
return _fun115469;
}, []);
binding.useLayoutEffect(_fun115470, []);
const PortalKeyboardUIStore = (require(4023) /* metro dependency 4023: PortalKeyboardUIStoreNative */).PortalKeyboardUIStore;
const value3 = PortalKeyboardUIStore.useField('keyboard');
const value4 = PortalKeyboardUIStore.useField('renderers');
const value7 = env0_3.useMemo(_fun115473, [value4.length === 0 || value4[value4.length - 1] === value2, value3]);
const r2 = portal ? (require(4026) /* metro dependency 4026: PortalKeyboard */).PortalKeyboard : env0_3.Fragment;
const TransitionGroup = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionGroup;
return ((Component) => <Component><TransitionGroup items={value7} getItemKey={transitionGroupGetItemKey} renderItem={transitionGroupRenderItem} /></Component>)(r2);
}
function _fun115466() { // fn#115466, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15340:607, offset: 0x02461939, size: 45 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (require(4023) /* metro dependency 4023: PortalKeyboardUIStoreNative */).registerPortalKeyboardRenderer(env0_0);
}
function _fun115467() { // fn#115467, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15340:678, offset: 0x02461966, size: 36 bytes, params: 1, frame: 12
const env0_0 = subscribeToKeyboardUIStore(_fun115468);
return _fun115469;
}
function _fun115470() { // fn#115470, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15340:929, offset: 0x02461a30, size: 118 bytes, params: 1, frame: 14
var environment;
let value = environment.__proto__;
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (platformUtilsModule.isAndroid()) {
value = require(4008) /* metro dependency 4008: RootNavigationRefNative */;
value = value.getRootNavigationRef();
if (value != null) {
value.addListener('state', onNavigationStateChange);
return _fun115472;
}
}
}
function _fun115473() { // fn#115473, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15340:1652, offset: 0x02461bc1, size: 46 bytes, params: 1, frame: 3
return env0_1 == null ? env1_6 : env0_2 ? [env0_1] : env1_6;
}
function _fun115468() { // fn#115468, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15340:692, offset: 0x0246198a, size: 118 bytes, params: 1, frame: 16
const value = environment.__proto__.__proto__;
const PortalKeyboardUIStore = (require(4023) /* metro dependency 4023: PortalKeyboardUIStoreNative */).PortalKeyboardUIStore;
const field = PortalKeyboardUIStore.getField('keyboard');
if (field != null && (require(4022) /* metro dependency 4022: useKeyboardType */).getKeyboardType() !== field.type) {
(require(4023) /* metro dependency 4023: PortalKeyboardUIStoreNative */).closePortalKeyboardIfUnhandled();
}
}
function _fun115469() { // fn#115469, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15340:853, offset: 0x02461a00, size: 48 bytes, params: 1, frame: 12
env0_0();
const value = environment.__proto__.__proto__;
(require(4023) /* metro dependency 4023: PortalKeyboardUIStoreNative */).closePortalKeyboardIfUnhandled();
}
function onNavigationStateChange() { // fn#115471, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15340:1035, offset: 0x02461aa6, size: 283 bytes, params: 1, frame: 17
const KeyboardTypes = (require(1583) /* metro dependency 1583: KeyboardTypes */).KeyboardTypes;
const value = environment.__proto__.__proto__;
const PortalKeyboardUIStore = (require(4023) /* metro dependency 4023: PortalKeyboardUIStoreNative */).PortalKeyboardUIStore;
const field = PortalKeyboardUIStore.getField('keyboard');
if (field != null && field.channelId !== (require(5225) /* metro dependency 5225: FakePlaceholderPrivateChannel */).FAKE_PLACEHOLDER_PRIVATE_CHANNEL_ID && (require(10915) /* metro dependency 10915: isChannelFocusedNative */).getFocusedChannelId() !== field.channelId) {
if ((require(4022) /* metro dependency 4022: useKeyboardType */).getKeyboardType() !== KeyboardTypes.SYSTEM) {
(require(1482) /* metro dependency 1482: KeyboardUIStoreNative */).setKeyboardType({type: KeyboardTypes.SYSTEM});
}
(require(4023) /* metro dependency 4023: PortalKeyboardUIStoreNative */).closePortalKeyboardIfUnhandled();
}
}
@@ -0,0 +1,54 @@
/* Metro module 15144; source: modules/keyboard/native/PortalKeyboardRendererComponent.tsx; dependencies: [31, 1379, 33, 5225, 1583, 11575, 8048, 15145, 15152, 2] */
function _fun115474(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115474, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15341:6, offset: 0x02461bef, size: 168 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
value = value.memo(PortalKeyboardRendererComponent);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/keyboard/native/PortalKeyboardRendererComponent.tsx');
exports.default = value;
}
function PortalKeyboardRendererComponent({item, state, cleanUp}) { // fn#115475, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15341:144, offset: 0x02461c97, size: 445 bytes, params: 2, frame: 21
const channelId = item.channelId;
const chatInputRef = item.chatInputRef;
const type = item.type;
const channel = ChannelStore.getChannel(channelId);
const binding = env0_3;
const value3 = binding.useMemo(_fun115476, [channel, channelId]);
const value4 = binding.useMemo(_fun115477, [value3]);
if (value3 != null) {
if (value4 === undefined) {
return null;
}
var KeyboardTypes = (require(1583) /* metro dependency 1583: KeyboardTypes */).KeyboardTypes;
var APP_LAUNCHER = KeyboardTypes.APP_LAUNCHER;
if (APP_LAUNCHER === type) {
return ((Component) => <Component context={value4} chatInputRef={chatInputRef} onClose={cleanUp} transitionState={state} entrypoint={(require(8048) /* metro dependency 8048: AppLauncherTypes */).AppLauncherEntrypoint.TEXT} />)(importDefault(11575) /* metro dependency 11575: AppLauncherKeyboard */);
}
KeyboardTypes = (require(1583) /* metro dependency 1583: KeyboardTypes */).KeyboardTypes;
var MEDIA = KeyboardTypes.MEDIA;
if (MEDIA === type) {
return ((Component) => <Component channel={value3} chatInputRef={chatInputRef} onClose={cleanUp} transitionState={state} />)(importDefault(15145) /* metro dependency 15145: MediaKeyboard */);
}
KeyboardTypes = (require(1583) /* metro dependency 1583: KeyboardTypes */).KeyboardTypes;
var EXPRESSION = KeyboardTypes.EXPRESSION;
if (EXPRESSION === type) {
return ((Component) => <Component channel={value3} chatInputRef={chatInputRef} onClose={cleanUp} transitionState={state} />)(importDefault(15152) /* metro dependency 15152: ExpressionPickerKeyboard */);
}
}
return null;
}
function _fun115476() { // fn#115476, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15341:282, offset: 0x02461e54, size: 73 bytes, params: 1, frame: 15
const channelIdBinding = channelId;
const FAKE_PLACEHOLDER_PRIVATE_CHANNEL_ID = (require(5225) /* metro dependency 5225: FakePlaceholderPrivateChannel */).FAKE_PLACEHOLDER_PRIVATE_CHANNEL_ID;
return channelIdBinding !== FAKE_PLACEHOLDER_PRIVATE_CHANNEL_ID ? env0_1 : (require(5225) /* metro dependency 5225: FakePlaceholderPrivateChannel */).FAKE_PLACEHOLDER_PRIVATE_CHANNEL;
}
function _fun115477() { // fn#115477, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15341:398, offset: 0x02461e9d, size: 41 bytes, params: 1, frame: 3
return env0_2 != null ? {channel: env0_2, type: 'channel'} : undefined;
}
@@ -0,0 +1,161 @@
/* Metro module 4023; source: modules/keyboard/native/PortalKeyboardUIStore.native.tsx; dependencies: [4024, 4026, 491, 2] */
function _fun33107(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#33107, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4181:6, offset: 0x01027c46, size: 225 bytes, params: 8, frame: 19
var object2;
const env0_0 = require;
const closure = closePortalKeyboard;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const zustandStore = (require(4024) /* metro dependency 4024: ZustandStore */).createZustandStore(function() {
var object = {keyboard: null};
object.state = require(dependencyMap[1]).PortalKeyboardState.EMPTY;
object.renderers = [];
return object;
});
object2 = {};
const getField = zustandStore.getField;
object2.getField = getField;
const useField = zustandStore.useField;
object2.useField = useField;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/keyboard/native/PortalKeyboardUIStore.native.tsx');
exports.PortalKeyboardUIStore = object2;
exports.isPortalKeyboardOpenForChannel = isPortalKeyboardOpenForChannel;
exports.openPortalKeyboard = openPortalKeyboard;
exports.registerPortalKeyboardRenderer = registerPortalKeyboardRenderer;
exports.handlePortalKeyboardOpen = handlePortalKeyboardOpen;
exports.closePortalKeyboard = closure;
exports.closePortalKeyboardIfUnhandled = closePortalKeyboardIfUnhandled;
exports.closePortalKeyboardRequest = closePortalKeyboardRequest;
}
function closePortalKeyboard() { // fn#33108, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4181:251, offset: 0x01027d27, size: 67 bytes, params: 1, frame: 14
const binding = env0_2;
const setState = binding.setState;
const PortalKeyboardState = (require(4026) /* metro dependency 4026: PortalKeyboard */).PortalKeyboardState;
const CLOSED = PortalKeyboardState.CLOSED;
Reflect.apply(setState, binding, [{state: CLOSED, keyboard: null}]);
}
function isPortalKeyboardOpenForChannel(a0) { // fn#33110, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4181:500, offset: 0x01027da7, size: 169 bytes, params: 2, frame: 16
var r1;
var r0;
const PortalKeyboardState = (require(4026) /* metro dependency 4026: PortalKeyboard */).PortalKeyboardState;
const {state, keyboard} = env0_2.getState();
const value4 = keyboard?.channelId === a0;
if (value4) {
r1 = state === PortalKeyboardState.REQUEST_OPEN || state === PortalKeyboardState.OPENING;
r1 = !r1 ? state === PortalKeyboardState.OPEN : r1;
r0 = r1;
} else {
r0 = value4;
}
return r0;
}
function openPortalKeyboard(a0, a1, a2) { // fn#33111, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4181:773, offset: 0x01027e50, size: 295 bytes, params: 4, frame: 20
var setState;
var object;
let binding = env0_2;
const {state, keyboard} = binding.getState();
const value3 = undefined;
let r1 = (keyboard == null ? value3 : keyboard.type) === a0 && (keyboard == null ? value3 : keyboard.channelId) === a1;
const PortalKeyboardState = (require(4026) /* metro dependency 4026: PortalKeyboard */).PortalKeyboardState;
const REQUEST_OPEN = PortalKeyboardState.REQUEST_OPEN;
let r2 = state === REQUEST_OPEN || state === PortalKeyboardState.OPENING;
r2 = !r2 ? state === PortalKeyboardState.OPEN : r2;
r1 = r1 && r2;
if (!r1) {
binding = env0_2;
setState = binding.setState;
object = {};
object.id = (require(491) /* metro dependency 491 */).v4();
object.type = a0;
object.channelId = a1;
object.chatInputRef = a2;
Reflect.apply(setState, binding, [{keyboard: object, state: PortalKeyboardState.REQUEST_OPEN}]);
}
return value3;
}
function registerPortalKeyboardRenderer(a0) { // fn#33112, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4181:1202, offset: 0x01027f77, size: 39 bytes, params: 2, frame: 12
const env0_0 = a0;
env0_2.setState(_fun33113);
return _fun33114;
}
function handlePortalKeyboardOpen(a0) { // fn#33117, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4181:1422, offset: 0x0102803d, size: 36 bytes, params: 2, frame: 11
const env0_0 = a0;
env0_2.setState(_fun33118);
}
function closePortalKeyboardIfUnhandled() { // fn#33119, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4181:1675, offset: 0x010280de, size: 111 bytes, params: 1, frame: 16
const {keyboard, state} = env0_2.getState();
if (!(keyboard == null && state === (require(4026) /* metro dependency 4026: PortalKeyboard */).PortalKeyboardState.CLOSED)) {
if (keyboard?.handlerId == null) {
closePortalKeyboard();
}
}
}
function closePortalKeyboardRequest() { // fn#33120, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4181:1896, offset: 0x0102814d, size: 151 bytes, params: 1, frame: 15
const field = env0_2.getField('state');
const PortalKeyboardState = (require(4026) /* metro dependency 4026: PortalKeyboard */).PortalKeyboardState;
const CLOSED = PortalKeyboardState.CLOSED;
if (field !== CLOSED && field !== PortalKeyboardState.REQUEST_CLOSE) {
env0_2.setState({state: PortalKeyboardState.REQUEST_CLOSE});
}
}
function _fun33113(a0) { // fn#33113, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4181:1264, offset: 0x01027f9e, size: 79 bytes, params: 2, frame: 16
var r0;
var items2;
let value = a0;
let renderers = value.renderers;
if (renderers.includes(env0_0)) {
r0 = value;
} else {
renderers = value.renderers;
items2 = [];
value = arraySpread(items2, renderers, 0, undefined);
items2[value] = env0_0;
value + 1;
r0 = {renderers: items2};
}
return r0;
}
function _fun33114() { // fn#33114, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4181:1326, offset: 0x01027fed, size: 29 bytes, params: 1, frame: 11
env1_2.setState(function(a0) {
var object = {};
object.renderers = a0.renderers.filter(_fun33116);
return object;
});
}
function _fun33118(a0) { // fn#33118, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4181:1471, offset: 0x01028061, size: 125 bytes, params: 2, frame: 14
var r0;
var object3;
var object4;
let value = a0;
if (value.keyboard == null) {
r0 = value;
} else if (value.keyboard.handlerId === env0_0) {
r0 = value;
} else {
object3 = {};
object4 = {};
copyDataProperties(object4, value.keyboard, value);
object4['handlerId'] = env0_0;
object3.keyboard = object4;
value = environment.__proto__;
object3.state = (require(4026) /* metro dependency 4026: PortalKeyboard */).PortalKeyboardState.OPEN;
r0 = object3;
}
return r0;
}
function _fun33115({renderers}) { // fn#33115, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4181:1343, offset: 0x0102800a, size: 35 bytes, params: 2, frame: 12
const object2 = {};
object2.renderers = renderers.filter(_fun33116);
return object2;
}
@@ -0,0 +1,39 @@
/* Metro module 11574; source: modules/keyboard/native/openCustomKeyboard.android.tsx; dependencies: [1482, 5459, 4023, 11538, 2] */
function _fun88631(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88631, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11760:6, offset: 0x01fec8e2, size: 103 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/keyboard/native/openCustomKeyboard.android.tsx');
exports.default = openCustomKeyboard_88632;
}
function openCustomKeyboard_88632({channelId, chatInputRef, chatInputNativeRef, keyboardParams, secondaryTextFieldRef}) { // fn#88632, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11760:190, offset: 0x01fec949, size: 121 bytes, params: 2, frame: 15
(require(1482) /* metro dependency 1482: KeyboardUIStoreNative */).setKeyboardType(keyboardParams);
(require(5459) /* metro dependency 5459: RunAfterInteractionsUtils */).runAfterInteractions(_fun88633);
}
function _fun88633() { // fn#88633, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11760:367, offset: 0x01fec9c2, size: 159 bytes, params: 1, frame: 19
var r2;
var r3;
let current = chatInputRef.current;
current.blur();
const value2 = secondaryTextFieldRef == null;
const value3 = undefined;
if (value2) {
r2 = value2;
r3 = value3;
} else {
current = secondaryTextFieldRef.current;
r2 = current == null;
r3 = current;
}
if (!r2) {
r3.blur();
}
const portalKeyboardUIStoreNativeModule = require(4023) /* metro dependency 4023: PortalKeyboardUIStoreNative */;
portalKeyboardUIStoreNativeModule.openPortalKeyboard(keyboardParams.type, channelId, chatInputRef);
const defaultImport = importDefault(11538) /* metro dependency 11538: ChatInputNativeCommands */;
defaultImport.openCustomKeyboard(chatInputNativeRef.current);
return value3;
}
@@ -0,0 +1,23 @@
/* Metro module 1480; source: modules/keyboard/native/subscribeToKeyboardUIStore.tsx; dependencies: [1481, 1482, 2] */
function _fun16958(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#16958, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1607:6, offset: 0x00e5fe96, size: 101 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/keyboard/native/subscribeToKeyboardUIStore.tsx');
exports.default = subscribeToKeyboardUIStore;
}
function subscribeToKeyboardUIStore(a0) { // fn#16959, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1607:190, offset: 0x00e5fefb, size: 91 bytes, params: 2, frame: 14
var DEFAULT_APP_ENTRY_KEY;
const value = a1;
const env0_0 = a0;
if (value === undefined) {
DEFAULT_APP_ENTRY_KEY = (require(1481) /* metro dependency 1481: AppEntryKeyContext */).DEFAULT_APP_ENTRY_KEY;
}
return (importDefault(1482) /* metro dependency 1482: KeyboardUIStoreNative */).subscribe(_fun16960);
}
function _fun16960({byAppEntry}) { // fn#16960, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1607:287, offset: 0x00e5ff56, size: 33 bytes, params: 2, frame: 11
return env0_0(byAppEntry[env0_1]);
}
@@ -0,0 +1,10 @@
/* Metro module 15319; source: modules/keyboard/native/useAnimatedKeyboardHeight.tsx; dependencies: [13113, 2] */
function _fun117112(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117112, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15516:6, offset: 0x024a4690, size: 99 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/keyboard/native/useAnimatedKeyboardHeight.tsx');
exports.default = function() {
return importDefault(dependencyMap[0]).animatedKeyboardHeight;
};
}
@@ -0,0 +1,27 @@
/* Metro module 5466; source: modules/keyboard/native/useCustomKeyboardHeight.tsx; dependencies: [1481, 1482, 2] */
function _fun48045(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#48045, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5644:6, offset: 0x011d8321, size: 112 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/keyboard/native/useCustomKeyboardHeight.tsx');
exports.default = useCustomKeyboardHeight;
exports.getCustomKeyboardHeight = getCustomKeyboardHeight_48048;
}
function useCustomKeyboardHeight() { // fn#48046, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5644:187, offset: 0x011d8391, size: 68 bytes, params: 1, frame: 14
const env0_0 = (require(1481) /* metro dependency 1481: AppEntryKeyContext */).useAppEntryKey();
return (importDefault(1482) /* metro dependency 1482: KeyboardUIStoreNative */)(_fun48047);
}
function getCustomKeyboardHeight_48048() { // fn#48048, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5644:338, offset: 0x011d83f1, size: 88 bytes, params: 1, frame: 13
let value = a0;
const r1 = value !== undefined ? value : (require(1481) /* metro dependency 1481: AppEntryKeyContext */).DEFAULT_APP_ENTRY_KEY;
value = importDefault(1482) /* metro dependency 1482: KeyboardUIStoreNative */;
const getState = value.getState;
return Reflect.apply(getState, value, []).byAppEntry[r1].customKeyboardHeight;
}
function _fun48047({byAppEntry}) { // fn#48047, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5644:269, offset: 0x011d83d5, size: 28 bytes, params: 2, frame: 2
return byAppEntry[env0_0].customKeyboardHeight;
}
@@ -0,0 +1,21 @@
/* Metro module 5464; source: modules/keyboard/native/useKeyboardDuration.tsx; dependencies: [1481, 477, 1482, 2] */
function _fun48040(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#48040, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5642:6, offset: 0x011d8089, size: 101 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/keyboard/native/useKeyboardDuration.tsx');
exports.getKeyboardDuration = getKeyboardDuration;
}
function getKeyboardDuration() { // fn#48041, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5642:195, offset: 0x011d80ee, size: 127 bytes, params: 1, frame: 14
var keyboardDuration;
let value = a0;
if ((require(477) /* metro dependency 477: PlatformUtils */).isAndroid()) {
keyboardDuration = 300;
} else {
value = importDefault(1482) /* metro dependency 1482: KeyboardUIStoreNative */;
keyboardDuration = value.getState().byAppEntry[value !== undefined ? value : (require(1481) /* metro dependency 1481: AppEntryKeyContext */).DEFAULT_APP_ENTRY_KEY].keyboardDuration;
}
return keyboardDuration;
}
@@ -0,0 +1,75 @@
/* Metro module 6996; source: modules/keyboard/native/useKeyboardIsOpen.tsx; dependencies: [1480, 1481, 1482, 1583, 2] */
function _fun55430(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#55430, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7174:6, offset: 0x013a717d, size: 150 bytes, params: 8, frame: 20
const env0_0 = require;
const closure = getKeyboardIsOpen;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const subscribeToKeyboardUIStore = importDefault(1480) /* metro dependency 1480: subscribeToKeyboardUIStore */;
const env0_4 = {};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/keyboard/native/useKeyboardIsOpen.tsx');
exports.default = useKeyboardIsOpen;
exports.subscribeToKeyboardIsOpen = subscribeToKeyboardIsOpen;
exports.getKeyboardIsOpen = closure;
}
function getKeyboardIsOpen() { // fn#55431, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7174:111, offset: 0x013a7213, size: 177 bytes, params: 1, frame: 15
const value = a0;
const r1 = value !== undefined ? value : env0_4;
let includeCustomKeyboard = r1.includeCustomKeyboard;
includeCustomKeyboard = !(includeCustomKeyboard === undefined) && includeCustomKeyboard;
const appEntryKey = r1.appEntryKey;
const r3 = appEntryKey !== undefined ? appEntryKey : (require(1481) /* metro dependency 1481: AppEntryKeyContext */).DEFAULT_APP_ENTRY_KEY;
const defaultImport = importDefault(1482) /* metro dependency 1482: KeyboardUIStoreNative */;
const getState = defaultImport.getState;
const property = Reflect.apply(getState, defaultImport, []).byAppEntry[r3];
const systemKeyboardOpen = property.systemKeyboardOpen;
return includeCustomKeyboard ? systemKeyboardOpen || property.keyboardType !== (require(1583) /* metro dependency 1583: KeyboardTypes */).KeyboardTypes.SYSTEM : systemKeyboardOpen;
}
function useKeyboardIsOpen() { // fn#55432, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7174:440, offset: 0x013a72c4, size: 103 bytes, params: 1, frame: 14
const value = a0;
if ((value !== undefined ? value : env0_4).includeCustomKeyboard !== undefined) {
}
const env0_1 = (require(1481) /* metro dependency 1481: AppEntryKeyContext */).useAppEntryKey();
return (importDefault(1482) /* metro dependency 1482: KeyboardUIStoreNative */)(_fun55433);
}
function subscribeToKeyboardIsOpen(a0) { // fn#55434, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7174:702, offset: 0x013a738b, size: 104 bytes, params: 2, frame: 15
const value = a1;
const env0_0 = a0;
const r1 = value !== undefined ? value : env0_4;
if (r1.includeCustomKeyboard !== undefined) {
}
const appEntryKey = r1.appEntryKey;
return subscribeToKeyboardUIStore(_fun55435,
appEntryKey !== undefined ? appEntryKey : (require(1481) /* metro dependency 1481: AppEntryKeyContext */).DEFAULT_APP_ENTRY_KEY);
}
function _fun55433({byAppEntry}) { // fn#55433, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7174:546, offset: 0x013a732b, size: 96 bytes, params: 2, frame: 14
var r1;
var r0;
var keyboardType;
var value;
const property = byAppEntry[env0_1];
const includeCustomKeyboardBinding = includeCustomKeyboard;
const systemKeyboardOpen = property.systemKeyboardOpen;
if (includeCustomKeyboardBinding) {
if (systemKeyboardOpen) {
r1 = systemKeyboardOpen;
} else {
keyboardType = property.keyboardType;
value = environment.__proto__;
value = keyboardType !== (require(1583) /* metro dependency 1583: KeyboardTypes */).KeyboardTypes.SYSTEM;
r1 = value;
}
r0 = r1;
} else {
r0 = systemKeyboardOpen;
}
return r0;
}
function _fun55435() { // fn#55435, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7174:825, offset: 0x013a73f3, size: 48 bytes, params: 1, frame: 13
return env0_0(getKeyboardIsOpen({includeCustomKeyboard: includeCustomKeyboard, appEntryKey: env0_2}));
}
@@ -0,0 +1,135 @@
/* Metro module 4022; source: modules/keyboard/native/useKeyboardType.tsx; dependencies: [31, 1481, 1482, 4017, 1583, 2] */
function _fun33091(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#33091, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4180:6, offset: 0x0102776c, size: 208 bytes, params: 8, frame: 20
const env0_0 = require;
const closure = getKeyboardContextForType;
const closure2 = getKeyboardType;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/keyboard/native/useKeyboardType.tsx');
exports.default = useKeyboardType;
exports.getKeyboardContextForType = closure;
exports.useKeyboardContextForType = useKeyboardContextForType;
exports.getKeyboardType = closure2;
exports.getKeyboardTypePrevious = getKeyboardTypePrevious;
exports.useKeyboardTypePrevious = useKeyboardTypePrevious;
exports.useKeyboardTypeSharedValue = useKeyboardTypeSharedValue;
exports.useKeyboardWillOpenSharedValue = useKeyboardWillOpenSharedValue;
}
function getKeyboardContextForType(a0) { // fn#33092, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4180:106, offset: 0x0102783c, size: 96 bytes, params: 2, frame: 13
let value = a1;
const r1 = value !== undefined ? value : (require(1481) /* metro dependency 1481: AppEntryKeyContext */).DEFAULT_APP_ENTRY_KEY;
value = importDefault(1482) /* metro dependency 1482: KeyboardUIStoreNative */;
const getState = value.getState;
return Reflect.apply(getState, value, []).byAppEntry[r1].keyboardContexts[a0];
}
function getKeyboardType() { // fn#33093, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4180:236, offset: 0x0102789c, size: 89 bytes, params: 1, frame: 13
let value = a0;
const r1 = value !== undefined ? value : (require(1481) /* metro dependency 1481: AppEntryKeyContext */).DEFAULT_APP_ENTRY_KEY;
value = importDefault(1482) /* metro dependency 1482: KeyboardUIStoreNative */;
const getState = value.getState;
return Reflect.apply(getState, value, []).byAppEntry[r1].keyboardType;
}
function useKeyboardType() { // fn#33094, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4180:434, offset: 0x010278f5, size: 69 bytes, params: 1, frame: 14
const env0_0 = (require(1481) /* metro dependency 1481: AppEntryKeyContext */).useAppEntryKey();
return (importDefault(1482) /* metro dependency 1482: KeyboardUIStoreNative */)(_fun33095);
}
function useKeyboardContextForType(a0) { // fn#33096, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4180:625, offset: 0x01027956, size: 76 bytes, params: 2, frame: 14
const env0_0 = a0;
const env0_1 = (require(1481) /* metro dependency 1481: AppEntryKeyContext */).useAppEntryKey();
return (importDefault(1482) /* metro dependency 1482: KeyboardUIStoreNative */)(_fun33097);
}
function getKeyboardTypePrevious() { // fn#33098, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4180:812, offset: 0x010279c6, size: 89 bytes, params: 1, frame: 13
let value = a0;
const r1 = value !== undefined ? value : (require(1481) /* metro dependency 1481: AppEntryKeyContext */).DEFAULT_APP_ENTRY_KEY;
value = importDefault(1482) /* metro dependency 1482: KeyboardUIStoreNative */;
const getState = value.getState;
return Reflect.apply(getState, value, []).byAppEntry[r1].keyboardTypePrevious;
}
function useKeyboardTypePrevious() { // fn#33099, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4180:966, offset: 0x01027a1f, size: 69 bytes, params: 1, frame: 14
const env0_0 = (require(1481) /* metro dependency 1481: AppEntryKeyContext */).useAppEntryKey();
return (importDefault(1482) /* metro dependency 1482: KeyboardUIStoreNative */)(_fun33100);
}
function useKeyboardTypeSharedValue() { // fn#33101, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4180:1120, offset: 0x01027a80, size: 111 bytes, params: 1, frame: 16
const value2 = (require(1481) /* metro dependency 1481: AppEntryKeyContext */).useAppEntryKey();
const value3 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(getKeyboardType(value2));
env0_3.useEffect(_fun33102, [value2, value3]);
return value3;
}
function useKeyboardWillOpenSharedValue() { // fn#33104, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4180:1385, offset: 0x01027b53, size: 148 bytes, params: 1, frame: 19
const value2 = (require(1481) /* metro dependency 1481: AppEntryKeyContext */).useAppEntryKey();
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useSharedValue = reanimatedRexportModule.useSharedValue;
const getKeyboardContextForTypeBinding = getKeyboardContextForType;
const KeyboardTypes = (require(1583) /* metro dependency 1583: KeyboardTypes */).KeyboardTypes;
const SYSTEM = KeyboardTypes.SYSTEM;
const value3 = Reflect.apply(useSharedValue, reanimatedRexportModule, [getKeyboardContextForTypeBinding(SYSTEM,
value2).keyboardWillOpen === true]);
env0_3.useEffect(_fun33105, [value2, value3]);
return value3;
}
function _fun33095({byAppEntry}) { // fn#33095, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4180:508, offset: 0x0102793a, size: 28 bytes, params: 2, frame: 2
return byAppEntry[env0_0].keyboardType;
}
function _fun33097({byAppEntry}) { // fn#33097, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4180:710, offset: 0x010279a2, size: 36 bytes, params: 2, frame: 3
return byAppEntry[env0_1].keyboardContexts[env0_0];
}
function _fun33100({byAppEntry}) { // fn#33100, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4180:1048, offset: 0x01027a64, size: 28 bytes, params: 2, frame: 2
return byAppEntry[env0_0].keyboardTypePrevious;
}
function _fun33102() { // fn#33102, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4180:1254, offset: 0x01027aef, size: 45 bytes, params: 1, frame: 11
var environment;
const value = environment.__proto__;
return (require(1482) /* metro dependency 1482: KeyboardUIStoreNative */).addKeyboardTypeChangedListener(_fun33103);
}
function _fun33105() { // fn#33105, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4180:1584, offset: 0x01027be7, size: 45 bytes, params: 1, frame: 11
var environment;
const value = environment.__proto__;
return (require(1482) /* metro dependency 1482: KeyboardUIStoreNative */).addKeyboardWillOpenChangedListener(_fun33106);
}
function _fun33103({type}, a1) { // fn#33103, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4180:1298, offset: 0x01027b1c, size: 55 bytes, params: 3, frame: 12
var r0;
let value = a1 != null;
if (value) {
value = environment.__proto__;
value = a1 !== env1_0;
r0 = value;
} else {
r0 = value;
}
if (!r0) {
value = environment.__proto__;
env1_1.set(type);
}
}
function _fun33106(a0, a1) { // fn#33106, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4180:1632, offset: 0x01027c14, size: 50 bytes, params: 3, frame: 11
var r0;
let value = a1 != null;
if (value) {
value = environment.__proto__;
value = a1 !== env1_0;
r0 = value;
} else {
r0 = value;
}
if (!r0) {
value = environment.__proto__;
env1_1.set(a0);
}
}
@@ -0,0 +1,37 @@
/* Metro module 1851; source: modules/keyboard/native/useSystemKeyboardHeight.native.tsx; dependencies: [1481, 1482, 2] */
function _fun20008(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#20008, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1978:6, offset: 0x00ebc3fe, size: 125 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object = {excludeSafeAreaInsets: false};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/keyboard/native/useSystemKeyboardHeight.native.tsx');
exports.default = useSystemKeyboardHeight;
exports.getSystemKeyboardHeight = getSystemKeyboardHeight_20011;
}
function useSystemKeyboardHeight() { // fn#20009, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1978:227, offset: 0x00ebc47b, size: 102 bytes, params: 1, frame: 14
const value = a0;
if ((value !== undefined ? value : env0_3).excludeSafeAreaInsets !== undefined) {
}
const env0_1 = (require(1481) /* metro dependency 1481: AppEntryKeyContext */).useAppEntryKey();
return (importDefault(1482) /* metro dependency 1482: KeyboardUIStoreNative */)(_fun20010);
}
function getSystemKeyboardHeight_20011() { // fn#20011, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1978:461, offset: 0x00ebc50c, size: 128 bytes, params: 1, frame: 14
let value = a0;
const r1 = value !== undefined ? value : env0_3;
let excludeSafeAreaInsets = r1.excludeSafeAreaInsets;
excludeSafeAreaInsets = !(excludeSafeAreaInsets === undefined) && excludeSafeAreaInsets;
const appEntryKey = r1.appEntryKey;
const r2 = appEntryKey !== undefined ? appEntryKey : (require(1481) /* metro dependency 1481: AppEntryKeyContext */).DEFAULT_APP_ENTRY_KEY;
value = importDefault(1482) /* metro dependency 1482: KeyboardUIStoreNative */;
const getState = value.getState;
const property = Reflect.apply(getState, value, []).byAppEntry[r2];
return excludeSafeAreaInsets ? property.keyboardHeightExcludingSafeAreaInsets : property.keyboardHeight;
}
function _fun20010({byAppEntry}) { // fn#20010, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1978:339, offset: 0x00ebc4e1, size: 43 bytes, params: 2, frame: 3
const property = byAppEntry[env0_1];
return excludeSafeAreaInsets ? property.keyboardHeightExcludingSafeAreaInsets : property.keyboardHeight;
}