87 lines
4.5 KiB
TypeScript
87 lines
4.5 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] */
|
|
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});
|
|
const env0_3 = importDefault(7) /* metro dependency 7 */;
|
|
const env0_4 = importDefault(6) /* metro dependency 6 */;
|
|
const env0_5 = importDefault(15) /* metro dependency 15 */;
|
|
const env0_6 = importDefault(17) /* metro dependency 17 */;
|
|
const env0_7 = importDefault(18) /* metro dependency 18 */;
|
|
const subscriptionStore = importDefault(3808) /* metro dependency 3808: SubscriptionStore */;
|
|
const userOfferStore = importDefault(7064) /* metro dependency 7064: UserOfferStore */;
|
|
let value = importDefault(4860) /* metro dependency 4860: AutomaticLifecycleManager */;
|
|
value = _fun124974(value);
|
|
value = new value();
|
|
(require(2) /* metro dependency 2 */).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 = (require(671) /* metro dependency 671: MessageTypes */).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 closure = ReferralMessageManager;
|
|
env0_7(closure, a0);
|
|
return env0_3(closure);
|
|
}
|
|
|
|
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));
|
|
(importDefault(15767) /* metro dependency 15767: setupLoadFromMessageManagerHandlers */)(value6,
|
|
handleReferralMessages);
|
|
return value6;
|
|
}
|
|
|