/* Metro module 5383; source: unknown; dependencies: [29, 6, 7, 15, 17, 18, 31, 27, 33, 5355, 5384, 5326, 5325] */ function _fun47506(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#47506, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5561:6, offset: 0x011c28d0, size: 640 bytes, params: 8, frame: 23 const env0_0 = require; const env0_2 = ['rippleColor', 'style']; const env0_3 = ['children', 'style']; const env0_4 = ['children', 'style', 'innerRef']; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); const env0_5 = importDefault(29) /* metro dependency 29 */; const env0_6 = importDefault(6) /* metro dependency 6 */; const env0_7 = importDefault(7) /* metro dependency 7 */; const env0_8 = importDefault(15) /* metro dependency 15 */; const env0_9 = importDefault(17) /* metro dependency 17 */; const env0_10 = importDefault(18) /* metro dependency 18 */; let value = importAll(31) /* metro dependency 31 */; const value2 = require(27) /* metro dependency 27 */; const Animated = value2.Animated; value2.Platform; const env0_12 = value2.processColor; const StyleSheet = value2.StyleSheet; const value3 = require(33) /* metro dependency 33 */; const env0_14 = value3.jsx; const env0_15 = value3.jsxs; const value6 = (importDefault(5355) /* metro dependency 5355 */)(importDefault(5384) /* metro dependency 5384 */, {'shouldCancelWhenOutside': false, 'shouldActivateOnStart': false}); let Component = value.Component; const value7 = _fun47511(Component); value7.defaultProps = {delayLongPress: 600}; const env0_19 = Animated.createAnimatedComponent(value7); const value8 = value.forwardRef(_fun47518); const env0_21 = value.forwardRef(_fun47519); const env0_22 = StyleSheet.create({underlay: {'position': 'absolute', 'left': 0, 'right': 0, 'bottom': 0, 'top': 0}}); Component = value.Component; _fun47520(Component).defaultProps = {'activeOpacity': 0.105, 'underlayColor': 'black'}; const value10 = value.forwardRef(_fun47524); Component = value.Component; _fun47525(Component).defaultProps = {'activeOpacity': 0.3, 'borderless': true}; value = value.forwardRef(_fun47529); exports.RawButton = value6; exports.BaseButton = value8; exports.RectButton = value10; exports.BorderlessButton = value; exports.PureNativeButton = importDefault(5384) /* metro dependency 5384 */; } function _callSuper_47507(a0, a1, a2) { // fn#47507, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5561:350, offset: 0x011c2b50, size: 100 bytes, params: 4, frame: 20 var r0; var Reflect; let value = a2; const value3 = env0_9(a1); const binding = env0_8; if (_isNativeReflectConstruct_47508()) { Reflect = global.Reflect; value = Reflect.construct(value3, value || [], env0_9(a0).constructor); r0 = value; } else { value = value3.apply(a0, value); r0 = value; } return binding(a0, r0); } function _isNativeReflectConstruct_47508() { // fn#47508, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5561:481, offset: 0x011c2bb4, 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_47508_isNativeReflectConstruct = function() { return !!result; })(); } function _fun47511(a0) { // fn#47511, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5561:787, offset: 0x011c2c12, size: 68 bytes, params: 2, frame: 15 const closure = InnerBaseButton; env0_10(closure, a0); return env0_7(closure, [{key: 'render', value: value_47517}]); } function _fun47518(a0, a1) { // fn#47518, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5561:2472, offset: 0x011c30eb, size: 53 bytes, params: 3, frame: 15 const binding = env0_18; const Object = global.Object; return ((Component) => )(binding); } function _fun47519(a0, a1) { // fn#47519, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5561:2547, offset: 0x011c3120, size: 53 bytes, params: 3, frame: 15 const binding = env0_19; const Object = global.Object; return ((Component) => )(binding); } function _fun47520(a0) { // fn#47520, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5561:2683, offset: 0x011c3155, size: 68 bytes, params: 2, frame: 15 const closure = InnerRectButton; env0_10(closure, a0); return env0_7(closure, [{key: 'render', value: value_47523}]); } function _fun47524(a0, a1) { // fn#47524, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5561:3620, offset: 0x011c3344, size: 53 bytes, params: 3, frame: 15 const binding = env0_23; const Object = global.Object; return ((Component) => )(binding); } function _fun47525(a0) { // fn#47525, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5561:3681, offset: 0x011c3379, size: 68 bytes, params: 2, frame: 15 const closure = InnerBorderlessButton; env0_10(closure, a0); return env0_7(closure, [{key: 'render', value: value_47528}]); } function _fun47529(a0, a1) { // fn#47529, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5561:4302, offset: 0x011c349f, size: 53 bytes, params: 3, frame: 15 const binding = env0_24; const Object = global.Object; return ((Component) => )(binding); } function InnerBaseButton(a0) { // fn#47512, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5561:799, offset: 0x011c2c56, size: 113 bytes, params: 2, frame: 17 var environment; let value = environment.__proto__; env1_6(this, InnerBaseButton); value = _callSuper_47507(this, InnerBaseButton, [a0]); value.handleEvent = handleEvent_47513; value.onLongPress = onLongPress_47514; value.onHandlerStateChange = onHandlerStateChange; value.onGestureEvent = onGestureEvent; value.lastActive = false; value.longPressDetected = false; return value; } function value_47517() { // fn#47517, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5561:2067, offset: 0x011c3016, size: 213 bytes, params: 1, frame: 21 const props = this.props; const rippleColor = props.rippleColor; const style = props.style; let binding = env1_5; const value2 = undefined; const value3 = binding(props, env1_2); env1_17 = env1_17 === null ? (require(5325) /* metro dependency 5325 */).isFabric() : env1_17; const r0 = env1_17 ? rippleColor : processColor(rippleColor ?? value2); binding = env1_16; const Object = global.Object; return ((Component) => )(binding); } function InnerRectButton(a0) { // fn#47521, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5561:2695, offset: 0x011c3199, size: 104 bytes, params: 2, frame: 18 var environment; const value = environment.__proto__; env1_6(this, InnerRectButton); const value3 = _callSuper_47507(this, InnerRectButton, [a0]); value3.onActiveStateChange = onActiveStateChange; const Value = Animated.Value; value3.opacity = new Value(0); return value3; } function value_47523() { // fn#47523, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5561:2994, offset: 0x011c3234, size: 272 bytes, params: 1, frame: 26 const props = this.props; const children = props.children; const style = props.style; const value = environment.__proto__; let binding = env1_5; const value2 = binding(props, env1_3); const r13 = StyleSheet.flatten(style) ?? ({}); binding = env1_20; const Object = global.Object; const assign = Object.assign; const object2 = {ref: this.props.innerRef, style: r13, onActiveStateChange: this.onActiveStateChange}; const View = Animated.View; object2.children = [, children]; return ((Component) => )(binding); } function InnerBorderlessButton(a0) { // fn#47526, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5561:3693, offset: 0x011c33bd, size: 105 bytes, params: 2, frame: 18 var environment; const value = environment.__proto__; env1_6(this, InnerBorderlessButton); const value3 = _callSuper_47507(this, InnerBorderlessButton, [a0]); value3.onActiveStateChange = onActiveStateChange; const Value = Animated.Value; value3.opacity = new Value(1); return value3; } function value_47528() { // fn#47528, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5561:4022, offset: 0x011c3426, size: 121 bytes, params: 1, frame: 21 const props = this.props; const children = props.children; const style = props.style; const innerRef = props.innerRef; let binding = env1_5; const value2 = binding(props, env1_4); binding = env1_21; const Object = global.Object; return ((Component) => )(binding); } function InnerBaseButtonHandleEvent({nativeEvent}) { // fn#47513, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5561:917, owner: InnerBaseButton.handleEvent, offset: 0x011c2cc7, size: 660 bytes, params: 2, frame: 20 var r1; var r5; var r4; var value; const State = (require(5326) /* metro dependency 5326 */).State; var value8; var binding; var value9; var value12; var clearTimeout; const state = nativeEvent.state; const oldState = nativeEvent.oldState; const pointerInside = nativeEvent.pointerInside; if (pointerInside) { value = environment.__proto__.__proto__; value = state === State.ACTIVE; r1 = value; } else { r1 = pointerInside; } if (r1 !== env0_0.lastActive && env0_0.props.onActiveStateChange) { env0_0.props.onActiveStateChange(r1); } let r2 = !env0_0.longPressDetected && oldState === State.ACTIVE && state !== State.CANCELLED; r2 = r2 && env0_0.lastActive && env0_0.props.onPress; if (r2) { env0_0.props.onPress(pointerInside); } if (env0_0.lastActive) { value9 = environment.__proto__.__proto__; r2 = state !== State.ACTIVE || pointerInside; r2 = !r2 ? env0_0.longPressTimeout === undefined : r2; if (r2) { value12 = env0_0.longPressTimeout === undefined; if (value12) { r4 = value12; } else { r5 = state !== State.END && state !== State.CANCELLED; r5 = r5 && state !== State.FAILED; r4 = r5; } r2 = r4; } if (!r2) { clearTimeout = global.clearTimeout; binding = env0_0; clearTimeout(binding.longPressTimeout); binding.longPressTimeout = undefined; } } else { value8 = environment.__proto__.__proto__; if (state !== State.BEGAN) { value9 = environment.__proto__.__proto__; r2 = state !== State.ACTIVE || pointerInside; r2 = !r2 ? env0_0.longPressTimeout === undefined : r2; if (r2) { value12 = env0_0.longPressTimeout === undefined; if (value12) { r4 = value12; } else { r5 = state !== State.END && state !== State.CANCELLED; r5 = r5 && state !== State.FAILED; r4 = r5; } r2 = r4; } if (!r2) { clearTimeout = global.clearTimeout; binding = env0_0; clearTimeout(binding.longPressTimeout); binding.longPressTimeout = undefined; } } else if (pointerInside) { binding = env0_0; binding.longPressDetected = false; if (binding.props.onLongPress) { binding = env0_0; binding.longPressTimeout = global.setTimeout(binding.onLongPress, binding.props.delayLongPress); } } else { value9 = environment.__proto__.__proto__; r2 = state !== State.ACTIVE || pointerInside; r2 = !r2 ? env0_0.longPressTimeout === undefined : r2; if (r2) { value12 = env0_0.longPressTimeout === undefined; if (value12) { r4 = value12; } else { r5 = state !== State.END && state !== State.CANCELLED; r5 = r5 && state !== State.FAILED; r4 = r5; } r2 = r4; } if (!r2) { clearTimeout = global.clearTimeout; binding = env0_0; clearTimeout(binding.longPressTimeout); binding.longPressTimeout = undefined; } } } env0_0.lastActive = r1; } function InnerBaseButtonOnLongPress() { // fn#47514, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5561:1651, owner: InnerBaseButton.onLongPress, offset: 0x011c2f5b, size: 55 bytes, params: 1, frame: 10 const binding = env0_0; binding.longPressDetected = true; if (binding.props.onLongPress != null) { env0_0.props.onLongPress(); } } function InnerBaseButtonOnHandlerStateChange(a0) { // fn#47515, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5561:1758, owner: InnerBaseButton.onHandlerStateChange, offset: 0x011c2f92, size: 66 bytes, params: 2, frame: 12 if (env0_0.props.onHandlerStateChange != null) { env0_0.props.onHandlerStateChange(a0); } env0_0.handleEvent(a0); } function InnerBaseButtonOnGestureEvent(a0) { // fn#47516, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5561:1873, owner: InnerBaseButton.onGestureEvent, offset: 0x011c2fd4, size: 66 bytes, params: 2, frame: 12 if (env0_0.props.onGestureEvent != null) { env0_0.props.onGestureEvent(a0); } env0_0.handleEvent(a0); } function InnerRectButtonOnActiveStateChange(a0) { // fn#47522, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5561:2821, owner: InnerRectButton.onActiveStateChange, offset: 0x011c3201, size: 51 bytes, params: 2, frame: 11 if (env0_0.props.onActiveStateChange != null) { env0_0.props.onActiveStateChange(a0); } }