1341 lines
57 KiB
TypeScript
1341 lines
57 KiB
TypeScript
/* Metro module 7093; source: modules/quests/QuestStore.tsx; dependencies: [6, 7, 15, 17, 18, 57, 7094, 7095, 6528, 22, 6535, 7098, 1216, 7091, 6531, 7099, 7100, 7108, 7109, 566, 694, 2] */
|
|
function _fun56606(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#56606, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7271:6, offset: 0x013ccb1f, size: 1006 bytes, params: 8, frame: 21
|
|
const env0_0 = require;
|
|
const _arrayLikeToArray_56612 = 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 closure = initializeState_56613;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_27 = importDefault(6) /* metro dependency 6 */;
|
|
const env0_28 = importDefault(7) /* metro dependency 7 */;
|
|
const env0_29 = importDefault(15) /* metro dependency 15 */;
|
|
const env0_30 = importDefault(17) /* metro dependency 17 */;
|
|
const env0_31 = importDefault(18) /* metro dependency 18 */;
|
|
const env0_32 = importDefault(57) /* metro dependency 57 */;
|
|
const consoleQuestUIStore = importDefault(7094) /* metro dependency 7094: ConsoleQuestUIStore */;
|
|
const videoQuestUIStore = importDefault(7095) /* metro dependency 7095: VideoQuestUIStore */;
|
|
const env0_35 = (require(6528) /* metro dependency 6528: QuestConstants */).QuestsExperimentLocations;
|
|
let Map = global.Map;
|
|
let map = new Map();
|
|
Map = global.Map;
|
|
map = new Map();
|
|
closure();
|
|
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
|
|
_fun56625(Store).displayName = 'QuestStore';
|
|
map = new map(importDefault(694) /* metro dependency 694: Dispatcher */, {LOGOUT: LOGOUT_56663,
|
|
QUESTS_FETCH_CURRENT_QUESTS_BEGIN: function() {
|
|
env0_3 = true;
|
|
}, QUESTS_FETCH_CURRENT_QUESTS_SUCCESS: QUESTS_FETCH_CURRENT_QUESTS_SUCCESS,
|
|
QUESTS_FETCH_CURRENT_QUESTS_FAILURE: function() {
|
|
env0_12 = 0;
|
|
env0_3 = false;
|
|
}, QUESTS_FETCH_CLAIMED_QUESTS_BEGIN: function() {
|
|
env0_6 = true;
|
|
}, QUESTS_FETCH_CLAIMED_QUESTS_SUCCESS: function({quests}) {
|
|
var r2;
|
|
var binding;
|
|
var value7;
|
|
env0_6 = false;
|
|
var Map = global.Map;
|
|
var value3 = new Map();
|
|
var value5 = _createForOfIteratorHelperLoose_56610(quests);
|
|
var value6 = value5();
|
|
if (!value6.done) {
|
|
for (r2 = value6; true; r2 = value7) {
|
|
quests = r2.value;
|
|
binding = value3;
|
|
binding.set(quests.id, quests);
|
|
value7 = value5();
|
|
if (value7.done) {
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}, QUESTS_FETCH_CLAIMED_QUESTS_FAILURE: function() {
|
|
env0_6 = false;
|
|
}, QUESTS_FETCH_QUEST_TO_DELIVER_BEGIN: QUESTS_FETCH_QUEST_TO_DELIVER_BEGIN,
|
|
QUESTS_FETCH_QUEST_TO_DELIVER_SUCCESS: QUESTS_FETCH_QUEST_TO_DELIVER_SUCCESS,
|
|
QUESTS_FETCH_QUEST_TO_DELIVER_FAILURE: QUESTS_FETCH_QUEST_TO_DELIVER_FAILURE,
|
|
QUESTS_FETCH_EARNED_QUEST_TO_DELIVER_BEGIN: QUESTS_FETCH_EARNED_QUEST_TO_DELIVER_BEGIN,
|
|
QUESTS_FETCH_EARNED_QUEST_TO_DELIVER_SUCCESS: QUESTS_FETCH_EARNED_QUEST_TO_DELIVER_SUCCESS,
|
|
QUESTS_FETCH_EARNED_QUEST_TO_DELIVER_FAILURE: QUESTS_FETCH_EARNED_QUEST_TO_DELIVER_FAILURE,
|
|
QUESTS_FETCH_PREVIEW_BEGIN: QUESTS_FETCH_PREVIEW_BEGIN,
|
|
QUESTS_FETCH_PREVIEW_SUCCESS: QUESTS_FETCH_PREVIEW_SUCCESS,
|
|
QUESTS_FETCH_PREVIEW_FAILURE: QUESTS_FETCH_PREVIEW_FAILURE,
|
|
QUESTS_SEND_HEARTBEAT_SUCCESS: QUESTS_SEND_HEARTBEAT_SUCCESS,
|
|
QUESTS_SEND_HEARTBEAT_FAILURE: QUESTS_SEND_HEARTBEAT_FAILURE, QUESTS_ENROLL_BEGIN: QUESTS_ENROLL_BEGIN,
|
|
QUESTS_ENROLL_SUCCESS: function({enrolledQuestUserStatus}) {
|
|
updateQuestData(enrolledQuestUserStatus.questId, {userStatus: enrolledQuestUserStatus});
|
|
removeQuestIdFromIsEnrolling(enrolledQuestUserStatus.questId);
|
|
}, QUESTS_ENROLL_FAILURE: function({questId}) {
|
|
removeQuestIdFromIsEnrolling(questId);
|
|
}, QUESTS_FETCH_REWARD_CODE_BEGIN: QUESTS_FETCH_REWARD_CODE_BEGIN,
|
|
QUESTS_FETCH_REWARD_CODE_SUCCESS: QUESTS_FETCH_REWARD_CODE_SUCCESS,
|
|
QUESTS_FETCH_REWARD_CODE_FAILURE: QUESTS_FETCH_REWARD_CODE_FAILURE,
|
|
QUESTS_CLAIM_REWARD_BEGIN: QUESTS_CLAIM_REWARD_BEGIN, QUESTS_CLAIM_REWARD_SUCCESS: QUESTS_CLAIM_REWARD_SUCCESS,
|
|
QUESTS_CLAIM_REWARD_FAILURE: QUESTS_CLAIM_REWARD_FAILURE,
|
|
QUESTS_DISMISS_CONTENT_BEGIN: QUESTS_DISMISS_CONTENT_BEGIN,
|
|
QUESTS_DISMISS_CONTENT_SUCCESS: function({dismissedQuestUserStatus}) {
|
|
updateQuestData(dismissedQuestUserStatus.questId, {userStatus: dismissedQuestUserStatus});
|
|
removeQuestIdFromIsDismissing(dismissedQuestUserStatus.questId);
|
|
}, QUESTS_DISMISS_CONTENT_FAILURE: function({questId}) {
|
|
removeQuestIdFromIsDismissing(questId);
|
|
}, QUESTS_USER_STATUS_UPDATE: QUESTS_USER_STATUS_UPDATE, STREAM_CLOSE: function({streamKey}) {
|
|
maybeDeleteQuestHeartbeatFailure(streamKey);
|
|
}, QUESTS_DISMISS_PROGRESS_TRACKING_FAILURE_NOTICE: function({streamKey}) {
|
|
maybeDeleteQuestHeartbeatFailure(streamKey);
|
|
}, QUESTS_PREVIEW_UPDATE_SUCCESS: QUESTS_PREVIEW_UPDATE_SUCCESS, QUESTS_PREVIEW_OVERRIDE: QUESTS_PREVIEW_OVERRIDE,
|
|
QUESTS_SELECT_TASK_PLATFORM: QUESTS_SELECT_TASK_PLATFORM,
|
|
QUESTS_UPDATE_OPTIMISTIC_PROGRESS: QUESTS_UPDATE_OPTIMISTIC_PROGRESS,
|
|
QUESTS_RESET_OPTIMISTIC_PROGRESS: QUESTS_RESET_OPTIMISTIC_PROGRESS,
|
|
QUESTS_USER_COMPLETION_UPDATE: QUESTS_USER_COMPLETION_UPDATE,
|
|
QUESTS_FETCH_QUEST_HOME_HERO_BEGIN: QUESTS_FETCH_QUEST_HOME_HERO_BEGIN,
|
|
QUESTS_FETCH_QUEST_HOME_HERO_SUCCESS: QUESTS_FETCH_QUEST_HOME_HERO_SUCCESS,
|
|
QUESTS_FETCH_QUEST_HOME_HERO_FAILURE: QUESTS_FETCH_QUEST_HOME_HERO_FAILURE});
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/QuestStore.tsx');
|
|
exports.default = map;
|
|
}
|
|
|
|
function _isNativeReflectConstruct_56607() { // fn#56607, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7271:265, offset: 0x013ccf0d, 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_56607_isNativeReflectConstruct = function() {
|
|
return !!result;
|
|
})();
|
|
}
|
|
|
|
function _createForOfIteratorHelperLoose_56610(a0, a1) { // fn#56610, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7271:458, offset: 0x013ccf6b, size: 370 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 _fun56611;
|
|
}
|
|
value = undefined;
|
|
if (a0) {
|
|
if (typeof a0 === 'string') {
|
|
value = _arrayLikeToArray_56612(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_56612(a0, value);
|
|
r6 = value;
|
|
} else {
|
|
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
|
if (regexp.test(r9)) {
|
|
value = _arrayLikeToArray_56612(a0, value);
|
|
r6 = value;
|
|
} else {
|
|
r6 = value;
|
|
}
|
|
}
|
|
r5 = r6;
|
|
}
|
|
} else {
|
|
r5 = value;
|
|
}
|
|
if (r5) {
|
|
if (r5) {
|
|
}
|
|
return _fun56611;
|
|
}
|
|
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 initializeState_56613() { // fn#56613, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7271:1426, offset: 0x013cd0dd, size: 749 bytes, params: 1, frame: 13
|
|
let Map = global.Map;
|
|
let map = new Map();
|
|
Map = global.Map;
|
|
map = new Map();
|
|
Map = global.Map;
|
|
map = new Map();
|
|
Map = global.Map;
|
|
map = new Map();
|
|
Map = global.Map;
|
|
map = new Map();
|
|
let Set = global.Set;
|
|
let set = new Set();
|
|
Set = global.Set;
|
|
set = new Set();
|
|
Set = global.Set;
|
|
set = new Set();
|
|
Set = global.Set;
|
|
set = new Set();
|
|
Set = global.Set;
|
|
set = new Set();
|
|
Map = global.Map;
|
|
map = new Map();
|
|
Map = global.Map;
|
|
map = new Map();
|
|
Map = global.Map;
|
|
map = new Map();
|
|
Map = global.Map;
|
|
map = new Map();
|
|
Map = global.Map;
|
|
map = new Map();
|
|
Map = global.Map;
|
|
map = new Map();
|
|
Set = global.Set;
|
|
set = new Set();
|
|
Map = global.Map;
|
|
map = new Map();
|
|
Map = global.Map;
|
|
map = new Map();
|
|
Map = global.Map;
|
|
map = new Map();
|
|
_stopExpirationChecker();
|
|
Map = global.Map;
|
|
map = new Map();
|
|
Map = global.Map;
|
|
map = new Map();
|
|
Map = global.Map;
|
|
map = new Map();
|
|
}
|
|
|
|
function updateQuestData(a0, a1) { // fn#56614, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7271:1757, offset: 0x013cd3ca, size: 509 bytes, params: 3, frame: 30
|
|
var r20;
|
|
var r11;
|
|
var lastBeatAt;
|
|
var object2;
|
|
var userStatus;
|
|
var Object;
|
|
var values;
|
|
var value5;
|
|
var value6;
|
|
var length;
|
|
var value7;
|
|
var property;
|
|
var moduleValue;
|
|
var isNil;
|
|
var FirstPartyQuestTaskTypesSets;
|
|
var DESKTOP;
|
|
var has;
|
|
var eventName;
|
|
var heartbeat;
|
|
var value8;
|
|
var set;
|
|
var value9;
|
|
const Map = global.Map;
|
|
let binding = env0_9;
|
|
let map = new Map(binding);
|
|
env0_9 = map;
|
|
const value4 = map.get(a0);
|
|
if (value4 != null) {
|
|
object2 = {};
|
|
copyDataProperties(object2, value4, r20);
|
|
copyDataProperties(object2, a1, r20);
|
|
userStatus = a1.userStatus;
|
|
if (userStatus != null) {
|
|
Object = global.Object;
|
|
values = Object.values;
|
|
userStatus = a1.userStatus;
|
|
value5 = undefined;
|
|
value6 = Reflect.apply(values, Object, [(userStatus == null ? value5 : userStatus.progress) ?? ({})]);
|
|
length = value6.length;
|
|
value7 = 0;
|
|
if (value7 < length) {
|
|
r11 = value7;
|
|
while (true) {
|
|
property = value6[r11];
|
|
moduleValue = require(22) /* metro dependency 22 */;
|
|
isNil = moduleValue.isNil;
|
|
if (!Reflect.apply(isNil, moduleValue, [property])) {
|
|
FirstPartyQuestTaskTypesSets = (require(6535) /* metro dependency 6535: FirstPartyQuestTaskTypes */).FirstPartyQuestTaskTypesSets;
|
|
DESKTOP = FirstPartyQuestTaskTypesSets.DESKTOP;
|
|
has = DESKTOP.has;
|
|
eventName = property.eventName;
|
|
if (!Reflect.apply(has, DESKTOP, [eventName])) {
|
|
continue;
|
|
}
|
|
heartbeat = property.heartbeat;
|
|
if (heartbeat == null) {
|
|
lastBeatAt = value5;
|
|
continue;
|
|
}
|
|
lastBeatAt = heartbeat.lastBeatAt;
|
|
if (lastBeatAt != null) {
|
|
binding = env0_19;
|
|
binding.add(a0);
|
|
} else {
|
|
heartbeat = property.heartbeat;
|
|
if (heartbeat == null) {
|
|
lastBeatAt = value5;
|
|
continue;
|
|
}
|
|
lastBeatAt = heartbeat.lastBeatAt;
|
|
if (lastBeatAt != null) {
|
|
continue;
|
|
}
|
|
binding = env0_19;
|
|
binding.delete(a0);
|
|
r20 = binding;
|
|
}
|
|
}
|
|
value8 = typeof r11 === 'bigint' ? r11 + 1n : +r11 + 1;
|
|
length = value6.length;
|
|
if (value8 < length) {
|
|
r11 = value8;
|
|
continue;
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
binding = env0_9;
|
|
binding.set(a0, object2);
|
|
binding = env0_39;
|
|
has = binding.has;
|
|
if (Reflect.apply(has, binding, [a0])) {
|
|
value9 = env0_39.get(a0);
|
|
if (value9 != null) {
|
|
map = new global.Map(env0_39);
|
|
set = map.set;
|
|
object2 = {};
|
|
copyDataProperties(object2, value9, r20);
|
|
copyDataProperties(object2, a1, r20);
|
|
Reflect.apply(set, map, [a0, object2]);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
function _addRewardCode(a0, a1) { // fn#56615, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7271:2334, offset: 0x013cd5c7, size: 60 bytes, params: 3, frame: 14
|
|
const Map = global.Map;
|
|
const binding = env0_20;
|
|
const value2 = Object.create(Map.prototype, {constructor: {value: Map}});
|
|
const map = new Map(binding);
|
|
(map instanceof Object ? map : value2).set(a0, a1);
|
|
}
|
|
|
|
function updateQuestRewardData(a0, a1) { // fn#56616, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7271:2395, offset: 0x013cd603, size: 321 bytes, params: 3, frame: 20
|
|
var reward;
|
|
var rewardCode;
|
|
var tier;
|
|
var tenantMetadata;
|
|
var updateQuestDataBinding;
|
|
var object;
|
|
const Map = global.Map;
|
|
const map = new Map(env0_21);
|
|
map.set(a0, a1.items);
|
|
const value4 = env0_9.get(a0);
|
|
const value5 = null;
|
|
const value6 = undefined;
|
|
const userStatus = value5 == value4 ? value6 : value4.userStatus;
|
|
if (value5 != userStatus) {
|
|
if (value5 == userStatus.claimedAt) {
|
|
tenantMetadata = ({entitlements: a1}).entitlements.items[0].tenantMetadata;
|
|
reward = value5 == tenantMetadata ? value6 : tenantMetadata.questRewards.reward;
|
|
rewardCode = (value5 == reward ? value6 : reward.tag) !== require(dependencyMap[11]).QuestRewardTypes.REWARD_CODE ? value5 : reward.rewardCode;
|
|
if (value5 != rewardCode) {
|
|
_addRewardCode(a0, rewardCode);
|
|
}
|
|
updateQuestDataBinding = updateQuestData;
|
|
object = {};
|
|
copyDataProperties(object, userStatus, dependencyMap);
|
|
object['claimedAt'] = a1.claimedAt;
|
|
tier = value5 == rewardCode ? value6 : rewardCode.tier;
|
|
object['claimedTier'] = value5 != tier ? tier : value5;
|
|
updateQuestDataBinding(a0, {userStatus: object});
|
|
}
|
|
}
|
|
return value6;
|
|
}
|
|
|
|
function maybeDeleteQuestHeartbeatFailure(a0) { // fn#56617, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7271:2938, offset: 0x013cd744, size: 76 bytes, params: 2, frame: 13
|
|
var Map;
|
|
var value3;
|
|
var map;
|
|
let binding = env0_22;
|
|
if (binding.get(a0) != null) {
|
|
Map = global.Map;
|
|
binding = env0_22;
|
|
value3 = Object.create(Map.prototype, {constructor: {value: Map}});
|
|
map = new Map(binding);
|
|
(map instanceof Object ? map : value3).delete(a0);
|
|
}
|
|
}
|
|
|
|
function removeQuestIdFromIsEnrolling(a0) { // fn#56618, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7271:3024, offset: 0x013cd790, size: 56 bytes, params: 2, frame: 12
|
|
const Set = global.Set;
|
|
const binding = env0_14;
|
|
const value2 = Object.create(Set.prototype, {constructor: {value: Set}});
|
|
const set = new Set(binding);
|
|
(set instanceof Object ? set : value2).delete(a0);
|
|
}
|
|
|
|
function removeQuestIdFromIsDismissing(a0) { // fn#56619, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7271:3098, offset: 0x013cd7c8, size: 56 bytes, params: 2, frame: 12
|
|
const Set = global.Set;
|
|
const binding = env0_17;
|
|
const value2 = Object.create(Set.prototype, {constructor: {value: Set}});
|
|
const set = new Set(binding);
|
|
(set instanceof Object ? set : value2).delete(a0);
|
|
}
|
|
|
|
function _runExpirationCheck() { // fn#56620, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7271:3173, offset: 0x013cd800, size: 169 bytes, params: 1, frame: 19
|
|
var Math;
|
|
var max;
|
|
var Date;
|
|
var value3;
|
|
updateExpiredQuestsMap();
|
|
const questDataUtilsModule = require(7091) /* metro dependency 7091: QuestDataUtils */;
|
|
const findNextUpcomingExpirationEpochMs = questDataUtilsModule.findNextUpcomingExpirationEpochMs;
|
|
const Array = global.Array;
|
|
const from = Array.from;
|
|
const binding = env0_9;
|
|
const nextUpcomingExpirationEpochMs = Reflect.apply(findNextUpcomingExpirationEpochMs, questDataUtilsModule,
|
|
[Reflect.apply(from, Array, [binding.values()])]);
|
|
if (nextUpcomingExpirationEpochMs != null) {
|
|
Math = global.Math;
|
|
max = Math.max;
|
|
Date = global.Date;
|
|
value3 = Reflect.apply(max, Math, [5000, nextUpcomingExpirationEpochMs - Date.now() + 2000]);
|
|
if (!(value3 > 864000000)) {
|
|
env0_41 = global.setTimeout(function() {
|
|
_runExpirationCheck();
|
|
}, value3);
|
|
}
|
|
}
|
|
}
|
|
|
|
function _stopExpirationChecker() { // fn#56624, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7271:3577, offset: 0x013cd992, size: 40 bytes, params: 1, frame: 13
|
|
if (env0_41 != null) {
|
|
global.clearTimeout(env0_41);
|
|
}
|
|
}
|
|
|
|
function _fun56625(a0) { // fn#56625, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7271:3669, offset: 0x013cd9ba, size: 903 bytes, params: 2, frame: 16
|
|
const closure = QuestStore;
|
|
env0_31(closure, a0);
|
|
return env0_28(closure, [{key: 'quests', get: get_56627}, {key: 'excludedQuests', get: get_56628},
|
|
{key: 'claimedQuests', get: get_56629}, {key: 'isFetchingCurrentQuests', get: get_56630},
|
|
{key: 'isFetchingClaimedQuests', get: get_56631}, {key: 'isFetchingQuestPreview', value: value_56632},
|
|
{key: 'lastFetchedCurrentQuests', get: get_56633}, {key: 'lastFetchedQuestToDeliver', get: get_56634},
|
|
{key: 'isFetchingQuestToDeliver', get: get_56635}, {key: 'isFetchingQuestToDeliverByPlacement',
|
|
value: value_56636}, {key: 'getQuestPreviewOverride', value: value_56637}, {key: 'questToDeliverForPlacement',
|
|
get: get_56638}, {key: 'questEnrollmentBlockedUntil', get: get_56639}, {key: 'questAdDecisionByPlacement',
|
|
get: get_56640}, {key: 'getFetchQuestPreviewError', value: value_56641}, {key: 'isEnrolling',
|
|
value: value_56642}, {key: 'isClaimingReward', value: value_56643}, {key: 'isFetchingRewardCode',
|
|
value: value_56644}, {key: 'isDismissingContent', value: value_56645}, {key: 'getRewardCode',
|
|
value: value_56646}, {key: 'getRewards', value: value_56647}, {key: 'getStreamHeartbeatFailure',
|
|
value: value_56648}, {key: 'getQuest', value: value_56649}, {key: 'getQuestConfig', value: function(a0) {
|
|
return this.getQuest(a0)?.config;
|
|
}}, {key: 'isProgressingOnDesktop', value: value_56651}, {key: 'selectedTaskPlatform', value: value_56652},
|
|
{key: 'getOptimisticProgress', value: value_56653}, {key: 'getExpiredQuestsMap', value: value_56654},
|
|
{key: 'isQuestExpired', value: value_56655}, {key: 'getQuestLoadedViaPreview', value: value_56656},
|
|
{key: 'isFetchingQuestHomeHero', value: value_56657}, {key: 'getQuestHomeHero', value: value_56658},
|
|
{key: 'getLastFetchedQuestHomeHero', value: value_56659}, {key: 'isFetchingEarnedQuestToDeliver',
|
|
get: get_56660}, {key: 'isFetchingEarnedQuestToDeliverByPlacement', value: value_56661},
|
|
{key: 'earnedQuestForPlacement', get: get_56662}]);
|
|
}
|
|
|
|
function LOGOUT_56663() { // fn#56663, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7271:6400, offset: 0x013cdf18, size: 71 bytes, params: 1, frame: 11
|
|
_stopExpirationChecker();
|
|
initializeState_56613();
|
|
VideoQuestUIStore.getState().clearState();
|
|
ConsoleQuestUIStore.getState().reset();
|
|
}
|
|
|
|
function QUESTS_FETCH_CURRENT_QUESTS_SUCCESS({quests, excludedQuests, questEnrollmentBlockedUntil}) { // fn#56665, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7271:6632, offset: 0x013cdf6c, size: 878 bytes, params: 2, frame: 32
|
|
var r7;
|
|
var r6;
|
|
var r1;
|
|
var defaultImport;
|
|
var addBreadcrumb;
|
|
var HermesInternal;
|
|
var concat;
|
|
var value12;
|
|
var set;
|
|
var id;
|
|
var moduleValue;
|
|
var isQuestExpired;
|
|
var targetedContent;
|
|
var includes;
|
|
var QuestContent;
|
|
var QUEST_BAR;
|
|
var moduleValue2;
|
|
var getQuestLogger;
|
|
var QUESTS_STORE;
|
|
var value13;
|
|
var log;
|
|
var config;
|
|
var messages;
|
|
var questName;
|
|
var value14;
|
|
var value19;
|
|
var value20;
|
|
var values;
|
|
var value22;
|
|
var value25;
|
|
var has;
|
|
var moduleValue3;
|
|
var value26;
|
|
var value27;
|
|
var date;
|
|
var value28;
|
|
let binding = env0_9;
|
|
const value2 = binding.keys();
|
|
const items = [];
|
|
arraySpread(items, value2, 0, undefined);
|
|
let map = quests.map;
|
|
const value3 = Reflect.apply(map, quests, [function(a0) {
|
|
return a0.id;
|
|
}]);
|
|
const value4 = items.filter(_fun56667);
|
|
let length = value4.length;
|
|
reducibleJoin2: while (true) {
|
|
if (length > 0) {
|
|
defaultImport = importDefault(1216) /* metro dependency 1216: SentryUtilsNative */;
|
|
addBreadcrumb = defaultImport.addBreadcrumb;
|
|
length = value4.length;
|
|
HermesInternal = global.HermesInternal;
|
|
concat = HermesInternal.concat;
|
|
Reflect.apply(addBreadcrumb, defaultImport, [{category: 'quests.store',
|
|
message: 'handleFetchCurrentQuestsSuccess: ' + length + ' quest(s) removed during rebuild',
|
|
data: {prevQuestIds: items, nextQuestIds: value3, removedIds: value4}}]);
|
|
break reducibleJoin2;
|
|
}
|
|
break reducibleJoin2;
|
|
}
|
|
let Date = global.Date;
|
|
env0_12 = Date.now();
|
|
let Map = global.Map;
|
|
let prototype = Map.prototype;
|
|
const value5 = Object.create(prototype, {constructor: {value: Map}});
|
|
map = new Map();
|
|
env0_9 = map instanceof Object ? map : value5;
|
|
Map = global.Map;
|
|
map = new Map();
|
|
const value10 = _createForOfIteratorHelperLoose_56610(quests);
|
|
const value11 = value10();
|
|
let done = value11.done;
|
|
if (!done) {
|
|
r7 = value11;
|
|
reducibleLoop3: while (true) {
|
|
value12 = r7.value;
|
|
binding = env0_9;
|
|
set = binding.set;
|
|
id = value12.id;
|
|
Reflect.apply(set, binding, [id, value12]);
|
|
set = map.set;
|
|
id = value12.id;
|
|
moduleValue = require(7091) /* metro dependency 7091: QuestDataUtils */;
|
|
isQuestExpired = moduleValue.isQuestExpired;
|
|
Reflect.apply(set, map, [id, Reflect.apply(isQuestExpired, moduleValue, [value12])]);
|
|
targetedContent = value12.targetedContent;
|
|
includes = targetedContent.includes;
|
|
QuestContent = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent;
|
|
QUEST_BAR = QuestContent.QUEST_BAR;
|
|
reducibleJoin5: while (true) {
|
|
if (Reflect.apply(includes, targetedContent, [QUEST_BAR])) {
|
|
moduleValue2 = require(7099) /* metro dependency 7099: getQuestLogger */;
|
|
getQuestLogger = moduleValue2.getQuestLogger;
|
|
QUESTS_STORE = QuestsExperimentLocations.QUESTS_STORE;
|
|
value13 = Reflect.apply(getQuestLogger, moduleValue2, [{location: QUESTS_STORE}]);
|
|
log = value13.log;
|
|
config = value12.config;
|
|
messages = config.messages;
|
|
questName = messages.questName;
|
|
id = value12.id;
|
|
HermesInternal = global.HermesInternal;
|
|
concat = HermesInternal.concat;
|
|
Reflect.apply(log, value13, ['Delivered ' + questName + ' (' + id + ')']);
|
|
break reducibleJoin5;
|
|
}
|
|
break reducibleJoin5;
|
|
}
|
|
value14 = value10();
|
|
done = value14.done;
|
|
if (done) {
|
|
break reducibleLoop3;
|
|
}
|
|
r7 = value14;
|
|
continue reducibleLoop3;
|
|
}
|
|
}
|
|
Map = global.Map;
|
|
map = new Map();
|
|
const value17 = _createForOfIteratorHelperLoose_56610(excludedQuests);
|
|
const value18 = value17();
|
|
done = value18.done;
|
|
if (!done) {
|
|
r6 = value18;
|
|
reducibleLoop7: while (true) {
|
|
value19 = r6.value;
|
|
binding = map;
|
|
set = binding.set;
|
|
id = value19.id;
|
|
Reflect.apply(set, binding, [id, value19]);
|
|
value20 = value17();
|
|
done = value20.done;
|
|
if (done) {
|
|
break reducibleLoop7;
|
|
}
|
|
r6 = value20;
|
|
continue reducibleLoop7;
|
|
}
|
|
}
|
|
_createForOfIteratorHelperLoose_56610Binding = _createForOfIteratorHelperLoose_56610;
|
|
binding = env0_39;
|
|
reducibleJoin10: while (true) {
|
|
if (binding == null) {
|
|
r6 = undefined;
|
|
break reducibleJoin10;
|
|
}
|
|
values = binding.values;
|
|
value22 = Reflect.apply(values, binding, []);
|
|
r6 = value22;
|
|
break reducibleJoin10;
|
|
}
|
|
const value23 = _createForOfIteratorHelperLoose_56610Binding(r6);
|
|
const value24 = value23();
|
|
done = value24.done;
|
|
if (!done) {
|
|
r7 = value24;
|
|
reducibleLoop11: while (true) {
|
|
value25 = r7.value;
|
|
binding = env0_9;
|
|
has = binding.has;
|
|
id = value25.id;
|
|
reducibleJoin13: while (true) {
|
|
if (Reflect.apply(has, binding, [id])) {
|
|
break reducibleJoin13;
|
|
}
|
|
binding = env0_9;
|
|
set = binding.set;
|
|
id = value25.id;
|
|
Reflect.apply(set, binding, [id, value25]);
|
|
set = map.set;
|
|
id = value25.id;
|
|
moduleValue3 = require(7091) /* metro dependency 7091: QuestDataUtils */;
|
|
isQuestExpired = moduleValue3.isQuestExpired;
|
|
Reflect.apply(set, map, [id, Reflect.apply(isQuestExpired, moduleValue3, [value25])]);
|
|
break reducibleJoin13;
|
|
}
|
|
value26 = value23();
|
|
done = value26.done;
|
|
if (done) {
|
|
break reducibleLoop11;
|
|
}
|
|
r7 = value26;
|
|
continue reducibleLoop11;
|
|
}
|
|
}
|
|
_stopExpirationChecker();
|
|
_runExpirationCheck();
|
|
reducibleJoin16: while (true) {
|
|
if (questEnrollmentBlockedUntil != null) {
|
|
Date = global.Date;
|
|
prototype = Date.prototype;
|
|
value27 = Object.create(prototype, {constructor: {value: Date}});
|
|
date = new Date(questEnrollmentBlockedUntil);
|
|
value28 = date instanceof Object ? date : value27;
|
|
r1 = value28;
|
|
break reducibleJoin16;
|
|
}
|
|
r1 = null;
|
|
break reducibleJoin16;
|
|
}
|
|
}
|
|
|
|
function QUESTS_FETCH_QUEST_TO_DELIVER_BEGIN({placement}) { // fn#56672, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7271:8227, offset: 0x013ce36d, size: 69 bytes, params: 2, frame: 15
|
|
const Map = global.Map;
|
|
const binding = env0_5;
|
|
const value2 = Object.create(Map.prototype, {constructor: {value: Map}});
|
|
const map = new Map(binding);
|
|
(map instanceof Object ? map : value2).set(placement, true);
|
|
}
|
|
|
|
function QUESTS_FETCH_QUEST_TO_DELIVER_SUCCESS({quest, placement, adDecisionData, adContext, responseTtlSeconds, metadataSealed, trafficMetadataSealed, fetchedAt}) { // fn#56673, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7271:8351, offset: 0x013ce3b2, size: 424 bytes, params: 2, frame: 25
|
|
var id;
|
|
var value4;
|
|
const Date = global.Date;
|
|
const value = Date.now();
|
|
let Map = global.Map;
|
|
let binding = env0_5;
|
|
let map = new Map(binding);
|
|
map.set(placement, false);
|
|
map = undefined;
|
|
const defaultImport = importDefault(7108) /* metro dependency 7108: NewAdRequestBehaviorExperiment */;
|
|
const getConfig = defaultImport.getConfig;
|
|
let object2 = {location: 'handleFetchQuestToDeliverSuccess'};
|
|
if (Reflect.apply(getConfig, defaultImport, [object2]).enableNewRequestBehavior) {
|
|
object2 = {};
|
|
id = quest == null ? map : quest.id;
|
|
object2.questId = id ?? null;
|
|
id = quest == null ? map : quest.id;
|
|
object2.adCreativeId = id ?? null;
|
|
object2.fetchedAt = fetchedAt;
|
|
object2.ttlMillis = (require(7109) /* metro dependency 7109: AdDecisionUtils */).resolveResponseTtl(responseTtlSeconds);
|
|
object2.adDecisionData = adDecisionData;
|
|
object2.adContext = adContext;
|
|
object2.metadataSealed = metadataSealed;
|
|
object2.trafficMetadataSealed = trafficMetadataSealed;
|
|
Map = global.Map;
|
|
binding = env0_38;
|
|
value4 = Object.create(Map.prototype, {constructor: {value: Map}});
|
|
map = new Map(binding);
|
|
(map instanceof Object ? map : value4).set(placement, object2);
|
|
} else if (quest == null) {
|
|
env0_25.delete(placement);
|
|
} else {
|
|
binding = env0_25;
|
|
binding.set(placement, {quest: quest, adDecisionData: adDecisionData, adContext: adContext,
|
|
metadataSealed: metadataSealed, trafficMetadataSealed: trafficMetadataSealed});
|
|
}
|
|
return map;
|
|
}
|
|
|
|
function QUESTS_FETCH_QUEST_TO_DELIVER_FAILURE({placement}) { // fn#56674, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7271:9065, offset: 0x013ce55a, size: 102 bytes, params: 2, frame: 15
|
|
let binding = env0_25;
|
|
binding.delete(placement);
|
|
const Date = global.Date;
|
|
env0_13 = Date.now();
|
|
const Map = global.Map;
|
|
binding = env0_5;
|
|
const value2 = Object.create(Map.prototype, {constructor: {value: Map}});
|
|
const map = new Map(binding);
|
|
(map instanceof Object ? map : value2).set(placement, false);
|
|
}
|
|
|
|
function QUESTS_FETCH_EARNED_QUEST_TO_DELIVER_BEGIN({content}) { // fn#56675, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7271:9221, offset: 0x013ce5c0, size: 68 bytes, params: 2, frame: 15
|
|
const Map = global.Map;
|
|
const binding = env0_8;
|
|
const value2 = Object.create(Map.prototype, {constructor: {value: Map}});
|
|
const map = new Map(binding);
|
|
(map instanceof Object ? map : value2).set(content, true);
|
|
}
|
|
|
|
function QUESTS_FETCH_EARNED_QUEST_TO_DELIVER_SUCCESS({serverQuests, content, fetchedAt, responseTtlSeconds}) { // fn#56676, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7271:9356, offset: 0x013ce604, size: 509 bytes, params: 2, frame: 31
|
|
var r6;
|
|
var value10;
|
|
var value11;
|
|
var property;
|
|
var property2;
|
|
var value12;
|
|
var moduleValue2;
|
|
var value13;
|
|
var value14;
|
|
var value15;
|
|
var value16;
|
|
var value17;
|
|
var moduleValue3;
|
|
var isQuestExpired;
|
|
var value18;
|
|
let Map = global.Map;
|
|
let binding = env0_8;
|
|
let prototype = Map.prototype;
|
|
const value2 = Object.create(prototype, {constructor: {value: Map}});
|
|
let map = new Map(binding);
|
|
const value3 = map instanceof Object ? map : value2;
|
|
let set = value3.set;
|
|
Reflect.apply(set, value3, [content, false]);
|
|
const responseTtl = (require(7109) /* metro dependency 7109: AdDecisionUtils */).resolveResponseTtl(responseTtlSeconds);
|
|
const value5 = env0_26.get(content);
|
|
Map = global.Map;
|
|
map = new Map(value5?.earnedDecisionByQuestId);
|
|
const value8 = _createForOfIteratorHelperLoose_56610(serverQuests);
|
|
const value9 = value8();
|
|
let done = value9.done;
|
|
if (!done) {
|
|
r6 = value9;
|
|
while (true) {
|
|
value10 = r6.value;
|
|
value11 = env0_32(value10, 2);
|
|
property = value11[0];
|
|
property2 = value11[1];
|
|
map.set(property, {fetchedAt: fetchedAt, ttlMillis: responseTtl, shouldDeliver: property2 != null});
|
|
if (property2 != null) {
|
|
binding = env0_9;
|
|
value12 = binding.get(property);
|
|
moduleValue2 = require(7100) /* metro dependency 7100: QuestServerUtils */;
|
|
value13 = moduleValue2.questWithUserStatusFromServer(property2);
|
|
if (value12 != null) {
|
|
updateQuestData(property, value13);
|
|
break;
|
|
}
|
|
Map = global.Map;
|
|
binding = env0_9;
|
|
prototype = Map.prototype;
|
|
value14 = Object.create(prototype, {constructor: {value: Map}});
|
|
map = new Map(binding);
|
|
value15 = map instanceof Object ? map : value14;
|
|
env0_9 = value15;
|
|
value15.set(property, value13);
|
|
Map = global.Map;
|
|
binding = env0_36;
|
|
prototype = Map.prototype;
|
|
value16 = Object.create(prototype, {constructor: {value: Map}});
|
|
map = new Map(binding);
|
|
value17 = map instanceof Object ? map : value16;
|
|
env0_36 = value17;
|
|
set = value17.set;
|
|
moduleValue3 = require(7091) /* metro dependency 7091: QuestDataUtils */;
|
|
isQuestExpired = moduleValue3.isQuestExpired;
|
|
Reflect.apply(set, value17, [property, Reflect.apply(isQuestExpired, moduleValue3, [value13])]);
|
|
break;
|
|
}
|
|
value18 = value8();
|
|
done = value18.done;
|
|
if (done) {
|
|
break;
|
|
}
|
|
r6 = value18;
|
|
continue;
|
|
}
|
|
}
|
|
binding = env0_26;
|
|
binding.set(content, {earnedDecisionByQuestId: map});
|
|
}
|
|
|
|
function QUESTS_FETCH_EARNED_QUEST_TO_DELIVER_FAILURE({content}) { // fn#56677, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7271:10010, offset: 0x013ce801, size: 68 bytes, params: 2, frame: 15
|
|
const Map = global.Map;
|
|
const binding = env0_8;
|
|
const value2 = Object.create(Map.prototype, {constructor: {value: Map}});
|
|
const map = new Map(binding);
|
|
(map instanceof Object ? map : value2).set(content, false);
|
|
}
|
|
|
|
function QUESTS_FETCH_PREVIEW_BEGIN({questId}) { // fn#56678, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7271:10129, offset: 0x013ce845, size: 106 bytes, params: 2, frame: 14
|
|
const Set = global.Set;
|
|
let binding = env0_18;
|
|
const value2 = Object.create(Set.prototype, {constructor: {value: Set}});
|
|
const set = new Set(binding);
|
|
(set instanceof Object ? set : value2).add(questId);
|
|
const Map = global.Map;
|
|
binding = env0_45;
|
|
const value4 = Object.create(Map.prototype, {constructor: {value: Map}});
|
|
const map = new Map(binding);
|
|
(map instanceof Object ? map : value4).delete(questId);
|
|
}
|
|
|
|
function QUESTS_FETCH_PREVIEW_SUCCESS({questId, quest}) { // fn#56679, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7271:10257, offset: 0x013ce8af, size: 202 bytes, params: 2, frame: 16
|
|
const Set = global.Set;
|
|
let binding = env0_18;
|
|
const value2 = Object.create(Set.prototype, {constructor: {value: Set}});
|
|
const set = new Set(binding);
|
|
(set instanceof Object ? set : value2).delete(questId);
|
|
let Map = global.Map;
|
|
binding = env0_39;
|
|
const value4 = Object.create(Map.prototype, {constructor: {value: Map}});
|
|
let map = new Map(binding);
|
|
(map instanceof Object ? map : value4).set(questId, quest);
|
|
Map = global.Map;
|
|
binding = env0_9;
|
|
const value6 = Object.create(Map.prototype, {constructor: {value: Map}});
|
|
map = new Map(binding);
|
|
(map instanceof Object ? map : value6).set(questId, quest);
|
|
Map = global.Map;
|
|
binding = env0_45;
|
|
const value8 = Object.create(Map.prototype, {constructor: {value: Map}});
|
|
map = new Map(binding);
|
|
(map instanceof Object ? map : value8).delete(questId);
|
|
}
|
|
|
|
function QUESTS_FETCH_PREVIEW_FAILURE({questId, error}) { // fn#56680, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7271:10446, offset: 0x013ce979, size: 112 bytes, params: 2, frame: 16
|
|
const Set = global.Set;
|
|
let binding = env0_18;
|
|
const value2 = Object.create(Set.prototype, {constructor: {value: Set}});
|
|
const set = new Set(binding);
|
|
(set instanceof Object ? set : value2).delete(questId);
|
|
const Map = global.Map;
|
|
binding = env0_45;
|
|
const value4 = Object.create(Map.prototype, {constructor: {value: Map}});
|
|
const map = new Map(binding);
|
|
(map instanceof Object ? map : value4).set(questId, error);
|
|
}
|
|
|
|
function QUESTS_SEND_HEARTBEAT_SUCCESS({questId, streamKey, userStatus}) { // fn#56681, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7271:10587, offset: 0x013ce9e9, size: 74 bytes, params: 2, frame: 15
|
|
env0_19.add(questId);
|
|
updateQuestData(questId, {userStatus: userStatus});
|
|
if (streamKey != null) {
|
|
maybeDeleteQuestHeartbeatFailure(streamKey);
|
|
}
|
|
}
|
|
|
|
function QUESTS_SEND_HEARTBEAT_FAILURE({questId, streamKey}) { // fn#56682, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7271:10780, offset: 0x013cea33, size: 136 bytes, params: 2, frame: 16
|
|
var binding;
|
|
var Map;
|
|
var map;
|
|
var set;
|
|
var object2;
|
|
if (streamKey != null && env0_22.get(streamKey) == null) {
|
|
Map = global.Map;
|
|
binding = env0_22;
|
|
map = new Map();
|
|
set = map.set;
|
|
object2 = {questId: questId, streamKey: streamKey};
|
|
object2.firstFailedAt = global.Date.now();
|
|
Reflect.apply(set, map, [streamKey, object2]);
|
|
}
|
|
}
|
|
|
|
function QUESTS_ENROLL_BEGIN({questId}) { // fn#56683, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7271:10958, offset: 0x013ceabb, size: 62 bytes, params: 2, frame: 13
|
|
const Set = global.Set;
|
|
const binding = env0_14;
|
|
const value2 = Object.create(Set.prototype, {constructor: {value: Set}});
|
|
const set = new Set(binding);
|
|
(set instanceof Object ? set : value2).add(questId);
|
|
}
|
|
|
|
function QUESTS_FETCH_REWARD_CODE_BEGIN({questId}) { // fn#56686, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7271:11320, offset: 0x013ceb48, size: 62 bytes, params: 2, frame: 13
|
|
const Set = global.Set;
|
|
const binding = env0_16;
|
|
const value2 = Object.create(Set.prototype, {constructor: {value: Set}});
|
|
const set = new Set(binding);
|
|
(set instanceof Object ? set : value2).add(questId);
|
|
}
|
|
|
|
function QUESTS_FETCH_REWARD_CODE_SUCCESS({questId, rewardCode}) { // fn#56687, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7271:11433, offset: 0x013ceb86, size: 173 bytes, params: 2, frame: 17
|
|
var updateQuestDataBinding;
|
|
var object;
|
|
const Set = global.Set;
|
|
const binding = env0_16;
|
|
const value2 = Object.create(Set.prototype, {constructor: {value: Set}});
|
|
const set = new Set(binding);
|
|
(set instanceof Object ? set : value2).delete(questId);
|
|
_addRewardCode(questId, rewardCode);
|
|
const userStatus = env0_9.get(questId)?.userStatus;
|
|
if (userStatus != null && userStatus.claimedAt == null) {
|
|
updateQuestDataBinding = updateQuestData;
|
|
object = {};
|
|
copyDataProperties(object, userStatus, null);
|
|
object['claimedAt'] = rewardCode.claimedAt;
|
|
updateQuestDataBinding(questId, {userStatus: object});
|
|
}
|
|
}
|
|
|
|
function QUESTS_FETCH_REWARD_CODE_FAILURE({questId}) { // fn#56688, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7271:11764, offset: 0x013cec33, size: 62 bytes, params: 2, frame: 13
|
|
const Set = global.Set;
|
|
const binding = env0_16;
|
|
const value2 = Object.create(Set.prototype, {constructor: {value: Set}});
|
|
const set = new Set(binding);
|
|
(set instanceof Object ? set : value2).delete(questId);
|
|
}
|
|
|
|
function QUESTS_CLAIM_REWARD_BEGIN({questId}) { // fn#56689, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7271:11875, offset: 0x013cec71, size: 62 bytes, params: 2, frame: 13
|
|
const Set = global.Set;
|
|
const binding = env0_15;
|
|
const value2 = Object.create(Set.prototype, {constructor: {value: Set}});
|
|
const set = new Set(binding);
|
|
(set instanceof Object ? set : value2).add(questId);
|
|
}
|
|
|
|
function QUESTS_CLAIM_REWARD_SUCCESS({questId, entitlements}) { // fn#56690, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7271:11979, offset: 0x013cecaf, size: 78 bytes, params: 2, frame: 15
|
|
const Set = global.Set;
|
|
const binding = env0_15;
|
|
const value2 = Object.create(Set.prototype, {constructor: {value: Set}});
|
|
const set = new Set(binding);
|
|
(set instanceof Object ? set : value2).delete(questId);
|
|
updateQuestRewardData(questId, entitlements);
|
|
}
|
|
|
|
function QUESTS_CLAIM_REWARD_FAILURE({questId}) { // fn#56691, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7271:12130, offset: 0x013cecfd, size: 62 bytes, params: 2, frame: 13
|
|
const Set = global.Set;
|
|
const binding = env0_15;
|
|
const value2 = Object.create(Set.prototype, {constructor: {value: Set}});
|
|
const set = new Set(binding);
|
|
(set instanceof Object ? set : value2).delete(questId);
|
|
}
|
|
|
|
function QUESTS_DISMISS_CONTENT_BEGIN({questId}) { // fn#56692, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7271:12240, offset: 0x013ced3b, size: 192 bytes, params: 2, frame: 24
|
|
var r5;
|
|
var r6;
|
|
var r3;
|
|
var value9;
|
|
var value10;
|
|
var property;
|
|
var value11;
|
|
var value12;
|
|
const Set = global.Set;
|
|
const binding = env0_17;
|
|
const value2 = Object.create(Set.prototype, {constructor: {value: Set}});
|
|
const set = new Set(binding);
|
|
(set instanceof Object ? set : value2).add(questId);
|
|
const Map = global.Map;
|
|
const map = new Map(env0_23);
|
|
const value6 = _createForOfIteratorHelperLoose_56610(map);
|
|
const value7 = value6();
|
|
let done = value7.done;
|
|
if (done) {
|
|
r3 = false;
|
|
} else {
|
|
r5 = false;
|
|
r6 = value7;
|
|
while (true) {
|
|
value9 = r6.value;
|
|
value10 = env0_32(value9, 2);
|
|
property = value10[0];
|
|
if (value10[1] === questId) {
|
|
map.delete(property);
|
|
value11 = true;
|
|
r5 = value11;
|
|
}
|
|
value12 = value6();
|
|
done = value12.done;
|
|
if (done) {
|
|
r3 = r5;
|
|
break;
|
|
}
|
|
r6 = value12;
|
|
continue;
|
|
}
|
|
}
|
|
if (r3) {
|
|
}
|
|
}
|
|
|
|
function QUESTS_USER_STATUS_UPDATE({user_status}) { // fn#56695, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7271:12791, offset: 0x013cee4a, size: 401 bytes, params: 2, frame: 20
|
|
var r4;
|
|
var isQuestExpired2;
|
|
var map;
|
|
var questId;
|
|
const getQuestLoggerModule = require(7099) /* metro dependency 7099: getQuestLogger */;
|
|
const getQuestLogger = getQuestLoggerModule.getQuestLogger;
|
|
const QUESTS_STORE = QuestsExperimentLocations.QUESTS_STORE;
|
|
const value2 = Reflect.apply(getQuestLogger, getQuestLoggerModule, [{location: QUESTS_STORE}]);
|
|
let log = value2.log;
|
|
Reflect.apply(log, value2, ['Received user status update for ' + user_status.quest_id, user_status]);
|
|
const value3 = (require(7100) /* metro dependency 7100: QuestServerUtils */).questUserStatusFromServer(user_status);
|
|
updateQuestData(user_status.quest_id, {userStatus: value3});
|
|
let binding = env0_9;
|
|
const value4 = binding.get(user_status.quest_id);
|
|
if (value4 != null) {
|
|
isQuestExpired2 = (require(7091) /* metro dependency 7091: QuestDataUtils */).isQuestExpired(value4);
|
|
binding = env0_36;
|
|
if (binding.get(user_status.quest_id) !== isQuestExpired2) {
|
|
map = new global.Map(env0_36);
|
|
env0_36 = map.set(user_status.quest_id, isQuestExpired2);
|
|
}
|
|
}
|
|
const Object = global.Object;
|
|
const value7 = Object.keys(value3.progress).length === 0;
|
|
if (value7) {
|
|
binding = env0_40;
|
|
r4 = binding.has(value3.questId);
|
|
} else {
|
|
r4 = value7;
|
|
}
|
|
if (r4) {
|
|
log = value2.log;
|
|
questId = value3.questId;
|
|
Reflect.apply(log, value2, ['Removing optimistic progress for ' + questId]);
|
|
binding = env0_40;
|
|
questId = value3.questId;
|
|
binding.delete(questId);
|
|
}
|
|
}
|
|
|
|
function QUESTS_PREVIEW_UPDATE_SUCCESS({previewQuestUserStatus}) { // fn#56698, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7271:13580, offset: 0x013ceff4, size: 328 bytes, params: 2, frame: 16
|
|
var Map;
|
|
var binding;
|
|
var value2;
|
|
var map;
|
|
var state;
|
|
var resetQuest;
|
|
var isQuestExpired2;
|
|
const updateQuestDataBinding = updateQuestData;
|
|
let questId = previewQuestUserStatus.questId;
|
|
updateQuestDataBinding(questId, {userStatus: previewQuestUserStatus});
|
|
if (previewQuestUserStatus.claimedAt == null) {
|
|
Map = global.Map;
|
|
binding = env0_20;
|
|
value2 = Object.create(Map.prototype, {constructor: {value: Map}});
|
|
map = new Map();
|
|
(map instanceof Object ? map : value2).delete(previewQuestUserStatus.questId);
|
|
}
|
|
if (previewQuestUserStatus.enrolledAt == null) {
|
|
Map = global.Map;
|
|
binding = env0_24;
|
|
map = new Map();
|
|
questId = previewQuestUserStatus.questId;
|
|
map.delete(questId);
|
|
state = VideoQuestUIStore.getState();
|
|
resetQuest = state.resetQuest;
|
|
questId = previewQuestUserStatus.questId;
|
|
Reflect.apply(resetQuest, state, [questId]);
|
|
}
|
|
const value7 = env0_9.get(previewQuestUserStatus.questId);
|
|
if (value7 != null) {
|
|
isQuestExpired2 = (require(7091) /* metro dependency 7091: QuestDataUtils */).isQuestExpired(value7);
|
|
binding = env0_36;
|
|
if (binding.get(previewQuestUserStatus.questId) !== isQuestExpired2) {
|
|
Map = global.Map;
|
|
binding = env0_36;
|
|
map = new Map();
|
|
env0_36 = map.set(previewQuestUserStatus.questId, isQuestExpired2);
|
|
}
|
|
}
|
|
}
|
|
|
|
function QUESTS_PREVIEW_OVERRIDE({placement, questId}) { // fn#56699, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7271:13977, offset: 0x013cf13c, size: 95 bytes, params: 2, frame: 15
|
|
const Map = global.Map;
|
|
const map = new Map(env0_23);
|
|
const get = map.get;
|
|
if (Reflect.apply(get, map, [placement]) === questId) {
|
|
map.delete(placement);
|
|
} else {
|
|
map.set(placement, questId);
|
|
}
|
|
}
|
|
|
|
function QUESTS_SELECT_TASK_PLATFORM({questId, platform}) { // fn#56700, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7271:14119, offset: 0x013cf19b, size: 95 bytes, params: 2, frame: 15
|
|
const Map = global.Map;
|
|
const map = new Map(env0_24);
|
|
if (platform == null) {
|
|
map.delete(questId);
|
|
} else {
|
|
map.set(questId, platform);
|
|
}
|
|
}
|
|
|
|
function QUESTS_UPDATE_OPTIMISTIC_PROGRESS({questId, taskEventName, progress}) { // fn#56701, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7271:14256, offset: 0x013cf1fa, size: 102 bytes, params: 2, frame: 16
|
|
var r2;
|
|
var map;
|
|
const value2 = env0_40.get(questId);
|
|
if (value2 != null) {
|
|
r2 = value2;
|
|
} else {
|
|
map = new global.Map();
|
|
}
|
|
r2.set(taskEventName, progress);
|
|
env0_40.set(questId, r2);
|
|
}
|
|
|
|
function QUESTS_RESET_OPTIMISTIC_PROGRESS({questId}) { // fn#56702, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7271:14429, offset: 0x013cf260, size: 72 bytes, params: 2, frame: 12
|
|
const binding = env0_40;
|
|
if (binding.has(questId)) {
|
|
env0_40.delete(questId);
|
|
}
|
|
VideoQuestUIStore.getState().resetQuest(questId);
|
|
}
|
|
|
|
function QUESTS_USER_COMPLETION_UPDATE({quest_enrollment_blocked_until}) { // fn#56703, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7271:14561, offset: 0x013cf2a8, size: 60 bytes, params: 2, frame: 12
|
|
var date;
|
|
if (quest_enrollment_blocked_until != null) {
|
|
date = new global.Date(quest_enrollment_blocked_until);
|
|
}
|
|
}
|
|
|
|
function QUESTS_FETCH_QUEST_HOME_HERO_BEGIN({placement}) { // fn#56704, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7271:14696, offset: 0x013cf2e4, size: 69 bytes, params: 2, frame: 15
|
|
const Map = global.Map;
|
|
const binding = env0_5;
|
|
const value2 = Object.create(Map.prototype, {constructor: {value: Map}});
|
|
const map = new Map(binding);
|
|
(map instanceof Object ? map : value2).set(placement, true);
|
|
}
|
|
|
|
function QUESTS_FETCH_QUEST_HOME_HERO_SUCCESS(a0) { // fn#56705, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7271:14818, offset: 0x013cf329, size: 292 bytes, params: 2, frame: 18
|
|
const Date = global.Date;
|
|
env0_42 = Date.now();
|
|
let Map = global.Map;
|
|
let map = new Map(env0_5);
|
|
map.set(a0.placement, false);
|
|
let questHomeHero = a0.questHomeHero;
|
|
const object2 = {};
|
|
const value4 = null;
|
|
object2.questId = value4;
|
|
questHomeHero = a0.questHomeHero;
|
|
const value5 = undefined;
|
|
const id = value4 == questHomeHero ? value5 : questHomeHero.id;
|
|
object2.adCreativeId = value4 != id ? id : value4;
|
|
object2.fetchedAt = a0.fetchedAt;
|
|
const adDecisionUtilsModule = require(7109) /* metro dependency 7109: AdDecisionUtils */;
|
|
object2.ttlMillis = adDecisionUtilsModule.resolveResponseTtl(a0.responseTtlSeconds);
|
|
object2.adDecisionData = a0.adDecisionData;
|
|
object2.adContext = a0.adContext;
|
|
object2.metadataSealed = a0.metadataSealed;
|
|
object2.trafficMetadataSealed = a0.trafficMetadataSealed;
|
|
Map = global.Map;
|
|
map = new Map(env0_38);
|
|
map.set(a0.placement, object2);
|
|
return value5;
|
|
}
|
|
|
|
function QUESTS_FETCH_QUEST_HOME_HERO_FAILURE({placement}) { // fn#56706, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7271:15317, offset: 0x013cf44d, size: 69 bytes, params: 2, frame: 15
|
|
const Map = global.Map;
|
|
const binding = env0_5;
|
|
const value2 = Object.create(Map.prototype, {constructor: {value: Map}});
|
|
const map = new Map(binding);
|
|
(map instanceof Object ? map : value2).set(placement, false);
|
|
}
|
|
|
|
function updateExpiredQuestsMap() { // fn#56621, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7271:3205, owner: _runExpirationCheck.updateExpiredQuestsMap, offset: 0x013cd8a9, size: 95 bytes, params: 1, frame: 14
|
|
const env0_0 = false;
|
|
const Map = global.Map;
|
|
const map = new Map(env1_36);
|
|
env1_9.forEach(_fun56622);
|
|
if (env0_0) {
|
|
env1_46.emitChange();
|
|
}
|
|
}
|
|
|
|
function QuestStore() { // fn#56626, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7271:3681, offset: 0x013cdd41, size: 113 bytes, params: 1, frame: 20
|
|
const value = environment.__proto__;
|
|
env1_27(this, QuestStore);
|
|
const value3 = env1_30(QuestStore);
|
|
return env1_29(this, _isNativeReflectConstruct_56607() ? global.Reflect.construct(value3, arguments,
|
|
env1_30(this).constructor) : value3.apply(this, arguments));
|
|
}
|
|
|
|
function value_56636(a0) { // fn#56636, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7271:4464, offset: 0x013cddb2, size: 43 bytes, params: 2, frame: 13
|
|
const value = environment.__proto__;
|
|
const r1 = env1_5?.get(a0);
|
|
return r1 != null && r1;
|
|
}
|
|
|
|
function value_56637(a0) { // fn#56637, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7271:4571, offset: 0x013cdddd, size: 47 bytes, params: 2, frame: 12
|
|
const value = environment.__proto__;
|
|
const value2 = env1_23.get(a0);
|
|
return value2 == null ? undefined : env1_9.get(value2);
|
|
}
|
|
|
|
function value_56641(a0) { // fn#56641, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7271:4851, offset: 0x013cde0c, size: 22 bytes, params: 2, frame: 11
|
|
return env1_45.get(a0);
|
|
}
|
|
|
|
function value_56644(a0) { // fn#56644, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7271:5030, offset: 0x013cde22, size: 22 bytes, params: 2, frame: 11
|
|
return env1_16.has(a0);
|
|
}
|
|
|
|
function value_56646(a0) { // fn#56646, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7271:5150, offset: 0x013cde38, size: 22 bytes, params: 2, frame: 11
|
|
return env1_20.get(a0);
|
|
}
|
|
|
|
function value_56652(a0) { // fn#56652, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7271:5553, offset: 0x013cde72, size: 34 bytes, params: 2, frame: 11
|
|
let value = environment.__proto__;
|
|
value = env1_24.get(a0);
|
|
const value2 = null;
|
|
return value2 != value ? value : value2;
|
|
}
|
|
|
|
function value_56653(a0, a1) { // fn#56653, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7271:5641, offset: 0x013cde94, size: 46 bytes, params: 3, frame: 12
|
|
var r0;
|
|
let value = environment.__proto__;
|
|
value = env1_40.get(a0);
|
|
if (value == null) {
|
|
r0 = undefined;
|
|
} else {
|
|
value = value.get(a1);
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function value_56655(a0) { // fn#56655, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7271:5788, offset: 0x013cdec2, size: 34 bytes, params: 2, frame: 11
|
|
let value = environment.__proto__;
|
|
value = env1_36.get(a0);
|
|
return value != null && value;
|
|
}
|
|
|
|
function value_56658() { // fn#56658, offset: 0x013cdee4, size: 9 bytes, params: 1, frame: 1
|
|
return env1_44;
|
|
}
|
|
|
|
function value_56661(a0) { // fn#56661, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7271:6198, offset: 0x013cdeed, size: 43 bytes, params: 2, frame: 13
|
|
const value = environment.__proto__;
|
|
const r1 = env1_8?.get(a0);
|
|
return r1 != null && r1;
|
|
}
|
|
|
|
function _fun56622(a0, a1) { // fn#56622, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7271:3272, offset: 0x013cd908, size: 123 bytes, params: 3, frame: 16
|
|
var value3;
|
|
var isQuestExpired2;
|
|
let binding = env0_1;
|
|
if (binding.get(a1) !== true) {
|
|
value3 = environment.__proto__.__proto__;
|
|
isQuestExpired2 = (require(7091) /* metro dependency 7091: QuestDataUtils */).isQuestExpired(a0);
|
|
binding = env0_1;
|
|
if (isQuestExpired2) {
|
|
binding.set(a1, true);
|
|
} else if (!binding.has(a1)) {
|
|
env0_1.set(a1, false);
|
|
}
|
|
}
|
|
}
|
|
|