This commit is contained in:
janisslsm committed 2026-07-28 01:06:53 +03:00
1 parent af3b49f756
commit 1781d25a15
22448 files changed
+2731829 -2650550

No files matched your search

@@ -1,33 +1,39 @@
/* Metro module 12121; source: components_native/common/ActionButton.tsx; dependencies: [31, 27, 33, 4583, 8341, 2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ButtonHooksNativeModule from '../../design/components/Button/native/ButtonHooks.native.tsx'; /* Metro dependency 4583 */
import * as IconButtonNativeModule from '../../design/components/Button/native/IconButton.native.tsx'; /* Metro dependency 8341 */
function _fun93034(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#93034, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12307:6, offset: 0x020a3d4b, size: 152 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_2 = (require(27) /* metro dependency 27 */).View;
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/common/ActionButton.tsx');
ReactModule;
(FileImportTrackerModule).fileFinishedImporting('components_native/common/ActionButton.tsx');
exports.default = ActionButton_93035;
function ActionButton_93035(a0) { // fn#93035, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12307:218, offset: 0x020a3de3, size: 178 bytes, params: 2, frame: 21
const IconComponent = a0.IconComponent;
const r7 = a0.type !== 'positive' ? 'tertiary' : 'active';
const useButtonTextColorStyles = ButtonHooksNativeModule.useButtonTextColorStyles;
const color = Reflect.apply(useButtonTextColorStyles, ButtonHooksNativeModule, [r7]).color;
const styles = a0.styles;
const IconButton = (IconButtonNativeModule).IconButton;
return (
<View style={styles}>
<IconButton
icon={<IconComponent color={color} size="sm" />}
onPress={a0.onPress}
accessibilityLabel={a0.accessibilityLabel}
variant={r7}
size="sm"
/>
</View>
);
}
}
function ActionButton_93035(a0) { // fn#93035, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12307:218, offset: 0x020a3de3, size: 178 bytes, params: 2, frame: 21
const IconComponent = a0.IconComponent;
const r7 = a0.type !== 'positive' ? 'tertiary' : 'active';
const buttonHooksNativeModule = require(4583) /* metro dependency 4583: ButtonHooksNative */;
const useButtonTextColorStyles = buttonHooksNativeModule.useButtonTextColorStyles;
const color = Reflect.apply(useButtonTextColorStyles, buttonHooksNativeModule, [r7]).color;
const styles = a0.styles;
const IconButton = (require(8341) /* metro dependency 8341: IconButtonNative */).IconButton;
return (
<View style={styles}>
<IconButton
icon={<IconComponent color={color} size="sm" />}
onPress={a0.onPress}
accessibilityLabel={a0.accessibilityLabel}
variant={r7}
size="sm"
/>
</View>
);
}
global.__d(_fun93034, 12121, [31, 27, 33, 4583, 8341,
2]) /* metro module 12121, dependencies: [31, 27, 33, 4583, 8341, 2] */;
+406 -336
View File
@@ -1,367 +1,437 @@
/* Metro module 4596; source: components_native/common/Alert.tsx; dependencies: [6, 7, 15, 17, 18, 31, 27, 33, 4501, 697, 1305, 4597, 4041, 4570, 4573, 1244, 4578, 5278, 7704, 3868, 1478, 8750, 2] */
import ClassCallCheck from '../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import UseWindowDimensionsNative from '../../modules/screen/useWindowDimensions.native.tsx'; /* Metro dependency 1478 */
import ThemedGradient from '../../modules/client_themes/native/ThemedGradient.tsx'; /* Metro dependency 7704 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as NativeModule from '../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as NativeModule2 from '../../external/discord_common/js/packages/design/native.tsx'; /* Metro dependency 3868 */
import * as TimersModule from '../../external/discord_common/js/packages/timers/Timers.tsx'; /* Metro dependency 4041 */
import * as CreateStylesModule from '../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as SetAccessibilityFocusAndroidModule from '../../modules/a11y/native/setAccessibilityFocus.android.tsx'; /* Metro dependency 4570 */
import * as ButtonNativeModule from '../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as UseIsScreenLandscapeNativeModule from '../../modules/screen/useIsScreenLandscape.native.tsx'; /* Metro dependency 8750 */
function _fun38946(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#38946, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4774:6, offset: 0x010d1d85, size: 700 bytes, params: 8, frame: 28
var object3;
const env0_0 = require;
const closure = getAlertButtonVariant;
const getAlertButtonVariant2 = getAlertButtonVariant;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = importDefault(6) /* metro dependency 6 */;
const env0_5 = importDefault(7) /* metro dependency 7 */;
const env0_6 = importDefault(15) /* metro dependency 15 */;
const env0_7 = importDefault(17) /* metro dependency 17 */;
const env0_8 = importDefault(18) /* metro dependency 18 */;
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_10 = value2.View;
const StyleSheet = value2.StyleSheet;
const env0_11 = value2.ScrollView;
const value3 = require(33) /* metro dependency 33 */;
const env0_12 = value3.jsx;
const env0_13 = value3.jsxs;
const env0_14 = value3.Fragment;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createLegacyClassComponentStyles = createStylesModule.createLegacyClassComponentStyles;
object3 = {};
const object5 = {};
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object5.padding = 16;
let value = ReactModule;
const StyleSheet = ReactNativeModule.StyleSheet;
const createLegacyClassComponentStyles = CreateStylesModule.createLegacyClassComponentStyles;
object = {};
const object2 = {};
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object2.padding = 16;
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object5.backgroundColor = BACKGROUND_BASE_LOW;
object3.alert = object5;
object2.backgroundColor = BACKGROUND_BASE_LOW;
object.alert = object2;
const MOBILE_TEXT_HEADING_PRIMARY = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_TEXT_HEADING_PRIMARY;
object3.titleText = {marginBottom: 16, color: MOBILE_TEXT_HEADING_PRIMARY};
const object6 = {};
object6.height = StyleSheet.hairlineWidth;
object.titleText = {marginBottom: 16, color: MOBILE_TEXT_HEADING_PRIMARY};
const object4 = {};
object4.height = StyleSheet.hairlineWidth;
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object6.backgroundColor = BORDER_SUBTLE;
object3.divider = object6;
object4.backgroundColor = BORDER_SUBTLE;
object.divider = object4;
const TEXT_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_STRONG;
object3.body = {marginTop: 16, color: TEXT_STRONG};
object3.buttons = {marginTop: 24};
object3.cancelButton = {marginTop: 8};
object3.secondaryConfirm = {'marginTop': 16, 'alignSelf': 'center'};
const object7 = {};
object7.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object3.gradient = object7;
const env0_15 = Reflect.apply(createLegacyClassComponentStyles, createStylesModule, [object3]);
object.body = {marginTop: 16, color: TEXT_STRONG};
object.buttons = {marginTop: 24};
object.cancelButton = {marginTop: 8};
object.secondaryConfirm = {'marginTop': 16, 'alignSelf': 'center'};
const object8 = {};
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object.gradient = object8;
const env0_15 = Reflect.apply(createLegacyClassComponentStyles, CreateStylesModule, [object]);
const PureComponent = value.PureComponent;
const value5 = _fun38951(PureComponent);
const ThemeContext = (require(3868) /* metro dependency 3868: native */).ThemeContext;
const ThemeContext = (NativeModule2).ThemeContext;
value5.contextType = ThemeContext;
const ButtonColors = (require(1305) /* metro dependency 1305: native */).ButtonColors;
const ButtonColors = (NativeModule).ButtonColors;
const BRAND = ButtonColors.BRAND;
value5.defaultProps = {confirmColor: BRAND, autoCloseOnConfirm: true};
value = value.memo(_fun38967);
value.Colors = ButtonColors;
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/common/Alert.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/common/Alert.tsx');
exports.default = value;
exports.getAlertButtonVariant = closure;
}
function _isNativeReflectConstruct_38947() { // fn#38947, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4774:247, offset: 0x010d2041, size: 94 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_38947_isNativeReflectConstruct = function() {
return !!result;
})();
}
function getAlertButtonVariant(a0) { // fn#38950, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4774:940, offset: 0x010d209f, size: 249 bytes, params: 2, frame: 14
const ButtonColors = (require(1305) /* metro dependency 1305: native */).ButtonColors;
const GREEN = ButtonColors.GREEN;
if (GREEN === a0) {
return 'active';
}
const RED = ButtonColors.RED;
if (RED === a0) {
return 'destructive';
}
const GREY = ButtonColors.GREY;
if (GREY === a0) {
return 'secondary';
}
const LIGHTGREY = ButtonColors.LIGHTGREY;
if (LIGHTGREY === a0) {
return 'secondary';
}
const TRANSPARENT = ButtonColors.TRANSPARENT;
if (TRANSPARENT === a0) {
return 'secondary';
}
const WHITE = ButtonColors.WHITE;
if (WHITE === a0) {
return 'primary-overlay';
}
return 'primary';
}
function _fun38951(a0) { // fn#38951, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4774:1297, offset: 0x010d2198, size: 233 bytes, params: 2, frame: 16
const closure = Alert_38952;
env0_8(closure, a0);
return env0_5(closure, [{key: 'componentDidMount', value: function() {
var env0_0 = this;
if (this.titleRef.current != null) {
global.setImmediate(_fun38958);
exports.getAlertButtonVariant = getAlertButtonVariant2;
function _isNativeReflectConstruct_38947() { // fn#38947, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4774:247, offset: 0x010d2041, size: 94 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
}}, {key: 'componentWillUnmount', value: function() {
this.timeout.stop();
this.focusTimeout.stop();
}}, {key: 'componentDidUpdate', value: function() {
var confirming = this.props.confirming;
if (confirming != null) {
this.timeout.stop();
this.setState({confirming: confirming});
return (_isNativeReflectConstruct_38947_isNativeReflectConstruct = function() {
return !!result;
})();
}
function getAlertButtonVariant(a0) { // fn#38950, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4774:940, offset: 0x010d209f, size: 249 bytes, params: 2, frame: 14
const ButtonColors = (NativeModule).ButtonColors;
const GREEN = ButtonColors.GREEN;
if (GREEN === a0) {
return 'active';
}
}}, {key: 'renderHeader', value: value_38962}, {key: 'renderBody', value: value_38963}, {key: 'renderButtons',
value: value_38964}, {key: 'renderFooter', value: value_38965}, {key: 'render', value: value_38966}]);
}
function _fun38967(a0) { // fn#38967, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4774:4837, offset: 0x010d2b18, size: 182 bytes, params: 2, frame: 19
const value2 = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)();
const value3 = (require(8750) /* metro dependency 8750: useIsScreenLandscapeNative */).useIsScreenLandscape();
const Math = global.Math;
const min = Math.min;
const Math2 = global.Math;
return ((Component) => <Component width={Reflect.apply(min, Math, [0.9 * Math2.min(value2.width, value2.height),
400])} contentHeight={0.7 * value2.height} isLandscape={value3} {...a0} />)(env0_16);
}
function Alert_38952(a0) { // fn#38952, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4774:1309, offset: 0x010d2281, size: 325 bytes, params: 2, frame: 21
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_4;
binding(this, Alert_38952);
const items = [];
arraySpread(items, value, 0, items);
value = env1_7(Alert_38952);
binding = env1_6;
if (_isNativeReflectConstruct_38947()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items, env1_7(this).constructor);
r0 = value;
} else {
value = value.apply(this, items);
r0 = value;
}
value = binding(this, r0);
value.titleRef = env1_9.createRef();
value.state = {confirming: false};
value.renderContent = (importAll(4597) /* metro dependency 4597: CustomMarkupNative */).getParser();
const Timeout = (require(4041) /* metro dependency 4041: Timers */).Timeout;
const value4 = Object.create(Timeout.prototype, {constructor: {value: Timeout}});
let timeout = new Timeout();
value.timeout = timeout instanceof Object ? timeout : value4;
const value6 = Object.create(Timeout.prototype, {constructor: {value: Timeout}});
timeout = new Timeout();
value.focusTimeout = timeout instanceof Object ? timeout : value6;
value.handleConfirm = handleConfirm_38953;
value.handleCancel = handleCancel_38955;
value.handleSecondaryConfirm = handleSecondaryConfirm;
return value;
}
function value_38957() { // fn#38957, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4774:2143, offset: 0x010d24ca, size: 50 bytes, params: 1, frame: 11
if (this.titleRef.current != null) {
global.setImmediate(_fun38958);
}
}
function value_38962() { // fn#38962, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4774:2548, offset: 0x010d25bf, size: 219 bytes, params: 1, frame: 24
const value = environment.__proto__;
const value2 = env1_15(this.context);
const title = this.props.title;
const value3 = null;
return value3 == title || title === '' ? value3 : <View>{((Text) => <Text ref={this.titleRef} accessible accessibilityRole="header" variant="heading-md/extrabold" color="text-default" style={value2.titleText}>{typeof title !== 'string' ? title : this.renderContent(title)}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}<View style={value2.divider} /></View>;
}
function value_38963() { // fn#38963, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4774:2895, offset: 0x010d269a, size: 206 bytes, params: 1, frame: 25
const value = environment.__proto__;
const value2 = env1_15(this.context);
const {body, children} = this.props;
const jsxRuntimeEnv1_14Binding = jsxRuntimeEnv1_14;
const value3 = null;
return (
<>
{value3 != body ? <ScrollView style={{maxHeight: this.props.contentHeight}}>{((Text) => <Text variant="text-md/normal" style={value2.body}>{typeof body !== 'string' ? body : this.renderContent(body)}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}</ScrollView> : value3}
{children}
</>
);
}
function value_38964() { // fn#38964, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4774:3200, offset: 0x010d2768, size: 607 bytes, params: 1, frame: 31
var r16;
var r7;
var r6;
var r8;
var r14;
var r15;
var r0;
var intl;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
let value = environment.__proto__;
const binding = env1_15;
const context = this.context;
const value2 = undefined;
const value3 = binding(context);
const props = this.props;
const cancelText = props.cancelText;
const confirmText = props.confirmText;
if (value2 !== confirmText) {
r16 = confirmText;
} else {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r16 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.BddRzS);
}
const confirmColor = props.confirmColor;
const secondaryConfirmText = props.secondaryConfirmText;
const noDefaultButtons = props.noDefaultButtons;
const renderConfirmIcon = props.renderConfirmIcon;
const renderConfirmRightIcon = props.renderConfirmRightIcon;
const renderConfirmButton = props.renderConfirmButton;
const isConfirmButtonDisabled = props.isConfirmButtonDisabled;
const confirming = this.state.confirming;
const value5 = null;
if (noDefaultButtons) {
r0 = value5;
} else {
r7 = value5 != cancelText ? <View style={value3.cancelButton}><Button variant="secondary" onPress={this.handleCancel} text={cancelText} /></View> : value2;
if (value5 != secondaryConfirmText) {
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
r6 = <PressableOpacity accessibilityRole="button" style={value3.secondaryConfirm} onPress={this.handleSecondaryConfirm}>{((Text) => <Text variant="text-sm/semibold" color="text-link">{secondaryConfirmText}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}</PressableOpacity>;
} else {
r6 = value2;
const RED = ButtonColors.RED;
if (RED === a0) {
return 'destructive';
}
var viewBindingProps = {style: value3.buttons};
r8 = value5 == renderConfirmButton ? value2 : renderConfirmButton();
if (value5 == r8) {
var buttonProps = {variant: getAlertButtonVariant(confirmColor), onPress: this.handleConfirm, text: r16,
loading: confirming};
value = value5 != isConfirmButtonDisabled;
r14 = value && isConfirmButtonDisabled;
buttonProps.disabled = r14;
r15 = value5 == renderConfirmIcon ? value2 : renderConfirmIcon();
r15 = value5 == r15 ? value5 == renderConfirmRightIcon ? value2 : renderConfirmRightIcon() : r15;
r14 = value5 != r15 ? r15 : value2;
buttonProps.icon = r14;
value = 'start';
buttonProps.iconPosition = value5 != renderConfirmIcon ? value : value5 != renderConfirmRightIcon ? 'end' : value2;
value = <Button {...buttonProps} />;
r8 = value;
const GREY = ButtonColors.GREY;
if (GREY === a0) {
return 'secondary';
}
value = <View {...viewBindingProps}>{r8}{r7}{r6}</View>;
r0 = value;
const LIGHTGREY = ButtonColors.LIGHTGREY;
if (LIGHTGREY === a0) {
return 'secondary';
}
const TRANSPARENT = ButtonColors.TRANSPARENT;
if (TRANSPARENT === a0) {
return 'secondary';
}
const WHITE = ButtonColors.WHITE;
if (WHITE === a0) {
return 'primary-overlay';
}
return 'primary';
}
return r0;
}
function value_38965() { // fn#38965, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4774:4225, offset: 0x010d29c7, size: 50 bytes, params: 1, frame: 14
var r0;
const footer = this.props.footer;
let value = null;
if (value == footer) {
r0 = value;
} else {
value = environment.__proto__;
value = <View>{footer}</View>;
r0 = value;
}
return r0;
}
function value_38966() { // fn#38966, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4774:4320, offset: 0x010d29f9, size: 287 bytes, params: 1, frame: 24
const value = environment.__proto__;
const value2 = env1_15(this.context);
const {style, width, isLandscape, onClose} = this.props;
const jsxRuntimeEnv1_14Binding = jsxRuntimeEnv1_14;
const value3 = ((Component) => <Component absolute componentStyles={value2.gradient} />)(importDefault(7704) /* metro dependency 7704: ThemedGradient */);
const items2 = [value2.alert, style];
items2[2] = {width: width};
const items3 = [this.renderHeader()];
items3[1] = this.renderBody();
items3[2] = this.renderButtons();
items3[3] = this.renderFooter();
const fragment = <>{value3}<View onAccessibilityEscape={onClose} style={items2}>{items3}</View></>;
return isLandscape ? <ScrollView style={{maxHeight: width}}>{fragment}</ScrollView> : fragment;
}
function Alert_38952HandleConfirm() { // fn#38953, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4774:1681, owner: Alert_38952.handleConfirm, offset: 0x010d23c6, size: 129 bytes, params: 1, frame: 16
var binding;
var props;
var onClose;
var onConfirm;
var autoCloseOnConfirm;
if (!env0_0.state.confirming) {
binding = env0_0;
props = binding.props;
onClose = props.onClose;
onConfirm = props.onConfirm;
autoCloseOnConfirm = props.autoCloseOnConfirm;
binding.setState({confirming: true});
binding.timeout.start(500, _fun38954);
if (autoCloseOnConfirm) {
if (onClose != null) {
onClose();
function _fun38951(a0) { // fn#38951, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4774:1297, offset: 0x010d2198, size: 233 bytes, params: 2, frame: 16
const Alert_389522 = Alert_38952;
Inherits(Alert_389522, a0);
return CreateClass(Alert_389522, [{key: 'componentDidMount', value: function() {
var env0_0 = this;
if (this.titleRef.current != null) {
global.setImmediate(_fun38958);
}
}}, {key: 'componentWillUnmount', value: function() {
this.timeout.stop();
this.focusTimeout.stop();
}}, {key: 'componentDidUpdate', value: function() {
var confirming = this.props.confirming;
if (confirming != null) {
this.timeout.stop();
this.setState({confirming: confirming});
}
}}, {key: 'renderHeader', value: value_38962}, {key: 'renderBody', value: value_38963}, {key: 'renderButtons',
value: value_38964}, {key: 'renderFooter', value: value_38965}, {key: 'render', value: value_38966}]);
function Alert_38952(a0) { // fn#38952, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4774:1309, offset: 0x010d2281, size: 325 bytes, params: 2, frame: 21
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_4;
binding(this, Alert_38952);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_7(Alert_38952);
binding = env1_6;
if (_isNativeReflectConstruct_38947()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_7(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
value.titleRef = env1_9.createRef();
value.state = {confirming: false};
value.renderContent = (importAll(4597) /* metro dependency 4597: CustomMarkupNative */).getParser();
const Timeout = (TimersModule).Timeout;
const value4 = Object.create(Timeout.prototype, {constructor: {value: Timeout}});
let timeout = new Timeout();
value.timeout = timeout instanceof Object ? timeout : value4;
const value6 = Object.create(Timeout.prototype, {constructor: {value: Timeout}});
timeout = new Timeout();
value.focusTimeout = timeout instanceof Object ? timeout : value6;
value.handleConfirm = handleConfirm;
value.handleCancel = handleCancel;
value.handleSecondaryConfirm = handleSecondaryConfirm;
return value;
function handleConfirm() { // fn#38953, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4774:1681, owner: Alert_38952.handleConfirm, offset: 0x010d23c6, size: 129 bytes, params: 1, frame: 16
var binding;
var props;
var onClose;
var onConfirm;
var autoCloseOnConfirm;
if (!env0_0.state.confirming) {
binding = env0_0;
props = binding.props;
onClose = props.onClose;
onConfirm = props.onConfirm;
autoCloseOnConfirm = props.autoCloseOnConfirm;
binding.setState({confirming: true});
binding.timeout.start(500, _fun38954);
if (autoCloseOnConfirm) {
if (onClose != null) {
onClose();
}
}
if (onConfirm != null) {
onConfirm();
}
}
function _fun38954() { // fn#38954, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4774:1822, offset: 0x010d2447, size: 31 bytes, params: 1, frame: 12
env1_0.setState({confirming: false});
}
}
function handleCancel() { // fn#38955, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4774:1906, owner: Alert_38952.handleCancel, offset: 0x010d2466, size: 50 bytes, params: 1, frame: 11
const {onClose, onCancel} = env0_0.props;
if (onCancel != null) {
onCancel();
}
if (onClose != null) {
onClose();
}
}
function handleSecondaryConfirm() { // fn#38956, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4774:2002, owner: Alert_38952.handleSecondaryConfirm, offset: 0x010d2498, size: 50 bytes, params: 1, frame: 11
const {onClose, onConfirmSecondary} = env0_0.props;
if (onClose != null) {
onClose();
}
if (onConfirmSecondary != null) {
onConfirmSecondary();
}
}
}
if (onConfirm != null) {
onConfirm();
function value_38957() { // fn#38957, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4774:2143, offset: 0x010d24ca, size: 50 bytes, params: 1, frame: 11
if (this.titleRef.current != null) {
global.setImmediate(_fun38958);
}
function _fun38958() { // fn#38958, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4774:2197, offset: 0x010d24fc, size: 41 bytes, params: 1, frame: 13
env0_0.focusTimeout.start(300, _fun38959);
function _fun38959() { // fn#38959, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4774:2231, offset: 0x010d2525, size: 57 bytes, params: 1, frame: 13
const value = environment.__proto__.__proto__.__proto__;
(SetAccessibilityFocusAndroidModule).setAccessibilityFocus({ref: env1_0.titleRef});
}
}
}
function value_38962() { // fn#38962, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4774:2548, offset: 0x010d25bf, size: 219 bytes, params: 1, frame: 24
const value = environment.__proto__;
const value2 = env1_15(this.context);
const title = this.props.title;
const value3 = null;
return (
value3 == title || title === ''
? value3
: (
<View>
{((Text) => <Text ref={this.titleRef} accessible accessibilityRole="header" variant="heading-md/extrabold" color="text-default" style={value2.titleText}>{typeof title !== 'string' ? title : this.renderContent(title)}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}
<View style={value2.divider} />
</View>
)
);
}
function value_38963() { // fn#38963, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4774:2895, offset: 0x010d269a, size: 206 bytes, params: 1, frame: 25
const value = environment.__proto__;
const value2 = env1_15(this.context);
const {body, children} = this.props;
const jsxRuntimeEnv1_14Binding = jsxRuntimeEnv1_14;
const value3 = null;
return (
<>
{
value3 != body
? (
<ScrollView style={{maxHeight: this.props.contentHeight}}>
{((Text) => <Text variant="text-md/normal" style={value2.body}>{typeof body !== 'string' ? body : this.renderContent(body)}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}
</ScrollView>
)
: value3
}
{children}
</>
);
}
function value_38964() { // fn#38964, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4774:3200, offset: 0x010d2768, size: 607 bytes, params: 1, frame: 31
var r16;
var r7;
var r6;
var r8;
var r14;
var r15;
var r0;
var intl;
const Button = (ButtonNativeModule).Button;
let value = environment.__proto__;
const binding = env1_15;
const context = this.context;
const value2 = undefined;
const value3 = binding(context);
const props = this.props;
const cancelText = props.cancelText;
const confirmText = props.confirmText;
if (value2 !== confirmText) {
r16 = confirmText;
} else {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r16 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.BddRzS);
}
const confirmColor = props.confirmColor;
const secondaryConfirmText = props.secondaryConfirmText;
const noDefaultButtons = props.noDefaultButtons;
const renderConfirmIcon = props.renderConfirmIcon;
const renderConfirmRightIcon = props.renderConfirmRightIcon;
const renderConfirmButton = props.renderConfirmButton;
const isConfirmButtonDisabled = props.isConfirmButtonDisabled;
const confirming = this.state.confirming;
const value5 = null;
if (noDefaultButtons) {
r0 = value5;
} else {
r7 = (
value5 != cancelText
? (
<View style={value3.cancelButton}>
<Button
variant="secondary"
onPress={this.handleCancel}
text={cancelText}
/>
</View>
)
: value2
);
if (value5 != secondaryConfirmText) {
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
r6 = (
<PressableOpacity
accessibilityRole="button"
style={value3.secondaryConfirm}
onPress={this.handleSecondaryConfirm}
>
{((Text) => <Text variant="text-sm/semibold" color="text-link">{secondaryConfirmText}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}
</PressableOpacity>
);
} else {
r6 = value2;
}
var viewBindingProps = {style: value3.buttons};
r8 = value5 == renderConfirmButton ? value2 : renderConfirmButton();
if (value5 == r8) {
var buttonProps = {variant: getAlertButtonVariant(confirmColor), onPress: this.handleConfirm, text: r16,
loading: confirming};
value = value5 != isConfirmButtonDisabled;
r14 = value && isConfirmButtonDisabled;
buttonProps.disabled = r14;
r15 = value5 == renderConfirmIcon ? value2 : renderConfirmIcon();
r15 = value5 == r15 ? value5 == renderConfirmRightIcon ? value2 : renderConfirmRightIcon() : r15;
r14 = value5 != r15 ? r15 : value2;
buttonProps.icon = r14;
value = 'start';
buttonProps.iconPosition = value5 != renderConfirmIcon ? value : value5 != renderConfirmRightIcon ? 'end' : value2;
value = <Button {...buttonProps} />;
r8 = value;
}
value = (
<View {...viewBindingProps}>
{r8}
{r7}
{r6}
</View>
);
r0 = value;
}
return r0;
}
function value_38965() { // fn#38965, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4774:4225, offset: 0x010d29c7, size: 50 bytes, params: 1, frame: 14
var r0;
const footer = this.props.footer;
let value = null;
if (value == footer) {
r0 = value;
} else {
value = environment.__proto__;
value = (
<View>
{footer}
</View>
);
r0 = value;
}
return r0;
}
function value_38966() { // fn#38966, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4774:4320, offset: 0x010d29f9, size: 287 bytes, params: 1, frame: 24
const value = environment.__proto__;
const value2 = env1_15(this.context);
const {style, width, isLandscape, onClose} = this.props;
const jsxRuntimeEnv1_14Binding = jsxRuntimeEnv1_14;
const value3 = ((Component) => <Component absolute componentStyles={value2.gradient} />)(ThemedGradient);
const items2 = [value2.alert, style];
items2[2] = {width: width};
const items3 = [this.renderHeader()];
items3[1] = this.renderBody();
items3[2] = this.renderButtons();
items3[3] = this.renderFooter();
const fragment = (
<>
{value3}
<View onAccessibilityEscape={onClose} style={items2}>
{items3}
</View>
</>
);
return (
isLandscape
? (
<ScrollView style={{maxHeight: width}}>
{fragment}
</ScrollView>
)
: fragment
);
}
}
}
function Alert_38952HandleCancel() { // fn#38955, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4774:1906, owner: Alert_38952.handleCancel, offset: 0x010d2466, size: 50 bytes, params: 1, frame: 11
const {onClose, onCancel} = env0_0.props;
if (onCancel != null) {
onCancel();
}
if (onClose != null) {
onClose();
function _fun38967(a0) { // fn#38967, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4774:4837, offset: 0x010d2b18, size: 182 bytes, params: 2, frame: 19
const value2 = (UseWindowDimensionsNative)();
const value3 = (UseIsScreenLandscapeNativeModule).useIsScreenLandscape();
const Math = global.Math;
const min = Math.min;
const Math2 = global.Math;
return ((Component) => <Component width={Reflect.apply(min, Math, [0.9 * Math2.min(value2.width, value2.height),
400])} contentHeight={0.7 * value2.height} isLandscape={value3} {...a0} />)(env0_16);
}
}
function handleSecondaryConfirm() { // fn#38956, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4774:2002, owner: Alert_38952.handleSecondaryConfirm, offset: 0x010d2498, size: 50 bytes, params: 1, frame: 11
const {onClose, onConfirmSecondary} = env0_0.props;
if (onClose != null) {
onClose();
}
if (onConfirmSecondary != null) {
onConfirmSecondary();
}
}
function _fun38958() { // fn#38958, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4774:2197, offset: 0x010d24fc, size: 41 bytes, params: 1, frame: 13
env0_0.focusTimeout.start(300, _fun38959);
}
function _fun38954() { // fn#38954, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4774:1822, offset: 0x010d2447, size: 31 bytes, params: 1, frame: 12
env1_0.setState({confirming: false});
}
function _fun38959() { // fn#38959, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4774:2231, offset: 0x010d2525, size: 57 bytes, params: 1, frame: 13
const value = environment.__proto__.__proto__.__proto__;
(require(4570) /* metro dependency 4570: setAccessibilityFocusAndroid */).setAccessibilityFocus({ref: env1_0.titleRef});
}
global.__d(_fun38946, 4596, [6, 7, 15, 17, 18, 31, 27, 33, 4501, 697, 1305, 4597, 4041, 4570, 4573, 1244, 4578,
5278, 7704, 3868, 1478, 8750,
2]) /* metro module 4596, dependencies: [6, 7, 15, 17, 18, 31, 27, 33, 4501, 697, 1305, 4597, 4041, 4570, 4573, 1244, 4578, 5278, 7704, 3868, 1478, 8750, 2] */;
+280 -259
View File
@@ -1,294 +1,315 @@
/* Metro module 15268; source: components_native/common/Alerts.tsx; dependencies: [6, 7, 15, 17, 18, 31, 27, 4502, 12598, 12951, 9536, 9878, 33, 15269, 15270, 15274, 15275, 4501, 697, 4496, 4555, 5467, 3868, 566, 628, 4571, 11206, 1305, 2] */
import ClassCallCheck from '../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import Native from '../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import AccessibilityStore from '../../modules/a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */
import UseBackPressHandler from '../../modules/routing/native/useBackPressHandler.tsx'; /* Metro dependency 4571 */
import KeyboardAwareView from '../../modules/keyboard/native/KeyboardAwareView.tsx'; /* Metro dependency 5467 */
import SurveyStore from '../../stores/SurveyStore.tsx'; /* Metro dependency 9536 */
import AlertStore from '../../stores/native/AlertStore.tsx'; /* Metro dependency 9878 */
import PermissionSpeakStore from '../../stores/PermissionSpeakStore.tsx'; /* Metro dependency 12598 */
import PermissionVADStore from '../../stores/PermissionVADStore.tsx'; /* Metro dependency 12951 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as FluxModule from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as NativeModule from '../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as NativeModule2 from '../../external/discord_common/js/packages/design/native.tsx'; /* Metro dependency 3868 */
import * as CreateStylesModule from '../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as DialogNativeModule from '../../design/components/Dialog/native/Dialog.native.tsx'; /* Metro dependency 4555 */
import * as TransitionGroupModule from '../../external/discord_common/js/packages/transition-group/TransitionGroup.tsx'; /* Metro dependency 11206 */
function _fun116729(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116729, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15465:6, offset: 0x024950a6, size: 776 bytes, params: 8, frame: 26
const env0_0 = require;
let Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const StyleSheet = value2.StyleSheet;
const env0_10 = value2.Animated;
const env0_11 = value2.Easing;
const env0_12 = value2.TouchableWithoutFeedback;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const permissionSpeakStore = importDefault(12598) /* metro dependency 12598: PermissionSpeakStore */;
const permissionVADStore = importDefault(12951) /* metro dependency 12951: PermissionVADStore */;
const surveyStore = importDefault(9536) /* metro dependency 9536: SurveyStore */;
const alertStore = importDefault(9878) /* metro dependency 9878: AlertStore */;
const value6 = require(33) /* metro dependency 33 */;
const env0_18 = value6.jsx;
const env0_19 = value6.jsxs;
const value9 = new (importDefault(15269) /* metro dependency 15269: ModalRegistry */)([{stores: [permissionSpeakStore],
let value = ReactModule;
const StyleSheet = ReactNativeModule.StyleSheet;
const value9 = new (importDefault(15269) /* metro dependency 15269: ModalRegistry */)([{stores: [PermissionSpeakStore],
center: true, isOpen: function() {
return PermissionSpeakStore.shouldShowWarning();
}, getComponent: function() {
return require(dependencyMap[14]).default;
}}, {stores: [permissionVADStore], center: true, isOpen: function() {
}}, {stores: [PermissionVADStore], center: true, isOpen: function() {
return PermissionVADStore.shouldShowWarning();
}, getComponent: function() {
return require(dependencyMap[15]).default;
}}, {stores: [surveyStore], center: true, isOpen: isOpen_116737, getComponent: function() {
}}, {stores: [SurveyStore], center: true, isOpen: isOpen_116737, getComponent: function() {
return require(dependencyMap[16]).default;
}}]);
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createLegacyClassComponentStyles = createStylesModule.createLegacyClassComponentStyles;
const object = {};
copyDataProperties(object, StyleSheet.absoluteFillObject, undefined);
const BACKGROUND_SCRIM = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SCRIM;
object['backgroundColor'] = BACKGROUND_SCRIM;
object['justifyContent'] = 'center';
object['alignItems'] = 'center';
const env0_21 = Reflect.apply(createLegacyClassComponentStyles, createStylesModule, [{alertWrapper: object,
const createLegacyClassComponentStyles = CreateStylesModule.createLegacyClassComponentStyles;
const object2 = {};
copyDataProperties(object2, StyleSheet.absoluteFillObject, undefined);
const BACKGROUND_SCRIM = (Native).colors.BACKGROUND_SCRIM;
object2['backgroundColor'] = BACKGROUND_SCRIM;
object2['justifyContent'] = 'center';
object2['alignItems'] = 'center';
const env0_21 = Reflect.apply(createLegacyClassComponentStyles, CreateStylesModule, [{alertWrapper: object2,
alertContentWrapper: {'display': 'flex', 'alignItems': 'center', 'justifyContent': 'center',
'height': '100%'}}]);
const PureComponent = value.PureComponent;
const value12 = _fun116739(PureComponent);
const ThemeContext = (require(3868) /* metro dependency 3868: native */).ThemeContext;
const ThemeContext = (NativeModule2).ThemeContext;
value12.contextType = ThemeContext;
Object = global.Object;
const env0_23 = Object.freeze({renderAlert: undefined, renderKey: undefined, props: undefined});
value = value.memo(Alerts);
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/common/Alerts.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/common/Alerts.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_116730() { // fn#116730, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15465:316, offset: 0x024953ae, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_116730_isNativeReflectConstruct = function() {
return !!result;
})();
}
function isOpen_116737() { // fn#116737, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15465:739, offset: 0x02495436, size: 25 bytes, params: 1, frame: 9
return SurveyStore.getCurrentSurvey() != null;
}
function _fun116739(a0) { // fn#116739, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15465:1083, offset: 0x0249544f, size: 72 bytes, params: 2, frame: 15
const closure = AlertWrapper;
env0_7(closure, a0);
return env0_4(closure, [{key: 'render', value: value_116745}]);
}
function Alerts() { // fn#116746, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15465:2861, offset: 0x0249591f, size: 401 bytes, params: 1, frame: 23
const binding = env0_8;
const env0_0 = binding.useRef(env0_23);
const value2 = undefined;
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStoresObject = fluxModule.useStateFromStoresObject;
const items = [AlertStore];
const binding2 = env0_20;
arraySpread(items, binding2.getStores(), 1, binding2);
const value4 = Reflect.apply(useStateFromStoresObject, fluxModule, [items, _fun116747]);
binding.useEffect(_fun116749);
const value5 = fluxModule.useStateFromStores([AlertStore], function() {
return AlertStore.isAlertDismissable();
});
const useReducedMotion = fluxModule.useStateFromStores([AccessibilityStore], function() {
return AccessibilityStore.useReducedMotion;
});
const renderAlert = value4.renderAlert;
const renderKey = value4.renderKey;
const useCallback = binding.useCallback;
(importDefault(4571) /* metro dependency 4571: useBackPressHandler */)(Reflect.apply(useCallback, binding,
[_fun116752, [renderAlert, value5]]));
const r4 = renderAlert != null ? ((Component) => <Component isDismissable={value5} renderAlert={renderAlert} renderKey={renderKey} useReducedMotion={useReducedMotion} key={renderKey} />)(env0_22) : value2;
const TransitionGroup = (require(11206) /* metro dependency 11206: TransitionGroup */).TransitionGroup;
const TransitionGroupOverlayView = (require(1305) /* metro dependency 1305: native */).TransitionGroupOverlayView;
return (
<TransitionGroup component={TransitionGroupOverlayView} style={StyleSheet.absoluteFill}>
{r4}
</TransitionGroup>
);
}
function AlertWrapper(a0) { // fn#116740, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15465:1095, offset: 0x02495497, size: 283 bytes, params: 2, frame: 22
const value = 0;
const value2 = copyRestArgs(value, undefined);
env1_3(this, AlertWrapper);
let object = [];
arraySpread(object, value2, value, object);
const value5 = env1_6(AlertWrapper);
const value8 = env1_5(this, _isNativeReflectConstruct_116730() ? global.Reflect.construct(value5, object,
env1_6(this).constructor) : value5.apply(this, object));
object = {};
let Value = Animated.Value;
const value9 = Object.create(Value.prototype, {constructor: {value: Value}});
const value10 = new Value(value);
object.opacity = value10 instanceof Object ? value10 : value9;
Value = Animated.Value;
object.scale = new Value(value8.props.useReducedMotion ? 1 : value);
value8.state = object;
value8.componentDidAppear = componentDidAppear_116741;
value8.componentWillEnter = componentWillEnter;
value8.componentWillLeave = componentWillLeave_116743;
value8.handleRequestClose = handleRequestClose;
return value8;
}
function value_116745() { // fn#116745, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15465:2106, offset: 0x024957a0, size: 383 bytes, params: 1, frame: 27
let value = environment.__proto__;
const value2 = env1_21(this.context);
let props = this.props;
const r4 = props.renderKey ?? 'alerts-component';
props = this.props;
const renderAlert = props.renderAlert;
let object2 = {};
object2.onClose = (importDefault(4496) /* metro dependency 4496: AlertActionCreators */).close;
const value4 = Reflect.apply(renderAlert, props, [object2]);
const {opacity, scale} = this.state;
const Dialog = (require(4555) /* metro dependency 4555: DialogNative */).Dialog;
object2 = {dialogKey: r4};
let handleRequestClose = this.handleRequestClose;
object2.onDismiss = handleRequestClose;
const KeyboardAwareView = importDefault(5467) /* metro dependency 5467: KeyboardAwareView */;
const items2 = [StyleSheet.absoluteFill];
items2[1] = value2.alertContentWrapper;
handleRequestClose = this.handleRequestClose;
let View = Animated.View;
value = <TouchableWithoutFeedback accessibilityElementsHidden importantForAccessibility="no-hide-descendants" accessibilityRole="none" accessible={false} onPress={handleRequestClose}><View style={[value2.alertWrapper,
this.props.style, {opacity: opacity}]} /></TouchableWithoutFeedback>;
View = Animated.View;
return (
<Dialog {...object2}>
<KeyboardAwareView style={items2}>
{value}
<View style={{transform: [{scale: scale}]}}>
{value4}
</View>
</KeyboardAwareView>
</Dialog>
);
}
function _fun116747() { // fn#116747, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15465:2955, offset: 0x02495ab0, size: 258 bytes, params: 1, frame: 21
var environment;
var r6;
var object2;
var props;
var value4;
const value = environment.__proto__;
const alert = AlertStore.getAlert();
if (alert != null) {
object2 = {renderAlert: alert};
object2.renderKey = AlertStore.getAlertKey();
object2.props = null;
} else {
var openModal = env1_20.getOpenModal();
var env0_0 = openModal;
if (openModal != null) {
props = openModal.props;
value4 = 'alert-registery-' + openModal.key;
r6 = value4 !== env0_0.current.renderKey ? _fun116748 : (importDefault(628) /* metro dependency 628: shallowEqual */)(props,
env0_0.current.props) ? env0_0.current.renderAlert : _fun116748;
props = openModal.props;
return {renderAlert: r6, renderKey: value4, props: props};
function _isNativeReflectConstruct_116730() { // fn#116730, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15465:316, offset: 0x024953ae, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
object2 = {renderAlert: undefined, renderKey: undefined, props: undefined};
return (_isNativeReflectConstruct_116730_isNativeReflectConstruct = function() {
return !!result;
})();
}
return object2;
}
function _fun116749() { // fn#116749, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15465:3365, offset: 0x0106eb4a, size: 21 bytes, params: 1, frame: 2
env0_0.current = env0_1;
}
function _fun116752() { // fn#116752, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15465:3562, offset: 0x02495c0f, size: 63 bytes, params: 1, frame: 12
var value;
const value2 = renderAlert != null;
if (value2 && env0_2) {
value = environment.__proto__;
value = importDefault(4496) /* metro dependency 4496: AlertActionCreators */;
value.close();
function isOpen_116737() { // fn#116737, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15465:739, offset: 0x02495436, size: 25 bytes, params: 1, frame: 9
return SurveyStore.getCurrentSurvey() != null;
}
return value2;
}
function AlertWrapperComponentDidAppear() { // fn#116741, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15465:1419, owner: AlertWrapper.componentDidAppear, offset: 0x024955b2, size: 57 bytes, params: 1, frame: 12
const binding = env0_0;
binding.state.opacity.setValue(1);
binding.state.scale.setValue(1);
}
function _fun116739(a0) { // fn#116739, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15465:1083, offset: 0x0249544f, size: 72 bytes, params: 2, frame: 15
const AlertWrapper2 = AlertWrapper;
Inherits(AlertWrapper2, a0);
return CreateClass(AlertWrapper2, [{key: 'render', value: value_116745}]);
function AlertWrapper(a0) { // fn#116740, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15465:1095, offset: 0x02495497, size: 283 bytes, params: 2, frame: 22
const value = 0;
const value2 = copyRestArgs(value, undefined);
env1_3(this, AlertWrapper);
let object = [];
arraySpread(object, value2, value, object);
const value5 = env1_6(AlertWrapper);
const value8 = env1_5(this, _isNativeReflectConstruct_116730() ? global.Reflect.construct(value5, object,
env1_6(this).constructor) : value5.apply(this, object));
object = {};
let Value = Animated.Value;
const value9 = Object.create(Value.prototype, {constructor: {value: Value}});
const value10 = new Value(value);
object.opacity = value10 instanceof Object ? value10 : value9;
Value = Animated.Value;
object.scale = new Value(value8.props.useReducedMotion ? 1 : value);
value8.state = object;
value8.componentDidAppear = componentDidAppear_116741;
value8.componentWillEnter = componentWillEnter;
value8.componentWillLeave = componentWillLeave_116743;
value8.handleRequestClose = handleRequestClose;
return value8;
function AlertWrapperComponentDidAppear() { // fn#116741, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15465:1419, owner: AlertWrapper.componentDidAppear, offset: 0x024955b2, size: 57 bytes, params: 1, frame: 12
const binding = env0_0;
binding.state.opacity.setValue(1);
binding.state.scale.setValue(1);
}
function componentWillEnter(a0) { // fn#116742, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15465:1500, owner: AlertWrapper.componentWillEnter, offset: 0x024955eb, size: 175 bytes, params: 2, frame: 17
const value = environment.__proto__.__proto__;
const timing = Animated.timing;
const binding = env0_0;
const opacity = binding.state.opacity;
let object = {'toValue': 1, 'easing': null, 'duration': 250, 'useNativeDriver': true};
object.easing = Easing.linear;
object = [Reflect.apply(timing, Animated, [opacity, object])];
if (!binding.props.useReducedMotion) {
object.push(Animated.spring(env0_0.state.scale, {'toValue': 1, 'useNativeDriver': true}));
}
Animated.parallel(object).start(a0);
}
function AlertWrapperComponentWillLeave(a0) { // fn#116743, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15465:1732, owner: AlertWrapper.componentWillLeave, offset: 0x0249569a, size: 202 bytes, params: 2, frame: 19
var push;
var scale;
var object2;
const value = environment.__proto__.__proto__;
let timing = Animated.timing;
const binding = env0_0;
const opacity = binding.state.opacity;
let object = {'toValue': 0, 'easing': null, 'duration': 100, 'useNativeDriver': true};
object.easing = Easing.linear;
object = [Reflect.apply(timing, Animated, [opacity, object])];
if (!binding.props.useReducedMotion) {
push = object.push;
timing = Animated.timing;
scale = env0_0.state.scale;
object2 = {'toValue': 0, 'easing': null, 'duration': 100, 'useNativeDriver': true};
object2.easing = Easing.in(Easing.ease);
Reflect.apply(push, object, [Reflect.apply(timing, Animated, [scale, object2])]);
}
Animated.parallel(object).start(a0);
}
function handleRequestClose() { // fn#116744, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15465:1997, owner: AlertWrapper.handleRequestClose, offset: 0x02495764, size: 60 bytes, params: 1, frame: 11
var value;
if (env0_0.props.isDismissable) {
value = environment.__proto__.__proto__;
value = importDefault(4496) /* metro dependency 4496: AlertActionCreators */;
value.close();
}
}
}
function value_116745() { // fn#116745, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15465:2106, offset: 0x024957a0, size: 383 bytes, params: 1, frame: 27
let value = environment.__proto__;
const value2 = env1_21(this.context);
let props = this.props;
const r4 = props.renderKey ?? 'alerts-component';
props = this.props;
const renderAlert = props.renderAlert;
let object = {};
object.onClose = (importDefault(4496) /* metro dependency 4496: AlertActionCreators */).close;
const value4 = Reflect.apply(renderAlert, props, [object]);
const {opacity, scale} = this.state;
const Dialog = (DialogNativeModule).Dialog;
object = {dialogKey: r4};
let handleRequestClose = this.handleRequestClose;
object.onDismiss = handleRequestClose;
const items2 = [StyleSheet.absoluteFill];
items2[1] = value2.alertContentWrapper;
handleRequestClose = this.handleRequestClose;
let View = Animated.View;
value = (
<TouchableWithoutFeedback
accessibilityElementsHidden
importantForAccessibility="no-hide-descendants"
accessibilityRole="none"
accessible={false}
onPress={handleRequestClose}
>
<View style={[value2.alertWrapper, this.props.style, {opacity: opacity}]} />
</TouchableWithoutFeedback>
);
View = Animated.View;
return (
<Dialog {...object}>
<KeyboardAwareView style={items2}>
{value}
<View style={{transform: [{scale: scale}]}}>
{value4}
</View>
</KeyboardAwareView>
</Dialog>
);
}
function componentWillEnter(a0) { // fn#116742, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15465:1500, owner: AlertWrapper.componentWillEnter, offset: 0x024955eb, size: 175 bytes, params: 2, frame: 17
const value = environment.__proto__.__proto__;
const timing = Animated.timing;
const binding = env0_0;
const opacity = binding.state.opacity;
let object = {'toValue': 1, 'easing': null, 'duration': 250, 'useNativeDriver': true};
object.easing = Easing.linear;
object = [Reflect.apply(timing, Animated, [opacity, object])];
if (!binding.props.useReducedMotion) {
object.push(Animated.spring(env0_0.state.scale, {'toValue': 1, 'useNativeDriver': true}));
}
Animated.parallel(object).start(a0);
}
function AlertWrapperComponentWillLeave(a0) { // fn#116743, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15465:1732, owner: AlertWrapper.componentWillLeave, offset: 0x0249569a, size: 202 bytes, params: 2, frame: 19
var push;
var scale;
var object3;
const value = environment.__proto__.__proto__;
let timing = Animated.timing;
const binding = env0_0;
const opacity = binding.state.opacity;
let object = {'toValue': 0, 'easing': null, 'duration': 100, 'useNativeDriver': true};
object.easing = Easing.linear;
object = [Reflect.apply(timing, Animated, [opacity, object])];
if (!binding.props.useReducedMotion) {
push = object.push;
timing = Animated.timing;
scale = env0_0.state.scale;
object3 = {'toValue': 0, 'easing': null, 'duration': 100, 'useNativeDriver': true};
object3.easing = Easing.in(Easing.ease);
Reflect.apply(push, object, [Reflect.apply(timing, Animated, [scale, object3])]);
function Alerts() { // fn#116746, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15465:2861, offset: 0x0249591f, size: 401 bytes, params: 1, frame: 23
const binding = env0_8;
const env0_0 = binding.useRef(env0_23);
const value2 = undefined;
const useStateFromStoresObject = FluxModule.useStateFromStoresObject;
const alertStoreBinding = AlertStore;
const items2 = [alertStoreBinding];
const binding2 = env0_20;
arraySpread(items2, binding2.getStores(), 1, binding2);
const value4 = Reflect.apply(useStateFromStoresObject, FluxModule, [items2, _fun116747]);
binding.useEffect(_fun116749);
const value5 = FluxModule.useStateFromStores([alertStoreBinding], function() {
return AlertStore.isAlertDismissable();
});
const useReducedMotion = FluxModule.useStateFromStores([AccessibilityStore], function() {
return AccessibilityStore.useReducedMotion;
});
const renderAlert = value4.renderAlert;
const renderKey = value4.renderKey;
const useCallback = binding.useCallback;
(UseBackPressHandler)(Reflect.apply(useCallback, binding,
[_fun116752, [renderAlert, value5]]));
const r4 = (
renderAlert != null
? ((Component) => <Component isDismissable={value5} renderAlert={renderAlert} renderKey={renderKey} useReducedMotion={useReducedMotion} key={renderKey} />)(env0_22)
: value2
);
const TransitionGroup = (TransitionGroupModule).TransitionGroup;
const TransitionGroupOverlayView = (NativeModule).TransitionGroupOverlayView;
return (
<TransitionGroup component={TransitionGroupOverlayView} style={StyleSheet.absoluteFill}>
{r4}
</TransitionGroup>
);
function _fun116747() { // fn#116747, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15465:2955, offset: 0x02495ab0, size: 258 bytes, params: 1, frame: 21
var environment;
var r6;
var object;
var props;
var value4;
const value = environment.__proto__;
const alert = AlertStore.getAlert();
if (alert != null) {
object = {renderAlert: alert};
object.renderKey = AlertStore.getAlertKey();
object.props = null;
} else {
var openModal = env1_20.getOpenModal();
var openModal2 = openModal;
if (openModal != null) {
props = openModal.props;
value4 = 'alert-registery-' + openModal.key;
r6 = value4 !== openModal2.current.renderKey ? _fun116748 : (importDefault(628) /* metro dependency 628: shallowEqual */)(props,
openModal2.current.props) ? openModal2.current.renderAlert : _fun116748;
props = openModal.props;
return {renderAlert: r6, renderKey: value4, props: props};
}
object = {renderAlert: undefined, renderKey: undefined, props: undefined};
}
return object;
function _fun116748(a0) { // fn#116748, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15465:3221, offset: 0x02495bb2, size: 57 bytes, params: 2, frame: 15
const binding = env2_8;
const createElement = binding.createElement;
const component = env0_0.component;
const object = {};
copyDataProperties(object, props, copyDataProperties(object, a0, undefined));
return Reflect.apply(createElement, binding, [component, object]);
}
}
function _fun116749() { // fn#116749, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15465:3365, offset: 0x0106eb4a, size: 21 bytes, params: 1, frame: 2
env0_0.current = env0_1;
}
function _fun116752() { // fn#116752, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15465:3562, offset: 0x02495c0f, size: 63 bytes, params: 1, frame: 12
var value;
const value2 = renderAlert != null;
if (value2 && env0_2) {
value = environment.__proto__;
value = importDefault(4496) /* metro dependency 4496: AlertActionCreators */;
value.close();
}
return value2;
}
}
Animated.parallel(object).start(a0);
}
function handleRequestClose() { // fn#116744, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15465:1997, owner: AlertWrapper.handleRequestClose, offset: 0x02495764, size: 60 bytes, params: 1, frame: 11
var value;
if (env0_0.props.isDismissable) {
value = environment.__proto__.__proto__;
value = importDefault(4496) /* metro dependency 4496: AlertActionCreators */;
value.close();
}
}
function _fun116748(a0) { // fn#116748, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15465:3221, offset: 0x02495bb2, size: 57 bytes, params: 2, frame: 15
const binding = env2_8;
const createElement = binding.createElement;
const component = env0_0.component;
const object2 = {};
copyDataProperties(object2, props, copyDataProperties(object2, a0, undefined));
return Reflect.apply(createElement, binding, [component, object2]);
}
global.__d(_fun116729, 15268, [6, 7, 15, 17, 18, 31, 27, 4502, 12598, 12951, 9536, 9878, 33, 15269, 15270, 15274,
15275, 4501, 697, 4496, 4555, 5467, 3868, 566, 628, 4571, 11206, 1305,
2]) /* metro module 15268, dependencies: [6, 7, 15, 17, 18, 31, 27, 4502, 12598, 12951, 9536, 9878, 33, 15269, 15270, 15274, 15275, 4501, 697, 4496, 4555, 5467, 3868, 566, 628, 4571, 11206, 1305, 2] */;
+195 -182
View File
@@ -1,202 +1,215 @@
/* Metro module 7939; source: components_native/common/Carousel.tsx; dependencies: [6, 7, 15, 17, 18, 31, 27, 33, 4501, 697, 1305, 3868, 2] */
import ClassCallCheck from '../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import Native from '../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as NativeModule from '../../external/discord_common/js/packages/design/native.tsx'; /* Metro dependency 3868 */
import * as CreateStylesModule from '../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
function _fun63352(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#63352, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8117:6, offset: 0x01b7bc06, size: 528 bytes, params: 8, frame: 23
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(6) /* metro dependency 6 */;
const env0_3 = importDefault(7) /* metro dependency 7 */;
const env0_4 = importDefault(15) /* metro dependency 15 */;
const env0_5 = importDefault(17) /* metro dependency 17 */;
const env0_6 = importDefault(18) /* metro dependency 18 */;
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_7 = value2.View;
const env0_8 = value2.ScrollView;
const value3 = require(33) /* metro dependency 33 */;
const env0_9 = value3.jsx;
const env0_10 = value3.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createLegacyClassComponentStyles = createStylesModule.createLegacyClassComponentStyles;
object2 = {};
object2.container = {alignItems: 'center'};
object2.carouselContentWrapper = {flexDirection: 'row'};
object2.pageIndicator = {'flexDirection': 'row', 'justifyContent': 'space-around', 'alignItems': 'center'};
const ICON_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.ICON_STRONG;
object2.activeIndicator = {color: ICON_STRONG};
const ICON_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.ICON_SUBTLE;
object2.inactiveIndicator = {color: ICON_SUBTLE};
const env0_11 = Reflect.apply(createLegacyClassComponentStyles, createStylesModule, [object2]);
let value = ReactModule;
const createLegacyClassComponentStyles = CreateStylesModule.createLegacyClassComponentStyles;
object = {};
object.container = {alignItems: 'center'};
object.carouselContentWrapper = {flexDirection: 'row'};
object.pageIndicator = {'flexDirection': 'row', 'justifyContent': 'space-around', 'alignItems': 'center'};
const ICON_STRONG = (Native).colors.ICON_STRONG;
object.activeIndicator = {color: ICON_STRONG};
const ICON_SUBTLE = (Native).colors.ICON_SUBTLE;
object.inactiveIndicator = {color: ICON_SUBTLE};
const env0_11 = Reflect.apply(createLegacyClassComponentStyles, CreateStylesModule, [object]);
let Component = value.Component;
const value5 = _fun63357(Component);
const ThemeContext = (require(3868) /* metro dependency 3868: native */).ThemeContext;
const ThemeContext = (NativeModule).ThemeContext;
value5.contextType = ThemeContext;
value5.defaultProps = {'indicatorSpace': 10, 'indicatorSize': 20};
Component = value.Component;
value = _fun63360(Component);
value.contextType = ThemeContext;
value.defaultProps = {'pageIndictor': true, 'width': 375};
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/common/Carousel.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/common/Carousel.tsx');
exports.default = value;
}
function _callSuper_63353(a0, a1, a2) { // fn#63353, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8117:225, offset: 0x01b7be16, size: 100 bytes, params: 4, frame: 20
var r0;
var Reflect;
let value = a2;
const value3 = env0_5(a1);
const binding = env0_4;
if (_isNativeReflectConstruct_63354()) {
Reflect = global.Reflect;
value = Reflect.construct(value3, value || [], env0_5(a0).constructor);
r0 = value;
} else {
value = value3.apply(a0, value);
r0 = value;
}
return binding(a0, r0);
}
function _isNativeReflectConstruct_63354() { // fn#63354, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8117:356, offset: 0x01b7be7a, size: 94 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_63354_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun63357(a0) { // fn#63357, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8117:870, offset: 0x01b7bed8, size: 68 bytes, params: 2, frame: 15
const closure = PageIndicator;
env0_6(closure, a0);
return env0_3(closure, [{key: 'render', value: value_63359}]);
}
function _fun63360(a0) { // fn#63360, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8117:1483, offset: 0x01b7c02e, size: 68 bytes, params: 2, frame: 15
const closure = Carousel;
env0_6(closure, a0);
return env0_3(closure, [{key: 'render', value: value_63363}]);
}
function PageIndicator() { // fn#63358, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8117:882, offset: 0x01b7bf1c, size: 42 bytes, params: 1, frame: 16
env1_2(this, PageIndicator);
return _callSuper_63353(this, PageIndicator, arguments);
}
function value_63359() { // fn#63359, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8117:1040, offset: 0x01b7bf46, size: 232 bytes, params: 1, frame: 29
var r7;
var r17;
var push;
var jsxRuntimeEnv1_9Binding;
var LegacyText;
var inactiveIndicator;
var activeIndicator;
var value4;
const value2 = env1_11(this.context);
const {count, activeIndex, indicatorSpace, indicatorSize, pageIndicatorStyle} = this.props;
const items2 = [];
const value3 = 0;
if (value3 < count) {
r7 = value3;
while (true) {
push = items2.push;
jsxRuntimeEnv1_9Binding = jsxRuntimeEnv1_9;
LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
if (r7 === activeIndex) {
activeIndicator = value2.activeIndicator;
r17 = activeIndicator;
} else {
inactiveIndicator = value2.inactiveIndicator;
r17 = inactiveIndicator;
}
Reflect.apply(push, items2, [<LegacyText style={[{fontSize: indicatorSize},
r17]} key={r7}>{'•'}</LegacyText>]);
value4 = typeof r7 === 'bigint' ? r7 + 1n : +r7 + 1;
if (value4 < count) {
r7 = value4;
continue;
}
break;
function _callSuper_63353(a0, a1, a2) { // fn#63353, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8117:225, offset: 0x01b7be16, size: 100 bytes, params: 4, frame: 20
var r0;
var Reflect;
let value = a2;
const value3 = Module00017(a1);
if (_isNativeReflectConstruct_63354()) {
Reflect = global.Reflect;
value = Reflect.construct(value3, value || [], Module00017(a0).constructor);
r0 = value;
} else {
value = value3.apply(a0, value);
r0 = value;
}
return PossibleConstructorReturn(a0, r0);
}
return (
<View style={[value2.pageIndicator, {width: count * indicatorSpace}, pageIndicatorStyle]}>
{items2}
</View>
);
}
function Carousel(a0) { // fn#63361, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8117:1495, offset: 0x01b7c072, size: 92 bytes, params: 2, frame: 18
let value = copyRestArgs(0, undefined);
env1_2(this, Carousel);
const _callSuper_63353Binding = _callSuper_63353;
const items = [];
arraySpread(items, value, 0, value);
value = _callSuper_63353Binding(this, Carousel, items);
value.state = {activeIndex: 0};
value.onAnimationEnd = onAnimationEnd;
return value;
}
function value_63363() { // fn#63363, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8117:1827, offset: 0x01b7c144, size: 320 bytes, params: 1, frame: 22
var environment;
let value = environment.__proto__;
const binding = env1_11;
const context = this.context;
const value2 = undefined;
const value3 = binding(context);
const pageIndicatorStyle = this.props.pageIndicatorStyle;
const length = this.props.children.length;
const r5 = this.props.pageIndictor === true && length > 1 ? ((Component) => <Component count={length} activeIndex={this.state.activeIndex} pageIndicatorStyle={pageIndicatorStyle} />)(env1_12) : value2;
const r8 = this.props.scrollViewProps ?? ({});
const items2 = [value3.container];
items2[1] = this.props.style;
const scrollViewBindingProps2 = {'automaticallyAdjustContentInsets': false, 'horizontal': true,
'pagingEnabled': true, 'scrollEnabled': null, 'nestedScrollEnabled': true,
'showsHorizontalScrollIndicator': false, scrollEnabled: length > 1, onMomentumScrollEnd: this.onAnimationEnd,
...r8};
value = <View style={value3.carouselContentWrapper} onStartShouldSetResponder={function() {
return true;
}}>{this.props.children}</View>;
value = <ScrollView {...scrollViewBindingProps2}>{value}</ScrollView>;
return (
<View style={items2}>
{value}
{r5}
</View>
);
}
function onAnimationEnd({nativeEvent}) { // fn#63362, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8117:1625, owner: Carousel.onAnimationEnd, offset: 0x01b7c0ce, size: 118 bytes, params: 2, frame: 14
const Math = global.Math;
const round = Math.round;
const x = nativeEvent.contentOffset.x;
const binding = env0_0;
const value2 = Reflect.apply(round, Math, [x / binding.props.width]);
binding.setState({activeIndex: value2});
if (binding.props.onPageChange != null) {
env0_0.props.onPageChange(value2);
function _isNativeReflectConstruct_63354() { // fn#63354, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8117:356, offset: 0x01b7be7a, size: 94 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_63354_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun63357(a0) { // fn#63357, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8117:870, offset: 0x01b7bed8, size: 68 bytes, params: 2, frame: 15
const PageIndicator2 = PageIndicator;
Inherits(PageIndicator2, a0);
return CreateClass(PageIndicator2, [{key: 'render', value: value_63359}]);
function PageIndicator() { // fn#63358, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8117:882, offset: 0x01b7bf1c, size: 42 bytes, params: 1, frame: 16
env1_2(this, PageIndicator);
return _callSuper_63353(this, PageIndicator, arguments);
}
function value_63359() { // fn#63359, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8117:1040, offset: 0x01b7bf46, size: 232 bytes, params: 1, frame: 29
var r7;
var r17;
var push;
var jsxRuntimeEnv1_9Binding;
var LegacyText;
var inactiveIndicator;
var activeIndicator;
var value4;
const value2 = env1_11(this.context);
const {count, activeIndex, indicatorSpace, indicatorSize, pageIndicatorStyle} = this.props;
const items2 = [];
const value3 = 0;
if (value3 < count) {
r7 = value3;
while (true) {
push = items2.push;
jsxRuntimeEnv1_9Binding = jsxRuntimeEnv1_9;
LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
if (r7 === activeIndex) {
activeIndicator = value2.activeIndicator;
r17 = activeIndicator;
} else {
inactiveIndicator = value2.inactiveIndicator;
r17 = inactiveIndicator;
}
Reflect.apply(push, items2, [<LegacyText style={[{fontSize: indicatorSize},
r17]} key={r7}>{'•'}</LegacyText>]);
value4 = typeof r7 === 'bigint' ? r7 + 1n : +r7 + 1;
if (value4 < count) {
r7 = value4;
continue;
}
break;
}
}
return (
<View style={[value2.pageIndicator, {width: count * indicatorSpace}, pageIndicatorStyle]}>
{items2}
</View>
);
}
}
function _fun63360(a0) { // fn#63360, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8117:1483, offset: 0x01b7c02e, size: 68 bytes, params: 2, frame: 15
const Carousel2 = Carousel;
Inherits(Carousel2, a0);
return CreateClass(Carousel2, [{key: 'render', value: value_63363}]);
function Carousel(a0) { // fn#63361, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8117:1495, offset: 0x01b7c072, size: 92 bytes, params: 2, frame: 18
let value = copyRestArgs(0, undefined);
env1_2(this, Carousel);
const _callSuper_63353Binding = _callSuper_63353;
const items2 = [];
arraySpread(items2, value, 0, value);
value = _callSuper_63353Binding(this, Carousel, items2);
value.state = {activeIndex: 0};
value.onAnimationEnd = onAnimationEnd;
return value;
function onAnimationEnd({nativeEvent}) { // fn#63362, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8117:1625, owner: Carousel.onAnimationEnd, offset: 0x01b7c0ce, size: 118 bytes, params: 2, frame: 14
const Math = global.Math;
const round = Math.round;
const x = nativeEvent.contentOffset.x;
const binding = env0_0;
const value2 = Reflect.apply(round, Math, [x / binding.props.width]);
binding.setState({activeIndex: value2});
if (binding.props.onPageChange != null) {
env0_0.props.onPageChange(value2);
}
}
}
function value_63363() { // fn#63363, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8117:1827, offset: 0x01b7c144, size: 320 bytes, params: 1, frame: 22
var environment;
let value = environment.__proto__;
const binding = env1_11;
const context = this.context;
const value2 = undefined;
const value3 = binding(context);
const pageIndicatorStyle = this.props.pageIndicatorStyle;
const length = this.props.children.length;
const r5 = (
this.props.pageIndictor === true && length > 1
? ((Component) => <Component count={length} activeIndex={this.state.activeIndex} pageIndicatorStyle={pageIndicatorStyle} />)(env1_12)
: value2
);
const r8 = this.props.scrollViewProps ?? ({});
const items2 = [value3.container];
items2[1] = this.props.style;
const scrollViewBindingProps2 = {'automaticallyAdjustContentInsets': false, 'horizontal': true,
'pagingEnabled': true, 'scrollEnabled': null, 'nestedScrollEnabled': true,
'showsHorizontalScrollIndicator': false, scrollEnabled: length > 1, onMomentumScrollEnd: this.onAnimationEnd,
...r8};
value = (
<View style={value3.carouselContentWrapper} onStartShouldSetResponder={function() {
return true;
}}>
{this.props.children}
</View>
);
value = (
<ScrollView {...scrollViewBindingProps2}>
{value}
</ScrollView>
);
return (
<View style={items2}>
{value}
{r5}
</View>
);
}
}
}
global.__d(_fun63352, 7939, [6, 7, 15, 17, 18, 31, 27, 33, 4501, 697, 1305, 3868,
2]) /* metro module 7939, dependencies: [6, 7, 15, 17, 18, 31, 27, 33, 4501, 697, 1305, 3868, 2] */;
File diff suppressed because it is too large. Load diff
+299 -285
View File
@@ -1,312 +1,326 @@
/* Metro module 9898; source: components_native/common/CountDown.tsx; dependencies: [6, 7, 15, 17, 18, 31, 33, 1244, 672, 4573, 2] */
import ClassCallCheck from '../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as TextModule from '../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
function _fun77570(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#77570, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10084:6, offset: 0x01e0191f, size: 240 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
let value = importAll(31) /* metro dependency 31 */;
const env0_8 = (require(33) /* metro dependency 33 */).jsx;
let value = ReactModule;
const Component = value.Component;
value = _fun77574(Component);
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/common/CountDown.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/common/CountDown.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_77571() { // fn#77571, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10084:172, offset: 0x01e01a0f, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
function _isNativeReflectConstruct_77571() { // fn#77571, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10084:172, offset: 0x01e01a0f, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_77571_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_77571_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun77574(a0) { // fn#77574, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10084:371, offset: 0x01e01a71, size: 147 bytes, params: 2, frame: 16
const closure = CountDown;
env0_7(closure, a0);
return env0_4(closure, [{key: 'componentDidMount', value: function() {
var env0_0 = this;
this._interval = global.setInterval(_fun77577, 1000);
}}, {key: 'componentWillUnmount', value: function() {
this.clearRefreshInterval();
}}, {key: 'clearRefreshInterval', value: function() {
if (this._interval != null) {
global.clearInterval(this._interval);
}
}}, {key: 'render', value: value_77580}]);
}
function value_77576() { // fn#77576, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10084:653, offset: 0x01e01b04, size: 46 bytes, params: 1, frame: 14
this._interval = global.setInterval(_fun77577, 1000);
}
function value_77580() { // fn#77580, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10084:917, offset: 0x01e01b7e, size: 985 bytes, params: 1, frame: 24
var environment;
var r7;
var r11;
var r13;
var r8;
var r1;
var r3;
var r4;
var Math;
var max;
var Date;
var value2;
var value3;
var value4;
var clearRefreshInterval;
var floor;
var Seconds;
var DAY;
var value5;
var items;
var value6;
var HOUR;
var value7;
var MINUTE;
var shift;
var value8;
var map;
var value9;
var join;
var value10;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var QJyuxY;
var n7dksO;
var indexOf;
var length;
var replace;
var property;
var HermesInternal;
var concat;
var value11;
const {postDeadlineText, style, deadline, withUnits, freezeAtRemainingSeconds} = this.props;
let value = withUnits != null;
if (deadline === Infinity) {
value = environment.__proto__;
value = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.PqEzn8);
r4 = value;
} else {
Math = global.Math;
max = Math.max;
value = global.Number(deadline);
Date = global.Date;
value -= Date.now();
value2 = 0;
value = Reflect.apply(max, Math, [value2, value]);
value /= 1000;
value3 = freezeAtRemainingSeconds != null;
reducibleJoin4: while (true) {
if (value3) {
value4 = value <= freezeAtRemainingSeconds;
r7 = value4;
break reducibleJoin4;
function _fun77574(a0) { // fn#77574, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10084:371, offset: 0x01e01a71, size: 147 bytes, params: 2, frame: 16
const CountDown2 = CountDown;
Inherits(CountDown2, a0);
return CreateClass(CountDown2, [{key: 'componentDidMount', value: function() {
var env0_0 = this;
this._interval = global.setInterval(_fun77577, 1000);
}}, {key: 'componentWillUnmount', value: function() {
this.clearRefreshInterval();
}}, {key: 'clearRefreshInterval', value: function() {
if (this._interval != null) {
global.clearInterval(this._interval);
}
r7 = value3;
break reducibleJoin4;
}}, {key: 'render', value: value_77580}]);
function CountDown() { // fn#77575, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10084:383, offset: 0x00c7c82b, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_3(this, CountDown);
const value3 = env1_6(CountDown);
return env1_5(this, _isNativeReflectConstruct_77571() ? global.Reflect.construct(value3, arguments,
env1_6(this).constructor) : value3.apply(this, arguments));
}
reducibleJoin6: while (true) {
if (r7) {
clearRefreshInterval = this.clearRefreshInterval;
Reflect.apply(clearRefreshInterval, this, []);
r11 = freezeAtRemainingSeconds;
break reducibleJoin6;
function value_77576() { // fn#77576, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10084:653, offset: 0x01e01b04, size: 46 bytes, params: 1, frame: 14
this._interval = global.setInterval(_fun77577, 1000);
function _fun77577() { // fn#77577, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10084:692, offset: 0x01e01b32, size: 19 bytes, params: 1, frame: 9
return env0_0.forceUpdate();
}
r11 = value;
break reducibleJoin6;
}
reducibleJoin17: while (true) {
reducibleJoin10: while (true) {
if (r11 >= value2) {
if (postDeadlineText != null) {
r4 = postDeadlineText;
break reducibleJoin17;
function value_77580() { // fn#77580, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10084:917, offset: 0x01e01b7e, size: 985 bytes, params: 1, frame: 24
var environment;
var r7;
var r11;
var r13;
var r8;
var r1;
var r3;
var r4;
var Math;
var max;
var Date;
var value2;
var value3;
var value4;
var clearRefreshInterval;
var floor;
var Seconds;
var DAY;
var value5;
var items2;
var value6;
var HOUR;
var value7;
var MINUTE;
var shift;
var value8;
var map;
var value9;
var join;
var value10;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var QJyuxY;
var n7dksO;
var indexOf;
var length;
var replace;
var property;
var HermesInternal;
var concat;
var value11;
const {postDeadlineText, style, deadline, withUnits, freezeAtRemainingSeconds} = this.props;
let value = withUnits != null;
if (deadline === Infinity) {
value = environment.__proto__;
value = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.PqEzn8);
r4 = value;
} else {
Math = global.Math;
max = Math.max;
value = global.Number(deadline);
Date = global.Date;
value -= Date.now();
value2 = 0;
value = Reflect.apply(max, Math, [value2, value]);
value /= 1000;
value3 = freezeAtRemainingSeconds != null;
reducibleJoin4: while (true) {
if (value3) {
value4 = value <= freezeAtRemainingSeconds;
r7 = value4;
break reducibleJoin4;
}
Math = global.Math;
floor = Math.floor;
value = environment.__proto__;
Seconds = (importDefault(672) /* metro dependency 672: Durations */).Seconds;
DAY = Seconds.DAY;
items = [Reflect.apply(floor, Math, [r11 / DAY])];
Math = global.Math;
floor = Math.floor;
Seconds = (importDefault(672) /* metro dependency 672: Durations */).Seconds;
DAY = Seconds.DAY;
value6 = r11 % DAY;
Seconds = (importDefault(672) /* metro dependency 672: Durations */).Seconds;
HOUR = Seconds.HOUR;
items[1] = Reflect.apply(floor, Math, [value6 / HOUR]);
Math = global.Math;
floor = Math.floor;
Seconds = (importDefault(672) /* metro dependency 672: Durations */).Seconds;
HOUR = Seconds.HOUR;
value7 = value6 % HOUR;
Seconds = (importDefault(672) /* metro dependency 672: Durations */).Seconds;
MINUTE = Seconds.MINUTE;
items[2] = Reflect.apply(floor, Math, [value7 / MINUTE]);
Math = global.Math;
floor = Math.floor;
Seconds = (importDefault(672) /* metro dependency 672: Durations */).Seconds;
MINUTE = Seconds.MINUTE;
items[3] = Reflect.apply(floor, Math, [value7 % MINUTE]);
if (value2 !== items[value2]) {
r13 = value2;
r7 = value3;
break reducibleJoin4;
}
reducibleJoin6: while (true) {
if (r7) {
clearRefreshInterval = this.clearRefreshInterval;
Reflect.apply(clearRefreshInterval, this, []);
r11 = freezeAtRemainingSeconds;
break reducibleJoin6;
}
r11 = value;
break reducibleJoin6;
}
reducibleJoin17: while (true) {
reducibleJoin10: while (true) {
if (r11 >= value2) {
if (postDeadlineText != null) {
r4 = postDeadlineText;
break reducibleJoin17;
}
Math = global.Math;
floor = Math.floor;
value = environment.__proto__;
Seconds = (importDefault(672) /* metro dependency 672: Durations */).Seconds;
DAY = Seconds.DAY;
items2 = [Reflect.apply(floor, Math, [r11 / DAY])];
Math = global.Math;
floor = Math.floor;
Seconds = (importDefault(672) /* metro dependency 672: Durations */).Seconds;
DAY = Seconds.DAY;
value6 = r11 % DAY;
Seconds = (importDefault(672) /* metro dependency 672: Durations */).Seconds;
HOUR = Seconds.HOUR;
items2[1] = Reflect.apply(floor, Math, [value6 / HOUR]);
Math = global.Math;
floor = Math.floor;
Seconds = (importDefault(672) /* metro dependency 672: Durations */).Seconds;
HOUR = Seconds.HOUR;
value7 = value6 % HOUR;
Seconds = (importDefault(672) /* metro dependency 672: Durations */).Seconds;
MINUTE = Seconds.MINUTE;
items2[2] = Reflect.apply(floor, Math, [value7 / MINUTE]);
Math = global.Math;
floor = Math.floor;
Seconds = (importDefault(672) /* metro dependency 672: Durations */).Seconds;
MINUTE = Seconds.MINUTE;
items2[3] = Reflect.apply(floor, Math, [value7 % MINUTE]);
if (value2 !== items2[value2]) {
r13 = value2;
break reducibleJoin10;
}
items2.shift();
r13 = 1;
break reducibleJoin10;
}
Math = global.Math;
floor = Math.floor;
value = environment.__proto__;
Seconds = (importDefault(672) /* metro dependency 672: Durations */).Seconds;
DAY = Seconds.DAY;
value5 = Reflect.apply(floor, Math, [r11 / DAY]);
items2 = [value5];
Math = global.Math;
floor = Math.floor;
Seconds = (importDefault(672) /* metro dependency 672: Durations */).Seconds;
DAY = Seconds.DAY;
value6 = r11 % DAY;
Seconds = (importDefault(672) /* metro dependency 672: Durations */).Seconds;
HOUR = Seconds.HOUR;
items2[1] = Reflect.apply(floor, Math, [value6 / HOUR]);
Math = global.Math;
floor = Math.floor;
Seconds = (importDefault(672) /* metro dependency 672: Durations */).Seconds;
HOUR = Seconds.HOUR;
value7 = value6 % HOUR;
Seconds = (importDefault(672) /* metro dependency 672: Durations */).Seconds;
MINUTE = Seconds.MINUTE;
items2[2] = Reflect.apply(floor, Math, [value7 / MINUTE]);
Math = global.Math;
floor = Math.floor;
Seconds = (importDefault(672) /* metro dependency 672: Durations */).Seconds;
MINUTE = Seconds.MINUTE;
items2[3] = Reflect.apply(floor, Math, [value7 % MINUTE]);
if (value2 !== items2[value2]) {
r13 = value2;
break reducibleJoin10;
}
shift = items2.shift;
Reflect.apply(shift, items2, []);
value8 = 1;
r13 = value8;
break reducibleJoin10;
}
items.shift();
r13 = 1;
break reducibleJoin10;
}
Math = global.Math;
floor = Math.floor;
value = environment.__proto__;
Seconds = (importDefault(672) /* metro dependency 672: Durations */).Seconds;
DAY = Seconds.DAY;
value5 = Reflect.apply(floor, Math, [r11 / DAY]);
items = [value5];
Math = global.Math;
floor = Math.floor;
Seconds = (importDefault(672) /* metro dependency 672: Durations */).Seconds;
DAY = Seconds.DAY;
value6 = r11 % DAY;
Seconds = (importDefault(672) /* metro dependency 672: Durations */).Seconds;
HOUR = Seconds.HOUR;
items[1] = Reflect.apply(floor, Math, [value6 / HOUR]);
Math = global.Math;
floor = Math.floor;
Seconds = (importDefault(672) /* metro dependency 672: Durations */).Seconds;
HOUR = Seconds.HOUR;
value7 = value6 % HOUR;
Seconds = (importDefault(672) /* metro dependency 672: Durations */).Seconds;
MINUTE = Seconds.MINUTE;
items[2] = Reflect.apply(floor, Math, [value7 / MINUTE]);
Math = global.Math;
floor = Math.floor;
Seconds = (importDefault(672) /* metro dependency 672: Durations */).Seconds;
MINUTE = Seconds.MINUTE;
items[3] = Reflect.apply(floor, Math, [value7 % MINUTE]);
if (value2 !== items[value2]) {
r13 = value2;
break reducibleJoin10;
}
shift = items.shift;
Reflect.apply(shift, items, []);
value8 = 1;
r13 = value8;
break reducibleJoin10;
}
map = items.map;
value9 = Reflect.apply(map, items, [function(a0) {
var value = a0;
return value < 10 ? '0' + value : value;
}]);
join = value9.join;
value10 = Reflect.apply(join, value9, [':']);
if (value && withUnits) {
string = intl.string;
QJyuxY = t.QJyuxY;
value = Reflect.apply(string, intl, [QJyuxY]);
items = [value];
string = intl.string;
items[1] = Reflect.apply(string, intl, [t['1LyF1h']]);
string = intl.string;
n7dksO = t.n7dksO;
items[2] = Reflect.apply(string, intl, [n7dksO]);
string = intl.string;
items[3] = Reflect.apply(string, intl, [t['6m/6nM']]);
indexOf = value10.indexOf;
value = Reflect.apply(indexOf, value10, [':']);
reducibleJoin15: while (true) {
if (value === -1) {
r1 = r13;
r3 = value10;
break reducibleJoin15;
}
length = items.length;
if (!(r13 < length)) {
r1 = r13;
r3 = value10;
break reducibleJoin15;
}
r7 = r13;
r8 = value10;
reducibleLoop13: while (true) {
replace = r8.replace;
property = items[r7];
map = items2.map;
value9 = Reflect.apply(map, items2, [function(a0) {
var value = a0;
return value < 10 ? '0' + value : value;
}]);
join = value9.join;
value10 = Reflect.apply(join, value9, [':']);
if (value && withUnits) {
string = intl.string;
QJyuxY = t.QJyuxY;
value = Reflect.apply(string, intl, [QJyuxY]);
items2 = [value];
string = intl.string;
items2[1] = Reflect.apply(string, intl, [t['1LyF1h']]);
string = intl.string;
n7dksO = t.n7dksO;
items2[2] = Reflect.apply(string, intl, [n7dksO]);
string = intl.string;
items2[3] = Reflect.apply(string, intl, [t['6m/6nM']]);
indexOf = value10.indexOf;
value = Reflect.apply(indexOf, value10, [':']);
reducibleJoin15: while (true) {
if (value === -1) {
r1 = r13;
r3 = value10;
break reducibleJoin15;
}
length = items2.length;
if (!(r13 < length)) {
r1 = r13;
r3 = value10;
break reducibleJoin15;
}
r7 = r13;
r8 = value10;
reducibleLoop13: while (true) {
replace = r8.replace;
property = items2[r7];
HermesInternal = global.HermesInternal;
concat = HermesInternal.concat;
value = Reflect.apply(replace, r8, [':', '' + property + ' ']);
value11 = typeof r7 === 'bigint' ? r7 + 1n : +r7 + 1;
indexOf = value.indexOf;
if (Reflect.apply(indexOf, value, [':']) === -1) {
r1 = value11;
r3 = value;
break reducibleJoin15;
}
length = items2.length;
if (value11 < length) {
r7 = value11;
r8 = value;
continue reducibleLoop13;
}
r1 = value11;
r3 = value;
break reducibleJoin15;
}
}
property = items2[r1];
HermesInternal = global.HermesInternal;
concat = HermesInternal.concat;
value = Reflect.apply(replace, r8, [':', '' + property + ' ']);
value11 = typeof r7 === 'bigint' ? r7 + 1n : +r7 + 1;
indexOf = value.indexOf;
if (Reflect.apply(indexOf, value, [':']) === -1) {
r1 = value11;
r3 = value;
break reducibleJoin15;
}
length = items.length;
if (value11 < length) {
r7 = value11;
r8 = value;
continue reducibleLoop13;
}
r1 = value11;
r3 = value;
break reducibleJoin15;
value = '' + r3 + property;
r4 = value;
break reducibleJoin17;
}
r4 = value10;
break reducibleJoin17;
}
property = items[r1];
HermesInternal = global.HermesInternal;
concat = HermesInternal.concat;
value = '' + r3 + property;
r4 = value;
break reducibleJoin17;
}
r4 = value10;
break reducibleJoin17;
value = environment.__proto__;
const Text = (TextModule).Text;
return (
<Text
tabularNumbers
variant="text-md/semibold"
style={style}
>
{r4}
</Text>
);
}
}
value = environment.__proto__;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<Text
tabularNumbers
variant="text-md/semibold"
style={style}
>
{r4}
</Text>
);
}
function _fun77577() { // fn#77577, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10084:692, offset: 0x01e01b32, size: 19 bytes, params: 1, frame: 9
return env0_0.forceUpdate();
}
global.__d(_fun77570, 9898, [6, 7, 15, 17, 18, 31, 33, 1244, 672, 4573,
2]) /* metro module 9898, dependencies: [6, 7, 15, 17, 18, 31, 33, 1244, 672, 4573, 2] */;
@@ -1,38 +1,43 @@
/* Metro module 11870; source: components_native/common/DescriptionEllipsis.tsx; dependencies: [31, 27, 33, 4501, 697, 2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
function _fun91023(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#91023, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12056:6, offset: 0x02050677, size: 303 bytes, params: 8, frame: 22
var object3;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_0 = (require(27) /* metro dependency 27 */).View;
let value = require(33) /* metro dependency 33 */;
ReactModule;
let value = JsxRuntimeModule;
const env0_1 = value.jsx;
const env0_2 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object3 = {};
const object4 = {'backgroundColor': null, 'justifyContent': 'center', 'alignItems': 'center',
object = {};
const object2 = {'backgroundColor': null, 'justifyContent': 'center', 'alignItems': 'center',
'flexDirection': 'row', 'borderRadius': null, 'marginTop': 4, 'height': 12, 'width': 24};
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object4.backgroundColor = BACKGROUND_BASE_LOWEST;
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object3.topicEllipsis = object4;
object2.backgroundColor = BACKGROUND_BASE_LOWEST;
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object.topicEllipsis = object2;
const TEXT_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_MUTED;
object3.topicEllipsisDot = {'backgroundColor': null, 'borderRadius': 2, 'margin': 1, 'height': 4, 'width': 4,
object.topicEllipsisDot = {'backgroundColor': null, 'borderRadius': 2, 'margin': 1, 'height': 4, 'width': 4,
backgroundColor: TEXT_MUTED};
const env0_3 = Reflect.apply(createStyles, value, [object3]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/common/DescriptionEllipsis.tsx');
const env0_3 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('components_native/common/DescriptionEllipsis.tsx');
exports.default = DescriptionEllipsis;
function DescriptionEllipsis({style, dotStyle}) { // fn#91024, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12056:475, offset: 0x020507a6, size: 181 bytes, params: 2, frame: 20
const styles = useStyles();
return (
<View style={[styles.topicEllipsis, style]}>
<View style={[styles.topicEllipsisDot, dotStyle]} />
<View style={[styles.topicEllipsisDot, dotStyle]} />
<View style={[styles.topicEllipsisDot, dotStyle]} />
</View>
);
}
}
function DescriptionEllipsis({style, dotStyle}) { // fn#91024, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12056:475, offset: 0x020507a6, size: 181 bytes, params: 2, frame: 20
const styles = useStyles();
return (
<View style={[styles.topicEllipsis, style]}>
<View style={[styles.topicEllipsisDot, dotStyle]} />
<View style={[styles.topicEllipsisDot, dotStyle]} />
<View style={[styles.topicEllipsisDot, dotStyle]} />
</View>
);
}
global.__d(_fun91023, 11870, [31, 27, 33, 4501, 697,
2]) /* metro module 11870, dependencies: [31, 27, 33, 4501, 697, 2] */;
+82 -72
View File
@@ -1,16 +1,22 @@
/* Metro module 5475; source: components_native/common/FastImage.tsx; dependencies: [31, 27, 33, 4501, 4567, 4020, 5476, 5477, 477, 2] */
import RequireNativeComponentOrDefaultNative from '../../utils/native/requireNativeComponentOrDefault.native.tsx'; /* Metro dependency 4567 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as PlatformUtilsModule from '../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
import * as FabricUtilsModule from '../../utils/native/FabricUtils.tsx'; /* Metro dependency 4020 */
import * as CreateStylesModule from '../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
function _fun48093(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#48093, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5653:6, offset: 0x011dc0cc, size: 336 bytes, params: 8, frame: 25
let env0_0 = require;
const closure = FastImageAndroid;
const FastImageAndroid2 = FastImageAndroid;
let Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const Image = value2.Image;
const env0_4 = value2.NativeModules;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
const env0_6 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({base: {overflow: 'hidden'}});
const env0_7 = (importDefault(4567) /* metro dependency 4567: requireNativeComponentOrDefaultNative */)({'componentName': 'DCDFastImageView',
let value = ReactModule;
const Image = ReactNativeModule.Image;
const env0_6 = (CreateStylesModule).createStyles({base: {overflow: 'hidden'}});
const env0_7 = (RequireNativeComponentOrDefaultNative)({'componentName': 'DCDFastImageView',
'componentMissingFallbackInstance': null, 'warnWhenMissing': false, componentMissingFallbackInstance: Image});
value = value.memo(_fun48095);
Object = global.Object;
@@ -23,74 +29,78 @@ function _fun48093(global, require, importDefault, importAll, module, exports, d
items[1] = new Promise3(_fun48098);
return Promise.race(items);
}});
closure.preload = preload_48099;
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
const r1 = platformUtilsModule.isAndroid() ? closure : value;
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/common/FastImage.tsx');
FastImageAndroid2.preload = preload_48099;
const r1 = PlatformUtilsModule.isAndroid() ? FastImageAndroid2 : value;
(FileImportTrackerModule).fileFinishedImporting('components_native/common/FastImage.tsx');
exports.default = r1;
}
function FastImageAndroid(a0) { // fn#48094, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5653:903, offset: 0x011dc21c, size: 62 bytes, params: 2, frame: 14
return (
<Image
{...a0}
{...{['defaultSource']: a0.placeholder}}
{...{['fadeDuration']: 0}}
/>
);
}
function _fun48095(a0) { // fn#48095, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5653:319, offset: 0x011dc25a, size: 356 bytes, params: 2, frame: 24
var r5;
var moduleValue2;
const value2 = undefined;
const styles = useStyles();
const source = a0.source;
const style = a0.style;
const placeholder = a0.placeholder;
const enableAnimation = a0.enableAnimation;
const r10 = value2 === enableAnimation || enableAnimation;
const paused = a0.paused;
const fade = a0.fade;
const r8 = value2 === fade || fade;
const usesSmallCache = a0.usesSmallCache;
const r7 = value2 !== usesSmallCache && usesSmallCache;
if (typeof source === 'number') {
return <Image {...a0} />;
function FastImageAndroid(a0) { // fn#48094, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5653:903, offset: 0x011dc21c, size: 62 bytes, params: 2, frame: 14
return (
<Image
{...a0}
{...{['defaultSource']: a0.placeholder}}
{...{['fadeDuration']: 0}}
/>
);
}
const fabricUtilsModule = require(4020) /* metro dependency 4020: FabricUtils */;
if (fabricUtilsModule.isFabric()) {
moduleValue2 = require(5476) /* metro dependency 5476: FastImageFabricExperiment */;
r5 = moduleValue2.getFastImageFabricEnabled() ? importDefault(5477) /* metro dependency 5477: FastImageFabricNativeComponent */ : env0_7;
} else {
r5 = env0_7;
function _fun48095(a0) { // fn#48095, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5653:319, offset: 0x011dc25a, size: 356 bytes, params: 2, frame: 24
var r5;
var moduleValue2;
const value2 = undefined;
const styles = useStyles();
const source = a0.source;
const style = a0.style;
const placeholder = a0.placeholder;
const enableAnimation = a0.enableAnimation;
const r10 = value2 === enableAnimation || enableAnimation;
const paused = a0.paused;
const fade = a0.fade;
const r8 = value2 === fade || fade;
const usesSmallCache = a0.usesSmallCache;
const r7 = value2 !== usesSmallCache && usesSmallCache;
if (typeof source === 'number') {
return <Image {...a0} />;
}
if (FabricUtilsModule.isFabric()) {
moduleValue2 = require(5476) /* metro dependency 5476: FastImageFabricExperiment */;
r5 = moduleValue2.getFastImageFabricEnabled() ? importDefault(5477) /* metro dependency 5477: FastImageFabricNativeComponent */ : env0_7;
} else {
r5 = env0_7;
}
const value6 = null;
const r6 = value6 != placeholder ? Image.resolveAssetSource(placeholder) : value6;
return ((Component) => <Component {...a0} {...{['style']: [styles.base,
style]}} {...{['placeholder']: value6 == r6 ? value2 : r6.uri}} {...{['enableAnimation']: r10}} {...{['paused']: paused}} {...{['fade']: r8}} {...{['usesSmallCache']: r7}} />)(r5);
}
const value6 = null;
const r6 = value6 != placeholder ? Image.resolveAssetSource(placeholder) : value6;
return ((Component) => <Component {...a0} {...{['style']: [styles.base,
style]}} {...{['placeholder']: value6 == r6 ? value2 : r6.uri}} {...{['enableAnimation']: r10}} {...{['paused']: paused}} {...{['fade']: r8}} {...{['usesSmallCache']: r7}} />)(r5);
function preload_48096(a0) { // fn#48096, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5653:787, offset: 0x011dc3be, size: 104 bytes, params: 2, frame: 15
const env0_0 = a0;
const Promise = global.Promise;
const race = Promise.race;
const Promise2 = global.Promise;
const items2 = [new Promise2(_fun48097)];
const Promise3 = global.Promise;
items2[1] = new Promise3(function(a0) {
return (0, global.setTimeout)(a0, 2000);
});
return Reflect.apply(race, Promise, [items2]);
function _fun48097(a0) { // fn#48097, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5653:817, offset: 0x011dc426, size: 41 bytes, params: 2, frame: 13
const DCDFastImageViewManager = NativeModules.DCDFastImageViewManager;
DCDFastImageViewManager.preload(env0_0, a0);
}
}
function preload_48099(a0) { // fn#48099, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5653:1019, offset: 0x011dc46a, size: 41 bytes, params: 2, frame: 11
return Image.prefetch(a0).catch(function() {
});
}
}
function preload_48096(a0) { // fn#48096, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5653:787, offset: 0x011dc3be, size: 104 bytes, params: 2, frame: 15
const env0_0 = a0;
const Promise = global.Promise;
const race = Promise.race;
const Promise2 = global.Promise;
const items2 = [new Promise2(_fun48097)];
const Promise3 = global.Promise;
items2[1] = new Promise3(function(a0) {
return (0, global.setTimeout)(a0, 2000);
});
return Reflect.apply(race, Promise, [items2]);
}
function preload_48099(a0) { // fn#48099, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5653:1019, offset: 0x011dc46a, size: 41 bytes, params: 2, frame: 11
return Image.prefetch(a0).catch(function() {
});
}
function _fun48097(a0) { // fn#48097, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5653:817, offset: 0x011dc426, size: 41 bytes, params: 2, frame: 13
const DCDFastImageViewManager = NativeModules.DCDFastImageViewManager;
DCDFastImageViewManager.preload(env0_0, a0);
function _fun48098(a0) { // fn#48098, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5653:876, offset: 0x011dc44f, size: 27 bytes, params: 2, frame: 13
return global.setTimeout(a0, 2000);
}
global.__d(_fun48093, 5475, [31, 27, 33, 4501, 4567, 4020, 5476, 5477, 477,
2]) /* metro module 5475, dependencies: [31, 27, 33, 4501, 4567, 4020, 5476, 5477, 477, 2] */;
@@ -1,174 +1,182 @@
/* Metro module 15211; source: components_native/common/IconLabelBlock.tsx; dependencies: [29, 6, 7, 15, 17, 18, 31, 27, 33, 4501, 697, 1305, 4573, 9896, 4002, 3868, 2] */
import ClassCallCheck from '../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import ObjectWithoutProperties from '../../by-id/module-00029-ObjectWithoutProperties.js'; /* Metro dependency 29 */
import Native from '../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as NativeModule from '../../external/discord_common/js/packages/design/native.tsx'; /* Metro dependency 3868 */
import * as CreateStylesModule from '../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
function _fun116345(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116345, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15408:6, offset: 0x024858e9, size: 498 bytes, params: 8, frame: 25
var object2;
const env0_0 = require;
const env0_3 = ['error'];
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = importDefault(29) /* metro dependency 29 */;
const env0_5 = importDefault(6) /* metro dependency 6 */;
const env0_6 = importDefault(7) /* metro dependency 7 */;
const env0_7 = importDefault(15) /* metro dependency 15 */;
const env0_8 = importDefault(17) /* metro dependency 17 */;
const env0_9 = importDefault(18) /* metro dependency 18 */;
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_10 = value2.View;
const env0_11 = value2.Image;
const value3 = require(33) /* metro dependency 33 */;
const env0_12 = value3.jsx;
const env0_13 = value3.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createLegacyClassComponentStyles = createStylesModule.createLegacyClassComponentStyles;
object2 = {wrapper: {'alignItems': 'center', 'paddingTop': 26, 'paddingBottom': 16}};
const RED_400 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.RED_400;
object2.error = {'fontSize': 12, 'textAlign': 'center', 'alignSelf': 'center', 'marginBottom': 10, color: RED_400};
const TEXT_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_SUBTLE;
object2.label = {'fontSize': 12, 'marginTop': 20, color: TEXT_SUBTLE};
object2.iconUploaderWrapper = {'alignSelf': 'stretch', 'alignItems': 'center'};
object2.text = {marginTop: 9};
const env0_14 = Reflect.apply(createLegacyClassComponentStyles, createStylesModule, [object2]);
let value = ReactModule;
const createLegacyClassComponentStyles = CreateStylesModule.createLegacyClassComponentStyles;
object = {wrapper: {'alignItems': 'center', 'paddingTop': 26, 'paddingBottom': 16}};
const RED_400 = (Native).unsafe_rawColors.RED_400;
object.error = {'fontSize': 12, 'textAlign': 'center', 'alignSelf': 'center', 'marginBottom': 10, color: RED_400};
const TEXT_SUBTLE = (Native).colors.TEXT_SUBTLE;
object.label = {'fontSize': 12, 'marginTop': 20, color: TEXT_SUBTLE};
object.iconUploaderWrapper = {'alignSelf': 'stretch', 'alignItems': 'center'};
object.text = {marginTop: 9};
const env0_14 = Reflect.apply(createLegacyClassComponentStyles, CreateStylesModule, [object]);
const PureComponent = value.PureComponent;
value = _fun116349(PureComponent);
const ThemeContext = (require(3868) /* metro dependency 3868: native */).ThemeContext;
const ThemeContext = (NativeModule).ThemeContext;
value.contextType = ThemeContext;
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/common/IconLabelBlock.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/common/IconLabelBlock.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_116346() { // fn#116346, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15408:240, offset: 0x02485adb, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
function _isNativeReflectConstruct_116346() { // fn#116346, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15408:240, offset: 0x02485adb, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_116346_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_116346_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun116349(a0) { // fn#116349, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15408:808, offset: 0x02485b3d, size: 149 bytes, params: 2, frame: 16
const closure = IconLabelBlock;
env0_9(closure, a0);
return env0_6(closure, [{key: 'renderLabel', value: value_116351}, {key: 'renderText', value: value_116352},
{key: 'renderIcon', value: value_116353}, {key: 'render', value: value_116354}]);
}
function _fun116349(a0) { // fn#116349, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15408:808, offset: 0x02485b3d, size: 149 bytes, params: 2, frame: 16
const IconLabelBlock2 = IconLabelBlock;
Inherits(IconLabelBlock2, a0);
return CreateClass(IconLabelBlock2, [{key: 'renderLabel', value: value_116351}, {key: 'renderText', value: value_116352},
{key: 'renderIcon', value: value_116353}, {key: 'render', value: value_116354}]);
function IconLabelBlock() { // fn#116350, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15408:820, offset: 0x02485bd2, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_5(this, IconLabelBlock);
const value3 = env1_8(IconLabelBlock);
return env1_7(this, _isNativeReflectConstruct_116346() ? global.Reflect.construct(value3, arguments,
env1_8(this).constructor) : value3.apply(this, arguments));
}
function IconLabelBlock() { // fn#116350, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15408:820, offset: 0x02485bd2, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_5(this, IconLabelBlock);
const value3 = env1_8(IconLabelBlock);
return env1_7(this, _isNativeReflectConstruct_116346() ? global.Reflect.construct(value3, arguments,
env1_8(this).constructor) : value3.apply(this, arguments));
}
function value_116351() { // fn#116351, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15408:1109, offset: 0x02485c43, size: 112 bytes, params: 1, frame: 18
const value = environment.__proto__;
const value2 = env1_14(this.context);
const {label, labelStyle} = this.props;
const value3 = null;
if (value3 == label) {
return value3;
} else {
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
return (
<LegacyText style={[value2.label, labelStyle]}>
{label}
</LegacyText>
);
}
}
function value_116352() { // fn#116352, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15408:1280, offset: 0x02485cb3, size: 133 bytes, params: 1, frame: 19
const value = environment.__proto__;
const value2 = env1_14(this.context);
const {text, textStyle, textAccessibilityRole} = this.props;
const value3 = null;
if (value3 == text) {
return value3;
} else {
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<Text
variant="heading-md/medium"
color="text-default"
style={[value2.text, textStyle]}
accessibilityRole={textAccessibilityRole}
>
{text}
</Text>
);
}
}
function value_116353() { // fn#116353, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15408:1537, offset: 0x02485d38, size: 352 bytes, params: 1, frame: 27
var r8;
var error;
var value4;
var items2;
let value = environment.__proto__;
const value2 = env1_14(this.context);
const {iconProps, source, lightSource, darkSource, iconStyles, errorProps, errorStyles} = this.props;
const value3 = null;
if (value3 != iconProps) {
error = iconProps.error;
value4 = env1_4(iconProps, env1_3);
var viewBindingProps = {style: value2.iconUploaderWrapper};
items2 = [
((Component) => <Component {...value4} />)(importDefault(9896) /* metro dependency 9896: IconUploader */),
];
items2[1] = (
value3 == error
? value3
: ((LegacyText) => <LegacyText style={[value2.error,
errorStyles]} {...errorProps}>{error}</LegacyText>)((require(1305) /* metro dependency 1305: native */).LegacyText)
);
return (
<View {...viewBindingProps}>
{items2}
</View>
);
}
if (value3 != source) {
r8 = source;
} else {
value = require(4002) /* metro dependency 4002: shared */;
r8 = value.isThemeLight(this.context.theme) ? lightSource : darkSource;
}
return (
<Image
source={r8}
style={iconStyles}
resizeMode="contain"
/>
);
}
function value_116354() { // fn#116354, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15408:1992, offset: 0x02485e98, size: 139 bytes, params: 1, frame: 16
const value = environment.__proto__;
const items3 = [env1_14(this.context).wrapper];
items3[1] = this.props.wrapperStyles;
const items2 = [this.renderIcon()];
items2[1] = this.props.children;
items2[2] = this.renderLabel();
items2[3] = this.renderText();
return (
<View style={items3}>
{items2}
</View>
);
}
function value_116351() { // fn#116351, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15408:1109, offset: 0x02485c43, size: 112 bytes, params: 1, frame: 18
const value = environment.__proto__;
const value2 = env1_14(this.context);
const {label, labelStyle} = this.props;
const value3 = null;
if (value3 == label) {
return value3;
} else {
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
return (
<LegacyText style={[value2.label, labelStyle]}>
{label}
</LegacyText>
);
}
}
function value_116352() { // fn#116352, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15408:1280, offset: 0x02485cb3, size: 133 bytes, params: 1, frame: 19
const value = environment.__proto__;
const value2 = env1_14(this.context);
const {text, textStyle, textAccessibilityRole} = this.props;
const value3 = null;
if (value3 == text) {
return value3;
} else {
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<Text
variant="heading-md/medium"
color="text-default"
style={[value2.text, textStyle]}
accessibilityRole={textAccessibilityRole}
>
{text}
</Text>
);
}
}
function value_116353() { // fn#116353, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15408:1537, offset: 0x02485d38, size: 352 bytes, params: 1, frame: 27
var r8;
var error;
var value4;
var items2;
let value = environment.__proto__;
const value2 = env1_14(this.context);
const {iconProps, source, lightSource, darkSource, iconStyles, errorProps, errorStyles} = this.props;
const value3 = null;
if (value3 != iconProps) {
error = iconProps.error;
value4 = env1_4(iconProps, env1_3);
var viewBindingProps = {style: value2.iconUploaderWrapper};
items2 = [((Component) => <Component {...value4} />)(importDefault(9896) /* metro dependency 9896: IconUploader */)];
items2[1] = value3 == error ? value3 : ((LegacyText) => <LegacyText style={[value2.error,
errorStyles]} {...errorProps}>{error}</LegacyText>)((require(1305) /* metro dependency 1305: native */).LegacyText);
return (
<View {...viewBindingProps}>
{items2}
</View>
);
}
if (value3 != source) {
r8 = source;
} else {
value = require(4002) /* metro dependency 4002: shared */;
r8 = value.isThemeLight(this.context.theme) ? lightSource : darkSource;
}
return (
<Image
source={r8}
style={iconStyles}
resizeMode="contain"
/>
);
}
function value_116354() { // fn#116354, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15408:1992, offset: 0x02485e98, size: 139 bytes, params: 1, frame: 16
const value = environment.__proto__;
const items3 = [env1_14(this.context).wrapper];
items3[1] = this.props.wrapperStyles;
const items2 = [this.renderIcon()];
items2[1] = this.props.children;
items2[2] = this.renderLabel();
items2[3] = this.renderText();
return (
<View style={items3}>
{items2}
</View>
);
}
global.__d(_fun116345, 15211, [29, 6, 7, 15, 17, 18, 31, 27, 33, 4501, 697, 1305, 4573, 9896, 4002, 3868,
2]) /* metro module 15211, dependencies: [29, 6, 7, 15, 17, 18, 31, 27, 33, 4501, 697, 1305, 4573, 9896, 4002, 3868, 2] */;
+104 -65
View File
@@ -1,85 +1,124 @@
/* Metro module 9896; source: components_native/common/IconUploader.tsx; dependencies: [5, 31, 27, 661, 33, 4501, 4660, 6819, 1423, 9897, 5278, 1244, 2] */
import Module00005 from '../../by-id/module-00005.js'; /* Metro dependency 5 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as CreateStylesModule from '../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
function _fun77562(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#77562, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10082:6, offset: 0x01e01481, size: 296 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_5 = value.View;
const env0_6 = value.Image;
const env0_7 = (require(661) /* metro dependency 661: Constants */).UPLOAD_MEDIUM_SIZE;
value = require(33) /* metro dependency 33 */;
const env0_8 = value.jsx;
const env0_9 = value.Fragment;
const env0_10 = value.jsxs;
const env0_11 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({uploadIcon: {'position': 'absolute',
const env0_11 = (CreateStylesModule).createStyles({uploadIcon: {'position': 'absolute',
'right': -7, 'top': -7}, avatar: {'height': 64, 'width': 64, 'borderRadius': 32}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/common/IconUploader.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/common/IconUploader.tsx');
exports.default = IconUploader;
}
function IconUploader({disabled, makeURL = function(a0) {
}, type, name, icon, onUpload, style, iconStyle, onChangeIconPress}) { // fn#77563, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10082:419, offset: 0x01e015a9, size: 587 bytes, params: 2, frame: 26
var r14;
var r0;
var regexp;
var object2;
var PressableOpacity;
var intl;
disabled = !(disabled === undefined) && disabled;
type = type === undefined ? 'avatar' : type;
const styles = useStyles();
const env0_2 = env0_4.useRef(false);
if (icon == null) {
r14 = makeURL(icon);
} else {
regexp = RegExp('^data:', '');
r14 = regexp.test(icon) ? icon : makeURL(icon);
}
const fragment = <>{type === 'guild' ? icon == null && name == null ? undefined : ((Component) => <Component style={iconStyle} icon={r14} value={name} size={(require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes.XLARGE} animate />)(importDefault(6819) /* metro dependency 6819: GuildIcon */) : <Image style={[styles.avatar,
iconStyle]} source={(require(1423) /* metro dependency 1423: AvatarUtils */).makeSource(r14)} />}{disabled ? null : <Image style={styles.uploadIcon} source={importDefault(9897) /* metro dependency 9897 */} />}</>;
if (disabled) {
r0 = fragment;
} else {
object2 = {style: style};
PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r0 = <View {...object2}><PressableOpacity accessibilityRole="button" accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['MsUY/S'])} onPress={function() {
return _handleChangeIcon.apply(this, arguments);
}}>{fragment}</PressableOpacity></View>;
}
return r0;
}
function _handleChangeIcon() { // fn#77565, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10082:588, owner: IconUploader._handleChangeIcon, offset: 0x01e017f4, size: 53 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__;
return env1_3(_fun77567).apply(this, arguments);
}
function* _fun77567() { // fn#77567, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10082:645, offset: 0x01e01834, size: 165 bytes, params: 1, frame: 16
if (true) {
value = environment.__proto__.__proto__;
if (importDefault != null) {
importDefault();
function IconUploader({disabled, makeURL = function(a0) {
}, type, name, icon, onUpload, style, iconStyle, onChangeIconPress}) { // fn#77563, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10082:419, offset: 0x01e015a9, size: 587 bytes, params: 2, frame: 26
var r14;
var r0;
var regexp;
var object;
var PressableOpacity;
var intl;
disabled = !(disabled === undefined) && disabled;
type = type === undefined ? 'avatar' : type;
const styles = useStyles();
const env0_2 = ReactModule.useRef(false);
if (icon == null) {
r14 = makeURL(icon);
} else {
regexp = RegExp('^data:', '');
r14 = regexp.test(icon) ? icon : makeURL(icon);
}
if (!dependencyMap.current) {
dependencyMap.current = true;
var value4 = env3_1(env3_2[6]);
yield value4.openImagePicker({size: env3_7});
var value5 = undefined;
if (false) {
return value5;
}
var base64 = value5.base64;
if (base64 != null) {
if (require != null) {
require(base64);
const fragment = (
<>
{
type === 'guild'
? (
icon == null && name == null
? undefined
: ((Component) => <Component style={iconStyle} icon={r14} value={name} size={(require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes.XLARGE} animate />)(importDefault(6819) /* metro dependency 6819: GuildIcon */)
)
: (
<Image
style={[styles.avatar, iconStyle]}
source={(require(1423) /* metro dependency 1423: AvatarUtils */).makeSource(r14)}
/>
)
}
{
disabled
? null
: (
<Image style={styles.uploadIcon} source={importDefault(9897) /* metro dependency 9897 */} />
)
}
</>
);
if (disabled) {
r0 = fragment;
} else {
object = {style: style};
PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r0 = (
<View {...object}>
<PressableOpacity
accessibilityRole="button"
accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['MsUY/S'])}
onPress={function() {
return _handleChangeIcon.apply(this, arguments);
}}
>
{fragment}
</PressableOpacity>
</View>
);
}
return r0;
function _handleChangeIcon() { // fn#77565, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10082:588, owner: IconUploader._handleChangeIcon, offset: 0x01e017f4, size: 53 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__;
return env1_3(_fun77567).apply(this, arguments);
function* _fun77567() { // fn#77567, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10082:645, offset: 0x01e01834, size: 165 bytes, params: 1, frame: 16
if (true) {
value = environment.__proto__.__proto__;
if (importDefault != null) {
importDefault();
}
if (!dependencyMap.current) {
dependencyMap.current = true;
var value4 = env3_1(env3_2[6]);
yield value4.openImagePicker({size: env3_7});
var value5 = undefined;
if (false) {
return value5;
}
var base64 = value5.base64;
if (base64 != null) {
if (require != null) {
require(base64);
}
}
dependencyMap.current = false;
}
}
}
dependencyMap.current = false;
}
}
}
global.__d(_fun77562, 9896, [5, 31, 27, 661, 33, 4501, 4660, 6819, 1423, 9897, 5278, 1244,
2]) /* metro module 9896, dependencies: [5, 31, 27, 661, 33, 4501, 4660, 6819, 1423, 9897, 5278, 1244, 2] */;
@@ -1,51 +1,63 @@
/* Metro module 10014; source: components_native/common/ImageWithPlaceholder.tsx; dependencies: [27, 33, 477, 10015, 5475, 2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as JsxRuntimeModule from '../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
function _fun78225(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78225, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10200:6, offset: 0x01e21c40, size: 238 bytes, params: 8, frame: 20
var object2;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_2 = value.View;
const requireNativeComponent = value.requireNativeComponent;
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
object2 = {flex: 1};
object2 = {THUMBHASH: 1};
object2[1] = 'THUMBHASH';
object = {flex: 1};
object = {THUMBHASH: 1};
object[1] = 'THUMBHASH';
if (Reflect.apply((require(477) /* metro dependency 477: PlatformUtils */).isAndroid, value, [])) {
value = importDefault(10015) /* metro dependency 10015: ImageWithThumbhashPlaceholderNativeComponent */;
} else {
value = requireNativeComponent('DCDImageWithThumbhashPlaceholderView');
}
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/common/ImageWithPlaceholder.tsx');
exports.ImagePlaceholderVersions = object2;
(FileImportTrackerModule).fileFinishedImporting('components_native/common/ImageWithPlaceholder.tsx');
exports.ImagePlaceholderVersions = object;
exports.ImageWithPlaceholder = ImageWithPlaceholder;
}
function ImageWithPlaceholder(a0) { // fn#78226, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10200:431, offset: 0x01e21d2e, size: 269 bytes, params: 2, frame: 25
var r0;
const uri = a0.uri;
const placeholder = a0.placeholder;
const placeholderVersion = a0.placeholderVersion;
const alt = a0.alt;
const style = a0.style;
const object2 = {'uri': 0, 'placeholder': 0, 'placeholderVersion': 0, 'alt': 0, 'style': 0};
silentSetPrototypeOf(object2, null, undefined);
let value = copyDataProperties({}, a0, object2, undefined);
if (placeholder == null) {
var viewBindingProps = {style: style, ...value};
value = importDefault(5475) /* metro dependency 5475: FastImage */;
value = ((Component) => <Component style={env0_4} resizeMode="cover" source={{uri: uri}} alt={alt} />)(value);
value = <View {...viewBindingProps}>{value}</View>;
r0 = value;
} else if (placeholderVersion === env0_5.THUMBHASH) {
value = ((Component) => <Component {...value} {...{['style']: style}} {...{['uri']: uri}} {...{['placeholder']: placeholder}} {...{['placeholderVersion']: placeholderVersion}} {...{['alt']: alt}} />)(env0_6);
r0 = value;
} else {
var viewBindingProps = {style: style, ...value};
value = importDefault(5475) /* metro dependency 5475: FastImage */;
value = ((Component) => <Component style={env0_4} resizeMode="cover" source={{uri: uri}} alt={alt} />)(value);
value = <View {...viewBindingProps}>{value}</View>;
r0 = value;
function ImageWithPlaceholder(a0) { // fn#78226, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10200:431, offset: 0x01e21d2e, size: 269 bytes, params: 2, frame: 25
var r0;
const uri = a0.uri;
const placeholder = a0.placeholder;
const placeholderVersion = a0.placeholderVersion;
const alt = a0.alt;
const style = a0.style;
const object = {'uri': 0, 'placeholder': 0, 'placeholderVersion': 0, 'alt': 0, 'style': 0};
silentSetPrototypeOf(object, null, undefined);
let value = copyDataProperties({}, a0, object, undefined);
if (placeholder == null) {
var viewBindingProps = {style: style, ...value};
value = importDefault(5475) /* metro dependency 5475: FastImage */;
value = ((Component) => <Component style={env0_4} resizeMode="cover" source={{uri: uri}} alt={alt} />)(value);
value = (
<View {...viewBindingProps}>
{value}
</View>
);
r0 = value;
} else if (placeholderVersion === env0_5.THUMBHASH) {
value = ((Component) => <Component {...value} {...{['style']: style}} {...{['uri']: uri}} {...{['placeholder']: placeholder}} {...{['placeholderVersion']: placeholderVersion}} {...{['alt']: alt}} />)(env0_6);
r0 = value;
} else {
var viewBindingProps = {style: style, ...value};
value = importDefault(5475) /* metro dependency 5475: FastImage */;
value = ((Component) => <Component style={env0_4} resizeMode="cover" source={{uri: uri}} alt={alt} />)(value);
value = (
<View {...viewBindingProps}>
{value}
</View>
);
r0 = value;
}
return r0;
}
return r0;
}
global.__d(_fun78225, 10014, [27, 33, 477, 10015, 5475,
2]) /* metro module 10014, dependencies: [27, 33, 477, 10015, 5475, 2] */;
@@ -1,64 +1,81 @@
/* Metro module 9059; source: components_native/common/ItemSelectorActionSheet.tsx; dependencies: [31, 33, 3860, 697, 1585, 6275, 6758, 6806, 6277, 7988, 7987, 2] */
import Native from '../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UseSafeAreaInsetsNative from '../../modules/safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as UseTokenModule from '../../design/tokens/native/useToken.tsx'; /* Metro dependency 3860 */
import * as BottomSheetNativeModule from '../../design/components/Sheet/native/BottomSheet.native.tsx'; /* Metro dependency 6275 */
import * as Module06277Module from '../../by-id/module-06277.js'; /* Metro dependency 6277 */
import * as BottomSheetTitleHeaderNativeModule from '../../design/components/Sheet/native/BottomSheetTitleHeader.native.tsx'; /* Metro dependency 6758 */
import * as TableRadioRowNativeModule from '../../design/components/TableRow/native/TableRadioRow.native.tsx'; /* Metro dependency 7987 */
import * as TableRadioGroupNativeModule from '../../design/components/TableRow/native/TableRadioGroup.native.tsx'; /* Metro dependency 7988 */
function _fun70826(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#70826, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9244:6, offset: 0x01d09dfd, size: 147 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const value = require(33) /* metro dependency 33 */;
const env0_3 = value.jsx;
const env0_4 = value.jsxs;
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/common/ItemSelectorActionSheet.tsx');
ReactModule;
(FileImportTrackerModule).fileFinishedImporting('components_native/common/ItemSelectorActionSheet.tsx');
exports.default = ItemSelectorActionSheet;
}
function ItemSelectorActionSheet({title, body, items, selectedItem, onItemSelect, onClose, hasIcons}) { // fn#70827, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9244:229, offset: 0x01d09e90, size: 490 bytes, params: 2, frame: 31
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
const useToken = useTokenModule.useToken;
const TABLE_ROW_PADDING = (importDefault(697) /* metro dependency 697: native */).modules.mobile.TABLE_ROW_PADDING;
const value2 = Reflect.apply(useToken, useTokenModule, [TABLE_ROW_PADDING]);
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
const index = items.findIndex(function({value}) {
return value === selectedItem;
});
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
const object2 = {scrollable: true};
const BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
object2.header = <BottomSheetTitleHeader title={title} trailing={onClose != null ? ((ActionSheetCloseButton) => <ActionSheetCloseButton onPress={onClose} />)((require(6806) /* metro dependency 6806: ActionSheetCloseButtonNative */).ActionSheetCloseButton) : null} />;
const BottomSheetScrollView = (require(6277) /* metro dependency 6277 */).BottomSheetScrollView;
const object3 = {paddingHorizontal: value2};
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object3.paddingBottom = bottom + PX_16;
const TableRadioGroup = (require(7988) /* metro dependency 7988: TableRadioGroupNative */).TableRadioGroup;
return (
<BottomSheet {...object2}>
<BottomSheetScrollView contentContainerStyle={object3}>
{body}
<TableRadioGroup
value={index >= 0 ? index : -1}
accessibilityLabel={title}
hasIcons={hasIcons}
onChange={function(a0) {
var property = items[a0];
if (property != null) {
onItemSelect(property.value);
function ItemSelectorActionSheet({title, body, items, selectedItem, onItemSelect, onClose, hasIcons}) { // fn#70827, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9244:229, offset: 0x01d09e90, size: 490 bytes, params: 2, frame: 31
const useToken = UseTokenModule.useToken;
const TABLE_ROW_PADDING = (Native).modules.mobile.TABLE_ROW_PADDING;
const value2 = Reflect.apply(useToken, UseTokenModule, [TABLE_ROW_PADDING]);
const bottom = (UseSafeAreaInsetsNative)().bottom;
const index = items.findIndex(function({value}) {
return value === selectedItem;
});
const BottomSheet = (BottomSheetNativeModule).BottomSheet;
const object = {scrollable: true};
const BottomSheetTitleHeader = (BottomSheetTitleHeaderNativeModule).BottomSheetTitleHeader;
object.header = (
<BottomSheetTitleHeader
title={title}
trailing={onClose != null
? ((ActionSheetCloseButton) => <ActionSheetCloseButton onPress={onClose} />)((require(6806) /* metro dependency 6806: ActionSheetCloseButtonNative */).ActionSheetCloseButton)
: null}
/>
);
const BottomSheetScrollView = (Module06277Module).BottomSheetScrollView;
const object4 = {paddingHorizontal: value2};
const PX_16 = (Native).space.PX_16;
object4.paddingBottom = bottom + PX_16;
const TableRadioGroup = (TableRadioGroupNativeModule).TableRadioGroup;
return (
<BottomSheet {...object}>
<BottomSheetScrollView contentContainerStyle={object4}>
{body}
<TableRadioGroup
value={index >= 0 ? index : -1}
accessibilityLabel={title}
hasIcons={hasIcons}
onChange={function(a0) {
var property = items[a0];
if (property != null) {
onItemSelect(property.value);
}
}}
>
{items.map(_fun70830)}
</TableRadioGroup>
</BottomSheetScrollView>
</BottomSheet>
);
function _fun70830(a0, a1) { // fn#70830, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9244:899, offset: 0x01d0a0b7, size: 65 bytes, params: 3, frame: 16
const TableRadioRow = (TableRadioRowNativeModule).TableRadioRow;
return (
<TableRadioRow
label={a0.label}
value={a1}
key={a1}
/>
);
}
}}
>
{items.map(_fun70830)}
</TableRadioGroup>
</BottomSheetScrollView>
</BottomSheet>
);
}
function _fun70830(a0, a1) { // fn#70830, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9244:899, offset: 0x01d0a0b7, size: 65 bytes, params: 3, frame: 16
const TableRadioRow = (require(7987) /* metro dependency 7987: TableRadioRowNative */).TableRadioRow;
return (
<TableRadioRow
label={a0.label}
value={a1}
key={a1}
/>
);
}
}
global.__d(_fun70826, 9059, [31, 33, 3860, 697, 1585, 6275, 6758, 6806, 6277, 7988, 7987,
2]) /* metro module 9059, dependencies: [31, 33, 3860, 697, 1585, 6275, 6758, 6806, 6277, 7988, 7987, 2] */;
@@ -1,119 +1,125 @@
/* Metro module 6760; source: components_native/common/LottieAnimationView.tsx; dependencies: [29, 6, 7, 15, 17, 18, 31, 27, 33, 6761, 2] */
import ClassCallCheck from '../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import ObjectWithoutProperties from '../../by-id/module-00029-ObjectWithoutProperties.js'; /* Metro dependency 29 */
import Module06761 from '../../by-id/module-06761.js'; /* Metro dependency 6761 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
function _fun53258(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#53258, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6938:6, offset: 0x013439ef, size: 303 bytes, params: 8, frame: 19
const env0_2 = ['source', 'style', 'collapsable'];
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(29) /* metro dependency 29 */;
const env0_4 = importDefault(6) /* metro dependency 6 */;
const env0_5 = importDefault(7) /* metro dependency 7 */;
const env0_6 = importDefault(15) /* metro dependency 15 */;
const env0_7 = importDefault(17) /* metro dependency 17 */;
const env0_8 = importDefault(18) /* metro dependency 18 */;
let value = importAll(31) /* metro dependency 31 */;
const env0_9 = (require(27) /* metro dependency 27 */).View;
const env0_10 = (require(33) /* metro dependency 33 */).jsx;
let value = ReactModule;
const PureComponent = value.PureComponent;
value = _fun53262(PureComponent);
value.defaultProps = {'autoPlay': true, 'loop': true, 'collapsable': false};
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/common/LottieAnimationView.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/common/LottieAnimationView.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_53259() { // fn#53259, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6938:236, offset: 0x01343b1e, size: 94 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
function _isNativeReflectConstruct_53259() { // fn#53259, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6938:236, offset: 0x01343b1e, size: 94 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_53259_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_53259_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun53262(a0) { // fn#53262, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6938:435, offset: 0x01343b7c, size: 160 bytes, params: 2, frame: 16
const closure = LottieAnimationView;
env0_8(closure, a0);
return env0_5(closure, [{key: 'play', value: function() {
if (this.animation != null) {
this.animation.play();
function _fun53262(a0) { // fn#53262, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6938:435, offset: 0x01343b7c, size: 160 bytes, params: 2, frame: 16
const LottieAnimationView2 = LottieAnimationView;
Inherits(LottieAnimationView2, a0);
return CreateClass(LottieAnimationView2, [{key: 'play', value: function() {
if (this.animation != null) {
this.animation.play();
}
}}, {key: 'reset', value: function() {
if (this.animation != null) {
this.animation.reset();
}
}}, {key: 'pause', value: function() {
if (this.animation != null) {
this.animation.pause();
}
}}, {key: 'resume', value: function() {
if (this.animation != null) {
this.animation.resume();
}
}}, {key: 'render', value: value_53269}]);
function LottieAnimationView(a0) { // fn#53263, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6938:447, offset: 0x01343c1c, size: 151 bytes, params: 2, frame: 20
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_4;
binding(this, LottieAnimationView);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_7(LottieAnimationView);
binding = env1_6;
if (_isNativeReflectConstruct_53259()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_7(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
value.animation = null;
value.setRef = setRef;
return value;
function setRef(a0) { // fn#53264, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6938:716, owner: LottieAnimationView.setRef, offset: 0x01343cb3, size: 20 bytes, params: 2, frame: 2
env0_0.animation = a0;
}
}
}}, {key: 'reset', value: function() {
if (this.animation != null) {
this.animation.reset();
function value_53269() { // fn#53269, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6938:1120, offset: 0x01343d53, size: 226 bytes, params: 1, frame: 22
const props = this.props;
const source = props.source;
const style = props.style;
const collapsable = props.collapsable;
const value = environment.__proto__;
const binding = env1_3;
const value2 = undefined;
const value3 = binding(props, env1_2);
const r9 = value2 === (typeof source !== 'object' || source.uri ? value2 : global.JSON.stringify(source)) ? value2 : {aspectRatio: source.w / source.h};
return (
<View style={[r9, style]} collapsable={collapsable}>
{((Component) => <Component ref={this.setRef} source={source} style={[r9,
style]} {...value3} />)(Module06761)}
</View>
);
}
}}, {key: 'pause', value: function() {
if (this.animation != null) {
this.animation.pause();
}
}}, {key: 'resume', value: function() {
if (this.animation != null) {
this.animation.resume();
}
}}, {key: 'render', value: value_53269}]);
}
function LottieAnimationView(a0) { // fn#53263, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6938:447, offset: 0x01343c1c, size: 151 bytes, params: 2, frame: 20
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_4;
binding(this, LottieAnimationView);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_7(LottieAnimationView);
binding = env1_6;
if (_isNativeReflectConstruct_53259()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_7(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
value.animation = null;
value.setRef = setRef;
return value;
}
function value_53269() { // fn#53269, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6938:1120, offset: 0x01343d53, size: 226 bytes, params: 1, frame: 22
const props = this.props;
const source = props.source;
const style = props.style;
const collapsable = props.collapsable;
const value = environment.__proto__;
const binding = env1_3;
const value2 = undefined;
const value3 = binding(props, env1_2);
const r9 = value2 === (typeof source !== 'object' || source.uri ? value2 : global.JSON.stringify(source)) ? value2 : {aspectRatio: source.w / source.h};
return (
<View style={[r9, style]} collapsable={collapsable}>
{((Component) => <Component ref={this.setRef} source={source} style={[r9,
style]} {...value3} />)(importDefault(6761) /* metro dependency 6761 */)}
</View>
);
}
function LottieAnimationViewSetRef(a0) { // fn#53264, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6938:716, owner: LottieAnimationView.setRef, offset: 0x01343cb3, size: 20 bytes, params: 2, frame: 2
env0_0.animation = a0;
}
global.__d(_fun53258, 6760, [29, 6, 7, 15, 17, 18, 31, 27, 33, 6761,
2]) /* metro module 6760, dependencies: [29, 6, 7, 15, 17, 18, 31, 27, 33, 6761, 2] */;
@@ -1,30 +1,38 @@
/* Metro module 10686; source: components_native/common/MessageLoadingSpinner.tsx; dependencies: [31, 27, 33, 477, 3860, 697, 5461, 2] */
import Native from '../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as PlatformUtilsModule from '../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
import * as UseTokenModule from '../../design/tokens/native/useToken.tsx'; /* Metro dependency 3860 */
function _fun82160(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#82160, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10872:6, offset: 0x01eecd7b, size: 198 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const requireNativeComponent = (require(27) /* metro dependency 27 */).requireNativeComponent;
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
let value = require(477) /* metro dependency 477: PlatformUtils */;
ReactModule;
const requireNativeComponent = (ReactNativeModule).requireNativeComponent;
let value = PlatformUtilsModule;
value = value.isAndroid();
if (!value) {
value = requireNativeComponent('DCDMessageLoadingSpinner');
}
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/common/MessageLoadingSpinner.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/common/MessageLoadingSpinner.tsx');
exports.default = MessageLoadingSpinner;
}
function MessageLoadingSpinner(a0) { // fn#82161, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10872:214, offset: 0x01eece41, size: 186 bytes, params: 2, frame: 17
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
const useToken = useTokenModule.useToken;
const BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
if (env0_4 != null) {
return ((Component) => <Component {...a0} {...{['color']: a0.color ?? Reflect.apply(useToken, useTokenModule,
[BACKGROUND_BRAND])}} />)(env0_4);
} else {
const ActivityIndicator = (require(5461) /* metro dependency 5461: ActivityIndicatorNative */).ActivityIndicator;
return <ActivityIndicator animating={a0.animate} {...a0} />;
function MessageLoadingSpinner(a0) { // fn#82161, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10872:214, offset: 0x01eece41, size: 186 bytes, params: 2, frame: 17
const useToken = UseTokenModule.useToken;
const BACKGROUND_BRAND = (Native).colors.BACKGROUND_BRAND;
if (env0_4 != null) {
return ((Component) => <Component {...a0} {...{['color']: a0.color ?? Reflect.apply(useToken, UseTokenModule,
[BACKGROUND_BRAND])}} />)(env0_4);
} else {
const ActivityIndicator = (require(5461) /* metro dependency 5461: ActivityIndicatorNative */).ActivityIndicator;
return <ActivityIndicator animating={a0.animate} {...a0} />;
}
}
}
global.__d(_fun82160, 10686, [31, 27, 33, 477, 3860, 697, 5461,
2]) /* metro module 10686, dependencies: [31, 27, 33, 477, 3860, 697, 5461, 2] */;
@@ -1,11 +1,15 @@
/* Metro module 10971; source: components_native/common/NativeAPNGView.tsx; dependencies: [27, 477, 10972, 2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as PlatformUtilsModule from '../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
function _fun84025(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84025, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11157:6, offset: 0x01f34ca4, size: 151 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const requireNativeComponent = (require(27) /* metro dependency 27 */).requireNativeComponent;
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
const r1 = platformUtilsModule.isAndroid() ? (require(10972) /* metro dependency 10972: APNGStickerNativeComponent */).default : requireNativeComponent('APNGStickerView');
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/common/NativeAPNGView.tsx');
const requireNativeComponent = (ReactNativeModule).requireNativeComponent;
const r1 = PlatformUtilsModule.isAndroid() ? (require(10972) /* metro dependency 10972: APNGStickerNativeComponent */).default : requireNativeComponent('APNGStickerView');
(FileImportTrackerModule).fileFinishedImporting('components_native/common/NativeAPNGView.tsx');
exports.default = r1;
}
global.__d(_fun84025, 10971, [27, 477, 10972, 2]) /* metro module 10971, dependencies: [27, 477, 10972, 2] */;
@@ -1,16 +1,21 @@
/* Metro module 9548; source: components_native/common/NativePortalView.tsx; dependencies: [31, 27, 33, 4501, 477, 9549, 9550, 2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as PlatformUtilsModule from '../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
import * as CreateStylesModule from '../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
function _fun74544(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#74544, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9734:6, offset: 0x01d91b00, size: 398 bytes, params: 8, frame: 26
var value5;
var value6;
let env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const {requireNativeComponent, NativeEventEmitter, NativeModules} = require(27) /* metro dependency 27 */;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
const env0_5 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({base: {overflow: 'hidden'}});
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (platformUtilsModule.isAndroid()) {
let value = ReactModule;
const {requireNativeComponent, NativeEventEmitter, NativeModules} = ReactNativeModule;
const env0_5 = (CreateStylesModule).createStyles({base: {overflow: 'hidden'}});
if (PlatformUtilsModule.isAndroid()) {
value6 = importDefault(9549) /* metro dependency 9549: PortalViewNativeComponent */;
} else {
value5 = requireNativeComponent('DCDPortalView');
@@ -21,7 +26,7 @@ function _fun74544(global, require, importDefault, importAll, module, exports, d
const Set = global.Set;
const set = new Set();
value = value.memo(_fun74545);
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/common/NativePortalView.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/common/NativePortalView.tsx');
exports.default = value;
exports.createPortalControls = function(a0) {
var env0_0 = a0;
@@ -29,144 +34,149 @@ function _fun74544(global, require, importDefault, importAll, module, exports, d
};
exports.markPortalAlive = markPortalAlive;
exports.isPortalExpired = isPortalExpired;
}
function _fun74545(a0) { // fn#74545, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9734:381, offset: 0x01d91c8e, size: 439 bytes, params: 2, frame: 23
var r0;
const style = a0.style;
const children = a0.children;
const paused = a0.paused;
const muted = a0.muted;
const onLoad = a0.onLoad;
const object2 = {'style': 0, 'children': 0, 'paused': 0, 'muted': 0, 'onLoad': 0};
silentSetPrototypeOf(object2, null, undefined);
let value = copyDataProperties({}, a0, object2, undefined);
const env0_3 = value;
const styles = useStyles();
if (children != null) {
throw new global.Error('The <NativePortalView> component cannot contain children.');
}
let binding = env0_3;
binding.useLayoutEffect(_fun74546, [value.portal, paused]);
binding.useLayoutEffect(_fun74547, [value.portal, muted]);
binding.useLayoutEffect(_fun74548, [onLoad, value.portal]);
const value3 = binding.useCallback(_fun74550, [onLoad, value.portal]);
const isAndroid2 = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid();
binding = env0_6;
if (isAndroid2) {
value = ((Component) => <Component {...value} {...{['style']: [styles.base,
style]}} {...{['onPortalViewLoaded']: value3}} />)(binding);
r0 = value;
} else {
value = ((Component) => <Component {...value} {...{['style']: [styles.base, style]}} />)(binding);
r0 = value;
}
return r0;
}
function createPortalControls(a0) { // fn#74551, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9734:1248, offset: 0x01d91ffe, size: 49 bytes, params: 2, frame: 3
const env0_0 = a0;
return {seek: seek_74552, pause: pause_74553, useSubscribe: useSubscribe};
}
function markPortalAlive(a0) { // fn#74561, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9734:1849, offset: 0x01d92233, size: 24 bytes, params: 2, frame: 11
env0_10.delete(a0);
}
function _fun74546() { // fn#74546, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9734:560, offset: 0x01d91e45, size: 59 bytes, params: 1, frame: 13
var value2;
if (env0_3.portal != null) {
value2 = environment.__proto__;
MediaPlayerManager.toggle(env0_3.portal, !paused);
}
}
function _fun74547() { // fn#74547, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9734:638, offset: 0x01d91e80, size: 56 bytes, params: 1, frame: 13
var value2;
if (env0_3.portal != null) {
value2 = environment.__proto__;
MediaPlayerManager.setMuted(env0_3.portal, muted);
}
}
function _fun74548() { // fn#74548, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9734:717, offset: 0x01d91eb8, size: 107 bytes, params: 1, frame: 14
if (!((require(477) /* metro dependency 477: PlatformUtils */).isAndroid() || onLoad == null)) {
onLoad();
}
MediaPlayerManager.setLoopPlayback(env0_3.portal, true);
return _fun74549;
}
function _fun74550({nativeEvent}) { // fn#74550, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9734:957, offset: 0x01d91fc6, size: 56 bytes, params: 2, frame: 10
if (env0_3.portal === nativeEvent.portal) {
if (onLoad != null) {
onLoad();
function _fun74545(a0) { // fn#74545, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9734:381, offset: 0x01d91c8e, size: 439 bytes, params: 2, frame: 23
var r0;
const style = a0.style;
const children = a0.children;
const paused = a0.paused;
const muted = a0.muted;
const onLoad = a0.onLoad;
const object = {'style': 0, 'children': 0, 'paused': 0, 'muted': 0, 'onLoad': 0};
silentSetPrototypeOf(object, null, undefined);
let value = copyDataProperties({}, a0, object, undefined);
const env0_3 = value;
const styles = useStyles();
if (children != null) {
throw new global.Error('The <NativePortalView> component cannot contain children.');
}
let binding = env0_3;
binding.useLayoutEffect(_fun74546, [value.portal, paused]);
binding.useLayoutEffect(_fun74547, [value.portal, muted]);
binding.useLayoutEffect(_fun74548, [onLoad, value.portal]);
const value3 = binding.useCallback(_fun74550, [onLoad, value.portal]);
const isAndroid2 = (PlatformUtilsModule).isAndroid();
binding = env0_6;
if (isAndroid2) {
value = ((Component) => <Component {...value} {...{['style']: [styles.base,
style]}} {...{['onPortalViewLoaded']: value3}} />)(binding);
r0 = value;
} else {
value = ((Component) => <Component {...value} {...{['style']: [styles.base, style]}} />)(binding);
r0 = value;
}
return r0;
function _fun74546() { // fn#74546, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9734:560, offset: 0x01d91e45, size: 59 bytes, params: 1, frame: 13
var value2;
if (env0_3.portal != null) {
value2 = environment.__proto__;
MediaPlayerManager.toggle(env0_3.portal, !paused);
}
}
function _fun74547() { // fn#74547, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9734:638, offset: 0x01d91e80, size: 56 bytes, params: 1, frame: 13
var value2;
if (env0_3.portal != null) {
value2 = environment.__proto__;
MediaPlayerManager.setMuted(env0_3.portal, muted);
}
}
function _fun74548() { // fn#74548, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9734:717, offset: 0x01d91eb8, size: 107 bytes, params: 1, frame: 14
if (!((require(477) /* metro dependency 477: PlatformUtils */).isAndroid() || onLoad == null)) {
onLoad();
}
MediaPlayerManager.setLoopPlayback(env0_3.portal, true);
return _fun74549;
function _fun74549() { // fn#74549, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9734:787, offset: 0x01d91f23, size: 163 bytes, params: 1, frame: 15
var defaultImport;
MediaPlayerManager.setLoopPlayback(env1_3.portal, false);
if (PlatformUtilsModule.isAndroid()) {
defaultImport = importDefault(9550) /* metro dependency 9550: NativePortalFromNativeModule */;
defaultImport.unregisterView(env1_3.portal);
} else {
DCDPortalViewManager.unregisterView(env1_3.portal);
}
const binding = env2_10;
binding.add(env1_3.portal);
}
}
function _fun74550({nativeEvent}) { // fn#74550, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9734:957, offset: 0x01d91fc6, size: 56 bytes, params: 2, frame: 10
if (env0_3.portal === nativeEvent.portal) {
if (onLoad != null) {
onLoad();
}
}
}
}
}
function createPortalControlsSeek(a0) { // fn#74552, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9734:1288, owner: createPortalControls.seek, offset: 0x01d9202f, size: 35 bytes, params: 2, frame: 13
MediaPlayerManager.changeProgress(env0_0, a0);
}
function createPortalControls(a0) { // fn#74551, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9734:1248, offset: 0x01d91ffe, size: 49 bytes, params: 2, frame: 3
const env0_0 = a0;
return {seek: seek_74552, pause: pause_74553, useSubscribe: useSubscribe_74554};
function createPortalControlsSeek(a0) { // fn#74552, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9734:1288, owner: createPortalControls.seek, offset: 0x01d9202f, size: 35 bytes, params: 2, frame: 13
MediaPlayerManager.changeProgress(env0_0, a0);
}
function createPortalControlsPause(a0) { // fn#74553, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9734:1345, owner: createPortalControls.pause, offset: 0x01d92052, size: 36 bytes, params: 2, frame: 13
MediaPlayerManager.toggle(env0_0, !a0);
}
function createPortalControlsPause(a0) { // fn#74553, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9734:1345, owner: createPortalControls.pause, offset: 0x01d92052, size: 36 bytes, params: 2, frame: 13
MediaPlayerManager.toggle(env0_0, !a0);
}
function createPortalControlsUseSubscribe(a0, a1, a2) { // fn#74554, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9734:1397, owner: createPortalControls.useSubscribe, offset: 0x01d92076, size: 35 bytes, params: 4, frame: 17
useSubscribe_body(env0_0, a0, a1, a2);
}
function createPortalControlsUseSubscribe(a0, a1, a2) { // fn#74554, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9734:1397, owner: createPortalControls.useSubscribe, offset: 0x01d92076, size: 35 bytes, params: 4, frame: 17
useSubscribe_body(env0_0, a0, a1, a2);
function useSubscribe_body(a0, a1, a2, a3) { // fn#74555, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9734:1418, owner: createPortalControls.useSubscribe.body, offset: 0x01d92099, size: 79 bytes, params: 5, frame: 17
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const env0_3 = a3;
env2_3.useEffect(_fun74556, [a0, a2, a1, a3]);
function _fun74556() { // fn#74556, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9734:1462, offset: 0x01d920e8, size: 113 bytes, params: 1, frame: 15
const env0_0 = env3_9.addListener('MediaPlayerProgress', _fun74557);
const env0_1 = env3_9.addListener('MediaPlayerDownloadProgress', _fun74558);
const env0_2 = env3_9.addListener('MediaPlayerPause', _fun74559);
return _fun74560;
function _fun74557({id, time, duration}) { // fn#74557, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9734:1510, offset: 0x01d92159, size: 58 bytes, params: 2, frame: 14
if (id === env1_0 && duration > 0) {
require(time, duration);
}
}
function _fun74558({id, progressPercent, totalDurationSeconds}) { // fn#74558, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9734:1608, offset: 0x01d92193, size: 71 bytes, params: 2, frame: 13
if (id === env1_0 && totalDurationSeconds > 0 && importAll != null) {
importAll(progressPercent);
}
}
function _fun74559({id, paused}) { // fn#74559, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9734:1725, offset: 0x01d921da, size: 40 bytes, params: 2, frame: 12
if (id === env1_0) {
importDefault(paused);
}
}
function _fun74560() { // fn#74560, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9734:1766, offset: 0x01d92202, size: 49 bytes, params: 1, frame: 10
env0_0.remove();
env0_1.remove();
env0_2.remove();
}
}
}
}
function _fun74549() { // fn#74549, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9734:787, offset: 0x01d91f23, size: 163 bytes, params: 1, frame: 15
var defaultImport;
MediaPlayerManager.setLoopPlayback(env1_3.portal, false);
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (platformUtilsModule.isAndroid()) {
defaultImport = importDefault(9550) /* metro dependency 9550: NativePortalFromNativeModule */;
defaultImport.unregisterView(env1_3.portal);
} else {
DCDPortalViewManager.unregisterView(env1_3.portal);
}
const binding = env2_10;
binding.add(env1_3.portal);
}
function useSubscribe_body(a0, a1, a2, a3) { // fn#74555, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9734:1418, owner: createPortalControls.useSubscribe.body, offset: 0x01d92099, size: 79 bytes, params: 5, frame: 17
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const env0_3 = a3;
env2_3.useEffect(_fun74556, [a0, a2, a1, a3]);
}
function _fun74556() { // fn#74556, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9734:1462, offset: 0x01d920e8, size: 113 bytes, params: 1, frame: 15
const env0_0 = env3_9.addListener('MediaPlayerProgress', _fun74557);
const env0_1 = env3_9.addListener('MediaPlayerDownloadProgress', _fun74558);
const env0_2 = env3_9.addListener('MediaPlayerPause', _fun74559);
return _fun74560;
}
function _fun74557({id, time, duration}) { // fn#74557, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9734:1510, offset: 0x01d92159, size: 58 bytes, params: 2, frame: 14
if (id === env1_0 && duration > 0) {
require(time, duration);
function markPortalAlive(a0) { // fn#74561, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9734:1849, offset: 0x01d92233, size: 24 bytes, params: 2, frame: 11
env0_10.delete(a0);
}
}
function _fun74558({id, progressPercent, totalDurationSeconds}) { // fn#74558, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9734:1608, offset: 0x01d92193, size: 71 bytes, params: 2, frame: 13
if (id === env1_0 && totalDurationSeconds > 0 && importAll != null) {
importAll(progressPercent);
function isPortalExpired(a0) { // fn#74562, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9734:1908, offset: 0x00cfc121, size: 22 bytes, params: 2, frame: 11
return env0_10.has(a0);
}
}
function _fun74559({id, paused}) { // fn#74559, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9734:1725, offset: 0x01d921da, size: 40 bytes, params: 2, frame: 12
if (id === env1_0) {
importDefault(paused);
}
}
function _fun74560() { // fn#74560, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9734:1766, offset: 0x01d92202, size: 49 bytes, params: 1, frame: 10
env0_0.remove();
env0_1.remove();
env0_2.remove();
}
global.__d(_fun74544, 9548, [31, 27, 33, 4501, 477, 9549, 9550,
2]) /* metro module 9548, dependencies: [31, 27, 33, 4501, 477, 9549, 9550, 2] */;
@@ -1,30 +1,35 @@
/* Metro module 10904; source: components_native/common/Notifications.tsx; dependencies: [31, 10905, 33, 566, 10932, 2] */
import InAppNotificationStore from '../../stores/native/InAppNotificationStore.tsx'; /* Metro dependency 10905 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
function _fun83467(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83467, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11090:6, offset: 0x01f1be1a, size: 154 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const inAppNotificationStore = importDefault(10905) /* metro dependency 10905: InAppNotificationStore */;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/common/Notifications.tsx');
ReactModule;
(FileImportTrackerModule).fileFinishedImporting('components_native/common/Notifications.tsx');
exports.default = Notifications;
}
function Notifications() { // fn#83468, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11090:214, offset: 0x01f1beb4, size: 111 bytes, params: 1, frame: 17
var r0;
var value;
const currentNotification = (require(566) /* metro dependency 566: flux */).useStateFromStores([InAppNotificationStore],
function() {
return InAppNotificationStore.getCurrentNotification();
});
const value2 = null;
if (value2 == currentNotification) {
r0 = value2;
} else {
value = importDefault(10932) /* metro dependency 10932: InAppNotificationContainer */;
value = ((Component) => <Component notification={currentNotification} key={currentNotification.key} />)(value);
r0 = value;
function Notifications() { // fn#83468, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11090:214, offset: 0x01f1beb4, size: 111 bytes, params: 1, frame: 17
var r0;
var value;
const currentNotification = (require(566) /* metro dependency 566: flux */).useStateFromStores([InAppNotificationStore],
function() {
return InAppNotificationStore.getCurrentNotification();
});
const value2 = null;
if (value2 == currentNotification) {
r0 = value2;
} else {
value = importDefault(10932) /* metro dependency 10932: InAppNotificationContainer */;
value = ((Component) => <Component notification={currentNotification} key={currentNotification.key} />)(value);
r0 = value;
}
return r0;
}
return r0;
}
global.__d(_fun83467, 10904, [31, 10905, 33, 566, 10932,
2]) /* metro module 10904, dependencies: [31, 10905, 33, 566, 10932, 2] */;
+88 -72
View File
@@ -1,12 +1,19 @@
/* Metro module 11428; source: components_native/common/RolePill.tsx; dependencies: [31, 27, 661, 33, 4501, 697, 3829, 6793, 6797, 3856, 5278, 6812, 4573, 2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as UserSettingsModule from '../../modules/user_settings/UserSettings.tsx'; /* Metro dependency 3829 */
import * as TextModule from '../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as PressablesModule from '../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as RoleIconUtilsModule from '../../modules/guild_boosting/native/RoleIconUtils.tsx'; /* Metro dependency 6793 */
function _fun87482(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87482, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11614:6, offset: 0x01fc0337, size: 466 bytes, params: 8, frame: 23
var object6;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
let value = require(661) /* metro dependency 661: Constants */;
ReactModule;
let value = ConstantsModule;
const env0_4 = value.EMPTY_STRING_SNOWFLAKE_ID;
const env0_5 = value.MAX_VISUAL_ROLE_LENGTH;
value = require(33) /* metro dependency 33 */;
@@ -14,79 +21,88 @@ function _fun87482(global, require, importDefault, importAll, module, exports, d
const env0_7 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object6 = {};
const object7 = {'marginRight': 4, 'marginBottom': 4};
object7.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object6.container = object7;
const object8 = {'flexDirection': 'row', 'alignItems': 'center', 'paddingHorizontal': 8, 'paddingVertical': 6};
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object = {};
const object2 = {'marginRight': 4, 'marginBottom': 4};
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object.container = object2;
const object3 = {'flexDirection': 'row', 'alignItems': 'center', 'paddingHorizontal': 8, 'paddingVertical': 6};
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object8.backgroundColor = BACKGROUND_BASE_LOWEST;
object6.pill = object8;
const object9 = {'marginRight': 8, 'borderRadius': null, 'height': 12, 'width': 12};
object9.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object3.backgroundColor = BACKGROUND_BASE_LOWEST;
object.pill = object3;
const object4 = {'marginRight': 8, 'borderRadius': null, 'height': 12, 'width': 12};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
const ICON_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.ICON_MUTED;
object9.backgroundColor = ICON_MUTED;
object6.bubble = object9;
const object10 = {'marginRight': 8, 'borderRadius': null, 'height': 12, 'width': 12};
object10.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object6.verifiedContainer = object10;
object6.roleIcon = {paddingRight: 4};
const env0_8 = Reflect.apply(createStyles, value, [object6]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/common/RolePill.tsx');
object4.backgroundColor = ICON_MUTED;
object.bubble = object4;
const object5 = {'marginRight': 8, 'borderRadius': null, 'height': 12, 'width': 12};
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object.verifiedContainer = object5;
object.roleIcon = {paddingRight: 4};
const env0_8 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('components_native/common/RolePill.tsx');
exports.default = RolePill;
}
function RolePill({role, guildId, disableInteraction, color}) { // fn#87483, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11614:708, offset: 0x01fc0509, size: 616 bytes, params: 2, frame: 33
var r18;
var r10;
var VerifiedRoleIcon;
const DeveloperMode = (UserSettingsModule).DeveloperMode;
const value3 = DeveloperMode.useSetting();
const value4 = (RoleIconUtilsModule).useRoleIcon({guildId: guildId,
roleId: role.id, size: 12});
const r11 = role.name.length > MAX_VISUAL_ROLE_LENGTH ? '' + role.name.slice(0,
MAX_VISUAL_ROLE_LENGTH) + '...' : role.name;
const r19 = color ?? role.colorString;
const guild_connections = role.tags?.guild_connections;
const styles = useStyles();
const PressableHighlight = (PressablesModule).PressableHighlight;
object = {disabled: value3 ? disableInteraction : !value3, style: styles.container, onPress: onPress_87484,
accessible: false};
if (guild_connections !== undefined) {
VerifiedRoleIcon = importDefault(6812) /* metro dependency 6812: VerifiedRoleIcon */;
var defaultImportProps = {style: styles.verifiedContainer, roleId: role.id};
r18 = guildId ?? EMPTY_STRING_SNOWFLAKE_ID;
defaultImportProps.guildId = r18;
r18 = r19 ?? undefined;
defaultImportProps.roleColor = r18;
defaultImportProps.size = 14;
defaultImportProps.displayRoleIcon = false;
r10 = <VerifiedRoleIcon {...defaultImportProps} />;
} else {
r10 = <View style={[styles.bubble, r19 != null ? {backgroundColor: r19} : {}]} />;
}
const r9 = (
value4 != null
? (
<View style={styles.roleIcon}>
{value4}
</View>
)
: null
);
const Text = (TextModule).Text;
return (
<PressableHighlight {...object}>
<View style={styles.pill}>
{r10}
{r9}
<Text variant="text-xs/semibold" color="interactive-text-active">
{r11}
</Text>
</View>
</PressableHighlight>
);
function RolePillOnPress() { // fn#87484, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11614:1101, owner: RolePill.onPress, offset: 0x01fc0771, size: 77 bytes, params: 1, frame: 15
let value = environment.__proto__;
value = require(6797) /* metro dependency 6797: ClipboardUtilsNative */;
value.copy(role.id);
value = require(3856) /* metro dependency 3856: ToastUtils */;
value.roleIdCopied(name);
}
function RolePill({role, guildId, disableInteraction, color}) { // fn#87483, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11614:708, offset: 0x01fc0509, size: 616 bytes, params: 2, frame: 33
var object2;
var r18;
var r10;
var VerifiedRoleIcon;
const DeveloperMode = (require(3829) /* metro dependency 3829: UserSettings */).DeveloperMode;
const value3 = DeveloperMode.useSetting();
const value4 = (require(6793) /* metro dependency 6793: RoleIconUtils */).useRoleIcon({guildId: guildId,
roleId: role.id, size: 12});
const r11 = role.name.length > MAX_VISUAL_ROLE_LENGTH ? '' + role.name.slice(0,
MAX_VISUAL_ROLE_LENGTH) + '...' : role.name;
const r19 = color ?? role.colorString;
const guild_connections = role.tags?.guild_connections;
const styles = useStyles();
const PressableHighlight = (require(5278) /* metro dependency 5278: Pressables */).PressableHighlight;
object2 = {disabled: value3 ? disableInteraction : !value3, style: styles.container, onPress: onPress_87484,
accessible: false};
if (guild_connections !== undefined) {
VerifiedRoleIcon = importDefault(6812) /* metro dependency 6812: VerifiedRoleIcon */;
var defaultImportProps = {style: styles.verifiedContainer, roleId: role.id};
r18 = guildId ?? EMPTY_STRING_SNOWFLAKE_ID;
defaultImportProps.guildId = r18;
r18 = r19 ?? undefined;
defaultImportProps.roleColor = r18;
defaultImportProps.size = 14;
defaultImportProps.displayRoleIcon = false;
r10 = <VerifiedRoleIcon {...defaultImportProps} />;
} else {
r10 = <View style={[styles.bubble, r19 != null ? {backgroundColor: r19} : {}]} />;
}
const r9 = value4 != null ? <View style={styles.roleIcon}>{value4}</View> : null;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<PressableHighlight {...object2}>
<View style={styles.pill}>
{r10}
{r9}
<Text variant="text-xs/semibold" color="interactive-text-active">
{r11}
</Text>
</View>
</PressableHighlight>
);
}
function RolePillOnPress() { // fn#87484, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11614:1101, owner: RolePill.onPress, offset: 0x01fc0771, size: 77 bytes, params: 1, frame: 15
let value = environment.__proto__;
value = require(6797) /* metro dependency 6797: ClipboardUtilsNative */;
value.copy(role.id);
value = require(3856) /* metro dependency 3856: ToastUtils */;
value.roleIdCopied(name);
}
global.__d(_fun87482, 11428, [31, 27, 661, 33, 4501, 697, 3829, 6793, 6797, 3856, 5278, 6812, 4573,
2]) /* metro module 11428, dependencies: [31, 27, 661, 33, 4501, 697, 3829, 6793, 6797, 3856, 5278, 6812, 4573, 2] */;
@@ -1,57 +1,64 @@
/* Metro module 6618; source: components_native/common/SafeAreaView.tsx; dependencies: [31, 27, 33, 1585, 6619, 644, 2] */
import Module00644 from '../../by-id/module-00644.js'; /* Metro dependency 644 */
import UseSafeAreaInsetsNative from '../../modules/safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import UseRefValue from '../../hooks/useRefValue.tsx'; /* Metro dependency 6619 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
function _fun52319(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#52319, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6796:6, offset: 0x01326bb0, size: 157 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/common/SafeAreaView.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/common/SafeAreaView.tsx');
exports.SafeAreaPaddingView = SafeAreaPaddingView;
}
function SafeAreaPaddingView(a0) { // fn#52320, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6796:232, offset: 0x01326c4d, size: 467 bytes, params: 2, frame: 27
var r16;
let top = a0.top;
const value = undefined;
top = !(top === value) && top;
let bottom = a0.bottom;
bottom = !(bottom === value) && bottom;
let left = a0.left;
left = !(left === value) && left;
let right = a0.right;
right = !(right === value) && right;
const style = a0.style;
const object = {'top': 0, 'bottom': 0, 'left': 0, 'right': 0, 'style': 0};
silentSetPrototypeOf(object, null, undefined);
const value6 = copyDataProperties({}, a0, object, r16);
let env0_2 = value;
const value8 = (UseSafeAreaInsetsNative)();
const value9 = env0_2.useRef(null);
const r2 = style ?? ({});
r16 = r2.paddingTop || r2.paddingVertical;
r16 = !r16 ? 0 : r16;
let r14 = r2.paddingBottom || r2.paddingVertical;
r14 = !r14 ? 0 : r14;
let r12 = r2.paddingLeft || r2.paddingHorizontal;
r12 = !r12 ? 0 : r12;
let r9 = r2.paddingRight || r2.paddingHorizontal;
r9 = !r9 ? 0 : r9;
const items2 = [r2];
items2[1] = top ? {paddingTop: value8.top + r16} : value;
items2[2] = bottom ? {paddingBottom: value8.bottom + r14} : value;
items2[3] = left ? {paddingLeft: value8.left + r12} : value;
items2[4] = right ? {paddingRight: value8.right + r9} : value;
const value14 = (UseRefValue)(value9);
const value15 = (Module00644)(items2, value14);
env0_2 = value15;
const r5 = value15 ? value14 : items2;
env0_2.useInsertionEffect(_fun52321);
return <View style={r5} {...value6} />;
function _fun52321() { // fn#52321, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6796:729, offset: 0x01326e20, size: 28 bytes, params: 1, frame: 2
if (!env0_2) {
env0_0.current = env0_1;
}
}
function SafeAreaPaddingView(a0) { // fn#52320, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6796:232, offset: 0x01326c4d, size: 467 bytes, params: 2, frame: 27
var r16;
let top = a0.top;
const value = undefined;
top = !(top === value) && top;
let bottom = a0.bottom;
bottom = !(bottom === value) && bottom;
let left = a0.left;
left = !(left === value) && left;
let right = a0.right;
right = !(right === value) && right;
const style = a0.style;
const object2 = {'top': 0, 'bottom': 0, 'left': 0, 'right': 0, 'style': 0};
silentSetPrototypeOf(object2, null, undefined);
const value6 = copyDataProperties({}, a0, object2, r16);
let env0_2 = value;
const value8 = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
const value9 = env0_2.useRef(null);
const r2 = style ?? ({});
r16 = r2.paddingTop || r2.paddingVertical;
r16 = !r16 ? 0 : r16;
let r14 = r2.paddingBottom || r2.paddingVertical;
r14 = !r14 ? 0 : r14;
let r12 = r2.paddingLeft || r2.paddingHorizontal;
r12 = !r12 ? 0 : r12;
let r9 = r2.paddingRight || r2.paddingHorizontal;
r9 = !r9 ? 0 : r9;
const items2 = [r2];
items2[1] = top ? {paddingTop: value8.top + r16} : value;
items2[2] = bottom ? {paddingBottom: value8.bottom + r14} : value;
items2[3] = left ? {paddingLeft: value8.left + r12} : value;
items2[4] = right ? {paddingRight: value8.right + r9} : value;
const value14 = (importDefault(6619) /* metro dependency 6619: useRefValue */)(value9);
const value15 = (importDefault(644) /* metro dependency 644 */)(items2, value14);
env0_2 = value15;
const r5 = value15 ? value14 : items2;
env0_2.useInsertionEffect(_fun52321);
return <View style={r5} {...value6} />;
}
function _fun52321() { // fn#52321, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6796:729, offset: 0x01326e20, size: 28 bytes, params: 1, frame: 2
if (!env0_2) {
env0_0.current = env0_1;
}
}
global.__d(_fun52319, 6618, [31, 27, 33, 1585, 6619, 644,
2]) /* metro module 6618, dependencies: [31, 27, 33, 1585, 6619, 644, 2] */;
@@ -1,92 +1,124 @@
/* Metro module 12362; source: components_native/common/SequencedLottieAnimationView.tsx; dependencies: [29, 6, 7, 15, 17, 18, 31, 27, 33, 6761, 2] */
import ClassCallCheck from '../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import ObjectWithoutProperties from '../../by-id/module-00029-ObjectWithoutProperties.js'; /* Metro dependency 29 */
import Module06761 from '../../by-id/module-06761.js'; /* Metro dependency 6761 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
function _fun94254(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#94254, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12548:6, offset: 0x020f281a, size: 300 bytes, params: 8, frame: 20
const env0_2 = ['source', 'style'];
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(29) /* metro dependency 29 */;
const env0_4 = importDefault(6) /* metro dependency 6 */;
const env0_5 = importDefault(7) /* metro dependency 7 */;
const env0_6 = importDefault(15) /* metro dependency 15 */;
const env0_7 = importDefault(17) /* metro dependency 17 */;
const env0_8 = importDefault(18) /* metro dependency 18 */;
let value = importAll(31) /* metro dependency 31 */;
const env0_9 = (require(27) /* metro dependency 27 */).View;
const env0_10 = (require(33) /* metro dependency 33 */).jsx;
let value = ReactModule;
const PureComponent = value.PureComponent;
value = _fun94258(PureComponent);
value.defaultProps = {autoPlay: true};
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/common/SequencedLottieAnimationView.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/common/SequencedLottieAnimationView.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_94255() { // fn#94255, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12548:222, offset: 0x020f2946, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_94255_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun94258(a0) { // fn#94258, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12548:421, offset: 0x020f29a8, size: 147 bytes, params: 2, frame: 16
const closure = SequencedLottieAnimationView;
env0_8(closure, a0);
return env0_5(closure, [{key: 'componentDidMount', value: function() {
this.playScene(this.props.nextScene);
}}, {key: 'componentDidUpdate', value: function() {
var nextScene = this.props.nextScene;
if (nextScene !== this.currentScene) {
this.playScene(nextScene);
function _isNativeReflectConstruct_94255() { // fn#94255, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12548:222, offset: 0x020f2946, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
}}, {key: 'playScene', value: value_94264}, {key: 'render', value: value_94265}]);
}
function SequencedLottieAnimationView(a0) { // fn#94259, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12548:433, offset: 0x020f2a3b, size: 193 bytes, params: 2, frame: 20
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_4;
binding(this, SequencedLottieAnimationView);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_7(SequencedLottieAnimationView);
binding = env1_6;
if (_isNativeReflectConstruct_94255()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_7(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
return (_isNativeReflectConstruct_94255_isNativeReflectConstruct = function() {
return !!result;
})();
}
value = binding(this, r0);
value.animationRef = null;
value.currentScene = value.props.nextScene;
value.isUnmounted = false;
value.handleComplete = handleComplete_94260;
value.handleSetRef = handleSetRef;
return value;
function _fun94258(a0) { // fn#94258, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12548:421, offset: 0x020f29a8, size: 147 bytes, params: 2, frame: 16
const SequencedLottieAnimationView2 = SequencedLottieAnimationView;
Inherits(SequencedLottieAnimationView2, a0);
return CreateClass(SequencedLottieAnimationView2, [{key: 'componentDidMount', value: function() {
this.playScene(this.props.nextScene);
}}, {key: 'componentDidUpdate', value: function() {
var nextScene = this.props.nextScene;
if (nextScene !== this.currentScene) {
this.playScene(nextScene);
}
}}, {key: 'playScene', value: value_94264}, {key: 'render', value: value_94265}]);
function SequencedLottieAnimationView(a0) { // fn#94259, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12548:433, offset: 0x020f2a3b, size: 193 bytes, params: 2, frame: 20
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_4;
binding(this, SequencedLottieAnimationView);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_7(SequencedLottieAnimationView);
binding = env1_6;
if (_isNativeReflectConstruct_94255()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_7(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
value.animationRef = null;
value.currentScene = value.props.nextScene;
value.isUnmounted = false;
value.handleComplete = handleComplete_94260;
value.handleSetRef = handleSetRef;
return value;
function SequencedLottieAnimationViewHandleComplete() { // fn#94260, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12548:790, owner: SequencedLottieAnimationView.handleComplete, offset: 0x020f2afc, size: 45 bytes, params: 1, frame: 11
const onSceneComplete = env0_0.props.onSceneComplete;
if (onSceneComplete != null) {
onSceneComplete(env0_0.currentScene);
}
}
function handleSetRef(a0) { // fn#94261, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12548:868, owner: SequencedLottieAnimationView.handleSetRef, offset: 0x020f2b29, size: 20 bytes, params: 2, frame: 2
env0_0.animationRef = a0;
}
}
function value_94265() { // fn#94265, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12548:1419, offset: 0x020f2c0d, size: 235 bytes, params: 1, frame: 21
const props = this.props;
const source = props.source;
const style = props.style;
const value = environment.__proto__;
const binding = env1_3;
const value2 = undefined;
const value3 = binding(props, env1_2);
const r10 = value2 === (typeof source !== 'object' || source.uri ? value2 : global.JSON.stringify(source)) ? value2 : {aspectRatio: source.w / source.h};
return (
<View style={[r10, style]}>
{((Component) => <Component source={source} style={[r10,
style]} {...value3} {...{['ref']: this.handleSetRef}} {...{['onAnimationFinish']: this.handleComplete}} />)(Module06761)}
</View>
);
}
}
}
function value_94264(a0) { // fn#94264, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12548:1190, offset: 0x020f2b81, size: 140 bytes, params: 2, frame: 17
@@ -111,31 +143,5 @@ function value_94264(a0) { // fn#94264, source: /ci/build/discord/discord/discor
this.currentScene = a0;
}
function value_94265() { // fn#94265, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12548:1419, offset: 0x020f2c0d, size: 235 bytes, params: 1, frame: 21
const props = this.props;
const source = props.source;
const style = props.style;
const value = environment.__proto__;
const binding = env1_3;
const value2 = undefined;
const value3 = binding(props, env1_2);
const r10 = value2 === (typeof source !== 'object' || source.uri ? value2 : global.JSON.stringify(source)) ? value2 : {aspectRatio: source.w / source.h};
return (
<View style={[r10, style]}>
{((Component) => <Component source={source} style={[r10,
style]} {...value3} {...{['ref']: this.handleSetRef}} {...{['onAnimationFinish']: this.handleComplete}} />)(importDefault(6761) /* metro dependency 6761 */)}
</View>
);
}
function SequencedLottieAnimationViewHandleComplete() { // fn#94260, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12548:790, owner: SequencedLottieAnimationView.handleComplete, offset: 0x020f2afc, size: 45 bytes, params: 1, frame: 11
const onSceneComplete = env0_0.props.onSceneComplete;
if (onSceneComplete != null) {
onSceneComplete(env0_0.currentScene);
}
}
function handleSetRef(a0) { // fn#94261, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12548:868, owner: SequencedLottieAnimationView.handleSetRef, offset: 0x020f2b29, size: 20 bytes, params: 2, frame: 2
env0_0.animationRef = a0;
}
global.__d(_fun94254, 12362, [29, 6, 7, 15, 17, 18, 31, 27, 33, 6761,
2]) /* metro module 12362, dependencies: [29, 6, 7, 15, 17, 18, 31, 27, 33, 6761, 2] */;
@@ -1,48 +1,58 @@
/* Metro module 9840; source: components_native/common/SlideoutButton.tsx; dependencies: [31, 27, 661, 33, 4501, 4000, 697, 5278, 1305, 2] */
import Native from '../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as NativeModule from '../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as ColorUtilsModule from '../../utils/ColorUtils.tsx'; /* Metro dependency 4000 */
import * as PressablesModule from '../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
function _fun77128(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#77128, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10026:6, offset: 0x01df2640, size: 336 bytes, params: 8, frame: 24
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const Fonts = (require(661) /* metro dependency 661: Constants */).Fonts;
let value = require(33) /* metro dependency 33 */;
ReactModule;
const Fonts = (ConstantsModule).Fonts;
let value = JsxRuntimeModule;
const env0_4 = value.jsx;
const env0_5 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const colorUtilsModule = require(4000) /* metro dependency 4000: ColorUtils */;
const hexWithOpacity = colorUtilsModule.hexWithOpacity;
const WHITE = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE;
const hexWithOpacity = ColorUtilsModule.hexWithOpacity;
const WHITE = (Native).unsafe_rawColors.WHITE;
const PRIMARY_SEMIBOLD = Fonts.PRIMARY_SEMIBOLD;
const env0_6 = Reflect.apply(createStyles, value, [{button: {'alignSelf': 'flex-end', 'justifyContent': 'center',
'alignItems': 'center'}, buttonText: {'color': null, 'fontSize': 12, 'fontFamily': null, 'marginTop': 2,
'marginHorizontal': 2, 'textAlign': 'center', color: Reflect.apply(hexWithOpacity, colorUtilsModule, [WHITE,
'marginHorizontal': 2, 'textAlign': 'center', color: Reflect.apply(hexWithOpacity, ColorUtilsModule, [WHITE,
0.6]), fontFamily: PRIMARY_SEMIBOLD}}]);
const closure = SlideoutButton;
closure.width = 72;
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/common/SlideoutButton.tsx');
exports.default = closure;
}
const SlideoutButton2 = SlideoutButton;
SlideoutButton2.width = 72;
(FileImportTrackerModule).fileFinishedImporting('components_native/common/SlideoutButton.tsx');
exports.default = SlideoutButton2;
function SlideoutButton({onPress, color, IconComponent, title, height}) { // fn#77129, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10026:446, offset: 0x01df2790, size: 264 bytes, params: 2, frame: 26
height = height === undefined ? 60 : height;
const styles = useStyles();
const PressableOpacity = (PressablesModule).PressableOpacity;
const items2 = [styles.button];
items2[1] = {backgroundColor: color, width: 72, height: height};
const WHITE = (Native).colors.WHITE;
const iconComponent = <IconComponent color={WHITE} />;
const LegacyText = (NativeModule).LegacyText;
return (
<PressableOpacity accessibilityRole="button" onPress={onPress}>
<View style={items2}>
{iconComponent}
<LegacyText style={styles.buttonText}>
{title.toUpperCase()}
</LegacyText>
</View>
</PressableOpacity>
);
}
function SlideoutButton({onPress, color, IconComponent, title, height}) { // fn#77129, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10026:446, offset: 0x01df2790, size: 264 bytes, params: 2, frame: 26
height = height === undefined ? 60 : height;
const styles = useStyles();
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const items2 = [styles.button];
items2[1] = {backgroundColor: color, width: 72, height: height};
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
const iconComponent = <IconComponent color={WHITE} />;
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
return (
<PressableOpacity accessibilityRole="button" onPress={onPress}>
<View style={items2}>
{iconComponent}
<LegacyText style={styles.buttonText}>
{title.toUpperCase()}
</LegacyText>
</View>
</PressableOpacity>
);
}
global.__d(_fun77128, 9840, [31, 27, 661, 33, 4501, 4000, 697, 5278, 1305,
2]) /* metro module 9840, dependencies: [31, 27, 661, 33, 4501, 4000, 697, 5278, 1305, 2] */;
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
@@ -1,181 +1,192 @@
/* Metro module 9845; source: components_native/common/SwipeableFastList.tsx; dependencies: [6, 7, 15, 17, 18, 31, 33, 5394, 8140, 2] */
import ClassCallCheck from '../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import Module05394 from '../../by-id/module-05394.jsx'; /* Metro dependency 5394 */
import FastList from '../../lib/native/FastList.tsx'; /* Metro dependency 8140 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
function _fun77168(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#77168, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10031:6, offset: 0x01df3e03, size: 261 bytes, params: 8, frame: 20
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(6) /* metro dependency 6 */;
const env0_3 = importDefault(7) /* metro dependency 7 */;
const env0_4 = importDefault(15) /* metro dependency 15 */;
const env0_5 = importDefault(17) /* metro dependency 17 */;
const env0_6 = importDefault(18) /* metro dependency 18 */;
let value = importAll(31) /* metro dependency 31 */;
const env0_7 = (require(33) /* metro dependency 33 */).jsx;
let value = ReactModule;
const Component = value.Component;
value = _fun77172(Component);
value.defaultProps = {bounceFirstRowOnMount: true, renderQuickActions: function() {
return null;
}};
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/common/SwipeableFastList.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/common/SwipeableFastList.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_77169() { // fn#77169, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10031:172, offset: 0x01df3f08, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
function _isNativeReflectConstruct_77169() { // fn#77169, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10031:172, offset: 0x01df3f08, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_77169_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_77169_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun77172(a0) { // fn#77172, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10031:371, offset: 0x01df3f6a, size: 199 bytes, params: 2, frame: 16
const closure = SwipeableFastList;
env0_6(closure, a0);
return env0_3(closure, [{key: 'componentWillUnmount', value: function() {
if (this._bounceTimeout != null) {
global.clearTimeout(this._bounceTimeout);
}
}}, {key: 'bounceSwipeable', value: function(a0) {
var env0_0 = this;
var env0_1 = a0;
if (this._bounceTimeout != null) {
global.clearTimeout(this._bounceTimeout);
}
this._bounceTimeout = global.setTimeout(_fun77182, 700);
}}, {key: 'closeOpenRow', value: function() {
var property;
if (this._openRowKey != null) {
property = this._refs;
if (property[this._openRowKey] != null) {
property = this._refs;
property = property[this._openRowKey];
property.close();
function _fun77172(a0) { // fn#77172, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10031:371, offset: 0x01df3f6a, size: 199 bytes, params: 2, frame: 16
const SwipeableFastList2 = SwipeableFastList;
Inherits(SwipeableFastList2, a0);
return CreateClass(SwipeableFastList2, [{key: 'componentWillUnmount', value: function() {
if (this._bounceTimeout != null) {
global.clearTimeout(this._bounceTimeout);
}
this._openRowKey = null;
}}, {key: 'bounceSwipeable', value: function(a0) {
var env0_0 = this;
var env0_1 = a0;
if (this._bounceTimeout != null) {
global.clearTimeout(this._bounceTimeout);
}
this._bounceTimeout = global.setTimeout(_fun77182, 700);
}}, {key: 'closeOpenRow', value: function() {
var property;
if (this._openRowKey != null) {
property = this._refs;
if (property[this._openRowKey] != null) {
property = this._refs;
property = property[this._openRowKey];
property.close();
}
this._openRowKey = null;
}
}}, {key: 'handleOpen', value: function(a0) {
this.closeOpenRow();
this._openRowKey = a0;
}}, {key: 'handleClose', value: function(a0) {
if (this._openRowKey === a0) {
this._openRowKey = null;
}
}}, {key: 'render', value: value_77187}]);
function SwipeableFastList(a0) { // fn#77173, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10031:383, offset: 0x01df4031, size: 197 bytes, params: 2, frame: 20
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_2;
binding(this, SwipeableFastList);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_5(SwipeableFastList);
binding = env1_4;
if (_isNativeReflectConstruct_77169()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_5(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
value._shouldBounceFirstRowOnMount = value.props.bounceFirstRowOnMount;
value._openRowKey = null;
value._refs = {};
value._bounceTimeout = null;
value.renderRow = renderRow_77174;
value.handleScroll = handleScroll_77179;
return value;
function SwipeableFastListRenderRow(a0, a1, a2) { // fn#77174, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10031:745, owner: SwipeableFastList.renderRow, offset: 0x01df40f6, size: 222 bytes, params: 4, frame: 19
var environment;
const env0_0 = a0;
const env0_1 = a1;
const binding = env0_0;
const props = binding.props;
const env0_2 = props.renderQuickActions;
const renderItem = props.renderItem;
const env0_3 = '' + a0 + ':' + a1;
if (binding._shouldBounceFirstRowOnMount) {
env0_0._shouldBounceFirstRowOnMount = false;
}
const value = environment.__proto__.__proto__;
return ((Component) => <Component renderRightActions={renderRightActions} ref={ref_77176} overshootFriction={8} onSwipeableWillOpen={onSwipeableWillOpen} onSwipeableClose={onSwipeableClose} useNativeAnimations>{renderItem(a0,
a1, a2)}</Component>)(Module05394);
function renderRightActions() { // fn#77175, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10031:936, owner: SwipeableFastList.renderRow.renderRightActions, offset: 0x01b45986, size: 25 bytes, params: 1, frame: 13
return renderQuickActions(env0_0, require);
}
function renderRowRef(a0) { // fn#77176, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10031:951, owner: SwipeableFastList.renderRow.ref, offset: 0x01df41d4, size: 98 bytes, params: 2, frame: 14
var binding;
env1_0._refs[env0_3] = a0;
if (a0 != null && PossibleConstructorReturn) {
binding = env1_0;
binding.bounceSwipeable(a0);
if (binding.props.onBounceSwipable != null) {
env1_0.props.onBounceSwipable();
}
}
}
function onSwipeableWillOpen() { // fn#77177, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10031:1103, owner: SwipeableFastList.renderRow.onSwipeableWillOpen, offset: 0x01df4236, size: 27 bytes, params: 1, frame: 11
return env1_0.handleOpen(env0_3);
}
function onSwipeableClose() { // fn#77178, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10031:1140, owner: SwipeableFastList.renderRow.onSwipeableClose, offset: 0x01df4251, size: 27 bytes, params: 1, frame: 11
return env1_0.handleClose(env0_3);
}
}
function SwipeableFastListHandleScroll(a0) { // fn#77179, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10031:1220, owner: SwipeableFastList.handleScroll, offset: 0x01df426c, size: 48 bytes, params: 2, frame: 11
const binding = env0_0;
binding.closeOpenRow();
const onScroll = binding.props.onScroll;
if (onScroll != null) {
onScroll(a0);
}
}
}
}}, {key: 'handleOpen', value: function(a0) {
this.closeOpenRow();
this._openRowKey = a0;
}}, {key: 'handleClose', value: function(a0) {
if (this._openRowKey === a0) {
this._openRowKey = null;
function value_77181(a0) { // fn#77181, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10031:1469, offset: 0x01df42c4, size: 86 bytes, params: 2, frame: 14
const env0_1 = a0;
if (this._bounceTimeout != null) {
global.clearTimeout(this._bounceTimeout);
}
this._bounceTimeout = global.setTimeout(_fun77182, 700);
function _fun77182() { // fn#77182, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10031:1574, offset: 0x01df431a, size: 60 bytes, params: 1, frame: 14
env0_1.openRight();
env0_0._bounceTimeout = global.setTimeout(_fun77183, 400);
function _fun77183() { // fn#77183, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10031:1625, offset: 0x01df4356, size: 21 bytes, params: 1, frame: 9
env1_1.close();
}
}
}
}}, {key: 'render', value: value_77187}]);
}
function SwipeableFastList(a0) { // fn#77173, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10031:383, offset: 0x01df4031, size: 197 bytes, params: 2, frame: 20
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_2;
binding(this, SwipeableFastList);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_5(SwipeableFastList);
binding = env1_4;
if (_isNativeReflectConstruct_77169()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_5(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
value._shouldBounceFirstRowOnMount = value.props.bounceFirstRowOnMount;
value._openRowKey = null;
value._refs = {};
value._bounceTimeout = null;
value.renderRow = renderRow;
value.handleScroll = handleScroll_77179;
return value;
}
function value_77181(a0) { // fn#77181, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10031:1469, offset: 0x01df42c4, size: 86 bytes, params: 2, frame: 14
const env0_1 = a0;
if (this._bounceTimeout != null) {
global.clearTimeout(this._bounceTimeout);
}
this._bounceTimeout = global.setTimeout(_fun77182, 700);
}
function value_77187() { // fn#77187, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10031:1998, offset: 0x01df43e8, size: 84 bytes, params: 1, frame: 16
const value = environment.__proto__;
return ((Component) => <Component {...this.props} {...{['onScroll']: this.handleScroll}} {...{['renderItem']: this.renderRow}} />)(importDefault(8140) /* metro dependency 8140: FastList */);
}
function renderRow(a0, a1, a2) { // fn#77174, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10031:745, owner: SwipeableFastList.renderRow, offset: 0x01df40f6, size: 222 bytes, params: 4, frame: 19
var environment;
const env0_0 = a0;
const env0_1 = a1;
const binding = env0_0;
const props = binding.props;
const env0_2 = props.renderQuickActions;
const renderItem = props.renderItem;
const env0_3 = '' + a0 + ':' + a1;
if (binding._shouldBounceFirstRowOnMount) {
env0_0._shouldBounceFirstRowOnMount = false;
}
const value = environment.__proto__.__proto__;
return ((Component) => <Component renderRightActions={renderRightActions} ref={ref_77176} overshootFriction={8} onSwipeableWillOpen={onSwipeableWillOpen} onSwipeableClose={onSwipeableClose} useNativeAnimations>{renderItem(a0,
a1, a2)}</Component>)(importDefault(5394) /* metro dependency 5394 */);
}
function SwipeableFastListHandleScroll(a0) { // fn#77179, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10031:1220, owner: SwipeableFastList.handleScroll, offset: 0x01df426c, size: 48 bytes, params: 2, frame: 11
const binding = env0_0;
binding.closeOpenRow();
const onScroll = binding.props.onScroll;
if (onScroll != null) {
onScroll(a0);
}
}
function _fun77182() { // fn#77182, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10031:1574, offset: 0x01df431a, size: 60 bytes, params: 1, frame: 14
env0_1.openRight();
env0_0._bounceTimeout = global.setTimeout(_fun77183, 400);
}
function renderRowRef(a0) { // fn#77176, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10031:951, owner: SwipeableFastList.renderRow.ref, offset: 0x01df41d4, size: 98 bytes, params: 2, frame: 14
var binding;
env1_0._refs[env0_3] = a0;
if (a0 != null && env0_4) {
binding = env1_0;
binding.bounceSwipeable(a0);
if (binding.props.onBounceSwipable != null) {
env1_0.props.onBounceSwipable();
function value_77187() { // fn#77187, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10031:1998, offset: 0x01df43e8, size: 84 bytes, params: 1, frame: 16
const value = environment.__proto__;
return ((Component) => <Component {...this.props} {...{['onScroll']: this.handleScroll}} {...{['renderItem']: this.renderRow}} />)(FastList);
}
}
}
function onSwipeableWillOpen() { // fn#77177, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10031:1103, owner: SwipeableFastList.renderRow.onSwipeableWillOpen, offset: 0x01df4236, size: 27 bytes, params: 1, frame: 11
return env1_0.handleOpen(env0_3);
}
function onSwipeableClose() { // fn#77178, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10031:1140, owner: SwipeableFastList.renderRow.onSwipeableClose, offset: 0x01df4251, size: 27 bytes, params: 1, frame: 11
return env1_0.handleClose(env0_3);
}
function _fun77183() { // fn#77183, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10031:1625, offset: 0x01df4356, size: 21 bytes, params: 1, frame: 9
env1_1.close();
}
global.__d(_fun77168, 9845, [6, 7, 15, 17, 18, 31, 33, 5394, 8140,
2]) /* metro module 9845, dependencies: [6, 7, 15, 17, 18, 31, 33, 5394, 8140, 2] */;
+153 -125
View File
@@ -1,146 +1,174 @@
/* Metro module 9844; source: components_native/common/TabBar.tsx; dependencies: [57, 31, 27, 661, 33, 4501, 697, 5321, 1244, 2] */
import Module00057 from '../../by-id/module-00057.js'; /* Metro dependency 57 */
import Native from '../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as Module05321Module from '../../by-id/module-05321.js'; /* Metro dependency 5321 */
function _fun77151(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#77151, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10030:6, offset: 0x01df36f9, size: 356 bytes, params: 8, frame: 22
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(57) /* metro dependency 57 */;
const env0_3 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_4 = value.View;
const env0_5 = value.TouchableWithoutFeedback;
const env0_6 = value.FlatList;
const env0_7 = (require(661) /* metro dependency 661: Constants */).NOOP;
const env0_8 = (require(33) /* metro dependency 33 */).jsx;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const BRAND_600 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BRAND_600;
const BRAND_600 = (Native).unsafe_rawColors.BRAND_600;
const env0_9 = Reflect.apply(createStyles, value, [{innerContainer: {'flexDirection': 'row',
'alignItems': 'stretch'}, tab: {'flexGrow': 1, 'flexBasis': 'auto', 'flexShrink': 0, 'alignItems': 'center',
'justifyContent': 'center', 'marginBottom': 1, 'marginHorizontal': 1, 'padding': 10, 'borderBottomWidth': 2,
'borderBottomColor': 'transparent'}, tabActive: {backgroundColor: 'rgba(0,0,0,0.1)'},
tabSelected: {borderBottomColor: BRAND_600}, container: {flex: 0}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/common/TabBar.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/common/TabBar.tsx');
exports.default = _default_77157;
}
function Tab({children, index, isSelected, tabStyle, tabStyleActive, tabStyleSelected, onSelect}) { // fn#77152, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10030:610, offset: 0x01df385d, size: 351 bytes, params: 2, frame: 26
const styles = useStyles();
const [property, property2] = env0_2(env0_3.useState(function() {
return false;
}), 2);
return (
<TouchableWithoutFeedback
accessibilityRole="tab"
onPressIn={env0_3.useCallback(_fun77154, [property2])}
onPressOut={env0_3.useCallback(_fun77155, [property2])}
onPress={env0_3.useCallback(function() {
return onSelect(index);
}, [onSelect, index])}
>
<View
style={[styles.tab, tabStyle, isSelected ? styles.tabSelected : null,
property ? styles.tabActive : null, isSelected ? tabStyleSelected : null,
property ? tabStyleActive : null]}
function Tab({children, index, isSelected, tabStyle, tabStyleActive, tabStyleSelected, onSelect}) { // fn#77152, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10030:610, offset: 0x01df385d, size: 351 bytes, params: 2, frame: 26
const styles = useStyles();
const [property, property2] = Module00057(ReactModule.useState(function() {
return false;
}), 2);
return (
<TouchableWithoutFeedback
accessibilityRole="tab"
onPressIn={ReactModule.useCallback(_fun77154, [property2])}
onPressOut={ReactModule.useCallback(_fun77155, [property2])}
onPress={ReactModule.useCallback(function() {
return onSelect(index);
}, [onSelect, index])}
>
{children}
</View>
</TouchableWithoutFeedback>
);
}
function _default_77157({initialNumTabsToRender, tabs, tabIndexSelected, tabStyle, tabStyleActive, tabStyleSelected, onSelect, containerStyle, hideHorizontalScrollbar, scrollToSelectedIndex}) { // fn#77157, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10030:1059, offset: 0x01df39e0, size: 581 bytes, params: 2, frame: 29
const env0_3 = tabStyleSelected;
hideHorizontalScrollbar = !(hideHorizontalScrollbar === undefined) && hideHorizontalScrollbar;
scrollToSelectedIndex = !(scrollToSelectedIndex === undefined) && scrollToSelectedIndex;
const styles = useStyles();
const value2 = env0_3.useRef(null);
const env0_7 = env0_3.useRef(tabIndexSelected);
env0_3.useEffect(_fun77158, [tabIndexSelected]);
const value3 = env0_3.useCallback(_fun77159, [value2, onSelect]);
const value4 = _fun77160(tabIndexSelected);
const value5 = env0_3.useCallback(function(a0, a1) {
return 'tab-' + a1;
}, []);
const value6 = env0_3.useCallback(_fun77166, [tabIndexSelected, tabStyle, tabStyleActive, tabStyleSelected,
scrollToSelectedIndex, onSelect, value3]);
const value7 = env0_3.useMemo(_fun77167, []);
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t1qXlK = (require(1244) /* metro dependency 1244: indexNative */).t.t1qXlK;
const GestureDetector = (require(5321) /* metro dependency 5321 */).GestureDetector;
return (
<View
style={styles.container}
accessibilityRole="tablist"
accessibilityLabel={Reflect.apply(string, intl, [t1qXlK])}
>
<GestureDetector gesture={value7}>
<FlatList
ref={value4}
contentContainerStyle={[containerStyle, styles.innerContainer]}
horizontal
data={tabs}
renderItem={value6}
keyExtractor={value5}
initialNumToRender={initialNumTabsToRender}
onScrollToIndexFailed={NOOP}
showsHorizontalScrollIndicator={!hideHorizontalScrollbar}
/>
</GestureDetector>
</View>
);
}
function _fun77159(a0) { // fn#77159, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10030:1346, offset: 0x01df3c3a, size: 51 bytes, params: 2, frame: 13
onSelect(a0);
const current = env0_6.current;
if (current != null) {
current.scrollToIndex({index: a0});
}
}
function _fun77160(a0) { // fn#77160, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10030:1421, offset: 0x01df3c6d, size: 97 bytes, params: 2, frame: 15
let env0_0 = a0;
env1_3.useEffect(function() {
var env0_0 = global.setTimeout(_fun77163, 500);
return _fun77164;
}, [env1_2(env1_3.useState(_fun77161), 1)[0]]);
return env0_6;
}
function _fun77166({item, index}) { // fn#77166, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10030:1703, offset: 0x01df3d5e, size: 109 bytes, params: 2, frame: 16
return (
<Tab
index={index}
isSelected={index === tabIndexSelected}
tabStyle={tabStyle}
tabStyleActive={tabStyleActive}
tabStyleSelected={tabStyleSelected}
onSelect={scrollToSelectedIndex ? env0_8 : onSelect}
>
{item}
</Tab>
);
}
function _fun77167() { // fn#77167, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10030:1861, offset: 0x01df3dcb, size: 56 bytes, params: 1, frame: 11
const value = environment.__proto__;
const Gesture = (require(5321) /* metro dependency 5321 */).Gesture;
return Gesture.Native().disallowInterruption(true);
}
function _fun77162() { // fn#77162, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10030:1483, offset: 0x01df3cce, size: 44 bytes, params: 1, frame: 14
const env0_0 = global.setTimeout(_fun77163, 500);
return _fun77164;
}
function _fun77163() { // fn#77163, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10030:1506, offset: 0x01df3cfa, size: 71 bytes, params: 1, frame: 12
let current = env2_7.current;
if (current === env1_1) {
current = env2_6.current;
if (current != null) {
current.scrollToIndex({index: env1_1, viewPosition: 1});
<View
style={[styles.tab, tabStyle, isSelected ? styles.tabSelected : null,
property ? styles.tabActive : null, isSelected ? tabStyleSelected : null,
property ? tabStyleActive : null]}
>
{children}
</View>
</TouchableWithoutFeedback>
);
function _fun77154() { // fn#77154, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10030:789, offset: 0x01df39bc, size: 18 bytes, params: 1, frame: 11
return Module00057(true);
}
function _fun77155() { // fn#77155, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10030:822, offset: 0x01df39ce, size: 18 bytes, params: 1, frame: 11
return Module00057(false);
}
}
function _default_77157({initialNumTabsToRender, tabs, tabIndexSelected, tabStyle, tabStyleActive, tabStyleSelected, onSelect, containerStyle, hideHorizontalScrollbar, scrollToSelectedIndex}) { // fn#77157, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10030:1059, offset: 0x01df39e0, size: 581 bytes, params: 2, frame: 29
const tabStyleSelected2 = tabStyleSelected;
hideHorizontalScrollbar = !(hideHorizontalScrollbar === undefined) && hideHorizontalScrollbar;
scrollToSelectedIndex = !(scrollToSelectedIndex === undefined) && scrollToSelectedIndex;
const styles = useStyles();
const value2 = tabStyleSelected2.useRef(null);
const env0_7 = tabStyleSelected2.useRef(tabIndexSelected);
tabStyleSelected2.useEffect(_fun77158, [tabIndexSelected]);
const value3 = tabStyleSelected2.useCallback(_fun77159, [value2, onSelect]);
const value4 = _fun77160(tabIndexSelected);
const value5 = tabStyleSelected2.useCallback(function(a0, a1) {
return 'tab-' + a1;
}, []);
const value6 = tabStyleSelected2.useCallback(_fun77166, [tabIndexSelected, tabStyle, tabStyleActive,
tabStyleSelected, scrollToSelectedIndex, onSelect, value3]);
const value7 = tabStyleSelected2.useMemo(_fun77167, []);
const intl = (IndexNativeModule).intl;
const string = intl.string;
const t1qXlK = (IndexNativeModule).t.t1qXlK;
const GestureDetector = (Module05321Module).GestureDetector;
return (
<View
style={styles.container}
accessibilityRole="tablist"
accessibilityLabel={Reflect.apply(string, intl, [t1qXlK])}
>
<GestureDetector gesture={value7}>
<FlatList
ref={value4}
contentContainerStyle={[containerStyle, styles.innerContainer]}
horizontal
data={tabs}
renderItem={value6}
keyExtractor={value5}
initialNumToRender={initialNumTabsToRender}
onScrollToIndexFailed={NOOP}
showsHorizontalScrollIndicator={!hideHorizontalScrollbar}
/>
</GestureDetector>
</View>
);
function _fun77158() { // fn#77158, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10030:1301, offset: 0x01df3c25, size: 21 bytes, params: 1, frame: 2
env0_7.current = tabIndexSelected;
}
function _fun77159(a0) { // fn#77159, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10030:1346, offset: 0x01df3c3a, size: 51 bytes, params: 2, frame: 13
onSelect(a0);
const current = env0_6.current;
if (current != null) {
current.scrollToIndex({index: a0});
}
}
function _fun77160(a0) { // fn#77160, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10030:1421, offset: 0x01df3c6d, size: 97 bytes, params: 2, frame: 15
let env0_0 = a0;
env1_3.useEffect(function() {
var env0_0 = global.setTimeout(_fun77163, 500);
return _fun77164;
}, [env1_2(env1_3.useState(_fun77161), 1)[0]]);
return env0_6;
function _fun77161() { // fn#77161, offset: 0x00c36f09, size: 9 bytes, params: 1, frame: 1
return env0_0;
}
function _fun77162() { // fn#77162, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10030:1483, offset: 0x01df3cce, size: 44 bytes, params: 1, frame: 14
const env0_0 = global.setTimeout(_fun77163, 500);
return _fun77164;
function _fun77163() { // fn#77163, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10030:1506, offset: 0x01df3cfa, size: 71 bytes, params: 1, frame: 12
let current = env2_7.current;
if (current === env1_1) {
current = env2_6.current;
if (current != null) {
current.scrollToIndex({index: env1_1, viewPosition: 1});
}
}
}
function _fun77164() { // fn#77164, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10030:1610, offset: 0x00e59c84, size: 24 bytes, params: 1, frame: 11
global.clearTimeout(env0_0);
}
}
}
function _fun77166({item, index}) { // fn#77166, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10030:1703, offset: 0x01df3d5e, size: 109 bytes, params: 2, frame: 16
return (
<Tab
index={index}
isSelected={index === tabIndexSelected}
tabStyle={tabStyle}
tabStyleActive={tabStyleActive}
tabStyleSelected={tabStyleSelected}
onSelect={scrollToSelectedIndex ? JsxRuntimeModule.jsx : onSelect}
>
{item}
</Tab>
);
}
function _fun77167() { // fn#77167, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10030:1861, offset: 0x01df3dcb, size: 56 bytes, params: 1, frame: 11
const value = environment.__proto__;
const Gesture = (Module05321Module).Gesture;
return Gesture.Native().disallowInterruption(true);
}
}
}
global.__d(_fun77151, 9844, [57, 31, 27, 661, 33, 4501, 697, 5321, 1244,
2]) /* metro module 9844, dependencies: [57, 31, 27, 661, 33, 4501, 697, 5321, 1244, 2] */;
@@ -1,57 +1,70 @@
/* Metro module 11847; source: components_native/common/TouchableBackground.tsx; dependencies: [57, 31, 27, 33, 4501, 697, 2] */
import Module00057 from '../../by-id/module-00057.js'; /* Metro dependency 57 */
import Native from '../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
function _fun90774(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90774, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12033:6, offset: 0x020451ab, size: 238 bytes, params: 8, frame: 21
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(57) /* metro dependency 57 */;
const env0_1 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_2 = value.View;
const env0_3 = value.Pressable;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const INTERACTIVE_BACKGROUND_ACTIVE = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_BACKGROUND_ACTIVE;
const INTERACTIVE_BACKGROUND_ACTIVE = (Native).colors.INTERACTIVE_BACKGROUND_ACTIVE;
const env0_5 = Reflect.apply(createStyles, value, [{default: {backgroundColor: INTERACTIVE_BACKGROUND_ACTIVE}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/common/TouchableBackground.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/common/TouchableBackground.tsx');
exports.default = TouchableBackground;
}
function TouchableBackground(a0) { // fn#90775, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12033:355, offset: 0x02045299, size: 320 bytes, params: 2, frame: 27
const activeBackgroundColor = a0.activeBackgroundColor;
const pressableStyle = a0.pressableStyle;
const style = a0.style;
const children = a0.children;
const onPressIn = a0.onPressIn;
const onPressIn2 = onPressIn;
const onPressOut = a0.onPressOut;
const onPressOut2 = onPressOut;
const object = {'activeBackgroundColor': 0, 'pressableStyle': 0, 'style': 0, 'children': 0, 'onPressIn': 0,
'onPressOut': 0};
silentSetPrototypeOf(object, null, undefined);
const value = copyDataProperties({}, a0, object, undefined);
const styles = useStyles();
const binding = onPressOut2;
const [property, env0_2] = onPressIn2(binding.useState(false), 2);
return (
<Pressable
accessibilityRole="button"
style={pressableStyle}
{...value}
{...{['onPressIn']: binding.useCallback(_fun90776, [onPressIn])}}
{...{['onPressOut']: binding.useCallback(_fun90777, [onPressOut])}}
>
<View style={[style,
property && ({backgroundColor: activeBackgroundColor ?? styles.default.backgroundColor})]}>
{children}
</View>
</Pressable>
);
function _fun90776(a0) { // fn#90776, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12033:544, offset: 0x01e390c7, size: 40 bytes, params: 2, frame: 12
env0_2(true);
if (onPressIn != null) {
onPressIn(a0);
}
}
function TouchableBackground(a0) { // fn#90775, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12033:355, offset: 0x02045299, size: 320 bytes, params: 2, frame: 27
const activeBackgroundColor = a0.activeBackgroundColor;
const pressableStyle = a0.pressableStyle;
const style = a0.style;
const children = a0.children;
const onPressIn = a0.onPressIn;
const env0_0 = onPressIn;
const onPressOut = a0.onPressOut;
const env0_1 = onPressOut;
const object2 = {'activeBackgroundColor': 0, 'pressableStyle': 0, 'style': 0, 'children': 0, 'onPressIn': 0,
'onPressOut': 0};
silentSetPrototypeOf(object2, null, undefined);
const value = copyDataProperties({}, a0, object2, undefined);
const styles = useStyles();
const binding = env0_1;
const [property, env0_2] = env0_0(binding.useState(false), 2);
return (
<Pressable
accessibilityRole="button"
style={pressableStyle}
{...value}
{...{['onPressIn']: binding.useCallback(_fun90776, [onPressIn])}}
{...{['onPressOut']: binding.useCallback(_fun90777, [onPressOut])}}
>
<View style={[style,
property && ({backgroundColor: activeBackgroundColor ?? styles.default.backgroundColor})]}>
{children}
</View>
</Pressable>
);
}
function _fun90777(a0) { // fn#90777, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12033:592, offset: 0x020453d9, size: 42 bytes, params: 2, frame: 12
if (onPressOut != null) {
onPressOut(a0);
}
env0_2(false);
}
function _fun90777(a0) { // fn#90777, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12033:592, offset: 0x020453d9, size: 42 bytes, params: 2, frame: 12
if (onPressOut != null) {
onPressOut(a0);
}
env0_2(false);
}
global.__d(_fun90774, 11847, [57, 31, 27, 33, 4501, 697,
2]) /* metro module 11847, dependencies: [57, 31, 27, 33, 4501, 697, 2] */;
+220 -203
View File
@@ -1,152 +1,223 @@
/* Metro module 14450; source: components_native/common/UnreadBars.tsx; dependencies: [6, 7, 15, 17, 18, 31, 27, 4502, 661, 33, 4501, 6597, 697, 4000, 4081, 4082, 1305, 1244, 3868, 566, 11206, 2] */
import ClassCallCheck from '../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import HapticFeedbackTypes from '../../modules/haptics/HapticFeedbackTypes.tsx'; /* Metro dependency 4082 */
import AccessibilityStore from '../../modules/a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */
import TextStyles from '../../modules/rebrand/native/TextStyles.tsx'; /* Metro dependency 6597 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as NativeModule from '../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as NativeModule2 from '../../external/discord_common/js/packages/design/native.tsx'; /* Metro dependency 3868 */
import * as ColorUtilsModule from '../../utils/ColorUtils.tsx'; /* Metro dependency 4000 */
import * as HapticUtilsNativeModule from '../../modules/haptics/HapticUtils.native.tsx'; /* Metro dependency 4081 */
import * as CreateStylesModule from '../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TransitionGroupModule from '../../external/discord_common/js/packages/transition-group/TransitionGroup.tsx'; /* Metro dependency 11206 */
function _fun109356(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#109356, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14647:6, offset: 0x02348365, size: 636 bytes, params: 8, frame: 28
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_9 = value2.View;
const env0_10 = value2.Animated;
const env0_11 = value2.TouchableWithoutFeedback;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const Fonts = (require(661) /* metro dependency 661: Constants */).Fonts;
const value3 = require(33) /* metro dependency 33 */;
const env0_13 = value3.jsx;
const env0_14 = value3.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createLegacyClassComponentStyles = createStylesModule.createLegacyClassComponentStyles;
object3 = {};
const object5 = {};
const textStyles = importDefault(6597) /* metro dependency 6597: TextStyles */;
let value = ReactModule;
const Fonts = (ConstantsModule).Fonts;
const createLegacyClassComponentStyles = CreateStylesModule.createLegacyClassComponentStyles;
object = {};
const object2 = {};
const DISPLAY_SEMIBOLD = Fonts.DISPLAY_SEMIBOLD;
const WHITE = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE;
copyDataProperties(object5, textStyles(DISPLAY_SEMIBOLD, WHITE, 12, {uppercase: true}), 12);
object3.unreadText = object5;
const object6 = {'margin': 8, 'height': 24, 'justifyContent': 'center', 'alignItems': 'center'};
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
const colorUtilsModule = require(4000) /* metro dependency 4000: ColorUtils */;
let hexWithOpacity = colorUtilsModule.hexWithOpacity;
copyDataProperties(object2, TextStyles(DISPLAY_SEMIBOLD, WHITE, 12, {uppercase: true}), 12);
object.unreadText = object2;
const object4 = {'margin': 8, 'height': 24, 'justifyContent': 'center', 'alignItems': 'center'};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
let hexWithOpacity = ColorUtilsModule.hexWithOpacity;
const PRIMARY_400 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_400;
object6.backgroundColor = Reflect.apply(hexWithOpacity, colorUtilsModule, [PRIMARY_400, 0.9]);
object3.unread = object6;
const value7 = colorUtilsModule;
hexWithOpacity = value7.hexWithOpacity;
object4.backgroundColor = Reflect.apply(hexWithOpacity, ColorUtilsModule, [PRIMARY_400, 0.9]);
object.unread = object4;
hexWithOpacity = ColorUtilsModule.hexWithOpacity;
const RED_400 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.RED_400;
object3.mention = {backgroundColor: Reflect.apply(hexWithOpacity, value7, [RED_400, 0.9])};
const env0_15 = Reflect.apply(createLegacyClassComponentStyles, createStylesModule, [object3]);
object.mention = {backgroundColor: Reflect.apply(hexWithOpacity, ColorUtilsModule, [RED_400, 0.9])};
const env0_15 = Reflect.apply(createLegacyClassComponentStyles, CreateStylesModule, [object]);
const PureComponent = value.PureComponent;
value = _fun109360(PureComponent);
value.defaultProps = {bottom: false};
const ThemeContext = (require(3868) /* metro dependency 3868: native */).ThemeContext;
const ThemeContext = (NativeModule2).ThemeContext;
value.contextType = ThemeContext;
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/common/UnreadBars.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/common/UnreadBars.tsx');
exports.default = UnreadBars;
}
function _isNativeReflectConstruct_109357() { // fn#109357, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14647:272, offset: 0x023485e1, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_109357_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _isNativeReflectConstruct_109357() { // fn#109357, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14647:272, offset: 0x023485e1, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
function _fun109360(a0) { // fn#109360, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14647:886, offset: 0x02348643, size: 199 bytes, params: 2, frame: 16
const UnreadBar2 = UnreadBar;
Inherits(UnreadBar2, a0);
return CreateClass(UnreadBar2, [{key: 'componentWillEnter', value: function(a0) {
this.show(a0);
}}, {key: 'componentWillLeave', value: function(a0) {
this.hide(a0);
}}, {key: 'show', value: value_109367}, {key: 'hide', value: value_109368}, {key: 'getAnimatedStyle',
value: value_109369}, {key: 'render', value: value_109370}]);
function UnreadBar(a0) { // fn#109361, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14647:898, offset: 0x0234870a, size: 224 bytes, params: 2, frame: 22
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_3;
binding(this, UnreadBar);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_6(UnreadBar);
binding = env1_5;
if (_isNativeReflectConstruct_109357()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_6(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
value.state = {active: false};
const Value = Animated.Value;
const value4 = Object.create(Value.prototype, {constructor: {value: Value}});
const value5 = new Value(0);
value.animation = value5 instanceof Object ? value5 : value4;
value.handlePress = handlePress_109362;
value.handlePressIn = handlePressIn;
value.handlePressOut = handlePressOut;
return value;
function UnreadBarHandlePress() { // fn#109362, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14647:1172, owner: UnreadBar.handlePress, offset: 0x023487ea, size: 97 bytes, params: 1, frame: 17
const binding = env0_0;
const {item, onPress} = binding.props;
const triggerHapticFeedback = HapticUtilsNativeModule.triggerHapticFeedback;
const IMPACT_LIGHT = (HapticFeedbackTypes).IMPACT_LIGHT;
Reflect.apply(triggerHapticFeedback, HapticUtilsNativeModule, [IMPACT_LIGHT]);
binding.hide();
onPress(item);
}
function handlePressIn() { // fn#109363, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14647:1297, owner: UnreadBar.handlePressIn, offset: 0x0234884b, size: 31 bytes, params: 1, frame: 12
env0_0.setState({active: true});
}
function handlePressOut() { // fn#109364, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14647:1344, owner: UnreadBar.handlePressOut, offset: 0x02194751, size: 31 bytes, params: 1, frame: 12
env0_0.setState({active: false});
}
}
function value_109367(a0) { // fn#109367, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14647:1547, offset: 0x02348894, size: 59 bytes, params: 2, frame: 13
const value = environment.__proto__;
Animated.spring(this.animation, {'toValue': 1, 'friction': 15, 'tension': 250, 'useNativeDriver': true}).start(a0);
}
function value_109368(a0) { // fn#109368, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14647:1668, offset: 0x023488cf, size: 59 bytes, params: 2, frame: 13
const value = environment.__proto__;
Animated.spring(this.animation, {'toValue': 0, 'friction': 15, 'tension': 250, 'useNativeDriver': true}).start(a0);
}
function value_109370() { // fn#109370, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14647:2240, offset: 0x02348a40, size: 447 bytes, params: 1, frame: 28
const value = environment.__proto__;
const binding = env1_15;
const context = this.context;
const value2 = undefined;
const value3 = binding(context);
const {compact, item} = this.props;
const mention2 = item.mention;
const section = item.section;
const handlePress = this.handlePress;
const handlePressIn = this.handlePressIn;
const handlePressOut = this.handlePressOut;
const View2 = Animated.View;
const view2Props = {style: this.getAnimatedStyle(),
nativeID: 'unread-bar-animated-view-' + mention2 + '-' + section};
const items2 = [value3.unread];
items2[1] = mention2 ? value3.mention : value2;
const LegacyText = (NativeModule).LegacyText;
const unreadText = value3.unreadText;
const intl = (IndexNativeModule).intl;
const string = intl.string;
const t = (IndexNativeModule).t;
return (
<TouchableWithoutFeedback
accessibilityRole="button"
onPress={handlePress}
onPressIn={handlePressIn}
onPressOut={handlePressOut}
testID={'unread-bar-touchable-' + mention2 + '-' + section}
>
<View2 {...view2Props}>
<View style={items2} nativeID={'unread-bar-view-' + mention2 + '-' + section}>
<LegacyText style={unreadText} maxFontSizeMultiplier={1.5}>
{compact ? Reflect.apply(string, intl, [t.y2b7CA]) : mention2 ? Reflect.apply(string, intl,
[t['8zH0LJ']]) : Reflect.apply(string, intl, [t.FCRiT3])}
</LegacyText>
</View>
</View2>
</TouchableWithoutFeedback>
);
}
}
function UnreadBars({scrollToLocation, beforeItem, afterItem, compact, contentInset = {'top': 0, 'left': 0, 'right': 0, 'bottom': 0}}) { // fn#109371, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14647:3068, offset: 0x02348bff, size: 306 bytes, params: 2, frame: 27
compact = !(compact === undefined) && compact;
const closure = function({section, row}) {
scrollToLocation({section: section, item: row, animated: true});
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
const TransitionGroup = (TransitionGroupModule).TransitionGroup;
const Fragment = env0_8.Fragment;
return (
<TransitionGroup component={Fragment}>
{
beforeItem != null
? ((Component) => <Component compact={compact} item={beforeItem} onPress={closure} contentInset={contentInset} useReducedMotion={useReducedMotion} key="BEFORE" />)(env0_16)
: null
}
{
afterItem != null
? ((Component) => <Component compact={compact} item={afterItem} onPress={closure} contentInset={contentInset} bottom useReducedMotion={useReducedMotion} key="AFTER" />)(env0_16)
: null
}
</TransitionGroup>
);
}
return (_isNativeReflectConstruct_109357_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun109360(a0) { // fn#109360, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14647:886, offset: 0x02348643, size: 199 bytes, params: 2, frame: 16
const closure = UnreadBar;
env0_7(closure, a0);
return env0_4(closure, [{key: 'componentWillEnter', value: function(a0) {
this.show(a0);
}}, {key: 'componentWillLeave', value: function(a0) {
this.hide(a0);
}}, {key: 'show', value: value_109367}, {key: 'hide', value: value_109368}, {key: 'getAnimatedStyle',
value: value_109369}, {key: 'render', value: value_109370}]);
}
function UnreadBars({scrollToLocation, beforeItem, afterItem, compact, contentInset = {'top': 0, 'left': 0, 'right': 0, 'bottom': 0}}) { // fn#109371, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14647:3068, offset: 0x02348bff, size: 306 bytes, params: 2, frame: 27
compact = !(compact === undefined) && compact;
const closure = function({section, row}) {
scrollToLocation({section: section, item: row, animated: true});
};
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
const TransitionGroup = (require(11206) /* metro dependency 11206: TransitionGroup */).TransitionGroup;
const Fragment = env0_8.Fragment;
return (
<TransitionGroup component={Fragment}>
{beforeItem != null ? ((Component) => <Component compact={compact} item={beforeItem} onPress={closure} contentInset={contentInset} useReducedMotion={useReducedMotion} key="BEFORE" />)(env0_16) : null}
{afterItem != null ? ((Component) => <Component compact={compact} item={afterItem} onPress={closure} contentInset={contentInset} bottom useReducedMotion={useReducedMotion} key="AFTER" />)(env0_16) : null}
</TransitionGroup>
);
}
function UnreadBar(a0) { // fn#109361, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14647:898, offset: 0x0234870a, size: 224 bytes, params: 2, frame: 22
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_3;
binding(this, UnreadBar);
const items = [];
arraySpread(items, value, 0, items);
value = env1_6(UnreadBar);
binding = env1_5;
if (_isNativeReflectConstruct_109357()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items, env1_6(this).constructor);
r0 = value;
} else {
value = value.apply(this, items);
r0 = value;
}
value = binding(this, r0);
value.state = {active: false};
const Value = Animated.Value;
const value4 = Object.create(Value.prototype, {constructor: {value: Value}});
const value5 = new Value(0);
value.animation = value5 instanceof Object ? value5 : value4;
value.handlePress = handlePress_109362;
value.handlePressIn = handlePressIn;
value.handlePressOut = handlePressOut;
return value;
}
function value_109367(a0) { // fn#109367, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14647:1547, offset: 0x02348894, size: 59 bytes, params: 2, frame: 13
const value = environment.__proto__;
Animated.spring(this.animation, {'toValue': 1, 'friction': 15, 'tension': 250, 'useNativeDriver': true}).start(a0);
}
function value_109368(a0) { // fn#109368, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14647:1668, offset: 0x023488cf, size: 59 bytes, params: 2, frame: 13
const value = environment.__proto__;
Animated.spring(this.animation, {'toValue': 0, 'friction': 15, 'tension': 250, 'useNativeDriver': true}).start(a0);
}
function value_109369() { // fn#109369, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14647:1801, offset: 0x0234890a, size: 310 bytes, params: 1, frame: 21
@@ -154,17 +225,17 @@ function value_109369() { // fn#109369, source: /ci/build/discord/discord/discor
var r0;
var top;
var value4;
var object3;
var object;
var animation;
var object5;
var object2;
const {bottom, contentInset, useReducedMotion} = this.props;
const active = this.state.active;
const object6 = {position: 'absolute'};
const object4 = {position: 'absolute'};
const left = contentInset.left;
const value = 0;
let r1 = left ?? value;
object6.left = r1;
object6.right = contentInset.right ?? value;
object4.left = r1;
object4.right = contentInset.right ?? value;
const r4 = bottom ? 'bottom' : 'top';
if (bottom) {
r1 = contentInset.bottom ?? value;
@@ -174,79 +245,25 @@ function value_109369() { // fn#109369, source: /ci/build/discord/discord/discor
r1 = value4 ? top : value;
r11 = value4;
}
object6[r4] = r1;
object4[r4] = r1;
if (useReducedMotion) {
object5 = {};
copyDataProperties(object5, object6, r11);
object5['opacity'] = this.animation;
r0 = object5;
object2 = {};
copyDataProperties(object2, object4, r11);
object2['opacity'] = this.animation;
r0 = object2;
} else {
object3 = {};
copyDataProperties(object3, object6, r11);
object = {};
copyDataProperties(object, object4, r11);
animation = this.animation;
object3['opacity'] = animation;
object['opacity'] = animation;
animation = this.animation;
object3['transform'] = [{translateY: animation.interpolate({inputRange: [0, 1], outputRange: [bottom ? 72 : -72,
object['transform'] = [{translateY: animation.interpolate({inputRange: [0, 1], outputRange: [bottom ? 72 : -72,
active ? 1 : value]})}];
r0 = object3;
r0 = object;
}
return r0;
}
function value_109370() { // fn#109370, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14647:2240, offset: 0x02348a40, size: 447 bytes, params: 1, frame: 28
const value = environment.__proto__;
const binding = env1_15;
const context = this.context;
const value2 = undefined;
const value3 = binding(context);
const {compact, item} = this.props;
const mention2 = item.mention;
const section = item.section;
const handlePress = this.handlePress;
const handlePressIn = this.handlePressIn;
const handlePressOut = this.handlePressOut;
const View2 = Animated.View;
const view2Props = {style: this.getAnimatedStyle(),
nativeID: 'unread-bar-animated-view-' + mention2 + '-' + section};
const items2 = [value3.unread];
items2[1] = mention2 ? value3.mention : value2;
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
const unreadText = value3.unreadText;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
return (
<TouchableWithoutFeedback
accessibilityRole="button"
onPress={handlePress}
onPressIn={handlePressIn}
onPressOut={handlePressOut}
testID={'unread-bar-touchable-' + mention2 + '-' + section}
>
<View2 {...view2Props}>
<View style={items2} nativeID={'unread-bar-view-' + mention2 + '-' + section}>
<LegacyText style={unreadText} maxFontSizeMultiplier={1.5}>
{compact ? Reflect.apply(string, intl, [t.y2b7CA]) : mention2 ? Reflect.apply(string, intl,
[t['8zH0LJ']]) : Reflect.apply(string, intl, [t.FCRiT3])}
</LegacyText>
</View>
</View2>
</TouchableWithoutFeedback>
);
}
function UnreadBarHandlePress() { // fn#109362, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14647:1172, owner: UnreadBar.handlePress, offset: 0x023487ea, size: 97 bytes, params: 1, frame: 17
const binding = env0_0;
const {item, onPress} = binding.props;
const hapticUtilsNativeModule = require(4081) /* metro dependency 4081: HapticUtilsNative */;
const triggerHapticFeedback = hapticUtilsNativeModule.triggerHapticFeedback;
const IMPACT_LIGHT = (importDefault(4082) /* metro dependency 4082: HapticFeedbackTypes */).IMPACT_LIGHT;
Reflect.apply(triggerHapticFeedback, hapticUtilsNativeModule, [IMPACT_LIGHT]);
binding.hide();
onPress(item);
}
function handlePressIn() { // fn#109363, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14647:1297, owner: UnreadBar.handlePressIn, offset: 0x0234884b, size: 31 bytes, params: 1, frame: 12
env0_0.setState({active: true});
}
global.__d(_fun109356, 14450, [6, 7, 15, 17, 18, 31, 27, 4502, 661, 33, 4501, 6597, 697, 4000, 4081, 4082, 1305,
1244, 3868, 566, 11206,
2]) /* metro module 14450, dependencies: [6, 7, 15, 17, 18, 31, 27, 4502, 661, 33, 4501, 6597, 697, 4000, 4081, 4082, 1305, 1244, 3868, 566, 11206, 2] */;
@@ -1,84 +1,107 @@
/* Metro module 13708; source: components_native/common/UntouchableAlert.tsx; dependencies: [6, 7, 15, 17, 18, 31, 27, 33, 4501, 5461, 3868, 2] */
import ClassCallCheck from '../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as NativeModule from '../../external/discord_common/js/packages/design/native.tsx'; /* Metro dependency 3868 */
import * as CreateStylesModule from '../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
function _fun104757(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104757, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13905:6, offset: 0x0229fda6, size: 328 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(6) /* metro dependency 6 */;
const env0_3 = importDefault(7) /* metro dependency 7 */;
const env0_4 = importDefault(15) /* metro dependency 15 */;
const env0_5 = importDefault(17) /* metro dependency 17 */;
const env0_6 = importDefault(18) /* metro dependency 18 */;
let value = importAll(31) /* metro dependency 31 */;
const env0_7 = (require(27) /* metro dependency 27 */).View;
const env0_8 = (require(33) /* metro dependency 33 */).jsx;
const env0_9 = (require(4501) /* metro dependency 4501: createStyles */).createLegacyClassComponentStyles({container: {'flex': 1,
let value = ReactModule;
const env0_9 = (CreateStylesModule).createLegacyClassComponentStyles({container: {'flex': 1,
'alignItems': 'center', 'justifyContent': 'center'}});
const PureComponent = value.PureComponent;
value = _fun104761(PureComponent);
const ThemeContext = (require(3868) /* metro dependency 3868: native */).ThemeContext;
const ThemeContext = (NativeModule).ThemeContext;
value.contextType = ThemeContext;
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/common/UntouchableAlert.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/common/UntouchableAlert.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_104758() { // fn#104758, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13905:187, offset: 0x0229feee, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
function _isNativeReflectConstruct_104758() { // fn#104758, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13905:187, offset: 0x0229feee, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_104758_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_104758_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun104761(a0) { // fn#104761, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13905:495, offset: 0x0229ff50, size: 147 bytes, params: 2, frame: 16
const closure = UntouchableAlert;
env0_6(closure, a0);
return env0_3(closure, [{key: 'componentDidMount', value: function() {
if (!this.props.loading) {
this.closeAlert();
function _fun104761(a0) { // fn#104761, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13905:495, offset: 0x0229ff50, size: 147 bytes, params: 2, frame: 16
const UntouchableAlert2 = UntouchableAlert;
Inherits(UntouchableAlert2, a0);
return CreateClass(UntouchableAlert2, [{key: 'componentDidMount', value: function() {
if (!this.props.loading) {
this.closeAlert();
}
}}, {key: 'componentDidUpdate', value: function(a0) {
var loading = this.props.loading;
if (!(a0.loading === loading || loading)) {
this.closeAlert();
}
}}, {key: 'closeAlert', value: function() {
var env0_0 = this;
global.setImmediate(_fun104766);
}}, {key: 'render', value: value_104767}]);
function UntouchableAlert() { // fn#104762, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13905:507, offset: 0x00ec62ac, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_2(this, UntouchableAlert);
const value3 = env1_5(UntouchableAlert);
return env1_4(this, _isNativeReflectConstruct_104758() ? global.Reflect.construct(value3, arguments,
env1_5(this).constructor) : value3.apply(this, arguments));
}
}}, {key: 'componentDidUpdate', value: function(a0) {
var loading = this.props.loading;
if (!(a0.loading === loading || loading)) {
this.closeAlert();
function value_104765() { // fn#104765, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13905:994, offset: 0x022a0034, size: 33 bytes, params: 1, frame: 11
global.setImmediate(_fun104766);
function _fun104766() { // fn#104766, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13905:1019, offset: 0x022a0055, size: 24 bytes, params: 1, frame: 9
return env0_0.props.onClose();
}
}
}}, {key: 'closeAlert', value: function() {
var env0_0 = this;
global.setImmediate(_fun104766);
}}, {key: 'render', value: value_104767}]);
}
function value_104765() { // fn#104765, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13905:994, offset: 0x022a0034, size: 33 bytes, params: 1, frame: 11
global.setImmediate(_fun104766);
}
function value_104767() { // fn#104767, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13905:1068, offset: 0x022a006d, size: 103 bytes, params: 1, frame: 17
const value = environment.__proto__;
return (
this.props.loading
? (
<View style={env1_9(this.context).container}>
{((ActivityIndicator) => <ActivityIndicator />)((require(5461) /* metro dependency 5461: ActivityIndicatorNative */).ActivityIndicator)}
</View>
)
: null
);
}
function value_104767() { // fn#104767, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13905:1068, offset: 0x022a006d, size: 103 bytes, params: 1, frame: 17
const value = environment.__proto__;
return this.props.loading ? <View style={env1_9(this.context).container}>{((ActivityIndicator) => <ActivityIndicator />)((require(5461) /* metro dependency 5461: ActivityIndicatorNative */).ActivityIndicator)}</View> : null;
}
}
function _fun104766() { // fn#104766, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13905:1019, offset: 0x022a0055, size: 24 bytes, params: 1, frame: 9
return env0_0.props.onClose();
}
global.__d(_fun104757, 13708, [6, 7, 15, 17, 18, 31, 27, 33, 4501, 5461, 3868,
2]) /* metro module 13708, dependencies: [6, 7, 15, 17, 18, 31, 27, 33, 4501, 5461, 3868, 2] */;
@@ -1,270 +1,284 @@
/* Metro module 10881; source: components_native/common/UserSummaryItem.tsx; dependencies: [31, 27, 1945, 33, 4501, 697, 1305, 566, 1423, 4617, 1244, 4573, 2] */
import Native from '../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import GuildMemberStore from '../../stores/GuildMemberStore.tsx'; /* Metro dependency 1945 */
import NicknameUtils from '../../utils/NicknameUtils.tsx'; /* Metro dependency 4617 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as NativeModule from '../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as CreateStylesModule from '../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
function _fun83354(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83354, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11067:6, offset: 0x01f165fa, size: 379 bytes, params: 8, frame: 22
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {};
object2.container = {flexDirection: 'row'};
object2.names = {'marginStart': 4, 'paddingRight': 1};
const TEXT_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_SUBTLE;
object2.namesLegacy = {'marginStart': 4, 'paddingRight': 1, color: TEXT_SUBTLE};
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object2.plusCountContainer = {'backgroundColor': null, 'marginStart': 2, 'alignItems': 'center',
ReactModule;
const createStyles = CreateStylesModule.createStyles;
object = {};
object.container = {flexDirection: 'row'};
object.names = {'marginStart': 4, 'paddingRight': 1};
const TEXT_SUBTLE = (Native).colors.TEXT_SUBTLE;
object.namesLegacy = {'marginStart': 4, 'paddingRight': 1, color: TEXT_SUBTLE};
const BACKGROUND_BASE_LOWEST = (Native).colors.BACKGROUND_BASE_LOWEST;
object.plusCountContainer = {'backgroundColor': null, 'marginStart': 2, 'alignItems': 'center',
backgroundColor: BACKGROUND_BASE_LOWEST};
object2.cutout = {marginRight: -4};
const env0_6 = Reflect.apply(createStyles, createStylesModule, [object2]);
object2 = {};
const CutoutDirection = (require(1305) /* metro dependency 1305: native */).CutoutDirection;
object.cutout = {marginRight: -4};
const env0_6 = Reflect.apply(createStyles, CreateStylesModule, [object]);
object = {};
const CutoutDirection = (NativeModule).CutoutDirection;
const RIGHT = CutoutDirection.RIGHT;
object2.direction = RIGHT;
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/common/UserSummaryItem.tsx');
object.direction = RIGHT;
(FileImportTrackerModule).fileFinishedImporting('components_native/common/UserSummaryItem.tsx');
exports.default = UserSummaryItem;
}
function UserSummaryItem({style, namesStyle, namesVariant, max, users, renderedUsers, withNames, channelId, guildId, avatarSize, withPlusCount, cutout, cutoutStyle}) { // fn#83355, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11067:584, offset: 0x01f16775, size: 990 bytes, params: 2, frame: 32
var environment;
var r1;
var r5;
var r4;
var r13;
var r15;
var value;
var AvatarSizes;
var XXSMALL;
var binding;
var value4;
var length2;
var value6;
var intl;
var formatToPlainString;
var t;
var GhkJ21;
var length3;
var value7;
var HermesInternal;
var concat;
var value8;
var push;
var jsxRuntimeEnv0_5Binding;
var LegacyText;
var namesLegacy;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
var names;
var pop;
var value9;
var AVATAR_SIZE_MAP;
var property;
var object;
var plusCountContainer;
reducibleJoin2: while (true) {
if (max !== undefined) {
function UserSummaryItem({style, namesStyle, namesVariant, max, users, renderedUsers, withNames, channelId, guildId, avatarSize, withPlusCount, cutout, cutoutStyle}) { // fn#83355, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11067:584, offset: 0x01f16775, size: 990 bytes, params: 2, frame: 32
var environment;
var r1;
var r5;
var r4;
var r13;
var r15;
var value;
var AvatarSizes;
var XXSMALL;
var binding;
var value4;
var length2;
var value6;
var intl;
var formatToPlainString;
var t;
var GhkJ21;
var length3;
var value7;
var HermesInternal;
var concat;
var value8;
var push;
var jsxRuntimeEnv0_5Binding;
var LegacyText;
var namesLegacy;
const Text = (TextModule).Text;
var names;
var pop;
var value9;
var AVATAR_SIZE_MAP;
var property;
var object2;
var plusCountContainer;
reducibleJoin2: while (true) {
if (max !== undefined) {
break reducibleJoin2;
}
value = 3;
max = value;
break reducibleJoin2;
}
value = 3;
max = value;
break reducibleJoin2;
}
reducibleJoin4: while (true) {
if (renderedUsers !== undefined) {
r1 = renderedUsers;
reducibleJoin4: while (true) {
if (renderedUsers !== undefined) {
r1 = renderedUsers;
break reducibleJoin4;
}
r1 = [];
break reducibleJoin4;
}
r1 = [];
break reducibleJoin4;
}
reducibleJoin6: while (true) {
if (avatarSize !== undefined) {
r5 = avatarSize;
reducibleJoin6: while (true) {
if (avatarSize !== undefined) {
r5 = avatarSize;
break reducibleJoin6;
}
value = environment;
AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
XXSMALL = AvatarSizes.XXSMALL;
r5 = XXSMALL;
break reducibleJoin6;
}
value = environment;
AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
XXSMALL = AvatarSizes.XXSMALL;
r5 = XXSMALL;
break reducibleJoin6;
}
reducibleJoin8: while (true) {
if (cutout !== undefined) {
r4 = cutout;
reducibleJoin8: while (true) {
if (cutout !== undefined) {
r4 = cutout;
break reducibleJoin8;
}
value = environment;
binding = env0_7;
r4 = binding;
break reducibleJoin8;
}
value = environment;
binding = env0_7;
r4 = binding;
break reducibleJoin8;
}
var env0_10;
const styles = useStyles();
let length = r1.length;
length = length > 0 ? r1.length : users.length;
const Math = global.Math;
const value3 = Math.min(length, max);
const env0_8 = {};
(require(566) /* metro dependency 566: flux */).useStateFromStores([GuildMemberStore], function() {
return users.forEach(_fun83357);
});
if (value3 === 0) {
return null;
}
const items2 = [];
if (0 < value3) {
r13 = 0;
reducibleLoop13: while (true) {
UserSummaryItem_loop();
value4 = typeof r13 === 'bigint' ? r13 + 1n : +r13 + 1;
env0_10 = value4;
if (value4 < value3) {
r13 = value4;
continue reducibleLoop13;
}
break reducibleLoop13;
var env0_10;
const styles = useStyles();
let length = r1.length;
length = length > 0 ? r1.length : users.length;
const Math = global.Math;
const value3 = Math.min(length, max);
const env0_8 = {};
(require(566) /* metro dependency 566: flux */).useStateFromStores([GuildMemberStore], function() {
return users.forEach(_fun83357);
});
if (value3 === 0) {
return null;
}
}
const name = (importDefault(4617) /* metro dependency 4617: NicknameUtils */).getName(guildId, channelId, users[0]);
reducibleJoin16: while (true) {
if (withNames) {
length2 = users.length;
value6 = length2 > 1;
r13 = value6;
const items2 = [];
if (0 < value3) {
r13 = 0;
reducibleLoop13: while (true) {
UserSummaryItem_loop();
value4 = typeof r13 === 'bigint' ? r13 + 1n : +r13 + 1;
env0_10 = value4;
if (value4 < value3) {
r13 = value4;
continue reducibleLoop13;
}
break reducibleLoop13;
}
}
const name = (NicknameUtils).getName(guildId, channelId, users[0]);
reducibleJoin16: while (true) {
if (withNames) {
length2 = users.length;
value6 = length2 > 1;
r13 = value6;
break reducibleJoin16;
}
r13 = withNames;
break reducibleJoin16;
}
r13 = withNames;
break reducibleJoin16;
}
reducibleJoin18: while (true) {
if (r13) {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
formatToPlainString = intl.formatToPlainString;
t = (require(1244) /* metro dependency 1244: indexNative */).t;
GhkJ21 = t.GhkJ21;
length3 = users.length;
value7 = Reflect.apply(formatToPlainString, intl, [GhkJ21, {name: name, count: length3 - 1}]);
r15 = value7;
reducibleJoin18: while (true) {
if (r13) {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
formatToPlainString = intl.formatToPlainString;
t = (require(1244) /* metro dependency 1244: indexNative */).t;
GhkJ21 = t.GhkJ21;
length3 = users.length;
value7 = Reflect.apply(formatToPlainString, intl, [GhkJ21, {name: name, count: length3 - 1}]);
r15 = value7;
break reducibleJoin18;
}
r15 = name;
break reducibleJoin18;
}
r15 = name;
break reducibleJoin18;
}
reducibleJoin23: while (true) {
if (withNames) {
if (users[0] == null) {
break reducibleJoin23;
}
HermesInternal = global.HermesInternal;
concat = HermesInternal.concat;
value8 = 'username-' + r15;
if (namesVariant != null) {
push = items2.push;
jsxRuntimeEnv0_5Binding = jsxRuntimeEnv0_5;
names = styles.names;
Reflect.apply(push, items2,
[<Text variant={namesVariant} color="redesign-channel-name-muted-text" style={[names,
namesStyle]} lineClamp={1} key={value8}>{r15}</Text>]);
break reducibleJoin23;
}
push = items2.push;
jsxRuntimeEnv0_5Binding = jsxRuntimeEnv0_5;
LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
namesLegacy = styles.namesLegacy;
Reflect.apply(push, items2, [<LegacyText style={[namesLegacy,
namesStyle]} numberOfLines={1} key={value8}>{r15}</LegacyText>]);
break reducibleJoin23;
}
break reducibleJoin23;
}
reducibleJoin26: while (true) {
if (length > max) {
if (withPlusCount) {
pop = items2.pop;
Reflect.apply(pop, items2, []);
value9 = '+' + (length + 1 - max);
AVATAR_SIZE_MAP = (require(1305) /* metro dependency 1305: native */).AVATAR_SIZE_MAP;
property = AVATAR_SIZE_MAP[r5];
push = items2.push;
jsxRuntimeEnv0_5Binding = jsxRuntimeEnv0_5;
object = {};
plusCountContainer = styles.plusCountContainer;
object.style = [plusCountContainer, {borderRadius: property, width: property, height: property,
padding: property / 8}];
object.children = <Text variant="text-xs/normal" color="mobile-text-heading-primary">{value9}</Text>;
reducibleJoin23: while (true) {
if (withNames) {
if (users[0] == null) {
break reducibleJoin23;
}
HermesInternal = global.HermesInternal;
concat = HermesInternal.concat;
Reflect.apply(push, items2, [<View {...object} key={'plus-' + value9} />]);
value8 = 'username-' + r15;
if (namesVariant != null) {
push = items2.push;
jsxRuntimeEnv0_5Binding = jsxRuntimeEnv0_5;
names = styles.names;
Reflect.apply(push, items2,
[<Text variant={namesVariant} color="redesign-channel-name-muted-text" style={[names,
namesStyle]} lineClamp={1} key={value8}>{r15}</Text>]);
break reducibleJoin23;
}
push = items2.push;
jsxRuntimeEnv0_5Binding = jsxRuntimeEnv0_5;
LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
namesLegacy = styles.namesLegacy;
Reflect.apply(push, items2, [<LegacyText style={[namesLegacy,
namesStyle]} numberOfLines={1} key={value8}>{r15}</LegacyText>]);
break reducibleJoin23;
}
break reducibleJoin23;
}
reducibleJoin26: while (true) {
if (length > max) {
if (withPlusCount) {
pop = items2.pop;
Reflect.apply(pop, items2, []);
value9 = '+' + (length + 1 - max);
AVATAR_SIZE_MAP = (require(1305) /* metro dependency 1305: native */).AVATAR_SIZE_MAP;
property = AVATAR_SIZE_MAP[r5];
push = items2.push;
jsxRuntimeEnv0_5Binding = jsxRuntimeEnv0_5;
object2 = {};
plusCountContainer = styles.plusCountContainer;
object2.style = [plusCountContainer, {borderRadius: property, width: property, height: property,
padding: property / 8}];
object2.children = (
<Text variant="text-xs/normal" color="mobile-text-heading-primary">
{value9}
</Text>
);
HermesInternal = global.HermesInternal;
concat = HermesInternal.concat;
Reflect.apply(push, items2, [<View {...object2} key={'plus-' + value9} />]);
break reducibleJoin26;
}
break reducibleJoin26;
}
break reducibleJoin26;
}
break reducibleJoin26;
}
return (
<View style={[style, styles.container]}>
{items2}
</View>
);
}
return (
<View style={[style, styles.container]}>
{items2}
</View>
);
function _fun83356() { // fn#83356, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11067:896, offset: 0x01f16b53, size: 28 bytes, params: 1, frame: 11
return users.forEach(_fun83357);
function _fun83357(a0) { // fn#83357, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11067:911, offset: 0x01f16b6f, size: 71 bytes, params: 2, frame: 15
var binding;
var id;
var value4;
var guildMemberStoreBinding;
if (guildId != null && a0 != null) {
binding = env1_8;
id = a0.id;
value4 = environment.__proto__.__proto__;
guildMemberStoreBinding = GuildMemberStore;
binding[id] = guildMemberStoreBinding.getMember(guildId, a0.id);
}
}
function _fun83356() { // fn#83356, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11067:896, offset: 0x01f16b53, size: 28 bytes, params: 1, frame: 11
return users.forEach(_fun83357);
}
function UserSummaryItem_loop() { // fn#83358, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11067:1005, owner: UserSummaryItem._loop, offset: 0x01f16bb6, size: 335 bytes, params: 1, frame: 21
var environment;
var r5;
var r8;
var push;
var property;
var value5;
var CutoutableAvatarImage;
var binding;
if (env0_1.length === 0) {
property = users[env0_10];
r5 = property?.id ?? '@' + env0_10;
value5 = environment.__proto__;
r8 = property == null ? (importDefault(1423) /* metro dependency 1423: AvatarUtils */).makeSource(null) : _loopO;
binding = env0_9;
push = binding.push;
CutoutableAvatarImage = (require(1305) /* metro dependency 1305: native */).CutoutableAvatarImage;
if (binding < env0_7 - 1) {
Reflect.apply(push, binding, [<CutoutableAvatarImage size={env0_3} source={r8} style={[styles.cutout,
cutoutStyle]} cutout={env0_4} key={r5} />]);
} else {
Reflect.apply(push, binding, [<CutoutableAvatarImage size={env0_3} source={r8} key={r5} />]);
}
} else {
binding = env0_9;
binding.push(env0_1[env0_10]);
function UserSummaryItem_loop() { // fn#83358, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11067:1005, owner: UserSummaryItem._loop, offset: 0x01f16bb6, size: 335 bytes, params: 1, frame: 21
var environment;
var r5;
var r8;
var push;
var property;
var value5;
var CutoutableAvatarImage;
var binding;
if (env0_1.length === 0) {
property = users[env0_10];
r5 = property?.id ?? '@' + env0_10;
value5 = environment.__proto__;
r8 = property == null ? (importDefault(1423) /* metro dependency 1423: AvatarUtils */).makeSource(null) : _loopO;
binding = env0_9;
push = binding.push;
CutoutableAvatarImage = (require(1305) /* metro dependency 1305: native */).CutoutableAvatarImage;
if (binding < env0_7 - 1) {
Reflect.apply(push, binding, [<CutoutableAvatarImage size={ReactNativeModule.View} source={r8} style={[styles.cutout,
cutoutStyle]} cutout={env0_4} key={r5} />]);
} else {
Reflect.apply(push, binding, [<CutoutableAvatarImage size={ReactNativeModule.View} source={r8} key={r5} />]);
}
} else {
binding = env0_9;
binding.push(env0_1[env0_10]);
}
function _loopO() { // fn#83359, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11067:1156, owner: UserSummaryItem._loop.o, offset: 0x01f16d05, size: 189 bytes, params: 1, frame: 21
const value = a0;
const value2 = undefined;
const r6 = value !== value2 ? value : false;
const binding = env0_0;
const getAvatarURL = binding.getAvatarURL;
const guildIdBinding = guildId;
const AVATAR_SIZE_MAP = (NativeModule).AVATAR_SIZE_MAP;
const value5 = Reflect.apply(getAvatarURL, binding, [guildIdBinding, AVATAR_SIZE_MAP[env1_3], r6]);
return (importDefault(1423) /* metro dependency 1423: AvatarUtils */).makeSource((env0_1 == null ? value2 : env0_1.avatar) == null ? value5 : (importDefault(1423) /* metro dependency 1423: AvatarUtils */).getGuildMemberAvatarURL(env0_1,
r6) ?? value5);
}
}
}
}
function _fun83357(a0) { // fn#83357, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11067:911, offset: 0x01f16b6f, size: 71 bytes, params: 2, frame: 15
var binding;
var id;
var value4;
if (guildId != null && a0 != null) {
binding = env1_8;
id = a0.id;
value4 = environment.__proto__.__proto__;
binding[id] = GuildMemberStore.getMember(guildId, a0.id);
}
}
function _loopO() { // fn#83359, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11067:1156, owner: UserSummaryItem._loop.o, offset: 0x01f16d05, size: 189 bytes, params: 1, frame: 21
const value = a0;
const value2 = undefined;
const r6 = value !== value2 ? value : false;
const binding = env0_0;
const getAvatarURL = binding.getAvatarURL;
const guildIdBinding = guildId;
const AVATAR_SIZE_MAP = (require(1305) /* metro dependency 1305: native */).AVATAR_SIZE_MAP;
const value5 = Reflect.apply(getAvatarURL, binding, [guildIdBinding, AVATAR_SIZE_MAP[env1_3], r6]);
return (importDefault(1423) /* metro dependency 1423: AvatarUtils */).makeSource((env0_1 == null ? value2 : env0_1.avatar) == null ? value5 : (importDefault(1423) /* metro dependency 1423: AvatarUtils */).getGuildMemberAvatarURL(env0_1,
r6) ?? value5);
}
global.__d(_fun83354, 10881, [31, 27, 1945, 33, 4501, 697, 1305, 566, 1423, 4617, 1244, 4573,
2]) /* metro module 10881, dependencies: [31, 27, 1945, 33, 4501, 697, 1305, 566, 1423, 4617, 1244, 4573, 2] */;
+326 -286
View File
@@ -1,320 +1,360 @@
/* Metro module 9543; source: components_native/common/Video.tsx; dependencies: [6, 7, 15, 17, 18, 57, 31, 27, 33, 4501, 697, 8011, 9544, 5459, 1244, 3868, 2] */
import ClassCallCheck from '../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import Module00057 from '../../by-id/module-00057.js'; /* Metro dependency 57 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as NativeModule from '../../external/discord_common/js/packages/design/native.tsx'; /* Metro dependency 3868 */
import * as CreateStylesModule from '../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as Module08011Module from '../../by-id/module-08011.jsx'; /* Metro dependency 8011 */
function _fun74450(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#74450, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9729:6, offset: 0x01d8dee8, size: 512 bytes, params: 8, frame: 26
var object3;
const env0_0 = require;
const closure = VideoComponent;
const VideoComponent2 = VideoComponent;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(6) /* metro dependency 6 */;
const env0_3 = importDefault(7) /* metro dependency 7 */;
const env0_4 = importDefault(15) /* metro dependency 15 */;
const env0_5 = importDefault(17) /* metro dependency 17 */;
const env0_6 = importDefault(18) /* metro dependency 18 */;
const env0_7 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_9 = value2.TouchableWithoutFeedback;
const env0_10 = value2.View;
const env0_11 = value2.Image;
const env0_12 = value2.AppState;
const env0_13 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createLegacyClassComponentStyles = createStylesModule.createLegacyClassComponentStyles;
object3 = {};
const object4 = {'flex': 1, 'shadowColor': null, 'shadowOpacity': 0.5, 'shadowOffset': null, 'shadowRadius': 16};
const env0_2 = ClassCallCheck;
const env0_3 = CreateClass;
let value = ReactModule;
const createLegacyClassComponentStyles = CreateStylesModule.createLegacyClassComponentStyles;
object = {};
const object2 = {'flex': 1, 'shadowColor': null, 'shadowOpacity': 0.5, 'shadowOffset': null, 'shadowRadius': 16};
const BLACK = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BLACK;
object4.shadowColor = BLACK;
object4.shadowOffset = {'height': 1, 'width': 0};
object2.shadowColor = BLACK;
object2.shadowOffset = {'height': 1, 'width': 0};
let BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
object4.backgroundColor = BACKGROUND_BRAND;
object3.container = object4;
object2.backgroundColor = BACKGROUND_BRAND;
object.container = object2;
BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
object3.video = {flex: 1, backgroundColor: BACKGROUND_BRAND};
const env0_14 = Reflect.apply(createLegacyClassComponentStyles, createStylesModule, [object3]);
object.video = {flex: 1, backgroundColor: BACKGROUND_BRAND};
const env0_14 = Reflect.apply(createLegacyClassComponentStyles, CreateStylesModule, [object]);
const PureComponent = value.PureComponent;
value = _fun74458(PureComponent);
const ThemeContext = (require(3868) /* metro dependency 3868: native */).ThemeContext;
const ThemeContext = (NativeModule).ThemeContext;
value.contextType = ThemeContext;
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/common/Video.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/common/Video.tsx');
exports.default = value;
exports.createVideoControls = createVideoControls;
exports.VideoComponent = closure;
}
function _isNativeReflectConstruct_74451() { // fn#74451, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9729:253, offset: 0x01d8e0e8, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_74451_isNativeReflectConstruct = function() {
return !!result;
})();
}
function VideoComponent({style, source, poster, onLoadStart, onLoad, onError, onEnd, paused, muted, posterResizeMode, resizeMode, disableFocus, controls, ariaHidden, mixWithOthers, importantForAccessibility, pauseWhileAppInactive, playInBackground, preventsDisplaySleepDuringVideoPlayback, httpEngine}) { // fn#74454, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9729:737, offset: 0x01d8e14a, size: 456 bytes, params: 2, frame: 38
paused = !(paused === undefined) && paused;
muted = muted === undefined || muted;
posterResizeMode = posterResizeMode === undefined ? 'contain' : posterResizeMode;
resizeMode = resizeMode === undefined ? 'contain' : resizeMode;
pauseWhileAppInactive = pauseWhileAppInactive === undefined || pauseWhileAppInactive;
playInBackground = !(playInBackground === undefined) && playInBackground;
preventsDisplaySleepDuringVideoPlayback = preventsDisplaySleepDuringVideoPlayback === undefined || preventsDisplaySleepDuringVideoPlayback;
const property = (require(8011) /* metro dependency 8011 */).default;
const binding = env0_8;
const useState = binding.useState;
const value11 = env0_7(Reflect.apply(useState, binding, [AppState.currentState === 'active']), 2);
const property2 = value11[0];
const env0_1 = value11[1];
env0_8.useEffect(_fun74455, [pauseWhileAppInactive]);
const propertyProps = {style: style, source: source, importantForAccessibility: importantForAccessibility,
poster: poster, muted: muted, paused: paused || pauseWhileAppInactive && !property2,
posterResizeMode: posterResizeMode, resizeMode: resizeMode, repeat: true, playInBackground: playInBackground,
pictureInPicture: false, playWhenInactive: false, onLoadStart: onLoadStart, onLoad: onLoad, onError: onError,
onEnd: onEnd, disableFocus: disableFocus};
propertyProps['aria-hidden'] = ariaHidden;
propertyProps.mixWithOthers = mixWithOthers;
propertyProps.preventsDisplaySleepDuringVideoPlayback = preventsDisplaySleepDuringVideoPlayback;
propertyProps.httpEngine = httpEngine;
copyDataProperties(propertyProps, controls?.props, undefined);
return ((Component) => <Component {...propertyProps} />)(property);
}
function _fun74458(a0) { // fn#74458, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9729:1663, offset: 0x01d8e368, size: 172 bytes, params: 2, frame: 16
const closure = Video_74459;
env0_6(closure, a0);
return env0_3(closure, [{key: 'componentDidMount', value: value_74462}, {key: 'componentWillUnmount',
value: function() {
if (this._renderTask != null) {
this._renderTask.cancel();
exports.VideoComponent = VideoComponent2;
function _isNativeReflectConstruct_74451() { // fn#74451, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9729:253, offset: 0x01d8e0e8, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
}}, {key: 'renderVideo', value: value_74465}, {key: 'renderImage', value: value_74466}, {key: 'render',
value: value_74467}]);
}
function createVideoControls(a0) { // fn#74468, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9729:3938, offset: 0x01d8e8b7, size: 136 bytes, params: 2, frame: 11
const env0_0 = a0;
return {seek: seek_74469, pause: pause_74470, useSubscribe: useSubscribe, props: {ref: env0_8.createRef(),
onPlaybackRateChange: onPlaybackRateChange, onProgress: onProgress, onDownloadProgress: onDownloadProgress}};
}
function _fun74455() { // fn#74455, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9729:1202, offset: 0x01d8e312, size: 59 bytes, params: 1, frame: 14
var environment;
if (pauseWhileAppInactive) {
value = environment.__proto__;
var env0_0 = AppState.addEventListener('change', _fun74456);
return _fun74457;
return (_isNativeReflectConstruct_74451_isNativeReflectConstruct = function() {
return !!result;
})();
}
}
function Video_74459(a0) { // fn#74459, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9729:1675, offset: 0x01d8e414, size: 193 bytes, params: 2, frame: 21
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_2;
binding(this, Video_74459);
const items = [];
arraySpread(items, value, 0, items);
value = env1_5(Video_74459);
binding = env1_4;
if (_isNativeReflectConstruct_74451()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items, env1_5(this).constructor);
r0 = value;
} else {
value = value.apply(this, items);
r0 = value;
function VideoComponent({style, source, poster, onLoadStart, onLoad, onError, onEnd, paused, muted, posterResizeMode, resizeMode, disableFocus, controls, ariaHidden, mixWithOthers, importantForAccessibility, pauseWhileAppInactive, playInBackground, preventsDisplaySleepDuringVideoPlayback, httpEngine}) { // fn#74454, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9729:737, offset: 0x01d8e14a, size: 456 bytes, params: 2, frame: 38
paused = !(paused === undefined) && paused;
muted = muted === undefined || muted;
posterResizeMode = posterResizeMode === undefined ? 'contain' : posterResizeMode;
resizeMode = resizeMode === undefined ? 'contain' : resizeMode;
pauseWhileAppInactive = pauseWhileAppInactive === undefined || pauseWhileAppInactive;
playInBackground = !(playInBackground === undefined) && playInBackground;
preventsDisplaySleepDuringVideoPlayback = preventsDisplaySleepDuringVideoPlayback === undefined || preventsDisplaySleepDuringVideoPlayback;
const property = (Module08011Module).default;
const binding = env0_8;
const useState = binding.useState;
const value11 = Module00057(Reflect.apply(useState, binding, [AppState.currentState === 'active']), 2);
const property2 = value11[0];
const env0_1 = value11[1];
env0_8.useEffect(_fun74455, [pauseWhileAppInactive]);
const propertyProps = {style: style, source: source, importantForAccessibility: importantForAccessibility,
poster: poster, muted: muted, paused: paused || pauseWhileAppInactive && !property2,
posterResizeMode: posterResizeMode, resizeMode: resizeMode, repeat: true, playInBackground: playInBackground,
pictureInPicture: false, playWhenInactive: false, onLoadStart: onLoadStart, onLoad: onLoad, onError: onError,
onEnd: onEnd, disableFocus: disableFocus};
propertyProps['aria-hidden'] = ariaHidden;
propertyProps.mixWithOthers = mixWithOthers;
propertyProps.preventsDisplaySleepDuringVideoPlayback = preventsDisplaySleepDuringVideoPlayback;
propertyProps.httpEngine = httpEngine;
copyDataProperties(propertyProps, controls?.props, undefined);
return ((Component) => <Component {...propertyProps} />)(property);
function _fun74455() { // fn#74455, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9729:1202, offset: 0x01d8e312, size: 59 bytes, params: 1, frame: 14
var environment;
if (pauseWhileAppInactive) {
value = environment.__proto__;
var env0_0 = AppState.addEventListener('change', _fun74456);
return _fun74457;
}
function _fun74456(a0) { // fn#74456, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9729:1248, offset: 0x01d8e34d, size: 27 bytes, params: 2, frame: 12
env1_1(a0 === 'active');
}
function _fun74457() { // fn#74457, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9729:1277, offset: 0x00cd0cb3, size: 21 bytes, params: 1, frame: 9
env0_0.remove();
}
}
}
value = binding(this, r0);
value.state = {postponeRender: true};
value.ref = env1_8.createRef();
value.isVideo = isVideo_74460;
value.handleOpenFullScreen = handleOpenFullScreen;
return value;
}
function value_74462() { // fn#74462, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9729:2288, offset: 0x01d8e5a0, size: 60 bytes, params: 1, frame: 13
var environment;
let value = environment.__proto__;
value = require(5459) /* metro dependency 5459: RunAfterInteractionsUtils */;
this._renderTask = value.runAfterInteractions(_fun74463);
}
function _fun74458(a0) { // fn#74458, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9729:1663, offset: 0x01d8e368, size: 172 bytes, params: 2, frame: 16
const Video_744592 = Video_74459;
Inherits(Video_744592, a0);
return env0_3(Video_744592, [{key: 'componentDidMount', value: value_74462}, {key: 'componentWillUnmount',
value: function() {
if (this._renderTask != null) {
this._renderTask.cancel();
}
}}, {key: 'renderVideo', value: value_74465}, {key: 'renderImage', value: value_74466}, {key: 'render',
value: value_74467}]);
function Video_74459(a0) { // fn#74459, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9729:1675, offset: 0x01d8e414, size: 193 bytes, params: 2, frame: 21
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_2;
binding(this, Video_74459);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_5(Video_74459);
binding = env1_4;
if (_isNativeReflectConstruct_74451()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_5(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
value.state = {postponeRender: true};
value.ref = env1_8.createRef();
value.isVideo = isVideo_74460;
value.handleOpenFullScreen = handleOpenFullScreen;
return value;
function Video_74459IsVideo() { // fn#74460, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9729:1934, owner: Video_74459.isVideo, offset: 0x01d8e4d5, size: 50 bytes, params: 1, frame: 4
const src = env0_0.props.src;
return src != null && 'videoURI' in src && src.videoURI != null;
}
function value_74465() { // fn#74465, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9729:2514, offset: 0x01d8e61e, size: 242 bytes, params: 1, frame: 27
var videoURI;
const value = environment.__proto__;
const binding = env1_14;
const context = this.context;
const value2 = undefined;
const value3 = binding(context);
const props = this.props;
const src = props.src;
const poster = props.poster;
const width = props.width;
const height = props.height;
const muted = props.muted;
const paused = props.paused;
const resizeMode = props.resizeMode;
if ('videoURI' in src) {
videoURI = src.videoURI;
if (videoURI === '') {
function handleOpenFullScreen() { // fn#74461, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9729:2030, owner: Video_74459.handleOpenFullScreen, offset: 0x01d8e507, size: 153 bytes, params: 1, frame: 17
var openMediaModal;
var object2;
var value;
const {src, onPress, width, height} = env0_0.props;
if (onPress != null) {
onPress();
}
const current = env0_0.ref.current;
if (current != null) {
value = environment.__proto__.__proto__;
value = require(9544) /* metro dependency 9544: openMediaModal */;
openMediaModal = value.openMediaModal;
object2 = {};
copyDataProperties(object2, src, width);
object2['width'] = width;
object2['height'] = height;
Reflect.apply(openMediaModal, value, [{initialSources: [object2], originViewOrOriginLayout: current}]);
}
}
}
function value_74462() { // fn#74462, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9729:2288, offset: 0x01d8e5a0, size: 60 bytes, params: 1, frame: 13
var environment;
let value = environment.__proto__;
value = require(5459) /* metro dependency 5459: RunAfterInteractionsUtils */;
this._renderTask = value.runAfterInteractions(_fun74463);
function _fun74463() { // fn#74463, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9729:2347, offset: 0x01d8e5dc, size: 31 bytes, params: 1, frame: 12
env0_0.setState({postponeRender: false});
}
}
function value_74465() { // fn#74465, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9729:2514, offset: 0x01d8e61e, size: 242 bytes, params: 1, frame: 27
var videoURI;
const value = environment.__proto__;
const binding = env1_14;
const context = this.context;
const value2 = undefined;
const value3 = binding(context);
const props = this.props;
const src = props.src;
const poster = props.poster;
const width = props.width;
const height = props.height;
const muted = props.muted;
const paused = props.paused;
const resizeMode = props.resizeMode;
if ('videoURI' in src) {
videoURI = src.videoURI;
if (videoURI === '') {
return null;
}
videoURI = src.videoURI;
return (
videoURI != null
? (
<VideoComponent
style={[value3.video, {width: width, height: height}, props.videoStyle]}
source={{uri: videoURI}}
poster={poster}
muted={muted}
paused={paused}
resizeMode={resizeMode}
posterResizeMode={resizeMode}
ariaHidden={props.ariaHidden}
disableFocus={props.disableFocus}
httpEngine={props.httpEngine}
/>
)
: value2
);
}
return null;
}
videoURI = src.videoURI;
return videoURI != null ? <VideoComponent style={[value3.video, {width: width, height: height},
props.videoStyle]} source={{uri: videoURI}} poster={poster} muted={muted} paused={paused} resizeMode={resizeMode} posterResizeMode={resizeMode} ariaHidden={props.ariaHidden} disableFocus={props.disableFocus} httpEngine={props.httpEngine} /> : value2;
}
return null;
}
function value_74466() { // fn#74466, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9729:3024, offset: 0x01d8e710, size: 115 bytes, params: 1, frame: 17
var value;
const props = this.props;
const src = props.src;
if ('uri' in src) {
if (src.uri !== '') {
value = environment.__proto__;
return (
<Image
source={{uri: src.uri}}
style={{width: props.width, height: props.height}}
{...{['aria-hidden']: props.ariaHidden}}
/>
function value_74466() { // fn#74466, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9729:3024, offset: 0x01d8e710, size: 115 bytes, params: 1, frame: 17
var value;
const props = this.props;
const src = props.src;
if ('uri' in src) {
if (src.uri !== '') {
value = environment.__proto__;
return (
<Image
source={{uri: src.uri}}
style={{width: props.width, height: props.height}}
{...{['aria-hidden']: props.ariaHidden}}
/>
);
}
}
}
function value_74467() { // fn#74467, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9729:3258, offset: 0x01d8e783, size: 308 bytes, params: 1, frame: 23
var r7;
var r0;
var intl;
const value = environment.__proto__;
const value2 = env1_14(this.context);
const {style, width, height, canOpenFullscreen, postponeRender, accessibilityLabel} = this.props;
const ref = this.ref;
const value3 = null;
const view = (
<View
ref={ref}
style={[value2.container, {width: width, height: height}, style]}
accessible={value3 != accessibilityLabel}
accessibilityLabel={accessibilityLabel}
>
{this.state.postponeRender && postponeRender !== false ? value3 : this.isVideo() ? this.renderVideo() : this.renderImage()}
</View>
);
if (canOpenFullscreen) {
if (value3 != accessibilityLabel) {
r7 = accessibilityLabel;
} else {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r7 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.OIDkcp);
}
r0 = (
<TouchableWithoutFeedback
accessibilityRole="button"
accessibilityLabel={r7}
onPress={this.handleOpenFullScreen}
>
{view}
</TouchableWithoutFeedback>
);
} else {
r0 = view;
}
return r0;
}
}
}
function value_74467() { // fn#74467, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9729:3258, offset: 0x01d8e783, size: 308 bytes, params: 1, frame: 23
var r7;
var r0;
var intl;
const value = environment.__proto__;
const value2 = env1_14(this.context);
const {style, width, height, canOpenFullscreen, postponeRender, accessibilityLabel} = this.props;
const ref = this.ref;
const value3 = null;
const view = <View ref={ref} style={[value2.container, {width: width, height: height},
style]} accessible={value3 != accessibilityLabel} accessibilityLabel={accessibilityLabel}>{this.state.postponeRender && postponeRender !== false ? value3 : this.isVideo() ? this.renderVideo() : this.renderImage()}</View>;
if (canOpenFullscreen) {
if (value3 != accessibilityLabel) {
r7 = accessibilityLabel;
} else {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r7 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.OIDkcp);
}
function createVideoControls(a0) { // fn#74468, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9729:3938, offset: 0x01d8e8b7, size: 136 bytes, params: 2, frame: 11
const env0_0 = a0;
return {seek: seek_74469, pause: pause_74470, useSubscribe: useSubscribe, props: {ref: env0_8.createRef(),
onPlaybackRateChange: onPlaybackRateChange, onProgress: onProgress, onDownloadProgress: onDownloadProgress}};
function createVideoControlsSeek(a0) { // fn#74469, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9729:4020, owner: createVideoControls.seek, offset: 0x01d8e93f, size: 52 bytes, params: 2, frame: 12
const current = PossibleConstructorReturn.current;
if (!(current == null || current.seek == null)) {
current.seek(a0);
}
}
r0 = <TouchableWithoutFeedback accessibilityRole="button" accessibilityLabel={r7} onPress={this.handleOpenFullScreen}>{view}</TouchableWithoutFeedback>;
} else {
r0 = view;
}
return r0;
}
function createVideoControlsSeek(a0) { // fn#74469, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9729:4020, owner: createVideoControls.seek, offset: 0x01d8e93f, size: 52 bytes, params: 2, frame: 12
const current = env0_4.current;
if (!(current == null || current.seek == null)) {
current.seek(a0);
}
}
function createVideoControlsPause(a0) { // fn#74470, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9729:4080, owner: createVideoControls.pause, offset: 0x01d8e973, size: 54 bytes, params: 2, frame: 12
env0_0(a0);
if (env0_8 !== a0) {
if (env0_2 != null) {
env0_2(a0);
function createVideoControlsPause(a0) { // fn#74470, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9729:4080, owner: createVideoControls.pause, offset: 0x01d8e973, size: 54 bytes, params: 2, frame: 12
env0_0(a0);
if (env0_8 !== a0) {
if (env0_2 != null) {
env0_2(a0);
}
}
}
}
}
function createVideoControlsUseSubscribe(a0, a1, a2) { // fn#74471, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9729:4122, owner: createVideoControls.useSubscribe, offset: 0x01d8e9a9, size: 60 bytes, params: 4, frame: 13
env0_1 = a0;
env0_2 = a1;
env0_3 = a2;
env1_8.useLayoutEffect(_fun74472, []);
}
function useSubscribe(a0, a1, a2) { // fn#74471, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9729:4122, owner: createVideoControls.useSubscribe, offset: 0x01d8e9a9, size: 60 bytes, params: 4, frame: 13
env0_1 = a0;
env0_2 = a1;
env0_3 = a2;
env1_8.useLayoutEffect(_fun74472, []);
function _fun74472() { // fn#74472, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9729:4173, offset: 0x01d8e9e5, size: 83 bytes, params: 1, frame: 15
if (env1_1 != null) {
env1_1(env1_5, env1_6);
}
if (env1_2 != null) {
env1_2(env1_8);
}
if (env1_3 != null) {
env1_3(env1_7);
}
}
function onPlaybackRateChange({playbackRate}) { // fn#74473, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9729:4242, owner: createVideoControls.onPlaybackRateChange, offset: 0x01d8ea38, size: 59 bytes, params: 2, frame: 11
if (env0_8 !== (playbackRate === 0)) {
if (env0_2 != null) {
env0_2(env0_8);
}
function onPlaybackRateChange({playbackRate}) { // fn#74473, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9729:4242, owner: createVideoControls.onPlaybackRateChange, offset: 0x01d8ea38, size: 59 bytes, params: 2, frame: 11
if (env0_8 !== (playbackRate === 0)) {
if (env0_2 != null) {
env0_2(env0_8);
}
}
}
function onProgress({currentTime, seekableDuration}) { // fn#74474, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9729:4319, owner: createVideoControls.onProgress, offset: 0x01d8ea73, size: 60 bytes, params: 2, frame: 13
if (env0_1 != null) {
env0_1(currentTime, seekableDuration);
}
}
function onDownloadProgress({progressPercent}) { // fn#74475, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9729:4387, owner: createVideoControls.onDownloadProgress, offset: 0x01d8eaaf, size: 45 bytes, params: 2, frame: 11
if (env0_3 != null) {
env0_3(progressPercent);
}
}
}
}
function onProgress({currentTime, seekableDuration}) { // fn#74474, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9729:4319, owner: createVideoControls.onProgress, offset: 0x01d8ea73, size: 60 bytes, params: 2, frame: 13
if (env0_1 != null) {
env0_1(currentTime, seekableDuration);
}
}
function createVideoControlsOnDownloadProgress({progressPercent}) { // fn#74475, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9729:4387, owner: createVideoControls.onDownloadProgress, offset: 0x01d8eaaf, size: 45 bytes, params: 2, frame: 11
if (env0_3 != null) {
env0_3(progressPercent);
}
}
function _fun74456(a0) { // fn#74456, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9729:1248, offset: 0x01d8e34d, size: 27 bytes, params: 2, frame: 12
env1_1(a0 === 'active');
}
function Video_74459IsVideo() { // fn#74460, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9729:1934, owner: Video_74459.isVideo, offset: 0x01d8e4d5, size: 50 bytes, params: 1, frame: 4
const src = env0_0.props.src;
return src != null && 'videoURI' in src && src.videoURI != null;
}
function handleOpenFullScreen() { // fn#74461, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9729:2030, owner: Video_74459.handleOpenFullScreen, offset: 0x01d8e507, size: 153 bytes, params: 1, frame: 17
var openMediaModal;
var object;
var value;
const {src, onPress, width, height} = env0_0.props;
if (onPress != null) {
onPress();
}
const current = env0_0.ref.current;
if (current != null) {
value = environment.__proto__.__proto__;
value = require(9544) /* metro dependency 9544: openMediaModal */;
openMediaModal = value.openMediaModal;
object = {};
copyDataProperties(object, src, width);
object['width'] = width;
object['height'] = height;
Reflect.apply(openMediaModal, value, [{initialSources: [object], originViewOrOriginLayout: current}]);
}
}
function _fun74463() { // fn#74463, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9729:2347, offset: 0x01d8e5dc, size: 31 bytes, params: 1, frame: 12
env0_0.setState({postponeRender: false});
}
function _fun74472() { // fn#74472, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9729:4173, offset: 0x01d8e9e5, size: 83 bytes, params: 1, frame: 15
if (env1_1 != null) {
env1_1(env1_5, env1_6);
}
if (env1_2 != null) {
env1_2(env1_8);
}
if (env1_3 != null) {
env1_3(env1_7);
}
}
global.__d(_fun74450, 9543, [6, 7, 15, 17, 18, 57, 31, 27, 33, 4501, 697, 8011, 9544, 5459, 1244, 3868,
2]) /* metro module 9543, dependencies: [6, 7, 15, 17, 18, 57, 31, 27, 33, 4501, 697, 8011, 9544, 5459, 1244, 3868, 2] */;
@@ -1,51 +1,76 @@
/* Metro module 9020; source: components_native/common/ViewEmptyState.tsx; dependencies: [31, 27, 661, 33, 4501, 6597, 697, 1305, 2] */
import Native from '../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import TextStyles from '../../modules/rebrand/native/TextStyles.tsx'; /* Metro dependency 6597 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as NativeModule from '../../design/void/native.tsx'; /* Metro dependency 1305 */
function _fun70188(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#70188, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9205:6, offset: 0x01cf1e4f, size: 417 bytes, params: 8, frame: 25
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
ReactModule;
let value = ReactNativeModule;
const env0_2 = value.View;
const env0_3 = value.Image;
const Fonts = (require(661) /* metro dependency 661: Constants */).Fonts;
const Fonts = (ConstantsModule).Fonts;
value = require(33) /* metro dependency 33 */;
const env0_4 = value.jsx;
const env0_5 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const object = {};
const textStyles = importDefault(6597) /* metro dependency 6597: TextStyles */;
const object2 = {};
const DISPLAY_SEMIBOLD = Fonts.DISPLAY_SEMIBOLD;
const MOBILE_TEXT_HEADING_PRIMARY = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_TEXT_HEADING_PRIMARY;
copyDataProperties(object, textStyles(DISPLAY_SEMIBOLD, MOBILE_TEXT_HEADING_PRIMARY, 18), undefined);
object['textAlign'] = 'center';
object['marginTop'] = 32;
object['opacity'] = 0.8;
const MOBILE_TEXT_HEADING_PRIMARY = (Native).colors.MOBILE_TEXT_HEADING_PRIMARY;
copyDataProperties(object2, TextStyles(DISPLAY_SEMIBOLD, MOBILE_TEXT_HEADING_PRIMARY, 18), undefined);
object2['textAlign'] = 'center';
object2['marginTop'] = 32;
object2['opacity'] = 0.8;
const PRIMARY_MEDIUM = Fonts.PRIMARY_MEDIUM;
const env0_6 = Reflect.apply(createStyles, value, [{emptyContainer: {'flex': 1, 'justifyContent': 'center',
'alignItems': 'center', 'marginHorizontal': 36}, emptyImage: {'width': 170, 'height': 130},
fixOpticalIllusion: {'marginTop': -50, 'alignItems': 'center'}, emptyLabel: object,
fixOpticalIllusion: {'marginTop': -50, 'alignItems': 'center'}, emptyLabel: object2,
emptyText: {'fontFamily': null, 'fontSize': 13, 'marginTop': 8, 'marginHorizontal': 10, 'opacity': 0.6,
'fontWeight': '400', fontFamily: PRIMARY_MEDIUM}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/common/ViewEmptyState.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/common/ViewEmptyState.tsx');
exports.default = ViewEmptyState;
}
function ViewEmptyState({source, label, text, style}) { // fn#70189, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9205:630, offset: 0x01cf1ff0, size: 308 bytes, params: 2, frame: 26
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
const styles = useStyles();
return (
<View style={[styles.emptyContainer, style]}>
<View style={styles.fixOpticalIllusion}>
<Image
resizeMode="contain"
source={source}
style={styles.emptyImage}
/>
{label != null ? <LegacyText style={styles.emptyLabel}>{label.toUpperCase()}</LegacyText> : null}
{text != null ? <LegacyText style={[styles.emptyLabel, styles.emptyText]}>{text}</LegacyText> : null}
function ViewEmptyState({source, label, text, style}) { // fn#70189, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9205:630, offset: 0x01cf1ff0, size: 308 bytes, params: 2, frame: 26
const LegacyText = (NativeModule).LegacyText;
const styles = useStyles();
return (
<View style={[styles.emptyContainer, style]}>
<View style={styles.fixOpticalIllusion}>
<Image
resizeMode="contain"
source={source}
style={styles.emptyImage}
/>
{
label != null
? (
<LegacyText style={styles.emptyLabel}>
{label.toUpperCase()}
</LegacyText>
)
: null
}
{
text != null
? (
<LegacyText style={[styles.emptyLabel, styles.emptyText]}>
{text}
</LegacyText>
)
: null
}
</View>
</View>
</View>
);
);
}
}
global.__d(_fun70188, 9020, [31, 27, 661, 33, 4501, 6597, 697, 1305,
2]) /* metro module 9020, dependencies: [31, 27, 661, 33, 4501, 6597, 697, 1305, 2] */;
@@ -1,262 +1,308 @@
/* Metro module 10818; source: components_native/common/VoiceSensitivity.tsx; dependencies: [5, 57, 31, 27, 4259, 4607, 7030, 661, 4661, 33, 4501, 697, 4000, 1478, 566, 4662, 4406, 3869, 1244, 1305, 7972, 7992, 477, 2] */
import Module00005 from '../../by-id/module-00005.js'; /* Metro dependency 5 */
import Module00057 from '../../by-id/module-00057.js'; /* Metro dependency 57 */
import UseWindowDimensionsNative from '../../modules/screen/useWindowDimensions.native.tsx'; /* Metro dependency 1478 */
import MediaEngineStore from '../../stores/MediaEngineStore.tsx'; /* Metro dependency 4259 */
import SpeakingStore from '../../stores/SpeakingStore.tsx'; /* Metro dependency 4607 */
import AppStateStore from '../../stores/native/AppStateStore.tsx'; /* Metro dependency 7030 */
import Module07992 from '../../by-id/module-07992.jsx'; /* Metro dependency 7992 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as PlatformUtilsModule from '../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as AccessibilityAnnouncerAndroidModule from '../../external/discord_common/js/packages/design/components/AccessibilityAnnouncer/AccessibilityAnnouncer.android.tsx'; /* Metro dependency 3869 */
import * as ColorUtilsModule from '../../utils/ColorUtils.tsx'; /* Metro dependency 4000 */
import * as MediaEngineModule from '../../external/discord_common/js/packages/media-engine/index.tsx'; /* Metro dependency 4406 */
import * as NativePermissionConstantsModule from '../../modules/native_permissions/NativePermissionConstants.tsx'; /* Metro dependency 4661 */
function _fun83008(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83008, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11004:6, offset: 0x01f09b8c, size: 614 bytes, params: 8, frame: 26
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = importDefault(57) /* metro dependency 57 */;
const env0_5 = importAll(31) /* metro dependency 31 */;
const env0_6 = (require(27) /* metro dependency 27 */).View;
const mediaEngineStore = importDefault(4259) /* metro dependency 4259: MediaEngineStore */;
const speakingStore = importDefault(4607) /* metro dependency 4607: SpeakingStore */;
const appStateStore = importDefault(7030) /* metro dependency 7030: AppStateStore */;
const env0_10 = (require(661) /* metro dependency 661: Constants */).AppStates;
const env0_11 = (require(4661) /* metro dependency 4661: NativePermissionConstants */).NativePermissionTypes;
let value = require(33) /* metro dependency 33 */;
let value = JsxRuntimeModule;
const env0_12 = value.jsx;
const env0_13 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {sensitivity: {'position': 'relative', 'height': 20}, sensitivityBar: {'position': 'absolute', 'top': 7,
object = {sensitivity: {'position': 'relative', 'height': 20}, sensitivityBar: {'position': 'absolute', 'top': 7,
'left': 0, 'right': 0, 'bottom': 7, 'flexDirection': 'row'}};
const WHITE = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE;
object2.sensitivityFill = {'position': 'absolute', 'backgroundColor': null, 'opacity': 0.5, 'top': 7, 'left': 0,
object.sensitivityFill = {'position': 'absolute', 'backgroundColor': null, 'opacity': 0.5, 'top': 7, 'left': 0,
'right': 0, 'bottom': 7, backgroundColor: WHITE};
object2.sensitivityCommon = {'height': 6, 'borderRadius': 3};
object.sensitivityCommon = {'height': 6, 'borderRadius': 3};
const YELLOW_300 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.YELLOW_300;
object2.sensitivityMin = {backgroundColor: YELLOW_300};
object.sensitivityMin = {backgroundColor: YELLOW_300};
let GREEN_360 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.GREEN_360;
object2.sensitivityMax = {backgroundColor: GREEN_360};
const colorUtilsModule = require(4000) /* metro dependency 4000: ColorUtils */;
const hexWithOpacity = colorUtilsModule.hexWithOpacity;
object.sensitivityMax = {backgroundColor: GREEN_360};
const hexWithOpacity = ColorUtilsModule.hexWithOpacity;
const PRIMARY_400 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_400;
object2.sensitivityDefault = {flex: 1, backgroundColor: Reflect.apply(hexWithOpacity, colorUtilsModule,
[PRIMARY_400, 0.6])};
object.sensitivityDefault = {flex: 1, backgroundColor: Reflect.apply(hexWithOpacity, ColorUtilsModule, [PRIMARY_400,
0.6])};
GREEN_360 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.GREEN_360;
object2.sensitivitySpeaking = {flex: 1, backgroundColor: GREEN_360};
object2.sensitivitySlider = {'flex': 1, 'backgroundColor': 'transparent', 'marginVertical': -10};
const env0_14 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/common/VoiceSensitivity.tsx');
object.sensitivitySpeaking = {flex: 1, backgroundColor: GREEN_360};
object.sensitivitySlider = {'flex': 1, 'backgroundColor': 'transparent', 'marginVertical': -10};
const env0_14 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('components_native/common/VoiceSensitivity.tsx');
exports.default = VoiceSensitivity;
}
function VoiceSensitivity({auto, threshold, onThresholdChange}) { // fn#83009, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11004:1075, offset: 0x01f09df2, size: 1377 bytes, params: 2, frame: 34
var r15;
var AccessibilityFocusView;
var object;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var items7;
var FormHint;
const styles = useStyles();
const value4 = threshold + 100;
const binding = env0_5;
const value5 = binding.useRef(null);
const value6 = binding.useRef(null);
const value7 = binding.useRef(null);
let useState = binding.useState;
const value8 = Reflect.apply(useState, binding, [SpeakingStore.isCurrentUserSpeaking()]);
const binding2 = env0_4;
const value9 = binding2(value8, 2);
const property = value9[0];
const env0_3 = value9[1];
const width = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)().width;
const value11 = (require(566) /* metro dependency 566: flux */).useStateFromStores([AppStateStore], function() {
return AppStateStore.getState();
}, []);
useState = binding.useState;
const value12 = binding2(Reflect.apply(useState, binding, [0]), 2);
const property2 = value12[0];
const env0_7 = value12[1];
useState = binding.useState;
const value13 = binding2(Reflect.apply(useState, binding, [value4]), 2);
const property3 = value13[0];
const env0_9 = value13[1];
useState = binding.useState;
const value14 = binding2(Reflect.apply(useState, binding, [property3 / 100]), 2);
const property4 = value14[0];
const env0_10 = value14[1];
useState = binding.useState;
const value15 = binding2(Reflect.apply(useState, binding, [width * (1 - property2 / -100)]), 2);
const property5 = value15[0];
const env0_11 = value15[1];
binding.useEffect(_fun83011, [auto, property3]);
binding.useEffect(_fun83012, [auto, property2, width]);
const value16 = binding.useCallback(_fun83013, []);
const value17 = binding.useCallback(_fun83014, []);
binding.useEffect(_fun83015, [value16, value11]);
const env0_13 = binding.useRef(false);
const env0_14 = binding.useRef(false);
const env0_15 = binding.useRef(null);
binding.useEffect(_fun83021, [auto, property]);
if (auto) {
r15 = property ? styles.sensitivitySpeaking : styles.sensitivityDefault;
AccessibilityFocusView = (require(1305) /* metro dependency 1305: native */).AccessibilityFocusView;
object = {'accessible': true, 'role': 'meter', 'aria-label': null, 'aria-valuenow': null, 'aria-valuemin': 0,
'aria-valuemax': 100};
string = intl.string;
object['aria-label'] = Reflect.apply(string, intl, [t.yZcOjo]);
object['aria-valuenow'] = property ? 100 : 0;
string = intl.string;
object['aria-valuetext'] = property ? Reflect.apply(string, intl, [t.haLKZ0]) : Reflect.apply(string, intl,
[t.X2hJL7]);
object.onAccessibilityFocus = onAccessibilityFocus;
object.onAccessibilityBlur = onAccessibilityBlur;
object.style = styles.sensitivity;
items7 = [<AccessibilityFocusView {...object}><View style={styles.sensitivityBar}><View style={[styles.sensitivityCommon,
r15]} /></View></AccessibilityFocusView>];
FormHint = (require(7972) /* metro dependency 7972: native */).FormHint;
string = intl.string;
items7[1] = <FormHint inset>{Reflect.apply(string, intl, [t.W3K5Im])}</FormHint>;
function VoiceSensitivity({auto, threshold, onThresholdChange}) { // fn#83009, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11004:1075, offset: 0x01f09df2, size: 1377 bytes, params: 2, frame: 34
var r15;
var AccessibilityFocusView;
var object2;
const intl = (IndexNativeModule).intl;
var string;
const t = (IndexNativeModule).t;
var items7;
var FormHint;
const styles = useStyles();
const value4 = threshold + 100;
const value5 = ReactModule.useRef(null);
const value6 = ReactModule.useRef(null);
const value7 = ReactModule.useRef(null);
let useState = ReactModule.useState;
const speakingStoreBinding = SpeakingStore;
const value8 = Reflect.apply(useState, ReactModule, [speakingStoreBinding.isCurrentUserSpeaking()]);
const value9 = Module00057(value8, 2);
const property = value9[0];
const env0_3 = value9[1];
const width = (UseWindowDimensionsNative)().width;
const value11 = (require(566) /* metro dependency 566: flux */).useStateFromStores([AppStateStore], function() {
return AppStateStore.getState();
}, []);
useState = ReactModule.useState;
const value12 = Module00057(Reflect.apply(useState, ReactModule, [0]), 2);
const property2 = value12[0];
const env0_7 = value12[1];
useState = ReactModule.useState;
const value13 = Module00057(Reflect.apply(useState, ReactModule, [value4]), 2);
const property3 = value13[0];
const env0_9 = value13[1];
useState = ReactModule.useState;
const value14 = Module00057(Reflect.apply(useState, ReactModule, [property3 / 100]), 2);
const property4 = value14[0];
const env0_10 = value14[1];
useState = ReactModule.useState;
const value15 = Module00057(Reflect.apply(useState, ReactModule, [width * (1 - property2 / -100)]), 2);
const property5 = value15[0];
const env0_11 = value15[1];
ReactModule.useEffect(_fun83011, [auto, property3]);
ReactModule.useEffect(_fun83012, [auto, property2, width]);
const value16 = ReactModule.useCallback(_fun83013, []);
const value17 = ReactModule.useCallback(_fun83014, []);
ReactModule.useEffect(_fun83015, [value16, value11]);
const env0_13 = ReactModule.useRef(false);
const env0_14 = ReactModule.useRef(false);
const env0_15 = ReactModule.useRef(null);
ReactModule.useEffect(_fun83021, [auto, property]);
if (auto) {
r15 = property ? styles.sensitivitySpeaking : styles.sensitivityDefault;
AccessibilityFocusView = (require(1305) /* metro dependency 1305: native */).AccessibilityFocusView;
object2 = {'accessible': true, 'role': 'meter', 'aria-label': null, 'aria-valuenow': null, 'aria-valuemin': 0,
'aria-valuemax': 100};
string = intl.string;
object2['aria-label'] = Reflect.apply(string, intl, [t.yZcOjo]);
object2['aria-valuenow'] = property ? 100 : 0;
string = intl.string;
object2['aria-valuetext'] = property ? Reflect.apply(string, intl, [t.haLKZ0]) : Reflect.apply(string, intl,
[t.X2hJL7]);
object2.onAccessibilityFocus = onAccessibilityFocus;
object2.onAccessibilityBlur = onAccessibilityBlur;
object2.style = styles.sensitivity;
items7 = [
<AccessibilityFocusView {...object2}>
<View style={styles.sensitivityBar}>
<View style={[styles.sensitivityCommon, r15]} />
</View>
</AccessibilityFocusView>,
];
FormHint = (require(7972) /* metro dependency 7972: native */).FormHint;
string = intl.string;
items7[1] = (
<FormHint inset>
{Reflect.apply(string, intl, [t.W3K5Im])}
</FormHint>
);
return (
<View>
{items7}
</View>
);
}
const items4 = [
<View style={styles.sensitivityBar}>
<View ref={value5} style={[styles.sensitivityCommon, styles.sensitivityMin, {flex: property4}]} />
<View ref={value6} style={[styles.sensitivityCommon, styles.sensitivityMax, {flex: 1 - property4}]} />
</View>,
];
items4[1] = <View ref={value7} style={[styles.sensitivityFill, {left: property5}]} />;
const defaultImport = Module07992;
items4[2] = ((Component) => <Component style={styles.sensitivitySlider} value={value4} minimumValue={0} maximumValue={100} minimumTrackTintColor="transparent" maximumTrackTintColor="transparent" onValueChange={value17} onSlidingComplete={function(a0) {
onThresholdChange(-1 * (100 - a0));
}} onResponderGrant={PlatformUtilsModule.isAndroid() ? function() {
return true;
} : undefined} />)(defaultImport);
return (
<View>
{items7}
<View style={styles.sensitivity}>
{items4}
</View>
);
}
const items4 = [<View style={styles.sensitivityBar}><View ref={value5} style={[styles.sensitivityCommon,
styles.sensitivityMin, {flex: property4}]} /><View ref={value6} style={[styles.sensitivityCommon,
styles.sensitivityMax, {flex: 1 - property4}]} /></View>];
items4[1] = <View ref={value7} style={[styles.sensitivityFill, {left: property5}]} />;
const defaultImport = importDefault(7992) /* metro dependency 7992 */;
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
items4[2] = ((Component) => <Component style={styles.sensitivitySlider} value={value4} minimumValue={0} maximumValue={100} minimumTrackTintColor="transparent" maximumTrackTintColor="transparent" onValueChange={value17} onSlidingComplete={function(a0) {
onThresholdChange(-1 * (100 - a0));
}} onResponderGrant={platformUtilsModule.isAndroid() ? function() {
return true;
} : undefined} />)(defaultImport);
return (
<View style={styles.sensitivity}>
{items4}
</View>
);
}
function _fun83011() { // fn#83011, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11004:1535, offset: 0x01f0a366, size: 36 bytes, params: 1, frame: 11
if (!auto) {
env0_10(env0_8 / 100);
}
}
function _fun83012() { // fn#83012, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11004:1574, offset: 0x01f0a38a, size: 54 bytes, params: 1, frame: 12
if (!auto) {
env0_11(width * (1 - env0_6 / -100));
}
}
function _fun83013(a0, a1) { // fn#83013, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11004:1630, offset: 0x01f0a3c0, size: 31 bytes, params: 3, frame: 12
env0_3(a1);
env0_7(a0);
}
function _fun83014(a0) { // fn#83014, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11004:1671, offset: 0x01f0a3df, size: 19 bytes, params: 2, frame: 11
env0_9(a0);
}
function _fun83015() { // fn#83015, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11004:1699, offset: 0x01f0a3f2, size: 69 bytes, params: 1, frame: 10
const binding = env0_5;
const ACTIVE = AppStates.ACTIVE;
if (binding === ACTIVE) {
(function() {
return _listenOnlyIfWeHavePermission.apply(this, arguments);
})();
return _fun83020;
}
}
function _fun83021() { // fn#83021, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11004:2261, offset: 0x01f0a571, size: 254 bytes, params: 1, frame: 18
var environment;
var autoBinding;
var binding;
var binding2;
var clearTimeout;
var AccessibilityAnnouncer;
var announce;
var intl;
if (env0_13.current) {
autoBinding = auto;
binding = env0_14;
if (autoBinding) {
if (binding.current) {
binding = env0_2;
binding2 = env0_15;
if (binding) {
if (binding2.current != null) {
clearTimeout = global.clearTimeout;
binding = env0_15;
clearTimeout(binding.current);
binding.current = null;
}
value = environment.__proto__;
AccessibilityAnnouncer = (require(3869) /* metro dependency 3869: AccessibilityAnnouncerAndroid */).AccessibilityAnnouncer;
announce = AccessibilityAnnouncer.announce;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
Reflect.apply(announce, AccessibilityAnnouncer,
[intl.string((require(1244) /* metro dependency 1244: indexNative */).t.haLKZ0)]);
} else {
binding2.current = global.setTimeout(_fun83022, 1000);
}
return _fun83023;
function _fun83011() { // fn#83011, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11004:1535, offset: 0x01f0a366, size: 36 bytes, params: 1, frame: 11
if (!auto) {
env0_10(env0_8 / 100);
}
return undefined;
}
binding.current = false;
} else {
env0_13.current = true;
}
}
function _listenOnlyIfWeHavePermission() { // fn#83016, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11004:1927, offset: 0x01f0a437, size: 53 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__.__proto__;
return env2_3(_fun83018).apply(this, arguments);
}
function _fun83020() { // fn#83020, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11004:1839, offset: 0x01f0a520, size: 81 bytes, params: 1, frame: 14
const mediaEngine = MediaEngineStore.getMediaEngine();
const removeListener = mediaEngine.removeListener;
const MediaEngineEvent = (require(4406) /* metro dependency 4406: mediaEngine */).MediaEngineEvent;
const VoiceActivity = MediaEngineEvent.VoiceActivity;
Reflect.apply(removeListener, mediaEngine, [VoiceActivity, env1_12]);
}
function _fun83022() { // fn#83022, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11004:2471, offset: 0x01f0a66f, size: 106 bytes, params: 1, frame: 16
env1_15.current = null;
const AccessibilityAnnouncer = (require(3869) /* metro dependency 3869: AccessibilityAnnouncerAndroid */).AccessibilityAnnouncer;
const announce = AccessibilityAnnouncer.announce;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const X2hJL7 = (require(1244) /* metro dependency 1244: indexNative */).t.X2hJL7;
Reflect.apply(announce, AccessibilityAnnouncer, [Reflect.apply(string, intl, [X2hJL7])]);
}
function* _fun83018() { // fn#83018, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11004:2008, offset: 0x01f0a477, size: 169 bytes, params: 1, frame: 17
var mediaEngine;
var on;
var VoiceActivity;
if (true) {
value = environment.__proto__.__proto__.__proto__.__proto__;
var binding = env4_1;
var value3 = binding(env4_2[15]);
var hasPermission = value3.hasPermission;
var AUDIO = env4_11.AUDIO;
yield Reflect.apply(hasPermission, value3, [AUDIO, {showAuthorizationError: false}]);
var value4 = undefined;
if (false) {
return value4;
}
if (value4 && !auto) {
binding = env4_7;
mediaEngine = binding.getMediaEngine();
on = mediaEngine.on;
binding = env4_0;
VoiceActivity = binding(env4_2[16]).MediaEngineEvent.VoiceActivity;
value = environment.__proto__.__proto__.__proto__;
Reflect.apply(on, mediaEngine, [VoiceActivity, env3_12]);
}
function _fun83012() { // fn#83012, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11004:1574, offset: 0x01f0a38a, size: 54 bytes, params: 1, frame: 12
if (!auto) {
env0_11(width * (1 - ReactNativeModule.View / -100));
}
}
function _fun83013(a0, a1) { // fn#83013, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11004:1630, offset: 0x01f0a3c0, size: 31 bytes, params: 3, frame: 12
env0_3(a1);
env0_7(a0);
}
function _fun83014(a0) { // fn#83014, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11004:1671, offset: 0x01f0a3df, size: 19 bytes, params: 2, frame: 11
env0_9(a0);
}
function _fun83015() { // fn#83015, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11004:1699, offset: 0x01f0a3f2, size: 69 bytes, params: 1, frame: 10
const ACTIVE = AppStates.ACTIVE;
if (ReactModule === ACTIVE) {
(function() {
return _listenOnlyIfWeHavePermission.apply(this, arguments);
})();
return _fun83020;
}
function _listenOnlyIfWeHavePermission() { // fn#83016, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11004:1927, offset: 0x01f0a437, size: 53 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__.__proto__;
return env2_3(_fun83018).apply(this, arguments);
function* _fun83018() { // fn#83018, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11004:2008, offset: 0x01f0a477, size: 169 bytes, params: 1, frame: 17
var mediaEngine;
var on;
var VoiceActivity;
if (true) {
value = environment.__proto__.__proto__.__proto__.__proto__;
var binding = env4_1;
var value3 = binding(env4_2[15]);
var hasPermission = value3.hasPermission;
var AUDIO = env4_11.AUDIO;
yield Reflect.apply(hasPermission, value3, [AUDIO, {showAuthorizationError: false}]);
var value4 = undefined;
if (false) {
return value4;
}
if (value4 && !auto) {
binding = env4_7;
mediaEngine = binding.getMediaEngine();
on = mediaEngine.on;
binding = env4_0;
VoiceActivity = binding(env4_2[16]).MediaEngineEvent.VoiceActivity;
value = environment.__proto__.__proto__.__proto__;
Reflect.apply(on, mediaEngine, [VoiceActivity, env3_12]);
}
}
}
}
function _fun83020() { // fn#83020, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11004:1839, offset: 0x01f0a520, size: 81 bytes, params: 1, frame: 14
const mediaEngine = MediaEngineStore.getMediaEngine();
const removeListener = mediaEngine.removeListener;
const MediaEngineEvent = (MediaEngineModule).MediaEngineEvent;
const VoiceActivity = MediaEngineEvent.VoiceActivity;
Reflect.apply(removeListener, mediaEngine, [VoiceActivity, env1_12]);
}
}
function _fun83021() { // fn#83021, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11004:2261, offset: 0x01f0a571, size: 254 bytes, params: 1, frame: 18
var environment;
var autoBinding;
var binding;
var binding2;
var clearTimeout;
var AccessibilityAnnouncer;
var announce;
var intl;
if (env0_13.current) {
autoBinding = auto;
binding = env0_14;
if (autoBinding) {
if (binding.current) {
binding = env0_2;
binding2 = env0_15;
if (binding) {
if (binding2.current != null) {
clearTimeout = global.clearTimeout;
binding = env0_15;
clearTimeout(binding.current);
binding.current = null;
}
value = environment.__proto__;
AccessibilityAnnouncer = (require(3869) /* metro dependency 3869: AccessibilityAnnouncerAndroid */).AccessibilityAnnouncer;
announce = AccessibilityAnnouncer.announce;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
Reflect.apply(announce, AccessibilityAnnouncer,
[intl.string((require(1244) /* metro dependency 1244: indexNative */).t.haLKZ0)]);
} else {
binding2.current = global.setTimeout(_fun83022, 1000);
}
return _fun83023;
}
return undefined;
}
binding.current = false;
} else {
env0_13.current = true;
}
function _fun83022() { // fn#83022, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11004:2471, offset: 0x01f0a66f, size: 106 bytes, params: 1, frame: 16
env1_15.current = null;
const AccessibilityAnnouncer = (AccessibilityAnnouncerAndroidModule).AccessibilityAnnouncer;
const announce = AccessibilityAnnouncer.announce;
const intl = (IndexNativeModule).intl;
const string = intl.string;
const X2hJL7 = (IndexNativeModule).t.X2hJL7;
Reflect.apply(announce, AccessibilityAnnouncer, [Reflect.apply(string, intl, [X2hJL7])]);
}
function _fun83023() { // fn#83023, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11004:2580, offset: 0x01f0a6d9, size: 52 bytes, params: 1, frame: 13
var clearTimeout;
var binding;
if (env1_15.current != null) {
clearTimeout = global.clearTimeout;
binding = env1_15;
clearTimeout(binding.current);
binding.current = null;
}
}
}
function onAccessibilityFocus() { // fn#83024, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11004:3063, owner: VoiceSensitivity.onAccessibilityFocus, offset: 0x01f0a70d, size: 19 bytes, params: 1, frame: 2
env0_14.current = true;
}
function onAccessibilityBlur() { // fn#83025, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11004:3102, owner: VoiceSensitivity.onAccessibilityBlur, offset: 0x01f0a720, size: 64 bytes, params: 1, frame: 13
var clearTimeout;
var binding;
env0_14.current = false;
if (env0_15.current != null) {
clearTimeout = global.clearTimeout;
binding = env0_15;
clearTimeout(binding.current);
binding.current = null;
}
}
}
}
global.__d(_fun83008, 10818, [5, 57, 31, 27, 4259, 4607, 7030, 661, 4661, 33, 4501, 697, 4000, 1478, 566, 4662,
4406, 3869, 1244, 1305, 7972, 7992, 477,
2]) /* metro module 10818, dependencies: [5, 57, 31, 27, 4259, 4607, 7030, 661, 4661, 33, 4501, 697, 4000, 1478, 566, 4662, 4406, 3869, 1244, 1305, 7972, 7992, 477, 2] */;
@@ -1,77 +1,86 @@
/* Metro module 10272; source: components_native/common/VolumeSlider.tsx; dependencies: [31, 27, 4291, 33, 477, 4501, 697, 3860, 10273, 7992, 4615, 1244, 6711, 2] */
import Module07992 from '../../by-id/module-07992.jsx'; /* Metro dependency 7992 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as JsxRuntimeModule from '../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as UseTokenModule from '../../design/tokens/native/useToken.tsx'; /* Metro dependency 3860 */
import * as ConstantsModule from '../../external/discord_common/js/packages/media-engine/Constants.tsx'; /* Metro dependency 4291 */
import * as CreateStylesModule from '../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as PerceptualVolumeUtilsModule from '../../utils/PerceptualVolumeUtils.tsx'; /* Metro dependency 4615 */
import * as VoiceNormalIconModule from '../../design/components/Icon/native/redesign/generated/VoiceNormalIcon.tsx'; /* Metro dependency 6711 */
import * as VoiceXIconModule from '../../design/components/Icon/native/redesign/generated/VoiceXIcon.tsx'; /* Metro dependency 10273 */
function _fun79715(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79715, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10458:6, offset: 0x01e5f0cf, size: 310 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const value = 0;
importAll(dependencyMap[value]);
const env0_3 = (require(27) /* metro dependency 27 */).View;
const env0_4 = (require(4291) /* metro dependency 4291: Constants */).MAX_EMBEDDED_VOLUME_PERCEPTUAL;
const value2 = require(33) /* metro dependency 33 */;
const env0_5 = value2.jsx;
const env0_6 = value2.jsxs;
const r9 = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid() ? value : 16;
const env0_7 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({volumerSlider: {'flexDirection': 'row',
const env0_7 = (CreateStylesModule).createStyles({volumerSlider: {'flexDirection': 'row',
'alignItems': 'center'}, leftIcon: {marginRight: r9}, rightIcon: {marginLeft: r9},
volumerSliderNative: {'flex': 1, 'marginVertical': -10, 'backgroundColor': 'transparent'}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/common/VolumeSlider.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/common/VolumeSlider.tsx');
exports.default = VolumeSlider;
}
function VolumeSlider(a0) { // fn#79716, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10458:430, offset: 0x01e5f205, size: 571 bytes, params: 2, frame: 32
var r10;
var moduleValue3;
const style = a0.style;
const maxTrackTintColor = a0.maxTrackTintColor;
const value = undefined;
const r13 = maxTrackTintColor !== value ? maxTrackTintColor : (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_400;
const value3 = a0.value;
const maxVolume = a0.maxVolume;
const r15 = maxVolume !== value ? maxVolume : MAX_EMBEDDED_VOLUME_PERCEPTUAL;
const env0_0 = a0.onValueChange;
const onResponderGrant = a0.onResponderGrant;
const object = {'style': 0, 'maxTrackTintColor': 0, 'value': 0, 'maxVolume': 0, 'onValueChange': 0,
'onResponderGrant': 0};
silentSetPrototypeOf(object, null, undefined);
const value5 = copyDataProperties({}, a0, object, value3);
const styles = useStyles();
const useToken = UseTokenModule.useToken;
const BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
const r14 = value5.minTrackColor ?? Reflect.apply(useToken, UseTokenModule, [BACKGROUND_BRAND]);
const items3 = [styles.volumerSlider, style];
const VoiceXIcon = (VoiceXIconModule).VoiceXIcon;
const items2 = [
<VoiceXIcon style={styles.leftIcon} />,
];
const defaultImport = Module07992;
const defaultImportProps = {style: styles.volumerSliderNative,
value: (PerceptualVolumeUtilsModule).amplitudeToPerceptual(value3),
minimumValue: 0, maximumValue: r15, minimumTrackTintColor: r14, maximumTrackTintColor: r13};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
defaultImportProps.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.xPHVBs);
defaultImportProps.onValueChange = onValueChange_79717;
if (onResponderGrant != null) {
r10 = onResponderGrant;
} else {
moduleValue3 = require(477) /* metro dependency 477: PlatformUtils */;
r10 = moduleValue3.isAndroid() ? function() {
return true;
} : value;
}
defaultImportProps.onResponderGrant = r10;
items2[1] = ((Component) => <Component {...defaultImportProps} />)(defaultImport);
const VoiceNormalIcon = (VoiceNormalIconModule).VoiceNormalIcon;
items2[2] = <VoiceNormalIcon style={styles.rightIcon} />;
return (
<View style={items3}>
{items2}
</View>
);
function VolumeSliderOnValueChange(a0) { // fn#79717, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10458:997, owner: VolumeSlider.onValueChange, offset: 0x01e5f440, size: 53 bytes, params: 2, frame: 13
const onValueChangeBinding = onValueChange;
let value = environment.__proto__;
value = require(4615) /* metro dependency 4615: PerceptualVolumeUtils */;
return onValueChangeBinding(value.perceptualToAmplitude(a0));
}
function VolumeSlider(a0) { // fn#79716, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10458:430, offset: 0x01e5f205, size: 571 bytes, params: 2, frame: 32
var r10;
var moduleValue3;
const style = a0.style;
const maxTrackTintColor = a0.maxTrackTintColor;
const value = undefined;
const r13 = maxTrackTintColor !== value ? maxTrackTintColor : (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_400;
const value3 = a0.value;
const maxVolume = a0.maxVolume;
const r15 = maxVolume !== value ? maxVolume : MAX_EMBEDDED_VOLUME_PERCEPTUAL;
const env0_0 = a0.onValueChange;
const onResponderGrant = a0.onResponderGrant;
const object2 = {'style': 0, 'maxTrackTintColor': 0, 'value': 0, 'maxVolume': 0, 'onValueChange': 0,
'onResponderGrant': 0};
silentSetPrototypeOf(object2, null, undefined);
const value5 = copyDataProperties({}, a0, object2, value3);
const styles = useStyles();
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
const useToken = useTokenModule.useToken;
const BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
const r14 = value5.minTrackColor ?? Reflect.apply(useToken, useTokenModule, [BACKGROUND_BRAND]);
const items3 = [styles.volumerSlider, style];
const VoiceXIcon = (require(10273) /* metro dependency 10273: VoiceXIcon */).VoiceXIcon;
const items2 = [<VoiceXIcon style={styles.leftIcon} />];
const defaultImport = importDefault(7992) /* metro dependency 7992 */;
const defaultImportProps = {style: styles.volumerSliderNative,
value: (require(4615) /* metro dependency 4615: PerceptualVolumeUtils */).amplitudeToPerceptual(value3),
minimumValue: 0, maximumValue: r15, minimumTrackTintColor: r14, maximumTrackTintColor: r13};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
defaultImportProps.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.xPHVBs);
defaultImportProps.onValueChange = onValueChange_79717;
if (onResponderGrant != null) {
r10 = onResponderGrant;
} else {
moduleValue3 = require(477) /* metro dependency 477: PlatformUtils */;
r10 = moduleValue3.isAndroid() ? function() {
return true;
} : value;
}
defaultImportProps.onResponderGrant = r10;
items2[1] = ((Component) => <Component {...defaultImportProps} />)(defaultImport);
const VoiceNormalIcon = (require(6711) /* metro dependency 6711: VoiceNormalIcon */).VoiceNormalIcon;
items2[2] = <VoiceNormalIcon style={styles.rightIcon} />;
return (
<View style={items3}>
{items2}
</View>
);
}
function VolumeSliderOnValueChange(a0) { // fn#79717, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10458:997, owner: VolumeSlider.onValueChange, offset: 0x01e5f440, size: 53 bytes, params: 2, frame: 13
const onValueChangeBinding = onValueChange;
let value = environment.__proto__;
value = require(4615) /* metro dependency 4615: PerceptualVolumeUtils */;
return onValueChangeBinding(value.perceptualToAmplitude(a0));
}
global.__d(_fun79715, 10272, [31, 27, 4291, 33, 477, 4501, 697, 3860, 10273, 7992, 4615, 1244, 6711,
2]) /* metro module 10272, dependencies: [31, 27, 4291, 33, 477, 4501, 697, 3860, 10273, 7992, 4615, 1244, 6711, 2] */;
@@ -1,58 +1,79 @@
/* Metro module 13187; source: components_native/common/color_picker/ColorBlock.tsx; dependencies: [31, 27, 33, 4501, 697, 673, 5278, 4000, 1305, 11365, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
function _fun100656(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100656, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13377:6, offset: 0x021f25ca, size: 251 bytes, params: 8, frame: 22
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const object = {'minWidth': 44, 'height': 44, 'borderRadius': null, 'marginHorizontal': 12, 'marginVertical': 8,
let value = ReactModule;
const createStyles = CreateStylesModule.createStyles;
const object2 = {'minWidth': 44, 'height': 44, 'borderRadius': null, 'marginHorizontal': 12, 'marginVertical': 8,
'justifyContent': 'center', 'alignItems': 'center'};
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xl;
const styles = Reflect.apply(createStyles, createStylesModule, [{colorBlock: object}]);
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xl;
const styles = Reflect.apply(createStyles, CreateStylesModule, [{colorBlock: object2}]);
value = value.memo(_fun100657);
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/common/color_picker/ColorBlock.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/common/color_picker/ColorBlock.tsx');
exports.default = value;
exports.useStyles = styles;
}
function _fun100657({color, style, selected, onSelect}) { // fn#100657, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13377:317, offset: 0x021f26c5, size: 655 bytes, params: 2, frame: 30
var r0;
var object3;
var items3;
var object4;
var PressableOpacity;
var moduleValue3;
var items2;
var object6;
selected = !(selected === undefined) && selected;
const styles = useStyles();
const colorUtilsModule = require(673) /* metro dependency 673: ColorUtils */;
const v = colorUtilsModule.int2hsv(color).v;
if (onSelect != null) {
PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
object3 = {accessibilityRole: 'button'};
moduleValue3 = require(4000) /* metro dependency 4000: ColorUtils */;
object3.accessibilityLabel = moduleValue3.hexToColorName(colorUtilsModule.int2hex(color), true);
object3.accessibilityState = {selected: selected};
object3.onPress = function() {
return onSelect(color);
};
items2 = [styles.colorBlock, style];
object6 = {};
object6.backgroundColor = (require(673) /* metro dependency 673: ColorUtils */).int2hex(color);
items2[2] = object6;
object3.style = items2;
r0 = <PressableOpacity {...object3}>{selected ? ((Icon) => <Icon source={importDefault(11365) /* metro dependency 11365 */} color={v < 0.5 ? (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE : (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BLACK} />)((require(1305) /* metro dependency 1305: native */).Icon) : null}</PressableOpacity>;
} else {
items3 = [styles.colorBlock, style];
object4 = {};
object4.backgroundColor = (require(673) /* metro dependency 673: ColorUtils */).int2hex(color);
items3[2] = object4;
r0 = <View style={items3}>{selected ? ((Icon) => <Icon source={importDefault(11365) /* metro dependency 11365 */} color={v < 0.5 ? (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE : (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BLACK} />)((require(1305) /* metro dependency 1305: native */).Icon) : null}</View>;
function _fun100657({color, style, selected, onSelect}) { // fn#100657, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13377:317, offset: 0x021f26c5, size: 655 bytes, params: 2, frame: 30
var r0;
var object;
var items3;
var object2;
var PressableOpacity;
var moduleValue3;
var items2;
var object5;
selected = !(selected === undefined) && selected;
const styles = useStyles();
const colorUtilsModule = require(673) /* metro dependency 673: ColorUtils */;
const v = colorUtilsModule.int2hsv(color).v;
if (onSelect != null) {
PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
object = {accessibilityRole: 'button'};
moduleValue3 = require(4000) /* metro dependency 4000: ColorUtils */;
object.accessibilityLabel = moduleValue3.hexToColorName(colorUtilsModule.int2hex(color), true);
object.accessibilityState = {selected: selected};
object.onPress = function() {
return onSelect(color);
};
items2 = [styles.colorBlock, style];
object5 = {};
object5.backgroundColor = (require(673) /* metro dependency 673: ColorUtils */).int2hex(color);
items2[2] = object5;
object.style = items2;
r0 = (
<PressableOpacity {...object}>
{
selected
? ((Icon) => <Icon source={importDefault(11365) /* metro dependency 11365 */} color={v < 0.5 ? (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE : (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BLACK} />)((require(1305) /* metro dependency 1305: native */).Icon)
: null
}
</PressableOpacity>
);
} else {
items3 = [styles.colorBlock, style];
object2 = {};
object2.backgroundColor = (require(673) /* metro dependency 673: ColorUtils */).int2hex(color);
items3[2] = object2;
r0 = (
<View style={items3}>
{
selected
? ((Icon) => <Icon source={importDefault(11365) /* metro dependency 11365 */} color={v < 0.5 ? (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE : (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BLACK} />)((require(1305) /* metro dependency 1305: native */).Icon)
: null
}
</View>
);
}
return r0;
}
return r0;
}
global.__d(_fun100656, 13187, [31, 27, 33, 4501, 697, 673, 5278, 4000, 1305, 11365,
2]) /* metro module 13187, dependencies: [31, 27, 33, 4501, 697, 673, 5278, 4000, 1305, 11365, 2] */;
@@ -1,29 +1,46 @@
/* Metro module 14391; source: components_native/common/color_picker/FormRoleColorPicker.tsx; dependencies: [31, 661, 33, 4501, 4080, 14392, 1962, 7972, 13187, 673, 2] */
import ColorBlock from './ColorBlock.tsx'; /* Metro dependency 13187 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as ColorUtilsModule from '../../../external/discord_common/js/shared/utils/ColorUtils.tsx'; /* Metro dependency 673 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as NativeModule from '../../../design/void/Form/native/index.tsx'; /* Metro dependency 7972 */
function _fun108935(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108935, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14588:6, offset: 0x02335188, size: 211 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(661) /* metro dependency 661: Constants */).DEFAULT_ROLE_COLOR;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
const env0_6 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({rowColorBlock: {'marginHorizontal': 0,
const env0_6 = (CreateStylesModule).createStyles({rowColorBlock: {'marginHorizontal': 0,
'marginVertical': 0, 'marginRight': 8, 'minWidth': 24, 'height': 24, 'borderRadius': 3}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/common/color_picker/FormRoleColorPicker.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/common/color_picker/FormRoleColorPicker.tsx');
exports.default = FormRoleColorPicker;
function FormRoleColorPicker({color = DEFAULT_ROLE_COLOR, disabled, onChange}) { // fn#108936, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14588:284, offset: 0x0233525b, size: 216 bytes, params: 2, frame: 22
disabled = !(disabled === undefined) && disabled;
const styles = useStyles();
const value2 = ReactModule.useCallback(_fun108937, [color, onChange]);
const FormRow = (NativeModule).FormRow;
return (
<FormRow
leading={((Component) => <Component color={color} style={styles.rowColorBlock} onSelect={value2} />)(ColorBlock)}
label={(ColorUtilsModule).int2hex(color)}
disabled={disabled}
onPress={value2}
/>
);
function _fun108937() { // fn#108937, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14588:378, offset: 0x02335333, size: 102 bytes, params: 1, frame: 17
let value = environment.__proto__;
const defaultImport = importDefault(dependencyMap[4]);
const openLazy = defaultImport.openLazy;
value = require(dependencyMap[6]);
value = value(dependencyMap[5], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport, [value, 'RoleColorPicker', {color: env0_0, onSelect: onChange}]);
}
}
}
function FormRoleColorPicker({color = DEFAULT_ROLE_COLOR, disabled, onChange}) { // fn#108936, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14588:284, offset: 0x0233525b, size: 216 bytes, params: 2, frame: 22
disabled = !(disabled === undefined) && disabled;
const styles = useStyles();
const value2 = env0_3.useCallback(_fun108937, [color, onChange]);
const FormRow = (require(7972) /* metro dependency 7972: native */).FormRow;
return (
<FormRow
leading={((Component) => <Component color={color} style={styles.rowColorBlock} onSelect={value2} />)(importDefault(13187) /* metro dependency 13187: ColorBlock */)}
label={(require(673) /* metro dependency 673: ColorUtils */).int2hex(color)}
disabled={disabled}
onPress={value2}
/>
);
}
global.__d(_fun108935, 14391, [31, 661, 33, 4501, 4080, 14392, 1962, 7972, 13187, 673,
2]) /* metro module 14391, dependencies: [31, 661, 33, 4501, 4080, 14392, 1962, 7972, 13187, 673, 2] */;
@@ -1,11 +1,23 @@
/* Metro module 14392; source: components_native/common/color_picker/RoleColorPickerActionSheet.tsx; dependencies: [57, 31, 27, 661, 33, 4501, 697, 13187, 9625, 4080, 13189, 6275, 6758, 1244, 4578, 13797, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import ActionSheetActionCreators from '../../../modules/action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
import ColorBlock from './ColorBlock.tsx'; /* Metro dependency 13187 */
import ShowCustomColorPickerActionSheet from '../../../modules/color_picker/native/showCustomColorPickerActionSheet.tsx'; /* Metro dependency 13189 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ButtonNativeModule from '../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as BottomSheetNativeModule from '../../../design/components/Sheet/native/BottomSheet.native.tsx'; /* Metro dependency 6275 */
import * as BottomSheetTitleHeaderNativeModule from '../../../design/components/Sheet/native/BottomSheetTitleHeader.native.tsx'; /* Metro dependency 6758 */
import * as UseIsWindowSmallModule from '../../../modules/screen/native/useIsWindowSmall.tsx'; /* Metro dependency 9625 */
import * as ColorBlockModule from './ColorBlock.tsx'; /* Metro dependency 13187 */
import * as EyeDropperIconModule from '../../../design/components/Icon/native/redesign/generated/EyeDropperIcon.tsx'; /* Metro dependency 13797 */
function _fun108938(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108938, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14589:6, offset: 0x02335399, size: 433 bytes, params: 8, frame: 23
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_5 = value.View;
const env0_6 = value.Pressable;
value = require(661) /* metro dependency 661: Constants */;
@@ -30,104 +42,107 @@ function _fun108938(global, require, importDefault, importAll, module, exports,
object.colorWrap = {'flexGrow': 1, 'flexDirection': 'row', 'flexWrap': 'wrap', 'justifyContent': 'center',
'maxWidth': 340, marginBottom: PX_16};
const env0_11 = Reflect.apply(createStyles, value, [object]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/common/color_picker/RoleColorPickerActionSheet.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/common/color_picker/RoleColorPickerActionSheet.tsx');
exports.default = RoleColorPickerActionSheet;
}
function RoleColorPickerActionSheet({color, onSelect, confirmLabel, defaultColor = DEFAULT_ROLE_COLOR}) { // fn#108939, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14589:664, offset: 0x0233554a, size: 883 bytes, params: 2, frame: 30
var object4;
var r6;
var object2;
const styles = useStyles();
const styles2 = (require(13187) /* metro dependency 13187: ColorBlock */).useStyles();
const env0_3 = styles2;
const binding = undefined;
const [property, env0_5] = env0_3(binding.useState(color), 2);
const value5 = binding.useMemo(_fun108940,
[(require(9625) /* metro dependency 9625: useIsWindowSmall */).useIsWindowSmall(), styles2.colorBlock]);
const value6 = binding.useCallback(_fun108941, [property, onSelect]);
const env0_8 = binding.useCallback(_fun108942, []);
const value7 = binding.useCallback(_fun108943, [color, onSelect]);
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
object4 = {};
const BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const WTqQ5e = (require(1244) /* metro dependency 1244: indexNative */).t.WTqQ5e;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
if (confirmLabel != null) {
r6 = {'size': 'sm', 'variant': 'secondary', text: confirmLabel, onPress: value6};
} else {
object2 = {size: 'sm'};
object2.text = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['R3BPH+']);
object2.onPress = value6;
r6 = object2;
}
object4.header = <BottomSheetTitleHeader title={Reflect.apply(string, intl,
[WTqQ5e])} trailing={<Button {...r6} />} />;
const value8 = env0_10.map(_fun108944);
const pressableProps = {style: value5, onPress: value7,
accessibilityLabel: intl.string((require(1244) /* metro dependency 1244: indexNative */).t['/fkc8a']),
accessibilityRole: 'button'};
const EyeDropperIcon = (require(13797) /* metro dependency 13797: EyeDropperIcon */).EyeDropperIcon;
return (
<BottomSheet {...object4}>
<View style={styles.body}>
<View style={styles.colorWrap}>
{value8}
<Pressable {...pressableProps}>
<EyeDropperIcon size="lg" />
</Pressable>
</View>
<Button
variant="secondary"
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.yBZMsQ)}
onPress={onPress_108945}
/>
</View>
</BottomSheet>
);
}
function _fun108940() { // fn#108940, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14589:867, offset: 0x023358bd, size: 63 bytes, params: 1, frame: 13
var r0;
var object2;
const binding = env0_6;
const colorBlock = styles.colorBlock;
if (binding) {
function RoleColorPickerActionSheet({color, onSelect, confirmLabel, defaultColor = DEFAULT_ROLE_COLOR}) { // fn#108939, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14589:664, offset: 0x0233554a, size: 883 bytes, params: 2, frame: 30
var object2;
var r6;
var object;
const styles = useStyles();
const styles2 = (ColorBlockModule).useStyles();
const styles22 = styles2;
const binding = undefined;
const [property, env0_5] = styles22(binding.useState(color), 2);
const value5 = binding.useMemo(_fun108940,
[(UseIsWindowSmallModule).useIsWindowSmall(), styles2.colorBlock]);
const value6 = binding.useCallback(_fun108941, [property, onSelect]);
const env0_8 = binding.useCallback(_fun108942, []);
const value7 = binding.useCallback(_fun108943, [color, onSelect]);
const BottomSheet = (BottomSheetNativeModule).BottomSheet;
object2 = {};
copyDataProperties(object2, colorBlock, undefined);
object2['minWidth'] = 38;
object2['height'] = 38;
r0 = object2;
} else {
r0 = colorBlock;
const BottomSheetTitleHeader = (BottomSheetTitleHeaderNativeModule).BottomSheetTitleHeader;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const WTqQ5e = (require(1244) /* metro dependency 1244: indexNative */).t.WTqQ5e;
const Button = (ButtonNativeModule).Button;
if (confirmLabel != null) {
r6 = {'size': 'sm', 'variant': 'secondary', text: confirmLabel, onPress: value6};
} else {
object = {size: 'sm'};
object.text = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['R3BPH+']);
object.onPress = value6;
r6 = object;
}
object2.header = <BottomSheetTitleHeader title={Reflect.apply(string, intl,
[WTqQ5e])} trailing={<Button {...r6} />} />;
const value8 = env0_10.map(_fun108944);
const pressableProps = {style: value5, onPress: value7,
accessibilityLabel: intl.string((require(1244) /* metro dependency 1244: indexNative */).t['/fkc8a']),
accessibilityRole: 'button'};
const EyeDropperIcon = (EyeDropperIconModule).EyeDropperIcon;
return (
<BottomSheet {...object2}>
<View style={styles.body}>
<View style={styles.colorWrap}>
{value8}
<Pressable {...pressableProps}>
<EyeDropperIcon size="lg" />
</Pressable>
</View>
<Button
variant="secondary"
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.yBZMsQ)}
onPress={onPress_108945}
/>
</View>
</BottomSheet>
);
function _fun108940() { // fn#108940, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14589:867, offset: 0x023358bd, size: 63 bytes, params: 1, frame: 13
var r0;
var object;
const binding = env0_6;
const colorBlock = styles.colorBlock;
if (binding) {
object = {};
copyDataProperties(object, colorBlock, undefined);
object['minWidth'] = 38;
object['height'] = 38;
r0 = object;
} else {
r0 = colorBlock;
}
return r0;
}
function _fun108941() { // fn#108941, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14589:962, offset: 0x023358fc, size: 53 bytes, params: 1, frame: 12
onSelect(ReactModule);
const value = environment.__proto__;
(ActionSheetActionCreators).hideActionSheet();
}
function _fun108942(a0) { // fn#108942, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14589:1024, offset: 0x02335931, size: 19 bytes, params: 2, frame: 11
env0_5(a0);
}
function _fun108943() { // fn#108943, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14589:1056, offset: 0x02335944, size: 54 bytes, params: 1, frame: 13
const value = environment.__proto__;
(ShowCustomColorPickerActionSheet)({color: color,
onSelect: onSelect});
}
function _fun108944(a0) { // fn#108944, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14589:1454, offset: 0x0233597a, size: 80 bytes, params: 2, frame: 17
const value = environment.__proto__;
return ((Component) => <Component color={a0} style={env0_7} selected={a0 === ReactModule} onSelect={env0_8} key={a0} />)(ColorBlock);
}
function RoleColorPickerActionSheetOnPress() { // fn#108945, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14589:1773, owner: RoleColorPickerActionSheet.onPress, offset: 0x023359ca, size: 20 bytes, params: 1, frame: 11
env0_5(env0_2);
}
}
return r0;
}
function _fun108941() { // fn#108941, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14589:962, offset: 0x023358fc, size: 53 bytes, params: 1, frame: 12
onSelect(env0_4);
const value = environment.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
}
function _fun108942(a0) { // fn#108942, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14589:1024, offset: 0x02335931, size: 19 bytes, params: 2, frame: 11
env0_5(a0);
}
function _fun108943() { // fn#108943, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14589:1056, offset: 0x02335944, size: 54 bytes, params: 1, frame: 13
const value = environment.__proto__;
(importDefault(13189) /* metro dependency 13189: showCustomColorPickerActionSheet */)({color: color,
onSelect: onSelect});
}
function _fun108944(a0) { // fn#108944, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14589:1454, offset: 0x0233597a, size: 80 bytes, params: 2, frame: 17
const value = environment.__proto__;
return ((Component) => <Component color={a0} style={env0_7} selected={a0 === env0_4} onSelect={env0_8} key={a0} />)(importDefault(13187) /* metro dependency 13187: ColorBlock */);
}
function RoleColorPickerActionSheetOnPress() { // fn#108945, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14589:1773, owner: RoleColorPickerActionSheet.onPress, offset: 0x023359ca, size: 20 bytes, params: 1, frame: 11
env0_5(env0_2);
}
global.__d(_fun108938, 14392, [57, 31, 27, 661, 33, 4501, 697, 13187, 9625, 4080, 13189, 6275, 6758, 1244, 4578,
13797,
2]) /* metro module 14392, dependencies: [57, 31, 27, 661, 33, 4501, 697, 13187, 9625, 4080, 13189, 6275, 6758, 1244, 4578, 13797, 2] */;