1042 lines
40 KiB
TypeScript
1042 lines
40 KiB
TypeScript
/* Metro module 7289; source: modules/premium/promotions/PromotionsActionCreators.tsx; dependencies: [5, 1949, 7262, 7261, 1880, 661, 694, 7290, 507, 5182, 1362, 1345, 7286, 2] */
|
|
import Module00005 from '../../../by-id/module-00005.js'; /* Metro dependency 5 */
|
|
import Dispatcher from '../../../Dispatcher.tsx'; /* Metro dependency 694 */
|
|
import LocaleStore from '../../user_settings/LocaleStore.tsx'; /* Metro dependency 1949 */
|
|
import PromotionsStore from './PromotionsStore.tsx'; /* Metro dependency 7261 */
|
|
import PromotionRecord from '../../../records/PromotionRecord.tsx'; /* Metro dependency 7262 */
|
|
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
|
|
import * as WrappersModule from '../../../external/discord_common/js/packages/protos/google/protobuf/wrappers.tsx'; /* Metro dependency 1345 */
|
|
import * as PremiumConstantsModule from '../PremiumConstants.tsx'; /* Metro dependency 1880 */
|
|
|
|
function _fun58808(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#58808, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7467:6, offset: 0x016d74a9, size: 350 bytes, params: 8, frame: 24
|
|
const env0_0 = require;
|
|
const closure = function() {
|
|
return _fetchActivePromotions.apply(this, arguments);
|
|
};
|
|
const dismissOutboundPromotionNotice2 = dismissOutboundPromotionNotice;
|
|
const closure3 = function() {
|
|
return _fetchActiveBogoPromotion.apply(this, arguments);
|
|
};
|
|
const closure4 = function() {
|
|
return _fetchClaimedOutboundPromotionCodes.apply(this, arguments);
|
|
};
|
|
const addClaimedOutboundPromotionCode2 = addClaimedOutboundPromotionCode;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
object = {fetchActivePromotions: closure, fetchClaimedOutboundPromotionCodes: closure4,
|
|
addClaimedOutboundPromotionCode: addClaimedOutboundPromotionCode2,
|
|
dismissOutboundPromotionNotice: dismissOutboundPromotionNotice2,
|
|
markOutboundPromotionsSeen: markOutboundPromotionsSeen, fetchActiveBogoPromotion: closure3};
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/premium/promotions/PromotionsActionCreators.tsx');
|
|
exports.default = object;
|
|
exports.maybeFetchActivePromotions = maybeFetchActivePromotions;
|
|
exports.clearActivePromotions = clearActivePromotions;
|
|
exports.fetchActivePromotions = closure;
|
|
exports.dismissOutboundPromotionNotice = dismissOutboundPromotionNotice2;
|
|
exports.fetchActiveBogoPromotion = closure3;
|
|
exports.fetchClaimedOutboundPromotionCodes = closure4;
|
|
exports.addClaimedOutboundPromotionCode = addClaimedOutboundPromotionCode2;
|
|
function _fetchActivePromotions() { // fn#58810, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7467:284, offset: 0x016d7607, size: 48 bytes, params: 1, frame: 14
|
|
return Module00005(_fun58812).apply(this, arguments);
|
|
function* _fun58812() { // fn#58812, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7467:351, offset: 0x016d7640, size: 434 bytes, params: 1, frame: 23
|
|
var promotion_id;
|
|
var r8;
|
|
var r6;
|
|
var binding;
|
|
var binding2;
|
|
var property;
|
|
var value4;
|
|
var dispatch;
|
|
var object;
|
|
var value5;
|
|
var MarketingComponentPlatform;
|
|
var MOBILE;
|
|
var value6;
|
|
var HTTP;
|
|
var get;
|
|
var PROMOTIONS;
|
|
var object2;
|
|
var locale;
|
|
var value7;
|
|
var value8;
|
|
var value9;
|
|
var consumedInboundPromotionId;
|
|
var hasFetchedConsumedInboundPromotionId;
|
|
var binding3;
|
|
var value10;
|
|
var fetchUserEntitlementsForApplication;
|
|
var userEntitlementsForApplication;
|
|
var value11;
|
|
var value12;
|
|
var find;
|
|
var closure;
|
|
var value13;
|
|
var value14;
|
|
var value15;
|
|
var value16;
|
|
var binding4;
|
|
var value17;
|
|
var body;
|
|
var error;
|
|
var value18;
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
value = undefined;
|
|
reducibleJoin4: while (true) {
|
|
reduciblePort87: while (true) {
|
|
exceptionLanding86: while (true) {
|
|
try {
|
|
binding = env2_1;
|
|
} catch (error) {
|
|
break exceptionLanding86;
|
|
}
|
|
break reducibleJoin4;
|
|
}
|
|
binding = env2_1;
|
|
value18 = binding(env2_2[6]);
|
|
dispatch = value18.dispatch;
|
|
Reflect.apply(dispatch, value18, [{type: 'ACTIVE_PROMOTIONS_FETCH_FAIL'}]);
|
|
break reduciblePort87;
|
|
}
|
|
return value;
|
|
}
|
|
try {
|
|
binding2 = env2_2;
|
|
} catch (error) {
|
|
break exceptionLanding86;
|
|
}
|
|
try {
|
|
property = binding2[6];
|
|
} catch (error) {
|
|
break exceptionLanding86;
|
|
}
|
|
try {
|
|
value4 = binding(property);
|
|
} catch (error) {
|
|
break exceptionLanding86;
|
|
}
|
|
try {
|
|
dispatch = value4.dispatch;
|
|
} catch (error) {
|
|
break exceptionLanding86;
|
|
}
|
|
try {
|
|
object = {};
|
|
} catch (error) {
|
|
break exceptionLanding86;
|
|
}
|
|
try {
|
|
object.type = 'ACTIVE_PROMOTIONS_FETCH';
|
|
} catch (error) {
|
|
break exceptionLanding86;
|
|
}
|
|
try {
|
|
Reflect.apply(dispatch, value4, [object]);
|
|
} catch (error) {
|
|
break exceptionLanding86;
|
|
}
|
|
try {
|
|
binding = env2_0;
|
|
} catch (error) {
|
|
break exceptionLanding86;
|
|
}
|
|
try {
|
|
property = binding2[7];
|
|
} catch (error) {
|
|
break exceptionLanding86;
|
|
}
|
|
try {
|
|
value5 = binding(property);
|
|
} catch (error) {
|
|
break exceptionLanding86;
|
|
}
|
|
try {
|
|
MarketingComponentPlatform = value5.MarketingComponentPlatform;
|
|
} catch (error) {
|
|
break exceptionLanding86;
|
|
}
|
|
try {
|
|
MOBILE = MarketingComponentPlatform.MOBILE;
|
|
} catch (error) {
|
|
break exceptionLanding86;
|
|
}
|
|
try {
|
|
property = binding2[8];
|
|
} catch (error) {
|
|
break exceptionLanding86;
|
|
}
|
|
try {
|
|
value6 = binding(property);
|
|
} catch (error) {
|
|
break exceptionLanding86;
|
|
}
|
|
try {
|
|
HTTP = value6.HTTP;
|
|
} catch (error) {
|
|
break exceptionLanding86;
|
|
}
|
|
try {
|
|
get = HTTP.get;
|
|
} catch (error) {
|
|
break exceptionLanding86;
|
|
}
|
|
try {
|
|
object = {};
|
|
} catch (error) {
|
|
break exceptionLanding86;
|
|
}
|
|
try {
|
|
binding = env2_8;
|
|
} catch (error) {
|
|
break exceptionLanding86;
|
|
}
|
|
try {
|
|
PROMOTIONS = binding.PROMOTIONS;
|
|
} catch (error) {
|
|
break exceptionLanding86;
|
|
}
|
|
try {
|
|
object.url = PROMOTIONS;
|
|
} catch (error) {
|
|
break exceptionLanding86;
|
|
}
|
|
try {
|
|
object2 = {};
|
|
} catch (error) {
|
|
break exceptionLanding86;
|
|
}
|
|
try {
|
|
binding = env2_4;
|
|
} catch (error) {
|
|
break exceptionLanding86;
|
|
}
|
|
try {
|
|
locale = binding.locale;
|
|
} catch (error) {
|
|
break exceptionLanding86;
|
|
}
|
|
try {
|
|
object2.locale = locale;
|
|
} catch (error) {
|
|
break exceptionLanding86;
|
|
}
|
|
try {
|
|
object2.platform = MOBILE;
|
|
} catch (error) {
|
|
break exceptionLanding86;
|
|
}
|
|
try {
|
|
object.query = object2;
|
|
} catch (error) {
|
|
break exceptionLanding86;
|
|
}
|
|
try {
|
|
object.oldFormErrors = true;
|
|
} catch (error) {
|
|
break exceptionLanding86;
|
|
}
|
|
try {
|
|
object.rejectWithError = true;
|
|
} catch (error) {
|
|
break exceptionLanding86;
|
|
}
|
|
try {
|
|
value7 = Reflect.apply(get, HTTP, [object]);
|
|
} catch (error) {
|
|
break exceptionLanding86;
|
|
}
|
|
yield value7;
|
|
try {
|
|
value8 = undefined;
|
|
value9 = false;
|
|
} catch (error) {
|
|
break exceptionLanding86;
|
|
}
|
|
if (value9) {
|
|
return value8;
|
|
}
|
|
try {
|
|
binding = env2_6;
|
|
} catch (error) {
|
|
break exceptionLanding86;
|
|
}
|
|
try {
|
|
consumedInboundPromotionId = binding.consumedInboundPromotionId;
|
|
} catch (error) {
|
|
break exceptionLanding86;
|
|
}
|
|
try {
|
|
binding = env2_6;
|
|
} catch (error) {
|
|
break exceptionLanding86;
|
|
}
|
|
try {
|
|
hasFetchedConsumedInboundPromotionId = binding.hasFetchedConsumedInboundPromotionId;
|
|
} catch (error) {
|
|
break exceptionLanding86;
|
|
}
|
|
if (hasFetchedConsumedInboundPromotionId) {
|
|
r6 = consumedInboundPromotionId;
|
|
} else {
|
|
try {
|
|
binding = env2_0;
|
|
} catch (error) {
|
|
break exceptionLanding86;
|
|
}
|
|
try {
|
|
binding3 = env2_2;
|
|
} catch (error) {
|
|
break exceptionLanding86;
|
|
}
|
|
try {
|
|
property = binding3[9];
|
|
} catch (error) {
|
|
break exceptionLanding86;
|
|
}
|
|
try {
|
|
value10 = binding(property);
|
|
} catch (error) {
|
|
break exceptionLanding86;
|
|
}
|
|
try {
|
|
fetchUserEntitlementsForApplication = value10.fetchUserEntitlementsForApplication;
|
|
} catch (error) {
|
|
break exceptionLanding86;
|
|
}
|
|
try {
|
|
binding = env2_7;
|
|
} catch (error) {
|
|
break exceptionLanding86;
|
|
}
|
|
try {
|
|
userEntitlementsForApplication = Reflect.apply(fetchUserEntitlementsForApplication, value10, [binding,
|
|
false]);
|
|
} catch (error) {
|
|
break exceptionLanding86;
|
|
}
|
|
yield userEntitlementsForApplication;
|
|
try {
|
|
value11 = undefined;
|
|
value12 = false;
|
|
} catch (error) {
|
|
break exceptionLanding86;
|
|
}
|
|
if (value12) {
|
|
return value11;
|
|
}
|
|
try {
|
|
find = value11.find;
|
|
} catch (error) {
|
|
break exceptionLanding86;
|
|
}
|
|
try {
|
|
} catch (error) {
|
|
break exceptionLanding86;
|
|
}
|
|
try {
|
|
closure = function(a0) {
|
|
return a0.promotion_id != null && a0.consumed === true;
|
|
};
|
|
} catch (error) {
|
|
break exceptionLanding86;
|
|
}
|
|
try {
|
|
value13 = Reflect.apply(find, value11, [closure]);
|
|
} catch (error) {
|
|
break exceptionLanding86;
|
|
}
|
|
value14 = null;
|
|
try {
|
|
value15 = value14 == value13;
|
|
} catch (error) {
|
|
break exceptionLanding86;
|
|
}
|
|
reducibleJoin67: while (true) {
|
|
if (value15) {
|
|
promotion_id = value;
|
|
break reducibleJoin67;
|
|
}
|
|
try {
|
|
promotion_id = value13.promotion_id;
|
|
} catch (error) {
|
|
break exceptionLanding86;
|
|
}
|
|
break reducibleJoin67;
|
|
}
|
|
try {
|
|
value16 = value14 != promotion_id;
|
|
} catch (error) {
|
|
break exceptionLanding86;
|
|
}
|
|
reducibleJoin71: while (true) {
|
|
if (value16) {
|
|
r8 = promotion_id;
|
|
break reducibleJoin71;
|
|
}
|
|
r8 = value14;
|
|
break reducibleJoin71;
|
|
}
|
|
r6 = r8;
|
|
}
|
|
try {
|
|
binding = env2_1;
|
|
} catch (error) {
|
|
break exceptionLanding86;
|
|
}
|
|
try {
|
|
binding4 = env2_2;
|
|
} catch (error) {
|
|
break exceptionLanding86;
|
|
}
|
|
try {
|
|
property = binding4[6];
|
|
} catch (error) {
|
|
break exceptionLanding86;
|
|
}
|
|
try {
|
|
value17 = binding(property);
|
|
} catch (error) {
|
|
break exceptionLanding86;
|
|
}
|
|
try {
|
|
dispatch = value17.dispatch;
|
|
} catch (error) {
|
|
break exceptionLanding86;
|
|
}
|
|
try {
|
|
object = {};
|
|
} catch (error) {
|
|
break exceptionLanding86;
|
|
}
|
|
try {
|
|
object.type = 'ACTIVE_PROMOTIONS_FETCH_SUCCESS';
|
|
} catch (error) {
|
|
break exceptionLanding86;
|
|
}
|
|
try {
|
|
body = value8.body;
|
|
} catch (error) {
|
|
break exceptionLanding86;
|
|
}
|
|
try {
|
|
object.promotions = body;
|
|
} catch (error) {
|
|
break exceptionLanding86;
|
|
}
|
|
try {
|
|
object.consumedInboundPromotionId = r6;
|
|
} catch (error) {
|
|
break exceptionLanding86;
|
|
}
|
|
try {
|
|
Reflect.apply(dispatch, value17, [object]);
|
|
} catch (error) {
|
|
break exceptionLanding86;
|
|
}
|
|
return value;
|
|
}
|
|
|
|
}
|
|
|
|
function dismissOutboundPromotionNotice() { // fn#58814, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7467:1019, offset: 0x016d7812, size: 140 bytes, params: 1, frame: 17
|
|
var PreloadedUserSettingsActionCreators;
|
|
(Dispatcher).dispatch({type: 'OUTBOUND_PROMOTION_NOTICE_DISMISS'});
|
|
if (PromotionsStore.lastDismissedOutboundPromotionStartDate != null) {
|
|
PreloadedUserSettingsActionCreators = (require(1362) /* metro dependency 1362: UserSettingsProtoActionCreators */).PreloadedUserSettingsActionCreators;
|
|
PreloadedUserSettingsActionCreators.updateAsync('userContent', _fun58815,
|
|
(require(1362) /* metro dependency 1362: UserSettingsProtoActionCreators */).UserSettingsDelay.INFREQUENT_USER_ACTION);
|
|
}
|
|
function _fun58815(a0) { // fn#58815, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7467:1251, offset: 0x016d789e, size: 65 bytes, params: 2, frame: 13
|
|
const value = environment.__proto__;
|
|
const StringValue = (WrappersModule).StringValue;
|
|
a0.lastDismissedOutboundPromotionStartDate = StringValue.create({value: lastDismissedOutboundPromotionStartDate});
|
|
}
|
|
|
|
}
|
|
|
|
function _fetchActiveBogoPromotion() { // fn#58817, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7467:1480, offset: 0x016d78df, size: 48 bytes, params: 1, frame: 14
|
|
return Module00005(_fun58819).apply(this, arguments);
|
|
function* _fun58819() { // fn#58819, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7467:1553, offset: 0x016d7918, size: 283 bytes, params: 1, frame: 17
|
|
var isFetchingActiveBogoPromotion;
|
|
var binding;
|
|
var binding2;
|
|
var property;
|
|
var value3;
|
|
var dispatch;
|
|
var object;
|
|
var value4;
|
|
var HTTP;
|
|
var get;
|
|
var BOGO_PROMOTIONS;
|
|
var object2;
|
|
var locale;
|
|
var value5;
|
|
var value6;
|
|
var value7;
|
|
var body;
|
|
var binding3;
|
|
var value8;
|
|
var createFromServer;
|
|
var fromServer;
|
|
var error;
|
|
let value = undefined;
|
|
if (false) {
|
|
return value;
|
|
}
|
|
reduciblePort50: while (true) {
|
|
exceptionLanding49: while (true) {
|
|
value = environment.__proto__.__proto__;
|
|
isFetchingActiveBogoPromotion = env2_6.isFetchingActiveBogoPromotion;
|
|
if (isFetchingActiveBogoPromotion) {
|
|
break reduciblePort50;
|
|
}
|
|
try {
|
|
binding = env2_1;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
binding2 = env2_2;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
property = binding2[6];
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
value3 = binding(property);
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
dispatch = value3.dispatch;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
object = {};
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
object.type = 'ACTIVE_BOGO_PROMOTION_FETCH';
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
Reflect.apply(dispatch, value3, [object]);
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
binding = env2_0;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
property = binding2[8];
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
value4 = binding(property);
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
HTTP = value4.HTTP;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
get = HTTP.get;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
object = {};
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
binding = env2_8;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
BOGO_PROMOTIONS = binding.BOGO_PROMOTIONS;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
object.url = BOGO_PROMOTIONS;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
object2 = {};
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
binding = env2_4;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
locale = binding.locale;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
object2.locale = locale;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
object.query = object2;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
object.rejectWithError = true;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
value5 = Reflect.apply(get, HTTP, [object]);
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
yield value5;
|
|
try {
|
|
value6 = undefined;
|
|
value7 = false;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
if (value7) {
|
|
return value6;
|
|
}
|
|
try {
|
|
body = value6.body;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
binding = env2_1;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
binding3 = env2_2;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
property = binding3[6];
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
value8 = binding(property);
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
dispatch = value8.dispatch;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
object = {};
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
object.type = 'ACTIVE_BOGO_PROMOTION_FETCH_SUCCESS';
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
binding = env2_5;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
createFromServer = binding.createFromServer;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
fromServer = Reflect.apply(createFromServer, binding, [body]);
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
object.activePromotion = fromServer;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
Reflect.apply(dispatch, value8, [object]);
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
break reduciblePort50;
|
|
}
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
dispatch = value.dispatch;
|
|
Reflect.apply(dispatch, value, [{type: 'ACTIVE_BOGO_PROMOTION_FETCH_FAIL'}]);
|
|
break reduciblePort50;
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
function _fetchClaimedOutboundPromotionCodes() { // fn#58821, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7467:2072, offset: 0x016d7a33, size: 48 bytes, params: 1, frame: 14
|
|
return Module00005(_fun58823).apply(this, arguments);
|
|
function* _fun58823() { // fn#58823, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7467:2165, offset: 0x016d7a6c, size: 257 bytes, params: 1, frame: 17
|
|
var binding;
|
|
var binding2;
|
|
var property;
|
|
var value3;
|
|
var HTTP;
|
|
var get;
|
|
var object;
|
|
var CLAIMED_OUTBOUND_PROMOTION_CODES;
|
|
var object2;
|
|
var locale;
|
|
var value4;
|
|
var value5;
|
|
var value6;
|
|
var body;
|
|
var map;
|
|
var binding3;
|
|
var value7;
|
|
var claimedOutboundPromotionCodeFromServer;
|
|
var value8;
|
|
var value9;
|
|
var dispatch;
|
|
var error;
|
|
if (true) {
|
|
value = environment.__proto__.__proto__;
|
|
try {
|
|
binding = env2_0;
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'CLAIMED_OUTBOUND_PROMOTION_CODES_FETCH_FAIL'});
|
|
return undefined;
|
|
}
|
|
try {
|
|
binding2 = env2_2;
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'CLAIMED_OUTBOUND_PROMOTION_CODES_FETCH_FAIL'});
|
|
return undefined;
|
|
}
|
|
try {
|
|
property = binding2[8];
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'CLAIMED_OUTBOUND_PROMOTION_CODES_FETCH_FAIL'});
|
|
return undefined;
|
|
}
|
|
try {
|
|
value3 = binding(property);
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'CLAIMED_OUTBOUND_PROMOTION_CODES_FETCH_FAIL'});
|
|
return undefined;
|
|
}
|
|
try {
|
|
HTTP = value3.HTTP;
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'CLAIMED_OUTBOUND_PROMOTION_CODES_FETCH_FAIL'});
|
|
return undefined;
|
|
}
|
|
try {
|
|
get = HTTP.get;
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'CLAIMED_OUTBOUND_PROMOTION_CODES_FETCH_FAIL'});
|
|
return undefined;
|
|
}
|
|
try {
|
|
object = {};
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'CLAIMED_OUTBOUND_PROMOTION_CODES_FETCH_FAIL'});
|
|
return undefined;
|
|
}
|
|
try {
|
|
binding = env2_8;
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'CLAIMED_OUTBOUND_PROMOTION_CODES_FETCH_FAIL'});
|
|
return undefined;
|
|
}
|
|
try {
|
|
CLAIMED_OUTBOUND_PROMOTION_CODES = binding.CLAIMED_OUTBOUND_PROMOTION_CODES;
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'CLAIMED_OUTBOUND_PROMOTION_CODES_FETCH_FAIL'});
|
|
return undefined;
|
|
}
|
|
try {
|
|
object.url = CLAIMED_OUTBOUND_PROMOTION_CODES;
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'CLAIMED_OUTBOUND_PROMOTION_CODES_FETCH_FAIL'});
|
|
return undefined;
|
|
}
|
|
try {
|
|
object2 = {};
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'CLAIMED_OUTBOUND_PROMOTION_CODES_FETCH_FAIL'});
|
|
return undefined;
|
|
}
|
|
try {
|
|
binding = env2_4;
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'CLAIMED_OUTBOUND_PROMOTION_CODES_FETCH_FAIL'});
|
|
return undefined;
|
|
}
|
|
try {
|
|
locale = binding.locale;
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'CLAIMED_OUTBOUND_PROMOTION_CODES_FETCH_FAIL'});
|
|
return undefined;
|
|
}
|
|
try {
|
|
object2.locale = locale;
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'CLAIMED_OUTBOUND_PROMOTION_CODES_FETCH_FAIL'});
|
|
return undefined;
|
|
}
|
|
try {
|
|
object.query = object2;
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'CLAIMED_OUTBOUND_PROMOTION_CODES_FETCH_FAIL'});
|
|
return undefined;
|
|
}
|
|
try {
|
|
object.oldFormErrors = true;
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'CLAIMED_OUTBOUND_PROMOTION_CODES_FETCH_FAIL'});
|
|
return undefined;
|
|
}
|
|
try {
|
|
object.rejectWithError = false;
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'CLAIMED_OUTBOUND_PROMOTION_CODES_FETCH_FAIL'});
|
|
return undefined;
|
|
}
|
|
try {
|
|
value4 = Reflect.apply(get, HTTP, [object]);
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'CLAIMED_OUTBOUND_PROMOTION_CODES_FETCH_FAIL'});
|
|
return undefined;
|
|
}
|
|
yield value4;
|
|
try {
|
|
value5 = undefined;
|
|
value6 = false;
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'CLAIMED_OUTBOUND_PROMOTION_CODES_FETCH_FAIL'});
|
|
return undefined;
|
|
}
|
|
if (value6) {
|
|
return value5;
|
|
}
|
|
try {
|
|
body = value5.body;
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'CLAIMED_OUTBOUND_PROMOTION_CODES_FETCH_FAIL'});
|
|
return undefined;
|
|
}
|
|
try {
|
|
map = body.map;
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'CLAIMED_OUTBOUND_PROMOTION_CODES_FETCH_FAIL'});
|
|
return undefined;
|
|
}
|
|
try {
|
|
binding = env2_0;
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'CLAIMED_OUTBOUND_PROMOTION_CODES_FETCH_FAIL'});
|
|
return undefined;
|
|
}
|
|
try {
|
|
binding3 = env2_2;
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'CLAIMED_OUTBOUND_PROMOTION_CODES_FETCH_FAIL'});
|
|
return undefined;
|
|
}
|
|
try {
|
|
property = binding3[12];
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'CLAIMED_OUTBOUND_PROMOTION_CODES_FETCH_FAIL'});
|
|
return undefined;
|
|
}
|
|
try {
|
|
value7 = binding(property);
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'CLAIMED_OUTBOUND_PROMOTION_CODES_FETCH_FAIL'});
|
|
return undefined;
|
|
}
|
|
try {
|
|
claimedOutboundPromotionCodeFromServer = value7.claimedOutboundPromotionCodeFromServer;
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'CLAIMED_OUTBOUND_PROMOTION_CODES_FETCH_FAIL'});
|
|
return undefined;
|
|
}
|
|
try {
|
|
value8 = Reflect.apply(map, body, [claimedOutboundPromotionCodeFromServer]);
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'CLAIMED_OUTBOUND_PROMOTION_CODES_FETCH_FAIL'});
|
|
return undefined;
|
|
}
|
|
try {
|
|
binding = env2_1;
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'CLAIMED_OUTBOUND_PROMOTION_CODES_FETCH_FAIL'});
|
|
return undefined;
|
|
}
|
|
try {
|
|
property = binding3[6];
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'CLAIMED_OUTBOUND_PROMOTION_CODES_FETCH_FAIL'});
|
|
return undefined;
|
|
}
|
|
try {
|
|
value9 = binding(property);
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'CLAIMED_OUTBOUND_PROMOTION_CODES_FETCH_FAIL'});
|
|
return undefined;
|
|
}
|
|
try {
|
|
dispatch = value9.dispatch;
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'CLAIMED_OUTBOUND_PROMOTION_CODES_FETCH_FAIL'});
|
|
return undefined;
|
|
}
|
|
try {
|
|
object = {};
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'CLAIMED_OUTBOUND_PROMOTION_CODES_FETCH_FAIL'});
|
|
return undefined;
|
|
}
|
|
try {
|
|
object.type = 'CLAIMED_OUTBOUND_PROMOTION_CODES_FETCH_SUCCESS';
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'CLAIMED_OUTBOUND_PROMOTION_CODES_FETCH_FAIL'});
|
|
return undefined;
|
|
}
|
|
try {
|
|
object.claimedOutboundPromotionCodes = value8;
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'CLAIMED_OUTBOUND_PROMOTION_CODES_FETCH_FAIL'});
|
|
return undefined;
|
|
}
|
|
try {
|
|
Reflect.apply(dispatch, value9, [object]);
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'CLAIMED_OUTBOUND_PROMOTION_CODES_FETCH_FAIL'});
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
function addClaimedOutboundPromotionCode(a0) { // fn#58824, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7467:2585, offset: 0x016d7b6d, size: 57 bytes, params: 2, frame: 13
|
|
(Dispatcher).dispatch({type: 'CLAIMED_OUTBOUND_PROMOTION_CODE_ADD',
|
|
claimedOutboundPromotionCode: a0});
|
|
}
|
|
|
|
function markOutboundPromotionsSeen() { // fn#58825, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7467:2970, offset: 0x016d7ba6, size: 49 bytes, params: 1, frame: 13
|
|
(Dispatcher).dispatch({type: 'OUTBOUND_PROMOTIONS_SEEN'});
|
|
}
|
|
|
|
function maybeFetchActivePromotions() { // fn#58826, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7467:3234, offset: 0x016d7bd7, size: 64 bytes, params: 1, frame: 13
|
|
const value = a0;
|
|
if (!(PromotionsStore.isFetchingActivePromotions || (!(value !== undefined) || value) && PromotionsStore.lastFetchedActivePromotions != null)) {
|
|
fetchActivePromotions();
|
|
}
|
|
}
|
|
|
|
function clearActivePromotions() { // fn#58827, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7467:3395, offset: 0x016d7c17, size: 49 bytes, params: 1, frame: 13
|
|
(Dispatcher).dispatch({type: 'ACTIVE_PROMOTIONS_CLEAR'});
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun58808, 7289, [5, 1949, 7262, 7261, 1880, 661, 694, 7290, 507, 5182, 1362, 1345, 7286,
|
|
2]) /* metro module 7289, dependencies: [5, 1949, 7262, 7261, 1880, 661, 694, 7290, 507, 5182, 1362, 1345, 7286, 2] */;
|