84 lines
3.4 KiB
TypeScript
84 lines
3.4 KiB
TypeScript
/* Metro module 8350; source: modules/messages/native/renderer/redactRestrictedContent.tsx; dependencies: [2] */
|
|
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
|
|
function _fun66484(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66484, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8535:6, offset: 0x01bfc982, size: 102 bytes, params: 8, frame: 16
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/messages/native/renderer/redactRestrictedContent.tsx');
|
|
exports.default = redactRestrictedContent;
|
|
function nodeToText(a0) { // fn#66485, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8535:43, offset: 0x01bfc9e8, size: 147 bytes, params: 2, frame: 16
|
|
var r2;
|
|
var r1;
|
|
var r0;
|
|
var Array;
|
|
let value = a0;
|
|
const value2 = '';
|
|
if (value == null) {
|
|
r0 = value2;
|
|
} else {
|
|
if (typeof value === 'string') {
|
|
r1 = value;
|
|
} else {
|
|
Array = global.Array;
|
|
if (Array.isArray(value)) {
|
|
value = value.map(nodeToText);
|
|
value = value.join(value2);
|
|
r2 = value;
|
|
} else if (typeof value.content === 'string') {
|
|
r2 = value.content;
|
|
} else if (value.content != null) {
|
|
value = nodeToText(value.content);
|
|
r2 = value;
|
|
} else {
|
|
r2 = value2;
|
|
}
|
|
r1 = r2;
|
|
}
|
|
r0 = r1;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function redactRestrictedContent(a0) { // fn#66486, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8535:380, offset: 0x01bfca7b, size: 261 bytes, params: 2, frame: 17
|
|
var r1;
|
|
var r0;
|
|
var Array;
|
|
var object;
|
|
let value = a0;
|
|
if (value == null) {
|
|
r0 = value;
|
|
} else if (typeof value === 'string') {
|
|
r0 = value;
|
|
} else {
|
|
Array = global.Array;
|
|
if (Array.isArray(value)) {
|
|
value = value.map(redactRestrictedContent);
|
|
r1 = value;
|
|
} else if (value.type === 'link') {
|
|
object = {type: 'inlineCode'};
|
|
object.content = nodeToText(value.content);
|
|
r1 = object;
|
|
} else if (value.type === 'attachmentLink') {
|
|
object = {type: 'inlineCode'};
|
|
object.content = nodeToText(value.content);
|
|
r1 = object;
|
|
} else if (value.type === 'customEmoji') {
|
|
r1 = {type: 'text', content: ':' + value.alt + ':'};
|
|
} else if (value.content == null) {
|
|
r1 = value;
|
|
} else {
|
|
object = {};
|
|
copyDataProperties(object, value, undefined);
|
|
value = redactRestrictedContent(value.content);
|
|
object['content'] = value;
|
|
r1 = object;
|
|
}
|
|
r0 = r1;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun66484, 8350, [2]) /* metro module 8350, dependencies: [2] */;
|