188 lines
11 KiB
React
188 lines
11 KiB
React
/* Metro module 454; source: unknown; dependencies: [455, 359] */
|
|
function _fun6052(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#6052, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:495:6, offset: 0x00ced043, size: 251 bytes, params: 8, frame: 18
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_2 = (require(455) /* metro dependency 455 */).default.currentCentroidXOfTouchesChangedAfter;
|
|
const env0_3 = (require(455) /* metro dependency 455 */).default.currentCentroidYOfTouchesChangedAfter;
|
|
const env0_4 = (require(455) /* metro dependency 455 */).default.previousCentroidXOfTouchesChangedAfter;
|
|
const env0_5 = (require(455) /* metro dependency 455 */).default.previousCentroidYOfTouchesChangedAfter;
|
|
const env0_6 = (require(455) /* metro dependency 455 */).default.currentCentroidX;
|
|
const env0_7 = (require(455) /* metro dependency 455 */).default.currentCentroidY;
|
|
exports.default = {_initializeGestureState: function(a0) {
|
|
a0.moveX = 0;
|
|
a0.moveY = 0;
|
|
a0.x0 = 0;
|
|
a0.y0 = 0;
|
|
a0.dx = 0;
|
|
a0.dy = 0;
|
|
a0.vx = 0;
|
|
a0.vy = 0;
|
|
a0.numberActiveTouches = 0;
|
|
a0._accountsForMovesUpTo = 0;
|
|
}, _updateGestureStateOnMove: _updateGestureStateOnMove, create: create_6056};
|
|
}
|
|
|
|
function clearInteractionHandle_6053(a0, a1, a2, a3) { // fn#6053, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:495:3453, offset: 0x00ced13e, size: 91 bytes, params: 5, frame: 14
|
|
var property;
|
|
if (a0.handle) {
|
|
property = (require(359) /* metro dependency 359 */).default;
|
|
property.clearInteractionHandle(a0.handle);
|
|
a0.handle = null;
|
|
}
|
|
if (a1) {
|
|
a1(a2, a3);
|
|
}
|
|
}
|
|
|
|
function _updateGestureStateOnMove(a0, a1) { // fn#6055, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:495:594, offset: 0x00ced1de, size: 215 bytes, params: 3, frame: 17
|
|
a0.numberActiveTouches = a1.numberActiveTouches;
|
|
const currentCentroidXOfTouchesChangedAfterBinding = currentCentroidXOfTouchesChangedAfter;
|
|
let _accountsForMovesUpTo = a0._accountsForMovesUpTo;
|
|
a0.moveX = currentCentroidXOfTouchesChangedAfterBinding(a1, _accountsForMovesUpTo);
|
|
const currentCentroidYOfTouchesChangedAfterBinding = currentCentroidYOfTouchesChangedAfter;
|
|
a0.moveY = currentCentroidYOfTouchesChangedAfterBinding(a1, a0._accountsForMovesUpTo);
|
|
_accountsForMovesUpTo = a0._accountsForMovesUpTo;
|
|
const value2 = previousCentroidXOfTouchesChangedAfter(a1, _accountsForMovesUpTo);
|
|
const value3 = currentCentroidXOfTouchesChangedAfterBinding(a1, _accountsForMovesUpTo);
|
|
let value = previousCentroidYOfTouchesChangedAfter(a1, _accountsForMovesUpTo);
|
|
const value4 = currentCentroidYOfTouchesChangedAfterBinding(a1, _accountsForMovesUpTo);
|
|
const value5 = a0.dx + (value3 - value2);
|
|
value = a0.dy + (value4 - value);
|
|
const value6 = a1.mostRecentTimeStamp - a0._accountsForMovesUpTo;
|
|
a0.vx = (value5 - a0.dx) / value6;
|
|
a0.vy = (value - a0.dy) / value6;
|
|
a0.dx = value5;
|
|
a0.dy = value;
|
|
a0._accountsForMovesUpTo = a1.mostRecentTimeStamp;
|
|
}
|
|
|
|
function create_6056(a0) { // fn#6056, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:495:992, offset: 0x00ced2b5, size: 201 bytes, params: 2, frame: 11
|
|
const env0_0 = a0;
|
|
let object2 = {handle: null};
|
|
object2 = {'stateID': null, 'moveX': 0, 'moveY': 0, 'x0': 0, 'y0': 0, 'dx': 0, 'dy': 0, 'vx': 0, 'vy': 0,
|
|
'numberActiveTouches': 0, '_accountsForMovesUpTo': 0};
|
|
const Math = global.Math;
|
|
object2.stateID = Math.random();
|
|
return {panHandlers: {onStartShouldSetResponder: onStartShouldSetResponder,
|
|
onMoveShouldSetResponder: onMoveShouldSetResponder,
|
|
onStartShouldSetResponderCapture: onStartShouldSetResponderCapture,
|
|
onMoveShouldSetResponderCapture: onMoveShouldSetResponderCapture, onResponderGrant: onResponderGrant,
|
|
onResponderReject: onResponderReject, onResponderRelease: onResponderRelease,
|
|
onResponderStart: onResponderStart, onResponderMove: onResponderMove, onResponderEnd: onResponderEnd,
|
|
onResponderTerminate: onResponderTerminate, onResponderTerminationRequest: onResponderTerminationRequest},
|
|
getInteractionHandle: getInteractionHandle};
|
|
}
|
|
|
|
function create_6056OnStartShouldSetResponder(a0) { // fn#6057, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:495:1195, owner: create_6056.onStartShouldSetResponder, offset: 0x00ced37e, size: 47 bytes, params: 2, frame: 14
|
|
return env0_0.onStartShouldSetPanResponder != null && env0_0.onStartShouldSetPanResponder(a0, env0_2);
|
|
}
|
|
|
|
function onMoveShouldSetResponder(a0) { // fn#6058, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:495:1340, owner: create_6056.onMoveShouldSetResponder, offset: 0x00ced3ad, size: 47 bytes, params: 2, frame: 14
|
|
return env0_0.onMoveShouldSetPanResponder != null && env0_0.onMoveShouldSetPanResponder(a0, env0_2);
|
|
}
|
|
|
|
function create_6056OnStartShouldSetResponderCapture(a0) { // fn#6059, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:495:1490, owner: create_6056.onStartShouldSetResponderCapture, offset: 0x00ced3dc, size: 118 bytes, params: 2, frame: 14
|
|
var value;
|
|
if (a0.nativeEvent.touches.length === 1) {
|
|
value = environment.__proto__;
|
|
env1_8._initializeGestureState(env0_2);
|
|
}
|
|
env0_2.numberActiveTouches = a0.touchHistory.numberActiveTouches;
|
|
return env0_0.onStartShouldSetPanResponderCapture != null && env0_0.onStartShouldSetPanResponderCapture(a0, env0_2);
|
|
}
|
|
|
|
function onMoveShouldSetResponderCapture(a0) { // fn#6060, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:495:1783, owner: create_6056.onMoveShouldSetResponderCapture, offset: 0x00ced452, size: 102 bytes, params: 2, frame: 16
|
|
var r0;
|
|
var value3;
|
|
var onMoveShouldSetPanResponderCapture;
|
|
const touchHistory = a0.touchHistory;
|
|
const value2 = env0_2._accountsForMovesUpTo !== touchHistory.mostRecentTimeStamp;
|
|
if (value2) {
|
|
value3 = environment.__proto__;
|
|
env1_8._updateGestureStateOnMove(env0_2, touchHistory);
|
|
onMoveShouldSetPanResponderCapture = env0_0.onMoveShouldSetPanResponderCapture;
|
|
r0 = onMoveShouldSetPanResponderCapture ? env0_0.onMoveShouldSetPanResponderCapture(a0,
|
|
env0_2) : !!onMoveShouldSetPanResponderCapture;
|
|
} else {
|
|
r0 = value2;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function onResponderGrant(a0) { // fn#6061, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:495:2039, owner: create_6056.onResponderGrant, offset: 0x00ced4b8, size: 208 bytes, params: 2, frame: 16
|
|
var binding;
|
|
var value2;
|
|
if (!env0_1.handle) {
|
|
binding = env0_1;
|
|
value2 = environment.__proto__;
|
|
binding.handle = (require(359) /* metro dependency 359 */).default.createInteractionHandle();
|
|
}
|
|
binding = env0_2;
|
|
binding.x0 = currentCentroidX(a0.touchHistory);
|
|
binding.y0 = currentCentroidY(a0.touchHistory);
|
|
binding.dx = 0;
|
|
binding.dy = 0;
|
|
if (env0_0.onPanResponderGrant) {
|
|
env0_0.onPanResponderGrant(a0, env0_2);
|
|
}
|
|
return env0_0.onShouldBlockNativeResponder == null || env0_0.onShouldBlockNativeResponder(a0, env0_2);
|
|
}
|
|
|
|
function onResponderReject(a0) { // fn#6062, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:495:2341, owner: create_6056.onResponderReject, offset: 0x00ced588, size: 41 bytes, params: 2, frame: 17
|
|
clearInteractionHandle_6053(env0_1, env0_0.onPanResponderReject, a0, env0_2);
|
|
}
|
|
|
|
function onResponderRelease(a0) { // fn#6063, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:495:2444, owner: create_6056.onResponderRelease, offset: 0x00ced5b1, size: 59 bytes, params: 2, frame: 18
|
|
const clearInteractionHandle_6053Binding = clearInteractionHandle_6053;
|
|
const binding = env0_1;
|
|
const onPanResponderRelease = env0_0.onPanResponderRelease;
|
|
const binding2 = env0_2;
|
|
clearInteractionHandle_6053Binding(binding, onPanResponderRelease, a0, binding2);
|
|
env1_8._initializeGestureState(binding2);
|
|
}
|
|
|
|
function onResponderStart(a0) { // fn#6064, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:495:2576, owner: create_6056.onResponderStart, offset: 0x00ced5ec, size: 65 bytes, params: 2, frame: 13
|
|
env0_2.numberActiveTouches = a0.touchHistory.numberActiveTouches;
|
|
if (env0_0.onPanResponderStart) {
|
|
env0_0.onPanResponderStart(a0, env0_2);
|
|
}
|
|
}
|
|
|
|
function onResponderMove(a0) { // fn#6065, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:495:2737, owner: create_6056.onResponderMove, offset: 0x00ced62d, size: 92 bytes, params: 2, frame: 15
|
|
var value2;
|
|
const touchHistory = a0.touchHistory;
|
|
if (env0_2._accountsForMovesUpTo !== touchHistory.mostRecentTimeStamp) {
|
|
value2 = environment.__proto__;
|
|
env1_8._updateGestureStateOnMove(env0_2, touchHistory);
|
|
if (env0_0.onPanResponderMove) {
|
|
env0_0.onPanResponderMove(a0, env0_2);
|
|
}
|
|
}
|
|
}
|
|
|
|
function onResponderEnd(a0) { // fn#6066, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:495:2934, owner: create_6056.onResponderEnd, offset: 0x00ced689, size: 65 bytes, params: 2, frame: 17
|
|
const touchHistory = a0.touchHistory;
|
|
const binding = env0_2;
|
|
binding.numberActiveTouches = touchHistory.numberActiveTouches;
|
|
clearInteractionHandle_6053(env0_1, env0_0.onPanResponderEnd, a0, binding);
|
|
}
|
|
|
|
function onResponderTerminate(a0) { // fn#6067, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:495:3098, owner: create_6056.onResponderTerminate, offset: 0x00ced6ca, size: 59 bytes, params: 2, frame: 18
|
|
const clearInteractionHandle_6053Binding = clearInteractionHandle_6053;
|
|
const binding = env0_1;
|
|
const onPanResponderTerminate = env0_0.onPanResponderTerminate;
|
|
const binding2 = env0_2;
|
|
clearInteractionHandle_6053Binding(binding, onPanResponderTerminate, a0, binding2);
|
|
env1_8._initializeGestureState(binding2);
|
|
}
|
|
|
|
function create_6056OnResponderTerminationRequest(a0) { // fn#6068, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:495:3247, owner: create_6056.onResponderTerminationRequest, offset: 0x00ced705, size: 47 bytes, params: 2, frame: 14
|
|
return env0_0.onPanResponderTerminationRequest == null || env0_0.onPanResponderTerminationRequest(a0, env0_2);
|
|
}
|
|
|
|
function getInteractionHandle() { // fn#6069, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:495:3401, owner: create_6056.getInteractionHandle, offset: 0x00ced734, size: 15 bytes, params: 1, frame: 1
|
|
return env0_1.handle;
|
|
}
|
|
|