/* Metro module 11472; source: modules/safety_hub/native/ClassificationDetail.tsx; dependencies: [31, 27, 1949, 11473, 5267, 661, 33, 4501, 697, 4573, 5268, 1244, 566, 6766, 8792, 3853, 8036, 4578, 11479, 11481, 683, 6618, 11482, 5266, 11486, 4826, 4831, 11488, 2] */
function _fun87823(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87823, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11658:6, offset: 0x01fcc742, size: 1085 bytes, params: 8, frame: 24
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
const env0_4 = value.View;
const env0_5 = value.ActivityIndicator;
const env0_6 = value.ScrollView;
const localeStore = importDefault(1949) /* metro dependency 1949: LocaleStore */;
const safetyHubStore = importDefault(11473) /* metro dependency 11473: SafetyHubStore */;
value = require(5267) /* metro dependency 5267: SafetyHubConstants */;
const env0_9 = value.SafetyHubAnalyticsActionSource;
const env0_10 = value.SafetyHubAnalyticsActions;
const env0_11 = value.SafetyHubLinks;
const env0_12 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
value = require(33) /* metro dependency 33 */;
const env0_13 = value.jsx;
const env0_14 = value.jsxs;
const env0_15 = value.Fragment;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
object2.root = {backgroundColor: BACKGROUND_BASE_LOWER};
const object5 = {'display': 'flex', 'flexDirection': 'column', 'height': '100%'};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object5.paddingTop = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object5.paddingHorizontal = PX_16;
let PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
object5.gap = PX_32;
object2.container = object5;
const object7 = {'display': 'flex', 'textAlign': 'center', 'alignItems': 'center', 'flexDirection': 'column'};
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object7.gap = PX_8;
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object7.marginBottom = PX_8;
object2.header = object7;
object2.headerText = {'textAlign': 'center', 'maxWidth': 260};
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.sectionContainer = {display: 'flex', gap: PX_8};
const object10 = {'display': 'flex', 'paddingLeft': null, 'flexDirection': 'column'};
let PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object10.paddingLeft = PX_4;
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object10.gap = PX_8;
object2.actionsTaken = object10;
PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
object2.classificationDetailContainer = {'display': 'flex', 'flexDirection': 'column', gap: PX_32};
object2.letUsKnowContainer = {'display': 'flex', 'alignItems': 'center'};
const object11 = {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center',
'justifyContent': 'space-between'};
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object11.gap = PX_12;
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object11.padding = PX_12;
PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object11.marginTop = PX_4;
object11.flexShrink = 1;
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object11.backgroundColor = BACKGROUND_BASE_LOWEST;
object2.classificationPolicyCard = object11;
const object12 = {'display': 'flex', 'alignItems': 'center', 'justifyContent': 'center', 'backgroundColor': null,
'width': 32, 'height': 32};
const BACKGROUND_MOD_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_STRONG;
object12.backgroundColor = BACKGROUND_MOD_STRONG;
object12.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xxl;
object2.classificationPolicyCardIcon = object12;
object2.classificationPolicyCardContent = {flex: 1};
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.classificationActionDescription = {'display': 'flex', 'flexDirection': 'row', gap: PX_8};
PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
object2.redirectButtonWrapper = {'width': 300, 'alignSelf': 'center', marginTop: PX_32};
const env0_16 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/safety_hub/native/ClassificationDetail.tsx');
exports.default = ConnectedClassificationDetail;
}
function ClassificationHeader({classificationTypeText, guildMetadata}) { // fn#87824, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11658:1754, offset: 0x01fccb7f, size: 168 bytes, params: 2, frame: 19
const styles = useStyles();
const value2 = env0_3.useMemo(_fun87825, [classificationTypeText, guildMetadata]);
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
{value2}
);
}
function ClassificationActionsTaken({actions, classificationExpiration}) { // fn#87827, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11658:2402, offset: 0x01fccde1, size: 561 bytes, params: 2, frame: 37
var r10;
var r0;
var value3;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var items2;
var items3;
var value6;
var items4;
var format;
var TByIjT;
var object;
const locale = (require(566) /* metro dependency 566: flux */).useStateFromStores([LocaleStore], function() {
return LocaleStore.locale;
});
const styles = useStyles();
const value2 = actions.filter(function(a0) {
return a0.descriptions.length > 0;
});
if (value2.length !== 0) {
var viewBindingProps = {style: styles.sectionContainer};
items2 = [{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['O2nYk+'])}];
var viewBinding2Props = {style: [styles.actionsTaken]};
items3 = [value2.map(_fun87830)];
value6 = null;
if (value6 != classificationExpiration) {
var viewBinding3Props = {style: styles.classificationActionDescription};
items4 = [{' '}{'•'}];
format = intl.format;
TByIjT = (require(1244) /* metro dependency 1244: indexNative */).t.TByIjT;
object = {};
object.expirationDate = classificationExpiration.toLocaleDateString(locale, {dateStyle: 'medium'});
items4[1] = {Reflect.apply(format, intl, [TByIjT, object])};
r10 = {items4};
} else {
r10 = value6;
}
items3[1] = r10;
items2[1] = {items3};
r0 = {items2};
} else {
value3 = null;
if (value3 == classificationExpiration) {
r0 = value3;
} else {
var viewBindingProps = {style: styles.sectionContainer};
items2 = [{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['O2nYk+'])}];
var viewBinding2Props = {style: [styles.actionsTaken]};
items3 = [value2.map(_fun87830)];
value6 = null;
if (value6 != classificationExpiration) {
var viewBinding3Props = {style: styles.classificationActionDescription};
items4 = [{' '}{'•'}];
format = intl.format;
TByIjT = (require(1244) /* metro dependency 1244: indexNative */).t.TByIjT;
object = {};
object.expirationDate = classificationExpiration.toLocaleDateString(locale, {dateStyle: 'medium'});
items4[1] = {Reflect.apply(format, intl, [TByIjT, object])};
r10 = {items4};
} else {
r10 = value6;
}
items3[1] = r10;
items2[1] = {items3};
r0 = {items2};
}
}
return r0;
}
function ClassificationActionsTakenRows({action}) { // fn#87831, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11658:3172, offset: 0x01fcd05b, size: 72 bytes, params: 2, frame: 16
const env0_0 = useStyles();
return (
<>
{action.descriptions.map(_fun87832)}
>
);
}
function ClassificationGuidance({tosLink, communityGuidelinesLink, classificationTypeText, policyExplainerLink, appealComponent}) { // fn#87833, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11658:3466, offset: 0x01fcd141, size: 329 bytes, params: 2, frame: 28
const styles = useStyles();
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const text = {intl.string((require(1244) /* metro dependency 1244: indexNative */).t['977iei'])};
const TextWithIOSLinkWorkaround = (require(6766) /* metro dependency 6766: TextWithIOSLinkWorkaround */).TextWithIOSLinkWorkaround;
return (
{text}
{intl.format((require(1244) /* metro dependency 1244: indexNative */).t['1Z/+aA'], {tosLink: tosLink,
communityGuidelinesLink: communityGuidelinesLink})}
{appealComponent}
);
}
function ClassificationPolicyCard({classificationTypeText, policyExplainerLink}) { // fn#87834, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11658:4013, offset: 0x01fcd28a, size: 366 bytes, params: 2, frame: 29
const styles = useStyles();
const TouchableHitBox = importDefault(8792) /* metro dependency 8792: TouchableHitBox */;
const defaultImportProps = {onPress: onPress_87835, style: [styles.classificationPolicyCard]};
const ShieldIcon = (require(8036) /* metro dependency 8036: ShieldIcon */).ShieldIcon;
const TEXT_LINK = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_LINK;
const view = ;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
{view}
{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.zxUdpj,
{classificationDescription: classificationTypeText})}
);
}
function ClassificationDetailFooter({onClose}) { // fn#87836, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11658:5115, offset: 0x01fcd425, size: 163 bytes, params: 2, frame: 22
const styles = useStyles();
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
);
}
function AppealStatus() { // fn#87837, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11658:4583, offset: 0x01fcd4c8, size: 109 bytes, params: 1, frame: 18
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['I2H0/E'])}
);
}
function LetUsKnow(a0) { // fn#87838, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11658:4711, offset: 0x01fcd535, size: 135 bytes, params: 2, frame: 19
const env0_0 = a0;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const format = intl.format;
const IFxUaT = (require(1244) /* metro dependency 1244: indexNative */).t.IFxUaT;
return (
{Reflect.apply(format, intl, [IFxUaT, {letUsKnowHook: letUsKnowHook}])}
);
}
function AppealFooter(a0) { // fn#87840, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11658:4962, offset: 0x01fcd612, size: 98 bytes, params: 2, frame: 18
const styles = useStyles();
return (
{a0.hasBeenAppealed ? : }
);
}
function ConnectedClassificationDetail({classificationId, source, onClose, onError}) { // fn#87841, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11658:5329, offset: 0x01fcd674, size: 1008 bytes, params: 2, frame: 32
var r0;
const SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
var description;
var items2;
var APPEALS_LINK;
var COMMUNITY_GUIDELINES;
var TOS_LINK;
const value3 = (require(11479) /* metro dependency 11479: useSafetyHubClassifications */).useSafetyHubClassification(classificationId);
const env0_3 = value3;
const classification = value3.classification;
const env0_5 = value3.isAppealEligible;
const styles = useStyles();
const appealEligibility = (require(566) /* metro dependency 566: flux */).useStateFromStores([SafetyHubStore],
function() {
return SafetyHubStore.getAppealEligibility();
});
const r5 = classification?.flagged_content != null && (classification == null ? undefined : classification.flagged_content.length) > 0;
const value7 = (require(11481) /* metro dependency 11481: useSafetyHubAccountStanding */).useSafetyHubAccountStanding();
let r9 = classification == null || !classification.is_coppa;
const env0_8 = !r9 && appealEligibility.includes((require(5268) /* metro dependency 5268: SafetyHubModels */).AppealEligibility.AGE_VERIFY_ELIGIBLE);
const env0_9 = !(classification == null || !classification.is_coppa) && appealEligibility.includes((require(5268) /* metro dependency 5268: SafetyHubModels */).AppealEligibility.AGE_VERIFY_GLOBAL_ELIGIBLE);
const env0_11 = env0_3.useRef({accountStanding: value7, classificationId: classificationId,
classificationState: value3, hasFlaggedContent: r5, source: source});
env0_3.useEffect(_fun87843);
env0_3.useEffect(_fun87844, [classification]);
if (classification != null) {
var scrollViewBindingProps = {style: styles.root};
var safeAreaPaddingViewProps = {style: styles.container, bottom: true};
if (classification == null) {
r9 = ;
} else {
var viewBindingProps = {style: [styles.classificationDetailContainer]};
description = classification.description;
items2 = [];
items2[1] = ((Component) => )(importDefault(11482) /* metro dependency 11482: ClassificationEvidence */);
items2[2] = ;
APPEALS_LINK = SafetyHubLinks.APPEALS_LINK;
COMMUNITY_GUIDELINES = SafetyHubLinks.COMMUNITY_GUIDELINES;
TOS_LINK = SafetyHubLinks.TOS_LINK;
description = classification.description;
items2[3] = } />;
items2[4] = ;
r9 = {items2};
}
r0 = {r9};
} else if (value3.classificationRequestState === (require(5268) /* metro dependency 5268: SafetyHubModels */).ClassificationRequestState.FAILED) {
onError();
r0 = null;
} else {
var scrollViewBindingProps = {style: styles.root};
var safeAreaPaddingViewProps = {style: styles.container, bottom: true};
if (classification == null) {
r9 = ;
} else {
var viewBindingProps = {style: [styles.classificationDetailContainer]};
description = classification.description;
items2 = [];
items2[1] = ((Component) => )(importDefault(11482) /* metro dependency 11482: ClassificationEvidence */);
items2[2] = ;
APPEALS_LINK = SafetyHubLinks.APPEALS_LINK;
COMMUNITY_GUIDELINES = SafetyHubLinks.COMMUNITY_GUIDELINES;
TOS_LINK = SafetyHubLinks.TOS_LINK;
description = classification.description;
items2[3] = } />;
items2[4] = ;
r9 = {items2};
}
r0 = {r9};
}
return r0;
}
function _fun87825() { // fn#87825, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11658:1851, offset: 0x01fccc27, size: 377 bytes, params: 1, frame: 21
var environment;
var member_type;
var r1;
var r0;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var format;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var value2;
var value3;
var rmpEPD;
var object4;
var X1ngSd;
var object5;
const object6 = {};
var value;
object6.classification_type = classificationTypeText;
object6.classificationHook = classificationHook;
let guildMetadataBinding = guildMetadata;
if (guildMetadataBinding != null) {
guildMetadataBinding = guildMetadata;
value2 = undefined;
member_type = guildMetadataBinding == null ? value2 : guildMetadata.member_type;
value3 = environment.__proto__;
if (member_type === (require(5268) /* metro dependency 5268: SafetyHubModels */).MemberType.OWNER) {
format = intl.format;
X1ngSd = t.X1ngSd;
object5 = {};
copyDataProperties(object5, object6, undefined);
object5['guildName'] = guildMetadata == null ? value2 : guildMetadata.name;
r1 = Reflect.apply(format, intl, [X1ngSd, object5]);
} else {
format = intl.format;
rmpEPD = t.rmpEPD;
object4 = {};
copyDataProperties(object4, object6, undefined);
object4['guildName'] = guildMetadata == null ? value2 : guildMetadata.name;
r1 = Reflect.apply(format, intl, [rmpEPD, object4]);
}
r0 = r1;
} else {
value = environment.__proto__;
value = intl.format(t['39jfOz'], object6);
r0 = value;
}
return r0;
}
function _fun87830(a0) { // fn#87830, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11658:2809, offset: 0x01fcd037, size: 36 bytes, params: 2, frame: 15
return ;
}
function _fun87832(a0, a1) { // fn#87832, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11658:3277, offset: 0x01fcd0a3, size: 158 bytes, params: 3, frame: 23
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
{' '}
{'•'}
{a0}
);
}
function ClassificationPolicyCardOnPress() { // fn#87835, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11658:4152, owner: ClassificationPolicyCard.onPress, offset: 0x01fcd3f8, size: 45 bytes, params: 1, frame: 12
let value = environment.__proto__;
value = importDefault(3853) /* metro dependency 3853: Linking */;
value.openURL(policyExplainerLink);
}
function letUsKnowHook(a0, a1) { // fn#87839, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11658:4837, owner: LetUsKnow.letUsKnowHook, offset: 0x01fcd5bc, size: 86 bytes, params: 3, frame: 15
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
{a0}
);
}
function _fun87843() { // fn#87843, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11658:6020, offset: 0x01fcda79, size: 21 bytes, params: 1, frame: 2
env0_11.current = env0_10;
}
function _fun87844() { // fn#87844, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11658:6053, offset: 0x01fcda8e, size: 201 bytes, params: 1, frame: 22
var current;
var accountStanding;
var classificationId;
var classificationState;
var hasFlaggedContent;
var source;
var defaultImport;
var track;
var SAFETY_HUB_ACTION;
var object2;
if (classification != null) {
current = env0_11.current;
accountStanding = current.accountStanding;
classificationId = current.classificationId;
classificationState = current.classificationState;
hasFlaggedContent = current.hasFlaggedContent;
source = current.source;
value = environment.__proto__;
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
track = defaultImport.track;
SAFETY_HUB_ACTION = AnalyticEvents.SAFETY_HUB_ACTION;
object2 = {};
object2.action = SafetyHubAnalyticsActions.ViewViolationDetail;
object2.account_standing = accountStanding.state;
object2.classification_ids = [global.Number(classificationId)];
object2.source = source ?? SafetyHubAnalyticsActionSource.SystemDM;
object2.is_violative_content_shown = hasFlaggedContent;
object2.is_dsa_eligible = classificationState.isDsaEligible;
object2.violation_type = classificationState.violationType;
Reflect.apply(track, defaultImport, [SAFETY_HUB_ACTION, object2]);
}
}
function onPressLetUsKnow() { // fn#87845, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11658:7258, owner: ConnectedClassificationDetail.onPressLetUsKnow, offset: 0x01fcdb57, size: 424 bytes, params: 1, frame: 19
var defaultImport2;
var defaultImport3;
var increment;
let value = environment.__proto__;
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const SAFETY_HUB_ACTION = AnalyticEvents.SAFETY_HUB_ACTION;
let object2 = {};
const ClickLetUsKnow = SafetyHubAnalyticsActions.ClickLetUsKnow;
object2.action = ClickLetUsKnow;
object2.account_standing = env0_7.state;
const Number = global.Number;
object2.classification_ids = [Number(classificationId)];
object2.source = source ?? SafetyHubAnalyticsActionSource.SystemDM;
object2.is_violative_content_shown = env0_6;
const binding = env0_3;
object2.is_dsa_eligible = binding.isDsaEligible;
object2.violation_type = binding.violationType;
Reflect.apply(track, defaultImport, [SAFETY_HUB_ACTION, object2]);
if (env0_9) {
value = importDefault(11486) /* metro dependency 11486: AutomatedUnderageAppealModalActionCreatorsNative */;
value.openV2(classificationId, onClose);
} else if (env0_8) {
value = importDefault(11486) /* metro dependency 11486: AutomatedUnderageAppealModalActionCreatorsNative */;
value.open(classificationId, onClose);
} else if (isAppealEligible) {
defaultImport3 = importDefault(4826) /* metro dependency 4826: MonitoringAgent */;
increment = defaultImport3.increment;
object2 = {};
object2.name = (require(4831) /* metro dependency 4831: MetricEvents */).MetricEvents.APPEAL_INGESTION_VIEW;
Reflect.apply(increment, defaultImport3, [object2]);
(importDefault(11488) /* metro dependency 11488: AppealIngestionModalActionCreators */).open({classificationId: classificationId});
} else {
defaultImport2 = importDefault(3853) /* metro dependency 3853: Linking */;
defaultImport2.openURL(SafetyHubLinks.APPEALS_LINK);
}
}
function classificationHook(a0, a1) { // fn#87826, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11658:1904, offset: 0x01fccda0, size: 65 bytes, params: 3, frame: 15
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return ;
}