/* Metro module 416; source: unknown; dependencies: [29, 57, 31, 33, 144, 143, 48, 325, 262, 292, 147, 44, 289, 114, 253] */ function _fun5835(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#5835, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:457:6, offset: 0x00ce6ea7, size: 479 bytes, params: 8, frame: 19 var object2; const env0_2 = ['aria-busy', 'aria-checked', 'aria-disabled', 'aria-expanded', 'aria-selected', 'accessibilityState', 'id', 'tabIndex', 'selection', 'selectionColor', 'selectionHandleColor', 'cursorColor']; const env0_3 = ['onBlur', 'onFocus']; const env0_4 = ['ref', 'allowFontScaling', 'rejectResponderTermination', 'underlineColorAndroid', 'autoComplete', 'textContentType', 'readOnly', 'editable', 'enterKeyHint', 'returnKeyType', 'inputMode', 'showSoftInputOnFocus', 'keyboardType']; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); const env0_7 = importDefault(29) /* metro dependency 29 */; const env0_8 = importDefault(57) /* metro dependency 57 */; const env0_9 = importAll(31) /* metro dependency 31 */; const value = require(31) /* metro dependency 31 */; const env0_10 = value.useCallback; const env0_11 = value.useLayoutEffect; const env0_12 = value.useMemo; const env0_13 = value.useRef; const env0_14 = value.useState; const env0_15 = (require(33) /* metro dependency 33 */).jsx; const env0_5 = (require(144) /* metro dependency 144 */).default; const env0_6 = (require(144) /* metro dependency 144 */).Commands; const env0_16 = {'enter': 'default', 'done': 'done', 'go': 'go', 'next': 'next', 'previous': 'previous', 'search': 'search', 'send': 'send'}; const env0_17 = {'none': 'default', 'text': 'default', 'decimal': 'decimal-pad', 'numeric': 'number-pad', 'tel': 'phone-pad', 'search': 'default', 'email': 'email-address', 'url': 'url'}; const env0_18 = {'address-line1': 'postal-address-region', 'address-line2': 'postal-address-locality', 'bday': 'birthdate-full', 'bday-day': 'birthdate-day', 'bday-month': 'birthdate-month', 'bday-year': 'birthdate-year', 'cc-csc': 'cc-csc', 'cc-exp': 'cc-exp', 'cc-exp-month': 'cc-exp-month', 'cc-exp-year': 'cc-exp-year', 'cc-number': 'cc-number', 'country': 'postal-address-country', 'current-password': 'password', 'email': 'email', 'honorific-prefix': 'name-prefix', 'honorific-suffix': 'name-suffix', 'name': 'name', 'additional-name': 'name-middle', 'family-name': 'name-family', 'given-name': 'name-given', 'new-password': 'password-new', 'off': 'off', 'one-time-code': 'sms-otp', 'postal-code': 'postal-code', 'sex': 'gender', 'street-address': 'street-address', 'tel': 'tel', 'tel-country-code': 'tel-country-code', 'tel-national': 'tel-national', 'username': 'username'}; const closure = TextInput; closure.displayName = 'TextInput'; object2 = {}; object2.currentlyFocusedInput = (importDefault(143) /* metro dependency 143 */).currentlyFocusedInput; object2.currentlyFocusedField = (importDefault(143) /* metro dependency 143 */).currentlyFocusedField; object2.focusTextInput = (importDefault(143) /* metro dependency 143 */).focusTextInput; object2.blurTextInput = (importDefault(143) /* metro dependency 143 */).blurTextInput; closure.State = object2; (importDefault(253) /* metro dependency 253 */).create({multilineDefault: {paddingTop: 5}}); const env0_19 = {'auto': 'auto', 'top': 'top', 'bottom': 'bottom', 'middle': 'center'}; exports.default = closure; } function InternalTextInput(a0) { // fn#5836, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:457:653, offset: 0x00ce7086, size: 1612 bytes, params: 2, frame: 45 var defaultValue; var r12; var Commands2; var r23; var r24; var r13; var r8; var object2; var blurOnSubmit; const env0_0 = a0; const property = a0['aria-busy']; const property2 = a0['aria-checked']; const property3 = a0['aria-disabled']; const property4 = a0['aria-expanded']; const property5 = a0['aria-selected']; const accessibilityState = a0.accessibilityState; const id = a0.id; const tabIndex = a0.tabIndex; const selection = a0.selection; const selectionColor = a0.selectionColor; const selectionHandleColor = a0.selectionHandleColor; const cursorColor = a0.cursorColor; let binding = env0_7; const value2 = undefined; const value3 = binding(a0, env0_2); const value4 = null; const value5 = useRef(value4); let r6 = value4 == selection ? value4 : {start: selection.start, end: value4 != selection.end ? selection.end : selection.start}; if (typeof a0.value === 'string') { r12 = a0.value; } else { defaultValue = a0.defaultValue; defaultValue = typeof defaultValue !== 'string' ? value2 : a0.defaultValue; r12 = defaultValue; } if (Commands) { Commands2 = Commands; } else { a0.multiline; Commands2 = value2; } const value9 = env0_8(useState(0), 2); const property6 = value9[0]; const env0_3 = property6; const env0_4 = value9[1]; const value10 = useTextInputStateSynchronization({props: a0, inputRef: value5, mostRecentEventCount: property6, selection: r6, text: r12, viewCommands: Commands2}); const env0_5 = value10.setLastNativeText; const env0_6 = value10.setLastNativeSelection; useLayoutEffect(_fun5839, []); const value12 = (importDefault(325) /* metro dependency 325 */)(useCallback(_fun5841, [property6, Commands2]), a0.forwardedRef); const multiline = a0.multiline; r6 = value4 != multiline && multiline; let submitBehavior = a0.submitBehavior; if (value4 != submitBehavior) { if (r6) { submitBehavior = a0.submitBehavior; } else { submitBehavior = a0.submitBehavior; submitBehavior = submitBehavior === 'newline' ? 'blurAndSubmit' : a0.submitBehavior; } r23 = submitBehavior; } else { blurOnSubmit = a0.blurOnSubmit; r23 = r6 ? blurOnSubmit !== true ? 'newline' : 'blurAndSubmit' : blurOnSubmit === false ? 'submit' : 'blurAndSubmit'; } const accessible = a0.accessible; const value19 = a0.focusable !== false; const editable = a0.editable; var env0_7 = editable; const hitSlop = a0.hitSlop; const onPress = a0.onPress; const env0_9 = onPress; const value20 = useMemo(function() { return {hitSlop: hitSlop, onPress: _fun5847, onPressIn: onPressIn, onPressOut: onPressOut, cancelable: null}; }, [editable, hitSlop, onPress, a0.onPressIn, a0.onPressOut, a0.rejectResponderTermination]); let caretHidden = a0.caretHidden; caretHidden = (importDefault(262) /* metro dependency 262 */).isTesting || caretHidden; const value22 = (importDefault(292) /* metro dependency 292 */)(value20); value22.onBlur; value22.onFocus; const value23 = env0_7(value22, env0_3); let r29 = value4 == a0 ? value2 : a0['aria-label']; r29 = value4 == r29 ? value4 == a0 ? value2 : a0.accessibilityLabel : r29; r6 = value4 == accessibilityState && value4 == property && value4 == property2; r6 = r6 && value4 == property3 && value4 == property4 && value4 == property5; const r27 = r6 ? value2 : {busy: value4 != property ? property : value4 == accessibilityState ? value2 : accessibilityState.busy, checked: value4 != property2 ? property2 : value4 == accessibilityState ? value2 : accessibilityState.checked, disabled: value4 != property3 ? property3 : value4 == accessibilityState ? value2 : accessibilityState.disabled, expanded: value4 != property4 ? property4 : value4 == accessibilityState ? value2 : accessibilityState.expanded, selected: value4 != property5 ? property5 : value4 == accessibilityState ? value2 : accessibilityState.selected}; const style = a0.style; const value30 = (importDefault(147) /* metro dependency 147 */)(a0.style); if (value4 == value30) { r13 = style; } else { if (typeof (value4 == value30 ? value2 : value30.fontWeight) !== 'number') { r24 = value4; } else { object2 = {}; object2.fontWeight = value30.fontWeight.toString(); r24 = object2; } if (value4 == value30.verticalAlign) { r8 = r24; } else { r6 = r24 || ({}); r6.textAlignVertical = env0_19[value30.verticalAlign]; r6.verticalAlign = value2; r8 = r6; } r13 = value4 == r8 ? style : [style, r8]; } let autoCapitalize = a0.autoCapitalize; autoCapitalize = !autoCapitalize ? 'sentences' : autoCapitalize; let r28 = value4 == a0 ? value2 : a0['aria-labelledby']; r28 = value4 == r28 ? value4 == a0 ? value2 : a0.accessibilityLabelledBy : r28; const placeholder = a0.placeholder; const r14 = value4 != placeholder ? placeholder : ''; const children = a0.children; const Children = env0_9.Children; const value33 = Children.count(children); (importDefault(44) /* metro dependency 44 */)(!(value4 != a0.value && value33), 'Cannot specify both value and children.'); const r21 = value33 > 1 ? ((Component) => {children})(importDefault(289) /* metro dependency 289 */) : children; binding = env0_5; const Object = global.Object; const assign = Object.assign; const rows = a0.rows; return ((Component) => {((Component) => )(binding)})(importDefault(114) /* metro dependency 114 */); } function TextInput(a0) { // fn#5853, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:457:6444, offset: 0x00ce7d2a, size: 278 bytes, params: 2, frame: 31 const ref = a0.ref; const allowFontScaling = a0.allowFontScaling; const r20 = allowFontScaling === undefined || allowFontScaling; const rejectResponderTermination = a0.rejectResponderTermination; const r19 = rejectResponderTermination === undefined || rejectResponderTermination; const underlineColorAndroid = a0.underlineColorAndroid; const r18 = underlineColorAndroid === undefined ? 'transparent' : underlineColorAndroid; const autoComplete = a0.autoComplete; const textContentType = a0.textContentType; const readOnly = a0.readOnly; const editable = a0.editable; const enterKeyHint = a0.enterKeyHint; const returnKeyType = a0.returnKeyType; const inputMode = a0.inputMode; const showSoftInputOnFocus = a0.showSoftInputOnFocus; const keyboardType = a0.keyboardType; const value2 = env0_7(a0, env0_4); const Object = global.Object; return ( ); } function useTextInputStateSynchronization({props, mostRecentEventCount, selection, inputRef, text, viewCommands}) { // fn#5837, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:457:1133, owner: InternalTextInput.useTextInputStateSynchronization, offset: 0x00ce76d2, size: 259 bytes, params: 2, frame: 26 var environment; const value = environment.__proto__; const [property, property2] = env1_8(useState(props.value), 2); const [property3, property4] = env1_8(useState({selection: {'start': -1, 'end': -1}, mostRecentEventCount: mostRecentEventCount}), 2); useLayoutEffect(_fun5838, [mostRecentEventCount, inputRef, props.value, props.defaultValue, property, selection, property3.selection, text, viewCommands]); return {setLastNativeText: property2, setLastNativeSelection: property4}; } function _fun5839() { // fn#5839, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:457:1976, offset: 0x00ce7941, size: 71 bytes, params: 1, frame: 13 var environment; var value; const current = env0_1.current; if (current != null) { value = environment.__proto__; value = importDefault(143) /* metro dependency 143 */; value.registerInput(current); return _fun5840; } } function _fun5841(a0) { // fn#5841, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:457:2159, offset: 0x00ce79f3, size: 89 bytes, params: 2, frame: 15 var Object; env0_1.current = a0; if (a0 != null) { Object = global.Object; Object.assign(a0, {clear: clear_5842, isFocused: isFocused, getNativeRef: getNativeRef, setSelection: setSelection}); } } function _fun5846() { // fn#5846, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:457:2935, offset: 0x00ce7b07, size: 52 bytes, params: 1, frame: 3 return {hitSlop: hitSlop, onPress: onPress_5847, onPressIn: onPressIn, onPressOut: onPressOut, cancelable: null}; } function InternalTextInputOnBlur(a0) { // fn#5848, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:457:4704, owner: InternalTextInput.onBlur, offset: 0x00ce7b8a, size: 81 bytes, params: 2, frame: 13 let value = environment.__proto__; value = importDefault(143) /* metro dependency 143 */; value.blurInput(env0_1.current); if (env0_0.onBlur) { env0_0.onBlur(a0); } } function InternalTextInputOnChange(a0) { // fn#5849, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:457:4785, owner: InternalTextInput.onChange, offset: 0x00ce7bdb, size: 124 bytes, params: 2, frame: 13 const text = a0.nativeEvent.text; if (env0_0.onChange) { env0_0.onChange(a0); } if (env0_0.onChangeText) { env0_0.onChangeText(text); } if (env0_1.current != null) { setLastNativeText(text); env0_4(a0.nativeEvent.eventCount); } } function InternalTextInputOnFocus(a0) { // fn#5850, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:457:4953, owner: InternalTextInput.onFocus, offset: 0x00ce7c57, size: 81 bytes, params: 2, frame: 13 let value = environment.__proto__; value = importDefault(143) /* metro dependency 143 */; value.focusInput(env0_1.current); if (env0_0.onFocus) { env0_0.onFocus(a0); } } function InternalTextInputOnScroll(a0) { // fn#5851, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:457:5038, owner: InternalTextInput.onScroll, offset: 0x00ce7ca8, size: 38 bytes, params: 2, frame: 11 if (env0_0.onScroll) { env0_0.onScroll(a0); } } function InternalTextInputOnSelectionChange(a0) { // fn#5852, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:457:5105, owner: InternalTextInput.onSelectionChange, offset: 0x00ce7cce, size: 92 bytes, params: 2, frame: 12 if (env0_0.onSelectionChange) { env0_0.onSelectionChange(a0); } if (env0_1.current != null) { setLastNativeSelection({selection: a0.nativeEvent.selection, mostRecentEventCount: env0_3}); } } function _fun5838() { // fn#5838, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:457:1411, offset: 0x00ce77d5, size: 364 bytes, params: 1, frame: 24 var start; var mostRecentEventCountBinding; var current; var viewCommandsBinding; var setTextAndSelection; var textBinding; var value12; var value13; const object2 = {}; if (env0_6 !== props.value && typeof props.value === 'string') { propsBinding = props; object2.text = propsBinding.value; env0_7(propsBinding.value); } if (selection && selection && (selection.start !== selection.start || selection.end !== selection.end)) { selectionBinding = selection; object2.selection = selectionBinding; env0_8({selection: selectionBinding, mostRecentEventCount: mostRecentEventCount}); } const Object = global.Object; if (Object.keys(object2).length !== 0 && inputRef.current != null) { viewCommandsBinding = viewCommands; setTextAndSelection = viewCommandsBinding.setTextAndSelection; current = inputRef.current; mostRecentEventCountBinding = mostRecentEventCount; textBinding = text; selectionBinding = selection; value12 = undefined; start = selectionBinding == null ? value12 : selection.start; value13 = -1; Reflect.apply(setTextAndSelection, viewCommandsBinding, [current, mostRecentEventCountBinding, textBinding, start ?? value13, (selection == null ? value12 : selection.end) ?? value13]); } } function _fun5840() { // fn#5840, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:457:2046, offset: 0x00ce7988, size: 107 bytes, params: 1, frame: 17 let value = environment.__proto__.__proto__; const defaultImport = importDefault(143) /* metro dependency 143 */; const unregisterInput = defaultImport.unregisterInput; const currentBinding = current; Reflect.apply(unregisterInput, defaultImport, [currentBinding]); const defaultImport2 = defaultImport; if (defaultImport2.currentlyFocusedInput() === currentBinding) { value = importDefault(48) /* metro dependency 48 */; value = value(current); value.blur(); } } function clear_5842() { // fn#5842, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:457:2215, offset: 0x00ce7a4c, size: 60 bytes, params: 1, frame: 18 if (env1_1.current != null) { Commands.setTextAndSelection(env1_1.current, env1_3, '', 0, 0); } } function isFocused() { // fn#5843, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:457:2302, offset: 0x00ce7a88, size: 53 bytes, params: 1, frame: 11 let value = environment.__proto__.__proto__; value = importDefault(143) /* metro dependency 143 */; value = value.currentlyFocusedInput(); return value === env1_1.current; } function setSelection(a0, a1) { // fn#5845, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:457:2443, offset: 0x00ce7acb, size: 60 bytes, params: 3, frame: 19 if (env1_1.current != null) { Commands.setTextAndSelection(env1_1.current, env1_3, null, a0, a1); } } function onPress_5847(a0) { // fn#5847, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:457:2972, offset: 0x00ce7b3b, size: 79 bytes, params: 2, frame: 13 if (onPress != null) { onPress(a0); } if (editable !== false && env1_1.current != null) { env1_1.current.focus(); } }