581 lines
28 KiB
TypeScript
581 lines
28 KiB
TypeScript
/* Metro module 15419; source: modules/soundboard/useSoundGrid.tsx; dependencies: [57, 31, 1867, 3784, 1878, 4613, 4614, 1880, 6639, 8249, 15420, 566, 3802, 15421, 9077, 2] */
|
|
import Module00057 from '../../by-id/module-00057.js'; /* Metro dependency 57 */
|
|
import GuildStore from '../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
|
|
import UserStore from '../../stores/UserStore.tsx'; /* Metro dependency 1878 */
|
|
import PermissionStore from '../../stores/PermissionStore.tsx'; /* Metro dependency 3784 */
|
|
import PremiumUtils from '../../utils/PremiumUtils.tsx'; /* Metro dependency 3802 */
|
|
import SoundboardStore from './SoundboardStore.tsx'; /* Metro dependency 4613 */
|
|
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
|
|
import * as PremiumConstantsModule from '../premium/PremiumConstants.tsx'; /* Metro dependency 1880 */
|
|
import * as SoundboardConstantsModule from './SoundboardConstants.tsx'; /* Metro dependency 4614 */
|
|
import * as SoundboardTypesModule from './SoundboardTypes.tsx'; /* Metro dependency 6639 */
|
|
import * as UseSoundOrganizerModule from './useSoundOrganizer.tsx'; /* Metro dependency 15420 */
|
|
import * as UseSortedGuildIdsForSoundboardModule from './useSortedGuildIdsForSoundboard.tsx'; /* Metro dependency 15421 */
|
|
|
|
function _fun117940(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117940, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15616:6, offset: 0x024c5e24, size: 312 bytes, params: 8, frame: 19
|
|
const env0_0 = require;
|
|
const _arrayLikeToArray_117943 = function(a0, a1) {
|
|
var r0;
|
|
var r1;
|
|
var r2;
|
|
var value3;
|
|
var length;
|
|
var value5;
|
|
var value = undefined;
|
|
var value2 = value == null;
|
|
reducibleJoin2: while (true) {
|
|
if (value2) {
|
|
r0 = value2;
|
|
break reducibleJoin2;
|
|
}
|
|
value3 = value > a0.length;
|
|
r0 = value3;
|
|
break reducibleJoin2;
|
|
}
|
|
reducibleJoin4: while (true) {
|
|
if (r0) {
|
|
length = a0.length;
|
|
r1 = length;
|
|
break reducibleJoin4;
|
|
}
|
|
r1 = value;
|
|
break reducibleJoin4;
|
|
}
|
|
value = (0, global.Array)(r1);
|
|
var value4 = 0;
|
|
if (value4 < r1) {
|
|
r2 = value4;
|
|
reducibleLoop5: while (true) {
|
|
value[r2] = a0[r2];
|
|
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
|
|
if (value5 < r1) {
|
|
r2 = value5;
|
|
continue reducibleLoop5;
|
|
}
|
|
break reducibleLoop5;
|
|
}
|
|
}
|
|
return value;
|
|
};
|
|
const createSoundItems = function(a0, a1) {
|
|
var r2;
|
|
var value = a0;
|
|
if (a1 == null) {
|
|
r2 = value;
|
|
} else {
|
|
value = a1(value);
|
|
r2 = value;
|
|
}
|
|
return r2.map(_fun117945);
|
|
};
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/soundboard/useSoundGrid.tsx');
|
|
exports.default = useSoundGrid;
|
|
exports.useSearchCategories = useSearchCategories;
|
|
function _createForOfIteratorHelperLoose_117941(a0, a1) { // fn#117941, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15616:244, offset: 0x024c5f5c, size: 372 bytes, params: 3, frame: 20
|
|
var r6;
|
|
var r9;
|
|
var r5;
|
|
var value3;
|
|
var regexp;
|
|
const env0_0 = a0;
|
|
const Symbol = global.Symbol;
|
|
let value = typeof Symbol !== 'undefined';
|
|
let r1 = value && a0[global.Symbol.iterator];
|
|
r1 = !r1 ? a0['@@iterator'] : r1;
|
|
if (r1) {
|
|
value = r1.call(a0);
|
|
return value.next.bind(value);
|
|
}
|
|
const Array = global.Array;
|
|
if (Array.isArray(a0)) {
|
|
if (r1) {
|
|
}
|
|
return _fun117942;
|
|
}
|
|
value = undefined;
|
|
if (a0) {
|
|
if (typeof a0 === 'string') {
|
|
value = _arrayLikeToArray_117943(a0, value);
|
|
r5 = value;
|
|
} else {
|
|
value3 = ({}).toString.call(a0).slice(8, -1);
|
|
r6 = value3 === 'Object' && a0.constructor;
|
|
r9 = r6 ? a0.constructor.name : value3;
|
|
if (r9 === 'Map') {
|
|
r6 = global.Array.from(a0);
|
|
} else if (r9 === 'Set') {
|
|
r6 = global.Array.from(a0);
|
|
} else if (r9 === 'Arguments') {
|
|
value = _arrayLikeToArray_117943(a0, value);
|
|
r6 = value;
|
|
} else {
|
|
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
|
if (regexp.test(r9)) {
|
|
value = _arrayLikeToArray_117943(a0, value);
|
|
r6 = value;
|
|
} else {
|
|
r6 = value;
|
|
}
|
|
}
|
|
r5 = r6;
|
|
}
|
|
} else {
|
|
r5 = value;
|
|
}
|
|
if (r5) {
|
|
if (r5) {
|
|
}
|
|
return _fun117942;
|
|
}
|
|
const TypeError = global.TypeError;
|
|
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
|
|
function _fun117942() { // fn#117942, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15616:815, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
|
|
return env0_1 >= env0_0.length ? {done: true} : {done: false,
|
|
value: env0_0[typeof env0_1 === 'bigint' ? env0_1 : +env0_1]};
|
|
}
|
|
|
|
}
|
|
|
|
function createSoundItems(a0, a1) { // fn#117944, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15616:1154, offset: 0x024c60d0, size: 43 bytes, params: 3, frame: 12
|
|
var r2;
|
|
let value = a0;
|
|
if (a1 == null) {
|
|
r2 = value;
|
|
} else {
|
|
value = a1(value);
|
|
r2 = value;
|
|
}
|
|
return r2.map(function(a0, a1) {
|
|
var object = {};
|
|
object.type = require(dependencyMap[8]).SoundboardSoundItemType.SOUND;
|
|
object.sound = a0;
|
|
object.index = a1;
|
|
return object;
|
|
});
|
|
function _fun117945(a0, a1) { // fn#117945, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15616:1217, offset: 0x024c60fb, size: 60 bytes, params: 3, frame: 12
|
|
const SoundboardSoundItemType = (SoundboardTypesModule).SoundboardSoundItemType;
|
|
const SOUND = SoundboardSoundItemType.SOUND;
|
|
return {type: SOUND, sound: a0, index: a1};
|
|
}
|
|
|
|
}
|
|
|
|
function addDefaultSection(a0, a1) { // fn#117946, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15616:1290, offset: 0x024c6137, size: 150 bytes, params: 3, frame: 19
|
|
const r6 = a1.get(DEFAULT_SOUND_GUILD_ID) ?? EMPTY_SOUND_LIST;
|
|
const push = a0.push;
|
|
const object = {};
|
|
const SoundboardSoundGridSectionType = (SoundboardTypesModule).SoundboardSoundGridSectionType;
|
|
let DEFAULTS = SoundboardSoundGridSectionType.DEFAULTS;
|
|
object.key = DEFAULTS;
|
|
DEFAULTS = SoundboardSoundGridSectionType.DEFAULTS;
|
|
object.categoryInfo = {type: DEFAULTS};
|
|
object.items = createSoundItems(r6,
|
|
(require(15420) /* metro dependency 15420: useSoundOrganizer */).sortSoundsOldestToNewestCreationDate);
|
|
Reflect.apply(push, a0, [object]);
|
|
}
|
|
|
|
function useSoundGrid(a0) { // fn#117947, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15616:1640, offset: 0x024c61cd, size: 560 bytes, params: 2, frame: 32
|
|
const value = a1;
|
|
const value2 = a2;
|
|
const env0_0 = a0;
|
|
let filterOutEmptyCurrentGuild = (value !== undefined ? value : {}).filterOutEmptyCurrentGuild;
|
|
filterOutEmptyCurrentGuild = !(filterOutEmptyCurrentGuild === undefined) && filterOutEmptyCurrentGuild;
|
|
const r7 = value2 !== undefined ? value2 : false;
|
|
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
|
|
return UserStore.getCurrentUser();
|
|
});
|
|
const defaultImport = PremiumUtils;
|
|
const isPremium = defaultImport.isPremium;
|
|
const TIER_2 = PremiumTypes.TIER_2;
|
|
const isPremium2 = Reflect.apply(isPremium, defaultImport, [currentUser, TIER_2]);
|
|
const isPremium22 = isPremium2;
|
|
const fluxModule = require(566) /* metro dependency 566: flux */;
|
|
let useStateFromStoresArray = fluxModule.useStateFromStoresArray;
|
|
const isPremium222 = isPremium22(Reflect.apply(useStateFromStoresArray, fluxModule, [[SoundboardStore],
|
|
_fun117949]), 3);
|
|
const property = isPremium222[0];
|
|
const property4 = property;
|
|
const property2 = isPremium222[1];
|
|
const property3 = isPremium222[2];
|
|
const value5 = (UseSoundOrganizerModule).useSoundOrganizer();
|
|
const value6 = (UseSortedGuildIdsForSoundboardModule).useSortedGuildIdsForSoundboard(a0,
|
|
false);
|
|
const moduleValue5 = fluxModule;
|
|
useStateFromStoresArray = moduleValue5.useStateFromStoresArray;
|
|
const guildStoreBinding = GuildStore;
|
|
const value7 = Reflect.apply(useStateFromStoresArray, moduleValue5, [[guildStoreBinding], _fun117950]);
|
|
const canUseSoundboardEverywhere2 = defaultImport.canUseSoundboardEverywhere(currentUser);
|
|
const guild = fluxModule.useStateFromStores([guildStoreBinding], _fun117952);
|
|
return property4.useMemo(_fun117954, [value6, property, property2, guild,
|
|
fluxModule.useStateFromStores([PermissionStore], _fun117953, [guild]), filterOutEmptyCurrentGuild,
|
|
canUseSoundboardEverywhere2, value7, r7, property3, isPremium2, value5]);
|
|
function _fun117949() { // fn#117949, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15616:1846, offset: 0x024c63fd, size: 57 bytes, params: 1, frame: 10
|
|
const value = environment.__proto__;
|
|
const soundboardStoreBinding = SoundboardStore;
|
|
const items2 = [soundboardStoreBinding.getSounds()];
|
|
const getFavorites = soundboardStoreBinding.getFavorites;
|
|
items2[1] = Reflect.apply(getFavorites, soundboardStoreBinding, []);
|
|
items2[2] = soundboardStoreBinding.isFetching();
|
|
return items2;
|
|
}
|
|
|
|
function _fun117950() { // fn#117950, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15616:2052, offset: 0x024c6436, size: 36 bytes, params: 1, frame: 12
|
|
env0_8.forEach(_fun117951);
|
|
return [];
|
|
function _fun117951(a0) { // fn#117951, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15616:2084, offset: 0x024c645a, size: 48 bytes, params: 2, frame: 11
|
|
let value = environment.__proto__.__proto__;
|
|
value = GuildStore.getGuild(a0);
|
|
if (value != null) {
|
|
env0_0.push(value);
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
function _fun117952() { // fn#117952, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15616:2212, offset: 0x01de3a05, size: 47 bytes, params: 1, frame: 13
|
|
return GuildStore.getGuild(env0_0?.guild_id);
|
|
}
|
|
|
|
function _fun117953() { // fn#117953, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15616:2292, offset: 0x024c648a, size: 51 bytes, params: 1, frame: 11
|
|
let value = environment.__proto__;
|
|
value = require(9077) /* metro dependency 9077: useManageResourcePermissions */;
|
|
const getManageResourcePermissions = value.getManageResourcePermissions;
|
|
return Reflect.apply(getManageResourcePermissions, value, [guild]).canCreateExpressions;
|
|
}
|
|
|
|
function _fun117954() { // fn#117954, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15616:2383, offset: 0x024c64bd, size: 1039 bytes, params: 1, frame: 35
|
|
var environment;
|
|
var r10;
|
|
var r5;
|
|
var id;
|
|
var r9;
|
|
var r0;
|
|
var object;
|
|
var Array;
|
|
var from;
|
|
var value2;
|
|
var value3;
|
|
const SoundboardSoundGridSectionType = (require(6639) /* metro dependency 6639: SoundboardTypes */).SoundboardSoundGridSectionType;
|
|
var guildBinding;
|
|
var object2;
|
|
var currentGuildHasAddPermissions;
|
|
var allSounds;
|
|
var filterOutEmptyCurrentGuild2;
|
|
var sortSoundsFn;
|
|
var get;
|
|
var createSoundItemsBinding;
|
|
var soundItems;
|
|
var length;
|
|
var moduleValue;
|
|
var value6;
|
|
var push;
|
|
var object3;
|
|
var GUILD;
|
|
var object4;
|
|
var sections;
|
|
var guilds;
|
|
var currentGuildId;
|
|
var hasNitro;
|
|
var value9;
|
|
var value10;
|
|
var done;
|
|
var value11;
|
|
var value12;
|
|
var soundItems2;
|
|
var value13;
|
|
var object7;
|
|
var binding;
|
|
var value15;
|
|
var object10;
|
|
const env0_0 = 0;
|
|
const env0_1 = 0;
|
|
const items2 = [];
|
|
if (env0_2) {
|
|
value15 = environment.__proto__;
|
|
addDefaultSection(items2, ReactModule);
|
|
object10 = {categories: items2};
|
|
object10.availableSounds = ReactModule.get(DEFAULT_SOUND_GUILD_ID) ?? EMPTY_SOUND_LIST;
|
|
object10.isFetching = env0_6;
|
|
object10.soundCounts = {'favoriteSoundCount': 0, 'unlockedCustomSoundCount': 0, 'lockedCustomSoundCount': 0};
|
|
r0 = object10;
|
|
} else {
|
|
object = {sections: items2, guildIds: env0_8, allSounds: ReactModule};
|
|
Array = global.Array;
|
|
object.potentialSoundIdsForSection = Array.from(env0_5);
|
|
value2 = environment.__proto__;
|
|
value3 = undefined;
|
|
object.sectionType = SoundboardSoundGridSectionType.FAVORITES;
|
|
object.sortSoundsFn = (require(15420) /* metro dependency 15420: useSoundOrganizer */).sortSoundsOldestToNewestCreationDate;
|
|
_addSectionForPotentialSoundIds(object);
|
|
guildBinding = guild;
|
|
if (value3 !== guildBinding) {
|
|
guildBinding = guild;
|
|
object2 = {currentGuildHasAddPermissions: env0_12, allSounds: ReactModule};
|
|
object2.filterOutEmptyCurrentGuild = filterOutEmptyCurrentGuild;
|
|
object2.sortSoundsFn = env0_7;
|
|
currentGuildHasAddPermissions = object2.currentGuildHasAddPermissions;
|
|
allSounds = object2.allSounds;
|
|
filterOutEmptyCurrentGuild2 = object2.filterOutEmptyCurrentGuild;
|
|
sortSoundsFn = object2.sortSoundsFn;
|
|
r10 = allSounds.get(guildBinding.id) ?? [];
|
|
soundItems = createSoundItems(r10, sortSoundsFn);
|
|
length = r10.length;
|
|
moduleValue = require(8249) /* metro dependency 8249: GuildBoostingUtils */;
|
|
r10 = length < moduleValue.getMaxSoundboardSlots(guildBinding) && currentGuildHasAddPermissions;
|
|
length = soundItems.length;
|
|
value6 = length === 0;
|
|
r10 = !r10 && !value6;
|
|
r10 = !r10 ? filterOutEmptyCurrentGuild2 : r10;
|
|
if (!r10) {
|
|
push = soundItems.push;
|
|
object3 = {};
|
|
object3.type = (require(6639) /* metro dependency 6639: SoundboardTypes */).SoundboardSoundItemType.ADD_SOUND;
|
|
object3.guild = guildBinding;
|
|
Reflect.apply(push, soundItems, [object3]);
|
|
}
|
|
if (!(filterOutEmptyCurrentGuild2 && value6)) {
|
|
push = items2.push;
|
|
GUILD = SoundboardSoundGridSectionType.GUILD;
|
|
Reflect.apply(push, items2, [{categoryInfo: {type: GUILD, guild: guildBinding, isNitroLocked: false},
|
|
key: guildBinding.id, items: soundItems}]);
|
|
}
|
|
}
|
|
if (!SoundboardConstantsModule.EMPTY_SOUND_LIST) {
|
|
addDefaultSection(items2, ReactModule);
|
|
}
|
|
object4 = {sections: items2, guilds: SoundboardConstantsModule.DEFAULT_SOUND_GUILD_ID};
|
|
id = guild == null ? value3 : guild.id;
|
|
object4.currentGuildId = id;
|
|
object4.allSounds = ReactModule;
|
|
object4.hasNitro = Module00057;
|
|
object4.sortSoundsFn = env0_7;
|
|
sections = object4.sections;
|
|
guilds = object4.guilds;
|
|
currentGuildId = object4.currentGuildId;
|
|
allSounds = object4.allSounds;
|
|
hasNitro = object4.hasNitro;
|
|
sortSoundsFn = object4.sortSoundsFn;
|
|
value9 = _createForOfIteratorHelperLoose_117941(guilds);
|
|
value10 = value9();
|
|
done = value10.done;
|
|
if (!done) {
|
|
r9 = value10;
|
|
while (true) {
|
|
value11 = r9.value;
|
|
id = value11.id;
|
|
if (id !== currentGuildId) {
|
|
createSoundItemsBinding = createSoundItems;
|
|
get = allSounds.get;
|
|
id = value11.id;
|
|
value12 = Reflect.apply(get, allSounds, [id]);
|
|
if (value12 != null) {
|
|
r5 = value12;
|
|
continue;
|
|
}
|
|
soundItems2 = createSoundItemsBinding([], sortSoundsFn);
|
|
length = soundItems2.length;
|
|
if (length > 0) {
|
|
push = sections.push;
|
|
GUILD = SoundboardSoundGridSectionType.GUILD;
|
|
id = value11.id;
|
|
Reflect.apply(push, sections, [{categoryInfo: {type: GUILD, guild: value11,
|
|
isNitroLocked: !hasNitro},
|
|
key: id,
|
|
items: soundItems2}]);
|
|
break;
|
|
}
|
|
break;
|
|
}
|
|
value13 = value9();
|
|
done = value13.done;
|
|
if (done) {
|
|
break;
|
|
}
|
|
r9 = value13;
|
|
continue;
|
|
}
|
|
}
|
|
if (SoundboardConstantsModule.EMPTY_SOUND_LIST) {
|
|
addDefaultSection(items2, ReactModule);
|
|
}
|
|
items2.forEach(_fun117958);
|
|
object7 = {categories: items2};
|
|
Array = global.Array;
|
|
from = Array.from;
|
|
binding = ReactModule;
|
|
object7.availableSounds = Reflect.apply(from, Array, [binding.values()]).flat();
|
|
object7.isFetching = env0_6;
|
|
object7.soundCounts = {favoriteSoundCount: env0_5.size, unlockedCustomSoundCount: env0_0,
|
|
lockedCustomSoundCount: env0_1};
|
|
r0 = object7;
|
|
}
|
|
return r0;
|
|
function _addSectionForPotentialSoundIds({sections, guildIds, allSounds, potentialSoundIdsForSection, sectionType, sortSoundsFn}) { // fn#117955, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15616:2596, offset: 0x024c68cc, size: 306 bytes, params: 2, frame: 28
|
|
var r7;
|
|
var r4;
|
|
var r14;
|
|
var r8;
|
|
var property;
|
|
var _addSectionForPotentialSoundIds_loop2;
|
|
var _createForOfIteratorHelperLoose_117941Binding;
|
|
var get;
|
|
var value4;
|
|
var value5;
|
|
var value6;
|
|
var done;
|
|
var value7;
|
|
var value8;
|
|
var value9;
|
|
var value12;
|
|
var push;
|
|
var value13;
|
|
const object = {};
|
|
const items2 = [];
|
|
const value2 = arraySpread(items2, guildIds, 0, undefined);
|
|
items2[value2] = DEFAULT_SOUND_GUILD_ID;
|
|
value2 + 1;
|
|
let length = items2.length;
|
|
if (0 < length) {
|
|
r7 = 0;
|
|
reducibleLoop1: while (true) {
|
|
property = items2[r7];
|
|
_addSectionForPotentialSoundIds_loop2 = _addSectionForPotentialSoundIds_loop;
|
|
_createForOfIteratorHelperLoose_117941Binding = _createForOfIteratorHelperLoose_117941;
|
|
get = allSounds.get;
|
|
value4 = Reflect.apply(get, allSounds, [property]);
|
|
reducibleJoin3: while (true) {
|
|
if (value4 != null) {
|
|
r4 = value4;
|
|
break reducibleJoin3;
|
|
}
|
|
r4 = [];
|
|
break reducibleJoin3;
|
|
}
|
|
value5 = _createForOfIteratorHelperLoose_117941Binding(r4);
|
|
value6 = value5();
|
|
done = value6.done;
|
|
if (!done) {
|
|
r14 = value6;
|
|
reducibleLoop4: while (true) {
|
|
value7 = r14.value;
|
|
_addSectionForPotentialSoundIds_loop2(value7);
|
|
value8 = value5();
|
|
done = value8.done;
|
|
if (done) {
|
|
break reducibleLoop4;
|
|
}
|
|
r14 = value8;
|
|
continue reducibleLoop4;
|
|
}
|
|
}
|
|
value9 = typeof r7 === 'bigint' ? r7 + 1n : +r7 + 1;
|
|
length = items2.length;
|
|
if (value9 < length) {
|
|
r7 = value9;
|
|
continue reducibleLoop1;
|
|
}
|
|
break reducibleLoop1;
|
|
}
|
|
}
|
|
const items3 = [];
|
|
const value10 = _createForOfIteratorHelperLoose_117941(potentialSoundIdsForSection);
|
|
const value11 = value10();
|
|
done = value11.done;
|
|
if (!done) {
|
|
r8 = value11;
|
|
reducibleLoop7: while (true) {
|
|
value12 = r8.value;
|
|
property = object[value12];
|
|
reducibleJoin9: while (true) {
|
|
if (property == null) {
|
|
break reducibleJoin9;
|
|
}
|
|
push = items3.push;
|
|
Reflect.apply(push, items3, [property]);
|
|
break reducibleJoin9;
|
|
}
|
|
value13 = value10();
|
|
done = value13.done;
|
|
if (done) {
|
|
break reducibleLoop7;
|
|
}
|
|
r8 = value13;
|
|
continue reducibleLoop7;
|
|
}
|
|
}
|
|
const soundItems = createSoundItems(items3, sortSoundsFn);
|
|
reducibleJoin12: while (true) {
|
|
if (soundItems.length > 0) {
|
|
push = sections.push;
|
|
Reflect.apply(push, sections, [{key: sectionType, categoryInfo: {type: sectionType}, items: soundItems}]);
|
|
break reducibleJoin12;
|
|
}
|
|
break reducibleJoin12;
|
|
}
|
|
function _addSectionForPotentialSoundIds_loop(a0) { // fn#117956, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15616:2801, owner: _addSectionForPotentialSoundIds._loop, offset: 0x024c69fe, size: 58 bytes, params: 2, frame: 13
|
|
const env0_0 = a0;
|
|
if (potentialSoundIdsForSection.find(_fun117957) != null) {
|
|
env0_1[a0.soundId] = a0;
|
|
}
|
|
function _fun117957(a0) { // fn#117957, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15616:2827, offset: 0x024c6a38, size: 22 bytes, params: 2, frame: 2
|
|
return a0 === env0_0.soundId;
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function _fun117958(a0) { // fn#117958, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15616:4458, offset: 0x024c6a4e, size: 123 bytes, params: 2, frame: 13
|
|
const type = a0.categoryInfo.type;
|
|
const SoundboardSoundGridSectionType = (SoundboardTypesModule).SoundboardSoundGridSectionType;
|
|
const GUILD = SoundboardSoundGridSectionType.GUILD;
|
|
if (type === GUILD) {
|
|
if (a0.categoryInfo.isNitroLocked) {
|
|
env0_1 = env0_1 + a0.items.length;
|
|
} else {
|
|
env0_0 = env0_0 + a0.items.length;
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function useSearchCategories(a0, a1, a2) { // fn#117959, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15616:4821, offset: 0x024c6ac9, size: 71 bytes, params: 4, frame: 16
|
|
const env0_0 = a0;
|
|
const env0_1 = a1;
|
|
const env0_2 = a2;
|
|
return ReactModule.useMemo(_fun117960, [a0, a2.length, a1]);
|
|
function _fun117960() { // fn#117960, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15616:4875, offset: 0x024c6b10, size: 130 bytes, params: 1, frame: 17
|
|
var r0;
|
|
var object;
|
|
var value2;
|
|
const SoundboardSoundGridSectionType = (SoundboardTypesModule).SoundboardSoundGridSectionType;
|
|
var SEARCH;
|
|
if (importDefault.length > 0) {
|
|
object = {};
|
|
value2 = environment.__proto__;
|
|
SEARCH = SoundboardSoundGridSectionType.SEARCH;
|
|
object.key = SEARCH;
|
|
SEARCH = SoundboardSoundGridSectionType.SEARCH;
|
|
object.categoryInfo = {type: SEARCH};
|
|
object.items = createSoundItems(require);
|
|
r0 = [object];
|
|
} else {
|
|
r0 = env0_0;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun117940, 15419, [57, 31, 1867, 3784, 1878, 4613, 4614, 1880, 6639, 8249, 15420, 566, 3802, 15421,
|
|
9077,
|
|
2]) /* metro module 15419, dependencies: [57, 31, 1867, 3784, 1878, 4613, 4614, 1880, 6639, 8249, 15420, 566, 3802, 15421, 9077, 2] */;
|