Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,37 @@
|
||||
/* Metro module 10095; source: modules/collectibles/native/AvatarDecorationProductPreview.tsx; dependencies: [31, 27, 33, 4501, 7594, 7609, 1244, 1305, 2] */
|
||||
function _fun78855(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78855, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10281:6, offset: 0x01e3830b, size: 199 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_2 = (require(27) /* metro dependency 27 */).View;
|
||||
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const env0_4 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({fullSizePreview: {'flex': 1,
|
||||
'alignItems': 'center', 'justifyContent': 'center'}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/AvatarDecorationProductPreview.tsx');
|
||||
exports.default = _default_78856;
|
||||
}
|
||||
|
||||
function _default_78856({product}) { // fn#78856, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10281:237, offset: 0x01e383d2, size: 284 bytes, params: 2, frame: 23
|
||||
var r0;
|
||||
var intl;
|
||||
const styles = useStyles();
|
||||
const value2 = (require(7594) /* metro dependency 7594: useCurrentUser */).useCurrentUser();
|
||||
const useShopProductItemsModule = require(7609) /* metro dependency 7609: useShopProductItems */;
|
||||
const useShopProductItems = useShopProductItemsModule.useShopProductItems;
|
||||
const firstAvatarDecoration = Reflect.apply(useShopProductItems, useShopProductItemsModule,
|
||||
[product]).firstAvatarDecoration;
|
||||
if (firstAvatarDecoration == null) {
|
||||
r0 = null;
|
||||
} else {
|
||||
var viewBindingProps = {'style': null, 'pointerEvents': 'box-none', 'accessibilityLabel': null,
|
||||
'accessibilityRole': 'image', 'accessible': true, style: styles.fullSizePreview};
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
viewBindingProps.accessibilityLabel = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.Do2lxE,
|
||||
|
||||
{a11y_text: firstAvatarDecoration.label});
|
||||
r0 = <View {...viewBindingProps}>{((Avatar) => <Avatar user={value2} guildId={undefined} size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.GIFT_START} avatarDecoration={firstAvatarDecoration} animate />)((require(1305) /* metro dependency 1305: native */).Avatar)}</View>;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
/* Metro module 7596; source: modules/collectibles/native/AvatarDecorationSampleV2.tsx; dependencies: [31, 27, 33, 4501, 697, 44, 1904, 7597, 7598, 2] */
|
||||
function _fun60917(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#60917, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7774:6, offset: 0x01714d1b, size: 233 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_3 = value.Image;
|
||||
const env0_4 = value.View;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_5 = value.jsx;
|
||||
const env0_6 = value.Fragment;
|
||||
const env0_7 = value.jsxs;
|
||||
const env0_8 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun60918);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/AvatarDecorationSampleV2.tsx');
|
||||
exports.default = _default_60919;
|
||||
exports.avatarPlaceholderSizeRatio = 0.8333333333333334;
|
||||
}
|
||||
|
||||
function _fun60918(a0) { // fn#60918, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7774:217, offset: 0x01714e04, size: 142 bytes, params: 2, frame: 14
|
||||
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
|
||||
return {avatar: {position: 'absolute', height: a0 * 0.8333333333333334, width: a0 * 0.8333333333333334,
|
||||
borderRadius: a0 * 0.8333333333333334 / 2, opacity: 0.8, backgroundColor: BACKGROUND_BASE_LOWER}, solidAvatar: {opacity: 1}, avatarDecoration: {position: 'absolute'}};
|
||||
}
|
||||
|
||||
function _default_60919({item, size, avatarSource, animate, threeTierBundle}) { // fn#60919, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7774:431, offset: 0x01714e92, size: 333 bytes, params: 2, frame: 27
|
||||
const styles = useStyles(size);
|
||||
const defaultImport = importDefault(44) /* metro dependency 44 */;
|
||||
const type = item.type;
|
||||
const CollectiblesItemType = (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType;
|
||||
const AVATAR_DECORATION = CollectiblesItemType.AVATAR_DECORATION;
|
||||
defaultImport(type === AVATAR_DECORATION, 'Item must be Avatar Decoration');
|
||||
return (
|
||||
<>
|
||||
<Image
|
||||
style={[styles.avatar, (avatarSource != null || threeTierBundle === true) && styles.solidAvatar]}
|
||||
resizeMode="contain"
|
||||
source={avatarSource ?? (importDefault(7597) /* metro dependency 7597 */)}
|
||||
accessible={false}
|
||||
/>
|
||||
<View style={styles.avatarDecoration} accessibilityLabel={item.label}>
|
||||
{((Component) => <Component avatarDecoration={item} size={size} animate={animate} />)(importDefault(7598) /* metro dependency 7598: CutoutableAvatarDecoration */)}
|
||||
</View>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,165 @@
|
||||
/* Metro module 10091; source: modules/collectibles/native/BundleProductDetailsActionSheetPreview.tsx; dependencies: [57, 31, 27, 33, 4501, 697, 10092, 5321, 5134, 10093, 4573, 1244, 2] */
|
||||
function _fun78835(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78835, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10277:6, offset: 0x01e36dc3, size: 654 bytes, params: 8, frame: 23
|
||||
var object7;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
let value = require(31) /* metro dependency 31 */;
|
||||
const env0_4 = value.useCallback;
|
||||
const env0_5 = value.useLayoutEffect;
|
||||
const env0_6 = value.useMemo;
|
||||
const env0_7 = value.useState;
|
||||
value = require(27) /* metro dependency 27 */;
|
||||
const env0_8 = value.Pressable;
|
||||
const env0_9 = value.ScrollView;
|
||||
const env0_10 = value.View;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_11 = value.jsx;
|
||||
const env0_12 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object7 = {};
|
||||
const object8 = {};
|
||||
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object8.paddingTop = PX_16;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object8.paddingBottom = PX_16;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object8.gap = PX_16;
|
||||
object7.previewContainer = object8;
|
||||
const object9 = {'width': 56, 'height': 56, 'borderRadius': null, 'backgroundColor': null, 'overflow': 'hidden'};
|
||||
object9.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
||||
const BACKGROUND_MOD_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_SUBTLE;
|
||||
object9.backgroundColor = BACKGROUND_MOD_SUBTLE;
|
||||
object7.bundleThumbnail = object9;
|
||||
const object10 = {'position': 'absolute', 'top': -2, 'left': -2, 'right': -2, 'bottom': -2, 'borderRadius': null,
|
||||
'borderWidth': 2};
|
||||
object10.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm + 2;
|
||||
const BORDER_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_STRONG;
|
||||
object10.borderColor = BORDER_STRONG;
|
||||
object7.selectedRing = object10;
|
||||
const object11 = {flexDirection: 'row'};
|
||||
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object11.gap = PX_12;
|
||||
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
object11.paddingVertical = PX_4;
|
||||
object11.paddingHorizontal = 2;
|
||||
object7.bundleThumbnailRow = object11;
|
||||
const object12 = {};
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object12.paddingHorizontal = PX_16;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object12.gap = PX_16;
|
||||
object7.bundleContainer = object12;
|
||||
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object7.bundleInfoContainer = {gap: PX_8};
|
||||
const env0_13 = Reflect.apply(createStyles, value, [object7]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/BundleProductDetailsActionSheetPreview.tsx');
|
||||
exports.default = _default_78838;
|
||||
}
|
||||
|
||||
function BundleThumbnail({item, index, isSelected, setSelected, label}) { // fn#78836, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10277:941, offset: 0x01e37051, size: 246 bytes, params: 2, frame: 23
|
||||
const value2 = useCallback(function() {
|
||||
return setSelected(index);
|
||||
}, [setSelected, index]);
|
||||
const styles = useStyles();
|
||||
return (
|
||||
<Pressable
|
||||
role="radio"
|
||||
{...{['aria-checked']: isSelected}}
|
||||
onPress={value2}
|
||||
{...{['aria-label']: label}}
|
||||
>
|
||||
<View style={styles.bundleThumbnail}>
|
||||
{((Component) => <Component item={item} size={56} />)(importDefault(10092) /* metro dependency 10092: CollectiblesItemMiniPreview */)}
|
||||
</View>
|
||||
{isSelected && <View style={styles.selectedRing} pointerEvents="none" />}
|
||||
</Pressable>
|
||||
);
|
||||
}
|
||||
|
||||
function _default_78838({product, width, handlePreviewPress, onTrackPress, onActiveItemChange}) { // fn#78838, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10277:1239, offset: 0x01e37147, size: 944 bytes, params: 2, frame: 37
|
||||
var object2;
|
||||
var r4;
|
||||
const styles = useStyles();
|
||||
const value4 = useState(0);
|
||||
const binding = env0_3;
|
||||
const value5 = binding(value4, 2);
|
||||
let property = value5[0];
|
||||
const property2 = value5[1];
|
||||
const [property3, property4] = binding(useState(product.skuId), 2);
|
||||
const value7 = useMemo(_fun78839, []);
|
||||
const items2 = product.items;
|
||||
const bundledProducts = product.bundledProducts;
|
||||
if (product.skuId === property3) {
|
||||
r4 = property;
|
||||
} else {
|
||||
property4(product.skuId);
|
||||
property2(0);
|
||||
r4 = 0;
|
||||
}
|
||||
property = items2[r4];
|
||||
useLayoutEffect(_fun78840, [property, onActiveItemChange]);
|
||||
const r14 = bundledProducts?.[r4]?.name ?? property.skuId;
|
||||
const collectibleTypeLabel = (require(5134) /* metro dependency 5134: CollectiblesUtils */).getCollectibleTypeLabel(property.type);
|
||||
object2 = {skuId: property.skuId, type: property.type, items: [property]};
|
||||
const IndividualProductPreview = (require(10093) /* metro dependency 10093: IndividualProductPreview */).IndividualProductPreview;
|
||||
const individualProductPreview = <IndividualProductPreview product={object2} width={width} handlePreviewPress={handlePreviewPress} onTrackPress={onTrackPress} />;
|
||||
let bundleInfoContainer = styles.bundleInfoContainer;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const text = <Text variant="heading-xl/bold">{product.name}</Text>;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const view = <View style={bundleInfoContainer}>{text}<Text variant="text-sm/medium" color="text-default">{intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['/0Yndu'],
|
||||
{num: items2.length})}</Text></View>;
|
||||
bundleInfoContainer = styles.bundleInfoContainer;
|
||||
const GestureDetector = (require(5321) /* metro dependency 5321 */).GestureDetector;
|
||||
const scrollViewBindingProps = {'horizontal': true, 'showsHorizontalScrollIndicator': false,
|
||||
'contentContainerStyle': null, 'role': 'radiogroup', contentContainerStyle: styles.bundleThumbnailRow};
|
||||
scrollViewBindingProps['aria-label'] = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cTbdgu);
|
||||
return (
|
||||
<View style={styles.previewContainer}>
|
||||
{individualProductPreview}
|
||||
<View style={styles.bundleContainer}>
|
||||
{view}
|
||||
<View style={bundleInfoContainer}>
|
||||
<GestureDetector gesture={value7}>
|
||||
<ScrollView {...scrollViewBindingProps}>
|
||||
{items2.map(_fun78841)}
|
||||
</ScrollView>
|
||||
</GestureDetector>
|
||||
<Text variant="text-sm/medium" color="text-default">
|
||||
{r14}
|
||||
{collectibleTypeLabel != null && <Text variant="text-sm/medium" color="text-muted">{' - ' + collectibleTypeLabel}</Text>}
|
||||
</Text>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun78839() { // fn#78839, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10277:1403, offset: 0x01e374f7, size: 56 bytes, params: 1, frame: 11
|
||||
const value = environment.__proto__;
|
||||
const Gesture = (require(5321) /* metro dependency 5321 */).Gesture;
|
||||
return Gesture.Native().disallowInterruption(true);
|
||||
}
|
||||
|
||||
function _fun78840() { // fn#78840, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10277:1545, offset: 0x01e3752f, size: 32 bytes, params: 1, frame: 11
|
||||
if (onActiveItemChange != null) {
|
||||
onActiveItemChange(env0_4);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun78841(a0, a1) { // fn#78841, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10277:2427, offset: 0x01e3754f, size: 118 bytes, params: 3, frame: 20
|
||||
return (
|
||||
<BundleThumbnail
|
||||
item={a0}
|
||||
index={a1}
|
||||
isSelected={a1 === env0_3}
|
||||
setSelected={env0_1}
|
||||
label={(bundledProducts == null || bundledProducts[a1] == null ? undefined : bundledProducts[a1].name) ?? a0.skuId}
|
||||
key={a0.skuId}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,160 @@
|
||||
/* Metro module 8470; source: modules/collectibles/native/BundleSampleV2.tsx; dependencies: [31, 27, 8471, 33, 5475, 4501, 697, 44, 1904, 1901, 8472, 7596, 8482, 1305, 8487, 2] */
|
||||
function _fun67262(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#67262, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8655:6, offset: 0x01c1bc70, size: 470 bytes, params: 8, frame: 26
|
||||
var object7;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const StyleSheet = value.StyleSheet;
|
||||
const env0_3 = value.View;
|
||||
const env0_4 = (require(8471) /* metro dependency 8471: CollectiblesPreviewConstants */).BUNDLE_PREVIEW_CONFIG;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_5 = value.jsx;
|
||||
const env0_6 = value.jsxs;
|
||||
const create = StyleSheet.create;
|
||||
object7 = {};
|
||||
const object8 = {};
|
||||
copyDataProperties(object8, StyleSheet.absoluteFillObject, undefined);
|
||||
object8['overflow'] = 'hidden';
|
||||
object7.container = object8;
|
||||
const object9 = {};
|
||||
copyDataProperties(object9, StyleSheet.absoluteFillObject, undefined);
|
||||
object9['overflow'] = 'hidden';
|
||||
object9['justifyContent'] = 'center';
|
||||
object9['alignItems'] = 'center';
|
||||
object7.bgBleedClip = object9;
|
||||
const object10 = {};
|
||||
copyDataProperties(object10, StyleSheet.absoluteFillObject, undefined);
|
||||
object10['opacity'] = 0.8;
|
||||
object7.bgMutedWrap = object10;
|
||||
object7.bgImage = {'width': '100%', 'height': '100%'};
|
||||
const object11 = {};
|
||||
copyDataProperties(object11, StyleSheet.absoluteFillObject, undefined);
|
||||
object11['overflow'] = 'hidden';
|
||||
object11['justifyContent'] = 'center';
|
||||
object11['alignItems'] = 'center';
|
||||
object7.fgClip = object11;
|
||||
const object12 = {};
|
||||
copyDataProperties(object12, StyleSheet.absoluteFillObject, undefined);
|
||||
object7.fgImage = object12;
|
||||
const env0_7 = Reflect.apply(create, StyleSheet, [object7]);
|
||||
const env0_8 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun67266);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/BundleSampleV2.tsx');
|
||||
exports.default = _default_67267;
|
||||
}
|
||||
|
||||
function BundleStaticPreviewContent({previewAssets, disableBackground, mutedBackground}) { // fn#67263, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8655:197, offset: 0x01c1be46, size: 402 bytes, params: 2, frame: 26
|
||||
var r4;
|
||||
const bgStatic = previewAssets.bgStatic;
|
||||
const fgStatic = previewAssets.fgStatic;
|
||||
let value = null;
|
||||
const r9 = value != bgStatic ? ((Component) => <Component source={{uri: bgStatic}} style={env0_7.bgImage} resizeMode="cover" accessibilityElementsHidden importantForAccessibility="no-hide-descendants" />)(importDefault(5475) /* metro dependency 5475: FastImage */) : value;
|
||||
const container = env0_7.container;
|
||||
const r5 = !disableBackground && value != r9 && <View style={env0_7.bgBleedClip} pointerEvents="none">{mutedBackground ? <View style={env0_7.bgMutedWrap} pointerEvents="none">{r9}</View> : r9}</View>;
|
||||
value = value != fgStatic;
|
||||
if (value) {
|
||||
var viewBinding4Props = {style: env0_7.fgClip, pointerEvents: 'none'};
|
||||
value = importDefault(5475) /* metro dependency 5475: FastImage */;
|
||||
value = <View {...viewBinding4Props}>{((Component) => <Component source={{uri: fgStatic}} style={env0_7.fgImage} resizeMode="cover" accessibilityElementsHidden importantForAccessibility="no-hide-descendants" />)(value)}</View>;
|
||||
r4 = value;
|
||||
} else {
|
||||
r4 = value;
|
||||
}
|
||||
return (
|
||||
<View style={container}>
|
||||
{r5}
|
||||
{r4}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function BundleSampleV2Composed({deco, pfx, nameplate, size}) { // fn#67264, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8655:2307, offset: 0x01c1bfd8, size: 567 bytes, params: 2, frame: 29
|
||||
var r12;
|
||||
size = size === undefined ? 'small' : size;
|
||||
const styles = useStyles(size);
|
||||
if (nameplate != null) {
|
||||
(importDefault(44) /* metro dependency 44 */)(nameplate.type === (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType.NAMEPLATE,
|
||||
|
||||
'Item must be Nameplate');
|
||||
r12 = (require(1901) /* metro dependency 1901: utils */).getNameplateData(nameplate);
|
||||
} else {
|
||||
r12 = undefined;
|
||||
}
|
||||
const property = BUNDLE_PREVIEW_CONFIG[size];
|
||||
const r17 = r12 != null ? property.avatarDecorationSizeTriple : property.avatarDecorationSize;
|
||||
const items2 = [<View style={styles.pfx}>{((Component) => <Component item={pfx} />)(importDefault(8472) /* metro dependency 8472: ProfileEffectSampleV2 */)}</View>];
|
||||
items2[1] = <View style={[r12 != null ? styles.avatarWithNameplate : styles.avatar]}>{((Component) => <Component item={deco} size={r17} threeTierBundle={r12 != null} />)(importDefault(7596) /* metro dependency 7596: AvatarDecorationSampleV2 */)}</View>;
|
||||
items2[2] = r12 != null ? <View style={styles.nameplate}>{((NameplateDummyUserPreview) => <NameplateDummyUserPreview width={property.nameplatePreviewWidth} avatarSize={size === 'large' ? (require(1305) /* metro dependency 1305: native */).AvatarSizes.NORMAL : (require(1305) /* metro dependency 1305: native */).AvatarSizes.XSMALL_20} nameplate={r12} />)((require(8482) /* metro dependency 8482: NameplateDummyUserPreview */).NameplateDummyUserPreview)}</View> : null;
|
||||
return (
|
||||
<View style={styles.bundle}>
|
||||
{items2}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function BundleSampleV2StaticPreview({previewAssets, disableStaticBackground, mutedStaticBackground, composedFallbackProps, exposureLocation}) { // fn#67265, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8655:3006, offset: 0x01c1c20f, size: 134 bytes, params: 2, frame: 18
|
||||
const collectiblesMobileFlexibleBundlesExperimentModule = require(8487) /* metro dependency 8487: CollectiblesMobileFlexibleBundlesExperiment */;
|
||||
const useCollectiblesMobileFlexibleBundlesExperiment = collectiblesMobileFlexibleBundlesExperimentModule.useCollectiblesMobileFlexibleBundlesExperiment;
|
||||
return Reflect.apply(useCollectiblesMobileFlexibleBundlesExperiment,
|
||||
collectiblesMobileFlexibleBundlesExperimentModule,
|
||||
[exposureLocation]).enabled ? <BundleStaticPreviewContent previewAssets={previewAssets} disableBackground={disableStaticBackground} mutedBackground={mutedStaticBackground} /> : <BundleSampleV2Composed {...composedFallbackProps} />;
|
||||
}
|
||||
|
||||
function _fun67266(a0) { // fn#67266, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8655:1267, offset: 0x01c1c295, size: 554 bytes, params: 2, frame: 18
|
||||
const property = BUNDLE_PREVIEW_CONFIG[a0];
|
||||
const object4 = {};
|
||||
const object5 = {};
|
||||
object5.width = property.bundleWidth;
|
||||
object5.height = property.bundleHeight;
|
||||
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
|
||||
object4.bundle = object5;
|
||||
const object6 = {position: 'absolute'};
|
||||
object6.top = property.pfxTop;
|
||||
object6.left = property.pfxLeft;
|
||||
object6.width = property.pfxWidth;
|
||||
object6.height = property.pfxHeight;
|
||||
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
||||
object6.backgroundColor = BACKGROUND_BASE_LOW;
|
||||
object6.transform = [{rotate: '-8deg'}];
|
||||
object6.zIndex = 0;
|
||||
object6.overflow = 'hidden';
|
||||
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
|
||||
object4.pfx = object6;
|
||||
object4.avatar = {'position': 'absolute', 'top': null, 'right': null, 'transform': null, 'zIndex': 1,
|
||||
'alignItems': 'center', 'justifyContent': 'center', top: property.avatarTop, right: property.avatarRight,
|
||||
transform: [{rotate: '8deg'}]};
|
||||
const object8 = {'position': 'absolute', 'top': null, 'right': null, 'transform': null, 'zIndex': 1,
|
||||
'alignItems': 'center', 'justifyContent': 'center'};
|
||||
object8.top = property.avatarWithNameplateTop;
|
||||
object8.right = property.avatarWithNameplateRight;
|
||||
object8.transform = [{rotate: '8deg'}];
|
||||
let BLACK = (importDefault(697) /* metro dependency 697: native */).colors.BLACK;
|
||||
object8.shadowColor = BLACK;
|
||||
object8.shadowOffset = {'width': 0, 'height': 4};
|
||||
object8.shadowOpacity = 0.5;
|
||||
object8.shadowRadius = 4;
|
||||
object4.avatarWithNameplate = object8;
|
||||
const object10 = {'position': 'absolute', 'bottom': null, 'marginHorizontal': 10, 'width': '90%',
|
||||
'backgroundColor': null, 'zIndex': 2};
|
||||
object10.bottom = property.nameplateBottom;
|
||||
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
|
||||
object10.backgroundColor = BACKGROUND_BASE_LOWER;
|
||||
object10.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
||||
BLACK = (importDefault(697) /* metro dependency 697: native */).colors.BLACK;
|
||||
object10.shadowColor = BLACK;
|
||||
object10.shadowOffset = {'width': 0, 'height': 4};
|
||||
object10.shadowOpacity = 0.5;
|
||||
object10.shadowRadius = 4;
|
||||
object4.nameplate = object10;
|
||||
return object4;
|
||||
}
|
||||
|
||||
function _default_67267({deco, pfx, nameplate, size, previewAssets, disableStaticBackground, mutedStaticBackground, exposureLocation}) { // fn#67267, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8655:3361, offset: 0x01c1c4bf, size: 201 bytes, params: 2, frame: 19
|
||||
size = size === undefined ? 'small' : size;
|
||||
disableStaticBackground = !(disableStaticBackground === undefined) && disableStaticBackground;
|
||||
mutedStaticBackground = !(mutedStaticBackground === undefined) && mutedStaticBackground;
|
||||
exposureLocation = exposureLocation === undefined ? 'CollectiblesShopCardAssetTileV2' : exposureLocation;
|
||||
return previewAssets?.fgStatic != null ? <BundleSampleV2StaticPreview previewAssets={previewAssets} disableStaticBackground={disableStaticBackground} mutedStaticBackground={mutedStaticBackground} composedFallbackProps={object} exposureLocation={exposureLocation} /> : <BundleSampleV2Composed deco={deco} pfx={pfx} nameplate={nameplate} size={size} />;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,146 @@
|
||||
/* Metro module 8413; source: modules/collectibles/native/CollectiblesBadges.tsx; dependencies: [31, 27, 1880, 33, 4501, 697, 4573, 1244, 7962, 6705, 7954, 2] */
|
||||
function _fun66835(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66835, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8598:6, offset: 0x01c0bb4c, size: 597 bytes, params: 8, frame: 23
|
||||
var object3;
|
||||
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(1880) /* metro dependency 1880: PremiumConstants */).PremiumTypes;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_5 = value.jsx;
|
||||
const env0_6 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object3 = {};
|
||||
const object5 = {};
|
||||
const BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
|
||||
object5.backgroundColor = BACKGROUND_BRAND;
|
||||
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
||||
object5.paddingHorizontal = 6;
|
||||
object5.paddingVertical = 2;
|
||||
object3.newIconBadge = object5;
|
||||
object3.newIconBadgeText = {textTransform: 'uppercase'};
|
||||
const object8 = {};
|
||||
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
|
||||
object8.backgroundColor = WHITE;
|
||||
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
|
||||
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object8.paddingHorizontal = PX_8;
|
||||
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
object8.paddingVertical = PX_4;
|
||||
object3.limitedTimeBadge = object8;
|
||||
object3.limitedTimeBadgeText = {textTransform: 'uppercase'};
|
||||
const object9 = {};
|
||||
const ICON_OVERLAY_DARK = (importDefault(697) /* metro dependency 697: native */).colors.ICON_OVERLAY_DARK;
|
||||
object9.backgroundColor = ICON_OVERLAY_DARK;
|
||||
object9.padding = 5;
|
||||
object9.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
||||
object3.lockIconBadge = object9;
|
||||
const object10 = {'backgroundColor': null, 'flexDirection': 'row', 'paddingHorizontal': 5, 'paddingVertical': 3,
|
||||
'borderRadius': null, 'alignItems': 'center', 'gap': 2};
|
||||
const PREMIUM_TIER_2_PINK_FOR_GRADIENTS_2 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PREMIUM_TIER_2_PINK_FOR_GRADIENTS_2;
|
||||
object10.backgroundColor = PREMIUM_TIER_2_PINK_FOR_GRADIENTS_2;
|
||||
object10.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
||||
object3.newLockIconBadge = object10;
|
||||
object3.newLockIconBadgeText = {textTransform: 'uppercase'};
|
||||
const env0_7 = Reflect.apply(createStyles, value, [object3]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/CollectiblesBadges.tsx');
|
||||
exports.NewBadge = NewBadge;
|
||||
exports.LockBadge = LockBadge;
|
||||
exports.PremiumBadge = PremiumBadge;
|
||||
exports.LimitedTimeBadge = LimitedTimeBadge;
|
||||
}
|
||||
|
||||
function NewBadge({style}) { // fn#66836, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8598:1047, offset: 0x01c0bda1, size: 171 bytes, params: 2, frame: 20
|
||||
const styles = useStyles();
|
||||
const items2 = [styles.newIconBadge, style];
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
return (
|
||||
<View style={items2}>
|
||||
<Text
|
||||
variant="text-sm/bold"
|
||||
color="white"
|
||||
style={styles.newIconBadgeText}
|
||||
>
|
||||
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.y2b7CA)}
|
||||
</Text>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function LockBadge({isNew, style}) { // fn#66837, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8598:1259, offset: 0x01c0be4c, size: 410 bytes, params: 2, frame: 23
|
||||
var r0;
|
||||
var PremiumFeaturesBackground;
|
||||
var items3;
|
||||
var Text;
|
||||
var intl;
|
||||
isNew = !(isNew === undefined) && isNew;
|
||||
var value;
|
||||
const styles = useStyles();
|
||||
if (isNew) {
|
||||
PremiumFeaturesBackground = importDefault(7962) /* metro dependency 7962: PremiumFeaturesBackground */;
|
||||
var defaultImportProps = {premiumType: PremiumTypes.TIER_2, style: [styles.newLockIconBadge, style]};
|
||||
const LockIcon = (require(6705) /* metro dependency 6705: LockIcon */).LockIcon;
|
||||
value = <LockIcon size="xxs" color={(importDefault(697) /* metro dependency 697: native */).colors.WHITE} />;
|
||||
items3 = [value];
|
||||
Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
var textProps = {'variant': 'text-xs/bold', 'color': 'white', style: styles.newLockIconBadgeText};
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
items3[1] = <Text {...textProps}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.y2b7CA)}</Text>;
|
||||
value = <PremiumFeaturesBackground {...defaultImportProps}>{items3}</PremiumFeaturesBackground>;
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = <View style={[styles.lockIconBadge,
|
||||
style]}>{((LockIcon) => <LockIcon size="sm" color={(importDefault(697) /* metro dependency 697: native */).colors.WHITE} />)((require(6705) /* metro dependency 6705: LockIcon */).LockIcon)}</View>;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function PremiumBadge({isNew, style}) { // fn#66838, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8598:1685, offset: 0x01c0bfe6, size: 410 bytes, params: 2, frame: 23
|
||||
var r0;
|
||||
var PremiumFeaturesBackground;
|
||||
var items3;
|
||||
var Text;
|
||||
var intl;
|
||||
isNew = !(isNew === undefined) && isNew;
|
||||
var value;
|
||||
const styles = useStyles();
|
||||
if (isNew) {
|
||||
PremiumFeaturesBackground = importDefault(7962) /* metro dependency 7962: PremiumFeaturesBackground */;
|
||||
var defaultImportProps = {premiumType: PremiumTypes.TIER_2, style: [styles.newLockIconBadge, style]};
|
||||
const NitroWheelIcon = (require(7954) /* metro dependency 7954: NitroWheelIcon */).NitroWheelIcon;
|
||||
value = <NitroWheelIcon size="xxs" color={(importDefault(697) /* metro dependency 697: native */).colors.WHITE} />;
|
||||
items3 = [value];
|
||||
Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
var textProps = {'variant': 'text-xs/bold', 'color': 'white', style: styles.newLockIconBadgeText};
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
items3[1] = <Text {...textProps}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.y2b7CA)}</Text>;
|
||||
value = <PremiumFeaturesBackground {...defaultImportProps}>{items3}</PremiumFeaturesBackground>;
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = <View style={[styles.lockIconBadge,
|
||||
style]}>{((NitroWheelIcon) => <NitroWheelIcon size="sm" color={(importDefault(697) /* metro dependency 697: native */).colors.WHITE} />)((require(7954) /* metro dependency 7954: NitroWheelIcon */).NitroWheelIcon)}</View>;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function LimitedTimeBadge({style}) { // fn#66839, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8598:2129, offset: 0x01c0c180, size: 173 bytes, params: 2, frame: 20
|
||||
const styles = useStyles();
|
||||
const items2 = [styles.limitedTimeBadge, style];
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
return (
|
||||
<View style={items2}>
|
||||
<Text
|
||||
variant="text-xs/bold"
|
||||
color="black"
|
||||
style={styles.limitedTimeBadgeText}
|
||||
>
|
||||
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['h/uBCR'])}
|
||||
</Text>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
/* Metro module 14057; source: modules/collectibles/native/CollectiblesCoachmarkScrollDismissContext.tsx; dependencies: [31, 482, 33, 2] */
|
||||
function _fun106599(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#106599, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14254:6, offset: 0x022e2891, size: 196 bytes, params: 8, frame: 18
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const value = importAll(31) /* metro dependency 31 */;
|
||||
const env0_1 = (require(482) /* metro dependency 482: Constants */).NOOP;
|
||||
const env0_2 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const env0_3 = value.createContext({registerDismiss: function() {
|
||||
return NOOP;
|
||||
}, handleDismissCoachmarkOnScroll: undefined});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/CollectiblesCoachmarkScrollDismissContext.tsx');
|
||||
exports.useCollectiblesCoachmarkScrollDismissContext = useCollectiblesCoachmarkScrollDismissContext;
|
||||
exports.CollectiblesCoachmarkScrollDismissProvider = CollectiblesCoachmarkScrollDismissProvider;
|
||||
}
|
||||
|
||||
function CollectiblesCoachmarkScrollDismissProvider({children}) { // fn#106602, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14254:499, offset: 0x022e2955, size: 163 bytes, params: 2, frame: 17
|
||||
const binding = env0_0;
|
||||
var env0_0 = binding.useRef(null);
|
||||
const env0_1 = binding.useRef(null);
|
||||
const value2 = binding.useCallback(_fun106603, []);
|
||||
const value3 = binding.useCallback(_fun106605, []);
|
||||
const env0_3 = value3;
|
||||
const value4 = binding.useMemo(_fun106606, [value2, value3]);
|
||||
const Provider = env0_3.Provider;
|
||||
return (
|
||||
<Provider value={value4}>
|
||||
{children}
|
||||
</Provider>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun106603(a0) { // fn#106603, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14254:620, offset: 0x022e29f8, size: 43 bytes, params: 2, frame: 4
|
||||
a0.current = a0;
|
||||
env0_1.current = null;
|
||||
return _fun106604;
|
||||
}
|
||||
|
||||
function _fun106605(a0) { // fn#106605, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14254:727, offset: 0x022e2a54, size: 137 bytes, params: 2, frame: 15
|
||||
var contentOffset;
|
||||
var Math;
|
||||
const current = env0_0.current;
|
||||
if (current != null) {
|
||||
contentOffset = a0.nativeEvent.contentOffset;
|
||||
if (env0_1.current != null) {
|
||||
Math = global.Math;
|
||||
if (Math.abs(contentOffset.x - env0_1.current) >= 16) {
|
||||
env0_0.current = null;
|
||||
env0_1.current = null;
|
||||
current();
|
||||
}
|
||||
} else {
|
||||
env0_1.current = contentOffset.x;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun106606() { // fn#106606, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14254:916, offset: 0x022e2add, size: 25 bytes, params: 1, frame: 3
|
||||
return {registerDismiss: env0_2, handleDismissCoachmarkOnScroll: env0_3};
|
||||
}
|
||||
|
||||
function _fun106604() { // fn#106604, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14254:651, offset: 0x022e2a23, size: 49 bytes, params: 1, frame: 3
|
||||
if (env1_0.current === env0_0) {
|
||||
env1_0.current = null;
|
||||
env1_1.current = null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,154 @@
|
||||
/* Metro module 8410; source: modules/collectibles/native/CollectiblesEditUserProfileListItems.tsx; dependencies: [31, 27, 1878, 663, 33, 4501, 697, 5278, 4081, 4082, 1305, 8411, 4573, 1244, 6771, 5120, 4080, 8412, 8413, 566, 3802, 8405, 5134, 2] */
|
||||
function _fun66825(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66825, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8595:6, offset: 0x01c0b2e9, size: 478 bytes, params: 8, frame: 23
|
||||
var object3;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(27) /* metro dependency 27 */).View;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const env0_6 = (require(663) /* metro dependency 663: CollectiblesShopConstants */).CollectiblesMobileShopScreen;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_7 = value.jsx;
|
||||
const env0_8 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object3 = {};
|
||||
const object4 = {'borderWidth': 2, 'borderColor': null, 'borderRadius': null, 'backgroundColor': null,
|
||||
'alignItems': 'center', 'justifyContent': 'center', 'marginTop': 10};
|
||||
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
|
||||
object4.borderColor = BORDER_SUBTLE;
|
||||
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
||||
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
|
||||
object4.backgroundColor = BACKGROUND_SURFACE_HIGH;
|
||||
object3.item = object4;
|
||||
const BUTTON_OUTLINE_BRAND_BORDER_ACTIVE = (importDefault(697) /* metro dependency 697: native */).colors.BUTTON_OUTLINE_BRAND_BORDER_ACTIVE;
|
||||
object3.selected = {borderColor: BUTTON_OUTLINE_BRAND_BORDER_ACTIVE};
|
||||
object3.optionCell = {'justifyContent': 'center', 'alignItems': 'center'};
|
||||
object3.optionCellText = {marginTop: 4};
|
||||
object3.newIcon = {'position': 'absolute', 'top': -12, 'right': 5};
|
||||
object3.lockIcon = {'position': 'absolute', 'top': -12, 'right': -10};
|
||||
const env0_9 = Reflect.apply(createStyles, value, [object3]);
|
||||
const closure = EditCollectibleListItem;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/CollectiblesEditUserProfileListItems.tsx');
|
||||
exports.EditCollectibleListItem = closure;
|
||||
exports.EditCollectiblesListItemNone = EditCollectiblesListItemNone;
|
||||
exports.EditCollectiblesListItemShop = EditCollectiblesListItemShop;
|
||||
exports.EditCollectiblesListItemProduct = EditCollectiblesListItemProduct;
|
||||
}
|
||||
|
||||
function EditCollectibleListItem({size, isSelected, children, style, onPress, onLongPress, accessibilityLabel, accessibilityRole}) { // fn#66826, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8595:705, offset: 0x01c0b4c7, size: 222 bytes, params: 2, frame: 24
|
||||
accessibilityRole = accessibilityRole === undefined ? 'button' : accessibilityRole;
|
||||
const styles = useStyles();
|
||||
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
||||
return (
|
||||
<PressableOpacity
|
||||
disabled={isSelected}
|
||||
onPress={function() {
|
||||
require(dependencyMap[8]).triggerHapticFeedback(importDefault(dependencyMap[9]).IMPACT_LIGHT);
|
||||
onPress();
|
||||
}}
|
||||
onLongPress={onLongPress}
|
||||
accessibilityRole={accessibilityRole}
|
||||
accessibilityLabel={accessibilityLabel}
|
||||
accessibilityState={{selected: isSelected}}
|
||||
>
|
||||
<View style={[styles.item, isSelected ? styles.selected : null, {width: size, height: size}, style]}>
|
||||
{children}
|
||||
</View>
|
||||
</PressableOpacity>
|
||||
);
|
||||
}
|
||||
|
||||
function EditCollectiblesListItemNone(a0) { // fn#66828, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8595:1305, offset: 0x01c0b5ec, size: 287 bytes, params: 2, frame: 24
|
||||
const styles = useStyles();
|
||||
const editCollectibleListItemBindingProps = {style: styles.optionCell, ...a0};
|
||||
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
|
||||
const iconProps = {source: importDefault(8411) /* metro dependency 8411 */};
|
||||
const IconSizes = (require(1305) /* metro dependency 1305: native */).IconSizes;
|
||||
const LARGE = IconSizes.LARGE;
|
||||
iconProps.size = LARGE;
|
||||
const icon = <Icon {...iconProps} />;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const asDefault = a0.asDefault;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
return (
|
||||
<EditCollectibleListItem {...editCollectibleListItemBindingProps}>
|
||||
{icon}
|
||||
<Text
|
||||
variant="text-sm/medium"
|
||||
color="mobile-text-heading-primary"
|
||||
style={styles.optionCellText}
|
||||
>
|
||||
{asDefault ? Reflect.apply(string, intl, [t.CHf9iJ]) : Reflect.apply(string, intl, [t.PoWNfe])}
|
||||
</Text>
|
||||
</EditCollectibleListItem>
|
||||
);
|
||||
}
|
||||
|
||||
function EditCollectiblesListItemShop(a0) { // fn#66829, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8595:1691, offset: 0x01c0b70b, size: 403 bytes, params: 2, frame: 24
|
||||
const analyticsSource = a0.analyticsSource;
|
||||
const value = Object.create(null);
|
||||
value.analyticsSource = 0;
|
||||
const value2 = copyDataProperties({}, a0, value, undefined);
|
||||
const styles = useStyles();
|
||||
const analyticsLocations = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)(analyticsSource).analyticsLocations;
|
||||
const binding = env0_3;
|
||||
const useCallback = binding.useCallback;
|
||||
const editCollectibleListItemBindingProps = {style: styles.optionCell, isSelected: false,
|
||||
onPress: Reflect.apply(useCallback, binding, [_fun66830, [analyticsLocations, analyticsSource]]), ...value2};
|
||||
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
|
||||
const object = {source: importDefault(8412) /* metro dependency 8412 */};
|
||||
const IconSizes = (require(1305) /* metro dependency 1305: native */).IconSizes;
|
||||
const LARGE = IconSizes.LARGE;
|
||||
object.size = LARGE;
|
||||
const items2 = [<Icon {...object} />];
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
items2[1] = <Text variant="text-sm/medium" color="mobile-text-heading-primary" style={styles.optionCellText}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.pWG4ze)}</Text>;
|
||||
const NewBadge = (require(8413) /* metro dependency 8413: CollectiblesBadges */).NewBadge;
|
||||
items2[2] = <NewBadge style={styles.newIcon} />;
|
||||
return (
|
||||
<EditCollectibleListItem {...editCollectibleListItemBindingProps}>
|
||||
{items2}
|
||||
</EditCollectibleListItem>
|
||||
);
|
||||
}
|
||||
|
||||
function EditCollectiblesListItemProduct(a0) { // fn#66831, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8595:2308, offset: 0x01c0b904, size: 444 bytes, params: 2, frame: 27
|
||||
const isSelected = a0.isSelected;
|
||||
const isTryItOut = a0.isTryItOut;
|
||||
const skuId = a0.skuId;
|
||||
const children = a0.children;
|
||||
const object2 = {'isSelected': 0, 'isTryItOut': 0, 'skuId': 0, 'children': 0};
|
||||
const value = null;
|
||||
silentSetPrototypeOf(object2, value, undefined);
|
||||
const value2 = copyDataProperties({}, a0, object2, skuId);
|
||||
const styles = useStyles();
|
||||
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
|
||||
return UserStore.getCurrentUser();
|
||||
});
|
||||
const canUseCollectibles2 = (importDefault(3802) /* metro dependency 3802: PremiumUtils */).canUseCollectibles(currentUser);
|
||||
const {product, purchase} = (importDefault(8405) /* metro dependency 8405: useCollectiblesData */)(skuId);
|
||||
const isProductNew2 = (require(5134) /* metro dependency 5134: CollectiblesUtils */).isProductNew(skuId);
|
||||
const r14 = (require(5134) /* metro dependency 5134: CollectiblesUtils */).isPremiumCollectiblesProduct(product) || (require(5134) /* metro dependency 5134: CollectiblesUtils */).isPremiumCollectiblesPurchase(purchase);
|
||||
return (
|
||||
<EditCollectibleListItem isSelected={isSelected} {...value2}>
|
||||
{children}
|
||||
{value != purchase || r14 ? r14 ? isTryItOut ? value : value == purchase ? ((PremiumBadge) => <PremiumBadge style={styles.lockIcon} isNew={isProductNew2} />)((require(8413) /* metro dependency 8413: CollectiblesBadges */).PremiumBadge) : canUseCollectibles2 ? value : ((PremiumBadge) => <PremiumBadge style={styles.lockIcon} isNew={isProductNew2} />)((require(8413) /* metro dependency 8413: CollectiblesBadges */).PremiumBadge) : value : ((LockBadge) => <LockBadge style={styles.lockIcon} isNew={isProductNew2} />)((require(8413) /* metro dependency 8413: CollectiblesBadges */).LockBadge)}
|
||||
</EditCollectibleListItem>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun66830() { // fn#66830, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8595:1780, offset: 0x01c0b89e, size: 102 bytes, params: 1, frame: 16
|
||||
const value = environment.__proto__;
|
||||
const collectiblesActionCreatorsModule = require(5120) /* metro dependency 5120: CollectiblesActionCreators */;
|
||||
const openCollectiblesShopMobile = collectiblesActionCreatorsModule.openCollectiblesShopMobile;
|
||||
const FEATURED_PAGE = CollectiblesMobileShopScreen.FEATURED_PAGE;
|
||||
Reflect.apply(openCollectiblesShopMobile, collectiblesActionCreatorsModule,
|
||||
[{analyticsLocations: analyticsLocations, analyticsSource: analyticsSource, screen: FEATURED_PAGE}]);
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,90 @@
|
||||
/* Metro module 10092; source: modules/collectibles/native/CollectiblesItemMiniPreview.tsx; dependencies: [31, 27, 5126, 1902, 5127, 5128, 8504, 8471, 33, 697, 4501, 7596, 10031, 5475, 10032, 8474, 1901, 8483, 2] */
|
||||
function _fun78842(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78842, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10278:6, offset: 0x01e375c5, size: 561 bytes, params: 8, frame: 25
|
||||
var object2;
|
||||
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(5126) /* metro dependency 5126: AvatarDecorationRecord */).isAvatarDecorationRecord;
|
||||
const env0_5 = (require(1902) /* metro dependency 1902: NameplateRecord */).isNameplateRecord;
|
||||
const env0_6 = (require(5127) /* metro dependency 5127: ProfileEffectRecord */).isProfileEffectRecord;
|
||||
const env0_7 = (require(5128) /* metro dependency 5128: ProfileFrameRecord */).isProfileFrameRecord;
|
||||
const env0_8 = (require(8504) /* metro dependency 8504: ProfileFrameConstants */).PROFILE_FRAME_ASPECT_RATIO;
|
||||
const SAMPLE_PROFILE_ASPECT_RATIO = (require(8471) /* metro dependency 8471: CollectiblesPreviewConstants */).SAMPLE_PROFILE_ASPECT_RATIO;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_9 = value.jsx;
|
||||
const env0_10 = value.jsxs;
|
||||
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {tile: {'overflow': 'hidden', 'alignItems': 'center', 'justifyContent': 'center'}};
|
||||
object2.framePreview = {'width': '100%', 'height': '100%', 'paddingVertical': null, 'overflow': 'hidden',
|
||||
'alignItems': 'center', 'justifyContent': 'center', paddingVertical: PX_8};
|
||||
const object4 = {'overflow': 'hidden', 'width': '100%', 'height': '100%'};
|
||||
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
||||
object2.profileEffect = object4;
|
||||
object2.sampleProfile = {aspectRatio: SAMPLE_PROFILE_ASPECT_RATIO, width: '100%'};
|
||||
const object6 = {overflow: 'hidden'};
|
||||
object6.borderTopRightRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
|
||||
object6.borderBottomRightRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
|
||||
object2.nameplate = object6;
|
||||
object2.nameplateTile = {alignItems: 'flex-start'};
|
||||
object2.nameplateStrip = {'width': '90%', 'aspectRatio': 1.6, 'position': 'relative'};
|
||||
const env0_12 = Reflect.apply(createStyles, value, [object2]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/CollectiblesItemMiniPreview.tsx');
|
||||
exports.default = CollectiblesItemMiniPreview;
|
||||
}
|
||||
|
||||
function CollectiblesItemMiniPreview({item, size}) { // fn#78843, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10278:940, offset: 0x01e377f6, size: 665 bytes, params: 2, frame: 26
|
||||
var object2;
|
||||
var items2;
|
||||
var value;
|
||||
const styles = useStyles();
|
||||
const items = [styles.tile];
|
||||
items[1] = {width: size, height: size};
|
||||
if (isAvatarDecorationRecord(item)) {
|
||||
return (
|
||||
<View style={items}>
|
||||
{((Component) => <Component item={item} size={0.75 * size} />)(importDefault(7596) /* metro dependency 7596: AvatarDecorationSampleV2 */)}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
if (isProfileFrameRecord(item)) {
|
||||
return (
|
||||
<View style={items}>
|
||||
<View style={styles.framePreview}>
|
||||
{((Component) => <Component profileFrame={item} previewWidth={size * PROFILE_FRAME_ASPECT_RATIO} previewHeight={size - 2 * PX_8} profileBackgroundColor={(importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW} />)(importDefault(10031) /* metro dependency 10031: ProfileFrameSamplePreview */)}
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
if (isProfileEffectRecord(item)) {
|
||||
object2 = {style: items};
|
||||
var viewBindingProps = {'style': null, 'accessible': false, 'importantForAccessibility': 'no',
|
||||
style: styles.profileEffect};
|
||||
value = importDefault(5475) /* metro dependency 5475: FastImage */;
|
||||
value = ((Component) => <Component source={{uri: importDefault(10032) /* metro dependency 10032: sample_profile_small2xPng */}} style={styles.sampleProfile} resizeMode="cover" />)(value);
|
||||
items2 = [value];
|
||||
value = importDefault(8474) /* metro dependency 8474: ProfileEffect */;
|
||||
items2[1] = ((Component) => <Component skuId={item.skuId} bannerAdjustment={0} useThumbnail />)(value);
|
||||
return (
|
||||
<View {...object2}>
|
||||
<View {...viewBindingProps}>
|
||||
{items2}
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
if (isNameplateRecord(item)) {
|
||||
return (
|
||||
<View style={[items, styles.nameplateTile]}>
|
||||
<View style={styles.nameplateStrip}>
|
||||
{((Component) => <Component nameplate={(require(1901) /* metro dependency 1901: utils */).getNameplateData(item)} fullOpacity style={styles.nameplate} />)(importDefault(8483) /* metro dependency 8483: Nameplate */)}
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,196 @@
|
||||
/* Metro module 15298; source: modules/collectibles/native/CollectiblesMobileAnnouncementActionSheet.tsx; dependencies: [31, 27, 663, 6276, 1376, 33, 4501, 697, 1478, 6277, 1585, 4017, 15299, 4573, 1244, 15300, 5120, 6789, 6275, 15302, 15303, 5473, 4578, 2] */
|
||||
function _fun116984(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116984, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15495:6, offset: 0x0249ebb0, size: 609 bytes, params: 8, frame: 24
|
||||
var object5;
|
||||
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.Image;
|
||||
const StyleSheet = value.StyleSheet;
|
||||
const env0_5 = value.View;
|
||||
const env0_6 = (require(663) /* metro dependency 663: CollectiblesShopConstants */).CollectiblesMobileShopScreen;
|
||||
const env0_7 = (require(6276) /* metro dependency 6276: ActionSheetConstants */).ACTION_SHEET_MAX_WIDTH;
|
||||
const env0_8 = (require(1376) /* metro dependency 1376: DismissibleContentConstants */).ContentDismissActionType;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_9 = value.jsx;
|
||||
const env0_10 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object5 = {};
|
||||
const object6 = {};
|
||||
copyDataProperties(object6, StyleSheet.absoluteFillObject, undefined);
|
||||
object6['pointerEvents'] = 'none';
|
||||
object5.mascotContainer = object6;
|
||||
const object7 = {};
|
||||
copyDataProperties(object7, StyleSheet.absoluteFillObject, undefined);
|
||||
object5.mascotLayer = object7;
|
||||
object5.mascotImage = {'width': '100%', 'aspectRatio': 1.8324022346368716};
|
||||
object5.framePreviewImage = {'width': '100%', 'aspectRatio': 2.75, 'resizeMode': 'contain'};
|
||||
object5.eaFramePreviewImage = {'width': '100%', 'aspectRatio': 3.25, 'resizeMode': 'contain'};
|
||||
const object8 = {};
|
||||
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object8.padding = PX_16;
|
||||
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
object8.paddingTop = PX_24;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object8.gap = PX_16;
|
||||
object5.container = object8;
|
||||
object5.headerText = {textAlign: 'center'};
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object5.featureRow = {'flexDirection': 'row', 'alignItems': 'center', gap: PX_16};
|
||||
object5.featureText = {flex: 1};
|
||||
const PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
|
||||
object5.featureRows = {gap: PX_32};
|
||||
const env0_11 = Reflect.apply(createStyles, value, [object5]);
|
||||
object5 = {code: 'function CollectiblesMobileAnnouncementActionSheetTsx1(){const{animatedPosition,safeAreaTop,MASCOT_SAFE_AREA_NUDGE}=this.__closure;return{transform:[{translateY:animatedPosition.get()+safeAreaTop-MASCOT_SAFE_AREA_NUDGE}]};}'};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/CollectiblesMobileAnnouncementActionSheet.tsx');
|
||||
exports.default = CollectiblesMobileAnnouncementActionSheet;
|
||||
}
|
||||
|
||||
function CatEarsBackdrop() { // fn#116985, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15495:1111, offset: 0x0249ee11, size: 443 bytes, params: 1, frame: 24
|
||||
const styles = useStyles();
|
||||
const width = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)().width;
|
||||
const moduleValue = require(6277) /* metro dependency 6277 */;
|
||||
const useBottomSheet = moduleValue.useBottomSheet;
|
||||
const animatedPosition = Reflect.apply(useBottomSheet, moduleValue, []).animatedPosition;
|
||||
const top = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().top;
|
||||
const Math = global.Math;
|
||||
const value2 = Math.min(width, ACTION_SHEET_MAX_WIDTH);
|
||||
const value3 = (width - value2) / 2;
|
||||
const value4 = value2 / 1200;
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
const closure = function() {
|
||||
var object2 = {};
|
||||
object2.translateY = animatedPosition.get() + top - 60;
|
||||
return {transform: [object2]};
|
||||
};
|
||||
closure.__closure = {animatedPosition: animatedPosition, safeAreaTop: top, MASCOT_SAFE_AREA_NUDGE: 60};
|
||||
closure.__workletHash = 6274760278164;
|
||||
closure.__initData = env0_12;
|
||||
const value5 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
const value6 = -(56 * value4);
|
||||
return (
|
||||
<View2 style={[styles.mascotContainer, {left: value3, right: value3}, value5]}>
|
||||
<View style={[styles.mascotLayer, {top: -138 * value4, left: value6, right: value6}]}>
|
||||
<Image
|
||||
source={{uri: importDefault(15299) /* metro dependency 15299: announcement_sheet_framePng */}}
|
||||
style={styles.mascotImage}
|
||||
accessibilityElementsHidden
|
||||
importantForAccessibility="no-hide-descendants"
|
||||
/>
|
||||
</View>
|
||||
</View2>
|
||||
);
|
||||
}
|
||||
|
||||
function FeatureRow({icon, text}) { // fn#116987, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15495:1746, offset: 0x0249f002, size: 133 bytes, params: 2, frame: 20
|
||||
const styles = useStyles();
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return (
|
||||
<View style={styles.featureRow}>
|
||||
{icon}
|
||||
<Text
|
||||
variant="text-sm/medium"
|
||||
color="text-subtle"
|
||||
style={styles.featureText}
|
||||
>
|
||||
{text}
|
||||
</Text>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function CollectiblesMobileAnnouncementActionSheet({markAsDismissed}) { // fn#116988, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15495:2052, offset: 0x0249f087, size: 1080 bytes, params: 2, frame: 36
|
||||
const styles = useStyles();
|
||||
const value2 = (require(15300) /* metro dependency 15300: useProfileFramesMarketing */).useProfileFramesMarketing('CollectiblesMobileAnnouncementActionSheet');
|
||||
let showEaPremiumMarketing = value2.showEaPremiumMarketing;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let string = intl.string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const r22 = showEaPremiumMarketing ? Reflect.apply(string, intl, [t['7cmcJI']]) : Reflect.apply(string, intl,
|
||||
[t.MkVbBY]);
|
||||
const showGiftingMarketing = value2.showGiftingMarketing;
|
||||
showEaPremiumMarketing = value2.showEaPremiumMarketing;
|
||||
const showEaNonPremiumMarketing = value2.showEaNonPremiumMarketing;
|
||||
string = intl.string;
|
||||
const r20 = showGiftingMarketing ? Reflect.apply(string, intl,
|
||||
[t['/4bQuG']]) : showEaPremiumMarketing ? Reflect.apply(string, intl,
|
||||
[t['5UI+bw']]) : showEaNonPremiumMarketing ? Reflect.apply(string, intl, [t['4a7pVU']]) : Reflect.apply(string,
|
||||
intl, [t['+9vaAT']]);
|
||||
const binding = env0_3;
|
||||
const env0_1 = binding.useRef(false);
|
||||
const env0_2 = binding.useRef(markAsDismissed);
|
||||
binding.useEffect(_fun116989, [markAsDismissed]);
|
||||
binding.useEffect(function() {
|
||||
return _fun116991;
|
||||
}, []);
|
||||
const value9 = binding.useCallback(_fun116992, [markAsDismissed]);
|
||||
const value10 = binding.useCallback(_fun116993, [markAsDismissed]);
|
||||
const value11 = binding.useMemo(_fun116994, []);
|
||||
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
|
||||
const object = {};
|
||||
object.uri = value2.isEarlyAccess ? importDefault(15302) /* metro dependency 15302: announcement_key_1Png */ : importDefault(15303) /* metro dependency 15303: mobile_announcementPng */;
|
||||
const items3 = [<Image source={object} style={value2.isEarlyAccess ? styles.eaFramePreviewImage : styles.framePreviewImage} accessibilityElementsHidden importantForAccessibility="no-hide-descendants" />];
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
items3[1] = <Text variant="heading-xl/bold" color="text-strong" accessibilityRole="header" style={styles.headerText}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.vRCvqo)}</Text>;
|
||||
const PaintIllocon = (require(5473) /* metro dependency 5473: native */).PaintIllocon;
|
||||
const items2 = [<FeatureRow icon={<PaintIllocon size={32} />} text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['6ZWB0C'])} />];
|
||||
const HeartIllocon = (require(5473) /* metro dependency 5473: native */).HeartIllocon;
|
||||
items2[1] = <FeatureRow icon={<HeartIllocon size={32} />} text={r22} />;
|
||||
const ShopIllocon = (require(5473) /* metro dependency 5473: native */).ShopIllocon;
|
||||
items2[2] = <FeatureRow icon={<ShopIllocon size={32} />} text={r20} />;
|
||||
items3[2] = <View style={styles.featureRows}>{items2}</View>;
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
string = intl.string;
|
||||
const S9hXPI = (require(1244) /* metro dependency 1244: indexNative */).t.S9hXPI;
|
||||
items3[3] = <Button size="lg" text={Reflect.apply(string, intl, [S9hXPI])} onPress={value9} />;
|
||||
return (
|
||||
<BottomSheet onDismiss={value10} backdropChildren={value11}>
|
||||
<View style={styles.container}>
|
||||
{items3}
|
||||
</View>
|
||||
</BottomSheet>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun116990() { // fn#116990, offset: 0x0249f4bf, size: 11 bytes, params: 1, frame: 1
|
||||
return _fun116991;
|
||||
}
|
||||
|
||||
function _fun116992() { // fn#116992, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15495:2816, offset: 0x0249f4f8, size: 125 bytes, params: 1, frame: 15
|
||||
env0_1.current = true;
|
||||
const markAsDismissedBinding = markAsDismissed;
|
||||
const PRIMARY = ContentDismissActionType.PRIMARY;
|
||||
markAsDismissedBinding(PRIMARY);
|
||||
const collectiblesActionCreatorsModule = require(5120) /* metro dependency 5120: CollectiblesActionCreators */;
|
||||
const openCollectiblesShopMobile = collectiblesActionCreatorsModule.openCollectiblesShopMobile;
|
||||
const object2 = {};
|
||||
const FEATURED_PAGE = CollectiblesMobileShopScreen.FEATURED_PAGE;
|
||||
object2.screen = FEATURED_PAGE;
|
||||
object2.analyticsLocations = [];
|
||||
const ACTION_SHEET = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).ACTION_SHEET;
|
||||
object2.analyticsSource = ACTION_SHEET;
|
||||
Reflect.apply(openCollectiblesShopMobile, collectiblesActionCreatorsModule, [object2]);
|
||||
}
|
||||
|
||||
function _fun116993() { // fn#116993, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15495:2993, offset: 0x0249f575, size: 41 bytes, params: 1, frame: 11
|
||||
env0_1.current = true;
|
||||
const markAsDismissedBinding = markAsDismissed;
|
||||
const USER_DISMISS = ContentDismissActionType.USER_DISMISS;
|
||||
markAsDismissedBinding(USER_DISMISS);
|
||||
}
|
||||
|
||||
function _fun116991() { // fn#116991, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15495:2747, offset: 0x0249f4ca, size: 46 bytes, params: 1, frame: 11
|
||||
var binding;
|
||||
let current = env1_1.current;
|
||||
if (!current) {
|
||||
binding = env1_2;
|
||||
current = binding.current;
|
||||
value = environment.__proto__.__proto__;
|
||||
Reflect.apply(current, binding, [ContentDismissActionType.AUTO_DISMISS]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
/* Metro module 8471; source: modules/collectibles/native/CollectiblesPreviewConstants.tsx; dependencies: [2] */
|
||||
function _fun67268(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#67268, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8656:6, offset: 0x01c1c588, size: 134 bytes, params: 8, frame: 15
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/CollectiblesPreviewConstants.tsx');
|
||||
exports.SAMPLE_PROFILE_ASPECT_RATIO = 0.5113636363636364;
|
||||
exports.BUNDLE_PREVIEW_CONFIG = {small: {'bundleWidth': 140, 'bundleHeight': 280, 'pfxWidth': 80, 'pfxHeight': 120,
|
||||
'pfxTop': 70, 'pfxLeft': 16, 'avatarTop': 130, 'avatarRight': 40, 'avatarWithNameplateTop': 110,
|
||||
'avatarWithNameplateRight': 40, 'nameplateBottom': 110, 'nameplatePreviewWidth': 80, 'avatarDecorationSize': 80,
|
||||
'avatarDecorationSizeTriple': 60}, large: {'bundleWidth': 300, 'bundleHeight': 340, 'pfxWidth': 160,
|
||||
'pfxHeight': 280, 'pfxTop': 10, 'pfxLeft': 25, 'avatarTop': 130, 'avatarRight': 40,
|
||||
'avatarWithNameplateTop': 120, 'avatarWithNameplateRight': 70, 'nameplateBottom': 90,
|
||||
'nameplatePreviewWidth': 130, 'avatarDecorationSize': 140, 'avatarDecorationSizeTriple': 140}};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
/* Metro module 14084; source: modules/collectibles/native/CollectiblesProgressiveImage.tsx; dependencies: [31, 27, 33, 4017, 4504, 2] */
|
||||
function _fun106716(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#106716, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14281:6, offset: 0x022e8012, size: 169 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 value = require(27) /* metro dependency 27 */;
|
||||
const env0_3 = value.View;
|
||||
const env0_4 = value.StyleSheet;
|
||||
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/CollectiblesProgressiveImage.tsx');
|
||||
exports.CollectiblesProgressiveImage = CollectiblesProgressiveImage;
|
||||
}
|
||||
|
||||
function CollectiblesProgressiveImage(a0) { // fn#106717, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14281:277, offset: 0x022e80bb, size: 204 bytes, params: 2, frame: 22
|
||||
const source = a0.source;
|
||||
const style = a0.style;
|
||||
const value = Object.create(null);
|
||||
value.source = 0;
|
||||
value.style = 0;
|
||||
const value2 = copyDataProperties({}, a0, value, undefined);
|
||||
const value4 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
|
||||
const Image = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).Image;
|
||||
const imageProps = {...value2};
|
||||
imageProps['source'] = source;
|
||||
const object = {};
|
||||
copyDataProperties(object, StyleSheet.absoluteFillObject, value);
|
||||
object['opacity'] = value4;
|
||||
imageProps['style'] = object;
|
||||
imageProps['onLoad'] = CollectiblesProgressiveImageOnLoad;
|
||||
return (
|
||||
<View style={style}>
|
||||
<Image {...imageProps} />
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function CollectiblesProgressiveImageOnLoad() { // fn#106718, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14281:481, owner: CollectiblesProgressiveImage.onLoad, offset: 0x022e8187, size: 125 bytes, params: 1, frame: 20
|
||||
const binding = env0_0;
|
||||
const set = binding.set;
|
||||
let value = environment.__proto__;
|
||||
value = require(4504) /* metro dependency 4504: timing */;
|
||||
const withTiming = value.withTiming;
|
||||
const Easing = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing;
|
||||
const inOut = Easing.inOut;
|
||||
const Easing2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing;
|
||||
Reflect.apply(set, binding, [Reflect.apply(withTiming, value, [1, {duration: 500, easing: Reflect.apply(inOut,
|
||||
Easing, [Easing2.ease])}])]);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,179 @@
|
||||
/* Metro module 10062; source: modules/collectibles/native/CollectiblesShopCardAssetTileV2.tsx; dependencies: [57, 31, 27, 663, 33, 10020, 697, 4501, 9294, 6705, 5133, 1904, 7609, 10030, 8470, 5475, 10063, 10064, 7596, 8472, 10031, 10050, 4000, 3860, 10021, 2] */
|
||||
function _fun78656(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78656, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10248:6, offset: 0x01e2fc7b, size: 625 bytes, params: 8, frame: 27
|
||||
var object4;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const value2 = require(27) /* metro dependency 27 */;
|
||||
const StyleSheet = value2.StyleSheet;
|
||||
const env0_4 = value2.View;
|
||||
const env0_5 = (require(663) /* metro dependency 663: CollectiblesShopConstants */).EXTERNAL_PRODUCT_SKU_IDS;
|
||||
const value3 = require(33) /* metro dependency 33 */;
|
||||
const env0_6 = value3.jsx;
|
||||
const env0_7 = value3.jsxs;
|
||||
const COLLECTIBLES_SHOP_CARD_HEIGHT = (require(10020) /* metro dependency 10020: CollectiblesShopCardV2 */).COLLECTIBLES_SHOP_CARD_HEIGHT;
|
||||
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
const value4 = COLLECTIBLES_SHOP_CARD_HEIGHT - 2 * PX_16;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
object4 = {};
|
||||
const object5 = {'display': 'flex', 'justifyContent': 'center', 'alignItems': 'center', 'overflow': 'hidden',
|
||||
'height': '100%', 'width': '100%'};
|
||||
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
||||
object4.assetContainer = object5;
|
||||
const object6 = {};
|
||||
copyDataProperties(object6, StyleSheet.absoluteFillObject, undefined);
|
||||
object6['justifyContent'] = 'center';
|
||||
object6['alignItems'] = 'center';
|
||||
object6['width'] = '100%';
|
||||
object6['height'] = '75%';
|
||||
object4.overlayContainer = object6;
|
||||
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
||||
object4.profileEffectContainer = {'width': '100%', 'height': '100%', backgroundColor: BACKGROUND_BASE_LOW};
|
||||
object4.profileFrameContainer = {'width': '100%', 'height': null, 'alignItems': 'center', height: value4};
|
||||
object4.externalProductImage = {'width': 80, 'height': 80, 'resizeMode': 'contain'};
|
||||
object4.purchasedOrDisabled = {opacity: 0.4};
|
||||
const ICON_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.ICON_STRONG;
|
||||
object4.overlayIcon = {'position': 'absolute', 'opacity': 1, 'color': null, 'fontWeight': 'bold',
|
||||
color: ICON_STRONG};
|
||||
const env0_9 = Reflect.apply(createStyles, createStylesModule, [object4]);
|
||||
value = value.memo(_fun78662);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/CollectiblesShopCardAssetTileV2.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function PurchasedAssetOverlay() { // fn#78657, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10248:946, offset: 0x01e2feec, size: 97 bytes, params: 1, frame: 17
|
||||
const styles = useStyles();
|
||||
const CheckmarkLargeBoldIcon = (require(9294) /* metro dependency 9294: CheckmarkLargeBoldIcon */).CheckmarkLargeBoldIcon;
|
||||
return (
|
||||
<View style={styles.overlayContainer}>
|
||||
<CheckmarkLargeBoldIcon size="lg" style={styles.overlayIcon} />
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function DisabledAssetOverlay() { // fn#78658, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10248:1097, offset: 0x01e2ff4d, size: 97 bytes, params: 1, frame: 17
|
||||
const styles = useStyles();
|
||||
const LockIcon = (require(6705) /* metro dependency 6705: LockIcon */).LockIcon;
|
||||
return (
|
||||
<View style={styles.overlayContainer}>
|
||||
<LockIcon size="lg" style={styles.overlayIcon} />
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function ProductPreview({product, isPurchased, isDisabled, disableBundleStaticBackground, muteBundleStaticBackground}) { // fn#78659, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10248:1228, offset: 0x01e2ffae, size: 298 bytes, params: 2, frame: 23
|
||||
const styles = useStyles();
|
||||
const productType = (require(5133) /* metro dependency 5133: CollectiblesProductUtils */).getProductType(product);
|
||||
const CollectiblesItemType = (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType;
|
||||
const PROFILE_EFFECT = CollectiblesItemType.PROFILE_EFFECT;
|
||||
return (
|
||||
<View
|
||||
style={[styles.overlayContainer, (isPurchased || isDisabled) && styles.purchasedOrDisabled,
|
||||
{height: productType === PROFILE_EFFECT || productType === (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType.PROFILE_FRAME ? '100%' : product.type !== (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType.BUNDLE ? '75%' : '100%'}]}
|
||||
renderToHardwareTextureAndroid
|
||||
needsOffscreenAlphaCompositing
|
||||
>
|
||||
<ProductPreviewInner
|
||||
product={product}
|
||||
disableBundleStaticBackground={disableBundleStaticBackground}
|
||||
muteBundleStaticBackground={muteBundleStaticBackground}
|
||||
/>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function ProductPreviewInner({product, disableBundleStaticBackground, muteBundleStaticBackground}) { // fn#78660, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10248:1807, offset: 0x01e300d8, size: 895 bytes, params: 2, frame: 29
|
||||
const styles = useStyles();
|
||||
const {firstProfileEffect, firstAvatarDecoration,
|
||||
firstNameplate} = (require(7609) /* metro dependency 7609: useShopProductItems */).useShopProductItems(product);
|
||||
let type = product.type;
|
||||
const CollectiblesItemType = (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType;
|
||||
const BUNDLE = CollectiblesItemType.BUNDLE;
|
||||
if (type === BUNDLE) {
|
||||
var moduleValue2 = require(10030) /* metro dependency 10030: bundleUtils */;
|
||||
if (moduleValue2.isValidCollectiblesBundle(product)) {
|
||||
return ((Component) => <Component deco={firstAvatarDecoration} pfx={firstProfileEffect} nameplate={firstNameplate} size="small" previewAssets={product.previewAssets} disableStaticBackground={disableBundleStaticBackground} mutedStaticBackground={muteBundleStaticBackground} />)(importDefault(8470) /* metro dependency 8470: BundleSampleV2 */);
|
||||
}
|
||||
}
|
||||
let skuId = product.skuId;
|
||||
const ORB_PROFILE_BADGE = EXTERNAL_PRODUCT_SKU_IDS.ORB_PROFILE_BADGE;
|
||||
if (skuId === ORB_PROFILE_BADGE) {
|
||||
return ((Component) => <Component source={{uri: importDefault(10063) /* metro dependency 10063: orb_profile_badge_icon2xPng */}} style={styles.externalProductImage} />)(importDefault(5475) /* metro dependency 5475: FastImage */);
|
||||
}
|
||||
skuId = product.skuId;
|
||||
const FRACTIONAL_PREMIUM = EXTERNAL_PRODUCT_SKU_IDS.FRACTIONAL_PREMIUM;
|
||||
if (skuId === FRACTIONAL_PREMIUM) {
|
||||
return ((Component) => <Component source={{uri: importDefault(10064) /* metro dependency 10064: mobile_fraction_nitro_2xPng */}} style={styles.externalProductImage} />)(importDefault(5475) /* metro dependency 5475: FastImage */);
|
||||
}
|
||||
const property = env0_3(product.items, 1)[0];
|
||||
type = property?.type;
|
||||
const AVATAR_DECORATION = CollectiblesItemType.AVATAR_DECORATION;
|
||||
if (AVATAR_DECORATION === type) {
|
||||
return ((Component) => <Component item={property} size={100} />)(importDefault(7596) /* metro dependency 7596: AvatarDecorationSampleV2 */);
|
||||
}
|
||||
const PROFILE_EFFECT = CollectiblesItemType.PROFILE_EFFECT;
|
||||
if (PROFILE_EFFECT === type) {
|
||||
return (
|
||||
<View style={styles.profileEffectContainer}>
|
||||
{((Component) => <Component item={property} hideBackground />)(importDefault(8472) /* metro dependency 8472: ProfileEffectSampleV2 */)}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
const PROFILE_FRAME = CollectiblesItemType.PROFILE_FRAME;
|
||||
if (PROFILE_FRAME === type) {
|
||||
return (
|
||||
<View style={styles.profileFrameContainer}>
|
||||
{((Component) => <Component profileFrame={property} previewWidth={(require(10020) /* metro dependency 10020: CollectiblesShopCardV2 */).COLLECTIBLES_SHOP_CARD_WIDTH - (importDefault(697) /* metro dependency 697: native */).space.PX_32} previewHeight={env0_8} profileBackgroundColor={(importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW} />)(importDefault(10031) /* metro dependency 10031: ProfileFrameSamplePreview */)}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
const NAMEPLATE = CollectiblesItemType.NAMEPLATE;
|
||||
if (NAMEPLATE === type) {
|
||||
return ((Component) => <Component item={property} />)(importDefault(10050) /* metro dependency 10050: NameplateCardPreview */);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function AssetTileInternal({children, solidBackground}) { // fn#78661, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10248:3107, offset: 0x01e30457, size: 215 bytes, params: 2, frame: 23
|
||||
solidBackground = !(solidBackground === undefined) && solidBackground;
|
||||
const styles = useStyles();
|
||||
const colorUtilsModule = require(4000) /* metro dependency 4000: ColorUtils */;
|
||||
const hexToRgbaString = colorUtilsModule.hexToRgbaString;
|
||||
const moduleValue2 = colorUtilsModule;
|
||||
const hexWithOpacity = moduleValue2.hexWithOpacity;
|
||||
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
|
||||
const useToken = useTokenModule.useToken;
|
||||
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
||||
return (
|
||||
<View
|
||||
style={[styles.assetContainer, {backgroundColor: Reflect.apply(hexToRgbaString, colorUtilsModule,
|
||||
[Reflect.apply(hexWithOpacity, moduleValue2, [Reflect.apply(useToken, useTokenModule,
|
||||
[BACKGROUND_BASE_LOW]), solidBackground ? 1 : 0.8])])}]}
|
||||
importantForAccessibility="no-hide-descendants"
|
||||
accessibilityElementsHidden
|
||||
>
|
||||
{children}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun78662({product, isPurchased, solidBackground, isDisabled, disableBundleStaticBackground, muteBundleStaticBackground}) { // fn#78662, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10248:3429, offset: 0x01e3052e, size: 230 bytes, params: 2, frame: 22
|
||||
return (
|
||||
<AssetTileInternal solidBackground={solidBackground}>
|
||||
<ProductPreview
|
||||
product={(require(5133) /* metro dependency 5133: CollectiblesProductUtils */).getSelectedProduct(product,
|
||||
(require(10021) /* metro dependency 10021: useDefaultVariantIndex */).useDefaultVariantIndex(product))}
|
||||
isPurchased={isPurchased}
|
||||
isDisabled={isDisabled}
|
||||
disableBundleStaticBackground={disableBundleStaticBackground}
|
||||
muteBundleStaticBackground={muteBundleStaticBackground}
|
||||
/>
|
||||
{isPurchased && <PurchasedAssetOverlay />}
|
||||
{isDisabled && !isPurchased && <DisabledAssetOverlay />}
|
||||
</AssetTileInternal>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,327 @@
|
||||
/* Metro module 10065; source: modules/collectibles/native/CollectiblesShopCardCardDetailsV2.tsx; dependencies: [31, 27, 5140, 661, 33, 4501, 697, 10021, 5133, 10066, 5134, 10069, 10075, 4573, 1244, 10076, 477, 10078, 7954, 7594, 10054, 1904, 3802, 3860, 4000, 10080, 566, 4589, 10081, 2] */
|
||||
function _fun78665(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78665, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10251:6, offset: 0x01e306e2, size: 482 bytes, params: 8, frame: 27
|
||||
var object3;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(27) /* metro dependency 27 */).View;
|
||||
const iapStoreAndroid = importDefault(5140) /* metro dependency 5140: IAPStoreAndroid */;
|
||||
const env0_6 = (require(661) /* metro dependency 661: Constants */).VerticalGradient;
|
||||
const value2 = require(33) /* metro dependency 33 */;
|
||||
const env0_7 = value2.jsx;
|
||||
const env0_8 = value2.jsxs;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
object3 = {};
|
||||
const object4 = {'position': 'absolute', 'height': '45%', 'width': '100%', 'padding': 10, 'flex': 1, 'bottom': 0,
|
||||
'overflow': 'hidden', 'borderBottomLeftRadius': null, 'borderBottomRightRadius': null, 'display': 'flex',
|
||||
'flexDirection': 'column', 'justifyContent': 'flex-end'};
|
||||
object4.borderBottomLeftRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
||||
object4.borderBottomRightRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
||||
object3.regularMetadataContainer = object4;
|
||||
object3.assetName = {marginBottom: 4};
|
||||
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
object3.priceVariantsContainer = {'display': 'flex', 'flexDirection': 'row', 'justifyContent': 'space-between',
|
||||
'alignItems': 'center', 'width': '100%', gap: PX_4};
|
||||
object3.priceDescription = {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center', 'flex': 1};
|
||||
object3.text = {flexShrink: 1};
|
||||
object3.discountPercentage = {paddingLeft: 3};
|
||||
object3.wheelIcon = {'marginTop': 0, 'marginRight': 3};
|
||||
object3.androidTextPadding = {paddingBottom: 2};
|
||||
const env0_9 = Reflect.apply(createStyles, createStylesModule, [object3]);
|
||||
value.memo(_fun78666).displayName = 'PriceDescription';
|
||||
value = value.memo(_fun78670);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/CollectiblesShopCardCardDetailsV2.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _fun78666({product, hasShopDiscount, discountSource, styles, collectibleProductState, isFetchingGoogleSkus, preferVCPrice, isDisabled}) { // fn#78666, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10251:869, offset: 0x01e308c4, size: 1878 bytes, params: 2, frame: 32
|
||||
var r8;
|
||||
var r1;
|
||||
var items2;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
var object2;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var formatToPlainString;
|
||||
var W4DfeF;
|
||||
var amount;
|
||||
var items3;
|
||||
var items4;
|
||||
var items5;
|
||||
var value13;
|
||||
var items6;
|
||||
var value;
|
||||
const selectedProduct = (require(5133) /* metro dependency 5133: CollectiblesProductUtils */).getSelectedProduct(product,
|
||||
(require(10021) /* metro dependency 10021: useDefaultVariantIndex */).useDefaultVariantIndex(product));
|
||||
const formattedPriceForCollectiblesProduct = (require(10066) /* metro dependency 10066: CollectiblesUtils */).getFormattedPriceForCollectiblesProduct(selectedProduct,
|
||||
hasShopDiscount, true);
|
||||
const binding = env0_3;
|
||||
const useMemo = binding.useMemo;
|
||||
let object = [selectedProduct, hasShopDiscount];
|
||||
const value6 = Reflect.apply(useMemo, binding, [_fun78667, object]);
|
||||
const value7 = binding.useMemo(_fun78668, [selectedProduct, hasShopDiscount]);
|
||||
const hooksModule = require(10069) /* metro dependency 10069: hooks */;
|
||||
const useFetchVirtualCurrencyBalance = hooksModule.useFetchVirtualCurrencyBalance;
|
||||
const balance = Reflect.apply(useFetchVirtualCurrencyBalance, hooksModule, []).balance;
|
||||
const value8 = binding.useMemo(_fun78669, [balance, value6]);
|
||||
if (isFetchingGoogleSkus) {
|
||||
if (formattedPriceForCollectiblesProduct == null) {
|
||||
const CollectiblesShopPricePlaceholder = (require(10075) /* metro dependency 10075: CollectiblesShopPricePlaceholder */).CollectiblesShopPricePlaceholder;
|
||||
return <CollectiblesShopPricePlaceholder />;
|
||||
}
|
||||
}
|
||||
if (collectibleProductState === 'partiallyOwnedBundle') {
|
||||
return (
|
||||
<View style={styles.priceDescription}>
|
||||
<Text
|
||||
variant="text-xs/semibold"
|
||||
color="mobile-text-heading-primary"
|
||||
lineClamp={1}
|
||||
style={styles.text}
|
||||
>
|
||||
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.BEjTij)}
|
||||
</Text>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
if (collectibleProductState === 'purchased') {
|
||||
return (
|
||||
<View style={styles.priceDescription}>
|
||||
<Text
|
||||
variant="text-xs/semibold"
|
||||
color="mobile-text-heading-primary"
|
||||
lineClamp={1}
|
||||
style={styles.text}
|
||||
>
|
||||
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['6cfuDj'])}
|
||||
</Text>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
if (collectibleProductState === 'nitroUpsell') {
|
||||
return (
|
||||
<View style={styles.priceDescription}>
|
||||
<Text
|
||||
variant="text-xs/semibold"
|
||||
color="mobile-text-heading-primary"
|
||||
lineClamp={1}
|
||||
style={styles.text}
|
||||
>
|
||||
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.sEAnVH)}
|
||||
</Text>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
if (collectibleProductState === 'nitroClaim') {
|
||||
return (
|
||||
<View style={styles.priceDescription}>
|
||||
<Text
|
||||
variant="text-xs/semibold"
|
||||
color="mobile-text-heading-primary"
|
||||
lineClamp={1}
|
||||
style={styles.text}
|
||||
>
|
||||
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.rt69oo)}
|
||||
</Text>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
if (isDisabled) {
|
||||
r1 = <View style={styles.priceDescription}><Text variant="text-xs/semibold" color="mobile-text-heading-primary" lineClamp={1} style={styles.text}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.wu4gyV)}</Text></View>;
|
||||
} else {
|
||||
if (value6 == null) {
|
||||
object = {};
|
||||
object.style = styles.priceDescription;
|
||||
r8 = hasShopDiscount && (discountSource === (require(5134) /* metro dependency 5134: CollectiblesUtils */).ShopDiscountSource.THIRDPARTY ? ((TagIcon) => <TagIcon size="xs" color="mobile-text-heading-primary" style={styles.wheelIcon} />)((require(10078) /* metro dependency 10078: TagIcon */).TagIcon) : ((NitroWheelIcon) => <NitroWheelIcon size="xs" color="mobile-text-heading-primary" style={styles.wheelIcon} />)((require(7954) /* metro dependency 7954: NitroWheelIcon */).NitroWheelIcon));
|
||||
items4 = [r8];
|
||||
items5 = [styles.text];
|
||||
items5[1] = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid() && styles.androidTextPadding;
|
||||
items4[1] = <Text variant="text-xs/semibold" color="mobile-text-heading-primary" lineClamp={1} style={items5}>{formattedPriceForCollectiblesProduct}</Text>;
|
||||
value13 = value7 > 0;
|
||||
if (value13) {
|
||||
items6 = [styles.discountPercentage];
|
||||
items6[1] = styles.text;
|
||||
value = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
items6[2] = value.isAndroid() ? styles.androidTextPadding : undefined;
|
||||
value = <Text style={items6} color="text-feedback-positive" variant="text-xs/semibold" lineClamp={1}>{'-' + value7 + '%'}</Text>;
|
||||
r8 = value;
|
||||
} else {
|
||||
r8 = value13;
|
||||
}
|
||||
items4[2] = r8;
|
||||
object.children = items4;
|
||||
r1 = object;
|
||||
} else if (balance == null) {
|
||||
object = {};
|
||||
object.style = styles.priceDescription;
|
||||
r8 = hasShopDiscount && (discountSource === (require(5134) /* metro dependency 5134: CollectiblesUtils */).ShopDiscountSource.THIRDPARTY ? ((TagIcon) => <TagIcon size="xs" color="mobile-text-heading-primary" style={styles.wheelIcon} />)((require(10078) /* metro dependency 10078: TagIcon */).TagIcon) : ((NitroWheelIcon) => <NitroWheelIcon size="xs" color="mobile-text-heading-primary" style={styles.wheelIcon} />)((require(7954) /* metro dependency 7954: NitroWheelIcon */).NitroWheelIcon));
|
||||
items4 = [r8];
|
||||
items5 = [styles.text];
|
||||
items5[1] = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid() && styles.androidTextPadding;
|
||||
items4[1] = <Text variant="text-xs/semibold" color="mobile-text-heading-primary" lineClamp={1} style={items5}>{formattedPriceForCollectiblesProduct}</Text>;
|
||||
value13 = value7 > 0;
|
||||
if (value13) {
|
||||
items6 = [styles.discountPercentage];
|
||||
items6[1] = styles.text;
|
||||
value = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
items6[2] = value.isAndroid() ? styles.androidTextPadding : undefined;
|
||||
value = <Text style={items6} color="text-feedback-positive" variant="text-xs/semibold" lineClamp={1}>{'-' + value7 + '%'}</Text>;
|
||||
r8 = value;
|
||||
} else {
|
||||
r8 = value13;
|
||||
}
|
||||
items4[2] = r8;
|
||||
object.children = items4;
|
||||
r1 = object;
|
||||
} else if (preferVCPrice === true) {
|
||||
object = {};
|
||||
object.style = [styles.priceDescription, {opacity: value8 !== false ? 1 : 0.5}];
|
||||
const OrbsIcon = (require(10076) /* metro dependency 10076: OrbsIcon */).OrbsIcon;
|
||||
value = <OrbsIcon size="xxs" color="mobile-text-heading-primary" style={styles.wheelIcon} />;
|
||||
items2 = [value];
|
||||
object2 = {'variant': 'text-xs/semibold', 'color': 'mobile-text-heading-primary', 'lineClamp': 1};
|
||||
formatToPlainString = intl.formatToPlainString;
|
||||
W4DfeF = (require(1244) /* metro dependency 1244: indexNative */).t.W4DfeF;
|
||||
amount = value6.amount;
|
||||
object2.accessibilityLabel = Reflect.apply(formatToPlainString, intl, [W4DfeF, {orbAmount: amount}]);
|
||||
items3 = [styles.text];
|
||||
value = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
value = value.isAndroid();
|
||||
items3[1] = value && styles.androidTextPadding;
|
||||
object2.style = items3;
|
||||
amount = value6.amount;
|
||||
items2[1] = <Text {...object2}>{amount}</Text>;
|
||||
object.children = items2;
|
||||
r1 = object;
|
||||
} else if (value8) {
|
||||
object = {};
|
||||
object.style = [styles.priceDescription, {opacity: value8 !== false ? 1 : 0.5}];
|
||||
const OrbsIcon2 = (require(10076) /* metro dependency 10076: OrbsIcon */).OrbsIcon;
|
||||
value = <OrbsIcon2 size="xxs" color="mobile-text-heading-primary" style={styles.wheelIcon} />;
|
||||
items2 = [value];
|
||||
object2 = {'variant': 'text-xs/semibold', 'color': 'mobile-text-heading-primary', 'lineClamp': 1};
|
||||
formatToPlainString = intl.formatToPlainString;
|
||||
W4DfeF = (require(1244) /* metro dependency 1244: indexNative */).t.W4DfeF;
|
||||
amount = value6.amount;
|
||||
object2.accessibilityLabel = Reflect.apply(formatToPlainString, intl, [W4DfeF, {orbAmount: amount}]);
|
||||
items3 = [styles.text];
|
||||
value = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
value = value.isAndroid();
|
||||
items3[1] = value && styles.androidTextPadding;
|
||||
object2.style = items3;
|
||||
amount = value6.amount;
|
||||
items2[1] = <Text {...object2}>{amount}</Text>;
|
||||
object.children = items2;
|
||||
r1 = object;
|
||||
} else if (formattedPriceForCollectiblesProduct != null) {
|
||||
object = {};
|
||||
object.style = styles.priceDescription;
|
||||
r8 = hasShopDiscount && (discountSource === (require(5134) /* metro dependency 5134: CollectiblesUtils */).ShopDiscountSource.THIRDPARTY ? ((TagIcon) => <TagIcon size="xs" color="mobile-text-heading-primary" style={styles.wheelIcon} />)((require(10078) /* metro dependency 10078: TagIcon */).TagIcon) : ((NitroWheelIcon) => <NitroWheelIcon size="xs" color="mobile-text-heading-primary" style={styles.wheelIcon} />)((require(7954) /* metro dependency 7954: NitroWheelIcon */).NitroWheelIcon));
|
||||
items4 = [r8];
|
||||
items5 = [styles.text];
|
||||
items5[1] = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid() && styles.androidTextPadding;
|
||||
items4[1] = <Text variant="text-xs/semibold" color="mobile-text-heading-primary" lineClamp={1} style={items5}>{formattedPriceForCollectiblesProduct}</Text>;
|
||||
value13 = value7 > 0;
|
||||
if (value13) {
|
||||
items6 = [styles.discountPercentage];
|
||||
items6[1] = styles.text;
|
||||
value = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
items6[2] = value.isAndroid() ? styles.androidTextPadding : undefined;
|
||||
value = <Text style={items6} color="text-feedback-positive" variant="text-xs/semibold" lineClamp={1}>{'-' + value7 + '%'}</Text>;
|
||||
r8 = value;
|
||||
} else {
|
||||
r8 = value13;
|
||||
}
|
||||
items4[2] = r8;
|
||||
object.children = items4;
|
||||
r1 = object;
|
||||
} else {
|
||||
object = {};
|
||||
object.style = [styles.priceDescription, {opacity: value8 !== false ? 1 : 0.5}];
|
||||
const OrbsIcon3 = (require(10076) /* metro dependency 10076: OrbsIcon */).OrbsIcon;
|
||||
value = <OrbsIcon3 size="xxs" color="mobile-text-heading-primary" style={styles.wheelIcon} />;
|
||||
items2 = [value];
|
||||
object2 = {'variant': 'text-xs/semibold', 'color': 'mobile-text-heading-primary', 'lineClamp': 1};
|
||||
formatToPlainString = intl.formatToPlainString;
|
||||
W4DfeF = (require(1244) /* metro dependency 1244: indexNative */).t.W4DfeF;
|
||||
amount = value6.amount;
|
||||
object2.accessibilityLabel = Reflect.apply(formatToPlainString, intl, [W4DfeF, {orbAmount: amount}]);
|
||||
items3 = [styles.text];
|
||||
value = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
value = value.isAndroid();
|
||||
items3[1] = value && styles.androidTextPadding;
|
||||
object2.style = items3;
|
||||
amount = value6.amount;
|
||||
items2[1] = <Text {...object2}>{amount}</Text>;
|
||||
object.children = items2;
|
||||
r1 = object;
|
||||
}
|
||||
value = <View {...r1} />;
|
||||
r1 = value;
|
||||
}
|
||||
return r1;
|
||||
}
|
||||
|
||||
function _fun78670({product, collectibleProductState, preferVCPrice, isDisabled, hidePrice}) { // fn#78670, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10251:3732, offset: 0x01e310c2, size: 765 bytes, params: 2, frame: 31
|
||||
var r5;
|
||||
var items4;
|
||||
var value;
|
||||
const styles = useStyles();
|
||||
const value2 = (require(7594) /* metro dependency 7594: useCurrentUser */).useCurrentUser();
|
||||
const r20 = (importDefault(3802) /* metro dependency 3802: PremiumUtils */).canUseShopDiscounts(value2) || (require(10054) /* metro dependency 10054: useCanPurchaseFrames */).useIsProfileFramesEarlyAccessPhase('CollectiblesShopCardCardDetailsV2') && (require(5133) /* metro dependency 5133: CollectiblesProductUtils */).getProductType(product) === (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType.PROFILE_FRAME;
|
||||
const shopDiscountSource = (require(5134) /* metro dependency 5134: CollectiblesUtils */).getShopDiscountSource(value2);
|
||||
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
|
||||
const useToken = useTokenModule.useToken;
|
||||
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
||||
const value7 = Reflect.apply(useToken, useTokenModule, [BACKGROUND_BASE_LOW]);
|
||||
const colorUtilsModule = require(4000) /* metro dependency 4000: ColorUtils */;
|
||||
let hexToRgbaString = colorUtilsModule.hexToRgbaString;
|
||||
const moduleValue7 = colorUtilsModule;
|
||||
const value8 = Reflect.apply(hexToRgbaString, colorUtilsModule, [moduleValue7.hexWithOpacity(value7, 0.9)]);
|
||||
const moduleValue8 = colorUtilsModule;
|
||||
hexToRgbaString = moduleValue8.hexToRgbaString;
|
||||
const moduleValue9 = colorUtilsModule;
|
||||
const value9 = Reflect.apply(hexToRgbaString, moduleValue8, [moduleValue9.hexWithOpacity(value7, 0)]);
|
||||
const productName = (require(10080) /* metro dependency 10080: getProductName */).getProductName(product);
|
||||
const value11 = (require(566) /* metro dependency 566: flux */).useStateFromStores([IAPStoreAndroid], function() {
|
||||
return IAPStoreAndroid.isFetchingGoogleSkus();
|
||||
});
|
||||
const defaultImport2 = importDefault(4589) /* metro dependency 4589 */;
|
||||
const items3 = [styles.regularMetadataContainer];
|
||||
const items2 = [value9, value8, value7];
|
||||
const {START, END} = VerticalGradient;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const text = <Text style={styles.assetName} variant="heading-sm/bold" color="mobile-text-heading-primary" lineClamp={1} accessibilityRole="header">{productName}</Text>;
|
||||
if (hidePrice) {
|
||||
r5 = !hidePrice;
|
||||
} else {
|
||||
var viewBindingProps = {style: styles.priceVariantsContainer};
|
||||
items4 = [((Component) => <Component product={product} hasShopDiscount={r20} discountSource={shopDiscountSource} styles={styles} collectibleProductState={collectibleProductState} isFetchingGoogleSkus={value11} preferVCPrice={preferVCPrice} isDisabled={isDisabled} />)(env0_10)];
|
||||
value = importDefault(10081) /* metro dependency 10081: CollectiblesShopCardVariants */;
|
||||
items4[1] = ((Component) => <Component product={product} />)(value);
|
||||
value = <View {...viewBindingProps}>{items4}</View>;
|
||||
r5 = value;
|
||||
}
|
||||
return ((Component) => <Component style={items3} colors={items2} locations={[0, 0.4,
|
||||
1]} start={START} end={END}>{text}{r5}</Component>)(defaultImport2);
|
||||
}
|
||||
|
||||
function _fun78667() { // fn#78667, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10251:1152, offset: 0x01e3101a, size: 61 bytes, params: 1, frame: 13
|
||||
const value = environment.__proto__;
|
||||
return (require(5133) /* metro dependency 5133: CollectiblesProductUtils */).getProductOrbPrice({product: env0_1,
|
||||
hasShopDiscount: hasShopDiscount});
|
||||
}
|
||||
|
||||
function _fun78668() { // fn#78668, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10251:1235, offset: 0x01e31057, size: 56 bytes, params: 1, frame: 13
|
||||
let value = environment.__proto__;
|
||||
value = require(5134) /* metro dependency 5134: CollectiblesUtils */;
|
||||
const getProductDiscount = value.getProductDiscount;
|
||||
return Reflect.apply(getProductDiscount, value, [env0_1, hasShopDiscount]).discountPercentage;
|
||||
}
|
||||
|
||||
function _fun78669() { // fn#78669, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10251:1364, offset: 0x01e3108f, size: 51 bytes, params: 1, frame: 4
|
||||
const value2 = null;
|
||||
return value2 == env0_2 || value2 == balance ? value2 : env0_2.amount <= balance;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,267 @@
|
||||
/* Metro module 10020; source: modules/collectibles/native/CollectiblesShopCardV2.tsx; dependencies: [31, 27, 1310, 663, 33, 4501, 697, 10021, 5133, 10022, 7594, 10024, 10027, 1244, 3857, 6771, 10051, 10053, 10054, 566, 4002, 5278, 5134, 1904, 7954, 4573, 10056, 10057, 10062, 10065, 10023, 4080, 10085, 10153, 10154, 3802, 10060, 10106, 10155, 6518, 491, 2] */
|
||||
function _fun78263(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78263, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10206:6, offset: 0x01e22fb6, size: 627 bytes, params: 8, frame: 26
|
||||
var object3;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const value2 = require(27) /* metro dependency 27 */;
|
||||
const PixelRatio = value2.PixelRatio;
|
||||
const env0_4 = value2.View;
|
||||
const themeStore = importDefault(1310) /* metro dependency 1310: ThemeStore */;
|
||||
const env0_6 = (require(663) /* metro dependency 663: CollectiblesShopConstants */).ShopCtaEnum;
|
||||
const value3 = require(33) /* metro dependency 33 */;
|
||||
const env0_7 = value3.jsx;
|
||||
const env0_8 = value3.jsxs;
|
||||
const r3 = PixelRatio.getFontScale() >= 1.78 ? 302 : 170;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
object3 = {};
|
||||
const object5 = {'position': 'relative', 'height': null, 'width': 150, 'display': 'flex', 'borderWidth': 1,
|
||||
'borderColor': null, 'borderRadius': null, 'overflow': 'hidden'};
|
||||
object5.height = r3;
|
||||
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
|
||||
object5.borderColor = BORDER_SUBTLE;
|
||||
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
||||
object3.card = object5;
|
||||
object3.topRowOverlay = {'position': 'absolute', 'top': 6, 'left': 6, 'right': 6, 'zIndex': 2, 'display': 'flex',
|
||||
'flexDirection': 'row', 'gap': 4, 'justifyContent': 'space-between', 'alignItems': 'flex-start'};
|
||||
object3.badge = {flexShrink: 1};
|
||||
const object6 = {};
|
||||
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
object6.paddingHorizontal = PX_4;
|
||||
object6.paddingVertical = 1.5;
|
||||
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
||||
object6.flexShrink = 1;
|
||||
object3.badgePill = object6;
|
||||
object3.badgeOverrideText = {textTransform: 'uppercase'};
|
||||
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
|
||||
object3.badgePillDarkMode = {backgroundColor: WHITE};
|
||||
const BADGE_BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BADGE_BACKGROUND_BRAND;
|
||||
object3.badgePillLightMode = {backgroundColor: BADGE_BACKGROUND_BRAND};
|
||||
object3.wishlistButton = {'marginLeft': 'auto', 'flexShrink': 0};
|
||||
const env0_9 = Reflect.apply(createStyles, createStylesModule, [object3]);
|
||||
value = value.memo(_fun78274);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/CollectiblesShopCardV2.tsx');
|
||||
exports.default = value;
|
||||
exports.COLLECTIBLES_SHOP_CARD_HEIGHT = r3;
|
||||
exports.COLLECTIBLES_SHOP_CARD_WIDTH = 150;
|
||||
exports.COLLECTIBLES_SHOP_CARD_MAX_WIDTH = 180;
|
||||
exports.COLLECTIBLES_SHOP_CARD_GAP = 16;
|
||||
}
|
||||
|
||||
function CollectiblesShopCardInternalV2({product, onPress, unpublishedAt, collectibleProductState, solidBackground, preferVCPrice, isDisabled, cardWidth, cardStyle, hideWishlistButton, hidePrice, isShopCardImpressionEnabled, disableBundleStaticBackground, muteBundleStaticBackground}) { // fn#78264, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10206:977, offset: 0x01e23229, size: 1734 bytes, params: 2, frame: 46
|
||||
var r4;
|
||||
var r20;
|
||||
var object6;
|
||||
isDisabled = !(isDisabled === undefined) && isDisabled;
|
||||
hideWishlistButton = !(hideWishlistButton === undefined) && hideWishlistButton;
|
||||
hidePrice = !(hidePrice === undefined) && hidePrice;
|
||||
isShopCardImpressionEnabled = !(isShopCardImpressionEnabled === undefined) && isShopCardImpressionEnabled;
|
||||
const styles = useStyles();
|
||||
const selectedProduct = (require(5133) /* metro dependency 5133: CollectiblesProductUtils */).getSelectedProduct(product,
|
||||
(require(10021) /* metro dependency 10021: useDefaultVariantIndex */).useDefaultVariantIndex(product));
|
||||
const value4 = (require(10022) /* metro dependency 10022: useTrackShopCardImpression */).useTrackShopCardImpression(product,
|
||||
selectedProduct, isShopCardImpressionEnabled);
|
||||
const r34 = cardWidth != null ? {width: cardWidth} : {width: 150};
|
||||
const value6 = (require(7594) /* metro dependency 7594: useCurrentUser */).useCurrentUser();
|
||||
const isWishlistableCollectiblesProduct2 = (require(10024) /* metro dependency 10024: CollectiblesWishlistUtils */).isWishlistableCollectiblesProduct(selectedProduct);
|
||||
const {shouldShowWishlistNUXActionSheet,
|
||||
showWishlistNUXActionSheet} = (importDefault(10027) /* metro dependency 10027: useWishlistNUXActionSheet */)();
|
||||
const env0_3 = showWishlistNUXActionSheet;
|
||||
let binding = env0_3;
|
||||
const value8 = binding.useCallback(_fun78265, [shouldShowWishlistNUXActionSheet, showWishlistNUXActionSheet,
|
||||
selectedProduct]);
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const F8FvUy = (require(1244) /* metro dependency 1244: indexNative */).t.F8FvUy;
|
||||
const value10 = binding.useCallback(_fun78266, [Reflect.apply(string, intl, [F8FvUy])]);
|
||||
const value11 = (require(10051) /* metro dependency 10051: useTrackShopCardClick */).useTrackShopCardClick({product: product,
|
||||
analyticsLocations: (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().analyticsLocations});
|
||||
const {isWishlisted, isBusy,
|
||||
handleToggle} = (require(10053) /* metro dependency 10053: useWishlistButtonState */).useWishlistButtonState({userId: value6.id,
|
||||
skuId: selectedProduct.skuId, onAddSuccess: value8, onError: value10});
|
||||
const value13 = collectibleProductState === 'purchased';
|
||||
const r1 = value13 || hideWishlistButton;
|
||||
const value14 = !r1;
|
||||
const value15 = !isWishlistableCollectiblesProduct2;
|
||||
const r0 = (r1 ? value14 : !value15) && !isBusy;
|
||||
binding = env0_3;
|
||||
const value18 = binding.useMemo(_fun78267, [r0, isWishlisted]);
|
||||
const value19 = binding.useCallback(_fun78268, [handleToggle]);
|
||||
const value20 = (require(10054) /* metro dependency 10054: useCanPurchaseFrames */).useIsProfileFramesEarlyAccessPhase('CollectiblesShopCardV2');
|
||||
const value21 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ThemeStore], function() {
|
||||
return require(dependencyMap[20]).isThemeDark(ThemeStore.theme);
|
||||
});
|
||||
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
||||
const pressableOpacityProps = {ref: value4, style: [styles.card, r34, cardStyle], onPress: onPress_78270,
|
||||
activeOpacity: 0.8, accessibilityRole: 'button', accessibilityActions: value18, onAccessibilityAction: value19};
|
||||
const shouldShowLimitedTimeBadge2 = (require(5134) /* metro dependency 5134: CollectiblesUtils */).shouldShowLimitedTimeBadge(unpublishedAt);
|
||||
const badgeOverride = product.badgeOverride;
|
||||
const productType = (require(5133) /* metro dependency 5133: CollectiblesProductUtils */).getProductType(product);
|
||||
const CollectiblesItemType = (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType;
|
||||
const PROFILE_FRAME = CollectiblesItemType.PROFILE_FRAME;
|
||||
if (product.hideBadge) {
|
||||
r20 = null;
|
||||
} else {
|
||||
if (productType === PROFILE_FRAME && value20) {
|
||||
r4 = <View style={[styles.badgePill,
|
||||
value21 ? styles.badgePillDarkMode : styles.badgePillLightMode]} accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['1m6qcO'])}>{((NitroWheelIcon) => <NitroWheelIcon size="xs" color={value21 ? 'black' : 'white'} />)((require(7954) /* metro dependency 7954: NitroWheelIcon */).NitroWheelIcon)}</View>;
|
||||
} else if (badgeOverride != null) {
|
||||
r4 = <View style={[styles.badgePill,
|
||||
value21 ? styles.badgePillDarkMode : styles.badgePillLightMode]}>{((Text) => <Text variant="text-xs/bold" color={value21 ? 'black' : 'white'} allowFontScaling={false} style={styles.badgeOverrideText} lineClamp={1}>{badgeOverride}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}</View>;
|
||||
} else if (shouldShowLimitedTimeBadge2) {
|
||||
r4 = ((Component) => <Component unpublishedAt={unpublishedAt} style={styles.badge} />)(importDefault(10056) /* metro dependency 10056: LimitedTimeBadge */);
|
||||
} else if (collectibleProductState !== 'nitroClaim') {
|
||||
r4 = null;
|
||||
} else {
|
||||
const NitroWheelIcon = (require(7954) /* metro dependency 7954: NitroWheelIcon */).NitroWheelIcon;
|
||||
r4 = <NitroWheelIcon color="mobile-text-heading-primary" />;
|
||||
}
|
||||
r20 = r4;
|
||||
}
|
||||
return (
|
||||
<PressableOpacity {...pressableOpacityProps}>
|
||||
{r20 != null ? <View style={styles.topRowOverlay}>{r20}{r1 ? value14 : ((WishlistButtonBase) => <WishlistButtonBase style={styles.wishlistButton} isWishlisted={isWishlisted} onPress={handleToggle} busy={isBusy} disabled={value15} accessibilityHidden onTrackPress={value11} />)((require(10057) /* metro dependency 10057: WishlistButton */).WishlistButtonBase)}</View> : r1 ? null : <View style={styles.topRowOverlay}>{r20}{r1 ? value14 : ((WishlistButtonBase) => <WishlistButtonBase style={styles.wishlistButton} isWishlisted={isWishlisted} onPress={handleToggle} busy={isBusy} disabled={value15} accessibilityHidden onTrackPress={value11} />)((require(10057) /* metro dependency 10057: WishlistButton */).WishlistButtonBase)}</View>}
|
||||
{((Component) => <Component solidBackground={solidBackground} product={product} isPurchased={value13 || collectibleProductState === 'partiallyOwnedBundle'} isDisabled={isDisabled} disableBundleStaticBackground={disableBundleStaticBackground} muteBundleStaticBackground={muteBundleStaticBackground} />)(importDefault(10062) /* metro dependency 10062: CollectiblesShopCardAssetTileV2 */)}
|
||||
{((Component) => <Component product={product} collectibleProductState={collectibleProductState} preferVCPrice={preferVCPrice} isDisabled={isDisabled} hidePrice={hidePrice} />)(importDefault(10065) /* metro dependency 10065: CollectiblesShopCardCardDetailsV2 */)}
|
||||
</PressableOpacity>
|
||||
);
|
||||
}
|
||||
|
||||
function CollectiblesShopCardV2Inner({product, unpublishedAt, solidBackground, preferVCPrice, cardWidth, cardStyle, hideWishlistButton, hidePrice, onPress, disableBundleStaticBackground, muteBundleStaticBackground}) { // fn#78271, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10206:3806, offset: 0x01e23a4f, size: 715 bytes, params: 2, frame: 35
|
||||
var r0;
|
||||
var value;
|
||||
const value2 = (require(10021) /* metro dependency 10021: useDefaultVariantIndex */).useDefaultVariantIndex(product);
|
||||
const selectedProduct = (require(5133) /* metro dependency 5133: CollectiblesProductUtils */).getSelectedProduct(product,
|
||||
value2);
|
||||
const analyticsLocations = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().analyticsLocations;
|
||||
const value4 = (require(10023) /* metro dependency 10023: CollectiblesAnalyticsContext */).useCollectiblesAnalyticsContext();
|
||||
const env0_3 = value4;
|
||||
const binding = env0_3;
|
||||
const useCallback = binding.useCallback;
|
||||
const r18 = onPress ?? Reflect.apply(useCallback, binding, [_fun78272, [analyticsLocations, product, value2,
|
||||
value4]]);
|
||||
const value6 = (require(10153) /* metro dependency 10153: CollectiblesShopCardImpressionMobileExperiment */).useIsShopCardImpressionMobileEnabled('CollectiblesShopCardV2');
|
||||
const useTrackProductCardImpressionModule = require(10154) /* metro dependency 10154: useTrackProductCardImpression */;
|
||||
const useTrackProductCardImpression = useTrackProductCardImpressionModule.useTrackProductCardImpression;
|
||||
const handleCardVisibilityChange = Reflect.apply(useTrackProductCardImpression, useTrackProductCardImpressionModule,
|
||||
[product.skuId]).handleCardVisibilityChange;
|
||||
const canUseCollectibles2 = (importDefault(3802) /* metro dependency 3802: PremiumUtils */).canUseCollectibles((require(7594) /* metro dependency 7594: useCurrentUser */).useCurrentUser());
|
||||
const {isPurchased,
|
||||
isPartiallyOwnedBundle} = (require(10060) /* metro dependency 10060: useProductPurchaseState */).useProductPurchaseState(selectedProduct);
|
||||
const useProductDisableStateModule = require(10106) /* metro dependency 10106: useProductDisableState */;
|
||||
const useProductDisableState = useProductDisableStateModule.useProductDisableState;
|
||||
const isDisabled = Reflect.apply(useProductDisableState, useProductDisableStateModule,
|
||||
[selectedProduct.skuId]).isDisabled;
|
||||
const isPremiumCollectiblesProduct2 = (require(5134) /* metro dependency 5134: CollectiblesUtils */).isPremiumCollectiblesProduct(selectedProduct);
|
||||
const isFreeCollectiblesProduct2 = (require(5134) /* metro dependency 5134: CollectiblesUtils */).isFreeCollectiblesProduct(selectedProduct);
|
||||
const collectiblesShopCardInternalV2 = <CollectiblesShopCardInternalV2 product={product} onPress={r18} collectibleProductState={env0_3.useMemo(_fun78273,
|
||||
[isFreeCollectiblesProduct2 || isPremiumCollectiblesProduct2 && canUseCollectibles2, isPartiallyOwnedBundle,
|
||||
isPurchased,
|
||||
isPremiumCollectiblesProduct2 && !canUseCollectibles2 && !isFreeCollectiblesProduct2])} unpublishedAt={unpublishedAt} solidBackground={solidBackground} preferVCPrice={preferVCPrice} isDisabled={isDisabled} cardWidth={cardWidth} cardStyle={cardStyle} hideWishlistButton={hideWishlistButton} hidePrice={hidePrice} isShopCardImpressionEnabled={value6} disableBundleStaticBackground={disableBundleStaticBackground} muteBundleStaticBackground={muteBundleStaticBackground} />;
|
||||
if (value6) {
|
||||
r0 = collectiblesShopCardInternalV2;
|
||||
} else {
|
||||
value = importDefault(10155) /* metro dependency 10155: VisibilitySensor */;
|
||||
value = ((Component) => <Component onChange={handleCardVisibilityChange}>{collectiblesShopCardInternalV2}</Component>)(value);
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun78274(a0) { // fn#78274, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10206:5342, offset: 0x01e23dd7, size: 140 bytes, params: 2, frame: 19
|
||||
if (a0 == null) {
|
||||
throwTypeError(a0, "Cannot destructure 'undefined' or 'null'.", undefined);
|
||||
throw undefined;
|
||||
}
|
||||
const value = copyDataProperties({}, a0, undefined, undefined);
|
||||
const value3 = (importDefault(6518) /* metro dependency 6518: useInitialValue */)(_fun78275);
|
||||
const CollectiblesAnalyticsProvider = (require(10023) /* metro dependency 10023: CollectiblesAnalyticsContext */).CollectiblesAnalyticsProvider;
|
||||
return (
|
||||
<CollectiblesAnalyticsProvider newValue={value3}>
|
||||
<CollectiblesShopCardV2Inner {...value} />
|
||||
</CollectiblesAnalyticsProvider>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun78265() { // fn#78265, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10206:1590, offset: 0x01e238ef, size: 29 bytes, params: 1, frame: 11
|
||||
if (shouldShowWishlistNUXActionSheet) {
|
||||
showWishlistNUXActionSheet(env0_1);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun78266() { // fn#78266, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10206:1673, offset: 0x01e2390c, size: 61 bytes, params: 1, frame: 13
|
||||
const value = environment.__proto__;
|
||||
(importDefault(3857) /* metro dependency 3857: ToastActionCreators */).open({key: 'WISHLIST_ERROR',
|
||||
content: env0_4});
|
||||
}
|
||||
|
||||
function _fun78267() { // fn#78267, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10206:2020, offset: 0x01e23949, size: 125 bytes, params: 1, frame: 17
|
||||
var r0;
|
||||
var isWishlistedBinding;
|
||||
var intl;
|
||||
var string;
|
||||
var t;
|
||||
var value;
|
||||
if (env0_8) {
|
||||
isWishlistedBinding = isWishlisted;
|
||||
value = environment.__proto__;
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
string = intl.string;
|
||||
t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
r0 = [{name: 'toggleWishlist', label: isWishlistedBinding ? Reflect.apply(string, intl,
|
||||
[t.yr9TTf]) : Reflect.apply(string, intl, [t['8DkMEQ']])}];
|
||||
} else {
|
||||
r0 = undefined;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun78268({nativeEvent}) { // fn#78268, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10206:2176, offset: 0x01e239c6, size: 42 bytes, params: 2, frame: 9
|
||||
if (nativeEvent.actionName === 'toggleWishlist') {
|
||||
handleToggle();
|
||||
}
|
||||
}
|
||||
|
||||
function CollectiblesShopCardInternalV2OnPress() { // fn#78270, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10206:2450, owner: CollectiblesShopCardInternalV2.onPress, offset: 0x01e23a20, size: 47 bytes, params: 1, frame: 12
|
||||
const binding = env0_5;
|
||||
const OPEN_DETAILS = ShopCtaEnum.OPEN_DETAILS;
|
||||
binding(OPEN_DETAILS);
|
||||
if (onPress != null) {
|
||||
onPress();
|
||||
}
|
||||
}
|
||||
|
||||
function _fun78272() { // fn#78272, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10206:4168, offset: 0x01e23d1a, size: 120 bytes, params: 1, frame: 15
|
||||
const value = environment.__proto__;
|
||||
const value2 = undefined;
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
(require(10085) /* metro dependency 10085: openProductDetailsActionSheet */).openProductDetailsActionSheet({product: product,
|
||||
initialVariantIndex: env0_1, analyticsLocations: analyticsLocations, shopAnalyticsContext: env0_3 ?? value2});
|
||||
return value2;
|
||||
}
|
||||
|
||||
function _fun78273() { // fn#78273, offset: 0x01e23d92, size: 69 bytes, params: 1, frame: 3
|
||||
if (isPurchased === true) {
|
||||
return 'purchased';
|
||||
}
|
||||
if (isPartiallyOwnedBundle === true) {
|
||||
return 'partiallyOwnedBundle';
|
||||
}
|
||||
if (env0_6 === true) {
|
||||
return 'nitroUpsell';
|
||||
}
|
||||
if (env0_7 === true) {
|
||||
return 'nitroClaim';
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function _fun78275() { // fn#78275, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10206:5369, offset: 0x01e23e63, size: 44 bytes, params: 1, frame: 12
|
||||
const object2 = {};
|
||||
const value = environment.__proto__;
|
||||
object2.cardId = (require(491) /* metro dependency 491 */).v4();
|
||||
return object2;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,129 @@
|
||||
/* Metro module 10081; source: modules/collectibles/native/CollectiblesShopCardVariants.tsx; dependencies: [31, 27, 33, 4501, 697, 10060, 10082, 6742, 10083, 10021, 5133, 2] */
|
||||
function _fun78775(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78775, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10267:6, offset: 0x01e33e88, size: 316 bytes, params: 8, frame: 23
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(27) /* metro dependency 27 */).View;
|
||||
const value2 = require(33) /* metro dependency 33 */;
|
||||
const env0_4 = value2.jsx;
|
||||
const env0_5 = value2.jsxs;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
const env0_6 = Reflect.apply(createStyles, createStylesModule, [{variantsContainer: {'display': 'flex',
|
||||
'flexDirection': 'row', 'alignItems': 'center', paddingStart: PX_4}}]);
|
||||
const env0_7 = createStylesModule.createStyles(_fun78776);
|
||||
value = value.memo(_fun78780);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/CollectiblesShopCardVariants.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _fun78776(a0) { // fn#78776, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10267:305, offset: 0x01e33fc4, size: 244 bytes, params: 2, frame: 17
|
||||
const object4 = {};
|
||||
const object5 = {'marginStart': null, 'width': 14, 'height': 14, 'borderWidth': 1, 'borderColor': null,
|
||||
'borderRadius': null, 'justifyContent': 'center', 'alignItems': 'center'};
|
||||
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
object5.marginStart = -PX_4;
|
||||
const value2 = 1;
|
||||
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
||||
object5.borderColor = BACKGROUND_BASE_LOW;
|
||||
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
||||
object4.variantOption = object5;
|
||||
const object6 = {'width': '100%', 'height': '100%', 'justifyContent': 'center', 'alignItems': 'center'};
|
||||
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
||||
object6.borderWidth = a0 ? value2 : 0;
|
||||
const BUTTON_OUTLINE_PRIMARY_TEXT = (importDefault(697) /* metro dependency 697: native */).colors.BUTTON_OUTLINE_PRIMARY_TEXT;
|
||||
object6.borderColor = BUTTON_OUTLINE_PRIMARY_TEXT;
|
||||
object4.variantOptionInner = object6;
|
||||
const ICON_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.ICON_MUTED;
|
||||
object4.variantOverflowInner = {backgroundColor: ICON_MUTED};
|
||||
return object4;
|
||||
}
|
||||
|
||||
function VariantOption({variant, zIndex, isSelected}) { // fn#78777, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10267:796, offset: 0x01e340b8, size: 191 bytes, params: 2, frame: 20
|
||||
const styles = useStyles(isSelected);
|
||||
const useProductPurchaseStateModule = require(10060) /* metro dependency 10060: useProductPurchaseState */;
|
||||
const useProductPurchaseState = useProductPurchaseStateModule.useProductPurchaseState;
|
||||
return (
|
||||
<View style={[styles.variantOption, {zIndex: zIndex}]}>
|
||||
<View style={[styles.variantOptionInner, {backgroundColor: variant.variantValue}]}>
|
||||
{Reflect.apply(useProductPurchaseState, useProductPurchaseStateModule,
|
||||
[variant]).isPurchased && <VariantCheckmark variant={variant} />}
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function VariantCheckmark({variant}) { // fn#78778, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10267:1083, offset: 0x01e34177, size: 128 bytes, params: 2, frame: 17
|
||||
const value2 = (importDefault(10082) /* metro dependency 10082: useIsVariantColorLight */)(variant);
|
||||
const CheckmarkSmallIcon = (require(6742) /* metro dependency 6742: CheckmarkSmallIcon */).CheckmarkSmallIcon;
|
||||
const colors = (importDefault(697) /* metro dependency 697: native */).colors;
|
||||
return <CheckmarkSmallIcon color={value2 ? colors.BLACK : colors.WHITE} size="xxs" />;
|
||||
}
|
||||
|
||||
function VariantOverflowOption(a0) { // fn#78779, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10267:1239, offset: 0x01e341f7, size: 193 bytes, params: 2, frame: 19
|
||||
const zIndex = a0.zIndex;
|
||||
const styles = useStyles(a0.isSelected);
|
||||
const items3 = [styles.variantOption];
|
||||
items3[1] = {zIndex: zIndex};
|
||||
const items2 = [styles.variantOptionInner];
|
||||
items2[1] = styles.variantOverflowInner;
|
||||
const PlusSmallIcon = (require(10083) /* metro dependency 10083: PlusSmallIcon */).PlusSmallIcon;
|
||||
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
|
||||
return (
|
||||
<View style={items3}>
|
||||
<View style={items2}>
|
||||
<PlusSmallIcon color={WHITE} size="xxs" />
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun78780({product}) { // fn#78780, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10267:1480, offset: 0x01e342b8, size: 248 bytes, params: 2, frame: 23
|
||||
var r5;
|
||||
var variants;
|
||||
var length;
|
||||
var value3;
|
||||
var value4;
|
||||
var value5;
|
||||
var items2;
|
||||
const styles = useStyles();
|
||||
const value2 = (require(10021) /* metro dependency 10021: useDefaultVariantIndex */).useDefaultVariantIndex(product);
|
||||
const collectiblesProductUtilsModule = require(5133) /* metro dependency 5133: CollectiblesProductUtils */;
|
||||
const getIsVariantProduct = collectiblesProductUtilsModule.getIsVariantProduct;
|
||||
if (Reflect.apply(getIsVariantProduct, collectiblesProductUtilsModule, [product])) {
|
||||
variants = product.variants;
|
||||
length = variants.length;
|
||||
value3 = 4;
|
||||
value4 = 3;
|
||||
r5 = length > value3 ? value4 : length;
|
||||
var viewBindingProps = {style: styles.variantsContainer};
|
||||
variants = product.variants;
|
||||
value5 = 0;
|
||||
items2 = [variants.slice(value5, r5).map(_fun78781)];
|
||||
r5 = r5 !== length && <VariantOverflowOption isSelected={value2 >= value4} zIndex={value2 >= value4 ? value3 : value5} />;
|
||||
items2[1] = r5;
|
||||
return (
|
||||
<View {...viewBindingProps}>
|
||||
{items2}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function _fun78781(a0, a1) { // fn#78781, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10267:1699, offset: 0x01e343b0, size: 91 bytes, params: 3, frame: 18
|
||||
const value = environment.__proto__;
|
||||
const binding = env0_0;
|
||||
const Math = global.Math;
|
||||
return (
|
||||
<VariantOption
|
||||
variant={a0}
|
||||
isSelected={a1 === binding}
|
||||
zIndex={4 - Math.abs(binding - a1)}
|
||||
key={a0.variantValue}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,85 @@
|
||||
/* Metro module 14064; source: modules/collectibles/native/CollectiblesShopCardsGrid.tsx; dependencies: [31, 27, 5121, 33, 4501, 10020, 10023, 14063, 22, 2] */
|
||||
function _fun106626(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#106626, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14261:6, offset: 0x022e3411, size: 269 bytes, params: 8, frame: 20
|
||||
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.View;
|
||||
const env0_5 = value.ScrollView;
|
||||
const collectiblesCategoryStore = importDefault(5121) /* metro dependency 5121: CollectiblesCategoryStore */;
|
||||
const env0_7 = (require(33) /* metro dependency 33 */).jsx;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
const COLLECTIBLES_SHOP_CARD_GAP = (require(10020) /* metro dependency 10020: CollectiblesShopCardV2 */).COLLECTIBLES_SHOP_CARD_GAP;
|
||||
const env0_8 = Reflect.apply(createStyles, value, [{rowContainer: {'justifyContent': 'center',
|
||||
'flexDirection': 'row', gap: COLLECTIBLES_SHOP_CARD_GAP}}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/CollectiblesShopCardsGrid.tsx');
|
||||
exports.default = _default_106629;
|
||||
}
|
||||
|
||||
function ShopCardGridItem({product, index, cardWidth, preferVCPrice, unpublishedAt, disableBundleStaticBackground, muteBundleStaticBackground}) { // fn#106627, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14261:305, offset: 0x022e351e, size: 188 bytes, params: 2, frame: 22
|
||||
const value2 = env0_3.useMemo(function() {
|
||||
return {tilePosition: index};
|
||||
}, [index]);
|
||||
const CollectiblesAnalyticsProvider = (require(10023) /* metro dependency 10023: CollectiblesAnalyticsContext */).CollectiblesAnalyticsProvider;
|
||||
return (
|
||||
<CollectiblesAnalyticsProvider newValue={value2}>
|
||||
{((Component) => <Component unpublishedAt={unpublishedAt} product={product} cardWidth={cardWidth} preferVCPrice={preferVCPrice} disableBundleStaticBackground={disableBundleStaticBackground} muteBundleStaticBackground={muteBundleStaticBackground} />)(importDefault(10020) /* metro dependency 10020: CollectiblesShopCardV2 */)}
|
||||
</CollectiblesAnalyticsProvider>
|
||||
);
|
||||
}
|
||||
|
||||
function _default_106629({products, accessibilityLabel, category, preferVCPrice, scrollEnabled, onScroll, paddingTop, paddingBottom, disableBundleStaticBackground, muteBundleStaticBackground}) { // fn#106629, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14261:688, offset: 0x022e35ea, size: 309 bytes, params: 2, frame: 24
|
||||
scrollEnabled = !(scrollEnabled === undefined) && scrollEnabled;
|
||||
const env0_5 = useStyles();
|
||||
const value2 = (require(14063) /* metro dependency 14063: useCardLayout */).useCardLayout();
|
||||
const columns = value2.columns;
|
||||
const env0_7 = value2.cardWidth;
|
||||
const value3 = disableBundleStaticBackground.useMemo(_fun106630, [products, columns]);
|
||||
const COLLECTIBLES_SHOP_CARD_GAP = (require(10020) /* metro dependency 10020: CollectiblesShopCardV2 */).COLLECTIBLES_SHOP_CARD_GAP;
|
||||
return (
|
||||
<ScrollView
|
||||
accessibilityLabel={accessibilityLabel}
|
||||
accessibilityRole="list"
|
||||
scrollEnabled={scrollEnabled}
|
||||
showsVerticalScrollIndicator={false}
|
||||
onScroll={onScroll}
|
||||
contentContainerStyle={{gap: COLLECTIBLES_SHOP_CARD_GAP, paddingTop: paddingTop,
|
||||
paddingBottom: paddingBottom}}
|
||||
>
|
||||
{value3.map(_fun106631)}
|
||||
</ScrollView>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun106630() { // fn#106630, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14261:948, offset: 0x022e371f, size: 50 bytes, params: 1, frame: 13
|
||||
let value = environment.__proto__;
|
||||
value = importDefault(22) /* metro dependency 22 */;
|
||||
return value.chunk(products, columns);
|
||||
}
|
||||
|
||||
function _fun106631(a0, a1) { // fn#106631, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14261:1204, offset: 0x022e3751, size: 74 bytes, params: 3, frame: 17
|
||||
const env0_0 = a1;
|
||||
return (
|
||||
<View style={styles.rowContainer} key={a1}>
|
||||
{a0.map(_fun106632)}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun106632(a0, a1) { // fn#106632, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14261:1253, offset: 0x022e379b, size: 161 bytes, params: 3, frame: 19
|
||||
return (
|
||||
<ShopCardGridItem
|
||||
product={a0}
|
||||
index={require * columns + a1}
|
||||
cardWidth={cardWidth}
|
||||
unpublishedAt={(category ?? CollectiblesCategoryStore.getCategoryForProduct(a0.skuId))?.unpublishedAt}
|
||||
preferVCPrice={preferVCPrice}
|
||||
disableBundleStaticBackground={disableBundleStaticBackground}
|
||||
muteBundleStaticBackground={muteBundleStaticBackground}
|
||||
key={a0.skuId}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,384 @@
|
||||
/* Metro module 10116; source: modules/collectibles/native/CollectiblesShopCheckoutDetails.tsx; dependencies: [31, 27, 663, 8471, 33, 4501, 697, 8481, 5475, 10117, 8498, 10031, 7609, 8487, 10030, 8470, 1901, 8483, 1904, 664, 10064, 10063, 7596, 1244, 4573, 5133, 10066, 10118, 7594, 3802, 10080, 2] */
|
||||
function _fun78973(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78973, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10302:6, offset: 0x01e3f2b9, size: 939 bytes, params: 8, frame: 24
|
||||
var object5;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(27) /* metro dependency 27 */).View;
|
||||
const env0_5 = (require(663) /* metro dependency 663: CollectiblesShopConstants */).EXTERNAL_PRODUCT_SKU_IDS;
|
||||
let value = require(8471) /* metro dependency 8471: CollectiblesPreviewConstants */;
|
||||
const env0_6 = value.BUNDLE_PREVIEW_CONFIG;
|
||||
const SAMPLE_PROFILE_ASPECT_RATIO = value.SAMPLE_PROFILE_ASPECT_RATIO;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_7 = value.jsx;
|
||||
const env0_8 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
let createStyles = value.createStyles;
|
||||
object5 = {externalProductImage: {'width': 45, 'height': 45}};
|
||||
const object6 = {'alignItems': 'center', 'justifyContent': 'center', 'overflow': 'hidden'};
|
||||
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
|
||||
object5.bundlePreviewContainer = object6;
|
||||
object5.bundlePreviewScale = {'overflow': 'hidden', 'alignItems': 'center', 'justifyContent': 'center'};
|
||||
const object9 = {};
|
||||
object9.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
||||
object9.flexDirection = 'column';
|
||||
const BACKGROUND_MOD_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_SUBTLE;
|
||||
object9.backgroundColor = BACKGROUND_MOD_SUBTLE;
|
||||
object5.productContainer = object9;
|
||||
const object11 = {'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'space-between'};
|
||||
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object11.paddingHorizontal = PX_16;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object11.paddingVertical = PX_16;
|
||||
object5.productDetailsContainer = object11;
|
||||
object5.productPreviewContainer = {'justifyContent': 'center', 'alignItems': 'center'};
|
||||
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object5.productDetails = {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center', gap: PX_12};
|
||||
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
object5.productDetailsTextContainer = {gap: PX_4};
|
||||
const object12 = {'height': 36, 'backgroundColor': null, 'justifyContent': 'center'};
|
||||
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
|
||||
object12.backgroundColor = BACKGROUND_SURFACE_HIGH;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object12.paddingHorizontal = PX_16;
|
||||
object12.borderBottomLeftRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
||||
object12.borderBottomRightRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
||||
object5.errorContainer = object12;
|
||||
const env0_9 = Reflect.apply(createStyles, value, [object5]);
|
||||
const env0_10 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(function(a0) {
|
||||
var object2 = {borderWidth: 2};
|
||||
var property = importDefault(dependencyMap[6]).colors;
|
||||
object2.borderColor = a0 ? property.BACKGROUND_BRAND : property.BORDER_FEEDBACK_CRITICAL;
|
||||
object2.marginHorizontal = importDefault(dependencyMap[6]).space.PX_16;
|
||||
object2.backgroundColor = undefined;
|
||||
return {giftProductContainer: object2};
|
||||
});
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
createStyles = value.createStyles;
|
||||
const object13 = {'position': 'relative', 'width': '100%', 'height': '100%', 'borderRadius': null,
|
||||
'overflow': 'hidden'};
|
||||
object13.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
|
||||
const env0_11 = Reflect.apply(createStyles, value, [{profileEffectContainer: object13,
|
||||
profileEffect: {'position': 'absolute', 'width': '100%', 'aspectRatio': null, 'top': 0,
|
||||
aspectRatio: SAMPLE_PROFILE_ASPECT_RATIO}}]);
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
createStyles = value.createStyles;
|
||||
const object14 = {};
|
||||
object14.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
|
||||
const env0_12 = Reflect.apply(createStyles, value, [{nameplate: object14}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/CollectiblesShopCheckoutDetails.tsx');
|
||||
exports.default = CollectiblesShopCheckoutDetails;
|
||||
}
|
||||
|
||||
function ProfileEffectAssetPreview({item}) { // fn#78974, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10302:1758, offset: 0x01e3f664, size: 250 bytes, params: 2, frame: 25
|
||||
var r0;
|
||||
var FastImage;
|
||||
var object;
|
||||
var accessibilityLabel;
|
||||
var profileEffect;
|
||||
var items2;
|
||||
var value;
|
||||
const styles = useStyles();
|
||||
const value2 = (importDefault(8481) /* metro dependency 8481: useProfileEffect */)(item.skuId);
|
||||
if (value2 == null) {
|
||||
r0 = null;
|
||||
} else {
|
||||
var viewBindingProps = {style: styles.profileEffectContainer};
|
||||
FastImage = importDefault(5475) /* metro dependency 5475: FastImage */;
|
||||
object = {uri: importDefault(10117) /* metro dependency 10117: sample_profile_smallPng */};
|
||||
accessibilityLabel = value2.accessibilityLabel;
|
||||
profileEffect = styles.profileEffect;
|
||||
items2 = [<FastImage source={object} alt={accessibilityLabel} style={profileEffect} resizeMode="cover" />];
|
||||
value = importDefault(5475) /* metro dependency 5475: FastImage */;
|
||||
profileEffect = styles.profileEffect;
|
||||
items2[1] = ((Component) => <Component style={profileEffect} source={{uri: value2.thumbnailPreviewSrc}} alt={value2.title} resizeMode="cover" />)(value);
|
||||
value = <View {...viewBindingProps}>{items2}</View>;
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function ProfileFrameAssetPreview({item, width, height}) { // fn#78975, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10302:2102, offset: 0x01e3f75e, size: 146 bytes, params: 2, frame: 19
|
||||
var r0;
|
||||
var value;
|
||||
const value2 = (importDefault(8498) /* metro dependency 8498: useMaybeFetchProfileFrame */)(item.skuId,
|
||||
'CollectiblesShopCheckoutDetails');
|
||||
if (value2 == null) {
|
||||
r0 = null;
|
||||
} else {
|
||||
value = importDefault(10031) /* metro dependency 10031: ProfileFrameSamplePreview */;
|
||||
value = ((Component) => <Component profileFrame={value2} previewWidth={width} previewHeight={height} profileBackgroundColor={(importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW} />)(value);
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function BundleAssetPreview({product, width, height}) { // fn#78976, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10302:2359, offset: 0x01e3f7f0, size: 466 bytes, params: 2, frame: 27
|
||||
var r0;
|
||||
var object3;
|
||||
var value;
|
||||
const styles = useStyles();
|
||||
const {firstProfileEffect, firstAvatarDecoration,
|
||||
firstNameplate} = (require(7609) /* metro dependency 7609: useShopProductItems */).useShopProductItems(product);
|
||||
const collectiblesMobileFlexibleBundlesExperimentModule = require(8487) /* metro dependency 8487: CollectiblesMobileFlexibleBundlesExperiment */;
|
||||
const useCollectiblesMobileFlexibleBundlesExperiment = collectiblesMobileFlexibleBundlesExperimentModule.useCollectiblesMobileFlexibleBundlesExperiment;
|
||||
const enabled = Reflect.apply(useCollectiblesMobileFlexibleBundlesExperiment,
|
||||
collectiblesMobileFlexibleBundlesExperimentModule, ['CollectiblesShopCheckoutDetails']).enabled;
|
||||
const bundleWidth = BUNDLE_PREVIEW_CONFIG.small.bundleWidth;
|
||||
const env0_3 = bundleWidth;
|
||||
const r7 = enabled ? bundleWidth : global.Math.round(1.1494252873563218 * bundleWidth);
|
||||
const value4 = width / r7;
|
||||
let binding = env0_3;
|
||||
let useMemo = binding.useMemo;
|
||||
let object = [styles.bundlePreviewContainer, width, height];
|
||||
const value5 = Reflect.apply(useMemo, binding, [function() {
|
||||
return [styles.bundlePreviewContainer, {width: width, height: height}];
|
||||
}, object]);
|
||||
binding = env0_3;
|
||||
useMemo = binding.useMemo;
|
||||
if ((require(10030) /* metro dependency 10030: bundleUtils */).isValidCollectiblesBundle(product)) {
|
||||
object = {style: value5};
|
||||
object3 = {style: Reflect.apply(useMemo, binding, [_fun78978, [styles.bundlePreviewScale, bundleWidth, r7,
|
||||
value4]])};
|
||||
value = importDefault(8470) /* metro dependency 8470: BundleSampleV2 */;
|
||||
value = <View {...object}><View {...object3}>{((Component) => <Component deco={firstAvatarDecoration} pfx={firstProfileEffect} nameplate={firstNameplate} previewAssets={product.previewAssets} disableStaticBackground size="small" exposureLocation="CollectiblesShopCheckoutDetails" />)(value)}</View></View>;
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = null;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function NameplateAssetPreview({item}) { // fn#78979, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10302:3163, offset: 0x01e3fa33, size: 110 bytes, params: 2, frame: 16
|
||||
const styles = useStyles();
|
||||
return ((Component) => <Component nameplate={(require(1901) /* metro dependency 1901: utils */).getNameplateData(item)} fullOpacity isSquarePreview style={styles.nameplate} />)(importDefault(8483) /* metro dependency 8483: Nameplate */);
|
||||
}
|
||||
|
||||
function CollectibleProductPreview({product, recipientUser}) { // fn#78980, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10302:3330, offset: 0x01e3faa1, size: 230 bytes, params: 2, frame: 22
|
||||
const styles = useStyles();
|
||||
const type = product.type;
|
||||
const CollectiblesItemType = (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType;
|
||||
const PROFILE_EFFECT = CollectiblesItemType.PROFILE_EFFECT;
|
||||
const r9 = type === PROFILE_EFFECT ? 42 : product.type !== (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType.PROFILE_FRAME ? 55 : 42;
|
||||
return (
|
||||
<View style={[styles.productPreviewContainer, {height: 55, width: r9}]}>
|
||||
<CollectibleProductPreviewContent
|
||||
product={product}
|
||||
width={r9}
|
||||
height={55}
|
||||
userAvatarSource={recipientUser?.getAvatarSource(undefined, false, r9)}
|
||||
/>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function CollectibleProductPreviewContent({product, width, height, userAvatarSource}) { // fn#78981, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10302:3730, offset: 0x01e3fb87, size: 638 bytes, params: 2, frame: 21
|
||||
const styles = useStyles();
|
||||
const FractionalPremiumSKUsSets = (require(664) /* metro dependency 664: FractionalPremiumSKUs */).FractionalPremiumSKUsSets;
|
||||
const ALL = FractionalPremiumSKUsSets.ALL;
|
||||
const has = ALL.has;
|
||||
let skuId = product.skuId;
|
||||
if (Reflect.apply(has, ALL, [skuId])) {
|
||||
return ((Component) => <Component source={{uri: importDefault(10064) /* metro dependency 10064: mobile_fraction_nitro_2xPng */}} style={styles.externalProductImage} />)(importDefault(5475) /* metro dependency 5475: FastImage */);
|
||||
}
|
||||
skuId = product.skuId;
|
||||
const ORB_PROFILE_BADGE = EXTERNAL_PRODUCT_SKU_IDS.ORB_PROFILE_BADGE;
|
||||
if (skuId === ORB_PROFILE_BADGE) {
|
||||
return ((Component) => <Component source={{uri: importDefault(10063) /* metro dependency 10063: orb_profile_badge_icon2xPng */}} style={styles.externalProductImage} />)(importDefault(5475) /* metro dependency 5475: FastImage */);
|
||||
}
|
||||
const type = product.type;
|
||||
const CollectiblesItemType = (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType;
|
||||
const AVATAR_DECORATION = CollectiblesItemType.AVATAR_DECORATION;
|
||||
if (AVATAR_DECORATION === type) {
|
||||
return ((Component) => <Component item={product.items[0]} size={width} avatarSource={userAvatarSource} animate={false} />)(importDefault(7596) /* metro dependency 7596: AvatarDecorationSampleV2 */);
|
||||
}
|
||||
const PROFILE_EFFECT = CollectiblesItemType.PROFILE_EFFECT;
|
||||
if (PROFILE_EFFECT === type) {
|
||||
return <ProfileEffectAssetPreview item={product.items[0]} />;
|
||||
}
|
||||
const NAMEPLATE = CollectiblesItemType.NAMEPLATE;
|
||||
if (NAMEPLATE === type) {
|
||||
return <NameplateAssetPreview item={product.items[0]} />;
|
||||
}
|
||||
const PROFILE_FRAME = CollectiblesItemType.PROFILE_FRAME;
|
||||
if (PROFILE_FRAME === type) {
|
||||
return (
|
||||
<ProfileFrameAssetPreview
|
||||
item={product.items[0]}
|
||||
width={width}
|
||||
height={height}
|
||||
/>
|
||||
);
|
||||
}
|
||||
const BUNDLE = CollectiblesItemType.BUNDLE;
|
||||
if (BUNDLE === type) {
|
||||
return (
|
||||
<BundleAssetPreview
|
||||
product={product}
|
||||
width={width}
|
||||
height={height}
|
||||
/>
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function ProductDetails({product, recipientUser}) { // fn#78982, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10302:4638, offset: 0x01e3fe05, size: 379 bytes, params: 2, frame: 28
|
||||
var view;
|
||||
var items3;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
var items2;
|
||||
const styles = useStyles();
|
||||
const value2 = env0_3.useMemo(_fun78983, [product.type, product.skuId]);
|
||||
if (value2 == null) {
|
||||
view = <View style={styles.productDetails}><Text variant="text-md/semibold">{product.name}</Text></View>;
|
||||
} else {
|
||||
var viewBindingProps = {style: styles.productDetails};
|
||||
items3 = [<CollectibleProductPreview product={product} recipientUser={recipientUser} />];
|
||||
var viewBinding2Props = {style: styles.productDetailsTextContainer};
|
||||
items2 = [<Text variant="text-md/semibold">{product.name}</Text>];
|
||||
items2[1] = <Text variant="text-sm/medium">{value2}</Text>;
|
||||
items3[1] = <View {...viewBinding2Props}>{items2}</View>;
|
||||
view = <View {...viewBindingProps}>{items3}</View>;
|
||||
}
|
||||
return view;
|
||||
}
|
||||
|
||||
function ProductPriceAmountTag({product, hasShopDiscount, useOrbPrice}) { // fn#78984, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10302:5822, offset: 0x01e4022c, size: 198 bytes, params: 2, frame: 17
|
||||
var r0;
|
||||
var value;
|
||||
const {orbPrice, priceText} = env0_3.useMemo(_fun78985, [product, hasShopDiscount, useOrbPrice]);
|
||||
if (useOrbPrice) {
|
||||
value = undefined;
|
||||
value = ((Component) => <Component orbAmount={orbPrice == null ? value : orbPrice.amount} />)(importDefault(10118) /* metro dependency 10118: OrbCheckoutAmountTag */);
|
||||
r0 = value;
|
||||
} else {
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
r0 = <Text variant="text-md/semibold">{priceText}</Text>;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function CollectiblesShopCheckoutDetails({product, recipientUser, isValidRecipient, useOrbPrice, isGift}) { // fn#78987, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10302:6342, offset: 0x01e403de, size: 507 bytes, params: 2, frame: 28
|
||||
var Text;
|
||||
var intl;
|
||||
isValidRecipient = !(isValidRecipient === undefined) && isValidRecipient;
|
||||
useOrbPrice = !(useOrbPrice === undefined) && useOrbPrice;
|
||||
isGift = !(isGift === undefined) && isGift;
|
||||
const styles = useStyles();
|
||||
const styles2 = useStyles(isValidRecipient);
|
||||
const canUseShopDiscounts2 = (importDefault(3802) /* metro dependency 3802: PremiumUtils */).canUseShopDiscounts((require(7594) /* metro dependency 7594: useCurrentUser */).useCurrentUser());
|
||||
const value3 = env0_3.useMemo(_fun78988, [product, useOrbPrice, canUseShopDiscounts2]);
|
||||
const items2 = [styles.productContainer];
|
||||
items2[1] = isGift && styles2.giftProductContainer;
|
||||
const view = <View style={styles.productDetailsContainer} accessibilityLabel={value3} accessible><ProductDetails product={product} recipientUser={recipientUser} /><ProductPriceAmountTag product={product} hasShopDiscount={canUseShopDiscounts2} useOrbPrice={useOrbPrice} /></View>;
|
||||
let r5 = isGift && !isValidRecipient;
|
||||
if (r5) {
|
||||
var viewBinding3Props = {style: styles.errorContainer};
|
||||
Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
r5 = <View {...viewBinding3Props}><Text variant="text-xs/semibold" color="text-feedback-critical">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['3YfczA'])}</Text></View>;
|
||||
}
|
||||
return (
|
||||
<View style={items2}>
|
||||
{view}
|
||||
{r5}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun78978() { // fn#78978, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10302:2806, offset: 0x01e3f9ef, size: 68 bytes, params: 1, frame: 4
|
||||
return [styles.bundlePreviewScale, {width: bundleWidth, height: env0_4, transform: [{scale: env0_5}]}];
|
||||
}
|
||||
|
||||
function _fun78983() { // fn#78983, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10302:4714, offset: 0x01e3ff80, size: 684 bytes, params: 1, frame: 15
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const FractionalPremiumSKUsSets = (require(664) /* metro dependency 664: FractionalPremiumSKUs */).FractionalPremiumSKUsSets;
|
||||
const ALL = FractionalPremiumSKUsSets.ALL;
|
||||
const has = ALL.has;
|
||||
let skuId = product.skuId;
|
||||
if (Reflect.apply(has, ALL, [skuId])) {
|
||||
return intl.string(t.DFMPWS);
|
||||
}
|
||||
skuId = product.skuId;
|
||||
const ORB_PROFILE_BADGE = EXTERNAL_PRODUCT_SKU_IDS.ORB_PROFILE_BADGE;
|
||||
if (skuId === ORB_PROFILE_BADGE) {
|
||||
return intl.string(t['0+rBWT']);
|
||||
}
|
||||
const type = product.type;
|
||||
const CollectiblesItemType = (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType;
|
||||
const AVATAR_DECORATION = CollectiblesItemType.AVATAR_DECORATION;
|
||||
if (AVATAR_DECORATION === type) {
|
||||
return intl.string(t['7v0T9P']);
|
||||
}
|
||||
const PROFILE_EFFECT = CollectiblesItemType.PROFILE_EFFECT;
|
||||
if (PROFILE_EFFECT === type) {
|
||||
return intl.string(t.wR5wOo);
|
||||
}
|
||||
const NAMEPLATE = CollectiblesItemType.NAMEPLATE;
|
||||
if (NAMEPLATE === type) {
|
||||
return intl.string(t.x5CoXR);
|
||||
}
|
||||
const PROFILE_FRAME = CollectiblesItemType.PROFILE_FRAME;
|
||||
if (PROFILE_FRAME === type) {
|
||||
return intl.string(t.GWrZOd);
|
||||
}
|
||||
const BUNDLE = CollectiblesItemType.BUNDLE;
|
||||
if (BUNDLE === type) {
|
||||
return intl.string(t.Zr5tjn);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function _fun78985() { // fn#78985, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10302:5915, offset: 0x01e402f2, size: 126 bytes, params: 1, frame: 19
|
||||
var r1;
|
||||
var r2;
|
||||
var value3;
|
||||
var moduleValue;
|
||||
var value4;
|
||||
var productOrbPrice;
|
||||
if (useOrbPrice) {
|
||||
value4 = undefined;
|
||||
productOrbPrice = (require(5133) /* metro dependency 5133: CollectiblesProductUtils */).getProductOrbPrice({product: product,
|
||||
|
||||
hasShopDiscount: hasShopDiscount});
|
||||
r1 = value4;
|
||||
r2 = productOrbPrice;
|
||||
} else {
|
||||
value3 = undefined;
|
||||
moduleValue = require(10066) /* metro dependency 10066: CollectiblesUtils */;
|
||||
r1 = moduleValue.getFormattedPriceForCollectiblesProduct(product, hasShopDiscount, true);
|
||||
r2 = value3;
|
||||
}
|
||||
return {orbPrice: r2, priceText: r1};
|
||||
}
|
||||
|
||||
function _fun78988() { // fn#78988, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10302:6555, offset: 0x01e405d9, size: 275 bytes, params: 1, frame: 22
|
||||
var r3;
|
||||
var amount;
|
||||
var intl;
|
||||
var formatToPlainString;
|
||||
var W4DfeF;
|
||||
let value = environment.__proto__;
|
||||
const value2 = undefined;
|
||||
const productNameAndTypeLabel = (require(10080) /* metro dependency 10080: getProductName */).getProductNameAndTypeLabel(product);
|
||||
if (useOrbPrice) {
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
formatToPlainString = intl.formatToPlainString;
|
||||
W4DfeF = (require(1244) /* metro dependency 1244: indexNative */).t.W4DfeF;
|
||||
value = require(5133) /* metro dependency 5133: CollectiblesProductUtils */;
|
||||
value = value.getProductOrbPrice({product: product, hasShopDiscount: env0_2});
|
||||
amount = value == null ? value2 : value.amount;
|
||||
value = '';
|
||||
value = Reflect.apply(formatToPlainString, intl, [W4DfeF, {orbAmount: amount ?? value}]);
|
||||
r3 = value;
|
||||
} else {
|
||||
value = require(10066) /* metro dependency 10066: CollectiblesUtils */;
|
||||
value = value.getFormattedPriceForCollectiblesProduct(product, env0_2, true);
|
||||
r3 = value ?? '';
|
||||
}
|
||||
return '' + productNameAndTypeLabel + ', ' + r3;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,119 @@
|
||||
/* Metro module 14912; source: modules/collectibles/native/CollectiblesShopEntryButton.tsx; dependencies: [57, 31, 5174, 1376, 33, 7013, 1365, 14908, 10358, 1244, 14913, 632, 12712, 5154, 10357, 2] */
|
||||
function _fun112817(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#112817, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15109:6, offset: 0x023dd215, size: 222 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const collectiblesMarketingsStore = importDefault(5174) /* metro dependency 5174: CollectiblesMarketingsStore */;
|
||||
const env0_5 = (require(1376) /* metro dependency 1376: DismissibleContentConstants */).ContentDismissActionType;
|
||||
const value = require(33) /* metro dependency 33 */;
|
||||
const env0_6 = value.jsx;
|
||||
const env0_7 = value.Fragment;
|
||||
const env0_8 = value.jsxs;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/CollectiblesShopEntryButton.tsx');
|
||||
exports.default = CollectiblesShopEntryButton;
|
||||
}
|
||||
|
||||
function CoachmarkVariant({marketing, navigateToShop, shopButtonRef}) { // fn#112818, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15109:201, offset: 0x023dd2f3, size: 362 bytes, params: 2, frame: 31
|
||||
const useSelectedDismissibleContentModule = require(7013) /* metro dependency 7013: useSelectedDismissibleContent */;
|
||||
const useSelectedVersionedDismissibleContent = useSelectedDismissibleContentModule.useSelectedVersionedDismissibleContent;
|
||||
const DismissibleContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent;
|
||||
let COLLECTIBLES_SHOP_ENTRY_MARKETING = DismissibleContent.COLLECTIBLES_SHOP_ENTRY_MARKETING;
|
||||
const value3 = env0_3(Reflect.apply(useSelectedVersionedDismissibleContent, useSelectedDismissibleContentModule,
|
||||
[COLLECTIBLES_SHOP_ENTRY_MARKETING, marketing.version, undefined, true]), 2);
|
||||
const property = value3[0];
|
||||
const property2 = value3[1];
|
||||
COLLECTIBLES_SHOP_ENTRY_MARKETING = DismissibleContent.COLLECTIBLES_SHOP_ENTRY_MARKETING;
|
||||
const value4 = property === COLLECTIBLES_SHOP_ENTRY_MARKETING;
|
||||
const jsxRuntimeEnv0_7Binding = jsxRuntimeEnv0_7;
|
||||
const YouScreenNavIcon = importDefault(14908) /* metro dependency 14908: YouScreenNavIcon */;
|
||||
const ShopIcon = (require(10358) /* metro dependency 10358: ShopIcon */).ShopIcon;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
return (
|
||||
<>
|
||||
<YouScreenNavIcon
|
||||
ref={shopButtonRef}
|
||||
IconComponent={ShopIcon}
|
||||
accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.pWG4ze)}
|
||||
onPress={onPress_112819}
|
||||
showRedDot={value4}
|
||||
/>
|
||||
{((Component) => <Component marketing={marketing} shopButtonRef={shopButtonRef} navigateToShop={navigateToShop} visible={value4} onDismiss={property2} />)(importDefault(14913) /* metro dependency 14913: MobileShopButtonCoachmark */)}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function CollectiblesShopEntryButton({navigateToShop, shopButtonRef}) { // fn#112820, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15109:868, offset: 0x023dd48b, size: 534 bytes, params: 2, frame: 24
|
||||
var COLLECTIBLES_SHOP_ENTRY_MARKETING;
|
||||
var version;
|
||||
var SelectedVersionedDismissibleContent;
|
||||
var value;
|
||||
const marketingBySurface = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([CollectiblesMarketingsStore],
|
||||
function() {
|
||||
return CollectiblesMarketingsStore.getMarketingBySurface(require(dependencyMap[12]).CollectiblesMarketingSurface.MOBILE_SHOP_BUTTON);
|
||||
});
|
||||
let r1 = marketingBySurface != null && 'dismissibleContent' in marketingBySurface && marketingBySurface.dismissibleContent === (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent.COLLECTIBLES_SHOP_ENTRY_MARKETING;
|
||||
const type = marketingBySurface?.type;
|
||||
const CollectiblesMarketingType = (require(5154) /* metro dependency 5154: CollectiblesMarketingType */).CollectiblesMarketingType;
|
||||
const COACHMARK = CollectiblesMarketingType.COACHMARK;
|
||||
if (type === COACHMARK) {
|
||||
return (
|
||||
<CoachmarkVariant
|
||||
marketing={marketingBySurface}
|
||||
navigateToShop={navigateToShop}
|
||||
shopButtonRef={shopButtonRef}
|
||||
/>
|
||||
);
|
||||
}
|
||||
const closure = children_112822;
|
||||
if (r1) {
|
||||
SelectedVersionedDismissibleContent = (require(10357) /* metro dependency 10357: SelectedDismissibleContent */).SelectedVersionedDismissibleContent;
|
||||
COLLECTIBLES_SHOP_ENTRY_MARKETING = marketingBySurface?.type !== (require(5154) /* metro dependency 5154: CollectiblesMarketingType */).CollectiblesMarketingType.BADGE ? null : (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent.COLLECTIBLES_SHOP_ENTRY_MARKETING;
|
||||
version = marketingBySurface?.version;
|
||||
value = 0;
|
||||
value = <SelectedVersionedDismissibleContent contentType={COLLECTIBLES_SHOP_ENTRY_MARKETING} latestVersion={version ?? value}>{closure}</SelectedVersionedDismissibleContent>;
|
||||
r1 = value;
|
||||
} else {
|
||||
r1 = ((Component) => <Component contentTypes={marketingBySurface?.type !== (require(5154) /* metro dependency 5154: CollectiblesMarketingType */).CollectiblesMarketingType.BADGE ? [] : marketingBySurface?.dismissibleContent != null ? [marketingBySurface.dismissibleContent] : []}>{closure}</Component>)(importDefault(10357) /* metro dependency 10357: SelectedDismissibleContent */);
|
||||
}
|
||||
return r1;
|
||||
}
|
||||
|
||||
function CoachmarkVariantOnPress() { // fn#112819, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15109:635, owner: CoachmarkVariant.onPress, offset: 0x023dd45d, size: 46 bytes, params: 1, frame: 12
|
||||
var binding;
|
||||
var value2;
|
||||
if (result) {
|
||||
binding = env0_1;
|
||||
value2 = environment.__proto__;
|
||||
binding(ContentDismissActionType.TAKE_ACTION);
|
||||
}
|
||||
navigateToShop();
|
||||
}
|
||||
|
||||
function CollectiblesShopEntryButtonChildren({visibleContent, markAsDismissed}) { // fn#112822, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15109:1351, owner: CollectiblesShopEntryButton.children, offset: 0x023dd6d7, size: 174 bytes, params: 2, frame: 20
|
||||
const YouScreenNavIcon = importDefault(14908) /* metro dependency 14908: YouScreenNavIcon */;
|
||||
const shopButtonRefBinding = shopButtonRef;
|
||||
const ShopIcon = (require(10358) /* metro dependency 10358: ShopIcon */).ShopIcon;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
return (
|
||||
<YouScreenNavIcon
|
||||
ref={shopButtonRefBinding}
|
||||
IconComponent={ShopIcon}
|
||||
accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.pWG4ze)}
|
||||
onPress={onPress_112823}
|
||||
showRedDot={visibleContent != null}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function childrenOnPress_112823() { // fn#112823, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15109:1504, owner: CollectiblesShopEntryButton.children.onPress, offset: 0x023dd785, size: 50 bytes, params: 1, frame: 12
|
||||
var markAsDismissedBinding;
|
||||
navigateToShop();
|
||||
if (visibleContent != null) {
|
||||
markAsDismissedBinding = markAsDismissed;
|
||||
value = environment.__proto__.__proto__;
|
||||
markAsDismissedBinding(ContentDismissActionType.PRIMARY);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
/* Metro module 14079; source: modules/collectibles/native/CollectiblesShopFeaturedPage.tsx; dependencies: [31, 27, 663, 33, 4501, 1305, 8754, 1244, 14054, 2] */
|
||||
function _fun106695(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#106695, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14276:6, offset: 0x022e71b0, size: 227 bytes, params: 8, frame: 19
|
||||
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(663) /* metro dependency 663: CollectiblesShopConstants */).CollectiblesMobileShopScreen;
|
||||
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const env0_6 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {'flex': 1,
|
||||
'justifyContent': 'center', 'alignItems': 'center'}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/CollectiblesShopFeaturedPage.tsx');
|
||||
exports.default = _default_106696;
|
||||
}
|
||||
|
||||
function _default_106696({shopBlock, fetchShopHomeError, framesBannerBlock}) { // fn#106696, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14276:270, offset: 0x022e7293, size: 258 bytes, params: 2, frame: 21
|
||||
var r0;
|
||||
const EmptyState = (require(1305) /* metro dependency 1305: native */).EmptyState;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const styles = useStyles();
|
||||
if (fetchShopHomeError !== null) {
|
||||
r0 = <View style={styles.container}><EmptyState style={{marginTop: 42}} Illustration={(require(8754) /* metro dependency 8754: NoResults */).NoResults} body={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.eAn6z2)} /></View>;
|
||||
} else if (shopBlock === undefined) {
|
||||
r0 = <View style={styles.container}><EmptyState style={{marginTop: 42}} Illustration={(require(8754) /* metro dependency 8754: NoResults */).NoResults} body={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.eAn6z2)} /></View>;
|
||||
} else {
|
||||
r0 = ((Component) => <Component block={shopBlock} screen={CollectiblesMobileShopScreen.FEATURED_PAGE} framesBannerBlock={framesBannerBlock} />)(importDefault(14054) /* metro dependency 14054: ShopBlockItem */);
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
/* Metro module 12168; source: modules/collectibles/native/CollectiblesShopGiftBadgePostPurchaseModal.tsx; dependencies: [31, 27, 33, 4501, 697, 1585, 5080, 5120, 6789, 6258, 1244, 5312, 4573, 2320, 10468, 2] */
|
||||
function _fun93261(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#93261, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12354:6, offset: 0x020acca6, size: 215 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.Pressable;
|
||||
const env0_5 = value.View;
|
||||
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(_fun93262);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/CollectiblesShopGiftBadgePostPurchaseModal.tsx');
|
||||
exports.default = CollectiblesShopGiftBadgePostPurchaseModal;
|
||||
}
|
||||
|
||||
function _fun93262(a0) { // fn#93262, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12354:190, offset: 0x020acd7d, size: 142 bytes, params: 2, frame: 15
|
||||
const object2 = {};
|
||||
object2.header = {'position': 'absolute', 'top': 0, 'left': 0, 'right': 0, 'height': null, 'paddingTop': null,
|
||||
'zIndex': 1, 'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'center', height: a0 + 56,
|
||||
paddingTop: a0};
|
||||
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object2.closeButton = {'position': 'absolute', 'left': 0, 'top': null, 'bottom': 0, 'paddingHorizontal': null,
|
||||
'justifyContent': 'center', top: a0, paddingHorizontal: PX_16};
|
||||
const MOBILE_TEXT_HEADING_PRIMARY = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_TEXT_HEADING_PRIMARY;
|
||||
object2.closeIcon = {tintColor: MOBILE_TEXT_HEADING_PRIMARY};
|
||||
return object2;
|
||||
}
|
||||
|
||||
function CollectiblesShopGiftBadgePostPurchaseModal({giftBadgeProgress}) { // fn#93263, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12354:649, offset: 0x020ace0b, size: 441 bytes, params: 2, frame: 28
|
||||
const styles = useStyles((importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().top);
|
||||
const binding = env0_3;
|
||||
const value2 = binding.useCallback(_fun93264, []);
|
||||
const value3 = binding.useCallback(function() {
|
||||
var moduleValue = require(dependencyMap[7]);
|
||||
var object = {};
|
||||
var GIFTING_BADGE_POST_PURCHASE = importDefault(dependencyMap[8]).GIFTING_BADGE_POST_PURCHASE;
|
||||
object.analyticsLocations = [GIFTING_BADGE_POST_PURCHASE];
|
||||
object.analyticsSource = importDefault(dependencyMap[8]).GIFTING_BADGE_POST_PURCHASE;
|
||||
moduleValue.openCollectiblesShopMobile(object);
|
||||
}, []);
|
||||
const ModalScreen = (require(6258) /* metro dependency 6258: ModalScreenNative */).ModalScreen;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const cpT0Cq = (require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq;
|
||||
const XSmallIcon = (require(5312) /* metro dependency 5312: XSmallIcon */).XSmallIcon;
|
||||
let value = <Pressable onPress={value2} accessibilityRole="button" accessibilityLabel={Reflect.apply(string, intl,
|
||||
[cpT0Cq])} style={styles.closeButton}><XSmallIcon size="md" style={styles.closeIcon} /></Pressable>;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
value = <View style={styles.header}>{value}<Text accessibilityRole="header" {...{'aria-level': '1'}} lineClamp={1} variant="redesign/heading-18/bold" color="mobile-text-heading-primary">{intl.string((importDefault(2320) /* metro dependency 2320: GiftingBadgeMessages */).roVAey)}</Text></View>;
|
||||
return (
|
||||
<ModalScreen>
|
||||
{value}
|
||||
{((Component) => <Component currentProgress={giftBadgeProgress} onSendGift={value3} />)(importDefault(10468) /* metro dependency 10468: GiftBadgePostPurchase */)}
|
||||
</ModalScreen>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,92 @@
|
||||
/* Metro module 7632; source: modules/collectibles/native/CollectiblesShopGiftModal.tsx; dependencies: [31, 5121, 661, 33, 7633, 7634, 7635, 566, 6771, 6789, 1861, 5120, 3815, 7636, 1244, 7637, 10116, 12156, 2] */
|
||||
function _fun61135(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#61135, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7810:6, offset: 0x0171b533, size: 178 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const collectiblesCategoryStore = importDefault(5121) /* metro dependency 5121: CollectiblesCategoryStore */;
|
||||
const env0_5 = (require(661) /* metro dependency 661: Constants */).COLLECTIBLES_APPLICATION_ID;
|
||||
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/CollectiblesShopGiftModal.tsx');
|
||||
exports.default = CollectiblesShopGiftModal;
|
||||
}
|
||||
|
||||
function CollectiblesShopGiftModal({skuId, analyticsLocations, lockedRecipientUser, onGiftModalDismiss, giftingOrigin}) { // fn#61136, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7810:270, offset: 0x0171b5e5, size: 537 bytes, params: 2, frame: 29
|
||||
var r1;
|
||||
var r0;
|
||||
var UnsupportedFeatureModal;
|
||||
var intl;
|
||||
const GiftingBadgeExperiment = (require(7633) /* metro dependency 7633: GiftingBadgeExperiment */).GiftingBadgeExperiment;
|
||||
const useConfig = GiftingBadgeExperiment.useConfig;
|
||||
const enabled = Reflect.apply(useConfig, GiftingBadgeExperiment, [{location: 'CollectiblesShopGiftModal'}]).enabled;
|
||||
let binding = env0_3;
|
||||
binding.useEffect(_fun61137, [enabled]);
|
||||
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([CollectiblesCategoryStore],
|
||||
function() {
|
||||
return CollectiblesCategoryStore.getProduct(skuId);
|
||||
}, [skuId]);
|
||||
var env0_3 = value3;
|
||||
const defaultImport = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
|
||||
object = [];
|
||||
const value4 = arraySpread(object, analyticsLocations, 0, undefined);
|
||||
const COLLECTIBLES_MOBILE_GIFT_MODAL = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).COLLECTIBLES_MOBILE_GIFT_MODAL;
|
||||
object[value4] = COLLECTIBLES_MOBILE_GIFT_MODAL;
|
||||
value4 + 1;
|
||||
analyticsLocations = defaultImport(object).analyticsLocations;
|
||||
skuId = value3?.skuId;
|
||||
binding = env0_3;
|
||||
const useCallback = binding.useCallback;
|
||||
if (value3 == null) {
|
||||
r0 = null;
|
||||
} else {
|
||||
if ((require(3815) /* metro dependency 3815: BillingPlatformUtils */).isCollectibleGiftingSupported()) {
|
||||
r1 = ((Component) => <Component skuId={value3.skuId} applicationId={COLLECTIBLES_APPLICATION_ID} analyticsLocations={analyticsLocations} lockedRecipientUser={lockedRecipientUser} onGiftModalDismiss={onGiftModalDismiss} giftingOrigin={giftingOrigin} validateRecipient={Reflect.apply(useCallback,
|
||||
|
||||
|
||||
binding, [_fun61139,
|
||||
[skuId]])} renderProductDetails={renderProductDetails} renderPurchaseSection={renderPurchaseSection} />)(importDefault(7637) /* metro dependency 7637: UnifiedGiftModal */);
|
||||
} else {
|
||||
UnsupportedFeatureModal = importDefault(7636) /* metro dependency 7636: UnsupportedFeatureModal */;
|
||||
object = {onDismiss: onGiftModalDismiss};
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['JCFN/y']);
|
||||
r1 = <UnsupportedFeatureModal {...object} />;
|
||||
}
|
||||
r0 = r1;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun61137() { // fn#61137, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7810:504, offset: 0x0171b7fe, size: 74 bytes, params: 1, frame: 14
|
||||
var value;
|
||||
if (enabled) {
|
||||
value = environment.__proto__;
|
||||
value = require(7634) /* metro dependency 7634: BadgeDirectoryActionCreators */;
|
||||
value.fetchBadge((require(7635) /* metro dependency 7635: BadgeId */).BadgeId.GIFTING);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun61139(a0) { // fn#61139, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7810:745, offset: 0x0171b863, size: 109 bytes, params: 2, frame: 15
|
||||
var r0;
|
||||
let value = environment.__proto__;
|
||||
const stringUtilsModule = require(1861) /* metro dependency 1861: StringUtils */;
|
||||
if (stringUtilsModule.isNullOrEmpty(skuId)) {
|
||||
r0 = global.Promise.resolve(false);
|
||||
} else {
|
||||
value = require(5120) /* metro dependency 5120: CollectiblesActionCreators */;
|
||||
value = value.validateCollectiblesRecipient(a0, skuId);
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function CollectiblesShopGiftModalRenderProductDetails({recipientUser, isValidRecipient}) { // fn#61140, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7810:1068, owner: CollectiblesShopGiftModal.renderProductDetails, offset: 0x0171b8d0, size: 83 bytes, params: 2, frame: 16
|
||||
const value = environment.__proto__;
|
||||
return ((Component) => <Component product={env0_3} recipientUser={recipientUser} isValidRecipient={isValidRecipient} isGift />)(importDefault(10116) /* metro dependency 10116: CollectiblesShopCheckoutDetails */);
|
||||
}
|
||||
|
||||
function CollectiblesShopGiftModalRenderPurchaseSection({isPurchaseDisabled, giftOptions, baseAnalyticsFields}) { // fn#61141, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7810:1199, owner: CollectiblesShopGiftModal.renderPurchaseSection, offset: 0x0171b923, size: 96 bytes, params: 2, frame: 18
|
||||
const value = environment.__proto__;
|
||||
return ((Component) => <Component product={env0_3} isPurchaseDisabled={isPurchaseDisabled} giftOptions={giftOptions} baseAnalyticsFields={baseAnalyticsFields} giftingOrigin={giftingOrigin} />)(importDefault(12156) /* metro dependency 12156: CollectiblesShopGiftPurchaseSection */);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,191 @@
|
||||
/* Metro module 12156; source: modules/collectibles/native/CollectiblesShopGiftPurchaseSection.tsx; dependencies: [57, 31, 27, 7670, 661, 1880, 33, 4501, 697, 5463, 7633, 566, 7635, 6771, 10147, 694, 5080, 4496, 12157, 1962, 683, 10396, 6766, 1244, 4578, 10109, 2] */
|
||||
function _fun93231(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#93231, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12342:6, offset: 0x020ab65b, size: 364 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_5 = (require(27) /* metro dependency 27 */).View;
|
||||
const badgeDirectoryStore = importDefault(7670) /* metro dependency 7670: BadgeDirectoryStore */;
|
||||
let value = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_7 = value.AnalyticEvents;
|
||||
const env0_8 = value.MarketingURLs;
|
||||
value = require(1880) /* metro dependency 1880: PremiumConstants */;
|
||||
const env0_9 = value.GiftingOrigin;
|
||||
const env0_10 = value.PremiumGiftStyles;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_11 = value.jsx;
|
||||
const env0_12 = value.jsxs;
|
||||
const env0_13 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun93243);
|
||||
object = {NOT_STARTED: 'not_started', PURCHASING: 'purchasing', SUCCEEDED: 'succeeded', FAILED: 'failed'};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/CollectiblesShopGiftPurchaseSection.tsx');
|
||||
exports.default = WrappedCollectiblesShopGiftPurchaseSection;
|
||||
}
|
||||
|
||||
function CollectiblesShopGiftPurchaseSection({product, isPurchaseDisabled, giftOptions, baseAnalyticsFields, giftingOrigin}) { // fn#93232, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12342:686, offset: 0x020ab7c7, size: 855 bytes, params: 2, frame: 31
|
||||
const styles = useStyles((importDefault(5463) /* metro dependency 5463: useSafeAreaInsetsKeyboardAwareNative */)().insets.bottom);
|
||||
const GiftingBadgeExperiment = (require(7633) /* metro dependency 7633: GiftingBadgeExperiment */).GiftingBadgeExperiment;
|
||||
const useConfig = GiftingBadgeExperiment.useConfig;
|
||||
const enabled = Reflect.apply(useConfig, GiftingBadgeExperiment,
|
||||
[{location: 'CollectiblesShopGiftPurchaseSection'}]).enabled;
|
||||
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([BadgeDirectoryStore],
|
||||
_fun93233);
|
||||
const nextTier = value2.nextTier;
|
||||
const giftsToNextTier = value2.giftsToNextTier;
|
||||
const env0_4 = value2.badgeProgress;
|
||||
const binding = env0_4;
|
||||
const useState = binding.useState;
|
||||
const NOT_STARTED = env0_14.NOT_STARTED;
|
||||
const value4 = giftingOrigin(Reflect.apply(useState, binding, [NOT_STARTED]), 2);
|
||||
const property = value4[0];
|
||||
const env0_6 = value4[1];
|
||||
const env0_7 = (importDefault(10147) /* metro dependency 10147: useMobileCollectiblesPurchaseSKUAndroid */)({product: product,
|
||||
analyticsLocations: (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().analyticsLocations,
|
||||
onPurchaseComplete: onPurchaseComplete, onPurchaseError: onPurchaseError, onPurchasePending: function() {
|
||||
}, giftParams: {isGift: true, options: giftOptions}});
|
||||
env0_4.useEffect(function() {
|
||||
return _fun93241;
|
||||
}, []);
|
||||
const items2 = [enabled && nextTier != null ? ((Component) => <Component giftsToNextTier={giftsToNextTier} nextTierName={nextTier.name ?? ''} nextTierIcon={nextTier.simple_icon_url} />)(importDefault(10396) /* metro dependency 10396: GiftingBadgeProgressBanner */) : null];
|
||||
const TextWithIOSLinkWorkaround = (require(6766) /* metro dependency 6766: TextWithIOSLinkWorkaround */).TextWithIOSLinkWorkaround;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const format = intl.format;
|
||||
const rsEdd2 = (require(1244) /* metro dependency 1244: indexNative */).t.rsEdd2;
|
||||
const object = {};
|
||||
const intl2 = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object.buyButtonLabel = intl2.string((require(1244) /* metro dependency 1244: indexNative */).t.ouo4FK);
|
||||
const PAID_TERMS = MarketingURLs.PAID_TERMS;
|
||||
object.paidServiceTermURL = PAID_TERMS;
|
||||
const PAID_TERMS_VIRTUAL_GOODS = MarketingURLs.PAID_TERMS_VIRTUAL_GOODS;
|
||||
object.virtualGoodsURL = PAID_TERMS_VIRTUAL_GOODS;
|
||||
items2[1] = <TextWithIOSLinkWorkaround variant="text-xs/normal" style={styles.disclaimer}>{Reflect.apply(format,
|
||||
intl, [rsEdd2, object])}</TextWithIOSLinkWorkaround>;
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
const PURCHASING = env0_14.PURCHASING;
|
||||
items2[2] = <Button disabled={isPurchaseDisabled} loading={property === PURCHASING} variant="active" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ouo4FK)} onPress={onPress_93242} />;
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
{items2}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun93243(a0) { // fn#93243, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12342:289, offset: 0x020abe3b, size: 195 bytes, params: 2, frame: 17
|
||||
const object = {};
|
||||
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object.paddingBottom = PX_12 + a0;
|
||||
const PX_122 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object.paddingTop = PX_122;
|
||||
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object.paddingHorizontal = PX_16;
|
||||
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object.gap = PX_8;
|
||||
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
||||
object.backgroundColor = BACKGROUND_BASE_LOW;
|
||||
const SHADOW_TOP_HIGH = (importDefault(697) /* metro dependency 697: native */).shadows.SHADOW_TOP_HIGH;
|
||||
copyDataProperties(object, SHADOW_TOP_HIGH, PX_12);
|
||||
return {container: object, disclaimer: {includeFontPadding: true}};
|
||||
}
|
||||
|
||||
function WrappedCollectiblesShopGiftPurchaseSection({product, isPurchaseDisabled, giftOptions, baseAnalyticsFields, giftingOrigin}) { // fn#93244, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12342:2765, offset: 0x020abefe, size: 139 bytes, params: 2, frame: 21
|
||||
const NativePaymentContextProvider = (require(10109) /* metro dependency 10109: NativePaymentContext */).NativePaymentContextProvider;
|
||||
return (
|
||||
<NativePaymentContextProvider skuIDs={[]} activeSubscription={null}>
|
||||
<CollectiblesShopGiftPurchaseSection
|
||||
product={product}
|
||||
isPurchaseDisabled={isPurchaseDisabled}
|
||||
giftOptions={giftOptions}
|
||||
baseAnalyticsFields={baseAnalyticsFields}
|
||||
giftingOrigin={giftingOrigin}
|
||||
/>
|
||||
</NativePaymentContextProvider>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun93233() { // fn#93233, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12342:999, offset: 0x020abb1e, size: 157 bytes, params: 1, frame: 17
|
||||
const object2 = {};
|
||||
let value = environment.__proto__;
|
||||
const getNextTier = BadgeDirectoryStore.getNextTier;
|
||||
const value2 = undefined;
|
||||
const BadgeId = (require(7635) /* metro dependency 7635: BadgeId */).BadgeId;
|
||||
let GIFTING = BadgeId.GIFTING;
|
||||
object2.nextTier = Reflect.apply(getNextTier, BadgeDirectoryStore, [GIFTING]);
|
||||
const getRemainingToNextTier = BadgeDirectoryStore.getRemainingToNextTier;
|
||||
GIFTING = BadgeId.GIFTING;
|
||||
object2.giftsToNextTier = Reflect.apply(getRemainingToNextTier, BadgeDirectoryStore, [GIFTING]);
|
||||
const getSingleRequirementProgress = BadgeDirectoryStore.getSingleRequirementProgress;
|
||||
GIFTING = BadgeId.GIFTING;
|
||||
value = Reflect.apply(getSingleRequirementProgress, BadgeDirectoryStore, [GIFTING]);
|
||||
object2.badgeProgress = value == null ? value2 : value.current;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function CollectiblesShopGiftPurchaseSectionOnPurchaseComplete() { // fn#93234, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12342:1431, owner: CollectiblesShopGiftPurchaseSection.onPurchaseComplete, offset: 0x020abbbb, size: 277 bytes, params: 1, frame: 18
|
||||
var environment;
|
||||
var value6;
|
||||
if (!(giftOptions.recipient_id == null || giftingOrigin !== GiftingOrigin.USER_PROFILE_WISHLIST && giftingOrigin !== GiftingOrigin.DM_CHANNEL_WISHLIST)) {
|
||||
value6 = environment.__proto__;
|
||||
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'WISHLIST_GIFT_SENT',
|
||||
skuId: product.skuId, recipientId: giftOptions.recipient_id});
|
||||
}
|
||||
const binding = env0_6;
|
||||
const SUCCEEDED = env1_14.SUCCEEDED;
|
||||
binding(SUCCEEDED);
|
||||
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop();
|
||||
const defaultImport3 = importDefault(4496) /* metro dependency 4496: AlertActionCreators */;
|
||||
defaultImport3.openLazy({importer: importer_93235});
|
||||
const defaultImport4 = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
const track = defaultImport4.track;
|
||||
const PAYMENT_FLOW_SUCCEEDED = AnalyticEvents.PAYMENT_FLOW_SUCCEEDED;
|
||||
Reflect.apply(track, defaultImport4, [PAYMENT_FLOW_SUCCEEDED, baseAnalyticsFields]);
|
||||
}
|
||||
|
||||
function CollectiblesShopGiftPurchaseSectionOnPurchaseError() { // fn#93238, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12342:1873, owner: CollectiblesShopGiftPurchaseSection.onPurchaseError, offset: 0x020abd76, size: 74 bytes, params: 1, frame: 15
|
||||
const binding = env0_6;
|
||||
const FAILED = env1_14.FAILED;
|
||||
binding(FAILED);
|
||||
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
const track = defaultImport.track;
|
||||
const PAYMENT_FLOW_FAILED = AnalyticEvents.PAYMENT_FLOW_FAILED;
|
||||
Reflect.apply(track, defaultImport, [PAYMENT_FLOW_FAILED, baseAnalyticsFields]);
|
||||
}
|
||||
|
||||
function _fun93240() { // fn#93240, offset: 0x020abdc0, size: 11 bytes, params: 1, frame: 1
|
||||
return _fun93241;
|
||||
}
|
||||
|
||||
function CollectiblesShopGiftPurchaseSectionOnPress() { // fn#93242, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12342:2622, owner: CollectiblesShopGiftPurchaseSection.onPress, offset: 0x020abe16, size: 37 bytes, params: 1, frame: 12
|
||||
const binding = env0_6;
|
||||
const PURCHASING = env1_14.PURCHASING;
|
||||
binding(PURCHASING);
|
||||
env0_7();
|
||||
}
|
||||
|
||||
function onPurchaseCompleteImporter() { // fn#93235, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12342:1660, owner: CollectiblesShopGiftPurchaseSection.onPurchaseComplete.importer, offset: 0x020abcd0, size: 64 bytes, params: 1, frame: 13
|
||||
var environment;
|
||||
let value = environment.__proto__.__proto__;
|
||||
value = require(dependencyMap[19]);
|
||||
value = value(dependencyMap[18], dependencyMap.paths);
|
||||
return value.then(function({default: env0_0}) {
|
||||
return _fun93237;
|
||||
});
|
||||
}
|
||||
|
||||
function _fun93241() { // fn#93241, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12342:2015, offset: 0x020abdcb, size: 75 bytes, params: 1, frame: 14
|
||||
var defaultImport;
|
||||
const binding = env1_5;
|
||||
const SUCCEEDED = env2_14.SUCCEEDED;
|
||||
if (binding !== SUCCEEDED) {
|
||||
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
defaultImport.track(AnalyticEvents.PAYMENT_FLOW_CANCELED, baseAnalyticsFields);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun93236({default: env0_0}) { // fn#93236, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12342:1694, offset: 0x020abd10, size: 23 bytes, params: 2, frame: 2
|
||||
return _fun93237;
|
||||
}
|
||||
|
||||
function _fun93237(a0) { // fn#93237, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12342:1709, offset: 0x020abd27, size: 79 bytes, params: 2, frame: 16
|
||||
return ((Component) => <Component giftStyle={giftOptions.gift_style ?? PremiumGiftStyles.STANDARD_BOX} giftBadgeProgress={badgeProgress} {...a0} />)(env0_0);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
/* Metro module 14053; source: modules/collectibles/native/CollectiblesShopOrbsPage.tsx; dependencies: [31, 27, 5121, 663, 33, 4501, 6771, 10023, 14042, 4080, 10085, 1305, 8754, 1244, 14046, 14054, 2] */
|
||||
function _fun106572(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#106572, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14250:6, offset: 0x022e0984, size: 247 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(27) /* metro dependency 27 */).View;
|
||||
const collectiblesCategoryStore = importDefault(5121) /* metro dependency 5121: CollectiblesCategoryStore */;
|
||||
const env0_6 = (require(663) /* metro dependency 663: CollectiblesShopConstants */).CollectiblesMobileShopScreen;
|
||||
const env0_7 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const env0_8 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {'display': 'flex',
|
||||
'flex': 1}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/CollectiblesShopOrbsPage.tsx');
|
||||
exports.default = _default_106573;
|
||||
}
|
||||
|
||||
function _default_106573({shopBlocks, fetchShopHomeError, onRenderFirstOrbsItem}) { // fn#106573, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14250:253, offset: 0x022e0a7b, size: 427 bytes, params: 2, frame: 23
|
||||
var r0;
|
||||
const EmptyState = (require(1305) /* metro dependency 1305: native */).EmptyState;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var value;
|
||||
const styles = useStyles();
|
||||
const analyticsLocations = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().analyticsLocations;
|
||||
const value2 = (require(10023) /* metro dependency 10023: CollectiblesAnalyticsContext */).useCollectiblesAnalyticsContext();
|
||||
const value3 = (require(14042) /* metro dependency 14042: useCollectiblesShopDeepLinkProps */).useCollectiblesShopDeepLinkProps({});
|
||||
const initialProductSkuId = value3.initialProductSkuId;
|
||||
initialProductSkuId.useEffect(_fun106574, [initialProductSkuId, value3.initialVariantIndex,
|
||||
value3.initialCategorySkuId, analyticsLocations, value2]);
|
||||
if (fetchShopHomeError !== null) {
|
||||
r0 = <View style={styles.container}><EmptyState style={{marginTop: 42}} Illustration={(require(8754) /* metro dependency 8754: NoResults */).NoResults} body={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.eAn6z2)} /></View>;
|
||||
} else if (shopBlocks.length === 0) {
|
||||
r0 = <View style={styles.container}><EmptyState style={{marginTop: 42}} Illustration={(require(8754) /* metro dependency 8754: NoResults */).NoResults} body={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.eAn6z2)} /></View>;
|
||||
} else {
|
||||
value = importDefault(14046) /* metro dependency 14046: ShopFlashList */;
|
||||
value = ((Component) => <Component data={shopBlocks} renderItem={renderItem_106576} />)(value);
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun106574() { // fn#106574, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14250:542, offset: 0x022e0c26, size: 198 bytes, params: 1, frame: 16
|
||||
var environment;
|
||||
var r5;
|
||||
var value2;
|
||||
var value3;
|
||||
var value4;
|
||||
if (initialProductSkuId != null) {
|
||||
if (initialCategorySkuId != null) {
|
||||
value2 = environment.__proto__;
|
||||
value3 = CollectiblesCategoryStore.getCategory(initialCategorySkuId);
|
||||
value4 = undefined;
|
||||
r5 = value3 == null ? value4 : value3.products.find(function({skuId}) {
|
||||
return skuId === initialProductSkuId;
|
||||
});
|
||||
if (r5 != null) {
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
(require(10085) /* metro dependency 10085: openProductDetailsActionSheet */).openProductDetailsActionSheet({product: r5,
|
||||
|
||||
|
||||
|
||||
initialVariantIndex: initialVariantIndex, analyticsLocations: analyticsLocations,
|
||||
shopAnalyticsContext: env0_2 ?? value4});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _default_106573RenderItem(a0) { // fn#106576, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14250:1038, owner: _default_106573.renderItem, offset: 0x022e0cec, size: 98 bytes, params: 2, frame: 15
|
||||
const item = a0.item;
|
||||
if (a0.index === 0) {
|
||||
onRenderFirstOrbsItem();
|
||||
}
|
||||
const ShopBlockItem = importDefault(14054) /* metro dependency 14054: ShopBlockItem */;
|
||||
const ORBS = CollectiblesMobileShopScreen.ORBS;
|
||||
return (
|
||||
<ShopBlockItem
|
||||
block={item}
|
||||
screen={ORBS}
|
||||
preferVCPrice
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
/* Metro module 10075; source: modules/collectibles/native/CollectiblesShopPricePlaceholder.tsx; dependencies: [31, 33, 4501, 697, 4017, 4504, 2] */
|
||||
function _fun78761(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78761, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10261:6, offset: 0x01e336f2, size: 256 bytes, params: 8, frame: 22
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
const object3 = {'height': 16, 'flex': 1};
|
||||
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
|
||||
const REDESIGN_BUTTON_TERTIARY_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.REDESIGN_BUTTON_TERTIARY_BACKGROUND;
|
||||
object3.backgroundColor = REDESIGN_BUTTON_TERTIARY_BACKGROUND;
|
||||
const env0_5 = Reflect.apply(createStyles, createStylesModule, [{skeletonContainer: object3}]);
|
||||
object = {code: 'function CollectiblesShopPricePlaceholderTsx1(){const{opacity}=this.__closure;return{opacity:opacity.get()};}'};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/CollectiblesShopPricePlaceholder.tsx');
|
||||
exports.CollectiblesShopPricePlaceholder = CollectiblesShopPricePlaceholder;
|
||||
}
|
||||
|
||||
function CollectiblesShopPricePlaceholder({style}) { // fn#78762, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10261:534, offset: 0x01e337f2, size: 221 bytes, params: 2, frame: 22
|
||||
const styles = useStyles();
|
||||
const value2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0.3);
|
||||
env0_3.useEffect(_fun78763, [value2]);
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
const closure = CollectiblesShopPricePlaceholder_;
|
||||
closure.__closure = {opacity: value2};
|
||||
closure.__workletHash = 10107093534072;
|
||||
closure.__initData = env0_6;
|
||||
const value3 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
return <View style={[styles.skeletonContainer, style, value3]} />;
|
||||
}
|
||||
|
||||
function _fun78763() { // fn#78763, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10261:600, offset: 0x01e338cf, size: 103 bytes, params: 1, frame: 19
|
||||
const binding = env0_0;
|
||||
const set = binding.set;
|
||||
let value = environment.__proto__;
|
||||
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
Reflect.apply(set, binding, [value.withRepeat((require(4504) /* metro dependency 4504: timing */).withTiming(1,
|
||||
{duration: 650}), -1, true)]);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,699 @@
|
||||
/* Metro module 14038; source: modules/collectibles/native/CollectiblesShopV2.tsx; dependencies: [57, 31, 27, 4649, 1310, 1878, 5121, 5166, 663, 661, 33, 4501, 12189, 14039, 566, 6518, 491, 7675, 14040, 477, 5133, 7943, 7594, 10034, 4002, 6771, 6789, 1484, 10066, 3815, 14042, 683, 5183, 8491, 14043, 1216, 10023, 10109, 14046, 14048, 14053, 14057, 14079, 14080, 4827, 2] */
|
||||
function _fun106449(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#106449, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14235:6, offset: 0x022dc3cc, size: 463 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const _arrayLikeToArray_106452 = 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 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_5 = value.ActivityIndicator;
|
||||
const env0_6 = value.View;
|
||||
const devSettingsStore = importDefault(4649) /* metro dependency 4649: DevSettingsStore */;
|
||||
const themeStore = importDefault(1310) /* metro dependency 1310: ThemeStore */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const collectiblesCategoryStore = importDefault(5121) /* metro dependency 5121: CollectiblesCategoryStore */;
|
||||
const env0_11 = (require(5166) /* metro dependency 5166: FramesBannerBlockRecord */).FramesBannerBlockRecord;
|
||||
value = require(663) /* metro dependency 663: CollectiblesShopConstants */;
|
||||
const env0_12 = value.COLLECTIBLES_SHOP_CACHE_DURATION_MS;
|
||||
const env0_13 = value.CollectiblesMobileShopScreen;
|
||||
const env0_14 = value.CollectibleShopTab;
|
||||
value = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_15 = value.AnalyticEvents;
|
||||
const env0_16 = value.PaymentGateways;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_17 = value.jsx;
|
||||
const env0_18 = value.jsxs;
|
||||
const env0_19 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({rootContainer: {'height': '100%',
|
||||
'width': '100%'}, spinner: {'position': 'absolute', 'top': '50%', 'left': '50%', 'marginTop': -8,
|
||||
'marginLeft': -8}});
|
||||
const closure = CollectiblesShopV2;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/CollectiblesShopV2.tsx');
|
||||
exports.default = closure;
|
||||
exports.CollectiblesShopV2 = closure;
|
||||
}
|
||||
|
||||
function _createForOfIteratorHelperLoose_106450(a0, a1) { // fn#106450, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14235:424, offset: 0x022dc59b, 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 _fun106451;
|
||||
}
|
||||
value = undefined;
|
||||
if (a0) {
|
||||
if (typeof a0 === 'string') {
|
||||
value = _arrayLikeToArray_106452(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_106452(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
||||
if (regexp.test(r9)) {
|
||||
value = _arrayLikeToArray_106452(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
r6 = value;
|
||||
}
|
||||
}
|
||||
r5 = r6;
|
||||
}
|
||||
} else {
|
||||
r5 = value;
|
||||
}
|
||||
if (r5) {
|
||||
if (r5) {
|
||||
}
|
||||
return _fun106451;
|
||||
}
|
||||
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 CollectiblesShopInternal({analyticsSource, onNavigateAway, storeFront, screen}) { // fn#106453, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14235:1512, offset: 0x022dc70f, size: 1862 bytes, params: 2, frame: 44
|
||||
var object2;
|
||||
var r4;
|
||||
var r2;
|
||||
var r1;
|
||||
let value = undefined;
|
||||
const useCommonTriggerPointModule = require(12189) /* metro dependency 12189: useCommonTriggerPoint */;
|
||||
const useCommonTriggerPoint = useCommonTriggerPointModule.useCommonTriggerPoint;
|
||||
const CollectiblesShopOpenTriggerPoint = (require(14039) /* metro dependency 14039: CollectiblesShopOpenTriggerPoint */).CollectiblesShopOpenTriggerPoint;
|
||||
Reflect.apply(useCommonTriggerPoint, useCommonTriggerPointModule, [CollectiblesShopOpenTriggerPoint]);
|
||||
const fluxModule = require(566) /* metro dependency 566: flux */;
|
||||
const useStateFromStoresArray = fluxModule.useStateFromStoresArray;
|
||||
const property = env0_3(Reflect.apply(useStateFromStoresArray, fluxModule, [[CollectiblesCategoryStore],
|
||||
_fun106454]), 1)[0];
|
||||
const value5 = fluxModule.useStateFromStoresObject([DevSettingsStore], function() {
|
||||
var object = {};
|
||||
object.bypassGoogleSkuSync = DevSettingsStore.get('bypass_google_sku_sync');
|
||||
object.noCache = DevSettingsStore.get('shop_disable_cache');
|
||||
object.includeUnpublished = DevSettingsStore.get('shop_include_unpublished');
|
||||
return object;
|
||||
});
|
||||
const bypassGoogleSkuSync = value5.bypassGoogleSkuSync;
|
||||
const noCache = value5.noCache;
|
||||
const env0_4 = noCache;
|
||||
const includeUnpublished = value5.includeUnpublished;
|
||||
const styles = useStyles();
|
||||
const country = storeFront == null ? value : storeFront.country;
|
||||
const value7 = (importDefault(6518) /* metro dependency 6518: useInitialValue */)(_fun106456);
|
||||
const sessionId = value7.sessionId;
|
||||
let binding = env0_4;
|
||||
const value8 = binding.useMemo(function() {
|
||||
return {sessionId: sessionId, tab: screen ?? CollectiblesMobileShopScreen.FEATURED_PAGE};
|
||||
}, [sessionId, screen]);
|
||||
const defaultImport2 = importDefault(7675) /* metro dependency 7675: useFetchCollectiblesCategoriesAndPurchases */;
|
||||
object2 = {};
|
||||
const APPLE = PaymentGateways.APPLE;
|
||||
object2.paymentGateway = APPLE;
|
||||
copyDataProperties(object2, country != null ? {countryCode: country} : {}, undefined);
|
||||
object2['logPerf'] = true;
|
||||
const {categories, isFetchingCategories} = defaultImport2(object2, value8);
|
||||
const useMaybeFetchShopHomeModule = require(14040) /* metro dependency 14040: useMaybeFetchShopHome */;
|
||||
const useMaybeFetchCollectiblesShopHome = useMaybeFetchShopHomeModule.useMaybeFetchCollectiblesShopHome;
|
||||
let ORBS = CollectiblesMobileShopScreen.ORBS;
|
||||
const {shopBlocks, isFetchingShopHome, fetchShopHomeError} = Reflect.apply(useMaybeFetchCollectiblesShopHome,
|
||||
useMaybeFetchShopHomeModule, [screen === ORBS ? CollectibleShopTab.ORBS : CollectibleShopTab.HOME,
|
||||
{noCache: noCache, includeUnpublished: includeUnpublished, logPerf: true}, value8]);
|
||||
binding = env0_4;
|
||||
const {isFetchingGoogleSkus,
|
||||
fetchError} = (importDefault(7943) /* metro dependency 7943: NativePaymentHooksAndroid */).useGoogleSkuIds(binding.useMemo(_fun106458,
|
||||
[categories, isFetchingCategories]), isFetchingCategories === true);
|
||||
const value13 = (require(7594) /* metro dependency 7594: useCurrentUser */).useCurrentUserIfAvailable();
|
||||
(require(10034) /* metro dependency 10034: useWishlistHooks */).useCurrentUserWishlist();
|
||||
const env0_13 = fluxModule.useStateFromStores([ThemeStore], function() {
|
||||
return require(dependencyMap[24]).isThemeDark(ThemeStore.theme);
|
||||
});
|
||||
const defaultImport4 = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
|
||||
const COLLECTIBLES_SHOP = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).COLLECTIBLES_SHOP;
|
||||
const analyticsLocations = defaultImport4([COLLECTIBLES_SHOP]).analyticsLocations;
|
||||
binding.useEffect(_fun106462, [(require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation(),
|
||||
onNavigateAway]);
|
||||
const value15 = binding.useMemo(_fun106464, [categories, bypassGoogleSkuSync, isFetchingGoogleSkus,
|
||||
isFetchingCategories]);
|
||||
const Date = global.Date;
|
||||
const value17 = Date.now() - property > COLLECTIBLES_SHOP_CACHE_DURATION_MS;
|
||||
const useCollectiblesShopDeepLinkPropsModule = require(14042) /* metro dependency 14042: useCollectiblesShopDeepLinkProps */;
|
||||
const useCollectiblesShopDeepLinkProps = useCollectiblesShopDeepLinkPropsModule.useCollectiblesShopDeepLinkProps;
|
||||
const categoryIndex = Reflect.apply(useCollectiblesShopDeepLinkProps, useCollectiblesShopDeepLinkPropsModule,
|
||||
[{categories: value15}]).categoryIndex;
|
||||
const useRef = binding.useRef;
|
||||
const SHOP_ALL = CollectiblesMobileShopScreen.SHOP_ALL;
|
||||
let FEATURED_PAGE = CollectiblesMobileShopScreen.FEATURED_PAGE;
|
||||
ORBS = CollectiblesMobileShopScreen.ORBS;
|
||||
const env0_16 = Reflect.apply(useRef, binding, [{[SHOP_ALL]: false, [FEATURED_PAGE]: false, [ORBS]: false}]);
|
||||
binding.useEffect(_fun106465, [analyticsLocations, analyticsSource, sessionId, includeUnpublished, screen, noCache]);
|
||||
binding.useEffect(_fun106466, [value13]);
|
||||
const env0_17 = binding.useMemo(_fun106467, [shopBlocks]);
|
||||
(importDefault(14043) /* metro dependency 14043: useCollectiblesShopHeader */)({currentScreen: screen});
|
||||
if (value13 == null) {
|
||||
return null;
|
||||
}
|
||||
const r15 = value15.length === 0 || value17;
|
||||
FEATURED_PAGE = CollectiblesMobileShopScreen.FEATURED_PAGE;
|
||||
if (screen === FEATURED_PAGE) {
|
||||
if (isFetchingShopHome) {
|
||||
r1 = <ActivityIndicator style={styles.spinner} size="large" />;
|
||||
} else {
|
||||
if (r15) {
|
||||
if (isFetchingCategories) {
|
||||
r2 = <ActivityIndicator style={styles.spinner} size="large" />;
|
||||
} else if (isFetchingGoogleSkus) {
|
||||
r2 = <ActivityIndicator style={styles.spinner} size="large" />;
|
||||
} else {
|
||||
r4 = property > 0 && isFetchingCategories === false;
|
||||
r4 = r4 && categories.size === 0;
|
||||
if (r4) {
|
||||
(importDefault(1216) /* metro dependency 1216: SentryUtilsNative */).captureMessage('collectibles mobile shop loaded empty categories');
|
||||
}
|
||||
if (fetchError !== null) {
|
||||
(importDefault(1216) /* metro dependency 1216: SentryUtilsNative */).captureMessage('collectibles mobile shop failed to fetch google sku ids: ' + fetchError);
|
||||
}
|
||||
const AnalyticsLocationProvider = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider;
|
||||
value = <AnalyticsLocationProvider value={analyticsLocations}>{((CollectiblesAnalyticsProvider) => <CollectiblesAnalyticsProvider newValue={value7}><View style={styles.rootContainer}>{((NativePaymentContextProvider) => <NativePaymentContextProvider skuIDs={[]} activeSubscription={null}>{screen === CollectiblesMobileShopScreen.SHOP_ALL ? ((Component) => <Component data={value15} renderItem={renderItem_106469} initialScrollIndex={categoryIndex ?? value} />)(importDefault(14046) /* metro dependency 14046: ShopFlashList */) : screen === CollectiblesMobileShopScreen.ORBS ? ((Component) => <Component shopBlocks={shopBlocks} fetchShopHomeError={fetchShopHomeError ?? null} onRenderFirstOrbsItem={onRenderFirstOrbsItem} />)(importDefault(14053) /* metro dependency 14053: CollectiblesShopOrbsPage */) : ((CollectiblesCoachmarkScrollDismissProvider) => <CollectiblesCoachmarkScrollDismissProvider>{((Component) => <Component data={shopBlocks} renderItem={renderItem_106471} />)(importDefault(14046) /* metro dependency 14046: ShopFlashList */)}</CollectiblesCoachmarkScrollDismissProvider>)((require(14057) /* metro dependency 14057: CollectiblesCoachmarkScrollDismissContext */).CollectiblesCoachmarkScrollDismissProvider)}</NativePaymentContextProvider>)((require(10109) /* metro dependency 10109: NativePaymentContext */).NativePaymentContextProvider)}</View>{((Component) => <Component />)(importDefault(14080) /* metro dependency 14080: DebugLogView */)}</CollectiblesAnalyticsProvider>)((require(10023) /* metro dependency 10023: CollectiblesAnalyticsContext */).CollectiblesAnalyticsProvider)}</AnalyticsLocationProvider>;
|
||||
r2 = value;
|
||||
}
|
||||
} else {
|
||||
r4 = property > 0 && isFetchingCategories === false;
|
||||
r4 = r4 && categories.size === 0;
|
||||
if (r4) {
|
||||
(importDefault(1216) /* metro dependency 1216: SentryUtilsNative */).captureMessage('collectibles mobile shop loaded empty categories');
|
||||
}
|
||||
if (fetchError !== null) {
|
||||
(importDefault(1216) /* metro dependency 1216: SentryUtilsNative */).captureMessage('collectibles mobile shop failed to fetch google sku ids: ' + fetchError);
|
||||
}
|
||||
const AnalyticsLocationProvider2 = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider;
|
||||
value = <AnalyticsLocationProvider2 value={analyticsLocations}>{((CollectiblesAnalyticsProvider) => <CollectiblesAnalyticsProvider newValue={value7}><View style={styles.rootContainer}>{((NativePaymentContextProvider) => <NativePaymentContextProvider skuIDs={[]} activeSubscription={null}>{screen === CollectiblesMobileShopScreen.SHOP_ALL ? ((Component) => <Component data={value15} renderItem={renderItem_106469} initialScrollIndex={categoryIndex ?? value} />)(importDefault(14046) /* metro dependency 14046: ShopFlashList */) : screen === CollectiblesMobileShopScreen.ORBS ? ((Component) => <Component shopBlocks={shopBlocks} fetchShopHomeError={fetchShopHomeError ?? null} onRenderFirstOrbsItem={onRenderFirstOrbsItem} />)(importDefault(14053) /* metro dependency 14053: CollectiblesShopOrbsPage */) : ((CollectiblesCoachmarkScrollDismissProvider) => <CollectiblesCoachmarkScrollDismissProvider>{((Component) => <Component data={shopBlocks} renderItem={renderItem_106471} />)(importDefault(14046) /* metro dependency 14046: ShopFlashList */)}</CollectiblesCoachmarkScrollDismissProvider>)((require(14057) /* metro dependency 14057: CollectiblesCoachmarkScrollDismissContext */).CollectiblesCoachmarkScrollDismissProvider)}</NativePaymentContextProvider>)((require(10109) /* metro dependency 10109: NativePaymentContext */).NativePaymentContextProvider)}</View>{((Component) => <Component />)(importDefault(14080) /* metro dependency 14080: DebugLogView */)}</CollectiblesAnalyticsProvider>)((require(10023) /* metro dependency 10023: CollectiblesAnalyticsContext */).CollectiblesAnalyticsProvider)}</AnalyticsLocationProvider2>;
|
||||
r2 = value;
|
||||
}
|
||||
r1 = r2;
|
||||
}
|
||||
} else if (screen === CollectiblesMobileShopScreen.ORBS) {
|
||||
if (isFetchingShopHome) {
|
||||
r1 = <ActivityIndicator style={styles.spinner} size="large" />;
|
||||
} else {
|
||||
if (r15) {
|
||||
if (isFetchingCategories) {
|
||||
r2 = <ActivityIndicator style={styles.spinner} size="large" />;
|
||||
} else if (isFetchingGoogleSkus) {
|
||||
r2 = <ActivityIndicator style={styles.spinner} size="large" />;
|
||||
} else {
|
||||
r4 = property > 0 && isFetchingCategories === false;
|
||||
r4 = r4 && categories.size === 0;
|
||||
if (r4) {
|
||||
(importDefault(1216) /* metro dependency 1216: SentryUtilsNative */).captureMessage('collectibles mobile shop loaded empty categories');
|
||||
}
|
||||
if (fetchError !== null) {
|
||||
(importDefault(1216) /* metro dependency 1216: SentryUtilsNative */).captureMessage('collectibles mobile shop failed to fetch google sku ids: ' + fetchError);
|
||||
}
|
||||
const AnalyticsLocationProvider3 = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider;
|
||||
value = <AnalyticsLocationProvider3 value={analyticsLocations}>{((CollectiblesAnalyticsProvider) => <CollectiblesAnalyticsProvider newValue={value7}><View style={styles.rootContainer}>{((NativePaymentContextProvider) => <NativePaymentContextProvider skuIDs={[]} activeSubscription={null}>{screen === CollectiblesMobileShopScreen.SHOP_ALL ? ((Component) => <Component data={value15} renderItem={renderItem_106469} initialScrollIndex={categoryIndex ?? value} />)(importDefault(14046) /* metro dependency 14046: ShopFlashList */) : screen === CollectiblesMobileShopScreen.ORBS ? ((Component) => <Component shopBlocks={shopBlocks} fetchShopHomeError={fetchShopHomeError ?? null} onRenderFirstOrbsItem={onRenderFirstOrbsItem} />)(importDefault(14053) /* metro dependency 14053: CollectiblesShopOrbsPage */) : ((CollectiblesCoachmarkScrollDismissProvider) => <CollectiblesCoachmarkScrollDismissProvider>{((Component) => <Component data={shopBlocks} renderItem={renderItem_106471} />)(importDefault(14046) /* metro dependency 14046: ShopFlashList */)}</CollectiblesCoachmarkScrollDismissProvider>)((require(14057) /* metro dependency 14057: CollectiblesCoachmarkScrollDismissContext */).CollectiblesCoachmarkScrollDismissProvider)}</NativePaymentContextProvider>)((require(10109) /* metro dependency 10109: NativePaymentContext */).NativePaymentContextProvider)}</View>{((Component) => <Component />)(importDefault(14080) /* metro dependency 14080: DebugLogView */)}</CollectiblesAnalyticsProvider>)((require(10023) /* metro dependency 10023: CollectiblesAnalyticsContext */).CollectiblesAnalyticsProvider)}</AnalyticsLocationProvider3>;
|
||||
r2 = value;
|
||||
}
|
||||
} else {
|
||||
r4 = property > 0 && isFetchingCategories === false;
|
||||
r4 = r4 && categories.size === 0;
|
||||
if (r4) {
|
||||
(importDefault(1216) /* metro dependency 1216: SentryUtilsNative */).captureMessage('collectibles mobile shop loaded empty categories');
|
||||
}
|
||||
if (fetchError !== null) {
|
||||
(importDefault(1216) /* metro dependency 1216: SentryUtilsNative */).captureMessage('collectibles mobile shop failed to fetch google sku ids: ' + fetchError);
|
||||
}
|
||||
const AnalyticsLocationProvider4 = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider;
|
||||
value = <AnalyticsLocationProvider4 value={analyticsLocations}>{((CollectiblesAnalyticsProvider) => <CollectiblesAnalyticsProvider newValue={value7}><View style={styles.rootContainer}>{((NativePaymentContextProvider) => <NativePaymentContextProvider skuIDs={[]} activeSubscription={null}>{screen === CollectiblesMobileShopScreen.SHOP_ALL ? ((Component) => <Component data={value15} renderItem={renderItem_106469} initialScrollIndex={categoryIndex ?? value} />)(importDefault(14046) /* metro dependency 14046: ShopFlashList */) : screen === CollectiblesMobileShopScreen.ORBS ? ((Component) => <Component shopBlocks={shopBlocks} fetchShopHomeError={fetchShopHomeError ?? null} onRenderFirstOrbsItem={onRenderFirstOrbsItem} />)(importDefault(14053) /* metro dependency 14053: CollectiblesShopOrbsPage */) : ((CollectiblesCoachmarkScrollDismissProvider) => <CollectiblesCoachmarkScrollDismissProvider>{((Component) => <Component data={shopBlocks} renderItem={renderItem_106471} />)(importDefault(14046) /* metro dependency 14046: ShopFlashList */)}</CollectiblesCoachmarkScrollDismissProvider>)((require(14057) /* metro dependency 14057: CollectiblesCoachmarkScrollDismissContext */).CollectiblesCoachmarkScrollDismissProvider)}</NativePaymentContextProvider>)((require(10109) /* metro dependency 10109: NativePaymentContext */).NativePaymentContextProvider)}</View>{((Component) => <Component />)(importDefault(14080) /* metro dependency 14080: DebugLogView */)}</CollectiblesAnalyticsProvider>)((require(10023) /* metro dependency 10023: CollectiblesAnalyticsContext */).CollectiblesAnalyticsProvider)}</AnalyticsLocationProvider4>;
|
||||
r2 = value;
|
||||
}
|
||||
r1 = r2;
|
||||
}
|
||||
} else if (screen != null) {
|
||||
if (r15) {
|
||||
if (isFetchingCategories) {
|
||||
r2 = <ActivityIndicator style={styles.spinner} size="large" />;
|
||||
} else if (isFetchingGoogleSkus) {
|
||||
r2 = <ActivityIndicator style={styles.spinner} size="large" />;
|
||||
} else {
|
||||
r4 = property > 0 && isFetchingCategories === false;
|
||||
r4 = r4 && categories.size === 0;
|
||||
if (r4) {
|
||||
(importDefault(1216) /* metro dependency 1216: SentryUtilsNative */).captureMessage('collectibles mobile shop loaded empty categories');
|
||||
}
|
||||
if (fetchError !== null) {
|
||||
(importDefault(1216) /* metro dependency 1216: SentryUtilsNative */).captureMessage('collectibles mobile shop failed to fetch google sku ids: ' + fetchError);
|
||||
}
|
||||
const AnalyticsLocationProvider5 = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider;
|
||||
value = <AnalyticsLocationProvider5 value={analyticsLocations}>{((CollectiblesAnalyticsProvider) => <CollectiblesAnalyticsProvider newValue={value7}><View style={styles.rootContainer}>{((NativePaymentContextProvider) => <NativePaymentContextProvider skuIDs={[]} activeSubscription={null}>{screen === CollectiblesMobileShopScreen.SHOP_ALL ? ((Component) => <Component data={value15} renderItem={renderItem_106469} initialScrollIndex={categoryIndex ?? value} />)(importDefault(14046) /* metro dependency 14046: ShopFlashList */) : screen === CollectiblesMobileShopScreen.ORBS ? ((Component) => <Component shopBlocks={shopBlocks} fetchShopHomeError={fetchShopHomeError ?? null} onRenderFirstOrbsItem={onRenderFirstOrbsItem} />)(importDefault(14053) /* metro dependency 14053: CollectiblesShopOrbsPage */) : ((CollectiblesCoachmarkScrollDismissProvider) => <CollectiblesCoachmarkScrollDismissProvider>{((Component) => <Component data={shopBlocks} renderItem={renderItem_106471} />)(importDefault(14046) /* metro dependency 14046: ShopFlashList */)}</CollectiblesCoachmarkScrollDismissProvider>)((require(14057) /* metro dependency 14057: CollectiblesCoachmarkScrollDismissContext */).CollectiblesCoachmarkScrollDismissProvider)}</NativePaymentContextProvider>)((require(10109) /* metro dependency 10109: NativePaymentContext */).NativePaymentContextProvider)}</View>{((Component) => <Component />)(importDefault(14080) /* metro dependency 14080: DebugLogView */)}</CollectiblesAnalyticsProvider>)((require(10023) /* metro dependency 10023: CollectiblesAnalyticsContext */).CollectiblesAnalyticsProvider)}</AnalyticsLocationProvider5>;
|
||||
r2 = value;
|
||||
}
|
||||
} else {
|
||||
r4 = property > 0 && isFetchingCategories === false;
|
||||
r4 = r4 && categories.size === 0;
|
||||
if (r4) {
|
||||
(importDefault(1216) /* metro dependency 1216: SentryUtilsNative */).captureMessage('collectibles mobile shop loaded empty categories');
|
||||
}
|
||||
if (fetchError !== null) {
|
||||
(importDefault(1216) /* metro dependency 1216: SentryUtilsNative */).captureMessage('collectibles mobile shop failed to fetch google sku ids: ' + fetchError);
|
||||
}
|
||||
const AnalyticsLocationProvider6 = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider;
|
||||
value = <AnalyticsLocationProvider6 value={analyticsLocations}>{((CollectiblesAnalyticsProvider) => <CollectiblesAnalyticsProvider newValue={value7}><View style={styles.rootContainer}>{((NativePaymentContextProvider) => <NativePaymentContextProvider skuIDs={[]} activeSubscription={null}>{screen === CollectiblesMobileShopScreen.SHOP_ALL ? ((Component) => <Component data={value15} renderItem={renderItem_106469} initialScrollIndex={categoryIndex ?? value} />)(importDefault(14046) /* metro dependency 14046: ShopFlashList */) : screen === CollectiblesMobileShopScreen.ORBS ? ((Component) => <Component shopBlocks={shopBlocks} fetchShopHomeError={fetchShopHomeError ?? null} onRenderFirstOrbsItem={onRenderFirstOrbsItem} />)(importDefault(14053) /* metro dependency 14053: CollectiblesShopOrbsPage */) : ((CollectiblesCoachmarkScrollDismissProvider) => <CollectiblesCoachmarkScrollDismissProvider>{((Component) => <Component data={shopBlocks} renderItem={renderItem_106471} />)(importDefault(14046) /* metro dependency 14046: ShopFlashList */)}</CollectiblesCoachmarkScrollDismissProvider>)((require(14057) /* metro dependency 14057: CollectiblesCoachmarkScrollDismissContext */).CollectiblesCoachmarkScrollDismissProvider)}</NativePaymentContextProvider>)((require(10109) /* metro dependency 10109: NativePaymentContext */).NativePaymentContextProvider)}</View>{((Component) => <Component />)(importDefault(14080) /* metro dependency 14080: DebugLogView */)}</CollectiblesAnalyticsProvider>)((require(10023) /* metro dependency 10023: CollectiblesAnalyticsContext */).CollectiblesAnalyticsProvider)}</AnalyticsLocationProvider6>;
|
||||
r2 = value;
|
||||
}
|
||||
r1 = r2;
|
||||
} else if (isFetchingShopHome) {
|
||||
r1 = <ActivityIndicator style={styles.spinner} size="large" />;
|
||||
} else {
|
||||
if (r15) {
|
||||
if (isFetchingCategories) {
|
||||
r2 = <ActivityIndicator style={styles.spinner} size="large" />;
|
||||
} else if (isFetchingGoogleSkus) {
|
||||
r2 = <ActivityIndicator style={styles.spinner} size="large" />;
|
||||
} else {
|
||||
r4 = property > 0 && isFetchingCategories === false;
|
||||
r4 = r4 && categories.size === 0;
|
||||
if (r4) {
|
||||
(importDefault(1216) /* metro dependency 1216: SentryUtilsNative */).captureMessage('collectibles mobile shop loaded empty categories');
|
||||
}
|
||||
if (fetchError !== null) {
|
||||
(importDefault(1216) /* metro dependency 1216: SentryUtilsNative */).captureMessage('collectibles mobile shop failed to fetch google sku ids: ' + fetchError);
|
||||
}
|
||||
const AnalyticsLocationProvider7 = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider;
|
||||
value = <AnalyticsLocationProvider7 value={analyticsLocations}>{((CollectiblesAnalyticsProvider) => <CollectiblesAnalyticsProvider newValue={value7}><View style={styles.rootContainer}>{((NativePaymentContextProvider) => <NativePaymentContextProvider skuIDs={[]} activeSubscription={null}>{screen === CollectiblesMobileShopScreen.SHOP_ALL ? ((Component) => <Component data={value15} renderItem={renderItem_106469} initialScrollIndex={categoryIndex ?? value} />)(importDefault(14046) /* metro dependency 14046: ShopFlashList */) : screen === CollectiblesMobileShopScreen.ORBS ? ((Component) => <Component shopBlocks={shopBlocks} fetchShopHomeError={fetchShopHomeError ?? null} onRenderFirstOrbsItem={onRenderFirstOrbsItem} />)(importDefault(14053) /* metro dependency 14053: CollectiblesShopOrbsPage */) : ((CollectiblesCoachmarkScrollDismissProvider) => <CollectiblesCoachmarkScrollDismissProvider>{((Component) => <Component data={shopBlocks} renderItem={renderItem_106471} />)(importDefault(14046) /* metro dependency 14046: ShopFlashList */)}</CollectiblesCoachmarkScrollDismissProvider>)((require(14057) /* metro dependency 14057: CollectiblesCoachmarkScrollDismissContext */).CollectiblesCoachmarkScrollDismissProvider)}</NativePaymentContextProvider>)((require(10109) /* metro dependency 10109: NativePaymentContext */).NativePaymentContextProvider)}</View>{((Component) => <Component />)(importDefault(14080) /* metro dependency 14080: DebugLogView */)}</CollectiblesAnalyticsProvider>)((require(10023) /* metro dependency 10023: CollectiblesAnalyticsContext */).CollectiblesAnalyticsProvider)}</AnalyticsLocationProvider7>;
|
||||
r2 = value;
|
||||
}
|
||||
} else {
|
||||
r4 = property > 0 && isFetchingCategories === false;
|
||||
r4 = r4 && categories.size === 0;
|
||||
if (r4) {
|
||||
(importDefault(1216) /* metro dependency 1216: SentryUtilsNative */).captureMessage('collectibles mobile shop loaded empty categories');
|
||||
}
|
||||
if (fetchError !== null) {
|
||||
(importDefault(1216) /* metro dependency 1216: SentryUtilsNative */).captureMessage('collectibles mobile shop failed to fetch google sku ids: ' + fetchError);
|
||||
}
|
||||
const AnalyticsLocationProvider8 = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider;
|
||||
value = <AnalyticsLocationProvider8 value={analyticsLocations}>{((CollectiblesAnalyticsProvider) => <CollectiblesAnalyticsProvider newValue={value7}><View style={styles.rootContainer}>{((NativePaymentContextProvider) => <NativePaymentContextProvider skuIDs={[]} activeSubscription={null}>{screen === CollectiblesMobileShopScreen.SHOP_ALL ? ((Component) => <Component data={value15} renderItem={renderItem_106469} initialScrollIndex={categoryIndex ?? value} />)(importDefault(14046) /* metro dependency 14046: ShopFlashList */) : screen === CollectiblesMobileShopScreen.ORBS ? ((Component) => <Component shopBlocks={shopBlocks} fetchShopHomeError={fetchShopHomeError ?? null} onRenderFirstOrbsItem={onRenderFirstOrbsItem} />)(importDefault(14053) /* metro dependency 14053: CollectiblesShopOrbsPage */) : ((CollectiblesCoachmarkScrollDismissProvider) => <CollectiblesCoachmarkScrollDismissProvider>{((Component) => <Component data={shopBlocks} renderItem={renderItem_106471} />)(importDefault(14046) /* metro dependency 14046: ShopFlashList */)}</CollectiblesCoachmarkScrollDismissProvider>)((require(14057) /* metro dependency 14057: CollectiblesCoachmarkScrollDismissContext */).CollectiblesCoachmarkScrollDismissProvider)}</NativePaymentContextProvider>)((require(10109) /* metro dependency 10109: NativePaymentContext */).NativePaymentContextProvider)}</View>{((Component) => <Component />)(importDefault(14080) /* metro dependency 14080: DebugLogView */)}</CollectiblesAnalyticsProvider>)((require(10023) /* metro dependency 10023: CollectiblesAnalyticsContext */).CollectiblesAnalyticsProvider)}</AnalyticsLocationProvider8>;
|
||||
r2 = value;
|
||||
}
|
||||
r1 = r2;
|
||||
}
|
||||
return r1;
|
||||
}
|
||||
|
||||
function CollectiblesShopV2(a0) { // fn#106472, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14235:6004, offset: 0x022dd602, size: 501 bytes, params: 2, frame: 22
|
||||
const value2 = undefined;
|
||||
const {nativePaymentsConnected,
|
||||
storeFront} = (importDefault(7943) /* metro dependency 7943: NativePaymentHooksAndroid */).useNativeIAPPayments();
|
||||
const styles = useStyles();
|
||||
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
|
||||
return UserStore.getCurrentUser();
|
||||
});
|
||||
let r8 = currentUser == null ? value2 : currentUser.isStaff();
|
||||
r8 = !r8 ? currentUser == null ? value2 : currentUser.isStaffPersonal() : r8;
|
||||
const binding = env0_4;
|
||||
const [property, env0_1] = env0_3(binding.useState(false), 2);
|
||||
binding.useEffect(function() {
|
||||
if (nativePaymentsConnected) {
|
||||
return undefined;
|
||||
}
|
||||
var env0_0 = global.setTimeout(_fun106475, 10000);
|
||||
return _fun106476;
|
||||
}, [nativePaymentsConnected]);
|
||||
let r0 = (require(477) /* metro dependency 477: PlatformUtils */).isIOS() && !(require(4827) /* metro dependency 4827: ReleaseChannelUtilsNative */).isStable && r8;
|
||||
if (nativePaymentsConnected) {
|
||||
if (property && !nativePaymentsConnected) {
|
||||
(importDefault(1216) /* metro dependency 1216: SentryUtilsNative */).captureMessage('collectibles mobile shop failed to connect to native payments isIOS: ' + (require(477) /* metro dependency 477: PlatformUtils */).isIOS() + ' isStable: ' + (require(4827) /* metro dependency 4827: ReleaseChannelUtilsNative */).isStable);
|
||||
}
|
||||
r0 = <CollectiblesShopInternal {...a0} {...{['storeFront']: storeFront}} {...{['screen']: a0.screen}} />;
|
||||
} else if (r0) {
|
||||
if (property && !nativePaymentsConnected) {
|
||||
(importDefault(1216) /* metro dependency 1216: SentryUtilsNative */).captureMessage('collectibles mobile shop failed to connect to native payments isIOS: ' + (require(477) /* metro dependency 477: PlatformUtils */).isIOS() + ' isStable: ' + (require(4827) /* metro dependency 4827: ReleaseChannelUtilsNative */).isStable);
|
||||
}
|
||||
r0 = <CollectiblesShopInternal {...a0} {...{['storeFront']: storeFront}} {...{['screen']: a0.screen}} />;
|
||||
} else if (property) {
|
||||
if (property && !nativePaymentsConnected) {
|
||||
(importDefault(1216) /* metro dependency 1216: SentryUtilsNative */).captureMessage('collectibles mobile shop failed to connect to native payments isIOS: ' + (require(477) /* metro dependency 477: PlatformUtils */).isIOS() + ' isStable: ' + (require(4827) /* metro dependency 4827: ReleaseChannelUtilsNative */).isStable);
|
||||
}
|
||||
r0 = <CollectiblesShopInternal {...a0} {...{['storeFront']: storeFront}} {...{['screen']: a0.screen}} />;
|
||||
} else {
|
||||
r0 = <ActivityIndicator style={styles.spinner} size="large" />;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun106454() { // fn#106454, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14235:1696, offset: 0x022dce55, size: 37 bytes, params: 1, frame: 3
|
||||
const value = environment.__proto__;
|
||||
return [CollectiblesCategoryStore.lastSuccessfulFetch ?? 0];
|
||||
}
|
||||
|
||||
function _fun106456() { // fn#106456, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14235:2063, offset: 0x022dcec4, size: 44 bytes, params: 1, frame: 12
|
||||
const object2 = {};
|
||||
const value = environment.__proto__;
|
||||
object2.sessionId = (require(491) /* metro dependency 491 */).v4();
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun106458() { // fn#106458, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14235:2495, offset: 0x022dcf22, size: 152 bytes, params: 1, frame: 16
|
||||
var environment;
|
||||
var r2;
|
||||
var value2;
|
||||
var _createForOfIteratorHelperLoose_106450Binding;
|
||||
var categoriesBinding;
|
||||
var values;
|
||||
var value3;
|
||||
var done;
|
||||
var value4;
|
||||
var products;
|
||||
var forEach;
|
||||
var value5;
|
||||
let value = environment;
|
||||
if (isFetchingCategories !== true) {
|
||||
value2 = environment.__proto__;
|
||||
reducibleJoin5: while (true) {
|
||||
if ((require(477) /* metro dependency 477: PlatformUtils */).isAndroid() !== false) {
|
||||
_createForOfIteratorHelperLoose_106450Binding = _createForOfIteratorHelperLoose_106450;
|
||||
categoriesBinding = categories;
|
||||
values = categoriesBinding.values;
|
||||
value = _createForOfIteratorHelperLoose_106450Binding(Reflect.apply(values, categoriesBinding, []));
|
||||
value3 = value();
|
||||
done = value3.done;
|
||||
if (!done) {
|
||||
r2 = value3;
|
||||
reducibleLoop3: while (true) {
|
||||
value4 = r2.value;
|
||||
products = value4.products;
|
||||
forEach = products.forEach;
|
||||
Reflect.apply(forEach, products, [_fun106459]);
|
||||
value5 = value();
|
||||
done = value5.done;
|
||||
if (done) {
|
||||
break reducibleLoop3;
|
||||
}
|
||||
r2 = value5;
|
||||
continue reducibleLoop3;
|
||||
}
|
||||
}
|
||||
return [];
|
||||
}
|
||||
break reducibleJoin5;
|
||||
}
|
||||
}
|
||||
return [];
|
||||
}
|
||||
|
||||
function _fun106462() { // fn#106462, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14235:3244, offset: 0x022dd0ea, size: 34 bytes, params: 1, frame: 13
|
||||
return env0_15.addListener('beforeRemove', _fun106463);
|
||||
}
|
||||
|
||||
function _fun106464() { // fn#106464, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14235:3355, offset: 0x022dd141, size: 153 bytes, params: 1, frame: 20
|
||||
var r0;
|
||||
var value;
|
||||
const value2 = categories.values();
|
||||
const items2 = [];
|
||||
arraySpread(items2, value2, 0, undefined);
|
||||
const collectiblesUtilsModule = require(10066) /* metro dependency 10066: CollectiblesUtils */;
|
||||
const filterHiddenCategories = collectiblesUtilsModule.filterHiddenCategories;
|
||||
const billingPlatformUtilsModule = require(3815) /* metro dependency 3815: BillingPlatformUtils */;
|
||||
if (billingPlatformUtilsModule.isGooglePlayBillingSupported()) {
|
||||
if (bypassGoogleSkuSync) {
|
||||
r0 = items2;
|
||||
} else if (isFetchingGoogleSkus) {
|
||||
r0 = items2;
|
||||
} else if (isFetchingCategories) {
|
||||
r0 = items2;
|
||||
} else {
|
||||
value = collectiblesUtilsModule;
|
||||
value = value.filterGPlaySyncedCategories(items2);
|
||||
r0 = value;
|
||||
}
|
||||
} else {
|
||||
r0 = items2;
|
||||
}
|
||||
return Reflect.apply(filterHiddenCategories, collectiblesUtilsModule, [r0]);
|
||||
}
|
||||
|
||||
function _fun106465() { // fn#106465, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14235:3698, offset: 0x022dd1da, size: 268 bytes, params: 1, frame: 20
|
||||
var object2;
|
||||
let r9 = screen == null || screen === CollectiblesMobileShopScreen.FEATURED_PAGE;
|
||||
r9 = !r9 ? screen === CollectiblesMobileShopScreen.SHOP_ALL : r9;
|
||||
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
const track = defaultImport.track;
|
||||
const COLLECTIBLES_SHOP_VIEWED = AnalyticEvents.COLLECTIBLES_SHOP_VIEWED;
|
||||
Reflect.apply(track, defaultImport, [COLLECTIBLES_SHOP_VIEWED, {location_stack: analyticsLocations,
|
||||
page_session_id: sessionId, source: analyticsSource, page_type: r9 ? 'home' : screen}]);
|
||||
const collectiblesPerfLoggingModule = require(5183) /* metro dependency 5183: CollectiblesPerfLogging */;
|
||||
const trackShopPerf = collectiblesPerfLoggingModule.trackShopPerf;
|
||||
object2 = {};
|
||||
object2.sessionId = sessionId;
|
||||
const CollectiblesShopPerfCheckpoint = collectiblesPerfLoggingModule.CollectiblesShopPerfCheckpoint;
|
||||
const SHOP_MOUNTED = CollectiblesShopPerfCheckpoint.SHOP_MOUNTED;
|
||||
object2.checkpoint = SHOP_MOUNTED;
|
||||
object2.tab = screen ?? CollectiblesMobileShopScreen.FEATURED_PAGE;
|
||||
object2.unpublishedCategoriesShown = includeUnpublished;
|
||||
object2.cacheDisabled = noCache;
|
||||
Reflect.apply(trackShopPerf, collectiblesPerfLoggingModule, [object2]);
|
||||
}
|
||||
|
||||
function _fun106466() { // fn#106466, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14235:4073, offset: 0x022dd2e6, size: 56 bytes, params: 1, frame: 12
|
||||
var value2;
|
||||
if (env0_12 != null) {
|
||||
value2 = environment.__proto__;
|
||||
(importDefault(8491) /* metro dependency 8491: maybeFetchUserProfile */)(env0_12.id);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun106467() { // fn#106467, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14235:4127, offset: 0x022dd31e, size: 44 bytes, params: 1, frame: 12
|
||||
return shopBlocks?.find(function(a0) {
|
||||
return a0 instanceof FramesBannerBlockRecord;
|
||||
});
|
||||
}
|
||||
|
||||
function CollectiblesShopInternalRenderItem({item, index}) { // fn#106469, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14235:4838, owner: CollectiblesShopInternal.renderItem, offset: 0x022dd35a, size: 252 bytes, params: 2, frame: 21
|
||||
var r0;
|
||||
var current;
|
||||
var SHOP_ALL;
|
||||
var value2;
|
||||
var moduleValue;
|
||||
var trackShopPerf;
|
||||
var object2;
|
||||
let value = index !== 0;
|
||||
if (value) {
|
||||
r0 = value;
|
||||
} else {
|
||||
current = env0_16.current;
|
||||
value = environment.__proto__;
|
||||
r0 = current[CollectiblesMobileShopScreen.SHOP_ALL];
|
||||
}
|
||||
if (!r0) {
|
||||
current = env0_16.current;
|
||||
value2 = environment.__proto__;
|
||||
SHOP_ALL = CollectiblesMobileShopScreen.SHOP_ALL;
|
||||
current[SHOP_ALL] = true;
|
||||
moduleValue = require(5183) /* metro dependency 5183: CollectiblesPerfLogging */;
|
||||
trackShopPerf = moduleValue.trackShopPerf;
|
||||
object2 = {};
|
||||
object2.sessionId = sessionId;
|
||||
object2.checkpoint = (require(5183) /* metro dependency 5183: CollectiblesPerfLogging */).CollectiblesShopPerfCheckpoint.SHOP_RENDERED;
|
||||
SHOP_ALL = CollectiblesMobileShopScreen.SHOP_ALL;
|
||||
object2.tab = SHOP_ALL;
|
||||
object2.unpublishedCategoriesShown = includeUnpublished;
|
||||
object2.cacheDisabled = noCache;
|
||||
Reflect.apply(trackShopPerf, moduleValue, [object2]);
|
||||
}
|
||||
value = environment.__proto__;
|
||||
const ShopCategory = (require(14048) /* metro dependency 14048: ShopCategory */).ShopCategory;
|
||||
return (
|
||||
<ShopCategory
|
||||
category={item}
|
||||
isDarkTheme={env0_13}
|
||||
index={index}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function onRenderFirstOrbsItem() { // fn#106470, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14235:5273, owner: CollectiblesShopInternal.onRenderFirstOrbsItem, offset: 0x022dd456, size: 163 bytes, params: 1, frame: 18
|
||||
var moduleValue;
|
||||
var trackShopPerf;
|
||||
var object2;
|
||||
let current = env0_16.current;
|
||||
let ORBS = CollectiblesMobileShopScreen.ORBS;
|
||||
if (!current[ORBS]) {
|
||||
current = env0_16.current;
|
||||
ORBS = CollectiblesMobileShopScreen.ORBS;
|
||||
current[ORBS] = true;
|
||||
moduleValue = require(5183) /* metro dependency 5183: CollectiblesPerfLogging */;
|
||||
trackShopPerf = moduleValue.trackShopPerf;
|
||||
object2 = {};
|
||||
object2.sessionId = sessionId;
|
||||
object2.checkpoint = (require(5183) /* metro dependency 5183: CollectiblesPerfLogging */).CollectiblesShopPerfCheckpoint.SHOP_RENDERED;
|
||||
ORBS = CollectiblesMobileShopScreen.ORBS;
|
||||
object2.tab = ORBS;
|
||||
object2.unpublishedCategoriesShown = includeUnpublished;
|
||||
object2.cacheDisabled = noCache;
|
||||
Reflect.apply(trackShopPerf, moduleValue, [object2]);
|
||||
}
|
||||
}
|
||||
|
||||
function CollectiblesShopInternalRenderItem_106471(a0) { // fn#106471, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14235:5579, owner: CollectiblesShopInternal.renderItem, offset: 0x022dd4f9, size: 265 bytes, params: 2, frame: 20
|
||||
var r0;
|
||||
var current;
|
||||
var FEATURED_PAGE;
|
||||
var value2;
|
||||
var moduleValue;
|
||||
var trackShopPerf;
|
||||
var object2;
|
||||
const item = a0.item;
|
||||
let value = a0.index !== 0;
|
||||
if (value) {
|
||||
r0 = value;
|
||||
} else {
|
||||
current = env0_16.current;
|
||||
value = environment.__proto__;
|
||||
r0 = current[CollectiblesMobileShopScreen.FEATURED_PAGE];
|
||||
}
|
||||
if (!r0) {
|
||||
current = env0_16.current;
|
||||
value2 = environment.__proto__;
|
||||
FEATURED_PAGE = CollectiblesMobileShopScreen.FEATURED_PAGE;
|
||||
current[FEATURED_PAGE] = true;
|
||||
moduleValue = require(5183) /* metro dependency 5183: CollectiblesPerfLogging */;
|
||||
trackShopPerf = moduleValue.trackShopPerf;
|
||||
object2 = {};
|
||||
object2.sessionId = sessionId;
|
||||
object2.checkpoint = (require(5183) /* metro dependency 5183: CollectiblesPerfLogging */).CollectiblesShopPerfCheckpoint.SHOP_RENDERED;
|
||||
FEATURED_PAGE = CollectiblesMobileShopScreen.FEATURED_PAGE;
|
||||
object2.tab = FEATURED_PAGE;
|
||||
object2.unpublishedCategoriesShown = includeUnpublished;
|
||||
object2.cacheDisabled = noCache;
|
||||
Reflect.apply(trackShopPerf, moduleValue, [object2]);
|
||||
}
|
||||
value = environment.__proto__;
|
||||
value = importDefault(14079) /* metro dependency 14079: CollectiblesShopFeaturedPage */;
|
||||
const fetchShopHomeErrorBinding = fetchShopHomeError;
|
||||
const value4 = null;
|
||||
return ((Component) => <Component shopBlock={item} fetchShopHomeError={value4 != fetchShopHomeErrorBinding ? fetchShopHomeError : value4} framesBannerBlock={env0_17} />)(value);
|
||||
}
|
||||
|
||||
function _fun106474() { // fn#106474, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14235:6278, offset: 0x022dd7f7, size: 56 bytes, params: 1, frame: 14
|
||||
if (nativePaymentsConnected) {
|
||||
return undefined;
|
||||
}
|
||||
const env0_0 = global.setTimeout(_fun106475, 10000);
|
||||
return _fun106476;
|
||||
}
|
||||
|
||||
function _fun106459(a0) { // fn#106459, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14235:2650, offset: 0x022dcfba, size: 159 bytes, params: 2, frame: 17
|
||||
var environment;
|
||||
var binding;
|
||||
var push;
|
||||
var Object;
|
||||
var items2;
|
||||
let value = a0.googleSkuIds !== undefined;
|
||||
if (value && a0.googleSkuIds !== null) {
|
||||
binding = env0_0;
|
||||
push = binding.push;
|
||||
Object = global.Object;
|
||||
value = Object.values(a0.googleSkuIds);
|
||||
items2 = [];
|
||||
arraySpread(items2, value, 0, Object);
|
||||
apply(push, items2, binding, Object);
|
||||
}
|
||||
value = environment.__proto__.__proto__;
|
||||
value = require(5133) /* metro dependency 5133: CollectiblesProductUtils */;
|
||||
const getIsVariantProduct = value.getIsVariantProduct;
|
||||
if (Reflect.apply(getIsVariantProduct, value, [a0])) {
|
||||
a0.variants.forEach(_fun106460);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun106463({data}) { // fn#106463, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14235:3278, offset: 0x022dd10c, size: 53 bytes, params: 2, frame: 10
|
||||
var value;
|
||||
if (data.action.type !== 'RESET') {
|
||||
value = environment.__proto__;
|
||||
if (onNavigateAway != null) {
|
||||
onNavigateAway();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun106460(a0) { // fn#106460, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14235:2797, offset: 0x022dd059, size: 97 bytes, params: 2, frame: 16
|
||||
var binding;
|
||||
var push;
|
||||
var Object;
|
||||
var items2;
|
||||
let value = a0.googleSkuIds !== undefined;
|
||||
if (value && a0.googleSkuIds !== null) {
|
||||
value = environment.__proto__;
|
||||
binding = env1_0;
|
||||
push = binding.push;
|
||||
Object = global.Object;
|
||||
value = Object.values(a0.googleSkuIds);
|
||||
items2 = [];
|
||||
arraySpread(items2, value, 0, Object);
|
||||
apply(push, items2, binding, Object);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,122 @@
|
||||
/* Metro module 14083; source: modules/collectibles/native/CollectiblesShopViewAllCategoryItems.tsx; dependencies: [31, 27, 663, 661, 33, 4501, 697, 7591, 6771, 6789, 1585, 14049, 4017, 4577, 683, 5183, 10023, 10109, 14084, 14085, 14064, 1244, 2] */
|
||||
function _fun106711(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#106711, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14280:6, offset: 0x022e79b7, size: 353 bytes, params: 8, frame: 24
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const value2 = require(27) /* metro dependency 27 */;
|
||||
const env0_4 = value2.View;
|
||||
const env0_5 = value2.StyleSheet;
|
||||
const env0_6 = (require(663) /* metro dependency 663: CollectiblesShopConstants */).CollectiblesMobileShopScreen;
|
||||
const env0_7 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
|
||||
const value3 = require(33) /* metro dependency 33 */;
|
||||
const env0_8 = value3.jsx;
|
||||
const env0_9 = value3.jsxs;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
object2 = {};
|
||||
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
||||
object2.rootContainer = {flex: 1, backgroundColor: BACKGROUND_BASE_LOW};
|
||||
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
|
||||
object2.border = {height: 1, backgroundColor: BORDER_SUBTLE};
|
||||
const env0_10 = Reflect.apply(createStyles, createStylesModule, [object2]);
|
||||
object2 = {code: 'function CollectiblesShopViewAllCategoryItemsTsx1(){const{borderOpacity}=this.__closure;return{opacity:borderOpacity.get()};}'};
|
||||
value = value.memo(_fun106712);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/CollectiblesShopViewAllCategoryItems.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _fun106712({category, analyticsContext}) { // fn#106712, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14280:541, offset: 0x022e7b18, size: 923 bytes, params: 2, frame: 36
|
||||
const styles = useStyles();
|
||||
const mobileBgUrl = category.mobileBgUrl;
|
||||
const logoUrl = category.logoUrl;
|
||||
const backgroundColors = (importDefault(7591) /* metro dependency 7591: useCollectiblesShopStylesNative */)(category.styles).backgroundColors;
|
||||
const defaultImport2 = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
|
||||
const COLLECTIBLES_SHOP_INDEX_PAGE = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).COLLECTIBLES_SHOP_INDEX_PAGE;
|
||||
const analyticsLocations = defaultImport2([COLLECTIBLES_SHOP_INDEX_PAGE]).analyticsLocations;
|
||||
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
|
||||
const value3 = (require(14049) /* metro dependency 14049: useFilteredAndSortedProducts */).useFilteredAndSortedProducts({products: category.products});
|
||||
const value4 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
|
||||
const binding = value4;
|
||||
const value5 = binding.useCallback(_fun106713, [value4]);
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
const closure = __106714;
|
||||
closure.__closure = {borderOpacity: value4};
|
||||
closure.__workletHash = 2446209469388;
|
||||
closure.__initData = env0_11;
|
||||
const value6 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
binding.useEffect(_fun106715, [analyticsContext?.sessionId, analyticsLocations, category.name]);
|
||||
const AnalyticsLocationProvider = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider;
|
||||
const CollectiblesAnalyticsProvider = (require(10023) /* metro dependency 10023: CollectiblesAnalyticsContext */).CollectiblesAnalyticsProvider;
|
||||
const object = {};
|
||||
copyDataProperties(object, analyticsContext, mobileBgUrl);
|
||||
object['pageCategory'] = category.name;
|
||||
const NativePaymentContextProvider = (require(10109) /* metro dependency 10109: NativePaymentContext */).NativePaymentContextProvider;
|
||||
const CollectiblesProgressiveImage = (require(14084) /* metro dependency 14084: CollectiblesProgressiveImage */).CollectiblesProgressiveImage;
|
||||
const items2 = [<CollectiblesProgressiveImage source={{uri: mobileBgUrl}} style={StyleSheet.absoluteFill} />];
|
||||
items2[1] = ((Component) => <Component logoUrl={logoUrl} buttonColor={backgroundColors == null ? undefined : backgroundColors.label.toHexString()} categoryName={category.name} />)(importDefault(14085) /* metro dependency 14085: CollectiblesShopViewAllCategoryItemsHeader */);
|
||||
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
items2[2] = <View2 style={[styles.border, value6]} />;
|
||||
const CollectiblesShopCardsGrid = importDefault(14064) /* metro dependency 14064: CollectiblesShopCardsGrid */;
|
||||
const object2 = {category: category, products: value3, scrollEnabled: true, onScroll: value5};
|
||||
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object2.paddingTop = PX_16;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object2.paddingBottom = bottom + PX_16;
|
||||
object2.muteBundleStaticBackground = true;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const formatToPlainString = intl.formatToPlainString;
|
||||
const FNtLb3 = (require(1244) /* metro dependency 1244: indexNative */).t.FNtLb3;
|
||||
object2.accessibilityLabel = Reflect.apply(formatToPlainString, intl, [FNtLb3, {category: category.name}]);
|
||||
items2[3] = <CollectiblesShopCardsGrid {...object2} />;
|
||||
return (
|
||||
<AnalyticsLocationProvider value={analyticsLocations}>
|
||||
<CollectiblesAnalyticsProvider newValue={object}>
|
||||
<NativePaymentContextProvider skuIDs={[]} activeSubscription={null}>
|
||||
<View style={styles.rootContainer}>
|
||||
{items2}
|
||||
</View>
|
||||
</NativePaymentContextProvider>
|
||||
</CollectiblesAnalyticsProvider>
|
||||
</AnalyticsLocationProvider>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun106713({nativeEvent}) { // fn#106713, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14280:858, offset: 0x022e7eb3, size: 89 bytes, params: 2, frame: 15
|
||||
const binding = env0_3;
|
||||
const set = binding.set;
|
||||
let value = environment.__proto__;
|
||||
value = require(4577) /* metro dependency 4577: spring */;
|
||||
Reflect.apply(set, binding, [value.withSpring(nativeEvent.contentOffset.y > 5 ? 1 : 0)]);
|
||||
}
|
||||
|
||||
function _fun106715() { // fn#106715, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14280:1099, offset: 0x022e7f0c, size: 262 bytes, params: 1, frame: 20
|
||||
const value2 = undefined;
|
||||
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
const track = defaultImport.track;
|
||||
const COLLECTIBLES_SHOP_VIEWED = AnalyticEvents.COLLECTIBLES_SHOP_VIEWED;
|
||||
let object2 = {};
|
||||
object2.location_stack = analyticsLocations;
|
||||
object2.page_session_id = analyticsContext == null ? value2 : analyticsContext.sessionId;
|
||||
const COLLECTIBLES_SHOP = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).COLLECTIBLES_SHOP;
|
||||
object2.source = COLLECTIBLES_SHOP;
|
||||
object2.page_type = 'index';
|
||||
object2.category = category.name;
|
||||
Reflect.apply(track, defaultImport, [COLLECTIBLES_SHOP_VIEWED, object2]);
|
||||
const collectiblesPerfLoggingModule = require(5183) /* metro dependency 5183: CollectiblesPerfLogging */;
|
||||
const trackShopPerf = collectiblesPerfLoggingModule.trackShopPerf;
|
||||
object2 = {};
|
||||
object2.sessionId = analyticsContext == null ? value2 : analyticsContext.sessionId;
|
||||
const CollectiblesShopPerfCheckpoint = collectiblesPerfLoggingModule.CollectiblesShopPerfCheckpoint;
|
||||
const SHOP_MOUNTED = CollectiblesShopPerfCheckpoint.SHOP_MOUNTED;
|
||||
object2.checkpoint = SHOP_MOUNTED;
|
||||
const SHOP_ALL = CollectiblesMobileShopScreen.SHOP_ALL;
|
||||
object2.tab = SHOP_ALL;
|
||||
object2.unpublishedCategoriesShown = false;
|
||||
object2.cacheDisabled = false;
|
||||
Reflect.apply(trackShopPerf, collectiblesPerfLoggingModule, [object2]);
|
||||
return value2;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
/* Metro module 14085; source: modules/collectibles/native/CollectiblesShopViewAllCategoryItemsHeader.tsx; dependencies: [31, 27, 7553, 33, 4501, 1484, 9603, 9607, 1244, 2] */
|
||||
function _fun106719(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#106719, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14282:6, offset: 0x022e8204, size: 288 bytes, params: 8, frame: 21
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_3 = value.Image;
|
||||
const env0_4 = value.View;
|
||||
const env0_5 = (require(7553) /* metro dependency 7553: YouBarConstants */).useYouBarSettingsCustomHeaderPaddingTop;
|
||||
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({headerContainer: {'flexDirection': 'row',
|
||||
'justifyContent': 'space-between', 'alignItems': 'center', 'paddingBottom': 12, 'paddingLeft': 8},
|
||||
backButton: {flex: 1}, logo: {'flex': 2, 'height': 36}, dummyRightButton: {flex: 1}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/CollectiblesShopViewAllCategoryItemsHeader.tsx');
|
||||
exports.default = CollectiblesShopViewAllCategoryItemsHeader;
|
||||
}
|
||||
|
||||
function CollectiblesShopViewAllCategoryItemsHeader({logoUrl, buttonColor, categoryName}) { // fn#106720, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14282:544, offset: 0x022e8324, size: 410 bytes, params: 2, frame: 28
|
||||
const env0_0 = (require(1484) /* metro dependency 1484: useNavigationNative */).useStackNavigation();
|
||||
const styles = useStyles();
|
||||
const value2 = useYouBarSettingsCustomHeaderPaddingTop('CollectiblesShopViewAllCategoryItemsHeader');
|
||||
const object = {};
|
||||
copyDataProperties(object, styles.headerContainer, undefined);
|
||||
object['paddingTop'] = value2;
|
||||
const HeaderIconButton = (require(9603) /* metro dependency 9603: HeaderShared */).HeaderIconButton;
|
||||
const headerIconButtonProps = {source: importDefault(9607) /* metro dependency 9607 */, color: buttonColor};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
headerIconButtonProps.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['13/7kX']);
|
||||
headerIconButtonProps.onPress = onPress_106721;
|
||||
const items2 = [<View style={styles.backButton}><HeaderIconButton {...headerIconButtonProps} /></View>];
|
||||
const object3 = {uri: logoUrl};
|
||||
const formatToPlainString = intl.formatToPlainString;
|
||||
const FNtLb3 = (require(1244) /* metro dependency 1244: indexNative */).t.FNtLb3;
|
||||
items2[1] = <Image resizeMode="contain" style={styles.logo} source={object3} accessibilityLabel={Reflect.apply(formatToPlainString,
|
||||
intl, [FNtLb3, {category: categoryName}])} accessibilityRole="header" />;
|
||||
items2[2] = <View style={styles.dummyRightButton} />;
|
||||
return (
|
||||
<View style={object}>
|
||||
{items2}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,258 @@
|
||||
/* Metro module 10066; source: modules/collectibles/native/CollectiblesUtils.tsx; dependencies: [661, 5137, 3815, 5140, 5134, 5133, 10067, 10068, 2] */
|
||||
function _fun78672(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78672, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10252:6, offset: 0x01e313d2, size: 230 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const _arrayLikeToArray_78675 = 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 = (require(661) /* metro dependency 661: Constants */).PriceSetAssignmentPurchaseTypes;
|
||||
const closure = extractPriceByPurchaseTypes_78676;
|
||||
const closure2 = isGPlaySynced;
|
||||
const hasAtLeastOneGPlaySynced = function({products}) {
|
||||
products = products.filter(_fun78680).length;
|
||||
return products > 0;
|
||||
};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/CollectiblesUtils.tsx');
|
||||
exports.getFormattedPriceForCollectiblesProduct = getFormattedPriceForCollectiblesProduct_78681;
|
||||
exports.extractPriceByPurchaseTypes = closure;
|
||||
exports.isGPlaySynced = closure2;
|
||||
exports.filterGPlaySyncedCategories = function(a0) {
|
||||
var r2;
|
||||
var value5;
|
||||
var value6;
|
||||
if (a0 == null) {
|
||||
return [];
|
||||
}
|
||||
var items = [];
|
||||
var value3 = _createForOfIteratorHelperLoose_78673(a0.values());
|
||||
var value4 = value3();
|
||||
if (!value4.done) {
|
||||
r2 = value4;
|
||||
while (true) {
|
||||
value5 = r2.value;
|
||||
if (hasAtLeastOneGPlaySynced(value5)) {
|
||||
items.push(value5);
|
||||
}
|
||||
value6 = value3();
|
||||
if (value6.done) {
|
||||
break;
|
||||
}
|
||||
r2 = value6;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
return items;
|
||||
};
|
||||
exports.filterHiddenCategories = function(a0) {
|
||||
return a0.filter(_fun78684);
|
||||
};
|
||||
exports.createOrbProfileBadge = function() {
|
||||
var object = {};
|
||||
object.id = require(dependencyMap[6]).OrbBadges.ORB_PROFILE_BADGE;
|
||||
object.icon = require(dependencyMap[6]).OrbBadges.ORB_PROFILE_BADGE;
|
||||
object.iconSrc = importDefault(dependencyMap[7]);
|
||||
object.description = '';
|
||||
object.isPreviewMode = true;
|
||||
return object;
|
||||
};
|
||||
}
|
||||
|
||||
function _createForOfIteratorHelperLoose_78673(a0, a1) { // fn#78673, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10252:143, offset: 0x01e314b8, 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 _fun78674;
|
||||
}
|
||||
value = undefined;
|
||||
if (a0) {
|
||||
if (typeof a0 === 'string') {
|
||||
value = _arrayLikeToArray_78675(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_78675(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
||||
if (regexp.test(r9)) {
|
||||
value = _arrayLikeToArray_78675(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
r6 = value;
|
||||
}
|
||||
}
|
||||
r5 = r6;
|
||||
}
|
||||
} else {
|
||||
r5 = value;
|
||||
}
|
||||
if (r5) {
|
||||
if (r5) {
|
||||
}
|
||||
return _fun78674;
|
||||
}
|
||||
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 extractPriceByPurchaseTypes_78676(a0, a1) { // fn#78676, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10252:1085, offset: 0x01e3162c, size: 225 bytes, params: 3, frame: 17
|
||||
var getProduct;
|
||||
var googleSkuIds;
|
||||
var value;
|
||||
const value2 = undefined;
|
||||
const billingPlatformUtilsModule = require(3815) /* metro dependency 3815: BillingPlatformUtils */;
|
||||
if (billingPlatformUtilsModule.isGooglePlayBillingSupported()) {
|
||||
if (a1 === PriceSetAssignmentPurchaseTypes.MOBILE) {
|
||||
value = importDefault(5140) /* metro dependency 5140: IAPStoreAndroid */;
|
||||
getProduct = value.getProduct;
|
||||
googleSkuIds = a0.googleSkuIds;
|
||||
value = Reflect.apply(getProduct, value, [googleSkuIds == null ? value2 : googleSkuIds[a1]]);
|
||||
return value != null ? {amount: value.price, currency: value.currencyCode, priceString: value.priceString,
|
||||
tax: 0,
|
||||
taxInclusive: false} : value2;
|
||||
}
|
||||
if (a1 !== PriceSetAssignmentPurchaseTypes.MOBILE_PREMIUM_TIER_2) {
|
||||
return null;
|
||||
}
|
||||
value = importDefault(5140) /* metro dependency 5140: IAPStoreAndroid */;
|
||||
getProduct = value.getProduct;
|
||||
googleSkuIds = a0.googleSkuIds;
|
||||
value = Reflect.apply(getProduct, value, [googleSkuIds == null ? value2 : googleSkuIds[a1]]);
|
||||
return value != null ? {amount: value.price, currency: value.currencyCode, priceString: value.priceString,
|
||||
tax: 0,
|
||||
taxInclusive: false} : value2;
|
||||
}
|
||||
return (require(5134) /* metro dependency 5134: CollectiblesUtils */).extractPriceByPurchaseTypes(a0, a1);
|
||||
}
|
||||
|
||||
function isGPlaySynced(a0) { // fn#78677, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10252:1434, offset: 0x01e3170d, size: 205 bytes, params: 2, frame: 18
|
||||
const value2 = undefined;
|
||||
const collectiblesProductUtilsModule = require(5133) /* metro dependency 5133: CollectiblesProductUtils */;
|
||||
const getIsVariantProduct = collectiblesProductUtilsModule.getIsVariantProduct;
|
||||
if (Reflect.apply(getIsVariantProduct, collectiblesProductUtilsModule, [a0])) {
|
||||
return a0.variants.every(function(a0) {
|
||||
return isGPlaySynced(a0);
|
||||
});
|
||||
}
|
||||
const defaultImport = importDefault(5140) /* metro dependency 5140: IAPStoreAndroid */;
|
||||
let getProduct = defaultImport.getProduct;
|
||||
let googleSkuIds = a0.googleSkuIds;
|
||||
const value3 = Reflect.apply(getProduct, defaultImport,
|
||||
[googleSkuIds == null ? value2 : googleSkuIds[PriceSetAssignmentPurchaseTypes.MOBILE]]);
|
||||
const defaultImport2 = defaultImport;
|
||||
getProduct = defaultImport2.getProduct;
|
||||
googleSkuIds = a0.googleSkuIds;
|
||||
return value3 != null && Reflect.apply(getProduct, defaultImport2,
|
||||
[googleSkuIds == null ? value2 : googleSkuIds[PriceSetAssignmentPurchaseTypes.MOBILE_PREMIUM_TIER_2]]) != null;
|
||||
}
|
||||
|
||||
function hasAtLeastOneGPlaySynced({products}) { // fn#78679, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10252:1729, offset: 0x01e317da, size: 41 bytes, params: 2, frame: 11
|
||||
return products.filter(function(a0) {
|
||||
return isGPlaySynced(a0);
|
||||
}).length > 0;
|
||||
}
|
||||
|
||||
function getFormattedPriceForCollectiblesProduct_78681(a0, a1, a2) { // fn#78681, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10252:1909, offset: 0x01e31803, size: 148 bytes, params: 4, frame: 15
|
||||
var r0;
|
||||
var r1;
|
||||
var value;
|
||||
const value2 = extractPriceByPurchaseTypes_78676(a0,
|
||||
a2 ? a1 ? PriceSetAssignmentPurchaseTypes.MOBILE_PREMIUM_TIER_2 : PriceSetAssignmentPurchaseTypes.MOBILE : a1 ? PriceSetAssignmentPurchaseTypes.PREMIUM_TIER_2 : PriceSetAssignmentPurchaseTypes.DEFAULT);
|
||||
const value3 = null;
|
||||
if (value3 == value2) {
|
||||
r0 = value3;
|
||||
} else {
|
||||
if (value3 != value2.priceString) {
|
||||
r1 = value2.priceString;
|
||||
} else {
|
||||
value = require(5137) /* metro dependency 5137: PriceUtils */;
|
||||
value = value.formatPrice(value2.amount, value2.currency);
|
||||
r1 = value;
|
||||
}
|
||||
r0 = r1;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function filterHiddenCategories(a0) { // fn#78683, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10252:2440, offset: 0x01e318f9, size: 24 bytes, params: 2, frame: 11
|
||||
return a0.filter(function(a0) {
|
||||
var r0;
|
||||
var unpublishedAt;
|
||||
var value2;
|
||||
var value = a0.unpublishedAt == null;
|
||||
if (value) {
|
||||
r0 = value;
|
||||
} else {
|
||||
unpublishedAt = a0.unpublishedAt;
|
||||
value2 = new global.Date();
|
||||
value2 = unpublishedAt > value2;
|
||||
r0 = value2;
|
||||
}
|
||||
r0 = r0 && a0.products.length > 0;
|
||||
return r0;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,106 @@
|
||||
/* Metro module 14080; source: modules/collectibles/native/DebugLogView.tsx; dependencies: [31, 27, 4649, 5144, 33, 4501, 697, 566, 4573, 2] */
|
||||
function _fun106697(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#106697, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14277:6, offset: 0x022e7395, size: 382 bytes, params: 8, frame: 21
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_3 = value.View;
|
||||
const env0_4 = value.ScrollView;
|
||||
const env0_5 = value.TouchableOpacity;
|
||||
const devSettingsStore = importDefault(4649) /* metro dependency 4649: DevSettingsStore */;
|
||||
value = require(5144) /* metro dependency 5144: CollectiblesDebugStore */;
|
||||
const env0_7 = value.useCollectiblesDebugStore;
|
||||
const env0_8 = value.addDebugLog;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_9 = value.jsxs;
|
||||
const env0_10 = value.jsx;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
const object = {'backgroundColor': '#ff0000', 'paddingHorizontal': 8, 'paddingVertical': 2};
|
||||
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
|
||||
const env0_11 = Reflect.apply(createStyles, value, [{debugLogContainer: {'backgroundColor': 'rgba(0, 0, 0, 0.8)',
|
||||
'padding': 10, 'maxHeight': 350, 'width': '100%', 'position': 'absolute', 'bottom': 0, 'left': 0, 'right': 0,
|
||||
'zIndex': 9999, 'borderTopWidth': 1, 'borderTopColor': '#ff0000'}, debugLogHeader: {'flexDirection': 'row',
|
||||
'justifyContent': 'space-between', 'alignItems': 'center', 'marginBottom': 5},
|
||||
debugLogText: {'color': '#00ff00', 'fontSize': 12, 'marginBottom': 2, 'fontFamily': 'monospace'},
|
||||
clearButton: object, clearButtonText: {'color': '#ffffff', 'fontSize': 10, 'fontWeight': 'bold'}}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/DebugLogView.tsx');
|
||||
exports.default = _default_106698;
|
||||
}
|
||||
|
||||
function _default_106698() { // fn#106698, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14277:838, offset: 0x022e7513, size: 521 bytes, params: 1, frame: 27
|
||||
var slice;
|
||||
var Math;
|
||||
var max;
|
||||
var value4;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
var object;
|
||||
var items2;
|
||||
const value2 = useCollectiblesDebugStore(function(a0) {
|
||||
return a0.logs;
|
||||
});
|
||||
const env0_1 = useCollectiblesDebugStore(function(a0) {
|
||||
return a0.clearLogs;
|
||||
});
|
||||
const styles = useStyles();
|
||||
const env0_2 = styles;
|
||||
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([DevSettingsStore], function() {
|
||||
return DevSettingsStore.get('shop_show_debug_overlay');
|
||||
});
|
||||
const binding = env0_2;
|
||||
const useEffect = binding.useEffect;
|
||||
let length = value2.length;
|
||||
Reflect.apply(useEffect, binding, [_fun106702, [length, value3]]);
|
||||
if (value3) {
|
||||
length = value2.length;
|
||||
if (length === 0) {
|
||||
return null;
|
||||
}
|
||||
slice = value2.slice;
|
||||
Math = global.Math;
|
||||
max = Math.max;
|
||||
length = value2.length;
|
||||
value4 = Reflect.apply(slice, value2, [Reflect.apply(max, Math, [0, length - 10])]);
|
||||
var viewBindingProps = {style: styles.debugLogContainer};
|
||||
var viewBindingProps2 = {style: styles.debugLogHeader};
|
||||
object = {};
|
||||
copyDataProperties(object, styles.debugLogText, undefined);
|
||||
object['color'] = '#ffffff';
|
||||
length = value2.length;
|
||||
items2 = [<Text variant="text-xs/normal" style={object}>{'Debug Log ('}{length}{' entries)'}</Text>];
|
||||
items2[1] = <TouchableOpacity onPress={onPress_106703} style={styles.clearButton}><Text variant="text-xs/bold" style={styles.clearButtonText}>{'Clear'}</Text></TouchableOpacity>;
|
||||
return (
|
||||
<View {...viewBindingProps}>
|
||||
<View {...viewBindingProps2}>
|
||||
{items2}
|
||||
</View>
|
||||
<ScrollView>
|
||||
{value4.map(_fun106704)}
|
||||
</ScrollView>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function _fun106702() { // fn#106702, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14277:981, offset: 0x022e774b, size: 52 bytes, params: 1, frame: 11
|
||||
if (env0_0.length === 0 && env0_3) {
|
||||
value = environment.__proto__;
|
||||
addDebugLog('Debug log initialized');
|
||||
}
|
||||
}
|
||||
|
||||
function _fun106704(a0, a1) { // fn#106704, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14277:1491, offset: 0x022e777f, size: 82 bytes, params: 3, frame: 15
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return (
|
||||
<Text
|
||||
variant="text-xs/normal"
|
||||
style={styles.debugLogText}
|
||||
key={a1}
|
||||
>
|
||||
{a0}
|
||||
</Text>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,112 @@
|
||||
/* Metro module 8415; source: modules/collectibles/native/EditCollectiblesPickerList.tsx; dependencies: [57, 31, 27, 33, 4501, 8409, 4573, 22, 8416, 2] */
|
||||
function _fun66844(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66844, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8600:6, offset: 0x01c0c897, size: 329 bytes, params: 8, frame: 21
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importDefault(57) /* metro dependency 57 */;
|
||||
const value = importAll(31) /* metro dependency 31 */;
|
||||
const value2 = require(27) /* metro dependency 27 */;
|
||||
const env0_4 = value2.ActivityIndicator;
|
||||
const env0_5 = value2.View;
|
||||
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
const GUTTER_SIZE = (require(8409) /* metro dependency 8409: useCollectibleListLayout */).GUTTER_SIZE;
|
||||
const env0_7 = Reflect.apply(createStyles, createStylesModule, [{list: {'flex': 1, 'marginTop': 12},
|
||||
listContent: {paddingBottom: 88}, loadingContainer: {'paddingVertical': 80, 'alignItems': 'center'},
|
||||
header: {'paddingHorizontal': null, 'paddingTop': 10, 'paddingBottom': 5, paddingHorizontal: GUTTER_SIZE}}]);
|
||||
const env0_8 = value.memo(_fun66845);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/EditCollectiblesPickerList.tsx');
|
||||
exports.EditCollectiblesPickerList = EditCollectiblesPickerList;
|
||||
}
|
||||
|
||||
function _fun66845({header}) { // fn#66845, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8600:400, offset: 0x01c0c9e0, size: 102 bytes, params: 2, frame: 17
|
||||
const styles = useStyles();
|
||||
const Heading = (require(4573) /* metro dependency 4573: Text */).Heading;
|
||||
return (
|
||||
<View style={styles.header}>
|
||||
<Heading variant="heading-sm/medium" color="mobile-text-heading-primary">
|
||||
{header}
|
||||
</Heading>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function EditCollectiblesPickerList({sections, selectedSkuId, renderRow, estimatedItemSize, isFetching, contentContainerStyle}) { // fn#66846, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8600:689, offset: 0x01c0ca46, size: 512 bytes, params: 2, frame: 27
|
||||
var object2;
|
||||
const env0_2 = renderRow;
|
||||
isFetching = !(isFetching === undefined) && isFetching;
|
||||
const env0_3 = isFetching;
|
||||
const styles = useStyles();
|
||||
let binding = env0_3;
|
||||
const [property, env0_4] = env0_2(binding.useState(0), 2);
|
||||
const value5 = binding.useCallback(_fun66847, []);
|
||||
const r2 = property > 0 ? (property - 4 * (require(8409) /* metro dependency 8409: useCollectibleListLayout */).GUTTER_SIZE) / (require(8409) /* metro dependency 8409: useCollectibleListLayout */).ROW_SIZE : 0;
|
||||
binding = env0_3;
|
||||
const value8 = binding.useMemo(function() {
|
||||
var isFetchingBinding = isFetching;
|
||||
var items = [];
|
||||
if (!isFetchingBinding) {
|
||||
var env0_0 = items;
|
||||
sections.forEach(_fun66849);
|
||||
}
|
||||
return items;
|
||||
}, [sections, isFetching]);
|
||||
const value9 = binding.useCallback(_fun66851, [renderRow, r2, selectedSkuId]);
|
||||
const value10 = binding.useCallback(function(a0) {
|
||||
return a0.type;
|
||||
}, []);
|
||||
const value11 = binding.useCallback(function(a0) {
|
||||
return a0.key;
|
||||
}, []);
|
||||
object2 = {};
|
||||
if (isFetching) {
|
||||
object2.style = styles.loadingContainer;
|
||||
object2.children = <ActivityIndicator animating size="large" />;
|
||||
} else {
|
||||
object2.style = styles.list;
|
||||
object2.children = ((BottomSheetFlashList) => <BottomSheetFlashList data={value8} renderItem={value9} getItemType={value10} keyExtractor={value11} extraData={selectedSkuId} estimatedItemSize={estimatedItemSize} contentContainerStyle={contentContainerStyle ?? styles.listContent} onLayout={value5} keyboardShouldPersistTaps="always" />)((require(8416) /* metro dependency 8416: flashList */).BottomSheetFlashList);
|
||||
}
|
||||
return <View {...object2} />;
|
||||
}
|
||||
|
||||
function _fun66847({nativeEvent}) { // fn#66847, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8600:893, offset: 0x01c0cc46, size: 36 bytes, params: 2, frame: 11
|
||||
env0_4(nativeEvent.layout.width);
|
||||
}
|
||||
|
||||
function _fun66848() { // fn#66848, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8600:1003, offset: 0x01c0cc6a, size: 45 bytes, params: 1, frame: 12
|
||||
if (!isFetching) {
|
||||
sections.forEach(_fun66849);
|
||||
}
|
||||
return [];
|
||||
}
|
||||
|
||||
function _fun66851({item}) { // fn#66851, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8600:1267, offset: 0x01c0cd8f, size: 99 bytes, params: 2, frame: 14
|
||||
var r0;
|
||||
var value;
|
||||
if (item.type === 'header') {
|
||||
value = environment.__proto__;
|
||||
value = ((Component) => <Component header={item.header} />)(env1_8);
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = renderRow({items: item.items, size: env0_5, selectedSkuId: selectedSkuId});
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun66849(a0) { // fn#66849, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8600:1049, offset: 0x01c0cc97, size: 159 bytes, params: 2, frame: 17
|
||||
var environment;
|
||||
const env0_0 = a0;
|
||||
env0_0.push({type: 'header', key: 'header-' + a0.section, header: a0.header});
|
||||
let value = environment.__proto__.__proto__;
|
||||
const chunk = (require(22) /* metro dependency 22 */).chunk;
|
||||
const items2 = a0.items;
|
||||
const ROW_SIZE = (require(8409) /* metro dependency 8409: useCollectibleListLayout */).ROW_SIZE;
|
||||
value = Reflect.apply(chunk, value, [items2, ROW_SIZE]);
|
||||
value.forEach(_fun66850);
|
||||
}
|
||||
|
||||
function _fun66850(a0, a1) { // fn#66850, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8600:1168, offset: 0x01c0cd36, size: 89 bytes, params: 3, frame: 18
|
||||
env1_0.push({type: 'row', key: 'row-' + env0_0.section + '-' + a1, items: a0});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
/* Metro module 14068; source: modules/collectibles/native/FeaturedBlock.tsx; dependencies: [31, 27, 33, 697, 4501, 10023, 14069, 6771, 6789, 2] */
|
||||
function _fun106654(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#106654, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14265:6, offset: 0x022e4be7, size: 285 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 env0_3 = (require(27) /* metro dependency 27 */).View;
|
||||
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
const env0_5 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {'display': 'flex',
|
||||
'width': '100%', 'flexDirection': 'row', 'flexWrap': 'wrap', gap: PX_12, paddingHorizontal: PX_16},
|
||||
featuredSubblock: {'flex': 1, 'flexBasis': 400, 'maxWidth': '100%'}});
|
||||
const Subblocks = function({featuredBlock, style}) {
|
||||
featuredBlock = featuredBlock.subblocks;
|
||||
return featuredBlock.map(_fun106656);
|
||||
};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/FeaturedBlock.tsx');
|
||||
exports.default = _default_106657;
|
||||
}
|
||||
|
||||
function Subblocks({featuredBlock, style}) { // fn#106655, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14265:371, offset: 0x022e4d04, size: 45 bytes, params: 2, frame: 11
|
||||
return featuredBlock.subblocks.map(_fun106656);
|
||||
}
|
||||
|
||||
function _default_106657({featuredBlock}) { // fn#106657, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14265:563, offset: 0x022e4dad, size: 164 bytes, params: 2, frame: 19
|
||||
const styles = useStyles();
|
||||
const defaultImport = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
|
||||
const COLLECTIBLES_SHOP_FEATURED_BLOCK = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).COLLECTIBLES_SHOP_FEATURED_BLOCK;
|
||||
const analyticsLocations = defaultImport(COLLECTIBLES_SHOP_FEATURED_BLOCK).analyticsLocations;
|
||||
const AnalyticsLocationProvider = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider;
|
||||
return (
|
||||
<AnalyticsLocationProvider value={analyticsLocations}>
|
||||
<View style={styles.container}>
|
||||
<Subblocks featuredBlock={featuredBlock} style={styles.featuredSubblock} />
|
||||
</View>
|
||||
</AnalyticsLocationProvider>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun106656(a0, a1) { // fn#106656, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14265:417, offset: 0x022e4d31, size: 124 bytes, params: 3, frame: 20
|
||||
const value = environment.__proto__;
|
||||
const CollectiblesAnalyticsProvider = (require(10023) /* metro dependency 10023: CollectiblesAnalyticsContext */).CollectiblesAnalyticsProvider;
|
||||
return (
|
||||
<CollectiblesAnalyticsProvider newValue={{tilePosition: a1}} key={a1}>
|
||||
<View style={style}>
|
||||
{((Component) => <Component subblock={a0} />)(importDefault(14069) /* metro dependency 14069: FeaturedCategorySubblock */)}
|
||||
</View>
|
||||
</CollectiblesAnalyticsProvider>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,111 @@
|
||||
/* Metro module 14069; source: modules/collectibles/native/FeaturedCategorySubblock.tsx; dependencies: [31, 27, 5121, 663, 661, 33, 4501, 1484, 10023, 566, 10154, 10155, 5278, 1244, 697, 683, 5120, 6789, 5134, 8413, 2] */
|
||||
function _fun106658(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#106658, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14266:6, offset: 0x022e4e51, size: 319 bytes, params: 8, frame: 20
|
||||
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 */).Image;
|
||||
const collectiblesCategoryStore = importDefault(5121) /* metro dependency 5121: CollectiblesCategoryStore */;
|
||||
const env0_5 = (require(663) /* metro dependency 663: CollectiblesShopConstants */).CollectiblesMobileShopScreen;
|
||||
let value = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_6 = value.AnalyticEvents;
|
||||
const env0_7 = value.UserSettingsSections;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_8 = value.jsx;
|
||||
const env0_9 = value.jsxs;
|
||||
const env0_10 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {position: 'relative'},
|
||||
bannerImage: {'width': '100%', 'aspectRatio': 2.237580993520518, 'resizeMode': 'contain'},
|
||||
limitedTimeBadge: {'position': 'absolute', 'bottom': '68%', 'left': '3%', 'zIndex': 1}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/FeaturedCategorySubblock.tsx');
|
||||
exports.default = _default_106659;
|
||||
}
|
||||
|
||||
function _default_106659({subblock}) { // fn#106659, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14266:466, offset: 0x022e4f90, size: 660 bytes, params: 2, frame: 32
|
||||
var r11;
|
||||
var date;
|
||||
const styles = useStyles();
|
||||
const env0_1 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
|
||||
const env0_2 = (require(10023) /* metro dependency 10023: CollectiblesAnalyticsContext */).useCollectiblesAnalyticsContext();
|
||||
const assetUrl = subblock.assetUrl;
|
||||
const categoryByStoreListingId = (require(566) /* metro dependency 566: flux */).useStateFromStores([CollectiblesCategoryStore],
|
||||
function() {
|
||||
return CollectiblesCategoryStore.getCategoryByStoreListingId(subblock.categoryStoreListingId);
|
||||
});
|
||||
const useTrackProductCardImpressionModule = require(10154) /* metro dependency 10154: useTrackProductCardImpression */;
|
||||
const useTrackProductCardImpression = useTrackProductCardImpressionModule.useTrackProductCardImpression;
|
||||
const handleCardVisibilityChange = Reflect.apply(useTrackProductCardImpression, useTrackProductCardImpressionModule,
|
||||
[subblock.categoryStoreListingId, 'mobile_home', 'featured_block']).handleCardVisibilityChange;
|
||||
const r2 = subblock.unpublishedAt ?? categoryByStoreListingId?.unpublishedAt;
|
||||
if (r2 != null) {
|
||||
date = new global.Date(r2);
|
||||
} else {
|
||||
r11 = null;
|
||||
}
|
||||
const VisibilitySensor = importDefault(10155) /* metro dependency 10155: VisibilitySensor */;
|
||||
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
||||
const object = {'accessibilityRole': 'button', 'accessibilityLabel': null, 'accessibilityHint': null,
|
||||
'activeOpacity': 0.8, 'androidRippleConfig': null, 'hitSlop': 8};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const formatToPlainString = intl.formatToPlainString;
|
||||
const FNtLb3 = (require(1244) /* metro dependency 1244: indexNative */).t.FNtLb3;
|
||||
object.accessibilityLabel = Reflect.apply(formatToPlainString, intl, [FNtLb3, {category: subblock.name}]);
|
||||
const string = intl.string;
|
||||
const F8ma9x = (require(1244) /* metro dependency 1244: indexNative */).t.F8ma9x;
|
||||
object.accessibilityHint = Reflect.apply(string, intl, [F8ma9x]);
|
||||
const object3 = {};
|
||||
object3.radius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
||||
object.androidRippleConfig = object3;
|
||||
object.onPress = onPress_106661;
|
||||
object.style = styles.container;
|
||||
const items2 = [assetUrl != null && <Image source={{uri: assetUrl}} style={styles.bannerImage} />];
|
||||
items2[1] = (require(5134) /* metro dependency 5134: CollectiblesUtils */).shouldShowLimitedTimeBadge(r11) && ((LimitedTimeBadge) => <LimitedTimeBadge style={styles.limitedTimeBadge} />)((require(8413) /* metro dependency 8413: CollectiblesBadges */).LimitedTimeBadge);
|
||||
return (
|
||||
<VisibilitySensor onChange={handleCardVisibilityChange}>
|
||||
<PressableOpacity {...object}>
|
||||
{items2}
|
||||
</PressableOpacity>
|
||||
</VisibilitySensor>
|
||||
);
|
||||
}
|
||||
|
||||
function _default_106659OnPress() { // fn#106661, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14266:1212, owner: _default_106659.onPress, offset: 0x022e5247, size: 395 bytes, params: 1, frame: 20
|
||||
var binding;
|
||||
var moduleValue;
|
||||
var openCollectiblesShopMobile;
|
||||
var COLLECTIBLES_SHOP;
|
||||
const value2 = undefined;
|
||||
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
const track = defaultImport.track;
|
||||
const COLLECTIBLES_SHOP_ELEMENT_CLICKED = AnalyticEvents.COLLECTIBLES_SHOP_ELEMENT_CLICKED;
|
||||
let object2 = {};
|
||||
object2.collectibles_shop_session_id = env0_2 == null ? value2 : env0_2.sessionId;
|
||||
object2.sku_id = subblock.categoryStoreListingId;
|
||||
object2.page_type = 'mobile_home';
|
||||
object2.page_section = env0_2 == null ? value2 : env0_2.pageSection;
|
||||
object2.page_category = env0_2 == null ? value2 : env0_2.pageCategory;
|
||||
object2.tile_type = 'FEATURED_BLOCK';
|
||||
const String = global.String;
|
||||
object2.tile_position = String(env0_2 == null ? value2 : env0_2.tilePosition);
|
||||
object2.cta_name = null;
|
||||
Reflect.apply(track, defaultImport, [COLLECTIBLES_SHOP_ELEMENT_CLICKED, object2]);
|
||||
if (categoryByStoreListingId != null) {
|
||||
if (categoryByStoreListingId.isOrbsExclusive) {
|
||||
moduleValue = require(5120) /* metro dependency 5120: CollectiblesActionCreators */;
|
||||
openCollectiblesShopMobile = moduleValue.openCollectiblesShopMobile;
|
||||
object2 = {};
|
||||
COLLECTIBLES_SHOP = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).COLLECTIBLES_SHOP;
|
||||
object2.analyticsLocations = [COLLECTIBLES_SHOP];
|
||||
COLLECTIBLES_SHOP = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).COLLECTIBLES_SHOP;
|
||||
object2.analyticsSource = COLLECTIBLES_SHOP;
|
||||
object2.screen = CollectiblesMobileShopScreen.ORBS;
|
||||
Reflect.apply(openCollectiblesShopMobile, moduleValue, [object2]);
|
||||
} else {
|
||||
binding = env0_1;
|
||||
binding.push(UserSettingsSections.COLLECTIBLES_SHOP_VIEW_ALL_CATEGORY_ITEMS,
|
||||
{category: categoryByStoreListingId,
|
||||
analyticsContext: env0_2});
|
||||
}
|
||||
}
|
||||
return value2;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
/* Metro module 14065; source: modules/collectibles/native/FeaturedFirstCardCoachmarkAnchor.tsx; dependencies: [31, 27, 33, 14066, 2] */
|
||||
function _fun106633(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#106633, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14262:6, offset: 0x022e383c, size: 168 bytes, params: 8, frame: 18
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(27) /* metro dependency 27 */).View;
|
||||
const value = require(33) /* metro dependency 33 */;
|
||||
const env0_4 = value.jsx;
|
||||
const env0_5 = value.jsxs;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/FeaturedFirstCardCoachmarkAnchor.tsx');
|
||||
exports.default = FeaturedFirstCardCoachmarkAnchor;
|
||||
}
|
||||
|
||||
function FeaturedFirstCardCoachmarkAnchor({children}) { // fn#106634, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14262:256, offset: 0x022e38e4, size: 146 bytes, params: 2, frame: 19
|
||||
const value2 = env0_2.useRef(null);
|
||||
return (
|
||||
<View collapsable={false}>
|
||||
<View
|
||||
ref={value2}
|
||||
style={{'position': 'absolute', 'top': 0, 'right': 6, 'width': 32, 'height': 32}}
|
||||
collapsable={false}
|
||||
/>
|
||||
{children}
|
||||
{((Component) => <Component anchorRef={value2} />)(importDefault(14066) /* metro dependency 14066: WishlistButtonCoachmark */)}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,181 @@
|
||||
/* Metro module 14070; source: modules/collectibles/native/FeedBlock.tsx; dependencies: [31, 27, 4502, 1310, 5078, 663, 661, 33, 4501, 697, 566, 4002, 14058, 14071, 14049, 5120, 6789, 6771, 1244, 4573, 5278, 4080, 14072, 1962, 4068, 4578, 14062, 14073, 477, 7601, 14074, 5475, 14075, 14076, 2] */
|
||||
function _fun106662(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#106662, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14267:6, offset: 0x022e53d2, size: 537 bytes, params: 8, frame: 22
|
||||
var object2;
|
||||
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.Image;
|
||||
const env0_5 = value.View;
|
||||
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
|
||||
const themeStore = importDefault(1310) /* metro dependency 1310: ThemeStore */;
|
||||
const consentStore = importDefault(5078) /* metro dependency 5078: ConsentStore */;
|
||||
const env0_9 = (require(663) /* metro dependency 663: CollectiblesShopConstants */).CollectiblesMobileShopScreen;
|
||||
const env0_10 = (require(661) /* metro dependency 661: Constants */).Consents;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_11 = value.jsx;
|
||||
const env0_12 = 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.feedContainer = {'display': 'flex', 'flexDirection': 'column', 'height': '100%', gap: PX_16};
|
||||
const object4 = {'display': 'flex', 'flexDirection': 'row', 'flexWrap': 'wrap', 'justifyContent': 'space-between',
|
||||
'alignItems': 'center'};
|
||||
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object4.gap = PX_12;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object4.paddingHorizontal = PX_16;
|
||||
object2.feedHeader = object4;
|
||||
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object2.feedTitle = {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center', 'flexShrink': 1, gap: PX_8};
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object2.feedFooter = {'display': 'flex', 'gap': null, 'flexDirection': 'column', 'justifyContent': 'center',
|
||||
'alignItems': 'center', gap: PX_16};
|
||||
object2.feedFooterImage = {'width': '100%', 'resizeMode': 'cover'};
|
||||
object2.feedFooterOrbImage = {'width': '100%', 'alignSelf': 'center', 'resizeMode': 'contain', 'height': 130};
|
||||
const env0_13 = Reflect.apply(createStyles, value, [object2]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/FeedBlock.tsx');
|
||||
exports.default = _default_106663;
|
||||
}
|
||||
|
||||
function _default_106663({feedBlock, screen, preferVCPrice, disableBundleStaticBackground}) { // fn#106663, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14267:911, offset: 0x022e55eb, size: 1576 bytes, params: 2, frame: 41
|
||||
var r18;
|
||||
var r9;
|
||||
var r13;
|
||||
var r12;
|
||||
var PressableOpacity;
|
||||
var object;
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
var object8;
|
||||
var object2;
|
||||
var object3;
|
||||
var value;
|
||||
const styles = useStyles();
|
||||
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ThemeStore], function() {
|
||||
return require(dependencyMap[11]).isThemeDark(ThemeStore.theme);
|
||||
});
|
||||
const {feedProducts, isPersonalized} = env0_3.useMemo(_fun106666, [feedBlock.sortedSkuIds,
|
||||
(importDefault(14058) /* metro dependency 14058: useGetProductsFromSkus */)(),
|
||||
(require(566) /* metro dependency 566: flux */).useStateFromStores([ConsentStore], function() {
|
||||
return ConsentStore.hasConsented(Consents.PERSONALIZATION);
|
||||
})]);
|
||||
const value6 = (require(14049) /* metro dependency 14049: useFilteredAndSortedProducts */).useFilteredAndSortedProducts({products: feedProducts,
|
||||
maxProducts: 36, screen: screen});
|
||||
const closure = function() {
|
||||
var moduleValue = require(dependencyMap[15]);
|
||||
var object = {};
|
||||
var COLLECTIBLES_MOBILE_SHOP_ALL_BUTTON = importDefault(dependencyMap[16]).COLLECTIBLES_MOBILE_SHOP_ALL_BUTTON;
|
||||
object.analyticsLocations = [COLLECTIBLES_MOBILE_SHOP_ALL_BUTTON];
|
||||
object.analyticsSource = importDefault(dependencyMap[16]).COLLECTIBLES_MOBILE_SHOP_ALL_BUTTON;
|
||||
object.screen = CollectiblesMobileShopScreen.SHOP_ALL;
|
||||
moduleValue.openCollectiblesShopMobile(object);
|
||||
};
|
||||
const ORBS = CollectiblesMobileShopScreen.ORBS;
|
||||
const value7 = screen === ORBS;
|
||||
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
|
||||
function() {
|
||||
return AccessibilityStore.useReducedMotion;
|
||||
});
|
||||
const defaultImport = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
|
||||
const COLLECTIBLES_SHOP_POPULAR_PICKS = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).COLLECTIBLES_SHOP_POPULAR_PICKS;
|
||||
const analyticsLocations = defaultImport(COLLECTIBLES_SHOP_POPULAR_PICKS).analyticsLocations;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let string = intl.string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const r15 = isPersonalized ? Reflect.apply(string, intl, [t.NSv5KV]) : Reflect.apply(string, intl, [t.ivaAA7]);
|
||||
const AnalyticsLocationProvider = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider;
|
||||
const Heading = (require(4573) /* metro dependency 4573: Text */).Heading;
|
||||
const heading = <Heading variant="heading-lg/semibold">{r15}</Heading>;
|
||||
if (isPersonalized) {
|
||||
PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
||||
object = {onPress: onPress_106669, hitSlop: 14};
|
||||
object['aria-label'] = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.hvVgAZ);
|
||||
r18 = <PressableOpacity {...object}>{((CircleInformationIcon) => <CircleInformationIcon size="xs" />)((require(4068) /* metro dependency 4068: CircleInformationIcon */).CircleInformationIcon)}</PressableOpacity>;
|
||||
} else {
|
||||
r18 = isPersonalized;
|
||||
}
|
||||
const view = <View style={styles.feedTitle}>{heading}{r18}</View>;
|
||||
if (value7) {
|
||||
r9 = !value7;
|
||||
} else {
|
||||
r9 = <Button onPress={closure} text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.xFcotU)} variant="primary" size="sm" />;
|
||||
}
|
||||
const items3 = [<View style={styles.feedHeader}>{view}{r9}</View>];
|
||||
items3[1] = ((Component) => <Component products={value6} loadingCardsNum={36} preferVCPrice={preferVCPrice} accessibilityLabel={r15} disableBundleStaticBackground={disableBundleStaticBackground} />)(importDefault(14062) /* metro dependency 14062: FeedProductList */);
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
string = intl.string;
|
||||
const Yr70c4 = (require(1244) /* metro dependency 1244: indexNative */).t.Yr70c4;
|
||||
const items4 = [<Text variant="heading-lg/bold" accessibilityRole="header">{Reflect.apply(string, intl,
|
||||
[Yr70c4])}</Text>];
|
||||
string = intl.string;
|
||||
const AfrvRD = (require(1244) /* metro dependency 1244: indexNative */).t.AfrvRD;
|
||||
items4[1] = <Button onPress={closure} text={Reflect.apply(string, intl, [AfrvRD])} variant="primary" size="md" />;
|
||||
if (value7) {
|
||||
if (useReducedMotion) {
|
||||
object3 = {};
|
||||
object3.uri = importDefault(14073) /* metro dependency 14073: orb_coachmark_asset_2xPng */;
|
||||
r13 = <Image source={object3} style={styles.feedFooterOrbImage} accessibilityElementsHidden importantForAccessibility="no-hide-descendants" />;
|
||||
} else if ((require(477) /* metro dependency 477: PlatformUtils */).isAndroid()) {
|
||||
value = importDefault(7601) /* metro dependency 7601: APNGDecorationNativeComponent */;
|
||||
value = ((Component) => <Component url={importDefault(14074) /* metro dependency 14074: orb_coachmark_asset_2x_animatedPng */} autoplay style={styles.feedFooterOrbImage} accessibilityElementsHidden importantForAccessibility="no-hide-descendants" />)(value);
|
||||
r13 = value;
|
||||
} else {
|
||||
value = importDefault(5475) /* metro dependency 5475: FastImage */;
|
||||
value = ((Component) => <Component source={{uri: importDefault(14074) /* metro dependency 14074: orb_coachmark_asset_2x_animatedPng */}} enableAnimation resizeMode="contain" style={styles.feedFooterOrbImage} accessibilityElementsHidden importantForAccessibility="no-hide-descendants" />)(value);
|
||||
r13 = value;
|
||||
}
|
||||
r12 = r13;
|
||||
} else {
|
||||
object2 = {};
|
||||
if (value2) {
|
||||
object2.source = require(14075) /* metro dependency 14075 */;
|
||||
object2.style = styles.feedFooterImage;
|
||||
object2.accessibilityElementsHidden = true;
|
||||
object2.importantForAccessibility = 'no-hide-descendants';
|
||||
} else {
|
||||
object2.source = require(14076) /* metro dependency 14076 */;
|
||||
object2.style = styles.feedFooterImage;
|
||||
object2.accessibilityElementsHidden = true;
|
||||
object2.importantForAccessibility = 'no-hide-descendants';
|
||||
}
|
||||
r12 = <Image {...object2} />;
|
||||
}
|
||||
items4[2] = r12;
|
||||
items3[2] = <View style={styles.feedFooter}>{items4}</View>;
|
||||
return (
|
||||
<AnalyticsLocationProvider value={analyticsLocations}>
|
||||
<View style={styles.feedContainer}>
|
||||
{items3}
|
||||
</View>
|
||||
</AnalyticsLocationProvider>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun106666() { // fn#106666, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14267:1168, offset: 0x022e5c61, size: 186 bytes, params: 1, frame: 17
|
||||
const ShopHomeSortType = (require(14071) /* metro dependency 14071: ShopHomeSortType */).ShopHomeSortType;
|
||||
let sortedSkuIds = feedBlock.sortedSkuIds;
|
||||
const value2 = undefined;
|
||||
let r5 = sortedSkuIds == null ? value2 : sortedSkuIds[ShopHomeSortType.RECOMMENDED];
|
||||
r5 = r5 ?? [];
|
||||
sortedSkuIds = feedBlock.sortedSkuIds;
|
||||
let r3 = sortedSkuIds == null ? value2 : sortedSkuIds[ShopHomeSortType.POPULAR];
|
||||
r3 = r3 ?? [];
|
||||
const r1 = env0_1 && r5.length > 0;
|
||||
const object2 = {};
|
||||
r3 = r1 ? r5 : r3;
|
||||
object2.feedProducts = env0_2(r3);
|
||||
object2.isPersonalized = r1;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _default_106663OnPress_106669() { // fn#106669, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14267:2262, owner: _default_106663.onPress, offset: 0x022e5d89, size: 82 bytes, params: 1, frame: 16
|
||||
let value = environment.__proto__;
|
||||
const defaultImport = importDefault(dependencyMap[21]);
|
||||
const openLazy = defaultImport.openLazy;
|
||||
value = require(dependencyMap[23]);
|
||||
value = value(dependencyMap[22], dependencyMap.paths);
|
||||
return Reflect.apply(openLazy, defaultImport, [value, 'PersonalizationDisclaimerActionSheet', {}]);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
/* Metro module 14062; source: modules/collectibles/native/FeedProductList.tsx; dependencies: [31, 27, 33, 4501, 10020, 14063, 14056, 14064, 2] */
|
||||
function _fun106617(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#106617, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14259:6, offset: 0x022e2da7, size: 293 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 env0_3 = (require(27) /* metro dependency 27 */).View;
|
||||
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
const COLLECTIBLES_SHOP_CARD_GAP = (require(10020) /* metro dependency 10020: CollectiblesShopCardV2 */).COLLECTIBLES_SHOP_CARD_GAP;
|
||||
const env0_5 = Reflect.apply(createStyles, createStylesModule, [{skeletonGrid: {'flex': 1, 'alignItems': 'center'},
|
||||
skeletonRow: {flexDirection: 'row', gap: COLLECTIBLES_SHOP_CARD_GAP, paddingBottom: COLLECTIBLES_SHOP_CARD_GAP,
|
||||
paddingHorizontal: COLLECTIBLES_SHOP_CARD_GAP}}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/FeedProductList.tsx');
|
||||
exports.default = FeedProductList;
|
||||
}
|
||||
|
||||
function SkeletonGrid({loadingCardsNum, accessibilityLabel}) { // fn#106618, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14259:390, offset: 0x022e2ecc, size: 196 bytes, params: 2, frame: 19
|
||||
var r1;
|
||||
var value4;
|
||||
const styles = useStyles();
|
||||
const value2 = (require(14063) /* metro dependency 14063: useCardLayout */).useCardLayout();
|
||||
const columns = value2.columns;
|
||||
const env0_3 = value2.cardWidth;
|
||||
const env0_4 = value2.rowWidth;
|
||||
if (0 < loadingCardsNum) {
|
||||
for (r1 = 0; true; r1 = value4) {
|
||||
SkeletonGrid_loop(r1);
|
||||
value4 = r1 + columns;
|
||||
if (!(value4 < loadingCardsNum)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return (
|
||||
<View
|
||||
style={styles.skeletonGrid}
|
||||
accessibilityRole="list"
|
||||
accessibilityLabel={accessibilityLabel}
|
||||
accessibilityState={{busy: true}}
|
||||
accessible
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function FeedProductList(a0) { // fn#106621, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14259:1003, offset: 0x022e30bf, size: 133 bytes, params: 2, frame: 18
|
||||
var r0;
|
||||
var value;
|
||||
const products = a0.products;
|
||||
const loadingCardsNum = a0.loadingCardsNum;
|
||||
const preferVCPrice = a0.preferVCPrice;
|
||||
const accessibilityLabel = a0.accessibilityLabel;
|
||||
if (products.length === 0) {
|
||||
r0 = <SkeletonGrid loadingCardsNum={loadingCardsNum} accessibilityLabel={accessibilityLabel} />;
|
||||
} else {
|
||||
value = importDefault(14064) /* metro dependency 14064: CollectiblesShopCardsGrid */;
|
||||
value = ((Component) => <Component products={products} preferVCPrice={preferVCPrice} accessibilityLabel={accessibilityLabel} disableBundleStaticBackground={a0.disableBundleStaticBackground} />)(value);
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function SkeletonGrid_loop(a0) { // fn#106619, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14259:525, owner: SkeletonGrid._loop, offset: 0x022e2f90, size: 182 bytes, params: 2, frame: 21
|
||||
const env0_0 = a0;
|
||||
const Array = global.Array;
|
||||
const from = Array.from;
|
||||
const object2 = {};
|
||||
const Math = global.Math;
|
||||
object2.length = Math.min(columns, loadingCardsNum - a0);
|
||||
env0_5.push(<View style={[styles.skeletonRow, {width: rowWidth}]} key={'row-' + a0}>{Reflect.apply(from, Array,
|
||||
[object2]).map(_fun106620)}</View>);
|
||||
}
|
||||
|
||||
function _fun106620(a0, a1) { // fn#106620, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14259:585, offset: 0x022e3046, size: 121 bytes, params: 3, frame: 19
|
||||
const SkeletonCard = importDefault(14056) /* metro dependency 14056: SkeletonCard */;
|
||||
const cardWidthBinding = cardWidth;
|
||||
const COLLECTIBLES_SHOP_CARD_GAP = (require(10020) /* metro dependency 10020: CollectiblesShopCardV2 */).COLLECTIBLES_SHOP_CARD_GAP;
|
||||
return (
|
||||
<SkeletonCard
|
||||
width={cardWidthBinding}
|
||||
style={{marginBottom: COLLECTIBLES_SHOP_CARD_GAP}}
|
||||
key={'' + env0_0 + '-' + a1}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,168 @@
|
||||
/* Metro module 10144; source: modules/collectibles/native/FractionalNitroCollectedActionSheet.tsx; dependencies: [31, 27, 661, 1880, 33, 4501, 697, 5475, 10145, 10064, 4048, 5178, 4002, 7316, 7317, 4573, 1244, 1948, 3853, 6275, 7046, 5278, 10139, 4578, 4080, 6515, 2] */
|
||||
function _fun79078(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79078, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10330:6, offset: 0x01e43e5b, size: 627 bytes, params: 8, frame: 25
|
||||
var object2;
|
||||
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.ActivityIndicator;
|
||||
const env0_5 = value.View;
|
||||
const env0_6 = (require(661) /* metro dependency 661: Constants */).HelpdeskArticles;
|
||||
const env0_7 = (require(1880) /* metro dependency 1880: PremiumConstants */).PremiumTypes;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_8 = value.jsx;
|
||||
const env0_9 = value.jsxs;
|
||||
const env0_10 = value.Fragment;
|
||||
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.body = {flex: 1, padding: PX_16};
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object2.content = {'flex': 1, 'gap': null, 'alignItems': 'center', gap: PX_16};
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object2.buttonContainer = {'flex': 1, 'gap': null, 'alignSelf': 'stretch', gap: PX_16};
|
||||
object2.description = {textAlign: 'center'};
|
||||
object2.header = {'height': 112, 'justifyContent': 'center', 'alignItems': 'center', 'overflow': 'hidden'};
|
||||
object2.fractionNitroIcon = {'width': 68, 'height': 68, 'position': 'absolute', 'top': '50%', 'left': '50%',
|
||||
transform: [{translateX: -34}, {translateY: -34}]};
|
||||
const object3 = {'position': 'absolute', 'right': null, 'top': null, 'width': 32, 'height': 32,
|
||||
'backgroundColor': null, 'justifyContent': 'center'};
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object3.right = PX_16;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object3.top = PX_16;
|
||||
const CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT;
|
||||
object3.backgroundColor = CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT;
|
||||
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
||||
object3.alignItems = 'center';
|
||||
object2.questionIconContainer = object3;
|
||||
object2.questionIcon = {'width': 18, 'height': 18};
|
||||
const env0_11 = Reflect.apply(createStyles, value, [object2]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/FractionalNitroCollectedActionSheet.tsx');
|
||||
exports.default = FractionalNitroCollectedActionSheet;
|
||||
}
|
||||
|
||||
function NitroAcquiredHeader() { // fn#79079, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10330:973, offset: 0x01e440ce, size: 157 bytes, params: 1, frame: 22
|
||||
const styles = useStyles();
|
||||
return (
|
||||
<View style={styles.header}>
|
||||
{((Component) => <Component source={importDefault(10145) /* metro dependency 10145 */} />)(importDefault(5475) /* metro dependency 5475: FastImage */)}
|
||||
{((Component) => <Component source={{uri: importDefault(10064) /* metro dependency 10064: mobile_fraction_nitro_2xPng */}} style={styles.fractionNitroIcon} />)(importDefault(5475) /* metro dependency 5475: FastImage */)}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function FractionalNitroCollectedActionSheet({consumed, onPressExplorePerks, onPressViewCredits}) { // fn#79080, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10330:1254, offset: 0x01e4416b, size: 946 bytes, params: 2, frame: 38
|
||||
var r9;
|
||||
var items3;
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
var object;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var items4;
|
||||
const styles = useStyles();
|
||||
const value2 = (importDefault(4048) /* metro dependency 4048: useTheme */)();
|
||||
const value3 = (require(5178) /* metro dependency 5178: CollectiblesUtils */).useFetchFractionalPremiumInfo();
|
||||
const isLoading = value3.isLoading;
|
||||
const isFractionalPremiumActive = value3.isFractionalPremiumActive;
|
||||
const env0_3 = isFractionalPremiumActive;
|
||||
const expiresAt = value3.expiresAt;
|
||||
const binding = env0_3;
|
||||
const value4 = binding.useMemo(_fun79081, [consumed, value2]);
|
||||
const value5 = binding.useMemo(_fun79082, [consumed, expiresAt, isFractionalPremiumActive, styles.description]);
|
||||
const value6 = binding.useCallback(_fun79083, []);
|
||||
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
|
||||
const jsxRuntimeEnv0_10Binding = jsxRuntimeEnv0_10;
|
||||
const r10 = consumed ? ((Component) => <Component premiumType={PremiumTypes.TIER_2} />)(importDefault(7046) /* metro dependency 7046: PremiumPlanActionSheetHeader */) : <NitroAcquiredHeader />;
|
||||
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
||||
const CircleQuestionIcon = (require(10139) /* metro dependency 10139: CircleQuestionIcon */).CircleQuestionIcon;
|
||||
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
|
||||
const items2 = [<>{r10}<PressableOpacity style={styles.questionIconContainer} onPress={value6}><CircleQuestionIcon style={styles.questionIcon} color={WHITE} /></PressableOpacity></>];
|
||||
if (isLoading) {
|
||||
r9 = <ActivityIndicator size="large" />;
|
||||
} else {
|
||||
var viewBinding2Props = {style: styles.content};
|
||||
items3 = [value4, value5];
|
||||
var viewBinding3Props = {style: styles.buttonContainer};
|
||||
object = {size: 'lg'};
|
||||
string = intl.string;
|
||||
if (consumed) {
|
||||
object.text = Reflect.apply(string, intl, [t.ERKK6v]);
|
||||
object.onPress = onPressExplorePerks;
|
||||
} else {
|
||||
object.text = Reflect.apply(string, intl, [t['Jr6N+s']]);
|
||||
object.onPress = onPressViewCredits;
|
||||
}
|
||||
items4 = [<Button {...object} />];
|
||||
string = intl.string;
|
||||
items4[1] = <Button size="lg" variant="secondary" text={Reflect.apply(string, intl,
|
||||
[t.TkTvBz])} onPress={onPress_79084} />;
|
||||
items3[2] = <View {...viewBinding3Props}>{items4}</View>;
|
||||
r9 = <View {...viewBinding2Props}>{items3}</View>;
|
||||
}
|
||||
items2[1] = <View style={styles.body}>{r9}</View>;
|
||||
const ActionSheetHeaderBar = (require(6515) /* metro dependency 6515: ActionSheetHeaderBarNative */).ActionSheetHeaderBar;
|
||||
items2[2] = <ActionSheetHeaderBar variant="floating" />;
|
||||
return (
|
||||
<BottomSheet handleDisabled>
|
||||
{items2}
|
||||
</BottomSheet>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun79081() { // fn#79081, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10330:1493, offset: 0x01e4451d, size: 223 bytes, params: 1, frame: 20
|
||||
var r0;
|
||||
var Text;
|
||||
var intl;
|
||||
var FastImage;
|
||||
var value;
|
||||
if (consumed) {
|
||||
FastImage = importDefault(5475) /* metro dependency 5475: FastImage */;
|
||||
value = (require(4002) /* metro dependency 4002: shared */).isThemeDark(env0_2);
|
||||
value = <FastImage source={value ? importDefault(7316) /* metro dependency 7316 */ : importDefault(7317) /* metro dependency 7317 */} />;
|
||||
r0 = value;
|
||||
} else {
|
||||
Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
r0 = <Text variant="heading-lg/bold" color="text-default">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.g5W1g8)}</Text>;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun79082() { // fn#79082, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10330:1697, offset: 0x01e445fc, size: 325 bytes, params: 1, frame: 24
|
||||
const value = environment.__proto__;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const formatToPlainString = intl.formatToPlainString;
|
||||
const Cz1G97 = (require(1244) /* metro dependency 1244: indexNative */).t.Cz1G97;
|
||||
const value2 = Reflect.apply(formatToPlainString, intl, [Cz1G97, {days: 3}]);
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const consumedBinding = consumed;
|
||||
const textProps = {'variant': 'text-md/normal', 'color': 'text-default', style: styles.description};
|
||||
if (consumedBinding) {
|
||||
textProps.children = intl.format((require(1244) /* metro dependency 1244: indexNative */).t['93PGOI'],
|
||||
{duration: value2, expirationDate: expiresAt});
|
||||
} else {
|
||||
textProps.children = isFractionalPremiumActive ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.fBmhE9) : intl.format((require(1244) /* metro dependency 1244: indexNative */).t['8fyBPf'],
|
||||
|
||||
{duration: value2});
|
||||
}
|
||||
return <Text {...textProps} />;
|
||||
}
|
||||
|
||||
function _fun79083() { // fn#79083, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10330:2163, offset: 0x01e44741, size: 71 bytes, params: 1, frame: 14
|
||||
const value = environment.__proto__;
|
||||
const defaultImport = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
|
||||
const getArticleURL = defaultImport.getArticleURL;
|
||||
const FRACTIONAL_PREMIUM_ABOUT = HelpdeskArticles.FRACTIONAL_PREMIUM_ABOUT;
|
||||
(importDefault(3853) /* metro dependency 3853: Linking */).openURL(Reflect.apply(getArticleURL, defaultImport,
|
||||
[FRACTIONAL_PREMIUM_ABOUT]));
|
||||
}
|
||||
|
||||
function FractionalNitroCollectedActionSheetOnPress() { // fn#79084, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10330:2935, owner: FractionalNitroCollectedActionSheet.onPress, offset: 0x01e44788, size: 37 bytes, params: 1, frame: 11
|
||||
const value = environment.__proto__;
|
||||
return (importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
/* Metro module 10098; source: modules/collectibles/native/FractionalNitroPreview.tsx; dependencies: [31, 27, 661, 33, 4501, 697, 1244, 4589, 5475, 10099, 10100, 6742, 4573, 2] */
|
||||
function _fun78867(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78867, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10284:6, offset: 0x01e39117, size: 452 bytes, params: 8, frame: 22
|
||||
var object3;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(27) /* metro dependency 27 */).View;
|
||||
const env0_4 = (require(661) /* metro dependency 661: Constants */).VerticalGradient;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_5 = value.jsx;
|
||||
const env0_6 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object3 = {};
|
||||
const object4 = {'flexDirection': 'column', 'alignItems': 'center', 'justifyContent': 'center', 'padding': null,
|
||||
'borderRadius': null, 'overflow': 'hidden', 'alignSelf': 'center'};
|
||||
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
object4.padding = PX_24;
|
||||
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
||||
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object4.gap = PX_16;
|
||||
object3.container = object4;
|
||||
object3.gradient = {'position': 'absolute', 'top': 0, 'left': 0, 'right': 0, 'bottom': 0};
|
||||
object3.headerImage = {'width': 211, 'height': 157, 'resizeMode': 'cover'};
|
||||
object3.nitroIconContainer = {alignSelf: 'flex-start'};
|
||||
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object3.benefits = {'display': 'flex', 'flexDirection': 'column', gap: PX_8};
|
||||
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object3.benefitRow = {'display': 'flex', 'flexDirection': 'row', 'gap': null, 'alignItems': 'center', gap: PX_8};
|
||||
const env0_7 = Reflect.apply(createStyles, value, [object3]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/FractionalNitroPreview.tsx');
|
||||
exports.FractionalNitroPreview = FractionalNitroPreview;
|
||||
}
|
||||
|
||||
function FractionalNitroPreview() { // fn#78868, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10284:839, offset: 0x01e392db, size: 418 bytes, params: 1, frame: 24
|
||||
const styles = useStyles();
|
||||
const E1NP2x = (require(1244) /* metro dependency 1244: indexNative */).t.E1NP2x;
|
||||
const items2 = [E1NP2x];
|
||||
items2[1] = (require(1244) /* metro dependency 1244: indexNative */).t.kpMomJ;
|
||||
items2[2] = (require(1244) /* metro dependency 1244: indexNative */).t.xT1Vfn;
|
||||
items2[3] = (require(1244) /* metro dependency 1244: indexNative */).t.myyAEr;
|
||||
items2[4] = (require(1244) /* metro dependency 1244: indexNative */).t.zTk8Ul;
|
||||
const defaultImport = importDefault(4589) /* metro dependency 4589 */;
|
||||
const {START, END} = VerticalGradient;
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
{((Component) => <Component colors={['#000000',
|
||||
'#36266d']} start={START} end={END} style={styles.gradient} />)(defaultImport)}
|
||||
{((Component) => <Component source={{uri: importDefault(10099) /* metro dependency 10099: fn_pdp_preview_headerPng */}} style={styles.headerImage} />)(importDefault(5475) /* metro dependency 5475: FastImage */)}
|
||||
<View style={styles.nitroIconContainer}>
|
||||
{((Component) => <Component />)(importDefault(10100) /* metro dependency 10100: NitroIcon */)}
|
||||
</View>
|
||||
<View style={styles.benefits}>
|
||||
{items2.map(_fun78869)}
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun78869(a0, a1) { // fn#78869, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10284:1220, offset: 0x01e3947d, size: 200 bytes, params: 3, frame: 21
|
||||
let value = environment.__proto__;
|
||||
const CheckmarkSmallIcon = (require(6742) /* metro dependency 6742: CheckmarkSmallIcon */).CheckmarkSmallIcon;
|
||||
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
|
||||
value = <CheckmarkSmallIcon color={WHITE} />;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return (
|
||||
<View style={styles.benefitRow} key={a1}>
|
||||
{value}
|
||||
<Text variant="text-sm/medium" color="always-white">
|
||||
{(require(1244) /* metro dependency 1244: indexNative */).intl.string(a0)}
|
||||
</Text>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,136 @@
|
||||
/* Metro module 10089; source: modules/collectibles/native/FramesEarlyAccessBadge.tsx; dependencies: [57, 31, 27, 33, 4501, 697, 4048, 1244, 8544, 4002, 7954, 4573, 10054, 6517, 2] */
|
||||
function _fun78814(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78814, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10275:6, offset: 0x01e35e74, size: 437 bytes, params: 8, frame: 23
|
||||
var object3;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_5 = value.Pressable;
|
||||
const env0_6 = value.View;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_7 = value.jsx;
|
||||
const env0_8 = value.jsxs;
|
||||
const env0_9 = {'top': 14, 'bottom': 14, 'left': 14, 'right': 14};
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object3 = {};
|
||||
const object4 = {'flexDirection': 'row', 'alignItems': 'center', 'borderRadius': null, 'paddingVertical': 2};
|
||||
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
||||
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object4.paddingHorizontal = PX_8;
|
||||
object3.pillBase = object4;
|
||||
const CONTROL_OVERLAY_PRIMARY_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_OVERLAY_PRIMARY_BACKGROUND_DEFAULT;
|
||||
object3.pillDark = {backgroundColor: CONTROL_OVERLAY_PRIMARY_BACKGROUND_DEFAULT};
|
||||
const BADGE_BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BADGE_BACKGROUND_BRAND;
|
||||
object3.pillLight = {backgroundColor: BADGE_BACKGROUND_BRAND};
|
||||
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object3.text = {marginLeft: PX_8, textTransform: 'uppercase'};
|
||||
const env0_10 = Reflect.apply(createStyles, value, [object3]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/FramesEarlyAccessBadge.tsx');
|
||||
exports.default = _default_78824;
|
||||
}
|
||||
|
||||
function BadgeWithTooltip({tooltipPosition}) { // fn#78815, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10275:610, offset: 0x01e36029, size: 596 bytes, params: 2, frame: 25
|
||||
const value2 = (importDefault(4048) /* metro dependency 4048: useTheme */)();
|
||||
const styles = useStyles();
|
||||
const binding = env0_4;
|
||||
const value3 = binding.useRef(null);
|
||||
const [property, env0_2] = env0_3(binding.useState(false), 2);
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const value6 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['L9B+ZZ']);
|
||||
const value7 = binding.useCallback(_fun78816, []);
|
||||
const useMemo = binding.useMemo;
|
||||
(require(8544) /* metro dependency 8544: useTooltipNative */).useTooltip(value3, Reflect.apply(useMemo, binding,
|
||||
[_fun78817, [tooltipPosition, value6, property, value7]]));
|
||||
binding.useEffect(_fun78818, [property]);
|
||||
const value9 = binding.useCallback(_fun78821, []);
|
||||
const isThemeDark2 = (require(4002) /* metro dependency 4002: shared */).isThemeDark(value2);
|
||||
const r7 = isThemeDark2 ? styles.pillDark : styles.pillLight;
|
||||
const r10 = isThemeDark2 ? 'control-overlay-primary-text-default' : 'white';
|
||||
const value12 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['1m6qcO']);
|
||||
const pressableBindingProps = {ref: value3, onPress: value9, hitSlop: env0_9, accessibilityRole: 'button',
|
||||
accessibilityLabel: value12, accessibilityHint: value6, style: [styles.pillBase, r7]};
|
||||
const NitroWheelIcon = (require(7954) /* metro dependency 7954: NitroWheelIcon */).NitroWheelIcon;
|
||||
const nitroWheelIcon = <NitroWheelIcon size="xs" color={r10} />;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return (
|
||||
<Pressable {...pressableBindingProps}>
|
||||
{nitroWheelIcon}
|
||||
<Text
|
||||
variant="text-sm/bold"
|
||||
color={r10}
|
||||
style={styles.text}
|
||||
>
|
||||
{value12}
|
||||
</Text>
|
||||
</Pressable>
|
||||
);
|
||||
}
|
||||
|
||||
function StaticBadge() { // fn#78823, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10275:1443, offset: 0x01e362f6, size: 303 bytes, params: 1, frame: 22
|
||||
const value2 = (importDefault(4048) /* metro dependency 4048: useTheme */)();
|
||||
const styles = useStyles();
|
||||
const isThemeDark2 = (require(4002) /* metro dependency 4002: shared */).isThemeDark(value2);
|
||||
const r7 = isThemeDark2 ? styles.pillDark : styles.pillLight;
|
||||
const r10 = isThemeDark2 ? 'control-overlay-primary-text-default' : 'white';
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const value5 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['1m6qcO']);
|
||||
const items2 = [styles.pillBase, r7];
|
||||
const NitroWheelIcon = (require(7954) /* metro dependency 7954: NitroWheelIcon */).NitroWheelIcon;
|
||||
const nitroWheelIcon = <NitroWheelIcon size="xs" color={r10} />;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return (
|
||||
<View accessibilityLabel={value5} style={items2}>
|
||||
{nitroWheelIcon}
|
||||
<Text
|
||||
variant="text-sm/bold"
|
||||
color={r10}
|
||||
style={styles.text}
|
||||
>
|
||||
{value5}
|
||||
</Text>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _default_78824({location, tooltipPosition, inheritLayerScope, disablePressable}) { // fn#78824, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10275:1814, offset: 0x01e36425, size: 200 bytes, params: 2, frame: 19
|
||||
tooltipPosition = tooltipPosition === undefined ? 'top' : tooltipPosition;
|
||||
inheritLayerScope = !(inheritLayerScope === undefined) && inheritLayerScope;
|
||||
disablePressable = !(disablePressable === undefined) && disablePressable;
|
||||
if ((require(10054) /* metro dependency 10054: useCanPurchaseFrames */).useIsProfileFramesEarlyAccessPhase(location)) {
|
||||
if (disablePressable) {
|
||||
return <StaticBadge />;
|
||||
} else if (inheritLayerScope) {
|
||||
return <BadgeWithTooltip tooltipPosition={tooltipPosition} />;
|
||||
} else {
|
||||
const LayerScope = (require(6517) /* metro dependency 6517: LayerScopeNative */).LayerScope;
|
||||
return (
|
||||
<LayerScope zIndex={3}>
|
||||
<BadgeWithTooltip tooltipPosition={tooltipPosition} />
|
||||
</LayerScope>
|
||||
);
|
||||
}
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
function _fun78817() { // fn#78817, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10275:803, offset: 0x01e3627d, size: 40 bytes, params: 1, frame: 3
|
||||
return {position: tooltipPosition, label: env0_3, visible: env0_1, onPress: env0_4};
|
||||
}
|
||||
|
||||
function _fun78818() { // fn#78818, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10275:899, offset: 0x01e362a5, size: 56 bytes, params: 1, frame: 14
|
||||
if (env0_1) {
|
||||
var env0_0 = global.setTimeout(_fun78819, 3000);
|
||||
return _fun78820;
|
||||
}
|
||||
}
|
||||
|
||||
function _fun78821() { // fn#78821, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10275:1001, offset: 0x01e362dd, size: 25 bytes, params: 1, frame: 11
|
||||
env0_2(function(a0) {
|
||||
return !a0;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,305 @@
|
||||
/* Metro module 14055; source: modules/collectibles/native/FramesHeroBlock.tsx; dependencies: [31, 27, 5121, 663, 661, 33, 10020, 4501, 697, 14056, 14057, 1484, 10023, 566, 4048, 10154, 14058, 14049, 6771, 6789, 683, 4002, 14060, 14061, 10155, 10089, 4589, 4573, 4578, 1244, 9480, 6533, 5278, 6818, 6517, 14062, 8416, 14065, 2] */
|
||||
function _fun106582(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#106582, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14252:6, offset: 0x022e1367, size: 1123 bytes, params: 8, frame: 28
|
||||
var object2;
|
||||
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.Image;
|
||||
const env0_5 = value.View;
|
||||
const collectiblesCategoryStore = importDefault(5121) /* metro dependency 5121: CollectiblesCategoryStore */;
|
||||
const env0_7 = (require(663) /* metro dependency 663: CollectiblesShopConstants */).CollectiblesMobileShopScreen;
|
||||
value = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_8 = value.AnalyticEvents;
|
||||
const env0_9 = value.UserSettingsSections;
|
||||
const env0_10 = value.VerticalGradient;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_11 = value.jsx;
|
||||
const env0_12 = value.Fragment;
|
||||
const env0_13 = value.jsxs;
|
||||
const COLLECTIBLES_SHOP_CARD_WIDTH = (require(10020) /* metro dependency 10020: CollectiblesShopCardV2 */).COLLECTIBLES_SHOP_CARD_WIDTH;
|
||||
value = 0.75 * COLLECTIBLES_SHOP_CARD_WIDTH;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
object2 = {};
|
||||
object2.heroContainer = {width: '100%'};
|
||||
const object7 = {'position': 'absolute', 'top': null, 'left': 0, 'right': 0, 'paddingHorizontal': null,
|
||||
'alignItems': 'flex-start', 'zIndex': 2};
|
||||
let PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
object7.top = PX_24;
|
||||
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object7.paddingHorizontal = PX_16;
|
||||
object2.framesBadgeContainer = object7;
|
||||
const object8 = {'marginTop': -250, 'paddingTop': 240, 'paddingBottom': null, 'paddingHorizontal': null,
|
||||
'flexDirection': 'row', 'alignItems': 'center', 'borderRadius': null, 'overflow': 'hidden', 'zIndex': 0};
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object8.paddingBottom = PX_16;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object8.paddingHorizontal = PX_16;
|
||||
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
||||
object2.framesBannerWrapper = object8;
|
||||
const object9 = {'position': 'absolute', 'top': 0, 'left': 0, 'right': 0, 'bottom': 0, 'resizeMode': 'stretch'};
|
||||
object9.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
||||
object2.framesBannerBackgroundImage = object9;
|
||||
const object10 = {flex: 1};
|
||||
let PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
object10.paddingRight = PX_4;
|
||||
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
object10.marginTop = PX_24;
|
||||
object2.framesBannerTextContainer = object10;
|
||||
PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
object2.framesBannerTitle = {marginBottom: PX_4};
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object2.framesBannerForegroundImage = {'width': 125, 'height': 125, 'resizeMode': 'contain',
|
||||
transform: [{translateY: PX_16}]};
|
||||
object2.heroBannerContainer = {'position': 'absolute', 'top': 0, 'left': 0, 'width': '100%', 'maxHeight': null,
|
||||
'aspectRatio': 1.4883720930232558, maxHeight: 240 + value};
|
||||
object2.heroBannerImage = {'width': '100%', 'height': '100%', 'resizeMode': 'cover'};
|
||||
object2.orbsBackgroundGradient = {'position': 'absolute', 'top': 0, 'left': 0, 'bottom': 0, 'right': 0};
|
||||
object2.heroInfoContainer = {'display': 'flex', 'justifyContent': 'center', 'flex': 1, 'minWidth': '100%',
|
||||
'maxHeight': 240, 'aspectRatio': 2.2};
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object2.innerContainer = {'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'space-between',
|
||||
'paddingHorizontal': null, 'width': '100%', 'height': '100%', paddingHorizontal: PX_16};
|
||||
object2.heroLogoContainer = {'flex': 1, 'maxWidth': '80%', 'maxHeight': '80%'};
|
||||
object2.heroLogo = {'resizeMode': 'contain', 'maxHeight': '100%', 'maxWidth': '100%', 'aspectRatio': 1};
|
||||
const object11 = {};
|
||||
const CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT;
|
||||
object11.backgroundColor = CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT;
|
||||
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object11.padding = PX_8;
|
||||
object11.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
||||
object2.heroViewAllIcon = object11;
|
||||
const object14 = {};
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object14.paddingHorizontal = PX_16;
|
||||
object14.alignItems = 'flex-start';
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object14.gap = PX_16;
|
||||
object2.orbsInnerContainer = object14;
|
||||
object2.orbsTitle = {'fontSize': 24, 'lineHeight': 30};
|
||||
object2.productCardsContainer = {zIndex: 1};
|
||||
const object16 = {flexDirection: 'row'};
|
||||
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object16.gap = PX_12;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object16.paddingHorizontal = PX_16;
|
||||
object2.skeletonContainer = object16;
|
||||
const env0_14 = Reflect.apply(createStyles, createStylesModule, [object2]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/FramesHeroBlock.tsx');
|
||||
exports.default = _default_106585;
|
||||
}
|
||||
|
||||
function SkeletonLoading({accessibilityLabel}) { // fn#106583, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14252:2274, offset: 0x022e17ca, size: 129 bytes, params: 2, frame: 17
|
||||
const styles = useStyles();
|
||||
const Array = global.Array;
|
||||
return (
|
||||
<View
|
||||
style={styles.skeletonContainer}
|
||||
accessibilityRole="list"
|
||||
accessibilityLabel={accessibilityLabel}
|
||||
accessibilityState={{busy: true}}
|
||||
accessible
|
||||
>
|
||||
{Array.from({length: 10}).map(_fun106584)}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _default_106585({heroBlock, bannerBlock, preferVCPrice, screen}) { // fn#106585, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14252:2555, offset: 0x022e1890, size: 2683 bytes, params: 2, frame: 49
|
||||
var r21;
|
||||
var r26;
|
||||
var r14;
|
||||
var length;
|
||||
var jsxRuntimeEnv0_12Binding;
|
||||
var PressableOpacity;
|
||||
var object11;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var object;
|
||||
var items4;
|
||||
var items5;
|
||||
var items6;
|
||||
var FlashList;
|
||||
var object27;
|
||||
const COLLECTIBLES_SHOP_CARD_WIDTH = (require(10020) /* metro dependency 10020: CollectiblesShopCardV2 */).COLLECTIBLES_SHOP_CARD_WIDTH;
|
||||
var space;
|
||||
var PX_12;
|
||||
var FeedProductList;
|
||||
var object31;
|
||||
const collectiblesCoachmarkScrollDismissContextModule = require(14057) /* metro dependency 14057: CollectiblesCoachmarkScrollDismissContext */;
|
||||
const useCollectiblesCoachmarkScrollDismissContext = collectiblesCoachmarkScrollDismissContextModule.useCollectiblesCoachmarkScrollDismissContext;
|
||||
const handleDismissCoachmarkOnScroll = Reflect.apply(useCollectiblesCoachmarkScrollDismissContext,
|
||||
collectiblesCoachmarkScrollDismissContextModule, []).handleDismissCoachmarkOnScroll;
|
||||
const env0_2 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
|
||||
const env0_3 = (require(10023) /* metro dependency 10023: CollectiblesAnalyticsContext */).useCollectiblesAnalyticsContext();
|
||||
let r30 = heroBlock.mobileHeroUrl ?? heroBlock.heroBannerUrl;
|
||||
const heroLogoUrl = heroBlock.heroLogoUrl;
|
||||
const category = (require(566) /* metro dependency 566: flux */).useStateFromStores([CollectiblesCategoryStore],
|
||||
function() {
|
||||
return CollectiblesCategoryStore.getCategory(heroBlock.categorySkuId);
|
||||
});
|
||||
let r17 = category != null && category.isOrbsExclusive;
|
||||
const value3 = (importDefault(4048) /* metro dependency 4048: useTheme */)();
|
||||
const useTrackProductCardImpressionModule = require(10154) /* metro dependency 10154: useTrackProductCardImpression */;
|
||||
const useTrackProductCardImpression = useTrackProductCardImpressionModule.useTrackProductCardImpression;
|
||||
const handleCardVisibilityChange = Reflect.apply(useTrackProductCardImpression, useTrackProductCardImpressionModule,
|
||||
[heroBlock.categoryStoreListingId, 'mobile_home', 'hero_block']).handleCardVisibilityChange;
|
||||
const styles = useStyles();
|
||||
const value6 = (require(14049) /* metro dependency 14049: useFilteredAndSortedProducts */).useFilteredAndSortedProducts({products: env0_3.useMemo(_fun106587,
|
||||
[heroBlock.rankedSkuIds, (importDefault(14058) /* metro dependency 14058: useGetProductsFromSkus */)()]),
|
||||
bypassAndroidUnsyncedFilter: r17});
|
||||
const FEATURED_PAGE = CollectiblesMobileShopScreen.FEATURED_PAGE;
|
||||
const env0_6 = screen === FEATURED_PAGE;
|
||||
const defaultImport = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
|
||||
const COLLECTIBLES_SHOP_HERO = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).COLLECTIBLES_SHOP_HERO;
|
||||
const analyticsLocations = defaultImport(COLLECTIBLES_SHOP_HERO).analyticsLocations;
|
||||
if (category === undefined) {
|
||||
return null;
|
||||
}
|
||||
const r32 = heroBlock.mobileTitle ?? heroBlock.title;
|
||||
const r33 = heroBlock.mobileSummary ?? heroBlock.summary;
|
||||
r30 = r17 ? (require(4002) /* metro dependency 4002: shared */).isThemeDark(value3) ? importDefault(14060) /* metro dependency 14060: header_darkJpg */ : importDefault(14061) /* metro dependency 14061: header_lightJpg */ : r30;
|
||||
const AnalyticsLocationProvider = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider;
|
||||
const VisibilitySensor = importDefault(10155) /* metro dependency 10155: VisibilitySensor */;
|
||||
const items2 = [<View style={styles.framesBadgeContainer}>{((Component) => <Component location="CollectiblesShop" disablePressable />)(importDefault(10089) /* metro dependency 10089: FramesEarlyAccessBadge */)}</View>];
|
||||
items2[1] = <View style={styles.heroBannerContainer}>{r30 != null && <>{r17 && ((Component) => <Component colors={['rgba(39, 30, 173, 0.3)',
|
||||
'transparent']} start={VerticalGradient.START} end={VerticalGradient.END} style={styles.orbsBackgroundGradient} />)(importDefault(4589) /* metro dependency 4589 */)}<Image style={[styles.heroBannerImage]} source={{uri: r30}} /></>}</View>;
|
||||
if (r17) {
|
||||
var viewBinding6Props = {style: styles.orbsInnerContainer};
|
||||
r26 = r32 != null && <Text variant="display-md" color="mobile-text-heading-primary" style={styles.orbsTitle}>{r32}</Text>;
|
||||
items5 = [r26];
|
||||
r26 = r33 != null && r33 !== '';
|
||||
r26 = r26 && <Text variant="text-md/medium">{r33}</Text>;
|
||||
items5[1] = r26;
|
||||
items6 = [<View>{items5}</View>];
|
||||
items6[1] = ((Button) => <Button variant="tertiary" shrink grow={false} size="sm" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ynollq)} onPress={onPress_106588} />)((require(4578) /* metro dependency 4578: ButtonNative */).Button);
|
||||
r14 = <View {...viewBinding6Props}>{items6}</View>;
|
||||
} else {
|
||||
PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
||||
var pressableOpacityProps = {'accessibilityRole': 'button', 'accessibilityLabel': null,
|
||||
'accessibilityHint': null,
|
||||
'activeOpacity': 0.6, 'androidRippleConfig': null, 'hitSlop': 8,
|
||||
accessibilityLabel: intl.formatToPlainString(t.FNtLb3, {category: category.name}),
|
||||
accessibilityHint: intl.string(t.F8ma9x)};
|
||||
object = {};
|
||||
object.radius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
||||
pressableOpacityProps.androidRippleConfig = object;
|
||||
pressableOpacityProps.onPress = onPress_106589;
|
||||
var viewBinding3Props = {style: styles.innerContainer};
|
||||
items4 = [heroLogoUrl != null && <View style={styles.heroLogoContainer}><Image style={styles.heroLogo} source={{uri: heroLogoUrl}} /></View>];
|
||||
items4[1] = <View style={styles.heroViewAllIcon}>{((ChevronSmallRightIcon) => <ChevronSmallRightIcon size="sm" color="white" />)((require(6818) /* metro dependency 6818: ChevronSmallRightIcon */).ChevronSmallRightIcon)}</View>;
|
||||
r14 = <PressableOpacity {...pressableOpacityProps} key={category.storeListingId}><View {...viewBinding3Props}>{items4}</View></PressableOpacity>;
|
||||
}
|
||||
items2[2] = <View style={styles.heroInfoContainer}>{r14}</View>;
|
||||
const LayerScope = (require(6517) /* metro dependency 6517: LayerScopeNative */).LayerScope;
|
||||
if (r17) {
|
||||
FeedProductList = importDefault(14062) /* metro dependency 14062: FeedProductList */;
|
||||
length = value6.length;
|
||||
length = length === 0 ? 4 : value6.length;
|
||||
r17 = <FeedProductList products={value6} loadingCardsNum={length} preferVCPrice={preferVCPrice} accessibilityLabel={intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.FNtLb3,
|
||||
|
||||
{category: category.name})} />;
|
||||
} else {
|
||||
jsxRuntimeEnv0_12Binding = jsxRuntimeEnv0_12;
|
||||
if (value6.length === 0) {
|
||||
r21 = <SkeletonLoading accessibilityLabel={intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.FNtLb3,
|
||||
|
||||
|
||||
{category: category.name})} />;
|
||||
} else {
|
||||
FlashList = (require(8416) /* metro dependency 8416: flashList */).FlashList;
|
||||
var flashListProps = {'horizontal': true, 'accessibilityLabel': null, 'accessibilityRole': 'list',
|
||||
accessibilityLabel: intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.FNtLb3,
|
||||
|
||||
|
||||
{category: category.name}), data: value6, onScroll: handleDismissCoachmarkOnScroll,
|
||||
renderItem: renderItem_106590, decelerationRate: 'fast'};
|
||||
space = (importDefault(697) /* metro dependency 697: native */).space;
|
||||
PX_12 = space.PX_12;
|
||||
flashListProps.snapToInterval = COLLECTIBLES_SHOP_CARD_WIDTH + PX_12;
|
||||
space = (importDefault(697) /* metro dependency 697: native */).space;
|
||||
PX_12 = space.PX_12;
|
||||
flashListProps.estimatedItemSize = COLLECTIBLES_SHOP_CARD_WIDTH + PX_12;
|
||||
flashListProps.showsHorizontalScrollIndicator = false;
|
||||
flashListProps.ListHeaderComponent = ListHeaderComponent;
|
||||
flashListProps.ListFooterComponent = ListFooterComponent;
|
||||
flashListProps.ItemSeparatorComponent = ItemSeparatorComponent;
|
||||
r21 = <FlashList {...flashListProps} />;
|
||||
}
|
||||
r17 = <>{r21}</>;
|
||||
}
|
||||
items2[3] = <View style={styles.productCardsContainer}><LayerScope>{r17}</LayerScope></View>;
|
||||
const items7 = [bannerBlock.mobileBackgroundImage != null && <Image style={styles.framesBannerBackgroundImage} source={{uri: bannerBlock.mobileBackgroundImage}} />];
|
||||
var Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
items7[1] = <View style={styles.framesBannerTextContainer}><Text variant="text-lg/bold" color="control-overlay-secondary-text-default" style={styles.framesBannerTitle}>{bannerBlock.title}</Text><Text variant="text-sm/normal" color="control-overlay-secondary-text-default">{bannerBlock.body}</Text></View>;
|
||||
items7[2] = bannerBlock.mobileForegroundImage != null && <Image style={styles.framesBannerForegroundImage} source={{uri: bannerBlock.mobileForegroundImage}} />;
|
||||
items2[4] = <View style={styles.framesBannerWrapper}>{items7}</View>;
|
||||
return (
|
||||
<AnalyticsLocationProvider value={analyticsLocations}>
|
||||
<VisibilitySensor onChange={handleCardVisibilityChange}>
|
||||
<View style={styles.heroContainer}>
|
||||
{items2}
|
||||
</View>
|
||||
</VisibilitySensor>
|
||||
</AnalyticsLocationProvider>
|
||||
);
|
||||
}
|
||||
|
||||
function _default_106585OnPress() { // fn#106588, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14252:4376, owner: _default_106585.onPress, offset: 0x022e2346, size: 76 bytes, params: 1, frame: 15
|
||||
let value = environment.__proto__;
|
||||
value = require(9480) /* metro dependency 9480: QuestUtilsNative */;
|
||||
const openQuestHome = value.openQuestHome;
|
||||
const QuestContent = (require(6533) /* metro dependency 6533: QuestContent */).QuestContent;
|
||||
const ORBS_SHOP_HERO_CTA = QuestContent.ORBS_SHOP_HERO_CTA;
|
||||
Reflect.apply(openQuestHome, value, [{mergeExistingRoutes: true, fromContent: ORBS_SHOP_HERO_CTA}]);
|
||||
}
|
||||
|
||||
function _default_106585OnPress_106589() { // fn#106589, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14252:4774, owner: _default_106585.onPress, offset: 0x022e2392, size: 266 bytes, params: 1, frame: 21
|
||||
const categoryBinding = category;
|
||||
const value3 = undefined;
|
||||
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
const track = defaultImport.track;
|
||||
const COLLECTIBLES_SHOP_ELEMENT_CLICKED = AnalyticEvents.COLLECTIBLES_SHOP_ELEMENT_CLICKED;
|
||||
const object2 = {};
|
||||
object2.collectibles_shop_session_id = env0_3 == null ? value3 : env0_3.sessionId;
|
||||
object2.sku_id = heroBlock.categoryStoreListingId;
|
||||
object2.page_type = 'mobile_home';
|
||||
object2.page_section = env0_3 == null ? value3 : env0_3.pageSection;
|
||||
object2.page_category = env0_3 == null ? value3 : env0_3.pageCategory;
|
||||
object2.tile_type = 'HERO_BLOCK';
|
||||
const String = global.String;
|
||||
object2.tile_position = String(env0_3 == null ? value3 : env0_3.tilePosition);
|
||||
object2.cta_name = null;
|
||||
Reflect.apply(track, defaultImport, [COLLECTIBLES_SHOP_ELEMENT_CLICKED, object2]);
|
||||
const binding = env0_2;
|
||||
const push = binding.push;
|
||||
const COLLECTIBLES_SHOP_VIEW_ALL_CATEGORY_ITEMS = UserSettingsSections.COLLECTIBLES_SHOP_VIEW_ALL_CATEGORY_ITEMS;
|
||||
Reflect.apply(push, binding, [COLLECTIBLES_SHOP_VIEW_ALL_CATEGORY_ITEMS, {category: categoryBinding,
|
||||
analyticsContext: env0_3}]);
|
||||
return value3;
|
||||
}
|
||||
|
||||
function _default_106585RenderItem({item, index}) { // fn#106590, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14252:6041, owner: _default_106585.renderItem, offset: 0x022e249c, size: 198 bytes, params: 2, frame: 21
|
||||
var r5;
|
||||
let value = environment.__proto__;
|
||||
const value3 = ((Component) => <Component solidBackground product={item} unpublishedAt={category.unpublishedAt} preferVCPrice={preferVCPrice} />)(importDefault(10020) /* metro dependency 10020: CollectiblesShopCardV2 */);
|
||||
const CollectiblesAnalyticsProvider = (require(10023) /* metro dependency 10023: CollectiblesAnalyticsContext */).CollectiblesAnalyticsProvider;
|
||||
const object = {tilePosition: index};
|
||||
if (index !== 0) {
|
||||
r5 = value3;
|
||||
} else if (env0_6) {
|
||||
value = importDefault(14065) /* metro dependency 14065: FeaturedFirstCardCoachmarkAnchor */;
|
||||
value = ((Component) => <Component>{value3}</Component>)(value);
|
||||
r5 = value;
|
||||
} else {
|
||||
r5 = value3;
|
||||
}
|
||||
return (
|
||||
<CollectiblesAnalyticsProvider newValue={object} key={item.skuId}>
|
||||
{r5}
|
||||
</CollectiblesAnalyticsProvider>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,120 @@
|
||||
/* Metro module 14077; source: modules/collectibles/native/FramesProductShelfBlock.tsx; dependencies: [31, 27, 33, 4501, 697, 14057, 6771, 6789, 14058, 14049, 10023, 10020, 10089, 4573, 6517, 8416, 2] */
|
||||
function _fun106679(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#106679, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14274:6, offset: 0x022e6333, size: 504 bytes, params: 8, frame: 23
|
||||
var object4;
|
||||
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.Image;
|
||||
const env0_5 = value.View;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_6 = value.jsx;
|
||||
const env0_7 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object4 = {};
|
||||
const object5 = {width: '100%'};
|
||||
let PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
object5.marginTop = PX_24;
|
||||
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
object5.paddingTop = PX_24;
|
||||
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
object5.paddingBottom = PX_24;
|
||||
object5.overflow = 'hidden';
|
||||
object4.container = object5;
|
||||
object4.backgroundImage = {'position': 'absolute', 'top': 0, 'left': 0, 'bottom': 0, 'minWidth': '100%',
|
||||
'aspectRatio': 2.5, 'resizeMode': 'cover'};
|
||||
const object6 = {};
|
||||
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object6.paddingHorizontal = PX_16;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object6.marginBottom = PX_16;
|
||||
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object6.gap = PX_8;
|
||||
object6.alignItems = 'flex-start';
|
||||
object6.zIndex = 1;
|
||||
object4.header = object6;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object4.listEdgeSpacer = {width: PX_16};
|
||||
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object4.listItemSeparator = {width: PX_12};
|
||||
const env0_8 = Reflect.apply(createStyles, value, [object4]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/FramesProductShelfBlock.tsx');
|
||||
exports.default = _default_106682;
|
||||
}
|
||||
|
||||
function ListEdgeSpacer() { // fn#106680, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14274:677, offset: 0x022e652b, size: 41 bytes, params: 1, frame: 14
|
||||
const styles = useStyles();
|
||||
return <View style={styles.listEdgeSpacer} />;
|
||||
}
|
||||
|
||||
function ListItemSeparator() { // fn#106681, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14274:748, offset: 0x022e6554, size: 41 bytes, params: 1, frame: 14
|
||||
const styles = useStyles();
|
||||
return <View style={styles.listItemSeparator} />;
|
||||
}
|
||||
|
||||
function _default_106682({block, preferVCPrice}) { // fn#106682, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14274:813, offset: 0x022e657d, size: 762 bytes, params: 2, frame: 35
|
||||
var r0;
|
||||
var AnalyticsLocationProvider;
|
||||
var items3;
|
||||
var items2;
|
||||
var Text;
|
||||
var title;
|
||||
var LayerScope;
|
||||
var FlashList;
|
||||
var object8;
|
||||
const COLLECTIBLES_SHOP_CARD_WIDTH = (require(10020) /* metro dependency 10020: CollectiblesShopCardV2 */).COLLECTIBLES_SHOP_CARD_WIDTH;
|
||||
const styles = useStyles();
|
||||
const collectiblesCoachmarkScrollDismissContextModule = require(14057) /* metro dependency 14057: CollectiblesCoachmarkScrollDismissContext */;
|
||||
const useCollectiblesCoachmarkScrollDismissContext = collectiblesCoachmarkScrollDismissContextModule.useCollectiblesCoachmarkScrollDismissContext;
|
||||
const handleDismissCoachmarkOnScroll = Reflect.apply(useCollectiblesCoachmarkScrollDismissContext,
|
||||
collectiblesCoachmarkScrollDismissContextModule, []).handleDismissCoachmarkOnScroll;
|
||||
const defaultImport = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
|
||||
const COLLECTIBLES_SHOP_SHELF = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).COLLECTIBLES_SHOP_SHELF;
|
||||
const analyticsLocations = defaultImport(COLLECTIBLES_SHOP_SHELF).analyticsLocations;
|
||||
const value2 = (importDefault(14058) /* metro dependency 14058: useGetProductsFromSkus */)();
|
||||
const binding = env0_3;
|
||||
const useMemo = binding.useMemo;
|
||||
let object = [block.rankedSkuIds, value2];
|
||||
const value4 = (require(14049) /* metro dependency 14049: useFilteredAndSortedProducts */).useFilteredAndSortedProducts({products: Reflect.apply(useMemo,
|
||||
binding, [_fun106683, object])});
|
||||
if (value4.length === 0) {
|
||||
r0 = null;
|
||||
} else {
|
||||
AnalyticsLocationProvider = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider;
|
||||
object = {value: analyticsLocations};
|
||||
var viewBindingProps = {style: styles.container};
|
||||
items3 = [block.mobileBackgroundImage != null && <Image style={styles.backgroundImage} source={{uri: block.mobileBackgroundImage}} />];
|
||||
var viewBinding2Props = {style: styles.header};
|
||||
items2 = [((Component) => <Component location="FramesProductShelfBlock" tooltipPosition="bottom" />)(importDefault(10089) /* metro dependency 10089: FramesEarlyAccessBadge */)];
|
||||
Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
title = block.title;
|
||||
items2[1] = <Text variant="text-sm/semibold" color="always-white">{title}</Text>;
|
||||
items3[1] = <View {...viewBinding2Props}>{items2}</View>;
|
||||
LayerScope = (require(6517) /* metro dependency 6517: LayerScopeNative */).LayerScope;
|
||||
FlashList = (require(8416) /* metro dependency 8416: flashList */).FlashList;
|
||||
title = block.title;
|
||||
items3[2] = <LayerScope><FlashList horizontal accessibilityRole="list" accessibilityLabel={title} data={value4} keyExtractor={binding.useCallback(function(a0) {
|
||||
return a0.skuId;
|
||||
}, [])} onScroll={handleDismissCoachmarkOnScroll} renderItem={binding.useCallback(_fun106684,
|
||||
[preferVCPrice])} decelerationRate="fast" snapToInterval={COLLECTIBLES_SHOP_CARD_WIDTH + (importDefault(697) /* metro dependency 697: native */).space.PX_12} estimatedItemSize={COLLECTIBLES_SHOP_CARD_WIDTH} showsHorizontalScrollIndicator={false} ListHeaderComponent={ListEdgeSpacer} ListFooterComponent={ListEdgeSpacer} ItemSeparatorComponent={ListItemSeparator} /></LayerScope>;
|
||||
r0 = <AnalyticsLocationProvider {...object}><View {...viewBindingProps}>{items3}</View></AnalyticsLocationProvider>;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun106683() { // fn#106683, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14274:1028, offset: 0x022e6877, size: 26 bytes, params: 1, frame: 11
|
||||
return env0_2(block.rankedSkuIds);
|
||||
}
|
||||
|
||||
function _fun106684({item, index}) { // fn#106684, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14274:1141, offset: 0x022e6891, size: 115 bytes, params: 2, frame: 18
|
||||
const value = environment.__proto__;
|
||||
const CollectiblesAnalyticsProvider = (require(10023) /* metro dependency 10023: CollectiblesAnalyticsContext */).CollectiblesAnalyticsProvider;
|
||||
return (
|
||||
<CollectiblesAnalyticsProvider newValue={{tilePosition: index}}>
|
||||
{((Component) => <Component product={item} preferVCPrice={preferVCPrice} />)(importDefault(10020) /* metro dependency 10020: CollectiblesShopCardV2 */)}
|
||||
</CollectiblesAnalyticsProvider>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,296 @@
|
||||
/* Metro module 14067; source: modules/collectibles/native/HeroBlock.tsx; dependencies: [31, 27, 5121, 663, 661, 33, 10020, 4501, 697, 14056, 14057, 1484, 10023, 566, 4048, 10154, 3860, 4000, 14058, 14049, 6771, 6789, 683, 4002, 14060, 14061, 10155, 4589, 4573, 4578, 1244, 9480, 6533, 5278, 6818, 6517, 14062, 8416, 14065, 2] */
|
||||
function _fun106642(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#106642, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14264:6, offset: 0x022e3c6a, size: 786 bytes, params: 8, frame: 24
|
||||
var object2;
|
||||
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.Image;
|
||||
const env0_5 = value.View;
|
||||
const collectiblesCategoryStore = importDefault(5121) /* metro dependency 5121: CollectiblesCategoryStore */;
|
||||
const env0_7 = (require(663) /* metro dependency 663: CollectiblesShopConstants */).CollectiblesMobileShopScreen;
|
||||
value = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_8 = value.AnalyticEvents;
|
||||
const env0_9 = value.UserSettingsSections;
|
||||
const env0_10 = value.VerticalGradient;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_11 = value.jsx;
|
||||
const env0_12 = value.Fragment;
|
||||
const env0_13 = value.jsxs;
|
||||
const COLLECTIBLES_SHOP_CARD_WIDTH = (require(10020) /* metro dependency 10020: CollectiblesShopCardV2 */).COLLECTIBLES_SHOP_CARD_WIDTH;
|
||||
value = 0.75 * COLLECTIBLES_SHOP_CARD_WIDTH;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
object2 = {};
|
||||
object2.heroContainer = {width: '100%'};
|
||||
object2.heroBannerContainer = {'position': 'absolute', 'top': 0, 'left': 0, 'width': '100%', 'maxHeight': null,
|
||||
'aspectRatio': 1.4883720930232558, maxHeight: 240 + value};
|
||||
object2.heroBannerImage = {'width': '100%', 'height': '100%', 'resizeMode': 'cover'};
|
||||
object2.orbsBackgroundGradient = {'position': 'absolute', 'top': 0, 'left': 0, 'bottom': 0, 'right': 0};
|
||||
object2.fadeOutGradient = {'position': 'absolute', 'bottom': 0, 'height': '50%', 'width': '100%', 'zIndex': 1};
|
||||
object2.heroInfoContainer = {'display': 'flex', 'justifyContent': 'center', 'flex': 1, 'minWidth': '100%',
|
||||
'maxHeight': 240, 'aspectRatio': 2.2};
|
||||
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object2.innerContainer = {'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'space-between',
|
||||
'paddingHorizontal': null, 'width': '100%', 'height': '100%', paddingHorizontal: PX_16};
|
||||
object2.heroLogoContainer = {'flex': 1, 'maxWidth': '80%', 'maxHeight': '80%'};
|
||||
object2.heroLogo = {'resizeMode': 'contain', 'maxHeight': '100%', 'maxWidth': '100%', 'aspectRatio': 1};
|
||||
const object3 = {};
|
||||
const CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT;
|
||||
object3.backgroundColor = CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT;
|
||||
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object3.padding = PX_8;
|
||||
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
||||
object2.heroViewAllIcon = object3;
|
||||
const object4 = {};
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object4.paddingHorizontal = PX_16;
|
||||
object4.alignItems = 'flex-start';
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object4.gap = PX_16;
|
||||
object2.orbsInnerContainer = object4;
|
||||
object2.orbsTitle = {'fontSize': 24, 'lineHeight': 30};
|
||||
object2.productCardsContainer = {zIndex: 1};
|
||||
const object7 = {flexDirection: 'row'};
|
||||
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object7.gap = PX_12;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object7.paddingHorizontal = PX_16;
|
||||
object2.skeletonContainer = object7;
|
||||
const env0_14 = Reflect.apply(createStyles, createStylesModule, [object2]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/HeroBlock.tsx');
|
||||
exports.default = _default_106645;
|
||||
}
|
||||
|
||||
function SkeletonLoading_106643({accessibilityLabel}) { // fn#106643, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14264:1585, offset: 0x022e3f7c, size: 129 bytes, params: 2, frame: 17
|
||||
const styles = useStyles();
|
||||
const Array = global.Array;
|
||||
return (
|
||||
<View
|
||||
style={styles.skeletonContainer}
|
||||
accessibilityRole="list"
|
||||
accessibilityLabel={accessibilityLabel}
|
||||
accessibilityState={{busy: true}}
|
||||
accessible
|
||||
>
|
||||
{Array.from({length: 10}).map(_fun106644)}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _default_106645({heroBlock, preferVCPrice, screen}) { // fn#106645, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14264:1866, offset: 0x022e3ffd, size: 2510 bytes, params: 2, frame: 50
|
||||
var r18;
|
||||
var r11;
|
||||
var r28;
|
||||
var r15;
|
||||
var length;
|
||||
var jsxRuntimeEnv0_12Binding;
|
||||
var items2;
|
||||
var PressableOpacity;
|
||||
var object11;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var object;
|
||||
var items5;
|
||||
var items6;
|
||||
var items7;
|
||||
var FlashList;
|
||||
var object27;
|
||||
const COLLECTIBLES_SHOP_CARD_WIDTH = (require(10020) /* metro dependency 10020: CollectiblesShopCardV2 */).COLLECTIBLES_SHOP_CARD_WIDTH;
|
||||
var space;
|
||||
var PX_12;
|
||||
var FeedProductList;
|
||||
var object31;
|
||||
const collectiblesCoachmarkScrollDismissContextModule = require(14057) /* metro dependency 14057: CollectiblesCoachmarkScrollDismissContext */;
|
||||
const useCollectiblesCoachmarkScrollDismissContext = collectiblesCoachmarkScrollDismissContextModule.useCollectiblesCoachmarkScrollDismissContext;
|
||||
const handleDismissCoachmarkOnScroll = Reflect.apply(useCollectiblesCoachmarkScrollDismissContext,
|
||||
collectiblesCoachmarkScrollDismissContextModule, []).handleDismissCoachmarkOnScroll;
|
||||
const env0_2 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
|
||||
const env0_3 = (require(10023) /* metro dependency 10023: CollectiblesAnalyticsContext */).useCollectiblesAnalyticsContext();
|
||||
let r32 = heroBlock.mobileHeroUrl ?? heroBlock.heroBannerUrl;
|
||||
const heroLogoUrl = heroBlock.heroLogoUrl;
|
||||
const category = (require(566) /* metro dependency 566: flux */).useStateFromStores([CollectiblesCategoryStore],
|
||||
function() {
|
||||
return CollectiblesCategoryStore.getCategory(heroBlock.categorySkuId);
|
||||
});
|
||||
let r16 = category != null && category.isOrbsExclusive;
|
||||
const value3 = (importDefault(4048) /* metro dependency 4048: useTheme */)();
|
||||
const useTrackProductCardImpressionModule = require(10154) /* metro dependency 10154: useTrackProductCardImpression */;
|
||||
const useTrackProductCardImpression = useTrackProductCardImpressionModule.useTrackProductCardImpression;
|
||||
const handleCardVisibilityChange = Reflect.apply(useTrackProductCardImpression, useTrackProductCardImpressionModule,
|
||||
[heroBlock.categoryStoreListingId, 'mobile_home', 'hero_block']).handleCardVisibilityChange;
|
||||
const styles = useStyles();
|
||||
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
|
||||
let useToken = useTokenModule.useToken;
|
||||
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
||||
const value4 = Reflect.apply(useToken, useTokenModule, [BACKGROUND_BASE_LOW]);
|
||||
const colorUtilsModule = require(4000) /* metro dependency 4000: ColorUtils */;
|
||||
const hexToRgbaString = colorUtilsModule.hexToRgbaString;
|
||||
const moduleValue8 = colorUtilsModule;
|
||||
const value5 = Reflect.apply(hexToRgbaString, colorUtilsModule, [moduleValue8.hexWithOpacity(value4, 0)]);
|
||||
const moduleValue9 = useTokenModule;
|
||||
useToken = moduleValue9.useToken;
|
||||
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
|
||||
const value6 = Reflect.apply(useToken, moduleValue9, [BACKGROUND_BASE_LOWEST]);
|
||||
const value9 = (require(14049) /* metro dependency 14049: useFilteredAndSortedProducts */).useFilteredAndSortedProducts({products: env0_3.useMemo(_fun106647,
|
||||
[heroBlock.rankedSkuIds, (importDefault(14058) /* metro dependency 14058: useGetProductsFromSkus */)()]),
|
||||
bypassAndroidUnsyncedFilter: r16});
|
||||
const FEATURED_PAGE = CollectiblesMobileShopScreen.FEATURED_PAGE;
|
||||
const env0_6 = screen === FEATURED_PAGE;
|
||||
const defaultImport = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
|
||||
const COLLECTIBLES_SHOP_HERO = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).COLLECTIBLES_SHOP_HERO;
|
||||
const analyticsLocations = defaultImport(COLLECTIBLES_SHOP_HERO).analyticsLocations;
|
||||
if (category === undefined) {
|
||||
return null;
|
||||
}
|
||||
const r33 = heroBlock.mobileTitle ?? heroBlock.title;
|
||||
const r34 = heroBlock.mobileSummary ?? heroBlock.summary;
|
||||
r32 = r16 ? (require(4002) /* metro dependency 4002: shared */).isThemeDark(value3) ? importDefault(14060) /* metro dependency 14060: header_darkJpg */ : importDefault(14061) /* metro dependency 14061: header_lightJpg */ : r32;
|
||||
const AnalyticsLocationProvider = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider;
|
||||
const VisibilitySensor = importDefault(10155) /* metro dependency 10155: VisibilitySensor */;
|
||||
const value10 = r32 != null;
|
||||
if (value10) {
|
||||
jsxRuntimeEnv0_12Binding = jsxRuntimeEnv0_12;
|
||||
items2 = [r16 && ((Component) => <Component colors={['rgba(39, 30, 173, 0.3)',
|
||||
'transparent']} start={VerticalGradient.START} end={VerticalGradient.END} style={styles.orbsBackgroundGradient} />)(importDefault(4589) /* metro dependency 4589 */)];
|
||||
items2[1] = <Image style={[styles.heroBannerImage]} source={{uri: r32}} />;
|
||||
items2[2] = ((Component) => <Component colors={[value5,
|
||||
value6]} start={VerticalGradient.START} end={VerticalGradient.END} style={styles.fadeOutGradient} />)(importDefault(4589) /* metro dependency 4589 */);
|
||||
r11 = <>{items2}</>;
|
||||
} else {
|
||||
r11 = value10;
|
||||
}
|
||||
const items4 = [<View style={styles.heroBannerContainer}>{r11}</View>];
|
||||
if (r16) {
|
||||
var viewBinding6Props = {style: styles.orbsInnerContainer};
|
||||
r28 = r33 != null && ((Text) => <Text variant="display-md" color="mobile-text-heading-primary" style={styles.orbsTitle}>{r33}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
|
||||
items6 = [r28];
|
||||
r28 = r34 != null && r34 !== '';
|
||||
r28 = r28 && ((Text) => <Text variant="text-md/medium">{r34}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
|
||||
items6[1] = r28;
|
||||
items7 = [<View>{items6}</View>];
|
||||
items7[1] = ((Button) => <Button variant="tertiary" shrink grow={false} size="sm" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ynollq)} onPress={onPress_106648} />)((require(4578) /* metro dependency 4578: ButtonNative */).Button);
|
||||
r15 = <View {...viewBinding6Props}>{items7}</View>;
|
||||
} else {
|
||||
PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
||||
var pressableOpacityProps = {'accessibilityRole': 'button', 'accessibilityLabel': null,
|
||||
'accessibilityHint': null,
|
||||
'activeOpacity': 0.6, 'androidRippleConfig': null, 'hitSlop': 8,
|
||||
accessibilityLabel: intl.formatToPlainString(t.FNtLb3, {category: category.name}),
|
||||
accessibilityHint: intl.string(t.F8ma9x)};
|
||||
object = {};
|
||||
object.radius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
||||
pressableOpacityProps.androidRippleConfig = object;
|
||||
pressableOpacityProps.onPress = onPress_106649;
|
||||
var viewBinding3Props = {style: styles.innerContainer};
|
||||
items5 = [heroLogoUrl != null && <View style={styles.heroLogoContainer}><Image style={styles.heroLogo} source={{uri: heroLogoUrl}} /></View>];
|
||||
items5[1] = <View style={styles.heroViewAllIcon}>{((ChevronSmallRightIcon) => <ChevronSmallRightIcon size="sm" color="white" />)((require(6818) /* metro dependency 6818: ChevronSmallRightIcon */).ChevronSmallRightIcon)}</View>;
|
||||
r15 = <PressableOpacity {...pressableOpacityProps} key={category.storeListingId}><View {...viewBinding3Props}>{items5}</View></PressableOpacity>;
|
||||
}
|
||||
items4[1] = <View style={styles.heroInfoContainer}>{r15}</View>;
|
||||
const LayerScope = (require(6517) /* metro dependency 6517: LayerScopeNative */).LayerScope;
|
||||
if (r16) {
|
||||
FeedProductList = importDefault(14062) /* metro dependency 14062: FeedProductList */;
|
||||
length = value9.length;
|
||||
length = length === 0 ? 4 : value9.length;
|
||||
r16 = <FeedProductList products={value9} loadingCardsNum={length} preferVCPrice={preferVCPrice} accessibilityLabel={intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.FNtLb3,
|
||||
|
||||
{category: category.name})} />;
|
||||
} else {
|
||||
jsxRuntimeEnv0_12Binding = jsxRuntimeEnv0_12;
|
||||
if (value9.length === 0) {
|
||||
r18 = <SkeletonLoading_106643 accessibilityLabel={intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.FNtLb3,
|
||||
|
||||
|
||||
{category: category.name})} />;
|
||||
} else {
|
||||
FlashList = (require(8416) /* metro dependency 8416: flashList */).FlashList;
|
||||
var flashListProps = {'horizontal': true, 'accessibilityLabel': null, 'accessibilityRole': 'list',
|
||||
accessibilityLabel: intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.FNtLb3,
|
||||
|
||||
|
||||
{category: category.name}), data: value9, onScroll: handleDismissCoachmarkOnScroll,
|
||||
renderItem: renderItem_106650, decelerationRate: 'fast'};
|
||||
space = (importDefault(697) /* metro dependency 697: native */).space;
|
||||
PX_12 = space.PX_12;
|
||||
flashListProps.snapToInterval = COLLECTIBLES_SHOP_CARD_WIDTH + PX_12;
|
||||
space = (importDefault(697) /* metro dependency 697: native */).space;
|
||||
PX_12 = space.PX_12;
|
||||
flashListProps.estimatedItemSize = COLLECTIBLES_SHOP_CARD_WIDTH + PX_12;
|
||||
flashListProps.showsHorizontalScrollIndicator = false;
|
||||
flashListProps.ListHeaderComponent = ListHeaderComponent;
|
||||
flashListProps.ListFooterComponent = ListFooterComponent;
|
||||
flashListProps.ItemSeparatorComponent = ItemSeparatorComponent;
|
||||
r18 = <FlashList {...flashListProps} />;
|
||||
}
|
||||
r16 = <>{r18}</>;
|
||||
}
|
||||
items4[2] = <View style={styles.productCardsContainer}><LayerScope>{r16}</LayerScope></View>;
|
||||
return (
|
||||
<AnalyticsLocationProvider value={analyticsLocations}>
|
||||
<VisibilitySensor onChange={handleCardVisibilityChange}>
|
||||
<View style={styles.heroContainer}>
|
||||
{items4}
|
||||
</View>
|
||||
</VisibilitySensor>
|
||||
</AnalyticsLocationProvider>
|
||||
);
|
||||
}
|
||||
|
||||
function _default_106645OnPress() { // fn#106648, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14264:3813, owner: _default_106645.onPress, offset: 0x022e49cb, size: 76 bytes, params: 1, frame: 15
|
||||
let value = environment.__proto__;
|
||||
value = require(9480) /* metro dependency 9480: QuestUtilsNative */;
|
||||
const openQuestHome = value.openQuestHome;
|
||||
const QuestContent = (require(6533) /* metro dependency 6533: QuestContent */).QuestContent;
|
||||
const ORBS_SHOP_HERO_CTA = QuestContent.ORBS_SHOP_HERO_CTA;
|
||||
Reflect.apply(openQuestHome, value, [{mergeExistingRoutes: true, fromContent: ORBS_SHOP_HERO_CTA}]);
|
||||
}
|
||||
|
||||
function _default_106645OnPress_106649() { // fn#106649, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14264:4211, owner: _default_106645.onPress, offset: 0x022e4a17, size: 266 bytes, params: 1, frame: 21
|
||||
const categoryBinding = category;
|
||||
const value3 = undefined;
|
||||
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
const track = defaultImport.track;
|
||||
const COLLECTIBLES_SHOP_ELEMENT_CLICKED = AnalyticEvents.COLLECTIBLES_SHOP_ELEMENT_CLICKED;
|
||||
const object2 = {};
|
||||
object2.collectibles_shop_session_id = env0_3 == null ? value3 : env0_3.sessionId;
|
||||
object2.sku_id = heroBlock.categoryStoreListingId;
|
||||
object2.page_type = 'mobile_home';
|
||||
object2.page_section = env0_3 == null ? value3 : env0_3.pageSection;
|
||||
object2.page_category = env0_3 == null ? value3 : env0_3.pageCategory;
|
||||
object2.tile_type = 'HERO_BLOCK';
|
||||
const String = global.String;
|
||||
object2.tile_position = String(env0_3 == null ? value3 : env0_3.tilePosition);
|
||||
object2.cta_name = null;
|
||||
Reflect.apply(track, defaultImport, [COLLECTIBLES_SHOP_ELEMENT_CLICKED, object2]);
|
||||
const binding = env0_2;
|
||||
const push = binding.push;
|
||||
const COLLECTIBLES_SHOP_VIEW_ALL_CATEGORY_ITEMS = UserSettingsSections.COLLECTIBLES_SHOP_VIEW_ALL_CATEGORY_ITEMS;
|
||||
Reflect.apply(push, binding, [COLLECTIBLES_SHOP_VIEW_ALL_CATEGORY_ITEMS, {category: categoryBinding,
|
||||
analyticsContext: env0_3}]);
|
||||
return value3;
|
||||
}
|
||||
|
||||
function _default_106645RenderItem({item, index}) { // fn#106650, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14264:5478, owner: _default_106645.renderItem, offset: 0x022e4b21, size: 198 bytes, params: 2, frame: 21
|
||||
var r5;
|
||||
let value = environment.__proto__;
|
||||
const value3 = ((Component) => <Component solidBackground product={item} unpublishedAt={category.unpublishedAt} preferVCPrice={preferVCPrice} />)(importDefault(10020) /* metro dependency 10020: CollectiblesShopCardV2 */);
|
||||
const CollectiblesAnalyticsProvider = (require(10023) /* metro dependency 10023: CollectiblesAnalyticsContext */).CollectiblesAnalyticsProvider;
|
||||
const object = {tilePosition: index};
|
||||
if (index !== 0) {
|
||||
r5 = value3;
|
||||
} else if (env0_6) {
|
||||
value = importDefault(14065) /* metro dependency 14065: FeaturedFirstCardCoachmarkAnchor */;
|
||||
value = ((Component) => <Component>{value3}</Component>)(value);
|
||||
r5 = value;
|
||||
} else {
|
||||
r5 = value3;
|
||||
}
|
||||
return (
|
||||
<CollectiblesAnalyticsProvider newValue={object} key={item.skuId}>
|
||||
{r5}
|
||||
</CollectiblesAnalyticsProvider>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,159 @@
|
||||
/* Metro module 10093; source: modules/collectibles/native/IndividualProductPreview.tsx; dependencies: [31, 27, 663, 33, 4501, 697, 4589, 7594, 8488, 10094, 10095, 10096, 1904, 10098, 10101, 2] */
|
||||
function _fun78844(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78844, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10279:6, offset: 0x01e37a8f, size: 478 bytes, params: 8, frame: 23
|
||||
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.Pressable;
|
||||
const StyleSheet = value.StyleSheet;
|
||||
const env0_4 = value.View;
|
||||
value = require(663) /* metro dependency 663: CollectiblesShopConstants */;
|
||||
const env0_5 = value.EXTERNAL_PRODUCT_SKU_IDS;
|
||||
const env0_6 = value.ShopCtaEnum;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_7 = value.jsx;
|
||||
const env0_8 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {};
|
||||
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object2.collectiblePreview = {'marginTop': null, 'position': 'relative', 'height': 280, marginTop: PX_12};
|
||||
object2.profilePreviewContainer = {'position': 'relative', 'flex': 1, 'alignItems': 'center', 'overflow': 'hidden'};
|
||||
object2.profilePreview = {width: '66%'};
|
||||
const object3 = {};
|
||||
copyDataProperties(object3, StyleSheet.absoluteFillObject, undefined);
|
||||
object3['bottom'] = -1;
|
||||
object3['pointerEvents'] = 'none';
|
||||
const MOBILE_ACTIONSHEET_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_ACTIONSHEET_BACKGROUND;
|
||||
object3['color'] = MOBILE_ACTIONSHEET_BACKGROUND;
|
||||
object2.profilePreviewGradient = object3;
|
||||
const env0_9 = Reflect.apply(createStyles, value, [object2]);
|
||||
const closure = ProfileEffectPreview;
|
||||
const closure2 = AvatarDecorationPreview;
|
||||
const closure3 = NameplatePreview;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/IndividualProductPreview.tsx');
|
||||
exports.ProfileEffectPreview = closure;
|
||||
exports.AvatarDecorationPreview = closure2;
|
||||
exports.NameplatePreview = closure3;
|
||||
exports.IndividualProductPreview = IndividualProductPreview;
|
||||
}
|
||||
|
||||
function ProfilePreviewWrapper({handlePreviewPress, onTrackPress, children}) { // fn#78845, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10279:615, offset: 0x01e37c6d, size: 263 bytes, params: 2, frame: 24
|
||||
const styles = useStyles();
|
||||
return (
|
||||
<Pressable onPress={onPress_78846} style={styles.collectiblePreview}>
|
||||
<View style={styles.profilePreviewContainer}>
|
||||
{children}
|
||||
{((Component) => <Component style={styles.profilePreviewGradient} start={{'x': 0,
|
||||
'y': 0.6}} end={{'x': 0, 'y': 1}} colors={['' + styles.profilePreviewGradient.color + '00',
|
||||
styles.profilePreviewGradient.color]} />)(importDefault(4589) /* metro dependency 4589 */)}
|
||||
</View>
|
||||
</Pressable>
|
||||
);
|
||||
}
|
||||
|
||||
function ProfileEffectPreview({profileEffect, profileEffectRestartKey, width, handlePreviewPress, onTrackPress}) { // fn#78847, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10279:1017, offset: 0x01e37daf, size: 160 bytes, params: 2, frame: 22
|
||||
const styles = useStyles();
|
||||
return (
|
||||
<ProfilePreviewWrapper handlePreviewPress={handlePreviewPress} onTrackPress={onTrackPress}>
|
||||
{((Component) => <Component user={(require(7594) /* metro dependency 7594: useCurrentUser */).useCurrentUser()} profileEffect={profileEffect} profileEffectRestartKey={profileEffectRestartKey} maxWidth={width} style={styles.profilePreview} />)(importDefault(8488) /* metro dependency 8488: ProfileEffectUserPreview */)}
|
||||
</ProfilePreviewWrapper>
|
||||
);
|
||||
}
|
||||
|
||||
function ProfileFramePreview({profileFrame, width, handlePreviewPress, onTrackPress}) { // fn#78848, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10279:1342, offset: 0x01e37e4f, size: 149 bytes, params: 2, frame: 21
|
||||
const styles = useStyles();
|
||||
return (
|
||||
<ProfilePreviewWrapper handlePreviewPress={handlePreviewPress} onTrackPress={onTrackPress}>
|
||||
{((Component) => <Component profileFrame={profileFrame} user={(require(7594) /* metro dependency 7594: useCurrentUser */).useCurrentUser()} maxWidth={width} style={styles.profilePreview} />)(importDefault(10094) /* metro dependency 10094: ProfileFrameUserPreview */)}
|
||||
</ProfilePreviewWrapper>
|
||||
);
|
||||
}
|
||||
|
||||
function AvatarDecorationPreview({product, handlePreviewPress, onTrackPress}) { // fn#78849, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10279:1617, offset: 0x01e37ee4, size: 120 bytes, params: 2, frame: 17
|
||||
const styles = useStyles();
|
||||
return (
|
||||
<Pressable onPress={onPress_78850} style={styles.collectiblePreview}>
|
||||
{((Component) => <Component product={product} />)(importDefault(10095) /* metro dependency 10095: AvatarDecorationProductPreview */)}
|
||||
</Pressable>
|
||||
);
|
||||
}
|
||||
|
||||
function NameplatePreview({product}) { // fn#78851, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10279:1833, offset: 0x01e37f5c, size: 87 bytes, params: 2, frame: 17
|
||||
const styles = useStyles();
|
||||
return (
|
||||
<View style={styles.collectiblePreview}>
|
||||
{((Component) => <Component product={product} />)(importDefault(10096) /* metro dependency 10096: NameplateProductPreview */)}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function IndividualProductPreview({product, width, handlePreviewPress, onTrackPress}) { // fn#78852, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10279:2182, offset: 0x01e37fb3, size: 494 bytes, params: 2, frame: 20
|
||||
const type = product.type;
|
||||
const CollectiblesItemType = (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType;
|
||||
const NAMEPLATE = CollectiblesItemType.NAMEPLATE;
|
||||
if (NAMEPLATE === type) {
|
||||
return <NameplatePreview product={product} />;
|
||||
}
|
||||
const PROFILE_EFFECT = CollectiblesItemType.PROFILE_EFFECT;
|
||||
if (PROFILE_EFFECT === type) {
|
||||
return (
|
||||
<ProfileEffectPreview
|
||||
profileEffect={product.items[0]}
|
||||
width={width}
|
||||
handlePreviewPress={handlePreviewPress}
|
||||
onTrackPress={onTrackPress}
|
||||
/>
|
||||
);
|
||||
}
|
||||
const PROFILE_FRAME = CollectiblesItemType.PROFILE_FRAME;
|
||||
if (PROFILE_FRAME === type) {
|
||||
return (
|
||||
<ProfileFramePreview
|
||||
profileFrame={product.items[0]}
|
||||
width={width}
|
||||
handlePreviewPress={handlePreviewPress}
|
||||
onTrackPress={onTrackPress}
|
||||
/>
|
||||
);
|
||||
}
|
||||
const AVATAR_DECORATION = CollectiblesItemType.AVATAR_DECORATION;
|
||||
if (AVATAR_DECORATION === type) {
|
||||
return (
|
||||
<AvatarDecorationPreview
|
||||
product={product}
|
||||
handlePreviewPress={handlePreviewPress}
|
||||
onTrackPress={onTrackPress}
|
||||
/>
|
||||
);
|
||||
}
|
||||
const EXTERNAL_SKU = CollectiblesItemType.EXTERNAL_SKU;
|
||||
if (EXTERNAL_SKU === type) {
|
||||
if (product.skuId === EXTERNAL_PRODUCT_SKU_IDS.FRACTIONAL_PREMIUM) {
|
||||
const FractionalNitroPreview = (require(10098) /* metro dependency 10098: FractionalNitroPreview */).FractionalNitroPreview;
|
||||
return <FractionalNitroPreview />;
|
||||
} else if (product.skuId !== EXTERNAL_PRODUCT_SKU_IDS.ORB_PROFILE_BADGE) {
|
||||
return null;
|
||||
} else {
|
||||
const OrbBadgePreview = (require(10101) /* metro dependency 10101: OrbBadgePreview */).OrbBadgePreview;
|
||||
return <OrbBadgePreview />;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function ProfilePreviewWrapperOnPress() { // fn#78846, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10279:698, owner: ProfilePreviewWrapper.onPress, offset: 0x01e37d74, size: 59 bytes, params: 1, frame: 13
|
||||
var value2;
|
||||
let onTrackPressBinding = onTrackPress;
|
||||
if (onTrackPressBinding != null) {
|
||||
onTrackPressBinding = onTrackPress;
|
||||
value2 = environment.__proto__;
|
||||
onTrackPressBinding(ShopCtaEnum.FULL_PROFILE_PREVIEW);
|
||||
}
|
||||
if (handlePreviewPress != null) {
|
||||
handlePreviewPress();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,291 @@
|
||||
/* Metro module 10104; source: modules/collectibles/native/InlinePriceTag.tsx; dependencies: [31, 27, 5140, 663, 661, 33, 4501, 697, 4573, 10076, 1244, 7594, 5134, 3802, 10105, 10106, 10066, 10107, 566, 10054, 1904, 10075, 477, 10078, 7954, 2] */
|
||||
function _fun78887(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78887, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10290:6, offset: 0x01e3a516, size: 578 bytes, params: 8, frame: 24
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_3 = value.Pressable;
|
||||
const env0_4 = value.View;
|
||||
const iapStoreAndroid = importDefault(5140) /* metro dependency 5140: IAPStoreAndroid */;
|
||||
const env0_6 = (require(663) /* metro dependency 663: CollectiblesShopConstants */).ShopCtaEnum;
|
||||
const env0_7 = (require(661) /* metro dependency 661: Constants */).AnalyticsSections;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_8 = value.jsx;
|
||||
const env0_9 = value.Fragment;
|
||||
const env0_10 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
const env0_11 = Reflect.apply(createStyles, value, [{priceTag: {'flexDirection': 'row', 'alignItems': 'center'},
|
||||
strikedPrice: {'textDecorationLine': 'line-through', 'textDecorationStyle': 'solid', 'opacity': 0.7},
|
||||
regularPrice: {}, nitroIcon: {'width': 20, 'height': 20, 'marginLeft': 8, 'marginRight': 4},
|
||||
nitroIconSubscribeNow: {marginLeft: 0}, container: {'flexDirection': 'row', 'alignItems': 'flex-start',
|
||||
'justifyContent': 'space-between'}, priceTagRow: {'flexDirection': 'row', 'alignItems': 'center'},
|
||||
priceTagColumn: {'flexDirection': 'column', 'alignItems': 'flex-start', 'flexShrink': 1},
|
||||
underline: {textDecorationLine: 'underline'}, subscribeNowPressable: {'marginBottom': -2, 'marginTop': null,
|
||||
'flexDirection': 'row', 'alignItems': 'center', marginTop: PX_8}, androidTextPadding: {paddingBottom: 2},
|
||||
orbsIcon: {marginRight: 4}, disabled: {opacity: 0.5}}]);
|
||||
const env0_14 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun78890);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/InlinePriceTag.tsx');
|
||||
exports.default = InlinePriceTag;
|
||||
}
|
||||
|
||||
function PriceTag({priceFormatted, style, color, icon, variant, accessibilityLabel}) { // fn#78888, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10290:976, offset: 0x01e3a758, size: 174 bytes, params: 2, frame: 24
|
||||
color = color === undefined ? 'interactive-text-active' : color;
|
||||
variant = variant === undefined ? 'text-md/medium' : variant;
|
||||
const styles = useStyles();
|
||||
const jsxRuntimeEnv0_9Binding = jsxRuntimeEnv0_9;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return (
|
||||
<>
|
||||
{icon}
|
||||
<Text
|
||||
variant={variant}
|
||||
style={[styles.priceTag, style]}
|
||||
color={color}
|
||||
accessibilityLabel={accessibilityLabel}
|
||||
>
|
||||
{priceFormatted}
|
||||
</Text>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function OrbsPriceTag({vcData, isProductDisabled}) { // fn#78889, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10290:1236, offset: 0x01e3a806, size: 329 bytes, params: 2, frame: 25
|
||||
var r6;
|
||||
var r0;
|
||||
var object3;
|
||||
var canAfford;
|
||||
var object5;
|
||||
var intl;
|
||||
var formatToPlainString;
|
||||
var property;
|
||||
var object6;
|
||||
const styles = useStyles();
|
||||
let price = vcData.price;
|
||||
if (price == null) {
|
||||
r0 = null;
|
||||
} else {
|
||||
object3 = {};
|
||||
canAfford = vcData.canAfford;
|
||||
r6 = canAfford ? isProductDisabled : !canAfford;
|
||||
r6 = r6 && styles.disabled;
|
||||
object3.style = [styles.priceTagRow, r6];
|
||||
object5 = {};
|
||||
price = vcData.price;
|
||||
object5.priceFormatted = price == null ? undefined : price.amount.toString();
|
||||
object5.variant = 'text-md/semibold';
|
||||
object5.icon = ((OrbsIcon) => <OrbsIcon color="interactive-text-active" size="sm" style={styles.orbsIcon} />)((require(10076) /* metro dependency 10076: OrbsIcon */).OrbsIcon);
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
formatToPlainString = intl.formatToPlainString;
|
||||
property = (require(1244) /* metro dependency 1244: indexNative */).t['a/Y8PK'];
|
||||
object6 = {};
|
||||
price = vcData.price;
|
||||
object6.orbAmount = price == null ? undefined : price.amount.toString();
|
||||
object5.accessibilityLabel = Reflect.apply(formatToPlainString, intl, [property, object6]);
|
||||
r0 = <View {...object3}><PriceTag {...object5} /></View>;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun78890() { // fn#78890, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10290:1727, offset: 0x01e3a94f, size: 150 bytes, params: 1, frame: 16
|
||||
const object = {'backgroundColor': 'rgba(46, 204, 113, 0.25)', 'flexDirection': 'row', 'flexShrink': 1,
|
||||
'borderRadius': null, 'paddingHorizontal': 6, 'marginLeft': 6};
|
||||
const value2 = undefined;
|
||||
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs - 1;
|
||||
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
object.paddingTop = platformUtilsModule.isAndroid() ? 0 : value2;
|
||||
const value = platformUtilsModule;
|
||||
object.paddingBottom = value.isAndroid() ? 2 : value2;
|
||||
return {discount: object};
|
||||
}
|
||||
|
||||
function BundleDiscountV2({product, eligibleForShopDiscount}) { // fn#78891, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10290:1991, offset: 0x01e3a9e5, size: 184 bytes, params: 2, frame: 19
|
||||
const styles = useStyles();
|
||||
const collectiblesUtilsModule = require(5134) /* metro dependency 5134: CollectiblesUtils */;
|
||||
const getProductDiscount = collectiblesUtilsModule.getProductDiscount;
|
||||
const discountPercentage = Reflect.apply(getProductDiscount, collectiblesUtilsModule, [product,
|
||||
eligibleForShopDiscount]).discountPercentage;
|
||||
return discountPercentage <= 0 ? null : <View style={styles.discount}>{((Text) => <Text variant="text-md/normal" color="text-feedback-positive">{'-'}{discountPercentage}{'%'}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}</View>;
|
||||
}
|
||||
|
||||
function InlinePriceTag({product, onTrackPress}) { // fn#78892, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10290:2334, offset: 0x01e3aa9d, size: 1471 bytes, params: 2, frame: 41
|
||||
var r11;
|
||||
var r12;
|
||||
var r10;
|
||||
var value10;
|
||||
var formattedPriceForCollectiblesProduct;
|
||||
var object;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var items3;
|
||||
var moduleValue9;
|
||||
const NitroWheelIcon = (require(7954) /* metro dependency 7954: NitroWheelIcon */).NitroWheelIcon;
|
||||
var items2;
|
||||
var items4;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
var moduleValue10;
|
||||
var items5;
|
||||
const styles = useStyles();
|
||||
const value3 = (require(7594) /* metro dependency 7594: useCurrentUser */).useCurrentUser();
|
||||
const shopDiscountSource = (require(5134) /* metro dependency 5134: CollectiblesUtils */).getShopDiscountSource(value3);
|
||||
const canUseShopDiscounts2 = (importDefault(3802) /* metro dependency 3802: PremiumUtils */).canUseShopDiscounts(value3);
|
||||
const defaultImport2 = importDefault(10105) /* metro dependency 10105: useOpenNitroSubscribeActionSheet */;
|
||||
const SHOP_PRODUCT_DETAILS = AnalyticsSections.SHOP_PRODUCT_DETAILS;
|
||||
const env0_2 = defaultImport2(SHOP_PRODUCT_DETAILS);
|
||||
const useProductDisableStateModule = require(10106) /* metro dependency 10106: useProductDisableState */;
|
||||
const useProductDisableState = useProductDisableStateModule.useProductDisableState;
|
||||
const isDisabled = Reflect.apply(useProductDisableState, useProductDisableStateModule, [product.skuId]).isDisabled;
|
||||
const formattedPriceForCollectiblesProduct2 = (require(10066) /* metro dependency 10066: CollectiblesUtils */).getFormattedPriceForCollectiblesProduct(product,
|
||||
false, true);
|
||||
const value6 = (require(10107) /* metro dependency 10107: useVirtualCurrencyData */).useVirtualCurrencyData(product,
|
||||
canUseShopDiscounts2);
|
||||
const value7 = (require(566) /* metro dependency 566: flux */).useStateFromStores([IAPStoreAndroid], function() {
|
||||
return IAPStoreAndroid.isFetchingGoogleSkus();
|
||||
});
|
||||
const value8 = (require(10054) /* metro dependency 10054: useCanPurchaseFrames */).useIsProfileFramesEarlyAccessPhase('InlinePriceTag');
|
||||
let type = product.type;
|
||||
const CollectiblesItemType = (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType;
|
||||
const PROFILE_FRAME = CollectiblesItemType.PROFILE_FRAME;
|
||||
const r2 = type === PROFILE_FRAME && value8;
|
||||
if (value7) {
|
||||
if (formattedPriceForCollectiblesProduct2 == null) {
|
||||
const CollectiblesShopPricePlaceholder = (require(10075) /* metro dependency 10075: CollectiblesShopPricePlaceholder */).CollectiblesShopPricePlaceholder;
|
||||
return <CollectiblesShopPricePlaceholder />;
|
||||
}
|
||||
value10 = null;
|
||||
if (value10 == formattedPriceForCollectiblesProduct2) {
|
||||
return value10 != value6.price ? <OrbsPriceTag vcData={value6} isProductDisabled={isDisabled} /> : value10;
|
||||
}
|
||||
r11 = canUseShopDiscounts2 || r2;
|
||||
formattedPriceForCollectiblesProduct = (require(10066) /* metro dependency 10066: CollectiblesUtils */).getFormattedPriceForCollectiblesProduct(product,
|
||||
|
||||
true, true);
|
||||
var viewBindingProps = {style: styles.container};
|
||||
var viewBindingProps2 = {style: styles.priceTagColumn};
|
||||
var viewBindingProps3 = {style: styles.priceTagRow};
|
||||
object = {priceFormatted: formattedPriceForCollectiblesProduct2};
|
||||
r12 = r11 ? undefined : 'heading-md/semibold';
|
||||
object.variant = r12;
|
||||
r12 = r11 ? styles.strikedPrice : styles.regularPrice;
|
||||
object.style = r12;
|
||||
object.color = 'interactive-text-active';
|
||||
object.accessibilityLabel = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.sPvyr8,
|
||||
|
||||
{price: formattedPriceForCollectiblesProduct2});
|
||||
items3 = [<PriceTag {...object} />];
|
||||
r12 = product.type !== (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType.BUNDLE || canUseShopDiscounts2 ? value10 : <BundleDiscountV2 product={product} eligibleForShopDiscount={canUseShopDiscounts2} />;
|
||||
items3[1] = r12;
|
||||
r12 = value10 != formattedPriceForCollectiblesProduct && r11;
|
||||
if (r12) {
|
||||
var priceTagProps = {'priceFormatted': null, 'variant': 'text-md/medium',
|
||||
'color': 'interactive-text-active',
|
||||
priceFormatted: formattedPriceForCollectiblesProduct,
|
||||
accessibilityLabel: intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.kWkpdG,
|
||||
|
||||
|
||||
{price: formattedPriceForCollectiblesProduct})};
|
||||
moduleValue9 = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
priceTagProps.style = moduleValue9.isAndroid() ? styles.androidTextPadding : undefined;
|
||||
priceTagProps.icon = shopDiscountSource === (require(5134) /* metro dependency 5134: CollectiblesUtils */).ShopDiscountSource.THIRDPARTY ? ((TagIcon) => <TagIcon color="interactive-text-active" style={styles.nitroIcon} />)((require(10078) /* metro dependency 10078: TagIcon */).TagIcon) : <NitroWheelIcon color="interactive-text-active" style={styles.nitroIcon} />;
|
||||
r12 = <PriceTag {...priceTagProps} />;
|
||||
}
|
||||
items3[2] = r12;
|
||||
items2 = [<View {...viewBindingProps3}>{items3}</View>];
|
||||
r10 = value10 != formattedPriceForCollectiblesProduct && !r11;
|
||||
if (r10) {
|
||||
var viewBinding2Props = {style: styles.priceTagRow};
|
||||
var pressableBindingProps = {onPress: onPress_78894, style: styles.subscribeNowPressable,
|
||||
accessibilityRole: 'button'};
|
||||
items4 = [<NitroWheelIcon color="interactive-text-default" style={[styles.nitroIcon,
|
||||
styles.nitroIconSubscribeNow]} />];
|
||||
moduleValue10 = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
items4[1] = <Text variant="text-md/normal" color="interactive-text-default" style={moduleValue10.isAndroid() ? styles.androidTextPadding : undefined}>{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.Kxw2LT,
|
||||
|
||||
|
||||
{price: formattedPriceForCollectiblesProduct, subscribeNowHook: subscribeNowHook})}</Text>;
|
||||
r10 = <View {...viewBinding2Props}><Pressable {...pressableBindingProps}>{items4}</Pressable></View>;
|
||||
}
|
||||
items2[1] = r10;
|
||||
items5 = [<View {...viewBindingProps2}>{items2}</View>];
|
||||
items5[1] = value10 != value6.price && <OrbsPriceTag vcData={value6} isProductDisabled={isDisabled} />;
|
||||
return (
|
||||
<View {...viewBindingProps}>
|
||||
{items5}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
value10 = null;
|
||||
if (value10 == formattedPriceForCollectiblesProduct2) {
|
||||
return value10 != value6.price ? <OrbsPriceTag vcData={value6} isProductDisabled={isDisabled} /> : value10;
|
||||
}
|
||||
r11 = canUseShopDiscounts2 || r2;
|
||||
formattedPriceForCollectiblesProduct = (require(10066) /* metro dependency 10066: CollectiblesUtils */).getFormattedPriceForCollectiblesProduct(product,
|
||||
true, true);
|
||||
items3 = [<PriceTag priceFormatted={formattedPriceForCollectiblesProduct2} variant={r11 ? undefined : 'heading-md/semibold'} style={r11 ? styles.strikedPrice : styles.regularPrice} color="interactive-text-active" accessibilityLabel={intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.sPvyr8,
|
||||
{price: formattedPriceForCollectiblesProduct2})} />];
|
||||
type = product.type;
|
||||
const BUNDLE = CollectiblesItemType.BUNDLE;
|
||||
items3[1] = type !== BUNDLE || canUseShopDiscounts2 ? value10 : <BundleDiscountV2 product={product} eligibleForShopDiscount={canUseShopDiscounts2} />;
|
||||
r12 = value10 != formattedPriceForCollectiblesProduct && r11;
|
||||
if (r12) {
|
||||
var priceTagProps = {'priceFormatted': null, 'variant': 'text-md/medium', 'color': 'interactive-text-active',
|
||||
priceFormatted: formattedPriceForCollectiblesProduct,
|
||||
accessibilityLabel: intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.kWkpdG,
|
||||
|
||||
{price: formattedPriceForCollectiblesProduct})};
|
||||
moduleValue9 = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
priceTagProps.style = moduleValue9.isAndroid() ? styles.androidTextPadding : undefined;
|
||||
priceTagProps.icon = shopDiscountSource === (require(5134) /* metro dependency 5134: CollectiblesUtils */).ShopDiscountSource.THIRDPARTY ? ((TagIcon) => <TagIcon color="interactive-text-active" style={styles.nitroIcon} />)((require(10078) /* metro dependency 10078: TagIcon */).TagIcon) : <NitroWheelIcon color="interactive-text-active" style={styles.nitroIcon} />;
|
||||
r12 = <PriceTag {...priceTagProps} />;
|
||||
}
|
||||
items3[2] = r12;
|
||||
const view = <View style={styles.priceTagRow}>{items3}</View>;
|
||||
r10 = value10 != formattedPriceForCollectiblesProduct && !r11;
|
||||
if (r10) {
|
||||
var viewBinding2Props = {style: styles.priceTagRow};
|
||||
var pressableBindingProps = {onPress: onPress_78894, style: styles.subscribeNowPressable,
|
||||
accessibilityRole: 'button'};
|
||||
items4 = [<NitroWheelIcon color="interactive-text-default" style={[styles.nitroIcon,
|
||||
styles.nitroIconSubscribeNow]} />];
|
||||
moduleValue10 = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
items4[1] = <Text variant="text-md/normal" color="interactive-text-default" style={moduleValue10.isAndroid() ? styles.androidTextPadding : undefined}>{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.Kxw2LT,
|
||||
|
||||
{price: formattedPriceForCollectiblesProduct, subscribeNowHook: subscribeNowHook})}</Text>;
|
||||
r10 = <View {...viewBinding2Props}><Pressable {...pressableBindingProps}>{items4}</Pressable></View>;
|
||||
}
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
<View style={styles.priceTagColumn}>
|
||||
{view}
|
||||
{r10}
|
||||
</View>
|
||||
{value10 != value6.price && <OrbsPriceTag vcData={value6} isProductDisabled={isDisabled} />}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function InlinePriceTagOnPress() { // fn#78894, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10290:4040, owner: InlinePriceTag.onPress, offset: 0x01e3b05c, size: 49 bytes, params: 1, frame: 12
|
||||
var value2;
|
||||
let onTrackPressBinding = onTrackPress;
|
||||
if (onTrackPressBinding != null) {
|
||||
onTrackPressBinding = onTrackPress;
|
||||
value2 = environment.__proto__;
|
||||
onTrackPressBinding(ShopCtaEnum.SUBSCRIBE_NOW);
|
||||
}
|
||||
env0_2();
|
||||
}
|
||||
|
||||
function subscribeNowHook(a0, a1) { // fn#78895, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10290:4454, owner: InlinePriceTag.subscribeNowHook, offset: 0x01e3b08d, size: 82 bytes, params: 3, frame: 15
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return (
|
||||
<Text
|
||||
variant="text-md/normal"
|
||||
style={styles.underline}
|
||||
key={a1}
|
||||
>
|
||||
{a0}
|
||||
</Text>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
/* Metro module 10056; source: modules/collectibles/native/LimitedTimeBadge.tsx; dependencies: [31, 27, 1949, 1310, 33, 4501, 697, 1244, 566, 4002, 7054, 4573, 2] */
|
||||
function _fun78619(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78619, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10242:6, offset: 0x01e2e23e, size: 329 bytes, params: 8, frame: 22
|
||||
var object3;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(27) /* metro dependency 27 */).View;
|
||||
const localeStore = importDefault(1949) /* metro dependency 1949: LocaleStore */;
|
||||
const themeStore = importDefault(1310) /* metro dependency 1310: ThemeStore */;
|
||||
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
object3 = {};
|
||||
const object4 = {'borderRadius': null, 'paddingHorizontal': 8, 'paddingVertical': 2};
|
||||
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
|
||||
object3.root = object4;
|
||||
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
|
||||
object3.backgroundDarkMode = {backgroundColor: WHITE};
|
||||
const BACKGROUND_MOD_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_STRONG;
|
||||
object3.backgroundLightMode = {backgroundColor: BACKGROUND_MOD_STRONG};
|
||||
const env0_7 = Reflect.apply(createStyles, createStylesModule, [object3]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/LimitedTimeBadge.tsx');
|
||||
exports.default = _default_78620;
|
||||
}
|
||||
|
||||
function _default_78620({unpublishedAt, style}) { // fn#78620, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10242:396, offset: 0x01e2e387, size: 814 bytes, params: 2, frame: 25
|
||||
var r7;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var value5;
|
||||
const styles = useStyles();
|
||||
const fluxModule = require(566) /* metro dependency 566: flux */;
|
||||
let useStateFromStores = fluxModule.useStateFromStores;
|
||||
const value2 = Reflect.apply(useStateFromStores, fluxModule, [[ThemeStore], function() {
|
||||
return require(dependencyMap[9]).isThemeDark(ThemeStore.theme);
|
||||
}]);
|
||||
const moduleValue2 = fluxModule;
|
||||
useStateFromStores = moduleValue2.useStateFromStores;
|
||||
const value3 = ['en-US', 'en-GB'].includes(Reflect.apply(useStateFromStores, moduleValue2, [[LocaleStore],
|
||||
function() {
|
||||
return LocaleStore.locale;
|
||||
}]));
|
||||
const {days, hours} = (importDefault(7054) /* metro dependency 7054: useCountdown */)(unpublishedAt, 1000,
|
||||
undefined, true);
|
||||
if (value3) {
|
||||
r7 = days > 1 ? intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.DkxLY0,
|
||||
{days: days}) : days <= 1 && hours > 0 ? intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.WJieZ2,
|
||||
|
||||
{hours: hours}) : intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.WJieZ2,
|
||||
|
||||
{hours: 0});
|
||||
} else {
|
||||
string = intl.string;
|
||||
value5 = days + Reflect.apply(string, intl, [t.QJyuxY]);
|
||||
string = intl.string;
|
||||
r7 = days > 1 ? value5 : days <= 1 && hours > 0 ? hours + Reflect.apply(string, intl,
|
||||
[t['1LyF1h']]) : '0' + intl.string((require(1244) /* metro dependency 1244: indexNative */).t['1LyF1h']);
|
||||
}
|
||||
const items2 = [styles.root];
|
||||
items2[1] = value2 ? styles.backgroundDarkMode : styles.backgroundLightMode;
|
||||
items2[2] = style;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const r9 = value2 ? 'black' : 'white';
|
||||
const formatToPlainString = intl.formatToPlainString;
|
||||
const TlZULM = (require(1244) /* metro dependency 1244: indexNative */).t.TlZULM;
|
||||
return (
|
||||
<View style={items2}>
|
||||
<Text
|
||||
color={r9}
|
||||
variant="text-xs/bold"
|
||||
accessibilityLabel={Reflect.apply(formatToPlainString, intl, [TlZULM, {daysLeft: days}])}
|
||||
allowFontScaling={false}
|
||||
>
|
||||
{r7}
|
||||
</Text>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,103 @@
|
||||
/* Metro module 14913; source: modules/collectibles/native/MobileShopButtonCoachmark.tsx; dependencies: [31, 27, 1376, 33, 4501, 697, 14901, 1244, 8543, 2] */
|
||||
function _fun112824(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#112824, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15110:6, offset: 0x023dd7b7, size: 281 bytes, params: 8, frame: 22
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(27) /* metro dependency 27 */).Image;
|
||||
const env0_4 = (require(1376) /* metro dependency 1376: DismissibleContentConstants */).ContentDismissActionType;
|
||||
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
const object = {'height': 80, 'width': 80};
|
||||
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object.marginTop = PX_8;
|
||||
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object.marginBottom = -PX_16;
|
||||
const env0_6 = Reflect.apply(createStyles, createStylesModule, [{image: object}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/MobileShopButtonCoachmark.tsx');
|
||||
exports.default = MobileShopButtonCoachmark;
|
||||
}
|
||||
|
||||
function MobileShopButtonCoachmark({marketing, shopButtonRef, navigateToShop, visible, onDismiss}) { // fn#112825, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15110:388, offset: 0x023dd8d0, size: 327 bytes, params: 2, frame: 23
|
||||
const env0_2 = visible;
|
||||
const styles = useStyles();
|
||||
const assetLight = marketing.assetLight;
|
||||
const binding = env0_2;
|
||||
const env0_6 = binding.useRef(false);
|
||||
const value2 = binding.useCallback(_fun112826, [onDismiss, navigateToShop]);
|
||||
const value3 = binding.useCallback(_fun112827, [onDismiss]);
|
||||
const env0_9 = binding.useRef(onDismiss);
|
||||
binding.useEffect(_fun112828);
|
||||
binding.useEffect(function() {
|
||||
return _fun112830;
|
||||
}, []);
|
||||
const useMemo = binding.useMemo;
|
||||
(require(8543) /* metro dependency 8543: useCoachmarkNative */).useCoachmark(shopButtonRef, Reflect.apply(useMemo,
|
||||
binding, [_fun112831, [marketing.title, marketing.body, marketing.buttonLabel, visible, assetLight,
|
||||
styles.image, value2, value3]]));
|
||||
return null;
|
||||
}
|
||||
|
||||
function _fun112826() { // fn#112826, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15110:550, offset: 0x023dda17, size: 49 bytes, params: 1, frame: 12
|
||||
env0_6.current = true;
|
||||
const onDismissBinding = onDismiss;
|
||||
const TAKE_ACTION = ContentDismissActionType.TAKE_ACTION;
|
||||
onDismissBinding(TAKE_ACTION);
|
||||
navigateToShop();
|
||||
}
|
||||
|
||||
function _fun112827() { // fn#112827, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15110:615, offset: 0x023dda48, size: 41 bytes, params: 1, frame: 11
|
||||
env0_6.current = true;
|
||||
const onDismissBinding = onDismiss;
|
||||
const USER_DISMISS = ContentDismissActionType.USER_DISMISS;
|
||||
onDismissBinding(USER_DISMISS);
|
||||
}
|
||||
|
||||
function _fun112828() { // fn#112828, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15110:685, offset: 0x023dda71, size: 21 bytes, params: 1, frame: 2
|
||||
env0_9.current = onDismiss;
|
||||
}
|
||||
|
||||
function _fun112829() { // fn#112829, offset: 0x023dda86, size: 11 bytes, params: 1, frame: 1
|
||||
return _fun112830;
|
||||
}
|
||||
|
||||
function _fun112831() { // fn#112831, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15110:787, offset: 0x023ddabf, size: 205 bytes, params: 1, frame: 17
|
||||
var intl;
|
||||
const object2 = {};
|
||||
const marketingBinding = marketing;
|
||||
object2.title = marketingBinding.title;
|
||||
object2.description = marketingBinding.body;
|
||||
object2.visible = visible;
|
||||
let r2 = (require(14901) /* metro dependency 14901: YouNavFloatingExperiment */).isYouNavFloating() ? 'top' : 'bottom';
|
||||
object2.position = r2;
|
||||
object2.renderImgComponent = renderImgComponent_112832;
|
||||
const buttonLabel = marketing.buttonLabel;
|
||||
if (buttonLabel != null) {
|
||||
r2 = buttonLabel;
|
||||
} else {
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
r2 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.fYfGgK);
|
||||
}
|
||||
object2.buttonLabel = r2;
|
||||
object2.buttonVariant = 'secondary';
|
||||
object2.onButtonPress = env0_7;
|
||||
object2.onDismiss = env0_8;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun112830() { // fn#112830, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15110:722, offset: 0x023dda91, size: 46 bytes, params: 1, frame: 11
|
||||
var binding;
|
||||
let current = env1_6.current;
|
||||
if (!current) {
|
||||
binding = env1_9;
|
||||
current = binding.current;
|
||||
value = environment.__proto__.__proto__;
|
||||
Reflect.apply(current, binding, [ContentDismissActionType.AUTO_DISMISS]);
|
||||
}
|
||||
}
|
||||
|
||||
function renderImgComponent_112832() { // fn#112832, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15110:918, offset: 0x023ddb8c, size: 54 bytes, params: 1, frame: 14
|
||||
return <Image style={styles.image} source={{uri: assetLight}} />;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
/* Metro module 10100; source: modules/collectibles/native/NitroIcon.tsx; dependencies: [31, 33, 7744, 2] */
|
||||
function _fun78871(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78871, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10286:6, offset: 0x01e395ac, size: 138 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(33) /* metro dependency 33 */).jsx;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/NitroIcon.tsx');
|
||||
exports.default = NitroIcon;
|
||||
}
|
||||
|
||||
function NitroIcon({width, height, color}) { // fn#78872, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10286:203, offset: 0x01e39636, size: 146 bytes, params: 2, frame: 19
|
||||
width = width === undefined ? 106 : width;
|
||||
height = height === undefined ? 26 : height;
|
||||
color = color === undefined ? '#ffffff' : color;
|
||||
const defaultImport = importDefault(7744) /* metro dependency 7744 */;
|
||||
const Path = (require(7744) /* metro dependency 7744 */).Path;
|
||||
return ((Component) => <Component width={width} height={height} viewBox="0 0 106 26"><Path fill={color} d="M98.83,8.65L97.58,17.08C97.29,19.08,95.05,20,92.98,20C91.06,20,89.17,19.08,89.42,17.26L90.67,8.65C90.95,6.76,93.2,5.8,95.26,5.8C97.33,5.8,99.11,6.76,98.83,8.65M96.25,0L82.82,0C82.48,0,82.19,0.25,82.14,0.59L81.48,5.05C81.42,5.46,81.75,5.84,82.17,5.84L84.62,5.84C84.87,5.84,85.04,6.09,84.94,6.31C84.63,7.03,84.41,7.81,84.29,8.65L83.04,17.26C82.22,23.03,87.03,25.91,92.27,25.91C97.76,25.91,103.14,23.03,103.96,17.26L105.21,8.65C106.01,3,101.37,0.12,96.25,0M15.58,11.79L15.65,15.97C15.65,16.06,15.59,16.14,15.51,16.16L14.08,11.11C14.08,11.11,14.08,11.1,14.08,11.09L9.66,0.78C9.55,0.52,9.3,0.36,9.03,0.36L4.03,0.36C3.68,0.36,3.39,0.61,3.34,0.95L0.01,24.77C-0.05,25.18,0.27,25.55,0.69,25.55L5.67,25.55C6.02,25.55,6.31,25.3,6.36,24.96L7.66,15.49C7.67,15.49,7.67,15.48,7.67,15.47L7.59,10.61L7.74,10.57L9.23,15.61C9.23,15.62,9.24,15.63,9.24,15.63L13.37,25.14C13.48,25.39,13.73,25.55,14,25.55L19.4,25.55C19.74,25.55,20.03,25.3,20.08,24.96L23.42,1.14C23.47,0.73,23.15,0.36,22.73,0.36L17.78,0.36C17.44,0.36,17.15,0.61,17.1,0.95L15.58,11.77C15.58,11.77,15.58,11.78,15.58,11.79M25.22,25.55L30.2,25.55C30.55,25.55,30.84,25.3,30.89,24.96L34.22,1.14C34.28,0.73,33.96,0.36,33.54,0.36L28.55,0.36C28.21,0.36,27.92,0.61,27.87,0.95L24.54,24.77C24.48,25.18,24.8,25.55,25.22,25.55M37.59,0.91L36.94,5.37C36.87,5.78,37.2,6.16,37.62,6.16L42.83,6.16C43.25,6.16,43.58,6.53,43.52,6.94L41.06,24.77C41.01,25.18,41.33,25.55,41.75,25.55L46.8,25.55C47.15,25.55,47.44,25.3,47.49,24.96L50,6.75C50.04,6.41,50.34,6.16,50.68,6.16L56.29,6.16C56.63,6.16,56.92,5.91,56.97,5.57L57.62,1.11C57.69,0.69,57.36,0.32,56.94,0.32L38.27,0.32C37.93,0.32,37.64,0.57,37.59,0.91M72.92,9.15C72.74,10.61,71.6,12.06,69.64,12.06L66.69,12.06C66.27,12.06,65.95,11.69,66.01,11.28L66.63,6.89C66.68,6.55,66.97,6.3,67.31,6.3L70.46,6.3C72.35,6.3,73.09,7.62,72.92,9.15M71.17,0.36L61.68,0.36C61.34,0.36,61.05,0.61,61,0.95L57.67,24.77C57.61,25.18,57.93,25.55,58.35,25.55L63.4,25.55C63.75,25.55,64.04,25.3,64.09,24.96L65.07,17.84C65.09,17.67,65.24,17.55,65.41,17.55L66.06,17.55C66.18,17.55,66.29,17.61,66.35,17.7L71.18,25.23C71.31,25.43,71.53,25.55,71.76,25.55L78,25.55C78.56,25.55,78.89,24.92,78.57,24.47L73.51,17.24C73.38,17.06,73.45,16.82,73.64,16.73C76.87,15.15,78.75,13.54,79.37,9.04C80.08,3.13,76.37,0.36,71.17,0.36Z" /></Component>)(defaultImport);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,172 @@
|
||||
/* Metro module 10122; source: modules/collectibles/native/OrbBadgeCollectedModal.tsx; dependencies: [31, 27, 4502, 33, 4501, 697, 5282, 5080, 10069, 10123, 566, 5475, 10142, 9543, 10143, 6618, 10063, 4573, 1244, 4578, 7613, 10066, 5280, 2] */
|
||||
function _fun79002(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79002, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10308:6, offset: 0x01e40cd1, size: 522 bytes, params: 8, frame: 24
|
||||
var object2;
|
||||
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 StyleSheet = value.StyleSheet;
|
||||
const env0_4 = value.View;
|
||||
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_6 = value.jsx;
|
||||
const env0_7 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {};
|
||||
object2.root = {flex: 1};
|
||||
const object4 = {};
|
||||
copyDataProperties(object4, StyleSheet.absoluteFillObject, undefined);
|
||||
object2.background = object4;
|
||||
object2.orbBadge = {'width': 172, 'height': 172, 'alignSelf': 'center'};
|
||||
object2.main = {flex: 1};
|
||||
const object6 = {'paddingTop': '50%', 'padding': null, 'flex': 1, 'justifyContent': 'space-between'};
|
||||
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object6.padding = PX_16;
|
||||
let PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
|
||||
object6.gap = PX_32;
|
||||
object2.body = object6;
|
||||
PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
|
||||
object2.bottomContainer = {'alignSelf': 'flex-end', 'alignItems': 'stretch', 'gap': null, 'width': '100%',
|
||||
gap: PX_32};
|
||||
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object2.textContainer = {alignItems: 'center', gap: PX_8};
|
||||
object2.text = {textAlign: 'center'};
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object2.buttonsContainer = {alignItems: 'stretch', gap: PX_16};
|
||||
const env0_8 = Reflect.apply(createStyles, value, [object2]);
|
||||
object2 = {ROOT: 'ROOT'};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/OrbBadgeCollectedModal.tsx');
|
||||
exports.default = OrbBadgeCollectedModal;
|
||||
}
|
||||
|
||||
function OrbBadgeCollectedRootScreen({modalKey, onPressViewBadge}) { // fn#79003, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10308:1185, offset: 0x01e40edb, size: 1049 bytes, params: 2, frame: 41
|
||||
var r5;
|
||||
var VideoComponent;
|
||||
var object;
|
||||
const styles = useStyles();
|
||||
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
|
||||
function() {
|
||||
return AccessibilityStore.useReducedMotion;
|
||||
});
|
||||
const value2 = env0_3.useCallback(function() {
|
||||
onPressViewBadge();
|
||||
}, [onPressViewBadge]);
|
||||
const value3 = env0_3.useCallback(_fun79006, [modalKey]);
|
||||
if (useReducedMotion) {
|
||||
r5 = ((Component) => <Component source={{uri: importDefault(10142) /* metro dependency 10142: quest_reward_mobile_bg_staticPng */}} style={styles.background} />)(importDefault(5475) /* metro dependency 5475: FastImage */);
|
||||
} else {
|
||||
VideoComponent = (require(9543) /* metro dependency 9543: Video */).VideoComponent;
|
||||
object = {};
|
||||
object.uri = importDefault(10143) /* metro dependency 10143: quest_reward_mobile_bgMp4 */;
|
||||
r5 = <VideoComponent source={object} poster={importDefault(10142) /* metro dependency 10142: quest_reward_mobile_bg_staticPng */} style={styles.background} resizeMode="contain" muted pauseWhileAppInactive paused={false} />;
|
||||
}
|
||||
const SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
|
||||
const value6 = ((Component) => <Component source={{uri: importDefault(10063) /* metro dependency 10063: orb_profile_badge_icon2xPng */}} style={styles.orbBadge} />)(importDefault(5475) /* metro dependency 5475: FastImage */);
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
let text = styles.text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let string = intl.string;
|
||||
const Bal8Cv = (require(1244) /* metro dependency 1244: indexNative */).t.Bal8Cv;
|
||||
const text2 = <Text variant="heading-xl/bold" color="always-white" style={text}>{Reflect.apply(string, intl,
|
||||
[Bal8Cv])}</Text>;
|
||||
text = styles.text;
|
||||
string = intl.string;
|
||||
const B25MUf = (require(1244) /* metro dependency 1244: indexNative */).t.B25MUf;
|
||||
const view = <View style={styles.textContainer}>{text2}<Text variant="text-sm/medium" color="always-white" style={text}>{Reflect.apply(string,
|
||||
intl, [B25MUf])}</Text></View>;
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
return (
|
||||
<View style={styles.root}>
|
||||
{r5}
|
||||
<SafeAreaPaddingView
|
||||
style={styles.main}
|
||||
top
|
||||
bottom
|
||||
left
|
||||
right
|
||||
>
|
||||
<View style={styles.body}>
|
||||
{value6}
|
||||
<View style={styles.bottomContainer}>
|
||||
{view}
|
||||
<View style={styles.buttonsContainer}>
|
||||
<Button
|
||||
onPress={value2}
|
||||
variant="primary"
|
||||
size="lg"
|
||||
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.uYLGci)}
|
||||
/>
|
||||
<Button
|
||||
onPress={value3}
|
||||
variant="secondary"
|
||||
size="lg"
|
||||
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['6gF4aS'])}
|
||||
/>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
</SafeAreaPaddingView>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function screens(a0, a1, a2) { // fn#79007, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10308:736, offset: 0x01e41321, size: 98 bytes, params: 4, frame: 5
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
const env0_2 = a2;
|
||||
const ROOT = env0_9.ROOT;
|
||||
return {[ROOT]: {'render': null, 'ignoreKeyboard': true, 'fullscreen': true, 'headerLeft': null,
|
||||
'headerRight': null, 'title': '', render: render_79008, headerLeft: headerLeft_79009,
|
||||
headerRight: headerRight_79012}};
|
||||
}
|
||||
|
||||
function OrbBadgeCollectedModal({modalKey, onPressViewBadge, orbBalancePriorToPurchase}) { // fn#79013, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10308:2521, offset: 0x01e4149a, size: 125 bytes, params: 2, frame: 19
|
||||
env0_3.useEffect(_fun79014, []);
|
||||
const Navigator = (require(5280) /* metro dependency 5280: NavigatorNative */).Navigator;
|
||||
const navigatorProps = {screens: screens(modalKey, onPressViewBadge, orbBalancePriorToPurchase)};
|
||||
const ROOT = env0_9.ROOT;
|
||||
navigatorProps.initialRouteName = ROOT;
|
||||
return <Navigator {...navigatorProps} />;
|
||||
}
|
||||
|
||||
function _fun79006() { // fn#79006, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10308:1375, offset: 0x01e412f4, size: 45 bytes, params: 1, frame: 12
|
||||
let value = environment.__proto__;
|
||||
value = importDefault(5080) /* metro dependency 5080: ModalActionCreators */;
|
||||
value.popWithKey(modalKey);
|
||||
}
|
||||
|
||||
function screensRender() { // fn#79008, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10308:764, owner: screens.render, offset: 0x01e41383, size: 44 bytes, params: 1, frame: 14
|
||||
return <OrbBadgeCollectedRootScreen modalKey={env0_0} onPressViewBadge={require} />;
|
||||
}
|
||||
|
||||
function screensHeaderLeft() { // fn#79009, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10308:874, owner: screens.headerLeft, offset: 0x01e413af, size: 25 bytes, params: 1, frame: 11
|
||||
return HeaderLeft(env0_0);
|
||||
}
|
||||
|
||||
function screensHeaderRight() { // fn#79012, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10308:1013, owner: screens.headerRight, offset: 0x01e41440, size: 90 bytes, params: 1, frame: 16
|
||||
const hooksModule = require(10069) /* metro dependency 10069: hooks */;
|
||||
const useFetchVirtualCurrencyBalance = hooksModule.useFetchVirtualCurrencyBalance;
|
||||
const balance = Reflect.apply(useFetchVirtualCurrencyBalance, hooksModule, []).balance;
|
||||
const BalanceWidgetPill = (require(10123) /* metro dependency 10123: native */).BalanceWidgetPill;
|
||||
return <BalanceWidgetPill initialRenderedBalance={importDefault} balance={balance} />;
|
||||
}
|
||||
|
||||
function _fun79014() { // fn#79014, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10308:2634, offset: 0x01e41517, size: 75 bytes, params: 1, frame: 15
|
||||
let value = environment.__proto__;
|
||||
value = require(7613) /* metro dependency 7613: UserProfileActionCreators */;
|
||||
value.pinUserProfileBadgesOnClient([(require(10066) /* metro dependency 10066: CollectiblesUtils */).createOrbProfileBadge()],
|
||||
600);
|
||||
}
|
||||
|
||||
function HeaderLeft(a0) { // fn#79010, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10308:878, owner: screens.headerLeft.HeaderLeft, offset: 0x01e413c8, size: 75 bytes, params: 2, frame: 14
|
||||
const env0_0 = a0;
|
||||
return ((Component) => <Component tintColor="white" />)((require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton(_fun79011));
|
||||
}
|
||||
|
||||
function _fun79011() { // fn#79011, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10308:937, offset: 0x01e41413, size: 45 bytes, params: 1, frame: 11
|
||||
const value = environment.__proto__.__proto__.__proto__;
|
||||
return (importDefault(5080) /* metro dependency 5080: ModalActionCreators */).popWithKey(env0_0);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
/* Metro module 10101; source: modules/collectibles/native/OrbBadgePreview.tsx; dependencies: [31, 27, 33, 4501, 7594, 8489, 10066, 1244, 2] */
|
||||
function _fun78873(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78873, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10287:6, offset: 0x01e396c8, size: 205 bytes, params: 8, frame: 19
|
||||
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({container: {'flex': 1,
|
||||
'justifyContent': 'center', 'alignItems': 'center'}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/OrbBadgePreview.tsx');
|
||||
exports.OrbBadgePreview = OrbBadgePreview;
|
||||
}
|
||||
|
||||
function OrbBadgePreview() { // fn#78874, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10287:321, offset: 0x01e39795, size: 197 bytes, params: 1, frame: 20
|
||||
const styles = useStyles();
|
||||
const value2 = (require(7594) /* metro dependency 7594: useCurrentUser */).useCurrentUser();
|
||||
const UserProfilePreview = importDefault(8489) /* metro dependency 8489: UserProfilePreview */;
|
||||
const items2 = [(require(10066) /* metro dependency 10066: CollectiblesUtils */).createOrbProfileBadge()];
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
<UserProfilePreview
|
||||
compact
|
||||
user={value2}
|
||||
additionalBadges={items2}
|
||||
accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.bxcI6Y)}
|
||||
/>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
/* Metro module 10497; source: modules/collectibles/native/OrbsBadgeCoachmark.tsx; dependencies: [31, 27, 33, 4501, 10498, 1244, 4008, 8543, 2] */
|
||||
function _fun81200(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81200, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10683:6, offset: 0x01e9e0c2, size: 276 bytes, params: 8, frame: 20
|
||||
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.View;
|
||||
const env0_5 = value.Image;
|
||||
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const env0_7 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({coachmarkImageContainer: {'alignItems': 'center',
|
||||
'justifyContent': 'center'}, coachmarkImage: {'width': 80, 'height': 80},
|
||||
coachmarkDescription: {marginBottom: -10}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/OrbsBadgeCoachmark.tsx');
|
||||
exports.default = function(a0) {
|
||||
var r5;
|
||||
var badgeRef = a0.badgeRef;
|
||||
var value = Object.create(null);
|
||||
value.badgeRef = 0;
|
||||
value = copyDataProperties({}, a0, value, r5);
|
||||
require(dependencyMap[7]).useCoachmark(badgeRef, value);
|
||||
return null;
|
||||
};
|
||||
exports.useOrbsBadgeCoachmark = useOrbsBadgeCoachmark;
|
||||
}
|
||||
|
||||
function OrbsBadgeCoachmarkImg() { // fn#81201, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10683:321, offset: 0x01e9e1d6, size: 101 bytes, params: 1, frame: 21
|
||||
const styles = useStyles();
|
||||
const object = {};
|
||||
object.uri = importDefault(10498) /* metro dependency 10498: orbs_badge_assetPng */;
|
||||
return (
|
||||
<View style={styles.coachmarkImageContainer}>
|
||||
<Image source={object} style={styles.coachmarkImage} />
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function useOrbsBadgeCoachmark({disabled}) { // fn#81203, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10683:682, offset: 0x01e9e283, size: 87 bytes, params: 2, frame: 16
|
||||
const styles = useStyles();
|
||||
const binding = env0_3;
|
||||
const useMemo = binding.useMemo;
|
||||
return disabled ? null : {props: Reflect.apply(useMemo, binding, [_fun81204, [disabled,
|
||||
styles.coachmarkDescription]])};
|
||||
}
|
||||
|
||||
function _fun81204() { // fn#81204, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10683:750, offset: 0x01e9e2da, size: 153 bytes, params: 1, frame: 18
|
||||
const object2 = {};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object2.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['4ivm+P']);
|
||||
object2.description = <View style={styles.coachmarkDescription} />;
|
||||
object2.position = 'bottom';
|
||||
object2.visible = !disabled;
|
||||
object2.onDismiss = onDismiss_81205;
|
||||
object2.renderImgComponent = renderImgComponent_81206;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function onDismiss_81205() { // fn#81205, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10683:890, offset: 0x01e9e373, size: 78 bytes, params: 1, frame: 13
|
||||
let value = environment.__proto__.__proto__;
|
||||
value = require(4008) /* metro dependency 4008: RootNavigationRefNative */;
|
||||
value = value.getRootNavigationRef();
|
||||
if (value != null) {
|
||||
if (value.isReady()) {
|
||||
value.setParams({showOrbsBadgeCoachmark: undefined});
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
/* Metro module 14072; source: modules/collectibles/native/PersonalizationDisclaimerActionSheet.tsx; dependencies: [31, 661, 33, 4501, 697, 3853, 1948, 6275, 4573, 1244, 6261, 4578, 6249, 4080, 2] */
|
||||
function _fun106671(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#106671, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14269:6, offset: 0x022e5e65, size: 276 bytes, params: 8, frame: 22
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(661) /* metro dependency 661: Constants */).HelpdeskArticles;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_5 = value.jsx;
|
||||
const env0_6 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {};
|
||||
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object2.container = {paddingHorizontal: PX_16};
|
||||
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object2.header = {'paddingVertical': null, 'alignSelf': 'center', 'textAlign': 'center', paddingVertical: PX_8};
|
||||
const env0_7 = Reflect.apply(createStyles, value, [object2]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/PersonalizationDisclaimerActionSheet.tsx');
|
||||
exports.default = _default_106672;
|
||||
}
|
||||
|
||||
function _default_106672() { // fn#106672, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14269:327, offset: 0x022e5f79, size: 500 bytes, params: 1, frame: 29
|
||||
const styles = useStyles();
|
||||
const value2 = env0_3.useCallback(function() {
|
||||
importDefault(dependencyMap[5]).openURL(importDefault(dependencyMap[6]).getArticleURL(HelpdeskArticles.DATA_USED_FOR_RECOMMENDED));
|
||||
}, []);
|
||||
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let string = intl.string;
|
||||
const text = <Text variant="heading-md/medium" color="mobile-text-heading-primary" accessibilityRole="header" style={styles.header}>{Reflect.apply(string,
|
||||
intl, [(require(1244) /* metro dependency 1244: indexNative */).t.euks4U])}</Text>;
|
||||
const ButtonGroup = (require(6261) /* metro dependency 6261: ButtonGroupNative */).ButtonGroup;
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
string = intl.string;
|
||||
const hvVgAZ = (require(1244) /* metro dependency 1244: indexNative */).t.hvVgAZ;
|
||||
const LinkExternalSmallIcon = (require(6249) /* metro dependency 6249: LinkExternalSmallIcon */).LinkExternalSmallIcon;
|
||||
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
|
||||
const button = <Button size="lg" text={Reflect.apply(string, intl,
|
||||
[hvVgAZ])} onPress={value2} icon={<LinkExternalSmallIcon color={WHITE} />} iconPosition="end" />;
|
||||
string = intl.string;
|
||||
const WAI6xu = (require(1244) /* metro dependency 1244: indexNative */).t.WAI6xu;
|
||||
return (
|
||||
<BottomSheet contentStyles={styles.container}>
|
||||
{text}
|
||||
<ButtonGroup>
|
||||
{button}
|
||||
<Button
|
||||
variant="tertiary"
|
||||
size="lg"
|
||||
text={Reflect.apply(string, intl, [WAI6xu])}
|
||||
onPress={onPress_106674}
|
||||
/>
|
||||
</ButtonGroup>
|
||||
</BottomSheet>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,293 @@
|
||||
/* Metro module 10086; source: modules/collectibles/native/ProductDetailsActionSheet.tsx; dependencies: [57, 31, 27, 663, 661, 482, 33, 4501, 697, 4582, 3868, 4002, 1244, 8999, 1904, 7594, 8743, 10085, 7334, 6771, 6789, 5133, 10087, 10088, 10023, 8742, 480, 7609, 683, 10054, 6275, 6277, 10057, 10089, 1305, 10090, 10102, 10108, 10109, 7335, 10111, 477, 2] */
|
||||
function _fun78790(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78790, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10272:6, offset: 0x01e34767, size: 809 bytes, params: 8, frame: 26
|
||||
var object6;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
let value = require(31) /* metro dependency 31 */;
|
||||
const env0_5 = value.useCallback;
|
||||
const env0_6 = value.useMemo;
|
||||
value = require(27) /* metro dependency 27 */;
|
||||
const env0_7 = value.Pressable;
|
||||
const env0_8 = value.View;
|
||||
const env0_9 = (require(663) /* metro dependency 663: CollectiblesShopConstants */).ShopCtaEnum;
|
||||
const env0_10 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
|
||||
value = require(482) /* metro dependency 482: Constants */;
|
||||
const env0_11 = value.PaymentGateways;
|
||||
const env0_12 = value.ThemeTypes;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_13 = value.jsx;
|
||||
const env0_14 = value.jsxs;
|
||||
const env0_15 = value.Fragment;
|
||||
const env0_16 = {};
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object6 = {container: {'position': 'relative', 'flex': 1}};
|
||||
const object7 = {'position': 'absolute', 'top': 0, 'right': null, 'zIndex': 2, 'flexDirection': 'row'};
|
||||
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object7.right = PX_16;
|
||||
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object7.gap = PX_8;
|
||||
object6.actionButtons = object7;
|
||||
const object8 = {'width': null, 'height': null, 'alignItems': 'center', 'justifyContent': 'center',
|
||||
'borderRadius': null, 'borderWidth': 1};
|
||||
const MEDIUM_BUTTON_HEIGHT = (require(4582) /* metro dependency 4582: ButtonConstantsNative */).MEDIUM_BUTTON_HEIGHT;
|
||||
object8.width = MEDIUM_BUTTON_HEIGHT;
|
||||
object8.height = MEDIUM_BUTTON_HEIGHT;
|
||||
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
||||
const CONTROL_SECONDARY_BORDER_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_SECONDARY_BORDER_DEFAULT;
|
||||
object8.borderColor = CONTROL_SECONDARY_BORDER_DEFAULT;
|
||||
object6.previewProfileButton = object8;
|
||||
const object9 = {};
|
||||
object9.backgroundColor = (require(3868) /* metro dependency 3868: native */).setColorOpacity('white', 0.72);
|
||||
object6.previewProfileButtonLight = object9;
|
||||
const object10 = {};
|
||||
object10.backgroundColor = (require(3868) /* metro dependency 3868: native */).setColorOpacity('white', 0.62);
|
||||
object6.previewProfileButtonLightPressed = object10;
|
||||
const CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT;
|
||||
object6.previewProfileButtonDark = {backgroundColor: CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT};
|
||||
const CONTROL_OVERLAY_SECONDARY_BACKGROUND_ACTIVE = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_OVERLAY_SECONDARY_BACKGROUND_ACTIVE;
|
||||
object6.previewProfileButtonDarkPressed = {backgroundColor: CONTROL_OVERLAY_SECONDARY_BACKGROUND_ACTIVE};
|
||||
const BORDER_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_STRONG;
|
||||
object6.previewProfileButtonMidnight = {borderColor: BORDER_STRONG};
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object6.badgeWrapper = {'position': 'absolute', 'top': 0, 'left': null, 'zIndex': 2, left: PX_16};
|
||||
const env0_17 = Reflect.apply(createStyles, value, [object6]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/ProductDetailsActionSheet.tsx');
|
||||
exports.default = ProductDetailsActionSheet;
|
||||
}
|
||||
|
||||
function PreviewProfileTrigger({handlePreviewPress, onTrackPress}) { // fn#78791, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10272:1284, offset: 0x01e34a90, size: 376 bytes, params: 2, frame: 19
|
||||
const styles = useStyles();
|
||||
const nativeModule = require(3868) /* metro dependency 3868: native */;
|
||||
const useThemeContext = nativeModule.useThemeContext;
|
||||
const theme = Reflect.apply(useThemeContext, nativeModule, []).theme;
|
||||
const isThemeLight2 = (require(4002) /* metro dependency 4002: shared */).isThemeLight(theme);
|
||||
const MIDNIGHT = ThemeTypes.MIDNIGHT;
|
||||
const result = theme === MIDNIGHT;
|
||||
const env0_4 = isThemeLight2 ? styles.previewProfileButtonLight : styles.previewProfileButtonDark;
|
||||
const env0_5 = isThemeLight2 ? styles.previewProfileButtonLightPressed : styles.previewProfileButtonDarkPressed;
|
||||
const binding = env0_4;
|
||||
const useCallback = binding.useCallback;
|
||||
let object = [handlePreviewPress, onTrackPress];
|
||||
object = {style: style_78793, onPress: Reflect.apply(useCallback, binding, [function() {
|
||||
onTrackPress(ShopCtaEnum.FULL_PROFILE_PREVIEW_BUTTON);
|
||||
handlePreviewPress();
|
||||
}, object]), accessibilityRole: 'button'};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['3Qcx6K']);
|
||||
const EyeIcon = (require(8999) /* metro dependency 8999: EyeIcon */).EyeIcon;
|
||||
const INTERACTIVE_ICON_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_ICON_DEFAULT;
|
||||
return (
|
||||
<Pressable {...object}>
|
||||
<EyeIcon size="md" color={INTERACTIVE_ICON_DEFAULT} />
|
||||
</Pressable>
|
||||
);
|
||||
}
|
||||
|
||||
function ProductDetailsActionSheetInner({product, initialVariantIndex, analyticsLocations = [], paymentGateway}) { // fn#78794, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10272:1930, offset: 0x01e34c75, size: 2090 bytes, params: 2, frame: 48
|
||||
const Spacer = (require(1305) /* metro dependency 1305: native */).Spacer;
|
||||
var r8;
|
||||
var r24;
|
||||
initialVariantIndex = initialVariantIndex === undefined ? 0 : initialVariantIndex;
|
||||
let env0_3 = undefined;
|
||||
let env0_4 = undefined;
|
||||
const OTPACOMOrderExperiment = (require(7334) /* metro dependency 7334: ACOMExperiments */).OTPACOMOrderExperiment;
|
||||
const useConfig = OTPACOMOrderExperiment.useConfig;
|
||||
const enabled = Reflect.apply(useConfig, OTPACOMOrderExperiment,
|
||||
[{location: 'ProductDetailsActionSheetInner'}]).enabled;
|
||||
const styles = useStyles();
|
||||
let binding = env0_4;
|
||||
const value4 = binding.useRef(null);
|
||||
const value5 = env0_4.useRef(null);
|
||||
const defaultImport = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
|
||||
let object = [];
|
||||
const value6 = arraySpread(object, analyticsLocations, 0, undefined);
|
||||
const COLLECTIBLES_SHOP_PROFILE_PREVIEW = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).COLLECTIBLES_SHOP_PROFILE_PREVIEW;
|
||||
object[value6] = COLLECTIBLES_SHOP_PROFILE_PREVIEW;
|
||||
value6 + 1;
|
||||
analyticsLocations = defaultImport(object).analyticsLocations;
|
||||
binding = env0_4;
|
||||
let useState = binding.useState;
|
||||
const value8 = env0_3(Reflect.apply(useState, binding, [true]), 2);
|
||||
var property = value8[0];
|
||||
const property2 = value8[1];
|
||||
env0_3 = property2;
|
||||
const value9 = useMemo(_fun78795, [product]);
|
||||
const [property3, property4] = env0_3(env0_4.useState(initialVariantIndex), 2);
|
||||
const selectedProduct = (require(5133) /* metro dependency 5133: CollectiblesProductUtils */).getSelectedProduct(product,
|
||||
property3);
|
||||
const value13 = (require(10087) /* metro dependency 10087: useTrackPdpClick */).useTrackPdpClick({skuId: selectedProduct.skuId,
|
||||
productSkuIds: value9, analyticsLocations: analyticsLocations});
|
||||
env0_4 = value13;
|
||||
const [property5, property6] = env0_3(env0_4.useState(undefined), 2);
|
||||
binding = env0_4;
|
||||
useState = binding.useState;
|
||||
const value17 = env0_3(Reflect.apply(useState, binding, [selectedProduct.skuId]), 2);
|
||||
if (selectedProduct.skuId === value17[0]) {
|
||||
r8 = property5;
|
||||
} else {
|
||||
value17[1](selectedProduct.skuId);
|
||||
property6(undefined);
|
||||
r8 = undefined;
|
||||
}
|
||||
(require(10088) /* metro dependency 10088: usePreviewCollectbilesProduct */).usePreviewCollectibleProduct(selectedProduct,
|
||||
property, r8);
|
||||
const value18 = (require(10023) /* metro dependency 10023: CollectiblesAnalyticsContext */).useCollectiblesAnalyticsContext();
|
||||
const defaultImport2 = importDefault(8742) /* metro dependency 8742: useTrackImpression */;
|
||||
object = {};
|
||||
const ImpressionTypes = (require(480) /* metro dependency 480: AnalyticsUtils */).ImpressionTypes;
|
||||
const HALFSHEET = ImpressionTypes.HALFSHEET;
|
||||
object.type = HALFSHEET;
|
||||
const ImpressionNames = (require(480) /* metro dependency 480: AnalyticsUtils */).ImpressionNames;
|
||||
const SHOP_PRODUCT_DETAIL = ImpressionNames.SHOP_PRODUCT_DETAIL;
|
||||
object.name = SHOP_PRODUCT_DETAIL;
|
||||
object.properties = {sku_id: selectedProduct.skuId, location_stack: analyticsLocations, card_id: value18?.cardId,
|
||||
position_in_section: value18?.tilePosition, shop_session_id: value18?.sessionId, product_sku_ids: value9};
|
||||
defaultImport2(object);
|
||||
let r4 = value18 ?? undefined;
|
||||
const value19 = useHandlePreviewPress({product: product, variantIndex: property3,
|
||||
analyticsLocations: analyticsLocations, setShouldReset: property2, shopAnalyticsContext: r4});
|
||||
const env0_6 = (require(7609) /* metro dependency 7609: useShopProductItems */).useShopProductItems(product);
|
||||
let type = product.type;
|
||||
const CollectiblesItemType = (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType;
|
||||
const BUNDLE = CollectiblesItemType.BUNDLE;
|
||||
const value20 = type === BUNDLE;
|
||||
var [property, property9] = env0_3(env0_4.useState(_fun78799), 2);
|
||||
const value23 = useCallback(_fun78800, []);
|
||||
const r6 = value20 ? property : selectedProduct.type;
|
||||
const value24 = r6 != null;
|
||||
if (value24) {
|
||||
r4 = r6 === (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType.PROFILE_EFFECT || r6 === (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType.PROFILE_FRAME;
|
||||
r4 = !r4 ? r6 === (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType.AVATAR_DECORATION : r4;
|
||||
r24 = r4;
|
||||
} else {
|
||||
r24 = value24;
|
||||
}
|
||||
const value28 = useCallback(_fun78801, [product, property2]);
|
||||
env0_4.useEffect(_fun78802, [analyticsLocations, product.skuId]);
|
||||
const hideBadge = product.hideBadge;
|
||||
const value29 = (require(10054) /* metro dependency 10054: useCanPurchaseFrames */).useIsProfileFramesEarlyAccessPhase('ProductDetailsActionSheet');
|
||||
type = selectedProduct.type;
|
||||
const PROFILE_FRAME = CollectiblesItemType.PROFILE_FRAME;
|
||||
let r9 = type === PROFILE_FRAME && value29 && !hideBadge;
|
||||
const AnalyticsLocationProvider = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider;
|
||||
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
|
||||
const bottomSheetProps = {'scrollable': true, 'startExpanded': true, onExpand: onExpand, onDismiss: onDismiss_78804,
|
||||
ref: value4};
|
||||
const BottomSheetScrollView = (require(6277) /* metro dependency 6277 */).BottomSheetScrollView;
|
||||
r24 = r24 && <PreviewProfileTrigger handlePreviewPress={value19} onTrackPress={value13} />;
|
||||
const items2 = [<View style={styles.actionButtons}>{r24}{((Component) => <Component selectedProduct={selectedProduct} size="md" onTrackPress={value13} />)(importDefault(10057) /* metro dependency 10057: WishlistButton */)}</View>];
|
||||
r9 = r9 && <><View style={styles.badgeWrapper}>{((Component) => <Component location="ProductDetailsActionSheet" disablePressable />)(importDefault(10089) /* metro dependency 10089: FramesEarlyAccessBadge */)}</View><Spacer size={(importDefault(697) /* metro dependency 697: native */).space.PX_16} /></>;
|
||||
items2[1] = r9;
|
||||
items2[2] = ((Component) => <Component product={selectedProduct} handlePreviewPress={value19} onTrackPress={value13} onBundleActiveItemTypeChange={property9} onBundleActiveItemChange={value23} />)(importDefault(10090) /* metro dependency 10090: ProductDetailsActionSheetPreview */);
|
||||
items2[3] = ((Component) => <Component product={selectedProduct} onTrackPress={value13} />)(importDefault(10102) /* metro dependency 10102: ProductDetailsActionSheetInfo */);
|
||||
items2[4] = ((Component) => <Component product={product} selectedVariantIndex={property3} onVariantSelect={property4} />)(importDefault(10108) /* metro dependency 10108: ProductDetailsActionSheetVariants */);
|
||||
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
items2[5] = <Spacer size={PX_16} />;
|
||||
const bottomSheetScrollView = <BottomSheetScrollView scrollsToTop={false} style={styles.container} ref={value5}>{items2}</BottomSheetScrollView>;
|
||||
const NativePaymentContextProvider = (require(10109) /* metro dependency 10109: NativePaymentContext */).NativePaymentContextProvider;
|
||||
return (
|
||||
<AnalyticsLocationProvider value={analyticsLocations}>
|
||||
<BottomSheet {...bottomSheetProps}>
|
||||
{bottomSheetScrollView}
|
||||
<NativePaymentContextProvider skuIDs={[]} activeSubscription={null}>
|
||||
{((Component) => <Component paymentGateway={paymentGateway} waitAndCreateOrder={enabled && paymentGateway === PaymentGateways.APPLE_ADVANCED_COMMERCE} skuIds={[selectedProduct.skuId]} isGift={false} activeSubscription={null} key={selectedProduct.skuId}>{((Component) => <Component onBuy={value28} product={selectedProduct} analyticsLocations={analyticsLocations} onTrackPress={value13} />)(importDefault(10111) /* metro dependency 10111: ProductDetailsActionSheetPurchaseSection */)}</Component>)(importDefault(7335) /* metro dependency 7335: NativeCheckoutStoreProvider */)}
|
||||
</NativePaymentContextProvider>
|
||||
</BottomSheet>
|
||||
</AnalyticsLocationProvider>
|
||||
);
|
||||
}
|
||||
|
||||
function ProductDetailsActionSheetWithOrderCTX(a0) { // fn#78805, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10272:5798, offset: 0x01e357c4, size: 93 bytes, params: 2, frame: 15
|
||||
return (
|
||||
<ProductDetailsActionSheetInner
|
||||
{...a0}
|
||||
{...{['paymentGateway']: (require(477) /* metro dependency 477: PlatformUtils */).isIOS() ? PaymentGateways.APPLE_ADVANCED_COMMERCE : PaymentGateways.GOOGLE}}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function ProductDetailsActionSheet(a0) { // fn#78806, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10272:5977, offset: 0x01e35821, size: 121 bytes, params: 2, frame: 18
|
||||
const shopAnalyticsContext = a0.shopAnalyticsContext;
|
||||
const r5 = shopAnalyticsContext !== undefined ? shopAnalyticsContext : env0_16;
|
||||
const value = Object.create(null);
|
||||
value.shopAnalyticsContext = 0;
|
||||
const value2 = copyDataProperties({}, a0, value, undefined);
|
||||
const CollectiblesAnalyticsProvider = (require(10023) /* metro dependency 10023: CollectiblesAnalyticsContext */).CollectiblesAnalyticsProvider;
|
||||
return (
|
||||
<CollectiblesAnalyticsProvider newValue={r5}>
|
||||
<ProductDetailsActionSheetWithOrderCTX {...value2} />
|
||||
</CollectiblesAnalyticsProvider>
|
||||
);
|
||||
}
|
||||
|
||||
function PreviewProfileTriggerStyle({pressed}) { // fn#78793, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10272:1661, owner: PreviewProfileTrigger.style, offset: 0x01e34c2d, size: 72 bytes, params: 2, frame: 5
|
||||
return [styles.previewProfileButton, env0_4, result && styles.previewProfileButtonMidnight, pressed && env0_5];
|
||||
}
|
||||
|
||||
function _fun78795() { // fn#78795, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10272:2315, offset: 0x01e3549f, size: 45 bytes, params: 1, frame: 11
|
||||
const value = environment.__proto__;
|
||||
return (require(5133) /* metro dependency 5133: CollectiblesProductUtils */).getProductSkuIds(product);
|
||||
}
|
||||
|
||||
function useHandlePreviewPress({product, variantIndex, analyticsLocations, shopAnalyticsContext, setShouldReset}) { // fn#78796, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10272:3038, owner: ProductDetailsActionSheetInner.useHandlePreviewPress, offset: 0x01e354cc, size: 151 bytes, params: 2, frame: 19
|
||||
return env1_4.useCallback(_fun78797, [product, variantIndex, setShouldReset,
|
||||
(require(7594) /* metro dependency 7594: useCurrentUser */).useCurrentUser().id, analyticsLocations,
|
||||
shopAnalyticsContext]);
|
||||
}
|
||||
|
||||
function _fun78799() { // fn#78799, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10272:3648, offset: 0x01e3560d, size: 180 bytes, params: 1, frame: 13
|
||||
const CollectiblesItemType = (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType;
|
||||
if (env0_7) {
|
||||
return env0_6.firstProfileEffect != null ? CollectiblesItemType.PROFILE_EFFECT : env0_6.firstAvatarDecoration != null ? CollectiblesItemType.AVATAR_DECORATION : env0_6.firstNameplate != null ? CollectiblesItemType.NAMEPLATE : undefined;
|
||||
}
|
||||
}
|
||||
|
||||
function _fun78800(a0) { // fn#78800, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10272:3919, offset: 0x01e356c1, size: 33 bytes, params: 2, frame: 12
|
||||
env0_5(a0);
|
||||
env0_8(a0.type);
|
||||
}
|
||||
|
||||
function _fun78801() { // fn#78801, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10272:4179, offset: 0x01e356e2, size: 66 bytes, params: 1, frame: 13
|
||||
const type = product.type;
|
||||
const CollectiblesItemType = (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType;
|
||||
const BUNDLE = CollectiblesItemType.BUNDLE;
|
||||
if (type === BUNDLE) {
|
||||
env0_3(false);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun78802() { // fn#78802, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10272:4259, offset: 0x01e35724, size: 86 bytes, params: 1, frame: 16
|
||||
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
const track = defaultImport.track;
|
||||
const OPEN_MODAL = AnalyticEvents.OPEN_MODAL;
|
||||
Reflect.apply(track, defaultImport, [OPEN_MODAL, {type: 'Collectibles Shop Details Modal', location_stack: env0_1,
|
||||
sku_id: product.skuId}]);
|
||||
}
|
||||
|
||||
function onExpand() { // fn#78803, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10272:4667, owner: ProductDetailsActionSheetInner.onExpand, offset: 0x01e3577a, size: 45 bytes, params: 1, frame: 13
|
||||
return env0_2.current?.scrollToEnd({animated: true});
|
||||
}
|
||||
|
||||
function ProductDetailsActionSheetInnerOnDismiss() { // fn#78804, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10272:4752, owner: ProductDetailsActionSheetInner.onDismiss, offset: 0x01e357a7, size: 29 bytes, params: 1, frame: 11
|
||||
const binding = env0_4;
|
||||
const CLOSE_DETAIL = ShopCtaEnum.CLOSE_DETAIL;
|
||||
return binding(CLOSE_DETAIL);
|
||||
}
|
||||
|
||||
function _fun78797() { // fn#78797, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10272:3212, offset: 0x01e35563, size: 91 bytes, params: 1, frame: 13
|
||||
setShouldReset(false);
|
||||
(importDefault(8743) /* metro dependency 8743: showUserProfileActionSheet */)({userId: env0_5.id,
|
||||
isPreviewingChanges: true, sourceAnalyticsLocations: analyticsLocations, onClose: onClose_78798});
|
||||
}
|
||||
|
||||
function onClose_78798() { // fn#78798, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10272:3303, offset: 0x01e355be, size: 79 bytes, params: 1, frame: 13
|
||||
const value = environment.__proto__.__proto__.__proto__;
|
||||
return (require(10085) /* metro dependency 10085: openProductDetailsActionSheet */).openProductDetailsActionSheet({product: product,
|
||||
initialVariantIndex: variantIndex, analyticsLocations: analyticsLocations,
|
||||
shopAnalyticsContext: shopAnalyticsContext});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,101 @@
|
||||
/* Metro module 10102; source: modules/collectibles/native/ProductDetailsActionSheetInfo.tsx; dependencies: [27, 33, 4501, 697, 10103, 4573, 5134, 10060, 1244, 10104, 8487, 1904, 10030, 2] */
|
||||
function _fun78875(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78875, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10288:6, offset: 0x01e3985a, size: 325 bytes, params: 8, frame: 23
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = (require(27) /* metro dependency 27 */).View;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_4 = value.jsx;
|
||||
const env0_5 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
const object = {};
|
||||
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
object.marginTop = PX_24;
|
||||
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object.marginHorizontal = PX_16;
|
||||
object.flexDirection = 'column';
|
||||
object.gap = 20;
|
||||
const env0_6 = Reflect.apply(createStyles, value, [{title: {marginBottom: 2}, body: object,
|
||||
bundleBody: {marginTop: 0}, description: {'flexDirection': 'column', 'gap': 6}}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/ProductDetailsActionSheetInfo.tsx');
|
||||
exports.default = _default_78879;
|
||||
}
|
||||
|
||||
function ProductNameAndDescription({product}) { // fn#78876, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10288:385, offset: 0x01e3999f, size: 195 bytes, params: 2, frame: 22
|
||||
const styles = useStyles();
|
||||
const value2 = (require(10103) /* metro dependency 10103: useProductDescription */).useProductDescription(product);
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return (
|
||||
<View style={styles.description}>
|
||||
<Text
|
||||
variant="heading-xl/bold"
|
||||
color="mobile-text-heading-primary"
|
||||
style={styles.title}
|
||||
accessibilityRole="header"
|
||||
>
|
||||
{product.name}
|
||||
</Text>
|
||||
<Text variant="text-md/medium" color="text-default">
|
||||
{value2}
|
||||
</Text>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function ProductPurchaseStatus({product, onTrackPress}) { // fn#78877, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10288:726, offset: 0x01e39a62, size: 369 bytes, params: 2, frame: 23
|
||||
var r4;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var value;
|
||||
const isPremiumCollectiblesProduct2 = (require(5134) /* metro dependency 5134: CollectiblesUtils */).isPremiumCollectiblesProduct(product);
|
||||
const {isPurchased,
|
||||
isPartiallyOwnedBundle} = (require(10060) /* metro dependency 10060: useProductPurchaseState */).useProductPurchaseState(product);
|
||||
if (isPurchased) {
|
||||
r4 = <Text variant="text-md/semibold" color="interactive-text-active">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['6cfuDj'])}</Text>;
|
||||
} else if (isPartiallyOwnedBundle) {
|
||||
r4 = <Text variant="text-md/semibold" color="interactive-text-active">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.BEjTij)}</Text>;
|
||||
} else if (isPremiumCollectiblesProduct2) {
|
||||
r4 = !isPremiumCollectiblesProduct2;
|
||||
} else {
|
||||
value = importDefault(10104) /* metro dependency 10104: InlinePriceTag */;
|
||||
value = ((Component) => <Component product={product} onTrackPress={onTrackPress} />)(value);
|
||||
r4 = value;
|
||||
}
|
||||
return (
|
||||
<View>
|
||||
{r4}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function BundleProductDetailsActionSheetInfo({product, onTrackPress}) { // fn#78878, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10288:1240, offset: 0x01e39bd3, size: 190 bytes, params: 2, frame: 21
|
||||
const styles = useStyles();
|
||||
const collectiblesMobileFlexibleBundlesExperimentModule = require(8487) /* metro dependency 8487: CollectiblesMobileFlexibleBundlesExperiment */;
|
||||
const useCollectiblesMobileFlexibleBundlesExperiment = collectiblesMobileFlexibleBundlesExperimentModule.useCollectiblesMobileFlexibleBundlesExperiment;
|
||||
const enabled = Reflect.apply(useCollectiblesMobileFlexibleBundlesExperiment,
|
||||
collectiblesMobileFlexibleBundlesExperimentModule, ['BundleProductDetailsActionSheetInfo']).enabled;
|
||||
return (
|
||||
<View style={[styles.body, enabled && styles.bundleBody]}>
|
||||
{!enabled && <ProductNameAndDescription product={product} />}
|
||||
<ProductPurchaseStatus product={product} onTrackPress={onTrackPress} />
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _default_78879({product, onTrackPress}) { // fn#78879, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10288:1549, offset: 0x01e39c91, size: 217 bytes, params: 2, frame: 21
|
||||
var r0;
|
||||
var moduleValue;
|
||||
const styles = useStyles();
|
||||
const type = product.type;
|
||||
const CollectiblesItemType = (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType;
|
||||
const BUNDLE = CollectiblesItemType.BUNDLE;
|
||||
if (type !== BUNDLE) {
|
||||
r0 = <View style={styles.body}><ProductNameAndDescription product={product} /><ProductPurchaseStatus product={product} onTrackPress={onTrackPress} /></View>;
|
||||
} else {
|
||||
moduleValue = require(10030) /* metro dependency 10030: bundleUtils */;
|
||||
r0 = moduleValue.isValidCollectiblesBundle(product) ? <BundleProductDetailsActionSheetInfo product={product} onTrackPress={onTrackPress} /> : <View style={styles.body}><ProductNameAndDescription product={product} /><ProductPurchaseStatus product={product} onTrackPress={onTrackPress} /></View>;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,198 @@
|
||||
/* Metro module 10090; source: modules/collectibles/native/ProductDetailsActionSheetPreview.tsx; dependencies: [57, 31, 27, 663, 33, 4501, 697, 1904, 8487, 10091, 7609, 1244, 10093, 8853, 8861, 9221, 10030, 2] */
|
||||
function _fun78825(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78825, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10276:6, offset: 0x01e364ed, size: 446 bytes, params: 8, frame: 23
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
let value = require(31) /* metro dependency 31 */;
|
||||
const env0_4 = value.useCallback;
|
||||
const env0_5 = value.useMemo;
|
||||
const env0_6 = value.useState;
|
||||
const env0_7 = (require(27) /* metro dependency 27 */).View;
|
||||
const env0_8 = (require(663) /* metro dependency 663: CollectiblesShopConstants */).ShopCtaEnum;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_9 = value.jsx;
|
||||
const env0_10 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
const object4 = {};
|
||||
const BACKGROUND_MOD_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_SUBTLE;
|
||||
object4.borderBottomColor = BACKGROUND_MOD_SUBTLE;
|
||||
object4.borderBottomWidth = 1;
|
||||
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object4.paddingBottom = PX_16;
|
||||
object4.flex = 1;
|
||||
const env0_11 = Reflect.apply(createStyles, value, [{previewContainer: {flex: 1}, previewDivider: object4}]);
|
||||
object2 = {};
|
||||
const CollectiblesItemType = (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType;
|
||||
const PROFILE_EFFECT = CollectiblesItemType.PROFILE_EFFECT;
|
||||
object2.profile = PROFILE_EFFECT;
|
||||
const AVATAR_DECORATION = CollectiblesItemType.AVATAR_DECORATION;
|
||||
object2.decoration = AVATAR_DECORATION;
|
||||
const NAMEPLATE = CollectiblesItemType.NAMEPLATE;
|
||||
object2.nameplate = NAMEPLATE;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/ProductDetailsActionSheetPreview.tsx');
|
||||
exports.default = _default_78833;
|
||||
}
|
||||
|
||||
function BundleProductPreview({product, width, handlePreviewPress, onTrackPress, onActiveItemChange, onActiveItemTypeChange}) { // fn#78826, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10276:590, offset: 0x01e366ab, size: 218 bytes, params: 2, frame: 23
|
||||
var r0;
|
||||
var value;
|
||||
const styles = useStyles();
|
||||
const collectiblesMobileFlexibleBundlesExperimentModule = require(8487) /* metro dependency 8487: CollectiblesMobileFlexibleBundlesExperiment */;
|
||||
const useCollectiblesMobileFlexibleBundlesExperiment = collectiblesMobileFlexibleBundlesExperimentModule.useCollectiblesMobileFlexibleBundlesExperiment;
|
||||
if (Reflect.apply(useCollectiblesMobileFlexibleBundlesExperiment, collectiblesMobileFlexibleBundlesExperimentModule,
|
||||
['ProductDetailsActionSheetPreview']).enabled) {
|
||||
value = importDefault(10091) /* metro dependency 10091: BundleProductDetailsActionSheetPreview */;
|
||||
value = ((Component) => <Component product={product} width={width} handlePreviewPress={handlePreviewPress} onTrackPress={onTrackPress} onActiveItemChange={onActiveItemChange} />)(value);
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = <View style={styles.previewDivider}><BundlePreview product={product} width={width} handlePreviewPress={handlePreviewPress} onTrackPress={onTrackPress} onActiveItemTypeChange={onActiveItemTypeChange} /></View>;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function BundlePreview({product, width, handlePreviewPress, onTrackPress, onActiveItemTypeChange}) { // fn#78827, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10276:1052, offset: 0x01e36785, size: 429 bytes, params: 2, frame: 23
|
||||
const env0_3 = onTrackPress;
|
||||
const value2 = (require(7609) /* metro dependency 7609: useShopProductItems */).useShopProductItems(product);
|
||||
const [property, env0_7] = env0_3(useState(0), 2);
|
||||
const value6 = (require(8853) /* metro dependency 8853: SegmentedControlStateNative */).useSegmentedControlState({items: useMemo(_fun78828,
|
||||
[product, width, handlePreviewPress, value2, onTrackPress, property]), pageWidth: width, defaultIndex: 0,
|
||||
onPageChange: onPageChange_78830, onSetActiveIndex: onSetActiveIndex_78832});
|
||||
const SegmentedControlPages = (require(8861) /* metro dependency 8861: SegmentedControlPagesNative */).SegmentedControlPages;
|
||||
const segmentedControlPages = <SegmentedControlPages state={value6} />;
|
||||
const object = {};
|
||||
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object.paddingHorizontal = PX_16;
|
||||
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object.paddingTop = PX_12;
|
||||
const SegmentedControl = (require(9221) /* metro dependency 9221: SegmentedControlNative */).SegmentedControl;
|
||||
return (
|
||||
<View>
|
||||
{segmentedControlPages}
|
||||
<View style={object}>
|
||||
<SegmentedControl state={value6} variant="default" />
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _default_78833({product, handlePreviewPress, onTrackPress, onBundleActiveItemTypeChange, onBundleActiveItemChange}) { // fn#78833, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10276:2476, offset: 0x01e36c42, size: 349 bytes, params: 2, frame: 26
|
||||
const styles = useStyles();
|
||||
const [property, env0_0] = env0_3(useState(0), 2);
|
||||
const value4 = useCallback(_fun78834, []);
|
||||
const type = product.type;
|
||||
const CollectiblesItemType = (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType;
|
||||
const BUNDLE = CollectiblesItemType.BUNDLE;
|
||||
let r4 = type === BUNDLE && (require(10030) /* metro dependency 10030: bundleUtils */).isValidCollectiblesBundle(product);
|
||||
r4 = r4 ? <BundleProductPreview product={product} width={property} handlePreviewPress={handlePreviewPress} onTrackPress={onTrackPress} onActiveItemChange={onBundleActiveItemChange} onActiveItemTypeChange={onBundleActiveItemTypeChange} /> : <View style={styles.previewDivider}>{((IndividualProductPreview) => <IndividualProductPreview product={product} width={property} handlePreviewPress={handlePreviewPress} onTrackPress={onTrackPress} />)((require(10093) /* metro dependency 10093: IndividualProductPreview */).IndividualProductPreview)}</View>;
|
||||
return (
|
||||
<View style={styles.previewContainer} onLayout={value4}>
|
||||
{r4}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun78828() { // fn#78828, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10276:1210, offset: 0x01e36932, size: 536 bytes, params: 1, frame: 21
|
||||
var environment;
|
||||
var r1;
|
||||
var r0;
|
||||
var object;
|
||||
var value3;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var object2;
|
||||
var value4;
|
||||
var object4;
|
||||
var value5;
|
||||
const firstProfileEffect = env0_5.firstProfileEffect;
|
||||
const value2 = null;
|
||||
if (value2 != firstProfileEffect) {
|
||||
object = {};
|
||||
value3 = environment.__proto__;
|
||||
object.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['s+YSgo']);
|
||||
object.id = 'profile';
|
||||
object.page = ((ProfileEffectPreview) => <ProfileEffectPreview profileEffect={env0_5.firstProfileEffect} profileEffectRestartKey={env0_6} width={width} handlePreviewPress={handlePreviewPress} onTrackPress={onTrackPress} />)((require(10093) /* metro dependency 10093: IndividualProductPreview */).ProfileEffectPreview);
|
||||
r1 = object;
|
||||
} else {
|
||||
r1 = value2;
|
||||
}
|
||||
object = [r1];
|
||||
if (value2 != env0_5.firstAvatarDecoration) {
|
||||
object2 = {};
|
||||
value4 = environment.__proto__;
|
||||
object2.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.aVCcr8);
|
||||
object2.id = 'decoration';
|
||||
object2.page = ((AvatarDecorationPreview) => <AvatarDecorationPreview product={product} handlePreviewPress={handlePreviewPress} onTrackPress={onTrackPress} />)((require(10093) /* metro dependency 10093: IndividualProductPreview */).AvatarDecorationPreview);
|
||||
r1 = object2;
|
||||
} else {
|
||||
r1 = value2;
|
||||
}
|
||||
object[1] = r1;
|
||||
if (value2 != env0_5.firstNameplate) {
|
||||
object4 = {};
|
||||
value5 = environment.__proto__;
|
||||
object4.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.HNnSVZ);
|
||||
object4.id = 'nameplate';
|
||||
object4.page = ((NameplatePreview) => <NameplatePreview product={product} />)((require(10093) /* metro dependency 10093: IndividualProductPreview */).NameplatePreview);
|
||||
r0 = object4;
|
||||
} else {
|
||||
r0 = value2;
|
||||
}
|
||||
object[2] = r0;
|
||||
return object.filter(function(a0) {
|
||||
return a0 != null;
|
||||
});
|
||||
}
|
||||
|
||||
function BundlePreviewOnPageChange(a0) { // fn#78830, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10276:1904, owner: BundlePreview.onPageChange, offset: 0x01e36b4a, size: 60 bytes, params: 2, frame: 13
|
||||
const property = env0_8[a0];
|
||||
const value2 = undefined;
|
||||
if ((property == null ? value2 : property.id) === 'profile') {
|
||||
env0_7(function(a0) {
|
||||
return a0 + 1;
|
||||
});
|
||||
}
|
||||
return value2;
|
||||
}
|
||||
|
||||
function BundlePreviewOnSetActiveIndex(a0) { // fn#78832, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10276:1986, owner: BundlePreview.onSetActiveIndex, offset: 0x01e36b86, size: 188 bytes, params: 2, frame: 14
|
||||
var value3;
|
||||
var onTrackPressBinding;
|
||||
let property = env0_8[a0];
|
||||
const value2 = undefined;
|
||||
const id = property == null ? value2 : property.id;
|
||||
if (id != null) {
|
||||
value3 = environment.__proto__;
|
||||
property = env1_12[id];
|
||||
if (property != null) {
|
||||
if (onActiveItemTypeChange != null) {
|
||||
onActiveItemTypeChange(property);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (id === 'profile') {
|
||||
onTrackPressBinding = onTrackPress;
|
||||
if (onTrackPressBinding != null) {
|
||||
onTrackPressBinding = onTrackPress;
|
||||
value = environment.__proto__;
|
||||
onTrackPressBinding(ShopCtaEnum.BUNDLE_VIEW_PROFILE_EFFECT);
|
||||
}
|
||||
} else if (id === 'decoration') {
|
||||
onTrackPressBinding = onTrackPress;
|
||||
if (onTrackPressBinding != null) {
|
||||
onTrackPressBinding = onTrackPress;
|
||||
value = environment.__proto__;
|
||||
onTrackPressBinding(ShopCtaEnum.BUNDLE_VIEW_AVATAR_DECORATION);
|
||||
}
|
||||
} else if (id === 'nameplate') {
|
||||
onTrackPressBinding = onTrackPress;
|
||||
if (onTrackPressBinding != null) {
|
||||
onTrackPressBinding = onTrackPress;
|
||||
value = environment.__proto__;
|
||||
onTrackPressBinding(ShopCtaEnum.BUNDLE_VIEW_NAMEPLATE);
|
||||
}
|
||||
}
|
||||
return value2;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,774 @@
|
||||
/* Metro module 10111; source: modules/collectibles/native/ProductDetailsActionSheetPurchaseSection.tsx; dependencies: [57, 31, 27, 7042, 5145, 663, 661, 7607, 1880, 33, 4501, 697, 8341, 10112, 4080, 10085, 7631, 1244, 10107, 10106, 1484, 6771, 5080, 10113, 1962, 5120, 10122, 10144, 7589, 10076, 4573, 4579, 6766, 1904, 4048, 4002, 3860, 7594, 10060, 566, 8712, 3802, 5134, 5133, 10069, 7606, 10146, 10149, 10150, 7260, 7629, 1585, 4589, 7744, 4578, 478, 6789, 1948, 10152, 2] */
|
||||
function _fun78918(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78918, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10297:6, offset: 0x01e3be49, size: 724 bytes, params: 8, frame: 23
|
||||
var object3;
|
||||
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 env0_6 = (require(7042) /* metro dependency 7042: NativeCheckoutStore */).useNativeCheckoutStore;
|
||||
const collectiblesPurchaseStore = importDefault(5145) /* metro dependency 5145: CollectiblesPurchaseStore */;
|
||||
let value = require(663) /* metro dependency 663: CollectiblesShopConstants */;
|
||||
const env0_8 = value.EXTERNAL_PRODUCT_SKU_IDS;
|
||||
const env0_9 = value.ShopCtaEnum;
|
||||
value = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_10 = value.HelpdeskArticles;
|
||||
const env0_11 = value.MarketingURLs;
|
||||
const env0_12 = value.UserSettingsSections;
|
||||
const env0_13 = (require(7607) /* metro dependency 7607: MainTabsConstants */).MainTabsNavigatorScreens;
|
||||
value = require(1880) /* metro dependency 1880: PremiumConstants */;
|
||||
const env0_14 = value.PremiumTypes;
|
||||
const env0_15 = value.SubscriptionIntervalTypes;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_16 = value.jsx;
|
||||
const env0_17 = value.jsxs;
|
||||
const env0_18 = value.Fragment;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object3 = {};
|
||||
const object4 = {};
|
||||
const MOBILE_ACTIONSHEET_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_ACTIONSHEET_BACKGROUND;
|
||||
object4.backgroundColor = MOBILE_ACTIONSHEET_BACKGROUND;
|
||||
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object4.paddingHorizontal = PX_16;
|
||||
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object4.paddingTop = PX_8;
|
||||
object3.container = object4;
|
||||
const BORDER_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_MUTED;
|
||||
object3.containerFramesEA = {'borderWidth': 1, 'borderStyle': 'solid', borderColor: BORDER_MUTED};
|
||||
object3.gradientOverlay = {'position': 'absolute', 'top': 0, 'left': 0, 'right': 0, 'bottom': 0};
|
||||
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object3.purchaseSection = {gap: PX_12};
|
||||
object3.disclaimer = {opacity: 0.75};
|
||||
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object3.buttonContainer = {flexDirection: 'row', gap: PX_12};
|
||||
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object3.framesEAContainer = {flexDirection: 'column', gap: PX_8};
|
||||
object3.orbsButtonLabel = {'flexDirection': 'row', 'alignItems': 'center'};
|
||||
object3.orbsButtonText = {flexShrink: 1};
|
||||
const env0_19 = Reflect.apply(createStyles, value, [object3]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/ProductDetailsActionSheetPurchaseSection.tsx');
|
||||
exports.default = _default_78931;
|
||||
}
|
||||
|
||||
function GiftButton({product, analyticsLocations, variant, onTrackPress}) { // fn#78919, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10297:1119, offset: 0x01e3c11d, size: 289 bytes, params: 2, frame: 21
|
||||
variant = variant === undefined ? 'primary' : variant;
|
||||
const IconButton = (require(8341) /* metro dependency 8341: IconButtonNative */).IconButton;
|
||||
const object2 = {size: 'lg', variant: variant};
|
||||
const GiftIcon = (require(10112) /* metro dependency 10112: GiftIcon */).GiftIcon;
|
||||
object2.icon = <GiftIcon size="md" color={variant === 'primary' ? (importDefault(697) /* metro dependency 697: native */).colors.WHITE : (importDefault(697) /* metro dependency 697: native */).colors.TEXT_STRONG} />;
|
||||
object2.onPress = onPress_78920;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const PEjaCx = (require(1244) /* metro dependency 1244: indexNative */).t.PEjaCx;
|
||||
object2.accessibilityLabel = Reflect.apply(string, intl, [PEjaCx]);
|
||||
return <IconButton {...object2} />;
|
||||
}
|
||||
|
||||
function VCButton({balance, product, hasShopDiscount, onTrackPress}) { // fn#78921, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10297:1585, offset: 0x01e3c2ce, size: 702 bytes, params: 2, frame: 25
|
||||
hasShopDiscount = !(hasShopDiscount === undefined) && hasShopDiscount;
|
||||
const styles = useStyles();
|
||||
const {price,
|
||||
canAfford} = (require(10107) /* metro dependency 10107: useVirtualCurrencyData */).useVirtualCurrencyData(product,
|
||||
hasShopDiscount);
|
||||
const useProductDisableStateModule = require(10106) /* metro dependency 10106: useProductDisableState */;
|
||||
const useProductDisableState = useProductDisableStateModule.useProductDisableState;
|
||||
const r8 = Reflect.apply(useProductDisableState, useProductDisableStateModule,
|
||||
[product.skuId]).isDisabled || !canAfford;
|
||||
const value4 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
|
||||
const env0_6 = value4.useCallback(_fun78922, [value4, product, balance,
|
||||
(importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().analyticsLocations]);
|
||||
if (price == null) {
|
||||
return null;
|
||||
}
|
||||
const colors = (importDefault(697) /* metro dependency 697: native */).colors;
|
||||
const env0_7 = r8 ? colors.INTERACTIVE_TEXT_ACTIVE : colors.WHITE;
|
||||
const env0_8 = r8 ? 'interactive-text-active' : 'white';
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const format = intl.format;
|
||||
const JC15qj = (require(1244) /* metro dependency 1244: indexNative */).t.JC15qj;
|
||||
const value7 = Reflect.apply(format, intl, [JC15qj, {orbPrice: price.amount, orbIconHook: orbIconHook}]);
|
||||
const Array = global.Array;
|
||||
const view = <View style={styles.orbsButtonLabel} accessibilityLabel={intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.yi41qQ,
|
||||
{orbPrice: price.amount})}>{(Array.isArray(value7) ? value7 : [value7]).map(_fun78928)}</View>;
|
||||
const BaseTextButton = (require(4579) /* metro dependency 4579: BaseTextButtonNative */).BaseTextButton;
|
||||
return (
|
||||
<View style={styles.buttonContainer}>
|
||||
<BaseTextButton
|
||||
loading={false}
|
||||
textElement={view}
|
||||
onPress={onPress_78929}
|
||||
disabled={r8}
|
||||
size="lg"
|
||||
variant={r8 ? 'secondary' : 'primary'}
|
||||
grow
|
||||
/>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function PurchaseDisclaimer({product, buyButtonLabel}) { // fn#78930, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10297:3513, offset: 0x01e3c965, size: 212 bytes, params: 2, frame: 21
|
||||
var r4;
|
||||
var intl;
|
||||
const styles = useStyles();
|
||||
const TextWithIOSLinkWorkaround = (require(6766) /* metro dependency 6766: TextWithIOSLinkWorkaround */).TextWithIOSLinkWorkaround;
|
||||
const type = product.type;
|
||||
const CollectiblesItemType = (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType;
|
||||
const EXTERNAL_SKU = CollectiblesItemType.EXTERNAL_SKU;
|
||||
const value2 = type !== EXTERNAL_SKU;
|
||||
if (value2) {
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
r4 = intl.format((require(1244) /* metro dependency 1244: indexNative */).t.iIglwJ,
|
||||
{buyButtonLabel: buyButtonLabel,
|
||||
paidServiceTermURL: MarketingURLs.PAID_TERMS});
|
||||
} else {
|
||||
r4 = value2;
|
||||
}
|
||||
return (
|
||||
<TextWithIOSLinkWorkaround
|
||||
style={styles.disclaimer}
|
||||
variant="text-xxs/normal"
|
||||
color="interactive-text-active"
|
||||
>
|
||||
{r4}
|
||||
</TextWithIOSLinkWorkaround>
|
||||
);
|
||||
}
|
||||
|
||||
function _default_78931({product, analyticsLocations, onBuy, onTrackPress}) { // fn#78931, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10297:3843, offset: 0x01e3ca39, size: 1488 bytes, params: 2, frame: 35
|
||||
var jsxRuntimeEnv0_18Binding;
|
||||
var defaultImport4;
|
||||
var gradientOverlay;
|
||||
var items4;
|
||||
var defaultImport5;
|
||||
var object;
|
||||
var Defs;
|
||||
var RadialGradient;
|
||||
const Stop = (require(7744) /* metro dependency 7744 */).Stop;
|
||||
var items5;
|
||||
const styles = useStyles();
|
||||
const env0_3 = styles;
|
||||
const isThemeDark2 = (require(4002) /* metro dependency 4002: shared */).isThemeDark((importDefault(4048) /* metro dependency 4048: useTheme */)());
|
||||
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
|
||||
const useToken = useTokenModule.useToken;
|
||||
const MOBILE_ACTIONSHEET_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_ACTIONSHEET_BACKGROUND;
|
||||
const value4 = Reflect.apply(useToken, useTokenModule, [MOBILE_ACTIONSHEET_BACKGROUND]);
|
||||
const value5 = (require(7594) /* metro dependency 7594: useCurrentUser */).useCurrentUser();
|
||||
const value6 = (require(10060) /* metro dependency 10060: useProductPurchaseState */).useProductPurchaseState(product);
|
||||
const isPurchased = value6.isPurchased;
|
||||
const env0_5 = value6.isPartiallyOwnedBundle;
|
||||
const fluxModule = require(566) /* metro dependency 566: flux */;
|
||||
const useStateFromStoresArray = fluxModule.useStateFromStoresArray;
|
||||
const env0_6 = env0_3(Reflect.apply(useStateFromStoresArray, fluxModule, [[CollectiblesPurchaseStore], function() {
|
||||
return [CollectiblesPurchaseStore.isClaiming === product.skuId];
|
||||
}, [product]]), 1)[0];
|
||||
const useIsPremiumSubscriberModule = require(8712) /* metro dependency 8712: useIsPremiumSubscriber */;
|
||||
const useIsPremiumSubscriber = useIsPremiumSubscriberModule.useIsPremiumSubscriber;
|
||||
const TIER_2 = PremiumTypes.TIER_2;
|
||||
const env0_7 = Reflect.apply(useIsPremiumSubscriber, useIsPremiumSubscriberModule, [TIER_2]);
|
||||
const canUseShopDiscounts2 = (importDefault(3802) /* metro dependency 3802: PremiumUtils */).canUseShopDiscounts(value5);
|
||||
const env0_9 = (require(5134) /* metro dependency 5134: CollectiblesUtils */).isPremiumCollectiblesProduct(product);
|
||||
const env0_10 = (require(5134) /* metro dependency 5134: CollectiblesUtils */).isFreeCollectiblesProduct(product);
|
||||
const env0_11 = (require(5133) /* metro dependency 5133: CollectiblesProductUtils */).isOrbsExclusiveProduct(product);
|
||||
const hooksModule = require(10069) /* metro dependency 10069: hooks */;
|
||||
const useFetchVirtualCurrencyBalance = hooksModule.useFetchVirtualCurrencyBalance;
|
||||
const env0_12 = Reflect.apply(useFetchVirtualCurrencyBalance, hooksModule, []).balance;
|
||||
const useVirtualCurrencyDataModule = require(10107) /* metro dependency 10107: useVirtualCurrencyData */;
|
||||
const useVirtualCurrencyData = useVirtualCurrencyDataModule.useVirtualCurrencyData;
|
||||
const env0_13 = Reflect.apply(useVirtualCurrencyData, useVirtualCurrencyDataModule, [product,
|
||||
canUseShopDiscounts2]).canAfford;
|
||||
const value9 = (require(7606) /* metro dependency 7606: useHandleUseNow */).useHandleUseNow({product: product,
|
||||
analyticsLocations: analyticsLocations});
|
||||
const env0_14 = value9.handleUseNow;
|
||||
const env0_15 = value9.isApplying;
|
||||
const env0_16 = value9.canUseNow;
|
||||
const env0_17 = value9.handleEditProfile;
|
||||
const value11 = (importDefault(10146) /* metro dependency 10146: useHandleBuyNow */)({product: product,
|
||||
analyticsLocations: analyticsLocations, onBuy: onBuy, orderId: useNativeCheckoutStore(function(a0) {
|
||||
return a0.orderRecord;
|
||||
})?.id});
|
||||
const env0_18 = value11.handleBuyNow;
|
||||
const env0_19 = value11.isBuying;
|
||||
const useHandleClaimModule = require(10149) /* metro dependency 10149: useHandleClaim */;
|
||||
const useHandleClaim = useHandleClaimModule.useHandleClaim;
|
||||
const env0_20 = Reflect.apply(useHandleClaim, useHandleClaimModule, [{product: product}]).handleClaim;
|
||||
let r6 = (importDefault(10150) /* metro dependency 10150: useShouldShowPremiumProfileFrameCTA */)({location: 'ProductDetailsActionSheetPurchaseSection',
|
||||
product: product}) && !isPurchased;
|
||||
const env0_22 = (require(7260) /* metro dependency 7260: PremiumBogoPromotionUtilsCommon */).useIsEligibleForBogoPromotion(false) ? SubscriptionIntervalTypes.MONTH : SubscriptionIntervalTypes.YEAR;
|
||||
const env0_23 = (require(7629) /* metro dependency 7629: useCanGiftProduct */).useCanGiftProduct(product);
|
||||
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
|
||||
const items2 = [styles.container];
|
||||
items2[1] = r6 && styles.containerFramesEA;
|
||||
const object3 = {};
|
||||
object3.paddingBottom = bottom ?? (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
items2[2] = object3;
|
||||
if (r6) {
|
||||
jsxRuntimeEnv0_18Binding = jsxRuntimeEnv0_18;
|
||||
defaultImport4 = importDefault(4589) /* metro dependency 4589 */;
|
||||
gradientOverlay = styles.gradientOverlay;
|
||||
items4 = [((Component) => <Component colors={['rgba(160, 86, 242, 0.45)',
|
||||
'rgba(22, 26, 138, 0.45)']} locations={[0.0854, 0.7847]} start={{'x': 0, 'y': 0}} end={{'x': 1,
|
||||
'y': 1}} style={[gradientOverlay,
|
||||
!isThemeDark2 && ({opacity: 0.4})]} pointerEvents="none" />)(defaultImport4)];
|
||||
defaultImport5 = importDefault(7744) /* metro dependency 7744 */;
|
||||
object = {'style': null, 'preserveAspectRatio': 'none', 'viewBox': '0 0 100 100', 'pointerEvents': 'none'};
|
||||
gradientOverlay = styles.gradientOverlay;
|
||||
object.style = gradientOverlay;
|
||||
Defs = (require(7744) /* metro dependency 7744 */).Defs;
|
||||
RadialGradient = (require(7744) /* metro dependency 7744 */).RadialGradient;
|
||||
items5 = [<Stop offset="60%" stopColor={value4} stopOpacity={1} />];
|
||||
items5[1] = <Stop offset="100%" stopColor={value4} stopOpacity={0} />;
|
||||
items4[1] = ((Component) => <Component {...object}><Defs><RadialGradient id="frameEAVignette" cx="50%" cy="100%" rx="100%" ry="100%" fx="50%" fy="100%">{items5}</RadialGradient></Defs>{((Rect) => <Rect x="0" y="0" width="100" height="100" fill="url(#frameEAVignette)" />)((require(7744) /* metro dependency 7744 */).Rect)}</Component>)(defaultImport5);
|
||||
r6 = <>{items4}</>;
|
||||
}
|
||||
return (
|
||||
<View style={items2}>
|
||||
{[r6, _fun78934()]}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function GiftButtonOnPress() { // fn#78920, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10297:1349, owner: GiftButton.onPress, offset: 0x01e3c23e, size: 144 bytes, params: 1, frame: 15
|
||||
var value2;
|
||||
let onTrackPressBinding = onTrackPress;
|
||||
if (onTrackPressBinding != null) {
|
||||
onTrackPressBinding = onTrackPress;
|
||||
value2 = environment.__proto__;
|
||||
onTrackPressBinding(ShopCtaEnum.SEND_AS_GIFT);
|
||||
}
|
||||
const defaultImport = importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */;
|
||||
const hideActionSheet = defaultImport.hideActionSheet;
|
||||
const PRODUCT_DETAILS_ACTION_SHEET_KEY = (require(10085) /* metro dependency 10085: openProductDetailsActionSheet */).PRODUCT_DETAILS_ACTION_SHEET_KEY;
|
||||
Reflect.apply(hideActionSheet, defaultImport, [PRODUCT_DETAILS_ACTION_SHEET_KEY]);
|
||||
(require(7631) /* metro dependency 7631: openGiftModal */).openShopGiftModal({skuId: product.skuId,
|
||||
analyticsLocations: analyticsLocations});
|
||||
}
|
||||
|
||||
function _fun78922() { // fn#78922, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10297:1854, offset: 0x01e3c58c, size: 143 bytes, params: 1, frame: 17
|
||||
var environment;
|
||||
let value = environment.__proto__;
|
||||
importDefault(dependencyMap[14]).hideActionSheet();
|
||||
const defaultImport2 = importDefault(dependencyMap[22]);
|
||||
const pushLazy = defaultImport2.pushLazy;
|
||||
value = require(dependencyMap[24]);
|
||||
value = value(dependencyMap[23], dependencyMap.paths);
|
||||
Reflect.apply(pushLazy, defaultImport2, [value, {skuId: product.skuId, analyticsLocations: analyticsLocations,
|
||||
onCheckoutSuccess: onCheckoutSuccess}, 'ORB_CHECKOUT_MODAL']);
|
||||
}
|
||||
|
||||
function orbIconHook() { // fn#78927, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10297:2920, owner: VCButton.orbIconHook, offset: 0x01e3c87f, size: 71 bytes, params: 1, frame: 15
|
||||
const OrbsIcon = (require(10076) /* metro dependency 10076: OrbsIcon */).OrbsIcon;
|
||||
return (
|
||||
<OrbsIcon
|
||||
size="sm"
|
||||
color={env0_7}
|
||||
key="orbs-icon"
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun78928(a0, a1) { // fn#78928, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10297:3143, offset: 0x01e3c8c6, size: 110 bytes, params: 3, frame: 18
|
||||
var r0;
|
||||
var value3;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
let value = a0;
|
||||
const value2 = typeof value;
|
||||
if (value2 === 'string') {
|
||||
value3 = environment.__proto__;
|
||||
value = <Text style={styles.orbsButtonText} variant="text-md/semibold" color={env0_8} key={a1}>{value}</Text>;
|
||||
r0 = value;
|
||||
} else if (value2 !== 'number') {
|
||||
r0 = value;
|
||||
} else {
|
||||
value3 = environment.__proto__;
|
||||
value = <Text style={styles.orbsButtonText} variant="text-md/semibold" color={env0_8} key={a1}>{value}</Text>;
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function VCButtonOnPress() { // fn#78929, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10297:3390, owner: VCButton.onPress, offset: 0x01e3c934, size: 49 bytes, params: 1, frame: 12
|
||||
var value2;
|
||||
let onTrackPressBinding = onTrackPress;
|
||||
if (onTrackPressBinding != null) {
|
||||
onTrackPressBinding = onTrackPress;
|
||||
value2 = environment.__proto__;
|
||||
onTrackPressBinding(ShopCtaEnum.BUY_WITH_ORBS);
|
||||
}
|
||||
env0_6();
|
||||
}
|
||||
|
||||
function _fun78934() { // fn#78934, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10297:5825, offset: 0x01e3d030, size: 2266 bytes, params: 1, frame: 35
|
||||
var environment;
|
||||
var r9;
|
||||
var r5;
|
||||
var r15;
|
||||
var r0;
|
||||
var value2;
|
||||
const UnlockWithNitroButton = (require(10152) /* metro dependency 10152: UnlockWithNitroButton */).UnlockWithNitroButton;
|
||||
var object2;
|
||||
var type;
|
||||
var value3;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var canAffordBinding;
|
||||
var items6;
|
||||
var binding;
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
var isBuyingBinding;
|
||||
var isPartiallyOwnedBundleBinding;
|
||||
var value12;
|
||||
var items2;
|
||||
var analyticsLocationsBinding;
|
||||
var value21;
|
||||
var value22;
|
||||
var property;
|
||||
var AnalyticsLocationProvider;
|
||||
var items3;
|
||||
var value23;
|
||||
const TextWithIOSLinkWorkaround = (require(6766) /* metro dependency 6766: TextWithIOSLinkWorkaround */).TextWithIOSLinkWorkaround;
|
||||
var format;
|
||||
var defaultImport;
|
||||
var items4;
|
||||
var object3;
|
||||
var value25;
|
||||
var value26;
|
||||
var object4;
|
||||
var object5;
|
||||
var items5;
|
||||
if (isPurchased) {
|
||||
type = product.type;
|
||||
value25 = environment.__proto__;
|
||||
value26 = type !== (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType.EXTERNAL_SKU;
|
||||
if (value26) {
|
||||
var viewBindingProps = {style: styles.buttonContainer};
|
||||
if (canUseNow) {
|
||||
object5 = {};
|
||||
object5.loading = isApplying;
|
||||
object5.text = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.MAS7uK);
|
||||
object5.onPress = onPress_78935;
|
||||
object5.size = 'lg';
|
||||
object5.grow = true;
|
||||
r5 = object5;
|
||||
} else {
|
||||
object4 = {};
|
||||
object4.text = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['2p2aYz']);
|
||||
object4.onPress = onPress_78936;
|
||||
object4.size = 'lg';
|
||||
object4.grow = true;
|
||||
r5 = object4;
|
||||
}
|
||||
items5 = [<Button {...r5} />];
|
||||
items5[1] = env0_23 && <GiftButton product={product} analyticsLocations={analyticsLocations} onTrackPress={onTrackPress} />;
|
||||
r0 = <View {...viewBindingProps}>{items5}</View>;
|
||||
} else {
|
||||
r0 = value26;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
if (env0_21) {
|
||||
value22 = environment.__proto__;
|
||||
r15 = (require(478) /* metro dependency 478: PlatformUtils */).isAndroid() ? t.COObWR : t['7wpqfj'];
|
||||
AnalyticsLocationProvider = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider;
|
||||
object2 = {};
|
||||
analyticsLocationsBinding = analyticsLocations;
|
||||
items3 = [];
|
||||
value23 = arraySpread(items3, analyticsLocationsBinding, 0, undefined);
|
||||
items3[value23] = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).PROFILE_FRAMES_EA_MARKETING;
|
||||
value23 + 1;
|
||||
object2.value = items3;
|
||||
var viewBindingProps = {style: styles.framesEAContainer};
|
||||
format = intl.format;
|
||||
property = t['3cglst'];
|
||||
defaultImport = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
|
||||
items4 = [<TextWithIOSLinkWorkaround variant="text-xs/semibold" color="text-strong">{Reflect.apply(format, intl,
|
||||
[property,
|
||||
{articleURL: defaultImport.getArticleURL(HelpdeskArticles.SHOP_FRAMES_EARLY_ACCESS)}])}</TextWithIOSLinkWorkaround>];
|
||||
items4[1] = <UnlockWithNitroButton onTrackPress={onTrackPress} text={intl.string(t['9wfL34'])} />;
|
||||
format = intl.format;
|
||||
object3 = {};
|
||||
object3.paidURL = MarketingURLs.PAID_TERMS;
|
||||
object3.interval = (importDefault(3802) /* metro dependency 3802: PremiumUtils */).getIntervalStringAsNoun(env0_22);
|
||||
object3.ctaText = (require(1244) /* metro dependency 1244: indexNative */).intl.string(t['9wfL34']);
|
||||
items4[2] = <TextWithIOSLinkWorkaround variant="text-xxs/normal">{Reflect.apply(format, intl, [r15,
|
||||
object3])}</TextWithIOSLinkWorkaround>;
|
||||
return (
|
||||
<AnalyticsLocationProvider {...object2}>
|
||||
<View {...viewBindingProps}>
|
||||
{items4}
|
||||
</View>
|
||||
</AnalyticsLocationProvider>
|
||||
);
|
||||
}
|
||||
if (env0_9) {
|
||||
if (env0_7) {
|
||||
if (env0_10) {
|
||||
value21 = environment.__proto__;
|
||||
return (
|
||||
<Button
|
||||
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.zp6caO)}
|
||||
loading={env0_6}
|
||||
onPress={onPress_78937}
|
||||
size="lg"
|
||||
grow
|
||||
/>
|
||||
);
|
||||
}
|
||||
if (env0_9) {
|
||||
if (env0_7) {
|
||||
value21 = environment.__proto__;
|
||||
return (
|
||||
<Button
|
||||
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.zp6caO)}
|
||||
loading={env0_6}
|
||||
onPress={onPress_78937}
|
||||
size="lg"
|
||||
grow
|
||||
/>
|
||||
);
|
||||
}
|
||||
type = product.type;
|
||||
value3 = environment.__proto__;
|
||||
r9 = type === (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType.BUNDLE ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.V1AWw0) : product.type === (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType.PROFILE_EFFECT ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.kAeDcK) : product.type === (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType.NAMEPLATE ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.H3vhqU) : product.type === (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType.AVATAR_DECORATION ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.AQ0Veg) : product.type === (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType.PROFILE_FRAME ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.BlSW1e) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.AQ0Veg);
|
||||
var viewBindingProps = {style: styles.purchaseSection};
|
||||
r5 = canAfford && <VCButton product={product} hasShopDiscount={env0_8} balance={balance} onTrackPress={onTrackPress} />;
|
||||
items6 = [r5];
|
||||
binding = env0_11;
|
||||
if (binding) {
|
||||
r5 = !binding;
|
||||
} else {
|
||||
var viewBinding2Props = {style: styles.buttonContainer};
|
||||
isBuyingBinding = isBuying;
|
||||
isPartiallyOwnedBundleBinding = isPartiallyOwnedBundle;
|
||||
canAffordBinding = canAfford;
|
||||
value12 = 'primary';
|
||||
items2 = [<Button loading={isBuyingBinding} text={r9} onPress={onPress_78938} disabled={isPartiallyOwnedBundleBinding} variant={canAffordBinding ? 'secondary' : value12} size="lg" grow />];
|
||||
items2[1] = env0_23 && <GiftButton product={product} analyticsLocations={analyticsLocations} variant={canAfford ? 'secondary' : value12} onTrackPress={onTrackPress} />;
|
||||
r5 = <View {...viewBinding2Props}>{items2}</View>;
|
||||
}
|
||||
items6[1] = r5;
|
||||
r5 = !canAfford && <VCButton product={product} hasShopDiscount={env0_8} balance={balance} onTrackPress={onTrackPress} />;
|
||||
items6[2] = r5;
|
||||
binding = env0_11;
|
||||
r5 = !binding && <PurchaseDisclaimer product={product} buyButtonLabel={r9} />;
|
||||
items6[3] = r5;
|
||||
return (
|
||||
<View {...viewBindingProps}>
|
||||
{items6}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
type = product.type;
|
||||
value3 = environment.__proto__;
|
||||
r9 = type === (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType.BUNDLE ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.V1AWw0) : product.type === (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType.PROFILE_EFFECT ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.kAeDcK) : product.type === (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType.NAMEPLATE ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.H3vhqU) : product.type === (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType.AVATAR_DECORATION ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.AQ0Veg) : product.type === (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType.PROFILE_FRAME ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.BlSW1e) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.AQ0Veg);
|
||||
var viewBindingProps2 = {style: styles.purchaseSection};
|
||||
r5 = canAfford && <VCButton product={product} hasShopDiscount={env0_8} balance={balance} onTrackPress={onTrackPress} />;
|
||||
items6 = [r5];
|
||||
binding = env0_11;
|
||||
if (binding) {
|
||||
r5 = !binding;
|
||||
} else {
|
||||
var viewBinding2Props = {style: styles.buttonContainer};
|
||||
isBuyingBinding = isBuying;
|
||||
isPartiallyOwnedBundleBinding = isPartiallyOwnedBundle;
|
||||
canAffordBinding = canAfford;
|
||||
value12 = 'primary';
|
||||
items2 = [<Button loading={isBuyingBinding} text={r9} onPress={onPress_78938} disabled={isPartiallyOwnedBundleBinding} variant={canAffordBinding ? 'secondary' : value12} size="lg" grow />];
|
||||
items2[1] = env0_23 && <GiftButton product={product} analyticsLocations={analyticsLocations} variant={canAfford ? 'secondary' : value12} onTrackPress={onTrackPress} />;
|
||||
r5 = <View {...viewBinding2Props}>{items2}</View>;
|
||||
}
|
||||
items6[1] = r5;
|
||||
r5 = !canAfford && <VCButton product={product} hasShopDiscount={env0_8} balance={balance} onTrackPress={onTrackPress} />;
|
||||
items6[2] = r5;
|
||||
binding = env0_11;
|
||||
r5 = !binding && <PurchaseDisclaimer product={product} buyButtonLabel={r9} />;
|
||||
items6[3] = r5;
|
||||
return (
|
||||
<View {...viewBindingProps2}>
|
||||
{items6}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
if (env0_10) {
|
||||
if (env0_10) {
|
||||
value21 = environment.__proto__;
|
||||
return (
|
||||
<Button
|
||||
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.zp6caO)}
|
||||
loading={env0_6}
|
||||
onPress={onPress_78937}
|
||||
size="lg"
|
||||
grow
|
||||
/>
|
||||
);
|
||||
}
|
||||
if (env0_9) {
|
||||
if (env0_7) {
|
||||
value21 = environment.__proto__;
|
||||
return (
|
||||
<Button
|
||||
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.zp6caO)}
|
||||
loading={env0_6}
|
||||
onPress={onPress_78937}
|
||||
size="lg"
|
||||
grow
|
||||
/>
|
||||
);
|
||||
}
|
||||
type = product.type;
|
||||
value3 = environment.__proto__;
|
||||
r9 = type === (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType.BUNDLE ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.V1AWw0) : product.type === (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType.PROFILE_EFFECT ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.kAeDcK) : product.type === (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType.NAMEPLATE ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.H3vhqU) : product.type === (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType.AVATAR_DECORATION ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.AQ0Veg) : product.type === (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType.PROFILE_FRAME ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.BlSW1e) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.AQ0Veg);
|
||||
var viewBindingProps = {style: styles.purchaseSection};
|
||||
r5 = canAfford && <VCButton product={product} hasShopDiscount={env0_8} balance={balance} onTrackPress={onTrackPress} />;
|
||||
items6 = [r5];
|
||||
binding = env0_11;
|
||||
if (binding) {
|
||||
r5 = !binding;
|
||||
} else {
|
||||
var viewBinding2Props = {style: styles.buttonContainer};
|
||||
isBuyingBinding = isBuying;
|
||||
isPartiallyOwnedBundleBinding = isPartiallyOwnedBundle;
|
||||
canAffordBinding = canAfford;
|
||||
value12 = 'primary';
|
||||
items2 = [<Button loading={isBuyingBinding} text={r9} onPress={onPress_78938} disabled={isPartiallyOwnedBundleBinding} variant={canAffordBinding ? 'secondary' : value12} size="lg" grow />];
|
||||
items2[1] = env0_23 && <GiftButton product={product} analyticsLocations={analyticsLocations} variant={canAfford ? 'secondary' : value12} onTrackPress={onTrackPress} />;
|
||||
r5 = <View {...viewBinding2Props}>{items2}</View>;
|
||||
}
|
||||
items6[1] = r5;
|
||||
r5 = !canAfford && <VCButton product={product} hasShopDiscount={env0_8} balance={balance} onTrackPress={onTrackPress} />;
|
||||
items6[2] = r5;
|
||||
binding = env0_11;
|
||||
r5 = !binding && <PurchaseDisclaimer product={product} buyButtonLabel={r9} />;
|
||||
items6[3] = r5;
|
||||
return (
|
||||
<View {...viewBindingProps}>
|
||||
{items6}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
type = product.type;
|
||||
value3 = environment.__proto__;
|
||||
r9 = type === (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType.BUNDLE ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.V1AWw0) : product.type === (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType.PROFILE_EFFECT ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.kAeDcK) : product.type === (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType.NAMEPLATE ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.H3vhqU) : product.type === (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType.AVATAR_DECORATION ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.AQ0Veg) : product.type === (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType.PROFILE_FRAME ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.BlSW1e) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.AQ0Veg);
|
||||
var viewBindingProps2 = {style: styles.purchaseSection};
|
||||
r5 = canAfford && <VCButton product={product} hasShopDiscount={env0_8} balance={balance} onTrackPress={onTrackPress} />;
|
||||
items6 = [r5];
|
||||
binding = env0_11;
|
||||
if (binding) {
|
||||
r5 = !binding;
|
||||
} else {
|
||||
var viewBinding2Props = {style: styles.buttonContainer};
|
||||
isBuyingBinding = isBuying;
|
||||
isPartiallyOwnedBundleBinding = isPartiallyOwnedBundle;
|
||||
canAffordBinding = canAfford;
|
||||
value12 = 'primary';
|
||||
items2 = [<Button loading={isBuyingBinding} text={r9} onPress={onPress_78938} disabled={isPartiallyOwnedBundleBinding} variant={canAffordBinding ? 'secondary' : value12} size="lg" grow />];
|
||||
items2[1] = env0_23 && <GiftButton product={product} analyticsLocations={analyticsLocations} variant={canAfford ? 'secondary' : value12} onTrackPress={onTrackPress} />;
|
||||
r5 = <View {...viewBinding2Props}>{items2}</View>;
|
||||
}
|
||||
items6[1] = r5;
|
||||
r5 = !canAfford && <VCButton product={product} hasShopDiscount={env0_8} balance={balance} onTrackPress={onTrackPress} />;
|
||||
items6[2] = r5;
|
||||
binding = env0_11;
|
||||
r5 = !binding && <PurchaseDisclaimer product={product} buyButtonLabel={r9} />;
|
||||
items6[3] = r5;
|
||||
return (
|
||||
<View {...viewBindingProps2}>
|
||||
{items6}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
value2 = environment.__proto__;
|
||||
return <UnlockWithNitroButton onTrackPress={onTrackPress} />;
|
||||
}
|
||||
if (env0_10) {
|
||||
value21 = environment.__proto__;
|
||||
return (
|
||||
<Button
|
||||
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.zp6caO)}
|
||||
loading={env0_6}
|
||||
onPress={onPress_78937}
|
||||
size="lg"
|
||||
grow
|
||||
/>
|
||||
);
|
||||
}
|
||||
if (env0_9) {
|
||||
if (env0_7) {
|
||||
value21 = environment.__proto__;
|
||||
return (
|
||||
<Button
|
||||
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.zp6caO)}
|
||||
loading={env0_6}
|
||||
onPress={onPress_78937}
|
||||
size="lg"
|
||||
grow
|
||||
/>
|
||||
);
|
||||
}
|
||||
type = product.type;
|
||||
value3 = environment.__proto__;
|
||||
r9 = type === (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType.BUNDLE ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.V1AWw0) : product.type === (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType.PROFILE_EFFECT ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.kAeDcK) : product.type === (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType.NAMEPLATE ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.H3vhqU) : product.type === (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType.AVATAR_DECORATION ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.AQ0Veg) : product.type === (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType.PROFILE_FRAME ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.BlSW1e) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.AQ0Veg);
|
||||
var viewBindingProps = {style: styles.purchaseSection};
|
||||
r5 = canAfford && <VCButton product={product} hasShopDiscount={env0_8} balance={balance} onTrackPress={onTrackPress} />;
|
||||
items6 = [r5];
|
||||
binding = env0_11;
|
||||
if (binding) {
|
||||
r5 = !binding;
|
||||
} else {
|
||||
var viewBinding2Props = {style: styles.buttonContainer};
|
||||
isBuyingBinding = isBuying;
|
||||
isPartiallyOwnedBundleBinding = isPartiallyOwnedBundle;
|
||||
canAffordBinding = canAfford;
|
||||
value12 = 'primary';
|
||||
items2 = [<Button loading={isBuyingBinding} text={r9} onPress={onPress_78938} disabled={isPartiallyOwnedBundleBinding} variant={canAffordBinding ? 'secondary' : value12} size="lg" grow />];
|
||||
items2[1] = env0_23 && <GiftButton product={product} analyticsLocations={analyticsLocations} variant={canAfford ? 'secondary' : value12} onTrackPress={onTrackPress} />;
|
||||
r5 = <View {...viewBinding2Props}>{items2}</View>;
|
||||
}
|
||||
items6[1] = r5;
|
||||
r5 = !canAfford && <VCButton product={product} hasShopDiscount={env0_8} balance={balance} onTrackPress={onTrackPress} />;
|
||||
items6[2] = r5;
|
||||
binding = env0_11;
|
||||
r5 = !binding && <PurchaseDisclaimer product={product} buyButtonLabel={r9} />;
|
||||
items6[3] = r5;
|
||||
return (
|
||||
<View {...viewBindingProps}>
|
||||
{items6}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
type = product.type;
|
||||
const CollectiblesItemType = (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType;
|
||||
const BUNDLE = CollectiblesItemType.BUNDLE;
|
||||
r9 = type === BUNDLE ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.V1AWw0) : product.type === (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType.PROFILE_EFFECT ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.kAeDcK) : product.type === (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType.NAMEPLATE ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.H3vhqU) : product.type === (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType.AVATAR_DECORATION ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.AQ0Veg) : product.type === (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType.PROFILE_FRAME ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.BlSW1e) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.AQ0Veg);
|
||||
items6 = [canAfford && <VCButton product={product} hasShopDiscount={env0_8} balance={balance} onTrackPress={onTrackPress} />];
|
||||
if (binding) {
|
||||
r5 = !env0_11;
|
||||
} else {
|
||||
var viewBinding2Props = {style: styles.buttonContainer};
|
||||
isBuyingBinding = isBuying;
|
||||
isPartiallyOwnedBundleBinding = isPartiallyOwnedBundle;
|
||||
canAffordBinding = canAfford;
|
||||
value12 = 'primary';
|
||||
items2 = [<Button loading={isBuyingBinding} text={r9} onPress={onPress_78938} disabled={isPartiallyOwnedBundleBinding} variant={canAffordBinding ? 'secondary' : value12} size="lg" grow />];
|
||||
items2[1] = env0_23 && <GiftButton product={product} analyticsLocations={analyticsLocations} variant={canAfford ? 'secondary' : value12} onTrackPress={onTrackPress} />;
|
||||
r5 = <View {...viewBinding2Props}>{items2}</View>;
|
||||
}
|
||||
items6[1] = r5;
|
||||
items6[2] = !canAfford && <VCButton product={product} hasShopDiscount={env0_8} balance={balance} onTrackPress={onTrackPress} />;
|
||||
items6[3] = !env0_11 && <PurchaseDisclaimer product={product} buyButtonLabel={r9} />;
|
||||
return (
|
||||
<View style={styles.purchaseSection}>
|
||||
{items6}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function onCheckoutSuccess({entitlements}) { // fn#78923, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10297:1982, offset: 0x01e3c61b, size: 439 bytes, params: 2, frame: 23
|
||||
var environment;
|
||||
var consumed;
|
||||
var defaultImport2;
|
||||
var openLazy;
|
||||
var property;
|
||||
var defaultImport3;
|
||||
var pushLazy;
|
||||
let value = environment.__proto__.__proto__;
|
||||
require(dependencyMap[25]).fetchCollectiblesPurchases();
|
||||
importDefault(dependencyMap[22]).popWithKey('ORB_CHECKOUT_MODAL');
|
||||
const skuId = product.skuId;
|
||||
const ORB_PROFILE_BADGE = EXTERNAL_PRODUCT_SKU_IDS.ORB_PROFILE_BADGE;
|
||||
if (skuId === ORB_PROFILE_BADGE) {
|
||||
defaultImport3 = importDefault(dependencyMap[22]);
|
||||
pushLazy = defaultImport3.pushLazy;
|
||||
value = require(dependencyMap[24]);
|
||||
value = value(dependencyMap[26], dependencyMap.paths);
|
||||
Reflect.apply(pushLazy, defaultImport3, [value, {modalKey: 'ORB_BADGE_COLLECTED_MODAL',
|
||||
onPressViewBadge: onPressViewBadge, orbBalancePriorToPurchase: balance}, 'ORB_BADGE_COLLECTED_MODAL']);
|
||||
} else if (product.skuId === EXTERNAL_PRODUCT_SKU_IDS.FRACTIONAL_PREMIUM) {
|
||||
defaultImport2 = importDefault(dependencyMap[14]);
|
||||
openLazy = defaultImport2.openLazy;
|
||||
value = require(dependencyMap[24]);
|
||||
property = dependencyMap[27];
|
||||
value = value(property, dependencyMap.paths);
|
||||
property = entitlements[0];
|
||||
consumed = property?.consumed;
|
||||
Reflect.apply(openLazy, defaultImport2, [value, 'FractionalNitroCollectedActionSheet',
|
||||
{consumed: consumed != null && consumed, onPressExplorePerks: onPressExplorePerks,
|
||||
onPressViewCredits: onPressViewCredits}]);
|
||||
} else {
|
||||
importDefault(dependencyMap[28]).open({'product': null, 'useCategoryImage': true, 'showOrbBalancePill': true,
|
||||
product: product, orbBalancePriorToPurchase: balance});
|
||||
}
|
||||
}
|
||||
|
||||
function onPress_78935() { // fn#78935, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10297:6018, offset: 0x01e3d90a, size: 49 bytes, params: 1, frame: 12
|
||||
var value2;
|
||||
let onTrackPressBinding = onTrackPress;
|
||||
if (onTrackPressBinding != null) {
|
||||
onTrackPressBinding = onTrackPress;
|
||||
value2 = environment.__proto__.__proto__;
|
||||
onTrackPressBinding(ShopCtaEnum.USE_NOW);
|
||||
}
|
||||
handleUseNow();
|
||||
}
|
||||
|
||||
function onPress_78936() { // fn#78936, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10297:6126, offset: 0x01e3d93b, size: 49 bytes, params: 1, frame: 12
|
||||
var value2;
|
||||
let onTrackPressBinding = onTrackPress;
|
||||
if (onTrackPressBinding != null) {
|
||||
onTrackPressBinding = onTrackPress;
|
||||
value2 = environment.__proto__.__proto__;
|
||||
onTrackPressBinding(ShopCtaEnum.EDIT_PROFILE);
|
||||
}
|
||||
handleEditProfile();
|
||||
}
|
||||
|
||||
function onPress_78937() { // fn#78937, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10297:7107, offset: 0x01e3d96c, size: 49 bytes, params: 1, frame: 12
|
||||
var value2;
|
||||
let onTrackPressBinding = onTrackPress;
|
||||
if (onTrackPressBinding != null) {
|
||||
onTrackPressBinding = onTrackPress;
|
||||
value2 = environment.__proto__.__proto__;
|
||||
onTrackPressBinding(ShopCtaEnum.ADD_TO_COLLECTION);
|
||||
}
|
||||
handleClaim();
|
||||
}
|
||||
|
||||
function onPress_78938() { // fn#78938, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10297:7877, offset: 0x01e3d99d, size: 49 bytes, params: 1, frame: 12
|
||||
var value2;
|
||||
let onTrackPressBinding = onTrackPress;
|
||||
if (onTrackPressBinding != null) {
|
||||
onTrackPressBinding = onTrackPress;
|
||||
value2 = environment.__proto__.__proto__;
|
||||
onTrackPressBinding(ShopCtaEnum.BUY_WITH_FIAT);
|
||||
}
|
||||
handleBuyNow();
|
||||
}
|
||||
|
||||
function onPressViewBadge() { // fn#78924, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10297:2168, owner: onCheckoutSuccess.onPressViewBadge, offset: 0x01e3c7d2, size: 43 bytes, params: 1, frame: 14
|
||||
const binding = env2_4;
|
||||
const navigate = binding.navigate;
|
||||
const YOU = MainTabsNavigatorScreens.YOU;
|
||||
return Reflect.apply(navigate, binding, [YOU, {showOrbsBadgeCoachmark: true}]);
|
||||
}
|
||||
|
||||
function onPressExplorePerks() { // fn#78925, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10297:2454, owner: onCheckoutSuccess.onPressExplorePerks, offset: 0x01e3c7fd, size: 65 bytes, params: 1, frame: 12
|
||||
let value = environment.__proto__.__proto__;
|
||||
const binding = env2_4;
|
||||
const navigate = binding.navigate;
|
||||
value = environment.__proto__.__proto__.__proto__;
|
||||
const PREMIUM = UserSettingsSections.PREMIUM;
|
||||
Reflect.apply(navigate, binding, [PREMIUM]);
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
}
|
||||
|
||||
function onPressViewCredits() { // fn#78926, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10297:2528, owner: onCheckoutSuccess.onPressViewCredits, offset: 0x01e3c83e, size: 65 bytes, params: 1, frame: 12
|
||||
let value = environment.__proto__.__proto__;
|
||||
const binding = env2_4;
|
||||
const navigate = binding.navigate;
|
||||
value = environment.__proto__.__proto__.__proto__;
|
||||
const PREMIUM_MANAGE_PLAN = UserSettingsSections.PREMIUM_MANAGE_PLAN;
|
||||
Reflect.apply(navigate, binding, [PREMIUM_MANAGE_PLAN]);
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,124 @@
|
||||
/* Metro module 10108; source: modules/collectibles/native/ProductDetailsActionSheetVariants.tsx; dependencies: [31, 27, 33, 4501, 697, 10060, 5278, 1244, 10082, 6742, 5133, 4573, 2] */
|
||||
function _fun78905(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78905, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10294:6, offset: 0x01e3b4e1, size: 443 bytes, params: 8, frame: 23
|
||||
var object3;
|
||||
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;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_4 = value.jsx;
|
||||
const env0_5 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object3 = {};
|
||||
const object4 = {'flex': 1, 'display': 'flex', 'flexDirection': 'column'};
|
||||
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object4.marginTop = PX_16;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object4.marginHorizontal = PX_16;
|
||||
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object4.gap = PX_8;
|
||||
object3.container = object4;
|
||||
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object3.headerRow = {'flexDirection': 'row', 'alignItems': 'center', gap: PX_12};
|
||||
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object3.variantsContainer = {'display': 'flex', 'flexWrap': 'wrap', 'flexDirection': 'row', 'alignItems': 'center',
|
||||
gap: PX_12};
|
||||
object3.text = {'flexGrow': 1, 'flexShrink': 1, 'minWidth': 28};
|
||||
const env0_6 = Reflect.apply(createStyles, value, [object3]);
|
||||
const env0_7 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun78906);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/ProductDetailsActionSheetVariants.tsx');
|
||||
exports.default = _default_78909;
|
||||
}
|
||||
|
||||
function _fun78906(a0) { // fn#78906, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10294:577, offset: 0x01e3b69c, size: 188 bytes, params: 2, frame: 16
|
||||
const object4 = {};
|
||||
const object5 = {'width': 28, 'height': 28, 'borderRadius': null, 'justifyContent': 'center',
|
||||
'alignItems': 'center', 'borderWidth': 1};
|
||||
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
||||
const colors = (importDefault(697) /* metro dependency 697: native */).colors;
|
||||
object5.borderColor = a0 ? colors.BUTTON_OUTLINE_PRIMARY_TEXT : colors.BORDER_STRONG;
|
||||
object4.variantOption = object5;
|
||||
const object6 = {'width': '100%', 'height': '100%', 'justifyContent': 'center', 'alignItems': 'center',
|
||||
'borderRadius': null, 'borderWidth': 1};
|
||||
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
||||
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
||||
object6.borderColor = BACKGROUND_BASE_LOW;
|
||||
object4.variantOptionInner = object6;
|
||||
return object4;
|
||||
}
|
||||
|
||||
function VariantOption_78907({variant, isSelected, onSelect}) { // fn#78907, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10294:998, offset: 0x01e3b758, size: 302 bytes, params: 2, frame: 25
|
||||
var r5;
|
||||
var intl;
|
||||
const styles = useStyles(isSelected);
|
||||
const useProductPurchaseStateModule = require(10060) /* metro dependency 10060: useProductPurchaseState */;
|
||||
const useProductPurchaseState = useProductPurchaseStateModule.useProductPurchaseState;
|
||||
const isPurchased = Reflect.apply(useProductPurchaseState, useProductPurchaseStateModule, [variant]).isPurchased;
|
||||
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
||||
if (isPurchased) {
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
r5 = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['SfQB4+'],
|
||||
{variantLabel: variant.name});
|
||||
} else {
|
||||
r5 = variant.name;
|
||||
}
|
||||
return (
|
||||
<PressableOpacity
|
||||
accessibilityRole="button"
|
||||
accessibilityLabel={r5}
|
||||
accessibilityState={{selected: isSelected}}
|
||||
onPress={onSelect}
|
||||
style={styles.variantOption}
|
||||
>
|
||||
<View style={[styles.variantOptionInner, {backgroundColor: variant.variantValue}]}>
|
||||
{isPurchased && <VariantCheckmark_78908 variant={variant} />}
|
||||
</View>
|
||||
</PressableOpacity>
|
||||
);
|
||||
}
|
||||
|
||||
function VariantCheckmark_78908({variant}) { // fn#78908, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10294:1470, offset: 0x01e3b886, size: 128 bytes, params: 2, frame: 17
|
||||
const value2 = (importDefault(10082) /* metro dependency 10082: useIsVariantColorLight */)(variant);
|
||||
const CheckmarkSmallIcon = (require(6742) /* metro dependency 6742: CheckmarkSmallIcon */).CheckmarkSmallIcon;
|
||||
const colors = (importDefault(697) /* metro dependency 697: native */).colors;
|
||||
return <CheckmarkSmallIcon color={value2 ? colors.BLACK : colors.WHITE} size="md" />;
|
||||
}
|
||||
|
||||
function _default_78909({product, selectedVariantIndex, onVariantSelect}) { // fn#78909, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10294:1612, offset: 0x01e3b906, size: 408 bytes, params: 2, frame: 29
|
||||
var r0;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
var intl;
|
||||
var items2;
|
||||
var variants;
|
||||
const styles = useStyles();
|
||||
if ((require(5133) /* metro dependency 5133: CollectiblesProductUtils */).getIsVariantProduct(product)) {
|
||||
var viewBindingProps = {style: styles.container};
|
||||
var viewBindingProps2 = {style: styles.headerRow};
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
items2 = [<Text variant="text-md/bold" color="mobile-text-heading-primary">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.wbgaj6)}</Text>];
|
||||
variants = product.variants;
|
||||
items2[1] = variants.length > selectedVariantIndex && <Text variant="text-md/medium" color="text-default" lineClamp={1} style={styles.text}>{product.variants[selectedVariantIndex].variantLabel}</Text>;
|
||||
variants = product.variants;
|
||||
r0 = <View {...viewBindingProps}><View {...viewBindingProps2}>{items2}</View><View style={styles.variantsContainer}>{variants.map(_fun78910)}</View></View>;
|
||||
} else {
|
||||
r0 = null;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun78910(a0, a1) { // fn#78910, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10294:2115, offset: 0x01e3ba9e, size: 74 bytes, params: 3, frame: 17
|
||||
const env0_0 = a1;
|
||||
return (
|
||||
<VariantOption_78907
|
||||
variant={a0}
|
||||
isSelected={selectedVariantIndex === a1}
|
||||
onSelect={function() {
|
||||
return onVariantSelect(require);
|
||||
}}
|
||||
key={a0.variantValue}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
/* Metro module 7589; source: modules/collectibles/native/ProductPurchaseSuccessActionCreators.tsx; dependencies: [5, 5080, 7590, 1962, 2] */
|
||||
function _fun60863(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#60863, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7767:6, offset: 0x0171227e, size: 145 bytes, params: 8, frame: 19
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(5) /* metro dependency 5 */;
|
||||
object2 = {open: open_60864, close: close_60867};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/ProductPurchaseSuccessActionCreators.tsx');
|
||||
exports.default = object2;
|
||||
exports.MODAL_KEY = 'ShopProductPurchaseSuccessModal';
|
||||
}
|
||||
|
||||
function open_60864(a0) { // fn#60864, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7767:145, offset: 0x0171230f, size: 65 bytes, params: 2, frame: 16
|
||||
const defaultImport = importDefault(5080) /* metro dependency 5080: ModalActionCreators */;
|
||||
defaultImport.pushLazy(env0_3(_fun60866), a0, 'ShopProductPurchaseSuccessModal');
|
||||
}
|
||||
|
||||
function close_60867() { // fn#60867, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7767:238, offset: 0x017123a3, size: 44 bytes, params: 1, frame: 12
|
||||
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).popWithKey('ShopProductPurchaseSuccessModal');
|
||||
}
|
||||
|
||||
@@ -0,0 +1,501 @@
|
||||
/* Metro module 7590; source: modules/collectibles/native/ProductPurchaseSuccessModal.tsx; dependencies: [57, 862, 31, 27, 4502, 661, 33, 4501, 697, 1904, 7589, 5287, 5312, 1244, 4017, 4577, 4504, 4081, 5132, 7591, 3860, 4589, 7594, 7595, 566, 7602, 7606, 6771, 7628, 7629, 683, 7631, 10070, 7717, 10088, 7609, 6618, 10123, 8470, 7596, 8488, 10094, 10507, 4573, 5134, 4578, 8341, 10112, 2] */
|
||||
function _fun60868(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#60868, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7768:6, offset: 0x017123cf, size: 496 bytes, params: 8, frame: 22
|
||||
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 = importDefault(862) /* metro dependency 862 */;
|
||||
const env0_5 = importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_6 = value.Image;
|
||||
const env0_7 = value.ScrollView;
|
||||
const env0_8 = value.View;
|
||||
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
|
||||
value = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_10 = value.AnalyticEvents;
|
||||
const env0_11 = value.Orientation;
|
||||
const env0_12 = value.VerticalGradient;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_13 = value.jsx;
|
||||
const env0_14 = value.jsxs;
|
||||
const env0_15 = value.Fragment;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
const MOBILE_TEXT_HEADING_PRIMARY = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_TEXT_HEADING_PRIMARY;
|
||||
const env0_16 = Reflect.apply(createStyles, value, [{closeButtonIcon: {tintColor: MOBILE_TEXT_HEADING_PRIMARY}}]);
|
||||
const env0_17 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun60869);
|
||||
object = {code: 'function ProductPurchaseSuccessModalTsx1(){const{interpolate,springInput,isProfilePreview}=this.__closure;return{opacity:interpolate(springInput.get(),[0,1],[0.1,1]),transform:[{scale:interpolate(springInput.get(),[0,1],[isProfilePreview?0.6:0,1])}]};}'};
|
||||
object = {code: 'function ProductPurchaseSuccessModalTsx2(){const{interpolate,springInput}=this.__closure;return{opacity:interpolate(springInput.get(),[0,1],[0,1]),transform:[{scale:interpolate(springInput.get(),[0,1],[0.75,1])}]};}'};
|
||||
object = {code: 'function ProductPurchaseSuccessModalTsx3(){const{interpolate,linearInput}=this.__closure;return{opacity:interpolate(linearInput.get(),[0,1],[0.5,0])};}'};
|
||||
const env0_22 = [80, 79, 78, 75, 72, 50, 45, 35, 70];
|
||||
value = importDefault(5132) /* metro dependency 5132 */;
|
||||
value = value('black');
|
||||
const env0_23 = value.toHexString();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/ProductPurchaseSuccessModal.tsx');
|
||||
exports.default = _default_60875;
|
||||
}
|
||||
|
||||
function _fun60869(a0) { // fn#60869, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7768:407, offset: 0x017125bf, size: 839 bytes, params: 2, frame: 23
|
||||
var object3;
|
||||
let value = a1;
|
||||
const value2 = undefined;
|
||||
let r3 = value !== value2 ? value : false;
|
||||
const object4 = {};
|
||||
const object5 = {};
|
||||
value = 1;
|
||||
object5.flex = value;
|
||||
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
||||
object5.backgroundColor = BACKGROUND_BASE_LOW;
|
||||
object4.root = object5;
|
||||
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object4.header = {'flexDirection': 'row', 'justifyContent': 'space-between', 'alignItems': 'center',
|
||||
paddingHorizontal: PX_16};
|
||||
object4.imageBackground = {'resizeMode': 'cover', 'position': 'absolute', 'top': 0, 'bottom': 0, 'left': 0,
|
||||
'right': 0};
|
||||
object4.backdrop = {'position': 'absolute', 'top': 0, 'bottom': 0, 'left': 0, 'right': 0};
|
||||
object4.main = {flex: value};
|
||||
const BLACK = (importDefault(697) /* metro dependency 697: native */).colors.BLACK;
|
||||
object4.curtain = {'position': 'absolute', 'backgroundColor': null, 'top': 0, 'bottom': 0, 'left': 0, 'right': 0,
|
||||
backgroundColor: BLACK};
|
||||
object4.body = {'flexGrow': 1, 'flexDirection': 'column', 'justifyContent': 'center'};
|
||||
const object7 = {'flexDirection': 'row', 'justifyContent': 'center', 'alignItems': 'center'};
|
||||
const CollectiblesItemType = (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType;
|
||||
let AVATAR_DECORATION = CollectiblesItemType.AVATAR_DECORATION;
|
||||
const value4 = 0;
|
||||
object7.flex = a0 !== AVATAR_DECORATION ? value4 : value;
|
||||
const AVATAR_DECORATION2 = CollectiblesItemType.AVATAR_DECORATION;
|
||||
object7.marginTop = a0 !== AVATAR_DECORATION2 ? value4 : '20%';
|
||||
const NAMEPLATE = CollectiblesItemType.NAMEPLATE;
|
||||
let PX_32 = a0 !== NAMEPLATE ? value2 : (importDefault(697) /* metro dependency 697: native */).space.PX_32;
|
||||
object7.marginHorizontal = PX_32;
|
||||
if (r3) {
|
||||
if (a0 === CollectiblesItemType.AVATAR_DECORATION) {
|
||||
object3 = {'shadowColor': null, 'shadowOffset': null, 'shadowOpacity': 1, 'shadowRadius': 60,
|
||||
'elevation': 24};
|
||||
object3.shadowColor = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_630;
|
||||
object3.shadowOffset = {'width': 0, 'height': 0};
|
||||
r3 = object3;
|
||||
} else {
|
||||
r3 = {};
|
||||
}
|
||||
} else {
|
||||
r3 = {};
|
||||
}
|
||||
copyDataProperties(object7, r3, AVATAR_DECORATION);
|
||||
object4.preview = object7;
|
||||
object4.previewBundle = {'flex': 1, 'justifyContent': 'flex-start', 'alignItems': 'center', 'minHeight': 250};
|
||||
const object10 = {'paddingTop': null, 'minHeight': null, 'flexDirection': 'column', 'alignItems': 'center',
|
||||
'justifyContent': 'flex-start'};
|
||||
let PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
object10.paddingTop = PX_24;
|
||||
AVATAR_DECORATION = CollectiblesItemType.AVATAR_DECORATION;
|
||||
object10.minHeight = a0 !== AVATAR_DECORATION ? value2 : '32%';
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object10.gap = PX_16;
|
||||
object4.messages = object10;
|
||||
PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
|
||||
object4.title = {textAlign: 'center', marginHorizontal: PX_32};
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object4.footer = {marginBottom: PX_16};
|
||||
const object11 = {flexDirection: 'row'};
|
||||
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object11.gap = PX_12;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object11.paddingVertical = PX_16;
|
||||
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
object11.marginHorizontal = PX_24;
|
||||
object11.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
||||
object4.cta = object11;
|
||||
return object4;
|
||||
}
|
||||
|
||||
function CancelButton({tintColor, onCancel}) { // fn#60870, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7768:1979, offset: 0x01712906, size: 182 bytes, params: 2, frame: 18
|
||||
var object2;
|
||||
const env0_2 = useStyles();
|
||||
const value2 = env0_5.useCallback(_fun60871, [onCancel]);
|
||||
const HeaderBackButton = (require(5287) /* metro dependency 5287 */).HeaderBackButton;
|
||||
object2 = {onPress: value2, backImage: backImage};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object2.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq);
|
||||
object2.labelVisible = false;
|
||||
return <HeaderBackButton {...object2} />;
|
||||
}
|
||||
|
||||
function ProductPurchaseGradientBackground({product}) { // fn#60873, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7768:3043, offset: 0x01712a55, size: 356 bytes, params: 2, frame: 23
|
||||
const styles = useStyles(product.type);
|
||||
const backgroundColors = (importDefault(7591) /* metro dependency 7591: useCollectiblesShopStylesNative */)(product.styles).backgroundColors;
|
||||
const value3 = backgroundColors?.tertiary != null;
|
||||
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
|
||||
let useToken = useTokenModule.useToken;
|
||||
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
||||
const value4 = Reflect.apply(useToken, useTokenModule, [BACKGROUND_BASE_LOW]);
|
||||
const moduleValue2 = useTokenModule;
|
||||
useToken = moduleValue2.useToken;
|
||||
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
|
||||
const value6 = env0_5.useMemo(_fun60874, [backgroundColors, value4, Reflect.apply(useToken, moduleValue2,
|
||||
[BACKGROUND_SURFACE_HIGH]), value3]);
|
||||
const r5 = value3 ? [0, 0.6, 0.85] : [0, 0.05, 0.6, 0.95, 1];
|
||||
const defaultImport2 = importDefault(4589) /* metro dependency 4589 */;
|
||||
const {START, END} = VerticalGradient;
|
||||
return ((Component) => <Component style={styles.backdrop} start={START} end={END} locations={r5} colors={value6} />)(defaultImport2);
|
||||
}
|
||||
|
||||
function _default_60875({product, useCategoryImage, renderMessages, onSuccess, onCancel, showOrbBalancePill, orbBalancePriorToPurchase}) { // fn#60875, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7768:3598, offset: 0x01712c8a, size: 2807 bytes, params: 2, frame: 60
|
||||
var r29;
|
||||
var r18;
|
||||
var jsxRuntimeEnv0_15Binding;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
var title;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var format;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var items9;
|
||||
var object;
|
||||
var isPremiumCollectiblesProduct2;
|
||||
var object2;
|
||||
var object3;
|
||||
var IconButton;
|
||||
useCategoryImage = !(useCategoryImage === undefined) && useCategoryImage;
|
||||
showOrbBalancePill = !(showOrbBalancePill === undefined) && showOrbBalancePill;
|
||||
orbBalancePriorToPurchase = orbBalancePriorToPurchase === undefined ? null : orbBalancePriorToPurchase;
|
||||
const env0_3 = undefined;
|
||||
const value6 = (require(7594) /* metro dependency 7594: useCurrentUser */).useCurrentUser();
|
||||
const defaultImport = importDefault(7591) /* metro dependency 7591: useCollectiblesShopStylesNative */;
|
||||
let styles = product.styles;
|
||||
const backgroundColors = defaultImport(styles).backgroundColors;
|
||||
const value8 = backgroundColors?.tertiary != null;
|
||||
let type = product.type;
|
||||
styles = useStyles(type, value8);
|
||||
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
|
||||
const useToken = useTokenModule.useToken;
|
||||
const INTERACTIVE_TEXT_ACTIVE = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_ACTIVE;
|
||||
const value9 = Reflect.apply(useToken, useTokenModule, [INTERACTIVE_TEXT_ACTIVE]);
|
||||
let binding = env0_5;
|
||||
const env0_1 = binding.useRef(env0_22);
|
||||
binding.useEffect(_fun60877, [binding.useCallback(_fun60876, [])]);
|
||||
const {avatarSize,
|
||||
avatarDecorationSize} = (require(7595) /* metro dependency 7595: useAvatarDecorationPreviewSizes */).useAvatarDecorationPreviewSizes();
|
||||
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
|
||||
function() {
|
||||
return AccessibilityStore.useReducedMotion;
|
||||
});
|
||||
type = product.type;
|
||||
const CollectiblesItemType = (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType;
|
||||
const PROFILE_EFFECT = CollectiblesItemType.PROFILE_EFFECT;
|
||||
const {previewViewStyle, textViewStyle, curtainViewStyle} = _fun60880(useReducedMotion,
|
||||
type === PROFILE_EFFECT || product.type === (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType.PROFILE_FRAME);
|
||||
const useFetchCollectiblesProductCategoryModule = require(7602) /* metro dependency 7602: useFetchCollectiblesProductCategory */;
|
||||
const useFetchCollectiblesProductCategory = useFetchCollectiblesProductCategoryModule.useFetchCollectiblesProductCategory;
|
||||
let skuId = product.skuId;
|
||||
const mobileBgUrl = Reflect.apply(useFetchCollectiblesProductCategory, useFetchCollectiblesProductCategoryModule,
|
||||
[skuId]).category?.mobileBgUrl;
|
||||
const property = env0_3(product.items, 1)[0];
|
||||
const {handleUseNow, canUseNow, isApplying,
|
||||
handleEditProfile} = (require(7606) /* metro dependency 7606: useHandleUseNow */).useHandleUseNow({product: product,
|
||||
onSuccess: onSuccess});
|
||||
const analyticsLocations = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().analyticsLocations;
|
||||
const value17 = (require(7628) /* metro dependency 7628: CollectiblesPostPurchaseGiftingExperiment */).useIsPostPurchaseGiftingEnabled('ProductPurchaseSuccessModal');
|
||||
const value18 = (require(7629) /* metro dependency 7629: useCanGiftProduct */).useCanGiftProduct(product);
|
||||
binding = env0_5;
|
||||
const value19 = binding.useCallback(_fun60885, [product.skuId, analyticsLocations]);
|
||||
const avatarSource = value6.getAvatarSource(undefined, false, avatarSize);
|
||||
const useFetchVirtualCurrencyBalanceModule = require(10070) /* metro dependency 10070: useFetchVirtualCurrencyBalance */;
|
||||
const useFetchVirtualCurrencyBalance = useFetchVirtualCurrencyBalanceModule.useFetchVirtualCurrencyBalance;
|
||||
const balance = Reflect.apply(useFetchVirtualCurrencyBalance, useFetchVirtualCurrencyBalanceModule, []).balance;
|
||||
binding.useEffect(function() {
|
||||
require(dependencyMap[33]).lockOrientation(Orientation.PORTRAIT);
|
||||
return _fun60887;
|
||||
}, []);
|
||||
(require(10088) /* metro dependency 10088: usePreviewCollectbilesProduct */).usePreviewCollectibleProduct(product,
|
||||
true);
|
||||
const value21 = (require(7609) /* metro dependency 7609: useShopProductItems */).useShopProductItems(product);
|
||||
skuId = product.skuId;
|
||||
const items2 = [useCategoryImage && mobileBgUrl != null ? <Image source={{uri: mobileBgUrl}} style={styles.imageBackground} /> : <ProductPurchaseGradientBackground product={product} />];
|
||||
const SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
|
||||
const items3 = [styles.main];
|
||||
items3[1] = {backgroundColor: useCategoryImage ? 'rgba(0, 0, 0, 0.3)' : undefined};
|
||||
const items5 = [<View style={styles.header}><CancelButton tintColor={(backgroundColors == null ? undefined : backgroundColors.label.toHexString()) ?? value9} onCancel={onCancel} />{showOrbBalancePill && ((BalanceWidgetPill) => <BalanceWidgetPill initialRenderedBalance={orbBalancePriorToPurchase} balance={balance} />)((require(10123) /* metro dependency 10123: native */).BalanceWidgetPill)}</View>];
|
||||
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
type = product.type;
|
||||
const BUNDLE = CollectiblesItemType.BUNDLE;
|
||||
const view = <View2 style={[styles.preview,
|
||||
previewViewStyle]}>{BUNDLE === type ? <View style={styles.previewBundle}>{((Component) => <Component deco={value21.firstAvatarDecoration} pfx={value21.firstProfileEffect} nameplate={value21.firstNameplate} previewAssets={product.previewAssets} disableStaticBackground size="large" exposureLocation="ProductPurchaseSuccessModal" />)(importDefault(8470) /* metro dependency 8470: BundleSampleV2 */)}</View> : (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType.AVATAR_DECORATION === type ? ((Component) => <Component item={property} size={avatarDecorationSize} avatarSource={avatarSource} animate={!useReducedMotion} />)(importDefault(7596) /* metro dependency 7596: AvatarDecorationSampleV2 */) : (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType.PROFILE_EFFECT === type ? ((Component) => <Component user={value6} profileEffect={product.items[0]} />)(importDefault(8488) /* metro dependency 8488: ProfileEffectUserPreview */) : (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType.PROFILE_FRAME === type ? ((Component) => <Component user={value6} profileFrame={product.items[0]} />)(importDefault(10094) /* metro dependency 10094: ProfileFrameUserPreview */) : (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType.NAMEPLATE !== type ? null : ((NameplatePreview) => <NameplatePreview user={value6} nameplate={product.items[0]} animate />)((require(10507) /* metro dependency 10507: NameplatePreview */).NameplatePreview)}</View2>;
|
||||
const View3 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
const items8 = [styles.messages, textViewStyle];
|
||||
if (renderMessages != null) {
|
||||
r29 = renderMessages();
|
||||
} else {
|
||||
jsxRuntimeEnv0_15Binding = jsxRuntimeEnv0_15;
|
||||
title = styles.title;
|
||||
format = intl.format;
|
||||
items9 = [<Text variant="heading-xl/bold" color="white" style={title}>{Reflect.apply(format, intl, [t.YNaxMp,
|
||||
{itemName: product.name}])}</Text>];
|
||||
object = {'variant': 'text-md/medium', 'color': 'white'};
|
||||
title = styles.title;
|
||||
object.style = title;
|
||||
isPremiumCollectiblesProduct2 = (require(5134) /* metro dependency 5134: CollectiblesUtils */).isPremiumCollectiblesProduct(product);
|
||||
format = intl.format;
|
||||
items9[1] = <Text {...object}>{isPremiumCollectiblesProduct2 ? Reflect.apply(format, intl, [t.nW6E3m,
|
||||
{itemName: product.name}]) : Reflect.apply(format, intl, [t['4kp0AB'], {itemName: product.name}])}</Text>;
|
||||
r29 = <>{items9}</>;
|
||||
}
|
||||
items5[1] = <ScrollView style={{flex: 1}} contentContainerStyle={styles.body} alwaysBounceVertical={false}>{view}<View3 style={items8}>{r29}</View3></ScrollView>;
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
if (canUseNow) {
|
||||
object3 = {loading: isApplying, disabled: isApplying, onPress: handleUseNow};
|
||||
object3.text = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.MAS7uK);
|
||||
object3.size = 'lg';
|
||||
object3.grow = true;
|
||||
r18 = object3;
|
||||
} else {
|
||||
object2 = {onPress: handleEditProfile};
|
||||
object2.text = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['2p2aYz']);
|
||||
object2.size = 'lg';
|
||||
object2.grow = true;
|
||||
r18 = object2;
|
||||
}
|
||||
const button = <Button {...r18} />;
|
||||
let r19 = value17 && value18;
|
||||
if (r19) {
|
||||
IconButton = (require(8341) /* metro dependency 8341: IconButtonNative */).IconButton;
|
||||
r19 = <IconButton size="lg" variant="primary" icon={((GiftIcon) => <GiftIcon size="md" color={(importDefault(697) /* metro dependency 697: native */).colors.WHITE} />)((require(10112) /* metro dependency 10112: GiftIcon */).GiftIcon)} onPress={value19} accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.PEjaCx)} />;
|
||||
}
|
||||
items5[2] = <View style={styles.footer}><View style={styles.cta}>{button}{r19}</View></View>;
|
||||
items2[1] = <SafeAreaPaddingView style={items3} top bottom left right>{items5}</SafeAreaPaddingView>;
|
||||
const View4 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
items2[2] = <View4 style={[styles.curtain, curtainViewStyle]} pointerEvents="none" />;
|
||||
return (
|
||||
<View style={styles.root} id={skuId}>
|
||||
{items2}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun60871() { // fn#60871, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7768:2035, offset: 0x017129bc, size: 60 bytes, params: 1, frame: 11
|
||||
if (onCancel != null) {
|
||||
onCancel();
|
||||
}
|
||||
const value = environment.__proto__;
|
||||
(importDefault(7589) /* metro dependency 7589: ProductPurchaseSuccessActionCreators */).close();
|
||||
}
|
||||
|
||||
function CancelButtonBackImage() { // fn#60872, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7768:2133, owner: CancelButton.backImage, offset: 0x017129f8, size: 93 bytes, params: 1, frame: 16
|
||||
const XSmallIcon = (require(5312) /* metro dependency 5312: XSmallIcon */).XSmallIcon;
|
||||
return <XSmallIcon size="lg" style={[styles.closeButtonIcon, {tintColor: tintColor}]} />;
|
||||
}
|
||||
|
||||
function _fun60874() { // fn#60874, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7768:3278, offset: 0x01712bb9, size: 209 bytes, params: 1, frame: 13
|
||||
var r0;
|
||||
var binding;
|
||||
var primary;
|
||||
var toHexString;
|
||||
var items2;
|
||||
var secondary;
|
||||
var tertiary;
|
||||
var value;
|
||||
let backgroundColorsBinding = backgroundColors;
|
||||
if (backgroundColorsBinding == null) {
|
||||
binding = env0_2;
|
||||
items2 = [binding, env0_2, env0_3];
|
||||
value = environment.__proto__;
|
||||
binding = env1_23;
|
||||
items2[3] = binding;
|
||||
items2[4] = binding;
|
||||
r0 = items2;
|
||||
} else {
|
||||
binding = env0_1;
|
||||
backgroundColorsBinding = backgroundColors;
|
||||
primary = backgroundColorsBinding.primary;
|
||||
value = primary.toHexString();
|
||||
if (binding) {
|
||||
items2 = [value];
|
||||
secondary = backgroundColorsBinding.secondary;
|
||||
toHexString = secondary.toHexString;
|
||||
items2[1] = Reflect.apply(toHexString, secondary, []);
|
||||
tertiary = backgroundColorsBinding.tertiary;
|
||||
toHexString = tertiary.toHexString;
|
||||
items2[2] = Reflect.apply(toHexString, tertiary, []);
|
||||
r0 = items2;
|
||||
} else {
|
||||
items2 = [value];
|
||||
primary = backgroundColorsBinding.primary;
|
||||
toHexString = primary.toHexString;
|
||||
items2[1] = Reflect.apply(toHexString, primary, []);
|
||||
secondary = backgroundColorsBinding.secondary;
|
||||
toHexString = secondary.toHexString;
|
||||
items2[2] = Reflect.apply(toHexString, secondary, []);
|
||||
value = environment.__proto__;
|
||||
binding = env1_23;
|
||||
items2[3] = binding;
|
||||
items2[4] = binding;
|
||||
r0 = items2;
|
||||
}
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun60876() { // fn#60876, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7768:3950, offset: 0x01713781, size: 282 bytes, params: 1, frame: 20
|
||||
const HapticFeedbackTypes = (require(4081) /* metro dependency 4081: HapticUtilsNative */).HapticFeedbackTypes;
|
||||
let value = environment.__proto__;
|
||||
const value3 = env1_4(env0_1.current);
|
||||
const property = value3[0];
|
||||
const value4 = value3.slice(1);
|
||||
if (property == null) {
|
||||
if (value4.length >= env1_22.length / 2) {
|
||||
value = require(4081) /* metro dependency 4081: HapticUtilsNative */;
|
||||
value.triggerHapticFeedback(HapticFeedbackTypes.IMPACT_LIGHT);
|
||||
} else {
|
||||
value = require(4081) /* metro dependency 4081: HapticUtilsNative */;
|
||||
value.triggerHapticFeedback(HapticFeedbackTypes.IMPACT_MEDIUM);
|
||||
}
|
||||
} else if (value4.length === 0) {
|
||||
value = require(4081) /* metro dependency 4081: HapticUtilsNative */;
|
||||
value.triggerHapticFeedback(HapticFeedbackTypes.IMPACT_HEAVY);
|
||||
} else if (value4.length >= env1_22.length / 2) {
|
||||
value = require(4081) /* metro dependency 4081: HapticUtilsNative */;
|
||||
value.triggerHapticFeedback(HapticFeedbackTypes.IMPACT_LIGHT);
|
||||
} else {
|
||||
value = require(4081) /* metro dependency 4081: HapticUtilsNative */;
|
||||
value.triggerHapticFeedback(HapticFeedbackTypes.IMPACT_MEDIUM);
|
||||
}
|
||||
if (property != null) {
|
||||
global.setTimeout(env0_2, property);
|
||||
}
|
||||
env0_1.current = value4;
|
||||
}
|
||||
|
||||
function _fun60877() { // fn#60877, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7768:4316, offset: 0x0171389b, size: 22 bytes, params: 1, frame: 9
|
||||
env0_2();
|
||||
return _fun60878;
|
||||
}
|
||||
|
||||
function _fun60880(a0, a1) { // fn#60880, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7768:4611, offset: 0x017138d5, size: 396 bytes, params: 3, frame: 24
|
||||
var object2;
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
const value2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
|
||||
const value3 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
|
||||
env1_5.useEffect(_fun60881, [value2, a0, value3]);
|
||||
object2 = {};
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
let useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
let closure = n_60882;
|
||||
const interpolate = reanimatedRexportModule.interpolate;
|
||||
closure.__closure = {interpolate: interpolate, springInput: value2, isProfilePreview: a1};
|
||||
closure.__workletHash = 15385317790278;
|
||||
closure.__initData = env1_19;
|
||||
object2.previewViewStyle = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
const moduleValue4 = reanimatedRexportModule;
|
||||
useAnimatedStyle = moduleValue4.useAnimatedStyle;
|
||||
closure = s_60883;
|
||||
closure.__closure = {interpolate: interpolate, springInput: value2};
|
||||
closure.__workletHash = 4517716462039;
|
||||
closure.__initData = env1_20;
|
||||
object2.textViewStyle = Reflect.apply(useAnimatedStyle, moduleValue4, [closure]);
|
||||
const moduleValue5 = reanimatedRexportModule;
|
||||
useAnimatedStyle = moduleValue5.useAnimatedStyle;
|
||||
closure = c_60884;
|
||||
closure.__closure = {interpolate: interpolate, linearInput: value3};
|
||||
closure.__workletHash = 6018737312;
|
||||
closure.__initData = env1_21;
|
||||
object2.curtainViewStyle = Reflect.apply(useAnimatedStyle, moduleValue5, [closure]);
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun60885() { // fn#60885, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7768:6137, offset: 0x01713cc5, size: 156 bytes, params: 1, frame: 20
|
||||
const value = environment.__proto__;
|
||||
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
const track = defaultImport.track;
|
||||
const COLLECTIBLES_SHOP_ELEMENT_CLICKED = AnalyticEvents.COLLECTIBLES_SHOP_ELEMENT_CLICKED;
|
||||
const productBinding = product;
|
||||
Reflect.apply(track, defaultImport, [COLLECTIBLES_SHOP_ELEMENT_CLICKED, {sku_id: productBinding.skuId,
|
||||
cta_name: 'post_purchase_gift', location_stack: analyticsLocations}]);
|
||||
(importDefault(7589) /* metro dependency 7589: ProductPurchaseSuccessActionCreators */).close();
|
||||
(require(7631) /* metro dependency 7631: openGiftModal */).openShopGiftModal({skuId: productBinding.skuId,
|
||||
analyticsLocations: analyticsLocations});
|
||||
}
|
||||
|
||||
function _fun60886() { // fn#60886, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7768:6458, offset: 0x01713d61, size: 55 bytes, params: 1, frame: 12
|
||||
const deviceOrientationModule = require(7717) /* metro dependency 7717: DeviceOrientation */;
|
||||
const lockOrientation = deviceOrientationModule.lockOrientation;
|
||||
const PORTRAIT = Orientation.PORTRAIT;
|
||||
Reflect.apply(lockOrientation, deviceOrientationModule, [PORTRAIT]);
|
||||
return _fun60887;
|
||||
}
|
||||
|
||||
function _fun60881() { // fn#60881, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7768:4707, offset: 0x01713a61, size: 204 bytes, params: 1, frame: 20
|
||||
var r1;
|
||||
var r0;
|
||||
var value3;
|
||||
var moduleValue;
|
||||
var withDelay;
|
||||
var moduleValue3;
|
||||
var value;
|
||||
let binding = env0_2;
|
||||
let set = binding.set;
|
||||
const value2 = 1;
|
||||
if (env0_0) {
|
||||
r1 = value2;
|
||||
} else {
|
||||
value3 = environment.__proto__.__proto__;
|
||||
moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
r1 = moduleValue.withDelay(200, (require(4577) /* metro dependency 4577: spring */).withSpring(value2,
|
||||
{'duration': 500, 'dampingRatio': 0.7}));
|
||||
}
|
||||
Reflect.apply(set, binding, [r1]);
|
||||
binding = env0_3;
|
||||
set = binding.set;
|
||||
if (env0_0) {
|
||||
r0 = value2;
|
||||
} else {
|
||||
value = environment.__proto__.__proto__;
|
||||
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
withDelay = value.withDelay;
|
||||
moduleValue3 = require(4504) /* metro dependency 4504: timing */;
|
||||
value = Reflect.apply(withDelay, value, [200, moduleValue3.withTiming(value2, {duration: 200})]);
|
||||
r0 = value;
|
||||
}
|
||||
Reflect.apply(set, binding, [r0]);
|
||||
}
|
||||
|
||||
function n_60882() { // fn#60882, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7768:4933, offset: 0x01713b2d, size: 174 bytes, params: 1, frame: 22
|
||||
const object3 = {};
|
||||
let value = environment.__proto__.__proto__;
|
||||
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const interpolate = value.interpolate;
|
||||
const binding = env0_2;
|
||||
object3.opacity = Reflect.apply(interpolate, value, [binding.get(), [0, 1], [0.1, 1]]);
|
||||
const object4 = {};
|
||||
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
object4.scale = value.interpolate(binding.get(), [0, 1], [require ? 0.6 : 0, 1]);
|
||||
object3.transform = [object4];
|
||||
return object3;
|
||||
}
|
||||
|
||||
function s_60883() { // fn#60883, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7768:5231, offset: 0x01713bdb, size: 152 bytes, params: 1, frame: 21
|
||||
const object3 = {};
|
||||
let value = environment.__proto__.__proto__;
|
||||
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const interpolate = value.interpolate;
|
||||
const binding = env0_2;
|
||||
object3.opacity = Reflect.apply(interpolate, value, [binding.get(), [0, 1], [0, 1]]);
|
||||
const object4 = {};
|
||||
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
object4.scale = value.interpolate(binding.get(), [0, 1], [0.75, 1]);
|
||||
object3.transform = [object4];
|
||||
return object3;
|
||||
}
|
||||
|
||||
function c_60884() { // fn#60884, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7768:5509, offset: 0x01713c73, size: 82 bytes, params: 1, frame: 16
|
||||
const object2 = {};
|
||||
let value = environment.__proto__.__proto__;
|
||||
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
object2.opacity = value.interpolate(env0_3.get(), [0, 1], [0.5, 0]);
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun60887() { // fn#60887, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7768:6500, offset: 0x01713d98, size: 37 bytes, params: 1, frame: 11
|
||||
const value = environment.__proto__.__proto__;
|
||||
(require(7717) /* metro dependency 7717: DeviceOrientation */).restoreDefaultOrientation();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
/* Metro module 8472; source: modules/collectibles/native/ProfileEffectSampleV2.tsx; dependencies: [27, 8471, 33, 4501, 697, 5475, 8473, 8474, 2] */
|
||||
function _fun67269(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#67269, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8657:6, offset: 0x01c1c60e, size: 304 bytes, params: 8, frame: 23
|
||||
var object2;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = (require(27) /* metro dependency 27 */).View;
|
||||
const SAMPLE_PROFILE_ASPECT_RATIO = (require(8471) /* metro dependency 8471: CollectiblesPreviewConstants */).SAMPLE_PROFILE_ASPECT_RATIO;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_3 = value.jsx;
|
||||
const env0_4 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {profileContainer: {'position': 'absolute', 'display': 'flex', 'height': '100%', 'width': '100%'}};
|
||||
const BACKGROUND_MOD_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_SUBTLE;
|
||||
object2.profileBackground = {backgroundColor: BACKGROUND_MOD_SUBTLE};
|
||||
object2.sampleProfileImage = {aspectRatio: SAMPLE_PROFILE_ASPECT_RATIO};
|
||||
const BORDER_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_MUTED;
|
||||
object2.profileBorder = {'position': 'absolute', 'height': '100%', 'width': '100%', 'borderWidth': 1,
|
||||
borderColor: BORDER_MUTED};
|
||||
const env0_5 = Reflect.apply(createStyles, value, [object2]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/ProfileEffectSampleV2.tsx');
|
||||
exports.default = _default_67270;
|
||||
}
|
||||
|
||||
function _default_67270({item, hideBackground}) { // fn#67270, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8657:517, offset: 0x01c1c73e, size: 278 bytes, params: 2, frame: 24
|
||||
hideBackground = !(hideBackground === undefined) && hideBackground;
|
||||
const styles = useStyles();
|
||||
const value2 = !hideBackground;
|
||||
return (
|
||||
<View style={[styles.profileContainer, hideBackground ? value2 : styles.profileBackground]}>
|
||||
{((Component) => <Component style={[styles.sampleProfileImage]} source={{uri: importDefault(8473) /* metro dependency 8473: sample_profilePng */}} accessible={false} resizeMode="cover" />)(importDefault(5475) /* metro dependency 5475: FastImage */)}
|
||||
{hideBackground ? value2 : <View style={styles.profileBorder} />}
|
||||
{((Component) => <Component skuId={item.skuId} bannerAdjustment={0} useThumbnail />)(importDefault(8474) /* metro dependency 8474: ProfileEffect */)}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,178 @@
|
||||
/* Metro module 14078; source: modules/collectibles/native/ShelfBlock.tsx; dependencies: [31, 27, 5121, 663, 661, 33, 4501, 697, 1484, 10023, 14057, 6771, 6789, 566, 14058, 14049, 5120, 10020, 4573, 4578, 1244, 6517, 8416, 2] */
|
||||
function _fun106686(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#106686, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14275:6, offset: 0x022e6904, size: 634 bytes, params: 8, frame: 23
|
||||
var object5;
|
||||
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.Image;
|
||||
const env0_5 = value.View;
|
||||
const collectiblesCategoryStore = importDefault(5121) /* metro dependency 5121: CollectiblesCategoryStore */;
|
||||
const env0_7 = (require(663) /* metro dependency 663: CollectiblesShopConstants */).CollectiblesMobileShopScreen;
|
||||
const env0_8 = (require(661) /* metro dependency 661: Constants */).UserSettingsSections;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_9 = value.jsx;
|
||||
const env0_10 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object5 = {};
|
||||
const object6 = {width: '100%'};
|
||||
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object6.paddingTop = PX_16;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object6.paddingBottom = PX_16;
|
||||
object5.container = object6;
|
||||
const object7 = {};
|
||||
let PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
object7.marginTop = PX_24;
|
||||
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
object7.paddingTop = PX_24;
|
||||
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
object7.paddingBottom = PX_24;
|
||||
object7.overflow = 'hidden';
|
||||
object5.containerWithBackground = object7;
|
||||
object5.backgroundImage = {'position': 'absolute', 'top': 0, 'left': 0, 'bottom': 0, 'minWidth': '100%',
|
||||
'aspectRatio': 2.5, 'resizeMode': 'cover'};
|
||||
const object8 = {'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'space-between'};
|
||||
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object8.gap = PX_12;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object8.paddingHorizontal = PX_16;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object8.marginBottom = PX_16;
|
||||
object8.zIndex = 1;
|
||||
object5.header = object8;
|
||||
object5.headingWrapper = {flexShrink: 1};
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object5.listEdgeSpacer = {width: PX_16};
|
||||
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object5.listItemSeparator = {width: PX_12};
|
||||
const env0_11 = Reflect.apply(createStyles, value, [object5]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/ShelfBlock.tsx');
|
||||
exports.default = _default_106689;
|
||||
}
|
||||
|
||||
function ListEdgeSpacer_106687() { // fn#106687, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14275:926, offset: 0x022e6b7e, size: 41 bytes, params: 1, frame: 14
|
||||
const styles = useStyles();
|
||||
return <View style={styles.listEdgeSpacer} />;
|
||||
}
|
||||
|
||||
function ListItemSeparator_106688() { // fn#106688, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14275:997, offset: 0x022e6ba7, size: 41 bytes, params: 1, frame: 14
|
||||
const styles = useStyles();
|
||||
return <View style={styles.listItemSeparator} />;
|
||||
}
|
||||
|
||||
function _default_106689({block, preferVCPrice}) { // fn#106689, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14275:1062, offset: 0x022e6bd0, size: 1134 bytes, params: 2, frame: 39
|
||||
var Button;
|
||||
var intl;
|
||||
const styles = useStyles();
|
||||
const value3 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
|
||||
const value4 = (require(10023) /* metro dependency 10023: CollectiblesAnalyticsContext */).useCollectiblesAnalyticsContext();
|
||||
const env0_3 = value4;
|
||||
const collectiblesCoachmarkScrollDismissContextModule = require(14057) /* metro dependency 14057: CollectiblesCoachmarkScrollDismissContext */;
|
||||
const useCollectiblesCoachmarkScrollDismissContext = collectiblesCoachmarkScrollDismissContextModule.useCollectiblesCoachmarkScrollDismissContext;
|
||||
const handleDismissCoachmarkOnScroll = Reflect.apply(useCollectiblesCoachmarkScrollDismissContext,
|
||||
collectiblesCoachmarkScrollDismissContextModule, []).handleDismissCoachmarkOnScroll;
|
||||
const defaultImport = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
|
||||
const COLLECTIBLES_SHOP_SHELF = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).COLLECTIBLES_SHOP_SHELF;
|
||||
const analyticsLocations = defaultImport(COLLECTIBLES_SHOP_SHELF).analyticsLocations;
|
||||
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([CollectiblesCategoryStore],
|
||||
_fun106690);
|
||||
const value6 = (importDefault(14058) /* metro dependency 14058: useGetProductsFromSkus */)();
|
||||
const binding = env0_3;
|
||||
const value8 = (require(14049) /* metro dependency 14049: useFilteredAndSortedProducts */).useFilteredAndSortedProducts({products: binding.useMemo(_fun106691,
|
||||
[block.rankedSkuIds, value6])});
|
||||
const value9 = binding.useCallback(_fun106692, [value5, value3, value4]);
|
||||
const value10 = binding.useCallback(_fun106693, [block.name, preferVCPrice]);
|
||||
const value11 = binding.useCallback(function(a0) {
|
||||
return a0.skuId;
|
||||
}, []);
|
||||
if (value8.length === 0) {
|
||||
return null;
|
||||
}
|
||||
const value12 = block.mobileBackgroundImage != null;
|
||||
items = [styles.container];
|
||||
items[1] = value12 && styles.containerWithBackground;
|
||||
const AnalyticsLocationProvider = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider;
|
||||
const object2 = {style: items};
|
||||
items = [value12 && block.mobileBackgroundImage != null && <Image style={styles.backgroundImage} source={{uri: block.mobileBackgroundImage}} />];
|
||||
const Heading = (require(4573) /* metro dependency 4573: Text */).Heading;
|
||||
const view = <View style={styles.headingWrapper}><Heading variant="text-md/semibold" style={value12 ? {color: block.titleColor ?? '#ffffff'} : undefined}>{block.name}</Heading></View>;
|
||||
let r12 = block.showButton && value5 != null;
|
||||
if (r12) {
|
||||
Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
var buttonProps = {'variant': null, 'size': 'sm', 'shrink': true, 'grow': false,
|
||||
variant: value12 ? 'primary-overlay' : 'secondary'};
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
buttonProps.text = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.xFcotU);
|
||||
buttonProps.onPress = value9;
|
||||
r12 = <Button {...buttonProps} />;
|
||||
}
|
||||
items[1] = <View style={styles.header}>{view}{r12}</View>;
|
||||
const LayerScope = (require(6517) /* metro dependency 6517: LayerScopeNative */).LayerScope;
|
||||
const FlashList = (require(8416) /* metro dependency 8416: flashList */).FlashList;
|
||||
const flashListProps = {'horizontal': true, 'accessibilityRole': 'list', accessibilityLabel: block.name,
|
||||
data: value8, keyExtractor: value11, onScroll: handleDismissCoachmarkOnScroll, renderItem: value10,
|
||||
decelerationRate: 'fast'};
|
||||
const COLLECTIBLES_SHOP_CARD_WIDTH = (require(10020) /* metro dependency 10020: CollectiblesShopCardV2 */).COLLECTIBLES_SHOP_CARD_WIDTH;
|
||||
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
flashListProps.snapToInterval = COLLECTIBLES_SHOP_CARD_WIDTH + PX_12;
|
||||
flashListProps.estimatedItemSize = COLLECTIBLES_SHOP_CARD_WIDTH;
|
||||
flashListProps.showsHorizontalScrollIndicator = false;
|
||||
flashListProps.ListHeaderComponent = ListEdgeSpacer_106687;
|
||||
flashListProps.ListFooterComponent = ListEdgeSpacer_106687;
|
||||
flashListProps.ItemSeparatorComponent = ListItemSeparator_106688;
|
||||
items[2] = <LayerScope><FlashList {...flashListProps} /></LayerScope>;
|
||||
return (
|
||||
<AnalyticsLocationProvider value={analyticsLocations}>
|
||||
<View {...object2}>
|
||||
{items}
|
||||
</View>
|
||||
</AnalyticsLocationProvider>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun106690() { // fn#106690, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14275:1362, offset: 0x022e703e, size: 54 bytes, params: 1, frame: 12
|
||||
return block.categorySkuId != null ? CollectiblesCategoryStore.getCategory(block.categorySkuId) : undefined;
|
||||
}
|
||||
|
||||
function _fun106692() { // fn#106692, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14275:1568, offset: 0x022e7074, size: 187 bytes, params: 1, frame: 19
|
||||
var isOrbsExclusive;
|
||||
var value2;
|
||||
var binding;
|
||||
var object2;
|
||||
var openCollectiblesShopMobile;
|
||||
var COLLECTIBLES_SHOP;
|
||||
var value;
|
||||
if (env0_4 != null) {
|
||||
isOrbsExclusive = env0_4.isOrbsExclusive;
|
||||
value2 = environment.__proto__;
|
||||
if (isOrbsExclusive) {
|
||||
value = require(5120) /* metro dependency 5120: CollectiblesActionCreators */;
|
||||
openCollectiblesShopMobile = value.openCollectiblesShopMobile;
|
||||
object2 = {};
|
||||
COLLECTIBLES_SHOP = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).COLLECTIBLES_SHOP;
|
||||
object2.analyticsLocations = [COLLECTIBLES_SHOP];
|
||||
COLLECTIBLES_SHOP = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).COLLECTIBLES_SHOP;
|
||||
object2.analyticsSource = COLLECTIBLES_SHOP;
|
||||
object2.screen = CollectiblesMobileShopScreen.ORBS;
|
||||
Reflect.apply(openCollectiblesShopMobile, value, [object2]);
|
||||
} else {
|
||||
binding = env0_2;
|
||||
binding.push(UserSettingsSections.COLLECTIBLES_SHOP_VIEW_ALL_CATEGORY_ITEMS, {category: env0_4,
|
||||
analyticsContext: env0_3});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun106693({item, index}) { // fn#106693, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14275:1858, offset: 0x022e712f, size: 129 bytes, params: 2, frame: 19
|
||||
const value = environment.__proto__;
|
||||
const CollectiblesAnalyticsProvider = (require(10023) /* metro dependency 10023: CollectiblesAnalyticsContext */).CollectiblesAnalyticsProvider;
|
||||
return (
|
||||
<CollectiblesAnalyticsProvider newValue={{tilePosition: index, pageSection: block.name}}>
|
||||
{((Component) => <Component product={item} preferVCPrice={preferVCPrice} />)(importDefault(10020) /* metro dependency 10020: CollectiblesShopCardV2 */)}
|
||||
</CollectiblesAnalyticsProvider>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,100 @@
|
||||
/* Metro module 14054; source: modules/collectibles/native/ShopBlockItem.tsx; dependencies: [31, 27, 5121, 33, 4501, 697, 566, 5161, 10023, 14055, 14067, 14068, 14070, 14077, 14078, 2] */
|
||||
function _fun106577(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#106577, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14251:6, offset: 0x022e0d4e, size: 240 bytes, params: 8, frame: 21
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(27) /* metro dependency 27 */).View;
|
||||
const collectiblesCategoryStore = importDefault(5121) /* metro dependency 5121: CollectiblesCategoryStore */;
|
||||
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
const env0_7 = Reflect.apply(createStyles, createStylesModule, [{shopBlockSpacing: {marginTop: PX_16}}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/ShopBlockItem.tsx');
|
||||
exports.default = _default_106578;
|
||||
}
|
||||
|
||||
function _default_106578({block, screen, preferVCPrice, framesBannerBlock}) { // fn#106578, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14251:229, offset: 0x022e0e3e, size: 1073 bytes, params: 2, frame: 26
|
||||
var r4;
|
||||
const CollectiblesAnalyticsProvider = (require(10023) /* metro dependency 10023: CollectiblesAnalyticsContext */).CollectiblesAnalyticsProvider;
|
||||
var value;
|
||||
const styles = useStyles();
|
||||
const value2 = env0_3.useMemo(_fun106581, [block,
|
||||
(require(566) /* metro dependency 566: flux */).useStateFromStores([CollectiblesCategoryStore], function() {
|
||||
return CollectiblesCategoryStore.categories;
|
||||
}).size, (require(566) /* metro dependency 566: flux */).useStateFromStores([CollectiblesCategoryStore],
|
||||
function() {
|
||||
return CollectiblesCategoryStore.products;
|
||||
}).size]);
|
||||
const type = block.type;
|
||||
const ShopBlockType = (require(5161) /* metro dependency 5161: ShopBlockType */).ShopBlockType;
|
||||
const HERO = ShopBlockType.HERO;
|
||||
if (HERO === type) {
|
||||
if (framesBannerBlock != null) {
|
||||
value = importDefault(14055) /* metro dependency 14055: FramesHeroBlock */;
|
||||
value = ((Component) => <Component heroBlock={block} bannerBlock={framesBannerBlock} preferVCPrice={preferVCPrice} screen={screen} key={value2} />)(value);
|
||||
r4 = value;
|
||||
} else {
|
||||
value = importDefault(14067) /* metro dependency 14067: HeroBlock */;
|
||||
value = ((Component) => <Component heroBlock={block} preferVCPrice={preferVCPrice} screen={screen} key={value2} />)(value);
|
||||
r4 = value;
|
||||
}
|
||||
return (
|
||||
<CollectiblesAnalyticsProvider newValue={{pageSection: 'top 4'}}>
|
||||
{r4}
|
||||
</CollectiblesAnalyticsProvider>
|
||||
);
|
||||
}
|
||||
const FEATURED = ShopBlockType.FEATURED;
|
||||
if (FEATURED === type) {
|
||||
return (
|
||||
<CollectiblesAnalyticsProvider newValue={{pageSection: 'featured_block'}}>
|
||||
<View style={styles.shopBlockSpacing} key={value2}>
|
||||
{((Component) => <Component featuredBlock={block} />)(importDefault(14068) /* metro dependency 14068: FeaturedBlock */)}
|
||||
</View>
|
||||
</CollectiblesAnalyticsProvider>
|
||||
);
|
||||
}
|
||||
const FEED = ShopBlockType.FEED;
|
||||
if (FEED === type) {
|
||||
return (
|
||||
<CollectiblesAnalyticsProvider newValue={{pageSection: 'popular picks'}}>
|
||||
<View style={styles.shopBlockSpacing}>
|
||||
{((Component) => <Component feedBlock={block} screen={screen} preferVCPrice={preferVCPrice} disableBundleStaticBackground key={value2} />)(importDefault(14070) /* metro dependency 14070: FeedBlock */)}
|
||||
</View>
|
||||
</CollectiblesAnalyticsProvider>
|
||||
);
|
||||
}
|
||||
const FRAMES_PRODUCT_SHELF = ShopBlockType.FRAMES_PRODUCT_SHELF;
|
||||
if (FRAMES_PRODUCT_SHELF === type) {
|
||||
return (
|
||||
<CollectiblesAnalyticsProvider newValue={{pageSection: 'frames_product_shelf'}}>
|
||||
{((Component) => <Component block={block} preferVCPrice={preferVCPrice} key={value2} />)(importDefault(14077) /* metro dependency 14077: FramesProductShelfBlock */)}
|
||||
</CollectiblesAnalyticsProvider>
|
||||
);
|
||||
}
|
||||
const SHELF = ShopBlockType.SHELF;
|
||||
if (SHELF === type) {
|
||||
return (
|
||||
<CollectiblesAnalyticsProvider newValue={{pageSection: block.name}}>
|
||||
<View style={styles.shopBlockSpacing}>
|
||||
{((Component) => <Component block={block} preferVCPrice={preferVCPrice} key={value2} />)(importDefault(14078) /* metro dependency 14078: ShelfBlock */)}
|
||||
</View>
|
||||
</CollectiblesAnalyticsProvider>
|
||||
);
|
||||
}
|
||||
const WIDE_BANNER = ShopBlockType.WIDE_BANNER;
|
||||
if (WIDE_BANNER !== type) {
|
||||
(require(5161) /* metro dependency 5161: ShopBlockType */).ShopBlockType.FRAMES_BANNER;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function _fun106581() { // fn#106581, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14251:415, offset: 0x022e128d, size: 218 bytes, params: 1, frame: 17
|
||||
const type = block.type;
|
||||
const ShopBlockType = (require(5161) /* metro dependency 5161: ShopBlockType */).ShopBlockType;
|
||||
const HERO = ShopBlockType.HERO;
|
||||
return type === HERO ? 'hero-' + block.categoryStoreListingId : block.type === ShopBlockType.REWARD_HERO ? 'reward-hero-' + block.categoryStoreListingId : '' + categories.size + '-' + products.size;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,179 @@
|
||||
/* Metro module 14048; source: modules/collectibles/native/ShopCategory.tsx; dependencies: [31, 27, 663, 661, 33, 10020, 4501, 697, 6771, 1484, 14049, 14042, 14047, 10023, 4080, 10085, 5120, 6789, 5278, 1244, 6818, 8416, 2] */
|
||||
function _fun106532(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#106532, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14245:6, offset: 0x022df63b, size: 545 bytes, params: 8, frame: 25
|
||||
var object2;
|
||||
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.Image;
|
||||
const env0_5 = value.View;
|
||||
const env0_6 = (require(663) /* metro dependency 663: CollectiblesShopConstants */).CollectiblesMobileShopScreen;
|
||||
const env0_7 = (require(661) /* metro dependency 661: Constants */).UserSettingsSections;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_8 = value.jsx;
|
||||
const env0_9 = value.jsxs;
|
||||
const COLLECTIBLES_SHOP_CARD_HEIGHT = (require(10020) /* metro dependency 10020: CollectiblesShopCardV2 */).COLLECTIBLES_SHOP_CARD_HEIGHT;
|
||||
value = 100 + COLLECTIBLES_SHOP_CARD_HEIGHT;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
object2 = {};
|
||||
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object2.categoryContainer = {marginTop: PX_16, marginBottom: 24, height: value};
|
||||
const object4 = {'display': 'flex', 'flexDirection': 'row', 'justifyContent': 'flex-end', 'alignItems': 'center',
|
||||
'marginBottom': 16, 'marginHorizontal': 16, 'borderRadius': null, 'overflow': 'hidden', 'borderWidth': 1,
|
||||
'height': 84, 'padding': 20};
|
||||
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
||||
object2.categoryHeader = object4;
|
||||
const PRIMARY_660 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_660;
|
||||
object2.categoryHeaderBorderDark = {borderColor: PRIMARY_660};
|
||||
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
|
||||
object2.categoryHeaderBorderLight = {borderColor: BACKGROUND_BASE_LOWEST};
|
||||
object2.imageBackground = {'resizeMode': 'cover', 'top': 0, 'bottom': 0, 'left': 0, 'right': 0,
|
||||
'position': 'absolute'};
|
||||
const object5 = {};
|
||||
const CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT;
|
||||
object5.backgroundColor = CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT;
|
||||
object5.padding = 6;
|
||||
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
||||
object2.viewAllIcon = object5;
|
||||
const env0_10 = Reflect.apply(createStyles, createStylesModule, [object2]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/ShopCategory.tsx');
|
||||
exports.CATEGORY_CONTAINER_HEIGHT = value;
|
||||
exports.CATEGORY_CONTAINER_BOTTOM_MARGIN = 24;
|
||||
exports.ShopCategory = ShopCategory;
|
||||
}
|
||||
|
||||
function Spacing() { // fn#106533, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14245:976, offset: 0x022df85c, size: 36 bytes, params: 1, frame: 14
|
||||
return <View style={{width: 12}} />;
|
||||
}
|
||||
|
||||
function HeaderAndFooterSpacing() { // fn#106534, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14245:1027, offset: 0x022df880, size: 36 bytes, params: 1, frame: 14
|
||||
return <View style={{width: 16}} />;
|
||||
}
|
||||
|
||||
function ShopCategory({index, category, isDarkTheme}) { // fn#106535, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14245:1217, offset: 0x022df8a4, size: 1145 bytes, params: 2, frame: 39
|
||||
var object7;
|
||||
const analyticsLocations = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().analyticsLocations;
|
||||
const styles = useStyles();
|
||||
const env0_2 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
|
||||
const products = category.products;
|
||||
const env0_3 = category.unpublishedAt;
|
||||
const value2 = (require(14049) /* metro dependency 14049: useFilteredAndSortedProducts */).useFilteredAndSortedProducts({products: products,
|
||||
bypassAndroidUnsyncedFilter: category.isOrbsExclusive});
|
||||
const mobileBannerUrl = category.mobileBannerUrl;
|
||||
const {productIndex, initialProductSkuId,
|
||||
initialVariantIndex} = (require(14042) /* metro dependency 14042: useCollectiblesShopDeepLinkProps */).useCollectiblesShopDeepLinkProps({products: value2});
|
||||
const value4 = env0_3.useRef(null);
|
||||
const useScrollToInitialIndexOnceModule = require(14047) /* metro dependency 14047: useScrollToInitialIndexOnce */;
|
||||
const useScrollToInitialIndexOnce = useScrollToInitialIndexOnceModule.useScrollToInitialIndexOnce;
|
||||
object7 = {shouldScroll: productIndex != null && productIndex > 0, initialScrollIndex: productIndex,
|
||||
flashListRef: value4};
|
||||
const INITIAL_SCROLL_DELAY_MS = useScrollToInitialIndexOnceModule.INITIAL_SCROLL_DELAY_MS;
|
||||
object7.afterMs = INITIAL_SCROLL_DELAY_MS;
|
||||
Reflect.apply(useScrollToInitialIndexOnce, useScrollToInitialIndexOnceModule, [object7]);
|
||||
env0_3.useEffect(_fun106536, [initialProductSkuId, initialVariantIndex, value2, analyticsLocations,
|
||||
(require(10023) /* metro dependency 10023: CollectiblesAnalyticsContext */).useCollectiblesAnalyticsContext()]);
|
||||
const CollectiblesAnalyticsProvider = (require(10023) /* metro dependency 10023: CollectiblesAnalyticsContext */).CollectiblesAnalyticsProvider;
|
||||
const object3 = {categoryPosition: index};
|
||||
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
||||
const pressableOpacityProps = {style: [styles.categoryHeader,
|
||||
isDarkTheme ? styles.categoryHeaderBorderDark : styles.categoryHeaderBorderLight], accessibilityRole: 'button'};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let formatToPlainString = intl.formatToPlainString;
|
||||
let FNtLb3 = (require(1244) /* metro dependency 1244: indexNative */).t.FNtLb3;
|
||||
pressableOpacityProps.accessibilityLabel = Reflect.apply(formatToPlainString, intl, [FNtLb3,
|
||||
{category: category.name}]);
|
||||
const string = intl.string;
|
||||
const F8ma9x = (require(1244) /* metro dependency 1244: indexNative */).t.F8ma9x;
|
||||
pressableOpacityProps.accessibilityHint = Reflect.apply(string, intl, [F8ma9x]);
|
||||
pressableOpacityProps.activeOpacity = 0.8;
|
||||
const object4 = {};
|
||||
object4.radius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
||||
pressableOpacityProps.androidRippleConfig = object4;
|
||||
pressableOpacityProps.hitSlop = 8;
|
||||
pressableOpacityProps.onPress = onPress_106538;
|
||||
const r11 = mobileBannerUrl != null && <Image source={{uri: mobileBannerUrl}} style={styles.imageBackground} />;
|
||||
const ChevronSmallRightIcon = (require(6818) /* metro dependency 6818: ChevronSmallRightIcon */).ChevronSmallRightIcon;
|
||||
const pressableOpacity = <PressableOpacity {...pressableOpacityProps} key={category.storeListingId}>{r11}<View style={styles.viewAllIcon}><ChevronSmallRightIcon size="sm" color="white" /></View></PressableOpacity>;
|
||||
const FlashList = (require(8416) /* metro dependency 8416: flashList */).FlashList;
|
||||
const object5 = {ref: value4, horizontal: true};
|
||||
formatToPlainString = intl.formatToPlainString;
|
||||
FNtLb3 = (require(1244) /* metro dependency 1244: indexNative */).t.FNtLb3;
|
||||
object5.accessibilityLabel = Reflect.apply(formatToPlainString, intl, [FNtLb3, {category: category.name}]);
|
||||
object5.accessibilityRole = 'list';
|
||||
object5.data = value2;
|
||||
object5.renderItem = renderItem_106539;
|
||||
object5.decelerationRate = 'fast';
|
||||
const COLLECTIBLES_SHOP_CARD_WIDTH = (require(10020) /* metro dependency 10020: CollectiblesShopCardV2 */).COLLECTIBLES_SHOP_CARD_WIDTH;
|
||||
object5.snapToInterval = COLLECTIBLES_SHOP_CARD_WIDTH + 12;
|
||||
object5.estimatedItemSize = COLLECTIBLES_SHOP_CARD_WIDTH + 12;
|
||||
object5.showsHorizontalScrollIndicator = false;
|
||||
object5.ListHeaderComponent = HeaderAndFooterSpacing;
|
||||
object5.ListFooterComponent = HeaderAndFooterSpacing;
|
||||
object5.ItemSeparatorComponent = Spacing;
|
||||
object5.initialScrollIndex = productIndex;
|
||||
return (
|
||||
<CollectiblesAnalyticsProvider newValue={object3}>
|
||||
<View style={styles.categoryContainer}>
|
||||
{pressableOpacity}
|
||||
<FlashList {...object5} key={'category-flashlist-' + index + '-' + category.storeListingId} />
|
||||
</View>
|
||||
</CollectiblesAnalyticsProvider>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun106536() { // fn#106536, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14245:1819, offset: 0x022dfd1d, size: 157 bytes, params: 1, frame: 16
|
||||
var environment;
|
||||
var value4;
|
||||
var value5;
|
||||
const initialProductSkuIdBinding = initialProductSkuId;
|
||||
const value2 = null;
|
||||
const r5 = value2 != initialProductSkuIdBinding ? env0_4.find(function({skuId}) {
|
||||
return skuId === initialProductSkuId;
|
||||
}) : value2;
|
||||
if (value2 != r5) {
|
||||
value4 = environment.__proto__;
|
||||
value5 = undefined;
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
(require(10085) /* metro dependency 10085: openProductDetailsActionSheet */).openProductDetailsActionSheet({product: r5,
|
||||
|
||||
initialVariantIndex: initialVariantIndex, analyticsLocations: analyticsLocations,
|
||||
shopAnalyticsContext: value2 != env0_7 ? env0_7 : value5});
|
||||
}
|
||||
}
|
||||
|
||||
function ShopCategoryOnPress() { // fn#106538, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14245:2550, owner: ShopCategory.onPress, offset: 0x022dfdcf, size: 170 bytes, params: 1, frame: 19
|
||||
var binding;
|
||||
var object2;
|
||||
var openCollectiblesShopMobile;
|
||||
var COLLECTIBLES_SHOP;
|
||||
var value;
|
||||
const categoryBinding = category;
|
||||
if (categoryBinding.isOrbsExclusive) {
|
||||
value = require(5120) /* metro dependency 5120: CollectiblesActionCreators */;
|
||||
openCollectiblesShopMobile = value.openCollectiblesShopMobile;
|
||||
object2 = {};
|
||||
COLLECTIBLES_SHOP = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).COLLECTIBLES_SHOP;
|
||||
object2.analyticsLocations = [COLLECTIBLES_SHOP];
|
||||
COLLECTIBLES_SHOP = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).COLLECTIBLES_SHOP;
|
||||
object2.analyticsSource = COLLECTIBLES_SHOP;
|
||||
object2.screen = CollectiblesMobileShopScreen.ORBS;
|
||||
Reflect.apply(openCollectiblesShopMobile, value, [object2]);
|
||||
} else {
|
||||
binding = env0_2;
|
||||
binding.push(UserSettingsSections.COLLECTIBLES_SHOP_VIEW_ALL_CATEGORY_ITEMS, {category: categoryBinding,
|
||||
analyticsContext: env0_7});
|
||||
}
|
||||
}
|
||||
|
||||
function ShopCategoryRenderItem({item, index}) { // fn#106539, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14245:3166, owner: ShopCategory.renderItem, offset: 0x022dfe79, size: 121 bytes, params: 2, frame: 19
|
||||
const value = environment.__proto__;
|
||||
const CollectiblesAnalyticsProvider = (require(10023) /* metro dependency 10023: CollectiblesAnalyticsContext */).CollectiblesAnalyticsProvider;
|
||||
return (
|
||||
<CollectiblesAnalyticsProvider newValue={{tilePosition: index}} key={item.skuId}>
|
||||
{((Component) => <Component product={item} unpublishedAt={unpublishedAt} />)(importDefault(10020) /* metro dependency 10020: CollectiblesShopCardV2 */)}
|
||||
</CollectiblesAnalyticsProvider>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
/* Metro module 14905; source: modules/collectibles/native/ShopCoachmark.tsx; dependencies: [31, 1376, 33, 4501, 1305, 14901, 697, 1244, 8543, 2] */
|
||||
function _fun112776(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#112776, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15102:6, offset: 0x023daf07, size: 217 bytes, params: 8, frame: 20
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(1376) /* metro dependency 1376: DismissibleContentConstants */).ContentDismissActionType;
|
||||
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const env0_6 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({image: {marginTop: 12}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/ShopCoachmark.tsx');
|
||||
exports.default = ShopCoachmark;
|
||||
}
|
||||
|
||||
function CoachmarkImg_112777({source, decorationAsset}) { // fn#112777, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15102:202, offset: 0x023dafe0, size: 118 bytes, params: 2, frame: 19
|
||||
const styles = useStyles();
|
||||
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
|
||||
const object = {asset: decorationAsset};
|
||||
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
|
||||
const XXLARGE = AvatarSizes.XXLARGE;
|
||||
return (
|
||||
<Avatar
|
||||
style={styles.image}
|
||||
source={source}
|
||||
avatarDecoration={object}
|
||||
size={XXLARGE}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function ShopCoachmark({buttonRef, markAsDismissed, visible, title, description, avatarSrc, decorationAsset, navigateToShop, renderImgComponent}) { // fn#112778, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15102:463, offset: 0x023db056, size: 188 bytes, params: 2, frame: 23
|
||||
const binding = description;
|
||||
const useMemo = binding.useMemo;
|
||||
(require(8543) /* metro dependency 8543: useCoachmarkNative */).useCoachmark(buttonRef, Reflect.apply(useMemo,
|
||||
binding, [_fun112779, [avatarSrc, decorationAsset, description, renderImgComponent, markAsDismissed, title,
|
||||
visible, navigateToShop]]));
|
||||
return null;
|
||||
}
|
||||
|
||||
function _fun112779() { // fn#112779, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15102:636, offset: 0x023db112, size: 270 bytes, params: 1, frame: 17
|
||||
const object2 = {};
|
||||
object2.title = title;
|
||||
object2.description = description;
|
||||
object2.onDismiss = function() {
|
||||
markAsDismissed(ContentDismissActionType.USER_DISMISS);
|
||||
};
|
||||
object2.visible = visible;
|
||||
const value3 = undefined;
|
||||
const youNavFloatingExperimentModule = require(14901) /* metro dependency 14901: YouNavFloatingExperiment */;
|
||||
object2.position = youNavFloatingExperimentModule.isYouNavFloating() ? 'top' : 'bottom';
|
||||
const moduleValue2 = youNavFloatingExperimentModule;
|
||||
const PX_12 = moduleValue2.isYouNavFloating() ? (importDefault(697) /* metro dependency 697: native */).space.PX_12 : value3;
|
||||
object2.offsetY = PX_12;
|
||||
object2.renderImgComponent = renderImgComponent ?? _fun112781;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object2.buttonLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.fYfGgK);
|
||||
object2.buttonVariant = 'primary';
|
||||
object2.onButtonPress = navigateToShop;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun112781() { // fn#112781, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15102:850, offset: 0x023db23d, size: 43 bytes, params: 1, frame: 14
|
||||
return <CoachmarkImg_112777 source={avatarSrc} decorationAsset={decorationAsset} />;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
/* Metro module 14046; source: modules/collectibles/native/ShopFlashList.tsx; dependencies: [31, 33, 4501, 697, 14047, 8416, 14048, 1305, 8754, 1244, 2] */
|
||||
function _fun106525(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#106525, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14243:6, offset: 0x022df27e, size: 211 bytes, params: 8, frame: 21
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
|
||||
const env0_4 = Reflect.apply(createStyles, createStylesModule,
|
||||
[{contentContainer: {backgroundColor: BACKGROUND_BASE_LOWEST}}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/ShopFlashList.tsx');
|
||||
exports.default = _default_106527;
|
||||
}
|
||||
|
||||
function ShopEmptyState() { // fn#106526, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14243:234, offset: 0x022df351, size: 132 bytes, params: 1, frame: 18
|
||||
const EmptyState = (require(1305) /* metro dependency 1305: native */).EmptyState;
|
||||
const NoResults = (require(8754) /* metro dependency 8754: NoResults */).NoResults;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
return (
|
||||
<EmptyState
|
||||
style={{marginTop: 42}}
|
||||
Illustration={NoResults}
|
||||
body={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.eAn6z2)}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function _default_106527({data, renderItem, initialScrollIndex}) { // fn#106527, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14243:366, offset: 0x022df3d5, size: 245 bytes, params: 2, frame: 22
|
||||
const value2 = env0_2.useRef(null);
|
||||
const styles = useStyles();
|
||||
const useScrollToInitialIndexOnceModule = require(14047) /* metro dependency 14047: useScrollToInitialIndexOnce */;
|
||||
const useScrollToInitialIndexOnce = useScrollToInitialIndexOnceModule.useScrollToInitialIndexOnce;
|
||||
const object2 = {};
|
||||
object2.shouldScroll = initialScrollIndex != null && initialScrollIndex > 0;
|
||||
object2.initialScrollIndex = initialScrollIndex;
|
||||
object2.flashListRef = value2;
|
||||
const INITIAL_SCROLL_DELAY_MS = useScrollToInitialIndexOnceModule.INITIAL_SCROLL_DELAY_MS;
|
||||
object2.afterMs = INITIAL_SCROLL_DELAY_MS;
|
||||
Reflect.apply(useScrollToInitialIndexOnce, useScrollToInitialIndexOnceModule, [object2]);
|
||||
const FlashList = (require(8416) /* metro dependency 8416: flashList */).FlashList;
|
||||
const CATEGORY_CONTAINER_HEIGHT = (require(14048) /* metro dependency 14048: ShopCategory */).CATEGORY_CONTAINER_HEIGHT;
|
||||
return (
|
||||
<FlashList
|
||||
ref={value2}
|
||||
data={data}
|
||||
renderItem={renderItem}
|
||||
showsVerticalScrollIndicator={false}
|
||||
estimatedItemSize={CATEGORY_CONTAINER_HEIGHT + 40}
|
||||
ListEmptyComponent={ShopEmptyState}
|
||||
initialScrollIndex={initialScrollIndex}
|
||||
contentContainerStyle={styles.contentContainer}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
/* Metro module 14056; source: modules/collectibles/native/SkeletonCard.tsx; dependencies: [31, 33, 4501, 697, 10020, 4017, 4504, 2] */
|
||||
function _fun106594(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#106594, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14253:6, offset: 0x022e25e1, size: 191 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 */;
|
||||
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const env0_5 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(function(a0, a1) {
|
||||
var object2 = {width: a0, height: a1};
|
||||
object2.backgroundColor = importDefault(dependencyMap[3]).colors.BORDER_SUBTLE;
|
||||
object2.borderRadius = importDefault(dependencyMap[3]).radii.sm;
|
||||
return {skeletonCard: object2};
|
||||
});
|
||||
object = {code: 'function SkeletonCardTsx1(){const{opacity}=this.__closure;return{opacity:opacity.get()};}'};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/SkeletonCard.tsx');
|
||||
exports.default = _default_106596;
|
||||
}
|
||||
|
||||
function _default_106596({width = require(dependencyMap[4]).COLLECTIBLES_SHOP_CARD_WIDTH, height, style}) { // fn#106596, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14253:374, offset: 0x022e26f9, size: 305 bytes, params: 2, frame: 22
|
||||
const styles = useStyles(width,
|
||||
height ?? (require(10020) /* metro dependency 10020: CollectiblesShopCardV2 */).COLLECTIBLES_SHOP_CARD_HEIGHT);
|
||||
const value2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0.3);
|
||||
env0_3.useEffect(_fun106597, [value2]);
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
const closure = _default_106596Y;
|
||||
closure.__closure = {opacity: value2};
|
||||
closure.__workletHash = 5620456625640;
|
||||
closure.__initData = env0_6;
|
||||
const value3 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
return <View style={[styles.skeletonCard, style, value3]} />;
|
||||
}
|
||||
|
||||
function _fun106597() { // fn#106597, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14253:547, offset: 0x022e282a, size: 103 bytes, params: 1, frame: 19
|
||||
const binding = env0_0;
|
||||
const set = binding.set;
|
||||
let value = environment.__proto__;
|
||||
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
Reflect.apply(set, binding, [value.withRepeat((require(4504) /* metro dependency 4504: timing */).withTiming(1,
|
||||
{duration: 650}), -1, true)]);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
/* Metro module 10152; source: modules/collectibles/native/UnlockWithNitroButton.tsx; dependencies: [31, 5140, 5145, 663, 33, 566, 5143, 10105, 1244, 4579, 4573, 7954, 2] */
|
||||
function _fun79117(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79117, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10338:6, offset: 0x01e4597b, size: 192 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const iapStoreAndroid = importDefault(5140) /* metro dependency 5140: IAPStoreAndroid */;
|
||||
const collectiblesPurchaseStore = importDefault(5145) /* metro dependency 5145: CollectiblesPurchaseStore */;
|
||||
const env0_5 = (require(663) /* metro dependency 663: CollectiblesShopConstants */).ShopCtaEnum;
|
||||
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/UnlockWithNitroButton.tsx');
|
||||
exports.UnlockWithNitroButton = UnlockWithNitroButton;
|
||||
}
|
||||
|
||||
function UnlockWithNitroButton({shouldShrink, onTrackPress, text}) { // fn#79118, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10338:272, offset: 0x01e45a3b, size: 404 bytes, params: 2, frame: 23
|
||||
var object2;
|
||||
var r7;
|
||||
var intl;
|
||||
shouldShrink = !(shouldShrink === undefined) && shouldShrink;
|
||||
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([CollectiblesPurchaseStore,
|
||||
IAPStoreAndroid], _fun79119);
|
||||
const env0_1 = (importDefault(10105) /* metro dependency 10105: useOpenNitroSubscribeActionSheet */)();
|
||||
if (text != null) {
|
||||
r7 = text;
|
||||
} else {
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
r7 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.sEAnVH);
|
||||
}
|
||||
const BaseTextButton = (require(4579) /* metro dependency 4579: BaseTextButtonNative */).BaseTextButton;
|
||||
object2 = {textElement: shouldShrink ? ((Text) => <Text variant="text-xs/semibold" color="always-white" allowFontScaling={false}>{r7}</Text>)((require(4573) /* metro dependency 4573: Text */).Text) : undefined,
|
||||
text: shouldShrink ? undefined : r7, accessibilityLabel: r7, variant: 'primary',
|
||||
size: shouldShrink ? 'sm' : 'md', grow: true};
|
||||
const NitroWheelIcon = (require(7954) /* metro dependency 7954: NitroWheelIcon */).NitroWheelIcon;
|
||||
object2.icon = <NitroWheelIcon size="sm" color="white" />;
|
||||
object2.onPress = onPress_79120;
|
||||
object2.disabled = value4;
|
||||
return <BaseTextButton {...object2} />;
|
||||
}
|
||||
|
||||
function _fun79119() { // fn#79119, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10338:358, offset: 0x01e45bcf, size: 73 bytes, params: 1, frame: 14
|
||||
const value = environment.__proto__;
|
||||
return CollectiblesPurchaseStore.isClaiming != null || IAPStoreAndroid.isPurchasingProduct((require(5143) /* metro dependency 5143: ProductIdsAndroid */).ProductIds.GENERIC_CONSUMABLE);
|
||||
}
|
||||
|
||||
function UnlockWithNitroButtonOnPress() { // fn#79120, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10338:805, owner: UnlockWithNitroButton.onPress, offset: 0x01e45c18, size: 49 bytes, params: 1, frame: 12
|
||||
var value2;
|
||||
let onTrackPressBinding = onTrackPress;
|
||||
if (onTrackPressBinding != null) {
|
||||
onTrackPressBinding = onTrackPress;
|
||||
value2 = environment.__proto__;
|
||||
onTrackPressBinding(ShopCtaEnum.UNLOCK_WITH_NITRO);
|
||||
}
|
||||
env0_1();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,84 @@
|
||||
/* Metro module 10155; source: modules/collectibles/native/VisibilitySensor.tsx; dependencies: [31, 27, 33, 1478, 2] */
|
||||
function _fun79131(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79131, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10341:6, offset: 0x01e461ac, size: 192 bytes, params: 8, frame: 19
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = require(31) /* metro dependency 31 */;
|
||||
const env0_2 = value.useEffect;
|
||||
const env0_3 = value.useRef;
|
||||
const env0_4 = importDefault(31) /* metro dependency 31 */;
|
||||
const env0_5 = (require(27) /* metro dependency 27 */).View;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_6 = value.jsx;
|
||||
const env0_7 = value.jsxs;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/VisibilitySensor.tsx');
|
||||
exports.default = _default_79132;
|
||||
}
|
||||
|
||||
function _default_79132({children, onChange}) { // fn#79132, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10341:192, offset: 0x01e4626c, size: 235 bytes, params: 2, frame: 21
|
||||
const value2 = useRef(null);
|
||||
const env0_2 = useRef(false);
|
||||
const {width, height} = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)();
|
||||
const env0_4 = height;
|
||||
const env0_5 = useRef(null);
|
||||
useEffect(_fun79137, [env0_4.useCallback(_fun79133, [onChange]), height, width]);
|
||||
return (
|
||||
<View collapsable={false} ref={value2}>
|
||||
{children}
|
||||
<View />
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun79133(a0, a1) { // fn#79133, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10341:302, offset: 0x01e46357, size: 77 bytes, params: 3, frame: 14
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
if (env0_5.current === null) {
|
||||
env0_5.current = global.setInterval(_fun79134, 1000);
|
||||
}
|
||||
}
|
||||
|
||||
function stopWatching() { // fn#79136, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10341:504, owner: _default_79132.stopWatching, offset: 0x01e4643d, size: 52 bytes, params: 1, frame: 13
|
||||
var clearInterval;
|
||||
var binding;
|
||||
if (env0_5.current !== null) {
|
||||
clearInterval = global.clearInterval;
|
||||
binding = env0_5;
|
||||
clearInterval(binding.current);
|
||||
binding.current = null;
|
||||
}
|
||||
}
|
||||
|
||||
function _fun79137() { // fn#79137, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10341:580, offset: 0x01e46471, size: 29 bytes, params: 1, frame: 14
|
||||
env0_6(width, height);
|
||||
return stopWatching;
|
||||
}
|
||||
|
||||
function _fun79134() { // fn#79134, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10341:352, offset: 0x01e463a4, size: 51 bytes, params: 1, frame: 11
|
||||
if (env1_1.current !== null) {
|
||||
env1_1.current.measure(_fun79135);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun79135(a0, a1, a2, a3, a4, a5) { // fn#79135, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10341:394, offset: 0x01e463d7, size: 102 bytes, params: 7, frame: 13
|
||||
var r2;
|
||||
let value = a5 + a3 > 0;
|
||||
if (value) {
|
||||
value = environment.__proto__;
|
||||
value = a5 < require;
|
||||
r2 = value;
|
||||
} else {
|
||||
r2 = value;
|
||||
}
|
||||
if (r2) {
|
||||
value = environment.__proto__;
|
||||
value = a4 < env1_0;
|
||||
r2 = value;
|
||||
}
|
||||
r2 = r2 && a4 + a2 > 0;
|
||||
value = environment.__proto__.__proto__;
|
||||
if (r2 !== env2_2.current) {
|
||||
env2_2.current = r2;
|
||||
onChange(r2);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,382 @@
|
||||
/* Metro module 10057; source: modules/collectibles/native/WishlistButton.tsx; dependencies: [5, 57, 31, 27, 1226, 1878, 663, 482, 33, 4017, 4582, 4501, 697, 3868, 6817, 4002, 3875, 4504, 4577, 4581, 10058, 8663, 566, 10027, 1244, 3857, 10053, 10060, 10024, 2] */
|
||||
function _fun78623(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78623, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10243:6, offset: 0x01e2e6e5, size: 567 bytes, params: 8, frame: 25
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const closure = WishlistButtonBase;
|
||||
const closure2 = WishlistButton;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(5) /* metro dependency 5 */;
|
||||
const env0_4 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_5 = importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_6 = value.Pressable;
|
||||
const env0_7 = value.View;
|
||||
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const env0_10 = (require(663) /* metro dependency 663: CollectiblesShopConstants */).ShopCtaEnum;
|
||||
const env0_11 = (require(482) /* metro dependency 482: Constants */).ThemeTypes;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_12 = value.jsx;
|
||||
const env0_13 = value.jsxs;
|
||||
object2 = {duration: 400};
|
||||
const Easing = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing;
|
||||
object2.easing = Easing.bezier(0.67, 0, 0.26, 1);
|
||||
object2 = {};
|
||||
const SMALL_BUTTON_HEIGHT = (require(4582) /* metro dependency 4582: ButtonConstantsNative */).SMALL_BUTTON_HEIGHT;
|
||||
object2.sm = SMALL_BUTTON_HEIGHT;
|
||||
const MEDIUM_BUTTON_HEIGHT = (require(4582) /* metro dependency 4582: ButtonConstantsNative */).MEDIUM_BUTTON_HEIGHT;
|
||||
object2.md = MEDIUM_BUTTON_HEIGHT;
|
||||
const env0_16 = {'sm': 'sm', 'md': 'md'};
|
||||
const env0_17 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun78642);
|
||||
object2 = {code: 'function WishlistButtonTsx1(done){const{runOnJS,setIsClickAnimating}=this.__closure;if(done){runOnJS(setIsClickAnimating)(false);}}'};
|
||||
object2 = {code: "function WishlistButtonTsx2(){const{styles,withSpring,showFilled,SUBTLE_SPRING}=this.__closure;return{...styles.animationFill,opacity:withSpring(showFilled?0:1,SUBTLE_SPRING,'animate-always'),transform:[{scale:withSpring(showFilled?0.9:1,SUBTLE_SPRING,'animate-always')}]};}"};
|
||||
object2 = {code: "function WishlistButtonTsx3(){const{animationFillProgress,styles,withSpring,showFilled,SUBTLE_SPRING,interpolate,Extrapolation}=this.__closure;const progress=animationFillProgress.get();return{...styles.animationFill,opacity:withSpring(showFilled?1:0,SUBTLE_SPRING,'animate-always'),transform:[{scale:interpolate(progress,[0,0.625,1],[0,1.35,1],Extrapolation.CLAMP)}]};}"};
|
||||
object2 = {code: 'function WishlistButtonTsx4(){const{animationFillProgress,styles,showFilled,interpolate,Extrapolation}=this.__closure;const progress=animationFillProgress.get();return{...styles.animationFill,opacity:showFilled?interpolate(progress,[0,0.7],[1,0],Extrapolation.CLAMP):0,transform:[{scale:interpolate(progress,[0,0.625,1],[0,1.35,1],Extrapolation.CLAMP)}]};}'};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/WishlistButton.tsx');
|
||||
exports.default = CollectiblesWishlistButton;
|
||||
exports.WishlistButtonBase = closure;
|
||||
exports.WishlistButton = closure2;
|
||||
}
|
||||
|
||||
function WishlistButtonBase({isWishlisted, onPress, busy, disabled, accessibilityLabel, accessibilityHidden, style, size, onTrackPress}) { // fn#78624, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10243:2358, offset: 0x01e2e91c, size: 1480 bytes, params: 2, frame: 34
|
||||
var object4;
|
||||
accessibilityHidden = !(accessibilityHidden === undefined) && accessibilityHidden;
|
||||
size = size === undefined ? 'sm' : size;
|
||||
const env0_5 = onTrackPress;
|
||||
const styles = useStyles(size);
|
||||
const ICON_SIZE = (require(6817) /* metro dependency 6817: IconSize */).ICON_SIZE;
|
||||
const property = ICON_SIZE[env0_16[size]];
|
||||
const nativeModule = require(3868) /* metro dependency 3868: native */;
|
||||
const useThemeContext = nativeModule.useThemeContext;
|
||||
const theme = Reflect.apply(useThemeContext, nativeModule, []).theme;
|
||||
const isThemeLight2 = (require(4002) /* metro dependency 4002: shared */).isThemeLight(theme);
|
||||
const MIDNIGHT = ThemeTypes.MIDNIGHT;
|
||||
const env0_7 = theme === MIDNIGHT;
|
||||
const env0_8 = isThemeLight2 ? styles.light : styles.dark;
|
||||
const env0_9 = isThemeLight2 ? styles.lightPressed : styles.darkPressed;
|
||||
const binding = env0_5;
|
||||
const useContext = binding.useContext;
|
||||
const AccessibilityPreferencesContext = (require(3875) /* metro dependency 3875: AccessibilityPreferencesContext */).AccessibilityPreferencesContext;
|
||||
const enabled = Reflect.apply(useContext, binding, [AccessibilityPreferencesContext]).reducedMotion.enabled;
|
||||
const [property2, env0_12] = style(env0_5.useState(false), 2);
|
||||
const r21 = isWishlisted || property2;
|
||||
const value9 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(isWishlisted ? 1 : 0);
|
||||
const value10 = env0_5.useCallback(_fun78625, [busy, onPress, isWishlisted, enabled, property2, onTrackPress]);
|
||||
env0_5.useEffect(_fun78626, [isWishlisted, property2, value9]);
|
||||
env0_5.useEffect(_fun78627, [property2, value9]);
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
let useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
let closure = WishlistButtonBaseJ;
|
||||
object4 = {styles: styles};
|
||||
object4.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
|
||||
object4.showFilled = r21;
|
||||
const SUBTLE_SPRING = (require(4581) /* metro dependency 4581: springPresets */).SUBTLE_SPRING;
|
||||
object4.SUBTLE_SPRING = SUBTLE_SPRING;
|
||||
closure.__closure = object4;
|
||||
closure.__workletHash = 1357254413161;
|
||||
closure.__initData = env0_19;
|
||||
const value11 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
const moduleValue5 = reanimatedRexportModule;
|
||||
useAnimatedStyle = moduleValue5.useAnimatedStyle;
|
||||
closure = WishlistButtonBaseY;
|
||||
object4 = {animationFillProgress: value9, styles: styles};
|
||||
object4.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
|
||||
object4.showFilled = r21;
|
||||
object4.SUBTLE_SPRING = SUBTLE_SPRING;
|
||||
object4.interpolate = reanimatedRexportModule.interpolate;
|
||||
const Extrapolation = reanimatedRexportModule.Extrapolation;
|
||||
object4.Extrapolation = Extrapolation;
|
||||
closure.__closure = object4;
|
||||
closure.__workletHash = 15039903885060;
|
||||
closure.__initData = env0_20;
|
||||
const value12 = Reflect.apply(useAnimatedStyle, moduleValue5, [closure]);
|
||||
const moduleValue6 = reanimatedRexportModule;
|
||||
useAnimatedStyle = moduleValue6.useAnimatedStyle;
|
||||
closure = WishlistButtonBaseK;
|
||||
object4 = {animationFillProgress: value9, styles: styles, showFilled: r21};
|
||||
object4.interpolate = reanimatedRexportModule.interpolate;
|
||||
object4.Extrapolation = Extrapolation;
|
||||
closure.__closure = object4;
|
||||
closure.__workletHash = 12429379889426;
|
||||
closure.__initData = env0_21;
|
||||
const value13 = Reflect.apply(useAnimatedStyle, moduleValue6, [closure]);
|
||||
const pressableBindingProps = {style: style_78634, onPress: value10, disabled: disabled,
|
||||
accessibilityRole: accessibilityHidden ? 'none' : 'togglebutton',
|
||||
accessibilityLabel: accessibilityHidden ? undefined : accessibilityLabel,
|
||||
accessibilityState: accessibilityHidden ? undefined : {checked: isWishlisted, busy: busy, disabled: disabled},
|
||||
accessibilityElementsHidden: accessibilityHidden,
|
||||
importantForAccessibility: accessibilityHidden ? 'no-hide-descendants' : 'auto'};
|
||||
const items3 = [styles.iconContainer];
|
||||
items3[1] = {width: property, height: property};
|
||||
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
const HeartOutlineIcon = (require(10058) /* metro dependency 10058: HeartOutlineIcon */).HeartOutlineIcon;
|
||||
const object2 = {size: env0_16[size]};
|
||||
const INTERACTIVE_ICON_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_ICON_DEFAULT;
|
||||
object2.color = INTERACTIVE_ICON_DEFAULT;
|
||||
const items2 = [<View2 style={value11} pointerEvents="none"><HeartOutlineIcon {...object2} /></View2>];
|
||||
const View3 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
const HeartIcon = (require(8663) /* metro dependency 8663: HeartIcon */).HeartIcon;
|
||||
const object3 = {size: env0_16[size]};
|
||||
const RED_NEW_50 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.RED_NEW_50;
|
||||
object3.color = RED_NEW_50;
|
||||
items2[1] = <View3 style={value12} pointerEvents="none"><HeartIcon {...object3} /></View3>;
|
||||
const View4 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
items2[2] = <View4 style={value13} pointerEvents="none"><HeartIcon size={env0_16[size]} color="white" /></View4>;
|
||||
return (
|
||||
<Pressable {...pressableBindingProps}>
|
||||
<View style={items3}>
|
||||
{items2}
|
||||
</View>
|
||||
</Pressable>
|
||||
);
|
||||
}
|
||||
|
||||
function WishlistButton(a0) { // fn#78635, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10243:5419, offset: 0x01e2f3be, size: 561 bytes, params: 2, frame: 31
|
||||
const skuId = a0.skuId;
|
||||
const product = a0.product;
|
||||
const onPress = a0.onPress;
|
||||
const onTrackPress = a0.onTrackPress;
|
||||
const object2 = {'skuId': 0, 'product': 0, 'onPress': 0, 'onTrackPress': 0};
|
||||
const value = null;
|
||||
silentSetPrototypeOf(object2, value, undefined);
|
||||
const value2 = copyDataProperties({}, a0, object2, undefined);
|
||||
const id = (require(566) /* metro dependency 566: flux */).useStateFromStores([AuthenticationStore], function() {
|
||||
return AuthenticationStore.getId();
|
||||
});
|
||||
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
|
||||
return UserStore.getCurrentUser();
|
||||
});
|
||||
const value4 = (importDefault(10027) /* metro dependency 10027: useWishlistNUXActionSheet */)();
|
||||
const shouldShowWishlistNUXActionSheet = value4.shouldShowWishlistNUXActionSheet;
|
||||
const env0_3 = shouldShowWishlistNUXActionSheet;
|
||||
const showWishlistNUXActionSheet = value4.showWishlistNUXActionSheet;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const value5 = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['7kFjeK'],
|
||||
{productName: product.name});
|
||||
let binding = env0_5;
|
||||
let useCallback = binding.useCallback;
|
||||
const value6 = Reflect.apply(useCallback, binding, [function() {
|
||||
if (shouldShowWishlistNUXActionSheet) {
|
||||
showWishlistNUXActionSheet(product);
|
||||
}
|
||||
}, [shouldShowWishlistNUXActionSheet, showWishlistNUXActionSheet, product]]);
|
||||
const string = intl.string;
|
||||
const F8FvUy = (require(1244) /* metro dependency 1244: indexNative */).t.F8FvUy;
|
||||
const value7 = Reflect.apply(string, intl, [F8FvUy]);
|
||||
var env0_5 = value7;
|
||||
const {isWishlisted, isBusy,
|
||||
handleToggle} = (require(10053) /* metro dependency 10053: useWishlistButtonState */).useWishlistButtonState({userId: id,
|
||||
skuId: skuId, onAddSuccess: value6, onError: env0_5.useCallback(_fun78639, [value7])});
|
||||
binding = env0_5;
|
||||
useCallback = binding.useCallback;
|
||||
return value == currentUser ? value : <WishlistButtonBase isWishlisted={isWishlisted} onPress={Reflect.apply(useCallback,
|
||||
binding, [env0_3(_fun78641), [onPress, onTrackPress, isWishlisted,
|
||||
handleToggle]])} busy={isBusy} accessibilityLabel={value5} {...value2} />;
|
||||
}
|
||||
|
||||
function _fun78642(a0) { // fn#78642, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10243:422, offset: 0x01e2f6d1, size: 363 bytes, params: 2, frame: 21
|
||||
const object5 = {};
|
||||
const object6 = {'width': null, 'height': null, 'display': 'flex', 'alignItems': 'center',
|
||||
'justifyContent': 'center', 'borderRadius': null, 'borderWidth': 1};
|
||||
const binding = env0_15;
|
||||
object6.width = binding[a0];
|
||||
object6.height = binding[a0];
|
||||
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
||||
const CONTROL_SECONDARY_BORDER_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_SECONDARY_BORDER_DEFAULT;
|
||||
object6.borderColor = CONTROL_SECONDARY_BORDER_DEFAULT;
|
||||
object5.button = object6;
|
||||
const object7 = {};
|
||||
object7.backgroundColor = (require(3868) /* metro dependency 3868: native */).setColorOpacity('white', 0.72);
|
||||
object5.light = object7;
|
||||
const object8 = {};
|
||||
object8.backgroundColor = (require(3868) /* metro dependency 3868: native */).setColorOpacity('white', 0.62);
|
||||
object5.lightPressed = object8;
|
||||
const CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT;
|
||||
object5.dark = {backgroundColor: CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT};
|
||||
const CONTROL_OVERLAY_SECONDARY_BACKGROUND_ACTIVE = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_OVERLAY_SECONDARY_BACKGROUND_ACTIVE;
|
||||
object5.darkPressed = {backgroundColor: CONTROL_OVERLAY_SECONDARY_BACKGROUND_ACTIVE};
|
||||
const BORDER_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_STRONG;
|
||||
object5.midnight = {borderColor: BORDER_STRONG};
|
||||
object5.disabled = {opacity: 0.5};
|
||||
object5.iconContainer = {'position': 'relative', 'alignItems': 'center', 'justifyContent': 'center'};
|
||||
object5.animationFill = {'position': 'absolute', 'inset': 0, 'alignItems': 'center', 'justifyContent': 'center'};
|
||||
return object5;
|
||||
}
|
||||
|
||||
function CollectiblesWishlistButton(a0) { // fn#78643, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10243:6369, offset: 0x01e2f83c, size: 166 bytes, params: 2, frame: 21
|
||||
const selectedProduct = a0.selectedProduct;
|
||||
const onTrackPress = a0.onTrackPress;
|
||||
const value = null;
|
||||
const value2 = Object.create(value);
|
||||
value2.selectedProduct = 0;
|
||||
value2.onTrackPress = 0;
|
||||
const value3 = copyDataProperties({}, a0, value2, undefined);
|
||||
const skuId = selectedProduct.skuId;
|
||||
const useProductPurchaseStateModule = require(10060) /* metro dependency 10060: useProductPurchaseState */;
|
||||
const useProductPurchaseState = useProductPurchaseStateModule.useProductPurchaseState;
|
||||
return Reflect.apply(useProductPurchaseState, useProductPurchaseStateModule,
|
||||
[selectedProduct]).isPurchased ? value : <WishlistButton skuId={skuId} product={selectedProduct} disabled={!(require(10024) /* metro dependency 10024: CollectiblesWishlistUtils */).isWishlistableCollectiblesProduct(selectedProduct)} onTrackPress={onTrackPress} {...value3} />;
|
||||
}
|
||||
|
||||
function _fun78625() { // fn#78625, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10243:2857, offset: 0x01e2eee4, size: 140 bytes, params: 1, frame: 14
|
||||
var onTrackPressBinding;
|
||||
var isWishlistedBinding;
|
||||
var value2;
|
||||
if (!busy) {
|
||||
onTrackPressBinding = onTrackPress;
|
||||
if (onTrackPressBinding != null) {
|
||||
onTrackPressBinding = onTrackPress;
|
||||
isWishlistedBinding = isWishlisted;
|
||||
value2 = environment.__proto__;
|
||||
onTrackPressBinding(isWishlistedBinding ? ShopCtaEnum.REMOVE_FROM_WISHLIST : ShopCtaEnum.ADD_TO_WISHLIST);
|
||||
}
|
||||
if (isWishlisted) {
|
||||
if (isWishlisted && env0_11) {
|
||||
env0_12(false);
|
||||
}
|
||||
} else if (enabled) {
|
||||
if (isWishlisted && env0_11) {
|
||||
env0_12(false);
|
||||
}
|
||||
} else {
|
||||
env0_12(true);
|
||||
}
|
||||
if (onPress != null) {
|
||||
onPress();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun78626() { // fn#78626, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10243:2988, offset: 0x01e2ef70, size: 40 bytes, params: 1, frame: 12
|
||||
var binding;
|
||||
if (!env0_11) {
|
||||
binding = env0_14;
|
||||
binding.set(isWishlisted ? 1 : 0);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun78627() { // fn#78627, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10243:3033, offset: 0x01e2ef98, size: 67 bytes, params: 1, frame: 12
|
||||
if (env0_11) {
|
||||
env0_14.set(0);
|
||||
var env0_0 = global.requestAnimationFrame(_fun78628);
|
||||
return _fun78630;
|
||||
}
|
||||
}
|
||||
|
||||
function WishlistButtonBaseJ() { // fn#78631, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10243:3380, owner: WishlistButtonBase.J, offset: 0x01e2f0c1, size: 202 bytes, params: 1, frame: 24
|
||||
const object2 = {};
|
||||
copyDataProperties(object2, styles.animationFill, undefined);
|
||||
const springModule = require(4577) /* metro dependency 4577: spring */;
|
||||
const withSpring = springModule.withSpring;
|
||||
const value3 = 1;
|
||||
const r11 = env0_13 ? 0 : value3;
|
||||
const SUBTLE_SPRING = (require(4581) /* metro dependency 4581: springPresets */).SUBTLE_SPRING;
|
||||
object2['opacity'] = Reflect.apply(withSpring, springModule, [r11, SUBTLE_SPRING, 'animate-always']);
|
||||
const moduleValue2 = springModule;
|
||||
object2['transform'] = [{scale: moduleValue2.withSpring(env0_13 ? 0.9 : value3, SUBTLE_SPRING, 'animate-always')}];
|
||||
return object2;
|
||||
}
|
||||
|
||||
function WishlistButtonBaseY() { // fn#78632, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10243:3753, owner: WishlistButtonBase.Y, offset: 0x01e2f18b, size: 220 bytes, params: 1, frame: 21
|
||||
const value2 = env0_14.get();
|
||||
const object2 = {};
|
||||
copyDataProperties(object2, styles.animationFill, undefined);
|
||||
const springModule = require(4577) /* metro dependency 4577: spring */;
|
||||
const withSpring = springModule.withSpring;
|
||||
const r5 = env0_13 ? 1 : 0;
|
||||
const SUBTLE_SPRING = (require(4581) /* metro dependency 4581: springPresets */).SUBTLE_SPRING;
|
||||
object2['opacity'] = Reflect.apply(withSpring, springModule, [r5, SUBTLE_SPRING, 'animate-always']);
|
||||
const value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const interpolate = value.interpolate;
|
||||
const Extrapolation = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Extrapolation;
|
||||
const CLAMP = Extrapolation.CLAMP;
|
||||
object2['transform'] = [{scale: Reflect.apply(interpolate, value, [value2, [0, 0.625, 1], [0, 1.35, 1], CLAMP])}];
|
||||
return object2;
|
||||
}
|
||||
|
||||
function WishlistButtonBaseK() { // fn#78633, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10243:4249, owner: WishlistButtonBase.K, offset: 0x01e2f267, size: 243 bytes, params: 1, frame: 20
|
||||
var r2;
|
||||
const Extrapolation = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Extrapolation;
|
||||
const value2 = env0_14.get();
|
||||
const object2 = {};
|
||||
copyDataProperties(object2, styles.animationFill, undefined);
|
||||
let value = 0;
|
||||
if (env0_13) {
|
||||
value = environment.__proto__;
|
||||
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
value = value.interpolate(value2, [0, 0.7], [1, 0], Extrapolation.CLAMP);
|
||||
r2 = value;
|
||||
} else {
|
||||
r2 = value;
|
||||
}
|
||||
object2['opacity'] = r2;
|
||||
value = environment.__proto__;
|
||||
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const interpolate = value.interpolate;
|
||||
const CLAMP = Extrapolation.CLAMP;
|
||||
object2['transform'] = [{scale: Reflect.apply(interpolate, value, [value2, [0, 0.625, 1], [0, 1.35, 1], CLAMP])}];
|
||||
return object2;
|
||||
}
|
||||
|
||||
function WishlistButtonBaseStyle({pressed}) { // fn#78634, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10243:4665, owner: WishlistButtonBase.style, offset: 0x01e2f35a, size: 100 bytes, params: 2, frame: 5
|
||||
return [styles.button, env0_8, env0_7 && styles.midnight, pressed && env0_9, disabled && styles.disabled, style];
|
||||
}
|
||||
|
||||
function _fun78639() { // fn#78639, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10243:5869, offset: 0x01e2f61f, size: 61 bytes, params: 1, frame: 13
|
||||
const value = environment.__proto__;
|
||||
(importDefault(3857) /* metro dependency 3857: ToastActionCreators */).open({key: 'WISHLIST_ERROR',
|
||||
content: env0_5});
|
||||
}
|
||||
|
||||
function* _fun78641() { // fn#78641, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10243:6072, offset: 0x01e2f667, size: 106 bytes, params: 1, frame: 15
|
||||
var value3;
|
||||
var binding;
|
||||
if (true) {
|
||||
value = environment.__proto__;
|
||||
if (dependencyMap != null) {
|
||||
value3 = environment.__proto__.__proto__;
|
||||
binding = env2_10;
|
||||
dependencyMap(Pressable ? binding.REMOVE_FROM_WISHLIST : binding.ADD_TO_WISHLIST);
|
||||
}
|
||||
if (importDefault != null) {
|
||||
importDefault();
|
||||
}
|
||||
yield View();
|
||||
}
|
||||
}
|
||||
|
||||
function _fun78628() { // fn#78628, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10243:3082, offset: 0x01e2efdb, size: 147 bytes, params: 1, frame: 24
|
||||
const binding = env1_14;
|
||||
const set = binding.set;
|
||||
const timingModule = require(4504) /* metro dependency 4504: timing */;
|
||||
const withTiming = timingModule.withTiming;
|
||||
const binding2 = env2_14;
|
||||
const closure = t_78629;
|
||||
const object2 = {};
|
||||
object2.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
|
||||
object2.setIsClickAnimating = env1_12;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 13061953734403;
|
||||
closure.__initData = env2_18;
|
||||
Reflect.apply(set, binding, [Reflect.apply(withTiming, timingModule, [1, binding2, 'animate-always', closure])]);
|
||||
}
|
||||
|
||||
function _fun78630() { // fn#78630, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10243:3301, offset: 0x01e2f0a9, size: 24 bytes, params: 1, frame: 11
|
||||
return global.cancelAnimationFrame(env0_0);
|
||||
}
|
||||
|
||||
function t_78629(a0) { // fn#78629, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10243:3144, offset: 0x01e2f06e, size: 59 bytes, params: 2, frame: 12
|
||||
var value;
|
||||
var runOnJS;
|
||||
var value2;
|
||||
if (a0) {
|
||||
value = environment.__proto__.__proto__.__proto__;
|
||||
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
runOnJS = value.runOnJS;
|
||||
value2 = environment.__proto__.__proto__;
|
||||
value = Reflect.apply(runOnJS, value, [env2_12]);
|
||||
value(false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
/* Metro module 14066; source: modules/collectibles/native/WishlistButtonCoachmark.tsx; dependencies: [57, 31, 1376, 10027, 1365, 7013, 14057, 1244, 8543, 2] */
|
||||
function _fun106635(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#106635, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14263:6, offset: 0x022e3976, size: 155 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(1376) /* metro dependency 1376: DismissibleContentConstants */).ContentDismissActionType;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/WishlistButtonCoachmark.tsx');
|
||||
exports.default = WishlistButtonCoachmark;
|
||||
}
|
||||
|
||||
function WishlistButtonCoachmark({anchorRef}) { // fn#106636, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14263:250, offset: 0x022e3a11, size: 289 bytes, params: 2, frame: 21
|
||||
const value2 = (require(10027) /* metro dependency 10027: useWishlistNUXActionSheet */).useHasNeverWishlisted();
|
||||
const binding = env0_3;
|
||||
const useMemo = binding.useMemo;
|
||||
let value = env0_2((require(7013) /* metro dependency 7013: useSelectedDismissibleContent */).useSelectedDismissibleContent(Reflect.apply(useMemo,
|
||||
binding, [_fun106637, [value2]])), 2);
|
||||
const property = value[0];
|
||||
const property2 = value[1];
|
||||
const DismissibleContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent;
|
||||
const WISHLIST_MOBILE_NUX_PRODUCT_CARD_COACHMARK = DismissibleContent.WISHLIST_MOBILE_NUX_PRODUCT_CARD_COACHMARK;
|
||||
value = property === WISHLIST_MOBILE_NUX_PRODUCT_CARD_COACHMARK;
|
||||
const collectiblesCoachmarkScrollDismissContextModule = require(14057) /* metro dependency 14057: CollectiblesCoachmarkScrollDismissContext */;
|
||||
const useCollectiblesCoachmarkScrollDismissContext = collectiblesCoachmarkScrollDismissContextModule.useCollectiblesCoachmarkScrollDismissContext;
|
||||
binding.useEffect(function() {
|
||||
if (result) {
|
||||
return registerDismiss(_fun106639);
|
||||
}
|
||||
}, [value, Reflect.apply(useCollectiblesCoachmarkScrollDismissContext,
|
||||
collectiblesCoachmarkScrollDismissContextModule, []).registerDismiss, property2]);
|
||||
value = binding.useMemo(_fun106640, [value, property2]);
|
||||
(require(8543) /* metro dependency 8543: useCoachmarkNative */).useCoachmark(anchorRef, value);
|
||||
return null;
|
||||
}
|
||||
|
||||
function _fun106637() { // fn#106637, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14263:349, offset: 0x022e3b32, size: 66 bytes, params: 1, frame: 12
|
||||
return env0_0 ? [(require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent.WISHLIST_MOBILE_NUX_PRODUCT_CARD_COACHMARK] : [];
|
||||
}
|
||||
|
||||
function _fun106638() { // fn#106638, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14263:664, offset: 0x022e3b74, size: 34 bytes, params: 1, frame: 11
|
||||
if (result) {
|
||||
return registerDismiss(_fun106639);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun106640() { // fn#106640, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14263:739, offset: 0x022e3bb3, size: 154 bytes, params: 1, frame: 16
|
||||
const object2 = {};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let string = intl.string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
object2.title = Reflect.apply(string, intl, [t['47Rhc3']]);
|
||||
string = intl.string;
|
||||
const PXjA0b = t.PXjA0b;
|
||||
object2.description = Reflect.apply(string, intl, [PXjA0b]);
|
||||
object2.position = 'top';
|
||||
object2.visible = result;
|
||||
object2.onDismiss = onDismiss_106641;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun106639() { // fn#106639, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14263:684, offset: 0x022e3b96, size: 29 bytes, params: 1, frame: 11
|
||||
const binding = env1_1;
|
||||
const INDIRECT_ACTION = ContentDismissActionType.INDIRECT_ACTION;
|
||||
return binding(INDIRECT_ACTION);
|
||||
}
|
||||
|
||||
function onDismiss_106641() { // fn#106641, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14263:877, offset: 0x022e3c4d, size: 29 bytes, params: 1, frame: 11
|
||||
const binding = env1_1;
|
||||
const USER_DISMISS = ContentDismissActionType.USER_DISMISS;
|
||||
return binding(USER_DISMISS);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,116 @@
|
||||
/* Metro module 10028; source: modules/collectibles/native/WishlistNUXAddedItemActionSheet.tsx; dependencies: [57, 31, 27, 1878, 8516, 33, 4501, 697, 566, 1904, 4080, 8743, 6789, 10029, 6275, 10033, 4573, 1244, 6261, 4578, 2] */
|
||||
function _fun78327(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78327, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10214:6, offset: 0x01e2596e, size: 386 bytes, params: 8, frame: 23
|
||||
var object4;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_5 = (require(27) /* metro dependency 27 */).View;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const env0_7 = (require(8516) /* metro dependency 8516: Constants */).UserProfileSections;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_8 = value.jsx;
|
||||
const env0_9 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object4 = {};
|
||||
const object5 = {alignItems: 'center'};
|
||||
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object5.padding = PX_16;
|
||||
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
object5.gap = PX_24;
|
||||
object4.container = object5;
|
||||
const object6 = {alignItems: 'center'};
|
||||
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object6.paddingHorizontal = PX_8;
|
||||
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object6.gap = PX_8;
|
||||
object4.textContainer = object6;
|
||||
object4.subtitle = {textAlign: 'center'};
|
||||
const env0_10 = Reflect.apply(createStyles, value, [object4]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/WishlistNUXAddedItemActionSheet.tsx');
|
||||
exports.default = WishlistNUXAddedItemActionSheet;
|
||||
}
|
||||
|
||||
function WishlistNUXAddedItemActionSheet({product}) { // fn#78328, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10214:542, offset: 0x01e25af0, size: 759 bytes, params: 2, frame: 31
|
||||
const styles = useStyles();
|
||||
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
|
||||
return UserStore.getCurrentUser();
|
||||
}, []);
|
||||
const binding = env0_4;
|
||||
const value3 = binding.useMemo(_fun78330, [product]);
|
||||
const value4 = binding.useCallback(_fun78331, []);
|
||||
const value5 = binding.useCallback(_fun78332, [value2]);
|
||||
const value6 = binding.useCallback(_fun78333, [value3]);
|
||||
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
|
||||
let value = importDefault(10033) /* metro dependency 10033: WishlistItemCardBase */;
|
||||
value = ((Component) => <Component renderPreview={value6} />)(value);
|
||||
const items2 = [value];
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let string = intl.string;
|
||||
value = <Text variant="heading-lg/extrabold" color="text-strong" accessibilityRole="header">{Reflect.apply(string,
|
||||
intl, [(require(1244) /* metro dependency 1244: indexNative */).t['3T2jbf']])}</Text>;
|
||||
string = intl.string;
|
||||
const SXb73A = (require(1244) /* metro dependency 1244: indexNative */).t.SXb73A;
|
||||
items2[1] = <View style={styles.textContainer}>{value}<Text variant="text-md/normal" color="text-default" style={styles.subtitle}>{Reflect.apply(string,
|
||||
intl, [SXb73A])}</Text></View>;
|
||||
const ButtonGroup = (require(6261) /* metro dependency 6261: ButtonGroupNative */).ButtonGroup;
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
value = <Button text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.tM4PUv)} onPress={value4} size="lg" variant="primary" grow />;
|
||||
string = intl.string;
|
||||
const TxBQzD = (require(1244) /* metro dependency 1244: indexNative */).t.TxBQzD;
|
||||
items2[2] = <ButtonGroup direction="horizontal">{value}<Button text={Reflect.apply(string, intl,
|
||||
[TxBQzD])} onPress={value5} variant="secondary" size="lg" grow /></ButtonGroup>;
|
||||
return (
|
||||
<BottomSheet>
|
||||
<View style={styles.container}>
|
||||
{items2}
|
||||
</View>
|
||||
</BottomSheet>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun78330() { // fn#78330, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10214:681, offset: 0x01e25de7, size: 150 bytes, params: 1, frame: 15
|
||||
const type = product.type;
|
||||
const value3 = undefined;
|
||||
const CollectiblesItemType = (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType;
|
||||
const BUNDLE = CollectiblesItemType.BUNDLE;
|
||||
if (type === BUNDLE) {
|
||||
productBinding = product;
|
||||
return {type: 'bundle', items: productBinding.items, previewAssets: productBinding.previewAssets};
|
||||
}
|
||||
const property = env1_3(product.items, 1)[0];
|
||||
return property == null ? value3 : {type: 'single', item: property};
|
||||
}
|
||||
|
||||
function _fun78331() { // fn#78331, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10214:891, offset: 0x01e25e7d, size: 37 bytes, params: 1, frame: 11
|
||||
const value = environment.__proto__;
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
}
|
||||
|
||||
function _fun78332() { // fn#78332, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10214:946, offset: 0x01e25ea2, size: 136 bytes, params: 1, frame: 15
|
||||
var defaultImport2;
|
||||
var object2;
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideAllActionSheets();
|
||||
if (env0_1 != null) {
|
||||
defaultImport2 = importDefault(8743) /* metro dependency 8743: showUserProfileActionSheet */;
|
||||
object2 = {};
|
||||
object2.userId = env0_1.id;
|
||||
object2.sourceAnalyticsLocations = [(importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).COLLECTIBLES_SHOP];
|
||||
object2.initialSection = UserProfileSections.WISHLIST;
|
||||
defaultImport2(object2);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun78333() { // fn#78333, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10214:1119, offset: 0x01e25f2a, size: 70 bytes, params: 1, frame: 15
|
||||
const value2 = null;
|
||||
if (value2 == env0_2) {
|
||||
return value2;
|
||||
} else {
|
||||
const CollectiblesPreview = (require(10029) /* metro dependency 10029: SKUPreview */).CollectiblesPreview;
|
||||
return <CollectiblesPreview collectiblesItemData={env0_2} />;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,82 @@
|
||||
/* Metro module 7598; source: modules/collectibles/native/components/CutoutableAvatarDecoration.tsx; dependencies: [31, 27, 4502, 33, 632, 1423, 477, 7599, 7601, 5475, 2] */
|
||||
function _fun60921(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#60921, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7776:6, offset: 0x01715025, size: 177 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(27) /* metro dependency 27 */).View;
|
||||
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
|
||||
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/components/CutoutableAvatarDecoration.tsx');
|
||||
exports.default = CutoutableAvatarDecoration;
|
||||
}
|
||||
|
||||
function CutoutableAvatarDecoration({size, avatarDecoration, decorationStyle, animate, cutout}) { // fn#60922, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7776:259, offset: 0x017150d6, size: 536 bytes, params: 2, frame: 25
|
||||
var r1;
|
||||
var r2;
|
||||
var r0;
|
||||
var moduleValue2;
|
||||
const env0_3 = animate;
|
||||
var value;
|
||||
const useStateFromStoresModule = require(632) /* metro dependency 632: useStateFromStores */;
|
||||
const useStateFromStores = useStateFromStoresModule.useStateFromStores;
|
||||
let object = [AccessibilityStore];
|
||||
const useReducedMotion = Reflect.apply(useStateFromStores, useStateFromStoresModule, [object, function() {
|
||||
return AccessibilityStore.useReducedMotion;
|
||||
}]);
|
||||
const {shouldAnimate, avatarDecorationUrl, style, sizeStyle, source} = env0_3.useMemo(_fun60924, [animate, size,
|
||||
avatarDecoration, decorationStyle, useReducedMotion]);
|
||||
if (avatarDecoration == null) {
|
||||
r0 = null;
|
||||
} else if (avatarDecorationUrl == null) {
|
||||
r0 = null;
|
||||
} else {
|
||||
moduleValue2 = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
if (moduleValue2.isAndroid()) {
|
||||
if (shouldAnimate) {
|
||||
if (cutout != null) {
|
||||
value = importDefault(7599) /* metro dependency 7599: ClipView */;
|
||||
value = ((Component) => <Component style={style} cutouts={cutout.nativeCutouts}>{((Component) => <Component url={avatarDecorationUrl} style={sizeStyle} />)(importDefault(7601) /* metro dependency 7601: APNGDecorationNativeComponent */)}</Component>)(value);
|
||||
r2 = value;
|
||||
} else {
|
||||
object = {style: style, pointerEvents: 'none'};
|
||||
value = importDefault(7601) /* metro dependency 7601: APNGDecorationNativeComponent */;
|
||||
value = <View {...object}>{((Component) => <Component url={avatarDecorationUrl} style={sizeStyle} />)(value)}</View>;
|
||||
r2 = value;
|
||||
}
|
||||
r1 = r2;
|
||||
} else if (cutout != null) {
|
||||
value = importDefault(7599) /* metro dependency 7599: ClipView */;
|
||||
value = ((Component) => <Component style={style} cutouts={cutout.nativeCutouts}>{((Component) => <Component source={source} style={sizeStyle} />)(importDefault(5475) /* metro dependency 5475: FastImage */)}</Component>)(value);
|
||||
r1 = value;
|
||||
} else {
|
||||
value = importDefault(5475) /* metro dependency 5475: FastImage */;
|
||||
value = ((Component) => <Component source={source} style={style} />)(value);
|
||||
r1 = value;
|
||||
}
|
||||
} else if (cutout != null) {
|
||||
value = importDefault(7599) /* metro dependency 7599: ClipView */;
|
||||
value = ((Component) => <Component style={style} cutouts={cutout.nativeCutouts}>{((Component) => <Component source={source} style={sizeStyle} />)(importDefault(5475) /* metro dependency 5475: FastImage */)}</Component>)(value);
|
||||
r1 = value;
|
||||
} else {
|
||||
value = importDefault(5475) /* metro dependency 5475: FastImage */;
|
||||
value = ((Component) => <Component source={source} style={style} />)(value);
|
||||
r1 = value;
|
||||
}
|
||||
r0 = r1;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun60924() { // fn#60924, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7776:437, offset: 0x017152ee, size: 175 bytes, params: 1, frame: 15
|
||||
const r1 = animate && !useReducedMotion && avatarDecoration != null;
|
||||
const avatarUtilsModule = require(1423) /* metro dependency 1423: AvatarUtils */;
|
||||
const getAvatarDecorationURL = avatarUtilsModule.getAvatarDecorationURL;
|
||||
const sizeBinding = size;
|
||||
const value5 = Reflect.apply(getAvatarDecorationURL, avatarUtilsModule, [{avatarDecoration: avatarDecoration,
|
||||
canAnimate: r1, size: sizeBinding}]);
|
||||
return {avatarDecorationUrl: value5, sizeStyle: {width: sizeBinding, height: sizeBinding},
|
||||
style: [{width: sizeBinding, height: sizeBinding}, decorationStyle], shouldAnimate: r1,
|
||||
source: {uri: value5 ?? ''}};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
/* Metro module 14063; source: modules/collectibles/native/hooks/useCardLayout.tsx; dependencies: [10020, 1478, 2] */
|
||||
function _fun106622(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#106622, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14260:6, offset: 0x022e3144, size: 125 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const calculateTotalGaps_106623 = function(a0, a1) {
|
||||
var COLLECTIBLES_SHOP_CARD_GAP = require(dependencyMap[0]).COLLECTIBLES_SHOP_CARD_GAP;
|
||||
return a1 + COLLECTIBLES_SHOP_CARD_GAP * (a0 - 1);
|
||||
};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/hooks/useCardLayout.tsx');
|
||||
exports.useCardLayout = useCardLayout;
|
||||
}
|
||||
|
||||
function useCardLayout() { // fn#106625, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14260:324, offset: 0x022e31f6, size: 539 bytes, params: 1, frame: 26
|
||||
var r0;
|
||||
var r32;
|
||||
var r15;
|
||||
var value11;
|
||||
var value12;
|
||||
const value2 = 1;
|
||||
const width = importDefault(dependencyMap[value2])().width;
|
||||
const r2 = width >= 320 ? 2 : value2;
|
||||
const value4 = 2;
|
||||
if (r2 < value4) {
|
||||
return {columns: r2, cardWidth: undefined, rowWidth: undefined};
|
||||
}
|
||||
const r6 = width >= 768 ? 4 : value4;
|
||||
const COLLECTIBLES_SHOP_CARD_WIDTH = (require(10020) /* metro dependency 10020: CollectiblesShopCardV2 */).COLLECTIBLES_SHOP_CARD_WIDTH;
|
||||
const value6 = COLLECTIBLES_SHOP_CARD_WIDTH * r2;
|
||||
const COLLECTIBLES_SHOP_CARD_GAP = (require(10020) /* metro dependency 10020: CollectiblesShopCardV2 */).COLLECTIBLES_SHOP_CARD_GAP;
|
||||
const value7 = width - (value6 + COLLECTIBLES_SHOP_CARD_GAP * (r2 - value2));
|
||||
const r3 = value7 < value4 * COLLECTIBLES_SHOP_CARD_GAP ? global.Math.max(4,
|
||||
value7) : value4 * COLLECTIBLES_SHOP_CARD_GAP;
|
||||
const value10 = calculateCardWidth_106624(r2, width, r3);
|
||||
const COLLECTIBLES_SHOP_CARD_MAX_WIDTH = (require(10020) /* metro dependency 10020: CollectiblesShopCardV2 */).COLLECTIBLES_SHOP_CARD_MAX_WIDTH;
|
||||
if (value10 > COLLECTIBLES_SHOP_CARD_MAX_WIDTH) {
|
||||
if (r2 < r6) {
|
||||
r0 = r2;
|
||||
while (true) {
|
||||
value11 = typeof r0 === 'bigint' ? r0 + 1n : +r0 + 1;
|
||||
value12 = calculateCardWidth_106624(value11, width, r3);
|
||||
if (!(value12 > COLLECTIBLES_SHOP_CARD_MAX_WIDTH)) {
|
||||
r32 = value11;
|
||||
r15 = value12;
|
||||
break;
|
||||
}
|
||||
if (value11 < r6) {
|
||||
r0 = value11;
|
||||
continue;
|
||||
}
|
||||
r32 = value11;
|
||||
r15 = value12;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
r32 = r2;
|
||||
r15 = value10;
|
||||
}
|
||||
} else {
|
||||
r32 = r2;
|
||||
r15 = value10;
|
||||
}
|
||||
const Math = global.Math;
|
||||
const min = Math.min;
|
||||
const Math2 = global.Math;
|
||||
const value14 = Reflect.apply(min, Math, [Math2.max(r15, COLLECTIBLES_SHOP_CARD_WIDTH),
|
||||
COLLECTIBLES_SHOP_CARD_MAX_WIDTH]);
|
||||
return value14 * r32 + calculateTotalGaps_106623(r32, r3) > width && r32 > value2 ? {columns: value2,
|
||||
cardWidth: undefined, rowWidth: undefined} : {columns: r32, cardWidth: value14,
|
||||
rowWidth: value14 * r32 + COLLECTIBLES_SHOP_CARD_GAP * (r32 - value2) + r3};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
/* Metro module 14049; source: modules/collectibles/native/hooks/useFilteredAndSortedProducts.tsx; dependencies: [31, 1878, 663, 14050, 14051, 14052, 566, 3802, 5133, 2] */
|
||||
function _fun106540(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#106540, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14246:6, offset: 0x022dfef2, size: 170 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
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 */;
|
||||
const env0_5 = (require(663) /* metro dependency 663: CollectiblesShopConstants */).CollectiblesMobileShopScreen;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/hooks/useFilteredAndSortedProducts.tsx');
|
||||
exports.useFilteredAndSortedProducts = useFilteredAndSortedProducts;
|
||||
}
|
||||
|
||||
function usePriceFilter(a0) { // fn#106541, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14246:170, offset: 0x022dff9c, size: 145 bytes, params: 2, frame: 18
|
||||
const ORBS = CollectiblesMobileShopScreen.ORBS;
|
||||
const value2 = a0 === ORBS;
|
||||
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
|
||||
return UserStore.getCurrentUser();
|
||||
});
|
||||
return env0_3.useCallback(function(a0) {
|
||||
var r0;
|
||||
var value = a0;
|
||||
if (result) {
|
||||
value = value.filter(_fun106544);
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}, [value2, (importDefault(3802) /* metro dependency 3802: PremiumUtils */).canUseShopDiscounts(currentUser)]);
|
||||
}
|
||||
|
||||
function useFilteredAndSortedProducts({products, maxProducts, bypassAndroidUnsyncedFilter, screen}) { // fn#106545, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14246:531, offset: 0x022e0094, size: 224 bytes, params: 2, frame: 22
|
||||
const value2 = (require(14050) /* metro dependency 14050: useBadBundleFilter */).useBadBundleFilter();
|
||||
const env0_3 = value2;
|
||||
const value3 = (require(14051) /* metro dependency 14051: useAndroidUnsyncedFilter */).useAndroidUnsyncedFilter();
|
||||
const value4 = usePriceFilter(screen);
|
||||
const binding = env0_3;
|
||||
let value = binding.useMemo(_fun106546, [value2, value3, products, bypassAndroidUnsyncedFilter, value4]);
|
||||
value = (require(14052) /* metro dependency 14052: usePurchasedProductsSort */).usePurchasedProductsSort(value);
|
||||
return binding.useMemo(_fun106549, [value, maxProducts]);
|
||||
}
|
||||
|
||||
function _fun106543(a0) { // fn#106543, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14246:305, offset: 0x022e002d, size: 37 bytes, params: 2, frame: 12
|
||||
var r0;
|
||||
let value = a0;
|
||||
if (result) {
|
||||
value = value.filter(_fun106544);
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun106546() { // fn#106546, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14246:706, offset: 0x022e0174, size: 74 bytes, params: 1, frame: 13
|
||||
const items2 = [bypassAndroidUnsyncedFilter ? function(a0) {
|
||||
return a0;
|
||||
} : env0_4, env0_3, env0_5];
|
||||
return items2.reduce(function(a0, a1) {
|
||||
return a1(a0);
|
||||
}, products);
|
||||
}
|
||||
|
||||
function _fun106549() { // fn#106549, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14246:836, offset: 0x022e01be, size: 42 bytes, params: 1, frame: 14
|
||||
return maxProducts != null ? env0_6.slice(0, maxProducts) : env0_6;
|
||||
}
|
||||
|
||||
function _fun106544(a0) { // fn#106544, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14246:320, offset: 0x022e0052, size: 66 bytes, params: 2, frame: 12
|
||||
let value = environment.__proto__.__proto__;
|
||||
const getProductOrbPrice = (require(5133) /* metro dependency 5133: CollectiblesProductUtils */).getProductOrbPrice;
|
||||
value = Reflect.apply(getProductOrbPrice, value, [{product: a0, hasShopDiscount: env1_1}]);
|
||||
return value != null;
|
||||
}
|
||||
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
/* Metro module 10147; source: modules/collectibles/native/hooks/useMobileCollectiblesPurchaseSKU.android.tsx; dependencies: [1878, 661, 566, 3802, 10148, 2] */
|
||||
function _fun79096(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79096, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10333:6, offset: 0x01e44d30, size: 140 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const env0_4 = (require(661) /* metro dependency 661: Constants */).PriceSetAssignmentPurchaseTypes;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/hooks/useMobileCollectiblesPurchaseSKU.android.tsx');
|
||||
exports.default = _default_79097;
|
||||
}
|
||||
|
||||
function _default_79097(a0) { // fn#79097, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10333:157, offset: 0x01e44dbc, size: 253 bytes, params: 2, frame: 20
|
||||
var object2;
|
||||
const product = a0.product;
|
||||
let value = null;
|
||||
const value2 = Object.create(value);
|
||||
value2.product = 0;
|
||||
const value3 = copyDataProperties({}, a0, value2, undefined);
|
||||
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
|
||||
return UserStore.getCurrentUser();
|
||||
});
|
||||
const r7 = (importDefault(3802) /* metro dependency 3802: PremiumUtils */).canUseShopDiscounts(currentUser) ? PriceSetAssignmentPurchaseTypes.MOBILE_PREMIUM_TIER_2 : PriceSetAssignmentPurchaseTypes.MOBILE;
|
||||
const googleSkuIds = product.googleSkuIds;
|
||||
const r6 = value != googleSkuIds ? googleSkuIds : {};
|
||||
const r4 = value == currentUser ? value : value != r6[r7] ? r6[r7] : value;
|
||||
value = importDefault(10148) /* metro dependency 10148: useMobilePurchaseSKUAndroid */;
|
||||
object2 = {};
|
||||
copyDataProperties(object2, value3, value2);
|
||||
object2['skuId'] = product.skuId;
|
||||
object2['platformSkuId'] = r4;
|
||||
object2['isFreeForStaffSelfPurchase'] = true;
|
||||
return value(object2);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
/* Metro module 14047; source: modules/collectibles/native/hooks/useScrollToInitialIndexOnce.tsx; dependencies: [31, 2] */
|
||||
function _fun106528(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#106528, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14244:6, offset: 0x022df4ca, size: 115 bytes, params: 8, frame: 17
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_0 = importAll(31) /* metro dependency 31 */;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/hooks/useScrollToInitialIndexOnce.tsx');
|
||||
exports.INITIAL_SCROLL_DELAY_MS = 100;
|
||||
exports.useScrollToInitialIndexOnce = useScrollToInitialIndexOnce;
|
||||
}
|
||||
|
||||
function useScrollToInitialIndexOnce({initialScrollIndex, shouldScroll, flashListRef, afterMs}) { // fn#106529, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14244:265, offset: 0x022df53d, size: 121 bytes, params: 2, frame: 18
|
||||
const env0_0 = initialScrollIndex;
|
||||
afterMs = afterMs === undefined ? 100 : afterMs;
|
||||
const binding = env0_0;
|
||||
const env0_4 = binding.useRef(false);
|
||||
binding.useEffect(_fun106530, [shouldScroll, initialScrollIndex, afterMs, flashListRef]);
|
||||
}
|
||||
|
||||
function _fun106530() { // fn#106530, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14244:402, offset: 0x022df5b6, size: 83 bytes, params: 1, frame: 13
|
||||
if (initialScrollIndex != null && shouldScroll && !env0_4.current) {
|
||||
env0_4.current = true;
|
||||
global.setTimeout(function() {
|
||||
var current = flashListRef.current;
|
||||
if (current != null) {
|
||||
current.scrollToIndex({animated: true, index: initialScrollIndex});
|
||||
}
|
||||
}, afterMs);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,177 @@
|
||||
/* Metro module 10022; source: modules/collectibles/native/hooks/useTrackShopCardImpression.tsx; dependencies: [31, 661, 10023, 6771, 1478, 7594, 3802, 5134, 683, 8742, 480, 5133, 2] */
|
||||
function _fun78280(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78280, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10208:6, offset: 0x01e23fcc, size: 165 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const trackOnConsecutiveVisibility = function(a0, a1, a2, a3) {
|
||||
if (a0) {
|
||||
if (a1.current && !a2.current) {
|
||||
a3();
|
||||
a2.current = true;
|
||||
}
|
||||
} else {
|
||||
a2.current = false;
|
||||
}
|
||||
a1.current = a0;
|
||||
};
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/hooks/useTrackShopCardImpression.tsx');
|
||||
exports.useTrackShopCardImpression = useTrackShopCardImpression;
|
||||
}
|
||||
|
||||
function isVisibleAtThreshold(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78282, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10208:247, offset: 0x01e240b5, size: 175 bytes, params: 8, frame: 21
|
||||
let Math = global.Math;
|
||||
let max = Math.max;
|
||||
const Math2 = global.Math;
|
||||
let value = Math2.min(require + importAll, exports);
|
||||
const Math3 = global.Math;
|
||||
value = Reflect.apply(max, Math, [0, value - Math3.max(require, 0)]);
|
||||
Math = global.Math;
|
||||
max = Math.max;
|
||||
const Math4 = global.Math;
|
||||
const value2 = Math4.min(global + importDefault, module);
|
||||
const Math5 = global.Math;
|
||||
value *= Reflect.apply(max, Math, [0, value2 - Math5.max(global, 0)]);
|
||||
const value3 = importDefault * importAll;
|
||||
return value3 > 0 && value > 0 && value / value3 >= dependencyMap;
|
||||
}
|
||||
|
||||
function useTrackShopCardImpression(a0, a1, a2) { // fn#78283, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10208:540, offset: 0x01e24164, size: 622 bytes, params: 4, frame: 27
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
const env0_2 = a2;
|
||||
const value2 = undefined;
|
||||
const value3 = (require(10023) /* metro dependency 10023: CollectiblesAnalyticsContext */).useCollectiblesAnalyticsContext();
|
||||
const env0_3 = value3;
|
||||
const analyticsLocations = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().analyticsLocations;
|
||||
const {width, height} = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)();
|
||||
const value5 = (require(7594) /* metro dependency 7594: useCurrentUser */).useCurrentUser();
|
||||
const canUseCollectibles2 = (importDefault(3802) /* metro dependency 3802: PremiumUtils */).canUseCollectibles(value5);
|
||||
const shopDiscountSource = (require(5134) /* metro dependency 5134: CollectiblesUtils */).getShopDiscountSource(value5);
|
||||
const binding = env0_3;
|
||||
const value7 = binding.useRef(null);
|
||||
const env0_10 = binding.useRef(null);
|
||||
const env0_11 = binding.useRef({windowWidth: width, windowHeight: height});
|
||||
const env0_12 = binding.useRef(false);
|
||||
const env0_13 = binding.useRef(false);
|
||||
const env0_14 = binding.useRef(false);
|
||||
const env0_15 = binding.useRef(false);
|
||||
binding.useEffect(_fun78284, [width, height]);
|
||||
env0_3.useEffect(_fun78287, [a2, binding.useCallback(_fun78285, [canUseCollectibles2,
|
||||
value3 == null ? value2 : value3.sessionId, value3 == null ? value2 : value3.tilePosition,
|
||||
value3 == null ? value2 : value3.pageCategory, value3 == null ? value2 : value3.pageSection,
|
||||
value3 == null ? value2 : value3.categoryPosition, a0]), env0_3.useCallback(_fun78286, [a0, a1,
|
||||
value3 == null ? value2 : value3.cardId, value3 == null ? value2 : value3.sessionId,
|
||||
value3 == null ? value2 : value3.tilePosition, analyticsLocations, shopDiscountSource])]);
|
||||
return value7;
|
||||
}
|
||||
|
||||
function _fun78284() { // fn#78284, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10208:939, offset: 0x01e243d2, size: 37 bytes, params: 1, frame: 4
|
||||
env0_11.current = {windowWidth: width, windowHeight: height};
|
||||
}
|
||||
|
||||
function _fun78285() { // fn#78285, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10208:1015, offset: 0x01e243f7, size: 390 bytes, params: 1, frame: 21
|
||||
var r9;
|
||||
var r5;
|
||||
var value3;
|
||||
var moduleValue;
|
||||
var value6;
|
||||
var moduleValue2;
|
||||
const value2 = null;
|
||||
if (value2 != env0_0) {
|
||||
value3 = environment.__proto__;
|
||||
moduleValue = require(5134) /* metro dependency 5134: CollectiblesUtils */;
|
||||
r9 = moduleValue.getPriceForCollectiblesProduct(env0_0, env0_7, true);
|
||||
} else {
|
||||
r9 = value2;
|
||||
}
|
||||
const value5 = undefined;
|
||||
if (value2 != env0_0) {
|
||||
value6 = environment.__proto__;
|
||||
moduleValue2 = require(5134) /* metro dependency 5134: CollectiblesUtils */;
|
||||
r5 = moduleValue2.getStrikeThroughPriceAmountForCollectiblesProduct(env0_0, env0_7, true);
|
||||
} else {
|
||||
r5 = value5;
|
||||
}
|
||||
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
const track = defaultImport.track;
|
||||
const COLLECTIBLES_TILE_IMPRESSION = AnalyticEvents.COLLECTIBLES_TILE_IMPRESSION;
|
||||
const object2 = {};
|
||||
object2.collectibles_shop_session_id = value2 == env0_3 ? value5 : env0_3.sessionId;
|
||||
object2.sku_id = env0_0.skuId;
|
||||
object2.display_price = value2 == r9 ? value5 : r9.amount;
|
||||
object2.display_price_currency = value2 == r9 ? value5 : r9.currency.toString();
|
||||
object2.display_price_strikethrough = r5;
|
||||
object2.position = value2 == env0_3 ? value5 : env0_3.tilePosition;
|
||||
object2.page_category = value2 == env0_3 ? value5 : env0_3.pageCategory;
|
||||
object2.page_section = value2 == env0_3 ? value5 : env0_3.pageSection;
|
||||
object2.category_position = value2 == env0_3 ? value5 : env0_3.categoryPosition;
|
||||
object2.type = 'product';
|
||||
Reflect.apply(track, defaultImport, [COLLECTIBLES_TILE_IMPRESSION, object2]);
|
||||
return value5;
|
||||
}
|
||||
|
||||
function _fun78286() { // fn#78286, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10208:1784, offset: 0x01e2457d, size: 290 bytes, params: 1, frame: 21
|
||||
const value = environment.__proto__;
|
||||
const value2 = undefined;
|
||||
const useTrackImpressionModule = require(8742) /* metro dependency 8742: useTrackImpression */;
|
||||
const trackImpression = useTrackImpressionModule.trackImpression;
|
||||
const object3 = {};
|
||||
const ImpressionNames = (require(480) /* metro dependency 480: AnalyticsUtils */).ImpressionNames;
|
||||
const SHOP_CARD = ImpressionNames.SHOP_CARD;
|
||||
object3.name = SHOP_CARD;
|
||||
const ImpressionTypes = (require(480) /* metro dependency 480: AnalyticsUtils */).ImpressionTypes;
|
||||
const VIEW = ImpressionTypes.VIEW;
|
||||
object3.type = VIEW;
|
||||
const object4 = {};
|
||||
object4.sku_id = require.skuId;
|
||||
object4.card_id = env0_3 == null ? value2 : env0_3.cardId;
|
||||
object4.shop_session_id = env0_3 == null ? value2 : env0_3.sessionId;
|
||||
object4.position_in_section = env0_3 == null ? value2 : env0_3.tilePosition;
|
||||
object4.product_sku_ids = (require(5133) /* metro dependency 5133: CollectiblesProductUtils */).getProductSkuIds(env0_0);
|
||||
object4.location_stack = analyticsLocations;
|
||||
object4.discount_source = (require(5134) /* metro dependency 5134: CollectiblesUtils */).getAnalyticsShopDiscountSource(env0_8);
|
||||
object3.properties = object4;
|
||||
Reflect.apply(trackImpression, useTrackImpressionModule, [object3, false, true]);
|
||||
return value2;
|
||||
}
|
||||
|
||||
function _fun78287() { // fn#78287, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10208:2284, offset: 0x01e2469f, size: 64 bytes, params: 1, frame: 15
|
||||
if (importDefault) {
|
||||
env0_10.current = global.setInterval(_fun78288, 1000);
|
||||
return _fun78290;
|
||||
}
|
||||
}
|
||||
|
||||
function _fun78288() { // fn#78288, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10208:2324, offset: 0x01e246df, size: 51 bytes, params: 1, frame: 11
|
||||
if (env1_9.current != null) {
|
||||
env1_9.current.measure(_fun78289);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun78290() { // fn#78290, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10208:2593, offset: 0x01e247a5, size: 94 bytes, params: 1, frame: 14
|
||||
var clearInterval;
|
||||
var binding;
|
||||
if (env1_10.current !== null) {
|
||||
clearInterval = global.clearInterval;
|
||||
binding = env1_10;
|
||||
clearInterval(binding.current);
|
||||
binding.current = null;
|
||||
}
|
||||
env1_12.current = false;
|
||||
env1_13.current = false;
|
||||
env1_14.current = false;
|
||||
env1_15.current = false;
|
||||
}
|
||||
|
||||
function _fun78289(a0, a1, a2, a3, a4, a5) { // fn#78289, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10208:2365, offset: 0x01e24712, size: 147 bytes, params: 7, frame: 26
|
||||
const {windowWidth, windowHeight} = env2_11.current;
|
||||
const isVisibleAtThresholdBinding = isVisibleAtThreshold;
|
||||
const isVisibleAtThreshold2 = isVisibleAtThresholdBinding(a4, a5, a2, a3, windowWidth, windowHeight, 0);
|
||||
const isVisibleAtThreshold3 = isVisibleAtThresholdBinding(a4, a5, a2, a3, windowWidth, windowHeight, 0.5);
|
||||
const trackOnConsecutiveVisibilityBinding = trackOnConsecutiveVisibility;
|
||||
trackOnConsecutiveVisibilityBinding(isVisibleAtThreshold2, env2_12, env2_13, env2_16);
|
||||
trackOnConsecutiveVisibilityBinding(isVisibleAtThreshold3, env2_14, env2_15, env2_17);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
/* Metro module 10107; source: modules/collectibles/native/hooks/useVirtualCurrencyData.tsx; dependencies: [31, 5133, 10069, 2] */
|
||||
function _fun78902(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78902, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10293:6, offset: 0x01e3b3ab, 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/collectibles/native/hooks/useVirtualCurrencyData.tsx');
|
||||
exports.useVirtualCurrencyData = useVirtualCurrencyData;
|
||||
}
|
||||
|
||||
function useVirtualCurrencyData(a0, a1) { // fn#78903, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10293:225, offset: 0x01e3b41d, size: 145 bytes, params: 3, frame: 18
|
||||
const productOrbPrice = (require(5133) /* metro dependency 5133: CollectiblesProductUtils */).getProductOrbPrice({product: a0,
|
||||
hasShopDiscount: a1});
|
||||
const hooksModule = require(10069) /* metro dependency 10069: hooks */;
|
||||
const useFetchVirtualCurrencyBalance = hooksModule.useFetchVirtualCurrencyBalance;
|
||||
const balance = Reflect.apply(useFetchVirtualCurrencyBalance, hooksModule, []).balance;
|
||||
const binding = env0_2;
|
||||
const useMemo = binding.useMemo;
|
||||
return {price: productOrbPrice, balance: balance, canAfford: Reflect.apply(useMemo, binding, [_fun78904,
|
||||
[productOrbPrice, balance]])};
|
||||
}
|
||||
|
||||
function _fun78904() { // fn#78904, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10293:361, offset: 0x01e3b4ae, size: 51 bytes, params: 1, frame: 4
|
||||
const value2 = null;
|
||||
return value2 == env0_0 || value2 == balance ? value2 : env0_0.amount <= balance;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
/* Metro module 7631; source: modules/collectibles/native/openGiftModal.tsx; dependencies: [5080, 7632, 1962, 2] */
|
||||
function _fun61133(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#61133, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7809:6, offset: 0x0171b43c, size: 101 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/collectibles/native/openGiftModal.tsx');
|
||||
exports.openShopGiftModal = openShopGiftModal;
|
||||
}
|
||||
|
||||
function openShopGiftModal({navigationParams, skuId, analyticsLocations, lockedRecipientUser, onGiftModalDismiss, giftingOrigin}) { // fn#61134, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7809:191, offset: 0x0171b4a1, size: 146 bytes, params: 2, frame: 23
|
||||
const defaultImport = importDefault(dependencyMap[0]);
|
||||
const pushLazy = defaultImport.pushLazy;
|
||||
let value = require(dependencyMap[2]);
|
||||
value = value(dependencyMap[1], dependencyMap.paths);
|
||||
Reflect.apply(pushLazy, defaultImport, [value, {skuId: skuId, analyticsLocations: analyticsLocations,
|
||||
lockedRecipientUser: lockedRecipientUser, onGiftModalDismiss: onGiftModalDismiss, giftingOrigin: giftingOrigin},
|
||||
'Shop Gift Modal', navigationParams]);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
/* Metro module 10085; source: modules/collectibles/native/openProductDetailsActionSheet.tsx; dependencies: [5133, 5120, 4080, 10086, 1962, 2] */
|
||||
function _fun78788(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78788, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10271:6, offset: 0x01e345fd, size: 115 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/collectibles/native/openProductDetailsActionSheet.tsx');
|
||||
exports.PRODUCT_DETAILS_ACTION_SHEET_KEY = 'Shop Product Preview';
|
||||
exports.openProductDetailsActionSheet = openProductDetailsActionSheet;
|
||||
}
|
||||
|
||||
function openProductDetailsActionSheet({product, initialVariantIndex, analyticsLocations, shopAnalyticsContext}, a1) { // fn#78789, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10271:285, offset: 0x01e34670, size: 247 bytes, params: 3, frame: 22
|
||||
initialVariantIndex = initialVariantIndex === undefined ? 0 : initialVariantIndex;
|
||||
const isVariantProduct = require(dependencyMap[0]).getIsVariantProduct(product);
|
||||
const r7 = isVariantProduct && initialVariantIndex < product.variants.length ? initialVariantIndex : 0;
|
||||
require(dependencyMap[1]).productDetailsOpened(isVariantProduct ? product.variants[r7].skuId : product.skuId);
|
||||
const defaultImport = importDefault(dependencyMap[2]);
|
||||
defaultImport.openLazy(require(dependencyMap[4])(dependencyMap[3], dependencyMap.paths), 'Shop Product Preview',
|
||||
{product: product, initialVariantIndex: r7, analyticsLocations: analyticsLocations,
|
||||
shopAnalyticsContext: shopAnalyticsContext}, a1);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,216 @@
|
||||
/* Metro module 14261; source: modules/collectibles/native/tooling/CollectiblesTool.tsx; dependencies: [57, 31, 27, 5121, 5145, 33, 4501, 697, 10020, 632, 7675, 4573, 14262, 1305, 4579, 7589, 2] */
|
||||
function _fun107867(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107867, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14458:6, offset: 0x0230bdfe, size: 1195 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 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_5 = value.ScrollView;
|
||||
const env0_6 = value.View;
|
||||
const collectiblesCategoryStore = importDefault(5121) /* metro dependency 5121: CollectiblesCategoryStore */;
|
||||
const collectiblesPurchaseStore = importDefault(5145) /* metro dependency 5145: CollectiblesPurchaseStore */;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_9 = value.jsx;
|
||||
const env0_10 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {};
|
||||
let BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
||||
object2.container = {flex: 1, backgroundColor: BACKGROUND_BASE_LOW};
|
||||
const object5 = {};
|
||||
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object5.padding = PX_16;
|
||||
let PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
|
||||
object5.paddingBottom = PX_32;
|
||||
object2.scrollContainer = object5;
|
||||
const object6 = {};
|
||||
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
|
||||
object6.backgroundColor = BACKGROUND_SURFACE_HIGH;
|
||||
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object6.padding = PX_16;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object6.marginBottom = PX_16;
|
||||
object6.borderWidth = 1;
|
||||
let BORDER_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_MUTED;
|
||||
object6.borderColor = BORDER_MUTED;
|
||||
object2.section = object6;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object2.sectionHeader = {'flexDirection': 'row', 'alignItems': 'center', marginBottom: PX_16};
|
||||
let TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_DEFAULT;
|
||||
object2.sectionTitle = {flex: 1, color: TEXT_DEFAULT};
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object2.inputContainer = {marginBottom: PX_16};
|
||||
const object7 = {};
|
||||
BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
||||
object7.backgroundColor = BACKGROUND_BASE_LOW;
|
||||
object7.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
|
||||
object7.borderWidth = 1;
|
||||
BORDER_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_MUTED;
|
||||
object7.borderColor = BORDER_MUTED;
|
||||
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
object7.padding = PX_4;
|
||||
object2.inputWrapper = object7;
|
||||
const object10 = {};
|
||||
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object10.marginBottom = PX_8;
|
||||
TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_DEFAULT;
|
||||
object10.color = TEXT_DEFAULT;
|
||||
object10.fontWeight = '600';
|
||||
object2.inputLabel = object10;
|
||||
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object2.statusText = {'marginTop': null, 'fontSize': 12, 'fontWeight': '500', marginTop: PX_8};
|
||||
const TEXT_FEEDBACK_POSITIVE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_FEEDBACK_POSITIVE;
|
||||
object2.statusSuccess = {color: TEXT_FEEDBACK_POSITIVE};
|
||||
const TEXT_FEEDBACK_CRITICAL = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_FEEDBACK_CRITICAL;
|
||||
object2.statusError = {color: TEXT_FEEDBACK_CRITICAL};
|
||||
let TEXT_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_MUTED;
|
||||
object2.statusLoading = {color: TEXT_MUTED};
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object2.previewContainer = {marginBottom: PX_16};
|
||||
const object11 = {backgroundColor: '#23a55a'};
|
||||
object11.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
|
||||
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object11.paddingVertical = PX_12;
|
||||
object11.alignItems = 'center';
|
||||
object2.previewButton = object11;
|
||||
const object12 = {};
|
||||
const BACKGROUND_MOD_NORMAL = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_NORMAL;
|
||||
object12.backgroundColor = BACKGROUND_MOD_NORMAL;
|
||||
object12.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
|
||||
object12.borderWidth = 2;
|
||||
object12.borderStyle = 'dashed';
|
||||
BORDER_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_MUTED;
|
||||
object12.borderColor = BORDER_MUTED;
|
||||
PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
|
||||
object12.padding = PX_32;
|
||||
object12.alignItems = 'center';
|
||||
object12.justifyContent = 'center';
|
||||
object12.minHeight = 120;
|
||||
object2.placeholder = object12;
|
||||
TEXT_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_MUTED;
|
||||
object2.placeholderText = {'color': null, 'textAlign': 'center', 'fontSize': 14, color: TEXT_MUTED};
|
||||
const env0_11 = Reflect.apply(createStyles, value, [object2]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/tooling/CollectiblesTool.tsx');
|
||||
exports.default = _default_107872;
|
||||
}
|
||||
|
||||
function UnpurchasedCollectiblesShopCardV2(a0) { // fn#107868, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14458:1841, offset: 0x0230c2a9, size: 119 bytes, params: 2, frame: 18
|
||||
const binding = env0_4;
|
||||
const [property, env0_0] = env0_3(binding.useState(0), 2);
|
||||
binding.useLayoutEffect(_fun107869, []);
|
||||
return ((Component) => <Component {...a0} key={property} />)(importDefault(10020) /* metro dependency 10020: CollectiblesShopCardV2 */);
|
||||
}
|
||||
|
||||
function _default_107872() { // fn#107872, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14458:2060, offset: 0x0230c386, size: 1614 bytes, params: 1, frame: 39
|
||||
const styles = useStyles();
|
||||
const categories = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([CollectiblesCategoryStore],
|
||||
function() {
|
||||
return CollectiblesCategoryStore.categories;
|
||||
});
|
||||
const r5 = categories.size > 0 && (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([CollectiblesPurchaseStore],
|
||||
function() {
|
||||
return CollectiblesPurchaseStore.purchases;
|
||||
}).size > 0 && (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([CollectiblesCategoryStore],
|
||||
function() {
|
||||
return CollectiblesCategoryStore.lastSuccessfulFetch;
|
||||
}) != null;
|
||||
const value5 = (importDefault(7675) /* metro dependency 7675: useFetchCollectiblesCategoriesAndPurchases */)({'logPerf': false,
|
||||
'stalePurchasesOK': true, noOp: r5});
|
||||
let r14 = r5 || !value5.isFetching && (r5 ? categories : value5.categories).size > 0;
|
||||
const binding = env0_4;
|
||||
let useState = binding.useState;
|
||||
const value8 = Reflect.apply(useState, binding, ['']);
|
||||
const binding2 = env0_3;
|
||||
const value9 = binding2(value8, 2);
|
||||
const property = value9[0];
|
||||
const property2 = value9[1];
|
||||
useState = binding.useState;
|
||||
const value10 = binding2(Reflect.apply(useState, binding, [null]), 2);
|
||||
const property3 = value10[0];
|
||||
var env0_3 = value10[1];
|
||||
useState = binding.useState;
|
||||
const value11 = binding2(Reflect.apply(useState, binding, [null]), 2);
|
||||
const property4 = value11[0];
|
||||
var env0_4 = value11[1];
|
||||
binding.useEffect(_fun107876, [property, r14]);
|
||||
let section = styles.section;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const view = <View style={styles.sectionHeader}><Text variant="heading-md/semibold" style={styles.sectionTitle}>{'Shop Settings'}</Text></View>;
|
||||
const ShopSkipCategoriesFilter = (require(14262) /* metro dependency 14262: ShopSkipCategoriesFilter */).ShopSkipCategoriesFilter;
|
||||
const items2 = [<View style={section}>{view}<ShopSkipCategoriesFilter /></View>];
|
||||
section = styles.section;
|
||||
const view2 = <View style={styles.sectionHeader}><Text variant="heading-md/semibold" style={styles.sectionTitle}>{'Product Configuration'}</Text></View>;
|
||||
const items4 = [<Text variant="text-md/semibold" style={styles.inputLabel}>{'Primary Product SKU ID'}</Text>];
|
||||
const TextInput = (require(1305) /* metro dependency 1305: native */).TextInput;
|
||||
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
items4[1] = <View style={styles.inputWrapper}><TextInput value={property} onChangeText={property2} placeholder="Enter product SKU ID (e.g., 1366494385482502184)" returnKeyType="done" style={{fontSize: 14,
|
||||
padding: PX_12}} /></View>;
|
||||
items4[2] = !r14 && property.trim() !== '' && <Text variant="text-xs/normal" style={[styles.statusText,
|
||||
styles.statusLoading]}>{'Loading products...'}</Text>;
|
||||
r14 = r14 && property.trim() !== '' && property3 == null && <Text variant="text-xs/normal" style={[styles.statusText,
|
||||
styles.statusError]}>{'Product not found'}</Text>;
|
||||
items4[3] = r14;
|
||||
items4[4] = property3 != null && <Text variant="text-xs/normal" style={[styles.statusText,
|
||||
styles.statusSuccess]}>{'Found: '}{property3.name}</Text>;
|
||||
items2[1] = <View style={section}>{view2}<View style={styles.inputContainer}>{items4}</View></View>;
|
||||
items2[2] = <View style={styles.section}><View style={styles.sectionHeader}><Text variant="heading-md/semibold" style={styles.sectionTitle}>{'Product Preview'}</Text></View>{property3 == null ? <View style={styles.placeholder}><Text variant="text-sm/normal" style={styles.placeholderText}>{'Enter a valid product SKU ID above'}{'\n'}{'to see the product preview'}</Text></View> : property4 != null ? <View><View style={styles.previewContainer}><UnpurchasedCollectiblesShopCardV2 product={property3} /></View>{((BaseTextButton) => <BaseTextButton pillStyle={styles.previewButton} text="Show Collectibles Modal" onPress={onPress_107877} />)((require(4579) /* metro dependency 4579: BaseTextButtonNative */).BaseTextButton)}</View> : <View style={styles.placeholder}><Text variant="text-sm/normal" style={styles.placeholderText}>{'Enter a valid product SKU ID above'}{'\n'}{'to see the product preview'}</Text></View>}</View>;
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
<ScrollView contentContainerStyle={styles.scrollContainer} showsVerticalScrollIndicator={false}>
|
||||
{items2}
|
||||
</ScrollView>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun107869() { // fn#107869, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14458:1914, offset: 0x0230c320, size: 68 bytes, params: 1, frame: 12
|
||||
const env0_0 = CollectiblesPurchaseStore.getPurchase;
|
||||
CollectiblesPurchaseStore.getPurchase = function() {
|
||||
};
|
||||
CollectiblesPurchaseStore.emitChange();
|
||||
env0_0(1);
|
||||
return function() {
|
||||
CollectiblesPurchaseStore.getPurchase = getPurchase;
|
||||
CollectiblesPurchaseStore.emitChange();
|
||||
};
|
||||
}
|
||||
|
||||
function _fun107876() { // fn#107876, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14458:2522, offset: 0x0230ca01, size: 151 bytes, params: 1, frame: 14
|
||||
var value3;
|
||||
var product;
|
||||
var categoryForProduct;
|
||||
if (env0_1.trim() !== '') {
|
||||
if (env0_0) {
|
||||
value3 = environment.__proto__;
|
||||
product = CollectiblesCategoryStore.getProduct(env0_1);
|
||||
categoryForProduct = CollectiblesCategoryStore.getCategoryForProduct(env0_1);
|
||||
if (product == null) {
|
||||
env0_3(null);
|
||||
env0_4(null);
|
||||
} else if (categoryForProduct != null) {
|
||||
env0_3(product);
|
||||
env0_4(categoryForProduct);
|
||||
} else {
|
||||
env0_3(null);
|
||||
env0_4(null);
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
env0_3(null);
|
||||
env0_4(null);
|
||||
}
|
||||
|
||||
function _default_107872OnPress() { // fn#107877, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14458:4304, owner: _default_107872.onPress, offset: 0x0230ca98, size: 71 bytes, params: 1, frame: 12
|
||||
var value2;
|
||||
var defaultImport;
|
||||
if (env0_2 != null) {
|
||||
value2 = environment.__proto__;
|
||||
defaultImport = importDefault(7589) /* metro dependency 7589: ProductPurchaseSuccessActionCreators */;
|
||||
defaultImport.open({product: env0_2, useCategoryImage: true});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,88 @@
|
||||
/* Metro module 14262; source: modules/collectibles/native/tooling/ShopSkipCategoriesFilter.tsx; dependencies: [31, 27, 5121, 33, 4501, 697, 566, 4572, 4573, 5120, 2] */
|
||||
function _fun107878(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107878, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14459:6, offset: 0x0230cadf, size: 458 bytes, params: 8, frame: 22
|
||||
var object3;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_2 = value.View;
|
||||
const env0_3 = value.Pressable;
|
||||
const collectiblesCategoryStore = importDefault(5121) /* metro dependency 5121: CollectiblesCategoryStore */;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_5 = value.jsx;
|
||||
const env0_6 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object3 = {};
|
||||
const object4 = {};
|
||||
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object4.paddingVertical = PX_12;
|
||||
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object4.paddingHorizontal = PX_16;
|
||||
object3.container = object4;
|
||||
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object3.label = {marginBottom: PX_8};
|
||||
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object3.stepperContainer = {'flexDirection': 'row', 'alignItems': 'center', gap: PX_12};
|
||||
const object6 = {'width': 32, 'height': 32, 'borderRadius': null, 'backgroundColor': null,
|
||||
'justifyContent': 'center', 'alignItems': 'center'};
|
||||
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
|
||||
const CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT;
|
||||
object6.backgroundColor = CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT;
|
||||
object3.stepperButton = object6;
|
||||
object3.stepperButtonDisabled = {opacity: 0.5};
|
||||
object3.valueText = {'minWidth': 40, 'textAlign': 'center'};
|
||||
const env0_7 = Reflect.apply(createStyles, value, [object3]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/tooling/ShopSkipCategoriesFilter.tsx');
|
||||
exports.ShopSkipCategoriesFilter = ShopSkipCategoriesFilter;
|
||||
}
|
||||
|
||||
function ShopSkipCategoriesFilter() { // fn#107879, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14459:798, offset: 0x0230cca9, size: 516 bytes, params: 1, frame: 31
|
||||
const styles = useStyles();
|
||||
const skipNumCategories = (require(566) /* metro dependency 566: flux */).useStateFromStores([CollectiblesCategoryStore],
|
||||
function() {
|
||||
return CollectiblesCategoryStore.skipNumCategories;
|
||||
});
|
||||
const value2 = skipNumCategories <= 0;
|
||||
const value3 = skipNumCategories >= 100;
|
||||
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const text = <Text variant="text-md/normal" style={styles.label}>{'Hide first # of categories'}</Text>;
|
||||
const items3 = [<Pressable style={[styles.stepperButton,
|
||||
value2 && styles.stepperButtonDisabled]} onPress={onPress_107881} disabled={value2}><Text variant="text-lg/semibold">{'−'}</Text></Pressable>];
|
||||
items3[1] = <Text variant="text-md/semibold" style={styles.valueText}>{skipNumCategories}</Text>;
|
||||
items3[2] = <Pressable style={[styles.stepperButton,
|
||||
value3 && styles.stepperButtonDisabled]} onPress={onPress_107882} disabled={value3}><Text variant="text-lg/semibold">{'+'}</Text></Pressable>;
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
<Stack spacing={8}>
|
||||
{text}
|
||||
<View style={styles.stepperContainer}>
|
||||
{items3}
|
||||
</View>
|
||||
</Stack>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function ShopSkipCategoriesFilterOnPress() { // fn#107881, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14459:1164, owner: ShopSkipCategoriesFilter.onPress, offset: 0x0230cebc, size: 64 bytes, params: 1, frame: 12
|
||||
var value2;
|
||||
var moduleValue;
|
||||
if (skipNumCategories > 0) {
|
||||
value2 = environment.__proto__;
|
||||
moduleValue = require(5120) /* metro dependency 5120: CollectiblesActionCreators */;
|
||||
moduleValue.setSkipNumCategories(skipNumCategories - 1);
|
||||
}
|
||||
}
|
||||
|
||||
function ShopSkipCategoriesFilterOnPress_107882() { // fn#107882, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14459:1429, owner: ShopSkipCategoriesFilter.onPress, offset: 0x0230cefc, size: 65 bytes, params: 1, frame: 12
|
||||
var value2;
|
||||
var moduleValue;
|
||||
if (skipNumCategories < 100) {
|
||||
value2 = environment.__proto__;
|
||||
moduleValue = require(5120) /* metro dependency 5120: CollectiblesActionCreators */;
|
||||
moduleValue.setSkipNumCategories(skipNumCategories + 1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
/* Metro module 14051; source: modules/collectibles/native/useAndroidUnsyncedFilter.tsx; dependencies: [31, 4649, 5140, 566, 3815, 10066, 2] */
|
||||
function _fun106556(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#106556, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14248:6, offset: 0x022e04f5, size: 151 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = (require(31) /* metro dependency 31 */).useCallback;
|
||||
const devSettingsStore = importDefault(4649) /* metro dependency 4649: DevSettingsStore */;
|
||||
const iapStoreAndroid = importDefault(5140) /* metro dependency 5140: IAPStoreAndroid */;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/useAndroidUnsyncedFilter.tsx');
|
||||
exports.useAndroidUnsyncedFilter = useAndroidUnsyncedFilter;
|
||||
}
|
||||
|
||||
function useAndroidUnsyncedFilter() { // fn#106557, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14248:255, offset: 0x022e058c, size: 135 bytes, params: 1, frame: 19
|
||||
const fluxModule = require(566) /* metro dependency 566: flux */;
|
||||
let useStateFromStores = fluxModule.useStateFromStores;
|
||||
const value2 = Reflect.apply(useStateFromStores, fluxModule, [[IAPStoreAndroid], function() {
|
||||
return IAPStoreAndroid.isFetchingGoogleSkus();
|
||||
}]);
|
||||
const moduleValue2 = fluxModule;
|
||||
useStateFromStores = moduleValue2.useStateFromStores;
|
||||
return useCallback(_fun106560, [value2, Reflect.apply(useStateFromStores, moduleValue2, [[DevSettingsStore],
|
||||
function() {
|
||||
return DevSettingsStore.get('bypass_google_sku_sync');
|
||||
}])]);
|
||||
}
|
||||
|
||||
function _fun106560(a0) { // fn#106560, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14248:411, offset: 0x022e063f, size: 88 bytes, params: 2, frame: 12
|
||||
var r0;
|
||||
let value = a0;
|
||||
const billingPlatformUtilsModule = require(3815) /* metro dependency 3815: BillingPlatformUtils */;
|
||||
if (billingPlatformUtilsModule.isGooglePlayBillingSupported()) {
|
||||
if (env0_1) {
|
||||
r0 = value;
|
||||
} else if (env0_0) {
|
||||
r0 = value;
|
||||
} else {
|
||||
value = value.filter(_fun106561);
|
||||
r0 = value;
|
||||
}
|
||||
} else {
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun106561(a0) { // fn#106561, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14248:472, offset: 0x022e0697, size: 41 bytes, params: 2, frame: 11
|
||||
const value = environment.__proto__.__proto__;
|
||||
return (require(10066) /* metro dependency 10066: CollectiblesUtils */).isGPlaySynced(a0);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
/* Metro module 7595; source: modules/collectibles/native/useAvatarDecorationPreviewSizes.tsx; dependencies: [1478, 7596, 2] */
|
||||
function _fun60915(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#60915, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7773:6, offset: 0x01714c47, size: 101 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/collectibles/native/useAvatarDecorationPreviewSizes.tsx');
|
||||
exports.useAvatarDecorationPreviewSizes = function() {
|
||||
var {width, height} = importDefault(dependencyMap[0])();
|
||||
var Math = global.Math;
|
||||
var value4 = 2 * Math.min(width, height) / 3;
|
||||
var object = {avatarDecorationSize: value4};
|
||||
object.avatarSize = value4 * require(dependencyMap[1]).avatarPlaceholderSizeRatio;
|
||||
return object;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
/* Metro module 8409; source: modules/collectibles/native/useCollectibleListLayout.tsx; dependencies: [57, 31, 2] */
|
||||
function _fun66822(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66822, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8594:6, offset: 0x01c0b1c4, size: 163 bytes, params: 8, frame: 18
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_0 = importDefault(57) /* metro dependency 57 */;
|
||||
const value = require(31) /* metro dependency 31 */;
|
||||
const env0_1 = value.useCallback;
|
||||
const env0_2 = value.useState;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/useCollectibleListLayout.tsx');
|
||||
exports.default = _default_66823;
|
||||
exports.GUTTER_SIZE = 16;
|
||||
exports.ROW_SIZE = 3;
|
||||
exports.COLLECTIBLE_ROW_HEIGHT = 114;
|
||||
}
|
||||
|
||||
function _default_66823() { // fn#66823, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8594:154, offset: 0x01c0b267, size: 80 bytes, params: 1, frame: 16
|
||||
const [property, env0_0] = env0_0Binding(useState(0), 2);
|
||||
const object2 = {size: property};
|
||||
object2.onLayout = useCallback(_fun66824, []);
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun66824({nativeEvent}) { // fn#66824, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8594:219, offset: 0x01c0b2b7, size: 50 bytes, params: 2, frame: 12
|
||||
env0_0((nativeEvent.layout.width - 64) / 3);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,113 @@
|
||||
/* Metro module 14042; source: modules/collectibles/native/useCollectiblesShopDeepLinkProps.tsx; dependencies: [31, 5121, 5146, 566, 5133, 2] */
|
||||
function _fun106495(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#106495, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14239:6, offset: 0x022de107, size: 157 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = (require(31) /* metro dependency 31 */).useMemo;
|
||||
const collectiblesCategoryStore = importDefault(5121) /* metro dependency 5121: CollectiblesCategoryStore */;
|
||||
const collectiblesShopStore = importDefault(5146) /* metro dependency 5146: CollectiblesShopStore */;
|
||||
const env0_5 = {};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/useCollectiblesShopDeepLinkProps.tsx');
|
||||
exports.useCollectiblesShopDeepLinkProps = useCollectiblesShopDeepLinkProps;
|
||||
}
|
||||
|
||||
function useCollectiblesShopDeepLinkProps({categories, products}) { // fn#106496, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14239:272, offset: 0x022de1a4, size: 162 bytes, params: 2, frame: 18
|
||||
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([CollectiblesCategoryStore,
|
||||
CollectiblesShopStore], _fun106497);
|
||||
return useMemo(_fun106499, [value2.initialBaseProductSkuId, value2.initialVariantIndex, value2.initialCategorySkuId,
|
||||
products, categories]);
|
||||
}
|
||||
|
||||
function _fun106497() { // fn#106497, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14239:348, offset: 0x022de246, size: 236 bytes, params: 1, frame: 21
|
||||
var environment;
|
||||
var r1;
|
||||
var r2;
|
||||
var skuId;
|
||||
var value4;
|
||||
var Math;
|
||||
var max;
|
||||
var variants;
|
||||
const value = environment.__proto__;
|
||||
const initialProductSkuId = CollectiblesShopStore.initialProductSkuId;
|
||||
const product = CollectiblesCategoryStore.getProduct(initialProductSkuId);
|
||||
const value3 = 0;
|
||||
if (product != null) {
|
||||
if (product.variantGroupStoreListingId != null) {
|
||||
value4 = CollectiblesCategoryStore.getProductByStoreListingId(product.variantGroupStoreListingId);
|
||||
if (value4 != null && (require(5133) /* metro dependency 5133: CollectiblesProductUtils */).getIsVariantProduct(value4)) {
|
||||
skuId = value4.skuId;
|
||||
Math = global.Math;
|
||||
max = Math.max;
|
||||
variants = value4.variants;
|
||||
r1 = Reflect.apply(max, Math, [value3, variants.findIndex(function({skuId}) {
|
||||
return skuId === initialProductSkuId;
|
||||
})]);
|
||||
r2 = skuId;
|
||||
} else {
|
||||
r1 = value3;
|
||||
r2 = initialProductSkuId;
|
||||
}
|
||||
} else {
|
||||
r1 = value3;
|
||||
r2 = initialProductSkuId;
|
||||
}
|
||||
} else {
|
||||
r1 = value3;
|
||||
r2 = initialProductSkuId;
|
||||
}
|
||||
return {initialCategorySkuId: CollectiblesCategoryStore.getCategoryForProduct(initialProductSkuId)?.skuId,
|
||||
initialBaseProductSkuId: r2, initialVariantIndex: r1};
|
||||
}
|
||||
|
||||
function _fun106499() { // fn#106499, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14239:847, offset: 0x022de332, size: 191 bytes, params: 1, frame: 20
|
||||
var environment;
|
||||
var r4;
|
||||
var r1;
|
||||
var r0;
|
||||
var object2;
|
||||
var productsBinding;
|
||||
var value2;
|
||||
var Math;
|
||||
var max;
|
||||
var value;
|
||||
if (initialBaseProductSkuId == null) {
|
||||
value = environment.__proto__;
|
||||
r0 = env1_5;
|
||||
} else if (initialCategorySkuId == null) {
|
||||
value = environment.__proto__;
|
||||
r0 = env1_5;
|
||||
} else {
|
||||
object2 = {};
|
||||
object2.initialProductSkuId = initialBaseProductSkuId;
|
||||
object2.initialVariantIndex = initialVariantIndex;
|
||||
object2.initialCategorySkuId = initialCategorySkuId;
|
||||
productsBinding = products;
|
||||
value2 = undefined;
|
||||
if (productsBinding != null) {
|
||||
Math = global.Math;
|
||||
r4 = Math.max(0, products.findIndex(function({skuId}) {
|
||||
return skuId === initialBaseProductSkuId;
|
||||
}));
|
||||
} else {
|
||||
r4 = value2;
|
||||
}
|
||||
object2.productIndex = r4;
|
||||
if (categories != null) {
|
||||
Math = global.Math;
|
||||
max = Math.max;
|
||||
value = categories.findIndex(_fun106501);
|
||||
value = Reflect.apply(max, Math, [0, value]);
|
||||
r1 = value;
|
||||
} else {
|
||||
r1 = value2;
|
||||
}
|
||||
object2.categoryIndex = r1;
|
||||
r0 = object2;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun106501({skuId}) { // fn#106501, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14239:1054, offset: 0x022de3f1, size: 21 bytes, params: 2, frame: 2
|
||||
return skuId === initialCategorySkuId;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,279 @@
|
||||
/* Metro module 14043; source: modules/collectibles/native/useCollectiblesShopHeader.tsx; dependencies: [31, 27, 1878, 663, 661, 6528, 8516, 33, 4501, 697, 10358, 4573, 1244, 566, 10070, 5120, 6789, 6742, 4080, 10135, 1962, 683, 9480, 6531, 5080, 8743, 10123, 8341, 8663, 8811, 14044, 1484, 5176, 2] */
|
||||
function _fun106502(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#106502, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14240:6, offset: 0x022de406, size: 331 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(27) /* metro dependency 27 */).View;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const env0_6 = (require(663) /* metro dependency 663: CollectiblesShopConstants */).CollectiblesMobileShopScreen;
|
||||
const env0_7 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
|
||||
const env0_8 = (require(6528) /* metro dependency 6528: QuestConstants */).RewardFilterTypes;
|
||||
const env0_9 = (require(8516) /* metro dependency 8516: Constants */).UserProfileSections;
|
||||
const value = require(33) /* metro dependency 33 */;
|
||||
const env0_10 = value.jsx;
|
||||
const env0_11 = value.jsxs;
|
||||
const env0_12 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun106503);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/useCollectiblesShopHeader.tsx');
|
||||
exports.default = _default_106518;
|
||||
}
|
||||
|
||||
function _fun106503(a0) { // fn#106503, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14240:304, offset: 0x022de551, size: 224 bytes, params: 2, frame: 17
|
||||
const object3 = {};
|
||||
const object5 = {'width': '100%', 'flexDirection': 'row', 'alignItems': 'center'};
|
||||
const value = undefined;
|
||||
let PX_8 = a0 ? (importDefault(697) /* metro dependency 697: native */).space.PX_8 : value;
|
||||
object5.marginTop = PX_8;
|
||||
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object5.paddingLeft = PX_8;
|
||||
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object5.gap = PX_8;
|
||||
object3.headerTitleContainer = object5;
|
||||
object3.headerTitle = {flexShrink: 1};
|
||||
const object6 = {'flexDirection': 'row', 'justifyContent': 'flex-end', 'alignItems': 'center'};
|
||||
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object6.gap = PX_8;
|
||||
PX_8 = a0 ? (importDefault(697) /* metro dependency 697: native */).space.PX_8 : value;
|
||||
object6.marginTop = PX_8;
|
||||
object3.headerRightContainer = object6;
|
||||
return object3;
|
||||
}
|
||||
|
||||
function CollectiblesShopHeaderTitle({currentScreen, youBarEnabled}) { // fn#106504, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14240:686, offset: 0x022de631, size: 301 bytes, params: 2, frame: 23
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const styles = useStyles(youBarEnabled);
|
||||
const ShopIcon = (require(10358) /* metro dependency 10358: ShopIcon */).ShopIcon;
|
||||
const shopIcon = <ShopIcon size="md" color="icon-strong" />;
|
||||
const Heading = (require(4573) /* metro dependency 4573: Text */).Heading;
|
||||
const ORBS = CollectiblesMobileShopScreen.ORBS;
|
||||
return (
|
||||
<View style={styles.headerTitleContainer}>
|
||||
{shopIcon}
|
||||
<Heading
|
||||
variant="redesign/heading-18/bold"
|
||||
color="mobile-text-heading-primary"
|
||||
maxFontSizeMultiplier={2}
|
||||
lineClamp={1}
|
||||
style={styles.headerTitle}
|
||||
>
|
||||
{currentScreen === ORBS ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ElYQFS) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.pWG4ze)}
|
||||
</Heading>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function CollectiblesShopHeaderRight({currentScreen, youBarEnabled}) { // fn#106505, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14240:1120, offset: 0x022de75e, size: 606 bytes, params: 2, frame: 29
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const styles = useStyles(youBarEnabled);
|
||||
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
|
||||
return UserStore.getCurrentUser();
|
||||
}, []);
|
||||
const useFetchVirtualCurrencyBalanceModule = require(10070) /* metro dependency 10070: useFetchVirtualCurrencyBalance */;
|
||||
const useFetchVirtualCurrencyBalance = useFetchVirtualCurrencyBalanceModule.useFetchVirtualCurrencyBalance;
|
||||
const balance = Reflect.apply(useFetchVirtualCurrencyBalance, useFetchVirtualCurrencyBalanceModule, []).balance;
|
||||
const binding = env0_3;
|
||||
const value4 = binding.useMemo(_fun106507, [currentScreen]);
|
||||
const value5 = binding.useCallback(_fun106511, [balance]);
|
||||
const value6 = binding.useCallback(_fun106516, [currentScreen, value3?.id]);
|
||||
const BalanceWidgetPillButton = (require(10123) /* metro dependency 10123: native */).BalanceWidgetPillButton;
|
||||
const balanceWidgetPillButton = <BalanceWidgetPillButton balance={balance} onPress={value5} />;
|
||||
const r6 = value3 != null && ((IconButton) => <IconButton accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['7lZ31J'])} variant="tertiary" size="sm" icon={((HeartIcon) => <HeartIcon size="sm" color="redesign-button-tertiary-text" />)((require(8663) /* metro dependency 8663: HeartIcon */).HeartIcon)} onPress={value6} />)((require(8341) /* metro dependency 8341: IconButtonNative */).IconButton);
|
||||
const ContextMenu = (require(8811) /* metro dependency 8811: ContextMenuNative */).ContextMenu;
|
||||
return (
|
||||
<View style={styles.headerRightContainer}>
|
||||
{balanceWidgetPillButton}
|
||||
{r6}
|
||||
<ContextMenu
|
||||
items={value4}
|
||||
align="below"
|
||||
title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.nSFuC0)}
|
||||
keyboardShouldPersistTaps="handled"
|
||||
key={currentScreen}
|
||||
>
|
||||
{children_106517}
|
||||
</ContextMenu>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _default_106518() { // fn#106518, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14240:4071, offset: 0x022df096, size: 142 bytes, params: 1, frame: 17
|
||||
const value = a0;
|
||||
env0_3.useLayoutEffect(_fun106519,
|
||||
[(require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation(),
|
||||
(value !== undefined ? value : {}).currentScreen,
|
||||
(require(5176) /* metro dependency 5176: YouBarExperiment */).useYouBarEnabled('CollectiblesShopHeader')]);
|
||||
}
|
||||
|
||||
function _fun106507() { // fn#106507, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14240:1297, offset: 0x022de9bc, size: 395 bytes, params: 1, frame: 19
|
||||
let object2 = {};
|
||||
const value2 = undefined;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let string = intl.string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
object2.label = Reflect.apply(string, intl, [t['xNiB/O']]);
|
||||
object2.action = function() {
|
||||
var moduleValue = require(dependencyMap[15]);
|
||||
var object = {};
|
||||
var COLLECTIBLES_SHOP_MOBILE_FEATURED_PAGE_MENU_ITEM = importDefault(dependencyMap[16]).COLLECTIBLES_SHOP_MOBILE_FEATURED_PAGE_MENU_ITEM;
|
||||
object.analyticsLocations = [COLLECTIBLES_SHOP_MOBILE_FEATURED_PAGE_MENU_ITEM];
|
||||
object.analyticsSource = importDefault(dependencyMap[16]).COLLECTIBLES_SHOP_MOBILE_FEATURED_PAGE_MENU_ITEM;
|
||||
object.screen = CollectiblesMobileShopScreen.FEATURED_PAGE;
|
||||
moduleValue.openCollectiblesShopMobile(object);
|
||||
};
|
||||
let currentScreenBinding = currentScreen;
|
||||
const FEATURED_PAGE = CollectiblesMobileShopScreen.FEATURED_PAGE;
|
||||
let CheckmarkSmallIcon = currentScreenBinding !== FEATURED_PAGE ? value2 : (require(6742) /* metro dependency 6742: CheckmarkSmallIcon */).CheckmarkSmallIcon;
|
||||
object2.trailingIndicator = CheckmarkSmallIcon;
|
||||
const items2 = [object2];
|
||||
object2 = {};
|
||||
string = intl.string;
|
||||
const RSyoZu = t.RSyoZu;
|
||||
object2.label = Reflect.apply(string, intl, [RSyoZu]);
|
||||
object2.action = function() {
|
||||
var moduleValue = require(dependencyMap[15]);
|
||||
var object = {};
|
||||
var COLLECTIBLES_SHOP_MOBILE_SHOP_ALL_MENU_ITEM = importDefault(dependencyMap[16]).COLLECTIBLES_SHOP_MOBILE_SHOP_ALL_MENU_ITEM;
|
||||
object.analyticsLocations = [COLLECTIBLES_SHOP_MOBILE_SHOP_ALL_MENU_ITEM];
|
||||
object.analyticsSource = importDefault(dependencyMap[16]).COLLECTIBLES_SHOP_MOBILE_SHOP_ALL_MENU_ITEM;
|
||||
object.screen = CollectiblesMobileShopScreen.SHOP_ALL;
|
||||
moduleValue.openCollectiblesShopMobile(object);
|
||||
};
|
||||
currentScreenBinding = currentScreen;
|
||||
const SHOP_ALL = CollectiblesMobileShopScreen.SHOP_ALL;
|
||||
CheckmarkSmallIcon = currentScreenBinding !== SHOP_ALL ? value2 : (require(6742) /* metro dependency 6742: CheckmarkSmallIcon */).CheckmarkSmallIcon;
|
||||
object2.trailingIndicator = CheckmarkSmallIcon;
|
||||
items2[1] = object2;
|
||||
object2 = {};
|
||||
string = intl.string;
|
||||
const EBYkzk = t.EBYkzk;
|
||||
object2.label = Reflect.apply(string, intl, [EBYkzk]);
|
||||
object2.action = function() {
|
||||
var moduleValue = require(dependencyMap[15]);
|
||||
var object = {};
|
||||
var COLLECTIBLES_SHOP_MOBILE_ORBS_MENU_ITEM = importDefault(dependencyMap[16]).COLLECTIBLES_SHOP_MOBILE_ORBS_MENU_ITEM;
|
||||
object.analyticsLocations = [COLLECTIBLES_SHOP_MOBILE_ORBS_MENU_ITEM];
|
||||
object.analyticsSource = importDefault(dependencyMap[16]).COLLECTIBLES_SHOP_MOBILE_ORBS_MENU_ITEM;
|
||||
object.screen = CollectiblesMobileShopScreen.ORBS;
|
||||
moduleValue.openCollectiblesShopMobile(object);
|
||||
};
|
||||
currentScreenBinding = currentScreen;
|
||||
const ORBS = CollectiblesMobileShopScreen.ORBS;
|
||||
CheckmarkSmallIcon = currentScreenBinding !== ORBS ? value2 : (require(6742) /* metro dependency 6742: CheckmarkSmallIcon */).CheckmarkSmallIcon;
|
||||
object2.trailingIndicator = CheckmarkSmallIcon;
|
||||
items2[2] = object2;
|
||||
return items2;
|
||||
}
|
||||
|
||||
function _fun106511() { // fn#106511, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14240:2320, offset: 0x022dec91, size: 234 bytes, params: 1, frame: 23
|
||||
const defaultImport = importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */;
|
||||
const openLazy = defaultImport.openLazy;
|
||||
const object2 = {};
|
||||
object2.balance = balance;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const SymzJC = t.SymzJC;
|
||||
object2.primaryButtonConfig = {buttonText: Reflect.apply(string, intl, [SymzJC]),
|
||||
onButtonPress: onButtonPress_106514};
|
||||
const object4 = {};
|
||||
object4.buttonText = intl.string(t['/g10LC']);
|
||||
object4.onButtonPress = onButtonPress_106515;
|
||||
object2.secondaryButtonConfig = object4;
|
||||
const COLLECTIBLES_SHOP = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).COLLECTIBLES_SHOP;
|
||||
object2.source = COLLECTIBLES_SHOP;
|
||||
Reflect.apply(openLazy, defaultImport, [_fun106512, 'BalanceWidgetActionSheet', object2]);
|
||||
}
|
||||
|
||||
function _fun106516() { // fn#106516, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14240:3095, offset: 0x022deef2, size: 204 bytes, params: 1, frame: 19
|
||||
var value3;
|
||||
var defaultImport;
|
||||
var object2;
|
||||
var defaultImport3;
|
||||
const value2 = undefined;
|
||||
if ((env0_1 == null ? value2 : env0_1.id) != null) {
|
||||
value3 = environment.__proto__;
|
||||
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
defaultImport.track(AnalyticEvents.COLLECTIBLES_SHOP_ELEMENT_CLICKED, {cta_name: 'wishlist header button',
|
||||
page_type: currentScreen});
|
||||
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).popAll();
|
||||
defaultImport3 = importDefault(8743) /* metro dependency 8743: showUserProfileActionSheet */;
|
||||
object2 = {};
|
||||
object2.userId = env0_1.id;
|
||||
object2.sourceAnalyticsLocations = [(importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).COLLECTIBLES_SHOP];
|
||||
object2.initialSection = UserProfileSections.WISHLIST;
|
||||
defaultImport3(object2);
|
||||
}
|
||||
return value2;
|
||||
}
|
||||
|
||||
function CollectiblesShopHeaderRightChildren(a0) { // fn#106517, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14240:3838, owner: CollectiblesShopHeaderRight.children, offset: 0x022defbe, size: 216 bytes, params: 2, frame: 19
|
||||
const ref = a0.ref;
|
||||
const value = Object.create(null);
|
||||
value.ref = 0;
|
||||
const value2 = copyDataProperties({}, a0, value, undefined);
|
||||
const IconButton = (require(8341) /* metro dependency 8341: IconButtonNative */).IconButton;
|
||||
const iconButtonProps = {ref: ref, ...value2};
|
||||
iconButtonProps['variant'] = 'tertiary';
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
iconButtonProps['accessibilityLabel'] = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.nSFuC0);
|
||||
iconButtonProps['size'] = 'sm';
|
||||
const MenuIcon = (require(14044) /* metro dependency 14044: MenuIcon */).MenuIcon;
|
||||
iconButtonProps['icon'] = <MenuIcon size="sm" color="redesign-button-tertiary-text" />;
|
||||
return <IconButton {...iconButtonProps} />;
|
||||
}
|
||||
|
||||
function _fun106519() { // fn#106519, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14240:4200, offset: 0x022df124, size: 50 bytes, params: 1, frame: 13
|
||||
const binding = env0_1;
|
||||
binding.setOptions({headerTitle: headerTitle_106520, headerRight: headerRight_106521});
|
||||
}
|
||||
|
||||
function _fun106512() { // fn#106512, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14240:2344, offset: 0x022ded7b, size: 64 bytes, params: 1, frame: 13
|
||||
var environment;
|
||||
let value = environment.__proto__.__proto__;
|
||||
value = require(dependencyMap[20]);
|
||||
value = value(dependencyMap[19], dependencyMap.paths);
|
||||
return value.then(function(a0) {
|
||||
return a0.default;
|
||||
});
|
||||
}
|
||||
|
||||
function onButtonPress_106514() { // fn#106514, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14240:2518, offset: 0x022dedbb, size: 195 bytes, params: 1, frame: 18
|
||||
var object2;
|
||||
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
const track = defaultImport.track;
|
||||
const ORB_BALANCE_ACTION_SHEET_ACTION = AnalyticEvents.ORB_BALANCE_ACTION_SHEET_ACTION;
|
||||
const COLLECTIBLES_SHOP = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).COLLECTIBLES_SHOP;
|
||||
Reflect.apply(track, defaultImport, [ORB_BALANCE_ACTION_SHEET_ACTION, {type: 'GO_TO_QUEST_HOME',
|
||||
source: COLLECTIBLES_SHOP, balance: balance}]);
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
const questUtilsNativeModule = require(9480) /* metro dependency 9480: QuestUtilsNative */;
|
||||
const openQuestHome = questUtilsNativeModule.openQuestHome;
|
||||
object2 = {mergeExistingRoutes: true};
|
||||
const VIRTUAL_CURRENCY = RewardFilterTypes.VIRTUAL_CURRENCY;
|
||||
object2.filter = VIRTUAL_CURRENCY;
|
||||
const QuestContent = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent;
|
||||
const ORBS_BALANCE_MENU = QuestContent.ORBS_BALANCE_MENU;
|
||||
object2.fromContent = ORBS_BALANCE_MENU;
|
||||
Reflect.apply(openQuestHome, questUtilsNativeModule, [object2]);
|
||||
}
|
||||
|
||||
function onButtonPress_106515() { // fn#106515, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14240:2890, offset: 0x022dee7e, size: 116 bytes, params: 1, frame: 17
|
||||
let value = environment.__proto__.__proto__;
|
||||
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
const track = defaultImport.track;
|
||||
const ORB_BALANCE_ACTION_SHEET_ACTION = AnalyticEvents.ORB_BALANCE_ACTION_SHEET_ACTION;
|
||||
const COLLECTIBLES_SHOP = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).COLLECTIBLES_SHOP;
|
||||
value = environment.__proto__;
|
||||
Reflect.apply(track, defaultImport, [ORB_BALANCE_ACTION_SHEET_ACTION, {type: 'GO_BACK', source: COLLECTIBLES_SHOP,
|
||||
balance: balance}]);
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
}
|
||||
|
||||
function headerTitle_106520() { // fn#106520, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14240:4231, offset: 0x022df156, size: 44 bytes, params: 1, frame: 14
|
||||
return <CollectiblesShopHeaderTitle currentScreen={currentScreen} youBarEnabled={env1_2} />;
|
||||
}
|
||||
|
||||
function headerRight_106521() { // fn#106521, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14240:4312, offset: 0x022df182, size: 44 bytes, params: 1, frame: 14
|
||||
return <CollectiblesShopHeaderRight currentScreen={currentScreen} youBarEnabled={env1_2} />;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,329 @@
|
||||
/* Metro module 10146; source: modules/collectibles/native/useHandleBuyNow.tsx; dependencies: [5, 57, 31, 661, 3, 10147, 5120, 4080, 7589, 1581, 6906, 3817, 3857, 1244, 2] */
|
||||
function _fun79086(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79086, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10332:6, offset: 0x01e447f3, size: 225 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(5) /* metro dependency 5 */;
|
||||
const env0_4 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_5 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_6 = (require(661) /* metro dependency 661: Constants */).Routes;
|
||||
let value = importDefault(3) /* metro dependency 3: Logger */;
|
||||
value = new value('useHandleBuyNow');
|
||||
const closure = useHandleBuyNow;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/useHandleBuyNow.tsx');
|
||||
exports.default = closure;
|
||||
exports.useHandleBuyNow = closure;
|
||||
}
|
||||
|
||||
function useHandleBuyNow({product, analyticsLocations, onBuy, orderId}) { // fn#79087, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10332:195, offset: 0x01e448d4, size: 255 bytes, params: 2, frame: 21
|
||||
const binding = env0_5;
|
||||
const [property, env0_3] = env0_4(binding.useState(false), 2);
|
||||
const value4 = (importDefault(10147) /* metro dependency 10147: useMobileCollectiblesPurchaseSKUAndroid */)({product: product,
|
||||
analyticsLocations: analyticsLocations, onPurchaseComplete: function() {
|
||||
return _onPurchaseComplete.apply(this, arguments);
|
||||
}, onPurchaseError: onPurchaseError, onPurchasePending: function() {
|
||||
}, orderId: orderId});
|
||||
const useCallback = binding.useCallback;
|
||||
return {handleBuyNow: Reflect.apply(useCallback, binding, [env0_3(_fun79095), [value4, property, onBuy,
|
||||
product.skuId]]), isBuying: property};
|
||||
}
|
||||
|
||||
function _onPurchaseComplete() { // fn#79088, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10332:546, owner: useHandleBuyNow._onPurchaseComplete, offset: 0x01e449d3, size: 53 bytes, params: 1, frame: 13
|
||||
var environment;
|
||||
const value = environment.__proto__;
|
||||
return env1_3(_fun79090).apply(this, arguments);
|
||||
}
|
||||
|
||||
function* _fun79095() { // fn#79095, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10332:803, offset: 0x01e44ac5, size: 619 bytes, params: 1, frame: 21
|
||||
var binding;
|
||||
var value3;
|
||||
var isMetaQuest;
|
||||
var value4;
|
||||
var value5;
|
||||
var value6;
|
||||
var value7;
|
||||
var value8;
|
||||
var error;
|
||||
var error2;
|
||||
var JSON;
|
||||
var stringify;
|
||||
var value9;
|
||||
var HermesInternal;
|
||||
var concat;
|
||||
var captureBillingException;
|
||||
var object2;
|
||||
var skuId;
|
||||
var COLLECTIBLES_SHOP;
|
||||
var value10;
|
||||
var value11;
|
||||
var binding2;
|
||||
var property;
|
||||
var value12;
|
||||
var redirectWithHandoffToken;
|
||||
var value13;
|
||||
var value14;
|
||||
var value15;
|
||||
var binding3;
|
||||
var value16;
|
||||
var hideActionSheet;
|
||||
var error3;
|
||||
var value17;
|
||||
var binding4;
|
||||
var value18;
|
||||
var value19;
|
||||
var binding5;
|
||||
var open;
|
||||
var intl;
|
||||
var string;
|
||||
var t;
|
||||
let value = undefined;
|
||||
if (false) {
|
||||
return value;
|
||||
}
|
||||
reduciblePort53: while (true) {
|
||||
exceptionLanding52: while (true) {
|
||||
exceptionLanding20: while (true) {
|
||||
value = environment.__proto__.__proto__;
|
||||
binding = env2_0;
|
||||
value3 = binding(env2_2[9]);
|
||||
isMetaQuest = value3.isMetaQuest;
|
||||
if (Reflect.apply(isMetaQuest, value3, [])) {
|
||||
try {
|
||||
binding = env2_6;
|
||||
} catch (error) {
|
||||
break exceptionLanding52;
|
||||
}
|
||||
try {
|
||||
COLLECTIBLES_SHOP = binding.COLLECTIBLES_SHOP;
|
||||
} catch (error) {
|
||||
break exceptionLanding52;
|
||||
}
|
||||
value10 = environment.__proto__;
|
||||
try {
|
||||
} catch (error) {
|
||||
break exceptionLanding52;
|
||||
}
|
||||
try {
|
||||
skuId = require.skuId;
|
||||
} catch (error) {
|
||||
break exceptionLanding52;
|
||||
}
|
||||
try {
|
||||
HermesInternal = global.HermesInternal;
|
||||
} catch (error) {
|
||||
break exceptionLanding52;
|
||||
}
|
||||
try {
|
||||
concat = HermesInternal.concat;
|
||||
} catch (error) {
|
||||
break exceptionLanding52;
|
||||
}
|
||||
try {
|
||||
value11 = '' + COLLECTIBLES_SHOP + '#itemSkuId=' + skuId;
|
||||
} catch (error) {
|
||||
break exceptionLanding52;
|
||||
}
|
||||
try {
|
||||
binding = env2_1;
|
||||
} catch (error) {
|
||||
break exceptionLanding52;
|
||||
}
|
||||
try {
|
||||
binding2 = env2_2;
|
||||
} catch (error) {
|
||||
break exceptionLanding52;
|
||||
}
|
||||
try {
|
||||
property = binding2[10];
|
||||
} catch (error) {
|
||||
break exceptionLanding52;
|
||||
}
|
||||
try {
|
||||
value12 = binding(property);
|
||||
} catch (error) {
|
||||
break exceptionLanding52;
|
||||
}
|
||||
try {
|
||||
redirectWithHandoffToken = value12.redirectWithHandoffToken;
|
||||
} catch (error) {
|
||||
break exceptionLanding52;
|
||||
}
|
||||
try {
|
||||
object2 = {};
|
||||
} catch (error) {
|
||||
break exceptionLanding52;
|
||||
}
|
||||
try {
|
||||
object2.forceExternalBrowser = true;
|
||||
} catch (error) {
|
||||
break exceptionLanding52;
|
||||
}
|
||||
try {
|
||||
value13 = Reflect.apply(redirectWithHandoffToken, value12, [value11, object2]);
|
||||
} catch (error) {
|
||||
break exceptionLanding52;
|
||||
}
|
||||
yield value13;
|
||||
try {
|
||||
value14 = undefined;
|
||||
value15 = false;
|
||||
} catch (error) {
|
||||
break exceptionLanding52;
|
||||
}
|
||||
if (value15) {
|
||||
return value14;
|
||||
}
|
||||
try {
|
||||
binding = env2_1;
|
||||
} catch (error) {
|
||||
break exceptionLanding52;
|
||||
}
|
||||
try {
|
||||
binding3 = env2_2;
|
||||
} catch (error) {
|
||||
break exceptionLanding52;
|
||||
}
|
||||
try {
|
||||
property = binding3[7];
|
||||
} catch (error) {
|
||||
break exceptionLanding52;
|
||||
}
|
||||
try {
|
||||
value16 = binding(property);
|
||||
} catch (error) {
|
||||
break exceptionLanding52;
|
||||
}
|
||||
try {
|
||||
hideActionSheet = value16.hideActionSheet;
|
||||
} catch (error) {
|
||||
break exceptionLanding52;
|
||||
}
|
||||
try {
|
||||
Reflect.apply(hideActionSheet, value16, []);
|
||||
} catch (error) {
|
||||
break exceptionLanding52;
|
||||
}
|
||||
break reduciblePort53;
|
||||
}
|
||||
value4 = environment.__proto__;
|
||||
try {
|
||||
} catch (error) {
|
||||
break exceptionLanding20;
|
||||
}
|
||||
if (dependencyMap) {
|
||||
break reduciblePort53;
|
||||
}
|
||||
try {
|
||||
binding = env1_3;
|
||||
} catch (error) {
|
||||
break exceptionLanding20;
|
||||
}
|
||||
try {
|
||||
binding(true);
|
||||
} catch (error) {
|
||||
break exceptionLanding20;
|
||||
}
|
||||
try {
|
||||
binding = env1_4;
|
||||
} catch (error) {
|
||||
break exceptionLanding20;
|
||||
}
|
||||
try {
|
||||
value5 = binding();
|
||||
} catch (error) {
|
||||
break exceptionLanding20;
|
||||
}
|
||||
yield value5;
|
||||
try {
|
||||
value6 = undefined;
|
||||
value7 = false;
|
||||
} catch (error) {
|
||||
break exceptionLanding20;
|
||||
}
|
||||
if (value7) {
|
||||
return value6;
|
||||
}
|
||||
try {
|
||||
} catch (error) {
|
||||
break exceptionLanding20;
|
||||
}
|
||||
try {
|
||||
value8 = importDefault == null;
|
||||
} catch (error) {
|
||||
break exceptionLanding20;
|
||||
}
|
||||
if (value8) {
|
||||
break reduciblePort53;
|
||||
}
|
||||
try {
|
||||
} catch (error) {
|
||||
break exceptionLanding20;
|
||||
}
|
||||
try {
|
||||
importDefault();
|
||||
} catch (error) {
|
||||
break exceptionLanding20;
|
||||
}
|
||||
break reduciblePort53;
|
||||
}
|
||||
env1_3(false);
|
||||
binding = env2_7;
|
||||
error2 = binding.error;
|
||||
JSON = global.JSON;
|
||||
stringify = JSON.stringify;
|
||||
value9 = Reflect.apply(stringify, JSON, [error]);
|
||||
HermesInternal = global.HermesInternal;
|
||||
concat = HermesInternal.concat;
|
||||
Reflect.apply(error2, binding, ['Error running purchase: ' + value9]);
|
||||
binding = env2_0;
|
||||
value = binding(env2_2[11]);
|
||||
captureBillingException = value.captureBillingException;
|
||||
skuId = require.skuId;
|
||||
Reflect.apply(captureBillingException, value, [error, {tags: {source: 'useHandleBuyNow', skuId: skuId}}]);
|
||||
break reduciblePort53;
|
||||
}
|
||||
binding = env2_7;
|
||||
error3 = binding.error;
|
||||
JSON = global.JSON;
|
||||
stringify = JSON.stringify;
|
||||
value17 = Reflect.apply(stringify, JSON, [error]);
|
||||
HermesInternal = global.HermesInternal;
|
||||
concat = HermesInternal.concat;
|
||||
Reflect.apply(error3, binding, ['Error performing web handoff: ' + value17]);
|
||||
binding = env2_0;
|
||||
binding4 = env2_2;
|
||||
value18 = binding(binding4[11]);
|
||||
captureBillingException = value18.captureBillingException;
|
||||
value19 = environment.__proto__;
|
||||
skuId = require.skuId;
|
||||
Reflect.apply(captureBillingException, value18, [error, {tags: {source: 'useHandleBuyNow', skuId: skuId}}]);
|
||||
binding5 = env2_1;
|
||||
value = binding5(binding4[12]);
|
||||
open = value.open;
|
||||
intl = binding(binding4[13]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding4[13]).t;
|
||||
Reflect.apply(open, value, [{key: 'SHOP_ITEM_HANDOFF_ERROR', content: Reflect.apply(string, intl,
|
||||
[t['rTU7/z']])}]);
|
||||
break reduciblePort53;
|
||||
}
|
||||
}
|
||||
|
||||
function* _fun79090() { // fn#79090, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10332:607, offset: 0x01e44a13, size: 149 bytes, params: 1, frame: 16
|
||||
if (true) {
|
||||
value = environment.__proto__.__proto__.__proto__;
|
||||
var binding = env3_0;
|
||||
var value3 = binding(env3_2[6]);
|
||||
yield value3.fetchCollectiblesPurchases();
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
env2_3(false);
|
||||
binding = env3_1;
|
||||
var binding2 = env3_2;
|
||||
binding(binding2[7]).hideActionSheet();
|
||||
value = binding(binding2[8]);
|
||||
value.open({product: require, useCategoryImage: true});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,497 @@
|
||||
/* Metro module 10149; source: modules/collectibles/native/useHandleClaim.tsx; dependencies: [5, 31, 5120, 4080, 7589, 3857, 1244, 2] */
|
||||
function _fun79109(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79109, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10335:6, offset: 0x01e455da, size: 137 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(5) /* metro dependency 5 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/useHandleClaim.tsx');
|
||||
exports.useHandleClaim = useHandleClaim;
|
||||
}
|
||||
|
||||
function useHandleClaim({product}) { // fn#79110, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10335:213, offset: 0x01e45663, size: 68 bytes, params: 2, frame: 16
|
||||
const object2 = {};
|
||||
object2.handleClaim = env0_4.useCallback(env0_3(_fun79112), [product]);
|
||||
return object2;
|
||||
}
|
||||
|
||||
function* _fun79112() { // fn#79112, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10335:259, offset: 0x01e456b2, size: 280 bytes, params: 1, frame: 18
|
||||
var binding;
|
||||
var binding2;
|
||||
var property;
|
||||
var value3;
|
||||
var claimPremiumCollectiblesProduct;
|
||||
var skuId;
|
||||
var value5;
|
||||
var value6;
|
||||
var value7;
|
||||
var binding3;
|
||||
var value8;
|
||||
var hideActionSheet;
|
||||
var value9;
|
||||
var open;
|
||||
var object2;
|
||||
var value10;
|
||||
var fetchCollectiblesPurchases;
|
||||
var error;
|
||||
var binding4;
|
||||
var value11;
|
||||
var intl;
|
||||
var string;
|
||||
var t;
|
||||
var CKsXk3;
|
||||
if (true) {
|
||||
value = environment.__proto__.__proto__;
|
||||
try {
|
||||
binding = env2_0;
|
||||
} catch (error) {
|
||||
binding = env2_1;
|
||||
binding4 = env2_2;
|
||||
value11 = binding(binding4[5]);
|
||||
open = value11.open;
|
||||
binding = env2_0;
|
||||
intl = binding(binding4[6]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding4[6]).t;
|
||||
CKsXk3 = t.CKsXk3;
|
||||
Reflect.apply(open, value11, [{key: 'collectible shop claim error', content: Reflect.apply(string, intl,
|
||||
[CKsXk3])}]);
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
binding2 = env2_2;
|
||||
} catch (error) {
|
||||
binding = env2_1;
|
||||
binding4 = env2_2;
|
||||
value11 = binding(binding4[5]);
|
||||
open = value11.open;
|
||||
binding = env2_0;
|
||||
intl = binding(binding4[6]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding4[6]).t;
|
||||
CKsXk3 = t.CKsXk3;
|
||||
Reflect.apply(open, value11, [{key: 'collectible shop claim error', content: Reflect.apply(string, intl,
|
||||
[CKsXk3])}]);
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
property = binding2[2];
|
||||
} catch (error) {
|
||||
binding = env2_1;
|
||||
binding4 = env2_2;
|
||||
value11 = binding(binding4[5]);
|
||||
open = value11.open;
|
||||
binding = env2_0;
|
||||
intl = binding(binding4[6]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding4[6]).t;
|
||||
CKsXk3 = t.CKsXk3;
|
||||
Reflect.apply(open, value11, [{key: 'collectible shop claim error', content: Reflect.apply(string, intl,
|
||||
[CKsXk3])}]);
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
value3 = binding(property);
|
||||
} catch (error) {
|
||||
binding = env2_1;
|
||||
binding4 = env2_2;
|
||||
value11 = binding(binding4[5]);
|
||||
open = value11.open;
|
||||
binding = env2_0;
|
||||
intl = binding(binding4[6]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding4[6]).t;
|
||||
CKsXk3 = t.CKsXk3;
|
||||
Reflect.apply(open, value11, [{key: 'collectible shop claim error', content: Reflect.apply(string, intl,
|
||||
[CKsXk3])}]);
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
claimPremiumCollectiblesProduct = value3.claimPremiumCollectiblesProduct;
|
||||
} catch (error) {
|
||||
binding = env2_1;
|
||||
binding4 = env2_2;
|
||||
value11 = binding(binding4[5]);
|
||||
open = value11.open;
|
||||
binding = env2_0;
|
||||
intl = binding(binding4[6]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding4[6]).t;
|
||||
CKsXk3 = t.CKsXk3;
|
||||
Reflect.apply(open, value11, [{key: 'collectible shop claim error', content: Reflect.apply(string, intl,
|
||||
[CKsXk3])}]);
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
} catch (error) {
|
||||
binding = env2_1;
|
||||
binding4 = env2_2;
|
||||
value11 = binding(binding4[5]);
|
||||
open = value11.open;
|
||||
binding = env2_0;
|
||||
intl = binding(binding4[6]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding4[6]).t;
|
||||
CKsXk3 = t.CKsXk3;
|
||||
Reflect.apply(open, value11, [{key: 'collectible shop claim error', content: Reflect.apply(string, intl,
|
||||
[CKsXk3])}]);
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
skuId = require.skuId;
|
||||
} catch (error) {
|
||||
binding = env2_1;
|
||||
binding4 = env2_2;
|
||||
value11 = binding(binding4[5]);
|
||||
open = value11.open;
|
||||
binding = env2_0;
|
||||
intl = binding(binding4[6]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding4[6]).t;
|
||||
CKsXk3 = t.CKsXk3;
|
||||
Reflect.apply(open, value11, [{key: 'collectible shop claim error', content: Reflect.apply(string, intl,
|
||||
[CKsXk3])}]);
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
value5 = Reflect.apply(claimPremiumCollectiblesProduct, value3, [skuId]);
|
||||
} catch (error) {
|
||||
binding = env2_1;
|
||||
binding4 = env2_2;
|
||||
value11 = binding(binding4[5]);
|
||||
open = value11.open;
|
||||
binding = env2_0;
|
||||
intl = binding(binding4[6]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding4[6]).t;
|
||||
CKsXk3 = t.CKsXk3;
|
||||
Reflect.apply(open, value11, [{key: 'collectible shop claim error', content: Reflect.apply(string, intl,
|
||||
[CKsXk3])}]);
|
||||
return undefined;
|
||||
}
|
||||
yield value5;
|
||||
try {
|
||||
value6 = undefined;
|
||||
value7 = false;
|
||||
} catch (error) {
|
||||
binding = env2_1;
|
||||
binding4 = env2_2;
|
||||
value11 = binding(binding4[5]);
|
||||
open = value11.open;
|
||||
binding = env2_0;
|
||||
intl = binding(binding4[6]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding4[6]).t;
|
||||
CKsXk3 = t.CKsXk3;
|
||||
Reflect.apply(open, value11, [{key: 'collectible shop claim error', content: Reflect.apply(string, intl,
|
||||
[CKsXk3])}]);
|
||||
return undefined;
|
||||
}
|
||||
if (value7) {
|
||||
return value6;
|
||||
}
|
||||
try {
|
||||
binding = env2_1;
|
||||
} catch (error) {
|
||||
binding = env2_1;
|
||||
binding4 = env2_2;
|
||||
value11 = binding(binding4[5]);
|
||||
open = value11.open;
|
||||
binding = env2_0;
|
||||
intl = binding(binding4[6]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding4[6]).t;
|
||||
CKsXk3 = t.CKsXk3;
|
||||
Reflect.apply(open, value11, [{key: 'collectible shop claim error', content: Reflect.apply(string, intl,
|
||||
[CKsXk3])}]);
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
binding3 = env2_2;
|
||||
} catch (error) {
|
||||
binding = env2_1;
|
||||
binding4 = env2_2;
|
||||
value11 = binding(binding4[5]);
|
||||
open = value11.open;
|
||||
binding = env2_0;
|
||||
intl = binding(binding4[6]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding4[6]).t;
|
||||
CKsXk3 = t.CKsXk3;
|
||||
Reflect.apply(open, value11, [{key: 'collectible shop claim error', content: Reflect.apply(string, intl,
|
||||
[CKsXk3])}]);
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
property = binding3[3];
|
||||
} catch (error) {
|
||||
binding = env2_1;
|
||||
binding4 = env2_2;
|
||||
value11 = binding(binding4[5]);
|
||||
open = value11.open;
|
||||
binding = env2_0;
|
||||
intl = binding(binding4[6]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding4[6]).t;
|
||||
CKsXk3 = t.CKsXk3;
|
||||
Reflect.apply(open, value11, [{key: 'collectible shop claim error', content: Reflect.apply(string, intl,
|
||||
[CKsXk3])}]);
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
value8 = binding(property);
|
||||
} catch (error) {
|
||||
binding = env2_1;
|
||||
binding4 = env2_2;
|
||||
value11 = binding(binding4[5]);
|
||||
open = value11.open;
|
||||
binding = env2_0;
|
||||
intl = binding(binding4[6]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding4[6]).t;
|
||||
CKsXk3 = t.CKsXk3;
|
||||
Reflect.apply(open, value11, [{key: 'collectible shop claim error', content: Reflect.apply(string, intl,
|
||||
[CKsXk3])}]);
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
hideActionSheet = value8.hideActionSheet;
|
||||
} catch (error) {
|
||||
binding = env2_1;
|
||||
binding4 = env2_2;
|
||||
value11 = binding(binding4[5]);
|
||||
open = value11.open;
|
||||
binding = env2_0;
|
||||
intl = binding(binding4[6]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding4[6]).t;
|
||||
CKsXk3 = t.CKsXk3;
|
||||
Reflect.apply(open, value11, [{key: 'collectible shop claim error', content: Reflect.apply(string, intl,
|
||||
[CKsXk3])}]);
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
Reflect.apply(hideActionSheet, value8, []);
|
||||
} catch (error) {
|
||||
binding = env2_1;
|
||||
binding4 = env2_2;
|
||||
value11 = binding(binding4[5]);
|
||||
open = value11.open;
|
||||
binding = env2_0;
|
||||
intl = binding(binding4[6]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding4[6]).t;
|
||||
CKsXk3 = t.CKsXk3;
|
||||
Reflect.apply(open, value11, [{key: 'collectible shop claim error', content: Reflect.apply(string, intl,
|
||||
[CKsXk3])}]);
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
property = binding3[4];
|
||||
} catch (error) {
|
||||
binding = env2_1;
|
||||
binding4 = env2_2;
|
||||
value11 = binding(binding4[5]);
|
||||
open = value11.open;
|
||||
binding = env2_0;
|
||||
intl = binding(binding4[6]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding4[6]).t;
|
||||
CKsXk3 = t.CKsXk3;
|
||||
Reflect.apply(open, value11, [{key: 'collectible shop claim error', content: Reflect.apply(string, intl,
|
||||
[CKsXk3])}]);
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
value9 = binding(property);
|
||||
} catch (error) {
|
||||
binding = env2_1;
|
||||
binding4 = env2_2;
|
||||
value11 = binding(binding4[5]);
|
||||
open = value11.open;
|
||||
binding = env2_0;
|
||||
intl = binding(binding4[6]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding4[6]).t;
|
||||
CKsXk3 = t.CKsXk3;
|
||||
Reflect.apply(open, value11, [{key: 'collectible shop claim error', content: Reflect.apply(string, intl,
|
||||
[CKsXk3])}]);
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
open = value9.open;
|
||||
} catch (error) {
|
||||
binding = env2_1;
|
||||
binding4 = env2_2;
|
||||
value11 = binding(binding4[5]);
|
||||
open = value11.open;
|
||||
binding = env2_0;
|
||||
intl = binding(binding4[6]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding4[6]).t;
|
||||
CKsXk3 = t.CKsXk3;
|
||||
Reflect.apply(open, value11, [{key: 'collectible shop claim error', content: Reflect.apply(string, intl,
|
||||
[CKsXk3])}]);
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
object2 = {};
|
||||
} catch (error) {
|
||||
binding = env2_1;
|
||||
binding4 = env2_2;
|
||||
value11 = binding(binding4[5]);
|
||||
open = value11.open;
|
||||
binding = env2_0;
|
||||
intl = binding(binding4[6]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding4[6]).t;
|
||||
CKsXk3 = t.CKsXk3;
|
||||
Reflect.apply(open, value11, [{key: 'collectible shop claim error', content: Reflect.apply(string, intl,
|
||||
[CKsXk3])}]);
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
} catch (error) {
|
||||
binding = env2_1;
|
||||
binding4 = env2_2;
|
||||
value11 = binding(binding4[5]);
|
||||
open = value11.open;
|
||||
binding = env2_0;
|
||||
intl = binding(binding4[6]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding4[6]).t;
|
||||
CKsXk3 = t.CKsXk3;
|
||||
Reflect.apply(open, value11, [{key: 'collectible shop claim error', content: Reflect.apply(string, intl,
|
||||
[CKsXk3])}]);
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
object2.product = require;
|
||||
} catch (error) {
|
||||
binding = env2_1;
|
||||
binding4 = env2_2;
|
||||
value11 = binding(binding4[5]);
|
||||
open = value11.open;
|
||||
binding = env2_0;
|
||||
intl = binding(binding4[6]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding4[6]).t;
|
||||
CKsXk3 = t.CKsXk3;
|
||||
Reflect.apply(open, value11, [{key: 'collectible shop claim error', content: Reflect.apply(string, intl,
|
||||
[CKsXk3])}]);
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
object2.useCategoryImage = true;
|
||||
} catch (error) {
|
||||
binding = env2_1;
|
||||
binding4 = env2_2;
|
||||
value11 = binding(binding4[5]);
|
||||
open = value11.open;
|
||||
binding = env2_0;
|
||||
intl = binding(binding4[6]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding4[6]).t;
|
||||
CKsXk3 = t.CKsXk3;
|
||||
Reflect.apply(open, value11, [{key: 'collectible shop claim error', content: Reflect.apply(string, intl,
|
||||
[CKsXk3])}]);
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
Reflect.apply(open, value9, [object2]);
|
||||
} catch (error) {
|
||||
binding = env2_1;
|
||||
binding4 = env2_2;
|
||||
value11 = binding(binding4[5]);
|
||||
open = value11.open;
|
||||
binding = env2_0;
|
||||
intl = binding(binding4[6]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding4[6]).t;
|
||||
CKsXk3 = t.CKsXk3;
|
||||
Reflect.apply(open, value11, [{key: 'collectible shop claim error', content: Reflect.apply(string, intl,
|
||||
[CKsXk3])}]);
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
binding = env2_0;
|
||||
} catch (error) {
|
||||
binding = env2_1;
|
||||
binding4 = env2_2;
|
||||
value11 = binding(binding4[5]);
|
||||
open = value11.open;
|
||||
binding = env2_0;
|
||||
intl = binding(binding4[6]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding4[6]).t;
|
||||
CKsXk3 = t.CKsXk3;
|
||||
Reflect.apply(open, value11, [{key: 'collectible shop claim error', content: Reflect.apply(string, intl,
|
||||
[CKsXk3])}]);
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
property = binding3[2];
|
||||
} catch (error) {
|
||||
binding = env2_1;
|
||||
binding4 = env2_2;
|
||||
value11 = binding(binding4[5]);
|
||||
open = value11.open;
|
||||
binding = env2_0;
|
||||
intl = binding(binding4[6]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding4[6]).t;
|
||||
CKsXk3 = t.CKsXk3;
|
||||
Reflect.apply(open, value11, [{key: 'collectible shop claim error', content: Reflect.apply(string, intl,
|
||||
[CKsXk3])}]);
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
value10 = binding(property);
|
||||
} catch (error) {
|
||||
binding = env2_1;
|
||||
binding4 = env2_2;
|
||||
value11 = binding(binding4[5]);
|
||||
open = value11.open;
|
||||
binding = env2_0;
|
||||
intl = binding(binding4[6]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding4[6]).t;
|
||||
CKsXk3 = t.CKsXk3;
|
||||
Reflect.apply(open, value11, [{key: 'collectible shop claim error', content: Reflect.apply(string, intl,
|
||||
[CKsXk3])}]);
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
fetchCollectiblesPurchases = value10.fetchCollectiblesPurchases;
|
||||
} catch (error) {
|
||||
binding = env2_1;
|
||||
binding4 = env2_2;
|
||||
value11 = binding(binding4[5]);
|
||||
open = value11.open;
|
||||
binding = env2_0;
|
||||
intl = binding(binding4[6]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding4[6]).t;
|
||||
CKsXk3 = t.CKsXk3;
|
||||
Reflect.apply(open, value11, [{key: 'collectible shop claim error', content: Reflect.apply(string, intl,
|
||||
[CKsXk3])}]);
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
Reflect.apply(fetchCollectiblesPurchases, value10, []);
|
||||
} catch (error) {
|
||||
binding = env2_1;
|
||||
binding4 = env2_2;
|
||||
value11 = binding(binding4[5]);
|
||||
open = value11.open;
|
||||
binding = env2_0;
|
||||
intl = binding(binding4[6]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding4[6]).t;
|
||||
CKsXk3 = t.CKsXk3;
|
||||
Reflect.apply(open, value11, [{key: 'collectible shop claim error', content: Reflect.apply(string, intl,
|
||||
[CKsXk3])}]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
/* Metro module 7606; source: modules/collectibles/native/useHandleUseNow.tsx; dependencies: [31, 7607, 4080, 5080, 4008, 3857, 1244, 7608, 7622, 2] */
|
||||
function _fun60946(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#60946, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7784:6, offset: 0x01715d75, size: 141 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 */;
|
||||
const env0_4 = (require(7607) /* metro dependency 7607: MainTabsConstants */).MainTabsNavigatorScreens;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/useHandleUseNow.tsx');
|
||||
exports.useHandleUseNow = useHandleUseNow;
|
||||
}
|
||||
|
||||
function useHandleUseNow({product, onSuccess, analyticsLocations}) { // fn#60947, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7784:240, offset: 0x01715e02, size: 230 bytes, params: 2, frame: 22
|
||||
const binding = env0_3;
|
||||
let useCallback = binding.useCallback;
|
||||
const {handleUseNow, isApplying,
|
||||
canUseNow} = (require(7608) /* metro dependency 7608: useHandleUseNow */).useHandleUseNow({product: product,
|
||||
onSuccess: Reflect.apply(useCallback, binding, [_fun60948, [onSuccess]]),
|
||||
onError: binding.useCallback(function() {
|
||||
var defaultImport = importDefault(dependencyMap[5]);
|
||||
var object = {key: 'collectible shop apply error'};
|
||||
object.content = require(dependencyMap[6]).intl.string(require(dependencyMap[6]).t.CKsXk3);
|
||||
defaultImport.open(object);
|
||||
}, [])});
|
||||
let value = importDefault(7622) /* metro dependency 7622: useOpenProfileSettings */;
|
||||
value = value({analyticsLocations: analyticsLocations});
|
||||
useCallback = binding.useCallback;
|
||||
return {handleUseNow: handleUseNow, isApplying: isApplying, canUseNow: canUseNow,
|
||||
handleEditProfile: Reflect.apply(useCallback, binding, [_fun60950, [value, onSuccess]])};
|
||||
}
|
||||
|
||||
function _fun60948() { // fn#60948, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7784:310, offset: 0x01715ee8, size: 156 bytes, params: 1, frame: 15
|
||||
var rootNavigationRef;
|
||||
if (onSuccess == null) {
|
||||
value = environment.__proto__;
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).popAll();
|
||||
rootNavigationRef = (require(4008) /* metro dependency 4008: RootNavigationRefNative */).getRootNavigationRef();
|
||||
if (rootNavigationRef != null && rootNavigationRef.isReady()) {
|
||||
rootNavigationRef.navigate(MainTabsNavigatorScreens.YOU);
|
||||
}
|
||||
} else {
|
||||
onSuccess();
|
||||
}
|
||||
}
|
||||
|
||||
function _fun60950() { // fn#60950, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7784:809, offset: 0x01715fed, size: 90 bytes, params: 1, frame: 13
|
||||
var value;
|
||||
env0_1();
|
||||
if (onSuccess == null) {
|
||||
value = environment.__proto__;
|
||||
value = importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */;
|
||||
value.hideActionSheet();
|
||||
value = importDefault(5080) /* metro dependency 5080: ModalActionCreators */;
|
||||
value.popAll();
|
||||
} else {
|
||||
onSuccess();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
/* Metro module 10105; source: modules/collectibles/native/useOpenNitroSubscribeActionSheet.tsx; dependencies: [31, 661, 1880, 6771, 7040, 2] */
|
||||
function _fun78896(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78896, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10291:6, offset: 0x01e3b0df, size: 171 bytes, params: 8, frame: 18
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importAll(31) /* metro dependency 31 */;
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_3 = constantsModule.AnalyticsPages;
|
||||
const env0_4 = constantsModule.AnalyticsSections;
|
||||
const env0_5 = (require(1880) /* metro dependency 1880: PremiumConstants */).PremiumTypes;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/useOpenNitroSubscribeActionSheet.tsx');
|
||||
exports.default = _default_78897;
|
||||
}
|
||||
|
||||
function _default_78897() { // fn#78897, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10291:189, offset: 0x01e3b18a, size: 105 bytes, params: 1, frame: 16
|
||||
const value = a0;
|
||||
return env0_2.useCallback(_fun78898,
|
||||
[(importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().analyticsLocations,
|
||||
value !== undefined ? value : AnalyticsSections.COLLECTIBLES_SHOP]);
|
||||
}
|
||||
|
||||
function _fun78898() { // fn#78898, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10291:272, offset: 0x01e3b1f3, size: 92 bytes, params: 1, frame: 15
|
||||
const defaultImport = importDefault(7040) /* metro dependency 7040: openPremiumPlanSelectionActionSheet */;
|
||||
const COLLECTIBLES_SHOP = AnalyticsPages.COLLECTIBLES_SHOP;
|
||||
const TIER_2 = PremiumTypes.TIER_2;
|
||||
defaultImport({analyticsLocation: {page: COLLECTIBLES_SHOP, section: env0_0},
|
||||
analyticsLocations: analyticsLocations, premiumType: TIER_2});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
/* Metro module 14037; source: modules/collectibles/native/useShopOrientationLock.tsx; dependencies: [31, 1581, 7717, 2] */
|
||||
function _fun106445(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#106445, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14234:6, offset: 0x022dc249, size: 118 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/collectibles/native/useShopOrientationLock.tsx');
|
||||
exports.useShopOrientationLock = useShopOrientationLock;
|
||||
}
|
||||
|
||||
function useShopOrientationLock() { // fn#106446, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14234:223, offset: 0x022dc2bf, size: 51 bytes, params: 1, frame: 13
|
||||
const binding = env0_2;
|
||||
const env0_0 = binding.useRef(false);
|
||||
binding.useEffect(_fun106447, []);
|
||||
}
|
||||
|
||||
function _fun106447() { // fn#106447, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14234:260, offset: 0x022dc2f2, size: 125 bytes, params: 1, frame: 15
|
||||
const metaQuestUtilsAndroidModule = require(1581) /* metro dependency 1581: MetaQuestUtilsAndroid */;
|
||||
if (metaQuestUtilsAndroidModule.isMetaQuest()) {
|
||||
return undefined;
|
||||
}
|
||||
if (env1_3 === 0) {
|
||||
(require(7717) /* metro dependency 7717: DeviceOrientation */).lockOrientation('PORTRAIT', true);
|
||||
}
|
||||
env0_0.current = true;
|
||||
const binding = env1_3;
|
||||
env1_3 = typeof binding === 'bigint' ? binding + 1n : +binding + 1;
|
||||
return _fun106448;
|
||||
}
|
||||
|
||||
function _fun106448() { // fn#106448, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14234:361, offset: 0x022dc36f, size: 93 bytes, params: 1, frame: 13
|
||||
var value2;
|
||||
var binding;
|
||||
if (env1_0.current) {
|
||||
value2 = environment.__proto__.__proto__;
|
||||
binding = env2_3;
|
||||
if ((typeof binding === 'bigint' ? binding - 1n : +binding - 1) === 0) {
|
||||
(require(7717) /* metro dependency 7717: DeviceOrientation */).unlockOrientation({unlockAfterRotatingToPreviousLock: false});
|
||||
}
|
||||
env1_0.current = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
/* Metro module 10027; source: modules/collectibles/native/useWishlistNUXActionSheet.tsx; dependencies: [31, 5189, 1226, 1376, 566, 3968, 1365, 1367, 4080, 10028, 1962, 2] */
|
||||
function _fun78320(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78320, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10213:6, offset: 0x01e25684, size: 192 bytes, params: 8, frame: 20
|
||||
const env0_0 = require;
|
||||
const closure = useHasNeverWishlisted;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const userProfileStore = importDefault(5189) /* metro dependency 5189: UserProfileStore */;
|
||||
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
|
||||
const env0_6 = (require(1376) /* metro dependency 1376: DismissibleContentConstants */).ContentDismissActionType;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/useWishlistNUXActionSheet.tsx');
|
||||
exports.default = useWishlistNUXActionSheet;
|
||||
exports.useHasNeverWishlisted = closure;
|
||||
}
|
||||
|
||||
function useHasNeverWishlisted() { // fn#78321, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10213:161, offset: 0x01e25744, size: 150 bytes, params: 1, frame: 19
|
||||
const env0_0 = (require(566) /* metro dependency 566: flux */).useStateFromStores([AuthenticationStore],
|
||||
function() {
|
||||
return AuthenticationStore.getId();
|
||||
});
|
||||
return (require(566) /* metro dependency 566: flux */).useStateFromStores([UserProfileStore],
|
||||
_fun78324) && (require(566) /* metro dependency 566: flux */).useStateFromStores([UserProfileStore],
|
||||
function() {
|
||||
return UserProfileStore.getFirstWishlistId(id);
|
||||
}) == null;
|
||||
}
|
||||
|
||||
function useWishlistNUXActionSheet() { // fn#78325, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10213:529, offset: 0x01e25825, size: 116 bytes, params: 1, frame: 17
|
||||
const value2 = useHasNeverWishlisted();
|
||||
const dismissibleContentUnsafeUtilsModule = require(3968) /* metro dependency 3968: DismissibleContentUnsafeUtils */;
|
||||
const UNSAFE_useIsDismissibleContentDismissed = dismissibleContentUnsafeUtilsModule.UNSAFE_useIsDismissibleContentDismissed;
|
||||
const DismissibleContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent;
|
||||
const WISHLIST_MOBILE_NUX_ACTION_SHEET = DismissibleContent.WISHLIST_MOBILE_NUX_ACTION_SHEET;
|
||||
const value3 = Reflect.apply(UNSAFE_useIsDismissibleContentDismissed, dismissibleContentUnsafeUtilsModule,
|
||||
[WISHLIST_MOBILE_NUX_ACTION_SHEET]);
|
||||
const object2 = {};
|
||||
object2.shouldShowWishlistNUXActionSheet = value2 && !value3;
|
||||
object2.showWishlistNUXActionSheet = env0_3.useCallback(_fun78326, []);
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun78324() { // fn#78324, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10213:351, offset: 0x01e257f5, size: 48 bytes, params: 1, frame: 11
|
||||
let value = environment.__proto__;
|
||||
value = UserProfileStore.getUserProfile(id);
|
||||
return value != null && value.fetchEndedAt > 0;
|
||||
}
|
||||
|
||||
function _fun78326(a0) { // fn#78326, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10213:795, offset: 0x01e25899, size: 213 bytes, params: 2, frame: 22
|
||||
const moduleValue = require(dependencyMap[7]);
|
||||
const trackDismissibleContentShown = moduleValue.trackDismissibleContentShown;
|
||||
const DismissibleContent = require(dependencyMap[6]).DismissibleContent;
|
||||
let WISHLIST_MOBILE_NUX_ACTION_SHEET = DismissibleContent.WISHLIST_MOBILE_NUX_ACTION_SHEET;
|
||||
Reflect.apply(trackDismissibleContentShown, moduleValue, [WISHLIST_MOBILE_NUX_ACTION_SHEET]);
|
||||
const defaultImport = importDefault(dependencyMap[8]);
|
||||
defaultImport.openLazy(require(dependencyMap[10])(dependencyMap[9], dependencyMap.paths),
|
||||
'WishlistNUXAddedItemActionSheet', {product: a0}, 'stack');
|
||||
const moduleValue3 = require(dependencyMap[5]);
|
||||
const UNSAFE_markDismissibleContentAsDismissed = moduleValue3.UNSAFE_markDismissibleContentAsDismissed;
|
||||
WISHLIST_MOBILE_NUX_ACTION_SHEET = DismissibleContent.WISHLIST_MOBILE_NUX_ACTION_SHEET;
|
||||
const USER_DISMISS = ContentDismissActionType.USER_DISMISS;
|
||||
Reflect.apply(UNSAFE_markDismissibleContentAsDismissed, moduleValue3, [WISHLIST_MOBILE_NUX_ACTION_SHEET,
|
||||
{dismissAction: USER_DISMISS, forceTrack: true}]);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user