Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,241 @@
|
||||
/* Metro module 15423; source: modules/soundboard/native/SoundButton.tsx; dependencies: [31, 27, 1878, 15418, 33, 4017, 4501, 697, 477, 5278, 4577, 6739, 11508, 15424, 566, 15425, 6771, 6789, 6951, 3802, 7890, 7892, 3857, 10896, 1244, 15427, 4573, 6705, 2] */
|
||||
function _fun118000(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118000, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15620:6, offset: 0x024c7f82, size: 869 bytes, params: 8, frame: 28
|
||||
var object3;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const value = undefined;
|
||||
const value2 = importAll(31) /* metro dependency 31 */;
|
||||
const View = (require(27) /* metro dependency 27 */).View;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const SOUND_BUTTON_HEIGHT = (require(15418) /* metro dependency 15418: SoundboardStyleConstants */).SOUND_BUTTON_HEIGHT;
|
||||
const value3 = require(33) /* metro dependency 33 */;
|
||||
const env0_6 = value3.jsx;
|
||||
const env0_7 = value3.jsxs;
|
||||
const reanimatedRexport = importDefault(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
let createAnimatedComponent = reanimatedRexport.createAnimatedComponent;
|
||||
const env0_8 = Reflect.apply(createAnimatedComponent, reanimatedRexport, [View]);
|
||||
const env0_9 = {'damping': 10, 'stiffness': 300, 'mass': 1};
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
object3 = {};
|
||||
const object4 = {'marginTop': 4, 'height': null, 'backgroundColor': null, 'display': 'flex',
|
||||
'flexDirection': 'column', 'justifyContent': 'center', 'alignItems': 'center', 'borderRadius': null,
|
||||
'borderWidth': 1};
|
||||
object4.height = SOUND_BUTTON_HEIGHT;
|
||||
const CARD_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CARD_BACKGROUND_DEFAULT;
|
||||
object4.backgroundColor = CARD_BACKGROUND_DEFAULT;
|
||||
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
||||
const BORDER_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_MUTED;
|
||||
object4.borderColor = BORDER_MUTED;
|
||||
const SHADOW_LOW = (importDefault(697) /* metro dependency 697: native */).shadows.SHADOW_LOW;
|
||||
copyDataProperties(object4, SHADOW_LOW, undefined);
|
||||
object3.button = object4;
|
||||
const CARD_PRIMARY_PRESSED_BG = (importDefault(697) /* metro dependency 697: native */).colors.CARD_PRIMARY_PRESSED_BG;
|
||||
object3.buttonPressed = {backgroundColor: CARD_PRIMARY_PRESSED_BG};
|
||||
object3.buttonDisabled = {opacity: 0.5};
|
||||
const object6 = {'borderStyle': 'solid', 'borderWidth': 2};
|
||||
const STATUS_SPEAKING = (importDefault(697) /* metro dependency 697: native */).colors.STATUS_SPEAKING;
|
||||
object6.borderColor = STATUS_SPEAKING;
|
||||
const CARD_SECONDARY_BG = (importDefault(697) /* metro dependency 697: native */).colors.CARD_SECONDARY_BG;
|
||||
object6.backgroundColor = CARD_SECONDARY_BG;
|
||||
object3.buttonPlaying = object6;
|
||||
const value6 = 24;
|
||||
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
object3.emoji = {'height': 24, 'width': 24, 'fontSize': null, 'lineHeight': 28,
|
||||
fontSize: platformUtilsModule.isIOS() ? value6 : value};
|
||||
const object8 = {'display': 'flex', 'alignItems': 'center', 'justifyContent': 'center', 'height': 40, 'width': 40,
|
||||
'backgroundColor': null, 'backgroundSize': 32, 'borderRadius': null, 'marginBottom': 8};
|
||||
const BACKGROUND_MOD_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_MUTED;
|
||||
object8.backgroundColor = BACKGROUND_MOD_MUTED;
|
||||
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
||||
object3.emojiWrapper = object8;
|
||||
object3.text = {marginHorizontal: 8};
|
||||
object3.textPlaying = {marginHorizontal: 6};
|
||||
const object9 = {'position': 'absolute', 'top': null, 'end': null, 'width': 12, 'height': 12};
|
||||
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object9.top = PX_12;
|
||||
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object9.end = PX_12;
|
||||
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
|
||||
object9.tintColor = WHITE;
|
||||
object3.lock = object9;
|
||||
const env0_10 = Reflect.apply(createStyles, createStylesModule, [object3]);
|
||||
const value8 = reanimatedRexport;
|
||||
createAnimatedComponent = value8.createAnimatedComponent;
|
||||
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
||||
const env0_11 = Reflect.apply(createAnimatedComponent, value8, [PressableOpacity]);
|
||||
object3 = {code: 'function SoundButtonTsx1(){const{animationConfig,withDelay,withSpring,interpolate,SPRING_CONFIG}=this.__closure;var _animationConfig$play,_animationConfig$pres,_animationConfig;const isNotPressed=animationConfig.sharedValues.pressed.get()===0;const isPlaying=animationConfig.sharedValues.playing.get()>0;const shouldDoPlayingAnimation=isNotPressed&&isPlaying;const playingAnimationScaleValue=withDelay((_animationConfig$play=animationConfig.playingAnimationDelay)!==null&&_animationConfig$play!==void 0?_animationConfig$play:0,withSpring(interpolate(animationConfig.sharedValues.playing.get(),[0,1],[1,animationConfig.scaleFactors.playing]),SPRING_CONFIG));const pressedAnimationScaleValue=withSpring(interpolate(animationConfig.sharedValues.pressed.get(),[0,1],[1,animationConfig.scaleFactors.pressed]),SPRING_CONFIG);const rotationScaleValue=interpolate(animationConfig.sharedValues.pressed.get(),[0,1],[0,(_animationConfig$pres=(_animationConfig=animationConfig)===null||_animationConfig===void 0?void 0:_animationConfig.pressedRotationDegrees)!==null&&_animationConfig$pres!==void 0?_animationConfig$pres:0]);return{transform:[{scale:shouldDoPlayingAnimation?playingAnimationScaleValue:pressedAnimationScaleValue},{rotate:rotationScaleValue+"deg"}]};}'};
|
||||
const value9 = value2.memo(_fun118004);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/soundboard/native/SoundButton.tsx');
|
||||
exports.SoundButton = value9;
|
||||
return value;
|
||||
}
|
||||
|
||||
function useAnimation(a0) { // fn#118001, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15620:2620, offset: 0x024c82e7, size: 163 bytes, params: 2, frame: 18
|
||||
const env0_0 = a0;
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
const closure = useAnimationT;
|
||||
const object2 = {animationConfig: a0};
|
||||
object2.withDelay = reanimatedRexportModule.withDelay;
|
||||
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
|
||||
object2.interpolate = reanimatedRexportModule.interpolate;
|
||||
object2.SPRING_CONFIG = env0_9;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 13932429225740;
|
||||
closure.__initData = env0_12;
|
||||
return Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
}
|
||||
|
||||
function SoundButtonEmoji({sound, sharedValues}) { // fn#118003, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15620:3400, offset: 0x024c8590, size: 279 bytes, params: 2, frame: 21
|
||||
const styles = useStyles();
|
||||
const value2 = useAnimation({sharedValues: sharedValues, scaleFactors: {'pressed': 0.8, 'playing': 1.2}});
|
||||
const value3 = useAnimation({sharedValues: sharedValues, scaleFactors: {'pressed': 0.7200000000000001,
|
||||
'playing': 1.08}, playingAnimationDelay: 100, pressedRotationDegrees: -15});
|
||||
const binding = env0_8;
|
||||
return ((Component) => <Component style={[styles.emojiWrapper,
|
||||
value2]}>{((Component) => <Component style={value3}>{((Component) => <Component fastImageStyle={styles.emoji} textEmojiStyle={styles.emoji} src={(importDefault(11508) /* metro dependency 11508: getSoundboardEmojiUrl */)(sound,
|
||||
24)} name={sound.emojiName ?? ''} />)(importDefault(6739) /* metro dependency 6739: Emoji */)}</Component>)(binding)}</Component>)(binding);
|
||||
}
|
||||
|
||||
function _fun118004({sound, channel, style, isSectionLocked}) { // fn#118004, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15620:3846, offset: 0x024c86a7, size: 867 bytes, params: 2, frame: 33
|
||||
isSectionLocked = !(isSectionLocked === undefined) && isSectionLocked;
|
||||
const soundboardHooksModule = require(15424) /* metro dependency 15424: SoundboardHooks */;
|
||||
const useSoundButtonStyleConfig = soundboardHooksModule.useSoundButtonStyleConfig;
|
||||
const buttonWidth = Reflect.apply(useSoundButtonStyleConfig, soundboardHooksModule, []).buttonWidth;
|
||||
let r11 = sound.emojiId != null || sound.emojiName != null;
|
||||
const styles = useStyles();
|
||||
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
|
||||
return UserStore.getCurrentUser();
|
||||
});
|
||||
const value5 = (importDefault(15425) /* metro dependency 15425: useSoundboardSoundPlayerNative */)(sound,
|
||||
channel.id);
|
||||
const playSoundboardSound = value5.playSoundboardSound;
|
||||
const env0_3 = playSoundboardSound;
|
||||
const isPlayingSound = value5.isPlayingSound;
|
||||
const defaultImport2 = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
|
||||
const SOUNDBOARD_BUTTON = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).SOUNDBOARD_BUTTON;
|
||||
const analyticsLocations = defaultImport2(SOUNDBOARD_BUTTON).analyticsLocations;
|
||||
const canUseSoundboardSound2 = (require(6951) /* metro dependency 6951: SoundboardUtils */).canUseSoundboardSound(currentUser,
|
||||
sound, channel);
|
||||
const value6 = !canUseSoundboardSound2;
|
||||
let binding = env0_3;
|
||||
const value7 = binding.useCallback(_fun118006, [analyticsLocations, channel.guild_id, currentUser,
|
||||
playSoundboardSound, sound, value6]);
|
||||
const value8 = _fun118007(isPlayingSound);
|
||||
const value9 = useAnimation({sharedValues: value8.sharedValues, scaleFactors: {'pressed': 0.95, 'playing': 1.05}});
|
||||
const value11 = value8.sharedValues.pressed.get() > 0;
|
||||
const value12 = binding.useCallback(_fun118011, [channel.id, sound]);
|
||||
binding = env0_11;
|
||||
const bindingProps = {style: [styles.button, {width: buttonWidth}, value11 ? styles.buttonPressed : null, value9,
|
||||
isPlayingSound ? styles.buttonPlaying : null,
|
||||
canUseSoundboardSound2 || isSectionLocked ? null : styles.buttonDisabled, style], accessibilityRole: 'button',
|
||||
accessibilityLabel: sound.name, onPressIn: value8.handlers.pressIn, onPressOut: value8.handlers.pressOut,
|
||||
onPress: value7, onLongPress: value12};
|
||||
r11 = r11 && <SoundButtonEmoji sharedValues={value8.sharedValues} sound={sound} />;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return (
|
||||
<View>
|
||||
{((Component) => <Component {...bindingProps}>{r11}<Text lineClamp={1} style={[styles.text,
|
||||
isPlayingSound ? styles.textPlaying : null]} variant="text-sm/semibold">{sound.name}</Text></Component>)(binding)}
|
||||
{(canUseSoundboardSound2 ? value6 : !isSectionLocked) && ((LockIcon) => <LockIcon style={styles.lock} />)((require(6705) /* metro dependency 6705: LockIcon */).LockIcon)}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function useAnimationT() { // fn#118002, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15620:2660, owner: useAnimation.t, offset: 0x024c838a, size: 518 bytes, params: 1, frame: 32
|
||||
let binding = env0_0;
|
||||
const value2 = binding.sharedValues.pressed.get();
|
||||
const value3 = binding.sharedValues.playing.get();
|
||||
const value4 = 0;
|
||||
const value5 = value3 > value4;
|
||||
const value7 = undefined;
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const withDelay = reanimatedRexportModule.withDelay;
|
||||
const r6 = binding.playingAnimationDelay ?? value4;
|
||||
const springModule = require(4577) /* metro dependency 4577: spring */;
|
||||
let withSpring = springModule.withSpring;
|
||||
const moduleValue3 = reanimatedRexportModule;
|
||||
let interpolate = moduleValue3.interpolate;
|
||||
binding = env0_0;
|
||||
const value9 = Reflect.apply(interpolate, moduleValue3, [binding.sharedValues.playing.get(), [0, 1], [1,
|
||||
binding.scaleFactors.playing]]);
|
||||
const binding2 = env1_9;
|
||||
const value10 = Reflect.apply(withDelay, reanimatedRexportModule, [r6, Reflect.apply(withSpring, springModule,
|
||||
[value9, binding2])]);
|
||||
const moduleValue4 = springModule;
|
||||
withSpring = moduleValue4.withSpring;
|
||||
const moduleValue5 = reanimatedRexportModule;
|
||||
const value12 = Reflect.apply(withSpring, moduleValue4,
|
||||
[moduleValue5.interpolate(binding.sharedValues.pressed.get(), [0, 1], [1, binding.scaleFactors.pressed]),
|
||||
binding2]);
|
||||
const items2 = [{scale: value4 !== value2 ? value12 : value5 ? value10 : value12}];
|
||||
const moduleValue6 = reanimatedRexportModule;
|
||||
interpolate = moduleValue6.interpolate;
|
||||
binding = env0_0;
|
||||
items2[1] = {rotate: '' + Reflect.apply(interpolate, moduleValue6, [binding.sharedValues.pressed.get(), [0, 1], [0,
|
||||
(binding == null ? value7 : env0_0.pressedRotationDegrees) ?? value4]]) + 'deg'};
|
||||
return {transform: items2};
|
||||
}
|
||||
|
||||
function _fun118006() { // fn#118006, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15620:4235, offset: 0x024c8a0a, size: 300 bytes, params: 1, frame: 17
|
||||
var value2;
|
||||
var defaultImport;
|
||||
var open;
|
||||
var object2;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var value;
|
||||
if (env0_5) {
|
||||
value2 = environment.__proto__;
|
||||
defaultImport = importDefault(3802) /* metro dependency 3802: PremiumUtils */;
|
||||
if (defaultImport.canUseSoundboardEverywhere(currentUser)) {
|
||||
if (!sound.available) {
|
||||
value = importDefault(3857) /* metro dependency 3857: ToastActionCreators */;
|
||||
open = value.open;
|
||||
object2 = {key: 'DISABLED_SOUND_PRESSED', icon: importDefault(10896) /* metro dependency 10896 */};
|
||||
object2.content = intl.string(t.MDOXJR);
|
||||
object2.toastDurationMs = 3000;
|
||||
Reflect.apply(open, value, [object2]);
|
||||
}
|
||||
} else if (sound.guildId === channel.guild_id) {
|
||||
if (!sound.available) {
|
||||
value = importDefault(3857) /* metro dependency 3857: ToastActionCreators */;
|
||||
open = value.open;
|
||||
object2 = {key: 'DISABLED_SOUND_PRESSED', icon: importDefault(10896) /* metro dependency 10896 */};
|
||||
object2.content = intl.string(t.MDOXJR);
|
||||
object2.toastDurationMs = 3000;
|
||||
Reflect.apply(open, value, [object2]);
|
||||
}
|
||||
} else {
|
||||
(importDefault(7890) /* metro dependency 7890: openPremiumUpsellActionSheet */)((require(7892) /* metro dependency 7892: EntitlementFeatureNames */).EntitlementFeatureNames.SOUNDBOARD_EVERYWHERE);
|
||||
}
|
||||
} else {
|
||||
playSoundboardSound(analyticsLocations);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun118007(a0) { // fn#118007, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15620:4545, offset: 0x024c8b36, size: 203 bytes, params: 2, frame: 19
|
||||
var environment;
|
||||
const env0_0 = a0;
|
||||
let value = environment.__proto__;
|
||||
const value2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
|
||||
const value3 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
|
||||
const binding = env1_3;
|
||||
value = binding.useCallback(_fun118008, [value2]);
|
||||
const value4 = binding.useCallback(_fun118009, [value2]);
|
||||
binding.useEffect(_fun118010, [a0, value3, value2]);
|
||||
return {handlers: {pressIn: value, pressOut: value4}, sharedValues: {pressed: value2, playing: value3}};
|
||||
}
|
||||
|
||||
function _fun118011() { // fn#118011, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15620:4944, offset: 0x024c8c22, size: 49 bytes, params: 1, frame: 13
|
||||
const value = environment.__proto__;
|
||||
(importDefault(15427) /* metro dependency 15427: openSoundboardSoundPreviewActionSheet */)(channel.id, sound);
|
||||
}
|
||||
|
||||
function _fun118010() { // fn#118010, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15620:4705, offset: 0x024c8c01, size: 33 bytes, params: 1, frame: 12
|
||||
const binding = env0_2;
|
||||
binding.set(env0_0 ? 1 : 0);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
/* Metro module 15415; source: modules/soundboard/native/SoundboardActionCreators.tsx; dependencies: [661, 1239, 3968, 1365, 4080, 15416, 1962, 2] */
|
||||
function _fun117918(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117918, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15612:6, offset: 0x024c510c, size: 124 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = (require(661) /* metro dependency 661: Constants */).ComponentActions;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/soundboard/native/SoundboardActionCreators.tsx');
|
||||
exports.showSoundboardSoundPickerActionSheet = showSoundboardSoundPickerActionSheet;
|
||||
}
|
||||
|
||||
function showSoundboardSoundPickerActionSheet({channel, analyticsSource}) { // fn#117919, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15612:250, offset: 0x024c5188, size: 190 bytes, params: 2, frame: 19
|
||||
const ComponentDispatch = require(dependencyMap[1]).ComponentDispatch;
|
||||
const dispatch = ComponentDispatch.dispatch;
|
||||
const TOGGLE_CALL_CONTROL_DRAWER = ComponentActions.TOGGLE_CALL_CONTROL_DRAWER;
|
||||
Reflect.apply(dispatch, ComponentDispatch, [TOGGLE_CALL_CONTROL_DRAWER]);
|
||||
const moduleValue = require(dependencyMap[2]);
|
||||
const UNSAFE_markDismissibleContentAsDismissed = moduleValue.UNSAFE_markDismissibleContentAsDismissed;
|
||||
const DismissibleContent = require(dependencyMap[3]).DismissibleContent;
|
||||
const SOUNDBOARD_MOBILE_NEW_BADGE = DismissibleContent.SOUNDBOARD_MOBILE_NEW_BADGE;
|
||||
Reflect.apply(UNSAFE_markDismissibleContentAsDismissed, moduleValue, [SOUNDBOARD_MOBILE_NEW_BADGE]);
|
||||
const defaultImport = importDefault(dependencyMap[4]);
|
||||
defaultImport.openLazy(require(dependencyMap[6])(dependencyMap[5], dependencyMap.paths),
|
||||
'SoundboardSoundPickerActionSheet', {channel: channel, analyticsSource: analyticsSource});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
/* Metro module 15424; source: modules/soundboard/native/SoundboardHooks.tsx; dependencies: [5, 31, 4502, 1310, 15418, 6276, 1478, 566, 4002, 1362, 6944, 2] */
|
||||
function _fun118012(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118012, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15621:6, offset: 0x024c8c53, size: 236 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 accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
|
||||
const themeStore = importDefault(1310) /* metro dependency 1310: ThemeStore */;
|
||||
const soundboardStyleConstantsModule = require(15418) /* metro dependency 15418: SoundboardStyleConstants */;
|
||||
const env0_7 = soundboardStyleConstantsModule.SOUNDS_PER_ROW;
|
||||
const env0_8 = soundboardStyleConstantsModule.SOUND_ROW_PADDING;
|
||||
const env0_9 = (require(6276) /* metro dependency 6276: ActionSheetConstants */).ACTION_SHEET_MAX_WIDTH;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/soundboard/native/SoundboardHooks.tsx');
|
||||
exports.useSoundButtonStyleConfig = function() {
|
||||
var width = importDefault(dependencyMap[6])().width;
|
||||
var object = {};
|
||||
var Math = global.Math;
|
||||
object.buttonWidth = (Math.min(ACTION_SHEET_MAX_WIDTH, width) - SOUND_ROW_PADDING) / SOUNDS_PER_ROW;
|
||||
return object;
|
||||
};
|
||||
exports.useMaybeFetchSoundboardSounds = useMaybeFetchSoundboardSounds;
|
||||
}
|
||||
|
||||
function useMaybeFetchSoundboardSounds({shouldFetch}) { // fn#118014, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15621:428, offset: 0x024c8d91, size: 149 bytes, params: 2, frame: 20
|
||||
env0_4.useEffect(function() {
|
||||
_fun118018()();
|
||||
}, [(require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore], function() {
|
||||
return AccessibilityStore.saturation;
|
||||
}), (require(566) /* metro dependency 566: flux */).useStateFromStores([ThemeStore], function() {
|
||||
return require(dependencyMap[8]).isThemeDark(ThemeStore.theme);
|
||||
}), shouldFetch]);
|
||||
}
|
||||
|
||||
function _fun118017() { // fn#118017, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15621:587, offset: 0x024c8e56, size: 21 bytes, params: 1, frame: 9
|
||||
_fun118018()();
|
||||
}
|
||||
|
||||
function _fun118018() { // fn#118018, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15621:598, offset: 0x024c8e6b, size: 36 bytes, params: 1, frame: 12
|
||||
const env0_0 = env2_3(_fun118020);
|
||||
return _fun118021;
|
||||
}
|
||||
|
||||
function* _fun118020() { // fn#118020, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15621:618, offset: 0x024c8e9a, size: 101 bytes, params: 1, frame: 14
|
||||
var binding;
|
||||
var binding2;
|
||||
if (true) {
|
||||
value = environment.__proto__.__proto__.__proto__;
|
||||
if (require) {
|
||||
value = environment.__proto__.__proto__.__proto__.__proto__;
|
||||
binding = env4_0;
|
||||
binding2 = env4_2;
|
||||
binding(binding2[9]).FrecencyUserSettingsActionCreators.loadIfNecessary();
|
||||
value = binding(binding2[10]);
|
||||
yield value.maybeFetchSoundboardSounds();
|
||||
value = undefined;
|
||||
if (false) {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,239 @@
|
||||
/* Metro module 13081; source: modules/soundboard/native/SoundboardManager.tsx; dependencies: [5, 7, 6, 15, 17, 18, 4259, 1934, 4613, 3, 13082, 13083, 10756, 6944, 13084, 2] */
|
||||
function _fun99948(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#99948, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13271:6, offset: 0x021da43a, size: 366 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 = importDefault(7) /* metro dependency 7 */;
|
||||
const env0_5 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_6 = importDefault(15) /* metro dependency 15 */;
|
||||
const env0_7 = importDefault(17) /* metro dependency 17 */;
|
||||
const env0_8 = importDefault(18) /* metro dependency 18 */;
|
||||
const mediaEngineStore = importDefault(4259) /* metro dependency 4259: MediaEngineStore */;
|
||||
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
|
||||
const soundboardStore = importDefault(4613) /* metro dependency 4613: SoundboardStore */;
|
||||
const Map = global.Map;
|
||||
let map = new Map();
|
||||
map = importDefault(3) /* metro dependency 3: Logger */;
|
||||
map = new map('SoundboardManagerNative');
|
||||
map = importDefault(13084) /* metro dependency 13084: BaseSoundboardManager */;
|
||||
map = _fun99952(map);
|
||||
map = new map();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/soundboard/native/SoundboardManager.tsx');
|
||||
exports.default = map;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_99949() { // fn#99949, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13271:188, offset: 0x021da5a8, 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_99949_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function _fun99952(a0) { // fn#99952, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13271:439, offset: 0x021da60a, size: 42 bytes, params: 2, frame: 14
|
||||
const closure = SoundboardManager;
|
||||
env0_8(closure, a0);
|
||||
return env0_4(closure);
|
||||
}
|
||||
|
||||
function SoundboardManager(a0) { // fn#99953, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13271:451, offset: 0x021da634, size: 175 bytes, params: 2, frame: 20
|
||||
var r0;
|
||||
var Reflect;
|
||||
let value = copyRestArgs(0, undefined);
|
||||
let binding = env1_5;
|
||||
binding(this, SoundboardManager);
|
||||
const items2 = [];
|
||||
arraySpread(items2, value, 0, items2);
|
||||
value = env1_7(SoundboardManager);
|
||||
binding = env1_6;
|
||||
if (_isNativeReflectConstruct_99949()) {
|
||||
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._stopAndClearSounds = _stopAndClearSounds;
|
||||
value._playSound = _playSound;
|
||||
value._playSoundWithListener = _fun99957();
|
||||
return value;
|
||||
}
|
||||
|
||||
function SoundboardManager_stopAndClearSounds() { // fn#99954, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13271:710, owner: SoundboardManager._stopAndClearSounds, offset: 0x021da6e3, size: 62 bytes, params: 1, frame: 12
|
||||
env2_12.forEach(function(a0) {
|
||||
a0.stop();
|
||||
});
|
||||
const Map = global.Map;
|
||||
const map = new Map();
|
||||
}
|
||||
|
||||
function SoundboardManager_playSound(a0) { // fn#99956, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13271:766, owner: SoundboardManager._playSound, offset: 0x021da732, size: 321 bytes, params: 2, frame: 22
|
||||
var value2;
|
||||
var value3;
|
||||
var binding;
|
||||
var value4;
|
||||
var sound;
|
||||
let value = a1;
|
||||
const r3 = value !== undefined ? value : 1;
|
||||
value = environment.__proto__.__proto__;
|
||||
const getVoiceChannelId = SelectedChannelStore.getVoiceChannelId;
|
||||
if (Reflect.apply(getVoiceChannelId, SelectedChannelStore, []) === a3) {
|
||||
if (!MediaEngineStore.isDeaf()) {
|
||||
if (!SoundboardStore.isLocalSoundboardMuted(a2)) {
|
||||
value2 = (importDefault(13082) /* metro dependency 13082: getVolumeForSound */)(r3);
|
||||
value3 = '' + a2 + '-' + a0;
|
||||
binding = env2_12;
|
||||
value4 = binding.get(value3);
|
||||
if (value4 != null) {
|
||||
value4.stop();
|
||||
}
|
||||
sound = (require(10756) /* metro dependency 10756: SoundUtils */).createSound((importDefault(13083) /* metro dependency 13083: getSoundboardSoundURL */)(a0),
|
||||
|
||||
|
||||
|
||||
'soundboard_sound', value2);
|
||||
sound.volume = value2;
|
||||
binding = env2_12;
|
||||
binding.set(value3, sound);
|
||||
(require(6944) /* metro dependency 6944: SoundboardActionCreators */).reportSoundStartedPlaying(a0, a2);
|
||||
binding = env0_0;
|
||||
binding._playSoundWithListener({sound: sound, soundKey: value3, soundId: a0, userId: a2});
|
||||
}
|
||||
}
|
||||
} else if (a3 == null) {
|
||||
if (!MediaEngineStore.isDeaf()) {
|
||||
if (!SoundboardStore.isLocalSoundboardMuted(a2)) {
|
||||
value2 = (importDefault(13082) /* metro dependency 13082: getVolumeForSound */)(r3);
|
||||
value3 = '' + a2 + '-' + a0;
|
||||
binding = env2_12;
|
||||
value4 = binding.get(value3);
|
||||
if (value4 != null) {
|
||||
value4.stop();
|
||||
}
|
||||
sound = (require(10756) /* metro dependency 10756: SoundUtils */).createSound((importDefault(13083) /* metro dependency 13083: getSoundboardSoundURL */)(a0),
|
||||
|
||||
|
||||
|
||||
'soundboard_sound', value2);
|
||||
sound.volume = value2;
|
||||
binding = env2_12;
|
||||
binding.set(value3, sound);
|
||||
(require(6944) /* metro dependency 6944: SoundboardActionCreators */).reportSoundStartedPlaying(a0, a2);
|
||||
binding = env0_0;
|
||||
binding._playSoundWithListener({sound: sound, soundKey: value3, soundId: a0, userId: a2});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun99957() { // fn#99957, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13271:1147, offset: 0x021da873, size: 36 bytes, params: 1, frame: 12
|
||||
const env0_0 = env2_3(_fun99959);
|
||||
return _fun99960;
|
||||
}
|
||||
|
||||
async function _fun99959({sound, soundKey, soundId, userId}) { // fn#99959, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13271:1167, offset: 0x021da8ab, size: 181 bytes, params: 2, frame: 20
|
||||
var r5;
|
||||
var playWithListener;
|
||||
var value4;
|
||||
var error;
|
||||
var binding;
|
||||
if (true) {
|
||||
await undefined;
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
playWithListener = sound.playWithListener;
|
||||
} catch (error) {
|
||||
value = environment.__proto__.__proto__.__proto__.__proto__;
|
||||
binding = env4_13;
|
||||
binding.error('Failed to play sound', {error: error});
|
||||
value = true;
|
||||
r5 = value;
|
||||
if (r5) {
|
||||
value = environment.__proto__.__proto__.__proto__.__proto__;
|
||||
binding = env4_12;
|
||||
binding.delete(soundKey);
|
||||
binding = env4_0;
|
||||
value = binding(env4_2[13]);
|
||||
value.reportSoundFinishedPlaying(soundId, userId);
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
value = Reflect.apply(playWithListener, sound, []);
|
||||
} catch (error) {
|
||||
value = environment.__proto__.__proto__.__proto__.__proto__;
|
||||
binding = env4_13;
|
||||
binding.error('Failed to play sound', {error: error});
|
||||
value = true;
|
||||
r5 = value;
|
||||
if (r5) {
|
||||
value = environment.__proto__.__proto__.__proto__.__proto__;
|
||||
binding = env4_12;
|
||||
binding.delete(soundKey);
|
||||
binding = env4_0;
|
||||
value = binding(env4_2[13]);
|
||||
value.reportSoundFinishedPlaying(soundId, userId);
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
await value;
|
||||
try {
|
||||
value = undefined;
|
||||
value4 = false;
|
||||
} catch (error) {
|
||||
value = environment.__proto__.__proto__.__proto__.__proto__;
|
||||
binding = env4_13;
|
||||
binding.error('Failed to play sound', {error: error});
|
||||
value = true;
|
||||
r5 = value;
|
||||
if (r5) {
|
||||
value = environment.__proto__.__proto__.__proto__.__proto__;
|
||||
binding = env4_12;
|
||||
binding.delete(soundKey);
|
||||
binding = env4_0;
|
||||
value = binding(env4_2[13]);
|
||||
value.reportSoundFinishedPlaying(soundId, userId);
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
if (value4) {
|
||||
return value;
|
||||
}
|
||||
if (value) {
|
||||
value = environment.__proto__.__proto__.__proto__.__proto__;
|
||||
binding = env4_12;
|
||||
binding.delete(soundKey);
|
||||
binding = env4_0;
|
||||
value = binding(env4_2[13]);
|
||||
value.reportSoundFinishedPlaying(soundId, userId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,125 @@
|
||||
/* Metro module 15416; source: modules/soundboard/native/SoundboardSoundPicker.tsx; dependencies: [57, 31, 27, 15417, 4294, 1878, 15418, 661, 33, 4501, 697, 4017, 632, 15419, 6948, 5463, 6771, 6789, 8742, 480, 477, 8575, 6275, 4027, 4573, 1244, 6984, 15422, 15430, 15431, 2] */
|
||||
function _fun117920(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117920, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15613:6, offset: 0x024c5246, size: 422 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 */;
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const env0_5 = (require(27) /* metro dependency 27 */).View;
|
||||
const expressionPickerStoreModule = require(15417) /* metro dependency 15417: ExpressionPickerStore */;
|
||||
const env0_6 = expressionPickerStoreModule.setSearchQuery;
|
||||
const env0_7 = expressionPickerStoreModule.useExpressionPickerStore;
|
||||
const rtcConnectionStore = importDefault(4294) /* metro dependency 4294: RTCConnectionStore */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const SOUND_ROW_HORIZONTAL_PADDING = (require(15418) /* metro dependency 15418: SoundboardStyleConstants */).SOUND_ROW_HORIZONTAL_PADDING;
|
||||
const env0_10 = (require(661) /* metro dependency 661: Constants */).EXPRESSION_FOOTER_HEIGHT;
|
||||
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 createStyles = createStylesModule.createStyles;
|
||||
const object = {paddingHorizontal: SOUND_ROW_HORIZONTAL_PADDING};
|
||||
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object.padding = PX_8;
|
||||
object.width = '100%';
|
||||
const env0_13 = Reflect.apply(createStyles, createStylesModule, [{title: {marginBottom: 8}, container: {'flex': 1,
|
||||
'alignItems': 'center'}, header: object, body: {'flex': 1, 'width': '100%'}}]);
|
||||
value = value.memo(_fun117921);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/soundboard/native/SoundboardSoundPicker.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _fun117921({channel, analyticsSource}) { // fn#117921, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15613:505, offset: 0x024c53ec, size: 1332 bytes, params: 2, frame: 44
|
||||
var object2;
|
||||
const styles = useStyles();
|
||||
const binding = env0_4;
|
||||
let useState = binding.useState;
|
||||
const value3 = Reflect.apply(useState, binding, [0]);
|
||||
const binding2 = env0_3;
|
||||
const value4 = binding2(value3, 2);
|
||||
const property = value4[0];
|
||||
const property2 = value4[1];
|
||||
const value5 = binding.useRef(null);
|
||||
const value6 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
|
||||
const currentUser = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([UserStore],
|
||||
function() {
|
||||
return UserStore.getCurrentUser();
|
||||
});
|
||||
const mediaSessionId = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([RTCConnectionStore],
|
||||
function() {
|
||||
return RTCConnectionStore.getMediaSessionId();
|
||||
});
|
||||
const {categories, availableSounds} = (importDefault(15419) /* metro dependency 15419: useSoundGrid */)(channel,
|
||||
{filterOutEmptyCurrentGuild: true});
|
||||
const value8 = useExpressionPickerStore(function(a0) {
|
||||
return a0.searchQuery;
|
||||
});
|
||||
useState = binding.useState;
|
||||
const searchSoundsModule = require(6948) /* metro dependency 6948: searchSounds */;
|
||||
const value9 = binding2(Reflect.apply(useState, binding, [searchSoundsModule.searchSounds(value8, availableSounds,
|
||||
currentUser, channel)]), 2);
|
||||
const property3 = value9[0];
|
||||
var env0_3 = value9[1];
|
||||
const value10 = (require(15419) /* metro dependency 15419: useSoundGrid */).useSearchCategories(categories,
|
||||
property3, value8);
|
||||
const insets = (importDefault(5463) /* metro dependency 5463: useSafeAreaInsetsKeyboardAwareNative */)({isKeyboardAwareOnAndroid: false}).insets;
|
||||
const defaultImport3 = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
|
||||
const SOUNDBOARD_ACTION_SHEET = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).SOUNDBOARD_ACTION_SHEET;
|
||||
const analyticsLocations = defaultImport3(SOUNDBOARD_ACTION_SHEET).analyticsLocations;
|
||||
const value11 = binding.useCallback(_fun117925, [channel, currentUser, availableSounds]);
|
||||
const defaultImport4 = importDefault(8742) /* metro dependency 8742: useTrackImpression */;
|
||||
object2 = {};
|
||||
const ImpressionTypes = (require(480) /* metro dependency 480: AnalyticsUtils */).ImpressionTypes;
|
||||
const HALFSHEET = ImpressionTypes.HALFSHEET;
|
||||
object2.type = HALFSHEET;
|
||||
const ImpressionNames = (require(480) /* metro dependency 480: AnalyticsUtils */).ImpressionNames;
|
||||
const SOUNDBOARD_POPOUT = ImpressionNames.SOUNDBOARD_POPOUT;
|
||||
object2.name = SOUNDBOARD_POPOUT;
|
||||
object2.properties = {source: analyticsSource, guild_id: channel.guild_id, media_session_id: mediaSessionId};
|
||||
defaultImport4(object2);
|
||||
const value12 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(-1);
|
||||
const value13 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(false);
|
||||
const AnalyticsLocationProvider = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider;
|
||||
const r5 = (require(477) /* metro dependency 477: PlatformUtils */).isIOS() && ((Component) => <Component animatedSheetIndex={value12} portalHostName="soundboard-footer" />)(importDefault(8575) /* metro dependency 8575: PortalKeyboardFooterIOSIos */);
|
||||
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
|
||||
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
const r8 = platformUtilsModule.isAndroid() ? ((PortalHost) => <PortalHost name="soundboard-footer" />)((require(4027) /* metro dependency 4027 */).PortalHost) : undefined;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const ABjMWI = (require(1244) /* metro dependency 1244: indexNative */).t.ABjMWI;
|
||||
const items2 = [<Text accessibilityRole="header" variant="heading-lg/bold" style={styles.title}>{Reflect.apply(string,
|
||||
intl, [ABjMWI])}</Text>];
|
||||
const SearchField = (require(6984) /* metro dependency 6984: SearchFieldNative */).SearchField;
|
||||
items2[1] = <View style={styles.header}><SearchField size="md" placeholder={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.sKt3xS)} onChange={value11} /></View>;
|
||||
const SoundboardSoundPickerList = (require(15422) /* metro dependency 15422: SoundboardSoundPickerList */).SoundboardSoundPickerList;
|
||||
const value17 = EXPRESSION_FOOTER_HEIGHT + insets.bottom;
|
||||
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
items2[2] = <View style={styles.body}><SoundboardSoundPickerList listRef={value5} channel={channel} insetBottom={value17 + PX_16} scrollPosition={value6} setCategoryIndex={property2} categories={value10} shouldShowPremiumUpsell={value13} /></View>;
|
||||
items2[3] = ((Component) => <Component shouldShow={value13} />)(importDefault(15430) /* metro dependency 15430: PremiumSoundboardFeatureUpsell */);
|
||||
return (
|
||||
<AnalyticsLocationProvider value={analyticsLocations}>
|
||||
{r5}
|
||||
<BottomSheet
|
||||
animatedIndex={value12}
|
||||
scrollable
|
||||
startExpanded
|
||||
footer={r8}
|
||||
>
|
||||
<View style={styles.container}>
|
||||
{items2}
|
||||
</View>
|
||||
{((Component) => <Component guildId={channel.guild_id} listRef={value5} categories={categories} categoryIndex={property} />)(importDefault(15431) /* metro dependency 15431: SoundboardSoundPickerCategories */)}
|
||||
</BottomSheet>
|
||||
</AnalyticsLocationProvider>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun117925(a0) { // fn#117925, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15613:1098, offset: 0x024c593e, size: 79 bytes, params: 2, frame: 19
|
||||
let value = environment.__proto__;
|
||||
setSearchQuery(a0);
|
||||
const binding = env0_3;
|
||||
value = require(6948) /* metro dependency 6948: searchSounds */;
|
||||
binding(value.searchSounds(a0, availableSounds, currentUser, channel));
|
||||
}
|
||||
|
||||
@@ -0,0 +1,251 @@
|
||||
/* Metro module 15431; source: modules/soundboard/native/SoundboardSoundPickerCategories.tsx; dependencies: [31, 27, 15417, 1878, 661, 33, 4501, 697, 6639, 6819, 1244, 11053, 15429, 5278, 1305, 6705, 4081, 4082, 566, 3802, 7898, 1585, 4027, 8670, 2] */
|
||||
function _fun118040(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118040, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15628:6, offset: 0x024c9c92, size: 691 bytes, params: 8, frame: 29
|
||||
var object3;
|
||||
const env0_0 = require;
|
||||
const getItemLayout_118043 = function(a0, a1) {
|
||||
return {length: EXPRESSION_FOOTER_HEIGHT, offset: EXPRESSION_FOOTER_HEIGHT * a1, index: a1};
|
||||
};
|
||||
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 StyleSheet = value2.StyleSheet;
|
||||
const env0_5 = value2.View;
|
||||
const env0_6 = value2.FlatList;
|
||||
const env0_7 = (require(15417) /* metro dependency 15417: ExpressionPickerStore */).setSearchQuery;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const CATEGORY_ICON_SIZE = constantsModule.CATEGORY_ICON_SIZE;
|
||||
const env0_9 = constantsModule.EXPRESSION_FOOTER_HEIGHT;
|
||||
const NODE_MARGIN = constantsModule.NODE_MARGIN;
|
||||
const NODE_SIZE = constantsModule.NODE_SIZE;
|
||||
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;
|
||||
object3 = {};
|
||||
const object4 = {'borderTopWidth': null, 'paddingHorizontal': 8, 'flexDirection': 'row', 'alignItems': 'center'};
|
||||
object4.borderTopWidth = StyleSheet.hairlineWidth;
|
||||
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
|
||||
object4.backgroundColor = BACKGROUND_SURFACE_HIGH;
|
||||
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
|
||||
object4.borderTopColor = BACKGROUND_BASE_LOWEST;
|
||||
object3.container = object4;
|
||||
object3.item = {margin: NODE_MARGIN, height: NODE_SIZE, width: NODE_SIZE,
|
||||
borderRadius: NODE_SIZE / 2, alignItems: 'center', justifyContent: 'center'};
|
||||
object3.fadedItem = {opacity: 0.5};
|
||||
const INTERACTIVE_BACKGROUND_ACTIVE = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_BACKGROUND_ACTIVE;
|
||||
object3.activeItem = {opacity: 1, backgroundColor: INTERACTIVE_BACKGROUND_ACTIVE};
|
||||
object3.guildItem = {height: CATEGORY_ICON_SIZE, width: CATEGORY_ICON_SIZE, borderRadius: CATEGORY_ICON_SIZE / 2};
|
||||
object3.keyboardItem = {height: CATEGORY_ICON_SIZE, width: CATEGORY_ICON_SIZE};
|
||||
const object5 = {'width': 12, 'height': 12, 'position': 'absolute', 'bottom': 0, 'end': 0, 'backgroundColor': null,
|
||||
'borderRadius': null, 'alignItems': 'center', 'justifyContent': 'center'};
|
||||
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
||||
object5.backgroundColor = BACKGROUND_BASE_LOW;
|
||||
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
||||
object3.lockContainer = object5;
|
||||
const TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_DEFAULT;
|
||||
object3.lock = {'width': 7.5, 'height': 7.5, tintColor: TEXT_DEFAULT};
|
||||
const env0_12 = Reflect.apply(createStyles, createStylesModule, [object3]);
|
||||
const env0_13 = value.memo(value.forwardRef(_fun118044));
|
||||
value = value.memo(SoundboardSoundPickerCategories);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/soundboard/native/SoundboardSoundPickerCategories.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function SoundCategoryItem({category, handlePressCategory, index, style, locked}) { // fn#118041, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15628:1087, offset: 0x024c9f45, size: 774 bytes, params: 2, frame: 28
|
||||
var r3;
|
||||
var r10;
|
||||
var r14;
|
||||
var SEARCH;
|
||||
var value2;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var value3;
|
||||
var defaultImport;
|
||||
var value4;
|
||||
var defaultImport2;
|
||||
var value5;
|
||||
var value6;
|
||||
var defaultImport3;
|
||||
var value7;
|
||||
var guild;
|
||||
var name;
|
||||
var value8;
|
||||
var value9;
|
||||
locked = !(locked === undefined) && locked;
|
||||
const styles = useStyles();
|
||||
const type = category.categoryInfo.type;
|
||||
const SoundboardSoundGridSectionType = (require(6639) /* metro dependency 6639: SoundboardTypes */).SoundboardSoundGridSectionType;
|
||||
const GUILD = SoundboardSoundGridSectionType.GUILD;
|
||||
if (GUILD === type) {
|
||||
guild = category.categoryInfo.guild;
|
||||
name = guild.name;
|
||||
value8 = ((Component) => <Component guild={guild} style={styles.guildItem} />)(importDefault(6819) /* metro dependency 6819: GuildIcon */);
|
||||
value9 = null;
|
||||
r3 = name;
|
||||
r10 = value8;
|
||||
r14 = value9;
|
||||
} else if ((require(6639) /* metro dependency 6639: SoundboardTypes */).SoundboardSoundGridSectionType.FAVORITES === type) {
|
||||
value6 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.y3LQCG);
|
||||
defaultImport3 = importDefault(11053) /* metro dependency 11053 */;
|
||||
value7 = null;
|
||||
r3 = value6;
|
||||
r10 = value7;
|
||||
r14 = defaultImport3;
|
||||
} else if ((require(6639) /* metro dependency 6639: SoundboardTypes */).SoundboardSoundGridSectionType.DEFAULTS === type) {
|
||||
value4 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.Rtvk9X);
|
||||
defaultImport2 = importDefault(15429) /* metro dependency 15429 */;
|
||||
value5 = null;
|
||||
r3 = value4;
|
||||
r10 = value5;
|
||||
r14 = defaultImport2;
|
||||
} else {
|
||||
SEARCH = (require(6639) /* metro dependency 6639: SoundboardTypes */).SoundboardSoundGridSectionType.SEARCH;
|
||||
value2 = null;
|
||||
if (SEARCH !== type) {
|
||||
r3 = value2;
|
||||
r10 = value2;
|
||||
r14 = value2;
|
||||
} else {
|
||||
value3 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.sKt3xS);
|
||||
defaultImport = importDefault(15429) /* metro dependency 15429 */;
|
||||
r3 = value3;
|
||||
r10 = value2;
|
||||
r14 = defaultImport;
|
||||
}
|
||||
}
|
||||
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
||||
const items2 = [styles.item, style];
|
||||
r10 = r10 ?? ((Icon) => <Icon style={styles.keyboardItem} source={r14} />)((require(1305) /* metro dependency 1305: native */).Icon);
|
||||
return (
|
||||
<PressableOpacity
|
||||
onPress={function() {
|
||||
return handlePressCategory(index);
|
||||
}}
|
||||
accessibilityRole="button"
|
||||
accessibilityLabel={r3}
|
||||
key={r3}
|
||||
>
|
||||
<View style={items2}>
|
||||
{r10}
|
||||
{locked && <View style={styles.lockContainer}>{((LockIcon) => <LockIcon style={styles.lock} />)((require(6705) /* metro dependency 6705: LockIcon */).LockIcon)}</View>}
|
||||
</View>
|
||||
</PressableOpacity>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun118044(a0, a1) { // fn#118044, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15628:2011, offset: 0x024ca26e, size: 45 bytes, params: 3, frame: 14
|
||||
return <FlatList {...a0} {...{['ref']: a1}} />;
|
||||
}
|
||||
|
||||
function SoundboardSoundPickerCategories({guildId, categories, categoryIndex, style, listRef}) { // fn#118045, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15628:2117, offset: 0x024ca29b, size: 579 bytes, params: 2, frame: 29
|
||||
const styles = useStyles();
|
||||
const binding = styles;
|
||||
const value2 = binding.useRef(null);
|
||||
const env0_5 = binding.useRef(null);
|
||||
const env0_6 = binding.useRef(null);
|
||||
binding.useEffect(_fun118046, [categoryIndex]);
|
||||
const value3 = binding.useCallback(_fun118047, []);
|
||||
const value4 = binding.useCallback(_fun118048, []);
|
||||
const value7 = binding.useCallback(_fun118052,
|
||||
[(require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
|
||||
return importDefault(dependencyMap[19]).canUseSoundboardEverywhere(UserStore.getCurrentUser());
|
||||
}), guildId, binding.useCallback(function(a0) {
|
||||
var env0_0 = a0;
|
||||
setSearchQuery('');
|
||||
global.setImmediate(_fun118050);
|
||||
}, [listRef]), categoryIndex, styles.activeItem, styles.fadedItem]);
|
||||
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
|
||||
const Portal = (require(4027) /* metro dependency 4027 */).Portal;
|
||||
return (
|
||||
<Portal hostName="soundboard-footer">
|
||||
<View style={[styles.container, {paddingBottom: bottom}, style]}>
|
||||
{((Component) => <Component style={StyleSheet.absoluteFill} />)(importDefault(8670) /* metro dependency 8670: VisualEffectViewThemed */)}
|
||||
{((Component) => <Component ref={value2} getItemLayout={getItemLayout_118043} onLayout={value3} onScroll={value4} data={categories} keyboardShouldPersistTaps="always" horizontal keyExtractor={function(a0) {
|
||||
var String = global.String;
|
||||
return String(a0.key);
|
||||
}} renderItem={value7} showsHorizontalScrollIndicator={false} />)(env0_13)}
|
||||
</View>
|
||||
</Portal>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun118046() { // fn#118046, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15628:2292, offset: 0x024ca4de, size: 122 bytes, params: 1, frame: 12
|
||||
var categoryIndexBinding;
|
||||
var value2;
|
||||
var value3;
|
||||
let current = env0_5.current;
|
||||
if (current != null) {
|
||||
current = env0_6.current;
|
||||
if (current != null) {
|
||||
current = env0_4.current;
|
||||
if (current != null) {
|
||||
categoryIndexBinding = categoryIndex;
|
||||
value2 = environment.__proto__;
|
||||
value3 = categoryIndexBinding * EXPRESSION_FOOTER_HEIGHT;
|
||||
current = env0_6.current;
|
||||
if (value3 > current || value3 < env0_5.current) {
|
||||
current = env0_4.current;
|
||||
current.scrollToOffset({offset: value3});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun118047({nativeEvent}) { // fn#118047, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15628:2455, offset: 0x024ca558, size: 49 bytes, params: 2, frame: 4
|
||||
const layout = nativeEvent.layout;
|
||||
env0_5.current = 0;
|
||||
env0_6.current = layout.width;
|
||||
}
|
||||
|
||||
function _fun118048({nativeEvent}) { // fn#118048, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15628:2539, offset: 0x024ca589, size: 67 bytes, params: 2, frame: 5
|
||||
const contentOffset = nativeEvent.contentOffset;
|
||||
const layoutMeasurement = nativeEvent.layoutMeasurement;
|
||||
env0_5.current = contentOffset.x;
|
||||
env0_6.current = contentOffset.x + layoutMeasurement.width;
|
||||
}
|
||||
|
||||
function _fun118049(a0) { // fn#118049, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15628:2662, offset: 0x024ca5cc, size: 49 bytes, params: 2, frame: 12
|
||||
const env0_0 = a0;
|
||||
setSearchQuery('');
|
||||
global.setImmediate(_fun118050);
|
||||
}
|
||||
|
||||
function _fun118052({item, index}) { // fn#118052, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15628:2952, offset: 0x024ca6b3, size: 162 bytes, params: 2, frame: 17
|
||||
var r0;
|
||||
var value3;
|
||||
var moduleValue;
|
||||
const binding = env0_8;
|
||||
if (binding) {
|
||||
r0 = !binding;
|
||||
} else {
|
||||
value3 = environment.__proto__;
|
||||
moduleValue = require(7898) /* metro dependency 7898: PremiumFeatureUpsellUtils */;
|
||||
r0 = moduleValue.isSoundboardSectionNitroLocked(guildId, item.categoryInfo);
|
||||
}
|
||||
return (
|
||||
<SoundCategoryItem
|
||||
category={item}
|
||||
index={index}
|
||||
style={categoryIndex == null ? styles.fadedItem : index === categoryIndex ? styles.activeItem : styles.fadedItem}
|
||||
handlePressCategory={env0_7}
|
||||
locked={r0}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun118050() { // fn#118050, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15628:2686, offset: 0x024ca5fd, size: 131 bytes, params: 1, frame: 14
|
||||
var moduleValue;
|
||||
const listRefBinding = listRef;
|
||||
const value2 = undefined;
|
||||
if ((listRefBinding == null ? value2 : listRef.current) != null) {
|
||||
listRef.current.scrollToLocation({section: env0_0, item: 0});
|
||||
value = environment.__proto__.__proto__;
|
||||
moduleValue = require(4081) /* metro dependency 4081: HapticUtilsNative */;
|
||||
moduleValue.triggerHapticFeedback((importDefault(4082) /* metro dependency 4082: HapticFeedbackTypes */).IMPACT_LIGHT);
|
||||
}
|
||||
return value2;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,498 @@
|
||||
/* Metro module 15422; source: modules/soundboard/native/SoundboardSoundPickerList.tsx; dependencies: [31, 27, 1878, 15418, 33, 4501, 697, 6639, 1244, 8646, 566, 3802, 7898, 8597, 15423, 4584, 22, 6819, 1305, 15429, 11053, 8596, 8140, 4573, 2] */
|
||||
function _fun117974(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117974, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15619:6, offset: 0x024c6f89, size: 431 bytes, params: 8, frame: 24
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const _arrayLikeToArray_117977 = function(a0, a1) {
|
||||
var r0;
|
||||
var r1;
|
||||
var r2;
|
||||
var value3;
|
||||
var length;
|
||||
var value5;
|
||||
var value = undefined;
|
||||
var value2 = value == null;
|
||||
reducibleJoin2: while (true) {
|
||||
if (value2) {
|
||||
r0 = value2;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
value3 = value > a0.length;
|
||||
r0 = value3;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
reducibleJoin4: while (true) {
|
||||
if (r0) {
|
||||
length = a0.length;
|
||||
r1 = length;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
r1 = value;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
value = (0, global.Array)(r1);
|
||||
var value4 = 0;
|
||||
if (value4 < r1) {
|
||||
r2 = value4;
|
||||
reducibleLoop5: while (true) {
|
||||
value[r2] = a0[r2];
|
||||
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
|
||||
if (value5 < r1) {
|
||||
r2 = value5;
|
||||
continue reducibleLoop5;
|
||||
}
|
||||
break reducibleLoop5;
|
||||
}
|
||||
}
|
||||
return value;
|
||||
};
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(27) /* metro dependency 27 */).View;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const soundboardStyleConstantsModule = require(15418) /* metro dependency 15418: SoundboardStyleConstants */;
|
||||
const SOUND_BUTTON_HEIGHT = soundboardStyleConstantsModule.SOUND_BUTTON_HEIGHT;
|
||||
const SOUND_ROW_HORIZONTAL_PADDING = soundboardStyleConstantsModule.SOUND_ROW_HORIZONTAL_PADDING;
|
||||
const SOUND_ROW_SPACING = soundboardStyleConstantsModule.SOUND_ROW_SPACING;
|
||||
const env0_6 = soundboardStyleConstantsModule.SOUNDS_PER_ROW;
|
||||
let value3 = require(33) /* metro dependency 33 */;
|
||||
const env0_7 = value3.jsx;
|
||||
const env0_8 = value3.jsxs;
|
||||
let value4 = SOUND_BUTTON_HEIGHT + 8;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
object2 = {};
|
||||
object2.row = {'height': null, 'display': 'flex', 'flexDirection': 'row', height: value4,
|
||||
paddingHorizontal: SOUND_ROW_HORIZONTAL_PADDING};
|
||||
const MOBILE_ACTIONSHEET_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_ACTIONSHEET_BACKGROUND;
|
||||
object2.sectionHeader = {'flex': 1, 'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center',
|
||||
'paddingTop': 16, 'paddingBottom': 8, backgroundColor: MOBILE_ACTIONSHEET_BACKGROUND,
|
||||
paddingHorizontal: SOUND_ROW_HORIZONTAL_PADDING};
|
||||
object2.sectionIcon = {'height': 16, 'width': 16, 'borderRadius': 8, 'marginRight': 4};
|
||||
object2.soundButtonNotFirst = {marginLeft: SOUND_ROW_SPACING};
|
||||
const env0_10 = Reflect.apply(createStyles, createStylesModule, [object2]);
|
||||
value = value.memo(_fun117982);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/soundboard/native/SoundboardSoundPickerList.tsx');
|
||||
exports.SoundboardSoundPickerList = value;
|
||||
}
|
||||
|
||||
function _createForOfIteratorHelperLoose_117975(a0, a1) { // fn#117975, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15619:276, offset: 0x024c7138, size: 372 bytes, params: 3, frame: 20
|
||||
var r6;
|
||||
var r9;
|
||||
var r5;
|
||||
var value3;
|
||||
var regexp;
|
||||
const env0_0 = a0;
|
||||
const Symbol = global.Symbol;
|
||||
let value = typeof Symbol !== 'undefined';
|
||||
let r1 = value && a0[global.Symbol.iterator];
|
||||
r1 = !r1 ? a0['@@iterator'] : r1;
|
||||
if (r1) {
|
||||
value = r1.call(a0);
|
||||
return value.next.bind(value);
|
||||
}
|
||||
const Array = global.Array;
|
||||
if (Array.isArray(a0)) {
|
||||
if (r1) {
|
||||
}
|
||||
return _fun117976;
|
||||
}
|
||||
value = undefined;
|
||||
if (a0) {
|
||||
if (typeof a0 === 'string') {
|
||||
value = _arrayLikeToArray_117977(a0, value);
|
||||
r5 = value;
|
||||
} else {
|
||||
value3 = ({}).toString.call(a0).slice(8, -1);
|
||||
r6 = value3 === 'Object' && a0.constructor;
|
||||
r9 = r6 ? a0.constructor.name : value3;
|
||||
if (r9 === 'Map') {
|
||||
r6 = global.Array.from(a0);
|
||||
} else if (r9 === 'Set') {
|
||||
r6 = global.Array.from(a0);
|
||||
} else if (r9 === 'Arguments') {
|
||||
value = _arrayLikeToArray_117977(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
||||
if (regexp.test(r9)) {
|
||||
value = _arrayLikeToArray_117977(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
r6 = value;
|
||||
}
|
||||
}
|
||||
r5 = r6;
|
||||
}
|
||||
} else {
|
||||
r5 = value;
|
||||
}
|
||||
if (r5) {
|
||||
if (r5) {
|
||||
}
|
||||
return _fun117976;
|
||||
}
|
||||
const TypeError = global.TypeError;
|
||||
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
|
||||
}
|
||||
|
||||
function getSectionLabel(a0) { // fn#117978, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15619:1580, offset: 0x024c72ac, size: 308 bytes, params: 2, frame: 16
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const type = a0.category.categoryInfo.type;
|
||||
const SoundboardSoundGridSectionType = (require(6639) /* metro dependency 6639: SoundboardTypes */).SoundboardSoundGridSectionType;
|
||||
const GUILD = SoundboardSoundGridSectionType.GUILD;
|
||||
if (GUILD === type) {
|
||||
return a0.category.categoryInfo.guild.name;
|
||||
}
|
||||
const DEFAULTS = SoundboardSoundGridSectionType.DEFAULTS;
|
||||
if (DEFAULTS === type) {
|
||||
return intl.string(t.Rtvk9X);
|
||||
}
|
||||
const FAVORITES = SoundboardSoundGridSectionType.FAVORITES;
|
||||
if (FAVORITES === type) {
|
||||
return intl.string(t.y3LQCG);
|
||||
}
|
||||
const SEARCH = SoundboardSoundGridSectionType.SEARCH;
|
||||
if (SEARCH === type) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
function SoundPickerButtonRow({row, section, channel}) { // fn#117979, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15619:2031, offset: 0x024c73e0, size: 290 bytes, params: 2, frame: 22
|
||||
var r9;
|
||||
var moduleValue2;
|
||||
const styles = useStyles();
|
||||
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
|
||||
return importDefault(dependencyMap[11]).canUseSoundboardEverywhere(UserStore.getCurrentUser());
|
||||
});
|
||||
if (section == null) {
|
||||
return null;
|
||||
}
|
||||
if (value2) {
|
||||
r9 = !value2;
|
||||
} else {
|
||||
moduleValue2 = require(7898) /* metro dependency 7898: PremiumFeatureUpsellUtils */;
|
||||
r9 = moduleValue2.isSoundboardSectionNitroLocked(channel.guild_id, section.category.categoryInfo);
|
||||
}
|
||||
const items2 = [styles.row];
|
||||
r9 = r9 && ((PremiumUpsellGradientBackground) => <PremiumUpsellGradientBackground />)((require(8597) /* metro dependency 8597: PremiumUpsellGradientBackground */).PremiumUpsellGradientBackground);
|
||||
const property = section.soundsByRow[row];
|
||||
return (
|
||||
<View style={items2}>
|
||||
{[r9, property.map(_fun117981)]}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun117982({channel, insetBottom, listRef, scrollPosition, onScroll, setCategoryIndex, shouldShowPremiumUpsell, categories}) { // fn#117982, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15619:2723, offset: 0x024c7641, size: 752 bytes, params: 2, frame: 32
|
||||
var r11;
|
||||
var r10;
|
||||
var value;
|
||||
var value5;
|
||||
var items2;
|
||||
var Math;
|
||||
var ceil;
|
||||
var length;
|
||||
var value6;
|
||||
var push;
|
||||
var value7;
|
||||
var value10;
|
||||
var defaultImport;
|
||||
var value11;
|
||||
var value12;
|
||||
var value13;
|
||||
var value14;
|
||||
reducibleJoin2: while (true) {
|
||||
if (insetBottom !== undefined) {
|
||||
break reducibleJoin2;
|
||||
}
|
||||
value = 0;
|
||||
insetBottom = value;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
let env0_9 = undefined;
|
||||
const env0_5 = useStyles();
|
||||
const value2 = (require(4584) /* metro dependency 4584: useFontScale */).useFontScale();
|
||||
const items4 = [];
|
||||
const value3 = _createForOfIteratorHelperLoose_117975(categories);
|
||||
const value4 = value3();
|
||||
let done = value4.done;
|
||||
if (!done) {
|
||||
r11 = value4;
|
||||
reducibleLoop3: while (true) {
|
||||
value5 = r11.value;
|
||||
items2 = value5.items;
|
||||
Math = global.Math;
|
||||
ceil = Math.ceil;
|
||||
length = items2.length;
|
||||
value6 = Reflect.apply(ceil, Math, [length / SOUNDS_PER_ROW]);
|
||||
push = items4.push;
|
||||
Reflect.apply(push, items4, [value6]);
|
||||
value7 = value3();
|
||||
done = value7.done;
|
||||
if (done) {
|
||||
break reducibleLoop3;
|
||||
}
|
||||
r11 = value7;
|
||||
continue reducibleLoop3;
|
||||
}
|
||||
}
|
||||
const items3 = [];
|
||||
const value8 = _createForOfIteratorHelperLoose_117975(categories);
|
||||
const value9 = value8();
|
||||
done = value9.done;
|
||||
if (!done) {
|
||||
r10 = value9;
|
||||
reducibleLoop5: while (true) {
|
||||
value10 = r10.value;
|
||||
defaultImport = importDefault(8646) /* metro dependency 8646 */;
|
||||
items2 = value10.items;
|
||||
value11 = defaultImport(items2, SOUNDS_PER_ROW);
|
||||
length = value11.length;
|
||||
value12 = length * env0_9;
|
||||
value13 = 18 * value2;
|
||||
push = items3.push;
|
||||
Reflect.apply(push, items3, [{category: value10, height: value12 + (value13 + 8), soundsByRow: value11}]);
|
||||
value14 = value8();
|
||||
done = value14.done;
|
||||
if (done) {
|
||||
break reducibleLoop5;
|
||||
}
|
||||
r10 = value14;
|
||||
continue reducibleLoop5;
|
||||
}
|
||||
}
|
||||
const binding = setCategoryIndex;
|
||||
const env0_7 = binding.useMemo(_fun117987, [items3]);
|
||||
const value15 = binding.useCallback(_fun117989, [items3, channel]);
|
||||
const env0_8 = (require(22) /* metro dependency 22 */).debounce(function(a0) {
|
||||
setCategoryIndex(calculateCategory(a0, 0));
|
||||
});
|
||||
env0_9 = (require(22) /* metro dependency 22 */).debounce(_fun117991);
|
||||
const env0_10 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
|
||||
return importDefault(dependencyMap[11]).canUseSoundboardEverywhere(UserStore.getCurrentUser());
|
||||
});
|
||||
return ((Component) => <Component onLayout={onLayout_117993} sections={items4} sectionSize={sectionSize} itemSize={itemSize} sectionFooterSize={sectionFooterSize} ref={listRef} renderItem={value15} renderSection={renderSection} renderSectionFooter={renderSectionFooter} insetEnd={insetBottom} onScroll={onScroll_117999} keyboardShouldPersistTaps="handled" optimizeListItemRender inActionSheet />)(importDefault(8140) /* metro dependency 8140: FastList */);
|
||||
}
|
||||
|
||||
function _fun117981(a0, a1) { // fn#117981, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15619:2391, offset: 0x024c7535, size: 268 bytes, params: 3, frame: 19
|
||||
var sound;
|
||||
const type = a0.type;
|
||||
const value = environment.__proto__;
|
||||
const SoundboardSoundItemType = (require(6639) /* metro dependency 6639: SoundboardTypes */).SoundboardSoundItemType;
|
||||
const SOUND = SoundboardSoundItemType.SOUND;
|
||||
if (SOUND === type) {
|
||||
sound = a0.sound;
|
||||
const SoundButton = (require(15423) /* metro dependency 15423: SoundButton */).SoundButton;
|
||||
return (
|
||||
<SoundButton
|
||||
sound={sound}
|
||||
channel={channel}
|
||||
style={a1 > 0 ? styles.soundButtonNotFirst : null}
|
||||
isSectionLocked={env0_3}
|
||||
key={'' + section.category.key + '-' + sound.soundId}
|
||||
/>
|
||||
);
|
||||
}
|
||||
const ADD_SOUND = SoundboardSoundItemType.ADD_SOUND;
|
||||
if (ADD_SOUND === type) {
|
||||
throw new global.Error('ADD_SOUND Not implemented');
|
||||
}
|
||||
}
|
||||
|
||||
function calculateCategory(a0, a1) { // fn#117983, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15619:3399, offset: 0x024c7931, size: 118 bytes, params: 3, frame: 16
|
||||
var r1;
|
||||
var r2;
|
||||
var r3;
|
||||
var r0;
|
||||
var value4;
|
||||
var value5;
|
||||
var value6;
|
||||
var value7;
|
||||
const Math = global.Math;
|
||||
const value = Math.round(a0);
|
||||
let length = env0_7.length;
|
||||
const value3 = 0;
|
||||
if (value3 < length) {
|
||||
value4 = a1 + env0_7[value3];
|
||||
if (value >= value4) {
|
||||
r1 = value3;
|
||||
r2 = value3;
|
||||
r3 = value4;
|
||||
while (true) {
|
||||
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
|
||||
value6 = typeof r1 === 'bigint' ? r1 + 1n : +r1 + 1;
|
||||
length = env0_7.length;
|
||||
if (!(value6 < length)) {
|
||||
r0 = value5;
|
||||
break;
|
||||
}
|
||||
value7 = r3 + env0_7[value6];
|
||||
if (value >= value7) {
|
||||
r1 = value6;
|
||||
r2 = value5;
|
||||
r3 = value7;
|
||||
continue;
|
||||
}
|
||||
r0 = value5;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
r0 = value3;
|
||||
}
|
||||
} else {
|
||||
r0 = value3;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function getSectionIcon(a0) { // fn#117984, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15619:3783, offset: 0x024c79a7, size: 423 bytes, params: 2, frame: 18
|
||||
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
|
||||
const type = a0.category.categoryInfo.type;
|
||||
const SoundboardSoundGridSectionType = (require(6639) /* metro dependency 6639: SoundboardTypes */).SoundboardSoundGridSectionType;
|
||||
const GUILD = SoundboardSoundGridSectionType.GUILD;
|
||||
if (GUILD === type) {
|
||||
return ((Component) => <Component size={(require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes.XXSMALL_12} guild={a0.category.categoryInfo.guild} style={styles.sectionIcon} />)(importDefault(6819) /* metro dependency 6819: GuildIcon */);
|
||||
}
|
||||
const DEFAULTS = SoundboardSoundGridSectionType.DEFAULTS;
|
||||
if (DEFAULTS === type) {
|
||||
return <Icon source={importDefault(15429) /* metro dependency 15429 */} style={styles.sectionIcon} />;
|
||||
}
|
||||
const FAVORITES = SoundboardSoundGridSectionType.FAVORITES;
|
||||
if (FAVORITES === type) {
|
||||
return <Icon source={importDefault(11053) /* metro dependency 11053 */} style={styles.sectionIcon} />;
|
||||
}
|
||||
const SEARCH = SoundboardSoundGridSectionType.SEARCH;
|
||||
if (SEARCH === type) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
function isSectionLocked(a0) { // fn#117985, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15619:4319, offset: 0x024c7b4e, size: 100 bytes, params: 2, frame: 15
|
||||
var value4;
|
||||
var moduleValue;
|
||||
let r0 = !env0_10 && env0_6[a0] != null;
|
||||
if (r0) {
|
||||
value4 = environment.__proto__;
|
||||
moduleValue = require(7898) /* metro dependency 7898: PremiumFeatureUpsellUtils */;
|
||||
r0 = moduleValue.isSoundboardSectionNitroLocked(channel.guild_id, env0_6[a0].category.categoryInfo);
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function getSectionPosition(a0) { // fn#117986, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15619:4449, offset: 0x024c7bb2, size: 134 bytes, params: 2, frame: 14
|
||||
const PremiumUpsellSectionDividerPosition = (require(8596) /* metro dependency 8596: PremiumUpsellSectionDivider */).PremiumUpsellSectionDividerPosition;
|
||||
const isSectionLockedBinding = isSectionLocked;
|
||||
const isSectionLockedBinding2 = isSectionLockedBinding(a0 - 1);
|
||||
const isSectionLocked2 = isSectionLockedBinding(a0);
|
||||
const isSectionLocked3 = isSectionLockedBinding(a0 + 1);
|
||||
return isSectionLocked2 ? isSectionLocked2 ? isSectionLocked3 ? null : PremiumUpsellSectionDividerPosition.END : null : isSectionLocked3 ? isSectionLockedBinding2 ? isSectionLocked2 ? isSectionLocked3 ? null : PremiumUpsellSectionDividerPosition.END : null : PremiumUpsellSectionDividerPosition.START : isSectionLocked2 ? isSectionLocked3 ? null : PremiumUpsellSectionDividerPosition.END : null;
|
||||
}
|
||||
|
||||
function _fun117987() { // fn#117987, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15619:3281, offset: 0x024c7c38, size: 28 bytes, params: 1, frame: 11
|
||||
return env0_6.map(function(a0) {
|
||||
return a0.height;
|
||||
});
|
||||
}
|
||||
|
||||
function _fun117989(a0, a1) { // fn#117989, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15619:3329, offset: 0x024c7c54, size: 58 bytes, params: 3, frame: 15
|
||||
return (
|
||||
<SoundPickerButtonRow
|
||||
row={a1}
|
||||
section={env0_6[a0]}
|
||||
channel={channel}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun117991(a0, a1) { // fn#117991, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15619:3594, offset: 0x024c7cad, size: 91 bytes, params: 3, frame: 18
|
||||
const value2 = calculateCategory(a0, -a1 / 2);
|
||||
const shouldShowPremiumUpsellBinding = shouldShowPremiumUpsell;
|
||||
const set = shouldShowPremiumUpsellBinding.set;
|
||||
const isSectionLockedBinding = isSectionLocked;
|
||||
const Math = global.Math;
|
||||
Reflect.apply(set, shouldShowPremiumUpsellBinding, [isSectionLockedBinding(Math.min(value2, env0_7.length - 1))]);
|
||||
}
|
||||
|
||||
function onLayout_117993({nativeEvent}) { // fn#117993, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15619:4709, offset: 0x024c7d08, size: 39 bytes, params: 2, frame: 13
|
||||
return env0_9(0, nativeEvent.layout.height);
|
||||
}
|
||||
|
||||
function sectionSize(a0) { // fn#117994, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15619:4768, offset: 0x024c7d2f, size: 48 bytes, params: 2, frame: 12
|
||||
var r0;
|
||||
var value;
|
||||
const property = env0_6[a0];
|
||||
if (property == null) {
|
||||
r0 = 0;
|
||||
} else {
|
||||
value = environment.__proto__;
|
||||
value = getSectionLabel(property) == null;
|
||||
r0 = value ? 0 : 42;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function itemSize(a0) { // fn#117995, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15619:4847, offset: 0x024c7d5f, size: 34 bytes, params: 2, frame: 2
|
||||
return env0_6[a0] == null ? 0 : env1_9;
|
||||
}
|
||||
|
||||
function sectionFooterSize(a0) { // fn#117996, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15619:4900, offset: 0x024c7d81, size: 78 bytes, params: 2, frame: 14
|
||||
var r0;
|
||||
let value = getSectionPosition(a0);
|
||||
value = 0;
|
||||
if (value == null) {
|
||||
r0 = value;
|
||||
} else {
|
||||
value = environment.__proto__;
|
||||
value = (require(8596) /* metro dependency 8596: PremiumUpsellSectionDivider */).PREMIUM_UPSELL_SECTION_DIVIDER_HEIGHT + (require(8596) /* metro dependency 8596: PremiumUpsellSectionDivider */).PREMIUM_UPSELL_SECTION_DIVIDER_MARGIN;
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function renderSection(a0) { // fn#117997, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15619:5079, offset: 0x024c7dcf, size: 222 bytes, params: 2, frame: 24
|
||||
const property = env0_6[a0];
|
||||
const items2 = [isSectionLocked(a0) && ((PremiumUpsellGradientBackground) => <PremiumUpsellGradientBackground />)((require(8597) /* metro dependency 8597: PremiumUpsellGradientBackground */).PremiumUpsellGradientBackground)];
|
||||
items2[1] = getSectionIcon(property);
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
items2[2] = <Text accessibilityRole="header" lineClamp={1} variant="heading-sm/semibold">{getSectionLabel(property)}</Text>;
|
||||
return (
|
||||
<View key={property.category.key}>
|
||||
<View style={styles.sectionHeader}>
|
||||
{items2}
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function renderSectionFooter(a0) { // fn#117998, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15619:5408, offset: 0x024c7ead, size: 67 bytes, params: 2, frame: 16
|
||||
var r0;
|
||||
var value3;
|
||||
let value = getSectionPosition(a0);
|
||||
const value2 = null;
|
||||
if (value2 != value) {
|
||||
value3 = environment.__proto__;
|
||||
value = ((Component) => <Component position={value} />)(importDefault(8596) /* metro dependency 8596: PremiumUpsellSectionDivider */);
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = value2;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function onScroll_117999(a0) { // fn#117999, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15619:5515, offset: 0x024c7ef0, size: 146 bytes, params: 2, frame: 16
|
||||
const nativeEvent = a0.nativeEvent;
|
||||
const y = nativeEvent.contentOffset.y;
|
||||
env0_8(y);
|
||||
env0_9(y, nativeEvent.layoutMeasurement.height);
|
||||
if (!(nativeEvent.layoutMeasurement.height + nativeEvent.contentOffset.y >= nativeEvent.contentSize.height - 20)) {
|
||||
if (scrollPosition != null) {
|
||||
scrollPosition.set(y);
|
||||
}
|
||||
if (onScroll != null) {
|
||||
onScroll(a0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,150 @@
|
||||
/* Metro module 15428; source: modules/soundboard/native/SoundboardSoundPreviewActionSheet.tsx; dependencies: [29, 31, 27, 1878, 4613, 661, 33, 4501, 697, 477, 566, 6771, 6944, 6951, 6639, 4583, 6805, 6739, 11508, 4573, 4578, 8633, 8635, 1244, 8146, 4017, 2] */
|
||||
function _fun118030(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118030, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15625:6, offset: 0x024c927c, size: 641 bytes, params: 8, frame: 25
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const env0_3 = ['style'];
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const value = undefined;
|
||||
const env0_4 = importDefault(29) /* metro dependency 29 */;
|
||||
const env0_5 = importAll(31) /* metro dependency 31 */;
|
||||
const value2 = require(27) /* metro dependency 27 */;
|
||||
const env0_6 = value2.View;
|
||||
const env0_7 = value2.Image;
|
||||
const StyleSheet = value2.StyleSheet;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const soundboardStore = importDefault(4613) /* metro dependency 4613: SoundboardStore */;
|
||||
const env0_10 = (require(661) /* metro dependency 661: Constants */).AnalyticsObjects;
|
||||
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 createStyles = createStylesModule.createStyles;
|
||||
object2 = {};
|
||||
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object2.emoji = {'marginTop': null, 'width': 64, 'height': 64, 'alignSelf': 'center', marginTop: PX_16};
|
||||
object2.emojiFastImage = {'width': 128, 'height': 128};
|
||||
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
object2.emojiText = {fontSize: platformUtilsModule.isIOS() ? 60 : value, lineHeight: 74};
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object2.text = {marginTop: PX_16, alignSelf: 'center'};
|
||||
const object3 = {};
|
||||
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object3.gap = PX_8;
|
||||
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
object3.marginTop = PX_24;
|
||||
object2.buttonContainer = object3;
|
||||
const TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_DEFAULT;
|
||||
object2.star = {'width': 16, 'height': 16, tintColor: TEXT_DEFAULT};
|
||||
const object4 = {'borderColor': 'transparent', 'borderWidth': 1, 'borderRadius': null, 'pointerEvents': 'none'};
|
||||
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
||||
copyDataProperties(object4, StyleSheet.absoluteFillObject, undefined);
|
||||
object2.border = object4;
|
||||
const TEXT_FEEDBACK_POSITIVE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_FEEDBACK_POSITIVE;
|
||||
object2.borderPlaying = {borderColor: TEXT_FEEDBACK_POSITIVE};
|
||||
const env0_13 = Reflect.apply(createStyles, createStylesModule, [object2]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/soundboard/native/SoundboardSoundPreviewActionSheet.tsx');
|
||||
exports.default = SoundboardSoundPreviewActionSheet;
|
||||
return value;
|
||||
}
|
||||
|
||||
function SoundboardSoundPreviewActionSheet({channelId, sound}) { // fn#118031, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15625:943, offset: 0x024c94fd, size: 1057 bytes, params: 2, frame: 38
|
||||
const styles = useStyles();
|
||||
const env0_2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], _fun118032);
|
||||
const analyticsLocations = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().analyticsLocations;
|
||||
const env0_3 = analyticsLocations;
|
||||
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([SoundboardStore],
|
||||
_fun118033);
|
||||
const isPlayingSound = value2.isPlayingSound;
|
||||
const env0_4 = isPlayingSound;
|
||||
const isFavorite = value2.isFavorite;
|
||||
const binding = isFavorite;
|
||||
const value3 = binding.useCallback(_fun118034, [isFavorite, sound, analyticsLocations]);
|
||||
const value4 = binding.useCallback(_fun118035, [channelId, sound, isPlayingSound]);
|
||||
const value5 = (require(4583) /* metro dependency 4583: ButtonHooksNative */).useButtonPressAnimationProps();
|
||||
const style = value5.style;
|
||||
const value6 = env0_4(value5, env0_3);
|
||||
const ActionSheet = (require(6805) /* metro dependency 6805: ActionSheetNative */).ActionSheet;
|
||||
const items3 = [((Component) => <Component fastImageStyle={[styles.emoji,
|
||||
styles.emojiFastImage]} textEmojiStyle={[styles.emoji,
|
||||
styles.emojiText]} src={(importDefault(11508) /* metro dependency 11508: getSoundboardEmojiUrl */)(sound,
|
||||
64)} name={sound.emojiName ?? ''} />)(importDefault(6739) /* metro dependency 6739: Emoji */)];
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
items3[1] = <Text style={styles.text} variant="heading-lg/extrabold">{sound.name}</Text>;
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
const buttonProps2 = {variant: 'primary',
|
||||
icon: ((Component) => <Component style={styles.star} />)(isFavorite ? (require(8633) /* metro dependency 8633: StarIcon */).StarIcon : (require(8635) /* metro dependency 8635: StarOutlineIcon */).StarOutlineIcon)};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let string = intl.string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
buttonProps2.text = isFavorite ? Reflect.apply(string, intl, [t.aBUcp3]) : Reflect.apply(string, intl, [t.yZFibY]);
|
||||
buttonProps2.onPress = value3;
|
||||
const button = <Button {...buttonProps2} />;
|
||||
const buttonProps = {...value6};
|
||||
buttonProps['variant'] = 'secondary';
|
||||
buttonProps['icon'] = <Image style={styles.star} source={importDefault(8146) /* metro dependency 8146 */} />;
|
||||
string = intl.string;
|
||||
const Kd4uxG = (require(1244) /* metro dependency 1244: indexNative */).t.Kd4uxG;
|
||||
buttonProps['text'] = Reflect.apply(string, intl, [Kd4uxG]);
|
||||
buttonProps['onPress'] = value4;
|
||||
const button2 = <Button {...buttonProps} />;
|
||||
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
items3[2] = <View style={styles.buttonContainer}>{button}<View>{button2}<View2 style={[styles.border,
|
||||
isPlayingSound && styles.borderPlaying, style]} /></View></View>;
|
||||
return (
|
||||
<ActionSheet startExpanded>
|
||||
<View>
|
||||
{items3}
|
||||
</View>
|
||||
</ActionSheet>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun118032() { // fn#118032, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15625:1056, offset: 0x024c991e, size: 34 bytes, params: 1, frame: 10
|
||||
const value = environment.__proto__;
|
||||
return UserStore.getCurrentUser()?.id;
|
||||
}
|
||||
|
||||
function _fun118033() { // fn#118033, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15625:1191, offset: 0x024c9940, size: 82 bytes, params: 1, frame: 14
|
||||
return {isPlayingSound: env0_2 != null && SoundboardStore.isUserPlayingSounds(env0_2),
|
||||
isFavorite: SoundboardStore.isFavoriteSound(sound.soundId)};
|
||||
}
|
||||
|
||||
function _fun118034() { // fn#118034, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15625:1341, offset: 0x024c9992, size: 163 bytes, params: 1, frame: 20
|
||||
var moduleValue;
|
||||
var trackSoundFavorited;
|
||||
var object3;
|
||||
var soundBinding;
|
||||
var object4;
|
||||
var moduleValue2;
|
||||
var value;
|
||||
if (isFavorite) {
|
||||
moduleValue2 = require(6944) /* metro dependency 6944: SoundboardActionCreators */;
|
||||
moduleValue2.removeFavoriteSound(sound.soundId);
|
||||
} else {
|
||||
moduleValue = require(6951) /* metro dependency 6951: SoundboardUtils */;
|
||||
trackSoundFavorited = moduleValue.trackSoundFavorited;
|
||||
object3 = {};
|
||||
soundBinding = sound;
|
||||
object3.sound = soundBinding;
|
||||
object4 = {};
|
||||
copyDataProperties(object4, analyticsLocations, undefined);
|
||||
object4['object'] = AnalyticsObjects.SOUNDBOARD_SOUND;
|
||||
object3.location = object4;
|
||||
Reflect.apply(trackSoundFavorited, moduleValue, [object3]);
|
||||
value = require(6944) /* metro dependency 6944: SoundboardActionCreators */;
|
||||
value.addFavoriteSound(soundBinding.soundId);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun118035() { // fn#118035, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15625:1537, offset: 0x024c9a35, size: 84 bytes, params: 1, frame: 18
|
||||
var value2;
|
||||
var moduleValue;
|
||||
if (!isPlayingSound) {
|
||||
value2 = environment.__proto__;
|
||||
moduleValue = require(6944) /* metro dependency 6944: SoundboardActionCreators */;
|
||||
moduleValue.playSoundLocally(channelId, sound,
|
||||
(require(6639) /* metro dependency 6639: SoundboardTypes */).LocalSoundTrigger.SOUNDBOARD);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
/* Metro module 15418; source: modules/soundboard/native/SoundboardStyleConstants.tsx; dependencies: [2] */
|
||||
function _fun117939(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117939, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15615:6, offset: 0x024c5daf, size: 117 bytes, params: 8, frame: 15
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/soundboard/native/SoundboardStyleConstants.tsx');
|
||||
exports.SOUND_BUTTON_HEIGHT = 88;
|
||||
exports.SOUND_ROW_HORIZONTAL_PADDING = 12;
|
||||
exports.SOUND_ROW_SPACING = 8;
|
||||
exports.SOUNDS_PER_ROW = 3;
|
||||
exports.SOUND_ROW_PADDING = 40;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
/* Metro module 11508; source: modules/soundboard/native/utils/getSoundboardEmojiUrl.tsx; dependencies: [1423, 2] */
|
||||
function _fun88116(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88116, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11694:6, offset: 0x01fd5c22, size: 99 bytes, params: 8, frame: 17
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/soundboard/native/utils/getSoundboardEmojiUrl.tsx');
|
||||
exports.default = getSoundboardEmojiUrl;
|
||||
}
|
||||
|
||||
function getSoundboardEmojiUrl({emojiId}, a1) { // fn#88117, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11694:193, offset: 0x01fd5c85, size: 77 bytes, params: 3, frame: 14
|
||||
var r0;
|
||||
let value = undefined;
|
||||
if (emojiId == null) {
|
||||
r0 = value;
|
||||
} else {
|
||||
value = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
|
||||
value = value.getEmojiURL({id: emojiId, animated: false, size: a1});
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
/* Metro module 15427; source: modules/soundboard/native/utils/openSoundboardSoundPreviewActionSheet.tsx; dependencies: [4080, 15428, 1962, 2] */
|
||||
function _fun118028(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118028, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15624:6, offset: 0x024c91b5, size: 103 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/soundboard/native/utils/openSoundboardSoundPreviewActionSheet.tsx');
|
||||
exports.default = openSoundboardSoundPreviewActionSheet;
|
||||
}
|
||||
|
||||
function openSoundboardSoundPreviewActionSheet(a0, a1) { // fn#118029, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15624:209, offset: 0x024c921c, size: 96 bytes, params: 3, frame: 16
|
||||
const defaultImport = importDefault(dependencyMap[0]);
|
||||
const openLazy = defaultImport.openLazy;
|
||||
let value = require(dependencyMap[2]);
|
||||
value = value(dependencyMap[1], dependencyMap.paths);
|
||||
Reflect.apply(openLazy, defaultImport, [value, 'SoundboardSoundPreviewActionSheet', {channelId: a0, sound: a1}]);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user