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

89 lines
5.2 KiB
React

/* Metro module 1785; source: unknown; dependencies: [1614, 1613] */
function _fun19643(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#19643, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1912:6, offset: 0x00eb0480, size: 227 bytes, params: 8, frame: 20
var r1;
var r3;
const env0_1 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object = {code: 'function dispatchCommandFabric_Pnpm_dispatchCommandTs1(animatedRef,commandName,args=[]){const{logger}=this.__closure;if(!_WORKLET){return;}const shadowNodeWrapper=animatedRef();if(!shadowNodeWrapper){logger.warn("Tried to dispatch command \\""+commandName+"\\" with an uninitialized ref. Make sure to pass the animated ref to the component before using it.");return;}global._dispatchCommandFabric(shadowNodeWrapper,commandName,args);}'};
let value = _fun19644();
object = {code: 'function dispatchCommandPaper_Pnpm_dispatchCommandTs2(animatedRef,commandName,args=[]){const{logger}=this.__closure;if(!_WORKLET){return;}const viewTag=animatedRef();if(viewTag<0){logger.warn("Tried to dispatch command \\""+commandName+"\\" with an uninitialized ref. Make sure to pass the animated ref to the component before using it.");return;}global._dispatchCommandPaper(viewTag,commandName,args);}'};
const value2 = _fun19646();
const shouldBeUseWeb2 = (require(1613) /* metro dependency 1613 */).shouldBeUseWeb();
const value4 = require(1613) /* metro dependency 1613 */;
if (shouldBeUseWeb2) {
if (value4.isJest()) {
r3 = function() {
require(dependencyMap[0]).logger.warn('dispatchCommand() is not supported with Jest.');
};
} else {
value = value4;
r3 = value.isChromeDebugger() ? dispatchCommandChromeDebugger : dispatchCommandDefault;
}
r1 = r3;
} else {
r1 = value4.isFabric() ? value : value2;
}
exports.dispatchCommand = r1;
}
function _fun19644() { // fn#19644, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1912:550, offset: 0x00eb0563, size: 78 bytes, params: 1, frame: 14
const closure = dispatchCommandFabric;
const object2 = {};
object2.logger = (require(1614) /* metro dependency 1614 */).logger;
closure.__closure = object2;
closure.__workletHash = 9994297174981;
closure.__initData = env0_3;
return closure;
}
function _fun19646() { // fn#19646, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1912:1388, offset: 0x00eb0643, size: 78 bytes, params: 1, frame: 14
const closure = dispatchCommandPaper;
const object2 = {};
object2.logger = (require(1614) /* metro dependency 1614 */).logger;
closure.__closure = object2;
closure.__workletHash = 16962176072769;
closure.__initData = env0_4;
return closure;
}
function dispatchCommandChromeDebugger() { // fn#19649, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1912:1981, offset: 0x00eb0757, size: 48 bytes, params: 1, frame: 12
(require(1614) /* metro dependency 1614 */).logger.warn('dispatchCommand() is not supported with Chrome Debugger.');
}
function dispatchCommandDefault() { // fn#19650, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1912:2103, offset: 0x00eb0787, size: 48 bytes, params: 1, frame: 12
(require(1614) /* metro dependency 1614 */).logger.warn('dispatchCommand() is not supported on this configuration.');
}
function dispatchCommandFabric(a0, a1) { // fn#19645, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1912:567, offset: 0x00eb05b1, size: 146 bytes, params: 3, frame: 20
var value;
var value2;
if (global._WORKLET) {
value = a0();
value2 = environment.__proto__;
if (value) {
env1_0._dispatchCommandFabric(value, a1,
arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : []);
} else {
(require(1614) /* metro dependency 1614 */).logger.warn('Tried to dispatch command "' + a1 + '" with an uninitialized ref. Make sure to pass the animated ref to the component before using it.');
}
}
}
function dispatchCommandPaper(a0, a1) { // fn#19647, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1912:1405, offset: 0x00eb0691, size: 150 bytes, params: 3, frame: 18
var value;
var value2;
if (global._WORKLET) {
value = a0();
if (value < 0) {
value = environment.__proto__;
(require(1614) /* metro dependency 1614 */).logger.warn('Tried to dispatch command "' + a1 + '" with an uninitialized ref. Make sure to pass the animated ref to the component before using it.');
} else {
value2 = environment.__proto__;
env1_0._dispatchCommandPaper(value, a1,
arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : []);
}
}
}