/* 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] */
import ClassCallCheck from '../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import Module00057 from '../../by-id/module-00057.js'; /* Metro dependency 57 */
import AnalyticsUtils from '../../utils/AnalyticsUtils.tsx'; /* Metro dependency 683 */
import UnsyncedUserSettingsStore from '../../modules/user_settings/UnsyncedUserSettingsStore.tsx'; /* Metro dependency 1312 */
import UseWindowDimensionsNative from '../../modules/screen/useWindowDimensions.native.tsx'; /* Metro dependency 1478 */
import UserStore from '../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import UseTheme from '../../hooks/useTheme.tsx'; /* Metro dependency 4048 */
import Alert from '../common/Alert.tsx'; /* Metro dependency 4596 */
import FastImage from '../common/FastImage.tsx'; /* Metro dependency 5475 */
import UseAnalyticsLocations from '../../modules/app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
import AnalyticsLocation from '../../modules/app_analytics/AnalyticsLocation.tsx'; /* Metro dependency 6789 */
import UseMessageMaxLength from '../../modules/messages/useMessageMaxLength.tsx'; /* Metro dependency 7875 */
import UserSettingsActionCreators from '../../actions/UserSettingsActionCreators.tsx'; /* Metro dependency 7896 */
import Module07938 from '../../by-id/module-07938.js'; /* Metro dependency 7938 */
import Carousel from '../common/Carousel.tsx'; /* Metro dependency 7939 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as NativeModule from '../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as PremiumConstantsModule from '../../modules/premium/PremiumConstants.tsx'; /* Metro dependency 1880 */
import * as NativeModule2 from '../../external/discord_common/js/packages/design/native.tsx'; /* Metro dependency 3868 */
import * as SharedModule from '../../design/shared.tsx'; /* Metro dependency 4002 */
import * as CreateStylesModule from '../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as UsePremiumTrialOfferNativeModule from '../../modules/premium/hooks/usePremiumTrialOffer.native.tsx'; /* Metro dependency 7062 */
import * as PremiumUpsellUtilsModule from '../../utils/native/PremiumUpsellUtils.tsx'; /* Metro dependency 7882 */
import * as AppIconConstantsModule from '../../modules/app_icons/native/AppIconConstants.tsx'; /* Metro dependency 7902 */
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
const env0_0 = require;
const PremiumUpsellItem2 = PremiumUpsellItem;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = ReactModule;
const createLegacyClassComponentStyles = CreateStylesModule.createLegacyClassComponentStyles;
object = {};
object.carousel = {alignItems: 'center'};
object.upsellContainer = {alignItems: 'center'};
object.premiumUpsellContainer = {'alignItems': 'center', 'paddingHorizontal': 8};
object.nitroWheel = {'width': 32, 'height': 32, 'marginVertical': -8};
object.upsellImage = {'height': 80, 'width': 120};
object.upsellTitle = {'marginBottom': 8, 'textAlign': 'center'};
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object.premiumUpsellTitle = {marginVertical: PX_8, textAlign: 'center'};
object.upsellDescription = {textAlign: 'center'};
object.premiumUpsellDescription = {textAlign: 'center'};
object.pageIndicatorStyle = {marginTop: 16};
object.largerUpsellImage = {'height': 154, 'width': 226};
object.customProfileUpsellImage = {'width': 240, 'height': 194};
object.loadingIndicator = {height: 170};
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object.customAppIconUpsellLightImage = {borderColor: BACKGROUND_BASE_LOWEST, borderWidth: 2};
const object4 = {'height': 80, 'width': 80};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object.customAppIconsUpsellImage = object4;
const env0_22 = Reflect.apply(createLegacyClassComponentStyles, CreateStylesModule, [object]);
const PureComponent = value.PureComponent;
value = _fun63291(PureComponent);
const ThemeContext = (NativeModule2).ThemeContext;
value.contextType = ThemeContext;
value.defaultProps = {isInitial: false};
const PremiumUpsellAlert2 = PremiumUpsellAlert;
(FileImportTrackerModule).fileFinishedImporting('components_native/premium/PremiumUpsellAlert.tsx');
exports.default = PremiumUpsellAlert2;
exports.PremiumUpsellItem = PremiumUpsellItem2;
exports.PremiumUpsellAlert = PremiumUpsellAlert2;
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 = (CreateStylesModule).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 = [
,
];
const Text = (TextModule).Text;
items3[1] = (
{title}
);
items3[2] = (
{description}
);
return (
{items3}
);
}
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 = (UsePremiumTrialOfferNativeModule).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 object2 = {};
object2.image = importDefault(7883) /* metro dependency 7883 */;
const string = intl.string;
const UNtcBV = (require(1244) /* metro dependency 1244: indexNative */).t.UNtcBV;
object2.title = Reflect.apply(string, intl, [UNtcBV]);
object2.description = r5;
return ;
}
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 object2 = {};
object2.image = importDefault(7884) /* metro dependency 7884 */;
const intl = (IndexNativeModule).intl;
const string = intl.string;
const t = (IndexNativeModule).t;
const F6rmyq = t.F6rmyq;
object2.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, {}]);
}
object2.description = r5;
return ;
}
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 = (CreateStylesModule).useLegacyClassComponentStyles(env0_22);
const value3 = (UseTheme)();
const largerUpsellImage = value2.largerUpsellImage;
const object2 = {};
object2.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;
object2.title = Reflect.apply(string, intl, [OVN9la]);
object2.description = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.j0dyAG);
return (
);
}
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 = (CreateStylesModule).useLegacyClassComponentStyles(env0_22).customProfileUpsellImage;
const object2 = {};
object2.image = importDefault(7931) /* metro dependency 7931 */;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.rTY76D);
object2.description = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['2LCxoj']);
return (
);
}
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 = (CreateStylesModule).useLegacyClassComponentStyles(env0_22);
const iconSource = getIcons().filter(function(a0) {
return a0.isPremium;
})[0].iconSource;
const isThemeLight2 = (SharedModule).isThemeLight((UseTheme)());
const items2 = [value3.customAppIconsUpsellImage];
items2[1] = isThemeLight2 ? value3.customAppIconUpsellLightImage : undefined;
const object2 = {};
object2.image = imageSource ?? iconSource;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
object2.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;
object2.description = Reflect.apply(string, intl, [VL5TYT]);
return (
);
}
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 object2 = {};
object2.image = importDefault(7932) /* metro dependency 7932 */;
const intl = (IndexNativeModule).intl;
const string = intl.string;
const t = (IndexNativeModule).t;
object2.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'], {}]);
}
object2.description = r5;
return ;
}
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 = (CreateStylesModule).useLegacyClassComponentStyles(env0_22);
const value3 = (UseTheme)();
const value4 = (UseMessageMaxLength)();
const largerUpsellImage = value2.largerUpsellImage;
const object2 = {};
object2.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;
object2.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['8cjmTj']);
object2.description = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.moN9wh,
{maxLength: value4});
return (
);
}
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 = (CreateStylesModule).useLegacyClassComponentStyles(env0_22);
const value3 = (UseTheme)();
const largerUpsellImage = value2.largerUpsellImage;
const object2 = {};
object2.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;
object2.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['CoNXB+']);
object2.description = intl.format((require(1244) /* metro dependency 1244: indexNative */).t.mkXb2F, {});
return (
);
}
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 object;
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
const dataSavingMode = (require(566) /* metro dependency 566: flux */).useStateFromStores([UnsyncedUserSettingsStore],
function() {
return UnsyncedUserSettingsStore.dataSavingMode;
});
let binding = env0_9;
const property = Module00057(binding.useState(!dataSavingMode), 1)[0];
const jsxRuntimeEnv0_21Binding = jsxRuntimeEnv0_21;
binding = env0_23;
const UPLOAD = UpsellTypes.UPLOAD;
const binding2 = ((Component) => )(binding);
if (property) {
TableSwitchRow = (require(6808) /* metro dependency 6808: TableSwitchRowNative */).TableSwitchRow;
r5 = (
);
} else {
r5 = null;
}
return (
<>
{binding2}
{r5}
>
);
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__;
(UserSettingsActionCreators).updatedUnsyncedSettings({dataSavingMode: a0});
}
}
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 UpsellItem2 = UpsellItem;
Inherits(UpsellItem2, a0);
return CreateClass(UpsellItem2, [{key: 'render', value: value_63293}]);
function UpsellItem() { // fn#63292, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8079:1392, offset: 0x0109efa4, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_4(this, UpsellItem);
const value3 = env1_7(UpsellItem);
return env1_6(this, _isNativeReflectConstruct_63275() ? global.Reflect.construct(value3, arguments,
env1_7(this).constructor) : value3.apply(this, arguments));
}
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 = [
,
];
const Text = (TextModule).Text;
items2[1] = (
{isInitial ? activeTitle : passiveTitle}
);
items2[2] = (
{description}
);
return (
{items2}
);
}
}
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
const env0_3 = (CreateStylesModule).useLegacyClassComponentStyles(env0_22);
const {width, height} = (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 = UseAnalyticsLocations;
const PREMIUM_UPSELL_ALERT = (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} = (PremiumUpsellUtilsModule).usePremiumUpsellConfig(initialUpsellKey,
analyticsLocations, analyticsLocation);
object = {analyticsLocation: analyticsLocation, analyticsProperties: analyticsProperties,
useTier0UpsellContent: useTier0UpsellContent};
const object3 = object;
const env0_10 = object3.useRef(object);
object3.useEffect(_fun63300);
object3.useEffect(_fun63301, [analyticsLocations]);
object = {};
const ButtonColors = (NativeModule).ButtonColors;
const GREEN = ButtonColors.GREEN;
object.confirmColor = GREEN;
object.confirmText = getNitroText;
object.renderConfirmIcon = renderConfirmIcon;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.cancelText = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq);
object.onClose = onClose;
object.onConfirm = onViewAllPerks;
return ((Component) => {_fun63303()})(Alert);
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 = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
var object;
var getMaxFileSizeForPremiumType;
var formatToPlainString;
var Z7Xb7H;
var getPremiumTypeDisplayName;
var TIER_0;
var value;
if (useTier0UpsellContent) {
formatToPlainString = intl.formatToPlainString;
Z7Xb7H = t.Z7Xb7H;
object = {};
value = require(3802) /* metro dependency 3802: PremiumUtils */;
getPremiumTypeDisplayName = value.getPremiumTypeDisplayName;
TIER_0 = PremiumTypes.TIER_0;
object.premiumPlan = Reflect.apply(getPremiumTypeDisplayName, value, [TIER_0]);
value = require(3802) /* metro dependency 3802: PremiumUtils */;
getMaxFileSizeForPremiumType = value.getMaxFileSizeForPremiumType;
TIER_0 = PremiumTypes.TIER_0;
object.premiumMaxSize = Reflect.apply(getMaxFileSizeForPremiumType, value, [TIER_0]);
return Reflect.apply(formatToPlainString, intl, [Z7Xb7H, object]);
}
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;
object = {};
object.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;
object.maxUploadPremium = Reflect.apply(getMaxFileSizeForPremiumType, value, [TIER_2]);
return Reflect.apply(format, intl, [DUT5IC, object]);
}
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 _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 _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 = AnalyticsUtils;
const track = defaultImport.track;
const PREMIUM_UPSELL_VIEWED = AnalyticEvents.PREMIUM_UPSELL_VIEWED;
const object = {};
copyDataProperties(object, analyticsProperties, analyticsLocation);
object['location'] = analyticsLocation;
object['location_stack'] = analyticsLocations;
object['sku_id'] = useTier0UpsellContent ? PremiumSubscriptionSKUs.TIER_0 : PremiumSubscriptionSKUs.TIER_2;
Reflect.apply(track, defaultImport, [PREMIUM_UPSELL_VIEWED, object]);
}
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) => )(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 object2;
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
const binding = env0_3;
const carousel = (
{env0_6.map(_fun63304)}
);
const initialUpsellKeyBinding = initialUpsellKey;
const GLOBAL_EMOJI = UpsellTypes.GLOBAL_EMOJI;
if (GLOBAL_EMOJI === initialUpsellKeyBinding) {
return ;
}
const ANIMATED_EMOJI = UpsellTypes.ANIMATED_EMOJI;
if (ANIMATED_EMOJI === initialUpsellKeyBinding) {
return ;
}
const GLOBAL_STICKER = UpsellTypes.GLOBAL_STICKER;
if (GLOBAL_STICKER === initialUpsellKeyBinding) {
return ;
}
const CUSTOM_PROFILES = UpsellTypes.CUSTOM_PROFILES;
if (CUSTOM_PROFILES === initialUpsellKeyBinding) {
return ;
}
const APP_ICONS = UpsellTypes.APP_ICONS;
if (APP_ICONS === initialUpsellKeyBinding) {
return ;
}
const PREMIUM_GUILD_PROFILE = UpsellTypes.PREMIUM_GUILD_PROFILE;
if (PREMIUM_GUILD_PROFILE === initialUpsellKeyBinding) {
return ;
}
const LONGER_MESSAGE = UpsellTypes.LONGER_MESSAGE;
if (LONGER_MESSAGE === initialUpsellKeyBinding) {
return ;
}
const GUILD_CAP = UpsellTypes.GUILD_CAP;
if (GUILD_CAP === initialUpsellKeyBinding) {
return ;
}
const UPLOAD = UpsellTypes.UPLOAD;
if (UPLOAD === initialUpsellKeyBinding) {
object2 = {};
object2.key = UpsellTypes.UPLOAD;
object2.image = importDefault(7886) /* metro dependency 7886 */;
object2.activeTitle = intl.string(t['1EOZqw']);
object2.passiveTitle = intl.string(t.tB51W4);
object2.description = getUploadAlertDescription();
return ;
}
return carousel;
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) => )(env2_23);
}
}
}
}
global.__d(_fun63274, 7901, [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]) /* metro module 7901, 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] */;