Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,419 @@
|
||||
/* Metro module 12287; source: components_native/premium/EntitlementGiftGroupCard.tsx; dependencies: [6, 7, 15, 17, 18, 31, 27, 4234, 1226, 8450, 3807, 4279, 661, 1880, 33, 4501, 697, 8451, 4573, 1244, 4578, 6829, 8467, 1305, 6780, 8708, 6818, 12288, 12289, 10519, 10521, 10522, 10520, 10523, 10524, 10525, 10526, 10527, 10530, 10533, 10534, 12290, 3868, 566, 8457, 2] */
|
||||
function _fun93864(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#93864, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12473:6, offset: 0x020c76a7, size: 1064 bytes, params: 8, frame: 33
|
||||
var object4;
|
||||
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 = importAll(31) /* metro dependency 31 */;
|
||||
const value2 = require(27) /* metro dependency 27 */;
|
||||
const env0_9 = value2.View;
|
||||
const env0_10 = value2.ActivityIndicator;
|
||||
const env0_11 = value2.TouchableWithoutFeedback;
|
||||
const applicationStore = importDefault(4234) /* metro dependency 4234: ApplicationStore */;
|
||||
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
|
||||
const giftCodeStore = importDefault(8450) /* metro dependency 8450: GiftCodeStore */;
|
||||
const subscriptionPlanStore = importDefault(3807) /* metro dependency 3807: SubscriptionPlanStore */;
|
||||
const skuStore = importDefault(4279) /* metro dependency 4279: SKUStore */;
|
||||
const Fonts = (require(661) /* metro dependency 661: Constants */).Fonts;
|
||||
const premiumConstantsModule = require(1880) /* metro dependency 1880: PremiumConstants */;
|
||||
const env0_16 = premiumConstantsModule.SubscriptionIntervalTypes;
|
||||
const env0_17 = premiumConstantsModule.PremiumSubscriptionSKUs;
|
||||
const env0_18 = premiumConstantsModule.PremiumGiftStyles;
|
||||
const value9 = require(33) /* metro dependency 33 */;
|
||||
const env0_19 = value9.jsx;
|
||||
const env0_20 = value9.jsxs;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createLegacyClassComponentStyles = createStylesModule.createLegacyClassComponentStyles;
|
||||
object4 = {giftGroupCard: {'overflow': 'hidden', 'marginTop': 8}};
|
||||
const object5 = {borderWidth: 1};
|
||||
const CARD_BORDER_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CARD_BORDER_DEFAULT;
|
||||
object5.borderColor = CARD_BORDER_DEFAULT;
|
||||
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
|
||||
const TABLEROW_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.TABLEROW_BACKGROUND_DEFAULT;
|
||||
object5.backgroundColor = TABLEROW_BACKGROUND_DEFAULT;
|
||||
object4.giftGroupCardRefresh = object5;
|
||||
const object7 = {'fontSize': 16, 'lineHeight': 20};
|
||||
const PRIMARY_SEMIBOLD = Fonts.PRIMARY_SEMIBOLD;
|
||||
object7.fontFamily = PRIMARY_SEMIBOLD;
|
||||
const MOBILE_TEXT_HEADING_PRIMARY = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_TEXT_HEADING_PRIMARY;
|
||||
object7.color = MOBILE_TEXT_HEADING_PRIMARY;
|
||||
object4.title = object7;
|
||||
const ICON_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.ICON_SUBTLE;
|
||||
object4.arrow = {color: ICON_SUBTLE};
|
||||
object4.subtitle = {'fontSize': 14, 'lineHeight': 18};
|
||||
object4.titleContainer = {'marginLeft': 8, 'flex': 1};
|
||||
object4.groupCardHeader = {'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'space-between',
|
||||
'padding': 16};
|
||||
let BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
|
||||
object4.groupCardHeaderLegacy = {backgroundColor: BACKGROUND_SURFACE_HIGH};
|
||||
object4.rowArrow = {'height': 8, 'width': 12, 'marginRight': 8};
|
||||
const object8 = {};
|
||||
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
|
||||
object4.giftIcon = object8;
|
||||
object4.generateGiftRow = {'padding': 8, 'flexDirection': 'row', 'alignItems': 'center',
|
||||
'justifyContent': 'space-between'};
|
||||
BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
|
||||
object4.generateGiftRowLegacy = {backgroundColor: BACKGROUND_SURFACE_HIGH};
|
||||
object4.generateGiftRowText = {flexShrink: 1};
|
||||
object4.generateGiftButton = {marginLeft: 12};
|
||||
object4.loading = {marginTop: 8};
|
||||
object4.generateButtonContainer = {'flexGrow': 1, 'flexShrink': 0};
|
||||
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
|
||||
object4.groupCardHeaderOpen = {backgroundColor: BACKGROUND_BASE_LOWEST};
|
||||
const BACKGROUND_MOD_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_MUTED;
|
||||
object4.groupCardHeaderOpenRefresh = {backgroundColor: BACKGROUND_MOD_MUTED};
|
||||
object4.subtitleContainer = {'flexDirection': 'row', 'alignItems': 'center', 'gap': 4};
|
||||
object4.socialLayerSubtitleContainer = {marginTop: 2};
|
||||
const env0_21 = Reflect.apply(createLegacyClassComponentStyles, createStylesModule, [object4]);
|
||||
const Component = value.Component;
|
||||
value = _fun93868(Component);
|
||||
const ThemeContext = (require(3868) /* metro dependency 3868: native */).ThemeContext;
|
||||
value.contextType = ThemeContext;
|
||||
const flux = importDefault(566) /* metro dependency 566: flux */;
|
||||
value = flux.connectStores([authenticationStore, skuStore, applicationStore, giftCodeStore, subscriptionPlanStore],
|
||||
_fun93879)(value);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/premium/EntitlementGiftGroupCard.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_93865() { // fn#93865, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12473:416, offset: 0x020c7acf, 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_93865_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function _fun93868(a0) { // fn#93868, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12473:1968, offset: 0x020c7b31, size: 203 bytes, params: 2, frame: 16
|
||||
const closure = EntitlementGiftGroupCard;
|
||||
env0_7(closure, a0);
|
||||
return env0_4(closure, [{key: 'componentDidMount', value: function() {
|
||||
var Date = global.Date;
|
||||
this._mountedAt = Date.now();
|
||||
}}, {key: 'renderGenerateGiftCodeRow', value: value_93873}, {key: 'renderHeader', value: value_93874},
|
||||
{key: 'getCardHeaderThumbnail', value: value_93875}, {key: 'renderCardHeader', value: value_93876},
|
||||
{key: 'render', value: value_93877}]);
|
||||
}
|
||||
|
||||
function _fun93879({skuId, subscriptionPlanId, giftStyle}) { // fn#93879, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12473:6222, offset: 0x020c87cb, size: 282 bytes, params: 2, frame: 19
|
||||
const value2 = SKUStore.get(skuId);
|
||||
if (value2 == null) {
|
||||
throw new global.Error('SKU was unavailable while rendering gift.');
|
||||
}
|
||||
const object2 = {sku: value2};
|
||||
object2.isFetching = GiftCodeStore.getUserGiftCodesFetchingForSKUAndPlan(skuId, subscriptionPlanId);
|
||||
object2.loadedAt = GiftCodeStore.getUserGiftCodesLoadedAtForSKUAndPlan(skuId, subscriptionPlanId);
|
||||
object2.application = ApplicationStore.getApplication(value2.applicationId);
|
||||
object2.subscriptionPlan = subscriptionPlanId != null ? (require(8457) /* metro dependency 8457: SubscriptionUtils */).getOrFetchSubscriptionPlan(subscriptionPlanId) : null;
|
||||
const getForGifterSKUAndPlan = GiftCodeStore.getForGifterSKUAndPlan;
|
||||
const getId = AuthenticationStore.getId;
|
||||
let value = Reflect.apply(getForGifterSKUAndPlan, GiftCodeStore, [Reflect.apply(getId, AuthenticationStore, []),
|
||||
skuId, subscriptionPlanId]);
|
||||
value = value.filter(function(a0) {
|
||||
return !a0.isClaimed;
|
||||
});
|
||||
object2.giftCodes = value.filter(function({giftStyle}) {
|
||||
return giftStyle === giftStyle;
|
||||
});
|
||||
return object2;
|
||||
}
|
||||
|
||||
function EntitlementGiftGroupCard(a0) { // fn#93869, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12473:1980, offset: 0x020c7bfc, size: 181 bytes, params: 2, frame: 20
|
||||
var r0;
|
||||
var Reflect;
|
||||
let value = copyRestArgs(0, undefined);
|
||||
let binding = env1_3;
|
||||
binding(this, EntitlementGiftGroupCard);
|
||||
const items = [];
|
||||
arraySpread(items, value, 0, items);
|
||||
value = env1_6(EntitlementGiftGroupCard);
|
||||
binding = env1_5;
|
||||
if (_isNativeReflectConstruct_93865()) {
|
||||
Reflect = global.Reflect;
|
||||
value = Reflect.construct(value, items, env1_6(this).constructor);
|
||||
r0 = value;
|
||||
} else {
|
||||
value = value.apply(this, items);
|
||||
r0 = value;
|
||||
}
|
||||
value = binding(this, r0);
|
||||
value._mountedAt = null;
|
||||
value.state = {isOpen: false};
|
||||
value.handleToggleOpen = handleToggleOpen;
|
||||
value.handleGenerateGiftCode = handleGenerateGiftCode;
|
||||
return value;
|
||||
}
|
||||
|
||||
function value_93873() { // fn#93873, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12473:2774, offset: 0x020c7d9e, size: 349 bytes, params: 1, frame: 26
|
||||
const value2 = env1_21(this.context);
|
||||
const isRefreshEnabled = this.props.isRefreshEnabled;
|
||||
const items2 = [value2.generateGiftRow];
|
||||
items2[1] = isRefreshEnabled ? null : value2.generateGiftRowLegacy;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const generateGiftRowText = value2.generateGiftRowText;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const text = <Text variant="text-xs/medium" color="text-subtle" style={generateGiftRowText}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.lELyPj)}</Text>;
|
||||
const generateButtonContainer = value2.generateButtonContainer;
|
||||
const generateGiftButton = value2.generateGiftButton;
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
return (
|
||||
<View style={items2}>
|
||||
{text}
|
||||
<View style={generateButtonContainer}>
|
||||
<View style={generateGiftButton}>
|
||||
<Button
|
||||
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['w4+/BA'])}
|
||||
size="sm"
|
||||
onPress={this.handleGenerateGiftCode}
|
||||
/>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function value_93874(a0, a1) { // fn#93874, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12473:3294, offset: 0x020c7efb, size: 1044 bytes, params: 3, frame: 39
|
||||
var r10;
|
||||
var r8;
|
||||
const Icon = require(dependencyMap[23]).Icon;
|
||||
var defaultImport;
|
||||
var object;
|
||||
var moduleValue2;
|
||||
const value = environment.__proto__;
|
||||
const value2 = env1_21(this.context);
|
||||
const state = this.state;
|
||||
const props = this.props;
|
||||
const isOpen = state.isOpen;
|
||||
const entitlements = props.entitlements;
|
||||
const application = props.application;
|
||||
const sku = props.sku;
|
||||
const isRefreshEnabled = props.isRefreshEnabled;
|
||||
let r21 = require(dependencyMap[21]).isGameItemSKU(sku) && application != null;
|
||||
const r12 = isRefreshEnabled ? value2.groupCardHeaderOpenRefresh : value2.groupCardHeaderOpen;
|
||||
const handleToggleOpen = this.handleToggleOpen;
|
||||
const items3 = [value2.groupCardHeader];
|
||||
const value4 = null;
|
||||
items3[1] = isRefreshEnabled ? value4 : value2.groupCardHeaderLegacy;
|
||||
items3[2] = isOpen ? r12 : value4;
|
||||
if (r21) {
|
||||
defaultImport = importDefault(dependencyMap[22]);
|
||||
object = {sku: sku};
|
||||
moduleValue2 = require(dependencyMap[23]);
|
||||
object.size = moduleValue2.getIconSize(require(dependencyMap[23]).Icon.Sizes.LARGE);
|
||||
object.containerStyle = value2.giftIcon;
|
||||
r10 = ((Component) => <Component {...object} />)(defaultImport);
|
||||
} else {
|
||||
r10 = value4 != a0 ? <Icon resizeMode="contain" source={a0} disableColor size={require(dependencyMap[23]).Icon.Sizes.LARGE} style={value2.giftIcon} /> : value4;
|
||||
}
|
||||
const items2 = [r10];
|
||||
const titleContainer = value2.titleContainer;
|
||||
const Text = require(dependencyMap[18]).Text;
|
||||
const text = <Text variant="heading-sm/semibold" color="mobile-text-heading-primary" accessibilityRole="header">{a1}</Text>;
|
||||
const items4 = [r21 && value2.socialLayerSubtitleContainer];
|
||||
items4[1] = value2.subtitleContainer;
|
||||
const r18 = r21 && ((Component) => <Component game={application} size={importDefault(dependencyMap[24]).Sizes.SIZE_24} skuId={sku.id} />)(importDefault(dependencyMap[24]));
|
||||
const subtitle = value2.subtitle;
|
||||
const intl = require(dependencyMap[19]).intl;
|
||||
const format = intl.format;
|
||||
const t = require(dependencyMap[19]).t;
|
||||
r21 = r21 ? Reflect.apply(format, intl, [t['6plpZi'], {applicationName: application.name,
|
||||
copies: entitlements.length}]) : Reflect.apply(format, intl, [t.zMcvcA, {copies: entitlements.length}]);
|
||||
items2[1] = <View style={titleContainer}>{text}<View style={items4}>{r18}<Text variant="text-md/normal" color="text-subtle" style={subtitle}>{r21}</Text></View></View>;
|
||||
if (isRefreshEnabled) {
|
||||
r8 = ((Component) => <Component />)(isOpen ? require(dependencyMap[25]).ChevronSmallDownIcon : require(dependencyMap[26]).ChevronSmallRightIcon);
|
||||
} else {
|
||||
r8 = <Icon style={value2.rowArrow} size={require(dependencyMap[23]).Icon.Sizes.LARGE} source={importDefault(isOpen ? dependencyMap[27] : dependencyMap[28])} color={value2.arrow.color} />;
|
||||
}
|
||||
items2[2] = r8;
|
||||
return (
|
||||
<TouchableWithoutFeedback accessibilityRole="button" onPress={handleToggleOpen}>
|
||||
<View style={items3}>
|
||||
{items2}
|
||||
</View>
|
||||
</TouchableWithoutFeedback>
|
||||
);
|
||||
}
|
||||
|
||||
function value_93875(a0, a1) { // fn#93875, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12473:4673, offset: 0x020c830f, size: 516 bytes, params: 3, frame: 13
|
||||
var object2;
|
||||
const STANDARD_BOX = PremiumGiftStyles.STANDARD_BOX;
|
||||
if (STANDARD_BOX === a1) {
|
||||
return importDefault(10519) /* metro dependency 10519 */;
|
||||
}
|
||||
const CAKE = PremiumGiftStyles.CAKE;
|
||||
if (CAKE === a1) {
|
||||
return importDefault(10521) /* metro dependency 10521 */;
|
||||
}
|
||||
const CHEST = PremiumGiftStyles.CHEST;
|
||||
if (CHEST === a1) {
|
||||
return importDefault(10522) /* metro dependency 10522 */;
|
||||
}
|
||||
const COFFEE = PremiumGiftStyles.COFFEE;
|
||||
if (COFFEE === a1) {
|
||||
return importDefault(10520) /* metro dependency 10520 */;
|
||||
}
|
||||
const SEASONAL_STANDARD_BOX = PremiumGiftStyles.SEASONAL_STANDARD_BOX;
|
||||
if (SEASONAL_STANDARD_BOX === a1) {
|
||||
return importDefault(10523) /* metro dependency 10523 */;
|
||||
}
|
||||
const SEASONAL_CAKE = PremiumGiftStyles.SEASONAL_CAKE;
|
||||
if (SEASONAL_CAKE === a1) {
|
||||
return importDefault(10524) /* metro dependency 10524 */;
|
||||
}
|
||||
const SEASONAL_CHEST = PremiumGiftStyles.SEASONAL_CHEST;
|
||||
if (SEASONAL_CHEST === a1) {
|
||||
return importDefault(10525) /* metro dependency 10525 */;
|
||||
}
|
||||
const SEASONAL_COFFEE = PremiumGiftStyles.SEASONAL_COFFEE;
|
||||
if (SEASONAL_COFFEE === a1) {
|
||||
return importDefault(10526) /* metro dependency 10526 */;
|
||||
}
|
||||
const NITROWEEN_STANDARD = PremiumGiftStyles.NITROWEEN_STANDARD;
|
||||
if (NITROWEEN_STANDARD === a1) {
|
||||
object2 = {};
|
||||
object2.uri = importDefault(10527) /* metro dependency 10527: halloweenCardSmallPng */;
|
||||
return object2;
|
||||
}
|
||||
const TIER_0 = PremiumSubscriptionSKUs.TIER_0;
|
||||
if (TIER_0 === a0) {
|
||||
return importDefault(10530) /* metro dependency 10530 */;
|
||||
}
|
||||
const TIER_1 = PremiumSubscriptionSKUs.TIER_1;
|
||||
if (TIER_1 === a0) {
|
||||
return importDefault(10533) /* metro dependency 10533 */;
|
||||
}
|
||||
const TIER_2 = PremiumSubscriptionSKUs.TIER_2;
|
||||
if (TIER_2 === a0) {
|
||||
return importDefault(10534) /* metro dependency 10534 */;
|
||||
}
|
||||
const LEGACY = PremiumSubscriptionSKUs.LEGACY;
|
||||
if (LEGACY === a0) {
|
||||
return importDefault(10534) /* metro dependency 10534 */;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function value_93876(a0) { // fn#93876, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12473:5202, offset: 0x020c8513, size: 305 bytes, params: 2, frame: 21
|
||||
var r2;
|
||||
var renderHeader;
|
||||
var iconSource;
|
||||
var intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const {application, subscriptionPlan, giftStyle} = this.props;
|
||||
const id = a0.id;
|
||||
const name = a0.name;
|
||||
let value = this.getCardHeaderThumbnail(id, giftStyle);
|
||||
const Object = global.Object;
|
||||
const value4 = Object.values(PremiumSubscriptionSKUs).includes(id);
|
||||
const value5 = null;
|
||||
if (value4) {
|
||||
if (value5 == subscriptionPlan) {
|
||||
return value5;
|
||||
}
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
return this.renderHeader(value,
|
||||
intl.formatToPlainString(subscriptionPlan.interval === SubscriptionIntervalTypes.MONTH ? t.rCJvqo : t.Vd3Iu8,
|
||||
|
||||
{skuName: a0.name, intervalCount: subscriptionPlan.intervalCount}));
|
||||
}
|
||||
if (value5 == application) {
|
||||
r2 = value5;
|
||||
} else {
|
||||
renderHeader = this.renderHeader;
|
||||
iconSource = application.getIconSource(32);
|
||||
value = Reflect.apply(renderHeader, this, [value5 == iconSource ? value : iconSource, name]);
|
||||
r2 = value;
|
||||
}
|
||||
return r2;
|
||||
}
|
||||
|
||||
function value_93877() { // fn#93877, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12473:5663, offset: 0x020c8644, size: 303 bytes, params: 1, frame: 29
|
||||
var environment;
|
||||
var r9;
|
||||
var r5;
|
||||
var Fragment;
|
||||
var items3;
|
||||
const value = environment.__proto__;
|
||||
const value2 = env1_21(this.context);
|
||||
const {entitlements, giftCodes, sku, isFetching, isRefreshEnabled} = this.props;
|
||||
const isOpen = this.state.isOpen;
|
||||
const items2 = [value2.giftGroupCard];
|
||||
const value3 = null;
|
||||
items2[1] = isRefreshEnabled ? value2.giftGroupCardRefresh : value3;
|
||||
const value4 = this.renderCardHeader(sku);
|
||||
if (isOpen) {
|
||||
if (isFetching) {
|
||||
r9 = <ActivityIndicator style={value2.loading} />;
|
||||
} else {
|
||||
Fragment = env1_8.Fragment;
|
||||
items3 = [giftCodes.length < entitlements.length ? this.renderGenerateGiftCodeRow() : value3];
|
||||
items3[1] = giftCodes.map(_fun93878);
|
||||
r9 = <Fragment>{items3}</Fragment>;
|
||||
}
|
||||
r5 = <View>{r9}</View>;
|
||||
} else {
|
||||
r5 = value3;
|
||||
}
|
||||
return (
|
||||
<View style={items2}>
|
||||
{value4}
|
||||
{r5}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function handleToggleOpen() { // fn#93870, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12473:2295, owner: EntitlementGiftGroupCard.handleToggleOpen, offset: 0x020c7cb1, size: 138 bytes, params: 1, frame: 16
|
||||
var value6;
|
||||
let binding = env0_0;
|
||||
const {skuId, subscriptionPlanId, loadedAt} = binding.props;
|
||||
const value2 = !binding.state.isOpen;
|
||||
let r1 = loadedAt != null && env0_0._mountedAt != null;
|
||||
r1 = !r1 ? !value2 : r1;
|
||||
if (!r1) {
|
||||
value6 = environment.__proto__.__proto__;
|
||||
(importDefault(8451) /* metro dependency 8451: GiftCodeActionCreators */).fetchUserGiftCodesForSKU(skuId,
|
||||
subscriptionPlanId);
|
||||
}
|
||||
binding = env0_0;
|
||||
binding.setState({isOpen: value2});
|
||||
}
|
||||
|
||||
function handleGenerateGiftCode() { // fn#93871, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12473:2499, owner: EntitlementGiftGroupCard.handleGenerateGiftCode, offset: 0x020c7d3b, size: 69 bytes, params: 1, frame: 16
|
||||
const {skuId, subscriptionPlanId, giftStyle} = env0_0.props;
|
||||
const value = environment.__proto__.__proto__;
|
||||
(importDefault(8451) /* metro dependency 8451: GiftCodeActionCreators */).createGiftCode(skuId, subscriptionPlanId,
|
||||
giftStyle);
|
||||
}
|
||||
|
||||
function _fun93878(a0, a1) { // fn#93878, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12473:6033, offset: 0x020c8773, size: 88 bytes, params: 3, frame: 18
|
||||
const value = environment.__proto__.__proto__;
|
||||
return ((Component) => <Component giftCode={a0} sku={sku} isFirst={a1 === 0} isRefreshEnabled={isRefreshEnabled} key={a0.code} />)(importDefault(12290) /* metro dependency 12290: GiftCodeRow */);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,223 @@
|
||||
/* Metro module 12290; source: components_native/premium/GiftCodeRow.tsx; dependencies: [6, 7, 15, 17, 18, 31, 27, 661, 33, 4501, 697, 4129, 9212, 8451, 6992, 4573, 4578, 1244, 3738, 1305, 3868, 2] */
|
||||
function _fun93884(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#93884, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12476:6, offset: 0x020c8995, size: 710 bytes, params: 8, frame: 26
|
||||
var object2;
|
||||
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 = importAll(31) /* metro dependency 31 */;
|
||||
const value2 = require(27) /* metro dependency 27 */;
|
||||
const env0_8 = value2.View;
|
||||
const StyleSheet = value2.StyleSheet;
|
||||
const env0_9 = value2.TouchableWithoutFeedback;
|
||||
const env0_10 = (require(661) /* metro dependency 661: Constants */).AnalyticsSections;
|
||||
const value3 = require(33) /* metro dependency 33 */;
|
||||
const env0_11 = value3.jsx;
|
||||
const env0_12 = value3.jsxs;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createLegacyClassComponentStyles = createStylesModule.createLegacyClassComponentStyles;
|
||||
object2 = {};
|
||||
object2.giftCodeRow = {paddingHorizontal: 16};
|
||||
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
|
||||
object2.giftCodeRowLegacy = {backgroundColor: BACKGROUND_SURFACE_HIGH};
|
||||
const object3 = {'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'space-between',
|
||||
'marginVertical': 8, 'padding': 8};
|
||||
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
|
||||
object3.borderWidth = StyleSheet.hairlineWidth;
|
||||
const INPUT_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INPUT_BACKGROUND_DEFAULT;
|
||||
object3.backgroundColor = INPUT_BACKGROUND_DEFAULT;
|
||||
object2.giftCodeShare = object3;
|
||||
const object6 = {};
|
||||
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object6.marginTop = PX_16;
|
||||
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
object6.marginBottom = PX_4;
|
||||
object2.giftCodeInput = object6;
|
||||
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object2.giftCodeInputContent = {'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'space-between',
|
||||
padding: PX_8};
|
||||
object2.giftCodeShareButton = {marginLeft: 12};
|
||||
object2.codeText = {flexShrink: 1};
|
||||
object2.subTextRow = {'marginBottom': 8, 'flexDirection': 'row', 'alignItems': 'center'};
|
||||
object2.expiryText = {'fontSize': 12, 'lineHeight': 16};
|
||||
const BLUE_345 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BLUE_345;
|
||||
object2.revokeHint = {color: BLUE_345};
|
||||
object2.firstRow = {borderWidth: 0};
|
||||
object2.buttonContainer = {'flexShrink': 0, 'flexGrow': 1};
|
||||
const env0_13 = Reflect.apply(createLegacyClassComponentStyles, createStylesModule, [object2]);
|
||||
const PureComponent = value.PureComponent;
|
||||
value = _fun93888(PureComponent);
|
||||
const ThemeContext = (require(3868) /* metro dependency 3868: native */).ThemeContext;
|
||||
value.contextType = ThemeContext;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/premium/GiftCodeRow.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_93885() { // fn#93885, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12476:276, offset: 0x020c8c5b, 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_93885_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function _fun93888(a0) { // fn#93888, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12476:1352, offset: 0x020c8cbd, size: 99 bytes, params: 2, frame: 16
|
||||
const closure = GiftCodeRow;
|
||||
env0_7(closure, a0);
|
||||
return env0_4(closure, [{key: 'handleRevoke', value: value_93891}, {key: 'render', value: value_93892}]);
|
||||
}
|
||||
|
||||
function GiftCodeRow(a0) { // fn#93889, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12476:1364, offset: 0x020c8d20, size: 145 bytes, params: 2, frame: 20
|
||||
var r0;
|
||||
var Reflect;
|
||||
let value = copyRestArgs(0, undefined);
|
||||
let binding = env1_3;
|
||||
binding(this, GiftCodeRow);
|
||||
const items2 = [];
|
||||
arraySpread(items2, value, 0, items2);
|
||||
value = env1_6(GiftCodeRow);
|
||||
binding = env1_5;
|
||||
if (_isNativeReflectConstruct_93885()) {
|
||||
Reflect = global.Reflect;
|
||||
value = Reflect.construct(value, items2, env1_6(this).constructor);
|
||||
r0 = value;
|
||||
} else {
|
||||
value = value.apply(this, items2);
|
||||
r0 = value;
|
||||
}
|
||||
value = binding(this, r0);
|
||||
value.handleShare = handleShare_93890;
|
||||
return value;
|
||||
}
|
||||
|
||||
function value_93891(a0) { // fn#93891, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12476:1842, offset: 0x020c8e43, size: 41 bytes, params: 2, frame: 12
|
||||
const value = environment.__proto__;
|
||||
(importDefault(8451) /* metro dependency 8451: GiftCodeActionCreators */).revokeGiftCode(a0);
|
||||
}
|
||||
|
||||
function value_93892() { // fn#93892, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12476:1903, offset: 0x020c8e6c, size: 958 bytes, params: 1, frame: 36
|
||||
var environment;
|
||||
var view;
|
||||
var r8;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
var moduleValue;
|
||||
var items2;
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var InputFieldContainer;
|
||||
var moduleValue2;
|
||||
var items4;
|
||||
var format;
|
||||
var b1BfWD;
|
||||
var diff;
|
||||
let value = environment.__proto__;
|
||||
const value2 = env1_13(this.context);
|
||||
const {giftCode, isFirst, isRefreshEnabled} = this.props;
|
||||
const items3 = [value2.giftCodeRow];
|
||||
const value3 = null;
|
||||
items3[1] = isRefreshEnabled ? value3 : value2.giftCodeRowLegacy;
|
||||
items3[2] = isFirst ? value2.firstRow : value3;
|
||||
if (isRefreshEnabled) {
|
||||
var viewBinding3Props = {style: value2.giftCodeInput};
|
||||
InputFieldContainer = (require(6992) /* metro dependency 6992: InputFieldContainerNative */).InputFieldContainer;
|
||||
var viewBinding3Props2 = {style: value2.giftCodeInputContent};
|
||||
var textProps = {'variant': 'text-sm/normal', 'style': null, 'lineClamp': 1, style: value2.codeText};
|
||||
moduleValue2 = require(4129) /* metro dependency 4129: GiftCodeUtils */;
|
||||
items4 = [<Text {...textProps}>{moduleValue2.getGiftCodeURL(giftCode.code)}</Text>];
|
||||
items4[1] = <View style={[value2.buttonContainer,
|
||||
value2.giftCodeShareButton]}><Button size="sm" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.h5EvZM)} onPress={this.handleShare} /></View>;
|
||||
view = <View {...viewBinding3Props}><InputFieldContainer><View {...viewBinding3Props2}>{items4}</View></InputFieldContainer></View>;
|
||||
} else {
|
||||
var viewBinding2Props = {style: value2.giftCodeShare};
|
||||
var textProps = {'variant': 'text-sm/normal', 'style': null, 'lineClamp': 1, style: value2.codeText};
|
||||
moduleValue = require(4129) /* metro dependency 4129: GiftCodeUtils */;
|
||||
items2 = [<Text {...textProps}>{moduleValue.getGiftCodeURL(giftCode.code)}</Text>];
|
||||
items2[1] = <View style={[value2.buttonContainer,
|
||||
value2.giftCodeShareButton]}><Button size="sm" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.h5EvZM)} onPress={this.handleShare} /></View>;
|
||||
view = <View {...viewBinding2Props}>{items2}</View>;
|
||||
}
|
||||
const subTextRow = value2.subTextRow;
|
||||
let expiresAt = giftCode.expiresAt;
|
||||
if (value3 != expiresAt) {
|
||||
format = intl.format;
|
||||
b1BfWD = (require(1244) /* metro dependency 1244: indexNative */).t.b1BfWD;
|
||||
expiresAt = giftCode.expiresAt;
|
||||
diff = expiresAt.diff;
|
||||
value = (importDefault(3738) /* metro dependency 3738 */)();
|
||||
value = <Text variant="text-xs/normal" color="text-subtle">{Reflect.apply(format, intl, [b1BfWD,
|
||||
{hours: Reflect.apply(diff, expiresAt, [value, 'h']), revokeHook: revokeHook}])}</Text>;
|
||||
r8 = value;
|
||||
} else {
|
||||
r8 = value3;
|
||||
}
|
||||
return (
|
||||
<View style={items3}>
|
||||
{view}
|
||||
<View style={subTextRow}>
|
||||
{r8}
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function GiftCodeRowHandleShare() { // fn#93890, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12476:1597, owner: GiftCodeRow.handleShare, offset: 0x020c8db1, size: 146 bytes, params: 1, frame: 18
|
||||
var moduleValue2;
|
||||
var showShareActionSheet;
|
||||
var moduleValue3;
|
||||
const {giftCode, sku} = env0_0.props;
|
||||
let value = giftCode != null;
|
||||
if (value && sku != null) {
|
||||
value = environment.__proto__.__proto__;
|
||||
(require(4129) /* metro dependency 4129: GiftCodeUtils */).trackGiftCodeCopy(giftCode, sku);
|
||||
moduleValue2 = require(9212) /* metro dependency 9212: showShareActionSheetAndroid */;
|
||||
showShareActionSheet = moduleValue2.showShareActionSheet;
|
||||
moduleValue3 = require(4129) /* metro dependency 4129: GiftCodeUtils */;
|
||||
Reflect.apply(showShareActionSheet, moduleValue2, [{url: moduleValue3.getGiftCodeURL(giftCode.code)},
|
||||
AnalyticsSections.GIFT_CODE_ROW]);
|
||||
}
|
||||
}
|
||||
|
||||
function revokeHook(a0, a1) { // fn#93893, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12476:3024, owner: value_93892.revokeHook, offset: 0x020c922a, size: 128 bytes, params: 3, frame: 19
|
||||
const object2 = {accessibilityRole: 'button', onPress: onPress_93894};
|
||||
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
|
||||
const binding = env0_1;
|
||||
return (
|
||||
<TouchableWithoutFeedback {...object2} key={a1}>
|
||||
<LegacyText style={[binding.expiryText, binding.revokeHint]}>
|
||||
{a0}
|
||||
</LegacyText>
|
||||
</TouchableWithoutFeedback>
|
||||
);
|
||||
}
|
||||
|
||||
function revokeHookOnPress() { // fn#93894, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12476:3071, owner: value_93892.revokeHook.onPress, offset: 0x020c92aa, size: 31 bytes, params: 1, frame: 11
|
||||
const binding = env1_0;
|
||||
return binding.handleRevoke(giftCode.code);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,272 @@
|
||||
/* Metro module 12294; source: components_native/premium/GiftPurchaseButton.tsx; dependencies: [5, 31, 27, 3808, 5140, 33, 4583, 4573, 566, 5143, 7355, 6771, 10385, 4496, 1244, 3802, 10381, 4579, 12295, 2] */
|
||||
function _fun93899(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#93899, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12480:6, offset: 0x020c9868, size: 211 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(5) /* metro dependency 5 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_5 = (require(27) /* metro dependency 27 */).View;
|
||||
const subscriptionStore = importDefault(3808) /* metro dependency 3808: SubscriptionStore */;
|
||||
const iapStoreAndroid = importDefault(5140) /* metro dependency 5140: IAPStoreAndroid */;
|
||||
const env0_8 = (require(33) /* metro dependency 33 */).jsx;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/premium/GiftPurchaseButton.tsx');
|
||||
exports.default = GiftPurchaseButton;
|
||||
}
|
||||
|
||||
function GiftPurchaseButton({style, variant, planId, analyticsLocation = {}, recipientUserId}) { // fn#93900, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12480:171, offset: 0x020c993b, size: 598 bytes, params: 2, frame: 31
|
||||
variant = variant === undefined ? 'primary' : variant;
|
||||
const value2 = (require(4583) /* metro dependency 4583: ButtonHooksNative */).useButtonTextColorStyles(variant);
|
||||
const object2 = {};
|
||||
const TextStyleSheet = (require(4573) /* metro dependency 4573: Text */).TextStyleSheet;
|
||||
copyDataProperties(object2, TextStyleSheet['text-sm/semibold'], undefined);
|
||||
copyDataProperties(object2, value2, undefined);
|
||||
const premiumSubscription = (require(566) /* metro dependency 566: flux */).useStateFromStores([SubscriptionStore],
|
||||
function() {
|
||||
return SubscriptionStore.getPremiumSubscription();
|
||||
});
|
||||
const productIdForGift = (require(5143) /* metro dependency 5143: ProductIdsAndroid */).getProductIdForGift(planId);
|
||||
const env0_3 = productIdForGift;
|
||||
const value4 = (require(7355) /* metro dependency 7355: IAPUtils */).useCanPurchaseIAP(productIdForGift);
|
||||
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([IAPStoreAndroid], _fun93902);
|
||||
const product = (require(566) /* metro dependency 566: flux */).useStateFromStores([IAPStoreAndroid], _fun93903);
|
||||
const r6 = premiumSubscription != null && premiumSubscription.planId === planId;
|
||||
const analyticsLocations = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().analyticsLocations;
|
||||
const value10 = analyticsLocations.useCallback(env0_3(_fun93905), [planId, recipientUserId, analyticsLocation,
|
||||
analyticsLocations,
|
||||
(require(10385) /* metro dependency 10385: createOrReuseGiftOrder */).useCreateOrReuseGiftOrder('GiftPurchaseButton')]);
|
||||
const BaseTextButton = (require(4579) /* metro dependency 4579: BaseTextButtonNative */).BaseTextButton;
|
||||
return (
|
||||
<View style={style}>
|
||||
<BaseTextButton
|
||||
textElement={(importDefault(12295) /* metro dependency 12295: renderPremiumButtonText */)({style: object2,
|
||||
basePlanId: planId, isCurrentPlan: r6, isGift: true, product: product})}
|
||||
variant={variant}
|
||||
size="sm"
|
||||
onPress={value10}
|
||||
loading={value5}
|
||||
disabled={!value4}
|
||||
grow
|
||||
/>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun93902() { // fn#93902, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12480:543, offset: 0x020c9ba4, size: 27 bytes, params: 1, frame: 11
|
||||
return IAPStoreAndroid.isPurchasingProduct(env0_3);
|
||||
}
|
||||
|
||||
function _fun93903() { // fn#93903, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12480:608, offset: 0x020c9bbf, size: 27 bytes, params: 1, frame: 11
|
||||
return IAPStoreAndroid.getProduct(env0_3);
|
||||
}
|
||||
|
||||
function* _fun93905() { // fn#93905, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12480:764, offset: 0x020c9be5, size: 334 bytes, params: 1, frame: 19
|
||||
var object2;
|
||||
var value3;
|
||||
var value4;
|
||||
var value5;
|
||||
var binding;
|
||||
var error;
|
||||
var binding3;
|
||||
var value10;
|
||||
var show;
|
||||
var intl;
|
||||
var string;
|
||||
var t;
|
||||
var R0RpRX;
|
||||
var CKsXk3;
|
||||
if (true) {
|
||||
value = environment.__proto__;
|
||||
try {
|
||||
} catch (error) {
|
||||
value = environment.__proto__.__proto__;
|
||||
binding = env2_1;
|
||||
binding3 = env2_2;
|
||||
value10 = binding(binding3[13]);
|
||||
show = value10.show;
|
||||
object2 = {};
|
||||
binding = env2_0;
|
||||
intl = binding(binding3[14]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding3[14]).t;
|
||||
R0RpRX = t.R0RpRX;
|
||||
object2.title = Reflect.apply(string, intl, [R0RpRX]);
|
||||
intl = binding(binding3[14]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding3[14]).t;
|
||||
CKsXk3 = t.CKsXk3;
|
||||
object2.body = Reflect.apply(string, intl, [CKsXk3]);
|
||||
Reflect.apply(show, value10, [object2]);
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
object2 = {};
|
||||
} catch (error) {
|
||||
value = environment.__proto__.__proto__;
|
||||
binding = env2_1;
|
||||
binding3 = env2_2;
|
||||
value10 = binding(binding3[13]);
|
||||
show = value10.show;
|
||||
object2 = {};
|
||||
binding = env2_0;
|
||||
intl = binding(binding3[14]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding3[14]).t;
|
||||
R0RpRX = t.R0RpRX;
|
||||
object2.title = Reflect.apply(string, intl, [R0RpRX]);
|
||||
intl = binding(binding3[14]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding3[14]).t;
|
||||
CKsXk3 = t.CKsXk3;
|
||||
object2.body = Reflect.apply(string, intl, [CKsXk3]);
|
||||
Reflect.apply(show, value10, [object2]);
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
} catch (error) {
|
||||
value = environment.__proto__.__proto__;
|
||||
binding = env2_1;
|
||||
binding3 = env2_2;
|
||||
value10 = binding(binding3[13]);
|
||||
show = value10.show;
|
||||
object2 = {};
|
||||
binding = env2_0;
|
||||
intl = binding(binding3[14]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding3[14]).t;
|
||||
R0RpRX = t.R0RpRX;
|
||||
object2.title = Reflect.apply(string, intl, [R0RpRX]);
|
||||
intl = binding(binding3[14]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding3[14]).t;
|
||||
CKsXk3 = t.CKsXk3;
|
||||
object2.body = Reflect.apply(string, intl, [CKsXk3]);
|
||||
Reflect.apply(show, value10, [object2]);
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
object2.planId = require;
|
||||
} catch (error) {
|
||||
value = environment.__proto__.__proto__;
|
||||
binding = env2_1;
|
||||
binding3 = env2_2;
|
||||
value10 = binding(binding3[13]);
|
||||
show = value10.show;
|
||||
object2 = {};
|
||||
binding = env2_0;
|
||||
intl = binding(binding3[14]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding3[14]).t;
|
||||
R0RpRX = t.R0RpRX;
|
||||
object2.title = Reflect.apply(string, intl, [R0RpRX]);
|
||||
intl = binding(binding3[14]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding3[14]).t;
|
||||
CKsXk3 = t.CKsXk3;
|
||||
object2.body = Reflect.apply(string, intl, [CKsXk3]);
|
||||
Reflect.apply(show, value10, [object2]);
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
} catch (error) {
|
||||
value = environment.__proto__.__proto__;
|
||||
binding = env2_1;
|
||||
binding3 = env2_2;
|
||||
value10 = binding(binding3[13]);
|
||||
show = value10.show;
|
||||
object2 = {};
|
||||
binding = env2_0;
|
||||
intl = binding(binding3[14]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding3[14]).t;
|
||||
R0RpRX = t.R0RpRX;
|
||||
object2.title = Reflect.apply(string, intl, [R0RpRX]);
|
||||
intl = binding(binding3[14]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding3[14]).t;
|
||||
CKsXk3 = t.CKsXk3;
|
||||
object2.body = Reflect.apply(string, intl, [CKsXk3]);
|
||||
Reflect.apply(show, value10, [object2]);
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
object2.recipientUserId = dependencyMap;
|
||||
} catch (error) {
|
||||
value = environment.__proto__.__proto__;
|
||||
binding = env2_1;
|
||||
binding3 = env2_2;
|
||||
value10 = binding(binding3[13]);
|
||||
show = value10.show;
|
||||
object2 = {};
|
||||
binding = env2_0;
|
||||
intl = binding(binding3[14]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding3[14]).t;
|
||||
R0RpRX = t.R0RpRX;
|
||||
object2.title = Reflect.apply(string, intl, [R0RpRX]);
|
||||
intl = binding(binding3[14]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding3[14]).t;
|
||||
CKsXk3 = t.CKsXk3;
|
||||
object2.body = Reflect.apply(string, intl, [CKsXk3]);
|
||||
Reflect.apply(show, value10, [object2]);
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
value3 = View(object2);
|
||||
} catch (error) {
|
||||
value = environment.__proto__.__proto__;
|
||||
binding = env2_1;
|
||||
binding3 = env2_2;
|
||||
value10 = binding(binding3[13]);
|
||||
show = value10.show;
|
||||
object2 = {};
|
||||
binding = env2_0;
|
||||
intl = binding(binding3[14]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding3[14]).t;
|
||||
R0RpRX = t.R0RpRX;
|
||||
object2.title = Reflect.apply(string, intl, [R0RpRX]);
|
||||
intl = binding(binding3[14]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding3[14]).t;
|
||||
CKsXk3 = t.CKsXk3;
|
||||
object2.body = Reflect.apply(string, intl, [CKsXk3]);
|
||||
Reflect.apply(show, value10, [object2]);
|
||||
return undefined;
|
||||
}
|
||||
yield value3;
|
||||
try {
|
||||
value4 = undefined;
|
||||
value5 = false;
|
||||
} catch (error) {
|
||||
value = environment.__proto__.__proto__;
|
||||
binding = env2_1;
|
||||
binding3 = env2_2;
|
||||
value10 = binding(binding3[13]);
|
||||
show = value10.show;
|
||||
object2 = {};
|
||||
binding = env2_0;
|
||||
intl = binding(binding3[14]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding3[14]).t;
|
||||
R0RpRX = t.R0RpRX;
|
||||
object2.title = Reflect.apply(string, intl, [R0RpRX]);
|
||||
intl = binding(binding3[14]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding3[14]).t;
|
||||
CKsXk3 = t.CKsXk3;
|
||||
object2.body = Reflect.apply(string, intl, [CKsXk3]);
|
||||
Reflect.apply(show, value10, [object2]);
|
||||
return undefined;
|
||||
}
|
||||
if (value5) {
|
||||
return value4;
|
||||
}
|
||||
binding = env2_0;
|
||||
var binding2 = env2_2;
|
||||
var {premiumType, planInterval} = binding(binding2[15]).getPremiumTypeFromPlanId(require);
|
||||
binding(binding2[16]).openGiftModal({recipientUserId: dependencyMap, premiumType: premiumType,
|
||||
planInterval: planInterval, analyticsLocation: importDefault, analyticsLocations: env1_4, order: value4});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,88 @@
|
||||
/* Metro module 12265; source: components_native/premium/GuildBoostingGuildList.tsx; dependencies: [31, 27, 1867, 4896, 661, 33, 4501, 697, 4048, 566, 8254, 8792, 6947, 7508, 6819, 4573, 11072, 1244, 12234, 2] */
|
||||
function _fun93733(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#93733, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12451:6, offset: 0x020c11dd, size: 407 bytes, params: 8, frame: 24
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_3 = value.View;
|
||||
const env0_4 = value.Image;
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const sortedGuildStore = importDefault(4896) /* metro dependency 4896: SortedGuildStore */;
|
||||
const env0_7 = (require(661) /* metro dependency 661: Constants */).NUMBER_OF_GUILDS_TO_RECOMMEND_BOOSTING;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_8 = value.jsx;
|
||||
const env0_9 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
const object = {'padding': 12, 'paddingLeft': 16, 'borderRadius': null, 'marginBottom': 8, 'minHeight': 96,
|
||||
'flexDirection': 'row', 'justifyContent': 'center', 'alignItems': 'center'};
|
||||
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
|
||||
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
|
||||
object.backgroundColor = BACKGROUND_BASE_LOWEST;
|
||||
const env0_10 = Reflect.apply(createStyles, value, [{guildCard: object, guildIcon: {marginRight: 16},
|
||||
guildCardDescription: {flex: 1}, subscriptionInfo: {'flexDirection': 'row', 'alignItems': 'center'},
|
||||
premiumGuildImage: {'width': 18, 'height': 12, 'marginLeft': -5}}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/premium/GuildBoostingGuildList.tsx');
|
||||
exports.default = GuildBoostingGuildList;
|
||||
}
|
||||
|
||||
function GuildBoostingGuildListItem({guildId}) { // fn#93734, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12451:638, offset: 0x020c1374, size: 635 bytes, params: 2, frame: 36
|
||||
var r0;
|
||||
var TouchableHitBox;
|
||||
var items4;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
var items2;
|
||||
var items3;
|
||||
var intl;
|
||||
var value;
|
||||
const styles = useStyles();
|
||||
const value3 = (importDefault(4048) /* metro dependency 4048: useTheme */)();
|
||||
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
|
||||
return GuildStore.getGuild(guildId);
|
||||
});
|
||||
if (guild == null) {
|
||||
r0 = null;
|
||||
} else {
|
||||
TouchableHitBox = importDefault(8792) /* metro dependency 8792: TouchableHitBox */;
|
||||
var defaultImport2Props = {style: styles.guildCard, activeOpacity: 0.5, onPress: onPress_93736};
|
||||
items4 = [((Component) => <Component guild={guild} size={(require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes.LARGE} style={styles.guildIcon} selected={false} />)(importDefault(6819) /* metro dependency 6819: GuildIcon */)];
|
||||
var viewBindingProps = {style: styles.guildCardDescription};
|
||||
items2 = [<Text variant="text-md/bold">{guild.name}</Text>];
|
||||
var viewBinding2Props = {style: styles.subscriptionInfo};
|
||||
items3 = [<Image source={importDefault(11072) /* metro dependency 11072 */} style={styles.premiumGuildImage} resizeMode="contain" resizeMethod="resize" />];
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
items3[1] = <Text variant="text-xs/medium">{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.If4iTS,
|
||||
|
||||
{subscriberCount: (importDefault(8254) /* metro dependency 8254: useGuildPowerupsBoostCount */)(guild?.id).total})}</Text>;
|
||||
items2[1] = <View {...viewBinding2Props}>{items3}</View>;
|
||||
items4[1] = <View {...viewBindingProps}>{items2}</View>;
|
||||
value = importDefault(12234) /* metro dependency 12234: BoostedGuildTierProgressCircle */;
|
||||
items4[2] = ((Component) => <Component guild={guild} theme={value3} />)(value);
|
||||
value = <TouchableHitBox {...defaultImport2Props}>{items4}</TouchableHitBox>;
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function GuildBoostingGuildList({guildCount = NUMBER_OF_GUILDS_TO_RECOMMEND_BOOSTING, style}) { // fn#93737, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12451:1464, offset: 0x020c1648, size: 138 bytes, params: 2, frame: 18
|
||||
return (
|
||||
<View style={style}>
|
||||
{(require(566) /* metro dependency 566: flux */).useStateFromStores([SortedGuildStore], function() {
|
||||
return SortedGuildStore.getFlattenedGuildIds();
|
||||
}).slice(0, guildCount).map(_fun93739)}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function GuildBoostingGuildListItemOnPress() { // fn#93736, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12451:876, owner: GuildBoostingGuildListItem.onPress, offset: 0x020c15ef, size: 89 bytes, params: 1, frame: 18
|
||||
const value = environment.__proto__;
|
||||
const transitionToGuildNativeModule = require(6947) /* metro dependency 6947: transitionToGuildNative */;
|
||||
transitionToGuildNativeModule.transitionToGuild(guildId, {state: {shouldShowSubscribeTooltip: true}});
|
||||
(importDefault(7508) /* metro dependency 7508: UserSettingsModalActionCreators */).close();
|
||||
}
|
||||
|
||||
function _fun93739(a0) { // fn#93739, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12451:1638, offset: 0x020c16d2, size: 31 bytes, params: 2, frame: 15
|
||||
return <GuildBoostingGuildListItem guildId={a0} key={a0} />;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,442 @@
|
||||
/* Metro module 12250; source: components_native/premium/GuildBoostingUpsell.tsx; dependencies: [31, 27, 4896, 1880, 33, 4501, 697, 12229, 1244, 7958, 12251, 12252, 12254, 9097, 12255, 7950, 12256, 10976, 12257, 10319, 12258, 7948, 12259, 8633, 566, 7563, 12260, 4048, 7522, 4002, 7531, 7532, 4573, 7971, 12264, 12265, 12266, 2] */
|
||||
function _fun93697(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#93697, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12436:6, offset: 0x020bf57b, size: 489 bytes, params: 8, frame: 25
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const StyleSheet = value.StyleSheet;
|
||||
const env0_3 = value.View;
|
||||
const env0_4 = value.Image;
|
||||
const sortedGuildStore = importDefault(4896) /* metro dependency 4896: SortedGuildStore */;
|
||||
const env0_6 = (require(1880) /* metro dependency 1880: PremiumConstants */).FractionalPremiumStates;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_7 = value.jsx;
|
||||
const env0_8 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
const object = {'marginTop': 32, 'paddingTop': 16};
|
||||
object.borderTopWidth = 2 * StyleSheet.hairlineWidth;
|
||||
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
|
||||
object.borderTopColor = BORDER_SUBTLE;
|
||||
const env0_9 = Reflect.apply(createStyles, value, [{root: {'paddingHorizontal': 16, 'paddingVertical': 32},
|
||||
title: {marginTop: 16}, features: {marginTop: 16}, cardText: {'lineHeight': 20, 'marginTop': 8,
|
||||
'textAlign': 'center'}, guildList: {marginTop: 16}, logoPremiumGuild: {'resizeMode': 'contain', 'width': '100%',
|
||||
'height': 34, 'maxWidth': 320, 'marginTop': 16}, imgPremiumGuild: {'width': 95, 'height': 65},
|
||||
imgNoGuilds: {'width': 178, 'height': 112, 'marginTop': 32}, header: {alignItems: 'center'}, upsell: object,
|
||||
subscriptionUpsell: {marginTop: 32}}]);
|
||||
const closure = FEATURES_PREMIUM_GUILD_USER;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/premium/GuildBoostingUpsell.tsx');
|
||||
exports.default = GuildBoostingUpsell;
|
||||
exports.FEATURES_PREMIUM_GUILD_USER = closure;
|
||||
}
|
||||
|
||||
function FEATURES_PREMIUM_GUILD_USER() { // fn#93698, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12436:796, offset: 0x020bf764, size: 350 bytes, params: 1, frame: 19
|
||||
let object2 = {};
|
||||
object2.icon = importDefault(12229) /* metro dependency 12229 */;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let string = intl.string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
object2.label = Reflect.apply(string, intl, [t['GS+bL0']]);
|
||||
const BoostGemIcon = (require(7958) /* metro dependency 7958: BoostGemIcon */).BoostGemIcon;
|
||||
object2.IconComponent = BoostGemIcon;
|
||||
const GUILD_BOOSTING_PINK = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.GUILD_BOOSTING_PINK;
|
||||
object2.color = GUILD_BOOSTING_PINK;
|
||||
const items2 = [object2];
|
||||
object2 = {icon: importDefault(12251) /* metro dependency 12251 */};
|
||||
object2.label = intl.string(t.a7LWeM);
|
||||
object2.IconComponent = IconComponent_93699;
|
||||
items2[1] = object2;
|
||||
object2 = {icon: importDefault(12254) /* metro dependency 12254 */};
|
||||
string = intl.string;
|
||||
const E76jz8 = t.E76jz8;
|
||||
object2.label = Reflect.apply(string, intl, [E76jz8]);
|
||||
const YELLOW_300 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.YELLOW_300;
|
||||
object2.color = YELLOW_300;
|
||||
const ShieldUserIcon = (require(9097) /* metro dependency 9097: ShieldUserIcon */).ShieldUserIcon;
|
||||
object2.IconComponent = ShieldUserIcon;
|
||||
items2[2] = object2;
|
||||
return items2;
|
||||
}
|
||||
|
||||
function GuildBoostingUpsell({onLearnMorePremium, fractionalState, isInReverseTrial, hasAvailableSlots}) { // fn#93700, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12436:1258, offset: 0x020bf91d, size: 2157 bytes, params: 2, frame: 40
|
||||
var r10;
|
||||
var r13;
|
||||
var r0;
|
||||
var items6;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
var title;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var cardText;
|
||||
var items2;
|
||||
var defaultImport3;
|
||||
var features;
|
||||
var defaultImport4;
|
||||
var object;
|
||||
var object2;
|
||||
var unsafe_rawColors;
|
||||
var items3;
|
||||
var object3;
|
||||
var object4;
|
||||
var object5;
|
||||
var object6;
|
||||
var value9;
|
||||
var items4;
|
||||
var object7;
|
||||
var items5;
|
||||
var items7;
|
||||
var value;
|
||||
const styles = useStyles();
|
||||
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([SortedGuildStore], function() {
|
||||
return SortedGuildStore.getFlattenedGuildIds().length > 0;
|
||||
});
|
||||
const value3 = (require(7563) /* metro dependency 7563: useSubscriptionPlansLoaded */).useSubscriptionPlansLoaded();
|
||||
const value4 = (require(12260) /* metro dependency 12260: GuildSubscriptionNoGuilds */).useGuildSubscriptionNoGuildsSource();
|
||||
const value5 = (importDefault(4048) /* metro dependency 4048: useTheme */)();
|
||||
const NONE = FractionalPremiumStates.NONE;
|
||||
if (fractionalState === NONE) {
|
||||
var viewBindingProps = {style: styles.root};
|
||||
var viewBindingProps2 = {style: styles.header};
|
||||
items6 = [<Image style={styles.imgPremiumGuild} source={importDefault(7522) /* metro dependency 7522 */} />];
|
||||
var imageBindingProps = {style: styles.logoPremiumGuild};
|
||||
r10 = (require(4002) /* metro dependency 4002: shared */).isThemeDark(value5) ? importDefault(7531) /* metro dependency 7531 */ : importDefault(7532) /* metro dependency 7532 */;
|
||||
imageBindingProps.source = r10;
|
||||
items6[1] = <Image {...imageBindingProps} />;
|
||||
title = styles.title;
|
||||
string = intl.string;
|
||||
items6[2] = <Text style={title} accessibilityRole="header" variant="heading-lg/semibold" color="mobile-text-heading-primary">{Reflect.apply(string,
|
||||
|
||||
intl, [t.hw6WTd])}</Text>;
|
||||
cardText = styles.cardText;
|
||||
string = intl.string;
|
||||
items6[3] = <Text style={cardText} variant="text-md/medium">{Reflect.apply(string, intl, [t.K5jBdG])}</Text>;
|
||||
items2 = [<View {...viewBindingProps2}>{items6}</View>];
|
||||
title = styles.title;
|
||||
string = intl.string;
|
||||
items2[1] = <Text style={title} accessibilityRole="header" variant="heading-lg/semibold" color="mobile-text-heading-primary">{Reflect.apply(string,
|
||||
|
||||
intl, [t.RvfRTB])}</Text>;
|
||||
defaultImport3 = importDefault(7971) /* metro dependency 7971: PremiumFeatureList */;
|
||||
features = styles.features;
|
||||
items2[2] = ((Component) => <Component style={features} features={FEATURES_PREMIUM_GUILD_USER()} />)(defaultImport3);
|
||||
title = styles.title;
|
||||
string = intl.string;
|
||||
items2[3] = <Text style={title} accessibilityRole="header" variant="heading-lg/semibold" color="mobile-text-heading-primary">{Reflect.apply(string,
|
||||
|
||||
intl, [t['/pVhjb']])}</Text>;
|
||||
defaultImport4 = importDefault(7971) /* metro dependency 7971: PremiumFeatureList */;
|
||||
object = {};
|
||||
features = styles.features;
|
||||
object.style = features;
|
||||
object2 = {icon: importDefault(12255) /* metro dependency 12255 */};
|
||||
object2.label = intl.string(t.Ts7BVI);
|
||||
object2.IconComponent = (require(7950) /* metro dependency 7950: ReactionIcon */).ReactionIcon;
|
||||
unsafe_rawColors = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors;
|
||||
object2.color = unsafe_rawColors.PREMIUM_PERK_YELLOW;
|
||||
items3 = [object2];
|
||||
object3 = {icon: importDefault(12256) /* metro dependency 12256 */};
|
||||
object3.label = intl.string(t.QcJbt6);
|
||||
object3.IconComponent = (require(10976) /* metro dependency 10976: StickerIcon */).StickerIcon;
|
||||
unsafe_rawColors = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors;
|
||||
object3.color = unsafe_rawColors.PREMIUM_PERK_PURPLE;
|
||||
items3[1] = object3;
|
||||
object4 = {icon: importDefault(12257) /* metro dependency 12257 */};
|
||||
object4.label = intl.string(t.rFNkf5);
|
||||
object4.color = '#4173da';
|
||||
object4.IconComponent = (require(10319) /* metro dependency 10319: HeadphonesIcon */).HeadphonesIcon;
|
||||
items3[2] = object4;
|
||||
object5 = {icon: importDefault(12258) /* metro dependency 12258 */};
|
||||
object5.label = intl.string(t['BpjjS/']);
|
||||
object5.IconComponent = (require(7948) /* metro dependency 7948: UploadIcon */).UploadIcon;
|
||||
unsafe_rawColors = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors;
|
||||
object5.color = unsafe_rawColors.GUILD_BOOSTING_PINK;
|
||||
items3[3] = object5;
|
||||
object6 = {icon: importDefault(12259) /* metro dependency 12259 */};
|
||||
object6.label = intl.string(t['9g5Lgb']);
|
||||
object6.IconComponent = (require(8633) /* metro dependency 8633: StarIcon */).StarIcon;
|
||||
unsafe_rawColors = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors;
|
||||
object6.color = unsafe_rawColors.PREMIUM_PERK_GOLD;
|
||||
items3[4] = object6;
|
||||
object.features = items3;
|
||||
items2[4] = ((Component) => <Component {...object} />)(defaultImport4);
|
||||
var viewBinding2Props = {style: styles.upsell};
|
||||
value9 = null;
|
||||
r13 = value3 ? fractionalState !== FractionalPremiumStates.NONE ? value9 : ((Component) => <Component />)(importDefault(12264) /* metro dependency 12264: PremiumSubscriptionPricingUpsell */) : value9;
|
||||
items4 = [r13];
|
||||
if (isInReverseTrial) {
|
||||
r13 = value9;
|
||||
} else {
|
||||
object7 = {};
|
||||
if (value2) {
|
||||
cardText = styles.cardText;
|
||||
string = intl.string;
|
||||
items7 = [<Text style={cardText} variant="text-md/medium">{Reflect.apply(string, intl,
|
||||
[t.WRzob8])}</Text>];
|
||||
cardText = styles.cardText;
|
||||
string = intl.string;
|
||||
items7[1] = <Text style={[cardText]} variant="text-md/bold">{Reflect.apply(string, intl,
|
||||
[t.j4bXcm])}</Text>;
|
||||
items7[2] = ((Component) => <Component style={styles.guildList} />)(importDefault(12265) /* metro dependency 12265: GuildBoostingGuildList */);
|
||||
object7.children = items7;
|
||||
} else {
|
||||
items5 = [<Image style={styles.imgNoGuilds} source={value4} />];
|
||||
cardText = styles.cardText;
|
||||
string = intl.string;
|
||||
items5[1] = <Text style={[cardText]} variant="text-md/bold">{Reflect.apply(string, intl,
|
||||
[t.FHm4bZ])}</Text>;
|
||||
cardText = styles.cardText;
|
||||
string = intl.string;
|
||||
items5[2] = <Text style={cardText} variant="text-md/medium">{Reflect.apply(string, intl,
|
||||
[t.PSLiiu])}</Text>;
|
||||
object7.children = items5;
|
||||
}
|
||||
r13 = <View {...object7} />;
|
||||
}
|
||||
items4[1] = r13;
|
||||
if (value3) {
|
||||
value = importDefault(12266) /* metro dependency 12266: PremiumSubscriptionUpsell */;
|
||||
value = ((Component) => <Component onLearnMorePremium={onLearnMorePremium} style={styles.subscriptionUpsell} />)(value);
|
||||
r10 = value;
|
||||
} else {
|
||||
r10 = value9;
|
||||
}
|
||||
items4[2] = r10;
|
||||
items2[5] = <View {...viewBinding2Props}>{items4}</View>;
|
||||
value = <View {...viewBindingProps}>{items2}</View>;
|
||||
r0 = value;
|
||||
} else if (isInReverseTrial) {
|
||||
var viewBindingProps = {style: styles.root};
|
||||
var viewBindingProps2 = {style: styles.header};
|
||||
items6 = [<Image style={styles.imgPremiumGuild} source={importDefault(7522) /* metro dependency 7522 */} />];
|
||||
var imageBindingProps = {style: styles.logoPremiumGuild};
|
||||
r10 = (require(4002) /* metro dependency 4002: shared */).isThemeDark(value5) ? importDefault(7531) /* metro dependency 7531 */ : importDefault(7532) /* metro dependency 7532 */;
|
||||
imageBindingProps.source = r10;
|
||||
items6[1] = <Image {...imageBindingProps} />;
|
||||
title = styles.title;
|
||||
string = intl.string;
|
||||
items6[2] = <Text style={title} accessibilityRole="header" variant="heading-lg/semibold" color="mobile-text-heading-primary">{Reflect.apply(string,
|
||||
|
||||
intl, [t.hw6WTd])}</Text>;
|
||||
cardText = styles.cardText;
|
||||
string = intl.string;
|
||||
items6[3] = <Text style={cardText} variant="text-md/medium">{Reflect.apply(string, intl, [t.K5jBdG])}</Text>;
|
||||
items2 = [<View {...viewBindingProps2}>{items6}</View>];
|
||||
title = styles.title;
|
||||
string = intl.string;
|
||||
items2[1] = <Text style={title} accessibilityRole="header" variant="heading-lg/semibold" color="mobile-text-heading-primary">{Reflect.apply(string,
|
||||
|
||||
intl, [t.RvfRTB])}</Text>;
|
||||
defaultImport3 = importDefault(7971) /* metro dependency 7971: PremiumFeatureList */;
|
||||
features = styles.features;
|
||||
items2[2] = ((Component) => <Component style={features} features={FEATURES_PREMIUM_GUILD_USER()} />)(defaultImport3);
|
||||
title = styles.title;
|
||||
string = intl.string;
|
||||
items2[3] = <Text style={title} accessibilityRole="header" variant="heading-lg/semibold" color="mobile-text-heading-primary">{Reflect.apply(string,
|
||||
|
||||
intl, [t['/pVhjb']])}</Text>;
|
||||
defaultImport4 = importDefault(7971) /* metro dependency 7971: PremiumFeatureList */;
|
||||
object = {};
|
||||
features = styles.features;
|
||||
object.style = features;
|
||||
object2 = {icon: importDefault(12255) /* metro dependency 12255 */};
|
||||
object2.label = intl.string(t.Ts7BVI);
|
||||
object2.IconComponent = (require(7950) /* metro dependency 7950: ReactionIcon */).ReactionIcon;
|
||||
unsafe_rawColors = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors;
|
||||
object2.color = unsafe_rawColors.PREMIUM_PERK_YELLOW;
|
||||
items3 = [object2];
|
||||
object3 = {icon: importDefault(12256) /* metro dependency 12256 */};
|
||||
object3.label = intl.string(t.QcJbt6);
|
||||
object3.IconComponent = (require(10976) /* metro dependency 10976: StickerIcon */).StickerIcon;
|
||||
unsafe_rawColors = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors;
|
||||
object3.color = unsafe_rawColors.PREMIUM_PERK_PURPLE;
|
||||
items3[1] = object3;
|
||||
object4 = {icon: importDefault(12257) /* metro dependency 12257 */};
|
||||
object4.label = intl.string(t.rFNkf5);
|
||||
object4.color = '#4173da';
|
||||
object4.IconComponent = (require(10319) /* metro dependency 10319: HeadphonesIcon */).HeadphonesIcon;
|
||||
items3[2] = object4;
|
||||
object5 = {icon: importDefault(12258) /* metro dependency 12258 */};
|
||||
object5.label = intl.string(t['BpjjS/']);
|
||||
object5.IconComponent = (require(7948) /* metro dependency 7948: UploadIcon */).UploadIcon;
|
||||
unsafe_rawColors = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors;
|
||||
object5.color = unsafe_rawColors.GUILD_BOOSTING_PINK;
|
||||
items3[3] = object5;
|
||||
object6 = {icon: importDefault(12259) /* metro dependency 12259 */};
|
||||
object6.label = intl.string(t['9g5Lgb']);
|
||||
object6.IconComponent = (require(8633) /* metro dependency 8633: StarIcon */).StarIcon;
|
||||
unsafe_rawColors = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors;
|
||||
object6.color = unsafe_rawColors.PREMIUM_PERK_GOLD;
|
||||
items3[4] = object6;
|
||||
object.features = items3;
|
||||
items2[4] = ((Component) => <Component {...object} />)(defaultImport4);
|
||||
var viewBinding2Props = {style: styles.upsell};
|
||||
value9 = null;
|
||||
r13 = value3 ? fractionalState !== FractionalPremiumStates.NONE ? value9 : ((Component) => <Component />)(importDefault(12264) /* metro dependency 12264: PremiumSubscriptionPricingUpsell */) : value9;
|
||||
items4 = [r13];
|
||||
if (isInReverseTrial) {
|
||||
r13 = value9;
|
||||
} else {
|
||||
object7 = {};
|
||||
if (value2) {
|
||||
cardText = styles.cardText;
|
||||
string = intl.string;
|
||||
items7 = [<Text style={cardText} variant="text-md/medium">{Reflect.apply(string, intl,
|
||||
[t.WRzob8])}</Text>];
|
||||
cardText = styles.cardText;
|
||||
string = intl.string;
|
||||
items7[1] = <Text style={[cardText]} variant="text-md/bold">{Reflect.apply(string, intl,
|
||||
[t.j4bXcm])}</Text>;
|
||||
items7[2] = ((Component) => <Component style={styles.guildList} />)(importDefault(12265) /* metro dependency 12265: GuildBoostingGuildList */);
|
||||
object7.children = items7;
|
||||
} else {
|
||||
items5 = [<Image style={styles.imgNoGuilds} source={value4} />];
|
||||
cardText = styles.cardText;
|
||||
string = intl.string;
|
||||
items5[1] = <Text style={[cardText]} variant="text-md/bold">{Reflect.apply(string, intl,
|
||||
[t.FHm4bZ])}</Text>;
|
||||
cardText = styles.cardText;
|
||||
string = intl.string;
|
||||
items5[2] = <Text style={cardText} variant="text-md/medium">{Reflect.apply(string, intl,
|
||||
[t.PSLiiu])}</Text>;
|
||||
object7.children = items5;
|
||||
}
|
||||
r13 = <View {...object7} />;
|
||||
}
|
||||
items4[1] = r13;
|
||||
if (value3) {
|
||||
value = importDefault(12266) /* metro dependency 12266: PremiumSubscriptionUpsell */;
|
||||
value = ((Component) => <Component onLearnMorePremium={onLearnMorePremium} style={styles.subscriptionUpsell} />)(value);
|
||||
r10 = value;
|
||||
} else {
|
||||
r10 = value9;
|
||||
}
|
||||
items4[2] = r10;
|
||||
items2[5] = <View {...viewBinding2Props}>{items4}</View>;
|
||||
value = <View {...viewBindingProps}>{items2}</View>;
|
||||
r0 = value;
|
||||
} else if (hasAvailableSlots) {
|
||||
var viewBindingProps = {style: styles.root};
|
||||
var viewBindingProps2 = {style: styles.header};
|
||||
items6 = [<Image style={styles.imgPremiumGuild} source={importDefault(7522) /* metro dependency 7522 */} />];
|
||||
var imageBindingProps = {style: styles.logoPremiumGuild};
|
||||
r10 = (require(4002) /* metro dependency 4002: shared */).isThemeDark(value5) ? importDefault(7531) /* metro dependency 7531 */ : importDefault(7532) /* metro dependency 7532 */;
|
||||
imageBindingProps.source = r10;
|
||||
items6[1] = <Image {...imageBindingProps} />;
|
||||
title = styles.title;
|
||||
string = intl.string;
|
||||
items6[2] = <Text style={title} accessibilityRole="header" variant="heading-lg/semibold" color="mobile-text-heading-primary">{Reflect.apply(string,
|
||||
|
||||
intl, [t.hw6WTd])}</Text>;
|
||||
cardText = styles.cardText;
|
||||
string = intl.string;
|
||||
items6[3] = <Text style={cardText} variant="text-md/medium">{Reflect.apply(string, intl, [t.K5jBdG])}</Text>;
|
||||
items2 = [<View {...viewBindingProps2}>{items6}</View>];
|
||||
title = styles.title;
|
||||
string = intl.string;
|
||||
items2[1] = <Text style={title} accessibilityRole="header" variant="heading-lg/semibold" color="mobile-text-heading-primary">{Reflect.apply(string,
|
||||
|
||||
intl, [t.RvfRTB])}</Text>;
|
||||
defaultImport3 = importDefault(7971) /* metro dependency 7971: PremiumFeatureList */;
|
||||
features = styles.features;
|
||||
items2[2] = ((Component) => <Component style={features} features={FEATURES_PREMIUM_GUILD_USER()} />)(defaultImport3);
|
||||
title = styles.title;
|
||||
string = intl.string;
|
||||
items2[3] = <Text style={title} accessibilityRole="header" variant="heading-lg/semibold" color="mobile-text-heading-primary">{Reflect.apply(string,
|
||||
|
||||
intl, [t['/pVhjb']])}</Text>;
|
||||
defaultImport4 = importDefault(7971) /* metro dependency 7971: PremiumFeatureList */;
|
||||
object = {};
|
||||
features = styles.features;
|
||||
object.style = features;
|
||||
object2 = {icon: importDefault(12255) /* metro dependency 12255 */};
|
||||
object2.label = intl.string(t.Ts7BVI);
|
||||
object2.IconComponent = (require(7950) /* metro dependency 7950: ReactionIcon */).ReactionIcon;
|
||||
unsafe_rawColors = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors;
|
||||
object2.color = unsafe_rawColors.PREMIUM_PERK_YELLOW;
|
||||
items3 = [object2];
|
||||
object3 = {icon: importDefault(12256) /* metro dependency 12256 */};
|
||||
object3.label = intl.string(t.QcJbt6);
|
||||
object3.IconComponent = (require(10976) /* metro dependency 10976: StickerIcon */).StickerIcon;
|
||||
unsafe_rawColors = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors;
|
||||
object3.color = unsafe_rawColors.PREMIUM_PERK_PURPLE;
|
||||
items3[1] = object3;
|
||||
object4 = {icon: importDefault(12257) /* metro dependency 12257 */};
|
||||
object4.label = intl.string(t.rFNkf5);
|
||||
object4.color = '#4173da';
|
||||
object4.IconComponent = (require(10319) /* metro dependency 10319: HeadphonesIcon */).HeadphonesIcon;
|
||||
items3[2] = object4;
|
||||
object5 = {icon: importDefault(12258) /* metro dependency 12258 */};
|
||||
object5.label = intl.string(t['BpjjS/']);
|
||||
object5.IconComponent = (require(7948) /* metro dependency 7948: UploadIcon */).UploadIcon;
|
||||
unsafe_rawColors = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors;
|
||||
object5.color = unsafe_rawColors.GUILD_BOOSTING_PINK;
|
||||
items3[3] = object5;
|
||||
object6 = {icon: importDefault(12259) /* metro dependency 12259 */};
|
||||
object6.label = intl.string(t['9g5Lgb']);
|
||||
object6.IconComponent = (require(8633) /* metro dependency 8633: StarIcon */).StarIcon;
|
||||
unsafe_rawColors = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors;
|
||||
object6.color = unsafe_rawColors.PREMIUM_PERK_GOLD;
|
||||
items3[4] = object6;
|
||||
object.features = items3;
|
||||
items2[4] = ((Component) => <Component {...object} />)(defaultImport4);
|
||||
var viewBinding2Props = {style: styles.upsell};
|
||||
value9 = null;
|
||||
r13 = value3 ? fractionalState !== FractionalPremiumStates.NONE ? value9 : ((Component) => <Component />)(importDefault(12264) /* metro dependency 12264: PremiumSubscriptionPricingUpsell */) : value9;
|
||||
items4 = [r13];
|
||||
if (isInReverseTrial) {
|
||||
r13 = value9;
|
||||
} else {
|
||||
object7 = {};
|
||||
if (value2) {
|
||||
cardText = styles.cardText;
|
||||
string = intl.string;
|
||||
items7 = [<Text style={cardText} variant="text-md/medium">{Reflect.apply(string, intl,
|
||||
[t.WRzob8])}</Text>];
|
||||
cardText = styles.cardText;
|
||||
string = intl.string;
|
||||
items7[1] = <Text style={[cardText]} variant="text-md/bold">{Reflect.apply(string, intl,
|
||||
[t.j4bXcm])}</Text>;
|
||||
items7[2] = ((Component) => <Component style={styles.guildList} />)(importDefault(12265) /* metro dependency 12265: GuildBoostingGuildList */);
|
||||
object7.children = items7;
|
||||
} else {
|
||||
items5 = [<Image style={styles.imgNoGuilds} source={value4} />];
|
||||
cardText = styles.cardText;
|
||||
string = intl.string;
|
||||
items5[1] = <Text style={[cardText]} variant="text-md/bold">{Reflect.apply(string, intl,
|
||||
[t.FHm4bZ])}</Text>;
|
||||
cardText = styles.cardText;
|
||||
string = intl.string;
|
||||
items5[2] = <Text style={cardText} variant="text-md/medium">{Reflect.apply(string, intl,
|
||||
[t.PSLiiu])}</Text>;
|
||||
object7.children = items5;
|
||||
}
|
||||
r13 = <View {...object7} />;
|
||||
}
|
||||
items4[1] = r13;
|
||||
if (value3) {
|
||||
value = importDefault(12266) /* metro dependency 12266: PremiumSubscriptionUpsell */;
|
||||
value = ((Component) => <Component onLearnMorePremium={onLearnMorePremium} style={styles.subscriptionUpsell} />)(value);
|
||||
r10 = value;
|
||||
} else {
|
||||
r10 = value9;
|
||||
}
|
||||
items4[2] = r10;
|
||||
items2[5] = <View {...viewBinding2Props}>{items4}</View>;
|
||||
value = <View {...viewBindingProps}>{items2}</View>;
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = null;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function FEATURES_PREMIUM_GUILD_USERIconComponent(a0) { // fn#93699, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12436:1022, owner: FEATURES_PREMIUM_GUILD_USER.IconComponent, offset: 0x020bf8c2, size: 91 bytes, params: 2, frame: 16
|
||||
const BoostTier3Icon = (require(12252) /* metro dependency 12252: BoostTier3Icon */).BoostTier3Icon;
|
||||
const boostTier3IconProps = {...a0};
|
||||
const GUILD_BOOSTING_PINK = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.GUILD_BOOSTING_PINK;
|
||||
boostTier3IconProps['color'] = GUILD_BOOSTING_PINK;
|
||||
return <BoostTier3Icon {...boostTier3IconProps} />;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,158 @@
|
||||
/* Metro module 12281; source: components_native/premium/OutboundPromotionCard.tsx; dependencies: [57, 31, 27, 661, 33, 4501, 697, 6235, 6275, 6758, 1244, 4573, 6622, 4048, 7286, 12282, 4496, 12283, 1962, 7289, 4578, 6766, 4080, 2] */
|
||||
function _fun93833(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#93833, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12467:6, offset: 0x020c603e, size: 529 bytes, params: 8, frame: 23
|
||||
var object4;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_5 = value.View;
|
||||
const env0_6 = value.Image;
|
||||
const USER_SETTINGS_CONTAINER_HORIZONTAL_PADDING = (require(661) /* metro dependency 661: Constants */).USER_SETTINGS_CONTAINER_HORIZONTAL_PADDING;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_7 = value.jsx;
|
||||
const env0_8 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object4 = {};
|
||||
const object5 = {'flex': 1, 'flexDirection': 'column', 'paddingHorizontal': null, 'paddingVertical': 12,
|
||||
'backgroundColor': null, 'marginTop': 8};
|
||||
object5.paddingHorizontal = USER_SETTINGS_CONTAINER_HORIZONTAL_PADDING;
|
||||
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
||||
object5.backgroundColor = BACKGROUND_BASE_LOW;
|
||||
object4.card = object5;
|
||||
object4.mainContainer = {'flex': 1, 'flexDirection': 'row', 'alignItems': 'center',
|
||||
'justifyContent': 'space-between'};
|
||||
object4.textContainer = {'flexDirection': 'row', 'flexShrink': 1, 'alignItems': 'center'};
|
||||
const object6 = {'width': 32, 'height': 32, 'marginRight': 8, 'borderRadius': null, 'alignItems': 'center',
|
||||
'justifyContent': 'center'};
|
||||
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
|
||||
const DARK_BLACK_500_LIGHT_PRIMARY_100 = (require(6235) /* metro dependency 6235: LegacyTokens */).DARK_BLACK_500_LIGHT_PRIMARY_100;
|
||||
object6.backgroundColor = DARK_BLACK_500_LIGHT_PRIMARY_100;
|
||||
object4.imageContainer = object6;
|
||||
object4.image = {'width': 28, 'height': 28, 'resizeMode': 'contain'};
|
||||
object4.title = {lineHeight: 20};
|
||||
object4.subText = {lineHeight: 18};
|
||||
object4.claimButton = {paddingHorizontal: 12};
|
||||
object4.moreDetails = {marginLeft: 40};
|
||||
object4.termsAndConditionsText = {'paddingHorizontal': 16, 'paddingTop': 16};
|
||||
object4.buttonContainer = {'flexGrow': 1, 'flexDirection': 'row', 'marginLeft': 4, 'justifyContent': 'flex-end'};
|
||||
const env0_9 = Reflect.apply(createStyles, value, [object4]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/premium/OutboundPromotionCard.tsx');
|
||||
exports.default = OutboundPromotionCard;
|
||||
}
|
||||
|
||||
function TermsAndConditionsActionSheet({termsAndConditions}) { // fn#93834, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12467:1039, offset: 0x020c624f, size: 246 bytes, params: 2, frame: 25
|
||||
const styles = useStyles();
|
||||
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
|
||||
const object2 = {};
|
||||
const BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const PdKWVT = (require(1244) /* metro dependency 1244: indexNative */).t.PdKWVT;
|
||||
object2.header = <BottomSheetTitleHeader title={Reflect.apply(string, intl, [PdKWVT])} />;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return (
|
||||
<BottomSheet {...object2}>
|
||||
<Text style={styles.termsAndConditionsText} variant="text-sm/medium">
|
||||
{(importDefault(6622) /* metro dependency 6622: MarkupUtils */).parse(termsAndConditions, false,
|
||||
{allowLinks: true})}
|
||||
</Text>
|
||||
</BottomSheet>
|
||||
);
|
||||
}
|
||||
|
||||
function OutboundPromotionCard({outboundPromotion, code}) { // fn#93835, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12467:1369, offset: 0x020c6345, size: 927 bytes, params: 2, frame: 32
|
||||
var env0_3Binding = undefined;
|
||||
const styles = useStyles();
|
||||
const promotionImageURL = (require(7286) /* metro dependency 7286: PromotionUtils */).getPromotionImageURL(outboundPromotion.id,
|
||||
(importDefault(4048) /* metro dependency 4048: useTheme */)());
|
||||
const value4 = code != null;
|
||||
const value5 = (importDefault(12282) /* metro dependency 12282: useOutboundPromotionRedemptionEndDate */)(outboundPromotion,
|
||||
value4);
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const formatToPlainString = intl.formatToPlainString;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const r21 = value4 ? Reflect.apply(formatToPlainString, intl, [t.VaD05h,
|
||||
{endDate: value5}]) : Reflect.apply(formatToPlainString, intl, [t['/XWgfG'], {endDate: value5}]);
|
||||
const string = intl.string;
|
||||
const r20 = value4 ? Reflect.apply(string, intl, [t['2cHUti']]) : Reflect.apply(string, intl, [t.O13yhz]);
|
||||
const binding = env0_4;
|
||||
var [property, env0_3] = env0_3Binding(binding.useState(false), 2);
|
||||
binding.useLayoutEffect(_fun93836, [property, code, outboundPromotion]);
|
||||
const items2 = [<View style={styles.imageContainer}><Image style={styles.image} source={{uri: promotionImageURL}} /></View>];
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
items2[1] = <View style={styles.textContainer}><View><Text style={styles.title} accessibilityRole="header" variant="text-md/semibold" color="mobile-text-heading-primary">{outboundPromotion.outboundTitle}</Text><Text style={styles.subText} variant="text-sm/medium" color="text-default">{r21}</Text></View></View>;
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
items2[2] = <View style={styles.buttonContainer}><View style={styles.claimButton}><Button size="sm" shrink text={r20} onPress={onPress_93841} /></View></View>;
|
||||
const view = <View style={styles.mainContainer}>{items2}</View>;
|
||||
const TextWithIOSLinkWorkaround = (require(6766) /* metro dependency 6766: TextWithIOSLinkWorkaround */).TextWithIOSLinkWorkaround;
|
||||
return (
|
||||
<View style={styles.card}>
|
||||
{view}
|
||||
<View>
|
||||
<TextWithIOSLinkWorkaround style={styles.moreDetails} variant="text-sm/medium">
|
||||
{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.sCm3Zb,
|
||||
{onClick: onClick_93842})}
|
||||
</TextWithIOSLinkWorkaround>
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun93836() { // fn#93836, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12467:1809, offset: 0x020c66e4, size: 66 bytes, params: 1, frame: 12
|
||||
var environment;
|
||||
var value;
|
||||
if (env0_2) {
|
||||
value = environment.__proto__;
|
||||
value = importDefault(4496) /* metro dependency 4496: AlertActionCreators */;
|
||||
value.openLazy({importer: importer_93837});
|
||||
}
|
||||
}
|
||||
|
||||
function OutboundPromotionCardOnClick() { // fn#93842, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12467:2773, owner: OutboundPromotionCard.onClick, offset: 0x020c683a, size: 117 bytes, params: 1, frame: 17
|
||||
var environment;
|
||||
let value = environment.__proto__;
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
value = importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */;
|
||||
const openLazy = value.openLazy;
|
||||
const outboundPromotionBinding = outboundPromotion;
|
||||
Reflect.apply(openLazy, value, [function() {
|
||||
var Promise = global.Promise;
|
||||
return Promise.resolve(TermsAndConditionsActionSheet);
|
||||
}, 'OutboundPromotionTermsAndConditions-' + outboundPromotionBinding.id,
|
||||
{termsAndConditions: outboundPromotionBinding.outboundTermsAndConditions}]);
|
||||
}
|
||||
|
||||
function importer_93837() { // fn#93837, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12467:1845, offset: 0x020c6726, size: 64 bytes, params: 1, frame: 13
|
||||
var environment;
|
||||
let value = environment.__proto__.__proto__;
|
||||
value = require(dependencyMap[18]);
|
||||
value = value(dependencyMap[17], dependencyMap.paths);
|
||||
return value.then(function({default: env0_0}) {
|
||||
return _fun93839;
|
||||
});
|
||||
}
|
||||
|
||||
function _fun93838({default: env0_0}) { // fn#93838, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12467:1879, offset: 0x020c6766, size: 23 bytes, params: 2, frame: 2
|
||||
return _fun93839;
|
||||
}
|
||||
|
||||
function _fun93839(a0) { // fn#93839, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12467:1894, offset: 0x020c677d, size: 120 bytes, params: 2, frame: 16
|
||||
const binding = env0_0;
|
||||
const bindingProps = {...a0};
|
||||
bindingProps['onCancel'] = onCancel_93840;
|
||||
bindingProps['onClaim'] = (importDefault(7289) /* metro dependency 7289: PromotionsActionCreators */).addClaimedOutboundPromotionCode;
|
||||
bindingProps['code'] = code;
|
||||
bindingProps['outboundPromotion'] = outboundPromotion;
|
||||
return ((Component) => <Component {...bindingProps} />)(binding);
|
||||
}
|
||||
|
||||
function onCancel_93840() { // fn#93840, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12467:1916, offset: 0x020c67f5, size: 51 bytes, params: 1, frame: 11
|
||||
let value = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
|
||||
(importDefault(4496) /* metro dependency 4496: AlertActionCreators */).close();
|
||||
value = environment.__proto__.__proto__.__proto__.__proto__;
|
||||
env4_3(false);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,183 @@
|
||||
/* Metro module 12283; source: components_native/premium/OutboundPromotionClaimAlert.tsx; dependencies: [57, 31, 27, 661, 33, 4501, 697, 12284, 6771, 6789, 7286, 12285, 1305, 1244, 4573, 4578, 6797, 12286, 4596, 3853, 2] */
|
||||
function _fun93847(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#93847, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12469:6, offset: 0x020c6a5f, size: 638 bytes, params: 8, frame: 23
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_5 = value.ActivityIndicator;
|
||||
const env0_6 = value.View;
|
||||
const env0_7 = value.Image;
|
||||
const env0_8 = value.ScrollView;
|
||||
const Fonts = (require(661) /* metro dependency 661: Constants */).Fonts;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_9 = value.jsx;
|
||||
const env0_10 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {};
|
||||
object2.loading = {marginVertical: 80};
|
||||
object2.body = {alignItems: 'center'};
|
||||
const MOBILE_TEXT_HEADING_PRIMARY = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_TEXT_HEADING_PRIMARY;
|
||||
const PRIMARY_BOLD = Fonts.PRIMARY_BOLD;
|
||||
object2.title = {'fontSize': 24, 'lineHeight': 30, 'color': null, 'fontFamily': null, 'marginBottom': 8,
|
||||
color: MOBILE_TEXT_HEADING_PRIMARY, fontFamily: PRIMARY_BOLD};
|
||||
object2.errorTitle = {'lineHeight': 24, 'marginBottom': 8};
|
||||
object2.bodyText = {'textAlign': 'center', 'lineHeight': 20};
|
||||
const object3 = {'backgroundColor': null, 'marginTop': 16, 'padding': 12};
|
||||
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
|
||||
object3.backgroundColor = BACKGROUND_SURFACE_HIGH;
|
||||
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
||||
object2.copyInputContainer = object3;
|
||||
object2.copyInputLabel = {'lineHeight': 20, 'marginBottom': 8};
|
||||
const object4 = {'borderWidth': 1, 'borderColor': null, 'borderRadius': null, 'padding': 8, 'marginBottom': 8,
|
||||
'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'space-between'};
|
||||
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
|
||||
object4.borderColor = BACKGROUND_BASE_LOWEST;
|
||||
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
|
||||
object2.copyInput = object4;
|
||||
const ICON_FEEDBACK_POSITIVE = (importDefault(697) /* metro dependency 697: native */).colors.ICON_FEEDBACK_POSITIVE;
|
||||
object2.copyInputCopied = {borderColor: ICON_FEEDBACK_POSITIVE};
|
||||
object2.copyButton = {'paddingHorizontal': 8, 'marginLeft': 8};
|
||||
object2.promotionArt = {'width': 200, 'height': 100, 'marginBottom': 20};
|
||||
object2.errorArt = {'width': 141, 'height': 99, 'marginBottom': 20};
|
||||
const env0_11 = Reflect.apply(createStyles, value, [object2]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/premium/OutboundPromotionClaimAlert.tsx');
|
||||
exports.default = OutboundPromotionClaimAlert;
|
||||
}
|
||||
|
||||
function OutboundPromotionClaimAlert({onCancel, onClaim, code, outboundPromotion}) { // fn#93848, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12469:1113, offset: 0x020c6cdd, size: 1599 bytes, params: 2, frame: 38
|
||||
var r15;
|
||||
var r4;
|
||||
var items5;
|
||||
var LegacyText;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
var items2;
|
||||
var object;
|
||||
var copyInput;
|
||||
var object2;
|
||||
var items3;
|
||||
var Button;
|
||||
const env0_3 = outboundPromotion;
|
||||
const styles = useStyles();
|
||||
const binding = env0_4;
|
||||
const value3 = binding.useState(null);
|
||||
const binding2 = env0_3;
|
||||
const value4 = binding2(value3, 2);
|
||||
const property = value4[0];
|
||||
var env0_4 = value4[1];
|
||||
const value5 = binding2((importDefault(12284) /* metro dependency 12284: useResettingValue */)(false, 2000), 2);
|
||||
const property2 = value5[0];
|
||||
const env0_5 = value5[1];
|
||||
const value6 = code != null;
|
||||
const defaultImport2 = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
|
||||
const USER_SETTINGS_GIFT_INVENTORY = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).USER_SETTINGS_GIFT_INVENTORY;
|
||||
binding.useEffect(_fun93849, [value6, outboundPromotion.id, outboundPromotion.outboundTitle,
|
||||
outboundPromotion.partnerId, onClaim, defaultImport2(USER_SETTINGS_GIFT_INVENTORY).analyticsLocations]);
|
||||
if (code != null) {
|
||||
var viewBindingProps = {style: styles.body};
|
||||
items5 = [<Image source={importDefault(12285) /* metro dependency 12285 */} style={styles.promotionArt} />];
|
||||
LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
|
||||
string = intl.string;
|
||||
items5[1] = <LegacyText style={styles.title} accessibilityRole="header">{Reflect.apply(string, intl,
|
||||
[t['23BfZh']])}</LegacyText>;
|
||||
items5[2] = <Text style={styles.bodyText} variant="text-md/medium">{outboundPromotion.outboundRedemptionModalBody}</Text>;
|
||||
var viewBindingProps2 = {style: styles.copyInputContainer};
|
||||
string = intl.string;
|
||||
items2 = [<Text style={styles.copyInputLabel} variant="text-md/semibold" color="mobile-text-heading-primary">{Reflect.apply(string,
|
||||
|
||||
intl, [t.s9LFQh])}</Text>];
|
||||
object = {};
|
||||
copyInput = styles.copyInput;
|
||||
if (property2) {
|
||||
object2 = {};
|
||||
copyDataProperties(object2, copyInput, 13);
|
||||
copyDataProperties(object2, styles.copyInputCopied, 13);
|
||||
r15 = object2;
|
||||
} else {
|
||||
r15 = copyInput;
|
||||
}
|
||||
object.style = r15;
|
||||
items3 = [<ScrollView style={{flex: 1}} horizontal showsHorizontalScrollIndicator={false}><View onStartShouldSetResponderCapture={function() {
|
||||
return true;
|
||||
}}><Text lineClamp={1} variant="text-sm/medium" color="interactive-text-active">{code}</Text></View></ScrollView>];
|
||||
var viewBinding2Props = {style: styles.copyButton};
|
||||
Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
string = intl.string;
|
||||
items3[1] = <View {...viewBinding2Props}><Button text={property2 ? Reflect.apply(string, intl,
|
||||
[t.t5VZ88]) : Reflect.apply(string, intl, [t.OpuAlK])} size="sm" onPress={onPress_93853} /></View>;
|
||||
items2[1] = <View {...object}>{items3}</View>;
|
||||
items2[2] = <Text variant="text-sm/medium" color="text-muted">{'This code is included in your confirmation email'}</Text>;
|
||||
items5[3] = <View {...viewBindingProps2}>{items2}</View>;
|
||||
r4 = <View {...viewBindingProps}>{items5}</View>;
|
||||
} else {
|
||||
r4 = <ActivityIndicator style={styles.loading} />;
|
||||
}
|
||||
const items4 = [<Image source={importDefault(12286) /* metro dependency 12286 */} style={styles.errorArt} />];
|
||||
items4[1] = <Text style={styles.errorTitle} variant="text-lg/bold" color="mobile-text-heading-primary">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.iufib1)}</Text>;
|
||||
items4[2] = <Text style={styles.bodyText} variant="text-md/medium">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.eAn6z2)}</Text>;
|
||||
const view = <View style={styles.body}>{items4}</View>;
|
||||
const Alert = importDefault(4596) /* metro dependency 4596: Alert */;
|
||||
const r11 = property != null ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t['+zx47d']);
|
||||
const r8 = property != null ? undefined : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.TulDPl);
|
||||
r4 = property != null ? view : r4;
|
||||
return (
|
||||
<Alert
|
||||
onCancel={onCancel}
|
||||
confirmText={r11}
|
||||
onConfirm={onConfirm}
|
||||
cancelText={r8}
|
||||
noDefaultButtons={!value6 && property == null}
|
||||
>
|
||||
{r4}
|
||||
</Alert>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun93849() { // fn#93849, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12469:1384, offset: 0x020c731c, size: 134 bytes, params: 1, frame: 15
|
||||
var environment;
|
||||
var value2;
|
||||
var moduleValue;
|
||||
var claimOutboundPromotion;
|
||||
var outboundPromotionBinding;
|
||||
var value;
|
||||
if (!result) {
|
||||
value2 = environment.__proto__;
|
||||
moduleValue = require(7286) /* metro dependency 7286: PromotionUtils */;
|
||||
claimOutboundPromotion = moduleValue.claimOutboundPromotion;
|
||||
outboundPromotionBinding = outboundPromotion;
|
||||
value = Reflect.apply(claimOutboundPromotion, moduleValue, [{promotionId: outboundPromotionBinding.id,
|
||||
promotionTitle: outboundPromotionBinding.outboundTitle, partnerId: outboundPromotionBinding.partnerId,
|
||||
analyticsLocations: analyticsLocations}]);
|
||||
value = value.then(function(a0) {
|
||||
return onClaim(a0);
|
||||
});
|
||||
value.catch(_fun93851);
|
||||
}
|
||||
}
|
||||
|
||||
function OutboundPromotionClaimAlertOnPress() { // fn#93853, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12469:2559, owner: OutboundPromotionClaimAlert.onPress, offset: 0x020c73a2, size: 56 bytes, params: 1, frame: 13
|
||||
let value = environment.__proto__;
|
||||
value = require(6797) /* metro dependency 6797: ClipboardUtilsNative */;
|
||||
value.copy(code);
|
||||
env0_5(true);
|
||||
}
|
||||
|
||||
function OutboundPromotionClaimAlertOnConfirm() { // fn#93854, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12469:3219, owner: OutboundPromotionClaimAlert.onConfirm, offset: 0x020c73da, size: 97 bytes, params: 1, frame: 17
|
||||
var value2;
|
||||
var moduleValue;
|
||||
if (code != null) {
|
||||
value2 = environment.__proto__;
|
||||
moduleValue = require(7286) /* metro dependency 7286: PromotionUtils */;
|
||||
(importDefault(3853) /* metro dependency 3853: Linking */).openURL(moduleValue.getOutboundPromotionRedemptionUrl(code,
|
||||
|
||||
outboundPromotion));
|
||||
}
|
||||
onCancel();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,254 @@
|
||||
/* Metro module 7301; source: components_native/premium/PremiumActivatedAlert.tsx; dependencies: [31, 27, 661, 33, 4501, 6235, 3802, 7302, 7303, 7304, 7305, 7306, 7250, 7251, 7307, 7308, 7309, 7310, 7311, 7312, 7313, 4002, 7314, 7315, 7316, 7317, 7318, 7319, 7320, 7321, 7322, 1244, 4048, 4596, 7323, 7324, 1305, 2] */
|
||||
function _fun58978(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#58978, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7479:6, offset: 0x016dca3e, size: 470 bytes, params: 8, frame: 21
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_3 = value.Image;
|
||||
const env0_4 = value.ImageBackground;
|
||||
const env0_5 = value.View;
|
||||
const env0_6 = (require(661) /* metro dependency 661: Constants */).SubscriptionStatusTypes;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_7 = value.jsx;
|
||||
const env0_8 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
const DARK_PRIMARY_300_LIGHT_PRIMARY_400 = (require(6235) /* metro dependency 6235: LegacyTokens */).DARK_PRIMARY_300_LIGHT_PRIMARY_400;
|
||||
const env0_9 = Reflect.apply(createStyles, value, [{alert: {'overflow': 'hidden', 'paddingBottom': 24},
|
||||
header: {'alignSelf': 'stretch', 'margin': -16, 'padding': 16, 'height': 100, 'position': 'relative'},
|
||||
headerImage: {'position': 'absolute', 'left': '50%'}, body: {'paddingHorizontal': 16, 'marginTop': 40,
|
||||
'maxWidth': 300, 'alignSelf': 'center', 'alignItems': 'center'}, logoPlusPremiumGuild: {'marginTop': 3,
|
||||
'width': 101, 'height': 19}, description: {'fontSize': 14, 'lineHeight': 16, 'textAlign': 'center',
|
||||
'marginTop': 20, color: DARK_PRIMARY_300_LIGHT_PRIMARY_400}}]);
|
||||
const env0_10 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun58984);
|
||||
const env0_11 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun58985);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/premium/PremiumActivatedAlert.tsx');
|
||||
exports.default = PremiumActivatedAlert;
|
||||
}
|
||||
|
||||
function getHeaderBackground(a0) { // fn#58979, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7479:1455, offset: 0x016dcc14, size: 294 bytes, params: 2, frame: 14
|
||||
const Branding = (require(3802) /* metro dependency 3802: PremiumUtils */).Branding;
|
||||
const TIER_0 = Branding.TIER_0;
|
||||
if (TIER_0 === a0) {
|
||||
return importDefault(7302) /* metro dependency 7302 */;
|
||||
}
|
||||
const TIER_1 = Branding.TIER_1;
|
||||
if (TIER_1 === a0) {
|
||||
return importDefault(7303) /* metro dependency 7303 */;
|
||||
}
|
||||
const TIER_2 = Branding.TIER_2;
|
||||
if (TIER_2 === a0) {
|
||||
return importDefault(7304) /* metro dependency 7304 */;
|
||||
}
|
||||
const BUNDLE = Branding.BUNDLE;
|
||||
if (BUNDLE === a0) {
|
||||
return importDefault(7305) /* metro dependency 7305 */;
|
||||
}
|
||||
const PREMIUM_GUILD = Branding.PREMIUM_GUILD;
|
||||
if (PREMIUM_GUILD === a0) {
|
||||
return importDefault(7306) /* metro dependency 7306 */;
|
||||
}
|
||||
}
|
||||
|
||||
function getHeaderImage(a0) { // fn#58980, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7479:1727, offset: 0x016dcd3a, size: 294 bytes, params: 2, frame: 14
|
||||
const Branding = (require(3802) /* metro dependency 3802: PremiumUtils */).Branding;
|
||||
const TIER_0 = Branding.TIER_0;
|
||||
if (TIER_0 === a0) {
|
||||
return importDefault(7250) /* metro dependency 7250 */;
|
||||
}
|
||||
const TIER_1 = Branding.TIER_1;
|
||||
if (TIER_1 === a0) {
|
||||
return importDefault(7251) /* metro dependency 7251 */;
|
||||
}
|
||||
const TIER_2 = Branding.TIER_2;
|
||||
if (TIER_2 === a0) {
|
||||
return importDefault(7307) /* metro dependency 7307 */;
|
||||
}
|
||||
const BUNDLE = Branding.BUNDLE;
|
||||
if (BUNDLE === a0) {
|
||||
return importDefault(7308) /* metro dependency 7308 */;
|
||||
}
|
||||
const PREMIUM_GUILD = Branding.PREMIUM_GUILD;
|
||||
if (PREMIUM_GUILD === a0) {
|
||||
return importDefault(7309) /* metro dependency 7309 */;
|
||||
}
|
||||
}
|
||||
|
||||
function getLogo(a0) { // fn#58981, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7479:1997, offset: 0x016dce60, size: 272 bytes, params: 2, frame: 14
|
||||
const Branding = (require(3802) /* metro dependency 3802: PremiumUtils */).Branding;
|
||||
const TIER_0 = Branding.TIER_0;
|
||||
if (TIER_0 === a0) {
|
||||
return importDefault(7310) /* metro dependency 7310 */;
|
||||
}
|
||||
const TIER_1 = Branding.TIER_1;
|
||||
if (TIER_1 === a0) {
|
||||
return importDefault(7311) /* metro dependency 7311 */;
|
||||
}
|
||||
const BUNDLE = Branding.BUNDLE;
|
||||
if (BUNDLE === a0) {
|
||||
return importDefault(7312) /* metro dependency 7312 */;
|
||||
}
|
||||
const TIER_2 = Branding.TIER_2;
|
||||
if (TIER_2 === a0) {
|
||||
return importDefault(7312) /* metro dependency 7312 */;
|
||||
}
|
||||
const PREMIUM_GUILD = Branding.PREMIUM_GUILD;
|
||||
if (PREMIUM_GUILD === a0) {
|
||||
return importDefault(7313) /* metro dependency 7313 */;
|
||||
}
|
||||
}
|
||||
|
||||
function getActivatedImage(a0, a1) { // fn#58982, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7479:2244, offset: 0x016dcf70, size: 492 bytes, params: 3, frame: 15
|
||||
const Branding = (require(3802) /* metro dependency 3802: PremiumUtils */).Branding;
|
||||
const TIER_0 = Branding.TIER_0;
|
||||
if (TIER_0 === a0) {
|
||||
return (require(4002) /* metro dependency 4002: shared */).isThemeDark(a1) ? importDefault(7314) /* metro dependency 7314 */ : importDefault(7315) /* metro dependency 7315 */;
|
||||
}
|
||||
const TIER_1 = Branding.TIER_1;
|
||||
if (TIER_1 === a0) {
|
||||
return (require(4002) /* metro dependency 4002: shared */).isThemeDark(a1) ? importDefault(7316) /* metro dependency 7316 */ : importDefault(7317) /* metro dependency 7317 */;
|
||||
}
|
||||
const TIER_2 = Branding.TIER_2;
|
||||
if (TIER_2 === a0) {
|
||||
return (require(4002) /* metro dependency 4002: shared */).isThemeDark(a1) ? importDefault(7318) /* metro dependency 7318 */ : importDefault(7319) /* metro dependency 7319 */;
|
||||
}
|
||||
const BUNDLE = Branding.BUNDLE;
|
||||
if (BUNDLE === a0) {
|
||||
return (require(4002) /* metro dependency 4002: shared */).isThemeDark(a1) ? importDefault(7320) /* metro dependency 7320 */ : importDefault(7321) /* metro dependency 7321 */;
|
||||
}
|
||||
const PREMIUM_GUILD = Branding.PREMIUM_GUILD;
|
||||
if (PREMIUM_GUILD === a0) {
|
||||
return importDefault(7322) /* metro dependency 7322 */;
|
||||
}
|
||||
}
|
||||
|
||||
function getDescription_58983(a0, a1) { // fn#58983, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7479:2651, offset: 0x016dd15c, size: 419 bytes, params: 3, frame: 20
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var format;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var YJUUH3;
|
||||
var value;
|
||||
const Branding = (require(3802) /* metro dependency 3802: PremiumUtils */).Branding;
|
||||
const TIER_0 = Branding.TIER_0;
|
||||
if (TIER_0 === a0) {
|
||||
return intl.string(t.knvOVz);
|
||||
}
|
||||
const TIER_1 = Branding.TIER_1;
|
||||
if (TIER_1 === a0) {
|
||||
return intl.string(t.knvOVz);
|
||||
}
|
||||
const TIER_2 = Branding.TIER_2;
|
||||
if (TIER_2 === a0) {
|
||||
return intl.string(t.aTUr3Z);
|
||||
}
|
||||
const BUNDLE = Branding.BUNDLE;
|
||||
if (BUNDLE === a0) {
|
||||
format = intl.format;
|
||||
YJUUH3 = t.YJUUH3;
|
||||
value = require(3802) /* metro dependency 3802: PremiumUtils */;
|
||||
return Reflect.apply(format, intl, [YJUUH3, {planName: value.getExternalPlanDisplayName({planId: a1.planId,
|
||||
additionalPlans: a1.additionalPlans})}]);
|
||||
}
|
||||
const PREMIUM_GUILD = Branding.PREMIUM_GUILD;
|
||||
if (PREMIUM_GUILD === a0) {
|
||||
format = intl.format;
|
||||
YJUUH3 = t.YJUUH3;
|
||||
value = require(3802) /* metro dependency 3802: PremiumUtils */;
|
||||
return Reflect.apply(format, intl, [YJUUH3, {planName: value.getExternalPlanDisplayName({planId: a1.planId,
|
||||
additionalPlans: a1.additionalPlans})}]);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun58984(a0) { // fn#58984, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7479:707, offset: 0x016dd2ff, size: 299 bytes, params: 2, frame: 14
|
||||
const Branding = (require(3802) /* metro dependency 3802: PremiumUtils */).Branding;
|
||||
const TIER_0 = Branding.TIER_0;
|
||||
if (TIER_0 === a0) {
|
||||
return {headerImage: {'marginLeft': -27, 'width': 88, 'top': 18}};
|
||||
}
|
||||
const TIER_1 = Branding.TIER_1;
|
||||
if (TIER_1 === a0) {
|
||||
return {headerImage: {'marginLeft': -27, 'width': 87, 'top': 18}};
|
||||
}
|
||||
const BUNDLE = Branding.BUNDLE;
|
||||
if (BUNDLE === a0) {
|
||||
return {headerImage: {'marginLeft': -29.5, 'width': 91, 'top': 18}};
|
||||
}
|
||||
const TIER_2 = Branding.TIER_2;
|
||||
if (TIER_2 === a0) {
|
||||
return {headerImage: {'marginLeft': -58, 'width': 122, 'height': 90, 'top': 18}};
|
||||
}
|
||||
const PREMIUM_GUILD = Branding.PREMIUM_GUILD;
|
||||
if (PREMIUM_GUILD === a0) {
|
||||
return {headerImage: {'marginLeft': -54, 'width': 140, 'top': 18}};
|
||||
}
|
||||
}
|
||||
|
||||
function _fun58985(a0) { // fn#58985, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7479:1180, offset: 0x016dd42a, size: 232 bytes, params: 2, frame: 14
|
||||
const Branding = (require(3802) /* metro dependency 3802: PremiumUtils */).Branding;
|
||||
const BUNDLE = Branding.BUNDLE;
|
||||
if (BUNDLE === a0) {
|
||||
return {animation: {borderRadius: 6}};
|
||||
}
|
||||
const TIER_0 = Branding.TIER_0;
|
||||
if (TIER_0 === a0) {
|
||||
return {animation: {borderRadius: 5}};
|
||||
}
|
||||
const TIER_1 = Branding.TIER_1;
|
||||
if (TIER_1 === a0) {
|
||||
return {animation: {borderRadius: 5}};
|
||||
}
|
||||
const TIER_2 = Branding.TIER_2;
|
||||
if (TIER_2 === a0) {
|
||||
return {animation: {borderRadius: 5}};
|
||||
}
|
||||
const PREMIUM_GUILD = Branding.PREMIUM_GUILD;
|
||||
if (PREMIUM_GUILD === a0) {
|
||||
return {animation: {borderRadius: 9}};
|
||||
}
|
||||
}
|
||||
|
||||
function PremiumActivatedAlert({subscription, onClose}) { // fn#58986, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7479:3179, offset: 0x016dd512, size: 955 bytes, params: 2, frame: 31
|
||||
const styles = useStyles();
|
||||
const r2 = subscription.renewalMutations == null || global.Object.keys(subscription.renewalMutations).length === 0 || (subscription.renewalMutations.paymentGatewayPlanId === subscription.paymentGatewayPlanId || subscription.status === SubscriptionStatusTypes.CANCELED) ? subscription : subscription.renewalMutations;
|
||||
const value4 = (importDefault(4048) /* metro dependency 4048: useTheme */)();
|
||||
const premiumBranding = (require(3802) /* metro dependency 3802: PremiumUtils */).getPremiumBranding(r2);
|
||||
const Branding = (require(3802) /* metro dependency 3802: PremiumUtils */).Branding;
|
||||
const TIER_0 = Branding.TIER_0;
|
||||
const r20 = TIER_0 === premiumBranding ? {logo: {'width': 82,
|
||||
'height': 44}} : (require(3802) /* metro dependency 3802: PremiumUtils */).Branding.TIER_1 === premiumBranding ? {logo: {'width': 82,
|
||||
'height': 32}} : (require(3802) /* metro dependency 3802: PremiumUtils */).Branding.BUNDLE === premiumBranding || (require(3802) /* metro dependency 3802: PremiumUtils */).Branding.TIER_2 === premiumBranding ? {logo: {'width': 79,
|
||||
'height': 32}} : (require(3802) /* metro dependency 3802: PremiumUtils */).Branding.PREMIUM_GUILD !== premiumBranding ? undefined : {logo: {'width': 82,
|
||||
'height': 18}};
|
||||
const styles2 = useStyles(premiumBranding);
|
||||
const styles3 = useStyles(premiumBranding);
|
||||
const Alert = importDefault(4596) /* metro dependency 4596: Alert */;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const TkTvBz = (require(1244) /* metro dependency 1244: indexNative */).t.TkTvBz;
|
||||
const imageBackgroundBindingProps = {style: styles.header, source: getHeaderBackground(premiumBranding)};
|
||||
const image = <Image source={getLogo(premiumBranding)} style={r20.logo} />;
|
||||
const BUNDLE = Branding.BUNDLE;
|
||||
const r7 = premiumBranding !== BUNDLE ? null : <Image source={importDefault(7323) /* metro dependency 7323 */} style={styles.logoPlusPremiumGuild} />;
|
||||
const imageBackground = <ImageBackground {...imageBackgroundBindingProps}>{image}{r7}<Image source={getHeaderImage(premiumBranding)} style={[styles2.headerImage,
|
||||
styles.headerImage]} /></ImageBackground>;
|
||||
const value9 = ((Component) => <Component source={getActivatedImage(premiumBranding,
|
||||
value4)} style={styles3.animation} />)(importDefault(7324) /* metro dependency 7324: ShineAnimation */);
|
||||
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
|
||||
return (
|
||||
<Alert
|
||||
onClose={onClose}
|
||||
confirmText={Reflect.apply(string, intl, [TkTvBz])}
|
||||
style={styles.alert}
|
||||
>
|
||||
{imageBackground}
|
||||
<View style={styles.body}>
|
||||
{value9}
|
||||
<LegacyText style={styles.description}>
|
||||
{getDescription_58983(premiumBranding, r2)}
|
||||
</LegacyText>
|
||||
</View>
|
||||
</Alert>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,106 @@
|
||||
/* Metro module 7549; source: components_native/premium/PremiumBillingInfo.tsx; dependencies: [57, 31, 27, 661, 33, 4501, 697, 3815, 6766, 1244, 3802, 7545, 6771, 6789, 7022, 4573, 2] */
|
||||
function _fun60690(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#60690, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7727:6, offset: 0x0170a5ad, size: 351 bytes, params: 8, frame: 25
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const closure = GoogleManagementLink;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(27) /* metro dependency 27 */).View;
|
||||
let value = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_5 = value.SubscriptionStatusTypes;
|
||||
const USER_SETTINGS_CONTAINER_HORIZONTAL_PADDING = value.USER_SETTINGS_CONTAINER_HORIZONTAL_PADDING;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_6 = value.jsx;
|
||||
const env0_7 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {};
|
||||
object2.title = {paddingHorizontal: USER_SETTINGS_CONTAINER_HORIZONTAL_PADDING};
|
||||
object2.externalSubtext = {marginTop: 8, paddingHorizontal: USER_SETTINGS_CONTAINER_HORIZONTAL_PADDING};
|
||||
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
|
||||
object2.billingContainer = {'backgroundColor': null, 'padding': 16, 'marginTop': 8,
|
||||
backgroundColor: BACKGROUND_SURFACE_HIGH};
|
||||
object2.billingRenewalInfo = {marginTop: 4};
|
||||
object2.billingManageGoogle = {marginTop: 8};
|
||||
const env0_8 = Reflect.apply(createStyles, value, [object2]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/premium/PremiumBillingInfo.tsx');
|
||||
exports.default = PremiumBillingInfo;
|
||||
exports.GoogleManagementLink = closure;
|
||||
}
|
||||
|
||||
function GoogleManagementLink({style, subscription}) { // fn#60691, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7727:511, offset: 0x0170a70c, size: 232 bytes, params: 2, frame: 22
|
||||
var r0;
|
||||
var TextWithIOSLinkWorkaround;
|
||||
var intl;
|
||||
var format;
|
||||
var property;
|
||||
var value;
|
||||
if ((require(3815) /* metro dependency 3815: BillingPlatformUtils */).isGooglePlayBillingSupported()) {
|
||||
if (subscription.isPurchasedViaGoogle) {
|
||||
TextWithIOSLinkWorkaround = (require(6766) /* metro dependency 6766: TextWithIOSLinkWorkaround */).TextWithIOSLinkWorkaround;
|
||||
var textWithIOSLinkWorkaroundProps = {'style': null, 'variant': 'text-sm/medium', 'color': 'text-link',
|
||||
style: [style]};
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
format = intl.format;
|
||||
property = (require(1244) /* metro dependency 1244: indexNative */).t['9NPc+O'];
|
||||
value = require(3802) /* metro dependency 3802: PremiumUtils */;
|
||||
value = <TextWithIOSLinkWorkaround {...textWithIOSLinkWorkaroundProps}>{Reflect.apply(format, intl,
|
||||
[property,
|
||||
{onClick: value.getExternalSubscriptionMethodUrl(subscription.paymentGateway,
|
||||
'SUBSCRIPTION_MANAGEMENT')}])}</TextWithIOSLinkWorkaround>;
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = null;
|
||||
}
|
||||
} else {
|
||||
r0 = null;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function PremiumBillingInfo({style, subscription}) { // fn#60692, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7727:886, offset: 0x0170a7f4, size: 700 bytes, params: 2, frame: 32
|
||||
const styles = useStyles();
|
||||
const premiumSubscriptionInvoiceModule = require(7545) /* metro dependency 7545: PremiumSubscriptionInvoice */;
|
||||
const useFetchSubscriptionInvoicePreview = premiumSubscriptionInvoiceModule.useFetchSubscriptionInvoicePreview;
|
||||
const object2 = {'subscriptionId': null, 'renewal': true, 'applyEntitlements': true};
|
||||
object2.subscriptionId = subscription.id;
|
||||
object2.analyticsLocations = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)();
|
||||
const PREMIUM_BILLING_INFO = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).PREMIUM_BILLING_INFO;
|
||||
object2.analyticsLocation = PREMIUM_BILLING_INFO;
|
||||
const value2 = Reflect.apply(useFetchSubscriptionInvoicePreview, premiumSubscriptionInvoiceModule, [object2]);
|
||||
const binding = env0_3;
|
||||
const property = binding(value2, 1)[0];
|
||||
const moduleValue2 = premiumSubscriptionInvoiceModule;
|
||||
const useGetSubscriptionInvoice = moduleValue2.useGetSubscriptionInvoice;
|
||||
const status = subscription.status;
|
||||
const PAST_DUE = SubscriptionStatusTypes.PAST_DUE;
|
||||
const property2 = binding(Reflect.apply(useGetSubscriptionInvoice, moduleValue2, [{subscriptionId: subscription.id,
|
||||
preventFetch: status !== PAST_DUE}]), 1)[0];
|
||||
if (property == null) {
|
||||
return null;
|
||||
}
|
||||
const externalManagementMessage = (require(7022) /* metro dependency 7022: PremiumManagementUtils */).getExternalManagementMessage(subscription,
|
||||
{shouldAllowExternalManagement: true});
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let string = intl.string;
|
||||
const Sb6wI1 = (require(1244) /* metro dependency 1244: indexNative */).t.Sb6wI1;
|
||||
const items3 = [<Text style={styles.title} accessibilityRole="header" variant="eyebrow" color="text-default">{Reflect.apply(string,
|
||||
intl, [Sb6wI1])}</Text>];
|
||||
string = intl.string;
|
||||
const KXQjfc = (require(1244) /* metro dependency 1244: indexNative */).t.KXQjfc;
|
||||
const items2 = [<Text variant="text-md/semibold">{Reflect.apply(string, intl, [KXQjfc])}</Text>];
|
||||
items2[1] = <Text style={styles.billingRenewalInfo} variant="text-sm/medium">{(require(3802) /* metro dependency 3802: PremiumUtils */).getBillingInformationString(subscription,
|
||||
property, property2)}</Text>;
|
||||
items2[2] = <GoogleManagementLink style={styles.billingManageGoogle} subscription={subscription} />;
|
||||
items3[1] = <View style={styles.billingContainer}>{items2}</View>;
|
||||
items3[2] = externalManagementMessage != null ? <Text style={styles.externalSubtext} variant="text-sm/medium">{externalManagementMessage}</Text> : null;
|
||||
return (
|
||||
<View style={style}>
|
||||
{items3}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
/* Metro module 7971; source: components_native/premium/PremiumFeatureList.tsx; dependencies: [31, 27, 661, 33, 4501, 6597, 697, 7972, 2] */
|
||||
function _fun63452(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#63452, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8149:6, offset: 0x01b7ff3f, size: 325 bytes, params: 8, frame: 26
|
||||
var object3;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(27) /* metro dependency 27 */).View;
|
||||
const Fonts = (require(661) /* metro dependency 661: Constants */).Fonts;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_4 = value.jsx;
|
||||
const env0_5 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object3 = {item: {'backgroundColor': 'transparent', 'paddingHorizontal': 0, 'paddingVertical': 8,
|
||||
'flexDirection': 'row', 'alignItems': 'center'}};
|
||||
const object4 = {};
|
||||
const textStyles = importDefault(6597) /* metro dependency 6597: TextStyles */;
|
||||
const PRIMARY_NORMAL = Fonts.PRIMARY_NORMAL;
|
||||
const TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_DEFAULT;
|
||||
copyDataProperties(object4, textStyles(PRIMARY_NORMAL, TEXT_DEFAULT, 14), undefined);
|
||||
object3.label = object4;
|
||||
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object3.iconMargin = {marginEnd: PX_16};
|
||||
const env0_6 = Reflect.apply(createStyles, value, [object3]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/premium/PremiumFeatureList.tsx');
|
||||
exports.default = PremiumFeatureList;
|
||||
}
|
||||
|
||||
function PremiumFeatureList({features, style, separator, iconStyle, labelStyle, rowStyle}) { // fn#63453, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8149:426, offset: 0x01b80084, size: 129 bytes, params: 2, frame: 16
|
||||
const env0_4 = useStyles();
|
||||
return (
|
||||
<View style={style}>
|
||||
{features.filter(function(a0) {
|
||||
return !a0.hidden;
|
||||
}).map(_fun63455)}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun63455(a0, a1) { // fn#63455, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8149:597, offset: 0x01b80113, size: 301 bytes, params: 3, frame: 25
|
||||
const IconComponent = a0.IconComponent;
|
||||
let value = environment.__proto__;
|
||||
const Fragment = env1_2.Fragment;
|
||||
const stylesBinding = styles;
|
||||
const items2 = [stylesBinding.item];
|
||||
items2[1] = rowStyle;
|
||||
const iconComponent = <IconComponent size="md" color={a0.color} style={[stylesBinding.iconMargin, iconStyle]} />;
|
||||
const FormRow = (require(7972) /* metro dependency 7972: native */).FormRow;
|
||||
const Label = FormRow.Label;
|
||||
const items5 = [<View style={items2} key={a1}>{iconComponent}<Label numberOfLines={2} style={[stylesBinding.label,
|
||||
labelStyle]} text={a0.label} /></View>];
|
||||
const separatorBinding = separator;
|
||||
value = null;
|
||||
items5[1] = value != separatorBinding ? separator === '' ? value : a0.renderSeparatorBelow ? separator : value : value;
|
||||
return (
|
||||
<Fragment key={a1}>
|
||||
{items5}
|
||||
</Fragment>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,108 @@
|
||||
/* Metro module 7028; source: components_native/premium/PremiumModal.tsx; dependencies: [31, 661, 33, 1244, 5282, 7029, 12224, 12227, 12269, 12279, 6771, 5280, 2] */
|
||||
function _fun55694(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#55694, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7206:6, offset: 0x013ae5e2, size: 177 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(661) /* metro dependency 661: Constants */).UserSettingsSections;
|
||||
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/premium/PremiumModal.tsx');
|
||||
exports.default = PremiumModal;
|
||||
exports.PREMIUM_KEY = 'PREMIUM_KEY';
|
||||
}
|
||||
|
||||
function getScreens_55695({analyticsLocation, onClose, onBack, predicate, giftRecipientId, showCurrentPlan, planId, applicationId, activitySessionId, channelId, guildId, premiumFeatureCardOrder, onPaymentSuccess, onPaymentDismiss}) { // fn#55695, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7206:149, offset: 0x013ae693, size: 636 bytes, params: 2, frame: 24
|
||||
const object5 = {};
|
||||
const PREMIUM = UserSettingsSections.PREMIUM;
|
||||
const object6 = {};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let string = intl.string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
object6.title = Reflect.apply(string, intl, [t.lpNrPu]);
|
||||
object6.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton(onClose);
|
||||
object6.render = render_55696;
|
||||
object5[PREMIUM] = object6;
|
||||
const PREMIUM_MANAGE_PLAN = UserSettingsSections.PREMIUM_MANAGE_PLAN;
|
||||
const object8 = {};
|
||||
object8.title = intl.string(t['8jmdON']);
|
||||
object8.render = render_55697;
|
||||
object5[PREMIUM_MANAGE_PLAN] = object8;
|
||||
const GUILD_BOOSTING = UserSettingsSections.GUILD_BOOSTING;
|
||||
const object9 = {};
|
||||
object9.title = intl.string(t['+CbP2v']);
|
||||
object9.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton(onClose);
|
||||
object9.render = render_55698;
|
||||
object5[GUILD_BOOSTING] = object9;
|
||||
const PREMIUM_PLAN_SELECT = UserSettingsSections.PREMIUM_PLAN_SELECT;
|
||||
object5[PREMIUM_PLAN_SELECT] = {title: intl.string(t.u95Dt4), headerLeft: headerLeft_55699,
|
||||
initialParams: {predicate: predicate, showCurrentPlan: showCurrentPlan}, render: render_55700};
|
||||
const PREMIUM_GIFTING = UserSettingsSections.PREMIUM_GIFTING;
|
||||
const object10 = {};
|
||||
string = intl.string;
|
||||
const Oba8Sh = t.Oba8Sh;
|
||||
object10.title = Reflect.apply(string, intl, [Oba8Sh]);
|
||||
object10.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton(onClose);
|
||||
object10.render = render_55701;
|
||||
object5[PREMIUM_GIFTING] = object10;
|
||||
return object5;
|
||||
}
|
||||
|
||||
function PremiumModal({applicationId, analyticsLocation, analyticsLocations, initialRoute, onClose, onBack, giftRecipientId, predicate, showCurrentPlan, planId, activitySessionId, channelId, guildId, premiumFeatureCardOrder, onPaymentSuccess, onPaymentDismiss}) { // fn#55702, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7206:1488, offset: 0x013aeabc, size: 311 bytes, params: 2, frame: 33
|
||||
analyticsLocations = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)(analyticsLocations).analyticsLocations;
|
||||
const r7 = initialRoute ?? UserSettingsSections.PREMIUM;
|
||||
const AnalyticsLocationProvider = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider;
|
||||
const Navigator = (require(5280) /* metro dependency 5280: NavigatorNative */).Navigator;
|
||||
return (
|
||||
<AnalyticsLocationProvider value={analyticsLocations}>
|
||||
<Navigator
|
||||
screens={getScreens_55695({analyticsLocation: analyticsLocation, onClose: onClose, onBack: onBack,
|
||||
predicate: predicate, giftRecipientId: giftRecipientId, showCurrentPlan: showCurrentPlan,
|
||||
planId: planId, applicationId: applicationId, activitySessionId: activitySessionId,
|
||||
channelId: channelId, guildId: guildId, premiumFeatureCardOrder: premiumFeatureCardOrder,
|
||||
onPaymentSuccess: onPaymentSuccess, onPaymentDismiss: onPaymentDismiss})}
|
||||
initialRouteName={r7}
|
||||
/>
|
||||
</AnalyticsLocationProvider>
|
||||
);
|
||||
}
|
||||
|
||||
function getScreens_55695Render() { // fn#55696, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7206:504, owner: getScreens_55695.render, offset: 0x013ae90f, size: 111 bytes, params: 1, frame: 15
|
||||
const value = environment.__proto__;
|
||||
return ((Component) => <Component applicationId={applicationId} onClose={onClose} activitySessionId={activitySessionId} channelId={channelId} guildId={guildId} premiumFeatureCardOrder={premiumFeatureCardOrder} onPaymentSuccess={onPaymentSuccess} onPaymentDismiss={onPaymentDismiss} />)(importDefault(7029) /* metro dependency 7029: UserSettingsPremium */);
|
||||
}
|
||||
|
||||
function getScreens_55695Render_55697() { // fn#55697, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7206:733, owner: getScreens_55695.render, offset: 0x013ae97e, size: 39 bytes, params: 1, frame: 13
|
||||
const value = environment.__proto__;
|
||||
return ((Component) => <Component />)(importDefault(12224) /* metro dependency 12224: PremiumManagePlan */);
|
||||
}
|
||||
|
||||
function getScreens_55695Render_55698() { // fn#55698, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7206:869, owner: getScreens_55695.render, offset: 0x013ae9a5, size: 39 bytes, params: 1, frame: 13
|
||||
const value = environment.__proto__;
|
||||
return ((Component) => <Component />)(importDefault(12227) /* metro dependency 12227: UserSettingsPremiumGuildSubscriptions */);
|
||||
}
|
||||
|
||||
function getScreens_55695HeaderLeft(a0) { // fn#55699, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7206:968, owner: getScreens_55695.headerLeft, offset: 0x013ae9cc, size: 87 bytes, params: 2, frame: 14
|
||||
var r0;
|
||||
const canGoBack = a0.canGoBack;
|
||||
let value = environment.__proto__;
|
||||
value = require(5282) /* metro dependency 5282: NavigatorHeaderNative */;
|
||||
if (canGoBack) {
|
||||
value = value.getHeaderBackButton(onBack)(a0);
|
||||
r0 = value;
|
||||
} else {
|
||||
value = value.getHeaderCloseButton(onClose)(a0);
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function getScreens_55695Render_55700({predicate, showCurrentPlan}) { // fn#55700, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7206:1105, owner: getScreens_55695.render, offset: 0x013aea23, size: 93 bytes, params: 2, frame: 17
|
||||
const value = environment.__proto__;
|
||||
return ((Component) => <Component analyticsLocation={analyticsLocation} predicate={predicate} showCurrentPlan={showCurrentPlan} planId={planId} applicationId={applicationId} />)(importDefault(12269) /* metro dependency 12269: PremiumPlanSelect */);
|
||||
}
|
||||
|
||||
function getScreens_55695Render_55701() { // fn#55701, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7206:1344, owner: getScreens_55695.render, offset: 0x013aea80, size: 60 bytes, params: 1, frame: 15
|
||||
const value = environment.__proto__;
|
||||
return ((Component) => <Component recipientUserId={giftRecipientId} analyticsLocation={analyticsLocation} />)(importDefault(12279) /* metro dependency 12279: UserSettingsPremiumGifting */);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
/* Metro module 14233; source: components_native/premium/PremiumPerksList.tsx; dependencies: [31, 27, 33, 4501, 697, 4573, 2] */
|
||||
function _fun107646(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107646, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14430:6, offset: 0x02303e3a, size: 322 bytes, params: 8, frame: 22
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_2 = (require(27) /* metro dependency 27 */).View;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_3 = value.jsx;
|
||||
const env0_4 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
const object = {'backgroundColor': null, 'borderRadius': null, 'width': 40, 'height': 40,
|
||||
'justifyContent': 'center', 'alignItems': 'center'};
|
||||
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
|
||||
object.backgroundColor = BACKGROUND_BASE_LOWEST;
|
||||
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
||||
const env0_5 = Reflect.apply(createStyles, value, [{perkInfoContainer: {'flexDirection': 'row',
|
||||
'alignItems': 'center', 'gap': 16}, perkInfoTextContainer: {'flexDirection': 'column', 'gap': 4,
|
||||
'maxWidth': 279}, perkListContainer: {'width': '100%', 'paddingVertical': 24, 'flexDirection': 'column',
|
||||
'gap': 24}, perkIconContainer: object}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/premium/PremiumPerksList.tsx');
|
||||
exports.default = PremiumPerksList;
|
||||
}
|
||||
|
||||
function PremiumPerksList({perks}) { // fn#107647, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14430:566, offset: 0x02303f7c, size: 77 bytes, params: 2, frame: 16
|
||||
const styles = useStyles();
|
||||
return (
|
||||
<View style={styles.perkListContainer}>
|
||||
{perks.map(_fun107648)}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun107648(a0, a1) { // fn#107648, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14430:667, offset: 0x02303fc9, size: 241 bytes, params: 3, frame: 24
|
||||
const IconComponent = a0.IconComponent;
|
||||
const value = environment.__proto__;
|
||||
const stylesBinding = styles;
|
||||
const perkInfoContainer = stylesBinding.perkInfoContainer;
|
||||
const view = <View style={stylesBinding.perkIconContainer}><IconComponent size="md" /></View>;
|
||||
const perkInfoTextContainer = stylesBinding.perkInfoTextContainer;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return (
|
||||
<View style={perkInfoContainer} key={a1}>
|
||||
{view}
|
||||
<View style={perkInfoTextContainer}>
|
||||
<Text variant="text-md/bold" color="text-strong">
|
||||
{a0.label}
|
||||
</Text>
|
||||
<Text variant="text-md/medium" color="text-default">
|
||||
{a0.description}
|
||||
</Text>
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
/* Metro module 13707; source: components_native/premium/PremiumRestorationAlert.tsx; dependencies: [6, 7, 15, 17, 18, 31, 5140, 33, 13708, 566, 2] */
|
||||
function _fun104749(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104749, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13904:6, offset: 0x0229fb75, size: 296 bytes, params: 8, frame: 20
|
||||
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 = importAll(31) /* metro dependency 31 */;
|
||||
const iapStoreAndroid = importDefault(5140) /* metro dependency 5140: IAPStoreAndroid */;
|
||||
const env0_8 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const PureComponent = value.PureComponent;
|
||||
value = _fun104753(PureComponent);
|
||||
const flux = importDefault(566) /* metro dependency 566: flux */;
|
||||
value = flux.connectStores([iapStoreAndroid], function() {
|
||||
var object = {};
|
||||
object.isBusy = IAPStoreAndroid.isBusy();
|
||||
return object;
|
||||
})(value);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/premium/PremiumRestorationAlert.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_104750() { // fn#104750, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13904:182, offset: 0x0229fc9d, 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_104750_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function _fun104753(a0) { // fn#104753, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13904:381, offset: 0x0229fcff, size: 72 bytes, params: 2, frame: 15
|
||||
const closure = PremiumRestorationAlert;
|
||||
env0_6(closure, a0);
|
||||
return env0_3(closure, [{key: 'render', value: value_104755}]);
|
||||
}
|
||||
|
||||
function value_104755() { // fn#104755, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13904:722, offset: 0x0229fd47, size: 69 bytes, params: 1, frame: 15
|
||||
const {isBusy, onClose} = this.props;
|
||||
const value = environment.__proto__;
|
||||
return ((Component) => <Component loading={isBusy} onClose={onClose} />)(importDefault(13708) /* metro dependency 13708: UntouchableAlert */);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,575 @@
|
||||
/* Metro module 7509; source: components_native/premium/PremiumSubscriptionDetails.tsx; dependencies: [57, 5, 31, 27, 1878, 5140, 661, 1880, 33, 697, 4501, 3802, 7305, 7510, 7511, 7302, 7303, 7304, 7306, 7512, 7513, 7514, 7250, 7515, 7516, 7517, 7518, 7519, 7307, 7520, 7521, 7522, 7523, 7524, 7525, 7526, 7310, 7527, 7528, 7529, 7312, 7530, 7531, 7532, 7294, 7355, 7533, 7534, 7026, 1484, 566, 44, 6771, 5137, 477, 1305, 4578, 1244, 4573, 7545, 6789, 7546, 7547, 2] */
|
||||
function _fun60564(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#60564, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7687:6, offset: 0x01706009, size: 3084 bytes, params: 8, frame: 40
|
||||
var object3;
|
||||
const env0_0 = require;
|
||||
const handleCancelSubscription = function() {
|
||||
return _handleCancelSubscription.apply(this, arguments);
|
||||
};
|
||||
const closure = onCancelClick;
|
||||
const closure2 = handleManageSubscription;
|
||||
const closure3 = function() {
|
||||
return _onResubscribeClick.apply(this, arguments);
|
||||
};
|
||||
const closure4 = PremiumSubscriptionHeader;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_4 = importDefault(5) /* metro dependency 5 */;
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_5 = value.Image;
|
||||
const env0_6 = value.ImageBackground;
|
||||
const env0_7 = value.Linking;
|
||||
const env0_8 = value.View;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const iapStoreAndroid = importDefault(5140) /* metro dependency 5140: IAPStoreAndroid */;
|
||||
value = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_11 = value.AnalyticsPages;
|
||||
const env0_12 = value.AnalyticsSections;
|
||||
const env0_13 = value.SubscriptionStatusTypes;
|
||||
const USER_SETTINGS_CONTAINER_HORIZONTAL_PADDING = value.USER_SETTINGS_CONTAINER_HORIZONTAL_PADDING;
|
||||
const env0_14 = (require(1880) /* metro dependency 1880: PremiumConstants */).SubscriptionPlanInfo;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_15 = value.jsx;
|
||||
const env0_16 = value.jsxs;
|
||||
object3 = {imageTier2: {'height': 37, 'width': 49}, imageTier1: {'height': 35, 'width': 49},
|
||||
imageTier0: {'height': 35, 'width': 29}, imageBundle: {'height': 35, 'width': 49},
|
||||
imagePremiumNonActive: {'height': 36, 'width': 51}, imagePremiumGuild: {'width': 51, 'height': 36},
|
||||
imagePremiumGuildNonActive: {'width': 51, 'height': 36}, logoPremiumBundle: {'height': 33, 'width': 205},
|
||||
logoPremiumTier0: {'height': 32, 'width': 59}, logoPremiumTier1: {'height': 16, 'width': 156},
|
||||
logoPremiumTier2: {'height': 32, 'width': 78}, logoPremiumGuild: {'height': 17, 'width': 184}};
|
||||
const object4 = {};
|
||||
const WHITE = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE;
|
||||
object4.price = {'fontSize': 14, 'marginTop': 10, color: WHITE};
|
||||
const BLACK = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BLACK;
|
||||
object4.priceDark = {'fontSize': 14, 'marginTop': 10, color: BLACK};
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
const object6 = {};
|
||||
object6.title = {paddingHorizontal: USER_SETTINGS_CONTAINER_HORIZONTAL_PADDING};
|
||||
object6.header = {padding: 16};
|
||||
object6.wumpusImg = {marginRight: 10};
|
||||
object6.logoContainer = {'flexDirection': 'row', 'alignItems': 'center'};
|
||||
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
|
||||
object6.container = {'marginTop': 8, 'overflow': 'hidden', backgroundColor: BACKGROUND_BASE_LOWEST};
|
||||
object6.buttonContainer = {'marginTop': 8, 'flexDirection': 'row'};
|
||||
object6.buttonWrapper = {'alignSelf': 'flex-start', 'flexGrow': 0, 'flexShrink': 0, 'marginRight': 8};
|
||||
object6.cancelLink = {'alignSelf': 'flex-start', 'flexGrow': 0, 'flexShrink': 0, 'marginLeft': 16, 'marginTop': 2};
|
||||
object6.desktopSubtext = {marginTop: 8, paddingHorizontal: USER_SETTINGS_CONTAINER_HORIZONTAL_PADDING};
|
||||
const env0_17 = Reflect.apply(createStyles, value, [object6]);
|
||||
const object7 = {ACTIVE: 'active', RESUB: 'resub', ERROR: 'error'};
|
||||
const object8 = {};
|
||||
const Branding = (require(3802) /* metro dependency 3802: PremiumUtils */).Branding;
|
||||
let BUNDLE = Branding.BUNDLE;
|
||||
const object9 = {};
|
||||
let ACTIVE = object7.ACTIVE;
|
||||
object9[ACTIVE] = importDefault(7305) /* metro dependency 7305 */;
|
||||
let ERROR = object7.ERROR;
|
||||
object9[ERROR] = importDefault(7510) /* metro dependency 7510 */;
|
||||
let RESUB = object7.RESUB;
|
||||
object9[RESUB] = importDefault(7511) /* metro dependency 7511 */;
|
||||
object8[BUNDLE] = object9;
|
||||
let TIER_0 = Branding.TIER_0;
|
||||
const object10 = {};
|
||||
ACTIVE = object7.ACTIVE;
|
||||
object10[ACTIVE] = importDefault(7302) /* metro dependency 7302 */;
|
||||
ERROR = object7.ERROR;
|
||||
object10[ERROR] = importDefault(7510) /* metro dependency 7510 */;
|
||||
RESUB = object7.RESUB;
|
||||
object10[RESUB] = importDefault(7511) /* metro dependency 7511 */;
|
||||
object8[TIER_0] = object10;
|
||||
let TIER_1 = Branding.TIER_1;
|
||||
const object25 = {};
|
||||
ACTIVE = object7.ACTIVE;
|
||||
object25[ACTIVE] = importDefault(7303) /* metro dependency 7303 */;
|
||||
ERROR = object7.ERROR;
|
||||
object25[ERROR] = importDefault(7510) /* metro dependency 7510 */;
|
||||
RESUB = object7.RESUB;
|
||||
object25[RESUB] = importDefault(7511) /* metro dependency 7511 */;
|
||||
object8[TIER_1] = object25;
|
||||
let TIER_2 = Branding.TIER_2;
|
||||
const object26 = {};
|
||||
ACTIVE = object7.ACTIVE;
|
||||
object26[ACTIVE] = importDefault(7304) /* metro dependency 7304 */;
|
||||
ERROR = object7.ERROR;
|
||||
object26[ERROR] = importDefault(7510) /* metro dependency 7510 */;
|
||||
RESUB = object7.RESUB;
|
||||
object26[RESUB] = importDefault(7511) /* metro dependency 7511 */;
|
||||
object8[TIER_2] = object26;
|
||||
let PREMIUM_GUILD = Branding.PREMIUM_GUILD;
|
||||
const object27 = {};
|
||||
ACTIVE = object7.ACTIVE;
|
||||
object27[ACTIVE] = importDefault(7306) /* metro dependency 7306 */;
|
||||
ERROR = object7.ERROR;
|
||||
object27[ERROR] = importDefault(7512) /* metro dependency 7512 */;
|
||||
RESUB = object7.RESUB;
|
||||
object27[RESUB] = importDefault(7513) /* metro dependency 7513 */;
|
||||
object8[PREMIUM_GUILD] = object27;
|
||||
const object28 = {};
|
||||
BUNDLE = Branding.BUNDLE;
|
||||
const object29 = {};
|
||||
ACTIVE = object7.ACTIVE;
|
||||
object29[ACTIVE] = importDefault(7514) /* metro dependency 7514 */;
|
||||
ERROR = object7.ERROR;
|
||||
object29[ERROR] = importDefault(7514) /* metro dependency 7514 */;
|
||||
RESUB = object7.RESUB;
|
||||
object29[RESUB] = importDefault(7514) /* metro dependency 7514 */;
|
||||
object28[BUNDLE] = object29;
|
||||
TIER_0 = Branding.TIER_0;
|
||||
const object37 = {};
|
||||
ACTIVE = object7.ACTIVE;
|
||||
object37[ACTIVE] = importDefault(7250) /* metro dependency 7250 */;
|
||||
ERROR = object7.ERROR;
|
||||
object37[ERROR] = importDefault(7515) /* metro dependency 7515 */;
|
||||
RESUB = object7.RESUB;
|
||||
object37[RESUB] = importDefault(7516) /* metro dependency 7516 */;
|
||||
object28[TIER_0] = object37;
|
||||
TIER_1 = Branding.TIER_1;
|
||||
const object38 = {};
|
||||
ACTIVE = object7.ACTIVE;
|
||||
object38[ACTIVE] = importDefault(7517) /* metro dependency 7517 */;
|
||||
ERROR = object7.ERROR;
|
||||
object38[ERROR] = importDefault(7518) /* metro dependency 7518 */;
|
||||
RESUB = object7.RESUB;
|
||||
object38[RESUB] = importDefault(7519) /* metro dependency 7519 */;
|
||||
object28[TIER_1] = object38;
|
||||
TIER_2 = Branding.TIER_2;
|
||||
const object39 = {};
|
||||
ACTIVE = object7.ACTIVE;
|
||||
object39[ACTIVE] = importDefault(7307) /* metro dependency 7307 */;
|
||||
ERROR = object7.ERROR;
|
||||
object39[ERROR] = importDefault(7520) /* metro dependency 7520 */;
|
||||
RESUB = object7.RESUB;
|
||||
object39[RESUB] = importDefault(7521) /* metro dependency 7521 */;
|
||||
object28[TIER_2] = object39;
|
||||
PREMIUM_GUILD = Branding.PREMIUM_GUILD;
|
||||
const object40 = {};
|
||||
ACTIVE = object7.ACTIVE;
|
||||
object40[ACTIVE] = importDefault(7522) /* metro dependency 7522 */;
|
||||
ERROR = object7.ERROR;
|
||||
object40[ERROR] = importDefault(7523) /* metro dependency 7523 */;
|
||||
RESUB = object7.RESUB;
|
||||
object40[RESUB] = importDefault(7524) /* metro dependency 7524 */;
|
||||
object28[PREMIUM_GUILD] = object40;
|
||||
const object41 = {};
|
||||
BUNDLE = Branding.BUNDLE;
|
||||
ACTIVE = object7.ACTIVE;
|
||||
ERROR = object7.ERROR;
|
||||
RESUB = object7.RESUB;
|
||||
object41[BUNDLE] = {[ACTIVE]: object3.imageBundle, [ERROR]: object3.imageBundle, [RESUB]: object3.imageBundle};
|
||||
TIER_0 = Branding.TIER_0;
|
||||
ACTIVE = object7.ACTIVE;
|
||||
ERROR = object7.ERROR;
|
||||
RESUB = object7.RESUB;
|
||||
object41[TIER_0] = {[ACTIVE]: object3.imageTier0, [ERROR]: object3.imagePremiumNonActive,
|
||||
[RESUB]: object3.imagePremiumNonActive};
|
||||
TIER_1 = Branding.TIER_1;
|
||||
ACTIVE = object7.ACTIVE;
|
||||
ERROR = object7.ERROR;
|
||||
RESUB = object7.RESUB;
|
||||
object41[TIER_1] = {[ACTIVE]: object3.imageTier1, [ERROR]: object3.imagePremiumNonActive,
|
||||
[RESUB]: object3.imagePremiumNonActive};
|
||||
TIER_2 = Branding.TIER_2;
|
||||
ACTIVE = object7.ACTIVE;
|
||||
ERROR = object7.ERROR;
|
||||
RESUB = object7.RESUB;
|
||||
object41[TIER_2] = {[ACTIVE]: object3.imageTier2, [ERROR]: object3.imagePremiumNonActive,
|
||||
[RESUB]: object3.imagePremiumNonActive};
|
||||
PREMIUM_GUILD = Branding.PREMIUM_GUILD;
|
||||
ACTIVE = object7.ACTIVE;
|
||||
ERROR = object7.ERROR;
|
||||
RESUB = object7.RESUB;
|
||||
object41[PREMIUM_GUILD] = {[ACTIVE]: object3.imagePremiumGuild, [ERROR]: object3.imagePremiumGuildNonActive,
|
||||
[RESUB]: object3.imagePremiumGuildNonActive};
|
||||
const object42 = {};
|
||||
BUNDLE = Branding.BUNDLE;
|
||||
const object43 = {};
|
||||
ACTIVE = object7.ACTIVE;
|
||||
object43[ACTIVE] = importDefault(7525) /* metro dependency 7525 */;
|
||||
ERROR = object7.ERROR;
|
||||
object43[ERROR] = importDefault(7525) /* metro dependency 7525 */;
|
||||
RESUB = object7.RESUB;
|
||||
object43[RESUB] = importDefault(7526) /* metro dependency 7526 */;
|
||||
object42[BUNDLE] = object43;
|
||||
TIER_0 = Branding.TIER_0;
|
||||
const object44 = {};
|
||||
ACTIVE = object7.ACTIVE;
|
||||
object44[ACTIVE] = importDefault(7310) /* metro dependency 7310 */;
|
||||
ERROR = object7.ERROR;
|
||||
object44[ERROR] = importDefault(7310) /* metro dependency 7310 */;
|
||||
RESUB = object7.RESUB;
|
||||
object44[RESUB] = importDefault(7527) /* metro dependency 7527 */;
|
||||
object42[TIER_0] = object44;
|
||||
TIER_1 = Branding.TIER_1;
|
||||
const object45 = {};
|
||||
ACTIVE = object7.ACTIVE;
|
||||
object45[ACTIVE] = importDefault(7528) /* metro dependency 7528 */;
|
||||
ERROR = object7.ERROR;
|
||||
object45[ERROR] = importDefault(7528) /* metro dependency 7528 */;
|
||||
RESUB = object7.RESUB;
|
||||
object45[RESUB] = importDefault(7529) /* metro dependency 7529 */;
|
||||
object42[TIER_1] = object45;
|
||||
TIER_2 = Branding.TIER_2;
|
||||
const object46 = {};
|
||||
ACTIVE = object7.ACTIVE;
|
||||
object46[ACTIVE] = importDefault(7312) /* metro dependency 7312 */;
|
||||
ERROR = object7.ERROR;
|
||||
object46[ERROR] = importDefault(7312) /* metro dependency 7312 */;
|
||||
RESUB = object7.RESUB;
|
||||
object46[RESUB] = importDefault(7530) /* metro dependency 7530 */;
|
||||
object42[TIER_2] = object46;
|
||||
PREMIUM_GUILD = Branding.PREMIUM_GUILD;
|
||||
const object47 = {};
|
||||
ACTIVE = object7.ACTIVE;
|
||||
object47[ACTIVE] = importDefault(7531) /* metro dependency 7531 */;
|
||||
ERROR = object7.ERROR;
|
||||
object47[ERROR] = importDefault(7531) /* metro dependency 7531 */;
|
||||
RESUB = object7.RESUB;
|
||||
object47[RESUB] = importDefault(7532) /* metro dependency 7532 */;
|
||||
object42[PREMIUM_GUILD] = object47;
|
||||
const object48 = {};
|
||||
BUNDLE = Branding.BUNDLE;
|
||||
object48[BUNDLE] = object3.logoPremiumBundle;
|
||||
TIER_0 = Branding.TIER_0;
|
||||
object48[TIER_0] = object3.logoPremiumTier0;
|
||||
TIER_1 = Branding.TIER_1;
|
||||
object48[TIER_1] = object3.logoPremiumTier1;
|
||||
TIER_2 = Branding.TIER_2;
|
||||
object48[TIER_2] = object3.logoPremiumTier2;
|
||||
PREMIUM_GUILD = Branding.PREMIUM_GUILD;
|
||||
object48[PREMIUM_GUILD] = object3.logoPremiumGuild;
|
||||
object3 = {};
|
||||
ACTIVE = object7.ACTIVE;
|
||||
object3[ACTIVE] = object4.price;
|
||||
ERROR = object7.ERROR;
|
||||
object3[ERROR] = object4.price;
|
||||
RESUB = object7.RESUB;
|
||||
object3[RESUB] = object4.priceDark;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/premium/PremiumSubscriptionDetails.tsx');
|
||||
exports.default = PremiumSubscriptionDetails;
|
||||
exports.onCancelClick = closure;
|
||||
exports.handleManageSubscription = closure2;
|
||||
exports.onResubscribeClick = closure3;
|
||||
exports.PremiumSubscriptionHeader = closure4;
|
||||
}
|
||||
|
||||
function getHeaderBackground_60565(a0, a1) { // fn#60565, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7687:3850, offset: 0x01706c15, size: 23 bytes, params: 3, frame: 2
|
||||
return env0_19[a0][a1];
|
||||
}
|
||||
|
||||
function getPremiumImage(a0, a1) { // fn#60566, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7687:3899, offset: 0x01706c2c, size: 23 bytes, params: 3, frame: 2
|
||||
return env0_20[a0][a1];
|
||||
}
|
||||
|
||||
function getPremiumImageStyle(a0, a1) { // fn#60567, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7687:3944, offset: 0x01706c43, size: 23 bytes, params: 3, frame: 2
|
||||
return env0_21[a0][a1];
|
||||
}
|
||||
|
||||
function getLogo_60568(a0, a1) { // fn#60568, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7687:3994, offset: 0x01706c5a, size: 23 bytes, params: 3, frame: 2
|
||||
return env0_22[a0][a1];
|
||||
}
|
||||
|
||||
function getPlanDescriptionStyle(a0) { // fn#60570, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7687:4068, offset: 0x01706c81, size: 16 bytes, params: 2, frame: 2
|
||||
return env0_24[a0];
|
||||
}
|
||||
|
||||
function _handleCancelSubscription() { // fn#60572, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7687:4207, offset: 0x01706c91, size: 48 bytes, params: 1, frame: 14
|
||||
return env0_4(_fun60574).apply(this, arguments);
|
||||
}
|
||||
|
||||
function onCancelClick(a0, a1) { // fn#60575, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7687:4720, offset: 0x01706dca, size: 171 bytes, params: 3, frame: 19
|
||||
var r0;
|
||||
var defaultImport2;
|
||||
var object2;
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
(require(7294) /* metro dependency 7294: PremiumAnalyticsUtils */).trackPremiumSubscriptionCancellationStarted(a0,
|
||||
a1);
|
||||
const defaultImport = importDefault(3802) /* metro dependency 3802: PremiumUtils */;
|
||||
if (defaultImport.isBoostOnlySubscription(a0)) {
|
||||
r0 = handleCancelSubscription(a0, a1);
|
||||
} else {
|
||||
defaultImport2 = importDefault(7533) /* metro dependency 7533: openPremiumPlanWhatYouLoseActionSheet */;
|
||||
object2 = {subscription: a0};
|
||||
object2.mode = (require(7534) /* metro dependency 7534: PremiumPlanWhatYouLoseActionSheet */).WhatYouLoseMode.CANCEL;
|
||||
object2.onContinue = onContinue;
|
||||
r0 = defaultImport2(object2);
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function handleManageSubscription(a0, a1, a2) { // fn#60577, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7687:4989, offset: 0x01706e95, size: 178 bytes, params: 4, frame: 16
|
||||
var openURL;
|
||||
const status = a0.status;
|
||||
var value;
|
||||
const ACCOUNT_HOLD = SubscriptionStatusTypes.ACCOUNT_HOLD;
|
||||
if (status === ACCOUNT_HOLD) {
|
||||
openURL = Linking.openURL;
|
||||
value = require(3802) /* metro dependency 3802: PremiumUtils */;
|
||||
Reflect.apply(openURL, Linking, [value.getExternalSubscriptionMethodUrl(a0.paymentGateway,
|
||||
'PAYMENT_SOURCE_MANAGEMENT')]);
|
||||
} else {
|
||||
(require(7026) /* metro dependency 7026: launchPremiumPlanSelect */).launchPremiumPlanSelect({navigation: a1,
|
||||
analyticsLocation: {page: AnalyticsPages.USER_SETTINGS, section: AnalyticsSections.SETTINGS_PREMIUM},
|
||||
analyticsLocations: a2});
|
||||
}
|
||||
}
|
||||
|
||||
function _onResubscribeClick() { // fn#60579, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7687:5372, offset: 0x01706f65, size: 48 bytes, params: 1, frame: 14
|
||||
return env0_4(_fun60581).apply(this, arguments);
|
||||
}
|
||||
|
||||
function PremiumSubscriptionHeader({subscription, renewalInvoicePreview, onClickManagePremiumGuild, style}) { // fn#60582, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7687:5651, offset: 0x01707035, size: 1752 bytes, params: 2, frame: 43
|
||||
var r6;
|
||||
var r1;
|
||||
var r12;
|
||||
var r18;
|
||||
var r15;
|
||||
var statusFromInvoice;
|
||||
var property;
|
||||
var defaultImport3;
|
||||
var value6;
|
||||
var defaultImport4;
|
||||
var getPlanDescription;
|
||||
var moduleValue5;
|
||||
var value8;
|
||||
var coercedPremiumGuildSubscriptionStatus;
|
||||
var premiumGuildHeaderDescription;
|
||||
var isAndroid2;
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var object11;
|
||||
var object13;
|
||||
const styles = useStyles();
|
||||
const env0_1 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
|
||||
const fluxModule = require(566) /* metro dependency 566: flux */;
|
||||
const useStateFromStores = fluxModule.useStateFromStores;
|
||||
let object = [UserStore];
|
||||
const currentUser = Reflect.apply(useStateFromStores, fluxModule, [object, _fun60583]);
|
||||
const product = fluxModule.useStateFromStores([IAPStoreAndroid], _fun60584);
|
||||
const planIdFromInvoice = (importDefault(3802) /* metro dependency 3802: PremiumUtils */).getPlanIdFromInvoice(subscription,
|
||||
renewalInvoicePreview);
|
||||
const premiumBranding = (require(3802) /* metro dependency 3802: PremiumUtils */).getPremiumBranding(subscription);
|
||||
const env0_2 = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().analyticsLocations;
|
||||
const Branding = (require(3802) /* metro dependency 3802: PremiumUtils */).Branding;
|
||||
const PREMIUM_GUILD = Branding.PREMIUM_GUILD;
|
||||
if (premiumBranding === PREMIUM_GUILD) {
|
||||
coercedPremiumGuildSubscriptionStatus = (require(3802) /* metro dependency 3802: PremiumUtils */).getCoercedPremiumGuildSubscriptionStatus(subscription);
|
||||
premiumGuildHeaderDescription = (require(3802) /* metro dependency 3802: PremiumUtils */).getPremiumGuildHeaderDescription({subscription: subscription,
|
||||
|
||||
user: currentUser, price: product?.priceString, renewalInvoicePreview: renewalInvoicePreview});
|
||||
r1 = coercedPremiumGuildSubscriptionStatus;
|
||||
r12 = premiumGuildHeaderDescription;
|
||||
} else {
|
||||
statusFromInvoice = (importDefault(3802) /* metro dependency 3802: PremiumUtils */).getStatusFromInvoice(subscription,
|
||||
|
||||
renewalInvoicePreview);
|
||||
property = SubscriptionPlanInfo[planIdFromInvoice];
|
||||
defaultImport3 = importDefault(44) /* metro dependency 44 */;
|
||||
value6 = null;
|
||||
defaultImport3(value6 != property, 'missing subscription planInfo');
|
||||
defaultImport4 = importDefault(3802) /* metro dependency 3802: PremiumUtils */;
|
||||
getPlanDescription = defaultImport4.getPlanDescription;
|
||||
object = {subscription: subscription, planId: planIdFromInvoice};
|
||||
if (value6 != product) {
|
||||
moduleValue5 = require(5137) /* metro dependency 5137: PriceUtils */;
|
||||
r6 = moduleValue5.formatRate(product.priceString, property.interval, property.intervalCount);
|
||||
} else {
|
||||
r6 = value6;
|
||||
}
|
||||
object.price = r6;
|
||||
object.includePremiumGuilds = true;
|
||||
value8 = Reflect.apply(getPlanDescription, defaultImport4, [object]);
|
||||
r1 = statusFromInvoice;
|
||||
r12 = value8;
|
||||
}
|
||||
const CANCELED = SubscriptionStatusTypes.CANCELED;
|
||||
const value11 = r1 === CANCELED;
|
||||
const ACTIVE = SubscriptionStatusTypes.ACTIVE;
|
||||
const r21 = r1 === ACTIVE ? env0_18.ACTIVE : value11 ? env0_18.RESUB : env0_18.ERROR;
|
||||
const r0 = value11 || !subscription.isOnPlatformMatchingExternalPaymentGateway;
|
||||
if (r0) {
|
||||
r18 = !r0;
|
||||
} else {
|
||||
isAndroid2 = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid();
|
||||
r18 = isAndroid2 ? subscription.renewalMutations == null : !isAndroid2;
|
||||
}
|
||||
const r14 = !value11 && subscription.isOnPlatformMatchingExternalPaymentGateway;
|
||||
const items3 = [styles.container, style];
|
||||
const imageBackgroundBindingProps = {source: getHeaderBackground_60565(premiumBranding, r21), style: styles.header};
|
||||
const imageBindingProps = {source: getPremiumImage(premiumBranding, r21)};
|
||||
const items2 = [getPremiumImageStyle(premiumBranding, r21)];
|
||||
items2[1] = styles.wumpusImg;
|
||||
imageBindingProps.style = items2;
|
||||
const items4 = [<View style={styles.logoContainer}><Image {...imageBindingProps} /><Image source={getLogo_60568(premiumBranding,
|
||||
r21)} style={getLogoStyle(premiumBranding)} /></View>];
|
||||
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
|
||||
items4[1] = <LegacyText style={getPlanDescriptionStyle(r21)}>{r12}</LegacyText>;
|
||||
const items5 = [value11 && subscription != null && subscription.isOnPlatformMatchingExternalPaymentGateway ? <View style={styles.buttonWrapper}><Button onPress={function() {
|
||||
return onResubscribeClick(subscription);
|
||||
}} variant="primary-overlay" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.lTCb0c)} /></View> : null];
|
||||
if (r18) {
|
||||
r15 = <View style={styles.buttonWrapper}><Button onPress={onPress_60586} variant="primary-overlay" text={subscription.status === SubscriptionStatusTypes.ACCOUNT_HOLD ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.SgX7Ra) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.gmVtgF)} size="sm" /></View>;
|
||||
} else {
|
||||
r15 = null;
|
||||
}
|
||||
items5[1] = r15;
|
||||
const premiumUtilsModule = require(3802) /* metro dependency 3802: PremiumUtils */;
|
||||
if (premiumUtilsModule.subscriptionHasPremiumGuildPlan(subscription)) {
|
||||
if (onClickManagePremiumGuild != null) {
|
||||
r15 = <View style={styles.buttonWrapper}><Button onPress={onClickManagePremiumGuild} variant="primary-overlay" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.gIVkjm)} size="sm" /></View>;
|
||||
} else {
|
||||
r15 = null;
|
||||
}
|
||||
} else {
|
||||
r15 = null;
|
||||
}
|
||||
items5[2] = r15;
|
||||
items5[3] = r14 ? ((Text) => <Text accessibilityRole="link" style={styles.cancelLink} onPress={function() {
|
||||
return onCancelClick(subscription, analyticsLocations);
|
||||
}} variant="text-sm/medium" color="always-white">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['ETE/oC'])}</Text>)((require(4573) /* metro dependency 4573: Text */).Text) : null;
|
||||
items4[2] = <View style={styles.buttonContainer}>{items5}</View>;
|
||||
return (
|
||||
<View style={items3}>
|
||||
<ImageBackground {...imageBackgroundBindingProps}>
|
||||
{items4}
|
||||
</ImageBackground>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function PremiumSubscriptionDetails({style, onClickManagePremiumGuild, subscription}) { // fn#60588, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7687:8313, offset: 0x01707811, size: 606 bytes, params: 2, frame: 29
|
||||
var r8;
|
||||
var r0;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var items2;
|
||||
const styles = useStyles();
|
||||
const analyticsLocations = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().analyticsLocations;
|
||||
const premiumSubscriptionInvoiceModule = require(7545) /* metro dependency 7545: PremiumSubscriptionInvoice */;
|
||||
const useFetchSubscriptionInvoicePreview = premiumSubscriptionInvoiceModule.useFetchSubscriptionInvoicePreview;
|
||||
let object2 = {};
|
||||
object2.subscriptionId = subscription.id;
|
||||
object2.renewal = true;
|
||||
object2.analyticsLocations = analyticsLocations;
|
||||
const PREMIUM_SUBSCRIPTION_DETAILS = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).PREMIUM_SUBSCRIPTION_DETAILS;
|
||||
object2.analyticsLocation = PREMIUM_SUBSCRIPTION_DETAILS;
|
||||
const property = env0_3(Reflect.apply(useFetchSubscriptionInvoicePreview, premiumSubscriptionInvoiceModule,
|
||||
[object2]), 1)[0];
|
||||
if (property == null) {
|
||||
r0 = null;
|
||||
} else {
|
||||
object2 = {style: style};
|
||||
string = intl.string;
|
||||
items2 = [<Text style={styles.title} accessibilityRole="header" variant="eyebrow" color="text-default">{Reflect.apply(string,
|
||||
|
||||
intl, [t.ITurwY])}</Text>];
|
||||
r8 = subscription.renewalMutations != null && subscription.status !== SubscriptionStatusTypes.CANCELED;
|
||||
r8 = r8 && ((Component) => <Component subscription={subscription} renewalMutations={subscription.renewalMutations} />)(importDefault(7546) /* metro dependency 7546: SubscriptionRenewalMutationsNotice */);
|
||||
items2[1] = r8;
|
||||
r8 = subscription.status === SubscriptionStatusTypes.ACCOUNT_HOLD && ((Component) => <Component subscription={subscription} />)(importDefault(7547) /* metro dependency 7547: SubscriptionAccountHoldNotice */);
|
||||
items2[2] = r8;
|
||||
items2[3] = <PremiumSubscriptionHeader subscription={subscription} renewalInvoicePreview={property} onClickManagePremiumGuild={onClickManagePremiumGuild} />;
|
||||
string = intl.string;
|
||||
items2[4] = <Text style={styles.desktopSubtext} variant="text-sm/medium">{Reflect.apply(string, intl,
|
||||
[t['MTG+3O']])}</Text>;
|
||||
r0 = <View {...object2}>{items2}</View>;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function* _fun60574(a0, a1, a2) { // fn#60574, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7687:4280, offset: 0x01706cca, size: 256 bytes, params: 4, frame: 20
|
||||
var openURL;
|
||||
if (true) {
|
||||
value = environment.__proto__.__proto__;
|
||||
var binding = env2_0;
|
||||
var binding2 = env2_2;
|
||||
var value3 = binding(binding2[44]);
|
||||
var trackPremiumSubscriptionCancellationFlowStep = value3.trackPremiumSubscriptionCancellationFlowStep;
|
||||
var STEP_ANALYTICS_NAMES = binding(binding2[44]).STEP_ANALYTICS_NAMES;
|
||||
var CancellationFlowSteps = binding(binding2[44]).CancellationFlowSteps;
|
||||
var MOBILE_SUBSCRIPTION_MANAGE = CancellationFlowSteps.MOBILE_SUBSCRIPTION_MANAGE;
|
||||
Reflect.apply(trackPremiumSubscriptionCancellationFlowStep, value3, [{subscription: a0, analyticsLocations: a1,
|
||||
fromStep: a2, toStep: STEP_ANALYTICS_NAMES[MOBILE_SUBSCRIPTION_MANAGE]}]);
|
||||
if (a0 != null) {
|
||||
if (a0.isPurchasedViaApple) {
|
||||
value = env2_0(env2_2[45]);
|
||||
yield value.manageSubscription();
|
||||
value = undefined;
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
if (a0 != null && a0.isPurchasedViaGoogle) {
|
||||
binding = env2_7;
|
||||
openURL = binding.openURL;
|
||||
value = env2_0(env2_2[11]);
|
||||
Reflect.apply(openURL, binding, [value.getExternalSubscriptionMethodUrl(a0.paymentGateway,
|
||||
'SUBSCRIPTION_MANAGEMENT')]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function onContinue(a0) { // fn#60576, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7687:4952, owner: onCancelClick.onContinue, offset: 0x01706e75, size: 32 bytes, params: 2, frame: 15
|
||||
return handleCancelSubscription(env0_0, require, a0);
|
||||
}
|
||||
|
||||
function* _fun60581(a0) { // fn#60581, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7687:5433, offset: 0x01706f9e, size: 151 bytes, params: 2, frame: 16
|
||||
var binding;
|
||||
var openURL;
|
||||
let value = undefined;
|
||||
if (false) {
|
||||
return value;
|
||||
}
|
||||
if (a0.isPurchasedViaApple) {
|
||||
value = environment.__proto__.__proto__;
|
||||
value = env2_0(env2_2[45]);
|
||||
yield value.manageSubscription();
|
||||
value = undefined;
|
||||
if (false) {
|
||||
return value;
|
||||
}
|
||||
} else if (a0.isPurchasedViaGoogle) {
|
||||
value = environment.__proto__.__proto__;
|
||||
binding = env2_7;
|
||||
openURL = binding.openURL;
|
||||
value = env2_0(env2_2[11]);
|
||||
Reflect.apply(openURL, binding, [value.getExternalSubscriptionMethodUrl(a0.paymentGateway,
|
||||
'SUBSCRIPTION_MANAGEMENT')]);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun60583() { // fn#60583, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7687:5840, offset: 0x0170770d, size: 58 bytes, params: 1, frame: 14
|
||||
const value = environment.__proto__;
|
||||
const currentUser = UserStore.getCurrentUser();
|
||||
(importDefault(44) /* metro dependency 44 */)(currentUser != null,
|
||||
'PremiumSubscriptionHeader: currentUser cannot be undefined');
|
||||
return currentUser;
|
||||
}
|
||||
|
||||
function _fun60584() { // fn#60584, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7687:5996, offset: 0x01707747, size: 118 bytes, params: 1, frame: 11
|
||||
var paymentGatewayPlanId;
|
||||
var value2;
|
||||
var getProduct;
|
||||
if (subscription.isOnPlatformMatchingExternalPaymentGateway) {
|
||||
paymentGatewayPlanId = subscription.paymentGatewayPlanId;
|
||||
if (paymentGatewayPlanId == null) {
|
||||
throw new global.Error('Subscription missing plan ID');
|
||||
}
|
||||
paymentGatewayPlanId = subscription.paymentGatewayPlanId;
|
||||
if (paymentGatewayPlanId === '') {
|
||||
throw new global.Error('Subscription missing plan ID');
|
||||
}
|
||||
value2 = environment.__proto__;
|
||||
getProduct = IAPStoreAndroid.getProduct;
|
||||
paymentGatewayPlanId = subscription.paymentGatewayPlanId;
|
||||
return Reflect.apply(getProduct, IAPStoreAndroid, [paymentGatewayPlanId]);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function PremiumSubscriptionHeaderOnPress_60586() { // fn#60586, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7687:7700, owner: PremiumSubscriptionHeader.onPress, offset: 0x017077d4, size: 33 bytes, params: 1, frame: 15
|
||||
handleManageSubscription(subscription, env0_1, analyticsLocations);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,336 @@
|
||||
/* Metro module 12264; source: components_native/premium/PremiumSubscriptionPricingUpsell.tsx; dependencies: [57, 31, 27, 1949, 1878, 3807, 3808, 5140, 661, 1880, 33, 4501, 566, 3802, 7563, 694, 7037, 5143, 4573, 477, 5138, 5137, 1244, 1856, 2] */
|
||||
function _fun93722(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#93722, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12450:6, offset: 0x020c0645, size: 476 bytes, params: 8, frame: 20
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_5 = (require(27) /* metro dependency 27 */).View;
|
||||
const localeStore = importDefault(1949) /* metro dependency 1949: LocaleStore */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const subscriptionPlanStore = importDefault(3807) /* metro dependency 3807: SubscriptionPlanStore */;
|
||||
const subscriptionStore = importDefault(3808) /* metro dependency 3808: SubscriptionStore */;
|
||||
const iapStoreAndroid = importDefault(5140) /* metro dependency 5140: IAPStoreAndroid */;
|
||||
const env0_11 = (require(661) /* metro dependency 661: Constants */).CurrencyCodes;
|
||||
let value = require(1880) /* metro dependency 1880: PremiumConstants */;
|
||||
const env0_12 = value.SubscriptionPlans;
|
||||
const env0_13 = value.SubscriptionPlanInfo;
|
||||
const env0_14 = value.PremiumTypes;
|
||||
const env0_15 = value.SubscriptionIntervalTypes;
|
||||
const env0_16 = value.NUM_FREE_GUILD_BOOSTS_WITH_PREMIUM;
|
||||
const env0_17 = value.GUILD_BOOST_COST_FOR_PREMIUM_USER_DISCOUNT_PERCENT;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_18 = value.jsx;
|
||||
const env0_19 = value.Fragment;
|
||||
const env0_20 = value.jsxs;
|
||||
const env0_21 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({title: {marginTop: 16},
|
||||
pricingSection: {alignItems: 'center'}, originalPrice: {textDecorationLine: 'line-through'},
|
||||
cardText: {'lineHeight': 20, 'marginTop': 8, 'textAlign': 'center'}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/premium/PremiumSubscriptionPricingUpsell.tsx');
|
||||
exports.default = PremiumSubscriptionPricingUpsell;
|
||||
}
|
||||
|
||||
function PricingSubheadingCopy() { // fn#93723, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12450:635, offset: 0x020c0821, size: 1807 bytes, params: 1, frame: 33
|
||||
var r19;
|
||||
var price;
|
||||
var price2;
|
||||
var r10;
|
||||
var price3;
|
||||
var r1;
|
||||
var r14;
|
||||
var r16;
|
||||
var r17;
|
||||
var value10;
|
||||
var moduleValue8;
|
||||
var moduleValue10;
|
||||
var value16;
|
||||
var moduleValue11;
|
||||
var formatRate;
|
||||
var moduleValue12;
|
||||
var moduleValue13;
|
||||
var moduleValue14;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var format;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var text;
|
||||
var defaultImport2;
|
||||
var defaultImport3;
|
||||
var defaultImport4;
|
||||
var jsxRuntimeEnv0_19Binding;
|
||||
var XVMAKU;
|
||||
var moduleValue15;
|
||||
var object2;
|
||||
var moduleValue16;
|
||||
var value;
|
||||
const value2 = undefined;
|
||||
const styles = useStyles();
|
||||
const fluxModule = require(566) /* metro dependency 566: flux */;
|
||||
const useStateFromStores = fluxModule.useStateFromStores;
|
||||
let object = [UserStore];
|
||||
const currentUser = Reflect.apply(useStateFromStores, fluxModule, [object, function() {
|
||||
return UserStore.getCurrentUser();
|
||||
}]);
|
||||
const hasBoostDiscount2 = (importDefault(3802) /* metro dependency 3802: PremiumUtils */).hasBoostDiscount(currentUser);
|
||||
const locale = fluxModule.useStateFromStores([LocaleStore], function() {
|
||||
return LocaleStore.locale;
|
||||
});
|
||||
const value3 = (require(7563) /* metro dependency 7563: useSubscriptionPlansLoaded */).useSubscriptionPlansLoaded();
|
||||
const env0_1 = fluxModule.useStateFromStores([SubscriptionStore], function() {
|
||||
return SubscriptionStore.getPremiumTypeSubscription();
|
||||
});
|
||||
const value4 = fluxModule.useStateFromStores([SubscriptionPlanStore], _fun93727);
|
||||
env0_4.useEffect(_fun93728, []);
|
||||
const moduleValue6 = fluxModule;
|
||||
const useStateFromStoresArray = moduleValue6.useStateFromStoresArray;
|
||||
const value6 = env0_3(Reflect.apply(useStateFromStoresArray, moduleValue6, [[IAPStoreAndroid], _fun93730]), 5);
|
||||
const value7 = 0;
|
||||
let property = value6[value7];
|
||||
const property2 = value6[1];
|
||||
const property3 = value6[2];
|
||||
const property4 = value6[3];
|
||||
const property5 = value6[4];
|
||||
const value8 = null;
|
||||
const {interval,
|
||||
intervalCount} = value8 != value4 ? value4 : SubscriptionPlanInfo[SubscriptionPlans.PREMIUM_MONTH_GUILD];
|
||||
if (value3) {
|
||||
if (IAPStoreAndroid.isReady()) {
|
||||
if (value8 == property) {
|
||||
return (
|
||||
<Text style={styles.cardText} variant="text-md/medium">
|
||||
{'...'}
|
||||
</Text>
|
||||
);
|
||||
}
|
||||
r19 = value8 == property ? value2 : property.currencyCode.toLowerCase();
|
||||
price = value8 == property ? value2 : property.price;
|
||||
if (interval === SubscriptionIntervalTypes.YEAR) {
|
||||
r1 = value8 != property5 && value8 != property4 ? property5.price - property4.price : value8;
|
||||
r14 = r1;
|
||||
r16 = r1;
|
||||
} else if (hasBoostDiscount2) {
|
||||
if (value8 == price) {
|
||||
r14 = price;
|
||||
r16 = price;
|
||||
} else {
|
||||
price2 = value8 == property3 ? value2 : property3.price;
|
||||
r10 = value8 != price2 ? price2 : value7;
|
||||
price3 = value8 == property2 ? value2 : property2.price;
|
||||
value10 = r10 - (value8 != price3 ? price3 : value7);
|
||||
r14 = price;
|
||||
r16 = value10;
|
||||
}
|
||||
} else {
|
||||
r14 = price;
|
||||
r16 = price;
|
||||
}
|
||||
r1 = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid() && value8 != r16;
|
||||
if (r1) {
|
||||
moduleValue8 = require(5138) /* metro dependency 5138: PriceUtils */;
|
||||
r10 = moduleValue8.convertToMajorCurrencyUnits(r16, CurrencyCodes.USD);
|
||||
} else {
|
||||
r10 = r16;
|
||||
}
|
||||
if ((require(477) /* metro dependency 477: PlatformUtils */).isAndroid() && value8 != r14) {
|
||||
moduleValue10 = require(5138) /* metro dependency 5138: PriceUtils */;
|
||||
r1 = moduleValue10.convertToMajorCurrencyUnits(r14, CurrencyCodes.USD);
|
||||
} else {
|
||||
r1 = r14;
|
||||
}
|
||||
value16 = '...';
|
||||
if (value8 != r10) {
|
||||
moduleValue11 = require(5137) /* metro dependency 5137: PriceUtils */;
|
||||
formatRate = moduleValue11.formatRate;
|
||||
moduleValue12 = require(5137) /* metro dependency 5137: PriceUtils */;
|
||||
r17 = Reflect.apply(formatRate, moduleValue11, [moduleValue12.formatPrice(r10, r19,
|
||||
{convertToMajorUnits: false}),
|
||||
interval, intervalCount]);
|
||||
} else {
|
||||
r17 = value16;
|
||||
}
|
||||
if (value8 != r1) {
|
||||
moduleValue13 = require(5137) /* metro dependency 5137: PriceUtils */;
|
||||
formatRate = moduleValue13.formatRate;
|
||||
moduleValue14 = require(5137) /* metro dependency 5137: PriceUtils */;
|
||||
r16 = Reflect.apply(formatRate, moduleValue13, [moduleValue14.formatPrice(r1, r19,
|
||||
{convertToMajorUnits: false}),
|
||||
interval, intervalCount]);
|
||||
} else {
|
||||
r16 = value16;
|
||||
}
|
||||
if (r10 !== r1) {
|
||||
object = {};
|
||||
object.style = styles.cardText;
|
||||
object.accessibilityLabel = intl.formatToPlainString(t.lEIwDw, {price: r17, originalPrice: r16});
|
||||
object.variant = 'text-md/medium';
|
||||
object.children = intl.format(t.eRSsbf, {price: r17, originalPrice: r16,
|
||||
originalPriceHook: originalPriceHook});
|
||||
r1 = object;
|
||||
} else {
|
||||
object = {};
|
||||
object.style = styles.cardText;
|
||||
object.variant = 'text-md/medium';
|
||||
object.children = intl.format((require(1244) /* metro dependency 1244: indexNative */).t.Mmf63F,
|
||||
{price: r17});
|
||||
r1 = object;
|
||||
}
|
||||
text = <Text {...r1} />;
|
||||
defaultImport2 = importDefault(3802) /* metro dependency 3802: PremiumUtils */;
|
||||
if (defaultImport2.hasFreeBoosts(currentUser)) {
|
||||
if (hasBoostDiscount2) {
|
||||
defaultImport3 = importDefault(3802) /* metro dependency 3802: PremiumUtils */;
|
||||
if (defaultImport3.isPremium(currentUser, PremiumTypes.TIER_2)) {
|
||||
jsxRuntimeEnv0_19Binding = jsxRuntimeEnv0_19;
|
||||
var textProps = {style: styles.cardText, variant: 'text-md/medium'};
|
||||
format = intl.format;
|
||||
property = (require(1244) /* metro dependency 1244: indexNative */).t['ZikTt+'];
|
||||
object2 = {};
|
||||
object2.freeSubscriptionCount = NUM_FREE_GUILD_BOOSTS_WITH_PREMIUM;
|
||||
moduleValue16 = require(1856) /* metro dependency 1856: NumberUtils */;
|
||||
object2.discountPercent = moduleValue16.formatPercent(locale,
|
||||
GUILD_BOOST_COST_FOR_PREMIUM_USER_DISCOUNT_PERCENT / 100);
|
||||
value = <Text {...textProps}>{Reflect.apply(format, intl, [property, object2])}</Text>;
|
||||
value = <>{value}{text}</>;
|
||||
r1 = value;
|
||||
} else if (hasBoostDiscount2) {
|
||||
defaultImport4 = importDefault(3802) /* metro dependency 3802: PremiumUtils */;
|
||||
if (defaultImport4.isPremium(currentUser, PremiumTypes.TIER_1)) {
|
||||
jsxRuntimeEnv0_19Binding = jsxRuntimeEnv0_19;
|
||||
var textProps = {style: styles.cardText, variant: 'text-md/medium'};
|
||||
format = intl.format;
|
||||
XVMAKU = (require(1244) /* metro dependency 1244: indexNative */).t.XVMAKU;
|
||||
moduleValue15 = require(1856) /* metro dependency 1856: NumberUtils */;
|
||||
value = <Text {...textProps}>{Reflect.apply(format, intl, [XVMAKU,
|
||||
{discountPercent: moduleValue15.formatPercent(locale,
|
||||
GUILD_BOOST_COST_FOR_PREMIUM_USER_DISCOUNT_PERCENT / 100)}])}</Text>;
|
||||
value = <>{value}{text}</>;
|
||||
r1 = value;
|
||||
} else {
|
||||
r1 = text;
|
||||
}
|
||||
} else {
|
||||
r1 = text;
|
||||
}
|
||||
} else if (hasBoostDiscount2) {
|
||||
defaultImport4 = importDefault(3802) /* metro dependency 3802: PremiumUtils */;
|
||||
if (defaultImport4.isPremium(currentUser, PremiumTypes.TIER_1)) {
|
||||
jsxRuntimeEnv0_19Binding = jsxRuntimeEnv0_19;
|
||||
var textProps = {style: styles.cardText, variant: 'text-md/medium'};
|
||||
format = intl.format;
|
||||
XVMAKU = (require(1244) /* metro dependency 1244: indexNative */).t.XVMAKU;
|
||||
moduleValue15 = require(1856) /* metro dependency 1856: NumberUtils */;
|
||||
value = <Text {...textProps}>{Reflect.apply(format, intl, [XVMAKU,
|
||||
{discountPercent: moduleValue15.formatPercent(locale,
|
||||
GUILD_BOOST_COST_FOR_PREMIUM_USER_DISCOUNT_PERCENT / 100)}])}</Text>;
|
||||
value = <>{value}{text}</>;
|
||||
r1 = value;
|
||||
} else {
|
||||
r1 = text;
|
||||
}
|
||||
} else {
|
||||
r1 = text;
|
||||
}
|
||||
} else if (hasBoostDiscount2) {
|
||||
defaultImport4 = importDefault(3802) /* metro dependency 3802: PremiumUtils */;
|
||||
if (defaultImport4.isPremium(currentUser, PremiumTypes.TIER_1)) {
|
||||
jsxRuntimeEnv0_19Binding = jsxRuntimeEnv0_19;
|
||||
var textProps = {style: styles.cardText, variant: 'text-md/medium'};
|
||||
format = intl.format;
|
||||
XVMAKU = (require(1244) /* metro dependency 1244: indexNative */).t.XVMAKU;
|
||||
moduleValue15 = require(1856) /* metro dependency 1856: NumberUtils */;
|
||||
value = <Text {...textProps}>{Reflect.apply(format, intl, [XVMAKU,
|
||||
{discountPercent: moduleValue15.formatPercent(locale,
|
||||
GUILD_BOOST_COST_FOR_PREMIUM_USER_DISCOUNT_PERCENT / 100)}])}</Text>;
|
||||
value = <>{value}{text}</>;
|
||||
r1 = value;
|
||||
} else {
|
||||
r1 = text;
|
||||
}
|
||||
} else {
|
||||
r1 = text;
|
||||
}
|
||||
return r1;
|
||||
}
|
||||
}
|
||||
return (
|
||||
<Text style={styles.cardText} variant="text-md/medium">
|
||||
{'...'}
|
||||
</Text>
|
||||
);
|
||||
}
|
||||
|
||||
function PremiumSubscriptionPricingUpsell() { // fn#93732, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12450:3246, offset: 0x020c1108, size: 213 bytes, params: 1, frame: 23
|
||||
const styles = useStyles();
|
||||
const value2 = (require(7563) /* metro dependency 7563: useSubscriptionPlansLoaded */).useSubscriptionPlansLoaded();
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
return (
|
||||
<View style={styles.pricingSection}>
|
||||
<Text
|
||||
style={styles.title}
|
||||
accessibilityRole="header"
|
||||
variant="heading-lg/semibold"
|
||||
color="mobile-text-heading-primary"
|
||||
>
|
||||
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['3x1PFE'])}
|
||||
</Text>
|
||||
{value2 ? <PricingSubheadingCopy /> : null}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun93727() { // fn#93727, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12450:966, offset: 0x020c0f30, size: 47 bytes, params: 1, frame: 12
|
||||
return premiumTypeSubscription != null ? SubscriptionPlanStore.get(premiumTypeSubscription.planId) : undefined;
|
||||
}
|
||||
|
||||
function _fun93728() { // fn#93728, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12450:1016, offset: 0x020c0f5f, size: 66 bytes, params: 1, frame: 11
|
||||
var environment;
|
||||
const value = environment.__proto__;
|
||||
if (!IAPStoreAndroid.isReady()) {
|
||||
(importDefault(694) /* metro dependency 694: Dispatcher */).wait(_fun93729);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun93730() { // fn#93730, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12450:1129, offset: 0x020c0fc6, size: 222 bytes, params: 1, frame: 17
|
||||
let getProduct = IAPStoreAndroid.getProduct;
|
||||
const ProductIds = (require(5143) /* metro dependency 5143: ProductIdsAndroid */).ProductIds;
|
||||
const PREMIUM_GUILD_1_MONTHLY = ProductIds.PREMIUM_GUILD_1_MONTHLY;
|
||||
const items2 = [Reflect.apply(getProduct, IAPStoreAndroid, [PREMIUM_GUILD_1_MONTHLY])];
|
||||
getProduct = IAPStoreAndroid.getProduct;
|
||||
const PREMIUM_TIER_2_MONTHLY = ProductIds.PREMIUM_TIER_2_MONTHLY;
|
||||
items2[1] = Reflect.apply(getProduct, IAPStoreAndroid, [PREMIUM_TIER_2_MONTHLY]);
|
||||
getProduct = IAPStoreAndroid.getProduct;
|
||||
const PREMIUM_TIER_2_PREMIUM_GUILD_1_MONTHLY = ProductIds.PREMIUM_TIER_2_PREMIUM_GUILD_1_MONTHLY;
|
||||
items2[2] = Reflect.apply(getProduct, IAPStoreAndroid, [PREMIUM_TIER_2_PREMIUM_GUILD_1_MONTHLY]);
|
||||
getProduct = IAPStoreAndroid.getProduct;
|
||||
const PREMIUM_TIER_2_YEARLY = ProductIds.PREMIUM_TIER_2_YEARLY;
|
||||
items2[3] = Reflect.apply(getProduct, IAPStoreAndroid, [PREMIUM_TIER_2_YEARLY]);
|
||||
getProduct = IAPStoreAndroid.getProduct;
|
||||
const PREMIUM_TIER_2_PREMIUM_GUILD_1_YEARLY = ProductIds.PREMIUM_TIER_2_PREMIUM_GUILD_1_YEARLY;
|
||||
items2[4] = Reflect.apply(getProduct, IAPStoreAndroid, [PREMIUM_TIER_2_PREMIUM_GUILD_1_YEARLY]);
|
||||
return items2;
|
||||
}
|
||||
|
||||
function originalPriceHook(a0, a1) { // fn#93731, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12450:2526, owner: PricingSubheadingCopy.originalPriceHook, offset: 0x020c10a4, size: 100 bytes, params: 3, frame: 16
|
||||
if (env0_2 === env0_3) {
|
||||
return null;
|
||||
} else {
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return (
|
||||
<Text
|
||||
style={styles.originalPrice}
|
||||
variant="text-sm/medium"
|
||||
color="text-muted"
|
||||
key={a1}
|
||||
>
|
||||
{a0}
|
||||
</Text>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun93729() { // fn#93729, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12450:1049, offset: 0x020c0fa1, size: 37 bytes, params: 1, frame: 11
|
||||
const value = environment.__proto__.__proto__;
|
||||
return (importDefault(7037) /* metro dependency 7037: BillingActionCreators */).loadProducts();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,137 @@
|
||||
/* Metro module 12266; source: components_native/premium/PremiumSubscriptionUpsell.tsx; dependencies: [31, 27, 1949, 1878, 661, 7047, 1880, 33, 4501, 697, 4064, 1244, 1856, 566, 3802, 4589, 676, 4573, 12267, 12268, 7971, 4578, 2] */
|
||||
function _fun93740(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#93740, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12452:6, offset: 0x020c16f1, size: 692 bytes, params: 8, frame: 26
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_3 = value.View;
|
||||
const env0_4 = value.Image;
|
||||
const StyleSheet = value.StyleSheet;
|
||||
const localeStore = importDefault(1949) /* metro dependency 1949: LocaleStore */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const Fonts = (require(661) /* metro dependency 661: Constants */).Fonts;
|
||||
const env0_7 = (require(7047) /* metro dependency 7047: ColorConstants */).Gradients;
|
||||
value = require(1880) /* metro dependency 1880: PremiumConstants */;
|
||||
const env0_8 = value.NUM_FREE_GUILD_BOOSTS_WITH_PREMIUM;
|
||||
const env0_9 = value.GUILD_BOOST_COST_FOR_PREMIUM_USER_DISCOUNT_PERCENT;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_10 = value.jsx;
|
||||
const env0_11 = value.Fragment;
|
||||
const env0_12 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {};
|
||||
object2.title = {textAlign: 'center'};
|
||||
object2.subtitle = {'lineHeight': 20, 'marginTop': 8, 'textAlign': 'center'};
|
||||
const object6 = {paddingTop: 32};
|
||||
object6.borderTopWidth = 2 * StyleSheet.hairlineWidth;
|
||||
let BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
|
||||
object6.borderTopColor = BORDER_SUBTLE;
|
||||
object2.upsell = object6;
|
||||
const object7 = {'borderRadius': null, 'padding': 16, 'alignItems': 'center'};
|
||||
object7.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
|
||||
object2.upsellCard = object7;
|
||||
const object8 = {'borderRadius': null, 'padding': 16, 'marginTop': 12, 'alignSelf': 'stretch'};
|
||||
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
||||
BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
|
||||
object8.backgroundColor = BORDER_SUBTLE;
|
||||
object2.upsellFeatures = object8;
|
||||
object2.upsellFeatureSubLogo = {'alignSelf': 'center', 'height': 10, 'width': 54};
|
||||
object2.upsellFeatureList = {marginTop: 8};
|
||||
object2.upsellButton = {marginTop: 16};
|
||||
object2.upsellFeatureLogoTier2 = {'alignSelf': 'center', 'height': 20, 'marginTop': 6, 'width': 84};
|
||||
let WHITE = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE;
|
||||
const PRIMARY_SEMIBOLD = Fonts.PRIMARY_SEMIBOLD;
|
||||
object2.upsellLabel = {color: WHITE, fontFamily: PRIMARY_SEMIBOLD, fontSize: 16, lineHeight: 20};
|
||||
WHITE = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE;
|
||||
object2.upsellRow = {'paddingVertical': 0, 'marginTop': 8, color: WHITE};
|
||||
const env0_13 = Reflect.apply(createStyles, value, [object2]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/premium/PremiumSubscriptionUpsell.tsx');
|
||||
exports.default = PremiumSubscriptionUpsell;
|
||||
}
|
||||
|
||||
function PremiumSubscriptionUpsell({onLearnMorePremium, style}) { // fn#93741, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12452:1155, offset: 0x020c19a5, size: 1263 bytes, params: 2, frame: 43
|
||||
var r9;
|
||||
var r0;
|
||||
var defaultImport2;
|
||||
const HorizontalGradient = (require(676) /* metro dependency 676: ConstantsIOS */).HorizontalGradient;
|
||||
var defaultImport3;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var jsxRuntimeEnv0_11Binding;
|
||||
var items2;
|
||||
var items3;
|
||||
var items4;
|
||||
var PremiumFeatureList;
|
||||
var object;
|
||||
const CheckmarkLargeIcon = (require(4064) /* metro dependency 4064: CheckmarkLargeIcon */).CheckmarkLargeIcon;
|
||||
var formatToPlainString;
|
||||
var P3aEj6;
|
||||
var moduleValue2;
|
||||
var unsafe_rawColors;
|
||||
var WHITE;
|
||||
var items5;
|
||||
var object2;
|
||||
const styles = useStyles();
|
||||
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
|
||||
return UserStore.getCurrentUser();
|
||||
});
|
||||
if ((importDefault(3802) /* metro dependency 3802: PremiumUtils */).canUsePremiumGuildMemberProfile(currentUser)) {
|
||||
r0 = null;
|
||||
} else {
|
||||
var viewBindingProps = {style: [styles.upsell, style]};
|
||||
defaultImport2 = importDefault(4589) /* metro dependency 4589 */;
|
||||
var defaultImport2Props2 = {style: styles.upsellCard, start: HorizontalGradient.START,
|
||||
end: HorizontalGradient.END,
|
||||
colors: Gradients.PREMIUM_GUILD};
|
||||
defaultImport3 = importDefault(3802) /* metro dependency 3802: PremiumUtils */;
|
||||
if (defaultImport3.isPremium(currentUser)) {
|
||||
jsxRuntimeEnv0_11Binding = jsxRuntimeEnv0_11;
|
||||
items2 = [<Text style={styles.title} accessibilityRole="header" variant="heading-lg/semibold" color="always-white">{intl.string(t.YYfHlx)}</Text>];
|
||||
items2[1] = <Text style={styles.subtitle} variant="text-md/semibold" color="always-white">{intl.format(t.Af0zEZ,
|
||||
|
||||
{numFreeGuildSubscriptions: NUM_FREE_GUILD_BOOSTS_WITH_PREMIUM})}</Text>;
|
||||
r9 = <>{items2}</>;
|
||||
} else {
|
||||
r9 = <Text style={styles.title} accessibilityRole="header" variant="heading-lg/semibold" color="always-white">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['qUl+K4'])}</Text>;
|
||||
}
|
||||
items3 = [r9];
|
||||
var viewBinding2Props = {style: styles.upsellFeatures};
|
||||
items4 = [<Image style={styles.upsellFeatureSubLogo} source={importDefault(12267) /* metro dependency 12267 */} />];
|
||||
items4[1] = <Image style={styles.upsellFeatureLogoTier2} source={importDefault(12268) /* metro dependency 12268 */} />;
|
||||
PremiumFeatureList = importDefault(7971) /* metro dependency 7971: PremiumFeatureList */;
|
||||
var defaultImport4Props = {style: styles.upsellFeatureList};
|
||||
object = {};
|
||||
object.IconComponent = CheckmarkLargeIcon;
|
||||
formatToPlainString = intl.formatToPlainString;
|
||||
P3aEj6 = t.P3aEj6;
|
||||
moduleValue2 = require(1856) /* metro dependency 1856: NumberUtils */;
|
||||
object.label = Reflect.apply(formatToPlainString, intl, [P3aEj6,
|
||||
{discountPercentage: moduleValue2.formatPercent(LocaleStore.locale,
|
||||
GUILD_BOOST_COST_FOR_PREMIUM_USER_DISCOUNT_PERCENT / 100)}]);
|
||||
unsafe_rawColors = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors;
|
||||
WHITE = unsafe_rawColors.WHITE;
|
||||
object.color = WHITE;
|
||||
items5 = [object];
|
||||
object2 = {};
|
||||
object2.IconComponent = CheckmarkLargeIcon;
|
||||
object2.label = intl.formatToPlainString(t.Ntlzbd,
|
||||
{numFreeGuildSubscriptions: NUM_FREE_GUILD_BOOSTS_WITH_PREMIUM});
|
||||
unsafe_rawColors = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors;
|
||||
WHITE = unsafe_rawColors.WHITE;
|
||||
object2.color = WHITE;
|
||||
items5[1] = object2;
|
||||
defaultImport4Props.features = items5;
|
||||
defaultImport4Props.labelStyle = styles.upsellLabel;
|
||||
defaultImport4Props.rowStyle = styles.upsellRow;
|
||||
items4[2] = <PremiumFeatureList {...defaultImport4Props} />;
|
||||
items3[1] = <View {...viewBinding2Props}>{items4}</View>;
|
||||
items3[2] = <View style={styles.upsellButton}>{((Button) => <Button variant="experimental_premium-secondary" text={intl.string(t.fJOECn)} onPress={onLearnMorePremium} />)((require(4578) /* metro dependency 4578: ButtonNative */).Button)}</View>;
|
||||
r0 = <View {...viewBindingProps}>{((Component) => <Component {...defaultImport2Props2}>{items3}</Component>)(defaultImport2)}</View>;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
/* Metro module 12291; source: components_native/premium/PremiumTierCard.tsx; dependencies: [31, 27, 7047, 1880, 33, 4501, 697, 6235, 1357, 4589, 676, 3802, 12292, 12293, 7312, 7250, 7251, 7307, 6239, 2] */
|
||||
function _fun93895(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#93895, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12477:6, offset: 0x020c92c9, size: 506 bytes, params: 8, frame: 22
|
||||
var object3;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_3 = value.View;
|
||||
const env0_4 = value.Image;
|
||||
const env0_5 = (require(7047) /* metro dependency 7047: ColorConstants */).getPremiumGradientColor;
|
||||
const env0_6 = (require(1880) /* metro dependency 1880: PremiumConstants */).PremiumTypes;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_7 = value.jsx;
|
||||
const env0_8 = value.Fragment;
|
||||
const env0_9 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object3 = {header: {'marginTop': 24, 'padding': 16}, textLogoTier0: {'width': 158, 'height': 32},
|
||||
textLogoTier1: {'width': 185, 'height': 32}, textLogoTier2: {'width': 80, 'height': 32},
|
||||
wumpusLogo: {'position': 'absolute', 'top': 0, 'right': 24, 'zIndex': 1}, wumpusLogoTier0: {'width': 83,
|
||||
'height': 100}, wumpusLogoTier1: {'width': 86, 'height': 100}, wumpusLogoTier2: {'width': 133, 'height': 100}};
|
||||
const object4 = {padding: 16};
|
||||
object4.borderBottomRightRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
|
||||
object4.borderBottomLeftRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
|
||||
object3.body = object4;
|
||||
const DARK_PRIMARY_630_LIGHT_PRIMARY_100 = (require(6235) /* metro dependency 6235: LegacyTokens */).DARK_PRIMARY_630_LIGHT_PRIMARY_100;
|
||||
object3.bodyLegacy = {backgroundColor: DARK_PRIMARY_630_LIGHT_PRIMARY_100};
|
||||
const env0_10 = Reflect.apply(createStyles, value, [object3]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/premium/PremiumTierCard.tsx');
|
||||
exports.default = _default_93896;
|
||||
}
|
||||
|
||||
function _default_93896({premiumType, children, style}) { // fn#93896, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12477:748, offset: 0x020c94c3, size: 793 bytes, params: 2, frame: 28
|
||||
const styles = useStyles();
|
||||
const value3 = (importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('PremiumTierCard');
|
||||
const jsxRuntimeEnv0_8Binding = jsxRuntimeEnv0_8;
|
||||
const defaultImport2 = importDefault(4589) /* metro dependency 4589 */;
|
||||
const defaultImport2Props = {style: styles.header};
|
||||
const HorizontalGradient = (require(676) /* metro dependency 676: ConstantsIOS */).HorizontalGradient;
|
||||
const START = HorizontalGradient.START;
|
||||
defaultImport2Props.start = START;
|
||||
const END = HorizontalGradient.END;
|
||||
defaultImport2Props.end = END;
|
||||
defaultImport2Props.colors = getPremiumGradientColor(premiumType);
|
||||
const imageBindingProps = {'accessible': true, 'accessibilityLabel': null, 'accessibilityRole': 'header',
|
||||
accessibilityLabel: (require(3802) /* metro dependency 3802: PremiumUtils */).getPremiumTypeDisplayName(premiumType)};
|
||||
let TIER_0 = PremiumTypes.TIER_0;
|
||||
imageBindingProps.style = TIER_0 === premiumType ? styles.textLogoTier0 : PremiumTypes.TIER_1 === premiumType ? styles.textLogoTier1 : PremiumTypes.TIER_2 !== premiumType ? undefined : styles.textLogoTier2;
|
||||
TIER_0 = PremiumTypes.TIER_0;
|
||||
imageBindingProps.source = TIER_0 === premiumType ? importDefault(12292) /* metro dependency 12292 */ : PremiumTypes.TIER_1 === premiumType ? importDefault(12293) /* metro dependency 12293 */ : PremiumTypes.TIER_2 !== premiumType ? undefined : importDefault(7312) /* metro dependency 7312 */;
|
||||
const items3 = [((Component) => <Component {...defaultImport2Props}><Image {...imageBindingProps} /></Component>)(defaultImport2)];
|
||||
const items2 = [styles.wumpusLogo];
|
||||
TIER_0 = PremiumTypes.TIER_0;
|
||||
items2[1] = TIER_0 === premiumType ? styles.wumpusLogoTier0 : PremiumTypes.TIER_1 === premiumType ? styles.wumpusLogoTier1 : PremiumTypes.TIER_2 !== premiumType ? undefined : styles.wumpusLogoTier2;
|
||||
TIER_0 = PremiumTypes.TIER_0;
|
||||
items3[1] = <Image accessible={false} importantForAccessibility="no" style={items2} source={TIER_0 === premiumType ? importDefault(7250) /* metro dependency 7250 */ : PremiumTypes.TIER_1 === premiumType ? importDefault(7251) /* metro dependency 7251 */ : PremiumTypes.TIER_2 !== premiumType ? undefined : importDefault(7307) /* metro dependency 7307 */} />;
|
||||
items3[2] = <View style={[styles.body, !value3 && styles.bodyLegacy]}>{children}</View>;
|
||||
const fragment = <>{items3}</>;
|
||||
if (value3) {
|
||||
const Card = (require(6239) /* metro dependency 6239: CardNative */).Card;
|
||||
return (
|
||||
<Card variant="surface-high" style={style}>
|
||||
{fragment}
|
||||
</Card>
|
||||
);
|
||||
} else {
|
||||
return (
|
||||
<View style={style}>
|
||||
{fragment}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
/* Metro module 12296; source: components_native/premium/PremiumUnverifiedWarning.tsx; dependencies: [6, 7, 15, 17, 18, 31, 1878, 33, 4501, 697, 1305, 1244, 3868, 566, 2] */
|
||||
function _fun93909(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#93909, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12482:6, offset: 0x020ca152, size: 397 bytes, params: 8, frame: 23
|
||||
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 = importAll(31) /* metro dependency 31 */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const env0_8 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createLegacyClassComponentStyles = createStylesModule.createLegacyClassComponentStyles;
|
||||
const RED_400 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.RED_400;
|
||||
const env0_9 = Reflect.apply(createLegacyClassComponentStyles, createStylesModule, [{warning: {'color': null,
|
||||
'fontSize': 12, 'marginTop': 10, color: RED_400}}]);
|
||||
const PureComponent = value.PureComponent;
|
||||
value = _fun93913(PureComponent);
|
||||
const ThemeContext = (require(3868) /* metro dependency 3868: native */).ThemeContext;
|
||||
value.contextType = ThemeContext;
|
||||
const flux = importDefault(566) /* metro dependency 566: flux */;
|
||||
value = flux.connectStores([userStore], _fun93916)(value);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/premium/PremiumUnverifiedWarning.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_93910() { // fn#93910, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12482:182, offset: 0x020ca2df, 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_93910_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function _fun93913(a0) { // fn#93913, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12482:501, offset: 0x020ca341, size: 72 bytes, params: 2, frame: 15
|
||||
const closure = PremiumUnverifiedWarning;
|
||||
env0_6(closure, a0);
|
||||
return env0_3(closure, [{key: 'render', value: value_93915}]);
|
||||
}
|
||||
|
||||
function _fun93916() { // fn#93916, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12482:1119, offset: 0x020ca427, size: 52 bytes, params: 1, frame: 12
|
||||
const verified = UserStore.getCurrentUser()?.verified;
|
||||
return {verified: verified != null && verified};
|
||||
}
|
||||
|
||||
function value_93915() { // fn#93915, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12482:847, offset: 0x020ca389, size: 158 bytes, params: 1, frame: 19
|
||||
var r0;
|
||||
var LegacyText;
|
||||
var intl;
|
||||
const value = environment.__proto__;
|
||||
const value2 = env1_9(this.context);
|
||||
const props = this.props;
|
||||
if (props.verified) {
|
||||
r0 = null;
|
||||
} else {
|
||||
LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
|
||||
var legacyTextProps = {style: [value2.warning, props.style]};
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
r0 = <LegacyText {...legacyTextProps}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['0LgOKH'])}</LegacyText>;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,562 @@
|
||||
/* Metro module 7901; source: components_native/premium/PremiumUpsellAlert.tsx; dependencies: [57, 6, 7, 15, 17, 18, 31, 27, 1312, 1878, 661, 7902, 1880, 33, 4501, 697, 4573, 3868, 7062, 1244, 3802, 7883, 7884, 4048, 4002, 7929, 7930, 7931, 7932, 7875, 7933, 7934, 7935, 7936, 566, 6808, 7896, 7882, 1478, 6771, 6789, 4594, 683, 7937, 4136, 4596, 1305, 5475, 7938, 7939, 7886, 2] */
|
||||
function _fun63274(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#63274, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8079:6, offset: 0x01b78912, size: 913 bytes, params: 8, frame: 26
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const closure = PremiumUpsellItem;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_4 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_5 = importDefault(7) /* metro dependency 7 */;
|
||||
const env0_6 = importDefault(15) /* metro dependency 15 */;
|
||||
const env0_7 = importDefault(17) /* metro dependency 17 */;
|
||||
const env0_8 = importDefault(18) /* metro dependency 18 */;
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const value2 = require(27) /* metro dependency 27 */;
|
||||
const env0_10 = value2.View;
|
||||
const env0_11 = value2.Image;
|
||||
const unsyncedUserSettingsStore = importDefault(1312) /* metro dependency 1312: UnsyncedUserSettingsStore */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_14 = constantsModule.AnalyticEvents;
|
||||
const env0_15 = constantsModule.UpsellTypes;
|
||||
const env0_16 = (require(7902) /* metro dependency 7902: AppIconConstants */).getIcons;
|
||||
const premiumConstantsModule = require(1880) /* metro dependency 1880: PremiumConstants */;
|
||||
const env0_17 = premiumConstantsModule.PremiumSubscriptionSKUs;
|
||||
const env0_18 = premiumConstantsModule.PremiumTypes;
|
||||
const value5 = require(33) /* metro dependency 33 */;
|
||||
const env0_19 = value5.jsx;
|
||||
const env0_20 = value5.jsxs;
|
||||
const env0_21 = value5.Fragment;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createLegacyClassComponentStyles = createStylesModule.createLegacyClassComponentStyles;
|
||||
object2 = {};
|
||||
object2.carousel = {alignItems: 'center'};
|
||||
object2.upsellContainer = {alignItems: 'center'};
|
||||
object2.premiumUpsellContainer = {'alignItems': 'center', 'paddingHorizontal': 8};
|
||||
object2.nitroWheel = {'width': 32, 'height': 32, 'marginVertical': -8};
|
||||
object2.upsellImage = {'height': 80, 'width': 120};
|
||||
object2.upsellTitle = {'marginBottom': 8, 'textAlign': 'center'};
|
||||
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object2.premiumUpsellTitle = {marginVertical: PX_8, textAlign: 'center'};
|
||||
object2.upsellDescription = {textAlign: 'center'};
|
||||
object2.premiumUpsellDescription = {textAlign: 'center'};
|
||||
object2.pageIndicatorStyle = {marginTop: 16};
|
||||
object2.largerUpsellImage = {'height': 154, 'width': 226};
|
||||
object2.customProfileUpsellImage = {'width': 240, 'height': 194};
|
||||
object2.loadingIndicator = {height: 170};
|
||||
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
|
||||
object2.customAppIconUpsellLightImage = {borderColor: BACKGROUND_BASE_LOWEST, borderWidth: 2};
|
||||
const object3 = {'height': 80, 'width': 80};
|
||||
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
||||
object2.customAppIconsUpsellImage = object3;
|
||||
const env0_22 = Reflect.apply(createLegacyClassComponentStyles, createStylesModule, [object2]);
|
||||
const PureComponent = value.PureComponent;
|
||||
value = _fun63291(PureComponent);
|
||||
const ThemeContext = (require(3868) /* metro dependency 3868: native */).ThemeContext;
|
||||
value.contextType = ThemeContext;
|
||||
value.defaultProps = {isInitial: false};
|
||||
const closure2 = PremiumUpsellAlert;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/premium/PremiumUpsellAlert.tsx');
|
||||
exports.default = closure2;
|
||||
exports.PremiumUpsellItem = closure;
|
||||
exports.PremiumUpsellAlert = closure2;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_63275() { // fn#63275, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8079:380, offset: 0x01b78ca3, 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_63275_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function PremiumUpsellItem({upsellItem, alertWidth, imageStyle, style}) { // fn#63278, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8079:2141, offset: 0x01b78d01, size: 307 bytes, params: 2, frame: 26
|
||||
const value2 = (require(4501) /* metro dependency 4501: createStyles */).useLegacyClassComponentStyles(env0_22);
|
||||
const image = upsellItem.image;
|
||||
const title = upsellItem.title;
|
||||
const description = upsellItem.description;
|
||||
const items2 = [value2.premiumUpsellContainer];
|
||||
items2[1] = {width: alertWidth};
|
||||
items2[2] = style;
|
||||
const items3 = [<Image style={[value2.upsellImage, imageStyle]} source={image} resizeMode="contain" />];
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
items3[1] = <Text style={value2.premiumUpsellTitle} variant="heading-xl/extrabold" color="mobile-text-heading-primary" accessibilityRole="header">{title}</Text>;
|
||||
items3[2] = <Text style={value2.premiumUpsellDescription} variant="text-md/medium">{description}</Text>;
|
||||
return (
|
||||
<View style={items2}>
|
||||
{items3}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function GlobalEmojiUpsell({alertWidth, useTier0Description}) { // fn#63279, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8079:2672, offset: 0x01b78e34, size: 588 bytes, params: 2, frame: 23
|
||||
var r5;
|
||||
var kWBwlJ;
|
||||
var moduleValue2;
|
||||
var moduleValue3;
|
||||
var moduleValue4;
|
||||
const value3 = (require(7062) /* metro dependency 7062: usePremiumTrialOfferNative */).usePremiumTrialOffer();
|
||||
const sku_id = value3 == null || value3.subscription_trial == null ? undefined : value3.subscription_trial.sku_id;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let format = intl.format;
|
||||
let property = (require(1244) /* metro dependency 1244: indexNative */).t['KEn+LY'];
|
||||
const value4 = Reflect.apply(format, intl, [property, {}]);
|
||||
if (sku_id != null) {
|
||||
if (PremiumSubscriptionSKUs.TIER_0 === sku_id) {
|
||||
format = intl.format;
|
||||
property = (require(1244) /* metro dependency 1244: indexNative */).t['1P7x8p'];
|
||||
moduleValue4 = require(3802) /* metro dependency 3802: PremiumUtils */;
|
||||
r5 = Reflect.apply(format, intl, [property,
|
||||
{planName: moduleValue4.getPremiumTypeDisplayName(PremiumTypes.TIER_0)}]);
|
||||
} else if (PremiumSubscriptionSKUs.TIER_2 !== sku_id) {
|
||||
r5 = value4;
|
||||
} else {
|
||||
format = intl.format;
|
||||
property = (require(1244) /* metro dependency 1244: indexNative */).t['1P7x8p'];
|
||||
moduleValue3 = require(3802) /* metro dependency 3802: PremiumUtils */;
|
||||
r5 = Reflect.apply(format, intl, [property,
|
||||
{planName: moduleValue3.getPremiumTypeDisplayName(PremiumTypes.TIER_2)}]);
|
||||
}
|
||||
} else if (useTier0Description) {
|
||||
format = intl.format;
|
||||
kWBwlJ = (require(1244) /* metro dependency 1244: indexNative */).t.kWBwlJ;
|
||||
moduleValue2 = require(3802) /* metro dependency 3802: PremiumUtils */;
|
||||
r5 = Reflect.apply(format, intl, [kWBwlJ,
|
||||
{planName: moduleValue2.getPremiumTypeDisplayName(PremiumTypes.TIER_0)}]);
|
||||
} else {
|
||||
r5 = value4;
|
||||
}
|
||||
const object = {};
|
||||
object.image = importDefault(7883) /* metro dependency 7883 */;
|
||||
const string = intl.string;
|
||||
const UNtcBV = (require(1244) /* metro dependency 1244: indexNative */).t.UNtcBV;
|
||||
object.title = Reflect.apply(string, intl, [UNtcBV]);
|
||||
object.description = r5;
|
||||
return <PremiumUpsellItem alertWidth={alertWidth} upsellItem={object} />;
|
||||
}
|
||||
|
||||
function AnimatedEmojiUpsell({alertWidth, useTier0Description}) { // fn#63280, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8079:3379, offset: 0x01b79080, size: 248 bytes, params: 2, frame: 23
|
||||
var r5;
|
||||
var property;
|
||||
var moduleValue;
|
||||
const object = {};
|
||||
object.image = importDefault(7884) /* metro dependency 7884 */;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const F6rmyq = t.F6rmyq;
|
||||
object.title = Reflect.apply(string, intl, [F6rmyq]);
|
||||
const format = intl.format;
|
||||
if (useTier0Description) {
|
||||
property = t['1a36ee'];
|
||||
moduleValue = require(3802) /* metro dependency 3802: PremiumUtils */;
|
||||
r5 = Reflect.apply(format, intl, [property,
|
||||
{planName: moduleValue.getPremiumTypeDisplayName(PremiumTypes.TIER_0)}]);
|
||||
} else {
|
||||
r5 = Reflect.apply(format, intl, [t.JxTzzb, {}]);
|
||||
}
|
||||
object.description = r5;
|
||||
return <PremiumUpsellItem alertWidth={alertWidth} upsellItem={object} />;
|
||||
}
|
||||
|
||||
function PremiumGuildIdentityUpsell({alertWidth}) { // fn#63281, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8079:3719, offset: 0x01b79178, size: 286 bytes, params: 2, frame: 20
|
||||
const value2 = (require(4501) /* metro dependency 4501: createStyles */).useLegacyClassComponentStyles(env0_22);
|
||||
const value3 = (importDefault(4048) /* metro dependency 4048: useTheme */)();
|
||||
const largerUpsellImage = value2.largerUpsellImage;
|
||||
const object = {};
|
||||
object.image = (require(4002) /* metro dependency 4002: shared */).isThemeDark(value3) ? importDefault(7929) /* metro dependency 7929 */ : importDefault(7930) /* metro dependency 7930 */;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const OVN9la = (require(1244) /* metro dependency 1244: indexNative */).t.OVN9la;
|
||||
object.title = Reflect.apply(string, intl, [OVN9la]);
|
||||
object.description = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.j0dyAG);
|
||||
return (
|
||||
<PremiumUpsellItem
|
||||
alertWidth={alertWidth}
|
||||
imageStyle={largerUpsellImage}
|
||||
upsellItem={object}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function CustomProfilesUpsell({alertWidth}) { // fn#63282, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8079:4065, offset: 0x01b79296, size: 214 bytes, params: 2, frame: 20
|
||||
const customProfileUpsellImage = (require(4501) /* metro dependency 4501: createStyles */).useLegacyClassComponentStyles(env0_22).customProfileUpsellImage;
|
||||
const object = {};
|
||||
object.image = importDefault(7931) /* metro dependency 7931 */;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.rTY76D);
|
||||
object.description = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['2LCxoj']);
|
||||
return (
|
||||
<PremiumUpsellItem
|
||||
alertWidth={alertWidth}
|
||||
imageStyle={customProfileUpsellImage}
|
||||
upsellItem={object}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function CustomAppIconsUpsell({alertWidth, imageSource}) { // fn#63283, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8079:4369, offset: 0x01b7936c, size: 320 bytes, params: 2, frame: 20
|
||||
const value3 = (require(4501) /* metro dependency 4501: createStyles */).useLegacyClassComponentStyles(env0_22);
|
||||
const iconSource = getIcons().filter(function(a0) {
|
||||
return a0.isPremium;
|
||||
})[0].iconSource;
|
||||
const isThemeLight2 = (require(4002) /* metro dependency 4002: shared */).isThemeLight((importDefault(4048) /* metro dependency 4048: useTheme */)());
|
||||
const items2 = [value3.customAppIconsUpsellImage];
|
||||
items2[1] = isThemeLight2 ? value3.customAppIconUpsellLightImage : undefined;
|
||||
const object = {};
|
||||
object.image = imageSource ?? iconSource;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let string = intl.string;
|
||||
object.title = Reflect.apply(string, intl, [(require(1244) /* metro dependency 1244: indexNative */).t['1B1Cyn']]);
|
||||
string = intl.string;
|
||||
const VL5TYT = (require(1244) /* metro dependency 1244: indexNative */).t.VL5TYT;
|
||||
object.description = Reflect.apply(string, intl, [VL5TYT]);
|
||||
return (
|
||||
<PremiumUpsellItem
|
||||
alertWidth={alertWidth}
|
||||
imageStyle={items2}
|
||||
upsellItem={object}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function GlobalStickerUpsell({alertWidth, useTier0Description}) { // fn#63285, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8079:4825, offset: 0x01b794b7, size: 252 bytes, params: 2, frame: 23
|
||||
var r5;
|
||||
var property;
|
||||
var moduleValue;
|
||||
const object = {};
|
||||
object.image = importDefault(7932) /* metro dependency 7932 */;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
object.title = Reflect.apply(string, intl, [t.jn2mBl]);
|
||||
const format = intl.format;
|
||||
if (useTier0Description) {
|
||||
property = t['8C+FZk'];
|
||||
moduleValue = require(3802) /* metro dependency 3802: PremiumUtils */;
|
||||
r5 = Reflect.apply(format, intl, [property,
|
||||
{planName: moduleValue.getPremiumTypeDisplayName(PremiumTypes.TIER_0)}]);
|
||||
} else {
|
||||
r5 = Reflect.apply(format, intl, [t['0qJYHK'], {}]);
|
||||
}
|
||||
object.description = r5;
|
||||
return <PremiumUpsellItem alertWidth={alertWidth} upsellItem={object} />;
|
||||
}
|
||||
|
||||
function LongerMessageUpsell({alertWidth}) { // fn#63286, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8079:5168, offset: 0x01b795b3, size: 310 bytes, params: 2, frame: 21
|
||||
const value2 = (require(4501) /* metro dependency 4501: createStyles */).useLegacyClassComponentStyles(env0_22);
|
||||
const value3 = (importDefault(4048) /* metro dependency 4048: useTheme */)();
|
||||
const value4 = (importDefault(7875) /* metro dependency 7875: useMessageMaxLength */)();
|
||||
const largerUpsellImage = value2.largerUpsellImage;
|
||||
const object = {};
|
||||
object.image = (require(4002) /* metro dependency 4002: shared */).isThemeDark(value3) ? importDefault(7933) /* metro dependency 7933 */ : importDefault(7934) /* metro dependency 7934 */;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['8cjmTj']);
|
||||
object.description = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.moN9wh,
|
||||
{maxLength: value4});
|
||||
return (
|
||||
<PremiumUpsellItem
|
||||
alertWidth={alertWidth}
|
||||
imageStyle={largerUpsellImage}
|
||||
upsellItem={object}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function GuildCapUpsell({alertWidth}) { // fn#63287, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8079:5550, offset: 0x01b796e9, size: 289 bytes, params: 2, frame: 20
|
||||
const value2 = (require(4501) /* metro dependency 4501: createStyles */).useLegacyClassComponentStyles(env0_22);
|
||||
const value3 = (importDefault(4048) /* metro dependency 4048: useTheme */)();
|
||||
const largerUpsellImage = value2.largerUpsellImage;
|
||||
const object = {};
|
||||
object.image = (require(4002) /* metro dependency 4002: shared */).isThemeDark(value3) ? importDefault(7935) /* metro dependency 7935 */ : importDefault(7936) /* metro dependency 7936 */;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['CoNXB+']);
|
||||
object.description = intl.format((require(1244) /* metro dependency 1244: indexNative */).t.mkXb2F, {});
|
||||
return (
|
||||
<PremiumUpsellItem
|
||||
alertWidth={alertWidth}
|
||||
imageStyle={largerUpsellImage}
|
||||
upsellItem={object}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function UploadUpsell({item, alertWidth}) { // fn#63288, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8079:5890, offset: 0x01b7980a, size: 351 bytes, params: 2, frame: 27
|
||||
var r5;
|
||||
var TableSwitchRow;
|
||||
var object3;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const dataSavingMode = (require(566) /* metro dependency 566: flux */).useStateFromStores([UnsyncedUserSettingsStore],
|
||||
function() {
|
||||
return UnsyncedUserSettingsStore.dataSavingMode;
|
||||
});
|
||||
let binding = env0_9;
|
||||
const property = env0_3(binding.useState(!dataSavingMode), 1)[0];
|
||||
const jsxRuntimeEnv0_21Binding = jsxRuntimeEnv0_21;
|
||||
binding = env0_23;
|
||||
const UPLOAD = UpsellTypes.UPLOAD;
|
||||
const binding2 = ((Component) => <Component isInitial upsellItem={item} alertWidth={alertWidth} key={UPLOAD} />)(binding);
|
||||
if (property) {
|
||||
TableSwitchRow = (require(6808) /* metro dependency 6808: TableSwitchRowNative */).TableSwitchRow;
|
||||
r5 = <TableSwitchRow start end label={intl.string(t.ix8XIj)} subLabel={intl.string(t['wC0+Ph'])} value={dataSavingMode} onValueChange={onValueChange_63290} />;
|
||||
} else {
|
||||
r5 = null;
|
||||
}
|
||||
return (
|
||||
<>
|
||||
{binding2}
|
||||
{r5}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun63291(a0) { // fn#63291, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8079:1380, offset: 0x01b799a8, size: 68 bytes, params: 2, frame: 15
|
||||
const closure = UpsellItem;
|
||||
env0_8(closure, a0);
|
||||
return env0_5(closure, [{key: 'render', value: value_63293}]);
|
||||
}
|
||||
|
||||
function PremiumUpsellAlert({initialUpsellKey, analyticsLocation, analyticsLocations, analyticsProperties, onClose, imageSource}) { // fn#63294, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8079:6433, offset: 0x01b79b19, size: 615 bytes, params: 2, frame: 27
|
||||
var object2;
|
||||
const env0_3 = (require(4501) /* metro dependency 4501: createStyles */).useLegacyClassComponentStyles(env0_22);
|
||||
const {width, height} = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)();
|
||||
const Math = global.Math;
|
||||
const min = Math.min;
|
||||
const Math2 = global.Math;
|
||||
const env0_4 = Reflect.apply(min, Math, [0.9 * Math2.min(width, height), 500]) - 32;
|
||||
const env0_5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
|
||||
return UserStore.getCurrentUser();
|
||||
});
|
||||
const env0_6 = generateUpsellItems(initialUpsellKey);
|
||||
let defaultImport = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
|
||||
const PREMIUM_UPSELL_ALERT = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).PREMIUM_UPSELL_ALERT;
|
||||
analyticsLocations = defaultImport(analyticsLocations, PREMIUM_UPSELL_ALERT).analyticsLocations;
|
||||
(importDefault(4594) /* metro dependency 4594: useMountEffect */)(function() {
|
||||
var defaultImport = importDefault(dependencyMap[42]);
|
||||
var OPEN_MODAL = AnalyticEvents.OPEN_MODAL;
|
||||
defaultImport.track(OPEN_MODAL, {type: 'Nitro Upsell', location: analyticsLocation});
|
||||
});
|
||||
const {useTier0UpsellContent, getNitroText,
|
||||
onViewAllPerks} = (require(7882) /* metro dependency 7882: PremiumUpsellUtils */).usePremiumUpsellConfig(initialUpsellKey,
|
||||
analyticsLocations, analyticsLocation);
|
||||
object2 = {analyticsLocation: analyticsLocation, analyticsProperties: analyticsProperties,
|
||||
useTier0UpsellContent: useTier0UpsellContent};
|
||||
const env0_9 = object2;
|
||||
const env0_10 = env0_9.useRef(object2);
|
||||
env0_9.useEffect(_fun63300);
|
||||
env0_9.useEffect(_fun63301, [analyticsLocations]);
|
||||
const alert = importDefault(4596) /* metro dependency 4596: Alert */;
|
||||
object2 = {};
|
||||
const ButtonColors = (require(1305) /* metro dependency 1305: native */).ButtonColors;
|
||||
const GREEN = ButtonColors.GREEN;
|
||||
object2.confirmColor = GREEN;
|
||||
object2.confirmText = getNitroText;
|
||||
object2.renderConfirmIcon = renderConfirmIcon;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object2.cancelText = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq);
|
||||
object2.onClose = onClose;
|
||||
object2.onConfirm = onViewAllPerks;
|
||||
return ((Component) => <Component {...object2}>{_fun63303()}</Component>)(alert);
|
||||
}
|
||||
|
||||
function UploadUpsellOnValueChange(a0) { // fn#63290, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8079:6268, owner: UploadUpsell.onValueChange, offset: 0x01b79978, size: 48 bytes, params: 2, frame: 13
|
||||
const value = environment.__proto__;
|
||||
(importDefault(7896) /* metro dependency 7896: UserSettingsActionCreators */).updatedUnsyncedSettings({dataSavingMode: a0});
|
||||
}
|
||||
|
||||
function value_63293() { // fn#63293, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8079:1656, offset: 0x01b799ec, size: 301 bytes, params: 1, frame: 25
|
||||
const value2 = env1_22(this.context);
|
||||
const {upsellItem, alertWidth, isInitial} = this.props;
|
||||
const image = upsellItem.image;
|
||||
const activeTitle = upsellItem.activeTitle;
|
||||
const passiveTitle = upsellItem.passiveTitle;
|
||||
const description = upsellItem.description;
|
||||
const items3 = [value2.upsellContainer];
|
||||
items3[1] = {width: alertWidth};
|
||||
const items2 = [<Image style={value2.upsellImage} source={image} resizeMode="contain" />];
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
items2[1] = <Text style={value2.upsellTitle} variant="text-md/medium" color="mobile-text-heading-primary">{isInitial ? activeTitle : passiveTitle}</Text>;
|
||||
items2[2] = <Text style={value2.upsellDescription} variant="text-sm/medium">{description}</Text>;
|
||||
return (
|
||||
<View style={items3}>
|
||||
{items2}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function getUploadAlertDescription() { // fn#63295, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8079:7151, owner: PremiumUpsellAlert.getUploadAlertDescription, offset: 0x01b79d80, size: 331 bytes, params: 1, frame: 22
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var object2;
|
||||
var getMaxFileSizeForPremiumType;
|
||||
var formatToPlainString;
|
||||
var Z7Xb7H;
|
||||
var getPremiumTypeDisplayName;
|
||||
var TIER_0;
|
||||
var value;
|
||||
if (useTier0UpsellContent) {
|
||||
formatToPlainString = intl.formatToPlainString;
|
||||
Z7Xb7H = t.Z7Xb7H;
|
||||
object2 = {};
|
||||
value = require(3802) /* metro dependency 3802: PremiumUtils */;
|
||||
getPremiumTypeDisplayName = value.getPremiumTypeDisplayName;
|
||||
TIER_0 = PremiumTypes.TIER_0;
|
||||
object2.premiumPlan = Reflect.apply(getPremiumTypeDisplayName, value, [TIER_0]);
|
||||
value = require(3802) /* metro dependency 3802: PremiumUtils */;
|
||||
getMaxFileSizeForPremiumType = value.getMaxFileSizeForPremiumType;
|
||||
TIER_0 = PremiumTypes.TIER_0;
|
||||
object2.premiumMaxSize = Reflect.apply(getMaxFileSizeForPremiumType, value, [TIER_0]);
|
||||
return Reflect.apply(formatToPlainString, intl, [Z7Xb7H, object2]);
|
||||
}
|
||||
value = (require(7937) /* metro dependency 7937: PremiumFeatureUtils */).getUserMaxFileSize(currentUser);
|
||||
const BYTE_IN_KB = (require(4136) /* metro dependency 4136: FileSizeUtils */).BYTE_IN_KB;
|
||||
value /= BYTE_IN_KB;
|
||||
const format = intl.format;
|
||||
const DUT5IC = t.DUT5IC;
|
||||
object2 = {};
|
||||
object2.maxUploadStandard = (require(4136) /* metro dependency 4136: FileSizeUtils */).formatSize(value,
|
||||
{useKibibytes: true});
|
||||
value = require(3802) /* metro dependency 3802: PremiumUtils */;
|
||||
getMaxFileSizeForPremiumType = value.getMaxFileSizeForPremiumType;
|
||||
const TIER_2 = PremiumTypes.TIER_2;
|
||||
object2.maxUploadPremium = Reflect.apply(getMaxFileSizeForPremiumType, value, [TIER_2]);
|
||||
return Reflect.apply(format, intl, [DUT5IC, object2]);
|
||||
}
|
||||
|
||||
function generateUpsellItems(a0) { // fn#63297, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8079:6722, owner: PremiumUpsellAlert.generateUpsellItems, offset: 0x01b79edd, size: 62 bytes, params: 2, frame: 12
|
||||
var environment;
|
||||
const env0_0 = a0;
|
||||
let value = environment.__proto__;
|
||||
value = require(7882) /* metro dependency 7882: PremiumUpsellUtils */;
|
||||
value = value.getUpsellItems();
|
||||
return value.sort(_fun63298);
|
||||
}
|
||||
|
||||
function _fun63300() { // fn#63300, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8079:7625, offset: 0x01b79f80, size: 21 bytes, params: 1, frame: 2
|
||||
env0_10.current = env0_9;
|
||||
}
|
||||
|
||||
function _fun63301() { // fn#63301, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8079:7658, offset: 0x01b79f95, size: 139 bytes, params: 1, frame: 19
|
||||
const {analyticsLocation, analyticsProperties, useTier0UpsellContent} = env0_10.current;
|
||||
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
const track = defaultImport.track;
|
||||
const PREMIUM_UPSELL_VIEWED = AnalyticEvents.PREMIUM_UPSELL_VIEWED;
|
||||
const object2 = {};
|
||||
copyDataProperties(object2, analyticsProperties, analyticsLocation);
|
||||
object2['location'] = analyticsLocation;
|
||||
object2['location_stack'] = analyticsLocations;
|
||||
object2['sku_id'] = useTier0UpsellContent ? PremiumSubscriptionSKUs.TIER_0 : PremiumSubscriptionSKUs.TIER_2;
|
||||
Reflect.apply(track, defaultImport, [PREMIUM_UPSELL_VIEWED, object2]);
|
||||
}
|
||||
|
||||
function renderConfirmIcon() { // fn#63302, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8079:7945, owner: PremiumUpsellAlert.renderConfirmIcon, offset: 0x01b7a020, size: 158 bytes, params: 1, frame: 17
|
||||
const value3 = ((Component) => <Component source={importDefault(7938) /* metro dependency 7938 */} style={env0_3.nitroWheel} resizeMode="contain" />)(importDefault(5475) /* metro dependency 5475: FastImage */);
|
||||
const initialUpsellKeyBinding = initialUpsellKey;
|
||||
const GLOBAL_EMOJI = UpsellTypes.GLOBAL_EMOJI;
|
||||
if (GLOBAL_EMOJI === initialUpsellKeyBinding) {
|
||||
return value3;
|
||||
}
|
||||
const ANIMATED_EMOJI = UpsellTypes.ANIMATED_EMOJI;
|
||||
if (ANIMATED_EMOJI === initialUpsellKeyBinding) {
|
||||
return value3;
|
||||
}
|
||||
const CUSTOM_PROFILES = UpsellTypes.CUSTOM_PROFILES;
|
||||
if (CUSTOM_PROFILES === initialUpsellKeyBinding) {
|
||||
return value3;
|
||||
}
|
||||
const PREMIUM_GUILD_PROFILE = UpsellTypes.PREMIUM_GUILD_PROFILE;
|
||||
if (PREMIUM_GUILD_PROFILE === initialUpsellKeyBinding) {
|
||||
return value3;
|
||||
}
|
||||
const APP_ICONS = UpsellTypes.APP_ICONS;
|
||||
if (APP_ICONS === initialUpsellKeyBinding) {
|
||||
return value3;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function _fun63303() { // fn#63303, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8079:8266, offset: 0x01b7a0be, size: 695 bytes, params: 1, frame: 22
|
||||
var object;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const Carousel = importDefault(7939) /* metro dependency 7939: Carousel */;
|
||||
const binding = env0_3;
|
||||
const carousel = <Carousel style={binding.carousel} width={env0_4} pageIndicatorStyle={binding.pageIndicatorStyle}>{env0_6.map(_fun63304)}</Carousel>;
|
||||
const initialUpsellKeyBinding = initialUpsellKey;
|
||||
const GLOBAL_EMOJI = UpsellTypes.GLOBAL_EMOJI;
|
||||
if (GLOBAL_EMOJI === initialUpsellKeyBinding) {
|
||||
return <GlobalEmojiUpsell alertWidth={env0_4} useTier0Description={useTier0UpsellContent} />;
|
||||
}
|
||||
const ANIMATED_EMOJI = UpsellTypes.ANIMATED_EMOJI;
|
||||
if (ANIMATED_EMOJI === initialUpsellKeyBinding) {
|
||||
return <AnimatedEmojiUpsell alertWidth={env0_4} useTier0Description={useTier0UpsellContent} />;
|
||||
}
|
||||
const GLOBAL_STICKER = UpsellTypes.GLOBAL_STICKER;
|
||||
if (GLOBAL_STICKER === initialUpsellKeyBinding) {
|
||||
return <GlobalStickerUpsell alertWidth={env0_4} useTier0Description={useTier0UpsellContent} />;
|
||||
}
|
||||
const CUSTOM_PROFILES = UpsellTypes.CUSTOM_PROFILES;
|
||||
if (CUSTOM_PROFILES === initialUpsellKeyBinding) {
|
||||
return <CustomProfilesUpsell alertWidth={env0_4} />;
|
||||
}
|
||||
const APP_ICONS = UpsellTypes.APP_ICONS;
|
||||
if (APP_ICONS === initialUpsellKeyBinding) {
|
||||
return <CustomAppIconsUpsell alertWidth={env0_4} imageSource={imageSource} />;
|
||||
}
|
||||
const PREMIUM_GUILD_PROFILE = UpsellTypes.PREMIUM_GUILD_PROFILE;
|
||||
if (PREMIUM_GUILD_PROFILE === initialUpsellKeyBinding) {
|
||||
return <PremiumGuildIdentityUpsell alertWidth={env0_4} />;
|
||||
}
|
||||
const LONGER_MESSAGE = UpsellTypes.LONGER_MESSAGE;
|
||||
if (LONGER_MESSAGE === initialUpsellKeyBinding) {
|
||||
return <LongerMessageUpsell alertWidth={env0_4} />;
|
||||
}
|
||||
const GUILD_CAP = UpsellTypes.GUILD_CAP;
|
||||
if (GUILD_CAP === initialUpsellKeyBinding) {
|
||||
return <GuildCapUpsell alertWidth={env0_4} />;
|
||||
}
|
||||
const UPLOAD = UpsellTypes.UPLOAD;
|
||||
if (UPLOAD === initialUpsellKeyBinding) {
|
||||
object = {};
|
||||
object.key = UpsellTypes.UPLOAD;
|
||||
object.image = importDefault(7886) /* metro dependency 7886 */;
|
||||
object.activeTitle = intl.string(t['1EOZqw']);
|
||||
object.passiveTitle = intl.string(t.tB51W4);
|
||||
object.description = getUploadAlertDescription();
|
||||
return <UploadUpsell item={object} alertWidth={env0_4} />;
|
||||
}
|
||||
return carousel;
|
||||
}
|
||||
|
||||
function _fun63298({key}) { // fn#63298, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8079:6793, offset: 0x01b79f1b, size: 30 bytes, params: 2, frame: 3
|
||||
return key !== env0_0 ? 1 : -1;
|
||||
}
|
||||
|
||||
function _fun63304(a0) { // fn#63304, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8079:8376, offset: 0x01b7a375, size: 67 bytes, params: 2, frame: 17
|
||||
return ((Component) => <Component isInitial={initialUpsellKey === a0.key} upsellItem={a0} alertWidth={env1_4} key={a0.key} />)(env2_23);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,114 @@
|
||||
/* Metro module 7324; source: components_native/premium/ShineAnimation.tsx; dependencies: [31, 27, 33, 4501, 697, 4017, 4504, 674, 2] */
|
||||
function _fun59009(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#59009, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7502:6, offset: 0x016dded1, size: 410 bytes, params: 8, frame: 24
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
let Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const value2 = require(27) /* metro dependency 27 */;
|
||||
const env0_4 = value2.Image;
|
||||
const StyleSheet = value2.StyleSheet;
|
||||
const env0_5 = value2.View;
|
||||
const value3 = require(33) /* metro dependency 33 */;
|
||||
const env0_6 = value3.jsx;
|
||||
const env0_7 = value3.jsxs;
|
||||
Object = global.Object;
|
||||
const env0_8 = Object.freeze({'FLASH_TIME_PERCENT': 0.72, 'FLASH_DURATION_PERCENT': 0.08});
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
object2 = {};
|
||||
object2.container = {overflow: 'hidden'};
|
||||
const object4 = {};
|
||||
copyDataProperties(object4, StyleSheet.absoluteFillObject, undefined);
|
||||
object2.shineContainer = object4;
|
||||
object2.shine = {'transform': null, 'width': 56, 'flex': 0, 'height': '300%', 'top': '-10%',
|
||||
transform: [{rotate: '30deg'}]};
|
||||
const BACKGROUND_MOD_NORMAL = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_NORMAL;
|
||||
object2.shineInner = {backgroundColor: BACKGROUND_MOD_NORMAL, flex: 1};
|
||||
const env0_9 = Reflect.apply(createStyles, createStylesModule, [object2]);
|
||||
object2 = {code: 'function ShineAnimationTsx1(){const{interpolate,progress}=this.__closure;const widthPercent=interpolate(progress.get(),[0,1],[20,160]);return{width:widthPercent+"%"};}'};
|
||||
object2 = {code: 'function ShineAnimationTsx2(){const{ShineAnimationConfig,interpolateColor,progress,flashStartColor,flashEndColor}=this.__closure;const startTime=ShineAnimationConfig.FLASH_TIME_PERCENT;const duration=ShineAnimationConfig.FLASH_DURATION_PERCENT;return{backgroundColor:interpolateColor(progress.get(),[0,startTime,startTime,startTime+duration,1],[flashStartColor,flashStartColor,flashEndColor,flashEndColor,flashStartColor])};}'};
|
||||
value = value.memo(ShineAnimation);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/premium/ShineAnimation.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function ShineAnimation({source, style}) { // fn#59010, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7502:1124, offset: 0x016de06b, size: 620 bytes, params: 2, frame: 27
|
||||
var object2;
|
||||
const styles = useStyles();
|
||||
const value2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
|
||||
env0_3.useEffect(_fun59011, [value2]);
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
let useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
let closure = ShineAnimationA;
|
||||
closure.__closure = {interpolate: reanimatedRexportModule.interpolate, progress: value2};
|
||||
closure.__workletHash = 4072719467417;
|
||||
closure.__initData = env0_10;
|
||||
const value3 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
const defaultImport = importDefault(674) /* metro dependency 674 */;
|
||||
let BRAND_360 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BRAND_360;
|
||||
const value6 = defaultImport(BRAND_360).alpha(0.2).hex();
|
||||
const defaultImport2 = defaultImport;
|
||||
BRAND_360 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BRAND_360;
|
||||
const value9 = defaultImport2(BRAND_360).alpha(1).hex();
|
||||
const moduleValue3 = reanimatedRexportModule;
|
||||
useAnimatedStyle = moduleValue3.useAnimatedStyle;
|
||||
closure = ShineAnimationE;
|
||||
object2 = {ShineAnimationConfig: env0_8};
|
||||
object2.interpolateColor = reanimatedRexportModule.interpolateColor;
|
||||
object2.progress = value2;
|
||||
object2.flashStartColor = value6;
|
||||
object2.flashEndColor = value9;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 9845866779228;
|
||||
closure.__initData = env0_11;
|
||||
const value10 = Reflect.apply(useAnimatedStyle, moduleValue3, [closure]);
|
||||
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
const items2 = [styles.container, style, value10];
|
||||
const View3 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
return (
|
||||
<View2 style={items2}>
|
||||
<View style={styles.shineContainer}>
|
||||
<View3 style={value3} />
|
||||
<View style={styles.shine}>
|
||||
<View style={styles.shineInner} />
|
||||
</View>
|
||||
</View>
|
||||
<Image source={source} />
|
||||
</View2>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun59011() { // fn#59011, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7502:1219, offset: 0x016de2d7, size: 130 bytes, params: 1, frame: 21
|
||||
const binding = env0_0;
|
||||
const set = binding.set;
|
||||
let value = environment.__proto__;
|
||||
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const withDelay = value.withDelay;
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
Reflect.apply(set, binding, [Reflect.apply(withDelay, value, [400,
|
||||
reanimatedRexportModule.withRepeat((require(4504) /* metro dependency 4504: timing */).withTiming(1,
|
||||
{duration: 1000}), -1, false)])]);
|
||||
}
|
||||
|
||||
function ShineAnimationA() { // fn#59012, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7502:1363, owner: ShineAnimation.A, offset: 0x016de359, size: 109 bytes, params: 1, frame: 16
|
||||
let value = environment.__proto__;
|
||||
value = Reflect.apply((require(4017) /* metro dependency 4017: ReanimatedRexport */).interpolate, value,
|
||||
[env0_0.get(), [0, 1], [20, 160]]);
|
||||
return {width: '' + value + '%'};
|
||||
}
|
||||
|
||||
function ShineAnimationE() { // fn#59013, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7502:1698, owner: ShineAnimation.E, offset: 0x016de3c6, size: 143 bytes, params: 1, frame: 19
|
||||
let value = environment.__proto__;
|
||||
let binding = env1_8;
|
||||
const FLASH_TIME_PERCENT = binding.FLASH_TIME_PERCENT;
|
||||
const FLASH_DURATION_PERCENT = binding.FLASH_DURATION_PERCENT;
|
||||
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const interpolateColor = value.interpolateColor;
|
||||
const value3 = env0_0.get();
|
||||
binding = env0_1;
|
||||
const binding2 = env0_2;
|
||||
return {backgroundColor: Reflect.apply(interpolateColor, value, [value3, [0, FLASH_TIME_PERCENT, FLASH_TIME_PERCENT,
|
||||
FLASH_TIME_PERCENT + FLASH_DURATION_PERCENT, 1], [binding, binding, binding2, binding2, binding]])};
|
||||
}
|
||||
|
||||
+101
@@ -0,0 +1,101 @@
|
||||
/* Metro module 12348; source: components_native/premium/premium_guild_subscribe_modal/PremiumGuildPreview.tsx; dependencies: [31, 27, 1310, 661, 33, 4501, 697, 6235, 4002, 12349, 12350, 12351, 12352, 12353, 12354, 12355, 12356, 1305, 8249, 566, 6819, 2] */
|
||||
function _fun94223(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#94223, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12534:6, offset: 0x020f17d9, size: 504 bytes, params: 8, frame: 23
|
||||
var object3;
|
||||
const env0_0 = require;
|
||||
const getThemedImageSource = function(a0, a1, a2) {
|
||||
return require(dependencyMap[8]).isThemeDark(a0) ? a1 : a2;
|
||||
};
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_3 = value.View;
|
||||
const env0_4 = value.Image;
|
||||
const themeStore = importDefault(1310) /* metro dependency 1310: ThemeStore */;
|
||||
const env0_6 = (require(661) /* metro dependency 661: Constants */).BoostedGuildTiers;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_7 = value.jsx;
|
||||
const env0_8 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object3 = {};
|
||||
const object4 = {'padding': 16, 'borderRadius': null, 'flexDirection': 'row'};
|
||||
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
|
||||
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
|
||||
object4.backgroundColor = BACKGROUND_SURFACE_HIGH;
|
||||
object3.guild = object4;
|
||||
object3.guildInfo = {marginLeft: 16};
|
||||
const DARK_WHITE_500_LIGHT_BLACK_500 = (require(6235) /* metro dependency 6235: LegacyTokens */).DARK_WHITE_500_LIGHT_BLACK_500;
|
||||
object3.guildName = {'fontSize': 16, 'lineHeight': 20, color: DARK_WHITE_500_LIGHT_BLACK_500};
|
||||
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
||||
object3.tierPill = {'marginTop': 8, 'padding': 4, 'paddingRight': 8, 'alignSelf': 'flex-start',
|
||||
'flexDirection': 'row', 'borderRadius': 11, backgroundColor: BACKGROUND_BASE_LOW};
|
||||
object3.tierPillImage = {'width': 16, 'height': 16};
|
||||
const DARK_WHITE_500_LIGHT_PRIMARY_660 = (require(6235) /* metro dependency 6235: LegacyTokens */).DARK_WHITE_500_LIGHT_PRIMARY_660;
|
||||
object3.tierPillText = {'fontSize': 12, 'lineHeight': 16, 'marginLeft': 4, color: DARK_WHITE_500_LIGHT_PRIMARY_660};
|
||||
const env0_9 = Reflect.apply(createStyles, value, [object3]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/premium/premium_guild_subscribe_modal/PremiumGuildPreview.tsx');
|
||||
exports.default = PremiumGuildPreview;
|
||||
}
|
||||
|
||||
function getTierIcon_94225(a0, a1) { // fn#94225, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12534:822, offset: 0x020f1a06, size: 263 bytes, params: 3, frame: 18
|
||||
const NONE = BoostedGuildTiers.NONE;
|
||||
if (NONE === a1) {
|
||||
return getThemedImageSource(a0, importDefault(12349) /* metro dependency 12349 */,
|
||||
importDefault(12350) /* metro dependency 12350 */);
|
||||
}
|
||||
const TIER_1 = BoostedGuildTiers.TIER_1;
|
||||
if (TIER_1 === a1) {
|
||||
return getThemedImageSource(a0, importDefault(12351) /* metro dependency 12351 */,
|
||||
importDefault(12352) /* metro dependency 12352 */);
|
||||
}
|
||||
const TIER_2 = BoostedGuildTiers.TIER_2;
|
||||
if (TIER_2 === a1) {
|
||||
return getThemedImageSource(a0, importDefault(12353) /* metro dependency 12353 */,
|
||||
importDefault(12354) /* metro dependency 12354 */);
|
||||
}
|
||||
const TIER_3 = BoostedGuildTiers.TIER_3;
|
||||
if (TIER_3 === a1) {
|
||||
return getThemedImageSource(a0, importDefault(12355) /* metro dependency 12355 */,
|
||||
importDefault(12356) /* metro dependency 12356 */);
|
||||
}
|
||||
}
|
||||
|
||||
function PremiumGuildTierPill({tier, theme}) { // fn#94226, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12534:1108, offset: 0x020f1b0d, size: 187 bytes, params: 2, frame: 21
|
||||
const styles = useStyles();
|
||||
const image = <Image style={styles.tierPillImage} source={getTierIcon_94225(theme, tier)} />;
|
||||
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
|
||||
return (
|
||||
<View style={styles.tierPill}>
|
||||
{image}
|
||||
<LegacyText style={styles.tierPillText}>
|
||||
{(require(8249) /* metro dependency 8249: GuildBoostingUtils */).getTierName(tier)}
|
||||
</LegacyText>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function PremiumGuildPreview({guild, style}) { // fn#94227, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12534:1346, offset: 0x020f1bc8, size: 320 bytes, params: 2, frame: 25
|
||||
const styles = useStyles();
|
||||
const theme = (require(566) /* metro dependency 566: flux */).useStateFromStores([ThemeStore], function() {
|
||||
return ThemeStore.theme;
|
||||
});
|
||||
const items2 = [styles.guild, style];
|
||||
const GuildIcon = importDefault(6819) /* metro dependency 6819: GuildIcon */;
|
||||
const GuildIconSizes = (require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes;
|
||||
const LARGE = GuildIconSizes.LARGE;
|
||||
const guildIcon = <GuildIcon guild={guild} size={LARGE} selected={false} />;
|
||||
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
|
||||
return (
|
||||
<View style={items2}>
|
||||
{guildIcon}
|
||||
<View style={styles.guildInfo}>
|
||||
<LegacyText style={styles.guildName}>
|
||||
{guild.name}
|
||||
</LegacyText>
|
||||
<PremiumGuildTierPill tier={guild.premiumTier} theme={theme} />
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
/* Metro module 6524; source: components_native/premium/premium_guild_subscribe_modal/PremiumGuildSubscribeConstants.tsx; dependencies: [2] */
|
||||
function _fun51283(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#51283, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6702:6, offset: 0x0122de93, size: 114 bytes, params: 8, frame: 16
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/premium/premium_guild_subscribe_modal/PremiumGuildSubscribeConstants.tsx');
|
||||
exports.PremiumGuildSubscribeModalScenes = {GUILD_SELECT: 'guild_select', OVERVIEW: 'overview',
|
||||
CONFIRMATION: 'confirmation'};
|
||||
}
|
||||
|
||||
+193
@@ -0,0 +1,193 @@
|
||||
/* Metro module 6523; source: components_native/premium/premium_guild_subscribe_modal/PremiumGuildSubscribeModal.tsx; dependencies: [57, 31, 1310, 6524, 661, 33, 6525, 5282, 6522, 5277, 4002, 7000, 7001, 7002, 1244, 7004, 7007, 1305, 7009, 12345, 6518, 4571, 5280, 2] */
|
||||
function _fun51271(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#51271, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6701:6, offset: 0x0122d74b, size: 216 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
const themeStore = importDefault(1310) /* metro dependency 1310: ThemeStore */;
|
||||
const env0_6 = (require(6524) /* metro dependency 6524: PremiumGuildSubscribeConstants */).PremiumGuildSubscribeModalScenes;
|
||||
const env0_7 = (require(661) /* metro dependency 661: Constants */).UserSettingsSections;
|
||||
const env0_8 = (require(33) /* metro dependency 33 */).jsx;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/premium/premium_guild_subscribe_modal/PremiumGuildSubscribeModal.tsx');
|
||||
exports.default = PremiumGuildSubscribeModal;
|
||||
}
|
||||
|
||||
function PremiumGuildSubscribeModal({guildId, guildBoostSlots, intent, onResult}) { // fn#51272, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6701:345, offset: 0x0122d823, size: 297 bytes, params: 2, frame: 21
|
||||
const {initialStack, screens} = (importDefault(6518) /* metro dependency 6518: useInitialValue */)(_fun51273);
|
||||
const binding = env0_4;
|
||||
const useState = binding.useState;
|
||||
const value4 = onResult(Reflect.apply(useState, binding, [initialStack[0].name]), 2);
|
||||
const property = value4[0];
|
||||
const env0_5 = value4[1];
|
||||
const defaultImport2 = importDefault(4571) /* metro dependency 4571: useBackPressHandler */;
|
||||
const useCallback = binding.useCallback;
|
||||
defaultImport2(Reflect.apply(useCallback, binding, [_fun51281, [property]]));
|
||||
const Navigator = (require(5280) /* metro dependency 5280: NavigatorNative */).Navigator;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
return (
|
||||
<Navigator
|
||||
screens={screens}
|
||||
initialRouteStack={initialStack}
|
||||
headerBackTitle={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['13/7kX'])}
|
||||
onStateChange={onStateChange}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun51273() { // fn#51273, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6701:448, offset: 0x0122d94c, size: 290 bytes, params: 1, frame: 14
|
||||
var environment;
|
||||
var push;
|
||||
var value2;
|
||||
var value3;
|
||||
var value4;
|
||||
const items2 = [];
|
||||
if (guildId == null) {
|
||||
if (guildId != null) {
|
||||
push = items2.push;
|
||||
value3 = environment.__proto__;
|
||||
Reflect.apply(push, items2, [{name: PremiumGuildSubscribeModalScenes.OVERVIEW, params: {guildId: guildId,
|
||||
guildBoostSlots: guildBoostSlots, intent: intent, onResult: onResult}}]);
|
||||
} else {
|
||||
push = items2.push;
|
||||
value2 = environment.__proto__;
|
||||
Reflect.apply(push, items2, [{name: PremiumGuildSubscribeModalScenes.GUILD_SELECT,
|
||||
params: {guildBoostSlots: guildBoostSlots, intent: intent, onResult: onResult}}]);
|
||||
}
|
||||
} else if (guildBoostSlots == null) {
|
||||
if (guildId != null) {
|
||||
push = items2.push;
|
||||
value3 = environment.__proto__;
|
||||
Reflect.apply(push, items2, [{name: PremiumGuildSubscribeModalScenes.OVERVIEW, params: {guildId: guildId,
|
||||
guildBoostSlots: guildBoostSlots, intent: intent, onResult: onResult}}]);
|
||||
} else {
|
||||
push = items2.push;
|
||||
value2 = environment.__proto__;
|
||||
Reflect.apply(push, items2, [{name: PremiumGuildSubscribeModalScenes.GUILD_SELECT,
|
||||
params: {guildBoostSlots: guildBoostSlots, intent: intent, onResult: onResult}}]);
|
||||
}
|
||||
} else if (guildBoostSlots.length > 0) {
|
||||
push = items2.push;
|
||||
value4 = environment.__proto__;
|
||||
Reflect.apply(push, items2, [{name: PremiumGuildSubscribeModalScenes.CONFIRMATION, params: {guildId: guildId,
|
||||
guildBoostSlots: guildBoostSlots, intent: intent, onResult: onResult}}]);
|
||||
} else if (guildId != null) {
|
||||
push = items2.push;
|
||||
value3 = environment.__proto__;
|
||||
Reflect.apply(push, items2, [{name: PremiumGuildSubscribeModalScenes.OVERVIEW, params: {guildId: guildId,
|
||||
guildBoostSlots: guildBoostSlots, intent: intent, onResult: onResult}}]);
|
||||
} else {
|
||||
push = items2.push;
|
||||
value2 = environment.__proto__;
|
||||
Reflect.apply(push, items2, [{name: PremiumGuildSubscribeModalScenes.GUILD_SELECT,
|
||||
params: {guildBoostSlots: guildBoostSlots, intent: intent, onResult: onResult}}]);
|
||||
}
|
||||
return {initialStack: items2, screens: getScreens_51274()};
|
||||
}
|
||||
|
||||
function _fun51281() { // fn#51281, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6701:1879, offset: 0x0122de1e, size: 63 bytes, params: 1, frame: 12
|
||||
var r0;
|
||||
const binding = env0_4;
|
||||
let value = environment.__proto__;
|
||||
const GUILD_SELECT = PremiumGuildSubscribeModalScenes.GUILD_SELECT;
|
||||
const value2 = binding === GUILD_SELECT;
|
||||
if (value2) {
|
||||
value = require(6522) /* metro dependency 6522: BoostingActionCreators */;
|
||||
value.closeApplyBoostModal();
|
||||
value = true;
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = value2;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function PremiumGuildSubscribeModalOnStateChange(a0) { // fn#51282, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6701:2071, owner: PremiumGuildSubscribeModal.onStateChange, offset: 0x0122de5d, size: 54 bytes, params: 2, frame: 13
|
||||
const value = undefined;
|
||||
const r1 = a0 == null ? value : a0.routes[a0.index];
|
||||
if (r1 != null) {
|
||||
env0_5(r1.name);
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
function getScreens_51274() { // fn#51274, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6701:777, offset: 0x0122da6e, size: 257 bytes, params: 1, frame: 21
|
||||
var environment;
|
||||
const object2 = {};
|
||||
let value = environment.__proto__.__proto__;
|
||||
const GUILD_SELECT = PremiumGuildSubscribeModalScenes.GUILD_SELECT;
|
||||
object2[GUILD_SELECT] = {headerShown: false, render: render_51275};
|
||||
const OVERVIEW = PremiumGuildSubscribeModalScenes.OVERVIEW;
|
||||
value = require(5282) /* metro dependency 5282: NavigatorHeaderNative */;
|
||||
const getHeaderCloseButton = value.getHeaderCloseButton;
|
||||
const closeApplyBoostModal = (require(6522) /* metro dependency 6522: BoostingActionCreators */).closeApplyBoostModal;
|
||||
object2[OVERVIEW] = {headerLeft: Reflect.apply(getHeaderCloseButton, value, [closeApplyBoostModal]),
|
||||
headerRight: headerRight_51276, headerTitle: headerTitle_51278, render: render_51279};
|
||||
const CONFIRMATION = PremiumGuildSubscribeModalScenes.CONFIRMATION;
|
||||
const object3 = {};
|
||||
object3.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton(closeApplyBoostModal);
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const VJEVbu = (require(1244) /* metro dependency 1244: indexNative */).t.VJEVbu;
|
||||
object3.headerTitle = Reflect.apply(string, intl, [VJEVbu]);
|
||||
object3.render = render_51280;
|
||||
object2[CONFIRMATION] = object3;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function getScreens_51274Render(a0) { // fn#51275, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6701:846, owner: getScreens_51274.render, offset: 0x0122db6f, size: 49 bytes, params: 2, frame: 14
|
||||
const value = environment.__proto__.__proto__.__proto__;
|
||||
return ((Component) => <Component {...a0} />)(importDefault(6525) /* metro dependency 6525: SubscribeModalGuildSelect */);
|
||||
}
|
||||
|
||||
function getScreens_51274HeaderRight() { // fn#51276, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6701:964, owner: getScreens_51274.headerRight, offset: 0x0122dba0, size: 260 bytes, params: 1, frame: 19
|
||||
const HeaderActionButton = (require(5277) /* metro dependency 5277: HeaderActionButtonNative */).HeaderActionButton;
|
||||
const object2 = {};
|
||||
const sharedModule = require(4002) /* metro dependency 4002: shared */;
|
||||
object2.source = sharedModule.isThemeDark(ThemeStore.theme) ? importDefault(7000) /* metro dependency 7000 */ : importDefault(7001) /* metro dependency 7001 */;
|
||||
const SettingsIcon = (require(7002) /* metro dependency 7002: SettingsIcon */).SettingsIcon;
|
||||
object2.IconComponent = SettingsIcon;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object2.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['3D5yo/']);
|
||||
object2.accessibilityHint = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['+CbP2v']);
|
||||
object2.onPress = onPress_51277;
|
||||
return <HeaderActionButton {...object2} />;
|
||||
}
|
||||
|
||||
function getScreens_51274HeaderTitle({children}) { // fn#51278, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6701:1412, owner: getScreens_51274.headerTitle, offset: 0x0122dd15, size: 167 bytes, params: 2, frame: 20
|
||||
const value = environment.__proto__.__proto__.__proto__;
|
||||
const NavigatorHeader = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).NavigatorHeader;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const VJEVbu = (require(1244) /* metro dependency 1244: indexNative */).t.VJEVbu;
|
||||
return (
|
||||
<NavigatorHeader
|
||||
title={Reflect.apply(string, intl, [VJEVbu])}
|
||||
subtitle={children.length > 0 ? ((LegacyText) => <LegacyText>{children}</LegacyText>)((require(1305) /* metro dependency 1305: native */).LegacyText) : null}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function getScreens_51274Render_51279(a0) { // fn#51279, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6701:1571, owner: getScreens_51274.render, offset: 0x0122ddbc, size: 49 bytes, params: 2, frame: 14
|
||||
const value = environment.__proto__.__proto__.__proto__;
|
||||
return ((Component) => <Component {...a0} />)(importDefault(7009) /* metro dependency 7009: GuildBoostingMarketingOverview */);
|
||||
}
|
||||
|
||||
function getScreens_51274Render_51280(a0) { // fn#51280, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6701:1741, owner: getScreens_51274.render, offset: 0x0122dded, size: 49 bytes, params: 2, frame: 14
|
||||
const value = environment.__proto__.__proto__.__proto__;
|
||||
return ((Component) => <Component {...a0} />)(importDefault(12345) /* metro dependency 12345: SubscribeModalConfirmation */);
|
||||
}
|
||||
|
||||
function headerRightOnPress_51277() { // fn#51277, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6701:1234, owner: getScreens_51274.headerRight.onPress, offset: 0x0122dca4, size: 113 bytes, params: 1, frame: 16
|
||||
let value = environment.__proto__.__proto__.__proto__.__proto__;
|
||||
const userSettingsUtilsModule = require(7004) /* metro dependency 7004: UserSettingsUtils */;
|
||||
const trackUserSettingsPaneViewed = userSettingsUtilsModule.trackUserSettingsPaneViewed;
|
||||
let GUILD_BOOSTING = UserSettingsSections.GUILD_BOOSTING;
|
||||
Reflect.apply(trackUserSettingsPaneViewed, userSettingsUtilsModule, [{destinationPane: GUILD_BOOSTING}]);
|
||||
(require(6522) /* metro dependency 6522: BoostingActionCreators */).closeApplyBoostModal();
|
||||
value = require(7007) /* metro dependency 7007: openUserSettings */;
|
||||
const openUserSettings = value.openUserSettings;
|
||||
GUILD_BOOSTING = UserSettingsSections.GUILD_BOOSTING;
|
||||
Reflect.apply(openUserSettings, value, [{screen: GUILD_BOOSTING}]);
|
||||
}
|
||||
|
||||
+698
@@ -0,0 +1,698 @@
|
||||
/* Metro module 12345; source: components_native/premium/premium_guild_subscribe_modal/SubscribeModalConfirmation.tsx; dependencies: [5, 31, 27, 12346, 1867, 7020, 3808, 661, 7047, 8259, 33, 4501, 4000, 697, 566, 8249, 8947, 4573, 1244, 12347, 12348, 4578, 12357, 4589, 676, 683, 12299, 44, 8251, 4496, 12361, 1962, 2] */
|
||||
function _fun94165(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#94165, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12531:6, offset: 0x020eff99, size: 893 bytes, params: 8, frame: 29
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(5) /* metro dependency 5 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_5 = value.ActivityIndicator;
|
||||
const env0_6 = value.Image;
|
||||
const StyleSheet = value.StyleSheet;
|
||||
const env0_7 = value.View;
|
||||
const env0_8 = value.ScrollView;
|
||||
const appliedGuildBoostStore = importDefault(12346) /* metro dependency 12346: AppliedGuildBoostStore */;
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const guildBoostSlotStore = importDefault(7020) /* metro dependency 7020: GuildBoostSlotStore */;
|
||||
const subscriptionStore = importDefault(3808) /* metro dependency 3808: SubscriptionStore */;
|
||||
value = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_13 = value.AnalyticEvents;
|
||||
const env0_14 = value.AnalyticsObjects;
|
||||
const env0_15 = value.AnalyticsSections;
|
||||
const env0_16 = value.GUILD_BOOST_APPLY_COOLDOWN_DAYS;
|
||||
const env0_17 = (require(7047) /* metro dependency 7047: ColorConstants */).Gradients;
|
||||
const env0_18 = (require(8259) /* metro dependency 8259: GuildPowerupsConstants */).BoostPurchaseIntent;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_19 = value.jsx;
|
||||
const env0_20 = value.jsxs;
|
||||
const env0_21 = value.Fragment;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {content: {'paddingHorizontal': 24, 'marginBottom': 24}, scrollableContent: {'alignItems': 'center',
|
||||
'width': '100%'}, subscribeImage: {'marginTop': 105, 'alignSelf': 'center'}, transferImage: {'marginTop': 65,
|
||||
'alignSelf': 'center'}, header: {'marginTop': 32, 'marginBottom': 8}, transferPreviews: {'marginTop': 16,
|
||||
'width': '100%'}, previewHeader: {'lineHeight': 16, 'marginTop': 16, 'letterSpacing': 0.2},
|
||||
guildPreview: {'marginTop': 8, 'width': '100%'}, blurb: {'lineHeight': 18, 'textAlign': 'center'}};
|
||||
object2.warning = {marginTop: 16};
|
||||
const object4 = {'marginTop': 16, 'padding': 16, 'backgroundColor': null, 'alignItems': 'center',
|
||||
'flexDirection': 'row'};
|
||||
const colorUtilsModule = require(4000) /* metro dependency 4000: ColorUtils */;
|
||||
const hexWithOpacity = colorUtilsModule.hexWithOpacity;
|
||||
let YELLOW_300 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.YELLOW_300;
|
||||
object4.backgroundColor = Reflect.apply(hexWithOpacity, colorUtilsModule, [YELLOW_300, 0.1]);
|
||||
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
|
||||
YELLOW_300 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.YELLOW_300;
|
||||
object4.borderColor = YELLOW_300;
|
||||
object4.borderWidth = StyleSheet.hairlineWidth;
|
||||
object4.width = '100%';
|
||||
object2.pendingCancellation = object4;
|
||||
object2.pendingCancellationMessage = {'marginLeft': 10, 'flexShrink': 1};
|
||||
object2.pendingCancellationIcon = {'flexShrink': 0, 'width': 20, 'height': 20};
|
||||
object2.loading = {marginTop: 32};
|
||||
object2.confirmButton = {'marginTop': 32, 'width': '100%'};
|
||||
const object6 = {padding: 2};
|
||||
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
|
||||
object2.activeTransferGuildCardBorder = object6;
|
||||
const env0_22 = Reflect.apply(createStyles, value, [object2]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/premium/premium_guild_subscribe_modal/SubscribeModalConfirmation.tsx');
|
||||
exports.default = SubscribeModalConfirmation;
|
||||
}
|
||||
|
||||
function PendingCancellationWarning({slots}) { // fn#94166, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12531:1447, offset: 0x020f0316, size: 347 bytes, params: 2, frame: 25
|
||||
var r0;
|
||||
var items2;
|
||||
var Text;
|
||||
var intl;
|
||||
const styles = useStyles();
|
||||
const premiumTypeSubscription = (require(566) /* metro dependency 566: flux */).useStateFromStores([SubscriptionStore],
|
||||
function() {
|
||||
return SubscriptionStore.getPremiumTypeSubscription();
|
||||
});
|
||||
const value2 = slots.filter(_fun94168);
|
||||
if (value2.length === 0) {
|
||||
r0 = null;
|
||||
} else if (premiumTypeSubscription == null) {
|
||||
r0 = null;
|
||||
} else {
|
||||
var viewBindingProps = {style: styles.pendingCancellation};
|
||||
items2 = [<Image style={styles.pendingCancellationIcon} source={importDefault(8947) /* metro dependency 8947 */} />];
|
||||
Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
var textProps = {style: styles.pendingCancellationMessage, variant: 'text-sm/medium'};
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
items2[1] = <Text {...textProps}>{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.SFpsCH,
|
||||
{date: premiumTypeSubscription.currentPeriodEnd, canceledCount: value2.length})}</Text>;
|
||||
r0 = <View {...viewBindingProps}>{items2}</View>;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function SubscribeConfirmation({guild, isModifyingSubscription, slots, onPremiumGuildSubscribe}) { // fn#94169, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12531:1942, offset: 0x020f049a, size: 595 bytes, params: 2, frame: 31
|
||||
const styles = useStyles();
|
||||
const jsxRuntimeEnv0_21Binding = jsxRuntimeEnv0_21;
|
||||
const items3 = [<Image style={styles.subscribeImage} source={importDefault(12347) /* metro dependency 12347 */} />];
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
items3[1] = <Text style={styles.header} variant="heading-lg/extrabold" color="mobile-text-heading-primary">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.yTlZV0)}</Text>;
|
||||
items3[2] = ((Component) => <Component style={styles.guildPreview} guild={guild} />)(importDefault(12348) /* metro dependency 12348: PremiumGuildPreview */);
|
||||
const items2 = [styles.blurb];
|
||||
items2[1] = styles.warning;
|
||||
const format = intl.format;
|
||||
const KPnDlu = (require(1244) /* metro dependency 1244: indexNative */).t.KPnDlu;
|
||||
items3[3] = <Text style={items2} variant="text-sm/medium">{Reflect.apply(format, intl, [KPnDlu,
|
||||
{days: GUILD_BOOST_APPLY_COOLDOWN_DAYS, slotCount: slots.length}])}</Text>;
|
||||
items3[4] = <PendingCancellationWarning slots={slots} />;
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
const formatToPlainString = intl.formatToPlainString;
|
||||
const ZU5x5w = (require(1244) /* metro dependency 1244: indexNative */).t.ZU5x5w;
|
||||
items3[5] = <View style={styles.confirmButton}><Button variant="primary" text={Reflect.apply(formatToPlainString,
|
||||
intl, [ZU5x5w, {slotCount: slots.length}])} onPress={function() {
|
||||
onPremiumGuildSubscribe(false);
|
||||
}} loading={isModifyingSubscription} /></View>;
|
||||
return (
|
||||
<>
|
||||
{items3}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function TransferConfirmation({guild, isModifyingSubscription, previousGuildSubscriptionSlots, onPremiumGuildSubscribe}) { // fn#94171, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12531:2691, offset: 0x020f06ed, size: 1096 bytes, params: 2, frame: 37
|
||||
var r0;
|
||||
var jsxRuntimeEnv0_21Binding;
|
||||
var items3;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var format;
|
||||
var SSA2lu;
|
||||
var length;
|
||||
var previewHeader;
|
||||
var items2;
|
||||
var PremiumGuildPreview;
|
||||
var guildPreview;
|
||||
var ct6oxD;
|
||||
var defaultImport2;
|
||||
const HorizontalGradient = (require(676) /* metro dependency 676: ConstantsIOS */).HorizontalGradient;
|
||||
var Button;
|
||||
var formatToPlainString;
|
||||
var Oh6mxU;
|
||||
const styles = useStyles();
|
||||
const value2 = (require(12357) /* metro dependency 12357: GuildSubscriptionRemoval */).useGuildSubscriptionRemovalSource();
|
||||
const guild2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], _fun94172);
|
||||
if (guild2 == null) {
|
||||
r0 = <ActivityIndicator style={styles.loading} />;
|
||||
} else {
|
||||
jsxRuntimeEnv0_21Binding = jsxRuntimeEnv0_21;
|
||||
items3 = [<Image style={styles.transferImage} source={value2} />];
|
||||
items3[1] = <Text style={styles.header} variant="heading-lg/extrabold" color="mobile-text-heading-primary">{intl.string(t.h92jfS)}</Text>;
|
||||
format = intl.format;
|
||||
SSA2lu = t.SSA2lu;
|
||||
length = previousGuildSubscriptionSlots.length;
|
||||
items3[2] = <Text style={styles.blurb} variant="text-sm/medium">{Reflect.apply(format, intl, [SSA2lu,
|
||||
{slotCount: length, guildCount: 1}])}</Text>;
|
||||
var viewBindingProps = {style: styles.transferPreviews};
|
||||
previewHeader = styles.previewHeader;
|
||||
format = intl.format;
|
||||
items2 = [<Text style={previewHeader} variant="eyebrow" color="text-default">{Reflect.apply(format, intl,
|
||||
[t['5zQYEz'], {guildCount: 1}])}</Text>];
|
||||
PremiumGuildPreview = importDefault(12348) /* metro dependency 12348: PremiumGuildPreview */;
|
||||
guildPreview = styles.guildPreview;
|
||||
items2[1] = <PremiumGuildPreview style={guildPreview} guild={guild2} />;
|
||||
previewHeader = styles.previewHeader;
|
||||
format = intl.format;
|
||||
ct6oxD = t.ct6oxD;
|
||||
length = previousGuildSubscriptionSlots.length;
|
||||
items2[2] = <Text style={previewHeader} variant="eyebrow" color="text-default">{Reflect.apply(format, intl,
|
||||
[ct6oxD,
|
||||
{slotCount: length}])}</Text>;
|
||||
defaultImport2 = importDefault(4589) /* metro dependency 4589 */;
|
||||
guildPreview = styles.guildPreview;
|
||||
items2[3] = ((Component) => <Component style={[guildPreview,
|
||||
styles.activeTransferGuildCardBorder]} start={HorizontalGradient.START} end={HorizontalGradient.END} colors={Gradients.PREMIUM_GUILD}>{((Component) => <Component guild={guild} />)(importDefault(12348) /* metro dependency 12348: PremiumGuildPreview */)}</Component>)(defaultImport2);
|
||||
items3[3] = <View {...viewBindingProps}>{items2}</View>;
|
||||
items3[4] = <PendingCancellationWarning slots={previousGuildSubscriptionSlots} />;
|
||||
var viewBindingProps2 = {style: styles.confirmButton};
|
||||
Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
formatToPlainString = intl.formatToPlainString;
|
||||
Oh6mxU = t.Oh6mxU;
|
||||
length = previousGuildSubscriptionSlots.length;
|
||||
items3[5] = <View {...viewBindingProps2}><Button variant="primary" text={Reflect.apply(formatToPlainString,
|
||||
intl,
|
||||
[Oh6mxU, {slotCount: length}])} onPress={function() {
|
||||
return onPremiumGuildSubscribe(true);
|
||||
}} loading={isModifyingSubscription} /></View>;
|
||||
r0 = <>{items3}</>;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function SubscribeModalConfirmation({guildId, guildBoostSlots, location, intent, onResult}) { // fn#94175, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12531:4379, offset: 0x020f0ba6, size: 504 bytes, params: 2, frame: 25
|
||||
const closure = function() {
|
||||
return _handleSubscribe.apply(this, arguments);
|
||||
};
|
||||
const styles = useStyles();
|
||||
const binding = onResult;
|
||||
const env0_5 = binding.useRef(location);
|
||||
binding.useEffect(_fun94186, [location]);
|
||||
binding.useEffect(_fun94187, []);
|
||||
(importDefault(12299) /* metro dependency 12299: useFetchGuildBoostSlots */)();
|
||||
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
|
||||
return GuildStore.getGuild(guildId);
|
||||
});
|
||||
const isModifyingAppliedBoost = (require(566) /* metro dependency 566: flux */).useStateFromStores([AppliedGuildBoostStore],
|
||||
function() {
|
||||
return AppliedGuildBoostStore.isModifyingAppliedBoost;
|
||||
});
|
||||
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([GuildBoostSlotStore],
|
||||
_fun94190);
|
||||
return value2.length === 0 ? <ActivityIndicator style={styles.loading} /> : <View><ScrollView contentContainerStyle={styles.scrollableContent} style={styles.content}>{value2.some(function(a0) {
|
||||
return a0.premiumGuildSubscription != null;
|
||||
}) ? <TransferConfirmation guild={guild} onPremiumGuildSubscribe={closure} previousGuildSubscriptionSlots={value2} isModifyingSubscription={isModifyingAppliedBoost} /> : <SubscribeConfirmation guild={guild} slots={value2} isModifyingSubscription={isModifyingAppliedBoost} onPremiumGuildSubscribe={closure} />}</ScrollView></View>;
|
||||
}
|
||||
|
||||
function _fun94168(a0) { // fn#94168, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12531:1588, offset: 0x020f0471, size: 41 bytes, params: 2, frame: 11
|
||||
const value = environment.__proto__;
|
||||
return (require(8249) /* metro dependency 8249: GuildBoostingUtils */).isGuildBoostSlotCanceled(a0);
|
||||
}
|
||||
|
||||
function _fun94172() { // fn#94172, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12531:2909, offset: 0x020f0b35, size: 78 bytes, params: 1, frame: 13
|
||||
var environment;
|
||||
let value = previousGuildSubscriptionSlots.find(function(a0) {
|
||||
return a0.premiumGuildSubscription != null;
|
||||
});
|
||||
const guildId = value == null || value.premiumGuildSubscription == null ? undefined : value.premiumGuildSubscription.guildId;
|
||||
value = environment.__proto__;
|
||||
return GuildStore.getGuild(guildId);
|
||||
}
|
||||
|
||||
function _handleSubscribe() { // fn#94177, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12531:5160, owner: SubscribeModalConfirmation._handleSubscribe, offset: 0x020f0d9e, size: 53 bytes, params: 1, frame: 13
|
||||
var environment;
|
||||
const value = environment.__proto__;
|
||||
return env1_3(_fun94179).apply(this, arguments);
|
||||
}
|
||||
|
||||
function _fun94186() { // fn#94186, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12531:4514, offset: 0x020f114c, size: 21 bytes, params: 1, frame: 2
|
||||
env0_5.current = location;
|
||||
}
|
||||
|
||||
function _fun94187() { // fn#94187, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12531:4551, offset: 0x020f1161, size: 80 bytes, params: 1, frame: 15
|
||||
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
const track = defaultImport.track;
|
||||
const OPEN_MODAL = AnalyticEvents.OPEN_MODAL;
|
||||
const PREMIUM_GUILD_SUBSCRIBE_CONFIRMATION_MODAL = AnalyticsSections.PREMIUM_GUILD_SUBSCRIBE_CONFIRMATION_MODAL;
|
||||
Reflect.apply(track, defaultImport, [OPEN_MODAL, {type: PREMIUM_GUILD_SUBSCRIBE_CONFIRMATION_MODAL,
|
||||
location: env0_5.current}]);
|
||||
}
|
||||
|
||||
function _fun94190() { // fn#94190, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12531:4839, offset: 0x020f11dd, size: 155 bytes, params: 1, frame: 14
|
||||
var environment;
|
||||
var r3;
|
||||
var Object;
|
||||
if (guildBoostSlots != null) {
|
||||
if (guildBoostSlots.length > 0) {
|
||||
return guildBoostSlots;
|
||||
}
|
||||
}
|
||||
let value = environment.__proto__;
|
||||
if (GuildBoostSlotStore.hasFetched) {
|
||||
Object = global.Object;
|
||||
value = Object.values(GuildBoostSlotStore.boostSlots);
|
||||
value = value.filter(function(a0) {
|
||||
return a0.isAvailable();
|
||||
});
|
||||
value = value.sort(_fun94192);
|
||||
r3 = value;
|
||||
} else {
|
||||
r3 = [];
|
||||
}
|
||||
return r3.length > 0 ? [r3[0]] : [];
|
||||
}
|
||||
|
||||
function* _fun94179(a0) { // fn#94179, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12531:5215, offset: 0x020f0dde, size: 561 bytes, params: 2, frame: 22
|
||||
var environment;
|
||||
var r4;
|
||||
var every;
|
||||
var value6;
|
||||
var Promise;
|
||||
var all;
|
||||
var map;
|
||||
var closure;
|
||||
var value7;
|
||||
var value8;
|
||||
var value9;
|
||||
var value10;
|
||||
var binding2;
|
||||
var property;
|
||||
var value11;
|
||||
var applyToGuild;
|
||||
var id;
|
||||
var value12;
|
||||
var binding3;
|
||||
var PERK;
|
||||
var value13;
|
||||
var value14;
|
||||
var value15;
|
||||
var value16;
|
||||
var binding4;
|
||||
var value17;
|
||||
var openLazy;
|
||||
var object2;
|
||||
var value18;
|
||||
var track;
|
||||
var MODAL_DISMISSED;
|
||||
var PREMIUM_GUILD_SUBSCRIBE_CONFIRMATION_MODAL;
|
||||
var BUTTON_CTA;
|
||||
var error;
|
||||
var binding5;
|
||||
var value19;
|
||||
var show;
|
||||
var intl;
|
||||
var string;
|
||||
var t;
|
||||
var Kx5W0V;
|
||||
var XueBVY;
|
||||
if (true) {
|
||||
value = environment.__proto__.__proto__.__proto__;
|
||||
var binding = env3_1;
|
||||
var value3 = binding(env3_2[27]);
|
||||
var value5 = View.length > 0;
|
||||
reducibleJoin3: while (true) {
|
||||
if (value5) {
|
||||
every = View.every;
|
||||
value6 = Reflect.apply(every, View, [function(a0) {
|
||||
var r0;
|
||||
var Date;
|
||||
var cooldownEndsAt;
|
||||
var value2;
|
||||
var value = a0.cooldownEndsAt == null;
|
||||
if (value) {
|
||||
r0 = value;
|
||||
} else {
|
||||
Date = global.Date;
|
||||
cooldownEndsAt = a0.cooldownEndsAt;
|
||||
value2 = new Date();
|
||||
value2 = value2.valueOf();
|
||||
Date = global.Date;
|
||||
value2 = value2 < Date.now();
|
||||
r0 = value2;
|
||||
}
|
||||
return r0;
|
||||
}]);
|
||||
r4 = value6;
|
||||
break reducibleJoin3;
|
||||
}
|
||||
r4 = value5;
|
||||
break reducibleJoin3;
|
||||
}
|
||||
value3(r4, 'Cannot use a premium guild subscription slot while on cooldown');
|
||||
reducibleJoin16: while (true) {
|
||||
reduciblePort71: while (true) {
|
||||
exceptionLanding68: while (true) {
|
||||
if (a0) {
|
||||
try {
|
||||
Promise = global.Promise;
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
try {
|
||||
all = Promise.all;
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
try {
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
try {
|
||||
map = View.map;
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
try {
|
||||
closure = _fun94181;
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
try {
|
||||
value7 = Reflect.apply(map, View, [closure]);
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
try {
|
||||
value8 = Reflect.apply(all, Promise, [value7]);
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
yield value8;
|
||||
try {
|
||||
value9 = undefined;
|
||||
value10 = false;
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
if (value10) {
|
||||
return value9;
|
||||
}
|
||||
break reducibleJoin16;
|
||||
}
|
||||
break reducibleJoin16;
|
||||
}
|
||||
reducibleJoin70: while (true) {
|
||||
if (env2_4 == null) {
|
||||
break reducibleJoin70;
|
||||
}
|
||||
env2_4(false);
|
||||
break reducibleJoin70;
|
||||
}
|
||||
binding = env3_1;
|
||||
binding5 = env3_2;
|
||||
value19 = binding(binding5[29]);
|
||||
show = value19.show;
|
||||
object2 = {};
|
||||
binding = env3_0;
|
||||
intl = binding(binding5[18]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding5[18]).t;
|
||||
Kx5W0V = t.Kx5W0V;
|
||||
object2.title = Reflect.apply(string, intl, [Kx5W0V]);
|
||||
intl = binding(binding5[18]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding5[18]).t;
|
||||
XueBVY = t.XueBVY;
|
||||
object2.body = Reflect.apply(string, intl, [XueBVY]);
|
||||
Reflect.apply(show, value19, [object2]);
|
||||
break reduciblePort71;
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
binding = env3_0;
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
try {
|
||||
binding2 = env3_2;
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
try {
|
||||
property = binding2[28];
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
try {
|
||||
value11 = binding(property);
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
try {
|
||||
applyToGuild = value11.applyToGuild;
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
try {
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
try {
|
||||
id = Image.id;
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
try {
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
try {
|
||||
map = View.map;
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
try {
|
||||
closure = function(a0) {
|
||||
return a0.id;
|
||||
};
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
try {
|
||||
value12 = Reflect.apply(map, View, [closure]);
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
try {
|
||||
binding = env2_3;
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
try {
|
||||
binding3 = env3_18;
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
try {
|
||||
PERK = binding3.PERK;
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
try {
|
||||
value13 = Reflect.apply(applyToGuild, value11, [id, value12, binding === PERK]);
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
yield value13;
|
||||
try {
|
||||
value14 = undefined;
|
||||
value15 = false;
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
if (value15) {
|
||||
return value14;
|
||||
}
|
||||
try {
|
||||
binding = env2_4;
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
try {
|
||||
value16 = binding == null;
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
reducibleJoin42: while (true) {
|
||||
if (value16) {
|
||||
break reducibleJoin42;
|
||||
}
|
||||
try {
|
||||
binding = env2_4;
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
try {
|
||||
binding(true);
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
break reducibleJoin42;
|
||||
}
|
||||
try {
|
||||
binding = env3_1;
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
try {
|
||||
binding4 = env3_2;
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
try {
|
||||
property = binding4[29];
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
try {
|
||||
value17 = binding(property);
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
try {
|
||||
openLazy = value17.openLazy;
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
try {
|
||||
object2 = {};
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
try {
|
||||
closure = importer_94183;
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
try {
|
||||
object2.importer = closure;
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
try {
|
||||
Reflect.apply(openLazy, value17, [object2]);
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
try {
|
||||
property = binding4[25];
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
try {
|
||||
value18 = binding(property);
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
try {
|
||||
track = value18.track;
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
try {
|
||||
binding = env3_13;
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
try {
|
||||
MODAL_DISMISSED = binding.MODAL_DISMISSED;
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
try {
|
||||
object2 = {};
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
try {
|
||||
binding = env3_15;
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
try {
|
||||
PREMIUM_GUILD_SUBSCRIBE_CONFIRMATION_MODAL = binding.PREMIUM_GUILD_SUBSCRIBE_CONFIRMATION_MODAL;
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
try {
|
||||
object2.type = PREMIUM_GUILD_SUBSCRIBE_CONFIRMATION_MODAL;
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
try {
|
||||
binding = env3_14;
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
try {
|
||||
BUTTON_CTA = binding.BUTTON_CTA;
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
try {
|
||||
object2.location_object = BUTTON_CTA;
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
try {
|
||||
Reflect.apply(track, value18, [MODAL_DISMISSED, object2]);
|
||||
} catch (error) {
|
||||
break exceptionLanding68;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun94192(a0) { // fn#94192, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12531:4958, offset: 0x020f1278, size: 53 bytes, params: 2, frame: 11
|
||||
let value = environment.__proto__.__proto__;
|
||||
value = require(8249) /* metro dependency 8249: GuildBoostingUtils */;
|
||||
value = value.isGuildBoostSlotCanceled(a0);
|
||||
return value ? 1 : -1;
|
||||
}
|
||||
|
||||
function _fun94181({premiumGuildSubscription}) { // fn#94181, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12531:5434, offset: 0x020f1061, size: 83 bytes, params: 2, frame: 14
|
||||
var r0;
|
||||
var value;
|
||||
if (premiumGuildSubscription != null) {
|
||||
value = environment.__proto__.__proto__.__proto__.__proto__;
|
||||
value = env4_0(env4_2[28]);
|
||||
value = value.unapplyFromGuild(premiumGuildSubscription.guildId, premiumGuildSubscription.id);
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = global.Promise.resolve();
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function importer_94183() { // fn#94183, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12531:5656, offset: 0x020f10b4, size: 64 bytes, params: 1, frame: 13
|
||||
var environment;
|
||||
let value = environment.__proto__.__proto__.__proto__.__proto__;
|
||||
const binding = env4_0;
|
||||
const binding2 = env4_2;
|
||||
value = binding(binding2[31]);
|
||||
value = value(binding2[30], binding2.paths);
|
||||
return value.then(function({default: env0_0}) {
|
||||
return _fun94185;
|
||||
});
|
||||
}
|
||||
|
||||
function _fun94184({default: env0_0}) { // fn#94184, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12531:5690, offset: 0x020f10f4, size: 23 bytes, params: 2, frame: 2
|
||||
return _fun94185;
|
||||
}
|
||||
|
||||
function _fun94185(a0) { // fn#94185, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12531:5705, offset: 0x020f110b, size: 65 bytes, params: 2, frame: 15
|
||||
const binding = env6_19;
|
||||
const binding2 = env0_0;
|
||||
const object2 = {};
|
||||
copyDataProperties(object2, a0, undefined);
|
||||
object2['guildId'] = require;
|
||||
object2['guildBoostSlots'] = importDefault;
|
||||
return binding(binding2, object2);
|
||||
}
|
||||
|
||||
+158
@@ -0,0 +1,158 @@
|
||||
/* Metro module 6525; source: components_native/premium/premium_guild_subscribe_modal/SubscribeModalGuildSelect.tsx; dependencies: [57, 31, 27, 1867, 4896, 6524, 33, 4501, 697, 6235, 1484, 566, 6526, 6618, 6983, 1244, 6522, 5278, 6819, 1305, 2] */
|
||||
function _fun51284(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#51284, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6703:6, offset: 0x0122df05, size: 391 bytes, params: 8, frame: 21
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_4 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_5 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_6 = (require(27) /* metro dependency 27 */).ScrollView;
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const sortedGuildStore = importDefault(4896) /* metro dependency 4896: SortedGuildStore */;
|
||||
const env0_9 = (require(6524) /* metro dependency 6524: PremiumGuildSubscribeConstants */).PremiumGuildSubscribeModalScenes;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_10 = value.jsx;
|
||||
const env0_11 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {};
|
||||
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
||||
object2.safeArea = {'backgroundColor': null, 'flexGrow': 1, 'flexShrink': 1, backgroundColor: BACKGROUND_BASE_LOW};
|
||||
object2.guildList = {padding: 16};
|
||||
object2.guildOption = {'flexDirection': 'row', 'alignItems': 'center', 'paddingVertical': 10};
|
||||
const DARK_WHITE_500_LIGHT_PRIMARY_660 = (require(6235) /* metro dependency 6235: LegacyTokens */).DARK_WHITE_500_LIGHT_PRIMARY_660;
|
||||
object2.guildName = {'marginLeft': 32, 'fontSize': 16, 'lineHeight': 20, color: DARK_WHITE_500_LIGHT_PRIMARY_660};
|
||||
const env0_12 = Reflect.apply(createStyles, value, [object2]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/premium/premium_guild_subscribe_modal/SubscribeModalGuildSelect.tsx');
|
||||
exports.default = SubscribeModalGuildSelect;
|
||||
}
|
||||
|
||||
function SubscribeModalGuildSelect({guildBoostSlots, intent, onResult}) { // fn#51285, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6703:664, offset: 0x0122e08c, size: 483 bytes, params: 2, frame: 29
|
||||
const styles = useStyles();
|
||||
const env0_4 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
|
||||
const binding = env0_5;
|
||||
const [property, property2] = env0_4(binding.useState(''), 2);
|
||||
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([GuildStore,
|
||||
SortedGuildStore], _fun51289, [property, binding.useMemo(_fun51286, [guildBoostSlots])]);
|
||||
const SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
|
||||
const SearchBarNav = importDefault(6983) /* metro dependency 6983: SearchBarNav */;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const searchBarNav = <SearchBarNav placeholder={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.vf3ZTa)} onChange={property2} onClose={(importAll(6522) /* metro dependency 6522: BoostingActionCreators */).closeApplyBoostModal} />;
|
||||
const SafeAreaPaddingView2 = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
|
||||
return (
|
||||
<SafeAreaPaddingView top style={styles.safeArea}>
|
||||
{searchBarNav}
|
||||
<ScrollView style={styles.guildList} keyboardShouldPersistTaps="always">
|
||||
<SafeAreaPaddingView2 bottom>
|
||||
{value5.map(_fun51292)}
|
||||
</SafeAreaPaddingView2>
|
||||
</ScrollView>
|
||||
</SafeAreaPaddingView>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun51286() { // fn#51286, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6703:830, offset: 0x0122e26f, size: 109 bytes, params: 1, frame: 13
|
||||
var set;
|
||||
var Set;
|
||||
var value;
|
||||
if (guildBoostSlots == null) {
|
||||
set = new global.Set();
|
||||
} else {
|
||||
Set = global.Set;
|
||||
value = guildBoostSlots.filter(function({premiumGuildSubscription}) {
|
||||
return premiumGuildSubscription?.guildId != null;
|
||||
});
|
||||
value = value.map(_fun51288);
|
||||
set = new Set();
|
||||
}
|
||||
return set;
|
||||
}
|
||||
|
||||
function _fun51289() { // fn#51289, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6703:1078, offset: 0x0122e316, size: 178 bytes, params: 1, frame: 15
|
||||
var environment;
|
||||
var r0;
|
||||
var value2;
|
||||
var defaultImport;
|
||||
var reduce;
|
||||
var Array;
|
||||
var value3;
|
||||
var array;
|
||||
var value5;
|
||||
var value;
|
||||
if (env0_5.length === 0) {
|
||||
value = environment.__proto__;
|
||||
value = SortedGuildStore.getFlattenedGuildIds();
|
||||
reduce = value.reduce;
|
||||
Array = global.Array;
|
||||
value5 = Object.create(Array.prototype, {constructor: {value: Array}});
|
||||
array = new Array();
|
||||
value = Reflect.apply(reduce, value, [_fun51290, array instanceof Object ? array : value5]);
|
||||
r0 = value;
|
||||
} else {
|
||||
value2 = environment.__proto__;
|
||||
defaultImport = importDefault(6526) /* metro dependency 6526: AutocompleteUtils */;
|
||||
value = defaultImport.queryGuilds({query: env0_5});
|
||||
reduce = value.reduce;
|
||||
Array = global.Array;
|
||||
value3 = Object.create(Array.prototype, {constructor: {value: Array}});
|
||||
array = new Array();
|
||||
value = Reflect.apply(reduce, value, [_fun51291, array instanceof Object ? array : value3]);
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun51292(a0) { // fn#51292, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6703:1626, offset: 0x0122e43f, size: 219 bytes, params: 2, frame: 23
|
||||
var environment;
|
||||
const env0_0 = a0;
|
||||
let value = environment.__proto__;
|
||||
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
||||
const object2 = {accessibilityRole: 'button'};
|
||||
const stylesBinding = styles;
|
||||
object2.style = stylesBinding.guildOption;
|
||||
object2.onPress = onPress_51293;
|
||||
value = importDefault(6819) /* metro dependency 6819: GuildIcon */;
|
||||
const GuildIconSizes = (require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes;
|
||||
const SMALL = GuildIconSizes.SMALL;
|
||||
value = ((Component) => <Component guild={a0} size={SMALL} selected={false} />)(value);
|
||||
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
|
||||
return (
|
||||
<PressableOpacity {...object2} key={a0.id}>
|
||||
{value}
|
||||
<LegacyText style={stylesBinding.guildName}>
|
||||
{a0.name}
|
||||
</LegacyText>
|
||||
</PressableOpacity>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun51288({premiumGuildSubscription}) { // fn#51288, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6703:955, offset: 0x0122e2fb, size: 27 bytes, params: 2, frame: 3
|
||||
return premiumGuildSubscription?.guildId;
|
||||
}
|
||||
|
||||
function _fun51290(a0, a1) { // fn#51290, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6703:1128, offset: 0x0122e3c8, size: 70 bytes, params: 3, frame: 14
|
||||
let value = environment.__proto__.__proto__;
|
||||
value = GuildStore.getGuild(a1);
|
||||
if (!(value == null || env1_6.has(value.id))) {
|
||||
a0.push(value);
|
||||
}
|
||||
return a0;
|
||||
}
|
||||
|
||||
function _fun51291(a0, {record}) { // fn#51291, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6703:1250, offset: 0x0122e40e, size: 49 bytes, params: 3, frame: 13
|
||||
const binding = env1_6;
|
||||
if (!binding.has(record.id)) {
|
||||
a0.push(record);
|
||||
}
|
||||
return a0;
|
||||
}
|
||||
|
||||
function onPress_51293() { // fn#51293, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6703:1713, offset: 0x0122e51a, size: 80 bytes, params: 1, frame: 15
|
||||
const binding = env0_0;
|
||||
const binding2 = env1_4;
|
||||
const replace = binding2.replace;
|
||||
const CONFIRMATION = PremiumGuildSubscribeModalScenes.CONFIRMATION;
|
||||
Reflect.apply(replace, binding2, [CONFIRMATION, {guildId: binding.id, guildBoostSlots: guildBoostSlots,
|
||||
intent: intent, onResult: onResult}]);
|
||||
}
|
||||
|
||||
+125
@@ -0,0 +1,125 @@
|
||||
/* Metro module 12361; source: components_native/premium/premium_guild_subscribe_modal/SubscribeModalSuccessAlert.tsx; dependencies: [57, 31, 27, 1867, 7047, 33, 4501, 697, 12362, 12363, 566, 4048, 4596, 1244, 4496, 6522, 4589, 676, 4002, 12364, 12365, 4573, 2] */
|
||||
function _fun94247(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#94247, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12547:6, offset: 0x020f212a, size: 536 bytes, params: 8, frame: 24
|
||||
var object3;
|
||||
const env0_0 = require;
|
||||
const closure = PremiumPaymentGuildAnimation;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_5 = value.View;
|
||||
const env0_6 = value.Image;
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const env0_8 = (require(7047) /* metro dependency 7047: ColorConstants */).Gradients;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_9 = value.jsx;
|
||||
const env0_10 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object3 = {wrapper: {'paddingHorizontal': 24, 'paddingBottom': 16, 'paddingTop': 4, 'alignItems': 'stretch'},
|
||||
animation: {'width': 'auto', 'height': 112, 'alignSelf': 'center'}, text: {'lineHeight': 18,
|
||||
'textAlign': 'center'}};
|
||||
const object4 = {'padding': 2, 'borderRadius': null, 'marginTop': 8};
|
||||
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
|
||||
object3.activated = object4;
|
||||
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
||||
object3.activatedBackground = {'backgroundColor': null, 'paddingVertical': 12, 'paddingHorizontal': 20,
|
||||
'alignItems': 'center', backgroundColor: BACKGROUND_BASE_LOW};
|
||||
object3.activatedImage = {width: 220};
|
||||
object3.successInfo = {marginTop: 24};
|
||||
const env0_11 = Reflect.apply(createStyles, value, [object3]);
|
||||
object3 = {ENTRY: 'entry', IDLE: 'idle'};
|
||||
const object5 = {};
|
||||
const ENTRY = object3.ENTRY;
|
||||
object5[ENTRY] = {'BEG': 0, 'END': 180};
|
||||
const IDLE = object3.IDLE;
|
||||
object5[IDLE] = {'BEG': 180, 'END': 360};
|
||||
closure.Scenes = object3;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/premium/premium_guild_subscribe_modal/SubscribeModalSuccessAlert.tsx');
|
||||
exports.default = SubscribeModalSuccessAlert;
|
||||
}
|
||||
|
||||
function PremiumPaymentGuildAnimation({nextScene, onSceneComplete, loop}) { // fn#94248, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12547:774, offset: 0x020f2342, size: 122 bytes, params: 2, frame: 19
|
||||
const styles = useStyles();
|
||||
return ((Component) => <Component nextScene={nextScene} onSceneComplete={onSceneComplete} loop={loop} sceneSegments={env0_12} style={styles.animation} source={require(12363) /* metro dependency 12363 */} />)(importDefault(12362) /* metro dependency 12362: SequencedLottieAnimationView */);
|
||||
}
|
||||
|
||||
function SubscribeModalSuccessAlert({guildId, guildBoostSlots}) { // fn#94249, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12547:1137, offset: 0x020f23bc, size: 955 bytes, params: 2, frame: 35
|
||||
var object2;
|
||||
const styles = useStyles();
|
||||
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
|
||||
return GuildStore.getGuild(guildId);
|
||||
});
|
||||
let r16 = guildBoostSlots != null && guildBoostSlots.some(function(a0) {
|
||||
return a0.premiumGuildSubscription != null;
|
||||
});
|
||||
const r19 = guildBoostSlots?.length ?? 1;
|
||||
const binding = env0_4;
|
||||
let useState = binding.useState;
|
||||
const Scenes = PremiumPaymentGuildAnimation.Scenes;
|
||||
const ENTRY = Scenes.ENTRY;
|
||||
const value6 = Reflect.apply(useState, binding, [ENTRY]);
|
||||
const binding2 = env0_3;
|
||||
const value7 = binding2(value6, 2);
|
||||
const property = value7[0];
|
||||
const env0_1 = value7[1];
|
||||
useState = binding.useState;
|
||||
const value8 = binding2(Reflect.apply(useState, binding, [false]), 2);
|
||||
const property2 = value8[0];
|
||||
const env0_2 = value8[1];
|
||||
const value9 = (importDefault(4048) /* metro dependency 4048: useTheme */)();
|
||||
const Alert = importDefault(4596) /* metro dependency 4596: Alert */;
|
||||
object2 = {style: styles.wrapper};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let string = intl.string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const YKxJCI = t.YKxJCI;
|
||||
object2.confirmText = Reflect.apply(string, intl, [YKxJCI]);
|
||||
object2.onConfirm = onConfirm;
|
||||
const premiumPaymentGuildAnimation = <PremiumPaymentGuildAnimation nextScene={property} loop={property2} onSceneComplete={onSceneComplete} />;
|
||||
const defaultImport2 = importDefault(4589) /* metro dependency 4589 */;
|
||||
const {START, END} = (require(676) /* metro dependency 676: ConstantsIOS */).HorizontalGradient;
|
||||
const PREMIUM_GUILD = Gradients.PREMIUM_GUILD;
|
||||
const defaultImport22 = ((Component) => <Component style={styles.activated} start={START} end={END} colors={PREMIUM_GUILD}><View style={styles.activatedBackground}><Image style={styles.activatedImage} source={(require(4002) /* metro dependency 4002: shared */).isThemeLight(value9) ? importDefault(12364) /* metro dependency 12364 */ : importDefault(12365) /* metro dependency 12365 */} /></View></Component>)(defaultImport2);
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
string = intl.string;
|
||||
r16 = r16 ? Reflect.apply(string, intl, [t.RMmWY3]) : Reflect.apply(string, intl, [t.d81BkZ]);
|
||||
return (
|
||||
<Alert {...object2}>
|
||||
{premiumPaymentGuildAnimation}
|
||||
<View>
|
||||
{defaultImport22}
|
||||
<View style={styles.successInfo}>
|
||||
<Text style={styles.text} variant="text-sm/medium">
|
||||
{r16}
|
||||
</Text>
|
||||
<Text style={styles.text} variant="text-sm/medium">
|
||||
{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.r0IGsP,
|
||||
{guildName: guild.name, guildSubscriptionQuantity: r19})}
|
||||
</Text>
|
||||
</View>
|
||||
</View>
|
||||
</Alert>
|
||||
);
|
||||
}
|
||||
|
||||
function SubscribeModalSuccessAlertOnConfirm() { // fn#94252, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12547:1597, owner: SubscribeModalSuccessAlert.onConfirm, offset: 0x020f2777, size: 63 bytes, params: 1, frame: 13
|
||||
const value = environment.__proto__;
|
||||
(importDefault(4496) /* metro dependency 4496: AlertActionCreators */).close();
|
||||
(require(6522) /* metro dependency 6522: BoostingActionCreators */).closeApplyBoostModal();
|
||||
}
|
||||
|
||||
function onSceneComplete(a0) { // fn#94253, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12547:1729, owner: SubscribeModalSuccessAlert.onSceneComplete, offset: 0x020f27b6, size: 100 bytes, params: 2, frame: 12
|
||||
let Scenes = PremiumPaymentGuildAnimation.Scenes;
|
||||
const ENTRY = Scenes.ENTRY;
|
||||
if (ENTRY === a0) {
|
||||
return env0_1(PremiumPaymentGuildAnimation.Scenes.IDLE);
|
||||
}
|
||||
Scenes = PremiumPaymentGuildAnimation.Scenes;
|
||||
const IDLE = Scenes.IDLE;
|
||||
if (IDLE === a0) {
|
||||
return env0_2(true);
|
||||
}
|
||||
}
|
||||
|
||||
+76
@@ -0,0 +1,76 @@
|
||||
/* Metro module 12299; source: components_native/premium/premium_guild_subscribe_modal/useFetchGuildBoostSlots.tsx; dependencies: [5, 57, 31, 7020, 7030, 566, 676, 7037, 8251, 2] */
|
||||
function _fun93931(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#93931, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12485:6, offset: 0x020cb851, size: 185 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(5) /* metro dependency 5 */;
|
||||
const env0_4 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_5 = importAll(31) /* metro dependency 31 */;
|
||||
const guildBoostSlotStore = importDefault(7020) /* metro dependency 7020: GuildBoostSlotStore */;
|
||||
const appStateStore = importDefault(7030) /* metro dependency 7030: AppStateStore */;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/premium/premium_guild_subscribe_modal/useFetchGuildBoostSlots.tsx');
|
||||
exports.default = useFetchGuildBoostSlots;
|
||||
}
|
||||
|
||||
function useFetchGuildBoostSlots() { // fn#93932, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12485:273, offset: 0x020cb90a, size: 204 bytes, params: 1, frame: 21
|
||||
const binding = env0_5;
|
||||
const [property, env0_1] = env0_4(binding.useState(true), 2);
|
||||
const hasFetched = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildBoostSlotStore],
|
||||
function() {
|
||||
return GuildBoostSlotStore.hasFetched;
|
||||
});
|
||||
const state = (require(566) /* metro dependency 566: flux */).useStateFromStores([AppStateStore], function() {
|
||||
return AppStateStore.getState();
|
||||
});
|
||||
var env0_4 = binding.useRef(state);
|
||||
binding.useEffect(_fun93935, [state, hasFetched, property]);
|
||||
return property;
|
||||
}
|
||||
|
||||
function _fun93935() { // fn#93935, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12485:492, offset: 0x020cb9f8, size: 116 bytes, params: 1, frame: 14
|
||||
var environment;
|
||||
var stateBinding;
|
||||
var value2;
|
||||
if (env0_0) {
|
||||
env0_4.current = state;
|
||||
(function() {
|
||||
return _fetch_93937.apply(this, arguments);
|
||||
})();
|
||||
} else {
|
||||
stateBinding = state;
|
||||
if (stateBinding !== env0_4.current) {
|
||||
stateBinding = state;
|
||||
value2 = environment.__proto__;
|
||||
if (stateBinding === (require(676) /* metro dependency 676: ConstantsIOS */).AppStates.ACTIVE) {
|
||||
env0_4.current = state;
|
||||
(function() {
|
||||
return _fetch_93937.apply(this, arguments);
|
||||
})();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fetch_93937() { // fn#93937, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12485:601, offset: 0x020cba6c, size: 53 bytes, params: 1, frame: 13
|
||||
var environment;
|
||||
const value = environment.__proto__.__proto__;
|
||||
return env2_3(_fun93939).apply(this, arguments);
|
||||
}
|
||||
|
||||
function* _fun93939() { // fn#93939, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12485:636, offset: 0x020cbaac, size: 197 bytes, params: 1, frame: 19
|
||||
if (true) {
|
||||
var Promise = global.Promise;
|
||||
var all = Promise.all;
|
||||
value = environment.__proto__.__proto__.__proto__.__proto__;
|
||||
var items2 = [env4_1(env4_2[7]).init()];
|
||||
items2[1] = dependencyMap ? global.Promise.resolve() : env4_0(env4_2[8]).fetchGuildBoostSlots();
|
||||
value = env4_0(env4_2[8]);
|
||||
items2[2] = value.fetchAppliedGuildBoostsForUser();
|
||||
yield Reflect.apply(all, Promise, [items2]);
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
importDefault(false);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user