decord/source/modules/parent_tools/FamilyCenterControlledSettingsUtils.tsx

121 lines
5.8 KiB
TypeScript
Raw Normal View History

2026-08-15 05:55:55 +00:00
// Module ID: 14185
// Function ID: 14186
2026-07-29 08:29:29 +00:00
// Name: getGoreContentSettingOrDefault
2026-08-15 05:55:55 +00:00
// Dependencies: [1306, 14182, 5025, 5023, 2]
2026-07-29 08:29:29 +00:00
// Exports: isSetAndNotDefault, resolveExplicitContentSettingWithDefaultsForTeen, updateExplicitContentSetting, updateGoreContentSetting
2026-07-20 16:05:17 +00:00
2026-08-15 05:55:55 +00:00
// Module 14185 (getGoreContentSettingOrDefault)
2026-07-20 16:05:17 +00:00
function getGoreContentSettingOrDefault(arg0) {
let goreContentFriendDm;
let goreContentNonFriendDm;
2026-08-15 05:55:55 +00:00
const ParentalControlledGoreContent = require(14182) /* result */.ParentalControlledGoreContent;
2026-07-20 16:05:17 +00:00
let controlledSetting = ParentalControlledGoreContent.getControlledSetting(arg0);
2026-07-29 08:29:29 +00:00
if (controlledSetting == null) {
2026-07-20 16:05:17 +00:00
controlledSetting = {};
}
({ goreContentNonFriendDm, goreContentFriendDm } = controlledSetting);
2026-07-29 08:29:29 +00:00
if (!tmp3) {
2026-08-15 05:55:55 +00:00
let tmpResult = tmp(5025);
2026-07-29 08:29:29 +00:00
goreContentNonFriendDm = tmpResult.resolveGoreSettingWithDefaultsForTeen({ isDm: true });
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
const obj = { goreContentNonFriendDm, goreContentFriendDm: null, goreContentGuilds: null };
tmp3 = null != goreContentNonFriendDm && goreContentNonFriendDm !== require(1306) /* create */.ExplicitContentRedaction.UNSET_EXPLICIT_CONTENT_REDACTION;
if (!tmp4) {
2026-08-15 05:55:55 +00:00
tmpResult = tmp(5025);
2026-07-29 08:29:29 +00:00
goreContentFriendDm = tmpResult.resolveGoreSettingWithDefaultsForTeen({ isDm: true, isFriend: true });
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj[1] = goreContentFriendDm;
obj[2] = require(1306) /* create */.ExplicitContentRedaction.BLUR;
2026-07-20 16:05:17 +00:00
return obj;
}
2026-07-29 08:29:29 +00:00
function getExplicitContentSettingOrDefault(teenId) {
2026-07-20 16:05:17 +00:00
let isFriend;
let setting;
2026-08-15 05:55:55 +00:00
const ParentalControlledExplicitContent = require(14182) /* result */.ParentalControlledExplicitContent;
2026-07-29 08:29:29 +00:00
const controlledSetting = ParentalControlledExplicitContent.getControlledSetting(teenId);
let obj = { teenId, setting: null };
let prop;
if (controlledSetting != null) {
prop = controlledSetting.explicitContentNonFriendDm;
}
obj[1] = prop;
({ setting, isFriend, teenId } = obj);
2026-07-20 16:05:17 +00:00
if (isFriend === undefined) {
isFriend = false;
}
2026-07-29 08:29:29 +00:00
if (tmp5) {
obj = { explicitContentNonFriendDm: null, explicitContentFriendDm: null, explicitContentGuilds: null };
obj[0] = setting;
let prop1;
if (controlledSetting != null) {
prop1 = controlledSetting.explicitContentFriendDm;
}
if (!tmp10) {
2026-08-15 05:55:55 +00:00
const ParentalControlledLegacyExplicitContent2 = tmp(14182).ParentalControlledLegacyExplicitContent;
2026-07-29 08:29:29 +00:00
const controlledSetting1 = ParentalControlledLegacyExplicitContent2.getControlledSetting(teenId);
2026-08-15 05:55:55 +00:00
prop1 = tmp(5023).TEEN_EXPLICIT_CONTENT_FILTER_TO_EXPLICIT_CONTENT_REDACTION_FRIEND_DM[controlledSetting1];
2026-07-29 08:29:29 +00:00
}
obj[1] = prop1;
obj[2] = tmp(1306).ExplicitContentRedaction.BLUR;
return obj;
2026-07-20 16:05:17 +00:00
} else {
2026-08-15 05:55:55 +00:00
const ParentalControlledLegacyExplicitContent = tmp(14182).ParentalControlledLegacyExplicitContent;
2026-07-29 08:29:29 +00:00
const controlledSetting2 = ParentalControlledLegacyExplicitContent.getControlledSetting(teenId);
2026-08-15 05:55:55 +00:00
let TEEN_EXPLICIT_CONTENT_FILTER_TO_EXPLICIT_CONTENT_REDACTION_FRIEND_DM = tmp(5023);
2026-07-20 16:05:17 +00:00
if (isFriend) {
2026-07-29 08:29:29 +00:00
TEEN_EXPLICIT_CONTENT_FILTER_TO_EXPLICIT_CONTENT_REDACTION_FRIEND_DM = TEEN_EXPLICIT_CONTENT_FILTER_TO_EXPLICIT_CONTENT_REDACTION_FRIEND_DM.TEEN_EXPLICIT_CONTENT_FILTER_TO_EXPLICIT_CONTENT_REDACTION_FRIEND_DM;
let tmp7 = TEEN_EXPLICIT_CONTENT_FILTER_TO_EXPLICIT_CONTENT_REDACTION_FRIEND_DM[controlledSetting2];
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
tmp7 = TEEN_EXPLICIT_CONTENT_FILTER_TO_EXPLICIT_CONTENT_REDACTION_FRIEND_DM.TEEN_EXPLICIT_CONTENT_FILTER_TO_EXPLICIT_CONTENT_REDACTION_NON_FRIEND_DM[controlledSetting2];
2026-07-20 16:05:17 +00:00
}
}
}
2026-07-23 10:11:24 +00:00
let result = require("resolveGoreSettingWithDefaults").fileFinishedImporting("modules/parent_tools/FamilyCenterControlledSettingsUtils.tsx");
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export const isSetAndNotDefault = function isSetAndNotDefault(goreContentFriendDm) {
let tmp = null != goreContentFriendDm;
if (tmp) {
tmp = goreContentFriendDm !== require(1306) /* create */.ExplicitContentRedaction.UNSET_EXPLICIT_CONTENT_REDACTION;
}
return tmp;
};
2026-07-20 16:05:17 +00:00
export { getGoreContentSettingOrDefault };
export const updateGoreContentSetting = function updateGoreContentSetting(selectedTeenId) {
2026-08-15 05:55:55 +00:00
const ParentalControlledGoreContent = require(14182) /* result */.ParentalControlledGoreContent;
2026-07-20 16:05:17 +00:00
const merged = Object.assign(getGoreContentSettingOrDefault(selectedTeenId));
const merged1 = Object.assign(arg1);
const result = ParentalControlledGoreContent.updateControlledSetting(selectedTeenId, {});
};
2026-07-29 08:29:29 +00:00
export const resolveExplicitContentSettingWithDefaultsForTeen = function resolveExplicitContentSettingWithDefaultsForTeen(teenId) {
let isFriend;
let setting;
({ setting, isFriend } = teenId);
if (isFriend === undefined) {
isFriend = false;
}
let tmp = null != setting;
if (tmp) {
tmp = setting !== require(1306) /* create */.ExplicitContentRedaction.UNSET_EXPLICIT_CONTENT_REDACTION;
}
if (tmp) {
return setting;
} else {
2026-08-15 05:55:55 +00:00
const ParentalControlledLegacyExplicitContent = require(14182) /* result */.ParentalControlledLegacyExplicitContent;
2026-07-29 08:29:29 +00:00
const controlledSetting = ParentalControlledLegacyExplicitContent.getControlledSetting(teenId.teenId);
2026-08-15 05:55:55 +00:00
const tmp7 = require(5023) /* resolveExplicitContentSettingWithDefaults */;
2026-07-29 08:29:29 +00:00
if (isFriend) {
let tmp8 = tmp7.TEEN_EXPLICIT_CONTENT_FILTER_TO_EXPLICIT_CONTENT_REDACTION_FRIEND_DM[controlledSetting];
} else {
tmp8 = tmp7.TEEN_EXPLICIT_CONTENT_FILTER_TO_EXPLICIT_CONTENT_REDACTION_NON_FRIEND_DM[controlledSetting];
}
return tmp8;
}
};
2026-07-20 16:05:17 +00:00
export { getExplicitContentSettingOrDefault };
export const updateExplicitContentSetting = function updateExplicitContentSetting(selectedTeenId) {
2026-08-15 05:55:55 +00:00
const ParentalControlledExplicitContent = require(14182) /* result */.ParentalControlledExplicitContent;
2026-07-20 16:05:17 +00:00
const merged = Object.assign(getExplicitContentSettingOrDefault(selectedTeenId));
const merged1 = Object.assign(arg1);
const result = ParentalControlledExplicitContent.updateControlledSetting(selectedTeenId, {});
};