Initial commit

This commit is contained in:
janisslsm committed 2026-07-27 16:20:00 +03:00
commit af3b49f756
16065 files changed
+2938410

No files matched your search

@@ -0,0 +1,204 @@
/* Metro module 8615; source: modules/premium/roadblocks/native/hooks/useEmojiPickerViewableItemsCallback.tsx; dependencies: [31, 1878, 566, 3802, 22, 2] */
function _fun68003(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68003, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8800:6, offset: 0x01c3b253, size: 159 bytes, params: 8, frame: 19
const env0_0 = require;
const _arrayLikeToArray_68006 = function(a0, a1) {
var r0;
var r1;
var r2;
var value3;
var length;
var value5;
var value = undefined;
var value2 = value == null;
reducibleJoin2: while (true) {
if (value2) {
r0 = value2;
break reducibleJoin2;
}
value3 = value > a0.length;
r0 = value3;
break reducibleJoin2;
}
reducibleJoin4: while (true) {
if (r0) {
length = a0.length;
r1 = length;
break reducibleJoin4;
}
r1 = value;
break reducibleJoin4;
}
value = (0, global.Array)(r1);
var value4 = 0;
if (value4 < r1) {
r2 = value4;
reducibleLoop5: while (true) {
value[r2] = a0[r2];
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
if (value5 < r1) {
r2 = value5;
continue reducibleLoop5;
}
break reducibleLoop5;
}
}
return value;
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/roadblocks/native/hooks/useEmojiPickerViewableItemsCallback.tsx');
exports.default = useEmojiPickerViewableItemsChanged;
}
function _createForOfIteratorHelperLoose_68004(a0, a1) { // fn#68004, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8800:121, offset: 0x01c3b2f2, size: 372 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun68005;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_68006(a0, value);
r5 = value;
} else {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
value = _arrayLikeToArray_68006(a0, value);
r6 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_68006(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun68005;
}
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
}
function useEmojiPickerViewableItemsChanged(a0) { // fn#68007, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8800:1156, offset: 0x01c3b466, size: 120 bytes, params: 2, frame: 16
const env0_0 = a0;
const binding = env0_3;
const env0_1 = binding.useRef(0);
return binding.useMemo(_fun68009, [a0,
(require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], _fun68008)]);
}
function _fun68008() { // fn#68008, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8800:1256, offset: 0x01c3b4de, size: 88 bytes, params: 1, frame: 14
var r0;
let value = environment.__proto__;
const currentUser = UserStore.getCurrentUser();
const canUseEmojisEverywhere2 = (importDefault(3802) /* metro dependency 3802: PremiumUtils */).canUseEmojisEverywhere(currentUser);
if (canUseEmojisEverywhere2) {
value = importDefault(3802) /* metro dependency 3802: PremiumUtils */;
value = !value.canUseAnimatedEmojis(currentUser);
r0 = value;
} else {
r0 = !canUseEmojisEverywhere2;
}
return r0;
}
function _fun68009() { // fn#68009, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8800:1382, offset: 0x01c3b536, size: 79 bytes, params: 1, frame: 15
var environment;
let value = environment.__proto__;
value = undefined;
const env0_0 = (require(22) /* metro dependency 22 */).debounce(_fun68010, 200);
return {onViewableItemsChanged: env0_2 ? _fun68011 : value};
}
function _fun68010() { // fn#68010, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8800:1412, offset: 0x01c3b585, size: 32 bytes, params: 1, frame: 11
env1_0(env1_1.current > 7);
}
function _fun68011({changed}) { // fn#68011, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8800:1471, offset: 0x01c3b5a5, size: 168 bytes, params: 2, frame: 27
var r2;
var isSectionNitroLocked;
var r15;
var r1;
var value8;
var binding;
var Math;
var max;
var current;
var item;
var isViewable;
var value9;
let value = environment.__proto__.__proto__;
const _createForOfIteratorHelperLoose_68004Binding = _createForOfIteratorHelperLoose_68004;
value = undefined;
const value2 = _createForOfIteratorHelperLoose_68004Binding(changed);
const value3 = value2();
let done = value3.done;
if (!done) {
r2 = value3;
while (true) {
value8 = r2.value;
binding = env1_1;
Math = global.Math;
max = Math.max;
current = binding.current;
item = value8.item;
isSectionNitroLocked = item == null ? value : item.isSectionNitroLocked;
if (isSectionNitroLocked !== true) {
r1 = 0;
continue;
}
isViewable = value8.isViewable;
if (isViewable) {
r15 = 1;
continue;
}
r15 = -1;
continue;
r1 = r15;
binding.current = Reflect.apply(max, Math, [0, current + r1]);
value9 = value2();
done = value9.done;
if (done) {
break;
}
r2 = value9;
continue;
}
}
env0_0();
return value;
}
@@ -0,0 +1,244 @@
/* Metro module 7899; source: modules/premium/roadblocks/native/hooks/usePremiumFeatureUpsellGetNitro.tsx; dependencies: [57, 31, 3808, 7064, 1880, 661, 6771, 7040, 4223, 7507, 3856, 1244, 4015, 2] */
function _fun63266(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#63266, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8077:6, offset: 0x01b78195, size: 215 bytes, params: 8, frame: 20
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 subscriptionStore = importDefault(3808) /* metro dependency 3808: SubscriptionStore */;
const userOfferStore = importDefault(7064) /* metro dependency 7064: UserOfferStore */;
const env0_8 = (require(1880) /* metro dependency 1880: PremiumConstants */).PremiumTypes;
const env0_9 = (require(661) /* metro dependency 661: Constants */).AnalyticsObjectTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/roadblocks/native/hooks/usePremiumFeatureUpsellGetNitro.tsx');
exports.default = usePremiumFeatureUpsellGetNitro;
}
function usePremiumFeatureUpsellGetNitro(a0, a1, a2, a3) { // fn#63267, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8077:310, offset: 0x01b7826c, size: 186 bytes, params: 5, frame: 21
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const env0_3 = a3;
const binding = env0_5;
const [property, env0_4] = env0_4Binding(binding.useState(false), 2);
const analyticsLocations = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().analyticsLocations;
const env0_6 = binding.useRef(0);
const useCallback = binding.useCallback;
let object = [a2, analyticsLocations, a1, a0, a3];
object = {loading: property, onPress: Reflect.apply(useCallback, binding, [_fun63268, object])};
return object;
}
function _fun63268() { // fn#63268, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8077:466, offset: 0x01b78326, size: 534 bytes, params: 1, frame: 20
var environment;
var r6;
var Promise;
var all;
var items;
let value = environment.__proto__;
const premiumTypeSubscription = SubscriptionStore.getPremiumTypeSubscription(false);
const hasFetchedSubscriptions2 = SubscriptionStore.hasFetchedSubscriptions();
const r4 = premiumTypeSubscription == null || global.Object.keys(premiumTypeSubscription).length === 0;
const r3 = UserOfferStore.hasFetchedOffer() && !UserOfferStore.hasAnyUnexpiredOffer();
const isFetchingOffer2 = UserOfferStore.isFetchingOffer();
if (hasFetchedSubscriptions2) {
if (r4) {
if (r3) {
(importDefault(7040) /* metro dependency 7040: openPremiumPlanSelectionActionSheet */)({analyticsLocation: {page: importDefault,
objectType: AnalyticsObjectTypes.BUY}, analyticsLocations: analyticsLocations,
premiumType: env0_0 ? PremiumTypes.TIER_0 : PremiumTypes.TIER_2}, importAll);
} else if (hasFetchedSubscriptions2) {
if (isFetchingOffer2) {
require();
value = require(4015) /* metro dependency 4015: ChatInputUtils */;
value = value.getBestActiveInput();
if (value != null) {
value.closeCustomKeyboard();
}
} else if (env0_6.current < 5) {
env0_4(true);
Promise = global.Promise;
all = Promise.all;
items = [hasFetchedSubscriptions2 ? global.Promise.resolve() : (require(4223) /* metro dependency 4223: BillingActionCreators */).fetchSubscriptions()];
if (isFetchingOffer2) {
r6 = global.Promise.resolve();
} else {
value = require(7507) /* metro dependency 7507: UserOfferActionCreators */;
value = value.fetchUserOffer('usePremiumFeatureUpsellGetNitro');
r6 = value;
}
items[1] = r6;
value = Reflect.apply(all, Promise, [items]);
value = value.then(_fun63269);
value = value.catch(function() {
importAll(dependencyMap[10]).presentFailedToast(require(dependencyMap[11]).intl.string(require(dependencyMap[11]).t.R0RpRX));
});
value.finally(_fun63271);
} else {
require();
value = require(4015) /* metro dependency 4015: ChatInputUtils */;
value = value.getBestActiveInput();
if (value != null) {
value.closeCustomKeyboard();
}
}
} else if (env0_6.current < 5) {
env0_4(true);
Promise = global.Promise;
all = Promise.all;
items = [hasFetchedSubscriptions2 ? global.Promise.resolve() : (require(4223) /* metro dependency 4223: BillingActionCreators */).fetchSubscriptions()];
if (isFetchingOffer2) {
r6 = global.Promise.resolve();
} else {
value = require(7507) /* metro dependency 7507: UserOfferActionCreators */;
value = value.fetchUserOffer('usePremiumFeatureUpsellGetNitro');
r6 = value;
}
items[1] = r6;
value = Reflect.apply(all, Promise, [items]);
value = value.then(_fun63269);
value = value.catch(_fun63270);
value.finally(_fun63271);
} else {
require();
value = require(4015) /* metro dependency 4015: ChatInputUtils */;
value = value.getBestActiveInput();
if (value != null) {
value.closeCustomKeyboard();
}
}
} else if (hasFetchedSubscriptions2) {
if (isFetchingOffer2) {
require();
value = require(4015) /* metro dependency 4015: ChatInputUtils */;
value = value.getBestActiveInput();
if (value != null) {
value.closeCustomKeyboard();
}
} else if (env0_6.current < 5) {
env0_4(true);
Promise = global.Promise;
all = Promise.all;
items = [hasFetchedSubscriptions2 ? global.Promise.resolve() : (require(4223) /* metro dependency 4223: BillingActionCreators */).fetchSubscriptions()];
if (isFetchingOffer2) {
r6 = global.Promise.resolve();
} else {
value = require(7507) /* metro dependency 7507: UserOfferActionCreators */;
value = value.fetchUserOffer('usePremiumFeatureUpsellGetNitro');
r6 = value;
}
items[1] = r6;
value = Reflect.apply(all, Promise, [items]);
value = value.then(_fun63269);
value = value.catch(_fun63270);
value.finally(_fun63271);
} else {
require();
value = require(4015) /* metro dependency 4015: ChatInputUtils */;
value = value.getBestActiveInput();
if (value != null) {
value.closeCustomKeyboard();
}
}
} else if (env0_6.current < 5) {
env0_4(true);
Promise = global.Promise;
all = Promise.all;
items = [hasFetchedSubscriptions2 ? global.Promise.resolve() : (require(4223) /* metro dependency 4223: BillingActionCreators */).fetchSubscriptions()];
if (isFetchingOffer2) {
r6 = global.Promise.resolve();
} else {
value = require(7507) /* metro dependency 7507: UserOfferActionCreators */;
value = value.fetchUserOffer('usePremiumFeatureUpsellGetNitro');
r6 = value;
}
items[1] = r6;
value = Reflect.apply(all, Promise, [items]);
value = value.then(_fun63269);
value = value.catch(_fun63270);
value.finally(_fun63271);
} else {
require();
value = require(4015) /* metro dependency 4015: ChatInputUtils */;
value = value.getBestActiveInput();
if (value != null) {
value.closeCustomKeyboard();
}
}
} else if (hasFetchedSubscriptions2) {
if (isFetchingOffer2) {
require();
value = require(4015) /* metro dependency 4015: ChatInputUtils */;
value = value.getBestActiveInput();
if (value != null) {
value.closeCustomKeyboard();
}
} else if (env0_6.current < 5) {
env0_4(true);
Promise = global.Promise;
all = Promise.all;
items = [hasFetchedSubscriptions2 ? global.Promise.resolve() : (require(4223) /* metro dependency 4223: BillingActionCreators */).fetchSubscriptions()];
if (isFetchingOffer2) {
r6 = global.Promise.resolve();
} else {
value = require(7507) /* metro dependency 7507: UserOfferActionCreators */;
value = value.fetchUserOffer('usePremiumFeatureUpsellGetNitro');
r6 = value;
}
items[1] = r6;
value = Reflect.apply(all, Promise, [items]);
value = value.then(_fun63269);
value = value.catch(_fun63270);
value.finally(_fun63271);
} else {
require();
value = require(4015) /* metro dependency 4015: ChatInputUtils */;
value = value.getBestActiveInput();
if (value != null) {
value.closeCustomKeyboard();
}
}
} else if (env0_6.current < 5) {
env0_4(true);
Promise = global.Promise;
all = Promise.all;
items = [hasFetchedSubscriptions2 ? global.Promise.resolve() : (require(4223) /* metro dependency 4223: BillingActionCreators */).fetchSubscriptions()];
if (isFetchingOffer2) {
r6 = global.Promise.resolve();
} else {
value = require(7507) /* metro dependency 7507: UserOfferActionCreators */;
value = value.fetchUserOffer('usePremiumFeatureUpsellGetNitro');
r6 = value;
}
items[1] = r6;
value = Reflect.apply(all, Promise, [items]);
value = value.then(_fun63269);
value = value.catch(_fun63270);
value.finally(_fun63271);
} else {
require();
value = require(4015) /* metro dependency 4015: ChatInputUtils */;
value = value.getBestActiveInput();
if (value != null) {
value.closeCustomKeyboard();
}
}
}
function _fun63269() { // fn#63269, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8077:1033, offset: 0x01b7853c, size: 37 bytes, params: 1, frame: 11
const binding = env1_6;
binding.current = binding.current + 1;
env1_7();
}
function _fun63270() { // fn#63270, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8077:1065, offset: 0x01b78561, size: 89 bytes, params: 1, frame: 16
const toastUtilsModule = importAll(3856) /* metro dependency 3856: ToastUtils */;
const presentFailedToast = toastUtilsModule.presentFailedToast;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const R0RpRX = (require(1244) /* metro dependency 1244: indexNative */).t.R0RpRX;
Reflect.apply(presentFailedToast, toastUtilsModule, [Reflect.apply(string, intl, [R0RpRX])]);
}
@@ -0,0 +1,23 @@
/* Metro module 8605; source: modules/premium/roadblocks/native/hooks/useShowNitroUpsellCallback.tsx; dependencies: [31, 4017, 2] */
function _fun67953(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#67953, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8790:6, offset: 0x01c39db7, size: 114 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importAll(31) /* metro dependency 31 */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/roadblocks/native/hooks/useShowNitroUpsellCallback.tsx');
exports.default = useShowNitroUpsellCallback;
}
function useShowNitroUpsellCallback() { // fn#67954, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8790:220, offset: 0x01c39e29, size: 88 bytes, params: 1, frame: 15
const value2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(false);
const binding = env0_2;
const useCallback = binding.useCallback;
let object = [value2];
object = {shouldShowUpsell: value2, onShowNitroUpsell: Reflect.apply(useCallback, binding, [_fun67955, object])};
return object;
}
function _fun67955(a0) { // fn#67955, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8790:308, offset: 0x01c39e81, size: 24 bytes, params: 2, frame: 11
env0_0.set(a0);
}
@@ -0,0 +1,55 @@
/* Metro module 7898; source: modules/premium/roadblocks/native/utils/PremiumFeatureUpsellUtils.tsx; dependencies: [6639, 7892, 676, 44, 2] */
function _fun63263(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#63263, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8076:6, offset: 0x01b77e71, size: 112 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/roadblocks/native/utils/PremiumFeatureUpsellUtils.tsx');
exports.isSoundboardSectionNitroLocked = isSoundboardSectionNitroLocked;
exports.getUpsellType = getUpsellType;
}
function isSoundboardSectionNitroLocked(a0, a1) { // fn#63264, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8076:228, offset: 0x01b77ee1, size: 70 bytes, params: 3, frame: 13
const type = a1.type;
const SoundboardSoundGridSectionType = (require(6639) /* metro dependency 6639: SoundboardTypes */).SoundboardSoundGridSectionType;
const GUILD = SoundboardSoundGridSectionType.GUILD;
return type === GUILD && a1.guild.id !== a0;
}
function getUpsellType(a0) { // fn#63265, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8076:367, offset: 0x01b77f27, size: 622 bytes, params: 2, frame: 15
const UpsellTypes = (require(676) /* metro dependency 676: ConstantsIOS */).UpsellTypes;
const EntitlementFeatureNames = (require(7892) /* metro dependency 7892: EntitlementFeatureNames */).EntitlementFeatureNames;
const ANIMATED_EMOJIS = EntitlementFeatureNames.ANIMATED_EMOJIS;
if (ANIMATED_EMOJIS === a0) {
return UpsellTypes.ANIMATED_EMOJI;
}
const EMOJIS_EVERYWHERE = EntitlementFeatureNames.EMOJIS_EVERYWHERE;
if (EMOJIS_EVERYWHERE === a0) {
return UpsellTypes.GLOBAL_EMOJI;
}
const INCREASED_FILE_UPLOAD_SIZE = EntitlementFeatureNames.INCREASED_FILE_UPLOAD_SIZE;
if (INCREASED_FILE_UPLOAD_SIZE === a0) {
return UpsellTypes.UPLOAD;
}
const SOUNDBOARD_EVERYWHERE = EntitlementFeatureNames.SOUNDBOARD_EVERYWHERE;
if (SOUNDBOARD_EVERYWHERE === a0) {
return UpsellTypes.SOUNDBOARD;
}
const CLIENT_THEMES = EntitlementFeatureNames.CLIENT_THEMES;
if (CLIENT_THEMES === a0) {
return UpsellTypes.CLIENT_THEMES;
}
const APP_ICONS = EntitlementFeatureNames.APP_ICONS;
if (APP_ICONS === a0) {
return UpsellTypes.APP_ICONS;
}
const SAVED_MESSAGES = EntitlementFeatureNames.SAVED_MESSAGES;
if (SAVED_MESSAGES === a0) {
return UpsellTypes.FOR_LATER;
}
const STREAM_HIGH_QUALITY = EntitlementFeatureNames.STREAM_HIGH_QUALITY;
if (STREAM_HIGH_QUALITY === a0) {
return UpsellTypes.STREAM_HIGH_QUALITY;
}
(importDefault(44) /* metro dependency 44 */)(false, 'Missing featureName: ' + a0);
}
@@ -0,0 +1,18 @@
/* Metro module 7890; source: modules/premium/roadblocks/native/utils/openPremiumUpsellActionSheet.tsx; dependencies: [4080, 7891, 1962, 2] */
function _fun63205(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#63205, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8068:6, offset: 0x01b75539, size: 113 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/roadblocks/native/utils/openPremiumUpsellActionSheet.tsx');
exports.default = openPremiumUpsellActionSheet;
exports.PREMIUM_UPSELL_ACTION_SHEET_KEY = 'PremiumUpsellActionSheetKey';
}
function openPremiumUpsellActionSheet(a0) { // fn#63206, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8068:244, offset: 0x01b755aa, size: 89 bytes, params: 2, frame: 16
const defaultImport = importDefault(dependencyMap[0]);
const openLazy = defaultImport.openLazy;
let value = require(dependencyMap[2]);
value = value(dependencyMap[1], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport, [value, 'PremiumUpsellActionSheetKey', {featureName: a0}]);
}
@@ -0,0 +1,45 @@
/* Metro module 7889; source: modules/premium/roadblocks/native/utils/shouldOpenPremiumUpsellActionSheet.tsx; dependencies: [7890, 676, 7892, 2] */
function _fun63202(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#63202, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8067:6, offset: 0x01b75303, size: 110 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/roadblocks/native/utils/shouldOpenPremiumUpsellActionSheet.tsx');
exports.default = maybeOpenPremiumUpsellActionSheet;
}
function _maybeOpenPremiumUpsellActionSheet(a0) { // fn#63203, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8067:43, offset: 0x01b75371, size: 36 bytes, params: 2, frame: 11
(importDefault(7890) /* metro dependency 7890: openPremiumUpsellActionSheet */)(a0);
return true;
}
function maybeOpenPremiumUpsellActionSheet({initialUpsellKey}) { // fn#63204, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8067:282, offset: 0x01b75395, size: 420 bytes, params: 2, frame: 14
const EntitlementFeatureNames = (require(7892) /* metro dependency 7892: EntitlementFeatureNames */).EntitlementFeatureNames;
const UpsellTypes = (require(676) /* metro dependency 676: ConstantsIOS */).UpsellTypes;
const UPLOAD = UpsellTypes.UPLOAD;
if (UPLOAD === initialUpsellKey) {
_maybeOpenPremiumUpsellActionSheet(EntitlementFeatureNames.INCREASED_FILE_UPLOAD_SIZE);
return true;
}
const GLOBAL_EMOJI = UpsellTypes.GLOBAL_EMOJI;
if (GLOBAL_EMOJI === initialUpsellKey) {
_maybeOpenPremiumUpsellActionSheet(EntitlementFeatureNames.EMOJIS_EVERYWHERE);
return true;
}
const ANIMATED_EMOJI = UpsellTypes.ANIMATED_EMOJI;
if (ANIMATED_EMOJI === initialUpsellKey) {
_maybeOpenPremiumUpsellActionSheet(EntitlementFeatureNames.ANIMATED_EMOJIS);
return true;
}
const SOUNDBOARD = UpsellTypes.SOUNDBOARD;
if (SOUNDBOARD === initialUpsellKey) {
_maybeOpenPremiumUpsellActionSheet(EntitlementFeatureNames.SOUNDBOARD_EVERYWHERE);
return true;
}
const STREAM_HIGH_QUALITY = UpsellTypes.STREAM_HIGH_QUALITY;
if (STREAM_HIGH_QUALITY === initialUpsellKey) {
_maybeOpenPremiumUpsellActionSheet(EntitlementFeatureNames.STREAM_HIGH_QUALITY);
return true;
}
return false;
}
@@ -0,0 +1,48 @@
/* Metro module 8616; source: modules/premium/roadblocks/native/views/PremiumEmojiFeatureUpsell.tsx; dependencies: [31, 27, 33, 4501, 697, 1585, 6996, 676, 4017, 8617, 7892, 2] */
function _fun68012(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68012, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8801:6, offset: 0x01c3b64d, size: 208 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(27) /* metro dependency 27 */).View;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
const env0_5 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(function(a0) {
var PX_12 = importDefault(dependencyMap[4]).space.PX_12;
return {container: {'position': 'absolute', 'bottom': null, 'left': 0, 'right': 0, bottom: a0 + PX_12}};
});
object = {code: 'function PremiumEmojiFeatureUpsellTsx1(){const{shouldShow,inPortalKeyboard,bottomSheetIndex}=this.__closure;if(!shouldShow.get()){return false;}return inPortalKeyboard?bottomSheetIndex.get()===1:bottomSheetIndex.get()===0;}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/roadblocks/native/views/PremiumEmojiFeatureUpsell.tsx');
exports.default = PremiumEmojiFeatureUpsell;
}
function PremiumEmojiFeatureUpsell({bottomSheetIndex, inPortalKeyboard, shouldShow}) { // fn#68014, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8801:591, offset: 0x01c3b764, size: 301 bytes, params: 2, frame: 21
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
const value2 = (importDefault(6996) /* metro dependency 6996: useKeyboardIsOpen */)();
const EXPRESSION_FOOTER_HEIGHT = (require(676) /* metro dependency 676: ConstantsIOS */).EXPRESSION_FOOTER_HEIGHT;
const styles = useStyles(EXPRESSION_FOOTER_HEIGHT + bottom);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useDerivedValue = reanimatedRexportModule.useDerivedValue;
const closure = PremiumEmojiFeatureUpsellC;
closure.__closure = {shouldShow: shouldShow, inPortalKeyboard: inPortalKeyboard, bottomSheetIndex: bottomSheetIndex};
closure.__workletHash = 10168295304319;
closure.__initData = env0_6;
return value2 ? null : <View style={styles.container}>{((Component) => <Component shouldShow={Reflect.apply(useDerivedValue,
reanimatedRexportModule,
[closure])} featureName={(require(7892) /* metro dependency 7892: EntitlementFeatureNames */).EntitlementFeatureNames.EMOJIS_EVERYWHERE} />)(importDefault(8617) /* metro dependency 8617: PremiumFeatureUpsell */)}</View>;
}
function PremiumEmojiFeatureUpsellC() { // fn#68015, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8801:787, owner: PremiumEmojiFeatureUpsell.c, offset: 0x01c3b891, size: 65 bytes, params: 1, frame: 11
var r0;
var inPortalKeyboardBinding;
var value;
const value2 = shouldShow.get();
if (value2) {
inPortalKeyboardBinding = inPortalKeyboard;
value = bottomSheetIndex.get();
r0 = inPortalKeyboardBinding ? value === 1 : value === 0;
} else {
r0 = !!value2;
}
return r0;
}
@@ -0,0 +1,267 @@
/* Metro module 8617; source: modules/premium/roadblocks/native/views/PremiumFeatureUpsell.tsx; dependencies: [31, 27, 1880, 661, 7047, 33, 7892, 3802, 1244, 4501, 697, 7882, 7898, 7890, 7899, 1305, 8618, 8619, 6766, 4589, 676, 4577, 4581, 6771, 8620, 8621, 4017, 683, 8549, 2] */
function _fun68016(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68016, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8802:6, offset: 0x01c3b8d2, size: 380 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
const env0_4 = value.StyleSheet;
const env0_5 = value.View;
value = require(1880) /* metro dependency 1880: PremiumConstants */;
const env0_6 = value.PremiumSubscriptionSKUs;
const env0_7 = value.PremiumTypes;
const env0_8 = value.PremiumUpsellTypes;
value = require(661) /* metro dependency 661: Constants */;
const env0_9 = value.AnalyticEvents;
const env0_10 = value.AnalyticsPages;
const env0_11 = (require(7047) /* metro dependency 7047: ColorConstants */).Gradients;
value = require(33) /* metro dependency 33 */;
const env0_12 = value.jsx;
const env0_13 = value.jsxs;
const env0_14 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun68022);
object = {code: "function animationEnterExit_PremiumFeatureUpsellTsx1(visible,cleanUp){const{withSpring,springStandard}=this.__closure;return{opacity:withSpring(visible,springStandard,'respect-motion-settings',function(finished){cleanUp===null||cleanUp===void 0||cleanUp(finished);})};}"};
object = {code: 'function PremiumFeatureUpsellTsx2(finished){const{cleanUp}=this.__closure;var _cleanUp;(_cleanUp=cleanUp)===null||_cleanUp===void 0||_cleanUp(finished);}'};
const env0_17 = _fun68023();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/roadblocks/native/views/PremiumFeatureUpsell.tsx');
exports.default = PremiumFeatureUpsell;
}
function getPremiumUpsellType(a0) { // fn#68017, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8802:313, offset: 0x01c3ba4e, size: 244 bytes, params: 2, frame: 14
const EntitlementFeatureNames = (require(7892) /* metro dependency 7892: EntitlementFeatureNames */).EntitlementFeatureNames;
const SOUNDBOARD_EVERYWHERE = EntitlementFeatureNames.SOUNDBOARD_EVERYWHERE;
if (SOUNDBOARD_EVERYWHERE === a0) {
return PremiumUpsellTypes.SOUNDBOARD_EVERYWHERE_INLINE_UPSELL;
}
const EMOJIS_EVERYWHERE = EntitlementFeatureNames.EMOJIS_EVERYWHERE;
if (EMOJIS_EVERYWHERE === a0) {
return PremiumUpsellTypes.EMOJI_EVERYWHERE_INLINE_UPSELL;
}
const INCREASED_FILE_UPLOAD_SIZE = EntitlementFeatureNames.INCREASED_FILE_UPLOAD_SIZE;
if (INCREASED_FILE_UPLOAD_SIZE === a0) {
return PremiumUpsellTypes.LARGER_FILE_UPLOAD_INLINE_UPSELL;
}
const APP_ICONS = EntitlementFeatureNames.APP_ICONS;
if (APP_ICONS === a0) {
return PremiumUpsellTypes.APP_ICON_INLINE_UPSELL;
}
const STREAM_HIGH_QUALITY = EntitlementFeatureNames.STREAM_HIGH_QUALITY;
if (STREAM_HIGH_QUALITY === a0) {
return PremiumUpsellTypes.STREAM_QUALITY_UPSELL;
}
}
function PremiumFeatureUpsellPill({featureName, showShadow, style}) { // fn#68018, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8802:1635, offset: 0x01c3bb42, size: 1277 bytes, params: 2, frame: 33
var r21;
const intl = require(dependencyMap[8]).intl;
var format;
var object2;
var zzyLEK;
showShadow = showShadow === undefined || showShadow;
const moduleValue = require(dependencyMap[11]);
const usePremiumUpsellConfig = moduleValue.usePremiumUpsellConfig;
const moduleValue2 = require(dependencyMap[12]);
const getUpsellType = moduleValue2.getUpsellType;
const {useTier0UpsellContent, onViewAllPerks} = Reflect.apply(usePremiumUpsellConfig, moduleValue,
[Reflect.apply(getUpsellType, moduleValue2, [featureName])]);
const styles = useStyles(useTier0UpsellContent);
const r4 = useTier0UpsellContent ? PremiumTypes.TIER_0 : PremiumTypes.TIER_2;
const closure = onClick_68019;
const premiumTypeDisplayName = require(dependencyMap[7]).getPremiumTypeDisplayName(r4);
const EntitlementFeatureNames = require(dependencyMap[6]).EntitlementFeatureNames;
const SOUNDBOARD_EVERYWHERE = EntitlementFeatureNames.SOUNDBOARD_EVERYWHERE;
if (SOUNDBOARD_EVERYWHERE === featureName) {
r21 = intl.format(require(dependencyMap[8]).t['tw/SSq'], {nitroTierName: premiumTypeDisplayName,
onClick: closure});
} else if (require(dependencyMap[6]).EntitlementFeatureNames.EMOJIS_EVERYWHERE === featureName) {
r21 = intl.format(require(dependencyMap[8]).t.gMVjeS, {nitroTierName: premiumTypeDisplayName,
onClick: closure});
} else if (require(dependencyMap[6]).EntitlementFeatureNames.INCREASED_FILE_UPLOAD_SIZE === featureName) {
format = intl.format;
zzyLEK = require(dependencyMap[8]).t.zzyLEK;
object2 = {};
object2.maxFileSize = require(dependencyMap[7]).getMaxFileSizeForPremiumType(r4);
object2.nitroTierName = premiumTypeDisplayName;
object2.onClick = closure;
r21 = Reflect.apply(format, intl, [zzyLEK, object2]);
} else {
r21 = require(dependencyMap[6]).EntitlementFeatureNames.STREAM_HIGH_QUALITY === featureName ? intl.format(require(dependencyMap[8]).t.lyxfbj,
{nitroTierName: premiumTypeDisplayName,
onClick: closure}) : require(dependencyMap[6]).EntitlementFeatureNames.APP_ICONS !== featureName ? undefined : intl.format(require(dependencyMap[8]).t.x2dQxN,
{onClick: closure});
}
const defaultImport = importDefault(dependencyMap[14]);
const PREMIUM_UPSELL_FILE_UPLOAD = AnalyticsPages.PREMIUM_UPSELL_FILE_UPLOAD;
const {loading, onPress} = defaultImport(useTier0UpsellContent, onViewAllPerks, PREMIUM_UPSELL_FILE_UPLOAD);
const items2 = [styles.container];
items2[1] = showShadow && styles.containerShadow;
items2[2] = style;
const Icon = require(dependencyMap[15]).Icon;
const icon = <Icon source={importDefault(useTier0UpsellContent ? dependencyMap[16] : dependencyMap[17])} style={styles.nitroWheel} disableColor />;
const TextWithIOSLinkWorkaround = require(dependencyMap[18]).TextWithIOSLinkWorkaround;
const view = <View style={styles.labelContainer}>{icon}<TextWithIOSLinkWorkaround style={styles.text} variant="text-sm/medium">{r21}</TextWithIOSLinkWorkaround></View>;
const ShinyButton = require(dependencyMap[15]).ShinyButton;
const ButtonSizes = require(dependencyMap[15]).ButtonSizes;
const XSMALL = ButtonSizes.XSMALL;
const string = intl.string;
const t = require(dependencyMap[8]).t;
const r10 = useTier0UpsellContent ? Reflect.apply(string, intl, [t.cM8bbx]) : Reflect.apply(string, intl,
[t['8x0jKT']]);
const ButtonColors = require(dependencyMap[15]).ButtonColors;
const GREEN = ButtonColors.GREEN;
return (
<View style={items2}>
{view}
<ShinyButton
disabled={loading}
shrink
style={styles.button}
size={XSMALL}
onPress={onPress}
text={r10}
color={GREEN}
renderIcon={renderIcon}
renderLinearGradient={renderLinearGradient}
/>
</View>
);
}
function _fun68022(a0) { // fn#68022, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8802:857, offset: 0x01c3c14f, size: 423 bytes, params: 2, frame: 19
const object4 = {};
const object5 = {flexDirection: 'row'};
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object5.backgroundColor = BACKGROUND_SURFACE_HIGH;
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object5.padding = PX_12;
object5.justifyContent = 'space-between';
object4.container = object5;
const object6 = {};
const SHADOW_HIGH = (importDefault(697) /* metro dependency 697: native */).shadows.SHADOW_HIGH;
copyDataProperties(object6, SHADOW_HIGH, undefined);
const unsafe_rawColors = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors;
object6['shadowColor'] = a0 ? unsafe_rawColors.PREMIUM_TIER_0_BLUE_FOR_GRADIENTS_2 : unsafe_rawColors.PREMIUM_TIER_2_PURPLE_FOR_GRADIENTS_2;
object6['shadowOpacity'] = 0.6;
object4.containerShadow = object6;
let PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object4.nitroWheel = {'width': 20, 'height': 20, marginEnd: PX_4};
PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object4.labelContainer = {'flexDirection': 'row', 'flexShrink': 1, 'alignItems': 'center', marginEnd: PX_4};
object4.text = {'flexShrink': 1, 'flexWrap': 'wrap'};
object4.nitroWheelButton = {'marginStart': -2, 'width': 20, 'height': 20};
object4.nitroWheelDisabled = {opacity: 0.6};
const object9 = {alignSelf: 'center'};
object9.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object4.button = object9;
const object10 = {};
copyDataProperties(object10, StyleSheet.absoluteFillObject, PX_4);
object4.gradient = object10;
return object4;
}
function _fun68023() { // fn#68023, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8802:3947, offset: 0x01c3c2f6, size: 102 bytes, params: 1, frame: 15
const closure = animationEnterExit;
const object2 = {};
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object2.springStandard = (require(4581) /* metro dependency 4581: springPresets */).springStandard;
closure.__closure = object2;
closure.__workletHash = 15470414797897;
closure.__initData = env0_15;
return closure;
}
function PremiumFeatureUpsell(a0) { // fn#68026, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8802:4511, offset: 0x01c3c3fd, size: 286 bytes, params: 2, frame: 25
const shouldShow = a0.shouldShow;
let value = Object.create(null);
value.shouldShow = 0;
value = copyDataProperties({}, a0, value, undefined);
let binding = env0_3;
const value3 = binding.useRef(false);
const value4 = undefined;
const analyticsLocations = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().analyticsLocations;
const analyticsModule = require(8620) /* metro dependency 8620: analytics */;
const useAnalyticsContext = analyticsModule.useAnalyticsContext;
const location = Reflect.apply(useAnalyticsContext, analyticsModule, []).location;
const value5 = (importDefault(8621) /* metro dependency 8621: useStateFromSharedValue */)(shouldShow);
const value6 = binding.useCallback(_fun68027, []);
binding.useEffect(_fun68028, [value3, location, analyticsLocations, value5, value.featureName]);
const AnimatedEnterExitItem = importDefault(8549) /* metro dependency 8549: AnimatedEnterExitItem */;
const r6 = value5 ? value : value4;
binding = env0_17;
return (
<AnimatedEnterExitItem
useReducedMotion={false}
item={r6}
entering={binding}
exiting={binding}
renderItem={value6}
/>
);
}
function PremiumFeatureUpsellPillOnClick() { // fn#68019, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8802:2631, owner: PremiumFeatureUpsellPill.onClick, offset: 0x01c3c03f, size: 39 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (importDefault(7890) /* metro dependency 7890: openPremiumUpsellActionSheet */)(featureName);
}
function PremiumFeatureUpsellPillRenderIcon() { // fn#68020, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8802:3225, owner: PremiumFeatureUpsellPill.renderIcon, offset: 0x01c3c066, size: 91 bytes, params: 1, frame: 17
const NitroWheel = (require(1305) /* metro dependency 1305: native */).NitroWheel;
return <NitroWheel style={[styles.nitroWheelButton, loading && styles.nitroWheelDisabled]} />;
}
function PremiumFeatureUpsellPillRenderLinearGradient() { // fn#68021, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8802:3326, owner: PremiumFeatureUpsellPill.renderLinearGradient, offset: 0x01c3c0c1, size: 142 bytes, params: 1, frame: 19
const defaultImport = importDefault(4589) /* metro dependency 4589 */;
const {START, END} = (require(676) /* metro dependency 676: ConstantsIOS */).HorizontalGradient;
return ((Component) => <Component style={styles.gradient} start={START} end={END} colors={useTier0UpsellContent ? Gradients.PREMIUM_TIER_0 : Gradients.PREMIUM_TIER_2_TRI_COLOR} />)(defaultImport);
}
function animationEnterExit(a0, a1) { // fn#68024, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8802:3981, offset: 0x01c3c35c, size: 130 bytes, params: 3, frame: 21
const env0_0 = a1;
const springModule = require(4577) /* metro dependency 4577: spring */;
const withSpring = springModule.withSpring;
const springStandard = (require(4581) /* metro dependency 4581: springPresets */).springStandard;
const closure = function(a0) {
if (require != null) {
require(a0);
}
};
closure.__closure = {cleanUp: a1};
closure.__workletHash = 7812030105128;
closure.__initData = env1_16;
return {opacity: Reflect.apply(withSpring, springModule, [a0, springStandard, 'respect-motion-settings', closure])};
}
function _fun68027(a0, a1) { // fn#68027, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8802:4686, offset: 0x01c3c51b, size: 81 bytes, params: 3, frame: 17
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
return (
<View style={a1}>
<PremiumFeatureUpsellPill {...a0} />
</View>
);
}
function _fun68028() { // fn#68028, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8802:4789, offset: 0x01c3c56c, size: 174 bytes, params: 1, frame: 19
var value3;
var defaultImport;
var track;
var PREMIUM_UPSELL_VIEWED;
var object2;
var moduleValue;
if (!env0_1.current && env0_4) {
value3 = environment.__proto__;
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
track = defaultImport.track;
PREMIUM_UPSELL_VIEWED = AnalyticEvents.PREMIUM_UPSELL_VIEWED;
object2 = {};
object2.type = getPremiumUpsellType(env0_0.featureName);
object2.location = location;
object2.location_stack = analyticsLocations;
moduleValue = require(3802) /* metro dependency 3802: PremiumUtils */;
object2.sku_id = moduleValue.castPremiumSubscriptionAsSkuId(PremiumSubscriptionSKUs.TIER_2);
Reflect.apply(track, defaultImport, [PREMIUM_UPSELL_VIEWED, object2]);
env0_1.current = true;
}
}
@@ -0,0 +1,33 @@
/* Metro module 15430; source: modules/premium/roadblocks/native/views/PremiumSoundboardFeatureUpsell.tsx; dependencies: [31, 27, 33, 4501, 697, 1585, 676, 8617, 7892, 2] */
function _fun118037(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118037, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15627:6, offset: 0x024c9acf, size: 192 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(27) /* metro dependency 27 */).View;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
const env0_5 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(function(a0) {
var object2 = {'position': 'absolute', 'bottom': null, 'left': 0, 'right': 0};
var PX_12 = importDefault(dependencyMap[4]).space.PX_12;
object2.bottom = a0 + PX_12;
object2.marginHorizontal = importDefault(dependencyMap[4]).space.PX_12;
return {container: object2};
});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/roadblocks/native/views/PremiumSoundboardFeatureUpsell.tsx');
exports.default = PremiumSoundboardFeatureUpsell;
}
function PremiumSoundboardFeatureUpsell({shouldShow}) { // fn#118039, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15627:397, offset: 0x024c9bef, size: 163 bytes, params: 2, frame: 18
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
const EXPRESSION_FOOTER_HEIGHT = (require(676) /* metro dependency 676: ConstantsIOS */).EXPRESSION_FOOTER_HEIGHT;
const styles = useStyles(EXPRESSION_FOOTER_HEIGHT + bottom);
const premiumFeatureUpsell = importDefault(8617) /* metro dependency 8617: PremiumFeatureUpsell */;
const EntitlementFeatureNames = (require(7892) /* metro dependency 7892: EntitlementFeatureNames */).EntitlementFeatureNames;
const SOUNDBOARD_EVERYWHERE = EntitlementFeatureNames.SOUNDBOARD_EVERYWHERE;
return (
<View style={styles.container}>
{((Component) => <Component shouldShow={shouldShow} featureName={SOUNDBOARD_EVERYWHERE} />)(premiumFeatureUpsell)}
</View>
);
}
@@ -0,0 +1,464 @@
/* Metro module 7891; source: modules/premium/roadblocks/native/views/PremiumUpsellActionSheet.tsx; dependencies: [57, 31, 27, 4502, 1310, 1312, 3969, 1878, 1880, 661, 7047, 4282, 33, 4501, 697, 3860, 3802, 7892, 4697, 4655, 1244, 3853, 1948, 7893, 7894, 7895, 7542, 676, 566, 7896, 6808, 4573, 477, 7897, 5475, 7882, 7898, 6771, 683, 7899, 4015, 4080, 7890, 6805, 4589, 7900, 6766, 1305, 4578, 2] */
function _fun63207(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#63207, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8069:6, offset: 0x01b75603, size: 965 bytes, params: 8, frame: 25
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 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const themeStore = importDefault(1310) /* metro dependency 1310: ThemeStore */;
const unsyncedUserSettingsStore = importDefault(1312) /* metro dependency 1312: UnsyncedUserSettingsStore */;
const selectedGuildStore = importDefault(3969) /* metro dependency 3969: SelectedGuildStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
let value = require(1880) /* metro dependency 1880: PremiumConstants */;
const env0_11 = value.PremiumSubscriptionSKUs;
const env0_12 = value.PremiumTypes;
const env0_13 = value.PremiumUpsellTypes;
value = require(661) /* metro dependency 661: Constants */;
const env0_14 = value.AnalyticEvents;
const env0_15 = value.AnalyticsPages;
const env0_16 = value.HelpdeskArticles;
const env0_17 = value.ThemeTypes;
const env0_18 = (require(7047) /* metro dependency 7047: ColorConstants */).Gradients;
const env0_19 = (require(4282) /* metro dependency 4282: StreamSettingsConstants */).ApplicationStreamFPS;
value = require(33) /* metro dependency 33 */;
const env0_20 = value.Fragment;
const env0_21 = value.jsx;
const env0_22 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.image = {'alignSelf': 'center', 'marginTop': null, 'width': 240, 'height': 144, marginTop: PX_16};
object2.text = {'alignSelf': 'center', 'textAlign': 'center'};
object2.betaTag = {marginLeft: 0};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.description = {marginHorizontal: PX_16};
const object3 = {};
let PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object3.marginTop = PX_24;
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object3.marginHorizontal = PX_8;
object3.alignItems = 'center';
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object3.gap = PX_8;
object2.textContainer = object3;
const object4 = {};
let PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
object4.marginTop = PX_32;
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object4.gap = PX_8;
object2.buttonContainer = object4;
const object8 = {};
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object2.button = object8;
object2.gradient = {'width': '100%', 'height': '100%', 'position': 'absolute', 'overflow': 'hidden'};
object2.nitroWheel = {'width': 20, 'height': 20, 'marginEnd': 2};
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object2.compressionContainer = {marginTop: PX_24};
object2.compressionHint = {marginTop: 2};
object2.imageGradientBackgroundContainer = {'display': 'flex', 'width': '100%', 'justifyContent': 'center',
'alignItems': 'center'};
const object9 = {width: '100%'};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object9.marginHorizontal = PX_16;
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object9.borderRadius = PX_12;
object2.imageGradientBackground = object9;
const object12 = {};
PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
object12.marginTop = PX_32;
PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
object12.marginBottom = PX_32;
object2.imageInGradientBackground = object12;
const env0_23 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/roadblocks/native/views/PremiumUpsellActionSheet.tsx');
exports.default = PremiumUpsellActionSheet;
}
function getPageContent(a0, a1) { // fn#63208, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8069:1422, offset: 0x01b759c8, size: 72 bytes, params: 3, frame: 15
const EntitlementFeatureNames = (require(7892) /* metro dependency 7892: EntitlementFeatureNames */).EntitlementFeatureNames;
const INCREASED_FILE_UPLOAD_SIZE = EntitlementFeatureNames.INCREASED_FILE_UPLOAD_SIZE;
return a0 !== INCREASED_FILE_UPLOAD_SIZE ? null : <AlwaysCompressImagesSwitch isKestrelTreatment={a1} />;
}
function AlwaysCompressImagesSwitch({isKestrelTreatment}) { // fn#63209, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8069:1580, offset: 0x01b75a10, size: 388 bytes, params: 2, frame: 27
var r0;
var TableSwitchRow;
var object2;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const styles = useStyles();
const dataSavingMode = (require(566) /* metro dependency 566: flux */).useStateFromStores([UnsyncedUserSettingsStore],
function() {
return UnsyncedUserSettingsStore.dataSavingMode;
});
if (env0_3(env0_4.useState(!dataSavingMode), 1)[0]) {
if (isKestrelTreatment) {
r0 = null;
} else {
var viewBindingProps = {style: styles.compressionContainer};
TableSwitchRow = (require(6808) /* metro dependency 6808: TableSwitchRowNative */).TableSwitchRow;
r0 = <View {...viewBindingProps}><TableSwitchRow start end label={intl.string(t.ix8XIj)} value={dataSavingMode} onValueChange={env0_4.useCallback(_fun63211,
[])} subLabel={((Text) => <Text style={styles.compressionHint} variant="text-xs/normal">{intl.string(t['wC0+Ph'])}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)} /></View>;
}
} else {
r0 = null;
}
return r0;
}
function PremiumUpsellImage({image, style, useReducedMotion}) { // fn#63212, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8069:2120, offset: 0x01b75bd3, size: 196 bytes, params: 2, frame: 18
var r0;
var value;
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (platformUtilsModule.isAndroid()) {
if (useReducedMotion) {
value = importDefault(5475) /* metro dependency 5475: FastImage */;
value = ((Component) => <Component source={image} resizeMode="contain" style={style} enableAnimation={!useReducedMotion} accessible={false} />)(value);
r0 = value;
} else if (image.uri == null) {
value = importDefault(5475) /* metro dependency 5475: FastImage */;
value = ((Component) => <Component source={image} resizeMode="contain" style={style} enableAnimation={!useReducedMotion} accessible={false} />)(value);
r0 = value;
} else {
const APNGPlayer = (require(7897) /* metro dependency 7897: APNGPlayerAndroid */).APNGPlayer;
r0 = <APNGPlayer url={image.uri} style={style} autoplay />;
}
} else {
value = importDefault(5475) /* metro dependency 5475: FastImage */;
value = ((Component) => <Component source={image} resizeMode="contain" style={style} enableAnimation={!useReducedMotion} accessible={false} />)(value);
r0 = value;
}
return r0;
}
function PremiumUpsellActionSheet({featureName, legacyProps}) { // fn#63213, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8069:2484, offset: 0x01b75c97, size: 1488 bytes, params: 2, frame: 45
var r0;
var r8;
var r10;
var ActionSheet;
var image;
var value8;
var imageGradientBackground;
var object;
var defaultImport2;
var object2;
var object4;
var items2;
var showBetaBadge;
var items3;
var Text;
var text;
var TextWithIOSLinkWorkaround;
var items4;
var description;
var getPageContentBinding;
var ShinyButton;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var items5;
var Button;
const styles = useStyles();
(require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getCurrentUser();
});
const {useTier0UpsellContent,
onViewAllPerks} = (require(7882) /* metro dependency 7882: PremiumUpsellUtils */).usePremiumUpsellConfig(legacyProps?.initialUpsellKey ?? (require(7898) /* metro dependency 7898: PremiumFeatureUpsellUtils */).getUpsellType(featureName));
const property = usePageConfig(undefined, useTier0UpsellContent ? PremiumTypes.TIER_0 : PremiumTypes.TIER_2,
(require(566) /* metro dependency 566: flux */).useStateFromStores([ThemeStore], function() {
return ThemeStore.theme;
}), (require(566) /* metro dependency 566: flux */).useStateFromStores([SelectedGuildStore], function() {
return SelectedGuildStore.getGuildId();
}), featureName)[featureName];
const env0_4 = property;
const analyticsLocations = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().analyticsLocations;
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
let binding = env0_4;
binding.useEffect(_fun63220, [property, analyticsLocations, useTier0UpsellContent, legacyProps]);
const {loading,
onPress} = (importDefault(7899) /* metro dependency 7899: usePremiumFeatureUpsellGetNitro */)(useTier0UpsellContent,
onViewAllPerks, property.analyticsPage);
binding = env0_4;
const useCallback = binding.useCallback;
if (property == null) {
r0 = null;
} else {
ActionSheet = (require(6805) /* metro dependency 6805: ActionSheetNative */).ActionSheet;
image = property.image;
value8 = image != null;
if (value8) {
imageGradientBackground = property.imageGradientBackground;
if (imageGradientBackground != null) {
var viewBinding2Props = {style: styles.imageGradientBackgroundContainer};
defaultImport2 = importDefault(4589) /* metro dependency 4589 */;
object2 = {};
imageGradientBackground = property.imageGradientBackground;
object2.colors = imageGradientBackground.colors;
imageGradientBackground = property.imageGradientBackground;
object2.start = imageGradientBackground.start;
imageGradientBackground = property.imageGradientBackground;
object2.end = imageGradientBackground.end;
imageGradientBackground = styles.imageGradientBackground;
object2.style = imageGradientBackground;
object4 = {};
image = property.image;
object4.image = image;
image = styles.image;
object4.style = [image, styles.imageInGradientBackground];
object4.useReducedMotion = useReducedMotion;
r8 = <View {...viewBinding2Props}>{((Component) => <Component {...object2}><PremiumUpsellImage {...object4} /></Component>)(defaultImport2)}</View>;
} else {
object = {};
image = property.image;
object.image = image;
image = styles.image;
object.style = image;
object.useReducedMotion = useReducedMotion;
r8 = <PremiumUpsellImage {...object} />;
}
r10 = r8;
} else {
r10 = value8;
}
items2 = [r10];
var viewBinding3Props = {style: styles.textContainer};
showBetaBadge = property.showBetaBadge;
items3 = [showBetaBadge !== true ? null : ((Component) => <Component size={(require(7900) /* metro dependency 7900: BetaTag */).BetaSizes.SMALL} gradient style={styles.betaTag} />)(importDefault(7900) /* metro dependency 7900: BetaTag */)];
Text = (require(4573) /* metro dependency 4573: Text */).Text;
text = styles.text;
items3[1] = <Text style={text} variant="heading-lg/extrabold" accessibilityRole="header">{property.title}</Text>;
TextWithIOSLinkWorkaround = (require(6766) /* metro dependency 6766: TextWithIOSLinkWorkaround */).TextWithIOSLinkWorkaround;
text = styles.text;
items4 = [text];
description = styles.description;
items4[1] = description;
description = property.description;
items3[2] = <TextWithIOSLinkWorkaround style={items4} variant="text-sm/normal">{description}</TextWithIOSLinkWorkaround>;
items2[1] = <View {...viewBinding3Props}>{items3}</View>;
getPageContentBinding = getPageContent;
showBetaBadge = property.showBetaBadge;
items2[2] = getPageContentBinding(featureName, showBetaBadge === true);
var viewBinding4Props = {style: styles.buttonContainer};
ShinyButton = (require(1305) /* metro dependency 1305: native */).ShinyButton;
string = intl.string;
items5 = [<ShinyButton loading={loading} style={styles.button} onPress={onPress} text={useTier0UpsellContent ? Reflect.apply(string,
intl, [t.cM8bbx]) : Reflect.apply(string, intl,
[t['8x0jKT']])} color={(require(1305) /* metro dependency 1305: native */).ButtonColors.GREEN} renderIcon={renderIcon} renderLinearGradient={renderLinearGradient} />];
Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
string = intl.string;
items5[1] = <Button variant="secondary" text={Reflect.apply(string, intl,
[t.PcTCB7])} onPress={Reflect.apply(useCallback, binding, [_fun63221, [onViewAllPerks]])} />;
items2[3] = <View {...viewBinding4Props}>{items5}</View>;
r0 = <ActionSheet startExpanded><View>{items2}</View></ActionSheet>;
}
return r0;
}
function _fun63211(a0) { // fn#63211, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8069:1725, offset: 0x01b75ba3, size: 48 bytes, params: 2, frame: 13
const value = environment.__proto__;
(importDefault(7896) /* metro dependency 7896: UserSettingsActionCreators */).updatedUnsyncedSettings({dataSavingMode: a0});
}
function usePageConfig(a0, a1, a2, a3, a4) { // fn#63217, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8069:2880, owner: PremiumUpsellActionSheet.usePageConfig, offset: 0x01b7629b, size: 1924 bytes, params: 6, frame: 35
var r22;
var moduleValue5;
var getEffectiveKestrelLimit;
var moduleValue6;
const value2 = undefined;
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
let useToken = useTokenModule.useToken;
const EXPRESSIVE_GRADIENT_NITRO_GREEN_START = (importDefault(697) /* metro dependency 697: native */).colors.EXPRESSIVE_GRADIENT_NITRO_GREEN_START;
const value3 = Reflect.apply(useToken, useTokenModule, [EXPRESSIVE_GRADIENT_NITRO_GREEN_START]);
const moduleValue2 = useTokenModule;
useToken = moduleValue2.useToken;
const EXPRESSIVE_GRADIENT_NITRO_GREEN_END = (importDefault(697) /* metro dependency 697: native */).colors.EXPRESSIVE_GRADIENT_NITRO_GREEN_END;
const value4 = Reflect.apply(useToken, moduleValue2, [EXPRESSIVE_GRADIENT_NITRO_GREEN_END]);
const LIGHT = ThemeTypes.LIGHT;
const r17 = a2 !== LIGHT ? 'dark' : 'light';
const premiumTypeDisplayName = (require(3802) /* metro dependency 3802: PremiumUtils */).getPremiumTypeDisplayName(a1);
const EntitlementFeatureNames = (require(7892) /* metro dependency 7892: EntitlementFeatureNames */).EntitlementFeatureNames;
let INCREASED_FILE_UPLOAD_SIZE = EntitlementFeatureNames.INCREASED_FILE_UPLOAD_SIZE;
const r3 = a4 !== INCREASED_FILE_UPLOAD_SIZE ? value2 : (require(4697) /* metro dependency 4697: KestrelExperiment */).getKestrelConfig({location: 'native.PremiumUpsellActionSheet'});
if (r3 != null) {
moduleValue5 = require(4697) /* metro dependency 4697: KestrelExperiment */;
getEffectiveKestrelLimit = moduleValue5.getEffectiveKestrelLimit;
moduleValue6 = require(4655) /* metro dependency 4655: FileUtils */;
r22 = Reflect.apply(getEffectiveKestrelLimit, moduleValue5, [r3, moduleValue6.maxFileSize(a3)]);
} else {
r22 = value2;
}
const object3 = {};
const SOUNDBOARD_EVERYWHERE = EntitlementFeatureNames.SOUNDBOARD_EVERYWHERE;
const object4 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
object4.title = Reflect.apply(string, intl, [(require(1244) /* metro dependency 1244: indexNative */).t.jGDYF0]);
let formatToPlainString = intl.formatToPlainString;
let property = (require(1244) /* metro dependency 1244: indexNative */).t['fc+8uy'];
object4.description = Reflect.apply(formatToPlainString, intl, [property, {nitroTierName: premiumTypeDisplayName}]);
const PREMIUM_UPSELL_SOUNDBOARD_EVERYWHERE = AnalyticsPages.PREMIUM_UPSELL_SOUNDBOARD_EVERYWHERE;
object4.analyticsPage = PREMIUM_UPSELL_SOUNDBOARD_EVERYWHERE;
const SOUNDBOARD_EVERYWHERE_UPSELL = PremiumUpsellTypes.SOUNDBOARD_EVERYWHERE_UPSELL;
object4.upsellType = SOUNDBOARD_EVERYWHERE_UPSELL;
object4.image = {uri: 'https://cdn.discordapp.com/assets/premium/roadblocks/soundboard_' + r17 + '.png'};
object3[SOUNDBOARD_EVERYWHERE] = object4;
const EMOJIS_EVERYWHERE = EntitlementFeatureNames.EMOJIS_EVERYWHERE;
const object6 = {};
object6.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.zY5PPb);
object6.description = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['uukIF/'],
{nitroTierName: premiumTypeDisplayName});
const PREMIUM_UPSELL_EMOJI_EVERYWHERE = AnalyticsPages.PREMIUM_UPSELL_EMOJI_EVERYWHERE;
object6.analyticsPage = PREMIUM_UPSELL_EMOJI_EVERYWHERE;
const EMOJI_EVERYWHERE_UPSELL = PremiumUpsellTypes.EMOJI_EVERYWHERE_UPSELL;
object6.upsellType = EMOJI_EVERYWHERE_UPSELL;
object6.image = {uri: 'https://cdn.discordapp.com/assets/premium/roadblocks/emoji_' + r17 + '.png'};
object3[EMOJIS_EVERYWHERE] = object6;
INCREASED_FILE_UPLOAD_SIZE = EntitlementFeatureNames.INCREASED_FILE_UPLOAD_SIZE;
const object7 = {};
object7.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['G+pngo']);
object7.showBetaBadge = (r3 == null ? value2 : r3.enabled) === true;
const jsxRuntimeEnv1_20Binding = jsxRuntimeEnv1_20;
const fileUtilsModule = require(4655) /* metro dependency 4655: FileUtils */;
object7.description = <>{fileUtilsModule.fileUploadLimitRoadblockDescription({guildId: a3, maxSize: r22,
onClick: function() {
importDefault(dependencyMap[21]).openURL(importDefault(dependencyMap[22]).getArticleURL(HelpdeskArticles.NITRO_FAQ));
}})}</>;
const PREMIUM_UPSELL_FILE_UPLOAD = AnalyticsPages.PREMIUM_UPSELL_FILE_UPLOAD;
object7.analyticsPage = PREMIUM_UPSELL_FILE_UPLOAD;
const LARGER_FILE_UPLOAD_UPSELL = PremiumUpsellTypes.LARGER_FILE_UPLOAD_UPSELL;
object7.upsellType = LARGER_FILE_UPLOAD_UPSELL;
object7.image = {uri: 'https://cdn.discordapp.com/assets/premium/roadblocks/file_upload_' + r17 + '_v2.png'};
object3[INCREASED_FILE_UPLOAD_SIZE] = object7;
const ANIMATED_EMOJIS = EntitlementFeatureNames.ANIMATED_EMOJIS;
const object9 = {};
string = intl.string;
const SI7R9I = (require(1244) /* metro dependency 1244: indexNative */).t.SI7R9I;
object9.title = Reflect.apply(string, intl, [SI7R9I]);
object9.description = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.uGkSY2,
{nitroTierName: premiumTypeDisplayName});
const PREMIUM_UPSELL_ANIMATED_EMOJI = AnalyticsPages.PREMIUM_UPSELL_ANIMATED_EMOJI;
object9.analyticsPage = PREMIUM_UPSELL_ANIMATED_EMOJI;
const ANIMATED_EMOJI_UPSELL = PremiumUpsellTypes.ANIMATED_EMOJI_UPSELL;
object9.upsellType = ANIMATED_EMOJI_UPSELL;
object9.image = {uri: 'https://cdn.discordapp.com/assets/premium/roadblocks/emoji_' + r17 + '.png'};
object3[ANIMATED_EMOJIS] = object9;
const CLIENT_THEMES = EntitlementFeatureNames.CLIENT_THEMES;
const object10 = {};
object10.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.p0I2Bk);
object10.description = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.jBqF2k);
const PREMIUM_UPSELL_CLIENT_THEMES = AnalyticsPages.PREMIUM_UPSELL_CLIENT_THEMES;
object10.analyticsPage = PREMIUM_UPSELL_CLIENT_THEMES;
const CLIENT_THEMES_UPSELL = PremiumUpsellTypes.CLIENT_THEMES_UPSELL;
object10.upsellType = CLIENT_THEMES_UPSELL;
object10.image = importDefault(7893) /* metro dependency 7893 */;
object3[CLIENT_THEMES] = object10;
const APP_ICONS = EntitlementFeatureNames.APP_ICONS;
const object11 = {};
string = intl.string;
const TYFwcy = (require(1244) /* metro dependency 1244: indexNative */).t.TYFwcy;
object11.title = Reflect.apply(string, intl, [TYFwcy]);
string = intl.string;
const HDt8ip = (require(1244) /* metro dependency 1244: indexNative */).t.HDt8ip;
object11.description = Reflect.apply(string, intl, [HDt8ip]);
const PREMIUM_UPSELL_APP_ICONS = AnalyticsPages.PREMIUM_UPSELL_APP_ICONS;
object11.analyticsPage = PREMIUM_UPSELL_APP_ICONS;
const APP_ICON_UPSELL = PremiumUpsellTypes.APP_ICON_UPSELL;
object11.upsellType = APP_ICON_UPSELL;
object11.image = importDefault(7894) /* metro dependency 7894 */;
object3[APP_ICONS] = object11;
const SAVED_MESSAGES = EntitlementFeatureNames.SAVED_MESSAGES;
const object13 = {};
string = intl.string;
const YXk6N7 = (require(1244) /* metro dependency 1244: indexNative */).t.YXk6N7;
object13.title = Reflect.apply(string, intl, [YXk6N7]);
object13.description = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['m/HzW8']);
const PREMIUM_UPSELL_FOR_LATER = AnalyticsPages.PREMIUM_UPSELL_FOR_LATER;
object13.analyticsPage = PREMIUM_UPSELL_FOR_LATER;
const FOR_LATER_MODAL_UPSELL = PremiumUpsellTypes.FOR_LATER_MODAL_UPSELL;
object13.upsellType = FOR_LATER_MODAL_UPSELL;
object13.image = importDefault(7895) /* metro dependency 7895 */;
object3[SAVED_MESSAGES] = object13;
const STREAM_HIGH_QUALITY = EntitlementFeatureNames.STREAM_HIGH_QUALITY;
const object14 = {};
string = intl.string;
const ETZQx5 = (require(1244) /* metro dependency 1244: indexNative */).t.ETZQx5;
object14.title = Reflect.apply(string, intl, [ETZQx5]);
formatToPlainString = intl.formatToPlainString;
property = (require(1244) /* metro dependency 1244: indexNative */).t['4nlpei'];
const FPS_60 = ApplicationStreamFPS.FPS_60;
object14.description = Reflect.apply(formatToPlainString, intl, [property, {fps: FPS_60}]);
const PREMIUM_UPSELL_STREAM_HIGH_QUALITY = AnalyticsPages.PREMIUM_UPSELL_STREAM_HIGH_QUALITY;
object14.analyticsPage = PREMIUM_UPSELL_STREAM_HIGH_QUALITY;
const STREAM_QUALITY_UPSELL = PremiumUpsellTypes.STREAM_QUALITY_UPSELL;
object14.upsellType = STREAM_QUALITY_UPSELL;
object14.image = importDefault(7542) /* metro dependency 7542 */;
const object19 = {};
object19.colors = [value3, value4];
const HorizontalGradient = (require(676) /* metro dependency 676: ConstantsIOS */).HorizontalGradient;
const START = HorizontalGradient.START;
object19.start = START;
const END = HorizontalGradient.END;
object19.end = END;
object14.imageGradientBackground = object19;
object3[STREAM_HIGH_QUALITY] = object14;
return object3;
}
function _fun63220() { // fn#63220, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8069:6192, offset: 0x01b76a66, size: 215 bytes, params: 1, frame: 19
var analyticsProperties;
var r9;
const value = environment.__proto__;
const value2 = undefined;
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const PREMIUM_UPSELL_VIEWED = AnalyticEvents.PREMIUM_UPSELL_VIEWED;
const object2 = {};
const value4 = legacyProps == null;
if (value4) {
analyticsProperties = value2;
r9 = value4;
} else {
legacyPropsBinding = legacyProps;
analyticsProperties = legacyPropsBinding.analyticsProperties;
r9 = legacyPropsBinding;
}
copyDataProperties(object2, analyticsProperties, r9);
object2['type'] = env0_4 == null ? value2 : env0_4.upsellType;
object2['location'] = global.location;
object2['location_stack'] = analyticsLocations;
const premiumUtilsModule = require(3802) /* metro dependency 3802: PremiumUtils */;
object2['sku_id'] = premiumUtilsModule.castPremiumSubscriptionAsSkuId(useTier0UpsellContent ? PremiumSubscriptionSKUs.TIER_0 : PremiumSubscriptionSKUs.TIER_2);
Reflect.apply(track, defaultImport, [PREMIUM_UPSELL_VIEWED, object2]);
return value2;
}
function _fun63221() { // fn#63221, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8069:6505, offset: 0x01b76b3d, size: 93 bytes, params: 1, frame: 14
let value = environment.__proto__;
(require(4015) /* metro dependency 4015: ChatInputUtils */).dismissKeyboard();
value = importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */;
const hideActionSheet = value.hideActionSheet;
const PREMIUM_UPSELL_ACTION_SHEET_KEY = (require(7890) /* metro dependency 7890: openPremiumUpsellActionSheet */).PREMIUM_UPSELL_ACTION_SHEET_KEY;
Reflect.apply(hideActionSheet, value, [PREMIUM_UPSELL_ACTION_SHEET_KEY]);
onViewAllPerks();
}
function PremiumUpsellActionSheetRenderIcon() { // fn#63222, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8069:7779, owner: PremiumUpsellActionSheet.renderIcon, offset: 0x01b76b9a, size: 72 bytes, params: 1, frame: 15
return !loading && ((NitroWheel) => <NitroWheel style={styles.nitroWheel} />)((require(1305) /* metro dependency 1305: native */).NitroWheel);
}
function PremiumUpsellActionSheetRenderLinearGradient() { // fn#63223, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8069:7852, owner: PremiumUpsellActionSheet.renderLinearGradient, offset: 0x01b76be2, size: 142 bytes, params: 1, frame: 19
const defaultImport = importDefault(4589) /* metro dependency 4589 */;
const {START, END} = (require(676) /* metro dependency 676: ConstantsIOS */).HorizontalGradient;
return ((Component) => <Component style={styles.gradient} start={START} end={END} colors={useTier0UpsellContent ? Gradients.PREMIUM_TIER_0 : Gradients.PREMIUM_TIER_2_TRI_COLOR} />)(defaultImport);
}
@@ -0,0 +1,25 @@
/* Metro module 8597; source: modules/premium/roadblocks/native/views/PremiumUpsellGradientBackground.tsx; dependencies: [31, 27, 7047, 33, 4501, 4589, 676, 2] */
function _fun67922(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#67922, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8782:6, offset: 0x01c385f0, size: 240 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const StyleSheet = (require(27) /* metro dependency 27 */).StyleSheet;
const env0_3 = (require(7047) /* metro dependency 7047: ColorConstants */).Gradients;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const object = {opacity: 0.1};
copyDataProperties(object, StyleSheet.absoluteFillObject, undefined);
const env0_5 = Reflect.apply(createStyles, createStylesModule, [{gradient: object}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/roadblocks/native/views/PremiumUpsellGradientBackground.tsx');
exports.PremiumUpsellGradientBackground = PremiumUpsellGradientBackground;
}
function PremiumUpsellGradientBackground({useTier0UpsellContent}) { // fn#67923, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8782:374, offset: 0x01c386e0, size: 155 bytes, params: 2, frame: 19
const styles = useStyles();
const defaultImport = importDefault(4589) /* metro dependency 4589 */;
const {START, END} = (require(676) /* metro dependency 676: ConstantsIOS */).HorizontalGradient;
return ((Component) => <Component style={styles.gradient} start={START} end={END} colors={useTier0UpsellContent === true ? Gradients.PREMIUM_TIER_0 : Gradients.PREMIUM_TIER_2_TRI_COLOR} />)(defaultImport);
}
@@ -0,0 +1,66 @@
/* Metro module 8596; source: modules/premium/roadblocks/native/views/PremiumUpsellSectionDivider.tsx; dependencies: [31, 27, 7047, 33, 4501, 697, 8597, 4589, 676, 6705, 2] */
function _fun67919(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#67919, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8781:6, offset: 0x01c381d2, size: 291 bytes, params: 8, frame: 20
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.StyleSheet;
const env0_4 = value.View;
const env0_5 = (require(7047) /* metro dependency 7047: ColorConstants */).Gradients;
value = require(33) /* metro dependency 33 */;
const env0_6 = value.jsx;
const env0_7 = value.jsxs;
const env0_8 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun67920);
object2 = {START: 0};
object2[0] = 'START';
object2.END = 1;
object2[1] = 'END';
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/roadblocks/native/views/PremiumUpsellSectionDivider.tsx');
exports.default = PremiumUpsellSectionDivider;
exports.PREMIUM_UPSELL_SECTION_DIVIDER_HEIGHT = 28;
exports.PREMIUM_UPSELL_SECTION_DIVIDER_MARGIN = 6;
exports.PremiumUpsellSectionDividerPosition = object2;
}
function _fun67920(a0) { // fn#67920, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8781:209, offset: 0x01c382f5, size: 257 bytes, params: 2, frame: 18
const object2 = {};
let START = env0_9.START;
const value2 = undefined;
let END = env0_9.END;
object2.container = {'height': 28, 'flex': 1, 'justifyContent': 'center', marginTop: a0 !== START ? value2 : 6,
marginBottom: a0 !== END ? value2 : 6};
const object5 = {'justifyContent': 'center', 'alignItems': 'center'};
copyDataProperties(object5, StyleSheet.absoluteFillObject, undefined);
object2.lockContainer = object5;
const object6 = {'width': 28, 'height': 28, 'justifyContent': 'center'};
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object2.lockGradient = object6;
object2.lock = {'width': 16, 'height': 16, 'alignSelf': 'center'};
object2.divider = {height: 1};
START = env0_9.START;
END = env0_9.END;
object2.gradient = {'flex': 1, 'height': 14, 'left': 0, 'right': 0, 'position': 'absolute',
bottom: a0 !== START ? value2 : 0, top: a0 !== END ? value2 : 0};
return object2;
}
function PremiumUpsellSectionDivider({useTier0UpsellContent, position}) { // fn#67921, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8781:869, offset: 0x01c383f6, size: 506 bytes, params: 2, frame: 27
const styles = useStyles(position);
const PremiumUpsellGradientBackground = (require(8597) /* metro dependency 8597: PremiumUpsellGradientBackground */).PremiumUpsellGradientBackground;
const items2 = [<View style={styles.gradient}><PremiumUpsellGradientBackground useTier0UpsellContent={useTier0UpsellContent} /></View>];
const defaultImport = importDefault(4589) /* metro dependency 4589 */;
const HorizontalGradient = (require(676) /* metro dependency 676: ConstantsIOS */).HorizontalGradient;
let START = HorizontalGradient.START;
const END = HorizontalGradient.END;
items2[1] = ((Component) => <Component style={styles.divider} start={START} end={END} colors={useTier0UpsellContent === true ? Gradients.PREMIUM_TIER_0 : Gradients.PREMIUM_TIER_2_TRI_COLOR} />)(defaultImport);
START = env0_9.START;
items2[2] = position === START && <View style={styles.lockContainer}>{((Component) => <Component style={styles.lockGradient} start={HorizontalGradient.START} end={HorizontalGradient.END} colors={useTier0UpsellContent ? Gradients.PREMIUM_TIER_0 : Gradients.PREMIUM_TIER_2_TRI_COLOR}>{((LockIcon) => <LockIcon color={(importDefault(697) /* metro dependency 697: native */).colors.WHITE} style={styles.lock} />)((require(6705) /* metro dependency 6705: LockIcon */).LockIcon)}</Component>)(defaultImport)}</View>;
return (
<View style={styles.container}>
{items2}
</View>
);
}