Initial commit

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

No files matched your search

@@ -0,0 +1,223 @@
/* Metro module 14578; source: modules/application_account_linking/native/AccountLinkBanner.tsx; dependencies: [31, 27, 1878, 1376, 33, 697, 6780, 14579, 8518, 4582, 4501, 632, 6771, 6789, 6239, 5278, 5312, 1305, 4573, 1244, 4578, 10007, 2] */
function _fun110287(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#110287, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14775:6, offset: 0x02372df4, size: 1018 bytes, params: 8, frame: 34
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_3 = value2.Image;
const env0_4 = value2.View;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_6 = (require(1376) /* metro dependency 1376: DismissibleContentConstants */).ContentDismissActionType;
const value3 = require(33) /* metro dependency 33 */;
const env0_7 = value3.jsx;
const env0_8 = value3.jsxs;
const env0_9 = value3.Fragment;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
const PX_82 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
const GameIconSizes = (require(6780) /* metro dependency 6780: GameIcon */).GameIconSizes;
const NORMAL = GameIconSizes.NORMAL;
const GameIconImageSize = (require(6780) /* metro dependency 6780: GameIcon */).GameIconImageSize;
const env0_16 = GameIconImageSize[NORMAL];
const PX_162 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
const PX_122 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
let createStyles = createStylesModule.createStyles;
object2 = {};
object2.card = {padding: PX_12};
const object6 = {'position': 'absolute', 'top': null, 'right': null, 'width': 24, 'height': 24,
'alignItems': 'center', 'justifyContent': 'center', 'zIndex': 1};
const PX_123 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object6.top = PX_123;
const PX_124 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object6.right = PX_124;
object2.closeButton = object6;
object2.imagesContainer = {'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'center'};
const object7 = {'flexDirection': 'row', 'alignItems': 'center'};
const PX_83 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object7.marginHorizontal = PX_83;
const PX_42 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object7.gap = PX_42;
object2.ellipsisContainer = object7;
const object8 = {};
const PX_43 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object8.width = PX_43;
const PX_44 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object8.height = PX_44;
const PX_45 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object8.borderRadius = PX_45 / 2;
const INTERACTIVE_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_MUTED;
object8.backgroundColor = INTERACTIVE_MUTED;
object2.ellipsisDot = object8;
object2.title = {marginTop: PX_16, textAlign: 'center'};
object2.body = {marginTop: PX_4, textAlign: 'center'};
object2.ctaContainer = {marginTop: PX_162};
const env0_21 = Reflect.apply(createStyles, createStylesModule, [object2]);
const value5 = createStylesModule;
createStyles = value5.createStyles;
object2 = {};
object2.card = {padding: PX_12};
object2.closeButton = {'width': 24, 'height': 24, 'alignItems': 'center', 'justifyContent': 'center',
'alignSelf': 'flex-start'};
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object2.contentContainer = {flexDirection: 'row', gap: PX_12};
object2.rewardImage = {'width': 48, 'height': 48};
object2.bodyText = {'flexGrow': 1, 'flexShrink': 1, 'alignSelf': 'center'};
object2.ctaContainer = {marginTop: PX_122, width: '100%'};
const env0_22 = Reflect.apply(createStyles, value5, [object2]);
value = value.memo(_fun110295);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_account_linking/native/AccountLinkBanner.tsx');
exports.default = value;
exports.ACCOUNT_LINK_BANNER_MARGIN_TOP = PX_8;
exports.ACCOUNT_LINK_BANNER_MARGIN_BOTTOM = PX_82;
exports.getScaledAccountLinkBannerHeight = getScaledAccountLinkBannerHeight;
}
function AccountLinkLargeBanner({application, markAsDismissed, startAuthorization}) { // fn#110288, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14775:1129, offset: 0x023731ee, size: 1047 bytes, params: 2, frame: 37
var r0;
var Card;
var items4;
var items2;
var ellipsisDot;
var items3;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var formatToPlainString;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const styles = useStyles();
const currentUser = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([UserStore],
function() {
return UserStore.getCurrentUser();
});
const defaultImport = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
const MOBILE_ACCOUNT_LINK_LARGE_BANNER = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).MOBILE_ACCOUNT_LINK_LARGE_BANNER;
const env0_2 = defaultImport(MOBILE_ACCOUNT_LINK_LARGE_BANNER).analyticsLocations;
const name = application.name;
const reward_name = application.applicationAccountLinkBenefitConfig?.reward_name;
if (reward_name == null) {
r0 = null;
} else {
Card = (require(6239) /* metro dependency 6239: CardNative */).Card;
var cardProps = {variant: 'secondary', style: styles.card};
items4 = [((PressableOpacity) => <PressableOpacity accessibilityRole="button" onPress={function() {
return markAsDismissed(ContentDismissActionType.USER_DISMISS);
}} style={styles.closeButton}>{((XSmallIcon) => <XSmallIcon size="sm" color="text-muted" />)((require(5312) /* metro dependency 5312: XSmallIcon */).XSmallIcon)}</PressableOpacity>)((require(5278) /* metro dependency 5278: Pressables */).PressableOpacity)];
var viewBindingProps = {style: styles.imagesContainer};
items2 = [((Component) => <Component game={application} size={NORMAL} />)(importDefault(6780) /* metro dependency 6780: GameIcon */)];
var viewBinding2Props = {style: styles.ellipsisContainer};
ellipsisDot = styles.ellipsisDot;
items3 = [<View style={ellipsisDot} />];
ellipsisDot = styles.ellipsisDot;
items3[1] = <View style={ellipsisDot} />;
ellipsisDot = styles.ellipsisDot;
items3[2] = <View style={ellipsisDot} />;
items2[1] = <View {...viewBinding2Props}>{items3}</View>;
items2[2] = ((Avatar) => <Avatar user={currentUser} size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.LARGE_48} guildId={undefined} />)((require(1305) /* metro dependency 1305: native */).Avatar);
items4[1] = <View {...viewBindingProps}>{items2}</View>;
formatToPlainString = intl.formatToPlainString;
items4[2] = <Text variant={env0_17} color="mobile-text-heading-primary" style={styles.title}>{Reflect.apply(formatToPlainString,
intl, [t['3gpxqO'], {gameName: name}])}</Text>;
formatToPlainString = intl.formatToPlainString;
items4[3] = <Text variant={env0_18} color="text-muted" style={styles.body}>{Reflect.apply(formatToPlainString,
intl,
[t.vxvKMm, {rewardName: reward_name}])}</Text>;
items4[4] = <View style={styles.ctaContainer}>{((Button) => <Button variant="secondary" size="md" text={intl.string(t['0mvtKL'])} onPress={onPress_110291} icon={((ExperimentalGameControllerLinkIcon) => <ExperimentalGameControllerLinkIcon size="sm" />)((require(10007) /* metro dependency 10007: ExperimentalGameControllerLinkIcon */).ExperimentalGameControllerLinkIcon)} />)((require(4578) /* metro dependency 4578: ButtonNative */).Button)}</View>;
r0 = <Card {...cardProps}>{items4}</Card>;
}
return r0;
}
function AccountLinkMediumBanner({application, markAsDismissed, startAuthorization}) { // fn#110292, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14775:2841, offset: 0x02373620, size: 727 bytes, params: 2, frame: 33
var r0;
var Card;
var items3;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var items2;
const styles = useStyles();
const defaultImport = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
const MOBILE_ACCOUNT_LINK_MEDIUM_BANNER = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).MOBILE_ACCOUNT_LINK_MEDIUM_BANNER;
const env0_2 = defaultImport(MOBILE_ACCOUNT_LINK_MEDIUM_BANNER).analyticsLocations;
const name = application.name;
const reward_name = application.applicationAccountLinkBenefitConfig?.reward_name;
const reward_image = application.applicationAccountLinkBenefitConfig?.reward_image;
if (reward_name == null) {
r0 = null;
} else if (reward_image == null) {
r0 = null;
} else {
Card = (require(6239) /* metro dependency 6239: CardNative */).Card;
var cardProps = {variant: 'secondary', style: styles.card};
var viewBindingProps = {style: styles.contentContainer};
items3 = [<Image source={{uri: reward_image}} style={styles.rewardImage} resizeMode="contain" />];
items3[1] = ((Text) => <Text variant="heading-sm/semibold" color="mobile-text-heading-primary" style={styles.bodyText}>{intl.formatToPlainString(t['V/C76E'],
{gameName: name, rewardName: reward_name})}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
items3[2] = ((PressableOpacity) => <PressableOpacity accessibilityRole="button" onPress={function() {
return markAsDismissed(ContentDismissActionType.USER_DISMISS);
}} style={styles.closeButton}>{((XSmallIcon) => <XSmallIcon size="sm" color="text-muted" />)((require(5312) /* metro dependency 5312: XSmallIcon */).XSmallIcon)}</PressableOpacity>)((require(5278) /* metro dependency 5278: Pressables */).PressableOpacity);
items2 = [<View {...viewBindingProps}>{items3}</View>];
items2[1] = <View style={styles.ctaContainer}>{((Button) => <Button variant="secondary" size="sm" text={intl.string(t['0mvtKL'])} onPress={onPress_110294} icon={((ExperimentalGameControllerLinkIcon) => <ExperimentalGameControllerLinkIcon size="xs" />)((require(10007) /* metro dependency 10007: ExperimentalGameControllerLinkIcon */).ExperimentalGameControllerLinkIcon)} />)((require(4578) /* metro dependency 4578: ButtonNative */).Button)}</View>;
r0 = <Card {...cardProps}>{items2}</Card>;
}
return r0;
}
function _fun110295(a0) { // fn#110295, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14775:3986, offset: 0x023738f7, size: 228 bytes, params: 2, frame: 23
var r6;
var r0;
var jsxRuntimeEnv0_9Binding;
const MobileAccountLinkingBannerSize = (require(14579) /* metro dependency 14579: mobileAccountLinkingExperiment */).MobileAccountLinkingBannerSize;
var items2;
const {enabled,
bannerSize} = (importDefault(14579) /* metro dependency 14579: mobileAccountLinkingExperiment */).useConfig({location: 'AccountLinkBanner'});
if (enabled) {
jsxRuntimeEnv0_9Binding = jsxRuntimeEnv0_9;
r6 = bannerSize === MobileAccountLinkingBannerSize.LARGE && <AccountLinkLargeBanner {...a0} />;
items2 = [r6];
r6 = bannerSize === MobileAccountLinkingBannerSize.MEDIUM && <AccountLinkMediumBanner {...a0} />;
items2[1] = r6;
r0 = <>{items2}</>;
} else {
r0 = null;
}
return r0;
}
function getScaledAccountLinkBannerHeight(a0) { // fn#110296, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14775:4503, offset: 0x023739db, size: 369 bytes, params: 2, frame: 22
var r1;
var r0;
const MobileAccountLinkingBannerSize = (require(14579) /* metro dependency 14579: mobileAccountLinkingExperiment */).MobileAccountLinkingBannerSize;
var value9;
var moduleValue;
const {enabled,
bannerSize} = (importDefault(14579) /* metro dependency 14579: mobileAccountLinkingExperiment */).getConfig({location: 'getScaledAccountLinkBannerHeight'});
const value3 = 0;
if (enabled) {
if (bannerSize === MobileAccountLinkingBannerSize.LARGE) {
value9 = PX_8 + PX_12 + env0_16 + PX_16;
moduleValue = require(8518) /* metro dependency 8518: useScaledTextLineHeightAndroid */;
r1 = value9 + moduleValue.scaleTextLineHeight(env0_17,
a0) + PX_4 + 2 * (require(8518) /* metro dependency 8518: useScaledTextLineHeightAndroid */).scaleTextLineHeight(env0_18,
a0) + PX_16 + (require(4582) /* metro dependency 4582: ButtonConstantsNative */).MEDIUM_BUTTON_HEIGHT + PX_12 + PX_8;
} else {
r1 = bannerSize !== MobileAccountLinkingBannerSize.MEDIUM ? value3 : PX_8 + PX_12 + 48 + PX_12 + (require(4582) /* metro dependency 4582: ButtonConstantsNative */).SMALL_BUTTON_HEIGHT + PX_12 + PX_8;
}
r0 = r1;
} else {
r0 = value3;
}
return r0;
}
function AccountLinkLargeBannerOnPress_110291() { // fn#110291, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14775:2400, owner: AccountLinkLargeBanner.onPress, offset: 0x02373605, size: 27 bytes, params: 1, frame: 11
startAuthorization({analyticsLocations: analyticsLocations});
}
@@ -0,0 +1,122 @@
/* Metro module 16219; source: modules/application_account_linking/native/AccountLinkManagerNative.tsx; dependencies: [6, 7, 15, 17, 102, 18, 4078, 16220, 2] */
function _fun125408(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#125408, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16427:6, offset: 0x025d7d91, size: 259 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(6) /* metro dependency 6 */;
const env0_3 = importDefault(7) /* metro dependency 7 */;
const env0_4 = importDefault(15) /* metro dependency 15 */;
const env0_5 = importDefault(17) /* metro dependency 17 */;
const env0_6 = importDefault(102) /* metro dependency 102 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
const AccountLinkManager = (require(16220) /* metro dependency 16220: AccountLinkManager */).AccountLinkManager;
let value = _fun125414(AccountLinkManager);
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_account_linking/native/AccountLinkManagerNative.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_125409() { // fn#125409, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16427:159, offset: 0x025d7e94, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_125409_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _superPropGet_125412(a0, a1, a2, a3) { // fn#125412, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16427:352, offset: 0x025d7ef6, size: 101 bytes, params: 5, frame: 18
let value = a0;
const env0_0 = a2;
const binding = env0_6;
value = env0_5(1 & 3 ? value.prototype : value);
value = binding(value, a1, a2);
return 2 & 3 ? typeof value !== 'function' ? value : _fun125413 : value;
}
function _fun125414(a0) { // fn#125414, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16427:496, offset: 0x025d7f5b, size: 122 bytes, params: 2, frame: 16
const closure = AccountLinkManagerNative;
env0_7(closure, a0);
return env0_3(closure, [{key: '_initialize', value: value_125416}, {key: '_terminate', value: value_125418},
{key: 'evaluatePending', value: value_125419}]);
}
function AccountLinkManagerNative(a0) { // fn#125415, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16427:508, offset: 0x025d7fd5, size: 142 bytes, params: 2, frame: 19
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_2;
binding(this, AccountLinkManagerNative);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_5(AccountLinkManagerNative);
binding = env1_4;
if (_isNativeReflectConstruct_125409()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_5(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
value.unsubscribeBrowser = null;
value.isBrowserOpen = false;
return value;
}
function value_125416() { // fn#125416, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16427:903, offset: 0x025d8063, size: 96 bytes, params: 1, frame: 19
var environment;
let value = environment.__proto__;
_superPropGet_125412(AccountLinkManagerNative, '_initialize', this, 3)([]);
value = require(4078) /* metro dependency 4078: BrowserManager */;
this.unsubscribeBrowser = value.subscribeToIsInAppBrowserOpen(_fun125417);
}
function value_125418() { // fn#125418, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16427:1127, offset: 0x025d80eb, size: 74 bytes, params: 1, frame: 17
const value = environment.__proto__;
_superPropGet_125412(AccountLinkManagerNative, '_terminate', this, 3)([]);
const unsubscribeBrowser = this.unsubscribeBrowser;
if (unsubscribeBrowser != null) {
unsubscribeBrowser.call(this);
}
this.unsubscribeBrowser = null;
}
function value_125419() { // fn#125419, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16427:1316, offset: 0x025d8135, size: 57 bytes, params: 1, frame: 17
var value;
if (!this.isBrowserOpen) {
value = environment.__proto__;
value = _superPropGet_125412(AccountLinkManagerNative, 'evaluatePending', this, 3);
value([]);
}
}
function _fun125417(a0, a1) { // fn#125417, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16427:1043, offset: 0x025d80c3, size: 40 bytes, params: 3, frame: 10
env0_0.isBrowserOpen = a0;
if (a1) {
env0_0.evaluatePending();
}
}
@@ -0,0 +1,220 @@
/* Metro module 15295; source: modules/application_account_linking/native/ConnectionDeprecationBottomSheet.tsx; dependencies: [31, 27, 4234, 5040, 1376, 33, 4501, 697, 3868, 1585, 566, 4915, 6774, 6771, 6789, 4080, 15296, 15297, 1962, 6758, 6275, 4572, 15281, 4573, 1244, 2774, 10076, 4578, 9757, 3866, 1423, 4580, 6780, 6777, 2] */
function _fun116960(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116960, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15492:6, offset: 0x0249dbd2, size: 373 bytes, params: 8, frame: 22
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const applicationStore = importDefault(4234) /* metro dependency 4234: ApplicationStore */;
const connectedAccountsStore = importDefault(5040) /* metro dependency 5040: ConnectedAccountsStore */;
const env0_7 = (require(1376) /* metro dependency 1376: DismissibleContentConstants */).ContentDismissActionType;
let value = require(33) /* metro dependency 33 */;
const env0_8 = value.jsx;
const env0_9 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
const env0_10 = Reflect.apply(createStyles, value, [{iconContainer: {'width': 56, 'height': 56,
'alignItems': 'center', 'justifyContent': 'center'}, content: {paddingHorizontal: PX_16},
text: {textAlign: 'center'}, connectionIcon: {'height': 48, 'width': 48}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_account_linking/native/ConnectionDeprecationBottomSheet.tsx');
exports.default = ConnectionDeprecationBottomSheet;
exports.useShouldShowConnectionDeprecationBottomSheet = useShouldShowConnectionDeprecationBottomSheet;
}
function ConnectionIcon({platform, theme}) { // fn#116961, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15492:418, offset: 0x0249dd47, size: 218 bytes, params: 2, frame: 21
const styles = useStyles();
const isThemeDark2 = (require(3866) /* metro dependency 3866: themes */).isThemeDark(theme);
const avatarUtilsModule = require(1423) /* metro dependency 1423: AvatarUtils */;
const makeSource = avatarUtilsModule.makeSource;
const icon = platform.icon;
const source = Reflect.apply(makeSource, avatarUtilsModule, [isThemeDark2 ? icon.darkPNG : icon.lightPNG]);
const Icon = importDefault(4580) /* metro dependency 4580: Icon */;
const IconSizes = (require(4580) /* metro dependency 4580: Icon */).IconSizes;
const CUSTOM = IconSizes.CUSTOM;
return (
<View style={styles.iconContainer}>
<Icon
size={CUSTOM}
source={source}
disableColor
style={styles.connectionIcon}
/>
</View>
);
}
function ApplicationIcon({application}) { // fn#116962, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15492:694, offset: 0x0249de21, size: 128 bytes, params: 2, frame: 21
const styles = useStyles();
return (
<View style={styles.iconContainer}>
{application != null ? ((Component) => <Component game={application} size={(require(6780) /* metro dependency 6780: GameIcon */).GameIconSizes.NORMAL} />)(importDefault(6780) /* metro dependency 6780: GameIcon */) : null}
</View>
);
}
function ConnectionDeprecationBottomSheet({platformTypes, applicationName, markAsDismissed}) { // fn#116963, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15492:984, offset: 0x0249dea1, size: 1309 bytes, params: 2, frame: 38
const styles = useStyles();
const nativeModule = require(3868) /* metro dependency 3868: native */;
const useThemeContext = nativeModule.useThemeContext;
const theme = Reflect.apply(useThemeContext, nativeModule, []).theme;
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ConnectedAccountsStore],
_fun116964);
const r28 = value3 != null ? (importDefault(4915) /* metro dependency 4915: Platforms */).get(value3) : null;
const replacedBy = r28?.replacedBy;
const application = (require(566) /* metro dependency 566: flux */).useStateFromStores([ApplicationStore],
function() {
return ApplicationStore.getApplication(replacedBy);
});
const startAuthorization = (importDefault(6774) /* metro dependency 6774: useStartAuthorize */)(application).startAuthorization;
const env0_3 = startAuthorization;
const defaultImport2 = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
const ACTION_SHEET = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).ACTION_SHEET;
const value6 = env0_3.useCallback(_fun116967, [replacedBy, defaultImport2(ACTION_SHEET).analyticsLocations,
startAuthorization, markAsDismissed]);
if (r28 == null) {
return false;
}
if (application == null) {
return false;
}
const r27 = applicationName ?? application.name;
const BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
const bottomSheetTitleHeader = <BottomSheetTitleHeader title={null} />;
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const object = {paddingBottom: bottom};
const Stack2 = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const connectionIcon = <ConnectionIcon theme={theme} platform={r28} />;
const UnionIcon = (require(15281) /* metro dependency 15281: RobloxConnectionCoachmark */).UnionIcon;
const items2 = [<Stack2 justify="center" align="center" direction="horizontal">{connectionIcon}<UnionIcon theme={theme} /><ApplicationIcon application={application} /></Stack2>];
const Stack3 = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
let text = styles.text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const text2 = <Text variant="heading-xl/bold" style={text}>{Reflect.apply(string, intl,
[(importDefault(2774) /* metro dependency 2774: ApplicationAccountLinkingMessages */).vycLU2])}</Text>;
text = styles.text;
const format = intl.format;
const DfSSdL = (importDefault(2774) /* metro dependency 2774: ApplicationAccountLinkingMessages */).DfSSdL;
items2[1] = <Stack3 justify="center">{text2}<Text variant="text-md/medium" style={text}>{Reflect.apply(format, intl,
[DfSSdL, {connectionName: r28.name, applicationName: r27, orbCount: 200,
orbsIconHook: orbsIconHook}])}</Text></Stack3>;
const Stack4 = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
string = intl.string;
const ZeOhh9 = (importDefault(2774) /* metro dependency 2774: ApplicationAccountLinkingMessages */).ZeOhh9;
const WindowLaunchIcon = (require(9757) /* metro dependency 9757: WindowLaunchIcon */).WindowLaunchIcon;
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
const button = <Button text={Reflect.apply(string, intl,
[ZeOhh9])} icon={<WindowLaunchIcon size="sm" color={WHITE} />} iconPosition="end" size="lg" onPress={value6} />;
string = intl.string;
const TulDPl = (require(1244) /* metro dependency 1244: indexNative */).t.TulDPl;
items2[2] = <Stack4>{button}<Button text={Reflect.apply(string, intl,
[TulDPl])} variant="secondary" size="lg" onPress={function() {
importDefault(dependencyMap[15]).hideActionSheet();
if (markAsDismissed != null) {
markAsDismissed(ContentDismissActionType.DISMISS);
}
}} /></Stack4>;
return (
<BottomSheet
startExpanded
contentStyles={styles.content}
header={bottomSheetTitleHeader}
onDismiss={function() {
return markAsDismissed(ContentDismissActionType.DISMISS);
}}
>
<Stack spacing={24} style={object}>
{items2}
</Stack>
</BottomSheet>
);
}
function useShouldShowConnectionDeprecationBottomSheet({deprecatedPlatformTypes}) { // fn#116972, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15492:3034, offset: 0x0249e5c0, size: 196 bytes, params: 2, frame: 18
const {fetchingConnections,
matchingPlatform} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([ConnectedAccountsStore],
_fun116973);
const value4 = (require(6777) /* metro dependency 6777: useGetOrFetchApplications */).useGetOrFetchApplication(matchingPlatform != null ? matchingPlatform.replacedBy : null);
const value = (importDefault(6774) /* metro dependency 6774: useStartAuthorize */)(value4);
const hasAlreadyLinked = value.hasAlreadyLinked;
const canStartAuthorization = value.canStartAuthorization;
let r0 = fetchingConnections || !value.fetched;
r0 = !r0 ? !canStartAuthorization : r0;
r0 = !r0 ? value4 == null : r0;
r0 = !r0 && !hasAlreadyLinked;
return r0;
}
function _fun116964() { // fn#116964, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15492:1179, offset: 0x0249e3be, size: 55 bytes, params: 1, frame: 11
var environment;
let value = environment.__proto__;
value = ConnectedAccountsStore.getAccounts();
value = value.find(function(a0) {
return platformTypes.includes(a0.type);
});
return value?.type;
}
function _fun116967() { // fn#116967, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15492:1495, offset: 0x0249e42b, size: 144 bytes, params: 1, frame: 16
var environment;
let value = environment.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
if (markAsDismissed != null) {
markAsDismissed(ContentDismissActionType.PRIMARY);
}
startAuthorization({analyticsLocations: analyticsLocations});
value = require(15296) /* metro dependency 15296: AccountLinkingActionCreators */;
value.accountLinkAuthorizationStarted(replacedBy, {}, {onSuccess: onSuccess_116968});
}
function orbsIconHook() { // fn#116970, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15492:2537, owner: ConnectionDeprecationBottomSheet.orbsIconHook, offset: 0x0249e527, size: 84 bytes, params: 1, frame: 16
const OrbsIcon = (require(10076) /* metro dependency 10076: OrbsIcon */).OrbsIcon;
const TEXT_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_STRONG;
return <OrbsIcon size="xs" color={TEXT_STRONG} />;
}
function _fun116973() { // fn#116973, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15492:3163, offset: 0x0249e684, size: 78 bytes, params: 1, frame: 13
var environment;
const object2 = {};
let value = environment.__proto__;
object2.fetchingConnections = ConnectedAccountsStore.isFetching();
value = ConnectedAccountsStore.getAccounts();
value = value.map(_fun116974);
object2.matchingPlatform = value.find(_fun116975);
return object2;
}
function onSuccess_116968() { // fn#116968, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15492:1632, offset: 0x0249e4bb, size: 79 bytes, params: 1, frame: 15
let value = environment.__proto__.__proto__;
const defaultImport = importDefault(dependencyMap[15]);
const openLazy = defaultImport.openLazy;
value = require(dependencyMap[18]);
value = value(dependencyMap[17], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport, [value, 'IncentivizedAccountLinkConfirmationBottomSheet']);
}
function _fun116974({type}) { // fn#116974, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15492:3242, offset: 0x0249e6d2, size: 45 bytes, params: 2, frame: 11
const value = environment.__proto__.__proto__;
return (importDefault(4915) /* metro dependency 4915: Platforms */).get(type);
}
function _fun116975(a0) { // fn#116975, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15492:3274, offset: 0x0249e6ff, size: 42 bytes, params: 2, frame: 12
var r0;
var deprecatedPlatformTypesBinding;
let value = a0.replacedBy != null;
if (value) {
value = environment.__proto__;
deprecatedPlatformTypesBinding = deprecatedPlatformTypes;
value = deprecatedPlatformTypesBinding.includes(a0.type);
r0 = value;
} else {
r0 = value;
}
return r0;
}
@@ -0,0 +1,55 @@
/* Metro module 15297; source: modules/application_account_linking/native/IncentivizedAccountLinkConfirmationBottomSheet.tsx; dependencies: [31, 27, 4502, 661, 33, 566, 14073, 477, 7601, 14074, 5475, 4578, 1244, 9757, 697, 4080, 3853, 1948, 12765, 2870, 2] */
function _fun116979(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116979, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15494:6, offset: 0x0249e819, size: 198 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).Image;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const env0_5 = (require(661) /* metro dependency 661: Constants */).HelpdeskArticles;
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_account_linking/native/IncentivizedAccountLinkConfirmationBottomSheet.tsx');
exports.default = IncentivizedAccountLinkConfirmationBottomSheet;
}
function IncentivizedAccountLinkConfirmationBottomSheet() { // fn#116980, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15494:315, offset: 0x0249e8df, size: 628 bytes, params: 1, frame: 24
var r5;
var object2;
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStores = fluxModule.useStateFromStores;
const items = [AccessibilityStore];
if (Reflect.apply(useStateFromStores, fluxModule, [items, function() {
return AccessibilityStore.useReducedMotion;
}])) {
object2 = {};
object2.uri = importDefault(14073) /* metro dependency 14073: orb_coachmark_asset_2xPng */;
r5 = <Image source={object2} style={{'width': 150, 'height': 150}} />;
} else {
r5 = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid() ? ((Component) => <Component url={importDefault(14074) /* metro dependency 14074: orb_coachmark_asset_2x_animatedPng */} style={{'width': 150,
'height': 150}} />)(importDefault(7601) /* metro dependency 7601: APNGDecorationNativeComponent */) : ((Component) => <Component source={{uri: importDefault(14074) /* metro dependency 14074: orb_coachmark_asset_2x_animatedPng */}} resizeMode="contain" style={{'width': 150,
'height': 150}} />)(importDefault(5475) /* metro dependency 5475: FastImage */);
}
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const aRIFWD = (require(1244) /* metro dependency 1244: indexNative */).t.aRIFWD;
const WindowLaunchIcon = (require(9757) /* metro dependency 9757: WindowLaunchIcon */).WindowLaunchIcon;
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
const button = <Button text={Reflect.apply(string, intl,
[aRIFWD])} icon={<WindowLaunchIcon size="sm" color={WHITE} />} iconPosition="end" size="lg" onPress={function() {
importDefault(dependencyMap[15]).hideActionSheet();
importDefault(dependencyMap[16]).openURL(importDefault(dependencyMap[17]).getArticleURL(HelpdeskArticles.IN_GAME_FEATURES));
}} />;
const PromoSheet = (require(12765) /* metro dependency 12765: PromoSheetNative */).PromoSheet;
const promoSheetProps = {title: intl.string((importDefault(2870) /* metro dependency 2870: IncentivizedAccountLinkingMessages */).ublzTG)};
string = intl.string;
const JgM2xu = (importDefault(2870) /* metro dependency 2870: IncentivizedAccountLinkingMessages */).JgM2xu;
promoSheetProps.description = Reflect.apply(string, intl, [JgM2xu]);
promoSheetProps.actions = button;
promoSheetProps.illustration = r5;
promoSheetProps.onDismiss = onDismiss_116983;
return <PromoSheet {...promoSheetProps} />;
}
@@ -0,0 +1,46 @@
/* Metro module 10593; source: modules/application_account_linking/native/getShouldShowAppAuthPrompt.tsx; dependencies: [5109, 6776, 6779, 2] */
function _fun81690(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81690, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10779:6, offset: 0x01eda4f3, size: 137 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const authorizedAppsStore = importDefault(5109) /* metro dependency 5109: AuthorizedAppsStore */;
const env0_4 = (require(5109) /* metro dependency 5109: AuthorizedAppsStore */).FetchState;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_account_linking/native/getShouldShowAppAuthPrompt.tsx');
exports.getShouldShowAppAuthPrompt = getShouldShowAppAuthPrompt;
}
function getShouldShowAppAuthPrompt(a0) { // fn#81691, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10779:263, offset: 0x01eda57c, size: 263 bytes, params: 2, frame: 16
var r5;
var r1;
var r0;
var value4;
if (a0 != null) {
var value;
var value2 = undefined;
var authorizationApp = (require(6776) /* metro dependency 6776: useAuthorizationApp */).getAuthorizationApp(a0);
if (authorizationApp == null) {
return false;
}
if ((authorizationApp == null ? value2 : authorizationApp.connectionEntrypointUrl) != null) {
r5 = (authorizationApp == null ? value2 : authorizationApp.parentId) ?? (authorizationApp == null ? value2 : authorizationApp.id);
value4 = r5 != null;
if (value4) {
if (AuthorizedAppsStore.getFetchStateForApplication(r5) === FetchState.NOT_FETCHED) {
value = importDefault(6779) /* metro dependency 6779: AuthorizedAppsActionCreators */;
value.fetch([r5]);
value = false;
r1 = value;
} else {
r1 = AuthorizedAppsStore.getFetchStateForApplication(r5) === FetchState.FETCHED && AuthorizedAppsStore.getNewestTokenForApplication(r5) != null;
r1 = !r1;
}
r0 = r1;
} else {
r0 = value4;
}
return r0;
}
}
return false;
}
@@ -0,0 +1,180 @@
/* Metro module 11421; source: modules/application_account_linking/native/startAuthorizationNoHook.tsx; dependencies: [5, 661, 6776, 3853, 683, 2] */
function _fun87443(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87443, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11607:6, offset: 0x01fbe9fe, size: 151 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 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_account_linking/native/startAuthorizationNoHook.tsx');
exports.startAuthorizationNoHook = function() {
return _startAuthorizationNoHook.apply(this, arguments);
};
}
function _startAuthorizationNoHook() { // fn#87444, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11607:131, offset: 0x01fbea95, size: 50 bytes, params: 1, frame: 14
return env0_3(_fun87446).apply(this, arguments);
}
function* _fun87446(a0, a1) { // fn#87446, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11607:204, offset: 0x01fbead2, size: 221 bytes, params: 3, frame: 19
var connectionEntrypointUrl;
var value3;
var binding;
var value4;
var getAuthorizationApp;
var value5;
var binding2;
var property;
var value6;
var openURL;
var value7;
var value8;
var value9;
var binding3;
var value10;
var track;
var ON_PLATFORM_ACCOUNT_LINK_FLOW_STARTED;
var object2;
var id;
var error;
let value = undefined;
if (true) {
reduciblePort34: while (true) {
exceptionLanding33: while (true) {
value = undefined;
if (a0 == null) {
break reduciblePort34;
}
value3 = environment.__proto__.__proto__;
binding = env2_0;
value4 = binding(env2_2[2]);
getAuthorizationApp = value4.getAuthorizationApp;
value5 = Reflect.apply(getAuthorizationApp, value4, [a0]);
reducibleJoin4: while (true) {
if (value5 == null) {
connectionEntrypointUrl = value;
break reducibleJoin4;
}
connectionEntrypointUrl = value5.connectionEntrypointUrl;
break reducibleJoin4;
}
if (connectionEntrypointUrl == null) {
break reduciblePort34;
}
try {
binding = env2_1;
} catch (error) {
break exceptionLanding33;
}
try {
binding2 = env2_2;
} catch (error) {
break exceptionLanding33;
}
try {
property = binding2[3];
} catch (error) {
break exceptionLanding33;
}
try {
value6 = binding(property);
} catch (error) {
break exceptionLanding33;
}
try {
openURL = value6.openURL;
} catch (error) {
break exceptionLanding33;
}
try {
connectionEntrypointUrl = value5.connectionEntrypointUrl;
} catch (error) {
break exceptionLanding33;
}
try {
value7 = Reflect.apply(openURL, value6, [connectionEntrypointUrl]);
} catch (error) {
break exceptionLanding33;
}
yield value7;
try {
value8 = undefined;
value9 = false;
} catch (error) {
break exceptionLanding33;
}
if (value9) {
return value8;
}
try {
binding = env2_1;
} catch (error) {
break exceptionLanding33;
}
try {
binding3 = env2_2;
} catch (error) {
break exceptionLanding33;
}
try {
property = binding3[4];
} catch (error) {
break exceptionLanding33;
}
try {
value10 = binding(property);
} catch (error) {
break exceptionLanding33;
}
try {
track = value10.track;
} catch (error) {
break exceptionLanding33;
}
try {
binding = env2_4;
} catch (error) {
break exceptionLanding33;
}
try {
ON_PLATFORM_ACCOUNT_LINK_FLOW_STARTED = binding.ON_PLATFORM_ACCOUNT_LINK_FLOW_STARTED;
} catch (error) {
break exceptionLanding33;
}
try {
object2 = {};
} catch (error) {
break exceptionLanding33;
}
try {
object2.location_stack = a1;
} catch (error) {
break exceptionLanding33;
}
try {
id = value5.id;
} catch (error) {
break exceptionLanding33;
}
try {
object2.application_id = id;
} catch (error) {
break exceptionLanding33;
}
try {
object2.flow_type = 'web';
} catch (error) {
break exceptionLanding33;
}
try {
Reflect.apply(track, value10, [ON_PLATFORM_ACCOUNT_LINK_FLOW_STARTED, object2]);
} catch (error) {
break exceptionLanding33;
}
break reduciblePort34;
}
break reduciblePort34;
}
}
return value;
}
@@ -0,0 +1,68 @@
/* Metro module 14729; source: modules/application_account_linking/native/useDefaultAuthorizationNotifiers.tsx; dependencies: [31, 7030, 661, 566, 4078, 6266, 3857, 1244, 2838, 2] */
function _fun111049(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111049, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14926:6, offset: 0x02391985, size: 159 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const appStateStore = importDefault(7030) /* metro dependency 7030: AppStateStore */;
const env0_5 = (require(661) /* metro dependency 661: Constants */).AppStates;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_account_linking/native/useDefaultAuthorizationNotifiers.tsx');
exports.useDefaultAuthorizationNotifiers = useDefaultAuthorizationNotifiers;
}
function useDefaultAuthorizationNotifiers(a0, a1) { // fn#111050, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14926:284, offset: 0x02391a24, size: 281 bytes, params: 3, frame: 22
const value = a2;
const env0_0 = a0;
const env0_1 = a1;
let showToastOnSuccess = (value !== undefined ? value : {}).showToastOnSuccess;
showToastOnSuccess = showToastOnSuccess === undefined || showToastOnSuccess;
let env0_3 = undefined;
const binding = env0_3;
env0_3 = binding.useRef(false);
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([AppStateStore], function() {
return AppStateStore.getState() === AppStates.ACTIVE;
});
const value3 = (require(4078) /* metro dependency 4078: BrowserManager */).useIsInAppBrowserOpen();
const value4 = binding.useCallback(_fun111052, [a0]);
const r5 = value2 && !value3;
env0_3.useEffect(_fun111053, [a1,
(require(6266) /* metro dependency 6266: usePrevious */).usePreviousWhen({value: a1, shouldUpdate: r5}),
showToastOnSuccess, r5]);
return value4;
}
function _fun111052(a0) { // fn#111052, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14926:494, offset: 0x02391b5e, size: 31 bytes, params: 2, frame: 11
env0_3.current = true;
return env0_0(a0);
}
function _fun111053() { // fn#111053, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14926:603, offset: 0x02391b7d, size: 182 bytes, params: 1, frame: 17
var defaultImport;
var open;
var object2;
var intl;
if (env0_3.current) {
if (env0_5 !== false) {
return undefined;
}
if (require !== true) {
return undefined;
}
if (env0_4) {
env0_3.current = false;
if (showToastOnSuccess) {
value = environment.__proto__;
defaultImport = importDefault(3857) /* metro dependency 3857: ToastActionCreators */;
open = defaultImport.open;
object2 = {};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.content = intl.string((importDefault(2838) /* metro dependency 2838: AccountLinkingMessages */).uG6teD);
object2.key = 'account-linked-toast';
Reflect.apply(open, defaultImport, [object2]);
return undefined;
}
return undefined;
}
}
}
@@ -0,0 +1,227 @@
/* Metro module 6774; source: modules/application_account_linking/native/useStartAuthorize.tsx; dependencies: [5, 31, 6775, 661, 6776, 6778, 3853, 683, 2] */
function _fun53378(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#53378, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6952:6, offset: 0x01347269, size: 179 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(6775) /* metro dependency 6775: ApplicationAccountLinkingConstants */).AuthorizeFlow;
const env0_6 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_account_linking/native/useStartAuthorize.tsx');
exports.default = useStartAuthorize;
}
function useStartAuthorize(a0) { // fn#53379, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6952:273, offset: 0x0134731c, size: 359 bytes, params: 2, frame: 23
const value = a1;
const value2 = undefined;
const debug = (value !== value2 ? value : {}).debug;
const r2 = value2 !== debug && debug;
const value3 = (require(6776) /* metro dependency 6776: useAuthorizationApp */).useAuthorizationApp(a0);
const value4 = null;
const value5 = value4 != (value4 == value3 ? value2 : value3.connectionEntrypointUrl);
const WEB = value5 ? AuthorizeFlow.WEB : value4;
const useAuthorizedAppsTokenModule = require(6778) /* metro dependency 6778: useAuthorizedAppsToken */;
const useAuthorizedAppsToken = useAuthorizedAppsTokenModule.useAuthorizedAppsToken;
const parentId = value4 == value3 ? value2 : value3.parentId;
const {token, fetched} = Reflect.apply(useAuthorizedAppsToken, useAuthorizedAppsTokenModule,
[value4 != parentId ? parentId : value4 == value3 ? value2 : value3.id]);
const binding = env0_4;
const useCallback = binding.useCallback;
return {fetched: fetched, hasAlreadyLinked: fetched && value4 != token, canStartAuthorization: value5,
startAuthorization: Reflect.apply(useCallback, binding, [_fun53380(), [value3]]), connectionApp: value3,
chosenFlow: WEB, token: token, debug: r2 ? {isSubscribedToAuthorizeRequest: false, oauth2Token: token,
hasConnectionEntrypointUrl: value4 != (value4 == value3 ? value2 : value3.connectionEntrypointUrl),
validFlows: value5 ? [AuthorizeFlow.WEB] : []} : value2};
}
function _fun53380() { // fn#53380, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6952:569, offset: 0x01347483, size: 32 bytes, params: 1, frame: 12
const env0_0 = env1_3(_fun53382);
return _fun53383;
}
function* _fun53382(a0) { // fn#53382, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6952:589, offset: 0x013474ac, size: 236 bytes, params: 2, frame: 18
var binding;
var binding2;
var property;
var value5;
var openURL;
var value6;
var value7;
var value8;
var onConfirm;
var value9;
var binding3;
var value10;
var track;
var ON_PLATFORM_ACCOUNT_LINK_FLOW_STARTED;
var object2;
var analyticsLocations;
var id;
var WEB;
var error;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
let connectionEntrypointUrl = require?.connectionEntrypointUrl;
if (connectionEntrypointUrl == null) {
return false;
}
try {
binding = env3_1;
} catch (error) {
return false;
}
try {
binding2 = env3_2;
} catch (error) {
return false;
}
try {
property = binding2[6];
} catch (error) {
return false;
}
try {
value5 = binding(property);
} catch (error) {
return false;
}
try {
openURL = value5.openURL;
} catch (error) {
return false;
}
try {
} catch (error) {
return false;
}
try {
connectionEntrypointUrl = require.connectionEntrypointUrl;
} catch (error) {
return false;
}
try {
value6 = Reflect.apply(openURL, value5, [connectionEntrypointUrl]);
} catch (error) {
return false;
}
yield value6;
try {
value7 = undefined;
value8 = false;
} catch (error) {
return false;
}
if (value8) {
return value7;
}
try {
onConfirm = a0.onConfirm;
} catch (error) {
return false;
}
try {
value9 = onConfirm == null;
} catch (error) {
return false;
}
if (!value9) {
try {
onConfirm = a0.onConfirm;
} catch (error) {
return false;
}
try {
Reflect.apply(onConfirm, a0, []);
} catch (error) {
return false;
}
}
try {
binding = env3_1;
} catch (error) {
return false;
}
try {
binding3 = env3_2;
} catch (error) {
return false;
}
try {
property = binding3[7];
} catch (error) {
return false;
}
try {
value10 = binding(property);
} catch (error) {
return false;
}
try {
track = value10.track;
} catch (error) {
return false;
}
try {
binding = env3_6;
} catch (error) {
return false;
}
try {
ON_PLATFORM_ACCOUNT_LINK_FLOW_STARTED = binding.ON_PLATFORM_ACCOUNT_LINK_FLOW_STARTED;
} catch (error) {
return false;
}
try {
object2 = {};
} catch (error) {
return false;
}
try {
analyticsLocations = a0.analyticsLocations;
} catch (error) {
return false;
}
try {
object2.location_stack = analyticsLocations;
} catch (error) {
return false;
}
try {
} catch (error) {
return false;
}
try {
id = require.id;
} catch (error) {
return false;
}
try {
object2.application_id = id;
} catch (error) {
return false;
}
try {
binding = env3_5;
} catch (error) {
return false;
}
try {
WEB = binding.WEB;
} catch (error) {
return false;
}
try {
object2.flow_type = WEB;
} catch (error) {
return false;
}
try {
Reflect.apply(track, value10, [ON_PLATFORM_ACCOUNT_LINK_FLOW_STARTED, object2]);
} catch (error) {
return false;
}
return true;
}
@@ -0,0 +1,111 @@
/* Metro module 6787; source: modules/application_account_linking/native/useStartProviderConnection.tsx; dependencies: [5, 31, 6788, 3853, 2] */
function _fun53436(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#53436, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6965:6, offset: 0x01349289, size: 135 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_account_linking/native/useStartProviderConnection.tsx');
exports.useStartProviderConnection = useStartProviderConnection;
}
function useStartProviderConnection(a0) { // fn#53437, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6965:252, offset: 0x01349310, size: 136 bytes, params: 2, frame: 18
const {loading, hasConnection, canConnect, startConnection,
account} = (require(6788) /* metro dependency 6788: useProviderConnection */).useProviderConnection(a0);
const binding = env0_4;
const useCallback = binding.useCallback;
let value = _fun53438();
value = Reflect.apply(useCallback, binding, [value, [startConnection]]);
return {loading: loading, hasConnection: hasConnection, canConnect: canConnect, startConnection: value,
account: account};
}
function _fun53438() { // fn#53438, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6965:423, offset: 0x01349398, size: 32 bytes, params: 1, frame: 12
const env0_0 = env1_3(_fun53440);
return _fun53441;
}
function* _fun53440(a0) { // fn#53440, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6965:443, offset: 0x013493c1, size: 161 bytes, params: 2, frame: 15
var url;
var object2;
var value4;
var binding;
var binding2;
var property;
var value5;
var openURL;
var value6;
var error;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
yield require(a0);
if (false) {
return undefined;
}
if (value.success) {
url = value.url;
if (url != null) {
value4 = environment.__proto__.__proto__.__proto__;
try {
binding = env3_1;
} catch (error) {
return {success: false};
}
try {
binding2 = env3_2;
} catch (error) {
return {success: false};
}
try {
property = binding2[3];
} catch (error) {
return {success: false};
}
try {
value5 = binding(property);
} catch (error) {
return {success: false};
}
try {
openURL = value5.openURL;
} catch (error) {
return {success: false};
}
try {
url = value.url;
} catch (error) {
return {success: false};
}
try {
value = Reflect.apply(openURL, value5, [url]);
} catch (error) {
return {success: false};
}
yield value;
try {
value = undefined;
value6 = false;
} catch (error) {
return {success: false};
}
if (value6) {
return value;
}
try {
object2 = {};
} catch (error) {
return {success: false};
}
try {
object2.success = true;
} catch (error) {
return {success: false};
}
return object2;
}
}
return {success: false};
}