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,182 +1,226 @@
/* Metro module 9927; source: modules/feedback/native/FeedbackActionSheet.tsx; dependencies: [57, 31, 27, 9906, 33, 4501, 697, 4080, 6266, 22, 9909, 4594, 5080, 9928, 1962, 1585, 6275, 6758, 6806, 6277, 4573, 9910, 6231, 6238, 8950, 1244, 2] */
import Module00022 from '../../../by-id/module-00022.js'; /* Metro dependency 22 */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import UseSafeAreaInsetsNative from '../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import ActionSheetActionCreators from '../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
import UsePrevious from '../../../hooks/usePrevious.tsx'; /* Metro dependency 6266 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as UseMountEffectModule from '../../../hooks/useMountEffect.tsx'; /* Metro dependency 4594 */
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 ConstantsModule from '../Constants.tsx'; /* Metro dependency 9906 */
function _fun77713(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#77713, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10113:6, offset: 0x01e080c2, size: 326 bytes, params: 8, frame: 22
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
const env0_6 = (require(9906) /* metro dependency 9906: Constants */).FeedbackRating;
let value = require(33) /* metro dependency 33 */;
let value = JsxRuntimeModule;
const env0_7 = value.jsx;
const env0_8 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object = {};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.container = {padding: PX_16};
object2.ratingsHeader = {textAlign: 'center'};
object.container = {padding: PX_16};
object.ratingsHeader = {textAlign: 'center'};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.reasonsList = {marginBottom: PX_16};
const env0_9 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/feedback/native/FeedbackActionSheet.tsx');
object.reasonsList = {marginBottom: PX_16};
const env0_9 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/feedback/native/FeedbackActionSheet.tsx');
exports.default = FeedbackActionSheet;
}
function FeedbackActionSheet({headerLabel, showHeaderCloseButton, hideDontShowAgainCheckbox, ratingOptions, ratingTextLabels, ratingsBodyLabel, reasonsHeaderLabel, reasons, feedbackReasons, otherKey, trackOpen, trackReport, getFreeformDescription}) { // fn#77715, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10113:482, offset: 0x01e0822d, size: 1203 bytes, params: 2, frame: 37
var r8;
var TableCheckboxRow;
var intl;
const styles = useStyles();
const binding = trackReport;
const value4 = binding.useRef(null);
const value5 = (importDefault(6266) /* metro dependency 6266: usePrevious */)(reasons);
let useState = binding.useState;
const defaultImport = importDefault(22) /* metro dependency 22 */;
const value6 = Reflect.apply(useState, binding, [defaultImport.shuffle(reasons)]);
const binding2 = trackOpen;
const value7 = binding2(value6, 2);
const property = value7[0];
const env0_8 = value7[1];
binding.useEffect(_fun77716, [reasons, value5, otherKey]);
useState = binding.useState;
const value9 = binding2(Reflect.apply(useState, binding, [null]), 2);
const property2 = value9[0];
const env0_10 = value9[1];
useState = binding.useState;
const value10 = binding2(Reflect.apply(useState, binding, [null]), 2);
const env0_11 = value10[0];
const env0_12 = value10[1];
useState = binding.useState;
const value11 = binding2(Reflect.apply(useState, binding, [false]), 2);
const env0_13 = value11[0];
const env0_14 = value11[1];
useState = binding.useState;
const value12 = binding2(Reflect.apply(useState, binding, [false]), 2);
const property3 = value12[0];
const env0_16 = value12[1];
(importDefault(4594) /* metro dependency 4594: useMountEffect */)(function() {
trackOpen();
});
(require(4594) /* metro dependency 4594: useMountEffect */).useUnmountEffect(_fun77718);
const value13 = binding.useCallback(_fun77719, []);
const env0_17 = binding.useCallback(_fun77720, [feedbackReasons]);
const r14 = property2 !== null && property2 !== FeedbackRating.GOOD;
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
const value17 = 232 + (hideDontShowAgainCheckbox ? 0 : 48) + bottom;
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
const bottomSheetProps = {scrollable: true, ref: value4, startHeight: value17,
maxHeight: property2 == null ? value17 : undefined};
const BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
bottomSheetProps.header = <BottomSheetTitleHeader title={headerLabel} trailing={showHeaderCloseButton ? ((ActionSheetCloseButton) => <ActionSheetCloseButton onPress={closeActionSheet_77714} />)((require(6806) /* metro dependency 6806: ActionSheetCloseButtonNative */).ActionSheetCloseButton) : null} />;
const BottomSheetScrollView = (require(6277) /* metro dependency 6277 */).BottomSheetScrollView;
const items3 = [styles.container];
items3[1] = {paddingBottom: styles.container.padding + bottom};
const items2 = [ratingsBodyLabel != null ? ((Text) => <Text style={styles.ratingsHeader} variant="text-md/medium" color="text-default">{ratingsBodyLabel}</Text>)((require(4573) /* metro dependency 4573: Text */).Text) : null];
items2[1] = ((Component) => <Component ratingOptions={ratingOptions} textLabels={ratingTextLabels} selectedRating={property2} onChangeRating={value13} />)(importDefault(9910) /* metro dependency 9910: RatingSelector */);
items2[2] = r14 ? <View style={styles.reasonsList}>{((TableRowGroup) => <TableRowGroup title={reasonsHeaderLabel} hasIcons={false}>{property.map(function(a0,
a1) {
var env0_0 = a0;
return a0.label != null ? ((TableRow) => <TableRow label={a0.label} labelLineClamp={2} onPress={_fun77722} key={a1} />)(require(dependencyMap[23]).TableRow) : undefined;
})}</TableRowGroup>)((require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup)}</View> : null;
if (hideDontShowAgainCheckbox) {
r8 = null;
} else {
TableCheckboxRow = (require(8950) /* metro dependency 8950: TableCheckboxRowNative */).TableCheckboxRow;
var tableCheckboxRowProps = {'start': true, 'end': true, checked: property3};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
tableCheckboxRowProps.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5E9SB9']);
tableCheckboxRowProps.onPress = onPress_77723;
r8 = <TableCheckboxRow {...tableCheckboxRowProps} />;
function closeActionSheet_77714() { // fn#77714, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10113:335, offset: 0x01e08208, size: 37 bytes, params: 1, frame: 11
(ActionSheetActionCreators).hideActionSheet();
}
items2[3] = r8;
return (
<BottomSheet {...bottomSheetProps}>
<BottomSheetScrollView contentContainerStyle={items3}>
{items2}
</BottomSheetScrollView>
</BottomSheet>
);
}
function _fun77716() { // fn#77716, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10113:856, offset: 0x01e086e0, size: 102 bytes, params: 1, frame: 16
let value = environment.__proto__;
const defaultImport = importDefault(22) /* metro dependency 22 */;
const isEqual = defaultImport.isEqual;
let binding = env0_7;
if (!Reflect.apply(isEqual, defaultImport, [binding, reasons])) {
binding = env0_8;
value = require(9909) /* metro dependency 9909: FeedbackUtils */;
binding(value.shuffleProblems(reasons, otherKey));
}
}
function _fun77718() { // fn#77718, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10113:1146, offset: 0x01e08746, size: 220 bytes, params: 1, frame: 18
var object2;
var value2;
var value3;
var defaultImport;
var pushLazy;
var value4;
if (env0_13) {
value2 = environment.__proto__;
value3 = undefined;
defaultImport = importDefault(dependencyMap[12]);
pushLazy = defaultImport.pushLazy;
value4 = require(dependencyMap[14])(dependencyMap[13], dependencyMap.paths);
object2 = {};
object2.result = {rating: env0_9, reason: env0_11, dontShowAgain: env0_15};
object2.trackReport = trackReport;
object2.descriptionLabel = (getFreeformDescription == null ? value3 : getFreeformDescription(env0_11)) ?? value3;
Reflect.apply(pushLazy, defaultImport, [value4, object2]);
} else {
trackReport({rating: env0_9, reason: env0_11, dontShowAgain: env0_15});
}
}
function _fun77719(a0) { // fn#77719, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10113:1381, offset: 0x01e08822, size: 93 bytes, params: 2, frame: 13
var current;
env0_10(a0);
const GOOD = FeedbackRating.GOOD;
if (a0 === GOOD) {
env0_12(null);
env0_14(false);
closeActionSheet_77714();
} else {
current = env0_6.current;
if (current != null) {
current.expandActionSheet();
}
}
}
function _fun77720(a0) { // fn#77720, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10113:1510, offset: 0x01e0887f, size: 76 bytes, params: 2, frame: 14
env0_12(a0);
if (feedbackReasons != null && feedbackReasons.includes(a0.value)) {
env0_14(true);
}
closeActionSheet_77714();
}
function _fun77721(a0, a1) { // fn#77721, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10113:2278, offset: 0x01e088cb, size: 102 bytes, params: 3, frame: 18
const env0_0 = a0;
if (a0.label != null) {
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
return (
<TableRow
label={a0.label}
labelLineClamp={2}
onPress={onPress_77722}
key={a1}
function FeedbackActionSheet({headerLabel, showHeaderCloseButton, hideDontShowAgainCheckbox, ratingOptions, ratingTextLabels, ratingsBodyLabel, reasonsHeaderLabel, reasons, feedbackReasons, otherKey, trackOpen, trackReport, getFreeformDescription}) { // fn#77715, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10113:482, offset: 0x01e0822d, size: 1203 bytes, params: 2, frame: 37
var r8;
var TableCheckboxRow;
var intl;
const styles = useStyles();
const binding = trackReport;
const value4 = binding.useRef(null);
const value5 = (UsePrevious)(reasons);
let useState = binding.useState;
const defaultImport = Module00022;
const value6 = Reflect.apply(useState, binding, [defaultImport.shuffle(reasons)]);
const binding2 = trackOpen;
const value7 = binding2(value6, 2);
const property = value7[0];
const env0_8 = value7[1];
binding.useEffect(_fun77716, [reasons, value5, otherKey]);
useState = binding.useState;
const value9 = binding2(Reflect.apply(useState, binding, [null]), 2);
const property2 = value9[0];
const env0_10 = value9[1];
useState = binding.useState;
const value10 = binding2(Reflect.apply(useState, binding, [null]), 2);
const env0_11 = value10[0];
const env0_12 = value10[1];
useState = binding.useState;
const value11 = binding2(Reflect.apply(useState, binding, [false]), 2);
const env0_13 = value11[0];
const env0_14 = value11[1];
useState = binding.useState;
const value12 = binding2(Reflect.apply(useState, binding, [false]), 2);
const property3 = value12[0];
const env0_16 = value12[1];
(importDefault(4594) /* metro dependency 4594: useMountEffect */)(function() {
trackOpen();
});
(UseMountEffectModule).useUnmountEffect(_fun77718);
const value13 = binding.useCallback(_fun77719, []);
const env0_17 = binding.useCallback(_fun77720, [feedbackReasons]);
const r14 = property2 !== null && property2 !== FeedbackRating.GOOD;
const bottom = (UseSafeAreaInsetsNative)().bottom;
const value17 = 232 + (hideDontShowAgainCheckbox ? 0 : 48) + bottom;
const BottomSheet = (BottomSheetNativeModule).BottomSheet;
const bottomSheetProps = {scrollable: true, ref: value4, startHeight: value17,
maxHeight: property2 == null ? value17 : undefined};
const BottomSheetTitleHeader = (BottomSheetTitleHeaderNativeModule).BottomSheetTitleHeader;
bottomSheetProps.header = (
<BottomSheetTitleHeader
title={headerLabel}
trailing={showHeaderCloseButton
? ((ActionSheetCloseButton) => <ActionSheetCloseButton onPress={closeActionSheet_77714} />)((require(6806) /* metro dependency 6806: ActionSheetCloseButtonNative */).ActionSheetCloseButton)
: null}
/>
);
} else {
return undefined;
const BottomSheetScrollView = (Module06277Module).BottomSheetScrollView;
const items3 = [styles.container];
items3[1] = {paddingBottom: styles.container.padding + bottom};
const items2 = [
ratingsBodyLabel != null
? ((Text) => <Text style={styles.ratingsHeader} variant="text-md/medium" color="text-default">{ratingsBodyLabel}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)
: null,
];
items2[1] = ((Component) => <Component ratingOptions={ratingOptions} textLabels={ratingTextLabels} selectedRating={property2} onChangeRating={value13} />)(importDefault(9910) /* metro dependency 9910: RatingSelector */);
items2[2] = (
r14
? (
<View style={styles.reasonsList}>
{((TableRowGroup) => <TableRowGroup title={reasonsHeaderLabel} hasIcons={false}>{property.map(function(a0,
a1) {
var env0_0 = a0;
return (
a0.label != null
? ((TableRow) => <TableRow label={a0.label} labelLineClamp={2} onPress={_fun77722} key={a1} />)(require(dependencyMap[23]).TableRow)
: undefined
);
})}</TableRowGroup>)((require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup)}
</View>
)
: null
);
if (hideDontShowAgainCheckbox) {
r8 = null;
} else {
TableCheckboxRow = (require(8950) /* metro dependency 8950: TableCheckboxRowNative */).TableCheckboxRow;
var tableCheckboxRowProps = {'start': true, 'end': true, checked: property3};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
tableCheckboxRowProps.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5E9SB9']);
tableCheckboxRowProps.onPress = onPress_77723;
r8 = <TableCheckboxRow {...tableCheckboxRowProps} />;
}
items2[3] = r8;
return (
<BottomSheet {...bottomSheetProps}>
<BottomSheetScrollView contentContainerStyle={items3}>
{items2}
</BottomSheetScrollView>
</BottomSheet>
);
function _fun77716() { // fn#77716, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10113:856, offset: 0x01e086e0, size: 102 bytes, params: 1, frame: 16
let value = environment.__proto__;
const defaultImport = Module00022;
const isEqual = defaultImport.isEqual;
let binding = env0_7;
if (!Reflect.apply(isEqual, defaultImport, [binding, reasons])) {
binding = env0_8;
value = require(9909) /* metro dependency 9909: FeedbackUtils */;
binding(value.shuffleProblems(reasons, otherKey));
}
}
function _fun77718() { // fn#77718, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10113:1146, offset: 0x01e08746, size: 220 bytes, params: 1, frame: 18
var object;
var value2;
var value3;
var defaultImport;
var pushLazy;
var value4;
if (env0_13) {
value2 = environment.__proto__;
value3 = undefined;
defaultImport = importDefault(dependencyMap[12]);
pushLazy = defaultImport.pushLazy;
value4 = require(dependencyMap[14])(dependencyMap[13], dependencyMap.paths);
object = {};
object.result = {rating: env0_9, reason: env0_11, dontShowAgain: env0_15};
object.trackReport = trackReport;
object.descriptionLabel = (getFreeformDescription == null ? value3 : getFreeformDescription(env0_11)) ?? value3;
Reflect.apply(pushLazy, defaultImport, [value4, object]);
} else {
trackReport({rating: env0_9, reason: env0_11, dontShowAgain: env0_15});
}
}
function _fun77719(a0) { // fn#77719, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10113:1381, offset: 0x01e08822, size: 93 bytes, params: 2, frame: 13
var current;
env0_10(a0);
const GOOD = FeedbackRating.GOOD;
if (a0 === GOOD) {
env0_12(null);
env0_14(false);
closeActionSheet_77714();
} else {
current = ConstantsModule.FeedbackRating.current;
if (current != null) {
current.expandActionSheet();
}
}
}
function _fun77720(a0) { // fn#77720, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10113:1510, offset: 0x01e0887f, size: 76 bytes, params: 2, frame: 14
env0_12(a0);
if (feedbackReasons != null && feedbackReasons.includes(a0.value)) {
env0_14(true);
}
closeActionSheet_77714();
}
function _fun77721(a0, a1) { // fn#77721, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10113:2278, offset: 0x01e088cb, size: 102 bytes, params: 3, frame: 18
const env0_0 = a0;
if (a0.label != null) {
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
return (
<TableRow
label={a0.label}
labelLineClamp={2}
onPress={onPress_77722}
key={a1}
/>
);
} else {
return undefined;
}
function onPress_77722() { // fn#77722, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10113:2359, offset: 0x01025b87, size: 23 bytes, params: 1, frame: 11
return env1_17(env0_0);
}
}
function FeedbackActionSheetOnPress() { // fn#77723, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10113:2509, owner: FeedbackActionSheet.onPress, offset: 0x01e08931, size: 23 bytes, params: 1, frame: 11
return env0_16(!env0_15);
}
}
}
function FeedbackActionSheetOnPress() { // fn#77723, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10113:2509, owner: FeedbackActionSheet.onPress, offset: 0x01e08931, size: 23 bytes, params: 1, frame: 11
return env0_16(!env0_15);
}
global.__d(_fun77713, 9927, [57, 31, 27, 9906, 33, 4501, 697, 4080, 6266, 22, 9909, 4594, 5080, 9928, 1962, 1585,
6275, 6758, 6806, 6277, 4573, 9910, 6231, 6238, 8950, 1244,
2]) /* metro module 9927, dependencies: [57, 31, 27, 9906, 33, 4501, 697, 4080, 6266, 22, 9909, 4594, 5080, 9928, 1962, 1585, 6275, 6758, 6806, 6277, 4573, 9910, 6231, 6238, 8950, 1244, 2] */;
@@ -1,309 +1,399 @@
/* Metro module 15699; source: modules/feedback/native/FeedbackActionSheetV2.tsx; dependencies: [57, 31, 27, 9906, 33, 4501, 697, 4080, 22, 6266, 4594, 5080, 9928, 1962, 1244, 4573, 9910, 8950, 6231, 6238, 4578, 1585, 6275, 6758, 6806, 6277, 2] */
import Module00022 from '../../../by-id/module-00022.js'; /* Metro dependency 22 */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import UseSafeAreaInsetsNative from '../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import ActionSheetActionCreators from '../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
import UsePrevious from '../../../hooks/usePrevious.tsx'; /* Metro dependency 6266 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ButtonNativeModule from '../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as UseMountEffectModule from '../../../hooks/useMountEffect.tsx'; /* Metro dependency 4594 */
import * as TableRowNativeModule from '../../../design/components/TableRow/native/TableRow.native.tsx'; /* Metro dependency 6238 */
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 ConstantsModule from '../Constants.tsx'; /* Metro dependency 9906 */
function _fun120503(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#120503, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15907:6, offset: 0x0252cf71, size: 347 bytes, params: 8, frame: 22
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
const env0_6 = (require(9906) /* metro dependency 9906: Constants */).FeedbackRating;
let value = require(33) /* metro dependency 33 */;
let value = JsxRuntimeModule;
const env0_7 = value.jsx;
const env0_8 = value.Fragment;
const env0_9 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object = {};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.container = {padding: PX_16};
object2.ratingsBody = {textAlign: 'center'};
object.container = {padding: PX_16};
object.ratingsBody = {textAlign: 'center'};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.problemsList = {marginBottom: PX_16};
const env0_10 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/feedback/native/FeedbackActionSheetV2.tsx');
object.problemsList = {marginBottom: PX_16};
const env0_10 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/feedback/native/FeedbackActionSheetV2.tsx');
exports.default = FeedbackActionSheetV2;
}
function closeActionSheet_120504() { // fn#120504, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15907:347, offset: 0x01e08208, size: 37 bytes, params: 1, frame: 11
(ActionSheetActionCreators).hideActionSheet();
}
function shuffleOptionsTree(a0) { // fn#120505, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15907:425, offset: 0x0252d0cc, size: 60 bytes, params: 2, frame: 13
const value = importDefault(22) /* metro dependency 22 */;
return value.shuffle(a0.map(_fun120506));
}
function shuffleOptionsTree(a0) { // fn#120505, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15907:425, offset: 0x0252d0cc, size: 60 bytes, params: 2, frame: 13
return Module00022.shuffle(a0.map(_fun120506));
function _fun120506(a0) { // fn#120506, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15907:452, offset: 0x0252d108, size: 94 bytes, params: 2, frame: 14
const object = {};
copyDataProperties(object, a0, undefined);
let value = environment.__proto__;
value = Reflect.apply((importDefault(22) /* metro dependency 22 */).shuffle, value, [a0.problemOptions]);
value = value.concat(a0.freeformConfig ?? []);
object['problemOptions'] = value;
return object;
}
function FeedbackActionSheetV2({headerLabel, ratingBody, ratingOptions, showHeaderCloseButton, hideDontShowAgainCheckbox, categoriesHeader, initialRating, optionsTree, onMount, trackOpen, trackReport}) { // fn#120507, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15907:663, offset: 0x0252d166, size: 1737 bytes, params: 2, frame: 43
var r7;
var r16;
var r13;
var problemsHeader;
var jsxRuntimeEnv0_8Binding;
var items4;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var items2;
var items3;
var TableCheckboxRow;
initialRating = initialRating === undefined ? null : initialRating;
let env0_4 = undefined;
const styles = useStyles();
let binding = env0_4;
const value5 = binding.useRef(null);
env0_4 = value5;
const value6 = (importDefault(6266) /* metro dependency 6266: usePrevious */)(optionsTree);
let useState = binding.useState;
const value7 = Reflect.apply(useState, binding, [shuffleOptionsTree(optionsTree)]);
const binding2 = trackReport;
const value8 = binding2(value7, 2);
const property = value8[0];
const env0_7 = value8[1];
binding.useEffect(_fun120508, [optionsTree, value6]);
useState = binding.useState;
const value10 = binding2(Reflect.apply(useState, binding, [false]), 2);
const property2 = value10[0];
const env0_9 = value10[1];
useState = binding.useState;
const value11 = binding2(Reflect.apply(useState, binding, [initialRating]), 2);
const property3 = value11[0];
const env0_11 = value11[1];
const value12 = binding.useState(property.length !== 1 ? null : property[0]);
binding = trackReport;
const value13 = binding(value12, 2);
const property5 = value13[0];
const env0_13 = value13[1];
const binding3 = env0_4;
useState = binding3.useState;
const value14 = binding(Reflect.apply(useState, binding3, [null]), 2);
const property6 = value14[0];
const env0_15 = value14[1];
useState = binding3.useState;
const value15 = binding(Reflect.apply(useState, binding3, [false]), 2);
const env0_16 = value15[0];
const env0_17 = value15[1];
(importDefault(4594) /* metro dependency 4594: useMountEffect */)(function() {
if (onMount != null) {
onMount();
}
trackOpen();
});
(require(4594) /* metro dependency 4594: useMountEffect */).useUnmountEffect(_fun120510);
const value16 = binding3.useCallback(_fun120512, []);
const env0_18 = binding3.useCallback(_fun120513, []);
const env0_19 = binding3.useCallback(_fun120514, [property5]);
if (property3 == null) {
jsxRuntimeEnv0_8Binding = jsxRuntimeEnv0_8;
if (ratingBody != null) {
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
r16 = <Text style={styles.ratingsBody} variant="text-md/medium" color="text-default">{ratingBody}</Text>;
} else {
r16 = null;
}
items3 = [r16];
items3[1] = ((Component) => <Component ratingOptions={ratingOptions} selectedRating={property3} onChangeRating={value16} />)(importDefault(9910) /* metro dependency 9910: RatingSelector */);
if (hideDontShowAgainCheckbox) {
r16 = null;
} else {
TableCheckboxRow = (require(8950) /* metro dependency 8950: TableCheckboxRowNative */).TableCheckboxRow;
r16 = <TableCheckboxRow start end checked={property2} label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5E9SB9'])} onPress={onPress_120515} />;
}
items3[2] = r16;
r7 = <>{items3}</>;
r13 = headerLabel;
} else if (property3 === FeedbackRating.GOOD) {
if (property5 != null && property6 == null) {
}
function FeedbackActionSheetV2({headerLabel, ratingBody, ratingOptions, showHeaderCloseButton, hideDontShowAgainCheckbox, categoriesHeader, initialRating, optionsTree, onMount, trackOpen, trackReport}) { // fn#120507, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15907:663, offset: 0x0252d166, size: 1737 bytes, params: 2, frame: 43
var r7;
var r16;
var r13;
var problemsHeader;
var jsxRuntimeEnv0_8Binding;
var items4;
const Button = (ButtonNativeModule).Button;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var items2;
var items3;
var TableCheckboxRow;
initialRating = initialRating === undefined ? null : initialRating;
let env0_4 = undefined;
const styles = useStyles();
let binding = env0_4;
const value5 = binding.useRef(null);
env0_4 = value5;
const value6 = (UsePrevious)(optionsTree);
let useState = binding.useState;
const value7 = Reflect.apply(useState, binding, [shuffleOptionsTree(optionsTree)]);
const binding2 = trackReport;
const value8 = binding2(value7, 2);
const property = value8[0];
const env0_7 = value8[1];
binding.useEffect(_fun120508, [optionsTree, value6]);
useState = binding.useState;
const value10 = binding2(Reflect.apply(useState, binding, [false]), 2);
const property2 = value10[0];
const env0_9 = value10[1];
useState = binding.useState;
const value11 = binding2(Reflect.apply(useState, binding, [initialRating]), 2);
const property3 = value11[0];
const env0_11 = value11[1];
const value12 = binding.useState(property.length !== 1 ? null : property[0]);
binding = trackReport;
const value13 = binding(value12, 2);
const property5 = value13[0];
const env0_13 = value13[1];
const binding3 = env0_4;
useState = binding3.useState;
const value14 = binding(Reflect.apply(useState, binding3, [null]), 2);
const property6 = value14[0];
const env0_15 = value14[1];
useState = binding3.useState;
const value15 = binding(Reflect.apply(useState, binding3, [false]), 2);
const env0_16 = value15[0];
const env0_17 = value15[1];
(importDefault(4594) /* metro dependency 4594: useMountEffect */)(function() {
if (onMount != null) {
onMount();
}
trackOpen();
});
(UseMountEffectModule).useUnmountEffect(_fun120510);
const value16 = binding3.useCallback(_fun120512, []);
const env0_18 = binding3.useCallback(_fun120513, []);
const env0_19 = binding3.useCallback(_fun120514, [property5]);
if (property3 == null) {
jsxRuntimeEnv0_8Binding = jsxRuntimeEnv0_8;
if (ratingBody != null) {
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
r16 = (
<Text
style={styles.ratingsBody}
variant="text-md/medium"
color="text-default"
>
{ratingBody}
</Text>
);
} else {
r16 = null;
}
items3 = [r16];
items3[1] = ((Component) => <Component ratingOptions={ratingOptions} selectedRating={property3} onChangeRating={value16} />)(importDefault(9910) /* metro dependency 9910: RatingSelector */);
if (hideDontShowAgainCheckbox) {
r16 = null;
} else {
TableCheckboxRow = (require(8950) /* metro dependency 8950: TableCheckboxRowNative */).TableCheckboxRow;
r16 = (
<TableCheckboxRow
start
end
checked={property2}
label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5E9SB9'])}
onPress={onPress_120515}
/>
);
}
items3[2] = r16;
r7 = (
<>
{items3}
</>
);
r13 = headerLabel;
} else if (property3 === FeedbackRating.GOOD) {
if (property5 != null && property6 == null) {
problemsHeader = property5.problemsHeader;
jsxRuntimeEnv0_8Binding = jsxRuntimeEnv0_8;
items4 = [
<View style={styles.problemsList}>
{((TableRowGroup) => <TableRowGroup hasIcons={false}>{property5.problemOptions.map(_fun120519)}</TableRowGroup>)((require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup)}
</View>,
];
items4[1] = (
<Button
variant="secondary"
size="sm"
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['13/7kX'])}
onPress={onPress_120521}
/>
);
r7 = (
<>
{items4}
</>
);
r13 = problemsHeader;
} else {
r7 = undefined;
r13 = headerLabel;
}
} else if (property5 == null) {
jsxRuntimeEnv0_8Binding = jsxRuntimeEnv0_8;
items2 = [
<View style={styles.problemsList}>
{((TableRowGroup) => <TableRowGroup hasIcons={false}>{property.map(_fun120516)}</TableRowGroup>)((require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup)}
</View>,
];
items2[1] = (
<Button
variant="secondary"
size="sm"
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['13/7kX'])}
onPress={onPress_120518}
/>
);
r7 = (
<>
{items2}
</>
);
r13 = categoriesHeader;
} else if (property5 != null && property6 == null) {
problemsHeader = property5.problemsHeader;
jsxRuntimeEnv0_8Binding = jsxRuntimeEnv0_8;
items4 = [<View style={styles.problemsList}>{((TableRowGroup) => <TableRowGroup hasIcons={false}>{property5.problemOptions.map(_fun120519)}</TableRowGroup>)((require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup)}</View>];
items4[1] = <Button variant="secondary" size="sm" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['13/7kX'])} onPress={onPress_120521} />;
r7 = <>{items4}</>;
items4 = [
<View style={styles.problemsList}>
{((TableRowGroup) => <TableRowGroup hasIcons={false}>{property5.problemOptions.map(_fun120519)}</TableRowGroup>)((require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup)}
</View>,
];
items4[1] = (
<Button
variant="secondary"
size="sm"
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['13/7kX'])}
onPress={onPress_120521}
/>
);
r7 = (
<>
{items4}
</>
);
r13 = problemsHeader;
} else {
r7 = undefined;
r13 = headerLabel;
}
} else if (property5 == null) {
jsxRuntimeEnv0_8Binding = jsxRuntimeEnv0_8;
items2 = [<View style={styles.problemsList}>{((TableRowGroup) => <TableRowGroup hasIcons={false}>{property.map(_fun120516)}</TableRowGroup>)((require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup)}</View>];
items2[1] = <Button variant="secondary" size="sm" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['13/7kX'])} onPress={onPress_120518} />;
r7 = <>{items2}</>;
r13 = categoriesHeader;
} else if (property5 != null && property6 == null) {
problemsHeader = property5.problemsHeader;
jsxRuntimeEnv0_8Binding = jsxRuntimeEnv0_8;
items4 = [<View style={styles.problemsList}>{((TableRowGroup) => <TableRowGroup hasIcons={false}>{property5.problemOptions.map(_fun120519)}</TableRowGroup>)((require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup)}</View>];
items4[1] = <Button variant="secondary" size="sm" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['13/7kX'])} onPress={onPress_120521} />;
r7 = <>{items4}</>;
r13 = problemsHeader;
} else {
r7 = undefined;
r13 = headerLabel;
}
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
const value27 = 232 + (hideDontShowAgainCheckbox ? 0 : 48) + bottom;
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
const bottomSheetProps = {scrollable: true, ref: value5, startHeight: value27,
maxHeight: property3 == null ? value27 : undefined};
const BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
bottomSheetProps.header = <BottomSheetTitleHeader title={r13} trailing={showHeaderCloseButton ? ((ActionSheetCloseButton) => <ActionSheetCloseButton onPress={closeActionSheet_120504} />)((require(6806) /* metro dependency 6806: ActionSheetCloseButtonNative */).ActionSheetCloseButton) : null} />;
const BottomSheetScrollView = (require(6277) /* metro dependency 6277 */).BottomSheetScrollView;
return (
<BottomSheet {...bottomSheetProps}>
<BottomSheetScrollView
contentContainerStyle={[styles.container, {paddingBottom: styles.container.padding + bottom}]}
>
{r7}
</BottomSheetScrollView>
</BottomSheet>
);
}
function _fun120506(a0) { // fn#120506, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15907:452, offset: 0x0252d108, size: 94 bytes, params: 2, frame: 14
const object2 = {};
copyDataProperties(object2, a0, undefined);
let value = environment.__proto__;
value = Reflect.apply((importDefault(22) /* metro dependency 22 */).shuffle, value, [a0.problemOptions]);
value = value.concat(a0.freeformConfig ?? []);
object2['problemOptions'] = value;
return object2;
}
function _fun120508() { // fn#120508, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15907:995, offset: 0x0252d82f, size: 75 bytes, params: 1, frame: 16
const defaultImport = importDefault(22) /* metro dependency 22 */;
if (!defaultImport.isEqual(env0_5, optionsTree)) {
env0_7(shuffleOptionsTree(optionsTree));
}
}
function _fun120510() { // fn#120510, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15907:1345, offset: 0x0252d89d, size: 388 bytes, params: 1, frame: 21
var environment;
var r4;
var trackReportBinding;
var object2;
var value2;
var value5;
var value6;
var defaultImport;
var pushLazy;
var value7;
var intl;
if (env0_16) {
value5 = environment.__proto__;
value6 = undefined;
defaultImport = importDefault(dependencyMap[11]);
pushLazy = defaultImport.pushLazy;
value7 = require(dependencyMap[13])(dependencyMap[12], dependencyMap.paths);
object2 = {};
object2.result = {rating: env0_10, category: env0_12 == null ? value6 : env0_12.value, reason: env0_14,
dontShowAgain: env0_8};
object2.trackReport = trackReport;
object2.titleLabel = env0_12 == null ? value6 : env0_12.problemsHeader;
intl = require(dependencyMap[14]).intl;
object2.descriptionLabel = intl.string(require(dependencyMap[14]).t.h95hcn);
object2.hideHelpdeskLink = env0_12 == null || env0_12.freeformConfig == null ? value6 : env0_12.freeformConfig.hideHelpdeskLink;
Reflect.apply(pushLazy, defaultImport, [value7, object2]);
} else {
trackReportBinding = trackReport;
value2 = null;
r4 = value2 == env0_12 ? undefined : env0_12.value;
trackReportBinding({rating: env0_10, category: value2 != r4 ? r4 : value2, reason: env0_14,
dontShowAgain: env0_8,
feedback: ''});
}
}
function _fun120512(a0) { // fn#120512, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15907:1931, offset: 0x0252da7b, size: 102 bytes, params: 2, frame: 13
var current;
env0_11(a0);
const GOOD = FeedbackRating.GOOD;
if (a0 === GOOD) {
env0_13(null);
env0_15(null);
env0_17(false);
closeActionSheet_120504();
} else {
current = env0_4.current;
if (current != null) {
current.expandActionSheet();
const bottom = (UseSafeAreaInsetsNative)().bottom;
const value27 = 232 + (hideDontShowAgainCheckbox ? 0 : 48) + bottom;
const BottomSheet = (BottomSheetNativeModule).BottomSheet;
const bottomSheetProps = {scrollable: true, ref: value5, startHeight: value27,
maxHeight: property3 == null ? value27 : undefined};
const BottomSheetTitleHeader = (BottomSheetTitleHeaderNativeModule).BottomSheetTitleHeader;
bottomSheetProps.header = (
<BottomSheetTitleHeader
title={r13}
trailing={showHeaderCloseButton
? ((ActionSheetCloseButton) => <ActionSheetCloseButton onPress={closeActionSheet_120504} />)((require(6806) /* metro dependency 6806: ActionSheetCloseButtonNative */).ActionSheetCloseButton)
: null}
/>
);
const BottomSheetScrollView = (Module06277Module).BottomSheetScrollView;
return (
<BottomSheet {...bottomSheetProps}>
<BottomSheetScrollView
contentContainerStyle={[styles.container, {paddingBottom: styles.container.padding + bottom}]}
>
{r7}
</BottomSheetScrollView>
</BottomSheet>
);
function _fun120508() { // fn#120508, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15907:995, offset: 0x0252d82f, size: 75 bytes, params: 1, frame: 16
const defaultImport = Module00022;
if (!defaultImport.isEqual(ReactNativeModule.View, optionsTree)) {
env0_7(shuffleOptionsTree(optionsTree));
}
}
}
}
function _fun120513(a0) { // fn#120513, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15907:2069, offset: 0x0252dae1, size: 53 bytes, params: 2, frame: 12
env0_13(a0);
env0_15(null);
const current = env0_4.current;
if (current != null) {
current.expandActionSheet();
}
}
function _fun120510() { // fn#120510, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15907:1345, offset: 0x0252d89d, size: 388 bytes, params: 1, frame: 21
var environment;
var r4;
var trackReportBinding;
var object;
var value2;
var value5;
var value6;
var defaultImport;
var pushLazy;
var value7;
var intl;
if (env0_16) {
value5 = environment.__proto__;
value6 = undefined;
defaultImport = importDefault(dependencyMap[11]);
pushLazy = defaultImport.pushLazy;
value7 = require(dependencyMap[13])(dependencyMap[12], dependencyMap.paths);
object = {};
object.result = {rating: env0_10, category: env0_12 == null ? value6 : env0_12.value, reason: env0_14,
dontShowAgain: env0_8};
object.trackReport = trackReport_120511;
object.titleLabel = env0_12 == null ? value6 : env0_12.problemsHeader;
intl = require(dependencyMap[14]).intl;
object.descriptionLabel = intl.string(require(dependencyMap[14]).t.h95hcn);
object.hideHelpdeskLink = env0_12 == null || env0_12.freeformConfig == null ? value6 : env0_12.freeformConfig.hideHelpdeskLink;
Reflect.apply(pushLazy, defaultImport, [value7, object]);
} else {
trackReportBinding = trackReport;
value2 = null;
r4 = value2 == env0_12 ? undefined : env0_12.value;
trackReportBinding({rating: env0_10, category: value2 != r4 ? r4 : value2, reason: env0_14,
dontShowAgain: env0_8,
feedback: ''});
}
function trackReport_120511({rating, category, reason, dontShowAgain, feedback}) { // fn#120511, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15907:1491, offset: 0x0252da21, size: 90 bytes, params: 2, frame: 13
const value = environment.__proto__;
trackReport({rating: rating, category: category, reason: reason, dontShowAgain: dontShowAgain,
feedback: feedback ?? ''});
}
function _fun120514(a0) { // fn#120514, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15907:2159, offset: 0x0252db16, size: 101 bytes, params: 2, frame: 14
var freeformConfig;
const value2 = undefined;
env0_15(a0);
if (env0_12 == null) {
env0_17(false);
} else if (a0 == null) {
env0_17(false);
} else {
freeformConfig = env0_12.freeformConfig;
if ((freeformConfig == null ? value2 : freeformConfig.value) === a0.value) {
env0_17(true);
} else {
env0_17(false);
}
function _fun120512(a0) { // fn#120512, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15907:1931, offset: 0x0252da7b, size: 102 bytes, params: 2, frame: 13
var current;
env0_11(a0);
const GOOD = FeedbackRating.GOOD;
if (a0 === GOOD) {
env0_13(null);
env0_15(null);
env0_17(false);
closeActionSheet_120504();
} else {
current = env0_4.current;
if (current != null) {
current.expandActionSheet();
}
}
}
function _fun120513(a0) { // fn#120513, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15907:2069, offset: 0x0252dae1, size: 53 bytes, params: 2, frame: 12
env0_13(a0);
env0_15(null);
const current = env0_4.current;
if (current != null) {
current.expandActionSheet();
}
}
function _fun120514(a0) { // fn#120514, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15907:2159, offset: 0x0252db16, size: 101 bytes, params: 2, frame: 14
var freeformConfig;
const value2 = undefined;
env0_15(a0);
if (env0_12 == null) {
env0_17(false);
} else if (a0 == null) {
env0_17(false);
} else {
freeformConfig = env0_12.freeformConfig;
if ((freeformConfig == null ? value2 : freeformConfig.value) === a0.value) {
env0_17(true);
} else {
env0_17(false);
}
}
closeActionSheet_120504();
return value2;
}
function FeedbackActionSheetV2OnPress() { // fn#120515, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15907:2607, owner: FeedbackActionSheetV2.onPress, offset: 0x0252db7b, size: 23 bytes, params: 1, frame: 11
return env0_9(!env0_8);
}
function _fun120516(a0, a1) { // fn#120516, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15907:2754, offset: 0x0252db92, size: 86 bytes, params: 3, frame: 16
const env0_0 = a0;
const TableRow = (TableRowNativeModule).TableRow;
return (
<TableRow
label={a0.label}
labelLineClamp={2}
onPress={onPress_120517}
key={a1}
/>
);
function onPress_120517() { // fn#120517, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15907:2821, offset: 0x0252dbe8, size: 23 bytes, params: 1, frame: 11
return env1_18(env0_0);
}
}
function FeedbackActionSheetV2OnPress_120518() { // fn#120518, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15907:2946, owner: FeedbackActionSheetV2.onPress, offset: 0x0252dbff, size: 18 bytes, params: 1, frame: 11
return env0_11(null);
}
function _fun120519(a0, a1) { // fn#120519, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15907:3124, offset: 0x0252dc11, size: 86 bytes, params: 3, frame: 16
const env0_0 = a0;
const TableRow = (TableRowNativeModule).TableRow;
return (
<TableRow
label={a0.label}
labelLineClamp={2}
onPress={onPress_120520}
key={a1}
/>
);
function onPress_120520() { // fn#120520, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15907:3191, offset: 0x0252dc67, size: 23 bytes, params: 1, frame: 11
return env1_19(env0_0);
}
}
function FeedbackActionSheetV2OnPress_120521() { // fn#120521, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15907:3316, owner: FeedbackActionSheetV2.onPress, offset: 0x0252dc7e, size: 49 bytes, params: 1, frame: 12
return ConstantsModule.FeedbackRating.length === 1 ? env0_11(null) : env0_13(null);
}
}
closeActionSheet_120504();
return value2;
}
function FeedbackActionSheetV2OnPress() { // fn#120515, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15907:2607, owner: FeedbackActionSheetV2.onPress, offset: 0x0252db7b, size: 23 bytes, params: 1, frame: 11
return env0_9(!env0_8);
}
function _fun120516(a0, a1) { // fn#120516, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15907:2754, offset: 0x0252db92, size: 86 bytes, params: 3, frame: 16
const env0_0 = a0;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
return (
<TableRow
label={a0.label}
labelLineClamp={2}
onPress={onPress_120517}
key={a1}
/>
);
}
function FeedbackActionSheetV2OnPress_120518() { // fn#120518, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15907:2946, owner: FeedbackActionSheetV2.onPress, offset: 0x0252dbff, size: 18 bytes, params: 1, frame: 11
return env0_11(null);
}
function _fun120519(a0, a1) { // fn#120519, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15907:3124, offset: 0x0252dc11, size: 86 bytes, params: 3, frame: 16
const env0_0 = a0;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
return (
<TableRow
label={a0.label}
labelLineClamp={2}
onPress={onPress_120520}
key={a1}
/>
);
}
function FeedbackActionSheetV2OnPress_120521() { // fn#120521, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15907:3316, owner: FeedbackActionSheetV2.onPress, offset: 0x0252dc7e, size: 49 bytes, params: 1, frame: 12
return env0_6.length === 1 ? env0_11(null) : env0_13(null);
}
function trackReport({rating, category, reason, dontShowAgain, feedback}) { // fn#120511, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15907:1491, offset: 0x0252da21, size: 90 bytes, params: 2, frame: 13
const value = environment.__proto__;
trackReport({rating: rating, category: category, reason: reason, dontShowAgain: dontShowAgain,
feedback: feedback ?? ''});
}
function onPress_120517() { // fn#120517, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15907:2821, offset: 0x0252dbe8, size: 23 bytes, params: 1, frame: 11
return env1_18(env0_0);
}
function onPress_120520() { // fn#120520, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15907:3191, offset: 0x0252dc67, size: 23 bytes, params: 1, frame: 11
return env1_19(env0_0);
}
global.__d(_fun120503, 15699, [57, 31, 27, 9906, 33, 4501, 697, 4080, 22, 6266, 4594, 5080, 9928, 1962, 1244, 4573,
9910, 8950, 6231, 6238, 4578, 1585, 6275, 6758, 6806, 6277,
2]) /* metro module 15699, dependencies: [57, 31, 27, 9906, 33, 4501, 697, 4080, 22, 6266, 4594, 5080, 9928, 1962, 1244, 4573, 9910, 8950, 6231, 6238, 4578, 1585, 6275, 6758, 6806, 6277, 2] */;
+158 -130
View File
@@ -1,146 +1,174 @@
/* Metro module 9908; source: modules/feedback/native/FeedbackForm.tsx; dependencies: [57, 31, 9906, 33, 4501, 697, 6266, 22, 9909, 4594, 7972, 4573, 6239, 9910, 1244, 2] */
import Module00022 from '../../../by-id/module-00022.js'; /* Metro dependency 22 */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UsePrevious from '../../../hooks/usePrevious.tsx'; /* Metro dependency 6266 */
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 9906 */
function _fun77643(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#77643, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10094:6, offset: 0x01e057fa, size: 342 bytes, params: 8, frame: 22
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(9906) /* metro dependency 9906: Constants */).FeedbackRating;
let value = require(33) /* metro dependency 33 */;
let value = JsxRuntimeModule;
const env0_6 = value.jsx;
const env0_7 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object2.ratingsLabel = {textAlign: 'center'};
object2.reasonsHeader = {marginBottom: 8};
object2.reasonsList = {'overflow': 'hidden', 'marginBottom': 12, 'padding': 0};
const INTERACTIVE_TEXT_ACTIVE = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_ACTIVE;
object2.reason = {color: INTERACTIVE_TEXT_ACTIVE};
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object2.doNotShowAgainContainer = {'paddingHorizontal': 0, 'paddingVertical': 8,
object = {};
object.ratingsLabel = {textAlign: 'center'};
object.reasonsHeader = {marginBottom: 8};
object.reasonsList = {'overflow': 'hidden', 'marginBottom': 12, 'padding': 0};
const INTERACTIVE_TEXT_ACTIVE = (Native).colors.INTERACTIVE_TEXT_ACTIVE;
object.reason = {color: INTERACTIVE_TEXT_ACTIVE};
const BACKGROUND_SURFACE_HIGH = (Native).colors.BACKGROUND_SURFACE_HIGH;
object.doNotShowAgainContainer = {'paddingHorizontal': 0, 'paddingVertical': 8,
backgroundColor: BACKGROUND_SURFACE_HIGH};
const env0_8 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/feedback/native/FeedbackForm.tsx');
const env0_8 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/feedback/native/FeedbackForm.tsx');
exports.FeedbackForm = FeedbackForm;
}
function FeedbackForm({showDoNotShowAgainCheckbox, ratingsBodyLabel, reasonsHeaderLabel, reasons, otherKey, onFeedbackChanged, trackOpen}) { // fn#77644, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10094:584, offset: 0x01e05950, size: 933 bytes, params: 2, frame: 30
var FormRow;
var Checkbox;
var doNotShowAgain;
var Label;
var intl;
const styles = useStyles();
const styles2 = styles;
const value2 = (UsePrevious)(reasons);
const binding = styles2;
let useState = binding.useState;
const defaultImport = Module00022;
const value3 = Reflect.apply(useState, binding, [defaultImport.shuffle(reasons)]);
const binding2 = trackOpen;
const value4 = binding2(value3, 2);
const property = value4[0];
const env0_6 = value4[1];
binding.useEffect(_fun77645, [reasons, value2, otherKey]);
useState = binding.useState;
const value5 = binding2(Reflect.apply(useState, binding, [{}]), 2);
const property2 = value5[0];
const env0_8 = value5[1];
(importDefault(4594) /* metro dependency 4594: useMountEffect */)(function() {
trackOpen();
});
const value6 = binding.useCallback(_fun77647, [property2, onFeedbackChanged]);
let r5 = (
property2.rating != null
? (
property2.rating === FeedbackRating.GOOD
? null
: (
<styles2.Fragment>
{((Text) => <Text style={styles.reasonsHeader} variant="eyebrow" color="text-default">{reasonsHeaderLabel}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}
{((Card) => <Card border="subtle" style={styles.reasonsList}>{property.filter(function(a0) {
return a0.label;
}).map(_fun77649)}</Card>)((require(6239) /* metro dependency 6239: CardNative */).Card)}
</styles2.Fragment>
)
)
: null
);
const Fragment = styles2.Fragment;
const items2 = [
ratingsBodyLabel != null
? ((Text) => <Text style={styles.ratingsLabel} variant="heading-md/semibold" color="text-default">{ratingsBodyLabel}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)
: null,
];
items2[1] = ((Component) => <Component selectedRating={property2.rating ?? null} onChangeRating={onChangeRating} />)(importDefault(9910) /* metro dependency 9910: RatingSelector */);
items2[2] = r5;
if (showDoNotShowAgainCheckbox) {
FormRow = (require(7972) /* metro dependency 7972: native */).FormRow;
var formRowProps = {style: styles.doNotShowAgainContainer};
Checkbox = (require(7972) /* metro dependency 7972: native */).FormRow.Checkbox;
doNotShowAgain = property2.doNotShowAgain;
formRowProps.leading = <Checkbox selected={doNotShowAgain != null && doNotShowAgain} />;
Label = (require(7972) /* metro dependency 7972: native */).FormRow.Label;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
formRowProps.label = <Label text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5E9SB9'])} />;
formRowProps.onPress = value6;
r5 = <FormRow {...formRowProps} />;
} else {
r5 = null;
}
items2[3] = r5;
return (
<Fragment>
{items2}
</Fragment>
);
function _fun77645() { // fn#77645, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10094:829, offset: 0x01e05cf5, size: 102 bytes, params: 1, frame: 16
let value = environment.__proto__;
const defaultImport = Module00022;
const isEqual = defaultImport.isEqual;
let binding = ConstantsModule.FeedbackRating;
if (!Reflect.apply(isEqual, defaultImport, [binding, reasons])) {
binding = env0_6;
value = require(9909) /* metro dependency 9909: FeedbackUtils */;
binding(value.shuffleProblems(reasons, otherKey));
}
}
function _fun77647() { // fn#77647, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10094:987, offset: 0x01e05d5b, size: 75 bytes, params: 1, frame: 15
const doNotShowAgain = env0_7.doNotShowAgain;
const r0 = doNotShowAgain != null && doNotShowAgain;
const binding = env0_8;
const object = {};
const binding2 = env0_7;
copyDataProperties(object, binding2, undefined);
object['doNotShowAgain'] = !r0;
binding(object);
onFeedbackChanged(binding2);
}
function _fun77649(a0, a1) { // fn#77649, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10094:1102, offset: 0x01e05da6, size: 220 bytes, params: 3, frame: 25
const env0_0 = a0;
const Fragment = env1_4.Fragment;
const r6 = (
a1 > 0
? ((FormDivider) => <FormDivider />)((require(7972) /* metro dependency 7972: native */).FormDivider)
: null
);
const FormRow = (require(7972) /* metro dependency 7972: native */).FormRow;
const FormLabel = (require(7972) /* metro dependency 7972: native */).FormLabel;
return (
<Fragment key={a1}>
{r6}
<FormRow
labelStyle={styles.reason}
label={<FormLabel text={a0.label} numberOfLines={2} />}
onPress={onPress_77650}
/>
</Fragment>
);
function onPress_77650() { // fn#77650, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10094:1276, offset: 0x01e05e82, size: 54 bytes, params: 1, frame: 13
const binding = env0_0;
const object = {};
copyDataProperties(object, env1_7, binding);
object['reason'] = binding;
env1_8(object);
onFeedbackChanged(object);
}
}
function onChangeRating(a0) { // fn#77651, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10094:1795, owner: FeedbackForm.onChangeRating, offset: 0x01e05eb8, size: 91 bytes, params: 2, frame: 14
const value = environment.__proto__;
const GOOD = FeedbackRating.GOOD;
const reason = a0 === GOOD ? null : env0_7.reason;
const object = {};
copyDataProperties(object, env0_7, a0);
object['rating'] = a0;
object['reason'] = reason;
env0_8(object);
onFeedbackChanged(object);
}
function FeedbackForm({showDoNotShowAgainCheckbox, ratingsBodyLabel, reasonsHeaderLabel, reasons, otherKey, onFeedbackChanged, trackOpen}) { // fn#77644, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10094:584, offset: 0x01e05950, size: 933 bytes, params: 2, frame: 30
var FormRow;
var Checkbox;
var doNotShowAgain;
var Label;
var intl;
const styles = useStyles();
const env0_4 = styles;
const value2 = (importDefault(6266) /* metro dependency 6266: usePrevious */)(reasons);
const binding = env0_4;
let useState = binding.useState;
const defaultImport = importDefault(22) /* metro dependency 22 */;
const value3 = Reflect.apply(useState, binding, [defaultImport.shuffle(reasons)]);
const binding2 = trackOpen;
const value4 = binding2(value3, 2);
const property = value4[0];
const env0_6 = value4[1];
binding.useEffect(_fun77645, [reasons, value2, otherKey]);
useState = binding.useState;
const value5 = binding2(Reflect.apply(useState, binding, [{}]), 2);
const property2 = value5[0];
const env0_8 = value5[1];
(importDefault(4594) /* metro dependency 4594: useMountEffect */)(function() {
trackOpen();
});
const value6 = binding.useCallback(_fun77647, [property2, onFeedbackChanged]);
let r5 = property2.rating != null ? property2.rating === FeedbackRating.GOOD ? null : <env0_4.Fragment>{((Text) => <Text style={styles.reasonsHeader} variant="eyebrow" color="text-default">{reasonsHeaderLabel}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}{((Card) => <Card border="subtle" style={styles.reasonsList}>{property.filter(function(a0) {
return a0.label;
}).map(_fun77649)}</Card>)((require(6239) /* metro dependency 6239: CardNative */).Card)}</env0_4.Fragment> : null;
const Fragment = env0_4.Fragment;
const items2 = [ratingsBodyLabel != null ? ((Text) => <Text style={styles.ratingsLabel} variant="heading-md/semibold" color="text-default">{ratingsBodyLabel}</Text>)((require(4573) /* metro dependency 4573: Text */).Text) : null];
items2[1] = ((Component) => <Component selectedRating={property2.rating ?? null} onChangeRating={onChangeRating} />)(importDefault(9910) /* metro dependency 9910: RatingSelector */);
items2[2] = r5;
if (showDoNotShowAgainCheckbox) {
FormRow = (require(7972) /* metro dependency 7972: native */).FormRow;
var formRowProps = {style: styles.doNotShowAgainContainer};
Checkbox = (require(7972) /* metro dependency 7972: native */).FormRow.Checkbox;
doNotShowAgain = property2.doNotShowAgain;
formRowProps.leading = <Checkbox selected={doNotShowAgain != null && doNotShowAgain} />;
Label = (require(7972) /* metro dependency 7972: native */).FormRow.Label;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
formRowProps.label = <Label text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5E9SB9'])} />;
formRowProps.onPress = value6;
r5 = <FormRow {...formRowProps} />;
} else {
r5 = null;
}
items2[3] = r5;
return (
<Fragment>
{items2}
</Fragment>
);
}
function _fun77645() { // fn#77645, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10094:829, offset: 0x01e05cf5, size: 102 bytes, params: 1, frame: 16
let value = environment.__proto__;
const defaultImport = importDefault(22) /* metro dependency 22 */;
const isEqual = defaultImport.isEqual;
let binding = env0_5;
if (!Reflect.apply(isEqual, defaultImport, [binding, reasons])) {
binding = env0_6;
value = require(9909) /* metro dependency 9909: FeedbackUtils */;
binding(value.shuffleProblems(reasons, otherKey));
}
}
function _fun77647() { // fn#77647, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10094:987, offset: 0x01e05d5b, size: 75 bytes, params: 1, frame: 15
const doNotShowAgain = env0_7.doNotShowAgain;
const r0 = doNotShowAgain != null && doNotShowAgain;
const binding = env0_8;
const object2 = {};
const binding2 = env0_7;
copyDataProperties(object2, binding2, undefined);
object2['doNotShowAgain'] = !r0;
binding(object2);
onFeedbackChanged(binding2);
}
function _fun77649(a0, a1) { // fn#77649, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10094:1102, offset: 0x01e05da6, size: 220 bytes, params: 3, frame: 25
const env0_0 = a0;
const Fragment = env1_4.Fragment;
const r6 = a1 > 0 ? ((FormDivider) => <FormDivider />)((require(7972) /* metro dependency 7972: native */).FormDivider) : null;
const FormRow = (require(7972) /* metro dependency 7972: native */).FormRow;
const FormLabel = (require(7972) /* metro dependency 7972: native */).FormLabel;
return (
<Fragment key={a1}>
{r6}
<FormRow
labelStyle={styles.reason}
label={<FormLabel text={a0.label} numberOfLines={2} />}
onPress={onPress_77650}
/>
</Fragment>
);
}
function onChangeRating(a0) { // fn#77651, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10094:1795, owner: FeedbackForm.onChangeRating, offset: 0x01e05eb8, size: 91 bytes, params: 2, frame: 14
const value = environment.__proto__;
const GOOD = FeedbackRating.GOOD;
const reason = a0 === GOOD ? null : env0_7.reason;
const object2 = {};
copyDataProperties(object2, env0_7, a0);
object2['rating'] = a0;
object2['reason'] = reason;
env0_8(object2);
onFeedbackChanged(object2);
}
function onPress_77650() { // fn#77650, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10094:1276, offset: 0x01e05e82, size: 54 bytes, params: 1, frame: 13
const binding = env0_0;
const object2 = {};
copyDataProperties(object2, env1_7, binding);
object2['reason'] = binding;
env1_8(object2);
onFeedbackChanged(object2);
}
global.__d(_fun77643, 9908, [57, 31, 9906, 33, 4501, 697, 6266, 22, 9909, 4594, 7972, 4573, 6239, 9910, 1244,
2]) /* metro module 9908, dependencies: [57, 31, 9906, 33, 4501, 697, 6266, 22, 9909, 4594, 7972, 4573, 6239, 9910, 1244, 2] */;
@@ -1,246 +1,259 @@
/* Metro module 15697; source: modules/feedback/native/FeedbackManager.tsx; dependencies: [7, 6, 15, 17, 18, 4234, 1379, 4294, 4395, 9906, 4285, 15698, 1962, 5459, 4080, 3774, 15702, 15705, 15707, 15711, 2] */
import ClassCallCheck from '../../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import ChannelStore from '../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import ApplicationStore from '../../applications/ApplicationStore.tsx'; /* Metro dependency 4234 */
import RTCConnectionStore from '../../../stores/RTCConnectionStore.tsx'; /* Metro dependency 4294 */
import StreamRTCConnectionStore from '../../../stores/StreamRTCConnectionStore.tsx'; /* Metro dependency 4395 */
import FeedbackManager from '../FeedbackManager.tsx'; /* Metro dependency 15711 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as EmbeddedActivityLocationUtilsModule from '../../activities/utils/embeddedActivityLocationUtils.tsx'; /* Metro dependency 3774 */
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 9906 */
function _fun120476(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#120476, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15905:6, offset: 0x0252c12f, size: 316 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(7) /* metro dependency 7 */;
const env0_4 = importDefault(6) /* metro dependency 6 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
const applicationStore = importDefault(4234) /* metro dependency 4234: ApplicationStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const rtcConnectionStore = importDefault(4294) /* metro dependency 4294: RTCConnectionStore */;
const streamRTCConnectionStore = importDefault(4395) /* metro dependency 4395: StreamRTCConnectionStore */;
const env0_12 = (require(9906) /* metro dependency 9906: Constants */).FeedbackType;
let value = importDefault(15711) /* metro dependency 15711: FeedbackManager */;
let value = FeedbackManager;
value = _fun120480(value);
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/feedback/native/FeedbackManager.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/feedback/native/FeedbackManager.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_120477() { // fn#120477, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15905:211, offset: 0x0252c26b, 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_120477() { // fn#120477, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15905:211, offset: 0x0252c26b, 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_120477_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_120477_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun120480(a0) { // fn#120480, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15905:414, offset: 0x0252c2cd, size: 42 bytes, params: 2, frame: 14
const closure = FeedbackManager_120481;
env0_7(closure, a0);
return env0_3(closure);
}
function _fun120480(a0) { // fn#120480, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15905:414, offset: 0x0252c2cd, size: 42 bytes, params: 2, frame: 14
const FeedbackManager_1204812 = FeedbackManager_120481;
Inherits(FeedbackManager_1204812, a0);
return CreateClass(FeedbackManager_1204812);
function FeedbackManager_120481(a0) { // fn#120481, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15905:426, offset: 0x0252c2f7, size: 244 bytes, params: 2, frame: 20
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_4;
binding(this, FeedbackManager_120481);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_6(FeedbackManager_120481);
binding = env1_5;
if (_isNativeReflectConstruct_120477()) {
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.actions = {VOICE_CHANNEL_SHOW_FEEDBACK: VOICE_CHANNEL_SHOW_FEEDBACK, STREAM_CLOSE: STREAM_CLOSE_120483,
EMBEDDED_ACTIVITY_CLOSE: EMBEDDED_ACTIVITY_CLOSE_120484,
IN_APP_REPORTS_SHOW_FEEDBACK: IN_APP_REPORTS_SHOW_FEEDBACK};
value.handleShowStreamFeedback = handleShowStreamFeedback;
value.handleShowActivityFeedback = handleShowActivityFeedback;
value.handleShowVoiceFeedback = function({analyticsData}) {
var binding = analyticsData;
var VOICE = FeedbackType.VOICE;
binding.possiblyShowFeedbackModal(VOICE, _fun120493);
};
value.handleInAppReportsFeedback = function({reportId, reportType}) {
var binding = reportId;
var IN_APP_REPORTS = FeedbackType.IN_APP_REPORTS;
binding.possiblyShowFeedbackModal(IN_APP_REPORTS, _fun120496);
};
return value;
function VOICE_CHANNEL_SHOW_FEEDBACK(a0) { // fn#120482, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15905:696, owner: FeedbackManager_120481.VOICE_CHANNEL_SHOW_FEEDBACK, offset: 0x0252c3eb, size: 23 bytes, params: 2, frame: 11
return env0_0.handleShowVoiceFeedback(a0);
}
function FeedbackManager_120481STREAM_CLOSE(a0) { // fn#120483, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15905:741, owner: FeedbackManager_120481.STREAM_CLOSE, offset: 0x0252c402, size: 23 bytes, params: 2, frame: 11
return env0_0.handleShowStreamFeedback(a0);
}
function FeedbackManager_120481EMBEDDED_ACTIVITY_CLOSE(a0) { // fn#120484, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15905:798, owner: FeedbackManager_120481.EMBEDDED_ACTIVITY_CLOSE, offset: 0x0252c419, size: 23 bytes, params: 2, frame: 11
return env0_0.handleShowActivityFeedback(a0);
}
function IN_APP_REPORTS_SHOW_FEEDBACK(a0) { // fn#120485, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15905:862, owner: FeedbackManager_120481.IN_APP_REPORTS_SHOW_FEEDBACK, offset: 0x0252c430, size: 23 bytes, params: 2, frame: 11
return env0_0.handleInAppReportsFeedback(a0);
}
function handleShowStreamFeedback(a0) { // fn#120486, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15905:925, owner: FeedbackManager_120481.handleShowStreamFeedback, offset: 0x0252c447, size: 67 bytes, params: 2, frame: 13
var environment;
var value;
var streamKey;
var possiblyShowFeedbackModal;
if (a0.canShowFeedback) {
streamKey = a0.streamKey;
possiblyShowFeedbackModal = streamKey.possiblyShowFeedbackModal;
value = environment.__proto__.__proto__;
Reflect.apply(possiblyShowFeedbackModal, streamKey, [FeedbackType.STREAM, _fun120487]);
}
function _fun120487() { // fn#120487, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15905:1002, offset: 0x0252c48a, size: 277 bytes, params: 1, frame: 17
var environment;
var r4;
var streamRTCConnectionStoreBinding;
var object;
var getMediaSessionId;
let value = environment.__proto__.__proto__.__proto__;
const moduleValue = require(dependencyMap[10]);
const channel = ChannelStore.getChannel(moduleValue.decodeStreamKey(streamKey).channelId);
if (channel == null) {
streamRTCConnectionStoreBinding = StreamRTCConnectionStore;
r4 = streamRTCConnectionStoreBinding.getVideoStats(streamKey) ?? ({});
object = {};
streamRTCConnectionStoreBinding = StreamRTCConnectionStore;
getMediaSessionId = streamRTCConnectionStoreBinding.getMediaSessionId;
streamKeyBinding = streamKey;
object.media_session_id = Reflect.apply(getMediaSessionId, streamRTCConnectionStoreBinding, [streamKeyBinding]);
object.rtc_connection_id = streamRTCConnectionStoreBinding.getRtcConnectionId(streamKeyBinding);
object.stream_region = streamRTCConnectionStoreBinding.getRegion(streamKeyBinding);
object.max_viewers = streamRTCConnectionStoreBinding.getMaxViewers(streamKeyBinding);
copyDataProperties(object, r4, streamRTCConnectionStoreBinding);
value = require(dependencyMap[12]);
var env0_2 = value(dependencyMap[11], dependencyMap.paths);
value = require(dependencyMap[13]);
value.runAfterInteractions(_fun120488);
} else if (!channel.isGuildStageVoice()) {
streamRTCConnectionStoreBinding = StreamRTCConnectionStore;
r4 = streamRTCConnectionStoreBinding.getVideoStats(streamKey) ?? ({});
object = {};
streamRTCConnectionStoreBinding = StreamRTCConnectionStore;
getMediaSessionId = streamRTCConnectionStoreBinding.getMediaSessionId;
streamKeyBinding = streamKey;
object.media_session_id = Reflect.apply(getMediaSessionId, streamRTCConnectionStoreBinding, [streamKeyBinding]);
object.rtc_connection_id = streamRTCConnectionStoreBinding.getRtcConnectionId(streamKeyBinding);
object.stream_region = streamRTCConnectionStoreBinding.getRegion(streamKeyBinding);
object.max_viewers = streamRTCConnectionStoreBinding.getMaxViewers(streamKeyBinding);
copyDataProperties(object, r4, streamRTCConnectionStoreBinding);
value = require(dependencyMap[12]);
var env0_2 = value(dependencyMap[11], dependencyMap.paths);
value = require(dependencyMap[13]);
value.runAfterInteractions(_fun120488);
}
function _fun120488() { // fn#120488, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15905:1355, offset: 0x0252c59f, size: 98 bytes, params: 1, frame: 18
let value = environment.__proto__.__proto__.__proto__.__proto__;
value = importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */;
value.openLazy(env0_2, 'StreamFeedback' + streamKey, {stream: env0_0, analyticsData: env0_1});
}
}
}
function handleShowActivityFeedback({applicationId, location, showFeedback}) { // fn#120489, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15905:1466, owner: FeedbackManager_120481.handleShowActivityFeedback, offset: 0x0252c601, size: 155 bytes, params: 2, frame: 17
var binding;
const applicationId2 = applicationId;
const application = ApplicationStore.getApplication(applicationId);
const env0_3 = ChannelStore.getChannel((EmbeddedActivityLocationUtilsModule).getEmbeddedActivityLocationChannelId(location));
if (application != null && showFeedback) {
binding = applicationId2;
binding.possiblyShowFeedbackModal(FeedbackType.ACTIVITY, _fun120490);
}
function _fun120490() { // fn#120490, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15905:1661, offset: 0x0252c69c, size: 121 bytes, params: 1, frame: 17
var environment;
const value = environment.__proto__.__proto__.__proto__;
const env0_0 = require(dependencyMap[12])(dependencyMap[16], dependencyMap.paths);
const object = {};
const rtcConnectionStoreBinding = RTCConnectionStore;
object.media_session_id = rtcConnectionStoreBinding.getMediaSessionId();
object.rtc_connection_id = rtcConnectionStoreBinding.getRTCConnectionId();
require(dependencyMap[13]).runAfterInteractions(_fun120491);
function _fun120491() { // fn#120491, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15905:1811, offset: 0x0252c715, size: 121 bytes, params: 1, frame: 21
let value = environment.__proto__.__proto__.__proto__.__proto__;
value = importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */;
const openLazy = value.openLazy;
const binding = env0_0;
const locationBinding = location;
Reflect.apply(openLazy, value, [binding, 'ActivityFeedback' + locationBinding.id + applicationId,
{analyticsData: env0_1, activityApplication: env1_2, channel: env1_3,
embeddedActivityLocation: locationBinding}]);
}
}
}
function handleShowVoiceFeedback({analyticsData}) { // fn#120492, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15905:1977, owner: FeedbackManager_120481.handleShowVoiceFeedback, offset: 0x0252c78e, size: 58 bytes, params: 2, frame: 13
const binding = analyticsData;
const possiblyShowFeedbackModal = binding.possiblyShowFeedbackModal;
const VOICE = FeedbackType.VOICE;
Reflect.apply(possiblyShowFeedbackModal, binding, [VOICE, _fun120493]);
function _fun120493() { // fn#120493, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15905:2036, offset: 0x0252c7c8, size: 81 bytes, params: 1, frame: 16
var environment;
const value = environment.__proto__.__proto__.__proto__;
const env0_0 = require(dependencyMap[12])(dependencyMap[17], dependencyMap.paths);
require(dependencyMap[13]).runAfterInteractions(_fun120494);
function _fun120494() { // fn#120494, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15905:2102, offset: 0x0252c819, size: 90 bytes, params: 1, frame: 18
let value = environment.__proto__.__proto__.__proto__.__proto__;
value = importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */;
const openLazy = value.openLazy;
const binding = env0_0;
const analyticsDataBinding = analyticsData;
Reflect.apply(openLazy, value, [binding, 'VoiceFeedback' + analyticsDataBinding.channel_id,
{analyticsData: analyticsDataBinding}]);
}
}
}
function handleInAppReportsFeedback({reportId, reportType}) { // fn#120495, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15905:2213, owner: FeedbackManager_120481.handleInAppReportsFeedback, offset: 0x0252c873, size: 68 bytes, params: 2, frame: 13
const binding = reportId;
const possiblyShowFeedbackModal = binding.possiblyShowFeedbackModal;
const IN_APP_REPORTS = FeedbackType.IN_APP_REPORTS;
Reflect.apply(possiblyShowFeedbackModal, binding, [IN_APP_REPORTS, _fun120496]);
function _fun120496() { // fn#120496, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15905:2289, offset: 0x0252c8b7, size: 81 bytes, params: 1, frame: 16
var environment;
const value = environment.__proto__.__proto__.__proto__;
const env0_0 = require(dependencyMap[12])(dependencyMap[18], dependencyMap.paths);
require(dependencyMap[13]).runAfterInteractions(_fun120497);
function _fun120497() { // fn#120497, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15905:2355, offset: 0x0252c908, size: 120 bytes, params: 1, frame: 19
let value = environment.__proto__.__proto__.__proto__.__proto__;
value = importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */;
value.openLazy(env0_0, 'ReportingFeedback' + reportType + (reportId ?? ''), {reportId: reportId,
reportType: reportType});
}
}
}
}
function FeedbackManager_120481(a0) { // fn#120481, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15905:426, offset: 0x0252c2f7, size: 244 bytes, params: 2, frame: 20
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_4;
binding(this, FeedbackManager_120481);
const items = [];
arraySpread(items, value, 0, items);
value = env1_6(FeedbackManager_120481);
binding = env1_5;
if (_isNativeReflectConstruct_120477()) {
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.actions = {VOICE_CHANNEL_SHOW_FEEDBACK: VOICE_CHANNEL_SHOW_FEEDBACK, STREAM_CLOSE: STREAM_CLOSE_120483,
EMBEDDED_ACTIVITY_CLOSE: EMBEDDED_ACTIVITY_CLOSE_120484,
IN_APP_REPORTS_SHOW_FEEDBACK: IN_APP_REPORTS_SHOW_FEEDBACK};
value.handleShowStreamFeedback = handleShowStreamFeedback;
value.handleShowActivityFeedback = handleShowActivityFeedback;
value.handleShowVoiceFeedback = function({analyticsData}) {
var binding = analyticsData;
var VOICE = FeedbackType.VOICE;
binding.possiblyShowFeedbackModal(VOICE, _fun120493);
};
value.handleInAppReportsFeedback = function({reportId, reportType}) {
var binding = reportId;
var IN_APP_REPORTS = FeedbackType.IN_APP_REPORTS;
binding.possiblyShowFeedbackModal(IN_APP_REPORTS, _fun120496);
};
return value;
}
function VOICE_CHANNEL_SHOW_FEEDBACK(a0) { // fn#120482, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15905:696, owner: FeedbackManager_120481.VOICE_CHANNEL_SHOW_FEEDBACK, offset: 0x0252c3eb, size: 23 bytes, params: 2, frame: 11
return env0_0.handleShowVoiceFeedback(a0);
}
function FeedbackManager_120481STREAM_CLOSE(a0) { // fn#120483, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15905:741, owner: FeedbackManager_120481.STREAM_CLOSE, offset: 0x0252c402, size: 23 bytes, params: 2, frame: 11
return env0_0.handleShowStreamFeedback(a0);
}
function FeedbackManager_120481EMBEDDED_ACTIVITY_CLOSE(a0) { // fn#120484, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15905:798, owner: FeedbackManager_120481.EMBEDDED_ACTIVITY_CLOSE, offset: 0x0252c419, size: 23 bytes, params: 2, frame: 11
return env0_0.handleShowActivityFeedback(a0);
}
function IN_APP_REPORTS_SHOW_FEEDBACK(a0) { // fn#120485, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15905:862, owner: FeedbackManager_120481.IN_APP_REPORTS_SHOW_FEEDBACK, offset: 0x0252c430, size: 23 bytes, params: 2, frame: 11
return env0_0.handleInAppReportsFeedback(a0);
}
function handleShowStreamFeedback(a0) { // fn#120486, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15905:925, owner: FeedbackManager_120481.handleShowStreamFeedback, offset: 0x0252c447, size: 67 bytes, params: 2, frame: 13
var environment;
var value;
var streamKey;
var possiblyShowFeedbackModal;
if (a0.canShowFeedback) {
streamKey = a0.streamKey;
possiblyShowFeedbackModal = streamKey.possiblyShowFeedbackModal;
value = environment.__proto__.__proto__;
Reflect.apply(possiblyShowFeedbackModal, streamKey, [FeedbackType.STREAM, _fun120487]);
}
}
function handleShowActivityFeedback({applicationId, location, showFeedback}) { // fn#120489, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15905:1466, owner: FeedbackManager_120481.handleShowActivityFeedback, offset: 0x0252c601, size: 155 bytes, params: 2, frame: 17
var binding;
const env0_0 = applicationId;
const application = ApplicationStore.getApplication(applicationId);
const env0_3 = ChannelStore.getChannel((require(3774) /* metro dependency 3774: embeddedActivityLocationUtils */).getEmbeddedActivityLocationChannelId(location));
if (application != null && showFeedback) {
binding = env0_0;
binding.possiblyShowFeedbackModal(FeedbackType.ACTIVITY, _fun120490);
}
}
function handleShowVoiceFeedback({analyticsData}) { // fn#120492, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15905:1977, owner: FeedbackManager_120481.handleShowVoiceFeedback, offset: 0x0252c78e, size: 58 bytes, params: 2, frame: 13
const binding = analyticsData;
const possiblyShowFeedbackModal = binding.possiblyShowFeedbackModal;
const VOICE = FeedbackType.VOICE;
Reflect.apply(possiblyShowFeedbackModal, binding, [VOICE, _fun120493]);
}
function handleInAppReportsFeedback({reportId, reportType}) { // fn#120495, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15905:2213, owner: FeedbackManager_120481.handleInAppReportsFeedback, offset: 0x0252c873, size: 68 bytes, params: 2, frame: 13
const binding = reportId;
const possiblyShowFeedbackModal = binding.possiblyShowFeedbackModal;
const IN_APP_REPORTS = FeedbackType.IN_APP_REPORTS;
Reflect.apply(possiblyShowFeedbackModal, binding, [IN_APP_REPORTS, _fun120496]);
}
function _fun120487() { // fn#120487, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15905:1002, offset: 0x0252c48a, size: 277 bytes, params: 1, frame: 17
var environment;
var r4;
var object2;
var getMediaSessionId;
let value = environment.__proto__.__proto__.__proto__;
const moduleValue = require(dependencyMap[10]);
const channel = ChannelStore.getChannel(moduleValue.decodeStreamKey(streamKey).channelId);
if (channel == null) {
r4 = StreamRTCConnectionStore.getVideoStats(streamKey) ?? ({});
object2 = {};
getMediaSessionId = StreamRTCConnectionStore.getMediaSessionId;
streamKeyBinding = streamKey;
object2.media_session_id = Reflect.apply(getMediaSessionId, StreamRTCConnectionStore, [streamKeyBinding]);
object2.rtc_connection_id = StreamRTCConnectionStore.getRtcConnectionId(streamKeyBinding);
object2.stream_region = StreamRTCConnectionStore.getRegion(streamKeyBinding);
object2.max_viewers = StreamRTCConnectionStore.getMaxViewers(streamKeyBinding);
copyDataProperties(object2, r4, StreamRTCConnectionStore);
value = require(dependencyMap[12]);
var env0_2 = value(dependencyMap[11], dependencyMap.paths);
value = require(dependencyMap[13]);
value.runAfterInteractions(_fun120488);
} else if (!channel.isGuildStageVoice()) {
r4 = StreamRTCConnectionStore.getVideoStats(streamKey) ?? ({});
object2 = {};
getMediaSessionId = StreamRTCConnectionStore.getMediaSessionId;
streamKeyBinding = streamKey;
object2.media_session_id = Reflect.apply(getMediaSessionId, StreamRTCConnectionStore, [streamKeyBinding]);
object2.rtc_connection_id = StreamRTCConnectionStore.getRtcConnectionId(streamKeyBinding);
object2.stream_region = StreamRTCConnectionStore.getRegion(streamKeyBinding);
object2.max_viewers = StreamRTCConnectionStore.getMaxViewers(streamKeyBinding);
copyDataProperties(object2, r4, StreamRTCConnectionStore);
value = require(dependencyMap[12]);
var env0_2 = value(dependencyMap[11], dependencyMap.paths);
value = require(dependencyMap[13]);
value.runAfterInteractions(_fun120488);
}
}
function _fun120490() { // fn#120490, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15905:1661, offset: 0x0252c69c, size: 121 bytes, params: 1, frame: 17
var environment;
const value = environment.__proto__.__proto__.__proto__;
const env0_0 = require(dependencyMap[12])(dependencyMap[16], dependencyMap.paths);
const object2 = {};
object2.media_session_id = RTCConnectionStore.getMediaSessionId();
object2.rtc_connection_id = RTCConnectionStore.getRTCConnectionId();
require(dependencyMap[13]).runAfterInteractions(_fun120491);
}
function _fun120493() { // fn#120493, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15905:2036, offset: 0x0252c7c8, size: 81 bytes, params: 1, frame: 16
var environment;
const value = environment.__proto__.__proto__.__proto__;
const env0_0 = require(dependencyMap[12])(dependencyMap[17], dependencyMap.paths);
require(dependencyMap[13]).runAfterInteractions(_fun120494);
}
function _fun120496() { // fn#120496, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15905:2289, offset: 0x0252c8b7, size: 81 bytes, params: 1, frame: 16
var environment;
const value = environment.__proto__.__proto__.__proto__;
const env0_0 = require(dependencyMap[12])(dependencyMap[18], dependencyMap.paths);
require(dependencyMap[13]).runAfterInteractions(_fun120497);
}
function _fun120488() { // fn#120488, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15905:1355, offset: 0x0252c59f, size: 98 bytes, params: 1, frame: 18
let value = environment.__proto__.__proto__.__proto__.__proto__;
value = importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */;
value.openLazy(env0_2, 'StreamFeedback' + streamKey, {stream: env0_0, analyticsData: env0_1});
}
function _fun120491() { // fn#120491, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15905:1811, offset: 0x0252c715, size: 121 bytes, params: 1, frame: 21
let value = environment.__proto__.__proto__.__proto__.__proto__;
value = importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */;
const openLazy = value.openLazy;
const binding = env0_0;
const locationBinding = location;
Reflect.apply(openLazy, value, [binding, 'ActivityFeedback' + locationBinding.id + applicationId,
{analyticsData: env0_1, activityApplication: env1_2, channel: env1_3,
embeddedActivityLocation: locationBinding}]);
}
function _fun120494() { // fn#120494, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15905:2102, offset: 0x0252c819, size: 90 bytes, params: 1, frame: 18
let value = environment.__proto__.__proto__.__proto__.__proto__;
value = importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */;
const openLazy = value.openLazy;
const binding = env0_0;
const analyticsDataBinding = analyticsData;
Reflect.apply(openLazy, value, [binding, 'VoiceFeedback' + analyticsDataBinding.channel_id,
{analyticsData: analyticsDataBinding}]);
}
function _fun120497() { // fn#120497, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15905:2355, offset: 0x0252c908, size: 120 bytes, params: 1, frame: 19
let value = environment.__proto__.__proto__.__proto__.__proto__;
value = importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */;
value.openLazy(env0_0, 'ReportingFeedback' + reportType + (reportId ?? ''), {reportId: reportId,
reportType: reportType});
}
global.__d(_fun120476, 15697, [7, 6, 15, 17, 18, 4234, 1379, 4294, 4395, 9906, 4285, 15698, 1962, 5459, 4080, 3774,
15702, 15705, 15707, 15711,
2]) /* metro module 15697, dependencies: [7, 6, 15, 17, 18, 4234, 1379, 4294, 4395, 9906, 4285, 15698, 1962, 5459, 4080, 3774, 15702, 15705, 15707, 15711, 2] */;
+119 -86
View File
@@ -1,106 +1,139 @@
/* Metro module 9928; source: modules/feedback/native/FeedbackModal.tsx; dependencies: [57, 31, 27, 33, 4501, 7972, 1244, 6766, 1948, 4578, 5080, 5280, 5282, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import ModalActionCreators from '../../../actions/ModalActionCreators.tsx'; /* Metro dependency 5080 */
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 CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as ButtonNativeModule from '../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as NavigatorNativeModule from '../../../design/components/Navigator/native/Navigator.native.tsx'; /* Metro dependency 5280 */
import * as NativeModule from '../../../design/void/Form/native/index.tsx'; /* Metro dependency 7972 */
function _fun77724(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#77724, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10114:6, offset: 0x01e08948, size: 289 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_5 = value.View;
const env0_6 = value.ScrollView;
value = require(33) /* metro dependency 33 */;
const env0_7 = value.jsx;
const env0_8 = value.jsxs;
const env0_9 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({helpDeskLabel: {'lineHeight': 16,
const env0_9 = (CreateStylesModule).createStyles({helpDeskLabel: {'lineHeight': 16,
'marginTop': 8}, bottomContainer: {paddingHorizontal: 16}, submitButton: {'marginTop': 24, 'marginBottom': 24}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/feedback/native/FeedbackModal.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/feedback/native/FeedbackModal.tsx');
exports.default = FeedbackModal;
}
function FeedbackForm_77725({result, trackReport, titleLabel, descriptionLabel, hideHelpdeskLink}) { // fn#77725, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10114:328, offset: 0x01e08a69, size: 841 bytes, params: 2, frame: 36
var r9;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var TextWithIOSLinkWorkaround;
var format;
var ybi2tD;
var object;
const styles = useStyles();
const reason = result.reason;
const [property, property2] = env0_3(env0_4.useState(''), 2);
const FormSection = (require(7972) /* metro dependency 7972: native */).FormSection;
const FormInput = (require(7972) /* metro dependency 7972: native */).FormInput;
const items2 = [<FormInput value={reason?.label} title={titleLabel ?? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.vcqwCj)} disabled key="channel-input" />];
const FormDivider = (require(7972) /* metro dependency 7972: native */).FormDivider;
items2[1] = <FormDivider />;
items2[2] = <FormInput value={property} title={descriptionLabel ?? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.h95hcn)} onChange={property2} multiline numberOfLines={4} autoCorrect />;
const formSection = <FormSection>{items2}</FormSection>;
if (hideHelpdeskLink) {
r9 = !hideHelpdeskLink;
} else {
TextWithIOSLinkWorkaround = (require(6766) /* metro dependency 6766: TextWithIOSLinkWorkaround */).TextWithIOSLinkWorkaround;
var textWithIOSLinkWorkaroundProps = {'style': null, 'variant': 'text-xs/medium', 'color': 'text-muted',
style: styles.helpDeskLabel};
format = intl.format;
ybi2tD = (require(1244) /* metro dependency 1244: indexNative */).t.ybi2tD;
object = {};
object.helpdeskURL = (importDefault(1948) /* metro dependency 1948: HelpdeskUtils */).getSubmitRequestURL();
r9 = <TextWithIOSLinkWorkaround {...textWithIOSLinkWorkaroundProps}>{Reflect.apply(format, intl, [ybi2tD,
object])}</TextWithIOSLinkWorkaround>;
}
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
return (
<ScrollView keyboardShouldPersistTaps="handled">
{formSection}
<View style={styles.bottomContainer}>
{r9}
<View style={styles.submitButton}>
<Button
disabled={property == null || property === ''}
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.geKm7t)}
onPress={onPress_77726}
/>
function FeedbackForm_77725({result, trackReport, titleLabel, descriptionLabel, hideHelpdeskLink}) { // fn#77725, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10114:328, offset: 0x01e08a69, size: 841 bytes, params: 2, frame: 36
var r9;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var TextWithIOSLinkWorkaround;
var format;
var ybi2tD;
var object2;
const styles = useStyles();
const reason = result.reason;
const [property, property2] = Module00057(ReactModule.useState(''), 2);
const FormSection = (NativeModule).FormSection;
const FormInput = (NativeModule).FormInput;
const items2 = [
<FormInput
value={reason?.label}
title={titleLabel ?? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.vcqwCj)}
disabled
key="channel-input"
/>,
];
const FormDivider = (NativeModule).FormDivider;
items2[1] = <FormDivider />;
items2[2] = (
<FormInput
value={property}
title={descriptionLabel ?? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.h95hcn)}
onChange={property2}
multiline
numberOfLines={4}
autoCorrect
/>
);
const formSection = (
<FormSection>
{items2}
</FormSection>
);
if (hideHelpdeskLink) {
r9 = !hideHelpdeskLink;
} else {
TextWithIOSLinkWorkaround = (require(6766) /* metro dependency 6766: TextWithIOSLinkWorkaround */).TextWithIOSLinkWorkaround;
var textWithIOSLinkWorkaroundProps = {'style': null, 'variant': 'text-xs/medium', 'color': 'text-muted',
style: styles.helpDeskLabel};
format = intl.format;
ybi2tD = (require(1244) /* metro dependency 1244: indexNative */).t.ybi2tD;
object2 = {};
object2.helpdeskURL = (importDefault(1948) /* metro dependency 1948: HelpdeskUtils */).getSubmitRequestURL();
r9 = (
<TextWithIOSLinkWorkaround {...textWithIOSLinkWorkaroundProps}>
{Reflect.apply(format, intl, [ybi2tD, object2])}
</TextWithIOSLinkWorkaround>
);
}
const Button = (ButtonNativeModule).Button;
return (
<ScrollView keyboardShouldPersistTaps="handled">
{formSection}
<View style={styles.bottomContainer}>
{r9}
<View style={styles.submitButton}>
<Button
disabled={property == null || property === ''}
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.geKm7t)}
onPress={onPress_77726}
/>
</View>
</View>
</View>
</ScrollView>
);
}
</ScrollView>
);
function FeedbackForm_77725OnPress() { // fn#77726, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10114:1250, owner: FeedbackForm_77725.onPress, offset: 0x01e08db2, size: 75 bytes, params: 1, frame: 14
const value = environment.__proto__;
(ModalActionCreators).pop();
const trackReportBinding = trackReport;
const object = {};
copyDataProperties(object, result, undefined);
object['feedback'] = env0_2;
trackReportBinding(object);
}
function FeedbackModal(a0) { // fn#77727, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10114:1388, offset: 0x01e08dfd, size: 267 bytes, params: 2, frame: 22
const env0_0 = a0;
const env0_3 = env0_4.useRef({result: a0.result, trackReport: a0.trackReport});
env0_4.useEffect(_fun77728);
const value2 = env0_4.useCallback(_fun77729, []);
const Navigator = (require(5280) /* metro dependency 5280: NavigatorNative */).Navigator;
const object = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['dBx+Cn']);
object.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton(value2);
object.render = render_77730;
return <Navigator initialRouteName="Feedback" screens={{Feedback: object}} />;
}
}
function FeedbackForm_77725OnPress() { // fn#77726, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10114:1250, owner: FeedbackForm_77725.onPress, offset: 0x01e08db2, size: 75 bytes, params: 1, frame: 14
const value = environment.__proto__;
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop();
const trackReportBinding = trackReport;
const object2 = {};
copyDataProperties(object2, result, undefined);
object2['feedback'] = env0_2;
trackReportBinding(object2);
}
function FeedbackModal(a0) { // fn#77727, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10114:1388, offset: 0x01e08dfd, size: 267 bytes, params: 2, frame: 22
const env0_0 = a0;
const env0_3 = ReactModule.useRef({result: a0.result, trackReport: a0.trackReport});
ReactModule.useEffect(_fun77728);
const value2 = ReactModule.useCallback(_fun77729, []);
const Navigator = (NavigatorNativeModule).Navigator;
const object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['dBx+Cn']);
object2.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton(value2);
object2.render = render_77730;
return <Navigator initialRouteName="Feedback" screens={{Feedback: object2}} />;
function _fun77728() { // fn#77728, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10114:1495, offset: 0x01e08f08, size: 37 bytes, params: 1, frame: 4
env0_3.current = {result: result, trackReport: trackReport};
}
function _fun77728() { // fn#77728, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10114:1495, offset: 0x01e08f08, size: 37 bytes, params: 1, frame: 4
env0_3.current = {result: result, trackReport: trackReport};
}
function _fun77729() { // fn#77729, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10114:1559, offset: 0x01e08f2d, size: 66 bytes, params: 1, frame: 11
const value = environment.__proto__;
(ModalActionCreators).pop();
const current = env0_3.current;
current.trackReport(current.result);
}
function _fun77729() { // fn#77729, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10114:1559, offset: 0x01e08f2d, size: 66 bytes, params: 1, frame: 11
const value = environment.__proto__;
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop();
const current = env0_3.current;
current.trackReport(current.result);
}
function FeedbackModalRender() { // fn#77730, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10114:1807, owner: FeedbackModal.render, offset: 0x01e08f6f, size: 37 bytes, params: 1, frame: 13
return <FeedbackForm_77725 {...env0_0} />;
}
}
function FeedbackModalRender() { // fn#77730, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10114:1807, owner: FeedbackModal.render, offset: 0x01e08f6f, size: 37 bytes, params: 1, frame: 13
return <FeedbackForm_77725 {...env0_0} />;
}
global.__d(_fun77724, 9928, [57, 31, 27, 33, 4501, 7972, 1244, 6766, 1948, 4578, 5080, 5280, 5282,
2]) /* metro module 9928, dependencies: [57, 31, 27, 33, 4501, 7972, 1244, 6766, 1948, 4578, 5080, 5280, 5282, 2] */;
@@ -1,100 +1,125 @@
/* Metro module 9910; source: modules/feedback/native/RatingSelector.tsx; dependencies: [31, 27, 9906, 33, 4501, 9911, 9912, 1244, 9916, 9917, 9921, 9922, 7975, 5278, 2] */
import Module09916 from '../../../by-id/module-09916.js'; /* Metro dependency 9916 */
import Module09921 from '../../../by-id/module-09921.js'; /* Metro dependency 9921 */
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 _fun77666(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#77666, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10096:6, offset: 0x01e07100, size: 354 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
ReactModule;
let value = ReactNativeModule;
const env0_3 = value.View;
const env0_4 = value.Image;
value = require(9906) /* metro dependency 9906: Constants */;
const env0_5 = value.DEFAULT_RATINGS;
const env0_6 = value.FeedbackRating;
const env0_7 = (require(33) /* metro dependency 33 */).jsx;
const env0_8 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({ratings: {'flexDirection': 'row',
const env0_8 = (CreateStylesModule).createStyles({ratings: {'flexDirection': 'row',
'alignItems': 'center', 'justifyContent': 'center'}, rating: {}, emoji: {'width': 64, 'height': 64,
'marginVertical': 24, 'marginHorizontal': 12}});
const env0_9 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({ratings: {'flexDirection': 'column',
const env0_9 = (CreateStylesModule).createStyles({ratings: {'flexDirection': 'column',
'alignItems': 'flex-start', 'justifyContent': 'flex-start', 'gap': 16, 'marginBottom': 12},
rating: {width: '100%'}, emoji: {'width': 32, 'height': 32}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/feedback/native/RatingSelector.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/feedback/native/RatingSelector.tsx');
exports.default = RatingSelector;
}
function RatingSelector({ratingOptions = DEFAULT_RATINGS, textLabels, selectedRating, onChangeRating}) { // fn#77667, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10096:641, offset: 0x01e07262, size: 151 bytes, params: 2, frame: 17
const styles = useStyles();
return (
<View style={(textLabels == null ? useStyles() : styles).ratings}>
{useEmojiConfigs(ratingOptions).map(_fun77673)}
</View>
);
function useEmojiConfigs(a0) { // fn#77668, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10096:765, owner: RatingSelector.useEmojiConfigs, offset: 0x01e072f9, size: 309 bytes, params: 2, frame: 21
var environment;
const object = {};
const value = environment.__proto__;
const BAD = FeedbackRating.BAD;
const object3 = {};
object3.selected = importDefault(9911) /* metro dependency 9911 */;
object3.normal = (require(9912) /* metro dependency 9912: FeedbackModalSadDesaturated */).useFeedbackModalSadDesaturatedSource();
const BAD2 = FeedbackRating.BAD;
object[BAD] = {source: object3, getLabel: function() {
return require(dependencyMap[7]).intl.string(require(dependencyMap[7]).t['C/12Tt']);
}, rating: BAD2};
const NEUTRAL = FeedbackRating.NEUTRAL;
const object5 = {selected: Module09916};
object5.normal = (require(9917) /* metro dependency 9917: FeedbackModalNeutralDesaturated */).useFeedbackModalNeutralDesaturatedSource();
const NEUTRAL2 = FeedbackRating.NEUTRAL;
object[NEUTRAL] = {source: object5, getLabel: function() {
return require(dependencyMap[7]).intl.string(require(dependencyMap[7]).t.Xcb4cF);
}, rating: NEUTRAL2};
const GOOD = FeedbackRating.GOOD;
const object7 = {selected: Module09921};
object7.normal = (require(9922) /* metro dependency 9922: FeedbackModalHappyDesaturated */).useFeedbackModalHappyDesaturatedSource();
const GOOD2 = FeedbackRating.GOOD;
object[GOOD] = {source: object7, getLabel: function() {
return require(dependencyMap[7]).intl.string(require(dependencyMap[7]).t['1Vyb5J']);
}, rating: GOOD2};
return a0.map(_fun77672);
function _fun77672(a0) { // fn#77672, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10096:1301, offset: 0x00c3fbaf, size: 16 bytes, params: 2, frame: 2
return env0_0[a0];
}
function RatingSelector({ratingOptions = DEFAULT_RATINGS, textLabels, selectedRating, onChangeRating}) { // fn#77667, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10096:641, offset: 0x01e07262, size: 151 bytes, params: 2, frame: 17
const styles = useStyles();
return (
<View style={(textLabels == null ? useStyles() : styles).ratings}>
{useEmojiConfigs(ratingOptions).map(_fun77673)}
</View>
);
}
}
function useEmojiConfigs(a0) { // fn#77668, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10096:765, owner: RatingSelector.useEmojiConfigs, offset: 0x01e072f9, size: 309 bytes, params: 2, frame: 21
var environment;
const object2 = {};
const value = environment.__proto__;
const BAD = FeedbackRating.BAD;
const object4 = {};
object4.selected = importDefault(9911) /* metro dependency 9911 */;
object4.normal = (require(9912) /* metro dependency 9912: FeedbackModalSadDesaturated */).useFeedbackModalSadDesaturatedSource();
const BAD2 = FeedbackRating.BAD;
object2[BAD] = {source: object4, getLabel: function() {
return require(dependencyMap[7]).intl.string(require(dependencyMap[7]).t['C/12Tt']);
}, rating: BAD2};
const NEUTRAL = FeedbackRating.NEUTRAL;
const object6 = {selected: importDefault(9916) /* metro dependency 9916 */};
object6.normal = (require(9917) /* metro dependency 9917: FeedbackModalNeutralDesaturated */).useFeedbackModalNeutralDesaturatedSource();
const NEUTRAL2 = FeedbackRating.NEUTRAL;
object2[NEUTRAL] = {source: object6, getLabel: function() {
return require(dependencyMap[7]).intl.string(require(dependencyMap[7]).t.Xcb4cF);
}, rating: NEUTRAL2};
const GOOD = FeedbackRating.GOOD;
const object8 = {selected: importDefault(9921) /* metro dependency 9921 */};
object8.normal = (require(9922) /* metro dependency 9922: FeedbackModalHappyDesaturated */).useFeedbackModalHappyDesaturatedSource();
const GOOD2 = FeedbackRating.GOOD;
object2[GOOD] = {source: object8, getLabel: function() {
return require(dependencyMap[7]).intl.string(require(dependencyMap[7]).t['1Vyb5J']);
}, rating: GOOD2};
return a0.map(_fun77672);
}
function _fun77673(a0) { // fn#77673, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10096:1359, offset: 0x01e074ee, size: 368 bytes, params: 2, frame: 26
var environment;
var r0;
var value2;
var PressableOpacity;
var object;
var value3;
var value4;
var RowButton;
var object4;
var value5;
const rating = a0.rating;
const {selected, normal} = a0.source;
const getLabel = a0.getLabel;
if (textLabels != null) {
value4 = environment.__proto__;
var viewBindingProps = {style: env0_3.rating};
RowButton = (require(7975) /* metro dependency 7975: RowButtonNative */).RowButton;
object4 = {accessibilityRole: 'button', accessibilityLabel: getLabel()};
value5 = selectedRating === rating;
object4.accessibilityState = {selected: value5};
object4.onPress = function() {
return onChangeRating(rating);
};
object4.icon = <Image style={env0_3.emoji} source={value5 ? selected : normal} />;
object4.label = textLabels[rating];
r0 = (
<View {...viewBindingProps} key={rating}>
<RowButton {...object4} />
</View>
);
} else {
value2 = environment.__proto__;
PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
object = {accessibilityRole: 'button', accessibilityLabel: getLabel()};
value3 = selectedRating === rating;
object.accessibilityState = {selected: value3};
object.onPress = onPress_77675;
r0 = (
<PressableOpacity {...object} key={rating}>
<Image style={env0_3.emoji} source={value3 ? selected : normal} />
</PressableOpacity>
);
}
return r0;
function onPress_77675() { // fn#77675, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10096:1758, offset: 0x016f88b2, size: 23 bytes, params: 1, frame: 11
return onChangeRating(rating);
}
}
function _fun77673(a0) { // fn#77673, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10096:1359, offset: 0x01e074ee, size: 368 bytes, params: 2, frame: 26
var environment;
var r0;
var value2;
var PressableOpacity;
var object2;
var value3;
var value4;
var RowButton;
var object3;
var value5;
const rating = a0.rating;
const {selected, normal} = a0.source;
const getLabel = a0.getLabel;
if (textLabels != null) {
value4 = environment.__proto__;
var viewBindingProps = {style: env0_3.rating};
RowButton = (require(7975) /* metro dependency 7975: RowButtonNative */).RowButton;
object3 = {accessibilityRole: 'button', accessibilityLabel: getLabel()};
value5 = selectedRating === rating;
object3.accessibilityState = {selected: value5};
object3.onPress = function() {
return onChangeRating(rating);
};
object3.icon = <Image style={env0_3.emoji} source={value5 ? selected : normal} />;
object3.label = textLabels[rating];
r0 = <View {...viewBindingProps} key={rating}><RowButton {...object3} /></View>;
} else {
value2 = environment.__proto__;
PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
object2 = {accessibilityRole: 'button', accessibilityLabel: getLabel()};
value3 = selectedRating === rating;
object2.accessibilityState = {selected: value3};
object2.onPress = onPress_77675;
r0 = <PressableOpacity {...object2} key={rating}><Image style={env0_3.emoji} source={value3 ? selected : normal} /></PressableOpacity>;
}
return r0;
}
global.__d(_fun77666, 9910, [31, 27, 9906, 33, 4501, 9911, 9912, 1244, 9916, 9917, 9921, 9922, 7975, 5278,
2]) /* metro module 9910, dependencies: [31, 27, 9906, 33, 4501, 9911, 9912, 1244, 9916, 9917, 9921, 9922, 7975, 5278, 2] */;
@@ -1,11 +1,15 @@
/* Metro module 12545; source: modules/feedback/native/RequestReviewNoTTIExperiment.tsx; dependencies: [1854, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ApexModule from '../../experiments/apex/index.tsx'; /* Metro dependency 1854 */
function _fun95876(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#95876, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12735:6, offset: 0x021511f2, size: 158 bytes, params: 8, frame: 21
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = require(1854) /* metro dependency 1854: apex */;
let value = ApexModule;
value = value.createApexExperiment({'name': '2026-05-mobile-request-review-no-tti', 'kind': 'user',
defaultConfig: {skipTTICheck: false}, variations: {[0]: {skipTTICheck: false}, [1]: {skipTTICheck: true}}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/feedback/native/RequestReviewNoTTIExperiment.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/feedback/native/RequestReviewNoTTIExperiment.tsx');
exports.RequestReviewNoTTIExperiment = value;
}
global.__d(_fun95876, 12545, [1854, 2]) /* metro module 12545, dependencies: [1854, 2] */;
@@ -1,4 +1,19 @@
/* Metro module 12544; source: modules/feedback/native/RequestReviewStore.tsx; dependencies: [6, 7, 15, 17, 18, 4107, 1220, 1934, 661, 12545, 12546, 4008, 4007, 6996, 676, 587, 683, 566, 694, 2] */
import ClassCallCheck from '../../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import Flux from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import ApexExperimentStore from '../../experiments/apex/ApexExperimentStore.tsx'; /* Metro dependency 1220 */
import SelectedChannelStore from '../../../stores/SelectedChannelStore.tsx'; /* Metro dependency 1934 */
import ExperimentStore from '../../experiments/ExperimentStore.tsx'; /* Metro dependency 4107 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as StorageModule from '../../../external/discord_common/js/packages/storage/Storage.tsx'; /* Metro dependency 587 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as RootNavigationRefNativeModule from '../../main_tabs_v2/RootNavigationRef.native.tsx'; /* Metro dependency 4008 */
import * as RequestReviewNoTTIExperimentModule from './RequestReviewNoTTIExperiment.tsx'; /* Metro dependency 12545 */
function _fun95859(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#95859, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12734:6, offset: 0x02150ad3, size: 484 bytes, params: 8, frame: 20
const env0_0 = require;
const closure = function() {
@@ -6,17 +21,8 @@ function _fun95859(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
const experimentStore = importDefault(4107) /* metro dependency 4107: ExperimentStore */;
const apexExperimentStore = importDefault(1220) /* metro dependency 1220: ApexExperimentStore */;
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
const env0_11 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
const env0_14 = {'revision': 0, 'firstUse': 0};
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
let value = _fun95868(Store);
value.displayName = 'RequestReviewStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
@@ -32,137 +38,149 @@ function _fun95859(global, require, importDefault, importAll, module, exports, d
cancelExistingTimeout();
}
}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/feedback/native/RequestReviewStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/feedback/native/RequestReviewStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_95860() { // fn#95860, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12734:203, offset: 0x02150cb7, 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_95860_isNativeReflectConstruct = function() {
return !!result;
})();
}
function delayShowReviewRequestModal() { // fn#95863, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12734:461, offset: 0x02150d19, size: 142 bytes, params: 1, frame: 16
cancelExistingTimeout();
const RequestReviewNoTTIExperiment = (require(12545) /* metro dependency 12545: RequestReviewNoTTIExperiment */).RequestReviewNoTTIExperiment;
const getConfig = RequestReviewNoTTIExperiment.getConfig;
if (env0_15 && (Reflect.apply(getConfig, RequestReviewNoTTIExperiment,
[{location: 'RequestReviewStore'}]).skipTTICheck || env0_12 !== undefined && env0_12 < 2300)) {
env0_16 = global.setTimeout(showReviewRequestModal, 60000);
}
}
function showReviewRequestModal() { // fn#95864, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12734:730, offset: 0x02150da7, size: 371 bytes, params: 1, frame: 18
var moduleValue2;
var defaultImport;
var defaultImport2;
const rootNavigationRef = (require(4008) /* metro dependency 4008: RootNavigationRefNative */).getRootNavigationRef();
const object2 = {};
let r2 = rootNavigationRef != null && rootNavigationRef.isReady();
if (r2) {
moduleValue2 = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
r2 = moduleValue2.coerceGuildsRoute(rootNavigationRef.getCurrentRoute()) != null;
}
object2.isViewingChat = r2;
object2.isKeyboardOpen = (require(6996) /* metro dependency 6996: useKeyboardIsOpen */).getKeyboardIsOpen();
const getVoiceChannelId = SelectedChannelStore.getVoiceChannelId;
object2.isInVoice = Reflect.apply(getVoiceChannelId, SelectedChannelStore, []) != null;
if (object2.isViewingChat) {
if (object2.isKeyboardOpen) {
defaultImport2 = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
defaultImport2.track(AnalyticEvents.REVIEW_REQUEST_DEFERRED, {is_keyboard_open: object2.isKeyboardOpen,
is_in_voice: object2.isInVoice, is_viewing_chat: object2.isViewingChat});
delayShowReviewRequestModal();
} else if (object2.isInVoice) {
defaultImport2 = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
defaultImport2.track(AnalyticEvents.REVIEW_REQUEST_DEFERRED, {is_keyboard_open: object2.isKeyboardOpen,
is_in_voice: object2.isInVoice, is_viewing_chat: object2.isViewingChat});
delayShowReviewRequestModal();
} else {
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
defaultImport.track(AnalyticEvents.REVIEW_REQUEST_SHOW_ATTEMPTED);
env0_14.revision = 1;
writePersistedState();
(importDefault(12546) /* metro dependency 12546: requestReviewModal */)();
function _isNativeReflectConstruct_95860() { // fn#95860, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12734:203, offset: 0x02150cb7, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
} else {
defaultImport2 = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
defaultImport2.track(AnalyticEvents.REVIEW_REQUEST_DEFERRED, {is_keyboard_open: object2.isKeyboardOpen,
is_in_voice: object2.isInVoice, is_viewing_chat: object2.isViewingChat});
return (_isNativeReflectConstruct_95860_isNativeReflectConstruct = function() {
return !!result;
})();
}
function delayShowReviewRequestModal() { // fn#95863, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12734:461, offset: 0x02150d19, size: 142 bytes, params: 1, frame: 16
cancelExistingTimeout();
const RequestReviewNoTTIExperiment = (RequestReviewNoTTIExperimentModule).RequestReviewNoTTIExperiment;
const getConfig = RequestReviewNoTTIExperiment.getConfig;
if (env0_15 && (Reflect.apply(getConfig, RequestReviewNoTTIExperiment,
[{location: 'RequestReviewStore'}]).skipTTICheck || env0_12 !== undefined && env0_12 < 2300)) {
env0_16 = global.setTimeout(showReviewRequestModal, 60000);
}
}
function showReviewRequestModal() { // fn#95864, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12734:730, offset: 0x02150da7, size: 371 bytes, params: 1, frame: 18
var moduleValue2;
var defaultImport;
var defaultImport2;
const rootNavigationRef = (RootNavigationRefNativeModule).getRootNavigationRef();
const object = {};
let r2 = rootNavigationRef != null && rootNavigationRef.isReady();
if (r2) {
moduleValue2 = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
r2 = moduleValue2.coerceGuildsRoute(rootNavigationRef.getCurrentRoute()) != null;
}
object.isViewingChat = r2;
object.isKeyboardOpen = (require(6996) /* metro dependency 6996: useKeyboardIsOpen */).getKeyboardIsOpen();
const selectedChannelStoreBinding = SelectedChannelStore;
const getVoiceChannelId = selectedChannelStoreBinding.getVoiceChannelId;
object.isInVoice = Reflect.apply(getVoiceChannelId, selectedChannelStoreBinding, []) != null;
if (object.isViewingChat) {
if (object.isKeyboardOpen) {
defaultImport2 = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
defaultImport2.track(AnalyticEvents.REVIEW_REQUEST_DEFERRED, {is_keyboard_open: object.isKeyboardOpen,
is_in_voice: object.isInVoice, is_viewing_chat: object.isViewingChat});
delayShowReviewRequestModal();
} else if (object.isInVoice) {
defaultImport2 = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
defaultImport2.track(AnalyticEvents.REVIEW_REQUEST_DEFERRED, {is_keyboard_open: object.isKeyboardOpen,
is_in_voice: object.isInVoice, is_viewing_chat: object.isViewingChat});
delayShowReviewRequestModal();
} else {
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
defaultImport.track(AnalyticEvents.REVIEW_REQUEST_SHOW_ATTEMPTED);
env0_14.revision = 1;
writePersistedState();
(importDefault(12546) /* metro dependency 12546: requestReviewModal */)();
}
} else {
defaultImport2 = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
defaultImport2.track(AnalyticEvents.REVIEW_REQUEST_DEFERRED, {is_keyboard_open: object.isKeyboardOpen,
is_in_voice: object.isInVoice, is_viewing_chat: object.isViewingChat});
delayShowReviewRequestModal();
}
}
function cancelExistingTimeout() { // fn#95866, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12734:1531, offset: 0x02150f29, size: 44 bytes, params: 1, frame: 13
if (env0_16 !== -1) {
global.clearTimeout(env0_16);
}
}
function writePersistedState() { // fn#95867, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12734:1595, offset: 0x02150f55, size: 52 bytes, params: 1, frame: 14
const Storage = (StorageModule).Storage;
Storage.set(env0_13, env0_14);
}
function _fun95868(a0) { // fn#95868, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12734:1658, offset: 0x02150f89, size: 72 bytes, params: 2, frame: 15
const RequestReviewStore2 = RequestReviewStore;
Inherits(RequestReviewStore2, a0);
return CreateClass(RequestReviewStore2, [{key: 'initialize', value: value_95870}]);
function RequestReviewStore() { // fn#95869, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12734:1670, offset: 0x01100674, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_3(this, RequestReviewStore);
const value3 = env1_6(RequestReviewStore);
return env1_5(this, _isNativeReflectConstruct_95860() ? global.Reflect.construct(value3, arguments,
env1_6(this).constructor) : value3.apply(this, arguments));
}
function value_95870() { // fn#95870, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12734:1978, offset: 0x02150fd1, size: 99 bytes, params: 1, frame: 16
const Storage = (StorageModule).Storage;
env1_14 = Storage.get(env1_13) ?? ({'firstUse': 0, 'revision': 0});
this.waitFor(ApexExperimentStore, ExperimentStore, SelectedChannelStore);
}
}
function CONNECTION_OPEN_95871({user, guilds}) { // fn#95871, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12734:2205, offset: 0x02151034, size: 331 bytes, params: 2, frame: 16
var defaultImport;
let firstUse = env0_14.firstUse;
if (firstUse === 0) {
env0_14.firstUse = global.Date.now();
writePersistedState();
}
const object = {};
firstUse = env0_14.firstUse;
const Date = global.Date;
object.isInstallOldEnough = firstUse < Date.now() - 864000000;
object.isInLargeEnoughGuild = guilds.some(function(a0) {
return a0.member_count >= 5;
});
object.isAccountVerified = user.verified === true;
object.isNewRevision = env0_14.revision < 1;
if (object.isNewRevision) {
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
defaultImport.track(AnalyticEvents.REVIEW_REQUEST_ELIGIBILITY_CHECKED, {is_hfu: true,
is_install_old_enough: object.isInstallOldEnough, is_in_large_enough_guild: object.isInLargeEnoughGuild,
is_account_verified: object.isAccountVerified});
}
const r1 = object.isInstallOldEnough && object.isAccountVerified && object.isInLargeEnoughGuild && object.isNewRevision;
delayShowReviewRequestModal();
}
}
function cancelExistingTimeout() { // fn#95866, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12734:1531, offset: 0x02150f29, size: 44 bytes, params: 1, frame: 13
if (env0_16 !== -1) {
global.clearTimeout(env0_16);
}
}
function writePersistedState() { // fn#95867, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12734:1595, offset: 0x02150f55, size: 52 bytes, params: 1, frame: 14
const Storage = (require(587) /* metro dependency 587: Storage */).Storage;
Storage.set(env0_13, env0_14);
}
function _fun95868(a0) { // fn#95868, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12734:1658, offset: 0x02150f89, size: 72 bytes, params: 2, frame: 15
const closure = RequestReviewStore;
env0_7(closure, a0);
return env0_4(closure, [{key: 'initialize', value: value_95870}]);
}
function CONNECTION_OPEN_95871({user, guilds}) { // fn#95871, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12734:2205, offset: 0x02151034, size: 331 bytes, params: 2, frame: 16
var defaultImport;
let firstUse = env0_14.firstUse;
if (firstUse === 0) {
env0_14.firstUse = global.Date.now();
writePersistedState();
}
const object2 = {};
firstUse = env0_14.firstUse;
const Date = global.Date;
object2.isInstallOldEnough = firstUse < Date.now() - 864000000;
object2.isInLargeEnoughGuild = guilds.some(function(a0) {
return a0.member_count >= 5;
});
object2.isAccountVerified = user.verified === true;
object2.isNewRevision = env0_14.revision < 1;
if (object2.isNewRevision) {
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
defaultImport.track(AnalyticEvents.REVIEW_REQUEST_ELIGIBILITY_CHECKED, {is_hfu: true,
is_install_old_enough: object2.isInstallOldEnough, is_in_large_enough_guild: object2.isInLargeEnoughGuild,
is_account_verified: object2.isAccountVerified});
}
const r1 = object2.isInstallOldEnough && object2.isAccountVerified && object2.isInLargeEnoughGuild && object2.isNewRevision;
delayShowReviewRequestModal();
}
function value_95870() { // fn#95870, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12734:1978, offset: 0x02150fd1, size: 99 bytes, params: 1, frame: 16
const Storage = (require(587) /* metro dependency 587: Storage */).Storage;
env1_14 = Storage.get(env1_13) ?? ({'firstUse': 0, 'revision': 0});
this.waitFor(ApexExperimentStore, ExperimentStore, SelectedChannelStore);
}
global.__d(_fun95859, 12544, [6, 7, 15, 17, 18, 4107, 1220, 1934, 661, 12545, 12546, 4008, 4007, 6996, 676, 587,
683, 566, 694,
2]) /* metro module 12544, dependencies: [6, 7, 15, 17, 18, 4107, 1220, 1934, 661, 12545, 12546, 4008, 4007, 6996, 676, 587, 683, 566, 694, 2] */;
@@ -1,12 +1,22 @@
/* Metro module 15701; source: modules/feedback/native/UploadLogsActionSheet.tsx; dependencies: [31, 27, 661, 33, 4501, 697, 6275, 6758, 1244, 4573, 4578, 11216, 683, 4080, 2] */
import AnalyticsUtils from '../../../utils/AnalyticsUtils.tsx'; /* Metro dependency 683 */
import ActionSheetActionCreators from '../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ButtonNativeModule from '../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as 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 DebugUploadManagerModule from '../../debug/DebugUploadManager.tsx'; /* Metro dependency 11216 */
function _fun120524(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#120524, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15909:6, offset: 0x0252dda2, size: 327 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;
let value = require(661) /* metro dependency 661: Constants */;
ReactModule;
let value = ConstantsModule;
const env0_4 = value.AnalyticEvents;
const env0_5 = value.DebugLogCategory;
value = require(33) /* metro dependency 33 */;
@@ -14,58 +24,78 @@ function _fun120524(global, require, importDefault, importAll, module, exports,
const env0_7 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object = {};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.container = {padding: PX_16};
object.container = {padding: PX_16};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.body = {textAlign: 'center', marginBottom: PX_16};
object.body = {textAlign: 'center', marginBottom: PX_16};
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.buttonSpacer = {height: PX_8};
const env0_8 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/feedback/native/UploadLogsActionSheet.tsx');
object.buttonSpacer = {height: PX_8};
const env0_8 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/feedback/native/UploadLogsActionSheet.tsx');
exports.default = UploadLogsActionSheet;
function UploadLogsActionSheet({mediaSessionId, rtcConnectionId}) { // fn#120525, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15909:456, offset: 0x0252dee9, size: 503 bytes, params: 2, frame: 28
const styles = useStyles();
const BottomSheet = (BottomSheetNativeModule).BottomSheet;
const object = {};
const BottomSheetTitleHeader = (BottomSheetTitleHeaderNativeModule).BottomSheetTitleHeader;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const KTjjrG = (require(1244) /* metro dependency 1244: indexNative */).t.KTjjrG;
object.header = <BottomSheetTitleHeader title={Reflect.apply(string, intl, [KTjjrG])} />;
const Text = (TextModule).Text;
const items2 = [
<Text
variant="text-sm/normal"
color="text-muted"
style={styles.body}
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['ZvRR/t'])}
</Text>,
];
const Button = (ButtonNativeModule).Button;
string = intl.string;
const EbwFfR = (require(1244) /* metro dependency 1244: indexNative */).t.EbwFfR;
items2[1] = <Button text={Reflect.apply(string, intl, [EbwFfR])} onPress={onPress_120526} />;
items2[2] = <View style={styles.buttonSpacer} />;
items2[3] = (
<Button
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['ETE/oC'])}
variant="secondary"
onPress={onPress_120527}
/>
);
return (
<BottomSheet {...object}>
<View style={styles.container}>
{items2}
</View>
</BottomSheet>
);
function UploadLogsActionSheetOnPress() { // fn#120526, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15909:889, owner: UploadLogsActionSheet.onPress, offset: 0x0252e0e0, size: 166 bytes, params: 1, frame: 19
const value = environment.__proto__;
const uploadDebugLogFiles = DebugUploadManagerModule.uploadDebugLogFiles;
const RTC = DebugLogCategory.RTC;
Reflect.apply(uploadDebugLogFiles, DebugUploadManagerModule, [RTC]);
const defaultImport = AnalyticsUtils;
const track = defaultImport.track;
const DEBUG_LOG_UPLOADED = AnalyticEvents.DEBUG_LOG_UPLOADED;
const mediaSessionIdBinding = mediaSessionId;
const value3 = null;
Reflect.apply(track, defaultImport, [DEBUG_LOG_UPLOADED,
{media_session_id: value3 != mediaSessionIdBinding ? mediaSessionId : value3,
rtc_connection_id: value3 != rtcConnectionId ? rtcConnectionId : value3}]);
(ActionSheetActionCreators).hideActionSheet();
}
function UploadLogsActionSheetOnPress_120527() { // fn#120527, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15909:1191, owner: UploadLogsActionSheet.onPress, offset: 0x022e61b4, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (ActionSheetActionCreators).hideActionSheet();
}
}
}
function UploadLogsActionSheet({mediaSessionId, rtcConnectionId}) { // fn#120525, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15909:456, offset: 0x0252dee9, size: 503 bytes, params: 2, frame: 28
const styles = useStyles();
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
const object2 = {};
const BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const KTjjrG = (require(1244) /* metro dependency 1244: indexNative */).t.KTjjrG;
object2.header = <BottomSheetTitleHeader title={Reflect.apply(string, intl, [KTjjrG])} />;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const items2 = [<Text variant="text-sm/normal" color="text-muted" style={styles.body}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['ZvRR/t'])}</Text>];
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
string = intl.string;
const EbwFfR = (require(1244) /* metro dependency 1244: indexNative */).t.EbwFfR;
items2[1] = <Button text={Reflect.apply(string, intl, [EbwFfR])} onPress={onPress_120526} />;
items2[2] = <View style={styles.buttonSpacer} />;
items2[3] = <Button text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['ETE/oC'])} variant="secondary" onPress={onPress_120527} />;
return (
<BottomSheet {...object2}>
<View style={styles.container}>
{items2}
</View>
</BottomSheet>
);
}
function UploadLogsActionSheetOnPress() { // fn#120526, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15909:889, owner: UploadLogsActionSheet.onPress, offset: 0x0252e0e0, size: 166 bytes, params: 1, frame: 19
const value = environment.__proto__;
const debugUploadManagerModule = require(11216) /* metro dependency 11216: DebugUploadManager */;
const uploadDebugLogFiles = debugUploadManagerModule.uploadDebugLogFiles;
const RTC = DebugLogCategory.RTC;
Reflect.apply(uploadDebugLogFiles, debugUploadManagerModule, [RTC]);
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const DEBUG_LOG_UPLOADED = AnalyticEvents.DEBUG_LOG_UPLOADED;
const mediaSessionIdBinding = mediaSessionId;
const value3 = null;
Reflect.apply(track, defaultImport, [DEBUG_LOG_UPLOADED,
{media_session_id: value3 != mediaSessionIdBinding ? mediaSessionId : value3,
rtc_connection_id: value3 != rtcConnectionId ? rtcConnectionId : value3}]);
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
}
global.__d(_fun120524, 15701, [31, 27, 661, 33, 4501, 697, 6275, 6758, 1244, 4573, 4578, 11216, 683, 4080,
2]) /* metro module 15701, dependencies: [31, 27, 661, 33, 4501, 697, 6275, 6758, 1244, 4573, 4578, 11216, 683, 4080, 2] */;
@@ -1,13 +1,17 @@
/* Metro module 12546; source: modules/feedback/native/requestReviewModal.tsx; dependencies: [5, 27, 3, 12547, 477, 2] */
import Logger from '../../debug/Logger.tsx'; /* Metro dependency 3 */
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 PlatformUtilsModule from '../../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
function _fun95877(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#95877, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12736:6, offset: 0x02151290, size: 193 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 = (require(27) /* metro dependency 27 */).NativeModules;
let value = importDefault(3) /* metro dependency 3: Logger */;
let value = Logger;
value = new value('requestReviewModal');
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/feedback/native/requestReviewModal.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/feedback/native/requestReviewModal.tsx');
exports.default = function() {
if (require(dependencyMap[4]).isAndroid()) {
_fun95882();
@@ -15,145 +19,150 @@ function _fun95877(global, require, importDefault, importAll, module, exports, d
NativeModules.AppStoreManager.requestReview();
}
};
}
function _showAndroidRatingRequest() { // fn#95878, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12736:169, offset: 0x02151351, size: 50 bytes, params: 1, frame: 14
return Module00005(_fun95880).apply(this, arguments);
function* _fun95880() { // fn#95880, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12736:242, offset: 0x0215138e, size: 141 bytes, params: 1, frame: 14
var r1;
var binding;
var binding2;
var property;
var value4;
var value5;
var binding3;
var value6;
var requestRating;
var value7;
var value8;
var value9;
var error;
if (true) {
value = environment.__proto__.__proto__;
try {
binding = env2_1;
} catch (error) {
binding = env2_5;
binding.error('Failed to show Android rating request: ' + error);
return undefined;
}
try {
binding2 = env2_2;
} catch (error) {
binding = env2_5;
binding.error('Failed to show Android rating request: ' + error);
return undefined;
}
try {
property = binding2[3];
} catch (error) {
binding = env2_5;
binding.error('Failed to show Android rating request: ' + error);
return undefined;
}
var value3 = undefined;
try {
value4 = binding(property);
} catch (error) {
binding = env2_5;
binding.error('Failed to show Android rating request: ' + error);
return undefined;
}
try {
value5 = value4 == null;
} catch (error) {
binding = env2_5;
binding.error('Failed to show Android rating request: ' + error);
return undefined;
}
if (value5) {
yield value3;
try {
value8 = undefined;
value9 = false;
} catch (error) {
binding = env2_5;
binding.error('Failed to show Android rating request: ' + error);
return undefined;
}
if (value9) {
return value8;
}
} else {
try {
binding = env2_1;
} catch (error) {
binding = env2_5;
binding.error('Failed to show Android rating request: ' + error);
return undefined;
}
try {
binding3 = env2_2;
} catch (error) {
binding = env2_5;
binding.error('Failed to show Android rating request: ' + error);
return undefined;
}
try {
property = binding3[3];
} catch (error) {
binding = env2_5;
binding.error('Failed to show Android rating request: ' + error);
return undefined;
}
try {
value6 = binding(property);
} catch (error) {
binding = env2_5;
binding.error('Failed to show Android rating request: ' + error);
return undefined;
}
try {
requestRating = value6.requestRating;
} catch (error) {
binding = env2_5;
binding.error('Failed to show Android rating request: ' + error);
return undefined;
}
try {
value7 = Reflect.apply(requestRating, value6, []);
r1 = value7;
} catch (error) {
binding = env2_5;
binding.error('Failed to show Android rating request: ' + error);
return undefined;
}
yield r1;
try {
value8 = undefined;
value9 = false;
} catch (error) {
binding = env2_5;
binding.error('Failed to show Android rating request: ' + error);
return undefined;
}
if (value9) {
return value8;
}
}
}
}
function _showAndroidRatingRequest() { // fn#95878, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12736:169, offset: 0x02151351, size: 50 bytes, params: 1, frame: 14
return env0_3(_fun95880).apply(this, arguments);
}
function requestReviewModal() { // fn#95881, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12736:491, offset: 0x0215141b, size: 77 bytes, params: 1, frame: 12
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (platformUtilsModule.isAndroid()) {
(function() {
return _showAndroidRatingRequest.apply(this, arguments);
})();
} else {
NativeModules.AppStoreManager.requestReview();
}
}
function* _fun95880() { // fn#95880, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12736:242, offset: 0x0215138e, size: 141 bytes, params: 1, frame: 14
var r1;
var binding;
var binding2;
var property;
var value4;
var value5;
var binding3;
var value6;
var requestRating;
var value7;
var value8;
var value9;
var error;
if (true) {
value = environment.__proto__.__proto__;
try {
binding = env2_1;
} catch (error) {
binding = env2_5;
binding.error('Failed to show Android rating request: ' + error);
return undefined;
}
try {
binding2 = env2_2;
} catch (error) {
binding = env2_5;
binding.error('Failed to show Android rating request: ' + error);
return undefined;
}
try {
property = binding2[3];
} catch (error) {
binding = env2_5;
binding.error('Failed to show Android rating request: ' + error);
return undefined;
}
var value3 = undefined;
try {
value4 = binding(property);
} catch (error) {
binding = env2_5;
binding.error('Failed to show Android rating request: ' + error);
return undefined;
}
try {
value5 = value4 == null;
} catch (error) {
binding = env2_5;
binding.error('Failed to show Android rating request: ' + error);
return undefined;
}
if (value5) {
yield value3;
try {
value8 = undefined;
value9 = false;
} catch (error) {
binding = env2_5;
binding.error('Failed to show Android rating request: ' + error);
return undefined;
}
if (value9) {
return value8;
}
function requestReviewModal() { // fn#95881, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12736:491, offset: 0x0215141b, size: 77 bytes, params: 1, frame: 12
if (PlatformUtilsModule.isAndroid()) {
(function() {
return _showAndroidRatingRequest.apply(this, arguments);
})();
} else {
try {
binding = env2_1;
} catch (error) {
binding = env2_5;
binding.error('Failed to show Android rating request: ' + error);
return undefined;
}
try {
binding3 = env2_2;
} catch (error) {
binding = env2_5;
binding.error('Failed to show Android rating request: ' + error);
return undefined;
}
try {
property = binding3[3];
} catch (error) {
binding = env2_5;
binding.error('Failed to show Android rating request: ' + error);
return undefined;
}
try {
value6 = binding(property);
} catch (error) {
binding = env2_5;
binding.error('Failed to show Android rating request: ' + error);
return undefined;
}
try {
requestRating = value6.requestRating;
} catch (error) {
binding = env2_5;
binding.error('Failed to show Android rating request: ' + error);
return undefined;
}
try {
value7 = Reflect.apply(requestRating, value6, []);
r1 = value7;
} catch (error) {
binding = env2_5;
binding.error('Failed to show Android rating request: ' + error);
return undefined;
}
yield r1;
try {
value8 = undefined;
value9 = false;
} catch (error) {
binding = env2_5;
binding.error('Failed to show Android rating request: ' + error);
return undefined;
}
if (value9) {
return value8;
}
NativeModules.AppStoreManager.requestReview();
}
function showAndroidRatingRequest() { // fn#95882, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12736:541, owner: requestReviewModal.showAndroidRatingRequest, offset: 0x01d8774e, size: 30 bytes, params: 1, frame: 13
return _showAndroidRatingRequest.apply(this, arguments);
}
}
}
global.__d(_fun95877, 12546, [5, 27, 3, 12547, 477,
2]) /* metro module 12546, dependencies: [5, 27, 3, 12547, 477, 2] */;