This commit is contained in:
janisslsm committed 2026-07-28 01:06:53 +03:00
1 parent af3b49f756
commit 1781d25a15
22448 files changed
+2731829 -2650550

No files matched your search

File diff suppressed because it is too large. Load diff
+80 -75
View File
@@ -1,87 +1,92 @@
/* Metro module 8252; source: records/AppliedGuildBoostRecord.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 _fun65994(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#65994, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8437:6, offset: 0x01be8900, size: 198 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(6) /* metro dependency 6 */;
const env0_1 = importDefault(7) /* metro dependency 7 */;
const env0_2 = importDefault(15) /* metro dependency 15 */;
const env0_3 = importDefault(17) /* metro dependency 17 */;
const env0_4 = importDefault(18) /* metro dependency 18 */;
let value = importDefault(1886) /* metro dependency 1886: Record */;
let value = Record;
value = _fun65998(value);
(require(2) /* metro dependency 2 */).fileFinishedImporting('records/AppliedGuildBoostRecord.tsx');
(FileImportTrackerModule).fileFinishedImporting('records/AppliedGuildBoostRecord.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_65995() { // fn#65995, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8437:148, offset: 0x01be89c6, 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) {
function _isNativeReflectConstruct_65995() { // fn#65995, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8437:148, offset: 0x01be89c6, 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_65995_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_65995_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun65998(a0) { // fn#65998, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8437:347, offset: 0x01be8a28, size: 75 bytes, params: 2, frame: 16
const closure = AppliedGuildBoostRecord;
env0_4(closure, a0);
return env0_1(closure, null, [{key: 'createFromServer', value: value_66000}]);
}
function _fun65998(a0) { // fn#65998, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8437:347, offset: 0x01be8a28, size: 75 bytes, params: 2, frame: 16
const AppliedGuildBoostRecord2 = AppliedGuildBoostRecord;
Inherits(AppliedGuildBoostRecord2, a0);
return CreateClass(AppliedGuildBoostRecord2, null, [{key: 'createFromServer', value: value_66000}]);
function AppliedGuildBoostRecord(a0) { // fn#65999, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8437:359, offset: 0x01be8a73, size: 194 bytes, params: 2, frame: 20
let value = environment.__proto__;
env1_0(this, AppliedGuildBoostRecord);
const value3 = env1_3(AppliedGuildBoostRecord);
value = env1_2(this, _isNativeReflectConstruct_65995() ? global.Reflect.construct(value3, [],
env1_3(this).constructor) : value3.apply(this, undefined));
value.id = a0.id;
value.guildId = a0.guildId;
const userId = a0.userId;
value.userId = userId;
const user = a0.user;
value.user = user;
value.ended = a0.ended;
let endsAt = a0.endsAt;
const value4 = null;
endsAt = value4 != endsAt ? a0.endsAt : value4;
value.endsAt = endsAt;
return value;
}
function AppliedGuildBoostRecord(a0) { // fn#65999, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8437:359, offset: 0x01be8a73, size: 194 bytes, params: 2, frame: 20
let value = environment.__proto__;
env1_0(this, AppliedGuildBoostRecord);
const value3 = env1_3(AppliedGuildBoostRecord);
value = env1_2(this, _isNativeReflectConstruct_65995() ? global.Reflect.construct(value3, [],
env1_3(this).constructor) : value3.apply(this, undefined));
value.id = a0.id;
value.guildId = a0.guildId;
const userId = a0.userId;
value.userId = userId;
const user = a0.user;
value.user = user;
value.ended = a0.ended;
let endsAt = a0.endsAt;
const value4 = null;
endsAt = value4 != endsAt ? a0.endsAt : value4;
value.endsAt = endsAt;
return value;
}
function value_66000(a0) { // fn#66000, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8437:820, offset: 0x01be8b35, size: 178 bytes, params: 2, frame: 15
var value;
const object = {};
object.id = a0.id;
object.guildId = a0.guild_id;
let user = a0.user;
object.userId = user != null ? a0.user.id : a0.user_id;
user = a0.user;
object.user = user;
object.ended = a0.ended;
object.endsAt = value != a0.ends_at ? a0.ends_at === '' ? value : new global.Date(a0.ends_at) : value;
value = Object.create(AppliedGuildBoostRecord.prototype, {constructor: {value: AppliedGuildBoostRecord}});
const appliedGuildBoostRecord = new AppliedGuildBoostRecord(object);
return appliedGuildBoostRecord instanceof Object ? appliedGuildBoostRecord : value;
}
}
function value_66000(a0) { // fn#66000, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8437:820, offset: 0x01be8b35, size: 178 bytes, params: 2, frame: 15
var value;
const object2 = {};
object2.id = a0.id;
object2.guildId = a0.guild_id;
let user = a0.user;
object2.userId = user != null ? a0.user.id : a0.user_id;
user = a0.user;
object2.user = user;
object2.ended = a0.ended;
object2.endsAt = value != a0.ends_at ? a0.ends_at === '' ? value : new global.Date(a0.ends_at) : value;
value = Object.create(AppliedGuildBoostRecord.prototype, {constructor: {value: AppliedGuildBoostRecord}});
const appliedGuildBoostRecord = new AppliedGuildBoostRecord(object2);
return appliedGuildBoostRecord instanceof Object ? appliedGuildBoostRecord : value;
}
global.__d(_fun65994, 8252, [6, 7, 15, 17, 18, 1886,
2]) /* metro module 8252, dependencies: [6, 7, 15, 17, 18, 1886, 2] */;
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
+62 -51
View File
@@ -1,62 +1,73 @@
/* Metro module 4236; source: records/CompanyRecord.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 _fun35034(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#35034, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4407:6, offset: 0x010695c2, size: 194 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(6) /* metro dependency 6 */;
const env0_1 = importDefault(7) /* metro dependency 7 */;
const env0_2 = importDefault(15) /* metro dependency 15 */;
const env0_3 = importDefault(17) /* metro dependency 17 */;
const env0_4 = importDefault(18) /* metro dependency 18 */;
let value = importDefault(1886) /* metro dependency 1886: Record */;
let value = Record;
value = _fun35038(value);
(require(2) /* metro dependency 2 */).fileFinishedImporting('records/CompanyRecord.tsx');
(FileImportTrackerModule).fileFinishedImporting('records/CompanyRecord.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_35035() { // fn#35035, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4407:148, offset: 0x01069684, 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) {
function _isNativeReflectConstruct_35035() { // fn#35035, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4407:148, offset: 0x01069684, 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_35035_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_35035_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun35038(a0) { // fn#35038, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4407:347, offset: 0x010696e2, size: 71 bytes, params: 2, frame: 16
const closure = CompanyRecord;
env0_4(closure, a0);
return env0_1(closure, null, [{key: 'createFromServer', value: value_35040}]);
}
function _fun35038(a0) { // fn#35038, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4407:347, offset: 0x010696e2, size: 71 bytes, params: 2, frame: 16
const CompanyRecord2 = CompanyRecord;
Inherits(CompanyRecord2, a0);
return CreateClass(CompanyRecord2, null, [{key: 'createFromServer', value: value_35040}]);
function CompanyRecord({id, name}) { // fn#35039, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4407:359, offset: 0x01069729, size: 133 bytes, params: 2, frame: 20
let value = environment.__proto__;
env1_0(this, CompanyRecord);
const value3 = env1_3(CompanyRecord);
value = env1_2(this, _isNativeReflectConstruct_35035() ? global.Reflect.construct(value3, [],
env1_3(this).constructor) : value3.apply(this, undefined));
value.id = id;
value.name = name;
return value;
}
function value_35040(a0) { // fn#35040, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4407:678, offset: 0x00edd39f, size: 32 bytes, params: 2, frame: 11
const value = Object.create(CompanyRecord.prototype, {constructor: {value: CompanyRecord}});
const companyRecord = new CompanyRecord(a0);
return companyRecord instanceof Object ? companyRecord : value;
}
}
function CompanyRecord({id, name}) { // fn#35039, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4407:359, offset: 0x01069729, size: 133 bytes, params: 2, frame: 20
let value = environment.__proto__;
env1_0(this, CompanyRecord);
const value3 = env1_3(CompanyRecord);
value = env1_2(this, _isNativeReflectConstruct_35035() ? global.Reflect.construct(value3, [],
env1_3(this).constructor) : value3.apply(this, undefined));
value.id = id;
value.name = name;
return value;
}
global.__d(_fun35034, 4236, [6, 7, 15, 17, 18, 1886,
2]) /* metro module 4236, dependencies: [6, 7, 15, 17, 18, 1886, 2] */;
+78 -73
View File
@@ -1,84 +1,89 @@
/* Metro module 5041; source: records/ConnectedAccountRecord.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 _fun43637(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#43637, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5219:6, offset: 0x01157b78, size: 194 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(6) /* metro dependency 6 */;
const env0_1 = importDefault(7) /* metro dependency 7 */;
const env0_2 = importDefault(15) /* metro dependency 15 */;
const env0_3 = importDefault(17) /* metro dependency 17 */;
const env0_4 = importDefault(18) /* metro dependency 18 */;
let value = importDefault(1886) /* metro dependency 1886: Record */;
let value = Record;
value = _fun43641(value);
(require(2) /* metro dependency 2 */).fileFinishedImporting('records/ConnectedAccountRecord.tsx');
(FileImportTrackerModule).fileFinishedImporting('records/ConnectedAccountRecord.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_43638() { // fn#43638, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5219:148, offset: 0x01157c3a, 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) {
function _isNativeReflectConstruct_43638() { // fn#43638, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5219:148, offset: 0x01157c3a, 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_43638_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_43638_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun43641(a0) { // fn#43641, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5219:347, offset: 0x01157c98, size: 68 bytes, params: 2, frame: 15
const closure = ConnectedAccountRecord;
env0_4(closure, a0);
return env0_1(closure, [{key: 'toString', value: function() {
return this.name;
}}]);
}
function _fun43641(a0) { // fn#43641, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5219:347, offset: 0x01157c98, size: 68 bytes, params: 2, frame: 15
const ConnectedAccountRecord2 = ConnectedAccountRecord;
Inherits(ConnectedAccountRecord2, a0);
return CreateClass(ConnectedAccountRecord2, [{key: 'toString', value: function() {
return this.name;
}}]);
function ConnectedAccountRecord({id, type, name, revoked, integrations, visibility, friend_sync, show_activity, verified, access_token, two_way_link, metadata, metadata_visibility}) { // fn#43642, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5219:359, offset: 0x01157cdc, size: 318 bytes, params: 2, frame: 20
let value = environment.__proto__;
env1_0(this, ConnectedAccountRecord);
const value3 = env1_3(ConnectedAccountRecord);
value = env1_2(this, _isNativeReflectConstruct_43638() ? global.Reflect.construct(value3, [],
env1_3(this).constructor) : value3.apply(this, undefined));
value.id = id;
value.type = type;
value.name = name;
revoked = !!revoked && revoked;
value.revoked = revoked;
value.integrations = integrations || [];
visibility = !visibility ? 0 : visibility;
value.visibility = visibility;
friend_sync = !!friend_sync && friend_sync;
value.friendSync = friend_sync;
show_activity = !!show_activity && show_activity;
value.showActivity = show_activity;
verified = !!verified && verified;
value.verified = verified;
access_token = !access_token ? null : access_token;
value.accessToken = access_token;
two_way_link = !!two_way_link && two_way_link;
value.twoWayLink = two_way_link;
metadata = !metadata ? null : metadata;
value.metadata = metadata;
metadata_visibility = !metadata_visibility ? 0 : metadata_visibility;
value.metadataVisibility = metadata_visibility;
return value;
}
}
function ConnectedAccountRecord({id, type, name, revoked, integrations, visibility, friend_sync, show_activity, verified, access_token, two_way_link, metadata, metadata_visibility}) { // fn#43642, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5219:359, offset: 0x01157cdc, size: 318 bytes, params: 2, frame: 20
let value = environment.__proto__;
env1_0(this, ConnectedAccountRecord);
const value3 = env1_3(ConnectedAccountRecord);
value = env1_2(this, _isNativeReflectConstruct_43638() ? global.Reflect.construct(value3, [],
env1_3(this).constructor) : value3.apply(this, undefined));
value.id = id;
value.type = type;
value.name = name;
revoked = !!revoked && revoked;
value.revoked = revoked;
value.integrations = integrations || [];
visibility = !visibility ? 0 : visibility;
value.visibility = visibility;
friend_sync = !!friend_sync && friend_sync;
value.friendSync = friend_sync;
show_activity = !!show_activity && show_activity;
value.showActivity = show_activity;
verified = !!verified && verified;
value.verified = verified;
access_token = !access_token ? null : access_token;
value.accessToken = access_token;
two_way_link = !!two_way_link && two_way_link;
value.twoWayLink = two_way_link;
metadata = !metadata ? null : metadata;
value.metadata = metadata;
metadata_visibility = !metadata_visibility ? 0 : metadata_visibility;
value.metadataVisibility = metadata_visibility;
return value;
}
global.__d(_fun43637, 5041, [6, 7, 15, 17, 18, 1886,
2]) /* metro module 5041, dependencies: [6, 7, 15, 17, 18, 1886, 2] */;
+64 -59
View File
@@ -1,70 +1,75 @@
/* Metro module 15905; source: records/EmojiRecord.tsx; dependencies: [7, 6, 15, 17, 18, 1886, 1885, 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 UserRecord from './UserRecord.tsx'; /* Metro dependency 1885 */
import Record from '../lib/Record.tsx'; /* Metro dependency 1886 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun122727(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#122727, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16113:6, offset: 0x025723dd, size: 214 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(7) /* metro dependency 7 */;
const env0_1 = importDefault(6) /* metro dependency 6 */;
const env0_2 = importDefault(15) /* metro dependency 15 */;
const env0_3 = importDefault(17) /* metro dependency 17 */;
const env0_4 = importDefault(18) /* metro dependency 18 */;
let value = importDefault(1886) /* metro dependency 1886: Record */;
const userRecord = importDefault(1885) /* metro dependency 1885: UserRecord */;
let value = Record;
value = _fun122731(value);
(require(2) /* metro dependency 2 */).fileFinishedImporting('records/EmojiRecord.tsx');
(FileImportTrackerModule).fileFinishedImporting('records/EmojiRecord.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_122728() { // fn#122728, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16113:168, offset: 0x025724b3, 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) {
function _isNativeReflectConstruct_122728() { // fn#122728, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16113:168, offset: 0x025724b3, 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_122728_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_122728_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun122731(a0) { // fn#122731, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16113:367, offset: 0x02572515, size: 42 bytes, params: 2, frame: 14
const closure = EmojiRecord;
env0_4(closure, a0);
return env0_0(closure);
}
function _fun122731(a0) { // fn#122731, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16113:367, offset: 0x02572515, size: 42 bytes, params: 2, frame: 14
const EmojiRecord2 = EmojiRecord;
Inherits(EmojiRecord2, a0);
return CreateClass(EmojiRecord2);
function EmojiRecord({id, name, managed, roles, requiredColons, user, animated, available}) { // fn#122732, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16113:379, offset: 0x0257253f, size: 228 bytes, params: 2, frame: 21
const value = environment.__proto__;
env1_1(this, EmojiRecord);
const value3 = env1_3(EmojiRecord);
const value6 = env1_2(this, _isNativeReflectConstruct_122728() ? global.Reflect.construct(value3, [],
env1_3(this).constructor) : value3.apply(this, undefined));
value6.id = id;
value6.name = name;
value6.managed = managed;
value6.roles = roles;
value6.requiredColons = requiredColons;
const userRecord2 = new UserRecord(user);
value6.user = userRecord2;
value6.animated = animated;
value6.available = available;
return value6;
}
}
function EmojiRecord({id, name, managed, roles, requiredColons, user, animated, available}) { // fn#122732, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16113:379, offset: 0x0257253f, size: 228 bytes, params: 2, frame: 21
const value = environment.__proto__;
env1_1(this, EmojiRecord);
const value3 = env1_3(EmojiRecord);
const value6 = env1_2(this, _isNativeReflectConstruct_122728() ? global.Reflect.construct(value3, [],
env1_3(this).constructor) : value3.apply(this, undefined));
value6.id = id;
value6.name = name;
value6.managed = managed;
value6.roles = roles;
value6.requiredColons = requiredColons;
const userRecord = new UserRecord(user);
value6.user = userRecord;
value6.animated = animated;
value6.available = available;
return value6;
}
global.__d(_fun122727, 15905, [7, 6, 15, 17, 18, 1886, 1885,
2]) /* metro module 15905, dependencies: [7, 6, 15, 17, 18, 1886, 1885, 2] */;
+353 -348
View File
@@ -1,202 +1,156 @@
/* Metro module 4272; source: records/EntitlementRecord.tsx; dependencies: [6, 7, 15, 17, 18, 1886, 4273, 1885, 661, 3802, 4277, 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 UserRecord from './UserRecord.tsx'; /* Metro dependency 1885 */
import Record from '../lib/Record.tsx'; /* Metro dependency 1886 */
import SKURecord from '../modules/skus/SKURecord.tsx'; /* Metro dependency 4273 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */
function _fun36216(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#36216, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4444:6, offset: 0x010854fa, size: 260 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
let value = importDefault(1886) /* metro dependency 1886: Record */;
const skuRecord = importDefault(4273) /* metro dependency 4273: SKURecord */;
const userRecord = importDefault(1885) /* metro dependency 1885: UserRecord */;
const env0_10 = (require(661) /* metro dependency 661: Constants */).EntitlementTypes;
let value = Record;
value = _fun36220(value);
(require(2) /* metro dependency 2 */).fileFinishedImporting('records/EntitlementRecord.tsx');
(FileImportTrackerModule).fileFinishedImporting('records/EntitlementRecord.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_36217() { // fn#36217, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4444:205, offset: 0x010855fe, 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_36217_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun36220(a0) { // fn#36220, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4444:404, offset: 0x0108565c, size: 144 bytes, params: 2, frame: 17
const closure = EntitlementRecord;
env0_7(closure, a0);
return env0_4(closure, [{key: 'isGiftable', get: get_36222}, {key: 'isValid', value: value_36223},
{key: 'isFulfilled', value: function() {
return this.fulfillmentStatus === require(dependencyMap[10]).EntitlementTenantFulfillmentStatus.FULFILLED;
}}], [{key: 'createFromServer', value: value_36225}]);
}
function EntitlementRecord({id, skuId, applicationId, user, userId, gifterId, type, branches, startsAt, endsAt, subscriptionId, subscriptionPlanId, parentId, consumed, giftCodeBatchId, giftStyle, guildId, deleted, sourceType, fulfillmentStatus}) { // fn#36221, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4444:416, offset: 0x010856ec, size: 344 bytes, params: 2, frame: 20
let value = environment.__proto__;
env1_3(this, EntitlementRecord);
const value3 = env1_6(EntitlementRecord);
value = env1_5(this, _isNativeReflectConstruct_36217() ? global.Reflect.construct(value3, [],
env1_6(this).constructor) : value3.apply(this, undefined));
value.id = id;
value.skuId = skuId;
value.applicationId = applicationId;
value.user = user;
value.userId = userId;
value.gifterId = gifterId;
value.type = type;
value.branches = branches;
value.startsAt = startsAt;
value.endsAt = endsAt;
value.subscriptionId = subscriptionId;
value.subscriptionPlanId = subscriptionPlanId;
value.parentId = parentId;
value.consumed = consumed;
value.giftCodeBatchId = giftCodeBatchId;
value.giftStyle = giftStyle;
value.guildId = guildId;
value.deleted = deleted;
value.sourceType = sourceType;
value.fulfillmentStatus = fulfillmentStatus;
return value;
}
function get_36222() { // fn#36222, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4444:1192, offset: 0x01085844, size: 42 bytes, params: 1, frame: 3
const type = this.type;
const value = environment.__proto__;
const USER_GIFT = EntitlementTypes.USER_GIFT;
return type === USER_GIFT && this.gifterId == null;
}
function value_36223(a0, a1) { // fn#36223, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4444:1278, offset: 0x0108586e, size: 283 bytes, params: 3, frame: 15
var date;
var startsAt;
var endsAt;
var branches;
let value = a2;
const r1 = value !== undefined ? value : null;
if (!this.isGiftable) {
if (this.deleted) {
return false;
function _isNativeReflectConstruct_36217() { // fn#36217, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4444:205, offset: 0x010855fe, 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) {
}
var type = this.type;
value = environment.__proto__;
var PREMIUM_SUBSCRIPTION = EntitlementTypes.PREMIUM_SUBSCRIPTION;
if (type !== PREMIUM_SUBSCRIPTION) {
date = new global.Date();
startsAt = this.startsAt;
if (startsAt == null) {
endsAt = this.endsAt;
if (endsAt == null) {
if (r1 == null) {
return true;
}
branches = this.branches;
if (branches.length === 0) {
if (this.applicationId !== r1) {
return (_isNativeReflectConstruct_36217_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun36220(a0) { // fn#36220, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4444:404, offset: 0x0108565c, size: 144 bytes, params: 2, frame: 17
const EntitlementRecord2 = EntitlementRecord;
Inherits(EntitlementRecord2, a0);
return CreateClass(EntitlementRecord2, [{key: 'isGiftable', get: get_36222}, {key: 'isValid', value: value_36223},
{key: 'isFulfilled', value: function() {
return this.fulfillmentStatus === require(dependencyMap[10]).EntitlementTenantFulfillmentStatus.FULFILLED;
}}], [{key: 'createFromServer', value: value_36225}]);
function EntitlementRecord({id, skuId, applicationId, user, userId, gifterId, type, branches, startsAt, endsAt, subscriptionId, subscriptionPlanId, parentId, consumed, giftCodeBatchId, giftStyle, guildId, deleted, sourceType, fulfillmentStatus}) { // fn#36221, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4444:416, offset: 0x010856ec, size: 344 bytes, params: 2, frame: 20
let value = environment.__proto__;
env1_3(this, EntitlementRecord);
const value3 = env1_6(EntitlementRecord);
value = env1_5(this, _isNativeReflectConstruct_36217() ? global.Reflect.construct(value3, [],
env1_6(this).constructor) : value3.apply(this, undefined));
value.id = id;
value.skuId = skuId;
value.applicationId = applicationId;
value.user = user;
value.userId = userId;
value.gifterId = gifterId;
value.type = type;
value.branches = branches;
value.startsAt = startsAt;
value.endsAt = endsAt;
value.subscriptionId = subscriptionId;
value.subscriptionPlanId = subscriptionPlanId;
value.parentId = parentId;
value.consumed = consumed;
value.giftCodeBatchId = giftCodeBatchId;
value.giftStyle = giftStyle;
value.guildId = guildId;
value.deleted = deleted;
value.sourceType = sourceType;
value.fulfillmentStatus = fulfillmentStatus;
return value;
}
function get_36222() { // fn#36222, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4444:1192, offset: 0x01085844, size: 42 bytes, params: 1, frame: 3
const type = this.type;
const value = environment.__proto__;
const USER_GIFT = EntitlementTypes.USER_GIFT;
return type === USER_GIFT && this.gifterId == null;
}
function value_36223(a0, a1) { // fn#36223, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4444:1278, offset: 0x0108586e, size: 283 bytes, params: 3, frame: 15
var date;
var startsAt;
var endsAt;
var branches;
let value = a2;
const r1 = value !== undefined ? value : null;
if (!this.isGiftable) {
if (this.deleted) {
return false;
}
var type = this.type;
value = environment.__proto__;
var PREMIUM_SUBSCRIPTION = EntitlementTypes.PREMIUM_SUBSCRIPTION;
if (type !== PREMIUM_SUBSCRIPTION) {
date = new global.Date();
startsAt = this.startsAt;
if (startsAt == null) {
endsAt = this.endsAt;
if (endsAt == null) {
if (r1 == null) {
return true;
}
branches = this.branches;
if (branches.length === 0) {
if (this.applicationId !== r1) {
return false;
}
return true;
}
branches = this.branches;
if (branches.includes(r1)) {
return true;
}
return false;
}
return true;
}
branches = this.branches;
if (branches.includes(r1)) {
return true;
}
return false;
}
endsAt = this.endsAt;
if (date >= endsAt) {
return false;
}
if (r1 == null) {
return true;
}
branches = this.branches;
if (branches.length === 0) {
if (this.applicationId !== r1) {
endsAt = this.endsAt;
if (date >= endsAt) {
return false;
}
if (r1 == null) {
return true;
}
branches = this.branches;
if (branches.length === 0) {
if (this.applicationId !== r1) {
return false;
}
return true;
}
branches = this.branches;
if (branches.includes(r1)) {
return true;
}
return false;
}
return true;
}
branches = this.branches;
if (branches.includes(r1)) {
return true;
}
return false;
}
startsAt = this.startsAt;
if (date < startsAt) {
return false;
}
endsAt = this.endsAt;
if (endsAt == null) {
if (r1 == null) {
return true;
}
branches = this.branches;
if (branches.length === 0) {
if (this.applicationId !== r1) {
startsAt = this.startsAt;
if (date < startsAt) {
return false;
}
return true;
}
branches = this.branches;
if (branches.includes(r1)) {
return true;
}
return false;
}
endsAt = this.endsAt;
if (date >= endsAt) {
return false;
}
if (r1 == null) {
return true;
}
branches = this.branches;
if (branches.length === 0) {
if (this.applicationId !== r1) {
return false;
}
return true;
}
branches = this.branches;
if (branches.includes(r1)) {
return true;
}
return false;
}
var value2 = a1.get(this.skuId);
if (value2 == null) {
value = importDefault(3802) /* metro dependency 3802: PremiumUtils */;
if (value.canInstallPremiumApplications(a0)) {
date = new global.Date();
startsAt = this.startsAt;
if (startsAt == null) {
endsAt = this.endsAt;
if (endsAt == null) {
if (r1 == null) {
@@ -235,58 +189,77 @@ function value_36223(a0, a1) { // fn#36223, source: /ci/build/discord/discord/di
}
return false;
}
startsAt = this.startsAt;
if (date < startsAt) {
return false;
}
endsAt = this.endsAt;
if (endsAt == null) {
if (r1 == null) {
return true;
}
branches = this.branches;
if (branches.length === 0) {
if (this.applicationId !== r1) {
var value2 = a1.get(this.skuId);
if (value2 == null) {
value = importDefault(3802) /* metro dependency 3802: PremiumUtils */;
if (value.canInstallPremiumApplications(a0)) {
date = new global.Date();
startsAt = this.startsAt;
if (startsAt == null) {
endsAt = this.endsAt;
if (endsAt == null) {
if (r1 == null) {
return true;
}
branches = this.branches;
if (branches.length === 0) {
if (this.applicationId !== r1) {
return false;
}
return true;
}
branches = this.branches;
if (branches.includes(r1)) {
return true;
}
return false;
}
endsAt = this.endsAt;
if (date >= endsAt) {
return false;
}
if (r1 == null) {
return true;
}
branches = this.branches;
if (branches.length === 0) {
if (this.applicationId !== r1) {
return false;
}
return true;
}
branches = this.branches;
if (branches.includes(r1)) {
return true;
}
return false;
}
startsAt = this.startsAt;
if (date < startsAt) {
return false;
}
endsAt = this.endsAt;
if (endsAt == null) {
if (r1 == null) {
return true;
}
branches = this.branches;
if (branches.length === 0) {
if (this.applicationId !== r1) {
return false;
}
return true;
}
branches = this.branches;
if (branches.includes(r1)) {
return true;
}
return false;
}
endsAt = this.endsAt;
if (date >= endsAt) {
return false;
}
return true;
}
branches = this.branches;
if (branches.includes(r1)) {
return true;
}
return false;
}
endsAt = this.endsAt;
if (date >= endsAt) {
return false;
}
if (r1 == null) {
return true;
}
branches = this.branches;
if (branches.length === 0) {
if (this.applicationId !== r1) {
return false;
}
return true;
}
branches = this.branches;
if (branches.includes(r1)) {
return true;
}
return false;
}
return false;
}
if (value2.premium) {
value = importDefault(3802) /* metro dependency 3802: PremiumUtils */;
if (value.canInstallPremiumApplications(a0)) {
date = new global.Date();
startsAt = this.startsAt;
if (startsAt == null) {
endsAt = this.endsAt;
if (endsAt == null) {
if (r1 == null) {
return true;
}
@@ -303,130 +276,162 @@ function value_36223(a0, a1) { // fn#36223, source: /ci/build/discord/discord/di
}
return false;
}
endsAt = this.endsAt;
if (date >= endsAt) {
return false;
}
if (r1 == null) {
return true;
}
branches = this.branches;
if (branches.length === 0) {
if (this.applicationId !== r1) {
return false;
}
if (value2.premium) {
value = importDefault(3802) /* metro dependency 3802: PremiumUtils */;
if (value.canInstallPremiumApplications(a0)) {
date = new global.Date();
startsAt = this.startsAt;
if (startsAt == null) {
endsAt = this.endsAt;
if (endsAt == null) {
if (r1 == null) {
return true;
}
branches = this.branches;
if (branches.length === 0) {
if (this.applicationId !== r1) {
return false;
}
return true;
}
branches = this.branches;
if (branches.includes(r1)) {
return true;
}
return false;
}
endsAt = this.endsAt;
if (date >= endsAt) {
return false;
}
if (r1 == null) {
return true;
}
branches = this.branches;
if (branches.length === 0) {
if (this.applicationId !== r1) {
return false;
}
return true;
}
branches = this.branches;
if (branches.includes(r1)) {
return true;
}
return false;
}
return true;
}
branches = this.branches;
if (branches.includes(r1)) {
return true;
}
return false;
}
startsAt = this.startsAt;
if (date < startsAt) {
return false;
}
endsAt = this.endsAt;
if (endsAt == null) {
if (r1 == null) {
return true;
}
branches = this.branches;
if (branches.length === 0) {
if (this.applicationId !== r1) {
startsAt = this.startsAt;
if (date < startsAt) {
return false;
}
return true;
}
branches = this.branches;
if (branches.includes(r1)) {
return true;
}
return false;
}
endsAt = this.endsAt;
if (date >= endsAt) {
return false;
}
if (r1 == null) {
return true;
}
branches = this.branches;
if (branches.length === 0) {
if (this.applicationId !== r1) {
endsAt = this.endsAt;
if (endsAt == null) {
if (r1 == null) {
return true;
}
branches = this.branches;
if (branches.length === 0) {
if (this.applicationId !== r1) {
return false;
}
return true;
}
branches = this.branches;
if (branches.includes(r1)) {
return true;
}
return false;
}
endsAt = this.endsAt;
if (date >= endsAt) {
return false;
}
if (r1 == null) {
return true;
}
branches = this.branches;
if (branches.length === 0) {
if (this.applicationId !== r1) {
return false;
}
return true;
}
branches = this.branches;
if (branches.includes(r1)) {
return true;
}
return false;
}
return true;
return false;
}
branches = this.branches;
if (branches.includes(r1)) {
return true;
}
return false;
}
return false;
}
function value_36225(a0) { // fn#36225, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4444:1886, offset: 0x010859bd, size: 519 bytes, params: 2, frame: 16
var r4;
var value2;
var userRecord2;
var date;
const object = {};
object.id = a0.id;
object.skuId = a0.sku_id;
object.applicationId = a0.application_id;
const user = a0.user;
let value = null;
if (value != user) {
value2 = environment.__proto__;
userRecord2 = new UserRecord(a0.user);
} else {
r4 = value;
}
object.user = r4;
const user_id = a0.user_id;
object.userId = user_id;
object.gifterId = a0.gifter_user_id;
object.type = a0.type;
const branches = a0.branches;
object.branches = value != branches ? branches : [];
if (value != a0.starts_at) {
date = new global.Date(a0.starts_at);
} else {
r4 = value;
}
object.startsAt = r4;
if (value != a0.ends_at) {
date = new global.Date(a0.ends_at);
} else {
r4 = value;
}
object.endsAt = r4;
object.subscriptionId = a0.subscription_id;
object.subscriptionPlanId = value != a0.subscription_plan ? a0.subscription_plan.id : value;
let parent_id = a0.parent_id;
parent_id = value != parent_id ? a0.parent_id : value;
object.parentId = parent_id;
let consumed = a0.consumed;
consumed = value != consumed ? a0.consumed : value;
object.consumed = consumed;
const gift_code_batch_id = a0.gift_code_batch_id;
object.giftCodeBatchId = value != gift_code_batch_id ? gift_code_batch_id : value;
object.giftStyle = a0.gift_style;
object.guildId = a0.guild_id;
object.deleted = a0.deleted;
object.sku = value != a0.sku ? SKURecord.createFromServer(a0.sku) : value;
const source_type = a0.source_type;
object.sourceType = value != source_type ? source_type : value;
const fulfillment_status = a0.fulfillment_status;
object.fulfillmentStatus = value != fulfillment_status ? fulfillment_status : value;
value = Object.create(EntitlementRecord.prototype, {constructor: {value: EntitlementRecord}});
const entitlementRecord = new EntitlementRecord(object);
return entitlementRecord instanceof Object ? entitlementRecord : value;
}
}
return false;
}
function value_36225(a0) { // fn#36225, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4444:1886, offset: 0x010859bd, size: 519 bytes, params: 2, frame: 16
var r4;
var value2;
var userRecord;
var date;
const object2 = {};
object2.id = a0.id;
object2.skuId = a0.sku_id;
object2.applicationId = a0.application_id;
const user = a0.user;
let value = null;
if (value != user) {
value2 = environment.__proto__;
userRecord = new UserRecord(a0.user);
} else {
r4 = value;
}
object2.user = r4;
const user_id = a0.user_id;
object2.userId = user_id;
object2.gifterId = a0.gifter_user_id;
object2.type = a0.type;
const branches = a0.branches;
object2.branches = value != branches ? branches : [];
if (value != a0.starts_at) {
date = new global.Date(a0.starts_at);
} else {
r4 = value;
}
object2.startsAt = r4;
if (value != a0.ends_at) {
date = new global.Date(a0.ends_at);
} else {
r4 = value;
}
object2.endsAt = r4;
object2.subscriptionId = a0.subscription_id;
object2.subscriptionPlanId = value != a0.subscription_plan ? a0.subscription_plan.id : value;
let parent_id = a0.parent_id;
parent_id = value != parent_id ? a0.parent_id : value;
object2.parentId = parent_id;
let consumed = a0.consumed;
consumed = value != consumed ? a0.consumed : value;
object2.consumed = consumed;
const gift_code_batch_id = a0.gift_code_batch_id;
object2.giftCodeBatchId = value != gift_code_batch_id ? gift_code_batch_id : value;
object2.giftStyle = a0.gift_style;
object2.guildId = a0.guild_id;
object2.deleted = a0.deleted;
object2.sku = value != a0.sku ? SKURecord.createFromServer(a0.sku) : value;
const source_type = a0.source_type;
object2.sourceType = value != source_type ? source_type : value;
const fulfillment_status = a0.fulfillment_status;
object2.fulfillmentStatus = value != fulfillment_status ? fulfillment_status : value;
value = Object.create(EntitlementRecord.prototype, {constructor: {value: EntitlementRecord}});
const entitlementRecord = new EntitlementRecord(object2);
return entitlementRecord instanceof Object ? entitlementRecord : value;
}
global.__d(_fun36216, 4272, [6, 7, 15, 17, 18, 1886, 4273, 1885, 661, 3802, 4277,
2]) /* metro module 4272, dependencies: [6, 7, 15, 17, 18, 1886, 4273, 1885, 661, 3802, 4277, 2] */;
+176 -170
View File
@@ -1,189 +1,195 @@
/* Metro module 7671; source: records/GiftCodeRecord.tsx; dependencies: [6, 7, 15, 17, 18, 1886, 7262, 3803, 1880, 3738, 1391, 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 SubscriptionPlanRecord from './SubscriptionPlanRecord.tsx'; /* Metro dependency 3803 */
import PromotionRecord from './PromotionRecord.tsx'; /* Metro dependency 7262 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as FlagUtilsModule from '../external/discord_common/js/shared/utils/FlagUtils.tsx'; /* Metro dependency 1391 */
import * as PremiumConstantsModule from '../modules/premium/PremiumConstants.tsx'; /* Metro dependency 1880 */
function _fun61286(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#61286, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7849:6, offset: 0x01b3a52b, size: 303 bytes, params: 8, frame: 20
const env0_0 = require;
let Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
let value = importDefault(1886) /* metro dependency 1886: Record */;
const promotionRecord = importDefault(7262) /* metro dependency 7262: PromotionRecord */;
const subscriptionPlanRecord = importDefault(3803) /* metro dependency 3803: SubscriptionPlanRecord */;
const env0_10 = (require(1880) /* metro dependency 1880: PremiumConstants */).PremiumSubscriptionSKUToPremiumType;
let value = Record;
Object = global.Object;
const value2 = Object.freeze({'PAYMENT_SOURCE_REQUIRED': 1, 'EXISTING_PREMIUM_SUBSCRIPTION_DISALLOWED': 2,
'NOT_SELF_REDEEMABLE': 4});
value = _fun61290(value);
(require(2) /* metro dependency 2 */).fileFinishedImporting('records/GiftCodeRecord.tsx');
(FileImportTrackerModule).fileFinishedImporting('records/GiftCodeRecord.tsx');
exports.default = value;
exports.GiftCodeFlags = value2;
}
function _isNativeReflectConstruct_61287() { // fn#61287, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7849:224, offset: 0x01b3a65a, 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) {
function _isNativeReflectConstruct_61287() { // fn#61287, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7849:224, offset: 0x01b3a65a, 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_61287_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_61287_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun61290(a0) { // fn#61290, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7849:533, offset: 0x01b3a6b8, size: 311 bytes, params: 2, frame: 17
const closure = GiftCodeRecord;
env0_7(closure, a0);
return env0_4(closure, [{key: 'isExpired', value: value_61292}, {key: 'hasMultipleCopies', get: function() {
return this.maxUses > 1;
}}, {key: 'isClaimed', get: function() {
var uses = this.uses;
return uses >= this.maxUses;
}}, {key: 'remainingUses', get: function() {
return this.maxUses - this.uses;
}}, {key: 'isSubscription', get: function() {
return this.subscriptionPlanId != null;
}}, {key: 'premiumSubscriptionType', get: function() {
var value = null;
return this.isSubscription && value != PremiumSubscriptionSKUToPremiumType[this.skuId] ? PremiumSubscriptionSKUToPremiumType[this.skuId] : value;
}}, {key: 'isSelfRedeemable', get: get_61298}, {key: 'isExistingPremiumSubscriptionDisallowed', get: get_61299},
{key: 'analyticsData', get: function() {
return {gift_code: this.code, gift_code_max_uses: this.maxUses};
}}, {key: 'toString', value: function() {
return this.code;
}}], [{key: 'createFromServer', value: value_61302}]);
}
function _fun61290(a0) { // fn#61290, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7849:533, offset: 0x01b3a6b8, size: 311 bytes, params: 2, frame: 17
const GiftCodeRecord2 = GiftCodeRecord;
Inherits(GiftCodeRecord2, a0);
return CreateClass(GiftCodeRecord2, [{key: 'isExpired', value: value_61292}, {key: 'hasMultipleCopies', get: function() {
return this.maxUses > 1;
}}, {key: 'isClaimed', get: function() {
var uses = this.uses;
return uses >= this.maxUses;
}}, {key: 'remainingUses', get: function() {
return this.maxUses - this.uses;
}}, {key: 'isSubscription', get: function() {
return this.subscriptionPlanId != null;
}}, {key: 'premiumSubscriptionType', get: function() {
var value = null;
return this.isSubscription && value != PremiumSubscriptionSKUToPremiumType[this.skuId] ? PremiumSubscriptionSKUToPremiumType[this.skuId] : value;
}}, {key: 'isSelfRedeemable', get: get_61298}, {key: 'isExistingPremiumSubscriptionDisallowed', get: get_61299},
{key: 'analyticsData', get: function() {
return {gift_code: this.code, gift_code_max_uses: this.maxUses};
}}, {key: 'toString', value: function() {
return this.code;
}}], [{key: 'createFromServer', value: value_61302}]);
function GiftCodeRecord({userId, code, skuId, applicationId, uses, maxUses, expiresAt, redeemed, storeListingId, subscriptionPlanId, subscriptionPlan, revoked, entitlementBranches, flags, subscriptionTrial, promotion, giftStyle}) { // fn#61291, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7849:545, offset: 0x01b3a7ef, size: 310 bytes, params: 2, frame: 20
let value = environment.__proto__;
env1_3(this, GiftCodeRecord);
const value3 = env1_6(GiftCodeRecord);
value = env1_5(this, _isNativeReflectConstruct_61287() ? global.Reflect.construct(value3, [],
env1_6(this).constructor) : value3.apply(this, undefined));
value.userId = userId;
value.code = code;
value.skuId = skuId;
value.applicationId = applicationId;
value.uses = uses;
value.maxUses = maxUses;
value.expiresAt = expiresAt;
value.redeemed = redeemed;
value.storeListingId = storeListingId;
value.subscriptionPlanId = subscriptionPlanId;
value.subscriptionPlan = subscriptionPlan;
value.revoked = revoked;
value.entitlementBranches = entitlementBranches;
value.flags = flags;
value.subscriptionTrial = subscriptionTrial;
value.promotion = promotion;
value.giftStyle = giftStyle;
return value;
}
function GiftCodeRecord({userId, code, skuId, applicationId, uses, maxUses, expiresAt, redeemed, storeListingId, subscriptionPlanId, subscriptionPlan, revoked, entitlementBranches, flags, subscriptionTrial, promotion, giftStyle}) { // fn#61291, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7849:545, offset: 0x01b3a7ef, size: 310 bytes, params: 2, frame: 20
let value = environment.__proto__;
env1_3(this, GiftCodeRecord);
const value3 = env1_6(GiftCodeRecord);
value = env1_5(this, _isNativeReflectConstruct_61287() ? global.Reflect.construct(value3, [],
env1_6(this).constructor) : value3.apply(this, undefined));
value.userId = userId;
value.code = code;
value.skuId = skuId;
value.applicationId = applicationId;
value.uses = uses;
value.maxUses = maxUses;
value.expiresAt = expiresAt;
value.redeemed = redeemed;
value.storeListingId = storeListingId;
value.subscriptionPlanId = subscriptionPlanId;
value.subscriptionPlan = subscriptionPlan;
value.revoked = revoked;
value.entitlementBranches = entitlementBranches;
value.flags = flags;
value.subscriptionTrial = subscriptionTrial;
value.promotion = promotion;
value.giftStyle = giftStyle;
return value;
}
function value_61292() { // fn#61292, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7849:1275, offset: 0x01b3a925, size: 60 bytes, params: 1, frame: 13
var r0;
const expiresAt = this.expiresAt;
let value = expiresAt != null;
if (value) {
value = environment.__proto__;
value = (importDefault(3738) /* metro dependency 3738 */)();
value = value.isAfter(expiresAt);
r0 = value;
} else {
r0 = value;
}
return r0;
}
function get_61298() { // fn#61298, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7849:1760, offset: 0x01b3a9dc, size: 60 bytes, params: 1, frame: 13
const hasFlag = FlagUtilsModule.hasFlag;
const flags = this.flags;
const NOT_SELF_REDEEMABLE = env1_11.NOT_SELF_REDEEMABLE;
return !Reflect.apply(hasFlag, FlagUtilsModule, [flags, NOT_SELF_REDEEMABLE]);
}
function get_61299() { // fn#61299, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7849:1882, offset: 0x01b3aa18, size: 57 bytes, params: 1, frame: 13
const hasFlag = FlagUtilsModule.hasFlag;
const flags = this.flags;
const EXISTING_PREMIUM_SUBSCRIPTION_DISALLOWED = env1_11.EXISTING_PREMIUM_SUBSCRIPTION_DISALLOWED;
return Reflect.apply(hasFlag, FlagUtilsModule, [flags, EXISTING_PREMIUM_SUBSCRIPTION_DISALLOWED]);
}
function value_61302(a0) { // fn#61302, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7849:2156, offset: 0x01b3aa77, size: 495 bytes, params: 2, frame: 16
var r4;
var r1;
var object;
var promotionRecordBinding;
const object2 = {};
const user = a0.user;
let value = null;
object2.userId = value != user ? a0.user.id : value;
object2.code = a0.code;
object2.skuId = a0.sku_id;
object2.applicationId = a0.application_id;
const uses = a0.uses;
object2.uses = uses;
object2.maxUses = a0.max_uses;
object2.storeListingId = value != a0.store_listing ? a0.store_listing.id : value;
object2.expiresAt = value != a0.expires_at ? (importDefault(3738) /* metro dependency 3738 */)(a0.expires_at) : value;
object2.redeemed = a0.redeemed;
object2.subscriptionPlanId = value != a0.subscription_plan ? a0.subscription_plan.id : a0.subscription_plan_id;
object2.subscriptionPlan = value != a0.subscription_plan ? SubscriptionPlanRecord.createFromServer(a0.subscription_plan) : value;
object2.revoked = false;
let entitlement_branches = a0.entitlement_branches;
entitlement_branches = value != entitlement_branches ? a0.entitlement_branches : value;
object2.entitlementBranches = entitlement_branches;
let flags = a0.flags;
flags = value != flags ? a0.flags : 0;
object2.flags = flags;
object2.giftStyle = a0.gift_style;
let subscription_trial = a0.subscription_trial;
if (value != subscription_trial) {
object = {};
subscription_trial = a0.subscription_trial;
object.id = subscription_trial.id;
subscription_trial = a0.subscription_trial;
object.interval = subscription_trial.interval;
subscription_trial = a0.subscription_trial;
object.intervalCount = subscription_trial.interval_count;
subscription_trial = a0.subscription_trial;
object.skuId = subscription_trial.sku_id;
r4 = object;
} else {
r4 = value;
}
object2.subscriptionTrial = r4;
if (value != a0.promotion) {
value = environment.__proto__;
promotionRecordBinding = PromotionRecord;
value = promotionRecordBinding.createFromServer(a0.promotion);
r1 = value;
} else {
r1 = value;
}
object2.promotion = r1;
value = Object.create(GiftCodeRecord.prototype, {constructor: {value: GiftCodeRecord}});
const giftCodeRecord = new GiftCodeRecord(object2);
return giftCodeRecord instanceof Object ? giftCodeRecord : value;
}
function value_61292() { // fn#61292, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7849:1275, offset: 0x01b3a925, size: 60 bytes, params: 1, frame: 13
var r0;
const expiresAt = this.expiresAt;
let value = expiresAt != null;
if (value) {
value = environment.__proto__;
value = (importDefault(3738) /* metro dependency 3738 */)();
value = value.isAfter(expiresAt);
r0 = value;
} else {
r0 = value;
}
return r0;
}
function get_61298() { // fn#61298, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7849:1760, offset: 0x01b3a9dc, size: 60 bytes, params: 1, frame: 13
const flagUtilsModule = require(1391) /* metro dependency 1391: FlagUtils */;
const hasFlag = flagUtilsModule.hasFlag;
const flags = this.flags;
const NOT_SELF_REDEEMABLE = env1_11.NOT_SELF_REDEEMABLE;
return !Reflect.apply(hasFlag, flagUtilsModule, [flags, NOT_SELF_REDEEMABLE]);
}
function get_61299() { // fn#61299, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7849:1882, offset: 0x01b3aa18, size: 57 bytes, params: 1, frame: 13
const flagUtilsModule = require(1391) /* metro dependency 1391: FlagUtils */;
const hasFlag = flagUtilsModule.hasFlag;
const flags = this.flags;
const EXISTING_PREMIUM_SUBSCRIPTION_DISALLOWED = env1_11.EXISTING_PREMIUM_SUBSCRIPTION_DISALLOWED;
return Reflect.apply(hasFlag, flagUtilsModule, [flags, EXISTING_PREMIUM_SUBSCRIPTION_DISALLOWED]);
}
function value_61302(a0) { // fn#61302, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7849:2156, offset: 0x01b3aa77, size: 495 bytes, params: 2, frame: 16
var r4;
var r1;
var object3;
const object4 = {};
const user = a0.user;
let value = null;
object4.userId = value != user ? a0.user.id : value;
object4.code = a0.code;
object4.skuId = a0.sku_id;
object4.applicationId = a0.application_id;
const uses = a0.uses;
object4.uses = uses;
object4.maxUses = a0.max_uses;
object4.storeListingId = value != a0.store_listing ? a0.store_listing.id : value;
object4.expiresAt = value != a0.expires_at ? (importDefault(3738) /* metro dependency 3738 */)(a0.expires_at) : value;
object4.redeemed = a0.redeemed;
object4.subscriptionPlanId = value != a0.subscription_plan ? a0.subscription_plan.id : a0.subscription_plan_id;
object4.subscriptionPlan = value != a0.subscription_plan ? SubscriptionPlanRecord.createFromServer(a0.subscription_plan) : value;
object4.revoked = false;
let entitlement_branches = a0.entitlement_branches;
entitlement_branches = value != entitlement_branches ? a0.entitlement_branches : value;
object4.entitlementBranches = entitlement_branches;
let flags = a0.flags;
flags = value != flags ? a0.flags : 0;
object4.flags = flags;
object4.giftStyle = a0.gift_style;
let subscription_trial = a0.subscription_trial;
if (value != subscription_trial) {
object3 = {};
subscription_trial = a0.subscription_trial;
object3.id = subscription_trial.id;
subscription_trial = a0.subscription_trial;
object3.interval = subscription_trial.interval;
subscription_trial = a0.subscription_trial;
object3.intervalCount = subscription_trial.interval_count;
subscription_trial = a0.subscription_trial;
object3.skuId = subscription_trial.sku_id;
r4 = object3;
} else {
r4 = value;
}
object4.subscriptionTrial = r4;
if (value != a0.promotion) {
value = environment.__proto__;
value = PromotionRecord.createFromServer(a0.promotion);
r1 = value;
} else {
r1 = value;
}
object4.promotion = r1;
value = Object.create(GiftCodeRecord.prototype, {constructor: {value: GiftCodeRecord}});
const giftCodeRecord = new GiftCodeRecord(object4);
return giftCodeRecord instanceof Object ? giftCodeRecord : value;
}
global.__d(_fun61286, 7671, [6, 7, 15, 17, 18, 1886, 7262, 3803, 1880, 3738, 1391,
2]) /* metro module 7671, dependencies: [6, 7, 15, 17, 18, 1886, 7262, 3803, 1880, 3738, 1391, 2] */;
+108 -103
View File
@@ -1,113 +1,118 @@
/* 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});
const env0_0 = importDefault(6) /* metro dependency 6 */;
const env0_1 = importDefault(7) /* metro dependency 7 */;
const env0_2 = importDefault(15) /* metro dependency 15 */;
const env0_3 = importDefault(17) /* metro dependency 17 */;
const env0_4 = importDefault(18) /* metro dependency 18 */;
let value = importDefault(1886) /* metro dependency 1886: Record */;
let value = Record;
value = _fun66005(value);
(require(2) /* metro dependency 2 */).fileFinishedImporting('records/GuildBoostSlotRecord.tsx');
(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 closure = GuildBoostSlotRecord;
env0_4(closure, a0);
return env0_1(closure, [{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;
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 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 object3;
const object4 = {};
object4.id = a0.id;
object4.subscriptionId = a0.subscription_id;
let premium_guild_subscription = a0.premium_guild_subscription;
let value = null;
if (value != premium_guild_subscription) {
object3 = {};
premium_guild_subscription = a0.premium_guild_subscription;
object3.id = premium_guild_subscription.id;
premium_guild_subscription = a0.premium_guild_subscription;
object3.guildId = premium_guild_subscription.guild_id;
r3 = object3;
} else {
r3 = value;
return (_isNativeReflectConstruct_66002_isNativeReflectConstruct = function() {
return !!result;
})();
}
object4.premiumGuildSubscription = r3;
object4.canceled = a0.canceled;
object4.cooldownEndsAt = a0.cooldown_ends_at;
object4.subscription = a1;
value = Object.create(GuildBoostSlotRecord.prototype, {constructor: {value: GuildBoostSlotRecord}});
const guildBoostSlotRecord = new GuildBoostSlotRecord(object4);
return guildBoostSlotRecord instanceof Object ? guildBoostSlotRecord : value;
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] */;
+109 -103
View File
@@ -1,6 +1,10 @@
/* Metro module 1422; source: records/GuildRecord.tsx; dependencies: [1419, 661, 1423, 1861, 21, 1865, 2] */
import SnowflakeUtils from '../utils/SnowflakeUtils.tsx'; /* Metro dependency 21 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as PlainRecordModule from '../lib/PlainRecord.tsx'; /* Metro dependency 1419 */
import * as StringUtilsModule from '../utils/StringUtils.tsx'; /* Metro dependency 1861 */
function _fun16591(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#16591, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1549:6, offset: 0x00e54685, size: 660 bytes, params: 8, frame: 28
var object2;
const env0_0 = require;
const closure = function(a0, a1) {
var value = a1;
@@ -8,7 +12,7 @@ function _fun16591(global, require, importDefault, importAll, module, exports, d
};
let Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = require(1419) /* metro dependency 1419: PlainRecord */;
let value = PlainRecordModule;
let set = value.set;
value.TypeTag;
value = require(661) /* metro dependency 661: Constants */;
@@ -24,57 +28,57 @@ function _fun16591(global, require, importDefault, importAll, module, exports, d
set = new Set([EXPLICIT, AGE_RESTRICTED]);
Object = global.Object;
const freeze = Object.freeze;
object2 = {'mfaLevel': null, 'preferredLocale': 'en-US', 'afkTimeout': 0};
object = {'mfaLevel': null, 'preferredLocale': 'en-US', 'afkTimeout': 0};
let NONE = MFALevels.NONE;
object2.mfaLevel = NONE;
object.mfaLevel = NONE;
const ALL_MESSAGES = UserNotificationSettings.ALL_MESSAGES;
object2.defaultMessageNotifications = ALL_MESSAGES;
object.defaultMessageNotifications = ALL_MESSAGES;
NONE = VerificationLevels.NONE;
object2.verificationLevel = NONE;
object.verificationLevel = NONE;
const DISABLED = GuildExplicitContentFilterTypes.DISABLED;
object2.explicitContentFilter = DISABLED;
object2.premiumProgressBarEnabled = false;
object2.premiumProgressBarEnabledUserUpdatedAt = null;
object2.systemChannelFlags = 0;
object2.maxStageVideoChannelUsers = -1;
object2.maxVideoChannelUsers = -1;
object2.maxMembers = -1;
object.explicitContentFilter = DISABLED;
object.premiumProgressBarEnabled = false;
object.premiumProgressBarEnabledUserUpdatedAt = null;
object.systemChannelFlags = 0;
object.maxStageVideoChannelUsers = -1;
object.maxVideoChannelUsers = -1;
object.maxMembers = -1;
NONE = BoostedGuildTiers.NONE;
object2.premiumTier = NONE;
object.premiumTier = NONE;
const DEFAULT = GuildNSFWContentLevel.DEFAULT;
object2.nsfwLevel = DEFAULT;
object2.premiumSubscriberCount = 0;
object.nsfwLevel = DEFAULT;
object.premiumSubscriberCount = 0;
Set = global.Set;
const value2 = Object.create(Set.prototype, {constructor: {value: Set}});
set = new Set();
object2.features = set instanceof Object ? set : value2;
object2.description = null;
object2.icon = null;
object2.ownerId = null;
object2.systemChannelId = null;
object2.joinedAt = null;
object2.discoverySplash = null;
object2.splash = null;
object2.banner = null;
object2.homeHeader = null;
object2.afkChannelId = null;
object2.application_id = null;
object2.vanityURLCode = null;
object2.rulesChannelId = null;
object2.safetyAlertsChannelId = null;
object2.publicUpdatesChannelId = null;
object2.ownerConfiguredContentLevel = null;
object2.hubType = null;
object2.latestOnboardingQuestionId = null;
object2.profile = null;
object2.guildTheme = null;
object2.premiumFeatures = null;
object2.moderatorReporting = null;
object2.verificationRoleId = null;
object2.gameApplicationIds = null;
object2.officialMessageColor = null;
const value4 = Reflect.apply(freeze, Object, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('records/GuildRecord.tsx');
object.features = set instanceof Object ? set : value2;
object.description = null;
object.icon = null;
object.ownerId = null;
object.systemChannelId = null;
object.joinedAt = null;
object.discoverySplash = null;
object.splash = null;
object.banner = null;
object.homeHeader = null;
object.afkChannelId = null;
object.application_id = null;
object.vanityURLCode = null;
object.rulesChannelId = null;
object.safetyAlertsChannelId = null;
object.publicUpdatesChannelId = null;
object.ownerConfiguredContentLevel = null;
object.hubType = null;
object.latestOnboardingQuestionId = null;
object.profile = null;
object.guildTheme = null;
object.premiumFeatures = null;
object.moderatorReporting = null;
object.verificationRoleId = null;
object.gameApplicationIds = null;
object.officialMessageColor = null;
const value4 = Reflect.apply(freeze, Object, [object]);
(FileImportTrackerModule).fileFinishedImporting('records/GuildRecord.tsx');
exports.GuildRecordTypeTag = 'Guild';
exports.RESTRICTED_CONTENT_LEVELS = set;
exports.GUILD_DEFAULT_PROPERTY_VALUES = value4;
@@ -103,65 +107,67 @@ function _fun16591(global, require, importDefault, importAll, module, exports, d
return set(a0, 'gameApplicationIds', a1);
};
exports.isGuildNSFW = isGuildNSFW;
}
function getGuildIconURL({id, icon}, a1) { // fn#16593, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1549:1497, offset: 0x00e5494a, size: 96 bytes, params: 3, frame: 15
const value = a2;
const value2 = a3;
return (importDefault(1423) /* metro dependency 1423: AvatarUtils */).getGuildIconURL({id: id, size: a1, icon: icon,
canAnimate: value !== undefined ? value : false, lossless: value2 !== undefined ? value2 : false});
}
function getGuildIconSource(a0, a1) { // fn#16594, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1549:1644, offset: 0x00e549aa, size: 69 bytes, params: 3, frame: 15
const value = a2;
const env0_0 = a0;
const env0_1 = a1;
return (importDefault(1423) /* metro dependency 1423: AvatarUtils */).getAnimatableSourceWithFallback(value !== undefined ? value : false,
_fun16595);
}
function getGuildAcronym({name}) { // fn#16596, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1549:1826, offset: 0x00e54a40, size: 46 bytes, params: 2, frame: 11
return (require(1861) /* metro dependency 1861: StringUtils */).getAcronym(name);
}
function isGuildOwnerWithRequiredMfaLevel(a0, a1) { // fn#16597, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1549:1952, offset: 0x00e54a6e, size: 64 bytes, params: 3, frame: 14
return !(!a1.mfaEnabled && a0.mfaLevel === MFALevels.ELEVATED) && isGuildOwner(a0, a1);
}
function getGuildEveryoneRoleId({id}) { // fn#16599, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1549:2159, offset: 0x00e54abf, size: 46 bytes, params: 2, frame: 11
return (importDefault(21) /* metro dependency 21: SnowflakeUtils */).castGuildIdAsEveryoneGuildRoleId(id);
}
function isGuildNSFW(a0) { // fn#16602, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1549:2464, offset: 0x00e54b52, size: 109 bytes, params: 2, frame: 15
var r1;
var r0;
var isServerNSFWLevelEnabled2;
var binding;
var has;
const value = a0 != null;
if (value) {
isServerNSFWLevelEnabled2 = (require(1865) /* metro dependency 1865: ServerNSFWLevelExperiment */).isServerNSFWLevelEnabled('guild_record');
binding = env0_6;
has = binding.has;
if (isServerNSFWLevelEnabled2) {
r1 = Reflect.apply(has, binding, [a0.nsfwLevel]);
} else {
r1 = a0.ownerConfiguredContentLevel ?? GuildNSFWContentLevel.DEFAULT;
r1 = Reflect.apply(has, binding, [r1]);
}
r0 = r1;
} else {
r0 = value;
function getGuildIconURL({id, icon}, a1) { // fn#16593, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1549:1497, offset: 0x00e5494a, size: 96 bytes, params: 3, frame: 15
const value = a2;
const value2 = a3;
return (importDefault(1423) /* metro dependency 1423: AvatarUtils */).getGuildIconURL({id: id, size: a1, icon: icon,
canAnimate: value !== undefined ? value : false, lossless: value2 !== undefined ? value2 : false});
}
return r0;
}
function _fun16595(a0) { // fn#16595, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1549:1732, offset: 0x00e549ef, size: 81 bytes, params: 2, frame: 14
let value = environment.__proto__;
value = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
const getGuildIconSource = value.getGuildIconSource;
const binding = env0_0;
return Reflect.apply(getGuildIconSource, value, [{id: binding.id, size: require, icon: binding.icon,
canAnimate: a0}]);
function getGuildIconSource(a0, a1) { // fn#16594, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1549:1644, offset: 0x00e549aa, size: 69 bytes, params: 3, frame: 15
const value = a2;
const env0_0 = a0;
const env0_1 = a1;
return (importDefault(1423) /* metro dependency 1423: AvatarUtils */).getAnimatableSourceWithFallback(value !== undefined ? value : false,
_fun16595);
function _fun16595(a0) { // fn#16595, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1549:1732, offset: 0x00e549ef, size: 81 bytes, params: 2, frame: 14
let value = environment.__proto__;
value = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
const getGuildIconSource = value.getGuildIconSource;
const binding = env0_0;
return Reflect.apply(getGuildIconSource, value, [{id: binding.id, size: require, icon: binding.icon,
canAnimate: a0}]);
}
}
function getGuildAcronym({name}) { // fn#16596, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1549:1826, offset: 0x00e54a40, size: 46 bytes, params: 2, frame: 11
return (StringUtilsModule).getAcronym(name);
}
function isGuildOwnerWithRequiredMfaLevel(a0, a1) { // fn#16597, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1549:1952, offset: 0x00e54a6e, size: 64 bytes, params: 3, frame: 14
return !(!a1.mfaEnabled && a0.mfaLevel === MFALevels.ELEVATED) && isGuildOwner(a0, a1);
}
function getGuildEveryoneRoleId({id}) { // fn#16599, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1549:2159, offset: 0x00e54abf, size: 46 bytes, params: 2, frame: 11
return (SnowflakeUtils).castGuildIdAsEveryoneGuildRoleId(id);
}
function isGuildNSFW(a0) { // fn#16602, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1549:2464, offset: 0x00e54b52, size: 109 bytes, params: 2, frame: 15
var r1;
var r0;
var isServerNSFWLevelEnabled2;
var binding;
var has;
const value = a0 != null;
if (value) {
isServerNSFWLevelEnabled2 = (require(1865) /* metro dependency 1865: ServerNSFWLevelExperiment */).isServerNSFWLevelEnabled('guild_record');
binding = env0_6;
has = binding.has;
if (isServerNSFWLevelEnabled2) {
r1 = Reflect.apply(has, binding, [a0.nsfwLevel]);
} else {
r1 = a0.ownerConfiguredContentLevel ?? GuildNSFWContentLevel.DEFAULT;
r1 = Reflect.apply(has, binding, [r1]);
}
r0 = r1;
} else {
r0 = value;
}
return r0;
}
}
global.__d(_fun16591, 1422, [1419, 661, 1423, 1861, 21, 1865,
2]) /* metro module 1422, dependencies: [1419, 661, 1423, 1861, 21, 1865, 2] */;
+15 -10
View File
@@ -1,23 +1,28 @@
/* Metro module 1939; source: records/GuildRoleRecord.tsx; dependencies: [1419, 483, 2] */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as BigFlagUtilsModule from '../external/discord_common/js/shared/utils/BigFlagUtils.tsx'; /* Metro dependency 483 */
import * as PlainRecordModule from '../lib/PlainRecord.tsx'; /* Metro dependency 1419 */
function _fun21551(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#21551, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2066:6, offset: 0x00ef3673, size: 145 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(1419) /* metro dependency 1419: PlainRecord */).TypeTag;
(require(2) /* metro dependency 2 */).fileFinishedImporting('records/GuildRoleRecord.tsx');
(PlainRecordModule).TypeTag;
(FileImportTrackerModule).fileFinishedImporting('records/GuildRoleRecord.tsx');
exports.GuildRoleRecordTypeTag = 'GuildRole';
exports.isEveryoneRole = function(a0) {
return a0.id === a0.guildId;
};
exports.hasPermission = hasPermission;
exports.hasAnyPermission = hasAnyPermission;
function hasPermission({permissions}, a1) { // fn#21553, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2066:291, offset: 0x00ef3717, size: 50 bytes, params: 3, frame: 13
return (BigFlagUtilsModule).has(permissions, a1);
}
function hasAnyPermission({permissions}, a1) { // fn#21554, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2066:375, offset: 0x00ef3749, size: 51 bytes, params: 3, frame: 13
return (BigFlagUtilsModule).hasAny(permissions, a1);
}
}
function hasPermission({permissions}, a1) { // fn#21553, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2066:291, offset: 0x00ef3717, size: 50 bytes, params: 3, frame: 13
return (require(483) /* metro dependency 483: BigFlagUtils */).has(permissions, a1);
}
function hasAnyPermission({permissions}, a1) { // fn#21554, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2066:375, offset: 0x00ef3749, size: 51 bytes, params: 3, frame: 13
return (require(483) /* metro dependency 483: BigFlagUtils */).hasAny(permissions, a1);
}
global.__d(_fun21551, 1939, [1419, 483, 2]) /* metro module 1939, dependencies: [1419, 483, 2] */;
+73 -67
View File
@@ -1,79 +1,85 @@
/* Metro module 4626; source: records/InteractionRecord.tsx; dependencies: [6, 7, 15, 17, 18, 1886, 1885, 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 UserRecord from './UserRecord.tsx'; /* Metro dependency 1885 */
import Record from '../lib/Record.tsx'; /* Metro dependency 1886 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun39793(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#39793, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4804:6, offset: 0x010eafd1, size: 210 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(6) /* metro dependency 6 */;
const env0_1 = importDefault(7) /* metro dependency 7 */;
const env0_2 = importDefault(15) /* metro dependency 15 */;
const env0_3 = importDefault(17) /* metro dependency 17 */;
const env0_4 = importDefault(18) /* metro dependency 18 */;
let value = importDefault(1886) /* metro dependency 1886: Record */;
const userRecord = importDefault(1885) /* metro dependency 1885: UserRecord */;
let value = Record;
value = _fun39797(value);
(require(2) /* metro dependency 2 */).fileFinishedImporting('records/InteractionRecord.tsx');
(FileImportTrackerModule).fileFinishedImporting('records/InteractionRecord.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_39794() { // fn#39794, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4804:168, offset: 0x010eb0a3, 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) {
function _isNativeReflectConstruct_39794() { // fn#39794, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4804:168, offset: 0x010eb0a3, 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_39794_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_39794_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun39797(a0) { // fn#39797, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4804:367, offset: 0x010eb101, size: 71 bytes, params: 2, frame: 16
const closure = InteractionRecord;
env0_4(closure, a0);
return env0_1(closure, null, [{key: 'createFromServer', value: value_39799}]);
}
function _fun39797(a0) { // fn#39797, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4804:367, offset: 0x010eb101, size: 71 bytes, params: 2, frame: 16
const InteractionRecord2 = InteractionRecord;
Inherits(InteractionRecord2, a0);
return CreateClass(InteractionRecord2, null, [{key: 'createFromServer', value: value_39799}]);
function InteractionRecord(a0) { // fn#39798, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4804:379, offset: 0x010eb148, size: 178 bytes, params: 2, frame: 20
let value = environment.__proto__;
env1_0(this, InteractionRecord);
const value3 = env1_3(InteractionRecord);
value = env1_2(this, _isNativeReflectConstruct_39794() ? global.Reflect.construct(value3, [],
env1_3(this).constructor) : value3.apply(this, undefined));
value.id = a0.id;
value.name = a0.name;
value.type = a0.type;
const user = a0.user;
value.user = user;
value.displayName = a0.name_localized ?? a0.name;
return value;
}
function InteractionRecord(a0) { // fn#39798, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4804:379, offset: 0x010eb148, size: 178 bytes, params: 2, frame: 20
let value = environment.__proto__;
env1_0(this, InteractionRecord);
const value3 = env1_3(InteractionRecord);
value = env1_2(this, _isNativeReflectConstruct_39794() ? global.Reflect.construct(value3, [],
env1_3(this).constructor) : value3.apply(this, undefined));
value.id = a0.id;
value.name = a0.name;
value.type = a0.type;
const user = a0.user;
value.user = user;
value.displayName = a0.name_localized ?? a0.name;
return value;
}
function value_39799(a0) { // fn#39799, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4804:798, offset: 0x010eb1fa, size: 88 bytes, params: 2, frame: 14
const object = {};
copyDataProperties(object, a0, undefined);
const value = environment.__proto__;
const userRecordBinding = UserRecord;
const user = a0.user;
let userRecord2 = new userRecordBinding(user);
object['user'] = userRecord2;
userRecord2 = Object.create(InteractionRecord.prototype, {constructor: {value: InteractionRecord}});
const interactionRecord = new InteractionRecord(object);
return interactionRecord instanceof Object ? interactionRecord : userRecord2;
}
}
function value_39799(a0) { // fn#39799, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4804:798, offset: 0x010eb1fa, size: 88 bytes, params: 2, frame: 14
const object2 = {};
copyDataProperties(object2, a0, undefined);
const value = environment.__proto__;
const user = a0.user;
let userRecord = new UserRecord(user);
object2['user'] = userRecord;
userRecord = Object.create(InteractionRecord.prototype, {constructor: {value: InteractionRecord}});
const interactionRecord = new InteractionRecord(object2);
return interactionRecord instanceof Object ? interactionRecord : userRecord;
}
global.__d(_fun39793, 4626, [6, 7, 15, 17, 18, 1886, 1885,
2]) /* metro module 4626, dependencies: [6, 7, 15, 17, 18, 1886, 1885, 2] */;
+143 -138
View File
@@ -1,151 +1,156 @@
/* Metro module 8150; source: records/InviteRecord.tsx; dependencies: [6, 7, 15, 17, 18, 1886, 3738, 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 _fun65348(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#65348, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8335:6, offset: 0x01bccb38, size: 202 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(6) /* metro dependency 6 */;
const env0_3 = importDefault(7) /* metro dependency 7 */;
const env0_4 = importDefault(15) /* metro dependency 15 */;
const env0_5 = importDefault(17) /* metro dependency 17 */;
const env0_6 = importDefault(18) /* metro dependency 18 */;
let value = importDefault(1886) /* metro dependency 1886: Record */;
let value = Record;
value = _fun65352(value);
(require(2) /* metro dependency 2 */).fileFinishedImporting('records/InviteRecord.tsx');
(FileImportTrackerModule).fileFinishedImporting('records/InviteRecord.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_65349() { // fn#65349, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8335:148, offset: 0x01bccc02, 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_65349_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun65352(a0) { // fn#65352, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8335:347, offset: 0x01bccc60, size: 142 bytes, params: 2, frame: 17
const closure = InviteRecord;
env0_6(closure, a0);
return env0_3(closure, [{key: 'isExpired', value: value_65354}, {key: 'getExpiresAt', value: value_65355},
{key: 'toString', value: function() {
return this.code;
}}], [{key: 'createFromServer', value: value_65357}]);
}
function InviteRecord({code, temporary, revoked, uses, maxUses, maxAge, createdAt, channel, guild, inviter, targetType, targetUser, targetApplication, type, flags, roles}) { // fn#65353, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8335:359, offset: 0x01bcccee, size: 398 bytes, params: 2, frame: 20
var r2;
var date;
let value = environment.__proto__;
env1_2(this, InviteRecord);
const value3 = env1_5(InviteRecord);
value = env1_4(this, _isNativeReflectConstruct_65349() ? global.Reflect.construct(value3, [],
env1_5(this).constructor) : value3.apply(this, undefined));
code = !code ? '' : code;
value.code = code;
temporary = !!temporary && temporary;
value.temporary = temporary;
revoked = !!revoked && revoked;
value.revoked = revoked;
uses = !uses ? 0 : uses;
value.uses = uses;
maxUses = !maxUses ? 0 : maxUses;
value.maxUses = maxUses;
maxAge = !maxAge ? 0 : maxAge;
value.maxAge = maxAge;
if (createdAt) {
r2 = createdAt;
} else {
date = new global.Date();
}
value.createdAt = r2;
value.channel = channel;
value.guild = guild;
inviter = !inviter ? null : inviter;
value.inviter = inviter;
targetType = !targetType ? null : targetType;
value.targetType = targetType;
targetUser = !targetUser ? null : targetUser;
value.targetUser = targetUser;
targetApplication = !targetApplication ? null : targetApplication;
value.targetApplication = targetApplication;
type = !type ? null : type;
value.type = type;
flags = !flags ? 0 : flags;
value.flags = flags;
value.roles = roles || [];
return value;
}
function value_65354() { // fn#65354, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8335:1033, offset: 0x01bcce7c, size: 105 bytes, params: 1, frame: 14
var value;
var isBefore;
var Date;
const maxAge = this.maxAge;
if (maxAge > 0) {
value = environment.__proto__;
value = importDefault(3738) /* metro dependency 3738 */;
value = value(this.createdAt);
value = value.add(maxAge, 'seconds');
isBefore = value.isBefore;
Date = global.Date;
if (Reflect.apply(isBefore, value, [Date.now()])) {
return true;
function _isNativeReflectConstruct_65349() { // fn#65349, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8335:148, offset: 0x01bccc02, 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_65349_isNativeReflectConstruct = function() {
return !!result;
})();
}
return false;
}
function value_65355() { // fn#65355, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8335:1178, offset: 0x01bccee5, size: 97 bytes, params: 1, frame: 14
var r0;
const maxAge = this.maxAge;
let value = Infinity;
if (maxAge > 0) {
value = environment.__proto__;
value = importDefault(3738) /* metro dependency 3738 */;
value = value(this.createdAt);
value = value.add(this.maxAge, 'seconds');
value = value.toDate();
r0 = value;
} else {
r0 = value;
function _fun65352(a0) { // fn#65352, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8335:347, offset: 0x01bccc60, size: 142 bytes, params: 2, frame: 17
const InviteRecord2 = InviteRecord;
Inherits(InviteRecord2, a0);
return CreateClass(InviteRecord2, [{key: 'isExpired', value: value_65354}, {key: 'getExpiresAt', value: value_65355},
{key: 'toString', value: function() {
return this.code;
}}], [{key: 'createFromServer', value: value_65357}]);
function InviteRecord({code, temporary, revoked, uses, maxUses, maxAge, createdAt, channel, guild, inviter, targetType, targetUser, targetApplication, type, flags, roles}) { // fn#65353, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8335:359, offset: 0x01bcccee, size: 398 bytes, params: 2, frame: 20
var r2;
var date;
let value = environment.__proto__;
env1_2(this, InviteRecord);
const value3 = env1_5(InviteRecord);
value = env1_4(this, _isNativeReflectConstruct_65349() ? global.Reflect.construct(value3, [],
env1_5(this).constructor) : value3.apply(this, undefined));
code = !code ? '' : code;
value.code = code;
temporary = !!temporary && temporary;
value.temporary = temporary;
revoked = !!revoked && revoked;
value.revoked = revoked;
uses = !uses ? 0 : uses;
value.uses = uses;
maxUses = !maxUses ? 0 : maxUses;
value.maxUses = maxUses;
maxAge = !maxAge ? 0 : maxAge;
value.maxAge = maxAge;
if (createdAt) {
r2 = createdAt;
} else {
date = new global.Date();
}
value.createdAt = r2;
value.channel = channel;
value.guild = guild;
inviter = !inviter ? null : inviter;
value.inviter = inviter;
targetType = !targetType ? null : targetType;
value.targetType = targetType;
targetUser = !targetUser ? null : targetUser;
value.targetUser = targetUser;
targetApplication = !targetApplication ? null : targetApplication;
value.targetApplication = targetApplication;
type = !type ? null : type;
value.type = type;
flags = !flags ? 0 : flags;
value.flags = flags;
value.roles = roles || [];
return value;
}
function value_65354() { // fn#65354, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8335:1033, offset: 0x01bcce7c, size: 105 bytes, params: 1, frame: 14
var value;
var isBefore;
var Date;
const maxAge = this.maxAge;
if (maxAge > 0) {
value = environment.__proto__;
value = importDefault(3738) /* metro dependency 3738 */;
value = value(this.createdAt);
value = value.add(maxAge, 'seconds');
isBefore = value.isBefore;
Date = global.Date;
if (Reflect.apply(isBefore, value, [Date.now()])) {
return true;
}
}
return false;
}
function value_65355() { // fn#65355, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8335:1178, offset: 0x01bccee5, size: 97 bytes, params: 1, frame: 14
var r0;
const maxAge = this.maxAge;
let value = Infinity;
if (maxAge > 0) {
value = environment.__proto__;
value = importDefault(3738) /* metro dependency 3738 */;
value = value(this.createdAt);
value = value.add(this.maxAge, 'seconds');
value = value.toDate();
r0 = value;
} else {
r0 = value;
}
return r0;
}
function value_65357(a0) { // fn#65357, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8335:1360, offset: 0x01bccf46, size: 181 bytes, params: 2, frame: 17
const object = {};
copyDataProperties(object, a0, undefined);
object['maxUses'] = a0.max_uses;
object['maxAge'] = a0.max_age;
let value = environment.__proto__;
value = undefined;
value = (importDefault(3738) /* metro dependency 3738 */)(a0.created_at ?? value);
object['createdAt'] = value;
object['targetType'] = a0.target_type;
object['targetUser'] = a0.target_user;
object['targetApplication'] = a0.target_application;
value = Object.create(InviteRecord.prototype, {constructor: {value: InviteRecord}});
const inviteRecord = new InviteRecord(object);
return inviteRecord instanceof Object ? inviteRecord : value;
}
}
return r0;
}
function value_65357(a0) { // fn#65357, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8335:1360, offset: 0x01bccf46, size: 181 bytes, params: 2, frame: 17
const object2 = {};
copyDataProperties(object2, a0, undefined);
object2['maxUses'] = a0.max_uses;
object2['maxAge'] = a0.max_age;
let value = environment.__proto__;
value = undefined;
value = (importDefault(3738) /* metro dependency 3738 */)(a0.created_at ?? value);
object2['createdAt'] = value;
object2['targetType'] = a0.target_type;
object2['targetUser'] = a0.target_user;
object2['targetApplication'] = a0.target_application;
value = Object.create(InviteRecord.prototype, {constructor: {value: InviteRecord}});
const inviteRecord = new InviteRecord(object2);
return inviteRecord instanceof Object ? inviteRecord : value;
}
global.__d(_fun65348, 8150, [6, 7, 15, 17, 18, 1886, 3738,
2]) /* metro module 8150, dependencies: [6, 7, 15, 17, 18, 1886, 3738, 2] */;
+235 -206
View File
@@ -1,229 +1,258 @@
/* Metro module 3811; source: records/InvoiceRecord.tsx; dependencies: [6, 7, 15, 17, 18, 1886, 3812, 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 _fun29475(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#29475, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3938:6, offset: 0x00fc2e62, size: 227 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(6) /* metro dependency 6 */;
const env0_3 = importDefault(7) /* metro dependency 7 */;
const env0_4 = importDefault(15) /* metro dependency 15 */;
const env0_5 = importDefault(17) /* metro dependency 17 */;
const env0_6 = importDefault(18) /* metro dependency 18 */;
let value = importDefault(1886) /* metro dependency 1886: Record */;
let value = Record;
value = _fun29480(value);
const value2 = _fun29489(value);
(require(2) /* metro dependency 2 */).fileFinishedImporting('records/InvoiceRecord.tsx');
(FileImportTrackerModule).fileFinishedImporting('records/InvoiceRecord.tsx');
exports.default = value2;
exports.BaseInvoiceRecord = value;
}
function _isNativeReflectConstruct_29477() { // fn#29477, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3938:279, offset: 0x00fc2fa9, 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) {
function _callSuper_29476(a0, a1, a2) { // fn#29476, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3938:148, offset: 0x00fc2f45, size: 100 bytes, params: 4, frame: 20
var r0;
var Reflect;
let value = a2;
const value3 = Module00017(a1);
if (_isNativeReflectConstruct_29477()) {
Reflect = global.Reflect;
value = Reflect.construct(value3, value || [], Module00017(a0).constructor);
r0 = value;
} else {
value = value3.apply(a0, value);
r0 = value;
}
return PossibleConstructorReturn(a0, r0);
}
return (_isNativeReflectConstruct_29477_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun29480(a0) { // fn#29480, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3938:478, offset: 0x00fc3007, size: 125 bytes, params: 2, frame: 17
const closure = BaseInvoiceRecord;
env0_6(closure, a0);
return env0_3(closure, [{key: 'getInvoicePreviewLineItemForSku', value: function(a0) {
var env0_0 = a0;
var value = this.invoiceItems.find(_fun29483);
var value2 = null;
return value2 != value ? value : value2;
}}, {key: 'getInvoicePreviewLineItemUnitPriceForSku', value: function(a0) {
var value = this.getInvoicePreviewLineItemForSku(a0);
var value2 = null;
return value2 == value || value2 == value.unitPrice ? value2 : value.unitPrice.amount;
}}], [{key: 'createInvoiceFromOrder', value: value_29485}]);
}
function _isNativeReflectConstruct_29477() { // fn#29477, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3938:279, offset: 0x00fc2fa9, 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_29477_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun29489(a0) { // fn#29489, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3938:1554, offset: 0x00fc32a3, size: 148 bytes, params: 2, frame: 18
const closure = InvoiceRecord;
env0_6(closure, a0);
return env0_3(closure, [{key: 'findInvoiceItemByPlanId', value: function(a0) {
var env0_0 = a0;
var value = this.invoiceItems.find(_fun29492);
var value2 = null;
return value2 != value ? value : value2;
}}, {key: 'getDiscountIdIfExists', value: function() {
var property = this.invoiceItems;
var value = property.find(_fun29494);
if (value != null) {
if (value.discounts.length === 0) {
return undefined;
function _fun29480(a0) { // fn#29480, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3938:478, offset: 0x00fc3007, size: 125 bytes, params: 2, frame: 17
const BaseInvoiceRecord2 = BaseInvoiceRecord;
Inherits(BaseInvoiceRecord2, a0);
return CreateClass(BaseInvoiceRecord2, [{key: 'getInvoicePreviewLineItemForSku', value: function(a0) {
var env0_0 = a0;
var value = this.invoiceItems.find(_fun29483);
var value2 = null;
return value2 != value ? value : value2;
}}, {key: 'getInvoicePreviewLineItemUnitPriceForSku', value: function(a0) {
var value = this.getInvoicePreviewLineItemForSku(a0);
var value2 = null;
return value2 == value || value2 == value.unitPrice ? value2 : value.unitPrice.amount;
}}], [{key: 'createInvoiceFromOrder', value: value_29485}]);
function BaseInvoiceRecord({total, subtotal, tax, currency, invoiceItems}) { // fn#29481, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3938:490, offset: 0x00fc3084, size: 110 bytes, params: 2, frame: 15
let value = environment.__proto__;
env1_2(this, BaseInvoiceRecord);
value = _callSuper_29476(this, BaseInvoiceRecord);
value.total = total;
value.subtotal = subtotal;
value.tax = tax;
value.currency = currency;
value.invoiceItems = invoiceItems ?? [];
return value;
}
function value_29482(a0) { // fn#29482, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3938:813, offset: 0x00fc30f2, size: 48 bytes, params: 2, frame: 11
const env0_0 = a0;
const value = this.invoiceItems.find(_fun29483);
const value2 = null;
return value2 != value ? value : value2;
function _fun29483({skuId}) { // fn#29483, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3938:871, offset: 0x00fc3122, size: 21 bytes, params: 2, frame: 2
return skuId === env0_0;
}
property = value.discounts[0];
if (property != null) {
return property.discount_id;
}
function value_29485(a0) { // fn#29485, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3938:1108, offset: 0x00fc3172, size: 168 bytes, params: 2, frame: 14
const env0_0 = a0;
const billing_facet = a0.billing_facet;
let value = null;
const invoice_preview = value != billing_facet ? billing_facet.invoice_preview : value;
if (value == invoice_preview) {
return value;
}
value = invoice_preview.line_items.map(function(a0) {
var value2 = a0.order_line_items.find(_fun29487);
var value3 = null;
return value3 == value2 ? value3 : {skuId: value2.sku_id, unitPrice: {amount: a0.unit_price,
currency: invoice_preview.currency}, quantity: a0.quantity};
});
value = value.filter(function(a0) {
return a0 != null;
});
const object = {};
object.total = invoice_preview.total;
object.subtotal = invoice_preview.subtotal;
object.tax = invoice_preview.tax;
object.currency = invoice_preview.currency;
object.invoiceItems = value;
value = Object.create(BaseInvoiceRecord.prototype, {constructor: {value: BaseInvoiceRecord}});
const baseInvoiceRecord = new BaseInvoiceRecord(object);
return baseInvoiceRecord instanceof Object ? baseInvoiceRecord : value;
function _fun29486(a0) { // fn#29486, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3938:1222, offset: 0x00fc321a, size: 108 bytes, params: 2, frame: 14
const value2 = a0.order_line_items.find(_fun29487);
const value3 = null;
return value3 == value2 ? value3 : {skuId: value2.sku_id, unitPrice: {amount: a0.unit_price,
currency: invoice_preview.currency}, quantity: a0.quantity};
function _fun29487({id}) { // fn#29487, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3938:1257, offset: 0x00fc3286, size: 29 bytes, params: 2, frame: 2
return id === env0_0.ref_order_line_item_id;
}
}
}
}
function _fun29489(a0) { // fn#29489, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3938:1554, offset: 0x00fc32a3, size: 148 bytes, params: 2, frame: 18
const InvoiceRecord2 = InvoiceRecord;
Inherits(InvoiceRecord2, a0);
return CreateClass(InvoiceRecord2, [{key: 'findInvoiceItemByPlanId', value: function(a0) {
var env0_0 = a0;
var value = this.invoiceItems.find(_fun29492);
var value2 = null;
return value2 != value ? value : value2;
}}, {key: 'getDiscountIdIfExists', value: function() {
var property = this.invoiceItems;
var value = property.find(_fun29494);
if (value != null) {
if (value.discounts.length === 0) {
return undefined;
}
property = value.discounts[0];
if (property != null) {
return property.discount_id;
}
}
}}], [{key: 'createInvoiceFromServer', value: value_29495}, {key: 'createFromOTPPreview', value: value_29496}]);
function InvoiceRecord(a0) { // fn#29490, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3938:1566, offset: 0x00fc3337, size: 153 bytes, params: 2, frame: 17
let value = environment.__proto__;
env1_2(this, InvoiceRecord);
value = _callSuper_29476(this, InvoiceRecord, [a0]);
value.id = a0.id;
value.invoiceItems = a0.invoiceItems ?? [];
value.taxInclusive = a0.taxInclusive;
value.subscriptionPeriodStart = a0.subscriptionPeriodStart;
value.subscriptionPeriodEnd = a0.subscriptionPeriodEnd;
value.status = a0.status;
value.orbsReward = a0.orbsReward;
value.checkoutContext = a0.checkoutContext;
return value;
}
function value_29491(a0) { // fn#29491, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3938:2013, offset: 0x00fc33d0, size: 48 bytes, params: 2, frame: 11
const env0_0 = a0;
const value = this.invoiceItems.find(_fun29492);
const value2 = null;
return value2 != value ? value : value2;
function _fun29492({subscriptionPlanId}) { // fn#29492, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3938:2071, offset: 0x00fc3400, size: 22 bytes, params: 2, frame: 2
return subscriptionPlanId === env0_0;
}
}
function value_29493() { // fn#29493, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3938:2146, offset: 0x00fc3416, size: 76 bytes, params: 1, frame: 12
const value = this.invoiceItems.find(function(a0) {
return a0.discounts.length > 0;
});
if (value != null) {
var discounts = value.discounts;
if (discounts.length === 0) {
return undefined;
}
discounts = value.discounts;
var property = discounts[0];
if (property != null) {
return property.discount_id;
}
}
}
}}], [{key: 'createInvoiceFromServer', value: value_29495}, {key: 'createFromOTPPreview', value: value_29496}]);
}
function BaseInvoiceRecord({total, subtotal, tax, currency, invoiceItems}) { // fn#29481, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3938:490, offset: 0x00fc3084, size: 110 bytes, params: 2, frame: 15
let value = environment.__proto__;
env1_2(this, BaseInvoiceRecord);
value = _callSuper_29476(this, BaseInvoiceRecord);
value.total = total;
value.subtotal = subtotal;
value.tax = tax;
value.currency = currency;
value.invoiceItems = invoiceItems ?? [];
return value;
}
function value_29482(a0) { // fn#29482, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3938:813, offset: 0x00fc30f2, size: 48 bytes, params: 2, frame: 11
const env0_0 = a0;
const value = this.invoiceItems.find(_fun29483);
const value2 = null;
return value2 != value ? value : value2;
}
function value_29485(a0) { // fn#29485, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3938:1108, offset: 0x00fc3172, size: 168 bytes, params: 2, frame: 14
const env0_0 = a0;
const billing_facet = a0.billing_facet;
let value = null;
const invoice_preview = value != billing_facet ? billing_facet.invoice_preview : value;
if (value == invoice_preview) {
return value;
}
value = invoice_preview.line_items.map(function(a0) {
var value2 = a0.order_line_items.find(_fun29487);
var value3 = null;
return value3 == value2 ? value3 : {skuId: value2.sku_id, unitPrice: {amount: a0.unit_price,
currency: invoice_preview.currency}, quantity: a0.quantity};
});
value = value.filter(function(a0) {
return a0 != null;
});
const object2 = {};
object2.total = invoice_preview.total;
object2.subtotal = invoice_preview.subtotal;
object2.tax = invoice_preview.tax;
object2.currency = invoice_preview.currency;
object2.invoiceItems = value;
value = Object.create(BaseInvoiceRecord.prototype, {constructor: {value: BaseInvoiceRecord}});
const baseInvoiceRecord = new BaseInvoiceRecord(object2);
return baseInvoiceRecord instanceof Object ? baseInvoiceRecord : value;
}
function InvoiceRecord(a0) { // fn#29490, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3938:1566, offset: 0x00fc3337, size: 153 bytes, params: 2, frame: 17
let value = environment.__proto__;
env1_2(this, InvoiceRecord);
value = _callSuper_29476(this, InvoiceRecord, [a0]);
value.id = a0.id;
value.invoiceItems = a0.invoiceItems ?? [];
value.taxInclusive = a0.taxInclusive;
value.subscriptionPeriodStart = a0.subscriptionPeriodStart;
value.subscriptionPeriodEnd = a0.subscriptionPeriodEnd;
value.status = a0.status;
value.orbsReward = a0.orbsReward;
value.checkoutContext = a0.checkoutContext;
return value;
}
function value_29491(a0) { // fn#29491, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3938:2013, offset: 0x00fc33d0, size: 48 bytes, params: 2, frame: 11
const env0_0 = a0;
const value = this.invoiceItems.find(_fun29492);
const value2 = null;
return value2 != value ? value : value2;
}
function value_29493() { // fn#29493, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3938:2146, offset: 0x00fc3416, size: 76 bytes, params: 1, frame: 12
const value = this.invoiceItems.find(function(a0) {
return a0.discounts.length > 0;
});
if (value != null) {
var discounts = value.discounts;
if (discounts.length === 0) {
return undefined;
function value_29495({id, invoice_items, total, subtotal, currency, tax, tax_inclusive, subscription_period_start, subscription_period_end, status, orbs_reward, checkout_context}) { // fn#29495, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3938:2344, offset: 0x00fc3478, size: 275 bytes, params: 2, frame: 18
const object = {};
object.id = id;
object.invoiceItems = invoice_items?.map((require(3812) /* metro dependency 3812: PremiumSubscriptionInvoiceItem */).createInvoiceItemFromServer);
object.total = total;
object.subtotal = subtotal;
object.currency = currency;
object.tax = tax;
object.taxInclusive = tax_inclusive;
let Date = global.Date;
let date = new Date(subscription_period_start);
object.subscriptionPeriodStart = date;
Date = global.Date;
object.subscriptionPeriodEnd = new Date(subscription_period_end);
object.status = status;
object.orbsReward = orbs_reward;
object.checkoutContext = checkout_context;
date = Object.create(InvoiceRecord.prototype, {constructor: {value: InvoiceRecord}});
const invoiceRecord = new InvoiceRecord(object);
return invoiceRecord instanceof Object ? invoiceRecord : date;
}
discounts = value.discounts;
var property = discounts[0];
if (property != null) {
return property.discount_id;
function value_29496({invoice_items, amount, subtotal, currency, tax, tax_inclusive, orbs_reward, checkout_context}) { // fn#29496, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3938:2812, offset: 0x00fc358b, size: 251 bytes, params: 2, frame: 18
const object = {id: ''};
object.invoiceItems = invoice_items?.map((require(3812) /* metro dependency 3812: PremiumSubscriptionInvoiceItem */).createInvoiceItemFromServer);
object.total = amount;
object.subtotal = subtotal;
object.currency = currency;
object.tax = tax;
object.taxInclusive = tax_inclusive;
let Date = global.Date;
let date = new Date(0);
object.subscriptionPeriodStart = date;
Date = global.Date;
object.subscriptionPeriodEnd = new Date(0);
object.orbsReward = orbs_reward;
object.checkoutContext = checkout_context;
date = Object.create(InvoiceRecord.prototype, {constructor: {value: InvoiceRecord}});
const invoiceRecord = new InvoiceRecord(object);
return invoiceRecord instanceof Object ? invoiceRecord : date;
}
}
}
function value_29495({id, invoice_items, total, subtotal, currency, tax, tax_inclusive, subscription_period_start, subscription_period_end, status, orbs_reward, checkout_context}) { // fn#29495, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3938:2344, offset: 0x00fc3478, size: 275 bytes, params: 2, frame: 18
const object2 = {};
object2.id = id;
object2.invoiceItems = invoice_items?.map((require(3812) /* metro dependency 3812: PremiumSubscriptionInvoiceItem */).createInvoiceItemFromServer);
object2.total = total;
object2.subtotal = subtotal;
object2.currency = currency;
object2.tax = tax;
object2.taxInclusive = tax_inclusive;
let Date = global.Date;
let date = new Date(subscription_period_start);
object2.subscriptionPeriodStart = date;
Date = global.Date;
object2.subscriptionPeriodEnd = new Date(subscription_period_end);
object2.status = status;
object2.orbsReward = orbs_reward;
object2.checkoutContext = checkout_context;
date = Object.create(InvoiceRecord.prototype, {constructor: {value: InvoiceRecord}});
const invoiceRecord = new InvoiceRecord(object2);
return invoiceRecord instanceof Object ? invoiceRecord : date;
}
function value_29496({invoice_items, amount, subtotal, currency, tax, tax_inclusive, orbs_reward, checkout_context}) { // fn#29496, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3938:2812, offset: 0x00fc358b, size: 251 bytes, params: 2, frame: 18
const object2 = {id: ''};
object2.invoiceItems = invoice_items?.map((require(3812) /* metro dependency 3812: PremiumSubscriptionInvoiceItem */).createInvoiceItemFromServer);
object2.total = amount;
object2.subtotal = subtotal;
object2.currency = currency;
object2.tax = tax;
object2.taxInclusive = tax_inclusive;
let Date = global.Date;
let date = new Date(0);
object2.subscriptionPeriodStart = date;
Date = global.Date;
object2.subscriptionPeriodEnd = new Date(0);
object2.orbsReward = orbs_reward;
object2.checkoutContext = checkout_context;
date = Object.create(InvoiceRecord.prototype, {constructor: {value: InvoiceRecord}});
const invoiceRecord = new InvoiceRecord(object2);
return invoiceRecord instanceof Object ? invoiceRecord : date;
}
function _fun29486(a0) { // fn#29486, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3938:1222, offset: 0x00fc321a, size: 108 bytes, params: 2, frame: 14
const value2 = a0.order_line_items.find(_fun29487);
const value3 = null;
return value3 == value2 ? value3 : {skuId: value2.sku_id, unitPrice: {amount: a0.unit_price,
currency: invoice_preview.currency}, quantity: a0.quantity};
}
function _fun29492({subscriptionPlanId}) { // fn#29492, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3938:2071, offset: 0x00fc3400, size: 22 bytes, params: 2, frame: 2
return subscriptionPlanId === env0_0;
}
function _fun29487({id}) { // fn#29487, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3938:1257, offset: 0x00fc3286, size: 29 bytes, params: 2, frame: 2
return id === env0_0.ref_order_line_item_id;
function _fun29494({discounts}) { // fn#29494, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3938:2187, offset: 0x00fc3462, size: 22 bytes, params: 2, frame: 2
return discounts.length > 0;
}
global.__d(_fun29475, 3811, [6, 7, 15, 17, 18, 1886, 3812,
2]) /* metro module 3811, dependencies: [6, 7, 15, 17, 18, 1886, 3812, 2] */;
+164 -162
View File
@@ -1,179 +1,181 @@
/* Metro module 4271; source: records/LibraryApplicationRecord.tsx; dependencies: [6, 7, 15, 17, 18, 1886, 4234, 4272, 661, 1391, 3738, 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 ApplicationStore from '../modules/applications/ApplicationStore.tsx'; /* Metro dependency 4234 */
import EntitlementRecord from './EntitlementRecord.tsx'; /* Metro dependency 4272 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */
function _fun36191(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#36191, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4443:6, offset: 0x01084c95, size: 283 bytes, params: 8, frame: 19
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
let value = importDefault(1886) /* metro dependency 1886: Record */;
const applicationStore = importDefault(4234) /* metro dependency 4234: ApplicationStore */;
const entitlementRecord = importDefault(4272) /* metro dependency 4272: EntitlementRecord */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_10 = constantsModule.LibraryApplicationFlags;
const env0_11 = constantsModule.Distributors;
const env0_12 = constantsModule.SKUTypes;
let value = Record;
value = _fun36195(value);
(require(2) /* metro dependency 2 */).fileFinishedImporting('records/LibraryApplicationRecord.tsx');
(FileImportTrackerModule).fileFinishedImporting('records/LibraryApplicationRecord.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_36192() { // fn#36192, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4443:246, offset: 0x01084db0, 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) {
function _isNativeReflectConstruct_36192() { // fn#36192, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4443:246, offset: 0x01084db0, 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_36192_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_36192_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun36195(a0) { // fn#36195, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4443:445, offset: 0x01084e0e, size: 467 bytes, params: 2, frame: 18
const closure = LibraryApplicationRecord;
env0_7(closure, a0);
return env0_4(closure, [{key: 'getFlags', value: function() {
return this.flags;
}}, {key: 'hasFlag', value: value_36198}, {key: 'isHidden', value: function() {
return this.hasFlag(LibraryApplicationFlags.HIDDEN);
}}, {key: 'isLegacyOverlayEnabled', value: function() {
return !this.hasFlag(LibraryApplicationFlags.OVERLAY_DISABLED);
}}, {key: 'isOverlayV3Enabled', value: function() {
return !this.hasFlag(LibraryApplicationFlags.OVERLAY_V3_DISABLED);
}}, {key: 'isOverlayEnabled', value: function() {
return this.isLegacyOverlayEnabled() || this.isOverlayV3Enabled();
}}, {key: 'isMasterBranch', value: function() {
return this.branchId === this.id;
}}, {key: 'isDiscordApplication', value: function() {
return true;
}}, {key: 'isEntitled', value: function(a0, a1) {
var env0_0 = this;
var env0_1 = a0;
var env0_2 = a1;
var property = this.isTestMode;
return property ? !!property : this.entitlements.some(_fun36206);
}}, {key: 'isPreorder', value: function() {
return this.sku.preorderReleaseAt != null || this.sku.preorderApproximateReleaseDate != null;
}}, {key: 'getDistributor', value: function() {
return Distributors.DISCORD;
}}, {key: 'getBranchName', value: function() {
return this.branch != null ? this.branch.name : 'master';
}}, {key: 'getBranchedName', value: function(a0) {
return this.isMasterBranch() || this.branch == null ? a0.name : '' + a0.name + ' (' + this.branch.name + ')';
}}, {key: 'getSkuIdForAnalytics', value: function() {
return this.sku.id;
}}, {key: 'getAnalyticsData', value: value_36212}], [{key: 'createFromServer', value: value_36213},
{key: 'createForTestMode', value: value_36215}]);
}
function _fun36195(a0) { // fn#36195, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4443:445, offset: 0x01084e0e, size: 467 bytes, params: 2, frame: 18
const LibraryApplicationRecord2 = LibraryApplicationRecord;
Inherits(LibraryApplicationRecord2, a0);
return CreateClass(LibraryApplicationRecord2, [{key: 'getFlags', value: function() {
return this.flags;
}}, {key: 'hasFlag', value: value_36198}, {key: 'isHidden', value: function() {
return this.hasFlag(LibraryApplicationFlags.HIDDEN);
}}, {key: 'isLegacyOverlayEnabled', value: function() {
return !this.hasFlag(LibraryApplicationFlags.OVERLAY_DISABLED);
}}, {key: 'isOverlayV3Enabled', value: function() {
return !this.hasFlag(LibraryApplicationFlags.OVERLAY_V3_DISABLED);
}}, {key: 'isOverlayEnabled', value: function() {
return this.isLegacyOverlayEnabled() || this.isOverlayV3Enabled();
}}, {key: 'isMasterBranch', value: function() {
return this.branchId === this.id;
}}, {key: 'isDiscordApplication', value: function() {
return true;
}}, {key: 'isEntitled', value: function(a0, a1) {
var env0_0 = this;
var env0_1 = a0;
var env0_2 = a1;
var property = this.isTestMode;
return property ? !!property : this.entitlements.some(_fun36206);
}}, {key: 'isPreorder', value: function() {
return this.sku.preorderReleaseAt != null || this.sku.preorderApproximateReleaseDate != null;
}}, {key: 'getDistributor', value: function() {
return Distributors.DISCORD;
}}, {key: 'getBranchName', value: function() {
return this.branch != null ? this.branch.name : 'master';
}}, {key: 'getBranchedName', value: function(a0) {
return this.isMasterBranch() || this.branch == null ? a0.name : '' + a0.name + ' (' + this.branch.name + ')';
}}, {key: 'getSkuIdForAnalytics', value: function() {
return this.sku.id;
}}, {key: 'getAnalyticsData', value: value_36212}], [{key: 'createFromServer', value: value_36213},
{key: 'createForTestMode', value: value_36215}]);
function LibraryApplicationRecord({id, createdAt, flags, branchId, entitlements, branch, sku, isTestMode}) { // fn#36196, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4443:457, offset: 0x01084fe1, size: 210 bytes, params: 2, frame: 20
let value = environment.__proto__;
env1_3(this, LibraryApplicationRecord);
const value3 = env1_6(LibraryApplicationRecord);
value = env1_5(this, _isNativeReflectConstruct_36192() ? global.Reflect.construct(value3, [],
env1_6(this).constructor) : value3.apply(this, undefined));
value.id = id;
value.createdAt = createdAt;
value.flags = flags;
value.branchId = branchId;
value.entitlements = entitlements;
value.branch = branch;
value.sku = sku;
isTestMode = !!isTestMode && isTestMode;
value.isTestMode = isTestMode;
return value;
}
function LibraryApplicationRecord({id, createdAt, flags, branchId, entitlements, branch, sku, isTestMode}) { // fn#36196, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4443:457, offset: 0x01084fe1, size: 210 bytes, params: 2, frame: 20
let value = environment.__proto__;
env1_3(this, LibraryApplicationRecord);
const value3 = env1_6(LibraryApplicationRecord);
value = env1_5(this, _isNativeReflectConstruct_36192() ? global.Reflect.construct(value3, [],
env1_6(this).constructor) : value3.apply(this, undefined));
value.id = id;
value.createdAt = createdAt;
value.flags = flags;
value.branchId = branchId;
value.entitlements = entitlements;
value.branch = branch;
value.sku = sku;
isTestMode = !!isTestMode && isTestMode;
value.isTestMode = isTestMode;
return value;
}
function value_36198(a0) { // fn#36198, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4443:1008, offset: 0x010850bd, size: 50 bytes, params: 2, frame: 13
let value = environment.__proto__;
value = importAll(1391) /* metro dependency 1391: FlagUtils */;
return value.hasFlag(this.flags, a0);
}
function value_36198(a0) { // fn#36198, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4443:1008, offset: 0x010850bd, size: 50 bytes, params: 2, frame: 13
let value = environment.__proto__;
value = importAll(1391) /* metro dependency 1391: FlagUtils */;
return value.hasFlag(this.flags, a0);
}
function value_36205(a0, a1) { // fn#36205, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4443:1560, offset: 0x01085180, size: 62 bytes, params: 3, frame: 12
const env0_1 = a0;
const env0_2 = a1;
const isTestMode = this.isTestMode;
return isTestMode ? !!isTestMode : this.entitlements.some(_fun36206);
function _fun36206(a0) { // fn#36206, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4443:1623, offset: 0x010851be, size: 39 bytes, params: 2, frame: 15
return a0.isValid(env0_1, require, env0_0.branchId);
}
function value_36205(a0, a1) { // fn#36205, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4443:1560, offset: 0x01085180, size: 62 bytes, params: 3, frame: 12
const env0_1 = a0;
const env0_2 = a1;
const isTestMode = this.isTestMode;
return isTestMode ? !!isTestMode : this.entitlements.some(_fun36206);
}
}
function value_36212() { // fn#36212, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4443:2160, offset: 0x010852ae, size: 106 bytes, params: 1, frame: 14
let value = environment.__proto__;
value = ApplicationStore.getApplication(this.id);
const object2 = {};
const value2 = null;
object2.application_id = value2 != value ? value.id : value2;
object2.application_name = value2 != value ? value.name : value2;
object2.sku_id = this.getSkuIdForAnalytics();
object2.launcher_platform = this.getDistributor();
return object2;
}
function value_36212() { // fn#36212, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4443:2160, offset: 0x010852ae, size: 106 bytes, params: 1, frame: 14
let value = environment.__proto__;
value = ApplicationStore.getApplication(this.id);
const object = {};
const value2 = null;
object.application_id = value2 != value ? value.id : value2;
object.application_name = value2 != value ? value.name : value2;
object.sku_id = this.getSkuIdForAnalytics();
object.launcher_platform = this.getDistributor();
return object;
}
function value_36213(a0) { // fn#36213, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4443:2390, offset: 0x01085318, size: 299 bytes, params: 2, frame: 17
const object3 = {};
object3.id = a0.application.id;
object3.branchId = a0.branch_id;
const entitlements = a0.entitlements;
let value = null;
object3.entitlements = value != entitlements ? a0.entitlements.map(function(a0) {
return EntitlementRecord.createFromServer(a0);
}) : [];
object3.branch = a0.branch;
object3.flags = a0.flags;
object3.createdAt = a0.created_at;
const object4 = {};
object4.id = a0.sku.id;
object4.type = a0.sku.type;
object4.premium = a0.sku.premium;
object4.preorderReleaseAt = value != a0.sku.preorder_release_at ? (importDefault(3738) /* metro dependency 3738 */)(a0.sku.preorder_release_at) : value;
let preorder_approximate_release_date = a0.sku.preorder_approximate_release_date;
preorder_approximate_release_date = value != preorder_approximate_release_date ? a0.sku.preorder_approximate_release_date : value;
object4.preorderApproximateReleaseDate = preorder_approximate_release_date;
object3.sku = object4;
value = Object.create(LibraryApplicationRecord.prototype, {constructor: {value: LibraryApplicationRecord}});
const libraryApplicationRecord = new LibraryApplicationRecord(object3);
return libraryApplicationRecord instanceof Object ? libraryApplicationRecord : value;
}
function value_36213(a0) { // fn#36213, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4443:2390, offset: 0x01085318, size: 299 bytes, params: 2, frame: 17
const object = {};
object.id = a0.application.id;
object.branchId = a0.branch_id;
const entitlements = a0.entitlements;
let value = null;
object.entitlements = value != entitlements ? a0.entitlements.map(function(a0) {
return EntitlementRecord.createFromServer(a0);
}) : [];
object.branch = a0.branch;
object.flags = a0.flags;
object.createdAt = a0.created_at;
const object2 = {};
object2.id = a0.sku.id;
object2.type = a0.sku.type;
object2.premium = a0.sku.premium;
object2.preorderReleaseAt = value != a0.sku.preorder_release_at ? (importDefault(3738) /* metro dependency 3738 */)(a0.sku.preorder_release_at) : value;
let preorder_approximate_release_date = a0.sku.preorder_approximate_release_date;
preorder_approximate_release_date = value != preorder_approximate_release_date ? a0.sku.preorder_approximate_release_date : value;
object2.preorderApproximateReleaseDate = preorder_approximate_release_date;
object.sku = object2;
value = Object.create(LibraryApplicationRecord.prototype, {constructor: {value: LibraryApplicationRecord}});
const libraryApplicationRecord = new LibraryApplicationRecord(object);
return libraryApplicationRecord instanceof Object ? libraryApplicationRecord : value;
}
function value_36215(a0) { // fn#36215, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4443:2921, offset: 0x0108545a, size: 160 bytes, params: 2, frame: 13
const object2 = {};
object2.id = a0.id;
object2.entitlements = [];
object2.branchId = a0.branch.id;
object2.branch = a0.branch;
let value = environment.__proto__;
const ENTITLED = LibraryApplicationFlags.ENTITLED;
object2.flags = ENTITLED;
object2.createdAt = a0.branch.created_at;
const DURABLE_PRIMARY = SKUTypes.DURABLE_PRIMARY;
object2.sku = {id: a0.skuId, type: DURABLE_PRIMARY, premium: false};
object2.isTestMode = true;
value = Object.create(LibraryApplicationRecord.prototype, {constructor: {value: LibraryApplicationRecord}});
const libraryApplicationRecord = new LibraryApplicationRecord(object2);
return libraryApplicationRecord instanceof Object ? libraryApplicationRecord : value;
}
function value_36215(a0) { // fn#36215, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4443:2921, offset: 0x0108545a, size: 160 bytes, params: 2, frame: 13
const object = {};
object.id = a0.id;
object.entitlements = [];
object.branchId = a0.branch.id;
object.branch = a0.branch;
let value = environment.__proto__;
const ENTITLED = LibraryApplicationFlags.ENTITLED;
object.flags = ENTITLED;
object.createdAt = a0.branch.created_at;
const DURABLE_PRIMARY = SKUTypes.DURABLE_PRIMARY;
object.sku = {id: a0.skuId, type: DURABLE_PRIMARY, premium: false};
object.isTestMode = true;
value = Object.create(LibraryApplicationRecord.prototype, {constructor: {value: LibraryApplicationRecord}});
const libraryApplicationRecord = new LibraryApplicationRecord(object);
return libraryApplicationRecord instanceof Object ? libraryApplicationRecord : value;
}
}
function _fun36206(a0) { // fn#36206, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4443:1623, offset: 0x010851be, size: 39 bytes, params: 2, frame: 15
return a0.isValid(env0_1, require, env0_0.branchId);
}
global.__d(_fun36191, 4271, [6, 7, 15, 17, 18, 1886, 4234, 4272, 661, 1391, 3738,
2]) /* metro module 4271, dependencies: [6, 7, 15, 17, 18, 1886, 4234, 4272, 661, 1391, 3738, 2] */;
+74 -68
View File
@@ -1,82 +1,88 @@
/* Metro module 7237; source: records/LinkRecord.tsx; dependencies: [6, 7, 15, 17, 18, 1886, 661, 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 */
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */
function _fun58095(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#58095, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7415:6, offset: 0x016bf872, size: 224 bytes, params: 8, frame: 19
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(6) /* metro dependency 6 */;
const env0_1 = importDefault(7) /* metro dependency 7 */;
const env0_2 = importDefault(15) /* metro dependency 15 */;
const env0_3 = importDefault(17) /* metro dependency 17 */;
const env0_4 = importDefault(18) /* metro dependency 18 */;
let value = importDefault(1886) /* metro dependency 1886: Record */;
const env0_5 = (require(661) /* metro dependency 661: Constants */).Routes;
let value = Record;
value = _fun58099(value);
(require(2) /* metro dependency 2 */).fileFinishedImporting('records/LinkRecord.tsx');
(FileImportTrackerModule).fileFinishedImporting('records/LinkRecord.tsx');
exports.default = value;
exports.LinkRecord = value;
}
function _isNativeReflectConstruct_58096() { // fn#58096, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7415:175, offset: 0x016bf952, 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) {
function _isNativeReflectConstruct_58096() { // fn#58096, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7415:175, offset: 0x016bf952, 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_58096_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_58096_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun58099(a0) { // fn#58099, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7415:374, offset: 0x016bf9b0, size: 98 bytes, params: 2, frame: 17
const closure = LinkRecord;
env0_4(closure, a0);
return env0_1(closure, null, [{key: 'fromPath', value: value_58101}, {key: 'fromInviteCode', value: value_58102}]);
}
function _fun58099(a0) { // fn#58099, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7415:374, offset: 0x016bf9b0, size: 98 bytes, params: 2, frame: 17
const LinkRecord2 = LinkRecord;
Inherits(LinkRecord2, a0);
return CreateClass(LinkRecord2, null, [{key: 'fromPath', value: value_58101}, {key: 'fromInviteCode',
value: value_58102}]);
function LinkRecord({id, path, inviteCode}) { // fn#58100, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7415:386, offset: 0x016bfa12, size: 146 bytes, params: 2, frame: 20
let value = environment.__proto__;
env1_0(this, LinkRecord);
const value3 = env1_3(LinkRecord);
value = env1_2(this, _isNativeReflectConstruct_58096() ? global.Reflect.construct(value3, [],
env1_3(this).constructor) : value3.apply(this, undefined));
value.id = id;
value.path = path;
value.inviteCode = inviteCode;
return value;
}
function LinkRecord({id, path, inviteCode}) { // fn#58100, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7415:386, offset: 0x016bfa12, size: 146 bytes, params: 2, frame: 20
let value = environment.__proto__;
env1_0(this, LinkRecord);
const value3 = env1_3(LinkRecord);
value = env1_2(this, _isNativeReflectConstruct_58096() ? global.Reflect.construct(value3, [],
env1_3(this).constructor) : value3.apply(this, undefined));
value.id = id;
value.path = path;
value.inviteCode = inviteCode;
return value;
}
function value_58101(a0) { // fn#58101, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7415:708, offset: 0x016bfaa4, size: 46 bytes, params: 2, frame: 12
const value = Object.create(LinkRecord.prototype, {constructor: {value: LinkRecord}});
const linkRecord = new LinkRecord({id: a0, path: a0});
return linkRecord instanceof Object ? linkRecord : value;
}
function value_58101(a0) { // fn#58101, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7415:708, offset: 0x016bfaa4, size: 46 bytes, params: 2, frame: 12
const value = Object.create(LinkRecord.prototype, {constructor: {value: LinkRecord}});
const linkRecord = new LinkRecord({id: a0, path: a0});
return linkRecord instanceof Object ? linkRecord : value;
}
function value_58102(a0) { // fn#58102, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7415:787, offset: 0x016bfad2, size: 93 bytes, params: 2, frame: 13
const object = {};
object.id = 'invite:' + a0;
let value = environment.__proto__;
object.path = Routes.INVITE(a0);
object.inviteCode = a0;
value = Object.create(LinkRecord.prototype, {constructor: {value: LinkRecord}});
const linkRecord = new LinkRecord(object);
return linkRecord instanceof Object ? linkRecord : value;
}
}
function value_58102(a0) { // fn#58102, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7415:787, offset: 0x016bfad2, size: 93 bytes, params: 2, frame: 13
const object2 = {};
object2.id = 'invite:' + a0;
let value = environment.__proto__;
object2.path = Routes.INVITE(a0);
object2.inviteCode = a0;
value = Object.create(LinkRecord.prototype, {constructor: {value: LinkRecord}});
const linkRecord = new LinkRecord(object2);
return linkRecord instanceof Object ? linkRecord : value;
}
global.__d(_fun58095, 7237, [6, 7, 15, 17, 18, 1886, 661,
2]) /* metro module 7237, dependencies: [6, 7, 15, 17, 18, 1886, 661, 2] */;
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
+185 -179
View File
@@ -1,188 +1,194 @@
/* Metro module 7262; source: records/PromotionRecord.tsx; dependencies: [6, 7, 15, 17, 18, 1886, 1880, 7263, 1391, 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 */
import * as PremiumConstantsModule from '../modules/premium/PremiumConstants.tsx'; /* Metro dependency 1880 */
import * as ConstantsModule from '../modules/premium/promotions/constants.tsx'; /* Metro dependency 7263 */
function _fun58384(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#58384, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7440:6, offset: 0x016c62b6, size: 224 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(6) /* metro dependency 6 */;
const env0_3 = importDefault(7) /* metro dependency 7 */;
const env0_4 = importDefault(15) /* metro dependency 15 */;
const env0_5 = importDefault(17) /* metro dependency 17 */;
const env0_6 = importDefault(18) /* metro dependency 18 */;
let value = importDefault(1886) /* metro dependency 1886: Record */;
const env0_7 = (require(1880) /* metro dependency 1880: PremiumConstants */).PromotionFlags;
let value = Record;
value = _fun58388(value);
(require(2) /* metro dependency 2 */).fileFinishedImporting('records/PromotionRecord.tsx');
(FileImportTrackerModule).fileFinishedImporting('records/PromotionRecord.tsx');
exports.default = value;
function _isNativeReflectConstruct_58385() { // fn#58385, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7440:183, offset: 0x016c6396, 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_58385_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun58388(a0) { // fn#58388, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7440:382, offset: 0x016c63f4, size: 194 bytes, params: 2, frame: 17
const PromotionRecord2 = PromotionRecord;
Inherits(PromotionRecord2, a0);
return CreateClass(PromotionRecord2, [{key: 'isBogo', get: function() {
return this.promotionType === require(dependencyMap[7]).PromotionTypes.BOGO;
}}, {key: 'isMarketingMoment', get: function() {
return this.promotionType === require(dependencyMap[7]).PromotionTypes.MARKETING_MOMENT;
}}, {key: 'hasFlag', value: value_58392}, {key: 'isCountryRestricted', value: value_58393},
{key: 'isRedeemableByTrialUsers', value: function() {
return this.hasFlag(PromotionFlags.IS_OUTBOUND_REDEEMABLE_BY_TRIAL_USERS);
}}], [{key: 'createFromServer', value: value_58395}]);
function PromotionRecord({id, trialId, startDate, endDate, outboundRedemptionEndDate, inboundHeaderText, inboundBodyText, inboundHelpCenterLink, outboundTitle, outboundRedemptionModalBody, outboundTermsAndConditions, outboundRedemptionPageLink, outboundRedemptionUrlFormat, flags, inboundRestrictedCountries, outboundRestrictedCountries, allowedCountries, countryListMode, promotionType, partnerId, marketingComponents, rewardSkuIds, promotionKey}) { // fn#58389, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7440:394, offset: 0x016c64b6, size: 459 bytes, params: 2, frame: 21
env1_2(this, PromotionRecord);
const value3 = env1_5(PromotionRecord);
const value6 = env1_4(this, _isNativeReflectConstruct_58385() ? global.Reflect.construct(value3, [],
env1_5(this).constructor) : value3.apply(this, undefined));
value6.id = id;
value6.trialId = trialId;
value6.startDate = startDate;
value6.endDate = endDate;
value6.outboundRedemptionEndDate = outboundRedemptionEndDate;
value6.inboundHeaderText = inboundHeaderText;
value6.inboundBodyText = inboundBodyText;
value6.inboundHelpCenterLink = inboundHelpCenterLink;
value6.outboundTitle = outboundTitle;
value6.outboundRedemptionModalBody = outboundRedemptionModalBody;
value6.outboundTermsAndConditions = outboundTermsAndConditions;
value6.outboundRedemptionPageLink = outboundRedemptionPageLink;
value6.outboundRedemptionUrlFormat = outboundRedemptionUrlFormat;
value6.flags = flags ?? 0;
value6.inboundRestrictedCountries = inboundRestrictedCountries ?? [];
value6.outboundRestrictedCountries = outboundRestrictedCountries ?? [];
value6.allowedCountries = allowedCountries ?? [];
value6.countryListMode = countryListMode ?? (require(7263) /* metro dependency 7263: constants */).CountryListMode.BLOCKLIST;
value6.promotionType = promotionType;
value6.partnerId = partnerId;
value6.marketingComponents = marketingComponents;
value6.rewardSkuIds = rewardSkuIds;
value6.promotionKey = promotionKey;
return value6;
}
function value_58392(a0) { // fn#58392, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7440:1887, offset: 0x016c66e9, size: 50 bytes, params: 2, frame: 13
let value = environment.__proto__;
value = require(1391) /* metro dependency 1391: FlagUtils */;
return value.hasFlag(this.flags, a0);
}
function value_58393(a0) { // fn#58393, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7440:1971, offset: 0x016c671b, size: 258 bytes, params: 2, frame: 16
var allowedCountries;
const countryListMode = this.countryListMode;
const CountryListMode = (ConstantsModule).CountryListMode;
const ALLOWLIST = CountryListMode.ALLOWLIST;
if (countryListMode === ALLOWLIST) {
allowedCountries = this.allowedCountries;
return !allowedCountries.includes(a0);
}
const promotionType = this.promotionType;
const PromotionTypes = (ConstantsModule).PromotionTypes;
const THIRD_PARTY_INBOUND = PromotionTypes.THIRD_PARTY_INBOUND;
if (THIRD_PARTY_INBOUND === promotionType) {
return this.inboundRestrictedCountries.includes(a0);
}
const THIRD_PARTY_DIRECT_FULFILLMENT = PromotionTypes.THIRD_PARTY_DIRECT_FULFILLMENT;
if (THIRD_PARTY_DIRECT_FULFILLMENT === promotionType) {
return this.inboundRestrictedCountries.includes(a0);
}
const THIRD_PARTY_OUTBOUND = PromotionTypes.THIRD_PARTY_OUTBOUND;
if (THIRD_PARTY_OUTBOUND === promotionType) {
return this.outboundRestrictedCountries.includes(a0);
}
const THIRD_PARTY_OUTBOUND_RECURRING = PromotionTypes.THIRD_PARTY_OUTBOUND_RECURRING;
if (THIRD_PARTY_OUTBOUND_RECURRING === promotionType) {
return this.outboundRestrictedCountries.includes(a0);
}
return false;
}
function value_58395(a0) { // fn#58395, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7440:2593, offset: 0x016c683a, size: 687 bytes, params: 2, frame: 18
var r1;
const object = {};
object.id = a0.id;
object.trialId = a0.trial_id;
let Date = global.Date;
let date = new Date(a0.start_date);
object.startDate = date;
Date = global.Date;
object.endDate = new Date(a0.end_date);
const outbound_redemption_end_date = a0.outbound_redemption_end_date;
date = null;
if (date != outbound_redemption_end_date) {
date = new global.Date(a0.outbound_redemption_end_date);
} else {
r1 = date;
}
object.outboundRedemptionEndDate = r1;
const inbound_header_text = a0.inbound_header_text;
const value4 = '';
let r5 = date != inbound_header_text ? inbound_header_text : value4;
object.inboundHeaderText = r5;
const inbound_body_text = a0.inbound_body_text;
object.inboundBodyText = date != inbound_body_text ? inbound_body_text : value4;
const inbound_help_center_link = a0.inbound_help_center_link;
object.inboundHelpCenterLink = date != inbound_help_center_link ? inbound_help_center_link : value4;
const outbound_title = a0.outbound_title;
object.outboundTitle = date != outbound_title ? outbound_title : value4;
const outbound_redemption_modal_body = a0.outbound_redemption_modal_body;
object.outboundRedemptionModalBody = date != outbound_redemption_modal_body ? outbound_redemption_modal_body : value4;
const outbound_terms_and_conditions = a0.outbound_terms_and_conditions;
object.outboundTermsAndConditions = date != outbound_terms_and_conditions ? outbound_terms_and_conditions : value4;
const outbound_redemption_page_link = a0.outbound_redemption_page_link;
object.outboundRedemptionPageLink = date != outbound_redemption_page_link ? outbound_redemption_page_link : value4;
const outbound_redemption_url_format = a0.outbound_redemption_url_format;
object.outboundRedemptionUrlFormat = date != outbound_redemption_url_format ? outbound_redemption_url_format : value4;
object.flags = a0.flags;
object.inboundRestrictedCountries = a0.inbound_restricted_countries;
object.outboundRestrictedCountries = a0.outbound_restricted_countries;
const allowed_countries = a0.allowed_countries;
object.allowedCountries = date != allowed_countries ? allowed_countries : [];
const country_list_mode = a0.country_list_mode;
object.countryListMode = date != country_list_mode ? country_list_mode : (require(7263) /* metro dependency 7263: constants */).CountryListMode.BLOCKLIST;
object.promotionType = a0.promotion_type;
const partner_id = a0.partner_id;
object.partnerId = date != partner_id ? partner_id : date;
const marketing_components = a0.marketing_components;
object.marketingComponents = date != marketing_components ? marketing_components : [];
const metadata = a0.metadata;
const value6 = undefined;
const reward_sku_ids = date == metadata || date == metadata.premium_promotion ? value6 : metadata.premium_promotion.reward_sku_ids;
r5 = date != reward_sku_ids ? reward_sku_ids : date == a0.metadata || date == a0.metadata.gift_promotion ? value6 : a0.metadata.gift_promotion.reward_sku_ids;
r5 = date == r5 ? [] : r5;
object.rewardSkuIds = r5;
const promotion_key = a0.promotion_key;
object.promotionKey = date != promotion_key ? promotion_key : value4;
date = Object.create(PromotionRecord.prototype, {constructor: {value: PromotionRecord}});
const promotionRecord = new PromotionRecord(object);
return promotionRecord instanceof Object ? promotionRecord : date;
}
}
}
function _isNativeReflectConstruct_58385() { // fn#58385, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7440:183, offset: 0x016c6396, 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_58385_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun58388(a0) { // fn#58388, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7440:382, offset: 0x016c63f4, size: 194 bytes, params: 2, frame: 17
const closure = PromotionRecord;
env0_6(closure, a0);
return env0_3(closure, [{key: 'isBogo', get: function() {
return this.promotionType === require(dependencyMap[7]).PromotionTypes.BOGO;
}}, {key: 'isMarketingMoment', get: function() {
return this.promotionType === require(dependencyMap[7]).PromotionTypes.MARKETING_MOMENT;
}}, {key: 'hasFlag', value: value_58392}, {key: 'isCountryRestricted', value: value_58393},
{key: 'isRedeemableByTrialUsers', value: function() {
return this.hasFlag(PromotionFlags.IS_OUTBOUND_REDEEMABLE_BY_TRIAL_USERS);
}}], [{key: 'createFromServer', value: value_58395}]);
}
function PromotionRecord({id, trialId, startDate, endDate, outboundRedemptionEndDate, inboundHeaderText, inboundBodyText, inboundHelpCenterLink, outboundTitle, outboundRedemptionModalBody, outboundTermsAndConditions, outboundRedemptionPageLink, outboundRedemptionUrlFormat, flags, inboundRestrictedCountries, outboundRestrictedCountries, allowedCountries, countryListMode, promotionType, partnerId, marketingComponents, rewardSkuIds, promotionKey}) { // fn#58389, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7440:394, offset: 0x016c64b6, size: 459 bytes, params: 2, frame: 21
env1_2(this, PromotionRecord);
const value3 = env1_5(PromotionRecord);
const value6 = env1_4(this, _isNativeReflectConstruct_58385() ? global.Reflect.construct(value3, [],
env1_5(this).constructor) : value3.apply(this, undefined));
value6.id = id;
value6.trialId = trialId;
value6.startDate = startDate;
value6.endDate = endDate;
value6.outboundRedemptionEndDate = outboundRedemptionEndDate;
value6.inboundHeaderText = inboundHeaderText;
value6.inboundBodyText = inboundBodyText;
value6.inboundHelpCenterLink = inboundHelpCenterLink;
value6.outboundTitle = outboundTitle;
value6.outboundRedemptionModalBody = outboundRedemptionModalBody;
value6.outboundTermsAndConditions = outboundTermsAndConditions;
value6.outboundRedemptionPageLink = outboundRedemptionPageLink;
value6.outboundRedemptionUrlFormat = outboundRedemptionUrlFormat;
value6.flags = flags ?? 0;
value6.inboundRestrictedCountries = inboundRestrictedCountries ?? [];
value6.outboundRestrictedCountries = outboundRestrictedCountries ?? [];
value6.allowedCountries = allowedCountries ?? [];
value6.countryListMode = countryListMode ?? (require(7263) /* metro dependency 7263: constants */).CountryListMode.BLOCKLIST;
value6.promotionType = promotionType;
value6.partnerId = partnerId;
value6.marketingComponents = marketingComponents;
value6.rewardSkuIds = rewardSkuIds;
value6.promotionKey = promotionKey;
return value6;
}
function value_58392(a0) { // fn#58392, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7440:1887, offset: 0x016c66e9, size: 50 bytes, params: 2, frame: 13
let value = environment.__proto__;
value = require(1391) /* metro dependency 1391: FlagUtils */;
return value.hasFlag(this.flags, a0);
}
function value_58393(a0) { // fn#58393, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7440:1971, offset: 0x016c671b, size: 258 bytes, params: 2, frame: 16
var allowedCountries;
const countryListMode = this.countryListMode;
const CountryListMode = (require(7263) /* metro dependency 7263: constants */).CountryListMode;
const ALLOWLIST = CountryListMode.ALLOWLIST;
if (countryListMode === ALLOWLIST) {
allowedCountries = this.allowedCountries;
return !allowedCountries.includes(a0);
}
const promotionType = this.promotionType;
const PromotionTypes = (require(7263) /* metro dependency 7263: constants */).PromotionTypes;
const THIRD_PARTY_INBOUND = PromotionTypes.THIRD_PARTY_INBOUND;
if (THIRD_PARTY_INBOUND === promotionType) {
return this.inboundRestrictedCountries.includes(a0);
}
const THIRD_PARTY_DIRECT_FULFILLMENT = PromotionTypes.THIRD_PARTY_DIRECT_FULFILLMENT;
if (THIRD_PARTY_DIRECT_FULFILLMENT === promotionType) {
return this.inboundRestrictedCountries.includes(a0);
}
const THIRD_PARTY_OUTBOUND = PromotionTypes.THIRD_PARTY_OUTBOUND;
if (THIRD_PARTY_OUTBOUND === promotionType) {
return this.outboundRestrictedCountries.includes(a0);
}
const THIRD_PARTY_OUTBOUND_RECURRING = PromotionTypes.THIRD_PARTY_OUTBOUND_RECURRING;
if (THIRD_PARTY_OUTBOUND_RECURRING === promotionType) {
return this.outboundRestrictedCountries.includes(a0);
}
return false;
}
function value_58395(a0) { // fn#58395, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7440:2593, offset: 0x016c683a, size: 687 bytes, params: 2, frame: 18
var r1;
const object2 = {};
object2.id = a0.id;
object2.trialId = a0.trial_id;
let Date = global.Date;
let date = new Date(a0.start_date);
object2.startDate = date;
Date = global.Date;
object2.endDate = new Date(a0.end_date);
const outbound_redemption_end_date = a0.outbound_redemption_end_date;
date = null;
if (date != outbound_redemption_end_date) {
date = new global.Date(a0.outbound_redemption_end_date);
} else {
r1 = date;
}
object2.outboundRedemptionEndDate = r1;
const inbound_header_text = a0.inbound_header_text;
const value4 = '';
let r5 = date != inbound_header_text ? inbound_header_text : value4;
object2.inboundHeaderText = r5;
const inbound_body_text = a0.inbound_body_text;
object2.inboundBodyText = date != inbound_body_text ? inbound_body_text : value4;
const inbound_help_center_link = a0.inbound_help_center_link;
object2.inboundHelpCenterLink = date != inbound_help_center_link ? inbound_help_center_link : value4;
const outbound_title = a0.outbound_title;
object2.outboundTitle = date != outbound_title ? outbound_title : value4;
const outbound_redemption_modal_body = a0.outbound_redemption_modal_body;
object2.outboundRedemptionModalBody = date != outbound_redemption_modal_body ? outbound_redemption_modal_body : value4;
const outbound_terms_and_conditions = a0.outbound_terms_and_conditions;
object2.outboundTermsAndConditions = date != outbound_terms_and_conditions ? outbound_terms_and_conditions : value4;
const outbound_redemption_page_link = a0.outbound_redemption_page_link;
object2.outboundRedemptionPageLink = date != outbound_redemption_page_link ? outbound_redemption_page_link : value4;
const outbound_redemption_url_format = a0.outbound_redemption_url_format;
object2.outboundRedemptionUrlFormat = date != outbound_redemption_url_format ? outbound_redemption_url_format : value4;
object2.flags = a0.flags;
object2.inboundRestrictedCountries = a0.inbound_restricted_countries;
object2.outboundRestrictedCountries = a0.outbound_restricted_countries;
const allowed_countries = a0.allowed_countries;
object2.allowedCountries = date != allowed_countries ? allowed_countries : [];
const country_list_mode = a0.country_list_mode;
object2.countryListMode = date != country_list_mode ? country_list_mode : (require(7263) /* metro dependency 7263: constants */).CountryListMode.BLOCKLIST;
object2.promotionType = a0.promotion_type;
const partner_id = a0.partner_id;
object2.partnerId = date != partner_id ? partner_id : date;
const marketing_components = a0.marketing_components;
object2.marketingComponents = date != marketing_components ? marketing_components : [];
const metadata = a0.metadata;
const value6 = undefined;
const reward_sku_ids = date == metadata || date == metadata.premium_promotion ? value6 : metadata.premium_promotion.reward_sku_ids;
r5 = date != reward_sku_ids ? reward_sku_ids : date == a0.metadata || date == a0.metadata.gift_promotion ? value6 : a0.metadata.gift_promotion.reward_sku_ids;
r5 = date == r5 ? [] : r5;
object2.rewardSkuIds = r5;
const promotion_key = a0.promotion_key;
object2.promotionKey = date != promotion_key ? promotion_key : value4;
date = Object.create(PromotionRecord.prototype, {constructor: {value: PromotionRecord}});
const promotionRecord = new PromotionRecord(object2);
return promotionRecord instanceof Object ? promotionRecord : date;
}
global.__d(_fun58384, 7262, [6, 7, 15, 17, 18, 1886, 1880, 7263, 1391,
2]) /* metro module 7262, dependencies: [6, 7, 15, 17, 18, 1886, 1880, 7263, 1391, 2] */;
+65 -58
View File
@@ -1,74 +1,81 @@
/* Metro module 10579; source: records/SpotifyApplicationRecord.tsx; dependencies: [6, 7, 15, 17, 18, 4235, 4915, 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 ApplicationRecord from './ApplicationRecord.tsx'; /* Metro dependency 4235 */
import Platforms from '../lib/Platforms.tsx'; /* Metro dependency 4915 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun81599(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81599, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10765:6, offset: 0x01ed78c1, size: 262 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(6) /* metro dependency 6 */;
const env0_1 = importDefault(7) /* metro dependency 7 */;
const env0_2 = importDefault(15) /* metro dependency 15 */;
const env0_3 = importDefault(17) /* metro dependency 17 */;
const env0_4 = importDefault(18) /* metro dependency 18 */;
let value = importDefault(4235) /* metro dependency 4235: ApplicationRecord */;
const env0_5 = (importDefault(4915) /* metro dependency 4915: Platforms */).get('spotify');
let value = ApplicationRecord;
const env0_5 = (Platforms).get('spotify');
value = _fun81603(value);
const value4 = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('records/SpotifyApplicationRecord.tsx');
(FileImportTrackerModule).fileFinishedImporting('records/SpotifyApplicationRecord.tsx');
exports.default = value;
exports.SPOTIFY_APPLICATION_ID = 'spotify';
exports.SpotifyApplication = value4;
}
function _isNativeReflectConstruct_81600() { // fn#81600, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10765:158, offset: 0x01ed79c7, 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) {
function _isNativeReflectConstruct_81600() { // fn#81600, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10765:158, offset: 0x01ed79c7, 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_81600_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_81600_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun81603(a0) { // fn#81603, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10765:386, offset: 0x01ed7a29, size: 99 bytes, params: 2, frame: 16
const closure = SpotifyApplicationRecord;
env0_4(closure, a0);
return env0_1(closure, [{key: 'getIconURL', value: value_81605}, {key: 'getWhiteIconURL', value: value_81606}]);
}
function _fun81603(a0) { // fn#81603, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10765:386, offset: 0x01ed7a29, size: 99 bytes, params: 2, frame: 16
const SpotifyApplicationRecord2 = SpotifyApplicationRecord;
Inherits(SpotifyApplicationRecord2, a0);
return CreateClass(SpotifyApplicationRecord2, [{key: 'getIconURL', value: value_81605}, {key: 'getWhiteIconURL',
value: value_81606}]);
function SpotifyApplicationRecord() { // fn#81604, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10765:398, offset: 0x01ed7a8c, size: 139 bytes, params: 1, frame: 20
env1_0(this, SpotifyApplicationRecord);
const items2 = [{}];
const value3 = env1_3(SpotifyApplicationRecord);
const value6 = env1_2(this, _isNativeReflectConstruct_81600() ? global.Reflect.construct(value3, items2,
env1_3(this).constructor) : value3.apply(this, items2));
value6.id = 'spotify';
value6.name = env1_5.name;
return value6;
}
function SpotifyApplicationRecord() { // fn#81604, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10765:398, offset: 0x01ed7a8c, size: 139 bytes, params: 1, frame: 20
env1_0(this, SpotifyApplicationRecord);
const items2 = [{}];
const value3 = env1_3(SpotifyApplicationRecord);
const value6 = env1_2(this, _isNativeReflectConstruct_81600() ? global.Reflect.construct(value3, items2,
env1_3(this).constructor) : value3.apply(this, items2));
value6.id = 'spotify';
value6.name = env1_5.name;
return value6;
}
function value_81605() { // fn#81605, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10765:762, offset: 0x01ed7b17, size: 20 bytes, params: 1, frame: 1
return env1_5.icon.lightPNG;
}
function value_81605() { // fn#81605, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10765:762, offset: 0x01ed7b17, size: 20 bytes, params: 1, frame: 1
return env1_5.icon.lightPNG;
}
function value_81606() { // fn#81606, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10765:827, offset: 0x01ed7b2b, size: 20 bytes, params: 1, frame: 1
return env1_5.icon.whitePNG;
}
}
function value_81606() { // fn#81606, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10765:827, offset: 0x01ed7b2b, size: 20 bytes, params: 1, frame: 1
return env1_5.icon.whitePNG;
}
global.__d(_fun81599, 10579, [6, 7, 15, 17, 18, 4235, 4915,
2]) /* metro module 10579, dependencies: [6, 7, 15, 17, 18, 4235, 4915, 2] */;
+239 -232
View File
@@ -1,244 +1,251 @@
/* Metro module 13047; source: records/StoreListingRecord.tsx; dependencies: [6, 7, 15, 17, 18, 1886, 1885, 13048, 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 UserRecord from './UserRecord.tsx'; /* Metro dependency 1885 */
import Record from '../lib/Record.tsx'; /* Metro dependency 1886 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun99644(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#99644, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13237:6, offset: 0x021cfcfa, size: 222 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(6) /* metro dependency 6 */;
const env0_3 = importDefault(7) /* metro dependency 7 */;
const env0_4 = importDefault(15) /* metro dependency 15 */;
const env0_5 = importDefault(17) /* metro dependency 17 */;
const env0_6 = importDefault(18) /* metro dependency 18 */;
let value = importDefault(1886) /* metro dependency 1886: Record */;
const userRecord = importDefault(1885) /* metro dependency 1885: UserRecord */;
let value = Record;
value = _fun99648(value);
(require(2) /* metro dependency 2 */).fileFinishedImporting('records/StoreListingRecord.tsx');
(FileImportTrackerModule).fileFinishedImporting('records/StoreListingRecord.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_99645() { // fn#99645, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13237:168, offset: 0x021cfdd8, 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_99645_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun99648(a0) { // fn#99648, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13237:367, offset: 0x021cfe3a, size: 102 bytes, params: 2, frame: 17
const closure = StoreListingRecord;
env0_6(closure, a0);
return env0_3(closure, [{key: 'isSlimDirectoryVersion', value: function() {
return this.description == null;
}}], [{key: 'createFromServer', value: value_99651}]);
}
function StoreListingRecord({id, applicationId, skuId, skuFlags, summary, tagline, flavorText, description, carouselItems, childSkuIds, alternativeSkuIds, assets, staffNotes, guild, thumbnail, boxArt, previewVideo, headerBackground, headerLogoDarkTheme, headerLogoLightTheme, heroBackground, heroVideo, entitlementBranchId, benefits, published}) { // fn#99649, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13237:379, offset: 0x021cfea0, size: 561 bytes, params: 2, frame: 20
let value = environment.__proto__;
env1_2(this, StoreListingRecord);
const value3 = env1_5(StoreListingRecord);
value = env1_4(this, _isNativeReflectConstruct_99645() ? global.Reflect.construct(value3, [],
env1_5(this).constructor) : value3.apply(this, undefined));
value.id = id;
value.applicationId = applicationId;
value.skuId = skuId;
value.skuFlags = skuFlags;
value.summary = summary;
value.tagline = tagline;
value.flavorText = flavorText;
value.description = description;
value.carouselItems = carouselItems ?? [];
value.childSkuIds = childSkuIds ?? [];
value.alternativeSkuIds = alternativeSkuIds ?? [];
value.assets = assets ?? [];
value.staffNotes = staffNotes;
value.guild = guild;
value.thumbnail = thumbnail ?? null;
value.boxArt = boxArt ?? null;
value.previewVideo = previewVideo ?? null;
value.headerBackground = headerBackground ?? null;
value.headerLogoDarkTheme = headerLogoDarkTheme ?? null;
value.headerLogoLightTheme = headerLogoLightTheme ?? null;
value.heroBackground = heroBackground ?? null;
value.heroVideo = heroVideo ?? null;
value.entitlementBranchId = entitlementBranchId ?? null;
value.benefits = benefits;
const Boolean = global.Boolean;
value.published = Boolean(published);
return value;
}
function value_99651(a0) { // fn#99651, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13237:1705, offset: 0x021d00e1, size: 1051 bytes, params: 2, frame: 19
var environment;
var r4;
var r6;
var r3;
var object4;
var user;
var value7;
var userRecord;
var object5;
var value10;
var moduleValue;
var value12;
var moduleValue2;
var value14;
var moduleValue3;
var value16;
var moduleValue4;
var value18;
var moduleValue5;
var value20;
var moduleValue6;
var value22;
var moduleValue7;
const staff_notes = a0.staff_notes;
const object6 = {};
object6.id = a0.id;
object6.applicationId = a0.sku.application_id;
object6.skuId = a0.sku.id;
object6.skuFlags = a0.sku.flags;
object6.summary = a0.summary;
object6.tagline = a0.tagline;
object6.flavorText = a0.flavor_text;
object6.description = a0.description;
const child_skus = a0.child_skus;
let value = null;
object6.childSkuIds = value != child_skus ? a0.child_skus.map(function(a0) {
return a0.id;
}) : value;
object6.alternativeSkuIds = value != a0.alternative_skus ? a0.alternative_skus.map(function(a0) {
return a0.id;
}) : value;
object6.carouselItems = value != a0.carousel_items ? a0.carousel_items.map(function(a0) {
return {assetId: a0.asset_id, youtubeVideoId: a0.youtube_video_id};
}) : value;
object6.assets = value != a0.assets ? a0.assets.map((require(13048) /* metro dependency 13048: GameStoreAsset */).transformStoreAssetFromServer) : value;
if (value != staff_notes) {
object4 = {};
object4.content = staff_notes.content;
user = staff_notes.user;
if (value != user) {
value7 = environment.__proto__;
user = staff_notes.user;
userRecord = new UserRecord();
} else {
r6 = value;
function _isNativeReflectConstruct_99645() { // fn#99645, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13237:168, offset: 0x021cfdd8, 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) {
}
object4.user = r6;
r4 = object4;
} else {
r4 = value;
return (_isNativeReflectConstruct_99645_isNativeReflectConstruct = function() {
return !!result;
})();
}
object6.staffNotes = r4;
let guild = a0.guild;
if (value != guild) {
object5 = {};
guild = a0.guild;
object5.id = guild.id;
guild = a0.guild;
object5.name = guild.name;
guild = a0.guild;
object5.icon = guild.icon;
guild = a0.guild;
object5.approximateMemberCount = guild.approximate_member_count;
guild = a0.guild;
object5.approximatePresenceCount = guild.approximate_presence_count;
r4 = object5;
} else {
r4 = value;
function _fun99648(a0) { // fn#99648, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13237:367, offset: 0x021cfe3a, size: 102 bytes, params: 2, frame: 17
const StoreListingRecord2 = StoreListingRecord;
Inherits(StoreListingRecord2, a0);
return CreateClass(StoreListingRecord2, [{key: 'isSlimDirectoryVersion', value: function() {
return this.description == null;
}}], [{key: 'createFromServer', value: value_99651}]);
function StoreListingRecord({id, applicationId, skuId, skuFlags, summary, tagline, flavorText, description, carouselItems, childSkuIds, alternativeSkuIds, assets, staffNotes, guild, thumbnail, boxArt, previewVideo, headerBackground, headerLogoDarkTheme, headerLogoLightTheme, heroBackground, heroVideo, entitlementBranchId, benefits, published}) { // fn#99649, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13237:379, offset: 0x021cfea0, size: 561 bytes, params: 2, frame: 20
let value = environment.__proto__;
env1_2(this, StoreListingRecord);
const value3 = env1_5(StoreListingRecord);
value = env1_4(this, _isNativeReflectConstruct_99645() ? global.Reflect.construct(value3, [],
env1_5(this).constructor) : value3.apply(this, undefined));
value.id = id;
value.applicationId = applicationId;
value.skuId = skuId;
value.skuFlags = skuFlags;
value.summary = summary;
value.tagline = tagline;
value.flavorText = flavorText;
value.description = description;
value.carouselItems = carouselItems ?? [];
value.childSkuIds = childSkuIds ?? [];
value.alternativeSkuIds = alternativeSkuIds ?? [];
value.assets = assets ?? [];
value.staffNotes = staffNotes;
value.guild = guild;
value.thumbnail = thumbnail ?? null;
value.boxArt = boxArt ?? null;
value.previewVideo = previewVideo ?? null;
value.headerBackground = headerBackground ?? null;
value.headerLogoDarkTheme = headerLogoDarkTheme ?? null;
value.headerLogoLightTheme = headerLogoLightTheme ?? null;
value.heroBackground = heroBackground ?? null;
value.heroVideo = heroVideo ?? null;
value.entitlementBranchId = entitlementBranchId ?? null;
value.benefits = benefits;
const Boolean = global.Boolean;
value.published = Boolean(published);
return value;
}
function value_99651(a0) { // fn#99651, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13237:1705, offset: 0x021d00e1, size: 1051 bytes, params: 2, frame: 19
var environment;
var r4;
var r6;
var r3;
var object;
var user;
var value7;
var userRecordBinding;
var userRecord2;
var object2;
var value10;
var moduleValue;
var value12;
var moduleValue2;
var value14;
var moduleValue3;
var value16;
var moduleValue4;
var value18;
var moduleValue5;
var value20;
var moduleValue6;
var value22;
var moduleValue7;
const staff_notes = a0.staff_notes;
const object3 = {};
object3.id = a0.id;
object3.applicationId = a0.sku.application_id;
object3.skuId = a0.sku.id;
object3.skuFlags = a0.sku.flags;
object3.summary = a0.summary;
object3.tagline = a0.tagline;
object3.flavorText = a0.flavor_text;
object3.description = a0.description;
const child_skus = a0.child_skus;
let value = null;
object3.childSkuIds = value != child_skus ? a0.child_skus.map(function(a0) {
return a0.id;
}) : value;
object3.alternativeSkuIds = value != a0.alternative_skus ? a0.alternative_skus.map(function(a0) {
return a0.id;
}) : value;
object3.carouselItems = value != a0.carousel_items ? a0.carousel_items.map(function(a0) {
return {assetId: a0.asset_id, youtubeVideoId: a0.youtube_video_id};
}) : value;
object3.assets = value != a0.assets ? a0.assets.map((require(13048) /* metro dependency 13048: GameStoreAsset */).transformStoreAssetFromServer) : value;
if (value != staff_notes) {
object = {};
object.content = staff_notes.content;
user = staff_notes.user;
if (value != user) {
value7 = environment.__proto__;
userRecordBinding = UserRecord;
user = staff_notes.user;
userRecord2 = new userRecordBinding();
} else {
r6 = value;
}
object.user = r6;
r4 = object;
} else {
r4 = value;
}
object3.staffNotes = r4;
let guild = a0.guild;
if (value != guild) {
object2 = {};
guild = a0.guild;
object2.id = guild.id;
guild = a0.guild;
object2.name = guild.name;
guild = a0.guild;
object2.icon = guild.icon;
guild = a0.guild;
object2.approximateMemberCount = guild.approximate_member_count;
guild = a0.guild;
object2.approximatePresenceCount = guild.approximate_presence_count;
r4 = object2;
} else {
r4 = value;
}
object3.guild = r4;
if (value != a0.thumbnail) {
value10 = environment.__proto__;
moduleValue = require(13048) /* metro dependency 13048: GameStoreAsset */;
r4 = moduleValue.transformStoreAssetFromServer(a0.thumbnail);
} else {
r4 = value;
}
object3.thumbnail = r4;
if (value != a0.preview_video) {
value12 = environment.__proto__;
moduleValue2 = require(13048) /* metro dependency 13048: GameStoreAsset */;
r4 = moduleValue2.transformStoreAssetFromServer(a0.preview_video);
} else {
r4 = value;
}
object3.previewVideo = r4;
if (value != a0.header_background) {
value14 = environment.__proto__;
moduleValue3 = require(13048) /* metro dependency 13048: GameStoreAsset */;
r4 = moduleValue3.transformStoreAssetFromServer(a0.header_background);
} else {
r4 = value;
}
object3.headerBackground = r4;
if (value != a0.header_logo_dark_theme) {
value16 = environment.__proto__;
moduleValue4 = require(13048) /* metro dependency 13048: GameStoreAsset */;
r4 = moduleValue4.transformStoreAssetFromServer(a0.header_logo_dark_theme);
} else {
r4 = value;
}
object3.headerLogoDarkTheme = r4;
if (value != a0.header_logo_light_theme) {
value18 = environment.__proto__;
moduleValue5 = require(13048) /* metro dependency 13048: GameStoreAsset */;
r4 = moduleValue5.transformStoreAssetFromServer(a0.header_logo_light_theme);
} else {
r4 = value;
}
object3.headerLogoLightTheme = r4;
if (value != a0.box_art) {
value20 = environment.__proto__;
moduleValue6 = require(13048) /* metro dependency 13048: GameStoreAsset */;
r4 = moduleValue6.transformStoreAssetFromServer(a0.box_art);
} else {
r4 = value;
}
object3.boxArt = r4;
if (value != a0.hero_background) {
value22 = environment.__proto__;
moduleValue7 = require(13048) /* metro dependency 13048: GameStoreAsset */;
r4 = moduleValue7.transformStoreAssetFromServer(a0.hero_background);
} else {
r4 = value;
}
object3.heroBackground = r4;
if (value != a0.hero_video) {
value = environment.__proto__;
value = require(13048) /* metro dependency 13048: GameStoreAsset */;
value = value.transformStoreAssetFromServer(a0.hero_video);
r3 = value;
} else {
r3 = value;
}
object3.heroVideo = r3;
object3.entitlementBranchId = a0.entitlement_branch_id;
object3.benefits = a0.benefits;
object3.published = a0.published;
value = Object.create(StoreListingRecord.prototype, {constructor: {value: StoreListingRecord}});
const storeListingRecord = new StoreListingRecord(object3);
return storeListingRecord instanceof Object ? storeListingRecord : value;
}
}
object6.guild = r4;
if (value != a0.thumbnail) {
value10 = environment.__proto__;
moduleValue = require(13048) /* metro dependency 13048: GameStoreAsset */;
r4 = moduleValue.transformStoreAssetFromServer(a0.thumbnail);
} else {
r4 = value;
}
object6.thumbnail = r4;
if (value != a0.preview_video) {
value12 = environment.__proto__;
moduleValue2 = require(13048) /* metro dependency 13048: GameStoreAsset */;
r4 = moduleValue2.transformStoreAssetFromServer(a0.preview_video);
} else {
r4 = value;
}
object6.previewVideo = r4;
if (value != a0.header_background) {
value14 = environment.__proto__;
moduleValue3 = require(13048) /* metro dependency 13048: GameStoreAsset */;
r4 = moduleValue3.transformStoreAssetFromServer(a0.header_background);
} else {
r4 = value;
}
object6.headerBackground = r4;
if (value != a0.header_logo_dark_theme) {
value16 = environment.__proto__;
moduleValue4 = require(13048) /* metro dependency 13048: GameStoreAsset */;
r4 = moduleValue4.transformStoreAssetFromServer(a0.header_logo_dark_theme);
} else {
r4 = value;
}
object6.headerLogoDarkTheme = r4;
if (value != a0.header_logo_light_theme) {
value18 = environment.__proto__;
moduleValue5 = require(13048) /* metro dependency 13048: GameStoreAsset */;
r4 = moduleValue5.transformStoreAssetFromServer(a0.header_logo_light_theme);
} else {
r4 = value;
}
object6.headerLogoLightTheme = r4;
if (value != a0.box_art) {
value20 = environment.__proto__;
moduleValue6 = require(13048) /* metro dependency 13048: GameStoreAsset */;
r4 = moduleValue6.transformStoreAssetFromServer(a0.box_art);
} else {
r4 = value;
}
object6.boxArt = r4;
if (value != a0.hero_background) {
value22 = environment.__proto__;
moduleValue7 = require(13048) /* metro dependency 13048: GameStoreAsset */;
r4 = moduleValue7.transformStoreAssetFromServer(a0.hero_background);
} else {
r4 = value;
}
object6.heroBackground = r4;
if (value != a0.hero_video) {
value = environment.__proto__;
value = require(13048) /* metro dependency 13048: GameStoreAsset */;
value = value.transformStoreAssetFromServer(a0.hero_video);
r3 = value;
} else {
r3 = value;
}
object6.heroVideo = r3;
object6.entitlementBranchId = a0.entitlement_branch_id;
object6.benefits = a0.benefits;
object6.published = a0.published;
value = Object.create(StoreListingRecord.prototype, {constructor: {value: StoreListingRecord}});
const storeListingRecord = new StoreListingRecord(object6);
return storeListingRecord instanceof Object ? storeListingRecord : value;
}
global.__d(_fun99644, 13047, [6, 7, 15, 17, 18, 1886, 1885, 13048,
2]) /* metro module 13047, dependencies: [6, 7, 15, 17, 18, 1886, 1885, 13048, 2] */;
+218 -216
View File
@@ -1,22 +1,22 @@
/* Metro module 3803; source: records/SubscriptionPlanRecord.tsx; dependencies: [6, 7, 15, 17, 18, 1886, 1880, 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 */
import * as PremiumConstantsModule from '../modules/premium/PremiumConstants.tsx'; /* Metro dependency 1880 */
function _fun29196(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#29196, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3930:6, offset: 0x00fbcd98, size: 262 bytes, params: 8, frame: 20
const closure = function(a0, a1) {
return {amount: a0.amount, currency: a0.currency, tax: 0, taxInclusive: a1};
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(6) /* metro dependency 6 */;
const env0_1 = importDefault(7) /* metro dependency 7 */;
const env0_2 = importDefault(15) /* metro dependency 15 */;
const env0_3 = importDefault(17) /* metro dependency 17 */;
const env0_4 = importDefault(18) /* metro dependency 18 */;
let value = importDefault(1886) /* metro dependency 1886: Record */;
const premiumConstantsModule = require(1880) /* metro dependency 1880: PremiumConstants */;
const env0_5 = premiumConstantsModule.PremiumSubscriptionSKUs;
const env0_6 = premiumConstantsModule.PremiumTypes;
const env0_7 = premiumConstantsModule.SubscriptionPlans;
let value = Record;
value = _fun29201(value);
(require(2) /* metro dependency 2 */).fileFinishedImporting('records/SubscriptionPlanRecord.tsx');
(FileImportTrackerModule).fileFinishedImporting('records/SubscriptionPlanRecord.tsx');
exports.default = value;
exports.getPriceFromServer = closure;
exports.isNoneSubscription = function(a0) {
@@ -24,223 +24,225 @@ function _fun29196(global, require, importDefault, importAll, module, exports, d
return [NONE_MONTH, SubscriptionPlans.NONE_3_MONTH, SubscriptionPlans.NONE_6_MONTH,
SubscriptionPlans.NONE_YEAR].includes(a0);
};
}
function _isNativeReflectConstruct_29197() { // fn#29197, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3930:235, offset: 0x00fbce9e, 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) {
function _isNativeReflectConstruct_29197() { // fn#29197, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3930:235, offset: 0x00fbce9e, 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_29197_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_29197_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun29201(a0) { // fn#29201, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3930:532, offset: 0x00fbcf28, size: 121 bytes, params: 2, frame: 17
const closure = SubscriptionPlanRecord;
env0_4(closure, a0);
return env0_1(closure, [{key: 'premiumSubscriptionType', get: function() {
var skuId = this.skuId;
if (PremiumSubscriptionSKUs.LEGACY === skuId) {
return PremiumTypes.TIER_2;
function _fun29201(a0) { // fn#29201, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3930:532, offset: 0x00fbcf28, size: 121 bytes, params: 2, frame: 17
const SubscriptionPlanRecord2 = SubscriptionPlanRecord;
Inherits(SubscriptionPlanRecord2, a0);
return CreateClass(SubscriptionPlanRecord2, [{key: 'premiumSubscriptionType', get: function() {
var skuId = this.skuId;
if (PremiumSubscriptionSKUs.LEGACY === skuId) {
return PremiumTypes.TIER_2;
}
if (PremiumSubscriptionSKUs.TIER_2 === skuId) {
return PremiumTypes.TIER_2;
}
if (PremiumSubscriptionSKUs.TIER_1 === skuId) {
return PremiumTypes.TIER_1;
}
if (PremiumSubscriptionSKUs.TIER_0 === skuId) {
return PremiumTypes.TIER_0;
}
return null;
}}, {key: 'toServerData', value: value_29204}], [{key: 'createFromServer', value: value_29206}]);
function SubscriptionPlanRecord({id, name, interval, intervalCount, taxInclusive, skuId, currency, price, prices}) { // fn#29202, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3930:544, offset: 0x00fbcfa1, size: 216 bytes, params: 2, frame: 20
let value = environment.__proto__;
env1_0(this, SubscriptionPlanRecord);
const value3 = env1_3(SubscriptionPlanRecord);
value = env1_2(this, _isNativeReflectConstruct_29197() ? global.Reflect.construct(value3, [],
env1_3(this).constructor) : value3.apply(this, undefined));
value.id = id;
value.name = name;
value.interval = interval;
value.intervalCount = intervalCount;
value.taxInclusive = taxInclusive;
value.skuId = skuId;
value.currency = currency;
value.price = price;
value.prices = prices;
return value;
}
if (PremiumSubscriptionSKUs.TIER_2 === skuId) {
return PremiumTypes.TIER_2;
function value_29204() { // fn#29204, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3930:1247, offset: 0x00fbd0e4, size: 157 bytes, params: 1, frame: 14
const Object = global.Object;
Object.keys(this.prices).forEach(_fun29205);
return {id: this.id, name: this.name, sku_id: this.skuId, interval: this.interval,
interval_count: this.intervalCount, tax_inclusive: this.taxInclusive, currency: this.currency,
price: this.price, prices: {}, price_tier: this.price};
function _fun29205(a0) { // fn#29205, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3930:1308, offset: 0x00fbd181, size: 86 bytes, params: 2, frame: 6
const property = ClassCallCheck.prices[a0];
CreateClass[a0] = {country_prices: {country_code: property.countryPrices.countryCode,
prices: property.countryPrices.prices}, payment_source_prices: property.paymentSourcePrices};
}
}
if (PremiumSubscriptionSKUs.TIER_1 === skuId) {
return PremiumTypes.TIER_1;
}
if (PremiumSubscriptionSKUs.TIER_0 === skuId) {
return PremiumTypes.TIER_0;
}
return null;
}}, {key: 'toServerData', value: value_29204}], [{key: 'createFromServer', value: value_29206}]);
}
function SubscriptionPlanRecord({id, name, interval, intervalCount, taxInclusive, skuId, currency, price, prices}) { // fn#29202, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3930:544, offset: 0x00fbcfa1, size: 216 bytes, params: 2, frame: 20
let value = environment.__proto__;
env1_0(this, SubscriptionPlanRecord);
const value3 = env1_3(SubscriptionPlanRecord);
value = env1_2(this, _isNativeReflectConstruct_29197() ? global.Reflect.construct(value3, [],
env1_3(this).constructor) : value3.apply(this, undefined));
value.id = id;
value.name = name;
value.interval = interval;
value.intervalCount = intervalCount;
value.taxInclusive = taxInclusive;
value.skuId = skuId;
value.currency = currency;
value.price = price;
value.prices = prices;
return value;
}
function value_29204() { // fn#29204, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3930:1247, offset: 0x00fbd0e4, size: 157 bytes, params: 1, frame: 14
const Object = global.Object;
Object.keys(this.prices).forEach(_fun29205);
return {id: this.id, name: this.name, sku_id: this.skuId, interval: this.interval,
interval_count: this.intervalCount, tax_inclusive: this.taxInclusive, currency: this.currency,
price: this.price, prices: {}, price_tier: this.price};
}
function value_29206(a0) { // fn#29206, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3930:1715, offset: 0x00fbd1d7, size: 188 bytes, params: 2, frame: 15
var r1;
var Object;
var value;
const env0_0 = a0;
let object2 = {};
if (a0.prices == null) {
r1 = object2;
} else {
Object = global.Object;
value = Object.keys(a0.prices);
value = value.reduce(_fun29207, {});
r1 = value;
}
object2 = {};
object2.id = a0.id;
object2.name = a0.name;
object2.interval = a0.interval;
object2.intervalCount = a0.interval_count;
object2.taxInclusive = a0.tax_inclusive;
object2.skuId = a0.sku_id;
object2.currency = a0.currency;
object2.price = a0.price;
object2.prices = r1;
value = Object.create(SubscriptionPlanRecord.prototype, {constructor: {value: SubscriptionPlanRecord}});
const subscriptionPlanRecord = new SubscriptionPlanRecord(object2);
return subscriptionPlanRecord instanceof Object ? subscriptionPlanRecord : value;
}
function _fun29205(a0) { // fn#29205, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3930:1308, offset: 0x00fbd181, size: 86 bytes, params: 2, frame: 6
const property = env0_0.prices[a0];
env0_1[a0] = {country_prices: {country_code: property.countryPrices.countryCode,
prices: property.countryPrices.prices}, payment_source_prices: property.paymentSourcePrices};
}
function _fun29207(a0, a1) { // fn#29207, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3930:1792, offset: 0x00fbd293, size: 159 bytes, params: 3, frame: 18
let prices = env0_0.prices;
if (prices != null) {
prices = env0_0.prices;
var property = prices[a1];
var object3 = {};
var object4 = {};
var country_prices = property.country_prices;
object4.countryCode = country_prices.country_code;
country_prices = property.country_prices;
prices = country_prices.prices;
object4.prices = prices.map(_fun29208);
object3.countryPrices = object4;
var Object = global.Object;
object3.paymentSourcePrices = Object.entries(property.payment_source_prices).reduce(function(a0, a1) {
function value_29206(a0) { // fn#29206, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3930:1715, offset: 0x00fbd1d7, size: 188 bytes, params: 2, frame: 15
var r1;
var r3;
var r4;
var item3;
var value3;
var iterator = a1[Symbol.iterator]();
var iterator2 = iterator.next;
var item2 = Reflect.apply(iterator2, iterator, []);
var item = item2.value;
item2 = item2.done ? undefined : iterator;
var value = undefined;
var value2 = item2 === value;
var r2 = value2 ? value : item;
if (value2) {
r1 = item2;
r3 = value2;
r4 = value;
var Object;
var value;
const env0_0 = a0;
let object = {};
if (a0.prices == null) {
r1 = object;
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
if (value3) {
r1 = item3;
r3 = value3;
r4 = value;
} else {
r1 = item3;
r3 = value3;
r4 = item;
Object = global.Object;
value = Object.keys(a0.prices);
value = value.reduce(_fun29207, {});
r1 = value;
}
object = {};
object.id = a0.id;
object.name = a0.name;
object.interval = a0.interval;
object.intervalCount = a0.interval_count;
object.taxInclusive = a0.tax_inclusive;
object.skuId = a0.sku_id;
object.currency = a0.currency;
object.price = a0.price;
object.prices = r1;
value = Object.create(SubscriptionPlanRecord.prototype, {constructor: {value: SubscriptionPlanRecord}});
const subscriptionPlanRecord = new SubscriptionPlanRecord(object);
return subscriptionPlanRecord instanceof Object ? subscriptionPlanRecord : value;
function _fun29207(a0, a1) { // fn#29207, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3930:1792, offset: 0x00fbd293, size: 159 bytes, params: 3, frame: 18
let prices = env0_0.prices;
if (prices != null) {
prices = env0_0.prices;
var property = prices[a1];
var object = {};
var object2 = {};
var country_prices = property.country_prices;
object2.countryCode = country_prices.country_code;
country_prices = property.country_prices;
prices = country_prices.prices;
object2.prices = prices.map(_fun29208);
object.countryPrices = object2;
var Object = global.Object;
object.paymentSourcePrices = Object.entries(property.payment_source_prices).reduce(function(a0, a1) {
var r1;
var r3;
var r4;
var item3;
var value3;
var iterator = a1[Symbol.iterator]();
var iterator2 = iterator.next;
var item2 = Reflect.apply(iterator2, iterator, []);
var item = item2.value;
item2 = item2.done ? undefined : iterator;
var value = undefined;
var value2 = item2 === value;
var r2 = value2 ? value : item;
if (value2) {
r1 = item2;
r3 = value2;
r4 = value;
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
if (value3) {
r1 = item3;
r3 = value3;
r4 = value;
} else {
r1 = item3;
r3 = value3;
r4 = item;
}
}
if (!r3) {
r1.return();
}
a0[r2] = r4.map(_fun29210);
return a0;
}, {});
a0[a1] = object;
}
return a0;
function _fun29208(a0) { // fn#29208, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3930:1951, offset: 0x00fbd332, size: 33 bytes, params: 2, frame: 13
return getPriceFromServer(a0, env1_0.tax_inclusive);
}
}
if (!r3) {
r1.return();
}
a0[r2] = r4.map(_fun29210);
return a0;
}, {});
a0[a1] = object3;
}
return a0;
}
function _fun29208(a0) { // fn#29208, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3930:1951, offset: 0x00fbd332, size: 33 bytes, params: 2, frame: 13
return getPriceFromServer(a0, env1_0.tax_inclusive);
}
function _fun29209(a0, a1) { // fn#29209, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3930:2063, offset: 0x00fbd353, size: 89 bytes, params: 3, frame: 16
var r1;
var r3;
var r4;
var item3;
var value3;
const iterator = a1[Symbol.iterator]();
const iterator2 = iterator.next;
let item2 = Reflect.apply(iterator2, iterator, []);
let item = item2.value;
item2 = item2.done ? undefined : iterator;
const value = undefined;
const value2 = item2 === value;
const r2 = value2 ? value : item;
if (value2) {
r1 = item2;
r3 = value2;
r4 = value;
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
if (value3) {
r1 = item3;
r3 = value3;
r4 = value;
} else {
r1 = item3;
r3 = value3;
r4 = item;
}
}
if (!r3) {
r1.return();
}
a0[r2] = r4.map(_fun29210);
return a0;
function _fun29210(a0) { // fn#29210, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3930:2087, offset: 0x00fbd3ac, size: 33 bytes, params: 2, frame: 13
return getPriceFromServer(a0, env2_0.tax_inclusive);
}
}
}
function _fun29209(a0, a1) { // fn#29209, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3930:2063, offset: 0x00fbd353, size: 89 bytes, params: 3, frame: 16
var r1;
var r3;
var r4;
var item3;
var value3;
const iterator = a1[Symbol.iterator]();
const iterator2 = iterator.next;
let item2 = Reflect.apply(iterator2, iterator, []);
let item = item2.value;
item2 = item2.done ? undefined : iterator;
const value = undefined;
const value2 = item2 === value;
const r2 = value2 ? value : item;
if (value2) {
r1 = item2;
r3 = value2;
r4 = value;
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
if (value3) {
r1 = item3;
r3 = value3;
r4 = value;
} else {
r1 = item3;
r3 = value3;
r4 = item;
}
}
if (!r3) {
r1.return();
}
a0[r2] = r4.map(_fun29210);
return a0;
}
function _fun29210(a0) { // fn#29210, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3930:2087, offset: 0x00fbd3ac, size: 33 bytes, params: 2, frame: 13
return getPriceFromServer(a0, env2_0.tax_inclusive);
}
global.__d(_fun29196, 3803, [6, 7, 15, 17, 18, 1886, 1880,
2]) /* metro module 3803, dependencies: [6, 7, 15, 17, 18, 1886, 1880, 2] */;
+456 -440
View File
@@ -1,4 +1,17 @@
/* Metro module 3809; source: records/SubscriptionRecord.tsx; dependencies: [6, 7, 15, 17, 18, 1886, 3810, 3811, 661, 3813, 1880, 3814, 44, 477, 3815, 1900, 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 GooglePlayPriceChangeRecord from '../modules/premium/native/google_play_price_changes/GooglePlayPriceChangeRecord.tsx'; /* Metro dependency 3810 */
import InvoiceRecord from './InvoiceRecord.tsx'; /* Metro dependency 3811 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */
import * as PremiumConstantsModule from '../modules/premium/PremiumConstants.tsx'; /* Metro dependency 1880 */
import * as BillingConstantsModule from '../components/billing/BillingConstants.tsx'; /* Metro dependency 3813 */
function _fun29418(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#29418, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3936:6, offset: 0x00fc18ee, size: 379 bytes, params: 8, frame: 19
const env0_0 = require;
const createSubscriptionItemFromServer = function(a0) {
@@ -6,457 +19,460 @@ function _fun29418(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
let value = importDefault(1886) /* metro dependency 1886: Record */;
const googlePlayPriceChangeRecord = importDefault(3810) /* metro dependency 3810: GooglePlayPriceChangeRecord */;
const invoiceRecord = importDefault(3811) /* metro dependency 3811: InvoiceRecord */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_10 = constantsModule.PaymentGateways;
const env0_11 = constantsModule.SubscriptionStatusTypes;
const env0_12 = constantsModule.SubscriptionStatusTypesSets;
const env0_13 = constantsModule.SubscriptionTypes;
const billingConstantsModule = require(3813) /* metro dependency 3813: BillingConstants */;
const env0_14 = billingConstantsModule.SubscriptionPauseReason;
const env0_15 = billingConstantsModule.SubscriptionPauseReasonSets;
const premiumConstantsModule = require(1880) /* metro dependency 1880: PremiumConstants */;
const env0_16 = premiumConstantsModule.PREMIUM_PLANS;
const env0_17 = premiumConstantsModule.SubscriptionPlanInfo;
const env0_18 = premiumConstantsModule.SubscriptionPlans;
let value = Record;
value = _fun29423(value);
(require(2) /* metro dependency 2 */).fileFinishedImporting('records/SubscriptionRecord.tsx');
(FileImportTrackerModule).fileFinishedImporting('records/SubscriptionRecord.tsx');
exports.default = value;
exports.SubscriptionRecord = value;
}
function _isNativeReflectConstruct_29419() { // fn#29419, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3936:436, offset: 0x00fc1a69, 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_29419_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun29423(a0) { // fn#29423, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3936:733, offset: 0x00fc1aed, size: 785 bytes, params: 2, frame: 17
const closure = SubscriptionRecord;
env0_7(closure, a0);
return env0_4(closure, [{key: 'getCurrentSubscriptionPlanIdForGroup', value: function(a0) {
var env0_0 = a0;
return this.items.find(_fun29428)?.planId;
}}, {key: 'isPremium', get: function() {
return this.type === SubscriptionTypes.PREMIUM;
}}, {key: 'isACOM', get: function() {
return this.paymentGateway === PaymentGateways.APPLE_ADVANCED_COMMERCE;
}}, {key: 'planIdForCurrencies', get: get_29431}, {key: 'planIdFromItems', get: function() {
var Object = global.Object;
return this.getCurrentSubscriptionPlanIdForGroup(Object.values(SubscriptionPlans));
}}, {key: 'premiumPlanIdFromItems', get: function() {
var r4;
var items = [];
arraySpread(items, PREMIUM_PLANS, 0, r4);
return this.getCurrentSubscriptionPlanIdForGroup(items);
}}, {key: 'isPurchasedViaDesktop', get: function() {
return this.paymentGateway == null;
}}, {key: 'isPurchasedViaAppleGeneric', get: get_29435}, {key: 'isPurchasedViaApple', get: get_29436},
{key: 'isPurchasedViaGoogle', get: function() {
return this.paymentGateway === PaymentGateways.GOOGLE;
}}, {key: 'isPurchasedExternally', get: function() {
return this.isPurchasedViaApple || this.isPurchasedViaGoogle;
}}, {key: 'isOnPlatformMatchingExternalPaymentGateway', get: get_29439}, {key: 'hasExternalPlanChange',
get: function() {
return this.isPurchasedExternally && this.renewalMutations != null && this.paymentGatewayPlanId !== this.renewalMutations.paymentGatewayPlanId;
}}, {key: 'hasPremiumNitroMonthly', get: function() {
return this.items.find(_fun29442) != null;
}}, {key: 'isBoostOnly', get: function() {
return this.items.every(_fun29444);
}}, {key: 'isPausedOrPausePending', get: function() {
var ALL_PAUSE = SubscriptionStatusTypesSets.ALL_PAUSE;
return ALL_PAUSE.has(this.status);
}}, {key: 'isPaused', get: function() {
return this.status === SubscriptionStatusTypes.PAUSED;
}}, {key: 'isPausedForFractionalPremium', get: get_29447}, {key: 'isPausedAllowsUpdatesButNotResume',
get: get_29448}, {key: 'isPausedAllowsResumeButNotUpdates', get: get_29449}, {key: 'isEnded', get: function() {
return this.status === SubscriptionStatusTypes.ENDED;
}}, {key: 'endedAt', get: get_29451}, {key: 'isActive', get: function() {
return this.status === SubscriptionStatusTypes.ACTIVE;
}}, {key: 'statusAllowsPerks', get: function() {
var ALLOW_PERKS = SubscriptionStatusTypesSets.ALLOW_PERKS;
return ALLOW_PERKS.has(this.status);
}}, {key: 'hasActiveTrial', get: function() {
var r0;
var value2;
r0 = this.trialId != null && this.trialEndsAt != null;
if (r0) {
value2 = new global.Date();
value2 = value2 < this.trialEndsAt;
r0 = value2;
function _isNativeReflectConstruct_29419() { // fn#29419, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3936:436, offset: 0x00fc1a69, 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 r0;
}}, {key: 'hasActiveDiscount', get: function() {
var r0;
var value2;
var value3;
var value4;
if (this.metadata == null) {
return false;
return (_isNativeReflectConstruct_29419_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun29423(a0) { // fn#29423, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3936:733, offset: 0x00fc1aed, size: 785 bytes, params: 2, frame: 17
const SubscriptionRecord2 = SubscriptionRecord;
Inherits(SubscriptionRecord2, a0);
return CreateClass(SubscriptionRecord2, [{key: 'getCurrentSubscriptionPlanIdForGroup', value: function(a0) {
var env0_0 = a0;
return this.items.find(_fun29428)?.planId;
}}, {key: 'isPremium', get: function() {
return this.type === SubscriptionTypes.PREMIUM;
}}, {key: 'isACOM', get: function() {
return this.paymentGateway === PaymentGateways.APPLE_ADVANCED_COMMERCE;
}}, {key: 'planIdForCurrencies', get: get_29431}, {key: 'planIdFromItems', get: function() {
var Object = global.Object;
return this.getCurrentSubscriptionPlanIdForGroup(Object.values(SubscriptionPlans));
}}, {key: 'premiumPlanIdFromItems', get: function() {
var r4;
var items = [];
arraySpread(items, PREMIUM_PLANS, 0, r4);
return this.getCurrentSubscriptionPlanIdForGroup(items);
}}, {key: 'isPurchasedViaDesktop', get: function() {
return this.paymentGateway == null;
}}, {key: 'isPurchasedViaAppleGeneric', get: get_29435}, {key: 'isPurchasedViaApple', get: get_29436},
{key: 'isPurchasedViaGoogle', get: function() {
return this.paymentGateway === PaymentGateways.GOOGLE;
}}, {key: 'isPurchasedExternally', get: function() {
return this.isPurchasedViaApple || this.isPurchasedViaGoogle;
}}, {key: 'isOnPlatformMatchingExternalPaymentGateway', get: get_29439}, {key: 'hasExternalPlanChange',
get: function() {
return this.isPurchasedExternally && this.renewalMutations != null && this.paymentGatewayPlanId !== this.renewalMutations.paymentGatewayPlanId;
}}, {key: 'hasPremiumNitroMonthly', get: function() {
return this.items.find(_fun29442) != null;
}}, {key: 'isBoostOnly', get: function() {
return this.items.every(_fun29444);
}}, {key: 'isPausedOrPausePending', get: function() {
var ALL_PAUSE = SubscriptionStatusTypesSets.ALL_PAUSE;
return ALL_PAUSE.has(this.status);
}}, {key: 'isPaused', get: function() {
return this.status === SubscriptionStatusTypes.PAUSED;
}}, {key: 'isPausedForFractionalPremium', get: get_29447}, {key: 'isPausedAllowsUpdatesButNotResume',
get: get_29448}, {key: 'isPausedAllowsResumeButNotUpdates', get: get_29449}, {key: 'isEnded', get: function() {
return this.status === SubscriptionStatusTypes.ENDED;
}}, {key: 'endedAt', get: get_29451}, {key: 'isActive', get: function() {
return this.status === SubscriptionStatusTypes.ACTIVE;
}}, {key: 'statusAllowsPerks', get: function() {
var ALLOW_PERKS = SubscriptionStatusTypesSets.ALLOW_PERKS;
return ALLOW_PERKS.has(this.status);
}}, {key: 'hasActiveTrial', get: function() {
var r0;
var value2;
r0 = this.trialId != null && this.trialEndsAt != null;
if (r0) {
value2 = new global.Date();
value2 = value2 < this.trialEndsAt;
r0 = value2;
}
return r0;
}}, {key: 'hasActiveDiscount', get: function() {
var r0;
var value2;
var value3;
var value4;
if (this.metadata == null) {
return false;
}
var property = this.metadata.active_discount_id;
var active_discount_expires_at = this.metadata.active_discount_expires_at;
r0 = property != null && active_discount_expires_at != null;
if (r0) {
property = global.Date;
value2 = new property();
property = global.Date;
value3 = Object.create(property.prototype, {constructor: {value: property}});
value4 = new property(active_discount_expires_at);
value2 = value2 <= (value4 instanceof Object ? value4 : value3);
r0 = value2;
}
return r0;
}}, {key: 'premiumSince', get: function() {
return this.streakStartedAt ?? this.createdAt;
}}, {key: 'hasAnyPremiumNitro', get: function() {
return this.items.some(_fun29458);
}}, {key: 'hasAnyPremiumGroup', get: function() {
return this.items.some(_fun29460);
}}, {key: 'hasPremiumAtLeast', value: function(a0) {
var env0_0 = a0;
var property = this.isPremium;
return property ? this.items.some(_fun29462) : !!property;
}}], [{key: 'createFromServer', value: value_29463}]);
function SubscriptionRecord(a0) { // fn#29424, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3936:745, offset: 0x00fc1dfe, size: 755 bytes, params: 2, frame: 25
var environment;
var r3;
var r6;
var property;
var interval;
var intervalCount;
var moduleValue;
var getBasePlanIdForSubscriptionItems;
var value8;
let value = environment.__proto__;
env1_3(this, SubscriptionRecord);
const value3 = env1_6(SubscriptionRecord);
const value6 = env1_5(this, _isNativeReflectConstruct_29419() ? global.Reflect.construct(value3, [],
env1_6(this).constructor) : value3.apply(this, undefined));
value6.id = a0.id;
let type = a0.type;
value6.type = type;
let items2 = a0.items;
value6.items = items2;
value6.createdAt = a0.createdAt;
value6.canceledAt = a0.canceledAt;
value6.currentPeriodStart = a0.currentPeriodStart;
value6.currentPeriodEnd = a0.currentPeriodEnd;
value6.status = a0.status;
value6.paymentSourceId = a0.paymentSourceId;
value6.paymentGateway = a0.paymentGateway;
value6.paymentGatewayPlanId = a0.paymentGatewayPlanId;
value6.paymentGatewaySubscriptionId = a0.paymentGatewaySubscriptionId;
value6.trialId = a0.trialId;
value6.trialEndsAt = a0.trialEndsAt;
let renewalMutations = a0.renewalMutations;
value6.renewalMutations = renewalMutations;
value6.currency = a0.currency;
value6.pauseEndsAt = a0.pauseEndsAt;
value6.pauseReason = a0.pauseReason;
value6.metadata = a0.metadata;
value6.latestInvoice = a0.latestInvoice;
const useStorekitResubscribe = a0.useStorekitResubscribe;
value6.useStorekitResubscribe = useStorekitResubscribe;
value6.price = a0.price;
const userId = a0.userId;
value6.userId = userId;
value6.streakStartedAt = a0.streakStartedAt;
value6.eligiblePaymentGateways = a0.eligiblePaymentGateways;
value6.priceChange = a0.priceChange;
renewalMutations = value6.renewalMutations;
const planId = a0.items[0].planId;
const value7 = null;
type = a0.type;
const PREMIUM = SubscriptionTypes.PREMIUM;
if (type === PREMIUM) {
items2 = a0.items;
property = SubscriptionPlanInfo[items2[0].planId];
interval = property.interval;
intervalCount = property.intervalCount;
moduleValue = require(3814) /* metro dependency 3814: PremiumSubscription */;
getBasePlanIdForSubscriptionItems = moduleValue.getBasePlanIdForSubscriptionItems;
items2 = a0.items;
value8 = Reflect.apply(getBasePlanIdForSubscriptionItems, moduleValue, [items2, interval, intervalCount]);
if (value7 != renewalMutations) {
value = require(3814) /* metro dependency 3814: PremiumSubscription */;
value = value.getBasePlanIdForSubscriptionItems(renewalMutations.items, interval, intervalCount);
r3 = value;
r6 = value8;
} else {
r3 = value7;
r6 = value8;
}
} else if (value7 != renewalMutations && renewalMutations.items.length > 0) {
r3 = renewalMutations.items[0].planId;
r6 = planId;
} else {
r3 = value7;
r6 = planId;
}
value6.planId = r6;
value6.additionalPlans = a0.items.filter(function({planId}) {
return planId !== planId;
});
if (value7 != renewalMutations && value7 != r3) {
renewalMutations.planId = r3;
renewalMutations.additionalPlans = renewalMutations.items.filter(function({planId}) {
return planId !== planId;
});
}
return value6;
}
var property = this.metadata.active_discount_id;
var active_discount_expires_at = this.metadata.active_discount_expires_at;
r0 = property != null && active_discount_expires_at != null;
if (r0) {
property = global.Date;
value2 = new property();
property = global.Date;
value3 = Object.create(property.prototype, {constructor: {value: property}});
value4 = new property(active_discount_expires_at);
value2 = value2 <= (value4 instanceof Object ? value4 : value3);
r0 = value2;
function value_29427(a0) { // fn#29427, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3936:2324, offset: 0x00fc211d, size: 53 bytes, params: 2, frame: 11
const env0_0 = a0;
return this.items.find(_fun29428)?.planId;
function _fun29428({planId}) { // fn#29428, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3936:2375, offset: 0x00fc2152, size: 28 bytes, params: 2, frame: 11
return env0_0.includes(planId);
}
}
return r0;
}}, {key: 'premiumSince', get: function() {
return this.streakStartedAt ?? this.createdAt;
}}, {key: 'hasAnyPremiumNitro', get: function() {
return this.items.some(_fun29458);
}}, {key: 'hasAnyPremiumGroup', get: function() {
return this.items.some(_fun29460);
}}, {key: 'hasPremiumAtLeast', value: function(a0) {
var env0_0 = a0;
var property = this.isPremium;
return property ? this.items.some(_fun29462) : !!property;
}}], [{key: 'createFromServer', value: value_29463}]);
}
function SubscriptionRecord(a0) { // fn#29424, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3936:745, offset: 0x00fc1dfe, size: 755 bytes, params: 2, frame: 25
var environment;
var r3;
var r6;
var property;
var interval;
var intervalCount;
var moduleValue;
var getBasePlanIdForSubscriptionItems;
var value8;
let value = environment.__proto__;
env1_3(this, SubscriptionRecord);
const value3 = env1_6(SubscriptionRecord);
const value6 = env1_5(this, _isNativeReflectConstruct_29419() ? global.Reflect.construct(value3, [],
env1_6(this).constructor) : value3.apply(this, undefined));
value6.id = a0.id;
let type = a0.type;
value6.type = type;
let items2 = a0.items;
value6.items = items2;
value6.createdAt = a0.createdAt;
value6.canceledAt = a0.canceledAt;
value6.currentPeriodStart = a0.currentPeriodStart;
value6.currentPeriodEnd = a0.currentPeriodEnd;
value6.status = a0.status;
value6.paymentSourceId = a0.paymentSourceId;
value6.paymentGateway = a0.paymentGateway;
value6.paymentGatewayPlanId = a0.paymentGatewayPlanId;
value6.paymentGatewaySubscriptionId = a0.paymentGatewaySubscriptionId;
value6.trialId = a0.trialId;
value6.trialEndsAt = a0.trialEndsAt;
let renewalMutations = a0.renewalMutations;
value6.renewalMutations = renewalMutations;
value6.currency = a0.currency;
value6.pauseEndsAt = a0.pauseEndsAt;
value6.pauseReason = a0.pauseReason;
value6.metadata = a0.metadata;
value6.latestInvoice = a0.latestInvoice;
const useStorekitResubscribe = a0.useStorekitResubscribe;
value6.useStorekitResubscribe = useStorekitResubscribe;
value6.price = a0.price;
const userId = a0.userId;
value6.userId = userId;
value6.streakStartedAt = a0.streakStartedAt;
value6.eligiblePaymentGateways = a0.eligiblePaymentGateways;
value6.priceChange = a0.priceChange;
renewalMutations = value6.renewalMutations;
const planId = a0.items[0].planId;
const value7 = null;
type = a0.type;
const PREMIUM = SubscriptionTypes.PREMIUM;
if (type === PREMIUM) {
items2 = a0.items;
property = SubscriptionPlanInfo[items2[0].planId];
interval = property.interval;
intervalCount = property.intervalCount;
moduleValue = require(3814) /* metro dependency 3814: PremiumSubscription */;
getBasePlanIdForSubscriptionItems = moduleValue.getBasePlanIdForSubscriptionItems;
items2 = a0.items;
value8 = Reflect.apply(getBasePlanIdForSubscriptionItems, moduleValue, [items2, interval, intervalCount]);
if (value7 != renewalMutations) {
value = require(3814) /* metro dependency 3814: PremiumSubscription */;
value = value.getBasePlanIdForSubscriptionItems(renewalMutations.items, interval, intervalCount);
r3 = value;
r6 = value8;
} else {
r3 = value7;
r6 = value8;
function get_29431() { // fn#29431, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3936:2600, offset: 0x00fc21a5, size: 71 bytes, params: 1, frame: 15
var r0;
var value;
var planIdFromItems;
if (this.isPremium) {
value = environment.__proto__;
value = importDefault(44) /* metro dependency 44 */;
planIdFromItems = this.planIdFromItems;
value(planIdFromItems, 'Premium subscription has no planId for currencies');
planIdFromItems = this.planIdFromItems;
r0 = planIdFromItems;
} else {
r0 = this.planId;
}
return r0;
}
} else if (value7 != renewalMutations && renewalMutations.items.length > 0) {
r3 = renewalMutations.items[0].planId;
r6 = planId;
} else {
r3 = value7;
r6 = planId;
}
value6.planId = r6;
value6.additionalPlans = a0.items.filter(function({planId}) {
return planId !== planId;
});
if (value7 != renewalMutations && value7 != r3) {
renewalMutations.planId = r3;
renewalMutations.additionalPlans = renewalMutations.items.filter(function({planId}) {
return planId !== planId;
});
}
return value6;
}
function value_29427(a0) { // fn#29427, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3936:2324, offset: 0x00fc211d, size: 53 bytes, params: 2, frame: 11
const env0_0 = a0;
return this.items.find(_fun29428)?.planId;
}
function get_29431() { // fn#29431, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3936:2600, offset: 0x00fc21a5, size: 71 bytes, params: 1, frame: 15
var r0;
var value;
var planIdFromItems;
if (this.isPremium) {
value = environment.__proto__;
value = importDefault(44) /* metro dependency 44 */;
planIdFromItems = this.planIdFromItems;
value(planIdFromItems, 'Premium subscription has no planId for currencies');
planIdFromItems = this.planIdFromItems;
r0 = planIdFromItems;
} else {
r0 = this.planId;
}
return r0;
}
function get_29435() { // fn#29435, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3936:3093, offset: 0x00fc224a, size: 37 bytes, params: 1, frame: 3
const paymentGateway = this.paymentGateway;
const value = environment.__proto__;
const APPLE_PARTNER = PaymentGateways.APPLE_PARTNER;
return paymentGateway === APPLE_PARTNER || this.isACOM;
}
function get_29436() { // fn#29436, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3936:3195, offset: 0x00fc226f, size: 37 bytes, params: 1, frame: 3
const paymentGateway = this.paymentGateway;
const value = environment.__proto__;
const APPLE = PaymentGateways.APPLE;
return paymentGateway === APPLE || this.isACOM;
}
function get_29439() { // fn#29439, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3936:3500, offset: 0x00fc22c4, size: 99 bytes, params: 1, frame: 13
var r0;
var r1;
var value;
var isPurchasedViaGoogle;
const isPurchasedViaApple = this.isPurchasedViaApple;
if (isPurchasedViaApple) {
value = environment.__proto__;
value = require(477) /* metro dependency 477: PlatformUtils */;
value = value.isIOS();
r0 = value;
} else {
r0 = isPurchasedViaApple;
}
if (!r0) {
isPurchasedViaGoogle = this.isPurchasedViaGoogle;
if (isPurchasedViaGoogle) {
value = environment.__proto__;
value = require(3815) /* metro dependency 3815: BillingPlatformUtils */;
value = value.isGooglePlayBillingSupported();
r1 = value;
} else {
r1 = isPurchasedViaGoogle;
function get_29435() { // fn#29435, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3936:3093, offset: 0x00fc224a, size: 37 bytes, params: 1, frame: 3
const paymentGateway = this.paymentGateway;
const value = environment.__proto__;
const APPLE_PARTNER = PaymentGateways.APPLE_PARTNER;
return paymentGateway === APPLE_PARTNER || this.isACOM;
}
r0 = r1;
function get_29436() { // fn#29436, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3936:3195, offset: 0x00fc226f, size: 37 bytes, params: 1, frame: 3
const paymentGateway = this.paymentGateway;
const value = environment.__proto__;
const APPLE = PaymentGateways.APPLE;
return paymentGateway === APPLE || this.isACOM;
}
function get_29439() { // fn#29439, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3936:3500, offset: 0x00fc22c4, size: 99 bytes, params: 1, frame: 13
var r0;
var r1;
var value;
var isPurchasedViaGoogle;
const isPurchasedViaApple = this.isPurchasedViaApple;
if (isPurchasedViaApple) {
value = environment.__proto__;
value = require(477) /* metro dependency 477: PlatformUtils */;
value = value.isIOS();
r0 = value;
} else {
r0 = isPurchasedViaApple;
}
if (!r0) {
isPurchasedViaGoogle = this.isPurchasedViaGoogle;
if (isPurchasedViaGoogle) {
value = environment.__proto__;
value = require(3815) /* metro dependency 3815: BillingPlatformUtils */;
value = value.isGooglePlayBillingSupported();
r1 = value;
} else {
r1 = isPurchasedViaGoogle;
}
r0 = r1;
}
return r0;
}
function get_29441() { // fn#29441, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3936:3846, offset: 0x00fc235a, size: 35 bytes, params: 1, frame: 11
return this.items.find(function({planId}) {
return planId === SubscriptionPlans.PREMIUM_MONTH_TIER_2;
}) != null;
function _fun29442({planId}) { // fn#29442, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3936:3887, offset: 0x00fc237d, size: 28 bytes, params: 2, frame: 2
const PREMIUM_MONTH_TIER_2 = SubscriptionPlans.PREMIUM_MONTH_TIER_2;
return planId === PREMIUM_MONTH_TIER_2;
}
}
function get_29443() { // fn#29443, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3936:3951, offset: 0x00fc2399, size: 29 bytes, params: 1, frame: 11
return this.items.every(function(a0) {
var PREMIUM_MONTH_GUILD = SubscriptionPlans.PREMIUM_MONTH_GUILD;
return [PREMIUM_MONTH_GUILD, SubscriptionPlans.PREMIUM_YEAR_GUILD].includes(a0.planId);
});
function _fun29444({planId}) { // fn#29444, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3936:3987, offset: 0x00fc23b6, size: 52 bytes, params: 2, frame: 11
const PREMIUM_MONTH_GUILD = SubscriptionPlans.PREMIUM_MONTH_GUILD;
const PREMIUM_YEAR_GUILD = SubscriptionPlans.PREMIUM_YEAR_GUILD;
return [PREMIUM_MONTH_GUILD, PREMIUM_YEAR_GUILD].includes(planId);
}
}
function get_29447() { // fn#29447, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3936:4244, offset: 0x00fc2426, size: 50 bytes, params: 1, frame: 4
const status = this.status;
const value = environment.__proto__;
const PAUSED = SubscriptionStatusTypes.PAUSED;
return status === PAUSED && this.pauseReason === SubscriptionPauseReason.FRACTIONAL_PREMIUM;
}
function get_29448() { // fn#29448, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3936:4373, offset: 0x00fc2458, size: 56 bytes, params: 1, frame: 12
const status = this.status;
const value = environment.__proto__;
const PAUSED = SubscriptionStatusTypes.PAUSED;
return status === PAUSED && SubscriptionPauseReasonSets.CAN_MAKE_SUBSCRIPTION_UPDATES.has(this.pauseReason);
}
function get_29449() { // fn#29449, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3936:4516, offset: 0x00fc2490, size: 77 bytes, params: 1, frame: 13
const status = this.status;
const value = environment.__proto__;
const PAUSED = SubscriptionStatusTypes.PAUSED;
return status === PAUSED && (this.pauseReason === null || !SubscriptionPauseReasonSets.CAN_MAKE_SUBSCRIPTION_UPDATES.has(this.pauseReason));
}
function get_29451() { // fn#29451, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3936:4722, offset: 0x00fc24f8, size: 107 bytes, params: 1, frame: 14
const status = this.status;
let value = environment.__proto__;
const ENDED = SubscriptionStatusTypes.ENDED;
value = null;
return status !== ENDED ? value : value != (value == this.metadata ? undefined : this.metadata.ended_at) ? new global.Date() : this.currentPeriodEnd;
}
function get_29457() { // fn#29457, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3936:5470, offset: 0x00fc2675, size: 29 bytes, params: 1, frame: 11
return this.items.some(function(a0) {
return PREMIUM_PLANS.has(a0.planId);
});
function _fun29458({planId}) { // fn#29458, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3936:5505, offset: 0x00fc2692, size: 28 bytes, params: 2, frame: 11
return PREMIUM_PLANS.has(planId);
}
}
function get_29459() { // fn#29459, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3936:5558, offset: 0x00fc26ae, size: 29 bytes, params: 1, frame: 11
return this.items.some(function({planId}) {
return planId === SubscriptionPlans.PREMIUM_GROUP_MONTH;
});
function _fun29460({planId}) { // fn#29460, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3936:5593, offset: 0x00fc26cb, size: 28 bytes, params: 2, frame: 2
const PREMIUM_GROUP_MONTH = SubscriptionPlans.PREMIUM_GROUP_MONTH;
return planId === PREMIUM_GROUP_MONTH;
}
}
function value_29461(a0) { // fn#29461, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3936:5664, offset: 0x00fc26e7, size: 51 bytes, params: 2, frame: 12
const env0_0 = a0;
const isPremium = this.isPremium;
return isPremium ? this.items.some(_fun29462) : !!isPremium;
function _fun29462({planId}) { // fn#29462, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3936:5717, offset: 0x00fc271a, size: 69 bytes, params: 2, frame: 13
let value = environment.__proto__.__proto__;
const property = SubscriptionPlanInfo[planId];
value = require(1900) /* metro dependency 1900: PremiumTypeUtils */;
return value.isPremiumAtLeast(property.premiumType, env0_0);
}
}
function value_29463(a0) { // fn#29463, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3936:5826, offset: 0x00fc275f, size: 741 bytes, params: 2, frame: 20
var r10;
var r4;
var r5;
const object = {};
object.id = a0.id;
object.type = a0.type;
let Date = global.Date;
let date = new Date(a0.created_at);
object.createdAt = date;
const canceled_at = a0.canceled_at;
date = null;
if (date != canceled_at) {
date = new global.Date(a0.canceled_at);
} else {
r4 = date;
}
object.canceledAt = r4;
Date = global.Date;
const current_period_start = a0.current_period_start;
const value4 = Object.create(Date.prototype, {constructor: {value: Date}});
date = new Date(current_period_start);
object.currentPeriodStart = date instanceof Object ? date : value4;
Date = global.Date;
const current_period_end = a0.current_period_end;
const value6 = Object.create(Date.prototype, {constructor: {value: Date}});
date = new Date(current_period_end);
object.currentPeriodEnd = date instanceof Object ? date : value6;
object.status = a0.status;
object.paymentSourceId = a0.payment_source_id;
object.paymentGateway = a0.payment_gateway;
object.paymentGatewayPlanId = a0.payment_gateway_plan_id;
object.paymentGatewaySubscriptionId = a0.payment_gateway_subscription_id;
object.trialId = a0.trial_id;
if (date != a0.trial_ends_at) {
date = new global.Date(a0.trial_ends_at);
} else {
r4 = date;
}
object.trialEndsAt = r4;
let items2 = a0.items;
object.items = items2.map(createSubscriptionItemFromServer);
let renewal_mutations = a0.renewal_mutations;
if (date != renewal_mutations) {
renewal_mutations = a0.renewal_mutations;
items2 = renewal_mutations.items;
renewal_mutations = a0.renewal_mutations;
r5 = {items: items2.map(createSubscriptionItemFromServer),
paymentGatewayPlanId: renewal_mutations.payment_gateway_plan_id};
r10 = items2;
} else {
r5 = date;
}
object.renewalMutations = r5;
if (date != a0.streak_started_at) {
date = new global.Date(a0.streak_started_at);
} else {
r5 = date;
}
object.streakStartedAt = r5;
object.currency = a0.currency;
if (date != a0.pause_ends_at) {
date = new global.Date(a0.pause_ends_at);
} else {
r5 = date;
}
object.pauseEndsAt = r5;
object.pauseReason = a0.pause_reason;
object.metadata = a0.metadata;
const use_storekit_resubscribe = a0.use_storekit_resubscribe;
object.useStorekitResubscribe = use_storekit_resubscribe;
object.price = a0.price;
const user_id = a0.user_id;
object.userId = user_id;
copyDataProperties(object,
date != a0.latest_invoice ? {latestInvoice: InvoiceRecord.createInvoiceFromServer(a0.latest_invoice)} : {}, r10);
const eligible_payment_gateways = a0.eligible_payment_gateways;
object['eligiblePaymentGateways'] = date != eligible_payment_gateways ? eligible_payment_gateways : date;
object['priceChange'] = date != a0.price_change ? GooglePlayPriceChangeRecord.createFromServer(a0.price_change) : date;
date = Object.create(SubscriptionRecord.prototype, {constructor: {value: SubscriptionRecord}});
const subscriptionRecord = new SubscriptionRecord(object);
return subscriptionRecord instanceof Object ? subscriptionRecord : date;
}
}
return r0;
}
function get_29441() { // fn#29441, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3936:3846, offset: 0x00fc235a, size: 35 bytes, params: 1, frame: 11
return this.items.find(function({planId}) {
return planId === SubscriptionPlans.PREMIUM_MONTH_TIER_2;
}) != null;
}
function get_29443() { // fn#29443, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3936:3951, offset: 0x00fc2399, size: 29 bytes, params: 1, frame: 11
return this.items.every(function(a0) {
var PREMIUM_MONTH_GUILD = SubscriptionPlans.PREMIUM_MONTH_GUILD;
return [PREMIUM_MONTH_GUILD, SubscriptionPlans.PREMIUM_YEAR_GUILD].includes(a0.planId);
});
}
function get_29447() { // fn#29447, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3936:4244, offset: 0x00fc2426, size: 50 bytes, params: 1, frame: 4
const status = this.status;
const value = environment.__proto__;
const PAUSED = SubscriptionStatusTypes.PAUSED;
return status === PAUSED && this.pauseReason === SubscriptionPauseReason.FRACTIONAL_PREMIUM;
}
function get_29448() { // fn#29448, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3936:4373, offset: 0x00fc2458, size: 56 bytes, params: 1, frame: 12
const status = this.status;
const value = environment.__proto__;
const PAUSED = SubscriptionStatusTypes.PAUSED;
return status === PAUSED && SubscriptionPauseReasonSets.CAN_MAKE_SUBSCRIPTION_UPDATES.has(this.pauseReason);
}
function get_29449() { // fn#29449, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3936:4516, offset: 0x00fc2490, size: 77 bytes, params: 1, frame: 13
const status = this.status;
const value = environment.__proto__;
const PAUSED = SubscriptionStatusTypes.PAUSED;
return status === PAUSED && (this.pauseReason === null || !SubscriptionPauseReasonSets.CAN_MAKE_SUBSCRIPTION_UPDATES.has(this.pauseReason));
}
function get_29451() { // fn#29451, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3936:4722, offset: 0x00fc24f8, size: 107 bytes, params: 1, frame: 14
const status = this.status;
let value = environment.__proto__;
const ENDED = SubscriptionStatusTypes.ENDED;
value = null;
return status !== ENDED ? value : value != (value == this.metadata ? undefined : this.metadata.ended_at) ? new global.Date() : this.currentPeriodEnd;
}
function get_29457() { // fn#29457, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3936:5470, offset: 0x00fc2675, size: 29 bytes, params: 1, frame: 11
return this.items.some(function(a0) {
return PREMIUM_PLANS.has(a0.planId);
});
}
function get_29459() { // fn#29459, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3936:5558, offset: 0x00fc26ae, size: 29 bytes, params: 1, frame: 11
return this.items.some(function({planId}) {
return planId === SubscriptionPlans.PREMIUM_GROUP_MONTH;
});
}
function value_29461(a0) { // fn#29461, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3936:5664, offset: 0x00fc26e7, size: 51 bytes, params: 2, frame: 12
const env0_0 = a0;
const isPremium = this.isPremium;
return isPremium ? this.items.some(_fun29462) : !!isPremium;
}
function value_29463(a0) { // fn#29463, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3936:5826, offset: 0x00fc275f, size: 741 bytes, params: 2, frame: 20
var r10;
var r4;
var r5;
const object2 = {};
object2.id = a0.id;
object2.type = a0.type;
let Date = global.Date;
let date = new Date(a0.created_at);
object2.createdAt = date;
const canceled_at = a0.canceled_at;
date = null;
if (date != canceled_at) {
date = new global.Date(a0.canceled_at);
} else {
r4 = date;
}
object2.canceledAt = r4;
Date = global.Date;
const current_period_start = a0.current_period_start;
const value4 = Object.create(Date.prototype, {constructor: {value: Date}});
date = new Date(current_period_start);
object2.currentPeriodStart = date instanceof Object ? date : value4;
Date = global.Date;
const current_period_end = a0.current_period_end;
const value6 = Object.create(Date.prototype, {constructor: {value: Date}});
date = new Date(current_period_end);
object2.currentPeriodEnd = date instanceof Object ? date : value6;
object2.status = a0.status;
object2.paymentSourceId = a0.payment_source_id;
object2.paymentGateway = a0.payment_gateway;
object2.paymentGatewayPlanId = a0.payment_gateway_plan_id;
object2.paymentGatewaySubscriptionId = a0.payment_gateway_subscription_id;
object2.trialId = a0.trial_id;
if (date != a0.trial_ends_at) {
date = new global.Date(a0.trial_ends_at);
} else {
r4 = date;
}
object2.trialEndsAt = r4;
let items2 = a0.items;
object2.items = items2.map(createSubscriptionItemFromServer);
let renewal_mutations = a0.renewal_mutations;
if (date != renewal_mutations) {
renewal_mutations = a0.renewal_mutations;
items2 = renewal_mutations.items;
renewal_mutations = a0.renewal_mutations;
r5 = {items: items2.map(createSubscriptionItemFromServer),
paymentGatewayPlanId: renewal_mutations.payment_gateway_plan_id};
r10 = items2;
} else {
r5 = date;
}
object2.renewalMutations = r5;
if (date != a0.streak_started_at) {
date = new global.Date(a0.streak_started_at);
} else {
r5 = date;
}
object2.streakStartedAt = r5;
object2.currency = a0.currency;
if (date != a0.pause_ends_at) {
date = new global.Date(a0.pause_ends_at);
} else {
r5 = date;
}
object2.pauseEndsAt = r5;
object2.pauseReason = a0.pause_reason;
object2.metadata = a0.metadata;
const use_storekit_resubscribe = a0.use_storekit_resubscribe;
object2.useStorekitResubscribe = use_storekit_resubscribe;
object2.price = a0.price;
const user_id = a0.user_id;
object2.userId = user_id;
copyDataProperties(object2,
date != a0.latest_invoice ? {latestInvoice: InvoiceRecord.createInvoiceFromServer(a0.latest_invoice)} : {}, r10);
const eligible_payment_gateways = a0.eligible_payment_gateways;
object2['eligiblePaymentGateways'] = date != eligible_payment_gateways ? eligible_payment_gateways : date;
object2['priceChange'] = date != a0.price_change ? GooglePlayPriceChangeRecord.createFromServer(a0.price_change) : date;
date = Object.create(SubscriptionRecord.prototype, {constructor: {value: SubscriptionRecord}});
const subscriptionRecord = new SubscriptionRecord(object2);
return subscriptionRecord instanceof Object ? subscriptionRecord : date;
}
function _fun29428({planId}) { // fn#29428, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3936:2375, offset: 0x00fc2152, size: 28 bytes, params: 2, frame: 11
return env0_0.includes(planId);
}
function _fun29462({planId}) { // fn#29462, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3936:5717, offset: 0x00fc271a, size: 69 bytes, params: 2, frame: 13
let value = environment.__proto__.__proto__;
const property = SubscriptionPlanInfo[planId];
value = require(1900) /* metro dependency 1900: PremiumTypeUtils */;
return value.isPremiumAtLeast(property.premiumType, env0_0);
}
global.__d(_fun29418, 3809, [6, 7, 15, 17, 18, 1886, 3810, 3811, 661, 3813, 1880, 3814, 44, 477, 3815, 1900,
2]) /* metro module 3809, dependencies: [6, 7, 15, 17, 18, 1886, 3810, 3811, 661, 3813, 1880, 3814, 44, 477, 3815, 1900, 2] */;
+66 -60
View File
@@ -1,74 +1,80 @@
/* Metro module 12596; source: records/TwitchApplicationRecord.tsx; dependencies: [6, 7, 15, 17, 18, 4235, 1244, 4915, 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 ApplicationRecord from './ApplicationRecord.tsx'; /* Metro dependency 4235 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as IndexNativeModule from '../intl/index.native.tsx'; /* Metro dependency 1244 */
function _fun96559(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#96559, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12786:6, offset: 0x021608a6, size: 222 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
let value = importDefault(4235) /* metro dependency 4235: ApplicationRecord */;
let value = ApplicationRecord;
value = _fun96563(value);
(require(2) /* metro dependency 2 */).fileFinishedImporting('records/TwitchApplicationRecord.tsx');
(FileImportTrackerModule).fileFinishedImporting('records/TwitchApplicationRecord.tsx');
exports.default = value;
exports.TWITCH_APPLICATION_ID_PREFIX = 'twitch:';
}
function _isNativeReflectConstruct_96560() { // fn#96560, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12786:158, offset: 0x02160984, 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) {
function _isNativeReflectConstruct_96560() { // fn#96560, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12786:158, offset: 0x02160984, 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_96560_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_96560_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun96563(a0) { // fn#96563, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12786:369, offset: 0x021609e6, size: 72 bytes, params: 2, frame: 15
const closure = TwitchApplicationRecord;
env0_7(closure, a0);
return env0_4(closure, [{key: 'getIconURL', value: value_96565}]);
}
function _fun96563(a0) { // fn#96563, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12786:369, offset: 0x021609e6, size: 72 bytes, params: 2, frame: 15
const TwitchApplicationRecord2 = TwitchApplicationRecord;
Inherits(TwitchApplicationRecord2, a0);
return CreateClass(TwitchApplicationRecord2, [{key: 'getIconURL', value: value_96565}]);
function TwitchApplicationRecord(a0) { // fn#96564, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12786:381, offset: 0x02160a2e, size: 218 bytes, params: 2, frame: 21
env1_3(this, TwitchApplicationRecord);
const items2 = [a0];
const value3 = env1_6(TwitchApplicationRecord);
const value6 = env1_5(this, _isNativeReflectConstruct_96560() ? global.Reflect.construct(value3, items2,
env1_6(this).constructor) : value3.apply(this, items2));
value6.id = '' + 'twitch:' + a0.url;
const intl = (IndexNativeModule).intl;
const string = intl.string;
const JIPtgq = (IndexNativeModule).t.JIPtgq;
value6.name = Reflect.apply(string, intl, [JIPtgq]);
return value6;
}
function TwitchApplicationRecord(a0) { // fn#96564, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12786:381, offset: 0x02160a2e, size: 218 bytes, params: 2, frame: 21
env1_3(this, TwitchApplicationRecord);
const items2 = [a0];
const value3 = env1_6(TwitchApplicationRecord);
const value6 = env1_5(this, _isNativeReflectConstruct_96560() ? global.Reflect.construct(value3, items2,
env1_6(this).constructor) : value3.apply(this, items2));
value6.id = '' + 'twitch:' + a0.url;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const JIPtgq = (require(1244) /* metro dependency 1244: indexNative */).t.JIPtgq;
value6.name = Reflect.apply(string, intl, [JIPtgq]);
return value6;
}
function value_96565() { // fn#96565, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12786:784, offset: 0x02160b08, size: 52 bytes, params: 1, frame: 11
let value = environment.__proto__;
value = importDefault(4915) /* metro dependency 4915: Platforms */;
const get = value.get;
return Reflect.apply(get, value, ['twitch']).icon.lightPNG;
}
}
function value_96565() { // fn#96565, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12786:784, offset: 0x02160b08, size: 52 bytes, params: 1, frame: 11
let value = environment.__proto__;
value = importDefault(4915) /* metro dependency 4915: Platforms */;
const get = value.get;
return Reflect.apply(get, value, ['twitch']).icon.lightPNG;
}
global.__d(_fun96559, 12596, [6, 7, 15, 17, 18, 4235, 1244, 4915,
2]) /* metro module 12596, dependencies: [6, 7, 15, 17, 18, 4235, 1244, 4915, 2] */;
File diff suppressed because it is too large. Load diff
+85 -80
View File
@@ -1,91 +1,96 @@
/* Metro module 4298; source: records/VoiceStateRecord.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 _fun36582(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#36582, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4470:6, offset: 0x0108ecae, size: 194 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(6) /* metro dependency 6 */;
const env0_1 = importDefault(7) /* metro dependency 7 */;
const env0_2 = importDefault(15) /* metro dependency 15 */;
const env0_3 = importDefault(17) /* metro dependency 17 */;
const env0_4 = importDefault(18) /* metro dependency 18 */;
let value = importDefault(1886) /* metro dependency 1886: Record */;
let value = Record;
value = _fun36586(value);
(require(2) /* metro dependency 2 */).fileFinishedImporting('records/VoiceStateRecord.tsx');
(FileImportTrackerModule).fileFinishedImporting('records/VoiceStateRecord.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_36583() { // fn#36583, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4470:148, offset: 0x0108ed70, 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) {
function _isNativeReflectConstruct_36583() { // fn#36583, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4470:148, offset: 0x0108ed70, 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_36583_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_36583_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun36586(a0) { // fn#36586, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4470:347, offset: 0x0108edce, size: 91 bytes, params: 2, frame: 16
const closure = VoiceStateRecord;
env0_4(closure, a0);
return env0_1(closure, [{key: 'isVoiceMuted', value: function() {
var r0;
r0 = this.selfMute || this.mute;
r0 = !r0 ? this.suppress : r0;
r0 = !r0 ? this.requestToSpeakTimestamp != null : r0;
return r0;
}}, {key: 'isVoiceDeafened', value: function() {
return this.selfDeaf || this.deaf;
}}]);
}
function _fun36586(a0) { // fn#36586, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4470:347, offset: 0x0108edce, size: 91 bytes, params: 2, frame: 16
const VoiceStateRecord2 = VoiceStateRecord;
Inherits(VoiceStateRecord2, a0);
return CreateClass(VoiceStateRecord2, [{key: 'isVoiceMuted', value: function() {
var r0;
r0 = this.selfMute || this.mute;
r0 = !r0 ? this.suppress : r0;
r0 = !r0 ? this.requestToSpeakTimestamp != null : r0;
return r0;
}}, {key: 'isVoiceDeafened', value: function() {
return this.selfDeaf || this.deaf;
}}]);
function VoiceStateRecord({userId, channelId, sessionId, mute, deaf, selfMute, selfDeaf, selfVideo, selfStream, suppress, requestToSpeakTimestamp, discoverable, connectedAt}) { // fn#36587, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4470:359, offset: 0x0108ee29, size: 329 bytes, params: 2, frame: 20
let value = environment.__proto__;
env1_0(this, VoiceStateRecord);
const value3 = env1_3(VoiceStateRecord);
value = env1_2(this, _isNativeReflectConstruct_36583() ? global.Reflect.construct(value3, [],
env1_3(this).constructor) : value3.apply(this, undefined));
userId = !userId ? '' : userId;
value.userId = userId;
channelId = !channelId ? null : channelId;
value.channelId = channelId;
sessionId = !sessionId ? null : sessionId;
value.sessionId = sessionId;
mute = !!mute && mute;
value.mute = mute;
deaf = !!deaf && deaf;
value.deaf = deaf;
selfMute = !!selfMute && selfMute;
value.selfMute = selfMute;
selfDeaf = !!selfDeaf && selfDeaf;
value.selfDeaf = selfDeaf;
selfVideo = !!selfVideo && selfVideo;
value.selfVideo = selfVideo;
selfStream = !!selfStream && selfStream;
value.selfStream = selfStream;
suppress = !!suppress && suppress;
value.suppress = suppress;
value.requestToSpeakTimestamp = requestToSpeakTimestamp;
value.discoverable = discoverable == null || discoverable;
value.connectedAt = connectedAt;
return value;
}
}
function VoiceStateRecord({userId, channelId, sessionId, mute, deaf, selfMute, selfDeaf, selfVideo, selfStream, suppress, requestToSpeakTimestamp, discoverable, connectedAt}) { // fn#36587, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4470:359, offset: 0x0108ee29, size: 329 bytes, params: 2, frame: 20
let value = environment.__proto__;
env1_0(this, VoiceStateRecord);
const value3 = env1_3(VoiceStateRecord);
value = env1_2(this, _isNativeReflectConstruct_36583() ? global.Reflect.construct(value3, [],
env1_3(this).constructor) : value3.apply(this, undefined));
userId = !userId ? '' : userId;
value.userId = userId;
channelId = !channelId ? null : channelId;
value.channelId = channelId;
sessionId = !sessionId ? null : sessionId;
value.sessionId = sessionId;
mute = !!mute && mute;
value.mute = mute;
deaf = !!deaf && deaf;
value.deaf = deaf;
selfMute = !!selfMute && selfMute;
value.selfMute = selfMute;
selfDeaf = !!selfDeaf && selfDeaf;
value.selfDeaf = selfDeaf;
selfVideo = !!selfVideo && selfVideo;
value.selfVideo = selfVideo;
selfStream = !!selfStream && selfStream;
value.selfStream = selfStream;
suppress = !!suppress && suppress;
value.suppress = suppress;
value.requestToSpeakTimestamp = requestToSpeakTimestamp;
value.discoverable = discoverable == null || discoverable;
value.connectedAt = connectedAt;
return value;
}
global.__d(_fun36582, 4298, [6, 7, 15, 17, 18, 1886,
2]) /* metro module 4298, dependencies: [6, 7, 15, 17, 18, 1886, 2] */;
+63 -58
View File
@@ -1,71 +1,76 @@
/* Metro module 12597; source: records/XboxApplicationRecord.tsx; dependencies: [6, 7, 15, 17, 18, 4235, 4915, 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 ApplicationRecord from './ApplicationRecord.tsx'; /* Metro dependency 4235 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun96566(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#96566, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12787:6, offset: 0x02160b3c, size: 218 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(6) /* metro dependency 6 */;
const env0_3 = importDefault(7) /* metro dependency 7 */;
const env0_4 = importDefault(15) /* metro dependency 15 */;
const env0_5 = importDefault(17) /* metro dependency 17 */;
const env0_6 = importDefault(18) /* metro dependency 18 */;
let value = importDefault(4235) /* metro dependency 4235: ApplicationRecord */;
let value = ApplicationRecord;
value = _fun96570(value);
(require(2) /* metro dependency 2 */).fileFinishedImporting('records/XboxApplicationRecord.tsx');
(FileImportTrackerModule).fileFinishedImporting('records/XboxApplicationRecord.tsx');
exports.default = value;
exports.XBOX_APPLICATION_ID_PREFIX = 'xbox:';
}
function _isNativeReflectConstruct_96567() { // fn#96567, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12787:158, offset: 0x02160c16, 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) {
function _isNativeReflectConstruct_96567() { // fn#96567, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12787:158, offset: 0x02160c16, 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_96567_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_96567_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun96570(a0) { // fn#96570, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12787:367, offset: 0x02160c78, size: 72 bytes, params: 2, frame: 15
const closure = XboxApplicationRecord;
env0_6(closure, a0);
return env0_3(closure, [{key: 'getIconURL', value: value_96572}]);
}
function _fun96570(a0) { // fn#96570, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12787:367, offset: 0x02160c78, size: 72 bytes, params: 2, frame: 15
const XboxApplicationRecord2 = XboxApplicationRecord;
Inherits(XboxApplicationRecord2, a0);
return CreateClass(XboxApplicationRecord2, [{key: 'getIconURL', value: value_96572}]);
function XboxApplicationRecord(a0) { // fn#96571, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12787:379, offset: 0x02160cc0, size: 166 bytes, params: 2, frame: 20
let value = environment.__proto__;
env1_2(this, XboxApplicationRecord);
const items2 = [a0];
const value3 = env1_5(XboxApplicationRecord);
value = env1_4(this, _isNativeReflectConstruct_96567() ? global.Reflect.construct(value3, items2,
env1_5(this).constructor) : value3.apply(this, items2));
value.id = '' + 'xbox:' + a0.name;
value.name = a0.name;
return value;
}
function XboxApplicationRecord(a0) { // fn#96571, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12787:379, offset: 0x02160cc0, size: 166 bytes, params: 2, frame: 20
let value = environment.__proto__;
env1_2(this, XboxApplicationRecord);
const items2 = [a0];
const value3 = env1_5(XboxApplicationRecord);
value = env1_4(this, _isNativeReflectConstruct_96567() ? global.Reflect.construct(value3, items2,
env1_5(this).constructor) : value3.apply(this, items2));
value.id = '' + 'xbox:' + a0.name;
value.name = a0.name;
return value;
}
function value_96572() { // fn#96572, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12787:742, offset: 0x02160d66, size: 52 bytes, params: 1, frame: 11
let value = environment.__proto__;
value = importDefault(4915) /* metro dependency 4915: Platforms */;
const get = value.get;
return Reflect.apply(get, value, ['xbox']).icon.lightPNG;
}
}
function value_96572() { // fn#96572, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12787:742, offset: 0x02160d66, size: 52 bytes, params: 1, frame: 11
let value = environment.__proto__;
value = importDefault(4915) /* metro dependency 4915: Platforms */;
const get = value.get;
return Reflect.apply(get, value, ['xbox']).icon.lightPNG;
}
global.__d(_fun96566, 12597, [6, 7, 15, 17, 18, 4235, 4915,
2]) /* metro module 12597, dependencies: [6, 7, 15, 17, 18, 4235, 4915, 2] */;