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

+95 -93
View File
@@ -1,105 +1,107 @@
/* Metro module 4120; source: modules/oauth2/Authorize.tsx; dependencies: [1379, 3969, 661, 4121, 4122, 4123, 3789, 483, 2] */
import ChannelStore from '../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import SelectedGuildStore from '../../stores/SelectedGuildStore.tsx'; /* Metro dependency 3969 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as OAuth2ScopesModule from '../../external/discord_common/js/shared/shared-constants/OAuth2Scopes.tsx'; /* Metro dependency 4122 */
function _fun34200(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#34200, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4285:6, offset: 0x0104cd81, size: 188 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const selectedGuildStore = importDefault(3969) /* metro dependency 3969: SelectedGuildStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_5 = constantsModule.EMPTY_NUX_SERVER;
const env0_6 = constantsModule.FAVORITES;
const env0_7 = constantsModule.ME;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/oauth2/Authorize.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/oauth2/Authorize.tsx');
exports.filterScopes = filterScopes;
exports.parseOAuth2AuthorizeProps = parseOAuth2AuthorizeProps;
}
function filterScopes(a0) { // fn#34201, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4285:248, offset: 0x0104ce3d, size: 156 bytes, params: 2, frame: 16
const value = a0.filter(function(a0) {
var RemovedScopes = require(dependencyMap[3]).RemovedScopes;
return !RemovedScopes.includes(a0);
});
const includes = value.includes;
const OAuth2Scopes = (require(4122) /* metro dependency 4122: OAuth2Scopes */).OAuth2Scopes;
const BOT = OAuth2Scopes.BOT;
if (Reflect.apply(includes, value, [BOT]) && !value.includes(OAuth2Scopes.APPLICATIONS_COMMANDS)) {
value.push(OAuth2Scopes.APPLICATIONS_COMMANDS);
}
return value;
}
function parseOAuth2AuthorizeProps(a0) { // fn#34203, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4285:514, offset: 0x0104cf0a, size: 610 bytes, params: 2, frame: 26
var r0;
var r7;
var property;
var moduleValue2;
var deserialize;
var permissions;
var value4;
var value5;
var value6;
var value7;
var error;
var channel;
const value = undefined;
const value3 = require(dependencyMap[5]).parse(a0, {arrayFormat: 'bracket'});
const NONE = importAll(dependencyMap[6]).NONE;
try {
property = dependencyMap[7];
moduleValue2 = importAll(property);
deserialize = moduleValue2.deserialize;
permissions = value3.permissions;
value4 = permissions != null;
value5 = '0';
if (value4) {
permissions = value3.permissions;
value6 = permissions === '';
if (value6) {
r0 = value5;
} else {
permissions = value3.permissions;
r0 = permissions;
}
} else {
r0 = value5;
function filterScopes(a0) { // fn#34201, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4285:248, offset: 0x0104ce3d, size: 156 bytes, params: 2, frame: 16
const value = a0.filter(function(a0) {
var RemovedScopes = require(dependencyMap[3]).RemovedScopes;
return !RemovedScopes.includes(a0);
});
const includes = value.includes;
const OAuth2Scopes = (OAuth2ScopesModule).OAuth2Scopes;
const BOT = OAuth2Scopes.BOT;
if (Reflect.apply(includes, value, [BOT]) && !value.includes(OAuth2Scopes.APPLICATIONS_COMMANDS)) {
value.push(OAuth2Scopes.APPLICATIONS_COMMANDS);
}
value7 = Reflect.apply(deserialize, moduleValue2, [r0]);
r7 = value7;
} catch (error) {
r7 = NONE;
return value;
}
const channel_id = value3.channel_id;
const guild_id = value3.guild_id;
if (guild_id != null) {
r0 = guild_id;
} else {
channel = ChannelStore.getChannel(channel_id);
r0 = channel == null ? value : channel.guild_id;
function parseOAuth2AuthorizeProps(a0) { // fn#34203, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4285:514, offset: 0x0104cf0a, size: 610 bytes, params: 2, frame: 26
var r0;
var r7;
var property;
var moduleValue2;
var deserialize;
var permissions;
var value4;
var value5;
var value6;
var value7;
var error;
var channel;
const value = undefined;
const value3 = require(dependencyMap[5]).parse(a0, {arrayFormat: 'bracket'});
const NONE = importAll(dependencyMap[6]).NONE;
try {
property = dependencyMap[7];
moduleValue2 = importAll(property);
deserialize = moduleValue2.deserialize;
permissions = value3.permissions;
value4 = permissions != null;
value5 = '0';
if (value4) {
permissions = value3.permissions;
value6 = permissions === '';
if (value6) {
r0 = value5;
} else {
permissions = value3.permissions;
r0 = permissions;
}
} else {
r0 = value5;
}
value7 = Reflect.apply(deserialize, moduleValue2, [r0]);
r7 = value7;
} catch (error) {
r7 = NONE;
}
const channel_id = value3.channel_id;
const guild_id = value3.guild_id;
if (guild_id != null) {
r0 = guild_id;
} else {
channel = ChannelStore.getChannel(channel_id);
r0 = channel == null ? value : channel.guild_id;
}
r0 = r0 ?? SelectedGuildStore.getGuildId();
object = [ME];
object[1] = FAVORITES;
object[2] = EMPTY_NUX_SERVER;
r0 = object.includes(r0) ? value : r0 ?? value;
object = {};
const client_id = value3.client_id;
const value10 = '';
object.clientId = client_id ?? value10;
object.scopes = (value3.scope ?? value10).replace(RegExp('\\+', 'g'), ' ').split(' ').filter(function(a0) {
return a0.length > 0;
});
object.responseType = value3.response_type;
object.redirectUri = value3.redirect_uri;
object.codeChallenge = value3.code_challenge;
object.codeChallengeMethod = value3.code_challenge_method;
object.state = value3.state;
object.permissions = r7;
object.channelId = channel_id;
object.guildId = r0;
object.prompt = value3.prompt;
object.disableGuildSelect = value3.disable_guild_select === 'true';
object.integrationType = value3.integration_type == null ? value : global.Number(value3.integration_type);
object.nonce = value3.nonce;
return object;
}
r0 = r0 ?? SelectedGuildStore.getGuildId();
object = [ME];
object[1] = FAVORITES;
object[2] = EMPTY_NUX_SERVER;
r0 = object.includes(r0) ? value : r0 ?? value;
object = {};
const client_id = value3.client_id;
const value10 = '';
object.clientId = client_id ?? value10;
object.scopes = (value3.scope ?? value10).replace(RegExp('\\+', 'g'), ' ').split(' ').filter(function(a0) {
return a0.length > 0;
});
object.responseType = value3.response_type;
object.redirectUri = value3.redirect_uri;
object.codeChallenge = value3.code_challenge;
object.codeChallengeMethod = value3.code_challenge_method;
object.state = value3.state;
object.permissions = r7;
object.channelId = channel_id;
object.guildId = r0;
object.prompt = value3.prompt;
object.disableGuildSelect = value3.disable_guild_select === 'true';
object.integrationType = value3.integration_type == null ? value : global.Number(value3.integration_type);
object.nonce = value3.nonce;
return object;
}
global.__d(_fun34200, 4120, [1379, 3969, 661, 4121, 4122, 4123, 3789, 483,
2]) /* metro module 4120, dependencies: [1379, 3969, 661, 4121, 4122, 4123, 3789, 483, 2] */;
+4 -1
View File
@@ -1,11 +1,14 @@
/* Metro module 9343; source: modules/oauth2/Constants.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun72954(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#72954, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9529:6, offset: 0x01d5aa3b, size: 146 bytes, params: 8, frame: 16
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/oauth2/Constants.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/oauth2/Constants.tsx');
exports.OAuth2Steps = {CONNECT_ACCOUNT: 'CONNECT_ACCOUNT', SELECT_INSTALL_TYPE: 'SELECT_INSTALL_TYPE',
AUTHORIZE_SCOPES: 'AUTHORIZE_SCOPES', AUTHORIZE_BOT_PERMISSIONS: 'AUTHORIZE_BOT_PERMISSIONS',
AUTHORIZE_MFA: 'AUTHORIZE_MFA'};
exports.EMOJI_POINTING_DOWN_CODE_POINT = '1f447';
}
global.__d(_fun72954, 9343, [2]) /* metro module 9343, dependencies: [2] */;
+33 -28
View File
@@ -1,18 +1,36 @@
/* Metro module 9408; source: modules/oauth2/Utils.tsx; dependencies: [661, 9393, 1244, 2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as UseIsSocialLayerParentApplicationModule from '../applications/useIsSocialLayerParentApplication.tsx'; /* Metro dependency 9393 */
function _fun73321(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#73321, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9594:6, offset: 0x01d6850b, size: 117 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = (require(661) /* metro dependency 661: Constants */).MarketingURLs;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/oauth2/Utils.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/oauth2/Utils.tsx');
exports.getApplicationDetailsText = getApplicationDetailsText;
}
function getApplicationDetailsText(a0) { // fn#73322, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9594:206, offset: 0x01d68580, size: 559 bytes, params: 2, frame: 18
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const isSocialLayerParentApplication = (require(9393) /* metro dependency 9393: useIsSocialLayerParentApplication */).getIsSocialLayerParentApplication(a0);
if (a0.privacy_policy_url == null) {
function getApplicationDetailsText(a0) { // fn#73322, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9594:206, offset: 0x01d68580, size: 559 bytes, params: 2, frame: 18
const t = (IndexNativeModule).t;
const intl = (IndexNativeModule).intl;
const isSocialLayerParentApplication = (UseIsSocialLayerParentApplicationModule).getIsSocialLayerParentApplication(a0);
if (a0.privacy_policy_url == null) {
if (a0.privacy_policy_url != null) {
return intl.format(isSocialLayerParentApplication ? t.pYVSah : t.TBvmM2, {application: a0.name,
privacyPolicyURL: a0.privacy_policy_url, discordPrivacyPolicyURL: MarketingURLs.PRIVACY});
}
if (a0.terms_of_service_url != null) {
return intl.format(isSocialLayerParentApplication ? t.nBLOp5 : t['q0T/Q1'], {application: a0.name,
termsOfServiceURL: a0.terms_of_service_url, discordPrivacyPolicyURL: MarketingURLs.PRIVACY});
}
return intl.format(isSocialLayerParentApplication ? t['8LemYv'] : t['3Ywek3'], {application: a0.name,
discordPrivacyPolicyURL: MarketingURLs.PRIVACY});
}
if (a0.terms_of_service_url != null) {
return intl.format(isSocialLayerParentApplication ? t.yVfotv : t.rxlyKL, {application: a0.name,
privacyPolicyURL: a0.privacy_policy_url, termsOfServiceURL: a0.terms_of_service_url,
discordPrivacyPolicyURL: MarketingURLs.PRIVACY});
}
if (a0.privacy_policy_url != null) {
return intl.format(isSocialLayerParentApplication ? t.pYVSah : t.TBvmM2, {application: a0.name,
privacyPolicyURL: a0.privacy_policy_url, discordPrivacyPolicyURL: MarketingURLs.PRIVACY});
@@ -21,25 +39,12 @@ function getApplicationDetailsText(a0) { // fn#73322, source: /ci/build/discord/
return intl.format(isSocialLayerParentApplication ? t.nBLOp5 : t['q0T/Q1'], {application: a0.name,
termsOfServiceURL: a0.terms_of_service_url, discordPrivacyPolicyURL: MarketingURLs.PRIVACY});
}
return intl.format(isSocialLayerParentApplication ? t['8LemYv'] : t['3Ywek3'], {application: a0.name,
discordPrivacyPolicyURL: MarketingURLs.PRIVACY});
const r7 = isSocialLayerParentApplication ? t['8LemYv'] : t['3Ywek3'];
const format = intl.format;
const PRIVACY = MarketingURLs.PRIVACY;
return Reflect.apply(format, intl, [r7, {application: a0.name, discordPrivacyPolicyURL: PRIVACY}]);
}
if (a0.terms_of_service_url != null) {
return intl.format(isSocialLayerParentApplication ? t.yVfotv : t.rxlyKL, {application: a0.name,
privacyPolicyURL: a0.privacy_policy_url, termsOfServiceURL: a0.terms_of_service_url,
discordPrivacyPolicyURL: MarketingURLs.PRIVACY});
}
if (a0.privacy_policy_url != null) {
return intl.format(isSocialLayerParentApplication ? t.pYVSah : t.TBvmM2, {application: a0.name,
privacyPolicyURL: a0.privacy_policy_url, discordPrivacyPolicyURL: MarketingURLs.PRIVACY});
}
if (a0.terms_of_service_url != null) {
return intl.format(isSocialLayerParentApplication ? t.nBLOp5 : t['q0T/Q1'], {application: a0.name,
termsOfServiceURL: a0.terms_of_service_url, discordPrivacyPolicyURL: MarketingURLs.PRIVACY});
}
const r7 = isSocialLayerParentApplication ? t['8LemYv'] : t['3Ywek3'];
const format = intl.format;
const PRIVACY = MarketingURLs.PRIVACY;
return Reflect.apply(format, intl, [r7, {application: a0.name, discordPrivacyPolicyURL: PRIVACY}]);
}
global.__d(_fun73321, 9408, [661, 9393, 1244, 2]) /* metro module 9408, dependencies: [661, 9393, 1244, 2] */;
+189 -185
View File
@@ -1,17 +1,19 @@
/* Metro module 9347; source: modules/oauth2/actions.tsx; dependencies: [5, 1379, 1934, 661, 507, 5076, 484, 2] */
import Module00005 from '../../by-id/module-00005.js'; /* Metro dependency 5 */
import ChannelStore from '../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import SelectedChannelStore from '../../stores/SelectedChannelStore.tsx'; /* Metro dependency 1934 */
import AuthenticationActionCreators from '../../actions/AuthenticationActionCreators.tsx'; /* Metro dependency 5076 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as PathUtilsModule from '../../external/discord_common/js/shared/utils/PathUtils.tsx'; /* Metro dependency 484 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
function _fun72994(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#72994, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9533:6, offset: 0x01d5bf0e, size: 386 bytes, params: 8, frame: 20
const env0_0 = require;
const closure = getLocationContextServer;
const getLocationContextServer2 = getLocationContextServer;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_6 = constantsModule.ChannelTypes;
const env0_7 = constantsModule.Endpoints;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/oauth2/actions.tsx');
exports.getLocationContextServer = closure;
(FileImportTrackerModule).fileFinishedImporting('modules/oauth2/actions.tsx');
exports.getLocationContextServer = getLocationContextServer2;
exports.acceptWhitelist = function(a0) {
var HTTP = require(dependencyMap[4]).HTTP;
return HTTP.post({url: Endpoints.OAUTH2_WHITELIST_ACCEPT, query: {token: a0}, oldFormErrors: true,
@@ -39,186 +41,188 @@ function _fun72994(global, require, importDefault, importAll, module, exports, d
exports.finishUserCodeTwoWayLinkError = function() {
return _finishUserCodeTwoWayLinkError.apply(this, arguments);
};
}
function getLocationContextServer() { // fn#72995, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9533:167, offset: 0x01d5c090, size: 136 bytes, params: 1, frame: 17
const basicChannel = ChannelStore.getBasicChannel(SelectedChannelStore.getChannelId());
const value4 = undefined;
const guild_id = basicChannel == null ? value4 : basicChannel.guild_id;
const value5 = '10000';
return {guild_id: guild_id ?? value5, channel_id: (basicChannel == null ? value4 : basicChannel.id) ?? value5,
channel_type: (basicChannel == null ? value4 : basicChannel.type) ?? ChannelTypes.UNKNOWN};
}
function _authorize() { // fn#72996, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9533:426, offset: 0x01d5c118, size: 50 bytes, params: 1, frame: 14
return env0_3(_fun72998).apply(this, arguments);
}
function _fetchAuthorization() { // fn#72999, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9533:1157, offset: 0x01d5c2ca, size: 50 bytes, params: 1, frame: 14
return env0_3(_fun73001).apply(this, arguments);
}
function _startSamsungAuthorization() { // fn#73002, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9533:1705, offset: 0x01d5c41b, size: 50 bytes, params: 1, frame: 14
return env0_3(_fun73004).apply(this, arguments);
}
function _fetchChannels() { // fn#73005, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9533:1997, offset: 0x01d5c4fa, size: 50 bytes, params: 1, frame: 14
return env0_3(_fun73007).apply(this, arguments);
}
function _verifyUserCode() { // fn#73008, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9533:2221, offset: 0x01d5c5a9, size: 50 bytes, params: 1, frame: 14
return env0_3(_fun73010).apply(this, arguments);
}
function _finishUserCode() { // fn#73011, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9533:2412, offset: 0x01d5c64d, size: 50 bytes, params: 1, frame: 14
return env0_3(_fun73013).apply(this, arguments);
}
function _finishUserCodeTwoWayLinkError() { // fn#73014, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9533:2614, offset: 0x01d5c6f9, size: 50 bytes, params: 1, frame: 14
return env0_3(_fun73016).apply(this, arguments);
}
function logoutWithRedirect({pathname, search}, a1) { // fn#73022, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9533:3568, offset: 0x01d5c814, size: 91 bytes, params: 3, frame: 16
const defaultImport = importDefault(5076) /* metro dependency 5076: AuthenticationActionCreators */;
const logout = defaultImport.logout;
let value = require(484) /* metro dependency 484: PathUtils */;
value = value.getLoginPath(pathname + search, false);
Reflect.apply(logout, defaultImport, [a1, value]);
}
async function _fun72998({authorize, clientId, scopes, responseType, redirectUri, codeChallenge, codeChallengeMethod, state, permissions, guildId, channelId, integrationType, connectedAccountProvider, nonce}) { // fn#72998, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9533:469, offset: 0x01d5c15e, size: 364 bytes, params: 2, frame: 30
if (false) {
return undefined;
function getLocationContextServer() { // fn#72995, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9533:167, offset: 0x01d5c090, size: 136 bytes, params: 1, frame: 17
const basicChannel = ChannelStore.getBasicChannel(SelectedChannelStore.getChannelId());
const value4 = undefined;
const guild_id = basicChannel == null ? value4 : basicChannel.guild_id;
const value5 = '10000';
return {guild_id: guild_id ?? value5, channel_id: (basicChannel == null ? value4 : basicChannel.id) ?? value5,
channel_type: (basicChannel == null ? value4 : basicChannel.type) ?? ChannelTypes.UNKNOWN};
}
value = undefined;
await value;
if (false) {
return undefined;
function _authorize() { // fn#72996, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9533:426, offset: 0x01d5c118, size: 50 bytes, params: 1, frame: 14
return Module00005(_fun72998).apply(this, arguments);
async function _fun72998({authorize, clientId, scopes, responseType, redirectUri, codeChallenge, codeChallengeMethod, state, permissions, guildId, channelId, integrationType, connectedAccountProvider, nonce}) { // fn#72998, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9533:469, offset: 0x01d5c15e, size: 364 bytes, params: 2, frame: 30
if (false) {
return undefined;
}
value = undefined;
await value;
if (false) {
return undefined;
}
const HTTP = env2_0(env2_2[4]).HTTP;
const post = HTTP.post;
const object = {};
const OAUTH2_AUTHORIZE = env2_7.OAUTH2_AUTHORIZE;
object.url = OAUTH2_AUTHORIZE;
const object2 = {client_id: clientId, response_type: responseType, redirect_uri: redirectUri,
code_challenge: codeChallenge, code_challenge_method: codeChallengeMethod};
object2.scope = scopes.join(' ');
object2.state = state;
object2.nonce = nonce;
object.query = object2;
const object3 = {guild_id: guildId};
object3.webhook_channel_id = guildId != null && channelId != null ? channelId : value;
object3.channel_id = guildId == null && channelId != null ? channelId : value;
object3.permissions = permissions;
object3.authorize = authorize;
object3.integration_type = integrationType;
object3.connected_account_provider = connectedAccountProvider;
object3.location_context = env2_8();
object.body = object3;
object.oldFormErrors = true;
object.rejectWithError = false;
await Reflect.apply(post, HTTP, [object]);
value = undefined;
if (false) {
return value;
}
return value.body;
}
}
const HTTP = env2_0(env2_2[4]).HTTP;
const post = HTTP.post;
const object4 = {};
const OAUTH2_AUTHORIZE = env2_7.OAUTH2_AUTHORIZE;
object4.url = OAUTH2_AUTHORIZE;
const object5 = {client_id: clientId, response_type: responseType, redirect_uri: redirectUri,
code_challenge: codeChallenge, code_challenge_method: codeChallengeMethod};
object5.scope = scopes.join(' ');
object5.state = state;
object5.nonce = nonce;
object4.query = object5;
const object6 = {guild_id: guildId};
object6.webhook_channel_id = guildId != null && channelId != null ? channelId : value;
object6.channel_id = guildId == null && channelId != null ? channelId : value;
object6.permissions = permissions;
object6.authorize = authorize;
object6.integration_type = integrationType;
object6.connected_account_provider = connectedAccountProvider;
object6.location_context = env2_8();
object4.body = object6;
object4.oldFormErrors = true;
object4.rejectWithError = false;
await Reflect.apply(post, HTTP, [object4]);
value = undefined;
if (false) {
return value;
}
return value.body;
}
async function _fun73001({clientId, scopes, responseType, redirectUri, codeChallenge, codeChallengeMethod, state, integrationType, connectedAccountProvider, nonce, signal}) { // fn#73001, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9533:1218, offset: 0x01d5c310, size: 267 bytes, params: 2, frame: 26
if (false) {
return undefined;
}
await undefined;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
const HTTP = env2_0(env2_2[4]).HTTP;
const get = HTTP.get;
const object3 = {'url': null, 'query': null, 'signal': null, 'retries': 3, 'oldFormErrors': true,
'rejectWithError': false};
const OAUTH2_AUTHORIZE = env2_7.OAUTH2_AUTHORIZE;
object3.url = OAUTH2_AUTHORIZE;
const object4 = {client_id: clientId, response_type: responseType, redirect_uri: redirectUri,
code_challenge: codeChallenge, code_challenge_method: codeChallengeMethod};
object4.scope = scopes.join(' ');
object4.state = state;
object4.integration_type = integrationType;
object4.connected_account_provider = connectedAccountProvider;
object4.nonce = nonce;
object3.query = object4;
object3.signal = signal;
await Reflect.apply(get, HTTP, [object3]);
value = undefined;
if (false) {
return value;
}
return value.body;
}
function _fetchAuthorization() { // fn#72999, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9533:1157, offset: 0x01d5c2ca, size: 50 bytes, params: 1, frame: 14
return Module00005(_fun73001).apply(this, arguments);
async function _fun73001({clientId, scopes, responseType, redirectUri, codeChallenge, codeChallengeMethod, state, integrationType, connectedAccountProvider, nonce, signal}) { // fn#73001, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9533:1218, offset: 0x01d5c310, size: 267 bytes, params: 2, frame: 26
if (false) {
return undefined;
}
await undefined;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
const HTTP = env2_0(env2_2[4]).HTTP;
const get = HTTP.get;
const object = {'url': null, 'query': null, 'signal': null, 'retries': 3, 'oldFormErrors': true,
'rejectWithError': false};
const OAUTH2_AUTHORIZE = env2_7.OAUTH2_AUTHORIZE;
object.url = OAUTH2_AUTHORIZE;
const object2 = {client_id: clientId, response_type: responseType, redirect_uri: redirectUri,
code_challenge: codeChallenge, code_challenge_method: codeChallengeMethod};
object2.scope = scopes.join(' ');
object2.state = state;
object2.integration_type = integrationType;
object2.connected_account_provider = connectedAccountProvider;
object2.nonce = nonce;
object.query = object2;
object.signal = signal;
await Reflect.apply(get, HTTP, [object]);
value = undefined;
if (false) {
return value;
}
return value.body;
}
function* _fun73004(a0, a1, a2, a3, a4) { // fn#73004, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9533:1780, offset: 0x01d5c458, size: 162 bytes, params: 6, frame: 17
if (true) {
value = environment.__proto__.__proto__;
var HTTP = env2_0(env2_2[4]).HTTP;
var get = HTTP.get;
var object3 = {};
var OAUTH2_AUTHORIZE_SAMSUNG = env2_7.OAUTH2_AUTHORIZE_SAMSUNG;
object3.url = OAUTH2_AUTHORIZE_SAMSUNG;
var object4 = {client_id: a0, state: a4, response_type: a2, redirect_uri: a3, prompt: 'consent'};
object4.scope = a1.join(' ');
object3.query = object4;
object3.rejectWithError = false;
yield Reflect.apply(get, HTTP, [object3]);
}
}
function* _fun73007(a0) { // fn#73007, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9533:2048, offset: 0x01d5c537, size: 114 bytes, params: 2, frame: 14
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
const HTTP = env2_0(env2_2[4]).HTTP;
const get = HTTP.get;
const OAUTH2_AUTHORIZE_WEBHOOK_CHANNELS = env2_7.OAUTH2_AUTHORIZE_WEBHOOK_CHANNELS;
yield Reflect.apply(get, HTTP, [{url: OAUTH2_AUTHORIZE_WEBHOOK_CHANNELS, query: {guild_id: a0}, oldFormErrors: true,
rejectWithError: false}]);
value = undefined;
if (false) {
return value;
}
return value.body;
}
function* _fun73010(a0) { // fn#73010, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9533:2274, offset: 0x01d5c5e6, size: 103 bytes, params: 2, frame: 14
if (true) {
value = environment.__proto__.__proto__;
var HTTP = env2_0(env2_2[4]).HTTP;
var post = HTTP.post;
var OAUTH2_DEVICE_VERIFY = env2_7.OAUTH2_DEVICE_VERIFY;
yield Reflect.apply(post, HTTP, [{url: OAUTH2_DEVICE_VERIFY, body: {user_code: a0}, rejectWithError: false}]);
}
}
function* _fun73013(a0, a1) { // fn#73013, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9533:2465, offset: 0x01d5c68a, size: 111 bytes, params: 3, frame: 14
if (true) {
value = environment.__proto__.__proto__;
var HTTP = env2_0(env2_2[4]).HTTP;
var post = HTTP.post;
var OAUTH2_DEVICE_FINISH = env2_7.OAUTH2_DEVICE_FINISH;
yield Reflect.apply(post, HTTP, [{url: OAUTH2_DEVICE_FINISH, body: {user_code: a0, result: a1},
rejectWithError: false}]);
}
}
function* _fun73016(a0, a1, a2) { // fn#73016, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9533:2697, offset: 0x01d5c736, size: 135 bytes, params: 4, frame: 14
if (true) {
value = environment.__proto__.__proto__;
var HTTP = env2_0(env2_2[4]).HTTP;
var post = HTTP.post;
var OAUTH2_DEVICE_FINISH = env2_7.OAUTH2_DEVICE_FINISH;
yield Reflect.apply(post, HTTP, [{url: OAUTH2_DEVICE_FINISH, body: {user_code: a0, result: 'two_way_link_error',
error_code: a1, error_source: a2}, rejectWithError: false}]);
}
function _startSamsungAuthorization() { // fn#73002, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9533:1705, offset: 0x01d5c41b, size: 50 bytes, params: 1, frame: 14
return Module00005(_fun73004).apply(this, arguments);
function* _fun73004(a0, a1, a2, a3, a4) { // fn#73004, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9533:1780, offset: 0x01d5c458, size: 162 bytes, params: 6, frame: 17
if (true) {
value = environment.__proto__.__proto__;
var HTTP = env2_0(env2_2[4]).HTTP;
var get = HTTP.get;
var object = {};
var OAUTH2_AUTHORIZE_SAMSUNG = env2_7.OAUTH2_AUTHORIZE_SAMSUNG;
object.url = OAUTH2_AUTHORIZE_SAMSUNG;
var object2 = {client_id: a0, state: a4, response_type: a2, redirect_uri: a3, prompt: 'consent'};
object2.scope = a1.join(' ');
object.query = object2;
object.rejectWithError = false;
yield Reflect.apply(get, HTTP, [object]);
}
}
}
function _fetchChannels() { // fn#73005, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9533:1997, offset: 0x01d5c4fa, size: 50 bytes, params: 1, frame: 14
return Module00005(_fun73007).apply(this, arguments);
function* _fun73007(a0) { // fn#73007, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9533:2048, offset: 0x01d5c537, size: 114 bytes, params: 2, frame: 14
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
const HTTP = env2_0(env2_2[4]).HTTP;
const get = HTTP.get;
const OAUTH2_AUTHORIZE_WEBHOOK_CHANNELS = env2_7.OAUTH2_AUTHORIZE_WEBHOOK_CHANNELS;
yield Reflect.apply(get, HTTP, [{url: OAUTH2_AUTHORIZE_WEBHOOK_CHANNELS, query: {guild_id: a0}, oldFormErrors: true,
rejectWithError: false}]);
value = undefined;
if (false) {
return value;
}
return value.body;
}
}
function _verifyUserCode() { // fn#73008, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9533:2221, offset: 0x01d5c5a9, size: 50 bytes, params: 1, frame: 14
return Module00005(_fun73010).apply(this, arguments);
function* _fun73010(a0) { // fn#73010, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9533:2274, offset: 0x01d5c5e6, size: 103 bytes, params: 2, frame: 14
if (true) {
value = environment.__proto__.__proto__;
var HTTP = env2_0(env2_2[4]).HTTP;
var post = HTTP.post;
var OAUTH2_DEVICE_VERIFY = env2_7.OAUTH2_DEVICE_VERIFY;
yield Reflect.apply(post, HTTP, [{url: OAUTH2_DEVICE_VERIFY, body: {user_code: a0}, rejectWithError: false}]);
}
}
}
function _finishUserCode() { // fn#73011, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9533:2412, offset: 0x01d5c64d, size: 50 bytes, params: 1, frame: 14
return Module00005(_fun73013).apply(this, arguments);
function* _fun73013(a0, a1) { // fn#73013, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9533:2465, offset: 0x01d5c68a, size: 111 bytes, params: 3, frame: 14
if (true) {
value = environment.__proto__.__proto__;
var HTTP = env2_0(env2_2[4]).HTTP;
var post = HTTP.post;
var OAUTH2_DEVICE_FINISH = env2_7.OAUTH2_DEVICE_FINISH;
yield Reflect.apply(post, HTTP, [{url: OAUTH2_DEVICE_FINISH, body: {user_code: a0, result: a1},
rejectWithError: false}]);
}
}
}
function _finishUserCodeTwoWayLinkError() { // fn#73014, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9533:2614, offset: 0x01d5c6f9, size: 50 bytes, params: 1, frame: 14
return Module00005(_fun73016).apply(this, arguments);
function* _fun73016(a0, a1, a2) { // fn#73016, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9533:2697, offset: 0x01d5c736, size: 135 bytes, params: 4, frame: 14
if (true) {
value = environment.__proto__.__proto__;
var HTTP = env2_0(env2_2[4]).HTTP;
var post = HTTP.post;
var OAUTH2_DEVICE_FINISH = env2_7.OAUTH2_DEVICE_FINISH;
yield Reflect.apply(post, HTTP, [{url: OAUTH2_DEVICE_FINISH, body: {user_code: a0, result: 'two_way_link_error',
error_code: a1, error_source: a2}, rejectWithError: false}]);
}
}
}
function logoutWithRedirect({pathname, search}, a1) { // fn#73022, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9533:3568, offset: 0x01d5c814, size: 91 bytes, params: 3, frame: 16
const defaultImport = AuthenticationActionCreators;
const logout = defaultImport.logout;
let value = PathUtilsModule;
value = value.getLoginPath(pathname + search, false);
Reflect.apply(logout, defaultImport, [a1, value]);
}
}
global.__d(_fun72994, 9347, [5, 1379, 1934, 661, 507, 5076, 484,
2]) /* metro module 9347, dependencies: [5, 1379, 1934, 661, 507, 5076, 484, 2] */;
+27 -24
View File
@@ -1,8 +1,10 @@
/* Metro module 9348; source: modules/oauth2/convertor.tsx; dependencies: [483, 2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun73026(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#73026, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9534:6, offset: 0x01d5c86f, size: 99 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/oauth2/convertor.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/oauth2/convertor.tsx');
exports.convertOAuth2Authorization = function(a0) {
var r4;
var r0;
@@ -19,31 +21,32 @@ function _fun73026(global, require, importDefault, importAll, module, exports, d
}
return r0;
};
}
function convertOAuth2Authorization(a0) { // fn#73027, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9534:183, offset: 0x01d5c8d2, size: 69 bytes, params: 2, frame: 14
var r0;
var object;
let value = a0;
if (value.guilds == null) {
r0 = value;
} else {
object = {};
copyDataProperties(object, value, undefined);
value = value.guilds.map(_fun73028);
object['guilds'] = value;
r0 = object;
}
return r0;
function _fun73028(a0) { // fn#73028, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9534:278, offset: 0x01d5c917, size: 67 bytes, params: 2, frame: 14
const object = {};
copyDataProperties(object, a0, undefined);
let value = environment.__proto__;
value = Reflect.apply((importAll(483) /* metro dependency 483: BigFlagUtils */).deserialize, value,
[a0.permissions]);
object['permissions'] = value;
return object;
}
function convertOAuth2Authorization(a0) { // fn#73027, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9534:183, offset: 0x01d5c8d2, size: 69 bytes, params: 2, frame: 14
var r0;
var object2;
let value = a0;
if (value.guilds == null) {
r0 = value;
} else {
object2 = {};
copyDataProperties(object2, value, undefined);
value = value.guilds.map(_fun73028);
object2['guilds'] = value;
r0 = object2;
}
return r0;
}
function _fun73028(a0) { // fn#73028, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9534:278, offset: 0x01d5c917, size: 67 bytes, params: 2, frame: 14
const object2 = {};
copyDataProperties(object2, a0, undefined);
let value = environment.__proto__;
value = Reflect.apply((importAll(483) /* metro dependency 483: BigFlagUtils */).deserialize, value,
[a0.permissions]);
object2['permissions'] = value;
return object2;
}
global.__d(_fun73026, 9348, [483, 2]) /* metro module 9348, dependencies: [483, 2] */;
@@ -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
+130 -126
View File
@@ -1,350 +1,354 @@
/* Metro module 9350; source: modules/oauth2/permissions.tsx; dependencies: [661, 483, 1244, 2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
function _fun73030(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#73030, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9536:6, offset: 0x01d5c9c0, size: 2118 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const Permissions = (require(661) /* metro dependency 661: Constants */).Permissions;
const Permissions = (ConstantsModule).Permissions;
let ADMINISTRATOR = Permissions.ADMINISTRATOR;
items = [ADMINISTRATOR];
items2 = [ADMINISTRATOR];
let MANAGE_GUILD = Permissions.MANAGE_GUILD;
items[1] = MANAGE_GUILD;
items2[1] = MANAGE_GUILD;
let MANAGE_ROLES = Permissions.MANAGE_ROLES;
items[2] = MANAGE_ROLES;
items2[2] = MANAGE_ROLES;
let MANAGE_CHANNELS = Permissions.MANAGE_CHANNELS;
items[3] = MANAGE_CHANNELS;
items2[3] = MANAGE_CHANNELS;
let KICK_MEMBERS = Permissions.KICK_MEMBERS;
items[4] = KICK_MEMBERS;
items2[4] = KICK_MEMBERS;
let BAN_MEMBERS = Permissions.BAN_MEMBERS;
items[5] = BAN_MEMBERS;
items2[5] = BAN_MEMBERS;
let CREATE_INSTANT_INVITE = Permissions.CREATE_INSTANT_INVITE;
items[6] = CREATE_INSTANT_INVITE;
items2[6] = CREATE_INSTANT_INVITE;
let MANAGE_NICKNAMES = Permissions.MANAGE_NICKNAMES;
items[7] = MANAGE_NICKNAMES;
items2[7] = MANAGE_NICKNAMES;
let CHANGE_NICKNAME = Permissions.CHANGE_NICKNAME;
items[8] = CHANGE_NICKNAME;
items2[8] = CHANGE_NICKNAME;
let MANAGE_GUILD_EXPRESSIONS = Permissions.MANAGE_GUILD_EXPRESSIONS;
items[9] = MANAGE_GUILD_EXPRESSIONS;
items2[9] = MANAGE_GUILD_EXPRESSIONS;
let CREATE_GUILD_EXPRESSIONS = Permissions.CREATE_GUILD_EXPRESSIONS;
items[10] = CREATE_GUILD_EXPRESSIONS;
items2[10] = CREATE_GUILD_EXPRESSIONS;
let MANAGE_WEBHOOKS = Permissions.MANAGE_WEBHOOKS;
items[11] = MANAGE_WEBHOOKS;
items2[11] = MANAGE_WEBHOOKS;
let VIEW_AUDIT_LOG = Permissions.VIEW_AUDIT_LOG;
items[12] = VIEW_AUDIT_LOG;
items2[12] = VIEW_AUDIT_LOG;
let VIEW_CHANNEL = Permissions.VIEW_CHANNEL;
items[13] = VIEW_CHANNEL;
items2[13] = VIEW_CHANNEL;
let MANAGE_EVENTS = Permissions.MANAGE_EVENTS;
items[14] = MANAGE_EVENTS;
items2[14] = MANAGE_EVENTS;
let CREATE_EVENTS = Permissions.CREATE_EVENTS;
items[15] = CREATE_EVENTS;
items2[15] = CREATE_EVENTS;
let MODERATE_MEMBERS = Permissions.MODERATE_MEMBERS;
items[16] = MODERATE_MEMBERS;
items2[16] = MODERATE_MEMBERS;
let VIEW_GUILD_ANALYTICS = Permissions.VIEW_GUILD_ANALYTICS;
items[17] = VIEW_GUILD_ANALYTICS;
items2[17] = VIEW_GUILD_ANALYTICS;
let VIEW_CREATOR_MONETIZATION_ANALYTICS = Permissions.VIEW_CREATOR_MONETIZATION_ANALYTICS;
items[18] = VIEW_CREATOR_MONETIZATION_ANALYTICS;
items2[18] = VIEW_CREATOR_MONETIZATION_ANALYTICS;
let USE_EXTERNAL_APPS = Permissions.USE_EXTERNAL_APPS;
items[19] = USE_EXTERNAL_APPS;
items2[19] = USE_EXTERNAL_APPS;
let SEND_MESSAGES = Permissions.SEND_MESSAGES;
items[20] = SEND_MESSAGES;
items2[20] = SEND_MESSAGES;
let SEND_MESSAGES_IN_THREADS = Permissions.SEND_MESSAGES_IN_THREADS;
items[21] = SEND_MESSAGES_IN_THREADS;
items2[21] = SEND_MESSAGES_IN_THREADS;
let CREATE_PUBLIC_THREADS = Permissions.CREATE_PUBLIC_THREADS;
items[22] = CREATE_PUBLIC_THREADS;
items2[22] = CREATE_PUBLIC_THREADS;
let CREATE_PRIVATE_THREADS = Permissions.CREATE_PRIVATE_THREADS;
items[23] = CREATE_PRIVATE_THREADS;
items2[23] = CREATE_PRIVATE_THREADS;
let SEND_TTS_MESSAGES = Permissions.SEND_TTS_MESSAGES;
items[24] = SEND_TTS_MESSAGES;
items2[24] = SEND_TTS_MESSAGES;
let MANAGE_MESSAGES = Permissions.MANAGE_MESSAGES;
items[25] = MANAGE_MESSAGES;
items2[25] = MANAGE_MESSAGES;
let MANAGE_THREADS = Permissions.MANAGE_THREADS;
items[26] = MANAGE_THREADS;
items2[26] = MANAGE_THREADS;
let EMBED_LINKS = Permissions.EMBED_LINKS;
items[27] = EMBED_LINKS;
items2[27] = EMBED_LINKS;
let ATTACH_FILES = Permissions.ATTACH_FILES;
items[28] = ATTACH_FILES;
items2[28] = ATTACH_FILES;
let READ_MESSAGE_HISTORY = Permissions.READ_MESSAGE_HISTORY;
items[29] = READ_MESSAGE_HISTORY;
items2[29] = READ_MESSAGE_HISTORY;
let MENTION_EVERYONE = Permissions.MENTION_EVERYONE;
items[30] = MENTION_EVERYONE;
items2[30] = MENTION_EVERYONE;
let ADD_REACTIONS = Permissions.ADD_REACTIONS;
items[31] = ADD_REACTIONS;
items2[31] = ADD_REACTIONS;
let USE_EXTERNAL_EMOJIS = Permissions.USE_EXTERNAL_EMOJIS;
items[32] = USE_EXTERNAL_EMOJIS;
items2[32] = USE_EXTERNAL_EMOJIS;
let USE_EXTERNAL_STICKERS = Permissions.USE_EXTERNAL_STICKERS;
items[33] = USE_EXTERNAL_STICKERS;
items2[33] = USE_EXTERNAL_STICKERS;
let USE_APPLICATION_COMMANDS = Permissions.USE_APPLICATION_COMMANDS;
items[34] = USE_APPLICATION_COMMANDS;
items2[34] = USE_APPLICATION_COMMANDS;
let SEND_VOICE_MESSAGES = Permissions.SEND_VOICE_MESSAGES;
items[35] = SEND_VOICE_MESSAGES;
items2[35] = SEND_VOICE_MESSAGES;
let SEND_POLLS = Permissions.SEND_POLLS;
items[36] = SEND_POLLS;
items2[36] = SEND_POLLS;
let PIN_MESSAGES = Permissions.PIN_MESSAGES;
items[37] = PIN_MESSAGES;
items2[37] = PIN_MESSAGES;
let BYPASS_SLOWMODE = Permissions.BYPASS_SLOWMODE;
items[38] = BYPASS_SLOWMODE;
items2[38] = BYPASS_SLOWMODE;
let MANAGE_OFFICIAL_MESSAGES = Permissions.MANAGE_OFFICIAL_MESSAGES;
items[39] = MANAGE_OFFICIAL_MESSAGES;
items2[39] = MANAGE_OFFICIAL_MESSAGES;
let CONNECT = Permissions.CONNECT;
items[40] = CONNECT;
items2[40] = CONNECT;
let SPEAK = Permissions.SPEAK;
items[41] = SPEAK;
items2[41] = SPEAK;
let MUTE_MEMBERS = Permissions.MUTE_MEMBERS;
items[42] = MUTE_MEMBERS;
items2[42] = MUTE_MEMBERS;
let DEAFEN_MEMBERS = Permissions.DEAFEN_MEMBERS;
items[43] = DEAFEN_MEMBERS;
items2[43] = DEAFEN_MEMBERS;
let MOVE_MEMBERS = Permissions.MOVE_MEMBERS;
items[44] = MOVE_MEMBERS;
items2[44] = MOVE_MEMBERS;
let USE_VAD = Permissions.USE_VAD;
items[45] = USE_VAD;
items2[45] = USE_VAD;
let PRIORITY_SPEAKER = Permissions.PRIORITY_SPEAKER;
items[46] = PRIORITY_SPEAKER;
items2[46] = PRIORITY_SPEAKER;
let REQUEST_TO_SPEAK = Permissions.REQUEST_TO_SPEAK;
items[47] = REQUEST_TO_SPEAK;
items2[47] = REQUEST_TO_SPEAK;
let STREAM = Permissions.STREAM;
items[48] = STREAM;
items2[48] = STREAM;
let USE_EMBEDDED_ACTIVITIES = Permissions.USE_EMBEDDED_ACTIVITIES;
items[49] = USE_EMBEDDED_ACTIVITIES;
items2[49] = USE_EMBEDDED_ACTIVITIES;
let USE_SOUNDBOARD = Permissions.USE_SOUNDBOARD;
items[50] = USE_SOUNDBOARD;
items2[50] = USE_SOUNDBOARD;
let USE_EXTERNAL_SOUNDS = Permissions.USE_EXTERNAL_SOUNDS;
items[51] = USE_EXTERNAL_SOUNDS;
items2[51] = USE_EXTERNAL_SOUNDS;
let SET_VOICE_CHANNEL_STATUS = Permissions.SET_VOICE_CHANNEL_STATUS;
items[52] = SET_VOICE_CHANNEL_STATUS;
const object3 = {};
items2[52] = SET_VOICE_CHANNEL_STATUS;
const object = {};
ADMINISTRATOR = Permissions.ADMINISTRATOR;
object3[ADMINISTRATOR.toString()] = function() {
object[ADMINISTRATOR.toString()] = function() {
return require(dependencyMap[2]).intl.string(require(dependencyMap[2]).t.PGvZqX);
};
MANAGE_GUILD = Permissions.MANAGE_GUILD;
object3[MANAGE_GUILD.toString()] = function() {
object[MANAGE_GUILD.toString()] = function() {
return require(dependencyMap[2]).intl.string(require(dependencyMap[2]).t.QZRcfO);
};
MANAGE_ROLES = Permissions.MANAGE_ROLES;
object3[MANAGE_ROLES.toString()] = function() {
object[MANAGE_ROLES.toString()] = function() {
return require(dependencyMap[2]).intl.string(require(dependencyMap[2]).t['C8d+oG']);
};
MANAGE_CHANNELS = Permissions.MANAGE_CHANNELS;
object3[MANAGE_CHANNELS.toString()] = function() {
object[MANAGE_CHANNELS.toString()] = function() {
return require(dependencyMap[2]).intl.string(require(dependencyMap[2]).t['9qLtWs']);
};
KICK_MEMBERS = Permissions.KICK_MEMBERS;
object3[KICK_MEMBERS.toString()] = function() {
object[KICK_MEMBERS.toString()] = function() {
return require(dependencyMap[2]).intl.string(require(dependencyMap[2]).t.pBNv6i);
};
BAN_MEMBERS = Permissions.BAN_MEMBERS;
object3[BAN_MEMBERS.toString()] = function() {
object[BAN_MEMBERS.toString()] = function() {
return require(dependencyMap[2]).intl.string(require(dependencyMap[2]).t.oTBA7N);
};
CREATE_INSTANT_INVITE = Permissions.CREATE_INSTANT_INVITE;
object3[CREATE_INSTANT_INVITE.toString()] = function() {
object[CREATE_INSTANT_INVITE.toString()] = function() {
return require(dependencyMap[2]).intl.string(require(dependencyMap[2]).t.zJrgTG);
};
MANAGE_NICKNAMES = Permissions.MANAGE_NICKNAMES;
object3[MANAGE_NICKNAMES.toString()] = function() {
object[MANAGE_NICKNAMES.toString()] = function() {
return require(dependencyMap[2]).intl.string(require(dependencyMap[2]).t['t+Ct5x']);
};
CHANGE_NICKNAME = Permissions.CHANGE_NICKNAME;
object3[CHANGE_NICKNAME.toString()] = function() {
object[CHANGE_NICKNAME.toString()] = function() {
return require(dependencyMap[2]).intl.string(require(dependencyMap[2]).t.dilOF6);
};
MANAGE_GUILD_EXPRESSIONS = Permissions.MANAGE_GUILD_EXPRESSIONS;
object3[MANAGE_GUILD_EXPRESSIONS.toString()] = function() {
object[MANAGE_GUILD_EXPRESSIONS.toString()] = function() {
return require(dependencyMap[2]).intl.string(require(dependencyMap[2]).t.bbuXIn);
};
CREATE_GUILD_EXPRESSIONS = Permissions.CREATE_GUILD_EXPRESSIONS;
object3[CREATE_GUILD_EXPRESSIONS.toString()] = function() {
object[CREATE_GUILD_EXPRESSIONS.toString()] = function() {
return require(dependencyMap[2]).intl.string(require(dependencyMap[2]).t.HarVuP);
};
MANAGE_WEBHOOKS = Permissions.MANAGE_WEBHOOKS;
object3[MANAGE_WEBHOOKS.toString()] = function() {
object[MANAGE_WEBHOOKS.toString()] = function() {
return require(dependencyMap[2]).intl.string(require(dependencyMap[2]).t['/ADKmM']);
};
VIEW_AUDIT_LOG = Permissions.VIEW_AUDIT_LOG;
object3[VIEW_AUDIT_LOG.toString()] = function() {
object[VIEW_AUDIT_LOG.toString()] = function() {
return require(dependencyMap[2]).intl.string(require(dependencyMap[2]).t.fZgLpA);
};
VIEW_CHANNEL = Permissions.VIEW_CHANNEL;
object3[VIEW_CHANNEL.toString()] = function() {
object[VIEW_CHANNEL.toString()] = function() {
return require(dependencyMap[2]).intl.string(require(dependencyMap[2]).t.uV83yi);
};
SEND_MESSAGES = Permissions.SEND_MESSAGES;
object3[SEND_MESSAGES.toString()] = function() {
object[SEND_MESSAGES.toString()] = function() {
return require(dependencyMap[2]).intl.string(require(dependencyMap[2]).t.T32rkC);
};
SEND_TTS_MESSAGES = Permissions.SEND_TTS_MESSAGES;
object3[SEND_TTS_MESSAGES.toString()] = function() {
object[SEND_TTS_MESSAGES.toString()] = function() {
return require(dependencyMap[2]).intl.string(require(dependencyMap[2]).t.Mg7bku);
};
MANAGE_MESSAGES = Permissions.MANAGE_MESSAGES;
object3[MANAGE_MESSAGES.toString()] = function() {
object[MANAGE_MESSAGES.toString()] = function() {
return require(dependencyMap[2]).intl.string(require(dependencyMap[2]).t['6lU9xM']);
};
EMBED_LINKS = Permissions.EMBED_LINKS;
object3[EMBED_LINKS.toString()] = function() {
object[EMBED_LINKS.toString()] = function() {
return require(dependencyMap[2]).intl.string(require(dependencyMap[2]).t['969dEL']);
};
ATTACH_FILES = Permissions.ATTACH_FILES;
object3[ATTACH_FILES.toString()] = function() {
object[ATTACH_FILES.toString()] = function() {
return require(dependencyMap[2]).intl.string(require(dependencyMap[2]).t['3AS4UM']);
};
READ_MESSAGE_HISTORY = Permissions.READ_MESSAGE_HISTORY;
object3[READ_MESSAGE_HISTORY.toString()] = function() {
object[READ_MESSAGE_HISTORY.toString()] = function() {
return require(dependencyMap[2]).intl.string(require(dependencyMap[2]).t.l9ufaR);
};
MENTION_EVERYONE = Permissions.MENTION_EVERYONE;
object3[MENTION_EVERYONE.toString()] = function() {
object[MENTION_EVERYONE.toString()] = function() {
return require(dependencyMap[2]).intl.string(require(dependencyMap[2]).t.Y78KGC);
};
ADD_REACTIONS = Permissions.ADD_REACTIONS;
object3[ADD_REACTIONS.toString()] = function() {
object[ADD_REACTIONS.toString()] = function() {
return require(dependencyMap[2]).intl.string(require(dependencyMap[2]).t.yEoJAr);
};
USE_EXTERNAL_EMOJIS = Permissions.USE_EXTERNAL_EMOJIS;
object3[USE_EXTERNAL_EMOJIS.toString()] = function() {
object[USE_EXTERNAL_EMOJIS.toString()] = function() {
return require(dependencyMap[2]).intl.string(require(dependencyMap[2]).t.BpBGZU);
};
USE_EXTERNAL_STICKERS = Permissions.USE_EXTERNAL_STICKERS;
object3[USE_EXTERNAL_STICKERS.toString()] = function() {
object[USE_EXTERNAL_STICKERS.toString()] = function() {
return require(dependencyMap[2]).intl.string(require(dependencyMap[2]).t['UeRs+b']);
};
USE_APPLICATION_COMMANDS = Permissions.USE_APPLICATION_COMMANDS;
object3[USE_APPLICATION_COMMANDS.toString()] = function() {
object[USE_APPLICATION_COMMANDS.toString()] = function() {
return require(dependencyMap[2]).intl.string(require(dependencyMap[2]).t.shbR1a);
};
SEND_VOICE_MESSAGES = Permissions.SEND_VOICE_MESSAGES;
object3[SEND_VOICE_MESSAGES.toString()] = function() {
object[SEND_VOICE_MESSAGES.toString()] = function() {
return require(dependencyMap[2]).intl.string(require(dependencyMap[2]).t['+8GStU']);
};
CONNECT = Permissions.CONNECT;
object3[CONNECT.toString()] = function() {
object[CONNECT.toString()] = function() {
return require(dependencyMap[2]).intl.string(require(dependencyMap[2]).t.S0W8Z5);
};
SPEAK = Permissions.SPEAK;
object3[SPEAK.toString()] = function() {
object[SPEAK.toString()] = function() {
return require(dependencyMap[2]).intl.string(require(dependencyMap[2]).t['8w1tIR']);
};
MUTE_MEMBERS = Permissions.MUTE_MEMBERS;
object3[MUTE_MEMBERS.toString()] = function() {
object[MUTE_MEMBERS.toString()] = function() {
return require(dependencyMap[2]).intl.string(require(dependencyMap[2]).t['8EI30/']);
};
DEAFEN_MEMBERS = Permissions.DEAFEN_MEMBERS;
object3[DEAFEN_MEMBERS.toString()] = function() {
object[DEAFEN_MEMBERS.toString()] = function() {
return require(dependencyMap[2]).intl.string(require(dependencyMap[2]).t['9L47Fr']);
};
MOVE_MEMBERS = Permissions.MOVE_MEMBERS;
object3[MOVE_MEMBERS.toString()] = function() {
object[MOVE_MEMBERS.toString()] = function() {
return require(dependencyMap[2]).intl.string(require(dependencyMap[2]).t.YtjJPQ);
};
USE_VAD = Permissions.USE_VAD;
object3[USE_VAD.toString()] = function() {
object[USE_VAD.toString()] = function() {
return require(dependencyMap[2]).intl.string(require(dependencyMap[2]).t['08zAV7']);
};
PRIORITY_SPEAKER = Permissions.PRIORITY_SPEAKER;
object3[PRIORITY_SPEAKER.toString()] = function() {
object[PRIORITY_SPEAKER.toString()] = function() {
return require(dependencyMap[2]).intl.string(require(dependencyMap[2]).t.BVK71i);
};
CREATE_PUBLIC_THREADS = Permissions.CREATE_PUBLIC_THREADS;
object3[CREATE_PUBLIC_THREADS.toString()] = function() {
object[CREATE_PUBLIC_THREADS.toString()] = function() {
return require(dependencyMap[2]).intl.string(require(dependencyMap[2]).t['25rKnX']);
};
CREATE_PRIVATE_THREADS = Permissions.CREATE_PRIVATE_THREADS;
object3[CREATE_PRIVATE_THREADS.toString()] = function() {
object[CREATE_PRIVATE_THREADS.toString()] = function() {
return require(dependencyMap[2]).intl.string(require(dependencyMap[2]).t.QwbTSa);
};
SEND_MESSAGES_IN_THREADS = Permissions.SEND_MESSAGES_IN_THREADS;
object3[SEND_MESSAGES_IN_THREADS.toString()] = function() {
object[SEND_MESSAGES_IN_THREADS.toString()] = function() {
return require(dependencyMap[2]).intl.string(require(dependencyMap[2]).t.fTE74g);
};
MANAGE_THREADS = Permissions.MANAGE_THREADS;
object3[MANAGE_THREADS.toString()] = function() {
object[MANAGE_THREADS.toString()] = function() {
return require(dependencyMap[2]).intl.string(require(dependencyMap[2]).t.kEqgr7);
};
MANAGE_EVENTS = Permissions.MANAGE_EVENTS;
object3[MANAGE_EVENTS.toString()] = function() {
object[MANAGE_EVENTS.toString()] = function() {
return require(dependencyMap[2]).intl.string(require(dependencyMap[2]).t.HIgA5a);
};
CREATE_EVENTS = Permissions.CREATE_EVENTS;
object3[CREATE_EVENTS.toString()] = function() {
object[CREATE_EVENTS.toString()] = function() {
return require(dependencyMap[2]).intl.string(require(dependencyMap[2]).t.qyjZua);
};
MODERATE_MEMBERS = Permissions.MODERATE_MEMBERS;
object3[MODERATE_MEMBERS.toString()] = function() {
object[MODERATE_MEMBERS.toString()] = function() {
return require(dependencyMap[2]).intl.string(require(dependencyMap[2]).t['7DgVBr']);
};
REQUEST_TO_SPEAK = Permissions.REQUEST_TO_SPEAK;
object3[REQUEST_TO_SPEAK.toString()] = function() {
object[REQUEST_TO_SPEAK.toString()] = function() {
return require(dependencyMap[2]).intl.string(require(dependencyMap[2]).t['5kicT2']);
};
VIEW_GUILD_ANALYTICS = Permissions.VIEW_GUILD_ANALYTICS;
object3[VIEW_GUILD_ANALYTICS.toString()] = function() {
object[VIEW_GUILD_ANALYTICS.toString()] = function() {
return require(dependencyMap[2]).intl.string(require(dependencyMap[2]).t['rQJBE/']);
};
VIEW_CREATOR_MONETIZATION_ANALYTICS = Permissions.VIEW_CREATOR_MONETIZATION_ANALYTICS;
object3[VIEW_CREATOR_MONETIZATION_ANALYTICS.toString()] = function() {
object[VIEW_CREATOR_MONETIZATION_ANALYTICS.toString()] = function() {
return require(dependencyMap[2]).intl.string(require(dependencyMap[2]).t['0lTLTv']);
};
STREAM = Permissions.STREAM;
object3[STREAM.toString()] = function() {
object[STREAM.toString()] = function() {
return require(dependencyMap[2]).intl.string(require(dependencyMap[2]).t.FlNoSV);
};
USE_EMBEDDED_ACTIVITIES = Permissions.USE_EMBEDDED_ACTIVITIES;
object3[USE_EMBEDDED_ACTIVITIES.toString()] = function() {
object[USE_EMBEDDED_ACTIVITIES.toString()] = function() {
return require(dependencyMap[2]).intl.string(require(dependencyMap[2]).t.rLSGeh);
};
USE_SOUNDBOARD = Permissions.USE_SOUNDBOARD;
object3[USE_SOUNDBOARD.toString()] = function() {
object[USE_SOUNDBOARD.toString()] = function() {
return require(dependencyMap[2]).intl.string(require(dependencyMap[2]).t.Bco7NG);
};
USE_EXTERNAL_SOUNDS = Permissions.USE_EXTERNAL_SOUNDS;
object3[USE_EXTERNAL_SOUNDS.toString()] = function() {
object[USE_EXTERNAL_SOUNDS.toString()] = function() {
return require(dependencyMap[2]).intl.string(require(dependencyMap[2]).t.pwaVJ6);
};
SET_VOICE_CHANNEL_STATUS = Permissions.SET_VOICE_CHANNEL_STATUS;
object3[SET_VOICE_CHANNEL_STATUS.toString()] = function() {
object[SET_VOICE_CHANNEL_STATUS.toString()] = function() {
return require(dependencyMap[2]).intl.string(require(dependencyMap[2]).t.VBwkUf);
};
SEND_POLLS = Permissions.SEND_POLLS;
object3[SEND_POLLS.toString()] = function() {
object[SEND_POLLS.toString()] = function() {
return require(dependencyMap[2]).intl.string(require(dependencyMap[2]).t.UMQ7Ww);
};
USE_EXTERNAL_APPS = Permissions.USE_EXTERNAL_APPS;
object3[USE_EXTERNAL_APPS.toString()] = function() {
object[USE_EXTERNAL_APPS.toString()] = function() {
return require(dependencyMap[2]).intl.string(require(dependencyMap[2]).t.TtA5rK);
};
PIN_MESSAGES = Permissions.PIN_MESSAGES;
object3[PIN_MESSAGES.toString()] = function() {
object[PIN_MESSAGES.toString()] = function() {
return require(dependencyMap[2]).intl.string(require(dependencyMap[2]).t.Y5BI39);
};
BYPASS_SLOWMODE = Permissions.BYPASS_SLOWMODE;
object3[BYPASS_SLOWMODE.toString()] = function() {
object[BYPASS_SLOWMODE.toString()] = function() {
return require(dependencyMap[2]).intl.string(require(dependencyMap[2]).t.kqcjeV);
};
MANAGE_OFFICIAL_MESSAGES = Permissions.MANAGE_OFFICIAL_MESSAGES;
object3[MANAGE_OFFICIAL_MESSAGES.toString()] = function() {
object[MANAGE_OFFICIAL_MESSAGES.toString()] = function() {
return require(dependencyMap[2]).intl.string(require(dependencyMap[2]).t.Aj9ruN);
};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/oauth2/permissions.tsx');
exports.OrderedPermissions = items;
(FileImportTrackerModule).fileFinishedImporting('modules/oauth2/permissions.tsx');
exports.OrderedPermissions = items2;
exports.containsDisallowedPermission = containsDisallowedPermission;
exports.getPermissionName = getPermissionName;
}
function containsDisallowedPermission(a0) { // fn#73084, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9536:5229, offset: 0x01d5dede, size: 54 bytes, params: 2, frame: 12
const env0_0 = a0;
const Object = global.Object;
return Object.values(Permissions).some(_fun73085);
function _fun73085(a0) { // fn#73085, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9536:5300, offset: 0x01d5df14, size: 68 bytes, params: 2, frame: 14
const value = environment.__proto__;
return (importAll(483) /* metro dependency 483: BigFlagUtils */).has(env0_0, a0) && !env1_4.includes(a0);
}
function containsDisallowedPermission(a0) { // fn#73084, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9536:5229, offset: 0x01d5dede, size: 54 bytes, params: 2, frame: 12
const env0_0 = a0;
const Object = global.Object;
return Object.values(Permissions).some(_fun73085);
}
function getPermissionName(a0) { // fn#73086, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9536:5359, offset: 0x01d5df58, size: 89 bytes, params: 2, frame: 12
const property = env0_5[a0.toString()];
if (property == null) {
throw new global.Error('Unknown permission. Did you provide a _single_ bit flag? Perm: ' + a0);
}
return property();
}
function _fun73085(a0) { // fn#73085, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9536:5300, offset: 0x01d5df14, size: 68 bytes, params: 2, frame: 14
const value = environment.__proto__;
return (importAll(483) /* metro dependency 483: BigFlagUtils */).has(env0_0, a0) && !env1_4.includes(a0);
function getPermissionName(a0) { // fn#73086, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9536:5359, offset: 0x01d5df58, size: 89 bytes, params: 2, frame: 12
const property = env0_5[a0.toString()];
if (property == null) {
throw new global.Error('Unknown permission. Did you provide a _single_ bit flag? Perm: ' + a0);
}
return property();
}
}
global.__d(_fun73030, 9350, [661, 483, 1244, 2]) /* metro module 9350, dependencies: [661, 483, 1244, 2] */;
+240 -235
View File
@@ -1,9 +1,13 @@
/* Metro module 4121; source: modules/oauth2/scopes.tsx; dependencies: [1244, 4122, 2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as IndexNativeModule from '../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as OAuth2ScopesModule from '../../external/discord_common/js/shared/shared-constants/OAuth2Scopes.tsx'; /* Metro dependency 4122 */
function _fun34205(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#34205, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4286:6, offset: 0x0104d16c, size: 1447 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const OAuth2Scopes = (require(4122) /* metro dependency 4122: OAuth2Scopes */).OAuth2Scopes;
const OAuth2Scopes = (OAuth2ScopesModule).OAuth2Scopes;
let BOT = OAuth2Scopes.BOT;
const items2 = [BOT];
const OPENID = OAuth2Scopes.OPENID;
@@ -100,7 +104,7 @@ function _fun34205(global, require, importDefault, importAll, module, exports, d
const WEBHOOK_INCOMING = OAuth2Scopes.WEBHOOK_INCOMING;
BOT = OAuth2Scopes.BOT;
const value = Reflect.apply(concat, items2, [[WEBHOOK_INCOMING, BOT]]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/oauth2/scopes.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/oauth2/scopes.tsx');
exports.FAKE_SCOPES = [function() {
return require(dependencyMap[0]).intl.string(require(dependencyMap[0]).t['6xfSCq']);
}, function() {
@@ -124,243 +128,244 @@ function _fun34205(global, require, importDefault, importAll, module, exports, d
exports.getScopeNames = getScopeNames;
exports.isSocialLayerUmbrellaScope = isSocialLayerUmbrellaScope;
exports.getSecurityMessage = getSecurityMessage;
}
function getScopeNames(a0, a1) { // fn#34214, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4286:2526, offset: 0x0104d90b, size: 5309 bytes, params: 3, frame: 19
var items2;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var value4;
const OAuth2Scopes = (require(4122) /* metro dependency 4122: OAuth2Scopes */).OAuth2Scopes;
const IDENTIFY = OAuth2Scopes.IDENTIFY;
if (IDENTIFY === a0) {
return [intl.string(t.DD9KQh)];
}
const IDENTIFY_PREMIUM = OAuth2Scopes.IDENTIFY_PREMIUM;
if (IDENTIFY_PREMIUM === a0) {
return [intl.string(t.xhQsxx)];
}
const OPENID = OAuth2Scopes.OPENID;
if (OPENID === a0) {
return [intl.string(t.R5IKv1)];
}
const EMAIL = OAuth2Scopes.EMAIL;
if (EMAIL === a0) {
return [intl.string(t.rvFS2t)];
}
const BOT = OAuth2Scopes.BOT;
if (BOT === a0) {
return [intl.string(t.pRpdox)];
}
const CONNECTIONS = OAuth2Scopes.CONNECTIONS;
if (CONNECTIONS === a0) {
return [intl.string(t['1AwaU1'])];
}
const MESSAGES_READ = OAuth2Scopes.MESSAGES_READ;
if (MESSAGES_READ === a0) {
return [intl.string(t.jVXrHb)];
}
const GUILDS = OAuth2Scopes.GUILDS;
if (GUILDS === a0) {
return [intl.string(t.QKGJkC)];
}
const GUILDS_JOIN = OAuth2Scopes.GUILDS_JOIN;
if (GUILDS_JOIN === a0) {
return [intl.string(t.ETGDR9)];
}
const GUILDS_MEMBERS_READ = OAuth2Scopes.GUILDS_MEMBERS_READ;
if (GUILDS_MEMBERS_READ === a0) {
value4 = a1.includes(OAuth2Scopes.VOICE);
string = intl.string;
return value4 ? [Reflect.apply(string, intl, [t.OSvmfH])] : [Reflect.apply(string, intl, [t.o6M1aS])];
}
const GUILDS_CHANNELS_READ = OAuth2Scopes.GUILDS_CHANNELS_READ;
if (GUILDS_CHANNELS_READ === a0) {
return [intl.string(t.BWGAgt)];
}
const GDM_JOIN = OAuth2Scopes.GDM_JOIN;
if (GDM_JOIN === a0) {
return [intl.string(t['55B4wA'])];
}
const RPC = OAuth2Scopes.RPC;
if (RPC === a0) {
return [intl.string(t.EDBEeK)];
}
const RPC_NOTIFICATIONS_READ = OAuth2Scopes.RPC_NOTIFICATIONS_READ;
if (RPC_NOTIFICATIONS_READ === a0) {
return [intl.string(t['6kDHWV'])];
}
const RPC_VOICE_WRITE = OAuth2Scopes.RPC_VOICE_WRITE;
if (RPC_VOICE_WRITE === a0) {
return [intl.string(t['531s7c'])];
}
const RPC_VIDEO_READ = OAuth2Scopes.RPC_VIDEO_READ;
if (RPC_VIDEO_READ === a0) {
return [intl.string(t.zbUSWO)];
}
const RPC_VIDEO_WRITE = OAuth2Scopes.RPC_VIDEO_WRITE;
if (RPC_VIDEO_WRITE === a0) {
return [intl.string(t['y+MdAM'])];
}
const RPC_SCREENSHARE_READ = OAuth2Scopes.RPC_SCREENSHARE_READ;
if (RPC_SCREENSHARE_READ === a0) {
return [intl.string(t.b0i0CO)];
}
const RPC_SCREENSHARE_WRITE = OAuth2Scopes.RPC_SCREENSHARE_WRITE;
if (RPC_SCREENSHARE_WRITE === a0) {
return [intl.string(t['9Rmxux'])];
}
const RPC_VOICE_READ = OAuth2Scopes.RPC_VOICE_READ;
if (RPC_VOICE_READ === a0) {
return [intl.string(t.rznmpz)];
}
const RPC_ACTIVITIES_WRITE = OAuth2Scopes.RPC_ACTIVITIES_WRITE;
if (RPC_ACTIVITIES_WRITE === a0) {
return [intl.string(t.KQwJDf)];
}
const APPLICATIONS_BUILDS_UPLOAD = OAuth2Scopes.APPLICATIONS_BUILDS_UPLOAD;
if (APPLICATIONS_BUILDS_UPLOAD === a0) {
return [intl.string(t.Iwbtgk)];
}
const APPLICATIONS_BUILDS_READ = OAuth2Scopes.APPLICATIONS_BUILDS_READ;
if (APPLICATIONS_BUILDS_READ === a0) {
return [intl.string(t.ZkZCCW)];
}
const APPLICATIONS_COMMANDS = OAuth2Scopes.APPLICATIONS_COMMANDS;
if (APPLICATIONS_COMMANDS === a0) {
return [intl.string(t.H4q49X)];
}
const APPLICATIONS_COMMANDS_UPDATE = OAuth2Scopes.APPLICATIONS_COMMANDS_UPDATE;
if (APPLICATIONS_COMMANDS_UPDATE === a0) {
return [intl.string(t.mxeq6u)];
}
const APPLICATIONS_COMMANDS_PERMISSIONS_UPDATE = OAuth2Scopes.APPLICATIONS_COMMANDS_PERMISSIONS_UPDATE;
if (APPLICATIONS_COMMANDS_PERMISSIONS_UPDATE === a0) {
return [intl.string(t['7SIoW7'])];
}
const APPLICATIONS_STORE_UPDATE = OAuth2Scopes.APPLICATIONS_STORE_UPDATE;
if (APPLICATIONS_STORE_UPDATE === a0) {
return [intl.string(t['Rba/Xn'])];
}
const APPLICATIONS_ENTITLEMENTS = OAuth2Scopes.APPLICATIONS_ENTITLEMENTS;
if (APPLICATIONS_ENTITLEMENTS === a0) {
return [intl.string(t.xeNgGI)];
}
const ACTIVITIES_READ = OAuth2Scopes.ACTIVITIES_READ;
if (ACTIVITIES_READ === a0) {
return [intl.string(t['4+tSce'])];
}
const ACTIVITIES_WRITE = OAuth2Scopes.ACTIVITIES_WRITE;
if (ACTIVITIES_WRITE === a0) {
return [intl.string(t['6OsWXX'])];
}
const RELATIONSHIPS_READ = OAuth2Scopes.RELATIONSHIPS_READ;
if (RELATIONSHIPS_READ === a0) {
return [intl.string(t['521/7W'])];
}
const RELATIONSHIPS_WRITE = OAuth2Scopes.RELATIONSHIPS_WRITE;
if (RELATIONSHIPS_WRITE === a0) {
return [intl.string(t['qR/txQ'])];
}
const VOICE = OAuth2Scopes.VOICE;
if (VOICE === a0) {
return [intl.string(t.XK5zdO)];
}
const DM_CHANNELS_READ = OAuth2Scopes.DM_CHANNELS_READ;
if (DM_CHANNELS_READ === a0) {
return [intl.string(t.w8emlT)];
}
const ROLE_CONNECTIONS_WRITE = OAuth2Scopes.ROLE_CONNECTIONS_WRITE;
if (ROLE_CONNECTIONS_WRITE === a0) {
return [intl.string(t.Bv0wZj)];
}
const PRESENCES_READ = OAuth2Scopes.PRESENCES_READ;
if (PRESENCES_READ === a0) {
return [intl.string(t.JUWeyf)];
}
const PRESENCES_WRITE = OAuth2Scopes.PRESENCES_WRITE;
if (PRESENCES_WRITE === a0) {
return [intl.string(t.apHLwv)];
}
const DM_CHANNELS_MESSAGES_READ = OAuth2Scopes.DM_CHANNELS_MESSAGES_READ;
if (DM_CHANNELS_MESSAGES_READ === a0) {
return [intl.string(t.FHeB8p)];
}
const DM_CHANNELS_MESSAGES_WRITE = OAuth2Scopes.DM_CHANNELS_MESSAGES_WRITE;
if (DM_CHANNELS_MESSAGES_WRITE === a0) {
return [intl.string(t['mdh+xY'])];
}
const GATEWAY_CONNECT = OAuth2Scopes.GATEWAY_CONNECT;
if (GATEWAY_CONNECT === a0) {
return [intl.string(t['uJd+85'])];
}
const PAYMENT_SOURCES_COUNTRY_CODE = OAuth2Scopes.PAYMENT_SOURCES_COUNTRY_CODE;
if (PAYMENT_SOURCES_COUNTRY_CODE === a0) {
return [intl.string(t.hycwLK)];
}
const ACTIVITIES_INVITES_WRITE = OAuth2Scopes.ACTIVITIES_INVITES_WRITE;
if (ACTIVITIES_INVITES_WRITE === a0) {
return [intl.string(t.IM4Cje)];
}
const APPLICATION_IDENTITIES_WRITE = OAuth2Scopes.APPLICATION_IDENTITIES_WRITE;
if (APPLICATION_IDENTITIES_WRITE === a0) {
return [intl.string(t['1zioRF'])];
}
const MANAGED_PLATFORM_APPLICATION_IDENTITIES_WRITE = OAuth2Scopes.MANAGED_PLATFORM_APPLICATION_IDENTITIES_WRITE;
if (MANAGED_PLATFORM_APPLICATION_IDENTITIES_WRITE === a0) {
return [intl.string(t['4l1DWw'])];
}
const SDK_SOCIAL_LAYER_PRESENCE = OAuth2Scopes.SDK_SOCIAL_LAYER_PRESENCE;
if (SDK_SOCIAL_LAYER_PRESENCE === a0) {
string = intl.string;
items2 = [Reflect.apply(string, intl, [t.Pl1dTW])];
string = intl.string;
items2[1] = Reflect.apply(string, intl, [t.mPRcyT]);
string = intl.string;
items2[2] = Reflect.apply(string, intl, [t.F7J4NE]);
string = intl.string;
items2[3] = Reflect.apply(string, intl, [t.syJLx9]);
if (!a1.includes(OAuth2Scopes.APPLICATION_IDENTITIES_WRITE)) {
items2.push(intl.string(t['1zioRF']));
function getScopeNames(a0, a1) { // fn#34214, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4286:2526, offset: 0x0104d90b, size: 5309 bytes, params: 3, frame: 19
var items2;
const intl = (IndexNativeModule).intl;
var string;
const t = (IndexNativeModule).t;
var value4;
const OAuth2Scopes = (OAuth2ScopesModule).OAuth2Scopes;
const IDENTIFY = OAuth2Scopes.IDENTIFY;
if (IDENTIFY === a0) {
return [intl.string(t.DD9KQh)];
}
return items2;
}
const SDK_SOCIAL_LAYER = OAuth2Scopes.SDK_SOCIAL_LAYER;
if (SDK_SOCIAL_LAYER === a0) {
string = intl.string;
items2 = [Reflect.apply(string, intl, [t.Pl1dTW])];
string = intl.string;
items2[1] = Reflect.apply(string, intl, [t['hc/+yg']]);
string = intl.string;
items2[2] = Reflect.apply(string, intl, [t.mPRcyT]);
string = intl.string;
items2[3] = Reflect.apply(string, intl, [t.F7J4NE]);
string = intl.string;
items2[4] = Reflect.apply(string, intl, [t['2wxXX9']]);
if (!a1.includes(OAuth2Scopes.APPLICATION_IDENTITIES_WRITE)) {
items2.push(intl.string(t['1zioRF']));
const IDENTIFY_PREMIUM = OAuth2Scopes.IDENTIFY_PREMIUM;
if (IDENTIFY_PREMIUM === a0) {
return [intl.string(t.xhQsxx)];
}
return items2;
const OPENID = OAuth2Scopes.OPENID;
if (OPENID === a0) {
return [intl.string(t.R5IKv1)];
}
const EMAIL = OAuth2Scopes.EMAIL;
if (EMAIL === a0) {
return [intl.string(t.rvFS2t)];
}
const BOT = OAuth2Scopes.BOT;
if (BOT === a0) {
return [intl.string(t.pRpdox)];
}
const CONNECTIONS = OAuth2Scopes.CONNECTIONS;
if (CONNECTIONS === a0) {
return [intl.string(t['1AwaU1'])];
}
const MESSAGES_READ = OAuth2Scopes.MESSAGES_READ;
if (MESSAGES_READ === a0) {
return [intl.string(t.jVXrHb)];
}
const GUILDS = OAuth2Scopes.GUILDS;
if (GUILDS === a0) {
return [intl.string(t.QKGJkC)];
}
const GUILDS_JOIN = OAuth2Scopes.GUILDS_JOIN;
if (GUILDS_JOIN === a0) {
return [intl.string(t.ETGDR9)];
}
const GUILDS_MEMBERS_READ = OAuth2Scopes.GUILDS_MEMBERS_READ;
if (GUILDS_MEMBERS_READ === a0) {
value4 = a1.includes(OAuth2Scopes.VOICE);
string = intl.string;
return value4 ? [Reflect.apply(string, intl, [t.OSvmfH])] : [Reflect.apply(string, intl, [t.o6M1aS])];
}
const GUILDS_CHANNELS_READ = OAuth2Scopes.GUILDS_CHANNELS_READ;
if (GUILDS_CHANNELS_READ === a0) {
return [intl.string(t.BWGAgt)];
}
const GDM_JOIN = OAuth2Scopes.GDM_JOIN;
if (GDM_JOIN === a0) {
return [intl.string(t['55B4wA'])];
}
const RPC = OAuth2Scopes.RPC;
if (RPC === a0) {
return [intl.string(t.EDBEeK)];
}
const RPC_NOTIFICATIONS_READ = OAuth2Scopes.RPC_NOTIFICATIONS_READ;
if (RPC_NOTIFICATIONS_READ === a0) {
return [intl.string(t['6kDHWV'])];
}
const RPC_VOICE_WRITE = OAuth2Scopes.RPC_VOICE_WRITE;
if (RPC_VOICE_WRITE === a0) {
return [intl.string(t['531s7c'])];
}
const RPC_VIDEO_READ = OAuth2Scopes.RPC_VIDEO_READ;
if (RPC_VIDEO_READ === a0) {
return [intl.string(t.zbUSWO)];
}
const RPC_VIDEO_WRITE = OAuth2Scopes.RPC_VIDEO_WRITE;
if (RPC_VIDEO_WRITE === a0) {
return [intl.string(t['y+MdAM'])];
}
const RPC_SCREENSHARE_READ = OAuth2Scopes.RPC_SCREENSHARE_READ;
if (RPC_SCREENSHARE_READ === a0) {
return [intl.string(t.b0i0CO)];
}
const RPC_SCREENSHARE_WRITE = OAuth2Scopes.RPC_SCREENSHARE_WRITE;
if (RPC_SCREENSHARE_WRITE === a0) {
return [intl.string(t['9Rmxux'])];
}
const RPC_VOICE_READ = OAuth2Scopes.RPC_VOICE_READ;
if (RPC_VOICE_READ === a0) {
return [intl.string(t.rznmpz)];
}
const RPC_ACTIVITIES_WRITE = OAuth2Scopes.RPC_ACTIVITIES_WRITE;
if (RPC_ACTIVITIES_WRITE === a0) {
return [intl.string(t.KQwJDf)];
}
const APPLICATIONS_BUILDS_UPLOAD = OAuth2Scopes.APPLICATIONS_BUILDS_UPLOAD;
if (APPLICATIONS_BUILDS_UPLOAD === a0) {
return [intl.string(t.Iwbtgk)];
}
const APPLICATIONS_BUILDS_READ = OAuth2Scopes.APPLICATIONS_BUILDS_READ;
if (APPLICATIONS_BUILDS_READ === a0) {
return [intl.string(t.ZkZCCW)];
}
const APPLICATIONS_COMMANDS = OAuth2Scopes.APPLICATIONS_COMMANDS;
if (APPLICATIONS_COMMANDS === a0) {
return [intl.string(t.H4q49X)];
}
const APPLICATIONS_COMMANDS_UPDATE = OAuth2Scopes.APPLICATIONS_COMMANDS_UPDATE;
if (APPLICATIONS_COMMANDS_UPDATE === a0) {
return [intl.string(t.mxeq6u)];
}
const APPLICATIONS_COMMANDS_PERMISSIONS_UPDATE = OAuth2Scopes.APPLICATIONS_COMMANDS_PERMISSIONS_UPDATE;
if (APPLICATIONS_COMMANDS_PERMISSIONS_UPDATE === a0) {
return [intl.string(t['7SIoW7'])];
}
const APPLICATIONS_STORE_UPDATE = OAuth2Scopes.APPLICATIONS_STORE_UPDATE;
if (APPLICATIONS_STORE_UPDATE === a0) {
return [intl.string(t['Rba/Xn'])];
}
const APPLICATIONS_ENTITLEMENTS = OAuth2Scopes.APPLICATIONS_ENTITLEMENTS;
if (APPLICATIONS_ENTITLEMENTS === a0) {
return [intl.string(t.xeNgGI)];
}
const ACTIVITIES_READ = OAuth2Scopes.ACTIVITIES_READ;
if (ACTIVITIES_READ === a0) {
return [intl.string(t['4+tSce'])];
}
const ACTIVITIES_WRITE = OAuth2Scopes.ACTIVITIES_WRITE;
if (ACTIVITIES_WRITE === a0) {
return [intl.string(t['6OsWXX'])];
}
const RELATIONSHIPS_READ = OAuth2Scopes.RELATIONSHIPS_READ;
if (RELATIONSHIPS_READ === a0) {
return [intl.string(t['521/7W'])];
}
const RELATIONSHIPS_WRITE = OAuth2Scopes.RELATIONSHIPS_WRITE;
if (RELATIONSHIPS_WRITE === a0) {
return [intl.string(t['qR/txQ'])];
}
const VOICE = OAuth2Scopes.VOICE;
if (VOICE === a0) {
return [intl.string(t.XK5zdO)];
}
const DM_CHANNELS_READ = OAuth2Scopes.DM_CHANNELS_READ;
if (DM_CHANNELS_READ === a0) {
return [intl.string(t.w8emlT)];
}
const ROLE_CONNECTIONS_WRITE = OAuth2Scopes.ROLE_CONNECTIONS_WRITE;
if (ROLE_CONNECTIONS_WRITE === a0) {
return [intl.string(t.Bv0wZj)];
}
const PRESENCES_READ = OAuth2Scopes.PRESENCES_READ;
if (PRESENCES_READ === a0) {
return [intl.string(t.JUWeyf)];
}
const PRESENCES_WRITE = OAuth2Scopes.PRESENCES_WRITE;
if (PRESENCES_WRITE === a0) {
return [intl.string(t.apHLwv)];
}
const DM_CHANNELS_MESSAGES_READ = OAuth2Scopes.DM_CHANNELS_MESSAGES_READ;
if (DM_CHANNELS_MESSAGES_READ === a0) {
return [intl.string(t.FHeB8p)];
}
const DM_CHANNELS_MESSAGES_WRITE = OAuth2Scopes.DM_CHANNELS_MESSAGES_WRITE;
if (DM_CHANNELS_MESSAGES_WRITE === a0) {
return [intl.string(t['mdh+xY'])];
}
const GATEWAY_CONNECT = OAuth2Scopes.GATEWAY_CONNECT;
if (GATEWAY_CONNECT === a0) {
return [intl.string(t['uJd+85'])];
}
const PAYMENT_SOURCES_COUNTRY_CODE = OAuth2Scopes.PAYMENT_SOURCES_COUNTRY_CODE;
if (PAYMENT_SOURCES_COUNTRY_CODE === a0) {
return [intl.string(t.hycwLK)];
}
const ACTIVITIES_INVITES_WRITE = OAuth2Scopes.ACTIVITIES_INVITES_WRITE;
if (ACTIVITIES_INVITES_WRITE === a0) {
return [intl.string(t.IM4Cje)];
}
const APPLICATION_IDENTITIES_WRITE = OAuth2Scopes.APPLICATION_IDENTITIES_WRITE;
if (APPLICATION_IDENTITIES_WRITE === a0) {
return [intl.string(t['1zioRF'])];
}
const MANAGED_PLATFORM_APPLICATION_IDENTITIES_WRITE = OAuth2Scopes.MANAGED_PLATFORM_APPLICATION_IDENTITIES_WRITE;
if (MANAGED_PLATFORM_APPLICATION_IDENTITIES_WRITE === a0) {
return [intl.string(t['4l1DWw'])];
}
const SDK_SOCIAL_LAYER_PRESENCE = OAuth2Scopes.SDK_SOCIAL_LAYER_PRESENCE;
if (SDK_SOCIAL_LAYER_PRESENCE === a0) {
string = intl.string;
items2 = [Reflect.apply(string, intl, [t.Pl1dTW])];
string = intl.string;
items2[1] = Reflect.apply(string, intl, [t.mPRcyT]);
string = intl.string;
items2[2] = Reflect.apply(string, intl, [t.F7J4NE]);
string = intl.string;
items2[3] = Reflect.apply(string, intl, [t.syJLx9]);
if (!a1.includes(OAuth2Scopes.APPLICATION_IDENTITIES_WRITE)) {
items2.push(intl.string(t['1zioRF']));
}
return items2;
}
const SDK_SOCIAL_LAYER = OAuth2Scopes.SDK_SOCIAL_LAYER;
if (SDK_SOCIAL_LAYER === a0) {
string = intl.string;
items2 = [Reflect.apply(string, intl, [t.Pl1dTW])];
string = intl.string;
items2[1] = Reflect.apply(string, intl, [t['hc/+yg']]);
string = intl.string;
items2[2] = Reflect.apply(string, intl, [t.mPRcyT]);
string = intl.string;
items2[3] = Reflect.apply(string, intl, [t.F7J4NE]);
string = intl.string;
items2[4] = Reflect.apply(string, intl, [t['2wxXX9']]);
if (!a1.includes(OAuth2Scopes.APPLICATION_IDENTITIES_WRITE)) {
items2.push(intl.string(t['1zioRF']));
}
return items2;
}
return [a0];
}
return [a0];
}
function isSocialLayerUmbrellaScope(a0) { // fn#34215, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4286:7444, offset: 0x0104edc8, size: 82 bytes, params: 2, frame: 14
const OAuth2Scopes = (require(4122) /* metro dependency 4122: OAuth2Scopes */).OAuth2Scopes;
const SDK_SOCIAL_LAYER_PRESENCE = OAuth2Scopes.SDK_SOCIAL_LAYER_PRESENCE;
return a0 === SDK_SOCIAL_LAYER_PRESENCE || a0 === OAuth2Scopes.SDK_SOCIAL_LAYER;
}
function isSocialLayerUmbrellaScope(a0) { // fn#34215, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4286:7444, offset: 0x0104edc8, size: 82 bytes, params: 2, frame: 14
const OAuth2Scopes = (OAuth2ScopesModule).OAuth2Scopes;
const SDK_SOCIAL_LAYER_PRESENCE = OAuth2Scopes.SDK_SOCIAL_LAYER_PRESENCE;
return a0 === SDK_SOCIAL_LAYER_PRESENCE || a0 === OAuth2Scopes.SDK_SOCIAL_LAYER;
}
function getSecurityMessage(a0) { // fn#34216, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4286:7606, offset: 0x0104ee1a, size: 368 bytes, params: 2, frame: 17
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
const includes = a0.includes;
const OAuth2Scopes = (OAuth2ScopesModule).OAuth2Scopes;
const DM_CHANNELS_MESSAGES_WRITE = OAuth2Scopes.DM_CHANNELS_MESSAGES_WRITE;
return Reflect.apply(includes, a0,
[DM_CHANNELS_MESSAGES_WRITE]) || a0.includes(OAuth2Scopes.SDK_SOCIAL_LAYER) ? intl.format(t.o0GMBD,
{}) : a0.includes(OAuth2Scopes.MESSAGES_READ) || a0.includes(OAuth2Scopes.DM_CHANNELS_MESSAGES_READ) ? intl.format(t.Soy7jJ,
{}) : intl.format(t['TeL+Ct'], {});
}
function getSecurityMessage(a0) { // fn#34216, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4286:7606, offset: 0x0104ee1a, size: 368 bytes, params: 2, frame: 17
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const includes = a0.includes;
const OAuth2Scopes = (require(4122) /* metro dependency 4122: OAuth2Scopes */).OAuth2Scopes;
const DM_CHANNELS_MESSAGES_WRITE = OAuth2Scopes.DM_CHANNELS_MESSAGES_WRITE;
return Reflect.apply(includes, a0,
[DM_CHANNELS_MESSAGES_WRITE]) || a0.includes(OAuth2Scopes.SDK_SOCIAL_LAYER) ? intl.format(t.o0GMBD,
{}) : a0.includes(OAuth2Scopes.MESSAGES_READ) || a0.includes(OAuth2Scopes.DM_CHANNELS_MESSAGES_READ) ? intl.format(t.Soy7jJ,
{}) : intl.format(t['TeL+Ct'], {});
}
global.__d(_fun34205, 4121, [1244, 4122, 2]) /* metro module 4121, dependencies: [1244, 4122, 2] */;
+4 -1
View File
@@ -1,8 +1,11 @@
/* Metro module 9349; source: modules/oauth2/types.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun73029(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#73029, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9535:6, offset: 0x01d5c95a, size: 102 bytes, params: 8, frame: 16
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/oauth2/types.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/oauth2/types.tsx');
exports.OAuth2Prompts = {NONE: 'none', CONSENT: 'consent'};
}
global.__d(_fun73029, 9349, [2]) /* metro module 9349, dependencies: [2] */;