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,151 +1,197 @@
/* Metro module 9403; source: modules/oauth2/native/ApplicationDetails.tsx; dependencies: [31, 27, 33, 4501, 697, 9345, 9404, 9406, 21, 4121, 4056, 1244, 6705, 9408, 9409, 4076, 4122, 9411, 8036, 6766, 2] */
import SnowflakeUtils from '../../../utils/SnowflakeUtils.tsx'; /* Metro dependency 21 */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
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 ClockIconModule from '../../../design/components/Icon/native/redesign/generated/ClockIcon.tsx'; /* Metro dependency 4076 */
import * as ScopesModule from '../scopes.tsx'; /* Metro dependency 4121 */
import * as OAuth2ScopesModule from '../../../external/discord_common/js/shared/shared-constants/OAuth2Scopes.tsx'; /* Metro dependency 4122 */
import * as LockIconModule from '../../../design/components/Icon/native/redesign/generated/LockIcon.tsx'; /* Metro dependency 6705 */
import * as TextWithIOSLinkWorkaroundModule from '../../a11y/native/TextWithIOSLinkWorkaround.tsx'; /* Metro dependency 6766 */
import * as ShieldIconModule from '../../../design/components/Icon/native/redesign/generated/ShieldIcon.tsx'; /* Metro dependency 8036 */
function _fun73311(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#73311, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9589:6, offset: 0x01d67cf6, size: 303 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;
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;
const TEXT_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_MUTED;
const TEXT_MUTED = (Native).colors.TEXT_MUTED;
const env0_6 = Reflect.apply(createStyles, value, [{applicationDetails: {'flexDirection': 'column', 'gap': 16},
entry: {'flexDirection': 'row', 'alignItems': 'center', 'gap': 8}, entryText: {flex: 1},
entryIcon: {'width': 16, 'height': 16, tintColor: TEXT_MUTED}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/oauth2/native/ApplicationDetails.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/oauth2/native/ApplicationDetails.tsx');
exports.default = ApplicationDetails;
}
function ApplicationDetailsEntry({iconComponent, text}) { // fn#73312, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9589:363, offset: 0x01d67e25, size: 161 bytes, params: 2, frame: 20
const styles = useStyles();
const r6 = iconComponent != null ? iconComponent({style: styles.entryIcon}) : null;
const TextWithIOSLinkWorkaround = (TextWithIOSLinkWorkaroundModule).TextWithIOSLinkWorkaround;
return (
<View style={styles.entry}>
{r6}
<TextWithIOSLinkWorkaround
variant="text-sm/normal"
color="text-default"
style={styles.entryText}
>
{text}
</TextWithIOSLinkWorkaround>
</View>
);
}
function ApplicationDetailsEntry({iconComponent, text}) { // fn#73312, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9589:363, offset: 0x01d67e25, size: 161 bytes, params: 2, frame: 20
const styles = useStyles();
const r6 = iconComponent != null ? iconComponent({style: styles.entryIcon}) : null;
const TextWithIOSLinkWorkaround = (require(6766) /* metro dependency 6766: TextWithIOSLinkWorkaround */).TextWithIOSLinkWorkaround;
return (
<View style={styles.entry}>
{r6}
<TextWithIOSLinkWorkaround
variant="text-sm/normal"
color="text-default"
style={styles.entryText}
>
{text}
</TextWithIOSLinkWorkaround>
</View>
);
}
function ApplicationDetails({application, scopes, redirectUri, approximateGuildCount, isEmbeddedFlow, disclosures, connectedAccount}) { // fn#73313, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9589:711, offset: 0x01d67ec6, size: 953 bytes, params: 2, frame: 32
var r20;
var r7;
var r6;
var URL;
var value7;
var uRL;
var value8;
var href;
var value9;
var value10;
var value11;
var error;
var object2;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var object5;
var object8;
const styles = useStyles();
const Date = global.Date;
const defaultImport = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
const value2 = defaultImport.extractTimestamp(application.id);
let prototype = Date.prototype;
const value3 = Object.create(prototype, {constructor: {value: Date}});
const date = new Date(value2);
const value4 = date instanceof Object ? date : value3;
const securityMessage = (require(4121) /* metro dependency 4121: scopes */).getSecurityMessage(scopes);
if (redirectUri == null) {
r20 = null;
} else if (isEmbeddedFlow) {
r20 = null;
} else {
try {
URL = global.URL;
prototype = URL.prototype;
value7 = Object.create(prototype, {constructor: {value: URL}});
uRL = new URL(redirectUri);
value8 = uRL instanceof Object ? uRL : value7;
href = value8.href;
value9 = href.split('/');
value10 = value9.slice(0, 3);
value11 = value10.join('/');
r20 = value11;
} catch (error) {
r20 = redirectUri;
function ApplicationDetails({application, scopes, redirectUri, approximateGuildCount, isEmbeddedFlow, disclosures, connectedAccount}) { // fn#73313, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9589:711, offset: 0x01d67ec6, size: 953 bytes, params: 2, frame: 32
var r20;
var r7;
var r6;
var URL;
var value7;
var uRL;
var value8;
var href;
var value9;
var value10;
var value11;
var error;
var object;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var object3;
var object4;
const styles = useStyles();
const Date = global.Date;
const defaultImport = SnowflakeUtils;
const value2 = defaultImport.extractTimestamp(application.id);
let prototype = Date.prototype;
const value3 = Object.create(prototype, {constructor: {value: Date}});
const date = new Date(value2);
const value4 = date instanceof Object ? date : value3;
const securityMessage = (ScopesModule).getSecurityMessage(scopes);
if (redirectUri == null) {
r20 = null;
} else if (isEmbeddedFlow) {
r20 = null;
} else {
try {
URL = global.URL;
prototype = URL.prototype;
value7 = Object.create(prototype, {constructor: {value: URL}});
uRL = new URL(redirectUri);
value8 = uRL instanceof Object ? uRL : value7;
href = value8.href;
value9 = href.split('/');
value10 = value9.slice(0, 3);
value11 = value10.join('/');
r20 = value11;
} catch (error) {
r20 = redirectUri;
}
}
}
if (r20 != null) {
r7 = <ApplicationDetailsEntry iconComponent={(require(4056) /* metro dependency 4056: LinkIcon */).LinkIcon} text={intl.format((require(1244) /* metro dependency 1244: indexNative */).t['5k5OKD'],
{origin: r20})} />;
} else {
r7 = null;
}
const items2 = [r7];
const LockIcon = (require(6705) /* metro dependency 6705: LockIcon */).LockIcon;
items2[1] = <ApplicationDetailsEntry iconComponent={LockIcon} text={(require(9408) /* metro dependency 9408: Utils */).getApplicationDetailsText(application)} />;
if (connectedAccount != null) {
r6 = <ApplicationDetailsEntry iconComponent={(require(9409) /* metro dependency 9409: HammerIcon */).HammerIcon} text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['8qui3M'])} />;
} else {
r6 = null;
}
items2[2] = r6;
const ClockIcon = (require(4076) /* metro dependency 4076: ClockIcon */).ClockIcon;
items2[3] = <ApplicationDetailsEntry iconComponent={ClockIcon} text={intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['+1bjc8'],
{date: value4})} />;
const includes = scopes.includes;
const OAuth2Scopes = (require(4122) /* metro dependency 4122: OAuth2Scopes */).OAuth2Scopes;
const BOT = OAuth2Scopes.BOT;
if (Reflect.apply(includes, scopes, [BOT])) {
if (approximateGuildCount != null) {
r6 = <ApplicationDetailsEntry iconComponent={(require(9411) /* metro dependency 9411: RobotIcon */).RobotIcon} text={intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.UHGHSP,
{guildCount: approximateGuildCount})} />;
if (r20 != null) {
r7 = (
<ApplicationDetailsEntry
iconComponent={(require(4056) /* metro dependency 4056: LinkIcon */).LinkIcon}
text={intl.format((require(1244) /* metro dependency 1244: indexNative */).t['5k5OKD'], {origin: r20})}
/>
);
} else {
r7 = null;
}
const items2 = [r7];
const LockIcon = (LockIconModule).LockIcon;
items2[1] = (
<ApplicationDetailsEntry
iconComponent={LockIcon}
text={(require(9408) /* metro dependency 9408: Utils */).getApplicationDetailsText(application)}
/>
);
if (connectedAccount != null) {
r6 = (
<ApplicationDetailsEntry
iconComponent={(require(9409) /* metro dependency 9409: HammerIcon */).HammerIcon}
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['8qui3M'])}
/>
);
} else {
r6 = null;
}
} else {
r6 = null;
items2[2] = r6;
const ClockIcon = (ClockIconModule).ClockIcon;
items2[3] = (
<ApplicationDetailsEntry
iconComponent={ClockIcon}
text={intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['+1bjc8'],
{date: value4})}
/>
);
const includes = scopes.includes;
const OAuth2Scopes = (OAuth2ScopesModule).OAuth2Scopes;
const BOT = OAuth2Scopes.BOT;
if (Reflect.apply(includes, scopes, [BOT])) {
if (approximateGuildCount != null) {
r6 = (
<ApplicationDetailsEntry
iconComponent={(require(9411) /* metro dependency 9411: RobotIcon */).RobotIcon}
text={intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.UHGHSP,
{guildCount: approximateGuildCount})}
/>
);
} else {
r6 = null;
}
} else {
r6 = null;
}
items2[4] = r6;
const ShieldIcon = (ShieldIconModule).ShieldIcon;
items2[5] = <ApplicationDetailsEntry iconComponent={ShieldIcon} text={securityMessage} />;
items2[6] = disclosures != null ? disclosures.map(_fun73314) : null;
return (
<View style={styles.applicationDetails}>
{items2}
</View>
);
function _fun73314(a0) { // fn#73314, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9589:1841, offset: 0x01d6827f, size: 236 bytes, params: 2, frame: 19
var r1;
var object;
const value = environment.__proto__;
const textForDisclosure = (require(9345) /* metro dependency 9345: disclosures */).getTextForDisclosure(a0);
const ApplicationDisclosure = (require(9345) /* metro dependency 9345: disclosures */).ApplicationDisclosure;
const IP_LOCATION = ApplicationDisclosure.IP_LOCATION;
if (IP_LOCATION === a0) {
object = {};
object.iconComponent = (require(9404) /* metro dependency 9404: GlobeEarthIcon */).GlobeEarthIcon;
r1 = object;
} else if ((require(9345) /* metro dependency 9345: disclosures */).ApplicationDisclosure.DISPLAYS_ADVERTISEMENTS !== a0) {
r1 = null;
} else {
object = {};
object.iconComponent = (require(9406) /* metro dependency 9406: EmbedIcon */).EmbedIcon;
r1 = object;
}
const value4 = null;
return (
value4 != r1 && value4 != textForDisclosure
? (
<ApplicationDetailsEntry
text={textForDisclosure}
{...r1}
key={a0.toFixed()}
/>
)
: value4
);
}
}
items2[4] = r6;
const ShieldIcon = (require(8036) /* metro dependency 8036: ShieldIcon */).ShieldIcon;
items2[5] = <ApplicationDetailsEntry iconComponent={ShieldIcon} text={securityMessage} />;
items2[6] = disclosures != null ? disclosures.map(_fun73314) : null;
return (
<View style={styles.applicationDetails}>
{items2}
</View>
);
}
function _fun73314(a0) { // fn#73314, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9589:1841, offset: 0x01d6827f, size: 236 bytes, params: 2, frame: 19
var r1;
var object2;
const value = environment.__proto__;
const textForDisclosure = (require(9345) /* metro dependency 9345: disclosures */).getTextForDisclosure(a0);
const ApplicationDisclosure = (require(9345) /* metro dependency 9345: disclosures */).ApplicationDisclosure;
const IP_LOCATION = ApplicationDisclosure.IP_LOCATION;
if (IP_LOCATION === a0) {
object2 = {};
object2.iconComponent = (require(9404) /* metro dependency 9404: GlobeEarthIcon */).GlobeEarthIcon;
r1 = object2;
} else if ((require(9345) /* metro dependency 9345: disclosures */).ApplicationDisclosure.DISPLAYS_ADVERTISEMENTS !== a0) {
r1 = null;
} else {
object2 = {};
object2.iconComponent = (require(9406) /* metro dependency 9406: EmbedIcon */).EmbedIcon;
r1 = object2;
}
const value4 = null;
return value4 != r1 && value4 != textForDisclosure ? <ApplicationDetailsEntry text={textForDisclosure} {...r1} key={a0.toFixed()} /> : value4;
}
global.__d(_fun73311, 9403, [31, 27, 33, 4501, 697, 9345, 9404, 9406, 21, 4121, 4056, 1244, 6705, 9408, 9409, 4076,
4122, 9411, 8036, 6766,
2]) /* metro module 9403, dependencies: [31, 27, 33, 4501, 697, 9345, 9404, 9406, 21, 4121, 4056, 1244, 6705, 9408, 9409, 4076, 4122, 9411, 8036, 6766, 2] */;
@@ -1,134 +1,154 @@
/* Metro module 9394; source: modules/oauth2/native/ApplicationEducation.tsx; dependencies: [31, 27, 661, 33, 4501, 697, 9393, 4122, 1244, 3858, 9395, 8658, 7002, 4573, 9397, 2] */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UseIsSocialLayerParentApplication from '../../applications/useIsSocialLayerParentApplication.tsx'; /* Metro dependency 9393 */
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 */
function _fun73263(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#73263, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9580:6, offset: 0x01d655b2, size: 331 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(661) /* metro dependency 661: Constants */).MAX_FRIENDS;
let value = require(33) /* metro dependency 33 */;
ReactModule;
let value = JsxRuntimeModule;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
const env0_7 = value.Fragment;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const TEXT_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_MUTED;
const TEXT_MUTED = (Native).colors.TEXT_MUTED;
const env0_8 = Reflect.apply(createStyles, value, [{applicationEducation: {'flexDirection': 'column', 'gap': 16},
entry: {'flexDirection': 'row', 'alignItems': 'center', 'gap': 12}, entryText: {flex: 1},
entryIcon: {'width': 20, 'height': 20, tintColor: TEXT_MUTED}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/oauth2/native/ApplicationEducation.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/oauth2/native/ApplicationEducation.tsx');
exports.default = ApplicationEducation;
}
function ApplicationEducationEntry({iconComponent, text}) { // fn#73264, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9580:403, offset: 0x01d656fd, size: 158 bytes, params: 2, frame: 20
const styles = useStyles();
const r6 = iconComponent != null ? iconComponent({style: styles.entryIcon}) : null;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<View style={styles.entry}>
{r6}
<Text variant="text-md/normal" style={styles.entryText}>
{text}
</Text>
</View>
);
}
function ApplicationEducation({application, accountScopes}) { // fn#73265, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9580:713, offset: 0x01d6579b, size: 1410 bytes, params: 2, frame: 28
var r0;
var r1;
var r13;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var formatToPlainString;
var push;
var object;
var object3;
var object4;
var object7;
var object9;
var object10;
var object14;
var jsxRuntimeEnv0_7Binding;
var items2;
const styles = useStyles();
const items3 = [];
const value3 = (importDefault(9393) /* metro dependency 9393: useIsSocialLayerParentApplication */)(application);
const includes = accountScopes.includes;
const OAuth2Scopes = (require(4122) /* metro dependency 4122: OAuth2Scopes */).OAuth2Scopes;
const SDK_SOCIAL_LAYER = OAuth2Scopes.SDK_SOCIAL_LAYER;
if (Reflect.apply(includes, accountScopes, [SDK_SOCIAL_LAYER])) {
r0 = value3 ? intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['3Mau0y'],
{applicationName: application.name}) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ex4sMU);
push = items3.push;
object7 = {};
object7.iconComponent = (require(3858) /* metro dependency 3858: FriendsIcon */).FriendsIcon;
formatToPlainString = intl.formatToPlainString;
r1 = value3 ? Reflect.apply(formatToPlainString, intl, [t.z9peav,
{maxFriends: MAX_FRIENDS}]) : Reflect.apply(formatToPlainString, intl, [t.WNKzo9,
{maxFriends: MAX_FRIENDS}]);
object7.text = r1;
object9 = {};
object9.iconComponent = (require(9395) /* metro dependency 9395: ChatSmileIcon */).ChatSmileIcon;
string = intl.string;
r1 = value3 ? Reflect.apply(string, intl, [t.daY6xj]) : Reflect.apply(string, intl, [t.j7peBh]);
object9.text = r1;
object10 = {};
object10.iconComponent = (require(8658) /* metro dependency 8658: GameControllerIcon */).GameControllerIcon;
string = intl.string;
r1 = value3 ? Reflect.apply(string, intl, [t['/bdaNN']]) : Reflect.apply(string, intl, [t['feD3+i']]);
object10.text = r1;
object14 = {};
object14.iconComponent = (require(7002) /* metro dependency 7002: SettingsIcon */).SettingsIcon;
string = intl.string;
object14.text = value3 ? Reflect.apply(string, intl, [t.mSqazC]) : Reflect.apply(string, intl, [t.YFFVM1]);
Reflect.apply(push, items3, [object7, object9, object10, object14]);
r13 = r0;
} else if (accountScopes.includes((require(4122) /* metro dependency 4122: OAuth2Scopes */).OAuth2Scopes.SDK_SOCIAL_LAYER_PRESENCE)) {
r0 = value3 ? intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['3Mau0y'],
{applicationName: application.name}) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ex4sMU);
push = items3.push;
object = {};
object.iconComponent = (require(3858) /* metro dependency 3858: FriendsIcon */).FriendsIcon;
formatToPlainString = intl.formatToPlainString;
r1 = value3 ? Reflect.apply(formatToPlainString, intl, [t.z9peav,
{maxFriends: MAX_FRIENDS}]) : Reflect.apply(formatToPlainString, intl, [t.WNKzo9,
{maxFriends: MAX_FRIENDS}]);
object.text = r1;
object3 = {};
object3.iconComponent = (require(8658) /* metro dependency 8658: GameControllerIcon */).GameControllerIcon;
string = intl.string;
r1 = value3 ? Reflect.apply(string, intl, [t['/bdaNN']]) : Reflect.apply(string, intl, [t['feD3+i']]);
object3.text = r1;
object4 = {};
object4.iconComponent = (require(7002) /* metro dependency 7002: SettingsIcon */).SettingsIcon;
string = intl.string;
object4.text = value3 ? Reflect.apply(string, intl, [t.mSqazC]) : Reflect.apply(string, intl, [t.YFFVM1]);
Reflect.apply(push, items3, [object, object3, object4]);
r13 = r0;
} else {
r13 = undefined;
function ApplicationEducationEntry({iconComponent, text}) { // fn#73264, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9580:403, offset: 0x01d656fd, size: 158 bytes, params: 2, frame: 20
const styles = useStyles();
const r6 = iconComponent != null ? iconComponent({style: styles.entryIcon}) : null;
const Text = (TextModule).Text;
return (
<View style={styles.entry}>
{r6}
<Text variant="text-md/normal" style={styles.entryText}>
{text}
</Text>
</View>
);
}
if (items3.length === 0) {
r0 = null;
} else {
jsxRuntimeEnv0_7Binding = jsxRuntimeEnv0_7;
var viewBindingProps = {style: styles.applicationEducation};
items2 = [r13 != null && r13.length > 0 ? ((Text) => <Text variant="text-sm/normal" color="text-default">{r13}</Text>)((require(4573) /* metro dependency 4573: Text */).Text) : null];
items2[1] = items3.map(_fun73266);
r0 = <><View {...viewBindingProps}>{items2}</View>{((AuthorizeFormSeparator) => <AuthorizeFormSeparator />)((require(9397) /* metro dependency 9397: AuthorizeFormSeparator */).AuthorizeFormSeparator)}</>;
function ApplicationEducation({application, accountScopes}) { // fn#73265, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9580:713, offset: 0x01d6579b, size: 1410 bytes, params: 2, frame: 28
var r0;
var r1;
var r13;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var formatToPlainString;
var push;
var object2;
var object5;
var object6;
var object8;
var object11;
var object12;
var object13;
var jsxRuntimeEnv0_7Binding;
var items2;
const styles = useStyles();
const items3 = [];
const value3 = (UseIsSocialLayerParentApplication)(application);
const includes = accountScopes.includes;
const OAuth2Scopes = (require(4122) /* metro dependency 4122: OAuth2Scopes */).OAuth2Scopes;
const SDK_SOCIAL_LAYER = OAuth2Scopes.SDK_SOCIAL_LAYER;
if (Reflect.apply(includes, accountScopes, [SDK_SOCIAL_LAYER])) {
r0 = value3 ? intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['3Mau0y'],
{applicationName: application.name}) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ex4sMU);
push = items3.push;
object8 = {};
object8.iconComponent = (require(3858) /* metro dependency 3858: FriendsIcon */).FriendsIcon;
formatToPlainString = intl.formatToPlainString;
r1 = value3 ? Reflect.apply(formatToPlainString, intl, [t.z9peav,
{maxFriends: MAX_FRIENDS}]) : Reflect.apply(formatToPlainString, intl, [t.WNKzo9,
{maxFriends: MAX_FRIENDS}]);
object8.text = r1;
object11 = {};
object11.iconComponent = (require(9395) /* metro dependency 9395: ChatSmileIcon */).ChatSmileIcon;
string = intl.string;
r1 = value3 ? Reflect.apply(string, intl, [t.daY6xj]) : Reflect.apply(string, intl, [t.j7peBh]);
object11.text = r1;
object12 = {};
object12.iconComponent = (require(8658) /* metro dependency 8658: GameControllerIcon */).GameControllerIcon;
string = intl.string;
r1 = value3 ? Reflect.apply(string, intl, [t['/bdaNN']]) : Reflect.apply(string, intl, [t['feD3+i']]);
object12.text = r1;
object13 = {};
object13.iconComponent = (require(7002) /* metro dependency 7002: SettingsIcon */).SettingsIcon;
string = intl.string;
object13.text = value3 ? Reflect.apply(string, intl, [t.mSqazC]) : Reflect.apply(string, intl, [t.YFFVM1]);
Reflect.apply(push, items3, [object8, object11, object12, object13]);
r13 = r0;
} else if (accountScopes.includes((require(4122) /* metro dependency 4122: OAuth2Scopes */).OAuth2Scopes.SDK_SOCIAL_LAYER_PRESENCE)) {
r0 = value3 ? intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['3Mau0y'],
{applicationName: application.name}) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ex4sMU);
push = items3.push;
object2 = {};
object2.iconComponent = (require(3858) /* metro dependency 3858: FriendsIcon */).FriendsIcon;
formatToPlainString = intl.formatToPlainString;
r1 = value3 ? Reflect.apply(formatToPlainString, intl, [t.z9peav,
{maxFriends: MAX_FRIENDS}]) : Reflect.apply(formatToPlainString, intl, [t.WNKzo9,
{maxFriends: MAX_FRIENDS}]);
object2.text = r1;
object5 = {};
object5.iconComponent = (require(8658) /* metro dependency 8658: GameControllerIcon */).GameControllerIcon;
string = intl.string;
r1 = value3 ? Reflect.apply(string, intl, [t['/bdaNN']]) : Reflect.apply(string, intl, [t['feD3+i']]);
object5.text = r1;
object6 = {};
object6.iconComponent = (require(7002) /* metro dependency 7002: SettingsIcon */).SettingsIcon;
string = intl.string;
object6.text = value3 ? Reflect.apply(string, intl, [t.mSqazC]) : Reflect.apply(string, intl, [t.YFFVM1]);
Reflect.apply(push, items3, [object2, object5, object6]);
r13 = r0;
} else {
r13 = undefined;
}
if (items3.length === 0) {
r0 = null;
} else {
jsxRuntimeEnv0_7Binding = jsxRuntimeEnv0_7;
var viewBindingProps = {style: styles.applicationEducation};
items2 = [
r13 != null && r13.length > 0
? ((Text) => <Text variant="text-sm/normal" color="text-default">{r13}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)
: null,
];
items2[1] = items3.map(_fun73266);
r0 = (
<>
<View {...viewBindingProps}>
{items2}
</View>
{((AuthorizeFormSeparator) => <AuthorizeFormSeparator />)((require(9397) /* metro dependency 9397: AuthorizeFormSeparator */).AuthorizeFormSeparator)}
</>
);
}
return r0;
function _fun73266({iconComponent, text}, a1) { // fn#73266, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9580:2351, offset: 0x01d65d1d, size: 50 bytes, params: 3, frame: 15
return (
<ApplicationEducationEntry
iconComponent={iconComponent}
text={text}
key={a1}
/>
);
}
}
return r0;
}
function _fun73266({iconComponent, text}, a1) { // fn#73266, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9580:2351, offset: 0x01d65d1d, size: 50 bytes, params: 3, frame: 15
return (
<ApplicationEducationEntry
iconComponent={iconComponent}
text={text}
key={a1}
/>
);
}
global.__d(_fun73263, 9394, [31, 27, 661, 33, 4501, 697, 9393, 4122, 1244, 3858, 9395, 8658, 7002, 4573, 9397,
2]) /* metro module 9394, dependencies: [31, 27, 661, 33, 4501, 697, 9393, 4122, 1244, 3858, 9395, 8658, 7002, 4573, 9397, 2] */;
@@ -1,20 +1,24 @@
/* Metro module 9397; source: modules/oauth2/native/AuthorizeFormSeparator.tsx; dependencies: [27, 33, 4501, 697, 2] */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
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 JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
function _fun73270(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#73270, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9583:6, offset: 0x01d65e1f, size: 198 bytes, params: 8, frame: 21
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = (require(27) /* metro dependency 27 */).View;
const env0_1 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
const env0_2 = Reflect.apply(createStyles, createStylesModule, [{separator: {height: 1,
const createStyles = CreateStylesModule.createStyles;
const BORDER_SUBTLE = (Native).colors.BORDER_SUBTLE;
const env0_2 = Reflect.apply(createStyles, CreateStylesModule, [{separator: {height: 1,
backgroundColor: BORDER_SUBTLE}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/oauth2/native/AuthorizeFormSeparator.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/oauth2/native/AuthorizeFormSeparator.tsx');
exports.AuthorizeFormSeparator = AuthorizeFormSeparator;
function AuthorizeFormSeparator() { // fn#73271, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9583:324, offset: 0x01d65ee5, size: 41 bytes, params: 1, frame: 14
const styles = useStyles();
return <View style={styles.separator} />;
}
}
function AuthorizeFormSeparator() { // fn#73271, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9583:324, offset: 0x01d65ee5, size: 41 bytes, params: 1, frame: 14
const styles = useStyles();
return <View style={styles.separator} />;
}
global.__d(_fun73270, 9397, [27, 33, 4501, 697, 2]) /* metro module 9397, dependencies: [27, 33, 4501, 697, 2] */;
+116 -92
View File
@@ -1,111 +1,135 @@
/* Metro module 9398; source: modules/oauth2/native/AuthorizeScopes.tsx; dependencies: [31, 27, 33, 4501, 1244, 6988, 697, 4073, 4573, 6518, 4121, 8042, 4122, 2] */
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 IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as ScopesModule from '../scopes.tsx'; /* Metro dependency 4121 */
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 ApplicationIntegrationTypeModule from '../../../external/discord_common/js/shared/shared-constants/ApplicationIntegrationType.tsx'; /* Metro dependency 8042 */
function _fun73272(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#73272, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9584:6, offset: 0x01d65f0e, size: 319 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const value = require(33) /* metro dependency 33 */;
const env0_4 = value.jsx;
const env0_5 = value.jsxs;
const env0_6 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({scopesContainer: {'flexDirection': 'column',
ReactModule;
const env0_6 = (CreateStylesModule).createStyles({scopesContainer: {'flexDirection': 'column',
'gap': 16}, scopes: {'flexDirection': 'column', 'gap': 16}, scopeContainer: {flexDirection: 'row'},
scope: {'flex': 1, 'flexDirection': 'column', 'justifyContent': 'center'}, iconWrapper: {'marginRight': 12,
'width': 20, 'height': 20}, fakeScopeIcon: {opacity: 0.6}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/oauth2/native/AuthorizeScopes.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/oauth2/native/AuthorizeScopes.tsx');
exports.default = AuthorizeScopes;
}
function Scope({text, error, isFake}) { // fn#73273, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9584:433, offset: 0x01d6604d, size: 602 bytes, params: 2, frame: 31
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const styles = useStyles();
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const r11 = isFake ? Reflect.apply(string, intl, [t.OX8EMU]) : Reflect.apply(string, intl, [t['0lpCFG']]);
const value6 = '';
return (
<View
style={styles.scopeContainer}
accessible
accessibilityLabel={value6 + r11 + ': ' + text + (error != null ? '. ' + error : value6)}
>
function Scope_73273({text, error, isFake}) { // fn#73273, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9584:433, offset: 0x01d6604d, size: 602 bytes, params: 2, frame: 31
const Text = (TextModule).Text;
const styles = useStyles();
const intl = (IndexNativeModule).intl;
const string = intl.string;
const t = (IndexNativeModule).t;
const r11 = isFake ? Reflect.apply(string, intl, [t.OX8EMU]) : Reflect.apply(string, intl, [t['0lpCFG']]);
const value6 = '';
return (
<View
style={styles.iconWrapper}
accessible={false}
importantForAccessibility="no-hide-descendants"
style={styles.scopeContainer}
accessible
accessibilityLabel={value6 + r11 + ': ' + text + (error != null ? '. ' + error : value6)}
>
{isFake ? ((CircleXIcon) => <CircleXIcon style={styles.fakeScopeIcon} color={(importDefault(697) /* metro dependency 697: native */).colors.TEXT_MUTED} size="refresh_sm" />)((require(6988) /* metro dependency 6988: CircleXIcon */).CircleXIcon) : ((CircleCheckIcon) => <CircleCheckIcon color={(importDefault(697) /* metro dependency 697: native */).colors.TEXT_MUTED} size="refresh_sm" />)((require(4073) /* metro dependency 4073: CircleCheckIcon */).CircleCheckIcon)}
<View
style={styles.iconWrapper}
accessible={false}
importantForAccessibility="no-hide-descendants"
>
{
isFake
? ((CircleXIcon) => <CircleXIcon style={styles.fakeScopeIcon} color={(importDefault(697) /* metro dependency 697: native */).colors.TEXT_MUTED} size="refresh_sm" />)((require(6988) /* metro dependency 6988: CircleXIcon */).CircleXIcon)
: ((CircleCheckIcon) => <CircleCheckIcon color={(importDefault(697) /* metro dependency 697: native */).colors.TEXT_MUTED} size="refresh_sm" />)((require(4073) /* metro dependency 4073: CircleCheckIcon */).CircleCheckIcon)
}
</View>
<View style={styles.scope}>
<Text variant="text-md/normal" color={isFake ? 'text-muted' : undefined}>
{text}
</Text>
{
error != null
? (
<Text variant="text-xs/normal">
{error}
</Text>
)
: null
}
</View>
</View>
<View style={styles.scope}>
<Text variant="text-md/normal" color={isFake ? 'text-muted' : undefined}>
{text}
</Text>
{error != null ? <Text variant="text-xs/normal">{error}</Text> : null}
</View>
</View>
);
}
function AuthorizeScopes({application, accountScopes, requestedScopes, integrationType, errors, isTrustedName}) { // fn#73274, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9584:1227, offset: 0x01d662a7, size: 556 bytes, params: 2, frame: 29
isTrustedName = !(isTrustedName === undefined) && isTrustedName;
const styles = useStyles();
const value2 = (importDefault(6518) /* metro dependency 6518: useInitialValue */)(_fun73275);
if (accountScopes.length === 0) {
return null;
);
}
const value3 = value2();
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const r16 = isTrustedName ? t.PZpY9c : t['1Hz+Sl'];
const ApplicationIntegrationType = (require(8042) /* metro dependency 8042: ApplicationIntegrationType */).ApplicationIntegrationType;
const USER_INSTALL = ApplicationIntegrationType.USER_INSTALL;
let r10 = integrationType === USER_INSTALL && requestedScopes.includes((require(4122) /* metro dependency 4122: OAuth2Scopes */).OAuth2Scopes.APPLICATIONS_COMMANDS);
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const text = <Text variant="heading-sm/normal" color="text-default">{intl.format(r16,
{application: application.name})}</Text>;
const value8 = accountScopes.map(_fun73276).flat();
r10 = r10 && <Scope text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.Ls2XRq)} />;
return (
<View style={styles.scopesContainer}>
{text}
<View style={styles.scopes}>
{value8}
{r10}
<Scope text={value3} isFake />
function AuthorizeScopes({application, accountScopes, requestedScopes, integrationType, errors, isTrustedName}) { // fn#73274, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9584:1227, offset: 0x01d662a7, size: 556 bytes, params: 2, frame: 29
isTrustedName = !(isTrustedName === undefined) && isTrustedName;
const styles = useStyles();
const value2 = (UseInitialValue)(_fun73275);
if (accountScopes.length === 0) {
return null;
}
const value3 = value2();
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const r16 = isTrustedName ? t.PZpY9c : t['1Hz+Sl'];
const ApplicationIntegrationType = (ApplicationIntegrationTypeModule).ApplicationIntegrationType;
const USER_INSTALL = ApplicationIntegrationType.USER_INSTALL;
let r10 = integrationType === USER_INSTALL && requestedScopes.includes((require(4122) /* metro dependency 4122: OAuth2Scopes */).OAuth2Scopes.APPLICATIONS_COMMANDS);
const Text = (TextModule).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const text = (
<Text variant="heading-sm/normal" color="text-default">
{intl.format(r16, {application: application.name})}
</Text>
);
const value8 = accountScopes.map(_fun73276).flat();
r10 = r10 && <Scope_73273 text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.Ls2XRq)} />;
return (
<View style={styles.scopesContainer}>
{text}
<View style={styles.scopes}>
{value8}
{r10}
<Scope_73273 text={value3} isFake />
</View>
</View>
</View>
);
}
);
function _fun73275() { // fn#73275, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9584:1370, offset: 0x01d664d3, size: 96 bytes, params: 1, frame: 17
let value = environment.__proto__;
const FAKE_SCOPES = (ScopesModule).FAKE_SCOPES;
const Math = global.Math;
const floor = Math.floor;
const Math2 = global.Math;
value = Math2.random();
const FAKE_SCOPES2 = (ScopesModule).FAKE_SCOPES;
return FAKE_SCOPES[Reflect.apply(floor, Math, [value * FAKE_SCOPES2.length])];
}
function _fun73275() { // fn#73275, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9584:1370, offset: 0x01d664d3, size: 96 bytes, params: 1, frame: 17
let value = environment.__proto__;
const FAKE_SCOPES = (require(4121) /* metro dependency 4121: scopes */).FAKE_SCOPES;
const Math = global.Math;
const floor = Math.floor;
const Math2 = global.Math;
value = Math2.random();
const FAKE_SCOPES2 = (require(4121) /* metro dependency 4121: scopes */).FAKE_SCOPES;
return FAKE_SCOPES[Reflect.apply(floor, Math, [value * FAKE_SCOPES2.length])];
}
function _fun73276(a0) { // fn#73276, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9584:1846, offset: 0x01d66533, size: 72 bytes, params: 2, frame: 14
var environment;
const env0_0 = a0;
let value = environment.__proto__;
const getScopeNames = (ScopesModule).getScopeNames;
value = Reflect.apply(getScopeNames, value, [a0, accountScopes]);
return value.map(_fun73277);
function _fun73277(a0, a1) { // fn#73277, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9584:1882, offset: 0x01d6657b, size: 130 bytes, params: 3, frame: 21
const value = environment.__proto__.__proto__;
return (
<Scope_73273
text={a0}
error={a1 !== 0 || errors == null || errors[env0_0] == null ? undefined : errors[env0_0][0]}
key={'' + env0_0 + '-' + a1}
/>
);
}
function _fun73276(a0) { // fn#73276, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9584:1846, offset: 0x01d66533, size: 72 bytes, params: 2, frame: 14
var environment;
const env0_0 = a0;
let value = environment.__proto__;
const getScopeNames = (require(4121) /* metro dependency 4121: scopes */).getScopeNames;
value = Reflect.apply(getScopeNames, value, [a0, accountScopes]);
return value.map(_fun73277);
}
}
}
function _fun73277(a0, a1) { // fn#73277, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9584:1882, offset: 0x01d6657b, size: 130 bytes, params: 3, frame: 21
const value = environment.__proto__.__proto__;
return (
<Scope
text={a0}
error={a1 !== 0 || errors == null || errors[env0_0] == null ? undefined : errors[env0_0][0]}
key={'' + env0_0 + '-' + a1}
/>
);
}
global.__d(_fun73272, 9398, [31, 27, 33, 4501, 1244, 6988, 697, 4073, 4573, 6518, 4121, 8042, 4122,
2]) /* metro module 9398, dependencies: [31, 27, 33, 4501, 1244, 6988, 697, 4073, 4573, 6518, 4121, 8042, 4122, 2] */;
+157 -122
View File
@@ -1,138 +1,173 @@
/* Metro module 9401; source: modules/oauth2/native/BotPermissions.tsx; dependencies: [57, 31, 27, 33, 4501, 697, 3789, 483, 9350, 9402, 4572, 5312, 4573, 1244, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
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 BigFlagUtilsModule from '../../../external/discord_common/js/shared/utils/BigFlagUtils.tsx'; /* Metro dependency 483 */
import * as PermissionUtilsModule from '../../../utils/PermissionUtils.tsx'; /* Metro dependency 3789 */
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 XSmallIconModule from '../../../design/components/Icon/native/redesign/generated/XSmallIcon.tsx'; /* Metro dependency 5312 */
import * as PermissionsModule from '../permissions.tsx'; /* Metro dependency 9350 */
import * as CheckboxNativeModule from '../../../design/components/Checkbox/native/Checkbox.native.tsx'; /* Metro dependency 9402 */
function _fun73299(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#73299, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9587:6, offset: 0x01d672ff, size: 286 bytes, params: 8, frame: 22
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
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;
const object = {'width': 24, 'height': 24, 'flexGrow': 0, 'flexShrink': 0, 'alignItems': 'center',
const object2 = {'width': 24, 'height': 24, 'flexGrow': 0, 'flexShrink': 0, 'alignItems': 'center',
'justifyContent': 'center'};
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
const ICON_FEEDBACK_CRITICAL = (importDefault(697) /* metro dependency 697: native */).colors.ICON_FEEDBACK_CRITICAL;
object.backgroundColor = ICON_FEEDBACK_CRITICAL;
const env0_8 = Reflect.apply(createStyles, value, [{disabledPermissionIcon: object}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/oauth2/native/BotPermissions.tsx');
object2.backgroundColor = ICON_FEEDBACK_CRITICAL;
const env0_8 = Reflect.apply(createStyles, value, [{disabledPermissionIcon: object2}]);
(FileImportTrackerModule).fileFinishedImporting('modules/oauth2/native/BotPermissions.tsx');
exports.default = BotPermissions;
}
function BotPermissions({application, permissions, deniedPermissions, onPermissionsChange, guild}) { // fn#73300, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9587:465, offset: 0x01d6741d, size: 732 bytes, params: 2, frame: 34
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
var r5;
var Stack4;
const env0_3 = guild;
var value;
const binding = useStyles();
const useState = binding.useState;
const NONE = (importAll(3789) /* metro dependency 3789: PermissionUtils */).NONE;
const value3 = env0_3(Reflect.apply(useState, binding, [NONE]), 2);
const env0_5 = value3[0];
const env0_6 = value3[1];
binding.useEffect(_fun73301, [guild.permissions, onPermissionsChange, permissions]);
const OrderedPermissions = (require(9350) /* metro dependency 9350: permissions */).OrderedPermissions;
const value4 = OrderedPermissions.filter(_fun73302);
const value6 = value4.filter(_fun73303).map(_fun73304);
const value8 = value4.filter(_fun73306).map(_fun73307);
const Stack2 = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const text = <Text variant="text-sm/medium" color="text-subtle">{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.sOaT2j,
{applicationName: application.name, guildName: guild.name})}</Text>;
const Stack3 = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const stack = <Stack2>{text}<Stack3 spacing={12}>{value6}</Stack3></Stack2>;
if (value8.length > 0) {
Stack4 = (require(4572) /* metro dependency 4572: StackNative */).Stack;
value = <Text variant="text-sm/medium" color="text-subtle">{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.fsOkF4,
{applicationName: application.name})}</Text>;
value = <Stack4>{value}<Stack spacing={12}>{value8}</Stack></Stack4>;
r5 = value;
} else {
r5 = null;
}
return (
<Stack spacing={16}>
{stack}
{r5}
</Stack>
);
}
function _fun73301() { // fn#73301, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9587:643, offset: 0x01d676f9, size: 110 bytes, params: 1, frame: 19
var value;
const onPermissionsChangeBinding = onPermissionsChange;
onPermissionsChangeBinding(true, permissions);
const binding = env0_6;
const bigFlagUtilsModule = importAll(483) /* metro dependency 483: BigFlagUtils */;
const invert = bigFlagUtilsModule.invert;
const guildBinding = guild;
binding(Reflect.apply(invert, bigFlagUtilsModule, [guildBinding.permissions]));
value = Reflect.apply(bigFlagUtilsModule.invert, value, [guildBinding.permissions]);
onPermissionsChangeBinding(false, value);
}
function _fun73302(a0) { // fn#73302, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9587:789, offset: 0x01d67767, size: 48 bytes, params: 2, frame: 13
let value = environment.__proto__;
value = importAll(483) /* metro dependency 483: BigFlagUtils */;
return value.has(permissions, a0);
}
function _fun73303(a0) { // fn#73303, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9587:823, offset: 0x01d67797, size: 51 bytes, params: 2, frame: 13
let value = environment.__proto__;
value = importAll(483) /* metro dependency 483: BigFlagUtils */;
return !value.has(env0_5, a0);
}
function _fun73304(a0) { // fn#73304, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9587:851, offset: 0x01d677ca, size: 149 bytes, params: 2, frame: 20
const env0_0 = a0;
const permissionName = (require(9350) /* metro dependency 9350: permissions */).getPermissionName(a0);
const bigFlagUtilsModule = importAll(483) /* metro dependency 483: BigFlagUtils */;
const value4 = !bigFlagUtilsModule.has(deniedPermissions, a0);
const Checkbox = (require(9402) /* metro dependency 9402: CheckboxNative */).Checkbox;
const String = global.String;
return (
<Checkbox
checked={value4}
onToggle={onToggle_73305}
label={permissionName}
key={String(a0)}
/>
);
}
function _fun73306(a0) { // fn#73306, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9587:1001, offset: 0x01d6785f, size: 48 bytes, params: 2, frame: 13
const value = environment.__proto__;
return (importAll(483) /* metro dependency 483: BigFlagUtils */).has(env0_5, a0);
}
function _fun73307(a0) { // fn#73307, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9587:1028, offset: 0x01d6788f, size: 225 bytes, params: 2, frame: 23
let value = environment.__proto__;
const permissionName = (require(9350) /* metro dependency 9350: permissions */).getPermissionName(a0);
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const XSmallIcon = (require(5312) /* metro dependency 5312: XSmallIcon */).XSmallIcon;
value = <View style={styles.disabledPermissionIcon}><XSmallIcon size="sm" color="white" /></View>;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const String = global.String;
return (
<Stack
direction="horizontal"
align="center"
key={String(a0)}
>
{value}
<Text variant="text-md/medium">
{permissionName}
function BotPermissions({application, permissions, deniedPermissions, onPermissionsChange, guild}) { // fn#73300, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9587:465, offset: 0x01d6741d, size: 732 bytes, params: 2, frame: 34
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
var r5;
var Stack4;
const guild2 = guild;
var value;
const binding = useStyles();
const useState = binding.useState;
const NONE = (PermissionUtilsModule).NONE;
const value3 = guild2(Reflect.apply(useState, binding, [NONE]), 2);
const env0_5 = value3[0];
const env0_6 = value3[1];
binding.useEffect(_fun73301, [guild.permissions, onPermissionsChange, permissions]);
const OrderedPermissions = (PermissionsModule).OrderedPermissions;
const value4 = OrderedPermissions.filter(_fun73302);
const value6 = value4.filter(_fun73303).map(_fun73304);
const value8 = value4.filter(_fun73306).map(_fun73307);
const Stack2 = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const Text = (TextModule).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const text = (
<Text variant="text-sm/medium" color="text-subtle">
{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.sOaT2j,
{applicationName: application.name, guildName: guild.name})}
</Text>
</Stack>
);
}
);
const Stack3 = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const stack = (
<Stack2>
{text}
<Stack3 spacing={12}>
{value6}
</Stack3>
</Stack2>
);
if (value8.length > 0) {
Stack4 = (require(4572) /* metro dependency 4572: StackNative */).Stack;
value = (
<Text variant="text-sm/medium" color="text-subtle">
{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.fsOkF4,
{applicationName: application.name})}
</Text>
);
value = (
<Stack4>
{value}
<Stack spacing={12}>
{value8}
</Stack>
</Stack4>
);
r5 = value;
} else {
r5 = null;
}
return (
<Stack spacing={16}>
{stack}
{r5}
</Stack>
);
function _fun73301() { // fn#73301, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9587:643, offset: 0x01d676f9, size: 110 bytes, params: 1, frame: 19
var value;
const onPermissionsChangeBinding = onPermissionsChange;
onPermissionsChangeBinding(true, permissions);
const binding = env0_6;
const invert = BigFlagUtilsModule.invert;
const guildBinding = guild;
binding(Reflect.apply(invert, BigFlagUtilsModule, [guildBinding.permissions]));
value = Reflect.apply(BigFlagUtilsModule.invert, value, [guildBinding.permissions]);
onPermissionsChangeBinding(false, value);
}
function _fun73302(a0) { // fn#73302, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9587:789, offset: 0x01d67767, size: 48 bytes, params: 2, frame: 13
let value = environment.__proto__;
value = importAll(483) /* metro dependency 483: BigFlagUtils */;
return value.has(permissions, a0);
}
function _fun73303(a0) { // fn#73303, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9587:823, offset: 0x01d67797, size: 51 bytes, params: 2, frame: 13
let value = environment.__proto__;
value = importAll(483) /* metro dependency 483: BigFlagUtils */;
return !value.has(env0_5, a0);
}
function _fun73304(a0) { // fn#73304, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9587:851, offset: 0x01d677ca, size: 149 bytes, params: 2, frame: 20
const env0_0 = a0;
const permissionName = (PermissionsModule).getPermissionName(a0);
const value4 = !BigFlagUtilsModule.has(deniedPermissions, a0);
const Checkbox = (CheckboxNativeModule).Checkbox;
const String = global.String;
return (
<Checkbox
checked={value4}
onToggle={onToggle_73305}
label={permissionName}
key={String(a0)}
/>
);
function onToggle_73305(a0) { // fn#73305, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9587:956, offset: 0x00d890af, size: 27 bytes, params: 2, frame: 13
return onPermissionsChange(a0, env0_0);
}
}
function _fun73306(a0) { // fn#73306, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9587:1001, offset: 0x01d6785f, size: 48 bytes, params: 2, frame: 13
const value = environment.__proto__;
return (BigFlagUtilsModule).has(env0_5, a0);
}
function _fun73307(a0) { // fn#73307, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9587:1028, offset: 0x01d6788f, size: 225 bytes, params: 2, frame: 23
let value = environment.__proto__;
const permissionName = (PermissionsModule).getPermissionName(a0);
const Stack = (StackNativeModule).Stack;
const XSmallIcon = (XSmallIconModule).XSmallIcon;
value = (
<View style={styles.disabledPermissionIcon}>
<XSmallIcon size="sm" color="white" />
</View>
);
const Text = (TextModule).Text;
const String = global.String;
return (
<Stack
direction="horizontal"
align="center"
key={String(a0)}
>
{value}
<Text variant="text-md/medium">
{permissionName}
</Text>
</Stack>
);
}
}
function onToggle_73305(a0) { // fn#73305, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9587:956, offset: 0x00d890af, size: 27 bytes, params: 2, frame: 13
return onPermissionsChange(a0, env0_0);
}
global.__d(_fun73299, 9401, [57, 31, 27, 33, 4501, 697, 3789, 483, 9350, 9402, 4572, 5312, 4573, 1244,
2]) /* metro module 9401, dependencies: [57, 31, 27, 33, 4501, 697, 3789, 483, 9350, 9402, 4572, 5312, 4573, 1244, 2] */;
@@ -1,181 +1,270 @@
/* Metro module 9353; source: modules/oauth2/native/ConnectAccountStep.tsx; dependencies: [31, 27, 4234, 1226, 1878, 33, 4501, 697, 4048, 566, 4915, 1423, 4002, 6772, 1305, 8638, 4573, 1244, 4578, 9354, 4068, 4064, 2] */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import AuthenticationStore from '../../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */
import UserStore from '../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import UseTheme from '../../../hooks/useTheme.tsx'; /* Metro dependency 4048 */
import ApplicationStore from '../../applications/ApplicationStore.tsx'; /* Metro dependency 4234 */
import Platforms from '../../../lib/Platforms.tsx'; /* Metro dependency 4915 */
import AuthorizeConnectionNative from '../../connections/authorizeConnection.native.tsx'; /* Metro dependency 9354 */
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 CheckmarkLargeIconModule from '../../../design/components/Icon/native/redesign/generated/CheckmarkLargeIcon.tsx'; /* Metro dependency 4064 */
import * as CircleInformationIconModule from '../../../design/components/Icon/native/redesign/generated/CircleInformationIcon.tsx'; /* Metro dependency 4068 */
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 MoreHorizontalIconModule from '../../../design/components/Icon/native/redesign/generated/MoreHorizontalIcon.tsx'; /* Metro dependency 8638 */
function _fun73091(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#73091, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9539:6, offset: 0x01d5e2f3, size: 689 bytes, params: 8, frame: 23
var object6;
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 authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
let value = require(33) /* metro dependency 33 */;
let value = JsxRuntimeModule;
const env0_8 = value.jsx;
const env0_9 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object6 = {container: {'flexDirection': 'column', 'gap': 16, 'width': '100%'}, header: {'flexDirection': 'column',
object = {container: {'flexDirection': 'column', 'gap': 16, 'width': '100%'}, header: {'flexDirection': 'column',
'alignItems': 'center', 'gap': 8, 'marginBottom': 8}, headerIcons: {'flexDirection': 'row',
'alignItems': 'center', 'gap': 16, 'marginBottom': 8}};
const object7 = {'flexDirection': 'row', 'alignItems': 'center', 'gap': 12, 'padding': 16, 'backgroundColor': null,
const object2 = {'flexDirection': 'row', 'alignItems': 'center', 'gap': 12, 'padding': 16, 'backgroundColor': null,
'borderColor': null, 'borderWidth': 1};
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object7.backgroundColor = BACKGROUND_SURFACE_HIGH;
object2.backgroundColor = BACKGROUND_SURFACE_HIGH;
let BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object7.borderColor = BORDER_SUBTLE;
object7.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
object6.card = object7;
object6.cardName = {'flex': 1, 'minWidth': 0};
object6.cardInfo = {'flex': 1, 'minWidth': 0, 'flexDirection': 'column', 'gap': 2};
const object8 = {'width': 40, 'height': 40};
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object6.platformIcon = object8;
const object9 = {'width': 32, 'height': 32};
object9.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object6.platformIconSmall = object9;
const object10 = {'flexDirection': 'row', 'alignItems': 'flex-start', 'gap': 8, 'padding': 12,
object2.borderColor = BORDER_SUBTLE;
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
object.card = object2;
object.cardName = {'flex': 1, 'minWidth': 0};
object.cardInfo = {'flex': 1, 'minWidth': 0, 'flexDirection': 'column', 'gap': 2};
const object3 = {'width': 40, 'height': 40};
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object.platformIcon = object3;
const object4 = {'width': 32, 'height': 32};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object.platformIconSmall = object4;
const object5 = {'flexDirection': 'row', 'alignItems': 'flex-start', 'gap': 8, 'padding': 12,
'backgroundColor': null, 'borderColor': null, 'borderWidth': 1};
const BACKGROUND_FEEDBACK_INFO = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_FEEDBACK_INFO;
object10.backgroundColor = BACKGROUND_FEEDBACK_INFO;
object5.backgroundColor = BACKGROUND_FEEDBACK_INFO;
const ICON_FEEDBACK_INFO = (importDefault(697) /* metro dependency 697: native */).colors.ICON_FEEDBACK_INFO;
object10.borderColor = ICON_FEEDBACK_INFO;
object10.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object6.infoNotice = object10;
object6.infoText = {flex: 1};
object5.borderColor = ICON_FEEDBACK_INFO;
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object.infoNotice = object5;
object.infoText = {flex: 1};
BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object6.divider = {'height': 1, 'backgroundColor': null, 'marginVertical': 8, backgroundColor: BORDER_SUBTLE};
const env0_10 = Reflect.apply(createStyles, value, [object6]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/oauth2/native/ConnectAccountStep.tsx');
object.divider = {'height': 1, 'backgroundColor': null, 'marginVertical': 8, backgroundColor: BORDER_SUBTLE};
const env0_10 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/oauth2/native/ConnectAccountStep.tsx');
exports.default = ConnectAccountStep;
exports.ConnectedAccountCard = ConnectedAccountCard;
}
function ConnectAccountStep({clientId, platformType, platformName}) { // fn#73092, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9539:1241, offset: 0x01d5e5a4, size: 1443 bytes, params: 2, frame: 35
var r12;
var moduleValue3;
var makeSource;
var isThemeLight2;
var icon;
const styles = useStyles();
const value3 = (UseTheme)();
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ApplicationStore], function() {
return ApplicationStore.getApplication(clientId);
}, [clientId]);
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([AuthenticationStore, UserStore],
_fun73094);
const value6 = (Platforms).get(platformType);
if (value6 != null) {
moduleValue3 = require(1423) /* metro dependency 1423: AvatarUtils */;
makeSource = moduleValue3.makeSource;
isThemeLight2 = (require(4002) /* metro dependency 4002: shared */).isThemeLight(value3);
icon = value6.icon;
r12 = Reflect.apply(makeSource, moduleValue3, [isThemeLight2 ? icon.lightPNG : icon.darkPNG]);
} else {
r12 = null;
}
const r18 = value4 != null ? (importDefault(1423) /* metro dependency 1423: AvatarUtils */).getApplicationIconSource({id: value4.id,
icon: value4.icon}) : undefined;
const r21 = value5 != null ? (importDefault(1423) /* metro dependency 1423: AvatarUtils */).getUserAvatarSource(value5) : undefined;
const r16 = value4?.name ?? '';
ReactModule.useEffect(_fun73095, [clientId]);
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
let XLARGE = AvatarSizes.XLARGE;
const items2 = [
<Avatar source={r18} size={XLARGE} />,
];
const MoreHorizontalIcon = (MoreHorizontalIconModule).MoreHorizontalIcon;
const INTERACTIVE_TEXT_DEFAULT = (Native).colors.INTERACTIVE_TEXT_DEFAULT;
items2[1] = <MoreHorizontalIcon color={INTERACTIVE_TEXT_DEFAULT} size="md" />;
XLARGE = AvatarSizes.XLARGE;
items2[2] = <Avatar source={r21} size={XLARGE} />;
const items3 = [
<View style={styles.headerIcons}>
{items2}
</View>,
];
const Text = (TextModule).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
items3[1] = (
<Text variant="text-lg/normal" color="text-default">
{Reflect.apply(string, intl, [(require(1244) /* metro dependency 1244: indexNative */).t.uT1CPa])}
</Text>
);
items3[2] = (
<Text variant="heading-xl/semibold" color="mobile-text-heading-primary">
{r16}
</Text>
);
const items4 = [
<View style={styles.header}>
{items3}
</View>,
];
items4[1] = (
<Text variant="text-sm/normal" color="text-default">
{intl.format((require(1244) /* metro dependency 1244: indexNative */).t['aJRE/Q'], {applicationName: r16,
platformName: platformName})}
</Text>
);
const items5 = [
r12 != null
? ((Icon) => <Icon source={r12} style={styles.platformIcon} disableColor />)((require(1305) /* metro dependency 1305: native */).Icon)
: null,
];
items5[1] = (
<Text
variant="text-md/medium"
style={styles.cardName}
color="text-default"
>
{platformName}
</Text>
);
const Button = (ButtonNativeModule).Button;
const buttonProps = {'variant': 'primary', 'size': 'sm', onPress: onPress_73096};
string = intl.string;
const S0W8Z5 = (require(1244) /* metro dependency 1244: indexNative */).t.S0W8Z5;
buttonProps.text = Reflect.apply(string, intl, [S0W8Z5]);
items5[2] = <Button {...buttonProps} />;
items4[2] = (
<View style={styles.card}>
{items5}
</View>
);
const CircleInformationIcon = (CircleInformationIconModule).CircleInformationIcon;
const ICON_FEEDBACK_INFO = (Native).colors.ICON_FEEDBACK_INFO;
items4[3] = (
<View style={styles.infoNotice}>
<CircleInformationIcon color={ICON_FEEDBACK_INFO} size="sm" />
<Text
variant="text-sm/normal"
color="text-default"
style={styles.infoText}
>
{intl.format((require(1244) /* metro dependency 1244: indexNative */).t['8psEFX'],
{platformName: platformName, applicationName: r16})}
</Text>
</View>
);
return (
<View style={styles.container}>
{items4}
</View>
);
function _fun73094() { // fn#73094, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9539:1437, offset: 0x01d5eb62, size: 41 bytes, params: 1, frame: 10
const value = environment.__proto__;
const id = AuthenticationStore.getId();
const value3 = null;
return value3 != id ? UserStore.getCurrentUser() : value3;
}
function _fun73095() { // fn#73095, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9539:1775, offset: 0x01d5eb8b, size: 45 bytes, params: 1, frame: 12
let value = environment.__proto__;
value = importDefault(6772) /* metro dependency 6772: ApplicationActionCreators */;
value.fetchApplication(clientId);
}
function ConnectAccountStepOnPress() { // fn#73096, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9539:2751, owner: ConnectAccountStep.onPress, offset: 0x01d5ebb8, size: 56 bytes, params: 1, frame: 12
const value = environment.__proto__;
(AuthorizeConnectionNative)({platformType: platformType,
location: 'OAuth2 Connect Account Step'});
}
function ConnectAccountStep({clientId, platformType, platformName}) { // fn#73092, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9539:1241, offset: 0x01d5e5a4, size: 1443 bytes, params: 2, frame: 35
var r12;
var moduleValue3;
var makeSource;
var isThemeLight2;
var icon;
const styles = useStyles();
const value3 = (importDefault(4048) /* metro dependency 4048: useTheme */)();
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ApplicationStore], function() {
return ApplicationStore.getApplication(clientId);
}, [clientId]);
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([AuthenticationStore, UserStore],
_fun73094);
const value6 = (importDefault(4915) /* metro dependency 4915: Platforms */).get(platformType);
if (value6 != null) {
moduleValue3 = require(1423) /* metro dependency 1423: AvatarUtils */;
makeSource = moduleValue3.makeSource;
isThemeLight2 = (require(4002) /* metro dependency 4002: shared */).isThemeLight(value3);
icon = value6.icon;
r12 = Reflect.apply(makeSource, moduleValue3, [isThemeLight2 ? icon.lightPNG : icon.darkPNG]);
} else {
r12 = null;
}
const r18 = value4 != null ? (importDefault(1423) /* metro dependency 1423: AvatarUtils */).getApplicationIconSource({id: value4.id,
icon: value4.icon}) : undefined;
const r21 = value5 != null ? (importDefault(1423) /* metro dependency 1423: AvatarUtils */).getUserAvatarSource(value5) : undefined;
const r16 = value4?.name ?? '';
env0_3.useEffect(_fun73095, [clientId]);
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
let XLARGE = AvatarSizes.XLARGE;
const items2 = [<Avatar source={r18} size={XLARGE} />];
const MoreHorizontalIcon = (require(8638) /* metro dependency 8638: MoreHorizontalIcon */).MoreHorizontalIcon;
const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
items2[1] = <MoreHorizontalIcon color={INTERACTIVE_TEXT_DEFAULT} size="md" />;
XLARGE = AvatarSizes.XLARGE;
items2[2] = <Avatar source={r21} size={XLARGE} />;
const items3 = [<View style={styles.headerIcons}>{items2}</View>];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
items3[1] = <Text variant="text-lg/normal" color="text-default">{Reflect.apply(string, intl,
[(require(1244) /* metro dependency 1244: indexNative */).t.uT1CPa])}</Text>;
items3[2] = <Text variant="heading-xl/semibold" color="mobile-text-heading-primary">{r16}</Text>;
const items4 = [<View style={styles.header}>{items3}</View>];
items4[1] = <Text variant="text-sm/normal" color="text-default">{intl.format((require(1244) /* metro dependency 1244: indexNative */).t['aJRE/Q'],
{applicationName: r16, platformName: platformName})}</Text>;
const items5 = [r12 != null ? ((Icon) => <Icon source={r12} style={styles.platformIcon} disableColor />)((require(1305) /* metro dependency 1305: native */).Icon) : null];
items5[1] = <Text variant="text-md/medium" style={styles.cardName} color="text-default">{platformName}</Text>;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
const buttonProps = {'variant': 'primary', 'size': 'sm', onPress: onPress_73096};
string = intl.string;
const S0W8Z5 = (require(1244) /* metro dependency 1244: indexNative */).t.S0W8Z5;
buttonProps.text = Reflect.apply(string, intl, [S0W8Z5]);
items5[2] = <Button {...buttonProps} />;
items4[2] = <View style={styles.card}>{items5}</View>;
const CircleInformationIcon = (require(4068) /* metro dependency 4068: CircleInformationIcon */).CircleInformationIcon;
const ICON_FEEDBACK_INFO = (importDefault(697) /* metro dependency 697: native */).colors.ICON_FEEDBACK_INFO;
items4[3] = <View style={styles.infoNotice}><CircleInformationIcon color={ICON_FEEDBACK_INFO} size="sm" /><Text variant="text-sm/normal" color="text-default" style={styles.infoText}>{intl.format((require(1244) /* metro dependency 1244: indexNative */).t['8psEFX'],
{platformName: platformName, applicationName: r16})}</Text></View>;
return (
<View style={styles.container}>
{items4}
</View>
);
}
function ConnectedAccountCard({platformType, platformName, connectedAccount, applicationName}) { // fn#73097, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9539:3198, offset: 0x01d5ebf0, size: 815 bytes, params: 2, frame: 36
var r12;
var moduleValue;
var makeSource;
var isThemeLight2;
var icon;
const styles = useStyles();
const value2 = (importDefault(4048) /* metro dependency 4048: useTheme */)();
const value3 = (importDefault(4915) /* metro dependency 4915: Platforms */).get(platformType);
if (value3 != null) {
moduleValue = require(1423) /* metro dependency 1423: AvatarUtils */;
makeSource = moduleValue.makeSource;
isThemeLight2 = (require(4002) /* metro dependency 4002: shared */).isThemeLight(value2);
icon = value3.icon;
r12 = Reflect.apply(makeSource, moduleValue, [isThemeLight2 ? icon.lightPNG : icon.darkPNG]);
} else {
r12 = null;
function ConnectedAccountCard({platformType, platformName, connectedAccount, applicationName}) { // fn#73097, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9539:3198, offset: 0x01d5ebf0, size: 815 bytes, params: 2, frame: 36
var r12;
var moduleValue;
var makeSource;
var isThemeLight2;
var icon;
const styles = useStyles();
const value2 = (UseTheme)();
const value3 = (Platforms).get(platformType);
if (value3 != null) {
moduleValue = require(1423) /* metro dependency 1423: AvatarUtils */;
makeSource = moduleValue.makeSource;
isThemeLight2 = (require(4002) /* metro dependency 4002: shared */).isThemeLight(value2);
icon = value3.icon;
r12 = Reflect.apply(makeSource, moduleValue, [isThemeLight2 ? icon.lightPNG : icon.darkPNG]);
} else {
r12 = null;
}
const Text = (TextModule).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let format = intl.format;
const items3 = [
<Text variant="text-sm/normal" color="text-default">
{Reflect.apply(format, intl, [(require(1244) /* metro dependency 1244: indexNative */).t['+oaRw3'],
{platformName: platformName}])}
</Text>,
];
const items2 = [
r12 != null
? ((Icon) => <Icon source={r12} style={styles.platformIconSmall} disableColor />)((require(1305) /* metro dependency 1305: native */).Icon)
: null,
];
const text = (
<Text variant="text-md/medium" color="mobile-text-heading-primary">
{connectedAccount.name}
</Text>
);
format = intl.format;
const Dkd7sE = (require(1244) /* metro dependency 1244: indexNative */).t.Dkd7sE;
items2[1] = (
<View style={styles.cardInfo}>
{text}
<Text variant="text-xs/normal" color="text-muted">
{Reflect.apply(format, intl, [Dkd7sE, {platformName: platformName,
connectedAccountId: connectedAccount.id}])}
</Text>
</View>
);
const CheckmarkLargeIcon = (CheckmarkLargeIconModule).CheckmarkLargeIcon;
const TEXT_FEEDBACK_POSITIVE = (Native).colors.TEXT_FEEDBACK_POSITIVE;
items2[2] = <CheckmarkLargeIcon color={TEXT_FEEDBACK_POSITIVE} size="sm" />;
items3[1] = (
<View style={styles.card}>
{items2}
</View>
);
items3[2] = (
<Text variant="text-sm/normal" color="text-default">
{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.pyRNXJ,
{applicationName: applicationName})}
</Text>
);
items3[3] = <View style={styles.divider} />;
return (
<View style={styles.container}>
{items3}
</View>
);
}
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let format = intl.format;
const items3 = [<Text variant="text-sm/normal" color="text-default">{Reflect.apply(format, intl,
[(require(1244) /* metro dependency 1244: indexNative */).t['+oaRw3'], {platformName: platformName}])}</Text>];
const items2 = [r12 != null ? ((Icon) => <Icon source={r12} style={styles.platformIconSmall} disableColor />)((require(1305) /* metro dependency 1305: native */).Icon) : null];
const text = <Text variant="text-md/medium" color="mobile-text-heading-primary">{connectedAccount.name}</Text>;
format = intl.format;
const Dkd7sE = (require(1244) /* metro dependency 1244: indexNative */).t.Dkd7sE;
items2[1] = <View style={styles.cardInfo}>{text}<Text variant="text-xs/normal" color="text-muted">{Reflect.apply(format,
intl, [Dkd7sE, {platformName: platformName, connectedAccountId: connectedAccount.id}])}</Text></View>;
const CheckmarkLargeIcon = (require(4064) /* metro dependency 4064: CheckmarkLargeIcon */).CheckmarkLargeIcon;
const TEXT_FEEDBACK_POSITIVE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_FEEDBACK_POSITIVE;
items2[2] = <CheckmarkLargeIcon color={TEXT_FEEDBACK_POSITIVE} size="sm" />;
items3[1] = <View style={styles.card}>{items2}</View>;
items3[2] = <Text variant="text-sm/normal" color="text-default">{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.pyRNXJ,
{applicationName: applicationName})}</Text>;
items3[3] = <View style={styles.divider} />;
return (
<View style={styles.container}>
{items3}
</View>
);
}
function _fun73094() { // fn#73094, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9539:1437, offset: 0x01d5eb62, size: 41 bytes, params: 1, frame: 10
const value = environment.__proto__;
const id = AuthenticationStore.getId();
const value3 = null;
return value3 != id ? UserStore.getCurrentUser() : value3;
}
function _fun73095() { // fn#73095, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9539:1775, offset: 0x01d5eb8b, size: 45 bytes, params: 1, frame: 12
let value = environment.__proto__;
value = importDefault(6772) /* metro dependency 6772: ApplicationActionCreators */;
value.fetchApplication(clientId);
}
function ConnectAccountStepOnPress() { // fn#73096, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9539:2751, owner: ConnectAccountStep.onPress, offset: 0x01d5ebb8, size: 56 bytes, params: 1, frame: 12
const value = environment.__proto__;
(importDefault(9354) /* metro dependency 9354: authorizeConnectionNative */)({platformType: platformType,
location: 'OAuth2 Connect Account Step'});
}
global.__d(_fun73091, 9353, [31, 27, 4234, 1226, 1878, 33, 4501, 697, 4048, 566, 4915, 1423, 4002, 6772, 1305, 8638,
4573, 1244, 4578, 9354, 4068, 4064,
2]) /* metro module 9353, dependencies: [31, 27, 4234, 1226, 1878, 33, 4501, 697, 4048, 566, 4915, 1423, 4002, 6772, 1305, 8638, 4573, 1244, 4578, 9354, 4068, 4064, 2] */;
+4 -1
View File
@@ -1,10 +1,13 @@
/* Metro module 8871; source: modules/oauth2/native/Constants.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun69156(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#69156, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9056:6, offset: 0x01c6b202, size: 108 bytes, params: 8, frame: 15
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/oauth2/native/Constants.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/oauth2/native/Constants.tsx');
exports.OAUTH2_AUTHORIZE_MODAL_KEY = 'oauth2-authorize';
exports.OAUTH2_SUCCESS_RESULT_MODAL_KEY = 'oauth2-success-result';
exports.OAUTH2_ERROR_RESULT_MODAL_KEY = 'oauth2-error-result';
}
global.__d(_fun69156, 8871, [2]) /* metro module 8871, dependencies: [2] */;
+50 -36
View File
@@ -1,11 +1,19 @@
/* Metro module 9351; source: modules/oauth2/native/ErrorResult.tsx; dependencies: [31, 27, 33, 4501, 697, 6618, 9352, 4573, 1244, 4578, 5080, 2] */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import ModalActionCreators from '../../../actions/ModalActionCreators.tsx'; /* Metro dependency 5080 */
import Module09352 from '../../../by-id/module-09352.js'; /* Metro dependency 9352 */
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 SafeAreaViewModule from '../../../components_native/common/SafeAreaView.tsx'; /* Metro dependency 6618 */
function _fun73087(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#73087, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9537:6, offset: 0x01d5dfb1, size: 322 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 */;
let value = require(27) /* metro dependency 27 */;
ReactModule;
let value = ReactNativeModule;
const env0_3 = value.Image;
const env0_4 = value.View;
value = require(33) /* metro dependency 33 */;
@@ -13,40 +21,46 @@ function _fun73087(global, require, importDefault, importAll, module, exports, d
const env0_6 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
object2.container = {'flex': 1, 'backgroundColor': null, 'gap': 16, 'paddingHorizontal': 16,
object = {};
const BACKGROUND_BASE_LOWER = (Native).colors.BACKGROUND_BASE_LOWER;
object.container = {'flex': 1, 'backgroundColor': null, 'gap': 16, 'paddingHorizontal': 16,
'justifyContent': 'center', 'flexDirection': 'column', backgroundColor: BACKGROUND_BASE_LOWER};
object2.inner = {'flex': 1, 'flexDirection': 'column', 'alignItems': 'center', 'justifyContent': 'center'};
object2.text = {'marginTop': 24, 'textAlign': 'center'};
const TEXT_FEEDBACK_WARNING = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_FEEDBACK_WARNING;
object2.image = {tintColor: TEXT_FEEDBACK_WARNING};
const env0_7 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/oauth2/native/ErrorResult.tsx');
object.inner = {'flex': 1, 'flexDirection': 'column', 'alignItems': 'center', 'justifyContent': 'center'};
object.text = {'marginTop': 24, 'textAlign': 'center'};
const TEXT_FEEDBACK_WARNING = (Native).colors.TEXT_FEEDBACK_WARNING;
object.image = {tintColor: TEXT_FEEDBACK_WARNING};
const env0_7 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/oauth2/native/ErrorResult.tsx');
exports.default = ErrorResult;
function ErrorResult({error, hideFooter}) { // fn#73088, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9537:591, offset: 0x01d5e0f3, size: 405 bytes, params: 2, frame: 28
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const styles = useStyles();
const SafeAreaPaddingView = (SafeAreaViewModule).SafeAreaPaddingView;
const image = <Image source={Module09352} style={styles.image} />;
const Text = (TextModule).Text;
return (
<SafeAreaPaddingView bottom style={styles.container}>
<View style={styles.inner}>
{image}
<Text style={styles.text} variant="text-md/medium">
{error ?? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.mqn873)}
</Text>
</View>
{
hideFooter
? null
: ((Button) => <Button size="lg" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq)} onPress={onPress_73089} />)((require(4578) /* metro dependency 4578: ButtonNative */).Button)
}
</SafeAreaPaddingView>
);
function ErrorResultOnPress() { // fn#73089, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9537:989, owner: ErrorResult.onPress, offset: 0x01d5e288, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (ModalActionCreators).pop();
}
}
}
function ErrorResult({error, hideFooter}) { // fn#73088, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9537:591, offset: 0x01d5e0f3, size: 405 bytes, params: 2, frame: 28
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const styles = useStyles();
const SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
const image = <Image source={importDefault(9352) /* metro dependency 9352 */} style={styles.image} />;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<SafeAreaPaddingView bottom style={styles.container}>
<View style={styles.inner}>
{image}
<Text style={styles.text} variant="text-md/medium">
{error ?? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.mqn873)}
</Text>
</View>
{hideFooter ? null : ((Button) => <Button size="lg" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq)} onPress={onPress_73089} />)((require(4578) /* metro dependency 4578: ButtonNative */).Button)}
</SafeAreaPaddingView>
);
}
function ErrorResultOnPress() { // fn#73089, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9537:989, owner: ErrorResult.onPress, offset: 0x01d5e288, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop();
}
global.__d(_fun73087, 9351, [31, 27, 33, 4501, 697, 6618, 9352, 4573, 1244, 4578, 5080,
2]) /* metro module 9351, dependencies: [31, 27, 33, 4501, 697, 6618, 9352, 4573, 1244, 4578, 5080, 2] */;
+106 -70
View File
@@ -1,84 +1,120 @@
/* Metro module 9399; source: modules/oauth2/native/GuildSelector.tsx; dependencies: [31, 27, 661, 33, 4501, 697, 4080, 9059, 1962, 1244, 483, 4573, 1305, 7972, 2] */
import ActionSheetActionCreators from '../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
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 NativeModule from '../../../design/void/native.tsx'; /* Metro dependency 1305 */
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 NativeModule2 from '../../../design/void/Form/native/index.tsx'; /* Metro dependency 7972 */
function _fun73278(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#73278, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9585:6, offset: 0x01d665fd, size: 380 bytes, params: 8, frame: 22
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
const env0_6 = (require(661) /* metro dependency 661: Constants */).Permissions;
let value = require(33) /* metro dependency 33 */;
let value = JsxRuntimeModule;
const env0_7 = value.jsx;
const env0_8 = value.jsxs;
const createStyles = (require(4501) /* metro dependency 4501: createStyles */).createStyles;
object3 = {selectorGroup: {'display': 'flex', 'flexDirection': 'column', 'gap': 8}};
const object4 = {};
const createStyles = (CreateStylesModule).createStyles;
object = {selectorGroup: {'display': 'flex', 'flexDirection': 'column', 'gap': 8}};
const object2 = {};
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
object4.backgroundColor = BACKGROUND_BASE_LOWER;
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object3.select = object4;
object2.backgroundColor = BACKGROUND_BASE_LOWER;
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object.select = object2;
const TEXT_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_SUBTLE;
object3.label = {color: TEXT_SUBTLE, fontWeight: '500'};
object.label = {color: TEXT_SUBTLE, fontWeight: '500'};
const RED_400 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.RED_400;
object3.error = {color: RED_400};
value = Reflect.apply(createStyles, value, [object3]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/oauth2/native/GuildSelector.tsx');
object.error = {color: RED_400};
value = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/oauth2/native/GuildSelector.tsx');
exports.default = GuildSelector;
exports.useStyles = value;
function GuildSelector({error, selectedGuildId, onGuildChange, guilds, disabled}) { // fn#73279, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9585:556, offset: 0x01d66779, size: 605 bytes, params: 2, frame: 28
const LegacyText = (NativeModule).LegacyText;
const styles = useStyles();
const value3 = ReactModule.useCallback(_fun73280, [guilds, onGuildChange, selectedGuildId]);
const value4 = guilds.find(function({id}) {
return id === selectedGuildId;
});
const Text = (TextModule).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const items2 = [
<Text variant="eyebrow" color="text-default">
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['1DXFFd'])}
</Text>,
];
items2[1] = (
error != null
? (
error === ''
? null
: (
<LegacyText style={styles.error}>
{error}
</LegacyText>
)
)
: null
);
const FormRow = (NativeModule2).FormRow;
const r9 = value4?.name ?? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.oM4E1A);
const FormRow2 = (NativeModule2).FormRow;
const Arrow = FormRow2.Arrow;
items2[2] = (
<FormRow
label={r9}
disabled={disabled}
trailing={<Arrow />}
DEPRECATED_style={styles.select}
onPress={value3}
/>
);
items2[3] = (
<LegacyText style={styles.label}>
{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.t9Jm9o, {})}
</LegacyText>
);
return (
<View style={styles.selectorGroup}>
{items2}
</View>
);
function _fun73280() { // fn#73280, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9585:673, offset: 0x01d669d6, size: 224 bytes, params: 1, frame: 21
var environment;
let value = environment.__proto__;
const value2 = undefined;
const defaultImport = importDefault(dependencyMap[6]);
const openLazy = defaultImport.openLazy;
value = require(dependencyMap[8]);
value = value(dependencyMap[7], dependencyMap.paths);
const object = {};
const intl = require(dependencyMap[9]).intl;
object.title = intl.string(require(dependencyMap[9]).t.oM4E1A);
object.items = guilds.filter(function(a0) {
return importAll(dependencyMap[10]).has(a0.permissions, Permissions.MANAGE_GUILD);
}).map(function(a0) {
return {label: a0.name, value: a0.id};
});
object.onItemSelect = onItemSelect_73283;
object.selectedItem = selectedGuildId ?? value2;
object.hasIcons = false;
Reflect.apply(openLazy, defaultImport, [value, 'GuildSelector', object]);
return value2;
function onItemSelect_73283(a0) { // fn#73283, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9585:866, offset: 0x01d66b08, size: 59 bytes, params: 2, frame: 12
let value = environment.__proto__;
onGuildChange(a0);
value = environment.__proto__.__proto__;
(ActionSheetActionCreators).hideActionSheet('GuildSelector');
}
}
}
}
function GuildSelector({error, selectedGuildId, onGuildChange, guilds, disabled}) { // fn#73279, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9585:556, offset: 0x01d66779, size: 605 bytes, params: 2, frame: 28
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
const styles = useStyles();
const value3 = env0_4.useCallback(_fun73280, [guilds, onGuildChange, selectedGuildId]);
const value4 = guilds.find(function({id}) {
return id === selectedGuildId;
});
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const items2 = [<Text variant="eyebrow" color="text-default">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['1DXFFd'])}</Text>];
items2[1] = error != null ? error === '' ? null : <LegacyText style={styles.error}>{error}</LegacyText> : null;
const FormRow = (require(7972) /* metro dependency 7972: native */).FormRow;
const r9 = value4?.name ?? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.oM4E1A);
const FormRow2 = (require(7972) /* metro dependency 7972: native */).FormRow;
const Arrow = FormRow2.Arrow;
items2[2] = <FormRow label={r9} disabled={disabled} trailing={<Arrow />} DEPRECATED_style={styles.select} onPress={value3} />;
items2[3] = <LegacyText style={styles.label}>{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.t9Jm9o,
{})}</LegacyText>;
return (
<View style={styles.selectorGroup}>
{items2}
</View>
);
}
function _fun73280() { // fn#73280, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9585:673, offset: 0x01d669d6, size: 224 bytes, params: 1, frame: 21
var environment;
let value = environment.__proto__;
const value2 = undefined;
const defaultImport = importDefault(dependencyMap[6]);
const openLazy = defaultImport.openLazy;
value = require(dependencyMap[8]);
value = value(dependencyMap[7], dependencyMap.paths);
const object2 = {};
const intl = require(dependencyMap[9]).intl;
object2.title = intl.string(require(dependencyMap[9]).t.oM4E1A);
object2.items = guilds.filter(function(a0) {
return importAll(dependencyMap[10]).has(a0.permissions, Permissions.MANAGE_GUILD);
}).map(function(a0) {
return {label: a0.name, value: a0.id};
});
object2.onItemSelect = onItemSelect;
object2.selectedItem = selectedGuildId ?? value2;
object2.hasIcons = false;
Reflect.apply(openLazy, defaultImport, [value, 'GuildSelector', object2]);
return value2;
}
function onItemSelect(a0) { // fn#73283, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9585:866, offset: 0x01d66b08, size: 59 bytes, params: 2, frame: 12
let value = environment.__proto__;
onGuildChange(a0);
value = environment.__proto__.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet('GuildSelector');
}
global.__d(_fun73278, 9399, [31, 27, 661, 33, 4501, 697, 4080, 9059, 1962, 1244, 483, 4573, 1305, 7972,
2]) /* metro module 9399, dependencies: [31, 27, 661, 33, 4501, 697, 4080, 9059, 1962, 1244, 483, 4573, 1305, 7972, 2] */;
+91 -59
View File
@@ -1,78 +1,110 @@
/* Metro module 9413; source: modules/oauth2/native/Header.tsx; dependencies: [31, 27, 661, 33, 4501, 697, 1423, 1305, 4573, 8706, 1391, 1244, 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 JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
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 _fun73329(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#73329, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9599:6, offset: 0x01d6894f, size: 408 bytes, params: 8, frame: 22
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const env0_4 = (require(661) /* metro dependency 661: Constants */).UserFlags;
let value = require(33) /* metro dependency 33 */;
ReactModule;
let value = JsxRuntimeModule;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object3 = {};
const object4 = {'paddingBottom': 16, 'marginHorizontal': 16, 'borderTopLeftRadius': null,
object = {};
const object2 = {'paddingBottom': 16, 'marginHorizontal': 16, 'borderTopLeftRadius': null,
'borderTopRightRadius': null, 'flexDirection': 'column', 'justifyContent': 'center', 'alignItems': 'center'};
object4.borderTopLeftRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object4.borderTopRightRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object3.header = object4;
object3.applicationNameWrapper = {flexDirection: 'row'};
object3.headerIcons = {'alignItems': 'center', 'flexDirection': 'row', 'justifyContent': 'space-between',
object2.borderTopLeftRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object2.borderTopRightRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object.header = object2;
object.applicationNameWrapper = {flexDirection: 'row'};
object.headerIcons = {'alignItems': 'center', 'flexDirection': 'row', 'justifyContent': 'space-between',
'marginBottom': 24};
object3.ellipseGroup = {'flexDirection': 'row', 'justifyContent': 'space-between', 'marginHorizontal': 24};
object.ellipseGroup = {'flexDirection': 'row', 'justifyContent': 'space-between', 'marginHorizontal': 24};
const MOBILE_TEXT_HEADING_PRIMARY = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_TEXT_HEADING_PRIMARY;
object3.ellipse = {'width': 4, 'height': 4, 'marginHorizontal': 2, 'backgroundColor': null, 'opacity': 0.1,
object.ellipse = {'width': 4, 'height': 4, 'marginHorizontal': 2, 'backgroundColor': null, 'opacity': 0.1,
'borderRadius': 2, backgroundColor: MOBILE_TEXT_HEADING_PRIMARY};
object3.botTag = {'marginTop': 4, 'marginLeft': 8};
const env0_7 = Reflect.apply(createStyles, value, [object3]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/oauth2/native/Header.tsx');
object.botTag = {'marginTop': 4, 'marginLeft': 8};
const env0_7 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/oauth2/native/Header.tsx');
exports.default = Header_73330;
}
function Header_73330({user, application, accountScopes, bot}) { // fn#73330, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9599:854, offset: 0x01d68ae7, size: 798 bytes, params: 2, frame: 30
var r14;
var r7;
var BotTag;
var value10;
var moduleValue;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const styles = useStyles();
const applicationIconSource = (importDefault(1423) /* metro dependency 1423: AvatarUtils */).getApplicationIconSource({id: application.id,
icon: application.icon});
const r18 = user != null ? (importDefault(1423) /* metro dependency 1423: AvatarUtils */).getUserAvatarSource(user) : undefined;
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
let XLARGE = AvatarSizes.XLARGE;
const items2 = [<Avatar source={applicationIconSource} size={XLARGE} />];
items2[1] = <View style={styles.ellipseGroup}><View style={styles.ellipse} /><View style={styles.ellipse} /><View style={styles.ellipse} /></View>;
XLARGE = AvatarSizes.XLARGE;
items2[2] = <Avatar source={r18} size={XLARGE} />;
const items3 = [<View style={styles.headerIcons}>{items2}</View>];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const text = <Text variant="text-lg/bold" color="mobile-text-heading-primary">{application.name}</Text>;
if (bot != null) {
BotTag = importDefault(8706) /* metro dependency 8706: BotTag */;
var defaultImport3Props = {style: styles.botTag};
value10 = bot.public_flags != null;
if (value10) {
moduleValue = require(1391) /* metro dependency 1391: FlagUtils */;
r14 = moduleValue.hasFlag(bot.public_flags, UserFlags.VERIFIED_BOT);
function Header_73330({user, application, accountScopes, bot}) { // fn#73330, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9599:854, offset: 0x01d68ae7, size: 798 bytes, params: 2, frame: 30
var r14;
var r7;
var BotTag;
var value10;
var moduleValue;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const styles = useStyles();
const applicationIconSource = (importDefault(1423) /* metro dependency 1423: AvatarUtils */).getApplicationIconSource({id: application.id,
icon: application.icon});
const r18 = user != null ? (importDefault(1423) /* metro dependency 1423: AvatarUtils */).getUserAvatarSource(user) : undefined;
const Avatar = (NativeModule).Avatar;
const AvatarSizes = (NativeModule).AvatarSizes;
let XLARGE = AvatarSizes.XLARGE;
const items2 = [
<Avatar source={applicationIconSource} size={XLARGE} />,
];
items2[1] = (
<View style={styles.ellipseGroup}>
<View style={styles.ellipse} />
<View style={styles.ellipse} />
<View style={styles.ellipse} />
</View>
);
XLARGE = AvatarSizes.XLARGE;
items2[2] = <Avatar source={r18} size={XLARGE} />;
const items3 = [
<View style={styles.headerIcons}>
{items2}
</View>,
];
const Text = (TextModule).Text;
const text = (
<Text variant="text-lg/bold" color="mobile-text-heading-primary">
{application.name}
</Text>
);
if (bot != null) {
BotTag = importDefault(8706) /* metro dependency 8706: BotTag */;
var defaultImport3Props = {style: styles.botTag};
value10 = bot.public_flags != null;
if (value10) {
moduleValue = require(1391) /* metro dependency 1391: FlagUtils */;
r14 = moduleValue.hasFlag(bot.public_flags, UserFlags.VERIFIED_BOT);
} else {
r14 = value10;
}
defaultImport3Props.verified = r14;
r7 = <BotTag {...defaultImport3Props} />;
} else {
r14 = value10;
r7 = null;
}
defaultImport3Props.verified = r14;
r7 = <BotTag {...defaultImport3Props} />;
} else {
r7 = null;
items3[1] = (
<View style={styles.applicationNameWrapper}>
{text}
{r7}
</View>
);
items3[2] = (
<Text variant="heading-md/normal" color="text-default">
{accountScopes.length > 0 ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.jFbDnJ) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t['X+Fdpo'])}
</Text>
);
return (
<View style={styles.header}>
{items3}
</View>
);
}
items3[1] = <View style={styles.applicationNameWrapper}>{text}{r7}</View>;
items3[2] = <Text variant="heading-md/normal" color="text-default">{accountScopes.length > 0 ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.jFbDnJ) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t['X+Fdpo'])}</Text>;
return (
<View style={styles.header}>
{items3}
</View>
);
}
global.__d(_fun73329, 9413, [31, 27, 661, 33, 4501, 697, 1423, 1305, 4573, 8706, 1391, 1244,
2]) /* metro module 9413, dependencies: [31, 27, 661, 33, 4501, 697, 1423, 1305, 4573, 8706, 1391, 1244, 2] */;
@@ -1,143 +1,174 @@
/* Metro module 9389; source: modules/oauth2/native/IntegrationTypeSelector.tsx; dependencies: [31, 27, 33, 4501, 697, 1423, 8042, 4050, 1244, 9390, 5475, 4573, 9392, 6231, 6238, 1305, 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 IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as UserPlusIconModule from '../../../design/components/Icon/native/redesign/generated/UserPlusIcon.tsx'; /* Metro dependency 4050 */
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 TableRowGroupNativeModule from '../../../design/components/TableRow/native/TableRowGroup.native.tsx'; /* Metro dependency 6231 */
import * as TableRowNativeModule from '../../../design/components/TableRow/native/TableRow.native.tsx'; /* Metro dependency 6238 */
import * as ApplicationIntegrationTypeModule from '../../../external/discord_common/js/shared/shared-constants/ApplicationIntegrationType.tsx'; /* Metro dependency 8042 */
import * as ServerIconModule from '../../../design/components/Icon/native/redesign/generated/ServerIcon.tsx'; /* Metro dependency 9390 */
function _fun73237(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#73237, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9575:6, offset: 0x01d63e59, size: 601 bytes, params: 8, frame: 25
var object4;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_4 = value.View;
const StyleSheet = value.StyleSheet;
value = require(33) /* metro dependency 33 */;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
const createStyles = (require(4501) /* metro dependency 4501: createStyles */).createStyles;
object4 = {container: {'alignItems': 'center', 'flexDirection': 'column'}, header: {'justifyContent': 'center',
const createStyles = (CreateStylesModule).createStyles;
object = {container: {'alignItems': 'center', 'flexDirection': 'column'}, header: {'justifyContent': 'center',
'alignItems': 'center', 'gap': 16, 'marginTop': 24, 'marginBottom': 32, 'width': '100%'}};
const object6 = {alignSelf: 'stretch'};
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object4.rows = object6;
const object7 = {};
object7.height = StyleSheet.hairlineWidth;
const object2 = {alignSelf: 'stretch'};
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object.rows = object2;
const object3 = {};
object3.height = StyleSheet.hairlineWidth;
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object7.backgroundColor = BORDER_SUBTLE;
object7.marginTop = -1 * StyleSheet.hairlineWidth;
object4.divider = object7;
object4.learnMore = {marginVertical: 16};
const object10 = {};
object3.backgroundColor = BORDER_SUBTLE;
object3.marginTop = -1 * StyleSheet.hairlineWidth;
object.divider = object3;
object.learnMore = {marginVertical: 16};
const object5 = {};
let CARD_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CARD_BACKGROUND_DEFAULT;
object10.backgroundColor = CARD_BACKGROUND_DEFAULT;
object10.width = '100%';
object10.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object4.descriptionContainer = object10;
object4.descriptionMainContainer = {padding: 8};
object5.backgroundColor = CARD_BACKGROUND_DEFAULT;
object5.width = '100%';
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object.descriptionContainer = object5;
object.descriptionMainContainer = {padding: 8};
CARD_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CARD_BACKGROUND_DEFAULT;
object4.expandDescriptionCTA = {'backgroundColor': null, 'bottom': 8, 'right': 8,
object.expandDescriptionCTA = {'backgroundColor': null, 'bottom': 8, 'right': 8,
backgroundColor: CARD_BACKGROUND_DEFAULT};
const object11 = {'height': 82, 'width': 82};
object11.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xl;
object4.appIcon = object11;
const object12 = {padding: 4};
object12.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xl + 4;
object4.appIconMask = object12;
const object8 = {'height': 82, 'width': 82};
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xl;
object.appIcon = object8;
const object9 = {padding: 4};
object9.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xl + 4;
object.appIconMask = object9;
const BACKGROUND_MOD_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_MUTED;
object4.loadingIcon = {backgroundColor: BACKGROUND_MOD_MUTED};
value = Reflect.apply(createStyles, value, [object4]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/oauth2/native/IntegrationTypeSelector.tsx');
object.loadingIcon = {backgroundColor: BACKGROUND_MOD_MUTED};
value = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/oauth2/native/IntegrationTypeSelector.tsx');
exports.default = IntegrationTypeSelector;
exports.useStyles = value;
}
function IntegrationTypeSelector({application, onSelect}) { // fn#73238, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9575:1072, offset: 0x01d640b2, size: 555 bytes, params: 2, frame: 25
const styles = useStyles();
const binding = env0_3;
const value2 = binding.useMemo(_fun73239, [application.icon, application.id]);
const value3 = binding.useMemo(_fun73240, [application.integrationTypesConfig]);
const items2 = [<View style={styles.appIconMask}>{value2 != null ? ((Component) => <Component style={styles.appIcon} source={value2} />)(importDefault(5475) /* metro dependency 5475: FastImage */) : <View style={[styles.appIcon,
styles.loadingIcon]} />}</View>];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
items2[1] = <Text variant="heading-lg/bold" color="mobile-text-heading-primary">{application.name}</Text>;
items2[2] = application.description != null && ((Component) => <Component hideName application={application} viewContainerStyle={styles.descriptionContainer} mainContainerStyle={styles.descriptionMainContainer} expandDescriptionCTAStyle={styles.expandDescriptionCTA} />)(importDefault(9392) /* metro dependency 9392: DetailsHeader */);
const view = <View style={styles.header}>{items2}</View>;
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
return (
<View style={styles.container}>
{view}
<View style={styles.rows}>
<TableRowGroup hasIcons>
{value3.map(_fun73242)}
</TableRowGroup>
function IntegrationTypeSelector({application, onSelect}) { // fn#73238, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9575:1072, offset: 0x01d640b2, size: 555 bytes, params: 2, frame: 25
const styles = useStyles();
const value2 = ReactModule.useMemo(_fun73239, [application.icon, application.id]);
const value3 = ReactModule.useMemo(_fun73240, [application.integrationTypesConfig]);
const items2 = [
<View style={styles.appIconMask}>
{
value2 != null
? ((Component) => <Component style={styles.appIcon} source={value2} />)(importDefault(5475) /* metro dependency 5475: FastImage */)
: (
<View style={[styles.appIcon, styles.loadingIcon]} />
)
}
</View>,
];
const Text = (TextModule).Text;
items2[1] = (
<Text variant="heading-lg/bold" color="mobile-text-heading-primary">
{application.name}
</Text>
);
items2[2] = application.description != null && ((Component) => <Component hideName application={application} viewContainerStyle={styles.descriptionContainer} mainContainerStyle={styles.descriptionMainContainer} expandDescriptionCTAStyle={styles.expandDescriptionCTA} />)(importDefault(9392) /* metro dependency 9392: DetailsHeader */);
const view = (
<View style={styles.header}>
{items2}
</View>
</View>
);
}
);
const TableRowGroup = (TableRowGroupNativeModule).TableRowGroup;
return (
<View style={styles.container}>
{view}
<View style={styles.rows}>
<TableRowGroup hasIcons>
{value3.map(_fun73242)}
</TableRowGroup>
</View>
</View>
);
function _fun73239() { // fn#73239, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9575:1156, offset: 0x01d642dd, size: 65 bytes, params: 1, frame: 13
let value = environment.__proto__;
value = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
const getApplicationIconSource = value.getApplicationIconSource;
const applicationBinding = application;
return Reflect.apply(getApplicationIconSource, value, [{id: applicationBinding.id, icon: applicationBinding.icon}]);
}
function _fun73239() { // fn#73239, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9575:1156, offset: 0x01d642dd, size: 65 bytes, params: 1, frame: 13
let value = environment.__proto__;
value = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
const getApplicationIconSource = value.getApplicationIconSource;
const applicationBinding = application;
return Reflect.apply(getApplicationIconSource, value, [{id: applicationBinding.id, icon: applicationBinding.icon}]);
}
function _fun73240() { // fn#73240, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9575:1245, offset: 0x01d6431e, size: 364 bytes, params: 1, frame: 18
let object = {};
const ApplicationIntegrationType = (ApplicationIntegrationTypeModule).ApplicationIntegrationType;
const USER_INSTALL = ApplicationIntegrationType.USER_INSTALL;
object.type = USER_INSTALL;
const UserPlusIcon = (UserPlusIconModule).UserPlusIcon;
object.icon = UserPlusIcon;
const intl = (IndexNativeModule).intl;
let string = intl.string;
const t = (IndexNativeModule).t;
object.label = Reflect.apply(string, intl, [t.aCg60P]);
string = intl.string;
const YeiIUZ = t.YeiIUZ;
object.subLabel = Reflect.apply(string, intl, [YeiIUZ]);
object.beta = false;
const items2 = [object];
object = {};
const GUILD_INSTALL = ApplicationIntegrationType.GUILD_INSTALL;
object.type = GUILD_INSTALL;
const ServerIcon = (ServerIconModule).ServerIcon;
object.icon = ServerIcon;
string = intl.string;
const E64YCz = t.E64YCz;
object.label = Reflect.apply(string, intl, [E64YCz]);
object.subLabel = intl.string(t.bbtoKm);
object.beta = false;
items2[1] = object;
return items2.filter(_fun73241);
function _fun73241(a0) { // fn#73241, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9575:1618, offset: 0x01d6448a, size: 57 bytes, params: 2, frame: 5
const value = environment.__proto__;
const integrationTypesConfig = application.integrationTypesConfig;
return (integrationTypesConfig == null || integrationTypesConfig[a0.type] == null ? undefined : integrationTypesConfig[a0.type].oauth2InstallParams) != null;
}
function _fun73240() { // fn#73240, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9575:1245, offset: 0x01d6431e, size: 364 bytes, params: 1, frame: 18
let object2 = {};
const ApplicationIntegrationType = (require(8042) /* metro dependency 8042: ApplicationIntegrationType */).ApplicationIntegrationType;
const USER_INSTALL = ApplicationIntegrationType.USER_INSTALL;
object2.type = USER_INSTALL;
const UserPlusIcon = (require(4050) /* metro dependency 4050: UserPlusIcon */).UserPlusIcon;
object2.icon = UserPlusIcon;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
object2.label = Reflect.apply(string, intl, [t.aCg60P]);
string = intl.string;
const YeiIUZ = t.YeiIUZ;
object2.subLabel = Reflect.apply(string, intl, [YeiIUZ]);
object2.beta = false;
const items2 = [object2];
object2 = {};
const GUILD_INSTALL = ApplicationIntegrationType.GUILD_INSTALL;
object2.type = GUILD_INSTALL;
const ServerIcon = (require(9390) /* metro dependency 9390: ServerIcon */).ServerIcon;
object2.icon = ServerIcon;
string = intl.string;
const E64YCz = t.E64YCz;
object2.label = Reflect.apply(string, intl, [E64YCz]);
object2.subLabel = intl.string(t.bbtoKm);
object2.beta = false;
items2[1] = object2;
return items2.filter(_fun73241);
}
}
function _fun73242(a0, a1) { // fn#73242, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9575:2335, offset: 0x01d644c3, size: 219 bytes, params: 3, frame: 21
var environment;
const env0_0 = a0;
const value = environment.__proto__;
const value2 = undefined;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
return (
<TableRow
icon={((Component) => <Component color="interactive-text-default" />)(a0.icon)}
label={a0.label}
subLabel={a0.subLabel}
onPress={onPress_73243}
start={a1 === 0}
end={a1 === env0_2.length - 1}
arrow
trailing={a0.beta ? ((BetaTag) => <BetaTag />)((require(1305) /* metro dependency 1305: native */).BetaTag) : value2}
key={a0.type}
/>
);
}
function _fun73242(a0, a1) { // fn#73242, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9575:2335, offset: 0x01d644c3, size: 219 bytes, params: 3, frame: 21
var environment;
const env0_0 = a0;
const value = environment.__proto__;
const value2 = undefined;
const TableRow = (TableRowNativeModule).TableRow;
return (
<TableRow
icon={((Component) => <Component color="interactive-text-default" />)(a0.icon)}
label={a0.label}
subLabel={a0.subLabel}
onPress={onPress_73243}
start={a1 === 0}
end={a1 === env0_2.length - 1}
arrow
trailing={a0.beta
? ((BetaTag) => <BetaTag />)((require(1305) /* metro dependency 1305: native */).BetaTag)
: value2}
key={a0.type}
/>
);
function onPress_73243() { // fn#73243, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9575:2455, offset: 0x01d6459e, size: 28 bytes, params: 1, frame: 11
return onSelect(env0_0.type);
}
function _fun73241(a0) { // fn#73241, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9575:1618, offset: 0x01d6448a, size: 57 bytes, params: 2, frame: 5
const value = environment.__proto__;
const integrationTypesConfig = application.integrationTypesConfig;
return (integrationTypesConfig == null || integrationTypesConfig[a0.type] == null ? undefined : integrationTypesConfig[a0.type].oauth2InstallParams) != null;
}
}
}
function onPress_73243() { // fn#73243, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9575:2455, offset: 0x01d6459e, size: 28 bytes, params: 1, frame: 11
return onSelect(env0_0.type);
}
global.__d(_fun73237, 9389, [31, 27, 33, 4501, 697, 1423, 8042, 4050, 1244, 9390, 5475, 4573, 9392, 6231, 6238,
1305,
2]) /* metro module 9389, dependencies: [31, 27, 33, 4501, 697, 1423, 8042, 4050, 1244, 9390, 5475, 4573, 9392, 6231, 6238, 1305, 2] */;
@@ -1,6 +1,12 @@
/* Metro module 10209; source: modules/oauth2/native/OAuth2AuthorizeContent.tsx; dependencies: [57, 31, 27, 33, 4501, 697, 1478, 1585, 5467, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import UseWindowDimensionsNative from '../../screen/useWindowDimensions.native.tsx'; /* Metro dependency 1478 */
import UseSafeAreaInsetsNative from '../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
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 */
function _fun79354(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79354, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10395:6, offset: 0x01e4f6f6, size: 490 bytes, params: 8, frame: 24
var object2;
const isNearBottom = function(a0) {
var r1;
var property = a0.layoutMeasurement;
@@ -12,9 +18,7 @@ function _fun79354(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(57) /* metro dependency 57 */;
const env0_3 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_4 = value.View;
const env0_5 = value.ScrollView;
value = require(33) /* metro dependency 33 */;
@@ -23,95 +27,105 @@ function _fun79354(global, require, importDefault, importAll, module, exports, d
const env0_8 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object2.fill = {flex: 1};
object = {};
object.fill = {flex: 1};
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
object2.scrollView = {'flex': 1, 'backgroundColor': null, 'paddingHorizontal': 16,
object.scrollView = {'flex': 1, 'backgroundColor': null, 'paddingHorizontal': 16,
backgroundColor: BACKGROUND_BASE_LOWER};
object2.scrollViewContentLandscape = {'flexDirection': 'row', 'alignItems': 'center', 'width': '100%',
'flexGrow': 1, 'gap': 16};
object2.scrollViewContentPortrait = {'flexDirection': 'column', 'width': '100%', 'flexGrow': 1, 'gap': 16};
object2.header = {paddingTop: 24};
object2.bodyContainer = {'flexDirection': 'column', 'gap': 16, 'padding': 16};
const object3 = {marginHorizontal: 16};
object.scrollViewContentLandscape = {'flexDirection': 'row', 'alignItems': 'center', 'width': '100%', 'flexGrow': 1,
'gap': 16};
object.scrollViewContentPortrait = {'flexDirection': 'column', 'width': '100%', 'flexGrow': 1, 'gap': 16};
object.header = {paddingTop: 24};
object.bodyContainer = {'flexDirection': 'column', 'gap': 16, 'padding': 16};
const object4 = {marginHorizontal: 16};
let BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object3.backgroundColor = BORDER_SUBTLE;
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object2.bodyContainerBackground = object3;
object2.footerPortrait = {'flexDirection': 'column', 'padding': 16, 'gap': 16};
object4.backgroundColor = BORDER_SUBTLE;
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object.bodyContainerBackground = object4;
object.footerPortrait = {'flexDirection': 'column', 'padding': 16, 'gap': 16};
BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object2.separator = {height: 1, backgroundColor: BORDER_SUBTLE};
const env0_9 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/oauth2/native/OAuth2AuthorizeContent.tsx');
object.separator = {height: 1, backgroundColor: BORDER_SUBTLE};
const env0_9 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/oauth2/native/OAuth2AuthorizeContent.tsx');
exports.default = OAuth2AuthorizeContent;
}
function OAuth2AuthorizeContent({header, body, footer, appDetails, centerContent, setAllContentSeen, hasContentBackground, onScroll}) { // fn#79356, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10395:1036, offset: 0x01e4f926, size: 826 bytes, params: 2, frame: 36
const styles = useStyles();
const binding = env0_3;
const value3 = binding.useRef(null);
const env0_2 = value3;
const value4 = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)();
const value5 = value4.width > value4.height;
const {left, right, bottom} = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
let useState = binding.useState;
const value7 = Reflect.apply(useState, binding, [-1]);
const binding2 = env0_2;
const value8 = binding2(value7, 2);
const property = value8[0];
var env0_3 = property;
const env0_4 = value8[1];
useState = binding.useState;
const value9 = binding2(Reflect.apply(useState, binding, [-1]), 2);
const property2 = value9[0];
const env0_6 = value9[1];
useState = binding.useState;
const value10 = binding2(Reflect.apply(useState, binding, [-1]), 2);
const property3 = value10[0];
const env0_7 = value10[1];
env0_3.useLayoutEffect(_fun79357, [property, property >= 0 && property2 >= 0 && (footer == null || property3 >= 0),
property2, setAllContentSeen]);
return ((Component) => <Component style={[styles.fill,
{marginBottom: bottom}]}><ScrollView style={[styles.scrollView, {paddingLeft: left,
paddingRight: right}]} contentContainerStyle={[value5 ? styles.scrollViewContentLandscape : styles.scrollViewContentPortrait]} ref={value3} onContentSizeChange={onContentSizeChange} scrollEventThrottle={16} onLayout={onLayout_79359} onScroll={onScroll_79360} centerContent={centerContent}>{header != null ? <View style={styles.header}>{header}</View> : null}<View style={[styles.bodyContainer,
hasContentBackground ? styles.bodyContainerBackground : null,
value5 ? {flex: 1} : {}]}>{body}{appDetails != null ? <><View style={styles.separator} /><View>{appDetails}</View></> : null}</View></ScrollView>{footer != null ? <View onLayout={onLayout_79361} style={styles.footerPortrait}>{footer}</View> : null}</Component>)(importDefault(5467) /* metro dependency 5467: KeyboardAwareView */);
}
function _fun79357() { // fn#79357, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10395:1455, offset: 0x01e4fc60, size: 101 bytes, params: 1, frame: 14
var value2;
var isNearBottom2;
var setAllContentSeenBinding;
if (env0_8) {
value2 = environment.__proto__;
isNearBottom2 = isNearBottom({layoutMeasurement: {height: env0_5}, contentSize: {height: env0_3}});
setAllContentSeenBinding = setAllContentSeen;
if (isNearBottom2) {
if (setAllContentSeenBinding != null) {
setAllContentSeen(true);
function OAuth2AuthorizeContent({header, body, footer, appDetails, centerContent, setAllContentSeen, hasContentBackground, onScroll}) { // fn#79356, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10395:1036, offset: 0x01e4f926, size: 826 bytes, params: 2, frame: 36
const styles = useStyles();
const binding = property4;
const value3 = binding.useRef(null);
const env0_2 = value3;
const value4 = (UseWindowDimensionsNative)();
const value5 = value4.width > value4.height;
const {left, right, bottom} = (UseSafeAreaInsetsNative)();
let useState = binding.useState;
const value7 = Reflect.apply(useState, binding, [-1]);
const binding2 = env0_2;
const value8 = binding2(value7, 2);
const property = value8[0];
var property4 = property;
const env0_4 = value8[1];
useState = binding.useState;
const value9 = binding2(Reflect.apply(useState, binding, [-1]), 2);
const property2 = value9[0];
const env0_6 = value9[1];
useState = binding.useState;
const value10 = binding2(Reflect.apply(useState, binding, [-1]), 2);
const property3 = value10[0];
const env0_7 = value10[1];
property4.useLayoutEffect(_fun79357, [property,
property >= 0 && property2 >= 0 && (footer == null || property3 >= 0), property2, setAllContentSeen]);
return ((Component) => <Component style={[styles.fill,
{marginBottom: bottom}]}><ScrollView style={[styles.scrollView, {paddingLeft: left,
paddingRight: right}]} contentContainerStyle={[value5 ? styles.scrollViewContentLandscape : styles.scrollViewContentPortrait]} ref={value3} onContentSizeChange={onContentSizeChange_79358} scrollEventThrottle={16} onLayout={onLayout_79359} onScroll={onScroll_79360} centerContent={centerContent}>{header != null ? <View style={styles.header}>{header}</View> : null}<View style={[styles.bodyContainer,
hasContentBackground ? styles.bodyContainerBackground : null,
value5 ? {flex: 1} : {}]}>{body}{appDetails != null ? <><View style={styles.separator} /><View>{appDetails}</View></> : null}</View></ScrollView>{footer != null ? <View onLayout={onLayout_79361} style={styles.footerPortrait}>{footer}</View> : null}</Component>)(importDefault(5467) /* metro dependency 5467: KeyboardAwareView */);
function _fun79357() { // fn#79357, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10395:1455, offset: 0x01e4fc60, size: 101 bytes, params: 1, frame: 14
var value2;
var isNearBottom2;
var setAllContentSeenBinding;
if (env0_8) {
value2 = environment.__proto__;
isNearBottom2 = isNearBottom({layoutMeasurement: {height: env0_5}, contentSize: {height: ReactModule}});
setAllContentSeenBinding = setAllContentSeen;
if (isNearBottom2) {
if (setAllContentSeenBinding != null) {
setAllContentSeen(true);
}
} else if (setAllContentSeenBinding != null) {
setAllContentSeen(false);
}
}
} else if (setAllContentSeenBinding != null) {
setAllContentSeen(false);
}
}
}
function OAuth2AuthorizeContentOnContentSizeChange(a0, a1) { // fn#79358, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10395:1795, owner: OAuth2AuthorizeContent.onContentSizeChange, offset: 0x01e4fcc5, size: 53 bytes, params: 3, frame: 13
const current = env0_2.current;
if (current != null) {
current.scrollTo({y: 0});
}
env0_4(a1);
}
function OAuth2AuthorizeContentOnScroll(a0) { // fn#79360, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10395:1931, owner: OAuth2AuthorizeContent.onScroll, offset: 0x01e4fd1e, size: 74 bytes, params: 2, frame: 13
if (isNearBottom(a0.nativeEvent)) {
if (setAllContentSeen != null) {
setAllContentSeen(true);
function OAuth2AuthorizeContentOnContentSizeChange(a0, a1) { // fn#79358, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10395:1795, owner: OAuth2AuthorizeContent.onContentSizeChange, offset: 0x01e4fcc5, size: 53 bytes, params: 3, frame: 13
const current = env0_2.current;
if (current != null) {
current.scrollTo({y: 0});
}
env0_4(a1);
}
function OAuth2AuthorizeContentOnLayout({nativeEvent}) { // fn#79359, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10395:1886, owner: OAuth2AuthorizeContent.onLayout, offset: 0x01e4fcfa, size: 36 bytes, params: 2, frame: 11
env0_6(nativeEvent.layout.height);
}
function OAuth2AuthorizeContentOnScroll(a0) { // fn#79360, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10395:1931, owner: OAuth2AuthorizeContent.onScroll, offset: 0x01e4fd1e, size: 74 bytes, params: 2, frame: 13
if (isNearBottom(a0.nativeEvent)) {
if (setAllContentSeen != null) {
setAllContentSeen(true);
}
}
if (onScroll != null) {
onScroll(a0);
}
}
function OAuth2AuthorizeContentOnLayout_79361({nativeEvent}) { // fn#79361, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10395:2258, owner: OAuth2AuthorizeContent.onLayout, offset: 0x01e4fd68, size: 36 bytes, params: 2, frame: 11
env0_7(nativeEvent.layout.height);
}
}
if (onScroll != null) {
onScroll(a0);
}
}
global.__d(_fun79354, 10209, [57, 31, 27, 33, 4501, 697, 1478, 1585, 5467,
2]) /* metro module 10209, dependencies: [57, 31, 27, 33, 4501, 697, 1478, 1585, 5467, 2] */;
@@ -1,78 +1,115 @@
/* Metro module 10206; source: modules/oauth2/native/OAuth2AuthorizeModal.tsx; dependencies: [31, 27, 33, 4501, 697, 9342, 1585, 4017, 4577, 5278, 1244, 10207, 5312, 4573, 6618, 10209, 2] */
import UseSafeAreaInsetsNative from '../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import ReanimatedRexport from '../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import UseOAuth2AuthorizeForm from './useOAuth2AuthorizeForm.tsx'; /* Metro dependency 9342 */
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 ReanimatedRexportModule from '../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as SpringModule from '../../../design/animation/reanimated/spring/spring.tsx'; /* Metro dependency 4577 */
import * as PressablesModule from '../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as SafeAreaViewModule from '../../../components_native/common/SafeAreaView.tsx'; /* Metro dependency 6618 */
function _fun79346(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79346, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10392:6, offset: 0x01e4f06f, size: 388 bytes, params: 8, frame: 23
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;
let value = require(33) /* metro dependency 33 */;
let value = JsxRuntimeModule;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
const env0_7 = {'overshootClamping': true, 'stiffness': 20, 'damping': 15, 'mass': 0.03};
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object = {};
let BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
object2.container = {flex: 1, backgroundColor: BACKGROUND_BASE_LOWER};
object2.contentContainer = {flex: 1};
object2.titleContainer = {'padding': 16, 'flexDirection': 'row', 'gap': 16};
object.container = {flex: 1, backgroundColor: BACKGROUND_BASE_LOWER};
object.contentContainer = {flex: 1};
object.titleContainer = {'padding': 16, 'flexDirection': 'row', 'gap': 16};
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object2.titleContainerBorder = {'position': 'absolute', 'left': 0, 'right': 0, 'bottom': 0, 'height': 1,
object.titleContainerBorder = {'position': 'absolute', 'left': 0, 'right': 0, 'bottom': 0, 'height': 1,
backgroundColor: BORDER_SUBTLE};
BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
object2.title = {'flex': 1, 'justifyContent': 'center', 'alignItems': 'center', 'backgroundColor': null,
object.title = {'flex': 1, 'justifyContent': 'center', 'alignItems': 'center', 'backgroundColor': null,
'marginEnd': 40, backgroundColor: BACKGROUND_BASE_LOWER};
const env0_8 = Reflect.apply(createStyles, value, [object2]);
object2 = {code: 'function OAuth2AuthorizeModalTsx1(){const{borderOpacity}=this.__closure;var _borderOpacity$get;return{opacity:(_borderOpacity$get=borderOpacity.get())!==null&&_borderOpacity$get!==void 0?_borderOpacity$get:1};}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/oauth2/native/OAuth2AuthorizeModal.tsx');
const env0_8 = Reflect.apply(createStyles, value, [object]);
object = {code: 'function OAuth2AuthorizeModalTsx1(){const{borderOpacity}=this.__closure;var _borderOpacity$get;return{opacity:(_borderOpacity$get=borderOpacity.get())!==null&&_borderOpacity$get!==void 0?_borderOpacity$get:1};}'};
(FileImportTrackerModule).fileFinishedImporting('modules/oauth2/native/OAuth2AuthorizeModal.tsx');
exports.default = OAuth2AuthorizeModal;
function OAuth2AuthorizeModal(a0) { // fn#79347, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10392:944, offset: 0x01e4f1f3, size: 902 bytes, params: 2, frame: 31
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const styles = useStyles();
const value2 = (UseOAuth2AuthorizeForm)(a0);
const top = (UseSafeAreaInsetsNative)().top;
const value3 = (ReanimatedRexportModule).useSharedValue(0);
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
const OAuth2AuthorizeModalB2 = OAuth2AuthorizeModalB;
OAuth2AuthorizeModalB2.__closure = {borderOpacity: value3};
OAuth2AuthorizeModalB2.__workletHash = 5916964482569;
OAuth2AuthorizeModalB2.__initData = env0_9;
const value4 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [OAuth2AuthorizeModalB2]);
const value5 = ReactModule.useCallback(_fun79349, [value3]);
const items3 = [styles.titleContainer];
items3[1] = {paddingTop: top + 16};
const PressableOpacity = (PressablesModule).PressableOpacity;
const items2 = [
<PressableOpacity
accessibilityRole="button"
accessibilityLabel={value2.backStep != null ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t['13/7kX']) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq)}
onPress={onPress_79350}
>
{
value2.backStep != null
? ((ArrowSmallLeftIcon) => <ArrowSmallLeftIcon color={(importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT} />)((require(10207) /* metro dependency 10207: ArrowSmallLeftIcon */).ArrowSmallLeftIcon)
: ((XSmallIcon) => <XSmallIcon color={(importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT} />)((require(5312) /* metro dependency 5312: XSmallIcon */).XSmallIcon)
}
</PressableOpacity>,
];
const Text = (TextModule).Text;
items2[1] = (
<View style={styles.title}>
<Text variant="redesign/heading-18/bold" accessibilityRole="header">
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['y+/PE9'])}
</Text>
</View>
);
const View2 = (ReanimatedRexport).View;
items2[2] = <View2 style={[styles.titleContainerBorder, value4]} />;
const items4 = [
<View style={items3}>
{items2}
</View>,
];
const SafeAreaPaddingView = (SafeAreaViewModule).SafeAreaPaddingView;
items4[1] = (
<SafeAreaPaddingView bottom style={styles.contentContainer}>
{((Component) => <Component {...value2} {...{['onScroll']: value5}} {...{['centerContent']: true}} />)(importDefault(10209) /* metro dependency 10209: OAuth2AuthorizeContent */)}
</SafeAreaPaddingView>
);
return (
<View style={styles.container}>
{items4}
</View>
);
function OAuth2AuthorizeModalB() { // fn#79348, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10392:1077, owner: OAuth2AuthorizeModal.b, offset: 0x01e4f579, size: 39 bytes, params: 1, frame: 11
return {opacity: env0_1.get() ?? 1};
}
function _fun79349({nativeEvent}) { // fn#79349, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10392:1228, offset: 0x01e4f5a0, size: 94 bytes, params: 2, frame: 17
const binding = env0_1;
const set = binding.set;
Reflect.apply(set, binding, [SpringModule.withSpring(nativeEvent.contentOffset.y > 16 ? 1 : 0, env1_7)]);
}
function OAuth2AuthorizeModalOnPress() { // fn#79350, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10392:1585, owner: OAuth2AuthorizeModal.onPress, offset: 0x01e4f5fe, size: 40 bytes, params: 1, frame: 10
return env0_0.goBackOrCancel?.();
}
}
}
function OAuth2AuthorizeModal(a0) { // fn#79347, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10392:944, offset: 0x01e4f1f3, size: 902 bytes, params: 2, frame: 31
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const styles = useStyles();
const value2 = (importDefault(9342) /* metro dependency 9342: useOAuth2AuthorizeForm */)(a0);
const top = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().top;
const value3 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = OAuth2AuthorizeModalB;
closure.__closure = {borderOpacity: value3};
closure.__workletHash = 5916964482569;
closure.__initData = env0_9;
const value4 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const value5 = env0_3.useCallback(_fun79349, [value3]);
const items3 = [styles.titleContainer];
items3[1] = {paddingTop: top + 16};
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const items2 = [<PressableOpacity accessibilityRole="button" accessibilityLabel={value2.backStep != null ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t['13/7kX']) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq)} onPress={onPress_79350}>{value2.backStep != null ? ((ArrowSmallLeftIcon) => <ArrowSmallLeftIcon color={(importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT} />)((require(10207) /* metro dependency 10207: ArrowSmallLeftIcon */).ArrowSmallLeftIcon) : ((XSmallIcon) => <XSmallIcon color={(importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT} />)((require(5312) /* metro dependency 5312: XSmallIcon */).XSmallIcon)}</PressableOpacity>];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
items2[1] = <View style={styles.title}><Text variant="redesign/heading-18/bold" accessibilityRole="header">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['y+/PE9'])}</Text></View>;
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
items2[2] = <View2 style={[styles.titleContainerBorder, value4]} />;
const items4 = [<View style={items3}>{items2}</View>];
const SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
items4[1] = <SafeAreaPaddingView bottom style={styles.contentContainer}>{((Component) => <Component {...value2} {...{['onScroll']: value5}} {...{['centerContent']: true}} />)(importDefault(10209) /* metro dependency 10209: OAuth2AuthorizeContent */)}</SafeAreaPaddingView>;
return (
<View style={styles.container}>
{items4}
</View>
);
}
function OAuth2AuthorizeModalB() { // fn#79348, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10392:1077, owner: OAuth2AuthorizeModal.b, offset: 0x01e4f579, size: 39 bytes, params: 1, frame: 11
return {opacity: env0_1.get() ?? 1};
}
function _fun79349({nativeEvent}) { // fn#79349, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10392:1228, offset: 0x01e4f5a0, size: 94 bytes, params: 2, frame: 17
const binding = env0_1;
const set = binding.set;
const springModule = require(4577) /* metro dependency 4577: spring */;
Reflect.apply(set, binding, [springModule.withSpring(nativeEvent.contentOffset.y > 16 ? 1 : 0, env1_7)]);
}
function OAuth2AuthorizeModalOnPress() { // fn#79350, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10392:1585, owner: OAuth2AuthorizeModal.onPress, offset: 0x01e4f5fe, size: 40 bytes, params: 1, frame: 10
return env0_0.goBackOrCancel?.();
}
global.__d(_fun79346, 10206, [31, 27, 33, 4501, 697, 9342, 1585, 4017, 4577, 5278, 1244, 10207, 5312, 4573, 6618,
10209,
2]) /* metro module 10206, dependencies: [31, 27, 33, 4501, 697, 9342, 1585, 4017, 4577, 5278, 1244, 10207, 5312, 4573, 6618, 10209, 2] */;
+238 -183
View File
@@ -1,210 +1,265 @@
/* Metro module 10204; source: modules/oauth2/native/SuccessResult.tsx; dependencies: [31, 27, 1379, 3784, 1934, 661, 1483, 33, 4501, 697, 7717, 1244, 5080, 6947, 683, 566, 4080, 4015, 1583, 6618, 10205, 4573, 4578, 2] */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import ChannelStore from '../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import SelectedChannelStore from '../../../stores/SelectedChannelStore.tsx'; /* Metro dependency 1934 */
import PermissionStore from '../../../stores/PermissionStore.tsx'; /* Metro dependency 3784 */
import ActionSheetActionCreators from '../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
import ModalActionCreators from '../../../actions/ModalActionCreators.tsx'; /* Metro dependency 5080 */
import Module10205 from '../../../by-id/module-10205.js'; /* Metro dependency 10205 */
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 IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as AppLauncherNativeConstantsModule from '../../app_launcher/native/AppLauncherNativeConstants.tsx'; /* Metro dependency 1483 */
import * as ChatInputUtilsModule from '../../../utils/native/ChatInputUtils.tsx'; /* Metro dependency 4015 */
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 SafeAreaViewModule from '../../../components_native/common/SafeAreaView.tsx'; /* Metro dependency 6618 */
import * as DeviceOrientationModule from '../../device/native/DeviceOrientation.tsx'; /* Metro dependency 7717 */
function _fun79334(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79334, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10390:6, offset: 0x01e4e507, size: 519 bytes, params: 8, frame: 23
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_4 = value.Image;
const env0_5 = value.View;
const env0_6 = value.ScrollView;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
value = require(661) /* metro dependency 661: Constants */;
const env0_10 = value.AnalyticEvents;
const env0_11 = value.Permissions;
const env0_12 = (require(1483) /* metro dependency 1483: AppLauncherNativeConstants */).AppLauncherRouteName;
value = require(33) /* metro dependency 33 */;
const env0_13 = value.jsx;
const env0_14 = value.jsxs;
const env0_15 = value.Fragment;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
object2.container = {flex: 1, backgroundColor: BACKGROUND_BASE_LOWER};
object2.scrollView = {flex: 1};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object2.scrollViewContentContainer = {'height': '100%', 'backgroundColor': null, 'alignItems': 'center',
object = {};
const BACKGROUND_BASE_LOWER = (Native).colors.BACKGROUND_BASE_LOWER;
object.container = {flex: 1, backgroundColor: BACKGROUND_BASE_LOWER};
object.scrollView = {flex: 1};
const BACKGROUND_BASE_LOW = (Native).colors.BACKGROUND_BASE_LOW;
object.scrollViewContentContainer = {'height': '100%', 'backgroundColor': null, 'alignItems': 'center',
'justifyContent': 'center', backgroundColor: BACKGROUND_BASE_LOW};
object2.inner = {'flexDirection': 'column', 'alignItems': 'center', 'justifyContent': 'center',
object.inner = {'flexDirection': 'column', 'alignItems': 'center', 'justifyContent': 'center',
'paddingHorizontal': 16};
object2.text = {'marginTop': 24, 'paddingHorizontal': 40, 'textAlign': 'center'};
object2.footer = {'flexDirection': 'column', 'justifyContent': 'space-between', 'padding': 16, 'gap': 16};
object2.footerLandscape = {'flexDirection': 'row-reverse', 'padding': 16};
object2.footerPortrait = {'flexDirection': 'column', 'padding': 16};
const env0_16 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/oauth2/native/SuccessResult.tsx');
object.text = {'marginTop': 24, 'paddingHorizontal': 40, 'textAlign': 'center'};
object.footer = {'flexDirection': 'column', 'justifyContent': 'space-between', 'padding': 16, 'gap': 16};
object.footerLandscape = {'flexDirection': 'row-reverse', 'padding': 16};
object.footerPortrait = {'flexDirection': 'column', 'padding': 16};
const env0_16 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/oauth2/native/SuccessResult.tsx');
exports.default = SuccessResultModal;
}
function SuccessResultModal({guild, application}) { // fn#79335, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10390:981, offset: 0x01e4e70e, size: 1253 bytes, params: 2, frame: 39
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
let env0_3 = undefined;
const styles = useStyles();
const deviceOrientationModule = require(7717) /* metro dependency 7717: DeviceOrientation */;
const useStore = deviceOrientationModule.useStore;
const orientation = Reflect.apply(useStore, deviceOrientationModule, []).orientation;
let binding = env0_3;
const value3 = binding.useMemo(_fun79336, [application, guild]);
const value5 = binding.useCallback(_fun79337, [guild, application?.id]);
const channelId = (require(566) /* metro dependency 566: flux */).useStateFromStores([SelectedChannelStore],
function() {
return SelectedChannelStore.getChannelId();
});
env0_3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channelId);
});
binding = env0_3;
const value6 = binding.useCallback(_fun79340, [application, channelId]);
const value7 = binding.useCallback(function() {
var value2 = undefined;
importDefault(dependencyMap[12]).pop();
var defaultImport2 = importDefault(dependencyMap[14]);
var track = defaultImport2.track;
var OAUTH2_AUTHORIZE_SUCCESS_CLOSE_CLICKED = AnalyticEvents.OAUTH2_AUTHORIZE_SUCCESS_CLOSE_CLICKED;
Reflect.apply(track, defaultImport2, [OAUTH2_AUTHORIZE_SUCCESS_CLOSE_CLICKED,
{application_id: application == null ? value2 : application.id}]);
return value2;
}, [application?.id]);
env0_3.useEffect(function() {
var value2 = undefined;
var defaultImport = importDefault(dependencyMap[14]);
var track = defaultImport.track;
var OAUTH2_AUTHORIZE_SUCCESS_VIEWED = AnalyticEvents.OAUTH2_AUTHORIZE_SUCCESS_VIEWED;
Reflect.apply(track, defaultImport, [OAUTH2_AUTHORIZE_SUCCESS_VIEWED,
{application_id: application == null ? value2 : application.id}]);
return value2;
}, [application?.id]);
const value8 = (require(566) /* metro dependency 566: flux */).useStateFromStores([PermissionStore], function() {
var SEND_MESSAGES = Permissions.SEND_MESSAGES;
return PermissionStore.can(SEND_MESSAGES, channel);
});
const SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
const items2 = [<Image source={importDefault(10205) /* metro dependency 10205 */} />];
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
items2[1] = <Text style={styles.text} variant="text-lg/medium">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.se5gLj)}</Text>;
items2[2] = value3 != null ? <Text style={styles.text} variant="text-sm/normal">{value3}</Text> : null;
const scrollView = <ScrollView style={styles.scrollView} contentContainerStyle={styles.scrollViewContentContainer}><View style={styles.inner}>{items2}</View></ScrollView>;
const items3 = [styles.footer];
const OrientationType = deviceOrientationModule.OrientationType;
const LANDSCAPE = OrientationType.LANDSCAPE;
items3[1] = orientation === LANDSCAPE ? styles.footerLandscape : styles.footerPortrait;
return (
<SafeAreaPaddingView bottom style={styles.container}>
{scrollView}
<View style={items3}>
<>
{guild != null ? <Button size="lg" text={intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.UdYYP3,
{guildName: guild?.name})} onPress={value5} /> : null}
{channelId != null && value8 ? <Button size="lg" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['0cCDKP'])} onPress={value6} /> : null}
<Button
size="lg"
variant={guild != null ? 'tertiary' : undefined}
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq)}
onPress={value7}
/>
</>
</View>
</SafeAreaPaddingView>
);
}
function _fun79336() { // fn#79336, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10390:1091, offset: 0x01e4ebf3, size: 304 bytes, params: 1, frame: 20
var name;
var r1;
var r0;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var value2;
var format;
var object2;
var value4;
var value5;
var IlF6IY;
var value;
if (application != null) {
if (guild != null) {
value4 = environment.__proto__;
value5 = undefined;
format = intl.format;
IlF6IY = t.IlF6IY;
object2 = {};
name = application == null ? value5 : application.name;
object2.installedApplicationName = name;
name = guild == null ? value5 : guild.name;
object2.guildName = name;
r1 = Reflect.apply(format, intl, [IlF6IY, object2]);
} else {
value2 = environment.__proto__;
r1 = intl.format(t.vTVC5T, {installedApplicationName: application?.name});
function SuccessResultModal({guild, application}) { // fn#79335, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10390:981, offset: 0x01e4e70e, size: 1253 bytes, params: 2, frame: 39
const Text = (TextModule).Text;
const Button = (ButtonNativeModule).Button;
let env0_3 = undefined;
const styles = useStyles();
const useStore = DeviceOrientationModule.useStore;
const orientation = Reflect.apply(useStore, DeviceOrientationModule, []).orientation;
let binding = env0_3;
const value3 = binding.useMemo(_fun79336, [application, guild]);
const value5 = binding.useCallback(_fun79337, [guild, application?.id]);
const channelId = (require(566) /* metro dependency 566: flux */).useStateFromStores([SelectedChannelStore],
function() {
return SelectedChannelStore.getChannelId();
});
env0_3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channelId);
});
binding = env0_3;
const value6 = binding.useCallback(_fun79340, [application, channelId]);
const value7 = binding.useCallback(function() {
var value2 = undefined;
importDefault(dependencyMap[12]).pop();
var defaultImport2 = importDefault(dependencyMap[14]);
var track = defaultImport2.track;
var OAUTH2_AUTHORIZE_SUCCESS_CLOSE_CLICKED = AnalyticEvents.OAUTH2_AUTHORIZE_SUCCESS_CLOSE_CLICKED;
Reflect.apply(track, defaultImport2, [OAUTH2_AUTHORIZE_SUCCESS_CLOSE_CLICKED,
{application_id: application == null ? value2 : application.id}]);
return value2;
}, [application?.id]);
env0_3.useEffect(function() {
var value2 = undefined;
var defaultImport = importDefault(dependencyMap[14]);
var track = defaultImport.track;
var OAUTH2_AUTHORIZE_SUCCESS_VIEWED = AnalyticEvents.OAUTH2_AUTHORIZE_SUCCESS_VIEWED;
Reflect.apply(track, defaultImport, [OAUTH2_AUTHORIZE_SUCCESS_VIEWED,
{application_id: application == null ? value2 : application.id}]);
return value2;
}, [application?.id]);
const value8 = (require(566) /* metro dependency 566: flux */).useStateFromStores([PermissionStore], function() {
var permissionStoreBinding = PermissionStore;
var SEND_MESSAGES = Permissions.SEND_MESSAGES;
return permissionStoreBinding.can(SEND_MESSAGES, channel);
});
const SafeAreaPaddingView = (SafeAreaViewModule).SafeAreaPaddingView;
const items2 = [
<Image source={Module10205} />,
];
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
items2[1] = (
<Text style={styles.text} variant="text-lg/medium">
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.se5gLj)}
</Text>
);
items2[2] = (
value3 != null
? (
<Text style={styles.text} variant="text-sm/normal">
{value3}
</Text>
)
: null
);
const scrollView = (
<ScrollView style={styles.scrollView} contentContainerStyle={styles.scrollViewContentContainer}>
<View style={styles.inner}>
{items2}
</View>
</ScrollView>
);
const items3 = [styles.footer];
const OrientationType = DeviceOrientationModule.OrientationType;
const LANDSCAPE = OrientationType.LANDSCAPE;
items3[1] = orientation === LANDSCAPE ? styles.footerLandscape : styles.footerPortrait;
return (
<SafeAreaPaddingView bottom style={styles.container}>
{scrollView}
<View style={items3}>
<>
{
guild != null
? (
<Button
size="lg"
text={intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.UdYYP3,
{guildName: guild?.name})}
onPress={value5}
/>
)
: null
}
{
channelId != null && value8
? (
<Button
size="lg"
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['0cCDKP'])}
onPress={value6}
/>
)
: null
}
<Button
size="lg"
variant={guild != null ? 'tertiary' : undefined}
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq)}
onPress={value7}
/>
</>
</View>
</SafeAreaPaddingView>
);
function _fun79336() { // fn#79336, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10390:1091, offset: 0x01e4ebf3, size: 304 bytes, params: 1, frame: 20
var name;
var r1;
var r0;
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
var value2;
var format;
var object;
var value4;
var value5;
var IlF6IY;
var value;
if (application != null) {
if (guild != null) {
value4 = environment.__proto__;
value5 = undefined;
format = intl.format;
IlF6IY = t.IlF6IY;
object = {};
name = application == null ? value5 : application.name;
object.installedApplicationName = name;
name = guild == null ? value5 : guild.name;
object.guildName = name;
r1 = Reflect.apply(format, intl, [IlF6IY, object]);
} else {
value2 = environment.__proto__;
r1 = intl.format(t.vTVC5T, {installedApplicationName: application?.name});
}
r0 = r1;
} else {
value = environment.__proto__;
value = intl.string(t['Dp+rgP']);
r0 = value;
}
return r0;
}
r0 = r1;
} else {
value = environment.__proto__;
value = intl.string(t['Dp+rgP']);
r0 = value;
}
return r0;
}
function _fun79337() { // fn#79337, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10390:1389, offset: 0x01e4ed23, size: 216 bytes, params: 1, frame: 18
var value3;
var moduleValue;
var transitionToGuild;
var defaultImport2;
var track;
var OAUTH2_AUTHORIZE_SUCCESS_GO_TO_GUILD_CLICKED;
var object2;
const guildBinding = guild;
const value2 = undefined;
let id = guildBinding == null ? value2 : guild.id;
if (id != null) {
value3 = environment.__proto__;
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop();
moduleValue = require(6947) /* metro dependency 6947: transitionToGuildNative */;
transitionToGuild = moduleValue.transitionToGuild;
id = guild == null ? value2 : guild.id;
Reflect.apply(transitionToGuild, moduleValue, [id]);
defaultImport2 = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
track = defaultImport2.track;
OAUTH2_AUTHORIZE_SUCCESS_GO_TO_GUILD_CLICKED = AnalyticEvents.OAUTH2_AUTHORIZE_SUCCESS_GO_TO_GUILD_CLICKED;
object2 = {};
id = application == null ? value2 : application.id;
object2.application_id = id;
id = guild == null ? value2 : guild.id;
object2.guild_id = id;
Reflect.apply(track, defaultImport2, [OAUTH2_AUTHORIZE_SUCCESS_GO_TO_GUILD_CLICKED, object2]);
}
return value2;
}
function _fun79337() { // fn#79337, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10390:1389, offset: 0x01e4ed23, size: 216 bytes, params: 1, frame: 18
var value3;
var moduleValue;
var transitionToGuild;
var defaultImport2;
var track;
var OAUTH2_AUTHORIZE_SUCCESS_GO_TO_GUILD_CLICKED;
var object;
const guildBinding = guild;
const value2 = undefined;
let id = guildBinding == null ? value2 : guild.id;
if (id != null) {
value3 = environment.__proto__;
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop();
moduleValue = require(6947) /* metro dependency 6947: transitionToGuildNative */;
transitionToGuild = moduleValue.transitionToGuild;
id = guild == null ? value2 : guild.id;
Reflect.apply(transitionToGuild, moduleValue, [id]);
defaultImport2 = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
track = defaultImport2.track;
OAUTH2_AUTHORIZE_SUCCESS_GO_TO_GUILD_CLICKED = AnalyticEvents.OAUTH2_AUTHORIZE_SUCCESS_GO_TO_GUILD_CLICKED;
object = {};
id = application == null ? value2 : application.id;
object.application_id = id;
id = guild == null ? value2 : guild.id;
object.guild_id = id;
Reflect.apply(track, defaultImport2, [OAUTH2_AUTHORIZE_SUCCESS_GO_TO_GUILD_CLICKED, object]);
}
return value2;
}
function _fun79340() { // fn#79340, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10390:1776, offset: 0x01e4ee28, size: 165 bytes, params: 1, frame: 15
var defaultImport3;
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop();
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
if (channelId != null && application != null) {
defaultImport3 = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
defaultImport3.track(AnalyticEvents.OAUTH2_AUTHORIZE_SUCCESS_OPEN_APP_CLICKED,
{application_id: application.id});
global.setImmediate(_fun79341);
}
}
function _fun79340() { // fn#79340, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10390:1776, offset: 0x01e4ee28, size: 165 bytes, params: 1, frame: 15
var defaultImport3;
(ModalActionCreators).pop();
(ActionSheetActionCreators).hideActionSheet();
if (channelId != null && application != null) {
defaultImport3 = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
defaultImport3.track(AnalyticEvents.OAUTH2_AUTHORIZE_SUCCESS_OPEN_APP_CLICKED,
{application_id: application.id});
global.setImmediate(_fun79341);
}
function _fun79341() { // fn#79341, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10390:1938, offset: 0x01e4eecd, size: 124 bytes, params: 1, frame: 16
var openCustomKeyboard;
var object;
const bestActiveInput = (ChatInputUtilsModule).getBestActiveInput();
if (bestActiveInput != null) {
openCustomKeyboard = bestActiveInput.openCustomKeyboard;
object = {};
object.type = (require(1583) /* metro dependency 1583: KeyboardTypes */).KeyboardTypes.APP_LAUNCHER;
value = environment.__proto__;
object.context = {initialRouteName: AppLauncherRouteName.APPLICATION_VIEW, application: application};
Reflect.apply(openCustomKeyboard, bestActiveInput, [object]);
}
}
}
function _fun79341() { // fn#79341, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10390:1938, offset: 0x01e4eecd, size: 124 bytes, params: 1, frame: 16
var openCustomKeyboard;
var object2;
const bestActiveInput = (require(4015) /* metro dependency 4015: ChatInputUtils */).getBestActiveInput();
if (bestActiveInput != null) {
openCustomKeyboard = bestActiveInput.openCustomKeyboard;
object2 = {};
object2.type = (require(1583) /* metro dependency 1583: KeyboardTypes */).KeyboardTypes.APP_LAUNCHER;
value = environment.__proto__;
object2.context = {initialRouteName: AppLauncherRouteName.APPLICATION_VIEW, application: application};
Reflect.apply(openCustomKeyboard, bestActiveInput, [object2]);
}
}
global.__d(_fun79334, 10204, [31, 27, 1379, 3784, 1934, 661, 1483, 33, 4501, 697, 7717, 1244, 5080, 6947, 683, 566,
4080, 4015, 1583, 6618, 10205, 4573, 4578,
2]) /* metro module 10204, dependencies: [31, 27, 1379, 3784, 1934, 661, 1483, 33, 4501, 697, 7717, 1244, 5080, 6947, 683, 566, 4080, 4015, 1583, 6618, 10205, 4573, 4578, 2] */;
@@ -1,159 +1,197 @@
/* Metro module 9400; source: modules/oauth2/native/WebhookGuildChannelSelector.tsx; dependencies: [5, 57, 31, 27, 1383, 3793, 1878, 33, 4501, 697, 4080, 9059, 1962, 1244, 4805, 9347, 4573, 1305, 7972, 2] */
import Module00005 from '../../../by-id/module-00005.js'; /* Metro dependency 5 */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import UserStore from '../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import RelationshipStore from '../../../stores/RelationshipStore.tsx'; /* Metro dependency 3793 */
import ActionSheetActionCreators from '../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
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 ChannelRecordModule from '../../../records/ChannelRecord.tsx'; /* Metro dependency 1383 */
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 NativeModule2 from '../../../design/void/Form/native/index.tsx'; /* Metro dependency 7972 */
function _fun73285(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#73285, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9586:6, offset: 0x01d66b43, size: 440 bytes, params: 8, frame: 22
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = importDefault(57) /* metro dependency 57 */;
const env0_5 = importAll(31) /* metro dependency 31 */;
const env0_6 = (require(27) /* metro dependency 27 */).View;
const env0_7 = (require(1383) /* metro dependency 1383: ChannelRecord */).createChannelRecord;
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
let value = require(33) /* metro dependency 33 */;
let value = JsxRuntimeModule;
const env0_10 = value.jsx;
const env0_11 = value.jsxs;
const createStyles = (require(4501) /* metro dependency 4501: createStyles */).createStyles;
object3 = {selectorGroup: {'flexDirection': 'column', 'gap': 8}};
const object4 = {};
const createStyles = (CreateStylesModule).createStyles;
object = {selectorGroup: {'flexDirection': 'column', 'gap': 8}};
const object2 = {};
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
object4.backgroundColor = BACKGROUND_BASE_LOWER;
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object3.select = object4;
object2.backgroundColor = BACKGROUND_BASE_LOWER;
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object.select = object2;
const TEXT_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_SUBTLE;
object3.label = {color: TEXT_SUBTLE, fontWeight: '500'};
object.label = {color: TEXT_SUBTLE, fontWeight: '500'};
const RED_400 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.RED_400;
object3.error = {color: RED_400};
value = Reflect.apply(createStyles, value, [object3]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/oauth2/native/WebhookGuildChannelSelector.tsx');
object.error = {color: RED_400};
value = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/oauth2/native/WebhookGuildChannelSelector.tsx');
exports.default = WebhookGuildChannelSelector;
exports.useStyles = value;
}
function WebhookGuildChannelSelector({selectedGuildId, selectedChannelId, onChannelChange, error}) { // fn#73286, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9586:618, offset: 0x01d66cfb, size: 757 bytes, params: 2, frame: 29
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
const styles = useStyles();
const binding = env0_5;
const [property, env0_4] = env0_4Binding(binding.useState(null), 2);
var env0_5 = binding.useRef(false);
const value6 = binding.useCallback(_fun73287, [property, onChannelChange, selectedChannelId, selectedGuildId]);
binding.useEffect(_fun73290, [onChannelChange, selectedGuildId]);
binding.useEffect(_fun73296, [property, onChannelChange, selectedChannelId, selectedGuildId]);
if (selectedGuildId == null) {
return null;
}
const r16 = property == null ? undefined : property.channels.find(function({id}) {
return id === selectedChannelId;
});
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const items2 = [<Text variant="eyebrow" color="text-default">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['8qKd+J'])}</Text>];
items2[1] = error != null ? error === '' ? null : <LegacyText style={styles.error}>{error}</LegacyText> : null;
const FormRow = (require(7972) /* metro dependency 7972: native */).FormRow;
const r12 = r16?.name ?? intl.string((require(1244) /* metro dependency 1244: indexNative */).t['Re/64R']);
const FormRow2 = (require(7972) /* metro dependency 7972: native */).FormRow;
const Arrow = FormRow2.Arrow;
items2[2] = <FormRow label={r12} disabled={selectedGuildId == null} trailing={<Arrow />} DEPRECATED_style={styles.select} onPress={value6} />;
items2[3] = <LegacyText style={styles.label}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.kQXMfN)}</LegacyText>;
return (
<View style={styles.selectorGroup}>
{items2}
</View>
);
}
function _fun73287() { // fn#73287, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9586:808, offset: 0x01d66ff0, size: 247 bytes, params: 1, frame: 23
var environment;
var value4;
var value5;
var defaultImport;
var openLazy;
var value6;
var object2;
var intl;
if (env0_3 != null && env0_3.guildId === selectedGuildId) {
value4 = environment.__proto__;
value5 = undefined;
defaultImport = importDefault(dependencyMap[10]);
openLazy = defaultImport.openLazy;
value6 = require(dependencyMap[12])(dependencyMap[11], dependencyMap.paths);
object2 = {};
intl = require(dependencyMap[13]).intl;
object2.title = intl.string(require(dependencyMap[13]).t['Re/64R']);
object2.items = env0_3.channels.map(function(a0) {
var object = {};
object.label = require(dependencyMap[14]).computeChannelName(createChannelRecord(a0), UserStore,
RelationshipStore);
object.value = a0.id;
return object;
function WebhookGuildChannelSelector({selectedGuildId, selectedChannelId, onChannelChange, error}) { // fn#73286, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9586:618, offset: 0x01d66cfb, size: 757 bytes, params: 2, frame: 29
const LegacyText = (NativeModule).LegacyText;
const styles = useStyles();
const binding = env0_5;
const [property, env0_4] = env0_4Binding(binding.useState(null), 2);
var env0_5 = binding.useRef(false);
const value6 = binding.useCallback(_fun73287, [property, onChannelChange, selectedChannelId, selectedGuildId]);
binding.useEffect(_fun73290, [onChannelChange, selectedGuildId]);
binding.useEffect(_fun73296, [property, onChannelChange, selectedChannelId, selectedGuildId]);
if (selectedGuildId == null) {
return null;
}
const r16 = property == null ? undefined : property.channels.find(function({id}) {
return id === selectedChannelId;
});
object2.onItemSelect = onItemSelect_73289;
object2.selectedItem = selectedChannelId ?? value5;
object2.hasIcons = false;
Reflect.apply(openLazy, defaultImport, [value6, 'WebhookGuildChannelSelector', object2]);
}
}
function _fun73290() { // fn#73290, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9586:1140, offset: 0x01d6716d, size: 66 bytes, params: 1, frame: 13
env0_4(null);
if (selectedGuildId == null) {
onChannelChange(null);
} else {
(function(a0) {
return _updateChannels.apply(this, arguments);
})(selectedGuildId);
}
}
function _fun73296() { // fn#73296, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9586:1491, offset: 0x01d6728c, size: 94 bytes, params: 1, frame: 13
var channels;
if (env0_5.current) {
if (env0_3 == null) {
if (selectedChannelId != null) {
onChannelChange(null);
const Text = (TextModule).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const items2 = [
<Text variant="eyebrow" color="text-default">
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['8qKd+J'])}
</Text>,
];
items2[1] = (
error != null
? (
error === ''
? null
: (
<LegacyText style={styles.error}>
{error}
</LegacyText>
)
)
: null
);
const FormRow = (NativeModule2).FormRow;
const r12 = r16?.name ?? intl.string((require(1244) /* metro dependency 1244: indexNative */).t['Re/64R']);
const FormRow2 = (NativeModule2).FormRow;
const Arrow = FormRow2.Arrow;
items2[2] = (
<FormRow
label={r12}
disabled={selectedGuildId == null}
trailing={<Arrow />}
DEPRECATED_style={styles.select}
onPress={value6}
/>
);
items2[3] = (
<LegacyText style={styles.label}>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.kQXMfN)}
</LegacyText>
);
return (
<View style={styles.selectorGroup}>
{items2}
</View>
);
function _fun73287() { // fn#73287, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9586:808, offset: 0x01d66ff0, size: 247 bytes, params: 1, frame: 23
var environment;
var value4;
var value5;
var defaultImport;
var openLazy;
var value6;
var object;
var intl;
if (Module00005 != null && Module00005.guildId === selectedGuildId) {
value4 = environment.__proto__;
value5 = undefined;
defaultImport = importDefault(dependencyMap[10]);
openLazy = defaultImport.openLazy;
value6 = require(dependencyMap[12])(dependencyMap[11], dependencyMap.paths);
object = {};
intl = require(dependencyMap[13]).intl;
object.title = intl.string(require(dependencyMap[13]).t['Re/64R']);
object.items = Module00005.channels.map(function(a0) {
var object = {};
object.label = require(dependencyMap[14]).computeChannelName(createChannelRecord(a0), UserStore,
RelationshipStore);
object.value = a0.id;
return object;
});
object.onItemSelect = onItemSelect_73289;
object.selectedItem = selectedChannelId ?? value5;
object.hasIcons = false;
Reflect.apply(openLazy, defaultImport, [value6, 'WebhookGuildChannelSelector', object]);
}
} else {
channels = env0_3.channels;
if (!channels.some(function({id}) {
return id === selectedChannelId;
})) {
function onItemSelect_73289(a0) { // fn#73289, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9586:1017, offset: 0x01d67132, size: 59 bytes, params: 2, frame: 12
let value = environment.__proto__;
onChannelChange(a0);
value = environment.__proto__.__proto__;
(ActionSheetActionCreators).hideActionSheet('WebhookGuildChannelSelector');
}
}
function _fun73290() { // fn#73290, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9586:1140, offset: 0x01d6716d, size: 66 bytes, params: 1, frame: 13
env0_4(null);
if (selectedGuildId == null) {
onChannelChange(null);
} else {
(function(a0) {
return _updateChannels.apply(this, arguments);
})(selectedGuildId);
}
function _updateChannels() { // fn#73291, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9586:1145, offset: 0x01d671af, size: 53 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__.__proto__;
return env2_3(_fun73293).apply(this, arguments);
function* _fun73293(a0) { // fn#73293, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9586:1198, offset: 0x01d671ef, size: 128 bytes, params: 2, frame: 15
var environment;
if (true) {
value = environment.__proto__.__proto__.__proto__.__proto__;
value = env4_0(env4_2[15]);
yield value.fetchChannels(a0);
value = undefined;
if (false) {
return value;
}
if (require === a0) {
value.sort(function({name}, a1) {
return name.localeCompare(a1.name);
});
env3_4({guildId: a0, channels: value});
env3_5.current = true;
}
}
}
}
}
function _fun73296() { // fn#73296, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9586:1491, offset: 0x01d6728c, size: 94 bytes, params: 1, frame: 13
var channels;
if (env0_5.current) {
if (Module00005 == null) {
if (selectedChannelId != null) {
onChannelChange(null);
}
} else {
channels = Module00005.channels;
if (!channels.some(function({id}) {
return id === selectedChannelId;
})) {
onChannelChange(null);
}
}
}
}
}
}
function onItemSelect_73289(a0) { // fn#73289, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9586:1017, offset: 0x01d67132, size: 59 bytes, params: 2, frame: 12
let value = environment.__proto__;
onChannelChange(a0);
value = environment.__proto__.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet('WebhookGuildChannelSelector');
}
function _updateChannels() { // fn#73291, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9586:1145, offset: 0x01d671af, size: 53 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__.__proto__;
return env2_3(_fun73293).apply(this, arguments);
}
function* _fun73293(a0) { // fn#73293, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9586:1198, offset: 0x01d671ef, size: 128 bytes, params: 2, frame: 15
var environment;
if (true) {
value = environment.__proto__.__proto__.__proto__.__proto__;
value = env4_0(env4_2[15]);
yield value.fetchChannels(a0);
value = undefined;
if (false) {
return value;
}
if (require === a0) {
value.sort(function({name}, a1) {
return name.localeCompare(a1.name);
});
env3_4({guildId: a0, channels: value});
env3_5.current = true;
}
}
}
global.__d(_fun73285, 9400, [5, 57, 31, 27, 1383, 3793, 1878, 33, 4501, 697, 4080, 9059, 1962, 1244, 4805, 9347,
4573, 1305, 7972,
2]) /* metro module 9400, dependencies: [5, 57, 31, 27, 1383, 3793, 1878, 33, 4501, 697, 4080, 9059, 1962, 1244, 4805, 9347, 4573, 1305, 7972, 2] */;
@@ -1,101 +1,103 @@
/* Metro module 10203; source: modules/oauth2/native/authorizeCallback.tsx; dependencies: [8871, 5080, 9351, 1962, 1471, 10204, 4078, 676, 3853, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from './Constants.tsx'; /* Metro dependency 8871 */
function _fun79332(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79332, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10389:6, offset: 0x01e4e1ca, size: 170 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const constantsModule = require(8871) /* metro dependency 8871: Constants */;
const env0_3 = constantsModule.OAUTH2_SUCCESS_RESULT_MODAL_KEY;
const env0_4 = constantsModule.OAUTH2_ERROR_RESULT_MODAL_KEY;
const env0_5 = RegExp('oauth2\\/authorized', '');
const env0_6 = RegExp('oauth2\\/error', '');
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/oauth2/native/authorizeCallback.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/oauth2/native/authorizeCallback.tsx');
exports.default = authorizeCallback;
}
function authorizeCallback({location, canceled, application, guild, wasDeepLink}) { // fn#79333, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10389:304, offset: 0x01e4e274, size: 659 bytes, params: 2, frame: 24
var r2;
var r9;
var r1;
var defaultImport;
var pushLazy;
var value3;
var host;
var pathname;
var searchParams;
var defaultImport3;
var match;
const WebBrowserType = require(dependencyMap[7]).WebBrowserType;
var defaultImport4;
var defaultImport5;
var value7;
var value8;
var value10;
var defaultImport6;
if (location != null) {
value3 = undefined;
r2 = importDefault(dependencyMap[4]).toURLSafe(location) ?? ({});
host = r2.host;
pathname = r2.pathname;
searchParams = r2.searchParams;
if (host == null) {
r9 = wasDeepLink && require(dependencyMap[6]).getBrowserManagerSelectedBrowser() === WebBrowserType.IN_APP;
defaultImport4 = importDefault(dependencyMap[8]);
defaultImport4.openURL(location, r9 ? WebBrowserType.SAFARI : value3);
return undefined;
}
defaultImport3 = importDefault(dependencyMap[4]);
if (defaultImport3.isDiscordHostname(host)) {
if (pathname == null) {
function authorizeCallback({location, canceled, application, guild, wasDeepLink}) { // fn#79333, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10389:304, offset: 0x01e4e274, size: 659 bytes, params: 2, frame: 24
var r2;
var r9;
var r1;
var defaultImport;
var pushLazy;
var value3;
var host;
var pathname;
var searchParams;
var defaultImport3;
var match;
const WebBrowserType = require(dependencyMap[7]).WebBrowserType;
var defaultImport4;
var defaultImport5;
var value7;
var value8;
var value10;
var defaultImport6;
if (location != null) {
value3 = undefined;
r2 = importDefault(dependencyMap[4]).toURLSafe(location) ?? ({});
host = r2.host;
pathname = r2.pathname;
searchParams = r2.searchParams;
if (host == null) {
r9 = wasDeepLink && require(dependencyMap[6]).getBrowserManagerSelectedBrowser() === WebBrowserType.IN_APP;
defaultImport4 = importDefault(dependencyMap[8]);
defaultImport4.openURL(location, r9 ? WebBrowserType.SAFARI : value3);
return undefined;
}
match = pathname.match;
if (Reflect.apply(match, pathname, [env0_5]) != null) {
defaultImport6 = importDefault(dependencyMap[1]);
defaultImport6.pushLazy(require(dependencyMap[3])(dependencyMap[5], dependencyMap.paths),
{application: application,
guild: guild}, OAUTH2_SUCCESS_RESULT_MODAL_KEY);
return value3;
}
match = pathname.match;
if (Reflect.apply(match, pathname, [env0_6]) != null) {
if (!canceled) {
defaultImport5 = importDefault(dependencyMap[1]);
pushLazy = defaultImport5.pushLazy;
value7 = require(dependencyMap[3])(dependencyMap[2], dependencyMap.paths);
if (searchParams == null) {
r1 = value3;
} else {
value8 = searchParams.get('error_description');
r1 = value8 == null ? value3 : value8.toString();
}
if (r1 == null) {
if (searchParams == null) {
r9 = value3;
} else {
value10 = searchParams.get('error');
r9 = value10 == null ? value3 : value10.toString();
}
r1 = r9;
}
Reflect.apply(pushLazy, defaultImport5, [value7, {error: r1}, OAUTH2_ERROR_RESULT_MODAL_KEY]);
defaultImport3 = importDefault(dependencyMap[4]);
if (defaultImport3.isDiscordHostname(host)) {
if (pathname == null) {
r9 = wasDeepLink && require(dependencyMap[6]).getBrowserManagerSelectedBrowser() === WebBrowserType.IN_APP;
defaultImport4 = importDefault(dependencyMap[8]);
defaultImport4.openURL(location, r9 ? WebBrowserType.SAFARI : value3);
return undefined;
}
return value3;
match = pathname.match;
if (Reflect.apply(match, pathname, [env0_5]) != null) {
defaultImport6 = importDefault(dependencyMap[1]);
defaultImport6.pushLazy(require(dependencyMap[3])(dependencyMap[5], dependencyMap.paths),
{application: application,
guild: guild}, OAUTH2_SUCCESS_RESULT_MODAL_KEY);
return value3;
}
match = pathname.match;
if (Reflect.apply(match, pathname, [env0_6]) != null) {
if (!canceled) {
defaultImport5 = importDefault(dependencyMap[1]);
pushLazy = defaultImport5.pushLazy;
value7 = require(dependencyMap[3])(dependencyMap[2], dependencyMap.paths);
if (searchParams == null) {
r1 = value3;
} else {
value8 = searchParams.get('error_description');
r1 = value8 == null ? value3 : value8.toString();
}
if (r1 == null) {
if (searchParams == null) {
r9 = value3;
} else {
value10 = searchParams.get('error');
r9 = value10 == null ? value3 : value10.toString();
}
r1 = r9;
}
Reflect.apply(pushLazy, defaultImport5, [value7, {error: r1}, OAUTH2_ERROR_RESULT_MODAL_KEY]);
}
return value3;
}
r9 = wasDeepLink && require(dependencyMap[6]).getBrowserManagerSelectedBrowser() === WebBrowserType.IN_APP;
defaultImport4 = importDefault(dependencyMap[8]);
defaultImport4.openURL(location, r9 ? WebBrowserType.SAFARI : value3);
return undefined;
}
r9 = wasDeepLink && require(dependencyMap[6]).getBrowserManagerSelectedBrowser() === WebBrowserType.IN_APP;
defaultImport4 = importDefault(dependencyMap[8]);
defaultImport4.openURL(location, r9 ? WebBrowserType.SAFARI : value3);
return undefined;
} else if (!canceled) {
defaultImport = importDefault(dependencyMap[1]);
defaultImport.pushLazy(require(dependencyMap[3])(dependencyMap[2], dependencyMap.paths), undefined,
OAUTH2_ERROR_RESULT_MODAL_KEY);
}
r9 = wasDeepLink && require(dependencyMap[6]).getBrowserManagerSelectedBrowser() === WebBrowserType.IN_APP;
defaultImport4 = importDefault(dependencyMap[8]);
defaultImport4.openURL(location, r9 ? WebBrowserType.SAFARI : value3);
} else if (!canceled) {
defaultImport = importDefault(dependencyMap[1]);
defaultImport.pushLazy(require(dependencyMap[3])(dependencyMap[2], dependencyMap.paths), undefined,
OAUTH2_ERROR_RESULT_MODAL_KEY);
}
}
global.__d(_fun79332, 10203, [8871, 5080, 9351, 1962, 1471, 10204, 4078, 676, 3853,
2]) /* metro module 10203, dependencies: [8871, 5080, 9351, 1962, 1471, 10204, 4078, 676, 3853, 2] */;
File diff suppressed because it is too large. Load diff