Initial commit

This commit is contained in:
janisslsm committed 2026-07-27 16:20:00 +03:00
commit af3b49f756
16065 files changed
+2938410

No files matched your search

@@ -0,0 +1,259 @@
/* Metro module 14613; source: modules/premium/powerups/hooks/useBoostToUnlockFeaturedPowerup.tsx; dependencies: [57, 31, 1867, 8258, 8259, 661, 8188, 566, 8254, 14614, 2] */
function _fun110499(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#110499, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14810:6, offset: 0x0237b3ab, size: 456 bytes, params: 8, frame: 21
const env0_0 = require;
const _arrayLikeToArray_110502 = 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 Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const guildPowerupsStore = importDefault(8258) /* metro dependency 8258: GuildPowerupsStore */;
const env0_7 = (require(8259) /* metro dependency 8259: GuildPowerupsConstants */).GUILD_POWERUP_TIER_3_OVERRIDDEN_SKUS;
const env0_8 = (require(661) /* metro dependency 661: Constants */).GuildFeatures;
const GUILD_POWERUP_LEVEL_1_SKU_ID = (require(8188) /* metro dependency 8188: Powerups */).GUILD_POWERUP_LEVEL_1_SKU_ID;
const items2 = [{skuId: GUILD_POWERUP_LEVEL_1_SKU_ID, threshold: 1}];
const GUILD_POWERUP_LEVEL_2_SKU_ID = (require(8188) /* metro dependency 8188: Powerups */).GUILD_POWERUP_LEVEL_2_SKU_ID;
items2[1] = {skuId: GUILD_POWERUP_LEVEL_2_SKU_ID, threshold: 2};
const GUILD_POWERUP_LEVEL_3_SKU_ID = (require(8188) /* metro dependency 8188: Powerups */).GUILD_POWERUP_LEVEL_3_SKU_ID;
items2[2] = {skuId: GUILD_POWERUP_LEVEL_3_SKU_ID, threshold: 2};
const GUILD_POWERUP_TAG_SKU_ID = (require(8188) /* metro dependency 8188: Powerups */).GUILD_POWERUP_TAG_SKU_ID;
items2[3] = {skuId: GUILD_POWERUP_TAG_SKU_ID, threshold: 1};
const GUILD_POWERUP_ROLE_COLOR_SKU_ID = (require(8188) /* metro dependency 8188: Powerups */).GUILD_POWERUP_ROLE_COLOR_SKU_ID;
items2[4] = {skuId: GUILD_POWERUP_ROLE_COLOR_SKU_ID, threshold: 1};
const GUILD_TAGS_BADGE_PACK_FLEX_POWERUP_SKU_ID = (require(8188) /* metro dependency 8188: Powerups */).GUILD_TAGS_BADGE_PACK_FLEX_POWERUP_SKU_ID;
items2[5] = {skuId: GUILD_TAGS_BADGE_PACK_FLEX_POWERUP_SKU_ID, threshold: 1};
const GUILD_TAGS_BADGE_PACK_PETS_POWERUP_SKU_ID = (require(8188) /* metro dependency 8188: Powerups */).GUILD_TAGS_BADGE_PACK_PETS_POWERUP_SKU_ID;
items2[6] = {skuId: GUILD_TAGS_BADGE_PACK_PETS_POWERUP_SKU_ID, threshold: 1};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/powerups/hooks/useBoostToUnlockFeaturedPowerup.tsx');
exports.default = useBoostToUnlockFeaturedPowerup;
}
function _createForOfIteratorHelperLoose_110500(a0, a1) { // fn#110500, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14810:214, offset: 0x0237b573, 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 _fun110501;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_110502(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_110502(a0, value);
r6 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_110502(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun110501;
}
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 useBoostToUnlockFeaturedPowerup(a0) { // fn#110503, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14810:1676, offset: 0x0237b6e7, size: 263 bytes, params: 2, frame: 20
const env0_0 = a0;
const stateForGuild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildPowerupsStore],
_fun110504);
const available = (importDefault(8254) /* metro dependency 8254: useGuildPowerupsBoostCount */)(a0).available;
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], _fun110505);
const env0_3 = value2;
const value3 = (require(14614) /* metro dependency 14614: BoostToUnlockCoachmarkExperiment */).useBoostToUnlockCoachmarkEnabled('useBoostToUnlockFeaturedPowerup');
const binding = value3;
return binding.useMemo(_fun110507, [stateForGuild, available, value2, value3, env0_3(binding.useState(function() {
var Math = global.Math;
return Math.random();
}), 1)[0]]);
}
function _fun110505() { // fn#110505, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14810:1845, offset: 0x0237b7ee, size: 70 bytes, params: 1, frame: 12
const value = environment.__proto__;
const guild = GuildStore.getGuild(env0_0);
return (guild == null ? undefined : guild.features.has(GuildFeatures.PREMIUM_TIER_3_OVERRIDE)) === true;
}
function _fun110507() { // fn#110507, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14810:2088, offset: 0x0237b834, size: 303 bytes, params: 1, frame: 26
var environment;
var r5;
var r14;
var allPowerups;
var unlockedPowerups;
var items2;
var value2;
var value3;
var value4;
var done;
var value5;
var skuId;
var threshold;
var property;
var has;
var dependencies;
var every;
var cost;
var value6;
var value7;
var value8;
var push;
var value9;
var length;
var Math;
let stateForGuildBinding = stateForGuild;
if (stateForGuildBinding != null) {
reducibleJoin14: while (true) {
if (env0_4) {
stateForGuildBinding = stateForGuild;
allPowerups = stateForGuildBinding.allPowerups;
unlockedPowerups = stateForGuildBinding.unlockedPowerups;
var env0_0 = unlockedPowerups;
items2 = [];
value2 = environment.__proto__;
value3 = _createForOfIteratorHelperLoose_110500(env1_9);
value4 = value3();
done = value4.done;
if (!done) {
r5 = value4;
reducibleLoop3: while (true) {
value5 = r5.value;
skuId = value5.skuId;
threshold = value5.threshold;
property = allPowerups[skuId];
reducibleJoin12: while (true) {
if (property == null) {
break reducibleJoin12;
}
if (env0_3) {
has = GUILD_POWERUP_TIER_3_OVERRIDDEN_SKUS.has;
if (Reflect.apply(has, GUILD_POWERUP_TIER_3_OVERRIDDEN_SKUS, [skuId])) {
break reducibleJoin12;
}
}
if (unlockedPowerups[skuId] != null) {
break reducibleJoin12;
}
dependencies = property.dependencies;
every = dependencies.every;
if (Reflect.apply(every, dependencies, [function(a0) {
return unlockedPowerups[a0] != null;
}])) {
cost = property.cost;
value6 = cost - available;
value7 = value6 > 0;
reducibleJoin10: while (true) {
if (value7) {
value8 = value6 <= threshold;
r14 = value8;
break reducibleJoin10;
}
r14 = value7;
break reducibleJoin10;
}
if (r14) {
push = items2.push;
Reflect.apply(push, items2, [property]);
break reducibleJoin12;
}
break reducibleJoin12;
}
break reducibleJoin12;
}
value9 = value3();
done = value9.done;
if (done) {
break reducibleLoop3;
}
r5 = value9;
continue reducibleLoop3;
}
}
length = items2.length;
if (length > 0) {
Math = global.Math;
return items2[Math.floor(env0_5 * items2.length)];
}
break reducibleJoin14;
}
break reducibleJoin14;
}
}
}