decord/source/module_474.js

169 lines
6.7 KiB
JavaScript
Raw Normal View History

2026-07-29 08:29:29 +00:00
// Module ID: 474
// Function ID: 475
// Dependencies: [475]
// Module 474
2026-08-24 06:08:38 +00:00
import _mod475 from "module_475" /* 475 */;
let closure_0 = _mod475.default.currentCentroidXOfTouchesChangedAfter;
let closure_1 = _mod475.default.currentCentroidYOfTouchesChangedAfter;
let closure_2 = _mod475.default.previousCentroidXOfTouchesChangedAfter;
let closure_3 = _mod475.default.previousCentroidYOfTouchesChangedAfter;
const currentCentroidX = _mod475.default.currentCentroidX;
const currentCentroidY = _mod475.default.currentCentroidY;
2026-07-29 08:29:29 +00:00
let obj = {
_initializeGestureState(arg0) {
arg0.moveX = 0;
arg0.moveY = 0;
arg0.x0 = 0;
arg0.y0 = 0;
arg0.dx = 0;
arg0.dy = 0;
arg0.vx = 0;
arg0.vy = 0;
arg0.numberActiveTouches = 0;
arg0._accountsForMovesUpTo = 0;
},
_updateGestureStateOnMove(_accountsForMovesUpTo, touchHistory) {
_accountsForMovesUpTo.numberActiveTouches = touchHistory.numberActiveTouches;
_accountsForMovesUpTo.moveX = callback(touchHistory, _accountsForMovesUpTo._accountsForMovesUpTo);
_accountsForMovesUpTo.moveY = callback2(touchHistory, _accountsForMovesUpTo._accountsForMovesUpTo);
_accountsForMovesUpTo = _accountsForMovesUpTo._accountsForMovesUpTo;
const tmp = callback3(touchHistory, _accountsForMovesUpTo);
const tmp2 = callback(touchHistory, _accountsForMovesUpTo);
const sum = _accountsForMovesUpTo.dx + (tmp2 - tmp);
const sum1 = _accountsForMovesUpTo.dy + (callback2(touchHistory, _accountsForMovesUpTo) - callback4(touchHistory, _accountsForMovesUpTo));
const diff = touchHistory.mostRecentTimeStamp - _accountsForMovesUpTo._accountsForMovesUpTo;
_accountsForMovesUpTo.vx = (sum - _accountsForMovesUpTo.dx) / diff;
_accountsForMovesUpTo.vy = (sum1 - _accountsForMovesUpTo.dy) / diff;
_accountsForMovesUpTo.dx = sum;
_accountsForMovesUpTo.dy = sum1;
_accountsForMovesUpTo._accountsForMovesUpTo = touchHistory.mostRecentTimeStamp;
},
create(arg0) {
2026-08-24 06:08:38 +00:00
closure_0 = arg0;
obj = { stateID: Math.random(), moveX: 0, moveY: 0, x0: 0, y0: 0, dx: 0, dy: 0, vx: 0, vy: 0, numberActiveTouches: 0, _accountsForMovesUpTo: 0 };
2026-07-29 08:29:29 +00:00
obj = {
panHandlers: obj,
getInteractionHandle() {
return null;
}
};
obj = {
onStartShouldSetResponder(arg0) {
let result = null != closure_0.onStartShouldSetPanResponder;
if (result) {
result = obj.onStartShouldSetPanResponder(arg0, obj);
}
return result;
},
onMoveShouldSetResponder(arg0) {
let result = null != closure_0.onMoveShouldSetPanResponder;
if (result) {
result = obj.onMoveShouldSetPanResponder(arg0, obj);
}
return result;
},
onStartShouldSetResponderCapture(nativeEvent) {
if (1 === nativeEvent.nativeEvent.touches.length) {
2026-08-24 06:08:38 +00:00
const result = closure_1_6._initializeGestureState(obj);
2026-07-29 08:29:29 +00:00
}
obj.numberActiveTouches = nativeEvent.touchHistory.numberActiveTouches;
return null != closure_0.onStartShouldSetPanResponderCapture && closure_0.onStartShouldSetPanResponderCapture(nativeEvent, tmp4);
},
onMoveShouldSetResponderCapture(touchHistory) {
touchHistory = touchHistory.touchHistory;
let tmp2 = obj._accountsForMovesUpTo !== touchHistory.mostRecentTimeStamp;
if (tmp2) {
2026-08-24 06:08:38 +00:00
const result = closure_1_6._updateGestureStateOnMove(tmp, touchHistory);
2026-07-29 08:29:29 +00:00
tmp2 = closure_0.onMoveShouldSetPanResponderCapture && closure_0.onMoveShouldSetPanResponderCapture(touchHistory, tmp);
const tmp5 = closure_0.onMoveShouldSetPanResponderCapture && closure_0.onMoveShouldSetPanResponderCapture(touchHistory, tmp);
}
return tmp2;
},
onResponderGrant(touchHistory) {
2026-08-24 06:08:38 +00:00
obj.x0 = closure_1_4(touchHistory.touchHistory);
obj.y0 = closure_1_5(touchHistory.touchHistory);
2026-07-29 08:29:29 +00:00
obj.dx = 0;
obj.dy = 0;
if (closure_0.onPanResponderGrant) {
obj.onPanResponderGrant(touchHistory, tmp);
}
return null == closure_0.onShouldBlockNativeResponder || closure_0.onShouldBlockNativeResponder(touchHistory, closure_0);
},
onResponderReject(arg0) {
const onPanResponderReject = closure_0.onPanResponderReject;
if (onPanResponderReject != null) {
const call = onPanResponderReject.call;
if (typeof call === "unknown") {
onPanResponderReject(arg0, tmp2);
} else {
call(undefined, arg0, tmp2);
}
}
},
onResponderRelease(arg0) {
const onPanResponderRelease = closure_0.onPanResponderRelease;
if (onPanResponderRelease != null) {
const call = onPanResponderRelease.call;
if (typeof call === "unknown") {
const result = onPanResponderRelease(arg0, tmp2);
} else {
call(undefined, arg0, tmp2);
}
}
2026-08-24 06:08:38 +00:00
const result1 = closure_1_6._initializeGestureState(obj);
2026-07-29 08:29:29 +00:00
},
onResponderStart(touchHistory) {
obj.numberActiveTouches = touchHistory.touchHistory.numberActiveTouches;
if (closure_0.onPanResponderStart) {
obj.onPanResponderStart(touchHistory, tmp);
}
},
onResponderMove(touchHistory) {
touchHistory = touchHistory.touchHistory;
if (obj._accountsForMovesUpTo !== touchHistory.mostRecentTimeStamp) {
2026-08-24 06:08:38 +00:00
const result = closure_1_6._updateGestureStateOnMove(tmp, touchHistory);
2026-07-29 08:29:29 +00:00
if (closure_0.onPanResponderMove) {
obj.onPanResponderMove(touchHistory, tmp);
}
}
},
onResponderEnd(touchHistory) {
obj.numberActiveTouches = touchHistory.touchHistory.numberActiveTouches;
const onPanResponderEnd = closure_0.onPanResponderEnd;
if (onPanResponderEnd != null) {
const call = onPanResponderEnd.call;
if (typeof call === "unknown") {
onPanResponderEnd(touchHistory, tmp);
} else {
call(undefined, touchHistory, tmp);
}
}
},
onResponderTerminate(arg0) {
const onPanResponderTerminate = closure_0.onPanResponderTerminate;
if (onPanResponderTerminate != null) {
const call = onPanResponderTerminate.call;
if (typeof call === "unknown") {
const result = onPanResponderTerminate(arg0, tmp2);
} else {
call(undefined, arg0, tmp2);
}
}
2026-08-24 06:08:38 +00:00
const result1 = closure_1_6._initializeGestureState(obj);
2026-07-29 08:29:29 +00:00
},
onResponderTerminationRequest(arg0) {
let result = null == closure_0.onPanResponderTerminationRequest;
if (!result) {
result = obj.onPanResponderTerminationRequest(arg0, obj);
}
return result;
}
};
return obj;
}
};
export default obj;