Files
discord-decomp/sources/modules/hotspot/HotspotStore.tsx
T
2026-07-28 01:06:53 +03:00

148 lines
7.8 KiB
TypeScript

/* Metro module 6825; source: modules/hotspot/HotspotStore.tsx; dependencies: [6, 7, 15, 17, 18, 668, 4664, 566, 694, 2] */
import ClassCallCheck from '../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import Flux from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConferenceModeConstantsModule from '../conference_mode/ConferenceModeConstants.tsx'; /* Metro dependency 668 */
function _fun53644(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#53644, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7003:6, offset: 0x013523b6, size: 390 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let Set = global.Set;
let set = new Set();
const env0_9 = {};
const PersistedStore = (Flux).PersistedStore;
set = _fun53648(PersistedStore);
set.displayName = 'HotspotStore';
set.persistKey = 'hotspots';
set.migrations = [function(a0) {
return {hiddenHotspots: a0 ?? [], hotspotOverrides: {}};
}];
set = new set(importDefault(694) /* metro dependency 694: Dispatcher */,
{OVERLAY_INITIALIZE: function({hiddenHotspots}) {
var Set = global.Set;
env0_8 = new Set(hiddenHotspots);
}, HOTSPOT_HIDE: HOTSPOT_HIDE, HOTSPOT_OVERRIDE_SET: HOTSPOT_OVERRIDE_SET,
HOTSPOT_OVERRIDE_CLEAR: HOTSPOT_OVERRIDE_CLEAR});
(FileImportTrackerModule).fileFinishedImporting('modules/hotspot/HotspotStore.tsx');
exports.default = set;
function _isNativeReflectConstruct_53645() { // fn#53645, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7003:182, offset: 0x0135253c, 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_53645_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun53648(a0) { // fn#53648, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7003:400, offset: 0x0135259a, size: 162 bytes, params: 2, frame: 16
const HotspotStore2 = HotspotStore;
Inherits(HotspotStore2, a0);
return CreateClass(HotspotStore2, [{key: 'initialize', value: value_53650}, {key: 'hasHotspot', value: value_53651},
{key: 'hasHiddenHotspot', value: value_53652}, {key: 'getHotspotOverride', value: value_53653},
{key: 'getState', value: value_53654}]);
function HotspotStore() { // fn#53649, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7003:412, offset: 0x00ec62ac, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_2(this, HotspotStore);
const value3 = env1_5(HotspotStore);
return env1_4(this, _isNativeReflectConstruct_53645() ? global.Reflect.construct(value3, arguments,
env1_5(this).constructor) : value3.apply(this, arguments));
}
function value_53650(a0) { // fn#53650, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7003:690, offset: 0x0135263c, size: 102 bytes, params: 2, frame: 14
var Array;
var isArray;
var hiddenHotspots;
var Set;
var value;
var set;
var value2;
var hotspotOverrides;
if (a0 != null) {
Array = global.Array;
isArray = Array.isArray;
hiddenHotspots = a0.hiddenHotspots;
if (Reflect.apply(isArray, Array, [hiddenHotspots])) {
Set = global.Set;
hiddenHotspots = a0.hiddenHotspots;
set = new Set();
value2 = environment.__proto__;
}
hotspotOverrides = a0.hotspotOverrides;
if (hotspotOverrides != null) {
hotspotOverrides = a0.hotspotOverrides;
value = environment.__proto__;
}
}
}
function value_53651(a0) { // fn#53651, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7003:851, offset: 0x013526a2, size: 116 bytes, params: 2, frame: 16
let value = a1;
const r2 = !(value !== undefined ? value : false) && env1_9[a0];
value = environment.__proto__;
return !CONFERENCE_MODE_ENABLED && (!(require(4664) /* metro dependency 4664: ProcessArgs */).ProcessArgs.isDisallowPopupsSet() && (!r2 ? !env1_8.has(a0) : r2));
}
function value_53652(a0) { // fn#53652, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7003:986, offset: 0x0117085a, size: 22 bytes, params: 2, frame: 11
return env1_8.has(a0);
}
function value_53653(a0) { // fn#53653, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7003:1048, offset: 0x010197cf, size: 16 bytes, params: 2, frame: 2
return env1_9[a0];
}
function value_53654() { // fn#53654, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7003:1096, offset: 0x01352716, size: 25 bytes, params: 1, frame: 3
return {hiddenHotspots: env1_8, hotspotOverrides: env1_9};
}
}
function HOTSPOT_HIDE({location}) { // fn#53657, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7003:1423, offset: 0x0135277c, size: 50 bytes, params: 2, frame: 12
const binding = env0_8;
if (binding.has(location)) {
return false;
}
env0_8.add(location);
}
function HOTSPOT_OVERRIDE_SET({location, enabled}) { // fn#53658, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7003:1516, offset: 0x013527ae, size: 28 bytes, params: 2, frame: 3
env0_9[location] = enabled;
}
function HOTSPOT_OVERRIDE_CLEAR({location}) { // fn#53659, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7003:1605, offset: 0x013527ca, size: 41 bytes, params: 2, frame: 4
if (env0_9[location] == null) {
return false;
}
delete env0_9[location];
}
}
global.__d(_fun53644, 6825, [6, 7, 15, 17, 18, 668, 4664, 566, 694,
2]) /* metro module 6825, dependencies: [6, 7, 15, 17, 18, 668, 4664, 566, 694, 2] */;