This commit is contained in:
janisslsm committed 2026-07-28 01:06:53 +03:00
1 parent af3b49f756
commit 1781d25a15
22448 files changed
+2731829 -2650550

No files matched your search

+341 -278
View File
@@ -1,4 +1,13 @@
/* Metro module 9500; source: modules/quests/utils/QuestRewardUtils.tsx; dependencies: [5121, 9501, 7098, 7091, 3381, 1244, 9502, 9503, 9504, 9505, 9506, 6531, 2] */
import CollectiblesCategoryStore from '../../collectibles/CollectiblesCategoryStore.tsx'; /* Metro dependency 5121 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as QuestTypesModule from '../QuestTypes.tsx'; /* Metro dependency 6531 */
import * as QuestRewardTypesModule from '../../../external/discord_common/js/shared/shared-constants/QuestRewardTypes.tsx'; /* Metro dependency 7098 */
import * as QuestRewardExpirationModeModule from '../../../external/discord_common/js/shared/shared-constants/QuestRewardExpirationMode.tsx'; /* Metro dependency 9501 */
import * as QuestCopyUtilsModule from './QuestCopyUtils.tsx'; /* Metro dependency 9505 */
import * as QuestRewardAssignmentMethodsModule from '../../../external/discord_common/js/shared/shared-constants/QuestRewardAssignmentMethods.tsx'; /* Metro dependency 9506 */
function _fun74129(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#74129, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9686:6, offset: 0x01d82096, size: 573 bytes, params: 8, frame: 27
const env0_0 = require;
const closure = function(a0) {
@@ -20,17 +29,16 @@ function _fun74129(global, require, importDefault, importAll, module, exports, d
const closure5 = function(a0) {
return a0.rewardsConfig.rewards.find(_fun74139)?.orbQuantity;
};
const closure6 = isCollectibleQuestRewardPremiumExtendable;
const closure7 = getQuestOrbMultiplier;
const closure8 = getQuestOrbRewardQuantityForUser;
const isCollectibleQuestRewardPremiumExtendable2 = isCollectibleQuestRewardPremiumExtendable;
const getQuestOrbMultiplier2 = getQuestOrbMultiplier;
const getQuestOrbRewardQuantityForUser2 = getQuestOrbRewardQuantityForUser;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const collectiblesCategoryStore = importDefault(5121) /* metro dependency 5121: CollectiblesCategoryStore */;
const Set = global.Set;
const {PREMIUM_EXTENSION,
PREMIUM_PERMANENT} = (require(9501) /* metro dependency 9501: QuestRewardExpirationMode */).QuestRewardExpirationMode;
PREMIUM_PERMANENT} = (QuestRewardExpirationModeModule).QuestRewardExpirationMode;
const set = new Set([PREMIUM_EXTENSION, PREMIUM_PERMANENT]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/utils/QuestRewardUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/utils/QuestRewardUtils.tsx');
exports.getCollectiblesQuestReward = closure;
exports.getCollectibleQuestRewardExtendableExpirationDate = getCollectibleQuestRewardExtendableExpirationDate;
exports.getCollectibleQuestRewardDuration = getCollectibleQuestRewardDuration;
@@ -59,7 +67,7 @@ function _fun74129(global, require, importDefault, importAll, module, exports, d
}
return value2;
};
exports.isCollectibleQuestRewardPremiumExtendable = closure6;
exports.isCollectibleQuestRewardPremiumExtendable = isCollectibleQuestRewardPremiumExtendable2;
exports.isCollectibleQuestRewardPermanentWithPremiumSubscription = isCollectibleQuestRewardPermanentWithPremiumSubscription;
exports.getQuestPrimaryReward = function(a0) {
var property = a0.userStatus;
@@ -68,9 +76,9 @@ function _fun74129(global, require, importDefault, importAll, module, exports, d
property = a0.config;
return value ? property.rewardsConfig.rewards[r2] : property.rewards[r2];
};
exports.getQuestOrbMultiplier = closure7;
exports.getQuestOrbMultiplier = getQuestOrbMultiplier2;
exports.getQuestOrbMultiplierForUser = getQuestOrbMultiplierForUser;
exports.getQuestOrbRewardQuantityForUser = closure8;
exports.getQuestOrbRewardQuantityForUser = getQuestOrbRewardQuantityForUser2;
exports.getDefaultRewardName = function(a0, a1) {
return _getDefaultRewardName(a0, a1, false);
};
@@ -91,292 +99,347 @@ function _fun74129(global, require, importDefault, importAll, module, exports, d
return property.length > 0 ? property[0] : require(dependencyMap[11]).QuestRewardCodePlatforms.CROSS_PLATFORM;
};
exports.getPlatformString = getPlatformString;
}
function getCollectiblesQuestReward({rewardsConfig}) { // fn#74130, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9686:226, offset: 0x01d822d3, size: 99 bytes, params: 2, frame: 15
const value = rewardsConfig.rewards.find(function({type}) {
return type === require(dependencyMap[2]).QuestRewardTypes.COLLECTIBLE;
});
const type = value?.type;
const QuestRewardTypes = (QuestRewardTypesModule).QuestRewardTypes;
const COLLECTIBLE = QuestRewardTypes.COLLECTIBLE;
return type !== COLLECTIBLE ? null : value;
function _fun74131({type}) { // fn#74131, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9686:301, offset: 0x01d82336, size: 51 bytes, params: 2, frame: 12
const QuestRewardTypes = (QuestRewardTypesModule).QuestRewardTypes;
const COLLECTIBLE = QuestRewardTypes.COLLECTIBLE;
return type === COLLECTIBLE;
}
function getCollectiblesQuestReward({rewardsConfig}) { // fn#74130, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9686:226, offset: 0x01d822d3, size: 99 bytes, params: 2, frame: 15
const value = rewardsConfig.rewards.find(function({type}) {
return type === require(dependencyMap[2]).QuestRewardTypes.COLLECTIBLE;
});
const type = value?.type;
const QuestRewardTypes = (require(7098) /* metro dependency 7098: QuestRewardTypes */).QuestRewardTypes;
const COLLECTIBLE = QuestRewardTypes.COLLECTIBLE;
return type !== COLLECTIBLE ? null : value;
}
function hasFractionalPremiumQuestReward({rewardsConfig}) { // fn#74132, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9686:430, offset: 0x01d82369, size: 37 bytes, params: 2, frame: 11
return rewardsConfig.rewards.some(function({type}) {
return type === require(dependencyMap[2]).QuestRewardTypes.FRACTIONAL_PREMIUM;
});
}
function hasVirtualCurrencyReward({rewardsConfig}) { // fn#74134, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9686:570, offset: 0x01d823c1, size: 37 bytes, params: 2, frame: 11
return rewardsConfig.rewards.some(function({type}) {
return type === require(dependencyMap[2]).QuestRewardTypes.VIRTUAL_CURRENCY;
});
}
function hasPremiumOrbQuantity({rewardsConfig}) { // fn#74136, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9686:701, offset: 0x01d82419, size: 67 bytes, params: 2, frame: 12
const premiumOrbQuantity = rewardsConfig.rewards.find(function({type}) {
return type === require(dependencyMap[2]).QuestRewardTypes.VIRTUAL_CURRENCY;
})?.premiumOrbQuantity;
return premiumOrbQuantity != null && premiumOrbQuantity > 0;
}
function getVirtualCurrencyRewardOrbQuantity({rewardsConfig}) { // fn#74138, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9686:886, offset: 0x01d8245c, size: 54 bytes, params: 2, frame: 11
return rewardsConfig.rewards.find(function({type}) {
return type === require(dependencyMap[2]).QuestRewardTypes.VIRTUAL_CURRENCY;
})?.orbQuantity;
}
function isCollectibleQuestRewardPremiumExtendable(a0) { // fn#74140, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9686:1063, offset: 0x01d82492, size: 55 bytes, params: 2, frame: 13
const getCollectiblesQuestRewardBinding = getCollectiblesQuestReward;
const value2 = undefined;
const collectiblesQuestRewardBinding = getCollectiblesQuestRewardBinding(a0);
const expirationMode = collectiblesQuestRewardBinding == null ? value2 : collectiblesQuestRewardBinding.expirationMode;
return expirationMode != null && env0_3.has(expirationMode);
}
function getQuestOrbMultiplier({rewardsConfig}) { // fn#74141, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9686:1214, offset: 0x01d824c9, size: 158 bytes, params: 2, frame: 15
const value = rewardsConfig.rewards.find(function({type}) {
return type === require(dependencyMap[2]).QuestRewardTypes.VIRTUAL_CURRENCY;
});
const type = value?.type;
const QuestRewardTypes = (require(7098) /* metro dependency 7098: QuestRewardTypes */).QuestRewardTypes;
const VIRTUAL_CURRENCY = QuestRewardTypes.VIRTUAL_CURRENCY;
if (type !== VIRTUAL_CURRENCY) {
return null;
}
const premiumOrbQuantity = value.premiumOrbQuantity;
const orbQuantity = value.orbQuantity;
return premiumOrbQuantity == null || orbQuantity === 0 ? null : global.Math.round(premiumOrbQuantity / orbQuantity * 100) / 100;
}
function getQuestOrbRewardQuantityForUser(a0, a1) { // fn#74143, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9686:1519, offset: 0x01d82567, size: 158 bytes, params: 3, frame: 16
var r2;
var moduleValue2;
const value = a0.rewardsConfig.rewards.find(function({type}) {
return type === require(dependencyMap[2]).QuestRewardTypes.VIRTUAL_CURRENCY;
});
if (value == null) {
return null;
}
if (a1 == null) {
return value.orbQuantity;
}
if (hasPremiumOrbQuantity(a0)) {
moduleValue2 = require(9503) /* metro dependency 9503: QuestOrbMultiplierUtils */;
r2 = moduleValue2.shouldReceiveQuestOrbMultiplier((require(9502) /* metro dependency 9502: QuestOrbMultiplierHooks */).getQuestOrbMultiplierEligibilityForUser(a1)) && value.premiumOrbQuantity != null ? value.premiumOrbQuantity : value.orbQuantity;
} else {
r2 = value.orbQuantity;
}
return r2;
}
function hasFractionalPremiumQuestReward({rewardsConfig}) { // fn#74132, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9686:430, offset: 0x01d82369, size: 37 bytes, params: 2, frame: 11
return rewardsConfig.rewards.some(function({type}) {
return type === require(dependencyMap[2]).QuestRewardTypes.FRACTIONAL_PREMIUM;
});
function _fun74133({type}) { // fn#74133, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9686:511, offset: 0x01d8238e, size: 51 bytes, params: 2, frame: 12
const QuestRewardTypes = (QuestRewardTypesModule).QuestRewardTypes;
const FRACTIONAL_PREMIUM = QuestRewardTypes.FRACTIONAL_PREMIUM;
return type === FRACTIONAL_PREMIUM;
}
function _getDefaultRewardName(a0, a1, a2) { // fn#74145, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9686:1899, offset: 0x01d82605, size: 231 bytes, params: 4, frame: 18
var r7;
var intl;
if (hasFractionalPremiumQuestReward(a0)) {
return (require(9504) /* metro dependency 9504: FractionalPremiumUtils */).getFractionalPremiumQuestRewardName(a0);
}
if (hasVirtualCurrencyReward(a0)) {
r7 = getQuestOrbRewardQuantityForUser(a0, a1) ?? getVirtualCurrencyRewardOrbQuantity(a0) ?? 0;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['nLXlh+'],
{orbAmount: r7});
}
const value = require(9505) /* metro dependency 9505: QuestCopyUtils */;
const getDefaultReward = value.getDefaultReward;
const messages = Reflect.apply(getDefaultReward, value, [a0]).messages;
return a2 ? messages.nameWithArticle : messages.name;
}
function getCollectibleQuestRewardExtendableExpirationDate(a0) { // fn#74146, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9686:2580, offset: 0x01d826ec, size: 95 bytes, params: 2, frame: 14
var r0;
var value;
const collectiblesQuestReward = getCollectiblesQuestReward(a0);
const value3 = null;
if (value3 != collectiblesQuestReward) {
if ('expiresAtPremium' in collectiblesQuestReward) {
if (value3 != collectiblesQuestReward.expiresAtPremium) {
value = require(7091) /* metro dependency 7091: QuestDataUtils */;
value = value.getQuestFormattedDate(collectiblesQuestReward.expiresAtPremium);
r0 = value;
function hasVirtualCurrencyReward({rewardsConfig}) { // fn#74134, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9686:570, offset: 0x01d823c1, size: 37 bytes, params: 2, frame: 11
return rewardsConfig.rewards.some(function({type}) {
return type === require(dependencyMap[2]).QuestRewardTypes.VIRTUAL_CURRENCY;
});
function _fun74135({type}) { // fn#74135, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9686:644, offset: 0x01d823e6, size: 51 bytes, params: 2, frame: 12
const QuestRewardTypes = (QuestRewardTypesModule).QuestRewardTypes;
const VIRTUAL_CURRENCY = QuestRewardTypes.VIRTUAL_CURRENCY;
return type === VIRTUAL_CURRENCY;
}
}
function hasPremiumOrbQuantity({rewardsConfig}) { // fn#74136, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9686:701, offset: 0x01d82419, size: 67 bytes, params: 2, frame: 12
const premiumOrbQuantity = rewardsConfig.rewards.find(function({type}) {
return type === require(dependencyMap[2]).QuestRewardTypes.VIRTUAL_CURRENCY;
})?.premiumOrbQuantity;
return premiumOrbQuantity != null && premiumOrbQuantity > 0;
function _fun74137({type}) { // fn#74137, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9686:771, offset: 0x01d823e6, size: 51 bytes, params: 2, frame: 12
const QuestRewardTypes = (QuestRewardTypesModule).QuestRewardTypes;
const VIRTUAL_CURRENCY = QuestRewardTypes.VIRTUAL_CURRENCY;
return type === VIRTUAL_CURRENCY;
}
}
function getVirtualCurrencyRewardOrbQuantity({rewardsConfig}) { // fn#74138, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9686:886, offset: 0x01d8245c, size: 54 bytes, params: 2, frame: 11
return rewardsConfig.rewards.find(function({type}) {
return type === require(dependencyMap[2]).QuestRewardTypes.VIRTUAL_CURRENCY;
})?.orbQuantity;
function _fun74139({type}) { // fn#74139, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9686:970, offset: 0x01d823e6, size: 51 bytes, params: 2, frame: 12
const QuestRewardTypes = (QuestRewardTypesModule).QuestRewardTypes;
const VIRTUAL_CURRENCY = QuestRewardTypes.VIRTUAL_CURRENCY;
return type === VIRTUAL_CURRENCY;
}
}
function isCollectibleQuestRewardPremiumExtendable(a0) { // fn#74140, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9686:1063, offset: 0x01d82492, size: 55 bytes, params: 2, frame: 13
const getCollectiblesQuestRewardBinding = getCollectiblesQuestReward;
const value2 = undefined;
const collectiblesQuestRewardBinding = getCollectiblesQuestRewardBinding(a0);
const expirationMode = collectiblesQuestRewardBinding == null ? value2 : collectiblesQuestRewardBinding.expirationMode;
return expirationMode != null && env0_3.has(expirationMode);
}
function getQuestOrbMultiplier({rewardsConfig}) { // fn#74141, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9686:1214, offset: 0x01d824c9, size: 158 bytes, params: 2, frame: 15
const value = rewardsConfig.rewards.find(function({type}) {
return type === require(dependencyMap[2]).QuestRewardTypes.VIRTUAL_CURRENCY;
});
const type = value?.type;
const QuestRewardTypes = (QuestRewardTypesModule).QuestRewardTypes;
const VIRTUAL_CURRENCY = QuestRewardTypes.VIRTUAL_CURRENCY;
if (type !== VIRTUAL_CURRENCY) {
return null;
}
const premiumOrbQuantity = value.premiumOrbQuantity;
const orbQuantity = value.orbQuantity;
return premiumOrbQuantity == null || orbQuantity === 0 ? null : global.Math.round(premiumOrbQuantity / orbQuantity * 100) / 100;
}
function getQuestOrbRewardQuantityForUser(a0, a1) { // fn#74143, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9686:1519, offset: 0x01d82567, size: 158 bytes, params: 3, frame: 16
var r2;
var moduleValue2;
const value = a0.rewardsConfig.rewards.find(function({type}) {
return type === require(dependencyMap[2]).QuestRewardTypes.VIRTUAL_CURRENCY;
});
if (value == null) {
return null;
}
if (a1 == null) {
return value.orbQuantity;
}
if (hasPremiumOrbQuantity(a0)) {
moduleValue2 = require(9503) /* metro dependency 9503: QuestOrbMultiplierUtils */;
r2 = moduleValue2.shouldReceiveQuestOrbMultiplier((require(9502) /* metro dependency 9502: QuestOrbMultiplierHooks */).getQuestOrbMultiplierEligibilityForUser(a1)) && value.premiumOrbQuantity != null ? value.premiumOrbQuantity : value.orbQuantity;
} else {
r2 = value.orbQuantity;
}
return r2;
}
function _getDefaultRewardName(a0, a1, a2) { // fn#74145, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9686:1899, offset: 0x01d82605, size: 231 bytes, params: 4, frame: 18
var r7;
var intl;
if (hasFractionalPremiumQuestReward(a0)) {
return (require(9504) /* metro dependency 9504: FractionalPremiumUtils */).getFractionalPremiumQuestRewardName(a0);
}
if (hasVirtualCurrencyReward(a0)) {
r7 = getQuestOrbRewardQuantityForUser(a0, a1) ?? getVirtualCurrencyRewardOrbQuantity(a0) ?? 0;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['nLXlh+'],
{orbAmount: r7});
}
const getDefaultReward = QuestCopyUtilsModule.getDefaultReward;
const messages = Reflect.apply(getDefaultReward, QuestCopyUtilsModule, [a0]).messages;
return a2 ? messages.nameWithArticle : messages.name;
}
function getCollectibleQuestRewardExtendableExpirationDate(a0) { // fn#74146, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9686:2580, offset: 0x01d826ec, size: 95 bytes, params: 2, frame: 14
var r0;
var value;
const collectiblesQuestReward = getCollectiblesQuestReward(a0);
const value3 = null;
if (value3 != collectiblesQuestReward) {
if ('expiresAtPremium' in collectiblesQuestReward) {
if (value3 != collectiblesQuestReward.expiresAtPremium) {
value = require(7091) /* metro dependency 7091: QuestDataUtils */;
value = value.getQuestFormattedDate(collectiblesQuestReward.expiresAtPremium);
r0 = value;
} else {
r0 = value3;
}
} else {
r0 = value3;
}
} else {
r0 = value3;
}
} else {
r0 = value3;
return r0;
}
return r0;
}
function getCollectibleQuestRewardDuration(a0) { // fn#74147, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9686:2836, offset: 0x01d8274b, size: 554 bytes, params: 2, frame: 22
var expiresAt;
var Date;
var prototype;
var value3;
var date;
var value4;
var value5;
var value6;
var value7;
var value8;
var value9;
var value11;
var value12;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const collectiblesQuestReward = getCollectiblesQuestReward(a0);
if (collectiblesQuestReward != null) {
if ('expiresAt' in collectiblesQuestReward) {
expiresAt = collectiblesQuestReward.expiresAt;
if (expiresAt == null) {
return null;
function getCollectibleQuestRewardDuration(a0) { // fn#74147, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9686:2836, offset: 0x01d8274b, size: 554 bytes, params: 2, frame: 22
var expiresAt;
var Date;
var prototype;
var value3;
var date;
var value4;
var value5;
var value6;
var value7;
var value8;
var value9;
var value11;
var value12;
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
const collectiblesQuestReward = getCollectiblesQuestReward(a0);
if (collectiblesQuestReward != null) {
if ('expiresAt' in collectiblesQuestReward) {
expiresAt = collectiblesQuestReward.expiresAt;
if (expiresAt == null) {
return null;
}
Date = global.Date;
expiresAt = a0.expiresAt;
prototype = Date.prototype;
value3 = Object.create(prototype, {constructor: {value: Date}});
date = new Date();
value4 = date instanceof Object ? date : value3;
Date = global.Date;
expiresAt = collectiblesQuestReward.expiresAt;
prototype = Date.prototype;
value5 = Object.create(prototype, {constructor: {value: Date}});
date = new Date();
value6 = date instanceof Object ? date : value5;
value7 = (require(3381) /* metro dependency 3381 */).differenceInDays(value6, value4);
value8 = global.Math.floor(value7 / 30);
value9 = 0;
value11 = value8 + (value7 % 30 >= 25 ? 1 : value9);
if (value11 >= 12) {
return intl.formatToPlainString(t.PClsrw, {years: global.Math.floor(value11 / 12)});
}
if (value11 > value9) {
return intl.formatToPlainString(t.kridzK, {months: value11});
}
value12 = (require(3381) /* metro dependency 3381 */).differenceInDays(value6, value4);
if (value12 >= 7) {
return intl.formatToPlainString(t.EmoBD2, {weeks: global.Math.ceil(value12 / 7)});
}
return intl.formatToPlainString(t['k2UNz+'], {days: value12});
}
Date = global.Date;
expiresAt = a0.expiresAt;
prototype = Date.prototype;
value3 = Object.create(prototype, {constructor: {value: Date}});
date = new Date();
value4 = date instanceof Object ? date : value3;
Date = global.Date;
expiresAt = collectiblesQuestReward.expiresAt;
prototype = Date.prototype;
value5 = Object.create(prototype, {constructor: {value: Date}});
date = new Date();
value6 = date instanceof Object ? date : value5;
value7 = (require(3381) /* metro dependency 3381 */).differenceInDays(value6, value4);
value8 = global.Math.floor(value7 / 30);
value9 = 0;
value11 = value8 + (value7 % 30 >= 25 ? 1 : value9);
if (value11 >= 12) {
return intl.formatToPlainString(t.PClsrw, {years: global.Math.floor(value11 / 12)});
}
if (value11 > value9) {
return intl.formatToPlainString(t.kridzK, {months: value11});
}
value12 = (require(3381) /* metro dependency 3381 */).differenceInDays(value6, value4);
if (value12 >= 7) {
return intl.formatToPlainString(t.EmoBD2, {weeks: global.Math.ceil(value12 / 7)});
}
return intl.formatToPlainString(t['k2UNz+'], {days: value12});
}
return null;
}
function hasCollectiblesQuestReward(a0) { // fn#74148, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9686:3683, offset: 0x01d82975, size: 25 bytes, params: 2, frame: 11
return getCollectiblesQuestReward(a0) != null;
}
function hasInGameQuestReward({rewardsConfig}) { // fn#74149, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9686:3789, offset: 0x01d8298e, size: 37 bytes, params: 2, frame: 11
return rewardsConfig.rewards.some(function({type}) {
return type === require(dependencyMap[2]).QuestRewardTypes.IN_GAME;
});
function _fun74150({type}) { // fn#74150, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9686:3859, offset: 0x01d829b3, size: 51 bytes, params: 2, frame: 12
const QuestRewardTypes = (QuestRewardTypesModule).QuestRewardTypes;
const IN_GAME = QuestRewardTypes.IN_GAME;
return type === IN_GAME;
}
}
function hasQuestRewardCode({rewardsConfig}) { // fn#74151, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9686:3929, offset: 0x01d829e6, size: 37 bytes, params: 2, frame: 11
return rewardsConfig.rewards.some(function({type}) {
return type === require(dependencyMap[2]).QuestRewardTypes.REWARD_CODE;
});
function _fun74152({type}) { // fn#74152, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9686:3997, offset: 0x01d82a0b, size: 51 bytes, params: 2, frame: 12
const QuestRewardTypes = (QuestRewardTypesModule).QuestRewardTypes;
const REWARD_CODE = QuestRewardTypes.REWARD_CODE;
return type === REWARD_CODE;
}
}
function getInGameQuestReward({rewardsConfig}) { // fn#74153, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9686:4073, offset: 0x01d82a3e, size: 49 bytes, params: 2, frame: 11
return rewardsConfig.rewards.find(function({type}) {
return type === require(dependencyMap[2]).QuestRewardTypes.IN_GAME;
}) ?? null;
function _fun74154({type}) { // fn#74154, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9686:4158, offset: 0x01d829b3, size: 51 bytes, params: 2, frame: 12
const QuestRewardTypes = (QuestRewardTypesModule).QuestRewardTypes;
const IN_GAME = QuestRewardTypes.IN_GAME;
return type === IN_GAME;
}
}
function getCollectiblesQuestRewardItem(a0) { // fn#74155, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9686:4248, offset: 0x01d82a6f, size: 92 bytes, params: 2, frame: 14
const getCollectiblesQuestRewardBinding = getCollectiblesQuestReward;
const value2 = undefined;
const collectiblesQuestRewardBinding = getCollectiblesQuestRewardBinding(a0);
const value4 = null;
const product = CollectiblesCategoryStore.getProduct(value4 == collectiblesQuestRewardBinding ? value2 : collectiblesQuestRewardBinding.skuId);
const r1 = value4 == product || value4 == product.items ? value2 : product.items[0];
return value4 != r1 ? r1 : value4;
}
function getVirtualCurrencyRewardPremiumOrbQuantity({rewardsConfig}) { // fn#74156, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9686:4559, offset: 0x01d82acb, size: 102 bytes, params: 2, frame: 14
const value = rewardsConfig.rewards.find(function({type}) {
return type === require(dependencyMap[2]).QuestRewardTypes.VIRTUAL_CURRENCY;
});
const type = value?.type;
const QuestRewardTypes = (QuestRewardTypesModule).QuestRewardTypes;
const VIRTUAL_CURRENCY = QuestRewardTypes.VIRTUAL_CURRENCY;
if (type === VIRTUAL_CURRENCY) {
return value.premiumOrbQuantity;
}
function _fun74157({type}) { // fn#74157, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9686:4650, offset: 0x01d823e6, size: 51 bytes, params: 2, frame: 12
const QuestRewardTypes = (QuestRewardTypesModule).QuestRewardTypes;
const VIRTUAL_CURRENCY = QuestRewardTypes.VIRTUAL_CURRENCY;
return type === VIRTUAL_CURRENCY;
}
}
function isCollectibleQuestRewardPermanentWithPremiumSubscription(a0) { // fn#74158, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9686:4953, offset: 0x01d82b31, size: 84 bytes, params: 2, frame: 14
var r0;
var collectiblesQuestReward;
const isCollectibleQuestRewardPremiumExtendableBinding = isCollectibleQuestRewardPremiumExtendable;
const value2 = undefined;
const isCollectibleQuestRewardPremiumExtendable2 = isCollectibleQuestRewardPremiumExtendableBinding(a0);
if (isCollectibleQuestRewardPremiumExtendable2) {
collectiblesQuestReward = getCollectiblesQuestReward(a0);
r0 = (collectiblesQuestReward == null ? value2 : collectiblesQuestReward.expirationMode) === (require(9501) /* metro dependency 9501: QuestRewardExpirationMode */).QuestRewardExpirationMode.PREMIUM_PERMANENT;
} else {
r0 = isCollectibleQuestRewardPremiumExtendable2;
}
return r0;
}
function getQuestOrbMultiplierForUser(a0, a1) { // fn#74160, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9686:5494, offset: 0x01d82be0, size: 132 bytes, params: 3, frame: 17
var r0;
if (a1 == null) {
return 1;
}
var value;
const questOrbMultiplier = getQuestOrbMultiplier(a0);
const value3 = 1;
if (hasPremiumOrbQuantity(a0)) {
value = require(9503) /* metro dependency 9503: QuestOrbMultiplierUtils */;
r0 = value.shouldReceiveQuestOrbMultiplier((require(9502) /* metro dependency 9502: QuestOrbMultiplierHooks */).getQuestOrbMultiplierEligibilityForUser(a1)) ? questOrbMultiplier ?? value3 : value3;
} else {
r0 = value3;
}
return r0;
}
function isTieredRewardCodeQuest({quest}) { // fn#74164, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9686:6255, offset: 0x01d82cfa, size: 119 bytes, params: 2, frame: 13
const rewardsConfig = quest.config.rewardsConfig;
const assignmentMethod = rewardsConfig.assignmentMethod;
const QuestRewardAssignmentMethods = (QuestRewardAssignmentMethodsModule).QuestRewardAssignmentMethods;
const TIERED = QuestRewardAssignmentMethods.TIERED;
return assignmentMethod === TIERED && rewardsConfig.rewards.length > 0 && rewardsConfig.rewards.every(function({type}) {
return type === require(dependencyMap[2]).QuestRewardTypes.REWARD_CODE;
});
}
function getPlatformString(a0) { // fn#74167, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9686:6673, offset: 0x01d82db8, size: 482 bytes, params: 2, frame: 15
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
const QuestRewardCodePlatforms = (QuestTypesModule).QuestRewardCodePlatforms;
const XBOX = QuestRewardCodePlatforms.XBOX;
if (XBOX === a0) {
return intl.string(t.G84UWZ);
}
const PLAYSTATION = QuestRewardCodePlatforms.PLAYSTATION;
if (PLAYSTATION === a0) {
return intl.string(t['6IeKx2']);
}
const SWITCH = QuestRewardCodePlatforms.SWITCH;
if (SWITCH === a0) {
return intl.string(t['1pp0su']);
}
const PC = QuestRewardCodePlatforms.PC;
if (PC === a0) {
return intl.string(t['YK+wUg']);
}
const CROSS_PLATFORM = QuestRewardCodePlatforms.CROSS_PLATFORM;
if (CROSS_PLATFORM === a0) {
return intl.string(t.UWVbzV);
}
}
return null;
}
function hasCollectiblesQuestReward(a0) { // fn#74148, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9686:3683, offset: 0x01d82975, size: 25 bytes, params: 2, frame: 11
return getCollectiblesQuestReward(a0) != null;
}
function hasInGameQuestReward({rewardsConfig}) { // fn#74149, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9686:3789, offset: 0x01d8298e, size: 37 bytes, params: 2, frame: 11
return rewardsConfig.rewards.some(function({type}) {
return type === require(dependencyMap[2]).QuestRewardTypes.IN_GAME;
});
}
function hasQuestRewardCode({rewardsConfig}) { // fn#74151, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9686:3929, offset: 0x01d829e6, size: 37 bytes, params: 2, frame: 11
return rewardsConfig.rewards.some(function({type}) {
return type === require(dependencyMap[2]).QuestRewardTypes.REWARD_CODE;
});
}
function getInGameQuestReward({rewardsConfig}) { // fn#74153, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9686:4073, offset: 0x01d82a3e, size: 49 bytes, params: 2, frame: 11
return rewardsConfig.rewards.find(function({type}) {
return type === require(dependencyMap[2]).QuestRewardTypes.IN_GAME;
}) ?? null;
}
function getCollectiblesQuestRewardItem(a0) { // fn#74155, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9686:4248, offset: 0x01d82a6f, size: 92 bytes, params: 2, frame: 14
const getCollectiblesQuestRewardBinding = getCollectiblesQuestReward;
const value2 = undefined;
const collectiblesQuestRewardBinding = getCollectiblesQuestRewardBinding(a0);
const value4 = null;
const product = CollectiblesCategoryStore.getProduct(value4 == collectiblesQuestRewardBinding ? value2 : collectiblesQuestRewardBinding.skuId);
const r1 = value4 == product || value4 == product.items ? value2 : product.items[0];
return value4 != r1 ? r1 : value4;
}
function getVirtualCurrencyRewardPremiumOrbQuantity({rewardsConfig}) { // fn#74156, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9686:4559, offset: 0x01d82acb, size: 102 bytes, params: 2, frame: 14
const value = rewardsConfig.rewards.find(function({type}) {
return type === require(dependencyMap[2]).QuestRewardTypes.VIRTUAL_CURRENCY;
});
const type = value?.type;
const QuestRewardTypes = (require(7098) /* metro dependency 7098: QuestRewardTypes */).QuestRewardTypes;
const VIRTUAL_CURRENCY = QuestRewardTypes.VIRTUAL_CURRENCY;
if (type === VIRTUAL_CURRENCY) {
return value.premiumOrbQuantity;
}
}
function isCollectibleQuestRewardPermanentWithPremiumSubscription(a0) { // fn#74158, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9686:4953, offset: 0x01d82b31, size: 84 bytes, params: 2, frame: 14
var r0;
var collectiblesQuestReward;
const isCollectibleQuestRewardPremiumExtendableBinding = isCollectibleQuestRewardPremiumExtendable;
const value2 = undefined;
const isCollectibleQuestRewardPremiumExtendable2 = isCollectibleQuestRewardPremiumExtendableBinding(a0);
if (isCollectibleQuestRewardPremiumExtendable2) {
collectiblesQuestReward = getCollectiblesQuestReward(a0);
r0 = (collectiblesQuestReward == null ? value2 : collectiblesQuestReward.expirationMode) === (require(9501) /* metro dependency 9501: QuestRewardExpirationMode */).QuestRewardExpirationMode.PREMIUM_PERMANENT;
} else {
r0 = isCollectibleQuestRewardPremiumExtendable2;
}
return r0;
}
function getQuestOrbMultiplierForUser(a0, a1) { // fn#74160, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9686:5494, offset: 0x01d82be0, size: 132 bytes, params: 3, frame: 17
var r0;
if (a1 == null) {
return 1;
}
var value;
const questOrbMultiplier = getQuestOrbMultiplier(a0);
const value3 = 1;
if (hasPremiumOrbQuantity(a0)) {
value = require(9503) /* metro dependency 9503: QuestOrbMultiplierUtils */;
r0 = value.shouldReceiveQuestOrbMultiplier((require(9502) /* metro dependency 9502: QuestOrbMultiplierHooks */).getQuestOrbMultiplierEligibilityForUser(a1)) ? questOrbMultiplier ?? value3 : value3;
} else {
r0 = value3;
}
return r0;
}
function isTieredRewardCodeQuest({quest}) { // fn#74164, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9686:6255, offset: 0x01d82cfa, size: 119 bytes, params: 2, frame: 13
const rewardsConfig = quest.config.rewardsConfig;
const assignmentMethod = rewardsConfig.assignmentMethod;
const QuestRewardAssignmentMethods = (require(9506) /* metro dependency 9506: QuestRewardAssignmentMethods */).QuestRewardAssignmentMethods;
const TIERED = QuestRewardAssignmentMethods.TIERED;
return assignmentMethod === TIERED && rewardsConfig.rewards.length > 0 && rewardsConfig.rewards.every(function({type}) {
return type === require(dependencyMap[2]).QuestRewardTypes.REWARD_CODE;
});
}
function getPlatformString(a0) { // fn#74167, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9686:6673, offset: 0x01d82db8, size: 482 bytes, params: 2, frame: 15
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const QuestRewardCodePlatforms = (require(6531) /* metro dependency 6531: QuestTypes */).QuestRewardCodePlatforms;
const XBOX = QuestRewardCodePlatforms.XBOX;
if (XBOX === a0) {
return intl.string(t.G84UWZ);
}
const PLAYSTATION = QuestRewardCodePlatforms.PLAYSTATION;
if (PLAYSTATION === a0) {
return intl.string(t['6IeKx2']);
}
const SWITCH = QuestRewardCodePlatforms.SWITCH;
if (SWITCH === a0) {
return intl.string(t['1pp0su']);
}
const PC = QuestRewardCodePlatforms.PC;
if (PC === a0) {
return intl.string(t['YK+wUg']);
}
const CROSS_PLATFORM = QuestRewardCodePlatforms.CROSS_PLATFORM;
if (CROSS_PLATFORM === a0) {
return intl.string(t.UWVbzV);
}
}
global.__d(_fun74129, 9500, [5121, 9501, 7098, 7091, 3381, 1244, 9502, 9503, 9504, 9505, 9506, 6531,
2]) /* metro module 9500, dependencies: [5121, 9501, 7098, 7091, 3381, 1244, 9502, 9503, 9504, 9505, 9506, 6531, 2] */;