89 lines
3.4 KiB
TypeScript
89 lines
3.4 KiB
TypeScript
// Metro module 13856 (f13857).
|
|
import { ExplicitContentFilterTypes } from "../privacy_and_safety/DMSafetyConstants";
|
|
import { AllFriendSourceFlags } from "../../../Constants";
|
|
import { defineParentalControlledSetting } from "./ParentalControlledUserSettingsDefinitions";
|
|
import { explicitContentFromProto, explicitContentToProto, goreContentFromProto, goreContentToProto } from "../UserSettings";
|
|
import shallowEqual from "../../../_bundle/shallowEqual";
|
|
import { UInt32Value, BoolValue } from "../../../_bundle/Module1337";
|
|
import { SpendingLimitSettings, SpendingLimit } from "../../../_bundle/Module1306";
|
|
import { spendingLimitEqual } from "../../parent_tools/SpendingLimitUtils";
|
|
const r11 = defineParentalControlledSetting("textAndImages", "explicitContentSettings", explicitContentFromProto, explicitContentToProto, {
|
|
comparator: shallowEqual
|
|
});
|
|
const r10 = defineParentalControlledSetting("textAndImages", "explicitContentFilter", (a0) => {
|
|
let r2 = a0?.value;
|
|
if (r2 == null) {
|
|
r2 = ExplicitContentFilterTypes.NON_FRIENDS;
|
|
}
|
|
return r2;
|
|
}, (a0) => UInt32Value.create({
|
|
value: a0
|
|
}));
|
|
const r66 = defineParentalControlledSetting("textAndImages", "goreContentSettings", goreContentFromProto, goreContentToProto, {
|
|
comparator: shallowEqual
|
|
});
|
|
const r75 = defineParentalControlledSetting("privacy", "defaultMessageRequestRestricted", (a0) => a0?.value, (a0) => BoolValue.create({
|
|
value: a0
|
|
}));
|
|
const r84 = defineParentalControlledSetting("privacy", "defaultGuildsRestricted", (a0) => a0 == null ? false : a0, (a0) => a0);
|
|
const r93 = defineParentalControlledSetting("privacy", "defaultGuildsRestrictedV2", (a0) => a0?.value, (a0) => BoolValue.create({
|
|
value: a0
|
|
}));
|
|
const r101 = defineParentalControlledSetting("privacy", "friendSourceFlags", (a0) => {
|
|
let r2 = a0?.value;
|
|
if (r2 == null) {
|
|
r2 = AllFriendSourceFlags;
|
|
}
|
|
return r2;
|
|
}, (a0) => UInt32Value.create({
|
|
value: a0
|
|
}));
|
|
const r109 = defineParentalControlledSetting("privacy", "dropsOptedOut", (a0) => {
|
|
let r2 = a0?.value;
|
|
if (r2 == null) {
|
|
r2 = false;
|
|
}
|
|
return r2;
|
|
}, (a0) => BoolValue.create({
|
|
value: a0
|
|
}));
|
|
const r117 = defineParentalControlledSetting("privacy", "quests3PDataOptedOut", (a0) => {
|
|
let r2 = a0?.value;
|
|
if (r2 == null) {
|
|
r2 = false;
|
|
}
|
|
return r2;
|
|
}, (a0) => BoolValue.create({
|
|
value: a0
|
|
}));
|
|
const r130 = defineParentalControlledSetting("safetySettings", "spendingLimitSettings", (a0) => {
|
|
const oneTimePurchaseLimit = a0?.oneTimePurchaseLimit;
|
|
return oneTimePurchaseLimit == null ? null : {
|
|
amount: Number(oneTimePurchaseLimit.amount),
|
|
currency: oneTimePurchaseLimit.currency
|
|
};
|
|
}, (a0) => {
|
|
if (a0 == null) {
|
|
return SpendingLimitSettings.create({});
|
|
}
|
|
const { amount, currency } = a0;
|
|
return SpendingLimitSettings.create({
|
|
oneTimePurchaseLimit: SpendingLimit.create({
|
|
amount: String(amount),
|
|
currency
|
|
})
|
|
});
|
|
}, {
|
|
comparator: spendingLimitEqual
|
|
});
|
|
export { r11 as ParentalControlledExplicitContent };
|
|
export { r10 as ParentalControlledLegacyExplicitContent };
|
|
export { r66 as ParentalControlledGoreContent };
|
|
export { r75 as ParentalControlledDefaultMessageRequestRestricted };
|
|
export { r84 as ParentalControlledDefaultGuildsRestricted };
|
|
export { r93 as ParentalControlledDefaultGuildsRestrictedV2 };
|
|
export { r101 as ParentalControlledFriendSourceFlags };
|
|
export { r109 as ParentalControlledDropsOptedOut };
|
|
export { r117 as ParentalControlledQuests3PDataOptedOut };
|
|
export { r130 as ParentalControlledSpendingLimit };
|