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

186 lines
9.1 KiB
React

/* Metro module 1715; source: unknown; dependencies: [6, 7, 99, 100, 1613, 1654] */
function _fun18678(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#18678, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1842:6, offset: 0x00e938e8, size: 199 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(6) /* metro dependency 6 */;
const env0_3 = importDefault(7) /* metro dependency 7 */;
const env0_4 = importDefault(99) /* metro dependency 99 */;
const value = importDefault(100) /* metro dependency 100 */;
const shouldBeUseWeb2 = (require(1613) /* metro dependency 1613 */).shouldBeUseWeb();
const env0_5 = value('viewTags');
const env0_6 = value('registrations');
exports.WorkletEventHandler = shouldBeUseWeb2 ? _fun18690() : _fun18679();
}
function _fun18679() { // fn#18679, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1842:206, offset: 0x00e939af, size: 103 bytes, params: 1, frame: 15
return env0_3(WorkletEventHandlerNative, [{key: 'updateEventHandler', value: value_18681},
{key: 'registerForEvents', value: value_18686}, {key: 'unregisterFromEvents', value: value_18688}]);
}
function _fun18690() { // fn#18690, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1842:1408, offset: 0x00e93dad, size: 126 bytes, params: 1, frame: 15
return env0_3(WorkletEventHandlerWeb, [{key: 'setupWebListeners', value: function() {
var env0_0 = this;
this.listeners = {};
this.eventNames.forEach(_fun18693);
}}, {key: 'updateEventHandler', value: function(a0, a1) {
this.worklet = a0;
this.eventNames = a1;
this.setupWebListeners();
}}, {key: 'registerForEvents', value: function(a0, a1) {
}}, {key: 'unregisterFromEvents', value: function(a0) {
}}]);
}
function WorkletEventHandlerNative(a0, a1) { // fn#18680, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1842:227, offset: 0x00e93a16, size: 191 bytes, params: 3, frame: 20
let value = environment.__proto__;
let binding = env1_2;
binding(this, WorkletEventHandlerNative);
let Object = global.Object;
let defineProperty = Object.defineProperty;
binding = env1_5;
Reflect.apply(defineProperty, Object, [this, binding, {writable: true, value: undefined}]);
Object = global.Object;
defineProperty = Object.defineProperty;
const binding2 = env1_6;
Reflect.apply(defineProperty, Object, [this, binding2, {writable: true, value: undefined}]);
this.worklet = a0;
this.eventNames = a1;
const binding3 = env1_4;
value = binding3(this, binding);
const Set = global.Set;
const value3 = Object.create(Set.prototype, {constructor: {value: Set}});
const set = new Set();
value[binding] = set instanceof Object ? set : value3;
value = binding3(this, binding2);
const Map = global.Map;
const value5 = Object.create(Map.prototype, {constructor: {value: Map}});
const map = new Map();
value[binding2] = map instanceof Object ? map : value5;
}
function value_18681(a0, a1) { // fn#18681, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1842:525, offset: 0x00e93ad5, size: 114 bytes, params: 3, frame: 17
var environment;
this.worklet = a0;
this.eventNames = a1;
const value = environment.__proto__;
const binding = env1_4;
const binding2 = env1_6;
binding(this, binding2)[binding2].forEach(function(a0) {
a0.forEach(_fun18683);
});
const Array = global.Array;
const from = Array.from;
const binding3 = env1_5;
Reflect.apply(from, Array, [binding(this, binding3)[binding3]]).forEach(_fun18684);
}
function value_18686(a0, a1) { // fn#18686, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1842:897, offset: 0x00e93c10, size: 196 bytes, params: 3, frame: 19
var moduleValue;
var value3;
var binding4;
const env0_0 = a0;
let binding = env1_4;
const binding2 = env1_5;
let property = binding(this, binding2)[binding2];
property.add(a0);
const value2 = this.eventNames.map(_fun18687);
const binding3 = env1_6;
binding(this, binding3)[binding3].set(a0, value2);
if (this.eventNames.length === 0) {
if (a1) {
moduleValue = require(1654) /* metro dependency 1654 */;
value3 = moduleValue.registerEventHandler(this.worklet, a1, a0);
binding = env1_4;
binding4 = env1_6;
property = binding(this, binding4)[binding4];
property.set(a0, [value3]);
}
}
}
function value_18688(a0) { // fn#18688, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1842:1223, offset: 0x00e93d10, size: 116 bytes, params: 2, frame: 16
let binding = env1_4;
const binding2 = env1_5;
binding(this, binding2)[binding2].delete(a0);
const binding3 = env1_6;
const value2 = binding(this, binding3)[binding3].get(a0);
if (value2 != null) {
value2.forEach(_fun18689);
}
binding = env1_4;
const binding4 = env1_6;
binding(this, binding4)[binding4].delete(a0);
}
function WorkletEventHandlerWeb(a0) { // fn#18691, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1842:1429, offset: 0x00e93e2b, size: 90 bytes, params: 2, frame: 15
const r1 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
const value = environment.__proto__;
env1_2(this, WorkletEventHandlerWeb);
this.worklet = a0;
this.eventNames = r1;
this.listeners = {};
this.setupWebListeners();
}
function value_18692() { // fn#18692, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1842:1669, offset: 0x00e93e85, size: 42 bytes, params: 1, frame: 11
this.listeners = {};
this.eventNames.forEach(_fun18693);
}
function _fun18682(a0) { // fn#18682, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1842:624, offset: 0x00e93b47, size: 24 bytes, params: 2, frame: 11
a0.forEach(_fun18683);
}
function _fun18684(a0) { // fn#18684, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1842:740, offset: 0x00e93b88, size: 73 bytes, params: 2, frame: 15
const env0_0 = a0;
const binding = env0_0;
const value = binding.eventNames.map(_fun18685);
const binding2 = env2_4;
const binding3 = env2_6;
binding2(binding, binding3)[binding3].set(a0, value);
}
function _fun18687(a0) { // fn#18687, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1842:987, offset: 0x00e93cd4, size: 60 bytes, params: 2, frame: 15
let value = environment.__proto__.__proto__;
value = require(1654) /* metro dependency 1654 */;
return value.registerEventHandler(env0_1.worklet, a0, env0_0);
}
function _fun18689(a0) { // fn#18689, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1842:1327, offset: 0x00e93d84, size: 41 bytes, params: 2, frame: 12
const value = environment.__proto__.__proto__;
(require(1654) /* metro dependency 1654 */).unregisterEventHandler(a0);
}
function _fun18693(a0) { // fn#18693, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1842:1752, offset: 0x00e93eaf, size: 43 bytes, params: 2, frame: 14
const binding = env0_0;
binding.listeners[a0] = ((a0, a1) => {
var env0_0 = a0;
var env0_1 = a1;
return _fun18695;
})(a0, binding.worklet);
}
function _fun18683(a0) { // fn#18683, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1842:647, offset: 0x00e93b5f, size: 41 bytes, params: 2, frame: 11
const value = environment.__proto__.__proto__.__proto__;
return (require(1654) /* metro dependency 1654 */).unregisterEventHandler(a0);
}
function _fun18685(a0) { // fn#18685, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1842:776, offset: 0x00e93bd1, size: 63 bytes, params: 2, frame: 15
let value = environment.__proto__.__proto__.__proto__;
value = require(1654) /* metro dependency 1654 */;
return value.registerEventHandler(env1_0.worklet, a0, env0_0);
}
function jsListener(a0, a1) { // fn#18694, offset: 0x00e93eda, size: 23 bytes, params: 3, frame: 2
const env0_0 = a0;
const env0_1 = a1;
return _fun18695;
}
function _fun18695({nativeEvent}) { // fn#18695, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1842:1811, offset: 0x00e93ef1, size: 58 bytes, params: 2, frame: 16
const Object = global.Object;
require(Object.assign({}, nativeEvent, {eventName: env0_0}));
}