119 lines
6.0 KiB
TypeScript
119 lines
6.0 KiB
TypeScript
/* Metro module 8253; source: records/GuildBoostSlotRecord.tsx; dependencies: [6, 7, 15, 17, 18, 1886, 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 Record from '../lib/Record.tsx'; /* Metro dependency 1886 */
|
|
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
|
|
function _fun66001(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66001, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8438:6, offset: 0x01be8be7, size: 198 bytes, params: 8, frame: 18
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = Record;
|
|
value = _fun66005(value);
|
|
(FileImportTrackerModule).fileFinishedImporting('records/GuildBoostSlotRecord.tsx');
|
|
exports.default = value;
|
|
function _isNativeReflectConstruct_66002() { // fn#66002, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8438:148, offset: 0x01be8cad, 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_66002_isNativeReflectConstruct = function() {
|
|
return !!result;
|
|
})();
|
|
}
|
|
|
|
function _fun66005(a0) { // fn#66005, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8438:347, offset: 0x01be8d0f, size: 127 bytes, params: 2, frame: 17
|
|
const GuildBoostSlotRecord2 = GuildBoostSlotRecord;
|
|
Inherits(GuildBoostSlotRecord2, a0);
|
|
return CreateClass(GuildBoostSlotRecord2, [{key: 'isOnCooldown', value: function() {
|
|
var r0;
|
|
var Date;
|
|
var cooldownEndsAt;
|
|
var value2;
|
|
var value = this.cooldownEndsAt != null;
|
|
if (value) {
|
|
Date = global.Date;
|
|
cooldownEndsAt = this.cooldownEndsAt;
|
|
value2 = new Date();
|
|
value2 = value2.getTime();
|
|
Date = global.Date;
|
|
value2 = value2 >= Date.now();
|
|
r0 = value2;
|
|
} else {
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
}}, {key: 'isAvailable', value: function() {
|
|
return this.premiumGuildSubscription == null && !this.isOnCooldown();
|
|
}}], [{key: 'createFromServer', value: value_66009}]);
|
|
function GuildBoostSlotRecord({id, subscriptionId, premiumGuildSubscription, canceled, cooldownEndsAt, subscription}) { // fn#66006, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8438:359, offset: 0x01be8d8e, size: 182 bytes, params: 2, frame: 20
|
|
let value = environment.__proto__;
|
|
env1_0(this, GuildBoostSlotRecord);
|
|
const value3 = env1_3(GuildBoostSlotRecord);
|
|
value = env1_2(this, _isNativeReflectConstruct_66002() ? global.Reflect.construct(value3, [],
|
|
env1_3(this).constructor) : value3.apply(this, undefined));
|
|
value.id = id;
|
|
value.subscriptionId = subscriptionId;
|
|
value.premiumGuildSubscription = premiumGuildSubscription;
|
|
value.canceled = canceled;
|
|
value.cooldownEndsAt = cooldownEndsAt;
|
|
value.subscription = subscription;
|
|
return value;
|
|
}
|
|
|
|
function value_66009(a0, a1) { // fn#66009, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8438:1098, offset: 0x01be8eb8, size: 144 bytes, params: 3, frame: 14
|
|
var r3;
|
|
var object;
|
|
const object2 = {};
|
|
object2.id = a0.id;
|
|
object2.subscriptionId = a0.subscription_id;
|
|
let premium_guild_subscription = a0.premium_guild_subscription;
|
|
let value = null;
|
|
if (value != premium_guild_subscription) {
|
|
object = {};
|
|
premium_guild_subscription = a0.premium_guild_subscription;
|
|
object.id = premium_guild_subscription.id;
|
|
premium_guild_subscription = a0.premium_guild_subscription;
|
|
object.guildId = premium_guild_subscription.guild_id;
|
|
r3 = object;
|
|
} else {
|
|
r3 = value;
|
|
}
|
|
object2.premiumGuildSubscription = r3;
|
|
object2.canceled = a0.canceled;
|
|
object2.cooldownEndsAt = a0.cooldown_ends_at;
|
|
object2.subscription = a1;
|
|
value = Object.create(GuildBoostSlotRecord.prototype, {constructor: {value: GuildBoostSlotRecord}});
|
|
const guildBoostSlotRecord = new GuildBoostSlotRecord(object2);
|
|
return guildBoostSlotRecord instanceof Object ? guildBoostSlotRecord : value;
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun66001, 8253, [6, 7, 15, 17, 18, 1886,
|
|
2]) /* metro module 8253, dependencies: [6, 7, 15, 17, 18, 1886, 2] */;
|