167 lines
9.1 KiB
React
167 lines
9.1 KiB
React
/* Metro module 5391; source: unknown; dependencies: [29, 6, 7, 15, 17, 18, 31, 27, 33, 5388] */
|
|
import ClassCallCheck from './module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
|
|
import CreateClass from './module-00007-CreateClass.js'; /* Metro dependency 7 */
|
|
import PossibleConstructorReturn from './module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
|
|
import Module00017 from './module-00017.js'; /* Metro dependency 17 */
|
|
import Inherits from './module-00018-Inherits.js'; /* Metro dependency 18 */
|
|
import ObjectWithoutProperties from './module-00029-ObjectWithoutProperties.js'; /* Metro dependency 29 */
|
|
import * as ReactNativeModule from './module-00027-ReactNative.js'; /* Metro dependency 27 */
|
|
import * as ReactModule from './module-00031-React.js'; /* Metro dependency 31 */
|
|
import * as JsxRuntimeModule from './module-00033-JsxRuntime.js'; /* Metro dependency 33 */
|
|
import * as TOUCHABLE_STATEModule from './module-05388-TOUCHABLE_STATE.jsx'; /* Metro dependency 5388 */
|
|
|
|
function _fun47580(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#47580, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5569:6, offset: 0x011c4c1a, size: 340 bytes, params: 8, frame: 20
|
|
const env0_0 = require;
|
|
const env0_3 = ['style'];
|
|
let Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const Component = (ReactModule).Component;
|
|
let value = ReactNativeModule;
|
|
const env0_11 = value.StyleSheet;
|
|
const env0_12 = value.View;
|
|
value = _fun47584(Component);
|
|
Object = global.Object;
|
|
value.defaultProps = Object.assign({}, (importDefault(5388) /* metro dependency 5388 */).defaultProps,
|
|
{'activeOpacity': 0.85, 'delayPressOut': 100, 'underlayColor': 'black'});
|
|
exports.default = value;
|
|
function _isNativeReflectConstruct_47581() { // fn#47581, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5569:252, offset: 0x011c4d6e, 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_47581_isNativeReflectConstruct = function() {
|
|
return !!result;
|
|
})();
|
|
}
|
|
|
|
function _fun47584(a0) { // fn#47584, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5569:477, offset: 0x011c4dcc, size: 93 bytes, params: 2, frame: 16
|
|
const TouchableHighlight_475852 = TouchableHighlight_47585;
|
|
Inherits(TouchableHighlight_475852, a0);
|
|
return CreateClass(TouchableHighlight_475852, [{key: 'renderChildren', value: value_47590}, {key: 'render',
|
|
value: value_47591}]);
|
|
function TouchableHighlight_47585(a0) { // fn#47585, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5569:489, offset: 0x011c4e29, size: 185 bytes, params: 2, frame: 20
|
|
var environment;
|
|
let value = environment.__proto__;
|
|
env1_5(this, TouchableHighlight_47585);
|
|
const items2 = [a0];
|
|
const value3 = env1_8(TouchableHighlight_47585);
|
|
value = env1_7(this, _isNativeReflectConstruct_47581() ? global.Reflect.construct(value3, items2,
|
|
env1_8(this).constructor) : value3.apply(this, items2));
|
|
value.showUnderlay = showUnderlay;
|
|
value.hasPressHandler = hasPressHandler;
|
|
value.hideUnderlay = hideUnderlay;
|
|
value.onStateChange = onStateChange;
|
|
value.state = {'extraChildStyle': null, 'extraUnderlayStyle': null};
|
|
return value;
|
|
function showUnderlay() { // fn#47586, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5569:738, owner: TouchableHighlight_47585.showUnderlay, offset: 0x011c4ee2, size: 121 bytes, params: 1, frame: 14
|
|
var setState;
|
|
var object;
|
|
var props;
|
|
let binding = env0_0;
|
|
if (binding.hasPressHandler()) {
|
|
binding = env0_0;
|
|
setState = binding.setState;
|
|
object = {};
|
|
props = binding.props;
|
|
object.extraChildStyle = {opacity: props.activeOpacity};
|
|
props = binding.props;
|
|
object.extraUnderlayStyle = {backgroundColor: props.underlayColor};
|
|
Reflect.apply(setState, binding, [object]);
|
|
props = binding.props;
|
|
if (props.onShowUnderlay != null) {
|
|
env0_0.props.onShowUnderlay();
|
|
}
|
|
}
|
|
}
|
|
|
|
function hasPressHandler() { // fn#47587, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5569:967, owner: TouchableHighlight_47585.hasPressHandler, offset: 0x011c4f5b, size: 73 bytes, params: 1, frame: 3
|
|
let r0 = env0_0.props.onPress || env0_0.props.onPressIn;
|
|
r0 = !r0 ? env0_0.props.onPressOut : r0;
|
|
r0 = !r0 ? env0_0.props.onLongPress : r0;
|
|
return r0;
|
|
}
|
|
|
|
function hideUnderlay() { // fn#47588, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5569:1077, owner: TouchableHighlight_47585.hideUnderlay, offset: 0x011c4fa4, size: 72 bytes, params: 1, frame: 13
|
|
const binding = env0_0;
|
|
binding.setState({'extraChildStyle': null, 'extraUnderlayStyle': null});
|
|
if (binding.props.onHideUnderlay != null) {
|
|
env0_0.props.onHideUnderlay();
|
|
}
|
|
}
|
|
|
|
function TouchableHighlight_47585OnStateChange(a0, a1) { // fn#47589, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5569:1219, owner: TouchableHighlight_47585.onStateChange, offset: 0x011c4fec, size: 154 bytes, params: 3, frame: 14
|
|
const value = environment.__proto__.__proto__;
|
|
const TOUCHABLE_STATE = (TOUCHABLE_STATEModule).TOUCHABLE_STATE;
|
|
const BEGAN = TOUCHABLE_STATE.BEGAN;
|
|
if (a1 === BEGAN) {
|
|
env0_0.showUnderlay();
|
|
} else if (!(a1 !== TOUCHABLE_STATE.UNDETERMINED && a1 !== TOUCHABLE_STATE.MOVED_OUTSIDE)) {
|
|
env0_0.hideUnderlay();
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
function value_47590() { // fn#47590, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5569:1525, offset: 0x011c5086, size: 127 bytes, params: 1, frame: 17
|
|
var binding;
|
|
var Children;
|
|
var only;
|
|
var value2;
|
|
var cloneElement;
|
|
var compose;
|
|
let props = this.props;
|
|
if (props.children) {
|
|
binding = env1_10;
|
|
Children = binding.Children;
|
|
only = Children.only;
|
|
props = this.props;
|
|
value2 = Reflect.apply(only, Children, [props.children]);
|
|
cloneElement = binding.cloneElement;
|
|
compose = StyleSheet.compose;
|
|
props = value2.props;
|
|
return Reflect.apply(cloneElement, binding, [value2, {style: Reflect.apply(compose, StyleSheet, [props.style,
|
|
this.state.extraChildStyle])}]);
|
|
}
|
|
return <View />;
|
|
}
|
|
|
|
function value_47591() { // fn#47591, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5569:1740, offset: 0x011c5105, size: 148 bytes, params: 1, frame: 21
|
|
const props = this.props;
|
|
const style = props.style;
|
|
const r10 = style !== undefined ? style : {};
|
|
let value = environment.__proto__;
|
|
const value2 = env1_4(props, env1_3);
|
|
const extraUnderlayStyle = this.state.extraUnderlayStyle;
|
|
value = importDefault(5388) /* metro dependency 5388 */;
|
|
const Object = global.Object;
|
|
return ((Component) => <Component {...Object.assign({}, value2, {style: [r10, extraUnderlayStyle],
|
|
onStateChange: this.onStateChange, children: this.renderChildren()})} />)(value);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun47580, 5391, [29, 6, 7, 15, 17, 18, 31, 27, 33,
|
|
5388]) /* metro module 5391, dependencies: [29, 6, 7, 15, 17, 18, 31, 27, 33, 5388] */;
|