decord/stable/source/lib/intlFormatDate.tsx
github-actions e2bc0408ee chore: update source for stable 346.13
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4821.js (118.4 MB)
2026-09-22 22:11:40 +00:00

70 lines
1.9 KiB
TypeScript

// Module ID: 4324
// Function ID: 4325
// Name: intlFormatDate
// Dependencies: [2025, 4321, 1114, 2]
// Exports: makeFormatter
// Module 4324 (intlFormatDate)
import LocaleStore from "LocaleStore" /* 2025 */;
const require = fn;
function makeIntlFormatter(locale, arg1) {
try {
const _Intl = Intl;
return Intl.DateTimeFormat(locale, arg1).format;
} catch (err) {
const _Intl2 = Intl;
return Intl.DateTimeFormat(undefined, tmp).format;
}
}
const size = fn(2);
const result = size.fileFinishedImporting("lib/intlFormatDate.tsx");
export const makeFormatter = function makeFormatter(arg0) {
locale = LocaleStore.locale;
let tmp = (function tryMakeNativeFormatter(locale, arg1) {
closure_0 = locale;
closure_1 = arg1;
if (null == closure_0(closure_1[1]).makeFormatter) {
return null;
} else {
try {
let tmp4 = null != locale;
if (tmp4) {
const str2 = tmp2(tmp3[2]).systemLocale;
let first;
if (str2 != null) {
first = str2.split("-")[0];
}
tmp4 = locale.split("-")[0] === first;
}
if (locale !== tmp2(tmp3[2]).initialLocale) {
const tmp7 = locale;
}
const formatter = tmp2(tmp3[1]).makeFormatter(tmp7, arg1);
if (null == formatter) {
return null;
} else {
closure_3 = null;
return (arg0) => {
try {
return formatter(arg0);
} catch (err) {
if (null == closure_3) {
closure_3 = makeIntlFormatter(closure_0, closure_1);
}
return closure_3(tmp);
}
};
}
const tmp2Result = tmp2(tmp3[1]);
} catch (err) {
return tmp;
}
}
})(locale, arg0);
if (null == tmp) {
tmp = makeIntlFormatter(locale, arg0);
}
return tmp;
};