331 lines
15 KiB
React
331 lines
15 KiB
React
/* Metro module 421; source: unknown; dependencies: [29, 6, 7, 15, 17, 18, 31, 33, 282, 262, 112, 253] */
|
|
function _fun5896(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#5896, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:462:6, offset: 0x00ce9097, size: 299 bytes, params: 8, frame: 19
|
|
const env0_2 = ['onBlur', 'onFocus'];
|
|
const env0_3 = ['ref'];
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_4 = importDefault(29) /* metro dependency 29 */;
|
|
const env0_5 = importDefault(6) /* metro dependency 6 */;
|
|
const env0_6 = importDefault(7) /* metro dependency 7 */;
|
|
const env0_7 = importDefault(15) /* metro dependency 15 */;
|
|
const env0_8 = importDefault(17) /* metro dependency 17 */;
|
|
const env0_9 = importDefault(18) /* metro dependency 18 */;
|
|
const value = importAll(31) /* metro dependency 31 */;
|
|
const env0_11 = (require(31) /* metro dependency 31 */).cloneElement;
|
|
const value2 = require(33) /* metro dependency 33 */;
|
|
const env0_12 = value2.jsx;
|
|
const env0_13 = value2.jsxs;
|
|
const Component = value.Component;
|
|
const env0_14 = _fun5900(Component);
|
|
const closure = TouchableHighlight;
|
|
closure.displayName = 'TouchableHighlight';
|
|
exports.default = closure;
|
|
}
|
|
|
|
function _isNativeReflectConstruct_5897() { // fn#5897, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:462:255, offset: 0x00ce91c2, size: 94 bytes, params: 1, frame: 18
|
|
var Boolean;
|
|
var prototype;
|
|
var valueOf;
|
|
var call;
|
|
var Reflect;
|
|
var construct;
|
|
var closure;
|
|
var value;
|
|
var error;
|
|
try {
|
|
Boolean = global.Boolean;
|
|
prototype = Boolean.prototype;
|
|
valueOf = prototype.valueOf;
|
|
call = valueOf.call;
|
|
Reflect = global.Reflect;
|
|
construct = Reflect.construct;
|
|
Boolean = global.Boolean;
|
|
closure = function() {
|
|
};
|
|
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
|
|
value = Reflect.apply(call, valueOf, [value]);
|
|
var result = !value;
|
|
} catch (error) {
|
|
}
|
|
return (_isNativeReflectConstruct_5897_isNativeReflectConstruct = function() {
|
|
return !!result;
|
|
})();
|
|
}
|
|
|
|
function _fun5900(a0) { // fn#5900, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:462:480, offset: 0x00ce9220, size: 252 bytes, params: 2, frame: 16
|
|
const closure = TouchableHighlightImpl;
|
|
env0_9(closure, a0);
|
|
return env0_6(closure, [{key: '_createPressabilityConfig', value: value_5902}, {key: '_createExtraStyles',
|
|
value: function() {
|
|
return {child: {opacity: this.props.activeOpacity ?? 0.85},
|
|
underlay: {backgroundColor: this.props.underlayColor === undefined ? 'black' : this.props.underlayColor}};
|
|
}}, {key: '_showUnderlay', value: function() {
|
|
if (this._isMounted && this._hasPressHandler()) {
|
|
this.setState({extraStyles: this._createExtraStyles()});
|
|
if (this.props.onShowUnderlay != null) {
|
|
this.props.onShowUnderlay();
|
|
}
|
|
}
|
|
}}, {key: '_hideUnderlay', value: function() {
|
|
if (this._hideTimeout != null) {
|
|
global.clearTimeout(this._hideTimeout);
|
|
this._hideTimeout = null;
|
|
}
|
|
if (this.props.testOnly_pressed !== true && this._hasPressHandler()) {
|
|
this.setState({extraStyles: null});
|
|
if (this.props.onHideUnderlay != null) {
|
|
this.props.onHideUnderlay();
|
|
}
|
|
}
|
|
}}, {key: '_hasPressHandler', value: function() {
|
|
var r0;
|
|
r0 = this.props.onPress != null || this.props.onPressIn != null;
|
|
r0 = !r0 ? this.props.onPressOut != null : r0;
|
|
r0 = !r0 ? this.props.onLongPress != null : r0;
|
|
return r0;
|
|
}}, {key: 'render', value: value_5913}, {key: 'componentDidMount', value: function() {
|
|
this._isMounted = true;
|
|
this.state.pressability.configure(this._createPressabilityConfig());
|
|
}}, {key: 'componentDidUpdate', value: function(a0, a1) {
|
|
this.state.pressability.configure(this._createPressabilityConfig());
|
|
}}, {key: 'componentWillUnmount', value: function() {
|
|
this._isMounted = false;
|
|
if (this._hideTimeout != null) {
|
|
global.clearTimeout(this._hideTimeout);
|
|
}
|
|
this.state.pressability.reset();
|
|
}}]);
|
|
}
|
|
|
|
function TouchableHighlight(a0) { // fn#5917, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:462:6079, offset: 0x00ce9de3, size: 72 bytes, params: 2, frame: 18
|
|
const ref = a0.ref;
|
|
let binding = env0_4;
|
|
const value2 = binding(a0, env0_3);
|
|
binding = env0_14;
|
|
const Object = global.Object;
|
|
return ((Component) => <Component {...Object.assign({}, value2, {hostRef: ref})} />)(binding);
|
|
}
|
|
|
|
function TouchableHighlightImpl() { // fn#5901, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:462:492, offset: 0x00ce931c, size: 295 bytes, params: 1, frame: 20
|
|
var object2;
|
|
var r1;
|
|
var r6;
|
|
var r0;
|
|
var r2;
|
|
var value7;
|
|
var Reflect;
|
|
var construct;
|
|
var _createExtraStyles;
|
|
let value = environment.__proto__;
|
|
let binding = env1_5;
|
|
binding(this, TouchableHighlightImpl);
|
|
const length = arguments.length;
|
|
const Array = global.Array;
|
|
const array = new Array(length);
|
|
const value6 = 0;
|
|
if (value6 < length) {
|
|
r1 = value6;
|
|
reducibleLoop1: while (true) {
|
|
array[r1] = arguments[r1];
|
|
value7 = typeof r1 === 'bigint' ? r1 + 1n : +r1 + 1;
|
|
if (value7 < length) {
|
|
r1 = value7;
|
|
continue reducibleLoop1;
|
|
}
|
|
break reducibleLoop1;
|
|
}
|
|
}
|
|
const value8 = [].concat(array);
|
|
const value9 = env1_8(TouchableHighlightImpl);
|
|
binding = env1_7;
|
|
if (_isNativeReflectConstruct_5897()) {
|
|
Reflect = global.Reflect;
|
|
construct = Reflect.construct;
|
|
reducibleJoin6: while (true) {
|
|
if (value8) {
|
|
r6 = value8;
|
|
break reducibleJoin6;
|
|
}
|
|
r6 = [];
|
|
break reducibleJoin6;
|
|
}
|
|
r0 = Reflect.apply(construct, Reflect, [value9, r6, env1_8(this).constructor]);
|
|
} else {
|
|
r0 = value9.apply(this, value8);
|
|
}
|
|
const value12 = binding(this, r0);
|
|
value12._isMounted = false;
|
|
object2 = {};
|
|
value = importDefault(282) /* metro dependency 282 */;
|
|
value = new value(value12._createPressabilityConfig());
|
|
object2.pressability = value;
|
|
const testOnly_pressed = value12.props.testOnly_pressed;
|
|
value = null;
|
|
reducibleJoin9: while (true) {
|
|
if (testOnly_pressed !== true) {
|
|
r2 = value;
|
|
break reducibleJoin9;
|
|
}
|
|
_createExtraStyles = value12._createExtraStyles;
|
|
value = Reflect.apply(_createExtraStyles, value12, []);
|
|
r2 = value;
|
|
break reducibleJoin9;
|
|
}
|
|
object2.extraStyles = r2;
|
|
value12.state = object2;
|
|
return value12;
|
|
}
|
|
|
|
function value_5902() { // fn#5902, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:462:1072, offset: 0x00ce9443, size: 257 bytes, params: 1, frame: 6
|
|
let disabled = this.props.disabled;
|
|
disabled = disabled != null ? this.props.disabled : this.props.accessibilityState?.disabled;
|
|
return {cancelable: !this.props.rejectResponderTermination, disabled: disabled, hitSlop: this.props.hitSlop,
|
|
delayLongPress: this.props.delayLongPress, delayPressIn: this.props.delayPressIn,
|
|
delayPressOut: this.props.delayPressOut, minPressDuration: 0, pressRectOffset: this.props.pressRetentionOffset,
|
|
android_disableSound: this.props.touchSoundDisabled, onBlur: onBlur_5903, onFocus: onFocus_5904,
|
|
onLongPress: this.props.onLongPress, onPress: onPress_5905, onPressIn: onPressIn_5907,
|
|
onPressOut: onPressOut_5908};
|
|
}
|
|
|
|
function value_5913() { // fn#5913, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:462:3280, offset: 0x00ce9913, size: 1116 bytes, params: 1, frame: 29
|
|
var r14;
|
|
var accessibilityState;
|
|
var Object;
|
|
var assign;
|
|
let value = environment.__proto__;
|
|
const Children = env1_10.Children;
|
|
const only = Children.only;
|
|
let props = this.props;
|
|
const value2 = Reflect.apply(only, Children, [props.children]);
|
|
const eventHandlers = this.state.pressability.getEventHandlers();
|
|
eventHandlers.onBlur;
|
|
eventHandlers.onFocus;
|
|
const binding = env1_4;
|
|
const value4 = undefined;
|
|
const value5 = binding(eventHandlers, env1_2);
|
|
if (this.props.disabled != null) {
|
|
Object = global.Object;
|
|
assign = Object.assign;
|
|
props = this.props;
|
|
accessibilityState = props.accessibilityState;
|
|
props = this.props;
|
|
r14 = Reflect.apply(assign, Object, [{}, accessibilityState, {disabled: props.disabled}]);
|
|
} else {
|
|
r14 = this.props.accessibilityState;
|
|
}
|
|
let object3 = {};
|
|
object3.max = this.props['aria-valuemax'] ?? (this.props.accessibilityValue == null ? value4 : this.props.accessibilityValue.max);
|
|
object3.min = this.props['aria-valuemin'] ?? (this.props.accessibilityValue == null ? value4 : this.props.accessibilityValue.min);
|
|
object3.now = this.props['aria-valuenow'] ?? (this.props.accessibilityValue == null ? value4 : this.props.accessibilityValue.now);
|
|
object3.text = this.props['aria-valuetext'] ?? (this.props.accessibilityValue == null ? value4 : this.props.accessibilityValue.text);
|
|
const r0 = this.props['aria-live'] === 'off' ? 'none' : this.props['aria-live'] ?? this.props.accessibilityLiveRegion;
|
|
const r15 = this.props['aria-label'] ?? this.props.accessibilityLabel;
|
|
const defaultImport = importDefault(112) /* metro dependency 112 */;
|
|
Object = global.Object;
|
|
assign = Object.assign;
|
|
const object4 = {};
|
|
object4.accessible = this.props.accessible !== false;
|
|
object4.accessibilityLabel = r15;
|
|
const accessibilityHint = this.props.accessibilityHint;
|
|
object4.accessibilityHint = accessibilityHint;
|
|
object4.accessibilityLanguage = this.props.accessibilityLanguage;
|
|
object4.accessibilityRole = this.props.accessibilityRole;
|
|
object4.accessibilityState = r14;
|
|
object4.accessibilityValue = object3;
|
|
object4.accessibilityActions = this.props.accessibilityActions;
|
|
object4.onAccessibilityAction = this.props.onAccessibilityAction;
|
|
object4.importantForAccessibility = this.props['aria-hidden'] === true ? 'no-hide-descendants' : this.props.importantForAccessibility;
|
|
object4.accessibilityViewIsModal = this.props['aria-modal'] ?? this.props.accessibilityViewIsModal;
|
|
object4.accessibilityLiveRegion = r0;
|
|
object4.accessibilityElementsHidden = this.props['aria-hidden'] ?? this.props.accessibilityElementsHidden;
|
|
const defaultImport2 = importDefault(253) /* metro dependency 253 */;
|
|
let compose = defaultImport2.compose;
|
|
let style = this.props.style;
|
|
let extraStyles = this.state.extraStyles;
|
|
object4.style = Reflect.apply(compose, defaultImport2, [style, extraStyles == null ? value4 : extraStyles.underlay]);
|
|
object4.onLayout = this.props.onLayout;
|
|
object4.hitSlop = this.props.hitSlop;
|
|
object4.hasTVPreferredFocus = this.props.hasTVPreferredFocus;
|
|
object4.nextFocusDown = this.props.nextFocusDown;
|
|
object4.nextFocusForward = this.props.nextFocusForward;
|
|
object4.nextFocusLeft = this.props.nextFocusLeft;
|
|
object4.nextFocusRight = this.props.nextFocusRight;
|
|
object4.nextFocusUp = this.props.nextFocusUp;
|
|
object4.focusable = this.props.focusable !== false && value4 !== this.props.onPress && !this.props.disabled;
|
|
object4.nativeID = this.props.id ?? this.props.nativeID;
|
|
object4.testID = this.props.testID;
|
|
object4.ref = this.props.hostRef;
|
|
object3 = {};
|
|
const cloneElementBinding = cloneElement;
|
|
value = defaultImport2;
|
|
compose = value.compose;
|
|
style = value2.props.style;
|
|
extraStyles = this.state.extraStyles;
|
|
object3.children = [cloneElementBinding(value2, {style: Reflect.apply(compose, value, [style,
|
|
extraStyles == null ? value4 : extraStyles.child])}), null];
|
|
return ((Component) => <Component {...Reflect.apply(assign, Object, [object4, value5, object3])} />)(defaultImport);
|
|
}
|
|
|
|
function value_5902OnBlur(a0) { // fn#5903, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:462:1561, owner: value_5902.onBlur, offset: 0x00ce9544, size: 100 bytes, params: 2, frame: 12
|
|
if ((importDefault(262) /* metro dependency 262 */).isTV) {
|
|
env0_0._hideUnderlay();
|
|
}
|
|
if (env0_0.props.onBlur != null) {
|
|
env0_0.props.onBlur(a0);
|
|
}
|
|
}
|
|
|
|
function value_5902OnFocus(a0) { // fn#5904, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:462:1661, owner: value_5902.onFocus, offset: 0x00ce95a8, size: 100 bytes, params: 2, frame: 12
|
|
if ((importDefault(262) /* metro dependency 262 */).isTV) {
|
|
env0_0._showUnderlay();
|
|
}
|
|
if (env0_0.props.onFocus != null) {
|
|
env0_0.props.onFocus(a0);
|
|
}
|
|
}
|
|
|
|
function value_5902OnPress(a0) { // fn#5905, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:462:1799, owner: value_5902.onPress, offset: 0x00ce960c, size: 184 bytes, params: 2, frame: 17
|
|
var binding;
|
|
if (env0_0._hideTimeout != null) {
|
|
global.clearTimeout(env0_0._hideTimeout);
|
|
}
|
|
if (!(importDefault(262) /* metro dependency 262 */).isTV) {
|
|
binding = env0_0;
|
|
binding._showUnderlay();
|
|
binding._hideTimeout = global.setTimeout(_fun5906, binding.props.delayPressOut ?? 0);
|
|
}
|
|
if (env0_0.props.onPress != null) {
|
|
env0_0.props.onPress(a0);
|
|
}
|
|
}
|
|
|
|
function value_5902OnPressIn(a0) { // fn#5907, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:462:2060, owner: value_5902.onPressIn, offset: 0x00ce96d9, size: 106 bytes, params: 2, frame: 14
|
|
var clearTimeout;
|
|
var binding;
|
|
if (env0_0._hideTimeout != null) {
|
|
clearTimeout = global.clearTimeout;
|
|
binding = env0_0;
|
|
clearTimeout(binding._hideTimeout);
|
|
binding._hideTimeout = null;
|
|
}
|
|
binding = env0_0;
|
|
binding._showUnderlay();
|
|
if (binding.props.onPressIn != null) {
|
|
env0_0.props.onPressIn(a0);
|
|
}
|
|
}
|
|
|
|
function value_5902OnPressOut(a0) { // fn#5908, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:462:2231, owner: value_5902.onPressOut, offset: 0x00ce9743, size: 79 bytes, params: 2, frame: 12
|
|
if (env0_0._hideTimeout == null) {
|
|
env0_0._hideUnderlay();
|
|
}
|
|
if (env0_0.props.onPressOut != null) {
|
|
env0_0.props.onPressOut(a0);
|
|
}
|
|
}
|
|
|
|
function _fun5906() { // fn#5906, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:462:1938, offset: 0x00ce96c4, size: 21 bytes, params: 1, frame: 9
|
|
env1_0._hideUnderlay();
|
|
}
|
|
|