Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,277 @@
|
||||
/* Metro module 12072; source: modules/action_sheet/native/PanGestureAnimations.tsx; dependencies: [1305, 4577, 4504, 4017, 5321, 2] */
|
||||
function _fun92743(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#92743, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12258:6, offset: 0x02097980, size: 349 bytes, params: 8, frame: 21
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const object = {duration: 500};
|
||||
const STANDARD_EASING = (require(1305) /* metro dependency 1305: native */).STANDARD_EASING;
|
||||
object.easing = STANDARD_EASING;
|
||||
const env0_4 = {code: "function getNearestValue_PanGestureAnimationsTsx1(array,measure,velocity=0){const unitVector=velocity<0?-1:velocity>0?1:0;function getSortedByMeasure(array,measure){'worklet';const sorted=new Array(...array).sort(function(left,right){const al=Math.abs(left-measure);const ar=Math.abs(right-measure);return al<ar?-1:al>ar?1:0;});return sorted;}if(array.length===0){return measure;}const sorted=getSortedByMeasure(array,measure);if(unitVector!==0){var _sorted$find;return(_sorted$find=sorted.find(function(value){const result=unitVector<0?measure>value:measure<value;return result;}))!==null&&_sorted$find!==void 0?_sorted$find:sorted[0];}return sorted[0];}"};
|
||||
const env0_5 = {code: 'function getSortedByMeasure_PanGestureAnimationsTsx2(array,measure){const sorted=new Array(...array).sort(function(left,right){const al=Math.abs(left-measure);const ar=Math.abs(right-measure);return al<ar?-1:al>ar?1:0;});return sorted;}'};
|
||||
const env0_6 = _fun92744();
|
||||
const env0_7 = {code: 'function withPanGestureSpring_PanGestureAnimationsTsx3(destination,velocity,config){const{SPRING_CONFIG,withSpring}=this.__closure;const springConfig=config!==null&&config!==void 0?config:SPRING_CONFIG;return withSpring(destination,{...springConfig,velocity:velocity});}'};
|
||||
const value = _fun92750();
|
||||
const env0_9 = {code: 'function withPanGestureTiming_PanGestureAnimationsTsx4(destination,config){const{TIMING_CONFIG,withTiming}=this.__closure;const timingConfig=config!==null&&config!==void 0?config:TIMING_CONFIG;return withTiming(destination,timingConfig);}'};
|
||||
const value2 = _fun92752();
|
||||
const env0_11 = {code: 'function PanGestureAnimationsTsx5(){const{isGestureInProgress}=this.__closure;if(isGestureInProgress!=null){isGestureInProgress.set(false);}}'};
|
||||
const env0_12 = {code: 'function PanGestureAnimationsTsx6(event,success){const{start,translate,snapPositions,velocity,swipeVelocityThreshold,getNearestValue,withPanGestureSpring,withPanGestureTiming,onEnd}=this.__closure;start.set(translate.get());if(snapPositions!=null){var _onEnd;const swipeVelocity=Math.abs(velocity.get())>swipeVelocityThreshold?velocity.get():0;const snapPoint=getNearestValue(snapPositions.get(),translate.get(),swipeVelocity);if(swipeVelocity!==0){translate.set(withPanGestureSpring(snapPoint,velocity.get()));}else{translate.set(withPanGestureTiming(snapPoint));}(_onEnd=onEnd)===null||_onEnd===void 0||_onEnd(event,{success:success,destination:snapPoint,startPosition:start.get()});}}'};
|
||||
const env0_13 = {code: 'function PanGestureAnimationsTsx7(event){const{start,vertical,lowerBounds,upperBounds,velocity,translate,onChange}=this.__closure;var _onChange;const{velocityY:velocityY,translationY:translationY,velocityX:velocityX,translationX:translationX}=event;let next=start.get()+(vertical?translationY:translationX);if(lowerBounds!=null&&next<lowerBounds){next=lowerBounds;}else if(upperBounds!=null&&next>upperBounds){next=upperBounds;}velocity.set(vertical?velocityY:velocityX);translate.set(next);(_onChange=onChange)===null||_onChange===void 0||_onChange(event,{destination:translate.get(),startPosition:start.get()});}'};
|
||||
const env0_14 = {code: 'function PanGestureAnimationsTsx8(event){const{start,translate,velocity,isGestureInProgress,onStart}=this.__closure;var _onStart;start.set(translate.get());velocity.set(0);if(isGestureInProgress!=null){isGestureInProgress.set(true);}(_onStart=onStart)===null||_onStart===void 0||_onStart(event,{destination:start.get(),startPosition:start.get()});}'};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/action_sheet/native/PanGestureAnimations.tsx');
|
||||
exports.default = usePanGesture;
|
||||
exports.SPRING_CONFIG = {'damping': 30, 'mass': 1, 'stiffness': 250, 'overshootClamping': true,
|
||||
'restSpeedThreshold': 0.001, 'restDisplacementThreshold': 0.001};
|
||||
exports.TIMING_CONFIG = object;
|
||||
exports.withPanGestureSpring = value;
|
||||
exports.withPanGestureTiming = value2;
|
||||
}
|
||||
|
||||
function _fun92744() { // fn#92744, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12258:1173, offset: 0x02097add, size: 48 bytes, params: 1, frame: 2
|
||||
const closure = function(a0, a1) {
|
||||
var r2;
|
||||
var r4;
|
||||
var value = a2;
|
||||
var env0_0 = a1;
|
||||
r2 = value !== undefined ? value : 0;
|
||||
var env0_1 = undefined;
|
||||
value = 0;
|
||||
r4 = r2 < value ? -1 : r2 > value ? 1 : value;
|
||||
env0_1 = r4;
|
||||
var value4 = _fun92746();
|
||||
if (value === a0.length) {
|
||||
return a1;
|
||||
}
|
||||
var value5 = value4(a0, a1);
|
||||
return value === r4 ? value5[value] : value5.find(_fun92749) ?? value5[value];
|
||||
};
|
||||
closure.__closure = {};
|
||||
closure.__workletHash = 4186929947751;
|
||||
closure.__initData = env0_4;
|
||||
return closure;
|
||||
}
|
||||
|
||||
function _fun92750() { // fn#92750, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12258:2041, offset: 0x02097c72, size: 88 bytes, params: 1, frame: 14
|
||||
const closure = withPanGestureSpring;
|
||||
const object2 = {};
|
||||
object2.SPRING_CONFIG = env0_2;
|
||||
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 12189464558811;
|
||||
closure.__initData = env0_7;
|
||||
return closure;
|
||||
}
|
||||
|
||||
function _fun92752() { // fn#92752, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12258:2604, offset: 0x02097d1b, size: 88 bytes, params: 1, frame: 14
|
||||
const closure = withPanGestureTiming;
|
||||
const object2 = {};
|
||||
object2.TIMING_CONFIG = env0_3;
|
||||
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 7636074551896;
|
||||
closure.__initData = env0_9;
|
||||
return closure;
|
||||
}
|
||||
|
||||
function usePanGesture({lowerBounds, upperBounds, snapPositions, swipeVelocityThreshold, translate, onStart, onChange, onEnd, vertical, isGestureInProgress}) { // fn#92754, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12258:4831, offset: 0x02097dac, size: 554 bytes, params: 2, frame: 27
|
||||
swipeVelocityThreshold = swipeVelocityThreshold === undefined ? 300 : swipeVelocityThreshold;
|
||||
const env0_6 = onChange;
|
||||
vertical = vertical === undefined || vertical;
|
||||
const env0_8 = vertical;
|
||||
const value2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
|
||||
const env0_10 = value2;
|
||||
const value3 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
|
||||
const env0_11 = value3;
|
||||
const Gesture = (require(5321) /* metro dependency 5321 */).Gesture;
|
||||
const value4 = Gesture.Pan();
|
||||
const onStart2 = value4.onStart;
|
||||
let closure = usePanGestureN;
|
||||
closure.__closure = {start: value2, translate: translate, velocity: value3,
|
||||
isGestureInProgress: isGestureInProgress, onStart: onStart};
|
||||
closure.__workletHash = 7008504704609;
|
||||
closure.__initData = env0_14;
|
||||
const value5 = Reflect.apply(onStart2, value4, [closure]);
|
||||
const onChange2 = value5.onChange;
|
||||
closure = usePanGestureC;
|
||||
closure.__closure = {start: value2, vertical: vertical, lowerBounds: lowerBounds, upperBounds: upperBounds,
|
||||
velocity: value3, translate: translate, onChange: onChange};
|
||||
closure.__workletHash = 15962975179371;
|
||||
closure.__initData = env0_13;
|
||||
const value6 = Reflect.apply(onChange2, value5, [closure]);
|
||||
const onEnd2 = value6.onEnd;
|
||||
closure = usePanGestureT;
|
||||
closure.__closure = {start: value2, translate: translate, snapPositions: snapPositions, velocity: value3,
|
||||
swipeVelocityThreshold: swipeVelocityThreshold, getNearestValue: env0_6, withPanGestureSpring: env0_8,
|
||||
withPanGestureTiming: env0_10, onEnd: onEnd};
|
||||
closure.__workletHash = 15665959414289;
|
||||
closure.__initData = env0_12;
|
||||
const value7 = Reflect.apply(onEnd2, value6, [closure]);
|
||||
const onFinalize = value7.onFinalize;
|
||||
closure = function() {
|
||||
if (isGestureInProgress != null) {
|
||||
isGestureInProgress.set(false);
|
||||
}
|
||||
};
|
||||
closure.__closure = {isGestureInProgress: isGestureInProgress};
|
||||
closure.__workletHash = 11128244755178;
|
||||
closure.__initData = env0_11;
|
||||
return Reflect.apply(onFinalize, value7, [closure]);
|
||||
}
|
||||
|
||||
function getNearestValue(a0, a1) { // fn#92745, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12258:1204, offset: 0x02097b0d, size: 123 bytes, params: 3, frame: 17
|
||||
let value = a2;
|
||||
const env0_0 = a1;
|
||||
const r2 = value !== undefined ? value : 0;
|
||||
value = 0;
|
||||
const r4 = r2 < value ? -1 : r2 > value ? 1 : value;
|
||||
const value4 = _fun92746();
|
||||
if (value === a0.length) {
|
||||
return a1;
|
||||
}
|
||||
const value5 = value4(a0, a1);
|
||||
return value === r4 ? value5[value] : value5.find(_fun92749) ?? value5[value];
|
||||
}
|
||||
|
||||
function withPanGestureSpring(a0, a1, a2) { // fn#92751, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12258:2077, offset: 0x02097cca, size: 81 bytes, params: 4, frame: 14
|
||||
const r0 = a2 ?? env1_2;
|
||||
value = environment.__proto__;
|
||||
value = require(4577) /* metro dependency 4577: spring */;
|
||||
const withSpring = value.withSpring;
|
||||
const object2 = {};
|
||||
copyDataProperties(object2, r0, undefined);
|
||||
object2['velocity'] = a1;
|
||||
return Reflect.apply(withSpring, value, [a0, object2]);
|
||||
}
|
||||
|
||||
function withPanGestureTiming(a0, a1) { // fn#92753, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12258:2640, offset: 0x02097d73, size: 57 bytes, params: 3, frame: 13
|
||||
const r3 = a1 ?? env1_3;
|
||||
value = environment.__proto__;
|
||||
return (require(4504) /* metro dependency 4504: timing */).withTiming(a0, r3);
|
||||
}
|
||||
|
||||
function usePanGestureN(a0) { // fn#92755, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12258:5115, owner: usePanGesture.N, offset: 0x02097fd6, size: 137 bytes, params: 2, frame: 14
|
||||
var object2;
|
||||
let binding = env0_10;
|
||||
const set = binding.set;
|
||||
const translateBinding = translate;
|
||||
const get = translateBinding.get;
|
||||
Reflect.apply(set, binding, [Reflect.apply(get, translateBinding, [])]);
|
||||
env0_11.set(0);
|
||||
if (isGestureInProgress != null) {
|
||||
isGestureInProgress.set(true);
|
||||
}
|
||||
let onStartBinding = onStart;
|
||||
if (onStartBinding != null) {
|
||||
onStartBinding = onStart;
|
||||
object2 = {};
|
||||
binding = env0_10;
|
||||
object2.destination = binding.get();
|
||||
binding = env0_10;
|
||||
object2.startPosition = binding.get();
|
||||
onStartBinding(a0, object2);
|
||||
}
|
||||
}
|
||||
|
||||
function usePanGestureC(a0) { // fn#92756, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12258:5367, owner: usePanGesture.C, offset: 0x0209805f, size: 207 bytes, params: 2, frame: 18
|
||||
var object2;
|
||||
const velocityY = a0.velocityY;
|
||||
const translationY = a0.translationY;
|
||||
const velocityX = a0.velocityX;
|
||||
const translationX = a0.translationX;
|
||||
let binding = env0_10;
|
||||
const value3 = binding.get() + (vertical ? translationY : translationX);
|
||||
const r5 = lowerBounds == null ? upperBounds != null && value3 > upperBounds ? upperBounds : value3 : value3 < lowerBounds ? lowerBounds : upperBounds != null && value3 > upperBounds ? upperBounds : value3;
|
||||
binding = env0_11;
|
||||
binding.set(vertical ? velocityY : velocityX);
|
||||
translate.set(r5);
|
||||
let onChangeBinding = onChange;
|
||||
if (onChangeBinding != null) {
|
||||
onChangeBinding = onChange;
|
||||
object2 = {};
|
||||
object2.destination = translate.get();
|
||||
object2.startPosition = env0_10.get();
|
||||
onChangeBinding(a0, object2);
|
||||
}
|
||||
}
|
||||
|
||||
function usePanGestureT(a0, a1) { // fn#92757, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12258:5734, owner: usePanGesture.T, offset: 0x0209812e, size: 269 bytes, params: 3, frame: 19
|
||||
var r5;
|
||||
var Math;
|
||||
var abs;
|
||||
var value2;
|
||||
var swipeVelocityThresholdBinding;
|
||||
var value3;
|
||||
var value5;
|
||||
var value8;
|
||||
var binding2;
|
||||
var onEndBinding;
|
||||
var object2;
|
||||
let binding = env0_10;
|
||||
let set = binding.set;
|
||||
let translateBinding = translate;
|
||||
const get = translateBinding.get;
|
||||
Reflect.apply(set, binding, [Reflect.apply(get, translateBinding, [])]);
|
||||
if (snapPositions != null) {
|
||||
Math = global.Math;
|
||||
abs = Math.abs;
|
||||
binding = env0_11;
|
||||
value2 = Reflect.apply(abs, Math, [binding.get()]);
|
||||
swipeVelocityThresholdBinding = swipeVelocityThreshold;
|
||||
value3 = 0;
|
||||
r5 = value2 > swipeVelocityThresholdBinding ? env0_11.get() : value3;
|
||||
value5 = environment.__proto__;
|
||||
binding = env1_6;
|
||||
value8 = binding(snapPositions.get(), translate.get(), r5);
|
||||
if (value3 !== r5) {
|
||||
translateBinding = translate;
|
||||
set = translateBinding.set;
|
||||
binding = env1_8;
|
||||
binding2 = env0_11;
|
||||
Reflect.apply(set, translateBinding, [binding(value8, binding2.get())]);
|
||||
} else {
|
||||
translate.set(env1_10(value8));
|
||||
}
|
||||
onEndBinding = onEnd;
|
||||
if (onEndBinding != null) {
|
||||
onEndBinding = onEnd;
|
||||
object2 = {success: a1, destination: value8};
|
||||
object2.startPosition = env0_10.get();
|
||||
onEndBinding(a0, object2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun92746() { // fn#92746, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12258:1245, offset: 0x02097b88, size: 48 bytes, params: 1, frame: 2
|
||||
const closure = function(a0, a1) {
|
||||
var r4;
|
||||
var env0_0 = a1;
|
||||
var Array = global.Array;
|
||||
var items = [];
|
||||
arraySpread(items, a0, 0, r4);
|
||||
return apply(Array, items, 0).sort(_fun92748);
|
||||
};
|
||||
closure.__closure = {};
|
||||
closure.__workletHash = 9192847351523;
|
||||
closure.__initData = env2_5;
|
||||
return closure;
|
||||
}
|
||||
|
||||
function _fun92749(a0) { // fn#92749, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12258:1603, offset: 0x02097c4e, size: 36 bytes, params: 2, frame: 4
|
||||
return env0_1 < 0 ? require > a0 : require < a0;
|
||||
}
|
||||
|
||||
function getSortedByMeasure(a0, a1) { // fn#92747, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12258:1279, offset: 0x02097bb8, size: 63 bytes, params: 3, frame: 15
|
||||
const env0_0 = a1;
|
||||
const Array = global.Array;
|
||||
const items2 = [];
|
||||
arraySpread(items2, a0, 0, undefined);
|
||||
return apply(Array, items2, 0).sort(_fun92748);
|
||||
}
|
||||
|
||||
function _fun92748(a0, a1) { // fn#92748, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12258:1322, offset: 0x02097bf7, size: 87 bytes, params: 3, frame: 13
|
||||
let Math = global.Math;
|
||||
const value = Math.abs(a0 - require);
|
||||
Math = global.Math;
|
||||
const value2 = Math.abs(a1 - require);
|
||||
return value < value2 ? -1 : 0 > value2 ? 1 : 0;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user