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

No files matched your search

@@ -1,101 +1,146 @@
/* Metro module 7017; source: modules/checkout/native/GiftCardMobileConsumptionActionSheet.tsx; dependencies: [31, 27, 1376, 33, 4501, 697, 1585, 4080, 6275, 4572, 5473, 4573, 1244, 2030, 4578, 2] */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UseSafeAreaInsetsNative from '../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import GiftCardMessages from '../messages/GiftCard.messages.js'; /* Metro dependency 2030 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as DismissibleContentConstantsModule from '../../dismissible_content/DismissibleContentConstants.tsx'; /* Metro dependency 1376 */
import * as StackNativeModule from '../../../design/components/Stack/native/Stack.native.tsx'; /* Metro dependency 4572 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ButtonNativeModule from '../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as NativeModule from '../../../design/assets/native.tsx'; /* Metro dependency 5473 */
import * as BottomSheetNativeModule from '../../../design/components/Sheet/native/BottomSheet.native.tsx'; /* Metro dependency 6275 */
function _fun55598(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#55598, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7195:6, offset: 0x013ab49f, size: 345 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(27) /* metro dependency 27 */).View;
const env0_5 = (require(1376) /* metro dependency 1376: DismissibleContentConstants */).ContentDismissActionType;
let value = require(33) /* metro dependency 33 */;
let value = JsxRuntimeModule;
const env0_6 = value.jsx;
const env0_7 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object2.sheet = {backgroundColor: BACKGROUND_BASE_LOW};
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.container = {paddingHorizontal: PX_16};
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object2.illustration = {'alignSelf': 'stretch', 'alignItems': 'center', paddingTop: PX_12};
object2.body = {'textAlign': 'center', 'fontFamily': 'gg sans', 'fontSize': 16, 'fontWeight': 600, 'lineHeight': 20,
object = {};
const BACKGROUND_BASE_LOW = (Native).colors.BACKGROUND_BASE_LOW;
object.sheet = {backgroundColor: BACKGROUND_BASE_LOW};
const PX_16 = (Native).space.PX_16;
object.container = {paddingHorizontal: PX_16};
const PX_12 = (Native).space.PX_12;
object.illustration = {'alignSelf': 'stretch', 'alignItems': 'center', paddingTop: PX_12};
object.body = {'textAlign': 'center', 'fontFamily': 'gg sans', 'fontSize': 16, 'fontWeight': 600, 'lineHeight': 20,
'alignSelf': 'center', 'width': 280};
const env0_8 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/checkout/native/GiftCardMobileConsumptionActionSheet.tsx');
const env0_8 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/checkout/native/GiftCardMobileConsumptionActionSheet.tsx');
exports.default = GiftCardMobileConsumptionActionSheet;
}
function GiftCardMobileConsumptionActionSheet({markAsDismissed}) { // fn#55599, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7195:630, offset: 0x013ab5f8, size: 600 bytes, params: 2, frame: 30
const styles = useStyles();
const bottom = (UseSafeAreaInsetsNative)().bottom;
const binding = env0_3;
const env0_1 = binding.useRef(false);
const env0_2 = binding.useRef(markAsDismissed);
binding.useEffect(_fun55600, [markAsDismissed]);
binding.useEffect(function() {
return _fun55602;
}, []);
var env0_3 = binding.useCallback(_fun55603, [markAsDismissed]);
const BottomSheet = (BottomSheetNativeModule).BottomSheet;
const bottomSheetProps = {startExpanded: true, backgroundStyles: styles.sheet, onDismiss: onDismiss_55604};
const items3 = [styles.container];
items3[1] = {paddingBottom: bottom};
const Stack = (StackNativeModule).Stack;
const PX_16 = (Native).space.PX_16;
const LaptopSpotIllustration = (NativeModule).LaptopSpotIllustration;
const items2 = [
<View style={styles.illustration}>
<LaptopSpotIllustration
scale={1}
width={150}
height={123}
/>
</View>,
];
const Text = (TextModule).Text;
const intl = (IndexNativeModule).intl;
let string = intl.string;
const V3DI1E = (GiftCardMessages).V3DI1E;
items2[1] = (
<Text
variant="text-md/medium"
color="text-default"
style={styles.body}
>
{Reflect.apply(string, intl, [V3DI1E])}
</Text>
);
const Button = (ButtonNativeModule).Button;
string = intl.string;
const YZePWx = (GiftCardMessages).YZePWx;
items2[2] = (
<Button
size="lg"
variant="secondary"
grow
text={Reflect.apply(string, intl, [YZePWx])}
onPress={onPress_55605}
/>
);
return (
<BottomSheet {...bottomSheetProps}>
<View style={items3}>
<Stack spacing={PX_16}>
{items2}
</Stack>
</View>
</BottomSheet>
);
function _fun55600() { // fn#55600, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7195:768, offset: 0x010cb3d0, size: 21 bytes, params: 1, frame: 2
env0_2.current = markAsDismissed;
}
function GiftCardMobileConsumptionActionSheet({markAsDismissed}) { // fn#55599, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7195:630, offset: 0x013ab5f8, size: 600 bytes, params: 2, frame: 30
const styles = useStyles();
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
const binding = env0_3;
const env0_1 = binding.useRef(false);
const env0_2 = binding.useRef(markAsDismissed);
binding.useEffect(_fun55600, [markAsDismissed]);
binding.useEffect(function() {
return _fun55602;
}, []);
var env0_3 = binding.useCallback(_fun55603, [markAsDismissed]);
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
const bottomSheetProps = {startExpanded: true, backgroundStyles: styles.sheet, onDismiss: onDismiss_55604};
const items3 = [styles.container];
items3[1] = {paddingBottom: bottom};
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
const LaptopSpotIllustration = (require(5473) /* metro dependency 5473: native */).LaptopSpotIllustration;
const items2 = [<View style={styles.illustration}><LaptopSpotIllustration scale={1} width={150} height={123} /></View>];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const V3DI1E = (importDefault(2030) /* metro dependency 2030: GiftCardMessages */).V3DI1E;
items2[1] = <Text variant="text-md/medium" color="text-default" style={styles.body}>{Reflect.apply(string, intl,
[V3DI1E])}</Text>;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
string = intl.string;
const YZePWx = (importDefault(2030) /* metro dependency 2030: GiftCardMessages */).YZePWx;
items2[2] = <Button size="lg" variant="secondary" grow text={Reflect.apply(string, intl,
[YZePWx])} onPress={onPress_55605} />;
return (
<BottomSheet {...bottomSheetProps}>
<View style={items3}>
<Stack spacing={PX_16}>
{items2}
</Stack>
</View>
</BottomSheet>
);
}
function _fun55601() { // fn#55601, offset: 0x013ab850, size: 9 bytes, params: 1, frame: 1
return _fun55602;
function _fun55602() { // fn#55602, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7195:809, offset: 0x013ab859, 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]);
}
}
function _fun55601() { // fn#55601, offset: 0x013ab850, size: 9 bytes, params: 1, frame: 1
return _fun55602;
}
}
function _fun55603(a0) { // fn#55603, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7195:878, offset: 0x013ab887, size: 78 bytes, params: 2, frame: 12
var value;
if (!env0_1.current) {
env0_1.current = true;
markAsDismissed(a0);
value = environment.__proto__;
value = importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */;
value.hideActionSheet();
}
}
function _fun55603(a0) { // fn#55603, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7195:878, offset: 0x013ab887, size: 78 bytes, params: 2, frame: 12
var value;
if (!env0_1.current) {
env0_1.current = true;
markAsDismissed(a0);
value = environment.__proto__;
value = importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */;
value.hideActionSheet();
}
}
function GiftCardMobileConsumptionActionSheetOnDismiss() { // fn#55604, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7195:1028, owner: GiftCardMobileConsumptionActionSheet.onDismiss, offset: 0x013ab8d5, size: 29 bytes, params: 1, frame: 11
const binding = env0_3;
const USER_DISMISS = ContentDismissActionType.USER_DISMISS;
return binding(USER_DISMISS);
}
function GiftCardMobileConsumptionActionSheetOnDismiss() { // fn#55604, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7195:1028, owner: GiftCardMobileConsumptionActionSheet.onDismiss, offset: 0x013ab8d5, size: 29 bytes, params: 1, frame: 11
const binding = env0_3;
const USER_DISMISS = ContentDismissActionType.USER_DISMISS;
return binding(USER_DISMISS);
}
function GiftCardMobileConsumptionActionSheetOnPress() { // fn#55605, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7195:1502, owner: GiftCardMobileConsumptionActionSheet.onPress, offset: 0x013ab8d5, size: 29 bytes, params: 1, frame: 11
const binding = env0_3;
const USER_DISMISS = ContentDismissActionType.USER_DISMISS;
return binding(USER_DISMISS);
}
function _fun55602() { // fn#55602, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7195:809, offset: 0x013ab859, 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]);
}
}
global.__d(_fun55598, 7017, [31, 27, 1376, 33, 4501, 697, 1585, 4080, 6275, 4572, 5473, 4573, 1244, 2030, 4578,
2]) /* metro module 7017, dependencies: [31, 27, 1376, 33, 4501, 697, 1585, 4080, 6275, 4572, 5473, 4573, 1244, 2030, 4578, 2] */;
@@ -1,57 +1,62 @@
/* Metro module 7042; source: modules/checkout/native/NativeCheckoutStore.tsx; dependencies: [57, 7043, 7045, 3769, 685, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import OrderRecord from '../../payments/records/OrderRecord.tsx'; /* Metro dependency 7043 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as Module00685Module from '../../../by-id/module-00685.js'; /* Metro dependency 685 */
function _fun55907(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#55907, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7220:6, offset: 0x013b7fe7, size: 175 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importDefault(57) /* metro dependency 57 */;
const orderRecord = importDefault(7043) /* metro dependency 7043: OrderRecord */;
let value = Module00057;
value = value((importDefault(7045) /* metro dependency 7045: ContextUtils */)(), 2);
const property = value[0];
const env0_3 = value[1];
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/checkout/native/NativeCheckoutStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/checkout/native/NativeCheckoutStore.tsx');
exports.useNativeCheckoutStore = useNativeCheckoutStore;
exports.createNativeStore = createNativeStore;
exports.NativeCheckoutStoreContext = property;
function useNativeCheckoutStore(a0) { // fn#55908, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7220:253, offset: 0x013b8096, size: 60 bytes, params: 2, frame: 14
const value = a1;
return env0_3()(a0, value !== undefined ? value : (require(3769) /* metro dependency 3769 */).shallow);
}
function createNativeStore({order, checkoutInitParameters, contextMetadata}) { // fn#55909, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7220:343, offset: 0x013b80d2, size: 97 bytes, params: 2, frame: 16
return Module00685Module.createWithEqualityFn(function(a0, a1) {
var env0_0 = a0;
var env0_1 = a1;
var orderBinding = order;
var value2 = null;
return {orderRecord: value2 != orderBinding ? OrderRecord.createFromServer(order) : value2, setOrder: _fun55911,
getCheckoutContextRecord: _fun55912, checkoutInitParameters: checkoutInitParameters,
contextMetadata: contextMetadata};
}, (require(3769) /* metro dependency 3769 */).shallow);
function _fun55910(a0, a1) { // fn#55910, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7220:461, offset: 0x013b8133, size: 101 bytes, params: 3, frame: 15
const env0_0 = a0;
const env0_1 = a1;
const orderBinding = order;
const value2 = null;
return {orderRecord: value2 != orderBinding ? OrderRecord.createFromServer(order) : value2, setOrder: setOrder,
getCheckoutContextRecord: getCheckoutContextRecord, checkoutInitParameters: checkoutInitParameters,
contextMetadata: contextMetadata};
function setOrder(a0) { // fn#55911, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7220:526, offset: 0x013b8198, size: 44 bytes, params: 2, frame: 13
const binding = env0_0;
const object = {};
object.orderRecord = OrderRecord.createFromServer(a0);
return binding(object);
}
function getCheckoutContextRecord() { // fn#55912, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7220:593, offset: 0x013b81c4, size: 36 bytes, params: 1, frame: 10
const orderRecord = require().orderRecord;
const value = null;
return value != orderRecord ? orderRecord.checkoutContextRecord : value;
}
}
}
}
function useNativeCheckoutStore(a0) { // fn#55908, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7220:253, offset: 0x013b8096, size: 60 bytes, params: 2, frame: 14
const value = a1;
return env0_3()(a0, value !== undefined ? value : (require(3769) /* metro dependency 3769 */).shallow);
}
function createNativeStore({order, checkoutInitParameters, contextMetadata}) { // fn#55909, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7220:343, offset: 0x013b80d2, size: 97 bytes, params: 2, frame: 16
const value = require(685) /* metro dependency 685 */;
return value.createWithEqualityFn(function(a0, a1) {
var env0_0 = a0;
var env0_1 = a1;
var orderBinding = order;
var value2 = null;
return {orderRecord: value2 != orderBinding ? OrderRecord.createFromServer(order) : value2, setOrder: _fun55911,
getCheckoutContextRecord: _fun55912, checkoutInitParameters: checkoutInitParameters,
contextMetadata: contextMetadata};
}, (require(3769) /* metro dependency 3769 */).shallow);
}
function _fun55910(a0, a1) { // fn#55910, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7220:461, offset: 0x013b8133, size: 101 bytes, params: 3, frame: 15
const env0_0 = a0;
const env0_1 = a1;
const orderBinding = order;
const value2 = null;
return {orderRecord: value2 != orderBinding ? OrderRecord.createFromServer(order) : value2, setOrder: setOrder,
getCheckoutContextRecord: getCheckoutContextRecord, checkoutInitParameters: checkoutInitParameters,
contextMetadata: contextMetadata};
}
function setOrder(a0) { // fn#55911, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7220:526, offset: 0x013b8198, size: 44 bytes, params: 2, frame: 13
const binding = env0_0;
const object2 = {};
object2.orderRecord = OrderRecord.createFromServer(a0);
return binding(object2);
}
function getCheckoutContextRecord() { // fn#55912, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7220:593, offset: 0x013b81c4, size: 36 bytes, params: 1, frame: 10
const orderRecord = require().orderRecord;
const value = null;
return value != orderRecord ? orderRecord.checkoutContextRecord : value;
}
global.__d(_fun55907, 7042, [57, 7043, 7045, 3769, 685,
2]) /* metro module 7042, dependencies: [57, 7043, 7045, 3769, 685, 2] */;
@@ -1,40 +1,56 @@
/* Metro module 7678; source: modules/checkout/native/gifting/LockedRecipientField.tsx; dependencies: [31, 27, 33, 4501, 697, 1305, 4573, 3995, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UserUtils from '../../../../utils/UserUtils.tsx'; /* Metro dependency 3995 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as NativeModule from '../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
function _fun61347(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#61347, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7856:6, offset: 0x01b3bec0, size: 270 bytes, params: 8, frame: 22
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;
let value = require(33) /* metro dependency 33 */;
ReactModule;
let value = JsxRuntimeModule;
const env0_4 = value.jsx;
const env0_5 = 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 = {'flexDirection': 'row', 'alignItems': 'center', marginLeft: PX_16};
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.avatar = {marginEnd: PX_8};
const env0_6 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/checkout/native/gifting/LockedRecipientField.tsx');
object = {};
const PX_16 = (Native).space.PX_16;
object.container = {'flexDirection': 'row', 'alignItems': 'center', marginLeft: PX_16};
const PX_8 = (Native).space.PX_8;
object.avatar = {marginEnd: PX_8};
const env0_6 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/checkout/native/gifting/LockedRecipientField.tsx');
exports.default = LockedRecipientField;
function LockedRecipientField({user}) { // fn#61348, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7856:393, offset: 0x01b3bfce, size: 209 bytes, params: 2, frame: 22
const styles = useStyles();
const Avatar = (NativeModule).Avatar;
const AvatarSizes = (NativeModule).AvatarSizes;
const NORMAL = AvatarSizes.NORMAL;
const avatar = (
<Avatar
style={styles.avatar}
user={user}
guildId={undefined}
size={NORMAL}
/>
);
const Text = (TextModule).Text;
return (
<View style={styles.container}>
{avatar}
<Text variant="text-md/semibold">
{(UserUtils).getName(user)}
</Text>
</View>
);
}
}
function LockedRecipientField({user}) { // fn#61348, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7856:393, offset: 0x01b3bfce, size: 209 bytes, params: 2, frame: 22
const styles = useStyles();
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
const NORMAL = AvatarSizes.NORMAL;
const avatar = <Avatar style={styles.avatar} user={user} guildId={undefined} size={NORMAL} />;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<View style={styles.container}>
{avatar}
<Text variant="text-md/semibold">
{(importDefault(3995) /* metro dependency 3995: UserUtils */).getName(user)}
</Text>
</View>
);
}
global.__d(_fun61347, 7678, [31, 27, 33, 4501, 697, 1305, 4573, 3995,
2]) /* metro module 7678, dependencies: [31, 27, 33, 4501, 697, 1305, 4573, 3995, 2] */;
@@ -1,11 +1,17 @@
/* Metro module 7679; source: modules/checkout/native/gifting/SelectedUserField.tsx; dependencies: [31, 27, 33, 4501, 697, 6992, 1244, 3995, 6998, 1305, 4573, 6988, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as InputFieldContainerNativeModule from '../../../../design/components/Input/native/InputFieldContainer.native.tsx'; /* Metro dependency 6992 */
import * as MagnifyingGlassIconModule from '../../../../design/components/Icon/native/redesign/generated/MagnifyingGlassIcon.tsx'; /* Metro dependency 6998 */
function _fun61349(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#61349, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7857:6, offset: 0x01b3c09f, size: 495 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 */;
ReactModule;
let value = ReactNativeModule;
const env0_3 = value.Pressable;
const env0_4 = value.View;
value = require(33) /* metro dependency 33 */;
@@ -13,74 +19,113 @@ function _fun61349(global, require, importDefault, importAll, module, exports, d
const env0_6 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object = {};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.container = {marginHorizontal: PX_16};
object2.content = {'flexDirection': 'row', 'overflow': 'hidden', 'alignItems': 'center', 'display': 'flex'};
object.container = {marginHorizontal: PX_16};
object.content = {'flexDirection': 'row', 'overflow': 'hidden', 'alignItems': 'center', 'display': 'flex'};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.opener = {'flexDirection': 'row', 'alignItems': 'center', 'flex': 1, 'paddingHorizontal': null,
object.opener = {'flexDirection': 'row', 'alignItems': 'center', 'flex': 1, 'paddingHorizontal': null,
'paddingVertical': 6, paddingHorizontal: PX_16};
object2.openerWithClearButton = {paddingRight: 0};
object.openerWithClearButton = {paddingRight: 0};
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.searchIcon = {marginRight: PX_8};
const object3 = {'flexDirection': 'row', 'alignItems': 'center', 'backgroundColor': null, 'borderRadius': null,
object.searchIcon = {marginRight: PX_8};
const object5 = {'flexDirection': 'row', 'alignItems': 'center', 'backgroundColor': null, 'borderRadius': null,
'paddingVertical': 6, 'paddingHorizontal': 6};
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object3.backgroundColor = BACKGROUND_SURFACE_HIGH;
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object2.userPill = object3;
object2.userPillText = {marginLeft: 6};
const object4 = {'alignItems': 'center', 'justifyContent': 'center', 'minWidth': 44, 'minHeight': 44};
object5.backgroundColor = BACKGROUND_SURFACE_HIGH;
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object.userPill = object5;
object.userPillText = {marginLeft: 6};
const object6 = {'alignItems': 'center', 'justifyContent': 'center', 'minWidth': 44, 'minHeight': 44};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.paddingRight = PX_16;
object6.paddingRight = PX_16;
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object4.paddingLeft = PX_8;
object2.clearButton = object4;
const env0_7 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/checkout/native/gifting/SelectedUserField.tsx');
object6.paddingLeft = PX_8;
object.clearButton = object6;
const env0_7 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/checkout/native/gifting/SelectedUserField.tsx');
exports.default = SelectedUserField;
}
function SelectedUserField({selectedUser, onPress, setSelectedUser}) { // fn#61350, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7857:964, offset: 0x01b3c28e, size: 1026 bytes, params: 2, frame: 39
var r9;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
var formatToPlainString;
var property;
var object;
var value;
const styles = useStyles();
const InputFieldContainer = (require(6992) /* metro dependency 6992: InputFieldContainerNative */).InputFieldContainer;
const items2 = [styles.opener];
items2[1] = selectedUser != null && styles.openerWithClearButton;
const r11 = selectedUser != null ? '' + intl.string((require(1244) /* metro dependency 1244: indexNative */).t.xFn72s) + ', ' + (importDefault(3995) /* metro dependency 3995: UserUtils */).getName(selectedUser) : '' + intl.string(t.xFn72s) + ', ' + intl.string(t.R0vK0N);
const MagnifyingGlassIcon = (require(6998) /* metro dependency 6998: MagnifyingGlassIcon */).MagnifyingGlassIcon;
const pressable = <Pressable style={items2} onPress={onPress} accessibilityRole="button" accessibilityLabel={r11}><MagnifyingGlassIcon style={styles.searchIcon} size="xs" color="interactive-text-default" />{selectedUser != null ? <View style={styles.userPill}>{((Avatar) => <Avatar user={selectedUser} guildId={undefined} size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.XSMALL_20} />)((require(1305) /* metro dependency 1305: native */).Avatar)}<Text variant="text-md/medium" style={styles.userPillText}>{(importDefault(3995) /* metro dependency 3995: UserUtils */).getName(selectedUser)}</Text></View> : <Text variant="text-sm/semibold" color="text-subtle" style={styles.userPillText}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.R0vK0N)}</Text>}</Pressable>;
if (selectedUser != null) {
var pressableBindingProps = {style: styles.clearButton, onPress: function() {
return setSelectedUser(undefined);
}, accessibilityRole: 'button'};
formatToPlainString = intl.formatToPlainString;
property = (require(1244) /* metro dependency 1244: indexNative */).t['0Vb9FQ'];
object = {};
value = importDefault(3995) /* metro dependency 3995: UserUtils */;
object.text = value.getName(selectedUser);
pressableBindingProps.accessibilityLabel = Reflect.apply(formatToPlainString, intl, [property, object]);
value = <Pressable {...pressableBindingProps}>{((CircleXIcon) => <CircleXIcon size="xs" />)((require(6988) /* metro dependency 6988: CircleXIcon */).CircleXIcon)}</Pressable>;
r9 = value;
} else {
r9 = null;
function SelectedUserField({selectedUser, onPress, setSelectedUser}) { // fn#61350, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7857:964, offset: 0x01b3c28e, size: 1026 bytes, params: 2, frame: 39
var r9;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const Text = (TextModule).Text;
var formatToPlainString;
var property;
var object2;
var value;
const styles = useStyles();
const InputFieldContainer = (InputFieldContainerNativeModule).InputFieldContainer;
const items2 = [styles.opener];
items2[1] = selectedUser != null && styles.openerWithClearButton;
const r11 = selectedUser != null ? '' + intl.string((require(1244) /* metro dependency 1244: indexNative */).t.xFn72s) + ', ' + (importDefault(3995) /* metro dependency 3995: UserUtils */).getName(selectedUser) : '' + intl.string(t.xFn72s) + ', ' + intl.string(t.R0vK0N);
const MagnifyingGlassIcon = (MagnifyingGlassIconModule).MagnifyingGlassIcon;
const pressable = (
<Pressable
style={items2}
onPress={onPress}
accessibilityRole="button"
accessibilityLabel={r11}
>
<MagnifyingGlassIcon
style={styles.searchIcon}
size="xs"
color="interactive-text-default"
/>
{
selectedUser != null
? (
<View style={styles.userPill}>
{((Avatar) => <Avatar user={selectedUser} guildId={undefined} size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.XSMALL_20} />)((require(1305) /* metro dependency 1305: native */).Avatar)}
<Text variant="text-md/medium" style={styles.userPillText}>
{(importDefault(3995) /* metro dependency 3995: UserUtils */).getName(selectedUser)}
</Text>
</View>
)
: (
<Text
variant="text-sm/semibold"
color="text-subtle"
style={styles.userPillText}
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.R0vK0N)}
</Text>
)
}
</Pressable>
);
if (selectedUser != null) {
var pressableBindingProps = {style: styles.clearButton, onPress: function() {
return setSelectedUser(undefined);
}, accessibilityRole: 'button'};
formatToPlainString = intl.formatToPlainString;
property = (require(1244) /* metro dependency 1244: indexNative */).t['0Vb9FQ'];
object2 = {};
value = importDefault(3995) /* metro dependency 3995: UserUtils */;
object2.text = value.getName(selectedUser);
pressableBindingProps.accessibilityLabel = Reflect.apply(formatToPlainString, intl, [property, object2]);
value = (
<Pressable {...pressableBindingProps}>
{((CircleXIcon) => <CircleXIcon size="xs" />)((require(6988) /* metro dependency 6988: CircleXIcon */).CircleXIcon)}
</Pressable>
);
r9 = value;
} else {
r9 = null;
}
return (
<View style={styles.container}>
<InputFieldContainer>
<View style={styles.content}>
{pressable}
{r9}
</View>
</InputFieldContainer>
</View>
);
}
return (
<View style={styles.container}>
<InputFieldContainer>
<View style={styles.content}>
{pressable}
{r9}
</View>
</InputFieldContainer>
</View>
);
}
global.__d(_fun61349, 7679, [31, 27, 33, 4501, 697, 6992, 1244, 3995, 6998, 1305, 4573, 6988,
2]) /* metro module 7679, dependencies: [31, 27, 33, 4501, 697, 6992, 1244, 3995, 6998, 1305, 4573, 6988, 2] */;
@@ -1,84 +1,94 @@
/* Metro module 7637; source: modules/checkout/native/gifting/UnifiedGiftModal.tsx; dependencies: [57, 31, 33, 5080, 5280, 7638, 1244, 5282, 7639, 7689, 6771, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import ModalActionCreators from '../../../../actions/ModalActionCreators.tsx'; /* Metro dependency 5080 */
import UnifiedGiftModalDetailsScreen from './UnifiedGiftModalDetailsScreen.tsx'; /* Metro dependency 7639 */
import UnifiedGiftModalRecipientSelectScreen from './UnifiedGiftModalRecipientSelectScreen.tsx'; /* Metro dependency 7689 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as NavigatorNativeModule from '../../../../design/components/Navigator/native/Navigator.native.tsx'; /* Metro dependency 5280 */
import * as UseAnalyticsLocationsModule from '../../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
import * as UnifiedGiftModalTypesModule from './UnifiedGiftModalTypes.tsx'; /* Metro dependency 7638 */
function _fun61158(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#61158, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7815:6, offset: 0x0171c2f5, size: 156 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(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/checkout/native/gifting/UnifiedGiftModal.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/checkout/native/gifting/UnifiedGiftModal.tsx');
exports.default = UnifiedGiftModal;
}
function UnifiedGiftModal(a0) { // fn#61159, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7815:227, offset: 0x0171c391, size: 209 bytes, params: 2, frame: 19
const skuId = a0.skuId;
const applicationId = a0.applicationId;
const analyticsLocations = a0.analyticsLocations;
const value = useScreens({skuId: skuId, applicationId: applicationId, lockedRecipientUser: a0.lockedRecipientUser,
onGiftModalDismiss: a0.onGiftModalDismiss, validateRecipient: a0.validateRecipient,
renderProductDetails: a0.renderProductDetails, renderPurchaseSection: a0.renderPurchaseSection});
const AnalyticsLocationProvider = (UseAnalyticsLocationsModule).AnalyticsLocationProvider;
const Navigator = (NavigatorNativeModule).Navigator;
const UnifiedGiftModalScreens = (UnifiedGiftModalTypesModule).UnifiedGiftModalScreens;
const GIFT_DETAIL = UnifiedGiftModalScreens.GIFT_DETAIL;
return (
<AnalyticsLocationProvider value={analyticsLocations}>
<Navigator initialRouteName={GIFT_DETAIL} screens={value} />
</AnalyticsLocationProvider>
);
function useScreens({skuId, applicationId, lockedRecipientUser, onGiftModalDismiss, validateRecipient, renderProductDetails, renderPurchaseSection}) { // fn#61160, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7815:417, owner: UnifiedGiftModal.useScreens, offset: 0x0171c462, size: 229 bytes, params: 2, frame: 23
var environment;
const value = environment.__proto__;
const binding = env1_4;
const [property, env0_8] = env1_3(binding.useState(lockedRecipientUser), 2);
return (NavigatorNativeModule).useNavigatorScreens(_fun61162,
[lockedRecipientUser, property, skuId, applicationId, binding.useCallback(_fun61161, [onGiftModalDismiss]),
validateRecipient, renderProductDetails, renderPurchaseSection]);
function _fun61161() { // fn#61161, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7815:634, offset: 0x0171c547, size: 58 bytes, params: 1, frame: 12
const value = environment.__proto__.__proto__;
(ModalActionCreators).pop();
if (onGiftModalDismiss != null) {
onGiftModalDismiss();
}
}
function UnifiedGiftModal(a0) { // fn#61159, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7815:227, offset: 0x0171c391, size: 209 bytes, params: 2, frame: 19
const skuId = a0.skuId;
const applicationId = a0.applicationId;
const analyticsLocations = a0.analyticsLocations;
const value = UnifiedGiftModalUseScreens({skuId: skuId, applicationId: applicationId,
lockedRecipientUser: a0.lockedRecipientUser, onGiftModalDismiss: a0.onGiftModalDismiss,
validateRecipient: a0.validateRecipient, renderProductDetails: a0.renderProductDetails,
renderPurchaseSection: a0.renderPurchaseSection});
const AnalyticsLocationProvider = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider;
const Navigator = (require(5280) /* metro dependency 5280: NavigatorNative */).Navigator;
const UnifiedGiftModalScreens = (require(7638) /* metro dependency 7638: UnifiedGiftModalTypes */).UnifiedGiftModalScreens;
const GIFT_DETAIL = UnifiedGiftModalScreens.GIFT_DETAIL;
return (
<AnalyticsLocationProvider value={analyticsLocations}>
<Navigator initialRouteName={GIFT_DETAIL} screens={value} />
</AnalyticsLocationProvider>
);
}
function _fun61162() { // fn#61162, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7815:709, offset: 0x0171c581, size: 256 bytes, params: 1, frame: 21
var environment;
const object = {};
const value = environment.__proto__.__proto__;
const UnifiedGiftModalScreens = (UnifiedGiftModalTypesModule).UnifiedGiftModalScreens;
const GIFT_DETAIL = UnifiedGiftModalScreens.GIFT_DETAIL;
const object2 = {};
const intl = (IndexNativeModule).intl;
let string = intl.string;
const t = (IndexNativeModule).t;
object2.title = Reflect.apply(string, intl, [t['JCFN/y']]);
object2.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton(env0_9);
object2.render = render_61163;
object[GIFT_DETAIL] = object2;
const RECIPENT_SELECT = UnifiedGiftModalScreens.RECIPENT_SELECT;
const object3 = {};
string = intl.string;
const R0vK0N = t.R0vK0N;
object3.title = Reflect.apply(string, intl, [R0vK0N]);
object3.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderBackButton();
object3.render = render_61164;
object[RECIPENT_SELECT] = object3;
return object;
function render_61163() { // fn#61163, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7815:859, offset: 0x0171c681, size: 118 bytes, params: 1, frame: 16
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component skuId={skuId} applicationId={applicationId} recipientUser={env1_7} setRecipientUser={env1_8} lockedRecipient={lockedRecipientUser != null} validateRecipient={validateRecipient} renderProductDetails={renderProductDetails} renderPurchaseSection={renderPurchaseSection} />)(UnifiedGiftModalDetailsScreen);
}
function UnifiedGiftModalUseScreens({skuId, applicationId, lockedRecipientUser, onGiftModalDismiss, validateRecipient, renderProductDetails, renderPurchaseSection}) { // fn#61160, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7815:417, owner: UnifiedGiftModal.useScreens, offset: 0x0171c462, size: 229 bytes, params: 2, frame: 23
var environment;
const value = environment.__proto__;
const binding = env1_4;
const [property, env0_8] = env1_3(binding.useState(lockedRecipientUser), 2);
return (require(5280) /* metro dependency 5280: NavigatorNative */).useNavigatorScreens(_fun61162,
[lockedRecipientUser, property, skuId, applicationId, binding.useCallback(_fun61161, [onGiftModalDismiss]),
validateRecipient, renderProductDetails, renderPurchaseSection]);
}
function render_61164() { // fn#61164, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7815:1170, offset: 0x0171c6f7, size: 51 bytes, params: 1, frame: 14
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component setRecipientUser={env1_8} />)(UnifiedGiftModalRecipientSelectScreen);
}
}
}
function _fun61161() { // fn#61161, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7815:634, offset: 0x0171c547, size: 58 bytes, params: 1, frame: 12
const value = environment.__proto__.__proto__;
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop();
if (onGiftModalDismiss != null) {
onGiftModalDismiss();
}
}
function _fun61162() { // fn#61162, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7815:709, offset: 0x0171c581, size: 256 bytes, params: 1, frame: 21
var environment;
const object4 = {};
const value = environment.__proto__.__proto__;
const UnifiedGiftModalScreens = (require(7638) /* metro dependency 7638: UnifiedGiftModalTypes */).UnifiedGiftModalScreens;
const GIFT_DETAIL = UnifiedGiftModalScreens.GIFT_DETAIL;
const object5 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
object5.title = Reflect.apply(string, intl, [t['JCFN/y']]);
object5.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton(env0_9);
object5.render = render_61163;
object4[GIFT_DETAIL] = object5;
const RECIPENT_SELECT = UnifiedGiftModalScreens.RECIPENT_SELECT;
const object6 = {};
string = intl.string;
const R0vK0N = t.R0vK0N;
object6.title = Reflect.apply(string, intl, [R0vK0N]);
object6.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderBackButton();
object6.render = render_61164;
object4[RECIPENT_SELECT] = object6;
return object4;
}
function render_61163() { // fn#61163, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7815:859, offset: 0x0171c681, size: 118 bytes, params: 1, frame: 16
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component skuId={skuId} applicationId={applicationId} recipientUser={env1_7} setRecipientUser={env1_8} lockedRecipient={lockedRecipientUser != null} validateRecipient={validateRecipient} renderProductDetails={renderProductDetails} renderPurchaseSection={renderPurchaseSection} />)(importDefault(7639) /* metro dependency 7639: UnifiedGiftModalDetailsScreen */);
}
function render_61164() { // fn#61164, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7815:1170, offset: 0x0171c6f7, size: 51 bytes, params: 1, frame: 14
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component setRecipientUser={env1_8} />)(importDefault(7689) /* metro dependency 7689: UnifiedGiftModalRecipientSelectScreen */);
}
global.__d(_fun61158, 7637, [57, 31, 33, 5080, 5280, 7638, 1244, 5282, 7639, 7689, 6771,
2]) /* metro module 7637, dependencies: [57, 31, 33, 5080, 5280, 7638, 1244, 5282, 7639, 7689, 6771, 2] */;
@@ -1,161 +1,211 @@
/* Metro module 7639; source: modules/checkout/native/gifting/UnifiedGiftModalDetailsScreen.tsx; dependencies: [57, 31, 27, 661, 33, 4501, 697, 1484, 7638, 6771, 6518, 491, 683, 7640, 7641, 4573, 1244, 7678, 7679, 7680, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import AnalyticsUtils from '../../../../utils/AnalyticsUtils.tsx'; /* Metro dependency 683 */
import UseInitialValue from '../../../../hooks/useInitialValue.tsx'; /* Metro dependency 6518 */
import UseAnalyticsLocations from '../../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as Module00491Module from '../../../../by-id/module-00491.js'; /* Metro dependency 491 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as UseNavigationNativeModule from '../../../../design/components/Navigator/native/useNavigation.native.tsx'; /* Metro dependency 1484 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as UnifiedGiftModalTypesModule from './UnifiedGiftModalTypes.tsx'; /* Metro dependency 7638 */
import * as UseGiftStylesModule from '../../../premium/gifting/hooks/useGiftStyles.tsx'; /* Metro dependency 7640 */
import * as PremiumGiftBackgroundSelectModule from '../../../premium/native/gifting/PremiumGiftBackgroundSelect.tsx'; /* Metro dependency 7641 */
import * as PremiumGiftCustomMessageModule from '../../../premium/native/gifting/PremiumGiftCustomMessage.tsx'; /* Metro dependency 7680 */
function _fun61166(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#61166, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7817:6, offset: 0x0171c792, size: 421 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 = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_5 = value2.ScrollView;
const env0_6 = value2.View;
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 = {};
let value = ReactModule;
const createStyles = CreateStylesModule.createStyles;
object = {};
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object2.container = {'flex': 1, 'paddingTop': null, 'alignItems': 'stretch', paddingTop: PX_12};
object.container = {'flex': 1, 'paddingTop': null, 'alignItems': 'stretch', paddingTop: PX_12};
let PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object2.scrollView = {paddingBottom: PX_24};
const object3 = {};
object.scrollView = {paddingBottom: PX_24};
const object4 = {};
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object3.marginTop = PX_24;
object4.marginTop = PX_24;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object3.marginBottom = PX_8;
object4.marginBottom = PX_8;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object3.paddingHorizontal = PX_16;
object3.textTransform = 'capitalize';
object2.sectionHeader = object3;
const env0_10 = Reflect.apply(createStyles, createStylesModule, [object2]);
object4.paddingHorizontal = PX_16;
object4.textTransform = 'capitalize';
object.sectionHeader = object4;
const env0_10 = Reflect.apply(createStyles, CreateStylesModule, [object]);
value = value.memo(_fun61167);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/checkout/native/gifting/UnifiedGiftModalDetailsScreen.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/checkout/native/gifting/UnifiedGiftModalDetailsScreen.tsx');
exports.default = value;
}
function _fun61167({skuId, applicationId, recipientUser, setRecipientUser, lockedRecipient, validateRecipient, renderProductDetails, renderPurchaseSection}) { // fn#61167, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7817:499, offset: 0x0171c937, size: 1086 bytes, params: 2, frame: 43
const validateRecipient2 = validateRecipient;
const styles = useStyles();
const value2 = (UseNavigationNativeModule).useNavigation();
const binding = value2;
let useState = binding.useState;
const value3 = Reflect.apply(useState, binding, [true]);
const binding2 = validateRecipient2;
const value4 = binding2(value3, 2);
const property = value4[0];
const env0_5 = value4[1];
useState = binding.useState;
const value5 = binding2(Reflect.apply(useState, binding, [false]), 2);
const property2 = value5[0];
const env0_6 = value5[1];
const value6 = binding.useCallback(_fun61168, [value2]);
const value8 = binding.useMemo(_fun61170,
[(UseAnalyticsLocations)().analyticsLocations, skuId,
applicationId, (UseInitialValue)(_fun61169)]);
binding.useEffect(_fun61171, [recipientUser, skuId, validateRecipient]);
binding.useEffect(_fun61174, [value8]);
const value9 = (UseGiftStylesModule).useGiftStyles();
useState = binding.useState;
const value10 = binding2(Reflect.apply(useState, binding, [value9[0]]), 2);
const property3 = value10[0];
const property4 = value10[1];
const value11 = binding.useRef(null);
useState = binding.useState;
const value12 = binding2(Reflect.apply(useState, binding, [0]), 2);
const property5 = value12[0];
const property6 = value12[1];
useState = binding.useState;
const value13 = binding2(Reflect.apply(useState, binding, [undefined]), 2);
const property7 = value13[0];
const property8 = value13[1];
const value14 = binding.useCallback(function() {
global.setTimeout(_fun61176, 100);
}, [property5]);
const value15 = binding.useMemo(_fun61177, [property3, recipientUser, property7]);
const GiftBackgroundSelect = (PremiumGiftBackgroundSelectModule).GiftBackgroundSelect;
const items3 = [
<GiftBackgroundSelect
giftStyle={property3}
setGiftStyle={property4}
withConsistentHeight={false}
/>,
];
const Text = (TextModule).Text;
let sectionHeader = styles.sectionHeader;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
items3[1] = (
<Text variant="text-sm/semibold" style={sectionHeader}>
{Reflect.apply(string, intl, [(require(1244) /* metro dependency 1244: indexNative */).t.xFn72s])}
</Text>
);
items3[2] = (
lockedRecipient && recipientUser != null
? ((Component) => <Component user={recipientUser} />)(importDefault(7678) /* metro dependency 7678: LockedRecipientField */)
: ((Component) => <Component selectedUser={recipientUser} onPress={value6} setSelectedUser={setRecipientUser} />)(importDefault(7679) /* metro dependency 7679: SelectedUserField */)
);
sectionHeader = styles.sectionHeader;
string = intl.string;
const PpoJzt = (require(1244) /* metro dependency 1244: indexNative */).t.PpoJzt;
items3[3] = (
<Text variant="text-sm/semibold" style={sectionHeader}>
{Reflect.apply(string, intl, [PpoJzt])}
</Text>
);
items3[4] = renderProductDetails({recipientUser: recipientUser, isValidRecipient: property});
const GiftCustomMessage = (PremiumGiftCustomMessageModule).GiftCustomMessage;
items3[5] = (
<GiftCustomMessage
onFocusMessage={value14}
setMessagePosition={property6}
customGiftMessage={property7}
setCustomGiftMessage={property8}
/>
);
const items2 = [
<ScrollView
ref={value11}
contentContainerStyle={styles.scrollView}
showsVerticalScrollIndicator={false}
>
{items3}
</ScrollView>,
];
let r9 = recipientUser == null || property2;
r9 = !r9 ? !property : r9;
items2[1] = renderPurchaseSection({isPurchaseDisabled: r9, giftOptions: value15, baseAnalyticsFields: value8});
return (
<View style={styles.container}>
{items2}
</View>
);
function _fun61168() { // fn#61168, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7817:788, offset: 0x0171cd75, size: 57 bytes, params: 1, frame: 13
const binding = env0_4;
const navigate = binding.navigate;
const UnifiedGiftModalScreens = (UnifiedGiftModalTypesModule).UnifiedGiftModalScreens;
const RECIPENT_SELECT = UnifiedGiftModalScreens.RECIPENT_SELECT;
Reflect.apply(navigate, binding, [RECIPENT_SELECT]);
}
function _fun61167({skuId, applicationId, recipientUser, setRecipientUser, lockedRecipient, validateRecipient, renderProductDetails, renderPurchaseSection}) { // fn#61167, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7817:499, offset: 0x0171c937, size: 1086 bytes, params: 2, frame: 43
const env0_3 = validateRecipient;
const styles = useStyles();
const value2 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const binding = value2;
let useState = binding.useState;
const value3 = Reflect.apply(useState, binding, [true]);
const binding2 = env0_3;
const value4 = binding2(value3, 2);
const property = value4[0];
const env0_5 = value4[1];
useState = binding.useState;
const value5 = binding2(Reflect.apply(useState, binding, [false]), 2);
const property2 = value5[0];
const env0_6 = value5[1];
const value6 = binding.useCallback(_fun61168, [value2]);
const value8 = binding.useMemo(_fun61170,
[(importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().analyticsLocations, skuId,
applicationId, (importDefault(6518) /* metro dependency 6518: useInitialValue */)(_fun61169)]);
binding.useEffect(_fun61171, [recipientUser, skuId, validateRecipient]);
binding.useEffect(_fun61174, [value8]);
const value9 = (require(7640) /* metro dependency 7640: useGiftStyles */).useGiftStyles();
useState = binding.useState;
const value10 = binding2(Reflect.apply(useState, binding, [value9[0]]), 2);
const property3 = value10[0];
const property4 = value10[1];
const value11 = binding.useRef(null);
useState = binding.useState;
const value12 = binding2(Reflect.apply(useState, binding, [0]), 2);
const property5 = value12[0];
const property6 = value12[1];
useState = binding.useState;
const value13 = binding2(Reflect.apply(useState, binding, [undefined]), 2);
const property7 = value13[0];
const property8 = value13[1];
const value14 = binding.useCallback(function() {
global.setTimeout(_fun61176, 100);
}, [property5]);
const value15 = binding.useMemo(_fun61177, [property3, recipientUser, property7]);
const GiftBackgroundSelect = (require(7641) /* metro dependency 7641: PremiumGiftBackgroundSelect */).GiftBackgroundSelect;
const items3 = [<GiftBackgroundSelect giftStyle={property3} setGiftStyle={property4} withConsistentHeight={false} />];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
let sectionHeader = styles.sectionHeader;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
items3[1] = <Text variant="text-sm/semibold" style={sectionHeader}>{Reflect.apply(string, intl,
[(require(1244) /* metro dependency 1244: indexNative */).t.xFn72s])}</Text>;
items3[2] = lockedRecipient && recipientUser != null ? ((Component) => <Component user={recipientUser} />)(importDefault(7678) /* metro dependency 7678: LockedRecipientField */) : ((Component) => <Component selectedUser={recipientUser} onPress={value6} setSelectedUser={setRecipientUser} />)(importDefault(7679) /* metro dependency 7679: SelectedUserField */);
sectionHeader = styles.sectionHeader;
string = intl.string;
const PpoJzt = (require(1244) /* metro dependency 1244: indexNative */).t.PpoJzt;
items3[3] = <Text variant="text-sm/semibold" style={sectionHeader}>{Reflect.apply(string, intl, [PpoJzt])}</Text>;
items3[4] = renderProductDetails({recipientUser: recipientUser, isValidRecipient: property});
const GiftCustomMessage = (require(7680) /* metro dependency 7680: PremiumGiftCustomMessage */).GiftCustomMessage;
items3[5] = <GiftCustomMessage onFocusMessage={value14} setMessagePosition={property6} customGiftMessage={property7} setCustomGiftMessage={property8} />;
const items2 = [<ScrollView ref={value11} contentContainerStyle={styles.scrollView} showsVerticalScrollIndicator={false}>{items3}</ScrollView>];
let r9 = recipientUser == null || property2;
r9 = !r9 ? !property : r9;
items2[1] = renderPurchaseSection({isPurchaseDisabled: r9, giftOptions: value15, baseAnalyticsFields: value8});
return (
<View style={styles.container}>
{items2}
</View>
);
}
function _fun61169() { // fn#61169, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7817:903, offset: 0x0171cdae, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (Module00491Module).v4();
}
function _fun61168() { // fn#61168, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7817:788, offset: 0x0171cd75, size: 57 bytes, params: 1, frame: 13
const binding = env0_4;
const navigate = binding.navigate;
const UnifiedGiftModalScreens = (require(7638) /* metro dependency 7638: UnifiedGiftModalTypes */).UnifiedGiftModalScreens;
const RECIPENT_SELECT = UnifiedGiftModalScreens.RECIPENT_SELECT;
Reflect.apply(navigate, binding, [RECIPENT_SELECT]);
}
function _fun61170() { // fn#61170, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7817:936, offset: 0x0171cdd3, size: 56 bytes, params: 1, frame: 3
return {'is_gift': true, 'location_stack': null, 'payment_type': 'sku', location_stack: analyticsLocations,
sku_id: skuId, application_id: applicationId, load_id: JsxRuntimeModule.jsx};
}
function _fun61169() { // fn#61169, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7817:903, offset: 0x0171cdae, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (require(491) /* metro dependency 491 */).v4();
}
function _fun61171() { // fn#61171, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7817:1052, offset: 0x0171ce0b, size: 88 bytes, params: 1, frame: 14
var value;
env0_5(true);
if (recipientUser != null) {
env0_6(true);
value = validateRecipient(recipientUser.id);
value = value.then(_fun61172);
value.finally(_fun61173);
}
function _fun61172(a0) { // fn#61172, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7817:1093, offset: 0x00e76efe, size: 19 bytes, params: 2, frame: 11
env1_5(a0);
}
function _fun61170() { // fn#61170, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7817:936, offset: 0x0171cdd3, size: 56 bytes, params: 1, frame: 3
return {'is_gift': true, 'location_stack': null, 'payment_type': 'sku', location_stack: analyticsLocations,
sku_id: skuId, application_id: applicationId, load_id: env0_8};
}
function _fun61173() { // fn#61173, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7817:1114, offset: 0x0171ce63, size: 18 bytes, params: 1, frame: 11
env1_6(false);
}
}
function _fun61174() { // fn#61174, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7817:1153, offset: 0x0171ce75, size: 108 bytes, params: 1, frame: 18
let value = environment.__proto__;
const defaultImport = AnalyticsUtils;
let track = defaultImport.track;
const PAYMENT_FLOW_STARTED = AnalyticEvents.PAYMENT_FLOW_STARTED;
Reflect.apply(track, defaultImport, [PAYMENT_FLOW_STARTED, JsxRuntimeModule.jsxs]);
value = defaultImport;
track = value.track;
const PAYMENT_FLOW_LOADED = AnalyticEvents.PAYMENT_FLOW_LOADED;
const object = {};
copyDataProperties(object, JsxRuntimeModule.jsxs, defaultImport);
object['initial_step'] = 'gift_customization';
Reflect.apply(track, value, [PAYMENT_FLOW_LOADED, object]);
}
function _fun61175() { // fn#61175, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7817:1475, offset: 0x0171cee1, size: 28 bytes, params: 1, frame: 13
global.setTimeout(_fun61176, 100);
function _fun61176() { // fn#61176, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7817:1492, offset: 0x0171cefd, size: 53 bytes, params: 1, frame: 13
const value = environment.__proto__;
return env1_11.current?.scrollTo({y: env1_12, animated: true});
}
}
function _fun61177() { // fn#61177, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7817:1594, offset: 0x0171cf32, size: 54 bytes, params: 1, frame: 4
return {gift_style: env0_10, recipient_id: recipientUser?.id, custom_message: env0_13};
}
function _fun61171() { // fn#61171, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7817:1052, offset: 0x0171ce0b, size: 88 bytes, params: 1, frame: 14
var value;
env0_5(true);
if (recipientUser != null) {
env0_6(true);
value = validateRecipient(recipientUser.id);
value = value.then(_fun61172);
value.finally(_fun61173);
}
}
function _fun61174() { // fn#61174, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7817:1153, offset: 0x0171ce75, size: 108 bytes, params: 1, frame: 18
let value = environment.__proto__;
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
let track = defaultImport.track;
const PAYMENT_FLOW_STARTED = AnalyticEvents.PAYMENT_FLOW_STARTED;
const binding = env0_9;
Reflect.apply(track, defaultImport, [PAYMENT_FLOW_STARTED, binding]);
value = defaultImport;
track = value.track;
const PAYMENT_FLOW_LOADED = AnalyticEvents.PAYMENT_FLOW_LOADED;
const object2 = {};
copyDataProperties(object2, binding, defaultImport);
object2['initial_step'] = 'gift_customization';
Reflect.apply(track, value, [PAYMENT_FLOW_LOADED, object2]);
}
function _fun61175() { // fn#61175, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7817:1475, offset: 0x0171cee1, size: 28 bytes, params: 1, frame: 13
global.setTimeout(_fun61176, 100);
}
function _fun61177() { // fn#61177, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7817:1594, offset: 0x0171cf32, size: 54 bytes, params: 1, frame: 4
return {gift_style: env0_10, recipient_id: recipientUser?.id, custom_message: env0_13};
}
function _fun61176() { // fn#61176, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7817:1492, offset: 0x0171cefd, size: 53 bytes, params: 1, frame: 13
const value = environment.__proto__;
return env1_11.current?.scrollTo({y: env1_12, animated: true});
}
global.__d(_fun61166, 7639, [57, 31, 27, 661, 33, 4501, 697, 1484, 7638, 6771, 6518, 491, 683, 7640, 7641, 4573,
1244, 7678, 7679, 7680,
2]) /* metro module 7639, dependencies: [57, 31, 27, 661, 33, 4501, 697, 1484, 7638, 6771, 6518, 491, 683, 7640, 7641, 4573, 1244, 7678, 7679, 7680, 2] */;
@@ -1,44 +1,52 @@
/* Metro module 7689; source: modules/checkout/native/gifting/UnifiedGiftModalRecipientSelectScreen.tsx; dependencies: [31, 27, 7690, 33, 4501, 697, 1484, 7691, 7638, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import SearchableUserList from '../../../main_tabs_v2/native/shared_components/user_list/SearchableUserList.tsx'; /* Metro dependency 7691 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as UseNavigationNativeModule from '../../../../design/components/Navigator/native/useNavigation.native.tsx'; /* Metro dependency 1484 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as UnifiedGiftModalTypesModule from './UnifiedGiftModalTypes.tsx'; /* Metro dependency 7638 */
import * as UserRowConstantsModule from '../../../main_tabs_v2/native/shared_components/user_list/UserRowConstants.tsx'; /* Metro dependency 7690 */
function _fun61374(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#61374, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7867:6, offset: 0x01b3d6cf, size: 252 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(7690) /* metro dependency 7690: UserRowConstants */).UserRowModes;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const MOBILE_ACTIONSHEET_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_ACTIONSHEET_BACKGROUND;
const env0_6 = Reflect.apply(createStyles, createStylesModule, [{container: {'flex': 1, 'paddingTop': 16,
ReactModule;
const createStyles = CreateStylesModule.createStyles;
const MOBILE_ACTIONSHEET_BACKGROUND = (Native).colors.MOBILE_ACTIONSHEET_BACKGROUND;
const env0_6 = Reflect.apply(createStyles, CreateStylesModule, [{container: {'flex': 1, 'paddingTop': 16,
backgroundColor: MOBILE_ACTIONSHEET_BACKGROUND}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/checkout/native/gifting/UnifiedGiftModalRecipientSelectScreen.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/checkout/native/gifting/UnifiedGiftModalRecipientSelectScreen.tsx');
exports.default = UnifiedGiftModalRecipientSelectScreen;
function UnifiedGiftModalRecipientSelectScreen({setRecipientUser}) { // fn#61375, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7867:393, offset: 0x01b3d7cb, size: 154 bytes, params: 2, frame: 18
const env0_1 = (UseNavigationNativeModule).useNavigation();
const styles = useStyles();
const NONE = UserRowModes.NONE;
return (
<View style={styles.container}>
<SearchableUserList
onSelectUser={onSelectUser}
rowMode={NONE}
disableGradient
disableThemedGradient
/>
</View>
);
function onSelectUser(a0) { // fn#61376, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7867:561, owner: UnifiedGiftModalRecipientSelectScreen.onSelectUser, offset: 0x01b3d865, size: 69 bytes, params: 2, frame: 14
setRecipientUser(a0);
const binding = env0_1;
const navigate = binding.navigate;
const UnifiedGiftModalScreens = (UnifiedGiftModalTypesModule).UnifiedGiftModalScreens;
const GIFT_DETAIL = UnifiedGiftModalScreens.GIFT_DETAIL;
Reflect.apply(navigate, binding, [GIFT_DETAIL]);
}
}
}
function UnifiedGiftModalRecipientSelectScreen({setRecipientUser}) { // fn#61375, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7867:393, offset: 0x01b3d7cb, size: 154 bytes, params: 2, frame: 18
const env0_1 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const styles = useStyles();
const SearchableUserList = importDefault(7691) /* metro dependency 7691: SearchableUserList */;
const NONE = UserRowModes.NONE;
return (
<View style={styles.container}>
<SearchableUserList
onSelectUser={onSelectUser}
rowMode={NONE}
disableGradient
disableThemedGradient
/>
</View>
);
}
function onSelectUser(a0) { // fn#61376, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7867:561, owner: UnifiedGiftModalRecipientSelectScreen.onSelectUser, offset: 0x01b3d865, size: 69 bytes, params: 2, frame: 14
setRecipientUser(a0);
const binding = env0_1;
const navigate = binding.navigate;
const UnifiedGiftModalScreens = (require(7638) /* metro dependency 7638: UnifiedGiftModalTypes */).UnifiedGiftModalScreens;
const GIFT_DETAIL = UnifiedGiftModalScreens.GIFT_DETAIL;
Reflect.apply(navigate, binding, [GIFT_DETAIL]);
}
global.__d(_fun61374, 7689, [31, 27, 7690, 33, 4501, 697, 1484, 7691, 7638,
2]) /* metro module 7689, dependencies: [31, 27, 7690, 33, 4501, 697, 1484, 7691, 7638, 2] */;
@@ -1,86 +1,110 @@
/* Metro module 12157; source: modules/checkout/native/gifting/UnifiedGiftModalSuccessScreen.tsx; dependencies: [31, 27, 661, 33, 4501, 697, 12158, 7633, 5080, 12168, 1962, 7007, 4596, 4573, 1244, 4579, 2] */
import Alert from '../../../../components_native/common/Alert.tsx'; /* Metro dependency 4596 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as BaseTextButtonNativeModule from '../../../../design/components/Button/native/BaseTextButton.native.tsx'; /* Metro dependency 4579 */
import * as GiftingBadgeExperimentModule from '../../../premium/gifting/experiments/GiftingBadgeExperiment.tsx'; /* Metro dependency 7633 */
import * as PremiumGiftBackgroundSelectTileModule from '../../../premium/native/gifting/PremiumGiftBackgroundSelectTile.tsx'; /* Metro dependency 12158 */
function _fun93245(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#93245, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12343:6, offset: 0x020abf89, size: 395 bytes, params: 8, frame: 22
var object4;
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 */).Image;
const env0_5 = (require(661) /* metro dependency 661: Constants */).UserSettingsSections;
let value = require(33) /* metro dependency 33 */;
let value = JsxRuntimeModule;
const env0_6 = value.jsx;
const env0_7 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object4 = {};
const object5 = {};
object = {};
const object2 = {};
let PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object5.paddingHorizontal = PX_24;
object2.paddingHorizontal = PX_24;
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object5.paddingBottom = PX_24;
object5.alignItems = 'center';
object4.alertContainer = object5;
object4.image = {'position': 'relative', 'top': -50};
const object6 = {};
object2.paddingBottom = PX_24;
object2.alignItems = 'center';
object.alertContainer = object2;
object.image = {'position': 'relative', 'top': -50};
const object3 = {};
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object6.marginTop = -PX_24;
object3.marginTop = -PX_24;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object6.marginBottom = PX_8;
object4.title = object6;
object3.marginBottom = PX_8;
object.title = object3;
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object4.description = {marginBottom: PX_24};
const env0_8 = Reflect.apply(createStyles, value, [object4]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/checkout/native/gifting/UnifiedGiftModalSuccessScreen.tsx');
object.description = {marginBottom: PX_24};
const env0_8 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/checkout/native/gifting/UnifiedGiftModalSuccessScreen.tsx');
exports.default = UnifiedGiftModalSuccessScreen;
}
function UnifiedGiftModalSuccessScreen({giftStyle, giftBadgeProgress, onClose}) { // fn#93246, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12343:579, offset: 0x020ac114, size: 625 bytes, params: 2, frame: 31
const styles = useStyles();
const GIFT_STYLE_IMG = (PremiumGiftBackgroundSelectTileModule).GIFT_STYLE_IMG;
const property = GIFT_STYLE_IMG[giftStyle];
const GiftingBadgeExperiment = (GiftingBadgeExperimentModule).GiftingBadgeExperiment;
const useConfig = GiftingBadgeExperiment.useConfig;
const enabled = Reflect.apply(useConfig, GiftingBadgeExperiment,
[{location: 'UnifiedGiftModalSuccessScreen'}]).enabled;
const value2 = ReactModule.useCallback(_fun93247, [enabled, giftBadgeProgress, onClose]);
const value3 = ReactModule.useCallback(function() {
onClose();
require(dependencyMap[11]).openUserSettings({screen: UserSettingsSections.PREMIUM_GIFTING, params: {}});
}, [onClose]);
const items2 = [
<Image source={property} style={styles.image} />,
];
const Text = (TextModule).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const MqZXbv = (require(1244) /* metro dependency 1244: indexNative */).t.MqZXbv;
items2[1] = (
<Text variant="heading-lg/bold" style={styles.title}>
{Reflect.apply(string, intl, [MqZXbv])}
</Text>
);
const format = intl.format;
const YS2J4S = (require(1244) /* metro dependency 1244: indexNative */).t.YS2J4S;
items2[2] = (
<Text variant="text-md/medium" style={styles.description}>
{Reflect.apply(format, intl, [YS2J4S, {onClick: value3}])}
</Text>
);
const BaseTextButton = (BaseTextButtonNativeModule).BaseTextButton;
items2[3] = (
<BaseTextButton
onPress={value2}
text={intl.string(enabled && giftBadgeProgress != null ? (require(1244) /* metro dependency 1244: indexNative */).t.PDTjLN : (require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq)}
textVariant="text-md/semibold"
grow
/>
);
return (
<Alert
onClose={value2}
noDefaultButtons
style={styles.alertContainer}
>
{items2}
</Alert>
);
function _fun93247() { // fn#93247, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12343:813, offset: 0x020ac385, size: 122 bytes, params: 1, frame: 17
var value3;
var defaultImport;
onClose();
if (enabled && giftBadgeProgress != null) {
value3 = environment.__proto__;
defaultImport = importDefault(dependencyMap[8]);
defaultImport.pushLazy(require(dependencyMap[10])(dependencyMap[9], dependencyMap.paths),
{giftBadgeProgress: giftBadgeProgress}, 'collectibles_shop_gift_badge_modal');
}
}
function UnifiedGiftModalSuccessScreen({giftStyle, giftBadgeProgress, onClose}) { // fn#93246, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12343:579, offset: 0x020ac114, size: 625 bytes, params: 2, frame: 31
const styles = useStyles();
const GIFT_STYLE_IMG = (require(12158) /* metro dependency 12158: PremiumGiftBackgroundSelectTile */).GIFT_STYLE_IMG;
const property = GIFT_STYLE_IMG[giftStyle];
const GiftingBadgeExperiment = (require(7633) /* metro dependency 7633: GiftingBadgeExperiment */).GiftingBadgeExperiment;
const useConfig = GiftingBadgeExperiment.useConfig;
const enabled = Reflect.apply(useConfig, GiftingBadgeExperiment,
[{location: 'UnifiedGiftModalSuccessScreen'}]).enabled;
const binding = env0_3;
const value2 = binding.useCallback(_fun93247, [enabled, giftBadgeProgress, onClose]);
const value3 = binding.useCallback(function() {
onClose();
require(dependencyMap[11]).openUserSettings({screen: UserSettingsSections.PREMIUM_GIFTING, params: {}});
}, [onClose]);
const Alert = importDefault(4596) /* metro dependency 4596: Alert */;
const items2 = [<Image source={property} style={styles.image} />];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const MqZXbv = (require(1244) /* metro dependency 1244: indexNative */).t.MqZXbv;
items2[1] = <Text variant="heading-lg/bold" style={styles.title}>{Reflect.apply(string, intl, [MqZXbv])}</Text>;
const format = intl.format;
const YS2J4S = (require(1244) /* metro dependency 1244: indexNative */).t.YS2J4S;
items2[2] = <Text variant="text-md/medium" style={styles.description}>{Reflect.apply(format, intl, [YS2J4S,
{onClick: value3}])}</Text>;
const BaseTextButton = (require(4579) /* metro dependency 4579: BaseTextButtonNative */).BaseTextButton;
items2[3] = <BaseTextButton onPress={value2} text={intl.string(enabled && giftBadgeProgress != null ? (require(1244) /* metro dependency 1244: indexNative */).t.PDTjLN : (require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq)} textVariant="text-md/semibold" grow />;
return (
<Alert
onClose={value2}
noDefaultButtons
style={styles.alertContainer}
>
{items2}
</Alert>
);
}
function _fun93247() { // fn#93247, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12343:813, offset: 0x020ac385, size: 122 bytes, params: 1, frame: 17
var value3;
var defaultImport;
onClose();
if (enabled && giftBadgeProgress != null) {
value3 = environment.__proto__;
defaultImport = importDefault(dependencyMap[8]);
defaultImport.pushLazy(require(dependencyMap[10])(dependencyMap[9], dependencyMap.paths),
{giftBadgeProgress: giftBadgeProgress}, 'collectibles_shop_gift_badge_modal');
}
}
global.__d(_fun93245, 12157, [31, 27, 661, 33, 4501, 697, 12158, 7633, 5080, 12168, 1962, 7007, 4596, 4573, 1244,
4579,
2]) /* metro module 12157, dependencies: [31, 27, 661, 33, 4501, 697, 12158, 7633, 5080, 12168, 1962, 7007, 4596, 4573, 1244, 4579, 2] */;
@@ -1,8 +1,11 @@
/* Metro module 7638; source: modules/checkout/native/gifting/UnifiedGiftModalTypes.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun61165(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#61165, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7816:6, offset: 0x0171c72a, size: 104 bytes, params: 8, frame: 16
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/checkout/native/gifting/UnifiedGiftModalTypes.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/checkout/native/gifting/UnifiedGiftModalTypes.tsx');
exports.UnifiedGiftModalScreens = {GIFT_DETAIL: 'GiftDetail', RECIPENT_SELECT: 'RecipientSelect'};
}
global.__d(_fun61165, 7638, [2]) /* metro module 7638, dependencies: [2] */;
@@ -1,479 +1,524 @@
/* Metro module 7335; source: modules/checkout/native/stores/NativeCheckoutStoreProvider.tsx; dependencies: [5, 57, 31, 27, 7042, 4095, 33, 4501, 6518, 7299, 491, 1216, 2] */
import Module00005 from '../../../../by-id/module-00005.js'; /* Metro dependency 5 */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import SentryUtilsNative from '../../../../utils/SentryUtils.native.tsx'; /* Metro dependency 1216 */
import UseInitialValue from '../../../../hooks/useInitialValue.tsx'; /* Metro dependency 6518 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as PaymentConstantsModule from '../../../payments/PaymentConstants.tsx'; /* Metro dependency 4095 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
function _fun59041(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#59041, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7513:6, offset: 0x016dfa19, size: 313 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 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_6 = value.ActivityIndicator;
const env0_7 = value.View;
value = require(7042) /* metro dependency 7042: NativeCheckoutStore */;
const env0_8 = value.createNativeStore;
const env0_9 = value.NativeCheckoutStoreContext;
const env0_10 = (require(4095) /* metro dependency 4095: PaymentConstants */).ItemPurchaseType;
const env0_11 = (require(33) /* metro dependency 33 */).jsx;
const env0_12 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({loadingSpinnerContainer: {'display': 'flex',
const env0_12 = (CreateStylesModule).createStyles({loadingSpinnerContainer: {'display': 'flex',
'alignItems': 'center', 'justifyContent': 'center', 'height': '100%'}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/checkout/native/stores/NativeCheckoutStoreProvider.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/checkout/native/stores/NativeCheckoutStoreProvider.tsx');
exports.default = NativeCheckoutStoreProviderWrapper;
}
function NativeCheckoutStoreProvider({checkoutInitParameters, order, children}) { // fn#59042, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7513:396, offset: 0x016dfb52, size: 193 bytes, params: 2, frame: 18
const env0_2 = (importDefault(6518) /* metro dependency 6518: useInitialValue */)(_fun59043);
const property = env0_4(env0_5.useState(_fun59044), 1)[0];
var env0_4 = env0_5.useRef(order != null);
env0_5.useEffect(_fun59045, [order, property]);
return (
<NativeCheckoutStoreContext value={property}>
{children}
</NativeCheckoutStoreContext>
);
}
function NativeCheckoutStoreProviderWrapper({waitAndCreateOrder, skuIds, paymentGateway, isGift, onOrderCreated, activeSubscription, children, defaultPlans}) { // fn#59046, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7513:892, offset: 0x016dfd2b, size: 528 bytes, params: 2, frame: 30
var value11;
const env0_4 = defaultPlans;
const styles = useStyles();
let binding = env0_5;
const value4 = env0_4(binding.useState(null), 2);
const property = value4[0];
var env0_5 = property;
const env0_6 = value4[1];
const [property2, env0_8] = env0_4(env0_5.useState(null), 2);
const [property3, env0_9] = env0_4(env0_5.useState(waitAndCreateOrder), 2);
const env0_10 = env0_5.useRef(false);
const value9 = (importDefault(6518) /* metro dependency 6518: useInitialValue */)(skuIds.length > 0 ? skuIds[0] : null);
if (value9 == null) {
if (defaultPlans != null) {
binding = env0_5;
value11 = binding.useCallback(_fun59047(), [paymentGateway, onOrderCreated, isGift]);
binding = env0_5;
binding.useEffect(_fun59051, [value9, waitAndCreateOrder, property, value11, property2, defaultPlans]);
return property3 ? <View style={styles.loadingSpinnerContainer}><ActivityIndicator animating size="large" /></View> : <NativeCheckoutStoreProvider checkoutInitParameters={{skuIds: skuIds,
isGift: isGift, activeSubscription: activeSubscription,
referralTrialOfferId: null}} order={property}>{children}</NativeCheckoutStoreProvider>;
}
if (waitAndCreateOrder) {
throw global.Error('SkuIDs needs to a specified!');
}
}
env0_5.useEffect(_fun59051, [value9, waitAndCreateOrder, property, env0_5.useCallback(_fun59047(), [paymentGateway,
onOrderCreated, isGift]), property2, defaultPlans]);
return property3 ? <View style={styles.loadingSpinnerContainer}><ActivityIndicator animating size="large" /></View> : <NativeCheckoutStoreProvider checkoutInitParameters={{skuIds: skuIds,
isGift: isGift, activeSubscription: activeSubscription,
referralTrialOfferId: null}} order={property}>{children}</NativeCheckoutStoreProvider>;
}
function _fun59043() { // fn#59043, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7513:495, offset: 0x016dfc13, size: 159 bytes, params: 1, frame: 15
var object2;
var r2;
var value;
const id = order?.id;
if (id != null) {
r2 = id;
} else {
value = environment.__proto__;
value = require(491) /* metro dependency 491 */;
value = value.v4();
r2 = value;
}
value = environment.__proto__;
(importDefault(1216) /* metro dependency 1216: SentryUtilsNative */).addBreadcrumb({message: 'Checkout session ID: ' + r2});
object2 = {loadId: r2};
const Date = global.Date;
object2.startTime = Date.now();
return object2;
}
function _fun59044() { // fn#59044, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7513:672, offset: 0x016dfcb2, size: 48 bytes, params: 1, frame: 12
return createNativeStore({order: order, checkoutInitParameters: checkoutInitParameters, contextMetadata: env0_2});
}
function _fun59045() { // fn#59045, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7513:786, offset: 0x016dfce2, size: 73 bytes, params: 1, frame: 12
var state;
if (!(env0_4.current || order == null)) {
state = env0_3.getState();
state.setOrder(order);
env0_4.current = true;
}
}
function _fun59047() { // fn#59047, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7513:1326, offset: 0x016dff3b, size: 32 bytes, params: 1, frame: 12
const env0_0 = env1_3(_fun59049);
return _fun59050;
}
function _fun59051() { // fn#59051, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7513:1637, offset: 0x016e0080, size: 226 bytes, params: 1, frame: 16
var environment;
var defaultPlansBinding;
var items3;
var push;
var value2;
var value3;
var items2;
if (waitAndCreateOrder) {
if (env0_11 != null) {
if (env0_5 == null) {
if (env0_7 == null) {
if (!env0_10.current) {
items3 = [];
defaultPlansBinding = defaultPlans;
if (defaultPlansBinding != null) {
push = items3.push;
defaultPlansBinding = defaultPlans;
value3 = defaultPlansBinding.map(function(a0) {
return {sku_id: a0.skuId, subscription_plan_id: a0.subscriptionPlanId,
quantity: a0.quantity,
purchase_type: ItemPurchaseType.SUBSCRIPTION};
});
items2 = [];
arraySpread(items2, value3, 0, defaultPlansBinding);
apply(push, items2, items3, defaultPlansBinding);
} else if (env0_11 != null) {
push = items3.push;
value2 = environment.__proto__;
Reflect.apply(push, items3, [{sku_id: env0_11, quantity: 1,
purchase_type: ItemPurchaseType.ONE_TIME}]);
}
env0_10.current = true;
env0_12({orderLineItems: items3});
}
}
function NativeCheckoutStoreProvider({checkoutInitParameters, order, children}) { // fn#59042, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7513:396, offset: 0x016dfb52, size: 193 bytes, params: 2, frame: 18
const env0_2 = (UseInitialValue)(_fun59043);
const property = env0_4(ReactModule.useState(_fun59044), 1)[0];
var env0_4 = ReactModule.useRef(order != null);
ReactModule.useEffect(_fun59045, [order, property]);
return (
<NativeCheckoutStoreContext value={property}>
{children}
</NativeCheckoutStoreContext>
);
function _fun59043() { // fn#59043, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7513:495, offset: 0x016dfc13, size: 159 bytes, params: 1, frame: 15
var r2;
var value;
const id = order?.id;
if (id != null) {
r2 = id;
} else {
value = environment.__proto__;
value = require(491) /* metro dependency 491 */;
value = value.v4();
r2 = value;
}
} else {
defaultPlansBinding = defaultPlans;
if (defaultPlansBinding != null) {
if (env0_5 == null) {
if (env0_7 == null) {
if (!env0_10.current) {
items3 = [];
defaultPlansBinding = defaultPlans;
if (defaultPlansBinding != null) {
push = items3.push;
defaultPlansBinding = defaultPlans;
value3 = defaultPlansBinding.map(_fun59052);
items2 = [];
arraySpread(items2, value3, 0, defaultPlansBinding);
apply(push, items2, items3, defaultPlansBinding);
} else if (env0_11 != null) {
push = items3.push;
value2 = environment.__proto__;
Reflect.apply(push, items3, [{sku_id: env0_11, quantity: 1,
purchase_type: ItemPurchaseType.ONE_TIME}]);
value = environment.__proto__;
(SentryUtilsNative).addBreadcrumb({message: 'Checkout session ID: ' + r2});
object = {loadId: r2};
const Date = global.Date;
object.startTime = Date.now();
return object;
}
function _fun59044() { // fn#59044, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7513:672, offset: 0x016dfcb2, size: 48 bytes, params: 1, frame: 12
return createNativeStore({order: order, checkoutInitParameters: checkoutInitParameters, contextMetadata: env0_2});
}
function _fun59045() { // fn#59045, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7513:786, offset: 0x016dfce2, size: 73 bytes, params: 1, frame: 12
var state;
if (!(env0_4.current || order == null)) {
state = Module00005.getState();
state.setOrder(order);
env0_4.current = true;
}
}
}
function NativeCheckoutStoreProviderWrapper({waitAndCreateOrder, skuIds, paymentGateway, isGift, onOrderCreated, activeSubscription, children, defaultPlans}) { // fn#59046, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7513:892, offset: 0x016dfd2b, size: 528 bytes, params: 2, frame: 30
var value11;
const defaultPlans2 = defaultPlans;
const styles = useStyles();
let binding = property4;
const value4 = defaultPlans2(binding.useState(null), 2);
const property = value4[0];
var property4 = property;
const env0_6 = value4[1];
const [property2, env0_8] = defaultPlans2(property4.useState(null), 2);
const [property3, env0_9] = defaultPlans2(property4.useState(waitAndCreateOrder), 2);
const env0_10 = property4.useRef(false);
const value9 = (importDefault(6518) /* metro dependency 6518: useInitialValue */)(skuIds.length > 0 ? skuIds[0] : null);
if (value9 == null) {
if (defaultPlans != null) {
binding = property4;
value11 = binding.useCallback(_fun59047(), [paymentGateway, onOrderCreated, isGift]);
binding = property4;
binding.useEffect(_fun59051, [value9, waitAndCreateOrder, property, value11, property2, defaultPlans]);
return (
property3
? (
<View style={styles.loadingSpinnerContainer}>
<ActivityIndicator animating size="large" />
</View>
)
: (
<NativeCheckoutStoreProvider
checkoutInitParameters={{
skuIds: skuIds,
isGift: isGift,
activeSubscription: activeSubscription,
referralTrialOfferId: null,
}}
order={property}
>
{children}
</NativeCheckoutStoreProvider>
)
);
}
if (waitAndCreateOrder) {
throw global.Error('SkuIDs needs to a specified!');
}
}
property4.useEffect(_fun59051, [value9, waitAndCreateOrder, property, property4.useCallback(_fun59047(),
[paymentGateway, onOrderCreated, isGift]), property2, defaultPlans]);
return (
property3
? (
<View style={styles.loadingSpinnerContainer}>
<ActivityIndicator animating size="large" />
</View>
)
: (
<NativeCheckoutStoreProvider
checkoutInitParameters={{
skuIds: skuIds,
isGift: isGift,
activeSubscription: activeSubscription,
referralTrialOfferId: null,
}}
order={property}
>
{children}
</NativeCheckoutStoreProvider>
)
);
function _fun59047() { // fn#59047, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7513:1326, offset: 0x016dff3b, size: 32 bytes, params: 1, frame: 12
const env0_0 = env1_3(_fun59049);
return _fun59050;
async function _fun59049(a0) { // fn#59049, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7513:1346, offset: 0x016dff6d, size: 275 bytes, params: 2, frame: 18
var r2;
var value;
var value2;
var orderLineItems;
var value3;
var value4;
var binding;
var binding2;
var property;
var value5;
var createOrder;
var object;
var order;
var value6;
var value7;
var value8;
var error;
var createNativeStoreBinding;
var Error;
var value9;
var String;
var value10;
var prototype;
var value12;
exceptionLanding51: while (true) {
value = undefined;
value2 = false;
if (value2) {
return value;
}
orderLineItems = a0.orderLineItems;
await undefined;
value = undefined;
value3 = false;
if (value3) {
return value;
}
value = environment.__proto__.__proto__;
NativeCheckoutStoreContext(true);
value4 = environment.__proto__.__proto__.__proto__;
reducibleJoin6: while (true) {
reduciblePort50: while (true) {
exceptionLanding31: while (true) {
try {
try {
binding = env3_0;
} catch (error) {
break exceptionLanding31;
}
} catch (error) {
break exceptionLanding51;
}
break reducibleJoin6;
}
env0_10.current = true;
env0_12({orderLineItems: items3});
try {
createNativeStoreBinding = createNativeStore;
} catch (error) {
break exceptionLanding51;
}
try {
Error = global.Error;
} catch (error) {
break exceptionLanding51;
}
try {
value9 = error instanceof Error;
} catch (error) {
break exceptionLanding51;
}
if (value9) {
r2 = error;
} else {
try {
Error = global.Error;
} catch (error) {
break exceptionLanding51;
}
try {
String = global.String;
} catch (error) {
break exceptionLanding51;
}
try {
value10 = String(error);
} catch (error) {
break exceptionLanding51;
}
try {
prototype = Error.prototype;
} catch (error) {
break exceptionLanding51;
}
try {
} catch (error) {
break exceptionLanding51;
}
try {
error = new Error();
} catch (error) {
break exceptionLanding51;
}
try {
value12 = error instanceof Object ? error : undefined;
} catch (error) {
break exceptionLanding51;
}
r2 = value12;
}
try {
createNativeStoreBinding(r2);
} catch (error) {
break exceptionLanding51;
}
break reduciblePort50;
}
NativeCheckoutStoreContext(false);
return undefined;
}
}
}
}
}
}
async function _fun59049(a0) { // fn#59049, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7513:1346, offset: 0x016dff6d, size: 275 bytes, params: 2, frame: 18
var r2;
var value;
var value2;
var orderLineItems;
var value3;
var value4;
var binding;
var binding2;
var property;
var value5;
var createOrder;
var object2;
var order;
var value6;
var value7;
var value8;
var error;
var createNativeStoreBinding;
var Error;
var value9;
var String;
var value10;
var prototype;
var value12;
exceptionLanding51: while (true) {
value = undefined;
value2 = false;
if (value2) {
return value;
}
orderLineItems = a0.orderLineItems;
await undefined;
value = undefined;
value3 = false;
if (value3) {
return value;
}
value = environment.__proto__.__proto__;
NativeCheckoutStoreContext(true);
value4 = environment.__proto__.__proto__.__proto__;
reducibleJoin6: while (true) {
reduciblePort50: while (true) {
exceptionLanding31: while (true) {
try {
try {
binding = env3_0;
binding2 = env3_2;
} catch (error) {
break exceptionLanding31;
}
} catch (error) {
break exceptionLanding51;
}
break reducibleJoin6;
try {
try {
property = binding2[9];
} catch (error) {
break exceptionLanding31;
}
} catch (error) {
break exceptionLanding51;
}
try {
try {
value5 = binding(property);
} catch (error) {
break exceptionLanding31;
}
} catch (error) {
break exceptionLanding51;
}
try {
try {
createOrder = value5.createOrder;
} catch (error) {
break exceptionLanding31;
}
} catch (error) {
break exceptionLanding51;
}
try {
try {
object = {};
} catch (error) {
break exceptionLanding31;
}
} catch (error) {
break exceptionLanding51;
}
try {
try {
object.orderLineItems = orderLineItems;
} catch (error) {
break exceptionLanding31;
}
} catch (error) {
break exceptionLanding51;
}
try {
try {
} catch (error) {
break exceptionLanding31;
}
} catch (error) {
break exceptionLanding51;
}
try {
try {
object.paymentGateway = importDefault;
} catch (error) {
break exceptionLanding31;
}
} catch (error) {
break exceptionLanding51;
}
try {
try {
} catch (error) {
break exceptionLanding31;
}
} catch (error) {
break exceptionLanding51;
}
try {
try {
object.isGift = dependencyMap;
} catch (error) {
break exceptionLanding31;
}
} catch (error) {
break exceptionLanding51;
}
try {
try {
order = Reflect.apply(createOrder, value5, [object]);
} catch (error) {
break exceptionLanding31;
}
} catch (error) {
break exceptionLanding51;
}
await order;
try {
try {
value6 = undefined;
value7 = false;
} catch (error) {
break exceptionLanding31;
}
} catch (error) {
break exceptionLanding51;
}
if (value7) {
NativeCheckoutStoreContext(false);
return value6;
}
try {
try {
} catch (error) {
break exceptionLanding31;
}
} catch (error) {
break exceptionLanding51;
}
try {
try {
ActivityIndicator(value6);
} catch (error) {
break exceptionLanding31;
}
} catch (error) {
break exceptionLanding51;
}
try {
try {
binding = env2_3;
} catch (error) {
break exceptionLanding31;
}
} catch (error) {
break exceptionLanding51;
}
try {
try {
value8 = binding == null;
} catch (error) {
break exceptionLanding31;
}
} catch (error) {
break exceptionLanding51;
}
reducibleJoin29: while (true) {
if (value8) {
break reducibleJoin29;
}
try {
try {
binding = env2_3;
} catch (error) {
break exceptionLanding31;
}
} catch (error) {
break exceptionLanding51;
}
try {
try {
binding(value6);
} catch (error) {
break exceptionLanding31;
}
} catch (error) {
break exceptionLanding51;
}
break reducibleJoin29;
}
NativeCheckoutStoreContext(false);
return undefined;
}
try {
createNativeStoreBinding = createNativeStore;
} catch (error) {
break exceptionLanding51;
}
try {
Error = global.Error;
} catch (error) {
break exceptionLanding51;
}
try {
value9 = error instanceof Error;
} catch (error) {
break exceptionLanding51;
}
if (value9) {
r2 = error;
NativeCheckoutStoreContext(false);
throw error;
}
function _fun59050() { // fn#59050, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7513:1562, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
return env0_0.apply(this, arguments);
}
}
function _fun59051() { // fn#59051, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7513:1637, offset: 0x016e0080, size: 226 bytes, params: 1, frame: 16
var environment;
var defaultPlansBinding;
var items3;
var push;
var value2;
var value3;
var items2;
if (waitAndCreateOrder) {
if (JsxRuntimeModule.jsx != null) {
if (ReactModule == null) {
if (env0_7 == null) {
if (!env0_10.current) {
items3 = [];
defaultPlansBinding = defaultPlans;
if (defaultPlansBinding != null) {
push = items3.push;
defaultPlansBinding = defaultPlans;
value3 = defaultPlansBinding.map(function(a0) {
return {sku_id: a0.skuId, subscription_plan_id: a0.subscriptionPlanId,
quantity: a0.quantity,
purchase_type: ItemPurchaseType.SUBSCRIPTION};
});
items2 = [];
arraySpread(items2, value3, 0, defaultPlansBinding);
apply(push, items2, items3, defaultPlansBinding);
} else if (JsxRuntimeModule.jsx != null) {
push = items3.push;
value2 = environment.__proto__;
Reflect.apply(push, items3, [{sku_id: JsxRuntimeModule.jsx, quantity: 1,
purchase_type: ItemPurchaseType.ONE_TIME}]);
}
env0_10.current = true;
env0_12({orderLineItems: items3});
}
}
}
} else {
try {
Error = global.Error;
} catch (error) {
break exceptionLanding51;
defaultPlansBinding = defaultPlans;
if (defaultPlansBinding != null) {
if (ReactModule == null) {
if (env0_7 == null) {
if (!env0_10.current) {
items3 = [];
defaultPlansBinding = defaultPlans;
if (defaultPlansBinding != null) {
push = items3.push;
defaultPlansBinding = defaultPlans;
value3 = defaultPlansBinding.map(_fun59052);
items2 = [];
arraySpread(items2, value3, 0, defaultPlansBinding);
apply(push, items2, items3, defaultPlansBinding);
} else if (JsxRuntimeModule.jsx != null) {
push = items3.push;
value2 = environment.__proto__;
Reflect.apply(push, items3, [{sku_id: JsxRuntimeModule.jsx, quantity: 1,
purchase_type: ItemPurchaseType.ONE_TIME}]);
}
env0_10.current = true;
env0_12({orderLineItems: items3});
}
}
}
}
try {
String = global.String;
} catch (error) {
break exceptionLanding51;
}
try {
value10 = String(error);
} catch (error) {
break exceptionLanding51;
}
try {
prototype = Error.prototype;
} catch (error) {
break exceptionLanding51;
}
try {
} catch (error) {
break exceptionLanding51;
}
try {
error = new Error();
} catch (error) {
break exceptionLanding51;
}
try {
value12 = error instanceof Object ? error : undefined;
} catch (error) {
break exceptionLanding51;
}
r2 = value12;
}
try {
createNativeStoreBinding(r2);
} catch (error) {
break exceptionLanding51;
}
break reduciblePort50;
}
NativeCheckoutStoreContext(false);
return undefined;
function _fun59052({skuId, subscriptionPlanId, quantity}) { // fn#59052, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7513:1732, offset: 0x016e0162, size: 57 bytes, params: 2, frame: 3
const SUBSCRIPTION = ItemPurchaseType.SUBSCRIPTION;
return {sku_id: skuId, subscription_plan_id: subscriptionPlanId, quantity: quantity, purchase_type: SUBSCRIPTION};
}
}
try {
try {
binding2 = env3_2;
} catch (error) {
break exceptionLanding31;
}
} catch (error) {
break exceptionLanding51;
}
try {
try {
property = binding2[9];
} catch (error) {
break exceptionLanding31;
}
} catch (error) {
break exceptionLanding51;
}
try {
try {
value5 = binding(property);
} catch (error) {
break exceptionLanding31;
}
} catch (error) {
break exceptionLanding51;
}
try {
try {
createOrder = value5.createOrder;
} catch (error) {
break exceptionLanding31;
}
} catch (error) {
break exceptionLanding51;
}
try {
try {
object2 = {};
} catch (error) {
break exceptionLanding31;
}
} catch (error) {
break exceptionLanding51;
}
try {
try {
object2.orderLineItems = orderLineItems;
} catch (error) {
break exceptionLanding31;
}
} catch (error) {
break exceptionLanding51;
}
try {
try {
} catch (error) {
break exceptionLanding31;
}
} catch (error) {
break exceptionLanding51;
}
try {
try {
object2.paymentGateway = importDefault;
} catch (error) {
break exceptionLanding31;
}
} catch (error) {
break exceptionLanding51;
}
try {
try {
} catch (error) {
break exceptionLanding31;
}
} catch (error) {
break exceptionLanding51;
}
try {
try {
object2.isGift = dependencyMap;
} catch (error) {
break exceptionLanding31;
}
} catch (error) {
break exceptionLanding51;
}
try {
try {
order = Reflect.apply(createOrder, value5, [object2]);
} catch (error) {
break exceptionLanding31;
}
} catch (error) {
break exceptionLanding51;
}
await order;
try {
try {
value6 = undefined;
value7 = false;
} catch (error) {
break exceptionLanding31;
}
} catch (error) {
break exceptionLanding51;
}
if (value7) {
NativeCheckoutStoreContext(false);
return value6;
}
try {
try {
} catch (error) {
break exceptionLanding31;
}
} catch (error) {
break exceptionLanding51;
}
try {
try {
ActivityIndicator(value6);
} catch (error) {
break exceptionLanding31;
}
} catch (error) {
break exceptionLanding51;
}
try {
try {
binding = env2_3;
} catch (error) {
break exceptionLanding31;
}
} catch (error) {
break exceptionLanding51;
}
try {
try {
value8 = binding == null;
} catch (error) {
break exceptionLanding31;
}
} catch (error) {
break exceptionLanding51;
}
reducibleJoin29: while (true) {
if (value8) {
break reducibleJoin29;
}
try {
try {
binding = env2_3;
} catch (error) {
break exceptionLanding31;
}
} catch (error) {
break exceptionLanding51;
}
try {
try {
binding(value6);
} catch (error) {
break exceptionLanding31;
}
} catch (error) {
break exceptionLanding51;
}
break reducibleJoin29;
}
NativeCheckoutStoreContext(false);
return undefined;
}
NativeCheckoutStoreContext(false);
throw error;
}
function _fun59052({skuId, subscriptionPlanId, quantity}) { // fn#59052, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7513:1732, offset: 0x016e0162, size: 57 bytes, params: 2, frame: 3
const SUBSCRIPTION = ItemPurchaseType.SUBSCRIPTION;
return {sku_id: skuId, subscription_plan_id: subscriptionPlanId, quantity: quantity, purchase_type: SUBSCRIPTION};
}
global.__d(_fun59041, 7335, [5, 57, 31, 27, 7042, 4095, 33, 4501, 6518, 7299, 491, 1216,
2]) /* metro module 7335, dependencies: [5, 57, 31, 27, 7042, 4095, 33, 4501, 6518, 7299, 491, 1216, 2] */;
@@ -1,207 +1,217 @@
/* Metro module 7010; source: modules/checkout/native/useGiftCardMobileConsumptionHalfsheet.tsx; dependencies: [57, 31, 7011, 3805, 1376, 482, 7012, 566, 1365, 7013, 4223, 694, 7017, 1962, 4080, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import Dispatcher from '../../../Dispatcher.tsx'; /* Metro dependency 694 */
import PaymentSourceStore from '../../../stores/billing/PaymentSourceStore.tsx'; /* Metro dependency 3805 */
import WalletBalanceStore from '../../billing/stores/WalletBalanceStore.tsx'; /* Metro dependency 7011 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ConstantsModule from '../../../external/discord_common/js/shared/Constants.tsx'; /* Metro dependency 482 */
import * as FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as Dismissible_contentModule from '../../../external/discord_common/js/packages/protos/discord_protos/discord_users/v1/dismissible_content.tsx'; /* Metro dependency 1365 */
import * as DismissibleContentConstantsModule from '../../dismissible_content/DismissibleContentConstants.tsx'; /* Metro dependency 1376 */
import * as GiftCardsExperimentModule from '../../billing/experiments/GiftCardsExperiment.tsx'; /* Metro dependency 7012 */
import * as UseSelectedDismissibleContentModule from '../../dismissible_content/hooks/useSelectedDismissibleContent.tsx'; /* Metro dependency 7013 */
function _fun55507(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#55507, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7188:6, offset: 0x013a8eea, size: 259 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 walletBalanceStore = importDefault(7011) /* metro dependency 7011: WalletBalanceStore */;
const paymentSourceStore = importDefault(3805) /* metro dependency 3805: PaymentSourceStore */;
const env0_7 = (require(1376) /* metro dependency 1376: DismissibleContentConstants */).ContentDismissActionType;
const env0_8 = (require(482) /* metro dependency 482: Constants */).PaymentSourceTypes;
const env0_10 = ({Idle: 'idle', Opening: 'opening', Opened: 'opened'}).Idle;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/checkout/native/useGiftCardMobileConsumptionHalfsheet.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/checkout/native/useGiftCardMobileConsumptionHalfsheet.tsx');
exports.useGiftCardMobileConsumptionHalfsheet = useGiftCardMobileConsumptionHalfsheet;
}
function useGiftCardMobileConsumptionHalfsheet() { // fn#55508, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7188:473, offset: 0x013a8fed, size: 505 bytes, params: 1, frame: 24
const giftCardsExperimentModule = require(7012) /* metro dependency 7012: GiftCardsExperiment */;
const useGiftCardsExperimentConfig = giftCardsExperimentModule.useGiftCardsExperimentConfig;
const enabled = Reflect.apply(useGiftCardsExperimentConfig, giftCardsExperimentModule,
[{location: 'useGiftCardMobileConsumptionHalfsheet'}]).enabled;
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([PaymentSourceStore], _fun55509,
[enabled]);
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([WalletBalanceStore], _fun55510,
[value2]);
let r5 = enabled && value2 != null && !(require(566) /* metro dependency 566: flux */).useStateFromStores([WalletBalanceStore],
_fun55511, [value2]);
r5 = r5 && value3 != null && value3.amount > 0;
const binding = env0_4;
const useMemo = binding.useMemo;
let value = env0_3((require(7013) /* metro dependency 7013: useSelectedDismissibleContent */).useSelectedDismissibleContent(Reflect.apply(useMemo,
binding, [_fun55512, [r5]]), undefined, true), 2);
const property = value[0];
const property2 = value[1];
const env0_5 = binding.useRef(property2);
binding.useEffect(_fun55513, [property2]);
value = binding.useCallback(_fun55514, []);
binding.useEffect(_fun55515, [enabled]);
binding.useEffect(_fun55516, [value2]);
binding.useEffect(_fun55517, [property, value]);
binding.useEffect(_fun55521, [property]);
}
function _fun55509() { // fn#55509, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7188:659, offset: 0x013a91e6, size: 105 bytes, params: 1, frame: 14
var r2;
var Object;
var values;
var value2;
var length;
var value3;
var property;
var type;
var TDS_WALLET;
var value4;
if (enabled) {
Object = global.Object;
values = Object.values;
value = environment.__proto__;
value2 = Reflect.apply(values, Object, [PaymentSourceStore.paymentSources]);
length = value2.length;
value3 = 0;
if (value3 < length) {
r2 = value3;
loopExit3: while (true) {
property = value2[r2];
type = property.type;
TDS_WALLET = PaymentSourceTypes.TDS_WALLET;
if (type === TDS_WALLET) {
return property.id;
}
value4 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
function useGiftCardMobileConsumptionHalfsheet() { // fn#55508, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7188:473, offset: 0x013a8fed, size: 505 bytes, params: 1, frame: 24
const useGiftCardsExperimentConfig = GiftCardsExperimentModule.useGiftCardsExperimentConfig;
const enabled = Reflect.apply(useGiftCardsExperimentConfig, GiftCardsExperimentModule,
[{location: 'useGiftCardMobileConsumptionHalfsheet'}]).enabled;
let useStateFromStores = FluxModule.useStateFromStores;
const value2 = Reflect.apply(useStateFromStores, FluxModule, [[PaymentSourceStore], _fun55509, [enabled]]);
useStateFromStores = FluxModule.useStateFromStores;
const walletBalanceStoreBinding = WalletBalanceStore;
const value3 = Reflect.apply(useStateFromStores, FluxModule, [[walletBalanceStoreBinding], _fun55510, [value2]]);
let r5 = enabled && value2 != null && !FluxModule.useStateFromStores([walletBalanceStoreBinding], _fun55511,
[value2]);
r5 = r5 && value3 != null && value3.amount > 0;
const useMemo = ReactModule.useMemo;
let value = Module00057((UseSelectedDismissibleContentModule).useSelectedDismissibleContent(Reflect.apply(useMemo,
ReactModule, [_fun55512, [r5]]), undefined, true), 2);
const property = value[0];
const property2 = value[1];
const env0_5 = ReactModule.useRef(property2);
ReactModule.useEffect(_fun55513, [property2]);
value = ReactModule.useCallback(_fun55514, []);
ReactModule.useEffect(_fun55515, [enabled]);
ReactModule.useEffect(_fun55516, [value2]);
ReactModule.useEffect(_fun55517, [property, value]);
ReactModule.useEffect(_fun55521, [property]);
function _fun55509() { // fn#55509, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7188:659, offset: 0x013a91e6, size: 105 bytes, params: 1, frame: 14
var r2;
var Object;
var values;
var value2;
var length;
var value3;
var property;
var type;
var TDS_WALLET;
var value4;
if (enabled) {
Object = global.Object;
values = Object.values;
value = environment.__proto__;
value2 = Reflect.apply(values, Object, [PaymentSourceStore.paymentSources]);
length = value2.length;
if (value4 < length) {
r2 = value4;
continue;
value3 = 0;
if (value3 < length) {
r2 = value3;
loopExit3: while (true) {
property = value2[r2];
type = property.type;
TDS_WALLET = PaymentSourceTypes.TDS_WALLET;
if (type === TDS_WALLET) {
return property.id;
}
value4 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
length = value2.length;
if (value4 < length) {
r2 = value4;
continue;
}
break loopExit3;
}
return null;
}
break loopExit3;
}
return null;
}
}
return null;
}
function _fun55510() { // fn#55510, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7188:845, offset: 0x013a924f, size: 42 bytes, params: 1, frame: 12
const value2 = null;
return value2 != env0_1 ? WalletBalanceStore.getBalance(env0_1) : value2;
}
function _fun55511() { // fn#55511, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7188:918, offset: 0x013a9279, size: 40 bytes, params: 1, frame: 12
return env0_1 != null && WalletBalanceStore.getIsFetching(env0_1);
}
function _fun55512() { // fn#55512, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7188:1007, offset: 0x013a92a1, size: 66 bytes, params: 1, frame: 12
return env0_2 ? [(require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent.GIFT_CARD_MOBILE_CONSUMPTION_UNAVAILABLE_HALFSHEET] : [];
}
function _fun55514(a0) { // fn#55514, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7188:1250, offset: 0x013a92f8, size: 24 bytes, params: 2, frame: 11
env0_5.current(a0);
}
function _fun55515() { // fn#55515, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7188:1286, offset: 0x013a9310, size: 49 bytes, params: 1, frame: 11
var value;
if (enabled) {
value = environment.__proto__;
value = require(4223) /* metro dependency 4223: BillingActionCreators */;
value.fetchPaymentSources();
}
}
function _fun55516() { // fn#55516, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7188:1345, offset: 0x013a9341, size: 57 bytes, params: 1, frame: 12
var value2;
if (env0_1 != null) {
value2 = environment.__proto__;
(require(4223) /* metro dependency 4223: BillingActionCreators */).fetchWalletInformation(env0_1);
}
}
function _fun55517() { // fn#55517, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7188:1414, offset: 0x013a937a, size: 244 bytes, params: 1, frame: 21
var Opening;
var value3;
var defaultImport2;
const binding = env0_3;
const DismissibleContent = require(dependencyMap[8]).DismissibleContent;
const GIFT_CARD_MOBILE_CONSUMPTION_UNAVAILABLE_HALFSHEET = DismissibleContent.GIFT_CARD_MOBILE_CONSUMPTION_UNAVAILABLE_HALFSHEET;
if (binding === GIFT_CARD_MOBILE_CONSUMPTION_UNAVAILABLE_HALFSHEET) {
var Idle2 = env1_9.Idle;
if (Idle === Idle2) {
Opening = env1_9.Opening;
importDefault(dependencyMap[11]).subscribe('SHOW_ACTION_SHEET', handleShow);
value3 = require(dependencyMap[13])(dependencyMap[12], dependencyMap.paths);
value3.catch(_fun55519);
defaultImport2 = importDefault(dependencyMap[14]);
defaultImport2.openLazy(value3, 'GiftCardMobileConsumptionActionSheet', {markAsDismissed: env0_6}, 'stack');
return _fun55520;
function _fun55510() { // fn#55510, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7188:845, offset: 0x013a924f, size: 42 bytes, params: 1, frame: 12
const value2 = null;
return value2 != env0_1 ? WalletBalanceStore.getBalance(env0_1) : value2;
}
function _fun55511() { // fn#55511, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7188:918, offset: 0x013a9279, size: 40 bytes, params: 1, frame: 12
return env0_1 != null && WalletBalanceStore.getIsFetching(env0_1);
}
function _fun55512() { // fn#55512, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7188:1007, offset: 0x013a92a1, size: 66 bytes, params: 1, frame: 12
return env0_2 ? [(require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent.GIFT_CARD_MOBILE_CONSUMPTION_UNAVAILABLE_HALFSHEET] : [];
}
function _fun55513() { // fn#55513, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7188:1205, offset: 0x013a92e3, size: 21 bytes, params: 1, frame: 2
env0_5.current = ReactModule;
}
function _fun55514(a0) { // fn#55514, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7188:1250, offset: 0x013a92f8, size: 24 bytes, params: 2, frame: 11
env0_5.current(a0);
}
function _fun55515() { // fn#55515, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7188:1286, offset: 0x013a9310, size: 49 bytes, params: 1, frame: 11
var value;
if (enabled) {
value = environment.__proto__;
value = require(4223) /* metro dependency 4223: BillingActionCreators */;
value.fetchPaymentSources();
}
}
function _fun55516() { // fn#55516, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7188:1345, offset: 0x013a9341, size: 57 bytes, params: 1, frame: 12
var value2;
if (env0_1 != null) {
value2 = environment.__proto__;
(require(4223) /* metro dependency 4223: BillingActionCreators */).fetchWalletInformation(env0_1);
}
}
function _fun55517() { // fn#55517, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7188:1414, offset: 0x013a937a, size: 244 bytes, params: 1, frame: 21
var Opening;
var value3;
var defaultImport2;
const DismissibleContent = require(dependencyMap[8]).DismissibleContent;
const GIFT_CARD_MOBILE_CONSUMPTION_UNAVAILABLE_HALFSHEET = DismissibleContent.GIFT_CARD_MOBILE_CONSUMPTION_UNAVAILABLE_HALFSHEET;
if (Module00057 === GIFT_CARD_MOBILE_CONSUMPTION_UNAVAILABLE_HALFSHEET) {
var Idle2 = env1_9.Idle;
if (Idle === Idle2) {
Opening = env1_9.Opening;
importDefault(dependencyMap[11]).subscribe('SHOW_ACTION_SHEET', handleShow);
value3 = require(dependencyMap[13])(dependencyMap[12], dependencyMap.paths);
value3.catch(_fun55519);
defaultImport2 = importDefault(dependencyMap[14]);
defaultImport2.openLazy(value3, 'GiftCardMobileConsumptionActionSheet', {markAsDismissed: env0_6}, 'stack');
return _fun55520;
}
}
function handleShow(a0) { // fn#55518, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7188:1549, offset: 0x013a946e, size: 52 bytes, params: 2, frame: 3
var Opened;
var value;
if (!(env0_0 || a0.key !== 'GiftCardMobileConsumptionActionSheet')) {
value = environment.__proto__.__proto__;
Opened = env2_9.Opened;
}
}
function _fun55519() { // fn#55519, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7188:1678, offset: 0x013a94a2, size: 55 bytes, params: 1, frame: 3
var r0;
var Idle2;
var value;
const binding = env0_0;
if (binding) {
r0 = binding;
} else {
value = environment.__proto__.__proto__;
value = Idle !== env2_9.Opening;
r0 = value;
}
if (!r0) {
value = environment.__proto__.__proto__;
Idle2 = env2_9.Idle;
}
}
function _fun55520() { // fn#55520, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7188:1766, offset: 0x013a94d9, size: 88 bytes, params: 1, frame: 15
var Idle2;
const defaultImport = Dispatcher;
defaultImport.unsubscribe('SHOW_ACTION_SHEET', handleShow);
const Opening = env2_9.Opening;
if (Idle === Opening) {
Idle2 = env2_9.Idle;
}
}
}
function _fun55521() { // fn#55521, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7188:1879, offset: 0x013a9531, size: 104 bytes, params: 1, frame: 15
var environment;
const value = environment.__proto__;
const DismissibleContent = (Dismissible_contentModule).DismissibleContent;
const GIFT_CARD_MOBILE_CONSUMPTION_UNAVAILABLE_HALFSHEET = DismissibleContent.GIFT_CARD_MOBILE_CONSUMPTION_UNAVAILABLE_HALFSHEET;
if (Module00057 === GIFT_CARD_MOBILE_CONSUMPTION_UNAVAILABLE_HALFSHEET) {
(importDefault(694) /* metro dependency 694: Dispatcher */).subscribe('HIDE_ACTION_SHEET', handleHide);
return _fun55523;
}
function handleHide({key}) { // fn#55522, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7188:1985, offset: 0x013a9599, size: 52 bytes, params: 2, frame: 11
var value;
var binding;
var current;
if (key === 'GiftCardMobileConsumptionActionSheet') {
value = environment.__proto__;
binding = env1_5;
current = binding.current;
value = environment.__proto__.__proto__;
Reflect.apply(current, binding, [ContentDismissActionType.USER_DISMISS]);
}
}
function _fun55523() { // fn#55523, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7188:2085, offset: 0x013a95cd, size: 50 bytes, params: 1, frame: 14
let value = environment.__proto__.__proto__;
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.unsubscribe('HIDE_ACTION_SHEET', handleHide);
}
}
}
}
function _fun55521() { // fn#55521, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7188:1879, offset: 0x013a9531, size: 104 bytes, params: 1, frame: 15
var environment;
const binding = env0_3;
const value = environment.__proto__;
const DismissibleContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent;
const GIFT_CARD_MOBILE_CONSUMPTION_UNAVAILABLE_HALFSHEET = DismissibleContent.GIFT_CARD_MOBILE_CONSUMPTION_UNAVAILABLE_HALFSHEET;
if (binding === GIFT_CARD_MOBILE_CONSUMPTION_UNAVAILABLE_HALFSHEET) {
(importDefault(694) /* metro dependency 694: Dispatcher */).subscribe('HIDE_ACTION_SHEET', handleHide);
return _fun55523;
}
}
function handleShow(a0) { // fn#55518, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7188:1549, offset: 0x013a946e, size: 52 bytes, params: 2, frame: 3
var Opened;
var value;
if (!(env0_0 || a0.key !== 'GiftCardMobileConsumptionActionSheet')) {
value = environment.__proto__.__proto__;
Opened = env2_9.Opened;
}
}
function _fun55519() { // fn#55519, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7188:1678, offset: 0x013a94a2, size: 55 bytes, params: 1, frame: 3
var r0;
var Idle2;
var value;
const binding = env0_0;
if (binding) {
r0 = binding;
} else {
value = environment.__proto__.__proto__;
value = Idle !== env2_9.Opening;
r0 = value;
}
if (!r0) {
value = environment.__proto__.__proto__;
Idle2 = env2_9.Idle;
}
}
function _fun55520() { // fn#55520, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7188:1766, offset: 0x013a94d9, size: 88 bytes, params: 1, frame: 15
var Idle2;
const defaultImport = importDefault(694) /* metro dependency 694: Dispatcher */;
defaultImport.unsubscribe('SHOW_ACTION_SHEET', handleShow);
const Opening = env2_9.Opening;
if (Idle === Opening) {
Idle2 = env2_9.Idle;
}
}
function handleHide({key}) { // fn#55522, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7188:1985, offset: 0x013a9599, size: 52 bytes, params: 2, frame: 11
var value;
var binding;
var current;
if (key === 'GiftCardMobileConsumptionActionSheet') {
value = environment.__proto__;
binding = env1_5;
current = binding.current;
value = environment.__proto__.__proto__;
Reflect.apply(current, binding, [ContentDismissActionType.USER_DISMISS]);
}
}
function _fun55523() { // fn#55523, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7188:2085, offset: 0x013a95cd, size: 50 bytes, params: 1, frame: 14
let value = environment.__proto__.__proto__;
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.unsubscribe('HIDE_ACTION_SHEET', handleHide);
}
global.__d(_fun55507, 7010, [57, 31, 7011, 3805, 1376, 482, 7012, 566, 1365, 7013, 4223, 694, 7017, 1962, 4080,
2]) /* metro module 7010, dependencies: [57, 31, 7011, 3805, 1376, 482, 7012, 566, 1365, 7013, 4223, 694, 7017, 1962, 4080, 2] */;