94 lines
5.6 KiB
TypeScript
94 lines
5.6 KiB
TypeScript
/* Metro module 16166; source: modules/premium/native/referrals/ReferralMessageManager.tsx; dependencies: [7, 6, 15, 17, 18, 3808, 7064, 671, 21, 7507, 15767, 4860, 2] */
|
|
import ClassCallCheck from '../../../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
|
|
import CreateClass from '../../../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
|
|
import PossibleConstructorReturn from '../../../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
|
|
import Module00017 from '../../../../by-id/module-00017.js'; /* Metro dependency 17 */
|
|
import Inherits from '../../../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
|
|
import SubscriptionStore from '../../../../stores/billing/SubscriptionStore.tsx'; /* Metro dependency 3808 */
|
|
import AutomaticLifecycleManager from '../../../../lib/AutomaticLifecycleManager.tsx'; /* Metro dependency 4860 */
|
|
import UserOfferStore from '../../../../stores/billing/UserOfferStore.tsx'; /* Metro dependency 7064 */
|
|
import SetupLoadFromMessageManagerHandlers from '../../../messages/setupLoadFromMessageManagerHandlers.tsx'; /* Metro dependency 15767 */
|
|
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as MessageTypesModule from '../../../../external/discord_common/js/shared/shared-constants/MessageTypes.tsx'; /* Metro dependency 671 */
|
|
|
|
function _fun124969(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#124969, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16374:6, offset: 0x025c9049, size: 273 bytes, params: 8, frame: 19
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = AutomaticLifecycleManager;
|
|
value = _fun124974(value);
|
|
value = new value();
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/premium/native/referrals/ReferralMessageManager.tsx');
|
|
exports.default = value;
|
|
function _isNativeReflectConstruct_124970() { // fn#124970, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16374:168, offset: 0x025c915a, size: 98 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_124970_isNativeReflectConstruct = function() {
|
|
return !!result;
|
|
})();
|
|
}
|
|
|
|
function handleReferralMessages(a0) { // fn#124973, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16374:361, offset: 0x025c91bc, size: 221 bytes, params: 2, frame: 16
|
|
var defaultImport;
|
|
var premiumTypeSubscription;
|
|
var defaultImport2;
|
|
const type = a0.type;
|
|
const MessageTypes = (MessageTypesModule).MessageTypes;
|
|
const PREMIUM_REFERRAL = MessageTypes.PREMIUM_REFERRAL;
|
|
if (type === PREMIUM_REFERRAL) {
|
|
if (a0.content != null) {
|
|
defaultImport = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
|
if (defaultImport.isProbablyAValidSnowflake(a0.content)) {
|
|
premiumTypeSubscription = SubscriptionStore.getPremiumTypeSubscription();
|
|
defaultImport2 = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
|
if (premiumTypeSubscription == null && UserOfferStore.shouldFetchReferralOffer(defaultImport2.extractTimestamp(a0.content))) {
|
|
(require(7507) /* metro dependency 7507: UserOfferActionCreators */).fetchUserOffer('ReferralMessageManager');
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
function _fun124974(a0) { // fn#124974, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16374:689, offset: 0x025c9299, size: 42 bytes, params: 2, frame: 14
|
|
const ReferralMessageManager2 = ReferralMessageManager;
|
|
Inherits(ReferralMessageManager2, a0);
|
|
return CreateClass(ReferralMessageManager2);
|
|
function ReferralMessageManager() { // fn#124975, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16374:701, offset: 0x025c92c3, size: 138 bytes, params: 1, frame: 20
|
|
env1_4(this, ReferralMessageManager);
|
|
const value3 = env1_6(ReferralMessageManager);
|
|
const value6 = env1_5(this, _isNativeReflectConstruct_124970() ? global.Reflect.construct(value3, [],
|
|
env1_6(this).constructor) : value3.apply(this, undefined));
|
|
(SetupLoadFromMessageManagerHandlers)(value6,
|
|
handleReferralMessages);
|
|
return value6;
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun124969, 16166, [7, 6, 15, 17, 18, 3808, 7064, 671, 21, 7507, 15767, 4860,
|
|
2]) /* metro module 16166, dependencies: [7, 6, 15, 17, 18, 3808, 7064, 671, 21, 7507, 15767, 4860, 2] */;
|