decord/alpha/source/modules/oauth2/Utils.tsx

62 lines
2.8 KiB
TypeScript
Raw Normal View History

2026-10-09 10:00:15 +00:00
// Module ID: 9203
// Function ID: 9204
// Name: Utils
2026-10-09 10:00:15 +00:00
// Dependencies: [1085, 9204, 1126, 6049, 2]
2026-07-20 16:05:17 +00:00
// Exports: getApplicationDetailsText, isContentClassificationRestricted
2026-10-09 10:00:15 +00:00
// Module 9203 (Utils)
2026-10-03 08:58:59 +00:00
import Constants from "Constants" /* 1085 */;
2026-10-09 10:00:15 +00:00
import utils from "utils" /* 6049 */;
import useIsSocialLayerParentApplication from "useIsSocialLayerParentApplication" /* 9204 */;
import size from "module_2" /* 2 */;
2026-07-23 10:11:24 +00:00
const MarketingURLs = Constants.MarketingURLs;
let result = size.fileFinishedImporting("modules/oauth2/Utils.tsx");
2026-07-20 16:05:17 +00:00
export const getApplicationDetailsText = function getApplicationDetailsText(application) {
2026-10-03 08:58:59 +00:00
const obj = useIsSocialLayerParentApplication;
const isSocialLayerParentApplication = obj.getIsSocialLayerParentApplication(application);
2026-07-20 16:05:17 +00:00
if (null != application.privacy_policy_url) {
if (null != application.terms_of_service_url) {
2026-10-03 08:58:59 +00:00
const t4 = tmp(1126).t;
const tmp10 = isSocialLayerParentApplication ? t4.yVfotv : t4.rxlyKL;
const intl4 = tmp(1126).intl;
const obj2 = { application: null, privacyPolicyURL: null, termsOfServiceURL: null, discordPrivacyPolicyURL: MarketingURLs.PRIVACY };
({ name: obj5.application, privacy_policy_url: obj5.privacyPolicyURL, terms_of_service_url: obj5.termsOfServiceURL } = application);
2026-10-03 08:58:59 +00:00
return intl4.format(tmp10, obj2);
2026-07-20 16:05:17 +00:00
}
}
if (null != application.privacy_policy_url) {
2026-10-03 08:58:59 +00:00
const t3 = tmp(1126).t;
const tmp8 = isSocialLayerParentApplication ? t3.pYVSah : t3.TBvmM2;
const intl3 = tmp(1126).intl;
const obj9 = { application: null, privacyPolicyURL: null, discordPrivacyPolicyURL: MarketingURLs.PRIVACY };
({ name: obj4.application, privacy_policy_url: obj4.privacyPolicyURL } = application);
2026-10-03 08:58:59 +00:00
return intl3.format(tmp8, obj9);
2026-07-20 16:05:17 +00:00
} else if (null != application.terms_of_service_url) {
2026-10-03 08:58:59 +00:00
const t2 = tmp(1126).t;
const tmp6 = isSocialLayerParentApplication ? t2.nBLOp5 : t2["q0T/Q1"];
const intl2 = tmp(1126).intl;
const obj10 = { application: null, termsOfServiceURL: null, discordPrivacyPolicyURL: MarketingURLs.PRIVACY };
({ name: obj3.application, terms_of_service_url: obj3.termsOfServiceURL } = application);
2026-10-03 08:58:59 +00:00
return intl2.format(tmp6, obj10);
2026-07-20 16:05:17 +00:00
} else {
2026-10-03 08:58:59 +00:00
const t = tmp(1126).t;
const tmp4 = isSocialLayerParentApplication ? t["8LemYv"] : t["3Ywek3"];
const intl = tmp(1126).intl;
const obj11 = { application: application.name, discordPrivacyPolicyURL: MarketingURLs.PRIVACY };
2026-10-03 08:58:59 +00:00
return intl.format(tmp4, obj11);
2026-07-20 16:05:17 +00:00
}
};
export const isContentClassificationRestricted = function isContentClassificationRestricted(content_classification, nsfwAllowed) {
2026-07-20 16:05:17 +00:00
let result = null != content_classification;
if (result) {
2026-10-03 08:58:59 +00:00
const obj = utils;
result = obj.isAgeRestrictedContentClassification(content_classification);
2026-07-20 16:05:17 +00:00
}
if (result) {
result = false === nsfwAllowed;
2026-07-20 16:05:17 +00:00
}
return result;
};