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

+187 -151
View File
@@ -1,4 +1,40 @@
/* Metro module 12948; source: components_native/App.tsx; dependencies: [31, 27, 12949, 1226, 9232, 7554, 12544, 12559, 7261, 4290, 12950, 12951, 12952, 5226, 3808, 4502, 12953, 8972, 12954, 12955, 33, 12956, 1962, 12989, 4558, 12995, 12996, 12997, 12998, 7145, 477, 13007, 7148, 13009, 13012, 7297, 13071, 8092, 8069, 9552, 13079, 13081, 13085, 13087, 13088, 13089, 13090, 4491, 13091, 4682, 12073, 13093, 566, 5076, 13094, 14, 12526, 479, 11340, 13096, 14299, 2] */
import TTITracker from '../modules/tti_analytics/TTITracker.tsx'; /* Metro dependency 14 */
import VoiceEngineStreamingManager from '../modules/go_live/native/VoiceEngineStreamingManager.tsx'; /* Metro dependency 4491 */
import AccessibilityFocusLockManager from '../modules/a11y/native/AccessibilityFocusLockManager.tsx'; /* Metro dependency 4558 */
import ForegroundServiceManagerAndroid from '../modules/foreground_service/mobile/ForegroundServiceManager.android.tsx'; /* Metro dependency 7145 */
import SentMessageIntentsHandlerAndroid from '../modules/messages/SentMessageIntentsHandler.android.tsx'; /* Metro dependency 7148 */
import GPlayManagerAndroid from '../modules/gplay/native/GPlayManager.android.tsx'; /* Metro dependency 7297 */
import FramesNativeManager from '../modules/frames/native/FramesNativeManager.tsx'; /* Metro dependency 8069 */
import EmbeddedActivitiesNativeManager from '../modules/activities/native/EmbeddedActivitiesNativeManager.tsx'; /* Metro dependency 8092 */
import MediaPlayerMuteManager from '../modules/media_viewer/native/MediaPlayerMuteManager.tsx'; /* Metro dependency 9552 */
import StartupProfiler from '../modules/app_startup/StartupProfiler.tsx'; /* Metro dependency 11340 */
import AccessibilityManager from '../modules/a11y/native/AccessibilityManager.tsx'; /* Metro dependency 12989 */
import BackPressManager from '../modules/routing/native/BackPressManager.tsx'; /* Metro dependency 12995 */
import CallKitManagerAndroid from '../modules/calls/mobile/CallKitManager.android.tsx'; /* Metro dependency 12996 */
import AccessibilityCallManager from '../modules/a11y/native/AccessibilityCallManager.tsx'; /* Metro dependency 12997 */
import NotificationTokenManager from '../modules/notifications/native/NotificationTokenManager.tsx'; /* Metro dependency 12998 */
import VoiceNotificationManagerAndroid from '../modules/voice_calls/native/VoiceNotificationManager.android.tsx'; /* Metro dependency 13007 */
import UserSettingsProtoManager from '../modules/user_settings/UserSettingsProtoManager.tsx'; /* Metro dependency 13009 */
import NativeRPCServerManager from '../modules/rpc/native/server/NativeRPCServerManager.tsx'; /* Metro dependency 13012 */
import MobileVoiceOverlayLifecycleManagerAndroid from '../modules/voice_overlay/native/MobileVoiceOverlayLifecycleManager.android.tsx'; /* Metro dependency 13071 */
import MediaPlayerManager from '../modules/media/native/MediaPlayerManager.tsx'; /* Metro dependency 13079 */
import SoundboardManager from '../modules/soundboard/native/SoundboardManager.tsx'; /* Metro dependency 13081 */
import VoiceMessagesPlaybackManager from '../modules/voice_messages/native/VoiceMessagesPlaybackManager.tsx'; /* Metro dependency 13085 */
import ICYMIManager from '../modules/icymi/ICYMIManager.tsx'; /* Metro dependency 13087 */
import GameRelationshipManager from '../modules/game_relationships/GameRelationshipManager.tsx'; /* Metro dependency 13088 */
import CollectiblesMarketingManagerNative from '../modules/collectibles/CollectiblesMarketingManager.native.tsx'; /* Metro dependency 13089 */
import SessionAdManager from '../modules/analytics_sessions/SessionAdManager.tsx'; /* Metro dependency 13090 */
import TouchEventAnalyticsManagerAndroid from '../modules/touch_analytics/TouchEventAnalyticsManager.android.tsx'; /* Metro dependency 13091 */
import IOSVoiceLiveActivityExperiment from '../modules/voice_calls/native/IOSVoiceLiveActivityExperiment.tsx'; /* Metro dependency 13093 */
import LocalMessageCacheManagerNative from '../modules/local_message_caching/LocalMessageCacheManager.native.tsx'; /* Metro dependency 13094 */
import AppContainer from './AppContainer.tsx'; /* Metro dependency 13096 */
import MainNavigator from '../modules/main_tabs_v2/native/MainNavigator.tsx'; /* Metro dependency 14299 */
import * as PlatformUtilsModule from '../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
import * as StartupProfilerModule from '../modules/app_startup/StartupProfiler.tsx'; /* Metro dependency 11340 */
import * as RouteManagerUtilsModule from '../modules/routing/native/RouteManagerUtils.tsx'; /* Metro dependency 12073 */
import * as PrivateChannelHidingExperimentModule from '../modules/gateway/PrivateChannelHidingExperiment.tsx'; /* Metro dependency 12526 */
function _fun98616(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#98616, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13138:6, offset: 0x021b067b, size: 430 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
@@ -29,163 +65,163 @@ function _fun98616(global, require, importDefault, importAll, module, exports, d
}
require(dependencyMap[61]).fileFinishedImporting('components_native/App.tsx');
exports.default = App;
}
function App() { // fn#98617, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13138:412, offset: 0x021b0829, size: 215 bytes, params: 1, frame: 18
(TTITracker).renderApp.record();
useManagers();
useAuthenticated();
useChannelObfuscationPersistence();
env0_3.useEffect(function() {
return importDefault(dependencyMap[55]).renderAppEffect.record();
}, []);
const Profiles = (StartupProfilerModule).Profiles;
const App = Profiles.App;
return (
<StartupProfiler profile={App}>
{((Component) => <Component appEntryKey="main">{((Component) => <Component />)(MainNavigator)}</Component>)(AppContainer)}
</StartupProfiler>
);
function useManagers() { // fn#98618, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13138:462, owner: App.useManagers, offset: 0x021b0900, size: 148 bytes, params: 1, frame: 16
env1_3.useEffect(_fun98619, []);
const defaultImport = IOSVoiceLiveActivityExperiment;
const useConfig = defaultImport.useConfig;
env1_3.useEffect(_fun98621, [Reflect.apply(useConfig, defaultImport,
[{location: 'App'}]).enabled && (require(477) /* metro dependency 477: PlatformUtils */).isIOS()]);
function _fun98619() { // fn#98619, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13138:498, offset: 0x021b0994, size: 719 bytes, params: 1, frame: 15
var environment;
const value = environment.__proto__.__proto__;
(AccessibilityManager).init();
(AccessibilityFocusLockManager).initialize();
(BackPressManager).initialize();
(CallKitManagerAndroid).initialize();
(AccessibilityCallManager).initialize();
(NotificationTokenManager).initialize();
(ForegroundServiceManagerAndroid).initialize();
if (PlatformUtilsModule.isAndroid()) {
(importDefault(13007) /* metro dependency 13007: VoiceNotificationManagerAndroid */).initialize();
}
(SentMessageIntentsHandlerAndroid).init();
(UserSettingsProtoManager).init();
(NativeRPCServerManager).init();
(GPlayManagerAndroid).initialize();
(MobileVoiceOverlayLifecycleManagerAndroid).initialize();
(EmbeddedActivitiesNativeManager).initialize();
(FramesNativeManager).initialize();
(MediaPlayerMuteManager).initialize();
(MediaPlayerManager).initialize();
(SoundboardManager).initialize();
(VoiceMessagesPlaybackManager).initialize();
mobileNativeUpdateStore.ensureInitialized();
(ICYMIManager).initialize();
(GameRelationshipManager).initialize();
(CollectiblesMarketingManagerNative).initialize();
(SessionAdManager).initialize();
(VoiceEngineStreamingManager).initialize();
(TouchEventAnalyticsManagerAndroid).initialize();
if (PlatformUtilsModule.isIOS()) {
(importDefault(4682) /* metro dependency 4682: IosImageTypesManager */).initialize();
}
(RouteManagerUtilsModule).initializeRouteManagerIfNeeded();
return _fun98620;
function _fun98620() { // fn#98620, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13138:1155, offset: 0x021b0c63, size: 404 bytes, params: 1, frame: 15
const value = environment.__proto__.__proto__.__proto__;
(AccessibilityCallManager).terminate();
(AccessibilityFocusLockManager).terminate();
(GPlayManagerAndroid).terminate();
(MobileVoiceOverlayLifecycleManagerAndroid).terminate();
(RouteManagerUtilsModule).cleanupRouteManager();
(TouchEventAnalyticsManagerAndroid).terminate();
(MediaPlayerManager).terminate();
(MediaPlayerMuteManager).terminate();
(NativeRPCServerManager).terminate();
(BackPressManager).terminate();
(VoiceMessagesPlaybackManager).terminate();
(ICYMIManager).terminate();
(GameRelationshipManager).terminate();
(SessionAdManager).terminate();
(VoiceEngineStreamingManager).terminate();
if (PlatformUtilsModule.isAndroid()) {
(importDefault(13007) /* metro dependency 13007: VoiceNotificationManagerAndroid */).terminate();
}
}
function App() { // fn#98617, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13138:412, offset: 0x021b0829, size: 215 bytes, params: 1, frame: 18
(importDefault(14) /* metro dependency 14: TTITracker */).renderApp.record();
useManagers();
AppUseAuthenticated();
useChannelObfuscationPersistence();
env0_3.useEffect(function() {
return importDefault(dependencyMap[55]).renderAppEffect.record();
}, []);
const StartupProfiler = importDefault(11340) /* metro dependency 11340: StartupProfiler */;
const Profiles = (require(11340) /* metro dependency 11340: StartupProfiler */).Profiles;
const App = Profiles.App;
return (
<StartupProfiler profile={App}>
{((Component) => <Component appEntryKey="main">{((Component) => <Component />)(importDefault(14299) /* metro dependency 14299: MainNavigator */)}</Component>)(importDefault(13096) /* metro dependency 13096: AppContainer */)}
</StartupProfiler>
);
}
}
function useManagers() { // fn#98618, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13138:462, owner: App.useManagers, offset: 0x021b0900, size: 148 bytes, params: 1, frame: 16
env1_3.useEffect(_fun98619, []);
const defaultImport = importDefault(13093) /* metro dependency 13093: IOSVoiceLiveActivityExperiment */;
const useConfig = defaultImport.useConfig;
env1_3.useEffect(_fun98621, [Reflect.apply(useConfig, defaultImport,
[{location: 'App'}]).enabled && (require(477) /* metro dependency 477: PlatformUtils */).isIOS()]);
}
function _fun98621() { // fn#98621, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13138:1617, offset: 0x021b0df7, size: 60 bytes, params: 1, frame: 11
var environment;
var value;
if (env0_0) {
value = environment.__proto__.__proto__;
value = importDefault(13007) /* metro dependency 13007: VoiceNotificationManagerAndroid */;
value.initialize();
return _fun98622;
}
function _fun98622() { // fn#98622, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13138:1656, offset: 0x021b0e33, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__.__proto__.__proto__;
(VoiceNotificationManagerAndroid).terminate();
}
function AppUseAuthenticated() { // fn#98623, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13138:1693, owner: App.useAuthenticated, offset: 0x021b0e58, size: 115 bytes, params: 1, frame: 16
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([AuthenticationStore],
function() {
return AuthenticationStore.isAuthenticated();
});
const binding = env1_3;
binding.useEffect(_fun98625, [value2]);
binding.useEffect(function() {
importDefault(dependencyMap[55]).wasAuthenticated = AuthenticationStore.isAuthenticated();
}, []);
}
}
function useChannelObfuscationPersistence() { // fn#98628, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13138:2134, owner: App.useChannelObfuscationPersistence, offset: 0x021b0fee, size: 78 bytes, params: 1, frame: 15
env1_3.useEffect(_fun98629,
[(require(12526) /* metro dependency 12526: PrivateChannelHidingExperiment */).useIsChannelMetadataObfuscationEnabled('App')]);
}
function _fun98619() { // fn#98619, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13138:498, offset: 0x021b0994, size: 719 bytes, params: 1, frame: 15
var environment;
const value = environment.__proto__.__proto__;
(importDefault(12989) /* metro dependency 12989: AccessibilityManager */).init();
(importDefault(4558) /* metro dependency 4558: AccessibilityFocusLockManager */).initialize();
(importDefault(12995) /* metro dependency 12995: BackPressManager */).initialize();
(importDefault(12996) /* metro dependency 12996: CallKitManagerAndroid */).initialize();
(importDefault(12997) /* metro dependency 12997: AccessibilityCallManager */).initialize();
(importDefault(12998) /* metro dependency 12998: NotificationTokenManager */).initialize();
(importDefault(7145) /* metro dependency 7145: ForegroundServiceManagerAndroid */).initialize();
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (platformUtilsModule.isAndroid()) {
(importDefault(13007) /* metro dependency 13007: VoiceNotificationManagerAndroid */).initialize();
}
(importDefault(7148) /* metro dependency 7148: SentMessageIntentsHandlerAndroid */).init();
(importDefault(13009) /* metro dependency 13009: UserSettingsProtoManager */).init();
(importDefault(13012) /* metro dependency 13012: NativeRPCServerManager */).init();
(importDefault(7297) /* metro dependency 7297: GPlayManagerAndroid */).initialize();
(importDefault(13071) /* metro dependency 13071: MobileVoiceOverlayLifecycleManagerAndroid */).initialize();
(importDefault(8092) /* metro dependency 8092: EmbeddedActivitiesNativeManager */).initialize();
(importDefault(8069) /* metro dependency 8069: FramesNativeManager */).initialize();
(importDefault(9552) /* metro dependency 9552: MediaPlayerMuteManager */).initialize();
(importDefault(13079) /* metro dependency 13079: MediaPlayerManager */).initialize();
(importDefault(13081) /* metro dependency 13081: SoundboardManager */).initialize();
(importDefault(13085) /* metro dependency 13085: VoiceMessagesPlaybackManager */).initialize();
MobileNativeUpdateStore.ensureInitialized();
(importDefault(13087) /* metro dependency 13087: ICYMIManager */).initialize();
(importDefault(13088) /* metro dependency 13088: GameRelationshipManager */).initialize();
(importDefault(13089) /* metro dependency 13089: CollectiblesMarketingManagerNative */).initialize();
(importDefault(13090) /* metro dependency 13090: SessionAdManager */).initialize();
(importDefault(4491) /* metro dependency 4491: VoiceEngineStreamingManager */).initialize();
(importDefault(13091) /* metro dependency 13091: TouchEventAnalyticsManagerAndroid */).initialize();
const moduleValue2 = platformUtilsModule;
if (moduleValue2.isIOS()) {
(importDefault(4682) /* metro dependency 4682: IosImageTypesManager */).initialize();
}
(require(12073) /* metro dependency 12073: RouteManagerUtils */).initializeRouteManagerIfNeeded();
return _fun98620;
}
function _fun98621() { // fn#98621, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13138:1617, offset: 0x021b0df7, size: 60 bytes, params: 1, frame: 11
var environment;
var value;
if (env0_0) {
value = environment.__proto__.__proto__;
value = importDefault(13007) /* metro dependency 13007: VoiceNotificationManagerAndroid */;
value.initialize();
return _fun98622;
}
}
function _fun98625() { // fn#98625, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13138:1799, offset: 0x021b0ede, size: 188 bytes, params: 1, frame: 15
var environment;
var token;
var moduleValue;
var value;
if (env0_0) {
value = environment.__proto__.__proto__;
token = AuthenticationStore.getToken();
if (token == null) {
throw new global.Error('Authenticated without a token');
}
(importDefault(5076) /* metro dependency 5076: AuthenticationActionCreators */).startSession(token);
(importDefault(13094) /* metro dependency 13094: LocalMessageCacheManagerNative */).initialize();
moduleValue = require(477) /* metro dependency 477: PlatformUtils */;
if (moduleValue.isAndroid()) {
NativeModules.NativePermissionManager.requestNotificationAuthorization();
function useAuthenticated() { // fn#98623, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13138:1693, owner: App.useAuthenticated, offset: 0x021b0e58, size: 115 bytes, params: 1, frame: 16
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([authenticationStore],
function() {
return authenticationStore.isAuthenticated();
});
const binding = env1_3;
binding.useEffect(_fun98625, [value2]);
binding.useEffect(function() {
importDefault(dependencyMap[55]).wasAuthenticated = authenticationStore.isAuthenticated();
}, []);
function _fun98625() { // fn#98625, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13138:1799, offset: 0x021b0ede, size: 188 bytes, params: 1, frame: 15
var environment;
var token;
var moduleValue;
var value;
if (env0_0) {
value = environment.__proto__.__proto__;
token = authenticationStore.getToken();
if (token == null) {
throw new global.Error('Authenticated without a token');
}
(importDefault(5076) /* metro dependency 5076: AuthenticationActionCreators */).startSession(token);
(importDefault(13094) /* metro dependency 13094: LocalMessageCacheManagerNative */).initialize();
moduleValue = require(477) /* metro dependency 477: PlatformUtils */;
if (moduleValue.isAndroid()) {
NativeModules.NativePermissionManager.requestNotificationAuthorization();
}
return _fun98626;
}
function _fun98626() { // fn#98626, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13138:2026, offset: 0x021b0f9a, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__.__proto__.__proto__;
(LocalMessageCacheManagerNative).terminate();
}
}
}
return _fun98626;
function useChannelObfuscationPersistence() { // fn#98628, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13138:2134, owner: App.useChannelObfuscationPersistence, offset: 0x021b0fee, size: 78 bytes, params: 1, frame: 15
env1_3.useEffect(_fun98629,
[(PrivateChannelHidingExperimentModule).useIsChannelMetadataObfuscationEnabled('App')]);
function _fun98629() { // fn#98629, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13138:2252, offset: 0x021b103c, size: 108 bytes, params: 1, frame: 13
const value = environment.__proto__.__proto__;
if (PlatformUtilsModule.isAndroid()) {
(importDefault(479) /* metro dependency 479: NativeFastConnectModule */).setUseChannelObfuscation(env0_0);
} else {
NativeModules.DCDFastConnectManager.setUseChannelObfuscation(env0_0);
}
}
}
}
}
function _fun98629() { // fn#98629, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13138:2252, offset: 0x021b103c, size: 108 bytes, params: 1, frame: 13
const value = environment.__proto__.__proto__;
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (platformUtilsModule.isAndroid()) {
(importDefault(479) /* metro dependency 479: NativeFastConnectModule */).setUseChannelObfuscation(env0_0);
} else {
NativeModules.DCDFastConnectManager.setUseChannelObfuscation(env0_0);
}
}
function _fun98620() { // fn#98620, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13138:1155, offset: 0x021b0c63, size: 404 bytes, params: 1, frame: 15
const value = environment.__proto__.__proto__.__proto__;
(importDefault(12997) /* metro dependency 12997: AccessibilityCallManager */).terminate();
(importDefault(4558) /* metro dependency 4558: AccessibilityFocusLockManager */).terminate();
(importDefault(7297) /* metro dependency 7297: GPlayManagerAndroid */).terminate();
(importDefault(13071) /* metro dependency 13071: MobileVoiceOverlayLifecycleManagerAndroid */).terminate();
(require(12073) /* metro dependency 12073: RouteManagerUtils */).cleanupRouteManager();
(importDefault(13091) /* metro dependency 13091: TouchEventAnalyticsManagerAndroid */).terminate();
(importDefault(13079) /* metro dependency 13079: MediaPlayerManager */).terminate();
(importDefault(9552) /* metro dependency 9552: MediaPlayerMuteManager */).terminate();
(importDefault(13012) /* metro dependency 13012: NativeRPCServerManager */).terminate();
(importDefault(12995) /* metro dependency 12995: BackPressManager */).terminate();
(importDefault(13085) /* metro dependency 13085: VoiceMessagesPlaybackManager */).terminate();
(importDefault(13087) /* metro dependency 13087: ICYMIManager */).terminate();
(importDefault(13088) /* metro dependency 13088: GameRelationshipManager */).terminate();
(importDefault(13090) /* metro dependency 13090: SessionAdManager */).terminate();
(importDefault(4491) /* metro dependency 4491: VoiceEngineStreamingManager */).terminate();
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (platformUtilsModule.isAndroid()) {
(importDefault(13007) /* metro dependency 13007: VoiceNotificationManagerAndroid */).terminate();
}
}
function _fun98622() { // fn#98622, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13138:1656, offset: 0x021b0e33, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__.__proto__.__proto__;
(importDefault(13007) /* metro dependency 13007: VoiceNotificationManagerAndroid */).terminate();
}
function _fun98626() { // fn#98626, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13138:2026, offset: 0x021b0f9a, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__.__proto__.__proto__;
(importDefault(13094) /* metro dependency 13094: LocalMessageCacheManagerNative */).terminate();
}
global.__d(_fun98616, 12948, [31, 27, 12949, 1226, 9232, 7554, 12544, 12559, 7261, 4290, 12950, 12951, 12952, 5226,
3808, 4502, 12953, 8972, 12954, 12955, 33, 12956, 1962, 12989, 4558, 12995, 12996, 12997, 12998, 7145, 477,
13007, 7148, 13009, 13012, 7297, 13071, 8092, 8069, 9552, 13079, 13081, 13085, 13087, 13088, 13089, 13090, 4491,
13091, 4682, 12073, 13093, 566, 5076, 13094, 14, 12526, 479, 11340, 13096, 14299,
2]) /* metro module 12948, dependencies: [31, 27, 12949, 1226, 9232, 7554, 12544, 12559, 7261, 4290, 12950, 12951, 12952, 5226, 3808, 4502, 12953, 8972, 12954, 12955, 33, 12956, 1962, 12989, 4558, 12995, 12996, 12997, 12998, 7145, 477, 13007, 7148, 13009, 13012, 7297, 13071, 8092, 8069, 9552, 13079, 13081, 13085, 13087, 13088, 13089, 13090, 4491, 13091, 4682, 12073, 13093, 566, 5076, 13094, 14, 12526, 479, 11340, 13096, 14299, 2] */;
+295 -256
View File
@@ -1,4 +1,37 @@
/* Metro module 13096; source: components_native/AppContainer.tsx; dependencies: [57, 31, 27, 6936, 1934, 661, 33, 4501, 697, 4017, 8750, 5321, 5083, 1239, 1217, 4008, 4510, 5457, 13097, 13098, 4007, 1230, 4048, 683, 4009, 13099, 5468, 1485, 1360, 13100, 477, 11340, 13101, 13109, 3932, 13111, 1481, 10710, 12074, 12080, 13112, 4027, 13113, 13115, 13117, 13118, 13119, 14289, 14297, 14298, 1216, 2] */
import SentryUtilsNative from '../utils/SentryUtils.native.tsx'; /* Metro dependency 1216 */
import GetInitialNavigationState from '../modules/main_tabs_v2/native/getInitialNavigationState.tsx'; /* Metro dependency 4009 */
import UseTheme from '../hooks/useTheme.tsx'; /* Metro dependency 4048 */
import ModalDispatchQueue from '../modules/main_tabs_v2/native/modal/ModalDispatchQueue.tsx'; /* Metro dependency 5083 */
import StartupProfiler from '../modules/app_startup/StartupProfiler.tsx'; /* Metro dependency 11340 */
import RouteManager from '../modules/routing/RouteManager.tsx'; /* Metro dependency 12080 */
import MainNavigationLogger from '../modules/main_tabs_v2/helpers/MainNavigationLogger.tsx'; /* Metro dependency 13099 */
import AccessibilityPreferencesContextProviderNative from '../modules/a11y/native/AccessibilityPreferencesContextProvider.native.tsx'; /* Metro dependency 13111 */
import ErrorBoundary from './ErrorBoundary.tsx'; /* Metro dependency 13112 */
import AnimatedKeyboardProviderAndroid from '../modules/keyboard/native/AnimatedKeyboardProvider.android.tsx'; /* Metro dependency 13113 */
import KeyCommandsView from '../modules/keyboard/native/KeyCommandsView.tsx'; /* Metro dependency 13115 */
import ThemedStatusBar from '../modules/status_bar/native/components/ThemedStatusBar.tsx'; /* Metro dependency 13117 */
import * as SentryInitUtilsModule from '../modules/errors/native/SentryInitUtils.tsx'; /* Metro dependency 1217 */
import * as ComponentDispatchUtilsModule from '../utils/ComponentDispatchUtils.tsx'; /* Metro dependency 1239 */
import * as GlobalUtilsModule from '../utils/GlobalUtils.tsx'; /* Metro dependency 1360 */
import * as AppEntryKeyContextModule from '../modules/window/native/AppEntryKeyContext.tsx'; /* Metro dependency 1481 */
import * as Module01485Module from '../by-id/module-01485.js'; /* Metro dependency 1485 */
import * as ManaContextNativeModule from '../external/discord_common/js/packages/design/components/ManaContext/ManaContext.native.tsx'; /* Metro dependency 3932 */
import * as RootNavigationRefNativeModule from '../modules/main_tabs_v2/RootNavigationRef.native.tsx'; /* Metro dependency 4008 */
import * as Module04027Module from '../by-id/module-04027.js'; /* Metro dependency 4027 */
import * as Module05321Module from '../by-id/module-05321.js'; /* Metro dependency 5321 */
import * as UseNavigationThemeNativeModule from '../design/components/Navigator/native/useNavigationTheme.native.tsx'; /* Metro dependency 5468 */
import * as UseIsScreenLandscapeNativeModule from '../modules/screen/useIsScreenLandscape.native.tsx'; /* Metro dependency 8750 */
import * as WebViewContextModule from '../modules/activities/native/WebViewContext.tsx'; /* Metro dependency 10710 */
import * as StartupProfilerModule from '../modules/app_startup/StartupProfiler.tsx'; /* Metro dependency 11340 */
import * as Module12074Module from '../by-id/module-12074.js'; /* Metro dependency 12074 */
import * as UseRequestGatewaySocketModule from '../modules/gateway/useRequestGatewaySocket.tsx'; /* Metro dependency 13100 */
import * as Module13101Module from '../by-id/module-13101.js'; /* Metro dependency 13101 */
import * as RootThemeContextProviderNativeModule from '../modules/themes/RootThemeContextProvider.native.tsx'; /* Metro dependency 13109 */
import * as SafeAreaProviderNativeModule from '../modules/safe_area/SafeAreaProvider.native.tsx'; /* Metro dependency 13118 */
import * as RiveMobileRendererExperimentModule from '../modules/design/RiveMobileRendererExperiment.tsx'; /* Metro dependency 14297 */
import * as RiveAppStatePlaybackExperimentModule from '../modules/design/RiveAppStatePlaybackExperiment.tsx'; /* Metro dependency 14298 */
function _fun100128(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100128, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13286:6, offset: 0x021deb9a, size: 598 bytes, params: 8, frame: 24
var property;
const env0_1 = require;
@@ -40,279 +73,285 @@ function _fun100128(global, require, importDefault, importAll, module, exports,
value = value.profiledRootComponent(AppContainer_100141);
require(dependencyMap[51]).fileFinishedImporting('components_native/AppContainer.tsx');
exports.default = value;
}
function GestureWrapper({children}) { // fn#100129, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13286:418, offset: 0x021dedf0, size: 135 bytes, params: 2, frame: 20
const styles = useStyles();
const value3 = env0_5.useMemo(_fun100130,
[(require(8750) /* metro dependency 8750: useIsScreenLandscapeNative */).useIsScreenLandscape(), styles]);
const GestureHandlerRootView = (require(5321) /* metro dependency 5321 */).GestureHandlerRootView;
return (
<GestureHandlerRootView style={value3}>
{children}
</GestureHandlerRootView>
);
}
function handleNavigationOnReady() { // fn#100131, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13286:630, offset: 0x021deea4, size: 138 bytes, params: 1, frame: 15
(importDefault(5083) /* metro dependency 5083: ModalDispatchQueue */).flush();
const ComponentDispatch = (require(1239) /* metro dependency 1239: ComponentDispatchUtils */).ComponentDispatch;
const dispatch = ComponentDispatch.dispatch;
const NAVIGATOR_READY = ComponentActions.NAVIGATOR_READY;
Reflect.apply(dispatch, ComponentDispatch, [NAVIGATOR_READY]);
const routingInstrumentation = (require(1217) /* metro dependency 1217: SentryInitUtils */).routingInstrumentation;
const registerNavigationContainer = routingInstrumentation.registerNavigationContainer;
const rootNavigationRefNativeModule = require(4008) /* metro dependency 4008: RootNavigationRefNative */;
const getRootNavigationRef = rootNavigationRefNativeModule.getRootNavigationRef;
Reflect.apply(registerNavigationContainer, routingInstrumentation, [Reflect.apply(getRootNavigationRef,
rootNavigationRefNativeModule, [])]);
handleHistoryStoreNavigationChange();
}
function AppNavigationContainer({children}) { // fn#100132, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13286:964, offset: 0x021def2e, size: 268 bytes, params: 2, frame: 20
const value2 = (importDefault(4048) /* metro dependency 4048: useTheme */)();
const env0_0 = env0_5.useRef(undefined);
const value3 = env0_5.useCallback(_fun100133, []);
const value4 = env0_5.useMemo(_fun100134, []);
const env0_1 = env0_5.useRef(true);
env0_5.useEffect(_fun100135, []);
const value5 = (require(5468) /* metro dependency 5468: useNavigationThemeNative */).useNavigationTheme(value2);
const NavigationContainer = (require(1485) /* metro dependency 1485 */).NavigationContainer;
return (
<NavigationContainer
theme={value5}
ref={(require(4008) /* metro dependency 4008: RootNavigationRefNative */).getRootNavigationRef()}
onReady={handleNavigationOnReady}
onStateChange={value3}
initialState={value4}
>
{children}
</NavigationContainer>
);
}
function ShareNavigationContainer({children}) { // fn#100139, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13286:2219, offset: 0x021df32c, size: 105 bytes, params: 2, frame: 17
const value3 = (require(5468) /* metro dependency 5468: useNavigationThemeNative */).useNavigationTheme((importDefault(4048) /* metro dependency 4048: useTheme */)());
const NavigationContainer = (require(1485) /* metro dependency 1485 */).NavigationContainer;
return (
<NavigationContainer theme={value3}>
{children}
</NavigationContainer>
);
}
function AppNavigationContainerOrEmpty({children, appEntryKey}) { // fn#100140, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13286:2379, offset: 0x021df395, size: 122 bytes, params: 2, frame: 14
if (appEntryKey === 'main') {
function GestureWrapper({children}) { // fn#100129, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13286:418, offset: 0x021dedf0, size: 135 bytes, params: 2, frame: 20
const styles = useStyles();
const value3 = env0_5.useMemo(_fun100130,
[(UseIsScreenLandscapeNativeModule).useIsScreenLandscape(), styles]);
const GestureHandlerRootView = (Module05321Module).GestureHandlerRootView;
return (
<AppNavigationContainer>
<GestureHandlerRootView style={value3}>
{children}
</AppNavigationContainer>
</GestureHandlerRootView>
);
}
if (appEntryKey === 'share') {
return (
<ShareNavigationContainer>
{children}
</ShareNavigationContainer>
);
}
return (require(1360) /* metro dependency 1360: GlobalUtils */).assertNever(appEntryKey);
}
function AppContainer_100141({children, appEntryKey}) { // fn#100141, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13286:2901, offset: 0x021df40f, size: 191 bytes, params: 2, frame: 18
(require(13100) /* metro dependency 13100: useRequestGatewaySocket */).useRequestGatewaySocket('AppContainer:' + appEntryKey);
env0_5.useEffect(_fun100142, []);
env0_5.useEffect(function() {
if (require(dependencyMap[30]).isIOS() && NativeModules.SplashScreenManager) {
NativeModules.SplashScreenManager.hideSplashScreen();
function _fun100130() { // fn#100130, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13286:514, offset: 0x021dee77, size: 45 bytes, params: 1, frame: 4
return [styles.flex, env0_1 ? styles.rootBackgroundColor : undefined];
}
}, []);
return env0_5.useMemo(_fun100149, [appEntryKey, children, useManaContextProviderValue()]);
}
function _fun100130() { // fn#100130, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13286:514, offset: 0x021dee77, size: 45 bytes, params: 1, frame: 4
return [styles.flex, env0_1 ? styles.rootBackgroundColor : undefined];
}
}
function _fun100133() { // fn#100133, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13286:1063, offset: 0x021df03a, size: 441 bytes, params: 1, frame: 19
var currentRoute;
var value6;
var moduleValue4;
var defaultImport;
var value10;
var property;
var property2;
var value11;
var moduleValue6;
const rootNavigationRef = (require(4008) /* metro dependency 4008: RootNavigationRefNative */).getRootNavigationRef();
if (rootNavigationRef != null) {
if (rootNavigationRef.isReady()) {
currentRoute = rootNavigationRef.getCurrentRoute();
value6 = ((require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */).coerceMessagesRoute(currentRoute) ?? (require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */).coerceGuildsRoute(currentRoute)) != null;
moduleValue4 = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
if (moduleValue4.coerceChannelRoute(env0_0.current) != null && value6) {
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
defaultImport.track(AnalyticEvents.NAV_DRAWER_OPENED);
}
env0_0.current = currentRoute;
value10 = env1_4((importDefault(13098) /* metro dependency 13098: getChannelDetailsFromRoute */)(currentRoute,
true), 2);
property = value10[0];
property2 = value10[1];
if (property2 != null) {
if (property2 !== SelectedChannelStore.getChannelId()) {
value11 = (require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */).coerceChannelRoute(currentRoute);
if (!(value11 != null && value11.params.showCreateThread)) {
moduleValue6 = require(1230) /* metro dependency 1230: router_utils */;
moduleValue6.transitionTo(Routes.CHANNEL(property, property2), {'openChannel': true,
'navigationReplace': false});
function handleNavigationOnReady() { // fn#100131, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13286:630, offset: 0x021deea4, size: 138 bytes, params: 1, frame: 15
(ModalDispatchQueue).flush();
const ComponentDispatch = (ComponentDispatchUtilsModule).ComponentDispatch;
const dispatch = ComponentDispatch.dispatch;
const NAVIGATOR_READY = ComponentActions.NAVIGATOR_READY;
Reflect.apply(dispatch, ComponentDispatch, [NAVIGATOR_READY]);
const routingInstrumentation = (SentryInitUtilsModule).routingInstrumentation;
const registerNavigationContainer = routingInstrumentation.registerNavigationContainer;
const getRootNavigationRef = RootNavigationRefNativeModule.getRootNavigationRef;
Reflect.apply(registerNavigationContainer, routingInstrumentation, [Reflect.apply(getRootNavigationRef,
RootNavigationRefNativeModule, [])]);
handleHistoryStoreNavigationChange();
}
function AppNavigationContainer({children}) { // fn#100132, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13286:964, offset: 0x021def2e, size: 268 bytes, params: 2, frame: 20
const value2 = (UseTheme)();
const env0_0 = env0_5.useRef(undefined);
const value3 = env0_5.useCallback(_fun100133, []);
const value4 = env0_5.useMemo(_fun100134, []);
const env0_1 = env0_5.useRef(true);
env0_5.useEffect(_fun100135, []);
const value5 = (UseNavigationThemeNativeModule).useNavigationTheme(value2);
const NavigationContainer = (Module01485Module).NavigationContainer;
return (
<NavigationContainer
theme={value5}
ref={(RootNavigationRefNativeModule).getRootNavigationRef()}
onReady={handleNavigationOnReady}
onStateChange={value3}
initialState={value4}
>
{children}
</NavigationContainer>
);
function _fun100133() { // fn#100133, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13286:1063, offset: 0x021df03a, size: 441 bytes, params: 1, frame: 19
var currentRoute;
var value6;
var moduleValue4;
var defaultImport;
var value10;
var property;
var property2;
var selectedChannelStoreBinding;
var value11;
var moduleValue6;
const rootNavigationRef = (RootNavigationRefNativeModule).getRootNavigationRef();
if (rootNavigationRef != null) {
if (rootNavigationRef.isReady()) {
currentRoute = rootNavigationRef.getCurrentRoute();
value6 = ((require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */).coerceMessagesRoute(currentRoute) ?? (require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */).coerceGuildsRoute(currentRoute)) != null;
moduleValue4 = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
if (moduleValue4.coerceChannelRoute(env0_0.current) != null && value6) {
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
defaultImport.track(AnalyticEvents.NAV_DRAWER_OPENED);
}
env0_0.current = currentRoute;
value10 = env1_4((importDefault(13098) /* metro dependency 13098: getChannelDetailsFromRoute */)(currentRoute,
true), 2);
property = value10[0];
property2 = value10[1];
if (property2 != null) {
selectedChannelStoreBinding = selectedChannelStore;
if (property2 !== selectedChannelStoreBinding.getChannelId()) {
value11 = (require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */).coerceChannelRoute(currentRoute);
if (!(value11 != null && value11.params.showCreateThread)) {
moduleValue6 = require(1230) /* metro dependency 1230: router_utils */;
moduleValue6.transitionTo(Routes.CHANNEL(property, property2), {'openChannel': true,
'navigationReplace': false});
}
}
}
}
}
handleHistoryStoreNavigationChange();
}
}
handleHistoryStoreNavigationChange();
}
function _fun100134() { // fn#100134, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13286:1632, offset: 0x021df1f3, size: 115 bytes, params: 1, frame: 16
let value = environment.__proto__;
value = undefined;
const value2 = (importDefault(4009) /* metro dependency 4009: getInitialNavigationState */)();
const defaultImport = importDefault(13099) /* metro dependency 13099: MainNavigationLogger */;
defaultImport.log('Initial Screen: ' + (value2 == null || value2.routes[0] == null ? value : value2.routes[0].name));
return value2;
}
function _fun100135() { // fn#100135, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13286:1779, offset: 0x021df266, size: 71 bytes, params: 1, frame: 15
if (env0_1.current) {
env0_1.current = false;
return undefined;
}
const env0_0 = global.setTimeout(_fun100136, 0);
return _fun100138;
}
function _fun100142() { // fn#100142, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13286:3019, offset: 0x021df4ce, size: 119 bytes, params: 1, frame: 15
var RNScreensTurboModule;
var moduleValue;
var runOnUI;
var closure;
if (!env1_15) {
RNScreensTurboModule = env1_0.RNScreensTurboModule;
moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */;
runOnUI = moduleValue.runOnUI;
closure = e_100143;
closure.__closure = {RNScreensTurboModule: RNScreensTurboModule};
closure.__workletHash = 8891274578898;
closure.__initData = env1_16;
Reflect.apply(runOnUI, moduleValue, [closure])();
}
}
function useManaContextProviderValue() { // fn#100145, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13286:3332, owner: AppContainer_100141.useManaContextProviderValue, offset: 0x021df5a8, size: 143 bytes, params: 1, frame: 17
return env1_5.useMemo(_fun100147, [env1_5.useMemo(_fun100146,
[(require(14297) /* metro dependency 14297: RiveMobileRendererExperiment */).useRiveRendererExperiment('AppContainer'),
(require(14298) /* metro dependency 14298: RiveAppStatePlaybackExperiment */).useRiveAppStatePlaybackExperiment('AppContainer')])]);
}
function _fun100149() { // fn#100149, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13286:3757, offset: 0x021df6c7, size: 687 bytes, params: 1, frame: 61
const value = environment.__proto__;
const StartupProfiler = importDefault(11340) /* metro dependency 11340: StartupProfiler */;
const Profiles = (require(11340) /* metro dependency 11340: StartupProfiler */).Profiles;
const AppContainer = Profiles.AppContainer;
const ReanimatedScreenProvider = (require(13101) /* metro dependency 13101 */).ReanimatedScreenProvider;
const RootThemeContextProvider = (require(13109) /* metro dependency 13109: RootThemeContextProviderNative */).RootThemeContextProvider;
const ManaContextProvider = (require(3932) /* metro dependency 3932: ManaContextNative */).ManaContextProvider;
const manaContextProviderProps = {value: env0_2};
const AccessibilityPreferencesContextProviderNative = importDefault(13111) /* metro dependency 13111: AccessibilityPreferencesContextProviderNative */;
const AppEntryKeyContext = (require(1481) /* metro dependency 1481: AppEntryKeyContext */).AppEntryKeyContext;
const Provider = AppEntryKeyContext.Provider;
const appEntryKeyBinding = appEntryKey;
const WebViewContextProvider = (require(10710) /* metro dependency 10710: WebViewContext */).WebViewContextProvider;
const Router = (require(12074) /* metro dependency 12074 */).Router;
const routerProps = {history: (importDefault(12080) /* metro dependency 12080: RouteManager */).getHistory()};
const ErrorBoundary = importDefault(13112) /* metro dependency 13112: ErrorBoundary */;
const PortalProvider = (require(4027) /* metro dependency 4027 */).PortalProvider;
const Component = (importDefault(13113) /* metro dependency 13113: AnimatedKeyboardProviderAndroid */).Component;
const KeyCommandsView = importDefault(13115) /* metro dependency 13115: KeyCommandsView */;
const value3 = ((Component) => <Component />)(importDefault(13117) /* metro dependency 13117: ThemedStatusBar */);
const SafeAreaProvider = (require(13118) /* metro dependency 13118: SafeAreaProviderNative */).SafeAreaProvider;
const items2 = [children];
const SafeAreaReporter = (require(13118) /* metro dependency 13118: SafeAreaProviderNative */).SafeAreaReporter;
items2[1] = <SafeAreaReporter />;
items2[2] = ((Component) => <Component />)(importDefault(13119) /* metro dependency 13119: DevToolsLazy */);
items2[3] = ((Component) => <Component />)(importDefault(14289) /* metro dependency 14289: ScreenRecordingPip */);
return (
<StartupProfiler profile={AppContainer}>
<ReanimatedScreenProvider>
<RootThemeContextProvider>
<ManaContextProvider {...manaContextProviderProps}>
<AccessibilityPreferencesContextProviderNative>
<Provider value={appEntryKeyBinding}>
<AppNavigationContainerOrEmpty appEntryKey={appEntryKeyBinding}>
<WebViewContextProvider>
<Router {...routerProps}>
<GestureWrapper>
<ErrorBoundary>
<PortalProvider>
<Component>
<KeyCommandsView>
{value3}
<SafeAreaProvider>
{items2}
</SafeAreaProvider>
</KeyCommandsView>
</Component>
</PortalProvider>
</ErrorBoundary>
</GestureWrapper>
</Router>
</WebViewContextProvider>
</AppNavigationContainerOrEmpty>
</Provider>
</AccessibilityPreferencesContextProviderNative>
</ManaContextProvider>
</RootThemeContextProvider>
</ReanimatedScreenProvider>
</StartupProfiler>
);
}
function _fun100136() { // fn#100136, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13286:1817, offset: 0x021df2ad, size: 127 bytes, params: 1, frame: 14
var environment;
const value = environment.__proto__.__proto__;
const rootNavigationRef = (require(4008) /* metro dependency 4008: RootNavigationRefNative */).getRootNavigationRef();
if (rootNavigationRef != null) {
if (rootNavigationRef.isReady()) {
rootNavigationRef.reset((importDefault(4009) /* metro dependency 4009: getInitialNavigationState */)(rootNavigationRef.getState().routes.filter(function(a0) {
return a0.name === 'modal';
})));
function _fun100134() { // fn#100134, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13286:1632, offset: 0x021df1f3, size: 115 bytes, params: 1, frame: 16
let value = environment.__proto__;
value = undefined;
const value2 = (GetInitialNavigationState)();
const defaultImport = MainNavigationLogger;
defaultImport.log('Initial Screen: ' + (value2 == null || value2.routes[0] == null ? value : value2.routes[0].name));
return value2;
}
function _fun100135() { // fn#100135, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13286:1779, offset: 0x021df266, size: 71 bytes, params: 1, frame: 15
if (env0_1.current) {
env0_1.current = false;
return undefined;
}
const env0_0 = global.setTimeout(_fun100136, 0);
return _fun100138;
function _fun100136() { // fn#100136, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13286:1817, offset: 0x021df2ad, size: 127 bytes, params: 1, frame: 14
var environment;
const value = environment.__proto__.__proto__;
const rootNavigationRef = (RootNavigationRefNativeModule).getRootNavigationRef();
if (rootNavigationRef != null) {
if (rootNavigationRef.isReady()) {
rootNavigationRef.reset((importDefault(4009) /* metro dependency 4009: getInitialNavigationState */)(rootNavigationRef.getState().routes.filter(function(a0) {
return a0.name === 'modal';
})));
}
}
}
function _fun100138() { // fn#100138, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13286:1979, offset: 0x00e59c84, size: 24 bytes, params: 1, frame: 11
global.clearTimeout(env0_0);
}
}
}
}
function e_100143() { // fn#100143, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13286:3083, offset: 0x021df545, size: 24 bytes, params: 1, frame: 2
env2_0.RNScreensTurboModule = RNScreensTurboModule;
}
function _fun100146() { // fn#100146, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13286:3504, offset: 0x021df637, size: 55 bytes, params: 1, frame: 12
const items2 = [];
if (env0_0) {
items2.push('rive-mobile-renderer');
function ShareNavigationContainer({children}) { // fn#100139, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13286:2219, offset: 0x021df32c, size: 105 bytes, params: 2, frame: 17
const value3 = (UseNavigationThemeNativeModule).useNavigationTheme((UseTheme)());
const NavigationContainer = (Module01485Module).NavigationContainer;
return (
<NavigationContainer theme={value3}>
{children}
</NavigationContainer>
);
}
if (env0_1) {
items2.push('rive-app-state-playback');
function AppNavigationContainerOrEmpty({children, appEntryKey}) { // fn#100140, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13286:2379, offset: 0x021df395, size: 122 bytes, params: 2, frame: 14
if (appEntryKey === 'main') {
return (
<AppNavigationContainer>
{children}
</AppNavigationContainer>
);
}
if (appEntryKey === 'share') {
return (
<ShareNavigationContainer>
{children}
</ShareNavigationContainer>
);
}
return (GlobalUtilsModule).assertNever(appEntryKey);
}
return items2;
}
function _fun100147() { // fn#100147, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13286:3625, offset: 0x021df66e, size: 37 bytes, params: 1, frame: 3
return {experiments: {enabledExperiments: env0_2}, captureException: captureException_100148};
}
function AppContainer_100141({children, appEntryKey}) { // fn#100141, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13286:2901, offset: 0x021df40f, size: 191 bytes, params: 2, frame: 18
(UseRequestGatewaySocketModule).useRequestGatewaySocket('AppContainer:' + appEntryKey);
env0_5.useEffect(_fun100142, []);
env0_5.useEffect(function() {
if (require(dependencyMap[30]).isIOS() && NativeModules.SplashScreenManager) {
NativeModules.SplashScreenManager.hideSplashScreen();
}
}, []);
return env0_5.useMemo(_fun100149, [appEntryKey, children, useManaContextProviderValue()]);
function _fun100142() { // fn#100142, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13286:3019, offset: 0x021df4ce, size: 119 bytes, params: 1, frame: 15
var RNScreensTurboModule;
var moduleValue;
var runOnUI;
var e_1001432;
if (!env1_15) {
RNScreensTurboModule = env1_0.RNScreensTurboModule;
moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */;
runOnUI = moduleValue.runOnUI;
e_1001432 = e_100143;
e_1001432.__closure = {RNScreensTurboModule: RNScreensTurboModule};
e_1001432.__workletHash = 8891274578898;
e_1001432.__initData = env1_16;
Reflect.apply(runOnUI, moduleValue, [e_1001432])();
}
function e_100143() { // fn#100143, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13286:3083, offset: 0x021df545, size: 24 bytes, params: 1, frame: 2
env2_0.RNScreensTurboModule = RNScreensTurboModule;
}
}
function useManaContextProviderValue() { // fn#100145, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13286:3332, owner: AppContainer_100141.useManaContextProviderValue, offset: 0x021df5a8, size: 143 bytes, params: 1, frame: 17
return env1_5.useMemo(_fun100147, [env1_5.useMemo(_fun100146,
[(RiveMobileRendererExperimentModule).useRiveRendererExperiment('AppContainer'),
(RiveAppStatePlaybackExperimentModule).useRiveAppStatePlaybackExperiment('AppContainer')])]);
function _fun100146() { // fn#100146, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13286:3504, offset: 0x021df637, size: 55 bytes, params: 1, frame: 12
const items2 = [];
if (env0_0) {
items2.push('rive-mobile-renderer');
}
if (env0_1) {
items2.push('rive-app-state-playback');
}
return items2;
}
function _fun100147() { // fn#100147, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13286:3625, offset: 0x021df66e, size: 37 bytes, params: 1, frame: 3
return {experiments: {enabledExperiments: env0_2}, captureException: captureException_100148};
function captureException_100148(a0, a1) { // fn#100148, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13286:3683, offset: 0x021df693, size: 52 bytes, params: 3, frame: 13
const value = environment.__proto__.__proto__.__proto__;
return (SentryUtilsNative).captureException(a0, {tags: a1});
}
}
}
function _fun100149() { // fn#100149, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13286:3757, offset: 0x021df6c7, size: 687 bytes, params: 1, frame: 61
const value = environment.__proto__;
const Profiles = (StartupProfilerModule).Profiles;
const AppContainer = Profiles.AppContainer;
const ReanimatedScreenProvider = (Module13101Module).ReanimatedScreenProvider;
const RootThemeContextProvider = (RootThemeContextProviderNativeModule).RootThemeContextProvider;
const ManaContextProvider = (ManaContextNativeModule).ManaContextProvider;
const manaContextProviderProps = {value: env0_2};
const AppEntryKeyContext = (AppEntryKeyContextModule).AppEntryKeyContext;
const Provider = AppEntryKeyContext.Provider;
const appEntryKeyBinding = appEntryKey;
const WebViewContextProvider = (WebViewContextModule).WebViewContextProvider;
const Router = (Module12074Module).Router;
const routerProps = {history: (RouteManager).getHistory()};
const PortalProvider = (Module04027Module).PortalProvider;
const Component = (AnimatedKeyboardProviderAndroid).Component;
const value3 = ((Component) => <Component />)(ThemedStatusBar);
const SafeAreaProvider = (SafeAreaProviderNativeModule).SafeAreaProvider;
const items2 = [children];
const SafeAreaReporter = (SafeAreaProviderNativeModule).SafeAreaReporter;
items2[1] = <SafeAreaReporter />;
items2[2] = ((Component) => <Component />)(importDefault(13119) /* metro dependency 13119: DevToolsLazy */);
items2[3] = ((Component) => <Component />)(importDefault(14289) /* metro dependency 14289: ScreenRecordingPip */);
return (
<StartupProfiler profile={AppContainer}>
<ReanimatedScreenProvider>
<RootThemeContextProvider>
<ManaContextProvider {...manaContextProviderProps}>
<AccessibilityPreferencesContextProviderNative>
<Provider value={appEntryKeyBinding}>
<AppNavigationContainerOrEmpty appEntryKey={appEntryKeyBinding}>
<WebViewContextProvider>
<Router {...routerProps}>
<GestureWrapper>
<ErrorBoundary>
<PortalProvider>
<Component>
<KeyCommandsView>
{value3}
<SafeAreaProvider>
{items2}
</SafeAreaProvider>
</KeyCommandsView>
</Component>
</PortalProvider>
</ErrorBoundary>
</GestureWrapper>
</Router>
</WebViewContextProvider>
</AppNavigationContainerOrEmpty>
</Provider>
</AccessibilityPreferencesContextProviderNative>
</ManaContextProvider>
</RootThemeContextProvider>
</ReanimatedScreenProvider>
</StartupProfiler>
);
}
}
function captureException_100148(a0, a1) { // fn#100148, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13286:3683, offset: 0x021df693, size: 52 bytes, params: 3, frame: 13
const value = environment.__proto__.__proto__.__proto__;
return (importDefault(1216) /* metro dependency 1216: SentryUtilsNative */).captureException(a0, {tags: a1});
}
global.__d(_fun100128, 13096, [57, 31, 27, 6936, 1934, 661, 33, 4501, 697, 4017, 8750, 5321, 5083, 1239, 1217, 4008,
4510, 5457, 13097, 13098, 4007, 1230, 4048, 683, 4009, 13099, 5468, 1485, 1360, 13100, 477, 11340, 13101, 13109,
3932, 13111, 1481, 10710, 12074, 12080, 13112, 4027, 13113, 13115, 13117, 13118, 13119, 14289, 14297, 14298,
1216,
2]) /* metro module 13096, dependencies: [57, 31, 27, 6936, 1934, 661, 33, 4501, 697, 4017, 8750, 5321, 5083, 1239, 1217, 4008, 4510, 5457, 13097, 13098, 4007, 1230, 4048, 683, 4009, 13099, 5468, 1485, 1360, 13100, 477, 11340, 13101, 13109, 3932, 13111, 1481, 10710, 12074, 12080, 13112, 4027, 13113, 13115, 13117, 13118, 13119, 14289, 14297, 14298, 1216, 2] */;
+465 -432
View File
@@ -1,398 +1,159 @@
/* Metro module 15124; source: components_native/AutoAnalytics.tsx; dependencies: [6, 7, 15, 17, 18, 31, 4606, 1382, 4257, 4117, 1384, 1379, 1945, 1867, 4259, 4401, 4294, 1934, 3969, 6876, 4864, 1878, 661, 1386, 1880, 33, 4863, 7163, 15125, 4878, 6892, 683, 1360, 15126, 11250, 1900, 11236, 566, 15127, 15128, 2] */
import ClassCallCheck from '../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import ChannelStore from '../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import FavoriteStore from '../modules/favorites/FavoriteStore.tsx'; /* Metro dependency 1382 */
import StageInstanceStore from '../modules/stage_channels/StageInstanceStore.tsx'; /* Metro dependency 1384 */
import GuildStore from '../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import UserStore from '../stores/UserStore.tsx'; /* Metro dependency 1878 */
import PremiumTypeUtils from '../utils/PremiumTypeUtils.tsx'; /* Metro dependency 1900 */
import SelectedChannelStore from '../stores/SelectedChannelStore.tsx'; /* Metro dependency 1934 */
import GuildMemberStore from '../stores/GuildMemberStore.tsx'; /* Metro dependency 1945 */
import SelectedGuildStore from '../stores/SelectedGuildStore.tsx'; /* Metro dependency 3969 */
import GuildScheduledEventStore from '../modules/guild_scheduled_events/GuildScheduledEventStore.tsx'; /* Metro dependency 4117 */
import GatewayConnectionStore from '../modules/gateway/GatewayConnectionStore.tsx'; /* Metro dependency 4257 */
import MediaEngineStore from '../stores/MediaEngineStore.tsx'; /* Metro dependency 4259 */
import RTCConnectionStore from '../stores/RTCConnectionStore.tsx'; /* Metro dependency 4294 */
import NetworkStore from '../stores/NetworkStore.tsx'; /* Metro dependency 4401 */
import ChannelRTCStore from '../modules/calls/ChannelRTCStore.tsx'; /* Metro dependency 4606 */
import UserGuildSettingsStore from '../stores/UserGuildSettingsStore.tsx'; /* Metro dependency 4864 */
import SelfPresenceStore from '../stores/SelfPresenceStore.tsx'; /* Metro dependency 6876 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as FluxModule from '../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */
import * as GlobalUtilsModule from '../utils/GlobalUtils.tsx'; /* Metro dependency 1360 */
import * as ChannelConstantsModule from '../modules/channel/ChannelConstants.tsx'; /* Metro dependency 1386 */
import * as PremiumConstantsModule from '../modules/premium/PremiumConstants.tsx'; /* Metro dependency 1880 */
import * as FavoritesAnalyticsModule from '../modules/favorites/FavoritesAnalytics.tsx'; /* Metro dependency 11236 */
import * as FavoritesGuildExperimentModule from '../modules/favorites/FavoritesGuildExperiment.tsx'; /* Metro dependency 11250 */
function _fun115289(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115289, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15321:6, offset: 0x0245b474, size: 593 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
const value = importAll(31) /* metro dependency 31 */;
const channelRTCStore = importDefault(4606) /* metro dependency 4606: ChannelRTCStore */;
const favoriteStore = importDefault(1382) /* metro dependency 1382: FavoriteStore */;
const gatewayConnectionStore = importDefault(4257) /* metro dependency 4257: GatewayConnectionStore */;
const guildScheduledEventStore = importDefault(4117) /* metro dependency 4117: GuildScheduledEventStore */;
const stageInstanceStore = importDefault(1384) /* metro dependency 1384: StageInstanceStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const mediaEngineStore = importDefault(4259) /* metro dependency 4259: MediaEngineStore */;
const networkStore = importDefault(4401) /* metro dependency 4401: NetworkStore */;
const rtcConnectionStore = importDefault(4294) /* metro dependency 4294: RTCConnectionStore */;
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
const selectedGuildStore = importDefault(3969) /* metro dependency 3969: SelectedGuildStore */;
const selfPresenceStore = importDefault(6876) /* metro dependency 6876: SelfPresenceStore */;
const userGuildSettingsStore = importDefault(4864) /* metro dependency 4864: UserGuildSettingsStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_24 = constantsModule.AnalyticEvents;
const env0_25 = constantsModule.ActivityTypes;
const env0_26 = constantsModule.GuildFeatures;
const env0_27 = (require(1386) /* metro dependency 1386: ChannelConstants */).isStaticChannelRoute;
const env0_28 = (require(1880) /* metro dependency 1880: PremiumConstants */).PremiumTypes;
const env0_29 = (require(33) /* metro dependency 33 */).jsx;
const PureComponent = value.PureComponent;
const PureComponent = ReactModule.PureComponent;
const env0_30 = _fun115293(PureComponent);
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/AutoAnalytics.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/AutoAnalytics.tsx');
exports.default = ConnectedAutoAnalytics;
}
function _isNativeReflectConstruct_115290() { // fn#115290, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15321:467, offset: 0x0245b6c5, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
function _isNativeReflectConstruct_115290() { // fn#115290, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15321:467, offset: 0x0245b6c5, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_115290_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_115290_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun115293(a0) { // fn#115293, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15321:666, offset: 0x0245b727, size: 224 bytes, params: 2, frame: 16
const closure = AutoAnalytics;
env0_7(closure, a0);
return env0_4(closure, [{key: 'componentDidMount', value: value_115295}, {key: 'componentDidUpdate',
value: value_115296}, {key: 'trackFavoritesGuildViewed', value: value_115297}, {key: 'getGameMetadata',
value: function() {
var props = this.props;
return {game_platform: props.gamePlatform, game_name: props.gameName, game_id: props.gameId};
}}, {key: '_trackWithMetadata', value: value_115299}, {key: 'collectDefaultAnalyticsMetadata', value: function(a0,
a1) {
var r3;
var object = {guild_id: a0};
var value = null;
if (value != a1) {
var isStaticChannelRouteBinding = isStaticChannelRoute;
var value3 = undefined;
if (isStaticChannelRouteBinding(a1)) {
object.channel_static_route = a1;
return object;
function _fun115293(a0) { // fn#115293, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15321:666, offset: 0x0245b727, size: 224 bytes, params: 2, frame: 16
const AutoAnalytics2 = AutoAnalytics;
Inherits(AutoAnalytics2, a0);
return CreateClass(AutoAnalytics2, [{key: 'componentDidMount', value: value_115295}, {key: 'componentDidUpdate',
value: value_115296}, {key: 'trackFavoritesGuildViewed', value: value_115297}, {key: 'getGameMetadata',
value: function() {
var props = this.props;
return {game_platform: props.gamePlatform, game_name: props.gameName, game_id: props.gameId};
}}, {key: '_trackWithMetadata', value: value_115299}, {key: 'collectDefaultAnalyticsMetadata', value: function(a0,
a1) {
var r3;
var object = {guild_id: a0};
var value = null;
if (value != a1) {
var isStaticChannelRouteBinding = isStaticChannelRoute;
var value3 = undefined;
if (isStaticChannelRouteBinding(a1)) {
object.channel_static_route = a1;
return object;
}
var value4 = ChannelStore.getChannel(a1);
object.channel_id = a1;
r3 = value == value4 ? value3 : value4.type;
object.channel_type = value != r3 ? r3 : value;
}
var value4 = ChannelStore.getChannel(a1);
object.channel_id = a1;
r3 = value == value4 ? value3 : value4.type;
object.channel_type = value != r3 ? r3 : value;
return object;
}}, {key: 'render', value: function() {
return null;
}}]);
function AutoAnalytics() { // fn#115294, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15321:678, offset: 0x0245b807, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_3(this, AutoAnalytics);
const value3 = env1_6(AutoAnalytics);
return env1_5(this, _isNativeReflectConstruct_115290() ? global.Reflect.construct(value3, arguments,
env1_6(this).constructor) : value3.apply(this, arguments));
}
return object;
}}, {key: 'render', value: function() {
return null;
}}]);
}
function ConnectedAutoAnalytics() { // fn#115302, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15321:5526, offset: 0x0245c233, size: 925 bytes, params: 1, frame: 31
const value2 = undefined;
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStores = fluxModule.useStateFromStores;
const value4 = fluxModule.useStateFromStores([ChannelStore], _fun115304, [Reflect.apply(useStateFromStores,
fluxModule, [[SelectedChannelStore], function() {
return SelectedChannelStore.getVoiceChannelId();
}, []])]);
const channelId = fluxModule.useStateFromStores([SelectedChannelStore], function() {
return SelectedChannelStore.getChannelId(undefined, false);
});
const value5 = fluxModule.useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channelId);
}, [channelId]);
const value6 = null;
const nsfw = value6 == value5 ? value2 : value5.nsfw;
const value7 = fluxModule.useStateFromStores([ChannelRTCStore], _fun115307, [channelId]);
const value8 = fluxModule.useStateFromStores([SelfPresenceStore], function() {
return SelfPresenceStore.findActivity(_fun115309);
}, []);
const value9 = fluxModule.useStateFromStores([SelectedGuildStore], function() {
return SelectedGuildStore.getGuildId();
}, []);
const value10 = fluxModule.useStateFromStores([GuildStore], _fun115311, [value9]);
return ((Component) => <Component voiceChannelId={value6 == value4 ? value2 : value4.id} voiceChannelGuildId={value6 == value4 ? value2 : value4.getGuildId()} voiceChannelType={value6 == value4 ? value2 : value4.type} voiceChannelBitrate={value6 == value4 ? value2 : value4.bitrate} videoEnabled={fluxModule.useStateFromStores([MediaEngineStore],
function() {
return MediaEngineStore.isVideoEnabled();
}, [])} isScreenSharing={fluxModule.useStateFromStores([MediaEngineStore], function() {
return MediaEngineStore.isScreenSharing();
},
[])} gamePlatform={(importDefault(15128) /* metro dependency 15128: getGamePlatform */)(value8)} gameName={value6 != value8 ? value8.name : value6} gameId={value6 != value8 ? value8.application_id : value6} selectedChannelId={channelId} selectedGuildId={value9} connected={fluxModule.useStateFromStores([GatewayConnectionStore],
function() {
return GatewayConnectionStore.isConnected();
},
[])} isNSFWChannel={nsfw} hasPreviewEnabled={value6 == value10 ? value2 : value10.features.has(GuildFeatures.PREVIEW_ENABLED)} isMemberPending={fluxModule.useStateFromStores([GuildMemberStore],
_fun115313, [fluxModule.useStateFromStores([UserStore], function() {
return UserStore.getCurrentUser();
}, []),
value9])} postableChannelCount={(importDefault(15127) /* metro dependency 15127: usePostableChannelCount */)(value9)} isTextInVoice={value7} />)(env0_30);
}
function AutoAnalytics() { // fn#115294, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15321:678, offset: 0x0245b807, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_3(this, AutoAnalytics);
const value3 = env1_6(AutoAnalytics);
return env1_5(this, _isNativeReflectConstruct_115290() ? global.Reflect.construct(value3, arguments,
env1_6(this).constructor) : value3.apply(this, arguments));
}
function value_115295() { // fn#115295, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15321:968, offset: 0x0245b878, size: 433 bytes, params: 1, frame: 27
var r17;
var r4;
var _trackWithMetadata;
var value;
var CHANNEL_OPENED;
var object2;
var moduleValue;
var moduleValue2;
var GUILD_VIEWED;
const props = this.props;
const selectedChannelId = props.selectedChannelId;
const selectedGuildId = props.selectedGuildId;
const isMemberPending = props.isMemberPending;
const hasPreviewEnabled = props.hasPreviewEnabled;
const postableChannelCount = props.postableChannelCount;
if (selectedChannelId != null) {
_trackWithMetadata = this._trackWithMetadata;
value = environment.__proto__;
CHANNEL_OPENED = AnalyticEvents.CHANNEL_OPENED;
object2 = {};
moduleValue = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
copyDataProperties(object2, moduleValue.getChannelOpenedMetadata(selectedChannelId), moduleValue);
object2['selected_guild_id'] = selectedGuildId;
Reflect.apply(_trackWithMetadata, this, [CHANNEL_OPENED, object2]);
(importDefault(7163) /* metro dependency 7163: trackChannelOpenedClickstream */)({channelId: selectedChannelId});
if (props.isTextInVoice) {
moduleValue2 = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
moduleValue2.trackWithMetadata(AnalyticEvents.TEXT_IN_VOICE_OPENED, {channel_is_nsfw: props.isNSFWChannel});
r17 = moduleValue;
} else {
r17 = moduleValue;
}
}
if (selectedGuildId != null) {
r4 = isMemberPending ? {is_pending: isMemberPending, preview_enabled: hasPreviewEnabled} : {};
_trackWithMetadata = this._trackWithMetadata;
value = environment.__proto__;
GUILD_VIEWED = AnalyticEvents.GUILD_VIEWED;
object2 = {};
copyDataProperties(object2, r4, r17);
object2['postable_channels'] = postableChannelCount;
object2['viewing_all_channels'] = !UserGuildSettingsStore.isOptInEnabled(selectedGuildId);
value = require(15125) /* metro dependency 15125: GuildThemeAnalyticsUtils */;
copyDataProperties(object2, value.collectGuildThemeAnalyticsMetadata(selectedGuildId), r17);
Reflect.apply(_trackWithMetadata, this, [GUILD_VIEWED, object2]);
value = require(4878) /* metro dependency 4878: Clickstream */;
value.trackClickstream(AnalyticEvents.GUILD_VIEWED_CLICKSTREAM, {guild_id: selectedGuildId});
value = require(6892) /* metro dependency 6892: FavoritesUtils */;
if (value.isFavoritesGuildId(selectedGuildId)) {
this.trackFavoritesGuildViewed();
}
}
}
function value_115296(a0) { // fn#115296, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15321:1736, offset: 0x0245ba29, size: 1578 bytes, params: 2, frame: 37
var r20;
var id;
var r4;
var voiceChannelId3;
var value;
var value2;
var value3;
var value4;
var lastRTCConnectionState;
var value6;
var defaultImport;
var track;
var LEAVE_VOICE_CHANNEL;
var object;
var moduleValue;
var stageInstanceByChannel;
var activeEventByChannel;
var value9;
var defaultImport2;
var JOIN_VOICE_CHANNEL;
var filter;
const isNotNullish = (require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish;
var value11;
var defaultImport3;
var VIDEO_INPUT_TOGGLED;
var _trackWithMetadata;
var CHANNEL_OPENED;
var moduleValue2;
var moduleValue3;
var moduleValue4;
var moduleValue5;
var GUILD_VIEWED;
const {voiceChannelId, voiceChannelGuildId, voiceChannelType, voiceChannelBitrate, videoEnabled, selectedChannelId,
selectedGuildId, isNSFWChannel, isMemberPending, hasPreviewEnabled, isScreenSharing, postableChannelCount,
isTextInVoice} = this.props;
if (a0.voiceChannelId !== voiceChannelId) {
voiceChannelId3 = a0.voiceChannelId;
value = null;
if (value != voiceChannelId3) {
value2 = environment.__proto__;
value3 = StageInstanceStore.getStageInstanceByChannel(a0.voiceChannelId);
value4 = GuildScheduledEventStore.getActiveEventByChannel(a0.voiceChannelId);
lastRTCConnectionState = RTCConnectionStore.getLastRTCConnectionState();
value6 = undefined;
r20 = (value == lastRTCConnectionState ? value6 : lastRTCConnectionState.channelId) === a0.voiceChannelId ? lastRTCConnectionState : value;
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
track = defaultImport.track;
LEAVE_VOICE_CHANNEL = AnalyticEvents.LEAVE_VOICE_CHANNEL;
object = {};
object.channel_id = a0.voiceChannelId;
object.channel_type = a0.voiceChannelType;
object.channel_bitrate = a0.voiceChannelBitrate;
object.guild_id = a0.voiceChannelGuildId;
object.rtc_connection_id = value == r20 ? value6 : r20.rtcConnectionId;
object.duration = value == r20 ? value6 : r20.duration;
object.media_session_id = value == r20 ? value6 : r20.mediaSessionId;
id = value == value3 ? value6 : value3.id;
object.stage_instance_id = id;
id = value == value4 ? value6 : value4.id;
object.guild_scheduled_event_id = id;
moduleValue = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
copyDataProperties(object, moduleValue.getVoiceStateMetadata(a0.voiceChannelGuildId, a0.voiceChannelId,
a0.videoEnabled), undefined);
copyDataProperties(object, this.getGameMetadata(), undefined);
copyDataProperties(object,
value == r20 || value == r20.voiceStateAnalytics ? value6 : r20.voiceStateAnalytics.getStats(),
undefined);
Reflect.apply(track, defaultImport, [LEAVE_VOICE_CHANNEL, object]);
}
}
if (a0.voiceChannelId !== voiceChannelId) {
if (voiceChannelId != null) {
value = environment.__proto__;
stageInstanceByChannel = StageInstanceStore.getStageInstanceByChannel(voiceChannelId);
activeEventByChannel = GuildScheduledEventStore.getActiveEventByChannel(voiceChannelId);
value9 = undefined;
defaultImport2 = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
track = defaultImport2.track;
JOIN_VOICE_CHANNEL = AnalyticEvents.JOIN_VOICE_CHANNEL;
object = {channel_id: voiceChannelId, channel_type: voiceChannelType, channel_bitrate: voiceChannelBitrate,
guild_id: voiceChannelGuildId};
object.connection_type = NetworkStore.getType();
object.effective_connection_speed = NetworkStore.getEffectiveConnectionSpeed();
object.service_provider = NetworkStore.getServiceProvider();
id = stageInstanceByChannel == null ? value9 : stageInstanceByChannel.id;
object.stage_instance_id = id;
id = activeEventByChannel == null ? value9 : activeEventByChannel.id;
object.guild_scheduled_event_id = id;
object.join_voice_id = RTCConnectionStore.getJoinVoiceId();
value = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
copyDataProperties(object, value.getVoiceStateMetadata(voiceChannelGuildId, voiceChannelId, videoEnabled),
undefined);
copyDataProperties(object, this.getGameMetadata(), undefined);
Reflect.apply(track, defaultImport2, [JOIN_VOICE_CHANNEL, object]);
}
}
if (a0.videoEnabled !== videoEnabled) {
value = null;
if (value != voiceChannelId) {
object = [isScreenSharing ? 'screen' : value];
object[1] = videoEnabled ? 'camera' : value;
filter = object.filter;
value = environment.__proto__;
value11 = Reflect.apply(filter, object, [isNotNullish]);
r20 = isScreenSharing ? 'screen' : videoEnabled ? 'camera' : 'none';
defaultImport3 = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
track = defaultImport3.track;
VIDEO_INPUT_TOGGLED = AnalyticEvents.VIDEO_INPUT_TOGGLED;
object = {video_input_type: r20, enabled_inputs: value11, channel_id: voiceChannelId,
channel_type: voiceChannelType, guild_id: voiceChannelGuildId};
copyDataProperties(object, this.getGameMetadata(), undefined);
value = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
copyDataProperties(object, value.collectVoiceAnalyticsMetadata(voiceChannelId), undefined);
Reflect.apply(track, defaultImport3, [VIDEO_INPUT_TOGGLED, object]);
}
} else if (a0.isScreenSharing !== isScreenSharing) {
value = null;
if (value != voiceChannelId) {
object = [isScreenSharing ? 'screen' : value];
object[1] = videoEnabled ? 'camera' : value;
filter = object.filter;
value = environment.__proto__;
value11 = Reflect.apply(filter, object, [isNotNullish]);
r20 = isScreenSharing ? 'screen' : videoEnabled ? 'camera' : 'none';
defaultImport3 = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
track = defaultImport3.track;
VIDEO_INPUT_TOGGLED = AnalyticEvents.VIDEO_INPUT_TOGGLED;
object = {video_input_type: r20, enabled_inputs: value11, channel_id: voiceChannelId,
channel_type: voiceChannelType, guild_id: voiceChannelGuildId};
copyDataProperties(object, this.getGameMetadata(), undefined);
value = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
copyDataProperties(object, value.collectVoiceAnalyticsMetadata(voiceChannelId), undefined);
Reflect.apply(track, defaultImport3, [VIDEO_INPUT_TOGGLED, object]);
}
}
value = selectedChannelId == null;
if (!(value || a0.selectedChannelId === selectedChannelId && a0.selectedGuildId === selectedGuildId)) {
_trackWithMetadata = this._trackWithMetadata;
value = environment.__proto__;
CHANNEL_OPENED = AnalyticEvents.CHANNEL_OPENED;
object = {};
moduleValue2 = require(15126) /* metro dependency 15126: getChannelOpenedRouteTrackingProps */;
copyDataProperties(object, moduleValue2.getChannelOpenedRouteTrackingProps(selectedChannelId), undefined);
moduleValue3 = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
copyDataProperties(object, moduleValue3.getChannelOpenedMetadata(selectedChannelId), undefined);
object['selected_guild_id'] = selectedGuildId;
Reflect.apply(_trackWithMetadata, this, [CHANNEL_OPENED, object]);
(importDefault(7163) /* metro dependency 7163: trackChannelOpenedClickstream */)({channelId: selectedChannelId});
if (isTextInVoice) {
moduleValue4 = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
moduleValue4.trackWithMetadata(AnalyticEvents.TEXT_IN_VOICE_OPENED, {channel_is_nsfw: isNSFWChannel});
}
}
if (isTextInVoice && !a0.isTextInVoice) {
value = environment.__proto__;
moduleValue5 = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
moduleValue5.trackWithMetadata(AnalyticEvents.TEXT_IN_VOICE_OPENED, {channel_is_nsfw: isNSFWChannel});
}
if (selectedGuildId != null) {
if (a0.selectedGuildId !== selectedGuildId) {
r4 = isMemberPending ? {is_pending: isMemberPending, preview_enabled: hasPreviewEnabled} : {};
_trackWithMetadata = this._trackWithMetadata;
value = environment.__proto__;
GUILD_VIEWED = AnalyticEvents.GUILD_VIEWED;
object = {};
copyDataProperties(object, r4, undefined);
object['postable_channels'] = postableChannelCount;
object['viewing_all_channels'] = !UserGuildSettingsStore.isOptInEnabled(selectedGuildId);
value = require(15125) /* metro dependency 15125: GuildThemeAnalyticsUtils */;
copyDataProperties(object, value.collectGuildThemeAnalyticsMetadata(selectedGuildId), undefined);
Reflect.apply(_trackWithMetadata, this, [GUILD_VIEWED, object]);
value = require(4878) /* metro dependency 4878: Clickstream */;
value.trackClickstream(AnalyticEvents.GUILD_VIEWED_CLICKSTREAM, {guild_id: selectedGuildId});
value = require(6892) /* metro dependency 6892: FavoritesUtils */;
if (value.isFavoritesGuildId(selectedGuildId)) {
this.trackFavoritesGuildViewed();
function value_115295() { // fn#115295, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15321:968, offset: 0x0245b878, size: 433 bytes, params: 1, frame: 27
var r17;
var r4;
var _trackWithMetadata;
var value;
var CHANNEL_OPENED;
var object;
var moduleValue;
var moduleValue2;
var GUILD_VIEWED;
var userGuildSettingsStoreBinding;
const props = this.props;
const selectedChannelId = props.selectedChannelId;
const selectedGuildId = props.selectedGuildId;
const isMemberPending = props.isMemberPending;
const hasPreviewEnabled = props.hasPreviewEnabled;
const postableChannelCount = props.postableChannelCount;
if (selectedChannelId != null) {
_trackWithMetadata = this._trackWithMetadata;
value = environment.__proto__;
CHANNEL_OPENED = AnalyticEvents.CHANNEL_OPENED;
object = {};
moduleValue = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
copyDataProperties(object, moduleValue.getChannelOpenedMetadata(selectedChannelId), moduleValue);
object['selected_guild_id'] = selectedGuildId;
Reflect.apply(_trackWithMetadata, this, [CHANNEL_OPENED, object]);
(importDefault(7163) /* metro dependency 7163: trackChannelOpenedClickstream */)({channelId: selectedChannelId});
if (props.isTextInVoice) {
moduleValue2 = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
moduleValue2.trackWithMetadata(AnalyticEvents.TEXT_IN_VOICE_OPENED, {channel_is_nsfw: props.isNSFWChannel});
r17 = moduleValue;
} else {
r17 = moduleValue;
}
}
} else if (isMemberPending) {
if (!a0.isMemberPending) {
if (selectedGuildId != null) {
r4 = isMemberPending ? {is_pending: isMemberPending, preview_enabled: hasPreviewEnabled} : {};
_trackWithMetadata = this._trackWithMetadata;
value = environment.__proto__;
GUILD_VIEWED = AnalyticEvents.GUILD_VIEWED;
object = {};
copyDataProperties(object, r4, undefined);
copyDataProperties(object, r4, r17);
object['postable_channels'] = postableChannelCount;
object['viewing_all_channels'] = !UserGuildSettingsStore.isOptInEnabled(selectedGuildId);
userGuildSettingsStoreBinding = UserGuildSettingsStore;
object['viewing_all_channels'] = !userGuildSettingsStoreBinding.isOptInEnabled(selectedGuildId);
value = require(15125) /* metro dependency 15125: GuildThemeAnalyticsUtils */;
copyDataProperties(object, value.collectGuildThemeAnalyticsMetadata(selectedGuildId), undefined);
copyDataProperties(object, value.collectGuildThemeAnalyticsMetadata(selectedGuildId), r17);
Reflect.apply(_trackWithMetadata, this, [GUILD_VIEWED, object]);
value = require(4878) /* metro dependency 4878: Clickstream */;
value.trackClickstream(AnalyticEvents.GUILD_VIEWED_CLICKSTREAM, {guild_id: selectedGuildId});
@@ -402,70 +163,342 @@ function value_115296(a0) { // fn#115296, source: /ci/build/discord/discord/disc
}
}
}
}
}
function value_115297() { // fn#115297, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15321:4567, offset: 0x0245c053, size: 159 bytes, params: 1, frame: 20
const value = environment.__proto__;
const FavoritesGuildExperiment = (require(11250) /* metro dependency 11250: FavoritesGuildExperiment */).FavoritesGuildExperiment;
const getConfig = FavoritesGuildExperiment.getConfig;
const enabled = Reflect.apply(getConfig, FavoritesGuildExperiment, [{location: 'AutoAnalytics'}]).enabled;
const defaultImport = importDefault(1900) /* metro dependency 1900: PremiumTypeUtils */;
const isPremiumExactly = defaultImport.isPremiumExactly;
const currentUser = UserStore.getCurrentUser();
const TIER_2 = PremiumTypes.TIER_2;
const isPremiumExactly2 = Reflect.apply(isPremiumExactly, defaultImport, [currentUser, TIER_2]);
const favoritesAnalyticsModule = require(11236) /* metro dependency 11236: FavoritesAnalytics */;
favoritesAnalyticsModule.trackFavoritesGuildViewed('manual_browsing', FavoriteStore.getFavoritesCount(), enabled,
isPremiumExactly2);
}
function value_115299(a0) { // fn#115299, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15321:4969, offset: 0x0245c11f, size: 177 bytes, params: 2, frame: 19
var object2;
var defaultImport;
let value = a1;
const r3 = value !== undefined ? value : {};
const {connected, selectedGuildId, selectedChannelId} = this.props;
value = environment.__proto__;
if (connected) {
(require(4863) /* metro dependency 4863: AppAnalyticsUtils */).trackWithMetadata(a0, r3);
} else {
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
if (!defaultImport.isThrottled(a0)) {
object2 = {};
copyDataProperties(object2, r3, this);
copyDataProperties(object2, this.collectDefaultAnalyticsMetadata(selectedGuildId, selectedChannelId), this);
(importDefault(683) /* metro dependency 683: AnalyticsUtils */).track(a0, object2);
function value_115296(a0) { // fn#115296, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15321:1736, offset: 0x0245ba29, size: 1578 bytes, params: 2, frame: 37
var r20;
var id;
var r4;
var voiceChannelId3;
var value;
var value2;
var stageInstanceStoreBinding;
var value3;
var guildScheduledEventStoreBinding;
var value4;
var lastRTCConnectionState;
var value6;
var defaultImport;
var track;
var LEAVE_VOICE_CHANNEL;
var object;
var moduleValue;
var stageInstanceByChannel;
var activeEventByChannel;
var value9;
var defaultImport2;
var JOIN_VOICE_CHANNEL;
var networkStoreBinding;
var filter;
const isNotNullish = (GlobalUtilsModule).isNotNullish;
var value11;
var defaultImport3;
var VIDEO_INPUT_TOGGLED;
var _trackWithMetadata;
var CHANNEL_OPENED;
var moduleValue2;
var moduleValue3;
var moduleValue4;
var moduleValue5;
var GUILD_VIEWED;
var userGuildSettingsStoreBinding;
const {voiceChannelId, voiceChannelGuildId, voiceChannelType, voiceChannelBitrate, videoEnabled, selectedChannelId,
selectedGuildId, isNSFWChannel, isMemberPending, hasPreviewEnabled, isScreenSharing, postableChannelCount,
isTextInVoice} = this.props;
if (a0.voiceChannelId !== voiceChannelId) {
voiceChannelId3 = a0.voiceChannelId;
value = null;
if (value != voiceChannelId3) {
value2 = environment.__proto__;
stageInstanceStoreBinding = StageInstanceStore;
value3 = stageInstanceStoreBinding.getStageInstanceByChannel(a0.voiceChannelId);
guildScheduledEventStoreBinding = GuildScheduledEventStore;
value4 = guildScheduledEventStoreBinding.getActiveEventByChannel(a0.voiceChannelId);
lastRTCConnectionState = RTCConnectionStore.getLastRTCConnectionState();
value6 = undefined;
r20 = (value == lastRTCConnectionState ? value6 : lastRTCConnectionState.channelId) === a0.voiceChannelId ? lastRTCConnectionState : value;
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
track = defaultImport.track;
LEAVE_VOICE_CHANNEL = AnalyticEvents.LEAVE_VOICE_CHANNEL;
object = {};
object.channel_id = a0.voiceChannelId;
object.channel_type = a0.voiceChannelType;
object.channel_bitrate = a0.voiceChannelBitrate;
object.guild_id = a0.voiceChannelGuildId;
object.rtc_connection_id = value == r20 ? value6 : r20.rtcConnectionId;
object.duration = value == r20 ? value6 : r20.duration;
object.media_session_id = value == r20 ? value6 : r20.mediaSessionId;
id = value == value3 ? value6 : value3.id;
object.stage_instance_id = id;
id = value == value4 ? value6 : value4.id;
object.guild_scheduled_event_id = id;
moduleValue = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
copyDataProperties(object, moduleValue.getVoiceStateMetadata(a0.voiceChannelGuildId, a0.voiceChannelId,
a0.videoEnabled), undefined);
copyDataProperties(object, this.getGameMetadata(), undefined);
copyDataProperties(object,
value == r20 || value == r20.voiceStateAnalytics ? value6 : r20.voiceStateAnalytics.getStats(),
undefined);
Reflect.apply(track, defaultImport, [LEAVE_VOICE_CHANNEL, object]);
}
}
if (a0.voiceChannelId !== voiceChannelId) {
if (voiceChannelId != null) {
value = environment.__proto__;
stageInstanceByChannel = StageInstanceStore.getStageInstanceByChannel(voiceChannelId);
activeEventByChannel = GuildScheduledEventStore.getActiveEventByChannel(voiceChannelId);
value9 = undefined;
defaultImport2 = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
track = defaultImport2.track;
JOIN_VOICE_CHANNEL = AnalyticEvents.JOIN_VOICE_CHANNEL;
object = {channel_id: voiceChannelId, channel_type: voiceChannelType, channel_bitrate: voiceChannelBitrate,
guild_id: voiceChannelGuildId};
networkStoreBinding = NetworkStore;
object.connection_type = networkStoreBinding.getType();
object.effective_connection_speed = networkStoreBinding.getEffectiveConnectionSpeed();
object.service_provider = networkStoreBinding.getServiceProvider();
id = stageInstanceByChannel == null ? value9 : stageInstanceByChannel.id;
object.stage_instance_id = id;
id = activeEventByChannel == null ? value9 : activeEventByChannel.id;
object.guild_scheduled_event_id = id;
object.join_voice_id = RTCConnectionStore.getJoinVoiceId();
value = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
copyDataProperties(object, value.getVoiceStateMetadata(voiceChannelGuildId, voiceChannelId, videoEnabled),
undefined);
copyDataProperties(object, this.getGameMetadata(), undefined);
Reflect.apply(track, defaultImport2, [JOIN_VOICE_CHANNEL, object]);
}
}
if (a0.videoEnabled !== videoEnabled) {
value = null;
if (value != voiceChannelId) {
object = [isScreenSharing ? 'screen' : value];
object[1] = videoEnabled ? 'camera' : value;
filter = object.filter;
value = environment.__proto__;
value11 = Reflect.apply(filter, object, [isNotNullish]);
r20 = isScreenSharing ? 'screen' : videoEnabled ? 'camera' : 'none';
defaultImport3 = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
track = defaultImport3.track;
VIDEO_INPUT_TOGGLED = AnalyticEvents.VIDEO_INPUT_TOGGLED;
object = {video_input_type: r20, enabled_inputs: value11, channel_id: voiceChannelId,
channel_type: voiceChannelType, guild_id: voiceChannelGuildId};
copyDataProperties(object, this.getGameMetadata(), undefined);
value = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
copyDataProperties(object, value.collectVoiceAnalyticsMetadata(voiceChannelId), undefined);
Reflect.apply(track, defaultImport3, [VIDEO_INPUT_TOGGLED, object]);
}
} else if (a0.isScreenSharing !== isScreenSharing) {
value = null;
if (value != voiceChannelId) {
object = [isScreenSharing ? 'screen' : value];
object[1] = videoEnabled ? 'camera' : value;
filter = object.filter;
value = environment.__proto__;
value11 = Reflect.apply(filter, object, [isNotNullish]);
r20 = isScreenSharing ? 'screen' : videoEnabled ? 'camera' : 'none';
defaultImport3 = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
track = defaultImport3.track;
VIDEO_INPUT_TOGGLED = AnalyticEvents.VIDEO_INPUT_TOGGLED;
object = {video_input_type: r20, enabled_inputs: value11, channel_id: voiceChannelId,
channel_type: voiceChannelType, guild_id: voiceChannelGuildId};
copyDataProperties(object, this.getGameMetadata(), undefined);
value = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
copyDataProperties(object, value.collectVoiceAnalyticsMetadata(voiceChannelId), undefined);
Reflect.apply(track, defaultImport3, [VIDEO_INPUT_TOGGLED, object]);
}
}
value = selectedChannelId == null;
if (!(value || a0.selectedChannelId === selectedChannelId && a0.selectedGuildId === selectedGuildId)) {
_trackWithMetadata = this._trackWithMetadata;
value = environment.__proto__;
CHANNEL_OPENED = AnalyticEvents.CHANNEL_OPENED;
object = {};
moduleValue2 = require(15126) /* metro dependency 15126: getChannelOpenedRouteTrackingProps */;
copyDataProperties(object, moduleValue2.getChannelOpenedRouteTrackingProps(selectedChannelId), undefined);
moduleValue3 = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
copyDataProperties(object, moduleValue3.getChannelOpenedMetadata(selectedChannelId), undefined);
object['selected_guild_id'] = selectedGuildId;
Reflect.apply(_trackWithMetadata, this, [CHANNEL_OPENED, object]);
(importDefault(7163) /* metro dependency 7163: trackChannelOpenedClickstream */)({channelId: selectedChannelId});
if (isTextInVoice) {
moduleValue4 = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
moduleValue4.trackWithMetadata(AnalyticEvents.TEXT_IN_VOICE_OPENED, {channel_is_nsfw: isNSFWChannel});
}
}
if (isTextInVoice && !a0.isTextInVoice) {
value = environment.__proto__;
moduleValue5 = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
moduleValue5.trackWithMetadata(AnalyticEvents.TEXT_IN_VOICE_OPENED, {channel_is_nsfw: isNSFWChannel});
}
if (selectedGuildId != null) {
if (a0.selectedGuildId !== selectedGuildId) {
r4 = isMemberPending ? {is_pending: isMemberPending, preview_enabled: hasPreviewEnabled} : {};
_trackWithMetadata = this._trackWithMetadata;
value = environment.__proto__;
GUILD_VIEWED = AnalyticEvents.GUILD_VIEWED;
object = {};
copyDataProperties(object, r4, undefined);
object['postable_channels'] = postableChannelCount;
userGuildSettingsStoreBinding = UserGuildSettingsStore;
object['viewing_all_channels'] = !userGuildSettingsStoreBinding.isOptInEnabled(selectedGuildId);
value = require(15125) /* metro dependency 15125: GuildThemeAnalyticsUtils */;
copyDataProperties(object, value.collectGuildThemeAnalyticsMetadata(selectedGuildId), undefined);
Reflect.apply(_trackWithMetadata, this, [GUILD_VIEWED, object]);
value = require(4878) /* metro dependency 4878: Clickstream */;
value.trackClickstream(AnalyticEvents.GUILD_VIEWED_CLICKSTREAM, {guild_id: selectedGuildId});
value = require(6892) /* metro dependency 6892: FavoritesUtils */;
if (value.isFavoritesGuildId(selectedGuildId)) {
this.trackFavoritesGuildViewed();
}
} else if (isMemberPending) {
if (!a0.isMemberPending) {
r4 = isMemberPending ? {is_pending: isMemberPending, preview_enabled: hasPreviewEnabled} : {};
_trackWithMetadata = this._trackWithMetadata;
value = environment.__proto__;
GUILD_VIEWED = AnalyticEvents.GUILD_VIEWED;
object = {};
copyDataProperties(object, r4, undefined);
object['postable_channels'] = postableChannelCount;
userGuildSettingsStoreBinding = UserGuildSettingsStore;
object['viewing_all_channels'] = !userGuildSettingsStoreBinding.isOptInEnabled(selectedGuildId);
value = require(15125) /* metro dependency 15125: GuildThemeAnalyticsUtils */;
copyDataProperties(object, value.collectGuildThemeAnalyticsMetadata(selectedGuildId), undefined);
Reflect.apply(_trackWithMetadata, this, [GUILD_VIEWED, object]);
value = require(4878) /* metro dependency 4878: Clickstream */;
value.trackClickstream(AnalyticEvents.GUILD_VIEWED_CLICKSTREAM, {guild_id: selectedGuildId});
value = require(6892) /* metro dependency 6892: FavoritesUtils */;
if (value.isFavoritesGuildId(selectedGuildId)) {
this.trackFavoritesGuildViewed();
}
}
}
}
}
function value_115297() { // fn#115297, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15321:4567, offset: 0x0245c053, size: 159 bytes, params: 1, frame: 20
const value = environment.__proto__;
const FavoritesGuildExperiment = (FavoritesGuildExperimentModule).FavoritesGuildExperiment;
const getConfig = FavoritesGuildExperiment.getConfig;
const enabled = Reflect.apply(getConfig, FavoritesGuildExperiment, [{location: 'AutoAnalytics'}]).enabled;
const defaultImport = PremiumTypeUtils;
const isPremiumExactly = defaultImport.isPremiumExactly;
const currentUser = UserStore.getCurrentUser();
const TIER_2 = PremiumTypes.TIER_2;
const isPremiumExactly2 = Reflect.apply(isPremiumExactly, defaultImport, [currentUser, TIER_2]);
FavoritesAnalyticsModule.trackFavoritesGuildViewed('manual_browsing', FavoriteStore.getFavoritesCount(), enabled,
isPremiumExactly2);
}
function value_115299(a0) { // fn#115299, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15321:4969, offset: 0x0245c11f, size: 177 bytes, params: 2, frame: 19
var object;
var defaultImport;
let value = a1;
const r3 = value !== undefined ? value : {};
const {connected, selectedGuildId, selectedChannelId} = this.props;
value = environment.__proto__;
if (connected) {
(require(4863) /* metro dependency 4863: AppAnalyticsUtils */).trackWithMetadata(a0, r3);
} else {
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
if (!defaultImport.isThrottled(a0)) {
object = {};
copyDataProperties(object, r3, this);
copyDataProperties(object, this.collectDefaultAnalyticsMetadata(selectedGuildId, selectedChannelId), this);
(importDefault(683) /* metro dependency 683: AnalyticsUtils */).track(a0, object);
}
}
}
}
}
function _fun115307() { // fn#115307, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15321:5878, offset: 0x0245c630, size: 40 bytes, params: 1, frame: 12
return channelId != null && ChannelRTCStore.getChatOpen(channelId);
}
function ConnectedAutoAnalytics() { // fn#115302, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15321:5526, offset: 0x0245c233, size: 925 bytes, params: 1, frame: 31
const value2 = undefined;
let useStateFromStores = FluxModule.useStateFromStores;
const selectedChannelStoreBinding = SelectedChannelStore;
const value3 = Reflect.apply(useStateFromStores, FluxModule, [[selectedChannelStoreBinding], function() {
return SelectedChannelStore.getVoiceChannelId();
}, []]);
useStateFromStores = FluxModule.useStateFromStores;
const channelStoreBinding = ChannelStore;
const value4 = Reflect.apply(useStateFromStores, FluxModule, [[channelStoreBinding], _fun115304, [value3]]);
const channelId = FluxModule.useStateFromStores([selectedChannelStoreBinding], function() {
return SelectedChannelStore.getChannelId(undefined, false);
});
const value5 = FluxModule.useStateFromStores([channelStoreBinding], function() {
return ChannelStore.getChannel(channelId);
}, [channelId]);
const value6 = null;
const nsfw = value6 == value5 ? value2 : value5.nsfw;
const value7 = FluxModule.useStateFromStores([ChannelRTCStore], _fun115307, [channelId]);
const value8 = FluxModule.useStateFromStores([SelfPresenceStore], function() {
return SelfPresenceStore.findActivity(_fun115309);
}, []);
const value9 = FluxModule.useStateFromStores([SelectedGuildStore], function() {
return SelectedGuildStore.getGuildId();
}, []);
const value10 = FluxModule.useStateFromStores([GuildStore], _fun115311, [value9]);
const value12 = FluxModule.useStateFromStores([GuildMemberStore], _fun115313,
[FluxModule.useStateFromStores([UserStore], function() {
return UserStore.getCurrentUser();
}, []), value9]);
useStateFromStores = FluxModule.useStateFromStores;
const mediaEngineStoreBinding = MediaEngineStore;
return ((Component) => <Component voiceChannelId={value6 == value4 ? value2 : value4.id} voiceChannelGuildId={value6 == value4 ? value2 : value4.getGuildId()} voiceChannelType={value6 == value4 ? value2 : value4.type} voiceChannelBitrate={value6 == value4 ? value2 : value4.bitrate} videoEnabled={Reflect.apply(useStateFromStores,
FluxModule, [[mediaEngineStoreBinding], function() {
return MediaEngineStore.isVideoEnabled();
}, []])} isScreenSharing={FluxModule.useStateFromStores([mediaEngineStoreBinding], function() {
return MediaEngineStore.isScreenSharing();
},
[])} gamePlatform={(importDefault(15128) /* metro dependency 15128: getGamePlatform */)(value8)} gameName={value6 != value8 ? value8.name : value6} gameId={value6 != value8 ? value8.application_id : value6} selectedChannelId={channelId} selectedGuildId={value9} connected={FluxModule.useStateFromStores([GatewayConnectionStore],
function() {
return GatewayConnectionStore.isConnected();
},
[])} isNSFWChannel={nsfw} hasPreviewEnabled={value6 == value10 ? value2 : value10.features.has(GuildFeatures.PREVIEW_ENABLED)} isMemberPending={value12} postableChannelCount={(importDefault(15127) /* metro dependency 15127: usePostableChannelCount */)(value9)} isTextInVoice={value7} />)(env0_30);
function _fun115304() { // fn#115304, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15321:5665, offset: 0x0245c5e3, size: 26 bytes, params: 1, frame: 11
return ChannelStore.getChannel(env0_0);
}
function _fun115308() { // fn#115308, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15321:5949, offset: 0x0245c658, size: 29 bytes, params: 1, frame: 11
return SelfPresenceStore.findActivity(function({type}) {
return type === ActivityTypes.PLAYING;
});
}
function _fun115307() { // fn#115307, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15321:5878, offset: 0x0245c630, size: 40 bytes, params: 1, frame: 12
return channelId != null && ChannelRTCStore.getChatOpen(channelId);
}
function _fun115311() { // fn#115311, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15321:6092, offset: 0x0245c6a3, size: 27 bytes, params: 1, frame: 11
return GuildStore.getGuild(env0_2);
}
function _fun115308() { // fn#115308, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15321:5949, offset: 0x0245c658, size: 29 bytes, params: 1, frame: 11
return SelfPresenceStore.findActivity(function({type}) {
return type === ActivityTypes.PLAYING;
});
function _fun115309({type}) { // fn#115309, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15321:5969, offset: 0x0245c675, size: 27 bytes, params: 2, frame: 2
const PLAYING = ActivityTypes.PLAYING;
return type === PLAYING;
}
}
function _fun115311() { // fn#115311, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15321:6092, offset: 0x0245c6a3, size: 27 bytes, params: 1, frame: 11
return GuildStore.getGuild(env0_2);
}
function _fun115313() { // fn#115313, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15321:6214, offset: 0x0245c6be, size: 89 bytes, params: 1, frame: 15
var isPending;
var value4;
var guildMemberStoreBinding;
var value;
let r0 = ClassCallCheck != null && env0_2 != null;
if (r0) {
value4 = environment.__proto__;
guildMemberStoreBinding = GuildMemberStore;
value = guildMemberStoreBinding.getMember(env0_2, ClassCallCheck.id);
isPending = value?.isPending;
value = isPending != null;
r0 = value && isPending;
}
return r0;
}
function _fun115313() { // fn#115313, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15321:6214, offset: 0x0245c6be, size: 89 bytes, params: 1, frame: 15
var isPending;
var value4;
var value;
let r0 = env0_3 != null && env0_2 != null;
if (r0) {
value4 = environment.__proto__;
value = GuildMemberStore.getMember(env0_2, env0_3.id);
isPending = value?.isPending;
value = isPending != null;
r0 = value && isPending;
}
return r0;
}
global.__d(_fun115289, 15124, [6, 7, 15, 17, 18, 31, 4606, 1382, 4257, 4117, 1384, 1379, 1945, 1867, 4259, 4401,
4294, 1934, 3969, 6876, 4864, 1878, 661, 1386, 1880, 33, 4863, 7163, 15125, 4878, 6892, 683, 1360, 15126, 11250,
1900, 11236, 566, 15127, 15128,
2]) /* metro module 15124, dependencies: [6, 7, 15, 17, 18, 31, 4606, 1382, 4257, 4117, 1384, 1379, 1945, 1867, 4259, 4401, 4294, 1934, 3969, 6876, 4864, 1878, 661, 1386, 1880, 33, 4863, 7163, 15125, 4878, 6892, 683, 1360, 15126, 11250, 1900, 11236, 566, 15127, 15128, 2] */;
+508 -457
View File
@@ -1,484 +1,535 @@
/* Metro module 13940; source: components_native/ChangeLogModal.tsx; dependencies: [6, 7, 15, 17, 18, 31, 27, 661, 1933, 33, 4501, 697, 3868, 9544, 683, 13941, 5475, 9543, 1244, 5278, 8792, 11059, 1305, 8336, 1478, 8337, 1485, 5282, 3738, 8338, 4573, 5080, 5280, 2] */
import ClassCallCheck from '../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import UseWindowDimensionsNative from '../modules/screen/useWindowDimensions.native.tsx'; /* Metro dependency 1478 */
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 IndexNativeModule from '../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as Module01485Module from '../by-id/module-01485.js'; /* Metro dependency 1485 */
import * as ChangelogConstantsModule from '../modules/changelog/ChangelogConstants.tsx'; /* Metro dependency 1933 */
import * as NativeModule from '../external/discord_common/js/packages/design/native.tsx'; /* Metro dependency 3868 */
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 PressablesModule from '../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as NavigatorNativeModule from '../design/components/Navigator/native/Navigator.native.tsx'; /* Metro dependency 5280 */
import * as NavigatorHeaderNativeModule from '../design/components/Navigator/native/NavigatorHeader.native.tsx'; /* Metro dependency 5282 */
import * as UseCurrentChangelogModule from '../modules/changelog/useCurrentChangelog.tsx'; /* Metro dependency 8337 */
function _fun105809(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#105809, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14137:6, offset: 0x022c34d8, size: 831 bytes, params: 8, frame: 25
var object2;
const env0_0 = require;
const closure = ChangeLogScreen;
const ChangeLogScreen2 = ChangeLogScreen;
const hideChangeLog = function() {
importDefault(dependencyMap[31]).popWithKey(CHANGELOG_MODAL_KEY);
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
const value = importAll(31) /* metro dependency 31 */;
const env0_9 = (require(27) /* metro dependency 27 */).View;
const env0_10 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
const env0_11 = (require(1933) /* metro dependency 1933: ChangelogConstants */).CHANGELOG_MODAL_KEY;
const value2 = require(33) /* metro dependency 33 */;
const env0_12 = value2.jsx;
const env0_13 = value2.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
let createLegacyClassComponentStyles = createStylesModule.createLegacyClassComponentStyles;
object2 = {};
object2.video = {alignSelf: 'center'};
object2.videoWrapper = {marginBottom: 8};
const object3 = {};
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object3.overflow = 'hidden';
object2.videoSpecial = object3;
object2.videoOverlay = {'position': 'absolute', 'width': '100%', 'height': '100%'};
const object6 = {'position': 'absolute', 'top': '50%', 'left': '50%', 'marginLeft': -28, 'marginTop': -28,
let createLegacyClassComponentStyles = CreateStylesModule.createLegacyClassComponentStyles;
object = {};
object.video = {alignSelf: 'center'};
object.videoWrapper = {marginBottom: 8};
const object4 = {};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object4.overflow = 'hidden';
object.videoSpecial = object4;
object.videoOverlay = {'position': 'absolute', 'width': '100%', 'height': '100%'};
const object5 = {'position': 'absolute', 'top': '50%', 'left': '50%', 'marginLeft': -28, 'marginTop': -28,
'borderRadius': null, 'backgroundColor': null, 'width': 56, 'height': 56};
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object6.backgroundColor = BACKGROUND_SURFACE_HIGH;
object2.playButton = object6;
object2.playIcon = {'width': 21, 'height': 21};
object2.empty = {'width': '100%', 'height': 240, 'alignItems': 'center', 'paddingTop': 48};
const env0_15 = Reflect.apply(createLegacyClassComponentStyles, createStylesModule, [object2]);
const value4 = createStylesModule;
createLegacyClassComponentStyles = value4.createLegacyClassComponentStyles;
object2 = {};
object5.backgroundColor = BACKGROUND_SURFACE_HIGH;
object.playButton = object5;
object.playIcon = {'width': 21, 'height': 21};
object.empty = {'width': '100%', 'height': 240, 'alignItems': 'center', 'paddingTop': 48};
const env0_15 = Reflect.apply(createLegacyClassComponentStyles, CreateStylesModule, [object]);
createLegacyClassComponentStyles = CreateStylesModule.createLegacyClassComponentStyles;
object = {};
const BACKGROUND_MOD_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_STRONG;
object2.bulletPoint = {'width': 7, 'height': 7, 'borderRadius': 3.5, 'marginRight': 13, 'marginTop': 7,
object.bulletPoint = {'width': 7, 'height': 7, 'borderRadius': 3.5, 'marginRight': 13, 'marginTop': 7,
backgroundColor: BACKGROUND_MOD_STRONG};
object2.listItem = {'flexDirection': 'row', 'marginLeft': 4, 'marginBottom': 8};
object.listItem = {'flexDirection': 'row', 'marginLeft': 4, 'marginBottom': 8};
const TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_DEFAULT;
object2.listText = {'color': null, 'fontSize': 14, 'lineHeight': 18, 'flex': 1, color: TEXT_DEFAULT};
object2.listItemContent = {'flexDirection': 'column', 'flex': 1};
const env0_16 = Reflect.apply(createLegacyClassComponentStyles, value4, [object2]);
let PureComponent = value.PureComponent;
object.listText = {'color': null, 'fontSize': 14, 'lineHeight': 18, 'flex': 1, color: TEXT_DEFAULT};
object.listItemContent = {'flexDirection': 'column', 'flex': 1};
const env0_16 = Reflect.apply(createLegacyClassComponentStyles, CreateStylesModule, [object]);
let PureComponent = ReactModule.PureComponent;
const value5 = _fun105821(PureComponent);
const ThemeContext = (require(3868) /* metro dependency 3868: native */).ThemeContext;
const ThemeContext = (NativeModule).ThemeContext;
value5.contextType = ThemeContext;
PureComponent = value.PureComponent;
PureComponent = ReactModule.PureComponent;
_fun105824(PureComponent).contextType = ThemeContext;
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/ChangeLogModal.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/ChangeLogModal.tsx');
exports.default = ChangelogModal;
exports.ListItem = value5;
exports.ChangeLogScreen = closure;
}
function _callSuper_105810(a0, a1, a2) { // fn#105810, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14137:255, offset: 0x022c3817, size: 100 bytes, params: 4, frame: 20
var r0;
var Reflect;
let value = a2;
const value3 = env0_6(a1);
const binding = env0_5;
if (_isNativeReflectConstruct_105811()) {
Reflect = global.Reflect;
value = Reflect.construct(value3, value || [], env0_6(a0).constructor);
r0 = value;
} else {
value = value3.apply(a0, value);
r0 = value;
}
return binding(a0, r0);
}
function _isNativeReflectConstruct_105811() { // fn#105811, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14137:386, offset: 0x022c387b, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_105811_isNativeReflectConstruct = function() {
return !!result;
})();
}
function ChangeLogScreen({onClose}) { // fn#105814, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14137:4511, offset: 0x022c38dd, size: 666 bytes, params: 2, frame: 25
var r0;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
var object3;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var string;
var t;
const value2 = (require(4501) /* metro dependency 4501: createStyles */).useLegacyClassComponentStyles(env0_15);
const {changelog, loaded,
clientTooOld} = (require(8337) /* metro dependency 8337: useCurrentChangelog */).useCurrentChangelog();
let {width, height} = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)();
const value5 = width - 36;
const value6 = value5 * env0_14;
const value7 = 0.5 * height;
const object4 = {};
const Math = global.Math;
object4.height = Math.min(value6, value7);
object4.width = value6 > value7 ? value7 / env0_14 : value5;
width = object4.width;
height = object4.height;
const value9 = (require(1485) /* metro dependency 1485 */).useNavigation();
const r10 = onClose ?? ChangeLogScreenE;
env0_8.useEffect(_fun105816, [changelog, value9]);
env0_8.useEffect(function() {
if (loaded) {
if (changelog != null) {
return _fun105819;
}
}
}, [loaded, changelog]);
if (clientTooOld) {
r0 = <View style={value2.empty}><Text variant="heading-lg/medium">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.V9ospk)}</Text></View>;
} else if (changelog == null) {
var viewBindingProps = {style: value2.empty};
object3 = {variant: 'text-md/semibold'};
string = intl.string;
t = (require(1244) /* metro dependency 1244: indexNative */).t;
if (loaded) {
viewBindingProps.children = <Text {...object3}>{Reflect.apply(string, intl, [t.O1iRT8])}</Text>;
} else {
viewBindingProps.children = <Text {...object3}>{Reflect.apply(string, intl, [t.ZTNur7])}</Text>;
}
r0 = <View {...viewBindingProps} />;
} else {
r0 = ((Component) => <Component onClose={r10} height={height} width={width} changeLog={changelog} />)(env0_17);
}
return r0;
}
function _fun105821(a0) { // fn#105821, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14137:1473, offset: 0x022c3d4b, size: 72 bytes, params: 2, frame: 15
const closure = ListItem;
env0_7(closure, a0);
return env0_4(closure, [{key: 'render', value: value_105823}]);
}
function _fun105824(a0) { // fn#105824, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14137:1884, offset: 0x022c3e60, size: 172 bytes, params: 2, frame: 16
const closure = ChangeLog;
env0_7(closure, a0);
return env0_4(closure, [{key: 'componentDidMount', value: function() {
var Date = global.Date;
this.mountedAt = Date.now();
this.track(AnalyticEvents.CHANGE_LOG_OPENED);
}}, {key: 'componentWillUnmount', value: function() {
this.track(AnalyticEvents.CHANGE_LOG_CLOSED);
}}, {key: 'track', value: value_105830}, {key: 'renderVideo', value: value_105831}, {key: 'render',
value: value_105834}]);
}
function ChangelogModal() { // fn#105835, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14137:5855, offset: 0x022c45d0, size: 87 bytes, params: 1, frame: 14
const value2 = env0_8.useMemo(function() {
var object2 = {name: 'CHANGELOG'};
object2.headerLeft = require(dependencyMap[27]).getHeaderCloseButton(hideChangeLog);
object2.render = _fun105837;
return {CHANGELOG: object2};
}, []);
const Navigator = (require(5280) /* metro dependency 5280: NavigatorNative */).Navigator;
return <Navigator screens={value2} initialRouteName="CHANGELOG" />;
}
function ChangeLogScreenE() { // fn#105815, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14137:4877, owner: ChangeLogScreen.e, offset: 0x022c3b77, size: 19 bytes, params: 1, frame: 9
return env0_2.goBack();
}
function _fun105816() { // fn#105816, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14137:4906, offset: 0x022c3b8a, size: 48 bytes, params: 1, frame: 12
var binding;
if (changelog != null) {
binding = env0_2;
binding.setOptions({headerTitle: headerTitle_105817});
}
}
function _fun105818() { // fn#105818, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14137:5180, offset: 0x022c3cc5, size: 35 bytes, params: 1, frame: 2
if (loaded) {
if (changelog != null) {
return _fun105819;
}
}
}
function ListItem() { // fn#105822, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14137:1485, offset: 0x022c3d93, size: 42 bytes, params: 1, frame: 16
env1_3(this, ListItem);
return _callSuper_105810(this, ListItem, arguments);
}
function value_105823() { // fn#105823, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14137:1618, offset: 0x022c3dbd, size: 163 bytes, params: 1, frame: 22
const children = this.props.children;
const value = environment.__proto__;
const value2 = env1_16(this.context);
return (
<View style={value2.listItem}>
<View style={value2.bulletPoint} />
<View style={value2.listText}>
{typeof children !== 'function' ? children : children({style: value2.listText})}
</View>
</View>
);
}
function ChangeLog(a0) { // fn#105825, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14137:1896, offset: 0x022c3f0c, size: 141 bytes, params: 2, frame: 19
let value = copyRestArgs(0, undefined);
env1_3(this, ChangeLog);
const _callSuper_105810Binding = _callSuper_105810;
const items = [];
arraySpread(items, value, 0, value);
value = _callSuper_105810Binding(this, ChangeLog, items);
value.mountedAt = 0;
value.ref = env1_8.createRef();
value.maxScrolledPercentage = 0;
value.state = {ytVideoReady: false};
value.handleScroll = handleScroll_105826;
value.playVideo = playVideo;
return value;
}
function value_105830(a0) { // fn#105830, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14137:2855, offset: 0x022c4130, size: 267 bytes, params: 2, frame: 22
var r3;
var object3;
var object4;
var Math;
let value = a1;
const r1 = value !== undefined ? value : {};
const changeLog = this.props.changeLog;
if (changeLog != null) {
object3 = {};
object3.change_log_id = '' + changeLog.date + ':' + changeLog.revision;
copyDataProperties(object3, r1, undefined);
value = environment.__proto__;
if (a0 !== AnalyticEvents.CHANGE_LOG_CLOSED) {
r3 = object3;
} else {
object4 = {};
Math = global.Math;
object4.seconds_open = Math.round((global.Date.now() - this.mountedAt) / 1000);
object4.max_scrolled_percentage = 100 * global.parseInt(this.maxScrolledPercentage.toPrecision(4), 10);
copyDataProperties(object4, object3, undefined);
r3 = object4;
}
value = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
value.track(a0, r3);
}
}
function value_105831() { // fn#105831, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14137:3188, offset: 0x022c423b, size: 766 bytes, params: 1, frame: 34
var environment;
var r7;
var r0;
var object;
var r8;
var items3;
var Video;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var items2;
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
var playVideo;
let value = environment.__proto__;
const value2 = env1_15(this.context);
const {changeLog, width, height, onClose} = this.props;
const video = changeLog.video;
const image = changeLog.image;
const youtube_video_id = changeLog.youtube_video_id;
const ytVideoReady = this.state.ytVideoReady;
const value3 = null;
if (value3 != video) {
object = {videoURI: video};
var viewBindingProps = {style: value2.videoWrapper, onAccessibilityEscape: onClose};
var viewBinding2Props = {ref: this.ref, style: value2.videoSpecial};
Video = importDefault(9543) /* metro dependency 9543: Video */;
items2 = [<Video style={value2.video} src={object} width={width} height={height} paused canOpenFullscreen unmutedOnFullScreen accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.zHeo07)} onPress={onPress_105833} />];
if (value3 != video) {
var pressableOpacityProps = {'accessibilityLabel': 'Play Video', 'accessibilityRole': 'button',
style: value2.videoOverlay};
playVideo = this.playVideo;
pressableOpacityProps.onPress = playVideo;
value = importDefault(8792) /* metro dependency 8792: TouchableHitBox */;
var valueProps = {'accessibilityLabel': 'Play Video', 'accessibilityRole': 'button',
source: importDefault(11059) /* metro dependency 11059 */};
playVideo = this.playVideo;
valueProps.onPress = playVideo;
valueProps.style = value2.playButton;
valueProps.iconSize = (require(1305) /* metro dependency 1305: native */).IconSizes.CUSTOM;
valueProps.iconStyle = value2.playIcon;
value = <PressableOpacity {...pressableOpacityProps}>{((Component) => <Component {...valueProps} />)(value)}</PressableOpacity>;
r8 = value;
} else {
r8 = value3;
}
items2[1] = r8;
return (
<View {...viewBindingProps}>
<View {...viewBinding2Props}>
{items2}
</View>
</View>
);
}
if (value3 == image) {
if (value3 != youtube_video_id) {
var viewBindingProps = {style: value2.videoWrapper, onAccessibilityEscape: onClose};
items3 = [((Component) => <Component height={height} play={false} videoId={youtube_video_id} onReady={onReady_105832} useLocalHTML />)(importDefault(13941) /* metro dependency 13941 */)];
if (ytVideoReady) {
r7 = value3;
} else {
value = importDefault(5475) /* metro dependency 5475: FastImage */;
value = ((Component) => <Component style={value2.videoOverlay} source={{uri: 'https://i.ytimg.com/vi/' + youtube_video_id + '/hqdefault.jpg'}} />)(value);
r7 = value;
}
items3[1] = r7;
value = <View {...viewBindingProps}>{items3}</View>;
exports.ChangeLogScreen = ChangeLogScreen2;
function _callSuper_105810(a0, a1, a2) { // fn#105810, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14137:255, offset: 0x022c3817, size: 100 bytes, params: 4, frame: 20
var r0;
var Reflect;
let value = a2;
const value3 = Module00017(a1);
if (_isNativeReflectConstruct_105811()) {
Reflect = global.Reflect;
value = Reflect.construct(value3, value || [], Module00017(a0).constructor);
r0 = value;
} else {
r0 = value3;
value = value3.apply(a0, value);
r0 = value;
}
return PossibleConstructorReturn(a0, r0);
}
function _isNativeReflectConstruct_105811() { // fn#105811, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14137:386, offset: 0x022c387b, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_105811_isNativeReflectConstruct = function() {
return !!result;
})();
}
function ChangeLogScreen({onClose}) { // fn#105814, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14137:4511, offset: 0x022c38dd, size: 666 bytes, params: 2, frame: 25
var r0;
const Text = (TextModule).Text;
var object;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var string;
var t;
const value2 = (CreateStylesModule).useLegacyClassComponentStyles(env0_15);
const {changelog, loaded,
clientTooOld} = (UseCurrentChangelogModule).useCurrentChangelog();
let {width, height} = (UseWindowDimensionsNative)();
const value5 = width - 36;
const value6 = value5 * env0_14;
const value7 = 0.5 * height;
const object2 = {};
const Math = global.Math;
object2.height = Math.min(value6, value7);
object2.width = value6 > value7 ? value7 / env0_14 : value5;
width = object2.width;
height = object2.height;
const value9 = (Module01485Module).useNavigation();
const r10 = onClose ?? ChangeLogScreenE;
env0_8.useEffect(_fun105816, [changelog, value9]);
env0_8.useEffect(function() {
if (loaded) {
if (changelog != null) {
return _fun105819;
}
}
}, [loaded, changelog]);
if (clientTooOld) {
r0 = (
<View style={value2.empty}>
<Text variant="heading-lg/medium">
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.V9ospk)}
</Text>
</View>
);
} else if (changelog == null) {
var viewBindingProps = {style: value2.empty};
object = {variant: 'text-md/semibold'};
string = intl.string;
t = (require(1244) /* metro dependency 1244: indexNative */).t;
if (loaded) {
viewBindingProps.children = (
<Text {...object}>
{Reflect.apply(string, intl, [t.O1iRT8])}
</Text>
);
} else {
viewBindingProps.children = (
<Text {...object}>
{Reflect.apply(string, intl, [t.ZTNur7])}
</Text>
);
}
r0 = <View {...viewBindingProps} />;
} else {
r0 = ((Component) => <Component onClose={r10} height={height} width={width} changeLog={changelog} />)(env0_17);
}
return r0;
}
const videoWrapper = value2.videoWrapper;
const ref = this.ref;
const videoSpecial = value2.videoSpecial;
const value5 = ((Component) => <Component style={value2.video} src={{uri: image}} width={width} height={height} paused canOpenFullscreen unmutedOnFullScreen accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.zHeo07)} onPress={onPress_105833} />)(importDefault(9543) /* metro dependency 9543: Video */);
if (value3 != video) {
var pressableOpacityProps = {'accessibilityLabel': 'Play Video', 'accessibilityRole': 'button',
style: value2.videoOverlay};
playVideo = this.playVideo;
pressableOpacityProps.onPress = playVideo;
value = importDefault(8792) /* metro dependency 8792: TouchableHitBox */;
var valueProps = {'accessibilityLabel': 'Play Video', 'accessibilityRole': 'button',
source: importDefault(11059) /* metro dependency 11059 */};
playVideo = this.playVideo;
valueProps.onPress = playVideo;
valueProps.style = value2.playButton;
valueProps.iconSize = (require(1305) /* metro dependency 1305: native */).IconSizes.CUSTOM;
valueProps.iconStyle = value2.playIcon;
value = <PressableOpacity {...pressableOpacityProps}>{((Component) => <Component {...valueProps} />)(value)}</PressableOpacity>;
r8 = value;
} else {
r8 = value3;
}
return (
<View style={videoWrapper} onAccessibilityEscape={onClose}>
<View ref={ref} style={videoSpecial}>
{value5}
{r8}
</View>
</View>
);
}
function value_105834() { // fn#105834, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14137:4391, offset: 0x022c4578, size: 88 bytes, params: 1, frame: 16
let value = environment.__proto__;
value = importDefault(8336) /* metro dependency 8336: ChangeLogStandardTemplate */;
const valueProps = {...this.props};
valueProps['video'] = this.renderVideo();
valueProps['onScroll'] = this.handleScroll;
return ((Component) => <Component {...valueProps} />)(value);
}
function _fun105836() { // fn#105836, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14137:5898, offset: 0x022c4627, size: 78 bytes, params: 1, frame: 14
const navigatorHeaderNativeModule = require(5282) /* metro dependency 5282: NavigatorHeaderNative */;
const getHeaderCloseButton = navigatorHeaderNativeModule.getHeaderCloseButton;
return {CHANGELOG: {name: 'CHANGELOG', headerLeft: Reflect.apply(getHeaderCloseButton, navigatorHeaderNativeModule,
[hideChangeLog]), render: render_105837}};
}
function headerTitle_105817() { // fn#105817, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14137:4946, offset: 0x022c3bba, size: 267 bytes, params: 1, frame: 22
var r8;
let value = environment.__proto__.__proto__;
const NavigatorHeader = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).NavigatorHeader;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const LRmNAl = (require(1244) /* metro dependency 1244: indexNative */).t.LRmNAl;
const formatToPlainString = intl.formatToPlainString;
const Fb8xx2 = (require(1244) /* metro dependency 1244: indexNative */).t.Fb8xx2;
if (changelog.date == null) {
r8 = new global.Date();
} else if (changelog.date !== '') {
value = importDefault(3738) /* metro dependency 3738 */;
value = value(changelog.date);
value = value.toDate();
r8 = value;
} else {
r8 = new global.Date();
}
return (
<NavigatorHeader
title={Reflect.apply(string, intl, [LRmNAl])}
subtitle={Reflect.apply(formatToPlainString, intl, [Fb8xx2, {date: r8}])}
/>
);
}
function _fun105819() { // fn#105819, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14137:5205, offset: 0x022c3ce8, size: 57 bytes, params: 1, frame: 13
let value = environment.__proto__.__proto__;
value = importDefault(8338) /* metro dependency 8338: ChangeLogActionCreators */;
const markChangelogAsSeen = value.markChangelogAsSeen;
const changelogBinding = changelog;
return Reflect.apply(markChangelogAsSeen, value, [changelogBinding.id, changelogBinding.date]);
}
function ChangeLogHandleScroll({contentOffset, layoutMeasurement, contentSize}) { // fn#105826, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14137:2089, owner: ChangeLog.handleScroll, offset: 0x022c3f99, size: 106 bytes, params: 2, frame: 16
let value = contentOffset.y + layoutMeasurement.height;
value /= contentSize.height;
const binding = env0_0;
const Math = global.Math;
const min = Math.min;
const Math2 = global.Math;
value = Math2.max(binding.maxScrolledPercentage, value);
binding.maxScrolledPercentage = Reflect.apply(min, Math, [value, 1]);
}
function playVideo() { // fn#105827, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14137:2252, owner: ChangeLog.playVideo, offset: 0x022c4003, size: 218 bytes, params: 1, frame: 18
var openMediaModal;
var object;
const {changeLog, width, height} = env0_0.props;
const video = changeLog.video;
const image = changeLog.image;
if (video == null) {
if (image == null) {
return null;
function ChangeLogScreenE() { // fn#105815, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14137:4877, owner: ChangeLogScreen.e, offset: 0x022c3b77, size: 19 bytes, params: 1, frame: 9
return env0_2.goBack();
}
function _fun105816() { // fn#105816, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14137:4906, offset: 0x022c3b8a, size: 48 bytes, params: 1, frame: 12
var binding;
if (changelog != null) {
binding = env0_2;
binding.setOptions({headerTitle: headerTitle_105817});
}
function headerTitle_105817() { // fn#105817, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14137:4946, offset: 0x022c3bba, size: 267 bytes, params: 1, frame: 22
var r8;
let value = environment.__proto__.__proto__;
const NavigatorHeader = (NavigatorHeaderNativeModule).NavigatorHeader;
const intl = (IndexNativeModule).intl;
const string = intl.string;
const LRmNAl = (IndexNativeModule).t.LRmNAl;
const formatToPlainString = intl.formatToPlainString;
const Fb8xx2 = (IndexNativeModule).t.Fb8xx2;
if (changelog.date == null) {
r8 = new global.Date();
} else if (changelog.date !== '') {
value = importDefault(3738) /* metro dependency 3738 */;
value = value(changelog.date);
value = value.toDate();
r8 = value;
} else {
r8 = new global.Date();
}
return (
<NavigatorHeader
title={Reflect.apply(string, intl, [LRmNAl])}
subtitle={Reflect.apply(formatToPlainString, intl, [Fb8xx2, {date: r8}])}
/>
);
}
}
function _fun105818() { // fn#105818, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14137:5180, offset: 0x022c3cc5, size: 35 bytes, params: 1, frame: 2
if (loaded) {
if (changelog != null) {
return _fun105819;
}
}
function _fun105819() { // fn#105819, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14137:5205, offset: 0x022c3ce8, size: 57 bytes, params: 1, frame: 13
let value = environment.__proto__.__proto__;
value = importDefault(8338) /* metro dependency 8338: ChangeLogActionCreators */;
const markChangelogAsSeen = value.markChangelogAsSeen;
const changelogBinding = changelog;
return Reflect.apply(markChangelogAsSeen, value, [changelogBinding.id, changelogBinding.date]);
}
}
}
const r5 = video != null ? {videoURI: video} : {uri: image};
const binding = env0_0;
const track = binding.track;
let value = environment.__proto__.__proto__;
const CHANGE_LOG_VIDEO_INTERACTED = AnalyticEvents.CHANGE_LOG_VIDEO_INTERACTED;
Reflect.apply(track, binding, [CHANGE_LOG_VIDEO_INTERACTED]);
const current = binding.ref.current;
if (current != null) {
value = require(9544) /* metro dependency 9544: openMediaModal */;
openMediaModal = value.openMediaModal;
object = {};
copyDataProperties(object, r5, width);
object['width'] = width;
object['height'] = height;
Reflect.apply(openMediaModal, value, [{'initialSources': null, 'disableDownload': true, 'shareable': false,
'analyticsSource': 'Change Log', initialSources: [object], originViewOrOriginLayout: current}]);
function _fun105821(a0) { // fn#105821, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14137:1473, offset: 0x022c3d4b, size: 72 bytes, params: 2, frame: 15
const ListItem_1058222 = ListItem_105822;
Inherits(ListItem_1058222, a0);
return CreateClass(ListItem_1058222, [{key: 'render', value: value_105823}]);
function ListItem_105822() { // fn#105822, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14137:1485, offset: 0x022c3d93, size: 42 bytes, params: 1, frame: 16
env1_3(this, ListItem_105822);
return _callSuper_105810(this, ListItem_105822, arguments);
}
function value_105823() { // fn#105823, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14137:1618, offset: 0x022c3dbd, size: 163 bytes, params: 1, frame: 22
const children = this.props.children;
const value = environment.__proto__;
const value2 = env1_16(this.context);
return (
<View style={value2.listItem}>
<View style={value2.bulletPoint} />
<View style={value2.listText}>
{typeof children !== 'function' ? children : children({style: value2.listText})}
</View>
</View>
);
}
}
function _fun105824(a0) { // fn#105824, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14137:1884, offset: 0x022c3e60, size: 172 bytes, params: 2, frame: 16
const ChangeLog2 = ChangeLog;
Inherits(ChangeLog2, a0);
return CreateClass(ChangeLog2, [{key: 'componentDidMount', value: function() {
var Date = global.Date;
this.mountedAt = Date.now();
this.track(AnalyticEvents.CHANGE_LOG_OPENED);
}}, {key: 'componentWillUnmount', value: function() {
this.track(AnalyticEvents.CHANGE_LOG_CLOSED);
}}, {key: 'track', value: value_105830}, {key: 'renderVideo', value: value_105831}, {key: 'render',
value: value_105834}]);
function ChangeLog(a0) { // fn#105825, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14137:1896, offset: 0x022c3f0c, size: 141 bytes, params: 2, frame: 19
let value = copyRestArgs(0, undefined);
env1_3(this, ChangeLog);
const _callSuper_105810Binding = _callSuper_105810;
const items2 = [];
arraySpread(items2, value, 0, value);
value = _callSuper_105810Binding(this, ChangeLog, items2);
value.mountedAt = 0;
value.ref = env1_8.createRef();
value.maxScrolledPercentage = 0;
value.state = {ytVideoReady: false};
value.handleScroll = handleScroll_105826;
value.playVideo = playVideo;
return value;
function ChangeLogHandleScroll({contentOffset, layoutMeasurement, contentSize}) { // fn#105826, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14137:2089, owner: ChangeLog.handleScroll, offset: 0x022c3f99, size: 106 bytes, params: 2, frame: 16
let value = contentOffset.y + layoutMeasurement.height;
value /= contentSize.height;
const binding = env0_0;
const Math = global.Math;
const min = Math.min;
const Math2 = global.Math;
value = Math2.max(binding.maxScrolledPercentage, value);
binding.maxScrolledPercentage = Reflect.apply(min, Math, [value, 1]);
}
function playVideo() { // fn#105827, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14137:2252, owner: ChangeLog.playVideo, offset: 0x022c4003, size: 218 bytes, params: 1, frame: 18
var openMediaModal;
var object2;
const {changeLog, width, height} = env0_0.props;
const video = changeLog.video;
const image = changeLog.image;
if (video == null) {
if (image == null) {
return null;
}
}
const r5 = video != null ? {videoURI: video} : {uri: image};
const binding = env0_0;
const track = binding.track;
let value = environment.__proto__.__proto__;
const CHANGE_LOG_VIDEO_INTERACTED = AnalyticEvents.CHANGE_LOG_VIDEO_INTERACTED;
Reflect.apply(track, binding, [CHANGE_LOG_VIDEO_INTERACTED]);
const current = binding.ref.current;
if (current != null) {
value = require(9544) /* metro dependency 9544: openMediaModal */;
openMediaModal = value.openMediaModal;
object2 = {};
copyDataProperties(object2, r5, width);
object2['width'] = width;
object2['height'] = height;
Reflect.apply(openMediaModal, value, [{'initialSources': null, 'disableDownload': true, 'shareable': false,
'analyticsSource': 'Change Log', initialSources: [object2], originViewOrOriginLayout: current}]);
}
}
}
function value_105830(a0) { // fn#105830, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14137:2855, offset: 0x022c4130, size: 267 bytes, params: 2, frame: 22
var r3;
var object;
var object2;
var Math;
let value = a1;
const r1 = value !== undefined ? value : {};
const changeLog = this.props.changeLog;
if (changeLog != null) {
object = {};
object.change_log_id = '' + changeLog.date + ':' + changeLog.revision;
copyDataProperties(object, r1, undefined);
value = environment.__proto__;
if (a0 !== AnalyticEvents.CHANGE_LOG_CLOSED) {
r3 = object;
} else {
object2 = {};
Math = global.Math;
object2.seconds_open = Math.round((global.Date.now() - this.mountedAt) / 1000);
object2.max_scrolled_percentage = 100 * global.parseInt(this.maxScrolledPercentage.toPrecision(4), 10);
copyDataProperties(object2, object, undefined);
r3 = object2;
}
value = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
value.track(a0, r3);
}
}
function value_105831() { // fn#105831, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14137:3188, offset: 0x022c423b, size: 766 bytes, params: 1, frame: 34
var environment;
var r7;
var r0;
var object2;
var r8;
var items3;
var Video;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var items2;
const PressableOpacity = (PressablesModule).PressableOpacity;
var playVideo;
let value = environment.__proto__;
const value2 = env1_15(this.context);
const {changeLog, width, height, onClose} = this.props;
const video = changeLog.video;
const image = changeLog.image;
const youtube_video_id = changeLog.youtube_video_id;
const ytVideoReady = this.state.ytVideoReady;
const value3 = null;
if (value3 != video) {
object2 = {videoURI: video};
var viewBindingProps = {style: value2.videoWrapper, onAccessibilityEscape: onClose};
var viewBinding2Props = {ref: this.ref, style: value2.videoSpecial};
Video = importDefault(9543) /* metro dependency 9543: Video */;
items2 = [
<Video
style={value2.video}
src={object2}
width={width}
height={height}
paused
canOpenFullscreen
unmutedOnFullScreen
accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.zHeo07)}
onPress={onPress_105833}
/>,
];
if (value3 != video) {
var pressableOpacityProps = {'accessibilityLabel': 'Play Video', 'accessibilityRole': 'button',
style: value2.videoOverlay};
playVideo = this.playVideo;
pressableOpacityProps.onPress = playVideo;
value = importDefault(8792) /* metro dependency 8792: TouchableHitBox */;
var valueProps = {'accessibilityLabel': 'Play Video', 'accessibilityRole': 'button',
source: importDefault(11059) /* metro dependency 11059 */};
playVideo = this.playVideo;
valueProps.onPress = playVideo;
valueProps.style = value2.playButton;
valueProps.iconSize = (require(1305) /* metro dependency 1305: native */).IconSizes.CUSTOM;
valueProps.iconStyle = value2.playIcon;
value = (
<PressableOpacity {...pressableOpacityProps}>
{((Component) => <Component {...valueProps} />)(value)}
</PressableOpacity>
);
r8 = value;
} else {
r8 = value3;
}
items2[1] = r8;
return (
<View {...viewBindingProps}>
<View {...viewBinding2Props}>
{items2}
</View>
</View>
);
}
if (value3 == image) {
if (value3 != youtube_video_id) {
var viewBindingProps = {style: value2.videoWrapper, onAccessibilityEscape: onClose};
items3 = [
((Component) => <Component height={height} play={false} videoId={youtube_video_id} onReady={onReady_105832} useLocalHTML />)(importDefault(13941) /* metro dependency 13941 */),
];
if (ytVideoReady) {
r7 = value3;
} else {
value = importDefault(5475) /* metro dependency 5475: FastImage */;
value = ((Component) => <Component style={value2.videoOverlay} source={{uri: 'https://i.ytimg.com/vi/' + youtube_video_id + '/hqdefault.jpg'}} />)(value);
r7 = value;
}
items3[1] = r7;
value = (
<View {...viewBindingProps}>
{items3}
</View>
);
r0 = value;
} else {
r0 = value3;
}
return r0;
}
const videoWrapper = value2.videoWrapper;
const ref = this.ref;
const videoSpecial = value2.videoSpecial;
const value5 = ((Component) => <Component style={value2.video} src={{uri: image}} width={width} height={height} paused canOpenFullscreen unmutedOnFullScreen accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.zHeo07)} onPress={onPress_105833} />)(importDefault(9543) /* metro dependency 9543: Video */);
if (value3 != video) {
var pressableOpacityProps = {'accessibilityLabel': 'Play Video', 'accessibilityRole': 'button',
style: value2.videoOverlay};
playVideo = this.playVideo;
pressableOpacityProps.onPress = playVideo;
value = importDefault(8792) /* metro dependency 8792: TouchableHitBox */;
var valueProps = {'accessibilityLabel': 'Play Video', 'accessibilityRole': 'button',
source: importDefault(11059) /* metro dependency 11059 */};
playVideo = this.playVideo;
valueProps.onPress = playVideo;
valueProps.style = value2.playButton;
valueProps.iconSize = (require(1305) /* metro dependency 1305: native */).IconSizes.CUSTOM;
valueProps.iconStyle = value2.playIcon;
value = (
<PressableOpacity {...pressableOpacityProps}>
{((Component) => <Component {...valueProps} />)(value)}
</PressableOpacity>
);
r8 = value;
} else {
r8 = value3;
}
return (
<View style={videoWrapper} onAccessibilityEscape={onClose}>
<View ref={ref} style={videoSpecial}>
{value5}
{r8}
</View>
</View>
);
function value_105831OnReady() { // fn#105832, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14137:3514, owner: value_105831.onReady, offset: 0x022c4539, size: 29 bytes, params: 1, frame: 12
return env0_0.setState({ytVideoReady: true});
}
function value_105831OnPress() { // fn#105833, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14137:3971, owner: value_105831.onPress, offset: 0x022c4556, size: 34 bytes, params: 1, frame: 11
const binding = env0_0;
const track = binding.track;
const CHANGE_LOG_VIDEO_INTERACTED = AnalyticEvents.CHANGE_LOG_VIDEO_INTERACTED;
Reflect.apply(track, binding, [CHANGE_LOG_VIDEO_INTERACTED]);
}
}
function value_105834() { // fn#105834, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14137:4391, offset: 0x022c4578, size: 88 bytes, params: 1, frame: 16
let value = environment.__proto__;
value = importDefault(8336) /* metro dependency 8336: ChangeLogStandardTemplate */;
const valueProps = {...this.props};
valueProps['video'] = this.renderVideo();
valueProps['onScroll'] = this.handleScroll;
return ((Component) => <Component {...valueProps} />)(value);
}
}
function ChangelogModal() { // fn#105835, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14137:5855, offset: 0x022c45d0, size: 87 bytes, params: 1, frame: 14
const value2 = env0_8.useMemo(function() {
var object2 = {name: 'CHANGELOG'};
object2.headerLeft = require(dependencyMap[27]).getHeaderCloseButton(hideChangeLog);
object2.render = _fun105837;
return {CHANGELOG: object2};
}, []);
const Navigator = (NavigatorNativeModule).Navigator;
return <Navigator screens={value2} initialRouteName="CHANGELOG" />;
function _fun105836() { // fn#105836, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14137:5898, offset: 0x022c4627, size: 78 bytes, params: 1, frame: 14
const getHeaderCloseButton = NavigatorHeaderNativeModule.getHeaderCloseButton;
return {CHANGELOG: {name: 'CHANGELOG', headerLeft: Reflect.apply(getHeaderCloseButton, NavigatorHeaderNativeModule,
[hideChangeLog]), render: render_105837}};
function render_105837() { // fn#105837, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14137:5995, offset: 0x022c4675, size: 32 bytes, params: 1, frame: 13
return <ChangeLogScreen onClose={hideChangeLog} />;
}
}
}
}
function value_105831OnReady() { // fn#105832, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14137:3514, owner: value_105831.onReady, offset: 0x022c4539, size: 29 bytes, params: 1, frame: 12
return env0_0.setState({ytVideoReady: true});
}
function value_105831OnPress() { // fn#105833, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14137:3971, owner: value_105831.onPress, offset: 0x022c4556, size: 34 bytes, params: 1, frame: 11
const binding = env0_0;
const track = binding.track;
const CHANGE_LOG_VIDEO_INTERACTED = AnalyticEvents.CHANGE_LOG_VIDEO_INTERACTED;
Reflect.apply(track, binding, [CHANGE_LOG_VIDEO_INTERACTED]);
}
function render_105837() { // fn#105837, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14137:5995, offset: 0x022c4675, size: 32 bytes, params: 1, frame: 13
return <ChangeLogScreen onClose={hideChangeLog} />;
}
global.__d(_fun105809, 13940, [6, 7, 15, 17, 18, 31, 27, 661, 1933, 33, 4501, 697, 3868, 9544, 683, 13941, 5475,
9543, 1244, 5278, 8792, 11059, 1305, 8336, 1478, 8337, 1485, 5282, 3738, 8338, 4573, 5080, 5280,
2]) /* metro module 13940, dependencies: [6, 7, 15, 17, 18, 31, 27, 661, 1933, 33, 4501, 697, 3868, 9544, 683, 13941, 5475, 9543, 1244, 5278, 8792, 11059, 1305, 8336, 1478, 8337, 1485, 5282, 3738, 8338, 4573, 5080, 5280, 2] */;
@@ -1,257 +1,293 @@
/* Metro module 8336; source: components_native/ChangeLogStandardTemplate.tsx; dependencies: [31, 27, 1949, 661, 33, 697, 4501, 1305, 632, 8337, 683, 3853, 3855, 8339, 6622, 6618, 8341, 8343, 1244, 3768, 8345, 8347, 2] */
import AnalyticsUtils from '../utils/AnalyticsUtils.tsx'; /* Metro dependency 683 */
import LocaleStore from '../modules/user_settings/LocaleStore.tsx'; /* Metro dependency 1949 */
import Linking from '../lib/native/Linking.tsx'; /* Metro dependency 3853 */
import ChangeLogUtils from '../utils/ChangeLogUtils.tsx'; /* Metro dependency 8339 */
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 SafeAreaViewModule from './common/SafeAreaView.tsx'; /* Metro dependency 6618 */
import * as UseCurrentChangelogModule from '../modules/changelog/useCurrentChangelog.tsx'; /* Metro dependency 8337 */
import * as IconButtonNativeModule from '../design/components/Button/native/IconButton.native.tsx'; /* Metro dependency 8341 */
import * as XNeutralIconModule from '../design/components/Icon/native/redesign/generated/XNeutralIcon.tsx'; /* Metro dependency 8343 */
import * as FacebookNeutralIconModule from '../design/components/Icon/native/redesign/generated/FacebookNeutralIcon.tsx'; /* Metro dependency 8345 */
import * as InstagramNeutralIconModule from '../design/components/Icon/native/redesign/generated/InstagramNeutralIcon.tsx'; /* Metro dependency 8347 */
function _fun66362(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66362, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8521:6, offset: 0x01bf8a61, size: 860 bytes, params: 8, frame: 29
var object2;
let env0_0 = require;
const getLinkComponent = function(a0) {
var env0_0 = a0;
return _fun66370;
};
const closure = changelogRules;
const changelogRules2 = changelogRules;
const closure2 = function(a0) {
return importDefault(dependencyMap[14]).reactParserFor(changelogRules(a0.id));
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_4 = value2.View;
const StyleSheet = value2.StyleSheet;
const env0_5 = value2.ScrollView;
const localeStore = importDefault(1949) /* metro dependency 1949: LocaleStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_7 = constantsModule.LocalizedLinks;
const env0_8 = constantsModule.SOCIAL_LINKS;
const env0_9 = constantsModule.AnalyticEvents;
const Fonts = constantsModule.Fonts;
const value4 = require(33) /* metro dependency 33 */;
const env0_10 = value4.jsx;
const env0_11 = value4.jsxs;
object2 = {};
let value = ReactModule;
const StyleSheet = ReactNativeModule.StyleSheet;
const Fonts = ConstantsModule.Fonts;
object = {};
const GREEN_360 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.GREEN_360;
object2.added = GREEN_360;
object.added = GREEN_360;
const RED_400 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.RED_400;
object2.fixed = RED_400;
object.fixed = RED_400;
const YELLOW_300 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.YELLOW_300;
object2.progress = YELLOW_300;
object.progress = YELLOW_300;
const BRAND_500 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BRAND_500;
object2.improved = BRAND_500;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {};
object2.flex = {flex: 1};
object.improved = BRAND_500;
const createStyles = CreateStylesModule.createStyles;
object = {};
object.flex = {flex: 1};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object2.container = {padding: 18, backgroundColor: BACKGROUND_BASE_LOW};
const object3 = {'flexDirection': 'row', 'justifyContent': 'center'};
object3.borderTopWidth = StyleSheet.hairlineWidth;
object.container = {padding: 18, backgroundColor: BACKGROUND_BASE_LOW};
const object4 = {'flexDirection': 'row', 'justifyContent': 'center'};
object4.borderTopWidth = StyleSheet.hairlineWidth;
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object3.backgroundColor = BACKGROUND_SURFACE_HIGH;
object4.backgroundColor = BACKGROUND_SURFACE_HIGH;
const BORDER_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_STRONG;
object3.borderTopColor = BORDER_STRONG;
object4.borderTopColor = BORDER_STRONG;
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object3.gap = PX_12;
object3.paddingHorizontal = 18;
object4.gap = PX_12;
object4.paddingHorizontal = 18;
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object3.paddingVertical = PX_12;
object2.footer = object3;
object2.scrollViewContainer = {flex: 1};
object2.lheading = {'marginBottom': 14, 'flexDirection': 'row', 'alignItems': 'center'};
object4.paddingVertical = PX_12;
object.footer = object4;
object.scrollViewContainer = {flex: 1};
object.lheading = {'marginBottom': 14, 'flexDirection': 'row', 'alignItems': 'center'};
const PRIMARY_SEMIBOLD = Fonts.PRIMARY_SEMIBOLD;
object2.lheadingText = {fontSize: 16, fontFamily: PRIMARY_SEMIBOLD};
object2.lheadingLine = {'flexGrow': 1, 'flexShrink': 1, 'flexBasis': 'auto', 'marginLeft': 10, 'height': 2};
object.lheadingText = {fontSize: 16, fontFamily: PRIMARY_SEMIBOLD};
object.lheadingLine = {'flexGrow': 1, 'flexShrink': 1, 'flexBasis': 'auto', 'marginLeft': 10, 'height': 2};
const BACKGROUND_MOD_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_STRONG;
object2.bulletPoint = {'width': 7, 'height': 7, 'borderRadius': 3.5, 'marginRight': 13, 'marginTop': 7,
object.bulletPoint = {'width': 7, 'height': 7, 'borderRadius': 3.5, 'marginRight': 13, 'marginTop': 7,
backgroundColor: BACKGROUND_MOD_STRONG};
object2.listItem = {'flexDirection': 'row', 'marginLeft': 4, 'marginBottom': 8};
object.listItem = {'flexDirection': 'row', 'marginLeft': 4, 'marginBottom': 8};
const TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_DEFAULT;
object2.listText = {'color': null, 'fontSize': 14, 'lineHeight': 18, 'flex': 1, color: TEXT_DEFAULT};
const env0_13 = Reflect.apply(createStyles, createStylesModule, [object2]);
object.listText = {'color': null, 'fontSize': 14, 'lineHeight': 18, 'flex': 1, color: TEXT_DEFAULT};
const env0_13 = Reflect.apply(createStyles, CreateStylesModule, [object]);
const value6 = value.memo(_fun66373);
value = value.memo(_fun66374);
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/ChangeLogStandardTemplate.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/ChangeLogStandardTemplate.tsx');
exports.default = value;
exports.ListItem = value6;
exports.changelogRules = closure;
exports.changelogRules = changelogRules2;
exports.getRenderChangelog = closure2;
}
function LHeading({className, children}) { // fn#66363, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8521:1315, offset: 0x01bf8dbd, size: 186 bytes, params: 2, frame: 22
const getStyles2 = getStyles;
const styles = useStyles();
const LegacyText = (NativeModule).LegacyText;
return (
<View style={styles.lheading}>
<LegacyText accessibilityRole="header" style={getStyles2(styles.lheadingText, true)}>
{children}
</LegacyText>
<View style={getStyles2(styles.lheadingLine, false)} />
</View>
);
function getStyles(a0, a1) { // fn#66364, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8521:1369, owner: LHeading.getStyles, offset: 0x01bf8e77, size: 78 bytes, params: 3, frame: 12
const env0_0 = a1;
var value;
if (className != null) {
value = className.split(' ');
value = value.map(_fun66365);
return value.concat(a0);
}
function _fun66365(a0) { // fn#66365, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8521:1429, offset: 0x01bf8ec5, size: 66 bytes, params: 2, frame: 4
var r0;
var value;
var object;
var property;
if (a0 === 'marginTop') {
r0 = {marginTop: 10};
} else {
object = {};
value = environment.__proto__.__proto__;
property = env2_12[a0];
if (require) {
object.color = property;
r0 = object;
} else {
object.backgroundColor = property;
r0 = object;
}
}
return r0;
}
function LHeading({className, children}) { // fn#66363, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8521:1315, offset: 0x01bf8dbd, size: 186 bytes, params: 2, frame: 22
const closure = LHeadingGetStyles;
const styles = useStyles();
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
return (
<View style={styles.lheading}>
<LegacyText accessibilityRole="header" style={closure(styles.lheadingText, true)}>
}
}
function LinkInner({changelogId, target, className, children}) { // fn#66366, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8521:1885, offset: 0x01bf8f07, size: 180 bytes, params: 2, frame: 21
const locale = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([LocaleStore],
function() {
return LocaleStore.locale;
});
const useChangelog = UseCurrentChangelogModule.useChangelog;
const env0_1 = Reflect.apply(useChangelog, UseCurrentChangelogModule, [changelogId, locale]).changelog;
const LegacyText = (NativeModule).LegacyText;
return (
<LegacyText
accessibilityRole="link"
style={className}
onPress={onPress_66368}
>
{children}
</LegacyText>
<View style={closure(styles.lheadingLine, false)} />
</View>
);
}
function LinkInner({changelogId, target, className, children}) { // fn#66366, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8521:1885, offset: 0x01bf8f07, size: 180 bytes, params: 2, frame: 21
const locale = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([LocaleStore],
function() {
return LocaleStore.locale;
});
const useCurrentChangelogModule = require(8337) /* metro dependency 8337: useCurrentChangelog */;
const useChangelog = useCurrentChangelogModule.useChangelog;
const env0_1 = Reflect.apply(useChangelog, useCurrentChangelogModule, [changelogId, locale]).changelog;
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
return (
<LegacyText
accessibilityRole="link"
style={className}
onPress={onPress_66368}
>
{children}
</LegacyText>
);
}
function getLinkComponent(a0) { // fn#66369, offset: 0x01bf90d4, size: 18 bytes, params: 2, frame: 2
const env0_0 = a0;
return _fun66370;
}
function changelogRules(a0) { // fn#66371, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8521:2449, offset: 0x01bf9117, size: 158 bytes, params: 2, frame: 17
var getDefaultRules;
var object;
var getMessageRules;
var object4;
const value = a1;
let r0 = value !== undefined ? value : false;
const defaultImport = importDefault(8339) /* metro dependency 8339: ChangeLogUtils */;
if (r0) {
getMessageRules = defaultImport.getMessageRules;
object4 = {};
object4.Link = getLinkComponent(a0);
object4.ListItem = env0_14;
object4.LHeading = LHeading;
object4.Heading = LHeading;
r0 = Reflect.apply(getMessageRules, defaultImport, [{components: object4}]);
} else {
getDefaultRules = defaultImport.getDefaultRules;
object = {};
object.Link = getLinkComponent(a0);
object.ListItem = env0_14;
object.LHeading = LHeading;
object.Heading = LHeading;
r0 = Reflect.apply(getDefaultRules, defaultImport, [{components: object}]);
}
return r0;
}
function _fun66373({children}) { // fn#66373, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8521:1708, offset: 0x01bf91ec, size: 152 bytes, params: 2, frame: 22
const styles = useStyles();
return (
<View style={styles.listItem}>
<View style={styles.bulletPoint} />
<View style={styles.listText}>
{typeof children !== 'function' ? children : children({style: styles.listText})}
</View>
</View>
);
}
function _fun66374({changeLog, video, onScroll}) { // fn#66374, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8521:2812, offset: 0x01bf9284, size: 718 bytes, params: 2, frame: 30
const styles = useStyles();
const value2 = env0_3.useCallback(function({nativeEvent}) {
onScroll(nativeEvent);
}, [onScroll]);
const items2 = [video];
items2[1] = getRenderChangelog(changeLog)(changeLog.body, false);
const scrollView = <ScrollView contentContainerStyle={styles.container} style={styles.scrollViewContainer} onScroll={value2} scrollEventThrottle={3}>{items2}</ScrollView>;
const SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
const IconButton = (require(8341) /* metro dependency 8341: IconButtonNative */).IconButton;
const object = {'size': 'sm', 'variant': 'tertiary', 'accessibilityRole': 'link'};
const XNeutralIcon = (require(8343) /* metro dependency 8343: XNeutralIcon */).XNeutralIcon;
object.icon = <XNeutralIcon size="sm" color="interactive-icon-default" />;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['/lXfom']);
object.onPress = function() {
importDefault(dependencyMap[11]).openURL(importDefault(dependencyMap[19])(LocalizedLinks.TWITTER));
};
const items3 = [<IconButton {...object} />];
const FacebookNeutralIcon = (require(8345) /* metro dependency 8345: FacebookNeutralIcon */).FacebookNeutralIcon;
items3[1] = <IconButton size="sm" variant="tertiary" accessibilityRole="link" icon={<FacebookNeutralIcon size="sm" color="interactive-icon-default" />} accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['h0or/l'])} onPress={function() {
importDefault(dependencyMap[11]).openURL(SOCIAL_LINKS.FACEBOOK_URL);
}} />;
const InstagramNeutralIcon = (require(8347) /* metro dependency 8347: InstagramNeutralIcon */).InstagramNeutralIcon;
items3[2] = <IconButton size="sm" variant="tertiary" accessibilityRole="link" icon={<InstagramNeutralIcon size="sm" color="interactive-icon-default" />} accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5uVPyf'])} onPress={function() {
importDefault(dependencyMap[11]).openURL(SOCIAL_LINKS.INSTAGRAM_URL);
}} />;
return (
<View style={styles.flex}>
{scrollView}
<SafeAreaPaddingView bottom style={styles.footer}>
{items3}
</SafeAreaPaddingView>
</View>
);
}
function LHeadingGetStyles(a0, a1) { // fn#66364, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8521:1369, owner: LHeading.getStyles, offset: 0x01bf8e77, size: 78 bytes, params: 3, frame: 12
const env0_0 = a1;
var value;
if (className != null) {
value = className.split(' ');
value = value.map(_fun66365);
return value.concat(a0);
}
}
function LinkInnerOnPress() { // fn#66368, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8521:2114, owner: LinkInner.onPress, offset: 0x01bf8fca, size: 266 bytes, params: 1, frame: 22
var r11;
var Date;
var value4;
let value = environment.__proto__;
const value2 = undefined;
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const CHANGE_LOG_CTA_CLICKED = AnalyticEvents.CHANGE_LOG_CTA_CLICKED;
let date = changelog == null ? value2 : changelog.date;
if (date != null) {
r11 = date;
} else {
Date = global.Date;
value4 = Object.create(Date.prototype, {constructor: {value: Date}});
date = new Date();
r11 = (date instanceof Object ? date : value4).toString();
}
const revision = changelog == null ? value2 : changelog.revision;
const targetBinding = target;
Reflect.apply(track, defaultImport, [CHANGE_LOG_CTA_CLICKED, {change_log_id: '' + r11 + ':' + (revision ?? 1),
cta_type: 'inline_link', target: targetBinding}]);
const defaultImport2 = importDefault(3853) /* metro dependency 3853: Linking */;
const openURL = defaultImport2.openURL;
value = require(3855) /* metro dependency 3855 */;
Reflect.apply(openURL, defaultImport2, [value.sanitizeUrl(targetBinding)]);
return value2;
}
function _fun66370(a0) { // fn#66370, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8521:2412, offset: 0x01bf90e6, size: 49 bytes, params: 2, frame: 14
return <LinkInner {...a0} {...{['changelogId']: env0_0}} />;
}
function _fun66365(a0) { // fn#66365, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8521:1429, offset: 0x01bf8ec5, size: 66 bytes, params: 2, frame: 4
var r0;
var value;
var object2;
var property;
if (a0 === 'marginTop') {
r0 = {marginTop: 10};
} else {
object2 = {};
value = environment.__proto__.__proto__;
property = env2_12[a0];
if (require) {
object2.color = property;
r0 = object2;
} else {
object2.backgroundColor = property;
r0 = object2;
);
function LinkInnerOnPress() { // fn#66368, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8521:2114, owner: LinkInner.onPress, offset: 0x01bf8fca, size: 266 bytes, params: 1, frame: 22
var r11;
var Date;
var value4;
let value = environment.__proto__;
const value2 = undefined;
const defaultImport = AnalyticsUtils;
const track = defaultImport.track;
const CHANGE_LOG_CTA_CLICKED = AnalyticEvents.CHANGE_LOG_CTA_CLICKED;
let date = changelog == null ? value2 : changelog.date;
if (date != null) {
r11 = date;
} else {
Date = global.Date;
value4 = Object.create(Date.prototype, {constructor: {value: Date}});
date = new Date();
r11 = (date instanceof Object ? date : value4).toString();
}
const revision = changelog == null ? value2 : changelog.revision;
const targetBinding = target;
Reflect.apply(track, defaultImport, [CHANGE_LOG_CTA_CLICKED, {change_log_id: '' + r11 + ':' + (revision ?? 1),
cta_type: 'inline_link', target: targetBinding}]);
const defaultImport2 = Linking;
const openURL = defaultImport2.openURL;
value = require(3855) /* metro dependency 3855 */;
Reflect.apply(openURL, defaultImport2, [value.sanitizeUrl(targetBinding)]);
return value2;
}
}
return r0;
function getLinkComponent(a0) { // fn#66369, offset: 0x01bf90d4, size: 18 bytes, params: 2, frame: 2
const env0_0 = a0;
return _fun66370;
function _fun66370(a0) { // fn#66370, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8521:2412, offset: 0x01bf90e6, size: 49 bytes, params: 2, frame: 14
return <LinkInner {...a0} {...{['changelogId']: env0_0}} />;
}
}
function changelogRules(a0) { // fn#66371, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8521:2449, offset: 0x01bf9117, size: 158 bytes, params: 2, frame: 17
var getDefaultRules;
var object2;
var getMessageRules;
var object3;
const value = a1;
let r0 = value !== undefined ? value : false;
const defaultImport = ChangeLogUtils;
if (r0) {
getMessageRules = defaultImport.getMessageRules;
object3 = {};
object3.Link = getLinkComponent(a0);
object3.ListItem = env0_14;
object3.LHeading = LHeading;
object3.Heading = LHeading;
r0 = Reflect.apply(getMessageRules, defaultImport, [{components: object3}]);
} else {
getDefaultRules = defaultImport.getDefaultRules;
object2 = {};
object2.Link = getLinkComponent(a0);
object2.ListItem = env0_14;
object2.LHeading = LHeading;
object2.Heading = LHeading;
r0 = Reflect.apply(getDefaultRules, defaultImport, [{components: object2}]);
}
return r0;
}
function _fun66373({children}) { // fn#66373, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8521:1708, offset: 0x01bf91ec, size: 152 bytes, params: 2, frame: 22
const styles = useStyles();
return (
<View style={styles.listItem}>
<View style={styles.bulletPoint} />
<View style={styles.listText}>
{typeof children !== 'function' ? children : children({style: styles.listText})}
</View>
</View>
);
}
function _fun66374({changeLog, video, onScroll}) { // fn#66374, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8521:2812, offset: 0x01bf9284, size: 718 bytes, params: 2, frame: 30
const styles = useStyles();
const value2 = env0_3.useCallback(function({nativeEvent}) {
onScroll(nativeEvent);
}, [onScroll]);
const items2 = [video];
items2[1] = getRenderChangelog(changeLog)(changeLog.body, false);
const scrollView = (
<ScrollView
contentContainerStyle={styles.container}
style={styles.scrollViewContainer}
onScroll={value2}
scrollEventThrottle={3}
>
{items2}
</ScrollView>
);
const SafeAreaPaddingView = (SafeAreaViewModule).SafeAreaPaddingView;
const IconButton = (IconButtonNativeModule).IconButton;
const object2 = {'size': 'sm', 'variant': 'tertiary', 'accessibilityRole': 'link'};
const XNeutralIcon = (XNeutralIconModule).XNeutralIcon;
object2.icon = <XNeutralIcon size="sm" color="interactive-icon-default" />;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['/lXfom']);
object2.onPress = function() {
importDefault(dependencyMap[11]).openURL(importDefault(dependencyMap[19])(LocalizedLinks.TWITTER));
};
const items3 = [
<IconButton {...object2} />,
];
const FacebookNeutralIcon = (FacebookNeutralIconModule).FacebookNeutralIcon;
items3[1] = (
<IconButton
size="sm"
variant="tertiary"
accessibilityRole="link"
icon={<FacebookNeutralIcon size="sm" color="interactive-icon-default" />}
accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['h0or/l'])}
onPress={function() {
importDefault(dependencyMap[11]).openURL(SOCIAL_LINKS.FACEBOOK_URL);
}}
/>
);
const InstagramNeutralIcon = (InstagramNeutralIconModule).InstagramNeutralIcon;
items3[2] = (
<IconButton
size="sm"
variant="tertiary"
accessibilityRole="link"
icon={<InstagramNeutralIcon size="sm" color="interactive-icon-default" />}
accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5uVPyf'])}
onPress={function() {
importDefault(dependencyMap[11]).openURL(SOCIAL_LINKS.INSTAGRAM_URL);
}}
/>
);
return (
<View style={styles.flex}>
{scrollView}
<SafeAreaPaddingView bottom style={styles.footer}>
{items3}
</SafeAreaPaddingView>
</View>
);
}
}
global.__d(_fun66362, 8336, [31, 27, 1949, 661, 33, 697, 4501, 1305, 632, 8337, 683, 3853, 3855, 8339, 6622, 6618,
8341, 8343, 1244, 3768, 8345, 8347,
2]) /* metro module 8336, dependencies: [31, 27, 1949, 661, 33, 697, 4501, 1305, 632, 8337, 683, 3853, 3855, 8339, 6622, 6618, 8341, 8343, 1244, 3768, 8345, 8347, 2] */;
+111 -91
View File
@@ -1,107 +1,127 @@
/* Metro module 10903; source: components_native/ChannelContainer.tsx; dependencies: [31, 27, 3785, 1379, 1934, 661, 1376, 33, 4501, 4010, 10904, 566, 10659, 6266, 3968, 1365, 11259, 11260, 10749, 2] */
import ChannelStore from '../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import SelectedChannelStore from '../stores/SelectedChannelStore.tsx'; /* Metro dependency 1934 */
import LurkingStore from '../modules/lurker_mode/LurkingStore.tsx'; /* Metro dependency 3785 */
import UsePrevious from '../hooks/usePrevious.tsx'; /* Metro dependency 6266 */
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 FluxModule from '../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */
import * as DismissibleContentConstantsModule from '../modules/dismissible_content/DismissibleContentConstants.tsx'; /* Metro dependency 1376 */
import * as CreateStylesModule from '../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as UseChannelStylesSharedModule from './useChannelStylesShared.tsx'; /* Metro dependency 11259 */
function _fun83461(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83461, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11089:6, offset: 0x01f1b92d, size: 321 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const lurkingStore = importDefault(3785) /* metro dependency 3785: LurkingStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
const env0_8 = (require(661) /* metro dependency 661: Constants */).ChannelTypes;
const env0_9 = (require(1376) /* metro dependency 1376: DismissibleContentConstants */).ContentDismissActionType;
const value = require(33) /* metro dependency 33 */;
const env0_10 = value.jsx;
const env0_11 = value.jsxs;
const env0_12 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {'position': 'absolute',
const env0_12 = (CreateStylesModule).createStyles({container: {'position': 'absolute',
'left': 0, 'right': 0, 'backgroundColor': 'transparent', 'marginTop': 8}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/ChannelContainer.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/ChannelContainer.tsx');
exports.ChannelContainer = ChannelContainer;
}
function NotificationsContainer() { // fn#83462, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11089:351, offset: 0x01f1ba6e, size: 111 bytes, params: 1, frame: 18
var r0;
var value;
const styles = useStyles();
if ((importDefault(4010) /* metro dependency 4010: useChatLayout */)().isChatBesideChannelList) {
var viewBindingProps = {style: styles.container};
value = importDefault(10904) /* metro dependency 10904: Notifications */;
value = <View {...viewBindingProps}>{((Component) => <Component />)(value)}</View>;
r0 = value;
} else {
r0 = null;
function NotificationsContainer() { // fn#83462, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11089:351, offset: 0x01f1ba6e, size: 111 bytes, params: 1, frame: 18
var r0;
var value;
const styles = useStyles();
if ((importDefault(4010) /* metro dependency 4010: useChatLayout */)().isChatBesideChannelList) {
var viewBindingProps = {style: styles.container};
value = importDefault(10904) /* metro dependency 10904: Notifications */;
value = (
<View {...viewBindingProps}>
{((Component) => <Component />)(value)}
</View>
);
r0 = value;
} else {
r0 = null;
}
return r0;
}
return r0;
}
function ChannelContainer({guildId, channelId, children}) { // fn#83463, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11089:582, offset: 0x01f1badd, size: 553 bytes, params: 2, frame: 25
const {channel, voiceChannelId,
isStageChannel} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([SelectedChannelStore,
ChannelStore], _fun83464);
let r8 = isStageChannel ? (importDefault(10659) /* metro dependency 10659: useCanSpeakInChannel */)(voiceChannelId) : !isStageChannel;
const value6 = (require(566) /* metro dependency 566: flux */).useStateFromStores([LurkingStore], _fun83465);
const r12 = channel != null && channel.isPrivate();
const value9 = (importDefault(6266) /* metro dependency 6266: usePrevious */)(r12);
value9.useEffect(_fun83466, [channelId, (importDefault(6266) /* metro dependency 6266: usePrevious */)(channelId),
r12, value9]);
const value11 = (require(11259) /* metro dependency 11259: useChannelStylesShared */).useChannelStyles();
const scene = value11.scene;
const flex = value11.flex;
const type = channel?.type;
const GUILD_ANNOUNCEMENT = ChannelTypes.GUILD_ANNOUNCEMENT;
const r10 = type !== GUILD_ANNOUNCEMENT ? null : value6 ? ((Component) => <Component channel={channel} />)(importDefault(11260) /* metro dependency 11260: AnnouncementChannelLurkerBar */) : null;
r8 = r8 && ((Component) => <Component style={value11.callPTTButton} />)(importDefault(10749) /* metro dependency 10749: CallPTTButton */);
return (
<View style={scene}>
<View style={flex}>
{r10}
{children}
{r8}
function ChannelContainer({guildId, channelId, children}) { // fn#83463, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11089:582, offset: 0x01f1badd, size: 553 bytes, params: 2, frame: 25
const {channel, voiceChannelId,
isStageChannel} = (FluxModule).useStateFromStoresObject([SelectedChannelStore,
ChannelStore], _fun83464);
let r8 = isStageChannel ? (importDefault(10659) /* metro dependency 10659: useCanSpeakInChannel */)(voiceChannelId) : !isStageChannel;
const value6 = (FluxModule).useStateFromStores([LurkingStore], _fun83465);
const r12 = channel != null && channel.isPrivate();
const value9 = (UsePrevious)(r12);
value9.useEffect(_fun83466, [channelId, (UsePrevious)(channelId),
r12, value9]);
const value11 = (UseChannelStylesSharedModule).useChannelStyles();
const scene = value11.scene;
const flex = value11.flex;
const type = channel?.type;
const GUILD_ANNOUNCEMENT = ChannelTypes.GUILD_ANNOUNCEMENT;
const r10 = (
type !== GUILD_ANNOUNCEMENT
? null
: (
value6
? ((Component) => <Component channel={channel} />)(importDefault(11260) /* metro dependency 11260: AnnouncementChannelLurkerBar */)
: null
)
);
r8 = r8 && ((Component) => <Component style={value11.callPTTButton} />)(importDefault(10749) /* metro dependency 10749: CallPTTButton */);
return (
<View style={scene}>
<View style={flex}>
{r10}
{children}
{r8}
</View>
<NotificationsContainer />
</View>
<NotificationsContainer />
</View>
);
}
);
function _fun83464() { // fn#83464, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11089:691, offset: 0x01f1bd06, size: 102 bytes, params: 1, frame: 14
var r1;
let value = environment.__proto__;
const voiceChannelId = SelectedChannelStore.getVoiceChannelId();
const object = {};
const channelStoreBinding = ChannelStore;
object.channel = channelStoreBinding.getChannel(channelId);
object.voiceChannelId = voiceChannelId;
const Boolean = global.Boolean;
value = channelStoreBinding.getChannel(voiceChannelId);
if (value == null) {
r1 = undefined;
} else {
value = value.isGuildStageVoice();
r1 = value;
}
object.isStageChannel = Boolean(r1);
return object;
}
function _fun83464() { // fn#83464, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11089:691, offset: 0x01f1bd06, size: 102 bytes, params: 1, frame: 14
var r1;
let value = environment.__proto__;
const voiceChannelId = SelectedChannelStore.getVoiceChannelId();
const object2 = {};
object2.channel = ChannelStore.getChannel(channelId);
object2.voiceChannelId = voiceChannelId;
const Boolean = global.Boolean;
value = ChannelStore.getChannel(voiceChannelId);
if (value == null) {
r1 = undefined;
} else {
value = value.isGuildStageVoice();
r1 = value;
}
object2.isStageChannel = Boolean(r1);
return object2;
}
function _fun83465() { // fn#83465, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11089:964, offset: 0x01f1bd6c, size: 40 bytes, params: 1, frame: 12
return guildId != null && LurkingStore.isLurking(guildId);
}
function _fun83465() { // fn#83465, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11089:964, offset: 0x01f1bd6c, size: 40 bytes, params: 1, frame: 12
return guildId != null && LurkingStore.isLurking(guildId);
}
function _fun83466() { // fn#83466, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11089:1060, offset: 0x01f1bd94, size: 134 bytes, params: 1, frame: 16
var r1;
var moduleValue;
var value;
let r0 = ReactModule && !env0_2;
if (!r0) {
r1 = ReactModule && env0_2;
r1 = r1 && channelId !== ReactNativeModule.View;
r0 = r1;
}
if (r0) {
value = environment.__proto__;
moduleValue = require(3968) /* metro dependency 3968: DismissibleContentUnsafeUtils */;
moduleValue.UNSAFE_markDismissibleContentAsDismissed((require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent.ACTIVITY_GDM_CALL_TOOLTIP,
{dismissAction: ContentDismissActionType.AUTO});
}
}
function _fun83466() { // fn#83466, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11089:1060, offset: 0x01f1bd94, size: 134 bytes, params: 1, frame: 16
var r1;
var moduleValue;
var value;
let r0 = env0_3 && !env0_2;
if (!r0) {
r1 = env0_3 && env0_2;
r1 = r1 && channelId !== env0_4;
r0 = r1;
}
if (r0) {
value = environment.__proto__;
moduleValue = require(3968) /* metro dependency 3968: DismissibleContentUnsafeUtils */;
moduleValue.UNSAFE_markDismissibleContentAsDismissed((require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent.ACTIVITY_GDM_CALL_TOOLTIP,
{dismissAction: ContentDismissActionType.AUTO});
}
}
global.__d(_fun83461, 10903, [31, 27, 3785, 1379, 1934, 661, 1376, 33, 4501, 4010, 10904, 566, 10659, 6266, 3968,
1365, 11259, 11260, 10749,
2]) /* metro module 10903, dependencies: [31, 27, 3785, 1379, 1934, 661, 1376, 33, 4501, 4010, 10904, 566, 10659, 6266, 3968, 1365, 11259, 11260, 10749, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,309 +1,365 @@
/* Metro module 9066; source: components_native/DatePickerActionSheet.tsx; dependencies: [57, 31, 27, 482, 33, 4501, 697, 6597, 4080, 477, 6758, 6806, 9067, 1244, 4570, 4017, 1305, 4504, 4573, 4579, 4048, 8994, 3738, 6275, 9068, 4002, 2] */
import Module00057 from '../by-id/module-00057.js'; /* Metro dependency 57 */
import ReanimatedRexport from '../modules/reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import UseTheme from '../hooks/useTheme.tsx'; /* Metro dependency 4048 */
import ActionSheetActionCreators from '../modules/action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
import TextStyles from '../modules/rebrand/native/TextStyles.tsx'; /* Metro dependency 6597 */
import UseStableCallback from '../hooks/useStableCallback.tsx'; /* Metro dependency 8994 */
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 PlatformUtilsModule from '../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
import * as ConstantsModule from '../external/discord_common/js/shared/Constants.tsx'; /* Metro dependency 482 */
import * as IndexNativeModule from '../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as NativeModule from '../design/void/native.tsx'; /* Metro dependency 1305 */
import * as ReanimatedRexportModule from '../modules/reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as TimingModule from '../design/animation/reanimated/timing/timing.tsx'; /* Metro dependency 4504 */
import * as SetAccessibilityFocusAndroidModule from '../modules/a11y/native/setAccessibilityFocus.android.tsx'; /* Metro dependency 4570 */
import * as TextModule from '../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as BaseTextButtonNativeModule from '../design/components/Button/native/BaseTextButton.native.tsx'; /* Metro dependency 4579 */
import * as BottomSheetNativeModule from '../design/components/Sheet/native/BottomSheet.native.tsx'; /* Metro dependency 6275 */
import * as BottomSheetTitleHeaderNativeModule from '../design/components/Sheet/native/BottomSheetTitleHeader.native.tsx'; /* Metro dependency 6758 */
import * as ActionSheetHeaderPressableTextNativeModule from '../design/components/Sheet/native/ActionSheetHeaderPressableText.native.tsx'; /* Metro dependency 9067 */
function _fun70841(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#70841, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9251:6, offset: 0x01d0a451, size: 523 bytes, params: 8, frame: 24
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
const Fonts = (require(482) /* metro dependency 482: Constants */).Fonts;
let value = require(33) /* metro dependency 33 */;
const Fonts = (ConstantsModule).Fonts;
let value = JsxRuntimeModule;
const env0_6 = value.jsx;
const env0_7 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
let createStyles = value.createStyles;
const object2 = {'backgroundColor': null, 'padding': 12, 'marginHorizontal': 12};
const object3 = {'backgroundColor': null, 'padding': 12, 'marginHorizontal': 12};
const BACKGROUND_FEEDBACK_CRITICAL = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_FEEDBACK_CRITICAL;
object2.backgroundColor = BACKGROUND_FEEDBACK_CRITICAL;
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object3.backgroundColor = BACKGROUND_FEEDBACK_CRITICAL;
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
const env0_8 = Reflect.apply(createStyles, value, [{rangeErrorContainer: {justifyContent: 'flex-start'},
rangeError: object2, datetimePickerContainer: {'display': 'flex', 'alignItems': 'center'}}]);
rangeError: object3, datetimePickerContainer: {'display': 'flex', 'alignItems': 'center'}}]);
value = require(4501) /* metro dependency 4501: createStyles */;
createStyles = value.createStyles;
const object5 = {};
const textStyles = importDefault(6597) /* metro dependency 6597: TextStyles */;
const object4 = {};
const DISPLAY_SEMIBOLD = Fonts.DISPLAY_SEMIBOLD;
const TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_DEFAULT;
copyDataProperties(object5, textStyles(DISPLAY_SEMIBOLD, TEXT_DEFAULT, 16), undefined);
copyDataProperties(object4, TextStyles(DISPLAY_SEMIBOLD, TEXT_DEFAULT, 16), undefined);
const env0_9 = Reflect.apply(createStyles, value, [{footer: {'marginVertical': 6, 'paddingHorizontal': 12,
'display': 'flex', 'flexDirection': 'row', 'justifyContent': 'flex-end'}, actionButtonText: object5,
'display': 'flex', 'flexDirection': 'row', 'justifyContent': 'flex-end'}, actionButtonText: object4,
actionButton: {marginLeft: 24}}]);
object = {code: 'function DatePickerActionSheetTsx1(){const{STANDARD_EASING,show,withTiming}=this.__closure;const animationSettings={easing:STANDARD_EASING,duration:show?200:150};return{opacity:withTiming(show?1:0,animationSettings),maxHeight:withTiming(show?500:0,animationSettings),paddingVertical:withTiming(show?12:0,animationSettings)};}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/DatePickerActionSheet.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/DatePickerActionSheet.tsx');
exports.default = DatePickerActionSheet;
}
function closeActionSheet() { // fn#70842, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9251:689, offset: 0x01d0a65c, size: 37 bytes, params: 1, frame: 11
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
}
function ActionSheetHeader({title, handleCancel, handleSubmit}) { // fn#70843, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9251:743, offset: 0x01d0a681, size: 332 bytes, params: 2, frame: 27
var bottomSheetTitleHeader;
var object;
const ActionSheetHeaderPressableText = (require(9067) /* metro dependency 9067: ActionSheetHeaderPressableTextNative */).ActionSheetHeaderPressableText;
var object2;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var object3;
const isAndroid2 = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid();
const BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
if (isAndroid2) {
bottomSheetTitleHeader = <BottomSheetTitleHeader title={title} trailing={((ActionSheetCloseButton) => <ActionSheetCloseButton onPress={handleCancel} />)((require(6806) /* metro dependency 6806: ActionSheetCloseButtonNative */).ActionSheetCloseButton)} />;
} else {
bottomSheetTitleHeader = <BottomSheetTitleHeader title={title} leading={<ActionSheetHeaderPressableText onPress={handleCancel} label={intl.string(t['ETE/oC'])} />} trailing={<ActionSheetHeaderPressableText onPress={handleSubmit} label={intl.string(t['R3BPH+'])} />} />;
function closeActionSheet_70842() { // fn#70842, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9251:689, offset: 0x01d0a65c, size: 37 bytes, params: 1, frame: 11
(ActionSheetActionCreators).hideActionSheet();
}
return bottomSheetTitleHeader;
}
function DateRangeError({show, errorText}) { // fn#70844, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9251:1550, offset: 0x01d0a7cd, size: 390 bytes, params: 2, frame: 23
var object2;
const styles = useStyles();
const value2 = env0_4.useRef(null);
env0_4.useEffect(_fun70845, [show]);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = DateRangeErrorS;
object2 = {};
const STANDARD_EASING = (require(1305) /* metro dependency 1305: native */).STANDARD_EASING;
object2.STANDARD_EASING = STANDARD_EASING;
object2.show = show;
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
closure.__closure = object2;
closure.__workletHash = 11991491746736;
closure.__initData = env0_10;
const value3 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const items2 = [styles.rangeErrorContainer, value3];
const r4 = show ? 'auto' : 'no-hide-descendants';
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<View2
style={items2}
accessibilityElementsHidden={!show}
importantForAccessibility={r4}
>
<View
ref={value2}
accessible
accessibilityRole="alert"
style={styles.rangeError}
>
<Text variant="text-md/medium" color="always-white">
{errorText}
</Text>
</View>
</View2>
);
}
function ActionSheetFooter({handleCancel, handleSubmit, canSubmit}) { // fn#70847, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9251:2392, offset: 0x01d0aa58, size: 524 bytes, params: 2, frame: 33
var r0;
const BaseTextButton = (require(4579) /* metro dependency 4579: BaseTextButtonNative */).BaseTextButton;
var object;
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
var actionButtonText;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var actionButton;
var items2;
const styles = useStyles();
if ((require(477) /* metro dependency 477: PlatformUtils */).isAndroid()) {
var viewBindingProps = {style: styles.footer};
object = {'shrink': true, 'size': 'md', 'variant': 'secondary'};
actionButtonText = styles.actionButtonText;
string = intl.string;
object.textElement = <LegacyText style={actionButtonText}>{Reflect.apply(string, intl,
[t['ETE/oC']])}</LegacyText>;
object.accessibilityLabel = intl.string(t['ETE/oC']);
actionButton = styles.actionButton;
object.style = actionButton;
object.onPress = handleCancel;
items2 = [<BaseTextButton {...object} />];
var baseTextButtonProps = {'shrink': true, 'disabled': null, 'size': 'md', 'variant': 'secondary',
disabled: !canSubmit};
actionButtonText = styles.actionButtonText;
string = intl.string;
baseTextButtonProps.textElement = <LegacyText style={actionButtonText}>{Reflect.apply(string, intl,
[t['cY+Oob']])}</LegacyText>;
baseTextButtonProps.accessibilityLabel = intl.string(t['cY+Oob']);
actionButton = styles.actionButton;
baseTextButtonProps.style = actionButton;
baseTextButtonProps.onPress = handleSubmit;
items2[1] = <BaseTextButton {...baseTextButtonProps} />;
r0 = <View {...viewBindingProps}>{items2}</View>;
} else {
r0 = null;
}
return r0;
}
function DatePickerActionSheet({mode, title, startDate, maximumDate, minimumDate, onSubmit, onCancel, requireDateChanged}) { // fn#70848, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9251:3109, offset: 0x01d0ac64, size: 1185 bytes, params: 2, frame: 42
var r8;
var r17;
var r16;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var date;
mode = mode === undefined ? 'date' : mode;
let r11 = title !== undefined ? title : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.epc9sr);
const env0_3 = onCancel;
const closure = isAboveMin;
const closure2 = isBelowMax;
const styles = useStyles();
if (startDate != null) {
r8 = startDate;
} else {
date = new global.Date();
}
const env0_4 = r8;
let binding = env0_4;
let useState = binding.useState;
const value8 = Reflect.apply(useState, binding, [r8]);
binding = env0_3;
const value9 = binding(value8, 2);
const property = value9[0];
const env0_6 = value9[1];
const binding2 = env0_4;
useState = binding2.useState;
const value10 = binding(Reflect.apply(useState, binding2, [!requireDateChanged]), 2);
const property2 = value10[0];
const env0_8 = value10[1];
const binding3 = env0_4;
useState = binding3.useState;
const value11 = binding(Reflect.apply(useState, binding3, [true]), 2);
const env0_9 = value11[0];
const env0_10 = value11[1];
const binding4 = env0_4;
useState = binding4.useState;
const value12 = binding(Reflect.apply(useState, binding4, [false]), 2);
const property3 = value12[0];
const env0_11 = value12[1];
const value13 = (importDefault(4048) /* metro dependency 4048: useTheme */)();
const env0_12 = env0_4.useRef(property);
if (maximumDate != null) {
date = new global.Date(maximumDate.getFullYear() + 1, 0, 1, 0, -1);
} else {
r17 = undefined;
}
if (minimumDate != null) {
date = new global.Date(minimumDate.getFullYear(), 0, 1, 0);
} else {
r16 = undefined;
}
env0_4.useEffect(_fun70851, [property]);
const value20 = (importDefault(8994) /* metro dependency 8994: useStableCallback */)(_fun70852);
const value21 = (importDefault(8994) /* metro dependency 8994: useStableCallback */)(_fun70853);
const value22 = (importDefault(8994) /* metro dependency 8994: useStableCallback */)(_fun70854);
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
const bottomSheetProps = {onDismiss: onCancel,
header: <ActionSheetHeader title={r11} handleCancel={value20} handleSubmit={value21} />};
r11 = property3 && !closure(property);
let formatToPlainString = intl.formatToPlainString;
const FsJO55 = (require(1244) /* metro dependency 1244: indexNative */).t.FsJO55;
const object = {};
object.minDate = (importDefault(3738) /* metro dependency 3738 */)(minimumDate).format('L');
const items2 = [<DateRangeError show={r11} errorText={Reflect.apply(formatToPlainString, intl, [FsJO55,
object])} />];
const r14 = property3 && !closure2(property);
formatToPlainString = intl.formatToPlainString;
const R7r9VN = (require(1244) /* metro dependency 1244: indexNative */).t.R7r9VN;
const object2 = {};
object2.maxDate = (importDefault(3738) /* metro dependency 3738 */)(maximumDate).format('L');
items2[1] = <DateRangeError show={r14} errorText={Reflect.apply(formatToPlainString, intl, [R7r9VN, object2])} />;
items2[2] = <View style={styles.datetimePickerContainer}>{((Component) => <Component theme={(require(4002) /* metro dependency 4002: shared */).isThemeLight(value13) ? 'light' : 'dark'} date={property} onDateChange={value22} maximumDate={r17} minimumDate={r16} mode={mode} />)(importDefault(9068) /* metro dependency 9068 */)}</View>;
items2[3] = <ActionSheetFooter handleCancel={value20} handleSubmit={value21} canSubmit={property2} />;
return (
<BottomSheet {...bottomSheetProps}>
{items2}
</BottomSheet>
);
}
function _fun70845() { // fn#70845, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9251:1636, offset: 0x01d0a953, size: 59 bytes, params: 1, frame: 13
const value = environment.__proto__;
(require(4570) /* metro dependency 4570: setAccessibilityFocusAndroid */).setAccessibilityFocus({ref: env0_1,
delay: 200});
}
function DateRangeErrorS() { // fn#70846, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9251:1736, owner: DateRangeError.S, offset: 0x01d0a98e, size: 202 bytes, params: 1, frame: 20
const object3 = {};
let value = environment.__proto__;
const STANDARD_EASING = (require(1305) /* metro dependency 1305: native */).STANDARD_EASING;
object3.easing = STANDARD_EASING;
object3.duration = show ? 200 : 150;
const object4 = {};
const timingModule = require(4504) /* metro dependency 4504: timing */;
const withTiming = timingModule.withTiming;
showBinding = show;
const value5 = 0;
object4.opacity = Reflect.apply(withTiming, timingModule, [showBinding ? 1 : value5, object3]);
const moduleValue2 = timingModule;
object4.maxHeight = moduleValue2.withTiming(show ? 500 : value5, object3);
value = timingModule;
object4.paddingVertical = value.withTiming(show ? 12 : value5, object3);
return object4;
}
function isAboveMin(a0) { // fn#70849, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9251:3608, owner: DatePickerActionSheet.isAboveMin, offset: 0x01d0b105, size: 49 bytes, params: 2, frame: 11
var r0;
var time;
const value2 = minimumDate == null;
if (value2) {
r0 = value2;
} else {
time = a0.getTime();
minimumDateBinding = minimumDate;
r0 = time >= minimumDateBinding.getTime();
}
return r0;
}
function isBelowMax(a0) { // fn#70850, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9251:3672, owner: DatePickerActionSheet.isBelowMax, offset: 0x01d0b136, size: 49 bytes, params: 2, frame: 11
var r0;
var time;
const value2 = maximumDate == null;
if (value2) {
r0 = value2;
} else {
time = a0.getTime();
maximumDateBinding = maximumDate;
r0 = time <= maximumDateBinding.getTime();
}
return r0;
}
function _fun70852() { // fn#70852, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9251:3789, offset: 0x01d0b17c, size: 52 bytes, params: 1, frame: 10
env0_12.current = env0_4;
if (onCancel != null) {
onCancel();
}
closeActionSheet();
}
function _fun70853() { // fn#70853, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9251:3853, offset: 0x01d0b1b0, size: 104 bytes, params: 1, frame: 14
var onSubmitBinding;
var value2;
if (env0_7 && env0_9) {
onSubmitBinding = onSubmit;
value2 = environment.__proto__;
onSubmitBinding((importDefault(3738) /* metro dependency 3738 */)(env0_12.current));
}
if (env0_9) {
value = environment.__proto__;
closeActionSheet();
} else {
env0_11(true);
}
}
function _fun70854(a0) { // fn#70854, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9251:3937, offset: 0x01d0b218, size: 103 bytes, params: 2, frame: 14
if (a0 != null) {
if (!(minimumDate == null && maximumDate == null)) {
env0_10(isAboveMin(a0) && isBelowMax(a0));
function ActionSheetHeader({title, handleCancel, handleSubmit}) { // fn#70843, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9251:743, offset: 0x01d0a681, size: 332 bytes, params: 2, frame: 27
var bottomSheetTitleHeader;
var object4;
const ActionSheetHeaderPressableText = (ActionSheetHeaderPressableTextNativeModule).ActionSheetHeaderPressableText;
var object5;
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
var object6;
const isAndroid2 = (PlatformUtilsModule).isAndroid();
const BottomSheetTitleHeader = (BottomSheetTitleHeaderNativeModule).BottomSheetTitleHeader;
if (isAndroid2) {
bottomSheetTitleHeader = (
<BottomSheetTitleHeader
title={title}
trailing={((ActionSheetCloseButton) => <ActionSheetCloseButton onPress={handleCancel} />)((require(6806) /* metro dependency 6806: ActionSheetCloseButtonNative */).ActionSheetCloseButton)}
/>
);
} else {
bottomSheetTitleHeader = (
<BottomSheetTitleHeader
title={title}
leading={<ActionSheetHeaderPressableText onPress={handleCancel} label={intl.string(t['ETE/oC'])} />}
trailing={<ActionSheetHeaderPressableText onPress={handleSubmit} label={intl.string(t['R3BPH+'])} />}
/>
);
}
env0_11(false);
env0_8(true);
env0_6(a0);
return bottomSheetTitleHeader;
}
function DateRangeError({show, errorText}) { // fn#70844, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9251:1550, offset: 0x01d0a7cd, size: 390 bytes, params: 2, frame: 23
const styles = useStyles();
const value2 = ReactModule.useRef(null);
ReactModule.useEffect(_fun70845, [show]);
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
const DateRangeErrorS2 = DateRangeErrorS;
object = {};
const STANDARD_EASING = (NativeModule).STANDARD_EASING;
object.STANDARD_EASING = STANDARD_EASING;
object.show = show;
object.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
DateRangeErrorS2.__closure = object;
DateRangeErrorS2.__workletHash = 11991491746736;
DateRangeErrorS2.__initData = env0_10;
const value3 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [DateRangeErrorS2]);
const View2 = (ReanimatedRexport).View;
const items2 = [styles.rangeErrorContainer, value3];
const r4 = show ? 'auto' : 'no-hide-descendants';
const Text = (TextModule).Text;
return (
<View2
style={items2}
accessibilityElementsHidden={!show}
importantForAccessibility={r4}
>
<View
ref={value2}
accessible
accessibilityRole="alert"
style={styles.rangeError}
>
<Text variant="text-md/medium" color="always-white">
{errorText}
</Text>
</View>
</View2>
);
function _fun70845() { // fn#70845, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9251:1636, offset: 0x01d0a953, size: 59 bytes, params: 1, frame: 13
const value = environment.__proto__;
(SetAccessibilityFocusAndroidModule).setAccessibilityFocus({ref: env0_1,
delay: 200});
}
function DateRangeErrorS() { // fn#70846, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9251:1736, owner: DateRangeError.S, offset: 0x01d0a98e, size: 202 bytes, params: 1, frame: 20
const object = {};
let value = environment.__proto__;
const STANDARD_EASING = (NativeModule).STANDARD_EASING;
object.easing = STANDARD_EASING;
object.duration = show ? 200 : 150;
const object2 = {};
const withTiming = TimingModule.withTiming;
showBinding = show;
const value5 = 0;
object2.opacity = Reflect.apply(withTiming, TimingModule, [showBinding ? 1 : value5, object]);
object2.maxHeight = TimingModule.withTiming(show ? 500 : value5, object);
value = TimingModule;
object2.paddingVertical = value.withTiming(show ? 12 : value5, object);
return object2;
}
}
function ActionSheetFooter({handleCancel, handleSubmit, canSubmit}) { // fn#70847, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9251:2392, offset: 0x01d0aa58, size: 524 bytes, params: 2, frame: 33
var r0;
const BaseTextButton = (BaseTextButtonNativeModule).BaseTextButton;
var object2;
const LegacyText = (NativeModule).LegacyText;
var actionButtonText;
const intl = (IndexNativeModule).intl;
var string;
const t = (IndexNativeModule).t;
var actionButton;
var items2;
const styles = useStyles();
if ((require(477) /* metro dependency 477: PlatformUtils */).isAndroid()) {
var viewBindingProps = {style: styles.footer};
object2 = {'shrink': true, 'size': 'md', 'variant': 'secondary'};
actionButtonText = styles.actionButtonText;
string = intl.string;
object2.textElement = (
<LegacyText style={actionButtonText}>
{Reflect.apply(string, intl, [t['ETE/oC']])}
</LegacyText>
);
object2.accessibilityLabel = intl.string(t['ETE/oC']);
actionButton = styles.actionButton;
object2.style = actionButton;
object2.onPress = handleCancel;
items2 = [
<BaseTextButton {...object2} />,
];
var baseTextButtonProps = {'shrink': true, 'disabled': null, 'size': 'md', 'variant': 'secondary',
disabled: !canSubmit};
actionButtonText = styles.actionButtonText;
string = intl.string;
baseTextButtonProps.textElement = (
<LegacyText style={actionButtonText}>
{Reflect.apply(string, intl, [t['cY+Oob']])}
</LegacyText>
);
baseTextButtonProps.accessibilityLabel = intl.string(t['cY+Oob']);
actionButton = styles.actionButton;
baseTextButtonProps.style = actionButton;
baseTextButtonProps.onPress = handleSubmit;
items2[1] = <BaseTextButton {...baseTextButtonProps} />;
r0 = (
<View {...viewBindingProps}>
{items2}
</View>
);
} else {
r0 = null;
}
return r0;
}
function DatePickerActionSheet({mode, title, startDate, maximumDate, minimumDate, onSubmit, onCancel, requireDateChanged}) { // fn#70848, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9251:3109, offset: 0x01d0ac64, size: 1185 bytes, params: 2, frame: 42
var r8;
var r17;
var r16;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var date;
mode = mode === undefined ? 'date' : mode;
let r11 = title !== undefined ? title : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.epc9sr);
const onCancel2 = onCancel;
const isAboveMin2 = isAboveMin;
const isBelowMax2 = isBelowMax;
const styles = useStyles();
if (startDate != null) {
r8 = startDate;
} else {
date = new global.Date();
}
const env0_4 = r8;
let binding = env0_4;
let useState = binding.useState;
const value8 = Reflect.apply(useState, binding, [r8]);
binding = onCancel2;
const value9 = binding(value8, 2);
const property = value9[0];
const env0_6 = value9[1];
const binding2 = env0_4;
useState = binding2.useState;
const value10 = binding(Reflect.apply(useState, binding2, [!requireDateChanged]), 2);
const property2 = value10[0];
const env0_8 = value10[1];
const binding3 = env0_4;
useState = binding3.useState;
const value11 = binding(Reflect.apply(useState, binding3, [true]), 2);
const env0_9 = value11[0];
const env0_10 = value11[1];
const binding4 = env0_4;
useState = binding4.useState;
const value12 = binding(Reflect.apply(useState, binding4, [false]), 2);
const property3 = value12[0];
const env0_11 = value12[1];
const value13 = (UseTheme)();
const env0_12 = env0_4.useRef(property);
if (maximumDate != null) {
date = new global.Date(maximumDate.getFullYear() + 1, 0, 1, 0, -1);
} else {
r17 = undefined;
}
if (minimumDate != null) {
date = new global.Date(minimumDate.getFullYear(), 0, 1, 0);
} else {
r16 = undefined;
}
env0_4.useEffect(_fun70851, [property]);
const value20 = (UseStableCallback)(_fun70852);
const value21 = (UseStableCallback)(_fun70853);
const value22 = (UseStableCallback)(_fun70854);
const BottomSheet = (BottomSheetNativeModule).BottomSheet;
const bottomSheetProps = {onDismiss: onCancel,
header: <ActionSheetHeader title={r11} handleCancel={value20} handleSubmit={value21} />};
r11 = property3 && !isAboveMin2(property);
let formatToPlainString = intl.formatToPlainString;
const FsJO55 = (require(1244) /* metro dependency 1244: indexNative */).t.FsJO55;
const object3 = {};
object3.minDate = (importDefault(3738) /* metro dependency 3738 */)(minimumDate).format('L');
const items2 = [
<DateRangeError show={r11} errorText={Reflect.apply(formatToPlainString, intl, [FsJO55, object3])} />,
];
const r14 = property3 && !isBelowMax2(property);
formatToPlainString = intl.formatToPlainString;
const R7r9VN = (require(1244) /* metro dependency 1244: indexNative */).t.R7r9VN;
const object4 = {};
object4.maxDate = (importDefault(3738) /* metro dependency 3738 */)(maximumDate).format('L');
items2[1] = <DateRangeError show={r14} errorText={Reflect.apply(formatToPlainString, intl, [R7r9VN, object4])} />;
items2[2] = (
<View style={styles.datetimePickerContainer}>
{((Component) => <Component theme={(require(4002) /* metro dependency 4002: shared */).isThemeLight(value13) ? 'light' : 'dark'} date={property} onDateChange={value22} maximumDate={r17} minimumDate={r16} mode={mode} />)(importDefault(9068) /* metro dependency 9068 */)}
</View>
);
items2[3] = (
<ActionSheetFooter
handleCancel={value20}
handleSubmit={value21}
canSubmit={property2}
/>
);
return (
<BottomSheet {...bottomSheetProps}>
{items2}
</BottomSheet>
);
function isAboveMin(a0) { // fn#70849, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9251:3608, owner: DatePickerActionSheet.isAboveMin, offset: 0x01d0b105, size: 49 bytes, params: 2, frame: 11
var r0;
var time;
const value2 = minimumDate == null;
if (value2) {
r0 = value2;
} else {
time = a0.getTime();
minimumDateBinding = minimumDate;
r0 = time >= minimumDateBinding.getTime();
}
return r0;
}
function isBelowMax(a0) { // fn#70850, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9251:3672, owner: DatePickerActionSheet.isBelowMax, offset: 0x01d0b136, size: 49 bytes, params: 2, frame: 11
var r0;
var time;
const value2 = maximumDate == null;
if (value2) {
r0 = value2;
} else {
time = a0.getTime();
maximumDateBinding = maximumDate;
r0 = time <= maximumDateBinding.getTime();
}
return r0;
}
function _fun70851() { // fn#70851, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9251:3749, offset: 0x01d0b167, size: 21 bytes, params: 1, frame: 2
env0_12.current = ReactNativeModule.View;
}
function _fun70852() { // fn#70852, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9251:3789, offset: 0x01d0b17c, size: 52 bytes, params: 1, frame: 10
env0_12.current = env0_4;
if (onCancel != null) {
onCancel();
}
closeActionSheet_70842();
}
function _fun70853() { // fn#70853, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9251:3853, offset: 0x01d0b1b0, size: 104 bytes, params: 1, frame: 14
var onSubmitBinding;
var value2;
if (env0_7 && env0_9) {
onSubmitBinding = onSubmit;
value2 = environment.__proto__;
onSubmitBinding((importDefault(3738) /* metro dependency 3738 */)(env0_12.current));
}
if (env0_9) {
value = environment.__proto__;
closeActionSheet_70842();
} else {
env0_11(true);
}
}
function _fun70854(a0) { // fn#70854, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9251:3937, offset: 0x01d0b218, size: 103 bytes, params: 2, frame: 14
if (a0 != null) {
if (!(minimumDate == null && maximumDate == null)) {
env0_10(isAboveMin(a0) && isBelowMax(a0));
}
env0_11(false);
env0_8(true);
env0_6(a0);
}
}
}
}
global.__d(_fun70841, 9066, [57, 31, 27, 482, 33, 4501, 697, 6597, 4080, 477, 6758, 6806, 9067, 1244, 4570, 4017,
1305, 4504, 4573, 4579, 4048, 8994, 3738, 6275, 9068, 4002,
2]) /* metro module 9066, dependencies: [57, 31, 27, 482, 33, 4501, 697, 6597, 4080, 477, 6758, 6806, 9067, 1244, 4570, 4017, 1305, 4504, 4573, 4579, 4048, 8994, 3738, 6275, 9068, 4002, 2] */;
+276 -249
View File
@@ -1,274 +1,301 @@
/* Metro module 13112; source: components_native/ErrorBoundary.tsx; dependencies: [6, 7, 15, 17, 18, 5, 57, 31, 27, 10557, 33, 4501, 566, 10558, 4578, 1244, 1216, 694, 1305, 9165, 4573, 3868, 2] */
import Module00005 from '../by-id/module-00005.js'; /* Metro dependency 5 */
import ClassCallCheck from '../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import Module00057 from '../by-id/module-00057.js'; /* Metro dependency 57 */
import Dispatcher from '../Dispatcher.tsx'; /* Metro dependency 694 */
import SentryUtilsNative from '../utils/SentryUtils.native.tsx'; /* Metro dependency 1216 */
import BuildOverrideStore from '../modules/build_overrides/BuildOverrideStore.tsx'; /* Metro dependency 10557 */
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 FluxModule from '../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as IndexNativeModule from '../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as NativeModule from '../external/discord_common/js/packages/design/native.tsx'; /* Metro dependency 3868 */
import * as CreateStylesModule from '../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as ButtonNativeModule from '../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
function _fun100197(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100197, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13302:6, offset: 0x021e0e58, size: 468 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
const env0_8 = importDefault(5) /* metro dependency 5 */;
const env0_9 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_11 = value2.NativeModules;
const env0_12 = value2.View;
const buildOverrideStore = importDefault(10557) /* metro dependency 10557: BuildOverrideStore */;
const value3 = require(33) /* metro dependency 33 */;
const env0_14 = value3.jsx;
const env0_15 = value3.jsxs;
const env0_16 = (require(4501) /* metro dependency 4501: createStyles */).createLegacyClassComponentStyles({buttons: {'position': 'absolute',
let value = ReactModule;
const env0_16 = (CreateStylesModule).createLegacyClassComponentStyles({buttons: {'position': 'absolute',
'right': 32, 'bottom': 32, 'left': 32, 'gap': 12}, debugLogsContainer: {'position': 'absolute', 'right': 32,
'top': 64, 'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center', 'gap': 12},
error: {'marginTop': 24, 'textAlign': 'center'}, text: {textAlign: 'center'}});
const PureComponent = value.PureComponent;
value = _fun100207(PureComponent);
const ThemeContext = (require(3868) /* metro dependency 3868: native */).ThemeContext;
const ThemeContext = (NativeModule).ThemeContext;
value.contextType = ThemeContext;
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/ErrorBoundary.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/ErrorBoundary.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_100198() { // fn#100198, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13302:253, offset: 0x021e102c, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
function _isNativeReflectConstruct_100198() { // fn#100198, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13302:253, offset: 0x021e102c, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_100198_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_100198_isNativeReflectConstruct = function() {
return !!result;
})();
}
function MaybeClearBuildOverride() { // fn#100201, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13302:746, offset: 0x021e108e, size: 238 bytes, params: 1, frame: 20
let [property, env0_0] = env0_9(env0_10.useState(false), 2);
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStores = fluxModule.useStateFromStores;
if (Reflect.apply(useStateFromStores, fluxModule, [[BuildOverrideStore], function() {
var r0;
var property = BuildOverrideStore.getCurrentBuildOverride().overrides;
var value2 = undefined;
if (property == null) {
r0 = value2;
} else {
property = property[require(dependencyMap[13]).DEVICE_FIELD];
r0 = property == null ? value2 : property.id;
function MaybeClearBuildOverride() { // fn#100201, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13302:746, offset: 0x021e108e, size: 238 bytes, params: 1, frame: 20
let [property, env0_0] = Module00057(env0_10.useState(false), 2);
const useStateFromStores = FluxModule.useStateFromStores;
if (Reflect.apply(useStateFromStores, FluxModule, [[BuildOverrideStore], function() {
var r0;
var property = BuildOverrideStore.getCurrentBuildOverride().overrides;
var value2 = undefined;
if (property == null) {
r0 = value2;
} else {
property = property[require(dependencyMap[13]).DEVICE_FIELD];
r0 = property == null ? value2 : property.id;
}
return r0;
}]) == null) {
return null;
}
return r0;
}]) == null) {
return null;
const Button = (ButtonNativeModule).Button;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<Button
variant="secondary"
loading={property}
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['/Nz9rY'])}
onPress={function() {
return _clearOverride.apply(this, arguments);
}}
/>
);
function _clearOverride() { // fn#100202, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13302:996, owner: MaybeClearBuildOverride._clearOverride, offset: 0x021e117c, size: 53 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__;
return env1_8(_fun100204).apply(this, arguments);
function* _fun100204() { // fn#100204, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13302:1047, offset: 0x021e11bc, size: 97 bytes, params: 1, frame: 13
var binding;
var binding2;
var property;
var value4;
var clearBuildOverride;
var value5;
var value6;
var value7;
var error;
if (true) {
value = environment.__proto__.__proto__;
try {
} catch (error) {
require(false);
return undefined;
}
try {
require(true);
} catch (error) {
require(false);
return undefined;
}
try {
binding = env3_0;
} catch (error) {
require(false);
return undefined;
}
try {
binding2 = env3_2;
} catch (error) {
require(false);
return undefined;
}
try {
property = binding2[13];
} catch (error) {
require(false);
return undefined;
}
try {
value4 = binding(property);
} catch (error) {
require(false);
return undefined;
}
try {
clearBuildOverride = value4.clearBuildOverride;
} catch (error) {
require(false);
return undefined;
}
try {
value5 = Reflect.apply(clearBuildOverride, value4, []);
} catch (error) {
require(false);
return undefined;
}
yield value5;
try {
value6 = undefined;
value7 = false;
} catch (error) {
require(false);
return undefined;
}
if (value7) {
return value6;
}
}
}
}
}
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<Button
variant="secondary"
loading={property}
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['/Nz9rY'])}
onPress={function() {
return _clearOverride.apply(this, arguments);
}}
/>
);
}
function _fun100207(a0) { // fn#100207, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13302:1337, offset: 0x021e126f, size: 199 bytes, params: 2, frame: 16
const closure = ErrorBoundary_100208;
env0_7(closure, a0);
return env0_4(closure, [{key: 'componentDidCatch', value: function(a0, a1) {
this.triggerSoftCrash(a0, a1);
}}, {key: 'triggerSoftCrash', value: value_100210}, {key: 'handleReload', value: function() {
var BundleUpdaterManager = NativeModules.BundleUpdaterManager;
BundleUpdaterManager.reload();
}}, {key: 'componentDidMount', value: function() {
var env0_0 = this;
if (global.window.DiscordErrors == null) {
global.window.DiscordErrors = {softCrash: _fun100213};
this.discordErrorsSet = true;
function _fun100207(a0) { // fn#100207, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13302:1337, offset: 0x021e126f, size: 199 bytes, params: 2, frame: 16
const ErrorBoundary_1002082 = ErrorBoundary_100208;
Inherits(ErrorBoundary_1002082, a0);
return CreateClass(ErrorBoundary_1002082, [{key: 'componentDidCatch', value: function(a0, a1) {
this.triggerSoftCrash(a0, a1);
}}, {key: 'triggerSoftCrash', value: value_100210}, {key: 'handleReload', value: function() {
var BundleUpdaterManager = NativeModules.BundleUpdaterManager;
BundleUpdaterManager.reload();
}}, {key: 'componentDidMount', value: function() {
var env0_0 = this;
if (global.window.DiscordErrors == null) {
global.window.DiscordErrors = {softCrash: _fun100213};
this.discordErrorsSet = true;
}
}}, {key: 'componentWillUnmount', value: function() {
if (this.discordErrorsSet) {
global.window.DiscordErrors = null;
this.discordErrorsSet = false;
}
}}, {key: 'render', value: value_100215}]);
function ErrorBoundary_100208(a0) { // fn#100208, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13302:1349, offset: 0x021e1336, size: 154 bytes, params: 2, frame: 19
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_3;
binding(this, ErrorBoundary_100208);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_6(ErrorBoundary_100208);
binding = env1_5;
if (_isNativeReflectConstruct_100198()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_6(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
value.state = {'error': null, 'info': null};
value.discordErrorsSet = false;
return value;
}
}}, {key: 'componentWillUnmount', value: function() {
if (this.discordErrorsSet) {
global.window.DiscordErrors = null;
this.discordErrorsSet = false;
function value_100210(a0, a1) { // fn#100210, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13302:1794, offset: 0x021e13e9, size: 113 bytes, params: 3, frame: 17
this.setState({error: a0, info: a1});
const value = environment.__proto__;
(SentryUtilsNative).captureCrash(a0, {extra: a1});
(Dispatcher).dispatch({'type': 'CLEAR_CACHES',
'reason': 'App Crashed'});
}
}}, {key: 'render', value: value_100215}]);
}
function _clearOverride() { // fn#100202, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13302:996, owner: MaybeClearBuildOverride._clearOverride, offset: 0x021e117c, size: 53 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__;
return env1_8(_fun100204).apply(this, arguments);
}
function value_100212() { // fn#100212, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13302:2071, offset: 0x021e1475, size: 67 bytes, params: 1, frame: 5
const DiscordErrors = global.window.DiscordErrors;
if (DiscordErrors == null) {
global.window.DiscordErrors = {softCrash: softCrash};
this.discordErrorsSet = true;
}
function softCrash(a0) { // fn#100213, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13302:2161, owner: value_100212.softCrash, offset: 0x021e14b8, size: 25 bytes, params: 2, frame: 11
env0_0.triggerSoftCrash(a0);
}
}
function value_100215() { // fn#100215, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13302:2384, offset: 0x021e14f9, size: 523 bytes, params: 1, frame: 29
var r0;
var EmptyState;
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
var text;
var items3;
var items2;
const value = environment.__proto__;
const binding = env1_16;
const context = this.context;
const value2 = undefined;
const value3 = binding(context);
const error = this.state.error;
if (error !== null) {
EmptyState = (require(1305) /* metro dependency 1305: native */).EmptyState;
var emptyStateProps2 = {Illustration: (require(9165) /* metro dependency 9165: AppCrash */).AppCrash,
title: intl.string(t.tx8CkI), body: intl.string(t.CvQlAH)};
text = value3.text;
emptyStateProps2.titleStyle = text;
text = value3.text;
emptyStateProps2.bodyStyle = text;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
items3 = [
<Text
style={value3.error}
variant="text-sm/medium"
color="text-muted"
>
{(error == null ? value2 : error.message) ?? (error == null ? value2 : error.name) ?? 'Unknown Error'}
</Text>,
];
var viewBindingProps = {style: value3.buttons};
items2 = [
<MaybeClearBuildOverride />,
];
items2[1] = ((Button) => <Button text={intl.string(t['4n8OJn'])} onPress={this.handleReload} />)((require(4578) /* metro dependency 4578: ButtonNative */).Button);
items3[1] = (
<View {...viewBindingProps}>
{items2}
</View>
);
items3[2] = null;
r0 = (
<EmptyState {...emptyStateProps2}>
{items3}
</EmptyState>
);
} else {
r0 = this.props.children;
}
return r0;
}
function ErrorBoundary_100208(a0) { // fn#100208, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13302:1349, offset: 0x021e1336, size: 154 bytes, params: 2, frame: 19
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_3;
binding(this, ErrorBoundary_100208);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_6(ErrorBoundary_100208);
binding = env1_5;
if (_isNativeReflectConstruct_100198()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_6(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
value.state = {'error': null, 'info': null};
value.discordErrorsSet = false;
return value;
}
function value_100210(a0, a1) { // fn#100210, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13302:1794, offset: 0x021e13e9, size: 113 bytes, params: 3, frame: 17
this.setState({error: a0, info: a1});
const value = environment.__proto__;
(importDefault(1216) /* metro dependency 1216: SentryUtilsNative */).captureCrash(a0, {extra: a1});
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({'type': 'CLEAR_CACHES',
'reason': 'App Crashed'});
}
function value_100212() { // fn#100212, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13302:2071, offset: 0x021e1475, size: 67 bytes, params: 1, frame: 5
const DiscordErrors = global.window.DiscordErrors;
if (DiscordErrors == null) {
global.window.DiscordErrors = {softCrash: softCrash};
this.discordErrorsSet = true;
}
}
function value_100215() { // fn#100215, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13302:2384, offset: 0x021e14f9, size: 523 bytes, params: 1, frame: 29
var r0;
var EmptyState;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var text;
var items3;
var items2;
const value = environment.__proto__;
const binding = env1_16;
const context = this.context;
const value2 = undefined;
const value3 = binding(context);
const error = this.state.error;
if (error !== null) {
EmptyState = (require(1305) /* metro dependency 1305: native */).EmptyState;
var emptyStateProps2 = {Illustration: (require(9165) /* metro dependency 9165: AppCrash */).AppCrash,
title: intl.string(t.tx8CkI), body: intl.string(t.CvQlAH)};
text = value3.text;
emptyStateProps2.titleStyle = text;
text = value3.text;
emptyStateProps2.bodyStyle = text;
items3 = [((Text) => <Text style={value3.error} variant="text-sm/medium" color="text-muted">{(error == null ? value2 : error.message) ?? (error == null ? value2 : error.name) ?? 'Unknown Error'}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)];
var viewBindingProps = {style: value3.buttons};
items2 = [<MaybeClearBuildOverride />];
items2[1] = ((Button) => <Button text={intl.string(t['4n8OJn'])} onPress={this.handleReload} />)((require(4578) /* metro dependency 4578: ButtonNative */).Button);
items3[1] = <View {...viewBindingProps}>{items2}</View>;
items3[2] = null;
r0 = <EmptyState {...emptyStateProps2}>{items3}</EmptyState>;
} else {
r0 = this.props.children;
}
return r0;
}
function* _fun100204() { // fn#100204, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13302:1047, offset: 0x021e11bc, size: 97 bytes, params: 1, frame: 13
var binding;
var binding2;
var property;
var value4;
var clearBuildOverride;
var value5;
var value6;
var value7;
var error;
if (true) {
value = environment.__proto__.__proto__;
try {
} catch (error) {
require(false);
return undefined;
}
try {
require(true);
} catch (error) {
require(false);
return undefined;
}
try {
binding = env3_0;
} catch (error) {
require(false);
return undefined;
}
try {
binding2 = env3_2;
} catch (error) {
require(false);
return undefined;
}
try {
property = binding2[13];
} catch (error) {
require(false);
return undefined;
}
try {
value4 = binding(property);
} catch (error) {
require(false);
return undefined;
}
try {
clearBuildOverride = value4.clearBuildOverride;
} catch (error) {
require(false);
return undefined;
}
try {
value5 = Reflect.apply(clearBuildOverride, value4, []);
} catch (error) {
require(false);
return undefined;
}
yield value5;
try {
value6 = undefined;
value7 = false;
} catch (error) {
require(false);
return undefined;
}
if (value7) {
return value6;
}
}
}
function softCrash(a0) { // fn#100213, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13302:2161, owner: value_100212.softCrash, offset: 0x021e14b8, size: 25 bytes, params: 2, frame: 11
env0_0.triggerSoftCrash(a0);
}
global.__d(_fun100197, 13112, [6, 7, 15, 17, 18, 5, 57, 31, 27, 10557, 33, 4501, 566, 10558, 4578, 1244, 1216, 694,
1305, 9165, 4573, 3868,
2]) /* metro module 13112, dependencies: [6, 7, 15, 17, 18, 5, 57, 31, 27, 10557, 33, 4501, 566, 10558, 4578, 1244, 1216, 694, 1305, 9165, 4573, 3868, 2] */;
@@ -1,263 +1,283 @@
/* Metro module 10934; source: components_native/InAppNotificationSettingsModal.tsx; dependencies: [6, 7, 15, 17, 18, 31, 1383, 1379, 3793, 4864, 1878, 661, 33, 6613, 6610, 7007, 4805, 7972, 1244, 10935, 566, 5282, 5280, 2] */
import ClassCallCheck from '../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import ChannelStore from '../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import UserStore from '../stores/UserStore.tsx'; /* Metro dependency 1878 */
import RelationshipStore from '../stores/RelationshipStore.tsx'; /* Metro dependency 3793 */
import UserGuildSettingsStore from '../stores/UserGuildSettingsStore.tsx'; /* Metro dependency 4864 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as FluxModule from '../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as ChannelRecordModule from '../records/ChannelRecord.tsx'; /* Metro dependency 1383 */
import * as UseChannelNameModule from '../modules/channel/useChannelName.tsx'; /* Metro dependency 4805 */
import * as NavigatorNativeModule from '../design/components/Navigator/native/Navigator.native.tsx'; /* Metro dependency 5280 */
import * as NavigatorHeaderNativeModule from '../design/components/Navigator/native/NavigatorHeader.native.tsx'; /* Metro dependency 5282 */
import * as NativeModule from '../design/void/Form/native/index.tsx'; /* Metro dependency 7972 */
function _fun83807(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83807, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11120:6, offset: 0x01f29707, size: 414 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
let value = importAll(31) /* metro dependency 31 */;
const env0_9 = (require(1383) /* metro dependency 1383: ChannelRecord */).isMultiUserDM;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const userGuildSettingsStore = importDefault(4864) /* metro dependency 4864: UserGuildSettingsStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_14 = constantsModule.ChannelTypes;
const env0_15 = constantsModule.UserSettingsSections;
const value3 = require(33) /* metro dependency 33 */;
const env0_16 = value3.jsx;
const env0_17 = value3.jsxs;
let value = ReactModule;
const PureComponent = value.PureComponent;
const env0_18 = _fun83816(PureComponent);
value = value.memo(_fun83824);
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/InAppNotificationSettingsModal.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/InAppNotificationSettingsModal.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_83808() { // fn#83808, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11120:304, offset: 0x01f298a5, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_83808_isNativeReflectConstruct = function() {
return !!result;
})();
}
function ConnectedInAppNotificationSettingsScreen({channel}) { // fn#83811, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11120:2345, offset: 0x01f29907, size: 96 bytes, params: 2, frame: 17
return ((Component) => <Component channel={channel} isMuted={(require(566) /* metro dependency 566: flux */).useStateFromStores([UserGuildSettingsStore],
_fun83812)} />)(env0_18);
}
function getScreens_83813(a0, a1) { // fn#83813, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11120:2551, offset: 0x01f299ba, size: 104 bytes, params: 3, frame: 14
const env0_0 = ChannelStore.getChannel(a0);
const object = {headerTitle: headerTitle_83814};
object.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton(a1);
object.render = render_83815;
return {IN_APP_NOTIFICATION_SETTINGS: object};
}
function _fun83816(a0) { // fn#83816, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11120:503, offset: 0x01f29ae7, size: 153 bytes, params: 2, frame: 16
const closure = InAppNotificationSettingsScreen;
env0_7(closure, a0);
return env0_4(closure, [{key: 'renderGroupDMNotificationSettings', value: value_83820},
{key: 'renderTextChannelNotificationSettings', value: value_83821}, {key: 'renderChannelNotificationSettings',
value: function() {
var property = this.props.channel;
if (property != null) {
property = property.type;
if (ChannelTypes.GROUP_DM === property) {
return this.renderGroupDMNotificationSettings();
}
if (ChannelTypes.GUILD_TEXT === property) {
return this.renderTextChannelNotificationSettings();
}
if (ChannelTypes.GUILD_ANNOUNCEMENT === property) {
return this.renderTextChannelNotificationSettings();
}
function _isNativeReflectConstruct_83808() { // fn#83808, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11120:304, offset: 0x01f298a5, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return null;
}}, {key: 'render', value: value_83823}]);
}
return (_isNativeReflectConstruct_83808_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun83824({channelId, onClose}) { // fn#83824, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11120:2952, offset: 0x01f29fcc, size: 119 bytes, params: 2, frame: 16
const value2 = env0_8.useMemo(function() {
return getScreens_83813(channelId, onClose);
}, [channelId, onClose]);
const Navigator = (require(5280) /* metro dependency 5280: NavigatorNative */).Navigator;
return <Navigator screens={value2} initialRouteName="IN_APP_NOTIFICATION_SETTINGS" />;
}
function _fun83812() { // fn#83812, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11120:2447, offset: 0x01f29967, size: 83 bytes, params: 1, frame: 15
var r0;
var value3;
var isChannelMuted;
var value;
let channelBinding = channel;
const value2 = undefined;
if (channelBinding != null) {
value3 = environment.__proto__;
if (isMultiUserDM(channel.type)) {
isChannelMuted = UserGuildSettingsStore.isChannelMuted;
channelBinding = channel;
value = channelBinding.getGuildId();
value = Reflect.apply(isChannelMuted, UserGuildSettingsStore, [value, channelBinding.id]);
r0 = value;
} else {
r0 = value2;
function ConnectedInAppNotificationSettingsScreen({channel}) { // fn#83811, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11120:2345, offset: 0x01f29907, size: 96 bytes, params: 2, frame: 17
return ((Component) => <Component channel={channel} isMuted={(FluxModule).useStateFromStores([UserGuildSettingsStore],
_fun83812)} />)(env0_18);
function _fun83812() { // fn#83812, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11120:2447, offset: 0x01f29967, size: 83 bytes, params: 1, frame: 15
var r0;
var value3;
var userGuildSettingsStoreBinding;
var isChannelMuted;
var value;
let channelBinding = channel;
const value2 = undefined;
if (channelBinding != null) {
value3 = environment.__proto__;
if (isMultiUserDM(channel.type)) {
userGuildSettingsStoreBinding = UserGuildSettingsStore;
isChannelMuted = userGuildSettingsStoreBinding.isChannelMuted;
channelBinding = channel;
value = channelBinding.getGuildId();
value = Reflect.apply(isChannelMuted, userGuildSettingsStoreBinding, [value, channelBinding.id]);
r0 = value;
} else {
r0 = value2;
}
} else {
r0 = value2;
}
return r0;
}
} else {
r0 = value2;
}
return r0;
}
function getScreens_83813HeaderTitle() { // fn#83814, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11120:2647, owner: getScreens_83813.headerTitle, offset: 0x01f29a22, size: 163 bytes, params: 1, frame: 22
var r4;
var moduleValue;
const binding = env0_0;
const value = environment.__proto__;
const NavigatorHeader = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).NavigatorHeader;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const h850Ss = (require(1244) /* metro dependency 1244: indexNative */).t.h850Ss;
const value2 = null;
if (value2 != binding) {
moduleValue = require(4805) /* metro dependency 4805: useChannelName */;
r4 = moduleValue.computeChannelName(binding, UserStore, RelationshipStore, true);
} else {
r4 = value2;
function getScreens_83813(a0, a1) { // fn#83813, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11120:2551, offset: 0x01f299ba, size: 104 bytes, params: 3, frame: 14
const env0_0 = ChannelStore.getChannel(a0);
const object2 = {headerTitle: headerTitle_83814};
object2.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton(a1);
object2.render = render_83815;
return {IN_APP_NOTIFICATION_SETTINGS: object2};
function getScreens_83813HeaderTitle() { // fn#83814, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11120:2647, owner: getScreens_83813.headerTitle, offset: 0x01f29a22, size: 163 bytes, params: 1, frame: 22
var r4;
var moduleValue;
const binding = env0_0;
const value = environment.__proto__;
const NavigatorHeader = (NavigatorHeaderNativeModule).NavigatorHeader;
const intl = (IndexNativeModule).intl;
const string = intl.string;
const h850Ss = (IndexNativeModule).t.h850Ss;
const value2 = null;
if (value2 != binding) {
moduleValue = require(4805) /* metro dependency 4805: useChannelName */;
r4 = moduleValue.computeChannelName(binding, UserStore, RelationshipStore, true);
} else {
r4 = value2;
}
return <NavigatorHeader title={Reflect.apply(string, intl, [h850Ss])} subtitle={r4} />;
}
function getScreens_83813Render() { // fn#83815, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11120:2876, owner: getScreens_83813.render, offset: 0x01f29ac5, size: 34 bytes, params: 1, frame: 13
return <ConnectedInAppNotificationSettingsScreen channel={env0_0} />;
}
}
return <NavigatorHeader title={Reflect.apply(string, intl, [h850Ss])} subtitle={r4} />;
}
function getScreens_83813Render() { // fn#83815, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11120:2876, owner: getScreens_83813.render, offset: 0x01f29ac5, size: 34 bytes, params: 1, frame: 13
return <ConnectedInAppNotificationSettingsScreen channel={env0_0} />;
}
function _fun83816(a0) { // fn#83816, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11120:503, offset: 0x01f29ae7, size: 153 bytes, params: 2, frame: 16
const InAppNotificationSettingsScreen2 = InAppNotificationSettingsScreen;
Inherits(InAppNotificationSettingsScreen2, a0);
return CreateClass(InAppNotificationSettingsScreen2, [{key: 'renderGroupDMNotificationSettings', value: value_83820},
{key: 'renderTextChannelNotificationSettings', value: value_83821}, {key: 'renderChannelNotificationSettings',
value: function() {
var property = this.props.channel;
if (property != null) {
property = property.type;
if (ChannelTypes.GROUP_DM === property) {
return this.renderGroupDMNotificationSettings();
}
if (ChannelTypes.GUILD_TEXT === property) {
return this.renderTextChannelNotificationSettings();
}
if (ChannelTypes.GUILD_ANNOUNCEMENT === property) {
return this.renderTextChannelNotificationSettings();
}
}
return null;
}}, {key: 'render', value: value_83823}]);
function InAppNotificationSettingsScreen(a0) { // fn#83817, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11120:515, offset: 0x01f29b80, size: 158 bytes, params: 2, frame: 20
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_3;
binding(this, InAppNotificationSettingsScreen);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_6(InAppNotificationSettingsScreen);
binding = env1_5;
if (_isNativeReflectConstruct_83808()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_6(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
value.handleGroupDMMute = handleGroupDMMute;
value.handleOpenUserSettings = function() {
require(dependencyMap[15]).openUserSettings({screen: UserSettingsSections.NOTIFICATIONS});
};
return value;
function handleGroupDMMute() { // fn#83818, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11120:814, owner: InAppNotificationSettingsScreen.handleGroupDMMute, offset: 0x01f29c1e, size: 138 bytes, params: 1, frame: 21
var defaultImport;
var updateChannelOverrideSettings;
var guildId;
var id;
var object;
var value3;
var NotificationLabel;
const props = env0_0.props;
const channel = props.channel;
if (channel != null) {
value = environment.__proto__.__proto__;
defaultImport = importDefault(6613) /* metro dependency 6613: NotificationSettingsModalActionCreators */;
updateChannelOverrideSettings = defaultImport.updateChannelOverrideSettings;
guildId = channel.getGuildId();
id = channel.id;
object = {};
value3 = !props.isMuted;
object.muted = value3;
NotificationLabel = (require(6610) /* metro dependency 6610: NotificationSettingsUtils */).NotificationLabel;
Reflect.apply(updateChannelOverrideSettings, defaultImport, [guildId, id, object,
NotificationLabel.muted(value3)]);
}
}
}
function value_83820() { // fn#83820, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11120:1186, offset: 0x01f29cdf, size: 214 bytes, params: 1, frame: 26
const {channel, isMuted} = this.props;
if (channel == null) {
return null;
}
const channelName = UseChannelNameModule.computeChannelName(channel, UserStore, RelationshipStore);
const FormSection = (NativeModule).FormSection;
const FormSwitchRow = (NativeModule).FormSwitchRow;
const intl = (IndexNativeModule).intl;
return (
<FormSection>
<FormSwitchRow
label={intl.format((IndexNativeModule).t['u/rEuc'],
{name: channelName})}
value={isMuted}
onValueChange={this.handleGroupDMMute}
/>
</FormSection>
);
}
function value_83821() { // fn#83821, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11120:1528, offset: 0x01f29db5, size: 70 bytes, params: 1, frame: 15
var r0;
const channel = this.props.channel;
let value = null;
if (value == channel) {
r0 = value;
} else {
value = environment.__proto__;
value = importDefault(10935) /* metro dependency 10935: ChannelSettingsNotifications */;
value = ((Component) => <Component channelId={channel.id} />)(value);
r0 = value;
}
return r0;
}
function value_83823() { // fn#83823, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11120:1939, offset: 0x01f29e60, size: 364 bytes, params: 1, frame: 29
const Form = (NativeModule).Form;
const items2 = [this.renderChannelNotificationSettings()];
const FormSection = (NativeModule).FormSection;
const object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
object2.title = Reflect.apply(string, intl, [(require(1244) /* metro dependency 1244: indexNative */).t.clE4PU]);
const FormRow = (NativeModule).FormRow;
string = intl.string;
const cHMaba = (require(1244) /* metro dependency 1244: indexNative */).t.cHMaba;
const handleOpenUserSettings = this.handleOpenUserSettings;
const FormRow2 = (NativeModule).FormRow;
const Arrow = FormRow2.Arrow;
items2[1] = (
<FormSection {...object2}>
<FormRow
label={Reflect.apply(string, intl, [cHMaba])}
onPress={handleOpenUserSettings}
trailing={<Arrow />}
/>
</FormSection>
);
const FormHint = (NativeModule).FormHint;
items2[2] = (
<FormHint>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.avgbp1)}
</FormHint>
);
return (
<Form>
{items2}
</Form>
);
}
function InAppNotificationSettingsScreen(a0) { // fn#83817, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11120:515, offset: 0x01f29b80, size: 158 bytes, params: 2, frame: 20
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_3;
binding(this, InAppNotificationSettingsScreen);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_6(InAppNotificationSettingsScreen);
binding = env1_5;
if (_isNativeReflectConstruct_83808()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_6(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
value.handleGroupDMMute = handleGroupDMMute;
value.handleOpenUserSettings = function() {
require(dependencyMap[15]).openUserSettings({screen: UserSettingsSections.NOTIFICATIONS});
};
return value;
}
function value_83820() { // fn#83820, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11120:1186, offset: 0x01f29cdf, size: 214 bytes, params: 1, frame: 26
const {channel, isMuted} = this.props;
if (channel == null) {
return null;
}
const useChannelNameModule = require(4805) /* metro dependency 4805: useChannelName */;
const channelName = useChannelNameModule.computeChannelName(channel, UserStore, RelationshipStore);
const FormSection = (require(7972) /* metro dependency 7972: native */).FormSection;
const FormSwitchRow = (require(7972) /* metro dependency 7972: native */).FormSwitchRow;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<FormSection>
<FormSwitchRow
label={intl.format((require(1244) /* metro dependency 1244: indexNative */).t['u/rEuc'],
{name: channelName})}
value={isMuted}
onValueChange={this.handleGroupDMMute}
/>
</FormSection>
);
}
function value_83821() { // fn#83821, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11120:1528, offset: 0x01f29db5, size: 70 bytes, params: 1, frame: 15
var r0;
const channel = this.props.channel;
let value = null;
if (value == channel) {
r0 = value;
} else {
value = environment.__proto__;
value = importDefault(10935) /* metro dependency 10935: ChannelSettingsNotifications */;
value = ((Component) => <Component channelId={channel.id} />)(value);
r0 = value;
}
return r0;
}
function value_83823() { // fn#83823, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11120:1939, offset: 0x01f29e60, size: 364 bytes, params: 1, frame: 29
const Form = (require(7972) /* metro dependency 7972: native */).Form;
const items2 = [this.renderChannelNotificationSettings()];
const FormSection = (require(7972) /* metro dependency 7972: native */).FormSection;
const object = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
object.title = Reflect.apply(string, intl, [(require(1244) /* metro dependency 1244: indexNative */).t.clE4PU]);
const FormRow = (require(7972) /* metro dependency 7972: native */).FormRow;
string = intl.string;
const cHMaba = (require(1244) /* metro dependency 1244: indexNative */).t.cHMaba;
const handleOpenUserSettings = this.handleOpenUserSettings;
const FormRow2 = (require(7972) /* metro dependency 7972: native */).FormRow;
const Arrow = FormRow2.Arrow;
items2[1] = <FormSection {...object}><FormRow label={Reflect.apply(string, intl,
[cHMaba])} onPress={handleOpenUserSettings} trailing={<Arrow />} /></FormSection>;
const FormHint = (require(7972) /* metro dependency 7972: native */).FormHint;
items2[2] = <FormHint>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.avgbp1)}</FormHint>;
return (
<Form>
{items2}
</Form>
);
}
function handleGroupDMMute() { // fn#83818, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11120:814, owner: InAppNotificationSettingsScreen.handleGroupDMMute, offset: 0x01f29c1e, size: 138 bytes, params: 1, frame: 21
var defaultImport;
var updateChannelOverrideSettings;
var guildId;
var id;
var object2;
var value3;
var NotificationLabel;
const props = env0_0.props;
const channel = props.channel;
if (channel != null) {
value = environment.__proto__.__proto__;
defaultImport = importDefault(6613) /* metro dependency 6613: NotificationSettingsModalActionCreators */;
updateChannelOverrideSettings = defaultImport.updateChannelOverrideSettings;
guildId = channel.getGuildId();
id = channel.id;
object2 = {};
value3 = !props.isMuted;
object2.muted = value3;
NotificationLabel = (require(6610) /* metro dependency 6610: NotificationSettingsUtils */).NotificationLabel;
Reflect.apply(updateChannelOverrideSettings, defaultImport, [guildId, id, object2,
NotificationLabel.muted(value3)]);
function _fun83824({channelId, onClose}) { // fn#83824, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11120:2952, offset: 0x01f29fcc, size: 119 bytes, params: 2, frame: 16
const value2 = env0_8.useMemo(function() {
return getScreens_83813(channelId, onClose);
}, [channelId, onClose]);
const Navigator = (NavigatorNativeModule).Navigator;
return <Navigator screens={value2} initialRouteName="IN_APP_NOTIFICATION_SETTINGS" />;
}
}
global.__d(_fun83807, 10934, [6, 7, 15, 17, 18, 31, 1383, 1379, 3793, 4864, 1878, 661, 33, 6613, 6610, 7007, 4805,
7972, 1244, 10935, 566, 5282, 5280,
2]) /* metro module 10934, dependencies: [6, 7, 15, 17, 18, 31, 1383, 1379, 3793, 4864, 1878, 661, 33, 6613, 6610, 7007, 4805, 7972, 1244, 10935, 566, 5282, 5280, 2] */;
@@ -1,35 +1,44 @@
/* Metro module 16130; source: components_native/InviteSettingsModal.tsx; dependencies: [31, 661, 33, 1244, 480, 16131, 5280, 2] */
import AdvancedInstantInvite from './invite/AdvancedInstantInvite.tsx'; /* Metro dependency 16131 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as AnalyticsUtilsModule from '../external/discord_common/js/packages/analytics-utils/AnalyticsUtils.tsx'; /* Metro dependency 480 */
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as NavigatorNativeModule from '../design/components/Navigator/native/Navigator.native.tsx'; /* Metro dependency 5280 */
function _fun124545(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#124545, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16338:6, offset: 0x025bcc08, size: 273 bytes, params: 8, frame: 21
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const InviteModalScenes = (require(661) /* metro dependency 661: Constants */).InviteModalScenes;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
object3 = {};
ReactModule;
const InviteModalScenes = (ConstantsModule).InviteModalScenes;
object = {};
const ADVANCED = InviteModalScenes.ADVANCED;
const object4 = {};
const ImpressionNames = (require(480) /* metro dependency 480: AnalyticsUtils */).ImpressionNames;
const object2 = {};
const ImpressionNames = (AnalyticsUtilsModule).ImpressionNames;
const GUILD_INVITE_LINK_SETTINGS = ImpressionNames.GUILD_INVITE_LINK_SETTINGS;
object4.impressionName = GUILD_INVITE_LINK_SETTINGS;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.impressionName = GUILD_INVITE_LINK_SETTINGS;
const intl = (IndexNativeModule).intl;
const string = intl.string;
const Yx4IiC = (require(1244) /* metro dependency 1244: indexNative */).t.Yx4IiC;
object4.title = Reflect.apply(string, intl, [Yx4IiC]);
object4.render = render_124546;
object3[ADVANCED] = object4;
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/InviteSettingsModal.tsx');
const Yx4IiC = (IndexNativeModule).t.Yx4IiC;
object2.title = Reflect.apply(string, intl, [Yx4IiC]);
object2.render = render_124546;
object[ADVANCED] = object2;
(FileImportTrackerModule).fileFinishedImporting('components_native/InviteSettingsModal.tsx');
exports.default = InviteSettingsModal;
function render_124546() { // fn#124546, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16338:317, offset: 0x025bcd19, size: 39 bytes, params: 1, frame: 13
return ((Component) => <Component />)(AdvancedInstantInvite);
}
function InviteSettingsModal() { // fn#124547, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16338:343, offset: 0x025bcd40, size: 69 bytes, params: 1, frame: 15
const Navigator = (NavigatorNativeModule).Navigator;
const ADVANCED = InviteModalScenes.ADVANCED;
return <Navigator screens={env0_5} initialRouteName={ADVANCED} />;
}
}
function render_124546() { // fn#124546, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16338:317, offset: 0x025bcd19, size: 39 bytes, params: 1, frame: 13
return ((Component) => <Component />)(importDefault(16131) /* metro dependency 16131: AdvancedInstantInvite */);
}
function InviteSettingsModal() { // fn#124547, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16338:343, offset: 0x025bcd40, size: 69 bytes, params: 1, frame: 15
const Navigator = (require(5280) /* metro dependency 5280: NavigatorNative */).Navigator;
const ADVANCED = InviteModalScenes.ADVANCED;
return <Navigator screens={env0_5} initialRouteName={ADVANCED} />;
}
global.__d(_fun124545, 16130, [31, 661, 33, 1244, 480, 16131, 5280,
2]) /* metro module 16130, dependencies: [31, 661, 33, 1244, 480, 16131, 5280, 2] */;
+128 -112
View File
@@ -1,129 +1,145 @@
/* Metro module 14372; source: components_native/MainChannels.tsx; dependencies: [57, 31, 27, 5220, 661, 33, 14373, 6619, 4501, 697, 4010, 14374, 13575, 5224, 566, 14379, 14380, 14381, 4017, 14458, 14459, 14530, 11340, 2] */
import Module00057 from '../by-id/module-00057.js'; /* Metro dependency 57 */
import UseChatLayout from '../modules/chat/native/useChatLayout.tsx'; /* Metro dependency 4010 */
import ReanimatedRexport from '../modules/reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import ReplyNudgeStore from '../modules/reply_nudge/ReplyNudgeStore.tsx'; /* Metro dependency 5220 */
import StartupProfiler from '../modules/app_startup/StartupProfiler.tsx'; /* Metro dependency 11340 */
import UseChannelListWidth from '../modules/channel_list_v2/native/useChannelListWidth.tsx'; /* Metro dependency 13575 */
import Messages from '../modules/main_tabs_v2/native/tabs/messages/Messages.tsx'; /* Metro dependency 14459 */
import RedesignChannelList from '../modules/channel_list_v2/native/RedesignChannelList.tsx'; /* Metro dependency 14530 */
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 CreateStylesModule from '../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as ReplyNudgeExperimentModule from '../modules/reply_nudge/ReplyNudgeExperiment.tsx'; /* Metro dependency 5224 */
import * as StartupProfilerModule from '../modules/app_startup/StartupProfiler.tsx'; /* Metro dependency 11340 */
import * as UseGuildsRouteGuildIdModule from '../modules/main_tabs_v2/navigator/useGuildsRouteGuildId.tsx'; /* Metro dependency 14373 */
import * as UseHomeDrawerGestureModule from '../modules/home_drawer/native/useHomeDrawerGesture.tsx'; /* Metro dependency 14374 */
import * as NonCollapsableGestureDetectorModule from '../modules/gesture_handlers/native/NonCollapsableGestureDetector.tsx'; /* Metro dependency 14380 */
import * as HomePanelContentModule from '../modules/main_tabs_v2/native/tabs/guilds/HomePanelContent.tsx'; /* Metro dependency 14381 */
import * as NativeFreezeScreensModule from '../modules/freeze/native/NativeFreezeScreens.tsx'; /* Metro dependency 14458 */
function _fun108759(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108759, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14569:6, offset: 0x0232ce23, size: 483 bytes, params: 8, frame: 24
var object4;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_5 = value2.View;
const env0_6 = value2.StyleSheet;
const replyNudgeStore = importDefault(5220) /* metro dependency 5220: ReplyNudgeStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const DM_WIDTH = constantsModule.DM_WIDTH;
const env0_9 = constantsModule.ME;
const value4 = require(33) /* metro dependency 33 */;
const env0_10 = value4.jsx;
const env0_11 = value4.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object4 = {};
const object5 = {'position': 'absolute', 'top': 0, 'left': null, 'bottom': 0, 'right': 0, 'flexDirection': 'row',
let value = ReactModule;
const DM_WIDTH = ConstantsModule.DM_WIDTH;
const createStyles = CreateStylesModule.createStyles;
object = {};
const object2 = {'position': 'absolute', 'top': 0, 'left': null, 'bottom': 0, 'right': 0, 'flexDirection': 'row',
'borderLeftWidth': 1, 'borderTopWidth': 1};
object5.left = DM_WIDTH;
object2.left = DM_WIDTH;
const APP_FRAME_BORDER = (importDefault(697) /* metro dependency 697: native */).colors.APP_FRAME_BORDER;
object5.borderColor = APP_FRAME_BORDER;
object5.borderTopLeftRadius = (importDefault(697) /* metro dependency 697: native */).radii.xl;
object4.sideContainer = object5;
const object6 = {};
object6.borderTopLeftRadius = (importDefault(697) /* metro dependency 697: native */).radii.xl - 1;
object6.borderTopRightRadius = (importDefault(697) /* metro dependency 697: native */).radii.none;
object4.side = object6;
object2.borderColor = APP_FRAME_BORDER;
object2.borderTopLeftRadius = (importDefault(697) /* metro dependency 697: native */).radii.xl;
object.sideContainer = object2;
const object3 = {};
object3.borderTopLeftRadius = (importDefault(697) /* metro dependency 697: native */).radii.xl - 1;
object3.borderTopRightRadius = (importDefault(697) /* metro dependency 697: native */).radii.none;
object.side = object3;
const CHANNEL_DRAWER_CORNER_RADIUS = (importDefault(697) /* metro dependency 697: native */).modules.mobile.CHANNEL_DRAWER_CORNER_RADIUS;
object4.sideTablet = {borderTopRightRadius: CHANNEL_DRAWER_CORNER_RADIUS};
const env0_12 = Reflect.apply(createStyles, createStylesModule, [object4]);
object.sideTablet = {borderTopRightRadius: CHANNEL_DRAWER_CORNER_RADIUS};
const env0_12 = Reflect.apply(createStyles, CreateStylesModule, [object]);
const env0_13 = value.memo(LeftMenuTabsInner);
value = value.memo(MainChannelsRedesignInner);
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/MainChannels.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/MainChannels.tsx');
exports.default = value;
}
function LeftMenuTabsInner() { // fn#108760, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14569:635, offset: 0x0232d006, size: 704 bytes, params: 1, frame: 34
const value2 = undefined;
const styles = useStyles();
const {isGuildSelected, selectedGuildId, selectedChannelId} = useMainChannelsRouteInfo();
const isChatBesideChannelList = (UseChatLayout)().isChatBesideChannelList;
const binding = env0_4;
const value4 = binding.useMemo(function() {
return [styles.side, isChatBesideChannelList && styles.sideTablet];
}, [styles, isChatBesideChannelList]);
const {gesture, panelStyles,
homeDrawerState} = (UseHomeDrawerGestureModule).useHomeGesture();
const value6 = DM_WIDTH + (UseChannelListWidth)();
const ReplyNudgeExperiment = (ReplyNudgeExperimentModule).ReplyNudgeExperiment;
const useConfig = ReplyNudgeExperiment.useConfig;
binding.useEffect(_fun108765, [isGuildSelected, Reflect.apply(useConfig, ReplyNudgeExperiment,
[{location: 'MainChannels'}]).enabled,
(require(566) /* metro dependency 566: flux */).useStateFromStores([ReplyNudgeStore], function() {
return ReplyNudgeStore.isNudgesInitialized();
})]);
const HomeDrawerStateContext = (UseHomeDrawerGestureModule).HomeDrawerStateContext;
const Provider = HomeDrawerStateContext.Provider;
const NonCollapsableGestureDetector = (NonCollapsableGestureDetectorModule).NonCollapsableGestureDetector;
const items2 = [StyleSheet.absoluteFill];
items2[1] = {width: isChatBesideChannelList ? value6 : value2};
const HomePanelContent = (HomePanelContentModule).HomePanelContent;
const homePanelContent = <HomePanelContent />;
const View2 = (ReanimatedRexport).View;
const items3 = [panelStyles];
items3[1] = styles.sideContainer;
const NativeFreezeScreens = (NativeFreezeScreensModule).NativeFreezeScreens;
const r17 = isGuildSelected ? 1 : 0;
let value = Messages;
value = ((Component) => <Component style={value4} />)(value);
return (
<Provider value={homeDrawerState}>
<NonCollapsableGestureDetector gesture={gesture}>
<View style={items2}>
{homePanelContent}
<View2
style={items3}
pointerEvents="box-none"
nativeID="messages-parent-view"
>
<NativeFreezeScreens activeIndex={r17}>
{value}
{((Component) => <Component style={value4} selectedGuildId={selectedGuildId} selectedChannelId={selectedChannelId} />)(RedesignChannelList)}
</NativeFreezeScreens>
</View2>
</View>
</NonCollapsableGestureDetector>
</Provider>
);
function useMainChannelsRouteInfo() { // fn#108761, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14569:676, owner: LeftMenuTabsInner.useMainChannelsRouteInfo, offset: 0x0232d2c6, size: 178 bytes, params: 1, frame: 19
var environment;
const value = environment.__proto__;
const value3 = env1_3((UseGuildsRouteGuildIdModule).useGuildsRouteGuildAndChannelId(),
2);
const property = value3[0];
const property2 = value3[1];
const binding = env1_4;
const value4 = binding.useRef(property);
binding.useEffect(_fun108762, [property]);
const r4 = property != null && property !== ME;
return {isGuildSelected: r4,
selectedGuildId: r4 ? property : (importDefault(6619) /* metro dependency 6619: useRefValue */)(value4),
selectedChannelId: property2};
function _fun108762() { // fn#108762, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14569:810, offset: 0x00e655cf, size: 21 bytes, params: 1, frame: 2
env0_1.current = env0_0;
}
function LeftMenuTabsInner() { // fn#108760, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14569:635, offset: 0x0232d006, size: 704 bytes, params: 1, frame: 34
const value2 = undefined;
const styles = useStyles();
const {isGuildSelected, selectedGuildId, selectedChannelId} = useMainChannelsRouteInfo();
const isChatBesideChannelList = (importDefault(4010) /* metro dependency 4010: useChatLayout */)().isChatBesideChannelList;
const binding = env0_4;
const value4 = binding.useMemo(function() {
return [styles.side, isChatBesideChannelList && styles.sideTablet];
}, [styles, isChatBesideChannelList]);
const {gesture, panelStyles,
homeDrawerState} = (require(14374) /* metro dependency 14374: useHomeDrawerGesture */).useHomeGesture();
const value6 = DM_WIDTH + (importDefault(13575) /* metro dependency 13575: useChannelListWidth */)();
const ReplyNudgeExperiment = (require(5224) /* metro dependency 5224: ReplyNudgeExperiment */).ReplyNudgeExperiment;
const useConfig = ReplyNudgeExperiment.useConfig;
binding.useEffect(_fun108765, [isGuildSelected, Reflect.apply(useConfig, ReplyNudgeExperiment,
[{location: 'MainChannels'}]).enabled,
(require(566) /* metro dependency 566: flux */).useStateFromStores([ReplyNudgeStore], function() {
return ReplyNudgeStore.isNudgesInitialized();
})]);
const HomeDrawerStateContext = (require(14374) /* metro dependency 14374: useHomeDrawerGesture */).HomeDrawerStateContext;
const Provider = HomeDrawerStateContext.Provider;
const NonCollapsableGestureDetector = (require(14380) /* metro dependency 14380: NonCollapsableGestureDetector */).NonCollapsableGestureDetector;
const items2 = [StyleSheet.absoluteFill];
items2[1] = {width: isChatBesideChannelList ? value6 : value2};
const HomePanelContent = (require(14381) /* metro dependency 14381: HomePanelContent */).HomePanelContent;
const homePanelContent = <HomePanelContent />;
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const items3 = [panelStyles];
items3[1] = styles.sideContainer;
const NativeFreezeScreens = (require(14458) /* metro dependency 14458: NativeFreezeScreens */).NativeFreezeScreens;
const r17 = isGuildSelected ? 1 : 0;
let value = importDefault(14459) /* metro dependency 14459: Messages */;
value = ((Component) => <Component style={value4} />)(value);
return (
<Provider value={homeDrawerState}>
<NonCollapsableGestureDetector gesture={gesture}>
<View style={items2}>
{homePanelContent}
<View2
style={items3}
pointerEvents="box-none"
nativeID="messages-parent-view"
>
<NativeFreezeScreens activeIndex={r17}>
{value}
{((Component) => <Component style={value4} selectedGuildId={selectedGuildId} selectedChannelId={selectedChannelId} />)(importDefault(14530) /* metro dependency 14530: RedesignChannelList */)}
</NativeFreezeScreens>
</View2>
</View>
</NonCollapsableGestureDetector>
</Provider>
);
}
}
function MainChannelsRedesignInner() { // fn#108766, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14569:1869, offset: 0x0232d3f5, size: 85 bytes, params: 1, frame: 17
const StartupProfiler = importDefault(11340) /* metro dependency 11340: StartupProfiler */;
const Profiles = (require(11340) /* metro dependency 11340: StartupProfiler */).Profiles;
const LeftPanel = Profiles.LeftPanel;
return (
<StartupProfiler profile={LeftPanel}>
{((Component) => <Component />)(env0_13)}
</StartupProfiler>
);
}
function _fun108765() { // fn#108765, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14569:1341, offset: 0x0232d3b9, size: 60 bytes, params: 1, frame: 11
if (!isGuildSelected && enabled && env0_4) {
value = environment.__proto__;
(importDefault(14379) /* metro dependency 14379: trackReplyNudgesShown */)();
}
}
function useMainChannelsRouteInfo() { // fn#108761, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14569:676, owner: LeftMenuTabsInner.useMainChannelsRouteInfo, offset: 0x0232d2c6, size: 178 bytes, params: 1, frame: 19
var environment;
const value = environment.__proto__;
const value3 = env1_3((require(14373) /* metro dependency 14373: useGuildsRouteGuildId */).useGuildsRouteGuildAndChannelId(),
2);
const property = value3[0];
const property2 = value3[1];
const binding = env1_4;
const value4 = binding.useRef(property);
binding.useEffect(_fun108762, [property]);
const r4 = property != null && property !== ME;
return {isGuildSelected: r4,
selectedGuildId: r4 ? property : (importDefault(6619) /* metro dependency 6619: useRefValue */)(value4),
selectedChannelId: property2};
}
function _fun108765() { // fn#108765, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14569:1341, offset: 0x0232d3b9, size: 60 bytes, params: 1, frame: 11
if (!isGuildSelected && enabled && env0_4) {
value = environment.__proto__;
(importDefault(14379) /* metro dependency 14379: trackReplyNudgesShown */)();
}
function MainChannelsRedesignInner() { // fn#108766, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14569:1869, offset: 0x0232d3f5, size: 85 bytes, params: 1, frame: 17
const Profiles = (StartupProfilerModule).Profiles;
const LeftPanel = Profiles.LeftPanel;
return (
<StartupProfiler profile={LeftPanel}>
{((Component) => <Component />)(env0_13)}
</StartupProfiler>
);
}
}
global.__d(_fun108759, 14372, [57, 31, 27, 5220, 661, 33, 14373, 6619, 4501, 697, 4010, 14374, 13575, 5224, 566,
14379, 14380, 14381, 4017, 14458, 14459, 14530, 11340,
2]) /* metro module 14372, dependencies: [57, 31, 27, 5220, 661, 33, 14373, 6619, 4501, 697, 4010, 14374, 13575, 5224, 566, 14379, 14380, 14381, 4017, 14458, 14459, 14530, 11340, 2] */;
+70 -60
View File
@@ -1,14 +1,22 @@
/* Metro module 15261; source: components_native/MainShared.tsx; dependencies: [31, 27, 1379, 4294, 33, 566, 7734, 4007, 7713, 15262, 477, 13120, 1244, 15264, 13115, 12989, 2, 15265, 15266, 15267, 15268, 15276, 15277, 15307] */
import ChannelStore from '../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import RTCConnectionStore from '../stores/RTCConnectionStore.tsx'; /* Metro dependency 4294 */
import AccessibilityManager from '../modules/a11y/native/AccessibilityManager.tsx'; /* Metro dependency 12989 */
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 PlatformUtilsModule from '../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
import * as NavigationRouteUtilsNativeModule from '../modules/main_tabs_v2/helpers/NavigationRouteUtils.native.tsx'; /* Metro dependency 4007 */
import * as VoicePanelUtilsNativeModule from '../modules/voice_panel/VoicePanelUtils.native.tsx'; /* Metro dependency 7713 */
import * as UsePipVideoOrStreamModule from '../modules/video_calls/native/usePipVideoOrStream.tsx'; /* Metro dependency 7734 */
import * as KeyCommandsViewModule from '../modules/keyboard/native/KeyCommandsView.tsx'; /* Metro dependency 13115 */
function _fun116683(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116683, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15458:6, offset: 0x0249332e, size: 350 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).NativeModules;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const rtcConnectionStore = importDefault(4294) /* metro dependency 4294: RTCConnectionStore */;
const env0_7 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/MainShared.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/MainShared.tsx');
exports.BurstReactionAnimationContainer = importDefault(15265) /* metro dependency 15265: BurstReactionAnimationContainer */;
exports.MenuContainer = importDefault(15266) /* metro dependency 15266: NativeMenuPresenter */;
exports.ActionSheetContainer = importDefault(15267) /* metro dependency 15267: ActionSheetPresenter */;
@@ -19,67 +27,69 @@ function _fun116683(global, require, importDefault, importAll, module, exports,
exports.PictureInPictureGlobalContainer = PictureInPictureGlobalContainer;
exports.useAppKeyCommands = useAppKeyCommands;
exports.useScreenReaderEnabled = useScreenReaderEnabled;
}
function PictureInPictureGlobalContainer() { // fn#116684, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15458:473, offset: 0x0249348c, size: 205 bytes, params: 1, frame: 18
var r0;
var value;
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore,
RTCConnectionStore], function() {
return ChannelStore.getChannel(RTCConnectionStore.getChannelId());
});
const value2 = (require(7734) /* metro dependency 7734: usePipVideoOrStream */).useHasPipParticipant({isActivityViewFocused: false});
const value3 = (require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */).useIsModalOpen();
const value4 = (require(7713) /* metro dependency 7713: VoicePanelUtilsNative */).useIsVoicePanelShowing();
const value5 = null;
if (value5 == channel) {
r0 = value5;
} else if (value2) {
if (value3) {
r0 = value5;
} else if (value4) {
function PictureInPictureGlobalContainer() { // fn#116684, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15458:473, offset: 0x0249348c, size: 205 bytes, params: 1, frame: 18
var r0;
var value;
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore,
RTCConnectionStore], function() {
return ChannelStore.getChannel(RTCConnectionStore.getChannelId());
});
const value2 = (UsePipVideoOrStreamModule).useHasPipParticipant({isActivityViewFocused: false});
const value3 = (NavigationRouteUtilsNativeModule).useIsModalOpen();
const value4 = (VoicePanelUtilsNativeModule).useIsVoicePanelShowing();
const value5 = null;
if (value5 == channel) {
r0 = value5;
} else if (value2) {
if (value3) {
r0 = value5;
} else if (value4) {
r0 = value5;
} else {
value = importDefault(15262) /* metro dependency 15262: PictureInPictureGlobal */;
value = ((Component) => <Component channel={channel} />)(value);
r0 = value;
}
} else {
value = importDefault(15262) /* metro dependency 15262: PictureInPictureGlobal */;
value = ((Component) => <Component channel={channel} />)(value);
r0 = value;
r0 = value5;
}
} else {
r0 = value5;
return r0;
}
return r0;
}
function useAppKeyCommands() { // fn#116686, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15458:788, offset: 0x0249357a, size: 66 bytes, params: 1, frame: 14
(require(13115) /* metro dependency 13115: KeyCommandsView */).useKeyCommands(env0_3.useMemo(_fun116687, []));
}
function useAppKeyCommands() { // fn#116686, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15458:788, offset: 0x0249357a, size: 66 bytes, params: 1, frame: 14
(KeyCommandsViewModule).useKeyCommands(ReactModule.useMemo(_fun116687, []));
function _fun116687() { // fn#116687, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15458:834, offset: 0x024935bc, size: 198 bytes, params: 1, frame: 15
var keyModifierCommand;
var defaultImport;
const object = {'input': 'k', 'modifierFlags': null, 'eventName': 'keyCommandShowQuickSwitcher'};
if (PlatformUtilsModule.isAndroid()) {
defaultImport = importDefault(13120) /* metro dependency 13120: NativeKeyCommandsModule */;
keyModifierCommand = defaultImport.getConstants().keyModifierCommand;
} else {
keyModifierCommand = NativeModules.KeyCommandsView.keyModifierCommand;
}
object.modifierFlags = keyModifierCommand;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.discoverabilityTitle = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.yYsRlD);
object.onKeyCommand = function() {
importDefault(dependencyMap[13])();
};
return [object];
}
}
function useScreenReaderEnabled() { // fn#116689, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15458:1153, offset: 0x024936a1, size: 35 bytes, params: 1, frame: 13
ReactModule.useEffect(_fun116690, []);
function _fun116690() { // fn#116690, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15458:1200, offset: 0x024936c4, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
(AccessibilityManager).checkScreenreaderEnabled();
}
function useScreenReaderEnabled() { // fn#116689, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15458:1153, offset: 0x024936a1, size: 35 bytes, params: 1, frame: 13
env0_3.useEffect(_fun116690, []);
}
function _fun116687() { // fn#116687, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15458:834, offset: 0x024935bc, size: 198 bytes, params: 1, frame: 15
var keyModifierCommand;
var defaultImport;
const object2 = {'input': 'k', 'modifierFlags': null, 'eventName': 'keyCommandShowQuickSwitcher'};
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (platformUtilsModule.isAndroid()) {
defaultImport = importDefault(13120) /* metro dependency 13120: NativeKeyCommandsModule */;
keyModifierCommand = defaultImport.getConstants().keyModifierCommand;
} else {
keyModifierCommand = NativeModules.KeyCommandsView.keyModifierCommand;
}
object2.modifierFlags = keyModifierCommand;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.discoverabilityTitle = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.yYsRlD);
object2.onKeyCommand = function() {
importDefault(dependencyMap[13])();
};
return [object2];
}
function _fun116690() { // fn#116690, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15458:1200, offset: 0x024936c4, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
(importDefault(12989) /* metro dependency 12989: AccessibilityManager */).checkScreenreaderEnabled();
}
global.__d(_fun116683, 15261, [31, 27, 1379, 4294, 33, 566, 7734, 4007, 7713, 15262, 477, 13120, 1244, 15264, 13115,
12989, 2, 15265, 15266, 15267, 15268, 15276, 15277,
15307]) /* metro module 15261, dependencies: [31, 27, 1379, 4294, 33, 566, 7734, 4007, 7713, 15262, 477, 13120, 1244, 15264, 13115, 12989, 2, 15265, 15266, 15267, 15268, 15276, 15277, 15307] */;
+41 -23
View File
@@ -1,29 +1,50 @@
/* Metro module 11451; source: components_native/MemberRolesList.tsx; dependencies: [31, 27, 1938, 33, 4501, 566, 11428, 2] */
import GuildRoleStore from '../stores/GuildRoleStore.tsx'; /* Metro dependency 1938 */
import RolePill from './common/RolePill.tsx'; /* Metro dependency 11428 */
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 CreateStylesModule from '../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
function _fun87673(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87673, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11637:6, offset: 0x01fc76be, size: 222 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const guildRoleStore = importDefault(1938) /* metro dependency 1938: GuildRoleStore */;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
const env0_6 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({wrapper: {'flexDirection': 'row',
ReactModule;
const env0_6 = (CreateStylesModule).createStyles({wrapper: {'flexDirection': 'row',
'flexWrap': 'wrap', 'justifyContent': 'center'}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/MemberRolesList.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/MemberRolesList.tsx');
exports.default = MemberRolesList;
}
function MemberRolesList({userRoles, guild, style}) { // fn#87674, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11637:320, offset: 0x01fc779c, size: 227 bytes, params: 2, frame: 19
const styles = useStyles();
const sortedRoles = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildRoleStore],
function() {
return GuildRoleStore.getSortedRoles(guild.id);
});
const view = <View />;
return (
userRoles == null
? view
: (
userRoles.length > 0
? (
<View style={[styles.wrapper, style]}>
{sortedRoles.filter(function(a0) {
return userRoles.includes(a0.id);
}).sort(_fun87677).map(_fun87678)}
</View>
)
: view
)
);
function _fun87678(a0) { // fn#87678, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11637:687, offset: 0x01fc78f7, size: 69 bytes, params: 2, frame: 16
const value = environment.__proto__;
return ((Component) => <Component role={a0} guildId={guild.id} key={a0.id} />)(RolePill);
}
}
function MemberRolesList({userRoles, guild, style}) { // fn#87674, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11637:320, offset: 0x01fc779c, size: 227 bytes, params: 2, frame: 19
const styles = useStyles();
const sortedRoles = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildRoleStore],
function() {
return GuildRoleStore.getSortedRoles(guild.id);
});
const view = <View />;
return userRoles == null ? view : userRoles.length > 0 ? <View style={[styles.wrapper,
style]}>{sortedRoles.filter(function(a0) {
return userRoles.includes(a0.id);
}).sort(_fun87677).map(_fun87678)}</View> : view;
}
function _fun87677({tags}, {tags}) { // fn#87677, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11637:527, offset: 0x01fc789f, size: 88 bytes, params: 3, frame: 5
@@ -33,8 +54,5 @@ function _fun87677({tags}, {tags}) { // fn#87677, source: /ci/build/discord/disc
return value2 ? value ? value2 ? 0 : value ? -1 : 0 : 1 : value2 ? 0 : value ? -1 : 0;
}
function _fun87678(a0) { // fn#87678, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11637:687, offset: 0x01fc78f7, size: 69 bytes, params: 2, frame: 16
const value = environment.__proto__;
return ((Component) => <Component role={a0} guildId={guild.id} key={a0.id} />)(importDefault(11428) /* metro dependency 11428: RolePill */);
}
global.__d(_fun87673, 11451, [31, 27, 1938, 33, 4501, 566, 11428,
2]) /* metro module 11451, dependencies: [31, 27, 1938, 33, 4501, 566, 11428, 2] */;
+94 -81
View File
@@ -1,97 +1,110 @@
/* Metro module 15275; source: components_native/MobileSurvey.tsx; dependencies: [5, 31, 9536, 661, 33, 4501, 566, 683, 9537, 4596, 1244, 3853, 1305, 697, 9418, 2] */
import Module00005 from '../by-id/module-00005.js'; /* Metro dependency 5 */
import Native from '../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import Linking from '../lib/native/Linking.tsx'; /* Metro dependency 3853 */
import Module09418 from '../by-id/module-09418.js'; /* Metro dependency 9418 */
import SurveyStore from '../stores/SurveyStore.tsx'; /* Metro dependency 9536 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as 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 */
function _fun116787(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116787, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15472:6, offset: 0x0249691a, size: 236 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const surveyStore = importDefault(9536) /* metro dependency 9536: SurveyStore */;
const env0_6 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
const env0_7 = (require(33) /* metro dependency 33 */).jsx;
const env0_8 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({confirmIcon: {marginLeft: 4}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/MobileSurvey.tsx');
const env0_8 = (CreateStylesModule).createStyles({confirmIcon: {marginLeft: 4}});
(FileImportTrackerModule).fileFinishedImporting('components_native/MobileSurvey.tsx');
exports.default = MobileSurvey;
}
function MobileSurvey() { // fn#116788, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15472:224, offset: 0x02496a06, size: 262 bytes, params: 1, frame: 20
var r0;
var Alert;
var intl;
const env0_0 = useStyles();
const currentSurvey = (require(566) /* metro dependency 566: flux */).useStateFromStores([SurveyStore], function() {
return SurveyStore.getCurrentSurvey();
});
ReactModule.useEffect(_fun116790, [currentSurvey]);
const value2 = null;
if (value2 != currentSurvey) {
Alert = importDefault(4596) /* metro dependency 4596: Alert */;
var defaultImportProps = {body: currentSurvey.prompt, confirmText: currentSurvey.cta};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
defaultImportProps.cancelText = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.f3Pet9);
defaultImportProps.onConfirm = onConfirm_116795;
defaultImportProps.onCancel = onCancel_116796;
defaultImportProps.renderConfirmRightIcon = renderConfirmRightIcon_116797;
r0 = <Alert {...defaultImportProps} />;
} else {
r0 = value2;
}
return r0;
function _fun116790() { // fn#116790, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15472:339, offset: 0x02496b1f, size: 104 bytes, params: 1, frame: 16
var environment;
var value2;
var defaultImport;
if (currentSurvey != null) {
value2 = environment.__proto__;
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
defaultImport.track(AnalyticEvents.OPEN_MODAL, {type: 'survey', promotion_id: currentSurvey.id});
_fun116791()();
}
function _fun116791() { // fn#116791, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15472:424, offset: 0x02496b87, size: 36 bytes, params: 1, frame: 12
const env0_0 = env2_3(_fun116793);
return _fun116794;
function* _fun116793() { // fn#116793, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15472:444, offset: 0x02496bb6, size: 74 bytes, params: 1, frame: 13
if (true) {
value = environment.__proto__.__proto__.__proto__.__proto__;
value = env4_0(env4_2[8]);
yield value.surveySeen(importDefault.key);
}
}
function MobileSurvey() { // fn#116788, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15472:224, offset: 0x02496a06, size: 262 bytes, params: 1, frame: 20
var r0;
var Alert;
var intl;
const env0_0 = useStyles();
const currentSurvey = (require(566) /* metro dependency 566: flux */).useStateFromStores([SurveyStore], function() {
return SurveyStore.getCurrentSurvey();
});
env0_4.useEffect(_fun116790, [currentSurvey]);
const value2 = null;
if (value2 != currentSurvey) {
Alert = importDefault(4596) /* metro dependency 4596: Alert */;
var defaultImportProps = {body: currentSurvey.prompt, confirmText: currentSurvey.cta};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
defaultImportProps.cancelText = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.f3Pet9);
defaultImportProps.onConfirm = onConfirm;
defaultImportProps.onCancel = onCancel;
defaultImportProps.renderConfirmRightIcon = renderConfirmRightIcon;
r0 = <Alert {...defaultImportProps} />;
} else {
r0 = value2;
}
return r0;
}
function _fun116794() { // fn#116794, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15472:498, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
return env0_0.apply(this, arguments);
}
function _fun116790() { // fn#116790, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15472:339, offset: 0x02496b1f, size: 104 bytes, params: 1, frame: 16
var environment;
var value2;
var defaultImport;
if (currentSurvey != null) {
value2 = environment.__proto__;
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
defaultImport.track(AnalyticEvents.OPEN_MODAL, {type: 'survey', promotion_id: currentSurvey.id});
_fun116791()();
}
}
}
function MobileSurveyOnConfirm() { // fn#116795, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15472:668, owner: MobileSurvey.onConfirm, offset: 0x02496c00, size: 85 bytes, params: 1, frame: 16
let value = environment.__proto__;
const defaultImport = importDefault(3853) /* metro dependency 3853: Linking */;
const openURL = defaultImport.openURL;
const currentSurveyBinding = currentSurvey;
Reflect.apply(openURL, defaultImport, [currentSurveyBinding.url]);
value = require(9537) /* metro dependency 9537: SurveyActionCreators */;
value.surveyHide(currentSurveyBinding.key, false);
}
}
function MobileSurveyOnCancel() { // fn#116796, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15472:736, owner: MobileSurvey.onCancel, offset: 0x02496c55, size: 53 bytes, params: 1, frame: 13
let value = environment.__proto__;
value = require(9537) /* metro dependency 9537: SurveyActionCreators */;
return value.surveyHide(currentSurvey.key, true);
}
function MobileSurveyOnConfirm() { // fn#116795, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15472:668, owner: MobileSurvey.onConfirm, offset: 0x02496c00, size: 85 bytes, params: 1, frame: 16
let value = environment.__proto__;
const defaultImport = Linking;
const openURL = defaultImport.openURL;
const currentSurveyBinding = currentSurvey;
Reflect.apply(openURL, defaultImport, [currentSurveyBinding.url]);
value = require(9537) /* metro dependency 9537: SurveyActionCreators */;
value.surveyHide(currentSurveyBinding.key, false);
}
function MobileSurveyRenderConfirmRightIcon() { // fn#116797, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15472:792, owner: MobileSurvey.renderConfirmRightIcon, offset: 0x02496c8a, size: 138 bytes, params: 1, frame: 18
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
const WHITE = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE;
const Icon2 = (require(1305) /* metro dependency 1305: native */).Icon;
const Sizes = Icon2.Sizes;
const SMALL = Sizes.SMALL;
return (
<Icon
style={styles.confirmIcon}
color={WHITE}
size={SMALL}
source={importDefault(9418) /* metro dependency 9418 */}
/>
);
}
function MobileSurveyOnCancel() { // fn#116796, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15472:736, owner: MobileSurvey.onCancel, offset: 0x02496c55, size: 53 bytes, params: 1, frame: 13
let value = environment.__proto__;
value = require(9537) /* metro dependency 9537: SurveyActionCreators */;
return value.surveyHide(currentSurvey.key, true);
}
function _fun116791() { // fn#116791, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15472:424, offset: 0x02496b87, size: 36 bytes, params: 1, frame: 12
const env0_0 = env2_3(_fun116793);
return _fun116794;
}
function MobileSurveyRenderConfirmRightIcon() { // fn#116797, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15472:792, owner: MobileSurvey.renderConfirmRightIcon, offset: 0x02496c8a, size: 138 bytes, params: 1, frame: 18
const Icon = (NativeModule).Icon;
const WHITE = (Native).unsafe_rawColors.WHITE;
const Icon2 = (NativeModule).Icon;
const Sizes = Icon2.Sizes;
const SMALL = Sizes.SMALL;
return (
<Icon
style={styles.confirmIcon}
color={WHITE}
size={SMALL}
source={Module09418}
/>
);
}
function* _fun116793() { // fn#116793, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15472:444, offset: 0x02496bb6, size: 74 bytes, params: 1, frame: 13
if (true) {
value = environment.__proto__.__proto__.__proto__.__proto__;
value = env4_0(env4_2[8]);
yield value.surveySeen(importDefault.key);
}
}
global.__d(_fun116787, 15275, [5, 31, 9536, 661, 33, 4501, 566, 683, 9537, 4596, 1244, 3853, 1305, 697, 9418,
2]) /* metro module 15275, dependencies: [5, 31, 9536, 661, 33, 4501, 566, 683, 9537, 4596, 1244, 3853, 1305, 697, 9418, 2] */;
+145 -128
View File
@@ -1,163 +1,180 @@
/* Metro module 9181; source: components_native/QRCode.tsx; dependencies: [29, 6, 7, 15, 17, 18, 31, 27, 33, 4501, 697, 9182, 4564, 3868, 9193, 8670, 2] */
import ClassCallCheck from '../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import ObjectWithoutProperties from '../by-id/module-00029-ObjectWithoutProperties.js'; /* Metro dependency 29 */
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 '../external/discord_common/js/packages/design/native.tsx'; /* Metro dependency 3868 */
import * as CreateStylesModule from '../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
function _fun71942(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#71942, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9366:6, offset: 0x01d3277d, size: 719 bytes, params: 8, frame: 24
var object3;
const env0_0 = require;
const env0_3 = ['style', 'text', 'blur', 'accessibilityLabel'];
let Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = importDefault(29) /* metro dependency 29 */;
const env0_5 = importDefault(6) /* metro dependency 6 */;
const env0_6 = importDefault(7) /* metro dependency 7 */;
const env0_7 = importDefault(15) /* metro dependency 15 */;
const env0_8 = importDefault(17) /* metro dependency 17 */;
const env0_9 = importDefault(18) /* metro dependency 18 */;
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_10 = value2.View;
const env0_11 = value2.Image;
const env0_12 = value2.StyleSheet;
const value3 = require(33) /* metro dependency 33 */;
const env0_13 = value3.jsx;
const env0_14 = value3.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createLegacyClassComponentStyles = createStylesModule.createLegacyClassComponentStyles;
const object4 = {'display': 'flex', 'alignSelf': 'flex-start'};
let value = ReactModule;
const createLegacyClassComponentStyles = CreateStylesModule.createLegacyClassComponentStyles;
const object2 = {'display': 'flex', 'alignSelf': 'flex-start'};
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object4.padding = PX_8;
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
const env0_15 = Reflect.apply(createLegacyClassComponentStyles, createStylesModule, [{qrCode: object4,
object2.padding = PX_8;
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
const env0_15 = Reflect.apply(createLegacyClassComponentStyles, CreateStylesModule, [{qrCode: object2,
qrCodeContainer: {'display': 'flex', 'alignSelf': 'flex-start', 'alignItems': 'center',
'justifyContent': 'center', 'position': 'relative'}, qrCodeOverlay: {'display': 'flex', 'alignItems': 'center',
'justifyContent': 'center'}, ['size-40']: {'width': 40, 'height': 40}, ['size-60']: {'width': 60,
'height': 60}}]);
object3 = {SIZE_40: 'SIZE_40', SIZE_60: 'SIZE_60'};
object = {SIZE_40: 'SIZE_40', SIZE_60: 'SIZE_60'};
Object = global.Object;
const freeze = Object.freeze;
const SIZE_40 = object3.SIZE_40;
const SIZE_60 = object3.SIZE_60;
const SIZE_40 = object.SIZE_40;
const SIZE_60 = object.SIZE_60;
const value5 = Reflect.apply(freeze, Object, [{[SIZE_40]: 'size-40', [SIZE_60]: 'size-60'}]);
let PureComponent = value.PureComponent;
const value6 = _fun71947(PureComponent);
const ThemeContext = (require(3868) /* metro dependency 3868: native */).ThemeContext;
const ThemeContext = (NativeModule).ThemeContext;
value6.contextType = ThemeContext;
value6.defaultProps = {'size': 128, 'bgColor': '#ffffff', 'fgColor': '#000000'};
PureComponent = value.PureComponent;
value = _fun71950(PureComponent);
value.contextType = ThemeContext;
value.defaultProps = {'size': 144, 'bgColor': '#ffffff', 'fgColor': '#000000'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/QRCode.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/QRCode.tsx');
exports.default = value6;
exports.QRCodeOverlaySizes = object3;
exports.QRCodeOverlaySizes = object;
exports.QR_CODE_OVERLAY_SIZE_MAP = value5;
exports.QRCodeWithOverlay = value;
}
function _callSuper_71943(a0, a1, a2) { // fn#71943, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9366:290, offset: 0x01d32a4c, size: 100 bytes, params: 4, frame: 20
var r0;
var Reflect;
let value = a2;
const value3 = env0_8(a1);
const binding = env0_7;
if (_isNativeReflectConstruct_71944()) {
Reflect = global.Reflect;
value = Reflect.construct(value3, value || [], env0_8(a0).constructor);
r0 = value;
} else {
value = value3.apply(a0, value);
r0 = value;
function _callSuper_71943(a0, a1, a2) { // fn#71943, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9366:290, offset: 0x01d32a4c, size: 100 bytes, params: 4, frame: 20
var r0;
var Reflect;
let value = a2;
const value3 = Module00017(a1);
if (_isNativeReflectConstruct_71944()) {
Reflect = global.Reflect;
value = Reflect.construct(value3, value || [], Module00017(a0).constructor);
r0 = value;
} else {
value = value3.apply(a0, value);
r0 = value;
}
return PossibleConstructorReturn(a0, r0);
}
return binding(a0, r0);
}
function _isNativeReflectConstruct_71944() { // fn#71944, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9366:421, offset: 0x01d32ab0, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
function _isNativeReflectConstruct_71944() { // fn#71944, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9366:421, offset: 0x01d32ab0, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_71944_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_71944_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun71947(a0) { // fn#71947, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9366:1160, offset: 0x01d32b12, size: 72 bytes, params: 2, frame: 15
const closure = QRCode;
env0_9(closure, a0);
return env0_6(closure, [{key: 'render', value: value_71949}]);
}
function _fun71947(a0) { // fn#71947, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9366:1160, offset: 0x01d32b12, size: 72 bytes, params: 2, frame: 15
const QRCode2 = QRCode;
Inherits(QRCode2, a0);
return CreateClass(QRCode2, [{key: 'render', value: value_71949}]);
function QRCode() { // fn#71948, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9366:1172, offset: 0x01d32b5a, size: 42 bytes, params: 1, frame: 16
env1_5(this, QRCode);
return _callSuper_71943(this, QRCode, arguments);
}
function _fun71950(a0) { // fn#71950, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9366:1832, offset: 0x01d32cbd, size: 72 bytes, params: 2, frame: 15
const closure = QRCodeWithOverlay;
env0_9(closure, a0);
return env0_6(closure, [{key: 'render', value: value_71952}]);
}
function value_71949() { // fn#71949, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9366:1295, offset: 0x01d32b84, size: 313 bytes, params: 1, frame: 23
const value = environment.__proto__;
const value2 = env1_15(this.context);
const props = this.props;
const style = props.style;
const text = props.text;
const blur = props.blur;
const accessibilityLabel = props.accessibilityLabel;
const value3 = env1_4(props, env1_3);
const value4 = null;
return (
<View
accessible={value4 != accessibilityLabel}
accessibilityRole="image"
accessibilityLabel={accessibilityLabel}
style={[value2.qrCode, {backgroundColor: value3.bgColor}, style]}
>
<View style={{position: 'relative', width: value3.size, height: value3.size}}>
{((Component) => <Component value={text} level="M" {...value3} />)(importDefault(9182) /* metro dependency 9182 */)}
{
blur
? ((Component) => <Component style={StyleSheet.absoluteFill} blurTheme="dark" />)(importDefault(4564) /* metro dependency 4564: VisualEffectView */)
: value4
}
</View>
</View>
);
}
function QRCode() { // fn#71948, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9366:1172, offset: 0x01d32b5a, size: 42 bytes, params: 1, frame: 16
env1_5(this, QRCode);
return _callSuper_71943(this, QRCode, arguments);
}
}
function value_71949() { // fn#71949, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9366:1295, offset: 0x01d32b84, size: 313 bytes, params: 1, frame: 23
const value = environment.__proto__;
const value2 = env1_15(this.context);
const props = this.props;
const style = props.style;
const text = props.text;
const blur = props.blur;
const accessibilityLabel = props.accessibilityLabel;
const value3 = env1_4(props, env1_3);
const value4 = null;
return (
<View
accessible={value4 != accessibilityLabel}
accessibilityRole="image"
accessibilityLabel={accessibilityLabel}
style={[value2.qrCode, {backgroundColor: value3.bgColor}, style]}
>
<View style={{position: 'relative', width: value3.size, height: value3.size}}>
{((Component) => <Component value={text} level="M" {...value3} />)(importDefault(9182) /* metro dependency 9182 */)}
{blur ? ((Component) => <Component style={StyleSheet.absoluteFill} blurTheme="dark" />)(importDefault(4564) /* metro dependency 4564: VisualEffectView */) : value4}
</View>
</View>
);
}
function _fun71950(a0) { // fn#71950, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9366:1832, offset: 0x01d32cbd, size: 72 bytes, params: 2, frame: 15
const QRCodeWithOverlay2 = QRCodeWithOverlay;
Inherits(QRCodeWithOverlay2, a0);
return CreateClass(QRCodeWithOverlay2, [{key: 'render', value: value_71952}]);
function QRCodeWithOverlay() { // fn#71951, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9366:1844, offset: 0x01d32b5a, size: 42 bytes, params: 1, frame: 16
env1_5(this, QRCodeWithOverlay);
return _callSuper_71943(this, QRCodeWithOverlay, arguments);
}
function value_71952() { // fn#71952, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9366:2022, offset: 0x01d32d05, size: 289 bytes, params: 1, frame: 24
const value = environment.__proto__;
let binding = env1_15;
const value2 = binding(this.context);
const {overlaySize, blur} = this.props;
binding = env1_17;
const value3 = null;
const property = binding[value3 != overlaySize ? overlaySize : env1_16.SIZE_40];
const qrCodeContainer = value2.qrCodeContainer;
const items2 = [
((Component) => <Component {...this.props} {...{['blur']: false}} />)(env1_18),
];
items2[1] = (
<View style={[value2.qrCodeOverlay, StyleSheet.absoluteFill]}>
<Image style={value2[property]} source={require(9193) /* metro dependency 9193 */} />
</View>
);
items2[2] = (
blur
? ((Component) => <Component style={StyleSheet.absoluteFill} />)(importDefault(8670) /* metro dependency 8670: VisualEffectViewThemed */)
: value3
);
return (
<View style={qrCodeContainer}>
{items2}
</View>
);
}
}
function value_71952() { // fn#71952, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9366:2022, offset: 0x01d32d05, size: 289 bytes, params: 1, frame: 24
const value = environment.__proto__;
let binding = env1_15;
const value2 = binding(this.context);
const {overlaySize, blur} = this.props;
binding = env1_17;
const value3 = null;
const property = binding[value3 != overlaySize ? overlaySize : env1_16.SIZE_40];
const qrCodeContainer = value2.qrCodeContainer;
const items2 = [((Component) => <Component {...this.props} {...{['blur']: false}} />)(env1_18)];
items2[1] = <View style={[value2.qrCodeOverlay,
StyleSheet.absoluteFill]}><Image style={value2[property]} source={require(9193) /* metro dependency 9193 */} /></View>;
items2[2] = blur ? ((Component) => <Component style={StyleSheet.absoluteFill} />)(importDefault(8670) /* metro dependency 8670: VisualEffectViewThemed */) : value3;
return (
<View style={qrCodeContainer}>
{items2}
</View>
);
}
global.__d(_fun71942, 9181, [29, 6, 7, 15, 17, 18, 31, 27, 33, 4501, 697, 9182, 4564, 3868, 9193, 8670,
2]) /* metro module 9181, dependencies: [29, 6, 7, 15, 17, 18, 31, 27, 33, 4501, 697, 9182, 4564, 3868, 9193, 8670, 2] */;
+171 -127
View File
@@ -1,16 +1,22 @@
/* Metro module 12642; source: components_native/QRScannerModal.tsx; dependencies: [57, 31, 27, 661, 5117, 33, 477, 12643, 697, 5459, 1585, 1471, 4245, 5080, 12637, 1962, 7007, 12620, 3853, 4496, 1244, 8792, 8196, 1305, 2] */
import Module00057 from '../by-id/module-00057.js'; /* Metro dependency 57 */
import Native from '../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UseSafeAreaInsetsNative from '../modules/safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import TouchableHitBox from '../design/void/TouchableHitBox/native/TouchableHitBox.tsx'; /* Metro dependency 8792 */
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 ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */
import * as FamilyCenterConstantsModule from '../modules/parent_tools/FamilyCenterConstants.tsx'; /* Metro dependency 5117 */
import * as RunAfterInteractionsUtilsModule from '../utils/native/RunAfterInteractionsUtils.tsx'; /* Metro dependency 5459 */
function _fun96953(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#96953, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12832:6, offset: 0x0216d7f8, size: 483 bytes, params: 8, frame: 20
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const requireNativeComponent = value.requireNativeComponent;
const env0_5 = value.View;
const env0_6 = (require(661) /* metro dependency 661: Constants */).UserSettingsSections;
const env0_7 = (require(5117) /* metro dependency 5117: FamilyCenterConstants */).FAMILY_CENTER_LINK_REQUEST_REGEX;
value = require(33) /* metro dependency 33 */;
const env0_8 = value.jsx;
const env0_9 = value.jsxs;
@@ -19,130 +25,168 @@ function _fun96953(global, require, importDefault, importAll, module, exports, d
} else {
value = requireNativeComponent('DCDQRScanner');
}
object2 = {scanner: {'position': 'absolute', 'height': '100%', 'width': '100%'}};
object2.closeButton = {marginLeft: 8};
const BLACK = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BLACK;
object2.emptyView = {backgroundColor: BLACK};
const BRAND_500 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BRAND_500;
object2.showHelp = {'marginLeft': 16, 'marginRight': 16, 'marginTop': 'auto', 'borderRadius': 16,
object = {scanner: {'position': 'absolute', 'height': '100%', 'width': '100%'}};
object.closeButton = {marginLeft: 8};
const BLACK = (Native).unsafe_rawColors.BLACK;
object.emptyView = {backgroundColor: BLACK};
const BRAND_500 = (Native).unsafe_rawColors.BRAND_500;
object.showHelp = {'marginLeft': 16, 'marginRight': 16, 'marginTop': 'auto', 'borderRadius': 16,
'backgroundColor': null, 'paddingTop': 4, 'paddingBottom': 4, 'paddingLeft': 16, 'paddingRight': 16,
backgroundColor: BRAND_500};
const WHITE = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE;
object2.text = {color: WHITE, textAlign: 'center'};
object2 = {SUCCEEDED: 'SUCCEEDED', FAILED: 'FAILED'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/QRScannerModal.tsx');
const WHITE = (Native).unsafe_rawColors.WHITE;
object.text = {color: WHITE, textAlign: 'center'};
object = {SUCCEEDED: 'SUCCEEDED', FAILED: 'FAILED'};
(FileImportTrackerModule).fileFinishedImporting('components_native/QRScannerModal.tsx');
exports.default = QRScannerModal;
}
function DCDQRScanner(a0) { // fn#96954, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12832:313, offset: 0x0216d9db, size: 33 bytes, params: 2, frame: 13
return ((Component) => <Component {...a0} />)(env0_10);
}
function QRScannerModal({showHelp, onScanSuccess}) { // fn#96955, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12832:910, offset: 0x0216d9fc, size: 631 bytes, params: 2, frame: 29
const r8 = showHelp !== undefined && showHelp;
const binding = env0_4;
const [property, env0_1] = env0_3(binding.useState(true), 2);
binding.useEffect(_fun96956, []);
const {bottom, top} = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
const items2 = [property ? <View style={[env0_11.scanner,
env0_11.emptyView]} /> : <DCDQRScanner style={env0_11.scanner} pointerEvents="none" onQRCodeFound={onQRCodeFound} />];
const TouchableHitBox = importDefault(8792) /* metro dependency 8792: TouchableHitBox */;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
items2[1] = <TouchableHitBox accessibilityRole="button" accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq)} source={importDefault(8196) /* metro dependency 8196 */} style={[env0_11.closeButton,
{marginTop: top}]} onPress={(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop} />;
items2[2] = r8 ? property ? null : <View style={[env0_11.showHelp,
{marginBottom: bottom + 8}]}>{((LegacyText) => <LegacyText style={env0_11.text}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.dklV0G)}</LegacyText>)((require(1305) /* metro dependency 1305: native */).LegacyText)}</View> : null;
return (
<View style={{flex: 1}}>
{items2}
</View>
);
}
function _fun96956() { // fn#96956, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12832:1041, offset: 0x0216dc73, size: 58 bytes, params: 1, frame: 12
var environment;
const value = environment.__proto__;
const env0_0 = (require(5459) /* metro dependency 5459: RunAfterInteractionsUtils */).runAfterInteractions(_fun96957);
return _fun96958;
}
function onQRCodeFound(a0) { // fn#96959, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12832:1304, owner: QRScannerModal.onQRCodeFound, offset: 0x0216dcc2, size: 651 bytes, params: 2, frame: 22
var r5;
var object2;
var onScanSuccessBinding;
var value3;
var defaultImport2;
var toURLSafe;
var result;
var hostname;
var pathname;
var remoteAuthFingerprint;
var defaultImport3;
var openURL;
var defaultImport6;
var pushLazy;
let nativeEvent = a0.nativeEvent;
const status = nativeEvent.status;
let value = environment.__proto__;
const SUCCEEDED = env1_12.SUCCEEDED;
if (SUCCEEDED === status) {
onScanSuccessBinding = onScanSuccess;
value3 = undefined;
if (value3 !== onScanSuccessBinding) {
onScanSuccess(a0.nativeEvent.result);
return value3;
}
defaultImport2 = importDefault(dependencyMap[11]);
toURLSafe = defaultImport2.toURLSafe;
nativeEvent = a0.nativeEvent;
result = nativeEvent.result;
r5 = Reflect.apply(toURLSafe, defaultImport2, [result]) ?? ({});
hostname = r5.hostname;
pathname = r5.pathname;
remoteAuthFingerprint = require(dependencyMap[12]).findRemoteAuthFingerprint(hostname, pathname);
if (remoteAuthFingerprint != null) {
importDefault(dependencyMap[13]).pop();
defaultImport6 = importDefault(dependencyMap[13]);
pushLazy = defaultImport6.pushLazy;
value = require(dependencyMap[15]);
value = value(dependencyMap[14], dependencyMap.paths);
Reflect.apply(pushLazy, defaultImport6, [value, {remoteAuthFingerprint: remoteAuthFingerprint}]);
return value3;
}
r5 = pathname == null ? value3 : pathname.match(FAMILY_CENTER_LINK_REQUEST_REGEX);
if (r5 == null) {
defaultImport3 = importDefault(dependencyMap[18]);
defaultImport3.openURL(a0.nativeEvent.result, value3, false);
importDefault(dependencyMap[13]).pop();
return undefined;
}
if (pathname != null) {
importDefault(dependencyMap[13]).pop();
require(dependencyMap[16]).openUserSettings({screen: UserSettingsSections.FAMILY_CENTER});
require(dependencyMap[17]).handleFamilyCenterQRCodeScan(pathname, 'UserSettingsQRCodeScan');
return value3;
}
defaultImport3 = importDefault(dependencyMap[18]);
openURL = defaultImport3.openURL;
nativeEvent = a0.nativeEvent;
result = nativeEvent.result;
Reflect.apply(openURL, defaultImport3, [result, value3, false]);
} else {
env1_12.FAILED;
var defaultImport = importDefault(dependencyMap[19]);
var show = defaultImport.show;
object2 = {};
var intl = require(dependencyMap[20]).intl;
var string = intl.string;
var t = require(dependencyMap[20]).t;
var QOQlWa = t.QOQlWa;
object2.body = Reflect.apply(string, intl, [QOQlWa]);
intl = require(dependencyMap[20]).intl;
string = intl.string;
t = require(dependencyMap[20]).t;
object2.title = Reflect.apply(string, intl, [t['6S318H']]);
Reflect.apply(show, defaultImport, [object2]);
function DCDQRScanner(a0) { // fn#96954, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12832:313, offset: 0x0216d9db, size: 33 bytes, params: 2, frame: 13
return ((Component) => <Component {...a0} />)(env0_10);
}
importDefault(dependencyMap[13]).pop();
function QRScannerModal({showHelp, onScanSuccess}) { // fn#96955, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12832:910, offset: 0x0216d9fc, size: 631 bytes, params: 2, frame: 29
const r8 = showHelp !== undefined && showHelp;
const [property, env0_1] = Module00057(ReactModule.useState(true), 2);
ReactModule.useEffect(_fun96956, []);
const {bottom, top} = (UseSafeAreaInsetsNative)();
const items2 = [
property
? (
<View style={[env0_11.scanner, env0_11.emptyView]} />
)
: (
<DCDQRScanner
style={env0_11.scanner}
pointerEvents="none"
onQRCodeFound={onQRCodeFound}
/>
),
];
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
items2[1] = (
<TouchableHitBox
accessibilityRole="button"
accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq)}
source={importDefault(8196) /* metro dependency 8196 */}
style={[env0_11.closeButton, {marginTop: top}]}
onPress={(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop}
/>
);
items2[2] = (
r8
? (
property
? null
: (
<View style={[env0_11.showHelp, {marginBottom: bottom + 8}]}>
{((LegacyText) => <LegacyText style={env0_11.text}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.dklV0G)}</LegacyText>)((require(1305) /* metro dependency 1305: native */).LegacyText)}
</View>
)
)
: null
);
return (
<View style={{flex: 1}}>
{items2}
</View>
);
function _fun96956() { // fn#96956, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12832:1041, offset: 0x0216dc73, size: 58 bytes, params: 1, frame: 12
var environment;
const value = environment.__proto__;
const env0_0 = (RunAfterInteractionsUtilsModule).runAfterInteractions(_fun96957);
return _fun96958;
function _fun96957() { // fn#96957, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12832:1082, offset: 0x011d76b4, size: 18 bytes, params: 1, frame: 11
env1_1(false);
}
function _fun96958() { // fn#96958, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12832:1102, offset: 0x0216dcad, size: 21 bytes, params: 1, frame: 9
env0_0.cancel();
}
}
function onQRCodeFound(a0) { // fn#96959, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12832:1304, owner: QRScannerModal.onQRCodeFound, offset: 0x0216dcc2, size: 651 bytes, params: 2, frame: 22
var r5;
var object;
var onScanSuccessBinding;
var value3;
var defaultImport2;
var toURLSafe;
var result;
var hostname;
var pathname;
var remoteAuthFingerprint;
var defaultImport3;
var openURL;
var defaultImport6;
var pushLazy;
let nativeEvent = a0.nativeEvent;
const status = nativeEvent.status;
let value = environment.__proto__;
const SUCCEEDED = env1_12.SUCCEEDED;
if (SUCCEEDED === status) {
onScanSuccessBinding = onScanSuccess;
value3 = undefined;
if (value3 !== onScanSuccessBinding) {
onScanSuccess(a0.nativeEvent.result);
return value3;
}
defaultImport2 = importDefault(dependencyMap[11]);
toURLSafe = defaultImport2.toURLSafe;
nativeEvent = a0.nativeEvent;
result = nativeEvent.result;
r5 = Reflect.apply(toURLSafe, defaultImport2, [result]) ?? ({});
hostname = r5.hostname;
pathname = r5.pathname;
remoteAuthFingerprint = require(dependencyMap[12]).findRemoteAuthFingerprint(hostname, pathname);
if (remoteAuthFingerprint != null) {
importDefault(dependencyMap[13]).pop();
defaultImport6 = importDefault(dependencyMap[13]);
pushLazy = defaultImport6.pushLazy;
value = require(dependencyMap[15]);
value = value(dependencyMap[14], dependencyMap.paths);
Reflect.apply(pushLazy, defaultImport6, [value, {remoteAuthFingerprint: remoteAuthFingerprint}]);
return value3;
}
r5 = pathname == null ? value3 : pathname.match(FAMILY_CENTER_LINK_REQUEST_REGEX);
if (r5 == null) {
defaultImport3 = importDefault(dependencyMap[18]);
defaultImport3.openURL(a0.nativeEvent.result, value3, false);
importDefault(dependencyMap[13]).pop();
return undefined;
}
if (pathname != null) {
importDefault(dependencyMap[13]).pop();
require(dependencyMap[16]).openUserSettings({screen: UserSettingsSections.FAMILY_CENTER});
require(dependencyMap[17]).handleFamilyCenterQRCodeScan(pathname, 'UserSettingsQRCodeScan');
return value3;
}
defaultImport3 = importDefault(dependencyMap[18]);
openURL = defaultImport3.openURL;
nativeEvent = a0.nativeEvent;
result = nativeEvent.result;
Reflect.apply(openURL, defaultImport3, [result, value3, false]);
} else {
env1_12.FAILED;
var defaultImport = importDefault(dependencyMap[19]);
var show = defaultImport.show;
object = {};
var intl = require(dependencyMap[20]).intl;
var string = intl.string;
var t = require(dependencyMap[20]).t;
var QOQlWa = t.QOQlWa;
object.body = Reflect.apply(string, intl, [QOQlWa]);
intl = require(dependencyMap[20]).intl;
string = intl.string;
t = require(dependencyMap[20]).t;
object.title = Reflect.apply(string, intl, [t['6S318H']]);
Reflect.apply(show, defaultImport, [object]);
}
importDefault(dependencyMap[13]).pop();
}
}
}
global.__d(_fun96953, 12642, [57, 31, 27, 661, 5117, 33, 477, 12643, 697, 5459, 1585, 1471, 4245, 5080, 12637, 1962,
7007, 12620, 3853, 4496, 1244, 8792, 8196, 1305,
2]) /* metro module 12642, dependencies: [57, 31, 27, 661, 5117, 33, 477, 12643, 697, 5459, 1585, 1471, 4245, 5080, 12637, 1962, 7007, 12620, 3853, 4496, 1244, 8792, 8196, 1305, 2] */;
+215 -203
View File
@@ -1,226 +1,238 @@
/* Metro module 10886; source: components_native/StreamPreview.tsx; dependencies: [6, 7, 15, 17, 18, 31, 27, 1310, 33, 4501, 697, 4002, 10887, 10888, 3868, 1244, 5278, 10271, 566, 2] */
import ClassCallCheck from '../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import Native from '../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import ThemeStore from '../modules/user_settings/ThemeStore.tsx'; /* Metro dependency 1310 */
import UseFetchStreamPreview from '../modules/go_live/useFetchStreamPreview.tsx'; /* Metro dependency 10271 */
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 NativeModule from '../external/discord_common/js/packages/design/native.tsx'; /* Metro dependency 3868 */
import * as CreateStylesModule from '../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as PressablesModule from '../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
function _fun83389(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83389, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11072:6, offset: 0x01f1889c, size: 686 bytes, params: 8, frame: 26
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_8 = value2.Image;
const StyleSheet = value2.StyleSheet;
const env0_9 = value2.View;
const themeStore = importDefault(1310) /* metro dependency 1310: ThemeStore */;
const value3 = require(33) /* metro dependency 33 */;
const env0_11 = value3.jsx;
const env0_12 = value3.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
let createLegacyClassComponentStyles = createStylesModule.createLegacyClassComponentStyles;
object3 = {};
const object4 = {};
copyDataProperties(object4, StyleSheet.absoluteFillObject, undefined);
object4['alignItems'] = 'center';
object4['justifyContent'] = 'center';
object4['paddingLeft'] = 20;
object4['paddingRight'] = 20;
object3.wrapper = object4;
const TEXT_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_MUTED;
object3.text = {'textAlign': 'center', 'fontSize': 14, 'lineHeight': 18, 'marginTop': 16, color: TEXT_MUTED};
object3.fallbackImage = {width: '100%'};
const env0_13 = Reflect.apply(createLegacyClassComponentStyles, createStylesModule, [object3]);
let value = ReactModule;
const StyleSheet = ReactNativeModule.StyleSheet;
let createLegacyClassComponentStyles = CreateStylesModule.createLegacyClassComponentStyles;
object = {};
const object2 = {};
copyDataProperties(object2, StyleSheet.absoluteFillObject, undefined);
object2['alignItems'] = 'center';
object2['justifyContent'] = 'center';
object2['paddingLeft'] = 20;
object2['paddingRight'] = 20;
object.wrapper = object2;
const TEXT_MUTED = (Native).colors.TEXT_MUTED;
object.text = {'textAlign': 'center', 'fontSize': 14, 'lineHeight': 18, 'marginTop': 16, color: TEXT_MUTED};
object.fallbackImage = {width: '100%'};
const env0_13 = Reflect.apply(createLegacyClassComponentStyles, CreateStylesModule, [object]);
let PureComponent = value.PureComponent;
const value5 = _fun83394(PureComponent);
const ThemeContext = (require(3868) /* metro dependency 3868: native */).ThemeContext;
const ThemeContext = (NativeModule).ThemeContext;
value5.contextType = ThemeContext;
const value6 = createStylesModule;
createLegacyClassComponentStyles = value6.createLegacyClassComponentStyles;
object3 = {};
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object3.touchable = {'flex': 1, 'width': '100%', 'height': null, 'aspectRatio': 1.7777777777777777,
createLegacyClassComponentStyles = CreateStylesModule.createLegacyClassComponentStyles;
object = {};
const BACKGROUND_BASE_LOWEST = (Native).colors.BACKGROUND_BASE_LOWEST;
object.touchable = {'flex': 1, 'width': '100%', 'height': null, 'aspectRatio': 1.7777777777777777,
height: undefined, backgroundColor: BACKGROUND_BASE_LOWEST};
const BLACK = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BLACK;
object3.imageContainer = {flex: 1, backgroundColor: BLACK};
object3.image = {flex: 1};
const env0_15 = Reflect.apply(createLegacyClassComponentStyles, value6, [object3]);
const BLACK = (Native).unsafe_rawColors.BLACK;
object.imageContainer = {flex: 1, backgroundColor: BLACK};
object.image = {flex: 1};
const env0_15 = Reflect.apply(createLegacyClassComponentStyles, CreateStylesModule, [object]);
PureComponent = value.PureComponent;
value = _fun83397(PureComponent);
value.contextType = ThemeContext;
value.defaultProps = {renderFallback: renderFallback};
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/StreamPreview.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/StreamPreview.tsx');
exports.default = ConnectedStreamPreview;
}
function _callSuper_83390(a0, a1, a2) { // fn#83390, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11072:239, offset: 0x01f18b4a, size: 100 bytes, params: 4, frame: 20
var r0;
var Reflect;
let value = a2;
const value3 = env0_6(a1);
const binding = env0_5;
if (_isNativeReflectConstruct_83391()) {
Reflect = global.Reflect;
value = Reflect.construct(value3, value || [], env0_6(a0).constructor);
r0 = value;
} else {
value = value3.apply(a0, value);
r0 = value;
function _callSuper_83390(a0, a1, a2) { // fn#83390, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11072:239, offset: 0x01f18b4a, size: 100 bytes, params: 4, frame: 20
var r0;
var Reflect;
let value = a2;
const value3 = Module00017(a1);
if (_isNativeReflectConstruct_83391()) {
Reflect = global.Reflect;
value = Reflect.construct(value3, value || [], Module00017(a0).constructor);
r0 = value;
} else {
value = value3.apply(a0, value);
r0 = value;
}
return PossibleConstructorReturn(a0, r0);
}
return binding(a0, r0);
}
function _isNativeReflectConstruct_83391() { // fn#83391, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11072:370, offset: 0x01f18bae, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
function _isNativeReflectConstruct_83391() { // fn#83391, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11072:370, offset: 0x01f18bae, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_83391_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_83391_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun83394(a0) { // fn#83394, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11072:851, offset: 0x01f18c10, size: 72 bytes, params: 2, frame: 15
const closure = DefaultFallback;
env0_7(closure, a0);
return env0_4(closure, [{key: 'render', value: value_83396}]);
}
function _fun83394(a0) { // fn#83394, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11072:851, offset: 0x01f18c10, size: 72 bytes, params: 2, frame: 15
const DefaultFallback2 = DefaultFallback;
Inherits(DefaultFallback2, a0);
return CreateClass(DefaultFallback2, [{key: 'render', value: value_83396}]);
function DefaultFallback() { // fn#83395, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11072:863, offset: 0x01f18c58, size: 42 bytes, params: 1, frame: 16
env1_3(this, DefaultFallback);
return _callSuper_83390(this, DefaultFallback, arguments);
}
function _fun83397(a0) { // fn#83397, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11072:1550, offset: 0x01f18d29, size: 72 bytes, params: 2, frame: 15
const closure = StreamPreview_83398;
env0_7(closure, a0);
return env0_4(closure, [{key: 'render', value: value_83402}]);
}
function value_83396() { // fn#83396, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11072:1031, offset: 0x01f18c82, size: 167 bytes, params: 1, frame: 20
const value = environment.__proto__;
const value2 = env1_13(this.context);
return (
<View style={value2.wrapper}>
<Image
resizeMode="contain"
style={value2.fallbackImage}
source={(require(4002) /* metro dependency 4002: shared */).isThemeDark(this.props.theme) ? importDefault(10887) /* metro dependency 10887 */ : importDefault(10888) /* metro dependency 10888 */}
/>
</View>
);
}
function renderFallback(a0, a1) { // fn#83403, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11072:2686, offset: 0x01f18fd1, size: 114 bytes, params: 3, frame: 18
const binding = env0_14;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
return ((Component) => <Component theme={a1} caption={a0 ? Reflect.apply(string, intl,
[t.NQ7H8V]) : Reflect.apply(string, intl, [t.uQZTBV])} />)(binding);
}
function ConnectedStreamPreview(a0) { // fn#83404, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11072:2917, offset: 0x01f19043, size: 172 bytes, params: 2, frame: 19
const {guildId, channelId, ownerId} = a0.stream;
const {previewUrl, isLoading} = (importDefault(10271) /* metro dependency 10271: useFetchStreamPreview */)(guildId,
channelId, ownerId);
return ((Component) => <Component {...a0} {...{['url']: previewUrl}} {...{['isFetching']: isLoading}} {...{['theme']: (require(566) /* metro dependency 566: flux */).useStateFromStores([ThemeStore],
function() {
return ThemeStore.theme;
})}} />)(env0_16);
}
function DefaultFallback() { // fn#83395, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11072:863, offset: 0x01f18c58, size: 42 bytes, params: 1, frame: 16
env1_3(this, DefaultFallback);
return _callSuper_83390(this, DefaultFallback, arguments);
}
function value_83396() { // fn#83396, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11072:1031, offset: 0x01f18c82, size: 167 bytes, params: 1, frame: 20
const value = environment.__proto__;
const value2 = env1_13(this.context);
return (
<View style={value2.wrapper}>
<Image
resizeMode="contain"
style={value2.fallbackImage}
source={(require(4002) /* metro dependency 4002: shared */).isThemeDark(this.props.theme) ? importDefault(10887) /* metro dependency 10887 */ : importDefault(10888) /* metro dependency 10888 */}
/>
</View>
);
}
function StreamPreview_83398(a0) { // fn#83398, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11072:1562, offset: 0x01f18d71, size: 125 bytes, params: 2, frame: 18
let value = copyRestArgs(0, undefined);
env1_3(this, StreamPreview_83398);
const _callSuper_83390Binding = _callSuper_83390;
const items2 = [];
arraySpread(items2, value, 0, undefined);
value = _callSuper_83390Binding(this, StreamPreview_83398, items2);
value.state = {'isImageLoaded': false, 'isImageErrored': false};
value.handleLoadStart = handleLoadStart;
value.handleLoad = handleLoad;
value.handleError = handleError_83401;
return value;
}
function value_83402() { // fn#83402, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11072:1951, offset: 0x01f18e50, size: 385 bytes, params: 1, frame: 28
var r8;
var r9;
var r0;
const value = environment.__proto__;
const binding = env1_15;
const context = this.context;
const value2 = undefined;
const value3 = binding(context);
const {url, ctaText, isFetching, renderFallback, style, children, theme, onPress, disabled} = this.props;
const state = this.state;
if (url == null) {
r0 = renderFallback == null ? value2 : renderFallback(isFetching, theme);
r8 = value2;
r9 = r0;
} else if (isFetching) {
r0 = renderFallback == null ? value2 : renderFallback(isFetching, theme);
r8 = value2;
r9 = r0;
} else if (state.isImageErrored) {
r0 = renderFallback == null ? value2 : renderFallback(isFetching, theme);
r8 = value2;
r9 = r0;
} else {
r9 = state.isImageLoaded || renderFallback == null ? value2 : renderFallback(true, theme);
r8 = <Image resizeMode="contain" style={value3.image} source={{uri: url,
cache: 'force-cache'}} onLoadStart={this.handleLoadStart} onLoad={this.handleLoad} onError={this.handleError} />;
}
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
return (
<PressableOpacity
accessibilityRole="button"
accessibilityLabel={ctaText}
activeOpacity={0.6}
style={[value3.touchable, style]}
disabled={disabled}
onPress={onPress}
>
<View style={value3.imageContainer}>
{r9}
{r8}
</View>
{children}
</PressableOpacity>
);
}
function handleLoadStart() { // fn#83399, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11072:1729, owner: StreamPreview_83398.handleLoadStart, offset: 0x01f18dee, size: 36 bytes, params: 1, frame: 11
env0_0.setState({'isImageLoaded': false, 'isImageErrored': false});
}
function handleLoad() { // fn#83400, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11072:1797, owner: StreamPreview_83398.handleLoad, offset: 0x01f18e12, size: 31 bytes, params: 1, frame: 12
env0_0.setState({isImageLoaded: true});
}
function StreamPreview_83398HandleError() { // fn#83401, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11072:1848, owner: StreamPreview_83398.handleError, offset: 0x01f18e31, size: 31 bytes, params: 1, frame: 12
env0_0.setState({isImageErrored: true});
function _fun83397(a0) { // fn#83397, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11072:1550, offset: 0x01f18d29, size: 72 bytes, params: 2, frame: 15
const StreamPreview2 = StreamPreview;
Inherits(StreamPreview2, a0);
return CreateClass(StreamPreview2, [{key: 'render', value: value_83402}]);
function StreamPreview(a0) { // fn#83398, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11072:1562, offset: 0x01f18d71, size: 125 bytes, params: 2, frame: 18
let value = copyRestArgs(0, undefined);
env1_3(this, StreamPreview);
const _callSuper_83390Binding = _callSuper_83390;
const items2 = [];
arraySpread(items2, value, 0, undefined);
value = _callSuper_83390Binding(this, StreamPreview, items2);
value.state = {'isImageLoaded': false, 'isImageErrored': false};
value.handleLoadStart = handleLoadStart;
value.handleLoad = handleLoad;
value.handleError = handleError_83401;
return value;
function handleLoadStart() { // fn#83399, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11072:1729, owner: StreamPreview.handleLoadStart, offset: 0x01f18dee, size: 36 bytes, params: 1, frame: 11
env0_0.setState({'isImageLoaded': false, 'isImageErrored': false});
}
function handleLoad() { // fn#83400, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11072:1797, owner: StreamPreview.handleLoad, offset: 0x01f18e12, size: 31 bytes, params: 1, frame: 12
env0_0.setState({isImageLoaded: true});
}
function StreamPreviewHandleError() { // fn#83401, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11072:1848, owner: StreamPreview.handleError, offset: 0x01f18e31, size: 31 bytes, params: 1, frame: 12
env0_0.setState({isImageErrored: true});
}
}
function value_83402() { // fn#83402, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11072:1951, offset: 0x01f18e50, size: 385 bytes, params: 1, frame: 28
var r8;
var r9;
var r0;
const value = environment.__proto__;
const binding = env1_15;
const context = this.context;
const value2 = undefined;
const value3 = binding(context);
const {url, ctaText, isFetching, renderFallback, style, children, theme, onPress, disabled} = this.props;
const state = this.state;
if (url == null) {
r0 = renderFallback == null ? value2 : renderFallback(isFetching, theme);
r8 = value2;
r9 = r0;
} else if (isFetching) {
r0 = renderFallback == null ? value2 : renderFallback(isFetching, theme);
r8 = value2;
r9 = r0;
} else if (state.isImageErrored) {
r0 = renderFallback == null ? value2 : renderFallback(isFetching, theme);
r8 = value2;
r9 = r0;
} else {
r9 = state.isImageLoaded || renderFallback == null ? value2 : renderFallback(true, theme);
r8 = (
<Image
resizeMode="contain"
style={value3.image}
source={{uri: url, cache: 'force-cache'}}
onLoadStart={this.handleLoadStart}
onLoad={this.handleLoad}
onError={this.handleError}
/>
);
}
const PressableOpacity = (PressablesModule).PressableOpacity;
return (
<PressableOpacity
accessibilityRole="button"
accessibilityLabel={ctaText}
activeOpacity={0.6}
style={[value3.touchable, style]}
disabled={disabled}
onPress={onPress}
>
<View style={value3.imageContainer}>
{r9}
{r8}
</View>
{children}
</PressableOpacity>
);
}
}
function renderFallback(a0, a1) { // fn#83403, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11072:2686, offset: 0x01f18fd1, size: 114 bytes, params: 3, frame: 18
const binding = env0_14;
const intl = (IndexNativeModule).intl;
const string = intl.string;
const t = (IndexNativeModule).t;
return ((Component) => <Component theme={a1} caption={a0 ? Reflect.apply(string, intl,
[t.NQ7H8V]) : Reflect.apply(string, intl, [t.uQZTBV])} />)(binding);
}
function ConnectedStreamPreview(a0) { // fn#83404, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11072:2917, offset: 0x01f19043, size: 172 bytes, params: 2, frame: 19
const {guildId, channelId, ownerId} = a0.stream;
const {previewUrl, isLoading} = (UseFetchStreamPreview)(guildId,
channelId, ownerId);
return ((Component) => <Component {...a0} {...{['url']: previewUrl}} {...{['isFetching']: isLoading}} {...{['theme']: (require(566) /* metro dependency 566: flux */).useStateFromStores([ThemeStore],
function() {
return ThemeStore.theme;
})}} />)(env0_16);
}
}
global.__d(_fun83389, 10886, [6, 7, 15, 17, 18, 31, 27, 1310, 33, 4501, 697, 4002, 10887, 10888, 3868, 1244, 5278,
10271, 566,
2]) /* metro module 10886, dependencies: [6, 7, 15, 17, 18, 31, 27, 1310, 33, 4501, 697, 4002, 10887, 10888, 3868, 1244, 5278, 10271, 566, 2] */;
@@ -1,190 +1,214 @@
/* Metro module 10885; source: components_native/TouchableStreamPreview.tsx; dependencies: [31, 27, 4295, 4492, 1226, 1379, 1867, 3784, 4297, 661, 33, 4501, 4000, 697, 4800, 566, 1244, 4796, 8913, 8915, 7712, 4285, 4594, 10886, 4573, 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 ChannelStore from '../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import GuildStore from '../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import PermissionStore from '../stores/PermissionStore.tsx'; /* Metro dependency 3784 */
import GameConsoleStore from '../modules/game_console/GameConsoleStore.tsx'; /* Metro dependency 4295 */
import VoiceStateStore from '../stores/VoiceStateStore.tsx'; /* Metro dependency 4297 */
import ApplicationStreamingStore from '../stores/ApplicationStreamingStore.tsx'; /* Metro dependency 4492 */
import UseMountEffect from '../hooks/useMountEffect.tsx'; /* Metro dependency 4594 */
import SelectedChannelActionCreators from '../actions/SelectedChannelActionCreators.tsx'; /* Metro dependency 4796 */
import StreamPreview from './StreamPreview.tsx'; /* Metro dependency 10886 */
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 FluxModule from '../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */
import * as ColorUtilsModule from '../utils/ColorUtils.tsx'; /* Metro dependency 4000 */
import * as TextModule from '../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ChannelUtilsModule from '../utils/ChannelUtils.tsx'; /* Metro dependency 4800 */
import * as StreamActionCreatorsModule from '../actions/StreamActionCreators.tsx'; /* Metro dependency 8913 */
function _fun83378(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83378, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11071:6, offset: 0x01f1809d, size: 525 bytes, params: 8, frame: 25
var object3;
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 StyleSheet = value.StyleSheet;
const env0_4 = value.View;
const gameConsoleStore = importDefault(4295) /* metro dependency 4295: GameConsoleStore */;
const applicationStreamingStore = importDefault(4492) /* metro dependency 4492: ApplicationStreamingStore */;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
const voiceStateStore = importDefault(4297) /* metro dependency 4297: VoiceStateStore */;
const env0_12 = (require(661) /* metro dependency 661: Constants */).Permissions;
const env0_13 = (require(33) /* metro dependency 33 */).jsx;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object3 = {touchable: {'borderRadius': 5, 'overflow': 'hidden'}};
const object4 = {};
copyDataProperties(object4, StyleSheet.absoluteFillObject, undefined);
object4['alignItems'] = 'center';
object4['justifyContent'] = 'center';
const colorUtilsModule = require(4000) /* metro dependency 4000: ColorUtils */;
const hexWithOpacity = colorUtilsModule.hexWithOpacity;
const PRIMARY_700 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_700;
object4['backgroundColor'] = Reflect.apply(hexWithOpacity, colorUtilsModule, [PRIMARY_700, 0.7]);
object3.ctaWrapper = object4;
const PRIMARY_500 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_500;
object3.ctaBackground = {'height': 40, 'paddingHorizontal': 16, 'borderRadius': 20, 'backgroundColor': null,
object = {touchable: {'borderRadius': 5, 'overflow': 'hidden'}};
const object2 = {};
copyDataProperties(object2, StyleSheet.absoluteFillObject, undefined);
object2['alignItems'] = 'center';
object2['justifyContent'] = 'center';
const hexWithOpacity = ColorUtilsModule.hexWithOpacity;
const PRIMARY_700 = (Native).unsafe_rawColors.PRIMARY_700;
object2['backgroundColor'] = Reflect.apply(hexWithOpacity, ColorUtilsModule, [PRIMARY_700, 0.7]);
object.ctaWrapper = object2;
const PRIMARY_500 = (Native).unsafe_rawColors.PRIMARY_500;
object.ctaBackground = {'height': 40, 'paddingHorizontal': 16, 'borderRadius': 20, 'backgroundColor': null,
'justifyContent': 'center', 'alignItems': 'center', backgroundColor: PRIMARY_500};
object3.ctaText = {lineHeight: 20};
const env0_14 = Reflect.apply(createStyles, value, [object3]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/TouchableStreamPreview.tsx');
object.ctaText = {lineHeight: 20};
const env0_14 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('components_native/TouchableStreamPreview.tsx');
exports.default = VoiceChannelSettingsStreamPreview;
}
function StreamPreviewContainer({style, disableTransition, onPress, stream, channel}) { // fn#83379, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11071:667, offset: 0x01f182aa, size: 809 bytes, params: 2, frame: 29
var r15;
var r2;
var r5;
var r4;
var r13;
var value7;
var value8;
var value10;
var value12;
const env0_3 = channel;
const styles = useStyles();
const channelUtilsModule = require(4800) /* metro dependency 4800: ChannelUtils */;
const isChannelFull2 = channelUtilsModule.isChannelFull(channel, VoiceStateStore, GuildStore);
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GameConsoleStore], _fun83380);
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([PermissionStore], function() {
var CONNECT = Permissions.CONNECT;
return !PermissionStore.can(CONNECT, channel);
});
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([VoiceStateStore], function() {
return VoiceStateStore.isInChannel(channel.id);
});
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ApplicationStreamingStore,
AuthenticationStore], _fun83383, [channel.id, stream.ownerId]);
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const value6 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['7Xq/nV']);
if (value2) {
value12 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.gcnYT2);
r4 = true;
r13 = value12;
} else {
r15 = value4 || value5;
value7 = false;
if (r15) {
r4 = value7;
r13 = value6;
function StreamPreviewContainer({style, disableTransition, onPress, stream, channel}) { // fn#83379, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11071:667, offset: 0x01f182aa, size: 809 bytes, params: 2, frame: 29
var r15;
var r2;
var r5;
var r4;
var r13;
var value7;
var value8;
var value10;
var value12;
const channel2 = channel;
const styles = useStyles();
const isChannelFull2 = ChannelUtilsModule.isChannelFull(channel, VoiceStateStore, GuildStore);
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GameConsoleStore], _fun83380);
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([PermissionStore], function() {
var permissionStoreBinding = PermissionStore;
var CONNECT = Permissions.CONNECT;
return !permissionStoreBinding.can(CONNECT, channel);
});
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([VoiceStateStore], function() {
return VoiceStateStore.isInChannel(channel.id);
});
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ApplicationStreamingStore,
AuthenticationStore], _fun83383, [channel.id, stream.ownerId]);
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const value6 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['7Xq/nV']);
if (value2) {
value12 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.gcnYT2);
r4 = true;
r13 = value12;
} else {
if (isChannelFull2) {
value10 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.rZfiNq);
r2 = true;
r5 = value10;
} else if (value3) {
value8 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.TVBCKZ);
r2 = true;
r5 = value8;
r15 = value4 || value5;
value7 = false;
if (r15) {
r4 = value7;
r13 = value6;
} else {
r2 = value7;
r5 = value6;
if (isChannelFull2) {
value10 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.rZfiNq);
r2 = true;
r5 = value10;
} else if (value3) {
value8 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.TVBCKZ);
r2 = true;
r5 = value8;
} else {
r2 = value7;
r5 = value6;
}
r4 = r2;
r13 = r5;
}
r4 = r2;
r13 = r5;
}
}
const value14 = env0_3.useCallback(_fun83384, [stream, disableTransition, onPress]);
(importDefault(4594) /* metro dependency 4594: useMountEffect */)(_fun83385);
const StreamPreview = importDefault(10886) /* metro dependency 10886: StreamPreview */;
const items2 = [styles.touchable, style];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<StreamPreview
stream={stream}
ctaText={r13}
style={items2}
onPress={value14}
disabled={r4}
>
<View style={styles.ctaWrapper}>
<View style={styles.ctaBackground}>
<Text
style={styles.ctaText}
variant="text-md/semibold"
color="always-white"
>
{r13}
</Text>
const value14 = channel2.useCallback(_fun83384, [stream, disableTransition, onPress]);
(UseMountEffect)(_fun83385);
const items2 = [styles.touchable, style];
const Text = (TextModule).Text;
return (
<StreamPreview
stream={stream}
ctaText={r13}
style={items2}
onPress={value14}
disabled={r4}
>
<View style={styles.ctaWrapper}>
<View style={styles.ctaBackground}>
<Text
style={styles.ctaText}
variant="text-md/semibold"
color="always-white"
>
{r13}
</Text>
</View>
</View>
</View>
</StreamPreview>
);
}
</StreamPreview>
);
function _fun83380() { // fn#83380, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11071:836, offset: 0x01f185d3, size: 25 bytes, params: 1, frame: 9
const value = environment.__proto__;
return GameConsoleStore.getRemoteSessionId() != null;
}
function VoiceChannelSettingsStreamPreview(a0) { // fn#83386, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11071:1891, offset: 0x01f1879d, size: 173 bytes, params: 2, frame: 20
const env0_0 = a0;
const streamForUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([ApplicationStreamingStore],
_fun83387);
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], _fun83388);
const value3 = null;
return value3 == streamForUser || value3 == value2 ? value3 : <StreamPreviewContainer {...a0} {...{['stream']: streamForUser}} {...{['channel']: value2}} />;
}
function _fun83383() { // fn#83383, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11071:1030, offset: 0x01f18635, size: 63 bytes, params: 1, frame: 13
const ownerId = stream.ownerId;
const authenticationStoreBinding = AuthenticationStore;
const getId = authenticationStoreBinding.getId;
return ownerId === Reflect.apply(getId, authenticationStoreBinding,
[]) && ApplicationStreamingStore.isSelfStreamHidden(channel.id);
}
function _fun83380() { // fn#83380, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11071:836, offset: 0x01f185d3, size: 25 bytes, params: 1, frame: 9
const value = environment.__proto__;
return GameConsoleStore.getRemoteSessionId() != null;
}
function _fun83384() { // fn#83384, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11071:1336, offset: 0x01f18674, size: 223 bytes, params: 1, frame: 18
let value = environment.__proto__;
const defaultImport = SelectedChannelActionCreators;
const selectVoiceChannel = defaultImport.selectVoiceChannel;
let streamBinding = stream;
let channelId = streamBinding.channelId;
Reflect.apply(selectVoiceChannel, defaultImport, [channelId]);
(StreamActionCreatorsModule).watchStream(streamBinding);
if (disableTransition) {
(importDefault(7712) /* metro dependency 7712: ChannelRTCActionCreators */).rebuildRTCActiveChannels();
} else {
(importDefault(8915) /* metro dependency 8915: transitionToStreamNative */)(stream);
}
const defaultImport4 = importDefault(7712) /* metro dependency 7712: ChannelRTCActionCreators */;
const selectParticipant = defaultImport4.selectParticipant;
streamBinding = stream;
channelId = streamBinding.channelId;
value = require(4285) /* metro dependency 4285: StreamKeyUtils */;
Reflect.apply(selectParticipant, defaultImport4, [channelId, value.encodeStreamKey(streamBinding)]);
if (onPress != null) {
onPress();
}
}
function _fun83383() { // fn#83383, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11071:1030, offset: 0x01f18635, size: 63 bytes, params: 1, frame: 13
const ownerId = stream.ownerId;
const getId = AuthenticationStore.getId;
return ownerId === Reflect.apply(getId, AuthenticationStore,
[]) && ApplicationStreamingStore.isSelfStreamHidden(channel.id);
}
function _fun83385() { // fn#83385, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11071:1565, offset: 0x01f18753, size: 74 bytes, params: 1, frame: 14
var value2;
var moduleValue;
const channelBinding = channel;
if (channelBinding.isGuildStageVoice()) {
value2 = environment.__proto__;
moduleValue = require(8913) /* metro dependency 8913: StreamActionCreators */;
moduleValue.watchStream(stream, {noFocus: true});
}
}
function _fun83384() { // fn#83384, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11071:1336, offset: 0x01f18674, size: 223 bytes, params: 1, frame: 18
let value = environment.__proto__;
const defaultImport = importDefault(4796) /* metro dependency 4796: SelectedChannelActionCreators */;
const selectVoiceChannel = defaultImport.selectVoiceChannel;
let streamBinding = stream;
let channelId = streamBinding.channelId;
Reflect.apply(selectVoiceChannel, defaultImport, [channelId]);
(require(8913) /* metro dependency 8913: StreamActionCreators */).watchStream(streamBinding);
if (disableTransition) {
(importDefault(7712) /* metro dependency 7712: ChannelRTCActionCreators */).rebuildRTCActiveChannels();
} else {
(importDefault(8915) /* metro dependency 8915: transitionToStreamNative */)(stream);
}
const defaultImport4 = importDefault(7712) /* metro dependency 7712: ChannelRTCActionCreators */;
const selectParticipant = defaultImport4.selectParticipant;
streamBinding = stream;
channelId = streamBinding.channelId;
value = require(4285) /* metro dependency 4285: StreamKeyUtils */;
Reflect.apply(selectParticipant, defaultImport4, [channelId, value.encodeStreamKey(streamBinding)]);
if (onPress != null) {
onPress();
function VoiceChannelSettingsStreamPreview(a0) { // fn#83386, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11071:1891, offset: 0x01f1879d, size: 173 bytes, params: 2, frame: 20
const env0_0 = a0;
const streamForUser = (FluxModule).useStateFromStores([ApplicationStreamingStore],
_fun83387);
const value2 = (FluxModule).useStateFromStores([ChannelStore], _fun83388);
const value3 = null;
return (
value3 == streamForUser || value3 == value2
? value3
: (
<StreamPreviewContainer
{...a0}
{...{['stream']: streamForUser}}
{...{['channel']: value2}}
/>
)
);
function _fun83387() { // fn#83387, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11071:1976, offset: 0x01f1884a, size: 38 bytes, params: 1, frame: 13
const applicationStreamingStoreBinding = ApplicationStreamingStore;
const getStreamForUser = applicationStreamingStoreBinding.getStreamForUser;
const binding = env0_0;
const userId = binding.userId;
return Reflect.apply(getStreamForUser, applicationStreamingStoreBinding, [userId, binding.guildId]);
}
function _fun83388() { // fn#83388, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11071:2056, offset: 0x01f18870, size: 44 bytes, params: 1, frame: 12
const streamForUserBinding = streamForUser;
const value2 = null;
return value2 != streamForUserBinding ? ChannelStore.getChannel(streamForUser.channelId) : value2;
}
}
}
function _fun83385() { // fn#83385, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11071:1565, offset: 0x01f18753, size: 74 bytes, params: 1, frame: 14
var value2;
var moduleValue;
const channelBinding = channel;
if (channelBinding.isGuildStageVoice()) {
value2 = environment.__proto__;
moduleValue = require(8913) /* metro dependency 8913: StreamActionCreators */;
moduleValue.watchStream(stream, {noFocus: true});
}
}
function _fun83387() { // fn#83387, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11071:1976, offset: 0x01f1884a, size: 38 bytes, params: 1, frame: 13
const getStreamForUser = ApplicationStreamingStore.getStreamForUser;
const binding = env0_0;
const userId = binding.userId;
return Reflect.apply(getStreamForUser, ApplicationStreamingStore, [userId, binding.guildId]);
}
function _fun83388() { // fn#83388, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11071:2056, offset: 0x01f18870, size: 44 bytes, params: 1, frame: 12
const streamForUserBinding = streamForUser;
const value2 = null;
return value2 != streamForUserBinding ? ChannelStore.getChannel(streamForUser.channelId) : value2;
}
global.__d(_fun83378, 10885, [31, 27, 4295, 4492, 1226, 1379, 1867, 3784, 4297, 661, 33, 4501, 4000, 697, 4800, 566,
1244, 4796, 8913, 8915, 7712, 4285, 4594, 10886, 4573,
2]) /* metro module 10885, dependencies: [31, 27, 4295, 4492, 1226, 1379, 1867, 3784, 4297, 661, 33, 4501, 4000, 697, 4800, 566, 1244, 4796, 8913, 8915, 7712, 4285, 4594, 10886, 4573, 2] */;
@@ -1,191 +1,236 @@
/* Metro module 12614; source: components_native/add_friend/AddFriendModal.tsx; dependencies: [57, 31, 27, 1878, 661, 11995, 33, 4501, 6597, 697, 11997, 4594, 683, 477, 1487, 5080, 3995, 1244, 9212, 5277, 12615, 5282, 4573, 12616, 12618, 1585, 5280, 2] */
import Module00057 from '../../by-id/module-00057.js'; /* Metro dependency 57 */
import AnalyticsUtils from '../../utils/AnalyticsUtils.tsx'; /* Metro dependency 683 */
import Native from '../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UseSafeAreaInsetsNative from '../../modules/safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import UserStore from '../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import UseMountEffect from '../../hooks/useMountEffect.tsx'; /* Metro dependency 4594 */
import ModalActionCreators from '../../actions/ModalActionCreators.tsx'; /* Metro dependency 5080 */
import TextStyles from '../../modules/rebrand/native/TextStyles.tsx'; /* Metro dependency 6597 */
import Module12615 from '../../by-id/module-12615.js'; /* Metro dependency 12615 */
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 Module01487Module from '../../by-id/module-01487.js'; /* Metro dependency 1487 */
import * as TextModule from '../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as HeaderActionButtonNativeModule from '../../design/components/Navigator/native/HeaderActionButton.native.tsx'; /* Metro dependency 5277 */
import * as NavigatorNativeModule from '../../design/components/Navigator/native/Navigator.native.tsx'; /* Metro dependency 5280 */
import * as ShowShareActionSheetAndroidModule from '../../modules/action_sheet/native/showShareActionSheet.android.tsx'; /* Metro dependency 9212 */
import * as ContactSyncConstantsModule from '../../modules/contact_sync/native/ContactSyncConstants.tsx'; /* Metro dependency 11995 */
import * as ContactSyncUtilsModule from '../../modules/contact_sync/native/ContactSyncUtils.tsx'; /* Metro dependency 11997 */
function _fun96754(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#96754, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12804:6, offset: 0x021652f4, size: 489 bytes, params: 8, frame: 26
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_5 = value.View;
const env0_6 = value.ScrollView;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
value = require(661) /* metro dependency 661: Constants */;
const env0_8 = value.AnalyticEvents;
const Fonts = value.Fonts;
const env0_9 = (require(11995) /* metro dependency 11995: ContactSyncConstants */).ContactPermissions;
value = require(33) /* metro dependency 33 */;
const env0_10 = value.jsx;
const env0_11 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object3 = {};
const object4 = {};
const textStyles = importDefault(6597) /* metro dependency 6597: TextStyles */;
object = {};
const object2 = {};
const DISPLAY_EXTRABOLD = Fonts.DISPLAY_EXTRABOLD;
const MOBILE_TEXT_HEADING_PRIMARY = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_TEXT_HEADING_PRIMARY;
copyDataProperties(object4, textStyles(DISPLAY_EXTRABOLD, MOBILE_TEXT_HEADING_PRIMARY, 24), undefined);
object4['marginTop'] = 32;
object4['marginHorizontal'] = 16;
object4['textAlign'] = 'center';
object3.headerText = object4;
object3.subheaderText = {'lineHeight': 18, 'marginVertical': 8, 'marginHorizontal': 16, 'textAlign': 'center'};
object3.input = {marginTop: 16};
object3.otherOptionsContainer = {'marginTop': 16, 'paddingHorizontal': 16};
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object3.rowContainer = {backgroundColor: BACKGROUND_SURFACE_HIGH, marginTop: 8};
const env0_12 = Reflect.apply(createStyles, value, [object3]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/add_friend/AddFriendModal.tsx');
const MOBILE_TEXT_HEADING_PRIMARY = (Native).colors.MOBILE_TEXT_HEADING_PRIMARY;
copyDataProperties(object2, TextStyles(DISPLAY_EXTRABOLD, MOBILE_TEXT_HEADING_PRIMARY, 24), undefined);
object2['marginTop'] = 32;
object2['marginHorizontal'] = 16;
object2['textAlign'] = 'center';
object.headerText = object2;
object.subheaderText = {'lineHeight': 18, 'marginVertical': 8, 'marginHorizontal': 16, 'textAlign': 'center'};
object.input = {marginTop: 16};
object.otherOptionsContainer = {'marginTop': 16, 'paddingHorizontal': 16};
const BACKGROUND_SURFACE_HIGH = (Native).colors.BACKGROUND_SURFACE_HIGH;
object.rowContainer = {backgroundColor: BACKGROUND_SURFACE_HIGH, marginTop: 8};
const env0_12 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('components_native/add_friend/AddFriendModal.tsx');
exports.default = AddFriendModal;
}
function AddFriendModalScene({onSkip, sourceMetadata}) { // fn#96755, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12804:671, offset: 0x021654dd, size: 775 bytes, params: 2, frame: 28
var r9;
var value;
const styles = useStyles();
const value2 = (ContactSyncUtilsModule).useContactSyncAccount();
const binding = env0_4;
const useState = binding.useState;
const value4 = env0_3(Reflect.apply(useState, binding, [!ContactSyncUtilsModule.isContactSyncEnabled(value2)]), 2);
const property = value4[0];
var env0_3 = value4[1];
(UseMountEffect)(_fun96756);
const value5 = (Module01487Module).useNavigation();
var env0_4 = value5;
env0_4.useLayoutEffect(_fun96760, [env0_4.useCallback(_fun96758, [onSkip]), env0_4.useCallback(_fun96759, []),
value5]);
const Text = (TextModule).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const GWMTSE = (require(1244) /* metro dependency 1244: indexNative */).t.GWMTSE;
const items2 = [
<Text
style={styles.headerText}
accessibilityRole="header"
variant="heading-xl/extrabold"
color="mobile-text-heading-primary"
>
{Reflect.apply(string, intl, [GWMTSE])}
</Text>,
];
items2[1] = (
<Text
style={styles.subheaderText}
variant="text-sm/medium"
color="text-default"
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['Rn/sLl'])}
</Text>
);
items2[2] = ((Component) => <Component style={styles.input} autoFocusInput={false} />)(importDefault(12616) /* metro dependency 12616: AddFriendById */);
const text = (
<Text
accessibilityRole="header"
variant="eyebrow"
color="text-default"
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.dukg0Z)}
</Text>
);
if (property) {
value = importDefault(12618) /* metro dependency 12618: ContactSyncUpsellCTA */;
value = ((Component) => <Component style={styles.rowContainer} location="Add Friend Modal" />)(value);
r9 = value;
} else {
r9 = null;
}
items2[3] = (
<View style={styles.otherOptionsContainer}>
{text}
{r9}
</View>
);
return (
<ScrollView keyboardShouldPersistTaps="handled">
{items2}
</ScrollView>
);
function _fun96756() { // fn#96756, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12804:855, offset: 0x021657e4, size: 100 bytes, params: 1, frame: 16
var environment;
let value = environment.__proto__;
const defaultImport = AnalyticsUtils;
const track = defaultImport.track;
const FRIEND_ADD_VIEWED = AnalyticEvents.FRIEND_ADD_VIEWED;
Reflect.apply(track, defaultImport, [FRIEND_ADD_VIEWED, sourceMetadata]);
value = require(11997) /* metro dependency 11997: ContactSyncUtils */;
value = value.checkContactPermissions();
value.then(_fun96757);
function _fun96757(a0) { // fn#96757, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12804:939, offset: 0x02165848, size: 133 bytes, params: 2, frame: 14
var isContactSyncEnabled;
var value4;
let value = environment.__proto__.__proto__;
const NOT_DETERMINED = ContactPermissions.NOT_DETERMINED;
let r2 = a0 === NOT_DETERMINED || (require(477) /* metro dependency 477: PlatformUtils */).isAndroid() && a0 === ContactPermissions.UNAUTHORIZED;
if (!r2) {
value = require(11997) /* metro dependency 11997: ContactSyncUtils */;
isContactSyncEnabled = value.isContactSyncEnabled;
value4 = environment.__proto__;
value = !Reflect.apply(isContactSyncEnabled, value, [env1_2]);
r2 = value;
}
value = environment.__proto__;
env1_3(r2);
}
}
function _fun96758() { // fn#96758, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12804:1114, offset: 0x021658cd, size: 60 bytes, params: 1, frame: 11
if (onSkip != null) {
onSkip();
}
const value = environment.__proto__;
(ModalActionCreators).pop();
}
function _fun96759() { // fn#96759, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12804:1171, offset: 0x02165909, size: 222 bytes, params: 1, frame: 19
let value = environment.__proto__;
const currentUser = UserStore.getCurrentUser();
const value3 = undefined;
const r8 = currentUser != null ? (importDefault(3995) /* metro dependency 3995: UserUtils */).getUserTag(currentUser) : value3;
const defaultImport2 = AnalyticsUtils;
const track = defaultImport2.track;
const FRIEND_ADD_VIEWED = AnalyticEvents.FRIEND_ADD_VIEWED;
Reflect.apply(track, defaultImport2, [FRIEND_ADD_VIEWED, {'friend_add_type': 'Invite',
'source_page': 'Add Friend Modal'}]);
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
value = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['6E9a1J'],
{url: 'https://discord.com/', username: r8});
ShowShareActionSheetAndroidModule.showShareActionSheet({message: value}, 'Add Friend Modal');
return value3;
}
function _fun96760() { // fn#96760, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12804:1531, offset: 0x021659e7, size: 81 bytes, params: 1, frame: 15
const binding = env0_4;
const setOptions = binding.setOptions;
const object = {headerRight: headerRight_96761};
object.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton(env0_5);
Reflect.apply(setOptions, binding, [object]);
function headerRight_96761() { // fn#96761, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12804:1562, offset: 0x02165a38, size: 127 bytes, params: 1, frame: 18
const HeaderActionButton = (HeaderActionButtonNativeModule).HeaderActionButton;
const headerActionButtonProps = {source: Module12615, onPress: env1_6};
const intl = (IndexNativeModule).intl;
const string = intl.string;
const RDE0Sc = (IndexNativeModule).t.RDE0Sc;
headerActionButtonProps.accessibilityLabel = Reflect.apply(string, intl, [RDE0Sc]);
return <HeaderActionButton {...headerActionButtonProps} />;
}
}
function AddFriendModalScene({onSkip, sourceMetadata}) { // fn#96755, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12804:671, offset: 0x021654dd, size: 775 bytes, params: 2, frame: 28
var r9;
var value;
const styles = useStyles();
const value2 = (require(11997) /* metro dependency 11997: ContactSyncUtils */).useContactSyncAccount();
const binding = env0_4;
const useState = binding.useState;
const contactSyncUtilsModule = require(11997) /* metro dependency 11997: ContactSyncUtils */;
const value4 = env0_3(Reflect.apply(useState, binding, [!contactSyncUtilsModule.isContactSyncEnabled(value2)]), 2);
const property = value4[0];
var env0_3 = value4[1];
(importDefault(4594) /* metro dependency 4594: useMountEffect */)(_fun96756);
const value5 = (require(1487) /* metro dependency 1487 */).useNavigation();
var env0_4 = value5;
env0_4.useLayoutEffect(_fun96760, [env0_4.useCallback(_fun96758, [onSkip]), env0_4.useCallback(_fun96759, []),
value5]);
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const GWMTSE = (require(1244) /* metro dependency 1244: indexNative */).t.GWMTSE;
const items2 = [<Text style={styles.headerText} accessibilityRole="header" variant="heading-xl/extrabold" color="mobile-text-heading-primary">{Reflect.apply(string,
intl, [GWMTSE])}</Text>];
items2[1] = <Text style={styles.subheaderText} variant="text-sm/medium" color="text-default">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['Rn/sLl'])}</Text>;
items2[2] = ((Component) => <Component style={styles.input} autoFocusInput={false} />)(importDefault(12616) /* metro dependency 12616: AddFriendById */);
const text = <Text accessibilityRole="header" variant="eyebrow" color="text-default">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.dukg0Z)}</Text>;
if (property) {
value = importDefault(12618) /* metro dependency 12618: ContactSyncUpsellCTA */;
value = ((Component) => <Component style={styles.rowContainer} location="Add Friend Modal" />)(value);
r9 = value;
} else {
r9 = null;
}
items2[3] = <View style={styles.otherOptionsContainer}>{text}{r9}</View>;
return (
<ScrollView keyboardShouldPersistTaps="handled">
{items2}
</ScrollView>
);
}
function AddFriendModal(a0) { // fn#96762, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12804:2419, offset: 0x02165ab7, size: 128 bytes, params: 2, frame: 18
const env0_0 = a0;
const top = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().top;
const value2 = env0_4.useMemo(_fun96763, [a0]);
const Navigator = (require(5280) /* metro dependency 5280: NavigatorNative */).Navigator;
return (
<Navigator
screens={value2}
initialRouteName="ADD_FRIEND"
headerStatusBarHeight={top}
/>
);
}
function AddFriendModal(a0) { // fn#96762, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12804:2419, offset: 0x02165ab7, size: 128 bytes, params: 2, frame: 18
const env0_0 = a0;
const top = (UseSafeAreaInsetsNative)().top;
const value2 = ReactModule.useMemo(_fun96763, [a0]);
const Navigator = (NavigatorNativeModule).Navigator;
return (
<Navigator
screens={value2}
initialRouteName="ADD_FRIEND"
headerStatusBarHeight={top}
/>
);
function _fun96763() { // fn#96763, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12804:2480, offset: 0x02165b37, size: 25 bytes, params: 1, frame: 11
return ((a0) => {
var object2 = {ignoreKeyboard: true};
object2.title = (require(1244) /* metro dependency 1244: indexNative */).intl.string((require(1244) /* metro dependency 1244: indexNative */).t.w5uwoI);
object2.initialParams = a0;
object2.render = _fun96765;
return {ADD_FRIEND: object2};
})(env0_0);
function getScreens_96764(a0) { // fn#96764, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12804:2484, offset: 0x02165b50, size: 104 bytes, params: 2, frame: 16
const object2 = {ignoreKeyboard: true};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.w5uwoI);
object2.initialParams = a0;
object2.render = render_96765;
return {ADD_FRIEND: object2};
function getScreens_96764Render(a0) { // fn#96765, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12804:2613, owner: getScreens_96764.render, offset: 0x02165bb8, size: 33 bytes, params: 2, frame: 13
return <AddFriendModalScene {...a0} />;
}
function _fun96756() { // fn#96756, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12804:855, offset: 0x021657e4, size: 100 bytes, params: 1, frame: 16
var environment;
let value = environment.__proto__;
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const FRIEND_ADD_VIEWED = AnalyticEvents.FRIEND_ADD_VIEWED;
Reflect.apply(track, defaultImport, [FRIEND_ADD_VIEWED, sourceMetadata]);
value = require(11997) /* metro dependency 11997: ContactSyncUtils */;
value = value.checkContactPermissions();
value.then(_fun96757);
}
}
}
function _fun96758() { // fn#96758, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12804:1114, offset: 0x021658cd, size: 60 bytes, params: 1, frame: 11
if (onSkip != null) {
onSkip();
}
const value = environment.__proto__;
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop();
}
function _fun96759() { // fn#96759, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12804:1171, offset: 0x02165909, size: 222 bytes, params: 1, frame: 19
let value = environment.__proto__;
const currentUser = UserStore.getCurrentUser();
const value3 = undefined;
const r8 = currentUser != null ? (importDefault(3995) /* metro dependency 3995: UserUtils */).getUserTag(currentUser) : value3;
const defaultImport2 = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport2.track;
const FRIEND_ADD_VIEWED = AnalyticEvents.FRIEND_ADD_VIEWED;
Reflect.apply(track, defaultImport2, [FRIEND_ADD_VIEWED, {'friend_add_type': 'Invite',
'source_page': 'Add Friend Modal'}]);
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
value = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['6E9a1J'],
{url: 'https://discord.com/', username: r8});
const showShareActionSheetAndroidModule = require(9212) /* metro dependency 9212: showShareActionSheetAndroid */;
showShareActionSheetAndroidModule.showShareActionSheet({message: value}, 'Add Friend Modal');
return value3;
}
function _fun96760() { // fn#96760, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12804:1531, offset: 0x021659e7, size: 81 bytes, params: 1, frame: 15
const binding = env0_4;
const setOptions = binding.setOptions;
const object2 = {headerRight: headerRight_96761};
object2.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton(env0_5);
Reflect.apply(setOptions, binding, [object2]);
}
function _fun96763() { // fn#96763, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12804:2480, offset: 0x02165b37, size: 25 bytes, params: 1, frame: 11
return ((a0) => {
var object2 = {ignoreKeyboard: true};
object2.title = (require(1244) /* metro dependency 1244: indexNative */).intl.string((require(1244) /* metro dependency 1244: indexNative */).t.w5uwoI);
object2.initialParams = a0;
object2.render = _fun96765;
return {ADD_FRIEND: object2};
})(env0_0);
}
function _fun96757(a0) { // fn#96757, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12804:939, offset: 0x02165848, size: 133 bytes, params: 2, frame: 14
var isContactSyncEnabled;
var value4;
let value = environment.__proto__.__proto__;
const NOT_DETERMINED = ContactPermissions.NOT_DETERMINED;
let r2 = a0 === NOT_DETERMINED || (require(477) /* metro dependency 477: PlatformUtils */).isAndroid() && a0 === ContactPermissions.UNAUTHORIZED;
if (!r2) {
value = require(11997) /* metro dependency 11997: ContactSyncUtils */;
isContactSyncEnabled = value.isContactSyncEnabled;
value4 = environment.__proto__;
value = !Reflect.apply(isContactSyncEnabled, value, [env1_2]);
r2 = value;
}
value = environment.__proto__;
env1_3(r2);
}
function headerRight_96761() { // fn#96761, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12804:1562, offset: 0x02165a38, size: 127 bytes, params: 1, frame: 18
const HeaderActionButton = (require(5277) /* metro dependency 5277: HeaderActionButtonNative */).HeaderActionButton;
const headerActionButtonProps = {source: importDefault(12615) /* metro dependency 12615 */, onPress: env1_6};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const RDE0Sc = (require(1244) /* metro dependency 1244: indexNative */).t.RDE0Sc;
headerActionButtonProps.accessibilityLabel = Reflect.apply(string, intl, [RDE0Sc]);
return <HeaderActionButton {...headerActionButtonProps} />;
}
function getScreens_96764(a0) { // fn#96764, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12804:2484, offset: 0x02165b50, size: 104 bytes, params: 2, frame: 16
const object = {ignoreKeyboard: true};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.w5uwoI);
object.initialParams = a0;
object.render = render_96765;
return {ADD_FRIEND: object};
}
function getScreens_96764Render(a0) { // fn#96765, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12804:2613, owner: getScreens_96764.render, offset: 0x02165bb8, size: 33 bytes, params: 2, frame: 13
return <AddFriendModalScene {...a0} />;
}
global.__d(_fun96754, 12614, [57, 31, 27, 1878, 661, 11995, 33, 4501, 6597, 697, 11997, 4594, 683, 477, 1487, 5080,
3995, 1244, 9212, 5277, 12615, 5282, 4573, 12616, 12618, 1585, 5280,
2]) /* metro module 12614, dependencies: [57, 31, 27, 1878, 661, 11995, 33, 4501, 6597, 697, 11997, 4594, 683, 477, 1487, 5080, 3995, 1244, 9212, 5277, 12615, 5282, 4573, 12616, 12618, 1585, 5280, 2] */;
@@ -1,30 +1,33 @@
/* Metro module 12613; source: components_native/add_friend/AddFriendModalActionCreators.tsx; dependencies: [1878, 5080, 12614, 1962, 2] */
import UserStore from '../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun96751(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#96751, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12803:6, offset: 0x021651b9, size: 139 bytes, params: 8, frame: 19
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
object2 = {openAddFriendModalDeeplink: openAddFriendModalDeeplink, openAddFriendModal: openAddFriendModal};
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/add_friend/AddFriendModalActionCreators.tsx');
exports.default = object2;
}
function openAddFriendModalDeeplink() { // fn#96752, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12803:109, offset: 0x02165244, size: 72 bytes, params: 1, frame: 15
const defaultImport = importDefault(dependencyMap[1]);
defaultImport.pushLazy(require(dependencyMap[3])(dependencyMap[2], dependencyMap.paths));
}
function openAddFriendModal(a0) { // fn#96753, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12803:179, offset: 0x0216528c, size: 104 bytes, params: 2, frame: 15
var defaultImport;
var pushLazy;
var value;
if (UserStore.getCurrentUser() != null) {
defaultImport = importDefault(dependencyMap[1]);
pushLazy = defaultImport.pushLazy;
value = require(dependencyMap[3]);
value = value(dependencyMap[2], dependencyMap.paths);
Reflect.apply(pushLazy, defaultImport, [value, {sourceMetadata: a0}]);
object = {openAddFriendModalDeeplink: openAddFriendModalDeeplink, openAddFriendModal: openAddFriendModal};
(FileImportTrackerModule).fileFinishedImporting('components_native/add_friend/AddFriendModalActionCreators.tsx');
exports.default = object;
function openAddFriendModalDeeplink() { // fn#96752, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12803:109, offset: 0x02165244, size: 72 bytes, params: 1, frame: 15
const defaultImport = importDefault(dependencyMap[1]);
defaultImport.pushLazy(require(dependencyMap[3])(dependencyMap[2], dependencyMap.paths));
}
function openAddFriendModal(a0) { // fn#96753, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12803:179, offset: 0x0216528c, size: 104 bytes, params: 2, frame: 15
var defaultImport;
var pushLazy;
var value;
if (UserStore.getCurrentUser() != null) {
defaultImport = importDefault(dependencyMap[1]);
pushLazy = defaultImport.pushLazy;
value = require(dependencyMap[3]);
value = value(dependencyMap[2], dependencyMap.paths);
Reflect.apply(pushLazy, defaultImport, [value, {sourceMetadata: a0}]);
}
}
}
global.__d(_fun96751, 12613, [1878, 5080, 12614, 1962,
2]) /* metro module 12613, dependencies: [1878, 5080, 12614, 1962, 2] */;
+166 -154
View File
@@ -1,174 +1,186 @@
/* Metro module 10749; source: components_native/calls/CallPTTButton.tsx; dependencies: [57, 31, 1379, 4259, 4294, 661, 33, 4501, 697, 4000, 566, 10659, 10665, 10750, 5321, 4017, 1305, 1244, 2] */
import Module00057 from '../../by-id/module-00057.js'; /* Metro dependency 57 */
import ChannelStore from '../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import MediaEngineStore from '../../stores/MediaEngineStore.tsx'; /* Metro dependency 4259 */
import RTCConnectionStore from '../../stores/RTCConnectionStore.tsx'; /* Metro dependency 4294 */
import UseCanSpeakInChannel from '../../modules/stage_channels/useCanSpeakInChannel.tsx'; /* Metro dependency 10659 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as FluxModule from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as ColorUtilsModule from '../../utils/ColorUtils.tsx'; /* Metro dependency 4000 */
import * as CreateStylesModule from '../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
function _fun82650(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#82650, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10935:6, offset: 0x01efd291, size: 568 bytes, params: 8, frame: 28
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const mediaEngineStore = importDefault(4259) /* metro dependency 4259: MediaEngineStore */;
const rtcConnectionStore = importDefault(4294) /* metro dependency 4294: RTCConnectionStore */;
const env0_8 = (require(661) /* metro dependency 661: Constants */).InputModes;
const env0_9 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const object = {};
object.button = {margin: 13};
const object3 = {};
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object3.overflow = 'hidden';
const colorUtilsModule = require(4000) /* metro dependency 4000: ColorUtils */;
let hexWithOpacity = colorUtilsModule.hexWithOpacity;
let value = ReactModule;
const createStyles = CreateStylesModule.createStyles;
const object2 = {};
object2.button = {margin: 13};
const object4 = {};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object4.overflow = 'hidden';
let hexWithOpacity = ColorUtilsModule.hexWithOpacity;
const WHITE = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE;
object3.backgroundColor = Reflect.apply(hexWithOpacity, colorUtilsModule, [WHITE, 0.24]);
object.container = object3;
object.buttonBlur = {backgroundColor: 'transparent'};
const value4 = colorUtilsModule;
hexWithOpacity = value4.hexWithOpacity;
object4.backgroundColor = Reflect.apply(hexWithOpacity, ColorUtilsModule, [WHITE, 0.24]);
object2.container = object4;
object2.buttonBlur = {backgroundColor: 'transparent'};
hexWithOpacity = ColorUtilsModule.hexWithOpacity;
const BLACK = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BLACK;
object.buttonBlurPressed = {backgroundColor: Reflect.apply(hexWithOpacity, value4, [BLACK, 0.6])};
object.textStyle = {fontSize: 16};
object2.buttonBlurPressed = {backgroundColor: Reflect.apply(hexWithOpacity, ColorUtilsModule, [BLACK, 0.6])};
object2.textStyle = {fontSize: 16};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object.brandButtonContainer = {backgroundColor: BACKGROUND_BASE_LOW};
const env0_11 = Reflect.apply(createStyles, createStylesModule, [object]);
object2.brandButtonContainer = {backgroundColor: BACKGROUND_BASE_LOW};
const env0_11 = Reflect.apply(createStyles, CreateStylesModule, [object2]);
const env0_12 = {code: 'function CallPTTButtonTsx1(){const{runOnJS,setDragging}=this.__closure;runOnJS(setDragging)(false);}'};
const env0_13 = {code: 'function CallPTTButtonTsx2(){const{runOnJS,setDragging,setPressed,setIsSwipeToChatDisabled}=this.__closure;runOnJS(setDragging)(true);runOnJS(setPressed)(false);if(setIsSwipeToChatDisabled!=null){runOnJS(setIsSwipeToChatDisabled)(false);}}'};
value = value.memo(_fun82651);
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/calls/CallPTTButton.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/calls/CallPTTButton.tsx');
exports.default = value;
exports.CallPTTButtonLooks = {BRAND: 'brand', BLUR: 'blur'};
}
function _fun82651({look = env0_10.BRAND, style, sendCallback, stopCallback}) { // fn#82651, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10935:1027, offset: 0x01efd4c9, size: 1019 bytes, params: 2, frame: 34
var r0;
var GestureDetector;
var View;
var object3;
var Button;
var intl;
const env0_3 = undefined;
let env0_4 = undefined;
const styles = useStyles();
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStores = fluxModule.useStateFromStores;
let object = [MediaEngineStore];
const mode = Reflect.apply(useStateFromStores, fluxModule, [object, function() {
return MediaEngineStore.getMode();
}]);
const channelId = fluxModule.useStateFromStores([RTCConnectionStore], function() {
return RTCConnectionStore.getChannelId();
});
const value4 = fluxModule.useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channelId);
}, [channelId]);
const value5 = (importDefault(10659) /* metro dependency 10659: useCanSpeakInChannel */)(channelId);
const binding = env0_4;
let useState = binding.useState;
const value6 = Reflect.apply(useState, binding, [false]);
const binding2 = env0_3;
const value7 = binding2(value6, 2);
const property = value7[0];
const property2 = value7[1];
env0_4 = property2;
useState = binding.useState;
const value8 = binding2(Reflect.apply(useState, binding, [false]), 2);
const property3 = value8[0];
const property4 = value8[1];
let r7 = value4?.isGuildStageVoice() && !value5;
const value11 = env0_4.useRef(false);
const setIsSwipeToChatDisabled = (require(10665) /* metro dependency 10665: VoiceChatModalContext */).useVoiceChatNavigationContext()?.setIsSwipeToChatDisabled;
env0_4.useEffect(_fun82655, [value11, property, property3, sendCallback, stopCallback]);
const Gesture = (require(5321) /* metro dependency 5321 */).Gesture;
const value13 = Gesture.Pan();
const onStart = value13.onStart;
let closure = G_82656;
closure.__closure = {runOnJS: (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS,
setDragging: property4, setPressed: property2, setIsSwipeToChatDisabled: setIsSwipeToChatDisabled};
closure.__workletHash = 10056118853836;
closure.__initData = env0_13;
const value14 = Reflect.apply(onStart, value13, [closure]);
const onEnd = value14.onEnd;
closure = F_82657;
closure.__closure = {runOnJS: (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS,
setDragging: property4};
closure.__workletHash = 8439106360958;
closure.__initData = env0_12;
if (channelId == null) {
r0 = null;
} else if (InputModes.VOICE_ACTIVITY === mode) {
r0 = null;
} else if (r7) {
r0 = null;
} else {
if (look === env0_10.BRAND) {
r7 = [styles.brandButtonContainer];
look = [styles.button, style];
function _fun82651({look = env0_10.BRAND, style, sendCallback, stopCallback}) { // fn#82651, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10935:1027, offset: 0x01efd4c9, size: 1019 bytes, params: 2, frame: 34
var r0;
var GestureDetector;
var View;
var object2;
var Button;
var intl;
const env0_3 = undefined;
let env0_4 = undefined;
const styles = useStyles();
const useStateFromStores = FluxModule.useStateFromStores;
let object = [MediaEngineStore];
const mode = Reflect.apply(useStateFromStores, FluxModule, [object, function() {
return MediaEngineStore.getMode();
}]);
const channelId = FluxModule.useStateFromStores([RTCConnectionStore], function() {
return RTCConnectionStore.getChannelId();
});
const value4 = FluxModule.useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channelId);
}, [channelId]);
const value5 = (UseCanSpeakInChannel)(channelId);
const binding = env0_4;
let useState = binding.useState;
const value6 = Reflect.apply(useState, binding, [false]);
const binding2 = env0_3;
const value7 = binding2(value6, 2);
const property = value7[0];
const property2 = value7[1];
env0_4 = property2;
useState = binding.useState;
const value8 = binding2(Reflect.apply(useState, binding, [false]), 2);
const property3 = value8[0];
const property4 = value8[1];
let r7 = value4?.isGuildStageVoice() && !value5;
const value11 = env0_4.useRef(false);
const setIsSwipeToChatDisabled = (require(10665) /* metro dependency 10665: VoiceChatModalContext */).useVoiceChatNavigationContext()?.setIsSwipeToChatDisabled;
env0_4.useEffect(_fun82655, [value11, property, property3, sendCallback, stopCallback]);
const Gesture = (require(5321) /* metro dependency 5321 */).Gesture;
const value13 = Gesture.Pan();
const onStart = value13.onStart;
let closure = G_82656;
closure.__closure = {runOnJS: (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS,
setDragging: property4, setPressed: property2, setIsSwipeToChatDisabled: setIsSwipeToChatDisabled};
closure.__workletHash = 10056118853836;
closure.__initData = env0_13;
const value14 = Reflect.apply(onStart, value13, [closure]);
const onEnd = value14.onEnd;
closure = F_82657;
closure.__closure = {runOnJS: (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS,
setDragging: property4};
closure.__workletHash = 8439106360958;
closure.__initData = env0_12;
if (channelId == null) {
r0 = null;
} else if (InputModes.VOICE_ACTIVITY === mode) {
r0 = null;
} else if (r7) {
r0 = null;
} else {
look = property || property3 ? styles.buttonBlurPressed : styles.buttonBlur;
r7 = [styles.button, styles.container, style];
}
GestureDetector = (require(5321) /* metro dependency 5321 */).GestureDetector;
object = {gesture: Reflect.apply(onEnd, value14, [closure])};
View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
object3 = {style: r7};
Button = (require(1305) /* metro dependency 1305: native */).Button;
var buttonProps = {style: look, textStyle: styles.textStyle};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
buttonProps.text = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.Q8gkVL);
buttonProps.onTouchStart = onTouchStart;
buttonProps.onTouchEnd = onTouchEnd;
buttonProps.darkenOnPress = true;
r0 = <GestureDetector {...object}><View {...object3}><Button {...buttonProps} /></View></GestureDetector>;
}
return r0;
}
function _fun82655() { // fn#82655, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10935:1524, offset: 0x01efd904, size: 118 bytes, params: 1, frame: 13
var value2;
const r1 = env0_3 || env0_5;
if (r1 !== env0_7.current) {
value2 = environment.__proto__;
(require(10750) /* metro dependency 10750: MediaEngineActionCreators */).setPushToTalkState(r1);
if (r1) {
if (sendCallback != null) {
sendCallback();
if (look === env0_10.BRAND) {
r7 = [styles.brandButtonContainer];
look = [styles.button, style];
} else {
look = property || property3 ? styles.buttonBlurPressed : styles.buttonBlur;
r7 = [styles.button, styles.container, style];
}
} else if (stopCallback != null) {
stopCallback();
GestureDetector = (require(5321) /* metro dependency 5321 */).GestureDetector;
object = {gesture: Reflect.apply(onEnd, value14, [closure])};
View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
object2 = {style: r7};
Button = (require(1305) /* metro dependency 1305: native */).Button;
var buttonProps = {style: look, textStyle: styles.textStyle};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
buttonProps.text = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.Q8gkVL);
buttonProps.onTouchStart = onTouchStart;
buttonProps.onTouchEnd = onTouchEnd;
buttonProps.darkenOnPress = true;
r0 = (
<GestureDetector {...object}>
<View {...object2}>
<Button {...buttonProps} />
</View>
</GestureDetector>
);
}
return r0;
function _fun82655() { // fn#82655, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10935:1524, offset: 0x01efd904, size: 118 bytes, params: 1, frame: 13
var value2;
const r1 = env0_3 || env0_5;
if (r1 !== env0_7.current) {
value2 = environment.__proto__;
(require(10750) /* metro dependency 10750: MediaEngineActionCreators */).setPushToTalkState(r1);
if (r1) {
if (sendCallback != null) {
sendCallback();
}
} else if (stopCallback != null) {
stopCallback();
}
}
env0_7.current = r1;
}
function G_82656() { // fn#82656, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10935:1691, offset: 0x01efd97a, size: 127 bytes, params: 1, frame: 17
let value = environment.__proto__;
(require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS(env0_6)(true);
(require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS(env0_4)(false);
if (setIsSwipeToChatDisabled != null) {
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value.runOnJS(setIsSwipeToChatDisabled)(false);
}
}
function F_82657() { // fn#82657, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10935:1936, offset: 0x01efd9f9, size: 51 bytes, params: 1, frame: 12
let value = environment.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value = value.runOnJS(env0_6);
value(false);
}
function onTouchStart() { // fn#82658, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10935:2432, offset: 0x01efda2c, size: 48 bytes, params: 1, frame: 13
env0_4(true);
env0_6(false);
if (setIsSwipeToChatDisabled != null) {
setIsSwipeToChatDisabled(true);
}
}
function onTouchEnd() { // fn#82659, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10935:2482, offset: 0x01efda5c, size: 37 bytes, params: 1, frame: 13
env0_4(false);
if (setIsSwipeToChatDisabled != null) {
setIsSwipeToChatDisabled(false);
}
}
}
env0_7.current = r1;
}
function G_82656() { // fn#82656, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10935:1691, offset: 0x01efd97a, size: 127 bytes, params: 1, frame: 17
let value = environment.__proto__;
(require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS(env0_6)(true);
(require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS(env0_4)(false);
if (setIsSwipeToChatDisabled != null) {
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value.runOnJS(setIsSwipeToChatDisabled)(false);
}
}
function F_82657() { // fn#82657, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10935:1936, offset: 0x01efd9f9, size: 51 bytes, params: 1, frame: 12
let value = environment.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value = value.runOnJS(env0_6);
value(false);
}
function onTouchStart() { // fn#82658, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10935:2432, offset: 0x01efda2c, size: 48 bytes, params: 1, frame: 13
env0_4(true);
env0_6(false);
if (setIsSwipeToChatDisabled != null) {
setIsSwipeToChatDisabled(true);
}
}
function onTouchEnd() { // fn#82659, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10935:2482, offset: 0x01efda5c, size: 37 bytes, params: 1, frame: 13
env0_4(false);
if (setIsSwipeToChatDisabled != null) {
setIsSwipeToChatDisabled(false);
}
}
global.__d(_fun82650, 10749, [57, 31, 1379, 4259, 4294, 661, 33, 4501, 697, 4000, 566, 10659, 10665, 10750, 5321,
4017, 1305, 1244,
2]) /* metro module 10749, dependencies: [57, 31, 1379, 4259, 4294, 661, 33, 4501, 697, 4000, 566, 10659, 10665, 10750, 5321, 4017, 1305, 1244, 2] */;
@@ -1,351 +1,404 @@
/* Metro module 10864; source: components_native/calls/RTCDebugOverlay.tsx; dependencies: [31, 27, 1379, 1867, 4294, 10865, 4395, 1878, 4291, 33, 4501, 4000, 697, 1305, 566, 4805, 10867, 10866, 694, 6618, 4578, 1244, 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 GuildStore from '../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import UserStore from '../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import RTCConnectionStore from '../../stores/RTCConnectionStore.tsx'; /* Metro dependency 4294 */
import StreamRTCConnectionStore from '../../stores/StreamRTCConnectionStore.tsx'; /* Metro dependency 4395 */
import RTCDebugStore from '../../stores/RTCDebugStore.tsx'; /* Metro dependency 10865 */
import RTCConnectionUtils from '../../utils/RTCConnectionUtils.tsx'; /* Metro dependency 10867 */
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 FluxModule from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as IndexNativeModule from '../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as NativeModule from '../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as ColorUtilsModule from '../../utils/ColorUtils.tsx'; /* Metro dependency 4000 */
import * as ConstantsModule from '../../external/discord_common/js/packages/media-engine/Constants.tsx'; /* Metro dependency 4291 */
import * as CreateStylesModule from '../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as ButtonNativeModule from '../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as SafeAreaViewModule from '../common/SafeAreaView.tsx'; /* Metro dependency 6618 */
import * as RTCDebugActionCreatorsModule from '../../actions/RTCDebugActionCreators.tsx'; /* Metro dependency 10866 */
function _fun83197(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83197, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11050:6, offset: 0x01f10f6e, size: 700 bytes, params: 8, frame: 27
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const StyleSheet = value2.StyleSheet;
const env0_5 = value2.View;
const env0_6 = value2.ScrollView;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const rtcConnectionStore = importDefault(4294) /* metro dependency 4294: RTCConnectionStore */;
const rtcDebugStore = importDefault(10865) /* metro dependency 10865: RTCDebugStore */;
const streamRTCConnectionStore = importDefault(4395) /* metro dependency 4395: StreamRTCConnectionStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const MediaEngineContextTypes = (require(4291) /* metro dependency 4291: Constants */).MediaEngineContextTypes;
const value3 = require(33) /* metro dependency 33 */;
const env0_14 = value3.jsx;
const env0_15 = value3.jsxs;
const env0_16 = value3.Fragment;
const StyleSheet = ReactNativeModule.StyleSheet;
const MediaEngineContextTypes = (ConstantsModule).MediaEngineContextTypes;
const asString_83212 = function(a0) {
return String(a0);
};
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object3 = {};
const object4 = {};
copyDataProperties(object4, StyleSheet.absoluteFillObject, undefined);
const colorUtilsModule = require(4000) /* metro dependency 4000: ColorUtils */;
const hexWithOpacity = colorUtilsModule.hexWithOpacity;
const BLACK = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BLACK;
object4['backgroundColor'] = Reflect.apply(hexWithOpacity, colorUtilsModule, [BLACK, 0.7]);
object3.container = object4;
object3.scroller = {'flex': 1, 'margin': 8};
object3.indent = {marginLeft: 16};
object3.row = {flexDirection: 'row'};
const WHITE = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE;
object3.text = {color: WHITE, fontSize: 14};
object3.buttonClose = {'flexGrow': 0, 'margin': 8};
const env0_18 = Reflect.apply(createStyles, createStylesModule, [object3]);
const env0_19 = value.memo(_fun83213);
const env0_20 = value.memo(_fun83214);
object3 = {};
const createStyles = CreateStylesModule.createStyles;
object = {};
const object2 = {};
copyDataProperties(object2, StyleSheet.absoluteFillObject, undefined);
const hexWithOpacity = ColorUtilsModule.hexWithOpacity;
const BLACK = (Native).unsafe_rawColors.BLACK;
object2['backgroundColor'] = Reflect.apply(hexWithOpacity, ColorUtilsModule, [BLACK, 0.7]);
object.container = object2;
object.scroller = {'flex': 1, 'margin': 8};
object.indent = {marginLeft: 16};
object.row = {flexDirection: 'row'};
const WHITE = (Native).unsafe_rawColors.WHITE;
object.text = {color: WHITE, fontSize: 14};
object.buttonClose = {'flexGrow': 0, 'margin': 8};
const env0_18 = Reflect.apply(createStyles, CreateStylesModule, [object]);
const env0_19 = ReactModule.memo(_fun83213);
const env0_20 = ReactModule.memo(_fun83214);
object = {};
const DEFAULT = MediaEngineContextTypes.DEFAULT;
object3[DEFAULT] = DefaultContextInfo;
object[DEFAULT] = DefaultContextInfo;
const STREAM = MediaEngineContextTypes.STREAM;
object3[STREAM] = StreamContextInfo;
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/calls/RTCDebugOverlay.tsx');
object[STREAM] = StreamContextInfo;
(FileImportTrackerModule).fileFinishedImporting('components_native/calls/RTCDebugOverlay.tsx');
exports.default = RTCDebugOverlay;
}
function Text(a0) { // fn#83198, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11050:636, offset: 0x01f1122a, size: 77 bytes, params: 2, frame: 15
const styles = useStyles();
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
return <LegacyText {...a0} {...{['style']: styles.text}} />;
}
function Section({title, children}) { // fn#83199, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11050:714, offset: 0x01f11277, size: 122 bytes, params: 2, frame: 20
const styles = useStyles();
return (
<>
<Text>
{title}
{':'}
</Text>
<View style={styles.indent}>
{children}
</View>
</>
);
}
function ObjectKV({obj}) { // fn#83200, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11050:848, offset: 0x01f112f1, size: 66 bytes, params: 2, frame: 12
const env0_0 = useStyles();
const Object = global.Object;
return Object.entries(obj).map(_fun83201);
}
function RTCDebugGeneral() { // fn#83202, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11050:1485, offset: 0x01f1146b, size: 295 bytes, params: 1, frame: 24
const {guildId,
channelId} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([RTCConnectionStore],
function() {
var object = {};
object.guildId = RTCConnectionStore.getGuildId();
object.channelId = RTCConnectionStore.getChannelId();
return object;
}, []);
const fluxModule = require(566) /* metro dependency 566: flux */;
let useStateFromStores = fluxModule.useStateFromStores;
const value3 = Reflect.apply(useStateFromStores, fluxModule, [[GuildStore], function() {
return GuildStore.getGuild(guildId);
}, [guildId]]);
const moduleValue3 = fluxModule;
useStateFromStores = moduleValue3.useStateFromStores;
const value5 = (importDefault(4805) /* metro dependency 4805: useChannelName */)(Reflect.apply(useStateFromStores,
moduleValue3, [[ChannelStore], function() {
return ChannelStore.getChannel(channelId);
}, [channelId]]));
const value = null;
return (
<Section title="general">
<ObjectKV
obj={{guild: {id: guildId, name: value != value3 ? value3.name : value}, channel: {id: channelId,
name: value5}}}
/>
</Section>
);
}
function renderContextInfo(a0) { // fn#83206, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11050:2579, offset: 0x01f115bd, size: 39 bytes, params: 2, frame: 14
const property = env0_21[a0];
const value2 = null;
return value2 != property ? ((Component) => <Component />)(property) : value2;
}
function RTCDebugContext({context}) { // fn#83207, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11050:2648, offset: 0x01f115e4, size: 121 bytes, params: 2, frame: 16
var r0;
let value = (require(566) /* metro dependency 566: flux */).useStateFromStores([RTCDebugStore], function() {
return RTCDebugStore.getAllStats(context);
}, [context]);
if (value == null) {
r0 = null;
} else if (value.length === 0) {
r0 = null;
} else {
value = value.map(_fun83209);
r0 = value;
function Text_83198(a0) { // fn#83198, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11050:636, offset: 0x01f1122a, size: 77 bytes, params: 2, frame: 15
const styles = useStyles();
const LegacyText = (NativeModule).LegacyText;
return <LegacyText {...a0} {...{['style']: styles.text}} />;
}
return r0;
}
function _fun83213({data}) { // fn#83213, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11050:1194, offset: 0x01f11805, size: 88 bytes, params: 2, frame: 17
const type = data.type;
let value = Object.create(null);
value.type = 0;
value = copyDataProperties({}, data, value, undefined);
return (
<Section title={type}>
<ObjectKV obj={value} />
</Section>
);
}
function Section({title, children}) { // fn#83199, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11050:714, offset: 0x01f11277, size: 122 bytes, params: 2, frame: 20
const styles = useStyles();
return (
<>
<Text_83198>
{title}
{':'}
</Text_83198>
<View style={styles.indent}>
{children}
</View>
</>
);
}
function _fun83214({userId, data}) { // fn#83214, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11050:1284, offset: 0x01f1185d, size: 199 bytes, params: 2, frame: 20
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getUser(userId);
}, [userId]);
const value3 = '' + userId;
return (
<Section title={value2 == null ? value3 : value3 + (' (' + value2.toString() + ')')}>
{data.map(_fun83216)}
</Section>
);
}
function DefaultContextInfo() { // fn#83217, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11050:1929, offset: 0x01f11961, size: 86 bytes, params: 1, frame: 17
return (
<ObjectKV
obj={(require(566) /* metro dependency 566: flux */).useStateFromStoresObject([RTCConnectionStore],
_fun83218, [])}
/>
);
}
function StreamContextInfo() { // fn#83219, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11050:2312, offset: 0x01f11a7b, size: 110 bytes, params: 1, frame: 18
return (
<ObjectKV
obj={(require(566) /* metro dependency 566: flux */).useStateFromStoresObject([StreamRTCConnectionStore],
_fun83220, [StreamRTCConnectionStore.getAllActiveStreamKeys()[0]])}
/>
);
}
function RTCDebugOverlay({onClose, style}) { // fn#83221, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11050:3321, offset: 0x01f11b4c, size: 364 bytes, params: 2, frame: 26
const styles = useStyles();
env0_4.useEffect(_fun83222, []);
const SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
const items3 = [styles.container, style];
const items2 = [<RTCDebugGeneral />];
const Object = global.Object;
const value3 = Object.values(MediaEngineContextTypes);
items2[1] = value3.map(_fun83224);
const scrollView = <ScrollView style={styles.scroller} indicatorStyle="white">{items2}</ScrollView>;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<SafeAreaPaddingView
top
left
right
bottom
style={items3}
>
{scrollView}
<View style={styles.buttonClose}>
<Button
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq)}
onPress={onClose}
/>
</View>
</SafeAreaPaddingView>
);
}
function _fun83201(a0) { // fn#83201, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11050:915, offset: 0x01f11333, size: 312 bytes, params: 2, frame: 22
var r0;
var r1;
var r2;
var r9;
var item3;
var value3;
var value4;
var value7;
var object;
var items2;
var value9;
const iterator = a0[Symbol.iterator]();
const iterator2 = iterator.next;
let item2 = Reflect.apply(iterator2, iterator, []);
let item = item2.value;
item2 = item2.done ? undefined : iterator;
const value = undefined;
const value2 = item2 === value;
const r4 = value2 ? value : item;
if (value2) {
r0 = item2;
r1 = value2;
r2 = value;
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
if (value3) {
r0 = item3;
r1 = value3;
r2 = value;
} else {
r0 = item3;
r1 = value3;
r2 = item;
function ObjectKV({obj}) { // fn#83200, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11050:848, offset: 0x01f112f1, size: 66 bytes, params: 2, frame: 12
const env0_0 = useStyles();
const Object = global.Object;
return Object.entries(obj).map(_fun83201);
function _fun83201(a0) { // fn#83201, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11050:915, offset: 0x01f11333, size: 312 bytes, params: 2, frame: 22
var r0;
var r1;
var r2;
var r9;
var item3;
var value3;
var value4;
var value7;
var object2;
var items2;
var value9;
const iterator = a0[Symbol.iterator]();
const iterator2 = iterator.next;
let item2 = Reflect.apply(iterator2, iterator, []);
let item = item2.value;
item2 = item2.done ? undefined : iterator;
const value = undefined;
const value2 = item2 === value;
const r4 = value2 ? value : item;
if (value2) {
r0 = item2;
r1 = value2;
r2 = value;
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
if (value3) {
r0 = item3;
r1 = value3;
r2 = value;
} else {
r0 = item3;
r1 = value3;
r2 = item;
}
}
if (!r1) {
r0.return();
}
const Array = global.Array;
if (Array.isArray(r2)) {
value4 = r2.at(-1);
r9 = typeof (value4 == null ? value : value4.value) !== 'number' ? r2 : r2.at(-1).value;
} else {
r9 = r2;
}
if (r9 == null) {
value7 = environment.__proto__;
var viewProps = {style: styles.row};
items2 = [r4, ': '];
items2[2] = asString_83212(r9);
r0 = (
<View {...viewProps} key={r4}>
<Text_83198>
{items2}
</Text_83198>
</View>
);
} else if (typeof r9 === 'object') {
value9 = environment.__proto__;
r0 = (
<Section title={r4} key={r4}>
<ObjectKV obj={r9} />
</Section>
);
} else {
value7 = environment.__proto__;
var viewProps = {style: styles.row};
items2 = [r4, ': '];
items2[2] = asString_83212(r9);
r0 = (
<View {...viewProps} key={r4}>
<Text_83198>
{items2}
</Text_83198>
</View>
);
}
return r0;
}
}
if (!r1) {
r0.return();
function RTCDebugGeneral() { // fn#83202, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11050:1485, offset: 0x01f1146b, size: 295 bytes, params: 1, frame: 24
const {guildId,
channelId} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([RTCConnectionStore],
function() {
var object = {};
object.guildId = RTCConnectionStore.getGuildId();
object.channelId = RTCConnectionStore.getChannelId();
return object;
}, []);
const fluxModule = require(566) /* metro dependency 566: flux */;
let useStateFromStores = fluxModule.useStateFromStores;
const value3 = Reflect.apply(useStateFromStores, fluxModule, [[GuildStore], function() {
return GuildStore.getGuild(guildId);
}, [guildId]]);
const moduleValue3 = fluxModule;
useStateFromStores = moduleValue3.useStateFromStores;
const value5 = (importDefault(4805) /* metro dependency 4805: useChannelName */)(Reflect.apply(useStateFromStores,
moduleValue3, [[ChannelStore], function() {
return ChannelStore.getChannel(channelId);
}, [channelId]]));
const value = null;
return (
<Section title="general">
<ObjectKV
obj={{guild: {id: guildId, name: value != value3 ? value3.name : value}, channel: {id: channelId,
name: value5}}}
/>
</Section>
);
}
const Array = global.Array;
if (Array.isArray(r2)) {
value4 = r2.at(-1);
r9 = typeof (value4 == null ? value : value4.value) !== 'number' ? r2 : r2.at(-1).value;
} else {
r9 = r2;
function renderContextInfo(a0) { // fn#83206, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11050:2579, offset: 0x01f115bd, size: 39 bytes, params: 2, frame: 14
const property = env0_21[a0];
const value2 = null;
return (
value2 != property
? ((Component) => <Component />)(property)
: value2
);
}
if (r9 == null) {
value7 = environment.__proto__;
var viewProps = {style: styles.row};
items2 = [r4, ': '];
items2[2] = asString_83212(r9);
r0 = <View {...viewProps} key={r4}><Text>{items2}</Text></View>;
} else if (typeof r9 === 'object') {
value9 = environment.__proto__;
r0 = <Section title={r4} key={r4}><ObjectKV obj={r9} /></Section>;
} else {
value7 = environment.__proto__;
var viewProps = {style: styles.row};
items2 = [r4, ': '];
items2[2] = asString_83212(r9);
r0 = <View {...viewProps} key={r4}><Text>{items2}</Text></View>;
function RTCDebugContext({context}) { // fn#83207, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11050:2648, offset: 0x01f115e4, size: 121 bytes, params: 2, frame: 16
var r0;
let value = (require(566) /* metro dependency 566: flux */).useStateFromStores([RTCDebugStore], function() {
return RTCDebugStore.getAllStats(context);
}, [context]);
if (value == null) {
r0 = null;
} else if (value.length === 0) {
r0 = null;
} else {
value = value.map(_fun83209);
r0 = value;
}
return r0;
function _fun83209(a0) { // fn#83209, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11050:2794, offset: 0x01f11678, size: 309 bytes, params: 2, frame: 25
var environment;
const value = environment.__proto__;
const object = {};
const contextBinding = context;
object.title = '' + contextBinding + ' - ' + a0.mediaEngineConnectionId;
const items2 = [renderContextInfo(contextBinding)];
items2[1] = (
<Section title="transport">
<ObjectKV obj={a0.transport} />
</Section>
);
items2[2] = (
<Section title="outbound">
{a0.rtp.outbound.map(_fun83210)}
</Section>
);
const inbound = a0.rtp.inbound;
const Object = global.Object;
const value4 = Object.keys(inbound);
items2[3] = (
value4.length === 0
? null
: (
<Section title="inbound">
{value4.map(_fun83211)}
</Section>
)
);
return (
<Section {...object} key={a0.mediaEngineConnectionId}>
{items2}
</Section>
);
function _fun83210(a0, a1) { // fn#83210, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11050:3029, offset: 0x01f117ad, size: 34 bytes, params: 3, frame: 15
return ((Component) => <Component data={a0} key={a1} />)(env2_19);
}
function _fun83211(a0) { // fn#83211, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11050:3152, offset: 0x01f117cf, size: 46 bytes, params: 2, frame: 15
return ((Component) => <Component userId={a0} data={inbound[a0]} key={a0} />)(env2_20);
}
}
}
return r0;
}
function _fun83209(a0) { // fn#83209, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11050:2794, offset: 0x01f11678, size: 309 bytes, params: 2, frame: 25
var environment;
const value = environment.__proto__;
const object2 = {};
const contextBinding = context;
object2.title = '' + contextBinding + ' - ' + a0.mediaEngineConnectionId;
const items2 = [renderContextInfo(contextBinding)];
items2[1] = <Section title="transport"><ObjectKV obj={a0.transport} /></Section>;
items2[2] = <Section title="outbound">{a0.rtp.outbound.map(_fun83210)}</Section>;
const inbound = a0.rtp.inbound;
const Object = global.Object;
const value4 = Object.keys(inbound);
items2[3] = value4.length === 0 ? null : <Section title="inbound">{value4.map(_fun83211)}</Section>;
return (
<Section {...object2} key={a0.mediaEngineConnectionId}>
{items2}
</Section>
);
}
function _fun83213({data}) { // fn#83213, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11050:1194, offset: 0x01f11805, size: 88 bytes, params: 2, frame: 17
const type = data.type;
let value = Object.create(null);
value.type = 0;
value = copyDataProperties({}, data, value, undefined);
return (
<Section title={type}>
<ObjectKV obj={value} />
</Section>
);
}
function _fun83216(a0, a1) { // fn#83216, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11050:1455, offset: 0x01f1193f, size: 34 bytes, params: 3, frame: 15
return ((Component) => <Component data={a0} key={a1} />)(env1_19);
}
function _fun83214({userId, data}) { // fn#83214, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11050:1284, offset: 0x01f1185d, size: 199 bytes, params: 2, frame: 20
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getUser(userId);
}, [userId]);
const value3 = '' + userId;
return (
<Section title={value2 == null ? value3 : value3 + (' (' + value2.toString() + ')')}>
{data.map(_fun83216)}
</Section>
);
function _fun83216(a0, a1) { // fn#83216, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11050:1455, offset: 0x01f1193f, size: 34 bytes, params: 3, frame: 15
return ((Component) => <Component data={a0} key={a1} />)(env1_19);
}
function _fun83218() { // fn#83218, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11050:2005, offset: 0x01f119b7, size: 196 bytes, params: 1, frame: 14
const object2 = {};
object2.mediaSessionId = RTCConnectionStore.getMediaSessionId();
object2.state = RTCConnectionStore.getState();
const defaultImport = importDefault(10867) /* metro dependency 10867: RTCConnectionUtils */;
const getShortHostname = defaultImport.getShortHostname;
const getHostname = RTCConnectionStore.getHostname;
object2.hostname = Reflect.apply(getShortHostname, defaultImport, [Reflect.apply(getHostname, RTCConnectionStore,
[])]);
object2.quality = RTCConnectionStore.getQuality();
object2.averagePing = RTCConnectionStore.getAveragePing();
object2.lastPing = RTCConnectionStore.getLastPing();
object2.outboundLossRate = RTCConnectionStore.getOutboundLossRate();
object2.duration = RTCConnectionStore.getDuration();
return object2;
}
}
function _fun83220() { // fn#83220, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11050:2419, offset: 0x01f11ae9, size: 99 bytes, params: 1, frame: 14
const object2 = {};
let value = environment.__proto__;
const getMediaSessionId = StreamRTCConnectionStore.getMediaSessionId;
const binding = env0_0;
object2.mediaSessionId = Reflect.apply(getMediaSessionId, StreamRTCConnectionStore, [binding]);
value = importDefault(10867) /* metro dependency 10867: RTCConnectionUtils */;
const getShortHostname = value.getShortHostname;
const getHostname = StreamRTCConnectionStore.getHostname;
object2.hostname = Reflect.apply(getShortHostname, value, [Reflect.apply(getHostname, StreamRTCConnectionStore,
[binding])]);
object2.quality = StreamRTCConnectionStore.getQuality(binding);
return object2;
}
function DefaultContextInfo() { // fn#83217, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11050:1929, offset: 0x01f11961, size: 86 bytes, params: 1, frame: 17
return (
<ObjectKV
obj={(FluxModule).useStateFromStoresObject([RTCConnectionStore],
_fun83218, [])}
/>
);
function _fun83218() { // fn#83218, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11050:2005, offset: 0x01f119b7, size: 196 bytes, params: 1, frame: 14
const object = {};
object.mediaSessionId = RTCConnectionStore.getMediaSessionId();
object.state = RTCConnectionStore.getState();
const defaultImport = RTCConnectionUtils;
const getShortHostname = defaultImport.getShortHostname;
rtcConnectionStoreBinding = RTCConnectionStore;
const getHostname = rtcConnectionStoreBinding.getHostname;
object.hostname = Reflect.apply(getShortHostname, defaultImport, [Reflect.apply(getHostname,
rtcConnectionStoreBinding, [])]);
object.quality = RTCConnectionStore.getQuality();
object.averagePing = RTCConnectionStore.getAveragePing();
object.lastPing = RTCConnectionStore.getLastPing();
object.outboundLossRate = RTCConnectionStore.getOutboundLossRate();
object.duration = RTCConnectionStore.getDuration();
return object;
}
function _fun83222() { // fn#83222, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11050:3397, offset: 0x01f11cb8, size: 46 bytes, params: 1, frame: 11
var environment;
const value = environment.__proto__;
(importAll(10866) /* metro dependency 10866: RTCDebugActionCreators */).open();
return function() {
return importDefault(dependencyMap[18]).wait(importAll(dependencyMap[17]).close);
};
}
}
function _fun83224(a0) { // fn#83224, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11050:3660, offset: 0x01f11d22, size: 31 bytes, params: 2, frame: 15
return <RTCDebugContext context={a0} key={a0} />;
}
function StreamContextInfo() { // fn#83219, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11050:2312, offset: 0x01f11a7b, size: 110 bytes, params: 1, frame: 18
const streamRTCConnectionStoreBinding = StreamRTCConnectionStore;
return (
<ObjectKV
obj={(FluxModule).useStateFromStoresObject([streamRTCConnectionStoreBinding],
_fun83220, [streamRTCConnectionStoreBinding.getAllActiveStreamKeys()[0]])}
/>
);
function _fun83220() { // fn#83220, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11050:2419, offset: 0x01f11ae9, size: 99 bytes, params: 1, frame: 14
const object = {};
let value = environment.__proto__;
const streamRTCConnectionStoreBinding = StreamRTCConnectionStore;
const getMediaSessionId = streamRTCConnectionStoreBinding.getMediaSessionId;
const binding = env0_0;
object.mediaSessionId = Reflect.apply(getMediaSessionId, streamRTCConnectionStoreBinding, [binding]);
value = importDefault(10867) /* metro dependency 10867: RTCConnectionUtils */;
const getShortHostname = value.getShortHostname;
const getHostname = streamRTCConnectionStoreBinding.getHostname;
object.hostname = Reflect.apply(getShortHostname, value, [Reflect.apply(getHostname,
streamRTCConnectionStoreBinding, [binding])]);
object.quality = streamRTCConnectionStoreBinding.getQuality(binding);
return object;
}
function _fun83210(a0, a1) { // fn#83210, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11050:3029, offset: 0x01f117ad, size: 34 bytes, params: 3, frame: 15
return ((Component) => <Component data={a0} key={a1} />)(env2_19);
}
}
function RTCDebugOverlay({onClose, style}) { // fn#83221, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11050:3321, offset: 0x01f11b4c, size: 364 bytes, params: 2, frame: 26
const styles = useStyles();
env0_4.useEffect(_fun83222, []);
const SafeAreaPaddingView = (SafeAreaViewModule).SafeAreaPaddingView;
const items3 = [styles.container, style];
const items2 = [
<RTCDebugGeneral />,
];
const Object = global.Object;
const value3 = Object.values(MediaEngineContextTypes);
items2[1] = value3.map(_fun83224);
const scrollView = (
<ScrollView style={styles.scroller} indicatorStyle="white">
{items2}
</ScrollView>
);
const Button = (ButtonNativeModule).Button;
const intl = (IndexNativeModule).intl;
return (
<SafeAreaPaddingView
top
left
right
bottom
style={items3}
>
{scrollView}
<View style={styles.buttonClose}>
<Button
text={intl.string((IndexNativeModule).t.cpT0Cq)}
onPress={onClose}
/>
</View>
</SafeAreaPaddingView>
);
function _fun83222() { // fn#83222, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11050:3397, offset: 0x01f11cb8, size: 46 bytes, params: 1, frame: 11
var environment;
const value = environment.__proto__;
(RTCDebugActionCreatorsModule).open();
return function() {
return importDefault(dependencyMap[18]).wait(importAll(dependencyMap[17]).close);
};
}
function _fun83224(a0) { // fn#83224, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11050:3660, offset: 0x01f11d22, size: 31 bytes, params: 2, frame: 15
return <RTCDebugContext context={a0} key={a0} />;
}
}
function _fun83211(a0) { // fn#83211, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11050:3152, offset: 0x01f117cf, size: 46 bytes, params: 2, frame: 15
return ((Component) => <Component userId={a0} data={inbound[a0]} key={a0} />)(env2_20);
}
global.__d(_fun83197, 10864, [31, 27, 1379, 1867, 4294, 10865, 4395, 1878, 4291, 33, 4501, 4000, 697, 1305, 566,
4805, 10867, 10866, 694, 6618, 4578, 1244,
2]) /* metro module 10864, dependencies: [31, 27, 1379, 1867, 4294, 10865, 4395, 1878, 4291, 33, 4501, 4000, 697, 1305, 566, 4805, 10867, 10866, 694, 6618, 4578, 1244, 2] */;
@@ -1,114 +1,125 @@
/* Metro module 15698; source: components_native/calls/stream/StreamFeedbackActionSheet.tsx; dependencies: [31, 1226, 661, 9906, 33, 7128, 566, 1244, 2454, 9909, 15699, 683, 15559, 15700, 4080, 15701, 1962, 3856, 2] */
import AnalyticsUtils from '../../../utils/AnalyticsUtils.tsx'; /* Metro dependency 683 */
import AuthenticationStore from '../../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */
import FeedbackMessages from '../../../modules/feedback/intl/Feedback.messages.js'; /* Metro dependency 2454 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as StreamerApplicationSelectorsModule from '../../../modules/go_live/utils/StreamerApplicationSelectors.tsx'; /* Metro dependency 7128 */
import * as ConstantsModule2 from '../../../modules/feedback/Constants.tsx'; /* Metro dependency 9906 */
function _fun120498(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#120498, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15906:6, offset: 0x0252c980, size: 218 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const env0_4 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
const constantsModule = require(9906) /* metro dependency 9906: Constants */;
ReactModule;
const constantsModule = ConstantsModule2;
const env0_5 = constantsModule.FeedbackCategory;
const env0_6 = constantsModule.FeedbackType;
const env0_7 = constantsModule.StreamFeedbackOption;
const env0_8 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/calls/stream/StreamFeedbackActionSheet.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/calls/stream/StreamFeedbackActionSheet.tsx');
exports.default = StreamFeedbackActionSheet;
}
function StreamFeedbackActionSheet({stream, analyticsData}) { // fn#120499, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15906:331, offset: 0x0252ca5a, size: 661 bytes, params: 2, frame: 25
var object3;
const env0_2 = (StreamerApplicationSelectorsModule).useGetStreamApplication(stream);
const value2 = (FluxModule).useStateFromStores([AuthenticationStore], _fun120500);
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const value3 = Reflect.apply(string, intl, [(require(1244) /* metro dependency 1244: indexNative */).t['5smP3R']]);
const value4 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['0uxA2V']);
string = intl.string;
const CqjnLN = (require(1244) /* metro dependency 1244: indexNative */).t.CqjnLN;
const value5 = Reflect.apply(string, intl, [CqjnLN]);
object3 = {};
object3.value = value2 ? FeedbackCategory.STREAMING : FeedbackCategory.STREAM_WATCHING;
string = intl.string;
const defaultImport = FeedbackMessages;
object3.label = Reflect.apply(string, intl, [value2 ? defaultImport['0ZBLiZ'] : defaultImport.TVTIT1]);
object3.problemsHeader = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['6Y1t5P']);
object3.problemOptions = (require(9909) /* metro dependency 9909: FeedbackUtils */).getStreamFeedbackOptions({isStreamer: value2});
const object = {};
const FREEFORM = StreamFeedbackOption.FREEFORM;
object.value = FREEFORM;
object.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.emlT91);
object3.freeformConfig = object;
return ((Component) => <Component headerLabel={value3} showHeaderCloseButton ratingBody={value2 ? value4 : value5} categoriesHeader={intl.string(defaultImport.tq8598)} optionsTree={[object3]} trackOpen={trackOpen_120501} trackReport={trackReport_120502} />)(importDefault(15699) /* metro dependency 15699: FeedbackActionSheetV2 */);
function _fun120500() { // fn#120500, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15906:469, offset: 0x0252ccef, size: 36 bytes, params: 1, frame: 9
const value = environment.__proto__;
return AuthenticationStore.getId() === stream.ownerId;
}
function StreamFeedbackActionSheet({stream, analyticsData}) { // fn#120499, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15906:331, offset: 0x0252ca5a, size: 661 bytes, params: 2, frame: 25
var object4;
const env0_2 = (require(7128) /* metro dependency 7128: StreamerApplicationSelectors */).useGetStreamApplication(stream);
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([AuthenticationStore], _fun120500);
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const value3 = Reflect.apply(string, intl, [(require(1244) /* metro dependency 1244: indexNative */).t['5smP3R']]);
const value4 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['0uxA2V']);
string = intl.string;
const CqjnLN = (require(1244) /* metro dependency 1244: indexNative */).t.CqjnLN;
const value5 = Reflect.apply(string, intl, [CqjnLN]);
object4 = {};
object4.value = value2 ? FeedbackCategory.STREAMING : FeedbackCategory.STREAM_WATCHING;
string = intl.string;
const defaultImport = importDefault(2454) /* metro dependency 2454: FeedbackMessages */;
object4.label = Reflect.apply(string, intl, [value2 ? defaultImport['0ZBLiZ'] : defaultImport.TVTIT1]);
object4.problemsHeader = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['6Y1t5P']);
object4.problemOptions = (require(9909) /* metro dependency 9909: FeedbackUtils */).getStreamFeedbackOptions({isStreamer: value2});
const object2 = {};
const FREEFORM = StreamFeedbackOption.FREEFORM;
object2.value = FREEFORM;
object2.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.emlT91);
object4.freeformConfig = object2;
return ((Component) => <Component headerLabel={value3} showHeaderCloseButton ratingBody={value2 ? value4 : value5} categoriesHeader={intl.string(defaultImport.tq8598)} optionsTree={[object4]} trackOpen={trackOpen_120501} trackReport={trackReport} />)(importDefault(15699) /* metro dependency 15699: FeedbackActionSheetV2 */);
}
function StreamFeedbackActionSheetTrackOpen() { // fn#120501, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15906:1079, owner: StreamFeedbackActionSheet.trackOpen, offset: 0x0252cd13, size: 161 bytes, params: 1, frame: 18
const defaultImport = AnalyticsUtils;
const track = defaultImport.track;
const OPEN_POPOUT = AnalyticEvents.OPEN_POPOUT;
const value2 = null;
Reflect.apply(track, defaultImport, [OPEN_POPOUT, {type: 'Stream Feedback Sheet', other_user_id: stream.ownerId,
application_id: value2 != env0_2 ? env0_2.id : value2,
application_name: value2 != env0_2 ? env0_2.name : value2, game_id: value2 != env0_2 ? env0_2.id : value2}]);
}
function _fun120500() { // fn#120500, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15906:469, offset: 0x0252ccef, size: 36 bytes, params: 1, frame: 9
const value = environment.__proto__;
return AuthenticationStore.getId() === stream.ownerId;
}
function StreamFeedbackActionSheetTrackOpen() { // fn#120501, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15906:1079, owner: StreamFeedbackActionSheet.trackOpen, offset: 0x0252cd13, size: 161 bytes, params: 1, frame: 18
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const OPEN_POPOUT = AnalyticEvents.OPEN_POPOUT;
const value2 = null;
Reflect.apply(track, defaultImport, [OPEN_POPOUT, {type: 'Stream Feedback Sheet', other_user_id: stream.ownerId,
application_id: value2 != env0_2 ? env0_2.id : value2,
application_name: value2 != env0_2 ? env0_2.name : value2, game_id: value2 != env0_2 ? env0_2.id : value2}]);
}
function StreamFeedbackActionSheetTrackReport({dontShowAgain, rating, category, reason, feedback}) { // fn#120502, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15906:1278, owner: StreamFeedbackActionSheet.trackReport, offset: 0x0252cdb4, size: 445 bytes, params: 2, frame: 22
var r9;
var r0;
var variant;
var value;
var object2;
var value2;
var value3;
var defaultImport;
var analyticsDataBinding;
var openLazy;
var value7;
if (dontShowAgain) {
value = environment.__proto__;
require(dependencyMap[9]).processOptOut({feedbackType: FeedbackType.STREAM,
location: 'StreamFeedbackActionSheet'});
}
value = null;
if (value != rating) {
value2 = environment.__proto__;
value3 = undefined;
defaultImport = importDefault(dependencyMap[12]);
object2 = {category: category};
r9 = value == reason ? value3 : reason.value;
r0 = value != r9 ? r9 : value;
object2.problem = r0;
variant = value == reason ? value3 : reason.variant;
r0 = value != variant ? variant : value;
object2.variant = r0;
object2.stream = stream;
r9 = value != feedback ? feedback : '';
object2.feedback = r9;
object2.streamApplication = env0_2;
object2.analyticsData = analyticsData;
object2.location = 'Stream End';
object2.rating = rating;
defaultImport(object2);
if (value == reason) {
require(dependencyMap[17]).presentFeedbackSent();
} else {
value = require(dependencyMap[13]);
if (value.shouldShowLogUploadForCategory(rating, category, reason)) {
value = importDefault(dependencyMap[14]);
openLazy = value.openLazy;
value7 = require(dependencyMap[16])(dependencyMap[15], dependencyMap.paths);
analyticsDataBinding = analyticsData;
Reflect.apply(openLazy, value, [value7, 'UploadLogs',
{mediaSessionId: analyticsDataBinding.media_session_id,
rtcConnectionId: analyticsDataBinding.rtc_connection_id}]);
} else {
require(dependencyMap[17]).presentFeedbackSent();
function StreamFeedbackActionSheetTrackReport({dontShowAgain, rating, category, reason, feedback}) { // fn#120502, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15906:1278, owner: StreamFeedbackActionSheet.trackReport, offset: 0x0252cdb4, size: 445 bytes, params: 2, frame: 22
var r9;
var r0;
var variant;
var value;
var object;
var value2;
var value3;
var defaultImport;
var analyticsDataBinding;
var openLazy;
var value7;
if (dontShowAgain) {
value = environment.__proto__;
require(dependencyMap[9]).processOptOut({feedbackType: FeedbackType.STREAM,
location: 'StreamFeedbackActionSheet'});
}
value = null;
if (value != rating) {
value2 = environment.__proto__;
value3 = undefined;
defaultImport = importDefault(dependencyMap[12]);
object = {category: category};
r9 = value == reason ? value3 : reason.value;
r0 = value != r9 ? r9 : value;
object.problem = r0;
variant = value == reason ? value3 : reason.variant;
r0 = value != variant ? variant : value;
object.variant = r0;
object.stream = stream;
r9 = value != feedback ? feedback : '';
object.feedback = r9;
object.streamApplication = env0_2;
object.analyticsData = analyticsData;
object.location = 'Stream End';
object.rating = rating;
defaultImport(object);
if (value == reason) {
require(dependencyMap[17]).presentFeedbackSent();
} else {
value = require(dependencyMap[13]);
if (value.shouldShowLogUploadForCategory(rating, category, reason)) {
value = importDefault(dependencyMap[14]);
openLazy = value.openLazy;
value7 = require(dependencyMap[16])(dependencyMap[15], dependencyMap.paths);
analyticsDataBinding = analyticsData;
Reflect.apply(openLazy, value, [value7, 'UploadLogs',
{mediaSessionId: analyticsDataBinding.media_session_id,
rtcConnectionId: analyticsDataBinding.rtc_connection_id}]);
} else {
require(dependencyMap[17]).presentFeedbackSent();
}
}
}
}
}
}
global.__d(_fun120498, 15698, [31, 1226, 661, 9906, 33, 7128, 566, 1244, 2454, 9909, 15699, 683, 15559, 15700, 4080,
15701, 1962, 3856,
2]) /* metro module 15698, dependencies: [31, 1226, 661, 9906, 33, 7128, 566, 1244, 2454, 9909, 15699, 683, 15559, 15700, 4080, 15701, 1962, 3856, 2] */;
@@ -1,46 +1,64 @@
/* Metro module 16190; source: components_native/calls/stream/StreamFullAlert.tsx; dependencies: [31, 27, 33, 9235, 1244, 4596, 4573, 16191, 2] */
import Alert from '../../common/Alert.tsx'; /* Metro dependency 4596 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as AVErrorModule from '../../../modules/errors/av_errors/AVError.tsx'; /* Metro dependency 9235 */
function _fun125092(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#125092, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16398:6, offset: 0x025cdb23, size: 207 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).Image;
const value = require(33) /* metro dependency 33 */;
const env0_4 = value.jsx;
const env0_5 = value.jsxs;
ReactModule;
({image: {'alignSelf': 'center', 'marginTop': 32}}).body = {marginTop: 16};
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/calls/stream/StreamFullAlert.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/calls/stream/StreamFullAlert.tsx');
exports.default = StreamFullAlert;
function StreamFullAlert(a0) { // fn#125093, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16398:217, offset: 0x025cdbf2, size: 444 bytes, params: 2, frame: 26
const value2 = undefined;
const getErrorInfo = AVErrorModule.getErrorInfo;
const AVError = AVErrorModule.AVError;
const STREAM_FULL = AVError.STREAM_FULL;
const value3 = Reflect.apply(getErrorInfo, AVErrorModule, [STREAM_FULL]);
const errorCode = value3 == null ? value2 : value3.errorCode;
const intl = (IndexNativeModule).intl;
const value4 = intl.formatToPlainString((IndexNativeModule).t.ejOT95,
{errorCode: errorCode});
const defaultImportProps = {...a0};
let string = intl.string;
const GzjdO5 = (IndexNativeModule).t.GzjdO5;
defaultImportProps['title'] = Reflect.apply(string, intl, [GzjdO5]);
const Text = (TextModule).Text;
const binding = env0_6;
const body = binding.body;
string = intl.string;
const VVZDBL = (IndexNativeModule).t.VVZDBL;
const items2 = [
<Text variant="text-md/normal" style={body}>
{Reflect.apply(string, intl, [VVZDBL])}
</Text>,
];
items2[1] = (
<Text
variant="text-md/normal"
selectable
color="text-muted"
style={binding.body}
>
{value4}
</Text>
);
items2[2] = <Image source={importDefault(16191) /* metro dependency 16191 */} style={binding.image} />;
return (
<Alert {...defaultImportProps}>
{items2}
</Alert>
);
}
}
function StreamFullAlert(a0) { // fn#125093, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16398:217, offset: 0x025cdbf2, size: 444 bytes, params: 2, frame: 26
const value2 = undefined;
const avErrorModule = require(9235) /* metro dependency 9235: AVError */;
const getErrorInfo = avErrorModule.getErrorInfo;
const AVError = avErrorModule.AVError;
const STREAM_FULL = AVError.STREAM_FULL;
const value3 = Reflect.apply(getErrorInfo, avErrorModule, [STREAM_FULL]);
const errorCode = value3 == null ? value2 : value3.errorCode;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const value4 = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.ejOT95,
{errorCode: errorCode});
const Alert = importDefault(4596) /* metro dependency 4596: Alert */;
const defaultImportProps = {...a0};
let string = intl.string;
const GzjdO5 = (require(1244) /* metro dependency 1244: indexNative */).t.GzjdO5;
defaultImportProps['title'] = Reflect.apply(string, intl, [GzjdO5]);
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const binding = env0_6;
const body = binding.body;
string = intl.string;
const VVZDBL = (require(1244) /* metro dependency 1244: indexNative */).t.VVZDBL;
const items2 = [<Text variant="text-md/normal" style={body}>{Reflect.apply(string, intl, [VVZDBL])}</Text>];
items2[1] = <Text variant="text-md/normal" selectable color="text-muted" style={binding.body}>{value4}</Text>;
items2[2] = <Image source={importDefault(16191) /* metro dependency 16191 */} style={binding.image} />;
return (
<Alert {...defaultImportProps}>
{items2}
</Alert>
);
}
global.__d(_fun125092, 16190, [31, 27, 33, 9235, 1244, 4596, 4573, 16191,
2]) /* metro module 16190, dependencies: [31, 27, 33, 9235, 1244, 4596, 4573, 16191, 2] */;
@@ -1,90 +1,108 @@
/* Metro module 15558; source: components_native/calls/stream/StreamReportProblemActionSheet.tsx; dependencies: [31, 4396, 661, 33, 4501, 697, 4594, 7128, 683, 15559, 4080, 3856, 15560, 6807, 6805, 6758, 1244, 6277, 2] */
import AnalyticsUtils from '../../../utils/AnalyticsUtils.tsx'; /* Metro dependency 683 */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import ActionSheetActionCreators from '../../../modules/action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
import PresenceStore from '../../../stores/PresenceStore.tsx'; /* Metro dependency 4396 */
import UseMountEffect from '../../../hooks/useMountEffect.tsx'; /* Metro dependency 4594 */
import TrackStreamProblem from '../../../modules/go_live/utils/trackStreamProblem.tsx'; /* Metro dependency 15559 */
import GetStreamIssueReportOptions from '../../../modules/go_live/utils/getStreamIssueReportOptions.tsx'; /* Metro dependency 15560 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as ToastUtilsModule from '../../../modules/toast/native/ToastUtils.tsx'; /* Metro dependency 3856 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as Module06277Module from '../../../by-id/module-06277.js'; /* Metro dependency 6277 */
import * as BottomSheetTitleHeaderNativeModule from '../../../design/components/Sheet/native/BottomSheetTitleHeader.native.tsx'; /* Metro dependency 6758 */
import * as ActionSheetNativeModule from '../../../design/components/Sheet/native/ActionSheet.native.tsx'; /* Metro dependency 6805 */
import * as ActionSheetRowNativeModule from '../../../design/components/Sheet/native/ActionSheetRow.native.tsx'; /* Metro dependency 6807 */
import * as StreamerApplicationSelectorsModule from '../../../modules/go_live/utils/StreamerApplicationSelectors.tsx'; /* Metro dependency 7128 */
function _fun119091(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#119091, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15755:6, offset: 0x024fc007, size: 244 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 presenceStore = importDefault(4396) /* metro dependency 4396: PresenceStore */;
const env0_4 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
const env0_6 = Reflect.apply(createStyles, createStylesModule, [{container: {padding: 16,
ReactModule;
const createStyles = CreateStylesModule.createStyles;
const BACKGROUND_SURFACE_HIGH = (Native).colors.BACKGROUND_SURFACE_HIGH;
const env0_6 = Reflect.apply(createStyles, CreateStylesModule, [{container: {padding: 16,
backgroundColor: BACKGROUND_SURFACE_HIGH}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/calls/stream/StreamReportProblemActionSheet.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/calls/stream/StreamReportProblemActionSheet.tsx');
exports.default = ReportProblem;
function ReportProblem({stream, analyticsData}) { // fn#119092, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15755:370, offset: 0x024fc0fb, size: 330 bytes, params: 2, frame: 23
const styles = useStyles();
(UseMountEffect)(_fun119093);
const value3 = (GetStreamIssueReportOptions)({'isStreamer': false,
'isEndStream': false}).map(_fun119094);
const ActionSheet = (ActionSheetNativeModule).ActionSheet;
const object = {scrollable: true};
const BottomSheetTitleHeader = (BottomSheetTitleHeaderNativeModule).BottomSheetTitleHeader;
const intl = (IndexNativeModule).intl;
const string = intl.string;
const XuqqwI = (IndexNativeModule).t.XuqqwI;
object.header = <BottomSheetTitleHeader title={Reflect.apply(string, intl, [XuqqwI])} />;
const BottomSheetScrollView = (Module06277Module).BottomSheetScrollView;
const ActionSheetRow = (ActionSheetRowNativeModule).ActionSheetRow;
const Group = ActionSheetRow.Group;
return (
<ActionSheet {...object}>
<BottomSheetScrollView style={styles.container}>
<Group hasIcons={false}>
{value3}
</Group>
</BottomSheetScrollView>
</ActionSheet>
);
function _fun119093() { // fn#119093, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15755:441, offset: 0x024fc245, size: 169 bytes, params: 1, frame: 18
let value = environment.__proto__;
const getStreamerApplication = StreamerApplicationSelectorsModule.getStreamerApplication;
const streamBinding = stream;
const value3 = Reflect.apply(getStreamerApplication, StreamerApplicationSelectorsModule, [streamBinding,
PresenceStore]);
const defaultImport = AnalyticsUtils;
const track = defaultImport.track;
const OPEN_POPOUT = AnalyticEvents.OPEN_POPOUT;
value = null;
Reflect.apply(track, defaultImport, [OPEN_POPOUT, {type: 'Stream Issue Sheet', other_user_id: streamBinding.ownerId,
application_id: value != value3 ? value3.id : value, application_name: value != value3 ? value3.name : value,
game_id: value != value3 ? value3.id : value}]);
}
function _fun119094({value, label}, a1) { // fn#119094, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15755:722, offset: 0x024fc2ee, size: 90 bytes, params: 3, frame: 16
var environment;
value = environment.__proto__;
const ActionSheetRow = (ActionSheetRowNativeModule).ActionSheetRow;
return (
<ActionSheetRow
label={label}
arrow
onPress={onPress_119095}
key={a1}
/>
);
function onPress_119095() { // fn#119095, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15755:797, offset: 0x024fc348, size: 165 bytes, params: 1, frame: 20
const valueBinding = value;
const defaultImport = TrackStreamProblem;
const object = {problem: valueBinding};
const streamBinding = stream;
object.stream = streamBinding;
object.feedback = '';
object.streamApplication = (require(7128) /* metro dependency 7128: StreamerApplicationSelectors */).getStreamerApplication(streamBinding,
PresenceStore);
object.analyticsData = analyticsData;
object.location = 'Stream';
defaultImport(object);
(ActionSheetActionCreators).hideActionSheet();
(ToastUtilsModule).presentFeedbackSent();
}
}
}
}
function ReportProblem({stream, analyticsData}) { // fn#119092, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15755:370, offset: 0x024fc0fb, size: 330 bytes, params: 2, frame: 23
const styles = useStyles();
(importDefault(4594) /* metro dependency 4594: useMountEffect */)(_fun119093);
const value3 = (importDefault(15560) /* metro dependency 15560: getStreamIssueReportOptions */)({'isStreamer': false,
'isEndStream': false}).map(_fun119094);
const ActionSheet = (require(6805) /* metro dependency 6805: ActionSheetNative */).ActionSheet;
const object2 = {scrollable: true};
const BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const XuqqwI = (require(1244) /* metro dependency 1244: indexNative */).t.XuqqwI;
object2.header = <BottomSheetTitleHeader title={Reflect.apply(string, intl, [XuqqwI])} />;
const BottomSheetScrollView = (require(6277) /* metro dependency 6277 */).BottomSheetScrollView;
const ActionSheetRow = (require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow;
const Group = ActionSheetRow.Group;
return (
<ActionSheet {...object2}>
<BottomSheetScrollView style={styles.container}>
<Group hasIcons={false}>
{value3}
</Group>
</BottomSheetScrollView>
</ActionSheet>
);
}
function _fun119093() { // fn#119093, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15755:441, offset: 0x024fc245, size: 169 bytes, params: 1, frame: 18
let value = environment.__proto__;
const streamerApplicationSelectorsModule = require(7128) /* metro dependency 7128: StreamerApplicationSelectors */;
const getStreamerApplication = streamerApplicationSelectorsModule.getStreamerApplication;
const streamBinding = stream;
const value3 = Reflect.apply(getStreamerApplication, streamerApplicationSelectorsModule, [streamBinding,
PresenceStore]);
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const OPEN_POPOUT = AnalyticEvents.OPEN_POPOUT;
value = null;
Reflect.apply(track, defaultImport, [OPEN_POPOUT, {type: 'Stream Issue Sheet', other_user_id: streamBinding.ownerId,
application_id: value != value3 ? value3.id : value, application_name: value != value3 ? value3.name : value,
game_id: value != value3 ? value3.id : value}]);
}
function _fun119094({value, label}, a1) { // fn#119094, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15755:722, offset: 0x024fc2ee, size: 90 bytes, params: 3, frame: 16
var environment;
value = environment.__proto__;
const ActionSheetRow = (require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow;
return (
<ActionSheetRow
label={label}
arrow
onPress={onPress_119095}
key={a1}
/>
);
}
function onPress_119095() { // fn#119095, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15755:797, offset: 0x024fc348, size: 165 bytes, params: 1, frame: 20
const valueBinding = value;
const defaultImport = importDefault(15559) /* metro dependency 15559: trackStreamProblem */;
const object2 = {problem: valueBinding};
const streamBinding = stream;
object2.stream = streamBinding;
object2.feedback = '';
object2.streamApplication = (require(7128) /* metro dependency 7128: StreamerApplicationSelectors */).getStreamerApplication(streamBinding,
PresenceStore);
object2.analyticsData = analyticsData;
object2.location = 'Stream';
defaultImport(object2);
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
(require(3856) /* metro dependency 3856: ToastUtils */).presentFeedbackSent();
}
global.__d(_fun119091, 15558, [31, 4396, 661, 33, 4501, 697, 4594, 7128, 683, 15559, 4080, 3856, 15560, 6807, 6805,
6758, 1244, 6277,
2]) /* metro module 15558, dependencies: [31, 4396, 661, 33, 4501, 697, 4594, 7128, 683, 15559, 4080, 3856, 15560, 6807, 6805, 6758, 1244, 6277, 2] */;
@@ -1,130 +1,171 @@
/* Metro module 10673; source: components_native/calls/stream/VideoEmptyState.tsx; dependencies: [31, 27, 1379, 661, 33, 4501, 697, 10674, 1305, 1244, 9933, 9235, 566, 4594, 8913, 4285, 4573, 4579, 2] */
import ChannelStore from '../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import UseMountEffect from '../../../hooks/useMountEffect.tsx'; /* Metro dependency 4594 */
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 StreamKeyUtilsModule from '../../../modules/go_live/utils/StreamKeyUtils.tsx'; /* Metro dependency 4285 */
function _fun82078(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#82078, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10859:6, offset: 0x01eea25a, size: 454 bytes, params: 8, frame: 24
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 channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const Fonts = (require(661) /* metro dependency 661: Constants */).Fonts;
let value = require(33) /* metro dependency 33 */;
ReactModule;
const Fonts = (ConstantsModule).Fonts;
let value = JsxRuntimeModule;
const env0_5 = value.jsx;
const env0_6 = value.Fragment;
const env0_7 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const object = {};
const object2 = {};
const PRIMARY_700 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_700;
object.container = {'alignItems': 'center', 'justifyContent': 'center', 'backgroundColor': null, 'padding': 8,
object2.container = {'alignItems': 'center', 'justifyContent': 'center', 'backgroundColor': null, 'padding': 8,
backgroundColor: PRIMARY_700};
object.placeholderImage = {'marginBottom': 8, 'width': '100%', 'resizeMode': 'contain'};
object2.placeholderImage = {'marginBottom': 8, 'width': '100%', 'resizeMode': 'contain'};
const WHITE = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE;
const PRIMARY_SEMIBOLD = Fonts.PRIMARY_SEMIBOLD;
object.placeholderText = {'color': null, 'fontFamily': null, 'fontSize': 16, 'lineHeight': 20,
object2.placeholderText = {'color': null, 'fontFamily': null, 'fontSize': 16, 'lineHeight': 20,
'textAlign': 'center', color: WHITE, fontFamily: PRIMARY_SEMIBOLD};
object.buttonWrapper = {'marginTop': 16, 'alignSelf': 'center'};
const object3 = {};
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object.buttonPill = object3;
const env0_9 = Reflect.apply(createStyles, value, [object]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/calls/stream/VideoEmptyState.tsx');
object2.buttonWrapper = {'marginTop': 16, 'alignSelf': 'center'};
const object4 = {};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object2.buttonPill = object4;
const env0_9 = Reflect.apply(createStyles, value, [object2]);
(FileImportTrackerModule).fileFinishedImporting('components_native/calls/stream/VideoEmptyState.tsx');
exports.default = VideoEmptyState;
exports.VideoEmptyTypes = {NONE: 'NONE', STREAM_ENDED: 'STREAM_ENDED', STREAM_FAILED: 'STREAM_FAILED'};
function VideoEmptyState(a0) { // fn#82079, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10859:821, offset: 0x01eea420, size: 1098 bytes, params: 2, frame: 35
var r7;
var errorCode;
var r4;
var jsxRuntimeEnv0_6Binding;
var items3;
const LegacyText = (NativeModule).LegacyText;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var items2;
var moduleValue;
var moduleValue2;
var BaseTextButton;
const type = a0.type;
const style = a0.style;
const avError = a0.avError;
const removeSplashImage = a0.removeSplashImage;
const removeCloseButton = a0.removeCloseButton;
const stream = a0.stream;
const object = {'type': 0, 'style': 0, 'avError': 0, 'removeSplashImage': 0, 'removeCloseButton': 0, 'stream': 0};
let value = null;
silentSetPrototypeOf(object, value, undefined);
const value2 = copyDataProperties({}, a0, object, undefined);
const value3 = undefined;
const styles = useStyles();
const STREAM_ENDED = env0_8.STREAM_ENDED;
if (STREAM_ENDED === type) {
jsxRuntimeEnv0_6Binding = jsxRuntimeEnv0_6;
items2 = [
!removeSplashImage && ((StreamEnded) => <StreamEnded style={styles.placeholderImage} />)((require(10674) /* metro dependency 10674: StreamEnded */).StreamEnded),
];
items2[1] = (
<LegacyText style={styles.placeholderText}>
{intl.formatToMarkdownString((require(1244) /* metro dependency 1244: indexNative */).t['1Ww0Hi'], {})}
</LegacyText>
);
r7 = (
<>
{items2}
</>
);
} else if (env0_8.STREAM_FAILED === type) {
jsxRuntimeEnv0_6Binding = jsxRuntimeEnv0_6;
items3 = [
!removeSplashImage && ((StreamFailed) => <StreamFailed style={styles.placeholderImage} />)((require(9933) /* metro dependency 9933: StreamFailed */).StreamFailed),
];
items3[1] = (
<LegacyText style={styles.placeholderText}>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.rSlOep)}
</LegacyText>
);
r7 = (
<>
{items3}
</>
);
} else {
r7 = env0_8.NONE !== type ? value3 : value;
}
if (value != avError) {
moduleValue2 = require(9235) /* metro dependency 9235: AVError */;
errorCode = moduleValue2.getErrorInfo(avError).errorCode;
} else if (type !== env0_8.STREAM_FAILED) {
errorCode = value;
} else {
moduleValue = require(9235) /* metro dependency 9235: AVError */;
errorCode = moduleValue.getErrorInfo((require(9235) /* metro dependency 9235: AVError */).AVError.STREAM_FAILED_TO_START).errorCode;
}
const env0_1 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(stream.channelId);
}, [stream.channelId]);
(UseMountEffect)(_fun82081);
const viewBindingProps = {...value2};
viewBindingProps['style'] = [styles.container, style];
value = value != errorCode;
const r6 = value && ((Text) => <Text variant="text-sm/semibold" color="text-muted" selectable>{intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.ejOT95,
{errorCode: errorCode})}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
if (removeCloseButton) {
r4 = !removeCloseButton;
} else {
var viewBinding2Props = {style: styles.buttonWrapper};
BaseTextButton = (require(4579) /* metro dependency 4579: BaseTextButtonNative */).BaseTextButton;
r4 = (
<View {...viewBinding2Props}>
<BaseTextButton
pillStyle={styles.buttonPill}
variant="secondary"
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['4EGMWL'])}
onPress={onPress_82082}
/>
</View>
);
}
return (
<View {...viewBindingProps}>
{r7}
{r6}
{r4}
</View>
);
function _fun82081() { // fn#82081, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10859:1727, offset: 0x01eea889, size: 100 bytes, params: 1, frame: 15
var value3;
var moduleValue;
var stopStream;
var moduleValue2;
if (env0_1 != null && env0_1.isGuildStageVoice()) {
value3 = environment.__proto__;
moduleValue = require(8913) /* metro dependency 8913: StreamActionCreators */;
stopStream = moduleValue.stopStream;
moduleValue2 = require(4285) /* metro dependency 4285: StreamKeyUtils */;
Reflect.apply(stopStream, moduleValue, [moduleValue2.encodeStreamKey(stream)]);
}
}
function VideoEmptyStateOnPress() { // fn#82082, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10859:2186, owner: VideoEmptyState.onPress, offset: 0x01eea8ed, size: 68 bytes, params: 1, frame: 14
let value = environment.__proto__;
value = require(8913) /* metro dependency 8913: StreamActionCreators */;
const stopStream = value.stopStream;
Reflect.apply(stopStream, value, [StreamKeyUtilsModule.encodeStreamKey(stream)]);
}
}
}
function VideoEmptyState(a0) { // fn#82079, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10859:821, offset: 0x01eea420, size: 1098 bytes, params: 2, frame: 35
var r7;
var errorCode;
var r4;
var jsxRuntimeEnv0_6Binding;
var items3;
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var items2;
var moduleValue;
var moduleValue2;
var BaseTextButton;
const type = a0.type;
const style = a0.style;
const avError = a0.avError;
const removeSplashImage = a0.removeSplashImage;
const removeCloseButton = a0.removeCloseButton;
const stream = a0.stream;
const object2 = {'type': 0, 'style': 0, 'avError': 0, 'removeSplashImage': 0, 'removeCloseButton': 0, 'stream': 0};
let value = null;
silentSetPrototypeOf(object2, value, undefined);
const value2 = copyDataProperties({}, a0, object2, undefined);
const value3 = undefined;
const styles = useStyles();
const STREAM_ENDED = env0_8.STREAM_ENDED;
if (STREAM_ENDED === type) {
jsxRuntimeEnv0_6Binding = jsxRuntimeEnv0_6;
items2 = [!removeSplashImage && ((StreamEnded) => <StreamEnded style={styles.placeholderImage} />)((require(10674) /* metro dependency 10674: StreamEnded */).StreamEnded)];
items2[1] = <LegacyText style={styles.placeholderText}>{intl.formatToMarkdownString((require(1244) /* metro dependency 1244: indexNative */).t['1Ww0Hi'],
{})}</LegacyText>;
r7 = <>{items2}</>;
} else if (env0_8.STREAM_FAILED === type) {
jsxRuntimeEnv0_6Binding = jsxRuntimeEnv0_6;
items3 = [!removeSplashImage && ((StreamFailed) => <StreamFailed style={styles.placeholderImage} />)((require(9933) /* metro dependency 9933: StreamFailed */).StreamFailed)];
items3[1] = <LegacyText style={styles.placeholderText}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.rSlOep)}</LegacyText>;
r7 = <>{items3}</>;
} else {
r7 = env0_8.NONE !== type ? value3 : value;
}
if (value != avError) {
moduleValue2 = require(9235) /* metro dependency 9235: AVError */;
errorCode = moduleValue2.getErrorInfo(avError).errorCode;
} else if (type !== env0_8.STREAM_FAILED) {
errorCode = value;
} else {
moduleValue = require(9235) /* metro dependency 9235: AVError */;
errorCode = moduleValue.getErrorInfo((require(9235) /* metro dependency 9235: AVError */).AVError.STREAM_FAILED_TO_START).errorCode;
}
const env0_1 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(stream.channelId);
}, [stream.channelId]);
(importDefault(4594) /* metro dependency 4594: useMountEffect */)(_fun82081);
const viewBindingProps = {...value2};
viewBindingProps['style'] = [styles.container, style];
value = value != errorCode;
const r6 = value && ((Text) => <Text variant="text-sm/semibold" color="text-muted" selectable>{intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.ejOT95,
{errorCode: errorCode})}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
if (removeCloseButton) {
r4 = !removeCloseButton;
} else {
var viewBinding2Props = {style: styles.buttonWrapper};
BaseTextButton = (require(4579) /* metro dependency 4579: BaseTextButtonNative */).BaseTextButton;
r4 = <View {...viewBinding2Props}><BaseTextButton pillStyle={styles.buttonPill} variant="secondary" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['4EGMWL'])} onPress={onPress_82082} /></View>;
}
return (
<View {...viewBindingProps}>
{r7}
{r6}
{r4}
</View>
);
}
function _fun82081() { // fn#82081, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10859:1727, offset: 0x01eea889, size: 100 bytes, params: 1, frame: 15
var value3;
var moduleValue;
var stopStream;
var moduleValue2;
if (env0_1 != null && env0_1.isGuildStageVoice()) {
value3 = environment.__proto__;
moduleValue = require(8913) /* metro dependency 8913: StreamActionCreators */;
stopStream = moduleValue.stopStream;
moduleValue2 = require(4285) /* metro dependency 4285: StreamKeyUtils */;
Reflect.apply(stopStream, moduleValue, [moduleValue2.encodeStreamKey(stream)]);
}
}
function VideoEmptyStateOnPress() { // fn#82082, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10859:2186, owner: VideoEmptyState.onPress, offset: 0x01eea8ed, size: 68 bytes, params: 1, frame: 14
let value = environment.__proto__;
value = require(8913) /* metro dependency 8913: StreamActionCreators */;
const stopStream = value.stopStream;
const streamKeyUtilsModule = require(4285) /* metro dependency 4285: StreamKeyUtils */;
Reflect.apply(stopStream, value, [streamKeyUtilsModule.encodeStreamKey(stream)]);
}
global.__d(_fun82078, 10673, [31, 27, 1379, 661, 33, 4501, 697, 10674, 1305, 1244, 9933, 9235, 566, 4594, 8913,
4285, 4573, 4579,
2]) /* metro module 10673, dependencies: [31, 27, 1379, 661, 33, 4501, 697, 10674, 1305, 1244, 9933, 9235, 566, 4594, 8913, 4285, 4573, 4579, 2] */;
@@ -1,369 +1,417 @@
/* Metro module 15213; source: components_native/channel_settings/ChannelSettingsChangeCategory.tsx; dependencies: [57, 862, 6, 7, 15, 17, 18, 31, 1379, 5098, 1867, 3784, 3793, 1878, 661, 33, 4501, 697, 5099, 11879, 3789, 6593, 4647, 1244, 4805, 6238, 6231, 7972, 4572, 4573, 3868, 566, 1484, 44, 2] */
import ClassCallCheck from '../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import Module00044 from '../../by-id/module-00044.js'; /* Metro dependency 44 */
import Module00057 from '../../by-id/module-00057.js'; /* Metro dependency 57 */
import Native from '../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import Module00862 from '../../by-id/module-00862.js'; /* Metro dependency 862 */
import ChannelStore from '../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import GuildStore from '../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import UserStore from '../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import PermissionStore from '../../stores/PermissionStore.tsx'; /* Metro dependency 3784 */
import RelationshipStore from '../../stores/RelationshipStore.tsx'; /* Metro dependency 3793 */
import GuildCategoryStore from '../../stores/GuildCategoryStore.tsx'; /* Metro dependency 5098 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as UseNavigationNativeModule from '../../design/components/Navigator/native/useNavigation.native.tsx'; /* Metro dependency 1484 */
import * as NativeModule from '../../external/discord_common/js/packages/design/native.tsx'; /* Metro dependency 3868 */
import * as CreateStylesModule from '../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
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 TableRowNativeModule from '../../design/components/TableRow/native/TableRow.native.tsx'; /* Metro dependency 6238 */
import * as NativeModule2 from '../../design/void/Form/native/index.tsx'; /* Metro dependency 7972 */
import * as DragAndDropUtilsModule from '../../utils/DragAndDropUtils.tsx'; /* Metro dependency 11879 */
function _fun116362(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116362, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15410:6, offset: 0x024866f1, size: 567 bytes, params: 8, frame: 23
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = importDefault(57) /* metro dependency 57 */;
const env0_5 = importDefault(862) /* metro dependency 862 */;
const env0_6 = importDefault(6) /* metro dependency 6 */;
const env0_7 = importDefault(7) /* metro dependency 7 */;
const env0_8 = importDefault(15) /* metro dependency 15 */;
const env0_9 = importDefault(17) /* metro dependency 17 */;
const env0_10 = importDefault(18) /* metro dependency 18 */;
let value = importAll(31) /* metro dependency 31 */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildCategoryStore = importDefault(5098) /* metro dependency 5098: GuildCategoryStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_17 = (require(661) /* metro dependency 661: Constants */).Permissions;
const value2 = require(33) /* metro dependency 33 */;
const env0_18 = value2.jsx;
const env0_19 = value2.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createLegacyClassComponentStyles = createStylesModule.createLegacyClassComponentStyles;
object3 = {};
const object4 = {flex: 1};
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
object4.backgroundColor = BACKGROUND_BASE_LOWER;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.paddingTop = PX_16;
object3.screenContainer = object4;
const TABLE_ROW_PADDING = (importDefault(697) /* metro dependency 697: native */).modules.mobile.TABLE_ROW_PADDING;
object3.stackPadding = {paddingHorizontal: TABLE_ROW_PADDING};
const env0_20 = Reflect.apply(createLegacyClassComponentStyles, createStylesModule, [object3]);
const env0_6 = ClassCallCheck;
let value = ReactModule;
const createLegacyClassComponentStyles = CreateStylesModule.createLegacyClassComponentStyles;
object = {};
const object2 = {flex: 1};
const BACKGROUND_BASE_LOWER = (Native).colors.BACKGROUND_BASE_LOWER;
object2.backgroundColor = BACKGROUND_BASE_LOWER;
const PX_16 = (Native).space.PX_16;
object2.paddingTop = PX_16;
object.screenContainer = object2;
const TABLE_ROW_PADDING = (Native).modules.mobile.TABLE_ROW_PADDING;
object.stackPadding = {paddingHorizontal: TABLE_ROW_PADDING};
const env0_20 = Reflect.apply(createLegacyClassComponentStyles, CreateStylesModule, [object]);
const Component = value.Component;
value = _fun116366(Component);
const ThemeContext = (require(3868) /* metro dependency 3868: native */).ThemeContext;
const ThemeContext = (NativeModule).ThemeContext;
value.contextType = ThemeContext;
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/channel_settings/ChannelSettingsChangeCategory.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/channel_settings/ChannelSettingsChangeCategory.tsx');
exports.default = ConnectedChannelSettingsChangeCategory;
}
function _isNativeReflectConstruct_116363() { // fn#116363, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15410:293, offset: 0x02486928, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_116363_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun116366(a0) { // fn#116366, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15410:725, offset: 0x0248698a, size: 174 bytes, params: 2, frame: 16
const closure = ChannelSettingsChangeCategory;
env0_10(closure, a0);
return env0_7(closure, [{key: 'shouldComponentUpdate', value: function() {
return !this.state.submitting;
}}, {key: 'handleSetCategory', value: value_116371}, {key: 'renderCategory', value: value_116383},
{key: 'renderCategories', value: value_116385}, {key: 'render', value: value_116386}]);
}
function ConnectedChannelSettingsChangeCategory({channelId}) { // fn#116388, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15410:4270, offset: 0x02487481, size: 152 bytes, params: 2, frame: 18
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channelId);
});
const value2 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
(importDefault(44) /* metro dependency 44 */)(channel != null,
'ConnectedChannelSettingsChangeCategory: channel cannot be undefined');
return ((Component) => <Component channel={channel} navigation={value2} />)(env0_21);
}
function ChannelSettingsChangeCategory(a0) { // fn#116367, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15410:737, offset: 0x02486a38, size: 270 bytes, params: 2, frame: 22
var environment;
const value = environment.__proto__;
env1_6(this, ChannelSettingsChangeCategory);
let object = [a0];
const value3 = env1_9(ChannelSettingsChangeCategory);
const value6 = env1_8(this, _isNativeReflectConstruct_116363() ? global.Reflect.construct(value3, object,
env1_9(this).constructor) : value3.apply(this, object));
const getGuild = GuildStore.getGuild;
let channel = a0.channel;
let getGuildId = channel.getGuildId;
const env0_0 = Reflect.apply(getGuild, GuildStore, [Reflect.apply(getGuildId, channel, [])]);
const getCategories = GuildCategoryStore.getCategories;
channel = a0.channel;
getGuildId = channel.getGuildId;
const value7 = Reflect.apply(getCategories, GuildCategoryStore, [Reflect.apply(getGuildId, channel, [])]);
object = {};
object.category = ChannelStore.getChannel(a0.channel.parent_id);
object.categories = value7._categories.map(function(a0) {
return a0.channel;
}).filter(_fun116369);
object.submitting = false;
value6.state = object;
return value6;
}
function value_116371(a0) { // fn#116371, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15410:1496, offset: 0x02486bd2, size: 617 bytes, params: 2, frame: 25
let value = a0;
const props = this.props;
const channel = props.channel;
const env0_2 = props.navigation;
let getChannel = ChannelStore.getChannel;
const value3 = Reflect.apply(getChannel, ChannelStore, [value]);
let getGuildId = channel.getGuildId;
const value4 = Reflect.apply(getGuildId, channel, []);
const value5 = null;
if (value5 == value4) {
throw new global.Error('ChannelSettingsChangeCategory.handleSetCategory: Invalid guild_id');
}
const r5 = value === 'null' ? value5 : value;
const getCategories = GuildCategoryStore.getCategories;
getGuildId = channel.getGuildId;
value = Reflect.apply(getCategories, GuildCategoryStore, [Reflect.apply(getGuildId, channel, [])]);
const value6 = (importDefault(5099) /* metro dependency 5099: getFlattedChannelList */)(value._categories, value,
function(a0) {
return a0.channel.type === channel.type;
});
const value7 = value6.find(function(a0) {
return a0.channel.id === channel.id;
});
if (value5 == value7) {
throw new global.Error('ChannelSettingsChangeCategory.handleSetCategory: Could not find original channel.');
}
const object2 = {};
value._categories.forEach(_fun116374);
value6.forEach(_fun116375);
const String = global.String;
object2[String(r5)].push(value7);
value = (importDefault(5099) /* metro dependency 5099: getFlattedChannelList */)(value._categories, object2);
const dragAndDropUtilsModule = require(11879) /* metro dependency 11879: DragAndDropUtils */;
value = dragAndDropUtilsModule.calculatePositionDeltas({oldOrdering: value6, newOrdering: value,
idGetter: function(a0) {
return a0.channel.id;
}, existingPositionGetter: function(a0) {
return a0.channel.position;
}});
if (value.length > 0) {
value.find(_fun116378);
} else {
value.push({id: channel.id, parent_id: r5});
}
value = importAll(3789) /* metro dependency 3789: PermissionUtils */;
let areChannelsLocked = value.areChannelsLocked;
const env0_8 = Reflect.apply(areChannelsLocked, value, [channel, value3]);
value = importAll(3789) /* metro dependency 3789: PermissionUtils */;
areChannelsLocked = value.areChannelsLocked;
getChannel = ChannelStore.getChannel;
const env0_9 = Reflect.apply(areChannelsLocked, value, [channel, Reflect.apply(getChannel, ChannelStore,
[channel.parent_id])]);
this.setState({submitting: true}, _fun116381);
}
function value_116383(a0) { // fn#116383, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15410:3074, offset: 0x0248712e, size: 87 bytes, params: 2, frame: 17
const env0_1 = a0;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
return (
<TableRow
label={a0.name}
onPress={onPress_116384}
key={a0.id}
/>
);
}
function value_116385() { // fn#116385, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15410:3207, offset: 0x024871a2, size: 205 bytes, params: 1, frame: 18
const value = environment.__proto__;
const value3 = env1_5(this.state.categories).slice(0);
const category = this.state.category;
const value4 = null;
if (value4 != category) {
value3.splice(value3.indexOf(category), 1);
}
if (value4 != value3[0] && value3[0].id === 'null') {
value3.shift();
}
const value8 = value3.map(this.renderCategory, this);
if (value8.length > 0) {
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
return (
<TableRowGroup hasIcons={false}>
{value8}
</TableRowGroup>
);
} else {
return value4;
}
}
function value_116386() { // fn#116386, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15410:3488, offset: 0x0248726f, size: 530 bytes, params: 1, frame: 34
var environment;
var r19;
var intl2;
const category = this.state.category;
const value = environment.__proto__;
const property = env1_4(this.state.categories, 1)[0];
const value3 = env1_20(this.context);
const Form = (require(7972) /* metro dependency 7972: native */).Form;
const screenContainer = value3.screenContainer;
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const stackPadding = value3.stackPadding;
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const formatToPlainString = intl.formatToPlainString;
const OqccVl = (require(1244) /* metro dependency 1244: indexNative */).t.OqccVl;
const value4 = null;
if (value4 != category) {
r19 = category.name;
} else {
intl2 = (require(1244) /* metro dependency 1244: indexNative */).intl;
r19 = intl2.string((require(1244) /* metro dependency 1244: indexNative */).t.GSfOoo);
}
const items2 = [<Text variant="text-md/medium" color="text-muted">{Reflect.apply(formatToPlainString, intl, [OqccVl,
{categoryName: r19}])}</Text>];
items2[1] = value4 != property ? property.id !== 'null' ? value4 : value4 != category ? ((TableRowGroup) => <TableRowGroup hasIcons={false}>{((TableRow) => <TableRow label={property.name} onPress={onPress_116387} key={property.id} />)((require(6238) /* metro dependency 6238: TableRowNative */).TableRow)}</TableRowGroup>)((require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup) : value4 : value4;
items2[2] = this.renderCategories();
return (
<Form style={screenContainer}>
<Stack style={stackPadding} spacing={PX_24}>
{items2}
</Stack>
</Form>
);
}
function _fun116369(a0) { // fn#116369, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15410:1196, offset: 0x02486b46, size: 121 bytes, params: 2, frame: 15
var r0;
let value = a0.id === 'null';
if (value) {
value = environment.__proto__.__proto__;
value = PermissionStore.can(Permissions.MANAGE_CHANNELS, env0_0);
r0 = value;
} else {
r0 = value;
}
r0 = !r0 ? PermissionStore.can(Permissions.MANAGE_CHANNELS, a0) && PermissionStore.can(Permissions.VIEW_CHANNEL,
a0) : r0;
return r0;
}
function _fun116374({channel}) { // fn#116374, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15410:1989, offset: 0x02486e79, size: 30 bytes, params: 2, frame: 3
const binding = env0_5;
const id = channel.id;
const items2 = [];
binding[id] = items2;
return items2;
}
function _fun116375(a0) { // fn#116375, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15410:2028, offset: 0x02486e97, size: 90 bytes, params: 2, frame: 14
var r0;
var binding;
var String;
var parent_id;
var property;
const id = a0.channel.id;
var value;
const value2 = id !== channel.id;
if (value2) {
binding = env0_5;
String = global.String;
parent_id = a0.channel.parent_id;
value = undefined;
property = binding[String(parent_id)];
r0 = property == null ? value : property.push(a0);
} else {
r0 = value2;
}
return r0;
}
function _fun116378(a0) { // fn#116378, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15410:2347, offset: 0x02486f00, size: 45 bytes, params: 2, frame: 4
var r0;
const value2 = a0.id === channel.id;
if (value2) {
a0.parent_id = env0_0;
env0_6 = a0;
r0 = true;
} else {
r0 = value2;
}
return r0;
}
function saveUpdates() { // fn#116379, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15410:2532, owner: value_116371.saveUpdates, offset: 0x02486f2d, size: 69 bytes, params: 1, frame: 13
var environment;
let value = environment.__proto__.__proto__;
value = Reflect.apply((importDefault(6593) /* metro dependency 6593: GuildActionCreators */).batchChannelUpdate,
value, [env0_4, env0_7]);
return value.then(function() {
return navigation.pop();
});
}
function _fun116381() { // fn#116381, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15410:2620, offset: 0x02486f85, size: 398 bytes, params: 1, frame: 30
var environment;
var value2;
var defaultImport;
var show;
var object3;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var format;
var property;
var object4;
var moduleValue;
if (env0_3 == null) {
saveUpdates();
} else if (env0_9) {
if (env0_8) {
saveUpdates();
} else {
value2 = environment.__proto__.__proto__;
defaultImport = importDefault(4647) /* metro dependency 4647: AlertActionCreators */;
show = defaultImport.show;
object3 = {};
object3.title = intl.string(t.YWMtRe);
format = intl.format;
property = t['iKW+jY'];
object4 = {};
moduleValue = require(4805) /* metro dependency 4805: useChannelName */;
object4.channelName = moduleValue.computeChannelName(channel, UserStore, RelationshipStore, true);
object4.categoryName = (require(4805) /* metro dependency 4805: useChannelName */).computeChannelName(env0_3,
UserStore, RelationshipStore);
object3.body = Reflect.apply(format, intl, [property, object4]);
object3.confirmText = intl.string(t.eW8Gy4);
object3.cancelText = intl.string(t.s4uM3b);
object3.onConfirm = onConfirm_116382;
object3.onCancel = saveUpdates;
Reflect.apply(show, defaultImport, [object3]);
function _isNativeReflectConstruct_116363() { // fn#116363, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15410:293, offset: 0x02486928, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
} else {
saveUpdates();
return (_isNativeReflectConstruct_116363_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun116366(a0) { // fn#116366, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15410:725, offset: 0x0248698a, size: 174 bytes, params: 2, frame: 16
const ChannelSettingsChangeCategory2 = ChannelSettingsChangeCategory;
Inherits(ChannelSettingsChangeCategory2, a0);
return CreateClass(ChannelSettingsChangeCategory2, [{key: 'shouldComponentUpdate', value: function() {
return !this.state.submitting;
}}, {key: 'handleSetCategory', value: value_116371}, {key: 'renderCategory', value: value_116383},
{key: 'renderCategories', value: value_116385}, {key: 'render', value: value_116386}]);
function ChannelSettingsChangeCategory(a0) { // fn#116367, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15410:737, offset: 0x02486a38, size: 270 bytes, params: 2, frame: 22
var environment;
const value = environment.__proto__;
env1_6(this, ChannelSettingsChangeCategory);
let object = [a0];
const value3 = env1_9(ChannelSettingsChangeCategory);
const value6 = env1_8(this, _isNativeReflectConstruct_116363() ? global.Reflect.construct(value3, object,
env1_9(this).constructor) : value3.apply(this, object));
const guildStoreBinding = GuildStore;
const getGuild = guildStoreBinding.getGuild;
let channel = a0.channel;
let getGuildId = channel.getGuildId;
const env0_0 = Reflect.apply(getGuild, guildStoreBinding, [Reflect.apply(getGuildId, channel, [])]);
const guildCategoryStoreBinding = GuildCategoryStore;
const getCategories = guildCategoryStoreBinding.getCategories;
channel = a0.channel;
getGuildId = channel.getGuildId;
const value7 = Reflect.apply(getCategories, guildCategoryStoreBinding, [Reflect.apply(getGuildId, channel, [])]);
object = {};
object.category = ChannelStore.getChannel(a0.channel.parent_id);
object.categories = value7._categories.map(function(a0) {
return a0.channel;
}).filter(_fun116369);
object.submitting = false;
value6.state = object;
return value6;
function _fun116369(a0) { // fn#116369, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15410:1196, offset: 0x02486b46, size: 121 bytes, params: 2, frame: 15
var r0;
var permissionStoreBinding;
let value = a0.id === 'null';
if (value) {
value = environment.__proto__.__proto__;
permissionStoreBinding = PermissionStore;
value = permissionStoreBinding.can(Permissions.MANAGE_CHANNELS, env0_0);
r0 = value;
} else {
r0 = value;
}
r0 = !r0 ? PermissionStore.can(Permissions.MANAGE_CHANNELS, a0) && PermissionStore.can(Permissions.VIEW_CHANNEL,
a0) : r0;
return r0;
}
}
function value_116371(a0) { // fn#116371, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15410:1496, offset: 0x02486bd2, size: 617 bytes, params: 2, frame: 25
let value = a0;
const props = this.props;
const channel = props.channel;
const env0_2 = props.navigation;
let channelStoreBinding = ChannelStore;
let getChannel = channelStoreBinding.getChannel;
const value3 = Reflect.apply(getChannel, channelStoreBinding, [value]);
let getGuildId = channel.getGuildId;
const value4 = Reflect.apply(getGuildId, channel, []);
const value5 = null;
if (value5 == value4) {
throw new global.Error('ChannelSettingsChangeCategory.handleSetCategory: Invalid guild_id');
}
const r5 = value === 'null' ? value5 : value;
const guildCategoryStoreBinding = GuildCategoryStore;
const getCategories = guildCategoryStoreBinding.getCategories;
getGuildId = channel.getGuildId;
value = Reflect.apply(getCategories, guildCategoryStoreBinding, [Reflect.apply(getGuildId, channel, [])]);
const value6 = (importDefault(5099) /* metro dependency 5099: getFlattedChannelList */)(value._categories, value,
function(a0) {
return a0.channel.type === channel.type;
});
const value7 = value6.find(function(a0) {
return a0.channel.id === channel.id;
});
if (value5 == value7) {
throw new global.Error('ChannelSettingsChangeCategory.handleSetCategory: Could not find original channel.');
}
const object = {};
value._categories.forEach(_fun116374);
value6.forEach(_fun116375);
const String = global.String;
object[String(r5)].push(value7);
value = (importDefault(5099) /* metro dependency 5099: getFlattedChannelList */)(value._categories, object);
value = DragAndDropUtilsModule.calculatePositionDeltas({oldOrdering: value6, newOrdering: value,
idGetter: function(a0) {
return a0.channel.id;
}, existingPositionGetter: function(a0) {
return a0.channel.position;
}});
if (value.length > 0) {
value.find(_fun116378);
} else {
value.push({id: channel.id, parent_id: r5});
}
value = importAll(3789) /* metro dependency 3789: PermissionUtils */;
let areChannelsLocked = value.areChannelsLocked;
const env0_8 = Reflect.apply(areChannelsLocked, value, [channel, value3]);
value = importAll(3789) /* metro dependency 3789: PermissionUtils */;
areChannelsLocked = value.areChannelsLocked;
channelStoreBinding = ChannelStore;
getChannel = channelStoreBinding.getChannel;
const env0_9 = Reflect.apply(areChannelsLocked, value, [channel, Reflect.apply(getChannel, channelStoreBinding,
[channel.parent_id])]);
this.setState({submitting: true}, _fun116381);
function _fun116374({channel}) { // fn#116374, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15410:1989, offset: 0x02486e79, size: 30 bytes, params: 2, frame: 3
const id = channel.id;
const items2 = [];
Module00862[id] = items2;
return items2;
}
function _fun116375(a0) { // fn#116375, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15410:2028, offset: 0x02486e97, size: 90 bytes, params: 2, frame: 14
var r0;
var binding;
var String;
var parent_id;
var property;
const id = a0.channel.id;
var value;
const value2 = id !== channel.id;
if (value2) {
binding = Module00862;
String = global.String;
parent_id = a0.channel.parent_id;
value = undefined;
property = binding[String(parent_id)];
r0 = property == null ? value : property.push(a0);
} else {
r0 = value2;
}
return r0;
}
function _fun116378(a0) { // fn#116378, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15410:2347, offset: 0x02486f00, size: 45 bytes, params: 2, frame: 4
var r0;
const value2 = a0.id === channel.id;
if (value2) {
a0.parent_id = env0_0;
env0_6 = a0;
r0 = true;
} else {
r0 = value2;
}
return r0;
}
function saveUpdates() { // fn#116379, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15410:2532, owner: value_116371.saveUpdates, offset: 0x02486f2d, size: 69 bytes, params: 1, frame: 13
var environment;
let value = environment.__proto__.__proto__;
value = Reflect.apply((importDefault(6593) /* metro dependency 6593: GuildActionCreators */).batchChannelUpdate,
value, [Module00057, CreateClass]);
return value.then(function() {
return navigation.pop();
});
}
function _fun116381() { // fn#116381, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15410:2620, offset: 0x02486f85, size: 398 bytes, params: 1, frame: 30
var environment;
var value2;
var defaultImport;
var show;
var object;
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
var format;
var property;
var object2;
var moduleValue;
var computeChannelName;
var channelBinding;
var userStoreBinding;
var relationshipStoreBinding;
if (env0_3 == null) {
saveUpdates();
} else if (env0_9) {
if (env0_8) {
saveUpdates();
} else {
value2 = environment.__proto__.__proto__;
defaultImport = importDefault(4647) /* metro dependency 4647: AlertActionCreators */;
show = defaultImport.show;
object = {};
object.title = intl.string(t.YWMtRe);
format = intl.format;
property = t['iKW+jY'];
object2 = {};
moduleValue = require(4805) /* metro dependency 4805: useChannelName */;
computeChannelName = moduleValue.computeChannelName;
channelBinding = channel;
userStoreBinding = UserStore;
relationshipStoreBinding = RelationshipStore;
object2.channelName = Reflect.apply(computeChannelName, moduleValue, [channelBinding, userStoreBinding,
relationshipStoreBinding, true]);
object2.categoryName = (require(4805) /* metro dependency 4805: useChannelName */).computeChannelName(env0_3,
userStoreBinding, relationshipStoreBinding);
object.body = Reflect.apply(format, intl, [property, object2]);
object.confirmText = intl.string(t.eW8Gy4);
object.cancelText = intl.string(t.s4uM3b);
object.onConfirm = onConfirm_116382;
object.onCancel = saveUpdates;
Reflect.apply(show, defaultImport, [object]);
}
} else {
saveUpdates();
}
function onConfirm_116382() { // fn#116382, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15410:2962, offset: 0x02487113, size: 27 bytes, params: 1, frame: 10
env1_6.lock_permissions = true;
saveUpdates();
}
}
}
function value_116383(a0) { // fn#116383, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15410:3074, offset: 0x0248712e, size: 87 bytes, params: 2, frame: 17
const env0_1 = a0;
const TableRow = (TableRowNativeModule).TableRow;
return (
<TableRow
label={a0.name}
onPress={onPress_116384}
key={a0.id}
/>
);
function value_116383OnPress() { // fn#116384, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15410:3135, owner: value_116383.onPress, offset: 0x02487185, size: 29 bytes, params: 1, frame: 11
const binding = env0_0;
return binding.handleSetCategory(env0_1.id);
}
}
function value_116385() { // fn#116385, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15410:3207, offset: 0x024871a2, size: 205 bytes, params: 1, frame: 18
const value = environment.__proto__;
const value3 = env1_5(this.state.categories).slice(0);
const category = this.state.category;
const value4 = null;
if (value4 != category) {
value3.splice(value3.indexOf(category), 1);
}
if (value4 != value3[0] && value3[0].id === 'null') {
value3.shift();
}
const value8 = value3.map(this.renderCategory, this);
if (value8.length > 0) {
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
return (
<TableRowGroup hasIcons={false}>
{value8}
</TableRowGroup>
);
} else {
return value4;
}
}
function value_116386() { // fn#116386, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15410:3488, offset: 0x0248726f, size: 530 bytes, params: 1, frame: 34
var environment;
var r19;
var intl2;
const category = this.state.category;
const value = environment.__proto__;
const property = env1_4(this.state.categories, 1)[0];
const value3 = env1_20(this.context);
const Form = (NativeModule2).Form;
const screenContainer = value3.screenContainer;
const Stack = (StackNativeModule).Stack;
const stackPadding = value3.stackPadding;
const PX_24 = (Native).space.PX_24;
const Text = (TextModule).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const formatToPlainString = intl.formatToPlainString;
const OqccVl = (require(1244) /* metro dependency 1244: indexNative */).t.OqccVl;
const value4 = null;
if (value4 != category) {
r19 = category.name;
} else {
intl2 = (require(1244) /* metro dependency 1244: indexNative */).intl;
r19 = intl2.string((require(1244) /* metro dependency 1244: indexNative */).t.GSfOoo);
}
const items2 = [
<Text variant="text-md/medium" color="text-muted">
{Reflect.apply(formatToPlainString, intl, [OqccVl, {categoryName: r19}])}
</Text>,
];
items2[1] = (
value4 != property
? (
property.id !== 'null'
? value4
: (
value4 != category
? ((TableRowGroup) => <TableRowGroup hasIcons={false}>{((TableRow) => <TableRow label={property.name} onPress={onPress_116387} key={property.id} />)((require(6238) /* metro dependency 6238: TableRowNative */).TableRow)}</TableRowGroup>)((require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup)
: value4
)
)
: value4
);
items2[2] = this.renderCategories();
return (
<Form style={screenContainer}>
<Stack style={stackPadding} spacing={PX_24}>
{items2}
</Stack>
</Form>
);
function value_116386OnPress() { // fn#116387, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15410:4026, owner: value_116386.onPress, offset: 0x02487185, size: 29 bytes, params: 1, frame: 11
const binding = env0_0;
return binding.handleSetCategory(env0_1.id);
}
}
}
function ConnectedChannelSettingsChangeCategory({channelId}) { // fn#116388, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15410:4270, offset: 0x02487481, size: 152 bytes, params: 2, frame: 18
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channelId);
});
const value2 = (UseNavigationNativeModule).useNavigation();
(Module00044)(channel != null,
'ConnectedChannelSettingsChangeCategory: channel cannot be undefined');
return ((Component) => <Component channel={channel} navigation={value2} />)(env0_21);
}
}
function value_116383OnPress() { // fn#116384, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15410:3135, owner: value_116383.onPress, offset: 0x02487185, size: 29 bytes, params: 1, frame: 11
const binding = env0_0;
return binding.handleSetCategory(env0_1.id);
}
function onConfirm_116382() { // fn#116382, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15410:2962, offset: 0x02487113, size: 27 bytes, params: 1, frame: 10
env1_6.lock_permissions = true;
saveUpdates();
}
global.__d(_fun116362, 15213, [57, 862, 6, 7, 15, 17, 18, 31, 1379, 5098, 1867, 3784, 3793, 1878, 661, 33, 4501,
697, 5099, 11879, 3789, 6593, 4647, 1244, 4805, 6238, 6231, 7972, 4572, 4573, 3868, 566, 1484, 44,
2]) /* metro module 15213, dependencies: [57, 862, 6, 7, 15, 17, 18, 31, 1379, 5098, 1867, 3784, 3793, 1878, 661, 33, 4501, 697, 5099, 11879, 3789, 6593, 4647, 1244, 4805, 6238, 6231, 7972, 4572, 4573, 3868, 566, 1484, 44, 2] */;
@@ -1,101 +1,137 @@
/* Metro module 15216; source: components_native/channel_settings/ChannelSettingsChangeDefaultForumLayout.tsx; dependencies: [57, 31, 27, 1379, 33, 4501, 697, 8148, 7988, 1244, 1389, 7987, 15179, 8941, 4573, 6231, 5475, 15217, 15218, 566, 2] */
import Module00057 from '../../by-id/module-00057.js'; /* Metro dependency 57 */
import ChannelStore from '../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import FastImage from '../common/FastImage.tsx'; /* Metro dependency 5475 */
import ChannelSettingsActionCreators from '../../actions/ChannelSettingsActionCreators.tsx'; /* Metro dependency 8148 */
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 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 TableRadioRowNativeModule from '../../design/components/TableRow/native/TableRadioRow.native.tsx'; /* Metro dependency 7987 */
import * as TableRadioGroupNativeModule from '../../design/components/TableRow/native/TableRadioGroup.native.tsx'; /* Metro dependency 7988 */
import * as ListViewIconModule from '../../design/components/Icon/native/redesign/generated/ListViewIcon.tsx'; /* Metro dependency 8941 */
import * as GridSquareIconModule from '../../design/components/Icon/native/redesign/generated/GridSquareIcon.tsx'; /* Metro dependency 15179 */
function _fun116424(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116424, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15413:6, offset: 0x02488a86, size: 405 bytes, params: 8, frame: 23
var object4;
const env0_0 = require;
const closure = ChannelSettingsChangeDefaultForumLayout;
const ChannelSettingsChangeDefaultForumLayout2 = ChannelSettingsChangeDefaultForumLayout;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
let value = require(33) /* metro dependency 33 */;
let value = JsxRuntimeModule;
const env0_7 = value.jsx;
const env0_8 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object4 = {};
const object5 = {flex: 1};
object = {};
const object2 = {flex: 1};
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
object5.backgroundColor = BACKGROUND_BASE_LOWER;
object2.backgroundColor = BACKGROUND_BASE_LOWER;
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object5.paddingHorizontal = PX_16;
object2.paddingHorizontal = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object5.paddingTop = PX_16;
object4.container = object5;
const object6 = {};
object2.paddingTop = PX_16;
object.container = object2;
const object3 = {};
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object6.paddingTop = PX_8;
object3.paddingTop = PX_8;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object6.paddingBottom = PX_16;
object4.description = object6;
object4.thumbnailImagePortrait = {alignSelf: 'center'};
const env0_9 = Reflect.apply(createStyles, value, [object4]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/channel_settings/ChannelSettingsChangeDefaultForumLayout.tsx');
object3.paddingBottom = PX_16;
object.description = object3;
object.thumbnailImagePortrait = {alignSelf: 'center'};
const env0_9 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('components_native/channel_settings/ChannelSettingsChangeDefaultForumLayout.tsx');
exports.default = ConnectedChannelSettingsChangeDefaultForumLayout;
exports.ChannelSettingsChangeDefaultForumLayout = closure;
}
exports.ChannelSettingsChangeDefaultForumLayout = ChannelSettingsChangeDefaultForumLayout2;
function ChannelSettingsChangeDefaultForumLayout({channel}) { // fn#116425, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15413:457, offset: 0x02488c1b, size: 903 bytes, params: 2, frame: 30
const styles = useStyles();
const useState = ReactModule.useState;
const value3 = Module00057(Reflect.apply(useState, ReactModule, [channel.defaultForumLayout]), 2);
const property = value3[0];
const env0_1 = value3[1];
const value4 = ReactModule.useCallback(_fun116426, [channel.id]);
const TableRadioGroup = (TableRadioGroupNativeModule).TableRadioGroup;
const object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
object2.title = Reflect.apply(string, intl, [(require(1244) /* metro dependency 1244: indexNative */).t.mFMDSq]);
object2.defaultValue = property ?? (require(1389) /* metro dependency 1389: ForumLayout */).ForumLayout.LIST;
object2.onChange = value4;
object2.hasIcons = true;
const TableRadioRow = (TableRadioRowNativeModule).TableRadioRow;
const object3 = {};
const GridSquareIcon = (GridSquareIconModule).GridSquareIcon;
object3.icon = <GridSquareIcon />;
object3.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['U+rQfW']);
const ForumLayout = (require(1389) /* metro dependency 1389: ForumLayout */).ForumLayout;
let GRID = ForumLayout.GRID;
object3.value = GRID;
const tableRadioRow = <TableRadioRow {...object3} />;
const object4 = {};
const ListViewIcon = (ListViewIconModule).ListViewIcon;
object4.icon = <ListViewIcon />;
object4.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.tuHPRX);
const LIST = ForumLayout.LIST;
object4.value = LIST;
const items2 = [
<TableRadioGroup {...object2}>
{tableRadioRow}
<TableRadioRow {...object4} />
</TableRadioGroup>,
];
const Text = (TextModule).Text;
string = intl.string;
const MbX5Hu = (require(1244) /* metro dependency 1244: indexNative */).t.MbX5Hu;
items2[1] = (
<Text
style={styles.description}
variant="text-sm/medium"
color="text-muted"
>
{Reflect.apply(string, intl, [MbX5Hu])}
</Text>
);
const TableRowGroupTitle = (TableRowGroupNativeModule).TableRowGroupTitle;
items2[2] = (
<TableRowGroupTitle title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.e4oMl4)} />
);
GRID = ForumLayout.GRID;
items2[3] = (
<FastImage
style={styles.thumbnailImagePortrait}
source={property === GRID ? importDefault(15217) /* metro dependency 15217 */ : importDefault(15218) /* metro dependency 15218 */}
/>
);
return (
<View style={styles.container}>
{items2}
</View>
);
function _fun116426(a0) { // fn#116426, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15413:604, offset: 0x02488fa2, size: 97 bytes, params: 2, frame: 19
env0_1(a0);
(ChannelSettingsActionCreators).updateChannel({defaultForumLayout: a0});
const defaultImport2 = ChannelSettingsActionCreators;
defaultImport2.saveChannel(channel.id, {defaultForumLayout: a0});
}
function ChannelSettingsChangeDefaultForumLayout({channel}) { // fn#116425, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15413:457, offset: 0x02488c1b, size: 903 bytes, params: 2, frame: 30
const styles = useStyles();
const binding = env0_4;
const useState = binding.useState;
const value3 = env0_3(Reflect.apply(useState, binding, [channel.defaultForumLayout]), 2);
const property = value3[0];
const env0_1 = value3[1];
const value4 = env0_4.useCallback(_fun116426, [channel.id]);
const TableRadioGroup = (require(7988) /* metro dependency 7988: TableRadioGroupNative */).TableRadioGroup;
const object = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
object.title = Reflect.apply(string, intl, [(require(1244) /* metro dependency 1244: indexNative */).t.mFMDSq]);
object.defaultValue = property ?? (require(1389) /* metro dependency 1389: ForumLayout */).ForumLayout.LIST;
object.onChange = value4;
object.hasIcons = true;
const TableRadioRow = (require(7987) /* metro dependency 7987: TableRadioRowNative */).TableRadioRow;
const object5 = {};
const GridSquareIcon = (require(15179) /* metro dependency 15179: GridSquareIcon */).GridSquareIcon;
object5.icon = <GridSquareIcon />;
object5.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['U+rQfW']);
const ForumLayout = (require(1389) /* metro dependency 1389: ForumLayout */).ForumLayout;
let GRID = ForumLayout.GRID;
object5.value = GRID;
const tableRadioRow = <TableRadioRow {...object5} />;
const object6 = {};
const ListViewIcon = (require(8941) /* metro dependency 8941: ListViewIcon */).ListViewIcon;
object6.icon = <ListViewIcon />;
object6.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.tuHPRX);
const LIST = ForumLayout.LIST;
object6.value = LIST;
const items2 = [<TableRadioGroup {...object}>{tableRadioRow}<TableRadioRow {...object6} /></TableRadioGroup>];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
string = intl.string;
const MbX5Hu = (require(1244) /* metro dependency 1244: indexNative */).t.MbX5Hu;
items2[1] = <Text style={styles.description} variant="text-sm/medium" color="text-muted">{Reflect.apply(string,
intl, [MbX5Hu])}</Text>;
const TableRowGroupTitle = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroupTitle;
items2[2] = <TableRowGroupTitle title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.e4oMl4)} />;
const FastImage = importDefault(5475) /* metro dependency 5475: FastImage */;
GRID = ForumLayout.GRID;
items2[3] = <FastImage style={styles.thumbnailImagePortrait} source={property === GRID ? importDefault(15217) /* metro dependency 15217 */ : importDefault(15218) /* metro dependency 15218 */} />;
return (
<View style={styles.container}>
{items2}
</View>
);
}
}
function ConnectedChannelSettingsChangeDefaultForumLayout({channelId}) { // fn#116427, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15413:1626, offset: 0x02489003, size: 100 bytes, params: 2, frame: 16
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channelId);
});
return channel == null ? null : <ChannelSettingsChangeDefaultForumLayout channel={channel} />;
}
function ConnectedChannelSettingsChangeDefaultForumLayout({channelId}) { // fn#116427, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15413:1626, offset: 0x02489003, size: 100 bytes, params: 2, frame: 16
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channelId);
});
return (
channel == null
? null
: (
<ChannelSettingsChangeDefaultForumLayout channel={channel} />
)
);
}
function _fun116426(a0) { // fn#116426, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15413:604, offset: 0x02488fa2, size: 97 bytes, params: 2, frame: 19
env0_1(a0);
(importDefault(8148) /* metro dependency 8148: ChannelSettingsActionCreators */).updateChannel({defaultForumLayout: a0});
const defaultImport2 = importDefault(8148) /* metro dependency 8148: ChannelSettingsActionCreators */;
defaultImport2.saveChannel(channel.id, {defaultForumLayout: a0});
}
global.__d(_fun116424, 15216, [57, 31, 27, 1379, 33, 4501, 697, 8148, 7988, 1244, 1389, 7987, 15179, 8941, 4573,
6231, 5475, 15217, 15218, 566,
2]) /* metro module 15216, dependencies: [57, 31, 27, 1379, 33, 4501, 697, 8148, 7988, 1244, 1389, 7987, 15179, 8941, 4573, 6231, 5475, 15217, 15218, 566, 2] */;
@@ -1,197 +1,210 @@
/* Metro module 15214; source: components_native/channel_settings/ChannelSettingsChangeRTCRegion.tsx; dependencies: [862, 6, 7, 15, 17, 18, 31, 1379, 15173, 33, 4501, 697, 1244, 8148, 7987, 7988, 7972, 3868, 566, 44, 2] */
import ClassCallCheck from '../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import Module00044 from '../../by-id/module-00044.js'; /* Metro dependency 44 */
import Native from '../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import Module00862 from '../../by-id/module-00862.js'; /* Metro dependency 862 */
import ChannelStore from '../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import RegionStore from '../../stores/RegionStore.tsx'; /* Metro dependency 15173 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as NativeModule from '../../external/discord_common/js/packages/design/native.tsx'; /* Metro dependency 3868 */
import * as CreateStylesModule from '../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as NativeModule2 from '../../design/void/Form/native/index.tsx'; /* Metro dependency 7972 */
import * as TableRadioRowNativeModule from '../../design/components/TableRow/native/TableRadioRow.native.tsx'; /* Metro dependency 7987 */
import * as TableRadioGroupNativeModule from '../../design/components/TableRow/native/TableRadioGroup.native.tsx'; /* Metro dependency 7988 */
function _fun116390(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116390, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15411:6, offset: 0x02487519, size: 409 bytes, params: 8, frame: 23
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(862) /* metro dependency 862 */;
const env0_4 = importDefault(6) /* metro dependency 6 */;
const env0_5 = importDefault(7) /* metro dependency 7 */;
const env0_6 = importDefault(15) /* metro dependency 15 */;
const env0_7 = importDefault(17) /* metro dependency 17 */;
const env0_8 = importDefault(18) /* metro dependency 18 */;
let value = importAll(31) /* metro dependency 31 */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const regionStore = importDefault(15173) /* metro dependency 15173: RegionStore */;
const env0_11 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createLegacyClassComponentStyles = createStylesModule.createLegacyClassComponentStyles;
const object = {};
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
object.backgroundColor = BACKGROUND_BASE_LOWER;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object.paddingHorizontal = PX_16;
const env0_12 = Reflect.apply(createLegacyClassComponentStyles, createStylesModule, [{form: object}]);
let value = ReactModule;
const createLegacyClassComponentStyles = CreateStylesModule.createLegacyClassComponentStyles;
const object2 = {};
const BACKGROUND_BASE_LOWER = (Native).colors.BACKGROUND_BASE_LOWER;
object2.backgroundColor = BACKGROUND_BASE_LOWER;
const PX_16 = (Native).space.PX_16;
object2.paddingHorizontal = PX_16;
const env0_12 = Reflect.apply(createLegacyClassComponentStyles, CreateStylesModule, [{form: object2}]);
const PureComponent = value.PureComponent;
value = _fun116394(PureComponent);
const ThemeContext = (require(3868) /* metro dependency 3868: native */).ThemeContext;
const ThemeContext = (NativeModule).ThemeContext;
value.contextType = ThemeContext;
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/channel_settings/ChannelSettingsChangeRTCRegion.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/channel_settings/ChannelSettingsChangeRTCRegion.tsx');
exports.default = ConnectedChannelSettingsChangeRTCRegion;
}
function _isNativeReflectConstruct_116391() { // fn#116391, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15411:202, offset: 0x024876b2, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
function _isNativeReflectConstruct_116391() { // fn#116391, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15411:202, offset: 0x024876b2, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_116391_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_116391_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun116394(a0) { // fn#116394, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15411:573, offset: 0x02487714, size: 153 bytes, params: 2, frame: 16
const closure = ChannelSettingsChangeRTCRegion;
env0_8(closure, a0);
return env0_5(closure, [{key: 'handleSetRegion', value: value_116399}, {key: 'renderRegion', value: value_116401},
{key: 'renderRegions', value: value_116402}, {key: 'render', value: value_116404}]);
}
function _fun116394(a0) { // fn#116394, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15411:573, offset: 0x02487714, size: 153 bytes, params: 2, frame: 16
const ChannelSettingsChangeRTCRegion2 = ChannelSettingsChangeRTCRegion;
Inherits(ChannelSettingsChangeRTCRegion2, a0);
return CreateClass(ChannelSettingsChangeRTCRegion2, [{key: 'handleSetRegion', value: value_116399}, {key: 'renderRegion',
value: value_116401}, {key: 'renderRegions', value: value_116402}, {key: 'render', value: value_116404}]);
function ChannelSettingsChangeRTCRegion(a0) { // fn#116395, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15411:585, offset: 0x024877ad, size: 149 bytes, params: 2, frame: 20
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_4;
binding(this, ChannelSettingsChangeRTCRegion);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_7(ChannelSettingsChangeRTCRegion);
binding = env1_6;
if (_isNativeReflectConstruct_116391()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_7(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
value.state = _fun116396();
return value;
function _fun116396() { // fn#116396, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15411:870, offset: 0x02487842, size: 272 bytes, params: 1, frame: 21
var push;
var value6;
var items2;
var value7;
const object = {'regions': null, 'submitting': false, 'selectedRegionId': 'AUTOMATIC_RTC_REGION'};
object.regions = [];
const value = 'AUTOMATIC_RTC_REGION';
const regionStoreBinding = RegionStore;
const getRegions = regionStoreBinding.getRegions;
const channel = env0_0.props.channel;
const getGuildId = channel.getGuildId;
const value4 = Reflect.apply(getRegions, regionStoreBinding, [Reflect.apply(getGuildId, channel, [])]);
const value5 = undefined;
const intl = require(dependencyMap[12]).intl;
const string = intl.string;
const JEmsap = require(dependencyMap[12]).t.JEmsap;
const items3 = [{'id': 'AUTOMATIC_RTC_REGION', 'name': null, 'sample_hostname': '', 'sample_port': 0, 'vip': false,
'deprecated': false, 'optimal': false, 'hidden': false, name: Reflect.apply(string, intl, [JEmsap])}];
if (value4 != null) {
push = items3.push;
value6 = value4.filter(function(a0) {
return !a0.deprecated && !a0.hidden;
});
items2 = [];
arraySpread(items2, value6, 0, dependencyMap);
apply(push, items2, items3, dependencyMap);
value7 = value4.find(_fun116398);
object.selectedRegionId = (value7 == null ? value5 : value7.id) ?? value;
}
object.regions = items3;
return object;
function _fun116398({id}) { // fn#116398, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15411:1213, offset: 0x0248796c, size: 37 bytes, params: 2, frame: 2
return id === env1_0.props.channel.rtcRegion;
}
function ConnectedChannelSettingsChangeRTCRegion({channelId}) { // fn#116405, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15411:2249, offset: 0x02487ba5, size: 125 bytes, params: 2, frame: 17
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channelId);
});
(importDefault(44) /* metro dependency 44 */)(channel != null,
'ConnectedChannelSettingsChangeRTCRegion: channel cannot be undefined');
return ((Component) => <Component channel={channel} />)(env0_13);
}
}
}
function value_116399(a0) { // fn#116399, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15411:1403, offset: 0x02487991, size: 131 bytes, params: 2, frame: 17
var environment;
let value = a0;
const state = this.state;
const value2 = null;
const value3 = 'AUTOMATIC_RTC_REGION';
state.selectedRegionId = value2 != value ? value : value3;
const r6 = value !== value3 ? value : value2;
value = environment.__proto__;
value = importDefault(8148) /* metro dependency 8148: ChannelSettingsActionCreators */;
value.updateChannel({rtcRegion: r6});
this.setState({submitting: true}, _fun116400);
function _fun116400() { // fn#116400, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15411:1540, offset: 0x02487a14, size: 72 bytes, params: 1, frame: 15
let value = environment.__proto__.__proto__;
value = importDefault(8148) /* metro dependency 8148: ChannelSettingsActionCreators */;
value.saveChannel(env0_0.props.channel.id, {rtcRegion: env0_1});
}
}
function value_116401(a0) { // fn#116401, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15411:1634, offset: 0x02487a5c, size: 72 bytes, params: 2, frame: 16
const TableRadioRow = (TableRadioRowNativeModule).TableRadioRow;
return (
<TableRadioRow
label={a0.name}
value={a0.id}
key={a0.id}
/>
);
}
function value_116402() { // fn#116402, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15411:1739, offset: 0x02487aa4, size: 144 bytes, params: 1, frame: 17
const value3 = env1_3(this.state.regions).slice(0);
const value4 = value3.map(this.renderRegion, this);
const TableRadioGroup = (TableRadioGroupNativeModule).TableRadioGroup;
return (
<TableRadioGroup
defaultValue={this.state.selectedRegionId}
onChange={onChange_116403}
hasIcons={false}
>
{value4}
</TableRadioGroup>
);
function value_116402OnChange(a0) { // fn#116403, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15411:1900, owner: value_116402.onChange, offset: 0x02487b34, size: 25 bytes, params: 2, frame: 11
return env0_0.handleSetRegion(a0);
}
}
function value_116404() { // fn#116404, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15411:1974, offset: 0x02487b4d, size: 88 bytes, params: 1, frame: 16
const value2 = env1_12(this.context);
const Form = (NativeModule2).Form;
return (
<Form style={value2.form}>
{this.renderRegions()}
</Form>
);
}
function ChannelSettingsChangeRTCRegion(a0) { // fn#116395, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15411:585, offset: 0x024877ad, size: 149 bytes, params: 2, frame: 20
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_4;
binding(this, ChannelSettingsChangeRTCRegion);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_7(ChannelSettingsChangeRTCRegion);
binding = env1_6;
if (_isNativeReflectConstruct_116391()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_7(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
value.state = _fun116396();
return value;
}
function value_116399(a0) { // fn#116399, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15411:1403, offset: 0x02487991, size: 131 bytes, params: 2, frame: 17
var environment;
let value = a0;
const state = this.state;
const value2 = null;
const value3 = 'AUTOMATIC_RTC_REGION';
state.selectedRegionId = value2 != value ? value : value3;
const r6 = value !== value3 ? value : value2;
value = environment.__proto__;
value = importDefault(8148) /* metro dependency 8148: ChannelSettingsActionCreators */;
value.updateChannel({rtcRegion: r6});
this.setState({submitting: true}, _fun116400);
}
function value_116401(a0) { // fn#116401, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15411:1634, offset: 0x02487a5c, size: 72 bytes, params: 2, frame: 16
const TableRadioRow = (require(7987) /* metro dependency 7987: TableRadioRowNative */).TableRadioRow;
return (
<TableRadioRow
label={a0.name}
value={a0.id}
key={a0.id}
/>
);
}
function value_116402() { // fn#116402, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15411:1739, offset: 0x02487aa4, size: 144 bytes, params: 1, frame: 17
const value3 = env1_3(this.state.regions).slice(0);
const value4 = value3.map(this.renderRegion, this);
const TableRadioGroup = (require(7988) /* metro dependency 7988: TableRadioGroupNative */).TableRadioGroup;
return (
<TableRadioGroup
defaultValue={this.state.selectedRegionId}
onChange={onChange_116403}
hasIcons={false}
>
{value4}
</TableRadioGroup>
);
}
function value_116404() { // fn#116404, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15411:1974, offset: 0x02487b4d, size: 88 bytes, params: 1, frame: 16
const value2 = env1_12(this.context);
const Form = (require(7972) /* metro dependency 7972: native */).Form;
return (
<Form style={value2.form}>
{this.renderRegions()}
</Form>
);
}
function _fun116396() { // fn#116396, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15411:870, offset: 0x02487842, size: 272 bytes, params: 1, frame: 21
var push;
var value6;
var items2;
var value7;
const object2 = {'regions': null, 'submitting': false, 'selectedRegionId': 'AUTOMATIC_RTC_REGION'};
object2.regions = [];
const value = 'AUTOMATIC_RTC_REGION';
const getRegions = RegionStore.getRegions;
const channel = env0_0.props.channel;
const getGuildId = channel.getGuildId;
const value4 = Reflect.apply(getRegions, RegionStore, [Reflect.apply(getGuildId, channel, [])]);
const value5 = undefined;
const intl = require(dependencyMap[12]).intl;
const string = intl.string;
const JEmsap = require(dependencyMap[12]).t.JEmsap;
const items3 = [{'id': 'AUTOMATIC_RTC_REGION', 'name': null, 'sample_hostname': '', 'sample_port': 0, 'vip': false,
'deprecated': false, 'optimal': false, 'hidden': false, name: Reflect.apply(string, intl, [JEmsap])}];
if (value4 != null) {
push = items3.push;
value6 = value4.filter(function(a0) {
return !a0.deprecated && !a0.hidden;
function ConnectedChannelSettingsChangeRTCRegion({channelId}) { // fn#116405, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15411:2249, offset: 0x02487ba5, size: 125 bytes, params: 2, frame: 17
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channelId);
});
items2 = [];
arraySpread(items2, value6, 0, dependencyMap);
apply(push, items2, items3, dependencyMap);
value7 = value4.find(_fun116398);
object2.selectedRegionId = (value7 == null ? value5 : value7.id) ?? value;
(Module00044)(channel != null,
'ConnectedChannelSettingsChangeRTCRegion: channel cannot be undefined');
return ((Component) => <Component channel={channel} />)(env0_13);
}
object2.regions = items3;
return object2;
}
function _fun116400() { // fn#116400, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15411:1540, offset: 0x02487a14, size: 72 bytes, params: 1, frame: 15
let value = environment.__proto__.__proto__;
value = importDefault(8148) /* metro dependency 8148: ChannelSettingsActionCreators */;
value.saveChannel(env0_0.props.channel.id, {rtcRegion: env0_1});
}
function value_116402OnChange(a0) { // fn#116403, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15411:1900, owner: value_116402.onChange, offset: 0x02487b34, size: 25 bytes, params: 2, frame: 11
return env0_0.handleSetRegion(a0);
}
function _fun116398({id}) { // fn#116398, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15411:1213, offset: 0x0248796c, size: 37 bytes, params: 2, frame: 2
return id === env1_0.props.channel.rtcRegion;
}
global.__d(_fun116390, 15214, [862, 6, 7, 15, 17, 18, 31, 1379, 15173, 33, 4501, 697, 1244, 8148, 7987, 7988, 7972,
3868, 566, 44,
2]) /* metro module 15214, dependencies: [862, 6, 7, 15, 17, 18, 31, 1379, 15173, 33, 4501, 697, 1244, 8148, 7987, 7988, 7972, 3868, 566, 44, 2] */;
@@ -1,8 +1,11 @@
/* Metro module 15174; source: components_native/channel_settings/ChannelSettingsConstants.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun115944(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115944, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15371:6, offset: 0x024755b3, size: 92 bytes, params: 8, frame: 16
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/channel_settings/ChannelSettingsConstants.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/channel_settings/ChannelSettingsConstants.tsx');
exports.ChannelSettingsAutoFocusElement = {CHANNEL_NAME: 'channel-name'};
}
global.__d(_fun115944, 15174, [2]) /* metro module 15174, dependencies: [2] */;
@@ -1,205 +1,256 @@
/* Metro module 15183; source: components_native/channel_settings/ChannelSettingsInstantInvites.tsx; dependencies: [57, 31, 27, 8149, 1379, 661, 33, 4501, 697, 1585, 566, 8148, 12132, 1305, 12146, 12147, 1244, 5460, 15184, 8671, 2] */
import Module00057 from '../../by-id/module-00057.js'; /* Metro dependency 57 */
import ChannelStore from '../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import UseSafeAreaInsetsNative from '../../modules/safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import ChannelSettingsStore from '../../stores/ChannelSettingsStore.tsx'; /* Metro dependency 8149 */
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 FluxModule from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../intl/index.native.tsx'; /* Metro dependency 1244 */
function _fun115996(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115996, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15380:6, offset: 0x02477699, size: 359 bytes, params: 8, frame: 23
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
const channelSettingsStore = importDefault(8149) /* metro dependency 8149: ChannelSettingsStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const env0_8 = (require(661) /* metro dependency 661: Constants */).ChannelSettingsSections;
let value = require(33) /* metro dependency 33 */;
let value = JsxRuntimeModule;
const env0_9 = value.jsx;
const env0_10 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object3 = {};
const object4 = {};
object = {};
const object2 = {};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.paddingHorizontal = PX_16;
object2.paddingHorizontal = PX_16;
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
object4.backgroundColor = BACKGROUND_BASE_LOWER;
object4.flex = 1;
object3.content = object4;
object2.backgroundColor = BACKGROUND_BASE_LOWER;
object2.flex = 1;
object.content = object2;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object3.gap = {height: PX_16};
const env0_11 = Reflect.apply(createStyles, value, [object3]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/channel_settings/ChannelSettingsInstantInvites.tsx');
object.gap = {height: PX_16};
const env0_11 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('components_native/channel_settings/ChannelSettingsInstantInvites.tsx');
exports.default = ConnectedChannelSettingsInstantInvites;
}
function ConnectedChannelSettingsInstantInvites() { // fn#115997, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15380:494, offset: 0x02477800, size: 845 bytes, params: 1, frame: 29
var r7;
var r1;
var r0;
var EmptyState;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var items2;
var value;
const styles = useStyles();
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
const binding = env0_4;
const [property, env0_1] = env0_3(binding.useState(undefined), 2);
const value4 = binding.useCallback(_fun115998, [styles]);
const env0_2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelSettingsStore],
function() {
return ChannelSettingsStore.getChannel();
});
const {invites,
loading} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([ChannelSettingsStore],
function() {
return ChannelSettingsStore.getInvites();
});
const value8 = binding.useMemo(_fun116005, [binding.useMemo(_fun116001, [invites]),
(require(566) /* metro dependency 566: flux */).useStateFromStoresArray([ChannelStore], _fun116003)]);
items = [value8.length];
binding.useEffect(function() {
importDefault(dependencyMap[11]).setSection(ChannelSettingsSections.INSTANT_INVITES);
}, []);
const value9 = binding.useCallback(_fun116009, [value8]);
if (loading) {
if (loading) {
var viewBindingProps = {style: styles.content};
items2 = [((SceneLoadingIndicator) => <SceneLoadingIndicator />)((require(5460) /* metro dependency 5460: SceneLoadingIndicatorNative */).SceneLoadingIndicator)];
if (value8.length > 0) {
value = importDefault(15184) /* metro dependency 15184: InstantInviteSelfMeasurer */;
value = ((Component) => <Component item={value8[0]} onMeasured={value4} />)(value);
r7 = value;
} else {
r7 = null;
}
items2[1] = r7;
value = <View {...viewBindingProps}>{items2}</View>;
r1 = value;
} else if (property == null) {
var viewBindingProps = {style: styles.content};
items2 = [((SceneLoadingIndicator) => <SceneLoadingIndicator />)((require(5460) /* metro dependency 5460: SceneLoadingIndicatorNative */).SceneLoadingIndicator)];
if (value8.length > 0) {
value = importDefault(15184) /* metro dependency 15184: InstantInviteSelfMeasurer */;
value = ((Component) => <Component item={value8[0]} onMeasured={value4} />)(value);
r7 = value;
} else {
r7 = null;
}
items2[1] = r7;
value = <View {...viewBindingProps}>{items2}</View>;
r1 = value;
} else {
var viewBindingProps = {style: styles.content};
value = importDefault(8671) /* metro dependency 8671: FastestListAndroid */;
value = <View {...viewBindingProps}>{((Component) => <Component sections={items} estimatedListSize="windowSize" itemSize={property} renderItem={value9} insetStart={styles.gap.height} insetEnd={bottom} />)(value)}</View>;
r1 = value;
}
r0 = r1;
} else if (value8.length !== 0) {
if (loading) {
var viewBindingProps = {style: styles.content};
items2 = [((SceneLoadingIndicator) => <SceneLoadingIndicator />)((require(5460) /* metro dependency 5460: SceneLoadingIndicatorNative */).SceneLoadingIndicator)];
if (value8.length > 0) {
value = importDefault(15184) /* metro dependency 15184: InstantInviteSelfMeasurer */;
value = ((Component) => <Component item={value8[0]} onMeasured={value4} />)(value);
r7 = value;
} else {
r7 = null;
}
items2[1] = r7;
value = <View {...viewBindingProps}>{items2}</View>;
r1 = value;
} else if (property == null) {
var viewBindingProps = {style: styles.content};
items2 = [((SceneLoadingIndicator) => <SceneLoadingIndicator />)((require(5460) /* metro dependency 5460: SceneLoadingIndicatorNative */).SceneLoadingIndicator)];
if (value8.length > 0) {
value = importDefault(15184) /* metro dependency 15184: InstantInviteSelfMeasurer */;
value = ((Component) => <Component item={value8[0]} onMeasured={value4} />)(value);
r7 = value;
} else {
r7 = null;
}
items2[1] = r7;
value = <View {...viewBindingProps}>{items2}</View>;
r1 = value;
} else {
var viewBindingProps = {style: styles.content};
value = importDefault(8671) /* metro dependency 8671: FastestListAndroid */;
value = <View {...viewBindingProps}>{((Component) => <Component sections={items} estimatedListSize="windowSize" itemSize={property} renderItem={value9} insetStart={styles.gap.height} insetEnd={bottom} />)(value)}</View>;
r1 = value;
}
r0 = r1;
} else {
EmptyState = (require(1305) /* metro dependency 1305: native */).EmptyState;
r0 = <EmptyState lightSource={importDefault(12146) /* metro dependency 12146 */} darkSource={importDefault(12147) /* metro dependency 12147 */} title={intl.string(t['+nLJkZ'])} body={intl.string(t.F53CAc)} />;
}
return r0;
}
function _fun115998(a0) { // fn#115998, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15380:634, offset: 0x02477b4d, size: 37 bytes, params: 2, frame: 11
env0_1(a0 + styles.gap.height);
}
function _fun116001() { // fn#116001, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15380:818, offset: 0x02477b97, size: 47 bytes, params: 1, frame: 11
const Object = global.Object;
return Object.values(invites).sort(function(a0, a1) {
var r2;
var property = a0.inviter;
var value = undefined;
r2 = property == null ? value : property.username;
var value2 = '';
var value3 = (r2 ?? value2).toLowerCase();
property = a1.inviter;
return value3.localeCompare(((property == null ? value : property.username) ?? value2).toLowerCase());
});
}
function _fun116003() { // fn#116003, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15380:1082, offset: 0x02477c34, size: 67 bytes, params: 1, frame: 12
var environment;
var r0;
var value2;
var value;
if (channel != null) {
value2 = environment.__proto__;
value = ChannelStore.getSortedLinkedChannelsForGuild(channel.guild_id);
value = value.filter(function({id}) {
return id === channel.id;
function ConnectedChannelSettingsInstantInvites() { // fn#115997, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15380:494, offset: 0x02477800, size: 845 bytes, params: 1, frame: 29
var r7;
var r1;
var r0;
var EmptyState;
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
var items2;
var value;
const styles = useStyles();
const bottom = (UseSafeAreaInsetsNative)().bottom;
const [property, env0_1] = Module00057(ReactModule.useState(undefined), 2);
const value4 = ReactModule.useCallback(_fun115998, [styles]);
const useStateFromStores = FluxModule.useStateFromStores;
const channelSettingsStoreBinding = ChannelSettingsStore;
const env0_2 = Reflect.apply(useStateFromStores, FluxModule, [[channelSettingsStoreBinding], function() {
return ChannelSettingsStore.getChannel();
}]);
const {invites, loading} = FluxModule.useStateFromStoresObject([channelSettingsStoreBinding], function() {
return ChannelSettingsStore.getInvites();
});
r0 = value;
} else {
r0 = [];
const value8 = ReactModule.useMemo(_fun116005, [ReactModule.useMemo(_fun116001, [invites]),
FluxModule.useStateFromStoresArray([ChannelStore], _fun116003)]);
items = [value8.length];
ReactModule.useEffect(function() {
importDefault(dependencyMap[11]).setSection(ChannelSettingsSections.INSTANT_INVITES);
}, []);
const value9 = ReactModule.useCallback(_fun116009, [value8]);
if (loading) {
if (loading) {
var viewBindingProps = {style: styles.content};
const SceneLoadingIndicator = (require(5460) /* metro dependency 5460: SceneLoadingIndicatorNative */).SceneLoadingIndicator;
items2 = [
<SceneLoadingIndicator />,
];
if (value8.length > 0) {
value = importDefault(15184) /* metro dependency 15184: InstantInviteSelfMeasurer */;
value = ((Component) => <Component item={value8[0]} onMeasured={value4} />)(value);
r7 = value;
} else {
r7 = null;
}
items2[1] = r7;
value = (
<View {...viewBindingProps}>
{items2}
</View>
);
r1 = value;
} else if (property == null) {
var viewBindingProps = {style: styles.content};
const SceneLoadingIndicator2 = (require(5460) /* metro dependency 5460: SceneLoadingIndicatorNative */).SceneLoadingIndicator;
items2 = [
<SceneLoadingIndicator2 />,
];
if (value8.length > 0) {
value = importDefault(15184) /* metro dependency 15184: InstantInviteSelfMeasurer */;
value = ((Component) => <Component item={value8[0]} onMeasured={value4} />)(value);
r7 = value;
} else {
r7 = null;
}
items2[1] = r7;
value = (
<View {...viewBindingProps}>
{items2}
</View>
);
r1 = value;
} else {
var viewBindingProps = {style: styles.content};
value = importDefault(8671) /* metro dependency 8671: FastestListAndroid */;
value = (
<View {...viewBindingProps}>
{((Component) => <Component sections={items} estimatedListSize="windowSize" itemSize={property} renderItem={value9} insetStart={styles.gap.height} insetEnd={bottom} />)(value)}
</View>
);
r1 = value;
}
r0 = r1;
} else if (value8.length !== 0) {
if (loading) {
var viewBindingProps = {style: styles.content};
const SceneLoadingIndicator3 = (require(5460) /* metro dependency 5460: SceneLoadingIndicatorNative */).SceneLoadingIndicator;
items2 = [
<SceneLoadingIndicator3 />,
];
if (value8.length > 0) {
value = importDefault(15184) /* metro dependency 15184: InstantInviteSelfMeasurer */;
value = ((Component) => <Component item={value8[0]} onMeasured={value4} />)(value);
r7 = value;
} else {
r7 = null;
}
items2[1] = r7;
value = (
<View {...viewBindingProps}>
{items2}
</View>
);
r1 = value;
} else if (property == null) {
var viewBindingProps = {style: styles.content};
const SceneLoadingIndicator4 = (require(5460) /* metro dependency 5460: SceneLoadingIndicatorNative */).SceneLoadingIndicator;
items2 = [
<SceneLoadingIndicator4 />,
];
if (value8.length > 0) {
value = importDefault(15184) /* metro dependency 15184: InstantInviteSelfMeasurer */;
value = ((Component) => <Component item={value8[0]} onMeasured={value4} />)(value);
r7 = value;
} else {
r7 = null;
}
items2[1] = r7;
value = (
<View {...viewBindingProps}>
{items2}
</View>
);
r1 = value;
} else {
var viewBindingProps = {style: styles.content};
value = importDefault(8671) /* metro dependency 8671: FastestListAndroid */;
value = (
<View {...viewBindingProps}>
{((Component) => <Component sections={items} estimatedListSize="windowSize" itemSize={property} renderItem={value9} insetStart={styles.gap.height} insetEnd={bottom} />)(value)}
</View>
);
r1 = value;
}
r0 = r1;
} else {
EmptyState = (require(1305) /* metro dependency 1305: native */).EmptyState;
r0 = (
<EmptyState
lightSource={importDefault(12146) /* metro dependency 12146 */}
darkSource={importDefault(12147) /* metro dependency 12147 */}
title={intl.string(t['+nLJkZ'])}
body={intl.string(t.F53CAc)}
/>
);
}
return r0;
function _fun115998(a0) { // fn#115998, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15380:634, offset: 0x02477b4d, size: 37 bytes, params: 2, frame: 11
env0_1(a0 + styles.gap.height);
}
function _fun116001() { // fn#116001, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15380:818, offset: 0x02477b97, size: 47 bytes, params: 1, frame: 11
const Object = global.Object;
return Object.values(invites).sort(function(a0, a1) {
var r2;
var property = a0.inviter;
var value = undefined;
r2 = property == null ? value : property.username;
var value2 = '';
var value3 = (r2 ?? value2).toLowerCase();
property = a1.inviter;
return value3.localeCompare(((property == null ? value : property.username) ?? value2).toLowerCase());
});
}
function _fun116003() { // fn#116003, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15380:1082, offset: 0x02477c34, size: 67 bytes, params: 1, frame: 12
var environment;
var r0;
var value2;
var channelStoreBinding;
var value;
if (channel != null) {
value2 = environment.__proto__;
channelStoreBinding = ChannelStore;
value = channelStoreBinding.getSortedLinkedChannelsForGuild(channel.guild_id);
value = value.filter(function({id}) {
return id === channel.id;
});
r0 = value;
} else {
r0 = [];
}
return r0;
}
function _fun116005() { // fn#116005, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15380:1183, offset: 0x02477c91, size: 69 bytes, params: 1, frame: 15
let binding = ReactModule;
const value2 = binding.map(function(a0) {
return {type: 'invite', data: a0};
});
const items2 = [];
const value3 = arraySpread(items2, value2, 0, binding);
binding = ReactNativeModule.View;
arraySpread(items2, binding.map(function(a0) {
return {type: 'channel', data: a0};
}), value3, binding);
return items2;
}
function _fun116009(a0, a1) { // fn#116009, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15380:1375, offset: 0x02477d2c, size: 130 bytes, params: 3, frame: 15
var r0;
var value;
const property = env0_6[a1];
if (property.type === 'invite') {
value = environment.__proto__;
value = importDefault(12132) /* metro dependency 12132: InstantInvite */;
value = ((Component) => <Component invite={property.data} />)(value);
r0 = value;
} else {
value = environment.__proto__;
const LinkedChannelInvite = (require(12132) /* metro dependency 12132: InstantInvite */).LinkedChannelInvite;
value = <LinkedChannelInvite channel={property.data} />;
r0 = value;
}
return r0;
}
}
return r0;
}
function _fun116005() { // fn#116005, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15380:1183, offset: 0x02477c91, size: 69 bytes, params: 1, frame: 15
let binding = env0_4;
const value2 = binding.map(function(a0) {
return {type: 'invite', data: a0};
});
const items2 = [];
const value3 = arraySpread(items2, value2, 0, binding);
binding = env0_5;
arraySpread(items2, binding.map(function(a0) {
return {type: 'channel', data: a0};
}), value3, binding);
return items2;
}
function _fun116009(a0, a1) { // fn#116009, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15380:1375, offset: 0x02477d2c, size: 130 bytes, params: 3, frame: 15
var r0;
var value;
const property = env0_6[a1];
if (property.type === 'invite') {
value = environment.__proto__;
value = importDefault(12132) /* metro dependency 12132: InstantInvite */;
value = ((Component) => <Component invite={property.data} />)(value);
r0 = value;
} else {
value = environment.__proto__;
const LinkedChannelInvite = (require(12132) /* metro dependency 12132: InstantInvite */).LinkedChannelInvite;
value = <LinkedChannelInvite channel={property.data} />;
r0 = value;
}
return r0;
}
global.__d(_fun115996, 15183, [57, 31, 27, 8149, 1379, 661, 33, 4501, 697, 1585, 566, 8148, 12132, 1305, 12146,
12147, 1244, 5460, 15184, 8671,
2]) /* metro module 15183, dependencies: [57, 31, 27, 8149, 1379, 661, 33, 4501, 697, 1585, 566, 8148, 12132, 1305, 12146, 12147, 1244, 5460, 15184, 8671, 2] */;
@@ -1,125 +1,170 @@
/* Metro module 15200; source: components_native/channel_settings/ChannelSettingsIntegrationsOverview.tsx; dependencies: [31, 1379, 661, 33, 1484, 6777, 6231, 1244, 6238, 1305, 1423, 4501, 697, 566, 7972, 4572, 15117, 15201, 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 * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as UseNavigationNativeModule from '../../design/components/Navigator/native/useNavigation.native.tsx'; /* Metro dependency 1484 */
import * as TableRowNativeModule from '../../design/components/TableRow/native/TableRow.native.tsx'; /* Metro dependency 6238 */
function _fun116242(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116242, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15397:6, offset: 0x024826a4, size: 286 bytes, params: 8, frame: 22
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const env0_4 = (require(661) /* metro dependency 661: Constants */).ChannelSettingsSections;
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;
const object = {flex: 1};
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
object.backgroundColor = BACKGROUND_BASE_LOWER;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object.paddingTop = PX_16;
const env0_7 = Reflect.apply(createStyles, value, [{screenContainer: object}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/channel_settings/ChannelSettingsIntegrationsOverview.tsx');
const object2 = {flex: 1};
const BACKGROUND_BASE_LOWER = (Native).colors.BACKGROUND_BASE_LOWER;
object2.backgroundColor = BACKGROUND_BASE_LOWER;
const PX_16 = (Native).space.PX_16;
object2.paddingTop = PX_16;
const env0_7 = Reflect.apply(createStyles, value, [{screenContainer: object2}]);
(FileImportTrackerModule).fileFinishedImporting('components_native/channel_settings/ChannelSettingsIntegrationsOverview.tsx');
exports.default = ConnectedChannelSettingsIntegrationsOverview;
}
function LinkedLobbyFormSection({channel}) { // fn#116243, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15397:175, offset: 0x024827c2, size: 380 bytes, params: 2, frame: 30
var r0;
var TableRowGroup;
var object2;
var intl;
var TableRow;
var Avatar;
var value;
const env0_1 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const value4 = (require(6777) /* metro dependency 6777: useGetOrFetchApplications */).useGetOrFetchApplication(channel.linkedLobby?.application_id);
if (value4 == null) {
r0 = null;
} else {
TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
object2 = {};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.oAvIAg);
object2.hasIcons = true;
TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
var tableRowProps = {label: value4.name};
Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
value = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
tableRowProps.icon = <Avatar source={value.getApplicationIconSource({id: value4.id,
icon: value4.icon})} size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.REFRESH_MEDIUM_32} />;
tableRowProps.arrow = true;
tableRowProps.onPress = onPress_116244;
value = <TableRowGroup {...object2}><TableRow {...tableRowProps} /></TableRowGroup>;
r0 = value;
}
return r0;
}
function ConnectedChannelSettingsIntegrationsOverview({channelId, canManageWebhooks, canUnlinkLobby}) { // fn#116245, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15397:957, offset: 0x02482973, size: 748 bytes, params: 2, frame: 37
var r11;
var r9;
var r0;
var Form;
var Stack;
var object;
var space;
var TableRowGroup;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
var object5;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var items3;
var object6;
var items2;
const env0_1 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channelId);
});
const styles = useStyles();
if (channel == null) {
r0 = null;
} else {
Form = (require(7972) /* metro dependency 7972: native */).Form;
var formProps = {style: styles.screenContainer};
Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
object = {};
space = (importDefault(697) /* metro dependency 697: native */).space;
object.style = {paddingHorizontal: space.PX_12};
space = (importDefault(697) /* metro dependency 697: native */).space;
object.spacing = space.PX_24;
if (canManageWebhooks) {
TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
items3 = [<TableRow label={intl.string(t.jp25Id)} subLabel={intl.string(t.mKIOkI)} icon={((WebhookIcon) => <WebhookIcon />)((require(15117) /* metro dependency 15117: WebhookIcon */).WebhookIcon)} arrow onPress={onPress_116247} />];
items3[1] = <TableRow label={intl.string(t.OrV60r)} subLabel={intl.string(t.rQREJl)} icon={((ChannelsFollowedIcon) => <ChannelsFollowedIcon />)((require(15201) /* metro dependency 15201: ChannelsFollowedIcon */).ChannelsFollowedIcon)} arrow onPress={onPress_116248} />;
r11 = <TableRowGroup hasIcons>{items3}</TableRowGroup>;
function LinkedLobbyFormSection({channel}) { // fn#116243, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15397:175, offset: 0x024827c2, size: 380 bytes, params: 2, frame: 30
var r0;
var TableRowGroup;
var object;
var intl;
var TableRow;
var Avatar;
var value;
const env0_1 = (UseNavigationNativeModule).useNavigation();
const value4 = (require(6777) /* metro dependency 6777: useGetOrFetchApplications */).useGetOrFetchApplication(channel.linkedLobby?.application_id);
if (value4 == null) {
r0 = null;
} else {
r11 = canManageWebhooks;
TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
object = {};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.oAvIAg);
object.hasIcons = true;
TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
var tableRowProps = {label: value4.name};
Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
value = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
tableRowProps.icon = (
<Avatar
source={value.getApplicationIconSource({id: value4.id, icon: value4.icon})}
size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.REFRESH_MEDIUM_32}
/>
);
tableRowProps.arrow = true;
tableRowProps.onPress = onPress_116244;
value = (
<TableRowGroup {...object}>
<TableRow {...tableRowProps} />
</TableRowGroup>
);
r0 = value;
}
items2 = [r11];
r9 = canUnlinkLobby && channel.linkedLobby != null;
r9 = r9 && <LinkedLobbyFormSection channel={channel} />;
items2[1] = r9;
r0 = <Form {...formProps}><Stack {...object}>{items2}</Stack></Form>;
return r0;
function LinkedLobbyFormSectionOnPress() { // fn#116244, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15397:628, owner: LinkedLobbyFormSection.onPress, offset: 0x0248293e, size: 53 bytes, params: 1, frame: 14
const binding = env0_1;
const push = binding.push;
const EDIT_LINKED_LOBBY = ChannelSettingsSections.EDIT_LINKED_LOBBY;
Reflect.apply(push, binding, [EDIT_LINKED_LOBBY, {channel: channel, numScreensToPop: 1}]);
}
}
return r0;
}
function LinkedLobbyFormSectionOnPress() { // fn#116244, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15397:628, owner: LinkedLobbyFormSection.onPress, offset: 0x0248293e, size: 53 bytes, params: 1, frame: 14
const binding = env0_1;
const push = binding.push;
const EDIT_LINKED_LOBBY = ChannelSettingsSections.EDIT_LINKED_LOBBY;
Reflect.apply(push, binding, [EDIT_LINKED_LOBBY, {channel: channel, numScreensToPop: 1}]);
}
function ConnectedChannelSettingsIntegrationsOverview({channelId, canManageWebhooks, canUnlinkLobby}) { // fn#116245, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15397:957, offset: 0x02482973, size: 748 bytes, params: 2, frame: 37
var r11;
var r9;
var r0;
var Form;
var Stack;
var object2;
var space;
var TableRowGroup;
const TableRow = (TableRowNativeModule).TableRow;
var object3;
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
var items3;
var object4;
var items2;
const env0_1 = (UseNavigationNativeModule).useNavigation();
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channelId);
});
const styles = useStyles();
if (channel == null) {
r0 = null;
} else {
Form = (require(7972) /* metro dependency 7972: native */).Form;
var formProps = {style: styles.screenContainer};
Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
object2 = {};
space = (importDefault(697) /* metro dependency 697: native */).space;
object2.style = {paddingHorizontal: space.PX_12};
space = (importDefault(697) /* metro dependency 697: native */).space;
object2.spacing = space.PX_24;
if (canManageWebhooks) {
TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
items3 = [
<TableRow
label={intl.string(t.jp25Id)}
subLabel={intl.string(t.mKIOkI)}
icon={((WebhookIcon) => <WebhookIcon />)((require(15117) /* metro dependency 15117: WebhookIcon */).WebhookIcon)}
arrow
onPress={onPress_116247}
/>,
];
items3[1] = (
<TableRow
label={intl.string(t.OrV60r)}
subLabel={intl.string(t.rQREJl)}
icon={((ChannelsFollowedIcon) => <ChannelsFollowedIcon />)((require(15201) /* metro dependency 15201: ChannelsFollowedIcon */).ChannelsFollowedIcon)}
arrow
onPress={onPress_116248}
/>
);
r11 = (
<TableRowGroup hasIcons>
{items3}
</TableRowGroup>
);
} else {
r11 = canManageWebhooks;
}
items2 = [r11];
r9 = canUnlinkLobby && channel.linkedLobby != null;
r9 = r9 && <LinkedLobbyFormSection channel={channel} />;
items2[1] = r9;
r0 = (
<Form {...formProps}>
<Stack {...object2}>
{items2}
</Stack>
</Form>
);
}
return r0;
function ConnectedChannelSettingsIntegrationsOverviewOnPress() { // fn#116247, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15397:1540, owner: ConnectedChannelSettingsIntegrationsOverview.onPress, offset: 0x02482c5f, size: 32 bytes, params: 1, frame: 11
const binding = env0_1;
const push = binding.push;
const WEBHOOKS = ChannelSettingsSections.WEBHOOKS;
return Reflect.apply(push, binding, [WEBHOOKS]);
}
function ConnectedChannelSettingsIntegrationsOverviewOnPress() { // fn#116247, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15397:1540, owner: ConnectedChannelSettingsIntegrationsOverview.onPress, offset: 0x02482c5f, size: 32 bytes, params: 1, frame: 11
const binding = env0_1;
const push = binding.push;
const WEBHOOKS = ChannelSettingsSections.WEBHOOKS;
return Reflect.apply(push, binding, [WEBHOOKS]);
}
function ConnectedChannelSettingsIntegrationsOverviewOnPress_116248() { // fn#116248, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15397:1734, owner: ConnectedChannelSettingsIntegrationsOverview.onPress, offset: 0x02482c7f, size: 32 bytes, params: 1, frame: 11
const binding = env0_1;
const push = binding.push;
const CHANNELS_FOLLOWED = ChannelSettingsSections.CHANNELS_FOLLOWED;
return Reflect.apply(push, binding, [CHANNELS_FOLLOWED]);
}
}
function ConnectedChannelSettingsIntegrationsOverviewOnPress_116248() { // fn#116248, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15397:1734, owner: ConnectedChannelSettingsIntegrationsOverview.onPress, offset: 0x02482c7f, size: 32 bytes, params: 1, frame: 11
const binding = env0_1;
const push = binding.push;
const CHANNELS_FOLLOWED = ChannelSettingsSections.CHANNELS_FOLLOWED;
return Reflect.apply(push, binding, [CHANNELS_FOLLOWED]);
}
global.__d(_fun116242, 15200, [31, 1379, 661, 33, 1484, 6777, 6231, 1244, 6238, 1305, 1423, 4501, 697, 566, 7972,
4572, 15117, 15201,
2]) /* metro module 15200, dependencies: [31, 1379, 661, 33, 1484, 6777, 6231, 1244, 6238, 1305, 1423, 4501, 697, 566, 7972, 4572, 15117, 15201, 2] */;
@@ -1,196 +1,216 @@
/* Metro module 15171; source: components_native/channel_settings/ChannelSettingsModal.tsx; dependencies: [31, 27, 661, 9615, 33, 4501, 697, 15172, 1244, 10935, 15107, 15182, 15183, 15185, 15190, 15191, 15200, 15203, 15210, 15212, 15213, 15214, 15215, 15216, 2] */
import ChannelSettingsNotifications from './ChannelSettingsNotifications.tsx'; /* Metro dependency 10935 */
import PinsScreen from '../../modules/search/native/components/tabs/pages/messages/PinsScreen.tsx'; /* Metro dependency 15107 */
import ChatPreview from '../common/ChatPreview.tsx'; /* Metro dependency 15182 */
import ChannelSettingsInstantInvites from './ChannelSettingsInstantInvites.tsx'; /* Metro dependency 15183 */
import EasyChannelPermissionSettings from '../../modules/channel_permissions/native/components/EasyChannelPermissionSettings.tsx'; /* Metro dependency 15185 */
import ChannelSettingsPermissionsList from './ChannelSettingsPermissionsList.tsx'; /* Metro dependency 15190 */
import ChannelSettingsPermissionsOverrides from './ChannelSettingsPermissionsOverrides.tsx'; /* Metro dependency 15191 */
import ChannelSettingsIntegrationsOverview from './ChannelSettingsIntegrationsOverview.tsx'; /* Metro dependency 15200 */
import IntegrationsSettingsWebhooksOverview from '../../modules/integration_settings/native/IntegrationsSettingsWebhooksOverview.tsx'; /* Metro dependency 15203 */
import IntegrationsSettingsEditWebhook from '../../modules/integration_settings/native/IntegrationsSettingsEditWebhook.tsx'; /* Metro dependency 15210 */
import IntegrationsSettingsEditLinkedLobby from '../../modules/integration_settings/native/IntegrationsSettingsEditLinkedLobby.tsx'; /* Metro dependency 15212 */
import ChannelSettingsChangeCategory from './ChannelSettingsChangeCategory.tsx'; /* Metro dependency 15213 */
import ChannelSettingsChangeRTCRegion from './ChannelSettingsChangeRTCRegion.tsx'; /* Metro dependency 15214 */
import ChannelSettingsEditForumTag from '../../modules/forums/native/ChannelSettingsEditForumTag.tsx'; /* Metro dependency 15215 */
import ChannelSettingsChangeDefaultForumLayout from './ChannelSettingsChangeDefaultForumLayout.tsx'; /* Metro dependency 15216 */
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 IndexNativeModule from '../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as CreateStylesModule from '../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as SearchConstantsModule from '../../modules/search/SearchConstants.tsx'; /* Metro dependency 9615 */
function _fun115812(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115812, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:6, offset: 0x0246e727, size: 325 bytes, params: 8, frame: 23
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
let value = require(661) /* metro dependency 661: Constants */;
ReactModule;
let value = ConstantsModule;
const env0_4 = value.ChannelSettingsSections;
const env0_5 = value.SearchTypes;
const env0_6 = value.WebhookTypes;
const env0_7 = (require(9615) /* metro dependency 9615: SearchConstants */).SearchTabs;
const env0_8 = (require(33) /* metro dependency 33 */).jsx;
const createStyles = (require(4501) /* metro dependency 4501: createStyles */).createStyles;
object2 = {};
const createStyles = (CreateStylesModule).createStyles;
object = {};
let MOBILE_ACTIONSHEET_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_ACTIONSHEET_BACKGROUND;
object2.container = {flex: 1, backgroundColor: MOBILE_ACTIONSHEET_BACKGROUND};
object.container = {flex: 1, backgroundColor: MOBILE_ACTIONSHEET_BACKGROUND};
MOBILE_ACTIONSHEET_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_ACTIONSHEET_BACKGROUND;
object2.pinsScreen = {flex: 1, backgroundColor: MOBILE_ACTIONSHEET_BACKGROUND};
value = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/channel_settings/ChannelSettingsModal.tsx');
object.pinsScreen = {flex: 1, backgroundColor: MOBILE_ACTIONSHEET_BACKGROUND};
value = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('components_native/channel_settings/ChannelSettingsModal.tsx');
exports.useChannelSettingsScreensStyles = value;
exports.getChannelSettingsScreens = getChannelSettingsScreens;
function getChannelSettingsScreens(a0, a1, a2) { // fn#115813, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:570, offset: 0x0246e86c, size: 1165 bytes, params: 4, frame: 21
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const object = {};
const OVERVIEW = ChannelSettingsSections.OVERVIEW;
object[OVERVIEW] = {render: render_115814};
const NOTIFICATIONS = ChannelSettingsSections.NOTIFICATIONS;
const intl = (IndexNativeModule).intl;
let string = intl.string;
const t = (IndexNativeModule).t;
object[NOTIFICATIONS] = {title: Reflect.apply(string, intl, [t.h850Ss]), render: render_115815};
const PINNED_MESSAGES = ChannelSettingsSections.PINNED_MESSAGES;
const object4 = {};
object4.title = intl.string(t['mp1N/2']);
object4.render = render_115816;
object[PINNED_MESSAGES] = object4;
const PINNED_CHAT = ChannelSettingsSections.PINNED_CHAT;
object[PINNED_CHAT] = {postponeRender: true, render: render_115817};
const INSTANT_INVITES = ChannelSettingsSections.INSTANT_INVITES;
object[INSTANT_INVITES] = {title: intl.string(t.ngRFjZ), postponeRender: true, render: render_115818};
const PERMISSIONS = ChannelSettingsSections.PERMISSIONS;
object[PERMISSIONS] = {title: intl.string(t.xrmhRX), render: render_115819};
const NEW_PERMISSION = ChannelSettingsSections.NEW_PERMISSION;
object[NEW_PERMISSION] = {title: intl.string(t.vPHdP5), postponeRender: true, render: render_115820};
const PERMISSION_OVERRIDES = ChannelSettingsSections.PERMISSION_OVERRIDES;
string = intl.string;
const D4p9TR = t.D4p9TR;
object[PERMISSION_OVERRIDES] = {title: Reflect.apply(string, intl, [D4p9TR]), render: render_115821};
const INTEGRATIONS = ChannelSettingsSections.INTEGRATIONS;
string = intl.string;
const CIsNZw = t.CIsNZw;
object[INTEGRATIONS] = {title: Reflect.apply(string, intl, [CIsNZw]), render: render_115822};
const WEBHOOKS = ChannelSettingsSections.WEBHOOKS;
object[WEBHOOKS] = {title: intl.string(t.jp25Id), render: render_115823};
const EDIT_WEBHOOK = ChannelSettingsSections.EDIT_WEBHOOK;
const object9 = {};
object9.title = intl.string(t['6SE3L3']);
object9.render = render_115824;
object[EDIT_WEBHOOK] = object9;
const EDIT_LINKED_LOBBY = ChannelSettingsSections.EDIT_LINKED_LOBBY;
string = intl.string;
const OJknhi = t.OJknhi;
object[EDIT_LINKED_LOBBY] = {title: Reflect.apply(string, intl, [OJknhi]), render: render_115825};
const CHANNELS_FOLLOWED = ChannelSettingsSections.CHANNELS_FOLLOWED;
string = intl.string;
const OrV60r = t.OrV60r;
object[CHANNELS_FOLLOWED] = {title: Reflect.apply(string, intl, [OrV60r]), render: render_115826};
const CHANGE_CATEGORY = ChannelSettingsSections.CHANGE_CATEGORY;
const object10 = {};
object10.title = intl.string(t['+caQHK']);
object10.render = render_115827;
object[CHANGE_CATEGORY] = object10;
const CHANGE_RTC_REGION = ChannelSettingsSections.CHANGE_RTC_REGION;
const object11 = {};
object11.title = intl.string(t['Ms8bX+']);
object11.render = render_115828;
object[CHANGE_RTC_REGION] = object11;
const EDIT_FORUM_TAG = ChannelSettingsSections.EDIT_FORUM_TAG;
object[EDIT_FORUM_TAG] = {render: render_115829};
const DEFAULT_FORUM_LAYOUT = ChannelSettingsSections.DEFAULT_FORUM_LAYOUT;
const object12 = {};
object12.title = intl.string(t['kQvoC/']);
object12.render = render_115830;
object[DEFAULT_FORUM_LAYOUT] = object12;
return object;
function getChannelSettingsScreensRender(a0) { // fn#115814, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:640, owner: getChannelSettingsScreens.render, offset: 0x0246ecf9, size: 75 bytes, params: 2, frame: 16
const value = environment.__proto__;
return ((Component) => <Component channelId={env0_0} autoFocusElement={a0?.autoFocusElement} />)(importDefault(15172) /* metro dependency 15172: ChannelSettingsOverview */);
}
function getChannelSettingsScreensRender_115815() { // fn#115815, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:790, owner: getChannelSettingsScreens.render, offset: 0x0246ed44, size: 50 bytes, params: 1, frame: 14
const value = environment.__proto__;
return ((Component) => <Component channelId={env0_0} />)(ChannelSettingsNotifications);
}
function getChannelSettingsScreensRender_115816() { // fn#115816, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:888, owner: getChannelSettingsScreens.render, offset: 0x0246ed76, size: 131 bytes, params: 1, frame: 17
const object = {};
const GUILD_CHANNEL = SearchTypes.GUILD_CHANNEL;
object.type = GUILD_CHANNEL;
object.guildId = require;
object.channelId = env0_0;
const pinsScreen = importDefault.pinsScreen;
const PINS = SearchTabs.PINS;
return (
<View style={pinsScreen}>
<PinsScreen
searchContext={object}
tab={PINS}
isFocused
/>
</View>
);
}
function getChannelSettingsScreensRender_115817() { // fn#115817, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:1088, owner: getChannelSettingsScreens.render, offset: 0x0246edf9, size: 50 bytes, params: 1, frame: 14
const value = environment.__proto__;
return ((Component) => <Component channelId={env0_0} />)(ChatPreview);
}
function getChannelSettingsScreensRender_115818() { // fn#115818, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:1209, owner: getChannelSettingsScreens.render, offset: 0x0246ee2b, size: 39 bytes, params: 1, frame: 13
const value = environment.__proto__;
return ((Component) => <Component />)(ChannelSettingsInstantInvites);
}
function getChannelSettingsScreensRender_115819(a0) { // fn#115819, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:1297, owner: getChannelSettingsScreens.render, offset: 0x0246ee52, size: 65 bytes, params: 2, frame: 15
const value = environment.__proto__;
return ((Component) => <Component {...a0} {...{['channelId']: env0_0}} />)(EasyChannelPermissionSettings);
}
function getChannelSettingsScreensRender_115820(a0) { // fn#115820, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:1421, owner: getChannelSettingsScreens.render, offset: 0x0246ee93, size: 60 bytes, params: 2, frame: 14
const value = environment.__proto__;
return ((Component) => <Component channelId={env0_0} {...a0} />)(ChannelSettingsPermissionsList);
}
function getChannelSettingsScreensRender_115821(a0) { // fn#115821, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:1533, owner: getChannelSettingsScreens.render, offset: 0x0246eecf, size: 60 bytes, params: 2, frame: 14
const value = environment.__proto__;
return ((Component) => <Component channelId={env0_0} {...a0} />)(ChannelSettingsPermissionsOverrides);
}
function getChannelSettingsScreensRender_115822(a0) { // fn#115822, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:1637, owner: getChannelSettingsScreens.render, offset: 0x0246ef0b, size: 60 bytes, params: 2, frame: 14
const value = environment.__proto__;
return ((Component) => <Component channelId={env0_0} {...a0} />)(ChannelSettingsIntegrationsOverview);
}
function getChannelSettingsScreensRender_115823() { // fn#115823, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:1737, owner: getChannelSettingsScreens.render, offset: 0x0246ef47, size: 65 bytes, params: 1, frame: 15
const INCOMING = WebhookTypes.INCOMING;
return <IntegrationsSettingsWebhooksOverview channelId={env0_0} webhookType={INCOMING} />;
}
function getChannelSettingsScreensRender_115824(a0) { // fn#115824, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:1863, owner: getChannelSettingsScreens.render, offset: 0x0246ef88, size: 49 bytes, params: 2, frame: 14
const value = environment.__proto__;
return ((Component) => <Component {...a0} />)(IntegrationsSettingsEditWebhook);
}
function getChannelSettingsScreensRender_115825(a0) { // fn#115825, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:1960, owner: getChannelSettingsScreens.render, offset: 0x0246efb9, size: 49 bytes, params: 2, frame: 14
const value = environment.__proto__;
return ((Component) => <Component {...a0} />)(IntegrationsSettingsEditLinkedLobby);
}
function getChannelSettingsScreensRender_115826() { // fn#115826, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:2057, owner: getChannelSettingsScreens.render, offset: 0x0246efea, size: 65 bytes, params: 1, frame: 15
const CHANNEL_FOLLOWER = WebhookTypes.CHANNEL_FOLLOWER;
return <IntegrationsSettingsWebhooksOverview channelId={env0_0} webhookType={CHANNEL_FOLLOWER} />;
}
function getChannelSettingsScreensRender_115827() { // fn#115827, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:2194, owner: getChannelSettingsScreens.render, offset: 0x0246f02b, size: 50 bytes, params: 1, frame: 14
const value = environment.__proto__;
return ((Component) => <Component channelId={env0_0} />)(ChannelSettingsChangeCategory);
}
function getChannelSettingsScreensRender_115828() { // fn#115828, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:2302, owner: getChannelSettingsScreens.render, offset: 0x0246f05d, size: 50 bytes, params: 1, frame: 14
const value = environment.__proto__;
return ((Component) => <Component channelId={env0_0} />)(ChannelSettingsChangeRTCRegion);
}
function getChannelSettingsScreensRender_115829(a0) { // fn#115829, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:2360, owner: getChannelSettingsScreens.render, offset: 0x0246f08f, size: 60 bytes, params: 2, frame: 14
const value = environment.__proto__;
return ((Component) => <Component channelId={env0_0} {...a0} />)(ChannelSettingsEditForumTag);
}
function getChannelSettingsScreensRender_115830() { // fn#115830, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:2475, owner: getChannelSettingsScreens.render, offset: 0x0246f0cb, size: 50 bytes, params: 1, frame: 14
const value = environment.__proto__;
return ((Component) => <Component channelId={env0_0} />)(ChannelSettingsChangeDefaultForumLayout);
}
}
}
function getChannelSettingsScreens(a0, a1, a2) { // fn#115813, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:570, offset: 0x0246e86c, size: 1165 bytes, params: 4, frame: 21
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const object2 = {};
const OVERVIEW = ChannelSettingsSections.OVERVIEW;
object2[OVERVIEW] = {render: render_115814};
const NOTIFICATIONS = ChannelSettingsSections.NOTIFICATIONS;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
object2[NOTIFICATIONS] = {title: Reflect.apply(string, intl, [t.h850Ss]), render: render_115815};
const PINNED_MESSAGES = ChannelSettingsSections.PINNED_MESSAGES;
const object3 = {};
object3.title = intl.string(t['mp1N/2']);
object3.render = render_115816;
object2[PINNED_MESSAGES] = object3;
const PINNED_CHAT = ChannelSettingsSections.PINNED_CHAT;
object2[PINNED_CHAT] = {postponeRender: true, render: render_115817};
const INSTANT_INVITES = ChannelSettingsSections.INSTANT_INVITES;
object2[INSTANT_INVITES] = {title: intl.string(t.ngRFjZ), postponeRender: true, render: render_115818};
const PERMISSIONS = ChannelSettingsSections.PERMISSIONS;
object2[PERMISSIONS] = {title: intl.string(t.xrmhRX), render: render_115819};
const NEW_PERMISSION = ChannelSettingsSections.NEW_PERMISSION;
object2[NEW_PERMISSION] = {title: intl.string(t.vPHdP5), postponeRender: true, render: render_115820};
const PERMISSION_OVERRIDES = ChannelSettingsSections.PERMISSION_OVERRIDES;
string = intl.string;
const D4p9TR = t.D4p9TR;
object2[PERMISSION_OVERRIDES] = {title: Reflect.apply(string, intl, [D4p9TR]), render: render_115821};
const INTEGRATIONS = ChannelSettingsSections.INTEGRATIONS;
string = intl.string;
const CIsNZw = t.CIsNZw;
object2[INTEGRATIONS] = {title: Reflect.apply(string, intl, [CIsNZw]), render: render_115822};
const WEBHOOKS = ChannelSettingsSections.WEBHOOKS;
object2[WEBHOOKS] = {title: intl.string(t.jp25Id), render: render_115823};
const EDIT_WEBHOOK = ChannelSettingsSections.EDIT_WEBHOOK;
const object5 = {};
object5.title = intl.string(t['6SE3L3']);
object5.render = render_115824;
object2[EDIT_WEBHOOK] = object5;
const EDIT_LINKED_LOBBY = ChannelSettingsSections.EDIT_LINKED_LOBBY;
string = intl.string;
const OJknhi = t.OJknhi;
object2[EDIT_LINKED_LOBBY] = {title: Reflect.apply(string, intl, [OJknhi]), render: render_115825};
const CHANNELS_FOLLOWED = ChannelSettingsSections.CHANNELS_FOLLOWED;
string = intl.string;
const OrV60r = t.OrV60r;
object2[CHANNELS_FOLLOWED] = {title: Reflect.apply(string, intl, [OrV60r]), render: render_115826};
const CHANGE_CATEGORY = ChannelSettingsSections.CHANGE_CATEGORY;
const object6 = {};
object6.title = intl.string(t['+caQHK']);
object6.render = render_115827;
object2[CHANGE_CATEGORY] = object6;
const CHANGE_RTC_REGION = ChannelSettingsSections.CHANGE_RTC_REGION;
const object7 = {};
object7.title = intl.string(t['Ms8bX+']);
object7.render = render_115828;
object2[CHANGE_RTC_REGION] = object7;
const EDIT_FORUM_TAG = ChannelSettingsSections.EDIT_FORUM_TAG;
object2[EDIT_FORUM_TAG] = {render: render_115829};
const DEFAULT_FORUM_LAYOUT = ChannelSettingsSections.DEFAULT_FORUM_LAYOUT;
const object8 = {};
object8.title = intl.string(t['kQvoC/']);
object8.render = render_115830;
object2[DEFAULT_FORUM_LAYOUT] = object8;
return object2;
}
function getChannelSettingsScreensRender(a0) { // fn#115814, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:640, owner: getChannelSettingsScreens.render, offset: 0x0246ecf9, size: 75 bytes, params: 2, frame: 16
const value = environment.__proto__;
return ((Component) => <Component channelId={env0_0} autoFocusElement={a0?.autoFocusElement} />)(importDefault(15172) /* metro dependency 15172: ChannelSettingsOverview */);
}
function getChannelSettingsScreensRender_115815() { // fn#115815, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:790, owner: getChannelSettingsScreens.render, offset: 0x0246ed44, size: 50 bytes, params: 1, frame: 14
const value = environment.__proto__;
return ((Component) => <Component channelId={env0_0} />)(importDefault(10935) /* metro dependency 10935: ChannelSettingsNotifications */);
}
function getChannelSettingsScreensRender_115816() { // fn#115816, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:888, owner: getChannelSettingsScreens.render, offset: 0x0246ed76, size: 131 bytes, params: 1, frame: 17
const object2 = {};
const GUILD_CHANNEL = SearchTypes.GUILD_CHANNEL;
object2.type = GUILD_CHANNEL;
object2.guildId = require;
object2.channelId = env0_0;
const pinsScreen = importDefault.pinsScreen;
const PinsScreen = importDefault(15107) /* metro dependency 15107: PinsScreen */;
const PINS = SearchTabs.PINS;
return (
<View style={pinsScreen}>
<PinsScreen
searchContext={object2}
tab={PINS}
isFocused
/>
</View>
);
}
function getChannelSettingsScreensRender_115817() { // fn#115817, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:1088, owner: getChannelSettingsScreens.render, offset: 0x0246edf9, size: 50 bytes, params: 1, frame: 14
const value = environment.__proto__;
return ((Component) => <Component channelId={env0_0} />)(importDefault(15182) /* metro dependency 15182: ChatPreview */);
}
function getChannelSettingsScreensRender_115818() { // fn#115818, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:1209, owner: getChannelSettingsScreens.render, offset: 0x0246ee2b, size: 39 bytes, params: 1, frame: 13
const value = environment.__proto__;
return ((Component) => <Component />)(importDefault(15183) /* metro dependency 15183: ChannelSettingsInstantInvites */);
}
function getChannelSettingsScreensRender_115819(a0) { // fn#115819, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:1297, owner: getChannelSettingsScreens.render, offset: 0x0246ee52, size: 65 bytes, params: 2, frame: 15
const value = environment.__proto__;
return ((Component) => <Component {...a0} {...{['channelId']: env0_0}} />)(importDefault(15185) /* metro dependency 15185: EasyChannelPermissionSettings */);
}
function getChannelSettingsScreensRender_115820(a0) { // fn#115820, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:1421, owner: getChannelSettingsScreens.render, offset: 0x0246ee93, size: 60 bytes, params: 2, frame: 14
const value = environment.__proto__;
return ((Component) => <Component channelId={env0_0} {...a0} />)(importDefault(15190) /* metro dependency 15190: ChannelSettingsPermissionsList */);
}
function getChannelSettingsScreensRender_115821(a0) { // fn#115821, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:1533, owner: getChannelSettingsScreens.render, offset: 0x0246eecf, size: 60 bytes, params: 2, frame: 14
const value = environment.__proto__;
return ((Component) => <Component channelId={env0_0} {...a0} />)(importDefault(15191) /* metro dependency 15191: ChannelSettingsPermissionsOverrides */);
}
function getChannelSettingsScreensRender_115822(a0) { // fn#115822, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:1637, owner: getChannelSettingsScreens.render, offset: 0x0246ef0b, size: 60 bytes, params: 2, frame: 14
const value = environment.__proto__;
return ((Component) => <Component channelId={env0_0} {...a0} />)(importDefault(15200) /* metro dependency 15200: ChannelSettingsIntegrationsOverview */);
}
function getChannelSettingsScreensRender_115823() { // fn#115823, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:1737, owner: getChannelSettingsScreens.render, offset: 0x0246ef47, size: 65 bytes, params: 1, frame: 15
const IntegrationsSettingsWebhooksOverview = importDefault(15203) /* metro dependency 15203: IntegrationsSettingsWebhooksOverview */;
const INCOMING = WebhookTypes.INCOMING;
return <IntegrationsSettingsWebhooksOverview channelId={env0_0} webhookType={INCOMING} />;
}
function getChannelSettingsScreensRender_115824(a0) { // fn#115824, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:1863, owner: getChannelSettingsScreens.render, offset: 0x0246ef88, size: 49 bytes, params: 2, frame: 14
const value = environment.__proto__;
return ((Component) => <Component {...a0} />)(importDefault(15210) /* metro dependency 15210: IntegrationsSettingsEditWebhook */);
}
function getChannelSettingsScreensRender_115825(a0) { // fn#115825, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:1960, owner: getChannelSettingsScreens.render, offset: 0x0246efb9, size: 49 bytes, params: 2, frame: 14
const value = environment.__proto__;
return ((Component) => <Component {...a0} />)(importDefault(15212) /* metro dependency 15212: IntegrationsSettingsEditLinkedLobby */);
}
function getChannelSettingsScreensRender_115826() { // fn#115826, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:2057, owner: getChannelSettingsScreens.render, offset: 0x0246efea, size: 65 bytes, params: 1, frame: 15
const IntegrationsSettingsWebhooksOverview = importDefault(15203) /* metro dependency 15203: IntegrationsSettingsWebhooksOverview */;
const CHANNEL_FOLLOWER = WebhookTypes.CHANNEL_FOLLOWER;
return <IntegrationsSettingsWebhooksOverview channelId={env0_0} webhookType={CHANNEL_FOLLOWER} />;
}
function getChannelSettingsScreensRender_115827() { // fn#115827, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:2194, owner: getChannelSettingsScreens.render, offset: 0x0246f02b, size: 50 bytes, params: 1, frame: 14
const value = environment.__proto__;
return ((Component) => <Component channelId={env0_0} />)(importDefault(15213) /* metro dependency 15213: ChannelSettingsChangeCategory */);
}
function getChannelSettingsScreensRender_115828() { // fn#115828, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:2302, owner: getChannelSettingsScreens.render, offset: 0x0246f05d, size: 50 bytes, params: 1, frame: 14
const value = environment.__proto__;
return ((Component) => <Component channelId={env0_0} />)(importDefault(15214) /* metro dependency 15214: ChannelSettingsChangeRTCRegion */);
}
function getChannelSettingsScreensRender_115829(a0) { // fn#115829, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:2360, owner: getChannelSettingsScreens.render, offset: 0x0246f08f, size: 60 bytes, params: 2, frame: 14
const value = environment.__proto__;
return ((Component) => <Component channelId={env0_0} {...a0} />)(importDefault(15215) /* metro dependency 15215: ChannelSettingsEditForumTag */);
}
function getChannelSettingsScreensRender_115830() { // fn#115830, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:2475, owner: getChannelSettingsScreens.render, offset: 0x0246f0cb, size: 50 bytes, params: 1, frame: 14
const value = environment.__proto__;
return ((Component) => <Component channelId={env0_0} />)(importDefault(15216) /* metro dependency 15216: ChannelSettingsChangeDefaultForumLayout */);
}
global.__d(_fun115812, 15171, [31, 27, 661, 9615, 33, 4501, 697, 15172, 1244, 10935, 15107, 15182, 15183, 15185,
15190, 15191, 15200, 15203, 15210, 15212, 15213, 15214, 15215, 15216,
2]) /* metro module 15171, dependencies: [31, 27, 661, 9615, 33, 4501, 697, 15172, 1244, 10935, 15107, 15182, 15183, 15185, 15190, 15191, 15200, 15203, 15210, 15212, 15213, 15214, 15215, 15216, 2] */;
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
@@ -1,328 +1,344 @@
/* Metro module 15190; source: components_native/channel_settings/ChannelSettingsPermissionsList.tsx; dependencies: [57, 31, 27, 1379, 1945, 1938, 1878, 661, 33, 4501, 697, 566, 6590, 1484, 1585, 7705, 4603, 3789, 6238, 11025, 1909, 12140, 6984, 1244, 8671, 1305, 8754, 2] */
import Module00057 from '../../by-id/module-00057.js'; /* Metro dependency 57 */
import Native from '../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import ChannelStore from '../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import UseSafeAreaInsetsNative from '../../modules/safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import UserStore from '../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import GuildRoleStore from '../../stores/GuildRoleStore.tsx'; /* Metro dependency 1938 */
import GuildMemberStore from '../../stores/GuildMemberStore.tsx'; /* Metro dependency 1945 */
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 UseNavigationNativeModule from '../../design/components/Navigator/native/useNavigation.native.tsx'; /* Metro dependency 1484 */
import * as ServerModule from '../../flow/Server.tsx'; /* Metro dependency 1909 */
import * as CreateStylesModule from '../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as SearchFieldNativeModule from '../../design/components/TextField/native/SearchField.native.tsx'; /* Metro dependency 6984 */
import * as UseScaledRowHeightModule from '../../modules/main_tabs_v2/native/shared_components/user_list/useScaledRowHeight.tsx'; /* Metro dependency 7705 */
function _fun116140(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116140, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15387:6, offset: 0x0247c31d, size: 442 bytes, params: 8, frame: 24
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const env0_6 = (require(27) /* metro dependency 27 */).View;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
const guildRoleStore = importDefault(1938) /* metro dependency 1938: GuildRoleStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_11 = constantsModule.PermissionOverrideType;
const env0_12 = constantsModule.ChannelSettingsSections;
const value3 = require(33) /* metro dependency 33 */;
const env0_13 = value3.jsx;
const env0_14 = value3.jsxs;
object3 = {rows: [], sections: []};
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object3 = {};
const object4 = {};
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
object4.backgroundColor = BACKGROUND_BASE_LOWER;
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object4.paddingHorizontal = PX_12;
object4.flex = 1;
object3.container = object4;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object3.containerSearchBar = {paddingVertical: PX_8};
const env0_16 = Reflect.apply(createStyles, createStylesModule, [object3]);
let value = ReactModule;
object = {rows: [], sections: []};
const createStyles = CreateStylesModule.createStyles;
object = {};
const object2 = {};
const BACKGROUND_BASE_LOWER = (Native).colors.BACKGROUND_BASE_LOWER;
object2.backgroundColor = BACKGROUND_BASE_LOWER;
const PX_12 = (Native).space.PX_12;
object2.paddingHorizontal = PX_12;
object2.flex = 1;
object.container = object2;
const PX_8 = (Native).space.PX_8;
object.containerSearchBar = {paddingVertical: PX_8};
const env0_16 = Reflect.apply(createStyles, CreateStylesModule, [object]);
value = value.memo(ChannelSettingsPermissionsList);
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/channel_settings/ChannelSettingsPermissionsList.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/channel_settings/ChannelSettingsPermissionsList.tsx');
exports.default = value;
}
function ChannelSettingsPermissionsList({channelId, type}) { // fn#116141, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15387:498, offset: 0x0247c4d7, size: 1204 bytes, params: 2, frame: 35
var r8;
var r5;
var EmptyState;
var FastestListAndroid;
var space;
var PX_8;
let env0_5 = undefined;
const styles = useStyles();
const value3 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
let binding = env0_5;
const [property, property2] = env0_4(binding.useState(''), 2);
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channelId);
});
const {guildId,
sortedGuildRoles} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([GuildRoleStore],
_fun116143, [channel]);
const MEMBER = PermissionOverrideType.MEMBER;
const value7 = useGuildMemberData({enabled: type === MEMBER, permissionOverwrites: channel?.permissionOverwrites,
guildId: guildId, searchQuery: property});
const rows = value7.rows;
env0_5 = rows;
const sections = value7.sections;
let ROLE = PermissionOverrideType.ROLE;
const value8 = useGuildRoleData({enabled: type === ROLE, channel: channel, sortedGuildRoles: sortedGuildRoles,
searchQuery: property});
const rows2 = value8.rows;
const sections2 = value8.sections;
const {rowHeight,
rowContentHeight} = (require(7705) /* metro dependency 7705: useScaledRowHeight */).useScaledRowHeightData();
binding = env0_5;
const value11 = binding.useCallback(_fun116153, [guildId, rows, rows2, binding.useCallback(_fun116151, [channelId,
value3, type]), type, rowContentHeight]);
const SearchField = (require(6984) /* metro dependency 6984: SearchFieldNative */).SearchField;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const view = <View style={styles.containerSearchBar}><SearchField size="md" placeholder={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5h0QOP'])} onChange={property2} isRound /></View>;
ROLE = PermissionOverrideType.ROLE;
if ((type === ROLE ? rows2.length : rows.length) !== 0) {
FastestListAndroid = importDefault(8671) /* metro dependency 8671: FastestListAndroid */;
var defaultImportProps = {sections: type !== PermissionOverrideType.ROLE ? sections : sections2,
itemSize: rowHeight, estimatedListSize: 'windowSize', renderItem: value11, wrapChildren: true};
space = (importDefault(697) /* metro dependency 697: native */).space;
PX_8 = space.PX_8;
defaultImportProps.insetStart = PX_8;
space = (importDefault(697) /* metro dependency 697: native */).space;
PX_8 = space.PX_8;
defaultImportProps.insetEnd = PX_8 + bottom;
defaultImportProps.keyboardShouldPersistTaps = 'always';
r5 = <FastestListAndroid {...defaultImportProps} />;
} else {
EmptyState = (require(1305) /* metro dependency 1305: native */).EmptyState;
var emptyStateProps = {Illustration: (require(8754) /* metro dependency 8754: NoResults */).NoResults};
ROLE = PermissionOverrideType.ROLE;
r8 = type === ROLE ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.Sojqsr) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.pYHobK);
emptyStateProps.title = r8;
ROLE = PermissionOverrideType.ROLE;
r8 = type === ROLE ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t['7gBhmO']) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.tuL9TW);
emptyStateProps.body = r8;
r5 = <EmptyState {...emptyStateProps} />;
}
return (
<View style={styles.container}>
{view}
{r5}
</View>
);
}
function _fun116143() { // fn#116143, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15387:755, offset: 0x0247c98b, size: 84 bytes, params: 1, frame: 13
var r2;
var value;
const channelBinding = channel;
const value2 = undefined;
const r1 = (channelBinding == null ? value2 : channel.getGuildId()) ?? value2;
if (r1 != null) {
value = environment.__proto__;
value = GuildRoleStore.getSortedRoles(r1);
r2 = value;
} else {
r2 = value2;
}
return {sortedGuildRoles: r2, guildId: r1};
}
function useGuildMemberData({enabled, permissionOverwrites, guildId, searchQuery}) { // fn#116144, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15387:929, owner: ChannelSettingsPermissionsList.useGuildMemberData, offset: 0x0247c9df, size: 146 bytes, params: 2, frame: 19
return env1_5.useMemo(_fun116146, [enabled, guildId,
(require(566) /* metro dependency 566: flux */).useStateFromStores([GuildMemberStore], function() {
return GuildMemberStore.getMemberVersion();
}), permissionOverwrites, searchQuery]);
}
function useGuildRoleData({enabled, channel, sortedGuildRoles, searchQuery}) { // fn#116148, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15387:1590, owner: ChannelSettingsPermissionsList.useGuildRoleData, offset: 0x0247cbd8, size: 90 bytes, params: 2, frame: 17
return env1_5.useMemo(_fun116149, [enabled, channel, sortedGuildRoles, searchQuery]);
}
function _fun116151(a0, a1) { // fn#116151, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15387:2074, offset: 0x0247cd01, size: 144 bytes, params: 3, frame: 19
var environment;
var value2;
var defaultImport;
var updatePermissionOverwrite;
var object2;
var NONE;
const env0_0 = a0;
let channelIdBinding = channelId;
if (channelIdBinding != null) {
value2 = environment.__proto__;
defaultImport = importDefault(4603) /* metro dependency 4603: ChannelActionCreators */;
updatePermissionOverwrite = defaultImport.updatePermissionOverwrite;
channelIdBinding = channelId;
object2 = {id: a0, type: a1};
NONE = (importAll(3789) /* metro dependency 3789: PermissionUtils */).NONE;
object2.allow = NONE;
NONE = (importAll(3789) /* metro dependency 3789: PermissionUtils */).NONE;
object2.deny = NONE;
Reflect.apply(updatePermissionOverwrite, defaultImport, [channelIdBinding, object2]).then(_fun116152);
}
}
function _fun116153(a0, a1) { // fn#116153, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15387:2285, offset: 0x0247cdd0, size: 354 bytes, params: 3, frame: 22
var property;
const value = a1 === 0;
let typeBinding = type;
const ROLE = PermissionOverrideType.ROLE;
const value4 = a1 === (typeBinding === ROLE ? rows.length : rows.length) - 1;
if (guildId != null) {
typeBinding = type;
if (PermissionOverrideType.ROLE === typeBinding) {
property = rows[a1];
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
return (
<TableRow
arrow
end={value4}
label={((RoleLabel) => <RoleLabel name={property.name} color={property.colorString} colors={property.colorStrings} />)((require(11025) /* metro dependency 11025: RoleLabel */).RoleLabel)}
onPress={onPress_116154}
start={value}
/>
);
}
var MEMBER = PermissionOverrideType.MEMBER;
if (MEMBER === typeBinding) {
return ((Component) => <Component arrow contentHeight={rowContentHeight} end={value4} guildId={guildId} userId={rows[a1].id} onPress={onPress_116155} start={value} />)(importDefault(12140) /* metro dependency 12140: DetailedGuildIdentityUserRow */);
}
}
return null;
}
function _fun116146() { // fn#116146, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15387:1101, offset: 0x0247ca86, size: 287 bytes, params: 1, frame: 28
var environment;
var r7;
var r14;
var r12;
var items2;
var value2;
var propertyName;
var propertyName2;
var user;
var value6;
var property2;
var value7;
var length;
var value8;
var defaultImport;
var toLowerCase;
var value9;
var username;
var value10;
var value;
if (enabled) {
if (guildId == null) {
value = environment.__proto__.__proto__;
return env2_15;
}
items2 = [];
value2 = environment.__proto__.__proto__;
for (propertyName in GuildMemberStore.getMutableAllGuildsAndMembers()[guildId]) {
user = UserStore.getUser(propertyName);
value6 = user != null;
if (!value6) {
r12 = value6;
continue;
}
if (permissionOverwrites == null) {
r14 = undefined;
continue;
}
property2 = permissionOverwrites[propertyName];
r14 = property2;
value7 = r14 == null;
r12 = value7;
if (!r12) {
continue;
}
length = searchQuery.length;
value8 = length === 0;
if (value8) {
r14 = value8;
continue;
}
defaultImport = importDefault(6590) /* metro dependency 6590 */;
value9 = searchQuery.toLowerCase();
username = user.username;
toLowerCase = username.toLowerCase;
value10 = defaultImport(value9, Reflect.apply(toLowerCase, username, []));
r14 = value10;
r12 = r14;
if (!r12) {
r7 = propertyName2;
continue;
}
items2.push(user);
r7 = propertyName2;
}
items2.sort(function(a0, a1) {
var username = a0.username;
var value = username.toLowerCase();
username = a1.username;
return value.localeCompare(username.toLowerCase());
function ChannelSettingsPermissionsList({channelId, type}) { // fn#116141, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15387:498, offset: 0x0247c4d7, size: 1204 bytes, params: 2, frame: 35
var r8;
var r5;
var EmptyState;
var FastestListAndroid;
var space;
var PX_8;
let env0_5 = undefined;
const styles = useStyles();
const value3 = (UseNavigationNativeModule).useNavigation();
let binding = env0_5;
const [property, property2] = Module00057(binding.useState(''), 2);
const bottom = (UseSafeAreaInsetsNative)().bottom;
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channelId);
});
length = items2.length;
return {rows: items2, sections: [length]};
}
value = environment.__proto__.__proto__;
return env2_15;
}
function _fun116149() { // fn#116149, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15387:1690, offset: 0x0247cc32, size: 87 bytes, params: 1, frame: 11
var environment;
var value;
if (enabled) {
if (sortedGuildRoles == null) {
value = environment.__proto__.__proto__;
return env2_15;
const {guildId,
sortedGuildRoles} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([GuildRoleStore],
_fun116143, [channel]);
const MEMBER = PermissionOverrideType.MEMBER;
const value7 = useGuildMemberData({enabled: type === MEMBER, permissionOverwrites: channel?.permissionOverwrites,
guildId: guildId, searchQuery: property});
const rows = value7.rows;
env0_5 = rows;
const sections = value7.sections;
let ROLE = PermissionOverrideType.ROLE;
const value8 = useGuildRoleData({enabled: type === ROLE, channel: channel, sortedGuildRoles: sortedGuildRoles,
searchQuery: property});
const rows2 = value8.rows;
const sections2 = value8.sections;
const {rowHeight,
rowContentHeight} = (UseScaledRowHeightModule).useScaledRowHeightData();
binding = env0_5;
const value11 = binding.useCallback(_fun116153, [guildId, rows, rows2, binding.useCallback(_fun116151, [channelId,
value3, type]), type, rowContentHeight]);
const SearchField = (SearchFieldNativeModule).SearchField;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const view = (
<View style={styles.containerSearchBar}>
<SearchField
size="md"
placeholder={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5h0QOP'])}
onChange={property2}
isRound
/>
</View>
);
ROLE = PermissionOverrideType.ROLE;
if ((type === ROLE ? rows2.length : rows.length) !== 0) {
FastestListAndroid = importDefault(8671) /* metro dependency 8671: FastestListAndroid */;
var defaultImportProps = {sections: type !== PermissionOverrideType.ROLE ? sections : sections2,
itemSize: rowHeight, estimatedListSize: 'windowSize', renderItem: value11, wrapChildren: true};
space = (importDefault(697) /* metro dependency 697: native */).space;
PX_8 = space.PX_8;
defaultImportProps.insetStart = PX_8;
space = (importDefault(697) /* metro dependency 697: native */).space;
PX_8 = space.PX_8;
defaultImportProps.insetEnd = PX_8 + bottom;
defaultImportProps.keyboardShouldPersistTaps = 'always';
r5 = <FastestListAndroid {...defaultImportProps} />;
} else {
EmptyState = (require(1305) /* metro dependency 1305: native */).EmptyState;
var emptyStateProps = {Illustration: (require(8754) /* metro dependency 8754: NoResults */).NoResults};
ROLE = PermissionOverrideType.ROLE;
r8 = type === ROLE ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.Sojqsr) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.pYHobK);
emptyStateProps.title = r8;
ROLE = PermissionOverrideType.ROLE;
r8 = type === ROLE ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t['7gBhmO']) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.tuL9TW);
emptyStateProps.body = r8;
r5 = <EmptyState {...emptyStateProps} />;
}
if (channel == null) {
value = environment.__proto__.__proto__;
return env2_15;
return (
<View style={styles.container}>
{view}
{r5}
</View>
);
function _fun116143() { // fn#116143, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15387:755, offset: 0x0247c98b, size: 84 bytes, params: 1, frame: 13
var r2;
var value;
const channelBinding = channel;
const value2 = undefined;
const r1 = (channelBinding == null ? value2 : channel.getGuildId()) ?? value2;
if (r1 != null) {
value = environment.__proto__;
value = GuildRoleStore.getSortedRoles(r1);
r2 = value;
} else {
r2 = value2;
}
return {sortedGuildRoles: r2, guildId: r1};
}
value = sortedGuildRoles.filter(_fun116150);
return {rows: value, sections: [value.length]};
function useGuildMemberData({enabled, permissionOverwrites, guildId, searchQuery}) { // fn#116144, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15387:929, owner: ChannelSettingsPermissionsList.useGuildMemberData, offset: 0x0247c9df, size: 146 bytes, params: 2, frame: 19
return env1_5.useMemo(_fun116146, [enabled, guildId,
(require(566) /* metro dependency 566: flux */).useStateFromStores([GuildMemberStore], function() {
return GuildMemberStore.getMemberVersion();
}), permissionOverwrites, searchQuery]);
function _fun116146() { // fn#116146, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15387:1101, offset: 0x0247ca86, size: 287 bytes, params: 1, frame: 28
var environment;
var r7;
var r14;
var r12;
var items2;
var value2;
var propertyName;
var propertyName2;
var user;
var value6;
var property2;
var value7;
var length;
var value8;
var defaultImport;
var toLowerCase;
var value9;
var username;
var value10;
var value;
if (enabled) {
if (guildId == null) {
value = environment.__proto__.__proto__;
return env2_15;
}
items2 = [];
value2 = environment.__proto__.__proto__;
for (propertyName in GuildMemberStore.getMutableAllGuildsAndMembers()[guildId]) {
user = UserStore.getUser(propertyName);
value6 = user != null;
if (!value6) {
r12 = value6;
continue;
}
if (permissionOverwrites == null) {
r14 = undefined;
continue;
}
property2 = permissionOverwrites[propertyName];
r14 = property2;
value7 = r14 == null;
r12 = value7;
if (!r12) {
continue;
}
length = searchQuery.length;
value8 = length === 0;
if (value8) {
r14 = value8;
continue;
}
defaultImport = importDefault(6590) /* metro dependency 6590 */;
value9 = searchQuery.toLowerCase();
username = user.username;
toLowerCase = username.toLowerCase;
value10 = defaultImport(value9, Reflect.apply(toLowerCase, username, []));
r14 = value10;
r12 = r14;
if (!r12) {
r7 = propertyName2;
continue;
}
items2.push(user);
r7 = propertyName2;
}
items2.sort(function(a0, a1) {
var username = a0.username;
var value = username.toLowerCase();
username = a1.username;
return value.localeCompare(username.toLowerCase());
});
length = items2.length;
return {rows: items2, sections: [length]};
}
value = environment.__proto__.__proto__;
return env2_15;
}
}
function useGuildRoleData({enabled, channel, sortedGuildRoles, searchQuery}) { // fn#116148, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15387:1590, owner: ChannelSettingsPermissionsList.useGuildRoleData, offset: 0x0247cbd8, size: 90 bytes, params: 2, frame: 17
return env1_5.useMemo(_fun116149, [enabled, channel, sortedGuildRoles, searchQuery]);
function _fun116149() { // fn#116149, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15387:1690, offset: 0x0247cc32, size: 87 bytes, params: 1, frame: 11
var environment;
var value;
if (enabled) {
if (sortedGuildRoles == null) {
value = environment.__proto__.__proto__;
return env2_15;
}
if (channel == null) {
value = environment.__proto__.__proto__;
return env2_15;
}
value = sortedGuildRoles.filter(_fun116150);
return {rows: value, sections: [value.length]};
}
value = environment.__proto__.__proto__;
return env2_15;
function _fun116150(a0) { // fn#116150, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15387:1744, offset: 0x0247cc89, size: 120 bytes, params: 2, frame: 17
var r3;
var value3;
var defaultImport;
var value4;
var name;
const value = environment.__proto__;
const value2 = searchQuery.length !== 0;
if (value2) {
value3 = environment.__proto__.__proto__.__proto__;
defaultImport = importDefault(6590) /* metro dependency 6590 */;
value4 = searchQuery.toLowerCase();
name = a0.name;
r3 = !defaultImport(value4, name.toLowerCase());
} else {
r3 = value2;
}
return !r3 && channel.permissionOverwrites[a0.id] == null;
}
}
}
function _fun116151(a0, a1) { // fn#116151, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15387:2074, offset: 0x0247cd01, size: 144 bytes, params: 3, frame: 19
var environment;
var value2;
var defaultImport;
var updatePermissionOverwrite;
var object;
var NONE;
const env0_0 = a0;
let channelIdBinding = channelId;
if (channelIdBinding != null) {
value2 = environment.__proto__;
defaultImport = importDefault(4603) /* metro dependency 4603: ChannelActionCreators */;
updatePermissionOverwrite = defaultImport.updatePermissionOverwrite;
channelIdBinding = channelId;
object = {id: a0, type: a1};
NONE = (importAll(3789) /* metro dependency 3789: PermissionUtils */).NONE;
object.allow = NONE;
NONE = (importAll(3789) /* metro dependency 3789: PermissionUtils */).NONE;
object.deny = NONE;
Reflect.apply(updatePermissionOverwrite, defaultImport, [channelIdBinding, object]).then(_fun116152);
}
function _fun116152() { // fn#116152, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15387:2190, offset: 0x0247cd91, size: 63 bytes, params: 1, frame: 14
const binding = env1_2;
const push = binding.push;
const PERMISSION_OVERRIDES = ChannelSettingsSections.PERMISSION_OVERRIDES;
Reflect.apply(push, binding, [PERMISSION_OVERRIDES, {type: type, id: env0_0, fromCreate: true}]);
}
}
function _fun116153(a0, a1) { // fn#116153, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15387:2285, offset: 0x0247cdd0, size: 354 bytes, params: 3, frame: 22
var property;
const value = a1 === 0;
let typeBinding = type;
const ROLE = PermissionOverrideType.ROLE;
const value4 = a1 === (typeBinding === ROLE ? rows.length : rows.length) - 1;
if (guildId != null) {
typeBinding = type;
if (PermissionOverrideType.ROLE === typeBinding) {
property = rows[a1];
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
return (
<TableRow
arrow
end={value4}
label={((RoleLabel) => <RoleLabel name={property.name} color={property.colorString} colors={property.colorStrings} />)((require(11025) /* metro dependency 11025: RoleLabel */).RoleLabel)}
onPress={onPress_116154}
start={value}
/>
);
}
var MEMBER = PermissionOverrideType.MEMBER;
if (MEMBER === typeBinding) {
return ((Component) => <Component arrow contentHeight={rowContentHeight} end={value4} guildId={guildId} userId={rows[a1].id} onPress={onPress_116155} start={value} />)(importDefault(12140) /* metro dependency 12140: DetailedGuildIdentityUserRow */);
}
}
return null;
function onPress_116154() { // fn#116154, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15387:2535, offset: 0x0247cf32, size: 64 bytes, params: 1, frame: 14
const binding = env1_8;
const id = env0_0.id;
const PermissionOverwriteType = (ServerModule).PermissionOverwriteType;
const ROLE = PermissionOverwriteType.ROLE;
binding(id, ROLE);
}
function onPress_116155() { // fn#116155, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15387:2702, offset: 0x0247cf72, size: 59 bytes, params: 1, frame: 14
const binding = env1_8;
const idBinding = id;
const PermissionOverwriteType = (ServerModule).PermissionOverwriteType;
const MEMBER = PermissionOverwriteType.MEMBER;
binding(idBinding, MEMBER);
}
}
}
value = environment.__proto__.__proto__;
return env2_15;
}
function _fun116152() { // fn#116152, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15387:2190, offset: 0x0247cd91, size: 63 bytes, params: 1, frame: 14
const binding = env1_2;
const push = binding.push;
const PERMISSION_OVERRIDES = ChannelSettingsSections.PERMISSION_OVERRIDES;
Reflect.apply(push, binding, [PERMISSION_OVERRIDES, {type: type, id: env0_0, fromCreate: true}]);
}
function onPress_116154() { // fn#116154, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15387:2535, offset: 0x0247cf32, size: 64 bytes, params: 1, frame: 14
const binding = env1_8;
const id = env0_0.id;
const PermissionOverwriteType = (require(1909) /* metro dependency 1909: Server */).PermissionOverwriteType;
const ROLE = PermissionOverwriteType.ROLE;
binding(id, ROLE);
}
function onPress_116155() { // fn#116155, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15387:2702, offset: 0x0247cf72, size: 59 bytes, params: 1, frame: 14
const binding = env1_8;
const idBinding = id;
const PermissionOverwriteType = (require(1909) /* metro dependency 1909: Server */).PermissionOverwriteType;
const MEMBER = PermissionOverwriteType.MEMBER;
binding(idBinding, MEMBER);
}
function _fun116150(a0) { // fn#116150, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15387:1744, offset: 0x0247cc89, size: 120 bytes, params: 2, frame: 17
var r3;
var value3;
var defaultImport;
var value4;
var name;
const value = environment.__proto__;
const value2 = searchQuery.length !== 0;
if (value2) {
value3 = environment.__proto__.__proto__.__proto__;
defaultImport = importDefault(6590) /* metro dependency 6590 */;
value4 = searchQuery.toLowerCase();
name = a0.name;
r3 = !defaultImport(value4, name.toLowerCase());
} else {
r3 = value2;
}
return !r3 && channel.permissionOverwrites[a0.id] == null;
}
global.__d(_fun116140, 15190, [57, 31, 27, 1379, 1945, 1938, 1878, 661, 33, 4501, 697, 566, 6590, 1484, 1585, 7705,
4603, 3789, 6238, 11025, 1909, 12140, 6984, 1244, 8671, 1305, 8754,
2]) /* metro module 15190, dependencies: [57, 31, 27, 1379, 1945, 1938, 1878, 661, 33, 4501, 697, 566, 6590, 1484, 1585, 7705, 4603, 3789, 6238, 11025, 1909, 12140, 6984, 1244, 8671, 1305, 8754, 2] */;
@@ -1,38 +1,42 @@
/* Metro module 15197; source: components_native/channel_settings/ChannelSettingsPermissionsOverrideCheckbox.tsx; dependencies: [31, 27, 33, 697, 4501, 3789, 1244, 10625, 9294, 15198, 3874, 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 IndexNativeModule from '../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as PermissionUtilsModule from '../../utils/PermissionUtils.tsx'; /* Metro dependency 3789 */
import * as UseA11yRolesNativeModule from '../../external/discord_common/js/packages/design/hooks/useA11yRolesNative.tsx'; /* Metro dependency 3874 */
import * as CreateStylesModule from '../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
function _fun116230(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116230, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15394:6, offset: 0x02481d66, size: 748 bytes, params: 8, frame: 26
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_3 = value2.Pressable;
const env0_4 = value2.View;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
let value = ReactModule;
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
const md = (importDefault(697) /* metro dependency 697: native */).radii.md;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const createStyles = CreateStylesModule.createStyles;
object = {};
const object3 = {};
const object2 = {};
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object3.backgroundColor = BACKGROUND_BASE_LOWEST;
object3.borderRadius = md;
object2.backgroundColor = BACKGROUND_BASE_LOWEST;
object2.borderRadius = md;
const PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
object3.height = PX_32;
object3.paddingVertical = PX_4;
object3.paddingHorizontal = PX_4 / 2;
object3.flexDirection = 'row';
object.ternaryCheckBox = object3;
object2.height = PX_32;
object2.paddingVertical = PX_4;
object2.paddingHorizontal = PX_4 / 2;
object2.flexDirection = 'row';
object.ternaryCheckBox = object2;
object.iconWrapper = {borderRadius: md - PX_4, marginHorizontal: PX_4 / 2, justifyContent: 'center', height: '100%'};
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object.icon = {marginHorizontal: PX_8};
const BACKGROUND_FEEDBACK_CRITICAL = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_FEEDBACK_CRITICAL;
object.denyActive = {backgroundColor: BACKGROUND_FEEDBACK_CRITICAL};
const object4 = {};
const object5 = {};
const ICON_FEEDBACK_CRITICAL = (importDefault(697) /* metro dependency 697: native */).colors.ICON_FEEDBACK_CRITICAL;
object4.backgroundColor = ICON_FEEDBACK_CRITICAL;
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm - 2;
object.denySelected = object4;
object5.backgroundColor = ICON_FEEDBACK_CRITICAL;
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm - 2;
object.denySelected = object5;
const BACKGROUND_FEEDBACK_POSITIVE = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_FEEDBACK_POSITIVE;
object.allowActive = {backgroundColor: BACKGROUND_FEEDBACK_POSITIVE};
const ICON_FEEDBACK_POSITIVE = (importDefault(697) /* metro dependency 697: native */).colors.ICON_FEEDBACK_POSITIVE;
@@ -42,160 +46,162 @@ function _fun116230(global, require, importDefault, importAll, module, exports,
const INTERACTIVE_BACKGROUND_HOVER = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_BACKGROUND_HOVER;
object.passthroughActive = {backgroundColor: INTERACTIVE_BACKGROUND_HOVER};
object.disabled = {opacity: 0.3};
const env0_6 = Reflect.apply(createStyles, createStylesModule, [object]);
const DENY = (require(3789) /* metro dependency 3789: PermissionUtils */).DENY;
const env0_6 = Reflect.apply(createStyles, CreateStylesModule, [object]);
const DENY = (PermissionUtilsModule).DENY;
object = [DENY];
const PASSTHROUGH = (require(3789) /* metro dependency 3789: PermissionUtils */).PASSTHROUGH;
const PASSTHROUGH = (PermissionUtilsModule).PASSTHROUGH;
object[1] = PASSTHROUGH;
const ALLOW = (require(3789) /* metro dependency 3789: PermissionUtils */).ALLOW;
const ALLOW = (PermissionUtilsModule).ALLOW;
object[2] = ALLOW;
value = value.memo(ChannelSettingsPermissionsOverrideCheckbox);
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/channel_settings/ChannelSettingsPermissionsOverrideCheckbox.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/channel_settings/ChannelSettingsPermissionsOverrideCheckbox.tsx');
exports.default = value;
function getAccessibilityLabel(a0) { // fn#116231, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15394:1095, offset: 0x02482052, size: 274 bytes, params: 2, frame: 15
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
const DENY = (PermissionUtilsModule).DENY;
if (DENY === a0) {
return intl.string(t['6639O5']);
}
const ALLOW = (PermissionUtilsModule).ALLOW;
if (ALLOW === a0) {
return intl.string(t.RzDfSk);
}
const PASSTHROUGH = (PermissionUtilsModule).PASSTHROUGH;
if (PASSTHROUGH === a0) {
return intl.string(t.ujC3ZS);
}
}
function getIcon_116232(a0, a1, a2) { // fn#116232, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15394:1355, offset: 0x02482164, size: 417 bytes, params: 4, frame: 19
var SlashIcon;
var colors;
var CheckmarkLargeBoldIcon;
var DenyIcon;
const DENY = (PermissionUtilsModule).DENY;
if (DENY === a0) {
DenyIcon = (require(10625) /* metro dependency 10625: DenyIcon */).DenyIcon;
var denyIconProps = {size: 'sm', style: a2.icon};
colors = (importDefault(697) /* metro dependency 697: native */).colors;
denyIconProps.color = a1 ? colors.WHITE : colors.ICON_FEEDBACK_CRITICAL;
return <DenyIcon {...denyIconProps} />;
}
const ALLOW = (PermissionUtilsModule).ALLOW;
if (ALLOW === a0) {
CheckmarkLargeBoldIcon = (require(9294) /* metro dependency 9294: CheckmarkLargeBoldIcon */).CheckmarkLargeBoldIcon;
var checkmarkLargeBoldIconProps = {size: 'sm', style: a2.icon};
colors = (importDefault(697) /* metro dependency 697: native */).colors;
checkmarkLargeBoldIconProps.color = a1 ? colors.WHITE : colors.ICON_FEEDBACK_POSITIVE;
return <CheckmarkLargeBoldIcon {...checkmarkLargeBoldIconProps} />;
}
const PASSTHROUGH = (PermissionUtilsModule).PASSTHROUGH;
if (PASSTHROUGH === a0) {
SlashIcon = (require(15198) /* metro dependency 15198: SlashIcon */).SlashIcon;
var slashIconProps = {size: 'sm', style: a2.icon};
colors = (importDefault(697) /* metro dependency 697: native */).colors;
slashIconProps.color = a1 ? colors.WHITE : colors.INTERACTIVE_TEXT_DEFAULT;
return <SlashIcon {...slashIconProps} />;
}
return null;
}
function getPressableStyleOverrides(a0, a1, a2) { // fn#116233, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15394:1852, offset: 0x02482305, size: 157 bytes, params: 4, frame: 16
const DENY = (PermissionUtilsModule).DENY;
if (DENY === a0) {
return a1 ? a2.denySelected : a2.denyActive;
}
const ALLOW = (PermissionUtilsModule).ALLOW;
if (ALLOW === a0) {
return a1 ? a2.allowSelected : a2.allowActive;
}
const PASSTHROUGH = (PermissionUtilsModule).PASSTHROUGH;
if (PASSTHROUGH === a0) {
return a1 ? a2.passthroughSelected : a2.passthroughActive;
}
}
function OverrideOption({type, selected, styles, onPress}) { // fn#116234, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15394:2110, offset: 0x024823a2, size: 163 bytes, params: 2, frame: 22
const {accessibilityRole,
accessibilityState} = (UseA11yRolesNativeModule).useRadioA11yNative({selected: selected});
return (
<Pressable
accessibilityRole={accessibilityRole}
accessibilityLabel={getAccessibilityLabel(type)}
accessibilityState={accessibilityState}
style={style_116235}
onPress={onPress}
>
{getIcon_116232(type, selected, styles)}
</Pressable>
);
function OverrideOptionStyle({pressed}) { // fn#116235, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15394:2370, owner: OverrideOption.style, offset: 0x02482445, size: 85 bytes, params: 2, frame: 16
var r0;
var stylesBinding;
var value2;
var getPressableStyleOverridesBinding;
var typeBinding;
var items2;
let selectedBinding = selected;
if (selectedBinding) {
value2 = environment.__proto__;
getPressableStyleOverridesBinding = getPressableStyleOverrides;
typeBinding = type;
selectedBinding = selected;
stylesBinding = styles;
items2 = [getPressableStyleOverridesBinding(typeBinding, selectedBinding, stylesBinding)];
items2[1] = stylesBinding.iconWrapper;
r0 = items2;
} else if (pressed) {
value2 = environment.__proto__;
getPressableStyleOverridesBinding = getPressableStyleOverrides;
typeBinding = type;
selectedBinding = selected;
stylesBinding = styles;
items2 = [getPressableStyleOverridesBinding(typeBinding, selectedBinding, stylesBinding)];
items2[1] = stylesBinding.iconWrapper;
r0 = items2;
} else {
r0 = styles.iconWrapper;
}
return r0;
}
}
function ChannelSettingsPermissionsOverrideCheckbox({value, disabled, onValueChange}) { // fn#116236, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15394:2504, offset: 0x0248249a, size: 158 bytes, params: 2, frame: 20
disabled = !(disabled === undefined) && disabled;
const styles = useStyles();
return (
<View
style={[styles.ternaryCheckBox, disabled && styles.disabled]}
pointerEvents={disabled ? 'none' : 'auto'}
accessibilityRole="radiogroup"
>
{env0_7.map(_fun116237)}
</View>
);
function _fun116237(a0, a1) { // fn#116237, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15394:2736, offset: 0x02482538, size: 100 bytes, params: 3, frame: 17
const env0_0 = a0;
return (
<OverrideOption
type={a0}
selected={value === a0}
styles={styles}
onPress={onPress_116238}
key={'checkbox-' + a1}
/>
);
function onPress_116238() { // fn#116238, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15394:2800, offset: 0x0248259c, size: 56 bytes, params: 1, frame: 12
if (onValueChange != null && value !== env0_0) {
onValueChange(env0_0);
}
}
}
}
}
function getAccessibilityLabel(a0) { // fn#116231, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15394:1095, offset: 0x02482052, size: 274 bytes, params: 2, frame: 15
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const DENY = (require(3789) /* metro dependency 3789: PermissionUtils */).DENY;
if (DENY === a0) {
return intl.string(t['6639O5']);
}
const ALLOW = (require(3789) /* metro dependency 3789: PermissionUtils */).ALLOW;
if (ALLOW === a0) {
return intl.string(t.RzDfSk);
}
const PASSTHROUGH = (require(3789) /* metro dependency 3789: PermissionUtils */).PASSTHROUGH;
if (PASSTHROUGH === a0) {
return intl.string(t.ujC3ZS);
}
}
function getIcon_116232(a0, a1, a2) { // fn#116232, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15394:1355, offset: 0x02482164, size: 417 bytes, params: 4, frame: 19
var SlashIcon;
var colors;
var CheckmarkLargeBoldIcon;
var DenyIcon;
const DENY = (require(3789) /* metro dependency 3789: PermissionUtils */).DENY;
if (DENY === a0) {
DenyIcon = (require(10625) /* metro dependency 10625: DenyIcon */).DenyIcon;
var denyIconProps = {size: 'sm', style: a2.icon};
colors = (importDefault(697) /* metro dependency 697: native */).colors;
denyIconProps.color = a1 ? colors.WHITE : colors.ICON_FEEDBACK_CRITICAL;
return <DenyIcon {...denyIconProps} />;
}
const ALLOW = (require(3789) /* metro dependency 3789: PermissionUtils */).ALLOW;
if (ALLOW === a0) {
CheckmarkLargeBoldIcon = (require(9294) /* metro dependency 9294: CheckmarkLargeBoldIcon */).CheckmarkLargeBoldIcon;
var checkmarkLargeBoldIconProps = {size: 'sm', style: a2.icon};
colors = (importDefault(697) /* metro dependency 697: native */).colors;
checkmarkLargeBoldIconProps.color = a1 ? colors.WHITE : colors.ICON_FEEDBACK_POSITIVE;
return <CheckmarkLargeBoldIcon {...checkmarkLargeBoldIconProps} />;
}
const PASSTHROUGH = (require(3789) /* metro dependency 3789: PermissionUtils */).PASSTHROUGH;
if (PASSTHROUGH === a0) {
SlashIcon = (require(15198) /* metro dependency 15198: SlashIcon */).SlashIcon;
var slashIconProps = {size: 'sm', style: a2.icon};
colors = (importDefault(697) /* metro dependency 697: native */).colors;
slashIconProps.color = a1 ? colors.WHITE : colors.INTERACTIVE_TEXT_DEFAULT;
return <SlashIcon {...slashIconProps} />;
}
return null;
}
function getPressableStyleOverrides(a0, a1, a2) { // fn#116233, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15394:1852, offset: 0x02482305, size: 157 bytes, params: 4, frame: 16
const DENY = (require(3789) /* metro dependency 3789: PermissionUtils */).DENY;
if (DENY === a0) {
return a1 ? a2.denySelected : a2.denyActive;
}
const ALLOW = (require(3789) /* metro dependency 3789: PermissionUtils */).ALLOW;
if (ALLOW === a0) {
return a1 ? a2.allowSelected : a2.allowActive;
}
const PASSTHROUGH = (require(3789) /* metro dependency 3789: PermissionUtils */).PASSTHROUGH;
if (PASSTHROUGH === a0) {
return a1 ? a2.passthroughSelected : a2.passthroughActive;
}
}
function OverrideOption({type, selected, styles, onPress}) { // fn#116234, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15394:2110, offset: 0x024823a2, size: 163 bytes, params: 2, frame: 22
const {accessibilityRole,
accessibilityState} = (require(3874) /* metro dependency 3874: useA11yRolesNative */).useRadioA11yNative({selected: selected});
return (
<Pressable
accessibilityRole={accessibilityRole}
accessibilityLabel={getAccessibilityLabel(type)}
accessibilityState={accessibilityState}
style={style_116235}
onPress={onPress}
>
{getIcon_116232(type, selected, styles)}
</Pressable>
);
}
function ChannelSettingsPermissionsOverrideCheckbox({value, disabled, onValueChange}) { // fn#116236, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15394:2504, offset: 0x0248249a, size: 158 bytes, params: 2, frame: 20
disabled = !(disabled === undefined) && disabled;
const styles = useStyles();
return (
<View
style={[styles.ternaryCheckBox, disabled && styles.disabled]}
pointerEvents={disabled ? 'none' : 'auto'}
accessibilityRole="radiogroup"
>
{env0_7.map(_fun116237)}
</View>
);
}
function OverrideOptionStyle({pressed}) { // fn#116235, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15394:2370, owner: OverrideOption.style, offset: 0x02482445, size: 85 bytes, params: 2, frame: 16
var r0;
var stylesBinding;
var value2;
var getPressableStyleOverridesBinding;
var typeBinding;
var items2;
let selectedBinding = selected;
if (selectedBinding) {
value2 = environment.__proto__;
getPressableStyleOverridesBinding = getPressableStyleOverrides;
typeBinding = type;
selectedBinding = selected;
stylesBinding = styles;
items2 = [getPressableStyleOverridesBinding(typeBinding, selectedBinding, stylesBinding)];
items2[1] = stylesBinding.iconWrapper;
r0 = items2;
} else if (pressed) {
value2 = environment.__proto__;
getPressableStyleOverridesBinding = getPressableStyleOverrides;
typeBinding = type;
selectedBinding = selected;
stylesBinding = styles;
items2 = [getPressableStyleOverridesBinding(typeBinding, selectedBinding, stylesBinding)];
items2[1] = stylesBinding.iconWrapper;
r0 = items2;
} else {
r0 = styles.iconWrapper;
}
return r0;
}
function _fun116237(a0, a1) { // fn#116237, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15394:2736, offset: 0x02482538, size: 100 bytes, params: 3, frame: 17
const env0_0 = a0;
return (
<OverrideOption
type={a0}
selected={value === a0}
styles={styles}
onPress={onPress_116238}
key={'checkbox-' + a1}
/>
);
}
function onPress_116238() { // fn#116238, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15394:2800, offset: 0x0248259c, size: 56 bytes, params: 1, frame: 12
if (onValueChange != null && value !== env0_0) {
onValueChange(env0_0);
}
}
global.__d(_fun116230, 15197, [31, 27, 33, 697, 4501, 3789, 1244, 10625, 9294, 15198, 3874,
2]) /* metro module 15197, dependencies: [31, 27, 33, 697, 4501, 3789, 1244, 10625, 9294, 15198, 3874, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,20 +1,38 @@
/* Metro module 15189; source: components_native/channel_settings/ChannelSettingsPermissionsOverview.tsx; dependencies: [57, 5, 31, 27, 1939, 1379, 1938, 1867, 3793, 1878, 661, 33, 4501, 697, 4647, 1244, 4805, 3789, 9090, 8148, 22, 6231, 6238, 13127, 1484, 10375, 11025, 13770, 566, 1909, 12140, 1360, 5465, 9603, 4603, 2] */
import Module00005 from '../../by-id/module-00005.js'; /* Metro dependency 5 */
import Module00022 from '../../by-id/module-00022.js'; /* Metro dependency 22 */
import Module00057 from '../../by-id/module-00057.js'; /* Metro dependency 57 */
import Native from '../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import ChannelStore from '../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import GuildStore from '../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import UserStore from '../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import GuildRoleStore from '../../stores/GuildRoleStore.tsx'; /* Metro dependency 1938 */
import RelationshipStore from '../../stores/RelationshipStore.tsx'; /* Metro dependency 3793 */
import AlertActionCreators from '../../actions/AlertActionCreators.tsx'; /* Metro dependency 4647 */
import DetailedGuildIdentityUserRow from '../../modules/guild_settings/native/DetailedGuildIdentityUserRow.tsx'; /* Metro dependency 12140 */
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 FluxModule from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as UseNavigationNativeModule from '../../design/components/Navigator/native/useNavigation.native.tsx'; /* Metro dependency 1484 */
import * as ServerModule from '../../flow/Server.tsx'; /* Metro dependency 1909 */
import * as GuildRoleRecordModule from '../../records/GuildRoleRecord.tsx'; /* Metro dependency 1939 */
import * as UseChannelNameModule from '../../modules/channel/useChannelName.tsx'; /* Metro dependency 4805 */
import * as DeprecatedLayoutAnimationModule from '../../modules/animations/native/DeprecatedLayoutAnimation.tsx'; /* Metro dependency 5465 */
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 HeaderSharedModule from '../../modules/main_tabs_v2/native/shared_components/HeaderShared.tsx'; /* Metro dependency 9603 */
import * as PlusMediumIconModule from '../../design/components/Icon/native/redesign/generated/PlusMediumIcon.tsx'; /* Metro dependency 10375 */
import * as RoleLabelModule from '../../design/void/RoleLabel/native/RoleLabel.tsx'; /* Metro dependency 11025 */
import * as RefreshIconModule from '../../design/components/Icon/native/redesign/generated/RefreshIcon.tsx'; /* Metro dependency 13127 */
function _fun116097(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116097, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:6, offset: 0x0247adba, size: 512 bytes, params: 8, frame: 22
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = importDefault(57) /* metro dependency 57 */;
const env0_5 = importDefault(5) /* metro dependency 5 */;
const env0_6 = importAll(31) /* metro dependency 31 */;
const env0_7 = (require(27) /* metro dependency 27 */).View;
const env0_8 = (require(1939) /* metro dependency 1939: GuildRoleRecord */).isEveryoneRole;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildRoleStore = importDefault(1938) /* metro dependency 1938: GuildRoleStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
let value = require(661) /* metro dependency 661: Constants */;
let value = ConstantsModule;
const env0_14 = value.PermissionOverrideType;
const env0_15 = value.ChannelSettingsSections;
value = require(33) /* metro dependency 33 */;
@@ -22,418 +40,497 @@ function _fun116097(global, require, importDefault, importAll, module, exports,
const env0_17 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.tableRowGroupContainer = {marginBottom: PX_16};
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object2.tableContainer = {marginHorizontal: PX_12};
const env0_18 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/channel_settings/ChannelSettingsPermissionsOverview.tsx');
object = {};
const PX_16 = (Native).space.PX_16;
object.tableRowGroupContainer = {marginBottom: PX_16};
const PX_12 = (Native).space.PX_12;
object.tableContainer = {marginHorizontal: PX_12};
const env0_18 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('components_native/channel_settings/ChannelSettingsPermissionsOverview.tsx');
exports.default = ChannelSettingsPermissionsOverview;
}
function ChannelPermissionSyncModule({channel, category, locked}) { // fn#116098, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:451, offset: 0x0247afba, size: 411 bytes, params: 2, frame: 27
const styles = useStyles();
const value2 = ReactModule.useCallback(_fun116099, [channel, category]);
const channelName = UseChannelNameModule.computeChannelName(category, UserStore, RelationshipStore);
const TableRowGroup = (TableRowGroupNativeModule).TableRowGroup;
const intl = (IndexNativeModule).intl;
const formatToPlainString = intl.formatToPlainString;
const t = (IndexNativeModule).t;
const r7 = locked ? Reflect.apply(formatToPlainString, intl, [t.ETJqLl,
{categoryName: channelName}]) : Reflect.apply(formatToPlainString, intl, [t.OIhm0M,
{categoryName: channelName}]);
const TableRow = (TableRowNativeModule).TableRow;
const object2 = {};
const RefreshIcon = (RefreshIconModule).RefreshIcon;
object2.icon = <RefreshIcon />;
const string = intl.string;
const NVwuHq = (IndexNativeModule).t.NVwuHq;
object2.label = Reflect.apply(string, intl, [NVwuHq]);
object2.onPress = value2;
return (
<View style={styles.tableRowGroupContainer}>
<TableRowGroup title={r7} hasIcons>
<TableRow {...object2} />
</TableRowGroup>
</View>
);
function _fun116099() { // fn#116099, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:548, offset: 0x0247b155, size: 364 bytes, params: 1, frame: 32
const defaultImport = AlertActionCreators;
const show = defaultImport.show;
const object = {};
const intl = (IndexNativeModule).intl;
const string = intl.string;
const t = (IndexNativeModule).t;
const YWMtRe = t.YWMtRe;
object.title = Reflect.apply(string, intl, [YWMtRe]);
const format = intl.format;
const property = t['iKW+jY'];
const object2 = {};
object2.channelName = UseChannelNameModule.computeChannelName(channel, UserStore, RelationshipStore, true);
object2.categoryName = UseChannelNameModule.computeChannelName(category, UserStore, RelationshipStore);
object.body = Reflect.apply(format, intl, [property, object2]);
object.confirmText = intl.string(t.eW8Gy4);
object.cancelText = intl.string(t.s4uM3b);
const env0_0 = env1_5(_fun116101);
object.onConfirm = onConfirm_116102;
Reflect.apply(show, defaultImport, [object]);
function* _fun116101() { // fn#116101, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:887, offset: 0x0247b2cc, size: 255 bytes, params: 1, frame: 21
var value5;
var binding;
var value6;
var binding2;
var value11;
var saveChannel;
var id;
var object;
if (true) {
value = environment.__proto__.__proto__;
var guild_id = importDefault.guild_id;
var object2 = {};
copyDataProperties(object2, importDefault.permissionOverwrites, undefined);
if (guild_id != null && object2[guild_id] == null) {
value5 = environment.__proto__.__proto__.__proto__;
value6 = env3_2(env3_3[17]);
object2[guild_id] = value6.makeEveryoneOverwrite(guild_id);
}
var value8 = env3_0(env3_3[18]);
yield value8.checkChattableChannelThresholdMetAfterChannelPermissionDeny(require, object2[guild_id].deny,
object2[guild_id].allow);
var value9 = undefined;
if (false) {
return value9;
}
if (value9) {
binding = env3_0;
binding2 = env3_3;
value11 = binding(binding2[19]);
saveChannel = value11.saveChannel;
id = require.id;
object = {};
binding = env3_1;
object.permissionOverwrites = binding(binding2[20]).values(object2);
Reflect.apply(saveChannel, value11, [id, object]);
}
}
}
function ChannelPermissionSyncModule({channel, category, locked}) { // fn#116098, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:451, offset: 0x0247afba, size: 411 bytes, params: 2, frame: 27
const styles = useStyles();
const value2 = env0_6.useCallback(_fun116099, [channel, category]);
const useChannelNameModule = require(4805) /* metro dependency 4805: useChannelName */;
const channelName = useChannelNameModule.computeChannelName(category, UserStore, RelationshipStore);
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const formatToPlainString = intl.formatToPlainString;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const r7 = locked ? Reflect.apply(formatToPlainString, intl, [t.ETJqLl,
{categoryName: channelName}]) : Reflect.apply(formatToPlainString, intl, [t.OIhm0M,
{categoryName: channelName}]);
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const object = {};
const RefreshIcon = (require(13127) /* metro dependency 13127: RefreshIcon */).RefreshIcon;
object.icon = <RefreshIcon />;
const string = intl.string;
const NVwuHq = (require(1244) /* metro dependency 1244: indexNative */).t.NVwuHq;
object.label = Reflect.apply(string, intl, [NVwuHq]);
object.onPress = value2;
return (
<View style={styles.tableRowGroupContainer}>
<TableRowGroup title={r7} hasIcons>
<TableRow {...object} />
</TableRowGroup>
</View>
);
}
function onConfirm_116102() { // fn#116102, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:1182, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
return env0_0.apply(this, arguments);
}
function CategorySync({channel, category, isEditing, locked}) { // fn#116103, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:1636, offset: 0x0247b3cb, size: 77 bytes, params: 2, frame: 16
const value = null;
return value == category || isEditing ? value : <ChannelPermissionSyncModule channel={channel} category={category} locked={locked} />;
}
}
function AddPermission({isEditing}) { // fn#116104, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:1789, offset: 0x0247b418, size: 471 bytes, params: 2, frame: 29
const styles = useStyles();
const env0_0 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
if (isEditing) {
return null;
}
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const object = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.vPHdP5);
object.hasIcons = true;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const PlusMediumIcon = (require(10375) /* metro dependency 10375: PlusMediumIcon */).PlusMediumIcon;
const tableRow = <TableRow icon={<PlusMediumIcon />} label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.fVWxvT)} onPress={function() {
handleCreatePermissionOverwrite(PermissionOverrideType.ROLE);
}} />;
return (
<View style={styles.tableRowGroupContainer}>
<TableRowGroup {...object}>
{tableRow}
<TableRow
icon={<PlusMediumIcon />}
label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.riesLt)}
onPress={function() {
handleCreatePermissionOverwrite(PermissionOverrideType.MEMBER);
}}
/>
</TableRowGroup>
</View>
);
}
function RoleRow_116108({role, isEditing, onSelect, onDelete}) { // fn#116108, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:2424, offset: 0x0247b655, size: 308 bytes, params: 2, frame: 26
var r4;
var CircleMinusIcon;
var intl;
const name = role.name;
const colorString = role.colorString;
const colorStrings = role.colorStrings;
const isEveryoneRole2 = isEveryoneRole(role);
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const object2 = {};
const RoleLabel = (require(11025) /* metro dependency 11025: RoleLabel */).RoleLabel;
object2.label = <RoleLabel name={name} color={colorString} colors={colorStrings} />;
object2.arrow = !isEditing;
if (isEditing) {
if (isEveryoneRole2) {
r4 = null;
function CategorySync({channel, category, isEditing, locked}) { // fn#116103, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:1636, offset: 0x0247b3cb, size: 77 bytes, params: 2, frame: 16
const value = null;
return (
value == category || isEditing
? value
: (
<ChannelPermissionSyncModule
channel={channel}
category={category}
locked={locked}
/>
)
);
}
function AddPermission({isEditing}) { // fn#116104, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:1789, offset: 0x0247b418, size: 471 bytes, params: 2, frame: 29
const styles = useStyles();
const env0_0 = (UseNavigationNativeModule).useNavigation();
if (isEditing) {
return null;
}
const TableRowGroup = (TableRowGroupNativeModule).TableRowGroup;
const object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.vPHdP5);
object2.hasIcons = true;
const TableRow = (TableRowNativeModule).TableRow;
const PlusMediumIcon = (PlusMediumIconModule).PlusMediumIcon;
const tableRow = (
<TableRow
icon={<PlusMediumIcon />}
label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.fVWxvT)}
onPress={function() {
handleCreatePermissionOverwrite(PermissionOverrideType.ROLE);
}}
/>
);
return (
<View style={styles.tableRowGroupContainer}>
<TableRowGroup {...object2}>
{tableRow}
<TableRow
icon={<PlusMediumIcon />}
label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.riesLt)}
onPress={function() {
handleCreatePermissionOverwrite(PermissionOverrideType.MEMBER);
}}
/>
</TableRowGroup>
</View>
);
function handleCreatePermissionOverwrite(a0) { // fn#116105, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:1881, owner: AddPermission.handleCreatePermissionOverwrite, offset: 0x0247b5ef, size: 44 bytes, params: 2, frame: 14
const binding = env0_0;
const push = binding.push;
const NEW_PERMISSION = ChannelSettingsSections.NEW_PERMISSION;
Reflect.apply(push, binding, [NEW_PERMISSION, {type: a0}]);
}
}
function RoleRow_116108({role, isEditing, onSelect, onDelete}) { // fn#116108, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:2424, offset: 0x0247b655, size: 308 bytes, params: 2, frame: 26
var r4;
var CircleMinusIcon;
var intl;
const name = role.name;
const colorString = role.colorString;
const colorStrings = role.colorStrings;
const isEveryoneRole2 = isEveryoneRole(role);
const TableRow = (TableRowNativeModule).TableRow;
const object = {};
const RoleLabel = (RoleLabelModule).RoleLabel;
object.label = (
<RoleLabel
name={name}
color={colorString}
colors={colorStrings}
/>
);
object.arrow = !isEditing;
if (isEditing) {
if (isEveryoneRole2) {
r4 = null;
} else {
CircleMinusIcon = (require(13770) /* metro dependency 13770: CircleMinusIcon */).CircleMinusIcon;
var circleMinusIconProps = {color: (importDefault(697) /* metro dependency 697: native */).colors.ICON_FEEDBACK_CRITICAL};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
circleMinusIconProps.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.N86XcP);
r4 = <CircleMinusIcon {...circleMinusIconProps} />;
}
} else {
r4 = null;
}
object.icon = r4;
object.onPress = isEditing ? isEveryoneRole2 ? onSelect : onDelete : onSelect;
return <TableRow {...object} />;
}
function RoleOverwrites({guild, channel, isEditing, onSelectRow, onDeleteRow}) { // fn#116109, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:2799, offset: 0x0247b789, size: 357 bytes, params: 2, frame: 23
var moduleValue2;
const styles = useStyles();
const sortedRoles = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildRoleStore],
function() {
return GuildRoleStore.getSortedRoles(guild.id);
});
object = {};
copyDataProperties(object, channel.permissionOverwrites, undefined);
let id = guild.id;
if (object[id] == null) {
id = guild.id;
moduleValue2 = importAll(3789) /* metro dependency 3789: PermissionUtils */;
object[id] = moduleValue2.makeEveryoneOverwrite(guild.id);
}
const value2 = sortedRoles.filter(_fun116111);
const TableRowGroup = (TableRowGroupNativeModule).TableRowGroup;
const intl = (IndexNativeModule).intl;
return (
<View style={styles.tableRowGroupContainer}>
<TableRowGroup
title={intl.string((IndexNativeModule).t['LPJmL/'])}
hasIcons
>
{value2.map(_fun116112)}
</TableRowGroup>
</View>
);
function _fun116111({id}) { // fn#116111, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:3066, offset: 0x0247b90e, size: 78 bytes, params: 2, frame: 13
const type = Module00057[id]?.type;
const PermissionOverwriteType = (ServerModule).PermissionOverwriteType;
const ROLE = PermissionOverwriteType.ROLE;
return type === ROLE;
}
function _fun116112(a0) { // fn#116112, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:3314, offset: 0x0247b95c, size: 79 bytes, params: 2, frame: 16
const env0_0 = a0;
return (
<RoleRow_116108
role={a0}
isEditing={isEditing}
onSelect={onSelect_116113}
onDelete={onDelete_116114}
key={a0.id}
/>
);
function onSelect_116113() { // fn#116113, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:3356, offset: 0x0247b9ab, size: 28 bytes, params: 1, frame: 11
return onSelectRow(env0_0.id);
}
function onDelete_116114() { // fn#116114, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:3377, offset: 0x021e727a, size: 28 bytes, params: 1, frame: 11
return onDeleteRow(env0_0.id);
}
}
}
function MemberRow({guildId, user, isEditing, onSelect, onDelete}) { // fn#116115, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:3402, offset: 0x0247b9c7, size: 231 bytes, params: 2, frame: 22
var CircleMinusIcon;
var intl;
const defaultImportProps = {userId: user.id, guildId: guildId};
let r4 = isEditing ? onDelete : onSelect;
defaultImportProps.onPress = r4;
defaultImportProps.arrow = !isEditing;
if (isEditing) {
CircleMinusIcon = (require(13770) /* metro dependency 13770: CircleMinusIcon */).CircleMinusIcon;
var circleMinusIconProps = {color: (importDefault(697) /* metro dependency 697: native */).colors.ICON_FEEDBACK_CRITICAL};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
circleMinusIconProps.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.N86XcP);
r4 = <CircleMinusIcon {...circleMinusIconProps} />;
} else {
r4 = null;
}
} else {
r4 = null;
defaultImportProps.leading = r4;
return <DetailedGuildIdentityUserRow {...defaultImportProps} />;
}
object2.icon = r4;
object2.onPress = isEditing ? isEveryoneRole2 ? onSelect : onDelete : onSelect;
return <TableRow {...object2} />;
}
function RoleOverwrites({guild, channel, isEditing, onSelectRow, onDeleteRow}) { // fn#116109, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:2799, offset: 0x0247b789, size: 357 bytes, params: 2, frame: 23
var object2;
var moduleValue2;
const styles = useStyles();
const sortedRoles = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildRoleStore],
function() {
return GuildRoleStore.getSortedRoles(guild.id);
});
object2 = {};
copyDataProperties(object2, channel.permissionOverwrites, undefined);
let id = guild.id;
if (object2[id] == null) {
id = guild.id;
moduleValue2 = importAll(3789) /* metro dependency 3789: PermissionUtils */;
object2[id] = moduleValue2.makeEveryoneOverwrite(guild.id);
}
const value2 = sortedRoles.filter(_fun116111);
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<View style={styles.tableRowGroupContainer}>
<TableRowGroup
title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['LPJmL/'])}
hasIcons
>
{value2.map(_fun116112)}
</TableRowGroup>
</View>
);
}
function MemberRow({guildId, user, isEditing, onSelect, onDelete}) { // fn#116115, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:3402, offset: 0x0247b9c7, size: 231 bytes, params: 2, frame: 22
var CircleMinusIcon;
var intl;
const DetailedGuildIdentityUserRow = importDefault(12140) /* metro dependency 12140: DetailedGuildIdentityUserRow */;
const defaultImportProps = {userId: user.id, guildId: guildId};
let r4 = isEditing ? onDelete : onSelect;
defaultImportProps.onPress = r4;
defaultImportProps.arrow = !isEditing;
if (isEditing) {
CircleMinusIcon = (require(13770) /* metro dependency 13770: CircleMinusIcon */).CircleMinusIcon;
var circleMinusIconProps = {color: (importDefault(697) /* metro dependency 697: native */).colors.ICON_FEEDBACK_CRITICAL};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
circleMinusIconProps.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.N86XcP);
r4 = <CircleMinusIcon {...circleMinusIconProps} />;
} else {
r4 = null;
}
defaultImportProps.leading = r4;
return <DetailedGuildIdentityUserRow {...defaultImportProps} />;
}
function MemberOverwrites({channel, isEditing, onSelectRow, onDeleteRow}) { // fn#116116, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:3690, offset: 0x0247baae, size: 354 bytes, params: 2, frame: 24
var r0;
var TableRowGroup;
var intl;
const env0_0 = channel.guild_id;
const permissionOverwrites = channel.permissionOverwrites;
const styles = useStyles();
const value2 = (importDefault(22) /* metro dependency 22 */)(permissionOverwrites);
const value4 = value2.filter(function({type}) {
return type === require(dependencyMap[29]).PermissionOverwriteType.MEMBER;
}).map(function(a0) {
return UserStore.getUser(a0.id);
});
const value8 = value4.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish).sortBy(function({username}) {
return username.toLowerCase();
}).value();
if (value8.length <= 0) {
r0 = null;
} else {
var viewBindingProps = {style: styles.tableRowGroupContainer};
TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r0 = <View {...viewBindingProps}><TableRowGroup title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['9Oq93m'])} hasIcons>{value8.map(_fun116120)}</TableRowGroup></View>;
}
return r0;
}
function ChannelSettingsPermissionsOverview({channelId}) { // fn#116123, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:4381, offset: 0x0247bcb5, size: 663 bytes, params: 2, frame: 26
let env0_6 = undefined;
const styles = useStyles();
const value2 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channelId);
}, [channelId]);
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], _fun116128);
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], _fun116129);
const env0_4 = guild;
const env0_5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildRoleStore], _fun116130);
const value4 = env0_6.useMemo(_fun116131, [value3, channel]);
const value6 = env0_4(env0_6.useState(false), 2);
const property = value6[0];
env0_6 = property;
const env0_7 = value6[1];
env0_6.useLayoutEffect(_fun116134, [value2, property, env0_6.useCallback(_fun116132, [])]);
return value3 == null || guild == null ? null : <View style={styles.tableContainer}><CategorySync channel={value3} category={channel} isEditing={property} locked={value4} /><AddPermission isEditing={property} /><RoleOverwrites guild={guild} channel={value3} isEditing={property} onSelectRow={function(a0) {
handlePressRow(PermissionOverrideType.ROLE, a0);
}} onDeleteRow={function(a0) {
handleClearPermissionOverwrite(a0);
}} /><MemberOverwrites channel={value3} isEditing={property} onSelectRow={onSelectRow_116138} onDeleteRow={onDeleteRow_116139} /></View>;
}
function _fun116099() { // fn#116099, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:548, offset: 0x0247b155, size: 364 bytes, params: 1, frame: 32
const defaultImport = importDefault(4647) /* metro dependency 4647: AlertActionCreators */;
const show = defaultImport.show;
const object3 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const YWMtRe = t.YWMtRe;
object3.title = Reflect.apply(string, intl, [YWMtRe]);
const format = intl.format;
const property = t['iKW+jY'];
const object4 = {};
const useChannelNameModule = require(4805) /* metro dependency 4805: useChannelName */;
object4.channelName = useChannelNameModule.computeChannelName(channel, UserStore, RelationshipStore, true);
const moduleValue2 = useChannelNameModule;
object4.categoryName = moduleValue2.computeChannelName(category, UserStore, RelationshipStore);
object3.body = Reflect.apply(format, intl, [property, object4]);
object3.confirmText = intl.string(t.eW8Gy4);
object3.cancelText = intl.string(t.s4uM3b);
const env0_0 = env1_5(_fun116101);
object3.onConfirm = onConfirm_116102;
Reflect.apply(show, defaultImport, [object3]);
}
function handleCreatePermissionOverwrite(a0) { // fn#116105, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:1881, owner: AddPermission.handleCreatePermissionOverwrite, offset: 0x0247b5ef, size: 44 bytes, params: 2, frame: 14
const binding = env0_0;
const push = binding.push;
const NEW_PERMISSION = ChannelSettingsSections.NEW_PERMISSION;
Reflect.apply(push, binding, [NEW_PERMISSION, {type: a0}]);
}
function _fun116111({id}) { // fn#116111, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:3066, offset: 0x0247b90e, size: 78 bytes, params: 2, frame: 13
const type = env0_4[id]?.type;
const PermissionOverwriteType = (require(1909) /* metro dependency 1909: Server */).PermissionOverwriteType;
const ROLE = PermissionOverwriteType.ROLE;
return type === ROLE;
}
function _fun116112(a0) { // fn#116112, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:3314, offset: 0x0247b95c, size: 79 bytes, params: 2, frame: 16
const env0_0 = a0;
return (
<RoleRow_116108
role={a0}
isEditing={isEditing}
onSelect={onSelect_116113}
onDelete={onDelete_116114}
key={a0.id}
/>
);
}
function _fun116120(a0) { // fn#116120, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:4163, offset: 0x0247bc5f, size: 86 bytes, params: 2, frame: 17
const env0_0 = a0;
return (
<MemberRow
guildId={guild_id}
user={a0}
isEditing={isEditing}
onSelect={onSelect_116121}
onDelete={onDelete_116122}
key={a0.id}
/>
);
}
function handlePressRow(a0, a1) { // fn#116124, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:4962, owner: ChannelSettingsPermissionsOverview.handlePressRow, offset: 0x0247bf4c, size: 58 bytes, params: 3, frame: 14
var binding;
var push;
if (!env0_6) {
binding = env0_1;
push = binding.push;
value = environment.__proto__;
Reflect.apply(push, binding, [ChannelSettingsSections.PERMISSION_OVERRIDES, {type: a0, id: a1}]);
}
}
function handleClearPermissionOverwrite(a0) { // fn#116125, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:5039, owner: ChannelSettingsPermissionsOverview.handleClearPermissionOverwrite, offset: 0x0247bf86, size: 345 bytes, params: 2, frame: 23
const env0_0 = a0;
const value2 = undefined;
const r1 = env0_5 == null ? value2 : env0_5[a0];
const user = UserStore.getUser(a0);
const r12 = r1 != null ? r1.name : user == null ? value2 : user.username;
const defaultImport = importDefault(4647) /* metro dependency 4647: AlertActionCreators */;
const show = defaultImport.show;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const formatToPlainString = intl.formatToPlainString;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
Reflect.apply(show, defaultImport, [{title: Reflect.apply(formatToPlainString, intl, [t.txPV7k, {name: r12}]),
body: intl.format(t.xERCnZ, {name: r12}), cancelText: intl.string(t.gm1Vej), confirmText: intl.string(t.p89ACt),
onConfirm: onConfirm_116126}]);
return value2;
}
function _fun116128() { // fn#116128, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:4573, offset: 0x0247c114, size: 47 bytes, params: 1, frame: 13
return ChannelStore.getChannel(env0_2?.parent_id);
}
function _fun116129() { // fn#116129, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:4655, offset: 0x0247c143, size: 47 bytes, params: 1, frame: 13
return GuildStore.getGuild(env0_2?.guild_id);
}
function _fun116130() { // fn#116130, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:4734, offset: 0x0247c172, size: 47 bytes, params: 1, frame: 12
return guild != null ? GuildRoleStore.getRolesSnapshot(guild.id) : undefined;
}
function _fun116131() { // fn#116131, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:4793, offset: 0x0247c1a1, size: 63 bytes, params: 1, frame: 14
var r0;
var value3;
var moduleValue;
const value2 = env0_2 != null;
if (value2) {
value3 = environment.__proto__;
moduleValue = importAll(3789) /* metro dependency 3789: PermissionUtils */;
r0 = moduleValue.areChannelsLocked(env0_2, channel);
} else {
r0 = value2;
}
return r0;
}
function _fun116132() { // fn#116132, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:4903, offset: 0x0247c1e0, size: 58 bytes, params: 1, frame: 12
var environment;
env0_7(function(a0) {
return !a0;
});
const value = environment.__proto__;
(require(5465) /* metro dependency 5465: DeprecatedLayoutAnimation */).DeprecatedLayoutAnimation();
}
function _fun116134() { // fn#116134, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:5541, offset: 0x0247c21a, size: 38 bytes, params: 1, frame: 12
const binding = env0_1;
binding.setOptions({headerRight: headerRight_116135});
}
function ChannelSettingsPermissionsOverviewOnSelectRow_116138(a0) { // fn#116138, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:6066, owner: ChannelSettingsPermissionsOverview.onSelectRow, offset: 0x0247c2fc, size: 33 bytes, params: 2, frame: 13
const handlePressRowBinding = handlePressRow;
const MEMBER = PermissionOverrideType.MEMBER;
handlePressRowBinding(MEMBER, a0);
}
function* _fun116101() { // fn#116101, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:887, offset: 0x0247b2cc, size: 255 bytes, params: 1, frame: 21
var value5;
var binding;
var value6;
var binding2;
var value11;
var saveChannel;
var id;
var object3;
if (true) {
value = environment.__proto__.__proto__;
var guild_id = importDefault.guild_id;
var object4 = {};
copyDataProperties(object4, importDefault.permissionOverwrites, undefined);
if (guild_id != null && object4[guild_id] == null) {
value5 = environment.__proto__.__proto__.__proto__;
value6 = env3_2(env3_3[17]);
object4[guild_id] = value6.makeEveryoneOverwrite(guild_id);
function MemberOverwrites({channel, isEditing, onSelectRow, onDeleteRow}) { // fn#116116, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:3690, offset: 0x0247baae, size: 354 bytes, params: 2, frame: 24
var r0;
var TableRowGroup;
var intl;
const env0_0 = channel.guild_id;
const permissionOverwrites = channel.permissionOverwrites;
const styles = useStyles();
const value2 = (Module00022)(permissionOverwrites);
const value4 = value2.filter(function({type}) {
return type === require(dependencyMap[29]).PermissionOverwriteType.MEMBER;
}).map(function(a0) {
return UserStore.getUser(a0.id);
});
const value8 = value4.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish).sortBy(function({username}) {
return username.toLowerCase();
}).value();
if (value8.length <= 0) {
r0 = null;
} else {
var viewBindingProps = {style: styles.tableRowGroupContainer};
TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r0 = (
<View {...viewBindingProps}>
<TableRowGroup
title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['9Oq93m'])}
hasIcons
>
{value8.map(_fun116120)}
</TableRowGroup>
</View>
);
}
var value8 = env3_0(env3_3[18]);
yield value8.checkChattableChannelThresholdMetAfterChannelPermissionDeny(require, object4[guild_id].deny,
object4[guild_id].allow);
var value9 = undefined;
if (false) {
return value9;
}
if (value9) {
binding = env3_0;
binding2 = env3_3;
value11 = binding(binding2[19]);
saveChannel = value11.saveChannel;
id = require.id;
object3 = {};
binding = env3_1;
object3.permissionOverwrites = binding(binding2[20]).values(object4);
Reflect.apply(saveChannel, value11, [id, object3]);
return r0;
function _fun116120(a0) { // fn#116120, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:4163, offset: 0x0247bc5f, size: 86 bytes, params: 2, frame: 17
const env0_0 = a0;
return (
<MemberRow
guildId={guild_id}
user={a0}
isEditing={isEditing}
onSelect={onSelect_116121}
onDelete={onDelete_116122}
key={a0.id}
/>
);
function onSelect_116121() { // fn#116121, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:4217, offset: 0x0247b9ab, size: 28 bytes, params: 1, frame: 11
return onSelectRow(env0_0.id);
}
function onDelete_116122() { // fn#116122, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:4238, offset: 0x021e727a, size: 28 bytes, params: 1, frame: 11
return onDeleteRow(env0_0.id);
}
}
}
function ChannelSettingsPermissionsOverview({channelId}) { // fn#116123, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:4381, offset: 0x0247bcb5, size: 663 bytes, params: 2, frame: 26
let env0_6 = undefined;
const styles = useStyles();
const value2 = (UseNavigationNativeModule).useNavigation();
const useStateFromStores = FluxModule.useStateFromStores;
const channelStoreBinding = ChannelStore;
const value3 = Reflect.apply(useStateFromStores, FluxModule, [[channelStoreBinding], function() {
return ChannelStore.getChannel(channelId);
}, [channelId]]);
const channel = FluxModule.useStateFromStores([channelStoreBinding], _fun116128);
const guild = FluxModule.useStateFromStores([GuildStore], _fun116129);
const guild2 = guild;
const env0_5 = FluxModule.useStateFromStores([GuildRoleStore], _fun116130);
const value4 = env0_6.useMemo(_fun116131, [value3, channel]);
const value6 = guild2(env0_6.useState(false), 2);
const property = value6[0];
env0_6 = property;
const env0_7 = value6[1];
env0_6.useLayoutEffect(_fun116134, [value2, property, env0_6.useCallback(_fun116132, [])]);
return (
value3 == null || guild == null
? null
: (
<View style={styles.tableContainer}>
<CategorySync
channel={value3}
category={channel}
isEditing={property}
locked={value4}
/>
<AddPermission isEditing={property} />
<RoleOverwrites
guild={guild}
channel={value3}
isEditing={property}
onSelectRow={function(a0) {
handlePressRow(PermissionOverrideType.ROLE, a0);
}}
onDeleteRow={function(a0) {
handleClearPermissionOverwrite(a0);
}}
/>
<MemberOverwrites
channel={value3}
isEditing={property}
onSelectRow={onSelectRow_116138}
onDeleteRow={onDeleteRow_116139}
/>
</View>
)
);
function handlePressRow(a0, a1) { // fn#116124, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:4962, owner: ChannelSettingsPermissionsOverview.handlePressRow, offset: 0x0247bf4c, size: 58 bytes, params: 3, frame: 14
var binding;
var push;
if (!env0_6) {
binding = env0_1;
push = binding.push;
value = environment.__proto__;
Reflect.apply(push, binding, [ChannelSettingsSections.PERMISSION_OVERRIDES, {type: a0, id: a1}]);
}
}
function handleClearPermissionOverwrite(a0) { // fn#116125, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:5039, owner: ChannelSettingsPermissionsOverview.handleClearPermissionOverwrite, offset: 0x0247bf86, size: 345 bytes, params: 2, frame: 23
const env0_0 = a0;
const value2 = undefined;
const r1 = env0_5 == null ? value2 : env0_5[a0];
const user = UserStore.getUser(a0);
const r12 = r1 != null ? r1.name : user == null ? value2 : user.username;
const defaultImport = AlertActionCreators;
const show = defaultImport.show;
const intl = (IndexNativeModule).intl;
const formatToPlainString = intl.formatToPlainString;
const t = (IndexNativeModule).t;
Reflect.apply(show, defaultImport, [{title: Reflect.apply(formatToPlainString, intl, [t.txPV7k, {name: r12}]),
body: intl.format(t.xERCnZ, {name: r12}), cancelText: intl.string(t.gm1Vej), confirmText: intl.string(t.p89ACt),
onConfirm: onConfirm_116126}]);
return value2;
function handleClearPermissionOverwriteOnConfirm() { // fn#116126, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:5416, owner: ChannelSettingsPermissionsOverview.handleClearPermissionOverwrite.onConfirm, offset: 0x0247c0df, size: 53 bytes, params: 1, frame: 14
const binding = env0_0;
let value = environment.__proto__.__proto__;
value = importDefault(4603) /* metro dependency 4603: ChannelActionCreators */;
value.clearPermissionOverwrite(channelId, binding);
}
}
function _fun116128() { // fn#116128, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:4573, offset: 0x0247c114, size: 47 bytes, params: 1, frame: 13
return ChannelStore.getChannel(env0_2?.parent_id);
}
function _fun116129() { // fn#116129, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:4655, offset: 0x0247c143, size: 47 bytes, params: 1, frame: 13
return GuildStore.getGuild(env0_2?.guild_id);
}
function _fun116130() { // fn#116130, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:4734, offset: 0x0247c172, size: 47 bytes, params: 1, frame: 12
return guild != null ? GuildRoleStore.getRolesSnapshot(guild.id) : undefined;
}
function _fun116131() { // fn#116131, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:4793, offset: 0x0247c1a1, size: 63 bytes, params: 1, frame: 14
var r0;
var value3;
var moduleValue;
const value2 = env0_2 != null;
if (value2) {
value3 = environment.__proto__;
moduleValue = importAll(3789) /* metro dependency 3789: PermissionUtils */;
r0 = moduleValue.areChannelsLocked(env0_2, channel);
} else {
r0 = value2;
}
return r0;
}
function _fun116132() { // fn#116132, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:4903, offset: 0x0247c1e0, size: 58 bytes, params: 1, frame: 12
var environment;
env0_7(function(a0) {
return !a0;
});
const value = environment.__proto__;
(DeprecatedLayoutAnimationModule).DeprecatedLayoutAnimation();
}
function _fun116134() { // fn#116134, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:5541, offset: 0x0247c21a, size: 38 bytes, params: 1, frame: 12
const binding = env0_1;
binding.setOptions({headerRight: headerRight_116135});
function headerRight_116135(a0) { // fn#116135, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:5572, offset: 0x0247c240, size: 155 bytes, params: 2, frame: 19
const value = environment.__proto__.__proto__;
const HeaderTextButton = (HeaderSharedModule).HeaderTextButton;
const headerTextButtonProps = {...a0};
headerTextButtonProps['onPress'] = env1_8;
const binding = env1_6;
const intl = (IndexNativeModule).intl;
const string = intl.string;
const t = (IndexNativeModule).t;
headerTextButtonProps['label'] = binding ? Reflect.apply(string, intl, [t.i4jeWR]) : Reflect.apply(string, intl,
[t.bt75uw]);
return <HeaderTextButton {...headerTextButtonProps} />;
}
}
function ChannelSettingsPermissionsOverviewOnSelectRow_116138(a0) { // fn#116138, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:6066, owner: ChannelSettingsPermissionsOverview.onSelectRow, offset: 0x0247c2fc, size: 33 bytes, params: 2, frame: 13
const handlePressRowBinding = handlePressRow;
const MEMBER = PermissionOverrideType.MEMBER;
handlePressRowBinding(MEMBER, a0);
}
function ChannelSettingsPermissionsOverviewOnDeleteRow_116139(a0) { // fn#116139, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:6108, owner: ChannelSettingsPermissionsOverview.onDeleteRow, offset: 0x02094ab3, size: 19 bytes, params: 2, frame: 11
handleClearPermissionOverwrite(a0);
}
}
}
function onSelect_116113() { // fn#116113, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:3356, offset: 0x0247b9ab, size: 28 bytes, params: 1, frame: 11
return onSelectRow(env0_0.id);
}
function handleClearPermissionOverwriteOnConfirm() { // fn#116126, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:5416, owner: ChannelSettingsPermissionsOverview.handleClearPermissionOverwrite.onConfirm, offset: 0x0247c0df, size: 53 bytes, params: 1, frame: 14
const binding = env0_0;
let value = environment.__proto__.__proto__;
value = importDefault(4603) /* metro dependency 4603: ChannelActionCreators */;
value.clearPermissionOverwrite(channelId, binding);
}
function headerRight_116135(a0) { // fn#116135, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:5572, offset: 0x0247c240, size: 155 bytes, params: 2, frame: 19
const value = environment.__proto__.__proto__;
const HeaderTextButton = (require(9603) /* metro dependency 9603: HeaderShared */).HeaderTextButton;
const headerTextButtonProps = {...a0};
headerTextButtonProps['onPress'] = env1_8;
const binding = env1_6;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
headerTextButtonProps['label'] = binding ? Reflect.apply(string, intl, [t.i4jeWR]) : Reflect.apply(string, intl,
[t.bt75uw]);
return <HeaderTextButton {...headerTextButtonProps} />;
}
global.__d(_fun116097, 15189, [57, 5, 31, 27, 1939, 1379, 1938, 1867, 3793, 1878, 661, 33, 4501, 697, 4647, 1244,
4805, 3789, 9090, 8148, 22, 6231, 6238, 13127, 1484, 10375, 11025, 13770, 566, 1909, 12140, 1360, 5465, 9603,
4603,
2]) /* metro module 15189, dependencies: [57, 5, 31, 27, 1939, 1379, 1938, 1867, 3793, 1878, 661, 33, 4501, 697, 4647, 1244, 4805, 3789, 9090, 8148, 22, 6231, 6238, 13127, 1484, 10375, 11025, 13770, 566, 1909, 12140, 1360, 5465, 9603, 4603, 2] */;
@@ -1,11 +1,14 @@
/* Metro module 15177; source: components_native/channel_settings/ChannelSettingsUtils.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun115952(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115952, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15374:6, offset: 0x02475ab4, size: 87 bytes, params: 8, frame: 15
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/channel_settings/ChannelSettingsUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/channel_settings/ChannelSettingsUtils.tsx');
exports.getIsChannelNameSettingEditable = function({canManageThread, canManageChannels, canSendMessages,
isForumPost, isThread, isChannelOwner}) {
return isForumPost && isChannelOwner ? canSendMessages : isForumPost ? canManageThread : isThread ? canManageThread || isChannelOwner : canManageChannels;
};
}
global.__d(_fun115952, 15177, [2]) /* metro module 15177, dependencies: [2] */;
File diff suppressed because it is too large. Load diff
+148 -125
View File
@@ -1,15 +1,20 @@
/* Metro module 9773; source: components_native/chat/ChatItem.tsx; dependencies: [57, 31, 27, 4502, 661, 8178, 33, 4020, 9774, 9775, 9776, 671, 5216, 4501, 697, 477, 8368, 3860, 674, 4589, 2] */
import Module00057 from '../../by-id/module-00057.js'; /* Metro dependency 57 */
import AccessibilityStore from '../../modules/a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */
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 ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as UseTokenModule from '../../design/tokens/native/useToken.tsx'; /* Metro dependency 3860 */
import * as FabricUtilsModule from '../../utils/native/FabricUtils.tsx'; /* Metro dependency 4020 */
function _fun76692(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76692, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9959:6, offset: 0x01de0e93, size: 503 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const requireNativeComponent = value.requireNativeComponent;
const env0_5 = value.View;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const env0_7 = (require(661) /* metro dependency 661: Constants */).MessageTypes;
value = require(8178) /* metro dependency 8178: RowGeneratorConstants */;
const env0_8 = value.RowType;
const env0_9 = value.Changeset;
@@ -27,136 +32,154 @@ function _fun76692(global, require, importDefault, importAll, module, exports, d
gradient: {'position': 'absolute', 'bottom': 0, 'height': 24, 'width': '100%'},
itemRow: {backgroundColor: 'transparent'}};
});
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/chat/ChatItem.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/chat/ChatItem.tsx');
exports.default = _default_76695;
exports.DCDMessageView = r4;
exports.DCDSystemMessageView = r3;
exports.DCDAutoModerationSystemMessageView = r1;
}
function DCDChatItem(a0) { // fn#76693, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9959:458, offset: 0x01de108a, size: 246 bytes, params: 2, frame: 18
var r0;
var AUTOMOD_INCIDENT_ACTIONS;
const message = a0.message;
const value = Object.create(null);
value.message = 0;
const value2 = copyDataProperties({}, a0, value, undefined);
const type = message.type;
const AUTO_MODERATION_ACTION = MessageTypes.AUTO_MODERATION_ACTION;
if (type === AUTO_MODERATION_ACTION) {
r0 = ((Component) => <Component {...value2} />)(env0_14);
} else {
AUTOMOD_INCIDENT_ACTIONS = (require(671) /* metro dependency 671: MessageTypes */).MessageTypesSets.AUTOMOD_INCIDENT_ACTIONS;
r0 = AUTOMOD_INCIDENT_ACTIONS.has(message.type) ? ((Component) => <Component {...value2} />)(env0_12) : (importDefault(5216) /* metro dependency 5216: isSystemMessage */)(message) ? ((Component) => <Component {...value2} />)(env0_13) : ((Component) => <Component {...value2} />)(env0_12);
function DCDChatItem(a0) { // fn#76693, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9959:458, offset: 0x01de108a, size: 246 bytes, params: 2, frame: 18
var r0;
var AUTOMOD_INCIDENT_ACTIONS;
const message = a0.message;
const value = Object.create(null);
value.message = 0;
const value2 = copyDataProperties({}, a0, value, undefined);
const type = message.type;
const AUTO_MODERATION_ACTION = MessageTypes.AUTO_MODERATION_ACTION;
if (type === AUTO_MODERATION_ACTION) {
r0 = ((Component) => <Component {...value2} />)(env0_14);
} else {
AUTOMOD_INCIDENT_ACTIONS = (require(671) /* metro dependency 671: MessageTypes */).MessageTypesSets.AUTOMOD_INCIDENT_ACTIONS;
r0 = (
AUTOMOD_INCIDENT_ACTIONS.has(message.type)
? ((Component) => <Component {...value2} />)(env0_12)
: (
(importDefault(5216) /* metro dependency 5216: isSystemMessage */)(message)
? ((Component) => <Component {...value2} />)(env0_13)
: ((Component) => <Component {...value2} />)(env0_12)
)
);
}
return r0;
}
return r0;
}
function _default_76695({rowGenerator, message, style, horizontalOffset, maxHeight, modifyRow, pointerEvents, onLayout, messageSizeCacheRef, backgroundColor = importDefault(dependencyMap[14]).colors.BACKGROUND_BASE_LOWER, gradientStyles}) { // fn#76695, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9959:901, offset: 0x01de11d0, size: 745 bytes, params: 2, frame: 30
horizontalOffset = horizontalOffset === undefined ? 8 : horizontalOffset;
const env0_3 = onLayout;
const env0_4 = messageSizeCacheRef;
const binding = env0_4;
let useState = binding.useState;
const value5 = Reflect.apply(useState, binding, [0]);
const binding2 = env0_3;
const value6 = binding2(value5, 2);
const property = value6[0];
const env0_5 = value6[1];
useState = binding.useState;
const value7 = binding2(Reflect.apply(useState, binding, [undefined]), 2);
const property2 = value7[0];
const env0_7 = value7[1];
const {row, rawRow} = binding.useMemo(_fun76696, [property2, AccessibilityStore.roleStyle, message, modifyRow,
rowGenerator]);
const value9 = binding.useMemo(_fun76697, [rawRow.contextType]);
const styles = useStyles(horizontalOffset, value9);
const value10 = binding.useCallback(_fun76698, [onLayout]);
const value11 = binding.useCallback(_fun76699, [messageSizeCacheRef, message.id]);
let r5 = maxHeight != null && property - value9 >= maxHeight;
let r16 = messageSizeCacheRef == null || messageSizeCacheRef.current == null ? undefined : messageSizeCacheRef.current[message.id];
r16 = r5 ? maxHeight : r16;
const view = <View style={styles.offset} onLayout={value11}><DCDChatItem message={message} row={row} style={styles.itemRow} /></View>;
const value16 = env0_4.useMemo(_fun76700,
[(require(3860) /* metro dependency 3860: useToken */).useToken(backgroundColor)]);
const items2 = [styles.container, style];
items2[2] = {height: r16};
const r7 = property2 != null && view;
r5 = r5 && ((Component) => <Component colors={value16} style={[styles.gradient,
gradientStyles]} />)(importDefault(4589) /* metro dependency 4589 */);
return (
<View
style={items2}
onLayout={value10}
pointerEvents={pointerEvents}
>
{r7}
{r5}
</View>
);
}
function _default_76695({rowGenerator, message, style, horizontalOffset, maxHeight, modifyRow, pointerEvents, onLayout, messageSizeCacheRef, backgroundColor = importDefault(dependencyMap[14]).colors.BACKGROUND_BASE_LOWER, gradientStyles}) { // fn#76695, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9959:901, offset: 0x01de11d0, size: 745 bytes, params: 2, frame: 30
horizontalOffset = horizontalOffset === undefined ? 8 : horizontalOffset;
const onLayout2 = onLayout;
const messageSizeCacheRef2 = messageSizeCacheRef;
const binding = messageSizeCacheRef2;
let useState = binding.useState;
const value5 = Reflect.apply(useState, binding, [0]);
const binding2 = onLayout2;
const value6 = binding2(value5, 2);
const property = value6[0];
const env0_5 = value6[1];
useState = binding.useState;
const value7 = binding2(Reflect.apply(useState, binding, [undefined]), 2);
const property2 = value7[0];
const env0_7 = value7[1];
const {row, rawRow} = binding.useMemo(_fun76696, [property2, AccessibilityStore.roleStyle, message, modifyRow,
rowGenerator]);
const value9 = binding.useMemo(_fun76697, [rawRow.contextType]);
const styles = useStyles(horizontalOffset, value9);
const value10 = binding.useCallback(_fun76698, [onLayout]);
const value11 = binding.useCallback(_fun76699, [messageSizeCacheRef, message.id]);
let r5 = maxHeight != null && property - value9 >= maxHeight;
let r16 = messageSizeCacheRef == null || messageSizeCacheRef.current == null ? undefined : messageSizeCacheRef.current[message.id];
r16 = r5 ? maxHeight : r16;
const view = (
<View style={styles.offset} onLayout={value11}>
<DCDChatItem
message={message}
row={row}
style={styles.itemRow}
/>
</View>
);
const value16 = messageSizeCacheRef2.useMemo(_fun76700,
[(UseTokenModule).useToken(backgroundColor)]);
const items2 = [styles.container, style];
items2[2] = {height: r16};
const r7 = property2 != null && view;
r5 = r5 && ((Component) => <Component colors={value16} style={[styles.gradient,
gradientStyles]} />)(importDefault(4589) /* metro dependency 4589 */);
return (
<View
style={items2}
onLayout={value10}
pointerEvents={pointerEvents}
>
{r7}
{r5}
</View>
);
function _fun76696() { // fn#76696, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9959:1223, offset: 0x01de14b9, size: 221 bytes, params: 1, frame: 16
var object2;
var r1;
var JSON;
var stringify;
var object;
const rowGeneratorBinding = rowGenerator;
rowGeneratorBinding.setOptions({constrainedWidth: env0_6});
const generate = rowGeneratorBinding.generate;
const MESSAGE = RowType.MESSAGE;
const NOOP = Changeset.NOOP;
const value3 = Reflect.apply(generate, rowGeneratorBinding, [{roleStyle: roleStyle, rowType: MESSAGE,
changeType: NOOP, message: message, isFirst: true, canShowImages: true, canAddNewReactions: false}]);
if (modifyRow != null) {
modifyRow(value3);
}
object2 = {rawRow: value3};
if (FabricUtilsModule.isFabric()) {
JSON = global.JSON;
stringify = JSON.stringify;
object = {index: 0};
copyDataProperties(object, value3, 0);
r1 = Reflect.apply(stringify, JSON, [object]);
} else {
r1 = value3;
}
object2.row = r1;
return object2;
}
function _fun76696() { // fn#76696, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9959:1223, offset: 0x01de14b9, size: 221 bytes, params: 1, frame: 16
var object4;
var r1;
var JSON;
var stringify;
var object3;
const rowGeneratorBinding = rowGenerator;
rowGeneratorBinding.setOptions({constrainedWidth: env0_6});
const generate = rowGeneratorBinding.generate;
const MESSAGE = RowType.MESSAGE;
const NOOP = Changeset.NOOP;
const value3 = Reflect.apply(generate, rowGeneratorBinding, [{roleStyle: roleStyle, rowType: MESSAGE,
changeType: NOOP, message: message, isFirst: true, canShowImages: true, canAddNewReactions: false}]);
if (modifyRow != null) {
modifyRow(value3);
}
object4 = {rawRow: value3};
const value = require(4020) /* metro dependency 4020: FabricUtils */;
if (value.isFabric()) {
JSON = global.JSON;
stringify = JSON.stringify;
object3 = {index: 0};
copyDataProperties(object3, value3, 0);
r1 = Reflect.apply(stringify, JSON, [object3]);
} else {
r1 = value3;
}
object4.row = r1;
return object4;
}
function _fun76697() { // fn#76697, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9959:1526, offset: 0x01de1596, size: 97 bytes, params: 1, frame: 14
const value = environment.__proto__;
return (require(477) /* metro dependency 477: PlatformUtils */).isAndroid() ? 0 : rawRow.contextType !== (require(8368) /* metro dependency 8368: RowGeneratorTypes */).MessageContextType.SEARCH ? 16 : 12;
}
function _fun76697() { // fn#76697, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9959:1526, offset: 0x01de1596, size: 97 bytes, params: 1, frame: 14
const value = environment.__proto__;
return (require(477) /* metro dependency 477: PlatformUtils */).isAndroid() ? 0 : rawRow.contextType !== (require(8368) /* metro dependency 8368: RowGeneratorTypes */).MessageContextType.SEARCH ? 16 : 12;
}
function _fun76698(a0) { // fn#76698, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9959:1654, offset: 0x01de15f7, size: 55 bytes, params: 2, frame: 13
env0_7(a0.nativeEvent.layout.width);
if (onLayout != null) {
onLayout(a0);
}
}
function _fun76699({nativeEvent}) { // fn#76699, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9959:1726, offset: 0x01de162e, size: 102 bytes, params: 2, frame: 12
const height = nativeEvent.layout.height;
if (height > 0) {
if (messageSizeCacheRef != null) {
if (messageSizeCacheRef.current[message.id] !== height) {
messageSizeCacheRef.current[message.id] = height;
function _fun76698(a0) { // fn#76698, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9959:1654, offset: 0x01de15f7, size: 55 bytes, params: 2, frame: 13
env0_7(a0.nativeEvent.layout.width);
if (onLayout != null) {
onLayout(a0);
}
}
env0_5(height);
function _fun76699({nativeEvent}) { // fn#76699, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9959:1726, offset: 0x01de162e, size: 102 bytes, params: 2, frame: 12
const height = nativeEvent.layout.height;
if (height > 0) {
if (messageSizeCacheRef != null) {
if (messageSizeCacheRef.current[message.id] !== height) {
messageSizeCacheRef.current[message.id] = height;
}
}
env0_5(height);
}
}
function _fun76700() { // fn#76700, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9959:2043, offset: 0x01de1694, size: 78 bytes, params: 1, frame: 12
let value = environment.__proto__;
value = importDefault(674) /* metro dependency 674 */;
value = value(env0_10);
value = value.alpha(0);
value = value.hex();
return [value, env0_10];
}
}
}
function _fun76700() { // fn#76700, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9959:2043, offset: 0x01de1694, size: 78 bytes, params: 1, frame: 12
let value = environment.__proto__;
value = importDefault(674) /* metro dependency 674 */;
value = value(env0_10);
value = value.alpha(0);
value = value.hex();
return [value, env0_10];
}
global.__d(_fun76692, 9773, [57, 31, 27, 4502, 661, 8178, 33, 4020, 9774, 9775, 9776, 671, 5216, 4501, 697, 477,
8368, 3860, 674, 4589,
2]) /* metro module 9773, dependencies: [57, 31, 27, 4502, 661, 8178, 33, 4020, 9774, 9775, 9776, 671, 5216, 4501, 697, 477, 8368, 3860, 674, 4589, 2] */;
+425 -359
View File
@@ -1,397 +1,463 @@
/* Metro module 11091; source: components_native/chat/ImageCarousel.tsx; dependencies: [31, 27, 4645, 4644, 11092, 33, 4501, 697, 4017, 4504, 1305, 4577, 44, 4650, 566, 11093, 11143, 11158, 8670, 4573, 1244, 9376, 8999, 5278, 8523, 1478, 7879, 11095, 2] */
import Module00044 from '../../by-id/module-00044.js'; /* Metro dependency 44 */
import Native from '../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import ReanimatedRexport from '../../modules/reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import UploadAttachmentStore from '../../stores/UploadAttachmentStore.tsx'; /* Metro dependency 4644 */
import Module08523 from '../../by-id/module-08523.js'; /* Metro dependency 8523 */
import ShowUploadPreviewActionSheet from '../../modules/media_uploads/native/showUploadPreviewActionSheet.tsx'; /* Metro dependency 11093 */
import AttachmentPreview from '../../modules/media/native/AttachmentPreview.tsx'; /* Metro dependency 11143 */
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 FluxModule from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as IndexNativeModule from '../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as NativeModule from '../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as UseWindowDimensionsNativeModule from '../../modules/screen/useWindowDimensions.native.tsx'; /* Metro dependency 1478 */
import * as ReanimatedRexportModule from '../../modules/reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as CreateStylesModule from '../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as DraftStoreModule from '../../stores/DraftStore.tsx'; /* Metro dependency 4645 */
import * as UploadModule from '../../lib/uploader/Upload.tsx'; /* Metro dependency 4650 */
import * as PressablesModule from '../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as ImageCarouselConstantsModule from '../../modules/image/native/ImageCarouselConstants.tsx'; /* Metro dependency 11092 */
import * as MediaKeyboardUtilsModule from '../../modules/media_keyboard/native/MediaKeyboardUtils.tsx'; /* Metro dependency 11095 */
function _fun84913(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84913, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11277:6, offset: 0x01f5c00e, size: 1003 bytes, params: 8, frame: 29
var object2;
const env0_0 = require;
const closure = useTileEntranceAnimatedStyle;
const useTileEntranceAnimatedStyle2 = useTileEntranceAnimatedStyle;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_4 = value2.View;
const StyleSheet = value2.StyleSheet;
const env0_5 = value2.ScrollView;
const env0_6 = (require(4645) /* metro dependency 4645: DraftStore */).DraftType;
const uploadAttachmentStore = importDefault(4644) /* metro dependency 4644: UploadAttachmentStore */;
const imageCarouselConstantsModule = require(11092) /* metro dependency 11092: ImageCarouselConstants */;
const IMAGE_CAROUSEL_EXPERIMENT_TILE_MARGIN = imageCarouselConstantsModule.IMAGE_CAROUSEL_EXPERIMENT_TILE_MARGIN;
const IMAGE_CAROUSEL_TILE_CLOSE_BUTTON_PADDING = imageCarouselConstantsModule.IMAGE_CAROUSEL_TILE_CLOSE_BUTTON_PADDING;
const env0_10 = imageCarouselConstantsModule.IMAGE_CAROUSEL_TILE_HEIGHT;
const value4 = require(33) /* metro dependency 33 */;
const env0_11 = value4.jsx;
const env0_12 = value4.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {};
object2.container = {width: '100%'};
object2.pressableContainer = {marginHorizontal: 4};
const object3 = {'position': 'relative', 'minWidth': 60, 'backgroundColor': null, 'overflow': 'hidden'};
let value = ReactModule;
const StyleSheet = ReactNativeModule.StyleSheet;
const IMAGE_CAROUSEL_EXPERIMENT_TILE_MARGIN = ImageCarouselConstantsModule.IMAGE_CAROUSEL_EXPERIMENT_TILE_MARGIN;
const IMAGE_CAROUSEL_TILE_CLOSE_BUTTON_PADDING = ImageCarouselConstantsModule.IMAGE_CAROUSEL_TILE_CLOSE_BUTTON_PADDING;
const createStyles = CreateStylesModule.createStyles;
object = {};
object.container = {width: '100%'};
object.pressableContainer = {marginHorizontal: 4};
const object4 = {'position': 'relative', 'minWidth': 60, 'backgroundColor': null, 'overflow': 'hidden'};
let BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object3.backgroundColor = BACKGROUND_SURFACE_HIGH;
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md - 1;
object2.tileContainer = object3;
const object6 = {};
copyDataProperties(object6, StyleSheet.absoluteFillObject, undefined);
object6['flex'] = 1;
object6['flexDirection'] = 'row';
object6['justifyContent'] = 'space-between';
object6['alignItems'] = 'flex-end';
object6['padding'] = 4;
object2.decorationsContainer = object6;
object4.backgroundColor = BACKGROUND_SURFACE_HIGH;
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md - 1;
object.tileContainer = object4;
const object5 = {};
copyDataProperties(object5, StyleSheet.absoluteFillObject, undefined);
object5['flex'] = 1;
object5['flexDirection'] = 'row';
object5['justifyContent'] = 'space-between';
object5['alignItems'] = 'flex-end';
object5['padding'] = 4;
object.decorationsContainer = object5;
const INTERACTIVE_TEXT_ACTIVE = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_ACTIVE;
object2.highlightedTileContainer = {'borderColor': null, 'borderStyle': 'solid', 'borderWidth': 2,
object.highlightedTileContainer = {'borderColor': null, 'borderStyle': 'solid', 'borderWidth': 2,
'borderRadius': 10, borderColor: INTERACTIVE_TEXT_ACTIVE};
object2.closeButton = {'position': 'absolute', 'top': null, 'right': 2,
object.closeButton = {'position': 'absolute', 'top': null, 'right': 2,
top: -1 * IMAGE_CAROUSEL_EXPERIMENT_TILE_MARGIN};
object2.scrollview = {paddingTop: IMAGE_CAROUSEL_TILE_CLOSE_BUTTON_PADDING};
object.scrollview = {paddingTop: IMAGE_CAROUSEL_TILE_CLOSE_BUTTON_PADDING};
let BACKGROUND_SCRIM_LIGHTBOX = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SCRIM_LIGHTBOX;
object2.closeContainer = {'height': 20, 'width': 20, 'borderRadius': 20, 'alignItems': 'center',
object.closeContainer = {'height': 20, 'width': 20, 'borderRadius': 20, 'alignItems': 'center',
'justifyContent': 'center', backgroundColor: BACKGROUND_SCRIM_LIGHTBOX};
const object7 = {};
object7.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
const object10 = {};
object10.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
object7.backgroundColor = BACKGROUND_BASE_LOWER;
object10.backgroundColor = BACKGROUND_BASE_LOWER;
const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
object7.tintColor = INTERACTIVE_TEXT_DEFAULT;
object2.closeButtonIcon = object7;
const object8 = {};
object10.tintColor = INTERACTIVE_TEXT_DEFAULT;
object.closeButtonIcon = object10;
const object11 = {};
let PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object8.paddingHorizontal = PX_4;
object8.lineHeight = 20;
object11.paddingHorizontal = PX_4;
object11.lineHeight = 20;
BACKGROUND_SCRIM_LIGHTBOX = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SCRIM_LIGHTBOX;
object8.backgroundColor = BACKGROUND_SCRIM_LIGHTBOX;
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object8.textTransform = 'uppercase';
object2.altTagText = object8;
const object9 = {};
object11.backgroundColor = BACKGROUND_SCRIM_LIGHTBOX;
object11.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object11.textTransform = 'uppercase';
object.altTagText = object11;
const object12 = {};
BACKGROUND_SCRIM_LIGHTBOX = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SCRIM_LIGHTBOX;
object9.backgroundColor = BACKGROUND_SCRIM_LIGHTBOX;
object9.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object12.backgroundColor = BACKGROUND_SCRIM_LIGHTBOX;
object12.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object9.padding = PX_4;
object2.iconContainer = object9;
const object14 = {};
copyDataProperties(object14, StyleSheet.absoluteFillObject, undefined);
object2.spoilerOverlay = object14;
object12.padding = PX_4;
object.iconContainer = object12;
const object13 = {};
copyDataProperties(object13, StyleSheet.absoluteFillObject, undefined);
object.spoilerOverlay = object13;
BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object2.footerRightContainer = {'position': 'absolute', 'bottom': 4, 'right': 4, 'alignItems': 'center',
object.footerRightContainer = {'position': 'absolute', 'bottom': 4, 'right': 4, 'alignItems': 'center',
'justifyContent': 'center', 'alignContent': 'center', 'backgroundColor': null, 'padding': 4, 'borderRadius': 20,
'opacity': 0.85, backgroundColor: BACKGROUND_SURFACE_HIGH};
const env0_13 = Reflect.apply(createStyles, createStylesModule, [object2]);
object2 = {code: "function ImageCarouselTsx1(){const{withTiming,animatedStylePropValue,STANDARD_EASING,withSpring}=this.__closure;return{opacity:withTiming(animatedStylePropValue.get(),{duration:300,easing:STANDARD_EASING},'animate-always'),transform:[{scale:withSpring(animatedStylePropValue.get(),{stiffness:80,damping:6,mass:0.3},'animate-always')}]};}"};
const env0_13 = Reflect.apply(createStyles, CreateStylesModule, [object]);
object = {code: "function ImageCarouselTsx1(){const{withTiming,animatedStylePropValue,STANDARD_EASING,withSpring}=this.__closure;return{opacity:withTiming(animatedStylePropValue.get(),{duration:300,easing:STANDARD_EASING},'animate-always'),transform:[{scale:withSpring(animatedStylePropValue.get(),{stiffness:80,damping:6,mass:0.3},'animate-always')}]};}"};
value = value.memo(_fun84928);
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/chat/ImageCarousel.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/chat/ImageCarousel.tsx');
exports.default = value;
exports.useTileEntranceAnimatedStyle = closure;
}
exports.useTileEntranceAnimatedStyle = useTileEntranceAnimatedStyle2;
function useTileEntranceAnimatedStyle(a0) { // fn#84914, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11277:2146, offset: 0x01f5c3f9, size: 216 bytes, params: 2, frame: 20
const value2 = (ReanimatedRexportModule).useSharedValue(0);
env0_3.useEffect(_fun84915, [value2, a0]);
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
const useTileEntranceAnimatedStyleL2 = useTileEntranceAnimatedStyleL;
object = {};
object.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
object.animatedStylePropValue = value2;
const STANDARD_EASING = (NativeModule).STANDARD_EASING;
object.STANDARD_EASING = STANDARD_EASING;
object.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
useTileEntranceAnimatedStyleL2.__closure = object;
useTileEntranceAnimatedStyleL2.__workletHash = 9754366991991;
useTileEntranceAnimatedStyleL2.__initData = env0_14;
return Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [useTileEntranceAnimatedStyleL2]);
function _fun84915() { // fn#84915, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11277:2241, offset: 0x01c2f741, size: 24 bytes, params: 1, frame: 11
env0_0.set(1);
}
function useTileEntranceAnimatedStyle(a0) { // fn#84914, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11277:2146, offset: 0x01f5c3f9, size: 216 bytes, params: 2, frame: 20
var object2;
const value2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
env0_3.useEffect(_fun84915, [value2, a0]);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = useTileEntranceAnimatedStyleL;
object2 = {};
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
object2.animatedStylePropValue = value2;
const STANDARD_EASING = (require(1305) /* metro dependency 1305: native */).STANDARD_EASING;
object2.STANDARD_EASING = STANDARD_EASING;
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
closure.__closure = object2;
closure.__workletHash = 9754366991991;
closure.__initData = env0_14;
return Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
}
function useTileEntranceAnimatedStyleL() { // fn#84916, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11277:2293, owner: useTileEntranceAnimatedStyle.l, offset: 0x01f5c4d1, size: 168 bytes, params: 1, frame: 20
const object = {};
let value = environment.__proto__;
value = require(4504) /* metro dependency 4504: timing */;
const withTiming = value.withTiming;
const binding = env0_0;
const value3 = binding.get();
const STANDARD_EASING = (NativeModule).STANDARD_EASING;
object.opacity = Reflect.apply(withTiming, value, [value3, {duration: 300, easing: STANDARD_EASING},
'animate-always']);
const object3 = {};
value = require(4577) /* metro dependency 4577: spring */;
object3.scale = value.withSpring(binding.get(), {'stiffness': 80, 'damping': 6, 'mass': 0.3}, 'animate-always');
object.transform = [object3];
return object;
}
function Tile({onEdit, onRemove, channelId, highlightThumbnails, upload}) { // fn#84917, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11277:2701, offset: 0x01f5c579, size: 1259 bytes, params: 2, frame: 40
var object4;
highlightThumbnails = !(highlightThumbnails === undefined) && highlightThumbnails;
const env0_3 = upload;
const styles = useStyles();
const description = upload.description;
const id = upload.id;
const item = upload.item;
const isVideo = upload.isVideo;
const isImage = upload.isImage;
const isThumbnail = upload.isThumbnail;
const defaultImport = importDefault(44) /* metro dependency 44 */;
const platform = item.platform;
const UploadPlatform = (require(4650) /* metro dependency 4650: Upload */).UploadPlatform;
const REACT_NATIVE = UploadPlatform.REACT_NATIVE;
defaultImport(platform === REACT_NATIVE, 'Upload must be a React Native upload item.');
let r15 = highlightThumbnails && isThumbnail === true;
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UploadAttachmentStore],
_fun84918);
let binding = env0_3;
let useCallback = binding.useCallback;
const value4 = Reflect.apply(useCallback, binding, [_fun84919, [isVideo, isImage, r15]]);
const value5 = env0_3.useCallback(_fun84920, [onRemove, id]);
const value6 = env0_3.useCallback(_fun84921, [channelId, onRemove, onEdit, upload, id]);
const value7 = env0_3.useCallback(_fun84923, [value5]);
const value8 = useTileEntranceAnimatedStyle(item.id ?? item.uri);
binding = env0_3;
useCallback = binding.useCallback;
let filename = item.filename;
const value9 = Reflect.apply(useCallback, binding, [_fun84924, [value4, value8, description, item.uri, filename,
isImage, isThumbnail, isVideo, value3, styles]]);
object4 = {name: 'remove'};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
object4.label = Reflect.apply(string, intl, [(require(1244) /* metro dependency 1244: indexNative */).t.kFwAsa]);
const items2 = [object4];
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
let formatToPlainString = intl.formatToPlainString;
const MJHFt9 = (require(1244) /* metro dependency 1244: indexNative */).t.MJHFt9;
filename = item.filename;
const value10 = '';
string = intl.string;
const QtJ1c5 = (require(1244) /* metro dependency 1244: indexNative */).t.QtJ1c5;
r15 = r15 && styles.highlightedTileContainer;
const pressableOpacity = <PressableOpacity accessibilityRole="button" accessibilityLabel={Reflect.apply(formatToPlainString,
intl, [MJHFt9, {name: filename ?? value10}])} accessibilityHint={Reflect.apply(string, intl,
[QtJ1c5])} accessibilityActions={items2} onAccessibilityAction={value7} disabled={!isImage && !isVideo} onPress={value6} style={[styles.pressableContainer,
r15]}>{value9()}</PressableOpacity>;
formatToPlainString = intl.formatToPlainString;
const FxKgb3 = (require(1244) /* metro dependency 1244: indexNative */).t.FxKgb3;
const object2 = {};
object2.name = item.filename ?? value10;
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const items4 = [styles.closeContainer, value8];
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
const object3 = {source: importDefault(8523) /* metro dependency 8523 */};
const Icon2 = (require(1305) /* metro dependency 1305: native */).Icon;
const Sizes = Icon2.Sizes;
const MEDIUM = Sizes.MEDIUM;
object3.size = MEDIUM;
const PRIMARY_500 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_500;
object3.color = PRIMARY_500;
object3.style = styles.closeButtonIcon;
return (
<View>
{pressableOpacity}
}
function Tile({onEdit, onRemove, channelId, highlightThumbnails, upload}) { // fn#84917, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11277:2701, offset: 0x01f5c579, size: 1259 bytes, params: 2, frame: 40
var object4;
highlightThumbnails = !(highlightThumbnails === undefined) && highlightThumbnails;
const upload2 = upload;
const styles = useStyles();
const description = upload.description;
const id = upload.id;
const item = upload.item;
const isVideo = upload.isVideo;
const isImage = upload.isImage;
const isThumbnail = upload.isThumbnail;
const defaultImport = Module00044;
const platform = item.platform;
const UploadPlatform = (UploadModule).UploadPlatform;
const REACT_NATIVE = UploadPlatform.REACT_NATIVE;
defaultImport(platform === REACT_NATIVE, 'Upload must be a React Native upload item.');
let r15 = highlightThumbnails && isThumbnail === true;
const value3 = (FluxModule).useStateFromStores([UploadAttachmentStore],
_fun84918);
let binding = upload2;
let useCallback = binding.useCallback;
const value4 = Reflect.apply(useCallback, binding, [_fun84919, [isVideo, isImage, r15]]);
const value5 = upload2.useCallback(_fun84920, [onRemove, id]);
const value6 = upload2.useCallback(_fun84921, [channelId, onRemove, onEdit, upload, id]);
const value7 = upload2.useCallback(_fun84923, [value5]);
const value8 = useTileEntranceAnimatedStyle(item.id ?? item.uri);
binding = upload2;
useCallback = binding.useCallback;
let filename = item.filename;
const value9 = Reflect.apply(useCallback, binding, [_fun84924, [value4, value8, description, item.uri, filename,
isImage, isThumbnail, isVideo, value3, styles]]);
object4 = {name: 'remove'};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
object4.label = Reflect.apply(string, intl, [(require(1244) /* metro dependency 1244: indexNative */).t.kFwAsa]);
const items2 = [object4];
const PressableOpacity = (PressablesModule).PressableOpacity;
let formatToPlainString = intl.formatToPlainString;
const MJHFt9 = (require(1244) /* metro dependency 1244: indexNative */).t.MJHFt9;
filename = item.filename;
const value10 = '';
string = intl.string;
const QtJ1c5 = (require(1244) /* metro dependency 1244: indexNative */).t.QtJ1c5;
r15 = r15 && styles.highlightedTileContainer;
const pressableOpacity = (
<PressableOpacity
accessibilityRole="button"
accessibilityLabel={Reflect.apply(formatToPlainString, intl, [FxKgb3, object2])}
style={styles.closeButton}
onPress={value5}
hitSlop={{'top': 4, 'bottom': 4, 'left': 4, 'right': 4}}
accessibilityLabel={Reflect.apply(formatToPlainString, intl, [MJHFt9, {name: filename ?? value10}])}
accessibilityHint={Reflect.apply(string, intl, [QtJ1c5])}
accessibilityActions={items2}
onAccessibilityAction={value7}
disabled={!isImage && !isVideo}
onPress={value6}
style={[styles.pressableContainer, r15]}
>
<View2 style={items4}>
<Icon {...object3} />
</View2>
{value9()}
</PressableOpacity>
</View>
);
}
function CustomScrollView(a0) { // fn#84925, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11277:5336, offset: 0x01f5cf0b, size: 207 bytes, params: 2, frame: 18
const styles = useStyles();
const env0_0 = env0_3.useRef(0);
const env0_1 = env0_3.useRef(0);
return (
<ScrollView
{...a0}
{...{['ref']: env0_3.useRef(null)}}
{...{['onContentSizeChange']: env0_3.useCallback(_fun84926, [])}}
{...{['onScroll']: env0_3.useCallback(_fun84927, [])}}
{...{['scrollEventThrottle']: 16}}
{...{['contentContainerStyle']: styles.scrollview}}
/>
);
}
function _fun84928({attachments, channelId, headerElement, highlightThumbnails}) { // fn#84928, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11277:5774, offset: 0x01f5d079, size: 428 bytes, params: 2, frame: 25
var r8;
if (highlightThumbnails !== undefined) {
}
let env0_3 = undefined;
var value;
const styles = useStyles();
let r11 = attachments != null && attachments.length > 0;
r11 = !r11 ? headerElement != null : r11;
env0_3 = env0_3.useCallback(_fun84930, [channelId, env0_3.useCallback(function(a0) {
importDefault(dependencyMap[26]).remove(channelId, a0, DraftType.ChannelMessage);
}, [channelId])]);
const items2 = [styles.container];
items2[1] = {height: r11 ? IMAGE_CAROUSEL_TILE_HEIGHT + IMAGE_CAROUSEL_TILE_CLOSE_BUTTON_PADDING : 0,
marginTop: r11 ? -1 * (IMAGE_CAROUSEL_TILE_CLOSE_BUTTON_PADDING - IMAGE_CAROUSEL_EXPERIMENT_TILE_MARGIN) : 0,
marginBottom: r11 ? 2 * IMAGE_CAROUSEL_EXPERIMENT_TILE_MARGIN : 0};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const RhtzFe = (require(1244) /* metro dependency 1244: indexNative */).t.RhtzFe;
if (attachments != null) {
value = global.Object.values(attachments);
value = value.map(_fun84931);
r8 = value;
} else {
r8 = null;
}
return (
<View style={items2}>
<CustomScrollView
horizontal
keyboardShouldPersistTaps="always"
showsHorizontalScrollIndicator={false}
accessibilityRole="list"
accessibilityLabel={Reflect.apply(string, intl, [RhtzFe])}
>
{headerElement}
{r8}
</CustomScrollView>
</View>
);
}
function useTileEntranceAnimatedStyleL() { // fn#84916, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11277:2293, owner: useTileEntranceAnimatedStyle.l, offset: 0x01f5c4d1, size: 168 bytes, params: 1, frame: 20
const object2 = {};
let value = environment.__proto__;
value = require(4504) /* metro dependency 4504: timing */;
const withTiming = value.withTiming;
const binding = env0_0;
const value3 = binding.get();
const STANDARD_EASING = (require(1305) /* metro dependency 1305: native */).STANDARD_EASING;
object2.opacity = Reflect.apply(withTiming, value, [value3, {duration: 300, easing: STANDARD_EASING},
'animate-always']);
const object4 = {};
value = require(4577) /* metro dependency 4577: spring */;
object4.scale = value.withSpring(binding.get(), {'stiffness': 80, 'damping': 6, 'mass': 0.3}, 'animate-always');
object2.transform = [object4];
return object2;
}
function _fun84918() { // fn#84918, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11277:3028, offset: 0x01f5ca64, size: 70 bytes, params: 1, frame: 15
const value = environment.__proto__;
const getUpload = UploadAttachmentStore.getUpload;
const channelIdBinding = channelId;
const idBinding = id;
const ChannelMessage = DraftType.ChannelMessage;
const spoiler = Reflect.apply(getUpload, UploadAttachmentStore, [channelIdBinding, idBinding,
ChannelMessage])?.spoiler;
return spoiler != null && spoiler;
}
function _fun84919() { // fn#84919, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11277:3140, offset: 0x01f5caaa, size: 65 bytes, params: 1, frame: 5
var r1;
var IMAGE_CAROUSEL_TILE_HEIGHT2;
let value = environment.__proto__;
const r2 = env0_11 ? IMAGE_CAROUSEL_TILE_HEIGHT - 4 : IMAGE_CAROUSEL_TILE_HEIGHT;
const r4 = isVideo || isImage;
value = undefined;
if (r4) {
r1 = value;
IMAGE_CAROUSEL_TILE_HEIGHT2 = IMAGE_CAROUSEL_TILE_HEIGHT;
} else {
r1 = 192;
IMAGE_CAROUSEL_TILE_HEIGHT2 = value;
}
return {width: IMAGE_CAROUSEL_TILE_HEIGHT2, height: r2, maxWidth: r1};
}
function _fun84920() { // fn#84920, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11277:3264, offset: 0x01f5caeb, size: 35 bytes, params: 1, frame: 12
return onRemove?.(id);
}
function _fun84921() { // fn#84921, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11277:3313, offset: 0x01f5cb0e, size: 77 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__;
(importDefault(11093) /* metro dependency 11093: showUploadPreviewActionSheet */)({channelId: channelId,
onRemove: onRemove, onEdit: onEdit_84922, upload: upload});
}
function _fun84923({nativeEvent}) { // fn#84923, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11277:3426, offset: 0x01f5cb82, size: 40 bytes, params: 2, frame: 9
if (nativeEvent.actionName === 'remove') {
env0_14();
}
}
function _fun84924() { // fn#84924, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11277:3552, offset: 0x01f5cbaa, size: 865 bytes, params: 1, frame: 33
var r16;
var Text;
var intl;
const value2 = undefined;
const {width, height, maxWidth} = env0_13();
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const items2 = [styles.tileContainer];
items2[1] = {width: width, height: height};
items2[2] = env0_15;
const value5 = ((Component) => <Component uri={item.uri} isImage={isImage} isVideo={isVideo} width={width} height={height} maxFileWidth={maxWidth} fileName={item.filename} borderRadius={(importDefault(697) /* metro dependency 697: native */).radii.md} />)(importDefault(11143) /* metro dependency 11143: AttachmentPreview */);
const isThumbnailBinding = isThumbnail;
const value6 = null;
const r5 = isThumbnailBinding ? <View style={styles.footerRightContainer}>{((Icon) => <Icon source={importDefault(11158) /* metro dependency 11158 */} size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.SMALL_14} />)((require(1305) /* metro dependency 1305: native */).Icon)}</View> : value6;
const items3 = [env0_12 ? ((Component) => <Component style={styles.spoilerOverlay} />)(importDefault(8670) /* metro dependency 8670: VisualEffectViewThemed */) : value6];
if (value6 != description) {
if ((value6 == description ? value2 : description.length) > 0) {
Text = (require(4573) /* metro dependency 4573: Text */).Text;
var textProps = {'variant': 'text-xs/medium', 'color': 'white', 'allowFontScaling': false,
style: styles.altTagText};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r16 = <Text {...textProps}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.QEW81z)}</Text>;
} else {
r16 = value6;
}
} else {
r16 = value6;
}
const items4 = [r16];
items4[1] = isVideo ? <View style={styles.iconContainer}>{((PlayIcon) => <PlayIcon size="xxs" color="white" />)((require(9376) /* metro dependency 9376: PlayIcon */).PlayIcon)}</View> : value6;
items3[1] = <View>{items4}</View>;
items3[2] = env0_12 ? <View style={styles.iconContainer}>{((EyeIcon) => <EyeIcon size="xxs" color="white" />)((require(8999) /* metro dependency 8999: EyeIcon */).EyeIcon)}</View> : value6;
return (
<View2 style={items2}>
{value5}
{r5}
<View style={styles.decorationsContainer}>
{items3}
);
formatToPlainString = intl.formatToPlainString;
const FxKgb3 = (require(1244) /* metro dependency 1244: indexNative */).t.FxKgb3;
const object = {};
object.name = item.filename ?? value10;
const View2 = (ReanimatedRexport).View;
const items4 = [styles.closeContainer, value8];
const Icon = (NativeModule).Icon;
const object2 = {source: Module08523};
const Icon2 = (NativeModule).Icon;
const Sizes = Icon2.Sizes;
const MEDIUM = Sizes.MEDIUM;
object2.size = MEDIUM;
const PRIMARY_500 = (Native).unsafe_rawColors.PRIMARY_500;
object2.color = PRIMARY_500;
object2.style = styles.closeButtonIcon;
return (
<View>
{pressableOpacity}
<PressableOpacity
accessibilityRole="button"
accessibilityLabel={Reflect.apply(formatToPlainString, intl, [FxKgb3, object])}
style={styles.closeButton}
onPress={value5}
hitSlop={{
'top': 4,
'bottom': 4,
'left': 4,
'right': 4,
}}
>
<View2 style={items4}>
<Icon {...object2} />
</View2>
</PressableOpacity>
</View>
</View2>
);
}
function _fun84926(a0) { // fn#84926, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11277:5437, offset: 0x01f5cfda, size: 122 bytes, params: 2, frame: 15
let current = env0_0.current;
const current2 = env0_1.current;
const useWindowDimensionsNativeModule = require(1478) /* metro dependency 1478: useWindowDimensionsNative */;
const getWindowDimensions = useWindowDimensionsNativeModule.getWindowDimensions;
if (a0 > current || current2 + Reflect.apply(getWindowDimensions, useWindowDimensionsNativeModule, []).width > a0) {
current = env0_2.current;
if (current != null) {
current.scrollToEnd();
);
function _fun84918() { // fn#84918, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11277:3028, offset: 0x01f5ca64, size: 70 bytes, params: 1, frame: 15
const value = environment.__proto__;
const uploadAttachmentStoreBinding = UploadAttachmentStore;
const getUpload = uploadAttachmentStoreBinding.getUpload;
const channelIdBinding = channelId;
const idBinding = id;
const ChannelMessage = DraftType.ChannelMessage;
const spoiler = Reflect.apply(getUpload, uploadAttachmentStoreBinding, [channelIdBinding, idBinding,
ChannelMessage])?.spoiler;
return spoiler != null && spoiler;
}
function _fun84919() { // fn#84919, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11277:3140, offset: 0x01f5caaa, size: 65 bytes, params: 1, frame: 5
var r1;
var IMAGE_CAROUSEL_TILE_HEIGHT2;
let value = environment.__proto__;
const r2 = JsxRuntimeModule.jsx ? IMAGE_CAROUSEL_TILE_HEIGHT - 4 : IMAGE_CAROUSEL_TILE_HEIGHT;
const r4 = isVideo || isImage;
value = undefined;
if (r4) {
r1 = value;
IMAGE_CAROUSEL_TILE_HEIGHT2 = IMAGE_CAROUSEL_TILE_HEIGHT;
} else {
r1 = 192;
IMAGE_CAROUSEL_TILE_HEIGHT2 = value;
}
return {width: IMAGE_CAROUSEL_TILE_HEIGHT2, height: r2, maxWidth: r1};
}
function _fun84920() { // fn#84920, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11277:3264, offset: 0x01f5caeb, size: 35 bytes, params: 1, frame: 12
return onRemove?.(id);
}
function _fun84921() { // fn#84921, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11277:3313, offset: 0x01f5cb0e, size: 77 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__;
(ShowUploadPreviewActionSheet)({channelId: channelId,
onRemove: onRemove, onEdit: onEdit, upload: upload});
function onEdit(a0) { // fn#84922, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11277:3358, offset: 0x01f5cb5b, size: 39 bytes, params: 2, frame: 14
const value = environment.__proto__;
return onEdit?.(id, a0);
}
}
function _fun84923({nativeEvent}) { // fn#84923, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11277:3426, offset: 0x01f5cb82, size: 40 bytes, params: 2, frame: 9
if (nativeEvent.actionName === 'remove') {
env0_14();
}
}
function _fun84924() { // fn#84924, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11277:3552, offset: 0x01f5cbaa, size: 865 bytes, params: 1, frame: 33
var r16;
var Text;
var intl;
const value2 = undefined;
const {width, height, maxWidth} = env0_13();
const View2 = (ReanimatedRexport).View;
const items2 = [styles.tileContainer];
items2[1] = {width: width, height: height};
items2[2] = env0_15;
const value5 = ((Component) => <Component uri={item.uri} isImage={isImage} isVideo={isVideo} width={width} height={height} maxFileWidth={maxWidth} fileName={item.filename} borderRadius={(Native).radii.md} />)(AttachmentPreview);
const isThumbnailBinding = isThumbnail;
const value6 = null;
const r5 = (
isThumbnailBinding
? (
<View style={styles.footerRightContainer}>
{((Icon) => <Icon source={importDefault(11158) /* metro dependency 11158 */} size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.SMALL_14} />)((require(1305) /* metro dependency 1305: native */).Icon)}
</View>
)
: value6
);
const items3 = [
JsxRuntimeModule.jsxs
? ((Component) => <Component style={styles.spoilerOverlay} />)(importDefault(8670) /* metro dependency 8670: VisualEffectViewThemed */)
: value6,
];
if (value6 != description) {
if ((value6 == description ? value2 : description.length) > 0) {
Text = (require(4573) /* metro dependency 4573: Text */).Text;
var textProps = {'variant': 'text-xs/medium', 'color': 'white', 'allowFontScaling': false,
style: styles.altTagText};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r16 = (
<Text {...textProps}>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.QEW81z)}
</Text>
);
} else {
r16 = value6;
}
} else {
r16 = value6;
}
const items4 = [r16];
items4[1] = (
isVideo
? (
<View style={styles.iconContainer}>
{((PlayIcon) => <PlayIcon size="xxs" color="white" />)((require(9376) /* metro dependency 9376: PlayIcon */).PlayIcon)}
</View>
)
: value6
);
items3[1] = (
<View>
{items4}
</View>
);
items3[2] = (
JsxRuntimeModule.jsxs
? (
<View style={styles.iconContainer}>
{((EyeIcon) => <EyeIcon size="xxs" color="white" />)((require(8999) /* metro dependency 8999: EyeIcon */).EyeIcon)}
</View>
)
: value6
);
return (
<View2 style={items2}>
{value5}
{r5}
<View style={styles.decorationsContainer}>
{items3}
</View>
</View2>
);
}
}
env0_0.current = a0;
}
function _fun84927({nativeEvent}) { // fn#84927, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11277:5594, offset: 0x01f5d054, size: 37 bytes, params: 2, frame: 2
env0_1.current = nativeEvent.contentOffset.x;
}
function CustomScrollView(a0) { // fn#84925, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11277:5336, offset: 0x01f5cf0b, size: 207 bytes, params: 2, frame: 18
const styles = useStyles();
const env0_0 = env0_3.useRef(0);
const env0_1 = env0_3.useRef(0);
return (
<ScrollView
{...a0}
{...{['ref']: env0_3.useRef(null)}}
{...{['onContentSizeChange']: env0_3.useCallback(_fun84926, [])}}
{...{['onScroll']: env0_3.useCallback(_fun84927, [])}}
{...{['scrollEventThrottle']: 16}}
{...{['contentContainerStyle']: styles.scrollview}}
/>
);
function _fun84926(a0) { // fn#84926, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11277:5437, offset: 0x01f5cfda, size: 122 bytes, params: 2, frame: 15
let current = env0_0.current;
const current2 = env0_1.current;
const getWindowDimensions = UseWindowDimensionsNativeModule.getWindowDimensions;
if (a0 > current || current2 + Reflect.apply(getWindowDimensions, UseWindowDimensionsNativeModule, []).width > a0) {
current = env0_2.current;
if (current != null) {
current.scrollToEnd();
}
}
env0_0.current = a0;
}
function _fun84927({nativeEvent}) { // fn#84927, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11277:5594, offset: 0x01f5d054, size: 37 bytes, params: 2, frame: 2
env0_1.current = nativeEvent.contentOffset.x;
}
function _fun84930(a0, a1) { // fn#84930, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11277:5977, offset: 0x01f5d261, size: 106 bytes, params: 3, frame: 18
if (env0_2 != null) {
env0_2(a0);
}
const mediaKeyboardUtilsModule = require(11095) /* metro dependency 11095: MediaKeyboardUtils */;
const addImagesFromPicker = mediaKeyboardUtilsModule.addImagesFromPicker;
const channelIdBinding = channelId;
const UploadOrigin = (require(4650) /* metro dependency 4650: Upload */).UploadOrigin;
const IMAGE_EDITOR = UploadOrigin.IMAGE_EDITOR;
Reflect.apply(addImagesFromPicker, mediaKeyboardUtilsModule, [channelIdBinding, [a1], IMAGE_EDITOR]);
}
function _fun84931(a0) { // fn#84931, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11277:6410, offset: 0x01f5d2cb, size: 76 bytes, params: 2, frame: 16
return (
<Tile
channelId={channelId}
highlightThumbnails={highlightThumbnails}
onEdit={env0_3}
onRemove={env0_2}
upload={a0}
key={a0.uniqueId}
/>
);
}
function _fun84928({attachments, channelId, headerElement, highlightThumbnails}) { // fn#84928, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11277:5774, offset: 0x01f5d079, size: 428 bytes, params: 2, frame: 25
var r8;
if (highlightThumbnails !== undefined) {
}
let env0_3 = undefined;
var value;
const styles = useStyles();
let r11 = attachments != null && attachments.length > 0;
r11 = !r11 ? headerElement != null : r11;
env0_3 = env0_3.useCallback(_fun84930, [channelId, env0_3.useCallback(function(a0) {
importDefault(dependencyMap[26]).remove(channelId, a0, DraftType.ChannelMessage);
}, [channelId])]);
const items2 = [styles.container];
items2[1] = {height: r11 ? IMAGE_CAROUSEL_TILE_HEIGHT + IMAGE_CAROUSEL_TILE_CLOSE_BUTTON_PADDING : 0,
marginTop: r11 ? -1 * (IMAGE_CAROUSEL_TILE_CLOSE_BUTTON_PADDING - IMAGE_CAROUSEL_EXPERIMENT_TILE_MARGIN) : 0,
marginBottom: r11 ? 2 * IMAGE_CAROUSEL_EXPERIMENT_TILE_MARGIN : 0};
const intl = (IndexNativeModule).intl;
const string = intl.string;
const RhtzFe = (IndexNativeModule).t.RhtzFe;
if (attachments != null) {
value = global.Object.values(attachments);
value = value.map(_fun84931);
r8 = value;
} else {
r8 = null;
}
return (
<View style={items2}>
<CustomScrollView
horizontal
keyboardShouldPersistTaps="always"
showsHorizontalScrollIndicator={false}
accessibilityRole="list"
accessibilityLabel={Reflect.apply(string, intl, [RhtzFe])}
>
{headerElement}
{r8}
</CustomScrollView>
</View>
);
function _fun84930(a0, a1) { // fn#84930, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11277:5977, offset: 0x01f5d261, size: 106 bytes, params: 3, frame: 18
if (env0_2 != null) {
env0_2(a0);
}
const addImagesFromPicker = MediaKeyboardUtilsModule.addImagesFromPicker;
const channelIdBinding = channelId;
const UploadOrigin = (UploadModule).UploadOrigin;
const IMAGE_EDITOR = UploadOrigin.IMAGE_EDITOR;
Reflect.apply(addImagesFromPicker, MediaKeyboardUtilsModule, [channelIdBinding, [a1], IMAGE_EDITOR]);
}
function _fun84931(a0) { // fn#84931, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11277:6410, offset: 0x01f5d2cb, size: 76 bytes, params: 2, frame: 16
return (
<Tile
channelId={channelId}
highlightThumbnails={highlightThumbnails}
onEdit={env0_3}
onRemove={env0_2}
upload={a0}
key={a0.uniqueId}
/>
);
}
}
function onEdit_84922(a0) { // fn#84922, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11277:3358, offset: 0x01f5cb5b, size: 39 bytes, params: 2, frame: 14
const value = environment.__proto__;
return onEdit?.(id, a0);
}
global.__d(_fun84913, 11091, [31, 27, 4645, 4644, 11092, 33, 4501, 697, 4017, 4504, 1305, 4577, 44, 4650, 566,
11093, 11143, 11158, 8670, 4573, 1244, 9376, 8999, 5278, 8523, 1478, 7879, 11095,
2]) /* metro module 11091, dependencies: [31, 27, 4645, 4644, 11092, 33, 4501, 697, 4017, 4504, 1305, 4577, 44, 4650, 566, 11093, 11143, 11158, 8670, 4573, 1244, 9376, 8999, 5278, 8523, 1478, 7879, 11095, 2] */;
@@ -1,72 +1,103 @@
/* Metro module 11790; source: components_native/chat/JumpToPresentButton.tsx; dependencies: [31, 27, 7729, 4257, 4814, 33, 4501, 697, 477, 566, 7713, 8341, 1244, 11791, 11792, 2] */
import GatewayConnectionStore from '../../modules/gateway/GatewayConnectionStore.tsx'; /* Metro dependency 4257 */
import MessageStore from '../../stores/MessageStore.tsx'; /* Metro dependency 4814 */
import UseChatBottomManagerUIStore from '../../modules/chat_input/native/useChatBottomManagerUIStore.tsx'; /* Metro dependency 7729 */
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 CreateStylesModule from '../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as VoicePanelUtilsNativeModule from '../../modules/voice_panel/VoicePanelUtils.native.tsx'; /* Metro dependency 7713 */
import * as UseChatBottomManagerUIStoreModule from '../../modules/chat_input/native/useChatBottomManagerUIStore.tsx'; /* Metro dependency 7729 */
import * as IconButtonNativeModule from '../../design/components/Button/native/IconButton.native.tsx'; /* Metro dependency 8341 */
function _fun90300(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90300, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11976:6, offset: 0x02033c5c, size: 364 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 useChatBottomManagerUIStore = importDefault(7729) /* metro dependency 7729: useChatBottomManagerUIStore */;
const env0_5 = (require(7729) /* metro dependency 7729: useChatBottomManagerUIStore */).useChatInputContainerHeight;
const gatewayConnectionStore = importDefault(4257) /* metro dependency 4257: GatewayConnectionStore */;
const messageStore = importDefault(4814) /* metro dependency 4814: MessageStore */;
const env0_8 = (require(33) /* metro dependency 33 */).jsx;
let value = require(4501) /* metro dependency 4501: createStyles */;
ReactModule;
let value = CreateStylesModule;
const createStyles = value.createStyles;
const object = {'borderRadius': null, 'position': 'absolute', 'right': 12};
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
const env0_9 = Reflect.apply(createStyles, value, [{container: object, containerIOS: {'bottom': '100%',
const object2 = {'borderRadius': null, 'position': 'absolute', 'right': 12};
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
const env0_9 = Reflect.apply(createStyles, value, [{container: object2, containerIOS: {'bottom': '100%',
'marginBottom': 12, 'pointerEvents': 'box-none'}}]);
value = require(477) /* metro dependency 477: PlatformUtils */;
const env0_10 = value.isIOS() ? function() {
return null;
} : _fun90302;
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/chat/JumpToPresentButton.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/chat/JumpToPresentButton.tsx');
exports.default = JumpToPresentButton;
}
function _fun90302(a0) { // fn#90302, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11976:398, offset: 0x02033dc8, size: 32 bytes, params: 2, frame: 12
const object2 = {};
object2.bottom = useChatInputContainerHeight(a0) + 12;
return object2;
}
function JumpToPresentButton({channelId, screenIndex, onJumpToPresent}) { // fn#90303, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11976:511, offset: 0x02033de8, size: 469 bytes, params: 2, frame: 26
const IconButton = (require(8341) /* metro dependency 8341: IconButtonNative */).IconButton;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const styles = useStyles();
const value2 = env0_10(screenIndex);
const env0_2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GatewayConnectionStore],
function() {
return GatewayConnectionStore.isConnected();
}, []);
const value3 = useChatBottomManagerUIStore(_fun90305);
const value4 = (require(7713) /* metro dependency 7713: VoicePanelUtilsNative */).useIsVoicePanelMounted(channelId);
const value5 = (require(7713) /* metro dependency 7713: VoicePanelUtilsNative */).useIsVoicePanelOpen(channelId);
const value6 = (require(566) /* metro dependency 566: flux */).useStateFromStores([MessageStore], function() {
return MessageStore.getMessages(channelId).jumpReturnTargetId != null;
});
if (value3) {
return (
<View style={[styles.container, value2 ?? styles.containerIOS]}>
{value3 ? <IconButton accessibilityLabel={value6 ? intl.string(t.dpjpOp) : intl.string(t.gpoQsB)} onPress={onJumpToPresent} icon={importDefault(11791) /* metro dependency 11791 */} variant="primary-overlay" /> : ((MemoedVoicePanelDismissChatButton) => <MemoedVoicePanelDismissChatButton />)((require(11792) /* metro dependency 11792: VoicePanelChatView */).MemoedVoicePanelDismissChatButton)}
</View>
);
function _fun90302(a0) { // fn#90302, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11976:398, offset: 0x02033dc8, size: 32 bytes, params: 2, frame: 12
const object = {};
object.bottom = useChatInputContainerHeight(a0) + 12;
return object;
}
if (value4) {
if (value5) {
function JumpToPresentButton({channelId, screenIndex, onJumpToPresent}) { // fn#90303, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11976:511, offset: 0x02033de8, size: 469 bytes, params: 2, frame: 26
const IconButton = (IconButtonNativeModule).IconButton;
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
const styles = useStyles();
const value2 = env0_10(screenIndex);
const env0_2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GatewayConnectionStore],
function() {
return GatewayConnectionStore.isConnected();
}, []);
const value3 = UseChatBottomManagerUIStore(_fun90305);
const value4 = (VoicePanelUtilsNativeModule).useIsVoicePanelMounted(channelId);
const value5 = (VoicePanelUtilsNativeModule).useIsVoicePanelOpen(channelId);
const value6 = (require(566) /* metro dependency 566: flux */).useStateFromStores([MessageStore], function() {
return MessageStore.getMessages(channelId).jumpReturnTargetId != null;
});
if (value3) {
return (
<View style={[styles.container, value2 ?? styles.containerIOS]}>
{value3 ? <IconButton accessibilityLabel={value6 ? intl.string(t.dpjpOp) : intl.string(t.gpoQsB)} onPress={onJumpToPresent} icon={importDefault(11791) /* metro dependency 11791 */} variant="primary-overlay" /> : ((MemoedVoicePanelDismissChatButton) => <MemoedVoicePanelDismissChatButton />)((require(11792) /* metro dependency 11792: VoicePanelChatView */).MemoedVoicePanelDismissChatButton)}
{
value3
? (
<IconButton
accessibilityLabel={value6 ? intl.string(t.dpjpOp) : intl.string(t.gpoQsB)}
onPress={onJumpToPresent}
icon={importDefault(11791) /* metro dependency 11791 */}
variant="primary-overlay"
/>
)
: ((MemoedVoicePanelDismissChatButton) => <MemoedVoicePanelDismissChatButton />)((require(11792) /* metro dependency 11792: VoicePanelChatView */).MemoedVoicePanelDismissChatButton)
}
</View>
);
}
if (value4) {
if (value5) {
return (
<View style={[styles.container, value2 ?? styles.containerIOS]}>
{
value3
? (
<IconButton
accessibilityLabel={value6 ? intl.string(t.dpjpOp) : intl.string(t.gpoQsB)}
onPress={onJumpToPresent}
icon={importDefault(11791) /* metro dependency 11791 */}
variant="primary-overlay"
/>
)
: ((MemoedVoicePanelDismissChatButton) => <MemoedVoicePanelDismissChatButton />)((require(11792) /* metro dependency 11792: VoicePanelChatView */).MemoedVoicePanelDismissChatButton)
}
</View>
);
}
}
return null;
function _fun90305(a0) { // fn#90305, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11976:668, offset: 0x02033fd0, size: 78 bytes, params: 2, frame: 14
const binding = env0_2;
return binding ? !a0.showingAutoComplete.get(screenIndex) && a0.showJumpToPresentButtonChannelId.get(screenIndex) === channelId : !!binding;
}
}
return null;
}
function _fun90305(a0) { // fn#90305, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11976:668, offset: 0x02033fd0, size: 78 bytes, params: 2, frame: 14
const binding = env0_2;
return binding ? !a0.showingAutoComplete.get(screenIndex) && a0.showJumpToPresentButtonChannelId.get(screenIndex) === channelId : !!binding;
}
global.__d(_fun90300, 11790, [31, 27, 7729, 4257, 4814, 33, 4501, 697, 477, 566, 7713, 8341, 1244, 11791, 11792,
2]) /* metro module 11790, dependencies: [31, 27, 7729, 4257, 4814, 33, 4501, 697, 477, 566, 7713, 8341, 1244, 11791, 11792, 2] */;
+211 -198
View File
@@ -1,113 +1,153 @@
/* Metro module 11380; source: components_native/chat/contentHandlers.tsx; dependencies: [5, 9862, 9598, 8877, 3853, 9834, 8743, 6789, 4080, 11381, 1962, 21, 3829, 1244, 6797, 3856, 4647, 8623, 2] */
import Module00005 from '../../by-id/module-00005.js'; /* Metro dependency 5 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ToastUtilsModule from '../../modules/toast/native/ToastUtils.tsx'; /* Metro dependency 3856 */
function _fun87229(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87229, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11566:6, offset: 0x01fb48bd, size: 225 bytes, params: 8, frame: 19
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const value = importDefault(5) /* metro dependency 5 */;
object2 = {onLongPressLink: onLongPressLink};
const value = Module00005;
object = {onLongPressLink: onLongPressLink};
const env0_4 = value(_fun87232);
object2.onTapAttachmentLink = onTapAttachmentLink;
object.onTapAttachmentLink = onTapAttachmentLink;
const env0_3 = value(_fun87235);
object2.onLongPressAttachmentLink = onLongPressAttachmentLink;
object2.onTapMention = onTapMention;
object2.onTapTimestamp = onTapTimestamp;
object2.onTapInlineCode = onTapInlineCode;
object2.onTapEmoji = onTapEmoji;
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/chat/contentHandlers.tsx');
exports.contentHandlers = object2;
}
function onLongPressLink({nativeEvent}) { // fn#87230, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11566:129, offset: 0x01fb499e, size: 75 bytes, params: 2, frame: 12
const url = nativeEvent.url;
if (url != null && url !== '') {
(importDefault(9862) /* metro dependency 9862: showLongPressURLActionSheet */)({urlString: url});
}
}
async function _fun87232({nativeEvent}) { // fn#87232, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11566:222, offset: 0x01fb49fd, size: 166 bytes, params: 2, frame: 16
if (true) {
var attachmentUrl = nativeEvent.data.attachmentUrl;
await undefined;
if (false) {
return undefined;
object.onLongPressAttachmentLink = onLongPressAttachmentLink;
object.onTapMention = onTapMention;
object.onTapTimestamp = onTapTimestamp;
object.onTapInlineCode = onTapInlineCode;
object.onTapEmoji = onTapEmoji;
(FileImportTrackerModule).fileFinishedImporting('components_native/chat/contentHandlers.tsx');
exports.contentHandlers = object;
function onLongPressLink({nativeEvent}) { // fn#87230, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11566:129, offset: 0x01fb499e, size: 75 bytes, params: 2, frame: 12
const url = nativeEvent.url;
if (url != null && url !== '') {
(importDefault(9862) /* metro dependency 9862: showLongPressURLActionSheet */)({urlString: url});
}
if (attachmentUrl != null) {
if (attachmentUrl === '') {
}
async function _fun87232({nativeEvent}) { // fn#87232, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11566:222, offset: 0x01fb49fd, size: 166 bytes, params: 2, frame: 16
if (true) {
var attachmentUrl = nativeEvent.data.attachmentUrl;
await undefined;
if (false) {
return undefined;
}
value = environment.__proto__;
var binding = env1_0;
var value4 = binding(env1_2[2]);
await value4.maybeRefreshAttachmentUrl(attachmentUrl);
var value5 = undefined;
if (false) {
return value5;
if (attachmentUrl != null) {
if (attachmentUrl === '') {
return undefined;
}
value = environment.__proto__;
var binding = env1_0;
var value4 = binding(env1_2[2]);
await value4.maybeRefreshAttachmentUrl(attachmentUrl);
var value5 = undefined;
if (false) {
return value5;
}
binding = env1_1;
var binding2 = env1_2;
value = binding(binding2[3]);
value.trackLinkClicked(value5);
value = binding(binding2[4]);
value.openURL(value5);
}
binding = env1_1;
var binding2 = env1_2;
value = binding(binding2[3]);
value.trackLinkClicked(value5);
value = binding(binding2[4]);
value.openURL(value5);
}
}
}
async function _fun87235({nativeEvent}) { // fn#87235, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11566:468, offset: 0x01fb4ab7, size: 144 bytes, params: 2, frame: 16
if (true) {
var attachmentUrl = nativeEvent.data.attachmentUrl;
await undefined;
if (false) {
return undefined;
}
if (attachmentUrl != null) {
if (attachmentUrl === '') {
function onTapAttachmentLink() { // fn#87233, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11566:392, offset: 0x00d8febd, size: 30 bytes, params: 1, frame: 13
return env0_4.apply(this, arguments);
}
async function _fun87235({nativeEvent}) { // fn#87235, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11566:468, offset: 0x01fb4ab7, size: 144 bytes, params: 2, frame: 16
if (true) {
var attachmentUrl = nativeEvent.data.attachmentUrl;
await undefined;
if (false) {
return undefined;
}
value = environment.__proto__;
var binding = env1_0;
var value4 = binding(env1_2[2]);
await value4.maybeRefreshAttachmentUrl(attachmentUrl);
var value5 = undefined;
if (false) {
return value5;
if (attachmentUrl != null) {
if (attachmentUrl === '') {
return undefined;
}
value = environment.__proto__;
var binding = env1_0;
var value4 = binding(env1_2[2]);
await value4.maybeRefreshAttachmentUrl(attachmentUrl);
var value5 = undefined;
if (false) {
return value5;
}
binding = env1_1;
value = binding(env1_2[1]);
value({urlString: value5});
}
binding = env1_1;
value = binding(env1_2[1]);
value({urlString: value5});
}
}
}
function onTapMention(a0) { // fn#87237, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11566:671, offset: 0x01fb4b47, size: 720 bytes, params: 2, frame: 26
var r8;
const DeveloperMode = require(dependencyMap[12]).DeveloperMode;
var object2;
const intl = require(dependencyMap[13]).intl;
const t = require(dependencyMap[13]).t;
var defaultImport;
var show;
var defaultImport2;
var openLazy;
var defaultImport4;
var value;
const {userId, channelId, roleName, parsedUserId, roleId,
guildId} = require(dependencyMap[5]).getNativeSyntheticEventData(a0);
if (userId != null) {
value = importDefault(dependencyMap[6]);
object2 = {userId: userId, channelId: channelId};
object2.sourceAnalyticsLocations = [importDefault(dependencyMap[7]).USER_MENTION];
value(object2);
} else if (roleId == null) {
if (roleName !== '@everyone') {
if (roleName === null) {
function onLongPressAttachmentLink() { // fn#87236, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11566:614, offset: 0x00d6afe6, size: 30 bytes, params: 1, frame: 13
return env0_3.apply(this, arguments);
}
function onTapMention(a0) { // fn#87237, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11566:671, offset: 0x01fb4b47, size: 720 bytes, params: 2, frame: 26
var r8;
const DeveloperMode = require(dependencyMap[12]).DeveloperMode;
var object;
const intl = require(dependencyMap[13]).intl;
const t = require(dependencyMap[13]).t;
var defaultImport;
var show;
var defaultImport2;
var openLazy;
var defaultImport4;
var value;
const {userId, channelId, roleName, parsedUserId, roleId,
guildId} = require(dependencyMap[5]).getNativeSyntheticEventData(a0);
if (userId != null) {
value = importDefault(dependencyMap[6]);
object = {userId: userId, channelId: channelId};
object.sourceAnalyticsLocations = [importDefault(dependencyMap[7]).USER_MENTION];
value(object);
} else if (roleId == null) {
if (roleName !== '@everyone') {
if (roleName === null) {
if (DeveloperMode.getSetting()) {
if (parsedUserId != null) {
object = {};
object.secondaryConfirmText = intl.string(t['/AXYnE']);
object.onConfirmSecondary = onConfirmSecondary;
r8 = object;
} else {
r8 = {};
}
} else {
r8 = {};
}
defaultImport = importDefault(dependencyMap[16]);
show = defaultImport.show;
object = {};
object.title = intl.string(t.r0DLNm);
object.body = intl.string(t.Fqqbhg);
object.confirmText = intl.string(t.BddRzS);
copyDataProperties(object, r8, undefined);
Reflect.apply(show, defaultImport, [object]);
}
} else if (guildId != null) {
defaultImport2 = importDefault(dependencyMap[8]);
openLazy = defaultImport2.openLazy;
value = require(dependencyMap[10]);
value = value(dependencyMap[9], dependencyMap.paths);
object = {guildId: guildId};
object.roleId = importDefault(dependencyMap[11]).castGuildIdAsEveryoneGuildRoleId(guildId);
object.channelId = channelId;
Reflect.apply(openLazy, defaultImport2, [value, 'RoleMembersActionSheet', object]);
} else if (roleName === null) {
if (DeveloperMode.getSetting()) {
if (parsedUserId != null) {
object2 = {};
object2.secondaryConfirmText = intl.string(t['/AXYnE']);
object2.onConfirmSecondary = onConfirmSecondary;
r8 = object2;
object = {};
object.secondaryConfirmText = intl.string(t['/AXYnE']);
object.onConfirmSecondary = onConfirmSecondary;
r8 = object;
} else {
r8 = {};
}
@@ -116,29 +156,59 @@ function onTapMention(a0) { // fn#87237, source: /ci/build/discord/discord/disco
}
defaultImport = importDefault(dependencyMap[16]);
show = defaultImport.show;
object2 = {};
object2.title = intl.string(t.r0DLNm);
object2.body = intl.string(t.Fqqbhg);
object2.confirmText = intl.string(t.BddRzS);
copyDataProperties(object2, r8, undefined);
Reflect.apply(show, defaultImport, [object2]);
object = {};
object.title = intl.string(t.r0DLNm);
object.body = intl.string(t.Fqqbhg);
object.confirmText = intl.string(t.BddRzS);
copyDataProperties(object, r8, undefined);
Reflect.apply(show, defaultImport, [object]);
}
} else if (guildId != null) {
defaultImport4 = importDefault(dependencyMap[8]);
openLazy = defaultImport4.openLazy;
value = require(dependencyMap[10]);
value = value(dependencyMap[9], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport4, [value, 'RoleMembersActionSheet', {guildId: guildId, roleId: roleId,
channelId: channelId}]);
} else if (roleName !== '@everyone') {
if (roleName === null) {
if (DeveloperMode.getSetting()) {
if (parsedUserId != null) {
object = {};
object.secondaryConfirmText = intl.string(t['/AXYnE']);
object.onConfirmSecondary = onConfirmSecondary;
r8 = object;
} else {
r8 = {};
}
} else {
r8 = {};
}
defaultImport = importDefault(dependencyMap[16]);
show = defaultImport.show;
object = {};
object.title = intl.string(t.r0DLNm);
object.body = intl.string(t.Fqqbhg);
object.confirmText = intl.string(t.BddRzS);
copyDataProperties(object, r8, undefined);
Reflect.apply(show, defaultImport, [object]);
}
} else if (guildId != null) {
defaultImport2 = importDefault(dependencyMap[8]);
openLazy = defaultImport2.openLazy;
value = require(dependencyMap[10]);
value = value(dependencyMap[9], dependencyMap.paths);
object2 = {guildId: guildId};
object2.roleId = importDefault(dependencyMap[11]).castGuildIdAsEveryoneGuildRoleId(guildId);
object2.channelId = channelId;
Reflect.apply(openLazy, defaultImport2, [value, 'RoleMembersActionSheet', object2]);
object = {guildId: guildId};
object.roleId = importDefault(dependencyMap[11]).castGuildIdAsEveryoneGuildRoleId(guildId);
object.channelId = channelId;
Reflect.apply(openLazy, defaultImport2, [value, 'RoleMembersActionSheet', object]);
} else if (roleName === null) {
if (DeveloperMode.getSetting()) {
if (parsedUserId != null) {
object2 = {};
object2.secondaryConfirmText = intl.string(t['/AXYnE']);
object2.onConfirmSecondary = onConfirmSecondary;
r8 = object2;
object = {};
object.secondaryConfirmText = intl.string(t['/AXYnE']);
object.onConfirmSecondary = onConfirmSecondary;
r8 = object;
} else {
r8 = {};
}
@@ -147,106 +217,49 @@ function onTapMention(a0) { // fn#87237, source: /ci/build/discord/discord/disco
}
defaultImport = importDefault(dependencyMap[16]);
show = defaultImport.show;
object2 = {};
object2.title = intl.string(t.r0DLNm);
object2.body = intl.string(t.Fqqbhg);
object2.confirmText = intl.string(t.BddRzS);
copyDataProperties(object2, r8, undefined);
Reflect.apply(show, defaultImport, [object2]);
object = {};
object.title = intl.string(t.r0DLNm);
object.body = intl.string(t.Fqqbhg);
object.confirmText = intl.string(t.BddRzS);
copyDataProperties(object, r8, undefined);
Reflect.apply(show, defaultImport, [object]);
}
} else if (guildId != null) {
defaultImport4 = importDefault(dependencyMap[8]);
openLazy = defaultImport4.openLazy;
value = require(dependencyMap[10]);
value = value(dependencyMap[9], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport4, [value, 'RoleMembersActionSheet', {guildId: guildId, roleId: roleId,
channelId: channelId}]);
} else if (roleName !== '@everyone') {
if (roleName === null) {
if (DeveloperMode.getSetting()) {
if (parsedUserId != null) {
object2 = {};
object2.secondaryConfirmText = intl.string(t['/AXYnE']);
object2.onConfirmSecondary = onConfirmSecondary;
r8 = object2;
} else {
r8 = {};
}
} else {
r8 = {};
}
defaultImport = importDefault(dependencyMap[16]);
show = defaultImport.show;
object2 = {};
object2.title = intl.string(t.r0DLNm);
object2.body = intl.string(t.Fqqbhg);
object2.confirmText = intl.string(t.BddRzS);
copyDataProperties(object2, r8, undefined);
Reflect.apply(show, defaultImport, [object2]);
function onConfirmSecondary() { // fn#87238, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11566:1341, owner: onTapMention.onConfirmSecondary, offset: 0x01fb4e17, size: 67 bytes, params: 1, frame: 14
let value = environment.__proto__;
value = require(6797) /* metro dependency 6797: ClipboardUtilsNative */;
value.copy(parsedUserId);
(ToastUtilsModule).presentCopiedToClipboard();
}
} else if (guildId != null) {
defaultImport2 = importDefault(dependencyMap[8]);
openLazy = defaultImport2.openLazy;
value = require(dependencyMap[10]);
value = value(dependencyMap[9], dependencyMap.paths);
object2 = {guildId: guildId};
object2.roleId = importDefault(dependencyMap[11]).castGuildIdAsEveryoneGuildRoleId(guildId);
object2.channelId = channelId;
Reflect.apply(openLazy, defaultImport2, [value, 'RoleMembersActionSheet', object2]);
} else if (roleName === null) {
if (DeveloperMode.getSetting()) {
if (parsedUserId != null) {
object2 = {};
object2.secondaryConfirmText = intl.string(t['/AXYnE']);
object2.onConfirmSecondary = onConfirmSecondary;
r8 = object2;
} else {
r8 = {};
}
} else {
r8 = {};
}
defaultImport = importDefault(dependencyMap[16]);
show = defaultImport.show;
object2 = {};
object2.title = intl.string(t.r0DLNm);
object2.body = intl.string(t.Fqqbhg);
object2.confirmText = intl.string(t.BddRzS);
copyDataProperties(object2, r8, undefined);
Reflect.apply(show, defaultImport, [object2]);
}
}
function onTapTimestamp({nativeEvent}) { // fn#87239, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11566:1586, offset: 0x01fb4e5a, size: 59 bytes, params: 2, frame: 12
const node = nativeEvent.node;
const toastUtilsModule = require(3856) /* metro dependency 3856: ToastUtils */;
toastUtilsModule.presentTimestamp(node.full);
}
function onTapInlineCode({nativeEvent}) { // fn#87240, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11566:1664, offset: 0x01fb4e95, size: 115 bytes, params: 2, frame: 14
const node = nativeEvent.node;
let value = node.content != null;
if (value && typeof node.content === 'string') {
value = require(6797) /* metro dependency 6797: ClipboardUtilsNative */;
value.copy(node.content);
value = require(3856) /* metro dependency 3856: ToastUtils */;
value.presentCopiedToClipboard();
function onTapTimestamp({nativeEvent}) { // fn#87239, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11566:1586, offset: 0x01fb4e5a, size: 59 bytes, params: 2, frame: 12
const node = nativeEvent.node;
ToastUtilsModule.presentTimestamp(node.full);
}
function onTapInlineCode({nativeEvent}) { // fn#87240, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11566:1664, offset: 0x01fb4e95, size: 115 bytes, params: 2, frame: 14
const node = nativeEvent.node;
let value = node.content != null;
if (value && typeof node.content === 'string') {
value = require(6797) /* metro dependency 6797: ClipboardUtilsNative */;
value.copy(node.content);
value = require(3856) /* metro dependency 3856: ToastUtils */;
value.presentCopiedToClipboard();
}
}
function onTapEmoji({nativeEvent}) { // fn#87241, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11566:1811, offset: 0x01fb4f08, size: 102 bytes, params: 2, frame: 17
const node = nativeEvent.node;
const defaultImport = importDefault(dependencyMap[8]);
const openLazy = defaultImport.openLazy;
let value = require(dependencyMap[10]);
value = value(dependencyMap[17], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport, [value, 'MessageEmojiActionSheet', {emojiNode: node}]);
}
}
function onTapEmoji({nativeEvent}) { // fn#87241, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11566:1811, offset: 0x01fb4f08, size: 102 bytes, params: 2, frame: 17
const node = nativeEvent.node;
const defaultImport = importDefault(dependencyMap[8]);
const openLazy = defaultImport.openLazy;
let value = require(dependencyMap[10]);
value = value(dependencyMap[17], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport, [value, 'MessageEmojiActionSheet', {emojiNode: node}]);
}
function onConfirmSecondary() { // fn#87238, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11566:1341, owner: onTapMention.onConfirmSecondary, offset: 0x01fb4e17, size: 67 bytes, params: 1, frame: 14
let value = environment.__proto__;
value = require(6797) /* metro dependency 6797: ClipboardUtilsNative */;
value.copy(parsedUserId);
(require(3856) /* metro dependency 3856: ToastUtils */).presentCopiedToClipboard();
}
global.__d(_fun87229, 11380, [5, 9862, 9598, 8877, 3853, 9834, 8743, 6789, 4080, 11381, 1962, 21, 3829, 1244, 6797,
3856, 4647, 8623,
2]) /* metro module 11380, dependencies: [5, 9862, 9598, 8877, 3853, 9834, 8743, 6789, 4080, 11381, 1962, 21, 3829, 1244, 6797, 3856, 4647, 8623, 2] */;
@@ -1,92 +1,278 @@
/* Metro module 11333; source: components_native/chat/getMessageJumpData.tsx; dependencies: [57, 31, 1480, 1878, 477, 1851, 4044, 21, 2] */
import Module00057 from '../../by-id/module-00057.js'; /* Metro dependency 57 */
import SubscribeToKeyboardUIStore from '../../modules/keyboard/native/subscribeToKeyboardUIStore.tsx'; /* Metro dependency 1480 */
import UserStore from '../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as PlatformUtilsModule from '../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
import * as ClientModule from '../../flow/Client.tsx'; /* Metro dependency 4044 */
function _fun86553(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86553, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11519:6, offset: 0x01f97718, size: 182 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const subscribeToKeyboardUIStore = importDefault(1480) /* metro dependency 1480: subscribeToKeyboardUIStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/chat/getMessageJumpData.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/chat/getMessageJumpData.tsx');
exports.default = getMessageJumpData;
exports.useMessageJumpAndroidKeyboardHeight = useMessageJumpAndroidKeyboardHeight;
}
function getMessageJumpData(a0, a1, a2) { // fn#86554, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11519:225, offset: 0x01f977ce, size: 588 bytes, params: 4, frame: 27
var r16;
var r4;
var id;
var r12;
var r11;
var r5;
var r7;
var r8;
var r9;
var jumpSequenceId2;
var jumpSequenceId3;
var value7;
var focusSequenceId;
var focusSequenceId2;
var value8;
var isAtBottom;
var hasPreviousMessages;
var loadingMore;
var author;
var id2;
var interaction;
var user;
var id3;
var defaultImport;
var compare;
var id4;
var value10;
var jumpedToPresent;
var isAndroid;
var androidKeyboardHeight;
var androidKeyboardHeight2;
var replyingMessageId;
var channelId;
var first;
var jumpType;
const messages = a0.messages;
let value = messages.last();
const messages2 = a2.messages;
const value2 = messages2.last();
const currentUser = UserStore.getCurrentUser();
const value5 = undefined;
const JumpTypes = (require(4044) /* metro dependency 4044: Client */).JumpTypes;
const ANIMATED = JumpTypes.ANIMATED;
const jumpSequenceId = messages.jumpSequenceId;
const focusTargetId = messages.focusTargetId;
const value6 = messages.initialScrollSequenceId !== messages2.initialScrollSequenceId;
reducibleJoin2: while (true) {
if (value6) {
r16 = value6;
function getMessageJumpData(a0, a1, a2) { // fn#86554, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11519:225, offset: 0x01f977ce, size: 588 bytes, params: 4, frame: 27
var r16;
var r4;
var id;
var r12;
var r11;
var r5;
var r7;
var r8;
var r9;
var jumpSequenceId2;
var jumpSequenceId3;
var value7;
var focusSequenceId;
var focusSequenceId2;
var value8;
var isAtBottom;
var hasPreviousMessages;
var loadingMore;
var author;
var id2;
var interaction;
var user;
var id3;
var defaultImport;
var compare;
var id4;
var value10;
var jumpedToPresent;
var isAndroid;
var androidKeyboardHeight;
var androidKeyboardHeight2;
var replyingMessageId;
var channelId;
var first;
var jumpType;
const messages = a0.messages;
let value = messages.last();
const messages2 = a2.messages;
const value2 = messages2.last();
const currentUser = UserStore.getCurrentUser();
const value5 = undefined;
const JumpTypes = (ClientModule).JumpTypes;
const ANIMATED = JumpTypes.ANIMATED;
const jumpSequenceId = messages.jumpSequenceId;
const focusTargetId = messages.focusTargetId;
const value6 = messages.initialScrollSequenceId !== messages2.initialScrollSequenceId;
reducibleJoin2: while (true) {
if (value6) {
r16 = value6;
break reducibleJoin2;
}
jumpSequenceId2 = messages2.jumpSequenceId;
jumpSequenceId3 = messages.jumpSequenceId;
value7 = jumpSequenceId2 !== jumpSequenceId3;
r16 = value7;
break reducibleJoin2;
}
jumpSequenceId2 = messages2.jumpSequenceId;
jumpSequenceId3 = messages.jumpSequenceId;
value7 = jumpSequenceId2 !== jumpSequenceId3;
r16 = value7;
break reducibleJoin2;
}
reducibleJoin4: while (true) {
if (value6) {
r4 = value6;
reducibleJoin4: while (true) {
if (value6) {
r4 = value6;
break reducibleJoin4;
}
focusSequenceId = messages2.focusSequenceId;
focusSequenceId2 = messages.focusSequenceId;
value8 = focusSequenceId !== focusSequenceId2;
r4 = value8;
break reducibleJoin4;
}
focusSequenceId = messages2.focusSequenceId;
focusSequenceId2 = messages.focusSequenceId;
value8 = focusSequenceId !== focusSequenceId2;
r4 = value8;
break reducibleJoin4;
}
let jumpTargetId = messages.jumpTargetId;
const value9 = null;
reducibleJoin34: while (true) {
reducibleJoin27: while (true) {
if (value9 == jumpTargetId) {
if (!a1.isAtBottom) {
let jumpTargetId = messages.jumpTargetId;
const value9 = null;
reducibleJoin34: while (true) {
reducibleJoin27: while (true) {
if (value9 == jumpTargetId) {
if (!a1.isAtBottom) {
hasPreviousMessages = a1.hasPreviousMessages;
if (hasPreviousMessages) {
if (!messages2.loadingMore) {
if (value9 != value) {
if (value9 != currentUser) {
author = value.author;
id = author.id;
id2 = currentUser.id;
if (id !== id2) {
interaction = value.interaction;
reducibleJoin14: while (true) {
if (value9 == interaction) {
id = value5;
break reducibleJoin14;
}
user = interaction.user;
id = user.id;
break reducibleJoin14;
}
id3 = currentUser.id;
if (id !== id3) {
if (!messages.loadingMore) {
jumpedToPresent = messages.jumpedToPresent;
if (jumpedToPresent) {
if (r16) {
if (value9 != value) {
id = value.id;
value = false;
r5 = value;
r7 = ANIMATED;
r8 = value9;
r9 = id;
break reducibleJoin34;
}
}
}
}
value = require(477) /* metro dependency 477: PlatformUtils */;
value = value.isAndroid();
reducibleJoin25: while (true) {
if (value) {
androidKeyboardHeight = a2.androidKeyboardHeight;
androidKeyboardHeight2 = a0.androidKeyboardHeight;
value = androidKeyboardHeight < androidKeyboardHeight2;
r12 = value;
break reducibleJoin25;
}
r12 = value;
break reducibleJoin25;
}
if (r12) {
replyingMessageId = a0.replyingMessageId;
value = value9 != replyingMessageId;
r12 = value;
break reducibleJoin27;
}
break reducibleJoin27;
}
}
if (value9 != value2) {
defaultImport = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
compare = defaultImport.compare;
id = value2.id;
id4 = value.id;
value10 = Reflect.apply(compare, defaultImport, [id, id4]);
if (!(value10 < 0)) {
if (!messages.loadingMore) {
jumpedToPresent = messages.jumpedToPresent;
if (jumpedToPresent) {
if (r16) {
if (value9 != value) {
id = value.id;
value = false;
r5 = value;
r7 = ANIMATED;
r8 = value9;
r9 = id;
break reducibleJoin34;
}
}
}
}
value = require(477) /* metro dependency 477: PlatformUtils */;
value = value.isAndroid();
reducibleJoin25: while (true) {
if (value) {
androidKeyboardHeight = a2.androidKeyboardHeight;
androidKeyboardHeight2 = a0.androidKeyboardHeight;
value = androidKeyboardHeight < androidKeyboardHeight2;
r12 = value;
break reducibleJoin25;
}
r12 = value;
break reducibleJoin25;
}
if (r12) {
replyingMessageId = a0.replyingMessageId;
value = value9 != replyingMessageId;
r12 = value;
break reducibleJoin27;
}
break reducibleJoin27;
}
}
id = value.id;
value = false;
r5 = value;
r7 = ANIMATED;
r8 = value9;
r9 = id;
break reducibleJoin34;
}
}
}
}
}
if (!messages.loadingMore) {
jumpedToPresent = messages.jumpedToPresent;
if (jumpedToPresent) {
if (r16) {
if (value9 != value) {
id = value.id;
value = false;
r5 = value;
r7 = ANIMATED;
r8 = value9;
r9 = id;
break reducibleJoin34;
}
}
}
}
value = require(477) /* metro dependency 477: PlatformUtils */;
value = value.isAndroid();
reducibleJoin25: while (true) {
if (value) {
androidKeyboardHeight = a2.androidKeyboardHeight;
androidKeyboardHeight2 = a0.androidKeyboardHeight;
value = androidKeyboardHeight < androidKeyboardHeight2;
r12 = value;
break reducibleJoin25;
}
r12 = value;
break reducibleJoin25;
}
if (r12) {
replyingMessageId = a0.replyingMessageId;
value = value9 != replyingMessageId;
r12 = value;
break reducibleJoin27;
}
break reducibleJoin27;
}
if (r16) {
channelId = messages.channelId;
jumpTargetId = messages.jumpTargetId;
first = messages.first;
value = Reflect.apply(first, messages, []);
reducibleJoin33: while (true) {
reducibleJoin31: while (true) {
if (channelId !== jumpTargetId) {
break reducibleJoin31;
}
if (value9 != value) {
id = value.id;
r11 = id;
break reducibleJoin33;
}
break reducibleJoin31;
}
jumpTargetId = messages.jumpTargetId;
r11 = jumpTargetId;
break reducibleJoin33;
}
jumpType = messages.jumpType;
value = false;
r5 = value;
r7 = jumpType;
r8 = r11;
r9 = r11;
break reducibleJoin34;
}
isAtBottom = a1.isAtBottom;
if (!isAtBottom) {
hasPreviousMessages = a1.hasPreviousMessages;
if (hasPreviousMessages) {
if (!messages2.loadingMore) {
@@ -203,7 +389,8 @@ function getMessageJumpData(a0, a1, a2) { // fn#86554, source: /ci/build/discord
}
}
}
if (!messages.loadingMore) {
loadingMore = messages.loadingMore;
if (!loadingMore) {
jumpedToPresent = messages.jumpedToPresent;
if (jumpedToPresent) {
if (r16) {
@@ -220,7 +407,8 @@ function getMessageJumpData(a0, a1, a2) { // fn#86554, source: /ci/build/discord
}
}
value = require(477) /* metro dependency 477: PlatformUtils */;
value = value.isAndroid();
isAndroid = value.isAndroid;
value = Reflect.apply(isAndroid, value, []);
reducibleJoin25: while (true) {
if (value) {
androidKeyboardHeight = a2.androidKeyboardHeight;
@@ -240,237 +428,54 @@ function getMessageJumpData(a0, a1, a2) { // fn#86554, source: /ci/build/discord
}
break reducibleJoin27;
}
if (r16) {
channelId = messages.channelId;
jumpTargetId = messages.jumpTargetId;
first = messages.first;
value = Reflect.apply(first, messages, []);
reducibleJoin33: while (true) {
reducibleJoin31: while (true) {
if (channelId !== jumpTargetId) {
break reducibleJoin31;
}
if (value9 != value) {
id = value.id;
r11 = id;
break reducibleJoin33;
}
break reducibleJoin31;
}
jumpTargetId = messages.jumpTargetId;
r11 = jumpTargetId;
break reducibleJoin33;
}
jumpType = messages.jumpType;
value = false;
r5 = value;
r7 = jumpType;
r8 = r11;
r9 = r11;
break reducibleJoin34;
}
isAtBottom = a1.isAtBottom;
if (!isAtBottom) {
hasPreviousMessages = a1.hasPreviousMessages;
if (hasPreviousMessages) {
if (!messages2.loadingMore) {
if (value9 != value) {
if (value9 != currentUser) {
author = value.author;
id = author.id;
id2 = currentUser.id;
if (id !== id2) {
interaction = value.interaction;
reducibleJoin14: while (true) {
if (value9 == interaction) {
id = value5;
break reducibleJoin14;
}
user = interaction.user;
id = user.id;
break reducibleJoin14;
}
id3 = currentUser.id;
if (id !== id3) {
if (!messages.loadingMore) {
jumpedToPresent = messages.jumpedToPresent;
if (jumpedToPresent) {
if (r16) {
if (value9 != value) {
id = value.id;
value = false;
r5 = value;
r7 = ANIMATED;
r8 = value9;
r9 = id;
break reducibleJoin34;
}
}
}
}
value = require(477) /* metro dependency 477: PlatformUtils */;
value = value.isAndroid();
reducibleJoin25: while (true) {
if (value) {
androidKeyboardHeight = a2.androidKeyboardHeight;
androidKeyboardHeight2 = a0.androidKeyboardHeight;
value = androidKeyboardHeight < androidKeyboardHeight2;
r12 = value;
break reducibleJoin25;
}
r12 = value;
break reducibleJoin25;
}
if (r12) {
replyingMessageId = a0.replyingMessageId;
value = value9 != replyingMessageId;
r12 = value;
break reducibleJoin27;
}
break reducibleJoin27;
}
}
if (value9 != value2) {
defaultImport = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
compare = defaultImport.compare;
id = value2.id;
id4 = value.id;
value10 = Reflect.apply(compare, defaultImport, [id, id4]);
if (!(value10 < 0)) {
if (!messages.loadingMore) {
jumpedToPresent = messages.jumpedToPresent;
if (jumpedToPresent) {
if (r16) {
if (value9 != value) {
id = value.id;
value = false;
r5 = value;
r7 = ANIMATED;
r8 = value9;
r9 = id;
break reducibleJoin34;
}
}
}
}
value = require(477) /* metro dependency 477: PlatformUtils */;
value = value.isAndroid();
reducibleJoin25: while (true) {
if (value) {
androidKeyboardHeight = a2.androidKeyboardHeight;
androidKeyboardHeight2 = a0.androidKeyboardHeight;
value = androidKeyboardHeight < androidKeyboardHeight2;
r12 = value;
break reducibleJoin25;
}
r12 = value;
break reducibleJoin25;
}
if (r12) {
replyingMessageId = a0.replyingMessageId;
value = value9 != replyingMessageId;
r12 = value;
break reducibleJoin27;
}
break reducibleJoin27;
}
}
id = value.id;
value = false;
r5 = value;
r7 = ANIMATED;
r8 = value9;
r9 = id;
break reducibleJoin34;
}
}
}
}
}
loadingMore = messages.loadingMore;
if (!loadingMore) {
jumpedToPresent = messages.jumpedToPresent;
if (jumpedToPresent) {
if (r16) {
if (value9 != value) {
id = value.id;
value = false;
r5 = value;
r7 = ANIMATED;
r8 = value9;
r9 = id;
break reducibleJoin34;
}
}
}
}
value = require(477) /* metro dependency 477: PlatformUtils */;
isAndroid = value.isAndroid;
value = Reflect.apply(isAndroid, value, []);
reducibleJoin25: while (true) {
if (value) {
androidKeyboardHeight = a2.androidKeyboardHeight;
androidKeyboardHeight2 = a0.androidKeyboardHeight;
value = androidKeyboardHeight < androidKeyboardHeight2;
r12 = value;
break reducibleJoin25;
}
r12 = value;
break reducibleJoin25;
}
value = false;
if (r12) {
replyingMessageId = a0.replyingMessageId;
value = value9 != replyingMessageId;
r12 = value;
break reducibleJoin27;
value = true;
r5 = value;
r7 = ANIMATED;
r8 = value9;
r9 = replyingMessageId;
break reducibleJoin34;
}
break reducibleJoin27;
}
value = false;
if (r12) {
replyingMessageId = a0.replyingMessageId;
value = true;
r5 = value;
r7 = ANIMATED;
r8 = value9;
r9 = replyingMessageId;
r9 = value9;
break reducibleJoin34;
}
r5 = value;
r7 = ANIMATED;
r8 = value9;
r9 = value9;
break reducibleJoin34;
return {scrollToMessageId: r9, jumpTargetId: r8, jumpType: r7, jumpSequenceId: jumpSequenceId,
minimizeScrolling: r5, focusTargetId: r4 ? focusTargetId : value9, shouldInitialScroll: value6};
}
return {scrollToMessageId: r9, jumpTargetId: r8, jumpType: r7, jumpSequenceId: jumpSequenceId,
minimizeScrolling: r5, focusTargetId: r4 ? focusTargetId : value9, shouldInitialScroll: value6};
}
function useMessageJumpAndroidKeyboardHeight() { // fn#86555, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11519:1238, offset: 0x01f97a1a, size: 144 bytes, params: 1, frame: 19
const binding = env0_4;
const useState = binding.useState;
const isAndroid2 = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid();
const value2 = 0;
const value5 = env0_3(Reflect.apply(useState, binding,
[isAndroid2 ? (require(1851) /* metro dependency 1851: useSystemKeyboardHeightNative */).getSystemKeyboardHeight() : value2]),
2);
const property = value5[value2];
const env0_0 = value5[1];
env0_4.useEffect(function() {
return subscribeToKeyboardUIStore(_fun86557);
}, []);
return property;
}
function useMessageJumpAndroidKeyboardHeight() { // fn#86555, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11519:1238, offset: 0x01f97a1a, size: 144 bytes, params: 1, frame: 19
const useState = ReactModule.useState;
const isAndroid2 = (PlatformUtilsModule).isAndroid();
const value2 = 0;
const value5 = Module00057(Reflect.apply(useState, ReactModule,
[isAndroid2 ? (require(1851) /* metro dependency 1851: useSystemKeyboardHeightNative */).getSystemKeyboardHeight() : value2]),
2);
const property = value5[value2];
const env0_0 = value5[1];
ReactModule.useEffect(function() {
return SubscribeToKeyboardUIStore(_fun86557);
}, []);
return property;
function _fun86556() { // fn#86556, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11519:1402, offset: 0x01f97aaa, size: 25 bytes, params: 1, frame: 11
return SubscribeToKeyboardUIStore(_fun86557);
function _fun86557(a0) { // fn#86557, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11519:1409, offset: 0x01f97ac3, size: 61 bytes, params: 2, frame: 11
let __proto__ = environment.__proto__.__proto__;
if (Reflect.apply((require(477) /* metro dependency 477: PlatformUtils */).isAndroid, __proto__, [])) {
__proto__ = environment.__proto__;
env1_0(a0.keyboardHeight);
}
}
function _fun86556() { // fn#86556, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11519:1402, offset: 0x01f97aaa, size: 25 bytes, params: 1, frame: 11
return subscribeToKeyboardUIStore(_fun86557);
}
}
function _fun86557(a0) { // fn#86557, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11519:1409, offset: 0x01f97ac3, size: 61 bytes, params: 2, frame: 11
let __proto__ = environment.__proto__.__proto__;
if (Reflect.apply((require(477) /* metro dependency 477: PlatformUtils */).isAndroid, __proto__, [])) {
__proto__ = environment.__proto__;
env1_0(a0.keyboardHeight);
}
}
global.__d(_fun86553, 11333, [57, 31, 1480, 1878, 477, 1851, 4044, 21,
2]) /* metro module 11333, dependencies: [57, 31, 1480, 1878, 477, 1851, 4044, 21, 2] */;
@@ -1,28 +1,32 @@
/* Metro module 9877; source: components_native/chat/isAlertOrActionSheetOpen.tsx; dependencies: [3849, 9878, 4497, 2] */
import ActionSheetStore from '../../modules/action_sheet/native/ActionSheetStore.tsx'; /* Metro dependency 3849 */
import AlertStore from '../../stores/native/AlertStore.tsx'; /* Metro dependency 9878 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as UseAlertStoreNativeModule from '../../design/components/AlertModal/native/useAlertStore.native.tsx'; /* Metro dependency 4497 */
function _fun77463(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#77463, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10063:6, offset: 0x01dfd912, size: 130 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const actionSheetStore = importDefault(3849) /* metro dependency 3849: ActionSheetStore */;
const alertStore = importDefault(9878) /* metro dependency 9878: AlertStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/chat/isAlertOrActionSheetOpen.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/chat/isAlertOrActionSheetOpen.tsx');
exports.isAlertOrActionSheetOpen = isAlertOrActionSheetOpen;
function isAlertOrActionSheetOpen(a0) { // fn#77464, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10063:228, offset: 0x01dfd994, size: 130 bytes, params: 2, frame: 14
let value = a1;
const value2 = a2;
const r1 = value !== undefined ? value : ActionSheetStore;
const r3 = value2 !== undefined ? value2 : AlertStore;
value = r1.getContent();
value = value != null;
const getAlert = r3.getAlert;
const value3 = Reflect.apply(getAlert, r3, []) != null;
const useAlertStore = (UseAlertStoreNativeModule).useAlertStore;
const getState = useAlertStore.getState;
const value5 = Reflect.apply(getState, useAlertStore, []).alerts.length > 0;
let r0 = value || value3;
r0 = !r0 ? value5 : r0;
return r0;
}
}
function isAlertOrActionSheetOpen(a0) { // fn#77464, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10063:228, offset: 0x01dfd994, size: 130 bytes, params: 2, frame: 14
let value = a1;
const value2 = a2;
const r1 = value !== undefined ? value : ActionSheetStore;
const r3 = value2 !== undefined ? value2 : AlertStore;
value = r1.getContent();
value = value != null;
const getAlert = r3.getAlert;
const value3 = Reflect.apply(getAlert, r3, []) != null;
const useAlertStore = (require(4497) /* metro dependency 4497: useAlertStoreNative */).useAlertStore;
const getState = useAlertStore.getState;
const value5 = Reflect.apply(getState, useAlertStore, []).alerts.length > 0;
let r0 = value || value3;
r0 = !r0 ? value5 : r0;
return r0;
}
global.__d(_fun77463, 9877, [3849, 9878, 4497, 2]) /* metro module 9877, dependencies: [3849, 9878, 4497, 2] */;
@@ -1,33 +1,39 @@
/* Metro module 12121; source: components_native/common/ActionButton.tsx; dependencies: [31, 27, 33, 4583, 8341, 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 ButtonHooksNativeModule from '../../design/components/Button/native/ButtonHooks.native.tsx'; /* Metro dependency 4583 */
import * as IconButtonNativeModule from '../../design/components/Button/native/IconButton.native.tsx'; /* Metro dependency 8341 */
function _fun93034(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#93034, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12307:6, offset: 0x020a3d4b, size: 152 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_2 = (require(27) /* metro dependency 27 */).View;
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/common/ActionButton.tsx');
ReactModule;
(FileImportTrackerModule).fileFinishedImporting('components_native/common/ActionButton.tsx');
exports.default = ActionButton_93035;
function ActionButton_93035(a0) { // fn#93035, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12307:218, offset: 0x020a3de3, size: 178 bytes, params: 2, frame: 21
const IconComponent = a0.IconComponent;
const r7 = a0.type !== 'positive' ? 'tertiary' : 'active';
const useButtonTextColorStyles = ButtonHooksNativeModule.useButtonTextColorStyles;
const color = Reflect.apply(useButtonTextColorStyles, ButtonHooksNativeModule, [r7]).color;
const styles = a0.styles;
const IconButton = (IconButtonNativeModule).IconButton;
return (
<View style={styles}>
<IconButton
icon={<IconComponent color={color} size="sm" />}
onPress={a0.onPress}
accessibilityLabel={a0.accessibilityLabel}
variant={r7}
size="sm"
/>
</View>
);
}
}
function ActionButton_93035(a0) { // fn#93035, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12307:218, offset: 0x020a3de3, size: 178 bytes, params: 2, frame: 21
const IconComponent = a0.IconComponent;
const r7 = a0.type !== 'positive' ? 'tertiary' : 'active';
const buttonHooksNativeModule = require(4583) /* metro dependency 4583: ButtonHooksNative */;
const useButtonTextColorStyles = buttonHooksNativeModule.useButtonTextColorStyles;
const color = Reflect.apply(useButtonTextColorStyles, buttonHooksNativeModule, [r7]).color;
const styles = a0.styles;
const IconButton = (require(8341) /* metro dependency 8341: IconButtonNative */).IconButton;
return (
<View style={styles}>
<IconButton
icon={<IconComponent color={color} size="sm" />}
onPress={a0.onPress}
accessibilityLabel={a0.accessibilityLabel}
variant={r7}
size="sm"
/>
</View>
);
}
global.__d(_fun93034, 12121, [31, 27, 33, 4583, 8341,
2]) /* metro module 12121, dependencies: [31, 27, 33, 4583, 8341, 2] */;
+406 -336
View File
@@ -1,367 +1,437 @@
/* Metro module 4596; source: components_native/common/Alert.tsx; dependencies: [6, 7, 15, 17, 18, 31, 27, 33, 4501, 697, 1305, 4597, 4041, 4570, 4573, 1244, 4578, 5278, 7704, 3868, 1478, 8750, 2] */
import ClassCallCheck from '../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import UseWindowDimensionsNative from '../../modules/screen/useWindowDimensions.native.tsx'; /* Metro dependency 1478 */
import ThemedGradient from '../../modules/client_themes/native/ThemedGradient.tsx'; /* Metro dependency 7704 */
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 NativeModule2 from '../../external/discord_common/js/packages/design/native.tsx'; /* Metro dependency 3868 */
import * as TimersModule from '../../external/discord_common/js/packages/timers/Timers.tsx'; /* Metro dependency 4041 */
import * as CreateStylesModule from '../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as SetAccessibilityFocusAndroidModule from '../../modules/a11y/native/setAccessibilityFocus.android.tsx'; /* Metro dependency 4570 */
import * as ButtonNativeModule from '../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as UseIsScreenLandscapeNativeModule from '../../modules/screen/useIsScreenLandscape.native.tsx'; /* Metro dependency 8750 */
function _fun38946(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#38946, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4774:6, offset: 0x010d1d85, size: 700 bytes, params: 8, frame: 28
var object3;
const env0_0 = require;
const closure = getAlertButtonVariant;
const getAlertButtonVariant2 = getAlertButtonVariant;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = importDefault(6) /* metro dependency 6 */;
const env0_5 = importDefault(7) /* metro dependency 7 */;
const env0_6 = importDefault(15) /* metro dependency 15 */;
const env0_7 = importDefault(17) /* metro dependency 17 */;
const env0_8 = importDefault(18) /* metro dependency 18 */;
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_10 = value2.View;
const StyleSheet = value2.StyleSheet;
const env0_11 = value2.ScrollView;
const value3 = require(33) /* metro dependency 33 */;
const env0_12 = value3.jsx;
const env0_13 = value3.jsxs;
const env0_14 = value3.Fragment;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createLegacyClassComponentStyles = createStylesModule.createLegacyClassComponentStyles;
object3 = {};
const object5 = {};
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object5.padding = 16;
let value = ReactModule;
const StyleSheet = ReactNativeModule.StyleSheet;
const createLegacyClassComponentStyles = CreateStylesModule.createLegacyClassComponentStyles;
object = {};
const object2 = {};
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object2.padding = 16;
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object5.backgroundColor = BACKGROUND_BASE_LOW;
object3.alert = object5;
object2.backgroundColor = BACKGROUND_BASE_LOW;
object.alert = object2;
const MOBILE_TEXT_HEADING_PRIMARY = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_TEXT_HEADING_PRIMARY;
object3.titleText = {marginBottom: 16, color: MOBILE_TEXT_HEADING_PRIMARY};
const object6 = {};
object6.height = StyleSheet.hairlineWidth;
object.titleText = {marginBottom: 16, color: MOBILE_TEXT_HEADING_PRIMARY};
const object4 = {};
object4.height = StyleSheet.hairlineWidth;
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object6.backgroundColor = BORDER_SUBTLE;
object3.divider = object6;
object4.backgroundColor = BORDER_SUBTLE;
object.divider = object4;
const TEXT_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_STRONG;
object3.body = {marginTop: 16, color: TEXT_STRONG};
object3.buttons = {marginTop: 24};
object3.cancelButton = {marginTop: 8};
object3.secondaryConfirm = {'marginTop': 16, 'alignSelf': 'center'};
const object7 = {};
object7.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object3.gradient = object7;
const env0_15 = Reflect.apply(createLegacyClassComponentStyles, createStylesModule, [object3]);
object.body = {marginTop: 16, color: TEXT_STRONG};
object.buttons = {marginTop: 24};
object.cancelButton = {marginTop: 8};
object.secondaryConfirm = {'marginTop': 16, 'alignSelf': 'center'};
const object8 = {};
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object.gradient = object8;
const env0_15 = Reflect.apply(createLegacyClassComponentStyles, CreateStylesModule, [object]);
const PureComponent = value.PureComponent;
const value5 = _fun38951(PureComponent);
const ThemeContext = (require(3868) /* metro dependency 3868: native */).ThemeContext;
const ThemeContext = (NativeModule2).ThemeContext;
value5.contextType = ThemeContext;
const ButtonColors = (require(1305) /* metro dependency 1305: native */).ButtonColors;
const ButtonColors = (NativeModule).ButtonColors;
const BRAND = ButtonColors.BRAND;
value5.defaultProps = {confirmColor: BRAND, autoCloseOnConfirm: true};
value = value.memo(_fun38967);
value.Colors = ButtonColors;
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/common/Alert.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/common/Alert.tsx');
exports.default = value;
exports.getAlertButtonVariant = closure;
}
function _isNativeReflectConstruct_38947() { // fn#38947, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4774:247, offset: 0x010d2041, size: 94 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_38947_isNativeReflectConstruct = function() {
return !!result;
})();
}
function getAlertButtonVariant(a0) { // fn#38950, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4774:940, offset: 0x010d209f, size: 249 bytes, params: 2, frame: 14
const ButtonColors = (require(1305) /* metro dependency 1305: native */).ButtonColors;
const GREEN = ButtonColors.GREEN;
if (GREEN === a0) {
return 'active';
}
const RED = ButtonColors.RED;
if (RED === a0) {
return 'destructive';
}
const GREY = ButtonColors.GREY;
if (GREY === a0) {
return 'secondary';
}
const LIGHTGREY = ButtonColors.LIGHTGREY;
if (LIGHTGREY === a0) {
return 'secondary';
}
const TRANSPARENT = ButtonColors.TRANSPARENT;
if (TRANSPARENT === a0) {
return 'secondary';
}
const WHITE = ButtonColors.WHITE;
if (WHITE === a0) {
return 'primary-overlay';
}
return 'primary';
}
function _fun38951(a0) { // fn#38951, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4774:1297, offset: 0x010d2198, size: 233 bytes, params: 2, frame: 16
const closure = Alert_38952;
env0_8(closure, a0);
return env0_5(closure, [{key: 'componentDidMount', value: function() {
var env0_0 = this;
if (this.titleRef.current != null) {
global.setImmediate(_fun38958);
exports.getAlertButtonVariant = getAlertButtonVariant2;
function _isNativeReflectConstruct_38947() { // fn#38947, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4774:247, offset: 0x010d2041, size: 94 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
}}, {key: 'componentWillUnmount', value: function() {
this.timeout.stop();
this.focusTimeout.stop();
}}, {key: 'componentDidUpdate', value: function() {
var confirming = this.props.confirming;
if (confirming != null) {
this.timeout.stop();
this.setState({confirming: confirming});
return (_isNativeReflectConstruct_38947_isNativeReflectConstruct = function() {
return !!result;
})();
}
function getAlertButtonVariant(a0) { // fn#38950, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4774:940, offset: 0x010d209f, size: 249 bytes, params: 2, frame: 14
const ButtonColors = (NativeModule).ButtonColors;
const GREEN = ButtonColors.GREEN;
if (GREEN === a0) {
return 'active';
}
}}, {key: 'renderHeader', value: value_38962}, {key: 'renderBody', value: value_38963}, {key: 'renderButtons',
value: value_38964}, {key: 'renderFooter', value: value_38965}, {key: 'render', value: value_38966}]);
}
function _fun38967(a0) { // fn#38967, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4774:4837, offset: 0x010d2b18, size: 182 bytes, params: 2, frame: 19
const value2 = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)();
const value3 = (require(8750) /* metro dependency 8750: useIsScreenLandscapeNative */).useIsScreenLandscape();
const Math = global.Math;
const min = Math.min;
const Math2 = global.Math;
return ((Component) => <Component width={Reflect.apply(min, Math, [0.9 * Math2.min(value2.width, value2.height),
400])} contentHeight={0.7 * value2.height} isLandscape={value3} {...a0} />)(env0_16);
}
function Alert_38952(a0) { // fn#38952, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4774:1309, offset: 0x010d2281, size: 325 bytes, params: 2, frame: 21
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_4;
binding(this, Alert_38952);
const items = [];
arraySpread(items, value, 0, items);
value = env1_7(Alert_38952);
binding = env1_6;
if (_isNativeReflectConstruct_38947()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items, env1_7(this).constructor);
r0 = value;
} else {
value = value.apply(this, items);
r0 = value;
}
value = binding(this, r0);
value.titleRef = env1_9.createRef();
value.state = {confirming: false};
value.renderContent = (importAll(4597) /* metro dependency 4597: CustomMarkupNative */).getParser();
const Timeout = (require(4041) /* metro dependency 4041: Timers */).Timeout;
const value4 = Object.create(Timeout.prototype, {constructor: {value: Timeout}});
let timeout = new Timeout();
value.timeout = timeout instanceof Object ? timeout : value4;
const value6 = Object.create(Timeout.prototype, {constructor: {value: Timeout}});
timeout = new Timeout();
value.focusTimeout = timeout instanceof Object ? timeout : value6;
value.handleConfirm = handleConfirm_38953;
value.handleCancel = handleCancel_38955;
value.handleSecondaryConfirm = handleSecondaryConfirm;
return value;
}
function value_38957() { // fn#38957, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4774:2143, offset: 0x010d24ca, size: 50 bytes, params: 1, frame: 11
if (this.titleRef.current != null) {
global.setImmediate(_fun38958);
}
}
function value_38962() { // fn#38962, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4774:2548, offset: 0x010d25bf, size: 219 bytes, params: 1, frame: 24
const value = environment.__proto__;
const value2 = env1_15(this.context);
const title = this.props.title;
const value3 = null;
return value3 == title || title === '' ? value3 : <View>{((Text) => <Text ref={this.titleRef} accessible accessibilityRole="header" variant="heading-md/extrabold" color="text-default" style={value2.titleText}>{typeof title !== 'string' ? title : this.renderContent(title)}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}<View style={value2.divider} /></View>;
}
function value_38963() { // fn#38963, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4774:2895, offset: 0x010d269a, size: 206 bytes, params: 1, frame: 25
const value = environment.__proto__;
const value2 = env1_15(this.context);
const {body, children} = this.props;
const jsxRuntimeEnv1_14Binding = jsxRuntimeEnv1_14;
const value3 = null;
return (
<>
{value3 != body ? <ScrollView style={{maxHeight: this.props.contentHeight}}>{((Text) => <Text variant="text-md/normal" style={value2.body}>{typeof body !== 'string' ? body : this.renderContent(body)}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}</ScrollView> : value3}
{children}
</>
);
}
function value_38964() { // fn#38964, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4774:3200, offset: 0x010d2768, size: 607 bytes, params: 1, frame: 31
var r16;
var r7;
var r6;
var r8;
var r14;
var r15;
var r0;
var intl;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
let value = environment.__proto__;
const binding = env1_15;
const context = this.context;
const value2 = undefined;
const value3 = binding(context);
const props = this.props;
const cancelText = props.cancelText;
const confirmText = props.confirmText;
if (value2 !== confirmText) {
r16 = confirmText;
} else {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r16 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.BddRzS);
}
const confirmColor = props.confirmColor;
const secondaryConfirmText = props.secondaryConfirmText;
const noDefaultButtons = props.noDefaultButtons;
const renderConfirmIcon = props.renderConfirmIcon;
const renderConfirmRightIcon = props.renderConfirmRightIcon;
const renderConfirmButton = props.renderConfirmButton;
const isConfirmButtonDisabled = props.isConfirmButtonDisabled;
const confirming = this.state.confirming;
const value5 = null;
if (noDefaultButtons) {
r0 = value5;
} else {
r7 = value5 != cancelText ? <View style={value3.cancelButton}><Button variant="secondary" onPress={this.handleCancel} text={cancelText} /></View> : value2;
if (value5 != secondaryConfirmText) {
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
r6 = <PressableOpacity accessibilityRole="button" style={value3.secondaryConfirm} onPress={this.handleSecondaryConfirm}>{((Text) => <Text variant="text-sm/semibold" color="text-link">{secondaryConfirmText}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}</PressableOpacity>;
} else {
r6 = value2;
const RED = ButtonColors.RED;
if (RED === a0) {
return 'destructive';
}
var viewBindingProps = {style: value3.buttons};
r8 = value5 == renderConfirmButton ? value2 : renderConfirmButton();
if (value5 == r8) {
var buttonProps = {variant: getAlertButtonVariant(confirmColor), onPress: this.handleConfirm, text: r16,
loading: confirming};
value = value5 != isConfirmButtonDisabled;
r14 = value && isConfirmButtonDisabled;
buttonProps.disabled = r14;
r15 = value5 == renderConfirmIcon ? value2 : renderConfirmIcon();
r15 = value5 == r15 ? value5 == renderConfirmRightIcon ? value2 : renderConfirmRightIcon() : r15;
r14 = value5 != r15 ? r15 : value2;
buttonProps.icon = r14;
value = 'start';
buttonProps.iconPosition = value5 != renderConfirmIcon ? value : value5 != renderConfirmRightIcon ? 'end' : value2;
value = <Button {...buttonProps} />;
r8 = value;
const GREY = ButtonColors.GREY;
if (GREY === a0) {
return 'secondary';
}
value = <View {...viewBindingProps}>{r8}{r7}{r6}</View>;
r0 = value;
const LIGHTGREY = ButtonColors.LIGHTGREY;
if (LIGHTGREY === a0) {
return 'secondary';
}
const TRANSPARENT = ButtonColors.TRANSPARENT;
if (TRANSPARENT === a0) {
return 'secondary';
}
const WHITE = ButtonColors.WHITE;
if (WHITE === a0) {
return 'primary-overlay';
}
return 'primary';
}
return r0;
}
function value_38965() { // fn#38965, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4774:4225, offset: 0x010d29c7, size: 50 bytes, params: 1, frame: 14
var r0;
const footer = this.props.footer;
let value = null;
if (value == footer) {
r0 = value;
} else {
value = environment.__proto__;
value = <View>{footer}</View>;
r0 = value;
}
return r0;
}
function value_38966() { // fn#38966, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4774:4320, offset: 0x010d29f9, size: 287 bytes, params: 1, frame: 24
const value = environment.__proto__;
const value2 = env1_15(this.context);
const {style, width, isLandscape, onClose} = this.props;
const jsxRuntimeEnv1_14Binding = jsxRuntimeEnv1_14;
const value3 = ((Component) => <Component absolute componentStyles={value2.gradient} />)(importDefault(7704) /* metro dependency 7704: ThemedGradient */);
const items2 = [value2.alert, style];
items2[2] = {width: width};
const items3 = [this.renderHeader()];
items3[1] = this.renderBody();
items3[2] = this.renderButtons();
items3[3] = this.renderFooter();
const fragment = <>{value3}<View onAccessibilityEscape={onClose} style={items2}>{items3}</View></>;
return isLandscape ? <ScrollView style={{maxHeight: width}}>{fragment}</ScrollView> : fragment;
}
function Alert_38952HandleConfirm() { // fn#38953, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4774:1681, owner: Alert_38952.handleConfirm, offset: 0x010d23c6, size: 129 bytes, params: 1, frame: 16
var binding;
var props;
var onClose;
var onConfirm;
var autoCloseOnConfirm;
if (!env0_0.state.confirming) {
binding = env0_0;
props = binding.props;
onClose = props.onClose;
onConfirm = props.onConfirm;
autoCloseOnConfirm = props.autoCloseOnConfirm;
binding.setState({confirming: true});
binding.timeout.start(500, _fun38954);
if (autoCloseOnConfirm) {
if (onClose != null) {
onClose();
function _fun38951(a0) { // fn#38951, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4774:1297, offset: 0x010d2198, size: 233 bytes, params: 2, frame: 16
const Alert_389522 = Alert_38952;
Inherits(Alert_389522, a0);
return CreateClass(Alert_389522, [{key: 'componentDidMount', value: function() {
var env0_0 = this;
if (this.titleRef.current != null) {
global.setImmediate(_fun38958);
}
}}, {key: 'componentWillUnmount', value: function() {
this.timeout.stop();
this.focusTimeout.stop();
}}, {key: 'componentDidUpdate', value: function() {
var confirming = this.props.confirming;
if (confirming != null) {
this.timeout.stop();
this.setState({confirming: confirming});
}
}}, {key: 'renderHeader', value: value_38962}, {key: 'renderBody', value: value_38963}, {key: 'renderButtons',
value: value_38964}, {key: 'renderFooter', value: value_38965}, {key: 'render', value: value_38966}]);
function Alert_38952(a0) { // fn#38952, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4774:1309, offset: 0x010d2281, size: 325 bytes, params: 2, frame: 21
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_4;
binding(this, Alert_38952);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_7(Alert_38952);
binding = env1_6;
if (_isNativeReflectConstruct_38947()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_7(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
value.titleRef = env1_9.createRef();
value.state = {confirming: false};
value.renderContent = (importAll(4597) /* metro dependency 4597: CustomMarkupNative */).getParser();
const Timeout = (TimersModule).Timeout;
const value4 = Object.create(Timeout.prototype, {constructor: {value: Timeout}});
let timeout = new Timeout();
value.timeout = timeout instanceof Object ? timeout : value4;
const value6 = Object.create(Timeout.prototype, {constructor: {value: Timeout}});
timeout = new Timeout();
value.focusTimeout = timeout instanceof Object ? timeout : value6;
value.handleConfirm = handleConfirm;
value.handleCancel = handleCancel;
value.handleSecondaryConfirm = handleSecondaryConfirm;
return value;
function handleConfirm() { // fn#38953, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4774:1681, owner: Alert_38952.handleConfirm, offset: 0x010d23c6, size: 129 bytes, params: 1, frame: 16
var binding;
var props;
var onClose;
var onConfirm;
var autoCloseOnConfirm;
if (!env0_0.state.confirming) {
binding = env0_0;
props = binding.props;
onClose = props.onClose;
onConfirm = props.onConfirm;
autoCloseOnConfirm = props.autoCloseOnConfirm;
binding.setState({confirming: true});
binding.timeout.start(500, _fun38954);
if (autoCloseOnConfirm) {
if (onClose != null) {
onClose();
}
}
if (onConfirm != null) {
onConfirm();
}
}
function _fun38954() { // fn#38954, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4774:1822, offset: 0x010d2447, size: 31 bytes, params: 1, frame: 12
env1_0.setState({confirming: false});
}
}
function handleCancel() { // fn#38955, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4774:1906, owner: Alert_38952.handleCancel, offset: 0x010d2466, size: 50 bytes, params: 1, frame: 11
const {onClose, onCancel} = env0_0.props;
if (onCancel != null) {
onCancel();
}
if (onClose != null) {
onClose();
}
}
function handleSecondaryConfirm() { // fn#38956, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4774:2002, owner: Alert_38952.handleSecondaryConfirm, offset: 0x010d2498, size: 50 bytes, params: 1, frame: 11
const {onClose, onConfirmSecondary} = env0_0.props;
if (onClose != null) {
onClose();
}
if (onConfirmSecondary != null) {
onConfirmSecondary();
}
}
}
if (onConfirm != null) {
onConfirm();
function value_38957() { // fn#38957, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4774:2143, offset: 0x010d24ca, size: 50 bytes, params: 1, frame: 11
if (this.titleRef.current != null) {
global.setImmediate(_fun38958);
}
function _fun38958() { // fn#38958, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4774:2197, offset: 0x010d24fc, size: 41 bytes, params: 1, frame: 13
env0_0.focusTimeout.start(300, _fun38959);
function _fun38959() { // fn#38959, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4774:2231, offset: 0x010d2525, size: 57 bytes, params: 1, frame: 13
const value = environment.__proto__.__proto__.__proto__;
(SetAccessibilityFocusAndroidModule).setAccessibilityFocus({ref: env1_0.titleRef});
}
}
}
function value_38962() { // fn#38962, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4774:2548, offset: 0x010d25bf, size: 219 bytes, params: 1, frame: 24
const value = environment.__proto__;
const value2 = env1_15(this.context);
const title = this.props.title;
const value3 = null;
return (
value3 == title || title === ''
? value3
: (
<View>
{((Text) => <Text ref={this.titleRef} accessible accessibilityRole="header" variant="heading-md/extrabold" color="text-default" style={value2.titleText}>{typeof title !== 'string' ? title : this.renderContent(title)}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}
<View style={value2.divider} />
</View>
)
);
}
function value_38963() { // fn#38963, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4774:2895, offset: 0x010d269a, size: 206 bytes, params: 1, frame: 25
const value = environment.__proto__;
const value2 = env1_15(this.context);
const {body, children} = this.props;
const jsxRuntimeEnv1_14Binding = jsxRuntimeEnv1_14;
const value3 = null;
return (
<>
{
value3 != body
? (
<ScrollView style={{maxHeight: this.props.contentHeight}}>
{((Text) => <Text variant="text-md/normal" style={value2.body}>{typeof body !== 'string' ? body : this.renderContent(body)}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}
</ScrollView>
)
: value3
}
{children}
</>
);
}
function value_38964() { // fn#38964, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4774:3200, offset: 0x010d2768, size: 607 bytes, params: 1, frame: 31
var r16;
var r7;
var r6;
var r8;
var r14;
var r15;
var r0;
var intl;
const Button = (ButtonNativeModule).Button;
let value = environment.__proto__;
const binding = env1_15;
const context = this.context;
const value2 = undefined;
const value3 = binding(context);
const props = this.props;
const cancelText = props.cancelText;
const confirmText = props.confirmText;
if (value2 !== confirmText) {
r16 = confirmText;
} else {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r16 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.BddRzS);
}
const confirmColor = props.confirmColor;
const secondaryConfirmText = props.secondaryConfirmText;
const noDefaultButtons = props.noDefaultButtons;
const renderConfirmIcon = props.renderConfirmIcon;
const renderConfirmRightIcon = props.renderConfirmRightIcon;
const renderConfirmButton = props.renderConfirmButton;
const isConfirmButtonDisabled = props.isConfirmButtonDisabled;
const confirming = this.state.confirming;
const value5 = null;
if (noDefaultButtons) {
r0 = value5;
} else {
r7 = (
value5 != cancelText
? (
<View style={value3.cancelButton}>
<Button
variant="secondary"
onPress={this.handleCancel}
text={cancelText}
/>
</View>
)
: value2
);
if (value5 != secondaryConfirmText) {
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
r6 = (
<PressableOpacity
accessibilityRole="button"
style={value3.secondaryConfirm}
onPress={this.handleSecondaryConfirm}
>
{((Text) => <Text variant="text-sm/semibold" color="text-link">{secondaryConfirmText}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}
</PressableOpacity>
);
} else {
r6 = value2;
}
var viewBindingProps = {style: value3.buttons};
r8 = value5 == renderConfirmButton ? value2 : renderConfirmButton();
if (value5 == r8) {
var buttonProps = {variant: getAlertButtonVariant(confirmColor), onPress: this.handleConfirm, text: r16,
loading: confirming};
value = value5 != isConfirmButtonDisabled;
r14 = value && isConfirmButtonDisabled;
buttonProps.disabled = r14;
r15 = value5 == renderConfirmIcon ? value2 : renderConfirmIcon();
r15 = value5 == r15 ? value5 == renderConfirmRightIcon ? value2 : renderConfirmRightIcon() : r15;
r14 = value5 != r15 ? r15 : value2;
buttonProps.icon = r14;
value = 'start';
buttonProps.iconPosition = value5 != renderConfirmIcon ? value : value5 != renderConfirmRightIcon ? 'end' : value2;
value = <Button {...buttonProps} />;
r8 = value;
}
value = (
<View {...viewBindingProps}>
{r8}
{r7}
{r6}
</View>
);
r0 = value;
}
return r0;
}
function value_38965() { // fn#38965, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4774:4225, offset: 0x010d29c7, size: 50 bytes, params: 1, frame: 14
var r0;
const footer = this.props.footer;
let value = null;
if (value == footer) {
r0 = value;
} else {
value = environment.__proto__;
value = (
<View>
{footer}
</View>
);
r0 = value;
}
return r0;
}
function value_38966() { // fn#38966, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4774:4320, offset: 0x010d29f9, size: 287 bytes, params: 1, frame: 24
const value = environment.__proto__;
const value2 = env1_15(this.context);
const {style, width, isLandscape, onClose} = this.props;
const jsxRuntimeEnv1_14Binding = jsxRuntimeEnv1_14;
const value3 = ((Component) => <Component absolute componentStyles={value2.gradient} />)(ThemedGradient);
const items2 = [value2.alert, style];
items2[2] = {width: width};
const items3 = [this.renderHeader()];
items3[1] = this.renderBody();
items3[2] = this.renderButtons();
items3[3] = this.renderFooter();
const fragment = (
<>
{value3}
<View onAccessibilityEscape={onClose} style={items2}>
{items3}
</View>
</>
);
return (
isLandscape
? (
<ScrollView style={{maxHeight: width}}>
{fragment}
</ScrollView>
)
: fragment
);
}
}
}
function Alert_38952HandleCancel() { // fn#38955, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4774:1906, owner: Alert_38952.handleCancel, offset: 0x010d2466, size: 50 bytes, params: 1, frame: 11
const {onClose, onCancel} = env0_0.props;
if (onCancel != null) {
onCancel();
}
if (onClose != null) {
onClose();
function _fun38967(a0) { // fn#38967, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4774:4837, offset: 0x010d2b18, size: 182 bytes, params: 2, frame: 19
const value2 = (UseWindowDimensionsNative)();
const value3 = (UseIsScreenLandscapeNativeModule).useIsScreenLandscape();
const Math = global.Math;
const min = Math.min;
const Math2 = global.Math;
return ((Component) => <Component width={Reflect.apply(min, Math, [0.9 * Math2.min(value2.width, value2.height),
400])} contentHeight={0.7 * value2.height} isLandscape={value3} {...a0} />)(env0_16);
}
}
function handleSecondaryConfirm() { // fn#38956, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4774:2002, owner: Alert_38952.handleSecondaryConfirm, offset: 0x010d2498, size: 50 bytes, params: 1, frame: 11
const {onClose, onConfirmSecondary} = env0_0.props;
if (onClose != null) {
onClose();
}
if (onConfirmSecondary != null) {
onConfirmSecondary();
}
}
function _fun38958() { // fn#38958, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4774:2197, offset: 0x010d24fc, size: 41 bytes, params: 1, frame: 13
env0_0.focusTimeout.start(300, _fun38959);
}
function _fun38954() { // fn#38954, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4774:1822, offset: 0x010d2447, size: 31 bytes, params: 1, frame: 12
env1_0.setState({confirming: false});
}
function _fun38959() { // fn#38959, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4774:2231, offset: 0x010d2525, size: 57 bytes, params: 1, frame: 13
const value = environment.__proto__.__proto__.__proto__;
(require(4570) /* metro dependency 4570: setAccessibilityFocusAndroid */).setAccessibilityFocus({ref: env1_0.titleRef});
}
global.__d(_fun38946, 4596, [6, 7, 15, 17, 18, 31, 27, 33, 4501, 697, 1305, 4597, 4041, 4570, 4573, 1244, 4578,
5278, 7704, 3868, 1478, 8750,
2]) /* metro module 4596, dependencies: [6, 7, 15, 17, 18, 31, 27, 33, 4501, 697, 1305, 4597, 4041, 4570, 4573, 1244, 4578, 5278, 7704, 3868, 1478, 8750, 2] */;
+280 -259
View File
@@ -1,294 +1,315 @@
/* Metro module 15268; source: components_native/common/Alerts.tsx; dependencies: [6, 7, 15, 17, 18, 31, 27, 4502, 12598, 12951, 9536, 9878, 33, 15269, 15270, 15274, 15275, 4501, 697, 4496, 4555, 5467, 3868, 566, 628, 4571, 11206, 1305, 2] */
import ClassCallCheck from '../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import Native from '../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import AccessibilityStore from '../../modules/a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */
import UseBackPressHandler from '../../modules/routing/native/useBackPressHandler.tsx'; /* Metro dependency 4571 */
import KeyboardAwareView from '../../modules/keyboard/native/KeyboardAwareView.tsx'; /* Metro dependency 5467 */
import SurveyStore from '../../stores/SurveyStore.tsx'; /* Metro dependency 9536 */
import AlertStore from '../../stores/native/AlertStore.tsx'; /* Metro dependency 9878 */
import PermissionSpeakStore from '../../stores/PermissionSpeakStore.tsx'; /* Metro dependency 12598 */
import PermissionVADStore from '../../stores/PermissionVADStore.tsx'; /* Metro dependency 12951 */
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 FluxModule from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as NativeModule from '../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as NativeModule2 from '../../external/discord_common/js/packages/design/native.tsx'; /* Metro dependency 3868 */
import * as CreateStylesModule from '../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as DialogNativeModule from '../../design/components/Dialog/native/Dialog.native.tsx'; /* Metro dependency 4555 */
import * as TransitionGroupModule from '../../external/discord_common/js/packages/transition-group/TransitionGroup.tsx'; /* Metro dependency 11206 */
function _fun116729(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116729, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15465:6, offset: 0x024950a6, size: 776 bytes, params: 8, frame: 26
const env0_0 = require;
let Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const StyleSheet = value2.StyleSheet;
const env0_10 = value2.Animated;
const env0_11 = value2.Easing;
const env0_12 = value2.TouchableWithoutFeedback;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const permissionSpeakStore = importDefault(12598) /* metro dependency 12598: PermissionSpeakStore */;
const permissionVADStore = importDefault(12951) /* metro dependency 12951: PermissionVADStore */;
const surveyStore = importDefault(9536) /* metro dependency 9536: SurveyStore */;
const alertStore = importDefault(9878) /* metro dependency 9878: AlertStore */;
const value6 = require(33) /* metro dependency 33 */;
const env0_18 = value6.jsx;
const env0_19 = value6.jsxs;
const value9 = new (importDefault(15269) /* metro dependency 15269: ModalRegistry */)([{stores: [permissionSpeakStore],
let value = ReactModule;
const StyleSheet = ReactNativeModule.StyleSheet;
const value9 = new (importDefault(15269) /* metro dependency 15269: ModalRegistry */)([{stores: [PermissionSpeakStore],
center: true, isOpen: function() {
return PermissionSpeakStore.shouldShowWarning();
}, getComponent: function() {
return require(dependencyMap[14]).default;
}}, {stores: [permissionVADStore], center: true, isOpen: function() {
}}, {stores: [PermissionVADStore], center: true, isOpen: function() {
return PermissionVADStore.shouldShowWarning();
}, getComponent: function() {
return require(dependencyMap[15]).default;
}}, {stores: [surveyStore], center: true, isOpen: isOpen_116737, getComponent: function() {
}}, {stores: [SurveyStore], center: true, isOpen: isOpen_116737, getComponent: function() {
return require(dependencyMap[16]).default;
}}]);
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createLegacyClassComponentStyles = createStylesModule.createLegacyClassComponentStyles;
const object = {};
copyDataProperties(object, StyleSheet.absoluteFillObject, undefined);
const BACKGROUND_SCRIM = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SCRIM;
object['backgroundColor'] = BACKGROUND_SCRIM;
object['justifyContent'] = 'center';
object['alignItems'] = 'center';
const env0_21 = Reflect.apply(createLegacyClassComponentStyles, createStylesModule, [{alertWrapper: object,
const createLegacyClassComponentStyles = CreateStylesModule.createLegacyClassComponentStyles;
const object2 = {};
copyDataProperties(object2, StyleSheet.absoluteFillObject, undefined);
const BACKGROUND_SCRIM = (Native).colors.BACKGROUND_SCRIM;
object2['backgroundColor'] = BACKGROUND_SCRIM;
object2['justifyContent'] = 'center';
object2['alignItems'] = 'center';
const env0_21 = Reflect.apply(createLegacyClassComponentStyles, CreateStylesModule, [{alertWrapper: object2,
alertContentWrapper: {'display': 'flex', 'alignItems': 'center', 'justifyContent': 'center',
'height': '100%'}}]);
const PureComponent = value.PureComponent;
const value12 = _fun116739(PureComponent);
const ThemeContext = (require(3868) /* metro dependency 3868: native */).ThemeContext;
const ThemeContext = (NativeModule2).ThemeContext;
value12.contextType = ThemeContext;
Object = global.Object;
const env0_23 = Object.freeze({renderAlert: undefined, renderKey: undefined, props: undefined});
value = value.memo(Alerts);
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/common/Alerts.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/common/Alerts.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_116730() { // fn#116730, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15465:316, offset: 0x024953ae, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_116730_isNativeReflectConstruct = function() {
return !!result;
})();
}
function isOpen_116737() { // fn#116737, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15465:739, offset: 0x02495436, size: 25 bytes, params: 1, frame: 9
return SurveyStore.getCurrentSurvey() != null;
}
function _fun116739(a0) { // fn#116739, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15465:1083, offset: 0x0249544f, size: 72 bytes, params: 2, frame: 15
const closure = AlertWrapper;
env0_7(closure, a0);
return env0_4(closure, [{key: 'render', value: value_116745}]);
}
function Alerts() { // fn#116746, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15465:2861, offset: 0x0249591f, size: 401 bytes, params: 1, frame: 23
const binding = env0_8;
const env0_0 = binding.useRef(env0_23);
const value2 = undefined;
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStoresObject = fluxModule.useStateFromStoresObject;
const items = [AlertStore];
const binding2 = env0_20;
arraySpread(items, binding2.getStores(), 1, binding2);
const value4 = Reflect.apply(useStateFromStoresObject, fluxModule, [items, _fun116747]);
binding.useEffect(_fun116749);
const value5 = fluxModule.useStateFromStores([AlertStore], function() {
return AlertStore.isAlertDismissable();
});
const useReducedMotion = fluxModule.useStateFromStores([AccessibilityStore], function() {
return AccessibilityStore.useReducedMotion;
});
const renderAlert = value4.renderAlert;
const renderKey = value4.renderKey;
const useCallback = binding.useCallback;
(importDefault(4571) /* metro dependency 4571: useBackPressHandler */)(Reflect.apply(useCallback, binding,
[_fun116752, [renderAlert, value5]]));
const r4 = renderAlert != null ? ((Component) => <Component isDismissable={value5} renderAlert={renderAlert} renderKey={renderKey} useReducedMotion={useReducedMotion} key={renderKey} />)(env0_22) : value2;
const TransitionGroup = (require(11206) /* metro dependency 11206: TransitionGroup */).TransitionGroup;
const TransitionGroupOverlayView = (require(1305) /* metro dependency 1305: native */).TransitionGroupOverlayView;
return (
<TransitionGroup component={TransitionGroupOverlayView} style={StyleSheet.absoluteFill}>
{r4}
</TransitionGroup>
);
}
function AlertWrapper(a0) { // fn#116740, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15465:1095, offset: 0x02495497, size: 283 bytes, params: 2, frame: 22
const value = 0;
const value2 = copyRestArgs(value, undefined);
env1_3(this, AlertWrapper);
let object = [];
arraySpread(object, value2, value, object);
const value5 = env1_6(AlertWrapper);
const value8 = env1_5(this, _isNativeReflectConstruct_116730() ? global.Reflect.construct(value5, object,
env1_6(this).constructor) : value5.apply(this, object));
object = {};
let Value = Animated.Value;
const value9 = Object.create(Value.prototype, {constructor: {value: Value}});
const value10 = new Value(value);
object.opacity = value10 instanceof Object ? value10 : value9;
Value = Animated.Value;
object.scale = new Value(value8.props.useReducedMotion ? 1 : value);
value8.state = object;
value8.componentDidAppear = componentDidAppear_116741;
value8.componentWillEnter = componentWillEnter;
value8.componentWillLeave = componentWillLeave_116743;
value8.handleRequestClose = handleRequestClose;
return value8;
}
function value_116745() { // fn#116745, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15465:2106, offset: 0x024957a0, size: 383 bytes, params: 1, frame: 27
let value = environment.__proto__;
const value2 = env1_21(this.context);
let props = this.props;
const r4 = props.renderKey ?? 'alerts-component';
props = this.props;
const renderAlert = props.renderAlert;
let object2 = {};
object2.onClose = (importDefault(4496) /* metro dependency 4496: AlertActionCreators */).close;
const value4 = Reflect.apply(renderAlert, props, [object2]);
const {opacity, scale} = this.state;
const Dialog = (require(4555) /* metro dependency 4555: DialogNative */).Dialog;
object2 = {dialogKey: r4};
let handleRequestClose = this.handleRequestClose;
object2.onDismiss = handleRequestClose;
const KeyboardAwareView = importDefault(5467) /* metro dependency 5467: KeyboardAwareView */;
const items2 = [StyleSheet.absoluteFill];
items2[1] = value2.alertContentWrapper;
handleRequestClose = this.handleRequestClose;
let View = Animated.View;
value = <TouchableWithoutFeedback accessibilityElementsHidden importantForAccessibility="no-hide-descendants" accessibilityRole="none" accessible={false} onPress={handleRequestClose}><View style={[value2.alertWrapper,
this.props.style, {opacity: opacity}]} /></TouchableWithoutFeedback>;
View = Animated.View;
return (
<Dialog {...object2}>
<KeyboardAwareView style={items2}>
{value}
<View style={{transform: [{scale: scale}]}}>
{value4}
</View>
</KeyboardAwareView>
</Dialog>
);
}
function _fun116747() { // fn#116747, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15465:2955, offset: 0x02495ab0, size: 258 bytes, params: 1, frame: 21
var environment;
var r6;
var object2;
var props;
var value4;
const value = environment.__proto__;
const alert = AlertStore.getAlert();
if (alert != null) {
object2 = {renderAlert: alert};
object2.renderKey = AlertStore.getAlertKey();
object2.props = null;
} else {
var openModal = env1_20.getOpenModal();
var env0_0 = openModal;
if (openModal != null) {
props = openModal.props;
value4 = 'alert-registery-' + openModal.key;
r6 = value4 !== env0_0.current.renderKey ? _fun116748 : (importDefault(628) /* metro dependency 628: shallowEqual */)(props,
env0_0.current.props) ? env0_0.current.renderAlert : _fun116748;
props = openModal.props;
return {renderAlert: r6, renderKey: value4, props: props};
function _isNativeReflectConstruct_116730() { // fn#116730, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15465:316, offset: 0x024953ae, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
object2 = {renderAlert: undefined, renderKey: undefined, props: undefined};
return (_isNativeReflectConstruct_116730_isNativeReflectConstruct = function() {
return !!result;
})();
}
return object2;
}
function _fun116749() { // fn#116749, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15465:3365, offset: 0x0106eb4a, size: 21 bytes, params: 1, frame: 2
env0_0.current = env0_1;
}
function _fun116752() { // fn#116752, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15465:3562, offset: 0x02495c0f, size: 63 bytes, params: 1, frame: 12
var value;
const value2 = renderAlert != null;
if (value2 && env0_2) {
value = environment.__proto__;
value = importDefault(4496) /* metro dependency 4496: AlertActionCreators */;
value.close();
function isOpen_116737() { // fn#116737, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15465:739, offset: 0x02495436, size: 25 bytes, params: 1, frame: 9
return SurveyStore.getCurrentSurvey() != null;
}
return value2;
}
function AlertWrapperComponentDidAppear() { // fn#116741, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15465:1419, owner: AlertWrapper.componentDidAppear, offset: 0x024955b2, size: 57 bytes, params: 1, frame: 12
const binding = env0_0;
binding.state.opacity.setValue(1);
binding.state.scale.setValue(1);
}
function _fun116739(a0) { // fn#116739, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15465:1083, offset: 0x0249544f, size: 72 bytes, params: 2, frame: 15
const AlertWrapper2 = AlertWrapper;
Inherits(AlertWrapper2, a0);
return CreateClass(AlertWrapper2, [{key: 'render', value: value_116745}]);
function AlertWrapper(a0) { // fn#116740, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15465:1095, offset: 0x02495497, size: 283 bytes, params: 2, frame: 22
const value = 0;
const value2 = copyRestArgs(value, undefined);
env1_3(this, AlertWrapper);
let object = [];
arraySpread(object, value2, value, object);
const value5 = env1_6(AlertWrapper);
const value8 = env1_5(this, _isNativeReflectConstruct_116730() ? global.Reflect.construct(value5, object,
env1_6(this).constructor) : value5.apply(this, object));
object = {};
let Value = Animated.Value;
const value9 = Object.create(Value.prototype, {constructor: {value: Value}});
const value10 = new Value(value);
object.opacity = value10 instanceof Object ? value10 : value9;
Value = Animated.Value;
object.scale = new Value(value8.props.useReducedMotion ? 1 : value);
value8.state = object;
value8.componentDidAppear = componentDidAppear_116741;
value8.componentWillEnter = componentWillEnter;
value8.componentWillLeave = componentWillLeave_116743;
value8.handleRequestClose = handleRequestClose;
return value8;
function AlertWrapperComponentDidAppear() { // fn#116741, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15465:1419, owner: AlertWrapper.componentDidAppear, offset: 0x024955b2, size: 57 bytes, params: 1, frame: 12
const binding = env0_0;
binding.state.opacity.setValue(1);
binding.state.scale.setValue(1);
}
function componentWillEnter(a0) { // fn#116742, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15465:1500, owner: AlertWrapper.componentWillEnter, offset: 0x024955eb, size: 175 bytes, params: 2, frame: 17
const value = environment.__proto__.__proto__;
const timing = Animated.timing;
const binding = env0_0;
const opacity = binding.state.opacity;
let object = {'toValue': 1, 'easing': null, 'duration': 250, 'useNativeDriver': true};
object.easing = Easing.linear;
object = [Reflect.apply(timing, Animated, [opacity, object])];
if (!binding.props.useReducedMotion) {
object.push(Animated.spring(env0_0.state.scale, {'toValue': 1, 'useNativeDriver': true}));
}
Animated.parallel(object).start(a0);
}
function AlertWrapperComponentWillLeave(a0) { // fn#116743, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15465:1732, owner: AlertWrapper.componentWillLeave, offset: 0x0249569a, size: 202 bytes, params: 2, frame: 19
var push;
var scale;
var object2;
const value = environment.__proto__.__proto__;
let timing = Animated.timing;
const binding = env0_0;
const opacity = binding.state.opacity;
let object = {'toValue': 0, 'easing': null, 'duration': 100, 'useNativeDriver': true};
object.easing = Easing.linear;
object = [Reflect.apply(timing, Animated, [opacity, object])];
if (!binding.props.useReducedMotion) {
push = object.push;
timing = Animated.timing;
scale = env0_0.state.scale;
object2 = {'toValue': 0, 'easing': null, 'duration': 100, 'useNativeDriver': true};
object2.easing = Easing.in(Easing.ease);
Reflect.apply(push, object, [Reflect.apply(timing, Animated, [scale, object2])]);
}
Animated.parallel(object).start(a0);
}
function handleRequestClose() { // fn#116744, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15465:1997, owner: AlertWrapper.handleRequestClose, offset: 0x02495764, size: 60 bytes, params: 1, frame: 11
var value;
if (env0_0.props.isDismissable) {
value = environment.__proto__.__proto__;
value = importDefault(4496) /* metro dependency 4496: AlertActionCreators */;
value.close();
}
}
}
function value_116745() { // fn#116745, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15465:2106, offset: 0x024957a0, size: 383 bytes, params: 1, frame: 27
let value = environment.__proto__;
const value2 = env1_21(this.context);
let props = this.props;
const r4 = props.renderKey ?? 'alerts-component';
props = this.props;
const renderAlert = props.renderAlert;
let object = {};
object.onClose = (importDefault(4496) /* metro dependency 4496: AlertActionCreators */).close;
const value4 = Reflect.apply(renderAlert, props, [object]);
const {opacity, scale} = this.state;
const Dialog = (DialogNativeModule).Dialog;
object = {dialogKey: r4};
let handleRequestClose = this.handleRequestClose;
object.onDismiss = handleRequestClose;
const items2 = [StyleSheet.absoluteFill];
items2[1] = value2.alertContentWrapper;
handleRequestClose = this.handleRequestClose;
let View = Animated.View;
value = (
<TouchableWithoutFeedback
accessibilityElementsHidden
importantForAccessibility="no-hide-descendants"
accessibilityRole="none"
accessible={false}
onPress={handleRequestClose}
>
<View style={[value2.alertWrapper, this.props.style, {opacity: opacity}]} />
</TouchableWithoutFeedback>
);
View = Animated.View;
return (
<Dialog {...object}>
<KeyboardAwareView style={items2}>
{value}
<View style={{transform: [{scale: scale}]}}>
{value4}
</View>
</KeyboardAwareView>
</Dialog>
);
}
function componentWillEnter(a0) { // fn#116742, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15465:1500, owner: AlertWrapper.componentWillEnter, offset: 0x024955eb, size: 175 bytes, params: 2, frame: 17
const value = environment.__proto__.__proto__;
const timing = Animated.timing;
const binding = env0_0;
const opacity = binding.state.opacity;
let object = {'toValue': 1, 'easing': null, 'duration': 250, 'useNativeDriver': true};
object.easing = Easing.linear;
object = [Reflect.apply(timing, Animated, [opacity, object])];
if (!binding.props.useReducedMotion) {
object.push(Animated.spring(env0_0.state.scale, {'toValue': 1, 'useNativeDriver': true}));
}
Animated.parallel(object).start(a0);
}
function AlertWrapperComponentWillLeave(a0) { // fn#116743, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15465:1732, owner: AlertWrapper.componentWillLeave, offset: 0x0249569a, size: 202 bytes, params: 2, frame: 19
var push;
var scale;
var object3;
const value = environment.__proto__.__proto__;
let timing = Animated.timing;
const binding = env0_0;
const opacity = binding.state.opacity;
let object = {'toValue': 0, 'easing': null, 'duration': 100, 'useNativeDriver': true};
object.easing = Easing.linear;
object = [Reflect.apply(timing, Animated, [opacity, object])];
if (!binding.props.useReducedMotion) {
push = object.push;
timing = Animated.timing;
scale = env0_0.state.scale;
object3 = {'toValue': 0, 'easing': null, 'duration': 100, 'useNativeDriver': true};
object3.easing = Easing.in(Easing.ease);
Reflect.apply(push, object, [Reflect.apply(timing, Animated, [scale, object3])]);
function Alerts() { // fn#116746, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15465:2861, offset: 0x0249591f, size: 401 bytes, params: 1, frame: 23
const binding = env0_8;
const env0_0 = binding.useRef(env0_23);
const value2 = undefined;
const useStateFromStoresObject = FluxModule.useStateFromStoresObject;
const alertStoreBinding = AlertStore;
const items2 = [alertStoreBinding];
const binding2 = env0_20;
arraySpread(items2, binding2.getStores(), 1, binding2);
const value4 = Reflect.apply(useStateFromStoresObject, FluxModule, [items2, _fun116747]);
binding.useEffect(_fun116749);
const value5 = FluxModule.useStateFromStores([alertStoreBinding], function() {
return AlertStore.isAlertDismissable();
});
const useReducedMotion = FluxModule.useStateFromStores([AccessibilityStore], function() {
return AccessibilityStore.useReducedMotion;
});
const renderAlert = value4.renderAlert;
const renderKey = value4.renderKey;
const useCallback = binding.useCallback;
(UseBackPressHandler)(Reflect.apply(useCallback, binding,
[_fun116752, [renderAlert, value5]]));
const r4 = (
renderAlert != null
? ((Component) => <Component isDismissable={value5} renderAlert={renderAlert} renderKey={renderKey} useReducedMotion={useReducedMotion} key={renderKey} />)(env0_22)
: value2
);
const TransitionGroup = (TransitionGroupModule).TransitionGroup;
const TransitionGroupOverlayView = (NativeModule).TransitionGroupOverlayView;
return (
<TransitionGroup component={TransitionGroupOverlayView} style={StyleSheet.absoluteFill}>
{r4}
</TransitionGroup>
);
function _fun116747() { // fn#116747, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15465:2955, offset: 0x02495ab0, size: 258 bytes, params: 1, frame: 21
var environment;
var r6;
var object;
var props;
var value4;
const value = environment.__proto__;
const alert = AlertStore.getAlert();
if (alert != null) {
object = {renderAlert: alert};
object.renderKey = AlertStore.getAlertKey();
object.props = null;
} else {
var openModal = env1_20.getOpenModal();
var openModal2 = openModal;
if (openModal != null) {
props = openModal.props;
value4 = 'alert-registery-' + openModal.key;
r6 = value4 !== openModal2.current.renderKey ? _fun116748 : (importDefault(628) /* metro dependency 628: shallowEqual */)(props,
openModal2.current.props) ? openModal2.current.renderAlert : _fun116748;
props = openModal.props;
return {renderAlert: r6, renderKey: value4, props: props};
}
object = {renderAlert: undefined, renderKey: undefined, props: undefined};
}
return object;
function _fun116748(a0) { // fn#116748, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15465:3221, offset: 0x02495bb2, size: 57 bytes, params: 2, frame: 15
const binding = env2_8;
const createElement = binding.createElement;
const component = env0_0.component;
const object = {};
copyDataProperties(object, props, copyDataProperties(object, a0, undefined));
return Reflect.apply(createElement, binding, [component, object]);
}
}
function _fun116749() { // fn#116749, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15465:3365, offset: 0x0106eb4a, size: 21 bytes, params: 1, frame: 2
env0_0.current = env0_1;
}
function _fun116752() { // fn#116752, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15465:3562, offset: 0x02495c0f, size: 63 bytes, params: 1, frame: 12
var value;
const value2 = renderAlert != null;
if (value2 && env0_2) {
value = environment.__proto__;
value = importDefault(4496) /* metro dependency 4496: AlertActionCreators */;
value.close();
}
return value2;
}
}
Animated.parallel(object).start(a0);
}
function handleRequestClose() { // fn#116744, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15465:1997, owner: AlertWrapper.handleRequestClose, offset: 0x02495764, size: 60 bytes, params: 1, frame: 11
var value;
if (env0_0.props.isDismissable) {
value = environment.__proto__.__proto__;
value = importDefault(4496) /* metro dependency 4496: AlertActionCreators */;
value.close();
}
}
function _fun116748(a0) { // fn#116748, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15465:3221, offset: 0x02495bb2, size: 57 bytes, params: 2, frame: 15
const binding = env2_8;
const createElement = binding.createElement;
const component = env0_0.component;
const object2 = {};
copyDataProperties(object2, props, copyDataProperties(object2, a0, undefined));
return Reflect.apply(createElement, binding, [component, object2]);
}
global.__d(_fun116729, 15268, [6, 7, 15, 17, 18, 31, 27, 4502, 12598, 12951, 9536, 9878, 33, 15269, 15270, 15274,
15275, 4501, 697, 4496, 4555, 5467, 3868, 566, 628, 4571, 11206, 1305,
2]) /* metro module 15268, dependencies: [6, 7, 15, 17, 18, 31, 27, 4502, 12598, 12951, 9536, 9878, 33, 15269, 15270, 15274, 15275, 4501, 697, 4496, 4555, 5467, 3868, 566, 628, 4571, 11206, 1305, 2] */;
+195 -182
View File
@@ -1,202 +1,215 @@
/* Metro module 7939; source: components_native/common/Carousel.tsx; dependencies: [6, 7, 15, 17, 18, 31, 27, 33, 4501, 697, 1305, 3868, 2] */
import ClassCallCheck from '../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
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 NativeModule from '../../external/discord_common/js/packages/design/native.tsx'; /* Metro dependency 3868 */
import * as CreateStylesModule from '../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
function _fun63352(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#63352, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8117:6, offset: 0x01b7bc06, size: 528 bytes, params: 8, frame: 23
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(6) /* metro dependency 6 */;
const env0_3 = importDefault(7) /* metro dependency 7 */;
const env0_4 = importDefault(15) /* metro dependency 15 */;
const env0_5 = importDefault(17) /* metro dependency 17 */;
const env0_6 = importDefault(18) /* metro dependency 18 */;
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_7 = value2.View;
const env0_8 = value2.ScrollView;
const value3 = require(33) /* metro dependency 33 */;
const env0_9 = value3.jsx;
const env0_10 = value3.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createLegacyClassComponentStyles = createStylesModule.createLegacyClassComponentStyles;
object2 = {};
object2.container = {alignItems: 'center'};
object2.carouselContentWrapper = {flexDirection: 'row'};
object2.pageIndicator = {'flexDirection': 'row', 'justifyContent': 'space-around', 'alignItems': 'center'};
const ICON_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.ICON_STRONG;
object2.activeIndicator = {color: ICON_STRONG};
const ICON_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.ICON_SUBTLE;
object2.inactiveIndicator = {color: ICON_SUBTLE};
const env0_11 = Reflect.apply(createLegacyClassComponentStyles, createStylesModule, [object2]);
let value = ReactModule;
const createLegacyClassComponentStyles = CreateStylesModule.createLegacyClassComponentStyles;
object = {};
object.container = {alignItems: 'center'};
object.carouselContentWrapper = {flexDirection: 'row'};
object.pageIndicator = {'flexDirection': 'row', 'justifyContent': 'space-around', 'alignItems': 'center'};
const ICON_STRONG = (Native).colors.ICON_STRONG;
object.activeIndicator = {color: ICON_STRONG};
const ICON_SUBTLE = (Native).colors.ICON_SUBTLE;
object.inactiveIndicator = {color: ICON_SUBTLE};
const env0_11 = Reflect.apply(createLegacyClassComponentStyles, CreateStylesModule, [object]);
let Component = value.Component;
const value5 = _fun63357(Component);
const ThemeContext = (require(3868) /* metro dependency 3868: native */).ThemeContext;
const ThemeContext = (NativeModule).ThemeContext;
value5.contextType = ThemeContext;
value5.defaultProps = {'indicatorSpace': 10, 'indicatorSize': 20};
Component = value.Component;
value = _fun63360(Component);
value.contextType = ThemeContext;
value.defaultProps = {'pageIndictor': true, 'width': 375};
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/common/Carousel.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/common/Carousel.tsx');
exports.default = value;
}
function _callSuper_63353(a0, a1, a2) { // fn#63353, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8117:225, offset: 0x01b7be16, size: 100 bytes, params: 4, frame: 20
var r0;
var Reflect;
let value = a2;
const value3 = env0_5(a1);
const binding = env0_4;
if (_isNativeReflectConstruct_63354()) {
Reflect = global.Reflect;
value = Reflect.construct(value3, value || [], env0_5(a0).constructor);
r0 = value;
} else {
value = value3.apply(a0, value);
r0 = value;
}
return binding(a0, r0);
}
function _isNativeReflectConstruct_63354() { // fn#63354, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8117:356, offset: 0x01b7be7a, size: 94 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_63354_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun63357(a0) { // fn#63357, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8117:870, offset: 0x01b7bed8, size: 68 bytes, params: 2, frame: 15
const closure = PageIndicator;
env0_6(closure, a0);
return env0_3(closure, [{key: 'render', value: value_63359}]);
}
function _fun63360(a0) { // fn#63360, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8117:1483, offset: 0x01b7c02e, size: 68 bytes, params: 2, frame: 15
const closure = Carousel;
env0_6(closure, a0);
return env0_3(closure, [{key: 'render', value: value_63363}]);
}
function PageIndicator() { // fn#63358, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8117:882, offset: 0x01b7bf1c, size: 42 bytes, params: 1, frame: 16
env1_2(this, PageIndicator);
return _callSuper_63353(this, PageIndicator, arguments);
}
function value_63359() { // fn#63359, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8117:1040, offset: 0x01b7bf46, size: 232 bytes, params: 1, frame: 29
var r7;
var r17;
var push;
var jsxRuntimeEnv1_9Binding;
var LegacyText;
var inactiveIndicator;
var activeIndicator;
var value4;
const value2 = env1_11(this.context);
const {count, activeIndex, indicatorSpace, indicatorSize, pageIndicatorStyle} = this.props;
const items2 = [];
const value3 = 0;
if (value3 < count) {
r7 = value3;
while (true) {
push = items2.push;
jsxRuntimeEnv1_9Binding = jsxRuntimeEnv1_9;
LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
if (r7 === activeIndex) {
activeIndicator = value2.activeIndicator;
r17 = activeIndicator;
} else {
inactiveIndicator = value2.inactiveIndicator;
r17 = inactiveIndicator;
}
Reflect.apply(push, items2, [<LegacyText style={[{fontSize: indicatorSize},
r17]} key={r7}>{'•'}</LegacyText>]);
value4 = typeof r7 === 'bigint' ? r7 + 1n : +r7 + 1;
if (value4 < count) {
r7 = value4;
continue;
}
break;
function _callSuper_63353(a0, a1, a2) { // fn#63353, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8117:225, offset: 0x01b7be16, size: 100 bytes, params: 4, frame: 20
var r0;
var Reflect;
let value = a2;
const value3 = Module00017(a1);
if (_isNativeReflectConstruct_63354()) {
Reflect = global.Reflect;
value = Reflect.construct(value3, value || [], Module00017(a0).constructor);
r0 = value;
} else {
value = value3.apply(a0, value);
r0 = value;
}
return PossibleConstructorReturn(a0, r0);
}
return (
<View style={[value2.pageIndicator, {width: count * indicatorSpace}, pageIndicatorStyle]}>
{items2}
</View>
);
}
function Carousel(a0) { // fn#63361, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8117:1495, offset: 0x01b7c072, size: 92 bytes, params: 2, frame: 18
let value = copyRestArgs(0, undefined);
env1_2(this, Carousel);
const _callSuper_63353Binding = _callSuper_63353;
const items = [];
arraySpread(items, value, 0, value);
value = _callSuper_63353Binding(this, Carousel, items);
value.state = {activeIndex: 0};
value.onAnimationEnd = onAnimationEnd;
return value;
}
function value_63363() { // fn#63363, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8117:1827, offset: 0x01b7c144, size: 320 bytes, params: 1, frame: 22
var environment;
let value = environment.__proto__;
const binding = env1_11;
const context = this.context;
const value2 = undefined;
const value3 = binding(context);
const pageIndicatorStyle = this.props.pageIndicatorStyle;
const length = this.props.children.length;
const r5 = this.props.pageIndictor === true && length > 1 ? ((Component) => <Component count={length} activeIndex={this.state.activeIndex} pageIndicatorStyle={pageIndicatorStyle} />)(env1_12) : value2;
const r8 = this.props.scrollViewProps ?? ({});
const items2 = [value3.container];
items2[1] = this.props.style;
const scrollViewBindingProps2 = {'automaticallyAdjustContentInsets': false, 'horizontal': true,
'pagingEnabled': true, 'scrollEnabled': null, 'nestedScrollEnabled': true,
'showsHorizontalScrollIndicator': false, scrollEnabled: length > 1, onMomentumScrollEnd: this.onAnimationEnd,
...r8};
value = <View style={value3.carouselContentWrapper} onStartShouldSetResponder={function() {
return true;
}}>{this.props.children}</View>;
value = <ScrollView {...scrollViewBindingProps2}>{value}</ScrollView>;
return (
<View style={items2}>
{value}
{r5}
</View>
);
}
function onAnimationEnd({nativeEvent}) { // fn#63362, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8117:1625, owner: Carousel.onAnimationEnd, offset: 0x01b7c0ce, size: 118 bytes, params: 2, frame: 14
const Math = global.Math;
const round = Math.round;
const x = nativeEvent.contentOffset.x;
const binding = env0_0;
const value2 = Reflect.apply(round, Math, [x / binding.props.width]);
binding.setState({activeIndex: value2});
if (binding.props.onPageChange != null) {
env0_0.props.onPageChange(value2);
function _isNativeReflectConstruct_63354() { // fn#63354, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8117:356, offset: 0x01b7be7a, size: 94 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_63354_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun63357(a0) { // fn#63357, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8117:870, offset: 0x01b7bed8, size: 68 bytes, params: 2, frame: 15
const PageIndicator2 = PageIndicator;
Inherits(PageIndicator2, a0);
return CreateClass(PageIndicator2, [{key: 'render', value: value_63359}]);
function PageIndicator() { // fn#63358, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8117:882, offset: 0x01b7bf1c, size: 42 bytes, params: 1, frame: 16
env1_2(this, PageIndicator);
return _callSuper_63353(this, PageIndicator, arguments);
}
function value_63359() { // fn#63359, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8117:1040, offset: 0x01b7bf46, size: 232 bytes, params: 1, frame: 29
var r7;
var r17;
var push;
var jsxRuntimeEnv1_9Binding;
var LegacyText;
var inactiveIndicator;
var activeIndicator;
var value4;
const value2 = env1_11(this.context);
const {count, activeIndex, indicatorSpace, indicatorSize, pageIndicatorStyle} = this.props;
const items2 = [];
const value3 = 0;
if (value3 < count) {
r7 = value3;
while (true) {
push = items2.push;
jsxRuntimeEnv1_9Binding = jsxRuntimeEnv1_9;
LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
if (r7 === activeIndex) {
activeIndicator = value2.activeIndicator;
r17 = activeIndicator;
} else {
inactiveIndicator = value2.inactiveIndicator;
r17 = inactiveIndicator;
}
Reflect.apply(push, items2, [<LegacyText style={[{fontSize: indicatorSize},
r17]} key={r7}>{'•'}</LegacyText>]);
value4 = typeof r7 === 'bigint' ? r7 + 1n : +r7 + 1;
if (value4 < count) {
r7 = value4;
continue;
}
break;
}
}
return (
<View style={[value2.pageIndicator, {width: count * indicatorSpace}, pageIndicatorStyle]}>
{items2}
</View>
);
}
}
function _fun63360(a0) { // fn#63360, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8117:1483, offset: 0x01b7c02e, size: 68 bytes, params: 2, frame: 15
const Carousel2 = Carousel;
Inherits(Carousel2, a0);
return CreateClass(Carousel2, [{key: 'render', value: value_63363}]);
function Carousel(a0) { // fn#63361, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8117:1495, offset: 0x01b7c072, size: 92 bytes, params: 2, frame: 18
let value = copyRestArgs(0, undefined);
env1_2(this, Carousel);
const _callSuper_63353Binding = _callSuper_63353;
const items2 = [];
arraySpread(items2, value, 0, value);
value = _callSuper_63353Binding(this, Carousel, items2);
value.state = {activeIndex: 0};
value.onAnimationEnd = onAnimationEnd;
return value;
function onAnimationEnd({nativeEvent}) { // fn#63362, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8117:1625, owner: Carousel.onAnimationEnd, offset: 0x01b7c0ce, size: 118 bytes, params: 2, frame: 14
const Math = global.Math;
const round = Math.round;
const x = nativeEvent.contentOffset.x;
const binding = env0_0;
const value2 = Reflect.apply(round, Math, [x / binding.props.width]);
binding.setState({activeIndex: value2});
if (binding.props.onPageChange != null) {
env0_0.props.onPageChange(value2);
}
}
}
function value_63363() { // fn#63363, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8117:1827, offset: 0x01b7c144, size: 320 bytes, params: 1, frame: 22
var environment;
let value = environment.__proto__;
const binding = env1_11;
const context = this.context;
const value2 = undefined;
const value3 = binding(context);
const pageIndicatorStyle = this.props.pageIndicatorStyle;
const length = this.props.children.length;
const r5 = (
this.props.pageIndictor === true && length > 1
? ((Component) => <Component count={length} activeIndex={this.state.activeIndex} pageIndicatorStyle={pageIndicatorStyle} />)(env1_12)
: value2
);
const r8 = this.props.scrollViewProps ?? ({});
const items2 = [value3.container];
items2[1] = this.props.style;
const scrollViewBindingProps2 = {'automaticallyAdjustContentInsets': false, 'horizontal': true,
'pagingEnabled': true, 'scrollEnabled': null, 'nestedScrollEnabled': true,
'showsHorizontalScrollIndicator': false, scrollEnabled: length > 1, onMomentumScrollEnd: this.onAnimationEnd,
...r8};
value = (
<View style={value3.carouselContentWrapper} onStartShouldSetResponder={function() {
return true;
}}>
{this.props.children}
</View>
);
value = (
<ScrollView {...scrollViewBindingProps2}>
{value}
</ScrollView>
);
return (
<View style={items2}>
{value}
{r5}
</View>
);
}
}
}
global.__d(_fun63352, 7939, [6, 7, 15, 17, 18, 31, 27, 33, 4501, 697, 1305, 3868,
2]) /* metro module 7939, dependencies: [6, 7, 15, 17, 18, 31, 27, 33, 4501, 697, 1305, 3868, 2] */;
File diff suppressed because it is too large. Load diff
+299 -285
View File
@@ -1,312 +1,326 @@
/* Metro module 9898; source: components_native/common/CountDown.tsx; dependencies: [6, 7, 15, 17, 18, 31, 33, 1244, 672, 4573, 2] */
import ClassCallCheck from '../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as TextModule from '../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
function _fun77570(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#77570, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10084:6, offset: 0x01e0191f, size: 240 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
let value = importAll(31) /* metro dependency 31 */;
const env0_8 = (require(33) /* metro dependency 33 */).jsx;
let value = ReactModule;
const Component = value.Component;
value = _fun77574(Component);
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/common/CountDown.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/common/CountDown.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_77571() { // fn#77571, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10084:172, offset: 0x01e01a0f, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
function _isNativeReflectConstruct_77571() { // fn#77571, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10084:172, offset: 0x01e01a0f, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_77571_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_77571_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun77574(a0) { // fn#77574, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10084:371, offset: 0x01e01a71, size: 147 bytes, params: 2, frame: 16
const closure = CountDown;
env0_7(closure, a0);
return env0_4(closure, [{key: 'componentDidMount', value: function() {
var env0_0 = this;
this._interval = global.setInterval(_fun77577, 1000);
}}, {key: 'componentWillUnmount', value: function() {
this.clearRefreshInterval();
}}, {key: 'clearRefreshInterval', value: function() {
if (this._interval != null) {
global.clearInterval(this._interval);
}
}}, {key: 'render', value: value_77580}]);
}
function value_77576() { // fn#77576, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10084:653, offset: 0x01e01b04, size: 46 bytes, params: 1, frame: 14
this._interval = global.setInterval(_fun77577, 1000);
}
function value_77580() { // fn#77580, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10084:917, offset: 0x01e01b7e, size: 985 bytes, params: 1, frame: 24
var environment;
var r7;
var r11;
var r13;
var r8;
var r1;
var r3;
var r4;
var Math;
var max;
var Date;
var value2;
var value3;
var value4;
var clearRefreshInterval;
var floor;
var Seconds;
var DAY;
var value5;
var items;
var value6;
var HOUR;
var value7;
var MINUTE;
var shift;
var value8;
var map;
var value9;
var join;
var value10;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var QJyuxY;
var n7dksO;
var indexOf;
var length;
var replace;
var property;
var HermesInternal;
var concat;
var value11;
const {postDeadlineText, style, deadline, withUnits, freezeAtRemainingSeconds} = this.props;
let value = withUnits != null;
if (deadline === Infinity) {
value = environment.__proto__;
value = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.PqEzn8);
r4 = value;
} else {
Math = global.Math;
max = Math.max;
value = global.Number(deadline);
Date = global.Date;
value -= Date.now();
value2 = 0;
value = Reflect.apply(max, Math, [value2, value]);
value /= 1000;
value3 = freezeAtRemainingSeconds != null;
reducibleJoin4: while (true) {
if (value3) {
value4 = value <= freezeAtRemainingSeconds;
r7 = value4;
break reducibleJoin4;
function _fun77574(a0) { // fn#77574, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10084:371, offset: 0x01e01a71, size: 147 bytes, params: 2, frame: 16
const CountDown2 = CountDown;
Inherits(CountDown2, a0);
return CreateClass(CountDown2, [{key: 'componentDidMount', value: function() {
var env0_0 = this;
this._interval = global.setInterval(_fun77577, 1000);
}}, {key: 'componentWillUnmount', value: function() {
this.clearRefreshInterval();
}}, {key: 'clearRefreshInterval', value: function() {
if (this._interval != null) {
global.clearInterval(this._interval);
}
r7 = value3;
break reducibleJoin4;
}}, {key: 'render', value: value_77580}]);
function CountDown() { // fn#77575, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10084:383, offset: 0x00c7c82b, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_3(this, CountDown);
const value3 = env1_6(CountDown);
return env1_5(this, _isNativeReflectConstruct_77571() ? global.Reflect.construct(value3, arguments,
env1_6(this).constructor) : value3.apply(this, arguments));
}
reducibleJoin6: while (true) {
if (r7) {
clearRefreshInterval = this.clearRefreshInterval;
Reflect.apply(clearRefreshInterval, this, []);
r11 = freezeAtRemainingSeconds;
break reducibleJoin6;
function value_77576() { // fn#77576, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10084:653, offset: 0x01e01b04, size: 46 bytes, params: 1, frame: 14
this._interval = global.setInterval(_fun77577, 1000);
function _fun77577() { // fn#77577, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10084:692, offset: 0x01e01b32, size: 19 bytes, params: 1, frame: 9
return env0_0.forceUpdate();
}
r11 = value;
break reducibleJoin6;
}
reducibleJoin17: while (true) {
reducibleJoin10: while (true) {
if (r11 >= value2) {
if (postDeadlineText != null) {
r4 = postDeadlineText;
break reducibleJoin17;
function value_77580() { // fn#77580, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10084:917, offset: 0x01e01b7e, size: 985 bytes, params: 1, frame: 24
var environment;
var r7;
var r11;
var r13;
var r8;
var r1;
var r3;
var r4;
var Math;
var max;
var Date;
var value2;
var value3;
var value4;
var clearRefreshInterval;
var floor;
var Seconds;
var DAY;
var value5;
var items2;
var value6;
var HOUR;
var value7;
var MINUTE;
var shift;
var value8;
var map;
var value9;
var join;
var value10;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var QJyuxY;
var n7dksO;
var indexOf;
var length;
var replace;
var property;
var HermesInternal;
var concat;
var value11;
const {postDeadlineText, style, deadline, withUnits, freezeAtRemainingSeconds} = this.props;
let value = withUnits != null;
if (deadline === Infinity) {
value = environment.__proto__;
value = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.PqEzn8);
r4 = value;
} else {
Math = global.Math;
max = Math.max;
value = global.Number(deadline);
Date = global.Date;
value -= Date.now();
value2 = 0;
value = Reflect.apply(max, Math, [value2, value]);
value /= 1000;
value3 = freezeAtRemainingSeconds != null;
reducibleJoin4: while (true) {
if (value3) {
value4 = value <= freezeAtRemainingSeconds;
r7 = value4;
break reducibleJoin4;
}
Math = global.Math;
floor = Math.floor;
value = environment.__proto__;
Seconds = (importDefault(672) /* metro dependency 672: Durations */).Seconds;
DAY = Seconds.DAY;
items = [Reflect.apply(floor, Math, [r11 / DAY])];
Math = global.Math;
floor = Math.floor;
Seconds = (importDefault(672) /* metro dependency 672: Durations */).Seconds;
DAY = Seconds.DAY;
value6 = r11 % DAY;
Seconds = (importDefault(672) /* metro dependency 672: Durations */).Seconds;
HOUR = Seconds.HOUR;
items[1] = Reflect.apply(floor, Math, [value6 / HOUR]);
Math = global.Math;
floor = Math.floor;
Seconds = (importDefault(672) /* metro dependency 672: Durations */).Seconds;
HOUR = Seconds.HOUR;
value7 = value6 % HOUR;
Seconds = (importDefault(672) /* metro dependency 672: Durations */).Seconds;
MINUTE = Seconds.MINUTE;
items[2] = Reflect.apply(floor, Math, [value7 / MINUTE]);
Math = global.Math;
floor = Math.floor;
Seconds = (importDefault(672) /* metro dependency 672: Durations */).Seconds;
MINUTE = Seconds.MINUTE;
items[3] = Reflect.apply(floor, Math, [value7 % MINUTE]);
if (value2 !== items[value2]) {
r13 = value2;
r7 = value3;
break reducibleJoin4;
}
reducibleJoin6: while (true) {
if (r7) {
clearRefreshInterval = this.clearRefreshInterval;
Reflect.apply(clearRefreshInterval, this, []);
r11 = freezeAtRemainingSeconds;
break reducibleJoin6;
}
r11 = value;
break reducibleJoin6;
}
reducibleJoin17: while (true) {
reducibleJoin10: while (true) {
if (r11 >= value2) {
if (postDeadlineText != null) {
r4 = postDeadlineText;
break reducibleJoin17;
}
Math = global.Math;
floor = Math.floor;
value = environment.__proto__;
Seconds = (importDefault(672) /* metro dependency 672: Durations */).Seconds;
DAY = Seconds.DAY;
items2 = [Reflect.apply(floor, Math, [r11 / DAY])];
Math = global.Math;
floor = Math.floor;
Seconds = (importDefault(672) /* metro dependency 672: Durations */).Seconds;
DAY = Seconds.DAY;
value6 = r11 % DAY;
Seconds = (importDefault(672) /* metro dependency 672: Durations */).Seconds;
HOUR = Seconds.HOUR;
items2[1] = Reflect.apply(floor, Math, [value6 / HOUR]);
Math = global.Math;
floor = Math.floor;
Seconds = (importDefault(672) /* metro dependency 672: Durations */).Seconds;
HOUR = Seconds.HOUR;
value7 = value6 % HOUR;
Seconds = (importDefault(672) /* metro dependency 672: Durations */).Seconds;
MINUTE = Seconds.MINUTE;
items2[2] = Reflect.apply(floor, Math, [value7 / MINUTE]);
Math = global.Math;
floor = Math.floor;
Seconds = (importDefault(672) /* metro dependency 672: Durations */).Seconds;
MINUTE = Seconds.MINUTE;
items2[3] = Reflect.apply(floor, Math, [value7 % MINUTE]);
if (value2 !== items2[value2]) {
r13 = value2;
break reducibleJoin10;
}
items2.shift();
r13 = 1;
break reducibleJoin10;
}
Math = global.Math;
floor = Math.floor;
value = environment.__proto__;
Seconds = (importDefault(672) /* metro dependency 672: Durations */).Seconds;
DAY = Seconds.DAY;
value5 = Reflect.apply(floor, Math, [r11 / DAY]);
items2 = [value5];
Math = global.Math;
floor = Math.floor;
Seconds = (importDefault(672) /* metro dependency 672: Durations */).Seconds;
DAY = Seconds.DAY;
value6 = r11 % DAY;
Seconds = (importDefault(672) /* metro dependency 672: Durations */).Seconds;
HOUR = Seconds.HOUR;
items2[1] = Reflect.apply(floor, Math, [value6 / HOUR]);
Math = global.Math;
floor = Math.floor;
Seconds = (importDefault(672) /* metro dependency 672: Durations */).Seconds;
HOUR = Seconds.HOUR;
value7 = value6 % HOUR;
Seconds = (importDefault(672) /* metro dependency 672: Durations */).Seconds;
MINUTE = Seconds.MINUTE;
items2[2] = Reflect.apply(floor, Math, [value7 / MINUTE]);
Math = global.Math;
floor = Math.floor;
Seconds = (importDefault(672) /* metro dependency 672: Durations */).Seconds;
MINUTE = Seconds.MINUTE;
items2[3] = Reflect.apply(floor, Math, [value7 % MINUTE]);
if (value2 !== items2[value2]) {
r13 = value2;
break reducibleJoin10;
}
shift = items2.shift;
Reflect.apply(shift, items2, []);
value8 = 1;
r13 = value8;
break reducibleJoin10;
}
items.shift();
r13 = 1;
break reducibleJoin10;
}
Math = global.Math;
floor = Math.floor;
value = environment.__proto__;
Seconds = (importDefault(672) /* metro dependency 672: Durations */).Seconds;
DAY = Seconds.DAY;
value5 = Reflect.apply(floor, Math, [r11 / DAY]);
items = [value5];
Math = global.Math;
floor = Math.floor;
Seconds = (importDefault(672) /* metro dependency 672: Durations */).Seconds;
DAY = Seconds.DAY;
value6 = r11 % DAY;
Seconds = (importDefault(672) /* metro dependency 672: Durations */).Seconds;
HOUR = Seconds.HOUR;
items[1] = Reflect.apply(floor, Math, [value6 / HOUR]);
Math = global.Math;
floor = Math.floor;
Seconds = (importDefault(672) /* metro dependency 672: Durations */).Seconds;
HOUR = Seconds.HOUR;
value7 = value6 % HOUR;
Seconds = (importDefault(672) /* metro dependency 672: Durations */).Seconds;
MINUTE = Seconds.MINUTE;
items[2] = Reflect.apply(floor, Math, [value7 / MINUTE]);
Math = global.Math;
floor = Math.floor;
Seconds = (importDefault(672) /* metro dependency 672: Durations */).Seconds;
MINUTE = Seconds.MINUTE;
items[3] = Reflect.apply(floor, Math, [value7 % MINUTE]);
if (value2 !== items[value2]) {
r13 = value2;
break reducibleJoin10;
}
shift = items.shift;
Reflect.apply(shift, items, []);
value8 = 1;
r13 = value8;
break reducibleJoin10;
}
map = items.map;
value9 = Reflect.apply(map, items, [function(a0) {
var value = a0;
return value < 10 ? '0' + value : value;
}]);
join = value9.join;
value10 = Reflect.apply(join, value9, [':']);
if (value && withUnits) {
string = intl.string;
QJyuxY = t.QJyuxY;
value = Reflect.apply(string, intl, [QJyuxY]);
items = [value];
string = intl.string;
items[1] = Reflect.apply(string, intl, [t['1LyF1h']]);
string = intl.string;
n7dksO = t.n7dksO;
items[2] = Reflect.apply(string, intl, [n7dksO]);
string = intl.string;
items[3] = Reflect.apply(string, intl, [t['6m/6nM']]);
indexOf = value10.indexOf;
value = Reflect.apply(indexOf, value10, [':']);
reducibleJoin15: while (true) {
if (value === -1) {
r1 = r13;
r3 = value10;
break reducibleJoin15;
}
length = items.length;
if (!(r13 < length)) {
r1 = r13;
r3 = value10;
break reducibleJoin15;
}
r7 = r13;
r8 = value10;
reducibleLoop13: while (true) {
replace = r8.replace;
property = items[r7];
map = items2.map;
value9 = Reflect.apply(map, items2, [function(a0) {
var value = a0;
return value < 10 ? '0' + value : value;
}]);
join = value9.join;
value10 = Reflect.apply(join, value9, [':']);
if (value && withUnits) {
string = intl.string;
QJyuxY = t.QJyuxY;
value = Reflect.apply(string, intl, [QJyuxY]);
items2 = [value];
string = intl.string;
items2[1] = Reflect.apply(string, intl, [t['1LyF1h']]);
string = intl.string;
n7dksO = t.n7dksO;
items2[2] = Reflect.apply(string, intl, [n7dksO]);
string = intl.string;
items2[3] = Reflect.apply(string, intl, [t['6m/6nM']]);
indexOf = value10.indexOf;
value = Reflect.apply(indexOf, value10, [':']);
reducibleJoin15: while (true) {
if (value === -1) {
r1 = r13;
r3 = value10;
break reducibleJoin15;
}
length = items2.length;
if (!(r13 < length)) {
r1 = r13;
r3 = value10;
break reducibleJoin15;
}
r7 = r13;
r8 = value10;
reducibleLoop13: while (true) {
replace = r8.replace;
property = items2[r7];
HermesInternal = global.HermesInternal;
concat = HermesInternal.concat;
value = Reflect.apply(replace, r8, [':', '' + property + ' ']);
value11 = typeof r7 === 'bigint' ? r7 + 1n : +r7 + 1;
indexOf = value.indexOf;
if (Reflect.apply(indexOf, value, [':']) === -1) {
r1 = value11;
r3 = value;
break reducibleJoin15;
}
length = items2.length;
if (value11 < length) {
r7 = value11;
r8 = value;
continue reducibleLoop13;
}
r1 = value11;
r3 = value;
break reducibleJoin15;
}
}
property = items2[r1];
HermesInternal = global.HermesInternal;
concat = HermesInternal.concat;
value = Reflect.apply(replace, r8, [':', '' + property + ' ']);
value11 = typeof r7 === 'bigint' ? r7 + 1n : +r7 + 1;
indexOf = value.indexOf;
if (Reflect.apply(indexOf, value, [':']) === -1) {
r1 = value11;
r3 = value;
break reducibleJoin15;
}
length = items.length;
if (value11 < length) {
r7 = value11;
r8 = value;
continue reducibleLoop13;
}
r1 = value11;
r3 = value;
break reducibleJoin15;
value = '' + r3 + property;
r4 = value;
break reducibleJoin17;
}
r4 = value10;
break reducibleJoin17;
}
property = items[r1];
HermesInternal = global.HermesInternal;
concat = HermesInternal.concat;
value = '' + r3 + property;
r4 = value;
break reducibleJoin17;
}
r4 = value10;
break reducibleJoin17;
value = environment.__proto__;
const Text = (TextModule).Text;
return (
<Text
tabularNumbers
variant="text-md/semibold"
style={style}
>
{r4}
</Text>
);
}
}
value = environment.__proto__;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<Text
tabularNumbers
variant="text-md/semibold"
style={style}
>
{r4}
</Text>
);
}
function _fun77577() { // fn#77577, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10084:692, offset: 0x01e01b32, size: 19 bytes, params: 1, frame: 9
return env0_0.forceUpdate();
}
global.__d(_fun77570, 9898, [6, 7, 15, 17, 18, 31, 33, 1244, 672, 4573,
2]) /* metro module 9898, dependencies: [6, 7, 15, 17, 18, 31, 33, 1244, 672, 4573, 2] */;
@@ -1,38 +1,43 @@
/* Metro module 11870; source: components_native/common/DescriptionEllipsis.tsx; dependencies: [31, 27, 33, 4501, 697, 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 */
function _fun91023(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#91023, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12056:6, offset: 0x02050677, size: 303 bytes, params: 8, frame: 22
var object3;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_0 = (require(27) /* metro dependency 27 */).View;
let value = require(33) /* metro dependency 33 */;
ReactModule;
let value = JsxRuntimeModule;
const env0_1 = value.jsx;
const env0_2 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object3 = {};
const object4 = {'backgroundColor': null, 'justifyContent': 'center', 'alignItems': 'center',
object = {};
const object2 = {'backgroundColor': null, 'justifyContent': 'center', 'alignItems': 'center',
'flexDirection': 'row', 'borderRadius': null, 'marginTop': 4, 'height': 12, 'width': 24};
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object4.backgroundColor = BACKGROUND_BASE_LOWEST;
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object3.topicEllipsis = object4;
object2.backgroundColor = BACKGROUND_BASE_LOWEST;
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object.topicEllipsis = object2;
const TEXT_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_MUTED;
object3.topicEllipsisDot = {'backgroundColor': null, 'borderRadius': 2, 'margin': 1, 'height': 4, 'width': 4,
object.topicEllipsisDot = {'backgroundColor': null, 'borderRadius': 2, 'margin': 1, 'height': 4, 'width': 4,
backgroundColor: TEXT_MUTED};
const env0_3 = Reflect.apply(createStyles, value, [object3]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/common/DescriptionEllipsis.tsx');
const env0_3 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('components_native/common/DescriptionEllipsis.tsx');
exports.default = DescriptionEllipsis;
function DescriptionEllipsis({style, dotStyle}) { // fn#91024, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12056:475, offset: 0x020507a6, size: 181 bytes, params: 2, frame: 20
const styles = useStyles();
return (
<View style={[styles.topicEllipsis, style]}>
<View style={[styles.topicEllipsisDot, dotStyle]} />
<View style={[styles.topicEllipsisDot, dotStyle]} />
<View style={[styles.topicEllipsisDot, dotStyle]} />
</View>
);
}
}
function DescriptionEllipsis({style, dotStyle}) { // fn#91024, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12056:475, offset: 0x020507a6, size: 181 bytes, params: 2, frame: 20
const styles = useStyles();
return (
<View style={[styles.topicEllipsis, style]}>
<View style={[styles.topicEllipsisDot, dotStyle]} />
<View style={[styles.topicEllipsisDot, dotStyle]} />
<View style={[styles.topicEllipsisDot, dotStyle]} />
</View>
);
}
global.__d(_fun91023, 11870, [31, 27, 33, 4501, 697,
2]) /* metro module 11870, dependencies: [31, 27, 33, 4501, 697, 2] */;
+82 -72
View File
@@ -1,16 +1,22 @@
/* Metro module 5475; source: components_native/common/FastImage.tsx; dependencies: [31, 27, 33, 4501, 4567, 4020, 5476, 5477, 477, 2] */
import RequireNativeComponentOrDefaultNative from '../../utils/native/requireNativeComponentOrDefault.native.tsx'; /* Metro dependency 4567 */
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 PlatformUtilsModule from '../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
import * as FabricUtilsModule from '../../utils/native/FabricUtils.tsx'; /* Metro dependency 4020 */
import * as CreateStylesModule from '../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
function _fun48093(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#48093, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5653:6, offset: 0x011dc0cc, size: 336 bytes, params: 8, frame: 25
let env0_0 = require;
const closure = FastImageAndroid;
const FastImageAndroid2 = FastImageAndroid;
let Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const Image = value2.Image;
const env0_4 = value2.NativeModules;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
const env0_6 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({base: {overflow: 'hidden'}});
const env0_7 = (importDefault(4567) /* metro dependency 4567: requireNativeComponentOrDefaultNative */)({'componentName': 'DCDFastImageView',
let value = ReactModule;
const Image = ReactNativeModule.Image;
const env0_6 = (CreateStylesModule).createStyles({base: {overflow: 'hidden'}});
const env0_7 = (RequireNativeComponentOrDefaultNative)({'componentName': 'DCDFastImageView',
'componentMissingFallbackInstance': null, 'warnWhenMissing': false, componentMissingFallbackInstance: Image});
value = value.memo(_fun48095);
Object = global.Object;
@@ -23,74 +29,78 @@ function _fun48093(global, require, importDefault, importAll, module, exports, d
items[1] = new Promise3(_fun48098);
return Promise.race(items);
}});
closure.preload = preload_48099;
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
const r1 = platformUtilsModule.isAndroid() ? closure : value;
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/common/FastImage.tsx');
FastImageAndroid2.preload = preload_48099;
const r1 = PlatformUtilsModule.isAndroid() ? FastImageAndroid2 : value;
(FileImportTrackerModule).fileFinishedImporting('components_native/common/FastImage.tsx');
exports.default = r1;
}
function FastImageAndroid(a0) { // fn#48094, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5653:903, offset: 0x011dc21c, size: 62 bytes, params: 2, frame: 14
return (
<Image
{...a0}
{...{['defaultSource']: a0.placeholder}}
{...{['fadeDuration']: 0}}
/>
);
}
function _fun48095(a0) { // fn#48095, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5653:319, offset: 0x011dc25a, size: 356 bytes, params: 2, frame: 24
var r5;
var moduleValue2;
const value2 = undefined;
const styles = useStyles();
const source = a0.source;
const style = a0.style;
const placeholder = a0.placeholder;
const enableAnimation = a0.enableAnimation;
const r10 = value2 === enableAnimation || enableAnimation;
const paused = a0.paused;
const fade = a0.fade;
const r8 = value2 === fade || fade;
const usesSmallCache = a0.usesSmallCache;
const r7 = value2 !== usesSmallCache && usesSmallCache;
if (typeof source === 'number') {
return <Image {...a0} />;
function FastImageAndroid(a0) { // fn#48094, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5653:903, offset: 0x011dc21c, size: 62 bytes, params: 2, frame: 14
return (
<Image
{...a0}
{...{['defaultSource']: a0.placeholder}}
{...{['fadeDuration']: 0}}
/>
);
}
const fabricUtilsModule = require(4020) /* metro dependency 4020: FabricUtils */;
if (fabricUtilsModule.isFabric()) {
moduleValue2 = require(5476) /* metro dependency 5476: FastImageFabricExperiment */;
r5 = moduleValue2.getFastImageFabricEnabled() ? importDefault(5477) /* metro dependency 5477: FastImageFabricNativeComponent */ : env0_7;
} else {
r5 = env0_7;
function _fun48095(a0) { // fn#48095, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5653:319, offset: 0x011dc25a, size: 356 bytes, params: 2, frame: 24
var r5;
var moduleValue2;
const value2 = undefined;
const styles = useStyles();
const source = a0.source;
const style = a0.style;
const placeholder = a0.placeholder;
const enableAnimation = a0.enableAnimation;
const r10 = value2 === enableAnimation || enableAnimation;
const paused = a0.paused;
const fade = a0.fade;
const r8 = value2 === fade || fade;
const usesSmallCache = a0.usesSmallCache;
const r7 = value2 !== usesSmallCache && usesSmallCache;
if (typeof source === 'number') {
return <Image {...a0} />;
}
if (FabricUtilsModule.isFabric()) {
moduleValue2 = require(5476) /* metro dependency 5476: FastImageFabricExperiment */;
r5 = moduleValue2.getFastImageFabricEnabled() ? importDefault(5477) /* metro dependency 5477: FastImageFabricNativeComponent */ : env0_7;
} else {
r5 = env0_7;
}
const value6 = null;
const r6 = value6 != placeholder ? Image.resolveAssetSource(placeholder) : value6;
return ((Component) => <Component {...a0} {...{['style']: [styles.base,
style]}} {...{['placeholder']: value6 == r6 ? value2 : r6.uri}} {...{['enableAnimation']: r10}} {...{['paused']: paused}} {...{['fade']: r8}} {...{['usesSmallCache']: r7}} />)(r5);
}
const value6 = null;
const r6 = value6 != placeholder ? Image.resolveAssetSource(placeholder) : value6;
return ((Component) => <Component {...a0} {...{['style']: [styles.base,
style]}} {...{['placeholder']: value6 == r6 ? value2 : r6.uri}} {...{['enableAnimation']: r10}} {...{['paused']: paused}} {...{['fade']: r8}} {...{['usesSmallCache']: r7}} />)(r5);
function preload_48096(a0) { // fn#48096, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5653:787, offset: 0x011dc3be, size: 104 bytes, params: 2, frame: 15
const env0_0 = a0;
const Promise = global.Promise;
const race = Promise.race;
const Promise2 = global.Promise;
const items2 = [new Promise2(_fun48097)];
const Promise3 = global.Promise;
items2[1] = new Promise3(function(a0) {
return (0, global.setTimeout)(a0, 2000);
});
return Reflect.apply(race, Promise, [items2]);
function _fun48097(a0) { // fn#48097, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5653:817, offset: 0x011dc426, size: 41 bytes, params: 2, frame: 13
const DCDFastImageViewManager = NativeModules.DCDFastImageViewManager;
DCDFastImageViewManager.preload(env0_0, a0);
}
}
function preload_48099(a0) { // fn#48099, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5653:1019, offset: 0x011dc46a, size: 41 bytes, params: 2, frame: 11
return Image.prefetch(a0).catch(function() {
});
}
}
function preload_48096(a0) { // fn#48096, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5653:787, offset: 0x011dc3be, size: 104 bytes, params: 2, frame: 15
const env0_0 = a0;
const Promise = global.Promise;
const race = Promise.race;
const Promise2 = global.Promise;
const items2 = [new Promise2(_fun48097)];
const Promise3 = global.Promise;
items2[1] = new Promise3(function(a0) {
return (0, global.setTimeout)(a0, 2000);
});
return Reflect.apply(race, Promise, [items2]);
}
function preload_48099(a0) { // fn#48099, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5653:1019, offset: 0x011dc46a, size: 41 bytes, params: 2, frame: 11
return Image.prefetch(a0).catch(function() {
});
}
function _fun48097(a0) { // fn#48097, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5653:817, offset: 0x011dc426, size: 41 bytes, params: 2, frame: 13
const DCDFastImageViewManager = NativeModules.DCDFastImageViewManager;
DCDFastImageViewManager.preload(env0_0, a0);
function _fun48098(a0) { // fn#48098, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5653:876, offset: 0x011dc44f, size: 27 bytes, params: 2, frame: 13
return global.setTimeout(a0, 2000);
}
global.__d(_fun48093, 5475, [31, 27, 33, 4501, 4567, 4020, 5476, 5477, 477,
2]) /* metro module 5475, dependencies: [31, 27, 33, 4501, 4567, 4020, 5476, 5477, 477, 2] */;
@@ -1,174 +1,182 @@
/* Metro module 15211; source: components_native/common/IconLabelBlock.tsx; dependencies: [29, 6, 7, 15, 17, 18, 31, 27, 33, 4501, 697, 1305, 4573, 9896, 4002, 3868, 2] */
import ClassCallCheck from '../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import ObjectWithoutProperties from '../../by-id/module-00029-ObjectWithoutProperties.js'; /* Metro dependency 29 */
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 NativeModule from '../../external/discord_common/js/packages/design/native.tsx'; /* Metro dependency 3868 */
import * as CreateStylesModule from '../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
function _fun116345(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116345, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15408:6, offset: 0x024858e9, size: 498 bytes, params: 8, frame: 25
var object2;
const env0_0 = require;
const env0_3 = ['error'];
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = importDefault(29) /* metro dependency 29 */;
const env0_5 = importDefault(6) /* metro dependency 6 */;
const env0_6 = importDefault(7) /* metro dependency 7 */;
const env0_7 = importDefault(15) /* metro dependency 15 */;
const env0_8 = importDefault(17) /* metro dependency 17 */;
const env0_9 = importDefault(18) /* metro dependency 18 */;
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_10 = value2.View;
const env0_11 = value2.Image;
const value3 = require(33) /* metro dependency 33 */;
const env0_12 = value3.jsx;
const env0_13 = value3.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createLegacyClassComponentStyles = createStylesModule.createLegacyClassComponentStyles;
object2 = {wrapper: {'alignItems': 'center', 'paddingTop': 26, 'paddingBottom': 16}};
const RED_400 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.RED_400;
object2.error = {'fontSize': 12, 'textAlign': 'center', 'alignSelf': 'center', 'marginBottom': 10, color: RED_400};
const TEXT_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_SUBTLE;
object2.label = {'fontSize': 12, 'marginTop': 20, color: TEXT_SUBTLE};
object2.iconUploaderWrapper = {'alignSelf': 'stretch', 'alignItems': 'center'};
object2.text = {marginTop: 9};
const env0_14 = Reflect.apply(createLegacyClassComponentStyles, createStylesModule, [object2]);
let value = ReactModule;
const createLegacyClassComponentStyles = CreateStylesModule.createLegacyClassComponentStyles;
object = {wrapper: {'alignItems': 'center', 'paddingTop': 26, 'paddingBottom': 16}};
const RED_400 = (Native).unsafe_rawColors.RED_400;
object.error = {'fontSize': 12, 'textAlign': 'center', 'alignSelf': 'center', 'marginBottom': 10, color: RED_400};
const TEXT_SUBTLE = (Native).colors.TEXT_SUBTLE;
object.label = {'fontSize': 12, 'marginTop': 20, color: TEXT_SUBTLE};
object.iconUploaderWrapper = {'alignSelf': 'stretch', 'alignItems': 'center'};
object.text = {marginTop: 9};
const env0_14 = Reflect.apply(createLegacyClassComponentStyles, CreateStylesModule, [object]);
const PureComponent = value.PureComponent;
value = _fun116349(PureComponent);
const ThemeContext = (require(3868) /* metro dependency 3868: native */).ThemeContext;
const ThemeContext = (NativeModule).ThemeContext;
value.contextType = ThemeContext;
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/common/IconLabelBlock.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/common/IconLabelBlock.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_116346() { // fn#116346, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15408:240, offset: 0x02485adb, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
function _isNativeReflectConstruct_116346() { // fn#116346, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15408:240, offset: 0x02485adb, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_116346_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_116346_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun116349(a0) { // fn#116349, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15408:808, offset: 0x02485b3d, size: 149 bytes, params: 2, frame: 16
const closure = IconLabelBlock;
env0_9(closure, a0);
return env0_6(closure, [{key: 'renderLabel', value: value_116351}, {key: 'renderText', value: value_116352},
{key: 'renderIcon', value: value_116353}, {key: 'render', value: value_116354}]);
}
function _fun116349(a0) { // fn#116349, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15408:808, offset: 0x02485b3d, size: 149 bytes, params: 2, frame: 16
const IconLabelBlock2 = IconLabelBlock;
Inherits(IconLabelBlock2, a0);
return CreateClass(IconLabelBlock2, [{key: 'renderLabel', value: value_116351}, {key: 'renderText', value: value_116352},
{key: 'renderIcon', value: value_116353}, {key: 'render', value: value_116354}]);
function IconLabelBlock() { // fn#116350, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15408:820, offset: 0x02485bd2, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_5(this, IconLabelBlock);
const value3 = env1_8(IconLabelBlock);
return env1_7(this, _isNativeReflectConstruct_116346() ? global.Reflect.construct(value3, arguments,
env1_8(this).constructor) : value3.apply(this, arguments));
}
function IconLabelBlock() { // fn#116350, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15408:820, offset: 0x02485bd2, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_5(this, IconLabelBlock);
const value3 = env1_8(IconLabelBlock);
return env1_7(this, _isNativeReflectConstruct_116346() ? global.Reflect.construct(value3, arguments,
env1_8(this).constructor) : value3.apply(this, arguments));
}
function value_116351() { // fn#116351, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15408:1109, offset: 0x02485c43, size: 112 bytes, params: 1, frame: 18
const value = environment.__proto__;
const value2 = env1_14(this.context);
const {label, labelStyle} = this.props;
const value3 = null;
if (value3 == label) {
return value3;
} else {
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
return (
<LegacyText style={[value2.label, labelStyle]}>
{label}
</LegacyText>
);
}
}
function value_116352() { // fn#116352, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15408:1280, offset: 0x02485cb3, size: 133 bytes, params: 1, frame: 19
const value = environment.__proto__;
const value2 = env1_14(this.context);
const {text, textStyle, textAccessibilityRole} = this.props;
const value3 = null;
if (value3 == text) {
return value3;
} else {
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<Text
variant="heading-md/medium"
color="text-default"
style={[value2.text, textStyle]}
accessibilityRole={textAccessibilityRole}
>
{text}
</Text>
);
}
}
function value_116353() { // fn#116353, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15408:1537, offset: 0x02485d38, size: 352 bytes, params: 1, frame: 27
var r8;
var error;
var value4;
var items2;
let value = environment.__proto__;
const value2 = env1_14(this.context);
const {iconProps, source, lightSource, darkSource, iconStyles, errorProps, errorStyles} = this.props;
const value3 = null;
if (value3 != iconProps) {
error = iconProps.error;
value4 = env1_4(iconProps, env1_3);
var viewBindingProps = {style: value2.iconUploaderWrapper};
items2 = [
((Component) => <Component {...value4} />)(importDefault(9896) /* metro dependency 9896: IconUploader */),
];
items2[1] = (
value3 == error
? value3
: ((LegacyText) => <LegacyText style={[value2.error,
errorStyles]} {...errorProps}>{error}</LegacyText>)((require(1305) /* metro dependency 1305: native */).LegacyText)
);
return (
<View {...viewBindingProps}>
{items2}
</View>
);
}
if (value3 != source) {
r8 = source;
} else {
value = require(4002) /* metro dependency 4002: shared */;
r8 = value.isThemeLight(this.context.theme) ? lightSource : darkSource;
}
return (
<Image
source={r8}
style={iconStyles}
resizeMode="contain"
/>
);
}
function value_116354() { // fn#116354, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15408:1992, offset: 0x02485e98, size: 139 bytes, params: 1, frame: 16
const value = environment.__proto__;
const items3 = [env1_14(this.context).wrapper];
items3[1] = this.props.wrapperStyles;
const items2 = [this.renderIcon()];
items2[1] = this.props.children;
items2[2] = this.renderLabel();
items2[3] = this.renderText();
return (
<View style={items3}>
{items2}
</View>
);
}
function value_116351() { // fn#116351, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15408:1109, offset: 0x02485c43, size: 112 bytes, params: 1, frame: 18
const value = environment.__proto__;
const value2 = env1_14(this.context);
const {label, labelStyle} = this.props;
const value3 = null;
if (value3 == label) {
return value3;
} else {
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
return (
<LegacyText style={[value2.label, labelStyle]}>
{label}
</LegacyText>
);
}
}
function value_116352() { // fn#116352, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15408:1280, offset: 0x02485cb3, size: 133 bytes, params: 1, frame: 19
const value = environment.__proto__;
const value2 = env1_14(this.context);
const {text, textStyle, textAccessibilityRole} = this.props;
const value3 = null;
if (value3 == text) {
return value3;
} else {
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<Text
variant="heading-md/medium"
color="text-default"
style={[value2.text, textStyle]}
accessibilityRole={textAccessibilityRole}
>
{text}
</Text>
);
}
}
function value_116353() { // fn#116353, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15408:1537, offset: 0x02485d38, size: 352 bytes, params: 1, frame: 27
var r8;
var error;
var value4;
var items2;
let value = environment.__proto__;
const value2 = env1_14(this.context);
const {iconProps, source, lightSource, darkSource, iconStyles, errorProps, errorStyles} = this.props;
const value3 = null;
if (value3 != iconProps) {
error = iconProps.error;
value4 = env1_4(iconProps, env1_3);
var viewBindingProps = {style: value2.iconUploaderWrapper};
items2 = [((Component) => <Component {...value4} />)(importDefault(9896) /* metro dependency 9896: IconUploader */)];
items2[1] = value3 == error ? value3 : ((LegacyText) => <LegacyText style={[value2.error,
errorStyles]} {...errorProps}>{error}</LegacyText>)((require(1305) /* metro dependency 1305: native */).LegacyText);
return (
<View {...viewBindingProps}>
{items2}
</View>
);
}
if (value3 != source) {
r8 = source;
} else {
value = require(4002) /* metro dependency 4002: shared */;
r8 = value.isThemeLight(this.context.theme) ? lightSource : darkSource;
}
return (
<Image
source={r8}
style={iconStyles}
resizeMode="contain"
/>
);
}
function value_116354() { // fn#116354, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15408:1992, offset: 0x02485e98, size: 139 bytes, params: 1, frame: 16
const value = environment.__proto__;
const items3 = [env1_14(this.context).wrapper];
items3[1] = this.props.wrapperStyles;
const items2 = [this.renderIcon()];
items2[1] = this.props.children;
items2[2] = this.renderLabel();
items2[3] = this.renderText();
return (
<View style={items3}>
{items2}
</View>
);
}
global.__d(_fun116345, 15211, [29, 6, 7, 15, 17, 18, 31, 27, 33, 4501, 697, 1305, 4573, 9896, 4002, 3868,
2]) /* metro module 15211, dependencies: [29, 6, 7, 15, 17, 18, 31, 27, 33, 4501, 697, 1305, 4573, 9896, 4002, 3868, 2] */;
+104 -65
View File
@@ -1,85 +1,124 @@
/* Metro module 9896; source: components_native/common/IconUploader.tsx; dependencies: [5, 31, 27, 661, 33, 4501, 4660, 6819, 1423, 9897, 5278, 1244, 2] */
import Module00005 from '../../by-id/module-00005.js'; /* Metro dependency 5 */
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 ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as CreateStylesModule from '../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
function _fun77562(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#77562, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10082:6, offset: 0x01e01481, size: 296 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_5 = value.View;
const env0_6 = value.Image;
const env0_7 = (require(661) /* metro dependency 661: Constants */).UPLOAD_MEDIUM_SIZE;
value = require(33) /* metro dependency 33 */;
const env0_8 = value.jsx;
const env0_9 = value.Fragment;
const env0_10 = value.jsxs;
const env0_11 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({uploadIcon: {'position': 'absolute',
const env0_11 = (CreateStylesModule).createStyles({uploadIcon: {'position': 'absolute',
'right': -7, 'top': -7}, avatar: {'height': 64, 'width': 64, 'borderRadius': 32}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/common/IconUploader.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/common/IconUploader.tsx');
exports.default = IconUploader;
}
function IconUploader({disabled, makeURL = function(a0) {
}, type, name, icon, onUpload, style, iconStyle, onChangeIconPress}) { // fn#77563, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10082:419, offset: 0x01e015a9, size: 587 bytes, params: 2, frame: 26
var r14;
var r0;
var regexp;
var object2;
var PressableOpacity;
var intl;
disabled = !(disabled === undefined) && disabled;
type = type === undefined ? 'avatar' : type;
const styles = useStyles();
const env0_2 = env0_4.useRef(false);
if (icon == null) {
r14 = makeURL(icon);
} else {
regexp = RegExp('^data:', '');
r14 = regexp.test(icon) ? icon : makeURL(icon);
}
const fragment = <>{type === 'guild' ? icon == null && name == null ? undefined : ((Component) => <Component style={iconStyle} icon={r14} value={name} size={(require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes.XLARGE} animate />)(importDefault(6819) /* metro dependency 6819: GuildIcon */) : <Image style={[styles.avatar,
iconStyle]} source={(require(1423) /* metro dependency 1423: AvatarUtils */).makeSource(r14)} />}{disabled ? null : <Image style={styles.uploadIcon} source={importDefault(9897) /* metro dependency 9897 */} />}</>;
if (disabled) {
r0 = fragment;
} else {
object2 = {style: style};
PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r0 = <View {...object2}><PressableOpacity accessibilityRole="button" accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['MsUY/S'])} onPress={function() {
return _handleChangeIcon.apply(this, arguments);
}}>{fragment}</PressableOpacity></View>;
}
return r0;
}
function _handleChangeIcon() { // fn#77565, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10082:588, owner: IconUploader._handleChangeIcon, offset: 0x01e017f4, size: 53 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__;
return env1_3(_fun77567).apply(this, arguments);
}
function* _fun77567() { // fn#77567, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10082:645, offset: 0x01e01834, size: 165 bytes, params: 1, frame: 16
if (true) {
value = environment.__proto__.__proto__;
if (importDefault != null) {
importDefault();
function IconUploader({disabled, makeURL = function(a0) {
}, type, name, icon, onUpload, style, iconStyle, onChangeIconPress}) { // fn#77563, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10082:419, offset: 0x01e015a9, size: 587 bytes, params: 2, frame: 26
var r14;
var r0;
var regexp;
var object;
var PressableOpacity;
var intl;
disabled = !(disabled === undefined) && disabled;
type = type === undefined ? 'avatar' : type;
const styles = useStyles();
const env0_2 = ReactModule.useRef(false);
if (icon == null) {
r14 = makeURL(icon);
} else {
regexp = RegExp('^data:', '');
r14 = regexp.test(icon) ? icon : makeURL(icon);
}
if (!dependencyMap.current) {
dependencyMap.current = true;
var value4 = env3_1(env3_2[6]);
yield value4.openImagePicker({size: env3_7});
var value5 = undefined;
if (false) {
return value5;
}
var base64 = value5.base64;
if (base64 != null) {
if (require != null) {
require(base64);
const fragment = (
<>
{
type === 'guild'
? (
icon == null && name == null
? undefined
: ((Component) => <Component style={iconStyle} icon={r14} value={name} size={(require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes.XLARGE} animate />)(importDefault(6819) /* metro dependency 6819: GuildIcon */)
)
: (
<Image
style={[styles.avatar, iconStyle]}
source={(require(1423) /* metro dependency 1423: AvatarUtils */).makeSource(r14)}
/>
)
}
{
disabled
? null
: (
<Image style={styles.uploadIcon} source={importDefault(9897) /* metro dependency 9897 */} />
)
}
</>
);
if (disabled) {
r0 = fragment;
} else {
object = {style: style};
PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r0 = (
<View {...object}>
<PressableOpacity
accessibilityRole="button"
accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['MsUY/S'])}
onPress={function() {
return _handleChangeIcon.apply(this, arguments);
}}
>
{fragment}
</PressableOpacity>
</View>
);
}
return r0;
function _handleChangeIcon() { // fn#77565, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10082:588, owner: IconUploader._handleChangeIcon, offset: 0x01e017f4, size: 53 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__;
return env1_3(_fun77567).apply(this, arguments);
function* _fun77567() { // fn#77567, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10082:645, offset: 0x01e01834, size: 165 bytes, params: 1, frame: 16
if (true) {
value = environment.__proto__.__proto__;
if (importDefault != null) {
importDefault();
}
if (!dependencyMap.current) {
dependencyMap.current = true;
var value4 = env3_1(env3_2[6]);
yield value4.openImagePicker({size: env3_7});
var value5 = undefined;
if (false) {
return value5;
}
var base64 = value5.base64;
if (base64 != null) {
if (require != null) {
require(base64);
}
}
dependencyMap.current = false;
}
}
}
dependencyMap.current = false;
}
}
}
global.__d(_fun77562, 9896, [5, 31, 27, 661, 33, 4501, 4660, 6819, 1423, 9897, 5278, 1244,
2]) /* metro module 9896, dependencies: [5, 31, 27, 661, 33, 4501, 4660, 6819, 1423, 9897, 5278, 1244, 2] */;
@@ -1,51 +1,63 @@
/* Metro module 10014; source: components_native/common/ImageWithPlaceholder.tsx; dependencies: [27, 33, 477, 10015, 5475, 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 JsxRuntimeModule from '../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
function _fun78225(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78225, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10200:6, offset: 0x01e21c40, size: 238 bytes, params: 8, frame: 20
var object2;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_2 = value.View;
const requireNativeComponent = value.requireNativeComponent;
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
object2 = {flex: 1};
object2 = {THUMBHASH: 1};
object2[1] = 'THUMBHASH';
object = {flex: 1};
object = {THUMBHASH: 1};
object[1] = 'THUMBHASH';
if (Reflect.apply((require(477) /* metro dependency 477: PlatformUtils */).isAndroid, value, [])) {
value = importDefault(10015) /* metro dependency 10015: ImageWithThumbhashPlaceholderNativeComponent */;
} else {
value = requireNativeComponent('DCDImageWithThumbhashPlaceholderView');
}
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/common/ImageWithPlaceholder.tsx');
exports.ImagePlaceholderVersions = object2;
(FileImportTrackerModule).fileFinishedImporting('components_native/common/ImageWithPlaceholder.tsx');
exports.ImagePlaceholderVersions = object;
exports.ImageWithPlaceholder = ImageWithPlaceholder;
}
function ImageWithPlaceholder(a0) { // fn#78226, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10200:431, offset: 0x01e21d2e, size: 269 bytes, params: 2, frame: 25
var r0;
const uri = a0.uri;
const placeholder = a0.placeholder;
const placeholderVersion = a0.placeholderVersion;
const alt = a0.alt;
const style = a0.style;
const object2 = {'uri': 0, 'placeholder': 0, 'placeholderVersion': 0, 'alt': 0, 'style': 0};
silentSetPrototypeOf(object2, null, undefined);
let value = copyDataProperties({}, a0, object2, undefined);
if (placeholder == null) {
var viewBindingProps = {style: style, ...value};
value = importDefault(5475) /* metro dependency 5475: FastImage */;
value = ((Component) => <Component style={env0_4} resizeMode="cover" source={{uri: uri}} alt={alt} />)(value);
value = <View {...viewBindingProps}>{value}</View>;
r0 = value;
} else if (placeholderVersion === env0_5.THUMBHASH) {
value = ((Component) => <Component {...value} {...{['style']: style}} {...{['uri']: uri}} {...{['placeholder']: placeholder}} {...{['placeholderVersion']: placeholderVersion}} {...{['alt']: alt}} />)(env0_6);
r0 = value;
} else {
var viewBindingProps = {style: style, ...value};
value = importDefault(5475) /* metro dependency 5475: FastImage */;
value = ((Component) => <Component style={env0_4} resizeMode="cover" source={{uri: uri}} alt={alt} />)(value);
value = <View {...viewBindingProps}>{value}</View>;
r0 = value;
function ImageWithPlaceholder(a0) { // fn#78226, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10200:431, offset: 0x01e21d2e, size: 269 bytes, params: 2, frame: 25
var r0;
const uri = a0.uri;
const placeholder = a0.placeholder;
const placeholderVersion = a0.placeholderVersion;
const alt = a0.alt;
const style = a0.style;
const object = {'uri': 0, 'placeholder': 0, 'placeholderVersion': 0, 'alt': 0, 'style': 0};
silentSetPrototypeOf(object, null, undefined);
let value = copyDataProperties({}, a0, object, undefined);
if (placeholder == null) {
var viewBindingProps = {style: style, ...value};
value = importDefault(5475) /* metro dependency 5475: FastImage */;
value = ((Component) => <Component style={env0_4} resizeMode="cover" source={{uri: uri}} alt={alt} />)(value);
value = (
<View {...viewBindingProps}>
{value}
</View>
);
r0 = value;
} else if (placeholderVersion === env0_5.THUMBHASH) {
value = ((Component) => <Component {...value} {...{['style']: style}} {...{['uri']: uri}} {...{['placeholder']: placeholder}} {...{['placeholderVersion']: placeholderVersion}} {...{['alt']: alt}} />)(env0_6);
r0 = value;
} else {
var viewBindingProps = {style: style, ...value};
value = importDefault(5475) /* metro dependency 5475: FastImage */;
value = ((Component) => <Component style={env0_4} resizeMode="cover" source={{uri: uri}} alt={alt} />)(value);
value = (
<View {...viewBindingProps}>
{value}
</View>
);
r0 = value;
}
return r0;
}
return r0;
}
global.__d(_fun78225, 10014, [27, 33, 477, 10015, 5475,
2]) /* metro module 10014, dependencies: [27, 33, 477, 10015, 5475, 2] */;
@@ -1,64 +1,81 @@
/* Metro module 9059; source: components_native/common/ItemSelectorActionSheet.tsx; dependencies: [31, 33, 3860, 697, 1585, 6275, 6758, 6806, 6277, 7988, 7987, 2] */
import Native from '../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UseSafeAreaInsetsNative from '../../modules/safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as UseTokenModule from '../../design/tokens/native/useToken.tsx'; /* Metro dependency 3860 */
import * as BottomSheetNativeModule from '../../design/components/Sheet/native/BottomSheet.native.tsx'; /* Metro dependency 6275 */
import * as Module06277Module from '../../by-id/module-06277.js'; /* Metro dependency 6277 */
import * as BottomSheetTitleHeaderNativeModule from '../../design/components/Sheet/native/BottomSheetTitleHeader.native.tsx'; /* Metro dependency 6758 */
import * as TableRadioRowNativeModule from '../../design/components/TableRow/native/TableRadioRow.native.tsx'; /* Metro dependency 7987 */
import * as TableRadioGroupNativeModule from '../../design/components/TableRow/native/TableRadioGroup.native.tsx'; /* Metro dependency 7988 */
function _fun70826(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#70826, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9244:6, offset: 0x01d09dfd, size: 147 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const value = require(33) /* metro dependency 33 */;
const env0_3 = value.jsx;
const env0_4 = value.jsxs;
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/common/ItemSelectorActionSheet.tsx');
ReactModule;
(FileImportTrackerModule).fileFinishedImporting('components_native/common/ItemSelectorActionSheet.tsx');
exports.default = ItemSelectorActionSheet;
}
function ItemSelectorActionSheet({title, body, items, selectedItem, onItemSelect, onClose, hasIcons}) { // fn#70827, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9244:229, offset: 0x01d09e90, size: 490 bytes, params: 2, frame: 31
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
const useToken = useTokenModule.useToken;
const TABLE_ROW_PADDING = (importDefault(697) /* metro dependency 697: native */).modules.mobile.TABLE_ROW_PADDING;
const value2 = Reflect.apply(useToken, useTokenModule, [TABLE_ROW_PADDING]);
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
const index = items.findIndex(function({value}) {
return value === selectedItem;
});
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
const object2 = {scrollable: true};
const BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
object2.header = <BottomSheetTitleHeader title={title} trailing={onClose != null ? ((ActionSheetCloseButton) => <ActionSheetCloseButton onPress={onClose} />)((require(6806) /* metro dependency 6806: ActionSheetCloseButtonNative */).ActionSheetCloseButton) : null} />;
const BottomSheetScrollView = (require(6277) /* metro dependency 6277 */).BottomSheetScrollView;
const object3 = {paddingHorizontal: value2};
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object3.paddingBottom = bottom + PX_16;
const TableRadioGroup = (require(7988) /* metro dependency 7988: TableRadioGroupNative */).TableRadioGroup;
return (
<BottomSheet {...object2}>
<BottomSheetScrollView contentContainerStyle={object3}>
{body}
<TableRadioGroup
value={index >= 0 ? index : -1}
accessibilityLabel={title}
hasIcons={hasIcons}
onChange={function(a0) {
var property = items[a0];
if (property != null) {
onItemSelect(property.value);
function ItemSelectorActionSheet({title, body, items, selectedItem, onItemSelect, onClose, hasIcons}) { // fn#70827, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9244:229, offset: 0x01d09e90, size: 490 bytes, params: 2, frame: 31
const useToken = UseTokenModule.useToken;
const TABLE_ROW_PADDING = (Native).modules.mobile.TABLE_ROW_PADDING;
const value2 = Reflect.apply(useToken, UseTokenModule, [TABLE_ROW_PADDING]);
const bottom = (UseSafeAreaInsetsNative)().bottom;
const index = items.findIndex(function({value}) {
return value === selectedItem;
});
const BottomSheet = (BottomSheetNativeModule).BottomSheet;
const object = {scrollable: true};
const BottomSheetTitleHeader = (BottomSheetTitleHeaderNativeModule).BottomSheetTitleHeader;
object.header = (
<BottomSheetTitleHeader
title={title}
trailing={onClose != null
? ((ActionSheetCloseButton) => <ActionSheetCloseButton onPress={onClose} />)((require(6806) /* metro dependency 6806: ActionSheetCloseButtonNative */).ActionSheetCloseButton)
: null}
/>
);
const BottomSheetScrollView = (Module06277Module).BottomSheetScrollView;
const object4 = {paddingHorizontal: value2};
const PX_16 = (Native).space.PX_16;
object4.paddingBottom = bottom + PX_16;
const TableRadioGroup = (TableRadioGroupNativeModule).TableRadioGroup;
return (
<BottomSheet {...object}>
<BottomSheetScrollView contentContainerStyle={object4}>
{body}
<TableRadioGroup
value={index >= 0 ? index : -1}
accessibilityLabel={title}
hasIcons={hasIcons}
onChange={function(a0) {
var property = items[a0];
if (property != null) {
onItemSelect(property.value);
}
}}
>
{items.map(_fun70830)}
</TableRadioGroup>
</BottomSheetScrollView>
</BottomSheet>
);
function _fun70830(a0, a1) { // fn#70830, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9244:899, offset: 0x01d0a0b7, size: 65 bytes, params: 3, frame: 16
const TableRadioRow = (TableRadioRowNativeModule).TableRadioRow;
return (
<TableRadioRow
label={a0.label}
value={a1}
key={a1}
/>
);
}
}}
>
{items.map(_fun70830)}
</TableRadioGroup>
</BottomSheetScrollView>
</BottomSheet>
);
}
function _fun70830(a0, a1) { // fn#70830, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9244:899, offset: 0x01d0a0b7, size: 65 bytes, params: 3, frame: 16
const TableRadioRow = (require(7987) /* metro dependency 7987: TableRadioRowNative */).TableRadioRow;
return (
<TableRadioRow
label={a0.label}
value={a1}
key={a1}
/>
);
}
}
global.__d(_fun70826, 9059, [31, 33, 3860, 697, 1585, 6275, 6758, 6806, 6277, 7988, 7987,
2]) /* metro module 9059, dependencies: [31, 33, 3860, 697, 1585, 6275, 6758, 6806, 6277, 7988, 7987, 2] */;
@@ -1,119 +1,125 @@
/* Metro module 6760; source: components_native/common/LottieAnimationView.tsx; dependencies: [29, 6, 7, 15, 17, 18, 31, 27, 33, 6761, 2] */
import ClassCallCheck from '../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import ObjectWithoutProperties from '../../by-id/module-00029-ObjectWithoutProperties.js'; /* Metro dependency 29 */
import Module06761 from '../../by-id/module-06761.js'; /* Metro dependency 6761 */
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 */
function _fun53258(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#53258, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6938:6, offset: 0x013439ef, size: 303 bytes, params: 8, frame: 19
const env0_2 = ['source', 'style', 'collapsable'];
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(29) /* metro dependency 29 */;
const env0_4 = importDefault(6) /* metro dependency 6 */;
const env0_5 = importDefault(7) /* metro dependency 7 */;
const env0_6 = importDefault(15) /* metro dependency 15 */;
const env0_7 = importDefault(17) /* metro dependency 17 */;
const env0_8 = importDefault(18) /* metro dependency 18 */;
let value = importAll(31) /* metro dependency 31 */;
const env0_9 = (require(27) /* metro dependency 27 */).View;
const env0_10 = (require(33) /* metro dependency 33 */).jsx;
let value = ReactModule;
const PureComponent = value.PureComponent;
value = _fun53262(PureComponent);
value.defaultProps = {'autoPlay': true, 'loop': true, 'collapsable': false};
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/common/LottieAnimationView.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/common/LottieAnimationView.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_53259() { // fn#53259, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6938:236, offset: 0x01343b1e, size: 94 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
function _isNativeReflectConstruct_53259() { // fn#53259, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6938:236, offset: 0x01343b1e, size: 94 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_53259_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_53259_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun53262(a0) { // fn#53262, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6938:435, offset: 0x01343b7c, size: 160 bytes, params: 2, frame: 16
const closure = LottieAnimationView;
env0_8(closure, a0);
return env0_5(closure, [{key: 'play', value: function() {
if (this.animation != null) {
this.animation.play();
function _fun53262(a0) { // fn#53262, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6938:435, offset: 0x01343b7c, size: 160 bytes, params: 2, frame: 16
const LottieAnimationView2 = LottieAnimationView;
Inherits(LottieAnimationView2, a0);
return CreateClass(LottieAnimationView2, [{key: 'play', value: function() {
if (this.animation != null) {
this.animation.play();
}
}}, {key: 'reset', value: function() {
if (this.animation != null) {
this.animation.reset();
}
}}, {key: 'pause', value: function() {
if (this.animation != null) {
this.animation.pause();
}
}}, {key: 'resume', value: function() {
if (this.animation != null) {
this.animation.resume();
}
}}, {key: 'render', value: value_53269}]);
function LottieAnimationView(a0) { // fn#53263, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6938:447, offset: 0x01343c1c, size: 151 bytes, params: 2, frame: 20
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_4;
binding(this, LottieAnimationView);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_7(LottieAnimationView);
binding = env1_6;
if (_isNativeReflectConstruct_53259()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_7(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
value.animation = null;
value.setRef = setRef;
return value;
function setRef(a0) { // fn#53264, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6938:716, owner: LottieAnimationView.setRef, offset: 0x01343cb3, size: 20 bytes, params: 2, frame: 2
env0_0.animation = a0;
}
}
}}, {key: 'reset', value: function() {
if (this.animation != null) {
this.animation.reset();
function value_53269() { // fn#53269, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6938:1120, offset: 0x01343d53, size: 226 bytes, params: 1, frame: 22
const props = this.props;
const source = props.source;
const style = props.style;
const collapsable = props.collapsable;
const value = environment.__proto__;
const binding = env1_3;
const value2 = undefined;
const value3 = binding(props, env1_2);
const r9 = value2 === (typeof source !== 'object' || source.uri ? value2 : global.JSON.stringify(source)) ? value2 : {aspectRatio: source.w / source.h};
return (
<View style={[r9, style]} collapsable={collapsable}>
{((Component) => <Component ref={this.setRef} source={source} style={[r9,
style]} {...value3} />)(Module06761)}
</View>
);
}
}}, {key: 'pause', value: function() {
if (this.animation != null) {
this.animation.pause();
}
}}, {key: 'resume', value: function() {
if (this.animation != null) {
this.animation.resume();
}
}}, {key: 'render', value: value_53269}]);
}
function LottieAnimationView(a0) { // fn#53263, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6938:447, offset: 0x01343c1c, size: 151 bytes, params: 2, frame: 20
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_4;
binding(this, LottieAnimationView);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_7(LottieAnimationView);
binding = env1_6;
if (_isNativeReflectConstruct_53259()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_7(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
value.animation = null;
value.setRef = setRef;
return value;
}
function value_53269() { // fn#53269, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6938:1120, offset: 0x01343d53, size: 226 bytes, params: 1, frame: 22
const props = this.props;
const source = props.source;
const style = props.style;
const collapsable = props.collapsable;
const value = environment.__proto__;
const binding = env1_3;
const value2 = undefined;
const value3 = binding(props, env1_2);
const r9 = value2 === (typeof source !== 'object' || source.uri ? value2 : global.JSON.stringify(source)) ? value2 : {aspectRatio: source.w / source.h};
return (
<View style={[r9, style]} collapsable={collapsable}>
{((Component) => <Component ref={this.setRef} source={source} style={[r9,
style]} {...value3} />)(importDefault(6761) /* metro dependency 6761 */)}
</View>
);
}
function LottieAnimationViewSetRef(a0) { // fn#53264, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6938:716, owner: LottieAnimationView.setRef, offset: 0x01343cb3, size: 20 bytes, params: 2, frame: 2
env0_0.animation = a0;
}
global.__d(_fun53258, 6760, [29, 6, 7, 15, 17, 18, 31, 27, 33, 6761,
2]) /* metro module 6760, dependencies: [29, 6, 7, 15, 17, 18, 31, 27, 33, 6761, 2] */;
@@ -1,30 +1,38 @@
/* Metro module 10686; source: components_native/common/MessageLoadingSpinner.tsx; dependencies: [31, 27, 33, 477, 3860, 697, 5461, 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 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 PlatformUtilsModule from '../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
import * as UseTokenModule from '../../design/tokens/native/useToken.tsx'; /* Metro dependency 3860 */
function _fun82160(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#82160, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10872:6, offset: 0x01eecd7b, size: 198 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const requireNativeComponent = (require(27) /* metro dependency 27 */).requireNativeComponent;
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
let value = require(477) /* metro dependency 477: PlatformUtils */;
ReactModule;
const requireNativeComponent = (ReactNativeModule).requireNativeComponent;
let value = PlatformUtilsModule;
value = value.isAndroid();
if (!value) {
value = requireNativeComponent('DCDMessageLoadingSpinner');
}
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/common/MessageLoadingSpinner.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/common/MessageLoadingSpinner.tsx');
exports.default = MessageLoadingSpinner;
}
function MessageLoadingSpinner(a0) { // fn#82161, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10872:214, offset: 0x01eece41, size: 186 bytes, params: 2, frame: 17
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
const useToken = useTokenModule.useToken;
const BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
if (env0_4 != null) {
return ((Component) => <Component {...a0} {...{['color']: a0.color ?? Reflect.apply(useToken, useTokenModule,
[BACKGROUND_BRAND])}} />)(env0_4);
} else {
const ActivityIndicator = (require(5461) /* metro dependency 5461: ActivityIndicatorNative */).ActivityIndicator;
return <ActivityIndicator animating={a0.animate} {...a0} />;
function MessageLoadingSpinner(a0) { // fn#82161, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10872:214, offset: 0x01eece41, size: 186 bytes, params: 2, frame: 17
const useToken = UseTokenModule.useToken;
const BACKGROUND_BRAND = (Native).colors.BACKGROUND_BRAND;
if (env0_4 != null) {
return ((Component) => <Component {...a0} {...{['color']: a0.color ?? Reflect.apply(useToken, UseTokenModule,
[BACKGROUND_BRAND])}} />)(env0_4);
} else {
const ActivityIndicator = (require(5461) /* metro dependency 5461: ActivityIndicatorNative */).ActivityIndicator;
return <ActivityIndicator animating={a0.animate} {...a0} />;
}
}
}
global.__d(_fun82160, 10686, [31, 27, 33, 477, 3860, 697, 5461,
2]) /* metro module 10686, dependencies: [31, 27, 33, 477, 3860, 697, 5461, 2] */;
@@ -1,11 +1,15 @@
/* Metro module 10971; source: components_native/common/NativeAPNGView.tsx; dependencies: [27, 477, 10972, 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 PlatformUtilsModule from '../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
function _fun84025(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84025, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11157:6, offset: 0x01f34ca4, size: 151 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const requireNativeComponent = (require(27) /* metro dependency 27 */).requireNativeComponent;
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
const r1 = platformUtilsModule.isAndroid() ? (require(10972) /* metro dependency 10972: APNGStickerNativeComponent */).default : requireNativeComponent('APNGStickerView');
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/common/NativeAPNGView.tsx');
const requireNativeComponent = (ReactNativeModule).requireNativeComponent;
const r1 = PlatformUtilsModule.isAndroid() ? (require(10972) /* metro dependency 10972: APNGStickerNativeComponent */).default : requireNativeComponent('APNGStickerView');
(FileImportTrackerModule).fileFinishedImporting('components_native/common/NativeAPNGView.tsx');
exports.default = r1;
}
global.__d(_fun84025, 10971, [27, 477, 10972, 2]) /* metro module 10971, dependencies: [27, 477, 10972, 2] */;
@@ -1,16 +1,21 @@
/* Metro module 9548; source: components_native/common/NativePortalView.tsx; dependencies: [31, 27, 33, 4501, 477, 9549, 9550, 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 PlatformUtilsModule from '../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
import * as CreateStylesModule from '../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
function _fun74544(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#74544, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9734:6, offset: 0x01d91b00, size: 398 bytes, params: 8, frame: 26
var value5;
var value6;
let env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const {requireNativeComponent, NativeEventEmitter, NativeModules} = require(27) /* metro dependency 27 */;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
const env0_5 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({base: {overflow: 'hidden'}});
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (platformUtilsModule.isAndroid()) {
let value = ReactModule;
const {requireNativeComponent, NativeEventEmitter, NativeModules} = ReactNativeModule;
const env0_5 = (CreateStylesModule).createStyles({base: {overflow: 'hidden'}});
if (PlatformUtilsModule.isAndroid()) {
value6 = importDefault(9549) /* metro dependency 9549: PortalViewNativeComponent */;
} else {
value5 = requireNativeComponent('DCDPortalView');
@@ -21,7 +26,7 @@ function _fun74544(global, require, importDefault, importAll, module, exports, d
const Set = global.Set;
const set = new Set();
value = value.memo(_fun74545);
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/common/NativePortalView.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/common/NativePortalView.tsx');
exports.default = value;
exports.createPortalControls = function(a0) {
var env0_0 = a0;
@@ -29,144 +34,149 @@ function _fun74544(global, require, importDefault, importAll, module, exports, d
};
exports.markPortalAlive = markPortalAlive;
exports.isPortalExpired = isPortalExpired;
}
function _fun74545(a0) { // fn#74545, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9734:381, offset: 0x01d91c8e, size: 439 bytes, params: 2, frame: 23
var r0;
const style = a0.style;
const children = a0.children;
const paused = a0.paused;
const muted = a0.muted;
const onLoad = a0.onLoad;
const object2 = {'style': 0, 'children': 0, 'paused': 0, 'muted': 0, 'onLoad': 0};
silentSetPrototypeOf(object2, null, undefined);
let value = copyDataProperties({}, a0, object2, undefined);
const env0_3 = value;
const styles = useStyles();
if (children != null) {
throw new global.Error('The <NativePortalView> component cannot contain children.');
}
let binding = env0_3;
binding.useLayoutEffect(_fun74546, [value.portal, paused]);
binding.useLayoutEffect(_fun74547, [value.portal, muted]);
binding.useLayoutEffect(_fun74548, [onLoad, value.portal]);
const value3 = binding.useCallback(_fun74550, [onLoad, value.portal]);
const isAndroid2 = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid();
binding = env0_6;
if (isAndroid2) {
value = ((Component) => <Component {...value} {...{['style']: [styles.base,
style]}} {...{['onPortalViewLoaded']: value3}} />)(binding);
r0 = value;
} else {
value = ((Component) => <Component {...value} {...{['style']: [styles.base, style]}} />)(binding);
r0 = value;
}
return r0;
}
function createPortalControls(a0) { // fn#74551, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9734:1248, offset: 0x01d91ffe, size: 49 bytes, params: 2, frame: 3
const env0_0 = a0;
return {seek: seek_74552, pause: pause_74553, useSubscribe: useSubscribe};
}
function markPortalAlive(a0) { // fn#74561, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9734:1849, offset: 0x01d92233, size: 24 bytes, params: 2, frame: 11
env0_10.delete(a0);
}
function _fun74546() { // fn#74546, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9734:560, offset: 0x01d91e45, size: 59 bytes, params: 1, frame: 13
var value2;
if (env0_3.portal != null) {
value2 = environment.__proto__;
MediaPlayerManager.toggle(env0_3.portal, !paused);
}
}
function _fun74547() { // fn#74547, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9734:638, offset: 0x01d91e80, size: 56 bytes, params: 1, frame: 13
var value2;
if (env0_3.portal != null) {
value2 = environment.__proto__;
MediaPlayerManager.setMuted(env0_3.portal, muted);
}
}
function _fun74548() { // fn#74548, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9734:717, offset: 0x01d91eb8, size: 107 bytes, params: 1, frame: 14
if (!((require(477) /* metro dependency 477: PlatformUtils */).isAndroid() || onLoad == null)) {
onLoad();
}
MediaPlayerManager.setLoopPlayback(env0_3.portal, true);
return _fun74549;
}
function _fun74550({nativeEvent}) { // fn#74550, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9734:957, offset: 0x01d91fc6, size: 56 bytes, params: 2, frame: 10
if (env0_3.portal === nativeEvent.portal) {
if (onLoad != null) {
onLoad();
function _fun74545(a0) { // fn#74545, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9734:381, offset: 0x01d91c8e, size: 439 bytes, params: 2, frame: 23
var r0;
const style = a0.style;
const children = a0.children;
const paused = a0.paused;
const muted = a0.muted;
const onLoad = a0.onLoad;
const object = {'style': 0, 'children': 0, 'paused': 0, 'muted': 0, 'onLoad': 0};
silentSetPrototypeOf(object, null, undefined);
let value = copyDataProperties({}, a0, object, undefined);
const env0_3 = value;
const styles = useStyles();
if (children != null) {
throw new global.Error('The <NativePortalView> component cannot contain children.');
}
let binding = env0_3;
binding.useLayoutEffect(_fun74546, [value.portal, paused]);
binding.useLayoutEffect(_fun74547, [value.portal, muted]);
binding.useLayoutEffect(_fun74548, [onLoad, value.portal]);
const value3 = binding.useCallback(_fun74550, [onLoad, value.portal]);
const isAndroid2 = (PlatformUtilsModule).isAndroid();
binding = env0_6;
if (isAndroid2) {
value = ((Component) => <Component {...value} {...{['style']: [styles.base,
style]}} {...{['onPortalViewLoaded']: value3}} />)(binding);
r0 = value;
} else {
value = ((Component) => <Component {...value} {...{['style']: [styles.base, style]}} />)(binding);
r0 = value;
}
return r0;
function _fun74546() { // fn#74546, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9734:560, offset: 0x01d91e45, size: 59 bytes, params: 1, frame: 13
var value2;
if (env0_3.portal != null) {
value2 = environment.__proto__;
MediaPlayerManager.toggle(env0_3.portal, !paused);
}
}
function _fun74547() { // fn#74547, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9734:638, offset: 0x01d91e80, size: 56 bytes, params: 1, frame: 13
var value2;
if (env0_3.portal != null) {
value2 = environment.__proto__;
MediaPlayerManager.setMuted(env0_3.portal, muted);
}
}
function _fun74548() { // fn#74548, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9734:717, offset: 0x01d91eb8, size: 107 bytes, params: 1, frame: 14
if (!((require(477) /* metro dependency 477: PlatformUtils */).isAndroid() || onLoad == null)) {
onLoad();
}
MediaPlayerManager.setLoopPlayback(env0_3.portal, true);
return _fun74549;
function _fun74549() { // fn#74549, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9734:787, offset: 0x01d91f23, size: 163 bytes, params: 1, frame: 15
var defaultImport;
MediaPlayerManager.setLoopPlayback(env1_3.portal, false);
if (PlatformUtilsModule.isAndroid()) {
defaultImport = importDefault(9550) /* metro dependency 9550: NativePortalFromNativeModule */;
defaultImport.unregisterView(env1_3.portal);
} else {
DCDPortalViewManager.unregisterView(env1_3.portal);
}
const binding = env2_10;
binding.add(env1_3.portal);
}
}
function _fun74550({nativeEvent}) { // fn#74550, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9734:957, offset: 0x01d91fc6, size: 56 bytes, params: 2, frame: 10
if (env0_3.portal === nativeEvent.portal) {
if (onLoad != null) {
onLoad();
}
}
}
}
}
function createPortalControlsSeek(a0) { // fn#74552, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9734:1288, owner: createPortalControls.seek, offset: 0x01d9202f, size: 35 bytes, params: 2, frame: 13
MediaPlayerManager.changeProgress(env0_0, a0);
}
function createPortalControls(a0) { // fn#74551, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9734:1248, offset: 0x01d91ffe, size: 49 bytes, params: 2, frame: 3
const env0_0 = a0;
return {seek: seek_74552, pause: pause_74553, useSubscribe: useSubscribe_74554};
function createPortalControlsSeek(a0) { // fn#74552, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9734:1288, owner: createPortalControls.seek, offset: 0x01d9202f, size: 35 bytes, params: 2, frame: 13
MediaPlayerManager.changeProgress(env0_0, a0);
}
function createPortalControlsPause(a0) { // fn#74553, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9734:1345, owner: createPortalControls.pause, offset: 0x01d92052, size: 36 bytes, params: 2, frame: 13
MediaPlayerManager.toggle(env0_0, !a0);
}
function createPortalControlsPause(a0) { // fn#74553, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9734:1345, owner: createPortalControls.pause, offset: 0x01d92052, size: 36 bytes, params: 2, frame: 13
MediaPlayerManager.toggle(env0_0, !a0);
}
function createPortalControlsUseSubscribe(a0, a1, a2) { // fn#74554, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9734:1397, owner: createPortalControls.useSubscribe, offset: 0x01d92076, size: 35 bytes, params: 4, frame: 17
useSubscribe_body(env0_0, a0, a1, a2);
}
function createPortalControlsUseSubscribe(a0, a1, a2) { // fn#74554, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9734:1397, owner: createPortalControls.useSubscribe, offset: 0x01d92076, size: 35 bytes, params: 4, frame: 17
useSubscribe_body(env0_0, a0, a1, a2);
function useSubscribe_body(a0, a1, a2, a3) { // fn#74555, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9734:1418, owner: createPortalControls.useSubscribe.body, offset: 0x01d92099, size: 79 bytes, params: 5, frame: 17
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const env0_3 = a3;
env2_3.useEffect(_fun74556, [a0, a2, a1, a3]);
function _fun74556() { // fn#74556, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9734:1462, offset: 0x01d920e8, size: 113 bytes, params: 1, frame: 15
const env0_0 = env3_9.addListener('MediaPlayerProgress', _fun74557);
const env0_1 = env3_9.addListener('MediaPlayerDownloadProgress', _fun74558);
const env0_2 = env3_9.addListener('MediaPlayerPause', _fun74559);
return _fun74560;
function _fun74557({id, time, duration}) { // fn#74557, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9734:1510, offset: 0x01d92159, size: 58 bytes, params: 2, frame: 14
if (id === env1_0 && duration > 0) {
require(time, duration);
}
}
function _fun74558({id, progressPercent, totalDurationSeconds}) { // fn#74558, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9734:1608, offset: 0x01d92193, size: 71 bytes, params: 2, frame: 13
if (id === env1_0 && totalDurationSeconds > 0 && importAll != null) {
importAll(progressPercent);
}
}
function _fun74559({id, paused}) { // fn#74559, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9734:1725, offset: 0x01d921da, size: 40 bytes, params: 2, frame: 12
if (id === env1_0) {
importDefault(paused);
}
}
function _fun74560() { // fn#74560, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9734:1766, offset: 0x01d92202, size: 49 bytes, params: 1, frame: 10
env0_0.remove();
env0_1.remove();
env0_2.remove();
}
}
}
}
function _fun74549() { // fn#74549, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9734:787, offset: 0x01d91f23, size: 163 bytes, params: 1, frame: 15
var defaultImport;
MediaPlayerManager.setLoopPlayback(env1_3.portal, false);
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (platformUtilsModule.isAndroid()) {
defaultImport = importDefault(9550) /* metro dependency 9550: NativePortalFromNativeModule */;
defaultImport.unregisterView(env1_3.portal);
} else {
DCDPortalViewManager.unregisterView(env1_3.portal);
}
const binding = env2_10;
binding.add(env1_3.portal);
}
function useSubscribe_body(a0, a1, a2, a3) { // fn#74555, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9734:1418, owner: createPortalControls.useSubscribe.body, offset: 0x01d92099, size: 79 bytes, params: 5, frame: 17
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const env0_3 = a3;
env2_3.useEffect(_fun74556, [a0, a2, a1, a3]);
}
function _fun74556() { // fn#74556, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9734:1462, offset: 0x01d920e8, size: 113 bytes, params: 1, frame: 15
const env0_0 = env3_9.addListener('MediaPlayerProgress', _fun74557);
const env0_1 = env3_9.addListener('MediaPlayerDownloadProgress', _fun74558);
const env0_2 = env3_9.addListener('MediaPlayerPause', _fun74559);
return _fun74560;
}
function _fun74557({id, time, duration}) { // fn#74557, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9734:1510, offset: 0x01d92159, size: 58 bytes, params: 2, frame: 14
if (id === env1_0 && duration > 0) {
require(time, duration);
function markPortalAlive(a0) { // fn#74561, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9734:1849, offset: 0x01d92233, size: 24 bytes, params: 2, frame: 11
env0_10.delete(a0);
}
}
function _fun74558({id, progressPercent, totalDurationSeconds}) { // fn#74558, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9734:1608, offset: 0x01d92193, size: 71 bytes, params: 2, frame: 13
if (id === env1_0 && totalDurationSeconds > 0 && importAll != null) {
importAll(progressPercent);
function isPortalExpired(a0) { // fn#74562, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9734:1908, offset: 0x00cfc121, size: 22 bytes, params: 2, frame: 11
return env0_10.has(a0);
}
}
function _fun74559({id, paused}) { // fn#74559, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9734:1725, offset: 0x01d921da, size: 40 bytes, params: 2, frame: 12
if (id === env1_0) {
importDefault(paused);
}
}
function _fun74560() { // fn#74560, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9734:1766, offset: 0x01d92202, size: 49 bytes, params: 1, frame: 10
env0_0.remove();
env0_1.remove();
env0_2.remove();
}
global.__d(_fun74544, 9548, [31, 27, 33, 4501, 477, 9549, 9550,
2]) /* metro module 9548, dependencies: [31, 27, 33, 4501, 477, 9549, 9550, 2] */;
@@ -1,30 +1,35 @@
/* Metro module 10904; source: components_native/common/Notifications.tsx; dependencies: [31, 10905, 33, 566, 10932, 2] */
import InAppNotificationStore from '../../stores/native/InAppNotificationStore.tsx'; /* Metro dependency 10905 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
function _fun83467(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83467, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11090:6, offset: 0x01f1be1a, size: 154 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const inAppNotificationStore = importDefault(10905) /* metro dependency 10905: InAppNotificationStore */;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/common/Notifications.tsx');
ReactModule;
(FileImportTrackerModule).fileFinishedImporting('components_native/common/Notifications.tsx');
exports.default = Notifications;
}
function Notifications() { // fn#83468, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11090:214, offset: 0x01f1beb4, size: 111 bytes, params: 1, frame: 17
var r0;
var value;
const currentNotification = (require(566) /* metro dependency 566: flux */).useStateFromStores([InAppNotificationStore],
function() {
return InAppNotificationStore.getCurrentNotification();
});
const value2 = null;
if (value2 == currentNotification) {
r0 = value2;
} else {
value = importDefault(10932) /* metro dependency 10932: InAppNotificationContainer */;
value = ((Component) => <Component notification={currentNotification} key={currentNotification.key} />)(value);
r0 = value;
function Notifications() { // fn#83468, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11090:214, offset: 0x01f1beb4, size: 111 bytes, params: 1, frame: 17
var r0;
var value;
const currentNotification = (require(566) /* metro dependency 566: flux */).useStateFromStores([InAppNotificationStore],
function() {
return InAppNotificationStore.getCurrentNotification();
});
const value2 = null;
if (value2 == currentNotification) {
r0 = value2;
} else {
value = importDefault(10932) /* metro dependency 10932: InAppNotificationContainer */;
value = ((Component) => <Component notification={currentNotification} key={currentNotification.key} />)(value);
r0 = value;
}
return r0;
}
return r0;
}
global.__d(_fun83467, 10904, [31, 10905, 33, 566, 10932,
2]) /* metro module 10904, dependencies: [31, 10905, 33, 566, 10932, 2] */;
+88 -72
View File
@@ -1,12 +1,19 @@
/* Metro module 11428; source: components_native/common/RolePill.tsx; dependencies: [31, 27, 661, 33, 4501, 697, 3829, 6793, 6797, 3856, 5278, 6812, 4573, 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 ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as UserSettingsModule from '../../modules/user_settings/UserSettings.tsx'; /* Metro dependency 3829 */
import * as TextModule from '../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as PressablesModule from '../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as RoleIconUtilsModule from '../../modules/guild_boosting/native/RoleIconUtils.tsx'; /* Metro dependency 6793 */
function _fun87482(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87482, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11614:6, offset: 0x01fc0337, size: 466 bytes, params: 8, frame: 23
var object6;
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(661) /* metro dependency 661: Constants */;
ReactModule;
let value = ConstantsModule;
const env0_4 = value.EMPTY_STRING_SNOWFLAKE_ID;
const env0_5 = value.MAX_VISUAL_ROLE_LENGTH;
value = require(33) /* metro dependency 33 */;
@@ -14,79 +21,88 @@ function _fun87482(global, require, importDefault, importAll, module, exports, d
const env0_7 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object6 = {};
const object7 = {'marginRight': 4, 'marginBottom': 4};
object7.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object6.container = object7;
const object8 = {'flexDirection': 'row', 'alignItems': 'center', 'paddingHorizontal': 8, 'paddingVertical': 6};
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object = {};
const object2 = {'marginRight': 4, 'marginBottom': 4};
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object.container = object2;
const object3 = {'flexDirection': 'row', 'alignItems': 'center', 'paddingHorizontal': 8, 'paddingVertical': 6};
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object8.backgroundColor = BACKGROUND_BASE_LOWEST;
object6.pill = object8;
const object9 = {'marginRight': 8, 'borderRadius': null, 'height': 12, 'width': 12};
object9.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object3.backgroundColor = BACKGROUND_BASE_LOWEST;
object.pill = object3;
const object4 = {'marginRight': 8, 'borderRadius': null, 'height': 12, 'width': 12};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
const ICON_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.ICON_MUTED;
object9.backgroundColor = ICON_MUTED;
object6.bubble = object9;
const object10 = {'marginRight': 8, 'borderRadius': null, 'height': 12, 'width': 12};
object10.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object6.verifiedContainer = object10;
object6.roleIcon = {paddingRight: 4};
const env0_8 = Reflect.apply(createStyles, value, [object6]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/common/RolePill.tsx');
object4.backgroundColor = ICON_MUTED;
object.bubble = object4;
const object5 = {'marginRight': 8, 'borderRadius': null, 'height': 12, 'width': 12};
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object.verifiedContainer = object5;
object.roleIcon = {paddingRight: 4};
const env0_8 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('components_native/common/RolePill.tsx');
exports.default = RolePill;
}
function RolePill({role, guildId, disableInteraction, color}) { // fn#87483, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11614:708, offset: 0x01fc0509, size: 616 bytes, params: 2, frame: 33
var r18;
var r10;
var VerifiedRoleIcon;
const DeveloperMode = (UserSettingsModule).DeveloperMode;
const value3 = DeveloperMode.useSetting();
const value4 = (RoleIconUtilsModule).useRoleIcon({guildId: guildId,
roleId: role.id, size: 12});
const r11 = role.name.length > MAX_VISUAL_ROLE_LENGTH ? '' + role.name.slice(0,
MAX_VISUAL_ROLE_LENGTH) + '...' : role.name;
const r19 = color ?? role.colorString;
const guild_connections = role.tags?.guild_connections;
const styles = useStyles();
const PressableHighlight = (PressablesModule).PressableHighlight;
object = {disabled: value3 ? disableInteraction : !value3, style: styles.container, onPress: onPress_87484,
accessible: false};
if (guild_connections !== undefined) {
VerifiedRoleIcon = importDefault(6812) /* metro dependency 6812: VerifiedRoleIcon */;
var defaultImportProps = {style: styles.verifiedContainer, roleId: role.id};
r18 = guildId ?? EMPTY_STRING_SNOWFLAKE_ID;
defaultImportProps.guildId = r18;
r18 = r19 ?? undefined;
defaultImportProps.roleColor = r18;
defaultImportProps.size = 14;
defaultImportProps.displayRoleIcon = false;
r10 = <VerifiedRoleIcon {...defaultImportProps} />;
} else {
r10 = <View style={[styles.bubble, r19 != null ? {backgroundColor: r19} : {}]} />;
}
const r9 = (
value4 != null
? (
<View style={styles.roleIcon}>
{value4}
</View>
)
: null
);
const Text = (TextModule).Text;
return (
<PressableHighlight {...object}>
<View style={styles.pill}>
{r10}
{r9}
<Text variant="text-xs/semibold" color="interactive-text-active">
{r11}
</Text>
</View>
</PressableHighlight>
);
function RolePillOnPress() { // fn#87484, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11614:1101, owner: RolePill.onPress, offset: 0x01fc0771, size: 77 bytes, params: 1, frame: 15
let value = environment.__proto__;
value = require(6797) /* metro dependency 6797: ClipboardUtilsNative */;
value.copy(role.id);
value = require(3856) /* metro dependency 3856: ToastUtils */;
value.roleIdCopied(name);
}
function RolePill({role, guildId, disableInteraction, color}) { // fn#87483, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11614:708, offset: 0x01fc0509, size: 616 bytes, params: 2, frame: 33
var object2;
var r18;
var r10;
var VerifiedRoleIcon;
const DeveloperMode = (require(3829) /* metro dependency 3829: UserSettings */).DeveloperMode;
const value3 = DeveloperMode.useSetting();
const value4 = (require(6793) /* metro dependency 6793: RoleIconUtils */).useRoleIcon({guildId: guildId,
roleId: role.id, size: 12});
const r11 = role.name.length > MAX_VISUAL_ROLE_LENGTH ? '' + role.name.slice(0,
MAX_VISUAL_ROLE_LENGTH) + '...' : role.name;
const r19 = color ?? role.colorString;
const guild_connections = role.tags?.guild_connections;
const styles = useStyles();
const PressableHighlight = (require(5278) /* metro dependency 5278: Pressables */).PressableHighlight;
object2 = {disabled: value3 ? disableInteraction : !value3, style: styles.container, onPress: onPress_87484,
accessible: false};
if (guild_connections !== undefined) {
VerifiedRoleIcon = importDefault(6812) /* metro dependency 6812: VerifiedRoleIcon */;
var defaultImportProps = {style: styles.verifiedContainer, roleId: role.id};
r18 = guildId ?? EMPTY_STRING_SNOWFLAKE_ID;
defaultImportProps.guildId = r18;
r18 = r19 ?? undefined;
defaultImportProps.roleColor = r18;
defaultImportProps.size = 14;
defaultImportProps.displayRoleIcon = false;
r10 = <VerifiedRoleIcon {...defaultImportProps} />;
} else {
r10 = <View style={[styles.bubble, r19 != null ? {backgroundColor: r19} : {}]} />;
}
const r9 = value4 != null ? <View style={styles.roleIcon}>{value4}</View> : null;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<PressableHighlight {...object2}>
<View style={styles.pill}>
{r10}
{r9}
<Text variant="text-xs/semibold" color="interactive-text-active">
{r11}
</Text>
</View>
</PressableHighlight>
);
}
function RolePillOnPress() { // fn#87484, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11614:1101, owner: RolePill.onPress, offset: 0x01fc0771, size: 77 bytes, params: 1, frame: 15
let value = environment.__proto__;
value = require(6797) /* metro dependency 6797: ClipboardUtilsNative */;
value.copy(role.id);
value = require(3856) /* metro dependency 3856: ToastUtils */;
value.roleIdCopied(name);
}
global.__d(_fun87482, 11428, [31, 27, 661, 33, 4501, 697, 3829, 6793, 6797, 3856, 5278, 6812, 4573,
2]) /* metro module 11428, dependencies: [31, 27, 661, 33, 4501, 697, 3829, 6793, 6797, 3856, 5278, 6812, 4573, 2] */;
@@ -1,57 +1,64 @@
/* Metro module 6618; source: components_native/common/SafeAreaView.tsx; dependencies: [31, 27, 33, 1585, 6619, 644, 2] */
import Module00644 from '../../by-id/module-00644.js'; /* Metro dependency 644 */
import UseSafeAreaInsetsNative from '../../modules/safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import UseRefValue from '../../hooks/useRefValue.tsx'; /* Metro dependency 6619 */
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 */
function _fun52319(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#52319, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6796:6, offset: 0x01326bb0, size: 157 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/common/SafeAreaView.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/common/SafeAreaView.tsx');
exports.SafeAreaPaddingView = SafeAreaPaddingView;
}
function SafeAreaPaddingView(a0) { // fn#52320, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6796:232, offset: 0x01326c4d, size: 467 bytes, params: 2, frame: 27
var r16;
let top = a0.top;
const value = undefined;
top = !(top === value) && top;
let bottom = a0.bottom;
bottom = !(bottom === value) && bottom;
let left = a0.left;
left = !(left === value) && left;
let right = a0.right;
right = !(right === value) && right;
const style = a0.style;
const object = {'top': 0, 'bottom': 0, 'left': 0, 'right': 0, 'style': 0};
silentSetPrototypeOf(object, null, undefined);
const value6 = copyDataProperties({}, a0, object, r16);
let env0_2 = value;
const value8 = (UseSafeAreaInsetsNative)();
const value9 = env0_2.useRef(null);
const r2 = style ?? ({});
r16 = r2.paddingTop || r2.paddingVertical;
r16 = !r16 ? 0 : r16;
let r14 = r2.paddingBottom || r2.paddingVertical;
r14 = !r14 ? 0 : r14;
let r12 = r2.paddingLeft || r2.paddingHorizontal;
r12 = !r12 ? 0 : r12;
let r9 = r2.paddingRight || r2.paddingHorizontal;
r9 = !r9 ? 0 : r9;
const items2 = [r2];
items2[1] = top ? {paddingTop: value8.top + r16} : value;
items2[2] = bottom ? {paddingBottom: value8.bottom + r14} : value;
items2[3] = left ? {paddingLeft: value8.left + r12} : value;
items2[4] = right ? {paddingRight: value8.right + r9} : value;
const value14 = (UseRefValue)(value9);
const value15 = (Module00644)(items2, value14);
env0_2 = value15;
const r5 = value15 ? value14 : items2;
env0_2.useInsertionEffect(_fun52321);
return <View style={r5} {...value6} />;
function _fun52321() { // fn#52321, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6796:729, offset: 0x01326e20, size: 28 bytes, params: 1, frame: 2
if (!env0_2) {
env0_0.current = env0_1;
}
}
function SafeAreaPaddingView(a0) { // fn#52320, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6796:232, offset: 0x01326c4d, size: 467 bytes, params: 2, frame: 27
var r16;
let top = a0.top;
const value = undefined;
top = !(top === value) && top;
let bottom = a0.bottom;
bottom = !(bottom === value) && bottom;
let left = a0.left;
left = !(left === value) && left;
let right = a0.right;
right = !(right === value) && right;
const style = a0.style;
const object2 = {'top': 0, 'bottom': 0, 'left': 0, 'right': 0, 'style': 0};
silentSetPrototypeOf(object2, null, undefined);
const value6 = copyDataProperties({}, a0, object2, r16);
let env0_2 = value;
const value8 = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
const value9 = env0_2.useRef(null);
const r2 = style ?? ({});
r16 = r2.paddingTop || r2.paddingVertical;
r16 = !r16 ? 0 : r16;
let r14 = r2.paddingBottom || r2.paddingVertical;
r14 = !r14 ? 0 : r14;
let r12 = r2.paddingLeft || r2.paddingHorizontal;
r12 = !r12 ? 0 : r12;
let r9 = r2.paddingRight || r2.paddingHorizontal;
r9 = !r9 ? 0 : r9;
const items2 = [r2];
items2[1] = top ? {paddingTop: value8.top + r16} : value;
items2[2] = bottom ? {paddingBottom: value8.bottom + r14} : value;
items2[3] = left ? {paddingLeft: value8.left + r12} : value;
items2[4] = right ? {paddingRight: value8.right + r9} : value;
const value14 = (importDefault(6619) /* metro dependency 6619: useRefValue */)(value9);
const value15 = (importDefault(644) /* metro dependency 644 */)(items2, value14);
env0_2 = value15;
const r5 = value15 ? value14 : items2;
env0_2.useInsertionEffect(_fun52321);
return <View style={r5} {...value6} />;
}
function _fun52321() { // fn#52321, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6796:729, offset: 0x01326e20, size: 28 bytes, params: 1, frame: 2
if (!env0_2) {
env0_0.current = env0_1;
}
}
global.__d(_fun52319, 6618, [31, 27, 33, 1585, 6619, 644,
2]) /* metro module 6618, dependencies: [31, 27, 33, 1585, 6619, 644, 2] */;
@@ -1,92 +1,124 @@
/* Metro module 12362; source: components_native/common/SequencedLottieAnimationView.tsx; dependencies: [29, 6, 7, 15, 17, 18, 31, 27, 33, 6761, 2] */
import ClassCallCheck from '../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import ObjectWithoutProperties from '../../by-id/module-00029-ObjectWithoutProperties.js'; /* Metro dependency 29 */
import Module06761 from '../../by-id/module-06761.js'; /* Metro dependency 6761 */
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 */
function _fun94254(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#94254, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12548:6, offset: 0x020f281a, size: 300 bytes, params: 8, frame: 20
const env0_2 = ['source', 'style'];
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(29) /* metro dependency 29 */;
const env0_4 = importDefault(6) /* metro dependency 6 */;
const env0_5 = importDefault(7) /* metro dependency 7 */;
const env0_6 = importDefault(15) /* metro dependency 15 */;
const env0_7 = importDefault(17) /* metro dependency 17 */;
const env0_8 = importDefault(18) /* metro dependency 18 */;
let value = importAll(31) /* metro dependency 31 */;
const env0_9 = (require(27) /* metro dependency 27 */).View;
const env0_10 = (require(33) /* metro dependency 33 */).jsx;
let value = ReactModule;
const PureComponent = value.PureComponent;
value = _fun94258(PureComponent);
value.defaultProps = {autoPlay: true};
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/common/SequencedLottieAnimationView.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/common/SequencedLottieAnimationView.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_94255() { // fn#94255, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12548:222, offset: 0x020f2946, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_94255_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun94258(a0) { // fn#94258, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12548:421, offset: 0x020f29a8, size: 147 bytes, params: 2, frame: 16
const closure = SequencedLottieAnimationView;
env0_8(closure, a0);
return env0_5(closure, [{key: 'componentDidMount', value: function() {
this.playScene(this.props.nextScene);
}}, {key: 'componentDidUpdate', value: function() {
var nextScene = this.props.nextScene;
if (nextScene !== this.currentScene) {
this.playScene(nextScene);
function _isNativeReflectConstruct_94255() { // fn#94255, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12548:222, offset: 0x020f2946, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
}}, {key: 'playScene', value: value_94264}, {key: 'render', value: value_94265}]);
}
function SequencedLottieAnimationView(a0) { // fn#94259, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12548:433, offset: 0x020f2a3b, size: 193 bytes, params: 2, frame: 20
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_4;
binding(this, SequencedLottieAnimationView);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_7(SequencedLottieAnimationView);
binding = env1_6;
if (_isNativeReflectConstruct_94255()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_7(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
return (_isNativeReflectConstruct_94255_isNativeReflectConstruct = function() {
return !!result;
})();
}
value = binding(this, r0);
value.animationRef = null;
value.currentScene = value.props.nextScene;
value.isUnmounted = false;
value.handleComplete = handleComplete_94260;
value.handleSetRef = handleSetRef;
return value;
function _fun94258(a0) { // fn#94258, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12548:421, offset: 0x020f29a8, size: 147 bytes, params: 2, frame: 16
const SequencedLottieAnimationView2 = SequencedLottieAnimationView;
Inherits(SequencedLottieAnimationView2, a0);
return CreateClass(SequencedLottieAnimationView2, [{key: 'componentDidMount', value: function() {
this.playScene(this.props.nextScene);
}}, {key: 'componentDidUpdate', value: function() {
var nextScene = this.props.nextScene;
if (nextScene !== this.currentScene) {
this.playScene(nextScene);
}
}}, {key: 'playScene', value: value_94264}, {key: 'render', value: value_94265}]);
function SequencedLottieAnimationView(a0) { // fn#94259, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12548:433, offset: 0x020f2a3b, size: 193 bytes, params: 2, frame: 20
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_4;
binding(this, SequencedLottieAnimationView);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_7(SequencedLottieAnimationView);
binding = env1_6;
if (_isNativeReflectConstruct_94255()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_7(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
value.animationRef = null;
value.currentScene = value.props.nextScene;
value.isUnmounted = false;
value.handleComplete = handleComplete_94260;
value.handleSetRef = handleSetRef;
return value;
function SequencedLottieAnimationViewHandleComplete() { // fn#94260, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12548:790, owner: SequencedLottieAnimationView.handleComplete, offset: 0x020f2afc, size: 45 bytes, params: 1, frame: 11
const onSceneComplete = env0_0.props.onSceneComplete;
if (onSceneComplete != null) {
onSceneComplete(env0_0.currentScene);
}
}
function handleSetRef(a0) { // fn#94261, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12548:868, owner: SequencedLottieAnimationView.handleSetRef, offset: 0x020f2b29, size: 20 bytes, params: 2, frame: 2
env0_0.animationRef = a0;
}
}
function value_94265() { // fn#94265, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12548:1419, offset: 0x020f2c0d, size: 235 bytes, params: 1, frame: 21
const props = this.props;
const source = props.source;
const style = props.style;
const value = environment.__proto__;
const binding = env1_3;
const value2 = undefined;
const value3 = binding(props, env1_2);
const r10 = value2 === (typeof source !== 'object' || source.uri ? value2 : global.JSON.stringify(source)) ? value2 : {aspectRatio: source.w / source.h};
return (
<View style={[r10, style]}>
{((Component) => <Component source={source} style={[r10,
style]} {...value3} {...{['ref']: this.handleSetRef}} {...{['onAnimationFinish']: this.handleComplete}} />)(Module06761)}
</View>
);
}
}
}
function value_94264(a0) { // fn#94264, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12548:1190, offset: 0x020f2b81, size: 140 bytes, params: 2, frame: 17
@@ -111,31 +143,5 @@ function value_94264(a0) { // fn#94264, source: /ci/build/discord/discord/discor
this.currentScene = a0;
}
function value_94265() { // fn#94265, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12548:1419, offset: 0x020f2c0d, size: 235 bytes, params: 1, frame: 21
const props = this.props;
const source = props.source;
const style = props.style;
const value = environment.__proto__;
const binding = env1_3;
const value2 = undefined;
const value3 = binding(props, env1_2);
const r10 = value2 === (typeof source !== 'object' || source.uri ? value2 : global.JSON.stringify(source)) ? value2 : {aspectRatio: source.w / source.h};
return (
<View style={[r10, style]}>
{((Component) => <Component source={source} style={[r10,
style]} {...value3} {...{['ref']: this.handleSetRef}} {...{['onAnimationFinish']: this.handleComplete}} />)(importDefault(6761) /* metro dependency 6761 */)}
</View>
);
}
function SequencedLottieAnimationViewHandleComplete() { // fn#94260, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12548:790, owner: SequencedLottieAnimationView.handleComplete, offset: 0x020f2afc, size: 45 bytes, params: 1, frame: 11
const onSceneComplete = env0_0.props.onSceneComplete;
if (onSceneComplete != null) {
onSceneComplete(env0_0.currentScene);
}
}
function handleSetRef(a0) { // fn#94261, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12548:868, owner: SequencedLottieAnimationView.handleSetRef, offset: 0x020f2b29, size: 20 bytes, params: 2, frame: 2
env0_0.animationRef = a0;
}
global.__d(_fun94254, 12362, [29, 6, 7, 15, 17, 18, 31, 27, 33, 6761,
2]) /* metro module 12362, dependencies: [29, 6, 7, 15, 17, 18, 31, 27, 33, 6761, 2] */;
@@ -1,48 +1,58 @@
/* Metro module 9840; source: components_native/common/SlideoutButton.tsx; dependencies: [31, 27, 661, 33, 4501, 4000, 697, 5278, 1305, 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 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 ColorUtilsModule from '../../utils/ColorUtils.tsx'; /* Metro dependency 4000 */
import * as PressablesModule from '../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
function _fun77128(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#77128, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10026:6, offset: 0x01df2640, size: 336 bytes, params: 8, frame: 24
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 Fonts = (require(661) /* metro dependency 661: Constants */).Fonts;
let value = require(33) /* metro dependency 33 */;
ReactModule;
const Fonts = (ConstantsModule).Fonts;
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 colorUtilsModule = require(4000) /* metro dependency 4000: ColorUtils */;
const hexWithOpacity = colorUtilsModule.hexWithOpacity;
const WHITE = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE;
const hexWithOpacity = ColorUtilsModule.hexWithOpacity;
const WHITE = (Native).unsafe_rawColors.WHITE;
const PRIMARY_SEMIBOLD = Fonts.PRIMARY_SEMIBOLD;
const env0_6 = Reflect.apply(createStyles, value, [{button: {'alignSelf': 'flex-end', 'justifyContent': 'center',
'alignItems': 'center'}, buttonText: {'color': null, 'fontSize': 12, 'fontFamily': null, 'marginTop': 2,
'marginHorizontal': 2, 'textAlign': 'center', color: Reflect.apply(hexWithOpacity, colorUtilsModule, [WHITE,
'marginHorizontal': 2, 'textAlign': 'center', color: Reflect.apply(hexWithOpacity, ColorUtilsModule, [WHITE,
0.6]), fontFamily: PRIMARY_SEMIBOLD}}]);
const closure = SlideoutButton;
closure.width = 72;
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/common/SlideoutButton.tsx');
exports.default = closure;
}
const SlideoutButton2 = SlideoutButton;
SlideoutButton2.width = 72;
(FileImportTrackerModule).fileFinishedImporting('components_native/common/SlideoutButton.tsx');
exports.default = SlideoutButton2;
function SlideoutButton({onPress, color, IconComponent, title, height}) { // fn#77129, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10026:446, offset: 0x01df2790, size: 264 bytes, params: 2, frame: 26
height = height === undefined ? 60 : height;
const styles = useStyles();
const PressableOpacity = (PressablesModule).PressableOpacity;
const items2 = [styles.button];
items2[1] = {backgroundColor: color, width: 72, height: height};
const WHITE = (Native).colors.WHITE;
const iconComponent = <IconComponent color={WHITE} />;
const LegacyText = (NativeModule).LegacyText;
return (
<PressableOpacity accessibilityRole="button" onPress={onPress}>
<View style={items2}>
{iconComponent}
<LegacyText style={styles.buttonText}>
{title.toUpperCase()}
</LegacyText>
</View>
</PressableOpacity>
);
}
function SlideoutButton({onPress, color, IconComponent, title, height}) { // fn#77129, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10026:446, offset: 0x01df2790, size: 264 bytes, params: 2, frame: 26
height = height === undefined ? 60 : height;
const styles = useStyles();
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const items2 = [styles.button];
items2[1] = {backgroundColor: color, width: 72, height: height};
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
const iconComponent = <IconComponent color={WHITE} />;
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
return (
<PressableOpacity accessibilityRole="button" onPress={onPress}>
<View style={items2}>
{iconComponent}
<LegacyText style={styles.buttonText}>
{title.toUpperCase()}
</LegacyText>
</View>
</PressableOpacity>
);
}
global.__d(_fun77128, 9840, [31, 27, 661, 33, 4501, 4000, 697, 5278, 1305,
2]) /* metro module 9840, dependencies: [31, 27, 661, 33, 4501, 4000, 697, 5278, 1305, 2] */;
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
@@ -1,181 +1,192 @@
/* Metro module 9845; source: components_native/common/SwipeableFastList.tsx; dependencies: [6, 7, 15, 17, 18, 31, 33, 5394, 8140, 2] */
import ClassCallCheck from '../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import Module05394 from '../../by-id/module-05394.jsx'; /* Metro dependency 5394 */
import FastList from '../../lib/native/FastList.tsx'; /* Metro dependency 8140 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
function _fun77168(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#77168, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10031:6, offset: 0x01df3e03, size: 261 bytes, params: 8, frame: 20
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(6) /* metro dependency 6 */;
const env0_3 = importDefault(7) /* metro dependency 7 */;
const env0_4 = importDefault(15) /* metro dependency 15 */;
const env0_5 = importDefault(17) /* metro dependency 17 */;
const env0_6 = importDefault(18) /* metro dependency 18 */;
let value = importAll(31) /* metro dependency 31 */;
const env0_7 = (require(33) /* metro dependency 33 */).jsx;
let value = ReactModule;
const Component = value.Component;
value = _fun77172(Component);
value.defaultProps = {bounceFirstRowOnMount: true, renderQuickActions: function() {
return null;
}};
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/common/SwipeableFastList.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/common/SwipeableFastList.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_77169() { // fn#77169, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10031:172, offset: 0x01df3f08, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
function _isNativeReflectConstruct_77169() { // fn#77169, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10031:172, offset: 0x01df3f08, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_77169_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_77169_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun77172(a0) { // fn#77172, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10031:371, offset: 0x01df3f6a, size: 199 bytes, params: 2, frame: 16
const closure = SwipeableFastList;
env0_6(closure, a0);
return env0_3(closure, [{key: 'componentWillUnmount', value: function() {
if (this._bounceTimeout != null) {
global.clearTimeout(this._bounceTimeout);
}
}}, {key: 'bounceSwipeable', value: function(a0) {
var env0_0 = this;
var env0_1 = a0;
if (this._bounceTimeout != null) {
global.clearTimeout(this._bounceTimeout);
}
this._bounceTimeout = global.setTimeout(_fun77182, 700);
}}, {key: 'closeOpenRow', value: function() {
var property;
if (this._openRowKey != null) {
property = this._refs;
if (property[this._openRowKey] != null) {
property = this._refs;
property = property[this._openRowKey];
property.close();
function _fun77172(a0) { // fn#77172, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10031:371, offset: 0x01df3f6a, size: 199 bytes, params: 2, frame: 16
const SwipeableFastList2 = SwipeableFastList;
Inherits(SwipeableFastList2, a0);
return CreateClass(SwipeableFastList2, [{key: 'componentWillUnmount', value: function() {
if (this._bounceTimeout != null) {
global.clearTimeout(this._bounceTimeout);
}
this._openRowKey = null;
}}, {key: 'bounceSwipeable', value: function(a0) {
var env0_0 = this;
var env0_1 = a0;
if (this._bounceTimeout != null) {
global.clearTimeout(this._bounceTimeout);
}
this._bounceTimeout = global.setTimeout(_fun77182, 700);
}}, {key: 'closeOpenRow', value: function() {
var property;
if (this._openRowKey != null) {
property = this._refs;
if (property[this._openRowKey] != null) {
property = this._refs;
property = property[this._openRowKey];
property.close();
}
this._openRowKey = null;
}
}}, {key: 'handleOpen', value: function(a0) {
this.closeOpenRow();
this._openRowKey = a0;
}}, {key: 'handleClose', value: function(a0) {
if (this._openRowKey === a0) {
this._openRowKey = null;
}
}}, {key: 'render', value: value_77187}]);
function SwipeableFastList(a0) { // fn#77173, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10031:383, offset: 0x01df4031, size: 197 bytes, params: 2, frame: 20
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_2;
binding(this, SwipeableFastList);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_5(SwipeableFastList);
binding = env1_4;
if (_isNativeReflectConstruct_77169()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_5(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
value._shouldBounceFirstRowOnMount = value.props.bounceFirstRowOnMount;
value._openRowKey = null;
value._refs = {};
value._bounceTimeout = null;
value.renderRow = renderRow_77174;
value.handleScroll = handleScroll_77179;
return value;
function SwipeableFastListRenderRow(a0, a1, a2) { // fn#77174, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10031:745, owner: SwipeableFastList.renderRow, offset: 0x01df40f6, size: 222 bytes, params: 4, frame: 19
var environment;
const env0_0 = a0;
const env0_1 = a1;
const binding = env0_0;
const props = binding.props;
const env0_2 = props.renderQuickActions;
const renderItem = props.renderItem;
const env0_3 = '' + a0 + ':' + a1;
if (binding._shouldBounceFirstRowOnMount) {
env0_0._shouldBounceFirstRowOnMount = false;
}
const value = environment.__proto__.__proto__;
return ((Component) => <Component renderRightActions={renderRightActions} ref={ref_77176} overshootFriction={8} onSwipeableWillOpen={onSwipeableWillOpen} onSwipeableClose={onSwipeableClose} useNativeAnimations>{renderItem(a0,
a1, a2)}</Component>)(Module05394);
function renderRightActions() { // fn#77175, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10031:936, owner: SwipeableFastList.renderRow.renderRightActions, offset: 0x01b45986, size: 25 bytes, params: 1, frame: 13
return renderQuickActions(env0_0, require);
}
function renderRowRef(a0) { // fn#77176, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10031:951, owner: SwipeableFastList.renderRow.ref, offset: 0x01df41d4, size: 98 bytes, params: 2, frame: 14
var binding;
env1_0._refs[env0_3] = a0;
if (a0 != null && PossibleConstructorReturn) {
binding = env1_0;
binding.bounceSwipeable(a0);
if (binding.props.onBounceSwipable != null) {
env1_0.props.onBounceSwipable();
}
}
}
function onSwipeableWillOpen() { // fn#77177, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10031:1103, owner: SwipeableFastList.renderRow.onSwipeableWillOpen, offset: 0x01df4236, size: 27 bytes, params: 1, frame: 11
return env1_0.handleOpen(env0_3);
}
function onSwipeableClose() { // fn#77178, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10031:1140, owner: SwipeableFastList.renderRow.onSwipeableClose, offset: 0x01df4251, size: 27 bytes, params: 1, frame: 11
return env1_0.handleClose(env0_3);
}
}
function SwipeableFastListHandleScroll(a0) { // fn#77179, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10031:1220, owner: SwipeableFastList.handleScroll, offset: 0x01df426c, size: 48 bytes, params: 2, frame: 11
const binding = env0_0;
binding.closeOpenRow();
const onScroll = binding.props.onScroll;
if (onScroll != null) {
onScroll(a0);
}
}
}
}}, {key: 'handleOpen', value: function(a0) {
this.closeOpenRow();
this._openRowKey = a0;
}}, {key: 'handleClose', value: function(a0) {
if (this._openRowKey === a0) {
this._openRowKey = null;
function value_77181(a0) { // fn#77181, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10031:1469, offset: 0x01df42c4, size: 86 bytes, params: 2, frame: 14
const env0_1 = a0;
if (this._bounceTimeout != null) {
global.clearTimeout(this._bounceTimeout);
}
this._bounceTimeout = global.setTimeout(_fun77182, 700);
function _fun77182() { // fn#77182, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10031:1574, offset: 0x01df431a, size: 60 bytes, params: 1, frame: 14
env0_1.openRight();
env0_0._bounceTimeout = global.setTimeout(_fun77183, 400);
function _fun77183() { // fn#77183, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10031:1625, offset: 0x01df4356, size: 21 bytes, params: 1, frame: 9
env1_1.close();
}
}
}
}}, {key: 'render', value: value_77187}]);
}
function SwipeableFastList(a0) { // fn#77173, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10031:383, offset: 0x01df4031, size: 197 bytes, params: 2, frame: 20
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_2;
binding(this, SwipeableFastList);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_5(SwipeableFastList);
binding = env1_4;
if (_isNativeReflectConstruct_77169()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_5(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
value._shouldBounceFirstRowOnMount = value.props.bounceFirstRowOnMount;
value._openRowKey = null;
value._refs = {};
value._bounceTimeout = null;
value.renderRow = renderRow;
value.handleScroll = handleScroll_77179;
return value;
}
function value_77181(a0) { // fn#77181, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10031:1469, offset: 0x01df42c4, size: 86 bytes, params: 2, frame: 14
const env0_1 = a0;
if (this._bounceTimeout != null) {
global.clearTimeout(this._bounceTimeout);
}
this._bounceTimeout = global.setTimeout(_fun77182, 700);
}
function value_77187() { // fn#77187, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10031:1998, offset: 0x01df43e8, size: 84 bytes, params: 1, frame: 16
const value = environment.__proto__;
return ((Component) => <Component {...this.props} {...{['onScroll']: this.handleScroll}} {...{['renderItem']: this.renderRow}} />)(importDefault(8140) /* metro dependency 8140: FastList */);
}
function renderRow(a0, a1, a2) { // fn#77174, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10031:745, owner: SwipeableFastList.renderRow, offset: 0x01df40f6, size: 222 bytes, params: 4, frame: 19
var environment;
const env0_0 = a0;
const env0_1 = a1;
const binding = env0_0;
const props = binding.props;
const env0_2 = props.renderQuickActions;
const renderItem = props.renderItem;
const env0_3 = '' + a0 + ':' + a1;
if (binding._shouldBounceFirstRowOnMount) {
env0_0._shouldBounceFirstRowOnMount = false;
}
const value = environment.__proto__.__proto__;
return ((Component) => <Component renderRightActions={renderRightActions} ref={ref_77176} overshootFriction={8} onSwipeableWillOpen={onSwipeableWillOpen} onSwipeableClose={onSwipeableClose} useNativeAnimations>{renderItem(a0,
a1, a2)}</Component>)(importDefault(5394) /* metro dependency 5394 */);
}
function SwipeableFastListHandleScroll(a0) { // fn#77179, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10031:1220, owner: SwipeableFastList.handleScroll, offset: 0x01df426c, size: 48 bytes, params: 2, frame: 11
const binding = env0_0;
binding.closeOpenRow();
const onScroll = binding.props.onScroll;
if (onScroll != null) {
onScroll(a0);
}
}
function _fun77182() { // fn#77182, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10031:1574, offset: 0x01df431a, size: 60 bytes, params: 1, frame: 14
env0_1.openRight();
env0_0._bounceTimeout = global.setTimeout(_fun77183, 400);
}
function renderRowRef(a0) { // fn#77176, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10031:951, owner: SwipeableFastList.renderRow.ref, offset: 0x01df41d4, size: 98 bytes, params: 2, frame: 14
var binding;
env1_0._refs[env0_3] = a0;
if (a0 != null && env0_4) {
binding = env1_0;
binding.bounceSwipeable(a0);
if (binding.props.onBounceSwipable != null) {
env1_0.props.onBounceSwipable();
function value_77187() { // fn#77187, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10031:1998, offset: 0x01df43e8, size: 84 bytes, params: 1, frame: 16
const value = environment.__proto__;
return ((Component) => <Component {...this.props} {...{['onScroll']: this.handleScroll}} {...{['renderItem']: this.renderRow}} />)(FastList);
}
}
}
function onSwipeableWillOpen() { // fn#77177, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10031:1103, owner: SwipeableFastList.renderRow.onSwipeableWillOpen, offset: 0x01df4236, size: 27 bytes, params: 1, frame: 11
return env1_0.handleOpen(env0_3);
}
function onSwipeableClose() { // fn#77178, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10031:1140, owner: SwipeableFastList.renderRow.onSwipeableClose, offset: 0x01df4251, size: 27 bytes, params: 1, frame: 11
return env1_0.handleClose(env0_3);
}
function _fun77183() { // fn#77183, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10031:1625, offset: 0x01df4356, size: 21 bytes, params: 1, frame: 9
env1_1.close();
}
global.__d(_fun77168, 9845, [6, 7, 15, 17, 18, 31, 33, 5394, 8140,
2]) /* metro module 9845, dependencies: [6, 7, 15, 17, 18, 31, 33, 5394, 8140, 2] */;
+153 -125
View File
@@ -1,146 +1,174 @@
/* Metro module 9844; source: components_native/common/TabBar.tsx; dependencies: [57, 31, 27, 661, 33, 4501, 697, 5321, 1244, 2] */
import Module00057 from '../../by-id/module-00057.js'; /* Metro dependency 57 */
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 ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as Module05321Module from '../../by-id/module-05321.js'; /* Metro dependency 5321 */
function _fun77151(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#77151, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10030:6, offset: 0x01df36f9, size: 356 bytes, params: 8, frame: 22
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(57) /* metro dependency 57 */;
const env0_3 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_4 = value.View;
const env0_5 = value.TouchableWithoutFeedback;
const env0_6 = value.FlatList;
const env0_7 = (require(661) /* metro dependency 661: Constants */).NOOP;
const env0_8 = (require(33) /* metro dependency 33 */).jsx;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const BRAND_600 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BRAND_600;
const BRAND_600 = (Native).unsafe_rawColors.BRAND_600;
const env0_9 = Reflect.apply(createStyles, value, [{innerContainer: {'flexDirection': 'row',
'alignItems': 'stretch'}, tab: {'flexGrow': 1, 'flexBasis': 'auto', 'flexShrink': 0, 'alignItems': 'center',
'justifyContent': 'center', 'marginBottom': 1, 'marginHorizontal': 1, 'padding': 10, 'borderBottomWidth': 2,
'borderBottomColor': 'transparent'}, tabActive: {backgroundColor: 'rgba(0,0,0,0.1)'},
tabSelected: {borderBottomColor: BRAND_600}, container: {flex: 0}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/common/TabBar.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/common/TabBar.tsx');
exports.default = _default_77157;
}
function Tab({children, index, isSelected, tabStyle, tabStyleActive, tabStyleSelected, onSelect}) { // fn#77152, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10030:610, offset: 0x01df385d, size: 351 bytes, params: 2, frame: 26
const styles = useStyles();
const [property, property2] = env0_2(env0_3.useState(function() {
return false;
}), 2);
return (
<TouchableWithoutFeedback
accessibilityRole="tab"
onPressIn={env0_3.useCallback(_fun77154, [property2])}
onPressOut={env0_3.useCallback(_fun77155, [property2])}
onPress={env0_3.useCallback(function() {
return onSelect(index);
}, [onSelect, index])}
>
<View
style={[styles.tab, tabStyle, isSelected ? styles.tabSelected : null,
property ? styles.tabActive : null, isSelected ? tabStyleSelected : null,
property ? tabStyleActive : null]}
function Tab({children, index, isSelected, tabStyle, tabStyleActive, tabStyleSelected, onSelect}) { // fn#77152, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10030:610, offset: 0x01df385d, size: 351 bytes, params: 2, frame: 26
const styles = useStyles();
const [property, property2] = Module00057(ReactModule.useState(function() {
return false;
}), 2);
return (
<TouchableWithoutFeedback
accessibilityRole="tab"
onPressIn={ReactModule.useCallback(_fun77154, [property2])}
onPressOut={ReactModule.useCallback(_fun77155, [property2])}
onPress={ReactModule.useCallback(function() {
return onSelect(index);
}, [onSelect, index])}
>
{children}
</View>
</TouchableWithoutFeedback>
);
}
function _default_77157({initialNumTabsToRender, tabs, tabIndexSelected, tabStyle, tabStyleActive, tabStyleSelected, onSelect, containerStyle, hideHorizontalScrollbar, scrollToSelectedIndex}) { // fn#77157, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10030:1059, offset: 0x01df39e0, size: 581 bytes, params: 2, frame: 29
const env0_3 = tabStyleSelected;
hideHorizontalScrollbar = !(hideHorizontalScrollbar === undefined) && hideHorizontalScrollbar;
scrollToSelectedIndex = !(scrollToSelectedIndex === undefined) && scrollToSelectedIndex;
const styles = useStyles();
const value2 = env0_3.useRef(null);
const env0_7 = env0_3.useRef(tabIndexSelected);
env0_3.useEffect(_fun77158, [tabIndexSelected]);
const value3 = env0_3.useCallback(_fun77159, [value2, onSelect]);
const value4 = _fun77160(tabIndexSelected);
const value5 = env0_3.useCallback(function(a0, a1) {
return 'tab-' + a1;
}, []);
const value6 = env0_3.useCallback(_fun77166, [tabIndexSelected, tabStyle, tabStyleActive, tabStyleSelected,
scrollToSelectedIndex, onSelect, value3]);
const value7 = env0_3.useMemo(_fun77167, []);
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t1qXlK = (require(1244) /* metro dependency 1244: indexNative */).t.t1qXlK;
const GestureDetector = (require(5321) /* metro dependency 5321 */).GestureDetector;
return (
<View
style={styles.container}
accessibilityRole="tablist"
accessibilityLabel={Reflect.apply(string, intl, [t1qXlK])}
>
<GestureDetector gesture={value7}>
<FlatList
ref={value4}
contentContainerStyle={[containerStyle, styles.innerContainer]}
horizontal
data={tabs}
renderItem={value6}
keyExtractor={value5}
initialNumToRender={initialNumTabsToRender}
onScrollToIndexFailed={NOOP}
showsHorizontalScrollIndicator={!hideHorizontalScrollbar}
/>
</GestureDetector>
</View>
);
}
function _fun77159(a0) { // fn#77159, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10030:1346, offset: 0x01df3c3a, size: 51 bytes, params: 2, frame: 13
onSelect(a0);
const current = env0_6.current;
if (current != null) {
current.scrollToIndex({index: a0});
}
}
function _fun77160(a0) { // fn#77160, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10030:1421, offset: 0x01df3c6d, size: 97 bytes, params: 2, frame: 15
let env0_0 = a0;
env1_3.useEffect(function() {
var env0_0 = global.setTimeout(_fun77163, 500);
return _fun77164;
}, [env1_2(env1_3.useState(_fun77161), 1)[0]]);
return env0_6;
}
function _fun77166({item, index}) { // fn#77166, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10030:1703, offset: 0x01df3d5e, size: 109 bytes, params: 2, frame: 16
return (
<Tab
index={index}
isSelected={index === tabIndexSelected}
tabStyle={tabStyle}
tabStyleActive={tabStyleActive}
tabStyleSelected={tabStyleSelected}
onSelect={scrollToSelectedIndex ? env0_8 : onSelect}
>
{item}
</Tab>
);
}
function _fun77167() { // fn#77167, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10030:1861, offset: 0x01df3dcb, size: 56 bytes, params: 1, frame: 11
const value = environment.__proto__;
const Gesture = (require(5321) /* metro dependency 5321 */).Gesture;
return Gesture.Native().disallowInterruption(true);
}
function _fun77162() { // fn#77162, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10030:1483, offset: 0x01df3cce, size: 44 bytes, params: 1, frame: 14
const env0_0 = global.setTimeout(_fun77163, 500);
return _fun77164;
}
function _fun77163() { // fn#77163, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10030:1506, offset: 0x01df3cfa, size: 71 bytes, params: 1, frame: 12
let current = env2_7.current;
if (current === env1_1) {
current = env2_6.current;
if (current != null) {
current.scrollToIndex({index: env1_1, viewPosition: 1});
<View
style={[styles.tab, tabStyle, isSelected ? styles.tabSelected : null,
property ? styles.tabActive : null, isSelected ? tabStyleSelected : null,
property ? tabStyleActive : null]}
>
{children}
</View>
</TouchableWithoutFeedback>
);
function _fun77154() { // fn#77154, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10030:789, offset: 0x01df39bc, size: 18 bytes, params: 1, frame: 11
return Module00057(true);
}
function _fun77155() { // fn#77155, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10030:822, offset: 0x01df39ce, size: 18 bytes, params: 1, frame: 11
return Module00057(false);
}
}
function _default_77157({initialNumTabsToRender, tabs, tabIndexSelected, tabStyle, tabStyleActive, tabStyleSelected, onSelect, containerStyle, hideHorizontalScrollbar, scrollToSelectedIndex}) { // fn#77157, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10030:1059, offset: 0x01df39e0, size: 581 bytes, params: 2, frame: 29
const tabStyleSelected2 = tabStyleSelected;
hideHorizontalScrollbar = !(hideHorizontalScrollbar === undefined) && hideHorizontalScrollbar;
scrollToSelectedIndex = !(scrollToSelectedIndex === undefined) && scrollToSelectedIndex;
const styles = useStyles();
const value2 = tabStyleSelected2.useRef(null);
const env0_7 = tabStyleSelected2.useRef(tabIndexSelected);
tabStyleSelected2.useEffect(_fun77158, [tabIndexSelected]);
const value3 = tabStyleSelected2.useCallback(_fun77159, [value2, onSelect]);
const value4 = _fun77160(tabIndexSelected);
const value5 = tabStyleSelected2.useCallback(function(a0, a1) {
return 'tab-' + a1;
}, []);
const value6 = tabStyleSelected2.useCallback(_fun77166, [tabIndexSelected, tabStyle, tabStyleActive,
tabStyleSelected, scrollToSelectedIndex, onSelect, value3]);
const value7 = tabStyleSelected2.useMemo(_fun77167, []);
const intl = (IndexNativeModule).intl;
const string = intl.string;
const t1qXlK = (IndexNativeModule).t.t1qXlK;
const GestureDetector = (Module05321Module).GestureDetector;
return (
<View
style={styles.container}
accessibilityRole="tablist"
accessibilityLabel={Reflect.apply(string, intl, [t1qXlK])}
>
<GestureDetector gesture={value7}>
<FlatList
ref={value4}
contentContainerStyle={[containerStyle, styles.innerContainer]}
horizontal
data={tabs}
renderItem={value6}
keyExtractor={value5}
initialNumToRender={initialNumTabsToRender}
onScrollToIndexFailed={NOOP}
showsHorizontalScrollIndicator={!hideHorizontalScrollbar}
/>
</GestureDetector>
</View>
);
function _fun77158() { // fn#77158, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10030:1301, offset: 0x01df3c25, size: 21 bytes, params: 1, frame: 2
env0_7.current = tabIndexSelected;
}
function _fun77159(a0) { // fn#77159, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10030:1346, offset: 0x01df3c3a, size: 51 bytes, params: 2, frame: 13
onSelect(a0);
const current = env0_6.current;
if (current != null) {
current.scrollToIndex({index: a0});
}
}
function _fun77160(a0) { // fn#77160, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10030:1421, offset: 0x01df3c6d, size: 97 bytes, params: 2, frame: 15
let env0_0 = a0;
env1_3.useEffect(function() {
var env0_0 = global.setTimeout(_fun77163, 500);
return _fun77164;
}, [env1_2(env1_3.useState(_fun77161), 1)[0]]);
return env0_6;
function _fun77161() { // fn#77161, offset: 0x00c36f09, size: 9 bytes, params: 1, frame: 1
return env0_0;
}
function _fun77162() { // fn#77162, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10030:1483, offset: 0x01df3cce, size: 44 bytes, params: 1, frame: 14
const env0_0 = global.setTimeout(_fun77163, 500);
return _fun77164;
function _fun77163() { // fn#77163, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10030:1506, offset: 0x01df3cfa, size: 71 bytes, params: 1, frame: 12
let current = env2_7.current;
if (current === env1_1) {
current = env2_6.current;
if (current != null) {
current.scrollToIndex({index: env1_1, viewPosition: 1});
}
}
}
function _fun77164() { // fn#77164, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10030:1610, offset: 0x00e59c84, size: 24 bytes, params: 1, frame: 11
global.clearTimeout(env0_0);
}
}
}
function _fun77166({item, index}) { // fn#77166, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10030:1703, offset: 0x01df3d5e, size: 109 bytes, params: 2, frame: 16
return (
<Tab
index={index}
isSelected={index === tabIndexSelected}
tabStyle={tabStyle}
tabStyleActive={tabStyleActive}
tabStyleSelected={tabStyleSelected}
onSelect={scrollToSelectedIndex ? JsxRuntimeModule.jsx : onSelect}
>
{item}
</Tab>
);
}
function _fun77167() { // fn#77167, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10030:1861, offset: 0x01df3dcb, size: 56 bytes, params: 1, frame: 11
const value = environment.__proto__;
const Gesture = (Module05321Module).Gesture;
return Gesture.Native().disallowInterruption(true);
}
}
}
global.__d(_fun77151, 9844, [57, 31, 27, 661, 33, 4501, 697, 5321, 1244,
2]) /* metro module 9844, dependencies: [57, 31, 27, 661, 33, 4501, 697, 5321, 1244, 2] */;
@@ -1,57 +1,70 @@
/* Metro module 11847; source: components_native/common/TouchableBackground.tsx; dependencies: [57, 31, 27, 33, 4501, 697, 2] */
import Module00057 from '../../by-id/module-00057.js'; /* Metro dependency 57 */
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 */
function _fun90774(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90774, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12033:6, offset: 0x020451ab, size: 238 bytes, params: 8, frame: 21
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(57) /* metro dependency 57 */;
const env0_1 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_2 = value.View;
const env0_3 = value.Pressable;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const INTERACTIVE_BACKGROUND_ACTIVE = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_BACKGROUND_ACTIVE;
const INTERACTIVE_BACKGROUND_ACTIVE = (Native).colors.INTERACTIVE_BACKGROUND_ACTIVE;
const env0_5 = Reflect.apply(createStyles, value, [{default: {backgroundColor: INTERACTIVE_BACKGROUND_ACTIVE}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/common/TouchableBackground.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/common/TouchableBackground.tsx');
exports.default = TouchableBackground;
}
function TouchableBackground(a0) { // fn#90775, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12033:355, offset: 0x02045299, size: 320 bytes, params: 2, frame: 27
const activeBackgroundColor = a0.activeBackgroundColor;
const pressableStyle = a0.pressableStyle;
const style = a0.style;
const children = a0.children;
const onPressIn = a0.onPressIn;
const onPressIn2 = onPressIn;
const onPressOut = a0.onPressOut;
const onPressOut2 = onPressOut;
const object = {'activeBackgroundColor': 0, 'pressableStyle': 0, 'style': 0, 'children': 0, 'onPressIn': 0,
'onPressOut': 0};
silentSetPrototypeOf(object, null, undefined);
const value = copyDataProperties({}, a0, object, undefined);
const styles = useStyles();
const binding = onPressOut2;
const [property, env0_2] = onPressIn2(binding.useState(false), 2);
return (
<Pressable
accessibilityRole="button"
style={pressableStyle}
{...value}
{...{['onPressIn']: binding.useCallback(_fun90776, [onPressIn])}}
{...{['onPressOut']: binding.useCallback(_fun90777, [onPressOut])}}
>
<View style={[style,
property && ({backgroundColor: activeBackgroundColor ?? styles.default.backgroundColor})]}>
{children}
</View>
</Pressable>
);
function _fun90776(a0) { // fn#90776, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12033:544, offset: 0x01e390c7, size: 40 bytes, params: 2, frame: 12
env0_2(true);
if (onPressIn != null) {
onPressIn(a0);
}
}
function TouchableBackground(a0) { // fn#90775, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12033:355, offset: 0x02045299, size: 320 bytes, params: 2, frame: 27
const activeBackgroundColor = a0.activeBackgroundColor;
const pressableStyle = a0.pressableStyle;
const style = a0.style;
const children = a0.children;
const onPressIn = a0.onPressIn;
const env0_0 = onPressIn;
const onPressOut = a0.onPressOut;
const env0_1 = onPressOut;
const object2 = {'activeBackgroundColor': 0, 'pressableStyle': 0, 'style': 0, 'children': 0, 'onPressIn': 0,
'onPressOut': 0};
silentSetPrototypeOf(object2, null, undefined);
const value = copyDataProperties({}, a0, object2, undefined);
const styles = useStyles();
const binding = env0_1;
const [property, env0_2] = env0_0(binding.useState(false), 2);
return (
<Pressable
accessibilityRole="button"
style={pressableStyle}
{...value}
{...{['onPressIn']: binding.useCallback(_fun90776, [onPressIn])}}
{...{['onPressOut']: binding.useCallback(_fun90777, [onPressOut])}}
>
<View style={[style,
property && ({backgroundColor: activeBackgroundColor ?? styles.default.backgroundColor})]}>
{children}
</View>
</Pressable>
);
}
function _fun90777(a0) { // fn#90777, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12033:592, offset: 0x020453d9, size: 42 bytes, params: 2, frame: 12
if (onPressOut != null) {
onPressOut(a0);
}
env0_2(false);
}
function _fun90777(a0) { // fn#90777, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12033:592, offset: 0x020453d9, size: 42 bytes, params: 2, frame: 12
if (onPressOut != null) {
onPressOut(a0);
}
env0_2(false);
}
global.__d(_fun90774, 11847, [57, 31, 27, 33, 4501, 697,
2]) /* metro module 11847, dependencies: [57, 31, 27, 33, 4501, 697, 2] */;
+220 -203
View File
@@ -1,152 +1,223 @@
/* Metro module 14450; source: components_native/common/UnreadBars.tsx; dependencies: [6, 7, 15, 17, 18, 31, 27, 4502, 661, 33, 4501, 6597, 697, 4000, 4081, 4082, 1305, 1244, 3868, 566, 11206, 2] */
import ClassCallCheck from '../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import HapticFeedbackTypes from '../../modules/haptics/HapticFeedbackTypes.tsx'; /* Metro dependency 4082 */
import AccessibilityStore from '../../modules/a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */
import TextStyles from '../../modules/rebrand/native/TextStyles.tsx'; /* Metro dependency 6597 */
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 IndexNativeModule from '../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as NativeModule from '../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as NativeModule2 from '../../external/discord_common/js/packages/design/native.tsx'; /* Metro dependency 3868 */
import * as ColorUtilsModule from '../../utils/ColorUtils.tsx'; /* Metro dependency 4000 */
import * as HapticUtilsNativeModule from '../../modules/haptics/HapticUtils.native.tsx'; /* Metro dependency 4081 */
import * as CreateStylesModule from '../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TransitionGroupModule from '../../external/discord_common/js/packages/transition-group/TransitionGroup.tsx'; /* Metro dependency 11206 */
function _fun109356(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#109356, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14647:6, offset: 0x02348365, size: 636 bytes, params: 8, frame: 28
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_9 = value2.View;
const env0_10 = value2.Animated;
const env0_11 = value2.TouchableWithoutFeedback;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const Fonts = (require(661) /* metro dependency 661: Constants */).Fonts;
const value3 = require(33) /* metro dependency 33 */;
const env0_13 = value3.jsx;
const env0_14 = value3.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createLegacyClassComponentStyles = createStylesModule.createLegacyClassComponentStyles;
object3 = {};
const object5 = {};
const textStyles = importDefault(6597) /* metro dependency 6597: TextStyles */;
let value = ReactModule;
const Fonts = (ConstantsModule).Fonts;
const createLegacyClassComponentStyles = CreateStylesModule.createLegacyClassComponentStyles;
object = {};
const object2 = {};
const DISPLAY_SEMIBOLD = Fonts.DISPLAY_SEMIBOLD;
const WHITE = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE;
copyDataProperties(object5, textStyles(DISPLAY_SEMIBOLD, WHITE, 12, {uppercase: true}), 12);
object3.unreadText = object5;
const object6 = {'margin': 8, 'height': 24, 'justifyContent': 'center', 'alignItems': 'center'};
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
const colorUtilsModule = require(4000) /* metro dependency 4000: ColorUtils */;
let hexWithOpacity = colorUtilsModule.hexWithOpacity;
copyDataProperties(object2, TextStyles(DISPLAY_SEMIBOLD, WHITE, 12, {uppercase: true}), 12);
object.unreadText = object2;
const object4 = {'margin': 8, 'height': 24, 'justifyContent': 'center', 'alignItems': 'center'};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
let hexWithOpacity = ColorUtilsModule.hexWithOpacity;
const PRIMARY_400 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_400;
object6.backgroundColor = Reflect.apply(hexWithOpacity, colorUtilsModule, [PRIMARY_400, 0.9]);
object3.unread = object6;
const value7 = colorUtilsModule;
hexWithOpacity = value7.hexWithOpacity;
object4.backgroundColor = Reflect.apply(hexWithOpacity, ColorUtilsModule, [PRIMARY_400, 0.9]);
object.unread = object4;
hexWithOpacity = ColorUtilsModule.hexWithOpacity;
const RED_400 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.RED_400;
object3.mention = {backgroundColor: Reflect.apply(hexWithOpacity, value7, [RED_400, 0.9])};
const env0_15 = Reflect.apply(createLegacyClassComponentStyles, createStylesModule, [object3]);
object.mention = {backgroundColor: Reflect.apply(hexWithOpacity, ColorUtilsModule, [RED_400, 0.9])};
const env0_15 = Reflect.apply(createLegacyClassComponentStyles, CreateStylesModule, [object]);
const PureComponent = value.PureComponent;
value = _fun109360(PureComponent);
value.defaultProps = {bottom: false};
const ThemeContext = (require(3868) /* metro dependency 3868: native */).ThemeContext;
const ThemeContext = (NativeModule2).ThemeContext;
value.contextType = ThemeContext;
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/common/UnreadBars.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/common/UnreadBars.tsx');
exports.default = UnreadBars;
}
function _isNativeReflectConstruct_109357() { // fn#109357, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14647:272, offset: 0x023485e1, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_109357_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _isNativeReflectConstruct_109357() { // fn#109357, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14647:272, offset: 0x023485e1, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
function _fun109360(a0) { // fn#109360, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14647:886, offset: 0x02348643, size: 199 bytes, params: 2, frame: 16
const UnreadBar2 = UnreadBar;
Inherits(UnreadBar2, a0);
return CreateClass(UnreadBar2, [{key: 'componentWillEnter', value: function(a0) {
this.show(a0);
}}, {key: 'componentWillLeave', value: function(a0) {
this.hide(a0);
}}, {key: 'show', value: value_109367}, {key: 'hide', value: value_109368}, {key: 'getAnimatedStyle',
value: value_109369}, {key: 'render', value: value_109370}]);
function UnreadBar(a0) { // fn#109361, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14647:898, offset: 0x0234870a, size: 224 bytes, params: 2, frame: 22
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_3;
binding(this, UnreadBar);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_6(UnreadBar);
binding = env1_5;
if (_isNativeReflectConstruct_109357()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_6(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
value.state = {active: false};
const Value = Animated.Value;
const value4 = Object.create(Value.prototype, {constructor: {value: Value}});
const value5 = new Value(0);
value.animation = value5 instanceof Object ? value5 : value4;
value.handlePress = handlePress_109362;
value.handlePressIn = handlePressIn;
value.handlePressOut = handlePressOut;
return value;
function UnreadBarHandlePress() { // fn#109362, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14647:1172, owner: UnreadBar.handlePress, offset: 0x023487ea, size: 97 bytes, params: 1, frame: 17
const binding = env0_0;
const {item, onPress} = binding.props;
const triggerHapticFeedback = HapticUtilsNativeModule.triggerHapticFeedback;
const IMPACT_LIGHT = (HapticFeedbackTypes).IMPACT_LIGHT;
Reflect.apply(triggerHapticFeedback, HapticUtilsNativeModule, [IMPACT_LIGHT]);
binding.hide();
onPress(item);
}
function handlePressIn() { // fn#109363, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14647:1297, owner: UnreadBar.handlePressIn, offset: 0x0234884b, size: 31 bytes, params: 1, frame: 12
env0_0.setState({active: true});
}
function handlePressOut() { // fn#109364, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14647:1344, owner: UnreadBar.handlePressOut, offset: 0x02194751, size: 31 bytes, params: 1, frame: 12
env0_0.setState({active: false});
}
}
function value_109367(a0) { // fn#109367, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14647:1547, offset: 0x02348894, size: 59 bytes, params: 2, frame: 13
const value = environment.__proto__;
Animated.spring(this.animation, {'toValue': 1, 'friction': 15, 'tension': 250, 'useNativeDriver': true}).start(a0);
}
function value_109368(a0) { // fn#109368, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14647:1668, offset: 0x023488cf, size: 59 bytes, params: 2, frame: 13
const value = environment.__proto__;
Animated.spring(this.animation, {'toValue': 0, 'friction': 15, 'tension': 250, 'useNativeDriver': true}).start(a0);
}
function value_109370() { // fn#109370, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14647:2240, offset: 0x02348a40, size: 447 bytes, params: 1, frame: 28
const value = environment.__proto__;
const binding = env1_15;
const context = this.context;
const value2 = undefined;
const value3 = binding(context);
const {compact, item} = this.props;
const mention2 = item.mention;
const section = item.section;
const handlePress = this.handlePress;
const handlePressIn = this.handlePressIn;
const handlePressOut = this.handlePressOut;
const View2 = Animated.View;
const view2Props = {style: this.getAnimatedStyle(),
nativeID: 'unread-bar-animated-view-' + mention2 + '-' + section};
const items2 = [value3.unread];
items2[1] = mention2 ? value3.mention : value2;
const LegacyText = (NativeModule).LegacyText;
const unreadText = value3.unreadText;
const intl = (IndexNativeModule).intl;
const string = intl.string;
const t = (IndexNativeModule).t;
return (
<TouchableWithoutFeedback
accessibilityRole="button"
onPress={handlePress}
onPressIn={handlePressIn}
onPressOut={handlePressOut}
testID={'unread-bar-touchable-' + mention2 + '-' + section}
>
<View2 {...view2Props}>
<View style={items2} nativeID={'unread-bar-view-' + mention2 + '-' + section}>
<LegacyText style={unreadText} maxFontSizeMultiplier={1.5}>
{compact ? Reflect.apply(string, intl, [t.y2b7CA]) : mention2 ? Reflect.apply(string, intl,
[t['8zH0LJ']]) : Reflect.apply(string, intl, [t.FCRiT3])}
</LegacyText>
</View>
</View2>
</TouchableWithoutFeedback>
);
}
}
function UnreadBars({scrollToLocation, beforeItem, afterItem, compact, contentInset = {'top': 0, 'left': 0, 'right': 0, 'bottom': 0}}) { // fn#109371, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14647:3068, offset: 0x02348bff, size: 306 bytes, params: 2, frame: 27
compact = !(compact === undefined) && compact;
const closure = function({section, row}) {
scrollToLocation({section: section, item: row, animated: true});
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
const TransitionGroup = (TransitionGroupModule).TransitionGroup;
const Fragment = env0_8.Fragment;
return (
<TransitionGroup component={Fragment}>
{
beforeItem != null
? ((Component) => <Component compact={compact} item={beforeItem} onPress={closure} contentInset={contentInset} useReducedMotion={useReducedMotion} key="BEFORE" />)(env0_16)
: null
}
{
afterItem != null
? ((Component) => <Component compact={compact} item={afterItem} onPress={closure} contentInset={contentInset} bottom useReducedMotion={useReducedMotion} key="AFTER" />)(env0_16)
: null
}
</TransitionGroup>
);
}
return (_isNativeReflectConstruct_109357_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun109360(a0) { // fn#109360, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14647:886, offset: 0x02348643, size: 199 bytes, params: 2, frame: 16
const closure = UnreadBar;
env0_7(closure, a0);
return env0_4(closure, [{key: 'componentWillEnter', value: function(a0) {
this.show(a0);
}}, {key: 'componentWillLeave', value: function(a0) {
this.hide(a0);
}}, {key: 'show', value: value_109367}, {key: 'hide', value: value_109368}, {key: 'getAnimatedStyle',
value: value_109369}, {key: 'render', value: value_109370}]);
}
function UnreadBars({scrollToLocation, beforeItem, afterItem, compact, contentInset = {'top': 0, 'left': 0, 'right': 0, 'bottom': 0}}) { // fn#109371, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14647:3068, offset: 0x02348bff, size: 306 bytes, params: 2, frame: 27
compact = !(compact === undefined) && compact;
const closure = function({section, row}) {
scrollToLocation({section: section, item: row, animated: true});
};
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
const TransitionGroup = (require(11206) /* metro dependency 11206: TransitionGroup */).TransitionGroup;
const Fragment = env0_8.Fragment;
return (
<TransitionGroup component={Fragment}>
{beforeItem != null ? ((Component) => <Component compact={compact} item={beforeItem} onPress={closure} contentInset={contentInset} useReducedMotion={useReducedMotion} key="BEFORE" />)(env0_16) : null}
{afterItem != null ? ((Component) => <Component compact={compact} item={afterItem} onPress={closure} contentInset={contentInset} bottom useReducedMotion={useReducedMotion} key="AFTER" />)(env0_16) : null}
</TransitionGroup>
);
}
function UnreadBar(a0) { // fn#109361, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14647:898, offset: 0x0234870a, size: 224 bytes, params: 2, frame: 22
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_3;
binding(this, UnreadBar);
const items = [];
arraySpread(items, value, 0, items);
value = env1_6(UnreadBar);
binding = env1_5;
if (_isNativeReflectConstruct_109357()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items, env1_6(this).constructor);
r0 = value;
} else {
value = value.apply(this, items);
r0 = value;
}
value = binding(this, r0);
value.state = {active: false};
const Value = Animated.Value;
const value4 = Object.create(Value.prototype, {constructor: {value: Value}});
const value5 = new Value(0);
value.animation = value5 instanceof Object ? value5 : value4;
value.handlePress = handlePress_109362;
value.handlePressIn = handlePressIn;
value.handlePressOut = handlePressOut;
return value;
}
function value_109367(a0) { // fn#109367, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14647:1547, offset: 0x02348894, size: 59 bytes, params: 2, frame: 13
const value = environment.__proto__;
Animated.spring(this.animation, {'toValue': 1, 'friction': 15, 'tension': 250, 'useNativeDriver': true}).start(a0);
}
function value_109368(a0) { // fn#109368, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14647:1668, offset: 0x023488cf, size: 59 bytes, params: 2, frame: 13
const value = environment.__proto__;
Animated.spring(this.animation, {'toValue': 0, 'friction': 15, 'tension': 250, 'useNativeDriver': true}).start(a0);
}
function value_109369() { // fn#109369, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14647:1801, offset: 0x0234890a, size: 310 bytes, params: 1, frame: 21
@@ -154,17 +225,17 @@ function value_109369() { // fn#109369, source: /ci/build/discord/discord/discor
var r0;
var top;
var value4;
var object3;
var object;
var animation;
var object5;
var object2;
const {bottom, contentInset, useReducedMotion} = this.props;
const active = this.state.active;
const object6 = {position: 'absolute'};
const object4 = {position: 'absolute'};
const left = contentInset.left;
const value = 0;
let r1 = left ?? value;
object6.left = r1;
object6.right = contentInset.right ?? value;
object4.left = r1;
object4.right = contentInset.right ?? value;
const r4 = bottom ? 'bottom' : 'top';
if (bottom) {
r1 = contentInset.bottom ?? value;
@@ -174,79 +245,25 @@ function value_109369() { // fn#109369, source: /ci/build/discord/discord/discor
r1 = value4 ? top : value;
r11 = value4;
}
object6[r4] = r1;
object4[r4] = r1;
if (useReducedMotion) {
object5 = {};
copyDataProperties(object5, object6, r11);
object5['opacity'] = this.animation;
r0 = object5;
object2 = {};
copyDataProperties(object2, object4, r11);
object2['opacity'] = this.animation;
r0 = object2;
} else {
object3 = {};
copyDataProperties(object3, object6, r11);
object = {};
copyDataProperties(object, object4, r11);
animation = this.animation;
object3['opacity'] = animation;
object['opacity'] = animation;
animation = this.animation;
object3['transform'] = [{translateY: animation.interpolate({inputRange: [0, 1], outputRange: [bottom ? 72 : -72,
object['transform'] = [{translateY: animation.interpolate({inputRange: [0, 1], outputRange: [bottom ? 72 : -72,
active ? 1 : value]})}];
r0 = object3;
r0 = object;
}
return r0;
}
function value_109370() { // fn#109370, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14647:2240, offset: 0x02348a40, size: 447 bytes, params: 1, frame: 28
const value = environment.__proto__;
const binding = env1_15;
const context = this.context;
const value2 = undefined;
const value3 = binding(context);
const {compact, item} = this.props;
const mention2 = item.mention;
const section = item.section;
const handlePress = this.handlePress;
const handlePressIn = this.handlePressIn;
const handlePressOut = this.handlePressOut;
const View2 = Animated.View;
const view2Props = {style: this.getAnimatedStyle(),
nativeID: 'unread-bar-animated-view-' + mention2 + '-' + section};
const items2 = [value3.unread];
items2[1] = mention2 ? value3.mention : value2;
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
const unreadText = value3.unreadText;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
return (
<TouchableWithoutFeedback
accessibilityRole="button"
onPress={handlePress}
onPressIn={handlePressIn}
onPressOut={handlePressOut}
testID={'unread-bar-touchable-' + mention2 + '-' + section}
>
<View2 {...view2Props}>
<View style={items2} nativeID={'unread-bar-view-' + mention2 + '-' + section}>
<LegacyText style={unreadText} maxFontSizeMultiplier={1.5}>
{compact ? Reflect.apply(string, intl, [t.y2b7CA]) : mention2 ? Reflect.apply(string, intl,
[t['8zH0LJ']]) : Reflect.apply(string, intl, [t.FCRiT3])}
</LegacyText>
</View>
</View2>
</TouchableWithoutFeedback>
);
}
function UnreadBarHandlePress() { // fn#109362, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14647:1172, owner: UnreadBar.handlePress, offset: 0x023487ea, size: 97 bytes, params: 1, frame: 17
const binding = env0_0;
const {item, onPress} = binding.props;
const hapticUtilsNativeModule = require(4081) /* metro dependency 4081: HapticUtilsNative */;
const triggerHapticFeedback = hapticUtilsNativeModule.triggerHapticFeedback;
const IMPACT_LIGHT = (importDefault(4082) /* metro dependency 4082: HapticFeedbackTypes */).IMPACT_LIGHT;
Reflect.apply(triggerHapticFeedback, hapticUtilsNativeModule, [IMPACT_LIGHT]);
binding.hide();
onPress(item);
}
function handlePressIn() { // fn#109363, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14647:1297, owner: UnreadBar.handlePressIn, offset: 0x0234884b, size: 31 bytes, params: 1, frame: 12
env0_0.setState({active: true});
}
global.__d(_fun109356, 14450, [6, 7, 15, 17, 18, 31, 27, 4502, 661, 33, 4501, 6597, 697, 4000, 4081, 4082, 1305,
1244, 3868, 566, 11206,
2]) /* metro module 14450, dependencies: [6, 7, 15, 17, 18, 31, 27, 4502, 661, 33, 4501, 6597, 697, 4000, 4081, 4082, 1305, 1244, 3868, 566, 11206, 2] */;
@@ -1,84 +1,107 @@
/* Metro module 13708; source: components_native/common/UntouchableAlert.tsx; dependencies: [6, 7, 15, 17, 18, 31, 27, 33, 4501, 5461, 3868, 2] */
import ClassCallCheck from '../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
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 '../../external/discord_common/js/packages/design/native.tsx'; /* Metro dependency 3868 */
import * as CreateStylesModule from '../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
function _fun104757(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104757, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13905:6, offset: 0x0229fda6, size: 328 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(6) /* metro dependency 6 */;
const env0_3 = importDefault(7) /* metro dependency 7 */;
const env0_4 = importDefault(15) /* metro dependency 15 */;
const env0_5 = importDefault(17) /* metro dependency 17 */;
const env0_6 = importDefault(18) /* metro dependency 18 */;
let value = importAll(31) /* metro dependency 31 */;
const env0_7 = (require(27) /* metro dependency 27 */).View;
const env0_8 = (require(33) /* metro dependency 33 */).jsx;
const env0_9 = (require(4501) /* metro dependency 4501: createStyles */).createLegacyClassComponentStyles({container: {'flex': 1,
let value = ReactModule;
const env0_9 = (CreateStylesModule).createLegacyClassComponentStyles({container: {'flex': 1,
'alignItems': 'center', 'justifyContent': 'center'}});
const PureComponent = value.PureComponent;
value = _fun104761(PureComponent);
const ThemeContext = (require(3868) /* metro dependency 3868: native */).ThemeContext;
const ThemeContext = (NativeModule).ThemeContext;
value.contextType = ThemeContext;
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/common/UntouchableAlert.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/common/UntouchableAlert.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_104758() { // fn#104758, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13905:187, offset: 0x0229feee, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
function _isNativeReflectConstruct_104758() { // fn#104758, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13905:187, offset: 0x0229feee, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_104758_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_104758_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun104761(a0) { // fn#104761, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13905:495, offset: 0x0229ff50, size: 147 bytes, params: 2, frame: 16
const closure = UntouchableAlert;
env0_6(closure, a0);
return env0_3(closure, [{key: 'componentDidMount', value: function() {
if (!this.props.loading) {
this.closeAlert();
function _fun104761(a0) { // fn#104761, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13905:495, offset: 0x0229ff50, size: 147 bytes, params: 2, frame: 16
const UntouchableAlert2 = UntouchableAlert;
Inherits(UntouchableAlert2, a0);
return CreateClass(UntouchableAlert2, [{key: 'componentDidMount', value: function() {
if (!this.props.loading) {
this.closeAlert();
}
}}, {key: 'componentDidUpdate', value: function(a0) {
var loading = this.props.loading;
if (!(a0.loading === loading || loading)) {
this.closeAlert();
}
}}, {key: 'closeAlert', value: function() {
var env0_0 = this;
global.setImmediate(_fun104766);
}}, {key: 'render', value: value_104767}]);
function UntouchableAlert() { // fn#104762, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13905:507, offset: 0x00ec62ac, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_2(this, UntouchableAlert);
const value3 = env1_5(UntouchableAlert);
return env1_4(this, _isNativeReflectConstruct_104758() ? global.Reflect.construct(value3, arguments,
env1_5(this).constructor) : value3.apply(this, arguments));
}
}}, {key: 'componentDidUpdate', value: function(a0) {
var loading = this.props.loading;
if (!(a0.loading === loading || loading)) {
this.closeAlert();
function value_104765() { // fn#104765, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13905:994, offset: 0x022a0034, size: 33 bytes, params: 1, frame: 11
global.setImmediate(_fun104766);
function _fun104766() { // fn#104766, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13905:1019, offset: 0x022a0055, size: 24 bytes, params: 1, frame: 9
return env0_0.props.onClose();
}
}
}}, {key: 'closeAlert', value: function() {
var env0_0 = this;
global.setImmediate(_fun104766);
}}, {key: 'render', value: value_104767}]);
}
function value_104765() { // fn#104765, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13905:994, offset: 0x022a0034, size: 33 bytes, params: 1, frame: 11
global.setImmediate(_fun104766);
}
function value_104767() { // fn#104767, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13905:1068, offset: 0x022a006d, size: 103 bytes, params: 1, frame: 17
const value = environment.__proto__;
return (
this.props.loading
? (
<View style={env1_9(this.context).container}>
{((ActivityIndicator) => <ActivityIndicator />)((require(5461) /* metro dependency 5461: ActivityIndicatorNative */).ActivityIndicator)}
</View>
)
: null
);
}
function value_104767() { // fn#104767, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13905:1068, offset: 0x022a006d, size: 103 bytes, params: 1, frame: 17
const value = environment.__proto__;
return this.props.loading ? <View style={env1_9(this.context).container}>{((ActivityIndicator) => <ActivityIndicator />)((require(5461) /* metro dependency 5461: ActivityIndicatorNative */).ActivityIndicator)}</View> : null;
}
}
function _fun104766() { // fn#104766, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13905:1019, offset: 0x022a0055, size: 24 bytes, params: 1, frame: 9
return env0_0.props.onClose();
}
global.__d(_fun104757, 13708, [6, 7, 15, 17, 18, 31, 27, 33, 4501, 5461, 3868,
2]) /* metro module 13708, dependencies: [6, 7, 15, 17, 18, 31, 27, 33, 4501, 5461, 3868, 2] */;
@@ -1,270 +1,284 @@
/* Metro module 10881; source: components_native/common/UserSummaryItem.tsx; dependencies: [31, 27, 1945, 33, 4501, 697, 1305, 566, 1423, 4617, 1244, 4573, 2] */
import Native from '../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import GuildMemberStore from '../../stores/GuildMemberStore.tsx'; /* Metro dependency 1945 */
import NicknameUtils from '../../utils/NicknameUtils.tsx'; /* Metro dependency 4617 */
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 CreateStylesModule from '../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
function _fun83354(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83354, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11067:6, offset: 0x01f165fa, size: 379 bytes, params: 8, frame: 22
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {};
object2.container = {flexDirection: 'row'};
object2.names = {'marginStart': 4, 'paddingRight': 1};
const TEXT_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_SUBTLE;
object2.namesLegacy = {'marginStart': 4, 'paddingRight': 1, color: TEXT_SUBTLE};
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object2.plusCountContainer = {'backgroundColor': null, 'marginStart': 2, 'alignItems': 'center',
ReactModule;
const createStyles = CreateStylesModule.createStyles;
object = {};
object.container = {flexDirection: 'row'};
object.names = {'marginStart': 4, 'paddingRight': 1};
const TEXT_SUBTLE = (Native).colors.TEXT_SUBTLE;
object.namesLegacy = {'marginStart': 4, 'paddingRight': 1, color: TEXT_SUBTLE};
const BACKGROUND_BASE_LOWEST = (Native).colors.BACKGROUND_BASE_LOWEST;
object.plusCountContainer = {'backgroundColor': null, 'marginStart': 2, 'alignItems': 'center',
backgroundColor: BACKGROUND_BASE_LOWEST};
object2.cutout = {marginRight: -4};
const env0_6 = Reflect.apply(createStyles, createStylesModule, [object2]);
object2 = {};
const CutoutDirection = (require(1305) /* metro dependency 1305: native */).CutoutDirection;
object.cutout = {marginRight: -4};
const env0_6 = Reflect.apply(createStyles, CreateStylesModule, [object]);
object = {};
const CutoutDirection = (NativeModule).CutoutDirection;
const RIGHT = CutoutDirection.RIGHT;
object2.direction = RIGHT;
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/common/UserSummaryItem.tsx');
object.direction = RIGHT;
(FileImportTrackerModule).fileFinishedImporting('components_native/common/UserSummaryItem.tsx');
exports.default = UserSummaryItem;
}
function UserSummaryItem({style, namesStyle, namesVariant, max, users, renderedUsers, withNames, channelId, guildId, avatarSize, withPlusCount, cutout, cutoutStyle}) { // fn#83355, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11067:584, offset: 0x01f16775, size: 990 bytes, params: 2, frame: 32
var environment;
var r1;
var r5;
var r4;
var r13;
var r15;
var value;
var AvatarSizes;
var XXSMALL;
var binding;
var value4;
var length2;
var value6;
var intl;
var formatToPlainString;
var t;
var GhkJ21;
var length3;
var value7;
var HermesInternal;
var concat;
var value8;
var push;
var jsxRuntimeEnv0_5Binding;
var LegacyText;
var namesLegacy;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
var names;
var pop;
var value9;
var AVATAR_SIZE_MAP;
var property;
var object;
var plusCountContainer;
reducibleJoin2: while (true) {
if (max !== undefined) {
function UserSummaryItem({style, namesStyle, namesVariant, max, users, renderedUsers, withNames, channelId, guildId, avatarSize, withPlusCount, cutout, cutoutStyle}) { // fn#83355, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11067:584, offset: 0x01f16775, size: 990 bytes, params: 2, frame: 32
var environment;
var r1;
var r5;
var r4;
var r13;
var r15;
var value;
var AvatarSizes;
var XXSMALL;
var binding;
var value4;
var length2;
var value6;
var intl;
var formatToPlainString;
var t;
var GhkJ21;
var length3;
var value7;
var HermesInternal;
var concat;
var value8;
var push;
var jsxRuntimeEnv0_5Binding;
var LegacyText;
var namesLegacy;
const Text = (TextModule).Text;
var names;
var pop;
var value9;
var AVATAR_SIZE_MAP;
var property;
var object2;
var plusCountContainer;
reducibleJoin2: while (true) {
if (max !== undefined) {
break reducibleJoin2;
}
value = 3;
max = value;
break reducibleJoin2;
}
value = 3;
max = value;
break reducibleJoin2;
}
reducibleJoin4: while (true) {
if (renderedUsers !== undefined) {
r1 = renderedUsers;
reducibleJoin4: while (true) {
if (renderedUsers !== undefined) {
r1 = renderedUsers;
break reducibleJoin4;
}
r1 = [];
break reducibleJoin4;
}
r1 = [];
break reducibleJoin4;
}
reducibleJoin6: while (true) {
if (avatarSize !== undefined) {
r5 = avatarSize;
reducibleJoin6: while (true) {
if (avatarSize !== undefined) {
r5 = avatarSize;
break reducibleJoin6;
}
value = environment;
AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
XXSMALL = AvatarSizes.XXSMALL;
r5 = XXSMALL;
break reducibleJoin6;
}
value = environment;
AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
XXSMALL = AvatarSizes.XXSMALL;
r5 = XXSMALL;
break reducibleJoin6;
}
reducibleJoin8: while (true) {
if (cutout !== undefined) {
r4 = cutout;
reducibleJoin8: while (true) {
if (cutout !== undefined) {
r4 = cutout;
break reducibleJoin8;
}
value = environment;
binding = env0_7;
r4 = binding;
break reducibleJoin8;
}
value = environment;
binding = env0_7;
r4 = binding;
break reducibleJoin8;
}
var env0_10;
const styles = useStyles();
let length = r1.length;
length = length > 0 ? r1.length : users.length;
const Math = global.Math;
const value3 = Math.min(length, max);
const env0_8 = {};
(require(566) /* metro dependency 566: flux */).useStateFromStores([GuildMemberStore], function() {
return users.forEach(_fun83357);
});
if (value3 === 0) {
return null;
}
const items2 = [];
if (0 < value3) {
r13 = 0;
reducibleLoop13: while (true) {
UserSummaryItem_loop();
value4 = typeof r13 === 'bigint' ? r13 + 1n : +r13 + 1;
env0_10 = value4;
if (value4 < value3) {
r13 = value4;
continue reducibleLoop13;
}
break reducibleLoop13;
var env0_10;
const styles = useStyles();
let length = r1.length;
length = length > 0 ? r1.length : users.length;
const Math = global.Math;
const value3 = Math.min(length, max);
const env0_8 = {};
(require(566) /* metro dependency 566: flux */).useStateFromStores([GuildMemberStore], function() {
return users.forEach(_fun83357);
});
if (value3 === 0) {
return null;
}
}
const name = (importDefault(4617) /* metro dependency 4617: NicknameUtils */).getName(guildId, channelId, users[0]);
reducibleJoin16: while (true) {
if (withNames) {
length2 = users.length;
value6 = length2 > 1;
r13 = value6;
const items2 = [];
if (0 < value3) {
r13 = 0;
reducibleLoop13: while (true) {
UserSummaryItem_loop();
value4 = typeof r13 === 'bigint' ? r13 + 1n : +r13 + 1;
env0_10 = value4;
if (value4 < value3) {
r13 = value4;
continue reducibleLoop13;
}
break reducibleLoop13;
}
}
const name = (NicknameUtils).getName(guildId, channelId, users[0]);
reducibleJoin16: while (true) {
if (withNames) {
length2 = users.length;
value6 = length2 > 1;
r13 = value6;
break reducibleJoin16;
}
r13 = withNames;
break reducibleJoin16;
}
r13 = withNames;
break reducibleJoin16;
}
reducibleJoin18: while (true) {
if (r13) {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
formatToPlainString = intl.formatToPlainString;
t = (require(1244) /* metro dependency 1244: indexNative */).t;
GhkJ21 = t.GhkJ21;
length3 = users.length;
value7 = Reflect.apply(formatToPlainString, intl, [GhkJ21, {name: name, count: length3 - 1}]);
r15 = value7;
reducibleJoin18: while (true) {
if (r13) {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
formatToPlainString = intl.formatToPlainString;
t = (require(1244) /* metro dependency 1244: indexNative */).t;
GhkJ21 = t.GhkJ21;
length3 = users.length;
value7 = Reflect.apply(formatToPlainString, intl, [GhkJ21, {name: name, count: length3 - 1}]);
r15 = value7;
break reducibleJoin18;
}
r15 = name;
break reducibleJoin18;
}
r15 = name;
break reducibleJoin18;
}
reducibleJoin23: while (true) {
if (withNames) {
if (users[0] == null) {
break reducibleJoin23;
}
HermesInternal = global.HermesInternal;
concat = HermesInternal.concat;
value8 = 'username-' + r15;
if (namesVariant != null) {
push = items2.push;
jsxRuntimeEnv0_5Binding = jsxRuntimeEnv0_5;
names = styles.names;
Reflect.apply(push, items2,
[<Text variant={namesVariant} color="redesign-channel-name-muted-text" style={[names,
namesStyle]} lineClamp={1} key={value8}>{r15}</Text>]);
break reducibleJoin23;
}
push = items2.push;
jsxRuntimeEnv0_5Binding = jsxRuntimeEnv0_5;
LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
namesLegacy = styles.namesLegacy;
Reflect.apply(push, items2, [<LegacyText style={[namesLegacy,
namesStyle]} numberOfLines={1} key={value8}>{r15}</LegacyText>]);
break reducibleJoin23;
}
break reducibleJoin23;
}
reducibleJoin26: while (true) {
if (length > max) {
if (withPlusCount) {
pop = items2.pop;
Reflect.apply(pop, items2, []);
value9 = '+' + (length + 1 - max);
AVATAR_SIZE_MAP = (require(1305) /* metro dependency 1305: native */).AVATAR_SIZE_MAP;
property = AVATAR_SIZE_MAP[r5];
push = items2.push;
jsxRuntimeEnv0_5Binding = jsxRuntimeEnv0_5;
object = {};
plusCountContainer = styles.plusCountContainer;
object.style = [plusCountContainer, {borderRadius: property, width: property, height: property,
padding: property / 8}];
object.children = <Text variant="text-xs/normal" color="mobile-text-heading-primary">{value9}</Text>;
reducibleJoin23: while (true) {
if (withNames) {
if (users[0] == null) {
break reducibleJoin23;
}
HermesInternal = global.HermesInternal;
concat = HermesInternal.concat;
Reflect.apply(push, items2, [<View {...object} key={'plus-' + value9} />]);
value8 = 'username-' + r15;
if (namesVariant != null) {
push = items2.push;
jsxRuntimeEnv0_5Binding = jsxRuntimeEnv0_5;
names = styles.names;
Reflect.apply(push, items2,
[<Text variant={namesVariant} color="redesign-channel-name-muted-text" style={[names,
namesStyle]} lineClamp={1} key={value8}>{r15}</Text>]);
break reducibleJoin23;
}
push = items2.push;
jsxRuntimeEnv0_5Binding = jsxRuntimeEnv0_5;
LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
namesLegacy = styles.namesLegacy;
Reflect.apply(push, items2, [<LegacyText style={[namesLegacy,
namesStyle]} numberOfLines={1} key={value8}>{r15}</LegacyText>]);
break reducibleJoin23;
}
break reducibleJoin23;
}
reducibleJoin26: while (true) {
if (length > max) {
if (withPlusCount) {
pop = items2.pop;
Reflect.apply(pop, items2, []);
value9 = '+' + (length + 1 - max);
AVATAR_SIZE_MAP = (require(1305) /* metro dependency 1305: native */).AVATAR_SIZE_MAP;
property = AVATAR_SIZE_MAP[r5];
push = items2.push;
jsxRuntimeEnv0_5Binding = jsxRuntimeEnv0_5;
object2 = {};
plusCountContainer = styles.plusCountContainer;
object2.style = [plusCountContainer, {borderRadius: property, width: property, height: property,
padding: property / 8}];
object2.children = (
<Text variant="text-xs/normal" color="mobile-text-heading-primary">
{value9}
</Text>
);
HermesInternal = global.HermesInternal;
concat = HermesInternal.concat;
Reflect.apply(push, items2, [<View {...object2} key={'plus-' + value9} />]);
break reducibleJoin26;
}
break reducibleJoin26;
}
break reducibleJoin26;
}
break reducibleJoin26;
}
return (
<View style={[style, styles.container]}>
{items2}
</View>
);
}
return (
<View style={[style, styles.container]}>
{items2}
</View>
);
function _fun83356() { // fn#83356, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11067:896, offset: 0x01f16b53, size: 28 bytes, params: 1, frame: 11
return users.forEach(_fun83357);
function _fun83357(a0) { // fn#83357, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11067:911, offset: 0x01f16b6f, size: 71 bytes, params: 2, frame: 15
var binding;
var id;
var value4;
var guildMemberStoreBinding;
if (guildId != null && a0 != null) {
binding = env1_8;
id = a0.id;
value4 = environment.__proto__.__proto__;
guildMemberStoreBinding = GuildMemberStore;
binding[id] = guildMemberStoreBinding.getMember(guildId, a0.id);
}
}
function _fun83356() { // fn#83356, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11067:896, offset: 0x01f16b53, size: 28 bytes, params: 1, frame: 11
return users.forEach(_fun83357);
}
function UserSummaryItem_loop() { // fn#83358, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11067:1005, owner: UserSummaryItem._loop, offset: 0x01f16bb6, size: 335 bytes, params: 1, frame: 21
var environment;
var r5;
var r8;
var push;
var property;
var value5;
var CutoutableAvatarImage;
var binding;
if (env0_1.length === 0) {
property = users[env0_10];
r5 = property?.id ?? '@' + env0_10;
value5 = environment.__proto__;
r8 = property == null ? (importDefault(1423) /* metro dependency 1423: AvatarUtils */).makeSource(null) : _loopO;
binding = env0_9;
push = binding.push;
CutoutableAvatarImage = (require(1305) /* metro dependency 1305: native */).CutoutableAvatarImage;
if (binding < env0_7 - 1) {
Reflect.apply(push, binding, [<CutoutableAvatarImage size={env0_3} source={r8} style={[styles.cutout,
cutoutStyle]} cutout={env0_4} key={r5} />]);
} else {
Reflect.apply(push, binding, [<CutoutableAvatarImage size={env0_3} source={r8} key={r5} />]);
}
} else {
binding = env0_9;
binding.push(env0_1[env0_10]);
function UserSummaryItem_loop() { // fn#83358, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11067:1005, owner: UserSummaryItem._loop, offset: 0x01f16bb6, size: 335 bytes, params: 1, frame: 21
var environment;
var r5;
var r8;
var push;
var property;
var value5;
var CutoutableAvatarImage;
var binding;
if (env0_1.length === 0) {
property = users[env0_10];
r5 = property?.id ?? '@' + env0_10;
value5 = environment.__proto__;
r8 = property == null ? (importDefault(1423) /* metro dependency 1423: AvatarUtils */).makeSource(null) : _loopO;
binding = env0_9;
push = binding.push;
CutoutableAvatarImage = (require(1305) /* metro dependency 1305: native */).CutoutableAvatarImage;
if (binding < env0_7 - 1) {
Reflect.apply(push, binding, [<CutoutableAvatarImage size={ReactNativeModule.View} source={r8} style={[styles.cutout,
cutoutStyle]} cutout={env0_4} key={r5} />]);
} else {
Reflect.apply(push, binding, [<CutoutableAvatarImage size={ReactNativeModule.View} source={r8} key={r5} />]);
}
} else {
binding = env0_9;
binding.push(env0_1[env0_10]);
}
function _loopO() { // fn#83359, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11067:1156, owner: UserSummaryItem._loop.o, offset: 0x01f16d05, size: 189 bytes, params: 1, frame: 21
const value = a0;
const value2 = undefined;
const r6 = value !== value2 ? value : false;
const binding = env0_0;
const getAvatarURL = binding.getAvatarURL;
const guildIdBinding = guildId;
const AVATAR_SIZE_MAP = (NativeModule).AVATAR_SIZE_MAP;
const value5 = Reflect.apply(getAvatarURL, binding, [guildIdBinding, AVATAR_SIZE_MAP[env1_3], r6]);
return (importDefault(1423) /* metro dependency 1423: AvatarUtils */).makeSource((env0_1 == null ? value2 : env0_1.avatar) == null ? value5 : (importDefault(1423) /* metro dependency 1423: AvatarUtils */).getGuildMemberAvatarURL(env0_1,
r6) ?? value5);
}
}
}
}
function _fun83357(a0) { // fn#83357, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11067:911, offset: 0x01f16b6f, size: 71 bytes, params: 2, frame: 15
var binding;
var id;
var value4;
if (guildId != null && a0 != null) {
binding = env1_8;
id = a0.id;
value4 = environment.__proto__.__proto__;
binding[id] = GuildMemberStore.getMember(guildId, a0.id);
}
}
function _loopO() { // fn#83359, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11067:1156, owner: UserSummaryItem._loop.o, offset: 0x01f16d05, size: 189 bytes, params: 1, frame: 21
const value = a0;
const value2 = undefined;
const r6 = value !== value2 ? value : false;
const binding = env0_0;
const getAvatarURL = binding.getAvatarURL;
const guildIdBinding = guildId;
const AVATAR_SIZE_MAP = (require(1305) /* metro dependency 1305: native */).AVATAR_SIZE_MAP;
const value5 = Reflect.apply(getAvatarURL, binding, [guildIdBinding, AVATAR_SIZE_MAP[env1_3], r6]);
return (importDefault(1423) /* metro dependency 1423: AvatarUtils */).makeSource((env0_1 == null ? value2 : env0_1.avatar) == null ? value5 : (importDefault(1423) /* metro dependency 1423: AvatarUtils */).getGuildMemberAvatarURL(env0_1,
r6) ?? value5);
}
global.__d(_fun83354, 10881, [31, 27, 1945, 33, 4501, 697, 1305, 566, 1423, 4617, 1244, 4573,
2]) /* metro module 10881, dependencies: [31, 27, 1945, 33, 4501, 697, 1305, 566, 1423, 4617, 1244, 4573, 2] */;
+326 -286
View File
@@ -1,320 +1,360 @@
/* Metro module 9543; source: components_native/common/Video.tsx; dependencies: [6, 7, 15, 17, 18, 57, 31, 27, 33, 4501, 697, 8011, 9544, 5459, 1244, 3868, 2] */
import ClassCallCheck from '../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
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 NativeModule from '../../external/discord_common/js/packages/design/native.tsx'; /* Metro dependency 3868 */
import * as CreateStylesModule from '../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as Module08011Module from '../../by-id/module-08011.jsx'; /* Metro dependency 8011 */
function _fun74450(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#74450, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9729:6, offset: 0x01d8dee8, size: 512 bytes, params: 8, frame: 26
var object3;
const env0_0 = require;
const closure = VideoComponent;
const VideoComponent2 = VideoComponent;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(6) /* metro dependency 6 */;
const env0_3 = importDefault(7) /* metro dependency 7 */;
const env0_4 = importDefault(15) /* metro dependency 15 */;
const env0_5 = importDefault(17) /* metro dependency 17 */;
const env0_6 = importDefault(18) /* metro dependency 18 */;
const env0_7 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_9 = value2.TouchableWithoutFeedback;
const env0_10 = value2.View;
const env0_11 = value2.Image;
const env0_12 = value2.AppState;
const env0_13 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createLegacyClassComponentStyles = createStylesModule.createLegacyClassComponentStyles;
object3 = {};
const object4 = {'flex': 1, 'shadowColor': null, 'shadowOpacity': 0.5, 'shadowOffset': null, 'shadowRadius': 16};
const env0_2 = ClassCallCheck;
const env0_3 = CreateClass;
let value = ReactModule;
const createLegacyClassComponentStyles = CreateStylesModule.createLegacyClassComponentStyles;
object = {};
const object2 = {'flex': 1, 'shadowColor': null, 'shadowOpacity': 0.5, 'shadowOffset': null, 'shadowRadius': 16};
const BLACK = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BLACK;
object4.shadowColor = BLACK;
object4.shadowOffset = {'height': 1, 'width': 0};
object2.shadowColor = BLACK;
object2.shadowOffset = {'height': 1, 'width': 0};
let BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
object4.backgroundColor = BACKGROUND_BRAND;
object3.container = object4;
object2.backgroundColor = BACKGROUND_BRAND;
object.container = object2;
BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
object3.video = {flex: 1, backgroundColor: BACKGROUND_BRAND};
const env0_14 = Reflect.apply(createLegacyClassComponentStyles, createStylesModule, [object3]);
object.video = {flex: 1, backgroundColor: BACKGROUND_BRAND};
const env0_14 = Reflect.apply(createLegacyClassComponentStyles, CreateStylesModule, [object]);
const PureComponent = value.PureComponent;
value = _fun74458(PureComponent);
const ThemeContext = (require(3868) /* metro dependency 3868: native */).ThemeContext;
const ThemeContext = (NativeModule).ThemeContext;
value.contextType = ThemeContext;
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/common/Video.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/common/Video.tsx');
exports.default = value;
exports.createVideoControls = createVideoControls;
exports.VideoComponent = closure;
}
function _isNativeReflectConstruct_74451() { // fn#74451, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9729:253, offset: 0x01d8e0e8, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_74451_isNativeReflectConstruct = function() {
return !!result;
})();
}
function VideoComponent({style, source, poster, onLoadStart, onLoad, onError, onEnd, paused, muted, posterResizeMode, resizeMode, disableFocus, controls, ariaHidden, mixWithOthers, importantForAccessibility, pauseWhileAppInactive, playInBackground, preventsDisplaySleepDuringVideoPlayback, httpEngine}) { // fn#74454, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9729:737, offset: 0x01d8e14a, size: 456 bytes, params: 2, frame: 38
paused = !(paused === undefined) && paused;
muted = muted === undefined || muted;
posterResizeMode = posterResizeMode === undefined ? 'contain' : posterResizeMode;
resizeMode = resizeMode === undefined ? 'contain' : resizeMode;
pauseWhileAppInactive = pauseWhileAppInactive === undefined || pauseWhileAppInactive;
playInBackground = !(playInBackground === undefined) && playInBackground;
preventsDisplaySleepDuringVideoPlayback = preventsDisplaySleepDuringVideoPlayback === undefined || preventsDisplaySleepDuringVideoPlayback;
const property = (require(8011) /* metro dependency 8011 */).default;
const binding = env0_8;
const useState = binding.useState;
const value11 = env0_7(Reflect.apply(useState, binding, [AppState.currentState === 'active']), 2);
const property2 = value11[0];
const env0_1 = value11[1];
env0_8.useEffect(_fun74455, [pauseWhileAppInactive]);
const propertyProps = {style: style, source: source, importantForAccessibility: importantForAccessibility,
poster: poster, muted: muted, paused: paused || pauseWhileAppInactive && !property2,
posterResizeMode: posterResizeMode, resizeMode: resizeMode, repeat: true, playInBackground: playInBackground,
pictureInPicture: false, playWhenInactive: false, onLoadStart: onLoadStart, onLoad: onLoad, onError: onError,
onEnd: onEnd, disableFocus: disableFocus};
propertyProps['aria-hidden'] = ariaHidden;
propertyProps.mixWithOthers = mixWithOthers;
propertyProps.preventsDisplaySleepDuringVideoPlayback = preventsDisplaySleepDuringVideoPlayback;
propertyProps.httpEngine = httpEngine;
copyDataProperties(propertyProps, controls?.props, undefined);
return ((Component) => <Component {...propertyProps} />)(property);
}
function _fun74458(a0) { // fn#74458, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9729:1663, offset: 0x01d8e368, size: 172 bytes, params: 2, frame: 16
const closure = Video_74459;
env0_6(closure, a0);
return env0_3(closure, [{key: 'componentDidMount', value: value_74462}, {key: 'componentWillUnmount',
value: function() {
if (this._renderTask != null) {
this._renderTask.cancel();
exports.VideoComponent = VideoComponent2;
function _isNativeReflectConstruct_74451() { // fn#74451, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9729:253, offset: 0x01d8e0e8, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
}}, {key: 'renderVideo', value: value_74465}, {key: 'renderImage', value: value_74466}, {key: 'render',
value: value_74467}]);
}
function createVideoControls(a0) { // fn#74468, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9729:3938, offset: 0x01d8e8b7, size: 136 bytes, params: 2, frame: 11
const env0_0 = a0;
return {seek: seek_74469, pause: pause_74470, useSubscribe: useSubscribe, props: {ref: env0_8.createRef(),
onPlaybackRateChange: onPlaybackRateChange, onProgress: onProgress, onDownloadProgress: onDownloadProgress}};
}
function _fun74455() { // fn#74455, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9729:1202, offset: 0x01d8e312, size: 59 bytes, params: 1, frame: 14
var environment;
if (pauseWhileAppInactive) {
value = environment.__proto__;
var env0_0 = AppState.addEventListener('change', _fun74456);
return _fun74457;
return (_isNativeReflectConstruct_74451_isNativeReflectConstruct = function() {
return !!result;
})();
}
}
function Video_74459(a0) { // fn#74459, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9729:1675, offset: 0x01d8e414, size: 193 bytes, params: 2, frame: 21
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_2;
binding(this, Video_74459);
const items = [];
arraySpread(items, value, 0, items);
value = env1_5(Video_74459);
binding = env1_4;
if (_isNativeReflectConstruct_74451()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items, env1_5(this).constructor);
r0 = value;
} else {
value = value.apply(this, items);
r0 = value;
function VideoComponent({style, source, poster, onLoadStart, onLoad, onError, onEnd, paused, muted, posterResizeMode, resizeMode, disableFocus, controls, ariaHidden, mixWithOthers, importantForAccessibility, pauseWhileAppInactive, playInBackground, preventsDisplaySleepDuringVideoPlayback, httpEngine}) { // fn#74454, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9729:737, offset: 0x01d8e14a, size: 456 bytes, params: 2, frame: 38
paused = !(paused === undefined) && paused;
muted = muted === undefined || muted;
posterResizeMode = posterResizeMode === undefined ? 'contain' : posterResizeMode;
resizeMode = resizeMode === undefined ? 'contain' : resizeMode;
pauseWhileAppInactive = pauseWhileAppInactive === undefined || pauseWhileAppInactive;
playInBackground = !(playInBackground === undefined) && playInBackground;
preventsDisplaySleepDuringVideoPlayback = preventsDisplaySleepDuringVideoPlayback === undefined || preventsDisplaySleepDuringVideoPlayback;
const property = (Module08011Module).default;
const binding = env0_8;
const useState = binding.useState;
const value11 = Module00057(Reflect.apply(useState, binding, [AppState.currentState === 'active']), 2);
const property2 = value11[0];
const env0_1 = value11[1];
env0_8.useEffect(_fun74455, [pauseWhileAppInactive]);
const propertyProps = {style: style, source: source, importantForAccessibility: importantForAccessibility,
poster: poster, muted: muted, paused: paused || pauseWhileAppInactive && !property2,
posterResizeMode: posterResizeMode, resizeMode: resizeMode, repeat: true, playInBackground: playInBackground,
pictureInPicture: false, playWhenInactive: false, onLoadStart: onLoadStart, onLoad: onLoad, onError: onError,
onEnd: onEnd, disableFocus: disableFocus};
propertyProps['aria-hidden'] = ariaHidden;
propertyProps.mixWithOthers = mixWithOthers;
propertyProps.preventsDisplaySleepDuringVideoPlayback = preventsDisplaySleepDuringVideoPlayback;
propertyProps.httpEngine = httpEngine;
copyDataProperties(propertyProps, controls?.props, undefined);
return ((Component) => <Component {...propertyProps} />)(property);
function _fun74455() { // fn#74455, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9729:1202, offset: 0x01d8e312, size: 59 bytes, params: 1, frame: 14
var environment;
if (pauseWhileAppInactive) {
value = environment.__proto__;
var env0_0 = AppState.addEventListener('change', _fun74456);
return _fun74457;
}
function _fun74456(a0) { // fn#74456, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9729:1248, offset: 0x01d8e34d, size: 27 bytes, params: 2, frame: 12
env1_1(a0 === 'active');
}
function _fun74457() { // fn#74457, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9729:1277, offset: 0x00cd0cb3, size: 21 bytes, params: 1, frame: 9
env0_0.remove();
}
}
}
value = binding(this, r0);
value.state = {postponeRender: true};
value.ref = env1_8.createRef();
value.isVideo = isVideo_74460;
value.handleOpenFullScreen = handleOpenFullScreen;
return value;
}
function value_74462() { // fn#74462, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9729:2288, offset: 0x01d8e5a0, size: 60 bytes, params: 1, frame: 13
var environment;
let value = environment.__proto__;
value = require(5459) /* metro dependency 5459: RunAfterInteractionsUtils */;
this._renderTask = value.runAfterInteractions(_fun74463);
}
function _fun74458(a0) { // fn#74458, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9729:1663, offset: 0x01d8e368, size: 172 bytes, params: 2, frame: 16
const Video_744592 = Video_74459;
Inherits(Video_744592, a0);
return env0_3(Video_744592, [{key: 'componentDidMount', value: value_74462}, {key: 'componentWillUnmount',
value: function() {
if (this._renderTask != null) {
this._renderTask.cancel();
}
}}, {key: 'renderVideo', value: value_74465}, {key: 'renderImage', value: value_74466}, {key: 'render',
value: value_74467}]);
function Video_74459(a0) { // fn#74459, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9729:1675, offset: 0x01d8e414, size: 193 bytes, params: 2, frame: 21
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_2;
binding(this, Video_74459);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_5(Video_74459);
binding = env1_4;
if (_isNativeReflectConstruct_74451()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_5(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
value.state = {postponeRender: true};
value.ref = env1_8.createRef();
value.isVideo = isVideo_74460;
value.handleOpenFullScreen = handleOpenFullScreen;
return value;
function Video_74459IsVideo() { // fn#74460, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9729:1934, owner: Video_74459.isVideo, offset: 0x01d8e4d5, size: 50 bytes, params: 1, frame: 4
const src = env0_0.props.src;
return src != null && 'videoURI' in src && src.videoURI != null;
}
function value_74465() { // fn#74465, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9729:2514, offset: 0x01d8e61e, size: 242 bytes, params: 1, frame: 27
var videoURI;
const value = environment.__proto__;
const binding = env1_14;
const context = this.context;
const value2 = undefined;
const value3 = binding(context);
const props = this.props;
const src = props.src;
const poster = props.poster;
const width = props.width;
const height = props.height;
const muted = props.muted;
const paused = props.paused;
const resizeMode = props.resizeMode;
if ('videoURI' in src) {
videoURI = src.videoURI;
if (videoURI === '') {
function handleOpenFullScreen() { // fn#74461, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9729:2030, owner: Video_74459.handleOpenFullScreen, offset: 0x01d8e507, size: 153 bytes, params: 1, frame: 17
var openMediaModal;
var object2;
var value;
const {src, onPress, width, height} = env0_0.props;
if (onPress != null) {
onPress();
}
const current = env0_0.ref.current;
if (current != null) {
value = environment.__proto__.__proto__;
value = require(9544) /* metro dependency 9544: openMediaModal */;
openMediaModal = value.openMediaModal;
object2 = {};
copyDataProperties(object2, src, width);
object2['width'] = width;
object2['height'] = height;
Reflect.apply(openMediaModal, value, [{initialSources: [object2], originViewOrOriginLayout: current}]);
}
}
}
function value_74462() { // fn#74462, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9729:2288, offset: 0x01d8e5a0, size: 60 bytes, params: 1, frame: 13
var environment;
let value = environment.__proto__;
value = require(5459) /* metro dependency 5459: RunAfterInteractionsUtils */;
this._renderTask = value.runAfterInteractions(_fun74463);
function _fun74463() { // fn#74463, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9729:2347, offset: 0x01d8e5dc, size: 31 bytes, params: 1, frame: 12
env0_0.setState({postponeRender: false});
}
}
function value_74465() { // fn#74465, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9729:2514, offset: 0x01d8e61e, size: 242 bytes, params: 1, frame: 27
var videoURI;
const value = environment.__proto__;
const binding = env1_14;
const context = this.context;
const value2 = undefined;
const value3 = binding(context);
const props = this.props;
const src = props.src;
const poster = props.poster;
const width = props.width;
const height = props.height;
const muted = props.muted;
const paused = props.paused;
const resizeMode = props.resizeMode;
if ('videoURI' in src) {
videoURI = src.videoURI;
if (videoURI === '') {
return null;
}
videoURI = src.videoURI;
return (
videoURI != null
? (
<VideoComponent
style={[value3.video, {width: width, height: height}, props.videoStyle]}
source={{uri: videoURI}}
poster={poster}
muted={muted}
paused={paused}
resizeMode={resizeMode}
posterResizeMode={resizeMode}
ariaHidden={props.ariaHidden}
disableFocus={props.disableFocus}
httpEngine={props.httpEngine}
/>
)
: value2
);
}
return null;
}
videoURI = src.videoURI;
return videoURI != null ? <VideoComponent style={[value3.video, {width: width, height: height},
props.videoStyle]} source={{uri: videoURI}} poster={poster} muted={muted} paused={paused} resizeMode={resizeMode} posterResizeMode={resizeMode} ariaHidden={props.ariaHidden} disableFocus={props.disableFocus} httpEngine={props.httpEngine} /> : value2;
}
return null;
}
function value_74466() { // fn#74466, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9729:3024, offset: 0x01d8e710, size: 115 bytes, params: 1, frame: 17
var value;
const props = this.props;
const src = props.src;
if ('uri' in src) {
if (src.uri !== '') {
value = environment.__proto__;
return (
<Image
source={{uri: src.uri}}
style={{width: props.width, height: props.height}}
{...{['aria-hidden']: props.ariaHidden}}
/>
function value_74466() { // fn#74466, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9729:3024, offset: 0x01d8e710, size: 115 bytes, params: 1, frame: 17
var value;
const props = this.props;
const src = props.src;
if ('uri' in src) {
if (src.uri !== '') {
value = environment.__proto__;
return (
<Image
source={{uri: src.uri}}
style={{width: props.width, height: props.height}}
{...{['aria-hidden']: props.ariaHidden}}
/>
);
}
}
}
function value_74467() { // fn#74467, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9729:3258, offset: 0x01d8e783, size: 308 bytes, params: 1, frame: 23
var r7;
var r0;
var intl;
const value = environment.__proto__;
const value2 = env1_14(this.context);
const {style, width, height, canOpenFullscreen, postponeRender, accessibilityLabel} = this.props;
const ref = this.ref;
const value3 = null;
const view = (
<View
ref={ref}
style={[value2.container, {width: width, height: height}, style]}
accessible={value3 != accessibilityLabel}
accessibilityLabel={accessibilityLabel}
>
{this.state.postponeRender && postponeRender !== false ? value3 : this.isVideo() ? this.renderVideo() : this.renderImage()}
</View>
);
if (canOpenFullscreen) {
if (value3 != accessibilityLabel) {
r7 = accessibilityLabel;
} else {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r7 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.OIDkcp);
}
r0 = (
<TouchableWithoutFeedback
accessibilityRole="button"
accessibilityLabel={r7}
onPress={this.handleOpenFullScreen}
>
{view}
</TouchableWithoutFeedback>
);
} else {
r0 = view;
}
return r0;
}
}
}
function value_74467() { // fn#74467, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9729:3258, offset: 0x01d8e783, size: 308 bytes, params: 1, frame: 23
var r7;
var r0;
var intl;
const value = environment.__proto__;
const value2 = env1_14(this.context);
const {style, width, height, canOpenFullscreen, postponeRender, accessibilityLabel} = this.props;
const ref = this.ref;
const value3 = null;
const view = <View ref={ref} style={[value2.container, {width: width, height: height},
style]} accessible={value3 != accessibilityLabel} accessibilityLabel={accessibilityLabel}>{this.state.postponeRender && postponeRender !== false ? value3 : this.isVideo() ? this.renderVideo() : this.renderImage()}</View>;
if (canOpenFullscreen) {
if (value3 != accessibilityLabel) {
r7 = accessibilityLabel;
} else {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r7 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.OIDkcp);
}
function createVideoControls(a0) { // fn#74468, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9729:3938, offset: 0x01d8e8b7, size: 136 bytes, params: 2, frame: 11
const env0_0 = a0;
return {seek: seek_74469, pause: pause_74470, useSubscribe: useSubscribe, props: {ref: env0_8.createRef(),
onPlaybackRateChange: onPlaybackRateChange, onProgress: onProgress, onDownloadProgress: onDownloadProgress}};
function createVideoControlsSeek(a0) { // fn#74469, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9729:4020, owner: createVideoControls.seek, offset: 0x01d8e93f, size: 52 bytes, params: 2, frame: 12
const current = PossibleConstructorReturn.current;
if (!(current == null || current.seek == null)) {
current.seek(a0);
}
}
r0 = <TouchableWithoutFeedback accessibilityRole="button" accessibilityLabel={r7} onPress={this.handleOpenFullScreen}>{view}</TouchableWithoutFeedback>;
} else {
r0 = view;
}
return r0;
}
function createVideoControlsSeek(a0) { // fn#74469, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9729:4020, owner: createVideoControls.seek, offset: 0x01d8e93f, size: 52 bytes, params: 2, frame: 12
const current = env0_4.current;
if (!(current == null || current.seek == null)) {
current.seek(a0);
}
}
function createVideoControlsPause(a0) { // fn#74470, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9729:4080, owner: createVideoControls.pause, offset: 0x01d8e973, size: 54 bytes, params: 2, frame: 12
env0_0(a0);
if (env0_8 !== a0) {
if (env0_2 != null) {
env0_2(a0);
function createVideoControlsPause(a0) { // fn#74470, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9729:4080, owner: createVideoControls.pause, offset: 0x01d8e973, size: 54 bytes, params: 2, frame: 12
env0_0(a0);
if (env0_8 !== a0) {
if (env0_2 != null) {
env0_2(a0);
}
}
}
}
}
function createVideoControlsUseSubscribe(a0, a1, a2) { // fn#74471, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9729:4122, owner: createVideoControls.useSubscribe, offset: 0x01d8e9a9, size: 60 bytes, params: 4, frame: 13
env0_1 = a0;
env0_2 = a1;
env0_3 = a2;
env1_8.useLayoutEffect(_fun74472, []);
}
function useSubscribe(a0, a1, a2) { // fn#74471, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9729:4122, owner: createVideoControls.useSubscribe, offset: 0x01d8e9a9, size: 60 bytes, params: 4, frame: 13
env0_1 = a0;
env0_2 = a1;
env0_3 = a2;
env1_8.useLayoutEffect(_fun74472, []);
function _fun74472() { // fn#74472, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9729:4173, offset: 0x01d8e9e5, size: 83 bytes, params: 1, frame: 15
if (env1_1 != null) {
env1_1(env1_5, env1_6);
}
if (env1_2 != null) {
env1_2(env1_8);
}
if (env1_3 != null) {
env1_3(env1_7);
}
}
function onPlaybackRateChange({playbackRate}) { // fn#74473, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9729:4242, owner: createVideoControls.onPlaybackRateChange, offset: 0x01d8ea38, size: 59 bytes, params: 2, frame: 11
if (env0_8 !== (playbackRate === 0)) {
if (env0_2 != null) {
env0_2(env0_8);
}
function onPlaybackRateChange({playbackRate}) { // fn#74473, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9729:4242, owner: createVideoControls.onPlaybackRateChange, offset: 0x01d8ea38, size: 59 bytes, params: 2, frame: 11
if (env0_8 !== (playbackRate === 0)) {
if (env0_2 != null) {
env0_2(env0_8);
}
}
}
function onProgress({currentTime, seekableDuration}) { // fn#74474, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9729:4319, owner: createVideoControls.onProgress, offset: 0x01d8ea73, size: 60 bytes, params: 2, frame: 13
if (env0_1 != null) {
env0_1(currentTime, seekableDuration);
}
}
function onDownloadProgress({progressPercent}) { // fn#74475, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9729:4387, owner: createVideoControls.onDownloadProgress, offset: 0x01d8eaaf, size: 45 bytes, params: 2, frame: 11
if (env0_3 != null) {
env0_3(progressPercent);
}
}
}
}
function onProgress({currentTime, seekableDuration}) { // fn#74474, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9729:4319, owner: createVideoControls.onProgress, offset: 0x01d8ea73, size: 60 bytes, params: 2, frame: 13
if (env0_1 != null) {
env0_1(currentTime, seekableDuration);
}
}
function createVideoControlsOnDownloadProgress({progressPercent}) { // fn#74475, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9729:4387, owner: createVideoControls.onDownloadProgress, offset: 0x01d8eaaf, size: 45 bytes, params: 2, frame: 11
if (env0_3 != null) {
env0_3(progressPercent);
}
}
function _fun74456(a0) { // fn#74456, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9729:1248, offset: 0x01d8e34d, size: 27 bytes, params: 2, frame: 12
env1_1(a0 === 'active');
}
function Video_74459IsVideo() { // fn#74460, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9729:1934, owner: Video_74459.isVideo, offset: 0x01d8e4d5, size: 50 bytes, params: 1, frame: 4
const src = env0_0.props.src;
return src != null && 'videoURI' in src && src.videoURI != null;
}
function handleOpenFullScreen() { // fn#74461, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9729:2030, owner: Video_74459.handleOpenFullScreen, offset: 0x01d8e507, size: 153 bytes, params: 1, frame: 17
var openMediaModal;
var object;
var value;
const {src, onPress, width, height} = env0_0.props;
if (onPress != null) {
onPress();
}
const current = env0_0.ref.current;
if (current != null) {
value = environment.__proto__.__proto__;
value = require(9544) /* metro dependency 9544: openMediaModal */;
openMediaModal = value.openMediaModal;
object = {};
copyDataProperties(object, src, width);
object['width'] = width;
object['height'] = height;
Reflect.apply(openMediaModal, value, [{initialSources: [object], originViewOrOriginLayout: current}]);
}
}
function _fun74463() { // fn#74463, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9729:2347, offset: 0x01d8e5dc, size: 31 bytes, params: 1, frame: 12
env0_0.setState({postponeRender: false});
}
function _fun74472() { // fn#74472, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9729:4173, offset: 0x01d8e9e5, size: 83 bytes, params: 1, frame: 15
if (env1_1 != null) {
env1_1(env1_5, env1_6);
}
if (env1_2 != null) {
env1_2(env1_8);
}
if (env1_3 != null) {
env1_3(env1_7);
}
}
global.__d(_fun74450, 9543, [6, 7, 15, 17, 18, 57, 31, 27, 33, 4501, 697, 8011, 9544, 5459, 1244, 3868,
2]) /* metro module 9543, dependencies: [6, 7, 15, 17, 18, 57, 31, 27, 33, 4501, 697, 8011, 9544, 5459, 1244, 3868, 2] */;
@@ -1,51 +1,76 @@
/* Metro module 9020; source: components_native/common/ViewEmptyState.tsx; dependencies: [31, 27, 661, 33, 4501, 6597, 697, 1305, 2] */
import Native from '../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import TextStyles from '../../modules/rebrand/native/TextStyles.tsx'; /* Metro dependency 6597 */
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 ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as NativeModule from '../../design/void/native.tsx'; /* Metro dependency 1305 */
function _fun70188(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#70188, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9205:6, offset: 0x01cf1e4f, size: 417 bytes, params: 8, frame: 25
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_2 = value.View;
const env0_3 = value.Image;
const Fonts = (require(661) /* metro dependency 661: Constants */).Fonts;
const Fonts = (ConstantsModule).Fonts;
value = require(33) /* metro dependency 33 */;
const env0_4 = value.jsx;
const env0_5 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const object = {};
const textStyles = importDefault(6597) /* metro dependency 6597: TextStyles */;
const object2 = {};
const DISPLAY_SEMIBOLD = Fonts.DISPLAY_SEMIBOLD;
const MOBILE_TEXT_HEADING_PRIMARY = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_TEXT_HEADING_PRIMARY;
copyDataProperties(object, textStyles(DISPLAY_SEMIBOLD, MOBILE_TEXT_HEADING_PRIMARY, 18), undefined);
object['textAlign'] = 'center';
object['marginTop'] = 32;
object['opacity'] = 0.8;
const MOBILE_TEXT_HEADING_PRIMARY = (Native).colors.MOBILE_TEXT_HEADING_PRIMARY;
copyDataProperties(object2, TextStyles(DISPLAY_SEMIBOLD, MOBILE_TEXT_HEADING_PRIMARY, 18), undefined);
object2['textAlign'] = 'center';
object2['marginTop'] = 32;
object2['opacity'] = 0.8;
const PRIMARY_MEDIUM = Fonts.PRIMARY_MEDIUM;
const env0_6 = Reflect.apply(createStyles, value, [{emptyContainer: {'flex': 1, 'justifyContent': 'center',
'alignItems': 'center', 'marginHorizontal': 36}, emptyImage: {'width': 170, 'height': 130},
fixOpticalIllusion: {'marginTop': -50, 'alignItems': 'center'}, emptyLabel: object,
fixOpticalIllusion: {'marginTop': -50, 'alignItems': 'center'}, emptyLabel: object2,
emptyText: {'fontFamily': null, 'fontSize': 13, 'marginTop': 8, 'marginHorizontal': 10, 'opacity': 0.6,
'fontWeight': '400', fontFamily: PRIMARY_MEDIUM}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/common/ViewEmptyState.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/common/ViewEmptyState.tsx');
exports.default = ViewEmptyState;
}
function ViewEmptyState({source, label, text, style}) { // fn#70189, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9205:630, offset: 0x01cf1ff0, size: 308 bytes, params: 2, frame: 26
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
const styles = useStyles();
return (
<View style={[styles.emptyContainer, style]}>
<View style={styles.fixOpticalIllusion}>
<Image
resizeMode="contain"
source={source}
style={styles.emptyImage}
/>
{label != null ? <LegacyText style={styles.emptyLabel}>{label.toUpperCase()}</LegacyText> : null}
{text != null ? <LegacyText style={[styles.emptyLabel, styles.emptyText]}>{text}</LegacyText> : null}
function ViewEmptyState({source, label, text, style}) { // fn#70189, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9205:630, offset: 0x01cf1ff0, size: 308 bytes, params: 2, frame: 26
const LegacyText = (NativeModule).LegacyText;
const styles = useStyles();
return (
<View style={[styles.emptyContainer, style]}>
<View style={styles.fixOpticalIllusion}>
<Image
resizeMode="contain"
source={source}
style={styles.emptyImage}
/>
{
label != null
? (
<LegacyText style={styles.emptyLabel}>
{label.toUpperCase()}
</LegacyText>
)
: null
}
{
text != null
? (
<LegacyText style={[styles.emptyLabel, styles.emptyText]}>
{text}
</LegacyText>
)
: null
}
</View>
</View>
</View>
);
);
}
}
global.__d(_fun70188, 9020, [31, 27, 661, 33, 4501, 6597, 697, 1305,
2]) /* metro module 9020, dependencies: [31, 27, 661, 33, 4501, 6597, 697, 1305, 2] */;
@@ -1,262 +1,308 @@
/* Metro module 10818; source: components_native/common/VoiceSensitivity.tsx; dependencies: [5, 57, 31, 27, 4259, 4607, 7030, 661, 4661, 33, 4501, 697, 4000, 1478, 566, 4662, 4406, 3869, 1244, 1305, 7972, 7992, 477, 2] */
import Module00005 from '../../by-id/module-00005.js'; /* Metro dependency 5 */
import Module00057 from '../../by-id/module-00057.js'; /* Metro dependency 57 */
import UseWindowDimensionsNative from '../../modules/screen/useWindowDimensions.native.tsx'; /* Metro dependency 1478 */
import MediaEngineStore from '../../stores/MediaEngineStore.tsx'; /* Metro dependency 4259 */
import SpeakingStore from '../../stores/SpeakingStore.tsx'; /* Metro dependency 4607 */
import AppStateStore from '../../stores/native/AppStateStore.tsx'; /* Metro dependency 7030 */
import Module07992 from '../../by-id/module-07992.jsx'; /* Metro dependency 7992 */
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 PlatformUtilsModule from '../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as AccessibilityAnnouncerAndroidModule from '../../external/discord_common/js/packages/design/components/AccessibilityAnnouncer/AccessibilityAnnouncer.android.tsx'; /* Metro dependency 3869 */
import * as ColorUtilsModule from '../../utils/ColorUtils.tsx'; /* Metro dependency 4000 */
import * as MediaEngineModule from '../../external/discord_common/js/packages/media-engine/index.tsx'; /* Metro dependency 4406 */
import * as NativePermissionConstantsModule from '../../modules/native_permissions/NativePermissionConstants.tsx'; /* Metro dependency 4661 */
function _fun83008(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83008, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11004:6, offset: 0x01f09b8c, size: 614 bytes, params: 8, frame: 26
var object2;
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 mediaEngineStore = importDefault(4259) /* metro dependency 4259: MediaEngineStore */;
const speakingStore = importDefault(4607) /* metro dependency 4607: SpeakingStore */;
const appStateStore = importDefault(7030) /* metro dependency 7030: AppStateStore */;
const env0_10 = (require(661) /* metro dependency 661: Constants */).AppStates;
const env0_11 = (require(4661) /* metro dependency 4661: NativePermissionConstants */).NativePermissionTypes;
let value = require(33) /* metro dependency 33 */;
let value = JsxRuntimeModule;
const env0_12 = value.jsx;
const env0_13 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {sensitivity: {'position': 'relative', 'height': 20}, sensitivityBar: {'position': 'absolute', 'top': 7,
object = {sensitivity: {'position': 'relative', 'height': 20}, sensitivityBar: {'position': 'absolute', 'top': 7,
'left': 0, 'right': 0, 'bottom': 7, 'flexDirection': 'row'}};
const WHITE = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE;
object2.sensitivityFill = {'position': 'absolute', 'backgroundColor': null, 'opacity': 0.5, 'top': 7, 'left': 0,
object.sensitivityFill = {'position': 'absolute', 'backgroundColor': null, 'opacity': 0.5, 'top': 7, 'left': 0,
'right': 0, 'bottom': 7, backgroundColor: WHITE};
object2.sensitivityCommon = {'height': 6, 'borderRadius': 3};
object.sensitivityCommon = {'height': 6, 'borderRadius': 3};
const YELLOW_300 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.YELLOW_300;
object2.sensitivityMin = {backgroundColor: YELLOW_300};
object.sensitivityMin = {backgroundColor: YELLOW_300};
let GREEN_360 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.GREEN_360;
object2.sensitivityMax = {backgroundColor: GREEN_360};
const colorUtilsModule = require(4000) /* metro dependency 4000: ColorUtils */;
const hexWithOpacity = colorUtilsModule.hexWithOpacity;
object.sensitivityMax = {backgroundColor: GREEN_360};
const hexWithOpacity = ColorUtilsModule.hexWithOpacity;
const PRIMARY_400 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_400;
object2.sensitivityDefault = {flex: 1, backgroundColor: Reflect.apply(hexWithOpacity, colorUtilsModule,
[PRIMARY_400, 0.6])};
object.sensitivityDefault = {flex: 1, backgroundColor: Reflect.apply(hexWithOpacity, ColorUtilsModule, [PRIMARY_400,
0.6])};
GREEN_360 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.GREEN_360;
object2.sensitivitySpeaking = {flex: 1, backgroundColor: GREEN_360};
object2.sensitivitySlider = {'flex': 1, 'backgroundColor': 'transparent', 'marginVertical': -10};
const env0_14 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/common/VoiceSensitivity.tsx');
object.sensitivitySpeaking = {flex: 1, backgroundColor: GREEN_360};
object.sensitivitySlider = {'flex': 1, 'backgroundColor': 'transparent', 'marginVertical': -10};
const env0_14 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('components_native/common/VoiceSensitivity.tsx');
exports.default = VoiceSensitivity;
}
function VoiceSensitivity({auto, threshold, onThresholdChange}) { // fn#83009, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11004:1075, offset: 0x01f09df2, size: 1377 bytes, params: 2, frame: 34
var r15;
var AccessibilityFocusView;
var object;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var items7;
var FormHint;
const styles = useStyles();
const value4 = threshold + 100;
const binding = env0_5;
const value5 = binding.useRef(null);
const value6 = binding.useRef(null);
const value7 = binding.useRef(null);
let useState = binding.useState;
const value8 = Reflect.apply(useState, binding, [SpeakingStore.isCurrentUserSpeaking()]);
const binding2 = env0_4;
const value9 = binding2(value8, 2);
const property = value9[0];
const env0_3 = value9[1];
const width = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)().width;
const value11 = (require(566) /* metro dependency 566: flux */).useStateFromStores([AppStateStore], function() {
return AppStateStore.getState();
}, []);
useState = binding.useState;
const value12 = binding2(Reflect.apply(useState, binding, [0]), 2);
const property2 = value12[0];
const env0_7 = value12[1];
useState = binding.useState;
const value13 = binding2(Reflect.apply(useState, binding, [value4]), 2);
const property3 = value13[0];
const env0_9 = value13[1];
useState = binding.useState;
const value14 = binding2(Reflect.apply(useState, binding, [property3 / 100]), 2);
const property4 = value14[0];
const env0_10 = value14[1];
useState = binding.useState;
const value15 = binding2(Reflect.apply(useState, binding, [width * (1 - property2 / -100)]), 2);
const property5 = value15[0];
const env0_11 = value15[1];
binding.useEffect(_fun83011, [auto, property3]);
binding.useEffect(_fun83012, [auto, property2, width]);
const value16 = binding.useCallback(_fun83013, []);
const value17 = binding.useCallback(_fun83014, []);
binding.useEffect(_fun83015, [value16, value11]);
const env0_13 = binding.useRef(false);
const env0_14 = binding.useRef(false);
const env0_15 = binding.useRef(null);
binding.useEffect(_fun83021, [auto, property]);
if (auto) {
r15 = property ? styles.sensitivitySpeaking : styles.sensitivityDefault;
AccessibilityFocusView = (require(1305) /* metro dependency 1305: native */).AccessibilityFocusView;
object = {'accessible': true, 'role': 'meter', 'aria-label': null, 'aria-valuenow': null, 'aria-valuemin': 0,
'aria-valuemax': 100};
string = intl.string;
object['aria-label'] = Reflect.apply(string, intl, [t.yZcOjo]);
object['aria-valuenow'] = property ? 100 : 0;
string = intl.string;
object['aria-valuetext'] = property ? Reflect.apply(string, intl, [t.haLKZ0]) : Reflect.apply(string, intl,
[t.X2hJL7]);
object.onAccessibilityFocus = onAccessibilityFocus;
object.onAccessibilityBlur = onAccessibilityBlur;
object.style = styles.sensitivity;
items7 = [<AccessibilityFocusView {...object}><View style={styles.sensitivityBar}><View style={[styles.sensitivityCommon,
r15]} /></View></AccessibilityFocusView>];
FormHint = (require(7972) /* metro dependency 7972: native */).FormHint;
string = intl.string;
items7[1] = <FormHint inset>{Reflect.apply(string, intl, [t.W3K5Im])}</FormHint>;
function VoiceSensitivity({auto, threshold, onThresholdChange}) { // fn#83009, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11004:1075, offset: 0x01f09df2, size: 1377 bytes, params: 2, frame: 34
var r15;
var AccessibilityFocusView;
var object2;
const intl = (IndexNativeModule).intl;
var string;
const t = (IndexNativeModule).t;
var items7;
var FormHint;
const styles = useStyles();
const value4 = threshold + 100;
const value5 = ReactModule.useRef(null);
const value6 = ReactModule.useRef(null);
const value7 = ReactModule.useRef(null);
let useState = ReactModule.useState;
const speakingStoreBinding = SpeakingStore;
const value8 = Reflect.apply(useState, ReactModule, [speakingStoreBinding.isCurrentUserSpeaking()]);
const value9 = Module00057(value8, 2);
const property = value9[0];
const env0_3 = value9[1];
const width = (UseWindowDimensionsNative)().width;
const value11 = (require(566) /* metro dependency 566: flux */).useStateFromStores([AppStateStore], function() {
return AppStateStore.getState();
}, []);
useState = ReactModule.useState;
const value12 = Module00057(Reflect.apply(useState, ReactModule, [0]), 2);
const property2 = value12[0];
const env0_7 = value12[1];
useState = ReactModule.useState;
const value13 = Module00057(Reflect.apply(useState, ReactModule, [value4]), 2);
const property3 = value13[0];
const env0_9 = value13[1];
useState = ReactModule.useState;
const value14 = Module00057(Reflect.apply(useState, ReactModule, [property3 / 100]), 2);
const property4 = value14[0];
const env0_10 = value14[1];
useState = ReactModule.useState;
const value15 = Module00057(Reflect.apply(useState, ReactModule, [width * (1 - property2 / -100)]), 2);
const property5 = value15[0];
const env0_11 = value15[1];
ReactModule.useEffect(_fun83011, [auto, property3]);
ReactModule.useEffect(_fun83012, [auto, property2, width]);
const value16 = ReactModule.useCallback(_fun83013, []);
const value17 = ReactModule.useCallback(_fun83014, []);
ReactModule.useEffect(_fun83015, [value16, value11]);
const env0_13 = ReactModule.useRef(false);
const env0_14 = ReactModule.useRef(false);
const env0_15 = ReactModule.useRef(null);
ReactModule.useEffect(_fun83021, [auto, property]);
if (auto) {
r15 = property ? styles.sensitivitySpeaking : styles.sensitivityDefault;
AccessibilityFocusView = (require(1305) /* metro dependency 1305: native */).AccessibilityFocusView;
object2 = {'accessible': true, 'role': 'meter', 'aria-label': null, 'aria-valuenow': null, 'aria-valuemin': 0,
'aria-valuemax': 100};
string = intl.string;
object2['aria-label'] = Reflect.apply(string, intl, [t.yZcOjo]);
object2['aria-valuenow'] = property ? 100 : 0;
string = intl.string;
object2['aria-valuetext'] = property ? Reflect.apply(string, intl, [t.haLKZ0]) : Reflect.apply(string, intl,
[t.X2hJL7]);
object2.onAccessibilityFocus = onAccessibilityFocus;
object2.onAccessibilityBlur = onAccessibilityBlur;
object2.style = styles.sensitivity;
items7 = [
<AccessibilityFocusView {...object2}>
<View style={styles.sensitivityBar}>
<View style={[styles.sensitivityCommon, r15]} />
</View>
</AccessibilityFocusView>,
];
FormHint = (require(7972) /* metro dependency 7972: native */).FormHint;
string = intl.string;
items7[1] = (
<FormHint inset>
{Reflect.apply(string, intl, [t.W3K5Im])}
</FormHint>
);
return (
<View>
{items7}
</View>
);
}
const items4 = [
<View style={styles.sensitivityBar}>
<View ref={value5} style={[styles.sensitivityCommon, styles.sensitivityMin, {flex: property4}]} />
<View ref={value6} style={[styles.sensitivityCommon, styles.sensitivityMax, {flex: 1 - property4}]} />
</View>,
];
items4[1] = <View ref={value7} style={[styles.sensitivityFill, {left: property5}]} />;
const defaultImport = Module07992;
items4[2] = ((Component) => <Component style={styles.sensitivitySlider} value={value4} minimumValue={0} maximumValue={100} minimumTrackTintColor="transparent" maximumTrackTintColor="transparent" onValueChange={value17} onSlidingComplete={function(a0) {
onThresholdChange(-1 * (100 - a0));
}} onResponderGrant={PlatformUtilsModule.isAndroid() ? function() {
return true;
} : undefined} />)(defaultImport);
return (
<View>
{items7}
<View style={styles.sensitivity}>
{items4}
</View>
);
}
const items4 = [<View style={styles.sensitivityBar}><View ref={value5} style={[styles.sensitivityCommon,
styles.sensitivityMin, {flex: property4}]} /><View ref={value6} style={[styles.sensitivityCommon,
styles.sensitivityMax, {flex: 1 - property4}]} /></View>];
items4[1] = <View ref={value7} style={[styles.sensitivityFill, {left: property5}]} />;
const defaultImport = importDefault(7992) /* metro dependency 7992 */;
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
items4[2] = ((Component) => <Component style={styles.sensitivitySlider} value={value4} minimumValue={0} maximumValue={100} minimumTrackTintColor="transparent" maximumTrackTintColor="transparent" onValueChange={value17} onSlidingComplete={function(a0) {
onThresholdChange(-1 * (100 - a0));
}} onResponderGrant={platformUtilsModule.isAndroid() ? function() {
return true;
} : undefined} />)(defaultImport);
return (
<View style={styles.sensitivity}>
{items4}
</View>
);
}
function _fun83011() { // fn#83011, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11004:1535, offset: 0x01f0a366, size: 36 bytes, params: 1, frame: 11
if (!auto) {
env0_10(env0_8 / 100);
}
}
function _fun83012() { // fn#83012, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11004:1574, offset: 0x01f0a38a, size: 54 bytes, params: 1, frame: 12
if (!auto) {
env0_11(width * (1 - env0_6 / -100));
}
}
function _fun83013(a0, a1) { // fn#83013, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11004:1630, offset: 0x01f0a3c0, size: 31 bytes, params: 3, frame: 12
env0_3(a1);
env0_7(a0);
}
function _fun83014(a0) { // fn#83014, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11004:1671, offset: 0x01f0a3df, size: 19 bytes, params: 2, frame: 11
env0_9(a0);
}
function _fun83015() { // fn#83015, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11004:1699, offset: 0x01f0a3f2, size: 69 bytes, params: 1, frame: 10
const binding = env0_5;
const ACTIVE = AppStates.ACTIVE;
if (binding === ACTIVE) {
(function() {
return _listenOnlyIfWeHavePermission.apply(this, arguments);
})();
return _fun83020;
}
}
function _fun83021() { // fn#83021, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11004:2261, offset: 0x01f0a571, size: 254 bytes, params: 1, frame: 18
var environment;
var autoBinding;
var binding;
var binding2;
var clearTimeout;
var AccessibilityAnnouncer;
var announce;
var intl;
if (env0_13.current) {
autoBinding = auto;
binding = env0_14;
if (autoBinding) {
if (binding.current) {
binding = env0_2;
binding2 = env0_15;
if (binding) {
if (binding2.current != null) {
clearTimeout = global.clearTimeout;
binding = env0_15;
clearTimeout(binding.current);
binding.current = null;
}
value = environment.__proto__;
AccessibilityAnnouncer = (require(3869) /* metro dependency 3869: AccessibilityAnnouncerAndroid */).AccessibilityAnnouncer;
announce = AccessibilityAnnouncer.announce;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
Reflect.apply(announce, AccessibilityAnnouncer,
[intl.string((require(1244) /* metro dependency 1244: indexNative */).t.haLKZ0)]);
} else {
binding2.current = global.setTimeout(_fun83022, 1000);
}
return _fun83023;
function _fun83011() { // fn#83011, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11004:1535, offset: 0x01f0a366, size: 36 bytes, params: 1, frame: 11
if (!auto) {
env0_10(env0_8 / 100);
}
return undefined;
}
binding.current = false;
} else {
env0_13.current = true;
}
}
function _listenOnlyIfWeHavePermission() { // fn#83016, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11004:1927, offset: 0x01f0a437, size: 53 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__.__proto__;
return env2_3(_fun83018).apply(this, arguments);
}
function _fun83020() { // fn#83020, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11004:1839, offset: 0x01f0a520, size: 81 bytes, params: 1, frame: 14
const mediaEngine = MediaEngineStore.getMediaEngine();
const removeListener = mediaEngine.removeListener;
const MediaEngineEvent = (require(4406) /* metro dependency 4406: mediaEngine */).MediaEngineEvent;
const VoiceActivity = MediaEngineEvent.VoiceActivity;
Reflect.apply(removeListener, mediaEngine, [VoiceActivity, env1_12]);
}
function _fun83022() { // fn#83022, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11004:2471, offset: 0x01f0a66f, size: 106 bytes, params: 1, frame: 16
env1_15.current = null;
const AccessibilityAnnouncer = (require(3869) /* metro dependency 3869: AccessibilityAnnouncerAndroid */).AccessibilityAnnouncer;
const announce = AccessibilityAnnouncer.announce;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const X2hJL7 = (require(1244) /* metro dependency 1244: indexNative */).t.X2hJL7;
Reflect.apply(announce, AccessibilityAnnouncer, [Reflect.apply(string, intl, [X2hJL7])]);
}
function* _fun83018() { // fn#83018, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11004:2008, offset: 0x01f0a477, size: 169 bytes, params: 1, frame: 17
var mediaEngine;
var on;
var VoiceActivity;
if (true) {
value = environment.__proto__.__proto__.__proto__.__proto__;
var binding = env4_1;
var value3 = binding(env4_2[15]);
var hasPermission = value3.hasPermission;
var AUDIO = env4_11.AUDIO;
yield Reflect.apply(hasPermission, value3, [AUDIO, {showAuthorizationError: false}]);
var value4 = undefined;
if (false) {
return value4;
}
if (value4 && !auto) {
binding = env4_7;
mediaEngine = binding.getMediaEngine();
on = mediaEngine.on;
binding = env4_0;
VoiceActivity = binding(env4_2[16]).MediaEngineEvent.VoiceActivity;
value = environment.__proto__.__proto__.__proto__;
Reflect.apply(on, mediaEngine, [VoiceActivity, env3_12]);
}
function _fun83012() { // fn#83012, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11004:1574, offset: 0x01f0a38a, size: 54 bytes, params: 1, frame: 12
if (!auto) {
env0_11(width * (1 - ReactNativeModule.View / -100));
}
}
function _fun83013(a0, a1) { // fn#83013, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11004:1630, offset: 0x01f0a3c0, size: 31 bytes, params: 3, frame: 12
env0_3(a1);
env0_7(a0);
}
function _fun83014(a0) { // fn#83014, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11004:1671, offset: 0x01f0a3df, size: 19 bytes, params: 2, frame: 11
env0_9(a0);
}
function _fun83015() { // fn#83015, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11004:1699, offset: 0x01f0a3f2, size: 69 bytes, params: 1, frame: 10
const ACTIVE = AppStates.ACTIVE;
if (ReactModule === ACTIVE) {
(function() {
return _listenOnlyIfWeHavePermission.apply(this, arguments);
})();
return _fun83020;
}
function _listenOnlyIfWeHavePermission() { // fn#83016, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11004:1927, offset: 0x01f0a437, size: 53 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__.__proto__;
return env2_3(_fun83018).apply(this, arguments);
function* _fun83018() { // fn#83018, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11004:2008, offset: 0x01f0a477, size: 169 bytes, params: 1, frame: 17
var mediaEngine;
var on;
var VoiceActivity;
if (true) {
value = environment.__proto__.__proto__.__proto__.__proto__;
var binding = env4_1;
var value3 = binding(env4_2[15]);
var hasPermission = value3.hasPermission;
var AUDIO = env4_11.AUDIO;
yield Reflect.apply(hasPermission, value3, [AUDIO, {showAuthorizationError: false}]);
var value4 = undefined;
if (false) {
return value4;
}
if (value4 && !auto) {
binding = env4_7;
mediaEngine = binding.getMediaEngine();
on = mediaEngine.on;
binding = env4_0;
VoiceActivity = binding(env4_2[16]).MediaEngineEvent.VoiceActivity;
value = environment.__proto__.__proto__.__proto__;
Reflect.apply(on, mediaEngine, [VoiceActivity, env3_12]);
}
}
}
}
function _fun83020() { // fn#83020, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11004:1839, offset: 0x01f0a520, size: 81 bytes, params: 1, frame: 14
const mediaEngine = MediaEngineStore.getMediaEngine();
const removeListener = mediaEngine.removeListener;
const MediaEngineEvent = (MediaEngineModule).MediaEngineEvent;
const VoiceActivity = MediaEngineEvent.VoiceActivity;
Reflect.apply(removeListener, mediaEngine, [VoiceActivity, env1_12]);
}
}
function _fun83021() { // fn#83021, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11004:2261, offset: 0x01f0a571, size: 254 bytes, params: 1, frame: 18
var environment;
var autoBinding;
var binding;
var binding2;
var clearTimeout;
var AccessibilityAnnouncer;
var announce;
var intl;
if (env0_13.current) {
autoBinding = auto;
binding = env0_14;
if (autoBinding) {
if (binding.current) {
binding = env0_2;
binding2 = env0_15;
if (binding) {
if (binding2.current != null) {
clearTimeout = global.clearTimeout;
binding = env0_15;
clearTimeout(binding.current);
binding.current = null;
}
value = environment.__proto__;
AccessibilityAnnouncer = (require(3869) /* metro dependency 3869: AccessibilityAnnouncerAndroid */).AccessibilityAnnouncer;
announce = AccessibilityAnnouncer.announce;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
Reflect.apply(announce, AccessibilityAnnouncer,
[intl.string((require(1244) /* metro dependency 1244: indexNative */).t.haLKZ0)]);
} else {
binding2.current = global.setTimeout(_fun83022, 1000);
}
return _fun83023;
}
return undefined;
}
binding.current = false;
} else {
env0_13.current = true;
}
function _fun83022() { // fn#83022, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11004:2471, offset: 0x01f0a66f, size: 106 bytes, params: 1, frame: 16
env1_15.current = null;
const AccessibilityAnnouncer = (AccessibilityAnnouncerAndroidModule).AccessibilityAnnouncer;
const announce = AccessibilityAnnouncer.announce;
const intl = (IndexNativeModule).intl;
const string = intl.string;
const X2hJL7 = (IndexNativeModule).t.X2hJL7;
Reflect.apply(announce, AccessibilityAnnouncer, [Reflect.apply(string, intl, [X2hJL7])]);
}
function _fun83023() { // fn#83023, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11004:2580, offset: 0x01f0a6d9, size: 52 bytes, params: 1, frame: 13
var clearTimeout;
var binding;
if (env1_15.current != null) {
clearTimeout = global.clearTimeout;
binding = env1_15;
clearTimeout(binding.current);
binding.current = null;
}
}
}
function onAccessibilityFocus() { // fn#83024, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11004:3063, owner: VoiceSensitivity.onAccessibilityFocus, offset: 0x01f0a70d, size: 19 bytes, params: 1, frame: 2
env0_14.current = true;
}
function onAccessibilityBlur() { // fn#83025, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11004:3102, owner: VoiceSensitivity.onAccessibilityBlur, offset: 0x01f0a720, size: 64 bytes, params: 1, frame: 13
var clearTimeout;
var binding;
env0_14.current = false;
if (env0_15.current != null) {
clearTimeout = global.clearTimeout;
binding = env0_15;
clearTimeout(binding.current);
binding.current = null;
}
}
}
}
global.__d(_fun83008, 10818, [5, 57, 31, 27, 4259, 4607, 7030, 661, 4661, 33, 4501, 697, 4000, 1478, 566, 4662,
4406, 3869, 1244, 1305, 7972, 7992, 477,
2]) /* metro module 10818, dependencies: [5, 57, 31, 27, 4259, 4607, 7030, 661, 4661, 33, 4501, 697, 4000, 1478, 566, 4662, 4406, 3869, 1244, 1305, 7972, 7992, 477, 2] */;
@@ -1,77 +1,86 @@
/* Metro module 10272; source: components_native/common/VolumeSlider.tsx; dependencies: [31, 27, 4291, 33, 477, 4501, 697, 3860, 10273, 7992, 4615, 1244, 6711, 2] */
import Module07992 from '../../by-id/module-07992.jsx'; /* Metro dependency 7992 */
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 UseTokenModule from '../../design/tokens/native/useToken.tsx'; /* Metro dependency 3860 */
import * as ConstantsModule from '../../external/discord_common/js/packages/media-engine/Constants.tsx'; /* Metro dependency 4291 */
import * as CreateStylesModule from '../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as PerceptualVolumeUtilsModule from '../../utils/PerceptualVolumeUtils.tsx'; /* Metro dependency 4615 */
import * as VoiceNormalIconModule from '../../design/components/Icon/native/redesign/generated/VoiceNormalIcon.tsx'; /* Metro dependency 6711 */
import * as VoiceXIconModule from '../../design/components/Icon/native/redesign/generated/VoiceXIcon.tsx'; /* Metro dependency 10273 */
function _fun79715(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79715, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10458:6, offset: 0x01e5f0cf, size: 310 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const value = 0;
importAll(dependencyMap[value]);
const env0_3 = (require(27) /* metro dependency 27 */).View;
const env0_4 = (require(4291) /* metro dependency 4291: Constants */).MAX_EMBEDDED_VOLUME_PERCEPTUAL;
const value2 = require(33) /* metro dependency 33 */;
const env0_5 = value2.jsx;
const env0_6 = value2.jsxs;
const r9 = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid() ? value : 16;
const env0_7 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({volumerSlider: {'flexDirection': 'row',
const env0_7 = (CreateStylesModule).createStyles({volumerSlider: {'flexDirection': 'row',
'alignItems': 'center'}, leftIcon: {marginRight: r9}, rightIcon: {marginLeft: r9},
volumerSliderNative: {'flex': 1, 'marginVertical': -10, 'backgroundColor': 'transparent'}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/common/VolumeSlider.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/common/VolumeSlider.tsx');
exports.default = VolumeSlider;
}
function VolumeSlider(a0) { // fn#79716, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10458:430, offset: 0x01e5f205, size: 571 bytes, params: 2, frame: 32
var r10;
var moduleValue3;
const style = a0.style;
const maxTrackTintColor = a0.maxTrackTintColor;
const value = undefined;
const r13 = maxTrackTintColor !== value ? maxTrackTintColor : (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_400;
const value3 = a0.value;
const maxVolume = a0.maxVolume;
const r15 = maxVolume !== value ? maxVolume : MAX_EMBEDDED_VOLUME_PERCEPTUAL;
const env0_0 = a0.onValueChange;
const onResponderGrant = a0.onResponderGrant;
const object = {'style': 0, 'maxTrackTintColor': 0, 'value': 0, 'maxVolume': 0, 'onValueChange': 0,
'onResponderGrant': 0};
silentSetPrototypeOf(object, null, undefined);
const value5 = copyDataProperties({}, a0, object, value3);
const styles = useStyles();
const useToken = UseTokenModule.useToken;
const BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
const r14 = value5.minTrackColor ?? Reflect.apply(useToken, UseTokenModule, [BACKGROUND_BRAND]);
const items3 = [styles.volumerSlider, style];
const VoiceXIcon = (VoiceXIconModule).VoiceXIcon;
const items2 = [
<VoiceXIcon style={styles.leftIcon} />,
];
const defaultImport = Module07992;
const defaultImportProps = {style: styles.volumerSliderNative,
value: (PerceptualVolumeUtilsModule).amplitudeToPerceptual(value3),
minimumValue: 0, maximumValue: r15, minimumTrackTintColor: r14, maximumTrackTintColor: r13};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
defaultImportProps.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.xPHVBs);
defaultImportProps.onValueChange = onValueChange_79717;
if (onResponderGrant != null) {
r10 = onResponderGrant;
} else {
moduleValue3 = require(477) /* metro dependency 477: PlatformUtils */;
r10 = moduleValue3.isAndroid() ? function() {
return true;
} : value;
}
defaultImportProps.onResponderGrant = r10;
items2[1] = ((Component) => <Component {...defaultImportProps} />)(defaultImport);
const VoiceNormalIcon = (VoiceNormalIconModule).VoiceNormalIcon;
items2[2] = <VoiceNormalIcon style={styles.rightIcon} />;
return (
<View style={items3}>
{items2}
</View>
);
function VolumeSliderOnValueChange(a0) { // fn#79717, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10458:997, owner: VolumeSlider.onValueChange, offset: 0x01e5f440, size: 53 bytes, params: 2, frame: 13
const onValueChangeBinding = onValueChange;
let value = environment.__proto__;
value = require(4615) /* metro dependency 4615: PerceptualVolumeUtils */;
return onValueChangeBinding(value.perceptualToAmplitude(a0));
}
function VolumeSlider(a0) { // fn#79716, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10458:430, offset: 0x01e5f205, size: 571 bytes, params: 2, frame: 32
var r10;
var moduleValue3;
const style = a0.style;
const maxTrackTintColor = a0.maxTrackTintColor;
const value = undefined;
const r13 = maxTrackTintColor !== value ? maxTrackTintColor : (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_400;
const value3 = a0.value;
const maxVolume = a0.maxVolume;
const r15 = maxVolume !== value ? maxVolume : MAX_EMBEDDED_VOLUME_PERCEPTUAL;
const env0_0 = a0.onValueChange;
const onResponderGrant = a0.onResponderGrant;
const object2 = {'style': 0, 'maxTrackTintColor': 0, 'value': 0, 'maxVolume': 0, 'onValueChange': 0,
'onResponderGrant': 0};
silentSetPrototypeOf(object2, null, undefined);
const value5 = copyDataProperties({}, a0, object2, value3);
const styles = useStyles();
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
const useToken = useTokenModule.useToken;
const BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
const r14 = value5.minTrackColor ?? Reflect.apply(useToken, useTokenModule, [BACKGROUND_BRAND]);
const items3 = [styles.volumerSlider, style];
const VoiceXIcon = (require(10273) /* metro dependency 10273: VoiceXIcon */).VoiceXIcon;
const items2 = [<VoiceXIcon style={styles.leftIcon} />];
const defaultImport = importDefault(7992) /* metro dependency 7992 */;
const defaultImportProps = {style: styles.volumerSliderNative,
value: (require(4615) /* metro dependency 4615: PerceptualVolumeUtils */).amplitudeToPerceptual(value3),
minimumValue: 0, maximumValue: r15, minimumTrackTintColor: r14, maximumTrackTintColor: r13};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
defaultImportProps.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.xPHVBs);
defaultImportProps.onValueChange = onValueChange_79717;
if (onResponderGrant != null) {
r10 = onResponderGrant;
} else {
moduleValue3 = require(477) /* metro dependency 477: PlatformUtils */;
r10 = moduleValue3.isAndroid() ? function() {
return true;
} : value;
}
defaultImportProps.onResponderGrant = r10;
items2[1] = ((Component) => <Component {...defaultImportProps} />)(defaultImport);
const VoiceNormalIcon = (require(6711) /* metro dependency 6711: VoiceNormalIcon */).VoiceNormalIcon;
items2[2] = <VoiceNormalIcon style={styles.rightIcon} />;
return (
<View style={items3}>
{items2}
</View>
);
}
function VolumeSliderOnValueChange(a0) { // fn#79717, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10458:997, owner: VolumeSlider.onValueChange, offset: 0x01e5f440, size: 53 bytes, params: 2, frame: 13
const onValueChangeBinding = onValueChange;
let value = environment.__proto__;
value = require(4615) /* metro dependency 4615: PerceptualVolumeUtils */;
return onValueChangeBinding(value.perceptualToAmplitude(a0));
}
global.__d(_fun79715, 10272, [31, 27, 4291, 33, 477, 4501, 697, 3860, 10273, 7992, 4615, 1244, 6711,
2]) /* metro module 10272, dependencies: [31, 27, 4291, 33, 477, 4501, 697, 3860, 10273, 7992, 4615, 1244, 6711, 2] */;
@@ -1,58 +1,79 @@
/* Metro module 13187; source: components_native/common/color_picker/ColorBlock.tsx; dependencies: [31, 27, 33, 4501, 697, 673, 5278, 4000, 1305, 11365, 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 CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
function _fun100656(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100656, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13377:6, offset: 0x021f25ca, size: 251 bytes, params: 8, frame: 22
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const object = {'minWidth': 44, 'height': 44, 'borderRadius': null, 'marginHorizontal': 12, 'marginVertical': 8,
let value = ReactModule;
const createStyles = CreateStylesModule.createStyles;
const object2 = {'minWidth': 44, 'height': 44, 'borderRadius': null, 'marginHorizontal': 12, 'marginVertical': 8,
'justifyContent': 'center', 'alignItems': 'center'};
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xl;
const styles = Reflect.apply(createStyles, createStylesModule, [{colorBlock: object}]);
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xl;
const styles = Reflect.apply(createStyles, CreateStylesModule, [{colorBlock: object2}]);
value = value.memo(_fun100657);
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/common/color_picker/ColorBlock.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/common/color_picker/ColorBlock.tsx');
exports.default = value;
exports.useStyles = styles;
}
function _fun100657({color, style, selected, onSelect}) { // fn#100657, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13377:317, offset: 0x021f26c5, size: 655 bytes, params: 2, frame: 30
var r0;
var object3;
var items3;
var object4;
var PressableOpacity;
var moduleValue3;
var items2;
var object6;
selected = !(selected === undefined) && selected;
const styles = useStyles();
const colorUtilsModule = require(673) /* metro dependency 673: ColorUtils */;
const v = colorUtilsModule.int2hsv(color).v;
if (onSelect != null) {
PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
object3 = {accessibilityRole: 'button'};
moduleValue3 = require(4000) /* metro dependency 4000: ColorUtils */;
object3.accessibilityLabel = moduleValue3.hexToColorName(colorUtilsModule.int2hex(color), true);
object3.accessibilityState = {selected: selected};
object3.onPress = function() {
return onSelect(color);
};
items2 = [styles.colorBlock, style];
object6 = {};
object6.backgroundColor = (require(673) /* metro dependency 673: ColorUtils */).int2hex(color);
items2[2] = object6;
object3.style = items2;
r0 = <PressableOpacity {...object3}>{selected ? ((Icon) => <Icon source={importDefault(11365) /* metro dependency 11365 */} color={v < 0.5 ? (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE : (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BLACK} />)((require(1305) /* metro dependency 1305: native */).Icon) : null}</PressableOpacity>;
} else {
items3 = [styles.colorBlock, style];
object4 = {};
object4.backgroundColor = (require(673) /* metro dependency 673: ColorUtils */).int2hex(color);
items3[2] = object4;
r0 = <View style={items3}>{selected ? ((Icon) => <Icon source={importDefault(11365) /* metro dependency 11365 */} color={v < 0.5 ? (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE : (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BLACK} />)((require(1305) /* metro dependency 1305: native */).Icon) : null}</View>;
function _fun100657({color, style, selected, onSelect}) { // fn#100657, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13377:317, offset: 0x021f26c5, size: 655 bytes, params: 2, frame: 30
var r0;
var object;
var items3;
var object2;
var PressableOpacity;
var moduleValue3;
var items2;
var object5;
selected = !(selected === undefined) && selected;
const styles = useStyles();
const colorUtilsModule = require(673) /* metro dependency 673: ColorUtils */;
const v = colorUtilsModule.int2hsv(color).v;
if (onSelect != null) {
PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
object = {accessibilityRole: 'button'};
moduleValue3 = require(4000) /* metro dependency 4000: ColorUtils */;
object.accessibilityLabel = moduleValue3.hexToColorName(colorUtilsModule.int2hex(color), true);
object.accessibilityState = {selected: selected};
object.onPress = function() {
return onSelect(color);
};
items2 = [styles.colorBlock, style];
object5 = {};
object5.backgroundColor = (require(673) /* metro dependency 673: ColorUtils */).int2hex(color);
items2[2] = object5;
object.style = items2;
r0 = (
<PressableOpacity {...object}>
{
selected
? ((Icon) => <Icon source={importDefault(11365) /* metro dependency 11365 */} color={v < 0.5 ? (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE : (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BLACK} />)((require(1305) /* metro dependency 1305: native */).Icon)
: null
}
</PressableOpacity>
);
} else {
items3 = [styles.colorBlock, style];
object2 = {};
object2.backgroundColor = (require(673) /* metro dependency 673: ColorUtils */).int2hex(color);
items3[2] = object2;
r0 = (
<View style={items3}>
{
selected
? ((Icon) => <Icon source={importDefault(11365) /* metro dependency 11365 */} color={v < 0.5 ? (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE : (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BLACK} />)((require(1305) /* metro dependency 1305: native */).Icon)
: null
}
</View>
);
}
return r0;
}
return r0;
}
global.__d(_fun100656, 13187, [31, 27, 33, 4501, 697, 673, 5278, 4000, 1305, 11365,
2]) /* metro module 13187, dependencies: [31, 27, 33, 4501, 697, 673, 5278, 4000, 1305, 11365, 2] */;
@@ -1,29 +1,46 @@
/* Metro module 14391; source: components_native/common/color_picker/FormRoleColorPicker.tsx; dependencies: [31, 661, 33, 4501, 4080, 14392, 1962, 7972, 13187, 673, 2] */
import ColorBlock from './ColorBlock.tsx'; /* Metro dependency 13187 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as ColorUtilsModule from '../../../external/discord_common/js/shared/utils/ColorUtils.tsx'; /* Metro dependency 673 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as NativeModule from '../../../design/void/Form/native/index.tsx'; /* Metro dependency 7972 */
function _fun108935(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108935, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14588:6, offset: 0x02335188, size: 211 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(661) /* metro dependency 661: Constants */).DEFAULT_ROLE_COLOR;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
const env0_6 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({rowColorBlock: {'marginHorizontal': 0,
const env0_6 = (CreateStylesModule).createStyles({rowColorBlock: {'marginHorizontal': 0,
'marginVertical': 0, 'marginRight': 8, 'minWidth': 24, 'height': 24, 'borderRadius': 3}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/common/color_picker/FormRoleColorPicker.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/common/color_picker/FormRoleColorPicker.tsx');
exports.default = FormRoleColorPicker;
function FormRoleColorPicker({color = DEFAULT_ROLE_COLOR, disabled, onChange}) { // fn#108936, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14588:284, offset: 0x0233525b, size: 216 bytes, params: 2, frame: 22
disabled = !(disabled === undefined) && disabled;
const styles = useStyles();
const value2 = ReactModule.useCallback(_fun108937, [color, onChange]);
const FormRow = (NativeModule).FormRow;
return (
<FormRow
leading={((Component) => <Component color={color} style={styles.rowColorBlock} onSelect={value2} />)(ColorBlock)}
label={(ColorUtilsModule).int2hex(color)}
disabled={disabled}
onPress={value2}
/>
);
function _fun108937() { // fn#108937, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14588:378, offset: 0x02335333, size: 102 bytes, params: 1, frame: 17
let value = environment.__proto__;
const defaultImport = importDefault(dependencyMap[4]);
const openLazy = defaultImport.openLazy;
value = require(dependencyMap[6]);
value = value(dependencyMap[5], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport, [value, 'RoleColorPicker', {color: env0_0, onSelect: onChange}]);
}
}
}
function FormRoleColorPicker({color = DEFAULT_ROLE_COLOR, disabled, onChange}) { // fn#108936, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14588:284, offset: 0x0233525b, size: 216 bytes, params: 2, frame: 22
disabled = !(disabled === undefined) && disabled;
const styles = useStyles();
const value2 = env0_3.useCallback(_fun108937, [color, onChange]);
const FormRow = (require(7972) /* metro dependency 7972: native */).FormRow;
return (
<FormRow
leading={((Component) => <Component color={color} style={styles.rowColorBlock} onSelect={value2} />)(importDefault(13187) /* metro dependency 13187: ColorBlock */)}
label={(require(673) /* metro dependency 673: ColorUtils */).int2hex(color)}
disabled={disabled}
onPress={value2}
/>
);
}
global.__d(_fun108935, 14391, [31, 661, 33, 4501, 4080, 14392, 1962, 7972, 13187, 673,
2]) /* metro module 14391, dependencies: [31, 661, 33, 4501, 4080, 14392, 1962, 7972, 13187, 673, 2] */;
@@ -1,11 +1,23 @@
/* Metro module 14392; source: components_native/common/color_picker/RoleColorPickerActionSheet.tsx; dependencies: [57, 31, 27, 661, 33, 4501, 697, 13187, 9625, 4080, 13189, 6275, 6758, 1244, 4578, 13797, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import ActionSheetActionCreators from '../../../modules/action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
import ColorBlock from './ColorBlock.tsx'; /* Metro dependency 13187 */
import ShowCustomColorPickerActionSheet from '../../../modules/color_picker/native/showCustomColorPickerActionSheet.tsx'; /* Metro dependency 13189 */
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 ButtonNativeModule from '../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as BottomSheetNativeModule from '../../../design/components/Sheet/native/BottomSheet.native.tsx'; /* Metro dependency 6275 */
import * as BottomSheetTitleHeaderNativeModule from '../../../design/components/Sheet/native/BottomSheetTitleHeader.native.tsx'; /* Metro dependency 6758 */
import * as UseIsWindowSmallModule from '../../../modules/screen/native/useIsWindowSmall.tsx'; /* Metro dependency 9625 */
import * as ColorBlockModule from './ColorBlock.tsx'; /* Metro dependency 13187 */
import * as EyeDropperIconModule from '../../../design/components/Icon/native/redesign/generated/EyeDropperIcon.tsx'; /* Metro dependency 13797 */
function _fun108938(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108938, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14589:6, offset: 0x02335399, size: 433 bytes, params: 8, frame: 23
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_5 = value.View;
const env0_6 = value.Pressable;
value = require(661) /* metro dependency 661: Constants */;
@@ -30,104 +42,107 @@ function _fun108938(global, require, importDefault, importAll, module, exports,
object.colorWrap = {'flexGrow': 1, 'flexDirection': 'row', 'flexWrap': 'wrap', 'justifyContent': 'center',
'maxWidth': 340, marginBottom: PX_16};
const env0_11 = Reflect.apply(createStyles, value, [object]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/common/color_picker/RoleColorPickerActionSheet.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/common/color_picker/RoleColorPickerActionSheet.tsx');
exports.default = RoleColorPickerActionSheet;
}
function RoleColorPickerActionSheet({color, onSelect, confirmLabel, defaultColor = DEFAULT_ROLE_COLOR}) { // fn#108939, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14589:664, offset: 0x0233554a, size: 883 bytes, params: 2, frame: 30
var object4;
var r6;
var object2;
const styles = useStyles();
const styles2 = (require(13187) /* metro dependency 13187: ColorBlock */).useStyles();
const env0_3 = styles2;
const binding = undefined;
const [property, env0_5] = env0_3(binding.useState(color), 2);
const value5 = binding.useMemo(_fun108940,
[(require(9625) /* metro dependency 9625: useIsWindowSmall */).useIsWindowSmall(), styles2.colorBlock]);
const value6 = binding.useCallback(_fun108941, [property, onSelect]);
const env0_8 = binding.useCallback(_fun108942, []);
const value7 = binding.useCallback(_fun108943, [color, onSelect]);
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
object4 = {};
const BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const WTqQ5e = (require(1244) /* metro dependency 1244: indexNative */).t.WTqQ5e;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
if (confirmLabel != null) {
r6 = {'size': 'sm', 'variant': 'secondary', text: confirmLabel, onPress: value6};
} else {
object2 = {size: 'sm'};
object2.text = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['R3BPH+']);
object2.onPress = value6;
r6 = object2;
}
object4.header = <BottomSheetTitleHeader title={Reflect.apply(string, intl,
[WTqQ5e])} trailing={<Button {...r6} />} />;
const value8 = env0_10.map(_fun108944);
const pressableProps = {style: value5, onPress: value7,
accessibilityLabel: intl.string((require(1244) /* metro dependency 1244: indexNative */).t['/fkc8a']),
accessibilityRole: 'button'};
const EyeDropperIcon = (require(13797) /* metro dependency 13797: EyeDropperIcon */).EyeDropperIcon;
return (
<BottomSheet {...object4}>
<View style={styles.body}>
<View style={styles.colorWrap}>
{value8}
<Pressable {...pressableProps}>
<EyeDropperIcon size="lg" />
</Pressable>
</View>
<Button
variant="secondary"
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.yBZMsQ)}
onPress={onPress_108945}
/>
</View>
</BottomSheet>
);
}
function _fun108940() { // fn#108940, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14589:867, offset: 0x023358bd, size: 63 bytes, params: 1, frame: 13
var r0;
var object2;
const binding = env0_6;
const colorBlock = styles.colorBlock;
if (binding) {
function RoleColorPickerActionSheet({color, onSelect, confirmLabel, defaultColor = DEFAULT_ROLE_COLOR}) { // fn#108939, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14589:664, offset: 0x0233554a, size: 883 bytes, params: 2, frame: 30
var object2;
var r6;
var object;
const styles = useStyles();
const styles2 = (ColorBlockModule).useStyles();
const styles22 = styles2;
const binding = undefined;
const [property, env0_5] = styles22(binding.useState(color), 2);
const value5 = binding.useMemo(_fun108940,
[(UseIsWindowSmallModule).useIsWindowSmall(), styles2.colorBlock]);
const value6 = binding.useCallback(_fun108941, [property, onSelect]);
const env0_8 = binding.useCallback(_fun108942, []);
const value7 = binding.useCallback(_fun108943, [color, onSelect]);
const BottomSheet = (BottomSheetNativeModule).BottomSheet;
object2 = {};
copyDataProperties(object2, colorBlock, undefined);
object2['minWidth'] = 38;
object2['height'] = 38;
r0 = object2;
} else {
r0 = colorBlock;
const BottomSheetTitleHeader = (BottomSheetTitleHeaderNativeModule).BottomSheetTitleHeader;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const WTqQ5e = (require(1244) /* metro dependency 1244: indexNative */).t.WTqQ5e;
const Button = (ButtonNativeModule).Button;
if (confirmLabel != null) {
r6 = {'size': 'sm', 'variant': 'secondary', text: confirmLabel, onPress: value6};
} else {
object = {size: 'sm'};
object.text = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['R3BPH+']);
object.onPress = value6;
r6 = object;
}
object2.header = <BottomSheetTitleHeader title={Reflect.apply(string, intl,
[WTqQ5e])} trailing={<Button {...r6} />} />;
const value8 = env0_10.map(_fun108944);
const pressableProps = {style: value5, onPress: value7,
accessibilityLabel: intl.string((require(1244) /* metro dependency 1244: indexNative */).t['/fkc8a']),
accessibilityRole: 'button'};
const EyeDropperIcon = (EyeDropperIconModule).EyeDropperIcon;
return (
<BottomSheet {...object2}>
<View style={styles.body}>
<View style={styles.colorWrap}>
{value8}
<Pressable {...pressableProps}>
<EyeDropperIcon size="lg" />
</Pressable>
</View>
<Button
variant="secondary"
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.yBZMsQ)}
onPress={onPress_108945}
/>
</View>
</BottomSheet>
);
function _fun108940() { // fn#108940, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14589:867, offset: 0x023358bd, size: 63 bytes, params: 1, frame: 13
var r0;
var object;
const binding = env0_6;
const colorBlock = styles.colorBlock;
if (binding) {
object = {};
copyDataProperties(object, colorBlock, undefined);
object['minWidth'] = 38;
object['height'] = 38;
r0 = object;
} else {
r0 = colorBlock;
}
return r0;
}
function _fun108941() { // fn#108941, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14589:962, offset: 0x023358fc, size: 53 bytes, params: 1, frame: 12
onSelect(ReactModule);
const value = environment.__proto__;
(ActionSheetActionCreators).hideActionSheet();
}
function _fun108942(a0) { // fn#108942, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14589:1024, offset: 0x02335931, size: 19 bytes, params: 2, frame: 11
env0_5(a0);
}
function _fun108943() { // fn#108943, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14589:1056, offset: 0x02335944, size: 54 bytes, params: 1, frame: 13
const value = environment.__proto__;
(ShowCustomColorPickerActionSheet)({color: color,
onSelect: onSelect});
}
function _fun108944(a0) { // fn#108944, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14589:1454, offset: 0x0233597a, size: 80 bytes, params: 2, frame: 17
const value = environment.__proto__;
return ((Component) => <Component color={a0} style={env0_7} selected={a0 === ReactModule} onSelect={env0_8} key={a0} />)(ColorBlock);
}
function RoleColorPickerActionSheetOnPress() { // fn#108945, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14589:1773, owner: RoleColorPickerActionSheet.onPress, offset: 0x023359ca, size: 20 bytes, params: 1, frame: 11
env0_5(env0_2);
}
}
return r0;
}
function _fun108941() { // fn#108941, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14589:962, offset: 0x023358fc, size: 53 bytes, params: 1, frame: 12
onSelect(env0_4);
const value = environment.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
}
function _fun108942(a0) { // fn#108942, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14589:1024, offset: 0x02335931, size: 19 bytes, params: 2, frame: 11
env0_5(a0);
}
function _fun108943() { // fn#108943, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14589:1056, offset: 0x02335944, size: 54 bytes, params: 1, frame: 13
const value = environment.__proto__;
(importDefault(13189) /* metro dependency 13189: showCustomColorPickerActionSheet */)({color: color,
onSelect: onSelect});
}
function _fun108944(a0) { // fn#108944, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14589:1454, offset: 0x0233597a, size: 80 bytes, params: 2, frame: 17
const value = environment.__proto__;
return ((Component) => <Component color={a0} style={env0_7} selected={a0 === env0_4} onSelect={env0_8} key={a0} />)(importDefault(13187) /* metro dependency 13187: ColorBlock */);
}
function RoleColorPickerActionSheetOnPress() { // fn#108945, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14589:1773, owner: RoleColorPickerActionSheet.onPress, offset: 0x023359ca, size: 20 bytes, params: 1, frame: 11
env0_5(env0_2);
}
global.__d(_fun108938, 14392, [57, 31, 27, 661, 33, 4501, 697, 13187, 9625, 4080, 13189, 6275, 6758, 1244, 4578,
13797,
2]) /* metro module 14392, dependencies: [57, 31, 27, 661, 33, 4501, 697, 13187, 9625, 4080, 13189, 6275, 6758, 1244, 4578, 13797, 2] */;
@@ -1,277 +1,292 @@
/* Metro module 16131; source: components_native/invite/AdvancedInstantInvite.tsx; dependencies: [6, 7, 15, 17, 18, 31, 1379, 9152, 1867, 3784, 661, 33, 9158, 4647, 1244, 5282, 5277, 16132, 694, 16133, 9153, 566, 44, 22, 1484, 2] */
import ClassCallCheck from '../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import Module00044 from '../../by-id/module-00044.js'; /* Metro dependency 44 */
import ChannelStore from '../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import GuildStore from '../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import PermissionStore from '../../stores/PermissionStore.tsx'; /* Metro dependency 3784 */
import CreateInviteModalStore from '../../stores/CreateInviteModalStore.tsx'; /* Metro dependency 9152 */
import InstantInviteUtils from '../../utils/InstantInviteUtils.tsx'; /* Metro dependency 9153 */
import CreateInviteModalActionCreators from '../../actions/CreateInviteModalActionCreators.tsx'; /* Metro dependency 9158 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as moduleValue2 from '../../by-id/module-00022.js'; /* Metro dependency 22 */
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 FluxModule from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as UseNavigationNativeModule from '../../design/components/Navigator/native/useNavigation.native.tsx'; /* Metro dependency 1484 */
function _fun124548(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#124548, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16339:6, offset: 0x025bcd85, size: 337 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
const value = importAll(31) /* metro dependency 31 */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const createInviteModalStore = importDefault(9152) /* metro dependency 9152: CreateInviteModalStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
const env0_12 = (require(661) /* metro dependency 661: Constants */).Permissions;
const env0_13 = (require(33) /* metro dependency 33 */).jsx;
const PureComponent = value.PureComponent;
const PureComponent = ReactModule.PureComponent;
const env0_14 = _fun124552(PureComponent);
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/invite/AdvancedInstantInvite.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/invite/AdvancedInstantInvite.tsx');
exports.default = _default_124569;
}
function _isNativeReflectConstruct_124549() { // fn#124549, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16339:236, offset: 0x025bced6, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
function _isNativeReflectConstruct_124549() { // fn#124549, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16339:236, offset: 0x025bced6, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_124549_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_124549_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun124552(a0) { // fn#124552, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16339:435, offset: 0x025bcf38, size: 177 bytes, params: 2, frame: 17
const closure = AdvancedInstantInviteContainer;
env0_7(closure, a0);
return env0_4(closure, [{key: 'componentDidMount', value: value_124564}, {key: 'componentDidUpdate',
value: function(a0) {
if (this.props.changed !== a0.changed) {
function _fun124552(a0) { // fn#124552, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16339:435, offset: 0x025bcf38, size: 177 bytes, params: 2, frame: 17
const AdvancedInstantInviteContainer2 = AdvancedInstantInviteContainer;
Inherits(AdvancedInstantInviteContainer2, a0);
return CreateClass(AdvancedInstantInviteContainer2, [{key: 'componentDidMount', value: value_124564},
{key: 'componentDidUpdate', value: function(a0) {
if (this.props.changed !== a0.changed) {
this.updateHeader();
}
}}, {key: 'componentWillUnmount', value: value_124566}, {key: 'render', value: value_124567}],
[{key: 'getDerivedStateFromProps', value: function(a0, a1) {
var channel = a0.channel;
var value = null;
return channel === a1.cachedChannel ? value : value != a0.channel ? {cachedChannel: a0.channel} : value;
}}]);
function AdvancedInstantInviteContainer(a0) { // fn#124553, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16339:447, offset: 0x025bcfe9, size: 259 bytes, params: 2, frame: 20
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_3;
binding(this, AdvancedInstantInviteContainer);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_6(AdvancedInstantInviteContainer);
binding = env1_5;
if (_isNativeReflectConstruct_124549()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_6(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
value.state = {cachedChannel: value.props.channel};
value.handleChangeMaxUses = handleChangeMaxUses;
value.handleChangeMaxAge = handleChangeMaxAge;
value.handleChangeTemporary = handleChangeTemporary;
value.handleChangeFlags = handleChangeFlags;
value.handleChangeRoleIds = handleChangeRoleIds;
value.handlePressCancel = handlePressCancel;
value.handlePressSave = handlePressSave;
value.updateHeader = updateHeader;
return value;
function handleChangeMaxUses(a0) { // fn#124554, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16339:785, owner: AdvancedInstantInviteContainer.handleChangeMaxUses, offset: 0x025bd0ec, size: 48 bytes, params: 2, frame: 13
const value = environment.__proto__.__proto__;
(CreateInviteModalActionCreators).updateSettings({maxUses: a0});
}
function handleChangeMaxAge(a0) { // fn#124555, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16339:848, owner: AdvancedInstantInviteContainer.handleChangeMaxAge, offset: 0x025bd11c, size: 48 bytes, params: 2, frame: 13
const value = environment.__proto__.__proto__;
(CreateInviteModalActionCreators).updateSettings({maxAge: a0});
}
function handleChangeTemporary(a0) { // fn#124556, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16339:913, owner: AdvancedInstantInviteContainer.handleChangeTemporary, offset: 0x025bd14c, size: 48 bytes, params: 2, frame: 13
const value = environment.__proto__.__proto__;
(CreateInviteModalActionCreators).updateSettings({temporary: a0});
}
function handleChangeFlags(a0) { // fn#124557, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16339:977, owner: AdvancedInstantInviteContainer.handleChangeFlags, offset: 0x025bd17c, size: 47 bytes, params: 2, frame: 13
const value = environment.__proto__.__proto__;
(CreateInviteModalActionCreators).updateSettings({flags: a0});
}
function handleChangeRoleIds(a0) { // fn#124558, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16339:1039, owner: AdvancedInstantInviteContainer.handleChangeRoleIds, offset: 0x025bd1ab, size: 48 bytes, params: 2, frame: 13
const value = environment.__proto__.__proto__;
(CreateInviteModalActionCreators).updateSettings({roleIds: a0});
}
function handlePressCancel() { // fn#124559, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16339:1101, owner: AdvancedInstantInviteContainer.handlePressCancel, offset: 0x025bd1db, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__.__proto__;
(CreateInviteModalActionCreators).close();
}
function handlePressSave() { // fn#124560, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16339:1142, owner: AdvancedInstantInviteContainer.handlePressSave, offset: 0x025bd200, size: 283 bytes, params: 1, frame: 22
var value2;
var permissionStoreBinding;
var defaultImport;
var show;
var object;
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
const channel = env0_0.props.channel;
if (channel == null) {
value = environment.__proto__.__proto__;
defaultImport = importDefault(4647) /* metro dependency 4647: AlertActionCreators */;
show = defaultImport.show;
object = {};
object.title = intl.string(t.VINpSK);
object.body = intl.string(t.RiiKV0);
object.onConfirm = (importDefault(9158) /* metro dependency 9158: CreateInviteModalActionCreators */).close;
Reflect.apply(show, defaultImport, [object]);
} else {
value2 = environment.__proto__.__proto__;
permissionStoreBinding = PermissionStore;
if (permissionStoreBinding.can(Permissions.CREATE_INSTANT_INVITE, channel)) {
(importDefault(9158) /* metro dependency 9158: CreateInviteModalActionCreators */).createInvite('IOS Regenerate');
env0_0.handlePressCancel();
} else {
value = environment.__proto__.__proto__;
defaultImport = importDefault(4647) /* metro dependency 4647: AlertActionCreators */;
show = defaultImport.show;
object = {};
object.title = intl.string(t.VINpSK);
object.body = intl.string(t.RiiKV0);
object.onConfirm = (importDefault(9158) /* metro dependency 9158: CreateInviteModalActionCreators */).close;
Reflect.apply(show, defaultImport, [object]);
}
}
}
function updateHeader() { // fn#124561, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16339:1424, owner: AdvancedInstantInviteContainer.updateHeader, offset: 0x025bd31b, size: 61 bytes, params: 1, frame: 13
const navigation = env0_0.props.navigation;
navigation.setOptions({headerLeft: headerLeft_124562, headerRight: headerRight_124563});
function updateHeaderHeaderLeft(a0) { // fn#124562, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16339:1471, owner: AdvancedInstantInviteContainer.updateHeader.headerLeft, offset: 0x025bd358, size: 119 bytes, params: 2, frame: 13
var value4;
var moduleValue;
let value = environment.__proto__;
const binding = env1_0;
let r0 = binding.props.changed || binding.props.navigation.getState().routes.length === 1;
if (r0) {
value4 = environment.__proto__.__proto__.__proto__;
moduleValue = require(5282) /* metro dependency 5282: NavigatorHeaderNative */;
value = moduleValue.getHeaderCloseButton(env1_0.handlePressCancel);
value = value(a0);
r0 = value;
}
return r0;
}
function updateHeaderHeaderRight() { // fn#124563, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16339:1624, owner: AdvancedInstantInviteContainer.updateHeader.headerRight, offset: 0x025bd3cf, size: 133 bytes, params: 1, frame: 19
var r0;
var value3;
var HeaderActionButton;
var intl;
const value = environment.__proto__;
if (env1_0.props.changed) {
value3 = environment.__proto__.__proto__.__proto__;
HeaderActionButton = (require(5277) /* metro dependency 5277: HeaderActionButtonNative */).HeaderActionButton;
var headerActionButtonProps = {onPress: env1_0.handlePressSave};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
headerActionButtonProps.text = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['R3BPH+']);
r0 = <HeaderActionButton {...headerActionButtonProps} />;
} else {
r0 = undefined;
}
return r0;
}
}
}
function value_124564() { // fn#124564, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16339:1871, offset: 0x025bd454, size: 315 bytes, params: 1, frame: 21
var r4;
var value2;
var guildId;
var show;
var object;
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
const channel = this.props.channel;
let value = null;
if (value == channel) {
value2 = environment.__proto__;
guildId = CreateInviteModalStore.getGuildId();
r4 = value != guildId ? (require(16132) /* metro dependency 16132: CreateInstantInviteUtils */).getInvitableChannelForGuild(guildId) : value;
if (value != r4) {
(importDefault(9158) /* metro dependency 9158: CreateInviteModalActionCreators */).updateSettings({channelId: r4.channel.id});
} else {
value = importDefault(4647) /* metro dependency 4647: AlertActionCreators */;
show = value.show;
object = {};
object.title = intl.string(t.VINpSK);
object.body = intl.string(t.kQ6fit);
object.onConfirm = this.props.navigation.pop;
Reflect.apply(show, value, [object]);
}
}
this.updateHeader();
}
}}, {key: 'componentWillUnmount', value: value_124566}, {key: 'render', value: value_124567}],
[{key: 'getDerivedStateFromProps', value: function(a0, a1) {
var channel = a0.channel;
var value = null;
return channel === a1.cachedChannel ? value : value != a0.channel ? {cachedChannel: a0.channel} : value;
}}]);
}
function _default_124569() { // fn#124569, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16339:2995, offset: 0x025bd6e4, size: 191 bytes, params: 1, frame: 19
const {settings, inviteSettings, channel,
guild} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([ChannelStore,
CreateInviteModalStore, GuildStore], _fun124570);
const moduleValue2 = require(22) /* metro dependency 22 */;
return ((Component) => <Component changed={!moduleValue2.isEqual(settings,
inviteSettings)} channel={channel} guild={guild} navigation={(require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation()} {...settings} />)(env0_14);
}
function AdvancedInstantInviteContainer(a0) { // fn#124553, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16339:447, offset: 0x025bcfe9, size: 259 bytes, params: 2, frame: 20
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_3;
binding(this, AdvancedInstantInviteContainer);
const items = [];
arraySpread(items, value, 0, items);
value = env1_6(AdvancedInstantInviteContainer);
binding = env1_5;
if (_isNativeReflectConstruct_124549()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items, env1_6(this).constructor);
r0 = value;
} else {
value = value.apply(this, items);
r0 = value;
}
value = binding(this, r0);
value.state = {cachedChannel: value.props.channel};
value.handleChangeMaxUses = handleChangeMaxUses;
value.handleChangeMaxAge = handleChangeMaxAge;
value.handleChangeTemporary = handleChangeTemporary;
value.handleChangeFlags = handleChangeFlags;
value.handleChangeRoleIds = handleChangeRoleIds;
value.handlePressCancel = handlePressCancel;
value.handlePressSave = handlePressSave;
value.updateHeader = updateHeader;
return value;
}
function value_124564() { // fn#124564, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16339:1871, offset: 0x025bd454, size: 315 bytes, params: 1, frame: 21
var r4;
var value2;
var guildId;
var show;
var object2;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const channel = this.props.channel;
let value = null;
if (value == channel) {
value2 = environment.__proto__;
guildId = CreateInviteModalStore.getGuildId();
r4 = value != guildId ? (require(16132) /* metro dependency 16132: CreateInstantInviteUtils */).getInvitableChannelForGuild(guildId) : value;
if (value != r4) {
(importDefault(9158) /* metro dependency 9158: CreateInviteModalActionCreators */).updateSettings({channelId: r4.channel.id});
} else {
value = importDefault(4647) /* metro dependency 4647: AlertActionCreators */;
show = value.show;
object2 = {};
object2.title = intl.string(t.VINpSK);
object2.body = intl.string(t.kQ6fit);
object2.onConfirm = this.props.navigation.pop;
Reflect.apply(show, value, [object2]);
function value_124566() { // fn#124566, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16339:2343, offset: 0x025bd5b8, size: 56 bytes, params: 1, frame: 14
let value = environment.__proto__;
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.wait((CreateInviteModalActionCreators).resetSettings);
}
}
this.updateHeader();
}
function value_124566() { // fn#124566, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16339:2343, offset: 0x025bd5b8, size: 56 bytes, params: 1, frame: 14
let value = environment.__proto__;
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.wait((importDefault(9158) /* metro dependency 9158: CreateInviteModalActionCreators */).resetSettings);
}
function value_124567() { // fn#124567, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16339:2414, offset: 0x025bd5f0, size: 188 bytes, params: 1, frame: 18
let value = environment.__proto__;
value = importDefault(16133) /* metro dependency 16133: AdvancedInstantInvite */;
const valueProps = {...this.props};
valueProps['channel'] = this.state.cachedChannel;
valueProps['onChangeMaxUses'] = this.handleChangeMaxUses;
valueProps['onChangeMaxAge'] = this.handleChangeMaxAge;
valueProps['onChangeTemporary'] = this.handleChangeTemporary;
valueProps['onChangeFlags'] = this.handleChangeFlags;
valueProps['onChangeRoleIds'] = this.handleChangeRoleIds;
const getMaxUsesOptions = (importDefault(9153) /* metro dependency 9153: InstantInviteUtils */).getMaxUsesOptions;
valueProps['maxUsesOptions'] = getMaxUsesOptions;
return ((Component) => <Component {...valueProps} />)(value);
}
function _fun124570() { // fn#124570, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16339:3064, offset: 0x025bd7a3, size: 165 bytes, params: 1, frame: 20
const value = environment.__proto__;
const pendingSettings = CreateInviteModalStore.getPendingSettings();
const value3 = undefined;
(importDefault(44) /* metro dependency 44 */)(pendingSettings != null, 'Received null pending invite settings');
const inviteSettings = CreateInviteModalStore.getInviteSettings();
(importDefault(44) /* metro dependency 44 */)(inviteSettings != null, 'Received null invite settings');
const channel = ChannelStore.getChannel(pendingSettings.channelId);
const getGuild = GuildStore.getGuild;
return {settings: pendingSettings, inviteSettings: inviteSettings, channel: channel, guild: Reflect.apply(getGuild,
GuildStore, [channel == null ? value3 : channel.getGuildId()])};
}
function handleChangeMaxUses(a0) { // fn#124554, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16339:785, owner: AdvancedInstantInviteContainer.handleChangeMaxUses, offset: 0x025bd0ec, size: 48 bytes, params: 2, frame: 13
const value = environment.__proto__.__proto__;
(importDefault(9158) /* metro dependency 9158: CreateInviteModalActionCreators */).updateSettings({maxUses: a0});
}
function handleChangeMaxAge(a0) { // fn#124555, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16339:848, owner: AdvancedInstantInviteContainer.handleChangeMaxAge, offset: 0x025bd11c, size: 48 bytes, params: 2, frame: 13
const value = environment.__proto__.__proto__;
(importDefault(9158) /* metro dependency 9158: CreateInviteModalActionCreators */).updateSettings({maxAge: a0});
}
function handleChangeTemporary(a0) { // fn#124556, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16339:913, owner: AdvancedInstantInviteContainer.handleChangeTemporary, offset: 0x025bd14c, size: 48 bytes, params: 2, frame: 13
const value = environment.__proto__.__proto__;
(importDefault(9158) /* metro dependency 9158: CreateInviteModalActionCreators */).updateSettings({temporary: a0});
}
function handleChangeFlags(a0) { // fn#124557, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16339:977, owner: AdvancedInstantInviteContainer.handleChangeFlags, offset: 0x025bd17c, size: 47 bytes, params: 2, frame: 13
const value = environment.__proto__.__proto__;
(importDefault(9158) /* metro dependency 9158: CreateInviteModalActionCreators */).updateSettings({flags: a0});
}
function handleChangeRoleIds(a0) { // fn#124558, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16339:1039, owner: AdvancedInstantInviteContainer.handleChangeRoleIds, offset: 0x025bd1ab, size: 48 bytes, params: 2, frame: 13
const value = environment.__proto__.__proto__;
(importDefault(9158) /* metro dependency 9158: CreateInviteModalActionCreators */).updateSettings({roleIds: a0});
}
function handlePressCancel() { // fn#124559, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16339:1101, owner: AdvancedInstantInviteContainer.handlePressCancel, offset: 0x025bd1db, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__.__proto__;
(importDefault(9158) /* metro dependency 9158: CreateInviteModalActionCreators */).close();
}
function handlePressSave() { // fn#124560, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16339:1142, owner: AdvancedInstantInviteContainer.handlePressSave, offset: 0x025bd200, size: 283 bytes, params: 1, frame: 22
var value2;
var defaultImport;
var show;
var object2;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const channel = env0_0.props.channel;
if (channel == null) {
value = environment.__proto__.__proto__;
defaultImport = importDefault(4647) /* metro dependency 4647: AlertActionCreators */;
show = defaultImport.show;
object2 = {};
object2.title = intl.string(t.VINpSK);
object2.body = intl.string(t.RiiKV0);
object2.onConfirm = (importDefault(9158) /* metro dependency 9158: CreateInviteModalActionCreators */).close;
Reflect.apply(show, defaultImport, [object2]);
} else {
value2 = environment.__proto__.__proto__;
if (PermissionStore.can(Permissions.CREATE_INSTANT_INVITE, channel)) {
(importDefault(9158) /* metro dependency 9158: CreateInviteModalActionCreators */).createInvite('IOS Regenerate');
env0_0.handlePressCancel();
} else {
value = environment.__proto__.__proto__;
defaultImport = importDefault(4647) /* metro dependency 4647: AlertActionCreators */;
show = defaultImport.show;
object2 = {};
object2.title = intl.string(t.VINpSK);
object2.body = intl.string(t.RiiKV0);
object2.onConfirm = (importDefault(9158) /* metro dependency 9158: CreateInviteModalActionCreators */).close;
Reflect.apply(show, defaultImport, [object2]);
function value_124567() { // fn#124567, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16339:2414, offset: 0x025bd5f0, size: 188 bytes, params: 1, frame: 18
let value = environment.__proto__;
value = importDefault(16133) /* metro dependency 16133: AdvancedInstantInvite */;
const valueProps = {...this.props};
valueProps['channel'] = this.state.cachedChannel;
valueProps['onChangeMaxUses'] = this.handleChangeMaxUses;
valueProps['onChangeMaxAge'] = this.handleChangeMaxAge;
valueProps['onChangeTemporary'] = this.handleChangeTemporary;
valueProps['onChangeFlags'] = this.handleChangeFlags;
valueProps['onChangeRoleIds'] = this.handleChangeRoleIds;
const getMaxUsesOptions = (InstantInviteUtils).getMaxUsesOptions;
valueProps['maxUsesOptions'] = getMaxUsesOptions;
return ((Component) => <Component {...valueProps} />)(value);
}
}
}
function updateHeader() { // fn#124561, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16339:1424, owner: AdvancedInstantInviteContainer.updateHeader, offset: 0x025bd31b, size: 61 bytes, params: 1, frame: 13
const navigation = env0_0.props.navigation;
navigation.setOptions({headerLeft: headerLeft_124562, headerRight: headerRight_124563});
}
function _default_124569() { // fn#124569, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16339:2995, offset: 0x025bd6e4, size: 191 bytes, params: 1, frame: 19
const {settings, inviteSettings, channel,
guild} = (FluxModule).useStateFromStoresObject([ChannelStore,
CreateInviteModalStore, GuildStore], _fun124570);
return ((Component) => <Component changed={!moduleValue2.isEqual(settings,
inviteSettings)} channel={channel} guild={guild} navigation={(UseNavigationNativeModule).useNavigation()} {...settings} />)(env0_14);
function _fun124570() { // fn#124570, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16339:3064, offset: 0x025bd7a3, size: 165 bytes, params: 1, frame: 20
const value = environment.__proto__;
const createInviteModalStoreBinding = CreateInviteModalStore;
const pendingSettings = createInviteModalStoreBinding.getPendingSettings();
const value3 = undefined;
(Module00044)(pendingSettings != null, 'Received null pending invite settings');
const inviteSettings = createInviteModalStoreBinding.getInviteSettings();
(Module00044)(inviteSettings != null, 'Received null invite settings');
const channel = ChannelStore.getChannel(pendingSettings.channelId);
const guildStoreBinding = GuildStore;
const getGuild = guildStoreBinding.getGuild;
return {settings: pendingSettings, inviteSettings: inviteSettings, channel: channel, guild: Reflect.apply(getGuild,
guildStoreBinding, [channel == null ? value3 : channel.getGuildId()])};
}
function updateHeaderHeaderLeft(a0) { // fn#124562, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16339:1471, owner: AdvancedInstantInviteContainer.updateHeader.headerLeft, offset: 0x025bd358, size: 119 bytes, params: 2, frame: 13
var value4;
var moduleValue;
let value = environment.__proto__;
const binding = env1_0;
let r0 = binding.props.changed || binding.props.navigation.getState().routes.length === 1;
if (r0) {
value4 = environment.__proto__.__proto__.__proto__;
moduleValue = require(5282) /* metro dependency 5282: NavigatorHeaderNative */;
value = moduleValue.getHeaderCloseButton(env1_0.handlePressCancel);
value = value(a0);
r0 = value;
}
return r0;
}
function updateHeaderHeaderRight() { // fn#124563, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16339:1624, owner: AdvancedInstantInviteContainer.updateHeader.headerRight, offset: 0x025bd3cf, size: 133 bytes, params: 1, frame: 19
var r0;
var value3;
var HeaderActionButton;
var intl;
const value = environment.__proto__;
if (env1_0.props.changed) {
value3 = environment.__proto__.__proto__.__proto__;
HeaderActionButton = (require(5277) /* metro dependency 5277: HeaderActionButtonNative */).HeaderActionButton;
var headerActionButtonProps = {onPress: env1_0.handlePressSave};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
headerActionButtonProps.text = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['R3BPH+']);
r0 = <HeaderActionButton {...headerActionButtonProps} />;
} else {
r0 = undefined;
}
return r0;
}
global.__d(_fun124548, 16131, [6, 7, 15, 17, 18, 31, 1379, 9152, 1867, 3784, 661, 33, 9158, 4647, 1244, 5282, 5277,
16132, 694, 16133, 9153, 566, 44, 22, 1484,
2]) /* metro module 16131, dependencies: [6, 7, 15, 17, 18, 31, 1379, 9152, 1867, 3784, 661, 33, 9158, 4647, 1244, 5282, 5277, 16132, 694, 16133, 9153, 566, 44, 22, 1484, 2] */;
@@ -1,419 +1,484 @@
/* Metro module 12287; source: components_native/premium/EntitlementGiftGroupCard.tsx; dependencies: [6, 7, 15, 17, 18, 31, 27, 4234, 1226, 8450, 3807, 4279, 661, 1880, 33, 4501, 697, 8451, 4573, 1244, 4578, 6829, 8467, 1305, 6780, 8708, 6818, 12288, 12289, 10519, 10521, 10522, 10520, 10523, 10524, 10525, 10526, 10527, 10530, 10533, 10534, 12290, 3868, 566, 8457, 2] */
import ClassCallCheck from '../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import Flux from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import AuthenticationStore from '../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */
import SubscriptionPlanStore from '../../stores/billing/SubscriptionPlanStore.tsx'; /* Metro dependency 3807 */
import ApplicationStore from '../../modules/applications/ApplicationStore.tsx'; /* Metro dependency 4234 */
import SKUStore from '../../stores/game_store/SKUStore.tsx'; /* Metro dependency 4279 */
import GiftCodeStore from '../../stores/GiftCodeStore.tsx'; /* Metro dependency 8450 */
import GiftCodeActionCreators from '../../actions/GiftCodeActionCreators.tsx'; /* Metro dependency 8451 */
import GiftCodeRow from './GiftCodeRow.tsx'; /* Metro dependency 12290 */
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 IndexNativeModule from '../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as PremiumConstantsModule from '../../modules/premium/PremiumConstants.tsx'; /* Metro dependency 1880 */
import * as NativeModule from '../../external/discord_common/js/packages/design/native.tsx'; /* Metro dependency 3868 */
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 ButtonNativeModule from '../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
function _fun93864(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#93864, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12473:6, offset: 0x020c76a7, size: 1064 bytes, params: 8, frame: 33
var object4;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_9 = value2.View;
const env0_10 = value2.ActivityIndicator;
const env0_11 = value2.TouchableWithoutFeedback;
const applicationStore = importDefault(4234) /* metro dependency 4234: ApplicationStore */;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const giftCodeStore = importDefault(8450) /* metro dependency 8450: GiftCodeStore */;
const subscriptionPlanStore = importDefault(3807) /* metro dependency 3807: SubscriptionPlanStore */;
const skuStore = importDefault(4279) /* metro dependency 4279: SKUStore */;
const Fonts = (require(661) /* metro dependency 661: Constants */).Fonts;
const premiumConstantsModule = require(1880) /* metro dependency 1880: PremiumConstants */;
const env0_16 = premiumConstantsModule.SubscriptionIntervalTypes;
const env0_17 = premiumConstantsModule.PremiumSubscriptionSKUs;
const env0_18 = premiumConstantsModule.PremiumGiftStyles;
const value9 = require(33) /* metro dependency 33 */;
const env0_19 = value9.jsx;
const env0_20 = value9.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createLegacyClassComponentStyles = createStylesModule.createLegacyClassComponentStyles;
object4 = {giftGroupCard: {'overflow': 'hidden', 'marginTop': 8}};
const object5 = {borderWidth: 1};
let value = ReactModule;
const Fonts = (ConstantsModule).Fonts;
const createLegacyClassComponentStyles = CreateStylesModule.createLegacyClassComponentStyles;
object = {giftGroupCard: {'overflow': 'hidden', 'marginTop': 8}};
const object2 = {borderWidth: 1};
const CARD_BORDER_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CARD_BORDER_DEFAULT;
object5.borderColor = CARD_BORDER_DEFAULT;
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
object2.borderColor = CARD_BORDER_DEFAULT;
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
const TABLEROW_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.TABLEROW_BACKGROUND_DEFAULT;
object5.backgroundColor = TABLEROW_BACKGROUND_DEFAULT;
object4.giftGroupCardRefresh = object5;
const object7 = {'fontSize': 16, 'lineHeight': 20};
object2.backgroundColor = TABLEROW_BACKGROUND_DEFAULT;
object.giftGroupCardRefresh = object2;
const object3 = {'fontSize': 16, 'lineHeight': 20};
const PRIMARY_SEMIBOLD = Fonts.PRIMARY_SEMIBOLD;
object7.fontFamily = PRIMARY_SEMIBOLD;
object3.fontFamily = PRIMARY_SEMIBOLD;
const MOBILE_TEXT_HEADING_PRIMARY = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_TEXT_HEADING_PRIMARY;
object7.color = MOBILE_TEXT_HEADING_PRIMARY;
object4.title = object7;
object3.color = MOBILE_TEXT_HEADING_PRIMARY;
object.title = object3;
const ICON_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.ICON_SUBTLE;
object4.arrow = {color: ICON_SUBTLE};
object4.subtitle = {'fontSize': 14, 'lineHeight': 18};
object4.titleContainer = {'marginLeft': 8, 'flex': 1};
object4.groupCardHeader = {'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'space-between',
object.arrow = {color: ICON_SUBTLE};
object.subtitle = {'fontSize': 14, 'lineHeight': 18};
object.titleContainer = {'marginLeft': 8, 'flex': 1};
object.groupCardHeader = {'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'space-between',
'padding': 16};
let BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object4.groupCardHeaderLegacy = {backgroundColor: BACKGROUND_SURFACE_HIGH};
object4.rowArrow = {'height': 8, 'width': 12, 'marginRight': 8};
const object8 = {};
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object4.giftIcon = object8;
object4.generateGiftRow = {'padding': 8, 'flexDirection': 'row', 'alignItems': 'center',
object.groupCardHeaderLegacy = {backgroundColor: BACKGROUND_SURFACE_HIGH};
object.rowArrow = {'height': 8, 'width': 12, 'marginRight': 8};
const object6 = {};
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object.giftIcon = object6;
object.generateGiftRow = {'padding': 8, 'flexDirection': 'row', 'alignItems': 'center',
'justifyContent': 'space-between'};
BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object4.generateGiftRowLegacy = {backgroundColor: BACKGROUND_SURFACE_HIGH};
object4.generateGiftRowText = {flexShrink: 1};
object4.generateGiftButton = {marginLeft: 12};
object4.loading = {marginTop: 8};
object4.generateButtonContainer = {'flexGrow': 1, 'flexShrink': 0};
object.generateGiftRowLegacy = {backgroundColor: BACKGROUND_SURFACE_HIGH};
object.generateGiftRowText = {flexShrink: 1};
object.generateGiftButton = {marginLeft: 12};
object.loading = {marginTop: 8};
object.generateButtonContainer = {'flexGrow': 1, 'flexShrink': 0};
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object4.groupCardHeaderOpen = {backgroundColor: BACKGROUND_BASE_LOWEST};
object.groupCardHeaderOpen = {backgroundColor: BACKGROUND_BASE_LOWEST};
const BACKGROUND_MOD_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_MUTED;
object4.groupCardHeaderOpenRefresh = {backgroundColor: BACKGROUND_MOD_MUTED};
object4.subtitleContainer = {'flexDirection': 'row', 'alignItems': 'center', 'gap': 4};
object4.socialLayerSubtitleContainer = {marginTop: 2};
const env0_21 = Reflect.apply(createLegacyClassComponentStyles, createStylesModule, [object4]);
object.groupCardHeaderOpenRefresh = {backgroundColor: BACKGROUND_MOD_MUTED};
object.subtitleContainer = {'flexDirection': 'row', 'alignItems': 'center', 'gap': 4};
object.socialLayerSubtitleContainer = {marginTop: 2};
const env0_21 = Reflect.apply(createLegacyClassComponentStyles, CreateStylesModule, [object]);
const Component = value.Component;
value = _fun93868(Component);
const ThemeContext = (require(3868) /* metro dependency 3868: native */).ThemeContext;
const ThemeContext = (NativeModule).ThemeContext;
value.contextType = ThemeContext;
const flux = importDefault(566) /* metro dependency 566: flux */;
value = flux.connectStores([authenticationStore, skuStore, applicationStore, giftCodeStore, subscriptionPlanStore],
value = Flux.connectStores([AuthenticationStore, SKUStore, ApplicationStore, GiftCodeStore, SubscriptionPlanStore],
_fun93879)(value);
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/premium/EntitlementGiftGroupCard.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/premium/EntitlementGiftGroupCard.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_93865() { // fn#93865, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12473:416, offset: 0x020c7acf, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
function _isNativeReflectConstruct_93865() { // fn#93865, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12473:416, offset: 0x020c7acf, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_93865_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_93865_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun93868(a0) { // fn#93868, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12473:1968, offset: 0x020c7b31, size: 203 bytes, params: 2, frame: 16
const closure = EntitlementGiftGroupCard;
env0_7(closure, a0);
return env0_4(closure, [{key: 'componentDidMount', value: function() {
var Date = global.Date;
this._mountedAt = Date.now();
}}, {key: 'renderGenerateGiftCodeRow', value: value_93873}, {key: 'renderHeader', value: value_93874},
{key: 'getCardHeaderThumbnail', value: value_93875}, {key: 'renderCardHeader', value: value_93876},
{key: 'render', value: value_93877}]);
}
function _fun93868(a0) { // fn#93868, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12473:1968, offset: 0x020c7b31, size: 203 bytes, params: 2, frame: 16
const EntitlementGiftGroupCard2 = EntitlementGiftGroupCard;
Inherits(EntitlementGiftGroupCard2, a0);
return CreateClass(EntitlementGiftGroupCard2, [{key: 'componentDidMount', value: function() {
var Date = global.Date;
this._mountedAt = Date.now();
}}, {key: 'renderGenerateGiftCodeRow', value: value_93873}, {key: 'renderHeader', value: value_93874},
{key: 'getCardHeaderThumbnail', value: value_93875}, {key: 'renderCardHeader', value: value_93876},
{key: 'render', value: value_93877}]);
function EntitlementGiftGroupCard(a0) { // fn#93869, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12473:1980, offset: 0x020c7bfc, size: 181 bytes, params: 2, frame: 20
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_3;
binding(this, EntitlementGiftGroupCard);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_6(EntitlementGiftGroupCard);
binding = env1_5;
if (_isNativeReflectConstruct_93865()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_6(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
value._mountedAt = null;
value.state = {isOpen: false};
value.handleToggleOpen = handleToggleOpen;
value.handleGenerateGiftCode = handleGenerateGiftCode;
return value;
function handleToggleOpen() { // fn#93870, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12473:2295, owner: EntitlementGiftGroupCard.handleToggleOpen, offset: 0x020c7cb1, size: 138 bytes, params: 1, frame: 16
var value6;
let binding = env0_0;
const {skuId, subscriptionPlanId, loadedAt} = binding.props;
const value2 = !binding.state.isOpen;
let r1 = loadedAt != null && env0_0._mountedAt != null;
r1 = !r1 ? !value2 : r1;
if (!r1) {
value6 = environment.__proto__.__proto__;
(importDefault(8451) /* metro dependency 8451: GiftCodeActionCreators */).fetchUserGiftCodesForSKU(skuId,
subscriptionPlanId);
}
binding = env0_0;
binding.setState({isOpen: value2});
}
function _fun93879({skuId, subscriptionPlanId, giftStyle}) { // fn#93879, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12473:6222, offset: 0x020c87cb, size: 282 bytes, params: 2, frame: 19
const value2 = SKUStore.get(skuId);
if (value2 == null) {
throw new global.Error('SKU was unavailable while rendering gift.');
}
const object2 = {sku: value2};
object2.isFetching = GiftCodeStore.getUserGiftCodesFetchingForSKUAndPlan(skuId, subscriptionPlanId);
object2.loadedAt = GiftCodeStore.getUserGiftCodesLoadedAtForSKUAndPlan(skuId, subscriptionPlanId);
object2.application = ApplicationStore.getApplication(value2.applicationId);
object2.subscriptionPlan = subscriptionPlanId != null ? (require(8457) /* metro dependency 8457: SubscriptionUtils */).getOrFetchSubscriptionPlan(subscriptionPlanId) : null;
const getForGifterSKUAndPlan = GiftCodeStore.getForGifterSKUAndPlan;
const getId = AuthenticationStore.getId;
let value = Reflect.apply(getForGifterSKUAndPlan, GiftCodeStore, [Reflect.apply(getId, AuthenticationStore, []),
skuId, subscriptionPlanId]);
value = value.filter(function(a0) {
return !a0.isClaimed;
});
object2.giftCodes = value.filter(function({giftStyle}) {
return giftStyle === giftStyle;
});
return object2;
}
function handleGenerateGiftCode() { // fn#93871, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12473:2499, owner: EntitlementGiftGroupCard.handleGenerateGiftCode, offset: 0x020c7d3b, size: 69 bytes, params: 1, frame: 16
const {skuId, subscriptionPlanId, giftStyle} = env0_0.props;
const value = environment.__proto__.__proto__;
(GiftCodeActionCreators).createGiftCode(skuId, subscriptionPlanId,
giftStyle);
}
function EntitlementGiftGroupCard(a0) { // fn#93869, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12473:1980, offset: 0x020c7bfc, size: 181 bytes, params: 2, frame: 20
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_3;
binding(this, EntitlementGiftGroupCard);
const items = [];
arraySpread(items, value, 0, items);
value = env1_6(EntitlementGiftGroupCard);
binding = env1_5;
if (_isNativeReflectConstruct_93865()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items, env1_6(this).constructor);
r0 = value;
} else {
value = value.apply(this, items);
r0 = value;
}
value = binding(this, r0);
value._mountedAt = null;
value.state = {isOpen: false};
value.handleToggleOpen = handleToggleOpen;
value.handleGenerateGiftCode = handleGenerateGiftCode;
return value;
}
}
function value_93873() { // fn#93873, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12473:2774, offset: 0x020c7d9e, size: 349 bytes, params: 1, frame: 26
const value2 = env1_21(this.context);
const isRefreshEnabled = this.props.isRefreshEnabled;
const items2 = [value2.generateGiftRow];
items2[1] = isRefreshEnabled ? null : value2.generateGiftRowLegacy;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const generateGiftRowText = value2.generateGiftRowText;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const text = <Text variant="text-xs/medium" color="text-subtle" style={generateGiftRowText}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.lELyPj)}</Text>;
const generateButtonContainer = value2.generateButtonContainer;
const generateGiftButton = value2.generateGiftButton;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
return (
<View style={items2}>
{text}
<View style={generateButtonContainer}>
<View style={generateGiftButton}>
<Button
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['w4+/BA'])}
size="sm"
onPress={this.handleGenerateGiftCode}
/>
function value_93873() { // fn#93873, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12473:2774, offset: 0x020c7d9e, size: 349 bytes, params: 1, frame: 26
const value2 = env1_21(this.context);
const isRefreshEnabled = this.props.isRefreshEnabled;
const items2 = [value2.generateGiftRow];
items2[1] = isRefreshEnabled ? null : value2.generateGiftRowLegacy;
const Text = (TextModule).Text;
const generateGiftRowText = value2.generateGiftRowText;
const intl = (IndexNativeModule).intl;
const text = (
<Text
variant="text-xs/medium"
color="text-subtle"
style={generateGiftRowText}
>
{intl.string((IndexNativeModule).t.lELyPj)}
</Text>
);
const generateButtonContainer = value2.generateButtonContainer;
const generateGiftButton = value2.generateGiftButton;
const Button = (ButtonNativeModule).Button;
return (
<View style={items2}>
{text}
<View style={generateButtonContainer}>
<View style={generateGiftButton}>
<Button
text={intl.string((IndexNativeModule).t['w4+/BA'])}
size="sm"
onPress={this.handleGenerateGiftCode}
/>
</View>
</View>
</View>
</View>
</View>
);
}
function value_93874(a0, a1) { // fn#93874, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12473:3294, offset: 0x020c7efb, size: 1044 bytes, params: 3, frame: 39
var r10;
var r8;
const Icon = require(dependencyMap[23]).Icon;
var defaultImport;
var object;
var moduleValue2;
const value = environment.__proto__;
const value2 = env1_21(this.context);
const state = this.state;
const props = this.props;
const isOpen = state.isOpen;
const entitlements = props.entitlements;
const application = props.application;
const sku = props.sku;
const isRefreshEnabled = props.isRefreshEnabled;
let r21 = require(dependencyMap[21]).isGameItemSKU(sku) && application != null;
const r12 = isRefreshEnabled ? value2.groupCardHeaderOpenRefresh : value2.groupCardHeaderOpen;
const handleToggleOpen = this.handleToggleOpen;
const items3 = [value2.groupCardHeader];
const value4 = null;
items3[1] = isRefreshEnabled ? value4 : value2.groupCardHeaderLegacy;
items3[2] = isOpen ? r12 : value4;
if (r21) {
defaultImport = importDefault(dependencyMap[22]);
object = {sku: sku};
moduleValue2 = require(dependencyMap[23]);
object.size = moduleValue2.getIconSize(require(dependencyMap[23]).Icon.Sizes.LARGE);
object.containerStyle = value2.giftIcon;
r10 = ((Component) => <Component {...object} />)(defaultImport);
} else {
r10 = value4 != a0 ? <Icon resizeMode="contain" source={a0} disableColor size={require(dependencyMap[23]).Icon.Sizes.LARGE} style={value2.giftIcon} /> : value4;
}
const items2 = [r10];
const titleContainer = value2.titleContainer;
const Text = require(dependencyMap[18]).Text;
const text = <Text variant="heading-sm/semibold" color="mobile-text-heading-primary" accessibilityRole="header">{a1}</Text>;
const items4 = [r21 && value2.socialLayerSubtitleContainer];
items4[1] = value2.subtitleContainer;
const r18 = r21 && ((Component) => <Component game={application} size={importDefault(dependencyMap[24]).Sizes.SIZE_24} skuId={sku.id} />)(importDefault(dependencyMap[24]));
const subtitle = value2.subtitle;
const intl = require(dependencyMap[19]).intl;
const format = intl.format;
const t = require(dependencyMap[19]).t;
r21 = r21 ? Reflect.apply(format, intl, [t['6plpZi'], {applicationName: application.name,
copies: entitlements.length}]) : Reflect.apply(format, intl, [t.zMcvcA, {copies: entitlements.length}]);
items2[1] = <View style={titleContainer}>{text}<View style={items4}>{r18}<Text variant="text-md/normal" color="text-subtle" style={subtitle}>{r21}</Text></View></View>;
if (isRefreshEnabled) {
r8 = ((Component) => <Component />)(isOpen ? require(dependencyMap[25]).ChevronSmallDownIcon : require(dependencyMap[26]).ChevronSmallRightIcon);
} else {
r8 = <Icon style={value2.rowArrow} size={require(dependencyMap[23]).Icon.Sizes.LARGE} source={importDefault(isOpen ? dependencyMap[27] : dependencyMap[28])} color={value2.arrow.color} />;
}
items2[2] = r8;
return (
<TouchableWithoutFeedback accessibilityRole="button" onPress={handleToggleOpen}>
<View style={items3}>
{items2}
</View>
</TouchableWithoutFeedback>
);
}
function value_93875(a0, a1) { // fn#93875, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12473:4673, offset: 0x020c830f, size: 516 bytes, params: 3, frame: 13
var object2;
const STANDARD_BOX = PremiumGiftStyles.STANDARD_BOX;
if (STANDARD_BOX === a1) {
return importDefault(10519) /* metro dependency 10519 */;
}
const CAKE = PremiumGiftStyles.CAKE;
if (CAKE === a1) {
return importDefault(10521) /* metro dependency 10521 */;
}
const CHEST = PremiumGiftStyles.CHEST;
if (CHEST === a1) {
return importDefault(10522) /* metro dependency 10522 */;
}
const COFFEE = PremiumGiftStyles.COFFEE;
if (COFFEE === a1) {
return importDefault(10520) /* metro dependency 10520 */;
}
const SEASONAL_STANDARD_BOX = PremiumGiftStyles.SEASONAL_STANDARD_BOX;
if (SEASONAL_STANDARD_BOX === a1) {
return importDefault(10523) /* metro dependency 10523 */;
}
const SEASONAL_CAKE = PremiumGiftStyles.SEASONAL_CAKE;
if (SEASONAL_CAKE === a1) {
return importDefault(10524) /* metro dependency 10524 */;
}
const SEASONAL_CHEST = PremiumGiftStyles.SEASONAL_CHEST;
if (SEASONAL_CHEST === a1) {
return importDefault(10525) /* metro dependency 10525 */;
}
const SEASONAL_COFFEE = PremiumGiftStyles.SEASONAL_COFFEE;
if (SEASONAL_COFFEE === a1) {
return importDefault(10526) /* metro dependency 10526 */;
}
const NITROWEEN_STANDARD = PremiumGiftStyles.NITROWEEN_STANDARD;
if (NITROWEEN_STANDARD === a1) {
object2 = {};
object2.uri = importDefault(10527) /* metro dependency 10527: halloweenCardSmallPng */;
return object2;
}
const TIER_0 = PremiumSubscriptionSKUs.TIER_0;
if (TIER_0 === a0) {
return importDefault(10530) /* metro dependency 10530 */;
}
const TIER_1 = PremiumSubscriptionSKUs.TIER_1;
if (TIER_1 === a0) {
return importDefault(10533) /* metro dependency 10533 */;
}
const TIER_2 = PremiumSubscriptionSKUs.TIER_2;
if (TIER_2 === a0) {
return importDefault(10534) /* metro dependency 10534 */;
}
const LEGACY = PremiumSubscriptionSKUs.LEGACY;
if (LEGACY === a0) {
return importDefault(10534) /* metro dependency 10534 */;
}
return null;
}
function value_93876(a0) { // fn#93876, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12473:5202, offset: 0x020c8513, size: 305 bytes, params: 2, frame: 21
var r2;
var renderHeader;
var iconSource;
var intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const {application, subscriptionPlan, giftStyle} = this.props;
const id = a0.id;
const name = a0.name;
let value = this.getCardHeaderThumbnail(id, giftStyle);
const Object = global.Object;
const value4 = Object.values(PremiumSubscriptionSKUs).includes(id);
const value5 = null;
if (value4) {
if (value5 == subscriptionPlan) {
return value5;
);
}
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return this.renderHeader(value,
intl.formatToPlainString(subscriptionPlan.interval === SubscriptionIntervalTypes.MONTH ? t.rCJvqo : t.Vd3Iu8,
{skuName: a0.name, intervalCount: subscriptionPlan.intervalCount}));
}
if (value5 == application) {
r2 = value5;
} else {
renderHeader = this.renderHeader;
iconSource = application.getIconSource(32);
value = Reflect.apply(renderHeader, this, [value5 == iconSource ? value : iconSource, name]);
r2 = value;
}
return r2;
}
function value_93877() { // fn#93877, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12473:5663, offset: 0x020c8644, size: 303 bytes, params: 1, frame: 29
var environment;
var r9;
var r5;
var Fragment;
var items3;
const value = environment.__proto__;
const value2 = env1_21(this.context);
const {entitlements, giftCodes, sku, isFetching, isRefreshEnabled} = this.props;
const isOpen = this.state.isOpen;
const items2 = [value2.giftGroupCard];
const value3 = null;
items2[1] = isRefreshEnabled ? value2.giftGroupCardRefresh : value3;
const value4 = this.renderCardHeader(sku);
if (isOpen) {
if (isFetching) {
r9 = <ActivityIndicator style={value2.loading} />;
} else {
Fragment = env1_8.Fragment;
items3 = [giftCodes.length < entitlements.length ? this.renderGenerateGiftCodeRow() : value3];
items3[1] = giftCodes.map(_fun93878);
r9 = <Fragment>{items3}</Fragment>;
function value_93874(a0, a1) { // fn#93874, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12473:3294, offset: 0x020c7efb, size: 1044 bytes, params: 3, frame: 39
var r10;
var r8;
const Icon = require(dependencyMap[23]).Icon;
var defaultImport;
var object2;
var moduleValue2;
const value = environment.__proto__;
const value2 = env1_21(this.context);
const state = this.state;
const props = this.props;
const isOpen = state.isOpen;
const entitlements = props.entitlements;
const application = props.application;
const sku = props.sku;
const isRefreshEnabled = props.isRefreshEnabled;
let r21 = require(dependencyMap[21]).isGameItemSKU(sku) && application != null;
const r12 = isRefreshEnabled ? value2.groupCardHeaderOpenRefresh : value2.groupCardHeaderOpen;
const handleToggleOpen = this.handleToggleOpen;
const items3 = [value2.groupCardHeader];
const value4 = null;
items3[1] = isRefreshEnabled ? value4 : value2.groupCardHeaderLegacy;
items3[2] = isOpen ? r12 : value4;
if (r21) {
defaultImport = importDefault(dependencyMap[22]);
object2 = {sku: sku};
moduleValue2 = require(dependencyMap[23]);
object2.size = moduleValue2.getIconSize(require(dependencyMap[23]).Icon.Sizes.LARGE);
object2.containerStyle = value2.giftIcon;
r10 = ((Component) => <Component {...object2} />)(defaultImport);
} else {
r10 = (
value4 != a0
? (
<Icon
resizeMode="contain"
source={a0}
disableColor
size={require(dependencyMap[23]).Icon.Sizes.LARGE}
style={value2.giftIcon}
/>
)
: value4
);
}
const items2 = [r10];
const titleContainer = value2.titleContainer;
const Text = require(dependencyMap[18]).Text;
const text = (
<Text
variant="heading-sm/semibold"
color="mobile-text-heading-primary"
accessibilityRole="header"
>
{a1}
</Text>
);
const items4 = [r21 && value2.socialLayerSubtitleContainer];
items4[1] = value2.subtitleContainer;
const r18 = r21 && ((Component) => <Component game={application} size={importDefault(dependencyMap[24]).Sizes.SIZE_24} skuId={sku.id} />)(importDefault(dependencyMap[24]));
const subtitle = value2.subtitle;
const intl = require(dependencyMap[19]).intl;
const format = intl.format;
const t = require(dependencyMap[19]).t;
r21 = r21 ? Reflect.apply(format, intl, [t['6plpZi'], {applicationName: application.name,
copies: entitlements.length}]) : Reflect.apply(format, intl, [t.zMcvcA, {copies: entitlements.length}]);
items2[1] = (
<View style={titleContainer}>
{text}
<View style={items4}>
{r18}
<Text
variant="text-md/normal"
color="text-subtle"
style={subtitle}
>
{r21}
</Text>
</View>
</View>
);
if (isRefreshEnabled) {
r8 = ((Component) => <Component />)(isOpen ? require(dependencyMap[25]).ChevronSmallDownIcon : require(dependencyMap[26]).ChevronSmallRightIcon);
} else {
r8 = (
<Icon
style={value2.rowArrow}
size={require(dependencyMap[23]).Icon.Sizes.LARGE}
source={importDefault(isOpen ? dependencyMap[27] : dependencyMap[28])}
color={value2.arrow.color}
/>
);
}
items2[2] = r8;
return (
<TouchableWithoutFeedback accessibilityRole="button" onPress={handleToggleOpen}>
<View style={items3}>
{items2}
</View>
</TouchableWithoutFeedback>
);
}
r5 = <View>{r9}</View>;
} else {
r5 = value3;
function value_93875(a0, a1) { // fn#93875, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12473:4673, offset: 0x020c830f, size: 516 bytes, params: 3, frame: 13
var object;
const STANDARD_BOX = PremiumGiftStyles.STANDARD_BOX;
if (STANDARD_BOX === a1) {
return importDefault(10519) /* metro dependency 10519 */;
}
const CAKE = PremiumGiftStyles.CAKE;
if (CAKE === a1) {
return importDefault(10521) /* metro dependency 10521 */;
}
const CHEST = PremiumGiftStyles.CHEST;
if (CHEST === a1) {
return importDefault(10522) /* metro dependency 10522 */;
}
const COFFEE = PremiumGiftStyles.COFFEE;
if (COFFEE === a1) {
return importDefault(10520) /* metro dependency 10520 */;
}
const SEASONAL_STANDARD_BOX = PremiumGiftStyles.SEASONAL_STANDARD_BOX;
if (SEASONAL_STANDARD_BOX === a1) {
return importDefault(10523) /* metro dependency 10523 */;
}
const SEASONAL_CAKE = PremiumGiftStyles.SEASONAL_CAKE;
if (SEASONAL_CAKE === a1) {
return importDefault(10524) /* metro dependency 10524 */;
}
const SEASONAL_CHEST = PremiumGiftStyles.SEASONAL_CHEST;
if (SEASONAL_CHEST === a1) {
return importDefault(10525) /* metro dependency 10525 */;
}
const SEASONAL_COFFEE = PremiumGiftStyles.SEASONAL_COFFEE;
if (SEASONAL_COFFEE === a1) {
return importDefault(10526) /* metro dependency 10526 */;
}
const NITROWEEN_STANDARD = PremiumGiftStyles.NITROWEEN_STANDARD;
if (NITROWEEN_STANDARD === a1) {
object = {};
object.uri = importDefault(10527) /* metro dependency 10527: halloweenCardSmallPng */;
return object;
}
const TIER_0 = PremiumSubscriptionSKUs.TIER_0;
if (TIER_0 === a0) {
return importDefault(10530) /* metro dependency 10530 */;
}
const TIER_1 = PremiumSubscriptionSKUs.TIER_1;
if (TIER_1 === a0) {
return importDefault(10533) /* metro dependency 10533 */;
}
const TIER_2 = PremiumSubscriptionSKUs.TIER_2;
if (TIER_2 === a0) {
return importDefault(10534) /* metro dependency 10534 */;
}
const LEGACY = PremiumSubscriptionSKUs.LEGACY;
if (LEGACY === a0) {
return importDefault(10534) /* metro dependency 10534 */;
}
return null;
}
function value_93876(a0) { // fn#93876, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12473:5202, offset: 0x020c8513, size: 305 bytes, params: 2, frame: 21
var r2;
var renderHeader;
var iconSource;
var intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const {application, subscriptionPlan, giftStyle} = this.props;
const id = a0.id;
const name = a0.name;
let value = this.getCardHeaderThumbnail(id, giftStyle);
const Object = global.Object;
const value4 = Object.values(PremiumSubscriptionSKUs).includes(id);
const value5 = null;
if (value4) {
if (value5 == subscriptionPlan) {
return value5;
}
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return this.renderHeader(value,
intl.formatToPlainString(subscriptionPlan.interval === SubscriptionIntervalTypes.MONTH ? t.rCJvqo : t.Vd3Iu8,
{skuName: a0.name, intervalCount: subscriptionPlan.intervalCount}));
}
if (value5 == application) {
r2 = value5;
} else {
renderHeader = this.renderHeader;
iconSource = application.getIconSource(32);
value = Reflect.apply(renderHeader, this, [value5 == iconSource ? value : iconSource, name]);
r2 = value;
}
return r2;
}
function value_93877() { // fn#93877, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12473:5663, offset: 0x020c8644, size: 303 bytes, params: 1, frame: 29
var environment;
var r9;
var r5;
var Fragment;
var items3;
const value = environment.__proto__;
const value2 = env1_21(this.context);
const {entitlements, giftCodes, sku, isFetching, isRefreshEnabled} = this.props;
const isOpen = this.state.isOpen;
const items2 = [value2.giftGroupCard];
const value3 = null;
items2[1] = isRefreshEnabled ? value2.giftGroupCardRefresh : value3;
const value4 = this.renderCardHeader(sku);
if (isOpen) {
if (isFetching) {
r9 = <ActivityIndicator style={value2.loading} />;
} else {
Fragment = env1_8.Fragment;
items3 = [giftCodes.length < entitlements.length ? this.renderGenerateGiftCodeRow() : value3];
items3[1] = giftCodes.map(_fun93878);
r9 = (
<Fragment>
{items3}
</Fragment>
);
}
r5 = (
<View>
{r9}
</View>
);
} else {
r5 = value3;
}
return (
<View style={items2}>
{value4}
{r5}
</View>
);
function _fun93878(a0, a1) { // fn#93878, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12473:6033, offset: 0x020c8773, size: 88 bytes, params: 3, frame: 18
const value = environment.__proto__.__proto__;
return ((Component) => <Component giftCode={a0} sku={sku} isFirst={a1 === 0} isRefreshEnabled={isRefreshEnabled} key={a0.code} />)(GiftCodeRow);
}
}
}
return (
<View style={items2}>
{value4}
{r5}
</View>
);
}
function handleToggleOpen() { // fn#93870, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12473:2295, owner: EntitlementGiftGroupCard.handleToggleOpen, offset: 0x020c7cb1, size: 138 bytes, params: 1, frame: 16
var value6;
let binding = env0_0;
const {skuId, subscriptionPlanId, loadedAt} = binding.props;
const value2 = !binding.state.isOpen;
let r1 = loadedAt != null && env0_0._mountedAt != null;
r1 = !r1 ? !value2 : r1;
if (!r1) {
value6 = environment.__proto__.__proto__;
(importDefault(8451) /* metro dependency 8451: GiftCodeActionCreators */).fetchUserGiftCodesForSKU(skuId,
subscriptionPlanId);
function _fun93879({skuId, subscriptionPlanId, giftStyle}) { // fn#93879, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12473:6222, offset: 0x020c87cb, size: 282 bytes, params: 2, frame: 19
const value2 = SKUStore.get(skuId);
if (value2 == null) {
throw new global.Error('SKU was unavailable while rendering gift.');
}
const object = {sku: value2};
let giftCodeStoreBinding = GiftCodeStore;
object.isFetching = giftCodeStoreBinding.getUserGiftCodesFetchingForSKUAndPlan(skuId, subscriptionPlanId);
object.loadedAt = giftCodeStoreBinding.getUserGiftCodesLoadedAtForSKUAndPlan(skuId, subscriptionPlanId);
object.application = ApplicationStore.getApplication(value2.applicationId);
object.subscriptionPlan = subscriptionPlanId != null ? (require(8457) /* metro dependency 8457: SubscriptionUtils */).getOrFetchSubscriptionPlan(subscriptionPlanId) : null;
giftCodeStoreBinding = GiftCodeStore;
const getForGifterSKUAndPlan = giftCodeStoreBinding.getForGifterSKUAndPlan;
const authenticationStoreBinding = AuthenticationStore;
const getId = authenticationStoreBinding.getId;
let value = Reflect.apply(getForGifterSKUAndPlan, giftCodeStoreBinding, [Reflect.apply(getId,
authenticationStoreBinding, []), skuId, subscriptionPlanId]);
value = value.filter(function(a0) {
return !a0.isClaimed;
});
object.giftCodes = value.filter(function({giftStyle}) {
return giftStyle === giftStyle;
});
return object;
}
binding = env0_0;
binding.setState({isOpen: value2});
}
function handleGenerateGiftCode() { // fn#93871, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12473:2499, owner: EntitlementGiftGroupCard.handleGenerateGiftCode, offset: 0x020c7d3b, size: 69 bytes, params: 1, frame: 16
const {skuId, subscriptionPlanId, giftStyle} = env0_0.props;
const value = environment.__proto__.__proto__;
(importDefault(8451) /* metro dependency 8451: GiftCodeActionCreators */).createGiftCode(skuId, subscriptionPlanId,
giftStyle);
}
function _fun93878(a0, a1) { // fn#93878, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12473:6033, offset: 0x020c8773, size: 88 bytes, params: 3, frame: 18
const value = environment.__proto__.__proto__;
return ((Component) => <Component giftCode={a0} sku={sku} isFirst={a1 === 0} isRefreshEnabled={isRefreshEnabled} key={a0.code} />)(importDefault(12290) /* metro dependency 12290: GiftCodeRow */);
}
global.__d(_fun93864, 12287, [6, 7, 15, 17, 18, 31, 27, 4234, 1226, 8450, 3807, 4279, 661, 1880, 33, 4501, 697,
8451, 4573, 1244, 4578, 6829, 8467, 1305, 6780, 8708, 6818, 12288, 12289, 10519, 10521, 10522, 10520, 10523,
10524, 10525, 10526, 10527, 10530, 10533, 10534, 12290, 3868, 566, 8457,
2]) /* metro module 12287, dependencies: [6, 7, 15, 17, 18, 31, 27, 4234, 1226, 8450, 3807, 4279, 661, 1880, 33, 4501, 697, 8451, 4573, 1244, 4578, 6829, 8467, 1305, 6780, 8708, 6818, 12288, 12289, 10519, 10521, 10522, 10520, 10523, 10524, 10525, 10526, 10527, 10530, 10533, 10534, 12290, 3868, 566, 8457, 2] */;
+243 -199
View File
@@ -1,223 +1,267 @@
/* Metro module 12290; source: components_native/premium/GiftCodeRow.tsx; dependencies: [6, 7, 15, 17, 18, 31, 27, 661, 33, 4501, 697, 4129, 9212, 8451, 6992, 4573, 4578, 1244, 3738, 1305, 3868, 2] */
import ClassCallCheck from '../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import GiftCodeActionCreators from '../../actions/GiftCodeActionCreators.tsx'; /* Metro dependency 8451 */
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 NativeModule2 from '../../external/discord_common/js/packages/design/native.tsx'; /* Metro dependency 3868 */
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 ButtonNativeModule from '../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
function _fun93884(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#93884, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12476:6, offset: 0x020c8995, size: 710 bytes, params: 8, frame: 26
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_8 = value2.View;
const StyleSheet = value2.StyleSheet;
const env0_9 = value2.TouchableWithoutFeedback;
const env0_10 = (require(661) /* metro dependency 661: Constants */).AnalyticsSections;
const value3 = require(33) /* metro dependency 33 */;
const env0_11 = value3.jsx;
const env0_12 = value3.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createLegacyClassComponentStyles = createStylesModule.createLegacyClassComponentStyles;
object2 = {};
object2.giftCodeRow = {paddingHorizontal: 16};
let value = ReactModule;
const StyleSheet = ReactNativeModule.StyleSheet;
const createLegacyClassComponentStyles = CreateStylesModule.createLegacyClassComponentStyles;
object = {};
object.giftCodeRow = {paddingHorizontal: 16};
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object2.giftCodeRowLegacy = {backgroundColor: BACKGROUND_SURFACE_HIGH};
const object3 = {'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'space-between',
object.giftCodeRowLegacy = {backgroundColor: BACKGROUND_SURFACE_HIGH};
const object4 = {'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'space-between',
'marginVertical': 8, 'padding': 8};
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object3.borderWidth = StyleSheet.hairlineWidth;
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object4.borderWidth = StyleSheet.hairlineWidth;
const INPUT_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INPUT_BACKGROUND_DEFAULT;
object3.backgroundColor = INPUT_BACKGROUND_DEFAULT;
object2.giftCodeShare = object3;
const object6 = {};
object4.backgroundColor = INPUT_BACKGROUND_DEFAULT;
object.giftCodeShare = object4;
const object5 = {};
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object6.marginTop = PX_16;
object5.marginTop = PX_16;
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object6.marginBottom = PX_4;
object2.giftCodeInput = object6;
object5.marginBottom = PX_4;
object.giftCodeInput = object5;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.giftCodeInputContent = {'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'space-between',
object.giftCodeInputContent = {'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'space-between',
padding: PX_8};
object2.giftCodeShareButton = {marginLeft: 12};
object2.codeText = {flexShrink: 1};
object2.subTextRow = {'marginBottom': 8, 'flexDirection': 'row', 'alignItems': 'center'};
object2.expiryText = {'fontSize': 12, 'lineHeight': 16};
object.giftCodeShareButton = {marginLeft: 12};
object.codeText = {flexShrink: 1};
object.subTextRow = {'marginBottom': 8, 'flexDirection': 'row', 'alignItems': 'center'};
object.expiryText = {'fontSize': 12, 'lineHeight': 16};
const BLUE_345 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BLUE_345;
object2.revokeHint = {color: BLUE_345};
object2.firstRow = {borderWidth: 0};
object2.buttonContainer = {'flexShrink': 0, 'flexGrow': 1};
const env0_13 = Reflect.apply(createLegacyClassComponentStyles, createStylesModule, [object2]);
object.revokeHint = {color: BLUE_345};
object.firstRow = {borderWidth: 0};
object.buttonContainer = {'flexShrink': 0, 'flexGrow': 1};
const env0_13 = Reflect.apply(createLegacyClassComponentStyles, CreateStylesModule, [object]);
const PureComponent = value.PureComponent;
value = _fun93888(PureComponent);
const ThemeContext = (require(3868) /* metro dependency 3868: native */).ThemeContext;
const ThemeContext = (NativeModule2).ThemeContext;
value.contextType = ThemeContext;
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/premium/GiftCodeRow.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/premium/GiftCodeRow.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_93885() { // fn#93885, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12476:276, offset: 0x020c8c5b, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
function _isNativeReflectConstruct_93885() { // fn#93885, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12476:276, offset: 0x020c8c5b, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_93885_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_93885_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun93888(a0) { // fn#93888, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12476:1352, offset: 0x020c8cbd, size: 99 bytes, params: 2, frame: 16
const closure = GiftCodeRow;
env0_7(closure, a0);
return env0_4(closure, [{key: 'handleRevoke', value: value_93891}, {key: 'render', value: value_93892}]);
}
function _fun93888(a0) { // fn#93888, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12476:1352, offset: 0x020c8cbd, size: 99 bytes, params: 2, frame: 16
const GiftCodeRow2 = GiftCodeRow;
Inherits(GiftCodeRow2, a0);
return CreateClass(GiftCodeRow2, [{key: 'handleRevoke', value: value_93891}, {key: 'render', value: value_93892}]);
function GiftCodeRow(a0) { // fn#93889, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12476:1364, offset: 0x020c8d20, size: 145 bytes, params: 2, frame: 20
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_3;
binding(this, GiftCodeRow);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_6(GiftCodeRow);
binding = env1_5;
if (_isNativeReflectConstruct_93885()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_6(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
value.handleShare = handleShare;
return value;
function handleShare() { // fn#93890, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12476:1597, owner: GiftCodeRow.handleShare, offset: 0x020c8db1, size: 146 bytes, params: 1, frame: 18
var moduleValue2;
var showShareActionSheet;
var moduleValue3;
const {giftCode, sku} = env0_0.props;
let value = giftCode != null;
if (value && sku != null) {
value = environment.__proto__.__proto__;
(require(4129) /* metro dependency 4129: GiftCodeUtils */).trackGiftCodeCopy(giftCode, sku);
moduleValue2 = require(9212) /* metro dependency 9212: showShareActionSheetAndroid */;
showShareActionSheet = moduleValue2.showShareActionSheet;
moduleValue3 = require(4129) /* metro dependency 4129: GiftCodeUtils */;
Reflect.apply(showShareActionSheet, moduleValue2, [{url: moduleValue3.getGiftCodeURL(giftCode.code)},
AnalyticsSections.GIFT_CODE_ROW]);
}
}
}
function value_93891(a0) { // fn#93891, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12476:1842, offset: 0x020c8e43, size: 41 bytes, params: 2, frame: 12
const value = environment.__proto__;
(GiftCodeActionCreators).revokeGiftCode(a0);
}
function value_93892() { // fn#93892, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12476:1903, offset: 0x020c8e6c, size: 958 bytes, params: 1, frame: 36
var environment;
var view;
var r8;
const Text = (TextModule).Text;
var moduleValue;
var items2;
const Button = (ButtonNativeModule).Button;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var InputFieldContainer;
var moduleValue2;
var items4;
var format;
var b1BfWD;
var diff;
let value = environment.__proto__;
const value2 = env1_13(this.context);
const {giftCode, isFirst, isRefreshEnabled} = this.props;
const items3 = [value2.giftCodeRow];
const value3 = null;
items3[1] = isRefreshEnabled ? value3 : value2.giftCodeRowLegacy;
items3[2] = isFirst ? value2.firstRow : value3;
if (isRefreshEnabled) {
var viewBinding3Props = {style: value2.giftCodeInput};
InputFieldContainer = (require(6992) /* metro dependency 6992: InputFieldContainerNative */).InputFieldContainer;
var viewBinding3Props2 = {style: value2.giftCodeInputContent};
var textProps = {'variant': 'text-sm/normal', 'style': null, 'lineClamp': 1, style: value2.codeText};
moduleValue2 = require(4129) /* metro dependency 4129: GiftCodeUtils */;
items4 = [
<Text {...textProps}>
{moduleValue2.getGiftCodeURL(giftCode.code)}
</Text>,
];
items4[1] = (
<View style={[value2.buttonContainer, value2.giftCodeShareButton]}>
<Button
size="sm"
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.h5EvZM)}
onPress={this.handleShare}
/>
</View>
);
view = (
<View {...viewBinding3Props}>
<InputFieldContainer>
<View {...viewBinding3Props2}>
{items4}
</View>
</InputFieldContainer>
</View>
);
} else {
var viewBinding2Props = {style: value2.giftCodeShare};
var textProps = {'variant': 'text-sm/normal', 'style': null, 'lineClamp': 1, style: value2.codeText};
moduleValue = require(4129) /* metro dependency 4129: GiftCodeUtils */;
items2 = [
<Text {...textProps}>
{moduleValue.getGiftCodeURL(giftCode.code)}
</Text>,
];
items2[1] = (
<View style={[value2.buttonContainer, value2.giftCodeShareButton]}>
<Button
size="sm"
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.h5EvZM)}
onPress={this.handleShare}
/>
</View>
);
view = (
<View {...viewBinding2Props}>
{items2}
</View>
);
}
const subTextRow = value2.subTextRow;
let expiresAt = giftCode.expiresAt;
if (value3 != expiresAt) {
format = intl.format;
b1BfWD = (require(1244) /* metro dependency 1244: indexNative */).t.b1BfWD;
expiresAt = giftCode.expiresAt;
diff = expiresAt.diff;
value = (importDefault(3738) /* metro dependency 3738 */)();
value = (
<Text variant="text-xs/normal" color="text-subtle">
{Reflect.apply(format, intl, [b1BfWD, {hours: Reflect.apply(diff, expiresAt, [value, 'h']),
revokeHook: revokeHook}])}
</Text>
);
r8 = value;
} else {
r8 = value3;
}
return (
<View style={items3}>
{view}
<View style={subTextRow}>
{r8}
</View>
</View>
);
function revokeHook(a0, a1) { // fn#93893, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12476:3024, owner: value_93892.revokeHook, offset: 0x020c922a, size: 128 bytes, params: 3, frame: 19
const object = {accessibilityRole: 'button', onPress: onPress_93894};
const LegacyText = (NativeModule).LegacyText;
const binding = env0_1;
return (
<TouchableWithoutFeedback {...object} key={a1}>
<LegacyText style={[binding.expiryText, binding.revokeHint]}>
{a0}
</LegacyText>
</TouchableWithoutFeedback>
);
function revokeHookOnPress() { // fn#93894, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12476:3071, owner: value_93892.revokeHook.onPress, offset: 0x020c92aa, size: 31 bytes, params: 1, frame: 11
const binding = env1_0;
return binding.handleRevoke(giftCode.code);
}
}
}
function GiftCodeRow(a0) { // fn#93889, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12476:1364, offset: 0x020c8d20, size: 145 bytes, params: 2, frame: 20
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_3;
binding(this, GiftCodeRow);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_6(GiftCodeRow);
binding = env1_5;
if (_isNativeReflectConstruct_93885()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_6(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
value.handleShare = handleShare_93890;
return value;
}
function value_93891(a0) { // fn#93891, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12476:1842, offset: 0x020c8e43, size: 41 bytes, params: 2, frame: 12
const value = environment.__proto__;
(importDefault(8451) /* metro dependency 8451: GiftCodeActionCreators */).revokeGiftCode(a0);
}
function value_93892() { // fn#93892, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12476:1903, offset: 0x020c8e6c, size: 958 bytes, params: 1, frame: 36
var environment;
var view;
var r8;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
var moduleValue;
var items2;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var InputFieldContainer;
var moduleValue2;
var items4;
var format;
var b1BfWD;
var diff;
let value = environment.__proto__;
const value2 = env1_13(this.context);
const {giftCode, isFirst, isRefreshEnabled} = this.props;
const items3 = [value2.giftCodeRow];
const value3 = null;
items3[1] = isRefreshEnabled ? value3 : value2.giftCodeRowLegacy;
items3[2] = isFirst ? value2.firstRow : value3;
if (isRefreshEnabled) {
var viewBinding3Props = {style: value2.giftCodeInput};
InputFieldContainer = (require(6992) /* metro dependency 6992: InputFieldContainerNative */).InputFieldContainer;
var viewBinding3Props2 = {style: value2.giftCodeInputContent};
var textProps = {'variant': 'text-sm/normal', 'style': null, 'lineClamp': 1, style: value2.codeText};
moduleValue2 = require(4129) /* metro dependency 4129: GiftCodeUtils */;
items4 = [<Text {...textProps}>{moduleValue2.getGiftCodeURL(giftCode.code)}</Text>];
items4[1] = <View style={[value2.buttonContainer,
value2.giftCodeShareButton]}><Button size="sm" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.h5EvZM)} onPress={this.handleShare} /></View>;
view = <View {...viewBinding3Props}><InputFieldContainer><View {...viewBinding3Props2}>{items4}</View></InputFieldContainer></View>;
} else {
var viewBinding2Props = {style: value2.giftCodeShare};
var textProps = {'variant': 'text-sm/normal', 'style': null, 'lineClamp': 1, style: value2.codeText};
moduleValue = require(4129) /* metro dependency 4129: GiftCodeUtils */;
items2 = [<Text {...textProps}>{moduleValue.getGiftCodeURL(giftCode.code)}</Text>];
items2[1] = <View style={[value2.buttonContainer,
value2.giftCodeShareButton]}><Button size="sm" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.h5EvZM)} onPress={this.handleShare} /></View>;
view = <View {...viewBinding2Props}>{items2}</View>;
}
const subTextRow = value2.subTextRow;
let expiresAt = giftCode.expiresAt;
if (value3 != expiresAt) {
format = intl.format;
b1BfWD = (require(1244) /* metro dependency 1244: indexNative */).t.b1BfWD;
expiresAt = giftCode.expiresAt;
diff = expiresAt.diff;
value = (importDefault(3738) /* metro dependency 3738 */)();
value = <Text variant="text-xs/normal" color="text-subtle">{Reflect.apply(format, intl, [b1BfWD,
{hours: Reflect.apply(diff, expiresAt, [value, 'h']), revokeHook: revokeHook}])}</Text>;
r8 = value;
} else {
r8 = value3;
}
return (
<View style={items3}>
{view}
<View style={subTextRow}>
{r8}
</View>
</View>
);
}
function GiftCodeRowHandleShare() { // fn#93890, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12476:1597, owner: GiftCodeRow.handleShare, offset: 0x020c8db1, size: 146 bytes, params: 1, frame: 18
var moduleValue2;
var showShareActionSheet;
var moduleValue3;
const {giftCode, sku} = env0_0.props;
let value = giftCode != null;
if (value && sku != null) {
value = environment.__proto__.__proto__;
(require(4129) /* metro dependency 4129: GiftCodeUtils */).trackGiftCodeCopy(giftCode, sku);
moduleValue2 = require(9212) /* metro dependency 9212: showShareActionSheetAndroid */;
showShareActionSheet = moduleValue2.showShareActionSheet;
moduleValue3 = require(4129) /* metro dependency 4129: GiftCodeUtils */;
Reflect.apply(showShareActionSheet, moduleValue2, [{url: moduleValue3.getGiftCodeURL(giftCode.code)},
AnalyticsSections.GIFT_CODE_ROW]);
}
}
function revokeHook(a0, a1) { // fn#93893, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12476:3024, owner: value_93892.revokeHook, offset: 0x020c922a, size: 128 bytes, params: 3, frame: 19
const object2 = {accessibilityRole: 'button', onPress: onPress_93894};
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
const binding = env0_1;
return (
<TouchableWithoutFeedback {...object2} key={a1}>
<LegacyText style={[binding.expiryText, binding.revokeHint]}>
{a0}
</LegacyText>
</TouchableWithoutFeedback>
);
}
function revokeHookOnPress() { // fn#93894, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12476:3071, owner: value_93892.revokeHook.onPress, offset: 0x020c92aa, size: 31 bytes, params: 1, frame: 11
const binding = env1_0;
return binding.handleRevoke(giftCode.code);
}
global.__d(_fun93884, 12290, [6, 7, 15, 17, 18, 31, 27, 661, 33, 4501, 697, 4129, 9212, 8451, 6992, 4573, 4578,
1244, 3738, 1305, 3868,
2]) /* metro module 12290, dependencies: [6, 7, 15, 17, 18, 31, 27, 661, 33, 4501, 697, 4129, 9212, 8451, 6992, 4573, 4578, 1244, 3738, 1305, 3868, 2] */;
@@ -1,272 +1,288 @@
/* Metro module 12294; source: components_native/premium/GiftPurchaseButton.tsx; dependencies: [5, 31, 27, 3808, 5140, 33, 4583, 4573, 566, 5143, 7355, 6771, 10385, 4496, 1244, 3802, 10381, 4579, 12295, 2] */
import Module00005 from '../../by-id/module-00005.js'; /* Metro dependency 5 */
import SubscriptionStore from '../../stores/billing/SubscriptionStore.tsx'; /* Metro dependency 3808 */
import IAPStoreAndroid from '../../stores/native/IAPStore.android.tsx'; /* Metro dependency 5140 */
import UseAnalyticsLocations from '../../modules/app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
import RenderPremiumButtonText from '../../modules/premium/native/renderPremiumButtonText.tsx'; /* Metro dependency 12295 */
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 FluxModule from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as TextModule from '../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as BaseTextButtonNativeModule from '../../design/components/Button/native/BaseTextButton.native.tsx'; /* Metro dependency 4579 */
import * as ButtonHooksNativeModule from '../../design/components/Button/native/ButtonHooks.native.tsx'; /* Metro dependency 4583 */
import * as ProductIdsAndroidModule from '../../modules/premium/native/ProductIds.android.tsx'; /* Metro dependency 5143 */
import * as IAPUtilsModule from '../../utils/native/IAPUtils.tsx'; /* Metro dependency 7355 */
import * as CreateOrReuseGiftOrderModule from '../../modules/payments/native/utils/createOrReuseGiftOrder.tsx'; /* Metro dependency 10385 */
function _fun93899(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#93899, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12480:6, offset: 0x020c9868, size: 211 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
const subscriptionStore = importDefault(3808) /* metro dependency 3808: SubscriptionStore */;
const iapStoreAndroid = importDefault(5140) /* metro dependency 5140: IAPStoreAndroid */;
const env0_8 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/premium/GiftPurchaseButton.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/premium/GiftPurchaseButton.tsx');
exports.default = GiftPurchaseButton;
}
function GiftPurchaseButton({style, variant, planId, analyticsLocation = {}, recipientUserId}) { // fn#93900, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12480:171, offset: 0x020c993b, size: 598 bytes, params: 2, frame: 31
variant = variant === undefined ? 'primary' : variant;
const value2 = (ButtonHooksNativeModule).useButtonTextColorStyles(variant);
const object = {};
const TextStyleSheet = (TextModule).TextStyleSheet;
copyDataProperties(object, TextStyleSheet['text-sm/semibold'], undefined);
copyDataProperties(object, value2, undefined);
let useStateFromStores = FluxModule.useStateFromStores;
const premiumSubscription = Reflect.apply(useStateFromStores, FluxModule, [[SubscriptionStore], function() {
return SubscriptionStore.getPremiumSubscription();
}]);
const productIdForGift = (ProductIdsAndroidModule).getProductIdForGift(planId);
const productIdForGift2 = productIdForGift;
const value4 = (IAPUtilsModule).useCanPurchaseIAP(productIdForGift);
useStateFromStores = FluxModule.useStateFromStores;
const iapStoreAndroidBinding = IAPStoreAndroid;
const value5 = Reflect.apply(useStateFromStores, FluxModule, [[iapStoreAndroidBinding], _fun93902]);
const product = FluxModule.useStateFromStores([iapStoreAndroidBinding], _fun93903);
const r6 = premiumSubscription != null && premiumSubscription.planId === planId;
const analyticsLocations = (UseAnalyticsLocations)().analyticsLocations;
const value10 = analyticsLocations.useCallback(productIdForGift2(_fun93905), [planId, recipientUserId,
analyticsLocation, analyticsLocations,
(CreateOrReuseGiftOrderModule).useCreateOrReuseGiftOrder('GiftPurchaseButton')]);
const BaseTextButton = (BaseTextButtonNativeModule).BaseTextButton;
return (
<View style={style}>
<BaseTextButton
textElement={(RenderPremiumButtonText)({style: object,
basePlanId: planId, isCurrentPlan: r6, isGift: true, product: product})}
variant={variant}
size="sm"
onPress={value10}
loading={value5}
disabled={!value4}
grow
/>
</View>
);
function _fun93902() { // fn#93902, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12480:543, offset: 0x020c9ba4, size: 27 bytes, params: 1, frame: 11
return IAPStoreAndroid.isPurchasingProduct(Module00005);
}
function GiftPurchaseButton({style, variant, planId, analyticsLocation = {}, recipientUserId}) { // fn#93900, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12480:171, offset: 0x020c993b, size: 598 bytes, params: 2, frame: 31
variant = variant === undefined ? 'primary' : variant;
const value2 = (require(4583) /* metro dependency 4583: ButtonHooksNative */).useButtonTextColorStyles(variant);
const object2 = {};
const TextStyleSheet = (require(4573) /* metro dependency 4573: Text */).TextStyleSheet;
copyDataProperties(object2, TextStyleSheet['text-sm/semibold'], undefined);
copyDataProperties(object2, value2, undefined);
const premiumSubscription = (require(566) /* metro dependency 566: flux */).useStateFromStores([SubscriptionStore],
function() {
return SubscriptionStore.getPremiumSubscription();
});
const productIdForGift = (require(5143) /* metro dependency 5143: ProductIdsAndroid */).getProductIdForGift(planId);
const env0_3 = productIdForGift;
const value4 = (require(7355) /* metro dependency 7355: IAPUtils */).useCanPurchaseIAP(productIdForGift);
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([IAPStoreAndroid], _fun93902);
const product = (require(566) /* metro dependency 566: flux */).useStateFromStores([IAPStoreAndroid], _fun93903);
const r6 = premiumSubscription != null && premiumSubscription.planId === planId;
const analyticsLocations = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().analyticsLocations;
const value10 = analyticsLocations.useCallback(env0_3(_fun93905), [planId, recipientUserId, analyticsLocation,
analyticsLocations,
(require(10385) /* metro dependency 10385: createOrReuseGiftOrder */).useCreateOrReuseGiftOrder('GiftPurchaseButton')]);
const BaseTextButton = (require(4579) /* metro dependency 4579: BaseTextButtonNative */).BaseTextButton;
return (
<View style={style}>
<BaseTextButton
textElement={(importDefault(12295) /* metro dependency 12295: renderPremiumButtonText */)({style: object2,
basePlanId: planId, isCurrentPlan: r6, isGift: true, product: product})}
variant={variant}
size="sm"
onPress={value10}
loading={value5}
disabled={!value4}
grow
/>
</View>
);
}
function _fun93903() { // fn#93903, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12480:608, offset: 0x020c9bbf, size: 27 bytes, params: 1, frame: 11
return IAPStoreAndroid.getProduct(Module00005);
}
function _fun93902() { // fn#93902, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12480:543, offset: 0x020c9ba4, size: 27 bytes, params: 1, frame: 11
return IAPStoreAndroid.isPurchasingProduct(env0_3);
}
function* _fun93905() { // fn#93905, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12480:764, offset: 0x020c9be5, size: 334 bytes, params: 1, frame: 19
var object;
var value3;
var value4;
var value5;
var binding;
var error;
var binding3;
var value10;
var show;
var intl;
var string;
var t;
var R0RpRX;
var CKsXk3;
if (true) {
value = environment.__proto__;
try {
} catch (error) {
value = environment.__proto__.__proto__;
binding = env2_1;
binding3 = env2_2;
value10 = binding(binding3[13]);
show = value10.show;
object = {};
binding = env2_0;
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
R0RpRX = t.R0RpRX;
object.title = Reflect.apply(string, intl, [R0RpRX]);
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
CKsXk3 = t.CKsXk3;
object.body = Reflect.apply(string, intl, [CKsXk3]);
Reflect.apply(show, value10, [object]);
return undefined;
}
try {
object = {};
} catch (error) {
value = environment.__proto__.__proto__;
binding = env2_1;
binding3 = env2_2;
value10 = binding(binding3[13]);
show = value10.show;
object = {};
binding = env2_0;
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
R0RpRX = t.R0RpRX;
object.title = Reflect.apply(string, intl, [R0RpRX]);
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
CKsXk3 = t.CKsXk3;
object.body = Reflect.apply(string, intl, [CKsXk3]);
Reflect.apply(show, value10, [object]);
return undefined;
}
try {
} catch (error) {
value = environment.__proto__.__proto__;
binding = env2_1;
binding3 = env2_2;
value10 = binding(binding3[13]);
show = value10.show;
object = {};
binding = env2_0;
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
R0RpRX = t.R0RpRX;
object.title = Reflect.apply(string, intl, [R0RpRX]);
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
CKsXk3 = t.CKsXk3;
object.body = Reflect.apply(string, intl, [CKsXk3]);
Reflect.apply(show, value10, [object]);
return undefined;
}
try {
object.planId = require;
} catch (error) {
value = environment.__proto__.__proto__;
binding = env2_1;
binding3 = env2_2;
value10 = binding(binding3[13]);
show = value10.show;
object = {};
binding = env2_0;
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
R0RpRX = t.R0RpRX;
object.title = Reflect.apply(string, intl, [R0RpRX]);
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
CKsXk3 = t.CKsXk3;
object.body = Reflect.apply(string, intl, [CKsXk3]);
Reflect.apply(show, value10, [object]);
return undefined;
}
try {
} catch (error) {
value = environment.__proto__.__proto__;
binding = env2_1;
binding3 = env2_2;
value10 = binding(binding3[13]);
show = value10.show;
object = {};
binding = env2_0;
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
R0RpRX = t.R0RpRX;
object.title = Reflect.apply(string, intl, [R0RpRX]);
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
CKsXk3 = t.CKsXk3;
object.body = Reflect.apply(string, intl, [CKsXk3]);
Reflect.apply(show, value10, [object]);
return undefined;
}
try {
object.recipientUserId = dependencyMap;
} catch (error) {
value = environment.__proto__.__proto__;
binding = env2_1;
binding3 = env2_2;
value10 = binding(binding3[13]);
show = value10.show;
object = {};
binding = env2_0;
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
R0RpRX = t.R0RpRX;
object.title = Reflect.apply(string, intl, [R0RpRX]);
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
CKsXk3 = t.CKsXk3;
object.body = Reflect.apply(string, intl, [CKsXk3]);
Reflect.apply(show, value10, [object]);
return undefined;
}
try {
value3 = View(object);
} catch (error) {
value = environment.__proto__.__proto__;
binding = env2_1;
binding3 = env2_2;
value10 = binding(binding3[13]);
show = value10.show;
object = {};
binding = env2_0;
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
R0RpRX = t.R0RpRX;
object.title = Reflect.apply(string, intl, [R0RpRX]);
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
CKsXk3 = t.CKsXk3;
object.body = Reflect.apply(string, intl, [CKsXk3]);
Reflect.apply(show, value10, [object]);
return undefined;
}
yield value3;
try {
value4 = undefined;
value5 = false;
} catch (error) {
value = environment.__proto__.__proto__;
binding = env2_1;
binding3 = env2_2;
value10 = binding(binding3[13]);
show = value10.show;
object = {};
binding = env2_0;
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
R0RpRX = t.R0RpRX;
object.title = Reflect.apply(string, intl, [R0RpRX]);
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
CKsXk3 = t.CKsXk3;
object.body = Reflect.apply(string, intl, [CKsXk3]);
Reflect.apply(show, value10, [object]);
return undefined;
}
if (value5) {
return value4;
}
binding = env2_0;
var binding2 = env2_2;
var {premiumType, planInterval} = binding(binding2[15]).getPremiumTypeFromPlanId(require);
binding(binding2[16]).openGiftModal({recipientUserId: dependencyMap, premiumType: premiumType,
planInterval: planInterval, analyticsLocation: importDefault, analyticsLocations: env1_4, order: value4});
}
}
function _fun93903() { // fn#93903, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12480:608, offset: 0x020c9bbf, size: 27 bytes, params: 1, frame: 11
return IAPStoreAndroid.getProduct(env0_3);
}
function* _fun93905() { // fn#93905, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12480:764, offset: 0x020c9be5, size: 334 bytes, params: 1, frame: 19
var object2;
var value3;
var value4;
var value5;
var binding;
var error;
var binding3;
var value10;
var show;
var intl;
var string;
var t;
var R0RpRX;
var CKsXk3;
if (true) {
value = environment.__proto__;
try {
} catch (error) {
value = environment.__proto__.__proto__;
binding = env2_1;
binding3 = env2_2;
value10 = binding(binding3[13]);
show = value10.show;
object2 = {};
binding = env2_0;
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
R0RpRX = t.R0RpRX;
object2.title = Reflect.apply(string, intl, [R0RpRX]);
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
CKsXk3 = t.CKsXk3;
object2.body = Reflect.apply(string, intl, [CKsXk3]);
Reflect.apply(show, value10, [object2]);
return undefined;
}
try {
object2 = {};
} catch (error) {
value = environment.__proto__.__proto__;
binding = env2_1;
binding3 = env2_2;
value10 = binding(binding3[13]);
show = value10.show;
object2 = {};
binding = env2_0;
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
R0RpRX = t.R0RpRX;
object2.title = Reflect.apply(string, intl, [R0RpRX]);
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
CKsXk3 = t.CKsXk3;
object2.body = Reflect.apply(string, intl, [CKsXk3]);
Reflect.apply(show, value10, [object2]);
return undefined;
}
try {
} catch (error) {
value = environment.__proto__.__proto__;
binding = env2_1;
binding3 = env2_2;
value10 = binding(binding3[13]);
show = value10.show;
object2 = {};
binding = env2_0;
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
R0RpRX = t.R0RpRX;
object2.title = Reflect.apply(string, intl, [R0RpRX]);
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
CKsXk3 = t.CKsXk3;
object2.body = Reflect.apply(string, intl, [CKsXk3]);
Reflect.apply(show, value10, [object2]);
return undefined;
}
try {
object2.planId = require;
} catch (error) {
value = environment.__proto__.__proto__;
binding = env2_1;
binding3 = env2_2;
value10 = binding(binding3[13]);
show = value10.show;
object2 = {};
binding = env2_0;
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
R0RpRX = t.R0RpRX;
object2.title = Reflect.apply(string, intl, [R0RpRX]);
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
CKsXk3 = t.CKsXk3;
object2.body = Reflect.apply(string, intl, [CKsXk3]);
Reflect.apply(show, value10, [object2]);
return undefined;
}
try {
} catch (error) {
value = environment.__proto__.__proto__;
binding = env2_1;
binding3 = env2_2;
value10 = binding(binding3[13]);
show = value10.show;
object2 = {};
binding = env2_0;
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
R0RpRX = t.R0RpRX;
object2.title = Reflect.apply(string, intl, [R0RpRX]);
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
CKsXk3 = t.CKsXk3;
object2.body = Reflect.apply(string, intl, [CKsXk3]);
Reflect.apply(show, value10, [object2]);
return undefined;
}
try {
object2.recipientUserId = dependencyMap;
} catch (error) {
value = environment.__proto__.__proto__;
binding = env2_1;
binding3 = env2_2;
value10 = binding(binding3[13]);
show = value10.show;
object2 = {};
binding = env2_0;
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
R0RpRX = t.R0RpRX;
object2.title = Reflect.apply(string, intl, [R0RpRX]);
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
CKsXk3 = t.CKsXk3;
object2.body = Reflect.apply(string, intl, [CKsXk3]);
Reflect.apply(show, value10, [object2]);
return undefined;
}
try {
value3 = View(object2);
} catch (error) {
value = environment.__proto__.__proto__;
binding = env2_1;
binding3 = env2_2;
value10 = binding(binding3[13]);
show = value10.show;
object2 = {};
binding = env2_0;
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
R0RpRX = t.R0RpRX;
object2.title = Reflect.apply(string, intl, [R0RpRX]);
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
CKsXk3 = t.CKsXk3;
object2.body = Reflect.apply(string, intl, [CKsXk3]);
Reflect.apply(show, value10, [object2]);
return undefined;
}
yield value3;
try {
value4 = undefined;
value5 = false;
} catch (error) {
value = environment.__proto__.__proto__;
binding = env2_1;
binding3 = env2_2;
value10 = binding(binding3[13]);
show = value10.show;
object2 = {};
binding = env2_0;
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
R0RpRX = t.R0RpRX;
object2.title = Reflect.apply(string, intl, [R0RpRX]);
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
CKsXk3 = t.CKsXk3;
object2.body = Reflect.apply(string, intl, [CKsXk3]);
Reflect.apply(show, value10, [object2]);
return undefined;
}
if (value5) {
return value4;
}
binding = env2_0;
var binding2 = env2_2;
var {premiumType, planInterval} = binding(binding2[15]).getPremiumTypeFromPlanId(require);
binding(binding2[16]).openGiftModal({recipientUserId: dependencyMap, premiumType: premiumType,
planInterval: planInterval, analyticsLocation: importDefault, analyticsLocations: env1_4, order: value4});
}
}
global.__d(_fun93899, 12294, [5, 31, 27, 3808, 5140, 33, 4583, 4573, 566, 5143, 7355, 6771, 10385, 4496, 1244, 3802,
10381, 4579, 12295,
2]) /* metro module 12294, dependencies: [5, 31, 27, 3808, 5140, 33, 4583, 4573, 566, 5143, 7355, 6771, 10385, 4496, 1244, 3802, 10381, 4579, 12295, 2] */;
@@ -1,88 +1,128 @@
/* Metro module 12265; source: components_native/premium/GuildBoostingGuildList.tsx; dependencies: [31, 27, 1867, 4896, 661, 33, 4501, 697, 4048, 566, 8254, 8792, 6947, 7508, 6819, 4573, 11072, 1244, 12234, 2] */
import GuildStore from '../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import UseTheme from '../../hooks/useTheme.tsx'; /* Metro dependency 4048 */
import SortedGuildStore from '../../stores/SortedGuildStore.tsx'; /* Metro dependency 4896 */
import UserSettingsModalActionCreators from '../../actions/UserSettingsModalActionCreators.tsx'; /* Metro dependency 7508 */
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 ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as TextModule from '../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as TransitionToGuildNativeModule from '../../modules/routing/transitionToGuild.native.tsx'; /* Metro dependency 6947 */
function _fun93733(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#93733, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12451:6, offset: 0x020c11dd, size: 407 bytes, params: 8, frame: 24
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
ReactModule;
let value = ReactNativeModule;
const env0_3 = value.View;
const env0_4 = value.Image;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const sortedGuildStore = importDefault(4896) /* metro dependency 4896: SortedGuildStore */;
const env0_7 = (require(661) /* metro dependency 661: Constants */).NUMBER_OF_GUILDS_TO_RECOMMEND_BOOSTING;
value = require(33) /* metro dependency 33 */;
const env0_8 = value.jsx;
const env0_9 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const object = {'padding': 12, 'paddingLeft': 16, 'borderRadius': null, 'marginBottom': 8, 'minHeight': 96,
const object2 = {'padding': 12, 'paddingLeft': 16, 'borderRadius': null, 'marginBottom': 8, 'minHeight': 96,
'flexDirection': 'row', 'justifyContent': 'center', 'alignItems': 'center'};
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object.backgroundColor = BACKGROUND_BASE_LOWEST;
const env0_10 = Reflect.apply(createStyles, value, [{guildCard: object, guildIcon: {marginRight: 16},
object2.backgroundColor = BACKGROUND_BASE_LOWEST;
const env0_10 = Reflect.apply(createStyles, value, [{guildCard: object2, guildIcon: {marginRight: 16},
guildCardDescription: {flex: 1}, subscriptionInfo: {'flexDirection': 'row', 'alignItems': 'center'},
premiumGuildImage: {'width': 18, 'height': 12, 'marginLeft': -5}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/premium/GuildBoostingGuildList.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/premium/GuildBoostingGuildList.tsx');
exports.default = GuildBoostingGuildList;
}
function GuildBoostingGuildListItem({guildId}) { // fn#93734, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12451:638, offset: 0x020c1374, size: 635 bytes, params: 2, frame: 36
var r0;
var TouchableHitBox;
var items4;
const Text = (TextModule).Text;
var items2;
var items3;
var intl;
var value;
const styles = useStyles();
const value3 = (UseTheme)();
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
return GuildStore.getGuild(guildId);
});
if (guild == null) {
r0 = null;
} else {
TouchableHitBox = importDefault(8792) /* metro dependency 8792: TouchableHitBox */;
var defaultImport2Props = {style: styles.guildCard, activeOpacity: 0.5, onPress: onPress_93736};
items4 = [
((Component) => <Component guild={guild} size={(require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes.LARGE} style={styles.guildIcon} selected={false} />)(importDefault(6819) /* metro dependency 6819: GuildIcon */),
];
var viewBindingProps = {style: styles.guildCardDescription};
items2 = [
<Text variant="text-md/bold">
{guild.name}
</Text>,
];
var viewBinding2Props = {style: styles.subscriptionInfo};
items3 = [
<Image
source={importDefault(11072) /* metro dependency 11072 */}
style={styles.premiumGuildImage}
resizeMode="contain"
resizeMethod="resize"
/>,
];
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
items3[1] = (
<Text variant="text-xs/medium">
{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.If4iTS,
{subscriberCount: (importDefault(8254) /* metro dependency 8254: useGuildPowerupsBoostCount */)(guild?.id).total})}
</Text>
);
items2[1] = (
<View {...viewBinding2Props}>
{items3}
</View>
);
items4[1] = (
<View {...viewBindingProps}>
{items2}
</View>
);
value = importDefault(12234) /* metro dependency 12234: BoostedGuildTierProgressCircle */;
items4[2] = ((Component) => <Component guild={guild} theme={value3} />)(value);
value = (
<TouchableHitBox {...defaultImport2Props}>
{items4}
</TouchableHitBox>
);
r0 = value;
}
return r0;
function GuildBoostingGuildListItemOnPress() { // fn#93736, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12451:876, owner: GuildBoostingGuildListItem.onPress, offset: 0x020c15ef, size: 89 bytes, params: 1, frame: 18
const value = environment.__proto__;
TransitionToGuildNativeModule.transitionToGuild(guildId, {state: {shouldShowSubscribeTooltip: true}});
(UserSettingsModalActionCreators).close();
}
function GuildBoostingGuildListItem({guildId}) { // fn#93734, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12451:638, offset: 0x020c1374, size: 635 bytes, params: 2, frame: 36
var r0;
var TouchableHitBox;
var items4;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
var items2;
var items3;
var intl;
var value;
const styles = useStyles();
const value3 = (importDefault(4048) /* metro dependency 4048: useTheme */)();
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
return GuildStore.getGuild(guildId);
});
if (guild == null) {
r0 = null;
} else {
TouchableHitBox = importDefault(8792) /* metro dependency 8792: TouchableHitBox */;
var defaultImport2Props = {style: styles.guildCard, activeOpacity: 0.5, onPress: onPress_93736};
items4 = [((Component) => <Component guild={guild} size={(require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes.LARGE} style={styles.guildIcon} selected={false} />)(importDefault(6819) /* metro dependency 6819: GuildIcon */)];
var viewBindingProps = {style: styles.guildCardDescription};
items2 = [<Text variant="text-md/bold">{guild.name}</Text>];
var viewBinding2Props = {style: styles.subscriptionInfo};
items3 = [<Image source={importDefault(11072) /* metro dependency 11072 */} style={styles.premiumGuildImage} resizeMode="contain" resizeMethod="resize" />];
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
items3[1] = <Text variant="text-xs/medium">{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.If4iTS,
{subscriberCount: (importDefault(8254) /* metro dependency 8254: useGuildPowerupsBoostCount */)(guild?.id).total})}</Text>;
items2[1] = <View {...viewBinding2Props}>{items3}</View>;
items4[1] = <View {...viewBindingProps}>{items2}</View>;
value = importDefault(12234) /* metro dependency 12234: BoostedGuildTierProgressCircle */;
items4[2] = ((Component) => <Component guild={guild} theme={value3} />)(value);
value = <TouchableHitBox {...defaultImport2Props}>{items4}</TouchableHitBox>;
r0 = value;
}
return r0;
}
function GuildBoostingGuildList({guildCount = NUMBER_OF_GUILDS_TO_RECOMMEND_BOOSTING, style}) { // fn#93737, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12451:1464, offset: 0x020c1648, size: 138 bytes, params: 2, frame: 18
return (
<View style={style}>
{(require(566) /* metro dependency 566: flux */).useStateFromStores([SortedGuildStore], function() {
return SortedGuildStore.getFlattenedGuildIds();
}).slice(0, guildCount).map(_fun93739)}
</View>
);
}
function GuildBoostingGuildList({guildCount = NUMBER_OF_GUILDS_TO_RECOMMEND_BOOSTING, style}) { // fn#93737, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12451:1464, offset: 0x020c1648, size: 138 bytes, params: 2, frame: 18
return (
<View style={style}>
{(require(566) /* metro dependency 566: flux */).useStateFromStores([SortedGuildStore], function() {
return SortedGuildStore.getFlattenedGuildIds();
}).slice(0, guildCount).map(_fun93739)}
</View>
);
function _fun93739(a0) { // fn#93739, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12451:1638, offset: 0x020c16d2, size: 31 bytes, params: 2, frame: 15
return <GuildBoostingGuildListItem guildId={a0} key={a0} />;
}
function GuildBoostingGuildListItemOnPress() { // fn#93736, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12451:876, owner: GuildBoostingGuildListItem.onPress, offset: 0x020c15ef, size: 89 bytes, params: 1, frame: 18
const value = environment.__proto__;
const transitionToGuildNativeModule = require(6947) /* metro dependency 6947: transitionToGuildNative */;
transitionToGuildNativeModule.transitionToGuild(guildId, {state: {shouldShowSubscribeTooltip: true}});
(importDefault(7508) /* metro dependency 7508: UserSettingsModalActionCreators */).close();
}
}
function _fun93739(a0) { // fn#93739, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12451:1638, offset: 0x020c16d2, size: 31 bytes, params: 2, frame: 15
return <GuildBoostingGuildListItem guildId={a0} key={a0} />;
}
global.__d(_fun93733, 12265, [31, 27, 1867, 4896, 661, 33, 4501, 697, 4048, 566, 8254, 8792, 6947, 7508, 6819, 4573,
11072, 1244, 12234,
2]) /* metro module 12265, dependencies: [31, 27, 1867, 4896, 661, 33, 4501, 697, 4048, 566, 8254, 8792, 6947, 7508, 6819, 4573, 11072, 1244, 12234, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,158 +1,218 @@
/* Metro module 12281; source: components_native/premium/OutboundPromotionCard.tsx; dependencies: [57, 31, 27, 661, 33, 4501, 697, 6235, 6275, 6758, 1244, 4573, 6622, 4048, 7286, 12282, 4496, 12283, 1962, 7289, 4578, 6766, 4080, 2] */
import Module00057 from '../../by-id/module-00057.js'; /* Metro dependency 57 */
import UseTheme from '../../hooks/useTheme.tsx'; /* Metro dependency 4048 */
import AlertActionCreators from '../../actions/native/AlertActionCreators.tsx'; /* Metro dependency 4496 */
import MarkupUtils from '../../modules/markup/MarkupUtils.tsx'; /* Metro dependency 6622 */
import UseOutboundPromotionRedemptionEndDate from '../../modules/premium/hooks/useOutboundPromotionRedemptionEndDate.tsx'; /* Metro dependency 12282 */
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 ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../intl/index.native.tsx'; /* Metro dependency 1244 */
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 LegacyTokensModule from '../../design/migrations/native/LegacyTokens.tsx'; /* Metro dependency 6235 */
import * as BottomSheetNativeModule from '../../design/components/Sheet/native/BottomSheet.native.tsx'; /* Metro dependency 6275 */
import * as BottomSheetTitleHeaderNativeModule from '../../design/components/Sheet/native/BottomSheetTitleHeader.native.tsx'; /* Metro dependency 6758 */
import * as TextWithIOSLinkWorkaroundModule from '../../modules/a11y/native/TextWithIOSLinkWorkaround.tsx'; /* Metro dependency 6766 */
import * as PromotionUtilsModule from '../../modules/premium/promotions/PromotionUtils.tsx'; /* Metro dependency 7286 */
function _fun93833(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#93833, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12467:6, offset: 0x020c603e, size: 529 bytes, params: 8, frame: 23
var object4;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_5 = value.View;
const env0_6 = value.Image;
const USER_SETTINGS_CONTAINER_HORIZONTAL_PADDING = (require(661) /* metro dependency 661: Constants */).USER_SETTINGS_CONTAINER_HORIZONTAL_PADDING;
const USER_SETTINGS_CONTAINER_HORIZONTAL_PADDING = (ConstantsModule).USER_SETTINGS_CONTAINER_HORIZONTAL_PADDING;
value = require(33) /* metro dependency 33 */;
const env0_7 = value.jsx;
const env0_8 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object4 = {};
const object5 = {'flex': 1, 'flexDirection': 'column', 'paddingHorizontal': null, 'paddingVertical': 12,
object = {};
const object2 = {'flex': 1, 'flexDirection': 'column', 'paddingHorizontal': null, 'paddingVertical': 12,
'backgroundColor': null, 'marginTop': 8};
object5.paddingHorizontal = USER_SETTINGS_CONTAINER_HORIZONTAL_PADDING;
object2.paddingHorizontal = USER_SETTINGS_CONTAINER_HORIZONTAL_PADDING;
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object5.backgroundColor = BACKGROUND_BASE_LOW;
object4.card = object5;
object4.mainContainer = {'flex': 1, 'flexDirection': 'row', 'alignItems': 'center',
object2.backgroundColor = BACKGROUND_BASE_LOW;
object.card = object2;
object.mainContainer = {'flex': 1, 'flexDirection': 'row', 'alignItems': 'center',
'justifyContent': 'space-between'};
object4.textContainer = {'flexDirection': 'row', 'flexShrink': 1, 'alignItems': 'center'};
const object6 = {'width': 32, 'height': 32, 'marginRight': 8, 'borderRadius': null, 'alignItems': 'center',
object.textContainer = {'flexDirection': 'row', 'flexShrink': 1, 'alignItems': 'center'};
const object3 = {'width': 32, 'height': 32, 'marginRight': 8, 'borderRadius': null, 'alignItems': 'center',
'justifyContent': 'center'};
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
const DARK_BLACK_500_LIGHT_PRIMARY_100 = (require(6235) /* metro dependency 6235: LegacyTokens */).DARK_BLACK_500_LIGHT_PRIMARY_100;
object6.backgroundColor = DARK_BLACK_500_LIGHT_PRIMARY_100;
object4.imageContainer = object6;
object4.image = {'width': 28, 'height': 28, 'resizeMode': 'contain'};
object4.title = {lineHeight: 20};
object4.subText = {lineHeight: 18};
object4.claimButton = {paddingHorizontal: 12};
object4.moreDetails = {marginLeft: 40};
object4.termsAndConditionsText = {'paddingHorizontal': 16, 'paddingTop': 16};
object4.buttonContainer = {'flexGrow': 1, 'flexDirection': 'row', 'marginLeft': 4, 'justifyContent': 'flex-end'};
const env0_9 = Reflect.apply(createStyles, value, [object4]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/premium/OutboundPromotionCard.tsx');
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
const DARK_BLACK_500_LIGHT_PRIMARY_100 = (LegacyTokensModule).DARK_BLACK_500_LIGHT_PRIMARY_100;
object3.backgroundColor = DARK_BLACK_500_LIGHT_PRIMARY_100;
object.imageContainer = object3;
object.image = {'width': 28, 'height': 28, 'resizeMode': 'contain'};
object.title = {lineHeight: 20};
object.subText = {lineHeight: 18};
object.claimButton = {paddingHorizontal: 12};
object.moreDetails = {marginLeft: 40};
object.termsAndConditionsText = {'paddingHorizontal': 16, 'paddingTop': 16};
object.buttonContainer = {'flexGrow': 1, 'flexDirection': 'row', 'marginLeft': 4, 'justifyContent': 'flex-end'};
const env0_9 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('components_native/premium/OutboundPromotionCard.tsx');
exports.default = OutboundPromotionCard;
}
function TermsAndConditionsActionSheet({termsAndConditions}) { // fn#93834, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12467:1039, offset: 0x020c624f, size: 246 bytes, params: 2, frame: 25
const styles = useStyles();
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
const object2 = {};
const BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const PdKWVT = (require(1244) /* metro dependency 1244: indexNative */).t.PdKWVT;
object2.header = <BottomSheetTitleHeader title={Reflect.apply(string, intl, [PdKWVT])} />;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<BottomSheet {...object2}>
<Text style={styles.termsAndConditionsText} variant="text-sm/medium">
{(importDefault(6622) /* metro dependency 6622: MarkupUtils */).parse(termsAndConditions, false,
{allowLinks: true})}
</Text>
</BottomSheet>
);
}
function OutboundPromotionCard({outboundPromotion, code}) { // fn#93835, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12467:1369, offset: 0x020c6345, size: 927 bytes, params: 2, frame: 32
var env0_3Binding = undefined;
const styles = useStyles();
const promotionImageURL = (require(7286) /* metro dependency 7286: PromotionUtils */).getPromotionImageURL(outboundPromotion.id,
(importDefault(4048) /* metro dependency 4048: useTheme */)());
const value4 = code != null;
const value5 = (importDefault(12282) /* metro dependency 12282: useOutboundPromotionRedemptionEndDate */)(outboundPromotion,
value4);
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const formatToPlainString = intl.formatToPlainString;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const r21 = value4 ? Reflect.apply(formatToPlainString, intl, [t.VaD05h,
{endDate: value5}]) : Reflect.apply(formatToPlainString, intl, [t['/XWgfG'], {endDate: value5}]);
const string = intl.string;
const r20 = value4 ? Reflect.apply(string, intl, [t['2cHUti']]) : Reflect.apply(string, intl, [t.O13yhz]);
const binding = env0_4;
var [property, env0_3] = env0_3Binding(binding.useState(false), 2);
binding.useLayoutEffect(_fun93836, [property, code, outboundPromotion]);
const items2 = [<View style={styles.imageContainer}><Image style={styles.image} source={{uri: promotionImageURL}} /></View>];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
items2[1] = <View style={styles.textContainer}><View><Text style={styles.title} accessibilityRole="header" variant="text-md/semibold" color="mobile-text-heading-primary">{outboundPromotion.outboundTitle}</Text><Text style={styles.subText} variant="text-sm/medium" color="text-default">{r21}</Text></View></View>;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
items2[2] = <View style={styles.buttonContainer}><View style={styles.claimButton}><Button size="sm" shrink text={r20} onPress={onPress_93841} /></View></View>;
const view = <View style={styles.mainContainer}>{items2}</View>;
const TextWithIOSLinkWorkaround = (require(6766) /* metro dependency 6766: TextWithIOSLinkWorkaround */).TextWithIOSLinkWorkaround;
return (
<View style={styles.card}>
{view}
<View>
<TextWithIOSLinkWorkaround style={styles.moreDetails} variant="text-sm/medium">
{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.sCm3Zb,
{onClick: onClick_93842})}
</TextWithIOSLinkWorkaround>
</View>
</View>
);
}
function _fun93836() { // fn#93836, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12467:1809, offset: 0x020c66e4, size: 66 bytes, params: 1, frame: 12
var environment;
var value;
if (env0_2) {
value = environment.__proto__;
value = importDefault(4496) /* metro dependency 4496: AlertActionCreators */;
value.openLazy({importer: importer_93837});
function TermsAndConditionsActionSheet({termsAndConditions}) { // fn#93834, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12467:1039, offset: 0x020c624f, size: 246 bytes, params: 2, frame: 25
const styles = useStyles();
const BottomSheet = (BottomSheetNativeModule).BottomSheet;
const object = {};
const BottomSheetTitleHeader = (BottomSheetTitleHeaderNativeModule).BottomSheetTitleHeader;
const intl = (IndexNativeModule).intl;
const string = intl.string;
const PdKWVT = (IndexNativeModule).t.PdKWVT;
object.header = <BottomSheetTitleHeader title={Reflect.apply(string, intl, [PdKWVT])} />;
const Text = (TextModule).Text;
return (
<BottomSheet {...object}>
<Text style={styles.termsAndConditionsText} variant="text-sm/medium">
{(MarkupUtils).parse(termsAndConditions, false,
{allowLinks: true})}
</Text>
</BottomSheet>
);
}
function OutboundPromotionCard({outboundPromotion, code}) { // fn#93835, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12467:1369, offset: 0x020c6345, size: 927 bytes, params: 2, frame: 32
var env0_3Binding = undefined;
const styles = useStyles();
const promotionImageURL = (PromotionUtilsModule).getPromotionImageURL(outboundPromotion.id,
(UseTheme)());
const value4 = code != null;
const value5 = (UseOutboundPromotionRedemptionEndDate)(outboundPromotion,
value4);
const intl = (IndexNativeModule).intl;
const formatToPlainString = intl.formatToPlainString;
const t = (IndexNativeModule).t;
const r21 = value4 ? Reflect.apply(formatToPlainString, intl, [t.VaD05h,
{endDate: value5}]) : Reflect.apply(formatToPlainString, intl, [t['/XWgfG'], {endDate: value5}]);
const string = intl.string;
const r20 = value4 ? Reflect.apply(string, intl, [t['2cHUti']]) : Reflect.apply(string, intl, [t.O13yhz]);
var [property, env0_3] = env0_3Binding(ReactModule.useState(false), 2);
ReactModule.useLayoutEffect(_fun93836, [property, code, outboundPromotion]);
const items2 = [
<View style={styles.imageContainer}>
<Image style={styles.image} source={{uri: promotionImageURL}} />
</View>,
];
const Text = (TextModule).Text;
items2[1] = (
<View style={styles.textContainer}>
<View>
<Text
style={styles.title}
accessibilityRole="header"
variant="text-md/semibold"
color="mobile-text-heading-primary"
>
{outboundPromotion.outboundTitle}
</Text>
<Text
style={styles.subText}
variant="text-sm/medium"
color="text-default"
>
{r21}
</Text>
</View>
</View>
);
const Button = (ButtonNativeModule).Button;
items2[2] = (
<View style={styles.buttonContainer}>
<View style={styles.claimButton}>
<Button
size="sm"
shrink
text={r20}
onPress={onPress_93841}
/>
</View>
</View>
);
const view = (
<View style={styles.mainContainer}>
{items2}
</View>
);
const TextWithIOSLinkWorkaround = (TextWithIOSLinkWorkaroundModule).TextWithIOSLinkWorkaround;
return (
<View style={styles.card}>
{view}
<View>
<TextWithIOSLinkWorkaround style={styles.moreDetails} variant="text-sm/medium">
{intl.format((IndexNativeModule).t.sCm3Zb,
{onClick: onClick_93842})}
</TextWithIOSLinkWorkaround>
</View>
</View>
);
function _fun93836() { // fn#93836, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12467:1809, offset: 0x020c66e4, size: 66 bytes, params: 1, frame: 12
var environment;
var value;
if (env0_2) {
value = environment.__proto__;
value = importDefault(4496) /* metro dependency 4496: AlertActionCreators */;
value.openLazy({importer: importer_93837});
}
function importer_93837() { // fn#93837, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12467:1845, offset: 0x020c6726, size: 64 bytes, params: 1, frame: 13
var environment;
let value = environment.__proto__.__proto__;
value = require(dependencyMap[18]);
value = value(dependencyMap[17], dependencyMap.paths);
return value.then(function({default: env0_0}) {
return _fun93839;
});
function _fun93838({default: env0_0}) { // fn#93838, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12467:1879, offset: 0x020c6766, size: 23 bytes, params: 2, frame: 2
return _fun93839;
function _fun93839(a0) { // fn#93839, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12467:1894, offset: 0x020c677d, size: 120 bytes, params: 2, frame: 16
const binding = env0_0;
const bindingProps = {...a0};
bindingProps['onCancel'] = onCancel_93840;
bindingProps['onClaim'] = (importDefault(7289) /* metro dependency 7289: PromotionsActionCreators */).addClaimedOutboundPromotionCode;
bindingProps['code'] = code;
bindingProps['outboundPromotion'] = outboundPromotion;
return ((Component) => <Component {...bindingProps} />)(binding);
function onCancel_93840() { // fn#93840, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12467:1916, offset: 0x020c67f5, size: 51 bytes, params: 1, frame: 11
let value = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
(AlertActionCreators).close();
value = environment.__proto__.__proto__.__proto__.__proto__;
env4_3(false);
}
}
}
}
}
function OutboundPromotionCardOnPress() { // fn#93841, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12467:2600, owner: OutboundPromotionCard.onPress, offset: 0x020c6828, size: 18 bytes, params: 1, frame: 11
return env0_3(true);
}
function OutboundPromotionCardOnClick() { // fn#93842, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12467:2773, owner: OutboundPromotionCard.onClick, offset: 0x020c683a, size: 117 bytes, params: 1, frame: 17
var environment;
let value = environment.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
value = importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */;
const openLazy = value.openLazy;
const outboundPromotionBinding = outboundPromotion;
Reflect.apply(openLazy, value, [function() {
var Promise = global.Promise;
return Promise.resolve(TermsAndConditionsActionSheet);
}, 'OutboundPromotionTermsAndConditions-' + outboundPromotionBinding.id,
{termsAndConditions: outboundPromotionBinding.outboundTermsAndConditions}]);
}
}
}
function OutboundPromotionCardOnClick() { // fn#93842, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12467:2773, owner: OutboundPromotionCard.onClick, offset: 0x020c683a, size: 117 bytes, params: 1, frame: 17
var environment;
let value = environment.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
value = importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */;
const openLazy = value.openLazy;
const outboundPromotionBinding = outboundPromotion;
Reflect.apply(openLazy, value, [function() {
var Promise = global.Promise;
return Promise.resolve(TermsAndConditionsActionSheet);
}, 'OutboundPromotionTermsAndConditions-' + outboundPromotionBinding.id,
{termsAndConditions: outboundPromotionBinding.outboundTermsAndConditions}]);
}
function importer_93837() { // fn#93837, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12467:1845, offset: 0x020c6726, size: 64 bytes, params: 1, frame: 13
var environment;
let value = environment.__proto__.__proto__;
value = require(dependencyMap[18]);
value = value(dependencyMap[17], dependencyMap.paths);
return value.then(function({default: env0_0}) {
return _fun93839;
});
}
function _fun93838({default: env0_0}) { // fn#93838, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12467:1879, offset: 0x020c6766, size: 23 bytes, params: 2, frame: 2
return _fun93839;
}
function _fun93839(a0) { // fn#93839, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12467:1894, offset: 0x020c677d, size: 120 bytes, params: 2, frame: 16
const binding = env0_0;
const bindingProps = {...a0};
bindingProps['onCancel'] = onCancel_93840;
bindingProps['onClaim'] = (importDefault(7289) /* metro dependency 7289: PromotionsActionCreators */).addClaimedOutboundPromotionCode;
bindingProps['code'] = code;
bindingProps['outboundPromotion'] = outboundPromotion;
return ((Component) => <Component {...bindingProps} />)(binding);
}
function onCancel_93840() { // fn#93840, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12467:1916, offset: 0x020c67f5, size: 51 bytes, params: 1, frame: 11
let value = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
(importDefault(4496) /* metro dependency 4496: AlertActionCreators */).close();
value = environment.__proto__.__proto__.__proto__.__proto__;
env4_3(false);
}
global.__d(_fun93833, 12281, [57, 31, 27, 661, 33, 4501, 697, 6235, 6275, 6758, 1244, 4573, 6622, 4048, 7286, 12282,
4496, 12283, 1962, 7289, 4578, 6766, 4080,
2]) /* metro module 12281, dependencies: [57, 31, 27, 661, 33, 4501, 697, 6235, 6275, 6758, 1244, 4573, 6622, 4048, 7286, 12282, 4496, 12283, 1962, 7289, 4578, 6766, 4080, 2] */;
@@ -1,183 +1,270 @@
/* Metro module 12283; source: components_native/premium/OutboundPromotionClaimAlert.tsx; dependencies: [57, 31, 27, 661, 33, 4501, 697, 12284, 6771, 6789, 7286, 12285, 1305, 1244, 4573, 4578, 6797, 12286, 4596, 3853, 2] */
import Module00057 from '../../by-id/module-00057.js'; /* Metro dependency 57 */
import Alert from '../common/Alert.tsx'; /* Metro dependency 4596 */
import UseAnalyticsLocations from '../../modules/app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
import AnalyticsLocation from '../../modules/app_analytics/AnalyticsLocation.tsx'; /* Metro dependency 6789 */
import UseResettingValue from '../../hooks/useResettingValue.tsx'; /* Metro dependency 12284 */
import Module12286 from '../../by-id/module-12286.js'; /* Metro dependency 12286 */
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 ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as TextModule from '../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
function _fun93847(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#93847, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12469:6, offset: 0x020c6a5f, size: 638 bytes, params: 8, frame: 23
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_5 = value.ActivityIndicator;
const env0_6 = value.View;
const env0_7 = value.Image;
const env0_8 = value.ScrollView;
const Fonts = (require(661) /* metro dependency 661: Constants */).Fonts;
const Fonts = (ConstantsModule).Fonts;
value = require(33) /* metro dependency 33 */;
const env0_9 = value.jsx;
const env0_10 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object2.loading = {marginVertical: 80};
object2.body = {alignItems: 'center'};
object = {};
object.loading = {marginVertical: 80};
object.body = {alignItems: 'center'};
const MOBILE_TEXT_HEADING_PRIMARY = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_TEXT_HEADING_PRIMARY;
const PRIMARY_BOLD = Fonts.PRIMARY_BOLD;
object2.title = {'fontSize': 24, 'lineHeight': 30, 'color': null, 'fontFamily': null, 'marginBottom': 8,
object.title = {'fontSize': 24, 'lineHeight': 30, 'color': null, 'fontFamily': null, 'marginBottom': 8,
color: MOBILE_TEXT_HEADING_PRIMARY, fontFamily: PRIMARY_BOLD};
object2.errorTitle = {'lineHeight': 24, 'marginBottom': 8};
object2.bodyText = {'textAlign': 'center', 'lineHeight': 20};
const object3 = {'backgroundColor': null, 'marginTop': 16, 'padding': 12};
object.errorTitle = {'lineHeight': 24, 'marginBottom': 8};
object.bodyText = {'textAlign': 'center', 'lineHeight': 20};
const object5 = {'backgroundColor': null, 'marginTop': 16, 'padding': 12};
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object3.backgroundColor = BACKGROUND_SURFACE_HIGH;
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object2.copyInputContainer = object3;
object2.copyInputLabel = {'lineHeight': 20, 'marginBottom': 8};
const object4 = {'borderWidth': 1, 'borderColor': null, 'borderRadius': null, 'padding': 8, 'marginBottom': 8,
object5.backgroundColor = BACKGROUND_SURFACE_HIGH;
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object.copyInputContainer = object5;
object.copyInputLabel = {'lineHeight': 20, 'marginBottom': 8};
const object6 = {'borderWidth': 1, 'borderColor': null, 'borderRadius': null, 'padding': 8, 'marginBottom': 8,
'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'space-between'};
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object4.borderColor = BACKGROUND_BASE_LOWEST;
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object2.copyInput = object4;
object6.borderColor = BACKGROUND_BASE_LOWEST;
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object.copyInput = object6;
const ICON_FEEDBACK_POSITIVE = (importDefault(697) /* metro dependency 697: native */).colors.ICON_FEEDBACK_POSITIVE;
object2.copyInputCopied = {borderColor: ICON_FEEDBACK_POSITIVE};
object2.copyButton = {'paddingHorizontal': 8, 'marginLeft': 8};
object2.promotionArt = {'width': 200, 'height': 100, 'marginBottom': 20};
object2.errorArt = {'width': 141, 'height': 99, 'marginBottom': 20};
const env0_11 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/premium/OutboundPromotionClaimAlert.tsx');
object.copyInputCopied = {borderColor: ICON_FEEDBACK_POSITIVE};
object.copyButton = {'paddingHorizontal': 8, 'marginLeft': 8};
object.promotionArt = {'width': 200, 'height': 100, 'marginBottom': 20};
object.errorArt = {'width': 141, 'height': 99, 'marginBottom': 20};
const env0_11 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('components_native/premium/OutboundPromotionClaimAlert.tsx');
exports.default = OutboundPromotionClaimAlert;
}
function OutboundPromotionClaimAlert({onCancel, onClaim, code, outboundPromotion}) { // fn#93848, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12469:1113, offset: 0x020c6cdd, size: 1599 bytes, params: 2, frame: 38
var r15;
var r4;
var items5;
var LegacyText;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
var items2;
var object;
var copyInput;
var object2;
var items3;
var Button;
const env0_3 = outboundPromotion;
const styles = useStyles();
const binding = env0_4;
const value3 = binding.useState(null);
const binding2 = env0_3;
const value4 = binding2(value3, 2);
const property = value4[0];
var env0_4 = value4[1];
const value5 = binding2((importDefault(12284) /* metro dependency 12284: useResettingValue */)(false, 2000), 2);
const property2 = value5[0];
const env0_5 = value5[1];
const value6 = code != null;
const defaultImport2 = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
const USER_SETTINGS_GIFT_INVENTORY = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).USER_SETTINGS_GIFT_INVENTORY;
binding.useEffect(_fun93849, [value6, outboundPromotion.id, outboundPromotion.outboundTitle,
outboundPromotion.partnerId, onClaim, defaultImport2(USER_SETTINGS_GIFT_INVENTORY).analyticsLocations]);
if (code != null) {
var viewBindingProps = {style: styles.body};
items5 = [<Image source={importDefault(12285) /* metro dependency 12285 */} style={styles.promotionArt} />];
LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
string = intl.string;
items5[1] = <LegacyText style={styles.title} accessibilityRole="header">{Reflect.apply(string, intl,
[t['23BfZh']])}</LegacyText>;
items5[2] = <Text style={styles.bodyText} variant="text-md/medium">{outboundPromotion.outboundRedemptionModalBody}</Text>;
var viewBindingProps2 = {style: styles.copyInputContainer};
string = intl.string;
items2 = [<Text style={styles.copyInputLabel} variant="text-md/semibold" color="mobile-text-heading-primary">{Reflect.apply(string,
intl, [t.s9LFQh])}</Text>];
object = {};
copyInput = styles.copyInput;
if (property2) {
object2 = {};
copyDataProperties(object2, copyInput, 13);
copyDataProperties(object2, styles.copyInputCopied, 13);
r15 = object2;
function OutboundPromotionClaimAlert({onCancel, onClaim, code, outboundPromotion}) { // fn#93848, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12469:1113, offset: 0x020c6cdd, size: 1599 bytes, params: 2, frame: 38
var r15;
var r4;
var items5;
var LegacyText;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const Text = (TextModule).Text;
var items2;
var object3;
var copyInput;
var object4;
var items3;
var Button;
const outboundPromotion2 = outboundPromotion;
const styles = useStyles();
const binding = env0_4;
const value3 = binding.useState(null);
const binding2 = outboundPromotion2;
const value4 = binding2(value3, 2);
const property = value4[0];
var env0_4 = value4[1];
const value5 = binding2((UseResettingValue)(false, 2000), 2);
const property2 = value5[0];
const env0_5 = value5[1];
const value6 = code != null;
const defaultImport2 = UseAnalyticsLocations;
const USER_SETTINGS_GIFT_INVENTORY = (AnalyticsLocation).USER_SETTINGS_GIFT_INVENTORY;
binding.useEffect(_fun93849, [value6, outboundPromotion.id, outboundPromotion.outboundTitle,
outboundPromotion.partnerId, onClaim, defaultImport2(USER_SETTINGS_GIFT_INVENTORY).analyticsLocations]);
if (code != null) {
var viewBindingProps = {style: styles.body};
items5 = [
<Image source={importDefault(12285) /* metro dependency 12285 */} style={styles.promotionArt} />,
];
LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
string = intl.string;
items5[1] = (
<LegacyText style={styles.title} accessibilityRole="header">
{Reflect.apply(string, intl, [t['23BfZh']])}
</LegacyText>
);
items5[2] = (
<Text style={styles.bodyText} variant="text-md/medium">
{outboundPromotion.outboundRedemptionModalBody}
</Text>
);
var viewBindingProps2 = {style: styles.copyInputContainer};
string = intl.string;
items2 = [
<Text
style={styles.copyInputLabel}
variant="text-md/semibold"
color="mobile-text-heading-primary"
>
{Reflect.apply(string, intl, [t.s9LFQh])}
</Text>,
];
object3 = {};
copyInput = styles.copyInput;
if (property2) {
object4 = {};
copyDataProperties(object4, copyInput, 13);
copyDataProperties(object4, styles.copyInputCopied, 13);
r15 = object4;
} else {
r15 = copyInput;
}
object3.style = r15;
items3 = [
<ScrollView
style={{flex: 1}}
horizontal
showsHorizontalScrollIndicator={false}
>
<View onStartShouldSetResponderCapture={function() {
return true;
}}>
<Text
lineClamp={1}
variant="text-sm/medium"
color="interactive-text-active"
>
{code}
</Text>
</View>
</ScrollView>,
];
var viewBinding2Props = {style: styles.copyButton};
Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
string = intl.string;
items3[1] = (
<View {...viewBinding2Props}>
<Button
text={property2 ? Reflect.apply(string, intl, [t.t5VZ88]) : Reflect.apply(string, intl, [t.OpuAlK])}
size="sm"
onPress={onPress_93853}
/>
</View>
);
items2[1] = (
<View {...object3}>
{items3}
</View>
);
items2[2] = (
<Text variant="text-sm/medium" color="text-muted">
{'This code is included in your confirmation email'}
</Text>
);
items5[3] = (
<View {...viewBindingProps2}>
{items2}
</View>
);
r4 = (
<View {...viewBindingProps}>
{items5}
</View>
);
} else {
r15 = copyInput;
r4 = <ActivityIndicator style={styles.loading} />;
}
object.style = r15;
items3 = [<ScrollView style={{flex: 1}} horizontal showsHorizontalScrollIndicator={false}><View onStartShouldSetResponderCapture={function() {
return true;
}}><Text lineClamp={1} variant="text-sm/medium" color="interactive-text-active">{code}</Text></View></ScrollView>];
var viewBinding2Props = {style: styles.copyButton};
Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
string = intl.string;
items3[1] = <View {...viewBinding2Props}><Button text={property2 ? Reflect.apply(string, intl,
[t.t5VZ88]) : Reflect.apply(string, intl, [t.OpuAlK])} size="sm" onPress={onPress_93853} /></View>;
items2[1] = <View {...object}>{items3}</View>;
items2[2] = <Text variant="text-sm/medium" color="text-muted">{'This code is included in your confirmation email'}</Text>;
items5[3] = <View {...viewBindingProps2}>{items2}</View>;
r4 = <View {...viewBindingProps}>{items5}</View>;
} else {
r4 = <ActivityIndicator style={styles.loading} />;
const items4 = [
<Image source={Module12286} style={styles.errorArt} />,
];
items4[1] = (
<Text
style={styles.errorTitle}
variant="text-lg/bold"
color="mobile-text-heading-primary"
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.iufib1)}
</Text>
);
items4[2] = (
<Text style={styles.bodyText} variant="text-md/medium">
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.eAn6z2)}
</Text>
);
const view = (
<View style={styles.body}>
{items4}
</View>
);
const r11 = property != null ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t['+zx47d']);
const r8 = property != null ? undefined : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.TulDPl);
r4 = property != null ? view : r4;
return (
<Alert
onCancel={onCancel}
confirmText={r11}
onConfirm={onConfirm_93854}
cancelText={r8}
noDefaultButtons={!value6 && property == null}
>
{r4}
</Alert>
);
function _fun93849() { // fn#93849, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12469:1384, offset: 0x020c731c, size: 134 bytes, params: 1, frame: 15
var environment;
var value2;
var moduleValue;
var claimOutboundPromotion;
var outboundPromotionBinding;
var value;
if (!result) {
value2 = environment.__proto__;
moduleValue = require(7286) /* metro dependency 7286: PromotionUtils */;
claimOutboundPromotion = moduleValue.claimOutboundPromotion;
outboundPromotionBinding = outboundPromotion;
value = Reflect.apply(claimOutboundPromotion, moduleValue, [{promotionId: outboundPromotionBinding.id,
promotionTitle: outboundPromotionBinding.outboundTitle, partnerId: outboundPromotionBinding.partnerId,
analyticsLocations: analyticsLocations}]);
value = value.then(function(a0) {
return onClaim(a0);
});
value.catch(_fun93851);
}
function _fun93851(a0) { // fn#93851, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12469:1541, offset: 0x01e1b407, size: 19 bytes, params: 2, frame: 11
return env1_4(a0);
}
}
function OutboundPromotionClaimAlertOnPress() { // fn#93853, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12469:2559, owner: OutboundPromotionClaimAlert.onPress, offset: 0x020c73a2, size: 56 bytes, params: 1, frame: 13
let value = environment.__proto__;
value = require(6797) /* metro dependency 6797: ClipboardUtilsNative */;
value.copy(code);
env0_5(true);
}
function OutboundPromotionClaimAlertOnConfirm() { // fn#93854, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12469:3219, owner: OutboundPromotionClaimAlert.onConfirm, offset: 0x020c73da, size: 97 bytes, params: 1, frame: 17
var value2;
var moduleValue;
if (code != null) {
value2 = environment.__proto__;
moduleValue = require(7286) /* metro dependency 7286: PromotionUtils */;
(importDefault(3853) /* metro dependency 3853: Linking */).openURL(moduleValue.getOutboundPromotionRedemptionUrl(code,
outboundPromotion));
}
onCancel();
}
}
const items4 = [<Image source={importDefault(12286) /* metro dependency 12286 */} style={styles.errorArt} />];
items4[1] = <Text style={styles.errorTitle} variant="text-lg/bold" color="mobile-text-heading-primary">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.iufib1)}</Text>;
items4[2] = <Text style={styles.bodyText} variant="text-md/medium">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.eAn6z2)}</Text>;
const view = <View style={styles.body}>{items4}</View>;
const Alert = importDefault(4596) /* metro dependency 4596: Alert */;
const r11 = property != null ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t['+zx47d']);
const r8 = property != null ? undefined : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.TulDPl);
r4 = property != null ? view : r4;
return (
<Alert
onCancel={onCancel}
confirmText={r11}
onConfirm={onConfirm}
cancelText={r8}
noDefaultButtons={!value6 && property == null}
>
{r4}
</Alert>
);
}
function _fun93849() { // fn#93849, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12469:1384, offset: 0x020c731c, size: 134 bytes, params: 1, frame: 15
var environment;
var value2;
var moduleValue;
var claimOutboundPromotion;
var outboundPromotionBinding;
var value;
if (!result) {
value2 = environment.__proto__;
moduleValue = require(7286) /* metro dependency 7286: PromotionUtils */;
claimOutboundPromotion = moduleValue.claimOutboundPromotion;
outboundPromotionBinding = outboundPromotion;
value = Reflect.apply(claimOutboundPromotion, moduleValue, [{promotionId: outboundPromotionBinding.id,
promotionTitle: outboundPromotionBinding.outboundTitle, partnerId: outboundPromotionBinding.partnerId,
analyticsLocations: analyticsLocations}]);
value = value.then(function(a0) {
return onClaim(a0);
});
value.catch(_fun93851);
}
}
function OutboundPromotionClaimAlertOnPress() { // fn#93853, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12469:2559, owner: OutboundPromotionClaimAlert.onPress, offset: 0x020c73a2, size: 56 bytes, params: 1, frame: 13
let value = environment.__proto__;
value = require(6797) /* metro dependency 6797: ClipboardUtilsNative */;
value.copy(code);
env0_5(true);
}
function OutboundPromotionClaimAlertOnConfirm() { // fn#93854, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12469:3219, owner: OutboundPromotionClaimAlert.onConfirm, offset: 0x020c73da, size: 97 bytes, params: 1, frame: 17
var value2;
var moduleValue;
if (code != null) {
value2 = environment.__proto__;
moduleValue = require(7286) /* metro dependency 7286: PromotionUtils */;
(importDefault(3853) /* metro dependency 3853: Linking */).openURL(moduleValue.getOutboundPromotionRedemptionUrl(code,
outboundPromotion));
}
onCancel();
}
global.__d(_fun93847, 12283, [57, 31, 27, 661, 33, 4501, 697, 12284, 6771, 6789, 7286, 12285, 1305, 1244, 4573,
4578, 6797, 12286, 4596, 3853,
2]) /* metro module 12283, dependencies: [57, 31, 27, 661, 33, 4501, 697, 12284, 6771, 6789, 7286, 12285, 1305, 1244, 4573, 4578, 6797, 12286, 4596, 3853, 2] */;
@@ -1,20 +1,31 @@
/* Metro module 7301; source: components_native/premium/PremiumActivatedAlert.tsx; dependencies: [31, 27, 661, 33, 4501, 6235, 3802, 7302, 7303, 7304, 7305, 7306, 7250, 7251, 7307, 7308, 7309, 7310, 7311, 7312, 7313, 4002, 7314, 7315, 7316, 7317, 7318, 7319, 7320, 7321, 7322, 1244, 4048, 4596, 7323, 7324, 1305, 2] */
import UseTheme from '../../hooks/useTheme.tsx'; /* Metro dependency 4048 */
import Alert from '../common/Alert.tsx'; /* Metro dependency 4596 */
import ShineAnimation from './ShineAnimation.tsx'; /* Metro dependency 7324 */
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 ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as NativeModule from '../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as PremiumUtilsModule from '../../utils/PremiumUtils.tsx'; /* Metro dependency 3802 */
import * as LegacyTokensModule from '../../design/migrations/native/LegacyTokens.tsx'; /* Metro dependency 6235 */
function _fun58978(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#58978, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7479:6, offset: 0x016dca3e, size: 470 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
ReactModule;
let value = ReactNativeModule;
const env0_3 = value.Image;
const env0_4 = value.ImageBackground;
const env0_5 = value.View;
const env0_6 = (require(661) /* metro dependency 661: Constants */).SubscriptionStatusTypes;
value = require(33) /* metro dependency 33 */;
const env0_7 = value.jsx;
const env0_8 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const DARK_PRIMARY_300_LIGHT_PRIMARY_400 = (require(6235) /* metro dependency 6235: LegacyTokens */).DARK_PRIMARY_300_LIGHT_PRIMARY_400;
const DARK_PRIMARY_300_LIGHT_PRIMARY_400 = (LegacyTokensModule).DARK_PRIMARY_300_LIGHT_PRIMARY_400;
const env0_9 = Reflect.apply(createStyles, value, [{alert: {'overflow': 'hidden', 'paddingBottom': 24},
header: {'alignSelf': 'stretch', 'margin': -16, 'padding': 16, 'height': 100, 'position': 'relative'},
headerImage: {'position': 'absolute', 'left': '50%'}, body: {'paddingHorizontal': 16, 'marginTop': 40,
@@ -23,232 +34,246 @@ function _fun58978(global, require, importDefault, importAll, module, exports, d
'marginTop': 20, color: DARK_PRIMARY_300_LIGHT_PRIMARY_400}}]);
const env0_10 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun58984);
const env0_11 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun58985);
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/premium/PremiumActivatedAlert.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/premium/PremiumActivatedAlert.tsx');
exports.default = PremiumActivatedAlert;
function getHeaderBackground(a0) { // fn#58979, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7479:1455, offset: 0x016dcc14, size: 294 bytes, params: 2, frame: 14
const Branding = (PremiumUtilsModule).Branding;
const TIER_0 = Branding.TIER_0;
if (TIER_0 === a0) {
return importDefault(7302) /* metro dependency 7302 */;
}
const TIER_1 = Branding.TIER_1;
if (TIER_1 === a0) {
return importDefault(7303) /* metro dependency 7303 */;
}
const TIER_2 = Branding.TIER_2;
if (TIER_2 === a0) {
return importDefault(7304) /* metro dependency 7304 */;
}
const BUNDLE = Branding.BUNDLE;
if (BUNDLE === a0) {
return importDefault(7305) /* metro dependency 7305 */;
}
const PREMIUM_GUILD = Branding.PREMIUM_GUILD;
if (PREMIUM_GUILD === a0) {
return importDefault(7306) /* metro dependency 7306 */;
}
}
function getHeaderImage(a0) { // fn#58980, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7479:1727, offset: 0x016dcd3a, size: 294 bytes, params: 2, frame: 14
const Branding = (PremiumUtilsModule).Branding;
const TIER_0 = Branding.TIER_0;
if (TIER_0 === a0) {
return importDefault(7250) /* metro dependency 7250 */;
}
const TIER_1 = Branding.TIER_1;
if (TIER_1 === a0) {
return importDefault(7251) /* metro dependency 7251 */;
}
const TIER_2 = Branding.TIER_2;
if (TIER_2 === a0) {
return importDefault(7307) /* metro dependency 7307 */;
}
const BUNDLE = Branding.BUNDLE;
if (BUNDLE === a0) {
return importDefault(7308) /* metro dependency 7308 */;
}
const PREMIUM_GUILD = Branding.PREMIUM_GUILD;
if (PREMIUM_GUILD === a0) {
return importDefault(7309) /* metro dependency 7309 */;
}
}
function getLogo(a0) { // fn#58981, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7479:1997, offset: 0x016dce60, size: 272 bytes, params: 2, frame: 14
const Branding = (PremiumUtilsModule).Branding;
const TIER_0 = Branding.TIER_0;
if (TIER_0 === a0) {
return importDefault(7310) /* metro dependency 7310 */;
}
const TIER_1 = Branding.TIER_1;
if (TIER_1 === a0) {
return importDefault(7311) /* metro dependency 7311 */;
}
const BUNDLE = Branding.BUNDLE;
if (BUNDLE === a0) {
return importDefault(7312) /* metro dependency 7312 */;
}
const TIER_2 = Branding.TIER_2;
if (TIER_2 === a0) {
return importDefault(7312) /* metro dependency 7312 */;
}
const PREMIUM_GUILD = Branding.PREMIUM_GUILD;
if (PREMIUM_GUILD === a0) {
return importDefault(7313) /* metro dependency 7313 */;
}
}
function getActivatedImage(a0, a1) { // fn#58982, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7479:2244, offset: 0x016dcf70, size: 492 bytes, params: 3, frame: 15
const Branding = (PremiumUtilsModule).Branding;
const TIER_0 = Branding.TIER_0;
if (TIER_0 === a0) {
return (require(4002) /* metro dependency 4002: shared */).isThemeDark(a1) ? importDefault(7314) /* metro dependency 7314 */ : importDefault(7315) /* metro dependency 7315 */;
}
const TIER_1 = Branding.TIER_1;
if (TIER_1 === a0) {
return (require(4002) /* metro dependency 4002: shared */).isThemeDark(a1) ? importDefault(7316) /* metro dependency 7316 */ : importDefault(7317) /* metro dependency 7317 */;
}
const TIER_2 = Branding.TIER_2;
if (TIER_2 === a0) {
return (require(4002) /* metro dependency 4002: shared */).isThemeDark(a1) ? importDefault(7318) /* metro dependency 7318 */ : importDefault(7319) /* metro dependency 7319 */;
}
const BUNDLE = Branding.BUNDLE;
if (BUNDLE === a0) {
return (require(4002) /* metro dependency 4002: shared */).isThemeDark(a1) ? importDefault(7320) /* metro dependency 7320 */ : importDefault(7321) /* metro dependency 7321 */;
}
const PREMIUM_GUILD = Branding.PREMIUM_GUILD;
if (PREMIUM_GUILD === a0) {
return importDefault(7322) /* metro dependency 7322 */;
}
}
function getDescription_58983(a0, a1) { // fn#58983, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7479:2651, offset: 0x016dd15c, size: 419 bytes, params: 3, frame: 20
const intl = (IndexNativeModule).intl;
var format;
const t = (IndexNativeModule).t;
var YJUUH3;
var value;
const Branding = (require(3802) /* metro dependency 3802: PremiumUtils */).Branding;
const TIER_0 = Branding.TIER_0;
if (TIER_0 === a0) {
return intl.string(t.knvOVz);
}
const TIER_1 = Branding.TIER_1;
if (TIER_1 === a0) {
return intl.string(t.knvOVz);
}
const TIER_2 = Branding.TIER_2;
if (TIER_2 === a0) {
return intl.string(t.aTUr3Z);
}
const BUNDLE = Branding.BUNDLE;
if (BUNDLE === a0) {
format = intl.format;
YJUUH3 = t.YJUUH3;
value = require(3802) /* metro dependency 3802: PremiumUtils */;
return Reflect.apply(format, intl, [YJUUH3, {planName: value.getExternalPlanDisplayName({planId: a1.planId,
additionalPlans: a1.additionalPlans})}]);
}
const PREMIUM_GUILD = Branding.PREMIUM_GUILD;
if (PREMIUM_GUILD === a0) {
format = intl.format;
YJUUH3 = t.YJUUH3;
value = require(3802) /* metro dependency 3802: PremiumUtils */;
return Reflect.apply(format, intl, [YJUUH3, {planName: value.getExternalPlanDisplayName({planId: a1.planId,
additionalPlans: a1.additionalPlans})}]);
}
}
function _fun58984(a0) { // fn#58984, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7479:707, offset: 0x016dd2ff, size: 299 bytes, params: 2, frame: 14
const Branding = (PremiumUtilsModule).Branding;
const TIER_0 = Branding.TIER_0;
if (TIER_0 === a0) {
return {headerImage: {'marginLeft': -27, 'width': 88, 'top': 18}};
}
const TIER_1 = Branding.TIER_1;
if (TIER_1 === a0) {
return {headerImage: {'marginLeft': -27, 'width': 87, 'top': 18}};
}
const BUNDLE = Branding.BUNDLE;
if (BUNDLE === a0) {
return {headerImage: {'marginLeft': -29.5, 'width': 91, 'top': 18}};
}
const TIER_2 = Branding.TIER_2;
if (TIER_2 === a0) {
return {headerImage: {'marginLeft': -58, 'width': 122, 'height': 90, 'top': 18}};
}
const PREMIUM_GUILD = Branding.PREMIUM_GUILD;
if (PREMIUM_GUILD === a0) {
return {headerImage: {'marginLeft': -54, 'width': 140, 'top': 18}};
}
}
function _fun58985(a0) { // fn#58985, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7479:1180, offset: 0x016dd42a, size: 232 bytes, params: 2, frame: 14
const Branding = (PremiumUtilsModule).Branding;
const BUNDLE = Branding.BUNDLE;
if (BUNDLE === a0) {
return {animation: {borderRadius: 6}};
}
const TIER_0 = Branding.TIER_0;
if (TIER_0 === a0) {
return {animation: {borderRadius: 5}};
}
const TIER_1 = Branding.TIER_1;
if (TIER_1 === a0) {
return {animation: {borderRadius: 5}};
}
const TIER_2 = Branding.TIER_2;
if (TIER_2 === a0) {
return {animation: {borderRadius: 5}};
}
const PREMIUM_GUILD = Branding.PREMIUM_GUILD;
if (PREMIUM_GUILD === a0) {
return {animation: {borderRadius: 9}};
}
}
function PremiumActivatedAlert({subscription, onClose}) { // fn#58986, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7479:3179, offset: 0x016dd512, size: 955 bytes, params: 2, frame: 31
const styles = useStyles();
const r2 = subscription.renewalMutations == null || global.Object.keys(subscription.renewalMutations).length === 0 || (subscription.renewalMutations.paymentGatewayPlanId === subscription.paymentGatewayPlanId || subscription.status === SubscriptionStatusTypes.CANCELED) ? subscription : subscription.renewalMutations;
const value4 = (UseTheme)();
const premiumBranding = (require(3802) /* metro dependency 3802: PremiumUtils */).getPremiumBranding(r2);
const Branding = (require(3802) /* metro dependency 3802: PremiumUtils */).Branding;
const TIER_0 = Branding.TIER_0;
const r20 = TIER_0 === premiumBranding ? {logo: {'width': 82,
'height': 44}} : (require(3802) /* metro dependency 3802: PremiumUtils */).Branding.TIER_1 === premiumBranding ? {logo: {'width': 82,
'height': 32}} : (require(3802) /* metro dependency 3802: PremiumUtils */).Branding.BUNDLE === premiumBranding || (require(3802) /* metro dependency 3802: PremiumUtils */).Branding.TIER_2 === premiumBranding ? {logo: {'width': 79,
'height': 32}} : (require(3802) /* metro dependency 3802: PremiumUtils */).Branding.PREMIUM_GUILD !== premiumBranding ? undefined : {logo: {'width': 82,
'height': 18}};
const styles2 = useStyles(premiumBranding);
const styles3 = useStyles(premiumBranding);
const intl = (IndexNativeModule).intl;
const string = intl.string;
const TkTvBz = (IndexNativeModule).t.TkTvBz;
const imageBackgroundBindingProps = {style: styles.header, source: getHeaderBackground(premiumBranding)};
const image = <Image source={getLogo(premiumBranding)} style={r20.logo} />;
const BUNDLE = Branding.BUNDLE;
const r7 = (
premiumBranding !== BUNDLE
? null
: (
<Image source={importDefault(7323) /* metro dependency 7323 */} style={styles.logoPlusPremiumGuild} />
)
);
const imageBackground = (
<ImageBackground {...imageBackgroundBindingProps}>
{image}
{r7}
<Image source={getHeaderImage(premiumBranding)} style={[styles2.headerImage, styles.headerImage]} />
</ImageBackground>
);
const value9 = ((Component) => <Component source={getActivatedImage(premiumBranding,
value4)} style={styles3.animation} />)(ShineAnimation);
const LegacyText = (NativeModule).LegacyText;
return (
<Alert
onClose={onClose}
confirmText={Reflect.apply(string, intl, [TkTvBz])}
style={styles.alert}
>
{imageBackground}
<View style={styles.body}>
{value9}
<LegacyText style={styles.description}>
{getDescription_58983(premiumBranding, r2)}
</LegacyText>
</View>
</Alert>
);
}
}
function getHeaderBackground(a0) { // fn#58979, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7479:1455, offset: 0x016dcc14, size: 294 bytes, params: 2, frame: 14
const Branding = (require(3802) /* metro dependency 3802: PremiumUtils */).Branding;
const TIER_0 = Branding.TIER_0;
if (TIER_0 === a0) {
return importDefault(7302) /* metro dependency 7302 */;
}
const TIER_1 = Branding.TIER_1;
if (TIER_1 === a0) {
return importDefault(7303) /* metro dependency 7303 */;
}
const TIER_2 = Branding.TIER_2;
if (TIER_2 === a0) {
return importDefault(7304) /* metro dependency 7304 */;
}
const BUNDLE = Branding.BUNDLE;
if (BUNDLE === a0) {
return importDefault(7305) /* metro dependency 7305 */;
}
const PREMIUM_GUILD = Branding.PREMIUM_GUILD;
if (PREMIUM_GUILD === a0) {
return importDefault(7306) /* metro dependency 7306 */;
}
}
function getHeaderImage(a0) { // fn#58980, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7479:1727, offset: 0x016dcd3a, size: 294 bytes, params: 2, frame: 14
const Branding = (require(3802) /* metro dependency 3802: PremiumUtils */).Branding;
const TIER_0 = Branding.TIER_0;
if (TIER_0 === a0) {
return importDefault(7250) /* metro dependency 7250 */;
}
const TIER_1 = Branding.TIER_1;
if (TIER_1 === a0) {
return importDefault(7251) /* metro dependency 7251 */;
}
const TIER_2 = Branding.TIER_2;
if (TIER_2 === a0) {
return importDefault(7307) /* metro dependency 7307 */;
}
const BUNDLE = Branding.BUNDLE;
if (BUNDLE === a0) {
return importDefault(7308) /* metro dependency 7308 */;
}
const PREMIUM_GUILD = Branding.PREMIUM_GUILD;
if (PREMIUM_GUILD === a0) {
return importDefault(7309) /* metro dependency 7309 */;
}
}
function getLogo(a0) { // fn#58981, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7479:1997, offset: 0x016dce60, size: 272 bytes, params: 2, frame: 14
const Branding = (require(3802) /* metro dependency 3802: PremiumUtils */).Branding;
const TIER_0 = Branding.TIER_0;
if (TIER_0 === a0) {
return importDefault(7310) /* metro dependency 7310 */;
}
const TIER_1 = Branding.TIER_1;
if (TIER_1 === a0) {
return importDefault(7311) /* metro dependency 7311 */;
}
const BUNDLE = Branding.BUNDLE;
if (BUNDLE === a0) {
return importDefault(7312) /* metro dependency 7312 */;
}
const TIER_2 = Branding.TIER_2;
if (TIER_2 === a0) {
return importDefault(7312) /* metro dependency 7312 */;
}
const PREMIUM_GUILD = Branding.PREMIUM_GUILD;
if (PREMIUM_GUILD === a0) {
return importDefault(7313) /* metro dependency 7313 */;
}
}
function getActivatedImage(a0, a1) { // fn#58982, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7479:2244, offset: 0x016dcf70, size: 492 bytes, params: 3, frame: 15
const Branding = (require(3802) /* metro dependency 3802: PremiumUtils */).Branding;
const TIER_0 = Branding.TIER_0;
if (TIER_0 === a0) {
return (require(4002) /* metro dependency 4002: shared */).isThemeDark(a1) ? importDefault(7314) /* metro dependency 7314 */ : importDefault(7315) /* metro dependency 7315 */;
}
const TIER_1 = Branding.TIER_1;
if (TIER_1 === a0) {
return (require(4002) /* metro dependency 4002: shared */).isThemeDark(a1) ? importDefault(7316) /* metro dependency 7316 */ : importDefault(7317) /* metro dependency 7317 */;
}
const TIER_2 = Branding.TIER_2;
if (TIER_2 === a0) {
return (require(4002) /* metro dependency 4002: shared */).isThemeDark(a1) ? importDefault(7318) /* metro dependency 7318 */ : importDefault(7319) /* metro dependency 7319 */;
}
const BUNDLE = Branding.BUNDLE;
if (BUNDLE === a0) {
return (require(4002) /* metro dependency 4002: shared */).isThemeDark(a1) ? importDefault(7320) /* metro dependency 7320 */ : importDefault(7321) /* metro dependency 7321 */;
}
const PREMIUM_GUILD = Branding.PREMIUM_GUILD;
if (PREMIUM_GUILD === a0) {
return importDefault(7322) /* metro dependency 7322 */;
}
}
function getDescription_58983(a0, a1) { // fn#58983, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7479:2651, offset: 0x016dd15c, size: 419 bytes, params: 3, frame: 20
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var format;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var YJUUH3;
var value;
const Branding = (require(3802) /* metro dependency 3802: PremiumUtils */).Branding;
const TIER_0 = Branding.TIER_0;
if (TIER_0 === a0) {
return intl.string(t.knvOVz);
}
const TIER_1 = Branding.TIER_1;
if (TIER_1 === a0) {
return intl.string(t.knvOVz);
}
const TIER_2 = Branding.TIER_2;
if (TIER_2 === a0) {
return intl.string(t.aTUr3Z);
}
const BUNDLE = Branding.BUNDLE;
if (BUNDLE === a0) {
format = intl.format;
YJUUH3 = t.YJUUH3;
value = require(3802) /* metro dependency 3802: PremiumUtils */;
return Reflect.apply(format, intl, [YJUUH3, {planName: value.getExternalPlanDisplayName({planId: a1.planId,
additionalPlans: a1.additionalPlans})}]);
}
const PREMIUM_GUILD = Branding.PREMIUM_GUILD;
if (PREMIUM_GUILD === a0) {
format = intl.format;
YJUUH3 = t.YJUUH3;
value = require(3802) /* metro dependency 3802: PremiumUtils */;
return Reflect.apply(format, intl, [YJUUH3, {planName: value.getExternalPlanDisplayName({planId: a1.planId,
additionalPlans: a1.additionalPlans})}]);
}
}
function _fun58984(a0) { // fn#58984, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7479:707, offset: 0x016dd2ff, size: 299 bytes, params: 2, frame: 14
const Branding = (require(3802) /* metro dependency 3802: PremiumUtils */).Branding;
const TIER_0 = Branding.TIER_0;
if (TIER_0 === a0) {
return {headerImage: {'marginLeft': -27, 'width': 88, 'top': 18}};
}
const TIER_1 = Branding.TIER_1;
if (TIER_1 === a0) {
return {headerImage: {'marginLeft': -27, 'width': 87, 'top': 18}};
}
const BUNDLE = Branding.BUNDLE;
if (BUNDLE === a0) {
return {headerImage: {'marginLeft': -29.5, 'width': 91, 'top': 18}};
}
const TIER_2 = Branding.TIER_2;
if (TIER_2 === a0) {
return {headerImage: {'marginLeft': -58, 'width': 122, 'height': 90, 'top': 18}};
}
const PREMIUM_GUILD = Branding.PREMIUM_GUILD;
if (PREMIUM_GUILD === a0) {
return {headerImage: {'marginLeft': -54, 'width': 140, 'top': 18}};
}
}
function _fun58985(a0) { // fn#58985, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7479:1180, offset: 0x016dd42a, size: 232 bytes, params: 2, frame: 14
const Branding = (require(3802) /* metro dependency 3802: PremiumUtils */).Branding;
const BUNDLE = Branding.BUNDLE;
if (BUNDLE === a0) {
return {animation: {borderRadius: 6}};
}
const TIER_0 = Branding.TIER_0;
if (TIER_0 === a0) {
return {animation: {borderRadius: 5}};
}
const TIER_1 = Branding.TIER_1;
if (TIER_1 === a0) {
return {animation: {borderRadius: 5}};
}
const TIER_2 = Branding.TIER_2;
if (TIER_2 === a0) {
return {animation: {borderRadius: 5}};
}
const PREMIUM_GUILD = Branding.PREMIUM_GUILD;
if (PREMIUM_GUILD === a0) {
return {animation: {borderRadius: 9}};
}
}
function PremiumActivatedAlert({subscription, onClose}) { // fn#58986, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7479:3179, offset: 0x016dd512, size: 955 bytes, params: 2, frame: 31
const styles = useStyles();
const r2 = subscription.renewalMutations == null || global.Object.keys(subscription.renewalMutations).length === 0 || (subscription.renewalMutations.paymentGatewayPlanId === subscription.paymentGatewayPlanId || subscription.status === SubscriptionStatusTypes.CANCELED) ? subscription : subscription.renewalMutations;
const value4 = (importDefault(4048) /* metro dependency 4048: useTheme */)();
const premiumBranding = (require(3802) /* metro dependency 3802: PremiumUtils */).getPremiumBranding(r2);
const Branding = (require(3802) /* metro dependency 3802: PremiumUtils */).Branding;
const TIER_0 = Branding.TIER_0;
const r20 = TIER_0 === premiumBranding ? {logo: {'width': 82,
'height': 44}} : (require(3802) /* metro dependency 3802: PremiumUtils */).Branding.TIER_1 === premiumBranding ? {logo: {'width': 82,
'height': 32}} : (require(3802) /* metro dependency 3802: PremiumUtils */).Branding.BUNDLE === premiumBranding || (require(3802) /* metro dependency 3802: PremiumUtils */).Branding.TIER_2 === premiumBranding ? {logo: {'width': 79,
'height': 32}} : (require(3802) /* metro dependency 3802: PremiumUtils */).Branding.PREMIUM_GUILD !== premiumBranding ? undefined : {logo: {'width': 82,
'height': 18}};
const styles2 = useStyles(premiumBranding);
const styles3 = useStyles(premiumBranding);
const Alert = importDefault(4596) /* metro dependency 4596: Alert */;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const TkTvBz = (require(1244) /* metro dependency 1244: indexNative */).t.TkTvBz;
const imageBackgroundBindingProps = {style: styles.header, source: getHeaderBackground(premiumBranding)};
const image = <Image source={getLogo(premiumBranding)} style={r20.logo} />;
const BUNDLE = Branding.BUNDLE;
const r7 = premiumBranding !== BUNDLE ? null : <Image source={importDefault(7323) /* metro dependency 7323 */} style={styles.logoPlusPremiumGuild} />;
const imageBackground = <ImageBackground {...imageBackgroundBindingProps}>{image}{r7}<Image source={getHeaderImage(premiumBranding)} style={[styles2.headerImage,
styles.headerImage]} /></ImageBackground>;
const value9 = ((Component) => <Component source={getActivatedImage(premiumBranding,
value4)} style={styles3.animation} />)(importDefault(7324) /* metro dependency 7324: ShineAnimation */);
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
return (
<Alert
onClose={onClose}
confirmText={Reflect.apply(string, intl, [TkTvBz])}
style={styles.alert}
>
{imageBackground}
<View style={styles.body}>
{value9}
<LegacyText style={styles.description}>
{getDescription_58983(premiumBranding, r2)}
</LegacyText>
</View>
</Alert>
);
}
global.__d(_fun58978, 7301, [31, 27, 661, 33, 4501, 6235, 3802, 7302, 7303, 7304, 7305, 7306, 7250, 7251, 7307,
7308, 7309, 7310, 7311, 7312, 7313, 4002, 7314, 7315, 7316, 7317, 7318, 7319, 7320, 7321, 7322, 1244, 4048,
4596, 7323, 7324, 1305,
2]) /* metro module 7301, dependencies: [31, 27, 661, 33, 4501, 6235, 3802, 7302, 7303, 7304, 7305, 7306, 7250, 7251, 7307, 7308, 7309, 7310, 7311, 7312, 7313, 4002, 7314, 7315, 7316, 7317, 7318, 7319, 7320, 7321, 7322, 1244, 4048, 4596, 7323, 7324, 1305, 2] */;
@@ -1,14 +1,23 @@
/* Metro module 7549; source: components_native/premium/PremiumBillingInfo.tsx; dependencies: [57, 31, 27, 661, 33, 4501, 697, 3815, 6766, 1244, 3802, 7545, 6771, 6789, 7022, 4573, 2] */
import Module00057 from '../../by-id/module-00057.js'; /* Metro dependency 57 */
import Native from '../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import AnalyticsLocation from '../../modules/app_analytics/AnalyticsLocation.tsx'; /* Metro dependency 6789 */
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 ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as TextModule from '../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as PremiumManagementUtilsModule from '../../modules/premium/native/utils/PremiumManagementUtils.tsx'; /* Metro dependency 7022 */
import * as PremiumSubscriptionInvoiceModule from '../../modules/premium/PremiumSubscriptionInvoice.tsx'; /* Metro dependency 7545 */
function _fun60690(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#60690, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7727:6, offset: 0x0170a5ad, size: 351 bytes, params: 8, frame: 25
var object2;
const env0_0 = require;
const closure = GoogleManagementLink;
const GoogleManagementLink2 = GoogleManagementLink;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
let value = require(661) /* metro dependency 661: Constants */;
ReactModule;
let value = ConstantsModule;
const env0_5 = value.SubscriptionStatusTypes;
const USER_SETTINGS_CONTAINER_HORIZONTAL_PADDING = value.USER_SETTINGS_CONTAINER_HORIZONTAL_PADDING;
value = require(33) /* metro dependency 33 */;
@@ -16,91 +25,121 @@ function _fun60690(global, require, importDefault, importAll, module, exports, d
const env0_7 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object2.title = {paddingHorizontal: USER_SETTINGS_CONTAINER_HORIZONTAL_PADDING};
object2.externalSubtext = {marginTop: 8, paddingHorizontal: USER_SETTINGS_CONTAINER_HORIZONTAL_PADDING};
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object2.billingContainer = {'backgroundColor': null, 'padding': 16, 'marginTop': 8,
object = {};
object.title = {paddingHorizontal: USER_SETTINGS_CONTAINER_HORIZONTAL_PADDING};
object.externalSubtext = {marginTop: 8, paddingHorizontal: USER_SETTINGS_CONTAINER_HORIZONTAL_PADDING};
const BACKGROUND_SURFACE_HIGH = (Native).colors.BACKGROUND_SURFACE_HIGH;
object.billingContainer = {'backgroundColor': null, 'padding': 16, 'marginTop': 8,
backgroundColor: BACKGROUND_SURFACE_HIGH};
object2.billingRenewalInfo = {marginTop: 4};
object2.billingManageGoogle = {marginTop: 8};
const env0_8 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/premium/PremiumBillingInfo.tsx');
object.billingRenewalInfo = {marginTop: 4};
object.billingManageGoogle = {marginTop: 8};
const env0_8 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('components_native/premium/PremiumBillingInfo.tsx');
exports.default = PremiumBillingInfo;
exports.GoogleManagementLink = closure;
}
function GoogleManagementLink({style, subscription}) { // fn#60691, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7727:511, offset: 0x0170a70c, size: 232 bytes, params: 2, frame: 22
var r0;
var TextWithIOSLinkWorkaround;
var intl;
var format;
var property;
var value;
if ((require(3815) /* metro dependency 3815: BillingPlatformUtils */).isGooglePlayBillingSupported()) {
if (subscription.isPurchasedViaGoogle) {
TextWithIOSLinkWorkaround = (require(6766) /* metro dependency 6766: TextWithIOSLinkWorkaround */).TextWithIOSLinkWorkaround;
var textWithIOSLinkWorkaroundProps = {'style': null, 'variant': 'text-sm/medium', 'color': 'text-link',
style: [style]};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
format = intl.format;
property = (require(1244) /* metro dependency 1244: indexNative */).t['9NPc+O'];
value = require(3802) /* metro dependency 3802: PremiumUtils */;
value = <TextWithIOSLinkWorkaround {...textWithIOSLinkWorkaroundProps}>{Reflect.apply(format, intl,
[property,
{onClick: value.getExternalSubscriptionMethodUrl(subscription.paymentGateway,
'SUBSCRIPTION_MANAGEMENT')}])}</TextWithIOSLinkWorkaround>;
r0 = value;
exports.GoogleManagementLink = GoogleManagementLink2;
function GoogleManagementLink({style, subscription}) { // fn#60691, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7727:511, offset: 0x0170a70c, size: 232 bytes, params: 2, frame: 22
var r0;
var TextWithIOSLinkWorkaround;
var intl;
var format;
var property;
var value;
if ((require(3815) /* metro dependency 3815: BillingPlatformUtils */).isGooglePlayBillingSupported()) {
if (subscription.isPurchasedViaGoogle) {
TextWithIOSLinkWorkaround = (require(6766) /* metro dependency 6766: TextWithIOSLinkWorkaround */).TextWithIOSLinkWorkaround;
var textWithIOSLinkWorkaroundProps = {'style': null, 'variant': 'text-sm/medium', 'color': 'text-link',
style: [style]};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
format = intl.format;
property = (require(1244) /* metro dependency 1244: indexNative */).t['9NPc+O'];
value = require(3802) /* metro dependency 3802: PremiumUtils */;
value = (
<TextWithIOSLinkWorkaround {...textWithIOSLinkWorkaroundProps}>
{Reflect.apply(format, intl, [property,
{onClick: value.getExternalSubscriptionMethodUrl(subscription.paymentGateway,
'SUBSCRIPTION_MANAGEMENT')}])}
</TextWithIOSLinkWorkaround>
);
r0 = value;
} else {
r0 = null;
}
} else {
r0 = null;
}
} else {
r0 = null;
return r0;
}
return r0;
}
function PremiumBillingInfo({style, subscription}) { // fn#60692, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7727:886, offset: 0x0170a7f4, size: 700 bytes, params: 2, frame: 32
const styles = useStyles();
const premiumSubscriptionInvoiceModule = require(7545) /* metro dependency 7545: PremiumSubscriptionInvoice */;
const useFetchSubscriptionInvoicePreview = premiumSubscriptionInvoiceModule.useFetchSubscriptionInvoicePreview;
const object2 = {'subscriptionId': null, 'renewal': true, 'applyEntitlements': true};
object2.subscriptionId = subscription.id;
object2.analyticsLocations = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)();
const PREMIUM_BILLING_INFO = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).PREMIUM_BILLING_INFO;
object2.analyticsLocation = PREMIUM_BILLING_INFO;
const value2 = Reflect.apply(useFetchSubscriptionInvoicePreview, premiumSubscriptionInvoiceModule, [object2]);
const binding = env0_3;
const property = binding(value2, 1)[0];
const moduleValue2 = premiumSubscriptionInvoiceModule;
const useGetSubscriptionInvoice = moduleValue2.useGetSubscriptionInvoice;
const status = subscription.status;
const PAST_DUE = SubscriptionStatusTypes.PAST_DUE;
const property2 = binding(Reflect.apply(useGetSubscriptionInvoice, moduleValue2, [{subscriptionId: subscription.id,
preventFetch: status !== PAST_DUE}]), 1)[0];
if (property == null) {
return null;
function PremiumBillingInfo({style, subscription}) { // fn#60692, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7727:886, offset: 0x0170a7f4, size: 700 bytes, params: 2, frame: 32
const styles = useStyles();
const useFetchSubscriptionInvoicePreview = PremiumSubscriptionInvoiceModule.useFetchSubscriptionInvoicePreview;
const object = {'subscriptionId': null, 'renewal': true, 'applyEntitlements': true};
object.subscriptionId = subscription.id;
object.analyticsLocations = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)();
const PREMIUM_BILLING_INFO = (AnalyticsLocation).PREMIUM_BILLING_INFO;
object.analyticsLocation = PREMIUM_BILLING_INFO;
const value2 = Reflect.apply(useFetchSubscriptionInvoicePreview, PremiumSubscriptionInvoiceModule, [object]);
const property = Module00057(value2, 1)[0];
const useGetSubscriptionInvoice = PremiumSubscriptionInvoiceModule.useGetSubscriptionInvoice;
const status = subscription.status;
const PAST_DUE = SubscriptionStatusTypes.PAST_DUE;
const property2 = Module00057(Reflect.apply(useGetSubscriptionInvoice, PremiumSubscriptionInvoiceModule, [{subscriptionId: subscription.id,
preventFetch: status !== PAST_DUE}]), 1)[0];
if (property == null) {
return null;
}
const externalManagementMessage = (PremiumManagementUtilsModule).getExternalManagementMessage(subscription,
{shouldAllowExternalManagement: true});
const Text = (TextModule).Text;
const intl = (IndexNativeModule).intl;
let string = intl.string;
const Sb6wI1 = (IndexNativeModule).t.Sb6wI1;
const items3 = [
<Text
style={styles.title}
accessibilityRole="header"
variant="eyebrow"
color="text-default"
>
{Reflect.apply(string, intl, [Sb6wI1])}
</Text>,
];
string = intl.string;
const KXQjfc = (IndexNativeModule).t.KXQjfc;
const items2 = [
<Text variant="text-md/semibold">
{Reflect.apply(string, intl, [KXQjfc])}
</Text>,
];
items2[1] = (
<Text style={styles.billingRenewalInfo} variant="text-sm/medium">
{(require(3802) /* metro dependency 3802: PremiumUtils */).getBillingInformationString(subscription,
property, property2)}
</Text>
);
items2[2] = <GoogleManagementLink style={styles.billingManageGoogle} subscription={subscription} />;
items3[1] = (
<View style={styles.billingContainer}>
{items2}
</View>
);
items3[2] = (
externalManagementMessage != null
? (
<Text style={styles.externalSubtext} variant="text-sm/medium">
{externalManagementMessage}
</Text>
)
: null
);
return (
<View style={style}>
{items3}
</View>
);
}
const externalManagementMessage = (require(7022) /* metro dependency 7022: PremiumManagementUtils */).getExternalManagementMessage(subscription,
{shouldAllowExternalManagement: true});
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const Sb6wI1 = (require(1244) /* metro dependency 1244: indexNative */).t.Sb6wI1;
const items3 = [<Text style={styles.title} accessibilityRole="header" variant="eyebrow" color="text-default">{Reflect.apply(string,
intl, [Sb6wI1])}</Text>];
string = intl.string;
const KXQjfc = (require(1244) /* metro dependency 1244: indexNative */).t.KXQjfc;
const items2 = [<Text variant="text-md/semibold">{Reflect.apply(string, intl, [KXQjfc])}</Text>];
items2[1] = <Text style={styles.billingRenewalInfo} variant="text-sm/medium">{(require(3802) /* metro dependency 3802: PremiumUtils */).getBillingInformationString(subscription,
property, property2)}</Text>;
items2[2] = <GoogleManagementLink style={styles.billingManageGoogle} subscription={subscription} />;
items3[1] = <View style={styles.billingContainer}>{items2}</View>;
items3[2] = externalManagementMessage != null ? <Text style={styles.externalSubtext} variant="text-sm/medium">{externalManagementMessage}</Text> : null;
return (
<View style={style}>
{items3}
</View>
);
}
global.__d(_fun60690, 7549, [57, 31, 27, 661, 33, 4501, 697, 3815, 6766, 1244, 3802, 7545, 6771, 6789, 7022, 4573,
2]) /* metro module 7549, dependencies: [57, 31, 27, 661, 33, 4501, 697, 3815, 6766, 1244, 3802, 7545, 6771, 6789, 7022, 4573, 2] */;
@@ -1,62 +1,83 @@
/* Metro module 7971; source: components_native/premium/PremiumFeatureList.tsx; dependencies: [31, 27, 661, 33, 4501, 6597, 697, 7972, 2] */
import Native from '../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import TextStyles from '../../modules/rebrand/native/TextStyles.tsx'; /* Metro dependency 6597 */
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/Form/native/index.tsx'; /* Metro dependency 7972 */
function _fun63452(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#63452, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8149:6, offset: 0x01b7ff3f, size: 325 bytes, params: 8, frame: 26
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const Fonts = (require(661) /* metro dependency 661: Constants */).Fonts;
let value = require(33) /* metro dependency 33 */;
const Fonts = (ConstantsModule).Fonts;
let value = JsxRuntimeModule;
const env0_4 = value.jsx;
const env0_5 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object3 = {item: {'backgroundColor': 'transparent', 'paddingHorizontal': 0, 'paddingVertical': 8,
object = {item: {'backgroundColor': 'transparent', 'paddingHorizontal': 0, 'paddingVertical': 8,
'flexDirection': 'row', 'alignItems': 'center'}};
const object4 = {};
const textStyles = importDefault(6597) /* metro dependency 6597: TextStyles */;
const object2 = {};
const PRIMARY_NORMAL = Fonts.PRIMARY_NORMAL;
const TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_DEFAULT;
copyDataProperties(object4, textStyles(PRIMARY_NORMAL, TEXT_DEFAULT, 14), undefined);
object3.label = object4;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object3.iconMargin = {marginEnd: PX_16};
const env0_6 = Reflect.apply(createStyles, value, [object3]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/premium/PremiumFeatureList.tsx');
const TEXT_DEFAULT = (Native).colors.TEXT_DEFAULT;
copyDataProperties(object2, TextStyles(PRIMARY_NORMAL, TEXT_DEFAULT, 14), undefined);
object.label = object2;
const PX_16 = (Native).space.PX_16;
object.iconMargin = {marginEnd: PX_16};
const env0_6 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('components_native/premium/PremiumFeatureList.tsx');
exports.default = PremiumFeatureList;
function PremiumFeatureList({features, style, separator, iconStyle, labelStyle, rowStyle}) { // fn#63453, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8149:426, offset: 0x01b80084, size: 129 bytes, params: 2, frame: 16
const env0_4 = useStyles();
return (
<View style={style}>
{features.filter(function(a0) {
return !a0.hidden;
}).map(_fun63455)}
</View>
);
function _fun63455(a0, a1) { // fn#63455, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8149:597, offset: 0x01b80113, size: 301 bytes, params: 3, frame: 25
const IconComponent = a0.IconComponent;
let value = environment.__proto__;
const Fragment = env1_2.Fragment;
const stylesBinding = styles;
const items2 = [stylesBinding.item];
items2[1] = rowStyle;
const iconComponent = (
<IconComponent
size="md"
color={a0.color}
style={[stylesBinding.iconMargin, iconStyle]}
/>
);
const FormRow = (NativeModule).FormRow;
const Label = FormRow.Label;
const items5 = [
<View style={items2} key={a1}>
{iconComponent}
<Label
numberOfLines={2}
style={[stylesBinding.label, labelStyle]}
text={a0.label}
/>
</View>,
];
const separatorBinding = separator;
value = null;
items5[1] = value != separatorBinding ? separator === '' ? value : a0.renderSeparatorBelow ? separator : value : value;
return (
<Fragment key={a1}>
{items5}
</Fragment>
);
}
}
}
function PremiumFeatureList({features, style, separator, iconStyle, labelStyle, rowStyle}) { // fn#63453, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8149:426, offset: 0x01b80084, size: 129 bytes, params: 2, frame: 16
const env0_4 = useStyles();
return (
<View style={style}>
{features.filter(function(a0) {
return !a0.hidden;
}).map(_fun63455)}
</View>
);
}
function _fun63455(a0, a1) { // fn#63455, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8149:597, offset: 0x01b80113, size: 301 bytes, params: 3, frame: 25
const IconComponent = a0.IconComponent;
let value = environment.__proto__;
const Fragment = env1_2.Fragment;
const stylesBinding = styles;
const items2 = [stylesBinding.item];
items2[1] = rowStyle;
const iconComponent = <IconComponent size="md" color={a0.color} style={[stylesBinding.iconMargin, iconStyle]} />;
const FormRow = (require(7972) /* metro dependency 7972: native */).FormRow;
const Label = FormRow.Label;
const items5 = [<View style={items2} key={a1}>{iconComponent}<Label numberOfLines={2} style={[stylesBinding.label,
labelStyle]} text={a0.label} /></View>];
const separatorBinding = separator;
value = null;
items5[1] = value != separatorBinding ? separator === '' ? value : a0.renderSeparatorBelow ? separator : value : value;
return (
<Fragment key={a1}>
{items5}
</Fragment>
);
}
global.__d(_fun63452, 7971, [31, 27, 661, 33, 4501, 6597, 697, 7972,
2]) /* metro module 7971, dependencies: [31, 27, 661, 33, 4501, 6597, 697, 7972, 2] */;
@@ -1,108 +1,121 @@
/* Metro module 7028; source: components_native/premium/PremiumModal.tsx; dependencies: [31, 661, 33, 1244, 5282, 7029, 12224, 12227, 12269, 12279, 6771, 5280, 2] */
import UserSettingsPremium from '../../modules/user_settings/premium/native/UserSettingsPremium.tsx'; /* Metro dependency 7029 */
import PremiumManagePlan from '../../modules/user_settings/premium/native/PremiumManagePlan.tsx'; /* Metro dependency 12224 */
import UserSettingsPremiumGuildSubscriptions from '../../modules/user_settings/premium/native/UserSettingsPremiumGuildSubscriptions.tsx'; /* Metro dependency 12227 */
import PremiumPlanSelect from '../../modules/premium/native/PremiumPlanSelect.tsx'; /* Metro dependency 12269 */
import UserSettingsPremiumGifting from '../../modules/user_settings/premium/native/UserSettingsPremiumGifting.tsx'; /* Metro dependency 12279 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as NavigatorNativeModule from '../../design/components/Navigator/native/Navigator.native.tsx'; /* Metro dependency 5280 */
import * as UseAnalyticsLocationsModule from '../../modules/app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
function _fun55694(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#55694, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7206:6, offset: 0x013ae5e2, size: 177 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(661) /* metro dependency 661: Constants */).UserSettingsSections;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/premium/PremiumModal.tsx');
ReactModule;
(FileImportTrackerModule).fileFinishedImporting('components_native/premium/PremiumModal.tsx');
exports.default = PremiumModal;
exports.PREMIUM_KEY = 'PREMIUM_KEY';
}
function getScreens_55695({analyticsLocation, onClose, onBack, predicate, giftRecipientId, showCurrentPlan, planId, applicationId, activitySessionId, channelId, guildId, premiumFeatureCardOrder, onPaymentSuccess, onPaymentDismiss}) { // fn#55695, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7206:149, offset: 0x013ae693, size: 636 bytes, params: 2, frame: 24
const object = {};
const PREMIUM = UserSettingsSections.PREMIUM;
const object2 = {};
const intl = (IndexNativeModule).intl;
let string = intl.string;
const t = (IndexNativeModule).t;
object2.title = Reflect.apply(string, intl, [t.lpNrPu]);
object2.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton(onClose);
object2.render = render_55696;
object[PREMIUM] = object2;
const PREMIUM_MANAGE_PLAN = UserSettingsSections.PREMIUM_MANAGE_PLAN;
const object3 = {};
object3.title = intl.string(t['8jmdON']);
object3.render = render_55697;
object[PREMIUM_MANAGE_PLAN] = object3;
const GUILD_BOOSTING = UserSettingsSections.GUILD_BOOSTING;
const object4 = {};
object4.title = intl.string(t['+CbP2v']);
object4.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton(onClose);
object4.render = render_55698;
object[GUILD_BOOSTING] = object4;
const PREMIUM_PLAN_SELECT = UserSettingsSections.PREMIUM_PLAN_SELECT;
object[PREMIUM_PLAN_SELECT] = {title: intl.string(t.u95Dt4), headerLeft: headerLeft_55699,
initialParams: {predicate: predicate, showCurrentPlan: showCurrentPlan}, render: render_55700};
const PREMIUM_GIFTING = UserSettingsSections.PREMIUM_GIFTING;
const object7 = {};
string = intl.string;
const Oba8Sh = t.Oba8Sh;
object7.title = Reflect.apply(string, intl, [Oba8Sh]);
object7.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton(onClose);
object7.render = render_55701;
object[PREMIUM_GIFTING] = object7;
return object;
function getScreens_55695Render() { // fn#55696, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7206:504, owner: getScreens_55695.render, offset: 0x013ae90f, size: 111 bytes, params: 1, frame: 15
const value = environment.__proto__;
return ((Component) => <Component applicationId={applicationId} onClose={onClose} activitySessionId={activitySessionId} channelId={channelId} guildId={guildId} premiumFeatureCardOrder={premiumFeatureCardOrder} onPaymentSuccess={onPaymentSuccess} onPaymentDismiss={onPaymentDismiss} />)(UserSettingsPremium);
}
function getScreens_55695({analyticsLocation, onClose, onBack, predicate, giftRecipientId, showCurrentPlan, planId, applicationId, activitySessionId, channelId, guildId, premiumFeatureCardOrder, onPaymentSuccess, onPaymentDismiss}) { // fn#55695, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7206:149, offset: 0x013ae693, size: 636 bytes, params: 2, frame: 24
const object5 = {};
const PREMIUM = UserSettingsSections.PREMIUM;
const object6 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
object6.title = Reflect.apply(string, intl, [t.lpNrPu]);
object6.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton(onClose);
object6.render = render_55696;
object5[PREMIUM] = object6;
const PREMIUM_MANAGE_PLAN = UserSettingsSections.PREMIUM_MANAGE_PLAN;
const object8 = {};
object8.title = intl.string(t['8jmdON']);
object8.render = render_55697;
object5[PREMIUM_MANAGE_PLAN] = object8;
const GUILD_BOOSTING = UserSettingsSections.GUILD_BOOSTING;
const object9 = {};
object9.title = intl.string(t['+CbP2v']);
object9.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton(onClose);
object9.render = render_55698;
object5[GUILD_BOOSTING] = object9;
const PREMIUM_PLAN_SELECT = UserSettingsSections.PREMIUM_PLAN_SELECT;
object5[PREMIUM_PLAN_SELECT] = {title: intl.string(t.u95Dt4), headerLeft: headerLeft_55699,
initialParams: {predicate: predicate, showCurrentPlan: showCurrentPlan}, render: render_55700};
const PREMIUM_GIFTING = UserSettingsSections.PREMIUM_GIFTING;
const object10 = {};
string = intl.string;
const Oba8Sh = t.Oba8Sh;
object10.title = Reflect.apply(string, intl, [Oba8Sh]);
object10.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton(onClose);
object10.render = render_55701;
object5[PREMIUM_GIFTING] = object10;
return object5;
}
function getScreens_55695Render_55697() { // fn#55697, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7206:733, owner: getScreens_55695.render, offset: 0x013ae97e, size: 39 bytes, params: 1, frame: 13
const value = environment.__proto__;
return ((Component) => <Component />)(PremiumManagePlan);
}
function PremiumModal({applicationId, analyticsLocation, analyticsLocations, initialRoute, onClose, onBack, giftRecipientId, predicate, showCurrentPlan, planId, activitySessionId, channelId, guildId, premiumFeatureCardOrder, onPaymentSuccess, onPaymentDismiss}) { // fn#55702, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7206:1488, offset: 0x013aeabc, size: 311 bytes, params: 2, frame: 33
analyticsLocations = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)(analyticsLocations).analyticsLocations;
const r7 = initialRoute ?? UserSettingsSections.PREMIUM;
const AnalyticsLocationProvider = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider;
const Navigator = (require(5280) /* metro dependency 5280: NavigatorNative */).Navigator;
return (
<AnalyticsLocationProvider value={analyticsLocations}>
<Navigator
screens={getScreens_55695({analyticsLocation: analyticsLocation, onClose: onClose, onBack: onBack,
predicate: predicate, giftRecipientId: giftRecipientId, showCurrentPlan: showCurrentPlan,
planId: planId, applicationId: applicationId, activitySessionId: activitySessionId,
channelId: channelId, guildId: guildId, premiumFeatureCardOrder: premiumFeatureCardOrder,
onPaymentSuccess: onPaymentSuccess, onPaymentDismiss: onPaymentDismiss})}
initialRouteName={r7}
/>
</AnalyticsLocationProvider>
);
}
function getScreens_55695Render_55698() { // fn#55698, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7206:869, owner: getScreens_55695.render, offset: 0x013ae9a5, size: 39 bytes, params: 1, frame: 13
const value = environment.__proto__;
return ((Component) => <Component />)(UserSettingsPremiumGuildSubscriptions);
}
function getScreens_55695Render() { // fn#55696, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7206:504, owner: getScreens_55695.render, offset: 0x013ae90f, size: 111 bytes, params: 1, frame: 15
const value = environment.__proto__;
return ((Component) => <Component applicationId={applicationId} onClose={onClose} activitySessionId={activitySessionId} channelId={channelId} guildId={guildId} premiumFeatureCardOrder={premiumFeatureCardOrder} onPaymentSuccess={onPaymentSuccess} onPaymentDismiss={onPaymentDismiss} />)(importDefault(7029) /* metro dependency 7029: UserSettingsPremium */);
}
function getScreens_55695HeaderLeft(a0) { // fn#55699, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7206:968, owner: getScreens_55695.headerLeft, offset: 0x013ae9cc, size: 87 bytes, params: 2, frame: 14
var r0;
const canGoBack = a0.canGoBack;
let value = environment.__proto__;
value = require(5282) /* metro dependency 5282: NavigatorHeaderNative */;
if (canGoBack) {
value = value.getHeaderBackButton(onBack)(a0);
r0 = value;
} else {
value = value.getHeaderCloseButton(onClose)(a0);
r0 = value;
}
return r0;
}
function getScreens_55695Render_55697() { // fn#55697, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7206:733, owner: getScreens_55695.render, offset: 0x013ae97e, size: 39 bytes, params: 1, frame: 13
const value = environment.__proto__;
return ((Component) => <Component />)(importDefault(12224) /* metro dependency 12224: PremiumManagePlan */);
}
function getScreens_55695Render_55700({predicate, showCurrentPlan}) { // fn#55700, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7206:1105, owner: getScreens_55695.render, offset: 0x013aea23, size: 93 bytes, params: 2, frame: 17
const value = environment.__proto__;
return ((Component) => <Component analyticsLocation={analyticsLocation} predicate={predicate} showCurrentPlan={showCurrentPlan} planId={planId} applicationId={applicationId} />)(PremiumPlanSelect);
}
function getScreens_55695Render_55698() { // fn#55698, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7206:869, owner: getScreens_55695.render, offset: 0x013ae9a5, size: 39 bytes, params: 1, frame: 13
const value = environment.__proto__;
return ((Component) => <Component />)(importDefault(12227) /* metro dependency 12227: UserSettingsPremiumGuildSubscriptions */);
}
function getScreens_55695Render_55701() { // fn#55701, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7206:1344, owner: getScreens_55695.render, offset: 0x013aea80, size: 60 bytes, params: 1, frame: 15
const value = environment.__proto__;
return ((Component) => <Component recipientUserId={giftRecipientId} analyticsLocation={analyticsLocation} />)(UserSettingsPremiumGifting);
}
function getScreens_55695HeaderLeft(a0) { // fn#55699, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7206:968, owner: getScreens_55695.headerLeft, offset: 0x013ae9cc, size: 87 bytes, params: 2, frame: 14
var r0;
const canGoBack = a0.canGoBack;
let value = environment.__proto__;
value = require(5282) /* metro dependency 5282: NavigatorHeaderNative */;
if (canGoBack) {
value = value.getHeaderBackButton(onBack)(a0);
r0 = value;
} else {
value = value.getHeaderCloseButton(onClose)(a0);
r0 = value;
}
return r0;
}
function getScreens_55695Render_55700({predicate, showCurrentPlan}) { // fn#55700, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7206:1105, owner: getScreens_55695.render, offset: 0x013aea23, size: 93 bytes, params: 2, frame: 17
const value = environment.__proto__;
return ((Component) => <Component analyticsLocation={analyticsLocation} predicate={predicate} showCurrentPlan={showCurrentPlan} planId={planId} applicationId={applicationId} />)(importDefault(12269) /* metro dependency 12269: PremiumPlanSelect */);
}
function PremiumModal({applicationId, analyticsLocation, analyticsLocations, initialRoute, onClose, onBack, giftRecipientId, predicate, showCurrentPlan, planId, activitySessionId, channelId, guildId, premiumFeatureCardOrder, onPaymentSuccess, onPaymentDismiss}) { // fn#55702, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7206:1488, offset: 0x013aeabc, size: 311 bytes, params: 2, frame: 33
analyticsLocations = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)(analyticsLocations).analyticsLocations;
const r7 = initialRoute ?? UserSettingsSections.PREMIUM;
const AnalyticsLocationProvider = (UseAnalyticsLocationsModule).AnalyticsLocationProvider;
const Navigator = (NavigatorNativeModule).Navigator;
return (
<AnalyticsLocationProvider value={analyticsLocations}>
<Navigator
screens={getScreens_55695({analyticsLocation: analyticsLocation, onClose: onClose, onBack: onBack,
predicate: predicate, giftRecipientId: giftRecipientId, showCurrentPlan: showCurrentPlan,
planId: planId, applicationId: applicationId, activitySessionId: activitySessionId,
channelId: channelId, guildId: guildId, premiumFeatureCardOrder: premiumFeatureCardOrder,
onPaymentSuccess: onPaymentSuccess, onPaymentDismiss: onPaymentDismiss})}
initialRouteName={r7}
/>
</AnalyticsLocationProvider>
);
}
function getScreens_55695Render_55701() { // fn#55701, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7206:1344, owner: getScreens_55695.render, offset: 0x013aea80, size: 60 bytes, params: 1, frame: 15
const value = environment.__proto__;
return ((Component) => <Component recipientUserId={giftRecipientId} analyticsLocation={analyticsLocation} />)(importDefault(12279) /* metro dependency 12279: UserSettingsPremiumGifting */);
}
global.__d(_fun55694, 7028, [31, 661, 33, 1244, 5282, 7029, 12224, 12227, 12269, 12279, 6771, 5280,
2]) /* metro module 7028, dependencies: [31, 661, 33, 1244, 5282, 7029, 12224, 12227, 12269, 12279, 6771, 5280, 2] */;
@@ -1,57 +1,68 @@
/* Metro module 14233; source: components_native/premium/PremiumPerksList.tsx; dependencies: [31, 27, 33, 4501, 697, 4573, 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 TextModule from '../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
function _fun107646(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107646, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14430:6, offset: 0x02303e3a, size: 322 bytes, params: 8, frame: 22
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_2 = (require(27) /* metro dependency 27 */).View;
let value = require(33) /* metro dependency 33 */;
ReactModule;
let value = JsxRuntimeModule;
const env0_3 = value.jsx;
const env0_4 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const object = {'backgroundColor': null, 'borderRadius': null, 'width': 40, 'height': 40,
const object2 = {'backgroundColor': null, 'borderRadius': null, 'width': 40, 'height': 40,
'justifyContent': 'center', 'alignItems': 'center'};
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object.backgroundColor = BACKGROUND_BASE_LOWEST;
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object2.backgroundColor = BACKGROUND_BASE_LOWEST;
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
const env0_5 = Reflect.apply(createStyles, value, [{perkInfoContainer: {'flexDirection': 'row',
'alignItems': 'center', 'gap': 16}, perkInfoTextContainer: {'flexDirection': 'column', 'gap': 4,
'maxWidth': 279}, perkListContainer: {'width': '100%', 'paddingVertical': 24, 'flexDirection': 'column',
'gap': 24}, perkIconContainer: object}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/premium/PremiumPerksList.tsx');
'gap': 24}, perkIconContainer: object2}]);
(FileImportTrackerModule).fileFinishedImporting('components_native/premium/PremiumPerksList.tsx');
exports.default = PremiumPerksList;
}
function PremiumPerksList({perks}) { // fn#107647, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14430:566, offset: 0x02303f7c, size: 77 bytes, params: 2, frame: 16
const styles = useStyles();
return (
<View style={styles.perkListContainer}>
{perks.map(_fun107648)}
</View>
);
}
function _fun107648(a0, a1) { // fn#107648, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14430:667, offset: 0x02303fc9, size: 241 bytes, params: 3, frame: 24
const IconComponent = a0.IconComponent;
const value = environment.__proto__;
const stylesBinding = styles;
const perkInfoContainer = stylesBinding.perkInfoContainer;
const view = <View style={stylesBinding.perkIconContainer}><IconComponent size="md" /></View>;
const perkInfoTextContainer = stylesBinding.perkInfoTextContainer;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<View style={perkInfoContainer} key={a1}>
{view}
<View style={perkInfoTextContainer}>
<Text variant="text-md/bold" color="text-strong">
{a0.label}
</Text>
<Text variant="text-md/medium" color="text-default">
{a0.description}
</Text>
function PremiumPerksList({perks}) { // fn#107647, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14430:566, offset: 0x02303f7c, size: 77 bytes, params: 2, frame: 16
const styles = useStyles();
return (
<View style={styles.perkListContainer}>
{perks.map(_fun107648)}
</View>
</View>
);
);
function _fun107648(a0, a1) { // fn#107648, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14430:667, offset: 0x02303fc9, size: 241 bytes, params: 3, frame: 24
const IconComponent = a0.IconComponent;
const value = environment.__proto__;
const stylesBinding = styles;
const perkInfoContainer = stylesBinding.perkInfoContainer;
const view = (
<View style={stylesBinding.perkIconContainer}>
<IconComponent size="md" />
</View>
);
const perkInfoTextContainer = stylesBinding.perkInfoTextContainer;
const Text = (TextModule).Text;
return (
<View style={perkInfoContainer} key={a1}>
{view}
<View style={perkInfoTextContainer}>
<Text variant="text-md/bold" color="text-strong">
{a0.label}
</Text>
<Text variant="text-md/medium" color="text-default">
{a0.description}
</Text>
</View>
</View>
);
}
}
}
global.__d(_fun107646, 14233, [31, 27, 33, 4501, 697, 4573,
2]) /* metro module 14233, dependencies: [31, 27, 33, 4501, 697, 4573, 2] */;
@@ -1,66 +1,80 @@
/* Metro module 13707; source: components_native/premium/PremiumRestorationAlert.tsx; dependencies: [6, 7, 15, 17, 18, 31, 5140, 33, 13708, 566, 2] */
import ClassCallCheck from '../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import Flux from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import IAPStoreAndroid from '../../stores/native/IAPStore.android.tsx'; /* Metro dependency 5140 */
import UntouchableAlert from '../common/UntouchableAlert.tsx'; /* Metro dependency 13708 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
function _fun104749(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104749, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13904:6, offset: 0x0229fb75, size: 296 bytes, params: 8, frame: 20
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(6) /* metro dependency 6 */;
const env0_3 = importDefault(7) /* metro dependency 7 */;
const env0_4 = importDefault(15) /* metro dependency 15 */;
const env0_5 = importDefault(17) /* metro dependency 17 */;
const env0_6 = importDefault(18) /* metro dependency 18 */;
let value = importAll(31) /* metro dependency 31 */;
const iapStoreAndroid = importDefault(5140) /* metro dependency 5140: IAPStoreAndroid */;
const env0_8 = (require(33) /* metro dependency 33 */).jsx;
let value = ReactModule;
const PureComponent = value.PureComponent;
value = _fun104753(PureComponent);
const flux = importDefault(566) /* metro dependency 566: flux */;
value = flux.connectStores([iapStoreAndroid], function() {
value = Flux.connectStores([IAPStoreAndroid], function() {
var object = {};
object.isBusy = IAPStoreAndroid.isBusy();
return object;
})(value);
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/premium/PremiumRestorationAlert.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/premium/PremiumRestorationAlert.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_104750() { // fn#104750, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13904:182, offset: 0x0229fc9d, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
function _isNativeReflectConstruct_104750() { // fn#104750, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13904:182, offset: 0x0229fc9d, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_104750_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_104750_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun104753(a0) { // fn#104753, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13904:381, offset: 0x0229fcff, size: 72 bytes, params: 2, frame: 15
const closure = PremiumRestorationAlert;
env0_6(closure, a0);
return env0_3(closure, [{key: 'render', value: value_104755}]);
}
function value_104755() { // fn#104755, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13904:722, offset: 0x0229fd47, size: 69 bytes, params: 1, frame: 15
const {isBusy, onClose} = this.props;
const value = environment.__proto__;
return ((Component) => <Component loading={isBusy} onClose={onClose} />)(importDefault(13708) /* metro dependency 13708: UntouchableAlert */);
function _fun104753(a0) { // fn#104753, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13904:381, offset: 0x0229fcff, size: 72 bytes, params: 2, frame: 15
const PremiumRestorationAlert2 = PremiumRestorationAlert;
Inherits(PremiumRestorationAlert2, a0);
return CreateClass(PremiumRestorationAlert2, [{key: 'render', value: value_104755}]);
function PremiumRestorationAlert() { // fn#104754, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13904:393, offset: 0x01081bdc, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_2(this, PremiumRestorationAlert);
const value3 = env1_5(PremiumRestorationAlert);
return env1_4(this, _isNativeReflectConstruct_104750() ? global.Reflect.construct(value3, arguments,
env1_5(this).constructor) : value3.apply(this, arguments));
}
function value_104755() { // fn#104755, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13904:722, offset: 0x0229fd47, size: 69 bytes, params: 1, frame: 15
const {isBusy, onClose} = this.props;
const value = environment.__proto__;
return ((Component) => <Component loading={isBusy} onClose={onClose} />)(UntouchableAlert);
}
}
}
global.__d(_fun104749, 13707, [6, 7, 15, 17, 18, 31, 5140, 33, 13708, 566,
2]) /* metro module 13707, dependencies: [6, 7, 15, 17, 18, 31, 5140, 33, 13708, 566, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,18 +1,27 @@
/* Metro module 12264; source: components_native/premium/PremiumSubscriptionPricingUpsell.tsx; dependencies: [57, 31, 27, 1949, 1878, 3807, 3808, 5140, 661, 1880, 33, 4501, 566, 3802, 7563, 694, 7037, 5143, 4573, 477, 5138, 5137, 1244, 1856, 2] */
import Module00057 from '../../by-id/module-00057.js'; /* Metro dependency 57 */
import UserStore from '../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import LocaleStore from '../../modules/user_settings/LocaleStore.tsx'; /* Metro dependency 1949 */
import SubscriptionPlanStore from '../../stores/billing/SubscriptionPlanStore.tsx'; /* Metro dependency 3807 */
import SubscriptionStore from '../../stores/billing/SubscriptionStore.tsx'; /* Metro dependency 3808 */
import IAPStoreAndroid from '../../stores/native/IAPStore.android.tsx'; /* Metro dependency 5140 */
import BillingActionCreators from '../../actions/native/BillingActionCreators.tsx'; /* Metro dependency 7037 */
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 FluxModule from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as PremiumConstantsModule from '../../modules/premium/PremiumConstants.tsx'; /* Metro dependency 1880 */
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 ProductIdsAndroidModule from '../../modules/premium/native/ProductIds.android.tsx'; /* Metro dependency 5143 */
import * as UseSubscriptionPlansLoadedModule from '../../modules/billing/hooks/useSubscriptionPlansLoaded.tsx'; /* Metro dependency 7563 */
function _fun93722(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#93722, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12450:6, offset: 0x020c0645, size: 476 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
const localeStore = importDefault(1949) /* metro dependency 1949: LocaleStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const subscriptionPlanStore = importDefault(3807) /* metro dependency 3807: SubscriptionPlanStore */;
const subscriptionStore = importDefault(3808) /* metro dependency 3808: SubscriptionStore */;
const iapStoreAndroid = importDefault(5140) /* metro dependency 5140: IAPStoreAndroid */;
const env0_11 = (require(661) /* metro dependency 661: Constants */).CurrencyCodes;
let value = require(1880) /* metro dependency 1880: PremiumConstants */;
let value = PremiumConstantsModule;
const env0_12 = value.SubscriptionPlans;
const env0_13 = value.SubscriptionPlanInfo;
const env0_14 = value.PremiumTypes;
@@ -23,175 +32,209 @@ function _fun93722(global, require, importDefault, importAll, module, exports, d
const env0_18 = value.jsx;
const env0_19 = value.Fragment;
const env0_20 = value.jsxs;
const env0_21 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({title: {marginTop: 16},
const env0_21 = (CreateStylesModule).createStyles({title: {marginTop: 16},
pricingSection: {alignItems: 'center'}, originalPrice: {textDecorationLine: 'line-through'},
cardText: {'lineHeight': 20, 'marginTop': 8, 'textAlign': 'center'}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/premium/PremiumSubscriptionPricingUpsell.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/premium/PremiumSubscriptionPricingUpsell.tsx');
exports.default = PremiumSubscriptionPricingUpsell;
}
function PricingSubheadingCopy() { // fn#93723, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12450:635, offset: 0x020c0821, size: 1807 bytes, params: 1, frame: 33
var r19;
var price;
var price2;
var r10;
var price3;
var r1;
var r14;
var r16;
var r17;
var value10;
var moduleValue8;
var moduleValue10;
var value16;
var moduleValue11;
var formatRate;
var moduleValue12;
var moduleValue13;
var moduleValue14;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var format;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var text;
var defaultImport2;
var defaultImport3;
var defaultImport4;
var jsxRuntimeEnv0_19Binding;
var XVMAKU;
var moduleValue15;
var object2;
var moduleValue16;
var value;
const value2 = undefined;
const styles = useStyles();
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStores = fluxModule.useStateFromStores;
let object = [UserStore];
const currentUser = Reflect.apply(useStateFromStores, fluxModule, [object, function() {
return UserStore.getCurrentUser();
}]);
const hasBoostDiscount2 = (importDefault(3802) /* metro dependency 3802: PremiumUtils */).hasBoostDiscount(currentUser);
const locale = fluxModule.useStateFromStores([LocaleStore], function() {
return LocaleStore.locale;
});
const value3 = (require(7563) /* metro dependency 7563: useSubscriptionPlansLoaded */).useSubscriptionPlansLoaded();
const env0_1 = fluxModule.useStateFromStores([SubscriptionStore], function() {
return SubscriptionStore.getPremiumTypeSubscription();
});
const value4 = fluxModule.useStateFromStores([SubscriptionPlanStore], _fun93727);
env0_4.useEffect(_fun93728, []);
const moduleValue6 = fluxModule;
const useStateFromStoresArray = moduleValue6.useStateFromStoresArray;
const value6 = env0_3(Reflect.apply(useStateFromStoresArray, moduleValue6, [[IAPStoreAndroid], _fun93730]), 5);
const value7 = 0;
let property = value6[value7];
const property2 = value6[1];
const property3 = value6[2];
const property4 = value6[3];
const property5 = value6[4];
const value8 = null;
const {interval,
intervalCount} = value8 != value4 ? value4 : SubscriptionPlanInfo[SubscriptionPlans.PREMIUM_MONTH_GUILD];
if (value3) {
if (IAPStoreAndroid.isReady()) {
if (value8 == property) {
return (
<Text style={styles.cardText} variant="text-md/medium">
{'...'}
</Text>
);
}
r19 = value8 == property ? value2 : property.currencyCode.toLowerCase();
price = value8 == property ? value2 : property.price;
if (interval === SubscriptionIntervalTypes.YEAR) {
r1 = value8 != property5 && value8 != property4 ? property5.price - property4.price : value8;
r14 = r1;
r16 = r1;
} else if (hasBoostDiscount2) {
if (value8 == price) {
function PricingSubheadingCopy() { // fn#93723, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12450:635, offset: 0x020c0821, size: 1807 bytes, params: 1, frame: 33
var r19;
var price;
var price2;
var r10;
var price3;
var r1;
var r14;
var r16;
var r17;
var value10;
var moduleValue8;
var moduleValue10;
var value16;
var moduleValue11;
var formatRate;
var moduleValue12;
var moduleValue13;
var moduleValue14;
const Text = (TextModule).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var format;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var text;
var defaultImport2;
var defaultImport3;
var defaultImport4;
var jsxRuntimeEnv0_19Binding;
var XVMAKU;
var moduleValue15;
var object3;
var moduleValue16;
var value;
const value2 = undefined;
const styles = useStyles();
const useStateFromStores = FluxModule.useStateFromStores;
let object = [UserStore];
const currentUser = Reflect.apply(useStateFromStores, FluxModule, [object, function() {
return UserStore.getCurrentUser();
}]);
const hasBoostDiscount2 = (importDefault(3802) /* metro dependency 3802: PremiumUtils */).hasBoostDiscount(currentUser);
const locale = FluxModule.useStateFromStores([LocaleStore], function() {
return LocaleStore.locale;
});
const value3 = (UseSubscriptionPlansLoadedModule).useSubscriptionPlansLoaded();
const env0_1 = FluxModule.useStateFromStores([SubscriptionStore], function() {
return SubscriptionStore.getPremiumTypeSubscription();
});
const value4 = FluxModule.useStateFromStores([SubscriptionPlanStore], _fun93727);
ReactModule.useEffect(_fun93728, []);
const useStateFromStoresArray = FluxModule.useStateFromStoresArray;
const value6 = Module00057(Reflect.apply(useStateFromStoresArray, FluxModule, [[IAPStoreAndroid], _fun93730]), 5);
const value7 = 0;
let property = value6[value7];
const property2 = value6[1];
const property3 = value6[2];
const property4 = value6[3];
const property5 = value6[4];
const value8 = null;
const {interval,
intervalCount} = value8 != value4 ? value4 : SubscriptionPlanInfo[SubscriptionPlans.PREMIUM_MONTH_GUILD];
if (value3) {
iapStoreAndroidBinding = IAPStoreAndroid;
if (iapStoreAndroidBinding.isReady()) {
if (value8 == property) {
return (
<Text style={styles.cardText} variant="text-md/medium">
{'...'}
</Text>
);
}
r19 = value8 == property ? value2 : property.currencyCode.toLowerCase();
price = value8 == property ? value2 : property.price;
if (interval === SubscriptionIntervalTypes.YEAR) {
r1 = value8 != property5 && value8 != property4 ? property5.price - property4.price : value8;
r14 = r1;
r16 = r1;
} else if (hasBoostDiscount2) {
if (value8 == price) {
r14 = price;
r16 = price;
} else {
price2 = value8 == property3 ? value2 : property3.price;
r10 = value8 != price2 ? price2 : value7;
price3 = value8 == property2 ? value2 : property2.price;
value10 = r10 - (value8 != price3 ? price3 : value7);
r14 = price;
r16 = value10;
}
} else {
r14 = price;
r16 = price;
} else {
price2 = value8 == property3 ? value2 : property3.price;
r10 = value8 != price2 ? price2 : value7;
price3 = value8 == property2 ? value2 : property2.price;
value10 = r10 - (value8 != price3 ? price3 : value7);
r14 = price;
r16 = value10;
}
} else {
r14 = price;
r16 = price;
}
r1 = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid() && value8 != r16;
if (r1) {
moduleValue8 = require(5138) /* metro dependency 5138: PriceUtils */;
r10 = moduleValue8.convertToMajorCurrencyUnits(r16, CurrencyCodes.USD);
} else {
r10 = r16;
}
if ((require(477) /* metro dependency 477: PlatformUtils */).isAndroid() && value8 != r14) {
moduleValue10 = require(5138) /* metro dependency 5138: PriceUtils */;
r1 = moduleValue10.convertToMajorCurrencyUnits(r14, CurrencyCodes.USD);
} else {
r1 = r14;
}
value16 = '...';
if (value8 != r10) {
moduleValue11 = require(5137) /* metro dependency 5137: PriceUtils */;
formatRate = moduleValue11.formatRate;
moduleValue12 = require(5137) /* metro dependency 5137: PriceUtils */;
r17 = Reflect.apply(formatRate, moduleValue11, [moduleValue12.formatPrice(r10, r19,
{convertToMajorUnits: false}),
interval, intervalCount]);
} else {
r17 = value16;
}
if (value8 != r1) {
moduleValue13 = require(5137) /* metro dependency 5137: PriceUtils */;
formatRate = moduleValue13.formatRate;
moduleValue14 = require(5137) /* metro dependency 5137: PriceUtils */;
r16 = Reflect.apply(formatRate, moduleValue13, [moduleValue14.formatPrice(r1, r19,
{convertToMajorUnits: false}),
interval, intervalCount]);
} else {
r16 = value16;
}
if (r10 !== r1) {
object = {};
object.style = styles.cardText;
object.accessibilityLabel = intl.formatToPlainString(t.lEIwDw, {price: r17, originalPrice: r16});
object.variant = 'text-md/medium';
object.children = intl.format(t.eRSsbf, {price: r17, originalPrice: r16,
originalPriceHook: originalPriceHook});
r1 = object;
} else {
object = {};
object.style = styles.cardText;
object.variant = 'text-md/medium';
object.children = intl.format((require(1244) /* metro dependency 1244: indexNative */).t.Mmf63F,
{price: r17});
r1 = object;
}
text = <Text {...r1} />;
defaultImport2 = importDefault(3802) /* metro dependency 3802: PremiumUtils */;
if (defaultImport2.hasFreeBoosts(currentUser)) {
if (hasBoostDiscount2) {
defaultImport3 = importDefault(3802) /* metro dependency 3802: PremiumUtils */;
if (defaultImport3.isPremium(currentUser, PremiumTypes.TIER_2)) {
jsxRuntimeEnv0_19Binding = jsxRuntimeEnv0_19;
var textProps = {style: styles.cardText, variant: 'text-md/medium'};
format = intl.format;
property = (require(1244) /* metro dependency 1244: indexNative */).t['ZikTt+'];
object2 = {};
object2.freeSubscriptionCount = NUM_FREE_GUILD_BOOSTS_WITH_PREMIUM;
moduleValue16 = require(1856) /* metro dependency 1856: NumberUtils */;
object2.discountPercent = moduleValue16.formatPercent(locale,
GUILD_BOOST_COST_FOR_PREMIUM_USER_DISCOUNT_PERCENT / 100);
value = <Text {...textProps}>{Reflect.apply(format, intl, [property, object2])}</Text>;
value = <>{value}{text}</>;
r1 = value;
r1 = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid() && value8 != r16;
if (r1) {
moduleValue8 = require(5138) /* metro dependency 5138: PriceUtils */;
r10 = moduleValue8.convertToMajorCurrencyUnits(r16, CurrencyCodes.USD);
} else {
r10 = r16;
}
if ((require(477) /* metro dependency 477: PlatformUtils */).isAndroid() && value8 != r14) {
moduleValue10 = require(5138) /* metro dependency 5138: PriceUtils */;
r1 = moduleValue10.convertToMajorCurrencyUnits(r14, CurrencyCodes.USD);
} else {
r1 = r14;
}
value16 = '...';
if (value8 != r10) {
moduleValue11 = require(5137) /* metro dependency 5137: PriceUtils */;
formatRate = moduleValue11.formatRate;
moduleValue12 = require(5137) /* metro dependency 5137: PriceUtils */;
r17 = Reflect.apply(formatRate, moduleValue11, [moduleValue12.formatPrice(r10, r19,
{convertToMajorUnits: false}),
interval, intervalCount]);
} else {
r17 = value16;
}
if (value8 != r1) {
moduleValue13 = require(5137) /* metro dependency 5137: PriceUtils */;
formatRate = moduleValue13.formatRate;
moduleValue14 = require(5137) /* metro dependency 5137: PriceUtils */;
r16 = Reflect.apply(formatRate, moduleValue13, [moduleValue14.formatPrice(r1, r19,
{convertToMajorUnits: false}),
interval, intervalCount]);
} else {
r16 = value16;
}
if (r10 !== r1) {
object = {};
object.style = styles.cardText;
object.accessibilityLabel = intl.formatToPlainString(t.lEIwDw, {price: r17, originalPrice: r16});
object.variant = 'text-md/medium';
object.children = intl.format(t.eRSsbf, {price: r17, originalPrice: r16,
originalPriceHook: originalPriceHook});
r1 = object;
} else {
object = {};
object.style = styles.cardText;
object.variant = 'text-md/medium';
object.children = intl.format((require(1244) /* metro dependency 1244: indexNative */).t.Mmf63F,
{price: r17});
r1 = object;
}
text = <Text {...r1} />;
defaultImport2 = importDefault(3802) /* metro dependency 3802: PremiumUtils */;
if (defaultImport2.hasFreeBoosts(currentUser)) {
if (hasBoostDiscount2) {
defaultImport3 = importDefault(3802) /* metro dependency 3802: PremiumUtils */;
if (defaultImport3.isPremium(currentUser, PremiumTypes.TIER_2)) {
jsxRuntimeEnv0_19Binding = jsxRuntimeEnv0_19;
var textProps = {style: styles.cardText, variant: 'text-md/medium'};
format = intl.format;
property = (require(1244) /* metro dependency 1244: indexNative */).t['ZikTt+'];
object3 = {};
object3.freeSubscriptionCount = NUM_FREE_GUILD_BOOSTS_WITH_PREMIUM;
moduleValue16 = require(1856) /* metro dependency 1856: NumberUtils */;
object3.discountPercent = moduleValue16.formatPercent(locale,
GUILD_BOOST_COST_FOR_PREMIUM_USER_DISCOUNT_PERCENT / 100);
value = (
<Text {...textProps}>
{Reflect.apply(format, intl, [property, object3])}
</Text>
);
value = (
<>
{value}
{text}
</>
);
r1 = value;
} else if (hasBoostDiscount2) {
defaultImport4 = importDefault(3802) /* metro dependency 3802: PremiumUtils */;
if (defaultImport4.isPremium(currentUser, PremiumTypes.TIER_1)) {
jsxRuntimeEnv0_19Binding = jsxRuntimeEnv0_19;
var textProps = {style: styles.cardText, variant: 'text-md/medium'};
format = intl.format;
XVMAKU = (require(1244) /* metro dependency 1244: indexNative */).t.XVMAKU;
moduleValue15 = require(1856) /* metro dependency 1856: NumberUtils */;
value = (
<Text {...textProps}>
{Reflect.apply(format, intl, [XVMAKU,
{discountPercent: moduleValue15.formatPercent(locale,
GUILD_BOOST_COST_FOR_PREMIUM_USER_DISCOUNT_PERCENT / 100)}])}
</Text>
);
value = (
<>
{value}
{text}
</>
);
r1 = value;
} else {
r1 = text;
}
} else {
r1 = text;
}
} else if (hasBoostDiscount2) {
defaultImport4 = importDefault(3802) /* metro dependency 3802: PremiumUtils */;
if (defaultImport4.isPremium(currentUser, PremiumTypes.TIER_1)) {
@@ -200,10 +243,19 @@ function PricingSubheadingCopy() { // fn#93723, source: /ci/build/discord/discor
format = intl.format;
XVMAKU = (require(1244) /* metro dependency 1244: indexNative */).t.XVMAKU;
moduleValue15 = require(1856) /* metro dependency 1856: NumberUtils */;
value = <Text {...textProps}>{Reflect.apply(format, intl, [XVMAKU,
{discountPercent: moduleValue15.formatPercent(locale,
GUILD_BOOST_COST_FOR_PREMIUM_USER_DISCOUNT_PERCENT / 100)}])}</Text>;
value = <>{value}{text}</>;
value = (
<Text {...textProps}>
{Reflect.apply(format, intl, [XVMAKU,
{discountPercent: moduleValue15.formatPercent(locale,
GUILD_BOOST_COST_FOR_PREMIUM_USER_DISCOUNT_PERCENT / 100)}])}
</Text>
);
value = (
<>
{value}
{text}
</>
);
r1 = value;
} else {
r1 = text;
@@ -219,10 +271,18 @@ function PricingSubheadingCopy() { // fn#93723, source: /ci/build/discord/discor
format = intl.format;
XVMAKU = (require(1244) /* metro dependency 1244: indexNative */).t.XVMAKU;
moduleValue15 = require(1856) /* metro dependency 1856: NumberUtils */;
value = <Text {...textProps}>{Reflect.apply(format, intl, [XVMAKU,
{discountPercent: moduleValue15.formatPercent(locale,
GUILD_BOOST_COST_FOR_PREMIUM_USER_DISCOUNT_PERCENT / 100)}])}</Text>;
value = <>{value}{text}</>;
value = (
<Text {...textProps}>
{Reflect.apply(format, intl, [XVMAKU, {discountPercent: moduleValue15.formatPercent(locale,
GUILD_BOOST_COST_FOR_PREMIUM_USER_DISCOUNT_PERCENT / 100)}])}
</Text>
);
value = (
<>
{value}
{text}
</>
);
r1 = value;
} else {
r1 = text;
@@ -230,107 +290,105 @@ function PricingSubheadingCopy() { // fn#93723, source: /ci/build/discord/discor
} else {
r1 = text;
}
} else if (hasBoostDiscount2) {
defaultImport4 = importDefault(3802) /* metro dependency 3802: PremiumUtils */;
if (defaultImport4.isPremium(currentUser, PremiumTypes.TIER_1)) {
jsxRuntimeEnv0_19Binding = jsxRuntimeEnv0_19;
var textProps = {style: styles.cardText, variant: 'text-md/medium'};
format = intl.format;
XVMAKU = (require(1244) /* metro dependency 1244: indexNative */).t.XVMAKU;
moduleValue15 = require(1856) /* metro dependency 1856: NumberUtils */;
value = <Text {...textProps}>{Reflect.apply(format, intl, [XVMAKU,
{discountPercent: moduleValue15.formatPercent(locale,
GUILD_BOOST_COST_FOR_PREMIUM_USER_DISCOUNT_PERCENT / 100)}])}</Text>;
value = <>{value}{text}</>;
r1 = value;
} else {
r1 = text;
}
} else {
r1 = text;
return r1;
}
return r1;
}
}
return (
<Text style={styles.cardText} variant="text-md/medium">
{'...'}
</Text>
);
}
function PremiumSubscriptionPricingUpsell() { // fn#93732, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12450:3246, offset: 0x020c1108, size: 213 bytes, params: 1, frame: 23
const styles = useStyles();
const value2 = (require(7563) /* metro dependency 7563: useSubscriptionPlansLoaded */).useSubscriptionPlansLoaded();
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<View style={styles.pricingSection}>
<Text
style={styles.title}
accessibilityRole="header"
variant="heading-lg/semibold"
color="mobile-text-heading-primary"
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['3x1PFE'])}
</Text>
{value2 ? <PricingSubheadingCopy /> : null}
</View>
);
}
function _fun93727() { // fn#93727, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12450:966, offset: 0x020c0f30, size: 47 bytes, params: 1, frame: 12
return premiumTypeSubscription != null ? SubscriptionPlanStore.get(premiumTypeSubscription.planId) : undefined;
}
function _fun93728() { // fn#93728, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12450:1016, offset: 0x020c0f5f, size: 66 bytes, params: 1, frame: 11
var environment;
const value = environment.__proto__;
if (!IAPStoreAndroid.isReady()) {
(importDefault(694) /* metro dependency 694: Dispatcher */).wait(_fun93729);
}
}
function _fun93730() { // fn#93730, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12450:1129, offset: 0x020c0fc6, size: 222 bytes, params: 1, frame: 17
let getProduct = IAPStoreAndroid.getProduct;
const ProductIds = (require(5143) /* metro dependency 5143: ProductIdsAndroid */).ProductIds;
const PREMIUM_GUILD_1_MONTHLY = ProductIds.PREMIUM_GUILD_1_MONTHLY;
const items2 = [Reflect.apply(getProduct, IAPStoreAndroid, [PREMIUM_GUILD_1_MONTHLY])];
getProduct = IAPStoreAndroid.getProduct;
const PREMIUM_TIER_2_MONTHLY = ProductIds.PREMIUM_TIER_2_MONTHLY;
items2[1] = Reflect.apply(getProduct, IAPStoreAndroid, [PREMIUM_TIER_2_MONTHLY]);
getProduct = IAPStoreAndroid.getProduct;
const PREMIUM_TIER_2_PREMIUM_GUILD_1_MONTHLY = ProductIds.PREMIUM_TIER_2_PREMIUM_GUILD_1_MONTHLY;
items2[2] = Reflect.apply(getProduct, IAPStoreAndroid, [PREMIUM_TIER_2_PREMIUM_GUILD_1_MONTHLY]);
getProduct = IAPStoreAndroid.getProduct;
const PREMIUM_TIER_2_YEARLY = ProductIds.PREMIUM_TIER_2_YEARLY;
items2[3] = Reflect.apply(getProduct, IAPStoreAndroid, [PREMIUM_TIER_2_YEARLY]);
getProduct = IAPStoreAndroid.getProduct;
const PREMIUM_TIER_2_PREMIUM_GUILD_1_YEARLY = ProductIds.PREMIUM_TIER_2_PREMIUM_GUILD_1_YEARLY;
items2[4] = Reflect.apply(getProduct, IAPStoreAndroid, [PREMIUM_TIER_2_PREMIUM_GUILD_1_YEARLY]);
return items2;
}
function originalPriceHook(a0, a1) { // fn#93731, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12450:2526, owner: PricingSubheadingCopy.originalPriceHook, offset: 0x020c10a4, size: 100 bytes, params: 3, frame: 16
if (env0_2 === env0_3) {
return null;
} else {
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<Text
style={styles.originalPrice}
variant="text-sm/medium"
color="text-muted"
key={a1}
>
{a0}
<Text style={styles.cardText} variant="text-md/medium">
{'...'}
</Text>
);
function _fun93727() { // fn#93727, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12450:966, offset: 0x020c0f30, size: 47 bytes, params: 1, frame: 12
return premiumTypeSubscription != null ? SubscriptionPlanStore.get(premiumTypeSubscription.planId) : undefined;
}
function _fun93728() { // fn#93728, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12450:1016, offset: 0x020c0f5f, size: 66 bytes, params: 1, frame: 11
var environment;
const value = environment.__proto__;
const iapStoreAndroidBinding = IAPStoreAndroid;
if (!iapStoreAndroidBinding.isReady()) {
(importDefault(694) /* metro dependency 694: Dispatcher */).wait(_fun93729);
}
function _fun93729() { // fn#93729, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12450:1049, offset: 0x020c0fa1, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__.__proto__;
return (BillingActionCreators).loadProducts();
}
}
function _fun93730() { // fn#93730, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12450:1129, offset: 0x020c0fc6, size: 222 bytes, params: 1, frame: 17
let iapStoreAndroidBinding = IAPStoreAndroid;
let getProduct = iapStoreAndroidBinding.getProduct;
const ProductIds = (ProductIdsAndroidModule).ProductIds;
const PREMIUM_GUILD_1_MONTHLY = ProductIds.PREMIUM_GUILD_1_MONTHLY;
const items2 = [Reflect.apply(getProduct, iapStoreAndroidBinding, [PREMIUM_GUILD_1_MONTHLY])];
iapStoreAndroidBinding = IAPStoreAndroid;
getProduct = iapStoreAndroidBinding.getProduct;
const PREMIUM_TIER_2_MONTHLY = ProductIds.PREMIUM_TIER_2_MONTHLY;
items2[1] = Reflect.apply(getProduct, iapStoreAndroidBinding, [PREMIUM_TIER_2_MONTHLY]);
iapStoreAndroidBinding = IAPStoreAndroid;
getProduct = iapStoreAndroidBinding.getProduct;
const PREMIUM_TIER_2_PREMIUM_GUILD_1_MONTHLY = ProductIds.PREMIUM_TIER_2_PREMIUM_GUILD_1_MONTHLY;
items2[2] = Reflect.apply(getProduct, iapStoreAndroidBinding, [PREMIUM_TIER_2_PREMIUM_GUILD_1_MONTHLY]);
iapStoreAndroidBinding = IAPStoreAndroid;
getProduct = iapStoreAndroidBinding.getProduct;
const PREMIUM_TIER_2_YEARLY = ProductIds.PREMIUM_TIER_2_YEARLY;
items2[3] = Reflect.apply(getProduct, iapStoreAndroidBinding, [PREMIUM_TIER_2_YEARLY]);
iapStoreAndroidBinding = IAPStoreAndroid;
getProduct = iapStoreAndroidBinding.getProduct;
const PREMIUM_TIER_2_PREMIUM_GUILD_1_YEARLY = ProductIds.PREMIUM_TIER_2_PREMIUM_GUILD_1_YEARLY;
items2[4] = Reflect.apply(getProduct, iapStoreAndroidBinding, [PREMIUM_TIER_2_PREMIUM_GUILD_1_YEARLY]);
return items2;
}
function originalPriceHook(a0, a1) { // fn#93731, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12450:2526, owner: PricingSubheadingCopy.originalPriceHook, offset: 0x020c10a4, size: 100 bytes, params: 3, frame: 16
if (env0_2 === Module00057) {
return null;
} else {
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<Text
style={styles.originalPrice}
variant="text-sm/medium"
color="text-muted"
key={a1}
>
{a0}
</Text>
);
}
}
}
function PremiumSubscriptionPricingUpsell() { // fn#93732, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12450:3246, offset: 0x020c1108, size: 213 bytes, params: 1, frame: 23
const styles = useStyles();
const value2 = (UseSubscriptionPlansLoadedModule).useSubscriptionPlansLoaded();
const Text = (TextModule).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<View style={styles.pricingSection}>
<Text
style={styles.title}
accessibilityRole="header"
variant="heading-lg/semibold"
color="mobile-text-heading-primary"
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['3x1PFE'])}
</Text>
{
value2
? (
<PricingSubheadingCopy />
)
: null
}
</View>
);
}
}
function _fun93729() { // fn#93729, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12450:1049, offset: 0x020c0fa1, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__.__proto__;
return (importDefault(7037) /* metro dependency 7037: BillingActionCreators */).loadProducts();
}
global.__d(_fun93722, 12264, [57, 31, 27, 1949, 1878, 3807, 3808, 5140, 661, 1880, 33, 4501, 566, 3802, 7563, 694,
7037, 5143, 4573, 477, 5138, 5137, 1244, 1856,
2]) /* metro module 12264, dependencies: [57, 31, 27, 1949, 1878, 3807, 3808, 5140, 661, 1880, 33, 4501, 566, 3802, 7563, 694, 7037, 5143, 4573, 477, 5138, 5137, 1244, 1856, 2] */;
Loaded 100 of 22448 files, more files were not shown because too many files have changed in this diff. Show more