Files
discord-decomp/sources/by-id/module-05360.jsx
T
2026-07-27 16:20:00 +03:00

470 lines
19 KiB
React

/* Metro module 5360; source: unknown; dependencies: [15, 17, 18, 7, 6, 5342, 5325] */
function _fun47270(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#47270, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5538:6, offset: 0x011bd988, size: 235 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(15) /* metro dependency 15 */;
const env0_3 = importDefault(17) /* metro dependency 17 */;
const env0_4 = importDefault(18) /* metro dependency 18 */;
let value = importDefault(7) /* metro dependency 7 */;
const env0_6 = importDefault(6) /* metro dependency 6 */;
value = value(Gesture);
const value2 = _fun47276(value);
const value3 = _fun47304(value2);
exports.CALLBACK_TYPE = {'UNDEFINED': 0, 'BEGAN': 1, 'START': 2, 'UPDATE': 3, 'CHANGE': 4, 'END': 5, 'FINALIZE': 6,
'TOUCHES_DOWN': 7, 'TOUCHES_MOVE': 8, 'TOUCHES_UP': 9, 'TOUCHES_CANCELLED': 10};
exports.Gesture = value;
exports.BaseGesture = value2;
exports.ContinousBaseGesture = value3;
}
function _callSuper_47271(a0, a1, a2) { // fn#47271, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5538:148, offset: 0x011bda73, size: 100 bytes, params: 4, frame: 20
var r0;
var Reflect;
let value = a2;
const value3 = env0_3(a1);
const binding = env0_2;
if (_isNativeReflectConstruct_47272()) {
Reflect = global.Reflect;
value = Reflect.construct(value3, value || [], env0_3(a0).constructor);
r0 = value;
} else {
value = value3.apply(a0, value);
r0 = value;
}
return binding(a0, r0);
}
function _isNativeReflectConstruct_47272() { // fn#47272, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5538:279, offset: 0x011bdad7, 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_47272_isNativeReflectConstruct = function() {
return !!result;
})();
}
function Gesture() { // fn#47275, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5538:638, offset: 0x011bdb35, size: 24 bytes, params: 1, frame: 13
env0_6(this, Gesture);
}
function _fun47276(a0) { // fn#47276, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5538:682, offset: 0x011bdb4d, size: 645 bytes, params: 2, frame: 16
const closure = BaseGesture;
env0_4(closure, a0);
return env0_5(closure, [{key: 'addDependency', value: function(a0, a1) {
var r0;
var value;
var property = this.config[a0];
var config = this.config;
if (property) {
value = (0, global.Array)();
value = value.concat(property, a1);
r0 = value;
} else {
r0 = [a1];
}
config[a0] = r0;
}}, {key: 'withRef', value: function(a0) {
this.config.ref = a0;
return this;
}}, {key: 'isWorklet', value: function(a0) {
return a0.__workletHash !== undefined;
}}, {key: 'onBegin', value: value_47281}, {key: 'onStart', value: value_47282}, {key: 'onEnd', value: value_47283},
{key: 'onFinalize', value: value_47284}, {key: 'onTouchesDown', value: value_47285}, {key: 'onTouchesMove',
value: value_47286}, {key: 'onTouchesUp', value: value_47287}, {key: 'onTouchesCancelled', value: value_47288},
{key: 'enabled', value: function(a0) {
this.config.enabled = a0;
return this;
}}, {key: 'shouldCancelWhenOutside', value: function(a0) {
this.config.shouldCancelWhenOutside = a0;
return this;
}}, {key: 'hitSlop', value: function(a0) {
this.config.hitSlop = a0;
return this;
}}, {key: 'activeCursor', value: function(a0) {
this.config.activeCursor = a0;
return this;
}}, {key: 'mouseButton', value: function(a0) {
this.config.mouseButton = a0;
return this;
}}, {key: 'runOnJS', value: function(a0) {
this.config.runOnJS = a0;
return this;
}}, {key: 'simultaneousWithExternalGesture', value: function() {
var r2;
var value6;
var error;
var value = arguments.length;
var property = global.Array;
var value3 = new property(value);
var value5 = 0;
if (value5 < value) {
r2 = value5;
reducibleLoop1: while (true) {
value3[r2] = arguments[r2];
value6 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
if (value6 < value) {
r2 = value6;
continue reducibleLoop1;
}
break reducibleLoop1;
}
}
var iterator = value3[Symbol.iterator]();
var iterator2 = iterator.next;
r2 = iterator;
var item2 = Reflect.apply(iterator2, r2, []);
var item = item2.value;
item2 = item2.done ? undefined : r2;
reducibleJoin4: while (true) {
if (item2 === undefined) {
return this;
}
break reducibleJoin4;
}
reducibleLoop4: while (true) {
reducibleJoin3: while (true) {
if (item) {
try {
property = this.addDependency;
} catch (error) {
try {
item2.return();
} catch {
}
throw error;
}
try {
Reflect.apply(property, this, ['simultaneousWith', item]);
} catch (error) {
try {
item2.return();
} catch {
}
throw error;
}
r2 = item2;
break reducibleJoin3;
}
r2 = item2;
break reducibleJoin3;
}
item2 = Reflect.apply(iterator2, r2, []);
item = item2.value;
item2 = item2.done ? undefined : r2;
if (item2 === undefined) {
break reducibleLoop4;
}
continue reducibleLoop4;
}
return this;
}}, {key: 'requireExternalGestureToFail', value: function() {
var r2;
var value6;
var error;
var value = arguments.length;
var property = global.Array;
var value3 = new property(value);
var value5 = 0;
if (value5 < value) {
r2 = value5;
reducibleLoop1: while (true) {
value3[r2] = arguments[r2];
value6 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
if (value6 < value) {
r2 = value6;
continue reducibleLoop1;
}
break reducibleLoop1;
}
}
var iterator = value3[Symbol.iterator]();
var iterator2 = iterator.next;
r2 = iterator;
var item2 = Reflect.apply(iterator2, r2, []);
var item = item2.value;
item2 = item2.done ? undefined : r2;
reducibleJoin4: while (true) {
if (item2 === undefined) {
return this;
}
break reducibleJoin4;
}
reducibleLoop4: while (true) {
reducibleJoin3: while (true) {
if (item) {
try {
property = this.addDependency;
} catch (error) {
try {
item2.return();
} catch {
}
throw error;
}
try {
Reflect.apply(property, this, ['requireToFail', item]);
} catch (error) {
try {
item2.return();
} catch {
}
throw error;
}
r2 = item2;
break reducibleJoin3;
}
r2 = item2;
break reducibleJoin3;
}
item2 = Reflect.apply(iterator2, r2, []);
item = item2.value;
item2 = item2.done ? undefined : r2;
if (item2 === undefined) {
break reducibleLoop4;
}
continue reducibleLoop4;
}
return this;
}}, {key: 'blocksExternalGesture', value: function() {
var r2;
var value6;
var error;
var value = arguments.length;
var property = global.Array;
var value3 = new property(value);
var value5 = 0;
if (value5 < value) {
r2 = value5;
reducibleLoop1: while (true) {
value3[r2] = arguments[r2];
value6 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
if (value6 < value) {
r2 = value6;
continue reducibleLoop1;
}
break reducibleLoop1;
}
}
var iterator = value3[Symbol.iterator]();
var iterator2 = iterator.next;
r2 = iterator;
var item2 = Reflect.apply(iterator2, r2, []);
var item = item2.value;
item2 = item2.done ? undefined : r2;
reducibleJoin4: while (true) {
if (item2 === undefined) {
return this;
}
break reducibleJoin4;
}
reducibleLoop4: while (true) {
reducibleJoin3: while (true) {
if (item) {
try {
property = this.addDependency;
} catch (error) {
try {
item2.return();
} catch {
}
throw error;
}
try {
Reflect.apply(property, this, ['blocksHandlers', item]);
} catch (error) {
try {
item2.return();
} catch {
}
throw error;
}
r2 = item2;
break reducibleJoin3;
}
r2 = item2;
break reducibleJoin3;
}
item2 = Reflect.apply(iterator2, r2, []);
item = item2.value;
item2 = item2.done ? undefined : r2;
if (item2 === undefined) {
break reducibleLoop4;
}
continue reducibleLoop4;
}
return this;
}}, {key: 'withTestId', value: function(a0) {
this.config.testId = a0;
return this;
}}, {key: 'cancelsTouchesInView', value: function(a0) {
this.config.cancelsTouchesInView = a0;
return this;
}}, {key: 'initialize', value: value_47300}, {key: 'toGestureArray', value: function() {
return [this];
}}, {key: 'prepare', value: function() {
}}, {key: 'shouldUseReanimated', get: get_47303}]);
}
function _fun47304(a0) { // fn#47304, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5538:4432, offset: 0x011be3cf, size: 114 bytes, params: 2, frame: 16
const closure = ContinousBaseGesture;
env0_4(closure, a0);
return env0_5(closure, [{key: 'onUpdate', value: value_47306}, {key: 'onChange', value: value_47307},
{key: 'manualActivation', value: function(a0) {
this.config.manualActivation = a0;
return this;
}}]);
}
function BaseGesture() { // fn#47277, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5538:694, offset: 0x011bddd2, size: 140 bytes, params: 1, frame: 14
let binding = env1_6;
binding(this, BaseGesture);
const value3 = _callSuper_47271(this, BaseGesture);
value3.gestureId = -1;
value3.handlerTag = -1;
value3.handlerName = '';
value3.config = {};
value3.handlers = {'gestureId': -1, 'handlerTag': -1, isWorklet: []};
binding = env1_8;
const value4 = typeof binding === 'bigint' ? binding : +binding;
env1_8 = typeof value4 === 'bigint' ? value4 + 1n : +value4 + 1;
value3.gestureId = value4;
value3.handlers.gestureId = value3.gestureId;
return value3;
}
function value_47281(a0) { // fn#47281, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5538:1276, offset: 0x011bdec9, size: 60 bytes, params: 2, frame: 13
this.handlers.onBegin = a0;
const isWorklet = this.handlers.isWorklet;
const BEGAN = env1_7.BEGAN;
isWorklet[BEGAN] = this.isWorklet(a0);
return this;
}
function value_47282(a0) { // fn#47282, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5538:1406, offset: 0x011bdf05, size: 60 bytes, params: 2, frame: 13
this.handlers.onStart = a0;
const isWorklet = this.handlers.isWorklet;
const START = env1_7.START;
isWorklet[START] = this.isWorklet(a0);
return this;
}
function value_47283(a0) { // fn#47283, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5538:1534, offset: 0x011bdf41, size: 60 bytes, params: 2, frame: 13
this.handlers.onEnd = a0;
const isWorklet = this.handlers.isWorklet;
const END = env1_7.END;
isWorklet[END] = this.isWorklet(a0);
return this;
}
function value_47284(a0) { // fn#47284, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5538:1661, offset: 0x011bdf7d, size: 60 bytes, params: 2, frame: 13
this.handlers.onFinalize = a0;
const isWorklet = this.handlers.isWorklet;
const FINALIZE = env1_7.FINALIZE;
isWorklet[FINALIZE] = this.isWorklet(a0);
return this;
}
function value_47285(a0) { // fn#47285, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5538:1806, offset: 0x011bdfb9, size: 74 bytes, params: 2, frame: 13
this.config.needsPointerData = true;
this.handlers.onTouchesDown = a0;
const isWorklet = this.handlers.isWorklet;
const TOUCHES_DOWN = env1_7.TOUCHES_DOWN;
isWorklet[TOUCHES_DOWN] = this.isWorklet(a0);
return this;
}
function value_47286(a0) { // fn#47286, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5538:1993, offset: 0x011be003, size: 74 bytes, params: 2, frame: 13
this.config.needsPointerData = true;
this.handlers.onTouchesMove = a0;
const isWorklet = this.handlers.isWorklet;
const TOUCHES_MOVE = env1_7.TOUCHES_MOVE;
isWorklet[TOUCHES_MOVE] = this.isWorklet(a0);
return this;
}
function value_47287(a0) { // fn#47287, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5538:2178, offset: 0x011be04d, size: 74 bytes, params: 2, frame: 13
this.config.needsPointerData = true;
this.handlers.onTouchesUp = a0;
const isWorklet = this.handlers.isWorklet;
const TOUCHES_UP = env1_7.TOUCHES_UP;
isWorklet[TOUCHES_UP] = this.isWorklet(a0);
return this;
}
function value_47288(a0) { // fn#47288, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5538:2364, offset: 0x011be097, size: 74 bytes, params: 2, frame: 13
this.config.needsPointerData = true;
this.handlers.onTouchesCancelled = a0;
const isWorklet = this.handlers.isWorklet;
const TOUCHES_CANCELLED = env1_7.TOUCHES_CANCELLED;
isWorklet[TOUCHES_CANCELLED] = this.isWorklet(a0);
return this;
}
function value_47300() { // fn#47300, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5538:3966, offset: 0x011be2e9, size: 124 bytes, params: 1, frame: 17
let value = environment.__proto__;
value = require(5342) /* metro dependency 5342 */;
const getNextHandlerTag = value.getNextHandlerTag;
this.handlerTag = Reflect.apply(getNextHandlerTag, value, []);
const Object = global.Object;
this.handlers = Object.assign({}, this.handlers, {handlerTag: this.handlerTag});
if (this.config.ref) {
this.config.ref.current = this;
}
}
function get_47303() { // fn#47303, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5538:4300, offset: 0x011be372, size: 93 bytes, params: 1, frame: 12
let value = this.config.runOnJS !== true;
let r0 = value && !this.handlers.isWorklet.includes(false);
if (r0) {
value = environment.__proto__;
value = require(5325) /* metro dependency 5325 */;
value = !value.isRemoteDebuggingEnabled();
r0 = value;
}
return r0;
}
function ContinousBaseGesture() { // fn#47305, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5538:4444, offset: 0x011be441, size: 42 bytes, params: 1, frame: 16
env1_6(this, ContinousBaseGesture);
return _callSuper_47271(this, ContinousBaseGesture, arguments);
}
function value_47306(a0) { // fn#47306, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5538:4639, offset: 0x011be46b, size: 60 bytes, params: 2, frame: 13
this.handlers.onUpdate = a0;
const isWorklet = this.handlers.isWorklet;
const UPDATE = env1_7.UPDATE;
isWorklet[UPDATE] = this.isWorklet(a0);
return this;
}
function value_47307(a0) { // fn#47307, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5538:4773, offset: 0x011be4a7, size: 60 bytes, params: 2, frame: 13
this.handlers.onChange = a0;
const isWorklet = this.handlers.isWorklet;
const CHANGE = env1_7.CHANGE;
isWorklet[CHANGE] = this.isWorklet(a0);
return this;
}