Files
2026-07-28 01:06:53 +03:00

129 lines
6.6 KiB
TypeScript

/* Metro module 6641; source: modules/markup/TimestampUtils.tsx; dependencies: [3826, 3738, 672, 2] */
import Durations from '../../utils/Durations.tsx'; /* Metro dependency 672 */
import Module03738 from '../../by-id/module-03738.js'; /* Metro dependency 3738 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as DateUtilsModule from '../../utils/DateUtils.tsx'; /* Metro dependency 3826 */
function _fun52545(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#52545, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6819:6, offset: 0x0132ff4f, size: 352 bytes, params: 8, frame: 21
const env0_0 = require;
const formatTimestampMention2 = formatTimestampMention;
let Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object = {t: t_52547, T: T_52548, d: d_52549, D: D_52550, f: f_52551, F: F_52552, s: s_52553, S: S_52554,
R: R_52555};
Object = global.Object;
Object.setPrototypeOf(object, null);
Object = global.Object;
let value = Object.keys(object);
value = value.join('|');
const RegExp = global.RegExp;
value = '^<t:(-?\\d{1,17})(?::(' + value + '))?>';
const regExp = new RegExp(value);
(FileImportTrackerModule).fileFinishedImporting('modules/markup/TimestampUtils.tsx');
exports.TIMESTAMP_FORMATS = object;
exports.DEFAULT_TIMESTAMP_FORMAT = 'f';
exports.TIMESTAMP_REGEX = regExp;
exports.formatTimestampMention = formatTimestampMention2;
exports.parseTimestamp = function(a0, a1) {
return formatTimestampMention({timestamp: a0, format: a1});
};
exports.unparseTimestamp = function(a0, a1) {
return a1 != null ? '<t:' + a0 + ':' + a1 + '>' : '<t:' + a0 + '>';
};
function formatTimestampMention({timestamp, format}) { // fn#52546, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6819:937, offset: 0x013300af, size: 181 bytes, params: 2, frame: 17
var r1;
var object;
const defaultImport = Module03738;
const Number = global.Number;
const value3 = Number(timestamp);
const Millis = (Durations).Millis;
const SECOND = Millis.SECOND;
const value4 = defaultImport(value3 * SECOND);
if (value4.isValid()) {
r1 = format != null ? env0_3[format] : undefined;
r1 = r1 ?? env0_3.f;
object = {timestamp: timestamp, format: format, parsed: value4};
object.full = env0_3.F(value4);
object.formatted = r1(value4);
return object;
}
return null;
}
function t_52547(a0) { // fn#52547, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6819:104, offset: 0x01330164, size: 45 bytes, params: 2, frame: 13
return (DateUtilsModule).dateFormat(a0, 'LT');
}
function T_52548(a0) { // fn#52548, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6819:136, offset: 0x01330191, size: 45 bytes, params: 2, frame: 13
return (DateUtilsModule).dateFormat(a0, 'LTS');
}
function d_52549(a0) { // fn#52549, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6819:169, offset: 0x013301be, size: 45 bytes, params: 2, frame: 13
return (DateUtilsModule).dateFormat(a0, 'L');
}
function D_52550(a0) { // fn#52550, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6819:200, offset: 0x013301eb, size: 45 bytes, params: 2, frame: 13
return (DateUtilsModule).dateFormat(a0, 'LL');
}
function f_52551(a0) { // fn#52551, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6819:232, offset: 0x01330218, size: 45 bytes, params: 2, frame: 13
return (DateUtilsModule).dateFormat(a0, 'LLL');
}
function F_52552(a0) { // fn#52552, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6819:265, offset: 0x01330245, size: 45 bytes, params: 2, frame: 13
return (DateUtilsModule).dateFormat(a0, 'LLLL');
}
function s_52553(a0) { // fn#52553, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6819:299, offset: 0x01330272, size: 47 bytes, params: 2, frame: 13
return (DateUtilsModule).dateFormat(a0, 'L LT');
}
function S_52554(a0) { // fn#52554, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6819:333, offset: 0x013302a1, size: 47 bytes, params: 2, frame: 13
return (DateUtilsModule).dateFormat(a0, 'L LTS');
}
function R_52555(a0) { // fn#52555, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6819:368, offset: 0x013302d0, size: 354 bytes, params: 2, frame: 25
var r1;
var r0;
var property;
var defaultImport7;
var value6;
var value7;
var value8;
var error;
var value;
const value2 = importDefault(dependencyMap[1]).relativeTimeThreshold('s');
importDefault(dependencyMap[1]).relativeTimeThreshold('s', 60);
const value3 = importDefault(dependencyMap[1]).relativeTimeThreshold('ss');
importDefault(dependencyMap[1]).relativeTimeThreshold('ss', -1);
const value4 = importDefault(dependencyMap[1]).relativeTimeThreshold('m');
importDefault(dependencyMap[1]).relativeTimeThreshold('m', 60);
const value5 = null;
try {
property = dependencyMap[1];
defaultImport7 = importDefault(property);
value6 = a0.toDate();
value7 = defaultImport7(value6);
value8 = value7.fromNow();
r1 = value8;
} catch (error) {
r1 = value5;
}
importDefault(dependencyMap[1]).relativeTimeThreshold('s', value2);
importDefault(dependencyMap[1]).relativeTimeThreshold('ss', value3);
importDefault(dependencyMap[1]).relativeTimeThreshold('m', value4);
if (value5 != r1) {
r0 = r1;
} else {
value = importDefault(dependencyMap[1]);
value = value(a0.toDate());
value = value.fromNow();
r0 = value;
}
return r0;
}
}
global.__d(_fun52545, 6641, [3826, 3738, 672, 2]) /* metro module 6641, dependencies: [3826, 3738, 672, 2] */;