Files
discord-decomp/sources/by-id/module-05379-ForceTouchGesture.js
T
2026-07-28 01:06:53 +03:00

109 lines
6.0 KiB
JavaScript

/* Metro module 5379; source: unknown; dependencies: [6, 7, 15, 17, 102, 18, 5360] */
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 Module00102 from './module-00102.js'; /* Metro dependency 102 */
import * as Module05360Module from './module-05360.js'; /* Metro dependency 5360 */
function _fun47450(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#47450, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5557:6, offset: 0x011c1a33, size: 217 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object = {code: 'function changeEventCalculator_Pnpm_forceTouchGestureTs1(current,previous){let changePayload;if(previous===undefined){changePayload={forceChange:current.force};}else{changePayload={forceChange:current.force-previous.force};}return{...current,...changePayload};}'};
const env0_7 = _fun47454();
const ContinousBaseGesture = (Module05360Module).ContinousBaseGesture;
exports.ForceTouchGesture = _fun47456(ContinousBaseGesture);
function _isNativeReflectConstruct_47451() { // fn#47451, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5557:159, offset: 0x011c1b0c, 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_47451_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun47454() { // fn#47454, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5557:657, offset: 0x011c1b6a, size: 46 bytes, params: 1, frame: 2
const closure = function(a0, a1) {
return global.Object.assign({}, a0,
a1 === undefined ? {forceChange: a0.force} : {forceChange: a0.force - a1.force});
};
closure.__closure = {};
closure.__workletHash = 11365193947542;
closure.__initData = env0_6;
return closure;
}
function _fun47456(a0) { // fn#47456, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5557:885, offset: 0x011c1be5, size: 143 bytes, params: 2, frame: 16
const ForceTouchGesture2 = ForceTouchGesture;
Inherits(ForceTouchGesture2, a0);
return CreateClass(ForceTouchGesture2, [{key: 'minForce', value: function(a0) {
this.config.minForce = a0;
return this;
}}, {key: 'maxForce', value: function(a0) {
this.config.maxForce = a0;
return this;
}}, {key: 'feedbackOnActivation', value: function(a0) {
this.config.feedbackOnActivation = a0;
return this;
}}, {key: 'onChange', value: value_47461}]);
function ForceTouchGesture() { // fn#47457, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5557:897, offset: 0x011c1c74, size: 126 bytes, params: 1, frame: 19
let value = environment.__proto__;
env1_0(this, ForceTouchGesture);
const value3 = env1_3(ForceTouchGesture);
value = env1_2(this, _isNativeReflectConstruct_47451() ? global.Reflect.construct(value3, [],
env1_3(this).constructor) : value3.apply(this, undefined));
value.config = {};
value.handlerName = 'ForceTouchGestureHandler';
return value;
}
function value_47461(a0) { // fn#47461, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5557:1527, offset: 0x011c1d34, size: 72 bytes, params: 2, frame: 17
var environment;
const handlers = this.handlers;
const value = environment.__proto__;
handlers.changeEventCalculator = env1_7;
return value_47461_superPropGet(ForceTouchGesture, 'onChange', this, 3)([a0]);
function value_47461_superPropGet(a0, a1, a2, a3) { // fn#47462, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5557:1593, owner: value_47461._superPropGet, offset: 0x011c1d7c, size: 100 bytes, params: 5, frame: 18
let value = a0;
const env0_0 = a2;
const binding = env2_4;
value = env2_3(1 & 3 ? value.prototype : value);
value = binding(value, 'onChange', a2);
return 2 & 3 ? typeof value !== 'function' ? value : _fun47463 : value;
function _fun47463(a0) { // fn#47463, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5557:1692, offset: 0x00c62408, size: 27 bytes, params: 2, frame: 13
return CreateClass.apply(importDefault, a0);
}
}
}
}
}
global.__d(_fun47450, 5379, [6, 7, 15, 17, 102, 18,
5360]) /* metro module 5379, dependencies: [6, 7, 15, 17, 102, 18, 5360] */;