decord/source/modules/unique_usernames/UniqueUsernamesUtils.tsx
github-actions cd74c1f217 chore: update source for alpha 345.5
Skipped 1 file(s) >100MB (GitHub limit): source/__vendor/09xxx/9667_m.js (378 MB)
2026-09-05 10:56:28 +00:00

77 lines
3.5 KiB
TypeScript

// Module ID: 14711
// Function ID: 14712
// Name: formatUsernameLiveCheckValidation
// Dependencies: [4745, 14706, 1114, 2]
// Exports: formatUsernameLiveCheckValidation
// Module 14711 (formatUsernameLiveCheckValidation)
import set from "set" /* 2 */;
import t from "t" /* 4745 */;
const result = set.fileFinishedImporting("modules/unique_usernames/UniqueUsernamesUtils.tsx");
export const formatUsernameLiveCheckValidation = function formatUsernameLiveCheckValidation(arg0) {
const match = t.match(arg0);
const str = t;
let obj = { error: null };
const P = t.P;
obj[0] = P.not(t.P.nullish);
const withResult = match.with({ rateLimited: true }, () => {
const obj = { type: callback(14706).NameValidationState.RATE_LIMIT, message: null };
const intl = callback(1114).intl;
obj[1] = intl.string(callback(1114).t.T15lqn);
return obj;
});
const withResult1 = match.with({ rateLimited: true }, () => {
const obj = { type: callback(14706).NameValidationState.RATE_LIMIT, message: null };
const intl = callback(1114).intl;
obj[1] = intl.string(callback(1114).t.T15lqn);
return obj;
}).with(obj, (error) => ({ type: callback(14706).NameValidationState.ERROR, message: error.error }));
const withResult2 = match.with({ rateLimited: true }, () => {
const obj = { type: callback(14706).NameValidationState.RATE_LIMIT, message: null };
const intl = callback(1114).intl;
obj[1] = intl.string(callback(1114).t.T15lqn);
return obj;
}).with(obj, (error) => ({ type: callback(14706).NameValidationState.ERROR, message: error.error })).with({ taken: false }, () => {
const obj = { type: callback(14706).NameValidationState.AVAILABLE, message: null };
const intl = callback(1114).intl;
obj[1] = intl.string(callback(1114).t.PgfBSx);
return obj;
});
obj = { error: t.P.nullish };
const withResult3 = match.with({ rateLimited: true }, () => {
const obj = { type: callback(14706).NameValidationState.RATE_LIMIT, message: null };
const intl = callback(1114).intl;
obj[1] = intl.string(callback(1114).t.T15lqn);
return obj;
}).with(obj, (error) => ({ type: callback(14706).NameValidationState.ERROR, message: error.error })).with({ taken: false }, () => {
const obj = { type: callback(14706).NameValidationState.AVAILABLE, message: null };
const intl = callback(1114).intl;
obj[1] = intl.string(callback(1114).t.PgfBSx);
return obj;
}).with({ taken: true }, () => {
const obj = { type: callback(14706).NameValidationState.ERROR, message: null };
const intl = callback(1114).intl;
obj[1] = intl.string(callback(1114).t.mCrAUb);
return obj;
});
return match.with({ rateLimited: true }, () => {
const obj = { type: callback(14706).NameValidationState.RATE_LIMIT, message: null };
const intl = callback(1114).intl;
obj[1] = intl.string(callback(1114).t.T15lqn);
return obj;
}).with(obj, (error) => ({ type: callback(14706).NameValidationState.ERROR, message: error.error })).with({ taken: false }, () => {
const obj = { type: callback(14706).NameValidationState.AVAILABLE, message: null };
const intl = callback(1114).intl;
obj[1] = intl.string(callback(1114).t.PgfBSx);
return obj;
}).with({ taken: true }, () => {
const obj = { type: callback(14706).NameValidationState.ERROR, message: null };
const intl = callback(1114).intl;
obj[1] = intl.string(callback(1114).t.mCrAUb);
return obj;
}).with(obj, () => ({ type: callback(14706).NameValidationState.INTERNAL_ERROR, message: "" })).otherwise(() => {
});
};