142 lines
8.7 KiB
TypeScript
142 lines
8.7 KiB
TypeScript
/* Metro module 15904; source: modules/guild_settings/GuildSettingsEmojiStore.tsx; dependencies: [6, 7, 15, 17, 18, 15905, 3969, 1393, 672, 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 Durations from '../../utils/Durations.tsx'; /* Metro dependency 672 */
|
|
import Module01393 from '../../by-id/module-01393.js'; /* Metro dependency 1393 */
|
|
import SelectedGuildStore from '../../stores/SelectedGuildStore.tsx'; /* Metro dependency 3969 */
|
|
import EmojiRecord from '../../records/EmojiRecord.tsx'; /* Metro dependency 15905 */
|
|
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
|
|
function _fun122707(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#122707, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16112:6, offset: 0x02571fa7, size: 469 bytes, params: 8, frame: 18
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_7 = {};
|
|
const env0_8 = {};
|
|
let value = Module01393;
|
|
const Millis = (Durations).Millis;
|
|
const HOUR = Millis.HOUR;
|
|
value = new value({max: 5, maxAge: HOUR});
|
|
const Store = (Flux).Store;
|
|
_fun122711(Store).displayName = 'GuildSettingsEmojiStore';
|
|
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {EMOJI_DELETE: EMOJI_DELETE,
|
|
EMOJI_FETCH_SUCCESS: EMOJI_FETCH_SUCCESS, EMOJI_FETCH_FAILURE: EMOJI_FETCH_FAILURE,
|
|
EMOJI_UPLOAD_START: EMOJI_UPLOAD_START, EMOJI_UPLOAD_STOP: EMOJI_UPLOAD_STOP,
|
|
EMOJI_CACHE_RAW_EMOJI_ASSET: EMOJI_CACHE_RAW_EMOJI_ASSET, GUILD_EMOJIS_UPDATE: GUILD_EMOJIS_UPDATE_122726});
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/GuildSettingsEmojiStore.tsx');
|
|
exports.default = value;
|
|
function _isNativeReflectConstruct_122708() { // fn#122708, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16112:168, offset: 0x0257217c, size: 98 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_122708_isNativeReflectConstruct = function() {
|
|
return !!result;
|
|
})();
|
|
}
|
|
|
|
function _fun122711(a0) { // fn#122711, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16112:436, offset: 0x025721de, size: 180 bytes, params: 2, frame: 16
|
|
const GuildSettingsEmojiStore2 = GuildSettingsEmojiStore;
|
|
Inherits(GuildSettingsEmojiStore2, a0);
|
|
return CreateClass(GuildSettingsEmojiStore2, [{key: 'initialize', value: function() {
|
|
this.waitFor(SelectedGuildStore);
|
|
}}, {key: 'isUploadingEmoji', value: value_122714}, {key: 'getEmojiRevision', value: value_122715},
|
|
{key: 'getEmojis', value: value_122716}, {key: 'getEmojiRawAsset', value: value_122717}]);
|
|
function GuildSettingsEmojiStore() { // fn#122712, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16112:448, offset: 0x010a3f4a, size: 113 bytes, params: 1, frame: 20
|
|
const value = environment.__proto__;
|
|
env1_0(this, GuildSettingsEmojiStore);
|
|
const value3 = env1_3(GuildSettingsEmojiStore);
|
|
return env1_2(this, _isNativeReflectConstruct_122708() ? global.Reflect.construct(value3, arguments,
|
|
env1_3(this).constructor) : value3.apply(this, arguments));
|
|
}
|
|
|
|
function value_122714() { // fn#122714, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16112:840, offset: 0x02572292, size: 15 bytes, params: 1, frame: 2
|
|
return env1_9 > 0;
|
|
}
|
|
|
|
function value_122715(a0) { // fn#122715, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16112:894, offset: 0x025722a1, size: 30 bytes, params: 2, frame: 3
|
|
const value = environment.__proto__;
|
|
return env1_7[a0] ?? 0;
|
|
}
|
|
|
|
function value_122716(a0) { // fn#122716, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16112:963, offset: 0x00ff623a, size: 16 bytes, params: 2, frame: 2
|
|
return env1_8[a0];
|
|
}
|
|
|
|
function value_122717(a0) { // fn#122717, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16112:1019, offset: 0x00f7ec3a, size: 22 bytes, params: 2, frame: 11
|
|
return env1_10.get(a0);
|
|
}
|
|
|
|
}
|
|
|
|
function EMOJI_DELETE({guildId, emojiId}) { // fn#122718, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16112:1142, offset: 0x025722bf, size: 56 bytes, params: 2, frame: 13
|
|
const binding = env0_8;
|
|
const property = binding[guildId];
|
|
binding[guildId] = property.filter(function({id}) {
|
|
return id !== emojiId;
|
|
});
|
|
}
|
|
|
|
function EMOJI_FETCH_SUCCESS({guildId, emojis}) { // fn#122720, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16112:1245, offset: 0x025722f7, size: 48 bytes, params: 2, frame: 13
|
|
env0_8[guildId] = emojis.map(_fun122721);
|
|
function _fun122721(a0) { // fn#122721, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16112:1307, offset: 0x02572327, size: 32 bytes, params: 2, frame: 11
|
|
let value = environment.__proto__;
|
|
const emojiRecordBinding = EmojiRecord;
|
|
value = Object.create(emojiRecordBinding.prototype, {constructor: {value: emojiRecordBinding}});
|
|
const emojiRecord2 = new emojiRecordBinding(a0);
|
|
return emojiRecord2 instanceof Object ? emojiRecord2 : value;
|
|
}
|
|
|
|
}
|
|
|
|
function EMOJI_FETCH_FAILURE({guildId}) { // fn#122722, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16112:1342, offset: 0x02572347, size: 27 bytes, params: 2, frame: 3
|
|
env0_8[guildId] = [];
|
|
}
|
|
|
|
function EMOJI_UPLOAD_START() { // fn#122723, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16112:1411, offset: 0x02572362, size: 18 bytes, params: 1, frame: 2
|
|
const binding = env0_9;
|
|
env0_9 = typeof binding === 'bigint' ? binding + 1n : +binding + 1;
|
|
}
|
|
|
|
function EMOJI_UPLOAD_STOP() { // fn#122724, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16112:1466, offset: 0x02572374, size: 18 bytes, params: 1, frame: 2
|
|
const binding = env0_9;
|
|
env0_9 = typeof binding === 'bigint' ? binding - 1n : +binding - 1;
|
|
}
|
|
|
|
function EMOJI_CACHE_RAW_EMOJI_ASSET({emojiId, userImage}) { // fn#122725, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16112:1530, offset: 0x02572386, size: 39 bytes, params: 2, frame: 13
|
|
env0_10.set(emojiId, userImage);
|
|
}
|
|
|
|
function GUILD_EMOJIS_UPDATE_122726({guildId}) { // fn#122726, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16112:1621, offset: 0x025723ad, size: 48 bytes, params: 2, frame: 5
|
|
const binding = env0_7;
|
|
binding[guildId] = (binding[guildId] ?? 0) + 1;
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun122707, 15904, [6, 7, 15, 17, 18, 15905, 3969, 1393, 672, 566, 694,
|
|
2]) /* metro module 15904, dependencies: [6, 7, 15, 17, 18, 15905, 3969, 1393, 672, 566, 694, 2] */;
|