335 lines
14 KiB
TypeScript
335 lines
14 KiB
TypeScript
/* Metro module 7092; source: modules/quests/BountyStore.tsx; dependencies: [6, 7, 15, 17, 18, 566, 694, 2] */
|
|
function _fun56578(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#56578, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7270:6, offset: 0x013cc255, size: 386 bytes, params: 8, frame: 19
|
|
const _arrayLikeToArray_56581 = 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;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_6 = importDefault(6) /* metro dependency 6 */;
|
|
const env0_7 = importDefault(7) /* metro dependency 7 */;
|
|
const env0_8 = importDefault(15) /* metro dependency 15 */;
|
|
const env0_9 = importDefault(17) /* metro dependency 17 */;
|
|
const env0_10 = importDefault(18) /* metro dependency 18 */;
|
|
closure();
|
|
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
|
|
let value = _fun56586(Store);
|
|
value.displayName = 'BountyStore';
|
|
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {LOGOUT: function() {
|
|
initializeState();
|
|
}, BOUNTIES_FETCH_QUEST_HOME_BOUNTIES_BEGIN: function() {
|
|
env0_0 = true;
|
|
}, BOUNTIES_FETCH_QUEST_HOME_BOUNTIES_SUCCESS: BOUNTIES_FETCH_QUEST_HOME_BOUNTIES_SUCCESS,
|
|
BOUNTIES_FETCH_QUEST_HOME_BOUNTIES_FAILURE: BOUNTIES_FETCH_QUEST_HOME_BOUNTIES_FAILURE,
|
|
BOUNTIES_CLAIM_REWARD_BEGIN: BOUNTIES_CLAIM_REWARD_BEGIN,
|
|
BOUNTIES_CLAIM_REWARD_SUCCESS: BOUNTIES_CLAIM_REWARD_SUCCESS,
|
|
BOUNTIES_CLAIM_REWARD_FAILURE: BOUNTIES_CLAIM_REWARD_FAILURE,
|
|
BOUNTIES_VIDEO_PROGRESS_UPDATE: BOUNTIES_VIDEO_PROGRESS_UPDATE, AD_SESSION_RESET: function() {
|
|
var Map = global.Map;
|
|
env0_5 = new Map();
|
|
}});
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/BountyStore.tsx');
|
|
exports.default = value;
|
|
}
|
|
|
|
function _createForOfIteratorHelperLoose_56579(a0, a1) { // fn#56579, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7270:162, offset: 0x013cc3d7, 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 _fun56580;
|
|
}
|
|
value = undefined;
|
|
if (a0) {
|
|
if (typeof a0 === 'string') {
|
|
value = _arrayLikeToArray_56581(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_56581(a0, value);
|
|
r6 = value;
|
|
} else {
|
|
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
|
if (regexp.test(r9)) {
|
|
value = _arrayLikeToArray_56581(a0, value);
|
|
r6 = value;
|
|
} else {
|
|
r6 = value;
|
|
}
|
|
}
|
|
r5 = r6;
|
|
}
|
|
} else {
|
|
r5 = value;
|
|
}
|
|
if (r5) {
|
|
if (r5) {
|
|
}
|
|
return _fun56580;
|
|
}
|
|
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 _isNativeReflectConstruct_56582() { // fn#56582, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7270:1072, offset: 0x013cc549, 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_56582_isNativeReflectConstruct = function() {
|
|
return !!result;
|
|
})();
|
|
}
|
|
|
|
function initializeState() { // fn#56585, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7270:1265, offset: 0x013cc5a7, size: 143 bytes, params: 1, frame: 11
|
|
env0_1 = [];
|
|
let Set = global.Set;
|
|
let set = new Set();
|
|
Set = global.Set;
|
|
set = new Set();
|
|
let Map = global.Map;
|
|
let map = new Map();
|
|
Map = global.Map;
|
|
map = new Map();
|
|
}
|
|
|
|
function _fun56586(a0) { // fn#56586, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7270:1366, offset: 0x013cc636, size: 237 bytes, params: 2, frame: 16
|
|
const closure = BountyStore;
|
|
env0_10(closure, a0);
|
|
return env0_7(closure, [{key: 'isFetchingQuestHomeBounties', get: get_56588}, {key: 'questHomeBounties',
|
|
get: get_56589}, {key: 'isBountyCompleted', value: value_56590}, {key: 'getCompletedBountyCount',
|
|
value: value_56591}, {key: 'isClaimingBountyReward', value: value_56592}, {key: 'areAllBountiesCompleted',
|
|
value: value_56593}, {key: 'getAdDecisionByPlacementAndAdCreativeId', value: value_56595},
|
|
{key: 'getBountyVideoProgress', value: value_56596}]);
|
|
}
|
|
|
|
function BOUNTIES_FETCH_QUEST_HOME_BOUNTIES_SUCCESS({bounties, placement, adDecisionsByAdCreativeId}) { // fn#56599, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7270:2584, offset: 0x013cc8b7, size: 145 bytes, params: 2, frame: 15
|
|
const Set = global.Set;
|
|
const set = new Set();
|
|
let Map = global.Map;
|
|
let map = new Map();
|
|
Map = global.Map;
|
|
const binding = env0_4;
|
|
const value6 = Object.create(Map.prototype, {constructor: {value: Map}});
|
|
map = new Map(binding);
|
|
(map instanceof Object ? map : value6).set(placement, adDecisionsByAdCreativeId);
|
|
}
|
|
|
|
function BOUNTIES_FETCH_QUEST_HOME_BOUNTIES_FAILURE({placement}) { // fn#56600, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7270:2780, offset: 0x013cc948, size: 106 bytes, params: 2, frame: 13
|
|
env0_1 = [];
|
|
const Set = global.Set;
|
|
const set = new Set();
|
|
const Map = global.Map;
|
|
const binding = env0_4;
|
|
const value4 = Object.create(Map.prototype, {constructor: {value: Map}});
|
|
const map = new Map(binding);
|
|
(map instanceof Object ? map : value4).delete(placement);
|
|
}
|
|
|
|
function BOUNTIES_CLAIM_REWARD_BEGIN({bountyId}) { // fn#56601, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7270:2914, offset: 0x013cc9b2, size: 62 bytes, params: 2, frame: 13
|
|
const Set = global.Set;
|
|
const binding = env0_3;
|
|
const value2 = Object.create(Set.prototype, {constructor: {value: Set}});
|
|
const set = new Set(binding);
|
|
(set instanceof Object ? set : value2).add(bountyId);
|
|
}
|
|
|
|
function BOUNTIES_CLAIM_REWARD_SUCCESS({bountyId}) { // fn#56602, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7270:3027, offset: 0x013cc9f0, size: 106 bytes, params: 2, frame: 14
|
|
let Set = global.Set;
|
|
let binding = env0_3;
|
|
const value2 = Object.create(Set.prototype, {constructor: {value: Set}});
|
|
let set = new Set(binding);
|
|
(set instanceof Object ? set : value2).delete(bountyId);
|
|
Set = global.Set;
|
|
binding = env0_2;
|
|
const value4 = Object.create(Set.prototype, {constructor: {value: Set}});
|
|
set = new Set(binding);
|
|
(set instanceof Object ? set : value4).add(bountyId);
|
|
}
|
|
|
|
function BOUNTIES_CLAIM_REWARD_FAILURE({bountyId}) { // fn#56603, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7270:3175, offset: 0x013cca5a, size: 62 bytes, params: 2, frame: 13
|
|
const Set = global.Set;
|
|
const binding = env0_3;
|
|
const value2 = Object.create(Set.prototype, {constructor: {value: Set}});
|
|
const set = new Set(binding);
|
|
(set instanceof Object ? set : value2).delete(bountyId);
|
|
}
|
|
|
|
function BOUNTIES_VIDEO_PROGRESS_UPDATE({bountyId, timestampSec, maxTimestampSec, duration}) { // fn#56604, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7270:3294, offset: 0x013cca98, size: 96 bytes, params: 2, frame: 17
|
|
const Map = global.Map;
|
|
const map = new Map(env0_5);
|
|
map.set(bountyId, {timestampSec: timestampSec, maxTimestampSec: maxTimestampSec, duration: duration});
|
|
}
|
|
|
|
function BountyStore() { // fn#56587, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7270:1378, offset: 0x013cc723, size: 113 bytes, params: 1, frame: 20
|
|
const value = environment.__proto__;
|
|
env1_6(this, BountyStore);
|
|
const value3 = env1_9(BountyStore);
|
|
return env1_8(this, _isNativeReflectConstruct_56582() ? global.Reflect.construct(value3, arguments,
|
|
env1_9(this).constructor) : value3.apply(this, arguments));
|
|
}
|
|
|
|
function get_56589() { // fn#56589, offset: 0x013cc794, size: 9 bytes, params: 1, frame: 1
|
|
return env1_1;
|
|
}
|
|
|
|
function value_56591(a0) { // fn#56591, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7270:1837, offset: 0x013cc7b3, size: 92 bytes, params: 2, frame: 17
|
|
var r2;
|
|
var r3;
|
|
var r7;
|
|
var r0;
|
|
var value5;
|
|
var binding;
|
|
var has;
|
|
var id;
|
|
var value6;
|
|
var value7;
|
|
const value2 = _createForOfIteratorHelperLoose_56579(a0);
|
|
const value3 = value2();
|
|
let done = value3.done;
|
|
const value4 = 0;
|
|
if (done) {
|
|
r0 = value4;
|
|
} else {
|
|
r2 = value4;
|
|
r3 = value3;
|
|
while (true) {
|
|
value5 = r3.value;
|
|
binding = env1_2;
|
|
has = binding.has;
|
|
id = value5.id;
|
|
if (Reflect.apply(has, binding, [id])) {
|
|
value6 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
|
|
r7 = value6;
|
|
} else {
|
|
r7 = r2;
|
|
}
|
|
value7 = value2();
|
|
done = value7.done;
|
|
if (done) {
|
|
r0 = r7;
|
|
break;
|
|
}
|
|
r2 = r7;
|
|
r3 = value7;
|
|
continue;
|
|
}
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function value_56592(a0) { // fn#56592, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7270:1994, offset: 0x013cc80f, size: 22 bytes, params: 2, frame: 11
|
|
return env1_3.has(a0);
|
|
}
|
|
|
|
function value_56593() { // fn#56593, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7270:2061, offset: 0x013cc825, size: 27 bytes, params: 1, frame: 11
|
|
return env1_1.every(_fun56594);
|
|
}
|
|
|
|
function value_56595(a0, a1) { // fn#56595, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7270:2160, offset: 0x013cc85b, size: 58 bytes, params: 3, frame: 13
|
|
var r1;
|
|
let value = environment.__proto__;
|
|
value = env1_4.get(a0);
|
|
const value2 = null;
|
|
if (value2 == value) {
|
|
r1 = undefined;
|
|
} else {
|
|
value = value.get(a1);
|
|
r1 = value;
|
|
}
|
|
return value2 != r1 ? r1 : value2;
|
|
}
|
|
|
|
function value_56596(a0) { // fn#56596, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7270:2279, offset: 0x013cc895, size: 34 bytes, params: 2, frame: 11
|
|
let value = environment.__proto__;
|
|
value = env1_5.get(a0);
|
|
const value2 = null;
|
|
return value2 != value ? value : value2;
|
|
}
|
|
|
|
function _fun56594({id}) { // fn#56594, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7270:2088, offset: 0x013cc840, size: 27 bytes, params: 2, frame: 11
|
|
return env2_2.has(id);
|
|
}
|
|
|